query
stringlengths
7
5.25k
document
stringlengths
15
1.06M
metadata
dict
negatives
listlengths
3
101
negative_scores
listlengths
3
101
document_score
stringlengths
3
10
document_rank
stringclasses
102 values
Set min time of a property
public function setPropertyMinTime(string $symbol, ?DateTime $time): Statistics { $this->addProperty($symbol); $this->properties[$symbol]['min_time'] = $time; return $this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function setMinTime($value)\n {\n return $this->set('MinTime', $value);\n }", "public function setMin($min): bool {\n\t\tif($min instanceof DateTime) {\n\t\t\t$min = $min->format(self::OutputFormat);\n\t\t}\n\n\t\tif(is_string($min) || is_null($min)) {\n\t\t\t$this->setAttribute(\"min\", $min);\n\t\t\treturn true;\n\t\t}\n\n\t\tAppLog::error(\"invalid minimum time\", __FILE__, __LINE__, __FUNCTION__);\n\t\treturn false;\n\t}", "function setMinute( $value )\r\n {\r\n $value = min( $value, 59 );\r\n $this->SecondsElapsed = ( ( $this->hour() * 3600 ) + ( $value * 60 ) + $this->second() );\r\n }", "public function min($value) {\n return $this->setProperty('min', $value);\n }", "public function min($value) {\n return $this->setProperty('min', $value);\n }", "function setMinute($m)\r\n {\r\n if($m > 59 || $m < 0) {\r\n $this->minuto = 0;\r\n } else {\r\n $this->minuto = $m;\r\n }\r\n }", "public function setStartTime() {\n\t\t$this->pg_start = $this->getStartTime();\n\t}", "function setMin($min) {\n $this->field['min'] = (int) $min;\n\n return $this;\n }", "public function setStartTime(?Time $value): void {\n $this->getBackingStore()->set('startTime', $value);\n }", "public function setSyncTime(): void\n {\n }", "public function getPropertyMinTime(string $symbol): ?DateTime {\n\t\treturn $this->properties[$symbol]['min_time'] ?? null;\n\t}", "public function setMin($min) {\n\t\t$this->attributes['min'] = $min;\n\t\t$this->min = $min;\n\t\treturn $this;\n\t}", "public function setTime($time=0){\n\t\t\t$this->_time = $time;\n\t\t}", "public function setTime($time);", "public function __construct($min)\n {\n $this->min = $min;\n }", "public function setBooTimeStartAttribute($value)\n\t{\n\t\t$this->attributes['boo_time_start'] = $value->timestamps;\n\t}", "public function setTimeOverride( $time ) {\n\t\t$this->time = $time;\n\t}", "public function setMin($min) {\n $this->min = $min;\n return $this;\n }", "public function setMin($min) {\n $this->min = $min;\n return $this;\n }", "public function setMinimum(?Json $value): void {\n $this->getBackingStore()->set('minimum', $value);\n }", "public function setMin( int $min ): void {\n\t\t\t$this->minimum = abs( $min );\n\t\t}", "function setTimeOffset($value)\n {\n $this->_props['TimeOffset'] = $value;\n }", "function getMinute()\r\n {\r\n return $this->minuto;\r\n }", "public function setStartTime($value) {\n return $this->set(self::STARTTIME, $value);\n }", "function setStartTime($event, $time) {\n Timer::timers($event, array(\n 'start' => $time,\n 'stopped' => false\n ));\n }", "function min() { return $this->min; }", "public function setTime($value)\n {\n if (!array_key_exists('time', $this->fieldsModified)) {\n $this->fieldsModified['time'] = $this->data['fields']['time'];\n } elseif ($value === $this->fieldsModified['time']) {\n unset($this->fieldsModified['time']);\n }\n\n $this->data['fields']['time'] = $value;\n }", "public function setMinimum($value) {\r\n $this->internalSetMinimum($value);\r\n }", "public function setMaintenanceWindowStartTime(?Time $value): void {\n $this->getBackingStore()->set('maintenanceWindowStartTime', $value);\n }", "function start_time($start_time=null)\n {\n if (isset($start_time)) $this->start_time = $start_time;\n return $this->start_time;\n }", "public function setMinValue($minValue);", "public function setXMin($xMin) {}", "public function setStartTime($value)\n {\n return $this->set(self::START_TIME, $value);\n }", "public function setStartTime($value)\n {\n return $this->set(self::_START_TIME, $value);\n }", "public function setStartTime($value)\n {\n return $this->set(self::_START_TIME, $value);\n }", "public function set($key, $value, $minutes = 30);", "public function setStartTime($starttime){\n $this->_starttime = $starttime;\n }", "public function testSetMinGaranti() {\n\n $obj = new Employes();\n\n $obj->setMinGaranti(10.092018);\n $this->assertEquals(10.092018, $obj->getMinGaranti());\n }", "public function setBeginTime($value)\n {\n return $this->set(self::_BEGIN_TIME, $value);\n }", "public function testSetTime() {\n $time = new \\DateTime();\n $this->order->setTime($time);\n $this->assertEquals($time, $this->order->getTime());\n }", "public function setStartTime($value)\n {\n return $this->set('StartTime', $value);\n }", "function setWorkTime( $value )\n {\n if ( $this->State_ == \"Dirty\" )\n $this->get( $this->ID );\n\n $this->WorkTime = $value;\n }", "public function setStartTime($start_time)\n {\n\n if (is_numeric($start_time) && $start_time > 0) {\n $end_time = $this->getEndTime();\n if (isset($end_time) && $start_time > $end_time) {\n $this->start_time = $end_time;\n $this->setEndTime($start_time);\n } else {\n $this->start_time = $start_time;\n }\n }\n\n return $this;\n }", "public function setMin($value)\n {\n $this->_minValue = $value;\n return $this;\n }", "public function setTime($value) {\n\t\t$segments = explode(':',$value);\n\t\t$length = count($segments);\n\t\tswitch ($length) {\n\t\t\tcase 1:\n\t\t\t\t$time = \"0:00:\".sprintf('%02d',$segments[0]);\n\t\t\t\tbreak;\n\t\t\tcase 2:\n\t\t\t\t$time = \"0:\".sprintf('%02d',$segments[0]).\":\".sprintf('%02d',$segments[1]);\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\t$time = $value;\n\t\t\t\tbreak;\n\t\t}\n\t\t\n\t\t$this->_time = $time;\n\t}", "public function setMinute($minute)\n {\n $this->minute = $minute;\n }", "public function set_time($time) {\n if (!is_integer($time)) { return false; }\n $this->_time = $time;\n return true;\n }", "public function setAutomaticMinimum($value) {\r\n $this->automaticMinimum = $this->setAutoMinMax($this->automaticMinimum, $this->automaticMaximum,\r\n $value);\r\n }", "public function setFromTime($value) {\n return $this->set(self::FROM_TIME, $value);\n }", "public function setStartAtMin(?string $startAtMin): void\n {\n $this->startAtMin = $startAtMin;\n }", "public function setTimeBasedAttribute($val)\n {\n $this->_propDict[\"timeBasedAttribute\"] = $val;\n return $this;\n }", "public function updateTime( Inx_Api_Recipient_Attribute $attr, $sValue );", "public function setMinutes($a = null)\n {\n throw new NotImplementedException(__METHOD__);\n }", "public static function setDateFormatMinutes()\n {\n self::$settings[0] = 'Y-m-d H:i:s';\n }", "public function get_time_min() {\n return sprintf( '%02d', (int) edd_get_option( 'edd_commissions_payout_schedule_time_min', '' ) );\n }", "public function setMinProperties(int $minProperties): self\n {\n $this->minProperties = $minProperties;\n return $this;\n }", "public function setShowTimeAttribute($value)\n {\n $this->attributes['show_time'] = $value;\n }", "function __construct($id, array $properties = array()) {\n // be overridden manually.\n $this->description = t('Use the format HH:MM:SS.');\n parent::__construct($id, $properties);\n $this->expand_callbacks[] = 'fapitng_form_expand_time';\n $this->attributes['size'] = 8;\n }", "public function setTime($a = null)\n {\n throw new NotImplementedException(__METHOD__);\n }", "public function setTime($a = null)\n {\n throw new NotImplementedException(__METHOD__);\n }", "public function setModifiedValue()\n {\n $this->setModified(new \\DateTime());\n }", "public function minDateTime(/*TypeDateTime|string*/ $minDateTime): self\n {\n $this->validatingChain[] = function () use ($minDateTime) {\n if ($this->validatingValue < $this->createDateTime($minDateTime)) {\n $this->defaultMessageSet(\n self::VALIDATION_DATETIME_MIN[1],\n self::VALIDATION_DATETIME_MIN[0],\n gettype($minDateTime) === 'string' ? $minDateTime : $minDateTime->get()\n );\n $this->throwFail();\n }\n };\n\n return $this;\n }", "public function setStartTime( $time )\n {\n if ( !is_numeric( $time ) ) {\n throw new \\Exception( \"Argument \\\"time\\\" must be a number\" );\n }\n\n $this->start_time = $time;\n return $this;\n }", "function set_property(){\n }", "public function setTime($value)\n {\n return $this->set(self::TIME, $value);\n }", "public function setTime($value)\n {\n return $this->set(self::TIME, $value);\n }", "public function min($min = null)\n {\n $this->min = $min;\n\n return $this;\n }", "public function testMin()\n {\n $this->ascendingSequence->setMin(1);\n $min = $this->ascendingSequence->getMin();\n $this->assertEquals(1, $min);\n }", "public function setPropertyMaxTime(string $symbol, ?DateTime $time): Statistics {\n\t\t$this->addProperty($symbol);\n\t\t$this->properties[$symbol]['max_time'] = $time;\n\n\t\treturn $this;\n\t}", "private function min ($param)\n {\n $v = $this->value;\n if (in_array($this->type, ['int', 'float']))\n {\n if ($v < $param)\n {\n $this->SetError('min', 'The '.$this->SpacedKey.' field must be at least '.$param);\n return false;\n }\n }\n elseif ($this->type == 'date')\n {\n $v = strtotime($v);\n $MinTime = strtotime($param);\n if ($v < $MinTime)\n {\n $this->SetError('min', 'The '.$this->SpacedKey.' field must be after '.$param);\n return false;\n }\n }\n else\n {\n if (strlen($v) < $param)\n {\n $this->SetError('min', 'The '.$this->SpacedKey.' field must be at least '.$param.' charcters in length');\n return false;\n }\n }\n return true;\n }", "public function getPropertyMinTimeFormatted(string $symbol): ?string {\n\t\treturn $this->getPropertyMinTime($symbol) ? $this->getPropertyMinTime($symbol)->format('c') : null;\n\t}", "public function setStartTime($startTime) {\r\n\t\t$this->startTime = $startTime;\r\n\t}", "function setCreatedTime($arg0) {\n\t\t$this->created_time = $arg0;\n\t\t$this->addModifiedColumn('created_time');\n\t\treturn $this;\n\t}", "function setDuration( $value )\n {\n if ( $this->State_ == \"Dirty\" )\n $this->get( $this->ID );\n\n $this->Duration = $value;\n }", "private function min()\n {\n return Carbon::create(1, 1, 1, 0, 0, 0);\n }", "public function setMinimumValue(int $minimumValue): void;", "public function setStartTime($newStartTime) {\r\n\t\r\n\t\t$this->localStartTime = $newStartTime;\r\n\r\n\t}", "function SetStartTimestamp ($hunt_start_timestamp) {\n $hunt_division = mysql_result(@mysql_query(\"SELECT `hunt_division` FROM `hunts` WHERE `hunt_id` = '$this->hunt_id'\", $this->ka_db), 0, 'hunt_division');\n if (($this->Allowed('allhunts') == true) || (($this->Allowed('hunts') == true) && ($this->CheckDivision($hunt_division) == true))) {\n if (@mysql_query (\"UPDATE `hunts` SET `hunt_start_timestamp` = '$hunt_start_timestamp' WHERE `hunt_id` = $this->hunt_id\", $this->ka_db)) {\n $this->hunt_start_timestamp = $hunt_start_timestamp;\n return true;\n } else\n return false;\n } else {\n $this->roster_error = \"You do not have access to this function.\";\n return false;\n }\n }", "public static function onChangeStartHour($param=NULL)\n {\n $obj = new stdClass;\n if (empty($param['start_minute']))\n {\n $obj->start_minute = '0';\n TForm::sendData('form_event', $obj);\n }\n \n if (empty($param['end_hour']) AND empty($param['end_minute']))\n {\n $obj->end_hour = $param['start_hour'] +1;\n $obj->end_minute = '0';\n TForm::sendData('form_event', $obj);\n }\n }", "public function setTime($value)\n {\n return $this->set(self::_TIME, $value);\n }", "public function setTime($value)\n {\n return $this->set(self::_TIME, $value);\n }", "public function setTime($value)\n {\n return $this->set(self::_TIME, $value);\n }", "public function setSmallVClock($smallVClock) {}", "function setProperty($key ='', $value ='') {\r\r\n \r\r\n return ( array_key_exists($key, $this->_timezone) ? ($this->_timezone[$key] = $value) : false );\r\r\n }", "public function getMinute()\n {\n return $this->minute;\n }", "function set_timecreated() {\n $this->timecreated = time();\n return true;\n }", "public function __construct($minute)\n {\n $this->minute = $minute;\n }", "public function setStart ($value)\r\n\t{\r\n\t\t$this->start = $value;\r\n\t}", "protected function onParentSet() : void\n {\n $value = $this->oFG->getData()->getValue($this->strName);\n $this->iValue = $value ? intval($value) : $this->iMin;\n }", "public function setTime($time): bool {\n\t\tif($time instanceof DateTime) {\n\t\t\t$time = $time->format(self::OutputFormat);\n\t\t}\n\n\t\tif(is_string($time) || is_null($time)) {\n\t\t\t$this->setAttribute(\"value\", $time);\n\t\t\treturn true;\n\t\t}\n\n\t\tAppLog::error(\"invalid time\", __FILE__, __LINE__, __FUNCTION__);\n\t\treturn false;\n\t}", "function set_timemodified() {\n $this->timemodified = time();\n return true;\n }", "function checkPropertyMin($propertyMinimum, $overallTotalHours) {\n /**\n * Check property minimum function\n */\n if ($propertyMinimum > $overallTotalHours) {\n /**\n * Adding Minimum hours error message\n */\n $msgData = Mage::helper ( 'airhotels' )->__ ( 'Minimum property hour(s) which is' ) . \"$propertyMinimum\";\n /**\n * Set the response to body with error message\n */\n Mage::app ()->getResponse ()->setBody ( $msgData );\n /**\n * return the error message\n */\n return TRUE;\n }\n }", "public function set_score_min($score_min)\n\t{\n\n\t\t$this->score_min = $score_min;\n\t}", "public function calculateTime()\n {\n echo 'it takes 1h to get there.',\"\\n\";\n\n self::$traitStaticMember = 'changes conflict member\\'s initial value';\n }", "public function setTime(?DateTime $value): void {\n $this->getBackingStore()->set('time', $value);\n }", "public function getMin() {\n return $this->min;\n }", "public function setFormationTime($value)\n {\n return $this->set(self::FORMATIONTIME, $value);\n }", "public function setServerTime();", "public function setMin($value)\n {\n if (is_array($value)) {\n $value = array2Point($value);\n }\n\n if (!($value instanceof Point)) {\n throw new InvalidConfigException('Invalid `min` attribute value; it must be a Point object or an array that can be converted to a Point object');\n }\n\n $this->_min = $value;\n }", "function setSecond( $value )\r\n {\r\n $value = min( $value, 59 );\r\n $this->SecondsElapsed = ( ( $this->hour() * 3600 ) + ( $this->minute() * 60 ) + $value );\r\n }" ]
[ "0.6796545", "0.6411102", "0.6151459", "0.59037966", "0.59037966", "0.5854219", "0.58352697", "0.57461363", "0.5733297", "0.57268", "0.57077646", "0.5702376", "0.5615132", "0.56025404", "0.5566454", "0.5553823", "0.5547346", "0.55386424", "0.55386424", "0.5519264", "0.55149204", "0.5490922", "0.5482908", "0.5467842", "0.54546994", "0.5435399", "0.5405039", "0.53956026", "0.53831995", "0.53773904", "0.536394", "0.5362128", "0.53568894", "0.53436697", "0.53436697", "0.5340452", "0.53257394", "0.5322327", "0.53181374", "0.5316007", "0.53136903", "0.52912676", "0.5281499", "0.5271404", "0.5270021", "0.52402157", "0.52385443", "0.52317846", "0.5212983", "0.51962864", "0.5179832", "0.5158365", "0.51453626", "0.5129637", "0.51264817", "0.51198536", "0.5116291", "0.5111954", "0.50956786", "0.50956786", "0.508749", "0.5052637", "0.50471455", "0.50390184", "0.50185156", "0.50185156", "0.50147", "0.50119734", "0.5009015", "0.50057894", "0.49950942", "0.49905306", "0.49865103", "0.49843952", "0.49823707", "0.49776456", "0.49734664", "0.4968875", "0.49662226", "0.4954607", "0.4954607", "0.4954607", "0.49521053", "0.49485695", "0.4936939", "0.49358785", "0.49336076", "0.49304125", "0.49280852", "0.49169582", "0.49152803", "0.49066862", "0.49057925", "0.49027473", "0.49012944", "0.48946622", "0.48857132", "0.488347", "0.48808795", "0.4873299" ]
0.6718996
1
Get max time of a property
public function getPropertyMaxTime(string $symbol): ?DateTime { return $this->properties[$symbol]['max_time'] ?? null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getMaxDateProperty()\n {\n return Carbon::now()->timezone($this->timezome)->format('Y-m-d');\n }", "public function getMaxRoundTripTime()\n {\n if (array_key_exists(\"maxRoundTripTime\", $this->_propDict)) {\n if (is_a($this->_propDict[\"maxRoundTripTime\"], \"\\DateInterval\") || is_null($this->_propDict[\"maxRoundTripTime\"])) {\n return $this->_propDict[\"maxRoundTripTime\"];\n } else {\n $this->_propDict[\"maxRoundTripTime\"] = new \\DateInterval($this->_propDict[\"maxRoundTripTime\"]);\n return $this->_propDict[\"maxRoundTripTime\"];\n }\n }\n return null;\n }", "public function getPropertyMaxTimeFormatted(string $symbol): ?string {\n\t\treturn $this->getPropertyMaxTime($symbol) ? $this->getPropertyMaxTime($symbol)->format('c') : null;\n\t}", "public function getWorstTime() {\r\n\t\t$max = array();\r\n\t\tforeach ($this->races as $race) {\r\n\t\t\t$max[] = $race->getWorstTime();\r\n\t\t}\r\n\t\treturn max($max);\r\n\t}", "public function getMaxExecutionTime()\n\t{\n\t\tif(!isset($this->_maxExecutionTime)){\n\t\t\t$this->_maxExecutionTime = $this->dontHardcodeService->searchDontHardcodeByParamNameAndFilterName(__CLASS__,'maxExecutionTime',true);\n\t\t}\n\n\t\tif(is_numeric($this->_maxExecutionTime) && $this->_maxExecutionTime > 44){\n\t\t\treturn $this->_maxExecutionTime;\n\t\t}\n\t\telse{\n\t\t\treturn 120;\n\t\t}\n\t}", "public function getMax()\n {\n return $this->_fields['Max']['FieldValue'];\n }", "public function getMaximum()\n {\n return $this->max;\n }", "public static function getMaxDuration()\n {\n $models = Call::find()->all();\n foreach ($models as $model) {\n $result[$model->id] = $model->time_finished - $model->time_connected;\n }\n\n return max($result);\n }", "public function GetDuration_Max()\n {\n // phpcs:enable PSR1.Methods.CamelCapsMethodName.NotCamelCaps\n return $this->_max_duration;\n }", "public function getMax() {\n return $this->max;\n }", "public function getMaximum() {\r\n return $this->maximumvalue;\r\n }", "function getMax() { return $this->readMaxValue(); }", "function max() { return $this->max; }", "public function getMaximum()\n {\n return $this->maximum;\n }", "public function getNextMaxTimeStamp() {\n return $this->next_max_timestamp;\n }", "public function getMaxDateProperty()\n {\n return Carbon::now()->subDay()->format('Y-m-d');\n }", "function liveviewquizmaxtime($quizcontextid) {\n global $DB;\n $quiztime = $DB->get_record_sql(\"\n SELECT max(qa.timemodified)\n FROM {question_attempts} qa\n JOIN {question_usages} qu ON qu.id = qa.questionusageid\n WHERE qu.contextid = ?\", array($quizcontextid));\n $arg = 'max(qa.timemodified)';\n $qmaxtime = intval($quiztime->$arg) + 1;\n return $qmaxtime;\n}", "public function getMax()\n {\n return $this->_maxValue;\n }", "public function setMaxTime($value)\n {\n return $this->set('MaxTime', $value);\n }", "public function max(): ?DateTime {\n\t\t$max = $this->attribute(\"max\");\n\n\t\tif(!is_string($max)) {\n\t\t\treturn null;\n\t\t}\n\n\t\ttry {\n\t\t\t$max = new DateTime($max);\n\t\t}\n\t\tcatch(Exception $e) {\n\t\t\tAppLog::error(\"invalid maximum time\", __FILE__, __LINE__, __FUNCTION__);\n\t\t\treturn null;\n\t\t}\n\n\t\treturn $max;\n\t}", "public function getMaxJitter()\n {\n if (array_key_exists(\"maxJitter\", $this->_propDict)) {\n if (is_a($this->_propDict[\"maxJitter\"], \"\\DateInterval\") || is_null($this->_propDict[\"maxJitter\"])) {\n return $this->_propDict[\"maxJitter\"];\n } else {\n $this->_propDict[\"maxJitter\"] = new \\DateInterval($this->_propDict[\"maxJitter\"]);\n return $this->_propDict[\"maxJitter\"];\n }\n }\n return null;\n }", "public function getMax()\n {\n return $this->_fMax;\n }", "public function testMaxFromTimestamp()\n {\n $locktime = new Locktime();\n\n // One under the maximum\n $allowed = Locktime::TIME_MAX;\n\n $nTime = $locktime->fromTimestamp($allowed);\n $this->assertEquals(Locktime::INT_MAX, $nTime);\n\n $disallowed = $allowed + 1;\n $locktime->fromTimestamp($disallowed);\n }", "public function setPropertyMaxTime(string $symbol, ?DateTime $time): Statistics {\n\t\t$this->addProperty($symbol);\n\t\t$this->properties[$symbol]['max_time'] = $time;\n\n\t\treturn $this;\n\t}", "public function getMaxValue()\n {\n return $this->get('MaxValue');\n }", "public function getLastMrtTime()\n {\n return $this->lastMrtTime;\n }", "public function testMaxToTimestamp()\n {\n $locktime = new Locktime();\n\n $allowed = Locktime::INT_MAX;\n $timestamp = $locktime->toTimestamp($allowed);\n $this->assertEquals(Locktime::TIME_MAX, $timestamp);\n\n $disallowed = $allowed + 1;\n $locktime->toTimestamp($disallowed);\n }", "public function getLastGetTime()\n {\n return $this->get(self::_LAST_GET_TIME);\n }", "public function getMax();", "public function getMaxProperties(): int\n {\n return $this->maxProperties;\n }", "public function getMaxValue();", "public function getMaxValue();", "public function max($value) {\n return $this->setProperty('max', $value);\n }", "public function max($value) {\n return $this->setProperty('max', $value);\n }", "public function max_prop($array, $prop)\n {\n $min = 0;\n $id_min = 0;\n\n foreach ($array as $key => $value) {\n $temp = $value->$prop;\n if ($temp >= $min) {\n $id_min = $key;\n $min = $temp;\n }\n }\n return $id_min;\n }", "public function getMaxTtl()\n {\n return isset($this->max_ttl) ? $this->max_ttl : 0;\n }", "public static function get_max_value() {\n return self::MAX_VALUE;\n }", "public function getBestTime() {\r\n\t\t$min = array();\r\n\t\tforeach ($this->races as $race) {\r\n\t\t\t$min[] = $race->getBestTime();\r\n\t\t}\r\n\t\treturn min($min);\r\n\t}", "public function getTimeLimit(): int;", "public function getTimeLimit(): int;", "public function setMaxRoundTripTime($val)\n {\n $this->_propDict[\"maxRoundTripTime\"] = $val;\n return $this;\n }", "public function getHasMaxValueOfOne()\n {\n return $this->hasMaxValueOfOne;\n }", "public function getTimeout()\n {\n return ($this->timeout / 1000000);\n }", "public function getTimeout()\n {\n return $this->get(self::_TIMEOUT);\n }", "public function getMaxTasksPerSecondUnwrapped()\n {\n return $this->readWrapperValue(\"max_tasks_per_second\");\n }", "#[Property('time')]\n\tprotected function getTime(): Time|string {\n\t\treturn new Time($this);\n\t}", "function getMaxValue() { return $this->readMaxValue(); }", "public function getTimeout()\n {\n return isset($this->timeout) ? $this->timeout : 0;\n }", "function getCreateTime(){\n\t\t$max = 0;\n\t\t$tables =& $this->tables();\n\t\tforeach ( array_keys($tables()) as $tablename ){\n\t\t\t$max = max($max, strtotime($tables[$tablename]->getCreateTime()) );\n\t\t}\n\t\treturn date('Y-m-d H:i:s', $max);\n\t}", "public static function max($attribute = null);", "function getMaxValue() { return $this->readMaxValue(); }", "public function max(): Option;", "public function getTimeout()\n\t{\n\t\treturn $this->timeout;\n\t}", "public function getTimeout() {\r\n\t\treturn $this->timeout;\r\n\t}", "public function getTimeout();", "public function getTimeout();", "public function getTimeout();", "public function getTimeout();", "public function getTimeout();", "public function getTimeout();", "public function getLastSetNameTime()\n {\n return $this->get(self::_LAST_SET_NAME_TIME);\n }", "public function getEndTime()\n {\n return $this->get(self::_END_TIME);\n }", "public function getAutomaticMaximum() {\r\n return $this->automaticMaximum;\r\n }", "public function getTimeout()\n {\n return self::$timeout;\n }", "function getNota_max()\n {\n if (!isset($this->inota_max) && !$this->bLoaded) {\n $this->DBCarregar();\n }\n return $this->inota_max;\n }", "function getNota_max()\n {\n if (!isset($this->inota_max) && !$this->bLoaded) {\n $this->DBCarregar();\n }\n return $this->inota_max;\n }", "public static function getMaxExecutionTime() {\n\t\t$maxExecutionTime = ini_get('max_execution_time');\n\n\t\t// Returns the default value, in case the ini_get fails.\n\t\tif ($maxExecutionTime === null || empty($maxExecutionTime) || $maxExecutionTime < 0) {\n\t\t\treturn 30;\n\t\t}\n\t\telse {\n\t\t\treturn intval($maxExecutionTime);\n\t\t}\n\t}", "public function getTimeout()\n {\n return $this->timeout;\n }", "public function getTimeout()\n {\n return $this->timeout;\n }", "public function getTimeout()\n {\n return $this->timeout;\n }", "public function getTimeout()\n {\n return $this->timeout;\n }", "public function getTimeout()\n {\n return $this->timeout;\n }", "public function getTimeout()\n {\n return ($this->container->getParameter('g4_timeout_reswebdefault'));\n }", "public function getTimeout()\n {\n return $this->timeout;\n }", "public function getTimeoutMinutes()\n {\n return $this->timeout_minutes;\n }", "public function getTimeout()\n {\n return $this->_timeout;\n }", "public function getTimeout()\n {\n return $this->_timeout;\n }", "public function getTimeout()\n {\n return $this->Timeout;\n }", "public function getTimeTo()\n {\n return $this->timeTo;\n }", "public function getEndTime() {\n return $this->get(self::ENDTIME);\n }", "function getUpdateTime(){\n\t\t$max = 0;\n\t\t$tables =& $this->tables();\n\t\tforeach ( array_keys($tables()) as $tablename ){\n\t\t\t$max = max($max, strtotime($tables[$tablename]->getUpdateTime()) );\n\t\t}\n\t\treturn date('Y-m-d H:i:s', $max);\n\t}", "protected function get_maximum_execution_time() {\n\t\t_deprecated_function( __METHOD__, '2.1.1', 'ActionScheduler_Abstract_QueueRunner::get_time_limit()' );\n\n\t\t$maximum_execution_time = 30;\n\n\t\t// Apply deprecated filter\n\t\tif ( has_filter( 'action_scheduler_maximum_execution_time' ) ) {\n\t\t\t_deprecated_function( 'action_scheduler_maximum_execution_time', '2.1.1', 'action_scheduler_queue_runner_time_limit' );\n\t\t\t$maximum_execution_time = apply_filters( 'action_scheduler_maximum_execution_time', $maximum_execution_time );\n\t\t}\n\n\t\treturn absint( $maximum_execution_time );\n\t}", "public static function getTimeout()\n {\n return static::$timeout;\n }", "public static function getMaxExecutionTime(): int\n {\n return static::getIniValue('max_execution_time');\n }", "public function usedVO2maxValue()\n {\n if (Configuration::VO2max()->useElevationCorrection()) {\n if ($this->Activity->vo2maxWithElevation() > 0) {\n return $this->Activity->vo2maxWithElevation();\n }\n }\n\n return $this->Activity->vo2maxByHeartRate();\n }", "public function getTimeout() {\r\n return $this->timeout;\r\n }", "public function getLastUpdatedTime() {\n // Fail due to double delete\n assert(!$this->hasBeenDeleted);\n \n // Fail due to unset 'last-updated-time' field\n assert(isset($this->parentDbFieldTable[self::LAST_UPDATED_TIME_KEY]));\n \n return $this->parentDbFieldTable[self::LAST_UPDATED_TIME_KEY]->getValue();\n }", "public function max(): int|float|null|object|bool|string\n {\n return max($this->internalMap);\n }", "public function getMax()\r\n {\r\n if (count($this->aNotes) === 0) {\r\n return 0;\r\n }\r\n $fMax = $this->aNotes[0];\r\n foreach ($this->aNotes as $fNote) {\r\n if ($fNote > $fMax) {\r\n $fMax = $fNote;\r\n }\r\n }\r\n return $fMax;\r\n }", "public function getTimeOut()\n {\n return self::$timeOut;\n }", "public function getMaxSpeed(){\n return $this->maxSpeed;\n }", "public function getTimeout() {\n return $this->_timeout;\n }", "public function getNext() {\n return $this->getNextMaxTimeStamp();\n }", "public function getTargetTime()\n {\n return $this->target_time;\n }", "public function getMaxWorkingTime(): float\n {\n return $this->usableTime * $this->capacity;\n }", "public function GetStartTime_Max()\n {\n // phpcs:enable PSR1.Methods.CamelCapsMethodName.NotCamelCaps\n return $this->_start_before;\n }", "public function getLatestDeliveryTime()\n {\n return $this->latestDeliveryTime;\n }", "public function getMaxRunTimeInMinutes(): ?int {\n $val = $this->getBackingStore()->get('maxRunTimeInMinutes');\n if (is_null($val) || is_int($val)) {\n return $val;\n }\n throw new \\UnexpectedValueException(\"Invalid type found in backing store for 'maxRunTimeInMinutes'\");\n }", "public function getEndTime();", "public function getEndTime();" ]
[ "0.6719056", "0.65334666", "0.64760554", "0.6248917", "0.61886054", "0.61757225", "0.61654747", "0.6156442", "0.61368614", "0.6128921", "0.6124396", "0.6109048", "0.61028385", "0.6096234", "0.6050496", "0.6007323", "0.6005803", "0.5990786", "0.59857553", "0.59708166", "0.5929108", "0.5911788", "0.5883206", "0.58695996", "0.58672756", "0.5861687", "0.5846761", "0.58380574", "0.58278304", "0.5821881", "0.58070743", "0.58070743", "0.5788813", "0.5788813", "0.57700855", "0.57675904", "0.5746248", "0.5688619", "0.56815946", "0.56815946", "0.56813586", "0.5681331", "0.5673123", "0.5672824", "0.56700885", "0.56590235", "0.5615601", "0.5612651", "0.5605332", "0.5588182", "0.55840605", "0.5580849", "0.5569247", "0.55609673", "0.5550407", "0.5550407", "0.5550407", "0.5550407", "0.5550407", "0.5550407", "0.55399966", "0.5535684", "0.5533199", "0.55217075", "0.5520727", "0.5520727", "0.55136526", "0.5509649", "0.5509649", "0.5509649", "0.5509649", "0.5509649", "0.5507466", "0.5495787", "0.5494355", "0.54893315", "0.54893315", "0.5484563", "0.5478213", "0.54729414", "0.5470099", "0.5470089", "0.5466839", "0.54659456", "0.5453268", "0.5447705", "0.5446806", "0.5444654", "0.54354316", "0.54342705", "0.5431139", "0.542997", "0.54231966", "0.54180056", "0.54177105", "0.5405983", "0.5404725", "0.54038775", "0.5394465", "0.5394465" ]
0.6830737
0
Get min time of a property
public function getPropertyMaxTimeFormatted(string $symbol): ?string { return $this->getPropertyMaxTime($symbol) ? $this->getPropertyMaxTime($symbol)->format('c') : null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getPropertyMinTime(string $symbol): ?DateTime {\n\t\treturn $this->properties[$symbol]['min_time'] ?? null;\n\t}", "public function GetStartTime_Min()\n {\n // phpcs:enable PSR1.Methods.CamelCapsMethodName.NotCamelCaps\n return $this->_start_after;\n }", "public function getMin() {\n return $this->min;\n }", "public function get_time_min() {\n return sprintf( '%02d', (int) edd_get_option( 'edd_commissions_payout_schedule_time_min', '' ) );\n }", "public function getMinTimeBetweenClaimsMs()\n {\n return $this->min_time_between_claims_ms;\n }", "public function getPropertyMinTimeFormatted(string $symbol): ?string {\n\t\treturn $this->getPropertyMinTime($symbol) ? $this->getPropertyMinTime($symbol)->format('c') : null;\n\t}", "function min() { return $this->min; }", "public function getMin();", "public function getMin()\n {\n return $this->_fMin;\n }", "function getMinute()\r\n {\r\n return $this->minuto;\r\n }", "function getMin() { return $this->readMinValue(); }", "public function getMin()\n {\n return $this->_minValue;\n }", "public function getStart()\n {\n return $this->start_time;\n }", "public function setPropertyMinTime(string $symbol, ?DateTime $time): Statistics {\n\t\t$this->addProperty($symbol);\n\t\t$this->properties[$symbol]['min_time'] = $time;\n\n\t\treturn $this;\n\t}", "public function setMinTime($value)\n {\n return $this->set('MinTime', $value);\n }", "function get_minute()\n {\n $datearray=getdate($this->timestamp);\n return $datearray[\"minutes\"];\n }", "public function getStartTime() {\n return $this->get(self::STARTTIME);\n }", "public function getStartTime()\n {\n return $this->get(self::_START_TIME);\n }", "public function getStartTime()\n {\n return $this->get(self::_START_TIME);\n }", "public function pretransfertime() {\n return $this->info['pretransfer_time'];\n }", "public function getTimeStart() {\n return $this->time_start;\n }", "public function getStartTime()\n {\n return $this->get(self::START_TIME);\n }", "public function getMinute()\n {\n return $this->minute;\n }", "public function min($value) {\n return $this->setProperty('min', $value);\n }", "public function min($value) {\n return $this->setProperty('min', $value);\n }", "public function starttime() {\n return $this->info['starttransfer_time'];\n }", "public function GetStartTime_Max()\n {\n // phpcs:enable PSR1.Methods.CamelCapsMethodName.NotCamelCaps\n return $this->_start_before;\n }", "public function getStartTime()\n {\n return $this->getData('start_time', 0);\n }", "public function getMinimum()\n {\n return $this->minimum;\n }", "public function GetDuration_Min()\n {\n // phpcs:enable PSR1.Methods.CamelCapsMethodName.NotCamelCaps\n return $this->_min_duration;\n }", "public function getStartTime()\n {\n return $this->start_time;\n }", "public function getStartTime()\n {\n return $this->start_time;\n }", "public function getStartTime()\n {\n return $this->start_time;\n }", "public function getStartTime()\n {\n return $this->start_time;\n }", "public function getStartTime()\n {\n return $this->start_time;\n }", "public function getStartTime()\n {\n return $this->start_time;\n }", "public function getStartTime()\n {\n return $this->start_time;\n }", "public function getStartTime()\n {\n return $this->start_time;\n }", "public function getStartTime()\n {\n return $this->start_time;\n }", "public function min(): ?DateTime {\n\t\t$min = $this->attribute(\"min\");\n\n\t\tif(!is_string($min)) {\n\t\t\treturn null;\n\t\t}\n\n\t\ttry {\n\t\t\t$min = new DateTime($min);\n\t\t}\n\t\tcatch(Exception $e) {\n\t\t\tAppLog::error(\"invalid minimum time\", __FILE__, __LINE__, __FUNCTION__);\n\t\t\treturn null;\n\t\t}\n\n\t\treturn $min;\n\t}", "public function getDateTimeObjectStart();", "public function getTime_start()\n {\n return $this->time_start;\n }", "function start_time($start_time=null)\n {\n if (isset($start_time)) $this->start_time = $start_time;\n return $this->start_time;\n }", "public function getMinimum() {\r\n return $this->minimumvalue;\r\n }", "public function getMinProperties(): int\n {\n return $this->minProperties;\n }", "private function min()\n {\n return Carbon::create(1, 1, 1, 0, 0, 0);\n }", "function get_event_start_time($post_id){\n\t\treturn get_post_meta($post_id, '_start_time', true);\t\t\n\t}", "public function getFromTime() {\n return $this->get(self::FROM_TIME);\n }", "public function getBeginTime()\n {\n return $this->get(self::_BEGIN_TIME);\n }", "public function getStartTime() {\r\n\t\treturn $this->startTime;\r\n\t}", "public function getStartTime()\n {\n return $this->start;\n }", "public function get_time() {\n return $this->_time;\n }", "public function getMin() {\n\t\t\treturn \"<p>Min: \".$this->min.\"</p>\";\n\t\t}", "public function getStartTime()\n {\n return $this->startTime;\n }", "public function getStartTime()\n {\n return $this->startTime;\n }", "public function getStartTime()\n {\n return $this->startTime;\n }", "public static function getStartTime(): float\n {\n return self::$startTimer;\n }", "public static function min($attribute = null);", "public static function get_min_value() {\n return self::MIN_VALUE;\n }", "public function timeLowLow();", "#[Property('time')]\n\tprotected function getTime(): Time|string {\n\t\treturn new Time($this);\n\t}", "public function get_score_min()\n\t{\n\t\treturn $this->score_min;\n\t}", "public static function get_default_min()\n\t{\n\t\treturn self::get_value('1970-W01');\n\t}", "public function getMinValue();", "public function getMinValue();", "function getStartTime($event) {\n $timer = Filter::get(Timer::timers(), $event);\n if (!empty($timer)) {\n return Filter::get($timer, 'start');\n }\n return null;\n }", "public static function getStartTime() : float\n {\n if (!isset(static::$startTime)) {\n static::$startTime = microtime(true);\n }//end if\n \n return static::$startTime;\n \n }", "public function getBestTime() {\r\n\t\t$min = array();\r\n\t\tforeach ($this->races as $race) {\r\n\t\t\t$min[] = $race->getBestTime();\r\n\t\t}\r\n\t\treturn min($min);\r\n\t}", "public function getMinValue()\n {\n return $this->get('MinValue');\n }", "public function getMin(): float;", "public function getLoadProcessStartTime()\n {\n global $timestart;\n if ( empty( $timestart ) )\n return '';\n\n return @gmdate( $this->getPluginTimeFormat(), $timestart );\n }", "public static function get_default_min()\n\t{\n\t\treturn self::get_value('1970-01');\n\t}", "public function getStartTime() {\n return $startTime;\n }", "public function getStartTime();", "public function getStartTime();", "public function getStartTime();", "public function getStartTime();", "public function getStartAtMin(): ?string\n {\n return $this->startAtMin;\n }", "function GetStartTimestamp () {\n return $this->hunt_start_timestamp;\n }", "public function getTskTimeStart()\n {\n return $this->tsk_time_start;\n }", "public function getMin()\r\n {\r\n if (count($this->aNotes) === 0) {\r\n return 0;\r\n }\r\n $fMin = $this->aNotes[0];\r\n foreach ($this->aNotes as $fNote) {\r\n if ($fNote < $fMin) {\r\n $fMin = $fNote;\r\n }\r\n }\r\n return $fMin;\r\n }", "function minute()\r\n {\r\n $value = $this->SecondsElapsed;\r\n\r\n $second = $value % 60;\r\n $value = ( $value - $second ) / 60;\r\n\r\n $minute = $value % 60;\r\n\r\n return $minute;\r\n }", "public function getStartTimestamp() {}", "public function getAutomaticMinimum() {\r\n return $this->automaticMinimum;\r\n }", "function __get( $property ) {\n\n // Standard Properties\n\t //\n\t if ( property_exists( $this , $property ) ) {\n\n\t if ( ( $property === 'next_event' ) && empty( $this->next_event) ) {\n\t $this->next_event = wp_next_scheduled( $this->slug );\n\t\t }\n\t\t return $this->$property;\n\n\t // On the fly formatting.\n\t\t//\n\t } else {\n\t switch ( $property ) {\n\t\t\t case 'next_event_text':\n\t\t\t return $this->format_time( $this->__get( 'next_event') );\n\t\t\t case 'next_event_time_to_text':\n\t\t\t\t return $this->time_to_next_event( $this->__get( 'next_event') );\n\t\t }\n\t }\n\n\t return null;\n }", "public function getMinute(): string\n {\n return $this->toLocalizedString('m');\n }", "public function startTime() {\n return intval($this['started']);\n }", "public function getStartTime() {\n\t\t$gentime = explode(' ',microtime());\n\t\t$gentime = $gentime[1] + $gentime[0];\n\t\treturn $gentime;\n\t}", "public function get_starttime()\n {\n }", "function getMinValue() { return $this->readMinValue(); }", "public function getTiming()\n {\n return $this->timing;\n }", "function getMinValue() { return $this->readMinValue(); }", "public function getTime()\n {\n return $this->get(self::TIME);\n }", "public function getStartDateTime()\n {\n if (array_key_exists(\"startDateTime\", $this->_propDict)) {\n if (is_a($this->_propDict[\"startDateTime\"], \"\\DateTime\") || is_null($this->_propDict[\"startDateTime\"])) {\n return $this->_propDict[\"startDateTime\"];\n } else {\n $this->_propDict[\"startDateTime\"] = new \\DateTime($this->_propDict[\"startDateTime\"]);\n return $this->_propDict[\"startDateTime\"];\n }\n }\n return null;\n }", "public function getMinNumber()\n {\n return $this->minNumber;\n }", "public static function getTimeFromStart()\n {\n return sprintf('%.0f', (microtime(true) - dm::getStartTime()) * 1000);\n }", "public function min(): Option;", "public function getTime()\n {\n return $this->get(self::_TIME);\n }", "public function getTime()\n {\n return $this->get(self::_TIME);\n }", "public function getTime()\n {\n return $this->get(self::_TIME);\n }", "function timecheck ($time) {\n $min = 0;\n if($time->h >= 1) {\n $min += 60*$time->h;\n }\n $min += $time->i;\n if($min == 0) {\n return \"Passage en cours...\";\n } else {\n return $min.\" min\";\n }\n \n\n}" ]
[ "0.69581014", "0.6548248", "0.6503345", "0.64378196", "0.6423479", "0.6419791", "0.63652563", "0.6330352", "0.62629944", "0.62625235", "0.619732", "0.6173724", "0.61076087", "0.6037332", "0.6036049", "0.60360193", "0.602544", "0.5999574", "0.5999574", "0.59944093", "0.59905094", "0.59782207", "0.59562904", "0.5951659", "0.5951659", "0.5951045", "0.5949871", "0.5944184", "0.59240186", "0.5902673", "0.58888113", "0.58888113", "0.58888113", "0.58888113", "0.58888113", "0.58888113", "0.58888113", "0.58888113", "0.58888113", "0.5854238", "0.5842864", "0.5825765", "0.5823873", "0.5814624", "0.58113366", "0.58023435", "0.57822824", "0.5781236", "0.57776797", "0.57769907", "0.5739511", "0.57266057", "0.5720476", "0.57034636", "0.57034636", "0.57034636", "0.5694081", "0.5664389", "0.56622696", "0.5656924", "0.5656261", "0.5654214", "0.56458426", "0.56453156", "0.56453156", "0.56356335", "0.56349987", "0.5622583", "0.56097513", "0.5607007", "0.5601725", "0.5589507", "0.55842465", "0.55661404", "0.55661404", "0.55661404", "0.55661404", "0.55566573", "0.5535704", "0.55295897", "0.55281645", "0.5509128", "0.55070794", "0.5499908", "0.54896545", "0.5484926", "0.5480763", "0.54775876", "0.54708004", "0.5457205", "0.54565656", "0.54523754", "0.54413015", "0.5440264", "0.54324704", "0.54322237", "0.54283166", "0.5381764", "0.53805226", "0.53805226", "0.53753215" ]
0.0
-1
Set max time of a property
public function setPropertyMaxTime(string $symbol, ?DateTime $time): Statistics { $this->addProperty($symbol); $this->properties[$symbol]['max_time'] = $time; return $this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function setMaxTime($value)\n {\n return $this->set('MaxTime', $value);\n }", "public function setMaxRoundTripTime($val)\n {\n $this->_propDict[\"maxRoundTripTime\"] = $val;\n return $this;\n }", "public function setMaxQueryTime($max)\n\t{\n\t\t$this->maxquerytime = $max;\n\t}", "public function setMax($max): bool {\n\t\tif($max instanceof DateTime) {\n\t\t\t$max = $max->format(self::OutputFormat);\n\t\t}\n\n\t\tif(is_string($max) || is_null($max)) {\n\t\t\t$this->setAttribute(\"max\", $max);\n\t\t\treturn true;\n\t\t}\n\n\t\tAppLog::error(\"invalid maximum time\", __FILE__, __LINE__, __FUNCTION__);\n\t\treturn false;\n\t}", "public function setMaxRunTimeInMinutes(?int $value): void {\n $this->getBackingStore()->set('maxRunTimeInMinutes', $value);\n }", "public function maxTime($maxTime)\n {\n $this->options['$maxTime'] = (integer) $maxTime;\n\n return $this;\n }", "public function testMaxToTimestamp()\n {\n $locktime = new Locktime();\n\n $allowed = Locktime::INT_MAX;\n $timestamp = $locktime->toTimestamp($allowed);\n $this->assertEquals(Locktime::TIME_MAX, $timestamp);\n\n $disallowed = $allowed + 1;\n $locktime->toTimestamp($disallowed);\n }", "public function max($value) {\n return $this->setProperty('max', $value);\n }", "public function max($value) {\n return $this->setProperty('max', $value);\n }", "public function setEndTime(?Time $value): void {\n $this->getBackingStore()->set('endTime', $value);\n }", "public function setMaximum($value) {\r\n $this->internalSetMaximum($value);\r\n }", "public function testMaxFromTimestamp()\n {\n $locktime = new Locktime();\n\n // One under the maximum\n $allowed = Locktime::TIME_MAX;\n\n $nTime = $locktime->fromTimestamp($allowed);\n $this->assertEquals(Locktime::INT_MAX, $nTime);\n\n $disallowed = $allowed + 1;\n $locktime->fromTimestamp($disallowed);\n }", "public function setMaximum(?Json $value): void {\n $this->getBackingStore()->set('maximum', $value);\n }", "public function getMaxDateProperty()\n {\n return Carbon::now()->timezone($this->timezome)->format('Y-m-d');\n }", "public function setTimeLimit(int $timeLimit): self;", "public function setMaxSpeed($val){\n $this->maxSpeed = $val;\n return $this;\n }", "public function setMaxValue($maxValue);", "public function setMaximumValue(int $maximumValue): void;", "function setNota_max($inota_max = '')\n {\n $this->inota_max = $inota_max;\n }", "function setNota_max($inota_max = '')\n {\n $this->inota_max = $inota_max;\n }", "public function setMax( int $max ): void {\n\t\t\t$this->maximum = $max;\n\t\t}", "public function setXAxisMaxToToday() {\n\t\t$this->Options['xaxis']['max'] = time().'000';\n\t}", "function setDuration( $value )\n {\n if ( $this->State_ == \"Dirty\" )\n $this->get( $this->ID );\n\n $this->Duration = $value;\n }", "public function setTime($time=0){\n\t\t\t$this->_time = $time;\n\t\t}", "public function getPropertyMaxTime(string $symbol): ?DateTime {\n\t\treturn $this->properties[$symbol]['max_time'] ?? null;\n\t}", "public function setAutomaticMaximum($value) {\r\n $this->automaticMaximum = $this->setAutoMinMax($this->automaticMaximum, $this->automaticMinimum,\r\n $value);\r\n }", "public function setTime($time);", "public function setTimeOverride( $time ) {\n\t\t$this->time = $time;\n\t}", "public function setSettingsSleepTimeoutInMinutes(?int $value): void {\n $this->getBackingStore()->set('settingsSleepTimeoutInMinutes', $value);\n }", "public function setMaxJitter($val)\n {\n $this->_propDict[\"maxJitter\"] = $val;\n return $this;\n }", "public function setSettingsScreenTimeoutInMinutes(?int $value): void {\n $this->getBackingStore()->set('settingsScreenTimeoutInMinutes', $value);\n }", "public function setMaxTasksPerSecondUnwrapped($var)\n {\n $this->writeWrapperValue(\"max_tasks_per_second\", $var);\n return $this;}", "public function setEndtime($endtime){\n $this->_endtime = $endtime;\n }", "public function setMaxValue($value)\n\t{\n\t\t$this->setViewState('MaxValue',$value,'');\n\t}", "public function set_timeout($timeout)\n {\n // Sanitize the timeout, and save to instance.\n \n $this->timeout = (int)$timeout;\n }", "public function setLastSetNameTime($value)\n {\n return $this->set(self::_LAST_SET_NAME_TIME, $value);\n }", "public function set($key, $value, $minutes = 30);", "public function setLastManualRefreshTime($value)\n {\n return $this->set(self::_LAST_MANUAL_REFRESH_TIME, $value);\n }", "function setMax($max) {\n $this->field['max'] = (int) $max;\n\n return $this;\n }", "function setWorkTime( $value )\n {\n if ( $this->State_ == \"Dirty\" )\n $this->get( $this->ID );\n\n $this->WorkTime = $value;\n }", "public function setMaxTtl($var)\n {\n GPBUtil::checkInt32($var);\n $this->max_ttl = $var;\n\n return $this;\n }", "function max() { return $this->max; }", "public function setMaxLength(int $max):void {\r\n\t\t$this->maxLength = $max;\r\n\t}", "public function SetDuration(\n $in_max_duration, ///< An epoch time, defining the maximum duration of a meeting.\n $in_min_duration = null ///< If defined, the minimum duration of the meeting.\n ) {\n // phpcs:enable PSR1.Methods.CamelCapsMethodName.NotCamelCaps\n $this->_max_duration = $in_max_duration;\n \n // We don't let this be less than, or equal to, the start time.\n if (((null != $in_max_duration) && (null != $in_min_duration)) && intval($in_min_duration) >= intval($in_max_duration)) {\n $in_min_duration = null;\n }\n\n $this->_min_duration = $in_min_duration;\n }", "public function setMaxSpeed(int $maxSpeed) : void\n {\n $this->maxSpeed = $maxSpeed;\n }", "function setLifeTime($time);", "public function setMaxProperties(int $maxProperties): self\n {\n $this->maxProperties = $maxProperties;\n return $this;\n }", "function setEndTime($event, $time) {\n Timer::timers($event, array(\n 'stop' => $time, \n 'stopped' => true\n ));\n }", "public function setSettingsSessionTimeoutInMinutes(?int $value): void {\n $this->getBackingStore()->set('settingsSessionTimeoutInMinutes', $value);\n }", "public function setTime($value)\n {\n if (!array_key_exists('time', $this->fieldsModified)) {\n $this->fieldsModified['time'] = $this->data['fields']['time'];\n } elseif ($value === $this->fieldsModified['time']) {\n unset($this->fieldsModified['time']);\n }\n\n $this->data['fields']['time'] = $value;\n }", "public function setMax($max) {\n\t\t$this->attributes['max'] = $max;\n\t\t$this->max = $max;\n\t\treturn $this;\n\t}", "public function setMax($value)\n {\n $this->_fields['Max']['FieldValue'] = $value;\n return $this;\n }", "public function setMax($max) {\n $this->max = $max;\n return $this;\n }", "public function setMax($max) {\n $this->max = $max;\n return $this;\n }", "public function setTimeOut($timeout){\n\t\t$this->_timeout = $timeout;\n\t\t$this->setMessage(\"Setting time out: \".$this->_timeout);\n\t}", "public function set($key, $value, $time = 300, array $options = array());", "function setRequestTimeout($value)\n {\n $this->_props['RequestTimeout'] = $value;\n }", "public function setLastGetTime($value)\n {\n return $this->set(self::_LAST_GET_TIME, $value);\n }", "public function getMaxExecutionTime()\n\t{\n\t\tif(!isset($this->_maxExecutionTime)){\n\t\t\t$this->_maxExecutionTime = $this->dontHardcodeService->searchDontHardcodeByParamNameAndFilterName(__CLASS__,'maxExecutionTime',true);\n\t\t}\n\n\t\tif(is_numeric($this->_maxExecutionTime) && $this->_maxExecutionTime > 44){\n\t\t\treturn $this->_maxExecutionTime;\n\t\t}\n\t\telse{\n\t\t\treturn 120;\n\t\t}\n\t}", "function setTimeOffset($value)\n {\n $this->_props['TimeOffset'] = $value;\n }", "public function view_time( $new_time ) {\n\t\t$this->timestamp = max( $this->timestamp, $new_time );\n\t}", "public function getTimeLimit(): int;", "public function getTimeLimit(): int;", "public function setMax($value)\n {\n $this->_maxValue = $value;\n return $this;\n }", "public function setEndTime($value)\n {\n return $this->set('EndTime', $value);\n }", "function tep_set_time_limit($limit) {\n if (!get_cfg_var('safe_mode')) {\n set_time_limit($limit);\n }\n }", "public function maxDateTime(/*TypeDateTime|string*/ $maxDateTime): self\n {\n $this->validatingChain[] = function () use ($maxDateTime) {\n if ($this->validatingValue > $this->createDateTime($maxDateTime)) {\n $this->defaultMessageSet(\n self::VALIDATION_DATETIME_MAX[1],\n self::VALIDATION_DATETIME_MAX[0],\n gettype($maxDateTime) === 'string' ? $maxDateTime : $maxDateTime->get()\n );\n $this->throwFail();\n }\n };\n\n return $this;\n }", "public function setEndTime($value) {\n return $this->set(self::ENDTIME, $value);\n }", "public function pcr_auth_timeout_extend($time) {\r\n\r\n $max_execution_time = ini_get('max_execution_time');\r\n\r\n if($max_execution_time < 60) {\r\n $time = $max_execution_time + 60;\r\n } else {\r\n $time = $max_execution_time;\r\n }\r\n \r\n return $time;\r\n }", "public function setLastBtTime($value)\n {\n return $this->set(self::_LAST_BT_TIME, $value);\n }", "public function _setMaxScore($maxScore) {\n\t\t$this->_maxScore = $maxScore;\n\t}", "public function maxAutoRetries($value) {\n return $this->setProperty('maxAutoRetries', $value);\n }", "public function setTimeBasedAttribute($val)\n {\n $this->_propDict[\"timeBasedAttribute\"] = $val;\n return $this;\n }", "public function setGroupMaxAge($value) {\n\t\t$this->_group_max_age = $value;\n\t}", "private function computeMaxEntryAttribute(): void\n {\n if ($this->content instanceof ContentSet) {\n $this->attributes['data-bb-maxentry'] = $this->content->getMaxEntry();\n }\n }", "public function getMaxDateProperty()\n {\n return Carbon::now()->subDay()->format('Y-m-d');\n }", "public function setTimeout($value)\n {\n return $this->set('Timeout', $value);\n }", "public function updateTime( Inx_Api_Recipient_Attribute $attr, $sValue );", "public function SetMaxCount ($maxCount);", "protected static function setSyncLastTime()\n {\n DB::update(\"UPDATE `sync_last_time` SET timestamp = ? WHERE id=?\", [time(), 1]);\n }", "public function setMax($max)\n {\n $this->max = $max;\n\n return $this;\n }", "public function getMaxProperties(): int\n {\n return $this->maxProperties;\n }", "final public function set_idle_time($time)\n {\n $this->_idle_time = $time;\n }", "function timeout() {\n $q = Doctrine_Query::create()\n ->update('Zim_Model_User u')\n ->set('u.timedout', '?', '1')\n ->where(\"u.updated_at <= ?\", date('Y-m-d H:i:s', time()- $this->getVar('timeout_period', 30)));\n $q->execute();\n return;\n }", "public function maxSize($value) {\n return $this->setProperty('maxSize', $value);\n }", "public function setEndTime($value)\n {\n return $this->set(self::_END_TIME, $value);\n }", "public function set_time($time) {\n if (!is_integer($time)) { return false; }\n $this->_time = $time;\n return true;\n }", "public function setLapTime($time)\n {\n\n }", "public function testMax()\n {\n $this->ascendingSequence->setMax(1);\n $max = $this->ascendingSequence->getMax();\n $this->assertEquals(1, $max);\n }", "public function addMaxSave( $value){\n return $this->_add(16, $value);\n }", "public function updatePeriodMaxCycles()\r\n {\r\n // edit period max cycles if It is greater than or equal 0 and is numeric\r\n // If period max cycles <= 0 or null, recurring profile will run forever\r\n if ($periodMaxCycles = $this->_recurringProfile->getPeriodMaxCycles()) {\r\n if ((string)(int) $periodMaxCycles === ltrim($periodMaxCycles, '0') && $periodMaxCycles > 0) {\r\n $periodMaxCycles = (int) $periodMaxCycles - 1;\r\n $this->_recurringProfile->setPeriodMaxCycles($periodMaxCycles);\r\n $this->_recurringProfile->save();\r\n }\r\n }\r\n }", "public static function setTimeRestriction($nbSeconds){\n Configuration::where('id', 1)\n ->update(['time_restriction' => $nbSeconds]);\n }", "public function set_timeout($timeout = 10)\n {\n }", "function olc_set_time_limit($limit) {\n\tif (!get_cfg_var('safe_mode')) {\n\t\t@set_time_limit($limit);\n\t}\n}", "public static function setNumberMaxBlocked($nb){\n Configuration::where('id', 1)\n ->update(['nb_max_times_bloked' => $nb]);\n }", "public function setMaxSize($max){\n $this->maxSize = $max;\n return $this;\n }", "public function withMax($value)\n {\n $this->setMax($value);\n return $this;\n }", "function getMax() { return $this->readMaxValue(); }", "public function getPropertyMaxTimeFormatted(string $symbol): ?string {\n\t\treturn $this->getPropertyMaxTime($symbol) ? $this->getPropertyMaxTime($symbol)->format('c') : null;\n\t}", "public function setTime($a = null)\n {\n throw new NotImplementedException(__METHOD__);\n }" ]
[ "0.68630344", "0.66501343", "0.63036287", "0.6175523", "0.6064643", "0.5977629", "0.5937467", "0.580612", "0.580612", "0.57984066", "0.5780331", "0.57704264", "0.5767807", "0.56272346", "0.5624809", "0.5624073", "0.56206024", "0.5609591", "0.55716217", "0.55716217", "0.55685794", "0.5565311", "0.5558858", "0.5524717", "0.5503795", "0.5491524", "0.5432663", "0.5428163", "0.53991103", "0.5398117", "0.53747696", "0.5322314", "0.53174263", "0.53094774", "0.5309253", "0.53002", "0.5298712", "0.52953815", "0.5293682", "0.52869076", "0.5278964", "0.5276855", "0.52693146", "0.5243085", "0.5240135", "0.522965", "0.52271146", "0.52144164", "0.5209979", "0.5206091", "0.51933306", "0.5186117", "0.51834446", "0.51834446", "0.5180654", "0.5174422", "0.5169784", "0.51412976", "0.51380116", "0.5119053", "0.51076514", "0.5095777", "0.5095777", "0.50898385", "0.50862235", "0.50794417", "0.50771385", "0.50765526", "0.5064598", "0.50603443", "0.50592923", "0.5057691", "0.5051794", "0.5051049", "0.5050332", "0.50382274", "0.50380933", "0.5036748", "0.50325435", "0.50214875", "0.5020694", "0.5017488", "0.50083965", "0.5004498", "0.5000137", "0.49972707", "0.49934483", "0.49743834", "0.4964009", "0.49631974", "0.4957291", "0.49527842", "0.49509025", "0.49492133", "0.49482998", "0.49477664", "0.49454924", "0.4943235", "0.4938569", "0.4927545" ]
0.65606993
2
Get input xml file
public function getInputXmlFile(): ?string { return $this->inputXmlFile; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function readInXML()\n {\n $xml = simplexml_load_file($this->url);\n return $xml;\n }", "public function getXmlFile()\n\t{\n\t\treturn $this->xml_file;\n\t}", "private function getXmlFile() {\n if (!$this->xmlFileCreated) {\n $this->createXmlDataFile();\n }\n return DOKU_INC . $this->command->getConf(\"processingXmlFile\");\n }", "public function getXml() {}", "protected function parseXmlFile() {}", "function _getFileXML($file) {\n\n if (empty($file))\n $this->fatalErrorPage(\"XML file to parse was not set\");\n\n if (!($fp = fopen($file, \"r\", 1))) {\n $this->fatalErrorPage(\"could not open XML input from file $file\");\n }\n \n $this->contentBuffer = NULL;\n while ($data = fread($fp, 4096)) {\n $this->contentBuffer .= $data;\n }\n\n fclose($fp);\n\n }", "function getActualFile(){\n\t\treturn $this->xmldir;\n\t}", "public function savetofile()\n\t\t{\n\t\t\treturn $this->xml->asXML($this->file);\n\t\t}", "public function getInputFile()\n {\n return $this->inputFile;\n }", "abstract public function getDataprotXML();", "public function getXml()\r\n\t{\r\n\t\treturn $this->xml->saveXML();\r\n\t}", "public function getXML()\n\t\t{\n\t\t\treturn $this->doc->saveXML();\n\t\t}", "function readXmlFile($xmlfile) {\n\tglobal $statistics;\n\n\t$xml = file_get_contents($xmlfile);\n\t$o = TypeConverter::xmlToArray($xml,TypeConverter::XML_GROUP);\n\tif ( ! $o ) return false;\n\n\t# Fix some errors in templates prior to continuing\n\n\t$o['Path'] = $xmlfile;\n\t$o['Author'] = getAuthor($o);\n\t$o['DockerHubName'] = strtolower($o['Name']);\n\t$o['Base'] = $o['BaseImage'];\n\t$o['SortAuthor'] = $o['Author'];\n\t$o['SortName'] = $o['Name'];\n\t$o['Forum'] = $Repo['forum'];\n# configure the config attributes to same format as appfeed\n# handle the case where there is only a single <Config> entry\n\n\tif ( $o['Config']['@attributes'] )\n\t\t$o['Config'] = array('@attributes'=>$o['Config']['@attributes'],'value'=>$o['Config']['value']);\n\n\tif ( $o['Plugin'] ) {\n\t\t$o['Author'] = $o['PluginAuthor'];\n\t\t$o['Repository'] = $o['PluginURL'];\n\t\t$o['SortAuthor'] = $o['Author'];\n\t\t$o['SortName'] = $o['Name'];\n\t\t$statistics['plugin']++;\n\t} else\n\t\t$statistics['docker']++;\n\n\treturn $o;\n}", "public function file() { return $this->input_file; }", "private static function _xml($input, $class = null, $type)\n\t{\n\t\t$errorSetting = libxml_use_internal_errors(true);\n\n\t\t$xml = $type == 'file' ? simplexml_load_file($input, $class) : simplexml_load_string($input, $class);\n\n\t\tlibxml_use_internal_errors($errorSetting);\n\n\t\tif ($xml === false)\n\t\t{\n\t\t\tforeach (libxml_get_errors() as $error)\n\t\t\t{\n\t\t\t\tShlSystem_Log::error('sh404sef', '%s::%s::%d: %s', __CLASS__, __METHOD__, __LINE__, $error);\n\t\t\t}\n\t\t}\n\t\treturn $xml;\n\t}", "public function getXML () {\n if ($this->xmldb->xml) {\n return $this->xmldb->xml->saveXML();\n }\n }", "public function SaveXMLFile();", "public static function getLocalXmlFile()\n {\n if (self::$_localXmlFile === null) {\n self::$_localXmlFile = self::getEtcDir() . DS . 'local.xml';\n }\n return self::$_localXmlFile;\n }", "public function getXML()\r\n\t{\r\n\t\treturn $this->xml;\r\n\t}", "public function on_cap_xsl_get_xmlfiles ()\n {\n return $this->xmlfiles;\n }", "function getXML() {\n return $this->xml;\n }", "function xmlLoader($file){\n\t\t$dom = new domDocument;\n\t\t$dom->loadXML(file_get_contents($file));\n\t\t\tif (!$dom) {\n\t\t\t echo 'Error while parsing the document';\n\t\t\t exit;\n\t\t\t }\n\t\t\n\t\t$s = simplexml_import_dom($dom);\n\t\treturn $s;\n\t\t\n\t\t}", "public function getXml()\n {\n return $this->gsgxml->output();\n }", "protected function get_xml_filename() {\n return null;\n }", "function get_xml($piecemakerId) \n\t{\n $this->check_dir();\n $file = $this->plugin_path.$this->books_dir.\"/\".$piecemakerId.\".xml\";\n\n\t\treturn $this->get_xml_php($file);\n\n\t}", "public function parseXML(Request $request) {\n $xmlSource = $request->file('xmlfile');\n // Store XML File in Storage Folder\n $xmlPath = $request->file('xmlfile')->store('xml', 'public');\n\n // Parsing XML File\n $xmlDocument = new \\DOMDocument('1.0', 'utf-8');\n $xmlDocument->load(storage_path('app/public/').$xmlPath);\n $xPath = new \\DOMXPath($xmlDocument);\n\n if ($xPath->query('/elements')->length > 0) {\n $rootElement = '/elements/unit';\n }else {\n $rootElement = '/unit';\n }\n\n // Generating HTML Template with XML file\n $htmlTemplate = self::getTemplate($xPath);\n\n // Saving HTML file for testing\n Storage::put('public/html/test.html', $htmlTemplate, 'public');\n\n // Deleting XML File after Parsing Completed\n Storage::delete('public/'.$xmlPath);\n\n // Testing\n self::generateIonicPreview($htmlTemplate);\n\n return view('developer.xml.validator', compact('rootElement', 'xPath', 'htmlTemplate'));\n }", "function fetchXML($url, $fileName){\n if(file_exists($fileName)){\n $xml = simplexml_load_file($fileName);\n } else {\n $xml = simplexml_load_file($url);\n }\n\t\treturn $xml;\n\t}", "public function getPriceXml() {\n\t\t//app/code/local is in the include path\n\t\t//file get contents does not use include path\n\t\tif (! file_exists(BP.'/app/code/local/Metrof/MadeToOrder/pricingsheets/samplexml.txt') ) {\n\t\t\treturn '';\n\t\t}\n\t\treturn @file_get_contents(BP.'/app/code/local/Metrof/MadeToOrder/pricingsheets/samplexml.txt');\n\t}", "function xml_form_by_file($xml_file) {\r\n\t\t$xml = new my_xml_parser ( $xml_file );\r\n\t\t$this->xml_form_by_obj ( $xml );\r\n\t\t\r\n//\t\tif($this->config_service['multilang']==\"1\"){\r\n//\t\t\t$xml_and = simplexml_load_file($xml_file) or die(\"feed not loading\");\r\n//\t\t\tforeach($xml_and->field as $key => $val){\r\n//\t\t\t\tforeach( $val->txt_value as $k => $v ){\r\n//\t\t\t\t\techo $k ;print_R($v); echo \"--<br>\";\r\n//\t\t\t\t\t\r\n//\t\t\t\t}\r\n//\t\t\t}\r\n//\t\t}\r\n\t}", "public function getXml() {\n \n return $this->xml;\n \n }", "function getData($data){\n// $myfile = fopen($data, \"r\") or die(\"Unable to open file!\");\n// $stream = fread($myfile,filesize(\"data.xml\"));\n// fclose($myfile);\n $stream = '\n<product><Type>finance-wow</Type><company>bank</company><name>ING</name><prod2 id=\"test\" color=\"red\"><Ty>finance</Ty><company>bank</company></prod2></product>\n ';\n// $stream = str_replace(array(\"\\r\", \"\\n\"), '', $stream);\n// $stream = trim(preg_replace('/\\s+/', '', $stream)); // all white spaces\n $stream = trim(preg_replace('/(\\>)\\s*(\\<)/m', '$1$2', $stream)); // white spaces in between tags\n\n// $stream = readfile('data.xml');\n// $xml = new SimpleXMLElement($stream);\n $xml = new SimpleXmlIterator($stream);\n return $xml;\n}", "public function getXml($mFile)\n\t{\t\t\n\t\tif (!preg_match(\"/<(.*?)>/i\", $mFile) && file_exists($mFile))\t\t\n\t\t{\n\t\t\treturn file_get_contents($mFile);\n\t\t}\n\t\t\n\t\treturn $mFile;\n\t}", "public function readXML ( ) {\n\n return $this->getStream()->asXML();\n }", "function fetchXMLObj($fname) {\n return simplexml_load_file($fname);\n}", "public function asXML();", "function xml_get($name,$num,$filename){\n $dom=new DOMDocument('1.0');\n $dom->load($filename);\n $records = $dom->getElementsByTagName($name);\n return $records->item($num)->nodeValue;\n}", "public function getRequestXML()\n\t{\n\t\treturn $this->request_xml;\n\t}", "public function getXml()\n\t{\n\t\treturn $this->buildXml();\n\t}", "public function upload_xml()\n {\n $this->upload_xml_file();\n }", "abstract public function parse($xmlFile);", "final function getDirectory () { return $this->xml_dir->path; }", "function getXML($stamp){\n $url = AGENTS_URL.$stamp;\n $xml = @simplexml_load_file($url);\n\n\n\tif(!$xml){\n logError ('No xml from server');\n exit;\n}\nif (count($xml->children()) == 0){\n logError ('Error parseFile: xml children');\n exit;\n}\n return $xml;\n}", "public function filePath()\n {\n return '/data/monster/monsters.xml';\n }", "private function getNikePlusFile($filePath) {\n\t\t$ch = curl_init();\n\t\tcurl_setopt($ch, CURLOPT_HEADER, 0);\n\t\tcurl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);\n\t\tcurl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);\n\t\tcurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n\t\tcurl_setopt($ch, CURLOPT_COOKIE, $this->cookie);\n\t\tcurl_setopt($ch, CURLOPT_URL, $filePath);\n\t\t$data = curl_exec($ch);\n\t\tcurl_close($ch);\n\t\tif($content = @simplexml_load_string($data)) {\n\t\t\treturn $content;\n\t\t} else {\n\t\t\tthrow new ErrorException('The XML feed could not be read.');\n\t\t}\n\t}", "function getXML() {\n $this->layout->addMenu(sprintf('<menu>%s</menu>'.LF, $this->menubar->getXML()));\n if (isset($this->params['cmd'])) {\n switch ($this->params['cmd']) {\n case 'edit_file':\n case 'file_tags':\n case 'file_versions':\n case 'file_derivations':\n case 'restore_version':\n case 'delete_version':\n case 'papaya_tag':\n $this->layout->addRight($this->getFilesToolbar());\n break;\n }\n }\n $this->addDialogXML();\n }", "private function _loadXmlFile($file) \r\n {\r\n if (!file_exists($file)) {\r\n throw new Exception(\"The file \" . $file . \" doesn't exists\");\r\n }\r\n $extension = substr($file, -4);\r\n if ($extension !== \".xml\") {\r\n throw new Exception(\"The file \" . $file . \" doesn't have the xml extension\");\r\n }\r\n \r\n $xml = simplexml_load_file($file);\r\n if ($xml === false) {\r\n throw new Exception(\"The file \" . $file . \" is not a valid xml file\");\r\n }\r\n \r\n return $xml;\r\n }", "public function createXML() {}", "private function xml()\n {\n $xml = Array2XML::createXML('rastreio', $this->data);\n return $xml->saveXML();\n }", "public static function readXmlFile($filePath)\n {\n $xMap = new \\DOMDocument();\n $xMap->load($filePath);\n return $xMap->documentElement;\n }", "public function getRequestXML()\n\t{\n\t\treturn $this->requestXML;\n\t}", "public function getXml()\n {\n return $this->_xml;\n }", "public static function fromXML($xml){\n //self::$strxml = file_get_contents($xml);\n // echo self::$xmldoc != null;\n\n $bool = self::$xmldata = self::$xmldoc->loadXML($xml);\n $newXML = self::$xmldoc->saveXML();\n // echo $newXML;\n }", "private function getPhpunitXml(): string\n {\n return (string) file_get_contents($this->resourcePath . DIRECTORY_SEPARATOR . 'Common' . DIRECTORY_SEPARATOR . 'phpunit.xml.stub');\n }", "function xml_import ($xml) {\r\n $xml = html_entity_decode($xml);\r\n\t\tif (!stristr($xml,'<?xml')) {\r\n\t\t\t\t$xml = '<?xml version=\"1.0\" encoding=\"ISO-8859-1\" ?>'.$xml;\r\n\t\t}\r\n $data = XML_unserialize($xml);\r\n\t\tif ($data === NULL) {\r\n\t\t\treturn 0;\r\n\t\t} else {\r\n\t\t return $data;\r\n\t\t}\r\n\t}", "private static function getXMLRoot()\n {\n if(empty(self::$xml)) {\n self::init();\n }\n return self::$xml;\n }", "public function get_xml()\n\t{\n\t\treturn @file_get_contents(\"http://whatpulse.org/api/user.php?UserID=\" . $this->user_id);\n\t}", "public function getFile() {\r\n return $this->node->getAttribute(\"file\");\r\n }", "public function getXmlResponse();", "function getUserList(){\r\n\treturn $ul = simplexml_load_file(\"data/userList.xml\");\r\n}", "protected function getData() {\n\n $path = $this->getPath();\n\n // Check if file exists.\n if(!file_exists($path)) {\n throw new ImporterException(t('XML file @path does not exist.', array('@path' => $path)));\n }\n\n // Let the XML parser use internal errors so we can collect them later if anything goes wrong.\n libxml_use_internal_errors(true);\n $xml = simplexml_load_file($path);\n if($xml === FALSE) {\n $error_message = \"Failed loading XML:\";\n foreach(libxml_get_errors() as $error) {\n $error_message.= PHP_EOL . $error->message;\n }\n throw new ImporterException($error_message);\n }\n\n // XML -> JSON -> ARRAY\n $json = json_encode($xml);\n $array = json_decode($json, TRUE);\n return $array;\n }", "private function open_xml()\n {\n $xmlw = new XMLWriter();\n $xmlw->openMemory();\n\n if (isset($this->request['fs_curl_debug']) && $this->request['fs_curl_debug'] > 0) {\n $indent = true;\n } else {\n $indent = false;\n }\n $xmlw->setIndent($indent);\n $xmlw->setIndentString(' ');\n\n $xmlw->startDocument('1.0', 'UTF-8', 'no');\n $xmlw->startElement('document');\n $xmlw->writeAttribute('type', 'freeswitch/xml');\n\n return $xmlw;\n }", "private function getExtensionConfigXml() \n\t{\n\n\t\t// path to the extensions config.xml\n\t\t$extension_config_xml_path = parent::$extension_base_dir . '/etc/config.xml';\n\n\t\tif (!file_exists($extension_config_xml_path)) {\n\t\t\t$this->displayError('Cant find path to extension config xml.');\n\t\t}\n\n\t\t$extension_config_xml = simplexml_load_file($extension_config_xml_path);\n\n\t\tparent::$extension_config_xml = $extension_config_xml;\n\n\t}", "function parseXML() {\r\n\t\t$xmlString = getFileStr();\r\n\r\n\t\tif (!strstr($xmlString, \"<?xml version='1.0' ?>\")) {\r\n\t\t\tparseBin();\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\t$xmlParser = xml_parser_create();\r\n\t\txml_parser_set_option($xmlParser, XML_OPTION_CASE_FOLDING, FALSE);\r\n\t\txml_set_element_handler($xmlParser, \"startElement\", \"endElement\");\r\n\r\n\t\txml_parse($xmlParser, $xmlString);\r\n\t\txml_parser_free($xmlParser);\r\n\r\n\t\txmlToObj();\r\n\t}", "public function load_xml_file(string $file ): self\n { \n $pathinfo = pathinfo($file);\n $this->filename = $pathinfo['basename']; \n $this->path = $pathinfo['dirname'];\n $xml = file_get_contents($file); \n $this->load_xml_string($xml); \n // print_r($this->bandelements);\n return $this;\n }", "public function sourceFile() {\n return $this->loader\n ? $this->loader->getResourceAsStream(strtr($this->name, '.', '/').'/package-info.xp')\n : NULL\n ;\n }", "function createFileInterface($filePath)\n{\n //$sxe=simplexml_load_file( $filePath );//Default file type\n if (file_exists($filePath)) \n {\n $xml = simplexml_load_file($filePath);\n createSaveForm($filePath);\n dispFile( $xml);\n }\n else \n {\n exit('Failed to open' . $filePath);\n }\n}", "function parse() {\n $this->xml_parser = xml_parser_create('UTF-8');\n xml_set_object($this->xml_parser,$this);\n\n ## convert all tags to upper\n xml_parser_set_option($this->xml_parser, XML_OPTION_CASE_FOLDING, true);\n \n xml_set_element_handler($this->xml_parser,'startElement', 'endElement');\n xml_set_character_data_handler($this->xml_parser,'characterData');\n \n if(!($fp = @fopen($this->xml_file,\"r\"))) {\n die(\"could not open XML input\".$this->xml_file);\n }\n \n ## read the whole file and scan in the information\n while($data = fread($fp, 4096)) {\n if(!xml_parse($this->xml_parser,$data, feof($fp))) {\n die(sprintf(\"XML error: %s at line %d\", xml_error_string(xml_get_error_code($this->xml_parser)), xml_get_current_line_number($this->xml_parser)));\n }\n }\n fclose($fp);\n $this->destroy();\n }", "public function saveFile() {\n return $this->xml->save($this->filename);\n }", "public function getValuesXml();", "public function save()\n {\n $source = $this->document->saveXml( $this->document );\n return $source;\n }", "function getSourceFile() ;", "public function xmlOutputToFile() {\n $array = array(\n 'id' => $this->musicRelease->id,\n 'trackCount' => $this->musicRelease->trackCount,\n 'title' => $this->musicRelease->title\n );\n \n return $array;\n }", "function parseXML() {\n \n $xml_parser = xml_parser_create($this->encoding);\n xml_parser_set_option($xml_parser, XML_OPTION_CASE_FOLDING, 1);\n\n xml_set_object($xml_parser, $this);\n xml_set_element_handler($xml_parser, 'startElement', 'endElement');\n xml_set_character_data_handler($xml_parser, 'cDataHandler');\n\n xml_set_external_entity_ref_handler($xml_parser, 'externalEntityRefHandler');\n xml_set_processing_instruction_handler($xml_parser, 'piHandler');\n xml_set_unparsed_entity_decl_handler($xml_parser, 'unparsedEntityDeclHandler');\n xml_set_notation_decl_handler($xml_parser, 'entityDeclHandler');\n xml_set_default_handler($xml_parser, 'defaultHandler');\n \n if (!xml_parse($xml_parser, $this->contentBuffer, true)) {\n ($this->currentFile != '') ? $inFile = \"in file $this->currentFile\" : $inFile = '';\n if ($GLOBALS['SM_develState']) {\n echo \"XML dump: \\n\".$this->contentBuffer;\n }\n $this->fatalErrorPage(sprintf(get_class($this).\": XML error: %s at line %d $inFile\",\n xml_error_string(xml_get_error_code($xml_parser)),\n xml_get_current_line_number($xml_parser)));\n }\n\n xml_parser_free($xml_parser);\n\n }", "protected function getGXMLImportStep2(){\n\t\t$parts = array();\n\t\t$hdns = \"\\n\";\n\t\t$v = we_base_request::_(we_base_request::STRING, 'v');\n\t\t$upload_error = false;\n\n\t\tif($v['rdofloc'] === 'lLocal'){\n\t\t\tif((!$v['import_from'] = $this->fileUploader->commitUploadedFile())){\n\t\t\t\t$upload_error = $this->fileUploader->getError();\n\t\t\t}\n\t\t}\n\n\t\t$vars = array('rdofloc', 'fserver', 'flocal', 'importDataType', 'docCategories', 'objCategories', 'store_to_id', 'is_dynamic', 'import_from', 'docType',\n\t\t\t'we_TemplateName', 'we_TemplateID', 'store_to_path', 'we_Extension', 'import_type', 'classID', 'sct_node', 'rcd', 'from_elem', 'to_elem', 'collision');\n\t\tforeach($vars as $var){\n\t\t\t$hdns.= we_html_element::htmlHidden('v[' . $var . ']', (isset($v[$var])) ? $v[$var] : '');\n\t\t}\n\t\t$hdns.= we_html_element::htmlHiddens(array(\n\t\t\t\t'v[mode]' => 0,\n\t\t\t\t'v[cid]', 'value' => -2));\n\n\t\tif((file_exists($_SERVER['DOCUMENT_ROOT'] . $v['import_from']) && is_readable($_SERVER['DOCUMENT_ROOT'] . $v['import_from']))){\n\t\t\t$xp = new we_xml_parser($_SERVER['DOCUMENT_ROOT'] . $v['import_from']);\n\t\t\t$xmlWellFormed = ($xp->parseError === '') ? true : false;\n\n\t\t\tif($xmlWellFormed){\n\t\t\t\t// Node-set with paths to the child nodes.\n\t\t\t\t$node_set = $xp->evaluate('*/child::*');\n\t\t\t\t$children = $xp->nodes[$xp->root]['children'];\n\n\t\t\t\t$recs = array();\n\t\t\t\tforeach($children as $key => $value){\n\t\t\t\t\t$flag = true;\n\t\t\t\t\tfor($k = 1; $k < ($value + 1); $k++){\n\t\t\t\t\t\tif(!$xp->hasChildNodes($xp->root . '/' . $key . '[' . $k . ']')){\n\t\t\t\t\t\t\t$flag = false;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif($flag){\n\t\t\t\t\t\t$recs[$key] = $value;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t$isSingleNode = (count($recs) == 1);\n\t\t\t\t$hasChildNode = (!empty($recs));\n\t\t\t}\n\t\t\tif($xmlWellFormed && $hasChildNode){\n\t\t\t\t$rcdSelect = new we_html_select(array(\n\t\t\t\t\t'name' => 'we_select',\n\t\t\t\t\t'class' => 'weSelect',\n\t\t\t\t\t(($isSingleNode) ? 'disabled' : 'style') => '',\n\t\t\t\t\t'onchange' => \"this.form.elements['v[to_iElem]'].value=this.options[this.selectedIndex].value; this.form.elements['v[from_iElem]'].value=1;this.form.elements['v[sct_node]'].value=this.options[this.selectedIndex].text;\" .\n\t\t\t\t\t\"if(this.options[this.selectedIndex].value==1) {this.form.elements['v[from_iElem]'].disabled=true;this.form.elements['v[to_iElem]'].disabled=true;} else {this.form.elements['v[from_iElem]'].disabled=false;this.form.elements['v[to_iElem]'].disabled=false;}\")\n\t\t\t\t);\n\t\t\t\t$optid = 0;\n\t\t\t\tforeach($recs as $value => $text){\n\t\t\t\t\tif($optid == 0){\n\t\t\t\t\t\t$firstOptVal = $text;\n\t\t\t\t\t}\n\t\t\t\t\t$rcdSelect->addOption($text, $value);\n\t\t\t\t\tif(isset($v['rcd'])){\n\t\t\t\t\t\tif($text == $v['rcd']){\n\t\t\t\t\t\t\t$rcdSelect->selectOption($value);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t$optid++;\n\t\t\t\t}\n\n\t\t\t\t$tblSelect = new we_html_table(array(), 1, 7);\n\t\t\t\t$tblSelect->setCol(0, 1, array(), $rcdSelect->getHtml());\n\t\t\t\t$tblSelect->setCol(0, 2, array('width' => 20));\n\t\t\t\t$tblSelect->setCol(0, 3, array('class' => 'defaultfont'), g_l('import', '[num_data_sets]'));\n\t\t\t\t$tblSelect->setCol(0, 4, array(), we_html_tools::htmlTextInput('v[from_iElem]', 4, 1, 5, 'align=right', 'text', 50, '', '', ($isSingleNode && ($firstOptVal == 1)) ? 1 : 0));\n\t\t\t\t$tblSelect->setCol(0, 5, array('class' => 'defaultfont'), g_l('import', '[to]'));\n\t\t\t\t$tblSelect->setCol(0, 6, array(), we_html_tools::htmlTextInput('v[to_iElem]', 4, $firstOptVal, 5, 'align=right', 'text', 50, '', '', ($isSingleNode && ($firstOptVal == 1)) ? 1 : 0));\n\n\t\t\t\t$tblFrame = new we_html_table(array(), 3, 2);\n\t\t\t\t$tblFrame->setCol(0, 0, array('colspan' => 2, 'class' => 'defaultfont'), ($isSingleNode) ? we_html_tools::htmlAlertAttentionBox(g_l('import', '[well_formed]') . ' ' . g_l('import', '[select_elements]'), we_html_tools::TYPE_INFO, 530) :\n\t\t\t\t\t\twe_html_tools::htmlAlertAttentionBox(g_l('import', '[xml_valid_1]') . ' ' . $optid . ' ' . g_l('import', '[xml_valid_m2]'), we_html_tools::TYPE_INFO, 530));\n\t\t\t\t$tblFrame->setCol(1, 0, array('colspan' => 2));\n\t\t\t\t$tblFrame->setCol(2, 1, array(), $tblSelect->getHtml());\n\n\t\t\t\t$parts[] = array('html' => $tblFrame->getHtml(), 'noline' => 1);\n\t\t\t} else {\n\t\t\t\t$parts[] = array('html' => we_html_tools::htmlAlertAttentionBox(g_l('import', (!$xmlWellFormed ? '[not_well_formed]' : '[missing_child_node]')), we_html_tools::TYPE_ALERT, 530), 'noline' => 1);\n\t\t\t}\n\t\t} else {\n\t\t\t$xmlWellFormed = $hasChildNode = false;\n\n\t\t\tif($upload_error){ // uploaded file nok: get error from uploader\n\t\t\t\t$parts[] = array('html' => we_html_tools::htmlAlertAttentionBox($upload_error, we_html_tools::TYPE_ALERT, 530), 'noline' => 1);\n\t\t\t} else { // file from server nok\n\t\t\t\tif(!file_exists($_SERVER['DOCUMENT_ROOT'] . $v['import_from'])){\n\t\t\t\t\t$parts[] = array('html' => we_html_tools::htmlAlertAttentionBox(g_l('import', '[file_exists]') . $_SERVER['DOCUMENT_ROOT'] . $v['import_from'], we_html_tools::TYPE_ALERT, 530), 'noline' => 1);\n\t\t\t\t} elseif(!is_readable($_SERVER['DOCUMENT_ROOT'] . $v['import_from'])){\n\t\t\t\t\t$parts[] = array('html' => we_html_tools::htmlAlertAttentionBox(g_l('import', '[file_readable]'), we_html_tools::TYPE_ALERT, 530), 'noline' => 1);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t$functions = \"\nfunction set_button_state() {\n\ttop.wizbusy.back_enabled=WE().layout.button.switch_button_state(top.wizbusy.document, 'back','enabled');\n\ttop.wizbusy.next_enabled=WE().layout.button.switch_button_state(top.wizbusy.document, 'next','\" . (($xmlWellFormed && $hasChildNode) ? \"enabled\" : \"disabled\") . \"');\n}\nfunction we_submit_form(f, target, url) {\n\tf.target = target;\n\tf.action = url;\n\tf.method = 'post';\n\tf.submit();\n}\nfunction handle_event(evt) {\n\tvar f = self.document.we_form;\n\tswitch(evt) {\n\tcase 'previous':\n\t\tf.step.value = 1;\n\t\twe_submit_form(f, 'wizbody', '\" . $this->path . \"');\n\t\tbreak;\n\tcase 'next':\n\t\tf.elements['v[from_elem]'].value = f.elements['v[from_iElem]'].value;\n\t\tf.elements['v[to_elem]'].value = f.elements['v[to_iElem]'].value;\n\t\tiStart = isNaN(parseInt(f.elements['v[from_iElem]'].value))? 0 : f.elements['v[from_iElem]'].value;\n\t\tiEnd = isNaN(parseInt(f.elements['v[to_iElem]'].value))? 0 : f.elements['v[to_iElem]'].value;\n\t\tiElements = parseInt(f.elements.we_select.options[f.elements.we_select.selectedIndex].value);\n\t\tif ((iStart < 1) || (iStart > iElements) || (iEnd < 1) || (iEnd > iElements)) {\n\t\t\tmsg = \\\"\" . g_l('import', '[num_elements]') . \"\\\" +iElements;\" .\n\t\t\twe_message_reporting::getShowMessageCall(\"msg\", we_message_reporting::WE_MESSAGE_ERROR, true) . \"\n\t\t} else {\n\t\t\tf.elements['v[rcd]'].value = f.we_select.options[f.we_select.selectedIndex].text;\n\t\t\tf.step.value = 3;\n\t\t\twe_submit_form(f, 'wizbody', '\" . $this->path . \"');\n\t\t}\n\t\tbreak;\n\tcase 'cancel':\n\t\ttop.close();\n\t\tbreak;\n\t}\n}\";\n\n\t\t$wepos = weGetCookieVariable('but_xml');\n\t\t$znr = -1;\n\n\t\t$content = $hdns .\n\t\t\twe_html_multiIconBox::getJS() .\n\t\t\twe_html_multiIconBox::getHTML('xml', $parts, 30, '', $znr, g_l('weClass', '[moreProps]'), g_l('weClass', '[lessProps]'), ($wepos === 'down'), g_l('import', '[select_data_set]'));\n\n\t\treturn array($functions, $content);\n\t}", "public function loadXml($filename,$map_path){\r\n \r\n $this->rootPath = $this->_preparePath($map_path);\r\n \r\n if(!File::exists( $this->rootPath .DS. $filename ))\r\n App::critical_error ('XML document not found: '.$this->rootPath .DS. $filename);\r\n \r\n $xmlDoc = $this->_initDocument($this->rootPath .DS. $filename);\r\n \r\n //get the project elements\r\n $elements = $xmlDoc->getElementsByTagName('element');\r\n \r\n foreach($elements as $element){\r\n \r\n if(count($this->elements) == 0 ){\r\n $this->elements = $this->_loadElement($element);\r\n }\r\n else{\r\n $this->elements = array_merge($this->elements,$this->_loadElement($element));\r\n }\r\n }\r\n \r\n //isolate the template key\r\n if(!is_null($this->_templatekey) && !is_null($this->elements[$this->_templatekey]))\r\n $this->elements['templates'] = $this->elements[$this->_templatekey];\r\n \r\n //clean the element values\r\n //array_walk_recursive($this->element, array($this, '_clean'));\r\n \r\n return File::put(APP_PROJECT .DS. 'elements.php' ,serialize($this->elements)); \r\n }", "public function GetXml()\n\t\t{\n\t\t\treturn urlencode($this->GetRawXml());\n\t\t}", "protected function _getXml()\n {\n if ($this->_xml) {\n return $this->_xml;\n }\n libxml_use_internal_errors();\n $data = simplexml_load_string($this->_getBody());\n if ($data) {\n $this->_xml = $data;\n\n return $this->_xml;\n }\n\n return null;\n }", "function getXMLdata($fileandpath, $filename){\n global $jlistConfig;\n jimport( 'joomla.filesystem.archive' );\n jimport('joomla.filesystem.folder');\n jimport('joomla.filesystem.file'); \n $files_list = array();\n $xml_files = array();\n $xmltags = array();\n $path_parts = pathinfo($fileandpath);\n $destination_dir = JPATH_ROOT.DS.$jlistConfig['files.uploaddir'].DS.'tempzipfiles'.DS.$path_parts['filename'];\n if ($ok = JFolder::create($destination_dir.DS)){\n if(JArchive::extract($fileandpath, $destination_dir.DS)){\n // get files list\n $xml_files = scan_dir($destination_dir.DS, $type=array('.xml','.XML'), $only=false, $allFiles=false, $recursive=TRUE, $onlyDir=\"\", $files_list);\n if ($xml_files){\n foreach($xml_files as $key => $array2) {\n $filepath[] = $xml_files[$key]['path'].DS.$xml_files[$key]['file'];\n }\n $xml_file = usort($filepath, \"cmp_str\"); \n foreach($filepath as $fpath){\n $xmltags = use_xml($fpath);\n // get xml file tags\n if ($xmltags[name] != ''){\n delete_dir_and_allfiles($destination_dir.DS);\n return $xmltags;\n break; \n } \n }\n } \n }\n // delete all unzipped files and folder\n delete_dir_and_allfiles($destination_dir.DS);\n } \n return false; \n}", "private function outputXml()\n {\n $stringXML = $this->dom->saveXML();\n\n $stringXML = str_replace('<?xml version=\"999\"?>', '', $stringXML);\n\n //dd(trim($stringXML));\n\n return trim($stringXML);\n }", "public function loadXML() : ?SimpleXMLElement\n {\n $path = resource_path('assets/database/ushospitals.xml');\n return file_exists($path) ? simplexml_load_file($path)->row[0] : null;\n }", "private function getExtensionSystemXml() \n\t{\n\n\t\t// path to the extensions config.xml\n\t\t$extension_system_xml_path = parent::$extension_base_dir . '/etc/system.xml';\n\n\t\tif (!file_exists($extension_system_xml_path)) {\n\t\t\t$this->displayError('Cant find path to extension system xml.');\n\t\t}\n\n\t\t$extension_system_xml = simplexml_load_file($extension_system_xml_path);\n\n\t\tparent::$extension_system_xml = $extension_system_xml;\n\n\t}", "static function load_xml($path,$file,$cdata=true) {\r\n\t\tif($cdata) {\r\n\t\t\tif(!$xml = simplexml_load_file(\"{$path}{$file}\")) {\r\n\t\t\t\tdie(\"Could not read {$file} file\");\r\n\t\t\t}\r\n\t\t}\r\n\t\telse {\r\n\t\t\tif(!$xml = simplexml_load_file(\"{$path}{$file}\", null, LIBXML_NOCDATA)) {\r\n\t\t\t\tdie(\"Could not read {$file} file\");\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\treturn $xml;\r\n\t}", "function mysql2xml() {\r\n\t $this->xml = new XMLFile();\r\n \r\n }", "protected function loadNlmxmlDom()\n {\n $this->nlmxmlDom = new DOMDocument;\n return $this->nlmxmlDom->loadXML(file_get_contents($this->inputFile));\n }", "private function readXmlFile(string $xmlFile): SimpleXMLElement {\n echo \"\\tPrüfe \" . basename($xmlFile) .\n ' (' . number_format(round(filesize($xmlFile) / 1024, 2), 2) . ' kbyte): ';\n\n // Öffne XML Datei zum Lesen\n $content = file_get_contents($xmlFile);\n if (!$content) {\n throw new RuntimeException(PHP_EOL . 'Fehler beim lesen der XML Datei ' . $xmlFile);\n }\n\n // XML Datei in Parser laden\n $xml = new SimpleXMLElement($content, LIBXML_NOERROR | LIBXML_NOWARNING | LIBXML_NONET);\n if (!$xml) {\n throw new RuntimeException('Fehler in parseWetterWarnung: Die XML Datei konnte nicht verarbeitet werden.');\n }\n\n return $xml;\n }", "public function loadXMLFile($filename,$map_path, $formatting = FALSE){\r\n \r\n $path = $this->_preparePath($map_path);\r\n $this->xmlfile = $this->_initDocument($path .DS. $filename, $formatting);\r\n \r\n $this->absolutepath = rtrim($path,'/') .DS. $filename;\r\n \r\n return $this->xmlfile;\r\n }", "private function getSetup()\r\n {\r\n $ch = curl_init();\r\n curl_setopt($ch, CURLOPT_URL, \"http://\".WEMO_IP.\":\".WEMO_PORT.\"/setup.xml\");\r\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\r\n $response = curl_exec($ch);\r\n curl_close($ch);\r\n return $this->parseXML($response);\r\n }", "function get_manejador_vista_xml()\n\t{\n\t\treturn $this->xml;\n\t}", "public function getInterpretationFile(Request $request)\n {\n\treturn $this->getFile($request, 'interpretation_file');\n }", "function get_nombre_archivo_xml()\n\t{\n\t\treturn $this->xml_proyecto;\n\t}", "function cc_import_xml_file($file){\n\t\n\t// apro file ed elaboro xml\t\n\t$xml = @simplexml_load_file($file);\t\n\n\tif($xml){\t\t\n\t\t// ok struttura xml valida, recupero tag root Offerte\n\t\t$offerte = $xml->Offerte;\n\n\t\tif($offerte){\t\n\t\t\t// tutto ok procedo con elavorazione\n\t\t\t\n\t\t\t$nofferte = count($offerte); // numeri di record all'interno del file\n\t\t\tcc_update_configs(\"source\", $nofferte); // aggiorno file di config con il numerod i record nel file xml\n\t\t\t\n\t\t\t/***\n\t\t\t * Elabora oggetto xml\n\t\t\t * Restituisce array con chiave Rif e valore \"updated\", \"inserted\" o false\n\t\t\t*/\n\t\t\treturn cc_elabora_file_xml($offerte); // restriuisci array a cc_controllo_nuovi_immobili()\t\t \n\t\t\t\n\t\t}else{\n\t\t\t\n\t\t\t// E' un file xml ma con struttura errata (manca tag apertura Offerte) - invio email di notifica \n\t\t\tcc_import_error(\"Nessuna offerta trovata nel file XML \".$file);\n\t\t\treturn false; // ritorno a cc_controllo_nuovi_immobili()\n\t\t\t\n\t\t}\n\t\t\n\t}else{\n\t\t\t\t\n\t\t// Non è un file xml valido - invio email di notifica \n\t\tcc_import_error($file.\" non è un file XML valido!\");\n\t\treturn false; // ritorno a cc_controllo_nuovi_immobili()\n\t\t\n\t} // end if xml\t\t\n\t\n}", "function get_taxon_file($meta_xml)\n{\n $xml = file_get_contents($meta_xml);\n /* e.g. meta.xml contents:\n <table encoding=\"UTF-8\" fieldsTerminatedBy=\"\\t\" linesTerminatedBy=\"\\n\" ignoreHeaderLines=\"1\" rowType=\"http://rs.tdwg.org/dwc/terms/Taxon\">\n <files>\n <location>taxon.tab</location>\n </files> \n */\n // $left = 'rowType=\"http://eol.org/schema/media/Document\"'; //just testing, should get e.g. \"media_resource.tab\"\n $left = 'rowType=\"http://rs.tdwg.org/dwc/terms/Taxon\"';\n if(preg_match(\"/\".preg_quote($left, '/').\"(.*?)<\\/files>/ims\", $xml, $arr)) {\n if(preg_match(\"/<location>(.*?)<\\/location>/ims\", $arr[1], $arr2)) return $arr2[1]; //e.g. \"taxon.tab\"\n }\n}", "private function loadModuleXml() \n\t{\n\n\t\t// load in config.xml to simplexml parser\n\t\tparent::$base_xml = simplexml_load_file(parent::$app_etc_module_path);\n\n\t}", "public function getFakeXMLSobek() {\n\n\t\t// Returns fake XML Sobek.\n\t\treturn new SimpleXMLElement(file_get_contents(__DIR__ . DIRECTORY_SEPARATOR . 'fake_sobek_return_xml.xml'));\n\t}", "public function getSource()\n\t{\n\t\treturn file_get_contents($this->file);\n\t}", "public function getDocument($filename = '')\r\n\t{\r\n\t try{\r\n\t\t//if file name not supplied set it to the last file that was created\r\n\t\t$filename = $filename == '' ? $this->tmp_file : $this->tmp_path . '\\\\' . $filename . '.tmp';\r\n\t\t\r\n\t\t//test to see if still exists\r\n\t\tif(! file_exists($filename))\r\n\t\t{\r\n\t\t\tthrow new FileNotFoundException($filename);\r\n\t\t}\r\n\t\t\r\n\t\t//get the xml from the file\r\n\t\t$xml = simplexml_load_file($filename .'.out') or die(\"Error: Cannot create object\");\r\n\t\t\r\n\t\t//create the StanfordNLPDocument\r\n\t\t$this->document = new Document($xml->document);\r\n\t\t\r\n\t\treturn $this->document;\r\n\t }\r\n\t catch(Exception $e)\r\n\t {\r\n\t\t$this->preview($e);\r\n\t }\r\n\t}", "function XML() {\n\t\t\treturn $this->__xml->asXML();\n\t\t}", "function _read ($action) {\n\t\t\n\t\t\t$path=Configure::read('upload_url').$action.'.xml';\n\t\n\t\t $xml = @simplexml_load_file($path);\n\t\t\tif(empty($xml)){\n\t\t\t\treturn 'empty';\n\t\t\t}\n\t\t $res\t=\t$this->_xml2array($xml);\n\t\t \n\n\t\t if($action=='res'){\n\t\t \t\t$record['id']\t\t = $res['children']['transaction']['attr']['id'];\n\t\t \t\t$record['response']\t = $res['children']['transaction']['attr']['response'];\n\t\t \t\t$record['status']\t = $res['children']['transaction']['attr']['status'];\n\t\t \t\treturn $record;\n\t\t }\n\t \t\telse \n\t \t\t\treturn $res['children']['transaction']['attr']['id'];\n\t}", "function get_contents(){\n return $this->input_content;\n }", "protected function get_task_xml($moodlefile) {\n $filename = pathinfo($moodlefile->get_filename(), PATHINFO_BASENAME);\n $extension = strtolower(pathinfo($filename, PATHINFO_EXTENSION));\n switch ($extension) {\n case 'xml': // XML file.\n return $moodlefile->get_content();\n case 'zip': // Zip file.\n return $this->get_task_xml_from_zip($moodlefile);\n default:\n // Unsupported file format.\n throw new invalid_task_exception(get_string('errinvalidtask', 'qtype_proforma'));\n }\n }" ]
[ "0.72593975", "0.7071744", "0.6914081", "0.6771578", "0.6484566", "0.6466941", "0.6452491", "0.62977874", "0.6228484", "0.6188495", "0.61320615", "0.6096169", "0.6076102", "0.60685736", "0.60544586", "0.6027082", "0.6003406", "0.5913254", "0.59066415", "0.5901989", "0.58950615", "0.58847374", "0.58832747", "0.58552617", "0.58343136", "0.5821995", "0.5815879", "0.5808214", "0.5796669", "0.5790092", "0.57824725", "0.5769969", "0.57698643", "0.5750256", "0.5736115", "0.5695549", "0.5683665", "0.5681221", "0.5656408", "0.56538665", "0.56405646", "0.56229955", "0.5601327", "0.5571177", "0.5550079", "0.553721", "0.5533499", "0.55287135", "0.5513466", "0.54993385", "0.54956037", "0.5487641", "0.5482449", "0.5481961", "0.5477793", "0.54683185", "0.5467435", "0.5406686", "0.5406154", "0.5398784", "0.5390608", "0.53842473", "0.5381118", "0.53805655", "0.537536", "0.53662765", "0.5341668", "0.5333383", "0.5328648", "0.53200966", "0.5314149", "0.5307758", "0.53046227", "0.5302955", "0.5287855", "0.5284926", "0.52834666", "0.52716404", "0.5269294", "0.52643365", "0.5257398", "0.52550125", "0.5254543", "0.5252858", "0.525048", "0.5237279", "0.5217506", "0.52142984", "0.52104986", "0.5203297", "0.5202601", "0.519331", "0.5186649", "0.518292", "0.51732165", "0.5171953", "0.5171796", "0.51713645", "0.5169622", "0.5167959" ]
0.69231516
2
Set input xml file
public function setInputXmlFile(?string $inputXmlFile): Statistics { $this->inputXmlFile = $inputXmlFile; return $this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function upload_xml()\n {\n $this->upload_xml_file();\n }", "public function setData($xml) {}", "protected function parseXmlFile() {}", "public function set_up()\n {\n $this->filePointer = fopen($this->filePointer, 'r');\n $this->xml = new XMLWriter();\n }", "function setXmlArray(){\n \n $xmlData = simplexml_load_file($this->urlXml);\n $this->xmlArray = (array)$xmlData;\n \n }", "function _getFileXML($file) {\n\n if (empty($file))\n $this->fatalErrorPage(\"XML file to parse was not set\");\n\n if (!($fp = fopen($file, \"r\", 1))) {\n $this->fatalErrorPage(\"could not open XML input from file $file\");\n }\n \n $this->contentBuffer = NULL;\n while ($data = fread($fp, 4096)) {\n $this->contentBuffer .= $data;\n }\n\n fclose($fp);\n\n }", "public function setXML(SimpleXMLElement $xml);", "public function setXML($xml)\r\n\t{\r\n\t\t$this->dom->loadXML($xml);\r\n\t}", "function xml_form_by_file($xml_file) {\r\n\t\t$xml = new my_xml_parser ( $xml_file );\r\n\t\t$this->xml_form_by_obj ( $xml );\r\n\t\t\r\n//\t\tif($this->config_service['multilang']==\"1\"){\r\n//\t\t\t$xml_and = simplexml_load_file($xml_file) or die(\"feed not loading\");\r\n//\t\t\tforeach($xml_and->field as $key => $val){\r\n//\t\t\t\tforeach( $val->txt_value as $k => $v ){\r\n//\t\t\t\t\techo $k ;print_R($v); echo \"--<br>\";\r\n//\t\t\t\t\t\r\n//\t\t\t\t}\r\n//\t\t\t}\r\n//\t\t}\r\n\t}", "public function SaveXMLFile();", "function ctlparser($wft_file) {\n\t\t\t## the xml-file musst be specified on constuction\n\t\t\t## used to include form different locations\n\t\t\t$this->xml_file = $wft_file;\n }", "protected function setUp() {\n $this->object = new XmlFile(__DIR__.'/rss-techcrunch.xml');\n }", "function XML(){\n\t\t\t\t$this->parser = &xml_parser_create();\n\t\t\t\txml_parser_set_option($this->parser, XML_OPTION_CASE_FOLDING, false);\n\t\t\t\txml_set_object($this->parser, $this);\n\t\t\t\txml_set_element_handler($this->parser, 'open','close');\n\t\t\t\txml_set_character_data_handler($this->parser, 'data');\n\t\t\t}", "public function setXml($_xml)\n {\n $this->_xml = $_xml;\n }", "public function savetofile()\n\t\t{\n\t\t\treturn $this->xml->asXML($this->file);\n\t\t}", "function saveToXML( $filename, $xml = null ){\n\t\tif( ! $xml ){\n\t\t\t$xml = $this->xml;\n\t\t}\n\t\t$xml->asXML( $filename );\n\t}", "function __construct(){\n\t\t//$this->_array = $this->_file->_array;\n $this->_file = new xml_filehandle(\"./include/Settings/\",\"settings.xml\");\n foreach($this->_file->_array as $arrVal)\n {\n $this->_array[$arrVal['id']] = $arrVal;\n }\n\t}", "public function setInputFile($inputFile)\n {\n if (!file_exists($inputFile)) {\n throw new \\Exception('NLM XML input file doesn\\'t exist');\n }\n\n $this->inputFile = $inputFile;\n }", "abstract public function setContentFromFile($file);", "function XMLsetContent($data) {\n $this->contentBuffer = $data;\n $this->currentFile = '';\n }", "public static function fromXML($xml){\n //self::$strxml = file_get_contents($xml);\n // echo self::$xmldoc != null;\n\n $bool = self::$xmldata = self::$xmldoc->loadXML($xml);\n $newXML = self::$xmldoc->saveXML();\n // echo $newXML;\n }", "function mysql2xml() {\r\n\t $this->xml = new XMLFile();\r\n \r\n }", "abstract public function parse($xmlFile);", "private function set_files()\n\t\t{\n\t\t\t$this->files = Filesystem::ls(PATH_POSTS, '*', 'xml', false, false, true);\n\t\t\t$this->files_count = count( $this->files );\n\t\t}", "function XMLFile($version = \"1.0\", $encoding = \"UTF-8\")\n \n {\n\t\t$this->version = $version;\n\t\t$this->encoding = $encoding;\t\n $this->init();\n }", "function domain_add_xmlfile($key,$file){\n if(is_object($this->tool)) $file = $this->tool->det_file($file,0,'abs');\n if(!file_exists($file) or !is_readable($file)) return 20;\n $xml = new opc_sxml($file);\n if(!is_null($xml->error_msg)) return 21;\n return $this->domain_add_xml($key,$xml);\n }", "public function setFile($file) {}", "private static function _xml($input, $class = null, $type)\n\t{\n\t\t$errorSetting = libxml_use_internal_errors(true);\n\n\t\t$xml = $type == 'file' ? simplexml_load_file($input, $class) : simplexml_load_string($input, $class);\n\n\t\tlibxml_use_internal_errors($errorSetting);\n\n\t\tif ($xml === false)\n\t\t{\n\t\t\tforeach (libxml_get_errors() as $error)\n\t\t\t{\n\t\t\t\tShlSystem_Log::error('sh404sef', '%s::%s::%d: %s', __CLASS__, __METHOD__, __LINE__, $error);\n\t\t\t}\n\t\t}\n\t\treturn $xml;\n\t}", "function readInXML()\n {\n $xml = simplexml_load_file($this->url);\n return $xml;\n }", "public function load_xml_file(string $file ): self\n { \n $pathinfo = pathinfo($file);\n $this->filename = $pathinfo['basename']; \n $this->path = $pathinfo['dirname'];\n $xml = file_get_contents($file); \n $this->load_xml_string($xml); \n // print_r($this->bandelements);\n return $this;\n }", "function __construct($xml_dir = '.') {\r\n\t\t\r\n\t\t$this->xml_dir = dir($xml_dir);\r\n\t}", "private function loadModuleXml() \n\t{\n\n\t\t// load in config.xml to simplexml parser\n\t\tparent::$base_xml = simplexml_load_file(parent::$app_etc_module_path);\n\n\t}", "function parse() {\n $this->xml_parser = xml_parser_create('UTF-8');\n xml_set_object($this->xml_parser,$this);\n\n ## convert all tags to upper\n xml_parser_set_option($this->xml_parser, XML_OPTION_CASE_FOLDING, true);\n \n xml_set_element_handler($this->xml_parser,'startElement', 'endElement');\n xml_set_character_data_handler($this->xml_parser,'characterData');\n \n if(!($fp = @fopen($this->xml_file,\"r\"))) {\n die(\"could not open XML input\".$this->xml_file);\n }\n \n ## read the whole file and scan in the information\n while($data = fread($fp, 4096)) {\n if(!xml_parse($this->xml_parser,$data, feof($fp))) {\n die(sprintf(\"XML error: %s at line %d\", xml_error_string(xml_get_error_code($this->xml_parser)), xml_get_current_line_number($this->xml_parser)));\n }\n }\n fclose($fp);\n $this->destroy();\n }", "function createFileInterface($filePath)\n{\n //$sxe=simplexml_load_file( $filePath );//Default file type\n if (file_exists($filePath)) \n {\n $xml = simplexml_load_file($filePath);\n createSaveForm($filePath);\n dispFile( $xml);\n }\n else \n {\n exit('Failed to open' . $filePath);\n }\n}", "private function create_xml_file(){\r\n global $CFG;\r\n \r\n $tmpfileid = time().rand(1,99999);\r\n $tmpfile = 'export_xml_'.$tmpfileid.'.pdf';\r\n $this->attachfile = $CFG->tempdir.'/'.$tmpfile;\r\n \r\n $dom = new DOMDocument('1.0', 'utf-8');\r\n $dom->preserveWhiteSpace = false;\r\n $dom->formatOutput = true;\r\n $dom->loadXML($this->xml_structure);\r\n $dom->save($this->attachfile);\r\n }", "public function loadXml($filename,$map_path){\r\n \r\n $this->rootPath = $this->_preparePath($map_path);\r\n \r\n if(!File::exists( $this->rootPath .DS. $filename ))\r\n App::critical_error ('XML document not found: '.$this->rootPath .DS. $filename);\r\n \r\n $xmlDoc = $this->_initDocument($this->rootPath .DS. $filename);\r\n \r\n //get the project elements\r\n $elements = $xmlDoc->getElementsByTagName('element');\r\n \r\n foreach($elements as $element){\r\n \r\n if(count($this->elements) == 0 ){\r\n $this->elements = $this->_loadElement($element);\r\n }\r\n else{\r\n $this->elements = array_merge($this->elements,$this->_loadElement($element));\r\n }\r\n }\r\n \r\n //isolate the template key\r\n if(!is_null($this->_templatekey) && !is_null($this->elements[$this->_templatekey]))\r\n $this->elements['templates'] = $this->elements[$this->_templatekey];\r\n \r\n //clean the element values\r\n //array_walk_recursive($this->element, array($this, '_clean'));\r\n \r\n return File::put(APP_PROJECT .DS. 'elements.php' ,serialize($this->elements)); \r\n }", "private function setXmlContentType()\n {\n Http::setContentType(self::XML_CONTENT_TYPE);\n }", "public function toXML($file) /* TODO throws FileNotFoundException*/ {\r\n $this->toXML($file->getPath());\r\n }", "public function createXML() {}", "public function getInputXmlFile(): ?string {\n\t\treturn $this->inputXmlFile;\n\t}", "function __construct($filename,$ascArray,$parentName){\n try{\n $this->xml = new DOMDocument();\n $this->filename = $filename;\n $this->append($ascArray,$parentName);\n } catch (Exception $ex) {\n die(\"Failed to append the XML: \".$ex);\n }\n \n }", "function procMenuAdminMakeXmlFile()\n\t{\n\t\t// Check input value\n\t\t$menu_srl = Context::get('menu_srl');\n\t\t// Get information of the menu\n\t\t$oMenuAdminModel = getAdminModel('menu');\n\t\t$menu_info = $oMenuAdminModel->getMenu($menu_srl);\n\t\t$menu_title = $menu_info->title;\n\t\t// Re-generate the xml file\n\t\t$xml_file = $this->makeXmlFile($menu_srl);\n\t\t// Set return value\n\t\t$this->add('menu_title',$menu_title);\n\t\t$this->add('xml_file',$xml_file);\n\t}", "public function setInput($file)\r\n\t{\r\n\t\tif(!file_exists($file)) {\r\n\t\t\tthrow new InvalidArgumentException('File not found.');\r\n\t\t}\r\n\t\t$this->input = $file;\r\n\t\treturn $this->begin();\r\n\t}", "public function parseXML(Request $request) {\n $xmlSource = $request->file('xmlfile');\n // Store XML File in Storage Folder\n $xmlPath = $request->file('xmlfile')->store('xml', 'public');\n\n // Parsing XML File\n $xmlDocument = new \\DOMDocument('1.0', 'utf-8');\n $xmlDocument->load(storage_path('app/public/').$xmlPath);\n $xPath = new \\DOMXPath($xmlDocument);\n\n if ($xPath->query('/elements')->length > 0) {\n $rootElement = '/elements/unit';\n }else {\n $rootElement = '/unit';\n }\n\n // Generating HTML Template with XML file\n $htmlTemplate = self::getTemplate($xPath);\n\n // Saving HTML file for testing\n Storage::put('public/html/test.html', $htmlTemplate, 'public');\n\n // Deleting XML File after Parsing Completed\n Storage::delete('public/'.$xmlPath);\n\n // Testing\n self::generateIonicPreview($htmlTemplate);\n\n return view('developer.xml.validator', compact('rootElement', 'xPath', 'htmlTemplate'));\n }", "public function loadxml ($file) {\n $this->xml = new domDocument();\n $rval = $this->xml->load($file);\n if (!($rval)) {\n print \"Error! could not load XML file $file.<br>\";\n }\n }", "protected function _loadXML()\n {\n $fileContents = file_get_contents($this->_wsdlPath);\n $fileContents = str_replace('xs:', '', $fileContents);\n $this->_xml = new \\SimpleXMLElement($fileContents);\n }", "public function _xml_fields()\n {\n require_code('files');\n $full_path = get_custom_file_base() . '/data_custom/xml_config/fields.xml';\n $xml = post_param_string('xml');\n cms_file_put_contents_safe($full_path, $xml, FILE_WRITE_FIX_PERMISSIONS | FILE_WRITE_SYNC_FILE);\n\n log_it('FIELD_FILTERS');\n\n return inform_screen($this->title, do_lang_tempcode('SUCCESS'));\n }", "public function prepareFilePath()\n {\n $this->_filePath = $this->_config[\"module_path\"] . '/' . $this->_pathRelativeToModule . '/webapi.xml';\n return $this;\n }", "function parseXML() {\n \n $xml_parser = xml_parser_create($this->encoding);\n xml_parser_set_option($xml_parser, XML_OPTION_CASE_FOLDING, 1);\n\n xml_set_object($xml_parser, $this);\n xml_set_element_handler($xml_parser, 'startElement', 'endElement');\n xml_set_character_data_handler($xml_parser, 'cDataHandler');\n\n xml_set_external_entity_ref_handler($xml_parser, 'externalEntityRefHandler');\n xml_set_processing_instruction_handler($xml_parser, 'piHandler');\n xml_set_unparsed_entity_decl_handler($xml_parser, 'unparsedEntityDeclHandler');\n xml_set_notation_decl_handler($xml_parser, 'entityDeclHandler');\n xml_set_default_handler($xml_parser, 'defaultHandler');\n \n if (!xml_parse($xml_parser, $this->contentBuffer, true)) {\n ($this->currentFile != '') ? $inFile = \"in file $this->currentFile\" : $inFile = '';\n if ($GLOBALS['SM_develState']) {\n echo \"XML dump: \\n\".$this->contentBuffer;\n }\n $this->fatalErrorPage(sprintf(get_class($this).\": XML error: %s at line %d $inFile\",\n xml_error_string(xml_get_error_code($xml_parser)),\n xml_get_current_line_number($xml_parser)));\n }\n\n xml_parser_free($xml_parser);\n\n }", "public static function setFile($file) {}", "function Save($xml_root, $file_path) \n\t{\n\t\t$this->__xml = fopen($file_path, \"w\");\n\t\tfwrite($this->__xml, \"<?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\" standalone=\\\"yes\\\"?>\\r\\n\");\n\t\t$this->__SaveChild($xml_root, 0);\n\t\tfclose($this->__xml);\n\t}", "public function save(){ \r\n return $this->xmlfile->save($this->absolutepath);\r\n }", "function cc_import_xml_file($file){\n\t\n\t// apro file ed elaboro xml\t\n\t$xml = @simplexml_load_file($file);\t\n\n\tif($xml){\t\t\n\t\t// ok struttura xml valida, recupero tag root Offerte\n\t\t$offerte = $xml->Offerte;\n\n\t\tif($offerte){\t\n\t\t\t// tutto ok procedo con elavorazione\n\t\t\t\n\t\t\t$nofferte = count($offerte); // numeri di record all'interno del file\n\t\t\tcc_update_configs(\"source\", $nofferte); // aggiorno file di config con il numerod i record nel file xml\n\t\t\t\n\t\t\t/***\n\t\t\t * Elabora oggetto xml\n\t\t\t * Restituisce array con chiave Rif e valore \"updated\", \"inserted\" o false\n\t\t\t*/\n\t\t\treturn cc_elabora_file_xml($offerte); // restriuisci array a cc_controllo_nuovi_immobili()\t\t \n\t\t\t\n\t\t}else{\n\t\t\t\n\t\t\t// E' un file xml ma con struttura errata (manca tag apertura Offerte) - invio email di notifica \n\t\t\tcc_import_error(\"Nessuna offerta trovata nel file XML \".$file);\n\t\t\treturn false; // ritorno a cc_controllo_nuovi_immobili()\n\t\t\t\n\t\t}\n\t\t\n\t}else{\n\t\t\t\t\n\t\t// Non è un file xml valido - invio email di notifica \n\t\tcc_import_error($file.\" non è un file XML valido!\");\n\t\treturn false; // ritorno a cc_controllo_nuovi_immobili()\n\t\t\n\t} // end if xml\t\t\n\t\n}", "public function storeXML()\n {\n $service = new ExpressionService();\n\n foreach ($service->processFile($_FILES[\"expressions_xml\"]) as $expression) {\n $service->addToDatabase('expressions', $expression);\n }\n\n return redirect('api/expressions');\n }", "public function getXmlFile()\n\t{\n\t\treturn $this->xml_file;\n\t}", "function __construct ($filename){\n try{\n $this->filename = $filename;\n $xml = simplexml_load_file($filename);\n $this -> keys = get_object_vars($xml); \n } catch (Exception $ex) {\n die(\"invalid XML: \". $ex);\n }\n \n }", "private function fileContent($path)\n\t{\n\t\tif ( !file_exists($path))\n\t\t{\n\t\t\tUtils_Configuration_XMLLoaderOpenFileException(\n\t\t\t\t'Nie ma pliku ' . $path);\n\t\t}\n\n\t\t$this->sXML = file_get_contents($path);\n\n\t\tif (false === $this->sXML)\n\t\t{\n\t\t\tUtils_Configuration_XMLLoaderOpenFileException(\n\t\t\t\t'Nie udalo sie odczytac zawartosci pliku ' . $path);\n\t\t}\n\t}", "public function store(uploadXmlRequest $request)\n {\n if (Input::hasFile('attachment'))\n {\n $destination = storage_path($this->uploadDestination);\n $file_name = time() . '.xml';\n $request->file('attachment')->move($destination, $file_name);\n\n //insert uploaded file name in my_files table\n $my_file = new Myfile();\n $my_file->name = $file_name;\n $my_file->save();\n\n //parse xml\n try {\n $xml = simplexml_load_file($destination.'/'.$file_name);\n\n foreach ($xml->employee as $row)\n {\n //insert parsed xml in to my_rows table\n $my_file->rows()->create([\n 'name' => $row->name,\n 'job' => $row->job,\n ]);\n }\n\n } catch (\\Exception $e)\n {\n\n Myfile::find($my_file->id)->delete();\n return redirect()->back()->with('error', 'corrupted file,please select xml file ');\n }\n\n //redirect back with success message\n return redirect()->back()->with('message', 'file uploded Successfully');\n\n }\n }", "public function set_extrainfo($xmlIn){\n // if($query->num_rows() == 0){\n // //should not reach here, if it does we fucked up\n // return null;\n // }\n $data = array(\n 'extrainfo' => $xmlIn\n );\n $where = array('username'=>$this->tank_auth->get_username());\n $this->db->update('userinfo', $data, $where);\n }", "function __construct($xmlFilePath) \n {\n $this->simplexmlObject = simplexml_load_file($xmlFilePath);\n $this->host = $this->parseXmlElement(\"//host\");\n $this->user = $this->parseXmlElement(\"//user\");\n $this->password = $this->parseXmlElement(\"//password\");\n $this->dbname = $this->parseXmlElement(\"//dbname\");\n $this->socket = $this->parseXmlElement(\"//unix_socket\");\n $this->charset = $this->parseXmlElement(\"//charset\");\n }", "final function connect($file_name, $preserve_white_space = false, $format_output = false) { \r\n\t\t\r\n\t\tif (!stristr($file_name, '.xml')) {\r\n\t\t\t$file_name .= '.xml';\r\n\t\t}\r\n\t\t\r\n\t\t$this->parser = new DOMDocument();\r\n\t\t$this->parser->preserveWhiteSpace = $preserve_white_space;\r\n\t\t$this->parser->formatOutput = $format_output;\r\n\t\t\r\n\t\t$this->file_name = $file_name;\r\n\t\t$this->xml_query = null;\r\n\t\t\r\n\t\tif ($this->parser->load($this->xml_dir->path . DIRECTORY_SEPARATOR . $file_name)) {\r\n\t\t\t$this->root = $this->parser->childNodes->item(0);\r\n\t\t\t\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\t\r\n\t\treturn false;\r\n\t}", "public function setFile($file){\n $this->file = $file;\n }", "static function uploadingXml(){\n echo '<body style=\\'background-color:#3b5998;\\'></body>';\n\n session_start();\n $username = $_SESSION['username'];\n $targetLocation = DeckModel::deckFolder() . $username . '/';\n\n $target_path = $targetLocation . basename( $_FILES['xml-file']['name']);\n\n if(move_uploaded_file($_FILES['xml-file']['tmp_name'], $target_path)) {\n //echo \"The file \". basename( $_FILES['xml-file']['name']).\n // \" has been uploaded.\";\n } else {\n echo \"There was an error uploading the file!\";\n }\n echo \"<script>window.location='../user-controller/show-decks';</script>\";\n\n\n }", "public function set($xPathKey, $value, $file) {\n\n\t\t$settings = new Modules_XML();\n\n\t\t$configFile = $this->app->getPath('/Extensions/' . $file);\n\t\t$settings->load($configFile);\n\n\t\t$nodes = $settings->XPath()->query($xPathKey);\n\n\t\tif($nodes->length == 1) {\n\t\t\t$nodes->item(0)->nodeValue = $value;\n\t\t\t$settings->save($settingsFile);\n\t\t}\n\n\t}", "private function setRequestXML($cmd=\"\")\n\t\t{\n\t\t\t$xml_file = \"\";\n\t\t\t\tswitch($cmd){\n\t\t\t\t\tcase 'SingleCarRateShop':\n\t\t\t\t\tcase 'RateShop':\n\t\t\t\t\t\t$xml_file = dirname(__FILE__).\"/xml/\".$this->car_company.\"/single_car_rate_shop.xml\";\n\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'Booking':\n\t\t\t\t\t\t$xml_file = dirname(__FILE__).\"/xml/\".$this->car_company.\"/booking.xml\";\n\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'RetrieveReservation':\n\t\t\t\t\t\t$xml_file = dirname(__FILE__).\"/xml/\".$this->car_company.\"/retrieve_reservation.xml\";\n\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'CANCEL':\n\t\t\t\t\t\t$xml_file = dirname(__FILE__).\"/xml/\".$this->car_company.\"/cancel_booking.xml\";\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\n\t\t\tif($xml_file!=\"\")\n\t\t\t{\n\t\t\t\t$x = file_get_contents($xml_file);\n $this->vars['LOYALTYSET']=\"\";\n $this->vars['LOYALTY']=\"\";\n\t\t\t\tif($this->vars['LOYALTY'] != \"\") {\n $this->vars['LOYALTYSET'] = '<CustLoyalty ProgramID=\"ZT\" MembershipID=\"'.$this->vars['LOYALTY'].'\" TravelSector=\"2\" />';\n\t\t\t\t }\n\t\t\t\tforeach($this->vars as $key=>$val){\n\t\t\t\t\t$k = trim($key);\n\t\t\t\t\t//@todo:fix for vehicle_pref for thirfity;\n\t\t\t\t\t//$v = $this->escapeXML(trim($val));\n\t\t\t\t\t$v = $val;\n\t\t\t\t\t$x = str_replace(\"{\".$k.\"}\",$v,$x);\n\t\t\t\t}\n\n\t\t\t\t$xml = simplexml_load_string($x);\n\t\t\t\treturn str_replace(array(\"\\n\",\"\\r\",\"\\t\"),array(\"\",\"\",\"\"),$xml->asXML());\n\t\t\t}\n\t\t}", "protected function connectInput()\n {\n $this->input_handle = fopen($this->input_filepath, 'r');\n }", "function setBufferFile()\r\n\t {\r\n\t \t//$this->_bufferFile = '/tmp/fabrik_package-' . $this->label . '.xml';\r\n\t\t$this->_bufferFile = JPATH_SITE . \"/administrator/components/com_fabrik/fabrik_package-\". $this->label . '.xml';\r\n\t }", "public function init_from_xml($xml, $from = Bean::SOURCE_STRING)\n {\n if($from == Bean::SOURCE_URL || $from == Bean::SOURCE_FILE)\n {\n $xdom = @simplexml_load_file($xml);\n }\n if($from == Bean::SOURCE_STRING)\n {\n $xdom = @simplexml_load_string($xml);\n }\n\n foreach($xdom as $key => $val)\n {\n $this->set($key,$val); \n } \n }", "public function setXml($domDocumentOrXml) {}", "private function setContent()\n {\n $this->setTag();\n $this->openRoot();\n $this->setParam(ModulesInterface::KEY_NAME, ApiInterface::RAML_TYPE_STRING, ucfirst($this->generator->version));\n $this->setParam(ConfigInterface::ATTRIBUTES_CASE, ApiInterface::RAML_TYPE_STRING, ConfigInterface::DEFAULT_CASE);\n $this->setQueryParams();\n $this->setTrees();\n $this->setJwtContent();\n $this->setConfigEntities();\n $this->closeRoot();\n }", "public function init() {\n $this->xml = new DomDocument($this->version, $this->encoding);\n }", "public function testXmlFile()\n {\n $this->expectException(InvalidArgumentException::class);\n $this->expectExceptionCode(1495569580);\n\n $dom = Dom::createFromFile(self::$fixture.'books.xml');\n $this->assertInstanceOf(DOMDocument::class, $dom);\n $this->assertEquals('catalog', $dom->documentElement->localName);\n\n Dom::createFromFile('invalid');\n }", "function CardinalXMLParser() {\n\t\t $this->xml_parser = xml_parser_create();\n\t\t}", "public function loadXMLFile($filename,$map_path, $formatting = FALSE){\r\n \r\n $path = $this->_preparePath($map_path);\r\n $this->xmlfile = $this->_initDocument($path .DS. $filename, $formatting);\r\n \r\n $this->absolutepath = rtrim($path,'/') .DS. $filename;\r\n \r\n return $this->xmlfile;\r\n }", "public function startSitemap()\n {\n $this->setWriter(new \\XMLWriter());\n $this->getWriter()->openURI($this->getFile());\n $this->getWriter()->startDocument('1.0', 'UTF-8');\n $this->getWriter()->setIndent(true);\n $this->getWriter()->startElement('urlset');\n $this->getWriter()->writeAttribute('xmlns', self::SCHEMA);\n }", "public function set($args)\n\t\t{\n\t\t\tif(!$this->set_file($args['id']))\n\t\t\t\treturn false;\n\n\t\t\t$new_obj = new NBXML(PATH_POSTS.$this->files[0], 0, TRUE, '', FALSE);\n\n\t\t\t$new_obj->setChild('title', \t\t\t$args['title']);\n\t\t\t$new_obj->setChild('content', \t\t\t$args['content']);\n\t\t\t$new_obj->setChild('description', \t\t$args['description']);\n\t\t\t$new_obj->setChild('allow_comments', \t$args['allow_comments']);\n\t\t\t$new_obj->setChild('mod_date', \t\t\tDate::unixstamp());\n\n\t\t\t// Quote\n\t\t\tif(isset($args['quote']))\n\t\t\t{\n\t\t\t\t$new_obj->setChild('quote', $args['quote']);\n\t\t\t}\n\n\t\t\t// ---------------------------------------------------------\n\t\t\t// Filename\n\t\t\t// ---------------------------------------------------------\n\t\t\t$file = explode('.', $this->files[0]);\n\n\t\t\t// Category\n\t\t\tif(isset($args['id_cat']))\n\t\t\t\t$file[2] = $args['id_cat'];\n\n\t\t\t// Draft, publish\n\t\t\t$file[4] = 'NULL';\n\n\t\t\tif(isset($args['mode']))\n\t\t\t{\n\t\t\t\tif($args['mode']=='draft')\n\t\t\t\t\t$file[4] = 'draft';\n\t\t\t}\n\n\t\t\t// Publish date\n\t\t\tif(isset($args['unixstamp']))\n\t\t\t{\n\t\t\t\t$file[0] = $args['unixstamp'];\n\n\t\t\t\t$new_obj->setChild('pub_date', $args['unixstamp']);\n\n\t\t\t\t$file[5] = Date::format_gmt($args['unixstamp'], 'Y');\n\t\t\t\t$file[6] = Date::format_gmt($args['unixstamp'], 'm');\n\t\t\t\t$file[7] = Date::format_gmt($args['unixstamp'], 'd');\n\t\t\t\t$file[8] = Date::format_gmt($args['unixstamp'], 'H');\n\t\t\t\t$file[9] = Date::format_gmt($args['unixstamp'], 'i');\n\t\t\t\t$file[10] = Date::format_gmt($args['unixstamp'], 's');\n\t\t\t}\n\n\t\t\t// Implode the filename\n\t\t\t$filename = implode('.', $file);\n\n\t\t\t// Delete the old post\n\t\t\tif($this->delete( array('id'=>$args['id']) ))\n\t\t\t{\n\t\t\t\t// Slug\n\t\t\t\t$this->slug($args['id'], $args['slug']);\n\n\t\t\t\t// Save config\n\t\t\t\t$this->savetofile();\n\n\t\t\t\t// Save the new post\n\t\t\t\treturn $new_obj->asXml(PATH_POSTS.$filename);\n\t\t\t}\n\n\t\t\treturn false;\n\t\t}", "public function open_xml_writer() {\n\n if (is_null($this->get_xml_filename())) {\n throw new convert_exception('handler_not_expected_to_write_xml');\n }\n\n if (!$this->xmlwriter instanceof xml_writer) {\n $fullpath = $this->converter->get_workdir_path() . '/' . $this->get_xml_filename();\n $directory = pathinfo($fullpath, PATHINFO_DIRNAME);\n\n if (!check_dir_exists($directory)) {\n throw new convert_exception('unable_create_target_directory', $directory);\n }\n $this->xmlwriter = new xml_writer(new file_xml_output($fullpath));\n $this->xmlwriter->start();\n }\n }", "public function getXml() {}", "public function visitFile($file)\n {\n $this->file = $this->doc->createElement('CstmrPmtRvsl');\n $this->root->appendChild($this->file);\n }", "public function __construct(string $filename)\n {\n $this->_document = new \\DOMDocument();\n $this->_document->loadXml(file_get_contents($filename));\n $this->_current = $this->_document;\n }", "public function setFile($file) {\t\t\n\t\t// set file\n\t\t$this->file = $file;\n\t\t\n\t\t// set extension\n\t\t$file_parts = explode('.', $this->file['name']);\n\t\t$this->extension = strtolower(end($file_parts));\n\n\t}", "function readConfigXML($fileName) {\n\n $this->currentFile = $fileName;\n $this->_getFileXML($fileName);\n $this->_parseXML();\n }", "public function set($filepath, $data);", "function ilDOMXML ()\n\t{\n\t\t$num = func_num_args();\n\t\t$args = func_get_args();\n\t\t\n\t\tif (($num == 1) && is_object($args[0]))\n\t\t{\n\t\t\t$this->doc = $args[0];\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$this->initNewDocument($args[0],$args[1],$args[2]);\n\t\t}\n\t}", "public function setInputFile($inputFile)\n {\n $this->inputFile = $inputFile;\n return $this;\n }", "function execute( $xml )\n {\n $settingsFileList = $xml->getElementsByTagName( 'SettingsFile' );\n foreach ( $settingsFileList as $settingsFile )\n {\n $fileName = $settingsFile->getAttribute( 'name' );\n $location = $settingsFile->getAttribute( 'location' );\n $key = $settingsFile->getAttribute( 'key' );\n $value = $this->getReferenceID( $settingsFile->getAttribute( 'value' ) );\n\n $fileNamePath = $location . eZDir::separator( eZDir::SEPARATOR_LOCAL ) . $fileName;\n if (!is_writable($fileNamePath))\n {\n $this->writeMessage(\"The file $fileNamePath is not writable\", 'error');\n continue;\n }\n \n $str = file_get_contents( $fileNamePath );\n $str = str_replace( $key, $value, $str);\n \n $fp=fopen( $fileNamePath, 'w' );\n fwrite( $fp, $str );\n fclose( $fp );\n \n $this->writeMessage(\"The file $fileNamePath has been updated\");\n }\n eZCache::clearByID( array( 'ini', 'global_ini' ) );\n }", "function xmlLoader($file){\n\t\t$dom = new domDocument;\n\t\t$dom->loadXML(file_get_contents($file));\n\t\t\tif (!$dom) {\n\t\t\t echo 'Error while parsing the document';\n\t\t\t exit;\n\t\t\t }\n\t\t\n\t\t$s = simplexml_import_dom($dom);\n\t\treturn $s;\n\t\t\n\t\t}", "public function __construct()\n {\n parent::__construct();\n $timestamp = Carbon::now()->timestamp;\n $this->filePath = storage_path(\"xml/test_{$timestamp}.xml\");\n $this->indexPath = storage_path('xml/sitemap.xml');\n $this->recordPath = storage_path('xml/record.xml');\n $this->url = 'https://www.jiankang.com/';\n }", "public function __construct()\n {\n $this->addMimeType('application/xml');\n $this->addMimeType('text/xml');\n $this->addMimeType('application/x-xml');\n }", "public function setFile($file)\n {\n $this->file = $file;\n }", "function read_set_simplexml ($simplexml)\n\t {\n\t }", "public function store(Request $request)\n {\n \n $xml_object = simplexml_load_file($request->file('inputFile')->getRealPath());\n \n $json = json_decode(json_encode($xml_object));\n \n if($json->person) {\n $this->savePerson($json->person);\n } \n \n else if ($json->shiporders) {\n $this->saveShiporders($json->shiporders);\n }\n \n }", "public function generateXmlFiles()\n\t{\n\t\t// Sitemaps\n\t\t$this->generateSitemap();\n\n\t\t// HOOK: add custom jobs\n\t\tif (isset($GLOBALS['TL_HOOKS']['generateXmlFiles']) && is_array($GLOBALS['TL_HOOKS']['generateXmlFiles']))\n\t\t{\n\t\t\tforeach ($GLOBALS['TL_HOOKS']['generateXmlFiles'] as $callback)\n\t\t\t{\n\t\t\t\t$this->import($callback[0]);\n\t\t\t\t$this->{$callback[0]}->{$callback[1]}();\n\t\t\t}\n\t\t}\n\n\t\t// Also empty the page cache so there are no links to deleted files\n\t\t$this->purgePageCache();\n\n\t\t// Add a log entry\n\t\t$this->log('Regenerated the XML files', __METHOD__, TL_CRON);\n\t}", "private function parseElement(): void\n {\n if ($this->node->nodeName!=='fileset')\n {\n throw new ConfigException('Expecting a fileset at %s:%s', $this->path, $this->node->getLineNo());\n }\n\n foreach ($this->node->attributes as $name => $value)\n {\n switch ($name)\n {\n case 'dir':\n $this->dir = $value->value;\n break;\n\n default:\n throw new ConfigException(\"Unexpected attribute '%s' at %s:%s'\", $name, $this->path, $this->node->getLineNo());\n }\n }\n\n if ($this->dir===null)\n {\n throw new ConfigException(\"Mandatory attribute 'dir' not set %s:%s'\", $this->path, $this->node->getLineNo());\n }\n }", "function create($object, $xmlFile = null){\r\n\t\tif($xmlFile == null)\r\n\t\t\t$xmlFile = constant(\"OBJECT_XML\");\t\t\r\n\t\t\r\n\t\t$xml = simplexml_load_file($xmlFile);\r\n\t\t$xml = $object->addToXML($xml);\r\n\t\t$xml->asXML($xmlFile);\r\n\t}", "public function setFile($file)\r\n {\r\n $this->file = $file;\r\n }", "function setUrlXml($data){\n \n $this->urlXml = \"https://www.sis-handball.de/xmlexport/xml_dyn.aspx?\"\n .\"user=\".$this->getConfiguration(0)\n .\"&pass=\".$this->getConfiguration(1)\n .\"&art=\".$this->optionsList[$data]\n .\"&auf=\".$this->getConfiguration(2); \n \n // check Url.\n $this->exceptions->findURL($this->urlXml);\n \n $this->setXmlArray($this->urlXml); \n \n }", "public function store()\n\t{\n\t\t$xml = Input::get('xml');\n\t\t$this->importer->storeXML($xml);\n\t\t$this->importer->import($xml);\n\t\treturn redirect()->route('admin.index');\n\t}", "function parseXML() {\r\n\t\t$xmlString = getFileStr();\r\n\r\n\t\tif (!strstr($xmlString, \"<?xml version='1.0' ?>\")) {\r\n\t\t\tparseBin();\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\t$xmlParser = xml_parser_create();\r\n\t\txml_parser_set_option($xmlParser, XML_OPTION_CASE_FOLDING, FALSE);\r\n\t\txml_set_element_handler($xmlParser, \"startElement\", \"endElement\");\r\n\r\n\t\txml_parse($xmlParser, $xmlString);\r\n\t\txml_parser_free($xmlParser);\r\n\r\n\t\txmlToObj();\r\n\t}", "function __construct($filePath = '',$rootName='pattern') \n\t{\n\t\tif($filePath == '')$filePath = DATA_PATH.'pattern.xml';\n\t\tparent::__construct($filePath , $rootName);\n\t}" ]
[ "0.66593397", "0.65647644", "0.6483169", "0.62996346", "0.62060285", "0.61914223", "0.6074765", "0.60726374", "0.6010395", "0.5997156", "0.59508437", "0.587415", "0.5835078", "0.58196104", "0.5792222", "0.57589895", "0.57100254", "0.56971645", "0.56913495", "0.5615557", "0.56020594", "0.5593418", "0.558258", "0.55804247", "0.5566981", "0.55561733", "0.5546723", "0.5541754", "0.5513385", "0.5500734", "0.546794", "0.5463921", "0.5455656", "0.5450785", "0.54441154", "0.5430174", "0.54259515", "0.54101", "0.540984", "0.5406081", "0.5393773", "0.5378262", "0.53739387", "0.536903", "0.5368492", "0.53640133", "0.53632665", "0.53532606", "0.53338456", "0.5332239", "0.53267145", "0.5302542", "0.52981037", "0.52933276", "0.5282395", "0.52790976", "0.5278383", "0.52637345", "0.52558076", "0.5250339", "0.52361786", "0.5233467", "0.5227611", "0.5203416", "0.5170848", "0.51704675", "0.51641834", "0.5156246", "0.51511616", "0.5147202", "0.5139565", "0.51342607", "0.5126565", "0.5108546", "0.5106759", "0.5106685", "0.51044303", "0.5101334", "0.50925577", "0.5087033", "0.5084517", "0.50786114", "0.50752705", "0.50735986", "0.5070392", "0.5070279", "0.5066687", "0.50665164", "0.50607336", "0.5058153", "0.5054537", "0.50393826", "0.5033093", "0.5028946", "0.5028568", "0.5027257", "0.5021651", "0.5009483", "0.50089836", "0.5002576" ]
0.57502365
16
Get monitoring point ID
public function getMonitoringPointId(): ?string { return $this->monitoringPointId; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getPointId($point) {\n\t\tif($this->sql(\"SELECT id FROM \".UT_ACC_POI.\" WHERE file = '$point'\")) {\n\t\t\treturn $this->getQueryResult(0, \"id\");\n\t\t}\n\t\telse {\n\t\t\treturn 0;\n\t\t}\n\t}", "public function getPId();", "public function getMeasurementId()\n {\n return $this->measurement_id;\n }", "public function getPointedEntityId() {\n return $this->attr('pointer') ? $this->attr('pointer') : null;\n }", "public function getPointsId()\n {\n return $this->table->points_id;\n }", "public function id()\n\t{\n\t\treturn $this->SqueezePlyrID ;\n\t}", "public static function id(){\n return self::info('id');\n }", "public function getLiveId() {}", "function get_id() {\n\t\treturn $this->get_data( 'id' );\n\t}", "function getInstanceId() \n {\n return $this->instance->getInstanceId();\n }", "public function getTrackingID()\n {\n return $this->trackingID;\n }", "public static function getID()\n {\n return self::getInstance()->_getID();\n }", "public function getTrackingId()\n {\n return $this->trackingId;\n }", "public function getEventID() {\n return \"dataevent-\".$this->getID();\n }", "public static function trackId(): string\n {\n return 'tid';\n }", "public function getTrackingId()\n {\n if (isset($this->data['TrackingId'])) {\n return $this->data['TrackingId'];\n } else {\n return false;\n }\n }", "public function getPosId()\n {\n return $this->configurator->getPosId();\n }", "public function getTrackKey()\n\t{\n\t\treturn $this->statpro->getTrackKey();\n\t}", "function get_id()\n {\n return $this->get_default_property(self :: PROPERTY_ID);\n }", "function getNoteId() {\n\t\tif (Config::getVar('debug', 'deprecation_warnings')) trigger_error('Deprecated function.');\n\t\treturn $this->getId();\n\t}", "public static function getCurLocationID()\n {\n return Yii::app()->getsetSession->getLocationId();\n }", "protected function getCurrentId()\n {\n return (array_key_exists($this->idfieldName(), $this->data)) ? $this->data[$this->idfieldName()] : NULL;\n }", "public function getInstanceIdent() {}", "public static function getId(){\n\t\t\n\t\t$serverName = isset($_SERVER['SERVER_NAME']) ? $_SERVER['SERVER_NAME'] : \"unknown\";\n\t\t\n\t\t//added MD5 because IE doesn't like dots I suspect\n\t\treturn md5(\\GO::config()->id.'AT'.$serverName);\n\t}", "public function getLocationid()\n {\n return $this->locationId;\n }", "function get_id()\r\n {\r\n return $this->get_default_property(self :: PROPERTY_ID);\r\n }", "public static function id()\n {\n return self::$id;\n }", "public function getId() {\n if ($this->id) {\n return $this->id;\n }\n\n $id = serialize($this->callback->__toString());\n $id .= serialize($this->second);\n $id .= serialize($this->minute);\n $id .= serialize($this->hour);\n $id .= serialize($this->day);\n $id .= serialize($this->month);\n $id .= serialize($this->dayOfWeek);\n $this->id = md5($id);\n\n return $this->id;\n }", "public function getID();", "public function getID();", "public function getID();", "public function getLocationId(): int\n {\n return $this->location->getId();\n }", "function getID() {\n\t\treturn $this->data_array['id'];\n\t}", "public function getVPSTxId()\n {\n return $this->getDataItem('VPSTxId');\n }", "function getEventID() \n {\n return $this->getValueByFieldName('event_id');\n }", "abstract public function get_instanceid_from_currentcontext();", "static function id()\n\t{\n\t\treturn self::data('id');\n\t}", "public function getLocationId()\n {\n return $this->location_id;\n }", "public function getLocationId()\n {\n return $this->location_id;\n }", "public function getUUID()\n {\n return $this->getPointer();\n }", "public function identifier()\n {\n return $this->id;\n }", "public function getInstanceId()\n {\n if ($this->instance_id) {\n return $this->instance_id;\n }\n\n return $this->instance_id = get_class($this).':'.spl_object_id($this);\n }", "public function _getSampleId() {\n\t\treturn $this->_sampleId;\n\t}", "public static function getHolderID();", "public function getId()\n {\n return $this->systemProperties->getId();\n }", "public function getLocationId()\n {\n return $this->locationId;\n }", "public function getLocationId()\n {\n return $this->locationId;\n }", "public static function getTraceId()\n {\n static::checkInit();\n return static::$traceId;\n }", "public static function getID() {\r\n return 1;\r\n }", "public function getId()\n {\n return $this->currentId;\n }", "private function getSampleIndividualId()\n {\n return $this->sampleIndividualId;\n }", "public function pId()\n {\n static $id = null;\n\n if (!is_null($id)) {\n return $id;\n }\n\n $id = $this->property('id');\n\n if (strpos($id, 'http') === 0) {\n $path = explode('/', parse_url($id, PHP_URL_PATH));\n\n if ($path[1] == 'gallery') {\n $id = $path[2];\n }\n elseif ($path[1] == 'a') {\n $id = 'a/'.$path[2];\n }\n else {\n $id = $path[1];\n }\n }\n\n return $id;\n }", "public function getInstanceId()\n {\n if ($id = $this->_getParam(\\MUtil_Model::REQUEST_ID)) {\n return $id;\n }\n }", "public function getPointer()\n {\n return $this->uuid;\n }", "private function GetID()\n\t\t{\n\t\t\treturn $this->id;\n\t\t}", "public function getId() {\n\t\t$this->getDriver()->getId();\n\t}", "public function getId()\n {\n return $this->proxyBase->id;\n }", "protected function getID() {\n return $this->id;\n }", "public function get_id();", "public function get_id();", "public function getPID(): string {\n return $this->_pid;\n }", "public function id() {\n return $this->activity_array['id'];\n }", "function get_id() {\n return $this->get_mapped_property('id');\n }", "function getEventID() {\n\t\treturn $this->_EventID;\n\t}", "function getID();", "public function getIdentifier()\n {\n return $this->id;\n }", "public static function getLogid(): string\n {\n $contextData = self::getCoroutineContext(self::DATA_KEY);\n $logid = $contextData['logid'] ?? '';\n return $logid;\n }", "final public function getTopologyId(): ObjectId {}", "public function getID()\n {\n return $this->getKey();\n }", "function event_id() \n {\n $list = explode( ':', $this->rule->rule_key);\n if ( count( $list) == 4 && $list[2] == 'event') return $list[3];\n return NULL;\n }", "public function getPid() {}", "public function getRecordId()\n {\n return $this->get(self::_RECORD_ID);\n }", "public function GetPlatID() {\n\t\treturn $this -> _mPlatID;\n\t}", "public function getCallerId();", "public function getCallerId();", "public function getAlertId (){\n\t\treturn($this->alertId);\n\t}", "public function getProviderId();", "public function getID() {\n \n return $this->id;\n }", "abstract public function getIdent();", "public function getIdentifier()\n {\n return $this->uid;\n }", "public function getSystemLogID() {\n\t\treturn $this->id;\n\t}", "public function getMaconomyId(): string\n {\n return (string)$this->data['instancekeyField'];\n }", "public function GetID() {\n return $this->id;\n }", "public function id()\n {\n return $this->_getAuthId();\n }", "public function get_id () {\r\n\t\treturn $this->id;\r\n\t}", "function getProcessId() {\n return $this->instance->getProcessId();\n }", "static function getId()\n {\n return isset(self::$_data[self::KEY_ID]) ? self::$_data[self::KEY_ID] : 0;\n }", "private function _getStoreId() {\n $store_id = 1;\n return $store_id;\n }", "public function getID() {\n\t\treturn $this->id;\n\t}", "public function getID() {\n\t\treturn $this->id;\n\t}", "public function getID() {\n\t\treturn $this->id;\n\t}", "public function getID() {\n\t\treturn $this->id;\n\t}", "function getID() {\n\t\treturn $this->id;\n\t}", "public function getId()\n {\n\t\treturn $this->_uid;\n\t}", "public function getServerId()\n {\n return $this->get(self::_SERVER_ID);\n }", "public function getID()\n {\n return $this->id;\n }", "public function getID()\n {\n return $this->id;\n }", "public function getID() {\n return $this->id;\n }", "public function getID() {\n return $this->id;\n }", "public function getID() {\n return $this->id;\n }" ]
[ "0.66920376", "0.65696526", "0.6242984", "0.6210832", "0.6190758", "0.60599357", "0.5973947", "0.59525985", "0.59295934", "0.59266365", "0.5855238", "0.5825255", "0.58198476", "0.58166695", "0.5793387", "0.57738656", "0.57477367", "0.57275695", "0.5722371", "0.5717234", "0.5710076", "0.57046324", "0.5682849", "0.56799364", "0.56766045", "0.5672229", "0.565596", "0.5644583", "0.5640167", "0.5640167", "0.5640167", "0.5639455", "0.5638453", "0.5634251", "0.56269014", "0.56268096", "0.5623113", "0.5622387", "0.5622387", "0.56213564", "0.5619598", "0.56187636", "0.5607615", "0.56051385", "0.5603153", "0.56006575", "0.56006575", "0.5600477", "0.5600102", "0.5595643", "0.55932933", "0.5592553", "0.5592196", "0.5582891", "0.5579207", "0.55788237", "0.5570555", "0.5566872", "0.55581707", "0.55581707", "0.5549787", "0.55401707", "0.55377", "0.5536728", "0.55326545", "0.5521237", "0.5518936", "0.5518271", "0.5513682", "0.5507002", "0.55045325", "0.55010045", "0.5496629", "0.54892576", "0.54892576", "0.5487617", "0.5485283", "0.54806554", "0.5477556", "0.5476814", "0.54703665", "0.54671204", "0.5466299", "0.5465759", "0.5455969", "0.54547244", "0.54545516", "0.54538333", "0.5453325", "0.5453325", "0.5453325", "0.5453325", "0.5453142", "0.5450202", "0.54498893", "0.5445587", "0.5445587", "0.54453796", "0.54453796", "0.54453796" ]
0.7815681
0
Set monitoring point ID
public function setMonitoringPointId(?string $monitoringPointId): Statistics { $this->monitoringPointId = $monitoringPointId; return $this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function set_id($setid){\n $this->id = $setid;\n }", "public function setId($x) { $this->id = $x; }", "public function getMonitoringPointId(): ?string {\n\t\treturn $this->monitoringPointId;\n\t}", "private function setID($id) {\r\n\t\t$this->id = $id;\r\n\t}", "public function setID($id) {\n $this->id = $id; \n }", "public function setID($id){\n $this->ID = $id;\n }", "function SetId($value) { $this->id=$value; }", "function setPID($pid) {\n\t\t$this->_pid = $pid;\n\t}", "function set_id($id) {\n\t\t$this->id = $id;\n\t}", "public function setID($id){\n $this->id = $id;\n }", "function set_id($id)\n {\n $this->id = $id;\n }", "public function setId($id){\n $this->_id = $id;\n }", "function setId($id) {\r\n $this->_id = $id;\r\n }", "public function setID($value) {\r\n //if (!is_numeric($value)) die(\"setID() only accepts a numerical ID value\");\r\n $this->id = $value;\r\n }", "function setId($id) {\n $this->id = $id;\n }", "function setId($id) {\n $this->id = $id;\n }", "public function setID($id){\n $this->id=$id;\n }", "function setId($id){\n\t\t$this->id = $id;\n\t}", "public function setId($pId) {\n\t\t$this->Id = $pId;\n\t}", "public function setId($id){\n\t\tself::$_id[get_class($this)] = $id;\n\t}", "function setId($id) {\n\t\t$this->_id = $id;\n\t}", "function setId($id){\r\n\t\t$this->id = $id;\r\n\t}", "public function setID($id)\n {\n $this->ID = $id;\n }", "public function setMaconomyId(string $key): void\n {\n $this->data['instancekeyField'] = $key;\n }", "public function setID($id) {\n\t\t$this->id = $id;\n\t}", "private function setId($id)\n {\n $this->id = $id;\n }", "public function setId($id) { $this->id = $id; }", "protected function setIpSetId(int $id)\n {\n $this->props['ipSetId'] = $id;\n $this->props['ipSet'] = null;\n }", "function setId($id)\n {\n $this->id = $id;\n }", "public function set($new_id);", "public function setId($id){\n $this->id = $id;\n }", "public function setId($id){\n $this->id = $id;\n }", "public function setId($id){\n $this->id = $id;\n }", "public function setId($id) {\n $this->id = $id;\n }", "function set_id( $id ){\n\t\t$this->id = $id;\n\t\t// this is add request. so number is 0\n\t\tif( $this->id == $this->id_base ){\n\t\t\t$this->number = 0;\n\t\t\t$this->is_new = true;\n\t\t}\n\t\t// parse number\n\t\telse{\n\t\t\t$this->number = str_replace($this->id_base.'-', '', $this->id);\n\n\t\t\t// load instance data\n\t\t\t$this->instance = jcf_field_settings_get( $this->id );\n\t\t\tif( !empty($this->instance) ){\n\t\t\t\t$this->slug = $this->instance['slug'];\n\t\t\t}\n\t\t}\n\t}", "public function set_id($id){\n $this->id = $id;\n }", "public function setId($id){\n\t\t$this->id = $id;\n\t}", "public function setPid(int $pid){\n $this->pid = $pid;\n }", "public function set($param, $id)\n {\n $sentence = new SentenceUtil();\n $sentence->addCommand('/ip/hotspot/set');\n foreach ($param as $name => $value) {\n $sentence->setAttribute($name, $value);\n }\n $sentence->where('.id', '=', $id);\n $this->talker->send($sentence);\n\n return 'Sucsess';\n }", "public function setID($id);", "public function setId($id)\n {\n\n $this->idKey = $id;\n $this->context->element = $id;\n\n }", "public function setId($id) {\r\n $this->_id = $id;\r\n }", "public function setID($id)\n {\n $this->id = $id;\n }", "public function setIdVit($id){\n\t\t$this->id = $id;\n\t}", "public function setId($id) \n {\n $this->id = $id;\n }", "private function setPID($pid)\n {\n $this->log(\"process id is $pid\");\n $this->pid = (int)$pid;\n }", "function setId($value) {\n $this->_id = intval($value);\n }", "public function setId($id){\n $this->id = $id;\n }", "function setSwimMeetId($id)\r\n {\r\n $this->_swimmeetid = $id ;\r\n }", "public function setId($id) {\r\n $this->id = $id;\r\n }", "public function setId($id) {\r\n $this->id = $id;\r\n }", "public function setId($id)\n {\n $this->id = $id;\n }", "public function setId($id)\n {\n $this->id = $id;\n }", "public function setId($id) {\n\t\t$this->id = $id;\n\t}", "public function setId($id) {\n\t\t$this->id = $id;\n\t}", "public function setId($id) {\n\t\t$this->id = $id;\n\t}", "public function setId($id) {\n\t\t$this->id = $id;\n\t}", "public function setId($id) {\n\t\t$this->id = $id;\n\t}", "public function setId($id)\n {\n $this->id = $id;\n\n \n }", "public function setId($id){\n\t\t\t$this->id = $id;\n\t\t}", "public function setId( $id )\n {\n $this->id = $id;\n }", "public function set_id( $id ) {\n\t\t$this->id = absint( $id );\n\t}", "public function setID($_id) \n \t{\n \t\t$this->_id = $_id;\n \t}", "function setId($id)\r\n\t{\r\n\t\t// Set event id and wipe data\r\n\t\t$this->_id\t = $id;\r\n\t\t$this->_data\t= null;\r\n\t}", "public function setVideoId()\n {\n $this->video_id = (int) substr(parse_url($this->url, PHP_URL_PATH), 1);\n }", "public function setId( $id ) {\n\t\t$this->id = $id;\n\t}", "public function setId( $id ) {\n\t\t$this->id = $id;\n\t}", "function setId($id) {\n\t\t$this->setData('id', $id);\n\t}", "function setIdTip($id_tip){ $this->parameters['id_tip'] = $id_tip; }", "public static function set($id)\n {\n self::$id = $id;\n }", "public function setIdentifier($id)\n {\n $this->uid = (int)$id;\n }", "public function testSetIdentifierMethod(): void\n {\n $middleware = new ThrottleMiddleware();\n $reflection = $this->getReflection($middleware, '_setIdentifier');\n\n $request = new ServerRequest();\n $expected = $request->clientIp();\n $result = $reflection->method->invokeArgs($middleware, [$request]);\n $this->assertEquals($expected, $result);\n\n EventManager::instance()->on(\n ThrottleMiddleware::EVENT_GET_IDENTIFER,\n [],\n function ($event) {\n return 'my-custom-identifier';\n }\n );\n\n $result = $reflection->method->invokeArgs($middleware, [$request]);\n $this->assertEquals('my-custom-identifier', $result);\n\n EventManager::instance()->off(ThrottleMiddleware::EVENT_GET_IDENTIFER);\n }", "public function set_id( $id ) {\n\t\t\t$this->id = $id;\n\t\t}", "public function setId($id)\n {\n $this->_id = $id;\n }", "public function _set($number) {\n\t\t$this->number = $number;\n\t\t$this->id = $this->id_base . '-' . $number;\n\t}", "protected function setInternalIdentifier($id)\n {\n $this->_id = $id;\n }", "public function setId($id) {\n $this->id = $id;\n }", "public function setId($id) {\n $this->id = $id;\n }", "public function setId($id) {\n $this->id = $id;\n }", "public function setId($id) {\n $this->id = $id;\n }", "public function setId($id) {\n $this->id = $id;\n }", "public function setId($id)\n {\n $this->_id = (int) $id;\n }", "private function set_id(int $id)\n {\n $this->_id = $id;\n }", "public function setId($id)\n {\n $this->_id = (int) $id;\n }", "public function SetId ($id);", "public function setID($_id) \n\t{\n\t\t$this->_id = $_id;\n\t}", "function set_id($id)\r\n {\r\n $this->set_default_property(self :: PROPERTY_ID, $id);\r\n }", "private function SetID($value)\n\t\t{\n\t\t\t$this->id = $value;\n\t\t}", "public function SetTouchPointID(SetTouchPointID $parameters)\n {\n return $this->__soapCall('SetTouchPointID', array($parameters));\n }", "protected function setId($id)\n {\n $this->id = $id;\n }", "public function setIdentifier($record){\n\t\t$record->writeAttribute($this->_identityColumn, $this->generateUUID());\n\t}", "public function setId($id) {\n\t\t$this->id = (integer)$id;\n\t}", "public function set_hotspot($param, $id){\n $input = array(\n 'command' => '/ip/hotspot/set',\n 'id' => $id\n );\n $out=array_merge($input, $param);\n return $this->query($out);\n }", "public function setCallId(?string $value): void {\n $this->getBackingStore()->set('callId', $value);\n }", "public function set($id, $instance);", "public function setID($ID ){\n $this->ID = $ID;\n }", "public function setId($id){\n $this->id=$id;\n }", "function setid_exp($val)\n { $this->id_exp=$val;}", "public function setId($id)\n {\n $this->id = $id;\n }", "public function setId($id)\n {\n $this->id = $id;\n }", "public function setId($id)\n {\n $this->id = $id;\n }" ]
[ "0.63477075", "0.6152194", "0.5884123", "0.58758837", "0.5853003", "0.5842798", "0.57970935", "0.5787715", "0.57801783", "0.57667816", "0.57204866", "0.5694738", "0.56887716", "0.5680814", "0.5678692", "0.5678692", "0.5671078", "0.5667362", "0.5662898", "0.5657291", "0.5648864", "0.56416", "0.5637992", "0.56345654", "0.56310076", "0.5627856", "0.5626279", "0.5621366", "0.5610915", "0.56013376", "0.5589898", "0.5589898", "0.5589898", "0.5587591", "0.5584235", "0.5575203", "0.5565656", "0.5562851", "0.5560851", "0.5556751", "0.5541809", "0.55386335", "0.5538345", "0.5537098", "0.55329156", "0.5527297", "0.552141", "0.55171084", "0.55157846", "0.5515655", "0.5515655", "0.55136317", "0.55047816", "0.54963446", "0.54963446", "0.54963446", "0.54963446", "0.54963446", "0.54955995", "0.5492986", "0.5488094", "0.5487219", "0.54792196", "0.5476735", "0.5473903", "0.5471729", "0.5471729", "0.54699916", "0.5464898", "0.5460635", "0.5458482", "0.5455085", "0.54481584", "0.54359925", "0.54300356", "0.54286486", "0.54265225", "0.54265225", "0.54265225", "0.54265225", "0.54232764", "0.5422031", "0.54184085", "0.5417453", "0.5416969", "0.5415803", "0.5414203", "0.54136425", "0.5412626", "0.5410346", "0.5408511", "0.54065657", "0.54057914", "0.53956777", "0.53891855", "0.53838927", "0.5381023", "0.53804004", "0.5378825", "0.5378825", "0.5378825" ]
0.0
-1
Convert statistics to XML response
public function toXml(): SimpleXMLElement { // Create xml root $xmlNamespaces = 'xmlns:environet="environet"'; $xmlHeader = '<?xml version="1.0" encoding="UTF-8"?><environet:UploadStatistics ' . $xmlNamespaces . '></environet:UploadStatistics>'; $xml = new SimpleXMLElement($xmlHeader); $xml->addChild('InputPropertiesCount', $this->getInputPropertiesCount()); $xml->addChild('Date', $this->getDate()->format('c')); $xml->addChild('MonitoringPointId', $this->getMonitoringPointId()); foreach ($this->getProperties() as $property) { $xmlProperty = $xml->addChild('PropertyStatistics'); $xmlProperty->addChild('Symbol', $property); $xmlProperty->addChild('ValuesCount', $this->getPropertyValuesCount($property)); $xmlProperty->addChild('Inserts', $this->getPropertyInserts($property)); $xmlProperty->addChild('Updates', $this->getPropertyUpdates($property)); $xmlProperty->addChild('NoChanges', $this->getPropertyNoChanges($property)); $xmlProperty->addChild('MinTime', $this->getPropertyMinTimeFormatted($property)); $xmlProperty->addChild('MaxTime', $this->getPropertyMaxTimeFormatted($property)); } return $xml; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function xml() {\n if( $this->format === 'text/hal+xml' ) {\n header('Content-Type: text/hal+xml; charset=utf-8', TRUE, $this->status);\n $hal_response = (new Resource())\n ->setURI(\"/{$this->resource}\". (isset($this->filters['id']) ? $this->filters['id'] : ''))\n ->setLink($this->resource, new Link(\"/{$this->resource}\"))\n ->setData($this->content);\n\n $writer = new Hal\\XmlWriter(true);\n \n return $writer->execute($hal_response);\n } else {\n header('Content-Type: text/xml; charset=utf-8', TRUE, $this->status);\n $xml_data = new \\SimpleXMLElement('<?xml version=\"1.0\"?><data></data>');\n static::array_to_xml($this->content,$xml_data);\n \n return $xml_data->asXML();\n }\n \n }", "public function getXMLResponse() {\n return \\Lib\\Format::forge($this->_response)->to_xml();\n }", "public function toXml()\n {\n return $this->response->asXML();\n }", "public function getXmlResponse();", "function xml_output($array=array()) {\n\terror_reporting(0);\n\theader(\"Last-Modified: \".gmdate(\"D, d M Y H:i:s\").\"GMT\");\n\theader(\"Cache-Control: no-cache, must-revalidate\");\n\theader(\"Pragma: no-cache\");\n\theader(\"Content-Type:text/xml; charset=UTF-8\");\n\t$out = '<?xml version=\"1.0\" encoding=\"UTF-8\"?>'.\"\\n\";\n\t$out .= \"<response>\\n\";\n\t$out .= \"\t<status_code>$array[status_code]</status_code>\\n\";\n\t$out .= \"\t<status_txt>$array[status_txt]</status_txt>\\n\";\n\tif(count($array['data'])>0) {\n\t\t$out .= \"\t<data>\\n\";\n\t\tforeach($array['data'] as $key => $value) {\n\t\t\t$out .= \"\t\t<$key>$value</$key>\\n\";\n\t\t}\n\t\t$out .= \"\t</data>\\n\";\n\t}\n\t$out .= '</response>';\n\techo $out;\n}", "public function toXML();", "public function xml()\n {\n // if dirty data exists\n $this->swallow();\n // if redirecting\n if ($this->redirect) {\n /*header(\"Location: {$this->redirect}\");\n // more headers\n foreach ( $this->headers as $header ) {\n header($header);\n }*/\n $this->redirect($this->redirect, array(), false);\n } else {\n // header xml data\n header('Content-Type: text/xml');\n //过滤$CFG\n if (!empty($this->vars['CFG'])) {\n unset($this->vars['CFG']);\n }\n // more headers\n foreach ($this->headers as $header) {\n header($header);\n }\n // set varibales data\n $results = Utility::array2XML($this->vars);\n // send\n echo $results;\n }\n }", "public function outputAsXML($print = true) {\r\n\t\t$output = \"<?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\"?>\\n\";\r\n\t\t$output .= \"<?xml-stylesheet type=\\\"text/xsl\\\" href=\\\"resmon.xsl\\\"?>\\n\";\r\n\t\t$output .= \"<ResmonResults>\\n\";\r\n\t\t\r\n\t\tforeach ( $this->data as $module => $services ) {\r\n\t\t\tforeach ( $services as $service => $serviceData ) {\r\n\t\t\t\t$output .= sprintf ( \"\\t<ResmonResult module=\\\"%s\\\" service=\\\"%s\\\">\\n\", htmlentities ( $module ), htmlentities ( $service ) );\r\n\t\t\t\t$output .= sprintf ( \"\\t\\t<last_update>%d</last_update>\\n\", time () );\r\n\t\t\t\t\r\n\t\t\t\tif (is_array ( $serviceData ['metrics'] )) {\r\n\t\t\t\t\tforeach ( $serviceData ['metrics'] as $metric ) {\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tswitch ($metric ['type']) {\r\n\t\t\t\t\t\t\tcase self::TYPE_FLOAT :\r\n\t\t\t\t\t\t\t\t$value = sprintf ( '%f', $metric ['value'] );\r\n\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\tcase self::TYPE_INT :\r\n\t\t\t\t\t\t\tcase self::TYPE_LONGINT :\r\n\t\t\t\t\t\t\tcase self::TYPE_UNSIGNED_INT :\r\n\t\t\t\t\t\t\tcase self::TYPE_UNSIGNED_LONGINT :\r\n\t\t\t\t\t\t\t\t$value = sprintf ( '%d', $metric ['value'] );\r\n\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\tdefault :\r\n\t\t\t\t\t\t\t\t$value = sprintf ( '%s', $metric ['value'] );\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t$output .= sprintf ( \"\\t\\t<metric name=\\\"%s\\\" type=\\\"%s\\\">%s</metric>\\n\", htmlentities ( $metric ['name'] ), $metric ['type'], htmlentities ( $value ) );\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t$output .= sprintf ( \"\\t\\t<state>%s</state>\\n\\t</ResmonResult>\\n\", empty ( $serviceData ['state'] ) ? self::STATE_OK : $serviceData ['state'] );\r\n\t\t\t}\r\n\t\t}\r\n\t\t$output .= \"</ResmonResults>\\n\";\r\n\t\t\r\n\t\tif ($print) {\r\n\t\t\theader ( \"Content-Type: text/xml; encoding=UTF-8\" );\r\n\t\t\techo $output;\r\n\t\t}\r\n\t\t\r\n\t\treturn $output;\r\n\t}", "public function Statistics_General()\n\t{\n\t\t$Data = $this -> HTTPRequest($this -> APIURL.'Statistics:General');\n\t\treturn $this -> ParseResponse($Data);\n\t}", "public function xml()\n\t{\n \t$view = view('sitemap.xml')->with([\n 'pages' => $this->pages\n ]);\n return response($view, '200')->header('Content-Type', 'text/xml');\n }", "public function getStatistics_get() {\n //extract($_GET);\n $result = $this->feeds_model->getStatistics();\n return $this->response($result);\n }", "function _getXMLResponse($sResponse) {\n if (extension_loaded('simplexml')) { // If simplexml is available, we can do more stuff!\n $oDOM = new DOMDocument;\n $oDOM->loadXML($sResponse);\n $sXML = simplexml_import_dom($oDOM);\n $sXMLLayout = 'http://www.shrinktheweb.com/doc/stwresponse.xsd';\n\n // Pull response codes from XML feed\n $aThumbnail = (array)$sXML->children($sXMLLayout)->Response->ThumbnailResult->Thumbnail;\n $aResponse['thumbnail'] = $aThumbnail[0];\n $aResponse['stw_action'] = $aThumbnail[1];\n $aResponse['stw_response_status'] = $sXML->children($sXMLLayout)->Response->ResponseStatus->StatusCode; // HTTP Response Code\n $aResponse['stw_response_code'] = $sXML->children($sXMLLayout)->Response->ResponseCode->StatusCode; // STW Error Response\n $aResponse['stw_last_captured'] = $sXML->children($sXMLLayout)->Response->ResponseTimestamp->StatusCode; // Last Captured\n $aResponse['stw_quota_remaining'] = $sXML->children($sXMLLayout)->Response->Quota_Remaining->StatusCode; // New Reqs left for today\n $aResponse['stw_bandwidth_remaining'] = $sXML->children($sXMLLayout)->Response->Bandwidth_Remaining->StatusCode; // New Reqs left for today\n $aResponse['stw_category_code'] = $sXML->children($sXMLLayout)->Response->CategoryCode->StatusCode; // Not yet implemented\n } else {\n\t // LEGACY SUPPPORT\n $aResponse['stw_response_status'] = _getLegacyResponse('ResponseStatus', $sRemoteData);\n $aResponse['stw_response_code'] = _getLegacyResponse('ResponseCode', $sRemoteData);\n\n // check remaining quota\n $aResponse['stw_quota_remaining'] = _getLegacyResponse('Quota_Remaining', $sRemoteData);\n // check remaining bandwidth\n $aResponse['stw_bandwidth_remaining'] = _getLegacyResponse('Bandwidth_Remaining', $sRemoteData);\n\n // get thumbnail and status\n $aThumbnail = $this->_getThumbnailStatus($sRemoteData);\n $aResponse = array_merge($aResponse, $aThumbnail);\n }\n \n if ($aResponse['stw_action'] == 'delivered') {\n $aResponse['exists'] = true;\n } else {\n $aResponse['exists'] = false;\n }\n\n if ($aResponse['stw_action'] == 'fix_and_retry') {\n $aResponse['problem'] = true;\n } else {\n $aResponse['problem'] = false;\n }\n\n if ($aResponse['stw_action'] == 'noretry') {\n $aResponse['error'] = true;\n } else {\n $aResponse['error'] = false;\n }\n\n // if we use the advanced api for free account we get an invalid request\n if ($aResponse['stw_response_code'] == 'INVALID_REQUEST') {\n $aResponse['invalid'] = true;\n } else {\n $aResponse['invalid'] = false;\n }\n\t\t\n\t\t// if our domain or IP is not listed in the account's \"Allowed Referrers\" AND \"Lock to Account\" is enabled, then we get this error\n if ($aResponse['stw_response_code'] == 'LOCK_TO_ACCOUNT') {\n $aResponse['locked'] = true;\n } else {\n $aResponse['locked'] = false;\n }\n\n return $aResponse;\n }", "public function output_xml()\n {\n $this->comment(sprintf(\"Estimated Execution Time Is: %s\"\n , (preg_replace(\n '/^0\\.(\\d+) (\\d+)$/', '\\2.\\1', microtime()) - START_TIME)\n ));\n\n $this->comments2xml($this->xmlw, $this->comments);\n $this->close_xml();\n $xml_out = $this->xmlw->outputMemory();\n $this->debug('---- Start XML Output ----');\n $this->debug(explode(\"\\n\", $xml_out));\n $this->debug('---- End XML Output ----');\n echo $xml_out;\n exit();\n }", "public function asXML();", "function toXML()\n {\n // Not implemented yet.\n }", "function serializeResult(){\n \t //checking if the WDDX module is installed\n \t if(function_exists('wddx_serialize_value')){\n \t $text = wddx_serialize_value($this->result);\n \t }else{\n $text = '<wddxPacket version=\"1.0\"><header /><data>'.$this->wddx_serialize_value($this->result).'</data></wddxPacket>';\n \t }\n \t \n \t $text = utf8_encode($text);\n \t\treturn array(\n \t\t\t$text,\n \t\t\tarray(\n \t\t\t\t\"Content-type\"\t\t=> \"text/xml\"\n \t\t\t\t//\"Content-length\"\t=> strlen($text),\n \t\t\t)\n \t\t);\n \t}", "public function xml()\n {\n try\n {\n if (! $this->decoded) {\n $this->response = json_encode(simplexml_load_string($this->response));\n\n $this->json();\n }\n }\n catch (\\Exception $exception){\n $this->decoded = [];\n }\n\n return $this->decoded;\n }", "public function getMetrics(): Response\n {\n\n $registry = \\Prometheus\\CollectorRegistry::getDefault();\n\n $renderer = new RenderTextFormat();\n $result = $renderer->render($registry->getMetricFamilySamples());\n\n return $this->responseFactory->make($result, 200, ['Content-Type' => RenderTextFormat::MIME_TYPE]);\n }", "function render_xml( $data ) {\n\n\t\theader (\"Content-Type:text/xml\"); \n\t\t$xml = new SimpleXMLElement( '<results></results>' );\n\t\t$xml = $this->object_to_xml( $data, $xml );\n\t\techo $this->tidy_xml( $xml );\n\t\t\n\t}", "function rest_api_get_stats( $response ) {\n\t\t$users = UM()->Online()->get_users();\n\t\t$response['stats']['total_online'] = $users ? count( $users ) : 0;\n\t\treturn $response;\n\t}", "public function build_xml_map() {\n $this->_create_map();\n header(\"content-type: text/xml\");\n echo $this->result;\n }", "public function toXML()\n {\n // TODO: Implement toXML() method.\n }", "public function toResponse()\n {\n $base = ['return_code' => is_null($this->fail) ? static::SUCCESS : static::FAIL, 'return_msg' => $this->fail];\n $attributes = array_merge($base, $this->attributes);\n if ($this->sign) {\n $attributes['sign'] = Support\\generate_sign($attributes, $this->app->getKey());\n }\n return new Response(XML::build($attributes));\n }", "public function convertResponse2XML($response)\n {\n /* Split the articles if the message is news. */\n $msgType = ucfirst($response->msgType);\n if($msgType == 'News') \n {\n $articles = $response->articles;\n unset($response->articles);\n }\n\n /* Join other fields. */\n $xml = \"<xml>\\n\";\n foreach($response as $key => $value)\n {\n $key = ucfirst($key);\n if($key == 'MediaId') $xml .= \"<$msgType><$key><![CDATA[$value]]></$key></$msgType>\";\n if($key != 'MediaId') $xml .= \"<$key><![CDATA[$value]]></$key>\\n\";\n }\n if(!isset($articles)) return $xml . '</xml>';\n\n /* Join articles. */\n $xml .= '<ArticleCount>' . count($articles) . \"</ArticleCount>\\n<Articles>\\n\";\n foreach($articles as $article)\n {\n $xml .= \"<item>\\n\";\n foreach($article as $key => $value)\n {\n $key = ucfirst($key);\n $xml .= \"<$key><![CDATA[$value]]></$key>\\n\";\n }\n $xml .= \"</item>\\n\";\n }\n $xml .= \"</Articles>\\n</xml>\";\n return $xml;\n }", "protected function renderAsXML() {}", "public function run()\n {\n \\Yii::$app->response->format = Response::FORMAT_XML;\n return $this->samlSsoComponent->getMetadata();\n }", "public function getContentStats()\n {\n $tree = $this->app()->request()->param(\"_content_tree\");\n\n $stats = $this->_doGetContentStats($tree);\n\n $str = \"<table>\";\n $str .= \"<tr>\";\n $str .= \"<td>\".$stats[\"pages\"].\"</td>\";\n $str .= \"<td>Pages</td>\";\n $str .= \"</tr>\";\n $str .= \"<tr>\";\n $str .= \"<td>\".$stats[\"posts\"].\"</td>\";\n $str .= \"<td>Posts</td>\";\n $str .= \"</tr>\";\n $str .= \"</table>\";\n\n return array(\"title\"=>\"Content stats\", \"body\"=>$str);\n }", "function outputStatistics() {\n\t\trequire_once \"./Services/Tracking/classes/class.ilLMStatistics.php\";\n\n\t\tif ($_POST[\"stat\"] == 'u') { //Beobachtungsmodell starten\n\t\t\t$this->lm_statistics->outputApplet();\n\t\t} else { //Session-,Seiten-,Kapitelstats starten\n\t\t\t$this->lm_statistics->outputHTML();\n\t\t}\n\t}", "public function getXml()\n {\n return $this->gsgxml->output();\n }", "public function getStatisticOverview()\n {\n return Cache::remember('statistic_overview', 3600, function () {\n $modelAPI = new API;\n // Get All Sales\n $physicalSales = $modelAPI->getAllStoreMonthlySales();\n $digitalSales = $modelAPI->getAllDigitalSales();\n // Calculate Dividend\n $dividend = 0.02 * ($physicalSales + $digitalSales) * config('services.lmb_div.proportion');\n // Get Network Bonus\n $bonus = $modelAPI->getAllTimeNetworkBonus();\n // Get Users and Stores count\n $users = User::whereIn('user_type', [9, 10])->count();\n $stores = User::where('is_store', 1)->count();\n\n return response()->json([\n 'dividend' => round($dividend, 2),\n 'bonus' => round($bonus, 2),\n 'sales' => $physicalSales + $digitalSales,\n 'users' => (int) $users,\n 'stores' => (int) $stores\n ], 200);\n });\n }", "public function summaryAction()\n {\n $reporter = $this->getDI()->get('reporter');\n\n $this->getOutput()->last_15_min_mo_count = $reporter->getLastMoCount(new DateTime('15 minutes ago'));\n $this->getOutput()->time_span_last_10k = $reporter->getTimeSpan(10000);\n return $this->initResponse();\n }", "private function response($statusNumber, $out_array) {\n\n if ($this->response_type == 'json') {\n \n } else {\n header(\"Content-type: text/xml\");\n echo $this->response_xml($out_array);\n }\n }", "public function stats(): Payload\n {\n if (!App::$server) {\n return Payload::make(['msg' => 'server is not running'], 404);\n }\n\n $stat = App::$server->getServer()->stats();\n $stat['start_time'] = \\date('Y-m-d H:i:s', $stat['start_time']);\n\n return Payload::make($stat);\n }", "public function xml($data, string $root = 'root'): PsrResponseInterface;", "function toXML() {\r\n\t\tglobal $persons;\r\n\t\tglobal $expenses;\r\n\t\tglobal $action;\r\n\r\n\t\t$xmlString = \"<?xml version='1.0' ?>\\n<mshare version=\\\"\".VERSION.\"\\\"\";\r\n\t\t\r\n\t\tif ($action == \"CLOSE\") $xmlString .= \" state=\\\"CLOSED\\\"\";\r\n\r\n\t\t$xmlString .= \">\\n\";\r\n\r\n\t\tif (count($persons) > 0) {\r\n\t\t\t$xmlString .= \"\\t<persons>\\n\";\r\n\r\n\t\t\tfor ($i = 0; $i < count($persons); $i++) {\r\n\t\t\t\t$xmlString .= \"\\t\\t<person name=\\\"\".$persons[$i]->name.\"\\\" ID=\\\"\".$persons[$i]->ID.\"\\\"/>\\n\";\r\n\t\t\t}\r\n\r\n\t\t\t$xmlString .= \"\\t</persons>\\n\";\r\n\t\t}\r\n\r\n\t\tif (count($expenses) > 0) {\r\n\t\t\t$xmlString .= \"\\t<expenses>\\n\";\r\n\r\n\t\t\tfor ($i = 0; $i < count($expenses); $i++) {\r\n\t\t\t\t$xmlString .= \"\\t\\t<expense ID=\\\"\".$expenses[$i]->ID.\"\\\" \";\r\n\t\t\t\t$xmlString .= \"spenderID=\\\"\".$expenses[$i]->spenderID.\"\\\" \";\r\n\r\n\t\t\t\t$xmlString .= \"accountableIDs=\\\"\";\r\n\t\t\t\tfor ($j = 0; $j < count($expenses[$i]->accountableIDs); $j++) {\r\n\t\t\t\t\t$xmlString .= $expenses[$i]->accountableIDs[$j];\r\n\r\n\t\t\t\t\tif ($j != count($expenses[$i]->accountableIDs)-1) {\r\n\t\t\t\t\t\t$xmlString .= \":\";\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t$xmlString .= \"\\\" \";\r\n\r\n\t\t\t\t$xmlString .= \"expenseDate=\\\"\".$expenses[$i]->expenseDate.\"\\\" \";\r\n\t\t\t\t$xmlString .= \"amount=\\\"\".$expenses[$i]->amount.\"\\\" \";\r\n\t\t\t\t$xmlString .= \"description=\\\"\".$expenses[$i]->description.\"\\\"\"; \r\n\r\n\t\t\t\tif ($expenses[$i]->deleted) {\r\n\t\t\t\t\t$xmlString .= \" state=\\\"DELETED\\\"\";\r\n\t\t\t\t}\r\n\r\n\t\t\t\t$xmlString .= \"/>\\n\";\r\n\t\t\t}\r\n\r\n\t\t\t$xmlString .= \"\\t</expenses>\\n\";\r\n\t\t}\r\n\r\n\t\t$xmlString .= \"</mshare>\\n\";\r\n\r\n\t\treturn $xmlString;\r\n\t}", "private function formatXml($response)\n {\n libxml_use_internal_errors(true);\n if (false === simplexml_load_string($response)) {\n return $response;\n }\n\n $domxml = new DOMDocument('1.0');\n $domxml->preserveWhiteSpace = false;\n $domxml->formatOutput = true;\n /* @var $xml SimpleXMLElement */\n $domxml->loadXML($response);\n return $domxml->saveXML();\n }", "private static function __print_xml_header(){\r\n\theader('Content-Type: text/xml');\r\n }", "public function xmlOutput()\n {\n return\n '<output>\n <answer>' . $this->answer . '</answer>\n <summary>' . htmlspecialchars($this->summary) . '</summary>\n </output>';\n }", "function get_statistics() {\n $response = $this->api_query(array('mode' => 'statistics'));\n\n if ($response['error']) {\n return false;\n }\n return ($response['data']);\n }", "public function getData() : ResponseInterface\n\t{\n\t\t$start = $this->statsAveragedUsageModel->getStart();\n\t\t$end = $this->statsAveragedUsageModel->getEnd();\n\t\t$format = $this->statsAveragedUsageModel->getFormat();\n\t\t$rating = $this->statsAveragedUsageModel->getRating();\n\n\t\t$formatter = $this->formatterFactory->createFor(\n\t\t\t$this->statsAveragedUsageModel->getLanguageId()\n\t\t);\n\n\t\t// Get usage data and sort by rank.\n\t\t$usageDatas = $this->statsAveragedUsageModel->getUsageDatas();\n\t\tuasort(\n\t\t\t$usageDatas,\n\t\t\tfunction (UsageData $a, UsageData $b) : int {\n\t\t\t\treturn $a->getRank() <=> $b->getRank();\n\t\t\t}\n\t\t);\n\n\t\t// Compile all usage data into the right form.\n\t\t$data = [];\n\t\tforeach ($usageDatas as $usageData) {\n\t\t\t$data[] = [\n\t\t\t\t'rank' => $usageData->getRank(),\n\t\t\t\t'name' => $usageData->getPokemonName(),\n\t\t\t\t'showMovesetLink' => $usageData->getMonths() > 0,\n\t\t\t\t'identifier' => $usageData->getPokemonIdentifier(),\n\t\t\t\t'icon' => $usageData->getFormIcon(),\n\t\t\t\t'usagePercent' => $formatter->formatPercent($usageData->getUsagePercent()),\n\t\t\t\t'raw' => $formatter->formatNumber($usageData->getRaw()),\n\t\t\t\t'rawPercent' => $formatter->formatPercent($usageData->getRawPercent()),\n\t\t\t\t'real' => $formatter->formatNumber($usageData->getReal()),\n\t\t\t\t'realPercent' => $formatter->formatPercent($usageData->getRealPercent()),\n\t\t\t];\n\t\t}\n\n\t\t// Navigation breadcrumbs.\n\t\t$breadcrumbs = [\n\t\t\t[\n\t\t\t\t'url' => '/stats',\n\t\t\t\t'text' => 'Stats',\n\t\t\t],\n\t\t\t[\n\t\t\t\t'text' => 'Formats',\n\t\t\t],\n\t\t\t[\n\t\t\t\t'text' => $format->getName(),\n\t\t\t],\n\t\t];\n\n\t\t$content = $this->renderer->render(\n\t\t\t'html/stats/averaged-usage.twig',\n\t\t\t$this->baseView->getBaseVariables() + [\n\t\t\t\t'start' => $start,\n\t\t\t\t'end' => $end,\n\t\t\t\t'format' => [\n\t\t\t\t\t'identifier' => $format->getIdentifier(),\n\t\t\t\t\t'name' => $format->getName(),\n\t\t\t\t],\n\t\t\t\t'rating' => $rating,\n\n\t\t\t\t'breadcrumbs' => $breadcrumbs,\n\n\t\t\t\t'ratings' => $this->statsAveragedUsageModel->getRatings(),\n\n\t\t\t\t'showLeadsLink' => $this->statsAveragedUsageModel->doesLeadsDataExist(),\n\n\t\t\t\t// The main data.\n\t\t\t\t'data' => $data,\n\t\t\t]\n\t\t);\n\n\t\treturn new HtmlResponse($content);\n\t}", "public function stats() {\n\n $user = new userModel();\n\n if(!$this->app->session->get('userID') ||\n !($user = $user->findFirst($this->app->session->get('userID')))) {\n return $this->generateResponse(401);\n }\n\n if(!($stats = $this->weight->stats($user))) {\n return $this->generateResponse(200, false, array('stats' => false));\n }\n\n $data[] = ['id' => $user->user_id,\n 'accountCreated' => $user->account_created,\n 'weightToTarget' => ($stats['currentWeight']['weight'] -\n $user->target_weight),\n 'targetWeight' => $user->target_weight,\n 'startWeight' => $stats['startWeight'],\n 'maxWeight' => $stats['maxWeight'],\n 'minWeight' => $stats['minWeight'],\n 'averageWeight' => $stats['averageWeight'],\n 'maxUnderweightWeight' => $stats['maxUnderweightWeight'],\n 'maxNormalWeight' => $stats['maxNormalWeight'],\n 'maxOverweightWeight' => $stats['maxOverweightWeight'],\n 'currentWeight' => $stats['currentWeight'],\n 'changeLastWeek' => $stats['changeLastWeek'],\n 'changeLastMonth' => $stats['changeLastMonth'],\n 'changeLastYear' => $stats['changeLastYear'],\n 'changeGreatest' => $stats['changeGreatest'],\n 'dateToTarget' => $stats['dateToTarget']];\n\n $this->response = array('stats' => $data);\n\n return $this->generateResponse();\n\n }", "private function generateXMLReport() {\n\t\t// Adds Date Block.\n\t\t$this->XML_addDate();\n\n\t\t// Adds Resource Block.\n\t\t$this->XML_addResource($this->taskResultSet->getResourceURL(), $this->taskResultSet->getResourceIP(), $this->taskResultSet->getServerBanner() );\n\n\t\t// Adds Complex Security Level Block.\n\t\t$this->XML_addSecurityLevel($this->securityLevel);\n\n\t\t// Adds block which contains Info about tested vulnerabilities.\n\t\t$this->XML_addTestedVulnerabilities();\n\n\t\t// Adds block which contains details about scan.\n\t\t$this->XML_addScanDetails();\n\n\t\t// Adds all blocks in the general xml-container.\n\t\t$this->xmlHandler->appendChild($this->xmlRoot);\n\n\t\t// Generating and saving the XML File.\n\t\t$xmlReportFilePath = $this->savePath . DIRECTORY_SEPARATOR . $this->generateReportFilePrefix() . '.xml';\n\n\n\t\t$xmlReportFileLink = 'http://' . $_SERVER['HTTP_HOST'] . '/' . $xmlReportFilePath;\n\t\t$xmlReportFileLink = str_replace('\\\\', '/', $xmlReportFileLink);\n\n\n\t\t$this->xmlHandler->save($xmlReportFilePath);\n\n\t\treturn $xmlReportFileLink;\n\t}", "public function getXml() {}", "private function xml()\n {\n $xml = Array2XML::createXML('rastreio', $this->data);\n return $xml->saveXML();\n }", "public function parse(LSF_View_Node $view)\n\t{\n\t\t$root = $this->_document->createElement('response');\n\t\t$this->parse_r($view, $root);\n\t\t$this->_document->appendChild($root);\n\t\t\n\t\tif (extension_loaded('xhprof') && LSF_Config::get('enable_profiling') && LSF_Config::get('xhprof_lib_dir'))\n\t\t{\n\t\t\t$profilerNamespace = LSF_Config::get('application_name') ? LSF_Config::get('application_name') : 'LSF'; // namespace for your application\n\t\t\t$xhprofData = xhprof_disable();\n\t\t\t$xhprofRuns = new XHProfRuns_Default();\n\t\t\t$runId = $xhprofRuns->save_run($xhprofData, $profilerNamespace);\n\t\t\t\n\t\t\tif (LSF_Config::get('xhprof_ui_url'))\n\t\t\t{\n\t\t\t\t$profilerUrl = LSF_Config::get('xhprof_ui_url') . '/index.php?run=' . $runId . '&source=' . $profilerNamespace;\n\t\t\t\t$root->setAttribute('profileUrl', htmlspecialchars($profilerUrl, ENT_COMPAT, 'UTF-8'));\n\t\t\t\tLSF_Application::disableProfiling();\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn $this->_document->saveXml();\n\t}", "protected function prepareOutput($status, array $data)\n {\n $error = isset($data['error']) ? $data['error'] : '';\n\n return \"<?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\"?><response><status>{$status}</status><error>{$error}</error><data/></response>\";\n\n }", "public function getRawStats()\n\t{\n\t\t$this->team = factory(Team::class)->create();\n\t\t$this->event = factory(Event::class)->create(['owner_id' => $this->team->id]);\n\t\tfactory(TeamMember::class, 2)->create(['team_id' => $this->team->id, 'user_id' => 0]);\n\n\t\t$this->data = [\n\t\t\t'event'\t=> $this->event,\n\t\t\t'meta'\t=> ['test' => 123],\n\t\t\t'stats'\t=> [\n\t\t\t\t['id' => 0, 'member_id' => 1, 'gs' => true, 'pts' => 12, 'ast' => 6, 'reb' => 8],\n\t\t\t\t['id' => 0, 'member_id' => 2, 'gs' => false, 'pts' => 42, 'ast' => 2, 'reb' => 3],\n\t\t\t],\n\t\t];\n\t}", "public function output(){\n header('Content-type: text/xml');\n echo $this->getDocument();\n }", "private function response_xml($array) {\n require_once 'array2xml.php';\n try {\n// header(\"Content-type: text/xml\");\n $xml = new array2xml('my_node');\n $xml->createNode($array);\n return $xml;\n } catch (Exception $e) {\n return $e->getMessage();\n }\n }", "public function getXML($value=null) {\r\n if ($value==null) {\r\n $value = $this->getChart();\r\n }\r\n\r\n $stream = new ByteArrayOutputStream();\r\n $this->toXML($value, $stream);\r\n return new String($stream->toByteArray());\r\n }", "public function outputXML($raw = false)\r\n\t{\r\n\t\tif ($raw) {\r\n\t\t\treturn $this->fusionChart->getXML();\r\n\t\t}\r\n\r\n\t\t// Output a BOM and xml header\r\n\t\t// http://docs.fusioncharts.com/charts/contents/advanced/special-chars/SpChar.html\r\n\t\treturn pack(\"C3\", 0xef, 0xbb, 0xbf) . '<?xml version=\"1.0\" encoding=\"utf-8\" ?>' . $this->fusionChart->getXML();\r\n\t}", "public function output() {\n header('Content-Type: application/xml');\n $dom = new \\DOMDocument('1.0');\n $dom->preserveWhiteSpace = false;\n $dom->formatOutput = true;\n $dom->loadXML($this->xml->asXML());\n echo $dom->saveXML();\n }", "public function saveAsXml($filename)\n {\n return $this->response->asXML($filename);\n }", "function getPOXResponse() {\n return '<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<imsx_POXEnvelopeResponse xmlns=\"http://www.imsglobal.org/services/ltiv1p1/xsd/imsoms_v1p0\">\n <imsx_POXHeader>\n <imsx_POXResponseHeaderInfo>\n <imsx_version>V1.0</imsx_version>\n <imsx_messageIdentifier>%s</imsx_messageIdentifier>\n <imsx_statusInfo>\n <imsx_codeMajor>%s</imsx_codeMajor>\n <imsx_severity>status</imsx_severity>\n <imsx_description>%s</imsx_description>\n <imsx_messageRefIdentifier>%s</imsx_messageRefIdentifier>\n </imsx_statusInfo>\n </imsx_POXResponseHeaderInfo>\n </imsx_POXHeader>\n <imsx_POXBody>%s\n </imsx_POXBody>\n</imsx_POXEnvelopeResponse>';\n}", "public function getResponseXML()\n\t{\n\t\treturn $this->response_xml;\n\t}", "public function xmlindex()\n\t{\n \t$view = view('sitemap.xmlindex')->with([\n 'projects' => $this->projectRepo->all()\n ]);\n return response($view, '200')->header('Content-Type', 'text/xml');\n }", "public function getStatistics() {\n return $this->statisticData;\n }", "function wpcom_vip_get_stats_xml( $table = 'views', $end_date = false, $num_days = 1, $and = '', $limit = 5, $summarize = NULL ) {\n _deprecated_function( __FUNCTION__, '2.0.0' );\n\n\treturn null;\n}", "private function generateXml()\n {\n\n $args = array(\n\n 'posts_per_page' => -1,\n 'numberposts' => -1,\n 'orderby' => 'post_type',\n 'order' => 'DESC',\n 'post_type' => apply_filters('fpcms_sitemap_post_types', array('post', 'page'))\n\n );\n\n if ($results = get_posts($args)) {\n\n $sitemap = new \\SimpleXMLElement($this->getDocStructure());\n\n foreach ($results as $result) {\n\n $url = $sitemap->addChild('url');\n $url->addChild('loc', get_permalink($result->ID));\n\n if (has_post_thumbnail($result->ID)) {\n\n if ($image = wp_get_attachment_image_src(get_post_thumbnail_id($result->ID))) {\n $url->addChild('image:image', $image[0]);\n }\n\n }\n\n $url->addChild('lastmod', mysql2date('Y-m-d', $result->post_date_gmt));\n\n if ($result->post_type == 'page') {\n\n //Pages should display higher than posts for the same keyword\n $url->addChild('priority', apply_filters('fpcms_sitemap_page_priority', '0.7'));\n\n } else {\n\n $url->addChild('priority', apply_filters('fpcms_sitemap_post_priority', '0.4'));\n\n }\n\n }\n\n return $sitemap->asXML();\n\n }\n\n }", "protected function parseResponseToXML($response)\n {\n return simplexml_load_string($response->getBody()->getContents());\n }", "function xmlbody(){\n\t\t$this->xm(\"<generalinfo>\");\n\t\t$this->p(\"name\",$_SERVER['SERVER_NAME']);\n\t\t$this->p(\"ip_addr\",$_SERVER['SERVER_ADDR'].\":\".$_SERVER['SERVER_PORT']);\n\t\t$this->p(\"host\", $_ENV['HOSTNAME']);\n\t\t$this->p(\"certauth\",$_SERVER['SSL_SERVER_S_DN_OU']);\n\t\t$this->p(\"referer\",$_SERVER ['HTTP_REFERER']);\n\t\t$this->p(\"time\",gmstrftime(\"%b %d %Y %H:%M:%S\").\" GMT\");\n\t\t$this->p(\"apache_admin\",$_SERVER['SERVER_ADMIN']);\n\t\t$this->xm(\"</generalinfo>\");\n\n\t\t// get medcommmons parameters about this instance of central\n\t\t$this->xm(\"<mcinfo>\");\n\t\t$this->p(\"sw_version\",$GLOBALS[\"SW_Version\"]);\n\t\t$this->p(\"sw_revision\",$GLOBALS[\"SW_Revision\"]);\n\t\t$this->p(\"db_connection\",$GLOBALS[\"DB_Connection\"]);\n\t\t$this->p(\"db_database\",$GLOBALS[\"DB_Database\"]);\n\t\t$this->p(\"default_repository\", $GLOBALS['Default_Repository']);\n\t\t$this->xm(\"</mcinfo>\");\n\n\t\t// get record counts from interesting tables\n\t\t$this->xm(\"<tableinfo>\");\n\t\t//\t\tz(\"hipaa\");\n\t\t//\tz(\"hipaa_trace\");\n\t\t$this->z(\"user\");\n\t\t// moved these tables to another database, really should reconnect to the other db to get them\n\n\t\t//\t\tz(\"faxstatus\");\n\t\t//\t\tz(\"ccstatus\");\n\t\t//\t\tz(\"emailstatus\");\n\n\t\t$this->xm(\"</tableinfo>\");\n\t\t$count++;\n\t\t//\n\t\t// return outputs\n\t\t//\n\t\t$this->xmfield(\"status\",\"ok\");\n\t}", "public function getStats()\n {\n return $this->result->getStats();\n }", "function outputStats(){\n if(preg_match(\"/^[0-9]{4}-[0-9]{2}-[0-9]{2}$/\", $_REQUEST[\"date\"]))\n $myDate = htmlentities(mysql_real_escape_string($_REQUEST[\"date\"]));\n else {\n print \"<stats/>\";\n exit;\n }\n\n printf(\"<?xml version=\\\"1.0\\\" encoding=\\\"utf-8\\\" ?><stats date=\\\"%s\\\">\\n\", $myDate);\n\n // different groups to sort by (layout, content, JS, Firefox, GFX, networking)\n // \"where\" clauses to use in the queries below\n $myGroups = array(\"Layout\" => \"d.product='Core' AND (d.component LIKE 'layout%' OR d.component LIKE 'printing%' OR d.component IN ('Style System (CSS)'))\", \n \"JavaScript\" => \"d.product='Tamarin' OR (d.product='Core' AND d.component LIKE 'javascript%')\",\n \"Content\" => \"d.product='Core' AND (d.component LIKE 'DOM%' OR d.component in ('Document Navigation','Editor','Embedding: Docshell','Event Handling','HTML: Form Submission','HTML: Parser','Java: OJI','Plug-ins','RDF','Security','Security: CAPS','Selection','Serializers','Spelling checker','String','SVG','Video/Audio','Web Services','XBL','XML','XPCOM','XPConnect','XSLT','XUL'))\",\n \"GFX\" => \"d.product='Core' AND (d.component LIKE 'GFX%' OR d.component LIKE 'widget%' OR d.component in ('ImageLib','MathML','Graphics'))\",\n \"Frontend\" => \"d.product='Firefox' OR d.product='Toolkit' OR (d.product='Core' AND (d.component in ('Security: UI')))\",\n \"Networking\" => \"d.product='Core' AND d.component like 'Networking%'\",\n \"Mail\" => \"d.product='MailNews Core' OR d.product='Thunderbird' OR (d.product='Core' AND (d.component like 'Mail%' OR d.component in ('Security: S/MIME')))\",\n );\n\n // take the inverse of the previous sets of bugs to generate the \"Other\" category\n $other = \"\";\n foreach ($myGroups as $group => $condition) {\n if ($condition == end($myGroups))\n $other .= \"NOT (\" . $condition . \")\";\n else\n $other .= \"NOT (\" . $condition . \") AND \";\n }\n $myGroups[\"Other\"] = $other;\n\n \n // different severities to display\n $mySeverities = array(\"sg_critical\", \"sg_high\", \"sg_moderate\", \"sg_low\");\n\n foreach($myGroups as $gName => $gClause){\n print \"<stat>\";\n // store total number of bugs for this group\n $groupBugs = 0;\n foreach($mySeverities as $s){\n // store the count of total bugs for this (group, severity) as well as\n // combined list of bugs and total age of bugs\n $bugCount = 0;\n $bugLists = array();\n $bugAgeDays = 0;\n\n $sql = sprintf(\"select d.did, s.category, d.product, d.component, d.count, d.bug_list, d.avg_age_days from Details d, Stats s where d.sid=s.sid and d.date like '%s%%' and (%s) and s.category='%s';\", $myDate, $gClause, $s);\n if($_GET[\"sql\"] == 1)\n printf(\"<sql>%s</sql>\", $sql);\n $result = mysql_query($sql);\n while($row = mysql_fetch_assoc($result)){\n $bugCount += $row[\"count\"];\n $groupBugs += $row[\"count\"];\n array_push($bugLists, $row[\"bug_list\"]);\n $bugAgeDays += $row[\"count\"]*$row[\"avg_age_days\"];\n }\n // output the stats for this (group, severity)\n if (count($bugLists) == 0)\n $avgAge = 0;\n else\n $avgAge = round($bugAgeDays/$bugCount);\n \n printf(\"<%s avg_age_days=\\\"%s\\\" bug_list=\\\"%s\\\">%s</%s>\", $s, $avgAge, implode(\",\", $bugLists), $bugCount, $s);\n }\n printf(\"<group total=\\\"%s\\\">%s</group>\", $groupBugs, $gName);\n print \"</stat>\";\n }\n \n print \"</stats>\\n\";\n}", "public function publish()\n {\n header('Content-Type: text/xml');\n header('Content-Length: '.strlen($this->_result));\n exit($this->_result);\n }", "public function teamStatistics(): Response\n {\n return $this->call('statistics/team');\n }", "protected function renderStats() {\n\t\t$stats = WCF::getCache()->get('stat');\n\t\tWCF::getTPL()->assign('stats', $stats);\n\t}", "public function toXML() {\n\t\t$xml = '<' . $this->type . '>' . PHP_EOL;\n\t\t$xml .= ' <ids>' . PHP_EOL;\n\t\tforeach ($this->ids as $id) {\n\t\t\t$xml .= ' <id>' . $id . '</id>' . PHP_EOL;\n\t\t}\n\t\t$xml .= ' </ids>' . PHP_EOL;\n\t\t$xml .= '</' . $this->type . '>' . PHP_EOL;\n\t\treturn $xml;\n\t}", "public function getStats() {}", "public function create_xml()\n {\n $email = Session::get('d_email');\n\n $data = Gpi::select('lat','long','adress','created_at')->orderBy('id','DESC')->where('email',$email)->whereDate('created_at','=', date('Y-m-d'))->get();\n // header(\"Content-type: text/xml\");\n // echo \"<markers>\\n\";\n\n // // Iterate through the rows, printing XML nodes for each\n // for($i=0;$i<count($data);$i++){\n // // ADD TO XML DOCUMENT NODE\n // echo '<marker ';\n // echo 'lat=\"' . $data[$i]->lat . '\" ';\n // echo 'lng=\"' . $data[$i]->long . '\" ';\n // echo 'adress=\"' . $data[$i]->adress . '\" ';\n // echo 'datetime=\"' . $data[$i]->created_at . '\" ';\n // echo \"/>\\n\";\n // }\n\n // // End XML file\n // echo '</markers>';\n $xml = new \\XMLWriter();\n $xml->openMemory();\n $xml->startDocument();\n $xml->startElement('markers');\n foreach($data as $user) {\n $xml->startElement('marker');\n $xml->writeAttribute('lat', $user->lat);\n $xml->writeAttribute('lng', $user->long);\n $xml->writeAttribute('adress', $user->adress);\n $xml->writeAttribute('datetime', $user->created_at);\n $xml->endElement();\n }\n $xml->endElement();\n $xml->endDocument();\n\n $content = $xml->outputMemory();\n $xml = null;\n\n return response($content)->header('Content-Type', 'text/xml');\n \n }", "public function GetXML() {\n $xml = '<?xml version=\"1.0\" encoding=\"utf-8\"?><getAuthorization>';\n $xml .= \"<Version>$this->version</Version>\";\n $xml .= \"<Processor>$this->processor</Processor>\";\n $xml .= \"<MerchantID>$this->merchantID</MerchantID>\";\n if (!IsNullOrEmptyString($this->terminalID))\n $xml .= \"<TerminalID>$this->terminalID</TerminalID>\";\n $xml .= \"<TransType>$this->transType</TransType>\";\n $xml .= \"<TrAmount>$this->trAmount</TrAmount>\";\n if ($this->transType == '4' || $this->transType == 4)\n $xml .= \"<NewAmount>$this->newAmount</NewAmount>\";\n $xml .= \"<TrCurrency>$this->trCurrency</TrCurrency>\";\n $xml .= \"<DateAndTime>$this->dateAndTime</DateAndTime>\";\n if (!IsNullOrEmptyString($this->PAN))\n $xml .= \"<PAN>$this->PAN</PAN>\";\n if (!IsNullOrEmptyString($this->expDate))\n $xml .= \"<ExpDate>$this->expDate</ExpDate>\";\n if (!IsNullOrEmptyString($this->track1))\n $xml .= \"<Track1>$this->track1</Track1>\";\n if (!IsNullOrEmptyString($this->track2))\n $xml .= \"<Track2>$this->track2</Track2>\";\n $xml .= \"<RRN>$this->RRN</RRN>\";\n if (!IsNullOrEmptyString($this->authCode))\n $xml .= \"<AuthCode>$this->authCode</AuthCode>\";\n if (!IsNullOrEmptyString($this->CVC2))\n $xml .= \"<CVC2>$this->CVC2</CVC2>\";\n if (!IsNullOrEmptyString($this->securityLevelInd))\n $xml .= \"<SecurityLevelInd>$this->securityLevelInd</SecurityLevelInd>\";\n if (!IsNullOrEmptyString($this->UCAF))\n $xml .= \"<UCAF>$this->UCAF</UCAF>\";\n if (!IsNullOrEmptyString($this->CAVV))\n $xml .= \"<CAVV>$this->CAVV</CAVV>\";\n if (!IsNullOrEmptyString($this->XID))\n $xml .= \"<XID>$this->XID</XID>\";\n if (!IsNullOrEmptyString($this->merchantName))\n $xml .= \"<MerchantName>$this->merchantName</MerchantName>\";\n if (!IsNullOrEmptyString($this->merchantCity))\n $xml .= \"<MerchantCity>$this->merchantCity</MerchantCity>\";\n if (!IsNullOrEmptyString($this->merchantCountry))\n $xml .= \"<MerchantCountry>$this->merchantCountry</MerchantCountry>\";\n $xml .= \"</getAuthorization>\";\n return $xml;\n }", "public function afficherXML(){\n echo\"<humidite>\";\n\n echo\"<moyenne>\".$this->moyenne.\"</moyenne>\";\n echo\"<max>\".$this->max.\"</max>\";\n echo\"<min>\".$this->min.\"</min>\";\n echo\"<nombreHumiditeReference>\".$this->nombreHumiditeReference.\"</nombreHumiditeReference>\";\n echo\"<date>\".$this->date.\"</date>\";\n\n echo\"</humidite>\";\n }", "static function array2XML($array, $root = 'response') {\n $xml = new XML();\n $xml->open($root);\n $xml->element('Soon', 'Available');\n $xml->close();\n \n echo $xml->getXML();\n }", "public function receiveResponseXML($object);", "public function show() {\n header(\"Content-type: application/xml\");\n echo $this->_getXml();\n exit();\n }", "public function getStatistics(): array\n {\n return $this->statistics;\n }", "Public Function getStats($Date = '')\n\t{\n\t\tif($Date == '')\n\t\t{\n\t\t\t$Date = date('Y-m-d');\n\t\t}\n\t\t\n\t\tunlink(sys_get_temp_dir().'/cookiemonster'.md5($this->publisherLogin).'.txt');\n\t\t\n\t\tif (!$this->login()) {\n\t\t\treturn null;\n\t\t}\n\t\t\n\t\t$clicksUrl = 'https://secure.essociate.com/my/stats_export/essoc_'.date('d', strtotime($Date)).'_3_'.date('m', strtotime($Date)).'_'.date('Y', strtotime($Date)).'_default.csv?Day='.date('d', strtotime($Date)).'&ExportTable=3&Month='.date('m', strtotime($Date)).'&Year='.date('Y', strtotime($Date)).'&do=default&Export=csv';\t\t\n\t\t$conversionsUrl = 'https://secure.essociate.com/my/stats_export/essoc_'.date('d', strtotime($Date)).'_2_'.date('m', strtotime($Date)).'_'.date('Y', strtotime($Date)).'_default.csv?Day='.date('d', strtotime($Date)).'&ExportTable=2&Month='.date('m', strtotime($Date)).'&Year='.date('Y', strtotime($Date)).'&do=default&Export=csv';\n\n\t\t$clicksData = $this->getUrlData($clicksUrl);\n\t\t$conversionsData = $this->getUrlData($conversionsUrl);\n\t\t\n\t\t$clicksArray = $this->csvToArray($clicksData);\n\t\t$conversionsArray = $this->csvToArray($conversionsData);\n\n\t\t$TotalClicks = 0;\n\t\t$TotalPayout = 0;\n\t\t$TotalConversions = 0;\n\t\t\n\t\t$Output = new StatEnvelope($Date);\n\t\t\n\t\tforeach ($clicksArray as $clicks) {\n\t\t\t$OfferID = $clicks[0];\n\t\t\t$Clicks = $clicks[1];\n\t\t\t$Payout = 0;\n\t\t\t$Conversions = 0;\n\t\t\t$SubID = '';\n\t\t\t\n\t\t\tforeach ($conversionsArray as $conversions) {\n\t\t\t\tif ($conversions[0]==$clicks[0]) {\n\t\t\t\t\t$Conversions = $conversions[1];\n\t\t\t\t\t$Payout = $conversions[2];\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t$TempStat = new Stat($Clicks, $Conversions, $Payout, $SubID, $OfferID);\n\t\t\t$Output->addStatObject($TempStat);\n\t\t}\n\t\t\n\t\treturn $Output;\n\t}", "protected function outputXml($xml)\n\t{\n\t\t$response = $this->getResponse();\n\t\t$response->setHeader('Content-Type', 'application/xml');\n\n\t\tif($xml instanceof SimpleXMLElement)\n\t\t\t$response->appendBody($xml->asXML());\n\t\telse {\n\t\t\t$xml = trim($xml);\n\t\t\tif(substr($xml, 0, 5) != '<?xml')\n\t\t\t\t$xml = '<?xml version=\"1.0\" encoding=\"UTF-8\" ?>' . $xml;\n\n\t\t\t$response->appendBody($xml);\n\t\t}\n\t}", "function apsa_ajax_get_element_statistics() {\n\n $from = $_POST[\"from\"];\n if (empty($from)) {\n $from = FALSE;\n }\n\n $to = $_POST[\"to\"];\n if (empty($to)) {\n $to = FALSE;\n }\n\n $element_id = $_POST[\"element_id\"];\n\n $statistics = apsa_get_element_statistics($element_id, $from, $to);\n\n echo json_encode($statistics);\n\n wp_die();\n}", "public function getStatistics()\n {\n return $this->statistics;\n }", "function get_traffic ()\n\t{\n\t\t$results['ranking'] = trim((string)$this->results->dmn->metrics->val->uv->ranking);\n\t\t\n\t\t/* $results['count'] = trim((string)$this->results->dmn->metrics->val->uv->count);\n\t\t$results['count_int'] = (int)implode('', explode(',', $results['count']));\n\t\t\n\t\t$results['link'] = trim((string)$this->results->dmn->metrics->link);\n\t\t$results['icon'] = trim((string)$this->results->dmn->metrics->icon); */\n\t\t$results['ranking'] = str_replace(\",\",\"\", $results['ranking']);\n\t\treturn($results);\n\t}", "public function displayXML()\n\t{\n\t\techo \"<pre>\";\n\t\tprint_r($this->haloXML);\n\t\techo \"</pre>\";\n\t}", "public function toXML()\n {\n $xmlString = \"<?xml version=\\\"1.0\\\"?><conversion></conversion>\";\n $xml = new \\SimpleXMLElement($xmlString);\n\n if (isset($this->timestamp)) {\n $xml->addChild(\"timestamp\", $this->timestamp);\n }\n if (isset($this->timestamp_sql)) {\n $xml->addChild(\"timestamp_sql\", $this->timestampSql);\n }\n if (isset($this->contact_id)) {\n $xml->addChild(\"contact_id\", $this->contactId);\n }\n if (isset($this->contact_email)) {\n $xml->addChild(\"contact_email\", $this->contactEmail);\n }\n if (isset($this->contact_external_id)) {\n $xml->addChild(\"contact_external_id\", $this->contactExternalId);\n }\n if (isset($this->value)) {\n $xml->addChild(\"value\", $this->value);\n }\n if (isset($this->mailing_sent_date)) {\n $xml->addChild(\"mailing_sent_date\", $this->mailingSentTimestamp);\n }\n if (isset($this->mailing_sent_date_sql)) {\n $xml->addChild(\"mailing_sent_date_sql\", $this->mailingSentTimestampSql);\n }\n if (isset($this->mailing_id)) {\n $xml->addChild(\"mailing_id\", $this->mailingId);\n }\n if (isset($this->mailing_name)) {\n $xml->addChild(\"mailing_name\", $this->mailingName);\n }\n if (isset($this->site_id)) {\n $xml->addChild(\"site_id\", $this->siteId);\n }\n if (isset($this->site_name)) {\n $xml->addChild(\"site_name\", $this->siteName);\n }\n if (isset($this->goal_id)) {\n $xml->addChild(\"goal_id\", $this->goalId);\n }\n if (isset($this->goal_name)) {\n $xml->addChild(\"goal_name\", $this->goalName);\n }\n if (isset($this->link_id)) {\n $xml->addChild(\"link_id\", $this->linkId);\n }\n if (isset($this->link_url)) {\n $xml->addChild(\"link_url\", $this->linkUrl);\n }\n\n return $xml;\n }", "public function stats()\n\t{\n\t\t$stat = View::factory('profiler/stats');\n\t\t// echo $stat;\n\t}", "public function statistics()\n {\n $places = $this->placeRepository->makeModel();\n\n $confirmed_places = $places->where('confirmed', true)->count();\n $unconfirmed_places = $places->where('confirmed', false)->count();\n $trashed_places = $places->onlyTrashed()->count();\n\n $clients = $this->clientRepository->all()->count();\n $admins = $this->userRepository->all()->count();\n $oracles = $this->oracleUserRepository->all()->count();\n\n $owner_requests = $this->ownerRequestRepository->all()->count();\n $advertisers = $this->advertiserRepository->all()->count();\n $service_ads = $this->adRepository->all()->count();\n\n $data = [\n 'confirmed_places' => $confirmed_places,\n 'unconfirmed_places' => $unconfirmed_places,\n 'trashed_places' => $trashed_places,\n 'clients' => $clients,\n 'admins' => $admins,\n 'oracles' => $oracles,\n 'owner_requests' => $owner_requests,\n 'advertisers' => $advertisers,\n 'service_ads' => $service_ads\n ];\n\n if (request()->wantsJson()) {\n\n return response()->json($data);\n }\n }", "private function stat_response_object() {\n\t\t\t$stats = ( new WpProQuiz_Model_StatisticMapper() )->fetchAllByRef( $this->current()->getStatisticRefId() );\n\t\t\t$stat_response = new stdClass();\n\t\t\t$stat_response->id = $this->current()->getStatisticRefId();\n\t\t\t$stat_response->quiz = $this->getQuizId();\n\t\t\t$stat_response->user = $this->current()->getUserId();\n\t\t\t$stat_response->date = mysql_to_rfc3339( wp_date( 'Y-m-d H:i:s', $this->current()->getCreateTime() ) ); //phpcs:ignore PHPCompatibility.Extensions.RemovedExtensions.mysql_DeprecatedRemoved\n\t\t\t$stat_response->answers_correct = $this->get_count( $stats, 'getCorrectCount' );\n\t\t\t$stat_response->answers_incorrect = $this->get_count( $stats, 'getIncorrectCount' );\n\t\t\t$stat_response->points_scored = $this->get_count( $stats, 'getPoints' );\n\t\t\t$stat_response->points_total = (int) $this->current()->getMapper()->fetchTotalPoints( $this->current()->getStatisticRefId() );\n\n\t\t\treturn $stat_response;\n\t\t}", "function printResults($us) \r\n{\r\n \theader('Content-type:text/xml;charset=\"utf-8\"');\r\n \t$xmlDoc = new MiniXMLDoc();\r\n \t$xmlRoot =& $xmlDoc->getRoot();\r\n \t$resultadosGenerales =& $xmlRoot->createChild('resultadosGenerales');\r\n\t$resultadosGenerales->attribute('resultado', 1); \r\n\t\r\n\t$op_tipo =& $resultadosGenerales->createChild('tipo');\r\n\t$op_tipo->text($us->getTipo());\r\n\t\r\n\t$op_usuario =& $resultadosGenerales->createChild('usuario');\r\n\t$op_usuario->text($us->getUsuario());\r\n\t\r\n\t$op_clave =& $resultadosGenerales->createChild('clave');\r\n\t$op_clave->text($us->getClave());\r\n\t\r\n\tprint html_entity_decode($xmlDoc->toString(MINIXML_NOWHITESPACES));\r\n}", "public function get_stats()\n { \n $sql = \"SELECT COUNT(CASE WHEN `status` = 'Enabled' THEN 1 END) AS 'Enabled',\n COUNT(CASE WHEN `status` = 'Disabled' THEN 1 END) AS 'Disabled'\n FROM findmymac\n LEFT JOIN reportdata USING (serial_number)\n \".get_machine_group_filter();\n\n $queryobj = new Findmymac_model();\n $out = [];\n foreach($queryobj->query($sql)[0] as $label => $value){\n $out[] = ['label' => $label, 'count' => $value];\n }\n \n jsonView($out);\n }", "function toXML()\n\t{\n\t\tinclude_once(\"./Services/Xml/classes/class.ilXmlWriter.php\");\n\t\t$a_xml_writer = new ilXmlWriter;\n\t\t// set xml header\n\t\t$a_xml_writer->xmlHeader();\n\t\t$attrs = array(\n\t\t\t\"xmlns:xsi\" => \"http://www.w3.org/2001/XMLSchema-instance\",\n\t\t\t\"xsi:noNamespaceSchemaLocation\" => \"http://www.ilias.de/download/xsd/ilias_survey_4_2.xsd\"\n\t\t);\n\t\t$a_xml_writer->xmlStartTag(\"surveyobject\", $attrs);\n\t\t$attrs = array(\n\t\t\t\"id\" => $this->getSurveyId(),\n\t\t\t\"title\" => $this->getTitle()\n\t\t);\n\t\t$a_xml_writer->xmlStartTag(\"survey\", $attrs);\n\t\t\n\t\t$a_xml_writer->xmlElement(\"description\", NULL, $this->getDescription());\n\t\t$a_xml_writer->xmlElement(\"author\", NULL, $this->getAuthor());\n\t\t$a_xml_writer->xmlStartTag(\"objectives\");\n\t\t$attrs = array(\n\t\t\t\"label\" => \"introduction\"\n\t\t);\n\t\t$this->addMaterialTag($a_xml_writer, $this->getIntroduction(), TRUE, TRUE, $attrs);\n\t\t$attrs = array(\n\t\t\t\"label\" => \"outro\"\n\t\t);\n\t\t$this->addMaterialTag($a_xml_writer, $this->getOutro(), TRUE, TRUE, $attrs);\n\t\t$a_xml_writer->xmlEndTag(\"objectives\");\n\n\t\tif ($this->getAnonymize())\n\t\t{\n\t\t\t$attribs = array(\"enabled\" => \"1\");\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$attribs = array(\"enabled\" => \"0\");\n\t\t}\n\t\t$a_xml_writer->xmlElement(\"anonymisation\", $attribs);\n\t\t$a_xml_writer->xmlStartTag(\"restrictions\");\n\t\tif ($this->getAnonymize() == 2)\n\t\t{\n\t\t\t$attribs = array(\"type\" => \"free\");\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$attribs = array(\"type\" => \"restricted\");\n\t\t}\n\t\t$a_xml_writer->xmlElement(\"access\", $attribs);\n\t\tif ($this->getStartDate())\n\t\t{\n\t\t\t$attrs = array(\"type\" => \"date\");\t\t\t\n\t\t\tpreg_match(\"/(\\d{4})(\\d{2})(\\d{2})(\\d{2})(\\d{2})(\\d{2})/\", $this->getStartDate(), $matches);\n\t\t\t$a_xml_writer->xmlElement(\"startingtime\", $attrs, sprintf(\"%04d-%02d-%02dT%02d:%02d:00\", $matches[1], $matches[2], $matches[3], $matches[4], $matches[5], $matches[6]));\n\t\t}\n\t\tif ($this->getEndDate())\n\t\t{\n\t\t\t$attrs = array(\"type\" => \"date\");\n\t\t\tpreg_match(\"/(\\d{4})(\\d{2})(\\d{2})(\\d{2})(\\d{2})(\\d{2})/\", $this->getEndDate(), $matches);\n\t\t\t$a_xml_writer->xmlElement(\"endingtime\", $attrs, sprintf(\"%04d-%02d-%02dT%02d:%02d:00\", $matches[1], $matches[2], $matches[3], $matches[4], $matches[5], $matches[6]));\n\n\t\t}\n\t\t$a_xml_writer->xmlEndTag(\"restrictions\");\n\t\t\n\t\t// constraints\n\t\t$pages =& $this->getSurveyPages();\n\t\t$hasconstraints = FALSE;\n\t\tforeach ($pages as $question_array)\n\t\t{\n\t\t\tforeach ($question_array as $question)\n\t\t\t{\n\t\t\t\tif (count($question[\"constraints\"]))\n\t\t\t\t{\n\t\t\t\t\t$hasconstraints = TRUE;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\tif ($hasconstraints)\n\t\t{\n\t\t\t$a_xml_writer->xmlStartTag(\"constraints\");\n\t\t\tforeach ($pages as $question_array)\n\t\t\t{\n\t\t\t\tforeach ($question_array as $question)\n\t\t\t\t{\n\t\t\t\t\tif (count($question[\"constraints\"]))\n\t\t\t\t\t{\n\t\t\t\t\t\t// found constraints\n\t\t\t\t\t\tforeach ($question[\"constraints\"] as $constraint)\n\t\t\t\t\t\t{\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t$attribs = array(\n\t\t\t\t\t\t\t\t\"sourceref\" => $question[\"question_id\"],\n\t\t\t\t\t\t\t\t\"destref\" => $constraint[\"question\"],\n\t\t\t\t\t\t\t\t\"relation\" => $constraint[\"short\"],\n\t\t\t\t\t\t\t\t\"value\" => $constraint[\"value\"],\n\t\t\t\t\t\t\t\t\"conjunction\" => $constraint[\"conjunction\"]\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t$a_xml_writer->xmlElement(\"constraint\", $attribs);\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$a_xml_writer->xmlEndTag(\"constraints\");\n\t\t}\n\t\t\n\t\t// add the rest of the preferences in qtimetadata tags, because there is no correspondent definition in QTI\n\t\t$a_xml_writer->xmlStartTag(\"metadata\");\n\n\t\t$custom_properties = array();\n\t\t$custom_properties[\"evaluation_access\"] = $this->getEvaluationAccess();\n\t\t$custom_properties[\"status\"] = $this->getStatus();\n\t\t$custom_properties[\"display_question_titles\"] = $this->getShowQuestionTitles();\n\t\t$custom_properties[\"pool_usage\"] = (int)$this->getPoolUsage();\n\t\t\n\t\t$custom_properties[\"own_results_view\"] = (int)$this->hasViewOwnResults();\n\t\t$custom_properties[\"own_results_mail\"] = (int)$this->hasMailOwnResults();\n\t\t\n\t\t$custom_properties[\"mode_360\"] = (int)$this->get360Mode();\n\t\t$custom_properties[\"mode_360_self_eval\"] = (int)$this->get360SelfEvaluation();\n\t\t$custom_properties[\"mode_360_self_rate\"] = (int)$this->get360SelfRaters();\n\t\t$custom_properties[\"mode_360_self_appr\"] = (int)$this->get360SelfAppraisee();\n\t\t$custom_properties[\"mode_360_results\"] = $this->get360Results();\n\t\t$custom_properties[\"mode_360_skill_service\"] = (int)$this->get360SkillService();\n\t\t\n\t\t\n\t\t// :TODO: skills?\n\t\t\t\t\n\t\t// reminder/tutor notification are (currently?) not exportable\n\t\t\n\t\tforeach($custom_properties as $label => $value)\n\t\t{\n\t\t\t$a_xml_writer->xmlStartTag(\"metadatafield\");\n\t\t\t$a_xml_writer->xmlElement(\"fieldlabel\", NULL, $label);\n\t\t\t$a_xml_writer->xmlElement(\"fieldentry\", NULL, $value);\n\t\t\t$a_xml_writer->xmlEndTag(\"metadatafield\");\n\t\t}\n\n\t\t$a_xml_writer->xmlStartTag(\"metadatafield\");\n\t\t$a_xml_writer->xmlElement(\"fieldlabel\", NULL, \"SCORM\");\n\t\tinclude_once \"./Services/MetaData/classes/class.ilMD.php\";\n\t\t$md = new ilMD($this->getId(),0, $this->getType());\n\t\t$writer = new ilXmlWriter();\n\t\t$md->toXml($writer);\n\t\t$metadata = $writer->xmlDumpMem();\n\t\t$a_xml_writer->xmlElement(\"fieldentry\", NULL, $metadata);\n\t\t$a_xml_writer->xmlEndTag(\"metadatafield\");\n\t\t\n\t\t$a_xml_writer->xmlEndTag(\"metadata\");\n\t\t$a_xml_writer->xmlEndTag(\"survey\");\n\n\t\t$attribs = array(\"id\" => $this->getId());\n\t\t$a_xml_writer->xmlStartTag(\"surveyquestions\", $attribs);\n\t\t// add questionblock descriptions\n\t\t$obligatory_states =& $this->getObligatoryStates();\n\t\tforeach ($pages as $question_array)\n\t\t{\n\t\t\tif (count($question_array) > 1)\n\t\t\t{\n\t\t\t\t$attribs = array(\"id\" => $question_array[0][\"question_id\"]);\n\t\t\t\t$attribs = array(\"showQuestiontext\" => $question_array[0][\"questionblock_show_questiontext\"],\n\t\t\t\t\t\"showBlocktitle\" => $question_array[0][\"questionblock_show_blocktitle\"]);\n\t\t\t\t$a_xml_writer->xmlStartTag(\"questionblock\", $attribs);\n\t\t\t\tif (strlen($question_array[0][\"questionblock_title\"]))\n\t\t\t\t{\n\t\t\t\t\t$a_xml_writer->xmlElement(\"questionblocktitle\", NULL, $question_array[0][\"questionblock_title\"]);\n\t\t\t\t}\n\t\t\t}\n\t\t\tforeach ($question_array as $question)\n\t\t\t{\n\t\t\t\tif (strlen($question[\"heading\"]))\n\t\t\t\t{\n\t\t\t\t\t$a_xml_writer->xmlElement(\"textblock\", NULL, $question[\"heading\"]);\n\t\t\t\t}\n\t\t\t\t$questionObject =& $this->_instanciateQuestion($question[\"question_id\"]);\n\t\t\t\tif ($questionObject !== FALSE) $questionObject->insertXML($a_xml_writer, FALSE, $obligatory_states[$question[\"question_id\"]]);\n\t\t\t}\n\t\t\tif (count($question_array) > 1)\n\t\t\t{\n\t\t\t\t$a_xml_writer->xmlEndTag(\"questionblock\");\n\t\t\t}\n\t\t}\n\n\t\t$a_xml_writer->xmlEndTag(\"surveyquestions\");\n\t\t$a_xml_writer->xmlEndTag(\"surveyobject\");\n\t\t$xml = $a_xml_writer->xmlDumpMem(FALSE);\n\t\treturn $xml;\n\t}", "public function getStats();", "public function outputResult(){\n\n\t\t$totalRed = $this->totalSummaryItem[\"red\"];\n\t\t$totalBlue = $this->totalSummaryItem[\"blue\"];\n\t\t$totalCount = $this->totalSummaryItem[\"count\"];\n\n\t\t//echo \"Total Count: \". $totalCount;\n\n\t\t// Run a calculation over the averages. Basically, what's the total averages here.\n\t\t$averageRed = 0;\n\t\t$averageBlue = 0;\n\n\t\tif ($totalRed > 0 && $totalCount > 0){\n\t\t\t# Average and round the number nicely\n\t\t\t$averageRed = round($totalRed / $totalCount );\n\t\t}\n\n\t\tif ($totalBlue > 0 && $totalCount > 0){\n\t\t\t# Average and round the number nicely\n\t\t\t$averageBlue = round($totalBlue / $totalCount );\n\t\t}\n\n\t\t$averageArray = array(\"averageRed\"=>$averageRed,\"averageBlue\"=>$averageBlue);\n\n\t\t// Format the response nicely into an output\n\t\treturn array(\"details\"=>$this->resultSummaryData,\"summary\"=>$this->totalSummaryItem,\"average\"=>$averageArray);\n\t}", "public function getResponseXML()\n\t{\n\t\treturn $this->responseXML;\n\t}", "private function getConfig() {\r\n\t\techo '<reply action=\"ok\">';\r\n\t\techo $this->data->asXML();\r\n\t\techo '</reply>';\r\n\t}", "public function to_xml()\n {\n $xml_string = \"\";\n if(count($this->data))\n {\n $xml_string = \"<{$this->bean}>\";\n foreach($this->data as $key => $val)\n {\n $xml_string .= \"<{$key}>{$val}</{$key}>\";\n }\n $xml_string .= \"</{$this->bean}>\"; \n } \n return $xml_string;\n }", "public function actionIndex()\n {\n \\Yii::$app->response->format = Response::FORMAT_RAW;\n $headers = \\Yii::$app->response->headers;\n $headers->add('Content-Type', 'text/xml');\n return $this->renderPartial('index');\n }", "public function exportXmlAction()\n {\n $fileName = 'traineecert.xml';\n $content = $this->getLayout()->createBlock('bs_traineecert/adminhtml_traineecert_grid')\n ->getXml();\n $this->_prepareDownloadResponse($fileName, $content);\n }", "public function index(): Response\n {\n $indexes = [];\n\n foreach (OpxSiteMap::config() as $name => $class) {\n $last = $this->getLastModifiedModel($class);\n $indexes[] = [\n 'loc' => url(\"/sitemap/{$name}.xml\"),\n 'lastmod' => $this->getModelTime($last),\n ];\n }\n\n return response($this->makeIndexXml($indexes), 200, ['Content-Type' => 'application/xml']);\n }", "public function sitemap_xml()\n {\n // Get All Pages.\n $this->data['pages'] = $this->pages->get_all(FALSE, 0, 'ASC', FALSE);\n // Get All Sermons.\n $this->data['sermons'] = $this->sermons->get_sermons(FALSE, FALSE, FALSE, 0, \"DESC\", FALSE);\n // Get All Posts\n $this->data['posts'] = $this->posts->get_all(FALSE, 0, 'ASC', FALSE);\n // Get All Post Categories\n $this->data['post_categories'] = $this->categories->get_all();\n\n // Set page content to xml.\n header(\"Content-Type: text/xml;charset=iso-8859-1\");\n $this->load->view(\"sitemap/sitemap\", $this->data);\n }", "public function createXML() {}", "public static function stats($a)\n {\n $str = '';\n $start = '<statements>';\n $end = '</statements>';\n foreach ($a as $item) {\n $str .= $start . \"\\n\";\n $str .= '<amount>' . $item->transaction_AMOUNT * 100 . '</amount>' . \"\\n\";\n $str .= '<transactionId>' . $item->transaction_ID . '</transactionId>' . \"\\n\";\n $str .= '<transactionTime>' . date('c', $item->transaction_TIME) . '</transactionTime>' . \"\\n\";\n $str .= $end . \"\\n\";\n }\n return $str;\n }", "public function generateStatistics() {\r\n $this->_statistic->generate();\r\n\r\n return $this;\r\n }" ]
[ "0.67028093", "0.66114545", "0.65172017", "0.63104004", "0.62806046", "0.6163633", "0.6145354", "0.5948828", "0.59119844", "0.59062344", "0.5821935", "0.5772851", "0.57329726", "0.57204354", "0.5712147", "0.56697196", "0.5625946", "0.5590159", "0.55760527", "0.55737215", "0.5512145", "0.55021524", "0.5489913", "0.5459978", "0.54477376", "0.5446991", "0.5440709", "0.54321057", "0.5411535", "0.53996724", "0.53832036", "0.5380858", "0.5363168", "0.53582776", "0.53574425", "0.5327357", "0.5326309", "0.5323647", "0.5323604", "0.53216267", "0.5307694", "0.53043485", "0.53018737", "0.5299603", "0.52978456", "0.5284368", "0.52784437", "0.52551", "0.52465856", "0.5246055", "0.52415246", "0.5240439", "0.5237669", "0.52277374", "0.52258605", "0.522472", "0.5213555", "0.52131855", "0.51981723", "0.51880497", "0.5187434", "0.51793164", "0.51740503", "0.5165115", "0.51573366", "0.5153406", "0.5153356", "0.51506805", "0.5146731", "0.51462984", "0.51415455", "0.5139723", "0.5136452", "0.51323247", "0.51291317", "0.51281226", "0.51273334", "0.5126034", "0.5117393", "0.51115626", "0.51083255", "0.51066697", "0.50927854", "0.5085811", "0.5085119", "0.5084598", "0.50756735", "0.50659186", "0.5060436", "0.50547236", "0.5052703", "0.503238", "0.50247437", "0.5017635", "0.5006985", "0.50059533", "0.50049835", "0.5003187", "0.50020087", "0.49916795" ]
0.6402791
3
Build statistics based on a response XML
public static function fromXml(SimpleXMLElement $xml): Statistics { $statistics = new self(); $properties = $xml->xpath('/environet:UploadStatistics/environet:PropertyStatistics'); $statistics->setInputPropertiesCount((int) ($xml->xpath('/environet:UploadStatistics/environet:InputPropertiesCount')[0] ?? null)); $statistics->setDate(new DateTime((string) $xml->xpath('/environet:UploadStatistics/environet:Date')[0] ?? null)); $statistics->setMonitoringPointId((string) $xml->xpath('/environet:UploadStatistics/environet:MonitoringPointId')[0] ?? null); foreach ($properties as $property) { $symbol = (string) $property->xpath('environet:Symbol')[0] ?? null; if (!$symbol) { continue; } $minTime = $property->xpath('environet:MinTime')[0] ?? null; $maxTime = $property->xpath('environet:MaxTime')[0] ?? null; $statistics->addProperty($symbol); $statistics->setPropertyValuesCount($symbol, (int) $property->xpath('environet:ValuesCount')[0] ?? 0); $statistics->setPropertyInserts($symbol, (int) $property->xpath('environet:Inserts')[0] ?? 0); $statistics->setPropertyUpdates($symbol, (int) $property->xpath('environet:Updates')[0] ?? 0); $statistics->setPropertyNoChanges($symbol, (int) $property->xpath('environet:NoChanges')[0] ?? 0); $statistics->setPropertyMinTime($symbol, $minTime ? DateTime::createFromFormat(DateTimeInterface::ISO8601, $minTime) : null); $statistics->setPropertyMaxTime($symbol, $maxTime ? DateTime::createFromFormat(DateTimeInterface::ISO8601, $maxTime) : null); } return $statistics; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function _getXMLResponse($sResponse) {\n if (extension_loaded('simplexml')) { // If simplexml is available, we can do more stuff!\n $oDOM = new DOMDocument;\n $oDOM->loadXML($sResponse);\n $sXML = simplexml_import_dom($oDOM);\n $sXMLLayout = 'http://www.shrinktheweb.com/doc/stwresponse.xsd';\n\n // Pull response codes from XML feed\n $aThumbnail = (array)$sXML->children($sXMLLayout)->Response->ThumbnailResult->Thumbnail;\n $aResponse['thumbnail'] = $aThumbnail[0];\n $aResponse['stw_action'] = $aThumbnail[1];\n $aResponse['stw_response_status'] = $sXML->children($sXMLLayout)->Response->ResponseStatus->StatusCode; // HTTP Response Code\n $aResponse['stw_response_code'] = $sXML->children($sXMLLayout)->Response->ResponseCode->StatusCode; // STW Error Response\n $aResponse['stw_last_captured'] = $sXML->children($sXMLLayout)->Response->ResponseTimestamp->StatusCode; // Last Captured\n $aResponse['stw_quota_remaining'] = $sXML->children($sXMLLayout)->Response->Quota_Remaining->StatusCode; // New Reqs left for today\n $aResponse['stw_bandwidth_remaining'] = $sXML->children($sXMLLayout)->Response->Bandwidth_Remaining->StatusCode; // New Reqs left for today\n $aResponse['stw_category_code'] = $sXML->children($sXMLLayout)->Response->CategoryCode->StatusCode; // Not yet implemented\n } else {\n\t // LEGACY SUPPPORT\n $aResponse['stw_response_status'] = _getLegacyResponse('ResponseStatus', $sRemoteData);\n $aResponse['stw_response_code'] = _getLegacyResponse('ResponseCode', $sRemoteData);\n\n // check remaining quota\n $aResponse['stw_quota_remaining'] = _getLegacyResponse('Quota_Remaining', $sRemoteData);\n // check remaining bandwidth\n $aResponse['stw_bandwidth_remaining'] = _getLegacyResponse('Bandwidth_Remaining', $sRemoteData);\n\n // get thumbnail and status\n $aThumbnail = $this->_getThumbnailStatus($sRemoteData);\n $aResponse = array_merge($aResponse, $aThumbnail);\n }\n \n if ($aResponse['stw_action'] == 'delivered') {\n $aResponse['exists'] = true;\n } else {\n $aResponse['exists'] = false;\n }\n\n if ($aResponse['stw_action'] == 'fix_and_retry') {\n $aResponse['problem'] = true;\n } else {\n $aResponse['problem'] = false;\n }\n\n if ($aResponse['stw_action'] == 'noretry') {\n $aResponse['error'] = true;\n } else {\n $aResponse['error'] = false;\n }\n\n // if we use the advanced api for free account we get an invalid request\n if ($aResponse['stw_response_code'] == 'INVALID_REQUEST') {\n $aResponse['invalid'] = true;\n } else {\n $aResponse['invalid'] = false;\n }\n\t\t\n\t\t// if our domain or IP is not listed in the account's \"Allowed Referrers\" AND \"Lock to Account\" is enabled, then we get this error\n if ($aResponse['stw_response_code'] == 'LOCK_TO_ACCOUNT') {\n $aResponse['locked'] = true;\n } else {\n $aResponse['locked'] = false;\n }\n\n return $aResponse;\n }", "public function parse($xml = null)\n {\n if($xml === null)\n $xml = $this->getResponse()->getBody();\n\n $xml = simplexml_load_string($xml);\n $requestSummary = new \\ZendService\\ZendServerAPI\\DataTypes\\RequestSummary();\n $requestSummary->setEventsCount((string) $xml->responseData->requestSummary->eventsCount);\n $requestSummary->setCodeTracing((string) $xml->responseData->requestSummary->codeTracing);\n\n foreach ($xml->responseData->requestSummary->events->event as $xmlEvent) {\n $event = new \\ZendService\\ZendServerAPI\\DataTypes\\Event();\n $event->setType((string) $xmlEvent->type);\n $event->setDescription((string) $xmlEvent->description);\n\n $superglobal = new \\ZendService\\ZendServerAPI\\DataTypes\\SuperGlobals();\n if (isset($xmlEvent->superGlobals->cookie->parameter)) {\n foreach ($xmlEvent->superGlobals->cookie->parameter as $cookie) {\n $superglobal->addCookieParameter(trim((string) $cookie->name), trim((string) $cookie->value));\n }\n }\n\n if (isset($xmlEvent->superGlobals->server->parameter)) {\n foreach ($xmlEvent->superGlobals->server->parameter as $server) {\n $superglobal->addServerParameter(trim((string) $server->name), trim((string) $server->value));\n }\n }\n\n if (isset($xmlEvent->superGlobals->get->parameter)) {\n foreach ($xmlEvent->superGlobals->get->parameter as $get) {\n $superglobal->addGetParameter(trim((string) $get->name), trim((string) $get->value));\n }\n }\n\n if (isset($xmlEvent->superGlobals->post->parameter)) {\n foreach ($xmlEvent->superGlobals->post->parameter as $post) {\n $superglobal->addPostParameter(trim((string) $post->name), trim((string) $post->value));\n }\n }\n\n if (isset($xmlEvent->superGlobals->session->parameter)) {\n foreach ($xmlEvent->superGlobals->session->parameter as $session) {\n $superglobal->addSessionParameter(trim((string) $session->name), trim((string) $session->value));\n }\n }\n\n $event->setSuperglobals($superglobal);\n $event->setSeverity((string) $xmlEvent->severity);\n $event->setDebugUrl((string) $xmlEvent->debugUrl);\n\n foreach ($xmlEvent->backtrace->step as $xmlStep) {\n $step = new \\ZendService\\ZendServerAPI\\DataTypes\\Step();\n $step->setNumber((string) $xmlStep->number);\n $step->setObject((string) $xmlStep->object);\n $step->setClass((string) $xmlStep->class);\n $step->setFunction((string) $xmlStep->function);\n $step->setFile((string) $xmlStep->file);\n $step->setLine((string) $xmlStep->line);\n\n $event->addStep($step);\n }\n\n $requestSummary->addEvents($event);\n }\n\n return $requestSummary;\n }", "public function parse(LSF_View_Node $view)\n\t{\n\t\t$root = $this->_document->createElement('response');\n\t\t$this->parse_r($view, $root);\n\t\t$this->_document->appendChild($root);\n\t\t\n\t\tif (extension_loaded('xhprof') && LSF_Config::get('enable_profiling') && LSF_Config::get('xhprof_lib_dir'))\n\t\t{\n\t\t\t$profilerNamespace = LSF_Config::get('application_name') ? LSF_Config::get('application_name') : 'LSF'; // namespace for your application\n\t\t\t$xhprofData = xhprof_disable();\n\t\t\t$xhprofRuns = new XHProfRuns_Default();\n\t\t\t$runId = $xhprofRuns->save_run($xhprofData, $profilerNamespace);\n\t\t\t\n\t\t\tif (LSF_Config::get('xhprof_ui_url'))\n\t\t\t{\n\t\t\t\t$profilerUrl = LSF_Config::get('xhprof_ui_url') . '/index.php?run=' . $runId . '&source=' . $profilerNamespace;\n\t\t\t\t$root->setAttribute('profileUrl', htmlspecialchars($profilerUrl, ENT_COMPAT, 'UTF-8'));\n\t\t\t\tLSF_Application::disableProfiling();\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn $this->_document->saveXml();\n\t}", "function parseXMLResult($doc, &$result) {\n\tglobal $gbRepeatView;\n\n\t$result = array();\n\t$median = $doc->getElementsByTagName('median')->item(0); // This is the block of info representing ALL the data of the \"median\" run.\n\tif ( ! $median ) {\n\t\treturn;\n\t}\n\t$pageview = $median->getElementsByTagName( $gbRepeatView ? 'repeatView' : 'firstView' )->item(0); // change this to 'repeatView' for primed cache\n\tif ( ! $pageview ) {\n\t\treturn;\n\t}\n\n\t$result['medianRun'] = (int)$pageview->getElementsByTagName('run')->item(0)->nodeValue;\n}", "protected function init()\n {\n if ($this->request->getResponseFormat() == 'xml') {\n $aggregated = new \\SimpleXMLElement('<response/>');\n foreach ($this->responseRaw as $name => $response) {\n $child = $aggregated->addChild('classification');\n $child->addAttribute('classifier', $name);\n $xml = simplexml_load_string($response);\n\n if (! $xml instanceof \\SimpleXMLElement) {\n throw new ServiceReaderException('Failed parsing XML response.');\n }\n\n if ((string) $xml->status->attributes()->success !== 'true') {\n throw new ServiceReaderException($xml->status->attributes()->statusCode);\n }\n\n foreach ($xml->readCalls->classify as $classify) {\n $child->addAttribute('textCoverage', $classify->classification->attributes()->textCoverage);\n foreach ($classify->classification->class as $class) {\n $this->simplexmlImportXml($child, $class->asXML());\n }\n }\n }\n\n return $aggregated->asXML();\n }\n\n if ($this->request->getResponseFormat() == 'json') {\n $aggregated = array();\n foreach ($this->responseRaw as $name => $response) {\n $current = json_decode($response, 1);\n\n if (! array_key_exists('success', $current)) {\n throw new ServiceReaderException('Unable to complete request');\n }\n\n if ($current['success'] !== true) {\n throw new ServiceReaderException($current['statusCode'] . ' ' . $current['errorMessage']);\n }\n\n array_key_exists('textCoverage', $current) ? '' : $current['textCoverage'] = null;\n array_key_exists('cls1', $current) ? '' : $current['cls1'] = null;\n\n $aggregated[] = array(\n 'classifier' => $name,\n 'textCoverage' => $current['textCoverage'],\n 'classes' => $current['cls1']\n );\n }\n\n return json_encode($aggregated);\n }\n\n return $this->responseRaw;\n }", "function rest_api_get_stats( $response ) {\n\t\t$users = UM()->Online()->get_users();\n\t\t$response['stats']['total_online'] = $users ? count( $users ) : 0;\n\t\treturn $response;\n\t}", "function parse_response($response)\n {\n $data = $response->getBody();\n\n // Note we could not use Guzzle XML method becuase Endicia does not return valid XML it seems\n $sxe = new SimpleXMLElement($data);\n\n if ($sxe->status == 0) {\n $return_data = array();\n $return_data['Status'] = (string)$sxe->Status;\n $return_data['Base64LabelImage'] = (string)$sxe->Base64LabelImage;\n $return_data['TrackingNumber'] = (string)$sxe->TrackingNumber;\n $return_data['FinalPostage'] = (string)$sxe->FinalPostage;\n $return_data['TransactionID'] = (string)$sxe->TransactionID;\n $return_data['PostmarkDate'] = (string)$sxe->PostmarkDate;\n $return_data['DeliveryTimeDays'] = (string)$sxe->PostagePrice->DeliveryTimeDays;\n\t $return_data['error'] = (string)$data;\n \n\t\treturn $return_data;\n } else {\n return array('status' => 'error', 'message' => $sxe);\n }\n }", "private function ParseResponse($response)\n {\n\n $xml = new SimpleXMLElement($response->getBody());\n\n foreach ($xml->entry as $entry) {\n //https://www.electrictoolbox.com/php-simplexml-element-attributes/\n if ((string) $entry->category->attributes()->term === $this->ghType) {\n\n //instead of returning the simpleXMlElement in an array i pulled the strings'\n //not sure if this matters but it is less data sent back to the ajax success function\n $tmp[] = array(\n $this->FixUuid($entry->id),\n (string)$entry->title,\n );\n // echo (json_encode('id: ' . $entry->id . ' title: ' . $entry->title) .\"<br /> <br />\");\n \n }\n \n }\n\n $this->response = json_encode($tmp);\n }", "protected function parseXML($xml)\n {\n if (! $xml) {\n return false;\n }\n\n foreach ($xml->children() as $key => $x) {\n $i = $this->index;\n if ($key == 'Count') {\n $this->count = (string) $x;\n $this->log(\"Successfully canceled $this->count report requests.\");\n }\n if ($key != 'ReportRequestInfo') {\n continue;\n }\n\n $this->reportList[$i]['ReportRequestId'] = (string) $x->ReportRequestId;\n $this->reportList[$i]['ReportType'] = (string) $x->ReportType;\n $this->reportList[$i]['StartDate'] = (string) $x->StartDate;\n $this->reportList[$i]['EndDate'] = (string) $x->EndDate;\n $this->reportList[$i]['Scheduled'] = (string) $x->Scheduled;\n $this->reportList[$i]['SubmittedDate'] = (string) $x->SubmittedDate;\n $this->reportList[$i]['ReportProcessingStatus'] = (string) $x->ReportProcessingStatus;\n $this->reportList[$i]['GeneratedReportId'] = (string) $x->GeneratedReportId;\n $this->reportList[$i]['StartedProcessingDate'] = (string) $x->StartedProcessingDate;\n $this->reportList[$i]['CompletedProcessingDate'] = (string) $x->CompletedProcessingDate;\n\n $this->index++;\n }\n }", "public function Statistics_General()\n\t{\n\t\t$Data = $this -> HTTPRequest($this -> APIURL.'Statistics:General');\n\t\treturn $this -> ParseResponse($Data);\n\t}", "public function getStatisticByAnalysis (){\n // var_dump($this->analysisemail);exit();\n\t\t$affliates = array();\n\t\t$conversionrates = array();\n $averagerates = array();\n $fconversionrates = array();\n $faveragerates = array();\n $faffliates = array();\n\t // $analysis = $this ->getAnalysisEmails(1);\n foreach ($this->analysisemail as $index => $r) {\n \n $email_sentpercent = ROUND((($r['donatecount'] / $r['sent']) * 100),2);\n $avg_sent = ROUND((($r['raised'] / $r['sent'])), 2);\n $affliates[] = $r['account'];\n $averagerates[] = $avg_sent;\n $conversionrates[] = $email_sentpercent;\n\t\t}\n foreach ($this->analysisfb as $indexes => $fb) {\n $faffliates[] = $fb['account'];\n $fb_sentpercent = ROUND((($fb['donatecount'] / $fb['shared']) * 100),2);\n $avg_fbsent = ROUND((($fb['raised'] / $fb['shared'])), 2);\n $faveragerates[] = $fb_sentpercent;\n $fconversionrates[] = $avg_fbsent;\n\t\t}\n return array('label' => $affliates, 'emailsent' => $conversionrates, 'averagesent' => $averagerates, 'fconversionrate' => $fconversionrates, 'faveragesent' => $faveragerates,'flabel' => $faffliates);\n }", "function test30($xml_response) {\n\n}", "public function calculateStatisticsForRequest() : void {\n foreach ($this->timeSegments as $timeSegment) {\n if ($timeSegment instanceof LoopedTimeSegment) {\n $timeSegmentStatistic = $this->calculateStatisticForLoopedTimeSegment($timeSegment);\n } else if ($timeSegment instanceof SingleTimeSegment) {\n $timeSegmentStatistic = $this->calculateStatisticForSingleTimeSegment($timeSegment);\n }\n\n $this->statisticDataForRequest[$timeSegment->getLabel()][] = $timeSegmentStatistic;\n }\n }", "protected function parseAdlibResponse() {\n $xml = new SimpleXMLElement($this->raw);\n $results = $xml->xpath('//record');\n $docs = array();\n foreach ($results as $result) {\n $doc = array();\n foreach ($this->fields as $field) {\n // check if we have multiple values\n $children = $this->getGroupedFieldByXpath($result, $field);\n // $children = $result->{$field}->children();\n if(empty($children)) {\n continue;\n }\n if (count($children) > 1) {\n $field_array = array();\n // get all values\n foreach ($children as $value) {\n if ((string) $value != '' && (string) $value != 'Array') {\n $field_array[] = $this->replaceTokenCharacters((string) $value);\n }\n else {\n $field_array[] = $this->replaceTokenCharacters((string) $value->value);\n }\n }\n // and put the resulting array in $doc[$field]\n $doc[$field] = $field_array;\n }\n else {\n // single value\n // First try if there is a result without value.\n if ((string) $children[0] !== '' && (string) $children[0] !== 'Array') {\n $doc[$field] = $this->replaceTokenCharacters((string) $children[0]);\n }\n else {\n $doc[$field] = $this->replaceTokenCharacters((string) $children[0]->value);\n }\n }\n }\n $doc['priref'] = (string) $xml->record->attributes()->priref;\n $doc['raw_xml'] = $result->asXML();\n $docs[] = $doc;\n }\n return $docs;\n }", "private function parseResponseXML($response_xml=\"\")\n\t\t{\n\t\t\t$this->error_no = 0;\n\t\t\t$this->error_text = '';\n\t\t\t$x = simplexml_load_string($response_xml);\n\t\t\t//rateshop\n\t\t\tif($this->action_code==\"RateShop\"){\n\n\t\t\t\tif (isset($x->OTA_VehAvailRateRS->Errors))\n\t\t\t\t{\n\t\t\t\t\t$this->error=true;\n\t\t\t\t\t$this->error_no = (int) $x->OTA_VehAvailRateRS->Errors->Error[\"Code\"];\n\t\t\t\t\t$this->error_text .= (string) $x->OTA_VehAvailRateRS->Errors->Error[\"ShortText\"];\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}\n\t\t\t//BOOKING\n\t\t\tif($this->action_code==\"Booking\"){\n\t\t\t\tif (isset($x->OTA_VehResRS->Errors))\n\t\t\t\t{\n\t\t\t\t\t$this->error=true;\n\t\t\t\t\t$this->error_no = (int) $x->OTA_VehResRS->Errors->Error[\"Code\"];\n\t\t\t\t\t$this->error_text .= (string) $x->OTA_VehResRS->Errors->Error[\"ShortText\"];\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}\n\t\t\t//Modify\n\t\t\tif($this->action_code==\"ModifyReservation\"){\n\t\t\t\tif (isset($x->OTA_VehModifyRS->Errors))\n\t\t\t\t{\n\t\t\t\t\t$this->error=true;\n\t\t\t\t\t$this->error_no = (int) $x->OTA_VehModifyRS->Errors->Error[\"Code\"];\n\t\t\t\t\t$this->error_text .= (string) $x->OTA_VehModifyRS->Errors->Error[\"ShortText\"];\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t//CANCEL\n\t\t\tif($this->action_code==\"CANCEL\"){\n\t\t\t\tif (isset($x->OTA_VehCancelRS->Errors))\n\t\t\t\t{\n\t\t\t\t\t$this->error=true;\n\t\t\t\t\t$this->error_no = (int) $x->OTA_VehCancelRS->Errors->Error[\"Code\"];\n\t\t\t\t\t$this->error_text .= (string) $x->OTA_VehCancelRS->Errors->Error[\"ShortText\"];\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn $response_xml;\n\t\t}", "function outputStats(){\n if(preg_match(\"/^[0-9]{4}-[0-9]{2}-[0-9]{2}$/\", $_REQUEST[\"date\"]))\n $myDate = htmlentities(mysql_real_escape_string($_REQUEST[\"date\"]));\n else {\n print \"<stats/>\";\n exit;\n }\n\n printf(\"<?xml version=\\\"1.0\\\" encoding=\\\"utf-8\\\" ?><stats date=\\\"%s\\\">\\n\", $myDate);\n\n // different groups to sort by (layout, content, JS, Firefox, GFX, networking)\n // \"where\" clauses to use in the queries below\n $myGroups = array(\"Layout\" => \"d.product='Core' AND (d.component LIKE 'layout%' OR d.component LIKE 'printing%' OR d.component IN ('Style System (CSS)'))\", \n \"JavaScript\" => \"d.product='Tamarin' OR (d.product='Core' AND d.component LIKE 'javascript%')\",\n \"Content\" => \"d.product='Core' AND (d.component LIKE 'DOM%' OR d.component in ('Document Navigation','Editor','Embedding: Docshell','Event Handling','HTML: Form Submission','HTML: Parser','Java: OJI','Plug-ins','RDF','Security','Security: CAPS','Selection','Serializers','Spelling checker','String','SVG','Video/Audio','Web Services','XBL','XML','XPCOM','XPConnect','XSLT','XUL'))\",\n \"GFX\" => \"d.product='Core' AND (d.component LIKE 'GFX%' OR d.component LIKE 'widget%' OR d.component in ('ImageLib','MathML','Graphics'))\",\n \"Frontend\" => \"d.product='Firefox' OR d.product='Toolkit' OR (d.product='Core' AND (d.component in ('Security: UI')))\",\n \"Networking\" => \"d.product='Core' AND d.component like 'Networking%'\",\n \"Mail\" => \"d.product='MailNews Core' OR d.product='Thunderbird' OR (d.product='Core' AND (d.component like 'Mail%' OR d.component in ('Security: S/MIME')))\",\n );\n\n // take the inverse of the previous sets of bugs to generate the \"Other\" category\n $other = \"\";\n foreach ($myGroups as $group => $condition) {\n if ($condition == end($myGroups))\n $other .= \"NOT (\" . $condition . \")\";\n else\n $other .= \"NOT (\" . $condition . \") AND \";\n }\n $myGroups[\"Other\"] = $other;\n\n \n // different severities to display\n $mySeverities = array(\"sg_critical\", \"sg_high\", \"sg_moderate\", \"sg_low\");\n\n foreach($myGroups as $gName => $gClause){\n print \"<stat>\";\n // store total number of bugs for this group\n $groupBugs = 0;\n foreach($mySeverities as $s){\n // store the count of total bugs for this (group, severity) as well as\n // combined list of bugs and total age of bugs\n $bugCount = 0;\n $bugLists = array();\n $bugAgeDays = 0;\n\n $sql = sprintf(\"select d.did, s.category, d.product, d.component, d.count, d.bug_list, d.avg_age_days from Details d, Stats s where d.sid=s.sid and d.date like '%s%%' and (%s) and s.category='%s';\", $myDate, $gClause, $s);\n if($_GET[\"sql\"] == 1)\n printf(\"<sql>%s</sql>\", $sql);\n $result = mysql_query($sql);\n while($row = mysql_fetch_assoc($result)){\n $bugCount += $row[\"count\"];\n $groupBugs += $row[\"count\"];\n array_push($bugLists, $row[\"bug_list\"]);\n $bugAgeDays += $row[\"count\"]*$row[\"avg_age_days\"];\n }\n // output the stats for this (group, severity)\n if (count($bugLists) == 0)\n $avgAge = 0;\n else\n $avgAge = round($bugAgeDays/$bugCount);\n \n printf(\"<%s avg_age_days=\\\"%s\\\" bug_list=\\\"%s\\\">%s</%s>\", $s, $avgAge, implode(\",\", $bugLists), $bugCount, $s);\n }\n printf(\"<group total=\\\"%s\\\">%s</group>\", $groupBugs, $gName);\n print \"</stat>\";\n }\n \n print \"</stats>\\n\";\n}", "public function getXmlResponse();", "function generateResults() {\n\n $location = './cia.xml';\n $xmlParse = simplexml_load_file($location);\n \n foreach ($xmlParse -> country as $item) {\n\n $totalPop = $item -> people -> population -> total;\n $birthRate = floatval($item -> people -> population -> birth);\n $deathRate = floatval($item -> people -> population -> death);\n $languages = strval($item -> people -> languages);\n\n if (($_GET['verpop'] >= $totalPop && $_GET['operator'] == '>') || $_GET['operator'] != '>') {\n if (($_GET['verpop'] <= $totalPop && $_GET['operator'] == '<') || $_GET['operator'] != '<') {\n if (($birthRate >= $deathRate && $_GET['less/greater'] == 'birth>') || $_GET['less/greater'] != 'birth>') {\n if (($birthRate <= $deathRate && $_GET['less/greater'] == 'death>') || $_GET['less/greater'] != 'death>') {\n if (str_contains($languages, ucfirst($_GET['lang']))) {\n\n /* Similar to the head when conditions are checked a table row is \n constructed with if statements checking what checkboxes were used */\n $htmlStr = \"<tr><td>{$item -> name}</td>\";\n if (isset($_GET['pop'])) {\n $htmlStr .= \"<td>{$totalPop}</td>\";\n }\n if (isset($_GET['birth'])) {\n $htmlStr .= \"<td>{$birthRate}</td>\";\n }\n if (isset($_GET['death'])) {\n $htmlStr .= \"<td>{$deathRate}</td>\";\n }\n $htmlStr .= '</tr>';\n print($htmlStr);\n }\n }\n }\n }\n }\n }\n }", "protected function parseResponseToXML($response)\n {\n return simplexml_load_string($response->getBody()->getContents());\n }", "public function getContentStats()\n {\n $tree = $this->app()->request()->param(\"_content_tree\");\n\n $stats = $this->_doGetContentStats($tree);\n\n $str = \"<table>\";\n $str .= \"<tr>\";\n $str .= \"<td>\".$stats[\"pages\"].\"</td>\";\n $str .= \"<td>Pages</td>\";\n $str .= \"</tr>\";\n $str .= \"<tr>\";\n $str .= \"<td>\".$stats[\"posts\"].\"</td>\";\n $str .= \"<td>Posts</td>\";\n $str .= \"</tr>\";\n $str .= \"</table>\";\n\n return array(\"title\"=>\"Content stats\", \"body\"=>$str);\n }", "function get_statistics() {\n $response = $this->api_query(array('mode' => 'statistics'));\n\n if ($response['error']) {\n return false;\n }\n return ($response['data']);\n }", "protected function parseResponse()\n {\n $data = simplexml_load_string($this->body);\n \n $this->data = $data;\n }", "public function getStatistics_get() {\n //extract($_GET);\n $result = $this->feeds_model->getStatistics();\n return $this->response($result);\n }", "public function summaryAction()\n {\n $reporter = $this->getDI()->get('reporter');\n\n $this->getOutput()->last_15_min_mo_count = $reporter->getLastMoCount(new DateTime('15 minutes ago'));\n $this->getOutput()->time_span_last_10k = $reporter->getTimeSpan(10000);\n return $this->initResponse();\n }", "abstract function parse_api_response();", "private function _parse_response($xml)\n\t{\t\n\t\t$details = (object) array();\n\n\t\t$as_array = $this->payments->arrayize_object($xml);\n\t\t\n\t\t$signon = $as_array['SignonMsgsRs']['SignonDesktopRs'];\n\t\t$response = $as_array['QBMSXMLMsgsRs'];\n\t\t$result = '';\n\t\t$message = '';\n\t\t$identifier = '';\n\t\t\n\t\tif(isset($response['CustomerCreditCardChargeRs']))\n\t\t{\n\t\t\t$result = $response['CustomerCreditCardChargeRs']['@attributes']['statusCode'];\n\t\t\t$message = $response['CustomerCreditCardChargeRs']['@attributes']['statusMessage'];\t\n\t\t\t$identifier = $response['CustomerCreditCardChargeRs']['CreditCardTransID'];\t\n\t\t}\n\n\t\tif(isset($response['CustomerCreditCardAuthRs']))\n\t\t{\n\t\t\t$result = $response['CustomerCreditCardAuthRs']['@attributes']['statusCode'];\n\t\t\t$message = $response['CustomerCreditCardAuthRs']['@attributes']['statusMessage'];\t\n\t\t\t$identifier = $response['CustomerCreditCardAuthRs']['CreditCardTransID'];\t\n\t\t}\n\t\n\t\tif(isset($response['CustomerCreditCardCaptureRs']))\n\t\t{\n\t\t\t$result = $response['CustomerCreditCardCaptureRs']['@attributes']['statusCode'];\n\t\t\t$message = $response['CustomerCreditCardCaptureRs']['@attributes']['statusMessage'];\t\n\t\t\t$identifier = $response['CustomerCreditCardCaptureRs']['CreditCardTransID'];\t\n\t\t}\n\t\t\n\t\tif(isset($response['CustomerCreditCardTxnVoidRs']))\n\t\t{\n\t\t\t$result = $response['CustomerCreditCardTxnVoidRs']['@attributes']['statusCode'];\n\t\t\t$message = $response['CustomerCreditCardTxnVoidRs']['@attributes']['statusMessage'];\t\n\t\t\t$identifier = $response['CustomerCreditCardTxnVoidRs']['CreditCardTransID'];\t\t\n\t\t}\n\t\t\n\t\tif(isset($response['CustomerCreditCardTxnVoidOrRefundRs']))\n\t\t{\n\t\t\t$result = $response['CustomerCreditCardTxnVoidOrRefundRs']['@attributes']['statusCode'];\n\t\t\t$message = $response['CustomerCreditCardTxnVoidOrRefundRs']['@attributes']['statusMessage'];\n\t\t\tif(isset($response['CustomerCreditCardTxnVoidOrRefundRs']['CreditCardTransID']))\n\t\t\t{\t\n\t\t\t\t$identifier = $response['CustomerCreditCardTxnVoidOrRefundRs']['CreditCardTransID'];\t\t\n\t\t\t}\n\t\t}\t\t\n\t\t\t\n\t\t$details->gateway_response = $as_array;\n\t\t\n\t\tif($result === '0')\n\t\t{ //Transaction was successful\n\t\t\t$details->identifier = $identifier;\n\t\t\t\n\t\t\t$details->timestamp = $signon['ServerDateTime'];\n\t\t\t\n\t\t\treturn $this->payments->return_response(\n\t\t\t\t'Success',\n\t\t\t\t$this->payments->payment_type.'_success',\n\t\t\t\t'gateway_response',\n\t\t\t\t$details\n\t\t\t);\t\t\t\n\t\t}\n\t\telse\n\t\t{ //Transaction failed\n\t\t\t$details->reason = $message;\n\n\t\t\treturn $this->payments->return_response(\n\t\t\t\t'Failure',\n\t\t\t\t$this->payments->payment_type.'_gateway_failure',\n\t\t\t\t'gateway_response',\n\t\t\t\t$details\n\t\t\t);\t\t\t\t\n\t\t}\n\t}", "private function parseResponse($response){\n if($response['status'] == true) {\n $parsedResponse = new SimpleXMLElement($response['httpResponse']);\n if(isset($parsedResponse->error)){\n $this->setFailedReason((string)$parsedResponse->error->error_msg);\n return false; \n }else {\n $arrayResponse = array();\n \n if(isset($parsedResponse->transaction))\n $elements = $parsedResponse->transaction->children();\n else\n $elements = $parsedResponse->children();\n \n foreach($elements as $tag => $tagValue){\n $arrayResponse[$tag] = $tagValue->__toString();\n }\n \n return $arrayResponse;\n }\n }else {\n //server timeout error\n $this->setFailedReason('RESPONSE_TIMEOUT');\n return false;\n } \n }", "function get_traffic ()\n\t{\n\t\t$results['ranking'] = trim((string)$this->results->dmn->metrics->val->uv->ranking);\n\t\t\n\t\t/* $results['count'] = trim((string)$this->results->dmn->metrics->val->uv->count);\n\t\t$results['count_int'] = (int)implode('', explode(',', $results['count']));\n\t\t\n\t\t$results['link'] = trim((string)$this->results->dmn->metrics->link);\n\t\t$results['icon'] = trim((string)$this->results->dmn->metrics->icon); */\n\t\t$results['ranking'] = str_replace(\",\",\"\", $results['ranking']);\n\t\treturn($results);\n\t}", "protected function getStats()\n {\n $endTime = microtime() - $this->startTime;\n $stats = sprintf(\n 'Request-response cycle finished: %1.3fs'\n . ' - Memory usage: %1.2fMB (peak: %1.2fMB)'\n ,\n $endTime,\n memory_get_usage(true) / 1048576,\n memory_get_peak_usage(true) / 1048576\n );\n\n return $stats;\n }", "public function getStats() {}", "function aggregateStats($pageid, $firstUrl, $firstHtmlUrl, $statusInfo) {\n\tglobal $gPagesTable, $gRequestsTable, $gUrlsTable;\n\t$link = getDBConnection();\n\n\t// CVSNO - move this error checking to the point before this function is called\n\tif ( ! $firstUrl ) {\n\t\tdprint(\"ERROR($gPagesTable pageid: $pageid): no first URL found.\");\n\t\treturn false;\n\t}\n\tif ( ! $firstHtmlUrl ) {\n\t\tdprint(\"ERROR($gPagesTable pageid: $pageid): no first HTML URL found.\");\n\t\treturn false;\n\t}\n\n\t// initialize variables for counting the page's stats\n\t$bytesTotal = 0;\n\t$reqTotal = 0;\n\t$hSize = array();\n\t$hCount = array();\n\t// This is a list of all mime types AND file formats that we care about.\n\tforeach(array(\"css\", \"image\", \"script\", \"html\", \"font\", \"other\", \"audio\", \"video\", \"text\", \"xml\", \"gif\", \"jpg\", \"png\", \"webp\", \"svg\", \"ico\", \"flash\", \"swf\", \"mp4\", \"flv\", \"f4v\") as $type) {\n\t\t// initialize the hashes\n\t\t$hSize[$type] = 0;\n\t\t$hCount[$type] = 0;\n\t}\n\t$hDomains = array();\n\t$maxageNull = $maxage0 = $maxage1 = $maxage30 = $maxage365 = $maxageMore = 0;\n\t$bytesHtmlDoc = $numRedirects = $numErrors = $numGlibs = $numHttps = $numCompressed = $maxDomainReqs = 0;\n\n\t$result = doQuery(\"select type, format, urlShort, resp_content_type, respSize, expAge, firstHtml, status, resp_content_encoding, req_host from $gRequestsTable where pageid = $pageid;\");\n\twhile ($row = mysqli_fetch_assoc($result)) {\n\t\t$url = $row['urlShort'];\n\t\t$prettyType = $row['type'];\n\t\t$respSize = intval($row['respSize']);\n\t\t$reqTotal++;\n\t\t$bytesTotal += $respSize;\n\t\t$hCount[$prettyType]++;\n\t\t$hSize[$prettyType] += $respSize;\n\n\t\t$format = $row['format'];\n\t\tif ( $format && (\"image\" === $prettyType || \"video\" === $prettyType) ) {\n\t\t\t$hCount[$format]++;\n\t\t\t$hSize[$format] += $respSize;\n\t\t}\n\n\t\t// count unique domains (really hostnames)\n\t\t$aMatches = array();\n\t\tif ( $url && preg_match('/http[s]*:\\/\\/([^\\/]*)/', $url, $aMatches) ) {\n\t\t\t$hostname = $aMatches[1];\n\t\t\tif ( ! array_key_exists($hostname, $hDomains) ) {\n\t\t\t\t$hDomains[$hostname] = 0;\n\t\t\t}\n\t\t\t$hDomains[$hostname]++; // count hostnames\n\t\t}\n\t\telse {\n\t\t\tdprint(\"ERROR($gPagesTable pageid: $pageid): No hostname found in URL: $url\");\n\t\t}\n\n\t\t// count expiration windows\n\t\t$expAge = $row['expAge'];\n\t\t$daySecs = 24*60*60;\n\t\tif ( NULL === $expAge ) {\n\t\t\t$maxageNull++;\n\t\t}\n\t\telse if ( 0 === intval($expAge) ) {\n\t\t\t$maxage0++;\n\t\t}\n\t\telse if ( $expAge <= (1 * $daySecs) ) {\n\t\t\t$maxage1++;\n\t\t}\n\t\telse if ( $expAge <= (30 * $daySecs) ) {\n\t\t\t$maxage30++;\n\t\t}\n\t\telse if ( $expAge <= (365 * $daySecs) ) {\n\t\t\t$maxage365++;\n\t\t}\n\t\telse {\n\t\t\t$maxageMore++;\n\t\t}\n\n\t\tif ( $row['firstHtml'] ) {\n\t\t\t$bytesHtmlDoc = $respSize; // CVSNO - can we get this UNgzipped?!\n\t\t}\n\n\t\t$status = $row['status'];\n\t\tif ( 300 <= $status && $status < 400 && 304 != $status ) {\n\t\t\t$numRedirects++;\n\t\t}\n\t\telse if ( 400 <= $status && $status < 600 ) {\n\t\t\t$numErrors++;\n\t\t}\n\n\t\tif ( 0 === stripos($url, \"https://\") ) {\n\t\t\t$numHttps++;\n\t\t}\n\n\t\tif ( FALSE !== stripos($row['req_host'], \"googleapis.com\") ) {\n\t\t\t$numGlibs++;\n\t\t}\n\n\t\tif ( \"gzip\" == $row['resp_content_encoding'] || \"deflate\" == $row['resp_content_encoding'] ) {\n\t\t\t$numCompressed++;\n\t\t}\n\t}\n\tmysqli_free_result($result);\n\t$numDomains = count(array_keys($hDomains));\n\tforeach (array_keys($hDomains) as $domain) {\n\t\t$maxDomainReqs = max($maxDomainReqs, $hDomains[$domain]);\n\t}\n\n\t$cmd = \"UPDATE $gPagesTable SET reqTotal = $reqTotal, bytesTotal = $bytesTotal\" .\n\t\t\", reqHtml = \" . $hCount['html'] . \", bytesHtml = \" . $hSize['html'] .\n\t\t\", reqJS = \" . $hCount['script'] . \", bytesJS = \" . $hSize['script'] .\n\t\t\", reqCSS = \" . $hCount['css'] . \", bytesCSS = \" . $hSize['css'] .\n\t\t\", reqImg = \" . $hCount['image'] . \", bytesImg = \" . $hSize['image'] .\n\t\t\", reqGif = \" . $hCount['gif'] . \", bytesGif = \" . $hSize['gif'] .\n\t\t\", reqJpg = \" . $hCount['jpg'] . \", bytesJpg = \" . $hSize['jpg'] .\n\t\t\", reqPng = \" . $hCount['png'] . \", bytesPng = \" . $hSize['png'] .\n\t\t\", reqFlash = \" . $hCount['flash'] . \", bytesFlash = \" . $hSize['flash'] .\n\t\t\", reqFont = \" . $hCount['font'] . \", bytesFont = \" . $hSize['font'] .\n\t\t\", reqOther = \" . $hCount['other'] . \", bytesOther = \" . $hSize['other'] .\n\t\t\", reqAudio = \" . $hCount['audio'] . \", bytesAudio = \" . $hSize['audio'] .\n\t\t\", reqVideo = \" . $hCount['video'] . \", bytesVideo = \" . $hSize['video'] .\n\t\t\", reqText = \" . $hCount['text'] . \", bytesText = \" . $hSize['text'] .\n\t\t\", reqXml = \" . $hCount['xml'] . \", bytesXml = \" . $hSize['xml'] .\n\t\t\", reqWebp = \" . $hCount['webp'] . \", bytesWebp = \" . $hSize['webp'] .\n\t\t\", reqSvg = \" . $hCount['svg'] . \", bytesSvg = \" . $hSize['svg'] .\n\t\t\", numDomains = $numDomains\" .\n\t\t\", maxageNull = $maxageNull\" .\n\t\t\", maxage0 = $maxage0\" .\n\t\t\", maxage1 = $maxage1\" .\n\t\t\", maxage30 = $maxage30\" .\n\t\t\", maxage365 = $maxage365\" .\n\t\t\", maxageMore = $maxageMore\" .\n\t\t( $bytesHtmlDoc ? \", bytesHtmlDoc = $bytesHtmlDoc\" : \"\" ) .\n\t\t\", numRedirects = $numRedirects\" .\n\t\t\", numErrors = $numErrors\" .\n\t\t\", numGlibs = $numGlibs\" .\n\t\t\", numHttps = $numHttps\" .\n\t\t\", numCompressed = $numCompressed\" .\n\t\t\", maxDomainReqs = $maxDomainReqs\" .\n\t\t\", wptid = \" . \"'\" . mysqli_real_escape_string($link, $statusInfo['wptid']) . \"'\" . \n\t\t\", wptrun = \" . $statusInfo['medianRun'] . \n\t\t( $statusInfo['rank'] ? \", rank = \" . $statusInfo['rank'] : \"\" ) .\n\t\t\" where pageid = $pageid;\";\n\tdoSimpleCommand($cmd);\n\n\treturn true;\n}", "abstract protected function parseResponse($response);", "Public Function getStats($Date = '')\n\t{\n\t\tif($Date == '')\n\t\t{\n\t\t\t$Date = date('Y-m-d');\n\t\t}\n\t\t\n\t\tunlink(sys_get_temp_dir().'/cookiemonster'.md5($this->publisherLogin).'.txt');\n\t\t\n\t\tif (!$this->login()) {\n\t\t\treturn null;\n\t\t}\n\t\t\n\t\t$clicksUrl = 'https://secure.essociate.com/my/stats_export/essoc_'.date('d', strtotime($Date)).'_3_'.date('m', strtotime($Date)).'_'.date('Y', strtotime($Date)).'_default.csv?Day='.date('d', strtotime($Date)).'&ExportTable=3&Month='.date('m', strtotime($Date)).'&Year='.date('Y', strtotime($Date)).'&do=default&Export=csv';\t\t\n\t\t$conversionsUrl = 'https://secure.essociate.com/my/stats_export/essoc_'.date('d', strtotime($Date)).'_2_'.date('m', strtotime($Date)).'_'.date('Y', strtotime($Date)).'_default.csv?Day='.date('d', strtotime($Date)).'&ExportTable=2&Month='.date('m', strtotime($Date)).'&Year='.date('Y', strtotime($Date)).'&do=default&Export=csv';\n\n\t\t$clicksData = $this->getUrlData($clicksUrl);\n\t\t$conversionsData = $this->getUrlData($conversionsUrl);\n\t\t\n\t\t$clicksArray = $this->csvToArray($clicksData);\n\t\t$conversionsArray = $this->csvToArray($conversionsData);\n\n\t\t$TotalClicks = 0;\n\t\t$TotalPayout = 0;\n\t\t$TotalConversions = 0;\n\t\t\n\t\t$Output = new StatEnvelope($Date);\n\t\t\n\t\tforeach ($clicksArray as $clicks) {\n\t\t\t$OfferID = $clicks[0];\n\t\t\t$Clicks = $clicks[1];\n\t\t\t$Payout = 0;\n\t\t\t$Conversions = 0;\n\t\t\t$SubID = '';\n\t\t\t\n\t\t\tforeach ($conversionsArray as $conversions) {\n\t\t\t\tif ($conversions[0]==$clicks[0]) {\n\t\t\t\t\t$Conversions = $conversions[1];\n\t\t\t\t\t$Payout = $conversions[2];\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t$TempStat = new Stat($Clicks, $Conversions, $Payout, $SubID, $OfferID);\n\t\t\t$Output->addStatObject($TempStat);\n\t\t}\n\t\t\n\t\treturn $Output;\n\t}", "function _response_to_rss ($resp) {\n $rss = new MagpieRSS( $resp->results, MAGPIE_OUTPUT_ENCODING, MAGPIE_INPUT_ENCODING, MAGPIE_DETECT_ENCODING );\n \n // if RSS parsed successfully \n if ( $rss and !$rss->ERROR) {\n \n // find Etag, and Last-Modified\n foreach($resp->headers as $h) {\n // 2003-03-02 - Nicola Asuni (www.tecnick.com) - fixed bug \"Undefined offset: 1\"\n if (strpos($h, \": \")) {\n list($field, $val) = explode(\": \", $h, 2);\n }\n else {\n $field = $h;\n $val = \"\";\n }\n \n if ( $field == 'ETag' ) {\n $rss->etag = $val;\n }\n \n if ( $field == 'Last-Modified' ) {\n $rss->last_modified = $val;\n }\n }\n \n return $rss; \n } // else construct error message\n else {\n $errormsg = \"Failed to parse RSS file.\";\n \n if ($rss) {\n $errormsg .= \" (\" . $rss->ERROR . \")\";\n }\n error($errormsg);\n \n return false;\n } // end if ($rss and !$rss->error)\n}", "public function getMetalibInfo()\r\n\t{\r\n\t\t$this->url = $this->server . \"/X?op=retrieve_metalib_info_request\" .\r\n\t\t\t\"&view=full\" .\r\n\t\t\t\"&session_id=\" . $this->session;\r\n\t\t\r\n\t\t// load into DOM\r\n\t\t\r\n\t\t$this->xml = $this->getResponse($this->url);\r\n\t\t\r\n\t\treturn $this->xml; \r\n\t}", "private function stat_response_object() {\n\t\t\t$stats = ( new WpProQuiz_Model_StatisticMapper() )->fetchAllByRef( $this->current()->getStatisticRefId() );\n\t\t\t$stat_response = new stdClass();\n\t\t\t$stat_response->id = $this->current()->getStatisticRefId();\n\t\t\t$stat_response->quiz = $this->getQuizId();\n\t\t\t$stat_response->user = $this->current()->getUserId();\n\t\t\t$stat_response->date = mysql_to_rfc3339( wp_date( 'Y-m-d H:i:s', $this->current()->getCreateTime() ) ); //phpcs:ignore PHPCompatibility.Extensions.RemovedExtensions.mysql_DeprecatedRemoved\n\t\t\t$stat_response->answers_correct = $this->get_count( $stats, 'getCorrectCount' );\n\t\t\t$stat_response->answers_incorrect = $this->get_count( $stats, 'getIncorrectCount' );\n\t\t\t$stat_response->points_scored = $this->get_count( $stats, 'getPoints' );\n\t\t\t$stat_response->points_total = (int) $this->current()->getMapper()->fetchTotalPoints( $this->current()->getStatisticRefId() );\n\n\t\t\treturn $stat_response;\n\t\t}", "function sphinx_result_parse($res)\n {\n $id_arr = array();\n $total = $res['total'];\n if(!empty($res['matches']))\n {\n foreach($res['matches'] as $item)\n {\n array_push($id_arr, $item['id']);\n }\n }\t \t\n return array('id_arr'=>$id_arr, 'total'=>$total);\n }", "public function collectData(){\n\t\t// Simple HTML Dom is not accurate enough for the job\n\t\t$content = getContents($this->getURI())\n\t\t\tor returnServerError('No results for LWNprev');\n\n\t\tlibxml_use_internal_errors(true);\n\t\t$html = new DOMDocument();\n\t\t$html->loadHTML($content);\n\t\tlibxml_clear_errors();\n\n\t\t$cat1 = '';\n\t\t$cat2 = '';\n\n\t\tforeach($html->getElementsByTagName('a') as $a){\n\t\t\tif($a->textContent === 'Multi-page format'){\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\t$realURI = self::URI . $a->getAttribute('href');\n\t\t$URICounter = 0;\n\n\t\t$edition = $html->getElementsByTagName('h1')->item(0)->textContent;\n\t\t$editionTimeStamp = strtotime(\n\t\t\tsubstr($edition, strpos($edition, 'for ') + strlen('for '))\n\t\t);\n\n\t\tforeach($html->getElementsByTagName('h2') as $h2){\n\t\t\tif($h2->getAttribute('class') !== 'SummaryHL'){\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t$item = array();\n\n\t\t\t$h2NextSibling = $h2->nextSibling;\n\t\t\t$this->jumpToNextTag($h2NextSibling);\n\n\t\t\tswitch($h2NextSibling->getAttribute('class')){\n\t\t\tcase 'FeatureByline':\n\t\t\t\t$item['author'] = $h2NextSibling->getElementsByTagName('b')->item(0)->textContent;\n\t\t\t\tbreak;\n\t\t\tcase 'GAByline':\n\t\t\t\t$text = $h2NextSibling->textContent;\n\t\t\t\t$item['author'] = substr($text, strpos($text, 'by '));\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\t$item['author'] = 'LWN';\n\t\t\t\tbreak;\n\t\t\t};\n\n\t\t\t$h2FirstChild = $h2->firstChild;\n\t\t\t$this->jumpToNextTag($h2FirstChild);\n\t\t\tif($h2FirstChild->nodeName === 'a'){\n\t\t\t\t$item['uri'] = self::URI . $h2FirstChild->getAttribute('href');\n\t\t\t}else{\n\t\t\t\t$item['uri'] = $realURI . '#' . $URICounter;\n\t\t\t}\n\t\t\t$URICounter++;\n\n\t\t\t$item['timestamp'] = $editionTimeStamp + $URICounter;\n\n\t\t\t$h2PrevSibling = $h2->previousSibling;\n\t\t\t$this->jumpToPreviousTag($h2PrevSibling);\n\t\t\tswitch($h2PrevSibling->getAttribute('class')){\n\t\t\tcase 'Cat2HL':\n\t\t\t\t$cat2 = $h2PrevSibling->textContent;\n\t\t\t\t$h2PrevSibling = $h2PrevSibling->previousSibling;\n\t\t\t\t$this->jumpToPreviousTag($h2PrevSibling);\n\t\t\t\tif($h2PrevSibling->getAttribute('class') !== 'Cat1HL'){\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\t$cat1 = $h2PrevSibling->textContent;\n\t\t\t\tbreak;\n\t\t\tcase 'Cat1HL':\n\t\t\t\t$cat1 = $h2PrevSibling->textContent;\n\t\t\t\t$cat2 = '';\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\t$h2PrevSibling = null;\n\n\t\t\t$item['title'] = '';\n\t\t\tif(!empty($cat1)){\n\t\t\t\t$item['title'] .= '[' . $cat1 . ($cat2 ? '/' . $cat2 : '') . '] ';\n\t\t\t}\n\t\t\t$item['title'] .= $h2->textContent;\n\n\t\t\t$node = $h2;\n\t\t\t$content = '';\n\t\t\t$contentEnd = false;\n\t\t\twhile(!$contentEnd){\n\t\t\t\t$node = $node->nextSibling;\n\t\t\t\tif(!$node || (\n\t\t\t\t\t\t$node->nodeType !== XML_TEXT_NODE && (\n\t\t\t\t\t\t\t$node->nodeName === 'h2' || (\n\t\t\t\t\t\t\t\t!is_null($node->attributes) &&\n\t\t\t\t\t\t\t\t!is_null($class = $node->attributes->getNamedItem('class')) &&\n\t\t\t\t\t\t\t\tin_array($class->nodeValue, array('Cat1HL', 'Cat2HL'))\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\t$contentEnd = true;\n\t\t\t\t}else{\n\t\t\t\t\t$content .= $node->C14N();\n\t\t\t\t}\n\t\t\t}\n\t\t\t$item['content'] = $content;\n\t\t\t$this->items[] = $item;\n\t\t}\n\t}", "function get_all_stats(){\n \n $var_result['wine_count'] = get_wine_count()['wine_count'];\n $var_result['vintage_count'] = get_vintage_count()['vintage_count'];\n $var_result['note_count'] = get_note_count()['note_count'];\n $var_result['bottle_count'] = get_bottle_count()['bottle_count'];\n $var_result['acquisition_count'] = get_acquisition_count()['acquisition_count'];\n $var_result['available_count'] = $var_result['bottle_count'] - $var_result['note_count'] - get_override_count()['override_count'];\n $var_result['success']=true;\n $var_result['data']=$var_result;\n return $var_result; \n \n}", "public function get_stats()\n { \n $sql = \"SELECT COUNT(CASE WHEN `status` = 'Enabled' THEN 1 END) AS 'Enabled',\n COUNT(CASE WHEN `status` = 'Disabled' THEN 1 END) AS 'Disabled'\n FROM findmymac\n LEFT JOIN reportdata USING (serial_number)\n \".get_machine_group_filter();\n\n $queryobj = new Findmymac_model();\n $out = [];\n foreach($queryobj->query($sql)[0] as $label => $value){\n $out[] = ['label' => $label, 'count' => $value];\n }\n \n jsonView($out);\n }", "public function getStats();", "private function calculateOverRequestStatistics() : void {\n foreach ($this->statisticData as $segmentLabel => $timeSegment) {\n $stats = $this->calculateOverRequestStatisticsForTimeSegment($timeSegment);\n $this->statisticData[$segmentLabel]['stats'] = $stats;\n }\n }", "protected function parseXML($xml)\n {\n if (! $xml || ! $xml->Shipment) {\n return false;\n }\n $d = $xml->Shipment;\n $this->data['ShipmentId'] = (string) $d->ShipmentId;\n $this->data['AmazonOrderId'] = (string) $d->AmazonOrderId;\n if (isset($d->SellerOrderId)) {\n $this->data['SellerOrderId'] = (string) $d->SellerOrderId;\n }\n $this->data['Status'] = (string) $d->Status;\n if (isset($d->TrackingId)) {\n $this->data['TrackingId'] = (string) $d->TrackingId;\n }\n $this->data['CreatedDate'] = (string) $d->CreatedDate;\n if (isset($d->LastUpdatedDate)) {\n $this->data['LastUpdatedDate'] = (string) $d->LastUpdatedDate;\n }\n $this->data['Weight']['Value'] = (string) $d->Weight->Value;\n $this->data['Weight']['Unit'] = (string) $d->Weight->Unit;\n $this->data['Insurance']['Amount'] = (string) $d->Insurance->Amount;\n $this->data['Insurance']['CurrencyCode'] = (string) $d->Insurance->CurrencyCode;\n if (isset($d->Label)) {\n $this->data['Label']['Dimensions']['Length'] = (string) $d->Label->Dimensions->Length;\n $this->data['Label']['Dimensions']['Width'] = (string) $d->Label->Dimensions->Width;\n $this->data['Label']['Dimensions']['Unit'] = (string) $d->Label->Dimensions->Unit;\n $this->data['Label']['FileContents']['Contents'] = (string) $d->Label->FileContents->Contents;\n $this->data['Label']['FileContents']['FileType'] = (string) $d->Label->FileContents->FileType;\n $this->data['Label']['FileContents']['Checksum'] = (string) $d->Label->FileContents->Checksum;\n if (isset($d->Label->CustomTextForLabel)) {\n $this->data['Label']['CustomTextForLabel'] = (string) $d->Label->CustomTextForLabel;\n }\n if (isset($d->Label->LabelFormat)) {\n $this->data['Label']['LabelFormat'] = (string) $d->Label->LabelFormat;\n }\n if (isset($d->Label->StandardIdForLabel)) {\n $this->data['Label']['StandardIdForLabel'] = (string) $d->Label->StandardIdForLabel;\n }\n }\n\n $this->data['ItemList'] = [];\n foreach ($d->ItemList->children() as $x) {\n $temp = [];\n $temp['OrderItemId'] = (string) $x->OrderItemId;\n $temp['Quantity'] = (string) $x->Quantity;\n $this->data['ItemList'][] = $temp;\n }\n if (isset($d->PackageDimensions->Length)) {\n $this->data['PackageDimensions']['Length'] = (string) $d->PackageDimensions->Length;\n $this->data['PackageDimensions']['Width'] = (string) $d->PackageDimensions->Width;\n $this->data['PackageDimensions']['Height'] = (string) $d->PackageDimensions->Height;\n $this->data['PackageDimensions']['Unit'] = (string) $d->PackageDimensions->Unit;\n }\n if (isset($d->PackageDimensions->PredefinedPackageDimensions)) {\n $this->data['PackageDimensions']['PredefinedPackageDimensions'] = (string) $d->PackageDimensions->PredefinedPackageDimensions;\n }\n\n //Ship From Address\n $this->data['ShipFromAddress']['Name'] = (string) $d->ShipFromAddress->Name;\n $this->data['ShipFromAddress']['AddressLine1'] = (string) $d->ShipFromAddress->AddressLine1;\n if (isset($d->ShipFromAddress->AddressLine3)) {\n $this->data['ShipFromAddress']['AddressLine2'] = (string) $d->ShipFromAddress->AddressLine2;\n }\n if (isset($d->ShipFromAddress->AddressLine3)) {\n $this->data['ShipFromAddress']['AddressLine2'] = (string) $d->ShipFromAddress->AddressLine3;\n }\n if (isset($d->ShipFromAddress->DistrictOrCounty)) {\n $this->data['ShipFromAddress']['DistrictOrCounty'] = (string) $d->ShipFromAddress->DistrictOrCounty;\n }\n $this->data['ShipFromAddress']['Email'] = (string) $d->ShipFromAddress->Email;\n $this->data['ShipFromAddress']['City'] = (string) $d->ShipFromAddress->City;\n if (isset($d->ShipFromAddress->StateOrProvinceCode)) {\n $this->data['ShipFromAddress']['StateOrProvinceCode'] = (string) $d->ShipFromAddress->StateOrProvinceCode;\n }\n $this->data['ShipFromAddress']['PostalCode'] = (string) $d->ShipFromAddress->PostalCode;\n $this->data['ShipFromAddress']['CountryCode'] = (string) $d->ShipFromAddress->CountryCode;\n $this->data['ShipFromAddress']['Phone'] = (string) $d->ShipFromAddress->Phone;\n\n //Ship To Address\n $this->data['ShipToAddress']['Name'] = (string) $d->ShipToAddress->Name;\n $this->data['ShipToAddress']['AddressLine1'] = (string) $d->ShipToAddress->AddressLine1;\n if (isset($d->ShipToAddress->AddressLine3)) {\n $this->data['ShipToAddress']['AddressLine2'] = (string) $d->ShipToAddress->AddressLine2;\n }\n if (isset($d->ShipToAddress->AddressLine3)) {\n $this->data['ShipToAddress']['AddressLine2'] = (string) $d->ShipToAddress->AddressLine3;\n }\n if (isset($d->ShipToAddress->DistrictOrCounty)) {\n $this->data['ShipToAddress']['DistrictOrCounty'] = (string) $d->ShipToAddress->DistrictOrCounty;\n }\n $this->data['ShipToAddress']['Email'] = (string) $d->ShipToAddress->Email;\n $this->data['ShipToAddress']['City'] = (string) $d->ShipToAddress->City;\n if (isset($d->ShipToAddress->StateOrProvinceCode)) {\n $this->data['ShipToAddress']['StateOrProvinceCode'] = (string) $d->ShipToAddress->StateOrProvinceCode;\n }\n $this->data['ShipToAddress']['PostalCode'] = (string) $d->ShipToAddress->PostalCode;\n $this->data['ShipToAddress']['CountryCode'] = (string) $d->ShipToAddress->CountryCode;\n $this->data['ShipToAddress']['Phone'] = (string) $d->ShipToAddress->Phone;\n\n //Service\n $this->data['ShippingService']['ShippingServiceName'] = (string) $d->ShippingService->ShippingServiceName;\n $this->data['ShippingService']['CarrierName'] = (string) $d->ShippingService->CarrierName;\n $this->data['ShippingService']['ShippingServiceId'] = (string) $d->ShippingService->ShippingServiceId;\n $this->data['ShippingService']['ShippingServiceOfferId'] = (string) $d->ShippingService->ShippingServiceOfferId;\n $this->data['ShippingService']['ShipDate'] = (string) $d->ShippingService->ShipDate;\n if (isset($d->ShippingService->EarliestEstimatedDeliveryDate)) {\n $this->data['ShippingService']['EarliestEstimatedDeliveryDate'] = (string) $d->ShippingService->EarliestEstimatedDeliveryDate;\n }\n if (isset($d->ShippingService->LatestEstimatedDeliveryDate)) {\n $this->data['ShippingService']['LatestEstimatedDeliveryDate'] = (string) $d->ShippingService->LatestEstimatedDeliveryDate;\n }\n $this->data['ShippingService']['Rate']['Amount'] = (string) $d->ShippingService->Rate->Amount;\n $this->data['ShippingService']['Rate']['CurrencyCode'] = (string) $d->ShippingService->Rate->CurrencyCode;\n $this->data['ShippingService']['DeliveryExperience'] = (string) $d->ShippingService->ShippingServiceOptions->DeliveryExperience;\n $this->data['ShippingService']['CarrierWillPickUp'] = (string) $d->ShippingService->ShippingServiceOptions->CarrierWillPickUp;\n if (isset($d->ShippingService->ShippingServiceOptions->DeclaredValue)) {\n $this->data['ShippingService']['DeclaredValue']['Amount'] = (string) $d->ShippingService->ShippingServiceOptions->DeclaredValue->Amount;\n $this->data['ShippingService']['DeclaredValue']['CurrencyCode'] = (string) $d->ShippingService->ShippingServiceOptions->DeclaredValue->CurrencyCode;\n }\n }", "function wpcom_vip_get_stats_xml( $table = 'views', $end_date = false, $num_days = 1, $and = '', $limit = 5, $summarize = NULL ) {\n _deprecated_function( __FUNCTION__, '2.0.0' );\n\n\treturn null;\n}", "public function gatherFileStatistics($filename)\n {\n $stats = array();\n\n $file = $this->findTargetFile($filename);\n\n if (null === $file) {\n return $stats;\n }\n\n // Basically converts the XML statistics for a file into an array we can\n // traverse more easily, indexed by line number\n //\n // Example : <line num=\"185\" type=\"stmt\" count=\"6\"/>\n // Possible attributes are:\n // - num\n // - type (stmt, method)\n // - name (if method type, the name of the method)\n // - crap (?)\n // - count (count of executions for this line)\n //\n foreach ($file->line as $line) {\n $lineObject = new StdClass();\n\n foreach ($line->attributes() as $key => $value) {\n $lineObject->{$key} = (string) $value;\n }\n\n $lineNumber = (int) $line['num'];\n\n $stats[$lineNumber] = $lineObject;\n }\n\n return $stats;\n }", "function _parserResult($resultXML) {\r\n \t$statusMessage = substr($resultXML, strpos($resultXML, \"<statusMessage>\")+strlen(\"<statusMessage>\"), strpos($resultXML, \"</statusMessage>\")-strlen(\"<statusMessage>\")-strpos($resultXML, \"<statusMessage>\"));\r\n \t//print \"message = $statusMessage\";\r\n\t$cphandling = substr($resultXML, strpos($resultXML, \"<handling>\")+strlen(\"<handling>\"), strpos($resultXML, \"</handling>\")-strlen(\"<handling>\")-strpos($resultXML, \"<handling>\"));\r\n\t$this->handling_cp = $cphandling;\r\n \tif ($statusMessage == 'OK') {\r\n \t\t$strProduct = substr($resultXML, strpos($resultXML, \"<product id=\")+strlen(\"<product id=>\"), strpos($resultXML, \"</product>\")-strlen(\"<product id=>\")-strpos($resultXML, \"<product id=\"));\r\n \t\t$index = 0;\r\n \t\t$aryProducts = false;\r\n \t\twhile (strpos($resultXML, \"</product>\")) {\r\n\t\t\t$cpnumberofboxes = substr_count($resultXML, \"<expediterWeight\");\r\n\t\t\t$this->boxCount = $cpnumberofboxes;\r\n \t\t\t$name = substr($resultXML, strpos($resultXML, \"<name>\")+strlen(\"<name>\"), strpos($resultXML, \"</name>\")-strlen(\"<name>\")-strpos($resultXML, \"<name>\"));\r\n \t\t\t$rate = substr($resultXML, strpos($resultXML, \"<rate>\")+strlen(\"<rate>\"), strpos($resultXML, \"</rate>\")-strlen(\"<rate>\")-strpos($resultXML, \"<rate>\"));\r\n \t\t\t$shippingDate = substr($resultXML, strpos($resultXML, \"<shippingDate>\")+strlen(\"<shippingDate>\"), strpos($resultXML, \"</shippingDate>\")-strlen(\"<shippingDate>\")-strpos($resultXML, \"<shippingDate>\"));\r\n \t\t\t$deliveryDate = substr($resultXML, strpos($resultXML, \"<deliveryDate>\")+strlen(\"<deliveryDate>\"), strpos($resultXML, \"</deliveryDate>\")-strlen(\"<deliveryDate>\")-strpos($resultXML, \"<deliveryDate>\"));\r\n \t\t\t$deliveryDayOfWeek = substr($resultXML, strpos($resultXML, \"<deliveryDayOfWeek>\")+strlen(\"<deliveryDayOfWeek>\"), strpos($resultXML, \"</deliveryDayOfWeek>\")-strlen(\"<deliveryDayOfWeek>\")-strpos($resultXML, \"<deliveryDayOfWeek>\"));\r\n \t\t\t$nextDayAM = substr($resultXML, strpos($resultXML, \"<nextDayAM>\")+strlen(\"<nextDayAM>\"), strpos($resultXML, \"</nextDayAM>\")-strlen(\"<nextDayAM>\")-strpos($resultXML, \"<nextDayAM>\"));\r\n \t\t\t$packingID = substr($resultXML, strpos($resultXML, \"<packingID>\")+strlen(\"<packingID>\"), strpos($resultXML, \"</packingID>\")-strlen(\"<packingID>\")-strpos($resultXML, \"<packingID>\"));\r\n \t\t\t$aryProducts[$index] = array( $name . ', ' . $deliveryDate => $rate);\r\n \t\t\t$index++;\r\n \t\t\t$resultXML = substr($resultXML, strpos($resultXML, \"</product>\") + strlen(\"</product>\"));\r\n \t\t}\r\n \t\treturn $aryProducts;\r\n \t} else {\r\n \t\tif (strpos($resultXML, \"<error>\")) return $statusMessage;\r\n \t\telse return false;\r\n \t}\r\n }", "public function getStats(Request $request)\n {\n $this->validate($request, [\n 'keyword' => 'required|integer',\n 'sites' => 'required|array',\n 'dates' => 'required|array',\n 'dates.beginDate' => 'required|string|max:50',\n 'dates.endDate' => 'required|string|max:50',\n ]);\n\n $keyword = Keyword::findOrFail($request->get('keyword'));\n $sites = Site::findOrFail($request->get('sites'));\n $beginDate = Carbon::createFromFormat(Carbon::RSS, $request->get('dates')['beginDate'])->startOfDay();\n $endDate = Carbon::createFromFormat(Carbon::RSS, $request->get('dates')['endDate'])->addDay()->endOfDay();\n\n $faker = \\Faker\\Factory::create();\n $candleSize = 3; // skip this many hours\n\n $result = collect();\n foreach ($sites ?? [] as $site) {\n $siteKeywordCounts = KeywordCount::where('site_id', $site->id)\n ->where('keyword_id', $keyword->id)\n ->whereBetween('scrape_date', [$beginDate, $endDate])\n ->select(['count', 'scrape_date'])\n ->get();\n\n $siteKeywordCounts = $siteKeywordCounts->filter(function ($value) {\n return $value->scrape_date->hour <= 22 && $value->scrape_date->hour >= 7;\n })->nth($candleSize);\n\n $result->push([\n 'label' => $site->title,\n 'backgroundColor' => 'rgba(' . $faker->rgbColor . ',0.3)',\n 'data' => $siteKeywordCounts->pluck('count'),\n ]);\n }\n\n // Get every 3 hours between (begin and end date) 7:00, 10:00, 13:00, 16:00, 19:00, 22:00\n $labels = collect();\n for($currentDate = $beginDate; $currentDate->lte($endDate); $currentDate->addHours($candleSize)) {\n if( $currentDate->hour <= 22 && $currentDate->hour >= 7){\n $labels->push($currentDate->format('Y-m-d H:i'));\n }\n }\n\n $result = [\n 'labels' => $labels->toArray(),\n 'datasets' => $result->toArray(),\n ];\n\n return json_encode(['data' => $result]);\n }", "protected function get_response_counts($response) {\n $found = 0;\n $included = 0;\n\n if (isset($response->grouped->solr_filegroupingid->ngroups)) {\n // Get the number of results for file grouped queries.\n $found = $response->grouped->solr_filegroupingid->ngroups;\n $included = count($response->grouped->solr_filegroupingid->groups);\n } else if (isset($response->response->numFound)) {\n // Get the number of results for standard queries.\n $found = $response->response->numFound;\n if ($found > 0 && is_array($response->response->docs)) {\n $included = count($response->response->docs);\n }\n }\n\n return array($included, $found);\n }", "function apsa_ajax_get_element_statistics() {\n\n $from = $_POST[\"from\"];\n if (empty($from)) {\n $from = FALSE;\n }\n\n $to = $_POST[\"to\"];\n if (empty($to)) {\n $to = FALSE;\n }\n\n $element_id = $_POST[\"element_id\"];\n\n $statistics = apsa_get_element_statistics($element_id, $from, $to);\n\n echo json_encode($statistics);\n\n wp_die();\n}", "public static function fromXml(string $xml, AbstractResponse $response = null) : AbstractResponse\n {\n // Force an object.\n $response = $response ?? new GetPostageLabelRequestResponse();\n\n try {\n parent::fromXml($xml, $response);\n\n $xml = str_replace('www.envmgr.com/LabelService', '', $xml);\n \n $dom = new \\DOMDocument();\n $dom->loadXML($xml);\n\n $xp = new \\DOMXPath($dom);\n\n // If it's a failure we're done.\n if(!$response->isSuccessful()) {\n return $response;\n }\n\n /*\n * Validate/Set Label Image data\n */\n $b64ImageNodeList = $xp->query('Base64LabelImage');\n\t\t\tif($b64ImageNodeList->length == 1) {\n \t// we found the image as a single run of data\n\t\t\t\t$response->encodedImageData = $b64ImageNodeList[0]->nodeValue;\n\t\t\t} else {\n\t\t\t\t// a successful label but the label is not in Base64LabelImage\n\t\t\t\t// that means the Label node must exist and contain one or more chunks\n\t\t\t\t$labelNodeList = $xp->query('Label');\n\t\t\t\tif($labelNodeList->length != 1) {\n\t throw new InvalidArgumentException('API indicated a successful response but returned no label data');\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$response->imageFragments = array();\n\t\t\t\t$imageFragments = $labelNodeList[0]->childNodes;\n\t\t\t\tforeach($imageFragments as $fragment) {\n\t\t\t\t\t$index = $fragment->getAttribute('PartNumber');\n\t\t\t\t\t$response->imageFragments[$index] = $fragment->textContent;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n /*\n * Validate/Set Tracking Number\n */\n $trackingNumberNodeList = $xp->query('TrackingNumber');\n if($trackingNumberNodeList->length == 0) {\n throw new InvaliArgumentException('Response did not contain a Tracking Number');\n }\n\n $response->setTrackingNumber($trackingNumberNodeList[0]->textContent);\n\t\t\t\n return $response;\n } catch(\\Exception $e) {\n throw new InvalidArgumentException('Invalid LabelRequestResponse XML. ' . $e->getMessage(), null, $e);\n }\n }", "protected function parseXml($xml)\n {\n if (! $xml) {\n return false;\n }\n if (isset($xml->ShipmentEventList)) {\n foreach ($xml->ShipmentEventList->children() as $x) {\n $this->list['Shipment'][] = $this->parseShipmentEvent($x);\n }\n }\n if (isset($xml->RefundEventList)) {\n foreach ($xml->RefundEventList->children() as $x) {\n $this->list['Refund'][] = $this->parseShipmentEvent($x);\n }\n }\n if (isset($xml->GuaranteeClaimEventList)) {\n foreach ($xml->GuaranteeClaimEventList->children() as $x) {\n $this->list['GuaranteeClaim'][] = $this->parseShipmentEvent($x);\n }\n }\n if (isset($xml->ChargebackEventList)) {\n foreach ($xml->ChargebackEventList->children() as $x) {\n $this->list['Chargeback'][] = $this->parseShipmentEvent($x);\n }\n }\n if (isset($xml->PayWithAmazonEventList)) {\n foreach ($xml->PayWithAmazonEventList->children() as $x) {\n $temp = [];\n $temp['SellerOrderId'] = (string) $x->SellerOrderId;\n $temp['TransactionPostedDate'] = (string) $x->TransactionPostedDate;\n $temp['BusinessObjectType'] = (string) $x->BusinessObjectType;\n $temp['SalesChannel'] = (string) $x->SalesChannel;\n $temp['Charge'] = $this->parseCharge($x->Charge);\n if (isset($x->FeeList)) {\n foreach ($x->FeeList->children() as $z) {\n $temp['FeeList'][] = $this->parseFee($z);\n }\n }\n $temp['PaymentAmountType'] = (string) $x->PaymentAmountType;\n $temp['AmountDescription'] = (string) $x->AmountDescription;\n $temp['FulfillmentChannel'] = (string) $x->FulfillmentChannel;\n $temp['StoreName'] = (string) $x->StoreName;\n $this->list['PayWithAmazon'][] = $temp;\n }\n }\n if (isset($xml->ServiceProviderCreditEventList)) {\n foreach ($xml->ServiceProviderCreditEventList->children() as $x) {\n $temp = [];\n $temp['ProviderTransactionType'] = (string) $x->ProviderTransactionType;\n $temp['SellerOrderId'] = (string) $x->SellerOrderId;\n $temp['MarketplaceId'] = (string) $x->MarketplaceId;\n $temp['MarketplaceCountryCode'] = (string) $x->MarketplaceCountryCode;\n $temp['SellerId'] = (string) $x->SellerId;\n $temp['SellerStoreName'] = (string) $x->SellerStoreName;\n $temp['ProviderId'] = (string) $x->ProviderId;\n $temp['ProviderStoreName'] = (string) $x->ProviderStoreName;\n $this->list['ServiceProviderCredit'][] = $temp;\n }\n }\n if (isset($xml->RetrochargeEventList)) {\n foreach ($xml->RetrochargeEventList->children() as $x) {\n $temp = [];\n $temp['RetrochargeEventType'] = (string) $x->RetrochargeEventType;\n $temp['AmazonOrderId'] = (string) $x->AmazonOrderId;\n $temp['PostedDate'] = (string) $x->PostedDate;\n $temp['BaseTax']['Amount'] = (string) $x->BaseTax->CurrencyAmount;\n $temp['BaseTax']['CurrencyCode'] = (string) $x->BaseTax->CurrencyCode;\n $temp['ShippingTax']['Amount'] = (string) $x->ShippingTax->CurrencyAmount;\n $temp['ShippingTax']['CurrencyCode'] = (string) $x->ShippingTax->CurrencyCode;\n $temp['MarketplaceName'] = (string) $x->MarketplaceName;\n $this->list['Retrocharge'][] = $temp;\n }\n }\n if (isset($xml->RentalTransactionEventList)) {\n foreach ($xml->RentalTransactionEventList->children() as $x) {\n $temp = [];\n $temp['AmazonOrderId'] = (string) $x->AmazonOrderId;\n $temp['RentalEventType'] = (string) $x->RentalEventType;\n $temp['ExtensionLength'] = (string) $x->ExtensionLength;\n $temp['PostedDate'] = (string) $x->PostedDate;\n if (isset($x->RentalChargeList)) {\n foreach ($x->RentalChargeList->children() as $z) {\n $temp['RentalChargeList'][] = $this->parseCharge($z);\n }\n }\n if (isset($x->RentalFeeList)) {\n foreach ($x->RentalFeeList->children() as $z) {\n $temp['RentalFeeList'][] = $this->parseFee($z);\n }\n }\n $temp['MarketplaceName'] = (string) $x->MarketplaceName;\n if (isset($x->RentalInitialValue)) {\n $temp['RentalInitialValue']['Amount'] = (string) $x->RentalInitialValue->CurrencyAmount;\n $temp['RentalInitialValue']['CurrencyCode'] = (string) $x->RentalInitialValue->CurrencyCode;\n }\n if (isset($x->RentalReimbursement)) {\n $temp['RentalReimbursement']['Amount'] = (string) $x->RentalReimbursement->CurrencyAmount;\n $temp['RentalReimbursement']['CurrencyCode'] = (string) $x->RentalReimbursement->CurrencyCode;\n }\n $this->list['RentalTransaction'][] = $temp;\n }\n }\n if (isset($xml->PerformanceBondRefundEventList)) {\n foreach ($xml->PerformanceBondRefundEventList->children() as $x) {\n $temp = [];\n $temp['MarketplaceCountryCode'] = (string) $x->MarketplaceCountryCode;\n $temp['Amount'] = (string) $x->Amount->CurrencyAmount;\n $temp['CurrencyCode'] = (string) $x->Amount->CurrencyCode;\n if (isset($x->ProductGroupList)) {\n foreach ($x->ProductGroupList->children() as $z) {\n $temp['ProductGroupList'][] = (string) $z;\n }\n }\n $this->list['PerformanceBondRefund'][] = $temp;\n }\n }\n if (isset($xml->ServiceFeeEventList)) {\n foreach ($xml->ServiceFeeEventList->children() as $x) {\n $temp = [];\n $temp['AmazonOrderId'] = (string) $x->AmazonOrderId;\n $temp['FeeReason'] = (string) $x->FeeReason;\n if (isset($x->FeeList)) {\n foreach ($x->FeeList->children() as $z) {\n $temp['FeeList'][] = $this->parseFee($z);\n }\n }\n $temp['SellerSKU'] = (string) $x->SellerSKU;\n $temp['FnSKU'] = (string) $x->FnSKU;\n $temp['FeeDescription'] = (string) $x->FeeDescription;\n $temp['ASIN'] = (string) $x->ASIN;\n $this->list['ServiceFee'][] = $temp;\n }\n }\n if (isset($xml->DebtRecoveryEventList)) {\n foreach ($xml->DebtRecoveryEventList->children() as $x) {\n $temp = [];\n $temp['DebtRecoveryType'] = (string) $x->DebtRecoveryType;\n $temp['RecoveryAmount']['Amount'] = (string) $x->RecoveryAmount->CurrencyAmount;\n $temp['RecoveryAmount']['CurrencyCode'] = (string) $x->RecoveryAmount->CurrencyCode;\n $temp['OverPaymentCredit']['Amount'] = (string) $x->OverPaymentCredit->CurrencyAmount;\n $temp['OverPaymentCredit']['CurrencyCode'] = (string) $x->OverPaymentCredit->CurrencyCode;\n if (isset($x->DebtRecoveryItemList)) {\n foreach ($x->DebtRecoveryItemList->children() as $z) {\n $ztemp = [];\n $ztemp['RecoveryAmount']['Amount'] = (string) $z->RecoveryAmount->CurrencyAmount;\n $ztemp['RecoveryAmount']['CurrencyCode'] = (string) $z->RecoveryAmount->CurrencyCode;\n $ztemp['OriginalAmount']['Amount'] = (string) $z->OriginalAmount->CurrencyAmount;\n $ztemp['OriginalAmount']['CurrencyCode'] = (string) $z->OriginalAmount->CurrencyCode;\n $ztemp['GroupBeginDate'] = (string) $z->GroupBeginDate;\n $ztemp['GroupEndDate'] = (string) $z->GroupEndDate;\n $temp['DebtRecoveryItemList'][] = $ztemp;\n }\n }\n if (isset($x->ChargeInstrumentList)) {\n foreach ($x->ChargeInstrumentList->children() as $z) {\n $ztemp = [];\n $ztemp['Description'] = (string) $z->Description;\n $ztemp['Tail'] = (string) $z->Tail;\n $ztemp['Amount'] = (string) $z->Amount->CurrencyAmount;\n $ztemp['CurrencyCode'] = (string) $z->Amount->CurrencyCode;\n $temp['ChargeInstrumentList'][] = $ztemp;\n }\n }\n $this->list['DebtRecovery'][] = $temp;\n }\n }\n if (isset($xml->LoanServicingEventList)) {\n foreach ($xml->LoanServicingEventList->children() as $x) {\n $temp = [];\n $temp['Amount'] = (string) $x->LoanAmount->CurrencyAmount;\n $temp['CurrencyCode'] = (string) $x->LoanAmount->CurrencyCode;\n $temp['SourceBusinessEventType'] = (string) $x->SourceBusinessEventType;\n $this->list['LoanServicing'][] = $temp;\n }\n }\n if (isset($xml->AdjustmentEventList)) {\n foreach ($xml->AdjustmentEventList->children() as $x) {\n $temp = [];\n $temp['AdjustmentType'] = (string) $x->AdjustmentType;\n $temp['Amount'] = (string) $x->AdjustmentAmount->CurrencyAmount;\n $temp['CurrencyCode'] = (string) $x->AdjustmentAmount->CurrencyCode;\n if (isset($x->AdjustmentItemList)) {\n foreach ($x->AdjustmentItemList->children() as $z) {\n $ztemp = [];\n $ztemp['Quantity'] = (string) $z->Quantity;\n $ztemp['PerUnitAmount']['Amount'] = (string) $z->PerUnitAmount->CurrencyAmount;\n $ztemp['PerUnitAmount']['CurrencyCode'] = (string) $z->PerUnitAmount->CurrencyCode;\n $ztemp['TotalAmount']['Amount'] = (string) $z->TotalAmount->CurrencyAmount;\n $ztemp['TotalAmount']['CurrencyCode'] = (string) $z->TotalAmount->CurrencyCode;\n $ztemp['SellerSKU'] = (string) $z->SellerSKU;\n $ztemp['FnSKU'] = (string) $z->FnSKU;\n $ztemp['ProductDescription'] = (string) $z->ProductDescription;\n $ztemp['ASIN'] = (string) $z->ASIN;\n $temp['AdjustmentItemList'][] = $ztemp;\n }\n }\n $this->list['Adjustment'][] = $temp;\n }\n }\n if (isset($xml->SAFETReimbursementEventList)) {\n foreach ($xml->SAFETReimbursementEventList->children() as $x) {\n $temp = [];\n $temp['PostedDate'] = (string) $x->PostedDate;\n $temp['SAFETClaimId'] = (string) $x->SAFETClaimId;\n $temp['Amount'] = (string) $x->ReimbursedAmount->CurrencyAmount;\n $temp['CurrencyCode'] = (string) $x->ReimbursedAmount->CurrencyCode;\n $temp['SAFETReimbursementItemList'] = [];\n if (isset($x->SAFETReimbursementItemList)) {\n foreach ($x->SAFETReimbursementItemList->children() as $y) {\n if (! isset($y->ItemChargeList)) {\n continue;\n }\n $ztemp = [];\n foreach ($y->ItemChargeList->children() as $z) {\n $ztemp['ItemChargeList'][] = $this->parseCharge($z);\n }\n $temp['SAFETReimbursementItemList'][] = $ztemp;\n }\n }\n $this->list['SAFET'][] = $temp;\n }\n }\n }", "public function run()\n {\n \\Yii::$app->response->format = Response::FORMAT_XML;\n return $this->samlSsoComponent->getMetadata();\n }", "private function process(HttpSocketResponse $response)\n\t{\n\t\t$result = array();\n\t\tif (!empty($response)) {\n\t\t\t$body = $response->body();\n\t\t\tswitch ($this->format) {\n\t\t\t\tcase 'xml':\n\t\t\t\t\t$xml = Xml::build($body);\n\t\t\t\t\t$temp = Xml::toArray($xml);\n\t\t\t\t\t$result = array('Yourls' => $temp['result']);\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'json':\n\t\t\t\t\t$result = array('Yourls' => json_decode($body, true));\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\t$result = $body;\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\treturn $result;\n\t}", "private function load(){\n\n $xml = simplexml_load_string($this->response);\n if($xml){\n if(!$this->isResponseSuccessFull($xml)) {\n\n $item = $xml->Items->Item;\n\n $this->data['title'] = $item->ItemAttributes->Title->__toString();\n $this->data['ean'] = $item->ItemAttributes->EAN->__toString();\n $this->data['brand'] = $item->ItemAttributes->Brand->__toString();\n $this->data['picture'] = $item->SmallImage->URL->__toString();\n $this->data['asin'] = $item->ASIN->__toString();\n $this->data['price'] = round(((int)$item->ItemAttributes->ListPrice->Amount->__toString()) / 100,2);\n }\n }else{\n $this->errorMessage[] = 'can not load xml.';\n }\n }", "public function getData() : ResponseInterface\n\t{\n\t\t$start = $this->statsAveragedUsageModel->getStart();\n\t\t$end = $this->statsAveragedUsageModel->getEnd();\n\t\t$format = $this->statsAveragedUsageModel->getFormat();\n\t\t$rating = $this->statsAveragedUsageModel->getRating();\n\n\t\t$formatter = $this->formatterFactory->createFor(\n\t\t\t$this->statsAveragedUsageModel->getLanguageId()\n\t\t);\n\n\t\t// Get usage data and sort by rank.\n\t\t$usageDatas = $this->statsAveragedUsageModel->getUsageDatas();\n\t\tuasort(\n\t\t\t$usageDatas,\n\t\t\tfunction (UsageData $a, UsageData $b) : int {\n\t\t\t\treturn $a->getRank() <=> $b->getRank();\n\t\t\t}\n\t\t);\n\n\t\t// Compile all usage data into the right form.\n\t\t$data = [];\n\t\tforeach ($usageDatas as $usageData) {\n\t\t\t$data[] = [\n\t\t\t\t'rank' => $usageData->getRank(),\n\t\t\t\t'name' => $usageData->getPokemonName(),\n\t\t\t\t'showMovesetLink' => $usageData->getMonths() > 0,\n\t\t\t\t'identifier' => $usageData->getPokemonIdentifier(),\n\t\t\t\t'icon' => $usageData->getFormIcon(),\n\t\t\t\t'usagePercent' => $formatter->formatPercent($usageData->getUsagePercent()),\n\t\t\t\t'raw' => $formatter->formatNumber($usageData->getRaw()),\n\t\t\t\t'rawPercent' => $formatter->formatPercent($usageData->getRawPercent()),\n\t\t\t\t'real' => $formatter->formatNumber($usageData->getReal()),\n\t\t\t\t'realPercent' => $formatter->formatPercent($usageData->getRealPercent()),\n\t\t\t];\n\t\t}\n\n\t\t// Navigation breadcrumbs.\n\t\t$breadcrumbs = [\n\t\t\t[\n\t\t\t\t'url' => '/stats',\n\t\t\t\t'text' => 'Stats',\n\t\t\t],\n\t\t\t[\n\t\t\t\t'text' => 'Formats',\n\t\t\t],\n\t\t\t[\n\t\t\t\t'text' => $format->getName(),\n\t\t\t],\n\t\t];\n\n\t\t$content = $this->renderer->render(\n\t\t\t'html/stats/averaged-usage.twig',\n\t\t\t$this->baseView->getBaseVariables() + [\n\t\t\t\t'start' => $start,\n\t\t\t\t'end' => $end,\n\t\t\t\t'format' => [\n\t\t\t\t\t'identifier' => $format->getIdentifier(),\n\t\t\t\t\t'name' => $format->getName(),\n\t\t\t\t],\n\t\t\t\t'rating' => $rating,\n\n\t\t\t\t'breadcrumbs' => $breadcrumbs,\n\n\t\t\t\t'ratings' => $this->statsAveragedUsageModel->getRatings(),\n\n\t\t\t\t'showLeadsLink' => $this->statsAveragedUsageModel->doesLeadsDataExist(),\n\n\t\t\t\t// The main data.\n\t\t\t\t'data' => $data,\n\t\t\t]\n\t\t);\n\n\t\treturn new HtmlResponse($content);\n\t}", "protected function get_stats()\n\t{\n\t\tif ($this->index_created())\n\t\t{\n\t\t\t$sql = 'SELECT COUNT(post_id) as total_posts\n\t\t\t\tFROM ' . POSTS_TABLE;\n\t\t\t$result = $this->db->sql_query($sql);\n\t\t\t$this->stats['total_posts'] = (int) $this->db->sql_fetchfield('total_posts');\n\t\t\t$this->db->sql_freeresult($result);\n\n\t\t\t$sql = 'SELECT COUNT(p.post_id) as main_posts\n\t\t\t\tFROM ' . POSTS_TABLE . ' p, ' . SPHINX_TABLE . ' m\n\t\t\t\tWHERE p.post_id <= m.max_doc_id\n\t\t\t\t\tAND m.counter_id = 1';\n\t\t\t$result = $this->db->sql_query($sql);\n\t\t\t$this->stats['main_posts'] = (int) $this->db->sql_fetchfield('main_posts');\n\t\t\t$this->db->sql_freeresult($result);\n\t\t}\n\t}", "private function xml() {\n if( $this->format === 'text/hal+xml' ) {\n header('Content-Type: text/hal+xml; charset=utf-8', TRUE, $this->status);\n $hal_response = (new Resource())\n ->setURI(\"/{$this->resource}\". (isset($this->filters['id']) ? $this->filters['id'] : ''))\n ->setLink($this->resource, new Link(\"/{$this->resource}\"))\n ->setData($this->content);\n\n $writer = new Hal\\XmlWriter(true);\n \n return $writer->execute($hal_response);\n } else {\n header('Content-Type: text/xml; charset=utf-8', TRUE, $this->status);\n $xml_data = new \\SimpleXMLElement('<?xml version=\"1.0\"?><data></data>');\n static::array_to_xml($this->content,$xml_data);\n \n return $xml_data->asXML();\n }\n \n }", "public function stats() {\n\t\techo \"<p>\";\n\t\techo \"<strong>Cache Hits:</strong> {$this->cache_hits}<br />\";\n\t\techo \"<strong>Cache Misses:</strong> {$this->cache_misses}<br />\";\n\t\techo \"</p>\";\n\t\techo '<ul>';\n\t\tforeach ( $this->cache as $group => $cache ) {\n\t\t\techo \"<li><strong>Group:</strong> $group - ( \" . number_format( strlen( serialize( $cache ) ) / 1024, 2 ) . 'k )</li>';\n\t\t}\n\t\techo '</ul>';\n\t}", "public function getXMLResponse() {\n return \\Lib\\Format::forge($this->_response)->to_xml();\n }", "public function statistics()\n {\n $places = $this->placeRepository->makeModel();\n\n $confirmed_places = $places->where('confirmed', true)->count();\n $unconfirmed_places = $places->where('confirmed', false)->count();\n $trashed_places = $places->onlyTrashed()->count();\n\n $clients = $this->clientRepository->all()->count();\n $admins = $this->userRepository->all()->count();\n $oracles = $this->oracleUserRepository->all()->count();\n\n $owner_requests = $this->ownerRequestRepository->all()->count();\n $advertisers = $this->advertiserRepository->all()->count();\n $service_ads = $this->adRepository->all()->count();\n\n $data = [\n 'confirmed_places' => $confirmed_places,\n 'unconfirmed_places' => $unconfirmed_places,\n 'trashed_places' => $trashed_places,\n 'clients' => $clients,\n 'admins' => $admins,\n 'oracles' => $oracles,\n 'owner_requests' => $owner_requests,\n 'advertisers' => $advertisers,\n 'service_ads' => $service_ads\n ];\n\n if (request()->wantsJson()) {\n\n return response()->json($data);\n }\n }", "public function processResponse(\\SimpleXMLElement $response)\n {\n $this->data = array(\n 'bucket' => (string)$response->Bucket,\n 'key' => (string)$response->Key,\n 'upload_id' => (string)$response->UploadId,\n 'part_number_marker' => (string)$response->PartNumberMarker,\n 'next_token' => (string)$response->NextPartNumberMarker,\n 'is_truncated' => (((string)$response->IsTruncated == 'true') ? true : false),\n 'storage_class' => (string)$response->StorageClass,\n 'owner' => array(\n 'id' => (string)$response->Owner->ID,\n 'display_name' => (string)$response->Owner->DisplayName,\n ),\n 'initiator' => array(\n 'id' => (string)$response->Initiator->ID,\n 'display_name' => (string)$response->Initiator->DisplayName,\n )\n );\n\n $this->pageSize = (string)$response->MaxParts;\n\n if (!isset($this->data['resources'])) {\n $this->data['resources'] = array();\n }\n\n if ($response->Part) {\n foreach ($response->Part as $obj) {\n $this->data['resources'][] = $objData = array(\n 'part_number' => (string)$obj->PartNumber,\n 'last_modified' => (string)$obj->LastModified,\n 'etag' => str_replace('\"', '', (string)$obj->ETag),\n 'size' => (int)$obj->Size\n );\n }\n }\n }", "public function build_xml_map() {\n $this->_create_map();\n header(\"content-type: text/xml\");\n echo $this->result;\n }", "function xmlbody(){\n\t\t$this->xm(\"<generalinfo>\");\n\t\t$this->p(\"name\",$_SERVER['SERVER_NAME']);\n\t\t$this->p(\"ip_addr\",$_SERVER['SERVER_ADDR'].\":\".$_SERVER['SERVER_PORT']);\n\t\t$this->p(\"host\", $_ENV['HOSTNAME']);\n\t\t$this->p(\"certauth\",$_SERVER['SSL_SERVER_S_DN_OU']);\n\t\t$this->p(\"referer\",$_SERVER ['HTTP_REFERER']);\n\t\t$this->p(\"time\",gmstrftime(\"%b %d %Y %H:%M:%S\").\" GMT\");\n\t\t$this->p(\"apache_admin\",$_SERVER['SERVER_ADMIN']);\n\t\t$this->xm(\"</generalinfo>\");\n\n\t\t// get medcommmons parameters about this instance of central\n\t\t$this->xm(\"<mcinfo>\");\n\t\t$this->p(\"sw_version\",$GLOBALS[\"SW_Version\"]);\n\t\t$this->p(\"sw_revision\",$GLOBALS[\"SW_Revision\"]);\n\t\t$this->p(\"db_connection\",$GLOBALS[\"DB_Connection\"]);\n\t\t$this->p(\"db_database\",$GLOBALS[\"DB_Database\"]);\n\t\t$this->p(\"default_repository\", $GLOBALS['Default_Repository']);\n\t\t$this->xm(\"</mcinfo>\");\n\n\t\t// get record counts from interesting tables\n\t\t$this->xm(\"<tableinfo>\");\n\t\t//\t\tz(\"hipaa\");\n\t\t//\tz(\"hipaa_trace\");\n\t\t$this->z(\"user\");\n\t\t// moved these tables to another database, really should reconnect to the other db to get them\n\n\t\t//\t\tz(\"faxstatus\");\n\t\t//\t\tz(\"ccstatus\");\n\t\t//\t\tz(\"emailstatus\");\n\n\t\t$this->xm(\"</tableinfo>\");\n\t\t$count++;\n\t\t//\n\t\t// return outputs\n\t\t//\n\t\t$this->xmfield(\"status\",\"ok\");\n\t}", "private function ParseXMLResponse($XMLResponse)\r\n\t{\r\n\t\t$Result = new Result;\r\n\t\t$Result->ErrorCode = $XMLResponse[0][\"errorcode\"];\r\n\t\t$Result->ErrorMessage = $XMLResponse[0];\r\n\t\t$Result->Success = ($XMLResponse[0][\"errorcode\"] == 0);\r\n\t\t\r\n\t\treturn $Result;\r\n\t}", "function obtainXMLResult($statusid, $wptid) {\n\tglobal $gStatusTable, $gErrBase;\n\n\t// Fetch the result xml file\n\t$wptServer = wptServer();\n\t$doc = new DOMDocument();\n\tif ( $doc ) {\n\t\t$request = $wptServer . \"xmlResult.php?test=$wptid\";\n\t\t$response = fetchUrl($request);\n\n\t\tif ( strlen($response) ) {\n\t\t\t$doc->loadXML($response);\n\t\t\t$nodes = $doc->getElementsByTagName('statusCode');\n\t\t\t$status = (int)trim($nodes->item(0)->nodeValue);\n\t\t\t$runs = (int)$doc->getElementsByTagname('runs')->item(0)->nodeValue;\n\t\t\t// Sanity check\n\t\t\tif ( (200 == $status) && ($runs > 0) ) {\n\t\t\t\t// Import a website\n\t\t\t\t$result = array();\n\t\t\t\tparseXMLResult($doc, $result);\n\t\t\t\tif ( array_key_exists('medianRun', $result) ) {\n\t\t\t\t\t// Record medianRun in status table\n\t\t\t\t\t$medianRun = $result['medianRun'];\n\t\t\t\t\t// CVSNO - remove this \"obtain\" step and skip straight to parse? can we get the medianRun somewhere else?\n\t\t\t\t\t// CVSNO - remove pagespeed, etc. columns from status table\n\t\t\t\t\t$cmd = \"UPDATE $gStatusTable SET medianRun = $medianRun WHERE statusid=$statusid;\";\n\t\t\t\t\tdoSimpleCommand($cmd);\n\t\t\t\t\tsetStatus($statusid, META_DONE); \n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\t// There was an error parsing the meta XML result.\n\t\t\t\t\tdprint(\"ERROR: couldn't find median page view for wptid $wptid.\");\n\t\t\t\t\tsetStatus($statusid, SUBMIT_DONE + $gErrBase);\n\t\t\t\t}\n\t\t\t} \n\t\t\telse {\n\t\t\t\tdprint(\"ERROR: failed parsing $request: status = $status, runs = $runs\");\n\t\t\t\tsetStatus($statusid, SUBMIT_DONE + $gErrBase);\n\t\t\t}\n\t\t}\n\t}\n}", "private function parsehtml()\n\t{\n\t\t$html = $this->getUrl($this->url);\n\t\t$dom = new \\DOMDocument();\n\t\t@$dom->loadHTML($html);\n\t\t// discard white space\n\t\t$dom->preserveWhiteSpace = false;\n\t\t\n\t\t// get the div with id=\"moviemeter\" which includes the movies\n\t\t$movies = $dom->getElementById(\"moviemeter\");\n\t\tif(!$movies)\n\t\t\treturn null;\n\t\t\n\t\t$charts = [];\n\t\tforeach ($movies->getElementsByTagName(\"div\") as $div) \n\t\t{\n\t\t\t$array = explode(\"#\", $div->nodeValue);\n\t\t\t\t\t\n\t\t\tif(is_array($array) && count($array) == 2)\n\t\t\t{\n\t\t\t\t// get rank\n\t\t\t\t$rank = trim(substr($array[1], 0, 3));\n\t\t\n\t\t\t\t//get was\n\t\t\t\tif( preg_match( '!\\(([^\\)]+)\\)!', $array[1], $match ) )\n\t \t\t\t$was = $match[1];\n\t \t\t\n\t\t\t\t$charts[$rank] = [\"title\"=>trim($array[0]), \"was\"=>$was, \"rank\"=>$rank];\n\t\t\t}\n\t\t}\n\t\tforeach ($charts as $key => $value) \n\t\t\t$temp[$key] = $value[\"rank\"];\n\t\t\n\t\t// sort by rank\n\t\tarray_multisort($temp, SORT_ASC, $charts);\n\n\t\t// return the top <limit>\n\t\treturn array_slice($charts, 0, $this->limit);\t\n\t}", "public function response()\n {\n $count_households=new SampleChart;\n //Load village data\n $villages = Village::all()->sortBy(\"village_name\");\n $village_stats=Villagestat::all();\n foreach ($villages as $village) {\n $households[]=$village->households;\n $land[]=$village->land;\n foreach($village_stats as $vstat){\n if($village->id==$vstat->id){\n $rom_households[]=$vstat->rom_households_count;\n }\n }\n }\n $count_households->dataset('Households(total)', 'bar', $households)->color('#00ff00');\n $count_households->dataset('Romani households', 'bar', $rom_households)->color('#ff0000');\n return $count_households->api();\n\n }", "function createStats()\n{\n global $html;\n global $body;\n global $passedParse;\n global $failedParse;\n global $passedInterpret;\n global $failedInterpret;\n\n $ul = $html->createElement(\"ul\");\n $ulStyle = $html->createAttribute(\"style\");\n $ulStyle->value = \"list-style-type:square\";\n $ul->appendChild($ulStyle);\n $testsNum = $passedParse+$failedParse+$passedInterpret+$failedInterpret;\n $li = $html->createElement(\"li\", \"Executed tests = $testsNum\");\n $ul->appendChild($li);\n $passed = $passedParse + $passedInterpret;\n $li = $html->createElement(\"li\", \"Passed tests = $passed\");\n $ul->appendChild($li);\n $failed = $failedInterpret + $failedParse;\n $li = $html->createElement(\"li\", \"Failed tests = $failed\");\n $ul->appendChild($li);\n $parseTests = $passedParse + $failedParse;\n $li = $html->createElement(\"li\", \"Tests for parse = $parseTests\");\n $ul1 = $html->createElement(\"ul\");\n $li1 = $html->createElement(\"li\", \"Passed = $passedParse\");\n $ul1->appendChild($li1);\n $li1 = $html->createElement(\"li\", \"Failed = $failedParse\");\n $ul1->appendChild($li1);\n $li->appendChild($ul1);\n $ul->appendChild($li);\n $interpretTests = $passedInterpret + $failedInterpret;\n $li = $html->createElement(\"li\", \"Tests for interpret = $interpretTests\");\n $ul1 = $html->createElement(\"ul\");\n $li1 = $html->createElement(\"li\", \"Passed = $passedInterpret\");\n $ul1->appendChild($li1);\n $li1 = $html->createElement(\"li\", \"Failed = $failedInterpret\");\n $ul1->appendChild($li1);\n $li->appendChild($ul1);\n $ul->appendChild($li);\n $body->appendChild($ul);\n}", "public function parse(){\n\t\t$this->_data = array();\n\t\n\t\ttry{\n\t\t\tparent::parse();\n\t\t\t\n\t\t\tif(!empty($this->_response)){\n\t\t\t\tif($this->_request['method'] == 'GetEvents'){\n\t\t\t\t\tif(is_array($this->_response->GetEventsResult->Event)){\n\t\t\t\t\t\tforeach($this->_response->GetEventsResult->Event as $event){\n\t\t\t\t\t\t\t$this->_data[] = $event;\n\t\t\t\t\t\t}\n\t\t\t\t\t}else if(is_object($this->_response->GetEventsResult->Event)){\n\t\t\t\t\t\t$this->_data = $this->_response->GetEventsResult->Event;\n\t\t\t\t\t}else{\n\t\t\t\t\t\t$this->_data = null;\n\t\t\t\t\t}\n\t\t\t\t}else if($this->_request['method'] == 'SearchEvents'){\n\t\t\t\t\tif(is_array($this->_response->SearchEventsResult->Event)){\n\t\t\t\t\t\tforeach($this->_response->SearchEventsResult->Event as $event){\n\t\t\t\t\t\t\t$this->_data[] = $event;\n\t\t\t\t\t\t}\n\t\t\t\t\t}else if(is_object($this->_response->SearchEventsResult->Event)){\n\t\t\t\t\t\t$this->_data = $this->_response->SearchEventsResult->Event;\n\t\t\t\t\t}else{\n\t\t\t\t\t\t$this->_data = null;\n\t\t\t\t\t}\n\t\t\t\t}else{\n\t\t\t\t\tif(!empty($this->_response->GetCountryByIDResult)){\n\t\t\t\t\t\t$this->_data = $this->_response->GetCountryByIDResult;\n\t\t\t\t\t}else{\n\t\t\t\t\t\t$this->_data = null;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\n\t\t}catch(TNException $e){\n\t\t\t$err = $this->debug($e->getMessage());\n\t\t\techo $err;\n\t\t}\n\t\n\t\treturn $this;\n\t}", "function stats() {\n\t\techo '<h2>Summary</h2>';\n\t\techo '<p>';\n\t\techo '<strong>Engine</strong>: ' . Cache::engine_name( $this->_config->get_string( array( 'fragmentcache', 'engine' ) ) ) . '<br />';\n\t\techo '<strong>Caching</strong>: ' . ( $this->_caching ? 'enabled' : 'disabled' ) . '<br />';\n\n\t\tif ( !$this->_caching ) {\n\t\t\techo '<strong>Reject reason</strong>: ' . $this->cache_reject_reason . '<br />';\n\t\t}\n\n\t\techo '<strong>Total calls</strong>: ' . $this->cache_total . '<br />';\n\t\techo '<strong>Cache hits</strong>: ' . $this->cache_hits . '<br />';\n\t\techo '<strong>Cache misses</strong>: ' . $this->cache_misses . '<br />';\n\t\techo '<strong>Total time</strong>: '. round( $this->time_total, 4 ) . 's';\n\t\techo '</p>';\n\n\t\techo '<h2>Cache info</h2>';\n\n\t\tif ( $this->_debug ) {\n\t\t\techo '<table cellpadding=\"0\" cellspacing=\"3\" border=\"1\">';\n\t\t\techo '<tr><td>#</td><td>Status</td><td>Source</td><td>Data size (b)</td><td>Query time (s)</td><td>ID:Group</td></tr>';\n\n\t\t\tforeach ( $this->debug_info as $index => $debug ) {\n\t\t\t\techo '<tr>';\n\t\t\t\techo '<td>' . ( $index + 1 ) . '</td>';\n\t\t\t\techo '<td>' . ( $debug['cached'] ? 'cached' : 'not cached' ) . '</td>';\n\t\t\t\techo '<td>' . ( $debug['internal'] ? 'internal' : 'persistent' ) . '</td>';\n\t\t\t\techo '<td>' . $debug['data_size'] . '</td>';\n\t\t\t\techo '<td>' . round( $debug['time'], 4 ) . '</td>';\n\t\t\t\techo '<td>' . sprintf( '%s:%s', $debug['id'], $debug['group'] ) . '</td>';\n\t\t\t\techo '</tr>';\n\t\t\t}\n\n\t\t\techo '</table>';\n\t\t} else {\n\t\t\techo '<p>Enable debug mode.</p>';\n\t\t}\n\t}", "public function statistics(){\n\t\t$products = Product::where('event_id', Configuration::eventId())->get();\n\n\t\t// Setup dates\n\t\t$statistics = Order::with('orderlists')->where('event_id', $this->id)->orderBy('created_at')->get();\n\t\t$firstDate = $statistics->first()->created_at;\n\t\t$lastDate = $statistics->last()->created_at;\n\n\t\t// Get dates between firstdate and lastdate and put them in output\n\t\t$output = new Collection();\n\t\tfor($date = $firstDate;$date->lte($lastDate);$date->addDay()){\n\t\t\t// Get the product ID's and put them in an array\n\t\t\t$data = new Collection();\n\t\t\tforeach($products as $product){\n\t\t\t\t$data->put($product->id, 0);\n\t\t\t}\n\n\t\t\t$output->put($date->format('d-m-Y'), $data);\n\t\t}\n\n\t\t// Add the amounts of products ordered from the orderlists\n\t\tforeach($statistics as $order){\n\t\t\t$date = $order->created_at->format('d-m-Y');\n\t\t\tforeach($order->orderlists()->get() as $orderlist){\n\t\t\t\t$output[$date][$orderlist->product_id] = $orderlist->amount;\n\t\t\t}\n\t\t}\n\n\n\n\t\treturn $output;\n\t}", "function tpc_get_stats() {\n\ttry {\n\t\tglobal $ydb;\n\n\t\t//Process `url` or `shorturl` parameter\n\t\tif(!isset($_REQUEST[\"url\"]) && !isset($_REQUEST[\"shorturl\"])) {\n\t\t\treturn array(\n\t\t\t\t\"errorCode\" => 400,\n\t\t\t\t\"message\" => \"error: Missing 'url' or 'shorturl' parameter.\",\n\t\t\t);\t\n\t\t}\n\n\t\tif(isset($_REQUEST[\"url\"])) {\n\t\t\t$keywords = tpc_get_url_keywords($_REQUEST[\"url\"]);\n\t\t} else {\n\t\t\t$pos = strrpos($_REQUEST[\"shorturl\"], \"/\");\n\t\t\t//Accept \"http://sho.rt/abc\"\n\t\t\tif($pos !== false) {\n\t\t\t\t$keywords = array(substr($_REQUEST[\"shorturl\"], $pos + 1));\n\t\t\t//Accept \"abc\"\n\t\t\t} else {\n\t\t\t\t$keywords = array($_REQUEST[\"shorturl\"]);\n\t\t\t}\n\t\t}\n\t\t\n\t\tif(empty($keywords[0]) || !yourls_is_shorturl($keywords[0])) {\n\t\t\treturn array(\n\t\t\t\t\"errorCode\" => 404,\n\t\t\t\t\"message\" => \"error: not found\",\n\t\t\t);\t\n\t\t}\n\t\t\n\t\t//Process `since` and `until` parameters.\n\t\tif(isset($_REQUEST[\"since\"])) {\n\t\t\t$since = intval($_REQUEST[\"since\"]);\n\t\t} else {\n\t\t\t$since = 0; //Default to the Unix Epoch\n\t\t}\n\n\t\tif(isset($_REQUEST[\"until\"])) {\n\t\t\t$until = intval($_REQUEST[\"until\"]);\n\t\t} else {\n\t\t\t$until = time(); //Default to now\n\t\t}\n\n\t\tif($since >= $until) {\n\t\t\treturn array(\n\t\t\t\t\"errorCode\" => 400,\n\t\t\t\t\"message\" => \"error: The 'since' value ($since) must be smaller than the 'until' value ($until).\",\n\t\t\t);\n\t\t}\n\t\t\n\t\t$params = array(\n\t\t\t\"shorturls\" => $keywords,\n\t\t\t\"since\" => date(\"Y-m-d H:i:s\", $since),\n\t\t\t\"until\" => date(\"Y-m-d H:i:s\", $until),\n\t\t);\n\t\n\t $sql = \"SELECT COUNT(*)\n\t FROM \" . YOURLS_DB_TABLE_LOG . \"\n\t WHERE\n\t\t\t\t\tshorturl IN (:shorturls) AND\n\t\t\t\t\tclick_time > :since AND\n\t\t\t\t\tclick_time <= :until\";\n\n\t\t$result = $ydb->fetchValue($sql, $params);\n\n\t\treturn array(\n\t\t\t\"statusCode\" => 200,\n\t\t\t\"message\" => \"success\",\n\t\t\t\"url-stats-period\" => array(\n\t\t\t\t\"clicks\" => $result\n\t\t\t)\n\t\t);\n\t} catch (Exception $e) {\n\t\treturn array(\n\t\t\t\"errorCode\" => 500,\n\t\t\t\"message\" => \"error: \" . $e->getMessage(),\n\t\t);\n\t}\n}", "function monitor_stats() {\n $res = Array();\n $res['active_processes'] = $this->getOne(\"select count(*) from `\".GALAXIA_TABLE_PREFIX.\"processes` where `wf_is_active`=?\",array('y'));\n $res['processes'] = $this->getOne(\"select count(*) from `\".GALAXIA_TABLE_PREFIX.\"processes`\");\n $result = $this->query(\"select distinct(`wf_p_id`) from `\".GALAXIA_TABLE_PREFIX.\"instances` where `wf_status`=?\",array('active'));\n $res['running_processes'] = $result->numRows();\n // get the number of instances per status\n $query = \"select wf_status, count(*) as num_instances from \".GALAXIA_TABLE_PREFIX.\"instances group by wf_status\";\n $result = $this->query($query);\n $status = array();\n while($info = $result->fetchRow()) {\n $status[$info['wf_status']] = $info['num_instances'];\n }\n $res['active_instances'] = isset($status['active']) ? $status['active'] : 0;\n $res['completed_instances'] = isset($status['completed']) ? $status['completed'] : 0;\n $res['exception_instances'] = isset($status['exception']) ? $status['exception'] : 0;\n $res['aborted_instances'] = isset($status['aborted']) ? $status['aborted'] : 0;\n return $res;\n }", "public function stats() {\n\t\t$userCount = 0;\n\t\tif ($this->isAdmin) {\n\t\t\t$countByBackend = $this->userManager->countUsers();\n\n\t\t\tif (!empty($countByBackend)) {\n\t\t\t\tforeach ($countByBackend as $count) {\n\t\t\t\t\t$userCount += $count;\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\t'@phan-var \\OC\\Group\\Manager $this->groupManager';\n\t\t\t$groups = $this->groupManager->getSubAdmin()->getSubAdminsGroups($this->userSession->getUser());\n\n\t\t\t$uniqueUsers = [];\n\t\t\tforeach ($groups as $group) {\n\t\t\t\tforeach ($group->getUsers() as $uid => $displayName) {\n\t\t\t\t\t$uniqueUsers[$uid] = true;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t$userCount = \\count($uniqueUsers);\n\t\t}\n\n\t\treturn new DataResponse(\n\t\t\t[\n\t\t\t\t'totalUsers' => $userCount\n\t\t\t]\n\t\t);\n\t}", "function outputStatistics() {\n\t\trequire_once \"./Services/Tracking/classes/class.ilLMStatistics.php\";\n\n\t\tif ($_POST[\"stat\"] == 'u') { //Beobachtungsmodell starten\n\t\t\t$this->lm_statistics->outputApplet();\n\t\t} else { //Session-,Seiten-,Kapitelstats starten\n\t\t\t$this->lm_statistics->outputHTML();\n\t\t}\n\t}", "function parseCurlData($res){\n \n $results = array();\n \n foreach($res as $key=>$val){\n \n $doc = new SimpleXmlElement($val, LIBXML_NOCDATA);\n \n if(isset($doc->channel)){\n $results[$key] = $this->parseRSS($doc,$key);\n }\n if(isset($doc->entry)){\n // return $this->parseAtom($doc);\n }\n \n }\n return $results;\n }", "private function getResponse() {\n\t\t$packed_len = stream_get_contents($this->id, 4); //The first 4 bytes contain our N-packed length\n\t\t$hdr = unpack('Nlen', $packed_len);\n\t\t$len = $hdr['len'];\n\t\t$this->xmlResponse = stream_get_contents($this->id, $len);\n\t}", "public function getStats()\n {\n $stats['health'] = $this->client->cluster()->health();\n\n $info = [];\n\n foreach (ExtconfService::getIndices() as $language => $index) {\n $info[$language] = [\n 'name' => $index,\n 'language' => $language,\n ];\n\n foreach (ExtconfService::getIndexers() as $name => $config) {\n $info[$language]['types'][$name] = [\n 'name' => $name,\n 'documents' => $this->client->count([\n 'index' => $index,\n 'type' => $config['config']['type'],\n ])['count'],\n ];\n }\n }\n\n $stats['indices'] = $info;\n\n return $stats;\n }", "protected function getBotStatSummary()\n {\n $today = date('Y-m-d');\n $yesterday = date('Y-m-d', mktime(0, 0, 0, date(\"m\"), date(\"d\")-1, date(\"Y\")));\n\n $this->TemplatePartial = new \\BackendTemplate('mod_botstatistics_be_stat_partial_summary');\n \n $this->TemplatePartial->AnzBotYesterday = 0;\n $this->TemplatePartial->AnzVisitsYesterday = 0;\n $this->TemplatePartial->AnzPagesYesterday = 0;\n $this->TemplatePartial->AnzBotToday = 0;\n $this->TemplatePartial->AnzVisitsToday = 0;\n $this->TemplatePartial->AnzPagesToday = 0;\n $this->TemplatePartial->bot_module_id = $this->intModuleID;\n $this->TemplatePartial->theme = $this->getTheme();\n \n //Anzahl der Bots mit Summe Besuche und Seitenzugriffe\n $objBotStatCount = \\Database::getInstance()\n ->prepare(\"SELECT \n count(distinct `bot_name`) AS AnzBot, \n (SELECT \n sum(`bot_counter`) \n FROM \n `tl_botstatistics_counter` \n WHERE \n `bot_module_id`=?\n ) AS AnzVisits\n FROM \n `tl_botstatistics_counter` \n WHERE \n `bot_module_id`=?\n \")\n ->execute($this->intModuleID, $this->intModuleID);\n $this->TemplatePartial->AnzBot = $objBotStatCount->AnzBot;\n $this->TemplatePartial->AnzVisits = ($objBotStatCount->AnzVisits) ? $objBotStatCount->AnzVisits : 0;\n //Anzahl Seitenzugriffe\n $objBotStatCount = \\Database::getInstance()\n ->prepare(\"SELECT \n sum(`bot_page_alias_counter`) AS AnzPages\n FROM \n `tl_botstatistics_counter_details` d\n INNER JOIN \n `tl_botstatistics_counter` c ON d.pid = c.id\n WHERE \n c.`bot_module_id`=?\n \")\n ->execute($this->intModuleID);\n $this->TemplatePartial->AnzPages = ($objBotStatCount->AnzPages) ? $objBotStatCount->AnzPages : 0;\n \n //Anzahl Bots Heute/Gestern Besuche/Hits \n $objBotStatCount = \\Database::getInstance()\n ->prepare(\"SELECT \n `bot_date`, \n count(distinct `bot_name`) AS AnzBot, \n sum(`bot_counter`) AS AnzVisits\n FROM \n `tl_botstatistics_counter`\n WHERE \n `bot_module_id`=?\n AND \n `bot_date`>=?\n GROUP BY \n `bot_date`\n \")\n ->execute($this->intModuleID, $yesterday);\n while ($objBotStatCount->next())\n {\n if ($objBotStatCount->bot_date == $yesterday)\n {\n $this->TemplatePartial->AnzBotYesterday = $objBotStatCount->AnzBot;\n $this->TemplatePartial->AnzVisitsYesterday = $objBotStatCount->AnzVisits;\n \n }\n if ($objBotStatCount->bot_date == $today) \n { \n $this->TemplatePartial->AnzBotToday = $objBotStatCount->AnzBot;\n $this->TemplatePartial->AnzVisitsToday = $objBotStatCount->AnzVisits;\n }\n }\n // Anzahl Seiten Gesamt - Heute/Gestern\n $objBotStatCount = \\Database::getInstance()\n ->prepare(\"SELECT \n `bot_date`, \n sum(`bot_page_alias_counter`) AS AnzPages \n FROM \n `tl_botstatistics_counter`\n INNER JOIN \n `tl_botstatistics_counter_details` ON `tl_botstatistics_counter`.id=`tl_botstatistics_counter_details`.pid\n WHERE \n `bot_module_id`=? \n AND \n `bot_date`>=?\n GROUP BY \n `bot_date`\n \")\n ->execute($this->intModuleID, $yesterday);\n while ($objBotStatCount->next())\n {\n if ($objBotStatCount->bot_date == $yesterday)\n {\n $this->TemplatePartial->AnzPagesYesterday = $objBotStatCount->AnzPages;\n \n }\n if ($objBotStatCount->bot_date == $today)\n {\n $this->TemplatePartial->AnzPagesToday = $objBotStatCount->AnzPages;\n }\n }\n \n //Anzahl Besuche aktuelle Woche, letzte Woche\n $this->TemplatePartial->AnzBotWeek = 0;\n $this->TemplatePartial->AnzVisitsWeek = 0;\n $this->TemplatePartial->AnzPagesWeek = 0;\n $this->TemplatePartial->AnzBotLastWeek = 0;\n $this->TemplatePartial->AnzVisitsLastWeek = 0;\n $this->TemplatePartial->AnzPagesLastWeek = 0;\n\n $CurrentWeek = date('W'); \n $LastWeek = date('W', mktime(0, 0, 0, date(\"m\"), date(\"d\")-7, date(\"Y\")) );\n //Besonderheit beachten das der 1.1. die 53. Woche sein kann!\n $YearCurrentWeek = ($CurrentWeek > 40 && (int)date('m') == 1) ? date('Y')-1 : date('Y');\n $YearLastWeek = ($LastWeek > 40 && (int)date('m') == 1) ? date('Y')-1 : date('Y');\n $objBotStatCount = \\Database::getInstance()\n ->prepare(\"SELECT \n YEARWEEK( `bot_date`, 3 ) AS YW, \n COUNT(DISTINCT `bot_name`) AS AnzBotWeek, \n SUM(`bot_counter`) AS AnzVisitsWeek \n FROM \n `tl_botstatistics_counter`\n WHERE \n `bot_module_id`=?\n AND \n YEARWEEK( `bot_date`, 3 ) BETWEEN ? AND ?\n GROUP BY YW\n ORDER BY YW DESC\n \")\n ->execute($this->intModuleID, \n $YearLastWeek.$LastWeek, \n $YearCurrentWeek.$CurrentWeek);\n while ($objBotStatCount->next())\n {\n if ($objBotStatCount->YW == $YearCurrentWeek.$CurrentWeek)\n {\n $this->TemplatePartial->AnzBotWeek = $objBotStatCount->AnzBotWeek;\n $this->TemplatePartial->AnzVisitsWeek = $objBotStatCount->AnzVisitsWeek;\n \n }\n if ($objBotStatCount->YW == $YearLastWeek.$LastWeek)\n {\n $this->TemplatePartial->AnzBotLastWeek = $objBotStatCount->AnzBotWeek;\n $this->TemplatePartial->AnzVisitsLastWeek = $objBotStatCount->AnzVisitsWeek;\n }\n }\n //Anzahl Hits aktuelle, letzte Woche\n $objBotStatCount = \\Database::getInstance()\n ->prepare(\"SELECT \n YEARWEEK( c.`bot_date`, 3 ) AS YW, \n sum(d.`bot_page_alias_counter`) AS AnzPages\n FROM \n `tl_botstatistics_counter` c\n INNER JOIN \n `tl_botstatistics_counter_details` d ON c.id=d.pid\n WHERE \n c.`bot_module_id`=?\n AND \n YEARWEEK( c.`bot_date`, 3 ) BETWEEN ? AND ?\n GROUP BY YW\n ORDER BY YW DESC\n \")\n ->execute($this->intModuleID, $YearLastWeek.$LastWeek, $YearCurrentWeek.$CurrentWeek);\n while ($objBotStatCount->next())\n {\n if ($objBotStatCount->YW == $YearCurrentWeek.$CurrentWeek)\n {\n $this->TemplatePartial->AnzPagesWeek = $objBotStatCount->AnzPages;\n \n }\n if ($objBotStatCount->YW == $YearLastWeek.$LastWeek)\n {\n $this->TemplatePartial->AnzPagesLastWeek = $objBotStatCount->AnzPages;\n }\n }\n \n return $this->TemplatePartial->parse();\n }", "public function stats()\n\t{\n\t\t$stat = View::factory('profiler/stats');\n\t\t// echo $stat;\n\t}", "function xml_output($array=array()) {\n\terror_reporting(0);\n\theader(\"Last-Modified: \".gmdate(\"D, d M Y H:i:s\").\"GMT\");\n\theader(\"Cache-Control: no-cache, must-revalidate\");\n\theader(\"Pragma: no-cache\");\n\theader(\"Content-Type:text/xml; charset=UTF-8\");\n\t$out = '<?xml version=\"1.0\" encoding=\"UTF-8\"?>'.\"\\n\";\n\t$out .= \"<response>\\n\";\n\t$out .= \"\t<status_code>$array[status_code]</status_code>\\n\";\n\t$out .= \"\t<status_txt>$array[status_txt]</status_txt>\\n\";\n\tif(count($array['data'])>0) {\n\t\t$out .= \"\t<data>\\n\";\n\t\tforeach($array['data'] as $key => $value) {\n\t\t\t$out .= \"\t\t<$key>$value</$key>\\n\";\n\t\t}\n\t\t$out .= \"\t</data>\\n\";\n\t}\n\t$out .= '</response>';\n\techo $out;\n}", "function getSensorMetadata($from){\n\n $jsonResponse = array(\n 'method' => 'getSensorMetadata',\n 'sensors' => array(\n array(\n 'sensor_id' => 'geiger_counter_sensor',\n 'fullName' => ' Geiger–Mueller counter_sensor',\n 'description' => 'It detects radiation such as alpha particles, beta particles and gamma rays using the ionization produced in a Geiger–Mueller tube',\n 'webSocketType' => \"text\",\n 'produces' => 'application/json',\n 'values' => array(\n array(\n 'name' => 'experiment_status',\n 'unit' => '',\n 'lastMeasured' => '2014-06-23T18:25:43.511Z', //not static, get this information from latest batch\n 'rangeMinimum' => '0',\n 'rangeMaximum' => '10000',\n 'rangeStep' => '1',\n 'updateFrequency' => 'batched'), //check this RemainingRuntime\n array(\n 'name' => 'QueueLength',\n 'unit' => '',\n 'lastMeasured' => '2014-06-23T18:25:43.511Z', //not static, get this information from latest batch\n 'rangeMinimum' => '0',\n 'rangeMaximum' => '10000',\n 'rangeStep' => '1',\n 'updateFrequency' => 'batched'), //check this\n array(\n 'name' => 'RemainingRuntime',\n 'unit' => 's',\n 'lastMeasured' => '2014-06-23T18:25:43.511Z', //not static, get this information from latest batch\n 'rangeMinimum' => '0',\n 'rangeMaximum' => '10000',\n 'rangeStep' => '1',\n 'updateFrequency' => 'batched'), //check this\n array(\n 'name' => 'experiment_id',\n 'unit' => '',\n 'lastMeasured' => '2014-06-23T18:25:43.511Z', //not static, get this information from latest batch\n 'rangeMinimum' => '0',\n 'rangeMaximum' => '10000',\n 'rangeStep' => '1',\n 'updateFrequency' => 'batched'), //check this\n array(\n 'name' => 'setupName',\n 'unit' => '', //ex. \"RadioactivityVsDistance\"\n 'lastMeasured' => '2014-06-23T18:25:43.511Z', //not static, get this information from latest batch\n 'rangeMinimum' => '',\n 'rangeMaximum' => '',\n 'rangeStep' => '',\n 'updateFrequency' => 'batched'), //check this\n array(\n 'name' => 'setupId', //setupName\n 'unit' => '', //ex. \"RadioactivityVsDistance\"\n 'lastMeasured' => '2014-06-23T18:25:43.511Z', //not static, get this information from latest batch\n 'rangeMinimum' => '',\n 'rangeMaximum' => '',\n 'rangeStep' => '',\n 'updateFrequency' => 'batched'), //check this\n array(\n 'name' => 'sourceName',\n 'unit' => '', //ex. Strontium-90\n 'lastMeasured' => '2014-06-23T18:25:43.511Z', //not static, get this information from latest batch\n 'rangeMinimum' => '',\n 'rangeMaximum' => '',\n 'rangeStep' => '',\n 'updateFrequency' => 'batched'), //check this\n array(\n 'name' => 'repeat',\n 'unit' => '', //number of trials\n 'lastMeasured' => '2014-06-23T18:25:43.511Z', //not static, get this information from latest batch\n 'rangeMinimum' => '',\n 'rangeMaximum' => '',\n 'rangeStep' => '',\n 'updateFrequency' => 'batched'), //check this\n array(\n 'name' => 'duration',\n 'unit' => '', //ex. \"RadioactivityVsDistance\"\n 'lastMeasured' => '2014-06-23T18:25:43.511Z', //not static, get this information from latest batch\n 'rangeMinimum' => '',\n 'rangeMaximum' => '',\n 'rangeStep' => '',\n 'updateFrequency' => 'batched'), //check this\n array(\n 'name' => 'radiation_array',\n 'unit' => 'counts',\n 'lastMeasured' => '2014-06-23T18:25:43.511Z', //not static, get this information from latest batch\n 'rangeMinimum' => '0',\n 'rangeMaximum' => '10000', //depends on exposure time\n 'rangeStep' => '1',\n 'updateFrequency' => 'batched'), //check this\n array(\n 'name' => 'distance',\n 'unit' => 'mm',\n 'lastMeasured' => '2014-06-23T18:25:43.511Z', //not static, get this information from latest batch\n 'rangeMinimum' => '15',\n 'rangeMaximum' => '95', //depends on exposure time\n 'rangeStep' => '5',\n 'updateFrequency' => 'batched'),\n array(\n 'name' => 'absorberName',\n 'unit' => 'absorber',\n 'lastMeasured' => '2014-06-23T18:25:43.511Z', //not static, get this information from latest batch\n 'rangeMinimum' => '15',\n 'rangeMaximum' => '95', //depends on exposure time\n 'rangeStep' => '5',\n 'updateFrequency' => 'batched')\n ),\n 'configuration' => array(\n 'parameter' => \"experiment_id\",\n 'description' => 'If provided will return the results of a specific experiment, if not provided returns the last experiment results'\n )\n ),\n array(\n 'sensor_id' => 'status',\n 'fullName' => 'Experiment execution status',\n 'description' => 'returns the status of an experiment',\n 'webSocketType' => \"text\",\n 'produces' => 'application/json',\n 'values' => array(\n array(\n 'name' => 'experiment_id',\n 'unit' => '',\n 'lastMeasured' => '2014-06-23T18:25:43.511Z', //not static, get this information from latest batch\n 'rangeMinimum' => '0',\n 'rangeMaximum' => '10000',\n 'rangeStep' => '1',\n 'updateFrequency' => 1) //check this\n )\n ),\n array(\n 'sensor_id' => 'camera',\n 'fullName' => 'Webcam_1',\n 'description' => 'Webcam that shows the Geiger-Mueller counter',\n 'webSocketType' => \"binary\",\n 'produces' => 'jpg',)\n\n )\n\n );\n\n $response = json_encode($jsonResponse);\n $from->send($response);\n}", "protected function processData()\n {\n if (empty($this->data)) {\n throw new \\Netcreators\\NcgovPdc\\Xml\\Search\\SamenwerkendeCatalogi40\\ResponseParser\\Exception('Error: No XML data supplied.');\n }\n\n libxml_clear_errors();\n $this->xmlRoot = simplexml_load_string($this->data, '\\SimpleXmlElement', LIBXML_NOERROR);\n $lastError = libxml_get_last_error();\n if ($this->xmlRoot === false || $lastError !== false) {\n throw new \\Netcreators\\NcgovPdc\\Xml\\Search\\SamenwerkendeCatalogi40\\ResponseParser\\Exception('Xml parsing failed with message: ' . $lastError->code . ': ' . $lastError->message);\n }\n\n $this->xmlRoot->registerXPathNamespace('sru', 'http://www.loc.gov/zing/srw/'); // __ns\n $this->xmlRoot->registerXPathNameSpace('xsi', 'http://www.w3.org/2001/XMLSchema-instance');\n $this->xmlRoot->registerXPathNamespace('overheidsru', 'http://standaarden.overheid.nl/sru');\n $this->xmlRoot->registerXPathNamespace('dcterms', 'http://purl.org/dc/terms/');\n $this->xmlRoot->registerXPathNamespace('overheid', 'http://standaarden.overheid.nl/owms/terms/');\n $this->xmlRoot->registerXPathNamespace('overheidproduct', 'http://standaarden.overheid.nl/product/terms/');\n }", "protected function process_response(array $response)\n {\n\n //Fetch both the testbench, and the UUT design.\n list($testbench, $user_design) = $this->get_files_necessary_for_testing($response);\n\n //create a new HDL Simulation object\n $sim = new HDLSimulation($testbench, $user_design, self::elaborate_types($this->hdltype));\n\n //run the simulation, caching as we go\n $sim->run_simulation();\n\n //and then clean up, afterwards\n $sim->cleanup();\n\n //return the marks and the afforded fraction\n return array('marks' => $sim->get_marks(), 'fraction' => $sim->get_grade(), 'hash' => $sim->get_hash(), 'feedback' => $sim->get_marks_str());\n }", "public function executeXml(AgaviRequestDataHolder $rd)\n {\n $errors = $this->getAttribute('errors');\n\n // Create the xml response saying that there was a server error\n $xml = new DomDocument('1.0', 'utf-8');\n $xml->formatOutput = true;\n $root = $xml->createElement(\"response\");\n $xml->appendChild($root);\n $status = $xml->createElement(\"status\", \"invalid\");\n\n $root->appendChild($status);\n \n if (isset($errors['usernameErrors']))\n {\n $usernameErrorRoot = $xml->createElement(\"usernameErrors\");\n foreach ($errors['usernameErrors'] as $usernameError)\n {\n $error = $xml->createElement(\"error\", $usernameError);\n $usernameErrorRoot->appendChild($error);\n }\n $root->appendChild($usernameErrorRoot);\n }\n if (isset($errors['passwordErrors']))\n {\n $passwordErrorRoot = $xml->createElement(\"passwordErrors\");\n foreach ($errors['passwordErrors'] as $passwordError)\n {\n $error = $xml->createElement(\"error\", $passwordError);\n $passwordErrorRoot->appendChild($error);\n }\n $root->appendChild($passwordErrorRoot);\n }\n if (isset($errors['emailErrors']))\n {\n $emailErrorRoot = $xml->createElement(\"emailErrors\");\n foreach ($errors['emailErrors'] as $emailError)\n {\n $error = $xml->createElement(\"error\", $emailError);\n $emailErrorRoot->appendChild($error);\n }\n $root->appendChild($emailErrorRoot);\n }\n if (isset($errors['firstNameErrors']))\n {\n $firstNameErrorRoot = $xml->createElement(\"firstNameErrors\");\n foreach ($errors['firstNameErrors'] as $firstNameError)\n {\n $error = $xml->createElement(\"error\", $firstNameError);\n $firstNameErrorRoot->appendChild($error);\n }\n $root->appendChild($firstNameErrorRoot);\n }\n if (isset($errors['lastNameErrors']))\n {\n $lastNameErrorRoot = $xml->createElement(\"lastNameErrors\");\n foreach ($errors['lastNameErrors'] as $lastNameError)\n {\n $error = $xml->createElement(\"error\", $lastNameError);\n $lastNameErrorRoot->appendChild($error);\n }\n $root->appendChild($lastNameErrorRoot);\n }\n\n // Set the status code to 200 and return the xml response\n $this->getResponse()->setHttpStatusCode('200');\n $this->getResponse()->setContent($xml->saveXML());\n }", "public static abstract function getStatistic();", "public function summarise_response(array $response)\n {\n //TODO: fixme\n return 'waveform';\n }", "public function getStatisticOverview()\n {\n return Cache::remember('statistic_overview', 3600, function () {\n $modelAPI = new API;\n // Get All Sales\n $physicalSales = $modelAPI->getAllStoreMonthlySales();\n $digitalSales = $modelAPI->getAllDigitalSales();\n // Calculate Dividend\n $dividend = 0.02 * ($physicalSales + $digitalSales) * config('services.lmb_div.proportion');\n // Get Network Bonus\n $bonus = $modelAPI->getAllTimeNetworkBonus();\n // Get Users and Stores count\n $users = User::whereIn('user_type', [9, 10])->count();\n $stores = User::where('is_store', 1)->count();\n\n return response()->json([\n 'dividend' => round($dividend, 2),\n 'bonus' => round($bonus, 2),\n 'sales' => $physicalSales + $digitalSales,\n 'users' => (int) $users,\n 'stores' => (int) $stores\n ], 200);\n });\n }", "function curl_download_fixtures($country, $leagueName){\n $name = array();\n $betsDetails = array();\n $betDetails = array();\n $i=0;\n $currentDate = gmdate(\"d.m.Y\");\n $curTimestamp = strtotime((string)$currentDate);\n // echo $curTimestamp;\n $Url=\"http://www.tipgin.net/datav2/accounts/mbulut/soccer/fixtures/\".$country.\".xml\";\n if (!function_exists('curl_init')){\n die('Sorry cURL is not installed!');\n }\n \n $ch = curl_init();\n curl_setopt($ch, CURLOPT_URL, $Url);\n curl_setopt($ch, CURLOPT_HEADER, 0);\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n curl_setopt($ch, CURLOPT_TIMEOUT, 10);\n curl_setopt($ch,CURLOPT_ENCODING, '');\n $output = curl_exec($ch);\n curl_close($ch);\n $xml = simplexml_load_string($output);\n //print_r($xml);\n foreach ($xml->league as $league) {\n\n $leagueXmlName = explode(\":\", (string)$league->attributes()->name);\n $leagueXmlName = explode(\"-\", $leagueXmlName[1]);\n $leagueXmlName = $leagueXmlName[0]; \n $leagueXmlName = trim($leagueXmlName);\n // echo $leagueXmlName . \"|\";\n\n if($leagueXmlName == $leagueName){\n foreach ($league->match as $match) {\n // $matchTimestam = strtotime((string)$match->attributes()->date);\n\n // if($matchTimestam > $curTimestamp){\n // print_r($match);\n $betDetails = array();\n $date=$match->attributes()->date;\n $dateInRequiredFormat=str_replace(\".\",\"-\",$date);\n $time=$match->attributes()->time;\n $dateAndTimeArray = array($dateInRequiredFormat,'',$time . \":00\");\n $dateAndTimeArray=join(\" \",$dateAndTimeArray);\n\n $betEndsTime = date_create($dateAndTimeArray);\n $betEndsTime = date_format($betEndsTime,\"Y-m-d H:i:s\");\n\n $betReminderTime=date_create($betEndsTime);\n date_add($betReminderTime,date_interval_create_from_date_string(\"110 minutes\"));\n $betReminderTime = date_format($betReminderTime,\"Y-m-d H:i:s\");\n $betDetails[\"match_id\"] = (string)($match->attributes()->id); \n $betDetails[\"betEndsTime\"] = $betEndsTime;\n $betDetails[\"betReminderTime\"] = $betReminderTime;\n $betDetails[\"option1\"] = \"HOME\";\n $betDetails[\"option2\"] = \"DRAW\";\n $betDetails[\"option3\"] = \"AWAY\";\n $betDetails[\"description\"] = $match->home->attributes()->name . \" v/s \" . $match->away->attributes()->name;\n // }\n // print_r($betDetails);\n $betCreationTime = gmdate(\"Y-m-d H:i:s\");\n $betDetails[\"betCreationTime\"] = $betCreationTime . \"\";\n $betsDetails[] = $betDetails;\n } \n\n }\n }\n //print_r($betsDetails);\n return $betsDetails;\n }", "private function getResponseXML()\n\t\t{\n\n\n\t\t\t\tif($this->action_code==\"RateShop\" || $this->action_code==\"SingleCarRateShop\"){ //rateshop\n\t\t\t\t\t$wsdl = ($this->car_company==\"dollar\")?DOLLAR_RATESHOP_WS_URL:THRIFTY_RATESHOP_WS_URL;\n\t\t\t\t\t$soapAction = \"http://www.opentravel.org/OTA/2003/05/OTA2010A.RateService/GetRates\";\n\t\t\t\t\t$methodname = \"GetRates\";\n\n\t\t\t\t}else{ //booking\n\t\t\t\t\t$wsdl = ($this->car_company==\"dollar\")?DOLLAR_BOOKING_WS_URL:THRIFTY_BOOKING_WS_URL;;\n\t\t\t\t\tif($this->action_code==\"Booking\"){\n\t\t\t\t\t\t$methodname = \"MakeReservation\";\n\t\t\t\t\t\t$soapAction = \"http://www.opentravel.org/OTA/2003/05/OTA2010A.ReservationService/MakeReservation\";\n\t\t\t\t\t}else if($this->action_code==\"RetrieveReservation\"){\n\t\t\t\t\t\t$soapAction =\"http://DTG.TourDirect/IReservationService/RetrieveReservation\";\n\t\t\t\t\t\t$methodname=\"RetrieveReservation\";\n\n\t\t\t\t\t}else if($this->action_code==\"ModifyReservation\"){\n\t\t\t\t\t\t$soapAction =\"http://www.opentravel.org/OTA/2003/05/OTA2010A.ReservationService/ModifyReservation\";\n\t\t\t\t\t\t$methodname=\"ModifyReservation\";\n\t\t\t\t\t}else if($this->action_code==\"CANCEL\"){\n\t\t\t\t\t\t$soapAction =\"http://www.opentravel.org/OTA/2003/05/OTA2010A.ReservationService/CancelReservation\";\n\t\t\t\t\t\t$methodname=\"CancelReservation\";\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tfile_put_contents(dirname(__FILE__). DIRECTORY_SEPARATOR . 'LogTF'.date('Ymd').'.txt',$wsdl,FILE_APPEND);\n\t\t\t\t$client = new nusoap_client($wsdl,'wsdl');\n\t\t\t\t$client->soap_defencoding = 'utf-8';\n\t\t\t\t$client->operation = $methodname;\n\t\t\t\t$r=$client->send($this->xml, $soapAction, '');\n\t\t\t\t$response_xml = $client->responseData;\n\t\t\t\tfile_put_contents(dirname(__FILE__). DIRECTORY_SEPARATOR . 'LogTF'.date('Ymd').'.txt',$response_xml,FILE_APPEND);\n//\t\t\tprint_r($wsdl);\n\t\t\t//print_r($response_xml);\n\t\t\t//print_r($this->car_company);\n\t\t\t//print_r($this->xml);\n\t\t\t//exit;\n\n\t\t\t\tif($this->action_code==\"RateShop\" || $this->action_code==\"SingleCarRateShop\"){\n\t\t\t\t\t$xml = simplexml_load_string($response_xml);\n\t\t\t\t\t$name_spaces = $xml->getNamespaces(true);\n\t\t\t\t\t$result=$xml->children($name_spaces['s'])->Body->children()->GetRatesResponse->asXML();\n\t\t\t\t\t$result = $this->parseResponseXML($result);\n\t\t\t\t}else{\n\t\t\t\t\tif($this->action_code==\"Booking\"){\n\t\t\t\t\t\t$xml = simplexml_load_string($response_xml);\n\t\t\t\t\t\t$name_spaces = $xml->getNamespaces(true);\n\t\t\t\t\t\t$result=$xml->children($name_spaces['s'])->Body->children()->MakeReservationResponse->asXML();\n\t\t\t\t\t\t$result = $this->parseResponseXML($result);\n\t\t\t\t\t}else if($this->action_code==\"RetrieveReservation\"){\n\t\t\t\t\t\t$result = $this->parseResponseXML($r[\"RetrieveReservationResult\"]);\n\t\t\t\t\t}else if($this->action_code==\"ModifyReservation\"){\n\t\t\t\t\t\t$xml = simplexml_load_string($response_xml);\n\t\t\t\t\t\t$result =$xml->Body->ModifyReservationResponse->asXML();\n\t\t\t\t\t\t$result = $this->parseResponseXML($result);\n\t\t\t\t\t}else if($this->action_code==\"CANCEL\"){\n\t\t\t\t\t\t$xml = simplexml_load_string($response_xml);\n\t\t\t\t\t\t$name_spaces = $xml->getNamespaces(true);\n\t\t\t\t\t\t$result=$xml->children($name_spaces['s'])->Body->children()->CancelReservationResponse->asXML();\n\t\t\t\t\t\t$result = $this->parseResponseXML($result);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\tunset($client);\n\t\t\t$this->response = $result;\n\t\t\treturn $result;\n\t\t}", "public function getStatisticsDetails() {\n if (request()->ajax()) {\n $start = request()->start;\n $end = request()->end;\n $business_id = request()->session()->get('user.business_id');\n\n $purchase_details = $this->transactionUtil->getPurchaseTotals($business_id, $start, $end);\n $sell_details = $this->transactionUtil->getSellTotals($business_id, $start, $end);\n $expenses = $this->transactionUtil->getTotalExpense($business_id, $start, $end);\n $payments = $this->transactionUtil->getPayments($business_id, $start, $end);\n $profits_sold_items = $this->transactionUtil->getProfitsSoldItems($business_id, $start, $end);\n $total_customer_debts = $this->transactionUtil->getTotalCustomerDebts($business_id, $start, $end);\n $total_inventory_value = $this->transactionUtil->getTotalInventoryValue($business_id, $start, $end);\n $cost_of_items_sold = $this->transactionUtil->getCostOfItemsSold($business_id, $start, $end);\n\t $total_discount_amount = $this->transactionUtil->getTotalDiscounts($business_id, 'sell', $start, $end);\n\n $statistics_details['sales'] = $sell_details['total_sell_inc_tax'];\n $statistics_details['purchases'] = $purchase_details['total_purchase_inc_tax'];\n $statistics_details['supplier_payments'] = $payments['supplier'];\n $statistics_details['customer_payments'] = $payments['customer'];\n $statistics_details['expenses'] = $expenses;\n $statistics_details['sold_items_cost'] = $cost_of_items_sold;\n $statistics_details['profit_sold_items'] = $profits_sold_items - $total_discount_amount;\n $statistics_details['total_customer_debts'] = $total_customer_debts;\n $statistics_details['total_inventory_value'] = $total_inventory_value;\n return $statistics_details;\n }\n }", "public function parse()\n {\n $Version = $this->getVer();\n $LanguageMap_en = $this->languagemap(\"en\");\n\n $RankedDivision = $this->json(\"RankedDivision\");\n\n // (optional) start a progress bar\n $IconArray = [];\n $LoadingIconArray = [];\n //get evolutions array\n\n // loop through data\n $Output[] = \"<tabber>\\n\"; \n foreach ($RankedDivision as $id => $Rank) {\n switch ($id) {\n case '1':\n $Division = $LanguageMap_en[$Rank[1]['Name']];\n break;\n case '2':\n $Division = $LanguageMap_en[$Rank[4]['Name']];\n break;\n case '3':\n $Division = $LanguageMap_en[$Rank[8]['Name']];\n break;\n case '4':\n $Division = $LanguageMap_en[$Rank[13]['Name']];\n break;\n case '5':\n $Division = $LanguageMap_en[$Rank[18]['Name']];\n break;\n case '6':\n $Division = $LanguageMap_en[$Rank[23]['Name']];\n break;\n }\n $Output[] = \"$Division=\\n\"; \n $Table = [];\n $Table[] = \"{| class=\\\"wikitable\\\"\";\n $Table[] = \"!Class!!Rank Up Points!!Protect Points!!Profile Border!!Trophy\";\n $Table[] = \"|-\";\n foreach($Rank as $Subdivision){\n $LoadingIcon = $Subdivision[\"NameLoadingIcon\"];\n $LoadingIconArray[] = $LoadingIcon;\n $Class = \"\";\n if (!empty($LanguageMap_en[$Subdivision['StageNameSP']])) {\n $Class = $LanguageMap_en[$Subdivision['StageNameSP']];\n }\n $FullName = $LanguageMap_en[$Subdivision['StageName']];\n $MaxPerformancePoints = $Subdivision['ActivePointLimit'];\n $PerformancePointsProtect = $Subdivision['ActivePointRankedDivisionProtect'];\n $MedalIcon = $Subdivision['SeasonAwardIcon'];\n $IconArray[] = $MedalIcon;\n $string =\"{{Superimpose2\";\n $string .=\" | base = RankBGShield.png\";\n $string .=\" | base_width = 250px\";\n $string .=\" | base_style = float: right\";\n $string .=\" | base_alt =\";\n $string .=\" | base_caption = \";\n $string .=\" | base_link = \";\n $string .=\" | float = $MedalIcon.png\";\n $string .=\" | float_width = 180px\";\n $string .=\" | float_alt = \";\n $string .=\" | float_caption = \";\n $string .=\" | link = \";\n $string .=\" | t = \";\n $string .=\" | x = 33\";\n $string .=\" | y = 30\";\n $string .=\" }}\";\n $Table[] = \"|$Class||$MaxPerformancePoints||$PerformancePointsProtect||[[File:$LoadingIcon.png|link=]]||$string\";\n $Table[] = \"|-\";\n }\n $Table[] = \"|}\";\n $Output[] = implode(\"\\n\",$Table);\n $Output[] = \"|-|\\n\"; \n }\n $Output[] = \"</tabber>\\n\"; \n if (!empty($IconArray)) {\n $this->copyImages($IconArray,\"RankedDivision\");\n }\n if (!empty($LoadingIconArray)) {\n $this->copySprites($LoadingIconArray,\"RankedDivision\");\n }\n // (optional) finish progress bar\n $this->saveExtra(\"Output\\RankedDivision.txt\",implode(\"\\n\\n\",$Output));\n\n // save\n $this->io->text('Saving data ...');\n }", "function get_status($xml_response){\n\t\t$xml = simplexml_load_string($xml_response);\n\t\tif(!$xml)\n\t\t{\n\t\t\treturn 'false';\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn $xml->Response->StatusCode;\n\t\t}\n\t}", "private function formatXml($response)\n {\n libxml_use_internal_errors(true);\n if (false === simplexml_load_string($response)) {\n return $response;\n }\n\n $domxml = new DOMDocument('1.0');\n $domxml->preserveWhiteSpace = false;\n $domxml->formatOutput = true;\n /* @var $xml SimpleXMLElement */\n $domxml->loadXML($response);\n return $domxml->saveXML();\n }", "public function getMetrics(): Response\n {\n\n $registry = \\Prometheus\\CollectorRegistry::getDefault();\n\n $renderer = new RenderTextFormat();\n $result = $renderer->render($registry->getMetricFamilySamples());\n\n return $this->responseFactory->make($result, 200, ['Content-Type' => RenderTextFormat::MIME_TYPE]);\n }", "public function getStats()\n {\n return $this->result->getStats();\n }", "public function toXml(): SimpleXMLElement {\n\t\t// Create xml root\n\t\t$xmlNamespaces = 'xmlns:environet=\"environet\"';\n\t\t$xmlHeader = '<?xml version=\"1.0\" encoding=\"UTF-8\"?><environet:UploadStatistics ' . $xmlNamespaces . '></environet:UploadStatistics>';\n\t\t$xml = new SimpleXMLElement($xmlHeader);\n\n\n\t\t$xml->addChild('InputPropertiesCount', $this->getInputPropertiesCount());\n\t\t$xml->addChild('Date', $this->getDate()->format('c'));\n\t\t$xml->addChild('MonitoringPointId', $this->getMonitoringPointId());\n\n\t\tforeach ($this->getProperties() as $property) {\n\t\t\t$xmlProperty = $xml->addChild('PropertyStatistics');\n\t\t\t$xmlProperty->addChild('Symbol', $property);\n\t\t\t$xmlProperty->addChild('ValuesCount', $this->getPropertyValuesCount($property));\n\t\t\t$xmlProperty->addChild('Inserts', $this->getPropertyInserts($property));\n\t\t\t$xmlProperty->addChild('Updates', $this->getPropertyUpdates($property));\n\t\t\t$xmlProperty->addChild('NoChanges', $this->getPropertyNoChanges($property));\n\t\t\t$xmlProperty->addChild('MinTime', $this->getPropertyMinTimeFormatted($property));\n\t\t\t$xmlProperty->addChild('MaxTime', $this->getPropertyMaxTimeFormatted($property));\n\t\t}\n\n\t\treturn $xml;\n\t}", "abstract protected function buildData(DOMDocument $xml);", "protected function _parseResponse(Zend_Http_Response $response = null)\n\t{\n\t\tif (is_null($response)) {\n\t\t\trequire_once 'Zend/Service/WindowsAzure/Exception.php';\n\t\t\tthrow new Zend_Service_WindowsAzure_Exception('Response should not be null.');\n\t\t}\n\n $xml = Zend_Xml_Security::scan($response->getBody());\n\n if ($xml !== false) {\n // Fetch all namespaces\n $namespaces = array_merge($xml->getNamespaces(true), $xml->getDocNamespaces(true));\n\n // Register all namespace prefixes\n foreach ($namespaces as $prefix => $ns) {\n if ($prefix != '') {\n $xml->registerXPathNamespace($prefix, $ns);\n }\n }\n }\n\n return $xml;\n\t}", "public function rss() {\n $this->response->type('application/rss+xml');\n $result = $this->searchPlace();\n $this->set('result', $result);\n }" ]
[ "0.6234983", "0.5963709", "0.56816524", "0.56185436", "0.5602116", "0.5600713", "0.55722004", "0.55678123", "0.55657005", "0.54265857", "0.54092336", "0.5362881", "0.53055716", "0.5294501", "0.5286806", "0.52858424", "0.5279636", "0.5278357", "0.52600914", "0.5226822", "0.520424", "0.52012336", "0.5196484", "0.51919925", "0.5189199", "0.5178042", "0.51743346", "0.514907", "0.5131071", "0.51188993", "0.51176375", "0.51089436", "0.50893486", "0.5070621", "0.50649357", "0.50564474", "0.5055517", "0.5046122", "0.5028616", "0.502563", "0.5014253", "0.5011345", "0.5008074", "0.50071305", "0.5004746", "0.49974293", "0.49945801", "0.49824736", "0.49772254", "0.4972659", "0.4970187", "0.49644256", "0.49640256", "0.49636602", "0.49606943", "0.4953821", "0.4953741", "0.49493775", "0.49278912", "0.49252373", "0.49218908", "0.4916599", "0.49027097", "0.48981115", "0.48960882", "0.4893613", "0.48919567", "0.4890132", "0.4886563", "0.48801506", "0.4873373", "0.4872055", "0.4863598", "0.48614702", "0.4856743", "0.48524725", "0.48462328", "0.48436284", "0.48420858", "0.48348805", "0.48314637", "0.4831227", "0.4830743", "0.4824286", "0.48179668", "0.4812893", "0.48124513", "0.48070458", "0.4798796", "0.47964388", "0.4789119", "0.47810566", "0.47763893", "0.47753403", "0.47707307", "0.4765496", "0.47626474", "0.47608817", "0.47605327", "0.47542572" ]
0.5617685
4
Get data for event logger
public function getLogData(): array { $data = []; $data['input_properties_count'] = $this->getInputPropertiesCount(); $data['monitoring_point_id'] = $this->getMonitoringPointId(); $data['user_id'] = $this->getUserId(); $data['property_statistics'] = []; foreach ($this->getProperties() as $property) { $data['property_statistics'][] = [ 'symbol' => $property, 'values_count' => $this->getPropertyValuesCount($property), 'inserts' => $this->getPropertyInserts($property), 'updates' => $this->getPropertyUpdates($property), 'no_changes' => $this->getPropertyNoChanges($property), 'min_time' => $this->getPropertyMinTimeFormatted($property), 'max_time' => $this->getPropertyMaxTimeFormatted($property), ]; } return $data; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function eventLog() {\n\t\treturn $this->_eventLog;\n\t}", "public function logData() {\n\t\t/* Implement in subclasses */\n\t}", "public function get_event_data()\n\t{\n\t\t$copy = array();\n\t\t$copy= $this->m_data;\n\t\t\n\t\treturn $copy;\n\t}", "private function GetEventData() {\n\t\t$lEventData = array();\n\t\t$lEventData = $this->m_taskModel->GetEventData((int)$this->m_eventId);\n\t\treturn $lEventData;\n\t}", "public function getPayload(){\n return $this->EventData;\n }", "public function getLogsData() : array {\n $logsData = [];\n $logs = $this->getLogs();\n\n foreach($logs as $log){\n $logsData[] = $log->getData();\n }\n\n return $logsData;\n }", "protected function get_legacy_logdata() {\n $name = $this->get_legacy_eventname();\n $url = preg_replace('/^.*\\/mod\\/reader\\//', '', $this->get_url());\n return array($this->courseid, 'reader', $name, $url, $this->objectid, $this->contextinstanceid);\n }", "private function getMessageEventData(): array {\n $data = [\n \"type\" => \"message\",\n \"channel\" => \"C2147483705\",\n \"user\" => \"U2147483697\",\n \"text\" => \"Hello world\",\n \"ts\" => \"1355517523.000005\"\n ];\n if ( rand( 0, 1 ) == 0 ) {\n return $data;\n } else {\n $data[ 'edited' ] = [\n \"user\" => \"U2147483697\",\n \"ts\" => \"1355517536.000001\"\n ];\n return $data;\n }\n }", "public function getLogData(){\n\t\treturn $this->getNewsletterTemplateId();\n\t}", "public function getDataByKey($key) {\n return isset($this->new_log->getData()[$key]) ? $this->new_log->getData()[$key] : null;\n }", "final public function getData() {\n $result = [];\n foreach ($this->logs as $log) {\n $result[] = $this->getRow($log);\n }\n return $result;\n }", "public function getEvent()\n {\n return $this->getData('event');\n }", "public function getLogDetails() {\n return array(\n 'id' => $this->id,\n 'name' => $this->name,\n 'buff' => $this->buff,\n 'desc' => $this->desc,\n 'popup' => $this->call(\"getPopup\"),\n );\n }", "abstract public function logData( $data );", "public function log(): array\r\n {\r\n return $this->activityRepository->getLogData();\r\n }", "public function getLogObjectData() : array {\n return [\n 'objId' => $this->_id,\n 'objName' => $this->scope\n ];\n }", "protected function getData()\n\t{\n\t\t$today = $this->get(\"events\", array(\n\t\t\t\"per_page\" => -1,\n\t\t\t\"date\" => date(\"Y-m-d\", time())\n\t\t));\n\n\t\t$tomorrow = $this->get(\"events\", array(\n\t\t\t\"per_page\" => -1,\n\t\t\t\"date\" => date(\"Y-m-d\", strtotime(\"+1 day\"))\n\t\t));\n\n\t\t// if it's not friday, return\n\t\tif (date(\"N\", time()) != 5) {\n\t\t\treturn $this->combineData(array($today, $tomorrow));\n\t\t}\n\n\n\t\t// if today is friday, also get sunday and monday's events\n\t\t$sunday = $this->get(\"events\", array(\n\t\t\t\"per_page\" => -1,\n\t\t\t\"date\" => date(\"Y-m-d\", strtotime(\"+2 days\"))\n\t\t));\n\n\t\t$monday = $this->get(\"events\", array(\n\t\t\t\"per_page\" => -1,\n\t\t\t\"date\" => date(\"Y-m-d\", strtotime(\"+3 days\"))\n\t\t));\n\n\t\treturn $this->combineData(array($today, $tomorrow, $sunday, $monday));\n\t}", "protected function collectLogs()\n {\n if (! empty($this->data)) {\n return $this->data;\n }\n\n return $this->data = Services::logger(true)->logCache ?? [];\n }", "private function getLogEntry($dataFile, $metaFile, $message, $payload, $level){\n return [\n 'time' => date('Y-m-d H:i:s'),\n 'level' => $level,\n 'dataFile' => $dataFile,\n 'metaFile' => $metaFile,\n 'message' => $message,\n 'payload' => $payload\n ];\n }", "public static function getData() {}", "public function getEventData($input)\n {\n $url = $this->extractUrl(\"http://api.joind.in/v2.1/events/{id}\", $input);\n $data = $this->getData($url);\n\n if (!$data) return null;\n\n return array_shift($data->events);\n }", "private function getEventData( array $event ): array {\n return [\n 'token' => env( 'VERIFICATION_TOKEN' ),\n 'team_id' => 'T061EG9R6',\n 'api_app_id' => 'A0MDYCDME',\n 'event' => $event,\n 'type' => 'event_callback',\n 'event_id' => 'Ev0MDYHUEL',\n 'event_time' => 1515449483000108,\n 'authed_users' => [\n 0 => 'U0LAN0Z89',\n ],\n ];\n }", "public function get_data()\n\t\t{\t\t// Should there be a common method for this?\n\t\t}", "function get_data() {\n\t\t$stats = array();\n\t\t$fp = fopen('vrecohack.log', 'r');\n\t\twhile (($line = fgets($fp)) !== false) {\n\t\t\t// print_r($line);\n\t\t\tassert(strpos($line, '===START===') !== false);\n\t\t\t$request = unserialize(fgets($fp));\n\t\t\t# skip what we don't need yet\n\t\t\tfor ($i = 0; $i < 6; $i++) {\n\t\t\t\tfgets($fp);\n\t\t\t\t// $line = fgets($fp);\n\t\t\t\t// if (isset($line['REMOTE_ADDR'])) {\n\t\t\t\t// \t$ip = $line['REMOTE_ADDR'];\n\t\t\t\t// }\n\t\t\t}\n\t\t\tif (isset($request['action'])) {\n\t\t\t\t$step = $request['step'];\n\t\t\t\t$choice = $request['choice'];\n\t\t\t\t$stats[$step][$choice] += 1;\n\t\t\t}\n\t\t}\n\t\tfclose($fp);\n\t\treturn $stats;\n\t}", "public function getData()\n {\n if (!$this->enabled || !$this->debugbar) {\n return null;\n }\n\n $this->addMeasures();\n $this->addDeprecations();\n $this->timers = [];\n\n return $this->debugbar->getData();\n }", "public function getData() {}", "public function eventsLog()\n\t{\n\t\tif ($this->_eventsLog === false) {\n\t\t\t$this->_eventsLog = self::mergeHandlers($this->events());\n\t\t}\n\t\treturn $this->_eventsLog;\n\t}", "public static function getData()\n {\n return self::$data;\n }", "public static function getData()\n {\n return self::$data;\n }", "public function getLogData(){\n\t\treturn substr($this->getUsername(),0,50);\n\t}", "public function getEventPayload()\n {\n return $this->eventPayload;\n }", "public function get()\n\t{\n\t\treturn $this->pdo->query('SELECT * FROM logging');\n\t}", "public function getDataArray() {\n $emailLogData = $this->db->fetchAll(\"SELECT * FROM email_log \" . $this->getCondition() . $this->getOrder() . $this->getOffsetLimit(), $this->model->getConditionVariables());\n return $emailLogData;\n }", "private function getSlashCommandEventData(): array {\n return [\n 'token' => env( 'VERIFICATION_TOKEN' ),\n 'team_id' => 'T0001',\n 'team_domain' => 'example',\n 'enterprise_id' => 'E0001',\n 'enterprise_name' => 'Globular%20Construct%20Inc',\n 'channel_id' => 'C2147483705',\n 'channel_name' => 'test',\n 'user_id' => 'U2147483697',\n 'user_name' => 'Steve',\n 'command' => '/heyburrito',\n 'text' => 'Hey Burrito!',\n 'response_url' => 'https://hooks.slack.com/commands/1234/5678',\n 'trigger_id' => '13345224609.738474920.8088930838d88f008e0',\n 'api_app_id' => env( 'API_APP_ID' )\n ];\n }", "public function getDataModel()\n {\n $logData = $this->getData();\n \n $logDataObject = $this->logDataFactory->create();\n $this->dataObjectHelper->populateWithArray(\n $logDataObject,\n $logData,\n LogInterface::class\n );\n \n return $logDataObject;\n }", "protected function get_legacy_logdata() {\n if (isset($this->legacylogdata)) {\n return $this->legacylogdata;\n }\n\n return null;\n }", "public function get_log() {\r\n\t\treturn $this->get_file();\r\n\t}", "public function getEvent();", "public function getData()\n {\n return self::$data;\n }", "protected function getEventLogger()\n {\n $event_manager = new EventsManager;\n\n $event_manager->attach($this->alias, function ($event, $conn) {\n if ($event->getType() == 'beforeQuery') {\n $logging_name = 'db';\n\n if (logging_extension()) {\n $logging_name = 'db-'.logging_extension();\n }\n\n $logger = new Logger('DB');\n $logger->pushHandler(\n new StreamHandler(\n storage_path('logs').'/'.$logging_name.'.log',\n Logger::INFO\n )\n );\n\n $variables = $conn->getSQLVariables();\n\n if ($variables) {\n $logger->info(\n $conn->getSQLStatement().\n ' ['.implode(',', $variables).']'\n );\n } else {\n $logger->info($conn->getSQLStatement());\n }\n }\n });\n\n return $event_manager;\n }", "public function logs() {\n return $this['logs'];\n }", "public function getEventInfos() {\n // today will be useful \n $today = new \\DateTime(\"today midnight\");\n \n // get all events\n $events = $this->_machine->plugin(\"DB\")->getEventsFromDB(\"AND events.active = 1\");\n \n // retrieve dates with events\n $dates = [];\n foreach ($events as $ev) {\n $from = new \\DateTimeImmutable($ev[\"time_from\"]);\n $to = new \\DateTimeImmutable($ev[\"time_to\"]);\n $date = $from;\n while ($date <= $to) {\n $dates = $this->_insertDate($dates, $date);\n $date = $date->modify(\"+1 day\");\n }\n }\n \n // retrieve events for today\n $today_events = $this->getEventsForRange(\n $today, $today\n );\n \n // retrieve events for next weekend\n $next_weekend_events = $this->getNextWeekendEvents();\n\n $result = [\n \"tot\" => count($events),\n \"dates\" => $dates,\n \"today\" => $today_events,\n \"next_weekend\" => $next_weekend_events,\n \"events\" => $events\n ];\n \n return $result;\n }", "public function getLoggedData(): array{\n if(!$this->logged) throw new ClientNotLogged();\n else return $this->clientData;\n }", "public function getLog()\n {\n return $this->get('log');\n }", "public function getLog()\n {\n return $this->get('log');\n }", "public function dataAction() {\n\t\tswitch (filter_input(INPUT_GET, 'filetype')) {\n\t\t\tcase Mapper\\ApacheError::KEYWORD:\n\t\t\t\t$mapper = $this->_apacheErrorMapper;\n\t\t\t\tbreak;\n\t\t\tcase Mapper\\ApacheAccess::KEYWORD:\n\t\t\t\t$mapper = $this->_apacheAccessMapper;\n\t\t\t\tbreak;\n\t\t\tcase Mapper\\NginxError::KEYWORD:\n\t\t\t\t$mapper = $this->_nginxErrorMapper;\n\t\t\t\tbreak;\n\t\t\tcase Mapper\\NginxAccess::KEYWORD:\n\t\t\t\t$mapper = $this->_nginxAccessMapper;\n\t\t\t\tbreak;\n\t\t}\n\n\t\t$file = base64_decode(filter_input(INPUT_POST, 'file'));\n\t\t$startTime = filter_input(INPUT_POST, 'time_start');\n\t\t$endTime = filter_input(INPUT_POST, 'time_end');\n\t\t$term = filter_input(INPUT_POST, 'term');\n\t\t\n\t\techo json_encode(array(\n\t\t\t'header' => $mapper->getProperties(),\n\t\t\t'content' => $mapper->getLogEntries($file, $startTime, $endTime, $term)\n\t\t));\n\n\t\treturn array(\n\t\t\t'layout' => false,\n\t\t\t'view' => false\n\t\t);\n\t}", "public function getData()\n {\n if ($this->today == $this->first_day) {\n $data = $this->getAllData();\n }\n\n if (!empty($data)) {\n foreach ($data as $datum) {\n $this->handleData($datum);\n }\n }\n\n }", "function log_language_data()\r\n\t{\r\n\t\treturn $log_language_data;\r\n\t}", "public function getData() {\n return $this::$data;\n }", "function getEvent() {\t\n\n\t//Get the event from pipe and json_decode it\n\treturn json_decode(file_get_contents('php://input'));\n}", "public static function getData()\n {\n return static::$debugger && method_exists(static::$debugger, 'getData') ? static::$debugger->getData() : null;\n }", "public function getLogs() {\n\n $logs = isset($this->data['logs']) ? $this->data['logs'] : array();\n\n return $logs;\n }", "public function getLogs()\n {\n $logs = [];\n\n foreach ($this->loggers as $name => $logger) {\n $logs[$name] = $logger->getEvents();\n }\n\n return $logs;\n }", "public function getLogs()\n {\n $logs = [];\n\n foreach ($this->loggers as $name => $logger) {\n $logs[$name] = $logger->getEvents();\n }\n\n return $logs;\n }", "function getData()\n {\n return $this->date;\n }", "public function getLog(): array\n {\n return $this->log;\n }", "public function getData();", "public function getData();", "public function getData();", "public function getData();", "public function getData();", "public function getData();", "public function getData();", "public function getData();", "public function getData();", "public function getData();", "public function getData();", "public function getData();", "public function getData();", "public function getData();", "public function getData();", "public function getData();", "public function getData();", "public function getData();", "public function getData();", "public function getData();", "public function getData();", "public function getEvent()\n {\n $event = array(\n \"eid\" => $this->eid,\n \"name\" => $this->name,\n \"venue\" => $this->venue,\n \"date\" => $this->date,\n \"time\" => $this->time,\n \"type\" => $this->type,\n \"status\" => $this->status\n );\n return $event;\n }", "public function getEvent() {\n return $this->event;\n }", "public function getData()\n {\n }", "protected function _getData()\n {\n $data = Transform::toUInt8($this->_format);\n foreach ($this->_events as $timestamp => $type)\n $data .= Transform::toUInt8($type) . Transform::toUInt32BE($timestamp);\n return $data;\n }", "public function getEvent()\n {\n return $this->event;\n }", "public function getEvent()\n {\n return $this->event;\n }", "public function getEvent()\n {\n return $this->event;\n }", "protected function getData() { }", "public function get_logs()\n {\n }", "public function getData()\r\n {\r\n }", "function getData() {\n\t\treturn $this->data;\n\t}", "public function retrieveEventData(Request $request){\n $locale = $request->getLocale();\n $eveId = $request->get('id');\n $em = $this->em;\n $currentUser = $this->user;\n /** @var Event */\n $event = $em->getRepository(Event::class)->find($eveId);\n $data['sid'] = $event->getStage()->getId();\n $data['if'] = $event->getStage()->getUserMasters()->exists(fn(int $i, UserMaster $m) => $m->getProperty() == 'followableStatus' && $m->getType() == UserMaster::ADDED && $m->getUser() == $this->user);\n $isExt = $event->getOrganization() != $this->org;\n if($isExt){\n $data['ext'] = 1;\n }\n $data['sname'] = $event->getStage()->getName();\n if($isExt){\n $data['type'] = $em->getRepository(EventType::class)->getDTrans($event->getEventType(),$locale,$event->getOrganization());\n $data['group'] = $em->getRepository(EventGroup::class)->getDTrans($event->getEventType()->getEventGroup(),$locale,$event->getOrganization());\n } else {\n $data['type'] = $event->getEventType()->getEName()->getId();\n $data['group'] = $event->getEventType()->getEventGroup()->getEventGroupName()->getId();\n }\n $data['odate'] = $event->getOnsetDate();\n $data['expResDate'] = $event->getExpResDate();\n $tz = new DateTimeZone('Europe/Paris');\n foreach($event->getDocuments() as $document){\n $docData = [];\n $docData['id'] = $document->getId();\n $docData['title'] = $document->getTitle();\n $docData['path'] = $document->getPath();\n $docData['type'] = $document->getType();\n $docData['mime'] = $document->getMime();\n $docData['size'] = $document->getSize();\n $docData['authors'] = $document->getDocumentAuthors()->count() > 0 ? $document->getDocumentAuthors()->map(fn(DocumentAuthor $da) => ['mainAuthor' => $da->isLeader(), 'fullname' => $da->getAuthor()->getFullName(), 'id' => $da->getAuthor()->getId()])->getValues()[0] : '';\n $docData['inserted'] = $document->getInserted()->setTimezone($tz);\n $docData['oid'] = $document->getOrganization()->getId();\n $docData['modified'] = $document->getModified() ? $document->getModified()->setTimezone($tz) : \"\";\n $data['documents'][] = $docData;\n }\n\n foreach($event->getParentComments() as $comment){\n $comData = [];\n $comData['id'] = $comment->getId();\n $comData['self'] = $comment->getAuthor() == $currentUser;\n $comData['author'] = $comment->getAuthor()->getFullName();\n $comData['content'] = $comment->getContent();\n $comData['inserted'] = $this->nicetime($comment->getInserted()->setTimezone($tz), $locale);\n $comData['modified'] = $comment->getModified() != null;\n $comData['oid'] = $comment->getOrganization()->getId();\n\n foreach($comment->getReplies() as $reply){\n $replyData = [];\n $replyData['id'] = $reply->getId();\n $replyData['self'] = $reply->getAuthor() == $currentUser;\n $replyData['author'] = $reply->getAuthor()->getFullName();\n $replyData['content'] = $reply->getContent();\n $replyData['inserted'] = $this->nicetime($reply->getInserted()->setTimezone($tz), $locale);\n $replyData['modified'] = $reply->getModified() != null;\n $replyData['oid'] = $reply->getOrganization()->getId();\n $comData['replies'][] = $replyData;\n }\n $data['comments'][] = $comData;\n }\n \n return new JsonResponse($data, 200);\n }", "protected function getLogEntries() {}", "public static function event() {\n return self::service()->get('events');\n }", "public function getData() {\n\t\treturn $this->data;\n\t}", "public function getData() {\n\t\treturn $this->data;\n\t}", "public function getLog () {\n return $this->log;\n }", "public function getHistoryEventDescriptionData()\n {\n return array(\n 'trx_method' => static::t($this->getPaymentMethod()->getName()),\n 'trx_type' => static::t($this->getType()),\n 'trx_value' => $this->getOrder()->getCurrency()->roundValue($this->getValue()),\n 'trx_status' => static::t($this->getReadableStatus()),\n );\n }", "protected function getData(): array\n {\n $logRepository = GeneralUtility::makeInstance(LogRepository::class);\n return [\n 'amounts' => [\n $logRepository->getOverallUnsubscribes(),\n ($logRepository->getOverallOpenings() - $logRepository->getOverallUnsubscribes()),\n ],\n 'titles' => [\n $this->getWidgetLabel('unsubscriberate.label.0'),\n $this->getWidgetLabel('unsubscriberate.label.1'),\n ],\n ];\n }", "private function getData()\n {\n $data = array();\n\n $data = array_merge($data,\n $this->services->CalendarData->currentUserData(),\n $this->services->Common->subPageName( $this->timber->translator->trans('Calendar') . \" | \" ),\n $this->services->Common->runtimeScripts( 'calendar' ),\n $this->services->Common->injectScripts(array(\n 'projectsEvents' => $this->services->CalendarData->projectsEvents(),\n 'tasksEvents' => $this->services->CalendarData->tasksEvents(),\n 'projectsEventsColor' => '#ecf0f1',\n 'projectsEventsTextColor' => '#2c3e50',\n 'tasksEventsColor' => '#bdc3c7',\n 'tasksEventsTextColor' => '#2980b9',\n 'calEvent_id' => $this->timber->translator->trans('ID'),\n 'calEvent_iden' => $this->timber->translator->trans('Identifier'),\n 'calEvent_type' => $this->timber->translator->trans('Type'),\n 'calEvent_mi_id' => $this->timber->translator->trans('Milestone ID'),\n 'calEvent_mi_title' => $this->timber->translator->trans('Milestone Title'),\n 'calEvent_pr_id' => $this->timber->translator->trans('Project ID'),\n 'calEvent_owner_id' => $this->timber->translator->trans('Owner ID'),\n 'calEvent_assign_to' => $this->timber->translator->trans('Assignee ID'),\n 'calEvent_assign_to_name' => $this->timber->translator->trans('Assignee Name'),\n 'calEvent_assign_to_email' => $this->timber->translator->trans('Assignee Email'),\n 'calEvent_title' => $this->timber->translator->trans('Title'),\n 'calEvent_description' => $this->timber->translator->trans('Description'),\n 'calEvent_status' => $this->timber->translator->trans('Status'),\n 'calEvent_progress' => $this->timber->translator->trans('Progress'),\n 'calEvent_priority' => $this->timber->translator->trans('Priority'),\n 'calEvent_start_at' => $this->timber->translator->trans('Start at'),\n 'calEvent_end_at' => $this->timber->translator->trans('End at'),\n 'calEvent_created_at' => $this->timber->translator->trans('Created at'),\n 'calEvent_updated_at' => $this->timber->translator->trans('Updated at'),\n 'calEvent_currency' => $this->timber->translator->trans('Currency'),\n 'calEvent_reference' => $this->timber->translator->trans('Reference'),\n 'calEvent_ref_id' => $this->timber->translator->trans('Reference ID'),\n 'calEvent_version' => $this->timber->translator->trans('Version'),\n 'calEvent_budget' => $this->timber->translator->trans('Budget'),\n 'calEvent_tax_value' => $this->timber->translator->trans('Tax Value'),\n 'calEvent_tax_type' => $this->timber->translator->trans('Tax Type'),\n 'calEvent_discount_value' => $this->timber->translator->trans('Discount Value'),\n 'calEvent_discount_type' => $this->timber->translator->trans('Discount Type'),\n 'calEvent_attach' => $this->timber->translator->trans('Attachments'),\n 'calEvent_owners' => $this->timber->translator->trans('Owners'),\n 'calEvent_staff' => $this->timber->translator->trans('Staff'),\n 'calEvent_clients' => $this->timber->translator->trans('Clients'),\n 'calEvent_staff_ids' => $this->timber->translator->trans('Staff IDs'),\n 'calEvent_clients_ids' => $this->timber->translator->trans('Clients IDs'),\n ))\n );\n\n return $data;\n }", "public function getData()\n\t{\n\t\treturn $this->data;\n\t}", "public function getData()\n\t{\n\t\treturn $this->data;\n\t}", "public function getData()\n\t{\n\t\treturn $this->data;\n\t}" ]
[ "0.6849492", "0.67474085", "0.6635382", "0.6611963", "0.6526566", "0.64194936", "0.6406827", "0.63158256", "0.6297079", "0.6247425", "0.62433255", "0.6224972", "0.62244844", "0.62068737", "0.6181251", "0.6173161", "0.6172496", "0.60512906", "0.59474933", "0.5942633", "0.5934989", "0.59227616", "0.5913707", "0.59077823", "0.5901856", "0.58909744", "0.58894724", "0.58693993", "0.5868994", "0.5868147", "0.5862662", "0.5829384", "0.58019775", "0.57975596", "0.5786889", "0.5776032", "0.5759459", "0.57420564", "0.57329893", "0.57245934", "0.57233715", "0.5719676", "0.57180035", "0.57092166", "0.57092166", "0.5695646", "0.5683954", "0.56769305", "0.5676638", "0.56747854", "0.56704974", "0.5660879", "0.5660616", "0.5660616", "0.5632883", "0.5624841", "0.5610508", "0.5610508", "0.5610508", "0.5610508", "0.5610508", "0.5610508", "0.5610508", "0.5610508", "0.5610508", "0.5610508", "0.5610508", "0.5610508", "0.5610508", "0.5610508", "0.5610508", "0.5610508", "0.5610508", "0.5610508", "0.5610508", "0.5610508", "0.5610508", "0.560603", "0.5589914", "0.55877155", "0.5572596", "0.55679667", "0.55679667", "0.55679667", "0.55540377", "0.5551745", "0.5549269", "0.55294317", "0.5523715", "0.5516361", "0.5516065", "0.5511395", "0.5511395", "0.5501762", "0.5499583", "0.5495482", "0.5492606", "0.5491664", "0.5491664", "0.5491664" ]
0.6168976
17
Calculate maximum distance for specified word length
private function _calculateMaxDistance($prefixLength, $termLength, $length) { $this->_maxDistances [$length] = ( int ) ((1 - $this->_minimumSimilarity) * (min ( $termLength, $length ) + $prefixLength)); return $this->_maxDistances [$length]; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function findLongestWord() {\n\n }", "public function wordLength(){\n\n\t\t\t\t\n\t\t\t\t$array = explode(' ',$this->sentence);\n\t\t\t\t$Length = strlen($array[0]);\n\t\t\t\t$shortestWord=NULL;\n\n\t\t\t\tforeach ($array as $word) {\n \t\t\t\t\tif (strlen($word) < $Length) {\n \t\t\t\t\t $Length = strlen($word);\n \t\t\t \t\t $shortestWord = $word;\n \t\t\t\t }\n\t\t\t\t}\n\t\t\t\techo $shortestWord;\n\n\t\t\t}", "public function getMaxLength();", "function getLongestWord($sentence) {\n\t\t$words = explode(' ', $sentence);\n\n\t\t$longestWord = '';\n\n\t\t$nbWords = count($words);\n\n\t\tif($nbWords > 0) {\n\t\t\t$longestWord = $words[0];\n\t\t}\n\n\t\tfor($i = 0; $i < $nbWords; $i++) {\n\t\t\tif(strlen($words[$i]) > strlen($longestWord)) {\n\t\t\t\t$longestWord = $words[$i];\n\t\t\t}\n\t\t}\n\t\treturn $longestWord;\n\t}", "public function getMaxLength() {}", "function trimWordLen($str, $max) {\n $str = cleanSpaces($str);\n $lines = explode(\"\\n\", $str);\n $ss = \"\";\n foreach ($lines as $i => $line) {\n $words = explode(\" \", $line);\n foreach ($words as $j => $w)\n $ss.=trimWord($w, $max) . \" \";\n $ss.=\"\\n\";\n }\n return cleanSpaces($ss);\n}", "public function getLongestLineLength(): int\n {\n return 0;\n }", "function _char_limit($str, $length, $minword = 3)\n {\n $sub = '';\n $len = 0;\n \n foreach (explode(' ', $str) as $word)\n {\n $part = (($sub != '') ? ' ' : '') . $word;\n $sub .= $part;\n $len += strlen($part);\n \n if (strlen($word) > $minword && strlen($sub) >= $length)\n {\n break;\n }\n }\n \n return $sub . (($len < strlen($str)) ? '...' : '');\n\n }", "protected function get_max_length(): int\n\t{\n\t\treturn $this->end < $this->total ? $this->length : -1;\n\t}", "function too_long_words($text,$word_maxlength)\n {\n $text = preg_replace(\"/\\015\\012|\\015|\\012/\", \"\\n\", $text);\n $text = str_replace(\"\\n\", ' ', $text);\n $words = explode(' ',$text);\n foreach($words as $word)\n {\n $length = mb_strlen(trim($word), CHARSET);\n if($length > $word_maxlength)\n {\n $too_long_words[] = $word;\n }\n }\n if(isset($too_long_words))\n {\n return $too_long_words;\n }\n return false;\n }", "function WordWrap(&$text, $maxwidth)\n\t\t{\n\t\t\t$biggestword=0;//EDITEI\n\t\t\t$toonarrow=false;//EDITEI\n\n\t\t\t$text = trim($text);\n\t\t\tif ($text==='') return 0;\n\t\t\t$space = $this->GetStringWidth(' ');\n\t\t\t$lines = explode(\"\\n\", $text);\n\t\t\t$text = '';\n\t\t\t$count = 0;\n\n\t\t\tforeach ($lines as $line)\n\t\t\t{\n\t\t\t\t$words = preg_split('/ +/', $line);\n\t\t\t\t$width = 0;\n\n\t\t\t\tforeach ($words as $word)\n\t\t\t\t{\n\t\t\t\t\t$wordwidth = $this->GetStringWidth($word);\n\n\t\t\t\t\t //EDITEI\n\t\t\t\t\t //Warn user that maxwidth is insufficient\n\t\t\t\t\t if ($wordwidth > $maxwidth)\n\t\t\t\t\t {\n\t\t\t\t\t\t if ($wordwidth > $biggestword) $biggestword = $wordwidth;\n\t\t\t\t\t\t $toonarrow=true;//EDITEI\n\t\t\t\t\t }\n\t\t\t\t\tif ($width + $wordwidth <= $maxwidth)\n\t\t\t\t\t{\n\t\t\t\t\t\t$width += $wordwidth + $space;\n\t\t\t\t\t\t$text .= $word.' ';\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$width = $wordwidth + $space;\n\t\t\t\t\t\t$text = rtrim($text).\"\\n\".$word.' ';\n\t\t\t\t\t\t$count++;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t$text = rtrim($text).\"\\n\";\n\t\t\t\t$count++;\n\t\t\t}\n\t\t\t$text = rtrim($text);\n\n\t\t\t//Return -(wordsize) if word is bigger than maxwidth \n\t\t\tif ($toonarrow) return -$biggestword;\n\t\t\telse return $count;\n\t\t}", "public static function longestString($array) {\r\n\t$i = 0;\r\n\t\r\n\tforeach ($array as $value) {\t\r\n\t\tif (strlen($value) > $i) {\t\r\n\t\t\t$i = strlen($value);\r\n\t\t}\t\t\t\r\n\t}\r\n\t\r\n\treturn $i;\r\n}", "public function setMaximumCalcLength($length = 200)\n {\n $this->_maxNameCalcLength = $length;\n\n return $this;\n }", "public function boxIDDistance(): string\n {\n\n $j = 0;\n $sizeOfArray = count($this->inputArray);\n $firstSimilarWord = '';\n $secondSimilarWord = '';\n\n foreach ($this->inputArray as $inputValue) {\n for ($i = $j; $i < $sizeOfArray - 1; $i++) {\n $wordCompare = $this->inputArray[$i + 1];\n if (levenshtein($inputValue, $wordCompare, 2, 1, 2) < 2) {\n $firstSimilarWord = $inputValue;\n $secondSimilarWord = $wordCompare;\n break 2;\n }\n }\n $j++;\n }\n\n $letterAppearsOnce = array_search(1, array_count_values(str_split($firstSimilarWord . $secondSimilarWord)), true);\n return str_replace($letterAppearsOnce,'',$firstSimilarWord);\n }", "function acoc_max_charlength($charlength, $text = NULL) {\n\tif ($text) {\n\t\t$excerpt = $text;\n\t} else {\n\t\t$excerpt = get_the_excerpt();\n\t}\n\n\t$charlength++;\n\tif (strlen($excerpt)>$charlength) {\n\t\t$subex = substr($excerpt,0,$charlength-5);\n $exwords = explode(\" \",$subex);\n\t\t$excut = -(strlen($exwords[count($exwords)-1]));\n\t\tif ($excut<0) {\n\t\t\treturn substr($subex,0,$excut);\n\t\t} else {\n\t\t\treturn $subex;\n\t\t}\n\t\treturn '..';\n\t} else {\n\t\treturn $excerpt;\n\t}\n}", "function funcs_cutLength($string, $length, $word_length = null,$act_length = null){\n\t$string = (!is_null($string))?trim($string):'';\n\t//do not check the size of the string if we already know it\n\tif (is_null($act_length))$act_length=strlen($string);\n\tif (!is_null($word_length) && !empty($string)){\n\t\t//in the future use this instead of calling this whole function\n\t\t$string = wordwrap($string,$word_length,\"\\n\",1);\n\t}\n\tif (!is_null($length) && $act_length>$length && $length>4){\n\t\t$string = substr($string,0,$length-3).'...';\n\t}\n\treturn $string;\n}", "function score($ngram, $length = 3) {\n\n\t$total_score = 0;\n\t$total_words = 0;\n\n\t// Go through each word\n\tforeach($ngram->data as $key=>$val) {\n\t\n\t\tif(strlen($key) >= $length) {\n\t\t\t$total_score += scoreWord($ngram, $key) * $val;\n\t\t\t$total_words += $val;\n\t\t}\n\n\t}\n\t\n\treturn $total_score / $total_words; // avg\n\t\n}", "public function getMaxLength()\n {\n return $this->maxLength;\n }", "public function getMaxLength() {\n return $this->maxLength;\n }", "function tfuse_substr($str, $length, $more = '...', $minword = 3) {\r\n $sub = '';\r\n $len = 0;\r\n \r\n foreach (explode(' ', $str) as $word) {\r\n $part = (($sub != '') ? ' ' : '') . $word;\r\n $sub .= $part;\r\n $len += strlen($part);\r\n \r\n if (strlen($word) > $minword && strlen($sub) >= $length)\r\n break;\r\n }\r\n \r\n return (($len < strlen($str)) ? $sub . ' ' . $more : $sub);\r\n }", "function maxDistToClosest($seats) {\n// foreach ($seats as $index => $seat) {\n// if ($seat == 1) {\n// $one[$idx] = $index;\n// $len[] = ($index - $one[$idx - 1]) / 2;\n// $start = $index;\n// $idx++;\n// }\n// }\n// return $start;\n// if (($seats[0] ^ $seats[count($seats) - 1] == 1) && (max($len) == $len[0]\n// || max($len) == $len[count($len) - 1])) {\n// return max(count($seats) - $start - 1, $start);\n// }\n// return floor(max($len));\n }", "public function mostLongestPalindromeWords(\n string $text,\n string $rule = 'long',\n int $max_count = 10\n ) {\n $text = $this->createPalindromeWordsListArray($text);\n $text = implode(' ', array_reverse($text));\n\n return $this->mostLongestShortestWords($text, $rule, $max_count);\n }", "protected function getOptimalWeightTreshold($targetLength)\n {\n $sortedByWeight = $this->sentenceMetadata;\n $sorter = function($sentenceA, $sentenceB) {\n if($sentenceA['weight'] < $sentenceB['weight'])\n return 1;\n else if($sentenceA['weight'] > $sentenceB['weight'])\n return -1;\n return 0;\n };\n uasort($sortedByWeight, $sorter);\n\n $currentLength = 0;\n foreach($sortedByWeight as $sentence) {\n $currentLength += $sentence['count'];\n if($currentLength > $targetLength) {\n return $sentence['weight'];\n }\n }\n return 0;\n }", "function distance($a, $b)\n{\n if (strlen($a) !== strlen($b)) {\n throw new \\InvalidArgumentException(\"DNA strands must be of equal length.\", 1);\n }\n //\n // YOUR CODE GOES HERE\n //\n if ($a === $b)\n return 0;\n\n $charArrayA = str_split($a);\n $charArrayB = str_split($b);\n $hammingDistance = 0;\n foreach ($charArrayA as $idx => $value) {\n if( $charArrayA[$idx] !== $charArrayB[$idx]) {\n $hammingDistance++;\n }\n }\n\n return $hammingDistance;\n}", "function anteprima($txt, $lung_max) {\n\n return (count($words = explode(' ', $txt)) > $lung_max) ? implode(' ', array_slice($words, 0, $lung_max)) . \"...\" : $txt;\n\n}", "function find_similar_words($word, $threshold)\n {\n $similar = array();\n $tbl = 'babl_words_' . $this->lan;\n $word = addslashes( ( trim( $word ) ) );\n $sndx = substr($word, 0, 2);\n $query = \"select `word` AS word from `$tbl` where `di`=?\";\n @$result = $this->mDb->query($query, array($sndx));\n while ($res = $result->fetchRow() )\n {\n $tword = $res[\"word\"];\n $lev = levenshtein($tword, $word);\n if (count($similar) < $threshold)\n {\n $similar[$tword] = $lev;\n asort ($similar);\n }\n else\n {\n // If the array is full then if the lev is better than the worst lev\n // then update $keys = array_keys($similar);\n $last_key = $keys[count($keys) - 1];\n if ($lev < $similar[$last_key])\n {\n unset ($similar[$last_key]);\n $similar[$tword] = $lev;\n asort ($similar);\n }\n }\n }\n return $similar;\n }", "function shapeSpace_truncate_string($phrase, $max_words) {\n\t\n\t$phrase_array = explode(' ', $phrase);\n\t\n\tif (count($phrase_array) > $max_words && $max_words > 0) \n\t\t$phrase = implode(' ', array_slice($phrase_array, 0, $max_words)) . __('...', 'shapespace');\n\t\n\treturn $phrase;\n\t\n}", "function substrwords($text,$maxchar){\n\tif (strlen($text) > $maxchar) { \n\t\t$words = explode(\" \", $text); \n\t\t$output = ''; \n\t\t$i = 0; \n\t\twhile (true) { \n\t\t\t$length = (strlen($output) + strlen($words[$i]));\n\t\t\tif ($length > $maxchar) { \n\t\t\t\tbreak; \n\t\t\t} else { \n\t\t\t\t$output = $output . \" \" . $words[$i]; \n\t\t\t\t++$i; \n\t\t\t} \n\t\t}\n\t} else { \n\t\t$output = $text;\n\t}\n\t return $output;\n}", "public function getMaxCombinations(int $length): float\n {\n return (float) pow(count($this->availableChars), $length);\n }", "static function last_word($sentence){\n if(!isset($sentence)){\n $result = '0';\n }else{\n $all_word=explode(\" \", $sentence);\n $last_word=$all_word[count(explode(\" \", $sentence))-1];\n $result = strlen($last_word);\n\n }\n return $result;\n }", "function truncate($input,$maxChars,$maxWords=0,$more='...'){\r\n\t//Make sure the input is not just spaces\r\n\tif ((trim($input) != \"\")){\r\n\t\t//split all the words in the input text by using space\r\n\t\t$words = preg_split('/\\s+/', $input);\r\n\r\n\t\t//Check if the maximum words is greater than 0\r\n\t\tif ($maxWords > 0)\r\n\t\t$words = array_slice($words, 0, $maxWords);\r\n\r\n\r\n\t\t$words = array_reverse($words);\r\n\r\n\t\t$chars = 0;\r\n\t\t$truncated = array();\r\n\r\n\t\twhile(count($words) > 0)\r\n\t\t{\r\n\t\t $fragment = trim(array_pop($words));\r\n\t\t $chars += strlen($fragment);\r\n\r\n\t\t if($chars > $maxChars) break;\r\n\r\n\t\t $truncated[] = $fragment;\r\n\t\t}\r\n\r\n\t\t$result = implode($truncated, ' ');\r\n\r\n\t\tif (($result == \"\") || ($maxWords == 0)){\r\n\t\t\treturn substr($input, 0,$maxChars).$more;\r\n\t\t}\r\n\r\n\t\treturn $result . ($input == $result ? '' : $more);\r\n\t}\r\n\r\n}", "public function get_word_length()\n\t{\n\t\treturn false;\n\t}", "function lengthOfLastWord($str)\n{\n if (strlen($str)==0) {\n return;\n }\n $arr = explode(\" \", $str);\n $result = array_diff($arr, array(''));\n $result = strlen($result[count($result)-1]);\n return $result;\n}", "public function getDistance();", "public function mostLongestShortestWords(\n string $text,\n string $rule = null,\n int $max_count = 10\n ) {\n $words_arr = $this->createWordsListArray($text);\n $words_arr = array_unique($words_arr);\n\n if ($rule == 'long') {\n usort(\n $words_arr,\n function ($a, $b) {\n return (mb_strlen($b) <=> mb_strlen($a));\n }\n );\n } elseif ($rule == 'short') {\n usort(\n $words_arr,\n function ($a, $b) {\n return (mb_strlen($a) <=> mb_strlen($b));\n }\n );\n } else {\n return '- wrong rule set -';\n }\n\n $words_list = array_slice($words_arr, 0, $max_count);\n\n return implode(', ', array_values($words_list));\n }", "public function getMaxLength()\n {\n return $this->__get(self::FIELD_MAXLENGTH); \n }", "private function check_Max($word){\r\n return (strlen($word) > $this->_max) ? true : false;\r\n }", "function FrequentWordsMismatches($genome, $k, $d)\n{\n\t$solution = array();\n\t$_max = -1;\n\tfor ($i = 0; $i <= strlen($genome) - $k; $i++)\n\t{\n\t\t$_text = substr($genome, $i, $k);\n\t\t$_indexes = ApproximatePatternMatching($_text, $genome, $d);\n\t\tif ($_indexes)\n\t\t{\n\t\t\t$_cnt = count($_indexes);\n\t\t\tif ($_cnt > $_max)\n\t\t\t{\n\t\t\t\t$solution = array();\n\t\t\t\t$solution[$_text] = $_text;\n\t\t\t\t$_max = $_cnt;\n\t\t\t}\n\t\t\telseif ($_cnt == $_max)\n\t\t\t{\n\t\t\t\t$solution[$_text] = $_text;\n\t\t\t}\n\t\t\t// echo $_max.'<hr>';\n\t\t}\n\t}\n\treturn $solution;\n}", "public function getMaximumLineLength() {}", "public function getLengthMax()\n {\n return $this->lengthMax;\n }", "public function setMaximumWordLength($maximum)\n {\n return $this->setOption('maximumwordlength', $maximum);\n }", "Public function longitudMax($caneda, $num)\n\t\t{\n\t\t\tif(strlen($caneda) > $num)\n\t\t\t\treturn false;\n\t\t\telse\n\t\t\t\treturn true;\n\t\t}", "public function getWordlen()\n {\n return $this->_wordlen;\n }", "public function getWordlen()\n {\n return $this->_wordlen;\n }", "public function longestIndexLength($idless=false) {\n $len = 0;\n foreach ($this->getAllIndexes() as $index) {\n foreach ($index as $field) {\n if ($len < strlen($idless ? $field->getNameWithoutId() : $field->getName())) {\n $len = strlen($idless ? $field->getNameWithoutId() : $field->getName());\n }\n }\n }\n return $len;\n }", "public function getMaxAttributeLength()\n {\n return (int)$this->floatValue('recorded.value.max.length', 1200);\n }", "function getMaxTextboxWidth()\n\t{\n\t\t$maxwidth = 0;\n\t\tforeach ($this->answers as $answer)\n\t\t{\n\t\t\t$len = strlen($answer->getAnswertext());\n\t\t\tif ($len > $maxwidth) $maxwidth = $len;\n\t\t}\n\t\treturn $maxwidth + 3;\n\t}", "function the_excerpt_max_charlength($charlength) {\n $excerpt = get_the_excerpt();\n $charlength++;\n if(strlen($excerpt)>$charlength) {\n $subex = substr($excerpt,0,$charlength-5);\n $exwords = explode(\" \",$subex);\n $excut = -(strlen($exwords[count($exwords)-1]));\n if($excut<0) {\n echo substr($subex,0,$excut);\n } else {\n \t echo $subex;\n }\n echo ' <a href=\"'.get_permalink().'\"> Read more ...</a>';\n } else {\n\t echo $excerpt;\n }\n}", "function TextMax()\n\t{\n\t\treturn 1000000000; // should be 1 Gb?\n\t}", "public function longestFieldLength($idless=false) {\n $len = 0;\n foreach ($this->fields as $field) {\n if ($len < strlen($idless ? $field->getNameWithoutId() : $field->getName())) {\n $len = strlen($idless ? $field->getNameWithoutId() : $field->getName());\n }\n }\n return $len;\n }", "public function sortTermsByDescendingLength($a, $b) {\n\t\t// Calculate length correctly by relying on \\TYPO3\\CMS\\Core\\Charset\\CharsetConverter\n\t\t$aTermLength = $GLOBALS['TSFE']->csConvObj->strlen($GLOBALS['TSFE']->renderCharset, $a['term']);\n\t\t$bTermLength = $GLOBALS['TSFE']->csConvObj->strlen($GLOBALS['TSFE']->renderCharset, $b['term']);\n\t\tif ($aTermLength == $bTermLength) {\n\t\t\treturn 0;\n\t\t} else {\n\t\t\treturn ($aTermLength < $bTermLength) ? +1 : -1;\n\t\t}\n\t}", "function limit_word_count($title) {\n $len = 10; //change this to the number of words\n if (str_word_count($title) > $len) {\n $keys = array_keys(str_word_count($title, 2));\n $title = substr($title, 0, $keys[$len]);\n }\n return $title;\n}", "public function getMaxWidth() {}", "public function getMaxWidth() {}", "public function getMaxWidth() {}", "public function getMaxWidth() {}", "public function getMaxWidth() {}", "function distance($v1, $v2)\r\n{\r\n return sqrt(pow(($v1[0]-$v2[0]),2)+pow(($v1[1]-$v2[1]),2));//計算座標2點的距離\r\n}", "function chkLength($string){//word 가 짧은지? 2글자 이하면 앞에 것 까지 돌려주기\r\n\t\t$ary = explode(' ',$string);\r\n\t\t$text = end($ary);\r\n\t\t$length = mb_strlen( end($ary), 'utf-8' );//문자의 길이\r\n\t\tif($length<=2)\r\n\t\t{\r\n\t\t\t$index = sizeof($ary);\r\n\t\t\t$index -=2;\r\n\t\t\t$text=($ary[$index].$text);\r\n\t\t}\r\n\t\treturn $text;\r\n\t}", "function distance($dna1, $dna2) {\n\n if (strlen($dna1) != strlen($dna2)) {\n throw new InvalidArgumentException();\n }\n \n $diff = 0;\n\n for ($i = 0; $i < strlen($dna1); $i++) {\n if($dna1[$i] != $dna2[$i]){\n $diff++;\n }\n }\n \n return $diff;\n}", "function limit_words($string,$word_count)\n{\n if (strlen($string) > $word_count) {\n\n // truncate string\n $stringCut = substr($string, 0, $word_count);\n\n // make sure it ends in a word so assassinate doesn't become ass...\n $string = substr($stringCut, 0, strrpos($stringCut, ' ')).'';\n }\n return $string;\n}", "function snippet_by_word_count($text, $maxWords = 20, $ellipsis = '...')\n{\n // strip html tags from the text\n $text = strip_formatting($text);\n if ($maxWords > 0) {\n $textArray = explode(' ', $text);\n if (count($textArray) > $maxWords) {\n $text = implode(' ', array_slice($textArray, 0, $maxWords)) . $ellipsis;\n }\n } else {\n return '';\n }\n return $text;\n}", "public function longestIndexCombinations() {\n $len = 0;\n foreach ($this->getAllIndexCombinations() as $key => $fields) {\n if ($len < strlen($key)) {\n $len = strlen($key);\n }\n }\n return $len;\n }", "protected function _findLongestElementInArray(array $array)\n {\n $size = 0;\n\n foreach ($array as $value) {\n if (!is_scalar($value)) {\n continue;\n }\n \n if (strlen((string)$value) > $size) {\n $size = strlen($value);\n }\n }\n\n return $size;\n }", "public function wordsMax(string|int|float $message): self\n {\n return $this->addMessage(new WordsMax($message));\n }", "function wpe_excerptlength_homelatest($length) {\n return 13;\n}", "function fake_levenshtein($a,$b)\n{\n\t// Some stripping, for performance, and because white space doesn't matter so much in HTML anyway\n\t$a=preg_replace('#\\s#','',$a);\n\t$b=preg_replace('#\\s#','',$b);\n\n\t$a_len=strlen($a);\n\t$b_len=strlen($b);\n\tif (($a_len<255) && ($b_len<255))\n\t{\n\t\treturn levenshtein($a,$b);\n\t}\n\t$percent=0.0;\n\treturn max($a_len,$b_len)-similar_text($a,$b,$percent);\n}", "public static function getMaximumPathLength() {}", "public function getMaxLength()\n {\n return 254;\n }", "public function maxNorm() : float\n {\n return $this->abs()->max()->max();\n }", "public function short($text, $max = 500) {\n\t\t\n\t\tif (strlen($text) < $max) return $text;\n\t\t\n\t\t$sentences = preg_split(\"/(?<=\\.\\s)/\", $text, -1);\n\t\t\n\t\t$text = \"\";\n\t\t$sum = 0;\n\t\t\n\t\tforeach ($sentences as $sentence) {\n\t\t\t$cur = strlen($sentence);\n\t\t\tif ($sum + $cur > $max) break;\n\t\t\t$sum += $cur;\n\t\t\t$text .= $sentence;\n\t\t}\n\t\t\n\t\t// Remove leading and trailing spaces\n\t\treturn trim($text);\n\t}", "function mobject_excerpt_length( $length ) {\n\tif ( is_admin() ) {\n\t\treturn $length;\n\t}\n\t$display_options = get_customizer_settings()[ WPM_PREFIX . 'collection_style' ];\n\tif ( $display_options['excerpt_max_length'] ) {\n\t\treturn $display_options['excerpt_max_length'];\n\t}\n\treturn $length;\n}", "function Similarity ($str, $a_link) \r\n{\t\r\n\t$str1=getDNSName($str);\r\n\t$adns1=getDNSName($a_link);\r\n $thresh=0.8;\r\n $pos=((strstr($adns1,$str1)) || (strstr($str1,$adns1)));\r\n if($pos===true)\r\n {\r\n\t\tglobal $v;\r\n\t\t$v=$str;\r\n\t\treturn true;\r\n\t}\r\n\t$maxlen=strlen($adns1);\r\n\t$minchanges = levenshtein($str1, $adns1);\r\n\t$temp=($maxlen-$minchanges)/$maxlen;\r\n\tif (($thresh<$temp) && ($temp<1))\r\n\t{ \t\r\n\t\tglobal $v;\r\n\t\t$v=$str;\r\n\t\treturn true; \r\n\t}\r\n\treturn false;\r\n}", "function uwmadison_excerpt_length( $length ) {\n\t\treturn 40;\n\t}", "public function getMaxPadSize() {\n\treturn $this->textStorageSize - $this->getOverheadSize($this->algoBlockSize - 1);\n }", "function string_limit_words($string, $word_limit)\r\n{ \r\n $words = explode(' ', $string, ($word_limit + 1));\r\n if(count($words) > $word_limit)\r\n array_pop($words);\r\n $wd =implode(' ', $words);\r\n return $wd;\r\n}", "public function mostLongestShortestSentences(\n string $text,\n string $rule = null,\n int $max_count = 10\n ) {\n $sentences_arr = $this->createSentencesListArray($text);\n\n if ($rule == 'long') {\n usort(\n $sentences_arr,\n function ($a, $b) {\n return (mb_strlen($b) <=> mb_strlen($a));\n }\n );\n } elseif ($rule == 'short') {\n usort(\n $sentences_arr,\n function ($a, $b) {\n return (mb_strlen($a) <=> mb_strlen($b));\n }\n );\n } else {\n return '- wrong rule set -';\n }\n\n $sentences_list = array_slice($sentences_arr, 0, $max_count);\n\n return implode('<br><br>', array_values($sentences_list));\n }", "public function shorten($str, $length, $minword = 3, $extension = '...')\n\t{\n\t\t$sub = '';\n\t\t$len = 0;\n\n\t\tforeach (explode(' ', $str) as $word)\n\t\t{\n\t\t\t$part = (($sub != '') ? ' ' : '') . $word;\n\t\t\t$sub .= $part;\n\t\t\t$len += strlen($part);\n\n\t\t\tif (strlen($word) > $minword && strlen($sub) >= $length)\n\t\t\t{\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\treturn $sub . (($len < strlen($str)) ? $extension : '');\n\t}", "function my_string_limit_words($string, $word_limit)\r\n{\r\n $words = explode(' ', $string, ($word_limit + 1));\r\n if(count($words) > $word_limit)\r\n array_pop($words);\r\n return implode(' ', $words).'... ';\r\n}", "protected function _getMax()\n {\n $max = 0;\n if (!empty($this->_tagsArray)) {\n $p_size = 0;\n foreach ($this->_tagsArray as $cKey => $cVal) {\n $c_size = $cVal['size'];\n if ($c_size > $p_size) {\n $max = $c_size;\n $p_size = $c_size;\n }\n }\n }\n return $max;\n }", "function length() {\n return $this->norm();\n }", "function ottava_rima_fitness($stanza, $delimiter = \"\\n\", $syllable_tolerance = 2) {\n if (!is_string($stanza)) {\n throw new InvalidArgumentException('The stanza must be a string.');\n }\n if (!is_string($delimiter)) {\n throw new InvalidArgumentException('The delimiter must be a string.');\n }\n\n // Score starts at 0.\n $score = 0;\n\n // Separate the stanza into lines.\n $lines = explode($delimiter, trim($stanza));\n\n // Ensure there are the correct amount of lines.\n if (count($lines) !== 8) {\n $score += abs(8 - count($lines)) * 20;\n\n // Ensures there are at most 8 lines.\n array_splice($lines, 8);\n\n // If there are less than 8, add on blank lines.\n for ($i = count($lines); $i < 8; $i++) {\n $lines[] = '';\n }\n }\n\n $min_syllable_count = 10 - $syllable_tolerance;\n $max_syllable_count = 10 + $syllable_tolerance;\n $last_words = array();\n foreach ($lines as $line) {\n // Adapted from:\n // http://stackoverflow.com/questions/790596/split-a-text-into-single-words\n // This will split on a group of one or more whitespace characters, but also suck in any surrounding\n // punctuation characters. It also matches punctuation characters at the beginning or end of the string.\n // This discriminates cases such as \"don't\" and \"he said 'ouch!'\"\n $line_words = preg_split('/((^\\p{P}+)|(\\p{P}*\\s+\\p{P}*)|(\\p{P}+$))/', $line, -1, PREG_SPLIT_NO_EMPTY);\n\n // Ottava rima poems should be iambic pentameter, so we need to make sure there are 10 syllables.\n // We're not going to make sure it's da-DUM da-DUM da-DUM da-DUM da-DUM, even though it should be.\n $syllable_count = 0;\n foreach ($line_words as $line_word) {\n $syllable_count += estimate_syllables($line_word);\n }\n if ($syllable_count < $min_syllable_count && $syllable_count > $max_syllable_count) {\n $score += abs(10 - $syllable_count);\n if (OTTAVA_RIMA_FITNESS_DEBUG) {\n echo \"'\" . implode(' ', $line_words) . \"' was estimated to have $syllable_count syllable(s).\\n\";\n }\n }\n\n // Get the last words for rhyme detection.\n $last_words[] = count($line_words) > 0 ? last($line_words) : '';\n }\n\n // Determine whether the a, b, and c rhymes match.\n list($a1, $b1, $a2, $b2, $a3, $b3, $c1, $c2) = $last_words;\n\n $score += !does_rhyme($a1, $a2) * 20;\n $score += !does_rhyme($a1, $a3) * 20;\n $score += !does_rhyme($a2, $a3) * 20;\n $score += !does_rhyme($b1, $b2) * 20;\n $score += !does_rhyme($b1, $b3) * 20;\n $score += !does_rhyme($b2, $b3) * 20;\n $score += !does_rhyme($c1, $c2) * 20;\n\n return max(0, 200 - $score);\n}", "public function fuzzynessSize($query = '')\n {\n $max_fuzzyness = 2;\n $min_fuzzyness = 0;\n $division_by = 3;\n\n if (strlen($query) >= $division_by) {\n return (string) '0';\n }\n\n if ($string_lengt = floor(strlen($query)/$division_by)) {\n if ($string_lengt >= $max_fuzzyness) {\n return (string) $max_fuzzyness;\n }\n\n if ($string_lengt <= $min_fuzzyness) {\n return (string) $min_fuzzyness;\n }\n\n return (string) $string_lengt;\n }\n\n return '0';\n }", "public function compute_string_distance($string1, $string2)\n {\n }", "function wordlimit($string, $length = 50, $ellipsis = \"...\") {\n $words = explode(' ', strip_tags($string));\n if (count($words) > $length)\n return implode(' ', array_slice($words, 0, $length)) . $ellipsis;\n else\n return $string;\n}", "function atSubstrwords($text, $maxchar, $end = '...')\n{\n if (strlen($text) > $maxchar || $text == '') {\n $words = preg_split('/\\s/', $text);\n $output = '';\n $i = 0;\n while (1) {\n $length = strlen($output) + strlen($words[$i]);\n if ($length > $maxchar) {\n break;\n } else {\n $output .= \" \" . $words[$i];\n ++$i;\n }\n }\n $output .= $end;\n } else {\n $output = $text;\n }\n return $output;\n}", "public function maxLabelsWidth() {\r\n if ($this->getLabels()->getItems()->count() == 0) {\r\n $tmpStyle = $this->calcLabelStyle();\r\n if ($tmpStyle == AxisLabelStyle::$VALUE) {\r\n return $this->maxLabelsValueWidth();\r\n } else\r\n if ($tmpStyle == AxisLabelStyle::$MARK) {\r\n return $this->chart->maxMarkWidth();\r\n } else\r\n if ($tmpStyle == AxisLabelStyle::$TEXT) {\r\n return $this->chart->maxTextWidth();\r\n } else {\r\n return 0;\r\n }\r\n\r\n } else {\r\n $result = 0;\r\n $g=$this->chart->getGraphics3D();\r\n $items = $this->getLabels()->getItems();\r\n for ($t = 0; $t < sizeof($items); $t++) {\r\n $g->setFont($items->getItem($t)->getFont());\r\n $result = max($result,\r\n $this->chart->multiLineTextWidth($items->getItem($t)->getText())->width);\r\n }\r\n return $result;\r\n }\r\n }", "function excerpt($text, $words, $length=150, $prefix=\"...\", $suffix = null, $options = array()) {\r\n /*$options = am(array(\r\n 'exact_case_bonus' => 2,\r\n 'exact_word_bonus' => 3,\r\n 'abs_length_weight' => 0.0,\r\n 'rel_length_weight' => 1.0,\r\n\r\n 'debug' => true\r\n ), $options);*/\r\n\r\n // Null suffix defaults to same as prefix\r\n if (is_null($suffix)) {\r\n $suffix = $prefix;\r\n }\r\n\r\n // Not enough to work with?\r\n if (strlen($text) <= $length) {\r\n return $text;\r\n }\r\n\r\n // Just in case\r\n if (!is_array($words)) {\r\n $words = array($words);\r\n }\r\n\r\n // Build the event list\r\n // [also calculate maximum word length for relative weight bonus]\r\n $events = array();\r\n $maxWordLength = 0;\r\n\r\n foreach ($words as $word) {\r\n\r\n if (strlen($word) > $maxWordLength) {\r\n $maxWordLength = strlen($word);\r\n }\r\n\r\n $i = -1;\r\n while ( ($i = stripos($text, $word, $i+1)) !== false ) {\r\n\r\n // Basic score for a match is always 1\r\n $score = 1;\r\n\r\n // Apply modifiers\r\n if (substr($text, $i, strlen($word)) == $word) {\r\n // Case matches exactly\r\n $score += $options['exact_case_bonus'];\r\n }\r\n if ($options['abs_length_weight'] != 0.0) {\r\n // Absolute length weight (longer words count for more)\r\n $score += strlen($word) * $options['abs_length_weight'];\r\n }\r\n if ($options['rel_length_weight'] != 0.0) {\r\n // Relative length weight (longer words count for more)\r\n $score += strlen($word) / $maxWordLength * $options['rel_length_weight'];\r\n }\r\n if (preg_match('/\\W/', substr($text, $i-1, 1))) {\r\n // The start of the word matches exactly\r\n $score += $options['exact_word_bonus'];\r\n }\r\n if (preg_match('/\\W/', substr($text, $i+strlen($word), 1))) {\r\n // The end of the word matches exactly\r\n $score += $options['exact_word_bonus'];\r\n }\r\n\r\n // Push event occurs when the word comes into range\r\n $events[] = array(\r\n 'type' => 'push',\r\n 'word' => $word,\r\n 'pos' => max(0, $i + strlen($word) - $length),\r\n 'score' => $score\r\n );\r\n // Pop event occurs when the word goes out of range\r\n $events[] = array(\r\n 'type' => 'pop',\r\n 'word' => $word,\r\n 'pos' => $i + 1,\r\n 'score' => $score\r\n );\r\n // Bump event makes it more attractive for words to be in the\r\n // middle of the excerpt [@todo: this needs work]\r\n $events[] = array(\r\n 'type' => 'bump',\r\n 'word' => $word,\r\n 'pos' => max(0, $i + floor(strlen($word)/2) - floor($length/2)),\r\n 'score' => 0.5\r\n );\r\n\r\n }\r\n }\r\n\r\n // If nothing is found then just truncate from the beginning\r\n if (empty($events)) {\r\n //return substr($text, 0, $length) . $suffix;\r\n return truncateHtml($text, $length, $suffix, false, true);\r\n }\r\n\r\n // We want to handle each event in the order it occurs in\r\n // [i.e. we want an event queue]\r\n //$events = sortByKey($events, 'pos');\r\n\r\n $scores = array();\r\n $score = 0;\r\n $current_words = array();\r\n\r\n // Process each event in turn\r\n foreach ($events as $idx => $event) {\r\n $thisPos = floor($event['pos']);\r\n\r\n $word = strtolower($event['word']);\r\n\r\n switch ($event['type']) {\r\n case 'push':\r\n if (empty($current_words[$word])) {\r\n // First occurence of a word gets full value\r\n $current_words[$word] = 1;\r\n $score += $event['score'];\r\n }\r\n else {\r\n // Subsequent occurrences mean less and less\r\n $current_words[$word]++;\r\n $score += $event['score'] / sizeof($current_words[$word]);\r\n }\r\n break;\r\n case 'pop':\r\n if (($current_words[$word])==1) {\r\n unset($current_words[$word]);\r\n $score -= ($event['score']);\r\n }\r\n else {\r\n $current_words[$word]--;\r\n $score -= $event['score'] / sizeof($current_words[$word]);\r\n }\r\n break;\r\n case 'bump':\r\n if (!empty($event['score'])) {\r\n $score += $event['score'];\r\n }\r\n break;\r\n default:\r\n }\r\n\r\n // Close enough for government work...\r\n $score = round($score, 2);\r\n\r\n // Store the position/score entry\r\n $scores[$thisPos] = $score;\r\n\r\n // For use with debugging\r\n $debugWords[$thisPos] = $current_words;\r\n\r\n // Remove score bump\r\n if ($event['type'] == 'bump') {\r\n $score -= $event['score'];\r\n }\r\n }\r\n\r\n // Calculate the best score\r\n // Yeah, could have done this in the main event loop\r\n // but it's better here\r\n $bestScore = 0;\r\n foreach ($scores as $pos => $score) {\r\n if ($score > $bestScore) {\r\n $bestScore = $score;\r\n }\r\n }\r\n\r\n // Find all positions that correspond to the best score\r\n $positions = array();\r\n foreach ($scores as $pos => $score) {\r\n if ($score == $bestScore) {\r\n $positions[] = $pos;\r\n }\r\n }\r\n\r\n if (sizeof($positions) > 1) {\r\n // Scores are tied => do something clever to choose one\r\n // @todo: Actually do something clever here\r\n $pos = $positions[0];\r\n }\r\n else {\r\n $pos = $positions[0];\r\n }\r\n\r\n // Extract the excerpt from the position, (pre|ap)pend the (pre|suf)fix\r\n $excerpt = substr($text, $pos, $length);\r\n //$excerpt = truncateHtml($text, $length, '', false, true);\r\n if ($pos > 0) {\r\n $excerpt = $prefix . $excerpt;\r\n }\r\n if ($pos + $length < strlen($text)) {\r\n $excerpt .= $suffix;\r\n }\r\n\r\n return $excerpt;\r\n }", "public function max($str, $length)\n {\n return $this->notempty($str) && strlen(trim($str)) <= $length;\n }", "function maxlength($text, $max, $shorten=true)\n{\nif(strlen($text) >= $max) {\nif($shorten) {\n$text = substr($text, 0, ($max-3)).\"...\";\n} else {\n$text = substr($text, 0, ($max));\n} }\nreturn $text;\n}", "function adr_link_length($link, $max)\n{\n\tif (strlen($link) > $max)\n\t\t$newlink = substr($link, 0, ($max - 3)) .'...';\n\telse\n\t\t$newlink = $link;\nreturn $newlink;\n}", "protected function sort_by_string_length( $a, $b ) {\n\t\treturn strlen( $b ) - strlen( $a );\n\t}", "public function GetMaxLabelWidth()\n\t{\n\t\t$m = 10;\n\t\tif ($this->iObj != null) {\n\t\t\t$marg = $this->scale->actinfo->iLeftColMargin + $this->scale->actinfo->iRightColMargin;\n\t\t\t$n\t= safe_count($this->iObj);\n\t\t\tfor ($i = 0; $i < $n; ++$i) {\n\t\t\t\tif (!empty($this->iObj[$i]->title)) {\n\t\t\t\t\tif ($this->iObj[$i]->title->HasTabs()) {\n\t\t\t\t\t\tlist($tot, $w) = $this->iObj[$i]->title->GetWidth($this->img, true);\n\t\t\t\t\t\t$m\t\t\t = max($m, $tot);\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$m = max($m, $this->iObj[$i]->title->GetWidth($this->img));\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn $m;\n\t}", "function acf_get_truncated($text, $length = 64)\n{\n}", "public function substrwords()\n {\n $longString = \"In this talk, we will show how to leverage InfluxDB to implement some solutions to tackle on the issues of time series forecasting at scale, including continuous accuracy evaluation and algorithm hyperparameters optimization.\";\n // echo strlen($longString);\n if (strlen($longString) > 160) {\n\n $this->truncated = substr($longString, 0, strpos(wordwrap($longString, 160), \"\\n\"));\n\n $this->truncated .= $this->end;\n echo $this->truncated;\n echo \"\\n\";\n\n $nd = $this->truncated = substr($longString, strpos(wordwrap($longString, 160), \"\\n\"));\n\n echo $this->end . $nd;\n\n #################\n # evans\n // $w = urldecode($MESSAGE);// remove special Characters\n // echo strlen($w);\n // $chars = 157;\n // while($w){\n // if (strlen($w) > $chars) {\n\n // // $chars += $chars; \n \n // $TruncMESSAGE = substr($w, 0, strpos($w, ' ', $chars)) . '...';// truncate from position 0-157\n // // $TruncMES = '...' . substr($w, strpos($w, ' ', 157));// truncate from position 157-...\n \n // $mes = array($TruncMESSAGE); // array with cut messages\n // foreach ($mes as $key) {\n // $encoded = urlencode($key);\n // $smsUrl = $emgUrl . \"&SOURCEADDR=\" . $SOURCEADDR . \"&DESTADDR=\" . $DESTADDR . \"&MESSAGE=\" . $encoded . \"&DLR=\" . $DLR . \"&USERNAME=\" . $smsuser . \"&PASSWORD=\" . $smspassword;\n // $smsResults = join('', file($smsUrl)); \n // echo $smsUrl; \n // echo \"\\n\"; \n \n // }\n \n // } else {\n \n // $smsUrl = $emgUrl . \"&SOURCEADDR=\" . $SOURCEADDR . \"&DESTADDR=\" . $DESTADDR . \"&MESSAGE=\" . $MESSAGE . \"&DLR=\" . $DLR . \"&USERNAME=\" . $smsuser . \"&PASSWORD=\" . $smspassword;\n \n // }\n #evans#\n #################################3\n }\n\n return $this->truncated;\n }", "function FrequentWords($str, $k)\n{\n\tif ($k > strlen($str))\n\t{\n\t\treturn '';\n\t}\n\t$sets = array();\n\tfor ($i = 0; $i <= strlen($str) - $k; $i++)\n\t{\n\t\t$key = substr($str, $i, $k);\n\t\t$sets[$key] = $key;\n\t}\n\n\t// Which is the best?\n\t$max = 0;\n\tforeach ($sets as $key => $set)\n\t{\n\t\t$sets[$key] = PatternCount($str, $key);\n\t\t$max = max($sets[$key], $max);\n\t}\n\n\t// Display solution, space separated\n\t$solution = array();\n\tforeach ($sets as $key => $set)\n\t{\n\t\tif ($set == $max)\n\t\t{\n\t\t\t$solution[] = $key;\n\t\t}\n\t}\n\treturn implode(' ', $solution);\n}", "function subwords( $str, $max = 24, $char = ' ', $end = '...' ) {\n $str = trim( $str ) ;\n $str = $str . $char ;\n $len = strlen( $str ) ;\n $words = '' ;\n $w = '' ;\n $c = 0 ;\n for ( $i = 0; $i < $len; $i++ ) {\n if ( $str[$i] != $char ) {\n $w = $w . $str[$i] ;\n } else {\n if ( ( $w != $char ) and ( $w != '' ) ) {\n $words .= $w . $char ;\n $c++ ;\n if ( $c >= $max ) {\n break ;\n }\n $w = '' ;\n }\n }\n }\n if ( $i+1 >= $len) {\n $end = '' ;\n }\n return trim( $words ) . $end ;\n}", "public function getMaxColumnNameLength();", "public function getAvgCharWidth() {}", "public function getRouteDistanceLimit()\n {\n return $this->route_distance_limit;\n }" ]
[ "0.7357799", "0.6558734", "0.6220703", "0.6063914", "0.6016856", "0.5939927", "0.5889343", "0.58685744", "0.5744231", "0.5705471", "0.57045966", "0.56863385", "0.5675915", "0.566448", "0.5581152", "0.5542572", "0.553361", "0.5516117", "0.5504215", "0.5495062", "0.5474907", "0.5458717", "0.5450522", "0.54494387", "0.5445968", "0.5444229", "0.5444118", "0.5443038", "0.54178977", "0.53911835", "0.5370304", "0.5325724", "0.53246546", "0.5308599", "0.52971095", "0.52923465", "0.5252331", "0.52496946", "0.52341694", "0.5230596", "0.52283055", "0.5218719", "0.5216694", "0.5216694", "0.5214074", "0.52136683", "0.5174901", "0.5159011", "0.51545095", "0.5153855", "0.51498437", "0.5118038", "0.5106747", "0.5106747", "0.5106089", "0.5106089", "0.5106089", "0.50625235", "0.506021", "0.50584525", "0.5053663", "0.503754", "0.50373435", "0.503468", "0.50337434", "0.50212276", "0.50154036", "0.50145966", "0.50104016", "0.5001053", "0.49855387", "0.49709448", "0.497056", "0.4969736", "0.49660754", "0.4954633", "0.49523073", "0.49482197", "0.49417326", "0.49366266", "0.4932806", "0.49230757", "0.4913369", "0.4902205", "0.49012884", "0.4899392", "0.48992354", "0.4897708", "0.48885736", "0.4876183", "0.48725855", "0.48706412", "0.48675072", "0.48584303", "0.48498413", "0.48436326", "0.4841359", "0.48408777", "0.48395833", "0.48302165" ]
0.6770165
1
Rewrite query into primitive queries in the context of specified index
public function rewrite(\Core\Search\Lucene\InterfaceLucene $index) { $this->_matches = array (); $this->_scores = array (); $this->_termKeys = array (); if ($this->_term->field === null) { // Search through all fields $fields = $index->getFieldNames ( true /* indexed fields list */); } else { $fields = array ( $this->_term->field ); } $prefix = \Core\Search\Lucene\Index\Term::getPrefix ( $this->_term->text, $this->_prefixLength ); $prefixByteLength = strlen ( $prefix ); $prefixUtf8Length = \Core\Search\Lucene\Index\Term::getLength ( $prefix ); $termLength = \Core\Search\Lucene\Index\Term::getLength ( $this->_term->text ); $termRest = substr ( $this->_term->text, $prefixByteLength ); // we calculate length of the rest in bytes since levenshtein() is not // UTF-8 compatible $termRestLength = strlen ( $termRest ); $scaleFactor = 1 / (1 - $this->_minimumSimilarity); foreach ( $fields as $field ) { $index->resetTermsStream (); if ($prefix != '') { $index->skipTo ( new \Core\Search\Lucene\Index\Term ( $prefix, $field ) ); while ( $index->currentTerm () !== null && $index->currentTerm ()->field == $field && substr ( $index->currentTerm ()->text, 0, $prefixByteLength ) == $prefix ) { // Calculate similarity $target = substr ( $index->currentTerm ()->text, $prefixByteLength ); $maxDistance = isset ( $this->_maxDistances [strlen ( $target )] ) ? $this->_maxDistances [strlen ( $target )] : $this->_calculateMaxDistance ( $prefixUtf8Length, $termRestLength, strlen ( $target ) ); if ($termRestLength == 0) { // we don't have anything to compare. That means if we // just add // the letters for current term we get the new word $similarity = (($prefixUtf8Length == 0) ? 0 : 1 - strlen ( $target ) / $prefixUtf8Length); } else if (strlen ( $target ) == 0) { $similarity = (($prefixUtf8Length == 0) ? 0 : 1 - $termRestLength / $prefixUtf8Length); } else if ($maxDistance < abs ( $termRestLength - strlen ( $target ) )) { // just adding the characters of term to target or // vice-versa results in too many edits // for example "pre" length is 3 and "prefixes" length // is 8. We can see that // given this optimal circumstance, the edit distance // cannot be less than 5. // which is 8-3 or more precisesly abs(3-8). // if our maximum edit distance is 4, then we can // discard this word // without looking at it. $similarity = 0; } else { $similarity = 1 - levenshtein ( $termRest, $target ) / ($prefixUtf8Length + min ( $termRestLength, strlen ( $target ) )); } if ($similarity > $this->_minimumSimilarity) { $this->_matches [] = $index->currentTerm (); $this->_termKeys [] = $index->currentTerm ()->key (); $this->_scores [] = ($similarity - $this->_minimumSimilarity) * $scaleFactor; } $index->nextTerm (); } } else { $index->skipTo ( new \Core\Search\Lucene\Index\Term ( '', $field ) ); while ( $index->currentTerm () !== null && $index->currentTerm ()->field == $field ) { // Calculate similarity $target = $index->currentTerm ()->text; $maxDistance = isset ( $this->_maxDistances [strlen ( $target )] ) ? $this->_maxDistances [strlen ( $target )] : $this->_calculateMaxDistance ( 0, $termRestLength, strlen ( $target ) ); if ($maxDistance < abs ( $termRestLength - strlen ( $target ) )) { // just adding the characters of term to target or // vice-versa results in too many edits // for example "pre" length is 3 and "prefixes" length // is 8. We can see that // given this optimal circumstance, the edit distance // cannot be less than 5. // which is 8-3 or more precisesly abs(3-8). // if our maximum edit distance is 4, then we can // discard this word // without looking at it. $similarity = 0; } else { $similarity = 1 - levenshtein ( $termRest, $target ) / min ( $termRestLength, strlen ( $target ) ); } if ($similarity > $this->_minimumSimilarity) { $this->_matches [] = $index->currentTerm (); $this->_termKeys [] = $index->currentTerm ()->key (); $this->_scores [] = ($similarity - $this->_minimumSimilarity) * $scaleFactor; } $index->nextTerm (); } } $index->closeTermsStream (); } if (count ( $this->_matches ) == 0) { return new \Core\Search\Lucene\Search\Query\EmptyQuery (); } else if (count ( $this->_matches ) == 1) { return new \Core\Search\Lucene\Search\Query\Term ( reset ( $this->_matches ) ); } else { $rewrittenQuery = new \Core\Search\Lucene\Search\Query\Boolean (); array_multisort ( $this->_scores, SORT_DESC, SORT_NUMERIC, $this->_termKeys, SORT_ASC, SORT_STRING, $this->_matches ); $termCount = 0; foreach ( $this->_matches as $id => $matchedTerm ) { $subquery = new \Core\Search\Lucene\Search\Query\Term ( $matchedTerm ); $subquery->setBoost ( $this->_scores [$id] ); $rewrittenQuery->addSubquery ( $subquery ); $termCount ++; if ($termCount >= self::MAX_CLAUSE_COUNT) { break; } } return $rewrittenQuery; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function query($index){\n $this->httpRequest->query($index);\n }", "function process_query_index( $query )\n\t{\n\t\treturn $query;\n\t}", "public function hook_query_index(&$query) {\n\t //Your code here\n\t \n\t }", "public function hook_query_index(&$query)\n\t{\n\t\t//Your code here\n\n\t}", "public function getbyindex2($index){\n $condition['index'] = $index;\n $result = $this->where($condition) ->select();\n return $result;\n \n }", "public function getQueryBuilderForIndex(Request $Request, $context = null);", "public function useIndexClause( $index ) {\n\t\treturn '';\n\t}", "public function optimize(\\Core\\Search\\Lucene\\InterfaceLucene $index) {\n\t\tthrow new \\Core\\Search\\Lucene\\Exception ( 'Wildcard query should not be directly used for search. Use $query->rewrite($index)' );\n\t}", "public function query($indexField = null) {\n $queryId = $this->getQueryId($indexField);\n\n $result = null;\n\n if ($this->willCacheResult) {\n $resultId = $this->getResultId($queryId);\n\n $cachedResult = $this->cache->getResult($resultId);\n if ($cachedResult) {\n $result = $cachedResult->getResult();\n $belongsTo = $cachedResult->getBelongsToFields();\n $has = $cachedResult->getHasFields();\n }\n }\n\n if (!$result) {\n $connection = $this->model->getMeta()->getConnection();\n\n $cachedQuery = $this->cache->getQuery($queryId);\n if (!$cachedQuery) {\n $statement = self::$queryParser->parseQuery($this);\n\n $statementParser = $connection->getStatementParser();\n\n $sql = $statementParser->parseStatement($statement);\n $belongsTo = self::$queryParser->getRecursiveBelongsToFields();\n $has = self::$queryParser->getRecursiveHasFields();\n $usedModels = $this->getUsedModels($statement);\n\n $cachedQuery = new QueryCacheObject($sql, $usedModels, $belongsTo, $has);\n\n $this->cache->setQuery($queryId, $cachedQuery);\n } else {\n $sql = $cachedQuery->getSql();\n $belongsTo = $cachedQuery->getBelongsToFields();\n $has = $cachedQuery->getHasFields();\n $usedModels = $cachedQuery->getUsedModels();\n }\n\n $sql = $this->parseVariablesIntoSql($sql, $connection);\n\n $result = $connection->execute($sql);\n\n if ($this->willCacheResult) {\n $cachedResult = new ResultCacheObject($result, $belongsTo, $has);\n\n $this->cache->setResult($resultId, $cachedResult, $usedModels);\n }\n }\n\n $result = $this->parseResult($result, $belongsTo, $has, $indexField);\n\n return $result;\n }", "abstract protected function makeIndex(string $table, DoctrineDBALIndex $index): Index;", "public function testQueryArgumentsIndexed()\n {\n $client = (new ClientTest())->testInstantiation();\n\n $query = $client->query(\n 'INSERT INTO typish (_0_int, _1_float, _2_decimal, _3_varchar, _4_blob, _5_date, _6_datetime, _7_nvarchar)\n VALUES (?, ?, ?, ?, ?, ?, ?, ?)',\n [\n 'name' => __FUNCTION__,\n 'validate_params' => static::VALIDATE_PARAMS,\n 'sql_minify' => true,\n 'affected_rows' => true,\n ]\n );\n\n $types = 'idssbsss';\n\n $time = new Time();\n $args = [\n 0,\n 1.0,\n '2.0',\n 'arguments indexed',\n sprintf(\"%08d\", decbin(4)),\n $time->ISODate,\n '' . $time,\n 'n varchar',\n ];\n TestHelper::queryPrepareLogOnError($query, $types, $args);\n $result = TestHelper::logOnError('query execute', $query, 'execute');\n static::assertInstanceOf(MsSqlResult::class, $result);\n static::assertSame(1, $result->affectedRows());\n\n $args[1] = 1.1;\n $args[2] = '2.2';\n $result = TestHelper::logOnError('query execute', $query, 'execute');\n static::assertInstanceOf(MsSqlResult::class, $result);\n static::assertSame(1, $result->affectedRows());\n }", "abstract public function parseIndexHint($hint);", "public function _INDEX()\n\t{\n\t\t\n\t}", "public function updateIndex()\n {\n if ($this->es_index_helper) {\n call_user_func($this->es_index_helper, $this);\n }\n }", "public function hook_query_index(&$query) {\n\t\t\t//Your code here\n\t\t\t// pr($query->toSql(),1);\t\t\t\n\t\t\tif(CRUDBooster::isSuperAdmin()){\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\t$user = getUser();\n\t\t\t$my_company = $this->my_company;\n\t\t\tif($user->company != $my_company){\n\t\t\t\treturn $query->where('supplier',$user->company);\n\t\t\t} else {\n\t\t\t\treturn $query->where('status','!=','draft');\n\t\t\t}\n\n\t }", "final public function index($index)\n {\n return $this->onPrepareReturn(Base\\Arrs::index($index,$this->arr()));\n }", "public function fetchResult($q = '', $index = 0)\r\n {\r\n return $this->result($this->query($q), $index);\r\n }", "public function getAll(Index $index): iterable;", "protected function applyTransformation() {\n // no transformation for index\n }", "public function commitIndex() {\n $this->index->commit();\n $this->index->optimize();\n }", "public static function indexQuery(NovaRequest $request, $query)\n {\n return $query;\n }", "public function buildIndex();", "public function optimize()\n {\n $this->index->optimize();\n }", "protected function getIndex()\n\t{ \n /*\n $sm = $this->account->getServiceManager();\n $dbh = $sm->get(\"Db\");\n $this->dbh = $dbh;\n\t\treturn new \\Netric\\EntityQuery\\Index\\Pgsql($this->account, $dbh);\n * \n */\n $this->dbh = $this->account->getServiceManager()->get(\"Db\");\n return new \\Netric\\EntityQuery\\Index\\Pgsql($this->account);\n\t}", "public function get($index)\n {\n \n }", "public function getByIndex(tx_mksearch_model_internal_Index $index)\n {\n $fields['INDXCMPMM.uid_local'][OP_EQ_INT] = $index->getUid();\n\n return $this->search($fields, []);\n }", "function opdsBySearch($index = 0)\n{\n global $app, $globalSettings;\n\n // parameter checking\n if (!is_numeric($index)) {\n $app->getLog()->warn('opdsBySearch: invalid page id ' . $index);\n $app->halt(400, \"Bad parameter\");\n }\n\n $search = $app->request()->get('search');\n if (!isset($search)) {\n $app->getLog()->error('opdsBySearch called without search criteria, page ' . $index);\n // 400 Bad request\n $app->response()->status(400);\n return;\n }\n $filter = getFilter();\n $tl = $app->calibre->titlesSlice($globalSettings['lang'], $index, $globalSettings[PAGE_SIZE], $filter, $search);\n $books1 = $app->calibre->titleDetailsFilteredOpds($tl['entries']);\n $books = array_map('checkThumbnailOpds', $books1);\n $gen = mkOpdsGenerator($app);\n $cat = $gen->searchCatalog(\n null,\n $books,\n false,\n $tl['page'],\n getNextSearchPage($tl),\n getLastSearchPage($tl),\n $search,\n $tl['total'],\n $globalSettings[PAGE_SIZE]\n );\n mkOpdsResponse($app, $cat, OpdsGenerator::OPDS_MIME_ACQ);\n}", "public static function createQuery(IndexInterface $index, array $options = array()) {\n $search_results_cache = \\Drupal::service('search_api.results_static_cache');\n return Query::create($index, $search_results_cache, $options);\n }", "function query() {\n // Since attachment views don't validate the exposed input, parse the search\n // expression if required.\n if (!$this->parsed) {\n $this->query_parse_search_expression($this->value);\n }\n $required = FALSE;\n if (!isset($this->search_query)) {\n $required = TRUE;\n }\n else {\n $words = $this->search_query->words();\n if (empty($words)) {\n $required = TRUE;\n }\n }\n if ($required) {\n if ($this->operator == 'required') {\n $this->query->add_where($this->options['group'], 'FALSE');\n }\n }\n else {\n $search_index = $this->ensure_my_table();\n\n $search_condition = db_and();\n\n if (!$this->options['remove_score']) {\n // Create a new join to relate the 'serach_total' table to our current 'search_index' table.\n $join = new views_join;\n $join->construct('search_total', $search_index, 'word', 'word');\n $search_total = $this->query->add_relationship('search_total', $join, $search_index);\n\n $this->search_score = $this->query->add_field('', \"SUM($search_index.score * $search_total.count)\", 'score', array('aggregate' => TRUE));\n }\n\n if (empty($this->query->relationships[$this->relationship])) {\n $base_table = $this->query->base_table;\n }\n else {\n $base_table = $this->query->relationships[$this->relationship]['base'];\n }\n $search_condition->condition(\"$search_index.type\", $base_table);\n if (!$this->search_query->simple()) {\n $search_dataset = $this->query->add_table('search_dataset');\n $conditions = $this->search_query->conditions();\n $condition_conditions =& $conditions->conditions();\n foreach ($condition_conditions as $key => &$condition) {\n // Take sure we just look at real conditions.\n if (is_numeric($key)) {\n // Replace the conditions with the table alias of views.\n $this->search_query->condition_replace_string('d.', \"$search_dataset.\", $condition);\n }\n }\n $search_conditions =& $search_condition->conditions();\n $search_conditions = array_merge($search_conditions, $condition_conditions);\n }\n else {\n // Stores each condition, so and/or on the filter level will still work.\n $or = db_or();\n foreach ($words as $word) {\n $or->condition(\"$search_index.word\", $word);\n }\n\n $search_condition->condition($or);\n }\n\n $this->query->add_where($this->options['group'], $search_condition);\n $this->query->add_groupby(\"$search_index.sid\");\n $matches = $this->search_query->matches();\n $placeholder = $this->placeholder();\n $this->query->add_having_expression($this->options['group'], \"COUNT(*) >= $placeholder\", array($placeholder => $matches));\n }\n // Set to NULL to prevent PDO exception when views object is cached.\n $this->search_query = NULL;\n }", "public function send(Index $index, array $query = []): Response\n {\n // TODO: Use only PutMapping when dropping support for elasticsearch/elasticsearch 7.x\n $endpoint = \\class_exists(PutMapping::class) ? new PutMapping() : new Put();\n $endpoint->setBody($this->toArray());\n $endpoint->setParams($query);\n\n return $index->requestEndpoint($endpoint);\n }", "public static function indexQuery(NovaRequest $request, $query)\n {\n $query->with('percapita', function($query) use ($request) {\n PerCapita::buildIndexQuery($request, $query);\n });\n }", "public function testDirectIndexing(): void {\n // Create a test entity for indexing.\n $entity = EntityTest::create([\n 'name' => 'Test entity',\n 'type' => 'entity_test',\n ]);\n $entity->save();\n // Create a second test entity that never gets updated and should never get\n // directly indexed.\n EntityTest::create([\n 'name' => 'Test entity 2',\n 'type' => 'entity_test',\n ])->save();\n\n // Create two indexes to ensure batch tracking is isolated.\n $index_1 = $this->createIndex();\n $index_1->save();\n $tracker_1 = $index_1->getTrackerInstance();\n $index_2 = $this->createIndex();\n $index_2->save();\n $tracker_2 = $index_2->getTrackerInstance();\n\n // At first nothing is indexed.\n $this->assertEquals(2, $tracker_1->getTotalItemsCount());\n $this->assertEquals(0, $tracker_1->getIndexedItemsCount());\n $this->assertEquals(2, $tracker_2->getTotalItemsCount());\n $this->assertEquals(0, $tracker_2->getIndexedItemsCount());\n\n // Start batch tracking mode for index 1 only.\n $index_1->startBatchTracking();\n $entity->save();\n $this->triggerPostRequestIndexing();\n\n // Index 1 shouldn't have indexed the entity; index 2 should've indexed as\n // normal.\n $this->assertEquals(2, $tracker_1->getTotalItemsCount());\n $this->assertEquals(0, $tracker_1->getIndexedItemsCount());\n $this->assertEquals(2, $tracker_2->getTotalItemsCount());\n $this->assertEquals(1, $tracker_2->getIndexedItemsCount());\n\n // Start batch tracking mode a second time for index 1.\n $index_1->startBatchTracking();\n $entity->save();\n $this->triggerPostRequestIndexing();\n\n // Index 1 shouldn't have indexed anything.\n $this->assertEquals(2, $tracker_1->getTotalItemsCount());\n $this->assertEquals(0, $tracker_1->getIndexedItemsCount());\n\n // Make a call to stop batch tracking: because we've started it twice, this\n // shouldn't actually stop batch tracking.\n $index_1->stopBatchTracking();\n $entity->save();\n $this->triggerPostRequestIndexing();\n\n // Index 1 still shouldn't have indexed the entity because it's in batch\n // tracking mode.\n $this->assertEquals(2, $tracker_1->getTotalItemsCount());\n $this->assertEquals(0, $tracker_1->getIndexedItemsCount());\n\n // Make a second call to stop batch tracking: this should actually stop\n // batch tracking mode.\n $index_1->stopBatchTracking();\n $entity->save();\n $this->triggerPostRequestIndexing();\n\n // Index 1 should now have indexed the entity because batch tracking mode's\n // been stopped.\n $this->assertEquals(2, $tracker_1->getTotalItemsCount());\n $this->assertEquals(1, $tracker_1->getIndexedItemsCount());\n\n // An exception should be thrown if you try to stop batch tracking again.\n $this->expectException(SearchApiException::class);\n $index_1->stopBatchTracking();\n }", "public function get_update_category_all($index='')\n\t{\n\t\t$sql=\"SELECT t1.p_id AS p_id4, t2.p_id AS p_id3, t3.p_id AS p_id2, t4.p_id AS p_id1 FROM category AS t1 LEFT JOIN category AS t2 ON t2.id = t1.p_id LEFT JOIN category AS t3 ON t3.id = t2.p_id LEFT JOIN category AS t4 ON t4.id = t3.p_id WHERE t1.id=\".$index;\n\t\t// $sql=\"SELECT t1.title AS p_id4, t2.title AS p_id3, t3.title AS p_id2, t4.title AS p_id1 FROM category AS t1 LEFT JOIN category AS t2 ON t2.p_id = t1.id LEFT JOIN category AS t3 ON t3.p_id = t2.id LEFT JOIN category AS t4 ON t4.p_id = t3.id WHERE t1.id=\".$index;\n\t\t$query=$this->db->query($sql)->row_array();\n\t\t$i=0;\n\t\tforeach ($query as $key => $value) {\n\t\t\t$this->db->where('p_id', $value);\n\t\t\t$query2[$i]=$this->db->get('category')->result_array();\n\t\t\t$i++;\n\t\t}\n\t\treturn $query2;\n\t}", "public function index(IndexableEntity $entity);", "public function reindex();", "public function reIndex() {\n $index = collect([]);\n // Loop through each of the hydrated fields\n $this->getHydrated()->each(function($field,$k) use ($index) {\n // Pass each field through the toPath process\n $field->toPath($index);\n });\n // Replace the current index value\n $this->index = $index;\n // Return for chaining\n return $this;\n }", "public abstract function get($index);", "public function optimizeIndex()\n {\n // either open or create the index\n $this->index = $this->openIndex(APPLICATION_PATH . '/data/search/jobs');\n $this->index->optimize();\n }", "public function indexBy($index) {\n $this->indexBy = $index;\n return $this;\n }", "public function getFromContext(Index $index): IndexScope;", "public function hook_query_index(&$query) {\n/*\t //Your code here\n $userId = CRUDBooster::myId();\n//\t echo $userId;\n\t $isAdmin = CRUDBooster::isSuperadmin();\n\t $storeAssignedtoUser = DB::table('srv_centers')\n ->where('cms_user_id', '=', $userId)\n ->first();\n\t if ($isAdmin) {\n\n\t }else {\n\t $query->where('cms_users.id',$storeAssignedtoUser->cms_user_id);\n\t }\n*/\n\t }", "public function optimize(Zend_Search_Lucene_Interface $index)\n {\n $terms = $this->_terms;\n $signs = $this->_signs;\n\n foreach ($terms as $id => $term) {\n if (!$index->hasTerm($term)) {\n if ($signs === null || $signs[$id] === true) {\n // Term is required\n require_once 'Zend/Search/Lucene/Search/Query/Empty.php';\n return new Zend_Search_Lucene_Search_Query_Empty();\n } else {\n // Term is optional or prohibited\n // Remove it from terms and signs list\n unset($terms[$id]);\n unset($signs[$id]);\n }\n }\n }\n\n // Check if all presented terms are prohibited\n $allProhibited = true;\n if ($signs === null) {\n $allProhibited = false;\n } else {\n foreach ($signs as $sign) {\n if ($sign !== false) {\n $allProhibited = false;\n break;\n }\n }\n }\n if ($allProhibited) {\n require_once 'Zend/Search/Lucene/Search/Query/Empty.php';\n return new Zend_Search_Lucene_Search_Query_Empty();\n }\n\n /**\n * @todo make an optimization for repeated terms\n * (they may have different signs)\n */\n\n if (count($terms) === 1) {\n // It's already checked, that it's not a prohibited term\n\n // It's one term query with one required or optional element\n require_once 'Zend/Search/Lucene/Search/Query/Term.php';\n $optimizedQuery = new Zend_Search_Lucene_Search_Query_Term(reset($terms));\n $optimizedQuery->setBoost($this->getBoost());\n\n return $optimizedQuery;\n }\n\n if (count($terms) === 0) {\n require_once 'Zend/Search/Lucene/Search/Query/Empty.php';\n return new Zend_Search_Lucene_Search_Query_Empty();\n }\n\n $optimizedQuery = new Zend_Search_Lucene_Search_Query_MultiTerm($terms, $signs);\n $optimizedQuery->setBoost($this->getBoost());\n return $optimizedQuery;\n }", "abstract function index();", "abstract function index();", "abstract function index();", "abstract public function queryRaw($q);", "public function query() {\n $this->field_alias = $this->real_field;\n if (isset($this->definition['trovequery'])) {\n $this->query->add_where('', $this->definition['trovequery']['arg'], $this->definition['trovequery']['value']);\n }\n }", "public function getServer($index = null, $filter = null);", "public function driver_query($query, $filtered_index=TRUE)\n\t{\n\t\t// Call the appropriate method, if it exists\n\t\tif (is_string($query) && method_exists($this->sql, $query))\n\t\t{\n\t\t\t$query = $this->sql->$query();\n\t\t}\n\n\t\t// Return if the values are returned instead of a query,\n\t\t// or if the query doesn't apply to the driver\n\t\tif ( ! is_string($query)) return $query;\n\n\t\t// Run the query!\n\t\t$res = $this->query($query);\n\n\t\t$flag = ($filtered_index) ? \\PDO::FETCH_NUM : \\PDO::FETCH_ASSOC;\n\t\t$all = $res->fetchAll($flag);\n\n\t\treturn ($filtered_index) ? \\db_filter($all, 0) : $all;\n\t}", "public function index(string $key,int $index = 0)\n {\n // TODO: Implement index() method.\n return $this->unMakeData($this->getConnection()->index($key,$index));\n }", "public function incrementSubQueryIndex(): void\n {\n $this->subQueryIndex++;\n }", "public function hook_before_index(&$result) {\n \n }", "protected function flushIndex()\n {\n $this->canIndex();\n /**\n * Set indexer to use mview \n */\n $this->indexer->setScheduled(true);\n\n $writeAdapter = $this->resourceConnection->getConnection('core_write');\n\n /**\n * Flush all old data \n */\n $indexTable = $this->resourceConnection->getTableName('bazaarvoice_index_product');\n $writeAdapter->truncateTable($indexTable);\n $changelogTable = $this->resourceConnection->getTableName('bazaarvoice_product_cl');\n $writeAdapter->truncateTable($changelogTable);\n\n /**\n * Setup dummy rows \n */\n $productTable = $this->resourceConnection->getTableName('catalog_product_entity');\n $writeAdapter->query(\"INSERT INTO `$indexTable` (`product_id`, `version_id`) SELECT DISTINCT `entity_id`, '0' FROM `$productTable`;\");\n $writeAdapter->query(\"INSERT INTO `$changelogTable` (`entity_id`) SELECT DISTINCT `entity_id` FROM `$productTable`;\");\n\n /**\n * Reset mview version \n */\n $mviewTable = $this->resourceConnection->getTableName('mview_state');\n $writeAdapter->query(\"UPDATE `$mviewTable` SET `version_id` = NULL, `status` = 'idle' WHERE `view_id` = 'bazaarvoice_product';\");\n $indexCheck = $writeAdapter\n ->query(\n \"SELECT COUNT(1) indexIsThere FROM INFORMATION_SCHEMA.STATISTICS\n WHERE table_schema=DATABASE() AND table_name='$changelogTable' AND index_name='entity_id';\"\n );\n $indexCheck = $indexCheck->fetchObject();\n if ($indexCheck->indexIsThere == 0) {\n $writeAdapter->query(\"ALTER TABLE `$changelogTable` ADD INDEX (`entity_id`);\");\n }\n }", "public function addIndexImplicit(Index $index) {\n $columns = \"(`\".implode(\"`,`\", $index->getColumns()).\"`)\";\n\n if($index->getPrimary()) {\n $sql = sprintf(config('sql.index.implicit.primary'), $columns);\n } elseif($index->getUnique()) {\n $sql = sprintf(config('sql.index.implicit.unique'), $index->getName(), $columns);\n } else {\n $sql = sprintf(config('sql.index.implicit.key'), $index->getName(), $columns);\n }\n\n return $sql;\n }", "public static function indexQuery(NovaRequest $request, $query)\n\t{\n\t\t$user = $request->user();\n\t\t\n\t\t// If the User has only Permission to view his own Entries, we scope the query.\n\t\tif ($user->hasPermissionTo(parent::uriKey() . '.view')) {\n\t\t\treturn $query->where('user_id', $user->id);\n\t\t}\n\t\t\n\t\treturn $query;\n\t}", "public function testQueryArgumentsTypeQualifiedIndexed()\n {\n $client = (new ClientTest())->testInstantiation();\n\n $query = $client->query(\n 'INSERT INTO typish (_0_int, _1_float, _2_decimal, _3_varchar, _4_blob, _5_date, _6_datetime, _7_nvarchar)\n VALUES (?, ?, ?, ?, ?, ?, ?, ?)',\n [\n 'name' => __FUNCTION__,\n 'validate_params' => static::VALIDATE_PARAMS,\n 'sql_minify' => true,\n 'affected_rows' => true,\n ]\n );\n\n //$types = 'idssbsss';\n $types = '';\n\n $time = new Time();\n $args = [\n [\n 0,\n SQLSRV_PARAM_IN,\n null,\n SQLSRV_SQLTYPE_INT,\n ],\n [\n 1.0,\n SQLSRV_PARAM_IN,\n null,\n SQLSRV_SQLTYPE_FLOAT,\n ],\n [\n '2.0',\n SQLSRV_PARAM_IN,\n null,\n SQLSRV_SQLTYPE_DECIMAL(14,2),\n ],\n [\n 'sqlsrv arguments indexed',\n SQLSRV_PARAM_IN,\n null,\n SQLSRV_SQLTYPE_VARCHAR('max'),\n ],\n [\n sprintf(\"%08d\", decbin(4)),\n SQLSRV_PARAM_IN,\n null,\n SQLSRV_SQLTYPE_VARBINARY('max'),\n ],\n [\n $time,\n SQLSRV_PARAM_IN,\n null,\n SQLSRV_SQLTYPE_DATE,\n ],\n [\n $time,\n SQLSRV_PARAM_IN,\n null,\n SQLSRV_SQLTYPE_DATETIME2,\n ],\n [\n 'n varchar',\n SQLSRV_PARAM_IN,\n null,\n SQLSRV_SQLTYPE_NVARCHAR('max'),\n ],\n ];\n TestHelper::queryPrepareLogOnError($query, $types, $args);\n $result = TestHelper::logOnError('query execute', $query, 'execute');\n static::assertInstanceOf(MsSqlResult::class, $result);\n static::assertSame(1, $result->affectedRows());\n\n $args[1][0] = 1.1;\n $args[2][0] = '2.2';\n $result = TestHelper::logOnError('query execute', $query, 'execute');\n static::assertInstanceOf(MsSqlResult::class, $result);\n static::assertSame(1, $result->affectedRows());\n }", "public function index(): Relation;", "private function processIndexes()\n {\n foreach ($this->indexes as $index) {\n foreach ($index->columns as $indexColumn) {\n $indexColumnName = $indexColumn['name'];\n if (!array_key_exists(strtolower($indexColumnName), $this->columns)) {\n throw new RuntimeException(\"Key column '$indexColumnName' doesn't exist in table\");\n }\n }\n }\n\n // figure out all sequences of columns covered by non-FK indexes\n foreach ($this->indexes as $index) {\n if ($index->type !== 'FOREIGN KEY') {\n foreach ($index->getCovers() as $cover) {\n $lookup = implode('\\0', $cover);\n $this->covers[$lookup] = true;\n }\n }\n }\n\n $indexes = [];\n $foreigns = [];\n $ibfkCounter = 0;\n\n foreach ($this->indexes as $index) {\n if ($index->type === 'FOREIGN KEY') {\n if ($this->addIndexForForeignKey) {\n // TODO - doesn't correctly deal with indexes like foo(10)\n $lookup = implode('\\0', $index->getColumns());\n if (!array_key_exists($lookup, $this->covers)) {\n $newIndex = new IndexDefinition();\n $newIndex->type = 'KEY';\n $newIndex->columns = $index->columns;\n if (!is_null($index->constraint)) {\n $newIndex->name = $index->constraint;\n } elseif (!is_null($index->name)) {\n $newIndex->name = $index->name;\n }\n $indexes[] = $newIndex;\n }\n }\n\n $foreign = new IndexDefinition();\n if (is_null($index->constraint)) {\n $foreign->constraint = $this->name . '_ibfk_' . ++$ibfkCounter;\n } else {\n $foreign->constraint = $index->constraint;\n }\n $foreign->type = 'FOREIGN KEY';\n $foreign->columns = $index->columns;\n $foreign->reference = $index->reference;\n $foreigns[] = $foreign;\n } else {\n $indexes[] = $index;\n }\n }\n\n // now synthesise names for any unnamed indexes,\n // and collect indexes by type\n $usedName = [];\n $keyTypes = [\n 'PRIMARY KEY',\n 'UNIQUE KEY',\n 'KEY',\n 'FULLTEXT KEY',\n 'FOREIGN KEY',\n ];\n $indexesByType = array_fill_keys($keyTypes, []);\n foreach ($indexes as $index) {\n $name = $index->name;\n if ($index->type === 'PRIMARY KEY') {\n $name = 'PRIMARY';\n } elseif (is_null($name)) {\n $base = $index->columns[0]['name'];\n $name = $base;\n $i = 1;\n while (isset($usedName[$name])) {\n $name = $base . '_' . ++$i;\n }\n $index->name = $name;\n } elseif (array_key_exists(strtolower($name), $usedName)) {\n throw new RuntimeException(\"Duplicate key name '$name'\");\n }\n $index->name = $name;\n $usedName[strtolower($name)] = true;\n\n $indexesByType[$index->type][] = $index;\n }\n\n if (count($indexesByType['PRIMARY KEY']) > 1) {\n throw new RuntimeException(\"Multiple PRIMARY KEYs defined\");\n }\n\n foreach ($indexesByType['PRIMARY KEY'] as $pk) {\n foreach ($pk->columns as $indexColumn) {\n $column = $this->columns[strtolower($indexColumn['name'])];\n if ($column->nullable) {\n $column->nullable = false;\n if (is_null($column->default)) {\n $column->default = $column->getUninitialisedValue();\n }\n }\n }\n }\n\n $this->indexes = [];\n foreach (array_reduce($indexesByType, 'array_merge', []) as $index) {\n $this->indexes[$index->name] = $index;\n }\n foreach ($foreigns as $foreign) {\n $this->foreigns[$foreign->constraint] = $foreign;\n }\n }", "public function rewrite(Zend_Search_Lucene_Interface $index)\n {\n if (count($this->_terms) === 0) {\n require_once 'Zend/Search/Lucene/Search/Query/Empty.php';\n return new Zend_Search_Lucene_Search_Query_Empty();\n }\n\n // Check, that all fields are qualified\n $allQualified = true;\n foreach ($this->_terms as $term) {\n if ($term->field === null) {\n $allQualified = false;\n break;\n }\n }\n\n if ($allQualified) {\n return $this;\n } else {\n /** transform multiterm query to boolean and apply rewrite() method to subqueries. */\n require_once 'Zend/Search/Lucene/Search/Query/Boolean.php';\n $query = new Zend_Search_Lucene_Search_Query_Boolean();\n $query->setBoost($this->getBoost());\n\n require_once 'Zend/Search/Lucene/Search/Query/Term.php';\n foreach ($this->_terms as $termId => $term) {\n $subquery = new Zend_Search_Lucene_Search_Query_Term($term);\n\n $query->addSubquery($subquery->rewrite($index),\n ($this->_signs === null)? true : $this->_signs[$termId]);\n }\n\n return $query;\n }\n }", "function main(){\r\n\r\n\r\n /*$index='texas-30001-player';\r\n $type= 'player';\r\n $stime= \"2018-05-01 00:00:00\";\r\n $etime= \"2018-05-08 00:00:00\";\r\n $groupOp = 'AND';\r\n\r\n $querydata = [\r\n [\r\n \"op\"=>\"eq\",\r\n \"field\"=>\"ActionName\",\r\n \"data\"=>\"player.gain\"\r\n ],\r\n [\r\n \"op\"=>\"eq\",\r\n \"field\"=>\"type\",\r\n \"data\"=>\"gold\"\r\n ],\r\n [\r\n \"op\"=>\"ew\",\r\n \"field\"=>\"num\",\r\n \"data\"=>10000\r\n ]\r\n ];\r\n\r\n $ins = \\Pelasticsearch\\Pelasticsearch::Getins();\r\n $ins->init($index,$type,$stime,$etime);\r\n $data = $ins->multipleQuery(0,100,$groupOp,$querydata);\r\n\r\n echo '<pre>';\r\n print_r($data);\r\n echo '</pre>';*/\r\n\r\n\r\n /*$index='texas-30001-player';\r\n $type= 'player';\r\n $body = [\r\n \"fieldname\"=>\"fielddata\"\r\n ];\r\n $ins = \\Pelasticsearch\\Pelasticsearch::Getins();\r\n $ins->init($index,$type);\r\n $data = $ins->Add($body);\r\n\r\n\r\n echo '<pre>';\r\n print_r($data);\r\n echo '</pre>';*/\r\n\r\n /*$index='texas-30001-player';\r\n $type= 'my_type';\r\n $id = 'my_id';\r\n $ins = \\Pelasticsearch\\Pelasticsearch::Getins();\r\n $ins->init($index,$type);\r\n $data = $ins->Delete($id);\r\n\r\n echo '<pre>';\r\n print_r($data);\r\n echo '</pre>';*/\r\n\r\n\r\n\r\n}", "abstract public function getMutation(array $tokens, $index);", "abstract public function getMutation(array $tokens, $index);", "abstract public function createQueryBuilder($alias, $indexBy = null);", "abstract protected function getIndex();", "public function updateIndexState() {\n $query = $this->database->select('help_search_items', 'hsi');\n $query->addExpression('COUNT(DISTINCT(hsi.sid))');\n $query->leftJoin('search_dataset', 'sd', 'hsi.sid = sd.sid AND sd.type = :type', [':type' => $this->getType()]);\n $query->isNull('sd.sid');\n $never_indexed = $query->execute()->fetchField();\n $this->state->set('help_search_unindexed_count', $never_indexed);\n }", "function extractByIndex($p_index)\n {\n }", "function updateIndex($index) {\n if (!is_string($index)) throw new IllegalTypeException('Illegal type of parameter $index: '.getType($index));\n if (!strLen($index)) throw new InvalidArgumentException('Invalid parameter $index: \"\"');\n\n global $verbose, $indexes, $saveRawXTradeData;\n\n // (1) Starttag der benoetigten Daten ermitteln\n $startTime = 0;\n $pairs = array_flip($indexes[$index]); // ['AUDUSD', ...] => ['AUDUSD'=>null, ...]\n foreach($pairs as $pair => &$data) {\n $data = []; // $data initialisieren: ['AUDUSD'=>[], ...]\n $startTime = max($startTime, XTrade::$symbols[$pair]['historyStart']['M1']); // GMT-Timestamp\n } unset($data);\n $startTime = fxtTime($startTime);\n $startDay = $startTime - $startTime%DAY; // 00:00 Starttag FXT\n $today = ($today=fxtTime()) - $today%DAY; // 00:00 aktueller Tag FXT\n\n\n // (2) Gesamte Zeitspanne tageweise durchlaufen\n for ($day=$startDay, $lastMonth=-1; $day < $today; $day+=1*DAY) {\n\n if (!isFxtWeekend($day, 'FXT')) { // ausser an Wochenenden\n $shortDate = gmDate('D, d-M-Y', $day);\n\n // Pruefen, ob die History bereits existiert\n if (is_file($file=getVar('fxiTarget.compressed', $index, $day))) {\n if ($verbose > 1) echoPre('[Ok] '.$shortDate.' '.$index.' compressed history file: '.baseName($file));\n }\n else if (is_file($file=getVar('fxiTarget.raw', $index, $day))) {\n if ($verbose > 1) echoPre('[Ok] '.$shortDate.' '.$index.' raw history file: '.baseName($file));\n }\n else {\n $month = (int) gmDate('m', $day);\n if ($month != $lastMonth) {\n echoPre('[Info] '.$index.' '.gmDate('M-Y', $day));\n $lastMonth = $month;\n }\n\n // History aktualisieren: M1-Bars der benoetigten Instrumente dieses Tages einlesen\n foreach($pairs as $pair => $data) {\n if (is_file($file=getVar('fxiSource.compressed', $pair, $day))) {} // komprimierte oder\n else if (is_file($file=getVar('fxiSource.raw' , $pair, $day))) {} // unkomprimierte XTrade-Datei\n else {\n echoPre('[Error] '.$pair.' history for '.$shortDate.' not found');\n return false;\n }\n // M1-Bars zwischenspeichern\n $pairs[$pair]['bars'] = XTrade::readBarFile($file, $pair); // ['AUDUSD'=>array('bars'=>[]), ...]\n }\n\n // Indexdaten fuer diesen Tag berechnen\n $function = 'calculate'.$index;\n $fxiBars = $function($day, $pairs); if (!$fxiBars) return false;\n\n // Indexdaten speichern\n if (!saveBars($index, $day, $fxiBars)) return false;\n }\n }\n if (!WINDOWS) pcntl_signal_dispatch(); // Auf Ctrl-C pruefen, um bei Abbruch die Destruktoren auszufuehren.\n }\n\n echoPre('[Ok] '.$index);\n return true;\n}", "public function query() {\n $this->ensureMyTable();\n\n $def = $this->definition;\n $def['table'] = 'taxonomy_term_field_data';\n\n if (!array_filter($this->options['vids'])) {\n $taxonomy_index = $this->query->addTable('taxonomy_index', $this->relationship);\n $def['left_table'] = $taxonomy_index;\n $def['left_field'] = 'tid';\n $def['field'] = 'tid';\n $def['type'] = empty($this->options['required']) ? 'LEFT' : 'INNER';\n }\n else {\n // If vocabularies are supplied join a subselect instead\n $def['left_table'] = $this->tableAlias;\n $def['left_field'] = 'nid';\n $def['field'] = 'nid';\n $def['type'] = empty($this->options['required']) ? 'LEFT' : 'INNER';\n $def['adjusted'] = TRUE;\n\n $query = Database::getConnection()->select('taxonomy_term_field_data', 'td');\n $query->addJoin($def['type'], 'taxonomy_index', 'tn', 'tn.tid = td.tid');\n $query->condition('td.vid', array_filter($this->options['vids']), 'IN');\n if (empty($this->query->options['disable_sql_rewrite'])) {\n $query->addTag('taxonomy_term_access');\n }\n $query->fields('td');\n $query->fields('tn', ['nid']);\n $def['table formula'] = $query;\n }\n\n $join = \\Drupal::service('plugin.manager.views.join')->createInstance('standard', $def);\n\n // use a short alias for this:\n $alias = $def['table'] . '_' . $this->table;\n\n $this->alias = $this->query->addRelationship($alias, $join, 'taxonomy_term_field_data', $this->relationship);\n }", "function add_clean_index($table, $index)\n {\n }", "function index_all(){\n\t\t$this->_clear_tmp(0);\n\t\t$this->del_results();\n\t\treturn $this->index(0,true);\n\t}", "public function updateIndex()\n\t{\n\t\t$params = $this->getBasicEsParams();\n\t\t// By default all writes to index will be synchronous\n\t\t$params['custom'] = ['refresh' => true];\n\n\t\t// Get our document body data.\n\t\t$params['body']['doc'] = $this->getIndexDocumentData();\n\n\t\treturn $this->getElasticSearchClient()->update($params);\n\t}", "function culturefeed_search_ui_set_noindex_metatag() {\n\n // Default noindex should be shown.\n $noindex = TRUE;\n\n $query = drupal_get_query_parameters(NULL, array('q'));\n // Start page should be indexed.\n if (empty($query)) {\n $noindex = FALSE;\n }\n else {\n\n // No index is FALSE, if user is filtering on entity type actor.\n if (isset($query['facet']['type'])) {\n\n $facets = $query['facet'];\n if ($query['facet']['type'][0] == 'actor') {\n unset($facets['type']);\n if (isset($query['facet']['category_flandersregion_id'])) {\n if (count($query['facet']['category_flandersregion_id']) <= 1) {\n unset($facets['category_flandersregion_id']);\n }\n }\n }\n\n // If type=actor is the only parameter with flandersregion, set noindex to false.\n if (count($facets) == 0) {\n $noindex = FALSE;\n }\n\n }\n\n // No index is FALSE, if user is filtering on actor type.\n if (isset($query['facet']['category_actortype_id'])) {\n\n $facets = $query['facet'];\n unset($facets['category_actortype_id']);\n unset($facets['type']);\n\n if (isset($query['facet']['category_flandersregion_id'])) {\n if (count($query['facet']['category_flandersregion_id']) <= 1) {\n unset($facets['category_flandersregion_id']);\n }\n }\n\n unset($query['location']);\n unset($query['regId']);\n unset($query['actors']);\n unset($query['facet']);\n\n // If type, flandersregion, location and/or regId was the only extra facet / parameters, set noindex to false.\n if (count($facets) == 0 && count($query) == 0) {\n $noindex = FALSE;\n }\n\n }\n\n // No index is FALSE, if user is filtering on event type.\n elseif (isset($query['facet']['category_eventtype_id'])) {\n\n if (count($query['facet']['category_eventtype_id']) == 1) {\n\n $facets = $query['facet'];\n unset($facets['category_eventtype_id']);\n\n if (isset($query['facet']['category_theme_id'])) {\n if (count($query['facet']['category_theme_id']) <= 1) {\n unset($facets['category_theme_id']);\n }\n }\n\n if (isset($query['facet']['category_flandersregion_id'])) {\n if (count($query['facet']['category_flandersregion_id']) <= 1) {\n unset($facets['category_flandersregion_id']);\n }\n }\n\n unset($query['location']);\n unset($query['regId']);\n unset($query['facet']);\n unset($query['voor-kinderen']);\n\n // If theme_id, flandersregion and/or regId was the only extra facet / parameters, set noindex to false.\n if (count($facets) == 0 && count($query) == 0) {\n $noindex = FALSE;\n }\n\n }\n\n }\n\n // No index is FALSE, if user is filtering on umv category and/or region.\n elseif (isset($query['facet']['category_umv_id'])) {\n\n if (count($query['facet']['category_umv_id']) == 1) {\n\n $facets = $query['facet'];\n unset($facets['category_umv_id']);\n\n if (isset($query['facet']['category_flandersregion_id'])) {\n if (count($query['facet']['category_flandersregion_id']) <= 1) {\n unset($facets['category_flandersregion_id']);\n }\n }\n\n unset($query['location']);\n unset($query['regId']);\n unset($query['facet']);\n\n // If flandersregion or regId was the only extra facet / parameters, set noindex to false.\n if (count($facets) == 0 && count($query) == 0) {\n $noindex = FALSE;\n }\n\n }\n\n }\n\n // No index is FALSE, if user is filtering on datetype today and max 1 flandersregion Id.\n elseif (isset($query['facet']['datetype'])) {\n\n if ($query['facet']['datetype'][0] == 'today') {\n\n $facets = $query['facet'];\n unset($facets['datetype']);\n\n if (isset($query['facet']['category_flandersregion_id'])) {\n\n if(count($query['facet']['category_flandersregion_id']) == 1) {\n unset($facets['category_flandersregion_id']);\n }\n\n }\n \n unset($query['facet']);\n\n // If datetype today was the only filter with max 1 flandersregion Id set noindex to false.\n if (count($facets) == 0 && count($query) == 0) {\n $noindex = FALSE;\n }\n\n }\n\n }\n\n // No index is FALSE, if user is filtering on flandersregion Id.\n elseif (isset($query['facet']['category_flandersregion_id'])) {\n\n if (count($query['facet']['category_flandersregion_id']) == 1) {\n\n $facets = $query['facet'];\n unset($facets['category_flandersregion_id']);\n unset($query['facet']);\n\n // If flandersregion Id was the only filter set noindex to false.\n if (count($facets) == 0 && count($query) == 0) {\n $noindex = FALSE;\n }\n\n }\n\n }\n\n // No index is FALSE, if user is filtering on location or region Id without additional facets.\n elseif (isset($query['regId']) || isset($query['location'])) {\n\n unset($query['location']);\n unset($query['regId']);\n\n // If location or regId was the only filter set noindex to false.\n if (count($query) == 0) {\n $noindex = FALSE;\n }\n\n }\n\n }\n\n // Add the \"noindex, follow\" meta tag if needed.\n if ($noindex) {\n culturefeed_search_set_noindex_metatag();\n }\n\n}", "function _apachesolr_index_get_next_set_query($env_id, $entity_type) {\n $table = apachesolr_get_indexer_table($entity_type);\n // Get $last_entity_id and $last_changed.\n $last_index_position = apachesolr_get_last_index_position($env_id, $entity_type);\n $bundles = apachesolr_get_index_bundles($env_id, $entity_type);\n\n $last_entity_id = $last_index_position['last_entity_id'];\n $last_changed = $last_index_position['last_changed'];\n\n // Find the next batch of entities to index for this entity type. Note that\n // for ordering we're grabbing the oldest first and then ordering by ID so\n // that we get a definitive order.\n // Also note that we fetch ALL fields from the indexer table\n $query = db_select($table, 'aie')\n ->fields('aie')\n ->condition('aie.bundle', $bundles)\n ->condition('aie.status', 1)\n ->condition(db_or()\n ->condition('aie.changed', $last_changed, '>')\n // Tie breaker for entities that were changed at exactly\n // the same second as the last indexed entity\n ->condition(db_and()\n ->condition('aie.changed', $last_changed, '=')\n ->condition('aie.entity_id', $last_entity_id, '>')\n )\n )\n // It is important that everything is indexed in order of changed date and\n // then on entity_id because otherwise the conditions above will not match\n // correctly\n ->orderBy('aie.changed', 'ASC')\n ->orderBy('aie.entity_id', 'ASC')\n ->addTag('apachesolr_index_' . $entity_type);\n\n if ($table == 'apachesolr_index_entities') {\n // Other, entity-specific tables don't need this condition.\n $query->condition('aie.entity_type', $entity_type);\n }\n return $query;\n}", "public function index()\n\t{\n\t\t/*\n\t\t|\tnot a logical function since GramStainResult\n\t\t|\tshould be specific to a particular result\n\t\t*/\n\t}", "protected function applyAdditionalStatementToIndex($query)\n {\n return $query;\n }", "public function testSelect()\n {\n $index = new Index();\n $query = new Query($index);\n $this->assertSame($query, $query->select(['a', 'b']));\n $elasticQuery = $query->compileQuery()->toArray();\n $this->assertEquals(['a', 'b'], $elasticQuery['_source']);\n\n $query->select(['c', 'd']);\n $elasticQuery = $query->compileQuery()->toArray();\n $this->assertEquals(['a', 'b', 'c', 'd'], $elasticQuery['_source']);\n\n $query->select(['e', 'f'], true);\n $elasticQuery = $query->compileQuery()->toArray();\n $this->assertEquals(['e', 'f'], $elasticQuery['_source']);\n }", "public function __invoke($index) {\n\t\treturn $this->offsetGet($index);\n\t}", "function putIndex(){\n\n }", "function putIndex(){\n\n }", "public function setIndex($index)\n {\n $this->model->_index = $index;\n $this->query['index'] = $this->model->getIndex();\n return $this;\n }", "private function query() {\n\t\t$indexables_to_create = [];\n\t\tif ( ! $this->indexable_repository->find_for_system_page( '404', false ) ) {\n\t\t\t$indexables_to_create['404'] = true;\n\t\t}\n\n\t\tif ( ! $this->indexable_repository->find_for_system_page( 'search-result', false ) ) {\n\t\t\t$indexables_to_create['search'] = true;\n\t\t}\n\n\t\tif ( ! $this->indexable_repository->find_for_date_archive( false ) ) {\n\t\t\t$indexables_to_create['date_archive'] = true;\n\t\t}\n\n\t\t$need_home_page_indexable = ( (int) \\get_option( 'page_on_front' ) === 0 && \\get_option( 'show_on_front' ) === 'posts' );\n\n\t\tif ( $need_home_page_indexable && ! $this->indexable_repository->find_for_home_page( false ) ) {\n\t\t\t$indexables_to_create['home_page'] = true;\n\t\t}\n\n\t\treturn $indexables_to_create;\n\t}", "public function testSetFullQuery()\n {\n $index = new Index();\n $query = new Query($index);\n\n $query\n ->where(['name' => 'test'])\n ->setFullQuery(new \\Elastica\\Query\\Term(['name' => 'cake']));\n\n $expected = ['query' => [\n 'term' => [\n 'name' => 'cake',\n ],\n ]];\n\n $this->assertSame($expected, $query->compileQuery()->toArray());\n }", "function query() {\n \n $this->ensure_my_table();\n \n if ($this->options['operator'] == 'in') {\n $keys = array_keys($this->value);\n\n $this->query->add_where(0, $this->table_alias.'.id IN ('. implode(',', $keys).')' );\n }\n\n }", "function apachesolr_fields_default_indexing_callback($entity, $field_name, $index_key, array $field_info) {\n $fields = array();\n $numeric = TRUE;\n if (!empty($entity->{$field_name})) {\n $field = $entity->$field_name;\n list($lang, $values) = each($field);\n switch ($field_info['index_type']) {\n case 'integer':\n case 'half-int':\n case 'sint':\n case 'tint':\n case 'thalf-int':\n case 'boolean':\n $function = 'intval';\n break;\n case 'float':\n case 'double':\n case 'sfloat':\n case 'sdouble':\n case 'tfloat':\n case 'tdouble':\n $function = 'apachesolr_floatval';\n break;\n default:\n $numeric = FALSE;\n $function = 'apachesolr_clean_text';\n }\n for ($i = 0; $i < count($values); $i++) {\n $fields[] = array(\n 'key' => $index_key,\n 'value' => $function($values[$i]['value']),\n );\n }\n // Also store the first value of the field in a singular index for multi value fields\n if ($field_info['multiple'] && $numeric && !empty($values[0])) {\n $singular_field_info = $field_info;\n $singular_field_info['multiple'] = FALSE;\n $single_key = apachesolr_index_key($singular_field_info);\n $fields[] = array(\n 'key' => $single_key,\n 'value' => $function($values[0]['value']),\n );\n }\n }\n return $fields;\n}", "protected function assembleQueries()\n {\n if ($this->getExecutedFilters()) {\n return $this;\n }\n\n $objectType = $this->getObjectType();\n\n $whereConditions = [];\n\n $mainTable = $this->getEntityService()->getTableName($objectType);\n $pre = 'v2';\n $dqlFilters = [];\n $tables = $this->getEntityService()->getVarOptionTables();\n $bindTypes = [];\n $pdoBindTypes = $this->getEntityService()->getPdoBindTypes();\n $filterable = $this->getFilterable();\n\n $x = 0; //count($this->getFilters()); // for tracking bind types\n\n // handle basic filters eg key=value\n // also, special handling of price range\n $filterParams = [];\n if ($this->getFilters()) {\n foreach($this->getFilters() as $field => $value) {\n foreach($filterable as $filterInfo) {\n if ($field == $filterInfo[CartRepositoryInterface::CODE]) {\n\n // handle special case for numerical ranges\n // eg price=100-199 or subtotal=50-100\n // note : the handling of strpos is very intentional, want an index > 0\n if ($filterInfo[CartRepositoryInterface::DATATYPE] == 'number' && strpos($value, '-')) {\n $rangeValues = explode('-', $value);\n $rangeMin = $rangeValues[0];\n $rangeMax = isset($rangeValues[1]) ? $rangeValues[1] : null;\n if (isset($rangeMax)) {\n\n $rangeMin = (float) $rangeMin;\n $rangeMax = (float) $rangeMax;\n\n // minimum\n $this->addAdvFilter([\n 'field' => $field,\n 'op' => 'gte',\n 'value' => $rangeMin,\n ]);\n\n // maximum\n $this->addAdvFilter([\n 'field' => $field,\n 'op' => 'lt',\n 'value' => $rangeMax,\n ]);\n\n break;\n }\n }\n\n if (isset($filterInfo['join'])) {\n $this->joins[] = $filterInfo['join'];\n $field = $filterInfo['join']['table'] . \".{$field}\";\n } elseif (!is_int(strpos($field, '.'))) {\n $field = \"main.{$field}\";\n }\n\n $whereConditions[] = \"{$field} = ?\";\n $filterParams[] = $value;\n\n switch($filterInfo[CartRepositoryInterface::DATATYPE]) {\n case 'boolean':\n $bindTypes[$x] = \\PDO::PARAM_INT;\n break;\n case 'number':\n // todo : make this better\n $bindTypes[$x] = \\PDO::PARAM_INT;\n break;\n case 'string':\n $bindTypes[$x] = \\PDO::PARAM_STR;\n break;\n case 'date':\n $bindTypes[$x] = \\PDO::PARAM_STR;\n break;\n default:\n $bindTypes[$x] = \\PDO::PARAM_STR;\n break;\n }\n\n $x++;\n break;\n }\n }\n }\n }\n\n // handle fulltext search first\n\n // note : use setFulltextIds() if you search somewhere else first eg SOLR / Elasticsearch\n if ($this->getFulltextIds()) {\n // ensure IDs are sanitized before you set them\n $whereConditions[] = \"main.id in (\" . implode(',', $this->getFulltextIds()) . \")\";\n } else if ($this->getQuery()\n && $this->getSearchField()\n && $this->getSearchMethod()) {\n\n if (is_array($this->getSearchField())) {\n if (count($this->getSearchField()) > 1) {\n\n $cond = '';\n foreach($this->getSearchField() as $searchField) {\n $bindTypes[$x] = \\PDO::PARAM_STR;\n\n $tbl = 'main';\n\n if (is_array($searchField)) {\n if (isset($searchField['table']) && isset($searchField['column'])) {\n $tbl = $searchField['table'];\n $searchField = $searchField['column'];\n } else {\n continue;\n }\n }\n\n // cond is empty, add a leading parentheses\n if (!$cond) {\n $cond .= \"({$tbl}.{$searchField} like ?\";\n } else {\n $cond .= \" OR {$tbl}.{$searchField} like ?\";\n }\n $x++;\n }\n $cond .= ')';\n $whereConditions[] = $cond;\n } else {\n\n $fields = $this->getSearchField();\n $searchField = $fields[0];\n if (is_array($searchField)) {\n if (isset($searchField['table']) && isset($searchField['column'])) {\n $tbl = $searchField['table'];\n $searchField = $searchField['column'];\n\n $bindTypes[$x] = \\PDO::PARAM_STR;\n $whereConditions[] = \"{$tbl}.{$searchField} like ?\";\n $x++;\n }\n } else {\n $bindTypes[$x] = \\PDO::PARAM_STR;\n $whereConditions[] = \"main.{$searchField} like ?\";\n $x++;\n }\n }\n } else {\n $bindTypes[$x] = \\PDO::PARAM_STR;\n $whereConditions[] = \"main.{$this->getSearchField()} like ?\";\n $x++;\n }\n }\n\n // handle \"advanced\" filters\n // eg filter_field[x], filter_op[x], filter_val[x]\n // specifies a field, value, and operator ie (id > 100)\n $advFilterParams = [];\n if ($this->getAdvFilters()) {\n foreach($this->getAdvFilters() as $advFilter) {\n\n $field = $advFilter['field'];\n $op = $advFilter['op'];\n $value = $advFilter['value'];\n $table = isset($advFilter['table'])\n ? $advFilter['table']\n : 'main';\n\n $found = false;\n foreach($filterable as $filterInfo) {\n if ($field == $filterInfo[CartRepositoryInterface::CODE]) {\n $found = true;\n\n switch($filterInfo[CartRepositoryInterface::DATATYPE]) {\n case 'boolean':\n $bindTypes[$x] = \\PDO::PARAM_INT;\n $x++;\n break;\n case 'number':\n if ($op == 'in') {\n if (!is_array($value)) {\n $value = explode(',', $value);\n }\n if ($value) {\n foreach($value as $dummy) {\n $bindTypes[$x] = \\PDO::PARAM_INT;\n $x++;\n }\n }\n } else {\n $bindTypes[$x] = \\PDO::PARAM_INT;\n $x++;\n }\n break;\n case 'string':\n if ($op == 'in') {\n if (!is_array($value)) {\n $value = explode(',', $value);\n }\n if ($value) {\n foreach($value as $dummy) {\n $bindTypes[$x] = \\PDO::PARAM_STR;\n $x++;\n }\n }\n } else {\n $bindTypes[$x] = \\PDO::PARAM_STR;\n $x++;\n }\n\n break;\n case 'date':\n $bindTypes[$x] = \\PDO::PARAM_STR;\n $x++;\n break;\n default:\n $bindTypes[$x] = \\PDO::PARAM_STR;\n $x++;\n break;\n }\n\n\n break;\n }\n }\n\n if (!$found || !in_array($op, ['contains', 'starts', 'ends', 'equals', 'gt', 'gte', 'lt', 'lte', 'in'])) {\n continue;\n }\n\n // example:\n // $and->add($qb->expr()->eq('u.id', 1));\n\n switch($op) {\n case 'contains':\n $advFilterParams[] = '%'. $value . '%';\n $whereConditions[] = \"{$table}.{$field} like ?\";\n break;\n case 'starts':\n $advFilterParams[] = $value . '%';\n $whereConditions[] = \"{$table}.{$field} like ?\";\n break;\n case 'ends':\n $advFilterParams[] = '%'. $value;\n $whereConditions[] = \"{$table}.{$field} like ?\";\n break;\n case 'equals':\n $advFilterParams[] = $value;\n $whereConditions[] = \"{$table}.{$field} = ?\";\n break;\n case 'notequal':\n $advFilterParams[] = $value;\n $whereConditions[] = \"{$table}.{$field} != ?\";\n break;\n// todo: this is messing up the counter, but it should be implemented\n// case 'null':\n// $advFilterParams[] = 'NULL';\n// $whereConditions[] = \"{$table}.{$field} IS ?\";\n// break;\n// case 'notnull':\n// $advFilterParams[] = $value;\n// $whereConditions[] = \"{$table}.{$field} IS NOT NULL\";\n// break;\n case 'gt':\n $advFilterParams[] = $value;\n $whereConditions[] = \"{$table}.{$field} > ?\";\n break;\n case 'gte':\n $advFilterParams[] = $value;\n $whereConditions[] = \"{$table}.{$field} >= ?\";\n break;\n case 'lt':\n $advFilterParams[] = $value;\n $whereConditions[] = \"{$table}.{$field} < ?\";\n break;\n case 'lte':\n $advFilterParams[] = $value;\n $whereConditions[] = \"{$table}.{$field} <= ?\";\n break;\n case 'in':\n if (!is_array($value)) {\n $value = explode(',', $value);\n }\n\n if ($value) {\n foreach($value as $val) {\n $advFilterParams[] = $val;\n }\n $paramStr = implode(',', $value);\n $whereConditions[] = \"{$table}.{$field} in ({$paramStr})\";\n }\n\n break;\n default:\n\n break;\n }\n }\n }\n\n // handle category filter with products\n if ($this->getCategoryId()\n && $this->getObjectType() == EntityConstants::PRODUCT) {\n\n $categoryTable = $this->getEntityService()->getTableName(EntityConstants::CATEGORY_PRODUCT);\n $bindTypes[$x] = \\PDO::PARAM_INT;\n // todo : sometime in the future , add a category 'anchor', connecting multiple categories\n $whereConditions[] = \"main.id in (select product_id from {$categoryTable} where category_id = ?)\";\n $x++;\n }\n\n // handle stock, visibility filters with products\n\n\n // handle facet filters\n // ie filters on EAV tables, child tables\n $facetFilterParams = [];\n if ($this->getFacetFilters()) {\n foreach($this->getFacetFilters() as $facetCode => $value) {\n\n $itemVar = $this->getVarByCode($facetCode);\n\n $tblValue = $objectType . '_' . EntityConstants::getVarDatatype($itemVar->getDatatype());\n $values = explode($this->valueSep, $value);\n $joinTbl = $tables[$itemVar->getDatatype()];\n $joinTblPre = 'ivo';\n\n if (count($values) > 1) {\n $conditions = [];\n foreach($values as $itemVarValue) {\n $conditions[] = \"({$pre}.value = ? OR {$joinTblPre}.url_value = ?)\";\n $facetFilterParams[] = $itemVarValue;\n\n $bindTypes[$x] = $pdoBindTypes[$itemVar->getDatatype()];\n $x++;\n\n $bindTypes[$x] = $pdoBindTypes[$itemVar->getDatatype()];\n $x++;\n\n }\n $dqlFilters[] = \"({$pre}.item_var_id={$itemVar->getId()} AND (\".implode(' OR ', $conditions).\"))\";\n } else {\n $dqlFilters[] = \"({$pre}.item_var_id={$itemVar->getId()} AND ({$pre}.value = ? OR {$joinTblPre}.url_value = ?))\";\n $facetFilterParams[] = $value;\n\n $bindTypes[$x] = $pdoBindTypes[$itemVar->getDatatype()];\n $x++;\n\n $bindTypes[$x] = $pdoBindTypes[$itemVar->getDatatype()];\n $x++;\n }\n\n $whereConditions[] = \"main.id in (select parent_id from {$tblValue} {$pre} left join {$joinTbl} {$joinTblPre} on {$pre}.item_var_option_id={$joinTblPre}.id where \". implode(' AND ', $dqlFilters).\")\";\n $dqlFilters = [];\n\n }\n }\n\n // assemble where conditions\n $conditionsSql = implode(' AND ', $whereConditions);\n if (!$conditionsSql) {\n $conditionsSql = '1=1';\n }\n\n // assemble group by\n $groupSql = $this->getGroupBy()\n ? 'group by ' . implode(', ', $this->getGroupBy())\n : '';\n\n // assemble select columns\n $colSql = '';\n if ($this->getColumns()) {\n $cols = [];\n foreach($this->getColumns() as $colData) {\n // add select\n $select = $colData['select'];\n $alias = $colData['alias'];\n if ($alias) {\n $select .= \" as {$alias}\";\n }\n\n $cols[] = $select;\n }\n $colSql = ',' . implode(',', $cols);\n }\n\n // assemble joins\n $joinSql = '';\n if ($this->getJoins()) {\n $joins = [];\n foreach($this->getJoins() as $join) {\n $type = $join['type'];\n $table = $join['table'];\n $column = $join['column'];\n $joinAlias = $join['join_alias'];\n $joinColumn = $join['join_column'];\n $joins[] = \"{$type} join {$table} on {$joinAlias}.{$joinColumn}={$table}.{$column}\";\n }\n $joinSql = implode(' ', $joins);\n }\n\n // main data query without sorting and grouping\n $this->filtersSql = \"select distinct(main.id) from {$mainTable} main {$joinSql} where {$conditionsSql}\";\n // main data query\n $this->mainSql = \"select distinct(main.id), main.* {$colSql} from {$mainTable} main {$joinSql} where {$conditionsSql} {$groupSql}\";\n // main count query, for all rows, not just the current page\n $this->countSql = \"select count(distinct(main.id)) as count from {$mainTable} main {$joinSql} where {$conditionsSql} {$groupSql}\";\n $this->bindTypes = $bindTypes;\n $this->filterParams = $filterParams;\n $this->advFilterParams = $advFilterParams;\n $this->facetFilterParams = $facetFilterParams;\n\n $this->setExecutedFilters(true);\n return $this;\n }", "abstract public function query();", "private function parseIndex( SimpleXMLElement $index )\n {\n $indexFields = array();\n\n foreach ( $index->field as $indexField )\n {\n $indexFieldName = (string) $indexField->name;\n\n $indexFields[$indexFieldName] = ezcDbSchema::createNewIndexField(\n isset( $indexField->sorting ) ? (string) $indexField->sorting : null\n );\n }\n\n return ezcDbSchema::createNewIndex(\n $indexFields,\n isset( $index->primary ) ? (string) $index->primary : false,\n isset( $index->unique ) ? (string) $index->unique : false\n );\n }", "public function prepareDataForIndex(OnlineShop_Framework_ProductInterfaces_IIndexable $object) {\n $subObjectIds = $this->tenantConfig->createSubIdsForObject($object);\n\n foreach($subObjectIds as $subObjectId => $object) {\n /**\n * @var OnlineShop_Framework_ProductInterfaces_IIndexable $object\n */\n if($object->getOSDoIndexProduct() && $this->tenantConfig->inIndex($object)) {\n $a = Pimcore::inAdmin();\n $b = \\Pimcore\\Model\\Object\\AbstractObject::doGetInheritedValues();\n Pimcore::unsetAdminMode();\n \\Pimcore\\Model\\Object\\AbstractObject::setGetInheritedValues(true);\n $hidePublishedMemory = \\Pimcore\\Model\\Object\\AbstractObject::doHideUnpublished();\n \\Pimcore\\Model\\Object\\AbstractObject::setHideUnpublished(false);\n $categories = $object->getCategories();\n $categoryIds = array();\n $parentCategoryIds = array();\n if($categories) {\n foreach($categories as $c) {\n $parent = $c;\n\n if ($parent != null) {\n if($parent->getOSProductsInParentCategoryVisible()) {\n while($parent && $parent instanceof OnlineShop_Framework_AbstractCategory) {\n $parentCategoryIds[$parent->getId()] = $parent->getId();\n $parent = $parent->getParent();\n }\n } else {\n $parentCategoryIds[$parent->getId()] = $parent->getId();\n }\n\n $categoryIds[$c->getId()] = $c->getId();\n }\n }\n }\n\n ksort($categoryIds);\n\n $virtualProductId = $subObjectId;\n $virtualProductActive = $object->isActive();\n if($object->getOSIndexType() == \"variant\") {\n $virtualProductId = $this->tenantConfig->createVirtualParentIdForSubId($object, $subObjectId);\n }\n\n $virtualProduct = \\Pimcore\\Model\\Object\\AbstractObject::getById($virtualProductId);\n if($virtualProduct && method_exists($virtualProduct, \"isActive\")) {\n $virtualProductActive = $virtualProduct->isActive();\n }\n\n $data = array(\n \"o_id\" => $subObjectId,\n \"o_classId\" => $object->getClassId(),\n \"o_virtualProductId\" => $virtualProductId,\n \"o_virtualProductActive\" => $virtualProductActive,\n \"o_parentId\" => $object->getOSParentId(),\n \"o_type\" => $object->getOSIndexType(),\n \"categoryIds\" => ',' . implode(\",\", $categoryIds) . \",\",\n \"parentCategoryIds\" => ',' . implode(\",\", $parentCategoryIds) . \",\",\n \"priceSystemName\" => $object->getPriceSystemName(),\n \"active\" => $object->isActive(),\n \"inProductList\" => $object->isActive(true)\n );\n\n $relationData = array();\n\n $columnConfig = $this->columnConfig->column;\n if(!empty($columnConfig->name)) {\n $columnConfig = array($columnConfig);\n }\n else if(empty($columnConfig))\n {\n $columnConfig = array();\n }\n foreach($columnConfig as $column) {\n try {\n //$data[$column->name] = null;\n $value = null;\n if(!empty($column->getter)) {\n $getter = $column->getter;\n $value = $getter::get($object, $column->config, $subObjectId, $this->tenantConfig);\n } else {\n if(!empty($column->fieldname)) {\n $getter = \"get\" . ucfirst($column->fieldname);\n } else {\n $getter = \"get\" . ucfirst($column->name);\n }\n\n if(method_exists($object, $getter)) {\n $value = $object->$getter($column->locale);\n }\n }\n\n if(!empty($column->interpreter)) {\n $interpreter = $column->interpreter;\n $value = $interpreter::interpret($value, $column->config);\n $interpreterObject = new $interpreter();\n if($interpreterObject instanceof OnlineShop_Framework_IndexService_RelationInterpreter) {\n foreach($value as $v) {\n $relData = array();\n $relData['src'] = $subObjectId;\n $relData['src_virtualProductId'] = $virtualProductId;\n $relData['dest'] = $v['dest'];\n $relData['fieldname'] = $column->name;\n $relData['type'] = $v['type'];\n $relationData[] = $relData;\n }\n } else {\n $data[$column->name] = $value;\n }\n } else {\n $data[$column->name] = $value;\n }\n\n if(is_array($data[$column->name])) {\n $data[$column->name] = OnlineShop_Framework_IndexService_Tenant_IWorker::MULTISELECT_DELIMITER . implode($data[$column->name], OnlineShop_Framework_IndexService_Tenant_IWorker::MULTISELECT_DELIMITER) . OnlineShop_Framework_IndexService_Tenant_IWorker::MULTISELECT_DELIMITER;\n }\n\n } catch(Exception $e) {\n Logger::err(\"Exception in IndexService: \" . $e->getMessage(), $e);\n }\n\n }\n if($a) {\n Pimcore::setAdminMode();\n }\n \\Pimcore\\Model\\Object\\AbstractObject::setGetInheritedValues($b);\n \\Pimcore\\Model\\Object\\AbstractObject::setHideUnpublished($hidePublishedMemory);\n\n\n $subTenantData = $this->tenantConfig->prepareSubTenantEntries($object, $subObjectId);\n $jsonData = json_encode(array(\n \"data\" => $data,\n \"relations\" => ($relationData ? $relationData : []),\n \"subtenants\" => ($subTenantData ? $subTenantData : [])\n ));\n\n $crc = crc32($jsonData);\n $insertData = array(\n \"id\" => $subObjectId,\n \"tenant\" => $this->name,\n \"data\" => $jsonData,\n \"crc_current\" => $crc,\n \"preparation_worker_timestamp\" => 0,\n \"preparation_worker_id\" => $this->db->quote(null),\n \"in_preparation_queue\" => 0\n );\n\n $currentEntry = $this->db->fetchRow(\"SELECT crc_current, in_preparation_queue FROM \" . $this->getStoreTableName() . \" WHERE id = ? AND tenant = ?\", array($subObjectId, $this->name));\n if(!$currentEntry) {\n $this->db->insert($this->getStoreTableName(), $insertData);\n } else if($currentEntry['crc_current'] != $crc) {\n $this->db->update($this->getStoreTableName(), $insertData, \"id = \" . $this->db->quote((string)$subObjectId) . \" AND tenant = \" . $this->db->quote($this->name));\n } else if($currentEntry['in_preparation_queue']) {\n $this->db->query(\"UPDATE \" . $this->getStoreTableName() . \" SET in_preparation_queue = 0, preparation_worker_timestamp = 0, preparation_worker_id = null WHERE id = ? AND tenant = ?\", array($subObjectId, $this->name));\n }\n\n } else {\n Logger::info(\"Don't adding product \" . $subObjectId . \" to index \" . $this->name . \".\");\n $this->doDeleteFromIndex($subObjectId);\n }\n }\n\n //cleans up all old zombie data\n $this->doCleanupOldZombieData($object, $subObjectIds);\n\n }", "public function testBulkIndex(): void\n {\n $index = $this->_getClient()->getIndex('cryptocurrencies');\n\n $anonCoin = new Document('1', ['name' => 'anoncoin']);\n $ixCoin = new Document('2', ['name' => 'ixcoin']);\n\n $index->addDocuments([$anonCoin, $ixCoin]);\n\n $this->assertEquals('anoncoin', $index->getDocument(1)->get('name'));\n $this->assertEquals('ixcoin', $index->getDocument(2)->get('name'));\n\n $anonCoin->set('name', 'AnonCoin');\n $ixCoin->set('name', 'iXcoin');\n\n $index->updateDocuments([$anonCoin, $ixCoin]);\n\n $this->assertEquals('AnonCoin', $index->getDocument(1)->get('name'));\n $this->assertEquals('iXcoin', $index->getDocument(2)->get('name'));\n\n $index->deleteDocuments([$anonCoin, $ixCoin]);\n\n $this->expectException(NotFoundException::class);\n $index->getDocument(1);\n $index->getDocument(2);\n }", "protected function getIndexLine($index) {\n $sql = array();\n \n $sql[] = 'ALTER TABLE `'.$index['Table'].'` ADD';\n \n if($index['Key_name'] == 'PRIMARY') {\n $sql[] = 'PRIMARY KEY ('.$index['Column_name'].')';\n } else {\n if($index['Non_unique'] == '0') {\n $sql[] = 'UNIQUE';\n } else {\n #$sql[] = $index['Index_type'];\n if(strtolower(trim($index['Index_type'])) == 'fulltext') {\n $sql[] = 'FULLTEXT';\n }\n }\n \n $sql[] = 'INDEX ('.$index['Column_name'].')';\n }\n \n return implode(' ', $sql).';';\n }", "abstract public function wipeIndex();", "public function getIndexerOptionsByIndex(tx_mksearch_model_internal_Index $index)\n {\n $fields = [\n 'CMP.hidden' => [OP_EQ_INT => 0],\n 'INDX.hidden' => [OP_EQ_INT => 0],\n 'INDX.uid' => [OP_EQ_INT => $index->uid],\n ];\n $options = [\n 'orderby' => [\n 'INDXCMPMM.sorting' => 'ASC',\n ],\n ];\n $tmpCfg = $this->search($fields, $options);\n foreach ($tmpCfg as $oModel) {\n $sTs .= \"{\\n\".$oModel->record['configuration'].\"\\n}\";\n }\n\n return tx_mksearch_util_Misc::parseTsConfig($sTs);\n }", "function LooseSearch($indexedbyid=false){\n\t\treturn $this->Search($indexedbyid,true);\n\t}", "public function apply(QueryBuilder $query): void;", "public function transform(AstNode $query) {\n $transformed = $this->transformAstToQuery($query);\n\n switch (key($transformed)) {\n // A compound-query was returned, so we simply need to wrap it in\n // a `query`-clause.\n case 'bool':\n return [\n 'query' => $transformed,\n ];\n\n default:\n // A simple query was returned. We upcast it to a `bool`-query,\n // so that it will be easier for the ES backend to add filters\n // to it (e.g. filter to a specific username).\n return [\n 'query' => [\n 'bool' => [\n 'must' => [\n $transformed\n ]\n ]\n ]\n ];\n }\n }", "public function flush($indexName)\n {\n }", "public function initQueryBody()\n {\n $this->queryBody = [\n 'index' => $this->connection->index(),\n 'type' => $this->connection->type(),\n 'body' => [\n 'query' => [\n 'bool' => [\n 'filter' => [\n\n ]\n ]\n ]\n ]\n ];\n }", "protected function handleWildcardQuery(SearchApiQueryInterface $query, $index_fields) {\n $originalKeys = $query->getOriginalKeys();\n\n $wildcard_query = array();\n if (!empty($originalKeys) && preg_match('/\\*|\\?/', $originalKeys)) {\n $query_full_text_fields = $query->getFields();\n foreach ($query_full_text_fields as $fulltext_field) {\n $boost = isset($index_fields[$fulltext_field]['boost']) ? '^' . $index_fields[$fulltext_field]['boost'] : '';\n $field_values = array('value' => strtolower($originalKeys));\n if (isset($index_fields[$fulltext_field]['boost'])) {\n $field_values['boost'] = $index_fields[$fulltext_field]['boost'];\n }\n\n $wildcard_query[] = array(\n 'wildcard' => array(\n $fulltext_field => $field_values\n )\n );\n }\n }\n\n return $wildcard_query;\n }", "function build_table_search_params($index, $type, $query, $from = 0, $size = 1000) {\n $params = [];\n $params['index'] = $index;\n $params['type'] = $type;\n // sort the table by the first field by default\n //$sort_field = array_keys($field_content_pairs)[0];\n $params['body'] = [\n 'query' => $query,\n ];\n\n if (isset($_GET['order'])) {\n $sort_field = $_GET['order'];\n $sort_direction = isset($_GET['sort']) && $_GET['sort'] === 'desc' ? 'desc' : 'asc';\n $params['body']['sort'] = [\n $sort_field . \".raw\" => $sort_direction,\n ];\n }\n\n $params['from'] = $from;\n $params['size'] = $size;\n return $params;\n}", "public function rebuildIndex()\n {\n $this->elastic->deleteIndex(self::INDEX);\n $this->elastic->addIndexCompanion(self::INDEX);\n }", "public function postIndex()\n {\n $request = request()->except('_token');\n\n $validator = Validator::make($request,\n [\n 'filters.index' => 'required',\n 'filters.type' => 'required',\n ]);\n\n if ($validator->fails()) {\n return back()->with('error_message', 'Spiacenti, dovete selezionare almeno un indice ed una tipologia sulla quale effettuare l\\'operazione');\n }\n\n $index = trim($request['filters']['index']);\n $type = trim($request['filters']['type']);\n\n\n if ((!request()->has('id')) AND (request()->has('operation') AND request()->get('operation') !== \"create\")) {\n\n $page =1;\n if(request()->has('pagehit')) $page = (request()->input('pagehit') / (config('elasticquent.max_result','20')));\n\n\n $model = new GenericEntity($type, $index);\n\n $input = ['metadata'=>[]];\n if(request()->has('metadata'))$input = request()->only('metadata');\n\n\n try {\n\n $purgedInput = array_map('array_filter', $input);\n\n $results = $model->get($purgedInput['metadata'], [], $page);\n } catch (CouldNotConnectToHost $e) {\n return back()->with('error_message', 'Spiacenti, il servizio non è disponibile');\n } catch (EntityNotFoundException $e) {\n return back()->with('error_message', 'Spiacenti, nessun risultato trovato');\n }\n\n\n $finalResults = [];\n $element = [];\n $tableHead = ['id'];\n\n foreach ($results['hits']['hits'] as $result) {\n $finalResult = $result['_source'];\n foreach ($finalResult as $key => $item) {\n\n\n $element[$key] = $item;\n if (!in_array($key, $tableHead) and !is_array($item) and !(strpos($key, 'id'))) $tableHead[] = $key;\n\n }\n $element['id'] = $result['_id'];\n $finalResults[] = $element;\n }\n\n\n\n return view('admin.manage_entity.global_search', [\n 'indices' => $indices = $this->client->indices()->getMapping(),\n 'filters' => $request['filters'],\n 'results' => $finalResults,\n 'hits' => $results['hits']['total'],\n 'pagehit' => $page,\n 'tableHead' => $tableHead,\n 'type' => $type\n ]);\n\n } elseif (request()->has('operation') AND request()->get('operation') !== \"create\") {\n\n if (request()->has('id')) {\n if (request()->has('operation') AND request()->get('operation') === \"edit\") {\n return redirect()->to('/entity/edit/' . $index . '/' . $type . '/' . trim(request()->get('id')));\n }\n if (request()->has('operation') AND request()->get('operation') === \"delete\") {\n return redirect()->to('/entity/delete/' . $index . '/' . $type . '/' . trim(request()->get('id')));\n } else return redirect()->to('/entity/show/' . $index . '/' . $type . '/' . trim(request()->get('id')));\n }\n } else {\n return redirect()->to('/entity/create/' . $index . '/' . $type);\n }\n }" ]
[ "0.65636927", "0.6495029", "0.60233", "0.5858619", "0.57075727", "0.56247723", "0.5603454", "0.54038", "0.5399993", "0.53722894", "0.5344978", "0.5341792", "0.5340216", "0.5331775", "0.53137255", "0.5285161", "0.52817386", "0.52666605", "0.52237785", "0.51940584", "0.51753455", "0.5174562", "0.5154702", "0.5152404", "0.5144569", "0.51115817", "0.5110827", "0.50989586", "0.50980306", "0.5074671", "0.5067669", "0.50649947", "0.5056037", "0.5054476", "0.50472856", "0.50321895", "0.5031552", "0.50191027", "0.50173324", "0.50112927", "0.50092703", "0.49733624", "0.49677733", "0.49677733", "0.49677733", "0.49406275", "0.49391508", "0.49326232", "0.4921819", "0.49190754", "0.49185663", "0.49144244", "0.49005485", "0.48799556", "0.48656943", "0.4846143", "0.48451048", "0.48352668", "0.48333886", "0.48223194", "0.4816507", "0.4816507", "0.48045778", "0.48042014", "0.48036438", "0.47993597", "0.47918707", "0.4789484", "0.47893676", "0.47892404", "0.47849384", "0.47814476", "0.47793233", "0.47759876", "0.4774961", "0.4770767", "0.476736", "0.476255", "0.476255", "0.4759493", "0.47574788", "0.47570464", "0.47519574", "0.47509405", "0.47496536", "0.47375205", "0.4734603", "0.4730056", "0.47250673", "0.47166824", "0.47151753", "0.47151315", "0.471124", "0.47093678", "0.47083345", "0.47046953", "0.4700553", "0.4696662", "0.46947873", "0.4687298", "0.4686053" ]
0.0
-1
Optimize query in the context of specified index
public function optimize(\Core\Search\Lucene\InterfaceLucene $index) { throw new \Core\Search\Lucene\Exception ( 'Wildcard query should not be directly used for search. Use $query->rewrite($index)' ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function optimize()\n {\n $this->index->optimize();\n }", "public function optimizeIndex()\n {\n // either open or create the index\n $this->index = $this->openIndex(APPLICATION_PATH . '/data/search/jobs');\n $this->index->optimize();\n }", "public function optimize($indexName)\n {\n $index = $this->getLuceneIndex($indexName);\n $index->optimize();\n }", "public function commitIndex() {\n $this->index->commit();\n $this->index->optimize();\n }", "function process_query_index( $query )\n\t{\n\t\treturn $query;\n\t}", "public function query($index){\n $this->httpRequest->query($index);\n }", "public function useIndexClause( $index ) {\n\t\treturn '';\n\t}", "public function optimize(Zend_Search_Lucene_Interface $index)\n {\n $terms = $this->_terms;\n $signs = $this->_signs;\n\n foreach ($terms as $id => $term) {\n if (!$index->hasTerm($term)) {\n if ($signs === null || $signs[$id] === true) {\n // Term is required\n require_once 'Zend/Search/Lucene/Search/Query/Empty.php';\n return new Zend_Search_Lucene_Search_Query_Empty();\n } else {\n // Term is optional or prohibited\n // Remove it from terms and signs list\n unset($terms[$id]);\n unset($signs[$id]);\n }\n }\n }\n\n // Check if all presented terms are prohibited\n $allProhibited = true;\n if ($signs === null) {\n $allProhibited = false;\n } else {\n foreach ($signs as $sign) {\n if ($sign !== false) {\n $allProhibited = false;\n break;\n }\n }\n }\n if ($allProhibited) {\n require_once 'Zend/Search/Lucene/Search/Query/Empty.php';\n return new Zend_Search_Lucene_Search_Query_Empty();\n }\n\n /**\n * @todo make an optimization for repeated terms\n * (they may have different signs)\n */\n\n if (count($terms) === 1) {\n // It's already checked, that it's not a prohibited term\n\n // It's one term query with one required or optional element\n require_once 'Zend/Search/Lucene/Search/Query/Term.php';\n $optimizedQuery = new Zend_Search_Lucene_Search_Query_Term(reset($terms));\n $optimizedQuery->setBoost($this->getBoost());\n\n return $optimizedQuery;\n }\n\n if (count($terms) === 0) {\n require_once 'Zend/Search/Lucene/Search/Query/Empty.php';\n return new Zend_Search_Lucene_Search_Query_Empty();\n }\n\n $optimizedQuery = new Zend_Search_Lucene_Search_Query_MultiTerm($terms, $signs);\n $optimizedQuery->setBoost($this->getBoost());\n return $optimizedQuery;\n }", "private function _optimize() {}", "public function optimize();", "public function optimize();", "public function getQueryBuilderForIndex(Request $Request, $context = null);", "public function optimize() {}", "public function hook_query_index(&$query) {\n\t //Your code here\n\t \n\t }", "public function updateIndex()\n {\n if ($this->es_index_helper) {\n call_user_func($this->es_index_helper, $this);\n }\n }", "abstract protected function makeIndex(string $table, DoctrineDBALIndex $index): Index;", "public function hook_query_index(&$query)\n\t{\n\t\t//Your code here\n\n\t}", "abstract public function parseIndexHint($hint);", "public function buildIndex();", "public function _INDEX()\n\t{\n\t\t\n\t}", "function add_clean_index($table, $index)\n {\n }", "private function prepareOptimize()\n\t{\n\t\t$cacheKey = 'NEXT_OPTIMIZE_ON_SOLR';\n\n\t\t/** @var Carbon $nextOptimizeOnSolr */\n\t\t$nextOptimizeOnSolr = $this->cache->get($cacheKey, Carbon::now());\n\n\t\t// if cached value is too old, make it now\n\t\tif ($nextOptimizeOnSolr->isPast()) {\n\t\t\t$nextOptimizeOnSolr = Carbon::now();\n\t\t}\n\n\t\t// adding 2 minutes for next possible optimize\n\t\t$nextOptimizeOnSolr->addMinutes(2);\n\n\t\t// store until next optimize is possible\n\t\t$this->cache->put($cacheKey, $nextOptimizeOnSolr, $nextOptimizeOnSolr);\n\n\t\t$job = (new Optimize($cacheKey))\n\t\t\t->delay($nextOptimizeOnSolr);\n\n\t\tdispatch($job);\n\t}", "private function processIndexes()\n {\n foreach ($this->indexes as $index) {\n foreach ($index->columns as $indexColumn) {\n $indexColumnName = $indexColumn['name'];\n if (!array_key_exists(strtolower($indexColumnName), $this->columns)) {\n throw new RuntimeException(\"Key column '$indexColumnName' doesn't exist in table\");\n }\n }\n }\n\n // figure out all sequences of columns covered by non-FK indexes\n foreach ($this->indexes as $index) {\n if ($index->type !== 'FOREIGN KEY') {\n foreach ($index->getCovers() as $cover) {\n $lookup = implode('\\0', $cover);\n $this->covers[$lookup] = true;\n }\n }\n }\n\n $indexes = [];\n $foreigns = [];\n $ibfkCounter = 0;\n\n foreach ($this->indexes as $index) {\n if ($index->type === 'FOREIGN KEY') {\n if ($this->addIndexForForeignKey) {\n // TODO - doesn't correctly deal with indexes like foo(10)\n $lookup = implode('\\0', $index->getColumns());\n if (!array_key_exists($lookup, $this->covers)) {\n $newIndex = new IndexDefinition();\n $newIndex->type = 'KEY';\n $newIndex->columns = $index->columns;\n if (!is_null($index->constraint)) {\n $newIndex->name = $index->constraint;\n } elseif (!is_null($index->name)) {\n $newIndex->name = $index->name;\n }\n $indexes[] = $newIndex;\n }\n }\n\n $foreign = new IndexDefinition();\n if (is_null($index->constraint)) {\n $foreign->constraint = $this->name . '_ibfk_' . ++$ibfkCounter;\n } else {\n $foreign->constraint = $index->constraint;\n }\n $foreign->type = 'FOREIGN KEY';\n $foreign->columns = $index->columns;\n $foreign->reference = $index->reference;\n $foreigns[] = $foreign;\n } else {\n $indexes[] = $index;\n }\n }\n\n // now synthesise names for any unnamed indexes,\n // and collect indexes by type\n $usedName = [];\n $keyTypes = [\n 'PRIMARY KEY',\n 'UNIQUE KEY',\n 'KEY',\n 'FULLTEXT KEY',\n 'FOREIGN KEY',\n ];\n $indexesByType = array_fill_keys($keyTypes, []);\n foreach ($indexes as $index) {\n $name = $index->name;\n if ($index->type === 'PRIMARY KEY') {\n $name = 'PRIMARY';\n } elseif (is_null($name)) {\n $base = $index->columns[0]['name'];\n $name = $base;\n $i = 1;\n while (isset($usedName[$name])) {\n $name = $base . '_' . ++$i;\n }\n $index->name = $name;\n } elseif (array_key_exists(strtolower($name), $usedName)) {\n throw new RuntimeException(\"Duplicate key name '$name'\");\n }\n $index->name = $name;\n $usedName[strtolower($name)] = true;\n\n $indexesByType[$index->type][] = $index;\n }\n\n if (count($indexesByType['PRIMARY KEY']) > 1) {\n throw new RuntimeException(\"Multiple PRIMARY KEYs defined\");\n }\n\n foreach ($indexesByType['PRIMARY KEY'] as $pk) {\n foreach ($pk->columns as $indexColumn) {\n $column = $this->columns[strtolower($indexColumn['name'])];\n if ($column->nullable) {\n $column->nullable = false;\n if (is_null($column->default)) {\n $column->default = $column->getUninitialisedValue();\n }\n }\n }\n }\n\n $this->indexes = [];\n foreach (array_reduce($indexesByType, 'array_merge', []) as $index) {\n $this->indexes[$index->name] = $index;\n }\n foreach ($foreigns as $foreign) {\n $this->foreigns[$foreign->constraint] = $foreign;\n }\n }", "public function getbyindex2($index){\n $condition['index'] = $index;\n $result = $this->where($condition) ->select();\n return $result;\n \n }", "public function updateIndexState() {\n $query = $this->database->select('help_search_items', 'hsi');\n $query->addExpression('COUNT(DISTINCT(hsi.sid))');\n $query->leftJoin('search_dataset', 'sd', 'hsi.sid = sd.sid AND sd.type = :type', [':type' => $this->getType()]);\n $query->isNull('sd.sid');\n $never_indexed = $query->execute()->fetchField();\n $this->state->set('help_search_unindexed_count', $never_indexed);\n }", "public function isIndexed() {}", "public function isIndexed() {}", "public function isIndexed() {}", "function putIndex(){\n\n }", "function putIndex(){\n\n }", "function getIndex() ;", "function index() \n\t{\n\t\t/* TODO: This logic can be optimized more */\n\t\t\n\t\t$datevalue = $this->_date;\n\t\t\n\t\tif($_GET['log_file'])\n\t\t\tdefine(\"log_file\", $_GET['log_file']);\n\t\t\n\t\tif($_GET['DEBUG'])\n\t\t\tdefine(\"DEBUG\", $_GET['DEBUG']);\n\n\t\t$this->log_info(log_file, \"CA replaceindex process started\");\n\t\t\n\t\t$finalArray = array ();\n\t\t\n\t\t/* Fetch list of all upcoming indexes with today as the live date */\n\t\t$totalindxxs = $this->db->getResult ( \"select * from tbl_indxx_temp where status='1' and usersignoff='1' and dbusersignoff='1' and submitted='1' and finalsignoff='1' and dateStart='\" . $datevalue . \"' \", true );\n\t\t\n\t\tif (! empty ( $indexdata )) \n\t\t{\n\t\t\tforeach ( $indexdata as $k1 => $oldindxx ) \n\t\t\t{\n\t\t\t\t$finalArray [$k1] = $oldindxx;\n\t\t\t\t\n\t\t\t\t/* Fetch the list of securities for this index */\n\t\t\t\t$oldTickers = $this->db->getResult ( \"Select * from tbl_indxx_ticker_temp where indxx_id ='\" . $oldindxx ['id'] . \"'\", true );\n\t\t\t\t$finalArray [$k1] ['tickers'] = $oldTickers;\n\n\t\t\t\t/* Fetch shares for this index */\n\t\t\t\t$oldShares = $this->db->getResult ( \"Select * from tbl_share_temp where indxx_id ='\" . $oldindxx ['id'] . \"'\", true );\n\t\t\t\t$finalArray [$k1] ['shares'] = $oldShares;\n\n\t\t\t\t/* Fetch the index value */\n\t\t\t\t$oldindxxvalue = $this->db->getResult ( \"Select * from tbl_indxx_value_temp where indxx_id ='\" . $oldindxx ['id'] . \"' order by date desc \", false, 1 );\n\t\t\t\t$finalArray [$k1] ['oldindxxvalue'] = $oldindxxvalue;\n\t\t\t\t\n\t\t\t\t/* Fetch the currency converted prices of various securities for this index */\n\t\t\t\t$oldPrices = $this->db->getResult ( \"Select * from tbl_final_price_temp where indxx_id ='\" . $oldindxx ['id'] . \"' and date='\" . $oldindxxvalue ['date'] . \"'\", true );\n\t\t\t\t$finalArray [$k1] ['prices'] = $oldPrices;\n\t\t\t\t\n\t\t\t\t/* Check if this index is listed in the delist queue */\n\t\t\t\t$delistReq = $this->db->getResult ( \"Select * from tbl_delist_tempindex_req where indxx_id ='\" . $oldindxx ['id'] . \"'\", true );\n\t\t\t\t$delistArray = array ();\n\n\t\t\t\tif (! empty ( $delistReq )) \n\t\t\t\t{\n\t\t\t\t\tforeach ( $delistReq as $k2 => $delisting ) \n\t\t\t\t\t{\n\t\t\t\t\t\t$delistArray [$k2] = $delisting;\n\t\t\t\t\t\t\n\t\t\t\t\t\t$delistSec = $this->db->getResult ( \"Select * from tbl_delist_tempsecurity where indxx_id ='\" . $delisting ['indxx_id'] . \"' and req_id='\" . $delisting ['id'] . \"'\", true );\n\t\t\t\t\t\t$delistArray [$k2] ['security'] = $delistSec;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t$finalArray [$k1] ['delisting'] = $delistArray;\n\t\t\t\t\n\t\t\t\t// //Replace Security\n\t\t\t\t$replaceReq = $this->db->getResult ( \"Select * from tbl_replace_tempindex_req where indxx_id ='\" . $oldindxx ['id'] . \"'\", true );\n\n\t\t\t\t$replaceArray = array ();\n\t\t\t\tif (! empty ( $replaceReq )) \n\t\t\t\t{\n\t\t\t\t\tforeach ( $replaceReq as $k3 => $replacement ) \n\t\t\t\t\t{\n\t\t\t\t\t\t$replaceArray [$k3] = $replacement;\n\t\t\t\t\t\t\n\t\t\t\t\t\t$replaceSec = $this->db->getResult ( \"Select * from tbl_replace_tempsecurity where indxx_id ='\" . $replacement ['indxx_id'] . \"' and req_id='\" . $replacement ['id'] . \"'\", true );\n\t\t\t\t\t\t$replaceArray [$k3] ['selectedsecurity'] = $replaceSec;\n\t\t\t\t\t\t\n\t\t\t\t\t\t$replacedSec = $this->db->getResult ( \"Select * from tbl_tempsecurities_replaced where indxx_id ='\" . $replacement ['indxx_id'] . \"' and req_id='\" . $replacement ['id'] . \"'\", true );\n\t\t\t\t\t\t$replaceArray [$k3] ['replacedsecurity'] = $replacedSec;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t$finalArray [$k1] ['replacement'] = $replaceArray;\n\t\t\t\t\n\t\t\t\t$oldAssignedUsers = $this->db->getResult ( \"Select * from tbl_assign_index_temp where indxx_id ='\" . $oldindxx ['id'] . \"'\", true );\n\t\t\t\t$finalArray [$k1] ['oldUsers'] = $oldAssignedUsers;\n\t\t\t}\n\t\t}\n\t\t\n\t\tif (! empty ( $finalArray )) \n\t\t{\n\t\t\t$textdata = $this->arr_to_csv ( $finalArray );\n\t\t\t$csv = '';\n\n\t\t\tforeach ( $textdata as $text )\n\t\t\t\t$csv .= $text . \"\\n\";\n\n\t\t\t$output_folder = \"../files/output/ca-index-backup/\";\n\t\t\tif (!file_exists($output_folder))\n\t\t\t\tmkdir($output_folder, 0777, true);\n\t\t\t\n\t\t\t$file = $output_folder. \"backup-upcomming-\" . $datevalue . \".txt\";\n\t\t\t$open = fopen ( $file, \"w+\" );\n\t\t\t\n\t\t\tif ($open) \n\t\t\t{\n\t\t\t\tif (fwrite ( $open, $csv )) \n\t\t\t\t{\n\t\t\t\t\tfclose ( $open );\n\t\t\t\t\t$this->log_info(log_file, \"File written = \" .$file);\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$this->log_error(log_file, \"Unable to write file = \" .$file);\n\t\t\t\t\t$this->mail_exit(log_file, __FILE__, __LINE__);\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$this->log_error(log_file, \"Unable to open file = \" .$file);\n\t\t\t\t$this->mail_exit(log_file, __FILE__, __LINE__);\n\t\t\t}\n\t\t\t\t\n\t\t\t/* Push each upcoming index, with today as live date, into the live index table list */\n\t\t\tforeach ( $finalArray as $skey => $newIndxx ) \n\t\t\t{\n\t\t\t\t$newIndexArray = array ();\n\t\t\t\t\n\t\t\t\t$checkindex = $this->db->getResult ( \"Select * from tbl_indxx where code ='\" . $newIndxx ['code'] . \"'\" );\n\t\t\t\t\n\t\t\t\tif (! empty ( $checkindex ))\n\t\t\t\t{\n\t\t\t\t\t/* TODO: Check with Deepak how this scenario can occur? It should not be in live in list */\n\t\t\t\t\t/* AMIT: case with rebalancing */\n\t\t\t\t\t$newIndexArray ['indexdetails'] = $checkindex;\t\t\t\t\t\n\t\t\t\t\t$this->db->query ( \"delete from tbl_indxx where code ='\" . $newIndxx ['code'] . \"'\" );\n\t\t\t\t\t\n\t\t\t\t\t$checktickers = $this->db->getResult ( \"Select * from tbl_indxx_ticker where indxx_id ='\" . $checkindex ['id'] . \"'\", true );\n\t\t\t\t\t$newIndexArray ['indexdetails'] ['tickers'] = $checktickers;\n\t\t\t\t\t$this->db->query ( \"delete from tbl_indxx_ticker where indxx_id ='\" . $checkindex ['id'] . \"'\" );\n\t\t\t\t\t\n\t\t\t\t\t$checkindexvalue = $this->db->getResult ( \"Select * from tbl_indxx_value where indxx_id ='\" . $checkindex ['id'] . \"' order by date desc\", false, 1 );\n\t\t\t\t\t$newIndexArray ['indexdetails'] ['indexvalue'] = $checkindexvalue;\t\t\t\t\t\n\t\t\t\t\t$this->db->query ( \"delete from tbl_indxx_value where indxx_id ='\" . $checkindex ['id'] . \"' and date='\" . $checkindexvalue ['date'] . \"'\" );\n\t\t\t\t\t\n\t\t\t\t\t$checkprice = $this->db->getResult ( \"Select * from tbl_final_price where indxx_id ='\" . $checkindex ['id'] . \"' and date='\" . $checkindexvalue ['date'] . \"'\", true );\n\t\t\t\t\t$newIndexArray ['indexdetails'] ['price'] = $checkprice;\n\t\t\t\t\t$this->db->query ( \"delete from tbl_final_price where indxx_id ='\" . $checkindex ['id'] . \"' and date='\" . $checkindexvalue ['date'] . \"'\" );\n\t\t\t\t\t\n\t\t\t\t\t$checkshares = $this->db->getResult ( \"Select * from tbl_share where indxx_id ='\" . $checkindex ['id'] . \"'\", true );\n\t\t\t\t\t$newIndexArray ['indexdetails'] ['shares'] = $checkshares;\n\t\t\t\t\t$this->db->query ( \"delete from tbl_share where indxx_id ='\" . $checkindex ['id'] . \"'\" );\n\t\t\t\t\t\n\t\t\t\t\t$checkdelistReq = $this->db->getResult ( \"Select * from tbl_delist_runnindex_req where indxx_id ='\" . $checkindex ['id'] . \"'\", true );\n\t\t\t\t\t\n\t\t\t\t\t$checkdelistArray = array ();\n\t\t\t\t\tif (! empty ( $checkdelistReq )) \n\t\t\t\t\t{\n\t\t\t\t\t\tforeach ( $checkdelistReq as $kch => $checkdelisting ) \n\t\t\t\t\t\t{\t\n\t\t\t\t\t\t\t$checkdelistSec = $this->db->getResult ( \"Select * from tbl_delist_runnsecurity where indxx_id ='\" . $checkdelisting ['indxx_id'] . \"' and req_id='\" . $checkdelisting ['id'] . \"'\", true );\n\t\t\t\t\t\t\t$checkdelistArray [$kch] = $checkdelisting;\n\t\t\t\t\t\t\t$checkdelistArray [$kch] ['security'] = $checkdelistSec;\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t$this->db->query ( \"delete from tbl_delist_runnsecurity where indxx_id ='\" . $checkdelisting ['indxx_id'] . \"' and req_id='\" . $checkdelisting ['id'] . \"'\" );\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t$newIndexArray ['indexdetails'] ['delisting'] = $checkdelistArray;\n\t\t\t\t\t\n\t\t\t\t\t$this->db->query ( \"delete from tbl_delist_runnindex_req where indxx_id ='\" . $checkindex ['id'] . \"'\" );\n\t\t\t\t\t\n\t\t\t\t\t$checkreplaceReq = $this->db->getResult ( \"Select * from tbl_replace_runnindex_req where indxx_id ='\" . $checkindex ['id'] . \"'\", true );\n\t\t\t\t\t$checkreplaceArray = array ();\n\n\t\t\t\t\tif (! empty ( $checkreplaceReq )) \n\t\t\t\t\t{\n\t\t\t\t\t\tforeach ( $checkreplaceReq as $kchk => $checkreplacement ) \n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$checkreplaceSec = $this->db->getResult ( \"Select * from tbl_replace_runnsecurity where indxx_id ='\" . $checkreplacement ['indxx_id'] . \"' and req_id='\" . $checkreplacement ['id'] . \"'\", true );\n\t\t\t\t\t\t\t$checkreplaceArray [$kchk] = $checkreplacement;\n\t\t\t\t\t\t\t$checkreplaceArray [$kchk] ['selectedsecurity'] = $checkreplaceSec;\n\n\t\t\t\t\t\t\t$this->db->query ( \"delete from tbl_replace_runnsecurity where indxx_id ='\" . $checkreplacement ['indxx_id'] . \"' and req_id='\" . $checkreplacement ['id'] . \"'\" );\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t$checkreplacedSec = $this->db->getResult ( \"Select * from tbl_runnsecurities_replaced where indxx_id ='\" . $checkreplacement ['indxx_id'] . \"' and req_id='\" . $checkreplacement ['id'] . \"'\", true );\n\t\t\t\t\t\t\t$checkreplaceArray [$kchk] ['replacedsecurity'] = $checkreplacedSec;\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t$this->db->query ( \"delete from tbl_runnsecurities_replaced where indxx_id ='\" . $checkreplacement ['indxx_id'] . \"' and req_id='\" . $checkreplacement ['id'] . \"'\" );\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\t$newIndexArray ['indexdetails'] ['replacement'] = $checkreplaceArray;\n\t\t\t\t\t$this->db->query ( \"delete from tbl_replace_runnindex_req where indxx_id ='\" . $checkindex ['id'] . \"'\" );\n\t\t\t\t\t\n\t\t\t\t\t$checkusers = $this->db->getResult ( \"Select * from tbl_assign_index where indxx_id ='\" . $checkindex ['id'] . \"'\", true );\n\t\t\t\t\t$newIndexArray ['indexdetails'] ['users'] = $checkusers;\n\n\t\t\t\t\t$this->db->query ( \"delete from tbl_assign_index where indxx_id ='\" . $checkindex ['id'] . \"'\" );\n\t\t\t\t\t\n\t\t\t\t\tif (! empty ( $newIndexArray )) \n\t\t\t\t\t{\n\t\t\t\t\t\t$textdata = $this->arr_to_csv ( $newIndexArray );\n\t\t\t\t\t\t$csv = '';\n\n\t\t\t\t\t\tforeach ( $textdata as $text )\n\t\t\t\t\t\t\t$csv .= $text . \"\\n\";\n\n\t\t\t\t\t\t$file = $output_folder. \"backup-running-\" . $checkindex ['code'] . \"-\" . $datevalue . \".txt\";\n\t\t\t\t\t\t$open = fopen ( $file, \"w+\" );\n\t\t\t\t\t\t\n\t\t\t\t\t\tif ($open) \n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif (fwrite ( $open, $csv )) \n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tfclose ( $open );\n\t\t\t\t\t\t\t\t$this->info(\"File written for\" . $checkindex ['code']);\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->log_error(log_file, \"Unable to write file = \" .$file);\n\t\t\t\t\t\t\t\t$this->mail_exit(log_file, __FILE__, __LINE__);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$this->log_error(log_file, \"Unable to open file = \" .$file);\n\t\t\t\t\t\t\t$this->mail_exit(log_file, __FILE__, __LINE__);\n\t\t\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\t$insertIndexQuery = \"Insert into tbl_indxx set name='\" . mysql_real_escape_string ( $newIndxx ['name'] ) . \"',code='\" . mysql_real_escape_string ( $newIndxx ['code'] ) . \"',investmentammount='\" . mysql_real_escape_string ( $newIndxx ['investmentammount'] ) . \"',indexvalue='\" . mysql_real_escape_string ( $newIndxx ['indexvalue'] ) . \"',divisor='\" . ($newIndxx ['divisor']) . \"',type='\" . mysql_real_escape_string ( $newIndxx ['type'] ) . \"',cash_adjust='\" . mysql_real_escape_string ( $newIndxx ['cash_adjust'] ) . \"',curr='\" . mysql_real_escape_string ( $newIndxx ['curr'] ) . \"',status='\" . mysql_real_escape_string ( $newIndxx ['status'] ) . \"',dateAdded='\" . mysql_real_escape_string ( $newIndxx ['dateAdded'] ) . \"',lastupdated='\" . mysql_real_escape_string ( $newIndxx ['lastupdated'] ) . \"',dateStart='\" . mysql_real_escape_string ( $newIndxx ['dateStart'] ) . \"',usersignoff='\" . mysql_real_escape_string ( $newIndxx ['usersignoff'] ) . \"',dbusersignoff='\" . mysql_real_escape_string ( $newIndxx ['dbusersignoff'] ) . \"',submitted='\" . mysql_real_escape_string ( $newIndxx ['submitted'] ) . \"',finalsignoff='\" . mysql_real_escape_string ( $newIndxx ['finalsignoff'] ) . \"',runindex='\" . mysql_real_escape_string ( $newIndxx ['runindex'] ) . \"',addtype='\" . mysql_real_escape_string ( $newIndxx ['addtype'] ) . \"',zone='\" . mysql_real_escape_string ( $newIndxx ['zone'] ) . \"',client_id='\" . mysql_real_escape_string ( $newIndxx ['client_id'] ) . \"',display_currency='\" . mysql_real_escape_string ( $newIndxx ['display_currency'] ) . \"' ,ireturn='\" . mysql_real_escape_string ( $newIndxx ['ireturn'] ) . \"',div_type='\" . mysql_real_escape_string ( $newIndxx ['div_type'] ) . \"',currency_hedged='\" . mysql_real_escape_string ( $newIndxx ['currency_hedged'] ) . \"',priority='\" . mysql_real_escape_string ( $newIndxx ['priority'] ) . \"',divpvalue='\" . mysql_real_escape_string ( $newIndxx ['divpvalue'] ) . \"'\";\t\t\t\t\n\t\t\t\t$this->db->query ( $insertIndexQuery );\n\t\t\t\t\n\t\t\t\t$NewIndxxId = mysql_insert_id ();\n\n\t\t\t\t$this->db->query ( \"delete from tbl_indxx_temp where id='\" . $newIndxx ['id'] . \"'\" );\n\t\t\t\t\n\t\t\t\t$tickerTempArray = array ();\n\t\t\t\t\n\t\t\t\tif (! empty ( $newIndxx ['tickers'] )) \n\t\t\t\t{\n\t\t\t\t\tforeach ( $newIndxx ['tickers'] as $k4 => $newTickers ) \n\t\t\t\t\t{\n\t\t\t\t\t\t$insertTickerQuery = \"Insert into tbl_indxx_ticker set name='\" . mysql_real_escape_string ( $newTickers ['name'] ) . \"',isin='\" . mysql_real_escape_string ( $newTickers ['isin'] ) . \"',ticker='\" . mysql_real_escape_string ( $newTickers ['ticker'] ) . \"',weight='\" . mysql_real_escape_string ( $newTickers ['weight'] ) . \"',curr='\" . mysql_real_escape_string ( $newTickers ['curr'] ) . \"',divcurr='\" . mysql_real_escape_string ( $newTickers ['divcurr'] ) . \"',dateAdded='\" . mysql_real_escape_string ( $newTickers ['dateAdded'] ) . \"',status='\" . ($newTickers ['status']) . \"',sedol='\" . mysql_real_escape_string ( $newTickers ['sedol'] ) . \"',cusip='\" . mysql_real_escape_string ( $newTickers ['cusip'] ) . \"',countryname='\" . mysql_real_escape_string ( $newTickers ['countryname'] ) . \"', indxx_id='\" . $NewIndxxId . \"' \";\t\t\t\t\t\t\n\t\t\t\t\t\t$this->db->query ( $insertTickerQuery );\n\t\t\t\t\t\t\n\t\t\t\t\t\t$tickerTempArray [$newTickers ['id']] = mysql_insert_id ();\n\t\t\t\t\t\t\n\t\t\t\t\t\t$this->db->query ( \"delete from tbl_indxx_ticker_temp where indxx_id='\" . $newIndxx ['id'] . \"'\" );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif (! empty ( $newIndxx ['shares'] )) \n\t\t\t\t{\n\t\t\t\t\tforeach ( $newIndxx ['shares'] as $k4 => $newShares ) \n\t\t\t\t\t{\n\t\t\t\t\t\t$insertShareQuery = \"Insert into tbl_share set dateAdded='\" . $newShares ['dateAdded'] . \"',isin='\" . $newShares ['isin'] . \"',date='\" . $newShares ['date'] . \"',share='\" . $newShares ['share'] . \"', indxx_id='\" . $NewIndxxId . \"' \";\t\t\t\t\t\t\n\t\t\t\t\t\t$this->db->query ( $insertShareQuery );\n\t\t\t\t\t\t\n\t\t\t\t\t\t$this->db->query ( \"delete from tbl_share_temp where indxx_id='\" . $newIndxx ['id'] . \"'\" );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif (! empty ( $newIndxx ['oldUsers'] )) \n\t\t\t\t{\n\t\t\t\t\tforeach ( $newIndxx ['oldUsers'] as $k4 => $newUsers ) \n\t\t\t\t\t{\n\t\t\t\t\t\t$insertUserQuery = \"Insert into tbl_assign_index set dateAdded='\" . $newUsers ['dateAdded'] . \"',status='\" . $newUsers ['status'] . \"',user_id='\" . $newUsers ['user_id'] . \"',isAdmin='\" . $newUsers ['isAdmin'] . \"', indxx_id='\" . $NewIndxxId . \"' \";\t\t\t\t\t\t\n\t\t\t\t\t\t$this->db->query ( $insertUserQuery );\n\t\t\t\t\t\t\n\t\t\t\t\t\t$this->db->query ( \"delete from tbl_assign_index_temp where indxx_id='\" . $newIndxx ['id'] . \"'\" );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif (! empty ( $newIndxx ['prices'] )) \n\t\t\t\t{\n\t\t\t\t\tforeach ( $newIndxx ['prices'] as $k4 => $newPrices ) \n\t\t\t\t\t{\n\t\t\t\t\t\t$insertPriceQuery = \"Insert into tbl_final_price set dateAdded='\" . $newPrices ['dateAdded'] . \"',isin='\" . $newPrices ['isin'] . \"',date='\" . $newPrices ['date'] . \"',price='\" . $newPrices ['price'] . \"',currencyfactor='\" . $newPrices ['currencyfactor'] . \"', \tlocalprice='\" . $newPrices ['localprice'] . \"', indxx_id='\" . $NewIndxxId . \"' \";\t\t\t\t\t\t\n\t\t\t\t\t\t$this->db->query ( $insertPriceQuery );\n\t\t\t\t\t\t\n\t\t\t\t\t\t$this->db->query ( \"delete from tbl_final_price_temp where indxx_id='\" . $newIndxx ['id'] . \"' and date='\" . $newPrices ['date'] . \"'\" );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif (! empty ( $newIndxx ['oldindxxvalue'] )) {\n\t\t\t\t\t$insertOldindxxvalueQuery = \"Insert into tbl_indxx_value set dateAdded='\" . $newIndxx ['oldindxxvalue'] ['dateAdded'] . \"',market_value='\" . $newIndxx ['oldindxxvalue'] ['market_value'] . \"',indxx_value='\" . $newIndxx ['oldindxxvalue'] ['indxx_value'] . \"',date='\" . $newIndxx ['oldindxxvalue'] ['date'] . \"',olddivisor='\" . $newIndxx ['oldindxxvalue'] ['olddivisor'] . \"', \tnewdivisor='\" . $newIndxx ['oldindxxvalue'] ['newdivisor'] . \"', \tcode='\" . $newIndxx ['oldindxxvalue'] ['code'] . \"', indxx_id='\" . $NewIndxxId . \"' \";\n\t\t\t\t\t\n\t\t\t\t\t$this->db->query ( $insertOldindxxvalueQuery );\n\t\t\t\t\t\n\t\t\t\t\t$this->db->query ( \"delete from tbl_indxx_value_temp where indxx_id='\" . $newIndxx ['id'] . \"' and date='\" . $newIndxx ['oldindxxvalue'] ['date'] . \"'\" );\n\t\t\t\t}\n\t\t\t\t// //Delisting Insert to new\n\t\t\t\t\n\t\t\t\tif (! empty ( $newIndxx ['delisting'] )) {\n\t\t\t\t\tforeach ( $newIndxx ['delisting'] as $k5 => $newdelist ) {\n\t\t\t\t\t\t$insertDelistReqQuery = \"Insert into tbl_delist_runnindex_req set status='\" . $newdelist ['status'] . \"',dateAdded='\" . $newdelist ['dateAdded'] . \"',startdate='\" . $newdelist ['startdate'] . \"', \tadminapprove='\" . $newdelist ['adminapprove'] . \"',dbapprove='\" . $newdelist ['dbapprove'] . \"',user_id='\" . $newdelist ['user_id'] . \"', indxx_id='\" . $NewIndxxId . \"' \";\n\t\t\t\t\t\t\n\t\t\t\t\t\t$this->db->query ( $insertDelistReqQuery );\n\t\t\t\t\t\t$newdelistId = mysql_insert_id ();\n\t\t\t\t\t\t\n\t\t\t\t\t\tif (! empty ( $newdelist ['security'] )) {\n\t\t\t\t\t\t\tforeach ( $newdelist ['security'] as $newDelistSecurity ) {\n\t\t\t\t\t\t\t\t$insertDelistSecQuery = \"Insert into tbl_delist_runnsecurity set status='\" . $newDelistSecurity ['status'] . \"',dateAdded='\" . $newDelistSecurity ['dateAdded'] . \"',security_id='\" . $tickerTempArray [$newDelistSecurity ['security_id']] . \"',req_id='\" . $newdelistId . \"', indxx_id='\" . $NewIndxxId . \"' \";\n\t\t\t\t\t\t\t\t$this->db->query ( $insertDelistSecQuery );\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t$this->db->query ( \"delete from tbl_delist_tempsecurity where id='\" . $newDelistSecurity ['id'] . \"'\" );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\t$this->db->query ( \"delete from tbl_delist_tempindex_req where indxx_id='\" . $newIndxx ['id'] . \"' and id='\" . $newdelist ['id'] . \"'\" );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif (! empty ( $newIndxx ['replacement'] )) {\n\t\t\t\t\tforeach ( $newIndxx ['replacement'] as $k6 => $newReplace ) {\n\t\t\t\t\t\t$insertReplaceReqQuery = \"Insert into tbl_replace_runnindex_req set status='\" . $newReplace ['status'] . \"',dateAdded='\" . $newReplace ['dateAdded'] . \"',startdate='\" . $newReplace ['startdate'] . \"', \tadminapprove='\" . $newReplace ['adminapprove'] . \"',dbapprove='\" . $newReplace ['dbapprove'] . \"',user_id='\" . $newReplace ['user_id'] . \"', indxx_id='\" . $NewIndxxId . \"' \";\n\t\t\t\t\t\t\n\t\t\t\t\t\t$this->db->query ( $insertReplaceReqQuery );\n\t\t\t\t\t\t$newReplaceId = mysql_insert_id ();\n\t\t\t\t\t\tif (! empty ( $newReplace ['selectedsecurity'] )) {\n\t\t\t\t\t\t\tforeach ( $newReplace ['selectedsecurity'] as $newReplaceSecurity ) {\n\t\t\t\t\t\t\t\t$insertReplaceSecQuery = \"Insert into tbl_replace_runnsecurity set status='\" . $newReplaceSecurity ['status'] . \"',dateAdded='\" . $newReplaceSecurity ['dateAdded'] . \"',security_id='\" . $tickerTempArray [$newReplaceSecurity ['security_id']] . \"',req_id='\" . $newReplaceId . \"', indxx_id='\" . $NewIndxxId . \"' \";\n\t\t\t\t\t\t\t\t$this->db->query ( $insertReplaceSecQuery );\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t$this->db->query ( \"delete from tbl_replace_tempsecurity where id='\" . $newReplaceSecurity ['id'] . \"'\" );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\tif (! empty ( $newReplace ['replacedsecurity'] )) {\n\t\t\t\t\t\t\tforeach ( $newReplace ['replacedsecurity'] as $newReplacedSecurity ) {\n\t\t\t\t\t\t\t\t$insertReplacedQuery = \"Insert into tbl_runnsecurities_replaced set status='\" . $newReplaceSecurity ['status'] . \"',dateAdded='\" . $newReplaceSecurity ['dateAdded'] . \"',name='\" . mysql_real_escape_string ( $newReplacedSecurity ['name'] ) . \"',isin='\" . mysql_real_escape_string ( $newReplacedSecurity ['isin'] ) . \"',ticker='\" . mysql_real_escape_string ( $newReplacedSecurity ['ticker'] ) . \"',weight='\" . mysql_real_escape_string ( $newReplacedSecurity ['weight'] ) . \"',curr='\" . mysql_real_escape_string ( $newReplacedSecurity ['curr'] ) . \"',divcurr='\" . mysql_real_escape_string ( $newReplacedSecurity ['divcurr'] ) . \"',sedol='\" . mysql_real_escape_string ( $newReplacedSecurity ['sedol'] ) . \"',cusip='\" . mysql_real_escape_string ( $newReplacedSecurity ['cusip'] ) . \"',countryname='\" . mysql_real_escape_string ( $newReplacedSecurity ['countryname'] ) . \"',req_id='\" . $newReplaceId . \"', indxx_id='\" . $NewIndxxId . \"' \";\n\t\t\t\t\t\t\t\t$this->db->query ( $insertReplacedQuery );\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t$this->db->query ( \"delete from tbl_tempsecurities_replaced where id='\" . $newReplacedSecurity ['id'] . \"'\" );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\t$this->db->query ( \"delete from tbl_replace_tempindex_req where indxx_id='\" . $newIndxx ['id'] . \"' and id='\" . $newReplace ['id'] . \"'\" );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\t$this->log_info(log_file, \"CA replaceindex process finished\");\n\t\t\n\t\t//$this->saveProcess ( 1 );\n\t\t$this->Redirect(\"index.php?module=replacecash&DEBUG=\" .DEBUG. \"&date=\" .$datevalue. \"&log_file=\" . basename(log_file), \"\", \"\" );\n\t}", "function isIndexed() ;", "abstract protected function getIndex();", "public function takeIndex()\n\t\t{\n\t\t\t$this->csv->takeIndexCSV();\n\t\t\t$this->txt->takeIndexTXT();\n\t\t}", "final public function index($index)\n {\n return $this->onPrepareReturn(Base\\Arrs::index($index,$this->arr()));\n }", "public function flush($indexName)\n {\n }", "protected function getIndex()\n\t{ \n /*\n $sm = $this->account->getServiceManager();\n $dbh = $sm->get(\"Db\");\n $this->dbh = $dbh;\n\t\treturn new \\Netric\\EntityQuery\\Index\\Pgsql($this->account, $dbh);\n * \n */\n $this->dbh = $this->account->getServiceManager()->get(\"Db\");\n return new \\Netric\\EntityQuery\\Index\\Pgsql($this->account);\n\t}", "private function _getOptimizedQuery($query)\n {\n $currentOptimizer = $this->getCurrentOptimizer();\n $currentOptimizer->setCanUseCachedFilter(false);\n return $currentOptimizer->applyOptimizer($query);\n }", "public function query($indexField = null) {\n $queryId = $this->getQueryId($indexField);\n\n $result = null;\n\n if ($this->willCacheResult) {\n $resultId = $this->getResultId($queryId);\n\n $cachedResult = $this->cache->getResult($resultId);\n if ($cachedResult) {\n $result = $cachedResult->getResult();\n $belongsTo = $cachedResult->getBelongsToFields();\n $has = $cachedResult->getHasFields();\n }\n }\n\n if (!$result) {\n $connection = $this->model->getMeta()->getConnection();\n\n $cachedQuery = $this->cache->getQuery($queryId);\n if (!$cachedQuery) {\n $statement = self::$queryParser->parseQuery($this);\n\n $statementParser = $connection->getStatementParser();\n\n $sql = $statementParser->parseStatement($statement);\n $belongsTo = self::$queryParser->getRecursiveBelongsToFields();\n $has = self::$queryParser->getRecursiveHasFields();\n $usedModels = $this->getUsedModels($statement);\n\n $cachedQuery = new QueryCacheObject($sql, $usedModels, $belongsTo, $has);\n\n $this->cache->setQuery($queryId, $cachedQuery);\n } else {\n $sql = $cachedQuery->getSql();\n $belongsTo = $cachedQuery->getBelongsToFields();\n $has = $cachedQuery->getHasFields();\n $usedModels = $cachedQuery->getUsedModels();\n }\n\n $sql = $this->parseVariablesIntoSql($sql, $connection);\n\n $result = $connection->execute($sql);\n\n if ($this->willCacheResult) {\n $cachedResult = new ResultCacheObject($result, $belongsTo, $has);\n\n $this->cache->setResult($resultId, $cachedResult, $usedModels);\n }\n }\n\n $result = $this->parseResult($result, $belongsTo, $has, $indexField);\n\n return $result;\n }", "protected function flushIndex()\n {\n $this->canIndex();\n /**\n * Set indexer to use mview \n */\n $this->indexer->setScheduled(true);\n\n $writeAdapter = $this->resourceConnection->getConnection('core_write');\n\n /**\n * Flush all old data \n */\n $indexTable = $this->resourceConnection->getTableName('bazaarvoice_index_product');\n $writeAdapter->truncateTable($indexTable);\n $changelogTable = $this->resourceConnection->getTableName('bazaarvoice_product_cl');\n $writeAdapter->truncateTable($changelogTable);\n\n /**\n * Setup dummy rows \n */\n $productTable = $this->resourceConnection->getTableName('catalog_product_entity');\n $writeAdapter->query(\"INSERT INTO `$indexTable` (`product_id`, `version_id`) SELECT DISTINCT `entity_id`, '0' FROM `$productTable`;\");\n $writeAdapter->query(\"INSERT INTO `$changelogTable` (`entity_id`) SELECT DISTINCT `entity_id` FROM `$productTable`;\");\n\n /**\n * Reset mview version \n */\n $mviewTable = $this->resourceConnection->getTableName('mview_state');\n $writeAdapter->query(\"UPDATE `$mviewTable` SET `version_id` = NULL, `status` = 'idle' WHERE `view_id` = 'bazaarvoice_product';\");\n $indexCheck = $writeAdapter\n ->query(\n \"SELECT COUNT(1) indexIsThere FROM INFORMATION_SCHEMA.STATISTICS\n WHERE table_schema=DATABASE() AND table_name='$changelogTable' AND index_name='entity_id';\"\n );\n $indexCheck = $indexCheck->fetchObject();\n if ($indexCheck->indexIsThere == 0) {\n $writeAdapter->query(\"ALTER TABLE `$changelogTable` ADD INDEX (`entity_id`);\");\n }\n }", "public function rebuildIndex()\n {\n $this->elastic->deleteIndex(self::INDEX);\n $this->elastic->addIndexCompanion(self::INDEX);\n }", "public function indexBy($index) {\n $this->indexBy = $index;\n return $this;\n }", "function drop_index($idxName) {\n global $wpdb;\n if ($wpdb->get_var('SELECT count(*) FROM information_schema.statistics '.\n \"WHERE table_name='\".$this->plugin->database['table'].\"' \" .\n \"AND index_name='{$idxName}'\" ) > 0) {\n $wpdb->query(\"DROP INDEX {$idxName} ON \" . $this->plugin->database['table']);\n }\n }", "public function hook_query_index(&$query) {\n\t\t\t//Your code here\n\t\t\t// pr($query->toSql(),1);\t\t\t\n\t\t\tif(CRUDBooster::isSuperAdmin()){\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\t$user = getUser();\n\t\t\t$my_company = $this->my_company;\n\t\t\tif($user->company != $my_company){\n\t\t\t\treturn $query->where('supplier',$user->company);\n\t\t\t} else {\n\t\t\t\treturn $query->where('status','!=','draft');\n\t\t\t}\n\n\t }", "public function index(IndexableEntity $entity);", "public function prepareDataForIndex(OnlineShop_Framework_ProductInterfaces_IIndexable $object) {\n $subObjectIds = $this->tenantConfig->createSubIdsForObject($object);\n\n foreach($subObjectIds as $subObjectId => $object) {\n /**\n * @var OnlineShop_Framework_ProductInterfaces_IIndexable $object\n */\n if($object->getOSDoIndexProduct() && $this->tenantConfig->inIndex($object)) {\n $a = Pimcore::inAdmin();\n $b = \\Pimcore\\Model\\Object\\AbstractObject::doGetInheritedValues();\n Pimcore::unsetAdminMode();\n \\Pimcore\\Model\\Object\\AbstractObject::setGetInheritedValues(true);\n $hidePublishedMemory = \\Pimcore\\Model\\Object\\AbstractObject::doHideUnpublished();\n \\Pimcore\\Model\\Object\\AbstractObject::setHideUnpublished(false);\n $categories = $object->getCategories();\n $categoryIds = array();\n $parentCategoryIds = array();\n if($categories) {\n foreach($categories as $c) {\n $parent = $c;\n\n if ($parent != null) {\n if($parent->getOSProductsInParentCategoryVisible()) {\n while($parent && $parent instanceof OnlineShop_Framework_AbstractCategory) {\n $parentCategoryIds[$parent->getId()] = $parent->getId();\n $parent = $parent->getParent();\n }\n } else {\n $parentCategoryIds[$parent->getId()] = $parent->getId();\n }\n\n $categoryIds[$c->getId()] = $c->getId();\n }\n }\n }\n\n ksort($categoryIds);\n\n $virtualProductId = $subObjectId;\n $virtualProductActive = $object->isActive();\n if($object->getOSIndexType() == \"variant\") {\n $virtualProductId = $this->tenantConfig->createVirtualParentIdForSubId($object, $subObjectId);\n }\n\n $virtualProduct = \\Pimcore\\Model\\Object\\AbstractObject::getById($virtualProductId);\n if($virtualProduct && method_exists($virtualProduct, \"isActive\")) {\n $virtualProductActive = $virtualProduct->isActive();\n }\n\n $data = array(\n \"o_id\" => $subObjectId,\n \"o_classId\" => $object->getClassId(),\n \"o_virtualProductId\" => $virtualProductId,\n \"o_virtualProductActive\" => $virtualProductActive,\n \"o_parentId\" => $object->getOSParentId(),\n \"o_type\" => $object->getOSIndexType(),\n \"categoryIds\" => ',' . implode(\",\", $categoryIds) . \",\",\n \"parentCategoryIds\" => ',' . implode(\",\", $parentCategoryIds) . \",\",\n \"priceSystemName\" => $object->getPriceSystemName(),\n \"active\" => $object->isActive(),\n \"inProductList\" => $object->isActive(true)\n );\n\n $relationData = array();\n\n $columnConfig = $this->columnConfig->column;\n if(!empty($columnConfig->name)) {\n $columnConfig = array($columnConfig);\n }\n else if(empty($columnConfig))\n {\n $columnConfig = array();\n }\n foreach($columnConfig as $column) {\n try {\n //$data[$column->name] = null;\n $value = null;\n if(!empty($column->getter)) {\n $getter = $column->getter;\n $value = $getter::get($object, $column->config, $subObjectId, $this->tenantConfig);\n } else {\n if(!empty($column->fieldname)) {\n $getter = \"get\" . ucfirst($column->fieldname);\n } else {\n $getter = \"get\" . ucfirst($column->name);\n }\n\n if(method_exists($object, $getter)) {\n $value = $object->$getter($column->locale);\n }\n }\n\n if(!empty($column->interpreter)) {\n $interpreter = $column->interpreter;\n $value = $interpreter::interpret($value, $column->config);\n $interpreterObject = new $interpreter();\n if($interpreterObject instanceof OnlineShop_Framework_IndexService_RelationInterpreter) {\n foreach($value as $v) {\n $relData = array();\n $relData['src'] = $subObjectId;\n $relData['src_virtualProductId'] = $virtualProductId;\n $relData['dest'] = $v['dest'];\n $relData['fieldname'] = $column->name;\n $relData['type'] = $v['type'];\n $relationData[] = $relData;\n }\n } else {\n $data[$column->name] = $value;\n }\n } else {\n $data[$column->name] = $value;\n }\n\n if(is_array($data[$column->name])) {\n $data[$column->name] = OnlineShop_Framework_IndexService_Tenant_IWorker::MULTISELECT_DELIMITER . implode($data[$column->name], OnlineShop_Framework_IndexService_Tenant_IWorker::MULTISELECT_DELIMITER) . OnlineShop_Framework_IndexService_Tenant_IWorker::MULTISELECT_DELIMITER;\n }\n\n } catch(Exception $e) {\n Logger::err(\"Exception in IndexService: \" . $e->getMessage(), $e);\n }\n\n }\n if($a) {\n Pimcore::setAdminMode();\n }\n \\Pimcore\\Model\\Object\\AbstractObject::setGetInheritedValues($b);\n \\Pimcore\\Model\\Object\\AbstractObject::setHideUnpublished($hidePublishedMemory);\n\n\n $subTenantData = $this->tenantConfig->prepareSubTenantEntries($object, $subObjectId);\n $jsonData = json_encode(array(\n \"data\" => $data,\n \"relations\" => ($relationData ? $relationData : []),\n \"subtenants\" => ($subTenantData ? $subTenantData : [])\n ));\n\n $crc = crc32($jsonData);\n $insertData = array(\n \"id\" => $subObjectId,\n \"tenant\" => $this->name,\n \"data\" => $jsonData,\n \"crc_current\" => $crc,\n \"preparation_worker_timestamp\" => 0,\n \"preparation_worker_id\" => $this->db->quote(null),\n \"in_preparation_queue\" => 0\n );\n\n $currentEntry = $this->db->fetchRow(\"SELECT crc_current, in_preparation_queue FROM \" . $this->getStoreTableName() . \" WHERE id = ? AND tenant = ?\", array($subObjectId, $this->name));\n if(!$currentEntry) {\n $this->db->insert($this->getStoreTableName(), $insertData);\n } else if($currentEntry['crc_current'] != $crc) {\n $this->db->update($this->getStoreTableName(), $insertData, \"id = \" . $this->db->quote((string)$subObjectId) . \" AND tenant = \" . $this->db->quote($this->name));\n } else if($currentEntry['in_preparation_queue']) {\n $this->db->query(\"UPDATE \" . $this->getStoreTableName() . \" SET in_preparation_queue = 0, preparation_worker_timestamp = 0, preparation_worker_id = null WHERE id = ? AND tenant = ?\", array($subObjectId, $this->name));\n }\n\n } else {\n Logger::info(\"Don't adding product \" . $subObjectId . \" to index \" . $this->name . \".\");\n $this->doDeleteFromIndex($subObjectId);\n }\n }\n\n //cleans up all old zombie data\n $this->doCleanupOldZombieData($object, $subObjectIds);\n\n }", "function isIndexable()\n {\n return true;\n }", "abstract public function createQueryBuilder($alias, $indexBy = null);", "public static function indexQuery(NovaRequest $request, $query)\n {\n $query->with('percapita', function($query) use ($request) {\n PerCapita::buildIndexQuery($request, $query);\n });\n }", "public function index_put(){\n\t\t\n\t\t}", "public function checkForIndex( $index, $table );", "public function explain(): QueryBuilderInterface\n\t{\n\t\t$this->explain = TRUE;\n\t\treturn $this;\n\t}", "function optimizeDatabase() {}", "function isIndexable()\n {\n return true;\n }", "function indexInfo( $table, $index, $fname = __METHOD__ );", "public function getFromContext(Index $index): IndexScope;", "function get_table_indexes($db, $table, $cnx='', $reload=false, $mode='mysql'){\n\tif($mode!=='mysql') exit('only mysql index mode developed');\n\tglobal $get_table_indexes, $dbTypeArray;\n\tif(!$cnx)$cnx=C_MASTER;\n\tif($get_table_indexes[$db][$table] && !$reload){\n\t\treturn $get_table_indexes[$db][$table];\n\t}else{\n\t\t$fl=__FILE__;\n\t\t$ln=__LINE__+1;\n\t\tob_start();\n\t\t$result=q(\"SHOW INDEXES FROM `$db`.`$table`\", $cnx, ERR_ECHO, O_DO_NOT_REMEDIATE);\n\t\t$err=ob_get_contents();\n\t\tob_end_clean();\n\t\tif($err)return false;\n\t\t\n\t\t$typeFlip = array_flip($dbTypeArray);\n\t\t$inCompound=false;\n\t\twhile($v=mysqli_fetch_array($result,MYSQLI_ASSOC)){\n\t\t\t$w++;\n\t\t\t@extract($v);\n\t\t\tif($buffer==$Key_name){\n\t\t\t\t//duplicate part of a key\n\t\t\t\tif(!$inCompound){\n\t\t\t\t\t$multiIdx[$Key_name][]=$singleIdx[count($singleIdx)-1];\n\t\t\t\t\tunset($singleIdx[count($singleIdx)-1]);\n\t\t\t\t\t//next two lines overcome \"bug\" in php: just cause I unset the highest element, this will not reset the next index assigned when I say $singleIdx[]=.. later on.\n\t\t\t\t\t$clr=$singleIdx;\n\t\t\t\t\t$singleIdx=$clr;\n\t\t\t\t}\n\t\t\t\t$multiIdx[$Key_name][]=$v;\n\t\t\t\t$inCompound=true;\n\t\t\t}else{\n\t\t\t\t$singleIdx[]=$v;\n\t\t\t\t$buffer=$Key_name;\n\t\t\t\t$inCompound=false;\n\t\t\t}\n\t\t}\n\t\t//set $singleIdx as assoc for reference\n\t\tif(count($singleIdx)){\n\t\t\tforeach($singleIdx as $v) $a[strtolower($v['Column_name'])]=$v;\n\t\t\t$singleIdx=$a;\n\t\t}\n\t\t//store compound keys as XML\n\t\tif($multiIdx){\n\t\t\t$compoundKey='';\n\t\t\tforeach($multiIdx as $n=>$v){\n\t\t\t\t$ci.='<compoundKey Key_name=\"'.$n.'\" Column_count=\"'.count($v).'\"';\n\t\t\t\t$i=0;\n\t\t\t\tforeach($v as $w){\n\t\t\t\t\t$i++;\n\t\t\t\t\tif($i==1)$ci.=' Non_unique=\"'.$w['Non_unique'].'\">'.\"\\n\";\n\t\t\t\t\t$ci.='<keyColumn Seq_in_index=\"'.$w['Seq_in_index'].'\" Column_name=\"'.$w['Column_name'].'\" Sub_part=\"'.$w['Sub_part'].'\" Comment=\"'.htmlentities($w['Comment']).'\">'.\"\\n\";\n\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t$ci.='</compoundKey>';\n\t\t\t}\n\t\t}\n\t\t$get_table_indexes[$db][$table]=array('singleIdx'=>$singleIdx, 'multiIdx'=>$multiIdx, 'compoundXML'=>$ci);\n\t\treturn $get_table_indexes[$db][$table];\n\t}\n}", "public function indexes($table, $like = '') {\n\t\t$builder = DB_SQL::select($this->data_source)\n\t\t\t->column('t1.NAME', 'schema')\n\t\t\t->column('t0.NAME', 'table')\n\t\t\t->column('t2.NAME', 'index')\n\t\t\t->column('t4.NAME', 'column')\n\t\t\t->column('t3.KEY_ORDINAL', 'seq_index')\n\t\t\t->column('t2.IS_PRIMARY_KEY', 'primary')\n\t\t\t->column('t2.IS_UNIQUE', 'unique')\n\t\t\t->from('SYS.TABLES', 't0')\n\t\t\t->join(DB_SQL_JoinType::_LEFT_, 'SYS.SCHEMAS', 't1')\n\t\t\t->on('t1.SCHEMA_ID', DB_SQL_Operator::_EQUAL_TO_, 't0.SCHEMA_ID')\n\t\t\t->join(DB_SQL_JoinType::_LEFT_, 'SYS.INDEXES', 't2')\n\t\t\t->on('t2.OBJECT_ID', DB_SQL_Operator::_EQUAL_TO_, 't0.OBJECT_ID')\n\t\t\t->join(DB_SQL_JoinType::_LEFT_, 'SYS.INDEX_COLUMNS', 't3')\n\t\t\t->on('t3.OBJECT_ID', DB_SQL_Operator::_EQUAL_TO_, 't0.OBJECT_ID')\n\t\t\t->on('t3.INDEX_ID', DB_SQL_Operator::_EQUAL_TO_, 't2.INDEX_ID')\n\t\t\t->join(DB_SQL_JoinType::_LEFT_, 'SYS.COLUMNS', 't4')\n\t\t\t->on('t4.OBJECT_ID', DB_SQL_Operator::_EQUAL_TO_, 't0.OBJECT_ID')\n\t\t\t->on('t4.COLUMN_ID', DB_SQL_Operator::_EQUAL_TO_, 't3.COLUMN_ID')\n\t\t\t->where('t0.NAME', DB_SQL_Operator::_EQUAL_TO_, $table)\n\t\t\t->where('t2.IS_DISABLED', DB_SQL_Operator::_EQUAL_TO_, 0)\n\t\t\t->order_by(DB_SQL::expr('UPPER([t1].[NAME])'))\n\t\t\t->order_by(DB_SQL::expr('UPPER([t0].[NAME])'))\n\t\t\t->order_by(DB_SQL::expr('UPPER([t2].[NAME])'))\n\t\t\t->order_by('t3.KEY_ORDINAL');\n\n\t\tif ( ! empty($like)) {\n\t\t\t$builder->where('t2.NAME', DB_SQL_Operator::_LIKE_, $like);\n\t\t}\n\n\t\treturn $builder->query();\n\t}", "public function get($index)\n {\n \n }", "function isIndexable()\r\n {\r\n return true;\r\n }", "function add_index($index, $table, $column) {\n global $langIndexAdded, $langIndexExists, $langToTable;\n\n $num_of_args = func_num_args();\n if ($num_of_args <= 3) {\n $ind_sql = Database::get()->queryArray(\"SHOW INDEX FROM $table\");\n foreach ($ind_sql as $i) {\n if ($i->Key_name == $index) {\n $retString = \"<p>$langIndexExists $table</p>\";\n return $retString;\n }\n }\n Database::get()->query(\"ALTER TABLE $table ADD INDEX `$index` ($column)\");\n } else {\n $arguments = func_get_args();\n // cut the first and second argument\n array_shift($arguments);\n array_shift($arguments);\n $st = '';\n for ($j = 0; $j < count($arguments); $j++) {\n $st .= $arguments[$j] . ',';\n }\n $ind_sql = Database::get()->queryArray(\"SHOW INDEXES FROM `$table`\");\n foreach ($ind_sql as $i) {\n if ($i->Key_name == $index) {\n $retString = \"<p>$langIndexExists $table</p>\";\n return $retString;\n }\n }\n $sql = \"ALTER TABLE $table ADD INDEX `$index` ($st)\";\n $sql = str_replace(',)', ')', $sql);\n Database::get()->query($sql);\n }\n $retString = \"<p>$langIndexAdded $langToTable $table</p>\";\n return $retString;\n}", "public function hint($index)\n {\n $this->hint = $index;\n\n return $this;\n }", "public function getIndexerOptionsByIndex(tx_mksearch_model_internal_Index $index)\n {\n $fields = [\n 'CMP.hidden' => [OP_EQ_INT => 0],\n 'INDX.hidden' => [OP_EQ_INT => 0],\n 'INDX.uid' => [OP_EQ_INT => $index->uid],\n ];\n $options = [\n 'orderby' => [\n 'INDXCMPMM.sorting' => 'ASC',\n ],\n ];\n $tmpCfg = $this->search($fields, $options);\n foreach ($tmpCfg as $oModel) {\n $sTs .= \"{\\n\".$oModel->record['configuration'].\"\\n}\";\n }\n\n return tx_mksearch_util_Misc::parseTsConfig($sTs);\n }", "function getElasticSearchIndexes() {\n\n return 'pdb'.',' . 'geo'.',' . 'dbgap' .','. 'lincs' .','. 'arrayexpress'.','. 'gemma'.',' . 'sra'.','.'bioproject' .','.'clinicaltrials'.',' . 'dryad' .','\n .'cvrg'.','.'dataverse' .','.'neuromorpho'.','.'peptideatlas'.','.'ctn'.','.'cia'.','.'mpd'.','.'niddkcr'.','.'physiobank'.','.'proteomexchange'.','.'openfmri'.','.'nursadatasets'.','\n .'yped'.','.'cil'.','.'icpsr'.','.'gdc'.','.'bmrb'.','.'swissprot'.','.'clinvar'.','.'retina'.','.'emdb'.','.'epigenomics'.','.'nitrcir'.','.'neurovaultatlases'.','.'neurovaultcols'.','\n .'neurovaultnidm'.','.'rgd'.','.'datacitebgi'.','.'datacitemorphobank'.','.'vectorbase'.','.'datacitegnd'.','.'datacitepeerj'.','.'datacitezenodo'.','.'omicsdi'.','.'datacitesbgrid'\n .','.'simtk'.','.'datacitecxidb'.','.'datacitebils'.','.'dataciteada'.','.'dataciteukda'.','.'dataciteadaptive'.','.'datacitemit'.','.'datacitectsi'.','.'datacitefdz'\n .','.'datacitembf'.','.'datacitenimh'.','.'datacitejhu'.','.'datacitecandi'.','.'datacitelshtm'.','.'datacitedatabrary'.','.'immport'.','.'datacitesdscsg'.','.'datacitecrcns'\n .','.'nsrr'.','.'lsdb'.','.'naturedata'.','.'genenetwork'.','.'ndarpapers'.','.'datacitethieme'.','.'datacitefigshare'.','.'dataciteccdc'.','.'wormbase'.','.'gtexldacc'.','.'metabolomics';\n\n}", "public function updateIndex()\n\t{\n\t\t$params = $this->getBasicEsParams();\n\t\t// By default all writes to index will be synchronous\n\t\t$params['custom'] = ['refresh' => true];\n\n\t\t// Get our document body data.\n\t\t$params['body']['doc'] = $this->getIndexDocumentData();\n\n\t\treturn $this->getElasticSearchClient()->update($params);\n\t}", "public function incrementSubQueryIndex(): void\n {\n $this->subQueryIndex++;\n }", "public function optimise()\n {\n /* @var $database DDatabase */\n $database = $this->adaptee;\n // Determine which tables will be optimised.\n $tablesToOptimise = $this->getTablesToOptimise();\n // Optimse tables.\n if (count($tablesToOptimise) > 0) {\n $optimiseSql = 'OPTIMIZE TABLE `' . implode('`, `', $tablesToOptimise) . '`;';\n $optimiseQuery = new DQuery($optimiseSql, array(), $database);\n $success = $optimiseQuery->isSuccessful();\n } else {\n $success = true;\n }\n\n return $success;\n }", "function get_index_params()\n {\n return array();\n }", "protected function applyTransformation() {\n // no transformation for index\n }", "public function hook_before_index(&$result) {\n \n }", "protected function _reindexUpdatedProducts()\r\n {\r\n $entityIds = $this->_getProcessedProductIds();\r\n if(empty($entityIds)) {\r\n return $this;\r\n }\r\n\t\r\n $event = Mage::getModel('index/event');\r\n $event->setNewData(array(\r\n 'reindex_price_product_ids' => $entityIds, // for product_indexer_price\r\n 'reindex_stock_product_ids' => $entityIds, // for indexer_stock\r\n 'product_ids' => $entityIds, // for category_indexer_product\r\n 'reindex_eav_product_ids' => $entityIds // for product_indexer_eav\r\n ));\r\n $this->setLogForPartialIndexer('partial indexer started to update website date');\r\n Mage::getModel('partialindex/website')->updateWebsiteDate();\r\n $this->setLogForPartialIndexer('partial indexer ended to update website date');\r\n // Index our product entities.\r\n $this->setLogForPartialIndexer('partial indexer started the stock indexer');\r\n Mage::dispatchEvent('partialindex_reindex_products_before_indexer_stock', array('entity_id' => $entityIds));\r\n Mage::getResourceSingleton('cataloginventory/indexer_stock')->catalogProductMassAction($event);\r\n $this->setLogForPartialIndexer('partial indexer ended the stock indexer');\r\n \r\n if((int)Mage::getStoreConfig('progos_partialindex/index/priceindexer')) {\r\n $this->setLogForPartialIndexer('partial indexer started the price indexer');\r\n Mage::dispatchEvent('partialindex_reindex_products_before_product_indexer_price', array('entity_id' => $entityIds));\r\n Mage::getResourceSingleton('catalog/product_indexer_price')->catalogProductMassAction($event);\r\n $this->setLogForPartialIndexer('partial indexer ended the price indexer');\r\n }\r\n $this->setLogForPartialIndexer('partial indexer started the category indexer');\r\n Mage::dispatchEvent('partialindex_reindex_products_before_category_indexer_product', array('entity_id' => $entityIds));\r\n Mage::getResourceSingleton('catalog/category_indexer_product')->catalogProductMassAction($event);\r\n $this->setLogForPartialIndexer('partial indexer ended the category indexer');\r\n \r\n $this->setLogForPartialIndexer('partial indexer started the eav indexer');\r\n Mage::dispatchEvent('partialindex_reindex_products_before_product_indexer_eav', array('entity_id' => $entityIds));\r\n Mage::getResourceSingleton('catalog/product_indexer_eav')->catalogProductMassAction($event);\r\n $this->setLogForPartialIndexer('partial indexer ended the eav indexer');\r\n \r\n $this->setLogForPartialIndexer('partial indexer started the fulltetx indexer');\r\n Mage::dispatchEvent('partialindex_reindex_products_before_fulltext', array('entity_id' => &$entityIds));\r\n Mage::getResourceSingleton('catalogsearch/fulltext')->rebuildIndex(null, $entityIds);\r\n $this->setLogForPartialIndexer('partial indexer ended the fulltetx indexer');\r\n \r\n $this->setLogForPartialIndexer('partial indexer started the url rewrite indexer');\r\n Mage::dispatchEvent('partialindex_reindex_products_before_urlrewrite', array('entity_id' => $entityIds));\r\n /* @var $urlModel Mage_Catalog_Model_Url */\r\n $urlModel = Mage::getSingleton('catalog/url');\r\n\r\n $urlModel->clearStoreInvalidRewrites(); // Maybe some products were moved or removed from website\r\n foreach ($entityIds as $productId) {\r\n $urlModel->refreshProductRewrite($productId);\r\n }\r\n $this->setLogForPartialIndexer('partial indexer ended the url rewrite indexer');\r\n \r\n\r\n if((bool)Mage::getStoreConfig('progos_partialindex/index/enableProductFlatIndexer')) {\r\n $this->setLogForPartialIndexer('partial indexer started the flat indexer');\r\n Mage::dispatchEvent('partialindex_reindex_products_before_flat', array('entity_id' => $entityIds));\r\n Mage::getSingleton('catalog/product_flat_indexer')->saveProduct($entityIds);\r\n $this->setLogForPartialIndexer('partial indexer ended the flat indexer');\r\n }\r\n \r\n $this->clearCache($entityIds);\r\n \r\n Mage::dispatchEvent('partialindex_reindex_products_after', array('entity_id' => $entityIds));\r\n $this->setLogForPartialIndexer('partial indexer ended the update process table');\r\n return $this;\r\n }", "public function hook_query_index(&$query) {\n/*\t //Your code here\n $userId = CRUDBooster::myId();\n//\t echo $userId;\n\t $isAdmin = CRUDBooster::isSuperadmin();\n\t $storeAssignedtoUser = DB::table('srv_centers')\n ->where('cms_user_id', '=', $userId)\n ->first();\n\t if ($isAdmin) {\n\n\t }else {\n\t $query->where('cms_users.id',$storeAssignedtoUser->cms_user_id);\n\t }\n*/\n\t }", "function LooseSearch($indexedbyid=false){\n\t\treturn $this->Search($indexedbyid,true);\n\t}", "public function reindex();", "function updateIndex($index) {\n if (!is_string($index)) throw new IllegalTypeException('Illegal type of parameter $index: '.getType($index));\n if (!strLen($index)) throw new InvalidArgumentException('Invalid parameter $index: \"\"');\n\n global $verbose, $indexes, $saveRawXTradeData;\n\n // (1) Starttag der benoetigten Daten ermitteln\n $startTime = 0;\n $pairs = array_flip($indexes[$index]); // ['AUDUSD', ...] => ['AUDUSD'=>null, ...]\n foreach($pairs as $pair => &$data) {\n $data = []; // $data initialisieren: ['AUDUSD'=>[], ...]\n $startTime = max($startTime, XTrade::$symbols[$pair]['historyStart']['M1']); // GMT-Timestamp\n } unset($data);\n $startTime = fxtTime($startTime);\n $startDay = $startTime - $startTime%DAY; // 00:00 Starttag FXT\n $today = ($today=fxtTime()) - $today%DAY; // 00:00 aktueller Tag FXT\n\n\n // (2) Gesamte Zeitspanne tageweise durchlaufen\n for ($day=$startDay, $lastMonth=-1; $day < $today; $day+=1*DAY) {\n\n if (!isFxtWeekend($day, 'FXT')) { // ausser an Wochenenden\n $shortDate = gmDate('D, d-M-Y', $day);\n\n // Pruefen, ob die History bereits existiert\n if (is_file($file=getVar('fxiTarget.compressed', $index, $day))) {\n if ($verbose > 1) echoPre('[Ok] '.$shortDate.' '.$index.' compressed history file: '.baseName($file));\n }\n else if (is_file($file=getVar('fxiTarget.raw', $index, $day))) {\n if ($verbose > 1) echoPre('[Ok] '.$shortDate.' '.$index.' raw history file: '.baseName($file));\n }\n else {\n $month = (int) gmDate('m', $day);\n if ($month != $lastMonth) {\n echoPre('[Info] '.$index.' '.gmDate('M-Y', $day));\n $lastMonth = $month;\n }\n\n // History aktualisieren: M1-Bars der benoetigten Instrumente dieses Tages einlesen\n foreach($pairs as $pair => $data) {\n if (is_file($file=getVar('fxiSource.compressed', $pair, $day))) {} // komprimierte oder\n else if (is_file($file=getVar('fxiSource.raw' , $pair, $day))) {} // unkomprimierte XTrade-Datei\n else {\n echoPre('[Error] '.$pair.' history for '.$shortDate.' not found');\n return false;\n }\n // M1-Bars zwischenspeichern\n $pairs[$pair]['bars'] = XTrade::readBarFile($file, $pair); // ['AUDUSD'=>array('bars'=>[]), ...]\n }\n\n // Indexdaten fuer diesen Tag berechnen\n $function = 'calculate'.$index;\n $fxiBars = $function($day, $pairs); if (!$fxiBars) return false;\n\n // Indexdaten speichern\n if (!saveBars($index, $day, $fxiBars)) return false;\n }\n }\n if (!WINDOWS) pcntl_signal_dispatch(); // Auf Ctrl-C pruefen, um bei Abbruch die Destruktoren auszufuehren.\n }\n\n echoPre('[Ok] '.$index);\n return true;\n}", "private function sql_resWiHits()\n {\n // Count hits\n $bool_count = true;\n\n // Get query parts\n $select = $this->sql_select( $bool_count );\n $from = $this->sql_from();\n $where = $this->sql_whereWiHits();\n $groupBy = $this->sql_groupBy();\n $orderBy = $this->sql_orderBy();\n $limit = $this->sql_limit();\n\n// $query = $GLOBALS['TYPO3_DB']->SELECTquery\n// (\n// $select,\n// $from,\n// $where,\n// $groupBy,\n// $orderBy,\n// $limit\n// );\n//var_dump( __METHOD__, __LINE__, $query );\n // Execute query\n $arr_return = $this->pObj->objSqlFun->exec_SELECTquery\n (\n $select, $from, $where, $groupBy, $orderBy, $limit\n );\n // Execute query\n\n return $arr_return;\n }", "public function getIndex() {}", "public function getIndex() {}", "public function getIndex() {}", "public function getIndex() {}", "public function getIndex() {}", "public function getIndex() {}", "public function getIndex() {}", "public function getIndex() {}", "public function getIndex() {}", "protected function setTextOrderBy(QueryBuilder $qb, $index)\n {\n }", "function opdsBySearch($index = 0)\n{\n global $app, $globalSettings;\n\n // parameter checking\n if (!is_numeric($index)) {\n $app->getLog()->warn('opdsBySearch: invalid page id ' . $index);\n $app->halt(400, \"Bad parameter\");\n }\n\n $search = $app->request()->get('search');\n if (!isset($search)) {\n $app->getLog()->error('opdsBySearch called without search criteria, page ' . $index);\n // 400 Bad request\n $app->response()->status(400);\n return;\n }\n $filter = getFilter();\n $tl = $app->calibre->titlesSlice($globalSettings['lang'], $index, $globalSettings[PAGE_SIZE], $filter, $search);\n $books1 = $app->calibre->titleDetailsFilteredOpds($tl['entries']);\n $books = array_map('checkThumbnailOpds', $books1);\n $gen = mkOpdsGenerator($app);\n $cat = $gen->searchCatalog(\n null,\n $books,\n false,\n $tl['page'],\n getNextSearchPage($tl),\n getLastSearchPage($tl),\n $search,\n $tl['total'],\n $globalSettings[PAGE_SIZE]\n );\n mkOpdsResponse($app, $cat, OpdsGenerator::OPDS_MIME_ACQ);\n}", "public function execute()\n\t{\n\t\t$searchQuery = $this->searchPhrase ? '\"' . $this->searchPhrase . '\"' : '';\n\t\t$queryParams['attributesToRetrieve']\t= '*';\n\t\t$queryParams['maxValuesPerFacet']\t\t= '100';\n\t\t$queryParams['attributesToHighlight']\t= array();\n\t\t$queryParams['filters']\t\t\t\t\t= $this->filters;\n\t\t$queryParams['facetFilters']\t\t\t= $this->facetFilters;\n\t\t$queryParams['offset']\t\t\t\t\t= $this->start;\n\t\t$queryParams['length']\t\t\t\t\t= $this->limit;\n\n\t\t$queryParams['facets']\t\t\t\t\t= array($this->facetField);\n\n\t\t// We need to pass this query by setRawQueryParams for advsearch frontent.\n\t\t$queryParams['advancedSyntax']\t\t\t= 'true';\n\n\t\tif (count($this->rawQueryParams))\n\t\t{\n\t\t\t$queryParams = array_merge($queryParams, $this->rawQueryParams);\n\t\t}\n\n\t\t// This is something Juggad related to Osianama requirement.\n\t\tif (isset($queryParams['restrictSearchableAttributes']))\n\t\t{\n\t\t\t$searchQuery = $this->searchPhrase ? $this->searchPhrase : '';\n\t\t}\n\n\t\t$Data = $this->algoliaIndex->search($searchQuery, $queryParams);\n\n\t\tif (count($Data['hits']) > 0)\n\t\t{\n\t\t\t$this->total\t= $Data['nbHits'];\n\t\t\t$this->count\t= $Data['hitsPerPage'];\n\t\t\t$this->records\t= '';\n\n\t\t\tforeach ($Data['hits'] as $key => $row)\n\t\t\t{\n\t\t\t\tunset($row['_highlightResult']);\n\n\t\t\t\t$row['id']\t\t\t\t\t\t= $row['objectID'];\n\t\t\t\t$this->records['data'][$key]\t= (object) $row;\n\t\t\t}\n\n\t\t\tif ($this->facetField)\n\t\t\t{\n\t\t\t\t$this->records['facets'] = $Data['facets'];\n\t\t\t}\n\t\t}\n\t}", "protected function getAdvancedIndexSuggestResultsRequest($indexName, $search)\n {\n // verify the required parameter 'indexName' is set\n if ($indexName === null) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $indexName when calling getAdvancedIndexSuggestResults'\n );\n }\n // verify the required parameter 'search' is set\n if ($search === null) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $search when calling getAdvancedIndexSuggestResults'\n );\n }\n\n $resourcePath = '/indexes/{index_name}/suggest';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n\n // path params\n if ($indexName !== null) {\n $resourcePath = str_replace(\n '{' . 'index_name' . '}',\n ObjectSerializer::toPathValue($indexName),\n $resourcePath\n );\n }\n\n // body params\n $_tempBody = null;\n if (isset($search)) {\n $_tempBody = $search;\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 (isset($_tempBody)) {\n // $_tempBody is the method argument, if present\n $httpBody = $_tempBody;\n // \\stdClass has no __toString(), so we should encode it manually\n if ($httpBody instanceof \\stdClass && $headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($httpBody);\n }\n } elseif (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValue\n ];\n }\n // for HTTP post (form)\n $httpBody = new MultipartStream($multipartContents);\n\n } elseif ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($formParams);\n\n } else {\n // for HTTP post (form)\n $httpBody = \\GuzzleHttp\\Psr7\\build_query($formParams);\n }\n }\n\n // this endpoint requires API key authentication\n $apiKey = $this->config->getApiKeyWithPrefix('auth_token');\n if ($apiKey !== null) {\n $queryParams['auth_token'] = $apiKey;\n }\n // this endpoint requires API key authentication\n $apiKey = $this->config->getApiKeyWithPrefix('X-RSearch-App-ID');\n if ($apiKey !== null) {\n $headers['X-RSearch-App-ID'] = $apiKey;\n }\n\n $defaultHeaders = [];\n if ($this->config->getUserAgent()) {\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\n }\n\n $headers = array_merge(\n $defaultHeaders,\n $headerParams,\n $headers\n );\n\n $query = \\GuzzleHttp\\Psr7\\build_query($queryParams);\n return new Request(\n 'POST',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }", "public function getAll(Index $index): iterable;", "function build_table_search_params($index, $type, $query, $from = 0, $size = 1000) {\n $params = [];\n $params['index'] = $index;\n $params['type'] = $type;\n // sort the table by the first field by default\n //$sort_field = array_keys($field_content_pairs)[0];\n $params['body'] = [\n 'query' => $query,\n ];\n\n if (isset($_GET['order'])) {\n $sort_field = $_GET['order'];\n $sort_direction = isset($_GET['sort']) && $_GET['sort'] === 'desc' ? 'desc' : 'asc';\n $params['body']['sort'] = [\n $sort_field . \".raw\" => $sort_direction,\n ];\n }\n\n $params['from'] = $from;\n $params['size'] = $size;\n return $params;\n}", "public function testDirectIndexing(): void {\n // Create a test entity for indexing.\n $entity = EntityTest::create([\n 'name' => 'Test entity',\n 'type' => 'entity_test',\n ]);\n $entity->save();\n // Create a second test entity that never gets updated and should never get\n // directly indexed.\n EntityTest::create([\n 'name' => 'Test entity 2',\n 'type' => 'entity_test',\n ])->save();\n\n // Create two indexes to ensure batch tracking is isolated.\n $index_1 = $this->createIndex();\n $index_1->save();\n $tracker_1 = $index_1->getTrackerInstance();\n $index_2 = $this->createIndex();\n $index_2->save();\n $tracker_2 = $index_2->getTrackerInstance();\n\n // At first nothing is indexed.\n $this->assertEquals(2, $tracker_1->getTotalItemsCount());\n $this->assertEquals(0, $tracker_1->getIndexedItemsCount());\n $this->assertEquals(2, $tracker_2->getTotalItemsCount());\n $this->assertEquals(0, $tracker_2->getIndexedItemsCount());\n\n // Start batch tracking mode for index 1 only.\n $index_1->startBatchTracking();\n $entity->save();\n $this->triggerPostRequestIndexing();\n\n // Index 1 shouldn't have indexed the entity; index 2 should've indexed as\n // normal.\n $this->assertEquals(2, $tracker_1->getTotalItemsCount());\n $this->assertEquals(0, $tracker_1->getIndexedItemsCount());\n $this->assertEquals(2, $tracker_2->getTotalItemsCount());\n $this->assertEquals(1, $tracker_2->getIndexedItemsCount());\n\n // Start batch tracking mode a second time for index 1.\n $index_1->startBatchTracking();\n $entity->save();\n $this->triggerPostRequestIndexing();\n\n // Index 1 shouldn't have indexed anything.\n $this->assertEquals(2, $tracker_1->getTotalItemsCount());\n $this->assertEquals(0, $tracker_1->getIndexedItemsCount());\n\n // Make a call to stop batch tracking: because we've started it twice, this\n // shouldn't actually stop batch tracking.\n $index_1->stopBatchTracking();\n $entity->save();\n $this->triggerPostRequestIndexing();\n\n // Index 1 still shouldn't have indexed the entity because it's in batch\n // tracking mode.\n $this->assertEquals(2, $tracker_1->getTotalItemsCount());\n $this->assertEquals(0, $tracker_1->getIndexedItemsCount());\n\n // Make a second call to stop batch tracking: this should actually stop\n // batch tracking mode.\n $index_1->stopBatchTracking();\n $entity->save();\n $this->triggerPostRequestIndexing();\n\n // Index 1 should now have indexed the entity because batch tracking mode's\n // been stopped.\n $this->assertEquals(2, $tracker_1->getTotalItemsCount());\n $this->assertEquals(1, $tracker_1->getIndexedItemsCount());\n\n // An exception should be thrown if you try to stop batch tracking again.\n $this->expectException(SearchApiException::class);\n $index_1->stopBatchTracking();\n }", "function _get_index($index, &$index_usage) {\n if ($index != -1)\n return $index;\n $index = 1;\n while (isset($index_usage[$index]) && $index_usage[$index] > 0)\n $index++;\n $this->_inc($index_usage, $index);\n return $index;\n }", "abstract public function doIndex($item);", "public function stop($index = null) {\n\t\tif ($index === null) {\n\t\t\t$index = count($this->items) - 1;\n\t\t}\n\t\n\t\t$this->items[$index]['after'] = self::getMicrotime();\n\t\t$this->items[$index]['use'] = $this->compareMicrotimes($this->items[$index]['before'], $this->items[$index]['after']);\n\t\t$this->items[$index]['end'] = $this->compareMicrotimes($this->startTime, $this->items[$index]['after']);\n\t\tif ($this->items[$index]['type'] == 1) {\n\t\t\t$this->queryCount++;\n\t\t\t$this->queryTime += $this->items[$index]['use'];\n\t\t}\n\t}", "public function index(string $key,int $index = 0)\n {\n // TODO: Implement index() method.\n return $this->unMakeData($this->getConnection()->index($key,$index));\n }", "function OptimizeTables() {}", "public function testLimitDefaultIndex(): void\n {\n $client = $this->_getClient();\n $index = $client->getIndex('zero');\n $index->create(['settings' => ['index' => ['number_of_shards' => 1, 'number_of_replicas' => 0]]]);\n\n $docs = [\n new Document('1', ['id' => 1, 'email' => 'test@test.com', 'username' => 'farrelley']),\n new Document('2', ['id' => 1, 'email' => 'test@test.com', 'username' => 'farrelley']),\n new Document('3', ['id' => 1, 'email' => 'test@test.com', 'username' => 'farrelley']),\n new Document('4', ['id' => 1, 'email' => 'test@test.com', 'username' => 'farrelley']),\n new Document('5', ['id' => 1, 'email' => 'test@test.com', 'username' => 'farrelley']),\n new Document('6', ['id' => 1, 'email' => 'test@test.com', 'username' => 'farrelley']),\n new Document('7', ['id' => 1, 'email' => 'test@test.com', 'username' => 'farrelley']),\n new Document('8', ['id' => 1, 'email' => 'test@test.com', 'username' => 'farrelley']),\n new Document('9', ['id' => 1, 'email' => 'test@test.com', 'username' => 'farrelley']),\n new Document('10', ['id' => 1, 'email' => 'test@test.com', 'username' => 'farrelley']),\n new Document('11', ['id' => 1, 'email' => 'test@test.com', 'username' => 'farrelley']),\n ];\n $index->addDocuments($docs);\n $index->refresh();\n\n // default limit results (default limit is 10)\n $resultSet = $index->search('farrelley');\n $this->assertEquals(10, $resultSet->count());\n\n // limit = 1\n $resultSet = $index->search('farrelley', ['limit' => 1]);\n $this->assertEquals(1, $resultSet->count());\n }", "public function createIndex(): void;" ]
[ "0.74056494", "0.6843712", "0.6104974", "0.5998254", "0.577187", "0.56995595", "0.5684569", "0.56134844", "0.56110585", "0.55898166", "0.55898166", "0.55275184", "0.54813737", "0.544946", "0.54095757", "0.536736", "0.52437866", "0.5234188", "0.52212894", "0.51977015", "0.51792467", "0.5110921", "0.50308347", "0.5015683", "0.4997211", "0.49565732", "0.4956341", "0.4956306", "0.4931417", "0.4931417", "0.49173823", "0.49047562", "0.48900557", "0.48892188", "0.48828185", "0.48682767", "0.4860763", "0.4855056", "0.4854386", "0.48539856", "0.48531282", "0.4846924", "0.48442096", "0.48315454", "0.48295823", "0.48263642", "0.48125687", "0.48122346", "0.4780376", "0.47761917", "0.4764989", "0.47545844", "0.47488523", "0.47378", "0.47313178", "0.4714649", "0.46997228", "0.46756643", "0.46696088", "0.4661687", "0.46542764", "0.4647659", "0.46410045", "0.46276358", "0.46244475", "0.46230805", "0.46192184", "0.4618164", "0.46142003", "0.46107352", "0.46096802", "0.46095866", "0.46087885", "0.46061662", "0.4598603", "0.4598223", "0.45867887", "0.45819744", "0.45819744", "0.4580455", "0.458025", "0.458025", "0.458025", "0.45794073", "0.45794073", "0.45794073", "0.45787778", "0.45717478", "0.45544848", "0.4539535", "0.45390826", "0.45371553", "0.4536072", "0.45347974", "0.45334944", "0.45309606", "0.45230246", "0.45221794", "0.4521485", "0.45208335" ]
0.6044191
3
Constructs an appropriate Weight implementation for this query.
public function createWeight(\Core\Search\Lucene\InterfaceLucene $reader) { throw new \Core\Search\Lucene\Exception ( 'Wildcard query should not be directly used for search. Use $query->rewrite($index)' ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function __construct($weight = 1, $wildcard = '*')\n {\n $this->weight = $weight;\n $this->wildcard = $wildcard;\n }", "public function __construct($weight, UnitOfMeasure $unitOfMeasure)\n {\n $this->weight = $weight;\n $this->unitOfMeasure = $unitOfMeasure;\n }", "public function setWeight($weight)\n {\n $this->weight = $weight;\n return $this;\n }", "public function setWeight($weight) {\n $this->weight = $weight;\n return $this;\n }", "public function getWeightClass() {}", "public function setWeight($weight)\n {\n $this->weight = $weight;\n\n return $this;\n }", "public function setWeight($weight)\n {\n $this->weight = $weight;\n\n return $this;\n }", "public function setWeight($weight)\n {\n $this->weight = $weight;\n\n return $this;\n }", "public function setWeight($weight);", "public function setWeight($weight);", "public function setWeight($weight);", "public function setWeight($weight);", "public function createWeight(Zend_Search_Lucene_Interface $reader)\n {\n require_once 'Zend/Search/Lucene/Search/Weight/MultiTerm.php';\n $this->_weight = new Zend_Search_Lucene_Search_Weight_MultiTerm($this, $reader);\n return $this->_weight;\n }", "public function getWeight();", "public function getWeight();", "public function getWeight();", "public function getWeight();", "public function getWeight();", "public function getWeight();", "public function getWeight();", "public function setWeight(?int $weight)\n {\n $this->weight = $weight;\n\n return $this;\n }", "function getWeight() { return $this->_weight; }", "public function getWeight() {\n }", "public function getWeight()\n {\n }", "public function getWeight()\n {\n }", "private function _setup_weight_factors()\n\t{\n\t\t$default_factors = $this->_weight_factors = array(\n\t\t\t'frequency' => array(\n\t\t\t\t'search' => 'COUNT(*) / (MAX(t.num_replies) + 1)',\n\t\t\t\t'results' => '(t.num_replies + 1)',\n\t\t\t),\n\t\t\t'age' => array(\n\t\t\t\t'search' => 'CASE WHEN MAX(m.id_msg) < {int:min_msg} THEN 0 ELSE (MAX(m.id_msg) - {int:min_msg}) / {int:recent_message} END',\n\t\t\t\t'results' => 'CASE WHEN t.id_first_msg < {int:min_msg} THEN 0 ELSE (t.id_first_msg - {int:min_msg}) / {int:recent_message} END',\n\t\t\t),\n\t\t\t'length' => array(\n\t\t\t\t'search' => 'CASE WHEN MAX(t.num_replies) < {int:huge_topic_posts} THEN MAX(t.num_replies) / {int:huge_topic_posts} ELSE 1 END',\n\t\t\t\t'results' => 'CASE WHEN t.num_replies < {int:huge_topic_posts} THEN t.num_replies / {int:huge_topic_posts} ELSE 1 END',\n\t\t\t),\n\t\t\t'subject' => array(\n\t\t\t\t'search' => 0,\n\t\t\t\t'results' => 0,\n\t\t\t),\n\t\t\t'first_message' => array(\n\t\t\t\t'search' => 'CASE WHEN MIN(m.id_msg) = MAX(t.id_first_msg) THEN 1 ELSE 0 END',\n\t\t\t),\n\t\t\t'sticky' => array(\n\t\t\t\t'search' => 'MAX(t.is_sticky)',\n\t\t\t\t'results' => 't.is_sticky',\n\t\t\t),\n\t\t\t'likes' => array(\n\t\t\t\t'search' => 'MAX(t.num_likes)',\n\t\t\t\t'results' => 't.num_likes',\n\t\t\t),\n\t\t);\n\n\t\t// These are fallback weights in case of errors somewhere.\n\t\t// Not intended to be passed to the hook\n\t\t$default_weights = array(\n\t\t\t'search_weight_frequency' => 30,\n\t\t\t'search_weight_age' => 25,\n\t\t\t'search_weight_length' => 20,\n\t\t\t'search_weight_subject' => 15,\n\t\t\t'search_weight_first_message' => 10,\n\t\t);\n\n\t\tcall_integration_hook('integrate_search_weights', array(&$this->_weight_factors));\n\n\t\t// Set the weight factors for each area (frequency, age, etc) as defined in the ACP\n\t\t$this->_calculate_weights($this->_weight_factors, $this->_input_weights);\n\n\t\t// Zero weight. Weightless :P.\n\t\tif (empty($this->_weight_total))\n\t\t{\n\t\t\t// Admins can be bothered with a failure\n\t\t\tif ($this->_is_admin)\n\t\t\t{\n\t\t\t\tthrow new Exception('search_invalid_weights');\n\t\t\t}\n\n\t\t\t// Even if users will get an answer, the admin should know something is broken\n\t\t\tErrors::instance()->log_lang_error('search_invalid_weights');\n\n\t\t\t// Instead is better to give normal users and guests some kind of result\n\t\t\t// using our defaults.\n\t\t\t// Using a different variable here because it may be the hook is screwing\n\t\t\t// things up\n\t\t\t$this->_calculate_weights($default_factors, $default_weights);\n\t\t}\n\t}", "function getWeight(){return $this->weight;}", "public function setWeight() {\n }", "function set_weight($weight) {\n $this->weight = $weight;\n }", "public function setWeight(Weight $weight)\n {\n $this->values['Weight'] = $weight;\n return $this;\n }", "public function setWeight(Weight $weight)\n {\n $this->values['Weight'] = $weight;\n return $this;\n }", "public function createWeightTable()\r\n\t{\r\n\t\t$query = 'CREATE TABLE `usdaWeight` (\r\n\t\t\t`id` int(3) unsigned NOT NULL auto_increment,\r\n\t\t\t`NDB_No` int(5) unsigned zerofill NOT NULL default \"00000\",\r\n\t\t\t`Seq` int(2) unsigned NOT NULL default 0,\r\n\t\t\t`Amount` double default NULL,\r\n\t\t\t`Msre_Desc` varchar(80) default NULL,\r\n\t\t\t`Gm_Wgt` double default NULL,\r\n\t\t\t`Num_Data_Pts` int(3) default NULL,\r\n\t\t\t`Std_Dev` double default NULL,\r\n\t\t\tPRIMARY KEY (`id`),\r\n\t\t\tUNIQUE KEY `NDB_No` (`NDB_No`,`Seq`)\r\n\t\t) ENGINE=MyISAM AUTO_INCREMENT=13088 DEFAULT CHARSET=utf8 COMMENT=\"USDA WEIGHT\"';\r\n\t\t$this->_db->setQuery($query);\r\n\t\treturn $this->_db->query();\r\n\t}", "public function get_weight(){\n\t\treturn $this->weight;\n\t}", "public function setWeight($value) {\n if (!is_numeric($value))\n throw new Exception('Weight must be numeric');\n if ($value > 1000)\n throw new Exception('A fruit cannot weigh more than 1kg');\n $this->weight = $value;\n return $this;\n }", "function carton_get_weight( $weight, $to_unit ) {\n\n\t$from_unit \t= strtolower( get_option('carton_weight_unit') );\n\t$to_unit\t= strtolower( $to_unit );\n\n\t//Unify all units to kg first\n\tif ( $from_unit !== $to_unit ) {\n\n\t\tswitch ( $from_unit ) {\n\t\t\tcase 'g':\n\t\t\t\t$weight *= 0.001;\n\t\t\tbreak;\n\t\t\tcase 'lbs':\n\t\t\t\t$weight *= 0.4536;\n\t\t\tbreak;\n\t\t\tcase 'oz':\n\t\t\t\t$weight *= 0.0283;\n\t\t\tbreak;\n\t\t}\n\n\t\t// Output desired unit\n\t\tswitch ( $to_unit ) {\n\t\t\tcase 'g':\n\t\t\t\t$weight *= 1000;\n\t\t\tbreak;\n\t\t\tcase 'lbs':\n\t\t\t\t$weight *= 2.2046;\n\t\t\tbreak;\n\t\t\tcase 'oz':\n\t\t\t\t$weight *= 35.274;\n\t\t\tbreak;\n\t\t}\n\t}\n\treturn ( $weight < 0 ) ? 0 : $weight;\n}", "public function GetWeight() {\n\t\treturn 10;\n\t}", "public function getWeight() \r\n {\r\n return $this->weight;\r\n }", "public function setWeight($weight)\n {\n $this->weight = $weight;\n }", "public function getWeightLimit()\n {\n }", "function get_weight() {\n\t\tif ($this->data['weight']) return $this->data['weight'];\n\t}", "public function getWeight()\n {\n return $this->getTypeInstance(true)->getWeight($this);\n }", "public function getWeight()\n {\n return $this->weight;\n }", "public function getWeight()\n {\n return $this->weight;\n }", "public function getWeight()\n {\n return $this->weight;\n }", "public function getWeight()\n {\n return $this->weight;\n }", "public function getWeight()\n {\n return $this->weight;\n }", "public function getWeight()\n {\n return $this->weight;\n }", "function getWeight() {\n return $this->weight;\n }", "public function getWeight() {\n return $this->weight;\n }", "public function getWeight() {\n\t\treturn $this->weight;\n\t}", "public function setWeight($weight) {\n /*\n * param validation using built-in function\n */\n if(is_numeric($weight) && $weight >= 0) {\n $this->weight = $weight;\n return $this;\n } else {\n throw new InvalidCarWeightException();\n }\n }", "public function __construct($name, $weight, $price)\n {\n $this->name = $name;\n $this->weight = $weight;\n $this->price = $price;\n }", "public function setWeight(FedEx_PickupService_Weight $weight)\n {\n $this->Weight = $weight;\n return $this;\n }", "public function weight($value)\n {\n $this->attribute('probability',$value);\n \n return $this;\n }", "public function setWeight($weight=1)\n\t{\n\t\t$this->weight = intval($weight);\n\t}", "protected function getWeighting($abbreviation, $forType) {\n return $this->weightings[$abbreviation][$forType];\n }", "protected function createRateModel()\n {\n $class = '\\\\'.ltrim($this->rateModel, '\\\\');\n $model = new $class();\n return $model;\n }", "static public function get_weight($courseid) {\n //$default = grade_get_setting($courseid, self::SETTING_WEIGHT, progress_report_generator::DEFAULT_SUBREPORT_WEIGHT, false);\n global $CFG;\n $weightless = progress_report_generator::WEIGHTLESS;\n $classweight = self::SETTING_WEIGHT;\n $default = (isset($CFG->classweight) ? $CFG->classweight : $weightless);\n return optional_param(self::SHORT_NAME.'weight', $default, PARAM_INT);\n }", "public function __construct()\n {\n // Metres, Centimetres, Millimetres, Yards, Foot, Inches\n $conversions = array(\n 'Weight' => array(\n 'base' => 'kg',\n 'conv' => array(\n 'g' => 1000,\n 'mg' => 1000000,\n 't' => 0.001,\n 'oz' => 35.274,\n 'lb' => 2.2046,\n )\n ),\n 'Distance' => array(\n 'base' => 'km',\n 'conv' => array(\n 'm' => 1000,\n 'cm' => 100000,\n 'mm' => 1000000,\n 'in' => 39370,\n 'ft' => 3280.8,\n 'yd' => 1093.6\n )\n )\n );\n\n foreach ($conversions as $val) {\n $this->addConversion($val['base'], $val['conv']);\n }\n }", "public function weight() {\r\n\t\treturn (int)$this->techData['weight'];\r\n\t}", "public function setWeightUnit(WeightUnit $weightUnit)\n {\n $this->weightUnit = $weightUnit;\n\n return $this;\n }", "public function toGram(): self\n {\n if (! isset($this->matric_ton)) {\n throw new MissingConversionUnitException();\n }\n\n $this->weight = $this->matric_ton * 1000000;\n\n return $this;\n }", "public function getWeight() : float\n\t{\n\t\treturn $this->weight;\n\t}", "public function __construct($id, $name, $weight, $base, $height, $width)\n {\n $this->id = $id;\n $this->name = $name;\n $this->weight = $weight;\n $this->base = $base;\n $this->height = $height;\n $this->width = $width;\n }", "protected function getWeight(OrderItemInterface $order_item) {\n $purchasedEntity = $order_item->getPurchasedEntity();\n\n if ($purchasedEntity->get('weight')->isEmpty()) {\n $weight = new Weight(1, WeightUnit::GRAM);\n }\n else {\n /** @var \\Drupal\\physical\\Plugin\\Field\\FieldType\\MeasurementItem $weight_item */\n $weight_item = $purchasedEntity->get('weight')->first();\n\n $weight = $weight_item->toMeasurement();\n }\n\n return $weight;\n }", "public function getWeightings() {\n\t\treturn $this->_weights;\n\t}", "public function toShortTon(): self\n {\n if (! isset($this->gram)) {\n throw new MissingConversionUnitException();\n }\n\n $this->weight = $this->gram / 907184.74;\n\n return $this;\n }", "public function testTermWeight(): void {\n /** @var \\Drupal\\rdf_taxonomy\\TermRdfStorage $storage */\n $storage = $this->container->get('entity_type.manager')->getStorage('taxonomy_term');\n\n // Returns an ordered list of term labels from the backend.\n $get_labels = function () use ($storage): array {\n $this->createTerms();\n $tree = $storage->loadTree('test_vocab');\n return array_map(function (\\stdClass $term): string {\n return $term->name;\n }, $tree);\n };\n\n // Check that with no weight mapping the terms are ordered alphabetically.\n $this->assertSame(['Abc', 'Bcd', 'Cde', 'Xyz'], $get_labels());\n\n // Add the 'weight' mapping.\n SparqlMapping::loadByName('taxonomy_term', 'test_vocab')\n ->addMappings([\n 'weight' => [\n 'value' => [\n 'predicate' => 'http://example.com/test_vocab/weight',\n 'format' => 'xsd:integer',\n ],\n ],\n ])\n ->save();\n\n // Check that with weight mapping the terms are ordered by weight and\n // eventually alphabetically by label.\n $this->assertSame(['Xyz', 'Cde', 'Abc', 'Bcd'], $get_labels());\n }", "public function getWeight() : int\n {\n return $this->_weight;\n }", "abstract public function getWeights($visits, $conversions, $xSales, $revenue, $sumSqRev);", "public function toOunce(): self\n {\n if (! isset($this->gram)) {\n throw new MissingConversionUnitException();\n }\n\n $this->weight = $this->gram / 28.34952;\n\n return $this;\n }", "public function addWeight() {\n\n if(!$this->app->session->get('userID')) {\n return $this->generateResponse(401);\n }\n\n $this->weight->weight = $this->request->weight->weight;\n $this->weight->weighed_date = $this->request->weight->date;\n $this->weight->user_id = $this->app->session->get('userID');\n\n if(!$this->weight->validateWeight('add')) {\n return $this->generateResponse(422, 'invalid weight',\n array('errors' => $this->weight->errors));\n }\n\n if(!$this->weight->save() || !isset($this->weight->weight_id) ||\n !$this->weight->weight_id) {\n return $this->generateResponse(500);\n }\n\n $date = strtotime($this->request->weight->date);\n $changeLastWeek =\n $this->weight->closestWeightToDate($this->weight->user_id,\n date('Y-m-d', mktime(0, 0, 0,\n date('n',\n $date),\n date('j',\n $date) - 7,\n date('Y',\n $date))));\n\n $this->response =\n array('weight' =>\n array('id' => $this->weight->weight_id,\n 'weight_id' => $this->weight->weight_id,\n 'date' => $this->weight->weighed_date,\n 'weight' => $this->weight->weight,\n 'changed' => round($this->weight->weight -\n $changeLastWeek, 2)));\n\n return $this->generateResponse();\n\n\n }", "public function providerGetReadableWeights() {\n return array(\n array(\n array(StatsCategories::B_TOTAL => 1.0),\n 'b_total_100'\n ),\n array(\n array(\n StatsCategories::B_HOME_AWAY => .5,\n StatsCategories::P_HOME_AWAY => .5\n ),\n 'b_home_away_50__p_home_away_50'\n )\n );\n }", "public function toMilligram(): self\n {\n if (! isset($this->gram)) {\n throw new MissingConversionUnitException();\n }\n\n $this->weight = $this->gram * 1000;\n\n return $this;\n }", "public function create()\n {\n return \\Process::create('weights');\n }", "protected function _convertWeight($weight)\n {\n if($this->commerceWeightUnit === 'g')\n {\n return $weight/1000;\n } \n \n if($this->commerceWeightUnit === 'lb')\n {\n return $weight*0.453;\n }\n\n return $weight;\n }", "public function toMatricTon(): self\n {\n if (! isset($this->gram)) {\n throw new MissingConversionUnitException();\n }\n\n $this->weight = $this->gram / 1000000;\n\n return $this;\n }", "function _fourD_analysis_calculate_project_weight_old( $nid, $uid=0, $getsubtotal=false ) {\n //fourD_analysis_debug('_fourD_analysis_calculate_project_weight('.$nid.', '.$uid.'); ');\n \n /* Things have changed several times here. */\n // $weight_style = 'weighted';\n // $weight_style = 'weighted_all';\n $weight_style = 'weighted_end';\n \n \n //$goals = _fourD_analysis_get_goals();\n $goals = _fourD_analysis_get_goal_nodes($nid, 'all');\n if( $weight_style == 'weighted_end' && $uid ){\n $project = fourD_analysis_project_entry_get($nid, $uid);\n //fourD_analysis_debug('_fourD_analysis_calculate_project_weight('.$nid.', '.$uid.'); weighted_end / Personal ');\n if( $project['probability'] ){\n $project['difference'] = $project['personal_difference'];\n $project['ability'] = $project['personal_ability'];\n $project['interest'] = $project['personal_interest'];\n $project['deadline'] = $project['personal_deadline'];\n }\n }\n else{\n $project = fourD_analysis_project_entry_get($nid);\n $project['difference'] = $project['communal_difference'];\n $project['ability'] = $project['communal_ability'];\n $project['interest'] = $project['communal_interest'];\n $project['deadline'] = $project['personal_deadline'];\n }\n \n if( empty($goals) || !$project['probability'] ){\n return 0.0;\n }\n \n fourD_analysis_debug('calculate_project_weight('.$nid.', '.$uid.'); $project: '. print_r($project, true) );\n \n $goalWeights = _fourD_analysis_calculate_project_goal_weight( $nid, $uid, $goals, $project );\n $Pre = _fourD_analysis_calculate_project_prerequisite_weight( $nid, $uid, $project );\n \n fourD_analysis_debug('calculate_project_weight('.$nid.', '.$uid.'); GoalWeight (G1*W1+G2*W2+G3*W3+G4*W4+G5*W5...): '. print_r($goalWeights, true) );\n fourD_analysis_debug('calculate_project_weight('.$nid.', '.$uid.'); PrequsiteWeight (P1+P2+P3...): '. print_r($Pre, true) );\n \n //fourD_analysis_debug('calculate_project_weight('.$nid.', '.$uid.'); Person Years: '.$project['person_years'] );\n \n $dateTime = getdate( $project['deadline'] );\n //fourD_analysis_debug('calculate_project_weight('.$nid.', '.$uid.'); Deadline Date: '.$project['deadline'].'; Date: '. print_r($dateTime, true) );\n \n \n\n /* Deadline = (DD/365+MM/12+YYYY-2000)\n * Should it be:\n * Deadline = ( (DD/365) + (MM/12) + (YYYY-2000) )\n */\n $deadline = (\n // $dateTime['yday']/365 + $dateTime['mon']/12 + $dateTime['year']-2000\n ($dateTime['yday']/365) + ($dateTime['mon']/12) + ($dateTime['year']-2000)\n );\n// fourD_analysis_debug('calculate_project_weight('.$nid.', '.$uid.'); Deadline: '.$deadline );\n \n // Formula: (((G1*W1+G2*W2+G3*W3+G4*W4+G5*W5)+Pre)*Ps/T)*D*A*I/(deadline-date)\n $WP = (($goalWeights+$Pre)*$project['probability']);\n $t1 = ( isset($project['person_years']) && $project['person_years'] > 0 ) ?\n ($WP/$project['person_years']) :\n $WP;\n \n if( $getsubtotal ){\n $weight = (\n $t1 *\n $project['difference']\n // *\n //$project['personal_ability'] * // personal ability - not ability to assess\n //$project['personal_interest']\n ) / $deadline;\n }\n else{\n $weight = (\n $t1 *\n $project['difference'] *\n $project['ability'] * // personal ability - not ability to assess\n $project['interest']\n ) / $deadline;\n }\n \n /* Finally, add the users' ability to assess the Project */\n if( $weight_style == 'weighted_all' ){\n $assesibleWeight = 0.0;\n if( $uid ){\n $users = db_query(\"SELECT uid, assess_ability FROM {node_4dnetwork_analysis} WHERE nid = '%d' AND uid = '%d'\", $nid, $uid);\n }\n else{\n $users = db_query(\"SELECT uid, assess_ability FROM {node_4dnetwork_analysis} WHERE nid = '%d'\", $nid);\n }\n while( $u = db_fetch_object($users) ) {\n $assesibleWeight += ($weight*$u->assess_ability);\n }\n return _fourD_analysis_round_decimal($assesibleWeight);\n }\n \n if( $weight_style == 'weighted_end' ){\n if( !$uid && $project['assess_ability'] > 0 ){\n $weights = array();\n $abilities = array();\n $users = db_query(\"SELECT uid, assess_ability FROM {node_4dnetwork_analysis} WHERE nid = '%d'\", $nid);\n /* Add the users weights as such:\n * output weight = W0 * (PW1*PA1 + PW2*PA2 + PW3*PA3 / PA1+PA2+PA3)\n *\n * W0 = Sub total weight\n * W1 = personal output weight (based on personal inputs only)\n * A1 = personal ability to assess\n */\n while( $u = db_fetch_object($users) ) {\n $abilities[$u->uid] = $u->assess_ability;\n $weights[$u->uid] = _fourD_analysis_calculate_personal_project_weight($u->uid, $nid);\n }\n \n $tot_weights = 0;\n $tot_abilities = 0;\n foreach($abilities as $uid=>$ab){\n $tot_abilities += $abilities[$uid];\n $tot_weights += ($weights[$uid]*$abilities[$uid]);\n }\n // fourD_analysis_debug('_fourD_analysis_calculate_project_weight('.$nid.', '.$uid.'); $tot_abilities: '.$tot_abilities.'; $tot_weights: '.$tot_weights );\n // nobody likes divide by zeros\n if( $tot_abilities > 0 ){\n// $weight = ($weight*($tot_weights/$project['assess_ability']) );\n// $weight = ($weight*($tot_weights/$tot_abilities) );\n // $subtotal = ($tot_weights/$tot_abilities);\n $weight = ($tot_weights/$tot_abilities);\n }\n }\n }\n\n return _fourD_analysis_round_decimal($weight);\n}", "public function __construct(WoundsTable $woundsTable)\n {\n $this->woundsTable = $woundsTable;\n }", "public function create()\n {\n $definition = $this->definition->toArray();\n\n if (! isset($definition[$this->type]) || empty($definition[$this->type])) {\n return;\n }\n\n foreach (range(1, $definition[$this->type]['scale'] ?? 1) as $index) {\n $this->relation()->create(\n $this->baseAttributes($index, $definition[$this->type]) +\n $this->attributes($definition)\n );\n }\n }", "abstract public function setWeight(array $questions): array ;", "public function __construct($priceKg, $wt, $nm)\n {\n //assigning the instance variables using constructor\n $this->pricePerKg = $priceKg;\n $this->weight = $wt;\n $this->name = $nm;\n }", "private function score_weight_nutrition(){\r\n\t\t$data = $this->data['weight_nutrition'];\r\n\r\n\t\t$q21 = $this->scoreValue(array(5,1,3),$data['q21']);\r\n\t\t$q22 = $this->scoreValue(array(1,3,5),$data['q22']);\r\n\r\n\t\t$qn24 = $this->scoreValue(array(1,2,3,4,5), $data['qn24']);\r\n\t\t$qn25 = $this->scoreValue(array(1,2,3,4,5), $data['qn25']);\r\n\r\n\t\t//fruit & veg _1 & 2\r\n\t\t$q23a = 0;\r\n\t\t$f = $data['q23_1'];\r\n\t\t$v = $data['q23_2'];\r\n\t\t\r\n\t\tif ($f > 0) $f--;\r\n\t\tif ($v > 0) $v--;\r\n\t\t$table = array(\r\n\t\t array(1,1,1,2,2),\t\r\n\t\t array(1,1,2,2,3),\r\n\t\t array(1,2,2,3,3),\r\n\t\t array(2,2,3,4,5),\r\n\t\t array(2,3,3,5,5),\r\n\t\t);\r\n\t\t$q23a = $table[$v][$f];\r\n\t\t\r\n\t\t//Fats\r\n\t\t$q23b = 0;\r\n\t\tfor($x = 3; $x <= 7; $x++){\r\n\t\t\t$q23b += $this->scoreValue(array(0,3,5,12,25),$data['q23_'.$x]);\r\n\t\t}\r\n\t\t$q23b = $q23b/5;\r\n\t\tif ($q23b > 10) $q23b = 1;\r\n\t\telse if ($q23b > 5.1) $q23b = 2;\r\n\t\telse if ($q23b > 3.2) $q23b = 3;\r\n\t\telse if ($q23b > 2) $q23b = 4;\r\n\t\telse $q23b = 5;\r\n\t\t\r\n\t\t///breads & Grains _8\r\n\t\t$q23c = $this->scoreValue(array(0,3,5,12,25),$data['q23_8']);\r\n\t\tif ($q23c > 12) $q23c = 5;\r\n\t\telse if ($q23c > 8) $q23c = 4;\r\n\t\telse if ($q23c > 4.9) $q23c = 3;\r\n\t\telse if ($q23c > 3) $q23c = 2;\r\n\t\telse $q23c = 1;\r\n\t\t\r\n\t\t$ob=new stdClass();\r\n\t\t$ob->total=0;\r\n\t\t$ob->data=array('q21'=>array($q21,.1),\r\n\t\t\t\t\t\t'q22'=>array($q22,.1),\r\n\t\t\t\t\t\t'q23_1'=>array($q23a,.25),\r\n\t\t\t\t\t\t'q23_2'=>array($q23b,.25),\r\n\t\t\t\t\t\t'q23_3'=>array($q23c,.1),\r\n\t\t\t\t\t\t'qn24'=>array($qn24,.1),\r\n\t\t\t\t\t\t'qn25'=>array($qn25,.1)\r\n\t\t);\r\n\t\tforeach($ob->data as &$rec){\r\n\t\t\t$rec[2]=$rec[0]*$rec[1];\r\n\t\t\t$ob->total+=$rec[2];\r\n\t\t}\r\n\t\treturn $ob;\r\n\t}", "protected function setWeight($newWeight) \r\n {\r\n if(gettype($newWeight) == \"integer\") {\r\n $this->name = $newWeight;\r\n } else {\r\n throw new Exception(\"Weight must be an integer, type of \" . gettype($newWeight) . \" was sent in\");\r\n }\r\n $this->weight = $newWeight;\r\n }", "protected function getProductAttrCodeUseForSearchWeight()\n {\n if (null === $this->_productAttrCodeUseForSearchWeight) {\n $this->_productAttrCodeUseForSearchWeight = $this->_helper->getGeneralSetting('advanced/product_search_weight');\n }\n return $this->_productAttrCodeUseForSearchWeight;\n }", "public function toKilogram(): self\n {\n if (! isset($this->gram)) {\n throw new MissingConversionUnitException();\n }\n\n $this->weight = $this->gram / 1000;\n\n return $this;\n }", "public function actionWeight() {\r\n \t$currentTs = time();\r\n \t$request = Yii::$app->request;\r\n \t$identity = \\Yii::$app->user->getIdentity();\r\n \r\n \t$q = trim($request->post('q', $request->get('q', '')));\r\n \r\n \t$query = Weight::find();\r\n \t$query->orderBy(['id'=>SORT_ASC]);\r\n \r\n \t$op = $request->post('op', $request->get('opss', ''));\r\n \tif ($op == \"search\") {\r\n \t if (!empty($_REQUEST['type'])){\r\n \t\t\t$type = $_REQUEST['type'];\r\n \t\t\tif($type != 0){\r\n \t\t\t\t$queryf = pond::find();\r\n \t\t\t\t$queryf->andWhere(['type'=> $type]);\r\n \t\t\t\t$pondf = $queryf->all();\r\n \t\t\t\tforeach ($pondf as $obj){\r\n \t\t\t\t\t$arrId[] = $obj->id;\r\n \t\t\t\t}\r\n \t\t\t\t \r\n \t\t\t\tif($arrId){\r\n \t\t\t\t\t$query->andWhere(['pondId'=> $arrId]);\r\n \t\t\t\t}\r\n \t\t\t}\r\n \t\t}\r\n \t\t \r\n \t\tif (!empty($_REQUEST['q'])){\r\n \t\t\t$item = $_REQUEST['q'];\r\n \t\t\t$query->andWhere(['LIKE' ,'title','%'.$item.'%', false]);\r\n \t\t}\r\n \t}\r\n \t\r\n\r\n \t\t\tif ($q)\r\n \t\t\t\t$query->andWhere(['LIKE' ,'name','%'.$q.'%', false]);\r\n \t\t\t\t\t\r\n \t\t\t\t\t\r\n \t\t\t\t//actions\r\n \t\t\t\tswitch ($request->post('op')){\r\n \t\t\t\t\tcase 'delete':\r\n \t\t\t\t\t\t$this->weightDelete();\r\n \t\t\t\t\t\tbreak;\r\n \t\t\t\t}\r\n \t\t\t\t\t\r\n \t\t\t\t//paging\r\n \t\t\t\t$pagination = new Pagination([\r\n \t\t\t\t\t\t'defaultPageSize' => \\Yii::$app->params['ui']['defaultPageSize'],\r\n \t\t\t\t\t\t'totalCount' => $query->count(),\r\n \t\t\t\t]);\r\n \t\t\t\t$pagination->params = [\r\n \t\t\t\t\t\t'q'=>$q,\r\n \t\t\t\t\t\t'page'=>$pagination->page,\r\n \t\t\t\t];\r\n \t\t\t\t$query->offset($pagination->offset);\r\n \t\t\t\t$query->limit($pagination->limit);\r\n \t\t\t\t\t\r\n \t\t\t\t$list = $query->all();\r\n \t\t\t\t\t\r\n \t\t\t\t//get users\r\n \t\t\t\t$arrId = [];\r\n \t\t\t\t$arrUser = [];\r\n \t\t\t\t$arrPond = [];\r\n \t\t\t\tif (!empty($list)){\r\n \t\t\t\t\tforeach ($list as $obj){\r\n \t\t\t\t\t\t$arrId[] = $obj->createBy;\r\n \t\t\t\t\t}\r\n \t\t\t\t\t$modelsUser = User::find()->where(['id'=>$arrId])->all();\r\n \t\t\t\t\tif(!empty($modelsUser)){\r\n \t\t\t\t\t\tforeach ($modelsUser as $obj){\r\n \t\t\t\t\t\t\t$arrUser[$obj->id] = $obj->firstName.' '.$obj->lastName;\r\n \t\t\t\t\t\t}\r\n \t\t\t\t\t}\r\n\r\n \t\t\t\t\t$objPond = Pond::find()->orderBy(['id'=>SORT_ASC])->all();\r\n \t\t\t\t\tforeach ($objPond as $dataPond){\r\n \t\t\t\t\t\t$objTypelist = Typelist::find()->where(['id'=>$dataPond->type])->all();\r\n \t\t\t\t\t\tforeach ($objTypelist as $obj){\r\n \t\t\t\t\t\t$arrPond[$dataPond->id] = $obj->name.' '.$dataPond->title;\r\n \t\t\t\t\t\t}\r\n \t\t\t\t\t\r\n \t\t\t\t\t}\r\n \t\t\t\t}\r\n \t\t\t\t\r\n \t\t\t\t$query = Typelist::find();\r\n \t\t\t\t$query->orderBy(['id'=>SORT_ASC]);\r\n \t\t\t\t$objTypelist = $query->all();\r\n \t\t\t\t$arrTypelist = [];\r\n \t\t\t\tforeach ($objTypelist as $dataTypelist){\r\n \t\t\t\t\t$arrTypelist[$dataTypelist->id] = $dataTypelist->name;\r\n \t\t\t\t}\r\n \t\t\t\t\t\r\n echo $this->render('weight', [\r\n \t\t'lst' => $list,\r\n \t\t'arrPond' => $arrPond,\r\n \t\t'arrTypelist'=> $arrTypelist,\r\n \t\t'pagination' => $pagination,\r\n \t\t'arrUser' =>$arrUser,\r\n \t\t'q'=>$q,\r\n ]);\r\n }", "public function pageWeight()\r\n\t{\r\n\t\t$weight = Bn::getValue('weight');\r\n\t\t$fileName = '../Conf/Teams/'. $weight;\r\n\r\n\t\t// Chargement du fichier\r\n\t\t$doc = new DOMDocument('1.0', 'UTF-8');\r\n\t\t$doc->validateOnParse = true;\r\n\t\t$doc->load($fileName);\r\n\r\n\t\t$bal = new Bn_Balise();\r\n\t\t$xjoueurs = $doc->getElementsByTagName('joueur');\r\n\t\tforeach($xjoueurs as $xjoueur)\r\n\t\t{\r\n\t\t\t$nbHommes = Object::nodeValue($xjoueur, 'homme');\r\n\t\t\t$nbFemmes = Object::nodeValue($xjoueur, 'femme');\r\n\t\t\t$nbMixtes = Object::nodeValue($xjoueur, 'mixte');\r\n\t\t}\r\n\t\tif ($nbMixtes) $bal->addP('', $nbMixtes . ' joueurs');\r\n\t\telse\r\n\t\t{\r\n\t\t\t$p = $bal->addP('', $nbHommes . ' homme(s)' . '; ' . $nbFemmes . ' femme(s)');\r\n\t\t}\r\n\t\t\r\n\t\t$xrules = $doc->getElementsByTagName('rules');\r\n\t\tforeach($xrules as $xrule)\r\n\t\t{\r\n\t\t\t$discipline = Object::nodeValue($xrule, 'discipline');\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\t$xpoids = $doc->getElementsByTagName('poid');\r\n\t\t$t = $bal->addBalise('table');\r\n\t\t$tr = $t->addBalise('tr');\r\n\t\t$td = $tr->addBalise('td', '', 'Classement');\r\n\t\t$td = $tr->addBalise('td', '', 'Rang min.');\r\n\t\t$td = $tr->addBalise('td', '', 'Rang max.');\r\n\t\t$td = $tr->addBalise('td', '', 'Points');\r\n\t\tforeach($xpoids as $xpoid)\r\n\t\t{\r\n\t\t\t$tr = $t->addBalise('tr');\r\n\t\t\t$td = $tr->addBalise('td', '', Object::nodeValue($xpoid, 'classement'));\r\n\t\t\t$td = $tr->addBalise('td', '', Object::nodeValue($xpoid, 'rang_min'));\r\n\t\t\t$td = $tr->addBalise('td', '', Object::nodeValue($xpoid, 'rang_max'));\r\n\t\t\t$td = $tr->addBalise('td', '', $xpoid->getAttribute('points'));\r\n\t\t}\r\n\t\t\r\n\t\techo $bal->toHtml();\r\n\t\treturn false;\r\n\t}", "public function setWeight($num, $weight)\n {\n $this->_weights[$num] = $weight;\n }", "abstract protected function getWeightFeatures();", "public function toMilligram(): self\n {\n if (! isset($this->matric_ton)) {\n throw new MissingConversionUnitException();\n }\n\n $this->weight = $this->matric_ton * 1000000000;\n\n return $this;\n }", "public function createSacksWeight()\n {\n \n \t$shift = $finished = $cols = \"\";\n\t\t\n $shift = trim($_POST[\"shift\"]);\n $shift = stripslashes($shift);\n $shift = htmlspecialchars($shift);\n\t\t\n\t\t$finished = trim($_POST[\"finished\"]);\n $finished = stripslashes($finished);\n $finished = htmlspecialchars($finished);\n\t\n\t\t$cols = trim($_POST[\"cols\"]);\n $cols = stripslashes($cols);\n $cols = htmlspecialchars($cols);\n\t\t\n //DATE\n $date = date(\"Y-m-d\");\n if($shift == 2)\n {\n $date = date(\"Y-m-d\", time() - 60 * 60 * 24);\n }\n if(!empty($_POST['date']))\n {\n $myDateTime = DateTime::createFromFormat('d/m/Y', $_POST['date']);\n $newDateString = $myDateTime->format('Y-m-d');\n $date = $newDateString;\n }\n\t\t\n\t\t$totalnet = $totalSacks = $number = 0;\n\t\t\n\t\t$sacks = \"INSERT INTO `injection_sacks_weight`\n(`injection_sacks_weight_id`,`date_sacks`,`shift`,`number`,`weight`,`user_id`,`finishproduct`,`cols`)\nVALUES\";\n\t\tforeach ($_POST as $k=>$v)\n\t\t{\n\t\t\tif (substr( $k, 0, 3 ) === \"wt_\" and !empty($v)){\n\t\t\t\t$i = explode(\"_\",$k)[1];\n\t\t\t\t\n\t\t\t\t$no = trim($_POST[\"no_\".$i]);\n\t\t\t\t$number = $number + $no;\n\t\t\t\t$totalSacks = $totalSacks + $no;\n\t\t\t\t$totalnet = $totalnet + $v;\n\t\t\t\t$sacks = $sacks. \" (NULL, '\". $date.\"', \". $shift .\", \". $no .\", \". $v .\", \". $_SESSION['Userid'] .\", \". $finished .\", \". $cols .\") ,\";\n\t\t\t}\n\t\t}\n\t\t\n\t\t\n\t\t$update = \"\";\n\t\t\n\t\t\n\t\t$sql = \"SELECT `injection_sacks_production_id`, SUM(`sacks`) as total, SUM(used) as used\nFROM `injection_sacks_production`\nWHERE `status_production` = 0 AND cols= \". $cols.\" AND finishproduct = \". $finished .\"\n\";\n\t\t\n if($stmt = $this->_db->prepare($sql))\n {\n $stmt->execute();\n while($row = $stmt->fetch())\n {\n\t\t\t\tif(!is_null($row['injection_sacks_production_id']))\n\t\t\t\t{\n\t\t\t\t\t$TOTAL = $row['total'] - $row['used'];\n\t\t\t\t\tif($TOTAL<$number)\n\t\t\t\t\t{\n\t\t\t\t\t\techo '<strong>ERROR</strong> The sacks were not added to the production. Because there is not enought injection sacks production in stock. <br> There are <strong>'. $TOTAL .'</strong> kgs in stock, and you need <strong>'. $number .'</strong> sacks. Please try again after submit the sacks for the production.';\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t {\n\t\t\t\t\t\techo '<strong>ERROR</strong> The sack was not added to the production. ecause there is not enought injection sacks production in stock. <br> Please try again after submit the sacks for the production.';\n\t\t\t\t\t\treturn false;\n\t\t\t\t }\n }\n\t\t}\n\t\t\n\t\t$sql = \"SELECT `injection_sacks_production_id`, `sacks`, used\n\t\t\t\tFROM `injection_sacks_production`\n\t\t\t\tWHERE `status_production` = 0 AND cols= \". $cols.\" AND finishproduct = \". $finished .\"\n\t\t\t\tORDER BY `date_production` DESC, `injection_sacks_production_id`\n\t\t\t\tLIMIT 10;\";\n\t\t\n if($stmt = $this->_db->prepare($sql))\n {\n $stmt->execute();\n while($row = $stmt->fetch())\n {\n\t\t\t\tif(!is_null($row['injection_sacks_production_id']))\n\t\t\t\t{\n\t\t\t\t\t$TOTAL = $row['sacks'] - $row['used'];\n\t\t\t\t\tif(($TOTAL > $number) and ($number > 0))\n\t\t\t\t\t{\n\t\t\t\t\t\tif($number + $row['used'] == $row['sacks'])\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t$update = $update . \"\n\t\t\t\t\t\tUPDATE `injection_sacks_production` SET\n `used` = `used`+\". $number .\", `status_production` = 1\n\t\t\t\t\t\tWHERE `injection_sacks_production_id` = \". $row['injection_sacks_production_id'].\"; \";\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\n\t\t\t\t\t\t\t$update = $update . \"\n\t\t\t\t\t\tUPDATE `injection_sacks_production` SET\n `used` = `used`+\". $number .\", `status_production` = 0\n\t\t\t\t\t\tWHERE `injection_sacks_production_id` = \". $row['injection_sacks_production_id'].\"; \";\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$number = 0;\n\t\t\t\t\t\t$stmt->closeCursor();\n\t\t\t\t\t}\n\t\t\t\t\telse if(($TOTAL <= $number) and ($number > 0))\n\t\t\t\t\t{\n\t\t\t\t\t\t$update = $update . \"\n\t\t\t\t\t\tUPDATE `injection_sacks_production` SET\n `used` = `used`+\". $TOTAL .\", `status_production` = 1\n\t\t\t\t\t\tWHERE `injection_sacks_production_id` = \". $row['injection_sacks_production_id'].\";\";\n\t\t\t\t\t\t$number = $number - $TOTAL;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t {\n\t\t\t\t\t\techo '<strong>ERROR 3</strong> The sack was not added to the production. ecause there is not enought injection sacks production in stock. <br> Please try again after submit the sacks for the production.';\n\t\t\t\t\t\treturn false;\n\t\t\t\t }\n }\n\t\t\n\t\t\t\t\t\n\t\t\t$transfer = \" INSERT INTO `stock_materials_transfers`(`stock_materials_transfers_id`,`machine_from`,`machine_to`,`material_id`,`date_required`,`bags_required`,`bags_approved`,`bags_issued`,`bags_receipt`,`user_id_required`,`user_id_approved`,`user_id_issued`,`user_id_receipt`,`status_transfer`,`remarks_approved`,`remarks_issued`)VALUES(NULL,6,12, '\". $finished .\"','\". $date .\"',\". $totalSacks . \",\". $totalSacks . \",\". $totalSacks . \",NULL,\". $_SESSION['Userid'] . \",\". $_SESSION['Userid'] . \",\". $_SESSION['Userid'] . \",NULL,2,'Total Weight of Sacks = \". $totalnet .\"',NULL);\";\n\t\t\t\n\t\t\t$sql = substr($sacks,0,strlen($sacks)-2). \"; \". $update . $transfer ;\n\t\t\t\n\t\t\ttry { \n\t\t\t\t$this->_db->setAttribute( PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION );\n\t\t\t\t$stmt = $this->_db->prepare($sql);\n\t\t\t\t$stmt->execute();\n\t\t\t\t$stmt->closeCursor();\n\t\t\t\t\n\t\t\t\techo '<strong>SUCCESS!</strong> The sacks were successfully added to the database for the shift: <strong>'. $this->giveShiftname($shift) .'</strong>';\n\t\t\t\treturn TRUE;\n\t\t\t\t\t\n\t\t\t}\n\t\t\tcatch (PDOException $e) {\n\t\t\t\techo '<strong>ERROR</strong> Could not insert the sacks into the database. Please try again.<br>'. $e->getMessage();\n\t\t\t\treturn FALSE;\n\t\t\t}\n\t\t\t}\n\t\t}", "public function getWeight() {\n return $this->item->getWeight();\n }", "public function weights() {\n\n if(!$this->app->session->get('userID')) {\n return $this->generateResponse(401);\n }\n\n if((!$weights = $this->weight->weights($this->app->session->get('userID')))) {\n $this->response = array('weights' => false);\n } else {\n\n foreach($weights as $weight) {\n $data[] = ['id' => $weight['weight_id'],\n 'weight_id' => $weight['weight_id'],\n 'date' => $weight['weighed_date'],\n 'weight' => $weight['weight'],\n 'change' => $weight['change']];\n }\n\n $this->response = array('weights' => $data);\n\n }\n\n return $this->generateResponse();\n\n }", "public function setWeightAttribute($weight = null)\n\t{\n\t\t$this->attributes['weight'] = intval($weight);\n\t}", "function WeightTable(FocusedCrawler &$crawler){\n\t\t\t$this->crawler = $crawler;\n\t\t\t$this->termFrequencies = array();\n\t\t\t// $this->stemmedDictionary = array();\n\t\t\t$this->tDocFrequencies = array();\n\t\t\t$this->keyWords = array();\n\t\t\t$this->extendedKeyWords = array();\n\t\t\t$this->stemmedKeyWords = array();\n\t\t\t$this->documentCount = 0;\n\n\t\t\t$seedDocuments = array();\n\t\t\tforeach ($this->crawler->urls as $url) {\n\t\t\t\t$seedDocuments[] = new Document($url['url'], $this->crawler, $this,0 , 1);\n\t\t\t}\n\t\t\tunset($seedDocuments);\n\t\t\t\n\t\t\t$this->updateKeyWords();\n\t\t}", "public function getWeightedRand($weights,GeneratorInterface $random)\n {\n $r = $random->generate(1, 1000);\n $offset = 0;\n foreach ($weights as $k => $w) {\n \n $offset += $w * 1000;\n \n if ($r <= $offset) {\n return $k;\n }\n }\n }", "public function setWeight($aWeights)\n {\n $aWeights = (array) $aWeights;\n\n foreach ($aWeights as $iId => $iWeight) {\n $oHorizontalPdf = $this->findOneBy('id', intval($iId));\n if (!is_null($oHorizontalPdf)) {\n $oHorizontalPdf->weight = intval($iWeight);\n $oHorizontalPdf->save();\n }\n }\n\n return $this;\n }", "protected function get_unified_font_weight( $weight ) {\r\n\t\treturn str_replace( array( 'normal', 'regular' ), '400', $weight );\r\n\t}", "public function toKilogram(): self\n {\n if (! isset($this->matric_ton)) {\n throw new MissingConversionUnitException();\n }\n\n $this->weight = $this->matric_ton * 1000;\n\n return $this;\n }" ]
[ "0.65067935", "0.6428116", "0.62707996", "0.625762", "0.6254441", "0.6189922", "0.6189922", "0.6189922", "0.60932636", "0.60932636", "0.60932636", "0.60932636", "0.60695314", "0.605176", "0.605176", "0.605176", "0.605176", "0.605176", "0.605176", "0.605176", "0.5932324", "0.589905", "0.5888808", "0.584988", "0.584988", "0.58367586", "0.5804523", "0.57933885", "0.5782375", "0.5733481", "0.5733481", "0.5682708", "0.56134355", "0.5587082", "0.5563103", "0.55495846", "0.55302", "0.5492751", "0.54594725", "0.5445357", "0.5412967", "0.5407366", "0.5407366", "0.5407366", "0.5407366", "0.5407366", "0.5407366", "0.539384", "0.53703713", "0.53430414", "0.5324121", "0.5319347", "0.53157026", "0.52886987", "0.527929", "0.5250621", "0.52381974", "0.5216895", "0.5197955", "0.51590896", "0.5156226", "0.51538384", "0.51072156", "0.5063271", "0.5041997", "0.5037037", "0.5021805", "0.50182337", "0.50123274", "0.5003135", "0.49881303", "0.49744126", "0.4961993", "0.49246794", "0.49130535", "0.4884905", "0.48752478", "0.4870386", "0.48466465", "0.48391044", "0.48330215", "0.48322606", "0.48218122", "0.48123795", "0.48050073", "0.48008803", "0.47881603", "0.47786808", "0.477723", "0.47728977", "0.4763136", "0.47537297", "0.47449508", "0.4731132", "0.47082853", "0.46477568", "0.46435302", "0.46410474", "0.46301258", "0.46287853" ]
0.49622348
72
Execute query in context of index reader It also initializes necessary internal structures
public function execute(\Core\Search\Lucene\InterfaceLucene $reader) { throw new \Core\Search\Lucene\Exception ( 'Wildcard query should not be directly used for search. Use $query->rewrite($index)' ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "abstract protected function initQuery(): void;", "public function _INDEX()\n\t{\n\t\t\n\t}", "function _loadIndex () \n {\n $this->_enterSection('_loadIndex');\n \n $index = array();\n \n $a = strcspn ($this->_options['dsn'], ':');\n $proto = substr ($this->_options['dsn'], 0, $a);\n $path = substr ($this->_options['dsn'], $a + 3);\n\n switch ($proto) {\n case 'file' : \n $f = sprintf($path, $this->_indexName);\n $data = '';\n if ($fp = @fopen ($f,'r')) {\n $this->_enterSection('_loadIndex (acquiring read lock)');\n flock($fp, LOCK_SH);\n $this->_leaveSection('_loadIndex (acquiring read lock)');\n $this->_enterSection('_loadIndex (reading data)');\n while (!feof($fp)) {\n $data .= fread ($fp, 0xFFFF);\n }\n fclose ($fp);\n $this->_leaveSection('_loadIndex (reading data)');\n }\n \n $this->_enterSection('_loadIndex (unserializing/uncompressing)');\n if ($data) {\n if ($this->_options['gz_level']) {\n $index = unserialize(gzuncompress($data));\n } else {\n $index = unserialize($data);\n }\n }\n $this->_leaveSection('_loadIndex (unserializing/uncompressing)');\n break;\n }\n $this->_index = $index;\n \n $this->_leaveSection('_loadIndex');\n }", "private function executeQuery() {\n\t\t$recordset = $this->getConnection()->execute( $this );\n\t\t\n\t\tif( $recordset === false ) {\n\t\t\t$this->_recordset = array();\n\t\t} else {\n\t\t\t$this->_recordset = $recordset;\n\t\t}\n\n\t\t$this->_currentRow = 0;\n\t\t$this->isDirty( false );\n\t}", "public function __invoke()\n {\n $this->execute();\n }", "public function execute()\n\t{\n\t\t$searchQuery = $this->searchPhrase ? '\"' . $this->searchPhrase . '\"' : '';\n\t\t$queryParams['attributesToRetrieve']\t= '*';\n\t\t$queryParams['maxValuesPerFacet']\t\t= '100';\n\t\t$queryParams['attributesToHighlight']\t= array();\n\t\t$queryParams['filters']\t\t\t\t\t= $this->filters;\n\t\t$queryParams['facetFilters']\t\t\t= $this->facetFilters;\n\t\t$queryParams['offset']\t\t\t\t\t= $this->start;\n\t\t$queryParams['length']\t\t\t\t\t= $this->limit;\n\n\t\t$queryParams['facets']\t\t\t\t\t= array($this->facetField);\n\n\t\t// We need to pass this query by setRawQueryParams for advsearch frontent.\n\t\t$queryParams['advancedSyntax']\t\t\t= 'true';\n\n\t\tif (count($this->rawQueryParams))\n\t\t{\n\t\t\t$queryParams = array_merge($queryParams, $this->rawQueryParams);\n\t\t}\n\n\t\t// This is something Juggad related to Osianama requirement.\n\t\tif (isset($queryParams['restrictSearchableAttributes']))\n\t\t{\n\t\t\t$searchQuery = $this->searchPhrase ? $this->searchPhrase : '';\n\t\t}\n\n\t\t$Data = $this->algoliaIndex->search($searchQuery, $queryParams);\n\n\t\tif (count($Data['hits']) > 0)\n\t\t{\n\t\t\t$this->total\t= $Data['nbHits'];\n\t\t\t$this->count\t= $Data['hitsPerPage'];\n\t\t\t$this->records\t= '';\n\n\t\t\tforeach ($Data['hits'] as $key => $row)\n\t\t\t{\n\t\t\t\tunset($row['_highlightResult']);\n\n\t\t\t\t$row['id']\t\t\t\t\t\t= $row['objectID'];\n\t\t\t\t$this->records['data'][$key]\t= (object) $row;\n\t\t\t}\n\n\t\t\tif ($this->facetField)\n\t\t\t{\n\t\t\t\t$this->records['facets'] = $Data['facets'];\n\t\t\t}\n\t\t}\n\t}", "public function dbAnalysisStoreExec() {}", "private function initQuery()\n {\n $this->_lastSql = null;\n $this->_limit = null;\n $this->_offset = null;\n $this->_order = array();\n $this->_group = array();\n $this->_table = null;\n $this->_stmt = null;\n\n $this->fromStates = array();\n $this->selectFields = array();\n $this->whereStates = array();\n $this->havingStates = array();\n $this->values = array();\n $this->joinStates = array();\n }", "public function _query()\n {\n }", "private function initQuery()\n {\n // reset\n $this->result = false;\n \n $this->errorCode = 0;\n $this->errorMessage = '';\n }", "abstract public function query();", "protected function getIndex()\n\t{ \n /*\n $sm = $this->account->getServiceManager();\n $dbh = $sm->get(\"Db\");\n $this->dbh = $dbh;\n\t\treturn new \\Netric\\EntityQuery\\Index\\Pgsql($this->account, $dbh);\n * \n */\n $this->dbh = $this->account->getServiceManager()->get(\"Db\");\n return new \\Netric\\EntityQuery\\Index\\Pgsql($this->account);\n\t}", "public function query()\n {\n }", "public function query()\n {\n }", "public function query()\n {\n $args = func_get_args();\n\n $this->connect(atkDb::getQueryMode($args[0]));\n\n return call_user_method_array('query',$this->m_current_clusternode, $args);\n }", "public function query()\n\t{\n\t\t\n\t}", "public function initialize(){\n\t\t $db_params = OpenContext_OCConfig::get_db_config();\n\t\t $db = new Zend_Db_Adapter_Pdo_Mysql($db_params);\n\t\t $db->getConnection();\n\t\t $this->setUTFconnection($db);\n\t\t $this->db = $db;\n\t\t $this->checkTableIndex();\n\t\t $this->solrDocArray = false;\n\t\t $this->toDoList = false;\n\t\t $this->toDoCount = 0;\n\t\t $this->errors = array();\n\t\t $this->totalIndexed = 0;\n }", "public function executeQuery() {\r\n\t\t$query = $this->query;\r\n\t\t$query->matching($query->logicalAnd($this->queryConstraints));\r\n//$parser = \\TYPO3\\CMS\\Core\\Utility\\GeneralUtility::makeInstance('TYPO3\\\\CMS\\\\Extbase\\\\Persistence\\\\Generic\\\\Storage\\\\Typo3DbQueryParser'); \r\n//$queryParts = $parser->parseQuery($query); \r\n//\\TYPO3\\CMS\\Core\\Utility\\DebugUtility::debug($queryParts, 'Query Content');\r\n\t\t$queryResult = $query->execute()->toArray();\r\n\t\t$this->setSelectedPageUids($queryResult);\r\n\t\t$this->resetQuery(); \r\n\t\treturn $queryResult;\r\n\t}", "public function query($index){\n $this->httpRequest->query($index);\n }", "public function executeIterator();", "private function executeQuery()\n {\n // $fresults = $this->qb->getQuery()->getResult(Query::HYDRATE_ARRAY);\n $query = $this->qb->getQuery();\n $query->setHydrationMode(Query::HYDRATE_ARRAY);\n $fresults = new Paginator($query, true);\n $output = array(\"aaData\" => array());\n\n foreach ($fresults as $item) {\n $output['aaData'][] = $item;\n }\n\n $outputHeader = array(\n \"sEcho\" => $this->sEcho,\n \"iTotalRecords\" => $this->getCountAllResults(),\n \"iTotalDisplayRecords\" => $this->getCountFilteredResults()\n );\n\n $this->response = array_merge($outputHeader, $output);\n\n return $this;\n }", "protected function doIndexDocument() {\n if ($this->showRecordInSearch())\n {\n $this->service->index($this->owner);\n }\n }", "public function perform()\n {\n // Truncate the `search_texts` table before indexing to clean out\n // obsolete records.\n $sql = \"TRUNCATE TABLE {$this->_db->SearchText}\";\n $this->_db->query($sql);\n\n foreach (get_custom_search_record_types() as $key => $value) {\n $recordType = is_string($key) ? $key : $value;\n\n if (!class_exists($recordType)) {\n // The class does not exist or cannot be found.\n continue;\n }\n $record = new $recordType;\n if (!($record instanceof Omeka_Record_AbstractRecord)) {\n // The class is not a valid record.\n continue;\n }\n if (!is_callable(array($record, 'addSearchText'))) {\n // The record does not implement the search mixin.\n continue;\n }\n\n $pageNumber = 1;\n $recordTable = $record->getTable();\n // Query a limited number of rows at a time to prevent memory issues.\n while ($recordObjects = $recordTable->fetchObjects($recordTable->getSelect()->limitPage($pageNumber, 100))) {\n foreach ($recordObjects as $recordObject) {\n // Save the record object, which indexes its search text.\n try {\n $recordObject->save();\n } catch (Omeka_Validate_Exception $e) {\n _log($e, Zend_Log::ERR);\n _log(sprintf('Failed to index %s #%s',\n get_class($recordObject), $recordObject->id),\n Zend_Log::ERR);\n }\n release_object($recordObject);\n }\n $pageNumber++;\n }\n }\n }", "public static function query()\n {\n }", "public function execute()\n {\n try\n {\n $resultJson = $this->jsonFactory->create();\n $response = []; \n\n $indexerCollection = $this->_indexerCollectionFactory->create();\n $allIds = $indexerCollection->getAllIds();\n $updatedIndexes = 0;\n $obj = \\Magento\\Framework\\App\\ObjectManager::getInstance();\n foreach ($allIds as $id) \n {\n //$logger = $obj->get('\\Psr\\Log\\LoggerInterface');\n $indexerState = $obj->get('\\Magento\\Indexer\\Model\\Indexer\\State');\n //$logger->info($id); \n $indexer = $this->_indexerFactory->create();\n if($indexer->load($id)->getStatus() == 'working')\n {\n $indexerState->loadByIndexer($id);\n $indexerState->setStatus(\\Magento\\Framework\\Indexer\\StateInterface::STATUS_INVALID);\n $indexerState->save();\n }\n $indexer = $this->_indexerFactory->create();\n $indexer->load($id)->reindexAll(); \n $updatedIndexes++; \n } \n if ($updatedIndexes > 0) \n {\n $response['type'] = 'success';\n $response['success'] = true;\n $response['message'] = __(\"%1 indexes type(s) refreshed.\", $updatedIndexes);\n }\n }\n catch (LocalizedException $e) \n {\n $response['type'] = 'error';\n $response['error'] = true;\n $response['message'] = \"<b>an error in \" . $id . \" - </b>\" . $e->getMessage();\n }\n catch (\\Exception $e) \n {\n $response['type'] = 'error';\n $response['error'] = true;\n $response['message'] = __(\"<b>an error in \". $id . \" - </b>\" . $e->getMessage());\n }\n return $resultJson->setData($response); \n }", "public function hook_query_index(&$query) {\n\t //Your code here\n\t \n\t }", "public function runQuery(){\n \n $query = $this->getQuery();\n $pager = $this->getPager();\n $modify_result = $this->getModifyResult();\n\n // set default number of results so that we don't output NULL as \n // total_results if there are errors\n $pager->setTotalResults( 0 );\n $results = array();\n \n if( !$this->getResponse()->hasErrors() ){\n \t\n \t $count_query = clone $query;\n\t $pager->setTotalResults( $count_query->count() );\n \t $pager->decorateQuery( $query );\n \n\t if( $pager->getPageSize() > 0 ){\n\t $db_results = $query->find();\n\t foreach( $db_results as $model ){\n\t $result_object = array();\n\t $modify_result( $model, $result_object );\n\t $results[] = $result_object;\n\t }\n\t }\n\t \n }\n \n $api_response_body = $this->getResponse()->getResponseBody();\n $api_response_body->setBody($results);\n \n }", "function query() {}", "public function query();", "public function query();", "public function query();", "public function updateIndex()\n {\n if ($this->es_index_helper) {\n call_user_func($this->es_index_helper, $this);\n }\n }", "private function execute () {\n if($this->_query->execute()) {\n\n // It has been succesful so add the output to $this->results and set it as an object\n $this->_results = $this->_query->fetchAll(PDO::FETCH_OBJ);\n\n // Set the affected row count to $this->_count\n $this->_count = $this->_query->rowCount();\n\n } else {\n\n // The query failed so set $this->_error to true. MORE WORK NEEDED HERE\n $this->_error = true;\n\n }\n }", "protected function index() {\n\t\t$this->showProgressMessage('Going to index.');\n\t\t$this->indexer->index();\n\t\t$this->reindexNewURLs();\n\t\t$this->convertBlobs();\n\t\t$this->createWordStatistics();\n\t}", "function query() {\n }", "function process_query_index( $query )\n\t{\n\t\treturn $query;\n\t}", "public function execute() {\n $this->query->filter($this->filter);\n $data = $this->query->execute();\n $results = $data['results'];\n\n if (!$results) {\n return;\n }\n\n return entity_load($this->EntityType, array_keys($results));\n }", "public function set()\n {\n\tforeach( $this->queue as $operation => $actions)\n\t{\n\t foreach($actions as $key => $action)\n\t {\n\t\tif ( is_array($action->sql))\n\t\t{\n\t\t array_walk($action->sql, array($this, 'query'));\n\t\t}\n\t\telse\n\t\t{\n\t\t $this->query($action->sql);\n\t\t}\n\t }\n\t}\n }", "private function loadFromStore() {\r\n \r\n /*\r\n * Request start time\r\n */\r\n $this->requestStartTime = microtime(true);\r\n \r\n /*\r\n * Clean search filters\r\n */\r\n $originalFilters = $this->defaultModel->getFiltersFromQuery($this->context->query);\r\n \r\n /*\r\n * Number of returned results is never greater than MAXIMUM_LIMIT\r\n */\r\n $limit = isset($originalFilters['count']) && is_numeric($originalFilters['count']) ? min($originalFilters['count'], isset($this->defaultModel->searchFilters['count']->maximumInclusive) ? $this->defaultModel->searchFilters['count']->maximumInclusive : 500) : $this->context->dbDriver->resultsPerPage;\r\n\r\n /*\r\n * Compute offset based on startPage or startIndex\r\n */\r\n $offset = $this->getOffset($originalFilters, $limit);\r\n \r\n /*\r\n * Query Analyzer \r\n */\r\n $analysis = $this->analyze($originalFilters);\r\n \r\n /*\r\n * Completely not understood query - return an empty result without\r\n * launching a search on the database\r\n */\r\n if (isset($analysis['notUnderstood'])) {\r\n $this->restoFeatures = array();\r\n $this->paging = $this->getPaging(array(\r\n 'total' => 0,\r\n 'isExact' => true\r\n ), $limit, $offset);\r\n }\r\n /*\r\n * Read features from database\r\n */ \r\n else {\r\n $this->loadFeatures($analysis['appliedFilters'], $limit, $offset);\r\n }\r\n \r\n /*\r\n * Set description\r\n */\r\n $this->setDescription($analysis, $offset, $limit);\r\n \r\n }", "public function hook_query_index(&$query)\n\t{\n\t\t//Your code here\n\n\t}", "protected function execute()\n {\n // Clean the utilistion index.\n DUtilisationRecord::cleanDatabase();\n // Determine objects that are searchable.\n $models = DModel::search()\n ->removeDefaultFilters();\n // Track progress of task execution.\n $totalObjects = $models->getCount();\n $currentObject = 0;\n foreach ($models as $model) {\n /* @var $model DModel */\n try {\n $event = new DOnSave();\n $event->setFieldValue('dispatcher', $model);\n DUtilisationRecord::index($event);\n $model->free();\n // Catch and report any exception to allow processing to continue.\n } catch (Exception $exception) {\n DErrorHandler::logException($exception);\n }\n // Update progress of task execution.\n ++$currentObject;\n $this->updateProgress($currentObject, $totalObjects);\n }\n }", "public function query() {\n $this->ensureMyTable();\n\n $def = $this->definition;\n $def['table'] = 'taxonomy_term_field_data';\n\n if (!array_filter($this->options['vids'])) {\n $taxonomy_index = $this->query->addTable('taxonomy_index', $this->relationship);\n $def['left_table'] = $taxonomy_index;\n $def['left_field'] = 'tid';\n $def['field'] = 'tid';\n $def['type'] = empty($this->options['required']) ? 'LEFT' : 'INNER';\n }\n else {\n // If vocabularies are supplied join a subselect instead\n $def['left_table'] = $this->tableAlias;\n $def['left_field'] = 'nid';\n $def['field'] = 'nid';\n $def['type'] = empty($this->options['required']) ? 'LEFT' : 'INNER';\n $def['adjusted'] = TRUE;\n\n $query = Database::getConnection()->select('taxonomy_term_field_data', 'td');\n $query->addJoin($def['type'], 'taxonomy_index', 'tn', 'tn.tid = td.tid');\n $query->condition('td.vid', array_filter($this->options['vids']), 'IN');\n if (empty($this->query->options['disable_sql_rewrite'])) {\n $query->addTag('taxonomy_term_access');\n }\n $query->fields('td');\n $query->fields('tn', ['nid']);\n $def['table formula'] = $query;\n }\n\n $join = \\Drupal::service('plugin.manager.views.join')->createInstance('standard', $def);\n\n // use a short alias for this:\n $alias = $def['table'] . '_' . $this->table;\n\n $this->alias = $this->query->addRelationship($alias, $join, 'taxonomy_term_field_data', $this->relationship);\n }", "protected abstract function executeQuery(Result $result);", "protected function _execute()\n {\n $this->triggerBeforeFind();\n if ($this->_results) {\n $decorator = $this->_decoratorClass();\n\n return new $decorator($this->_results);\n }\n\n $statement = $this->getEagerLoader()->loadExternal($this, $this->execute());\n\n return new ResultSet($this, $statement);\n }", "public function execute() {\n $this->check();\n $this->buildQuery();\n $response = json_decode($this->getContents());\n $this->response = !empty($response) ? $response : NULL;\n }", "function masterAllIndexes() {\n $this->db_master->executeSQL(\"SELECT \" . $this->idx_master . \" from \" . $this->db_master->database . \".\" . $this->table_master);\n }", "public function execute() {\n\t\t$this->checkSetup();\n\n\t\t// ???\n\t\t$this->getWikiIDs();\n\n\t\t// make array of all wiki database names + connection configs, including prime wiki\n\t\t$this->getWikiDatabaseConfigs();\n\n\t\t// actually get array of database connection objects\n\t\t$this->getWikiDBs();\n\n\t\t// ???\n\t\t$this->originalUserIDs = $this->getUserIDsByWiki();\n\n\t\t// Record relevant info from all tables for checking later\n\t\t$this->recordOriginalIDs();\n\n\t\t// Add $this->initialOffset to all user IDs on all tables on all wikis\n\t\t// and delete an unneeded table. Read new IDS into $this->tempUserIDs\n\t\t$this->prepDatabases();\n\n\t\t// ???\n\t\t$this->temporaryUserIDs = $this->getUserIDsByWiki();\n\n\t\t// Create $this->userArray by reading table `user` from all databases\n\t\t// From this array comes the new user IDs for all users\n\t\t$this->createUserArray();\n\n\t\t// Update all tables of all wikis with the new user IDs from $this->userArray\n\t\t// including primeWiki. Delete user and user_properties tables of all except\n\t\t// primeWiki.\n\t\t$this->performTableModification();\n\n\t\t// ???\n\t\t$this->createUnifiedUserTable();\n\n\t\t// ???\n\t\t$this->createUnifiedUserPropertiesTable();\n\n\t\t// Run tests against data recorded prior to ID changes\n\t\t$this->testNewIDs();\n\n\t\t// ???\n\t\t$this->closeout();\n\n\t}", "public function testQueryAccessAll() {\n user_role_grant_permissions('anonymous', array('access content', 'access comments'));\n $this->index->reindex();\n $this->index->indexItems();\n $query = Utility::createQuery($this->index);\n $result = $query->execute();\n\n $this->assertResults($result, array('user' => array(0), 'comment' => array(0), 'node' => array(0, 1)));\n }", "public function execute() {\n\n // Add convenience tag to mark that this is an extended query. We have to\n // do this in the constructor to ensure that it is set before preExecute()\n // gets called.\n if (!$this->preExecute($this)) {\n return NULL;\n }\n\n // A NULL limit is the \"kill switch\" for pager queries.\n if (empty($this->limit)) {\n return;\n }\n $this->ensureElement();\n\n $total_items = $this->getCountQuery()->execute()->fetchField();\n $current_page = pager_default_initialize($total_items, $this->limit, $this->element);\n $this->range($current_page * $this->limit, $this->limit);\n\n // Now that we've added our pager-based range instructions, run the query normally.\n return $this->query->execute();\n }", "function query() {\n \n $this->ensure_my_table();\n \n if ($this->options['operator'] == 'in') {\n $keys = array_keys($this->value);\n\n $this->query->add_where(0, $this->table_alias.'.id IN ('. implode(',', $keys).')' );\n }\n\n }", "public function execute()\n\t{\n\t\t$this->query->setFetchMode($this->fetchMode);\n\n\t\t$this->query->execute($this->params);\t\n\n\t\t// Fetch the data in the appropriate format\n\t\tswitch ($this->fetchMethod) {\n\t\t\tcase 'row':\n\t\t\t\t$this->result = $this->query->fetch();\n\t\t\t\tbreak;\n\t\t\tcase 'field':\n\t\t\t\t$this->result = $this->query->fetchColumn();\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\t$this->result = $this->query->fetchAll();\n\t\t\t\tbreak;\n\t\t}\n\t}", "public function __construct() { \n\t\t$this->Connection = new RDataConnection();\t// connection object\n\t\t$this->buildQuery = array(\n\t\t\t'query' \t=> array(),\n\t\t\t'select' \t=> array(),\n\t\t\t'where' \t=> array(),\n\t\t\t'insert' \t=> array(),\n\t\t\t'update' \t=> array(),\n\t\t\t'join' \t=> array(),\n\t\t\t'orderBy' \t=> array(),\n\t\t\t'limit'\t\t=> array(),\n\t\t\t'groupBy' \t=> array(),\n\t\t\t'having' \t=> array(),\n\t\t\t'from' \t=> array(),\n\t\t\t'delete' \t=> array()\n\t );\t\t\t\t\t\t\t \n\t\t$this->params = array();\t\n\t\t$this->types = array();\t\t\n\t\t$this->customQuery = array();\t\n\t\t$this->customParams = array();\t\n\t\t$this->customTypes = array();\t\n\t\t$this->addFoundRows = false;\t\n\t\t$this->queryType = self::SELECT;\n\t\tself::$inputIdx = 0;\n\t\t//$this->debug = (defined('DEV_MODE') && constant('DEV_MODE') === true); \n\t\t$this->debug = isDevMode(); \n\t\t\t\n\t\t// init connection\n\t\t//$this->Connection->Connect(CONNECTION_TYPE,DATABASE_USERNAME,DATABASE_PASSWORD,DATABASE_NAME,DATABASE_HOST,DATABASE_PORT);\n\t\t$this->Connection->Connect('mysql',DATABASE_USERNAME,DATABASE_PASSWORD,DATABASE_NAME,DATABASE_HOST,DATABASE_PORT);\n\t}", "public function execute()\n\t{\n\t\t// Use cached results if found (previous count() or other internal call)\n\t\tif($this->activeQueryResults) {\n\t\t\t$results = $this->activeQueryResults;\n\t\t} else {\n\t\t\tif($this->activeQuery instanceof phpDataMapper_Database_Query_Interface) {\n\t\t\t\t$results = $this->query($this->activeQuery->sql(), $this->activeQuery->getParameters());\n\t\t\t\t$this->activeQueryResults = $results;\n\t\t\t} else {\n\t\t\t\t$results = array();\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn $results;\n\t}", "public static function run(){\n // Loads from an Alert\n \n $alert = AlertManager::load(67);\n $test = new Search();\n \n // the actual Query\n $query = $alert ->getQuery();\n \n dpm(SearchLabel::toLabel($query));\n $test -> addFromQuery($query);\n $num = $test ->getCount();\n \n dpm($num);\n $nodes = $test ->getNodes();\n dpm($nodes);\n }", "public function reindexAll()\n {\n\n //@todo: indexers should be dynamically injected. Probable via `$this->getIndeces()`\n /** @var St_SphinxSearch_Model_Fulltext $fulltextIndex */\n $fulltextIndex = Mage::getModel('st_sphinxsearch/fulltext');\n\n $fulltextIndex->rebuildIndex();\n\n return;\n /** @var Mage_Core_Model_Resource $resourceSingleton */\n $resourceSingleton = Mage::getSingleton('core/resource');\n\n /** @var Varien_Db_Adapter_Interface $writeAdapater */\n $writeAdapater = $resourceSingleton->getConnection('core_write');\n\n /** @var Varien_Db_Adapter_Interface $readAdapter */\n $readAdapter = $resourceSingleton->getConnection('core_read');\n\n /** @var string $tableName */\n $tableName = $readAdapter->getTableName('st_sphinxsearch_fulltext_tmp');\n\n /** @var Mage_CatalogSearch_Model_Resource_Indexer_Fulltext $indexerFulltext */\n $indexerFulltext = Mage::getResourceModel('catalogsearch/indexer_fulltext');\n\n $fulltextTableName = $indexerFulltext->getTable('fulltext');\n\n $sql = \"CREATE TABLE IF NOT EXISTS `$tableName` LIKE `$fulltextTableName`\";\n\n $writeAdapater->query($sql);\n $t=1;\n }", "public function query() {\n if ($this->get_option('geocluster_enabled')) {\n if ($algorithm = geocluster_init_algorithm($this->config)) {\n $algorithm->pre_execute();\n }\n }\n }", "public function initQueryBody()\n {\n $this->queryBody = [\n 'index' => $this->connection->index(),\n 'type' => $this->connection->type(),\n 'body' => [\n 'query' => [\n 'bool' => [\n 'filter' => [\n\n ]\n ]\n ]\n ]\n ];\n }", "public function run()\n {\n $client = ES::create()\n ->setHosts(\\Config::get('elasticsearch.host'))\n ->build();\n\n $test = TestCommunity::all();\n if(count($test) > 0){\n foreach($test as $v){\n $community = $v->getOriginal();\n $community += $v->test->getOriginal();\n $community =(Object)$community;\n\n $params = [\n 'index' => 'default',\n 'type' => 'test',\n 'id' => $community->id,\n 'body' => $community\n ];\n $client->index($params);\n }\n }\n }", "public function execute()\n\t{\n\t\t$filterstr = implode(\".\\n\", $this->getFilters());\n\t\t$sparqlQuery = $this->constructQuery( $filterstr );\n\t\t\n\t\t@header('Content-type: text/plain');\n\t\t\n\t\t$engine = new SPARQL_Engine;\n\t\t$engine->useSparql($sparqlQuery);\n\t\t$engine->setResultHandler(new Single_Value_Extractor);\n\t\t\n\t\ttry\n\t\t{\n\t\t\t$engine->runQuery();\n\t\t} catch(Single_Value_Extractor $e)\n\t\t{\n\t\t\techo array_shift($e->getFoundValue());\n\t\t\techo \"\\n\".preg_replace('/\\t\\t\\t/', '', $sparqlQuery).\"\\n\";\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tthrow new Exception('There was no result from the given SPARQL');\n\t}", "private function RunBasicQuery() {\n // Prepare the Query\n $this->stmt = $this->db->prepare($this->sql);\n \n // Run the Query in the Database\n $this->stmt->execute();\n \n // Store the Number Of Rows Returned\n $this->num_rows = $this->stmt->rowCount();\n \n // Work with the results (as an array of objects)\n $this->rs = $this->stmt->fetchAll();\n \n // Free the statement\n $this->stmt->closeCursor(); \n }", "public static function query();", "public function execute() {}", "public function execute() {}", "public function execute() {}", "public function execute() {}", "public function execute() {}", "public function execute() {}", "public function execute() {}", "public function execute() {}", "public function execute() {}", "public function execute() {}", "public function execute() {}", "public function execute() {}", "public function execute() {}", "public function execute() {}", "public function execute() {}", "public function execute() {}", "public function execute() {}", "public function execute() {}", "public function execute() {}", "public function execute() {}", "public function execute() {}", "public function __doLoad()\n {\n $strSQL = $this->getSelectSql();\n $_SESSION[\"logger\"]->info(\"__doLoad: \" . $strSQL);\n\n $result = $this->query($strSQL);\n $_SESSION[\"logger\"]->info(\"Results: \" . $this->rowCount($result));\n if ($result && $this->rowCount($result) > 0) {\n $this->exists = true;\n $this->dxHashToClass($this->torecord($result));\n } else {\n $this->exists = false;\n }\n }", "public function run()\n {\n $marks = [];\n\n foreach ($this->data as $field => $value) {\n $marks[\":{$field}\"] = $value;\n }\n\n return $this->entity->getDb()->execute((string) $this, $marks);\n }", "public function query()\n {\n throw new \\Exception('not implemted');\n }", "public function run()\n {\n DB::table('tyre_load_indices')->insert([\n 'index' => '144', 'load' => 2800\n ]);\n DB::table('tyre_load_indices')->insert([\n 'index' => '145', 'load' => 2900\n ]);\n DB::table('tyre_load_indices')->insert([\n 'index' => '146', 'load' => 3000\n ]);\n DB::table('tyre_load_indices')->insert([\n 'index' => '147', 'load' => 3075\n ]);\n DB::table('tyre_load_indices')->insert([\n 'index' => '148', 'load' => 3150\n ]);\n DB::table('tyre_load_indices')->insert([\n 'index' => '149', 'load' => 3250\n ]);\n DB::table('tyre_load_indices')->insert([\n 'index' => '150', 'load' => 3350\n ]);\n DB::table('tyre_load_indices')->insert([\n 'index' => '151', 'load' => 3450\n ]);\n DB::table('tyre_load_indices')->insert([\n 'index' => '152', 'load' => 3550\n ]);\n DB::table('tyre_load_indices')->insert([\n 'index' => '153', 'load' => 3650\n ]);\n DB::table('tyre_load_indices')->insert([\n 'index' => '154', 'load' => 3750\n ]);\n DB::table('tyre_load_indices')->insert([\n 'index' => '155', 'load' => 3875\n ]);\n DB::table('tyre_load_indices')->insert([\n 'index' => '156', 'load' => 4000\n ]);\n \n }", "public function import()\n {\n $this->initializeApplication();\n\n if ($this->alwaysRefreshIndex) {\n $this->deleteIndices();\n }\n\n if (!$this->indicesExist()) {\n $import = $this->getImport();\n $import->doImport($this->indexPrefix, null, $this->logger);\n }\n\n $this->destroyApplication();\n }", "public function triggerReindex()\n {\n if (!$this->owner->ID) {\n return;\n }\n\n $id = $this->owner->ID;\n $class = $this->owner->ClassName;\n $state = SearchVariant::current_state($class);\n $base = DataObject::getSchema()->baseDataClass($class);\n $key = \"$id:$base:\" . serialize($state);\n\n $statefulids = array(array(\n 'id' => $id,\n 'state' => $state\n ));\n\n $writes = array(\n $key => array(\n 'base' => $base,\n 'class' => $class,\n 'id' => $id,\n 'statefulids' => $statefulids,\n 'fields' => array()\n )\n );\n\n SearchUpdater::process_writes($writes);\n }", "public function execute()\n\t{\n\t\t$queryUrl = $this->buildQueryUrl();\n\t\t$storeId = $this->getParam('storeid');\n\t\t$arguments = array(\n\t\t\t\t'json.nl' => 'map',\n\t\t\t\t'rows' => $this->rows,\n\t\t\t\t'start' => $this->start,\n\t\t\t\t'fl' => @implode(',', $this->fieldList),\n\t\t\t\t'qf' => $this->queryFields,\n\t\t\t\t'spellcheck' => 'true',\n\t\t\t\t'spellcheck.collate' => 'true',\n\t\t\t\t'facet' => 'true',\n\t\t\t\t'facet.mincount' => 1,\n\t\t\t\t'facet.limit' => $this->facetLimit,\n\t\t\t\t'timestamp' => time(),\n\t\t\t\t'mm' => $this->mm,\n\t\t\t\t'defType'=> 'edismax',\n\t\t\t\t'wt'=> 'json',\n\t\t);\n\n\t\t$resultSet = $this->doRequest($queryUrl, $arguments, 'array');\n\n\t\tif (isset($resultSet['response']['numFound']) && intval($resultSet['response']['numFound']) > 0)\n\t\t{\n\t\t\treturn $resultSet;\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$queryText = $this->getQueryText();\n\t\t\tif (isset($resultSet['spellcheck']['suggestions']['collation']))\n\t\t\t{\n\t\t\t\t$queryText = strtolower($resultSet['spellcheck']['suggestions']['collation']);\n\t\t\t}\n\n\t\t\tif (!empty($queryText))\n\t\t\t{\n\t\t\t\t$this->queryText = $queryText;\n\t\t\t\t$queryUrl = $this->buildQueryUrl();\n\t\t\t\t$arguments['mm'] = '0%';\n\n\t\t\t\t$resultSet = $this->doRequest($queryUrl, $arguments, 'array');\n\t\t\t}\n\t\t}\n\t\treturn $resultSet;\n\t}", "public function execute(): void\n {\n // 配列のサイズを調べる (PHPでは不要なので実行するだけ)\n $this->readUnsignedShort();\n \n // 空の配列を渡す (nullで埋める)\n $count = $this->popFromOperandStack();\n // need reference\n $ref = new \\ArrayIterator(array_fill(0, $count, null));\n $this->pushToOperandStackByReference($ref);\n }", "public function execute()\n {\n if (!$this->sessionSet && $this->platform instanceof MySqlPlatform) {\n $this->connection->exec(\"SET @@SESSION.sql_mode = '';\");\n $this->sessionSet = true;\n }\n\n // Take a local copy so that we don't modify the original query and cause issues later\n $query = $this->replacePrefix((string) $this->sql);\n\n if (!($this->sql instanceof \\JDatabaseQuery) && ($this->limit > 0 || $this->offset > 0)) {\n // @TODO\n if ($this->offset > 0) {\n $query .= ' LIMIT ' . $this->offset . ', ' . $this->limit;\n } else {\n $query .= ' LIMIT ' . $this->limit;\n }\n }\n\n $this->prepared = $this->connection->prepare($query);\n\n // Increment the query counter.\n $this->count++;\n\n // Reset the error values.\n $this->errorNum = 0;\n $this->errorMsg = '';\n $memoryBefore = null;\n\n // If debugging is enabled then let's log the query.\n if ($this->debug) {\n // Add the query to the object queue.\n $this->log[] = $query;\n\n \\JLog::add($query, \\JLog::DEBUG, 'databasequery');\n\n $this->timings[] = microtime(true);\n }\n\n // Execute the query.\n $this->executed = false;\n $previous = null;\n\n if ($this->prepared instanceof Statement) {\n // Bind the variables:\n if ($this->sql instanceof JDatabaseQueryPreparable) {\n $bounded = $this->sql->getBounded();\n\n foreach ($bounded as $key => $obj) {\n $this->prepared->bindParam($key, $obj->value, $obj->dataType, $obj->length, $obj->driverOptions);\n }\n }\n\n try {\n $this->executed = $this->prepared->execute();\n } catch (\\Exception $previous) {\n }\n }\n\n if ($this->debug) {\n $this->timings[] = microtime(true);\n\n if (defined('DEBUG_BACKTRACE_IGNORE_ARGS')) {\n $this->callStacks[] = debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS);\n } else {\n $this->callStacks[] = debug_backtrace();\n }\n }\n\n // If an error occurred handle it.\n if (!$this->executed) {\n // Get the error number and message before we execute any more queries.\n $errorNum = (int) $this->connection->errorCode();\n $errorMsg = (string) 'SQL: ' . implode(\", \", $this->connection->errorInfo());\n\n // Get the error number and message from before we tried to reconnect.\n $this->errorNum = $errorNum;\n $this->errorMsg = $errorMsg;\n\n // Throw the normal query exception.\n \\JLog::add(\n \\JText::sprintf('JLIB_DATABASE_QUERY_FAILED', $this->errorNum, $this->errorMsg),\n \\JLog::ERROR,\n 'databasequery'\n );\n throw new RuntimeException($this->errorMsg, $this->errorNum, $previous);\n }\n\n return $this->prepared;\n }", "public function Query() {\n \n }", "function mainExec() {\n $numPerPage = 10;\n $numIterations = 1;\n $dataDir = \"./data\";\n $dataDir = \"./data/samples\";\n $conn = new \\PDO(\"sqlite:\" . \"/opt/sqlite_dbs/gcrawler.db\");\n\n $initialise = new InitialiseDB($conn);\n $initialise->createTables();\n\n $terms = [\n \"nz books\",\n \"nz gems\"\n ];\n\n $searchStorer = new SearchStorer($dataDir);\n\n\n foreach ($terms as $currentTerms) {\n $dateSfx = SearchStorer::getDateSuffix();\n // Don't turn on unless crawling live\t\n//\t\t $searchStorer->getPagesContentForTerms($currentTerms, $numIterations, $numPerPage, $dateSfx);\n\n $storedResultsParser = new StoredResultsParser($dataDir, $conn);\n $allStoredLinks = $storedResultsParser->parseContentFiles($currentTerms);\n\n $dated = (new \\DateTime())->format(\"Y-m-d H:i:s\");\n $searchBatchId = $storedResultsParser->insertSearchBatch($currentTerms, $dated);\n // echo \"searchBatchId: \" . $searchBatchId . PHP_EOL;\n\n $storedResultsParser->insertSearchResultsForBatch($searchBatchId, $allStoredLinks);\n }\n}", "public function query() {\n\n }", "function doIndex() {\n $ret = array();\n if( $this->statement->rowCount() > 0 ) {\n $data = $this->statement->fetchAll($this->fetch_style);\n } else {\n $data = array();\n }\n\n foreach( $data as $line ) {\n if( !isset($line[$this->index[0]]) ) {\n throw new Exception(\n \"Index '\" . $this->index[0] . \"' does not exist in data.\"\n );\n }\n $key = $line[$this->index[0]];\n\n if( count($this->index) == 1 ) {\n $ret[$key] = $line;\n } else {\n $key2 = $line[$this->index[1]];\n if( !isset($ret[$key]) ) $ret[$key] = array();\n $ret[$key][$key2] = $line;\n }\n }\n if( $this->sticky == false ) $this->setDefaults();\n return( $ret );\n }", "protected function _execute(array $params)\n {\n $this->importFromSearch();\n }", "function readQuery() {\n\t\t$this->FiscaalGroepID = $this->queryHelper(\"FiscaalGroepID\", 0);\n\t\t$this->FiscaalGroupType = $this->queryHelper(\"FiscaalGroupType\", 0);\n\t\t$this->GewijzigdDoor = $this->queryHelper(\"GewijzigdDoor\", 0);\n\t\t$this->GewijzigdOp = $this->queryHelper(\"GewijzigdOp\", \"\");\n\t}", "private function func_execute () {\n $this -> connection = parent::func_query ($this -> query, $this -> query_data);\n }", "public function hook_before_index(&$result) {\n \n }", "public function takeIndex()\n\t\t{\n\t\t\t$this->csv->takeIndexCSV();\n\t\t\t$this->txt->takeIndexTXT();\n\t\t}", "public function run(){\n $sql = $this->sql();\n return $this->query($sql,$this->args);\n }" ]
[ "0.6163377", "0.578505", "0.5717376", "0.5690343", "0.5688294", "0.56828886", "0.5662445", "0.5647634", "0.56396496", "0.560208", "0.5597707", "0.5592773", "0.55758137", "0.55758137", "0.55709076", "0.55670464", "0.55574834", "0.5541303", "0.5514944", "0.54686254", "0.5461609", "0.5449008", "0.54468805", "0.5435658", "0.54315895", "0.5411893", "0.5385631", "0.53808063", "0.5363483", "0.5363483", "0.5363483", "0.5353701", "0.53506726", "0.5349775", "0.5343822", "0.52922225", "0.52874637", "0.5278637", "0.52776", "0.5241956", "0.52327645", "0.5230578", "0.52266425", "0.5221746", "0.52189153", "0.5215923", "0.5211368", "0.5207673", "0.5192706", "0.51915133", "0.5191036", "0.5188362", "0.5153304", "0.51475847", "0.51435286", "0.5143268", "0.5142892", "0.5131545", "0.51247954", "0.5120563", "0.511874", "0.51136684", "0.51136684", "0.51136684", "0.51136684", "0.51136684", "0.51136684", "0.5113292", "0.5113292", "0.5113292", "0.5113292", "0.5113292", "0.5113292", "0.5113292", "0.5113292", "0.5113292", "0.5113292", "0.5113292", "0.5113292", "0.5113292", "0.5113051", "0.5113051", "0.51080817", "0.5094886", "0.5090902", "0.50904477", "0.5081337", "0.50762194", "0.5074849", "0.50728154", "0.50710547", "0.5063483", "0.50617427", "0.50505966", "0.5048124", "0.50472754", "0.5044377", "0.5042937", "0.50426924", "0.50394607", "0.5037923" ]
0.0
-1
Get document ids likely matching the query It's an array with document ids as keys (performance considerations)
public function matchedDocs() { throw new \Core\Search\Lucene\Exception ( 'Wildcard query should not be directly used for search. Use $query->rewrite($index)' ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getDocumentIds($value, $searchField = null);", "protected function _getSimilarDocsIds() {\n\t\t$similarDocsIds = array();\n\t\t$shingles = $this->_getShigles();\n\t\tforeach ($shingles as $docId => $shingles1Doc) {\n\t\t\t$shinglesList = Hash::apply($shingles, '{n}.{n}', 'array_count_values');\n\t\t\t$shingles1Doc = array_flip($shingles1Doc);\n\t\t\t$shinglesEquals = array_intersect_key($shinglesList, $shingles1Doc);\n\t\t\t$countSimilarShingles = array_sum($shinglesEquals) - count($shingles1Doc);\n\t\t\t$countShingles1Doc = count($shingles1Doc);\n\t\t\t$countShingles = (count($shingles) - 1);\n\n\t\t\tif ($countSimilarShingles <= 0 || $countShingles1Doc <= 0 || $countShingles <= 0) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t$similarity = round((($countSimilarShingles / $countShingles1Doc) * 100) / ($countShingles), 2);\n\t\t\tif ($similarity > $this->_params['allowSimilarity']) {\n\t\t\t\t$similarDocsIds[$docId] = true;\n\t\t\t\tunset($shingles[$docId]);\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn $similarDocsIds;\n\t}", "public function findIds($query = null, $page = null, $options = null);", "public function mapIds($results)\n {\n return collect($results->getDocuments())->pluck('id')->values();\n }", "private function _getProductIdsFromSearchQuery($query)\n {\n $ids = array();\n $client = Mage::helper('catalogsearch')->getEngine()->getClient();\n $response = $client->search($query);\n foreach ($response['hits']['hits'] as $hit) {\n $currentId = $hit['fields']['entity_id'];\n if (is_array($currentId)) {\n $currentId = current($currentId);\n }\n $ids[] = (int) $currentId;\n }\n return $ids;\n }", "public function getAllIds(): array;", "public function getAllIds();", "public function getIds();", "public function getIds();", "public abstract function get_ids();", "function getIds( array $Objects );", "function findCommonDocuments(&$word_map, &$keywords)\r\n{\r\n $count = count($keywords);\r\n //Use document list from 0th word as a reference.\r\n $docidList = array_keys($word_map[$keywords[0]]);\r\n $words = array();\r\n $commonDocId = array(); \r\n \r\n $totalDocs = count($docidList);\r\n \r\n //TODO: Galloping search TBD !!!\r\n //Starting for index 2 as 0,1 points to doc_count and term_count\r\n for($i=2;$i<$totalDocs;$i++) {\r\n $all = true;// Assuming that all words are present in document.\r\n for($j=1;$j<$count;$j++) {\r\n if(isset($word_map[$keywords[$j]][$docidList[$i]]) == false) {\r\n $all = false;//Assumption failed :(\r\n break;\r\n }\r\n }\r\n if($all == true) {\r\n array_push($commonDocId, $docidList[$i]);\r\n }\r\n } \r\n \r\n return $commonDocId; \r\n}", "static public function get_distinct_numbers_ids($doc_ids)\n\t{\n\t\t$data = self::select('id')\n \t\t\t->whereIn('id', $doc_ids)\n \t\t\t->groupBy('document_number')\n \t\t->get()\n \t\t->toArray();\n \t\t$data_plain = array_column($data, 'id');\n \t\n \treturn $data_plain;\n\t}", "private function _getProductIdsFromSearchQuery($query)\n {\n if (is_null($this->_productIds)) {\n $ids = array();\n $client = Mage::helper('catalogsearch')->getEngine()->getClient();\n\n $response = $client->search($query);\n\n foreach ($response['hits']['hits'] as $hit) {\n $currentId = $hit['fields']['entity_id'];\n if (is_array($currentId)) {\n $currentId = current($currentId);\n }\n $ids[] = (int) $currentId;\n }\n $this->_productIds = $ids;\n }\n\n return $this->_productIds;\n }", "public function mapIds($results)\n {\n $ids = array_map(function ($document) {\n return $document->id;\n }, $results->getDocuments());\n\n return collect($ids);\n }", "protected function getDocumentsBySearchArray(Request $request){\n $userId = $request->get('userId');\n if(empty($userId)){\n $result['documents'] = DocumentsDoc::getDocumentsBySearchArray($request);\n $result['favouriteDocIds'] = [];\n } else {\n $result['documents'] = DocumentsDoc::getDocumentsBySearchArray($request);\n $result['favouriteDocIds'] = $this->getFavouritedDocumentIds();\n }\n return $result;\n }", "protected function _sub_ids($eq=false) {\n $ret = array();\n $ce = reset($this->ids);\n $cb = key($this->ids);\n $doc = $this->doc();\n foreach($doc->ids as $b => $e) {\n if($b < $cb || !$eq && $b == $cb) continue;\n if($b < $ce) {\n $ret[$b] = $e;\n }\n else {\n $ce = next($this->ids);\n if(!$ce) break; // end of context\n $cb = key($this->ids);\n }\n }\n return $ret;\n }", "public function getObjectIds();", "public function ids() {\n\t\t$q = $this->query();\n\t\t$q->select(Salesperson::aliasproperty('id'));\n\t\treturn $q->find()->toArray();\n\t}", "public function getContibsIdsForSearch($whereQuery)\n {\n $existsQuery = \"SELECT user_id FROM Participation \".$whereQuery;\n if(($result = $this->getQuery($existsQuery,true)) != NULL)\n {\n $countIds = count($result);\n for($i=0; $i<$countIds; $i++)\n {\n $ids[$i] = $result[$i]['user_id'];\n }\n return $idstring = implode(',',$ids);\n }\n else\n return 0;\n }", "protected function get_retrieved_ids() {\n $ids = $this->parse_ids($items);\n \n $sidx = $eidx = 0;\n if (is_array($this->page_size)) {\n $sidx = $this->page_size[0];\n $eidx = $this->page_size[1];\n if ($sidx < 0)\n $sidx = 0;\n if ($eidx < $sidx)\n $eidx = $sidx;\n if ($eidx >= count($ids))\n $eidx = count($ids) - 1;\n \n $len = $eidx - $sidx + 1;\n if ($sidx >= count($ids))\n $ids = array();\n else\n $ids = array_slice($ids, $sidx, $len);\n }\n\n list($start_count, $max_count) = $this->get_page_limit($this->page_size);\n $num_to_display = $max_count - $start_count + 1;\n $ids = array_slice($ids, $start_count, $num_to_display);\n\n // This is supposed to come at the end of the retrieval, but I don't know where to put it yet.\n // This is legacy code anyway and is going byebye soon.\n //$output[\"eod\"] = $start_count < $max_count;\n //$output[\"counts\"][\"displayed\"] = $start_count;\n //if (!$output[\"eod\"])\n // $output[\"counts\"][\"displayed\"]--;\n return $ids;\n }", "private function extractPostIds()\n {\n $postIds = [];\n $documentType = $this->getConfig()->getDocumentType();\n\n if ($this->searchResult !== null && isset($this->searchResult['records'][$documentType])) {\n foreach ($this->searchResult['records'][$documentType] as $hit) {\n $postIds[] = (int) $hit['external_id'];\n }\n }\n\n if (empty($postIds)) {\n $postIds = [0];\n }\n\n return $postIds;\n }", "protected function getCustomerIds(array $esQuery): array\n {\n // Set\n $idOfHits = [];\n $remaining = 1;\n\n // Loops in a way that it will make additional queries in order to\n // get all _ids of maching Customers.\n while ($remaining > 0) {\n $cursor = $this->customerEsQuery->get(\n $esQuery,\n Customer::class\n );\n\n $idOfHits = array_merge($idOfHits, $cursor->getIdOfHits());\n $esQuery['from'] += $esQuery['size'];\n $remaining = $cursor->countPossible() - $esQuery['from'];\n }\n\n return $idOfHits;\n }", "public function provideSearchResultsIds(ExtendedSearchQuery $query, array $options = [], $offset = 0, $limit) : array;", "function ss_hammerOID_pollers_indexes() {\n\n $return_arr = array();\n\t\t\n\t$rows = db_fetch_assoc(\"SELECT id FROM poller\");\n\n\n for ($i=0;($i<sizeof($rows));$i++) {\n $return_arr[$i] = $rows[$i]['id'];\n }\n\n return $return_arr;\n}", "public function get_synced_indices_ids() {\n\t\t$ids = array();\n\n\t\t// Gather indices used in autocomplete experience.\n\t\t$config = $this->get_autocomplete_config();\n\t\tforeach ( $config as $index ) {\n\t\t\tif ( isset( $index['index_id'] ) ) {\n\t\t\t\t$ids[] = $index['index_id'];\n\t\t\t}\n\t\t}\n\n\t\t// Push index used in instantsearch experience.\n\t\t// Todo: we should allow users to index without using the shipped search UI or backend implementation.\n\t\tif ( $this->should_override_search_in_backend() || $this->should_override_search_with_instantsearch() ) {\n\t\t\t$ids[] = $this->get_native_search_index_id();\n\t\t}\n\n\t\treturn (array) apply_filters( 'algolia_get_synced_indices_ids', $ids );\n\t}", "public function findIdsByMobiles(array $mobiles);", "function getBookIDs($queryResult){\n\t\t$num_results = $queryResult->num_rows;\n\t\t$arrayOfBookIDs = array();\n\n\t\tfor($i = 0; $i < $num_results; $i++){\n\t\t\t$row = $queryResult->fetch_assoc();\n\t\t\t$arrayOfBookIDs[$i] = $row['BookID'];\n\t\t}\n\t\treturn $arrayOfBookIDs;\n\t}", "protected function chooseIdentifierForSearch()\n\t{\n\t\tif( empty($this->myAccountID) )\n\t\t\treturn array( 'col' => 'auth_id', 'val' => $this->myAuthID ) ;\n\t\telse\n\t\t\treturn array( 'col' => 'account_id', 'val' => $this->myAccountID ) ;\n\t}", "protected function getIdsByCollection(Varien_Data_Collection_Db $collection)\n {\n return $collection->getAllIds();\n }", "public function findAllRetainedIds()\n\t{\n\t\t$qb = $this->createQueryBuilder('s');\n\n\t\t$qb->select('s.id')\n\t\t ->where('s.level NOT LIKE :syn')\n\t\t ->setParameter('syn', '%syn%')\n ->orderBy('s.id', 'ASC')\n\t\t;\n\n\t\treturn $qb->getQuery()->getResult();\n\t}", "function ids($field, $key, $value, $offset = 0, $limit = -1)\n {\n $query_offset = $offset;\n $query_limit = $limit;\n # From Cache\n $use_cache = in_array($key, $this->collection_indexes);\n if ($use_cache) {\n $cache_key = $this->cache_key($key, $value, 'ids');\n # If 0 results, nothing to query\n $count = $this->count($key, $value);\n if ($count == 0) {\n return [];\n }\n # If we have all results with default_limit\n # (given that there is less results than default_limit)\n # Or we have enough results with default_limit\n # (given that the max_offset (offset + limit) fits in default_limit)\n # Then we use 'soft offset/limit' with default values, and use cache\n if ($count <= $this->default_limit || $limit && ($offset + $limit) <= $this->default_limit) {\n $soft_offset_limit = true;\n $query_offset = 0;\n $query_limit = $this->default_limit;\n $ids = cache::get($cache_key);\n }\n }\n # From Db\n if (!isset($ids) || !is_array($ids)) {\n $where = [$key => $value];\n $ids = $this->where($where)->offset($query_offset)->limit($query_limit)->fetch_ids($field);\n # Only store default query\n if ($use_cache && $query_offset == 0 && $query_limit == $this->default_limit) {\n cache::set($cache_key, $ids, $this->default_ttl);\n }\n }\n # Soft Offset/Limit\n if (isset($soft_offset_limit)) {\n $ids = array_slice($ids, $offset, $limit > 0 ? $limit : null);\n }\n # Return\n return $ids;\n }", "public function getDefinitionIds()\r\n{\r\n $query_string = \"SELECT wordid FROM glossary \";\r\n $query_string .= \"WHERE word = :word AND wordid != :wordid\";\r\n\r\n return $query_string;\r\n}", "public static function getIdsInUse() {\n global $wpdb;\n $products = Cart66Common::getTableName('products');\n $sql = \"SELECT gravity_form_id as gfid from $products where gravity_form_id > 0\";\n $ids = $wpdb->get_col($sql);\n return $ids;\n }", "public function filterByPrimaryKeys($keys)\n {\n\n return $this->addUsingAlias(DocumentTableMap::COL_DOC_NUM, $keys, Criteria::IN);\n }", "protected function _doc_ids($el, $force_array=true) {\n if($el instanceof self) $el = $el->ids;\n if($force_array) {\n if(is_int($el)) $el = array($el=>$this->doc()->ids[$el]);\n if(!is_array($el)) throw new Exception(__CLASS__ . '->' . __FUNCTION__ . ': not Array!');\n }\n return $el;\n }", "public function get_documents()\n {\n $this->validate_query_key();\n\n $objDocuments = $this\n ->set_per_page()\n ->set_page()\n ->set_facets()\n ->set_filter()\n ->set_exclude_filter()\n ->set_sorting()\n ->set_spellcheck()\n ->set_highlights()\n ->set_result_fields()\n ->get();\n\n $objDocuments->matches = $this->parse_documents($objDocuments->matches);\n return $objDocuments;\n }", "private function findRestaurandsInCommon()\n {\n $dbHandler = Lib\\DbHandler::getDbHandler();\n\n $allRestaurantIDs = array();\n $userlist = $dbHandler->getUsers();\n\n $restaurants = $dbHandler->getRestaurants();\n foreach ($restaurants as $restaurant) {\n $allRestaurantIDs[] = $restaurant->getId();\n }\n foreach ($userlist as $user) {\n $restaurants = $user->getPreferedRestaurantIds();\n $restaurantID = array();\n foreach ($restaurants as $restaurant) {\n $restaurantID[] = $restaurant[\"Id\"];\n\n }\n $allRestaurantIDs = array_intersect($restaurantID,$allRestaurantIDs);\n }\n return $allRestaurantIDs;\n }", "public function get_ids()\n {\n }", "public function get_ids()\n {\n }", "public function get_ids()\n {\n }", "public function get_ids()\n {\n }", "public function get_ids()\n {\n }", "public function get_ids()\n {\n }", "public function get_ids()\n {\n }", "public function get_ids()\n {\n }", "public function getIds() {\n $sources = array();\n \n $sources[] = $this->id;\n \n foreach ($this->points as &$g) {\n $sources[] = $g->id;\n }\n foreach ($this->lines as &$g) {\n $sources[] = $g->id;\n }\n foreach ($this->polygons as &$g) {\n $sources[] = $g->id;\n }\n if ( !empty($this->address) ) {\n $sources[] = $this->address->id;\n }\n foreach ($this->relationships as &$r) {\n $sources[] = $r->id;\n }\n \n return array_filter($sources);\n }", "public function getRelatedIds()\n {\n $related = $this->getRelated ();\n $fullKey = $related->getQualifiedKeyName ();\n return $this->getQuery ()->select ( $fullKey )->lists ( $related->getKeyName () );\n }", "public function getDefinedObjectIds() {}", "public function getDefinedObjectIds() {}", "public function getDefinedObjectIds() {}", "private function extractIdsArray($data)\n {\n return array_pluck($data['photoset'], 'id');\n }", "function getDocuments($ids = array(), $sort = 'menuindex', $dir = 'ASC', $fields = '*') {\r\n global $modx;\r\n\r\n if (count($ids) == 0) {\r\n return false;\r\n } else {\r\n $tblsc = $modx->getFullTableName('site_content');\r\n $tbldg = $modx->getFullTableName('document_groups');\r\n\r\n // add sc. to field names to refere to the table\r\n $fields = 'sc.' . implode(',sc.', preg_replace('/^\\s/i', '', explode(',', $fields)));\r\n $sort = ($sort == '') ? '' : 'sc.' . implode(',sc.', preg_replace('/^\\s/i', '', explode(',', $sort)));\r\n\r\n // get document groups for current user\r\n if ($docgrp = $modx->getUserDocGroups()) {\r\n $docgrp = implode(',', $docgrp);\r\n }\r\n\r\n // build the query to get documents\r\n $access = ($modx->isFrontend() ? 'sc.privateweb=0' : \"1='\" . $_SESSION['mgrRole'] . \"' OR sc.privatemgr=0\") .\r\n (!$docgrp ? '' : ' OR dg.document_group IN (' . $docgrp . ')');\r\n\r\n $sql = 'SELECT DISTINCT ' . $fields . ' FROM ' . $tblsc . ' sc ' .\r\n 'LEFT JOIN ' . $tbldg . ' dg on dg.document = sc.id ' .\r\n 'WHERE (sc.id IN (' . implode(',', $ids) . ')) ' .\r\n 'AND (' . $access . ') ' .\r\n 'GROUP BY sc.id' .\r\n ($sort ? ' ORDER BY ' . $sort . ' ' . $dir : '');\r\n\r\n $result = $modx->dbQuery($sql);\r\n $resource = array();\r\n\r\n // convert resources to array\r\n for ($i = 0; $i < @ $modx->recordCount($result); $i ++) {\r\n array_push($resource, @ $modx->fetchRow($result));\r\n }\r\n\r\n return $resource;\r\n }\r\n }", "public function getSimilarIds()\n {\n return $this->similar_ids;\n }", "function getAllUserIDs() \n {\n //This returns all userids that have rating>0\n $query = \"SELECT users.id FROM users WHERE users.rating > 0\";\n //$query = \"SELECT ratings.model_id FROM ratings WHERE ratings.model='User'\";\n $results = $this->query($query); \n $userIDs = Set::extract($results, '{n}.users.id');\n return $userIDs;\n }", "public function scopeFetchIds()\n {\n return $this->pluck(\"id\");\n }", "public function getItemIds();", "public function getSpotsIds() {\n $query = \"SELECT \" . $this->prefix . \"id FROM ' . $this->prefix . 'spot WHERE spot_track_id=\" . $this->track_id . \" ORDER BY spot_last_update DESC LIMIT \" . $this->limit_spots;\n\n $result = db_query($query);\n\n $spot_ids = array();\n while($row = mysqli_fetch_array($result)){\n $spot_ids[] = $row['spot_id'];\n }\n\n return $spot_ids;\n }", "public function getIdsList() {\n return $this->_get(1);\n }", "private function findPrimaryKeyFields(): array\n {\n $sql = <<<SQL\nWITH schema_ns AS\n(\n SELECT\n oid relnamespace\n FROM \n pg_namespace\n WHERE\n nspname = :schema\n),\ntbl_class AS\n(\n SELECT\n oid tblclassid\n FROM\n pg_class\n WHERE\n relname = :table\n AND\n relnamespace = (\n SELECT\n relnamespace\n FROM\n schema_ns\n )\n),\nindexs AS\n(\n SELECT\n indexrelid\n FROM\n pg_index\n WHERE\n indrelid = (\n SELECT\n tblclassid\n FROM\n tbl_class\n )\n AND\n indisprimary = 't'\n),\npk AS\n(\n SELECT\n attname primary_key\n FROM\n pg_attribute\n WHERE\n attrelid = (\n SELECT\n indexrelid\n FROM \n indexs\n )\n)\n\nSELECT primary_key FROM pk\n\nSQL;\n\n $sth = $this->db->prepare($sql);\n $sth->execute(\n [\n ':table' => $this->table->getName(),\n ':schema' => $this->table->getSchema()\n ]);\n\n $fetched = $sth->fetchAll(PDO::FETCH_OBJ);\n\n $rtn = [];\n\n foreach ( $fetched as $fObj )\n {\n $rtn[] = $fObj->primary_key;\n }\n\n return $rtn;\n }", "public function getAllIds(){\n\n\t\t$qry=$this->db->select('id');\n\t\t$this->db->from('customers');\n\t\t$qry=$this->db->get();\n\t\t$count=$qry->num_rows();\n\t\t$result= $qry->result_array();\n\t\tfor($i=0;$i<$count;$i++){\n\t\t\t\t$values[$result[$i]['id']]=$result[$i]['id'];\n\t\t\t\t}\n\t\n\t\treturn $values;\n\t\n\t}", "public function getIds()\n {\n\n }", "public function fetchSearchIndexIds($offset, $full = false);", "protected function _getProcessedProductIds()\r\n {\r\n $maxLimit = $this->_getProductLimit();\r\n $orderBy = Mage::getStoreConfig('progos_partialindex/index/setOrder');\r\n $collection = Mage::getModel('partialindex/product_index')->getCollection()->distinct(true);\r\n $collection = $collection->getSelect()->reset(Zend_Db_Select::COLUMNS)->columns('product_id as product_id');\r\n //$collection = $collection->order('sort_order DESC');\r\n\r\n if($orderBy) {\r\n $collection = $collection->order('sort_order ASC');\r\n }\r\n else {\r\n $collection = $collection->order('sort_order DESC');\r\n }\r\n if($maxLimit > 0){\r\n $collection = $collection->limit($maxLimit);\r\n }\r\n\r\n $connection = $this->_getReadAdapter();\r\n return $connection->fetchCol($collection);\r\n }", "public function getIdsForUser($user_id, $client_id);", "function dbQueryStudentIdList($ids)\n {\n $where = \" WHERE id IN (\" . arrayToDBString($ids) . \")\";\n $rs = $this->_getFullList($where);\n return $rs;\n }", "function getPostIdArray($userIdarray)\n{\n global $conn;\n $postIds = array();\n\n $sql = \"SELECT post.postId FROM user JOIN post ON user.userId=post.userId WHERE \";\n\n $length = sizeof($userIdarray);\n $counter = 0;\n\n foreach ($userIdarray as $user) {\n $counter++;\n $sql .= \"user.userId='\" . $user . \"' \";\n if ($counter != $length) {\n $sql .= \"OR \";\n } else {\n $sql .= \"AND post.deleted=0 ORDER BY post.creationTime DESC;\";\n\n }\n }\n\n $result = mysqli_query($conn, $sql);\n\n if ($result == false) {\n return $postIds;\n } else {\n while ($row = mysqli_fetch_assoc($result)) {\n\n $postIds[] = $row['postId'];\n\n }\n\n return $postIds;\n }\n\n}", "public static function getCollectionsIds($user_id) {\n\t\treturn parent::$db->getIds(self::getCollections($user_id), 'UserCollection.collection_id');\n\t}", "function kalium_get_post_ids_from_query( $query ) {\n\t$ids = [];\n\n\tforeach ( $query->posts as $post ) {\n\t\tif ( is_object( $post ) ) {\n\t\t\t$ids[] = $post->ID;\n\t\t} else if ( is_numeric( $post ) ) {\n\t\t\t$ids[] = $post;\n\t\t}\n\t}\n\n\treturn $ids;\n}", "protected function _getFilterEntityIds()\n {\n return $this->getLayer()->getProductCollection()->getAllIdsCache();\n }", "function getAllDistinctFileIndex() {\r\n\t\t\t$query = $this->pdo->prepare('select distinct file_index from document_details');\r\n\t\t\t$query->execute();\r\n\t\t\treturn $query->fetchAll();\r\n\t\t}", "function taminoGetIds() {\n $rval = $this->tamino->xquery($this->xquery);\n if ($rval) { // tamino Error\n print \"<p>LinkCollection Error: failed to retrieve linkRecord id list.<br>\";\n print \"(Tamino error code $rval)</p>\";\n } else { \n // convert xml ids into a php array \n $this->ids = array();\n $this->xml_result = $this->tamino->xml->getBranches(\"ino:response/xq:result\");\n if ($this->xml_result) {\n\t// Cycle through all of the branches \n\tforeach ($this->xml_result as $branch) {\n\t if ($att = $branch->getTagAttribute(\"id\", \"xq:attribute\")) {\n\t array_push($this->ids, $att);\n\t }\n\t} /* end foreach */\n } \n }\n\n }", "public function getFilteredIds()\n {\n return $this->filteredIds;\n }", "public static function fetchIds($query_id = FALSE, $field = 'id')\n {\n return self::fetchObjectSet($query_id, $field);\n }", "public function postKeys()\n\t{\t\n\t\t// get the document types\n\t\t$documents = explode(\"|\", Input::get('documents'));\n\t\t$searchComponent = new MediaSearchComponent();\n\n\t\t// store all keys in this array\n\t\t$docKeys = [];\n\n\t\t// go through each selected document type and get the keys\n\t\tforeach($documents as $type) {\n\n\t\t\t// skip if value is empty\n\t\t\tif($type == \"\") {\n\t\t\t\tcontinue;\n\t\t\t} elseif($type == \"all\") {\n\t\t\t\t$units = Unit::select('content')->get();\n\t\t\t} else {\n\t\t\t\t// split the document type string so that we can get the project name from it.\n\t\t\t\t$type = explode('__', $type);\n\t\t\t\t// get the content of the units for this document type in this project\n\t\t\t\t// if the load on the system is too high limit this to e.g. 100 random units.\n\t\t\t\t$units = Unit::select('content')->where('project', $type[0])->where('documentType', $type[1])->get();\n\t\t\t}\n\n\t\t\t// get the keys for the units in this document type\n\t\t\tforeach($units as $unit) {\n\t\t\t\t$unit->attributesToArray();\n\t\t\t\t$keys = $searchComponent->getKeys($unit['attributes']);\n\t\t\t\t$docKeys = array_unique(array_merge($docKeys, $keys));\n\t\t\t}\n\t\t}\n\n//\t\tasort($keys);\n\t\t\n\t\treturn $docKeys;\n\t}", "public function search_singer_id( $q, $limit = 0 )\n\t{\n\t\t$limit = $limit ? ( int ) $limit : 100;\n\t\t$array = array();\n\n\t\t$sql = \"SELECT id FROM \" . $this->table_prefix . \"_singer WHERE tenthat LIKE '%\" . $this->db->quote( $q ) . \"%' LIMIT 0,\" . $limit;\n\t\t$result = $this->db->query( $sql );\n\t\twhile( $row = $result->fetch() )\n\t\t{\n\t\t\t$array[] = $row['id'];\n\t\t}\n\n\t\treturn $array;\n\t}", "function getAllUserIds($filter) {\n\t//SELECT id FROM students\n\t$sql = \"SELECT id FROM users WHERE $filter = 1\";\n\t$userIds = queryColumn($sql);\n\n\treturn $userIds;\n}", "public function getStoreIds();", "public function ids( array $params = array() );", "public static function getAllIds(): array\n {\n return ArrayHelper::getColumn(static::find()->select('id')->asArray()->all(), 'id');\n }", "public function get_by_criteria( $criteria, $limit, $offset ) {\n\t\t$hits = $this->_index->find( strtolower( $criteria ) );\n\t\t$ids = array();\n\t\t\n\t\t$counter = 1;\n\t\tforeach( $hits as $hit ) {\n\t\t\tif( $offset < $counter ) {\n\t\t\t\t$ids[] = $hit->postid;\n\t\t\t}\n\t\t\t$counter++;\n\t\t\tif( $counter > ($limit+$offset) ) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn $ids;\n\t}", "public function get_allowed_article_ids_query() {\n\t\tif ($this->is_current_user_admin() || apply_filters('minerva_restrict_access_allowed', false)) {\n\t\t\treturn null; // admins can watch all content\n\t\t}\n\n\t\t$allowed_ids = $this->get_allowed_article_ids_for_user();\n\n\t\treturn !empty($allowed_ids) ? $allowed_ids : array(-1);\n\t}", "public function getIds(array $aData = [], bool $bIncludeDeleted = false): array\n {\n $this->deprecatedIncludeDeleted($bIncludeDeleted);\n return array_map('intval', $this->getAllColumn('id', $aData));\n }", "function find_common_keywords($results, $original_query) {\n $I=0;\n $key_word_list = array();\n\n foreach ($results->papers as $paper) {\n\n foreach($paper->keywords as $item){\n $itemm = strtolower($item);\n\n if (array_key_exists($itemm, $key_word_list)) {\n $key_word_list[$itemm] = $key_word_list[$itemm] + 1;\n }\n else if ($itemm != strtolower($original_query)) {\n $key_word_list[$itemm] = 1;\n }\n }\n }\n\n arsort($key_word_list);\n\n $k = array_keys($key_word_list);\n $k = array_slice($k, 0, 10);\n return $k;\n }", "function getJournalIds() {\n\t\t$result =& $this->retrieve(\n\t\t\t'SELECT DISTINCT journal_id FROM counter_monthly_log l'\n\t\t);\n\t\t$journalIds = array();\n\t\twhile (!$result->EOF) {\n\t\t\t$row = $result->GetRowAssoc(false);\n\t\t\t$journalIds[] = $row['journal_id'];\n\t\t\t$result->MoveNext();\n\t\t}\n\t\t$result->Close();\n\t\treturn $journalIds;\n\t}", "public function getPrimaryKeys()\n\t{\n\t\treturn array_keys($this->getArrayCopy());\n\t}", "public static function FindPrimaryKeys($search=\"_ID\"){\n\t\t$out = array();\n\t\tforeach(static::ShowTables() as $tableName){\n\t\t\t$result = static::Query(\"SHOW COLUMNS FROM `$tableName`\");\n\t\t\tforeach (static::GetResultAsArray($result) as $data) {\n\t\t\t\tif($data[\"Key\"]==\"PRI\" && $data[\"Extra\"]==\"auto_increment\"){\n\t\t\t\t\tif(strlen($search)){\n\t\t\t\t\t\tif(StartsWith($data[\"Field\"],$search) || EndsWith($data[\"Field\"],$search)){\n\t\t\t\t\t\t\t$out[$tableName] = $data[\"Field\"];\n\t\t\t\t\t\t}\n\t\t\t\t\t}else{\n\t\t\t\t\t\t$out[$tableName] = $data[\"Field\"];\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn $out;\n\t}", "public function getSearchRootPageIdList() {}", "public function getSearchRootPageIdList() {}", "public static function identifierForQuery(AggregateId $aggregateId): array;", "protected function getPrintPageIds()\n\t{\n\t\tif(is_array($_POST[\"wordr\"]))\n\t\t{\n\t\t\tasort($_POST[\"wordr\"]);\t\t\t\n\t\t\t$page_ids = array_keys($_POST[\"wordr\"]);\t\n\t\t}\n\t\t// single page\n\t\telse if((int)$_GET[\"wpg_id\"])\n\t\t{\n\t\t\t$page_ids = array((int)$_GET[\"wpg_id\"]);\n\t\t}\n\t\t\n\t\treturn $page_ids;\n\t}", "protected function getCustomerIdsForReindex()\n {\n $connection = $this->resource->getConnection();\n $gridTableName = $this->flatScopeResolver->resolve(Customer::CUSTOMER_GRID_INDEXER_ID, []);\n\n $select = $connection->select()\n ->from($this->resource->getTableName($gridTableName), 'last_visit_at')\n ->order('last_visit_at DESC')\n ->limit(1);\n $lastVisitAt = $connection->query($select)->fetchColumn();\n\n $select = $connection->select()\n ->from($this->resource->getTableName('customer_log'), 'customer_id')\n ->where('last_login_at > ?', $lastVisitAt);\n\n $customerIds = [];\n foreach ($connection->query($select)->fetchAll() as $row) {\n $customerIds[] = $row['customer_id'];\n }\n\n return $customerIds;\n }", "public function executeIdsQuery($query, ApiRequest $apiRequest)\n {\n $repository = $this->orm->getRepositoryFromQuery($query);\n $idsQuery = $this->orm->getIdsQuery($repository);\n \n $this->addFilterCriteria($idsQuery, $repository, $apiRequest->getFilters());\n $this->addSortCriteria($idsQuery, $repository, $apiRequest->getSort());\n $this->addPageCriteria($idsQuery, $repository, $apiRequest->getPageSize(), $apiRequest->getPageNumber());\n $ids = array_map(function($item) {\n return $item['id'];\n }, $this->orm->executeQuery($idsQuery));\n return $ids;\n }", "function query($filter=[],$options=[]){\n if(!$this->db_coll_set()){\n return [\"error\"=>\"db or collection not set.\"];\n }\n $results = [];\n \n if(array_key_exists('_id',$filter) && strlen($filter['_id']) >= 24){\n $filter['_id'] = new MongoDB\\BSON\\ObjectID($filter['_id']);\n }\n \n $query = new MongoDB\\Driver\\Query($filter, $options);\n $cursor = $this->manager->executeQuery($this->dbdotcoll, $query);\n \n foreach ($cursor as $document) { \n $results[] = $document;\n }\n return $results;\n }", "public function getReferenceIdsList(){\n return $this->_get(2);\n }", "public static function getDocumentsIdsByFeatureId($id, $store_number)\n {\n $feature_docs = FeatureDocument::getFeaturedDocumentArray($id, $store_number);\n \n $feature_packages = FeaturePackage::getFeaturePackagesArray($id);\n\n $feature_folders = [];\n \n foreach ($feature_packages as $package_id) {\n \n $package_docs = DocumentPackage::getDocumentArrayInPackage($package_id, $store_number);\n $feature_docs = array_merge_recursive($feature_docs, $package_docs);\n unset($package_docs);\n\n $package_folders = FolderPackage::getFolderArrayInPackage($package_id);\n \n\n foreach ($package_folders as $folderTreeRootId) {\n $folderTree = Folder::getFolderChildrenTree($folderTreeRootId); \n \n foreach ($folderTree as $folderNode) {\n \n array_push($feature_folders, $folderNode[\"global_folder_id\"]);\n\n }\n \n }\n \n }\n \n foreach ($feature_folders as $folder_id) {\n $docs = FileFolder::getDocumentArrayInFolder($folder_id, $store_number);\n $feature_docs = array_merge_recursive($feature_docs, $docs);\n }\n $feature_docs = array_unique($feature_docs);\n \n return $feature_docs;\n \n\n }", "function get_custom_fied_ids($p_types) {\n\t\t\t$t_custom_field_table = db_get_table( 'mantis_custom_field_table' );\n\t\t\t$query = \"SELECT *\n\t\t\t\t\t FROM $t_custom_field_table\n\t\t\t\t\t ORDER BY name ASC\";\n\t\t\t$result = db_query_bound( $query );\n\t\t\t$t_row_count = db_num_rows( $result );\n\t\t\t$t_ids = array();\n\t\n\t\t\tfor( $i = 0;$i < $t_row_count;$i++ ) {\n\t\t\t\t$row = db_fetch_array( $result );\n\t\t\t\tforeach($p_types as $t_type) {\n\t\t\t\t\tif($row['type'] == $t_type) {\n\t\t\t\t\t\tarray_push( $t_ids, $row['id'] );\n\t\t\t\t\t}\n\t\t\t\t\t/* Else do nothing */\n\t\t\t\t}\n\t\t\t}\n\t\n\t\t\treturn $t_ids;\n\t\t}", "public function getIds(): array\n {\n return $this->ids;\n }", "function getEventIDs() {\n\t\t$return = array();\n\n\t\tif ( $this->getCount() > 0 ) {\n\t\t\tforeach ( $this as $oObject ) {\n\t\t\t\t$return[] = $oObject->getID();\n\t\t\t}\n\t\t}\n\n\t\treturn $return;\n\t}", "function getObjectIDs() {\n\t\t$tmp = array();\n\t\tif ( $this->getCount() > 0 ) {\n\t\t\tforeach ( $this as $oObject ) {\n\t\t\t\t$tmp[] = $oObject->getID();\n\t\t\t}\n\t\t}\n\t\treturn $tmp;\n\t}", "public function getIds(): array\n {\n return array_map(fn (Entity $entity) => $entity->getId(), $this->entities);\n }" ]
[ "0.7158156", "0.6622777", "0.6458702", "0.63155633", "0.61929876", "0.61672574", "0.6145603", "0.6135002", "0.6135002", "0.61338615", "0.60632384", "0.59815097", "0.59785223", "0.59538245", "0.5947383", "0.59340036", "0.5895469", "0.5864195", "0.5841399", "0.57699335", "0.57656777", "0.5733816", "0.5715598", "0.5685362", "0.56153864", "0.5615238", "0.56077725", "0.5577889", "0.5554998", "0.55521613", "0.55308384", "0.54886717", "0.54763484", "0.54614234", "0.5435339", "0.5427744", "0.54208827", "0.5399336", "0.53980404", "0.53980404", "0.53980404", "0.53980404", "0.53980404", "0.53980404", "0.53980404", "0.53980404", "0.53976786", "0.5397007", "0.537274", "0.53719395", "0.53719395", "0.53661335", "0.53641444", "0.53601414", "0.53539544", "0.5334782", "0.5319664", "0.53144956", "0.5313677", "0.5303659", "0.5294913", "0.5294837", "0.52858996", "0.52793306", "0.5278657", "0.52757716", "0.52736247", "0.5266831", "0.5261505", "0.52593213", "0.5259049", "0.5258044", "0.52425855", "0.52412844", "0.523907", "0.5230206", "0.5210841", "0.5205247", "0.5203769", "0.52033484", "0.519818", "0.51925033", "0.5189426", "0.5184585", "0.5182818", "0.518153", "0.51781714", "0.5167585", "0.5167585", "0.51671475", "0.5164532", "0.51542753", "0.514524", "0.514226", "0.5137079", "0.5134016", "0.5131094", "0.5130674", "0.51262116", "0.5124175", "0.51240337" ]
0.0
-1
Auto generated seed file
public function run() { \DB::table('cms_logs')->delete(); \DB::table('cms_logs')->insert(array ( 0 => array ( 'id' => 1, 'ipaddress' => '127.0.0.1', 'useragent' => 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.67 Safari/537.36', 'url' => 'http://127.0.0.1:8000/admin/login', 'description' => 'admin@crudbooster.com login with IP Address 127.0.0.1', 'details' => '', 'id_cms_users' => 1, 'created_at' => '2018-10-18 07:06:09', 'updated_at' => NULL, ), 1 => array ( 'id' => 2, 'ipaddress' => '127.0.0.1', 'useragent' => 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.67 Safari/537.36', 'url' => 'http://127.0.0.1:8000/admin/module_generator/delete/12', 'description' => 'Delete data siswa at Module Generator', 'details' => '', 'id_cms_users' => 1, 'created_at' => '2018-10-18 07:38:16', 'updated_at' => NULL, ), 2 => array ( 'id' => 3, 'ipaddress' => '127.0.0.1', 'useragent' => 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.67 Safari/537.36', 'url' => 'http://127.0.0.1:8000/admin/menu_management/delete/1', 'description' => 'Delete data siswa at Menu Management', 'details' => '', 'id_cms_users' => 1, 'created_at' => '2018-10-18 07:38:28', 'updated_at' => NULL, ), 3 => array ( 'id' => 4, 'ipaddress' => '127.0.0.1', 'useragent' => 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.67 Safari/537.36', 'url' => 'http://127.0.0.1:8000/admin/Siswa/delete/8', 'description' => 'Delete data Dudi Iskadar at siswa', 'details' => '', 'id_cms_users' => 1, 'created_at' => '2018-10-18 08:00:36', 'updated_at' => NULL, ), 4 => array ( 'id' => 5, 'ipaddress' => '127.0.0.1', 'useragent' => 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.67 Safari/537.36', 'url' => 'http://127.0.0.1:8000/admin/login', 'description' => 'admin@crudbooster.com login with IP Address 127.0.0.1', 'details' => '', 'id_cms_users' => 1, 'created_at' => '2018-10-18 12:38:02', 'updated_at' => NULL, ), 5 => array ( 'id' => 6, 'ipaddress' => '127.0.0.1', 'useragent' => 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.67 Safari/537.36', 'url' => 'http://127.0.0.1:8000/admin/users/edit-save/1', 'description' => 'Update data Super Admin at Users Management', 'details' => '<table class="table table-striped"><thead><tr><th>Key</th><th>Old Value</th><th>New Value</th></thead><tbody><tr><td>photo</td><td></td><td>uploads/1/2018-10/untitled.png</td></tr><tr><td>password</td><td>$2y$10$QaSjOfYA7lKfvuqidXyxQOZ5EjGLUp3duynbdnwbWmPv4x23tW242</td><td></td></tr><tr><td>status</td><td>Active</td><td></td></tr></tbody></table>', 'id_cms_users' => 1, 'created_at' => '2018-10-18 12:42:14', 'updated_at' => NULL, ), 6 => array ( 'id' => 7, 'ipaddress' => '127.0.0.1', 'useragent' => 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.67 Safari/537.36', 'url' => 'http://127.0.0.1:8000/admin/logout', 'description' => 'admin@crudbooster.com logout', 'details' => '', 'id_cms_users' => 1, 'created_at' => '2018-10-18 12:42:27', 'updated_at' => NULL, ), 7 => array ( 'id' => 8, 'ipaddress' => '127.0.0.1', 'useragent' => 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.67 Safari/537.36', 'url' => 'http://127.0.0.1:8000/admin/login', 'description' => 'admin@crudbooster.com login with IP Address 127.0.0.1', 'details' => '', 'id_cms_users' => 1, 'created_at' => '2018-10-18 12:42:53', 'updated_at' => NULL, ), 8 => array ( 'id' => 9, 'ipaddress' => '127.0.0.1', 'useragent' => 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.67 Safari/537.36', 'url' => 'http://127.0.0.1:8000/admin/users/edit-save/1', 'description' => 'Update data Super Admin at Users Management', 'details' => '<table class="table table-striped"><thead><tr><th>Key</th><th>Old Value</th><th>New Value</th></thead><tbody><tr><td>email</td><td>admin@crudbooster.com</td><td>admin@surveryor.id</td></tr><tr><td>password</td><td>$2y$10$QaSjOfYA7lKfvuqidXyxQOZ5EjGLUp3duynbdnwbWmPv4x23tW242</td><td></td></tr><tr><td>status</td><td>Active</td><td></td></tr></tbody></table>', 'id_cms_users' => 1, 'created_at' => '2018-10-18 12:48:05', 'updated_at' => NULL, ), 9 => array ( 'id' => 10, 'ipaddress' => '127.0.0.1', 'useragent' => 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.67 Safari/537.36', 'url' => 'http://127.0.0.1:8000/admin/users/add-save', 'description' => 'Add New Data Team Marketing at Users Management', 'details' => '', 'id_cms_users' => 1, 'created_at' => '2018-10-18 12:48:42', 'updated_at' => NULL, ), 10 => array ( 'id' => 11, 'ipaddress' => '127.0.0.1', 'useragent' => 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.67 Safari/537.36', 'url' => 'http://127.0.0.1:8000/admin/users/add-save', 'description' => 'Add New Data Team Tender at Users Management', 'details' => '', 'id_cms_users' => 1, 'created_at' => '2018-10-18 12:49:20', 'updated_at' => NULL, ), 11 => array ( 'id' => 12, 'ipaddress' => '127.0.0.1', 'useragent' => 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.67 Safari/537.36', 'url' => 'http://127.0.0.1:8000/admin/users/add-save', 'description' => 'Add New Data Verifikator at Users Management', 'details' => '', 'id_cms_users' => 1, 'created_at' => '2018-10-18 12:49:50', 'updated_at' => NULL, ), 12 => array ( 'id' => 13, 'ipaddress' => '127.0.0.1', 'useragent' => 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.67 Safari/537.36', 'url' => 'http://127.0.0.1:8000/admin/logout', 'description' => 'admin@surveryor.id logout', 'details' => '', 'id_cms_users' => 1, 'created_at' => '2018-10-18 12:52:29', 'updated_at' => NULL, ), 13 => array ( 'id' => 14, 'ipaddress' => '127.0.0.1', 'useragent' => 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.67 Safari/537.36', 'url' => 'http://127.0.0.1:8000/admin/login', 'description' => 'admin@surveryor.id login with IP Address 127.0.0.1', 'details' => '', 'id_cms_users' => 1, 'created_at' => '2018-10-18 12:54:22', 'updated_at' => NULL, ), 14 => array ( 'id' => 15, 'ipaddress' => '127.0.0.1', 'useragent' => 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.67 Safari/537.36', 'url' => 'http://127.0.0.1:8000/admin/menu_management/edit-save/4', 'description' => 'Update data Kategori Pengguna Jasa at Menu Management', 'details' => '<table class="table table-striped"><thead><tr><th>Key</th><th>Old Value</th><th>New Value</th></thead><tbody><tr><td>color</td><td></td><td>normal</td></tr></tbody></table>', 'id_cms_users' => 1, 'created_at' => '2018-10-18 13:42:06', 'updated_at' => NULL, ), 15 => array ( 'id' => 16, 'ipaddress' => '127.0.0.1', 'useragent' => 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.67 Safari/537.36', 'url' => 'http://127.0.0.1:8000/admin/tabel_kategori_pengguna_jasa/add-save', 'description' => 'Add New Data BUMN at Kategori Pengguna Jasa', 'details' => '', 'id_cms_users' => 1, 'created_at' => '2018-10-18 13:45:15', 'updated_at' => NULL, ), 16 => array ( 'id' => 17, 'ipaddress' => '127.0.0.1', 'useragent' => 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.67 Safari/537.36', 'url' => 'http://127.0.0.1:8000/admin/tabel_pelanggan/add-save', 'description' => 'Add New Data Jasa Marga at Daftar Pelanggan', 'details' => '', 'id_cms_users' => 1, 'created_at' => '2018-10-18 13:52:31', 'updated_at' => NULL, ), 17 => array ( 'id' => 18, 'ipaddress' => '127.0.0.1', 'useragent' => 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.67 Safari/537.36', 'url' => 'http://127.0.0.1:8000/admin/menu_management/edit-save/3', 'description' => 'Update data Daftar Pelanggan at Menu Management', 'details' => '<table class="table table-striped"><thead><tr><th>Key</th><th>Old Value</th><th>New Value</th></thead><tbody><tr><td>color</td><td></td><td>normal</td></tr><tr><td>sorting</td><td>2</td><td></td></tr></tbody></table>', 'id_cms_users' => 1, 'created_at' => '2018-10-18 14:19:15', 'updated_at' => NULL, ), 18 => array ( 'id' => 19, 'ipaddress' => '127.0.0.1', 'useragent' => 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.67 Safari/537.36', 'url' => 'http://127.0.0.1:8000/admin/Siswa/add-save', 'description' => 'Add New Data Dudi Iskandar at siswa', 'details' => '', 'id_cms_users' => 1, 'created_at' => '2018-10-18 14:23:02', 'updated_at' => NULL, ), 19 => array ( 'id' => 20, 'ipaddress' => '127.0.0.1', 'useragent' => 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.67 Safari/537.36', 'url' => 'http://127.0.0.1:8000/admin/statistic_builder/add-save', 'description' => 'Add New Data TEst at Statistic Builder', 'details' => '', 'id_cms_users' => 1, 'created_at' => '2018-10-18 14:48:47', 'updated_at' => NULL, ), 20 => array ( 'id' => 21, 'ipaddress' => '127.0.0.1', 'useragent' => 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.67 Safari/537.36', 'url' => 'http://127.0.0.1:8000/admin/logout', 'description' => 'admin@surveryor.id logout', 'details' => '', 'id_cms_users' => 1, 'created_at' => '2018-10-18 14:53:04', 'updated_at' => NULL, ), 21 => array ( 'id' => 22, 'ipaddress' => '127.0.0.1', 'useragent' => 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.67 Safari/537.36', 'url' => 'http://127.0.0.1:8000/admin/login', 'description' => 'marketing@surveyor.id login with IP Address 127.0.0.1', 'details' => '', 'id_cms_users' => 2, 'created_at' => '2018-10-18 14:53:27', 'updated_at' => NULL, ), 22 => array ( 'id' => 23, 'ipaddress' => '127.0.0.1', 'useragent' => 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.67 Safari/537.36', 'url' => 'http://127.0.0.1:8000/admin/tabel_pelanggan', 'description' => 'Try view the data :name at Daftar Pelanggan', 'details' => '', 'id_cms_users' => 2, 'created_at' => '2018-10-18 14:53:31', 'updated_at' => NULL, ), 23 => array ( 'id' => 24, 'ipaddress' => '127.0.0.1', 'useragent' => 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.67 Safari/537.36', 'url' => 'http://127.0.0.1:8000/admin/tabel_kategori_pengguna_jasa', 'description' => 'Try view the data :name at Kategori Pengguna Jasa', 'details' => '', 'id_cms_users' => 2, 'created_at' => '2018-10-18 14:53:36', 'updated_at' => NULL, ), 24 => array ( 'id' => 25, 'ipaddress' => '127.0.0.1', 'useragent' => 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.67 Safari/537.36', 'url' => 'http://127.0.0.1:8000/admin/logout', 'description' => 'marketing@surveyor.id logout', 'details' => '', 'id_cms_users' => 2, 'created_at' => '2018-10-18 14:53:49', 'updated_at' => NULL, ), 25 => array ( 'id' => 26, 'ipaddress' => '127.0.0.1', 'useragent' => 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.67 Safari/537.36', 'url' => 'http://127.0.0.1:8000/admin/login', 'description' => 'admin@surveryor.id login with IP Address 127.0.0.1', 'details' => '', 'id_cms_users' => 1, 'created_at' => '2018-10-18 14:54:39', 'updated_at' => NULL, ), 26 => array ( 'id' => 27, 'ipaddress' => '127.0.0.1', 'useragent' => 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.67 Safari/537.36', 'url' => 'http://127.0.0.1:8000/admin/logout', 'description' => ' logout', 'details' => '', 'id_cms_users' => NULL, 'created_at' => '2018-10-19 01:14:56', 'updated_at' => NULL, ), 27 => array ( 'id' => 28, 'ipaddress' => '127.0.0.1', 'useragent' => 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.67 Safari/537.36', 'url' => 'http://127.0.0.1:8000/admin/login', 'description' => 'marketing@surveyor.id login with IP Address 127.0.0.1', 'details' => '', 'id_cms_users' => 2, 'created_at' => '2018-10-19 01:15:18', 'updated_at' => NULL, ), 28 => array ( 'id' => 29, 'ipaddress' => '127.0.0.1', 'useragent' => 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.67 Safari/537.36', 'url' => 'http://127.0.0.1:8000/admin/logout', 'description' => 'marketing@surveyor.id logout', 'details' => '', 'id_cms_users' => 2, 'created_at' => '2018-10-19 01:15:59', 'updated_at' => NULL, ), 29 => array ( 'id' => 30, 'ipaddress' => '127.0.0.1', 'useragent' => 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.67 Safari/537.36', 'url' => 'http://127.0.0.1:8000/admin/login', 'description' => 'admin@surveryor.id login with IP Address 127.0.0.1', 'details' => '', 'id_cms_users' => 1, 'created_at' => '2018-10-19 07:28:04', 'updated_at' => NULL, ), 30 => array ( 'id' => 31, 'ipaddress' => '127.0.0.1', 'useragent' => 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.67 Safari/537.36', 'url' => 'http://127.0.0.1:8000/admin/module_generator/delete/15', 'description' => 'Delete data Kategori Pengguna Jasa at Module Generator', 'details' => '', 'id_cms_users' => 1, 'created_at' => '2018-10-19 07:33:04', 'updated_at' => NULL, ), 31 => array ( 'id' => 32, 'ipaddress' => '127.0.0.1', 'useragent' => 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.67 Safari/537.36', 'url' => 'http://127.0.0.1:8000/admin/module_generator/delete/14', 'description' => 'Delete data Daftar Pelanggan at Module Generator', 'details' => '', 'id_cms_users' => 1, 'created_at' => '2018-10-19 07:36:24', 'updated_at' => NULL, ), 32 => array ( 'id' => 33, 'ipaddress' => '127.0.0.1', 'useragent' => 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.67 Safari/537.36', 'url' => 'http://127.0.0.1:8000/admin/module_generator/delete/13', 'description' => 'Delete data Daftar Siswa at Module Generator', 'details' => '', 'id_cms_users' => 1, 'created_at' => '2018-10-19 07:36:36', 'updated_at' => NULL, ), 33 => array ( 'id' => 34, 'ipaddress' => '127.0.0.1', 'useragent' => 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.67 Safari/537.36', 'url' => 'http://127.0.0.1:8000/admin/menu_management/add-save', 'description' => 'Add New Data Master Data at Menu Management', 'details' => '', 'id_cms_users' => 1, 'created_at' => '2018-10-19 07:52:04', 'updated_at' => NULL, ), 34 => array ( 'id' => 35, 'ipaddress' => '127.0.0.1', 'useragent' => 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.67 Safari/537.36', 'url' => 'http://127.0.0.1:8000/admin/enumeration/edit-save/18', 'description' => 'Update data at Enumeration', 'details' => '<table class="table table-striped"><thead><tr><th>Key</th><th>Old Value</th><th>New Value</th></thead><tbody><tr><td>updated_by</td><td></td><td>1</td></tr></tbody></table>', 'id_cms_users' => 1, 'created_at' => '2018-10-19 09:00:44', 'updated_at' => NULL, ), 35 => array ( 'id' => 36, 'ipaddress' => '127.0.0.1', 'useragent' => 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.67 Safari/537.36', 'url' => 'http://127.0.0.1:8000/admin/pelanggan/add-save', 'description' => 'Add New Data Jasa Marga at Daftar Pelanggan', 'details' => '', 'id_cms_users' => 1, 'created_at' => '2018-10-19 09:11:08', 'updated_at' => NULL, ), 36 => array ( 'id' => 37, 'ipaddress' => '127.0.0.1', 'useragent' => 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.67 Safari/537.36', 'url' => 'http://127.0.0.1:8000/admin/pelanggan/edit-save/1', 'description' => 'Update data Jasa Marga at Daftar Pelanggan', 'details' => '<table class="table table-striped"><thead><tr><th>Key</th><th>Old Value</th><th>New Value</th></thead><tbody><tr><td>negara</td><td></td><td>Indonesia</td></tr><tr><td>kecamatan</td><td></td><td>Dramaga</td></tr><tr><td>kelurahan</td><td></td><td>Purwasari</td></tr><tr><td>kode_pos</td><td></td><td>16680</td></tr><tr><td>updated_by</td><td></td><td>1</td></tr></tbody></table>', 'id_cms_users' => 1, 'created_at' => '2018-10-19 09:13:05', 'updated_at' => NULL, ), 37 => array ( 'id' => 38, 'ipaddress' => '127.0.0.1', 'useragent' => 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.67 Safari/537.36', 'url' => 'http://127.0.0.1:8000/admin/menu_management/edit-save/5', 'description' => 'Update data Enumeration at Menu Management', 'details' => '<table class="table table-striped"><thead><tr><th>Key</th><th>Old Value</th><th>New Value</th></thead><tbody><tr><td>color</td><td></td><td>normal</td></tr><tr><td>parent_id</td><td>6</td><td></td></tr></tbody></table>', 'id_cms_users' => 1, 'created_at' => '2018-10-19 09:13:47', 'updated_at' => NULL, ), 38 => array ( 'id' => 39, 'ipaddress' => '127.0.0.1', 'useragent' => 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.67 Safari/537.36', 'url' => 'http://127.0.0.1:8000/admin/menu_management/edit-save/7', 'description' => 'Update data Daftar Pelanggan at Menu Management', 'details' => '<table class="table table-striped"><thead><tr><th>Key</th><th>Old Value</th><th>New Value</th></thead><tbody><tr><td>color</td><td></td><td>normal</td></tr><tr><td>parent_id</td><td>6</td><td></td></tr><tr><td>sorting</td><td>2</td><td></td></tr></tbody></table>', 'id_cms_users' => 1, 'created_at' => '2018-10-19 09:14:11', 'updated_at' => NULL, ), 39 => array ( 'id' => 40, 'ipaddress' => '127.0.0.1', 'useragent' => 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.67 Safari/537.36', 'url' => 'http://127.0.0.1:8000/admin/menu_management/edit-save/8', 'description' => 'Update data Daftar Tenaga Kerja at Menu Management', 'details' => '<table class="table table-striped"><thead><tr><th>Key</th><th>Old Value</th><th>New Value</th></thead><tbody><tr><td>name</td><td>Tenaga Kerja</td><td>Daftar Tenaga Kerja</td></tr><tr><td>color</td><td></td><td>normal</td></tr><tr><td>parent_id</td><td>6</td><td></td></tr><tr><td>sorting</td><td>3</td><td></td></tr></tbody></table>', 'id_cms_users' => 1, 'created_at' => '2018-10-19 09:41:32', 'updated_at' => NULL, ), 40 => array ( 'id' => 41, 'ipaddress' => '127.0.0.1', 'useragent' => 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.67 Safari/537.36', 'url' => 'http://127.0.0.1:8000/admin/tenaga_kerja/add-save', 'description' => 'Add New Data Dudi Iskandar at Daftar Tenaga Kerja', 'details' => '', 'id_cms_users' => 1, 'created_at' => '2018-10-19 09:49:23', 'updated_at' => NULL, ), 41 => array ( 'id' => 42, 'ipaddress' => '127.0.0.1', 'useragent' => 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.67 Safari/537.36', 'url' => 'http://127.0.0.1:8000/admin/logout', 'description' => 'admin@surveryor.id logout', 'details' => '', 'id_cms_users' => 1, 'created_at' => '2018-10-19 09:53:10', 'updated_at' => NULL, ), 42 => array ( 'id' => 43, 'ipaddress' => '127.0.0.1', 'useragent' => 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.67 Safari/537.36', 'url' => 'http://127.0.0.1:8000/admin/login', 'description' => 'marketing@surveyor.id login with IP Address 127.0.0.1', 'details' => '', 'id_cms_users' => 2, 'created_at' => '2018-10-19 09:53:31', 'updated_at' => NULL, ), 43 => array ( 'id' => 44, 'ipaddress' => '127.0.0.1', 'useragent' => 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.67 Safari/537.36', 'url' => 'http://127.0.0.1:8000/admin/pelanggan', 'description' => 'Try view the data :name at Daftar Pelanggan', 'details' => '', 'id_cms_users' => 2, 'created_at' => '2018-10-19 09:53:36', 'updated_at' => NULL, ), 44 => array ( 'id' => 45, 'ipaddress' => '127.0.0.1', 'useragent' => 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.67 Safari/537.36', 'url' => 'http://127.0.0.1:8000/admin/enumeration', 'description' => 'Try view the data :name at Enumeration', 'details' => '', 'id_cms_users' => 2, 'created_at' => '2018-10-19 09:53:41', 'updated_at' => NULL, ), 45 => array ( 'id' => 46, 'ipaddress' => '127.0.0.1', 'useragent' => 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.67 Safari/537.36', 'url' => 'http://127.0.0.1:8000/admin/logout', 'description' => 'marketing@surveyor.id logout', 'details' => '', 'id_cms_users' => 2, 'created_at' => '2018-10-19 09:53:47', 'updated_at' => NULL, ), 46 => array ( 'id' => 47, 'ipaddress' => '127.0.0.1', 'useragent' => 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.67 Safari/537.36', 'url' => 'http://127.0.0.1:8000/admin/login', 'description' => 'admin@surveyor.id login with IP Address 127.0.0.1', 'details' => '', 'id_cms_users' => 1, 'created_at' => '2018-10-19 09:54:33', 'updated_at' => NULL, ), 47 => array ( 'id' => 48, 'ipaddress' => '127.0.0.1', 'useragent' => 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.67 Safari/537.36', 'url' => 'http://127.0.0.1:8000/admin/menu_management/edit-save/7', 'description' => 'Update data Daftar Pelanggan at Menu Management', 'details' => '<table class="table table-striped"><thead><tr><th>Key</th><th>Old Value</th><th>New Value</th></thead><tbody><tr><td>parent_id</td><td>6</td><td></td></tr><tr><td>sorting</td><td>2</td><td></td></tr></tbody></table>', 'id_cms_users' => 1, 'created_at' => '2018-10-19 09:55:52', 'updated_at' => NULL, ), 48 => array ( 'id' => 49, 'ipaddress' => '127.0.0.1', 'useragent' => 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.67 Safari/537.36', 'url' => 'http://127.0.0.1:8000/admin/login', 'description' => 'marketing@surveyor.id login with IP Address 127.0.0.1', 'details' => '', 'id_cms_users' => 2, 'created_at' => '2018-10-19 22:10:09', 'updated_at' => NULL, ), 49 => array ( 'id' => 50, 'ipaddress' => '127.0.0.1', 'useragent' => 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.67 Safari/537.36', 'url' => 'http://127.0.0.1:8000/admin/pelanggan', 'description' => 'Try view the data :name at Daftar Pelanggan', 'details' => '', 'id_cms_users' => 2, 'created_at' => '2018-10-19 22:10:16', 'updated_at' => NULL, ), 50 => array ( 'id' => 51, 'ipaddress' => '127.0.0.1', 'useragent' => 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.67 Safari/537.36', 'url' => 'http://127.0.0.1:8000/admin/enumeration', 'description' => 'Try view the data :name at Enumeration', 'details' => '', 'id_cms_users' => 2, 'created_at' => '2018-10-19 22:10:24', 'updated_at' => NULL, ), 51 => array ( 'id' => 52, 'ipaddress' => '127.0.0.1', 'useragent' => 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.67 Safari/537.36', 'url' => 'http://127.0.0.1:8000/admin/login', 'description' => 'admin@surveyor.id login with IP Address 127.0.0.1', 'details' => '', 'id_cms_users' => 1, 'created_at' => '2018-10-19 22:10:41', 'updated_at' => NULL, ), 52 => array ( 'id' => 53, 'ipaddress' => '127.0.0.1', 'useragent' => 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.67 Safari/537.36', 'url' => 'http://127.0.0.1:8000/admin/menu_management/edit-save/5', 'description' => 'Update data Enumeration at Menu Management', 'details' => '<table class="table table-striped"><thead><tr><th>Key</th><th>Old Value</th><th>New Value</th></thead><tbody><tr><td>parent_id</td><td>6</td><td></td></tr></tbody></table>', 'id_cms_users' => 1, 'created_at' => '2018-10-19 22:12:53', 'updated_at' => NULL, ), 53 => array ( 'id' => 54, 'ipaddress' => '127.0.0.1', 'useragent' => 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.67 Safari/537.36', 'url' => 'http://127.0.0.1:8000/admin/peralatan/add-save', 'description' => 'Add New Data Kulkas at Daftar Peralatan', 'details' => '', 'id_cms_users' => 1, 'created_at' => '2018-10-19 22:34:46', 'updated_at' => NULL, ), 54 => array ( 'id' => 55, 'ipaddress' => '127.0.0.1', 'useragent' => 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.67 Safari/537.36', 'url' => 'http://127.0.0.1:8000/admin/surat_ijin_usaha/add-save', 'description' => 'Add New Data at Surat Ijin Usaha', 'details' => '', 'id_cms_users' => 1, 'created_at' => '2018-10-19 22:46:50', 'updated_at' => NULL, ), 55 => array ( 'id' => 56, 'ipaddress' => '127.0.0.1', 'useragent' => 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.67 Safari/537.36', 'url' => 'http://127.0.0.1:8000/admin/login', 'description' => 'admin@surveyor.id login with IP Address 127.0.0.1', 'details' => '', 'id_cms_users' => 1, 'created_at' => '2018-10-20 02:44:04', 'updated_at' => NULL, ), 56 => array ( 'id' => 57, 'ipaddress' => '127.0.0.1', 'useragent' => 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.67 Safari/537.36', 'url' => 'http://127.0.0.1:8000/admin/enumeration/add-save', 'description' => 'Add New Data at Enumeration', 'details' => '', 'id_cms_users' => 1, 'created_at' => '2018-10-20 04:27:07', 'updated_at' => NULL, ), 57 => array ( 'id' => 58, 'ipaddress' => '127.0.0.1', 'useragent' => 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.67 Safari/537.36', 'url' => 'http://127.0.0.1:8000/admin/pengalaman_perusahaan/add-save', 'description' => 'Add New Data Dudi Iskandar at Pengalaman perusahaan', 'details' => '', 'id_cms_users' => 1, 'created_at' => '2018-10-20 10:15:52', 'updated_at' => NULL, ), 58 => array ( 'id' => 59, 'ipaddress' => '127.0.0.1', 'useragent' => 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.67 Safari/537.36', 'url' => 'http://127.0.0.1:8000/admin/pengalaman_perusahaan/edit-save/1', 'description' => 'Update data Dudi Iskandar at Pengalaman perusahaan', 'details' => '<table class="table table-striped"><thead><tr><th>Key</th><th>Old Value</th><th>New Value</th></thead><tbody><tr><td>no_bast</td><td>uploads/</td><td>uploads/uploads/</td></tr><tr><td>updated_by</td><td></td><td></td></tr></tbody></table>', 'id_cms_users' => 1, 'created_at' => '2018-10-20 10:54:09', 'updated_at' => NULL, ), 59 => array ( 'id' => 60, 'ipaddress' => '127.0.0.1', 'useragent' => 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.67 Safari/537.36', 'url' => 'http://127.0.0.1:8000/admin/pengalaman_perusahaan/add-save', 'description' => 'Add New Data Pengerjaan Project Besar at Pengalaman perusahaan', 'details' => '', 'id_cms_users' => 1, 'created_at' => '2018-10-20 11:38:17', 'updated_at' => NULL, ), 60 => array ( 'id' => 61, 'ipaddress' => '127.0.0.1', 'useragent' => 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.67 Safari/537.36', 'url' => 'http://127.0.0.1:8000/admin/enumeration/delete/19', 'description' => 'Delete data 19 at Enumeration', 'details' => '', 'id_cms_users' => 1, 'created_at' => '2018-10-20 11:57:30', 'updated_at' => NULL, ), 61 => array ( 'id' => 62, 'ipaddress' => '127.0.0.1', 'useragent' => 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.67 Safari/537.36', 'url' => 'http://127.0.0.1:8000/admin/pengalaman_perusahaan/edit-save/1', 'description' => 'Update data Dudi Iskandar at Pengalaman perusahaan', 'details' => '<table class="table table-striped"><thead><tr><th>Key</th><th>Old Value</th><th>New Value</th></thead><tbody><tr><td>tanggal_bast</td><td>2018-10-27</td><td>2018-10-25</td></tr><tr><td>no_bast</td><td>uploads/uploads/</td><td>uploads/uploads/uploads/</td></tr><tr><td>updated_by</td><td></td><td></td></tr></tbody></table>', 'id_cms_users' => 1, 'created_at' => '2018-10-20 12:00:24', 'updated_at' => NULL, ), 62 => array ( 'id' => 63, 'ipaddress' => '127.0.0.1', 'useragent' => 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.67 Safari/537.36', 'url' => 'http://127.0.0.1:8000/admin/pengalaman_perusahaan/delete/1', 'description' => 'Delete data Dudi Iskandar at Pengalaman perusahaan', 'details' => '', 'id_cms_users' => 1, 'created_at' => '2018-10-20 12:16:45', 'updated_at' => NULL, ), 63 => array ( 'id' => 64, 'ipaddress' => '127.0.0.1', 'useragent' => 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.67 Safari/537.36', 'url' => 'http://127.0.0.1:8000/admin/pengalaman_perusahaan/edit-save/2', 'description' => 'Update data Pengerjaan Project Besar at Pengalaman perusahaan', 'details' => '<table class="table table-striped"><thead><tr><th>Key</th><th>Old Value</th><th>New Value</th></thead><tbody><tr><td>no_bast</td><td>uploads/</td><td>uploads/uploads/</td></tr><tr><td>updated_by</td><td></td><td></td></tr></tbody></table>', 'id_cms_users' => 1, 'created_at' => '2018-10-20 12:48:13', 'updated_at' => NULL, ), 64 => array ( 'id' => 65, 'ipaddress' => '127.0.0.1', 'useragent' => 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.67 Safari/537.36', 'url' => 'http://127.0.0.1:8000/admin/pengalaman_perusahaan/add-save', 'description' => 'Add New Data Simple Project at Pengalaman perusahaan', 'details' => '', 'id_cms_users' => 1, 'created_at' => '2018-10-20 13:59:17', 'updated_at' => NULL, ), 65 => array ( 'id' => 66, 'ipaddress' => '127.0.0.1', 'useragent' => 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.67 Safari/537.36', 'url' => 'http://127.0.0.1:8000/admin/pengalaman_perusahaan/edit-save/3', 'description' => 'Update data Simple Project at Pengalaman perusahaan', 'details' => '<table class="table table-striped"><thead><tr><th>Key</th><th>Old Value</th><th>New Value</th></thead><tbody><tr><td>no_bast</td><td>uploads/</td><td>uploads/uploads/</td></tr><tr><td>updated_by</td><td></td><td></td></tr></tbody></table>', 'id_cms_users' => 1, 'created_at' => '2018-10-20 14:13:57', 'updated_at' => NULL, ), 66 => array ( 'id' => 67, 'ipaddress' => '127.0.0.1', 'useragent' => 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.67 Safari/537.36', 'url' => 'http://127.0.0.1:8000/admin/login', 'description' => 'admin@surveyor.id login with IP Address 127.0.0.1', 'details' => '', 'id_cms_users' => 1, 'created_at' => '2018-10-21 08:14:07', 'updated_at' => NULL, ), 67 => array ( 'id' => 68, 'ipaddress' => '127.0.0.1', 'useragent' => 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.67 Safari/537.36', 'url' => 'http://127.0.0.1:8000/admin/logout', 'description' => 'admin@surveyor.id logout', 'details' => '', 'id_cms_users' => 1, 'created_at' => '2018-10-21 08:34:59', 'updated_at' => NULL, ), 68 => array ( 'id' => 69, 'ipaddress' => '127.0.0.1', 'useragent' => 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.67 Safari/537.36', 'url' => 'http://127.0.0.1:8000/admin/login', 'description' => 'admin@surveyor.id login with IP Address 127.0.0.1', 'details' => '', 'id_cms_users' => 1, 'created_at' => '2018-10-21 08:40:51', 'updated_at' => NULL, ), 69 => array ( 'id' => 70, 'ipaddress' => '127.0.0.1', 'useragent' => 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.67 Safari/537.36', 'url' => 'http://127.0.0.1:8000/admin/pengalaman_perusahaan/edit-save/2', 'description' => 'Update data Pengerjaan Project Besar at Pengalaman perusahaan', 'details' => '<table class="table table-striped"><thead><tr><th>Key</th><th>Old Value</th><th>New Value</th></thead><tbody><tr><td>no_bast</td><td>uploads/uploads/</td><td>1237612367123</td></tr><tr><td>updated_by</td><td></td><td></td></tr><tr><td>file_bast</td><td></td><td>uploads/</td></tr></tbody></table>', 'id_cms_users' => 1, 'created_at' => '2018-10-21 09:05:04', 'updated_at' => NULL, ), 70 => array ( 'id' => 71, 'ipaddress' => '127.0.0.1', 'useragent' => 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.67 Safari/537.36', 'url' => 'http://127.0.0.1:8000/admin/menu_management/edit-save/6', 'description' => 'Update data Master Data at Menu Management', 'details' => '<table class="table table-striped"><thead><tr><th>Key</th><th>Old Value</th><th>New Value</th></thead><tbody></tbody></table>', 'id_cms_users' => 1, 'created_at' => '2018-10-21 09:17:14', 'updated_at' => NULL, ), 71 => array ( 'id' => 72, 'ipaddress' => '127.0.0.1', 'useragent' => 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.67 Safari/537.36', 'url' => 'http://127.0.0.1:8000/admin/menu_management/edit-save/9', 'description' => 'Update data Daftar Peralatan at Menu Management', 'details' => '<table class="table table-striped"><thead><tr><th>Key</th><th>Old Value</th><th>New Value</th></thead><tbody><tr><td>color</td><td></td><td>normal</td></tr><tr><td>parent_id</td><td>6</td><td></td></tr><tr><td>sorting</td><td>3</td><td></td></tr></tbody></table>', 'id_cms_users' => 1, 'created_at' => '2018-10-21 09:17:37', 'updated_at' => NULL, ), 72 => array ( 'id' => 73, 'ipaddress' => '127.0.0.1', 'useragent' => 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.67 Safari/537.36', 'url' => 'http://127.0.0.1:8000/admin/menu_management/edit-save/8', 'description' => 'Update data Daftar Tenaga Kerja at Menu Management', 'details' => '<table class="table table-striped"><thead><tr><th>Key</th><th>Old Value</th><th>New Value</th></thead><tbody><tr><td>parent_id</td><td>6</td><td></td></tr><tr><td>sorting</td><td>4</td><td></td></tr></tbody></table>', 'id_cms_users' => 1, 'created_at' => '2018-10-21 09:17:52', 'updated_at' => NULL, ), 73 => array ( 'id' => 74, 'ipaddress' => '127.0.0.1', 'useragent' => 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.67 Safari/537.36', 'url' => 'http://127.0.0.1:8000/admin/menu_management/edit-save/11', 'description' => 'Update data Syarat Kualifikasi at Menu Management', 'details' => '<table class="table table-striped"><thead><tr><th>Key</th><th>Old Value</th><th>New Value</th></thead><tbody><tr><td>color</td><td></td><td>normal</td></tr><tr><td>parent_id</td><td>6</td><td></td></tr><tr><td>sorting</td><td>6</td><td></td></tr></tbody></table>', 'id_cms_users' => 1, 'created_at' => '2018-10-21 09:18:27', 'updated_at' => NULL, ), 74 => array ( 'id' => 75, 'ipaddress' => '127.0.0.1', 'useragent' => 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.67 Safari/537.36', 'url' => 'http://127.0.0.1:8000/admin/menu_management/edit-save/12', 'description' => 'Update data Pengalaman perusahaan at Menu Management', 'details' => '<table class="table table-striped"><thead><tr><th>Key</th><th>Old Value</th><th>New Value</th></thead><tbody><tr><td>color</td><td></td><td>normal</td></tr><tr><td>parent_id</td><td>6</td><td></td></tr><tr><td>sorting</td><td>7</td><td></td></tr></tbody></table>', 'id_cms_users' => 1, 'created_at' => '2018-10-21 09:18:41', 'updated_at' => NULL, ), 75 => array ( 'id' => 76, 'ipaddress' => '127.0.0.1', 'useragent' => 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.67 Safari/537.36', 'url' => 'http://127.0.0.1:8000/admin/logout', 'description' => 'admin@surveyor.id logout', 'details' => '', 'id_cms_users' => 1, 'created_at' => '2018-10-21 09:31:57', 'updated_at' => NULL, ), 76 => array ( 'id' => 77, 'ipaddress' => '127.0.0.1', 'useragent' => 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.67 Safari/537.36', 'url' => 'http://127.0.0.1:8000/admin/login', 'description' => 'admin@surveyor.id login with IP Address 127.0.0.1', 'details' => '', 'id_cms_users' => 1, 'created_at' => '2018-10-21 09:58:48', 'updated_at' => NULL, ), 77 => array ( 'id' => 78, 'ipaddress' => '127.0.0.1', 'useragent' => 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.67 Safari/537.36', 'url' => 'http://127.0.0.1:8000/admin/logout', 'description' => 'admin@surveyor.id logout', 'details' => '', 'id_cms_users' => 1, 'created_at' => '2018-10-21 09:59:02', 'updated_at' => NULL, ), 78 => array ( 'id' => 79, 'ipaddress' => '127.0.0.1', 'useragent' => 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.67 Safari/537.36', 'url' => 'http://127.0.0.1:8000/admin/login', 'description' => 'marketing@surveyor.id login with IP Address 127.0.0.1', 'details' => '', 'id_cms_users' => 2, 'created_at' => '2018-10-21 09:59:20', 'updated_at' => NULL, ), 79 => array ( 'id' => 80, 'ipaddress' => '127.0.0.1', 'useragent' => 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.67 Safari/537.36', 'url' => 'http://127.0.0.1:8000/admin/logout', 'description' => 'marketing@surveyor.id logout', 'details' => '', 'id_cms_users' => 2, 'created_at' => '2018-10-21 09:59:33', 'updated_at' => NULL, ), 80 => array ( 'id' => 81, 'ipaddress' => '103.119.49.30', 'useragent' => 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/69.0.3497.100 Safari/537.36', 'url' => 'http://158.69.130.15:8000/admin/login', 'description' => 'admin@surveyor.id login with IP Address 103.119.49.30', 'details' => '', 'id_cms_users' => 1, 'created_at' => '2018-10-21 10:29:47', 'updated_at' => NULL, ), 81 => array ( 'id' => 82, 'ipaddress' => '114.4.82.71', 'useragent' => 'Mozilla/5.0 (Linux; Android 8.1.0; ASUS_X00TD) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.64 Mobile Safari/537.36', 'url' => 'http://158.69.130.15:8000/admin/login', 'description' => 'admin@surveyor.id login with IP Address 114.4.82.71', 'details' => '', 'id_cms_users' => 1, 'created_at' => '2018-10-21 10:40:10', 'updated_at' => NULL, ), 82 => array ( 'id' => 83, 'ipaddress' => '36.70.155.106', 'useragent' => 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/69.0.3497.100 Safari/537.36', 'url' => 'http://158.69.130.15:8000/admin/login', 'description' => 'admin@surveyor.id login with IP Address 36.70.155.106', 'details' => '', 'id_cms_users' => 1, 'created_at' => '2018-10-22 02:22:57', 'updated_at' => NULL, ), 83 => array ( 'id' => 84, 'ipaddress' => '36.70.155.106', 'useragent' => 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/69.0.3497.100 Safari/537.36', 'url' => 'http://158.69.130.15:8000/admin/logout', 'description' => 'admin@surveyor.id logout', 'details' => '', 'id_cms_users' => 1, 'created_at' => '2018-10-22 02:28:24', 'updated_at' => NULL, ), 84 => array ( 'id' => 85, 'ipaddress' => '36.70.155.106', 'useragent' => 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/69.0.3497.100 Safari/537.36', 'url' => 'http://158.69.130.15:8000/admin/login', 'description' => 'admin@surveyor.id login with IP Address 36.70.155.106', 'details' => '', 'id_cms_users' => 1, 'created_at' => '2018-10-22 02:29:18', 'updated_at' => NULL, ), 85 => array ( 'id' => 86, 'ipaddress' => '203.128.68.178', 'useragent' => 'Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:62.0) Gecko/20100101 Firefox/62.0', 'url' => 'http://158.69.130.15:8000/admin/login', 'description' => 'admin@surveyor.id login with IP Address 203.128.68.178', 'details' => '', 'id_cms_users' => 1, 'created_at' => '2018-10-22 03:27:02', 'updated_at' => NULL, ), 86 => array ( 'id' => 87, 'ipaddress' => '203.128.68.178', 'useragent' => 'Mozilla/5.0 (Linux; Android 8.1.0; ASUS_X00TD) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.64 Mobile Safari/537.36', 'url' => 'http://158.69.130.15:8000/admin/login', 'description' => 'admin@surveyor.id login with IP Address 203.128.68.178', 'details' => '', 'id_cms_users' => 1, 'created_at' => '2018-10-22 03:33:07', 'updated_at' => NULL, ), 87 => array ( 'id' => 88, 'ipaddress' => '203.128.68.178', 'useragent' => 'Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:62.0) Gecko/20100101 Firefox/62.0', 'url' => 'http://158.69.130.15:8000/admin/pelanggan/add-save', 'description' => 'Add New Data test at Daftar Pelanggan', 'details' => '', 'id_cms_users' => 1, 'created_at' => '2018-10-22 04:07:17', 'updated_at' => NULL, ), 88 => array ( 'id' => 89, 'ipaddress' => '127.0.0.1', 'useragent' => 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/69.0.3497.100 Safari/537.36', 'url' => 'http://localhost:8000/admin/login', 'description' => 'admin@surveyor.id login with IP Address 127.0.0.1', 'details' => '', 'id_cms_users' => 1, 'created_at' => '2018-10-22 05:04:40', 'updated_at' => NULL, ), 89 => array ( 'id' => 90, 'ipaddress' => '127.0.0.1', 'useragent' => 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/69.0.3497.100 Safari/537.36', 'url' => 'http://localhost:8000/admin/pengalaman_perusahaan/add-save', 'description' => 'Add New Data asdad at Pengalaman perusahaan', 'details' => '', 'id_cms_users' => 1, 'created_at' => '2018-10-22 07:27:54', 'updated_at' => NULL, ), 90 => array ( 'id' => 91, 'ipaddress' => '127.0.0.1', 'useragent' => 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/69.0.3497.100 Safari/537.36', 'url' => 'http://localhost:8000/admin/login', 'description' => 'admin@surveyor.id login with IP Address 127.0.0.1', 'details' => '', 'id_cms_users' => 1, 'created_at' => '2018-10-22 13:31:59', 'updated_at' => NULL, ), 91 => array ( 'id' => 92, 'ipaddress' => '127.0.0.1', 'useragent' => 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/69.0.3497.100 Safari/537.36', 'url' => 'http://localhost:8000/admin/login', 'description' => 'admin@surveyor.id login with IP Address 127.0.0.1', 'details' => '', 'id_cms_users' => 1, 'created_at' => '2018-10-22 23:48:22', 'updated_at' => NULL, ), 92 => array ( 'id' => 93, 'ipaddress' => '127.0.0.1', 'useragent' => 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/69.0.3497.100 Safari/537.36', 'url' => 'http://localhost:8000/admin/login', 'description' => 'admin@surveyor.id login with IP Address 127.0.0.1', 'details' => '', 'id_cms_users' => 1, 'created_at' => '2018-10-23 22:55:12', 'updated_at' => NULL, ), )); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function main() {\n\n $fs = new Filesystem();\n\n $fs->touch($this->getTargetFile());\n\n $seedProperties = Yaml::parse(file_get_contents($this->getSeedFile()));\n $generatedProperties = [];\n\n $generatedProperties['label'] = $seedProperties['project_label'];\n $generatedProperties['machineName'] = $seedProperties['project_name'];\n $generatedProperties['group'] = $seedProperties['project_group'];\n $generatedProperties['basePath'] = '${current.basePath}';\n $generatedProperties['type'] = $seedProperties['project_type'];\n $generatedProperties['repository']['main'] = $seedProperties['project_git_repository'];\n $generatedProperties['php'] = $seedProperties['project_php_version'];\n\n // Add platform information.\n if (isset($generatedProperties['platform'])) {\n $generatedProperties['platform'] = $seedProperties['platform'];\n }\n\n $fs->dumpFile($this->getTargetFile(), Yaml::dump($generatedProperties, 5, 2));\n }", "public function seed();", "protected function seed()\n {\n }", "public function seed() {\n }", "public function run()\n {\n $faker= \\Faker\\Factory::create();\n for ($i=0; $i < 20; $i++)\n {\n \tHuongDanVien::create([\n \t\t'tenhdv'=> $faker->name,\n \t\t'phai'=> $faker->word,\n \t\t'diachi'=> $faker->word,\n \t\t'sdt'=> $faker->number_format(0122000000),\n \t\t]);\n }\n }", "public function actionGenerate()\n {\n \\bariew\\yii2Tools\\tests\\FixtureManager::init();\n }", "public function seedDatabase(): void\n {\n echo \"Running seeds\";\n\n // Folder where all the seeds are.\n $folder = __DIR__ . '/../seeds/';\n\n // Scan all files/folders inside database.\n $files = \\scandir($folder);\n\n $seeders = [];\n foreach ($files as $key => $file) {\n\n // All files that don't start with a dot.\n if ($file[0] !== '.') {\n\n // Load the file.\n require_once $folder . $file;\n\n // We have to call the migrations after because\n // some seeds are dependant from other seeds.\n $seeders[] = explode('.', $file)[0];\n }\n }\n\n // Run all seeds.\n foreach ($seeders as $seeder) {\n (new $seeder)->run();\n }\n }", "public function run()\n {\n \t$faker = Faker\\Factory::create();; \n foreach (range(1, 55) as $key => $value) {\n \tApp\\Student::create([\n \t\t 'name' => $faker->name,\n 'father_name' => $faker->name('male'),\n 'mother_name' => $faker->name('female'),\n 'phone_number' => $faker->phoneNumber,\n 'home_number' => $faker->phoneNumber,\n 'email' => $faker->unique()->safeEmail,\n 'gender' => 'male',\n 'roll_number' => $faker->randomNumber(),\n 'reg_number' => $faker->randomNumber(),\n 'department_id' => $faker->randomNumber(1),\n 'shift' => 'second',\n 'semester' => 'eight',\n 'present_address' => $faker->address,\n 'permanent_address' => $faker->address,\n \t]);\n }\n }", "protected static function seed()\n {\n foreach (self::fetch('database/seeds', false) as $file) {\n Bus::need($file);\n }\n }", "public function run()\n {\n $faker = \\Faker\\Factory::create('ms_MY');\n ini_set('memory_limit', '50G');\n \\Eloquent::reguard();\n $this->command->info('User Seed');\n\n for ($i = 0; $i < 5; $i++) {\n $name = $faker->name;\n $temp = explode(' ', trim($name));\n $nickname = $temp[0];\n\n\n $user = \\App\\User::updateOrCreate([\n 'email' => $nickname. '@dell.com',\n ], [\n 'name' => $name,\n 'password' => bcrypt('secret'),\n 'role' => 'participant',\n 'isLead' => 0,\n 'totalPoints' => rand(1,100),\n ]);\n \n }\n\n $name = $faker->name;\n $temp = explode(' ', trim($name));\n $nickname = $temp[0];\n\n\n $user = \\App\\User::updateOrCreate([\n 'email' => $nickname. '@dell.com',\n ], [\n 'name' => $name,\n 'password' => bcrypt('secret'),\n 'role' => 'participant',\n 'isLead' => 1,\n 'totalPoints' => rand(1,100),\n ]);\n\n $name = $faker->name;\n $temp = explode(' ', trim($name));\n $nickname = $temp[0];\n\n\n $user = \\App\\User::updateOrCreate([\n 'email' => $nickname. '@dell.com',\n ], [\n 'name' => $name,\n 'password' => bcrypt('secret'),\n 'role' => 'program manager',\n 'isLead' => 0,\n 'totalPoints' => 0,\n ]);\n \n }", "public function getSeed();", "public function run()\n {\n //Cmd: php artisan db:seed --class=\"UsersTableSeeder\"\n \n $faker = Faker\\Factory::create(\"ja_JP\");\n \n for( $i=0; $i<10; $i++ ){\n\n App\\User::create([\n\t\t\t\t\"name\" => $faker->name(),\n\t\t\t\t\"name_mei\" => $faker->name(),\n\t\t\t\t\"kana_sei\" => $faker->word(),\n\t\t\t\t\"kana_mei\" => $faker->word(),\n\t\t\t\t\"email\" => $faker->safeEmail(),\n\t\t\t\t\"password\" => $faker->password(),\n\t\t\t\t\"phone\" => $faker->word(),\n\t\t\t\t\"address\" => $faker->address(),\n\t\t\t\t\"birthday\" => $faker->date().\" \".$faker->time(),\n\t\t\t\t\"language\" => $faker->languageCode(),\n\t\t\t\t\"licence\" => $faker->word(),\n\t\t\t\t\"school\" => $faker->word(),\n\t\t\t\t\"school_dept\" => $faker->word(),\n\t\t\t\t\"school_subject\" => $faker->word(),\n\t\t\t\t\"gender\" => $faker->word(),\n\t\t\t\t\"salary\" => $faker->randomDigit(),\n\t\t\t\t\"image_url\" => $faker->uuid(),\n\t\t\t\t\"back_image_url\" => $faker->uuid(),\n\t\t\t\t\"remember_token\" => $faker->sha1(),\n\t\t\t\t\"user_role_id\" => $faker->randomDigit(),\n\t\t\t\t\"created_at\" => $faker->dateTime(\"now\"),\n\t\t\t\t\"updated_at\" => $faker->dateTime(\"now\")\n\n ]);\n }\n }", "public function run()\n {\n $faker = Faker::create('id_ID');\n /**\n * Generate fake author data\n */\n for ($i=1; $i<=50; $i++) { \n DB::table('author')->insert([\n 'name' => $faker->name\n ]);\n }\n /**\n * Generate fake publisher data\n */\n for ($i=1; $i<=50; $i++) { \n DB::table('publisher')->insert([\n 'name' => $faker->name\n ]);\n }\n /**\n * Seeding payment method\n */\n DB::table('payment')->insert([\n ['name' => 'Mandiri'],\n ['name' => 'BCA'],\n ['name' => 'BRI'],\n ['name' => 'BNI'],\n ['name' => 'Pos Indonesia'],\n ['name' => 'BTN'],\n ['name' => 'Indomaret'],\n ['name' => 'Alfamart'],\n ['name' => 'OVO'],\n ['name' => 'Cash On Delivery']\n ]);\n }", "public function run()\n {\n // $this->call(UserTableSeeder::class);\n \\App\\User::create([\n 'name'=>'PAPE SAMBA NDOUR',\n 'email'=>'papesambandour@hotmail.com',\n 'password'=>bcrypt('Admin1122'),\n ]);\n\n $faker = Faker::create();\n\n for ($i = 0; $i < 100 ; $i++)\n {\n $firstName = $faker->firstName;\n $lastName = $faker->lastName;\n $niveau = \\App\\Niveau::inRandomOrder()->first();\n \\App\\Etudiant::create([\n 'prenom'=>$firstName,\n 'nom'=>$lastName,\n 'niveau_id'=>$niveau->id\n ]);\n }\n\n\n }", "public function run()\n {\n $faker = Faker\\Factory::create();\n $title = $faker->sentence(rand(3,6));\n Article::create([\n 'title'=>$title,\n 'slug'=>Str::slug($title,'-'),\n 'description'=>$faker->text(rand(100,300)),\n 'content'=>$faker->realText(rand(1000,2000))\n ]);\n }", "public function seed()\n\t{\n\t\t$this->createDataType();\n\t\t$this->createDataRowForColumns();\n\t}", "public function run()\n {\n $faker = \\Faker\\Factory::create();\n\n $limit = 100;\n\n for ($i = 0; $i < $limit; $i++){\n \t\\App\\Models\\Member::create([\n 'code' => $faker->name,\n 'name' => $faker->name,\n 'sns_link' => $faker->name,\n 'is_block' => $faker->numberBetween(0, 1),\n 'phone' => $faker->name,\n 'amount' => $faker->numberBetween(1000, 9000),\n //{{SEEDER_NOT_DELETE_THIS_LINE}}\n\t\t\t]);\n\t\t}\n }", "public function run()\n {\n $faker = Faker\\Factory::create();\n $kelamin = \"laki-laki\";\n foreach (range(1, 100) as $i) {\n \tKajian::create([\n \t\t'waktu'\t\t\t\t=> $faker->dateTimeThisCentury($max = 'now', $timezone = date_default_timezone_get()), \n\n \t\t'tema'\t\t\t\t=> $faker->sentence($nbWords = 6, $variableNbWords = true), \n \t\t'pemateri'\t\t\t=> $faker->name($gender = null|'male'|'female'), \n \t\t'alamat'\t\t\t=> $faker->streetAddress, \n \t\t'deskripsi'\t\t\t=> $faker->paragraph($nbSentences = 3, $variableNbSentences = true), \n \t\t'jenis_peserta'\t\t=> $kelamin, \n \t\t'latitude'\t\t\t=> $faker->latitude, \n \t\t'longitude'\t\t\t=> $faker->longitude,\n 'isRutin' => $faker->boolean\n \t]);\n }\n }", "public function run()\n {\n Model::unguard();\n foreach (glob(__DIR__ . '/seeds/*.php') as $filename) {\n require_once($filename);\n }\n // $this->call(UserTableSeeder::class);\n //DB::statement('SET FOREIGN_KEY_CHECKS=0;');\n// $this->call('CustomerTableSeeder');\n $this->call('PhotoTableSeeder');\n// $this->call('ProductTableSeeder');\n// $this->call('StaffTableSeeder');\n// $this->call('PasswordResetsTableSeeder');\n// $this->call('UsersTableSeeder');\n $this->call('CustomersTableSeeder');\n $this->call('EmployeesTableSeeder');\n $this->call('InventoryTransactionTypesTableSeeder');\n $this->call('OrderDetailsTableSeeder');\n $this->call('OrderDetailsStatusTableSeeder');\n $this->call('OrdersTableSeeder');\n $this->call('InvoicesTableSeeder');\n $this->call('OrdersTableSeeder');\n $this->call('OrderDetailsTableSeeder');\n $this->call('OrdersStatusTableSeeder');\n $this->call('OrderDetailsTableSeeder');\n\n $this->call('OrdersTaxStatusTableSeeder');\n $this->call('PrivilegesTableSeeder');\n $this->call('EmployeePrivilegesTableSeeder');\n $this->call('ProductsTableSeeder');\n $this->call('InventoryTransactionsTableSeeder');\n $this->call('PurchaseOrderDetailsTableSeeder');\n\n $this->call('PurchaseOrderStatusTableSeeder');\n $this->call('PurchaseOrdersTableSeeder');\n $this->call('SalesReportsTableSeeder');\n $this->call('ShippersTableSeeder');\n $this->call('StringsTableSeeder');\n $this->call('SuppliersTableSeeder');\n //DB::statement('SET FOREIGN_KEY_CHECKS=1;');\n\n Model::reguard();\n }", "public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n /* Curso::factory(8)->create(); */\n /* $this->call(CidepartamentoSeeder::class);\n $this->call(CategoriaSeeder::class);\n $this->call(GeneroSeeder::class); */\n\n /* $this->call(UserSeeder::class); */\n\n\n /* Estudiante::factory(20)->create(); */\n\n /* Profesore::factory(12)->create(); */\n\n\n /* $this->call(EstudianteSeeder::class); */\n /* $this->call(CursoSeeder::class); */\n }", "public function run()\n {\n $faker = \\Faker\\Factory::create();\n for ($i = 100; $i < 120; $i++) {\n university::insert([\n 'name' => $faker->name(),\n 'code' => $i,\n 'contact' => '1234567' . $i,\n 'address' => 'Bhavnagar',\n 'user_id' => 2\n ]);\n\n }\n }", "public function run(): void\n {\n $faker = Factory::create();\n \\App\\User::query()->insert($this->gen($faker));\n }", "public function run()\n {\n $faker = Faker::create();\n\n Umrah::Create([\n 'user_id' => User::all()->random()->id,\n 'deceased_id' => Deceased::all()->random()->id,\n 'umrah_status_id' => UmrahStatus::all()->random()->id,\n ]);\n }", "function migrate_seed(){\n\n // Pull in Seed Service Provider\n // Loop in the contents of the file specified in the Service provider\n // Run Insert query.\n\n $seedFiles = require BASEPATH.\"/migration/SeedServiceProvider.php\";\n\n //Loop the files\n foreach ( $seedFiles as $file ){\n\n $seeds = require BASEPATH . \"/migration/seed/{$file}.php\";\n\n //Loop In table for insertion\n foreach( $seeds as $table_name => $data ){\n\n insert( $table_name, $data );\n\n }\n\n }\n\n}", "public function run()\n {\n // App\\UserRentCompactDisc::delete();\n (new Faker\\Generator)->seed(100);\n factory(App\\UserRentCompactDisc::class, 30)->create();\n }", "public function run()\n {\n $faker = Faker::create();\n //echo $faker->word();die();\n //var_dump($faker);die();\n\n for($i=0; $i<100; $i++) \n {\n Maker::create\n ([\n 'name' => $faker->unique()->company(),\n 'phone' => $faker->phoneNumber()\n ]);\n }\n }", "public function run()\n {\n\n $faker =Faker\\Factory::create();\n foreach (range(1,10) as $index) {\n Member::create([\n 'memberNo' => $faker->text(5),\n 'name' => $faker->text($min=5,$max=10),\n 'email' => $faker->email(),\n 'lastConnect' => $faker->dateTime()\n ]);\n }\n }", "public function run()\n\t{\n\n $faker=Faker::create();\n\n for($i = 0; $i < 20; $i++)\n {\n \n \n \n $id= \\DB::table('users')->insertGetId(array(\n 'name' => $faker->firstName,\n 'email' => $faker->unique()->email,\n 'password' => \\Hash::make('bebe'),\n 'type' => $faker->randomElement(['member','admin']),\n \n\n\t\t\t));\n\n\n\n }\n\t\n\t}", "public function run()\n {\n //\\App\\Models\\User::factory(400)->create();\n //\\App\\Models\\Ship::factory(10000)->create();\n //\\App\\Models\\City::factory(1000)->create();\n //\\App\\Models\\Offer::factory(2000)->create();\n\n /* $this->call([\n CountrySeeder::class,\n ]);*/\n\n }", "public function run()\n {\n echo PHP_EOL , 'seeding roles...';\n\n Role::create(\n [\n 'name' => 'Admin',\n 'deletable' => false,\n ]\n );\n Role::create(\n [\n 'name' => 'Principal',\n 'deletable' => false,\n ]\n );\n Role::create(\n [\n 'name' => 'Teacher',\n 'deletable' => false,\n ]\n );\n\n Role::create(\n [\n 'name' => 'Student',\n 'deletable' => false,\n ]\n );\n Role::create(\n [\n 'name' => 'Parents',\n 'deletable' => false,\n ]\n );\n Role::create(\n [\n 'name' => 'Accountant',\n 'deletable' => false,\n ]\n );\n Role::create(\n [\n 'name' => 'Librarian',\n 'deletable' => false,\n ]\n );\n Role::create(\n [\n 'name' => 'Receptionist',\n 'deletable' => false,\n ]\n );\n\n\n }", "public function run()\n {\n $faker = Faker::create();\n DB::table('userroles')->insert([\n 'role_name' => 'Subper Admin',\n 'role_status' => 1,\n 'read' => $faker->paragraph(2),\n 'write' => $faker->paragraph(2),\n 'country_nationality' => $faker->paragraph(2)\n ]);\n }", "public function run()\n {\n // $this->call(UserSeeder::class);\n factory(User::class,15)->create();\n\n\n $regcouncils = fopen('C:\\practocsv\\regcouncil.csv', 'r');\n $degrees = fopen('C:\\practocsv\\degree.csv', 'r');\n $cities = fopen('C:\\practocsv\\city.csv', 'r');\n $specializations = fopen('C:\\practocsv\\specialization.csv', 'r');\n $colleges = fopen('C:\\practocsv\\college.csv', 'r');\n\n $categories = fopen('C:\\practocsv\\category.csv', 'r');\n $subcategories = fopen('C:\\practocsv\\subcategory.csv', 'r');\n $manufacturers = fopen('C:\\practocsv\\manufacture.csv', 'r');\n $ingredients = fopen('C:\\practocsv\\ingredients.csv', 'r');\n $products = fopen('C:\\practocsv\\product.csv', 'r');\n\n $faker = \\Faker\\Factory::create();\n\n $regcouncil_id = 0;\n $city_id = 0;\n $degree_id = 0;\n $specialization_id = 0;\n $college_id = 0;\n\n Type::create([\n 'name'=>'video'\n ]);\n Type::create([\n 'name'=>'chat'\n ]);\n $type = Type::create([\n 'name'=>'clinic'\n ]);\n\n while(($reg = fgetcsv($regcouncils)) !== FALSE){\n $regcouncil = Regcouncil::create([\n 'name'=>$reg[0]\n ]);\n $regcouncil_id = $regcouncil->id;\n }\n\n while(($deg = fgetcsv($degrees)) !== FALSE){\n $degree = Degree::create([\n 'name'=>$deg[0]\n ]);\n $degree_id = $degree->id;\n }\n\n while(($cit = fgetcsv($cities)) !== FALSE){\n $city = City::create([\n 'name'=>$cit[0]\n ]);\n $city_id = $city->id;\n }\n\n while(($reg = fgetcsv($specializations)) !== FALSE){\n $speciality = Speciality::create([\n 'name'=>$reg[0]\n ]);\n $specialization_id = $speciality->id;\n }\n\n while(($clg = fgetcsv($colleges)) !== FALSE){\n $college = College::create([\n 'name'=>$clg[0]\n ]);\n $college_id = $college->id;\n }\n\n for($i=0 ; $i<50 ; $i++){\n $doctor = Doctor::create([\n 'fullname' => $faker->name,\n 'description' => $faker->sentence(rand(5,6)),\n 'fees' => rand(1000,10000),\n 'phone_no' => rand(1000000000,9999999999),\n 'password' => '$2y$10$ckpf//racepEDB9TGR2ZLu3JkVrPKUlaXorZIiWF4eZf87O83lPX2',\n 'email'=> $faker->unique()->safeEmail,\n 'city_id' => rand(1,$city_id),\n 'address' => $faker->sentence(rand(5,6)),\n 'gender' => 'male',\n 'country_code' => '+91',\n 'years_of_exp' => rand(5,20),\n 'slot_duration' => 15,\n 'speciality_id' => rand(1,$specialization_id),\n 'reg_no' => rand(1,200000),\n 'regcouncil_id' => rand(1,$regcouncil_id),\n 'degree_id' => rand(1,$degree_id),\n 'college_id' => rand(1,$college_id),\n 'establishment_name' => $faker->word,\n 'establishment_address' => $faker->sentence(rand(5,6)),\n 'establishment_city_id' => rand(1,$city_id),\n 'establishment_pincode' => rand(1000,999999),\n ]);\n\n $user = User::create([\n 'name' => $doctor->fullname,\n 'email' => $doctor->email,\n 'email_verified_at' => now(),\n 'password' => '$2y$10$ckpf//racepEDB9TGR2ZLu3JkVrPKUlaXorZIiWF4eZf87O83lPX2' , // password\n 'gender'=> $doctor->gender,\n 'role'=>'doctor',\n 'age'=>rand(20,50),\n 'phone_no'=> $doctor->phone_no,\n 'remember_token' => Str::random(10),\n 'doctor_id'=>$doctor->id\n ]);\n $doctor->type()->attach(rand(1,$type->id));\n }\n\n while(($cat = fgetcsv($categories)) !== FALSE){\n $category = Category::create([\n 'name'=>$cat[0]\n ]);\n $category_id = $category->id;\n }\n\n while(($subcat = fgetcsv($subcategories)) !== FALSE){\n $subcategory = Subcategory::create([\n 'name'=>$subcat[0],\n 'category_id'=>rand(1,$category_id),\n ]);\n $subcategory_id = $subcategory->id;\n }\n\n // $i=1;\n // while($i<15){\n // $i++;\n // $manufacturer = Manufacturer::create([\n // 'name'=>$faker->name,\n // 'user_id'=>$i\n // ]);\n // $manufacture_id = $manufacturer->id;\n // }\n\n\n $manufacturer = Manufacturer::create([\n 'name'=>\"John Doe\",\n 'user_id'=>1,\n \n ]);\n\n $manufacture_id = 1;\n\n\n // while(($ing = fgetcsv($ingredients)) !== FALSE){\n // $ingredient = Ingredient::create([\n // 'name'=>$ing[0]\n // ]);\n // $ingredient_id = $ingredient->id;\n // }\n\n while(($pro = fgetcsv($products)) !== FALSE){\n $product = Product::create([\n 'name'=>$pro[0],\n 'price'=>rand(100,1000),\n 'size'=>\"200 ml\",\n 'quantity'=>rand(20,50),\n 'category_id'=>rand(1,$category_id),\n 'subcategory_id'=>rand(1,$subcategory_id),\n 'description'=>$faker->sentence(rand(3,4)),\n 'how_to_use'=>$faker->sentence(rand(2,3)),\n 'benefits'=>$faker->sentence(rand(2,3)),\n 'highlights'=>$faker->sentence(rand(1,2)),\n 'manufacturer_id'=>rand(1,$manufacture_id),\n 'prescription_required'=>rand(0,1),\n ]);\n $product_id = $product->id;\n }\n\n $products = fopen('C:\\practocsv\\product.csv', 'r');\n while(($pro = fgetcsv($products)) !== FALSE){\n $product = Product::create([\n 'name'=>$pro[0],\n 'price'=>rand(100,1000),\n 'size'=>\"200 ml\",\n 'quantity'=>rand(20,50),\n 'category_id'=>rand(1,$category_id),\n 'subcategory_id'=>rand(1,$subcategory_id),\n 'description'=>$faker->sentence(rand(3,4)),\n 'how_to_use'=>$faker->sentence(rand(2,3)),\n 'benefits'=>$faker->sentence(rand(2,3)),\n 'highlights'=>$faker->sentence(rand(1,2)),\n 'manufacturer_id'=>rand(1,$manufacture_id),\n 'prescription_required'=>rand(0,1),\n ]);\n $product_id = $product->id;\n }\n\n Notification_type::create([\n 'name' => 'appointment-made',\n 'message' => 'You have Received a new appointment!'\n ]);\n\n Notification_type::create([\n 'name' => 'appointment-accepted',\n 'message' => 'Your appointment is confirmed!'\n ]);\n\n Notification_type::create([\n 'name' => 'appointment-rejected',\n 'message' => 'Sorry, your appointment is rejected'\n ]);\n\n Notification_type::create([\n 'name' => 'feedback',\n 'message' => 'you have received a new feedback'\n ]);\n\n Notification_type::create([\n 'name' => 'report',\n 'message' => 'Your report has been generated'\n ]);\n\n Notification_type::create([\n 'name' => 'manufacturer-request',\n 'message' => 'you have a new manufacturer registration'\n ]);\n\n Notification_type::create([\n 'name' => 'product-request',\n 'message' => 'you have a new product request'\n ]);\n\n Notification_type::create([\n 'name' => 'product-accept',\n 'message' => 'Your product is now approved'\n ]);\n\n Notification_type::create([\n 'name' => 'prescription',\n 'message' => 'You have received a prescription'\n ]);\n\n\n fclose($specializations);\n fclose($cities);\n fclose($degrees);\n fclose($regcouncils);\n fclose($colleges);\n }", "public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n\n $this->call(Tipo_DocumentoSeeder::class);\n\n $this->call(RolSeeder::class);\n\n $this->call(GeneroSeeder::class);\n\n $this->call(MaterialSeeder::class);\n\n $this->call(CategoriaSeeder::class);\n\n $this->call(ClasificacionSeeder::class);\n\n $this->call(UsuarioSeeder::class);\n\n $this->call(TallaSeeder::class);\n\n $this->call(ProductoSeeder::class);\n\n $this->call(ContactoSeeder::class);\n\n\n }", "public function run()\n {\n $faker = Faker\\Factory::create();\n $data = [];\n for ($i = 0; $i < 100; $i++) {\n $data[] = [\n 'email' => $faker->email,\n 'password' => password_hash($faker->password, PASSWORD_DEFAULT),\n 'name' => $faker->name,\n 'is_verified' => $faker->boolean(),\n\n 'phone' => $faker->optional(0.9)->phoneNumber,\n 'photo_url' => $faker->imageUrl(),\n 'hobbies' => $faker->words(3, true),\n 'passion' => $faker->optional()->words(1, true),\n 'fav_quote' => $faker->optional()->sentence(6, true),\n 'fav_quote_author' => $faker->optional()->name,\n\n 'whatsapp' => $faker->optional(0.9)->phoneNumber,\n 'facebook' => $faker->optional(0.7)->userName,\n 'twitter' => $faker->optional(0.5)->userName,\n 'linkedin' => $faker->optional(0.3)->url,\n 'instagram' => $faker->optional(0.6)->userName,\n 'snapchat' => $faker->optional(0.5)->userName,\n 'website' => $faker->optional(0.4)->url,\n 'blog' => $faker->optional(0.4)->url,\n\n 'created_at' => $faker->dateTimeBetween(\"-2 years\", \"-1 year\")->format('Y-m-d H:i:s'),\n 'updated_at' => rand(0, 2) ? $faker->dateTimeThisYear->format('Y-m-d H:i:s') : null,\n ];\n }\n\n $this->insert('classmates', $data);\n }", "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 }", "public function run()\n {\n $faker = \\Faker\\Factory::create('zh_TW');\n\n foreach (range(1, 100) as $index) {\n $updatedAt = now()->subDays(rand(0, 500));\n User::create([\n 'name' => $faker->name,\n 'email' => $faker->email,\n 'password' => Hash::make($faker->password),\n 'phone' => $faker->phoneNumber,\n 'description' => $faker->realText(rand(10, 100)),\n 'sex' => ($index % 2 == 0) ? '男' : '女',\n 'address' => $faker->address,\n 'birth' => now()->subDays(rand(5840, 36500)),\n 'created_at' => $updatedAt->subDays(rand(1, 3000)),\n 'updated_at' => $updatedAt,\n ]);\n }\n\n }", "public function run()\n {\n _Log::system(_Log::$INFO, 'seeding educations');\n $ed1 = new Education(['name'=>'TK']);$ed1->save();\n $ed2 = new Education(['name'=>'SD']);$ed2->save();\n $ed3 = new Education(['name'=>'SMP']);$ed3->save();\n $ed4 = new Education(['name'=>'SMU']);$ed4->save();\n $ed5 = new Education(['name'=>'Diploma']);$ed5->save();\n $ed6 = new Education(['name'=>'Sarjana']);$ed6->save();\n $ed7 = new Education(['name'=>'Magister']);$ed7->save();\n $ed8 = new Education(['name'=>'Doktor']);$ed8->save();\n $ed9 = new Education(['name'=>'Tidak Ada']);$ed9->save();\n _Log::system(_Log::$SUCCESS, 'seeding educations success');\n }", "public function run()\n {\n $faker = $this->fakerFactory->create();\n\n for ($i = 0; $i < 10; $i++) {\n $this->database->table(\"authors\")->insert([\n \"name\" => $faker->unique()->name,\n \"created_at\" => $faker->dateTimeThisYear,\n \"updated_at\" => $faker->dateTimeThisYear\n ]);\n }\n\n }", "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 }", "public function run()\n {\n // php artisan db:seed --class=StoreTableSeeder\n\n foreach(range(1,20) as $i){\n $faker = Faker::create();\n Store::create([\n 'name' => $faker->name,\n 'desc' => $faker->text,\n 'tags' => $faker->word,\n 'address' => $faker->address,\n 'longitude' => $faker->longitude($min = -180, $max = 180),\n 'latitude' => $faker->latitude($min = -90, $max = 90),\n 'created_by' => '1'\n ]);\n }\n\n }", "public function run()\n {\n // $faker = \\Faker\\Factory::create();\n // Assessment::create([\n // 'teacher_id' => rand(0, 10),\n // 'pupil_id' => rand(0, 10),\n // 'test_id' => rand(0, 10),\n // 'assessment_no' => rand(0, 120),\n // 'assessment_date' => $faker->date,\n // ]);\n factory(App\\Models\\Assessment::class, 10)->create();\n }", "public function run()\n {\n $faker = Faker\\Factory::create();\n\n for($i = 0; $i < 1000; $i++) {\n App\\TestData::create([\n 'username' => $faker->userName,\n 'name' => $faker->name,\n \n ]);\n }\n }", "public function run()\n {\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('password');\n\n User::create([\n 'name' => 'Admin',\n 'email' => 'admin@test.com',\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 'country' => $faker->country,\n 'gender' => 'male',\n 'number' => $faker->phoneNumber,\n 'username' => $faker->userName,\n 'birth_date' => $faker->date($format = 'Y-m-d' , $max = 'now'),\n 'institution_type' => $faker->word,\n 'institution_name' => $faker->company,\n 'department' => $faker->domainword,\n 'faculty' => $faker->colorName,\n 'education_level' => $faker->numberBetween($min = 100 , $max = 700),\n\n ]);\n }\n }", "public function run()\n {\n $this->seedUsers();\n $this->seedAdmins();\n $this->seedMeals();\n\n $this->seedOrder();\n $this->seedOrderlist();\n\n $this->seedReload();\n }", "public function run()\r\n {\r\n $this->seed('MnaraTableSeeder');\r\n\r\n }", "public function run()\n {\n\n $faker = Faker::create();\n foreach(range(1,100)as$index){\n\n \n DB::table('usuarios')->insert([\n 'nombre' => $faker->name(5),\n 'equipo' => $faker->state(4),\n 'nacionalidad'=> $faker->country(4)\n ]);}\n }", "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n //$this->call(RolesAndPermissionsSeeder::class);\n //$this->call(CMSTableSeeder::class);\n //$this->call(IncidentTypesSeeder::class);\n //$this->call(RegistrarsSeeder::class);\n\n /*\n factory(App\\Incident::class, 50)->create();\n\n factory(\\App\\Inquiry::class, 10)\n ->create()\n ->each(function ($inq){\n $inq->incidents()->attach(\\App\\Incident::inRandomOrder()->take(random_int(1,5))->get());\n });\n */\n //$this->call(InquiryStatusSeeder::class);\n }", "public function run()\n {\n $faker = Faker::create('lt_LT');\n\n DB::table('users')->insert([\n 'name' => 'user',\n 'email' => 'briedis@aa.bb',\n 'password' => Hash::make('123')\n ]);\n DB::table('users')->insert([\n 'name' => 'user2',\n 'email' => 'briedis2@aa.bb',\n 'password' => Hash::make('123')\n ]);\n\n foreach (range(1,100) as $val)\n DB::table('authors')->insert([\n 'name' => $faker->firstName(),\n 'surname' => $faker->lastName(),\n \n ]);\n }", "public function run()\n {\n $this->seedRegularUsers();\n $this->seedAdminUser();\n }", "public function generate() {}", "public function generate() {}", "public function generate() {}", "public function generate() {}", "public function generate() {}", "public function generate() {}", "public function generate() {}", "public function run()\n {\n $faker = Faker::create();\n foreach (range(1,100) as $index) {\n \\DB::table('modulos')->insert([\n 'descricao' => $faker->words(3,true),\n 'ativo' => $faker->boolean\n ]);\n }\n }", "public function run()\n {\n Site::factory(config('seeder.site_count'))\n ->has(Distribution::factory(2))\n ->has(SitedStock::factory(config('seeder.sitedstock_count')))\n ->create();\n \n DB::table('sites')->insert([\n 'radar_name'=>'DWSR-2501C',\n 'image'=>'027ce6f5bc035a08d207f0de97b23965.png',\n 'station_id'=>'Banjarmasin'\n ]);\n DB::table('sites')->insert([\n 'radar_name'=>'DWSR-3501C',\n 'image'=>'027ce6f5bc035a08d207f0de97b23965.png',\n 'station_id'=>'Cengkareng'\n ]);\n }", "public function run()\n {\n \t// php artisan db:seed --class=Chuckbe\\\\ChuckcmsTemplateFrankfurt\\\\seeds\\\\ChuckcmsTemplateFrankfurtTableSeeder\n $fonts = [];\n $fonts['raw'] = 'Roboto:100,300,400,400italic,700|Patua+One:100,300,400,400italic,700|Lato:400,400italic,700,700italic,900|Roboto:100,300,400,400italic,500,700,700italic|Montserrat:100,300,400,400italic,500,700,700italic';\n \n $css = [];\n $css['global']['href'] = 'chuckbe/chuckcms-template-frankfurt/css/global.css';\n $css['global']['asset'] = 'true';\n\n $css['structure']['href'] = 'chuckbe/chuckcms-template-frankfurt/css/structure.css';\n $css['structure']['asset'] = 'true';\n\n $css['frankfurt']['href'] = 'chuckbe/chuckcms-template-frankfurt/css/frankfurt.css';\n $css['frankfurt']['asset'] = 'true';\n\n $css['custom']['href'] = 'chuckbe/chuckcms-template-frankfurt/css/custom.css';\n $css['custom']['asset'] = 'true';\n \n $js = []; \n $js['jquery']['href'] = 'chuckbe/chuckcms-template-frankfurt/js/jquery-2.1.4.min.js';\n $js['jquery']['asset'] = 'true';\n\n $js['mfnmenu']['href'] = 'chuckbe/chuckcms-template-frankfurt/js/mfn.menu.js';\n $js['mfnmenu']['asset'] = 'true';\n\n $js['jqueryplugins']['href'] = 'chuckbe/chuckcms-template-frankfurt/js/jquery.plugins.js';\n $js['jqueryplugins']['asset'] = 'true';\n\n $js['jqueryjplayer']['href'] = 'chuckbe/chuckcms-template-frankfurt/js/jquery.jplayer.min.js';\n $js['jqueryjplayer']['asset'] = 'true';\n\n $js['animations']['href'] = 'chuckbe/chuckcms-template-frankfurt/js/animations/animations.js';\n $js['animations']['asset'] = 'true';\n\n $js['translate3d']['href'] = 'chuckbe/chuckcms-template-frankfurt/js/translate3d.js';\n $js['translate3d']['asset'] = 'true';\n\n $js['scripts']['href'] = 'chuckbe/chuckcms-template-frankfurt/js/scripts.js';\n $js['scripts']['asset'] = 'true';\n\n $js['email']['href'] = 'chuckbe/chuckcms-template-frankfurt/js/email.js';\n $js['email']['asset'] = 'true';\n\n $json = [];\n\n // create template\n Template::updateOrCreate(\n ['slug' => 'chuckcms-template-frankfurt'],\n ['name' => 'ChuckCMS Template Frankfurt',\n 'hintpath' => 'chuckcms-template-frankfurt',\n 'path' => 'chuckbe/chuckcms-template-frankfurt',\n 'type' => 'default',\n 'version' => '0.1',\n 'author' => 'Karel Brijs (karel@chuck.be)',\n 'fonts' => $fonts,\n 'css' => $css,\n 'js' => $js,\n 'json' => $json,\n 'active' => 1]\n );\n }", "public function run()\n {\n $faker = Faker\\Factory::create();\n foreach (range(1,50) as $index) {\n $data = [\n 'id' => $faker->id,\n 'txt_protocolo' => $faker->unique()->txt_protocolo,\n ];\n Protocolo::create($data);\n }\n }", "public function run()\n {\n // *****Data Using Manually*********\n // $student = [\n // [\n // 'name'=>'Jogi',\n // 'lastname'=>'Singh',\n // ],\n // [\n // 'name'=>'Jonty',\n // 'lastname'=>'Singh',\n // ],\n // [\n // 'name'=>'Harsh',\n // 'lastname'=>'Srivastav',\n // ],\n \n // ];\n\n // foreach ($student as $key => $value) {\n // Student::create($value);\n // }\n // *******End Data Manually*************\n // *****************Data Dump Using Faker*******************\n $faker = Faker::create();\n foreach (range(1,100) as $key => $value) {\n Student::create(\n [\n 'name'=>$faker->name,\n 'lastname'=>$faker->lastname\n ]\n );\n }\n\n }", "public function run()\n\n {\n\n DB::table('user')->insert([\n 'name'=> 'Admin',\n 'phonenumber'=>'01694844753',\n 'password'=>hash('ripemd160','123456'),\n 'avatar'=>'/img/unknowavatar.png',\n ]);\n $faker = Faker\\Factory::create();\n\n for($i=0; $i<5; $i++){\n \n DB::table('user')->insert([\n 'name'=> $faker->name,\n 'phonenumber'=>$faker->phoneNumber,\n 'password'=> Str::random(10),\n 'avatar'=>$faker->image,\n ]);\n \n }\n }", "public function run()\n {\n\n factory('App\\Models\\Pessoa', 60)->create();\n factory('App\\Models\\Profissional', 10)->create();\n factory('App\\Models\\Paciente', 50)->create();\n $this->call(UsersTableSeeder::class);\n $this->call(ProcedimentoTableSeeder::class);\n // $this->call(PessoaTableSeeder::class);\n // $this->call(ProfissionalTableSeeder::class);\n // $this->call(PacienteTableSeeder::class);\n // $this->call(AgendaProfissionalTableSeeder::class);\n }", "public function run()\n {\n// $this->seedTestForms($faker);\n }", "public function run()\n {\n \n User::factory(1)->create([\n 'rol'=>'EPS'\n ]);\n Person::factory(10)->create();\n $this->call(EPSSeeder::class);\n $this->call(OfficialSeeder::class);\n $this->call(VVCSeeder::class);\n $this->call(VaccineSeeder::class);\n }", "public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n \n //لازم المودل يكون عامل \n //has Facroty عشان اقدر استعملو \n //لتنفيذ الفاكتوري\n // Category::factory(19)->create();\n\n Product::factory(199)->create();\n //Tag::factory(15)->create();\n\n //هنا بستدعي السيدر عشان انفذو\n // $this->call(CategoriesTableSeeder::class);\n\n /*\n Category::factory(10)\n ->has(Category::factory(5)\n ->has(Product::factory(15),'products')\n ,'children')\n ->create();\n*/\n\n }", "public function run()\n {\n factory(\\App\\Models\\Discusse::class,config('other.seeder_count'))->create([\n 'is_better' => 0\n ]);\n factory(\\App\\Models\\Discusse::class,config('other.seeder_count'))->create([\n 'is_better' => 1\n ]);\n }", "public function run()\n {\n $faker = Faker::create();\n foreach (range(1,50) as $index) {\n DB::table('empleado')->insert([\n 'dni' => $faker->numberBetween(20000000, 43000000),\n 'apellidonombre' => $faker->firstName(). \" \" . $faker->lastName(),\n 'idempleadocapataz' => rand(1, 50),\n 'especialidad' => $faker->jobTitle(),\n ]);\n }\n }", "public function run()\n {\n $count = Regency::count();\n if($count == 0) {\n return $this->command->alert(\n 'Seed Error !! Silahkan Seed Regency Terlebih Dahulu'\n );\n }\n DB::statement('SET FOREIGN_KEY_CHECKS = 0');\n District::truncate();\n DB::statement('SET FOREIGN_KEY_CHECKS = 1');\n $data = array_map('str_getcsv', file(base_path().\"/storage/districts.csv\"));\n foreach ($data as $x) {\n $prov = new District();\n $prov->id = $x[0];\n $prov->regency_id = $x[1];\n $prov->name = $x[2];\n $prov->save();\n }\n }", "public function run()\n {\n $faker=Faker::create();\n foreach (range(1,20) as $i){\n DB::table('personas')->insert([\t \n 'nombre' => $faker->name(),\n 'apellido' => $faker->lastName(),\n 'correo' => $faker->email(),\n 'edad'=>$faker->randomNumber(2),\n ]);\n }\n // factory(personas::class, 99)->create();\n }", "public function run()\n {\n //\n $faker = Faker::create();\n\n for ($i = 0; $i < 100; $i++) {\n $data = [\n 'pelanggan' => $faker->name,\n 'alamat' => $faker->address,\n 'telp' => $faker->phoneNumber,\n ];\n\n Pelanggan::create($data);\n }\n }", "public function run()\n {\n DB::table('users')->delete();\n $json = File::get(\"database/seederfile/users.json\");\n $data = json_decode($json);\n foreach($data as $obj)\n { User::create(array(\n \t'id' => $obj -> id,\n \t'role_id' => $obj -> role_id,\n \t'username' => $obj -> username,\n \t'name' => $obj -> name,\n \t'email' => $obj -> email,\n #'password' => Hash::make('admin1')]);\n \t'password' => Hash::make($obj -> password),\n\t\t\t'remember_token' => $obj -> remember_token,\n \t'created_at' => $obj -> created_at,\n\t\t\t'updated_at' => $obj -> updated_at\n ));\n\t\t}\n }", "public function run()\n {\n //\n// factory(\\App\\Bill::class,10)->create();\n \\App\\Helpers\\FactoryHelper::force_seed(\\App\\Bill::class,4);\n }", "public function run()\n {\n\t\t// Let's truncate our existing records to start from scratch.\n File::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 File::create([\n 'name' => $faker->name,\n\t\t\t\t'user_id' => User::first()->id,\n ]);\n }\n }", "public function run()\n {\n // Create my personal user\n $email = env('ADMIN_USER_EMAIL', false);\n $password = env('ADMIN_USER_PASSWORD', false);\n if (!$email || !$password) {\n throw new \\Exception('You must set admin credentials in .env before seeding');\n }\n $jakob = factory(App\\User::class)->create([\n 'name' => 'Jakob Buis',\n 'email' => $email,\n 'password' => bcrypt($password),\n ]);\n\n // Create the frontend as password-grant client\n $client = (new \\Laravel\\Passport\\Client)->forceFill([\n 'user_id' => $jakob->id,\n 'name' => 'librorum-frontend',\n 'secret' => str_random(40),\n 'redirect' => env('APP_URL'),\n 'personal_access_client' => false,\n 'password_client' => true,\n 'revoked' => false,\n ]);\n $client->save();\n\n // Create the content\n $tags = factory(\\App\\Tag::class, 5)->create(['user_id' => $jakob->id]);\n\n // Create 5 notebooks, each with 3 pages\n // each linked to 2 randomly selected tags\n $notebooks = factory(\\App\\Notebook::class, 5)->create(['user_id' => $jakob->id]);\n $notebooks->each(function($notebook) use ($tags) {\n\n $pages = factory(\\App\\Page::class, 3)->create([\n 'notebook_id' => $notebook->id,\n ]);\n\n $pages->each(function($page) use ($tags) {\n $page->tags()->attach($tags->random(2));\n });\n });\n }", "public function run()\n {\n $faker = Faker\\Factory::create('en_US');\n\n foreach(range(1, 10) as $index) {\n Institute::create([\n 'inst_profile_guid' => $faker->uuid,\n 'user_id' => rand(1, 20),\n 'institute_code' => $faker->postcode,\n 'institute_name' => $faker->company,\n 'institute_description' => $faker->sentence,\n 'contact' => $faker->phoneNumber,\n 'address' => $faker->address,\n 'city' => $faker->city,\n 'postal_code' => $faker->postcode,\n 'country' => $faker->country\n ]);\n }\n }", "public function run()\n { \n\n $this->call(RoleSeeder::class);\n \n $this->call(UserSeeder::class);\n\n Storage::deleteDirectory('socials-icon');\n Storage::makeDirectory('socials-icon');\n $socials = Social::factory(7)->create();\n\n Storage::deleteDirectory('countries-flag');\n Storage::deleteDirectory('countries-firm');\n Storage::makeDirectory('countries-flag');\n Storage::makeDirectory('countries-firm');\n $countries = Country::factory(18)->create();\n\n // Se llenan datos de la tabla muchos a muchos - social_country\n foreach ($countries as $country) {\n foreach ($socials as $social) {\n\n $country->socials()->attach($social->id, [\n 'link' => 'https://www.facebook.com/ministeriopalabrayespiritu/'\n ]);\n }\n }\n\n Person::factory(50)->create();\n\n Category::factory(7)->create();\n\n Video::factory(25)->create(); \n\n $this->call(PostSeeder::class);\n\n Storage::deleteDirectory('documents');\n Storage::makeDirectory('documents');\n Document::factory(25)->create();\n\n }", "public function run()\n {\n $faker = Faker::create('App\\Meet');\n\n for($i = 1; $i <= 20; $i ++){\n \tDB::table('meets')->insert([\n \t\t'user_id' => $faker->numberBetween($min = 1, $max = 20),\n \t\t'title' => $faker->sentence(),\n \t\t'meet_date' => $faker->dateTimeThisYear($max = 'now', $timezone = date_default_timezone_get()),\n \t\t'location' => $faker->streetName,\n \t\t'lat' => $faker->latitude($min = -90, $max = 90),\n \t\t'lng' => $faker->longitude($min = -180, $max = 180),\n \t\t'description' => implode($faker->paragraphs(5)),\n \t\t'deleted' => 0,\n \t\t'updated_at' => \\Carbon\\Carbon::now(),\n \t\t'created_at' => \\Carbon\\Carbon::now(),\n \t\t]);\n }\n\n\n }", "public function run()\n {\n Model::unguard();\n\n $this->call(AttributesSeeder::class);\n\n File::factory()->count(10)->create();\n\n // Get all the attributes attaching up to 3 random attributes to each file\n $attributes = Attribute::all();\n\n // Populate the pivot table\n File::all()->each(function ($file) use ($attributes) {\n $file->attributes()->attach(\n $attributes->random(rand(1, 5))->pluck('id')->toArray(),\n [\n 'order' => rand(1, 5)\n ]\n );\n });\n\n Model::reguard();\n }", "public function run()\n {\n // DB::table('users')->truncate(); //elimina la bd cada vez que realizo el seed\n\n \n\n \n\n\n factory(App\\User::class,10)->create();\n\n factory(App\\User::class)->create([\n 'name' =>'Administrador',\n 'email' =>'admin@turismo.app',\n 'role' =>'admin',\n 'password'=>bcrypt('secret')\n\n ]);\n\n\n factory(App\\hotel::class,1)->create();\n \n \n\n }", "public function run()\n {\n //$this->call(SectionSeeder::class);\n $this->call(AdminSeeder::class);\n //$this->call(ClientSeeder::class);\n \n \n\n\n\n //DB::table('users')->insert([\n // 'name' => 'Harry Han',\n // 'email' => 'harry.test@hanix.com.au',\n // 'password' => bcrypt('password'),\n // 'contractorLastname' => 'Han',\n // 'contractorCompany' => 'test-company' ,\n // 'contractorContactNumber' => '0600000000',\n // 'contractorStatus' => 'active'\n //]);\n }", "public function run()\n {\n $seeds = [\n [\n 'id'=>1,\n 'user_id'=>'1',\n 'firstname'=>'Jonas',\n 'lastname'=>'Jonaitis',\n 'position'=>'Administratorius',\n 'email'=>'sbadmin@sbadmin.lt',\n 'phone'=>'Nėra',\n 'birthday'=>'2017-04-05',\n 'photo'=>'150x150.png',\n ],\n ];\n\n foreach ($seeds as $seed) {\n \\App\\Profile::create($seed);\n }\n }", "public function run()\n {\n \t$faker = Factory::create();\n \tfor ($i=0; $i <99 ; $i++) { \n \t\tKontak::create([\n \t\t\t'nama'=>$faker->name,\n \t\t\t'email'=>$faker->email,\n \t\t\t'foto'=>$faker->text\n \t\t]);\n \t}\n }", "public function run()\n\t{\n\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('aa2016aa');\n\n User::create([\n 'type' => '1',\n 'fname' => 'artiom',\n 'lname' => 'live',\n 'email' => 'artiom@live.com',\n 'password' => $password,\n ]);\n\n User::create([\n 'type' => '0',\n 'fname' => 'artiom',\n 'lname' => 'demo',\n 'email' => 'artiom@demo.com',\n 'password' => $password,\n ]);\n }", "public function run()\n {\n // Admin Acount Seeding\n $add = new User;\n $add->name = 'karim';\n $add->email= 'karim@admin.com';\n $add->password = Hash::make(123456);\n $add->phone = '01126878406';\n $add->prefix = 'karim';\n $add->level = 'admin';\n $add->save();\n\n //Language Seeding\n $language = new Languages;\n $language->language = \"English\";\n $language->prefix = \"en\";\n $language->direction = \"ltr\";\n $language->save();\n\n //Setting Seeding\n $appSetting = new Setting;\n $appSetting->sitename = \"Cure2Us\";\n $appSetting->email = \"admin@cure2us.com\";\n $appSetting->save();\n }", "public function run()\n {\n //\n \t$fake = \\Faker\\Factory::create();\n \\DB::table('users')->insert([\n 'name' => 'Nguyễn Văn Hiệp',\n 'email' => 'supperadmin@gmail.com',\n 'is_admin' => '1',\n 'password'=> bcrypt('12345678')\n ]);\n for ($i=0; $i < 20; $i++) {\n \\DB::table('users')->insert([\n 'name' => $fake->name,\n 'email' => $fake->email,\n 'password'=> bcrypt('12345678')\n ]);\n }\n }", "public function run()\n {\n $faker = \\Faker\\Factory::create();\n\n for ($i = 0; $i < 10; $i++)\n {\n $gender = array_rand(['Men', 'Women'], 1);\n\n User::create([\n 'id' => ($i + 1),\n 'first_name' => $faker->firstName($gender == 0 ? 'male' : 'female'),\n 'last_name' => $faker->lastName,\n 'sex' => ($gender == 0 ? 'Men' : 'Women'),\n 'birthday' => $faker->date('Y-m-d', 'now'),\n 'email' => $faker->email,\n 'address' => $faker->address,\n 'telephone' => rand(1111111111,9999999999)\n ]);\n }\n }", "public function run()\n {\n $faker = Faker\\Factory::create('fr_FR');\n\n for($i=0; $i<5; $i++){\n\n $data = [\n [\n 'pseudo' => $faker->userName,\n 'email' => $faker->unique()->email,\n 'firstname' => $faker->firstName,\n 'lastname' => $faker->lastName,\n 'password' => $faker->password,\n 'birthday' => $faker->date($format = 'Y-m-d', $max = 'now'),\n 'nbateam_id' => 1,\n ]\n ];\n User::insert($data);\n\n }\n }", "public function run()\n {\n $this->call(\\Database\\Seeders\\GroupByRecordTableSeeder::class);\n $this->call(\\Database\\Seeders\\SingleIndexRecordTableSeeder::class);\n $this->call(\\Database\\Seeders\\MultiIndexRecordTableSeeder::class);\n $this->call(\\Database\\Seeders\\JoinFiveTablesSeeder::class);\n\n// DB::table('users')->truncate();\n// DB::table('user_details')->truncate();\n//\n// // 試しに一回流す\n// $data = $this->makeData(0, 'userFactory', 1);\n// DB::table('users')->insert($data);\n// $data = $this->makeData(0, 'userDetailFactory', 1);\n// DB::table('user_details')->insert($data);\n//\n// // $this->call(UsersTableSeeder::class);\n// DB::table('users')->truncate();\n// DB::table('user_details')->truncate();\n//\n// for ($i = 0; $i < 40; $i++) {\n// $data = $this->makeData($i, 'userFactory', 2500);\n// DB::table('users')->insert($data);\n// }\n//\n// for ($i = 0; $i < 40; $i++) {\n// $data = $this->makeData($i, 'userDetailFactory', 2500);\n// DB::table('user_details')->insert($data);\n// }\n }", "public function run()\n {\n $faker = Faker\\Factory::create();\n foreach (range(1, 20) as $value) {\n User::create([\n 'name' => $faker->text('20'),\n 'email' => $faker->email,\n 'dob'=> $faker->date(),\n 'password' => bcrypt('anhvit12'),\n ]);\n\n }\n }", "public function run()\n {\n if (!File::exists(public_path('uploads/faker/heritage'))) {\n File::makeDirectory(public_path('uploads/faker/heritage'), 777, true);\n }\n $faker = Faker\\Factory::create();\n for ($i = 0; $i < 16; $i++) {\n $data = [\n 'title' => $faker->sentence(),\n 'description' => theExcerpt($faker->paragraph, 255),\n 'content' => $faker->text(2000),\n 'thumbnail' => 'uploads/faker/heritage/' . $faker->image(public_path('uploads/faker/heritage'), 420, 236, null, false),\n 'cover' => 'uploads/faker/heritage/' . $faker->image(public_path('uploads/faker/heritage'), 1170, 150, null, false),\n 'province_id' => rand(1, 63),\n 'area_id' => rand(63, 70),\n 'user_id' => rand(1, 10),\n 'lang' => 'en',\n 'parent_id' => 0,\n 'status' => STATUS_ACTIVATED\n ];\n \\App\\IZee\\Heritages\\Heritage::create($data);\n }\n }", "public function run()\n {\n $faker = Faker::create('id_ID');\n $gender = $faker->randomElement(['L', 'P']);\n $religion = $faker->randomElement(['Kristen', 'Islam', 'Budha']);\n\n for ($i=0; $i < 20; $i++) { \n DB::table('siswa')->insert([\n 'nama_depan' => $faker->firstName,\n 'nama_belakang' => $faker->lastName,\n 'jenis_kelamin' => $gender,\n 'agama' => $religion,\n 'alamat' => $faker->address\n ]);\n }\n }", "public function run()\n {\n $faker = Faker::create();\n\n foreach(range(1, 10) as $index)\n {\n User::create([\n 'name' => $faker->name,\n 'email' => $faker->email,\n 'username' => $faker->userName,\n 'password' => $faker->password,\n 'location' => $faker->text,\n 'profile_picture' => $faker->imageUrl($width = 550, $height = 550)\n ]);\n }\n }", "public function run()\n {\n $faker = Faker::create();\n $samples_temp = [];\n\n for($i = 0; $i < 100; $i++)\n {\n $samples_temp[] = [\n 'nombre' => $faker->name,\n 'email'=> $faker->email\n\n ];\n }\n Correo::insert($samples_temp);\n\n\n }", "public function run()\n {\n $faker = $faker = Faker\\Factory::create();\n foreach (range(1,250) as $index) {\n DB::table('employee')->insert([\n 'employee_first_name' => $faker->name,\n 'employee_last_name' => $faker->name,\n 'employee_ref_number' => 00000,\n 'employee_phone_number' => rand(0,5),\n 'employee_address' => $faker->name,\n 'employee_address_two' => $faker->name,\n 'employee_country' => $faker->name,\n 'employee_state' => $faker->state,\n 'employee_city' => $faker->city,\n 'employee_email' => $faker->email,\n 'employee_pin_code' => rand(0,5),\n 'employee_reference' => $faker->name,\n 'employee_unique_identy' => $faker->name,\n ]);\n }\n }", "public function run()\n {\n $facker = app(Faker\\Generator::class);\n\n $avatars = [\n 'https://avatars3.githubusercontent.com/u/41312704?s=460&v=4',\n 'https://cdn.learnku.com/uploads/avatars/24327_1530087651.jpeg!/both/200x200',\n ];\n\n $users = factory(User::class)\n ->times(10)\n ->make()\n ->each(function ($user, $index) use ($facker, $avatars) {\n $user->avatar = $facker->randomElement($avatars);\n });\n $user_array = $users->makeVisible(['password', 'remember_token'])->toArray();\n User::insert($user_array);\n\n $user = User::find(1);\n $user->name = '十步';\n $user->email = '1085530400@qq.com';\n $user->avatar = 'https://avatars3.githubusercontent.com/u/41312704?s=460&v=4';\n $user->save();\n\n // 初始化用户角色,将1号用户设置为站长\n $user->assignRole('Founder');\n $user = User::find(2);\n $user->assignRole('Maintainer');\n }", "public function run()\n {\n User::create ( [\n 'username' => 'anh.tuan',\n 'first_name' => 'Tuan',\n 'last_name' => 'Nguyen',\n 'email' => 'anh.tuan@mulodo.com',\n 'is_admin' => 1,\n 'password' => bcrypt('123456')\n ]);\n\n for ($i = 0; $i < 10; $i++)\n {\n $faker = Faker::create();\n User::create ( [\n 'username' => $faker->userName,\n 'first_name' => $faker->firstName,\n 'last_name' => $faker->lastName ,\n 'email' => $faker->email,\n 'is_admin' => 0,\n 'password' => bcrypt('123456')\n ]);\n }\n }", "public function run()\n {\n $faker = \\Faker\\Factory::create();\n\n for($i =0; $i<20; $i++){\n \\App\\Organisation::create([\n 'name' => $faker->company,\n 'business_type_id' => $faker->numberBetween(1, 3),\n 'logo'=>$faker->imageUrl($width = 200, $height = 200, 'abstract',true),\n 'address' => $faker->address,\n 'email' => $faker->companyEmail,\n 'mobile' => $faker->numberBetween(263772000000,263779999999),\n 'telephone'=>$faker->numberBetween(240291,29999)\n ]);\n }\n }", "public function run()\n {\n User::create([\n 'name' => 'Regynald',\n 'email' => 'correo@correo.com',\n 'password' => Hash::make('123456789'),\n 'url' => 'http://zreyleo-code.com',\n ]);\n\n User::create([\n 'name' => 'Leonardo',\n 'email' => 'correo2@correo.com',\n 'password' => Hash::make('123456789')\n ]);\n\n // seed sin model\n /* DB::table('users')->insert([\n 'name' => 'Regynald',\n 'email' => 'correo@correo.com',\n 'password' => Hash::make('123456789'),\n 'url' => 'http://zreyleo-code.com',\n 'created_at' => date('Y-m-d H:i:s'),\n 'updated_at' => date('Y-m-d H:i:s')\n ]); */\n }", "public function run()\n {\n $faker = Faker::create();\n\n for($i = 0; $i < 50; $i++){\n $uid = DB::table('users')->select('id')->inRandomOrder()->first();\n $student = new Student([\n 'first_name' => $faker->firstName,\n 'last_name' => $faker->lastName,\n 'teacher_id' => $uid->id,\n 'code' => $faker->bothify('**********')\n ]);\n\n $student->save();\n }\n }", "public function run()\n {\n $faker = Faker::create();\n $preUach = PreUach::all();\n $samples_temp = [];\n\n foreach ($preUach as $item)\n {\n\n\n $samples_temp[] = [\n 'postulante' => $item->postulante,\n 'persona_matricula'=> $faker->lastName.' '. $faker->firstName,\n 'fecha_matricula'=>$faker->dateTimeBetween($startDate = '-5 months', $endDate = 'now')\n ]; \t\n }\n\n Declaracion::insert($samples_temp);\n \n }" ]
[ "0.741271", "0.72163844", "0.71867263", "0.7150963", "0.7011614", "0.6992453", "0.6889081", "0.6877449", "0.68096465", "0.679051", "0.67819595", "0.6763185", "0.6725394", "0.67226577", "0.67199546", "0.67100257", "0.6709864", "0.67040205", "0.6703833", "0.66986066", "0.66848785", "0.66676813", "0.6664289", "0.66619146", "0.6658433", "0.6657409", "0.66464853", "0.66320693", "0.6631319", "0.66305304", "0.66290253", "0.66284007", "0.6624839", "0.6623553", "0.6619334", "0.6618539", "0.6608564", "0.65820485", "0.65815806", "0.65786946", "0.65776837", "0.65724593", "0.65712655", "0.6568998", "0.6564165", "0.65635526", "0.65632516", "0.6561539", "0.65603864", "0.6557867", "0.6557867", "0.6557841", "0.6557841", "0.6557841", "0.6557841", "0.6557841", "0.6556947", "0.6555183", "0.6549153", "0.65489244", "0.654778", "0.6542256", "0.6541639", "0.6536023", "0.65329695", "0.6532951", "0.6532415", "0.65314263", "0.65287995", "0.6528459", "0.65275294", "0.6521118", "0.6521097", "0.6520966", "0.6520696", "0.65203667", "0.6519488", "0.6513222", "0.651225", "0.6512065", "0.6511974", "0.6510938", "0.6509229", "0.6507844", "0.65072274", "0.6500883", "0.65005153", "0.64961535", "0.6495031", "0.6491838", "0.6490735", "0.6488336", "0.64861405", "0.6485924", "0.6479967", "0.6479224", "0.6478154", "0.6477599", "0.6476717", "0.64762294", "0.64754003" ]
0.0
-1
Action must be taken immediately. Example: Entire website down, database unavailable, etc. This should trigger the SMS alerts and wake you up.
public function alert($message, array $context = []) { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function schedulesms() {\n \t\t\n \t\tConfigure::write('debug', 0);\n \t\t\n \t\t$this->send(true, $_REQUEST['message'], $_REQUEST['mobile'], $_REQUEST['skey'], $_REQUEST['senderid'], \n \t\t\t\t\t\t\t$_REQUEST['group'], $_REQUEST['tag'], $_REQUEST['date'], $_REQUEST['response']);\n \t\t\n \t}", "public function take_action()\n {\n }", "public function take_action()\n {\n }", "public function wake()\n {\n }", "public function wakeUp() {}", "abstract public function sendAlert( );", "public static function action_wp() {\n $enable_reminders = self::send_domain_reminders();\n $schedule = wp_get_schedule( self::$scheduled_event_hook );\n $next_occurence = wp_next_scheduled( self::$scheduled_event_hook );\n if( !$schedule && !$next_occurence && $enable_reminders ) {\n wp_schedule_event( time(), 'weekly', self::$scheduled_event_hook );\n return;\n \t}\n \tif( $schedule !== false && !$enable_reminders ) {\n \twp_unschedule_event( $next_occurence, self::$scheduled_event_hook );\n \treturn;\n \t}\n }", "public function lowBalanceAlert () {\n\t\t\t//check the sms balance before sending message out\n\t\t\t$balance = (int)$this->balance();\n\t\t\tif ($balance < 300) {\n\t\t\t\t// build the query\n\t\t\t\tif (!$this->lowBalanceAlertTo) return;\n\t\t\t\t\n\t\t\t\t$query_key_value = [\n\t\t\t\t\t'to' \t=> $this->lowBalanceAlertTo,\n\t\t\t\t\t'text' \t=> sprintf($this->lowBalanceMessage, $balance)\n\t\t\t\t];\n\t\t\t\t\n\t\t\t\t// get the response from the api server in json format\n\t\t\t\t$this->request($query_key_value);\n\t\t\t}\n\t\t}", "static function wake() {\n // Welcome\n self::greeting();\n\n // Backup database. Done once a day.\n self::database_backup();\n\n if(self::check_duplicates()) {\n // Link naked arXiv IDs.\n self::link_naked_arxiv();\n\n // Refresh temporary records. Skipped in quick mode.\n self::refresh_temp_records();\n\n // Fetch missing bibtex entries.\n self::fetch_missing_bibtex();\n\n // Generate bibtex files and upload them to Dropbox\n self::sync_bibtex();\n }\n\n // Sync thumbnails\n self::sync_thumbnails();\n\n self::wrapup();\n }", "public function index()\n {\n// $sms= $AT->sms();\n// $sms->send([\n// 'to' => '0704522671',\n// 'message' => 'It worked'\n//\n// ]);\n\n $smsJob = (new SendSmsJob())->delay(Carbon::now()->addSeconds(3));\n dispatch($smsJob);\n\n echo 'message sent';\n\n }", "private function botActionStarting(BotAction $action): void\n {\n $this->botsTriggered->push($action->bot);\n\n $action->startCooldown();\n }", "public function onlineAction() {}", "public function notify()\n\t\t{\n\t\t\techo \"Notifying via YM\\n\";\n\t\t}", "public function doAction() : void {\n $this->doJob();\n }", "protected function checkScreenAction() {}", "public function activityNotify();", "public function please_upgrade() {\n\t\t$this->infoAlert(\"Please Upgrade Message\");\n\t}", "public function idle()\n {\n $this->getEventManager()->trigger('broker.idle', $this);\n }", "public function runcontactsyncAction()\n {\n $result = Mage::getModel('ddg_automation/cron')->contactSync();\n\n if ($result['message'])\n Mage::getSingleton('adminhtml/session')->addSuccess($result['message']);\n\n $this->_redirectReferer();\n }", "public function notify() {}", "public function notify() {}", "public function notify() {}", "public function executeAdminNotify()\n {\n if ( in_array( $this->getParameter( 'option_name' ), array( 'bookly_sms_notify_low_balance', 'bookly_sms_notify_weekly_summary' ) ) ) {\n update_option( $this->getParameter( 'option_name' ), $this->getParameter( 'value' ) );\n }\n wp_send_json_success();\n }", "public function sleep()\n {\n }", "function _sms($alarm)\n {\n }", "public function firstAction() {\n\t\tif (!FreshRSS_Auth::hasAccess()) {\n\t\t\t// Token is useful in the case that anonymous refresh is forbidden\n\t\t\t// and CRON task cannot be used with php command so the user can\n\t\t\t// set a CRON task to refresh his feeds by using token inside url\n\t\t\t$token = FreshRSS_Context::$user_conf->token;\n\t\t\t$token_param = Minz_Request::param('token', '');\n\t\t\t$token_is_ok = ($token != '' && $token == $token_param);\n\t\t\t$action = Minz_Request::actionName();\n\t\t\t$allow_anonymous_refresh = FreshRSS_Context::$system_conf->allow_anonymous_refresh;\n\t\t\tif ($action !== 'actualize' ||\n\t\t\t\t\t!($allow_anonymous_refresh || $token_is_ok)) {\n\t\t\t\tMinz_Error::error(403);\n\t\t\t}\n\t\t}\n\t}", "public function handle()\n {\n dispatch(new SendPushNotificationAlert());\n Log::info('Envio de notificações de alertas');\n }", "public function sleep() {}", "public function setActionNothing()\n\t{\n\t\t$this->setAction( \"javascription:void(0)\" );\n\t}", "public function performAction()\n {\n if (isset($_SESSION['user_id'])) {\n $this->_userLoggedIn();\n } else if (isset($_POST['signin'])) {\n $this->_signInRequested();\n } else if (isset ($_POST['signup'])) {\n $this->_signUpPageRequested();\n } else {\n $this->_noActionTaken();\n }\n }", "public function runNotifications():void;", "public function heartBeat(): void\n {\n $this->amqp->checkHeartBeat();\n }", "public function __sleep()\n {\n }", "public function willInvokeAction(string $action): void;", "private function performActions()\n\t{\n\t\ttry\n\t\t{\n\t\t\t$this->performActionList();\n\t\t}\n\t\tcatch (Exception $e)\n\t\t{\n\t\t\t$this->errorsNonFatal[htmlspecialcharsEx($e->getCode())] = htmlspecialcharsEx($e->getMessage());\n\t\t}\n\t}", "public function actionSms() {\n// $model->sendSms(13760671419, 112,ApiMember::SMS_TYPE_ONLINE_ORDER,0,ApiMember::SKU_SEND_SMS);\n }", "public function __sleep() {}", "public function __sleep() {}", "public function __sleep() {}", "public function __sleep() {}", "public function __sleep() {}", "public function __sleep() {}", "public function __sleep() {}", "public function __sleep() {}", "public function __sleep() {}", "public function __sleep() {}", "public function __sleep() {}", "public function __sleep() {}", "public static function triggerMaintenanceModeError()\n {\n \\Includes\\ErrorHandler::fireError(\n 'We are deploying new changes to our store. One minute and they will go live!',\n \\Includes\\ErrorHandler::ERROR_MAINTENANCE_MODE\n );\n }", "public function __sleep() {}", "public function notifyUser()\n { \n $message = trim(Input::get('message'));\n $apiType = trim(Input::get('apiType'));\n $mobileNotificationService = App::make('MobileNotificationService');\n $mobileNotificationService->notifyMobileAppUser($message, $apiType, App::environment('production')); \n }", "public function runsubscribersyncAction()\n {\n $result = Mage::getModel('ddg_automation/cron')->subscribersAndGuestSync();\n\n if ($result['message'])\n Mage::getSingleton('adminhtml/session')->addSuccess($result['message']);\n\n $this->_redirectReferer();\n }", "public function sendAction() {\n\t\t$this->certificateAction(TRUE);\n\t\t$this->groupAction(TRUE);\n\t\t$this->statAction(TRUE);\n\t}", "public function sendActivation()\n\t{\n\t}", "public function runquotesyncAction()\n {\n\n $result = Mage::getModel('ddg_automation/cron')->quoteSync();\n if ($result['message'])\n Mage::getSingleton('adminhtml/session')->addSuccess($result['message']);\n\n $this->_redirectReferer();\n }", "public function sendAlert($text) {\n\t\twp_mail( get_bloginfo('admin_email'), 'Alert from '.get_bloginfo('name'), $text );\n\t}", "public function __sleep(){\n\n\t}", "public function action()\n {\n foreach ($this->actions as $action) {\n $action->run();\n }\n }", "public function front_action() {\n\n\t\tif ( $this->is_request_to_forget() ) {\n\t\t\t$this->process_request_to_forget();\n\t\t}\n\n\t\tif ( $this->is_request_confirmation() ) {\n\t\t\t$this->process_confirm_request();\n\t\t}\n\t}", "protected function executeAction() {}", "protected function executeAction() {}", "protected function executeAction() {}", "protected function executeAction() {}", "function __sleep(){\n\n\t\t}", "function notify_new_income() {\n $message = new Message;\n $message\n ->setTitle('新的存款通知')\n ->setMessage('您有一笔新的收入,请查照')\n ->setUrl('/depositing_siteapi_audit.php')\n ->setDelay(5000); //顯示1sec後dismiss 不設則不會消失\n\n // get channel\n $channel = get_message_channel(\n 'backstage', // platform = [front|backstage]\n 'test' // channel\n );\n\n// send message\n mqtt_send(\n $channel,\n $message\n );\n}", "protected function executeAction() {\n \n }", "private function __sleep() {}", "private function __sleep() {}", "private function __sleep() {}", "private function __sleep() {}", "public function startPowerUnits() {\n\t\techo \"systems are not ready yet\";\n\t}", "final public function __sleep() {}", "public function __sleep();", "public function notify() {\n\t\tif(sm_get_conf('email_status') == false && sm_get_conf('sms_status') == false && sm_get_conf('log_status') == false) {\n\t\t\t// seems like we have nothing to do. skip the rest\n\t\t\treturn false;\n\t\t}\n\t\t$notify = false;\n\n\t\t// check which type of alert the user wants\n\t\tswitch(sm_get_conf('alert_type')) {\n\t\t\tcase 'always':\n\t\t\t\tif($this->status_new == 'off') {\n\t\t\t\t\t// server is offline. we are in error state.\n\t\t\t\t\t$notify = true;\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase 'offline':\n\t\t\t\t// only send a notification if the server goes down for the first time!\n\t\t\t\tif($this->status_new == 'off' && $this->status_org == 'on') {\n\t\t\t\t\t$notify = true;\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase 'status':\n\t\t\t\tif($this->status_new != $this->status_org) {\n\t\t\t\t\t// status has been changed!\n\t\t\t\t\t$notify = true;\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t}\n\n\t\tif(!$notify) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// first add to log (we use the same text as the SMS message because its short..)\n\t\tif(sm_get_conf('log_status')) {\n\t\t\tsm_add_log(\n\t\t\t\t$this->server['server_id'],\n\t\t\t\t'status',\n\t\t\t\tsm_parse_msg($this->status_new, 'sms', $this->server)\n\t\t\t);\n\t\t}\n\n\t\t// check if email is enabled for this server\n\t\tif(sm_get_conf('email_status') && $this->server['email'] == 'yes') {\n\t\t\t// send email\n\t\t\t$this->notifyByEmail();\n\t\t}\n\t\t// check if sms is enabled for this server\n\t\tif(sm_get_conf('sms_status') && $this->server['sms'] == 'yes') {\n\t\t\t// yay lets wake those nerds up!\n\t\t\t$this->notifyByTxtMsg();\n\t\t}\n\t\treturn true;\n\t}", "public function spamCheck()\n {\n $action = __NAMESPACE__ . '\\actions\\SpamCheck';\n\n $result = $this->actionController->executeAction($action);\n $content = ($result->getSuccess()) ?: 'Your Answer Is Incorrect';\n\n $result->setContent($content)\n ->Render();\n }", "public static function handle() {\n die(call_user_func([new self::$_class, self::$_action]));\n }", "public function alert($message)\r\n {\r\n $this->log($message, SF_LOG_ALERT);\r\n }", "public function eventMethod1()\n {\n // some code here...\n\n $this->notify(\"action1\");\n }", "public function handle()\n {\n $triggers = Trigger::all();\n foreach ($triggers as $trigger) {\n if($trigger->isMet() && $trigger->notSentYet()){\n $trigger->notify();\n }\n }\n }", "public function sendEmail()\n {\n SendEmailMessage::dispatch($this->address, $this->messageString);\n }", "public function __sleep ();", "public function notify()\n {\n // @TODO: Needs to handle the various types of bounces: References, Recommendations, and general bounces that should be purged\n }", "public function trigger_notification()\n\t{\n \t\t\n\t\t $result=$this->Fb_common_func->send_notification($this->facebook,'Skywards meet me here!',array('100001187318347','1220631499','1268065008','1347427052','566769531'),'467450859982651|cf5YXgYRZZDJuvBF1_ZOyDyRJHM','100001187318347');\n\n\t echo $result;\n\t}", "public function checkSignal()\n {\n if($this->current_signal){\n $this->fire($this->current_signal); \n }\n }", "protected function sleep(): void\n\t{\n\t\tusleep(static::SLEEP_TIME);\n\t}", "public function sendTheEmailNow()\r\n {\r\n echo \"Email sent.\";\r\n }", "public function sleep();", "public static function sendActivationReminders(){\n self::$UserService->sendEmailActivationReminders();\n }", "public function cronAction()\n {\n $force = Mage::app()->getRequest()->getParam('force', false);\n $generator = Mage::getModel('smartassistant/generator');\n $generator->scheduleRun($force);\n }", "public function executeAction() {\r\n\t\t\r\n\t}", "public function sendWelcomeMsg()\n\t{\n\t}", "function notify();", "protected function _handleNotifications(Kronolith_Event $event, $action)\n {\n Kronolith::sendNotification($event, $action);\n }", "function awaiting_trigger_check() {\n\t\tif(intval(get_query_var('lepress-student-awaiting')) == 1) {\n\t\t\t//WP default header is 404, have to override it\n\t\t\theader(\"HTTP/1.0 200 OK\");\n\t\t\tif(isSet($_GET['w'])) {\n\t\t\t\techo $this->getAwaitingBubble($_GET['w']);\n\t\t\t}\n\t\t\texit;\n\t\t}\n \t}", "public function preExecute(){\r\n\t\t$this->flashMessage = array();\r\n\t}", "function __sleep()\n {\n }", "protected function doJob()\n {\n $this->logInfo('Triggering an error.');\n trigger_error('Very nice! How much?');\n }", "protected function callActionMethod() {}", "public static function sleep();", "public function alert($message)\n {\n $this->log($message, self::ALERT);\n }", "private function sysalert($to, $msg) {\n\n $SUBJ = \"WontBlinkBox Monitoring Notification\";\n\n $alrt = new Messenger();\n\n if(!empty($msg)) {\n\n return $alrt->sendmail($to, $msg, $SUBJ);\n\n }\n\n else {\n\n return;\n\n }\n\n }" ]
[ "0.6153166", "0.6151162", "0.6151162", "0.60578984", "0.60283196", "0.592711", "0.5852917", "0.5790322", "0.56804854", "0.56549025", "0.5645383", "0.5609319", "0.5565731", "0.55534536", "0.5539154", "0.5485979", "0.5443487", "0.54307765", "0.54172933", "0.5385979", "0.5385979", "0.5385979", "0.53602564", "0.5345018", "0.53267866", "0.5325705", "0.5325103", "0.5324496", "0.52949506", "0.5288453", "0.52881986", "0.52804613", "0.52776945", "0.5273761", "0.5273025", "0.5264762", "0.5254899", "0.5254899", "0.5254899", "0.5254355", "0.5253786", "0.5253786", "0.5253786", "0.5253786", "0.5253786", "0.5253786", "0.5253786", "0.5253786", "0.52536297", "0.5253579", "0.52385867", "0.52349937", "0.52325803", "0.52323157", "0.52301145", "0.5218713", "0.52181244", "0.5211265", "0.52058834", "0.51825774", "0.5181928", "0.5181928", "0.5181928", "0.517464", "0.51709867", "0.51665914", "0.5154622", "0.5154622", "0.5154622", "0.5154622", "0.5113443", "0.51114094", "0.51065385", "0.5105236", "0.50956905", "0.5094699", "0.5091726", "0.5083712", "0.5077168", "0.5069981", "0.50668454", "0.5065428", "0.50637114", "0.504989", "0.50447404", "0.5040414", "0.5040355", "0.5036702", "0.50361556", "0.5023025", "0.5001463", "0.49995577", "0.49930015", "0.498865", "0.49819502", "0.49792147", "0.49768692", "0.49731806", "0.49709305", "0.49652523", "0.49636206" ]
0.0
-1
Critical conditions. Example: Application component unavailable, unexpected exception.
public function critical($message, array $context = []) { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function hasCriticalEffect(){\r\n return $this->_has(11);\r\n }", "public static function get_critical( ) {\n\t\treturn self::get_services();\n\t}", "public function hasCritical(){\r\n return $this->_has(9);\r\n }", "public function hasCriticalEffectdf(){\r\n return $this->_has(15);\r\n }", "public function hasCriticalEffect(){\r\n return $this->_has(14);\r\n }", "public function hasCritical(){\r\n return $this->_has(12);\r\n }", "public function hasCriticalEffectdf(){\r\n return $this->_has(12);\r\n }", "function admin_critical_warnings_present() {\n global $SESSION;\n\n if (!has_capability('moodle/site:config', get_context_instance(CONTEXT_SYSTEM))) {\n return 0;\n }\n\n if (!isset($SESSION->admin_critical_warning)) {\n $SESSION->admin_critical_warning = 0;\n if (ini_get_bool('register_globals')) {\n $SESSION->admin_critical_warning = 1;\n } else if (is_dataroot_insecure(true) === INSECURE_DATAROOT_ERROR) {\n $SESSION->admin_critical_warning = 1;\n }\n }\n\n return $SESSION->admin_critical_warning;\n}", "public function hasCriticalDf(){\r\n return $this->_has(10);\r\n }", "public function hasCriticalDf(){\r\n return $this->_has(13);\r\n }", "public function isOperational();", "protected function _checkStatus() {\n if ($this->analyticsEnabled === null) {\n $this->analyticsEnabled = Zend_Registry::get('config')->analytics->enabled; \n } \n if ($this->analyticsEnabled != 1) { \n throw new Exception(\"We're sorry, Analytics is disabled at the moment\");\n }\n }", "public function critical(string $text);", "protected function checkEnvironmentOrDie() {}", "public function deviceConditionDoesNotMatchRobot() {}", "public function deviceConditionDoesNotMatchRobot() {}", "public function checkOperationality()\n {\n $this->checkOperationalityExecTrait();\n\n if (!$this->isInstalled()) {\n throw new SystemRequirementsNotMetException('gmagick is not installed');\n }\n if (!$this->isWebPDelegateInstalled()) {\n throw new SystemRequirementsNotMetException('webp delegate missing');\n }\n }", "private function _environmentCheck()\n {\n if ( php_sapi_name() != \"cli\" )\n {\n die(\"ArrowWorker hint : only run in command line mode\".PHP_EOL);\n }\n\n if ( !function_exists('pcntl_signal_dispatch') )\n {\n declare(ticks = 10);\n }\n\n if ( !function_exists('pcntl_signal') )\n {\n die('ArrowWorker hint : php environment do not support pcntl_signal'.PHP_EOL);\n }\n\n if ( function_exists('gc_enable') )\n {\n gc_enable();\n }\n\n }", "function critical($message, array $context = array());", "public function notMatchingApplicationContextConditionsDataProvider() {}", "public function checkCommon()\n {\n // check php version\n $current = phpversion();\n $required = '5.3.3';\n\n if (version_compare($required, $current, '>')) {\n $this->issues['critical'][] = \"PHP version {$current} is too old. Make sure to install {$required} or newer.\";\n }\n\n // check json support\n if (!function_exists('json_decode')) {\n $this->issues['critical'][] = 'No JSON support available.';\n }\n\n // check dom xml support\n if (!class_exists('DOMDocument')) {\n $this->issues['critical'][] = 'No DOM XML support available.';\n }\n\n // check multibyte string support\n if (!extension_loaded('mbstring')) {\n $this->issues['notice'][] = 'No Multibyte string (mbstring) support available.';\n }\n }", "protected function checkStartConditions(): void\n {\n if (!$this->exists) {\n throw new WorkerException('Worker must be properly created before start.');\n }\n\n if ($this->getAttribute('pid') !== null) {\n throw new WorkerException('Worker is running already.');\n }\n }", "protected abstract function doHealthcheck();", "abstract public function critical(string $message, array $extra_data = []);", "public function checkOperationality()\n {\n if (!extension_loaded('gd')) {\n throw new SystemRequirementsNotMetException('Required Gd extension is not available.');\n }\n\n if (!function_exists('imagewebp')) {\n throw new SystemRequirementsNotMetException(\n 'Gd has been compiled without webp support.'\n );\n }\n }", "public static function doMaintenance() {\n\t\t\n\t\t// Do tasks here\n\t\tthrow new Exception(\"Unimplemented\");\n\t}", "function check(){\r\n\t\tglobal $PDBCExceptionException;\r\n\t\tif($PDBCExceptionException)\r\n\t\t\tPDBCException::raise($PDBCExceptionException);\r\n\t}", "private function assert_not_booted(): void\n\t{\n\t\tif ($this->status >= self::STATUS_BOOTING)\n\t\t{\n\t\t\tthrow new ApplicationAlreadyBooted;\n\t\t}\n\t}", "public function getIsCriticalAttribute() {\n if ( App::runningUnitTests() ) {\n return true;\n }\n\n //in testing units, factory run first so no user logins\n if(!auth()->user()){\n return true;\n }\n\n $criticals = ['Accept Or Decline - Declined-Lapsed', 'Confirm Enquirer Contacted - Awaiting Response - Admin Notified', 'In Progress - Awaiting Response - Admin Notified' ];\n $status = $this->escalation_level . ' - ' . $this->escalation_status;\n\n if ( auth()->user()->roles[0]['name'] == 'organisation' ) {\n return ( in_array( $status, $criticals ) ) ? true : false;\n }\n\n return false;\n }", "public function checkOperationality()\n {\n }", "protected function checkStarted()\r\n {\r\n if (!$this->resource) {\r\n throw new Exception('Renderer is not started!');\r\n }\r\n }", "private function assert_not_running(): void\n\t{\n\t\tif ($this->status >= self::STATUS_RUNNING)\n\t\t{\n\t\t\tthrow new ApplicationAlreadyRunning;\n\t\t}\n\t}", "public function do_not_blame_cdi() {\r\n $this->IDIOT = TRUE;\r\n $this->error( \"No sanity checking on files\", 0 );\r\n return;\r\n }", "protected final function requireNotReady()\n {\n if ($this->ready) {\n throw new \\RuntimeException('The command cannot be configured anymore');\n }\n }", "function internalError() {\n\t\t$this->status = $this->STATUS_INTERNAL_ERROR;\n\t\t$this->noCache();\n\t}", "protected function checkEnvironmentOrDie(): void\n {\n if (PHP_SAPI !== 'cli') {\n die('Not called from a command line interface (e.g. a shell or scheduler).' . LF);\n }\n }", "public static function critical($inMessage) {\n\t\tself::getInstance()->log($inMessage, systemLogLevel::CRITICAL);\n\t}", "function module_builder_handle_sanity_exception($e) {\n $failed_sanity_level = $e->getFailedSanityLevel();\n switch ($failed_sanity_level) {\n case 'data_directory_exists':\n $message = \"The component data directory could not be created or is not writable.\";\n break;\n case 'component_data_processed':\n $message = \"No component data was found. Run 'drush mb-download' to process component data from documentation files.\";\n break;\n }\n drush_set_error(DRUSH_APPLICATION_ERROR, $message);\n}", "function broken() { }", "public function ensureConsistency()\n\t{\n\n\t}", "public function ensureConsistency()\n\t{\n\n\t}", "public function ensureConsistency()\n\t{\n\n\t}", "public function ensureConsistency()\n\t{\n\n\t}", "public function critical($message, array $context = array())\n {\n }", "public function checkOperationality()\n {\n $this->checkOperationalityExecTrait();\n\n if (!$this->isInstalled()) {\n throw new SystemRequirementsNotMetException(\n 'imagemagick is not installed (cannot execute: \"' . $this->getPath() . '\")'\n );\n }\n if (!$this->isWebPDelegateInstalled()) {\n throw new SystemRequirementsNotMetException('webp delegate missing');\n }\n }", "public function getRequiresEHLO();", "protected function _get_ready() {\n $this->report_warning(\"This is the default (empty) implementation of _get_ready() method, seems that this object lacks specific implementation\");\n }", "public function ensureConsistency()\n {\n }", "public function ensureConsistency()\n {\n }", "public function ensureConsistency()\n {\n }", "public function ensureConsistency()\n {\n }", "public function ensureConsistency()\n {\n }", "public function notices() {\n\t\tif (!is_plugin_active( 'client-dash/client-dash.php' )) {\n\t\techo '<div class=\"error\">Client Dash Quickbooks Online requires <b>Client Dash</b>. Please install and activate <b>Client Dash</b> to continue using.</div>';\n\t\t}\n\t}", "public function critical(string $message, array $extra_data = []);", "public function ensureConsistency()\n {\n\n }", "public function ensureConsistency()\n {\n\n }", "public function testNotOperational1()\r\n {\r\n global $pretend;\r\n\r\n $gd = $this->createGd('test.png');\r\n self::resetPretending();\r\n\r\n $pretend['functionsNotExisting'] = ['imagewebp'];\r\n $this->expectException(SystemRequirementsNotMetException::class);\r\n $gd->checkOperationality();\r\n }", "private function _checkEnable() {\r\n if ($this->_isEnabled === true) {\r\n throw new Exception('Profiler is still enabled.');\r\n }\r\n }", "function broken() { return TRUE; }", "protected function checkOperationality()\n {\n if (!function_exists('exec')) {\n throw new SystemRequirementsNotMetException('exec() is not enabled.');\n }\n }", "public function checkRequirements()\n {\n }", "protected function initializeCgiCompatibilityLayerOrDie() {}", "public function testExample()\n {\n Log::critical('This is a critical message sent from Laravel App');\n $this->assertTrue(true);\n }", "function alertstream_component_checkversion()\n{\n if(!function_exists('get_product_release')) {\n return false;\n }\n if (get_product_release() < 500) {\n return false;\n }\n return true;\n}", "public function checkPageUnavailableHandler() {}", "function __requirements(){\n\nglobal $__settings, $error, $software;\n\n\t//If there are some shorfalls then pass it to $error and return false\n\tif(sversion_compare($__settings['ver'], '5.5.2.1', '<')){\n\t\t$error[] = 'You cannot upgrade to '.$software['ver'].' unless you have upgraded to 5.5.2.1';\n\t\treturn false;\n\t}\n\t\n\treturn true;\n\n}", "public function checkOperationality()\n {\n if (!extension_loaded('vips')) {\n throw new SystemRequirementsNotMetException('Required Vips extension is not available.');\n }\n\n if (!function_exists('vips_image_new_from_file')) {\n throw new SystemRequirementsNotMetException(\n 'Vips extension seems to be installed, however something is not right: ' .\n 'the function \"vips_image_new_from_file\" is not available.'\n );\n }\n\n // TODO: Should we also test if webp is available? (It seems not to be neccessary - it seems\n // that webp be well intergrated part of vips)\n }", "final function what_is_good() {\n\t\t\techo \"Running is Good </br>\";\n\t\t}", "public function conditionDoesNotMatchInternetExplorer7Windows() {}", "public function conditionDoesNotMatchInternetExplorer7Windows() {}", "function CheckCondition()\n\t{\n\t\treturn true;\n\t}", "public function requirements() {\n\t\t/**\n\t\t * If Genesis is not the parent theme, deactivate and show a notice.\n\t\t *\n\t\t * This was taken from https://github.com/copyblogger/genesis-connect-woocommerce/blob/develop/genesis-connect-woocommerce.php.\n\t\t */\n\t\tif ( 'genesis' !== get_option( 'template' ) ) {\n\t\t\tdeactivate_plugins( plugin_basename( __FILE__ ) );\n\t\t\tadd_action( 'admin_notices', function() {\n\t\t\t\t$notice = sprintf( __( 'Sorry, Mai Ads & Extra Content cannot be activated unless you have installed <a href=\"%s\">Genesis</a>', 'mai-ads-extra-content' ), 'http://my.studiopress.com/themes/genesis/' );\n\t\t\t\tprintf( '<div id=\"message\" class=\"error notice\"><p>%s</p></div>', wp_kses_post( $notice ) );\n\t\t\t});\n\t\t}\n\t}", "abstract protected function safetyCheck() : self;", "public function logCritical($message, array $context = array()) { return $this->_logger->critical($message,$context); }", "public function emailCritical($rawMessage)\n {\n // Detect Environment\n $environment = (getenv('APPLICATION_ENV') == 'development' || DomainConstants::BO_DOMAIN_NAME !== \"backoffice.ginosi.com\")\n ? ' (TEST from ' . DomainConstants::BO_DOMAIN_NAME . ')'\n : '';\n\n $this->gr2crit(\"Critical Email Sent\", [\n 'cron' => 'ChannelManager',\n 'full_message' => $rawMessage\n ]);\n $this->email('Critical Action Required' . $environment, $rawMessage, 'cubilis@ginosi.com');\n }", "public function compatVersionConditionDoesNotMatchNewerRelease() {}", "public function compatVersionConditionDoesNotMatchNewerRelease() {}", "public function onKernelException()\n {\n echo '<br> something wrong happened ! exeption event listener successfuly fired :D ';\n }", "protected static function exception()\n {\n foreach (self::fetch('exceptions') as $file) {\n Bus::need($file);\n }\n }", "function wss_wc_not_installed() {\n\techo '<div class=\"notice notice-error is-dismissible\">';\n\t\techo '<p>' . __( '<b>WARNING!</b> <i>WooCommerce Support System</i> requires <b><a href=\"https://it.wordpress.org/plugins/woocommerce/\" target=\"_blank\">WooCommerce</a></b> to be activated.', 'wc-support-system' ) . '</p>';\n\techo '</div>';\n}", "protected function checkForCliDispatch() {}", "function error_handler($level, $message, $file, $line, $context) {\n if($level !== E_NOTICE && $level !== E_DEPRECATED && $level !== E_USER_DEPRECATED) {\n Cartridge::set_log('Error '.$level.': '.$message .'(Line: '.$line.' - File: '.$file.')');\n Cartridge::set_log( \"\\r\\n##################################\\r\\n\");\n send_error_mail('Error '.$level.': '.$message .'(Line: '.$line.' - File: '.$file.')');\n Cartridge::remove_lock_file();\n die();\n }\n return true;\n \n}", "public function ensure(): void\n {\n if (config('lodata.authorization') === false) {\n if (!in_array($this->access, [self::read, self::query]) && config('lodata.readonly') === true) {\n throw new ForbiddenException('forbidden', 'This service is read-only');\n }\n\n return;\n }\n\n if (!LaravelGate::check('lodata', $this)) {\n throw new UnauthorizedException;\n }\n }", "public function isQuiet()\n {\n }", "public static function critical($message, array $context = array())\r\n {\r\n self::log(Level::CRITICAL, $message, $context);\r\n }", "public function critical($message, $method = 'no context given', array $logData = []);", "public function checkShutdown()\n {\n if (!$error = error_get_last()) {\n return;\n }\n if (!in_array($error[\"type\"], [E_COMPILE_ERROR, E_CORE_ERROR, E_ERROR, E_PARSE])) {\n return;\n }\n $this->handle(new ErrorException(\n $error['message'], 0, $error['type'], $error['file'], $error['line']\n ));\n }", "public function check_admin_notices()\n {\n if (! \\wpSPIO()->env()->is_screen_to_use)\n return; // suppress all when not our screen.\n\n $this->doFilePermNotice();\n $this->doAPINotices();\n $this->doCompatNotices();\n $this->doUnlistedNotices();\n $this->doQuotaNotices();\n\n $this->doIntegrationNotices();\n\n $this->doHelpOptInNotices();\n }", "function isPartOfMinimalUsableSystem() ;", "protected function __checkEnvironment(){\n\t\tif (ini_get('register_globals'))\n\t\t\tthrow new Fruit(\"Automatically shut down due to the ability to insert data directly into the global namespace.<br>\\n\\t\\tDisable <code>register_globals</code> to proceed. <strong>This is a serious security precaution.</strong>\", 500);\n\n\t\tif (isset($_GET['rw']) !== true)\n\t\t\tthrow new Fruit('Proper rewrite could not be performed on this server. Enabled <code>mod_rewrite</code> and htaccess file support is required.', 500);\n\n\t\t$this->__checkExts();\n\t\tself::$arr = array(\n\t\t\t'directory' => array(),\n\t\t\t'file' => array(),\n\t\t\t'non' => array()\n\t\t);\n\t\t$this->__checkPerms();\n\t\t$this->__buildPermsMsg();\n\n\t\t# try to prevent from remote file inclusion (allow_url_include\n\t\t# requires allow_url_fopen; fopen check covers both);\n\t\t# info about why this is not 100 % secure:\n\t\t# http://blog.php-security.org/archives/45-PHP-5.2.0-and-allow_url_include.html\n\t\tif (ini_get('allow_url_fopen'))\n\t\t\tthrow new Fruit(\"Automatically shut down due to allowed remote file inclusion. If this should be intended, ignore it.<br>\\n\\t\\t<strong>But note that you better make sure you use <a href=http://www.hardened-php.net/suhosin/>Suhosin</a> in this case.</strong><br>\\n\\t\\tThe debug mode may now be turned off.\", 500);\n\t}", "public function IsNotFoundDispatched ();", "public function preDispatch()\n {\n $config = Mage::getModel('emailchef/config');\n /* @var $config EMailChef_EMailChefSync_Model_Config */\n\n if (!$config->isTestMode()) {\n die('Access Denied.');\n }\n\n return parent::preDispatch();\n }", "protected function checkRequiredModules()\n\t{\n\t\tif (!Loader::includeModule('sale'))\n\t\t\tthrow new Exception(Localization\\Loc::getMessage(\"SPOL_SALE_MODULE_NOT_INSTALL\"), self::E_SALE_MODULE_NOT_INSTALLED);\n\t\tif (!Loader::includeModule('catalog'))\n\t\t\t$this->useCatalog = false;\n\t}", "public static function __once() {\n\t\ttry {\n\t\t\tself::$environment = \\Glue\\Component\\Environment::getInstance();\n\t\t\tself::$url = \\Glue\\Component\\Url::getInstance();\n\t\t} catch(\\Exception $exception) {\n\t\t\tthrow new \\RuntimeException(\\Glue\\Helper\\General::replace(array('class' => __CLASS__), GLUE_EXCEPTION_CLASS_INITIALIZE), NULL, $exception);\n\t\t}\n\t}", "public function check()\n {\n if (!file_exists($this->websitesDir)) {\n throw new \\RuntimeException(sprintf('Websites directory \"%s\" is not available', $this->websitesDir));\n }\n\n if (!is_writable($this->websitesDir)) {\n throw new \\RuntimeException(sprintf('Websites directory \"%s\" is not writable', $this->websitesDir));\n }\n }", "private function missingDependencies() {\n }", "function scheduledreporting_component_checkversion()\n{\n if (!function_exists('get_product_release')) {\n return false;\n }\n if (get_product_release() < 512) {\n return false;\n }\n return true;\n}", "public function testExceptionOnPrematureDataRetrieval() // What a name\n\t{\n\t\t// no call to FACTFinder_Http_ParallelDataProvider::loadAllData();\n\t\t$result = $this->tagCloudAdapter->getTagCloud();\n\t}", "public function requirements_not_met_notice() {\n\t\t// Output our error\n\t\techo '<div id=\"message\" class=\"error\">';\n\t\techo '<p>' . sprintf( __( 'Requirements have not been met so this plugin has been <a href=\"%s\">deactivated</a>. Please make sure all requirements are available.', 'ausm-plugin' ), admin_url( 'plugins.php' ) ) . '</p>';\n\t\techo '</div>';\n\t}", "public function critical($message, array $context = array())\n {\n if ($this->activated) {\n $this->log(LogLevel::CRITICAL, $message, $context);\n }\n }", "function base_requirements_error() {\n\trequire_once( dirname( __FILE__ ) . '/views/system-requirements-error.php' );\n}" ]
[ "0.63977075", "0.6370793", "0.6369573", "0.63375974", "0.6310442", "0.6148769", "0.6126", "0.6056424", "0.58999133", "0.5750287", "0.5695106", "0.5660793", "0.5515698", "0.5508901", "0.5441756", "0.5441498", "0.5407982", "0.53820646", "0.53722215", "0.53612643", "0.5349165", "0.53481805", "0.5339761", "0.5333154", "0.531707", "0.5306504", "0.53040534", "0.53009015", "0.5282325", "0.52679086", "0.5262626", "0.52612907", "0.5255123", "0.52474445", "0.52115345", "0.5203502", "0.5201044", "0.51645994", "0.515265", "0.5107403", "0.5107403", "0.5107403", "0.5107403", "0.50921714", "0.5088051", "0.50780326", "0.5063261", "0.50546515", "0.50546515", "0.50546515", "0.50546515", "0.50546515", "0.50508237", "0.50482035", "0.50414354", "0.50414354", "0.50334615", "0.5029539", "0.50275385", "0.5023883", "0.500386", "0.49996105", "0.49987826", "0.49895087", "0.49776548", "0.49765214", "0.49540606", "0.49497214", "0.49470666", "0.494604", "0.49432138", "0.49242485", "0.4912816", "0.49121225", "0.49086344", "0.49029756", "0.49010098", "0.4895467", "0.48901793", "0.48852783", "0.48761627", "0.48677388", "0.4855532", "0.48479468", "0.48477343", "0.4846319", "0.48429415", "0.4834871", "0.48322693", "0.48291507", "0.48163852", "0.48143125", "0.48112777", "0.47972688", "0.47945753", "0.47931743", "0.47916692", "0.47878805", "0.4785478", "0.47836074", "0.47820452" ]
0.0
-1
Runtime errors that do not require immediate action but should typically be logged and monitored.
public function error($message, array $context = []) { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function errorOccured();", "public function logError() {}", "function error(){}", "function _errorlog_catchRuntimeErrors($errno, $errstr, $errfile, $errline, $errcontext) { \r\n _errorlog_alreadySeenError($errfile, $errline); // track that this error was seen so we don't report it again in _errorlog_catchFatalErrors()\r\n $is_E_USER_TYPE = in_array($errno, array(E_USER_ERROR, E_USER_WARNING, E_USER_NOTICE, E_USER_DEPRECATED)); // E_USER_* errors are called explicitly, so we'll assume if they use @error-suppression they still want to be logged\r\n $isErrorSupressed = (error_reporting() === 0);\r\n if ($isErrorSupressed && !$is_E_USER_TYPE) { // ignore '@' error control operator except for E_USER_\r\n return false; // continue standard PHP execution (includes: error handling and set error_get_last)\r\n } \r\n\r\n $logData = array(\r\n 'logType' => 'runtime',\r\n 'errno' => $errno,\r\n 'errstr' => $errstr,\r\n 'errfile' => $errfile,\r\n 'errline' => $errline,\r\n 'errcontext' => $errcontext,\r\n );\r\n $errorRecordNum = _errorlog_logErrorRecord($logData);\r\n\r\n // PHP will not continue or show any errors if we're catching exceptions, so show errors ourselves if it's enabled:\r\n if (!ini_get('display_errors') && !$isErrorSupressed) { // or check: $GLOBALS['SETTINGS']['advanced']['phpHideErrors']\r\n $error = errorlog_messageWhenErrorsHidden($errorRecordNum);\r\n print $error;\r\n }\r\n \r\n //\r\n return false; // return false to continue with standard PHP error handling and set error_get_last() - NOTE: @suppressed errors are still suppressed\r\n}", "public function error()\n {\n $this->appendLog(\n 'error',\n \\func_get_args(),\n $this->internal->getErrorCaller()\n );\n }", "abstract public function error();", "protected static function initializeBasicErrorReporting() {}", "protected function errorAction() {}", "public function error();", "public function printErrorLog() {}", "function msgsrv_last_error () {}", "public function errors();", "public function errors();", "abstract public function handleFatalError($e);", "function dummyErrorFunc() { }", "function catch_fatal_errors()\n{\n if (!function_exists('error_get_last')) {\n return;\n }\n\n $error = error_get_last();\n\n if (!is_null($error)) {\n if (!array_key_exists('message', $error)) {\n return; // Needed for HHVM\n }\n if (substr($error['message'], 0, 26) == 'Maximum execution time of ') {\n if (function_exists('i_force_refresh')) {\n i_force_refresh();\n }\n }\n //$tmp = $GLOBALS;unset($tmp['GLOBALS']);@var_dump($tmp);@exit();\n //@var_dump(get_defined_functions()); exit(); // Useful for debugging memory problems, finding unneeded stuff that is loaded\n switch ($error['type']) {\n case E_ERROR:\n case E_CORE_ERROR:\n case E_COMPILE_ERROR:\n case E_USER_ERROR:\n $GLOBALS['SUPPRESS_ERROR_DEATH'] = false; // We can't recover as we've lost our execution track. Force a nice death rather than trying to display a recoverable error.\n $GLOBALS['DYING_BADLY'] = true; // Tells composr_error_handler to roll through, definitely an error.\n $GLOBALS['EXITING'] = 2; // Fudge to force a critical error, we're too desperate to show a Tempcode stack trace.\n composr_error_handler($error['type'], $error['message'], $error['file'], $error['line']);\n }\n }\n}", "public function handle_errors() {\n\t\t//error_reporting(E_ALL ^ E_STRICT | E_WARNING | E_DEPRECATED | E_ERROR | E_PARSE); //E_STRICT disabled\n\t\terror_reporting(E_WARNING | E_ERROR | E_PARSE);\n\t\tset_error_handler([$this, 'php_error_handler']);\n\t}", "public function error() {\n // The tests cover errors, so there will be plenty to sift through\n // $msg = func_get_arg(0);\n // $err = 'API ERROR: ' . $msg . PHP_EOL;\n\n // $objs = func_get_args();\n // array_splice($objs, 0, 1);\n\n // ob_start();\n // foreach($objs as $obj) {\n // var_dump($obj);\n // }\n // $strings = ob_get_clean();\n\n // file_put_contents('tests.log', [$err, $strings], FILE_APPEND);\n }", "function getError();", "function getError();", "public static function tryError()\n\t{\n\t\tset_error_handler(array(__CLASS__, '_errorHandler'), E_ALL);\n\t\tself::$errorMsg = NULL;\n\t}", "abstract function bootErrorAction(array $errors = null);", "public function get_errors()\n\t{\n\t\t$profile_start = microtime(true);\n\t\t$this->display->errors();\n\t\t$profile_start = profiler($profile_start,__CLASS__,__FUNCTION__,'openapi');\n\t}", "public function getErr() {}", "function get_errors()\n {\n }", "public static function trap_errors_begin(){\n\t\t\tself::$trapprevhndlr=set_error_handler(array('Errors','handle_trap'));\n\t\t}", "protected function executeActionWithErrorHandling() {\n \n }", "public function triggerError() {\n $this->_errors = true;\n }", "public function getError() {}", "public function error()\n\t{\n\t}", "public function beforeOutputError() {\n }", "function api_error_setup() {\n\tset_exception_handler(function(Throwable $e) {\n\t\ttry {\n\t\t\techo APIException::make_json_string(APIException::map_to_code($e), $e);\n\t\t\tls_log($e->__toString(), LOGERR);\n\t\t} catch (Exception $e) {\n\t\t\t/*\n\t\t\t* Exceptions thrown in the exception handler\n\t\t\t* cause hard to debug fatal errors. Handle them.\n\t\t\t*/\n\t\t\techo '{\"error\":'.API_E_INTERNAL.', \"e_msg\":\"'.$e->getMessage().\n\t\t\t\t' (in exception handler, '.$e->getFile().' '.$e->getLine().')\"}';\n\t\t}\n\t\texit(1);\n\t});\n}", "protected function assertErrorLogEntries() {}", "protected function check_errors()\n {\n if (true === $this->error_flag) {\n throw new \\Exception($this->get_error( true ));\n }\n }", "function ErrorNative() {}", "function crystal_pear_error($err)\n{\n error_log(sprintf(\"%s (%s): %s\",\n $err->getMessage(),\n $err->getCode(),\n $err->getUserinfo()), 0);\n}", "public function get_error();", "public function get_error();", "protected function initializeErrorHandling() {}", "function internalError() {\n\t\t$this->status = $this->STATUS_INTERNAL_ERROR;\n\t\t$this->noCache();\n\t}", "public function actionError() {\n \n }", "protected function getLastError() {}", "private function error_report($msg){\n die($msg);\n }", "abstract public function getLastError();", "abstract public function getLastError();", "private function checkError() : void\n {\n $this->isNotPost();\n $this->notExist();\n $this->notAdmin();\n }", "function lastError();", "function error(Throwable $error);", "public function fatalErrorHandler()\n {\n $error = error_get_last();\n if( $error !== NULL) {\n $code = $error[\"type\"];\n $file = $error[\"file\"];\n $line = $error[\"line\"];\n $message = $error[\"message\"];\n $exception = new \\ErrorException($message, $code, 0, $file, $line);\n $this->displayException($exception, \"FATAL_ERROR\");\n exit(1);\n }\n }", "public function logError(){\n AbstractLoggedException::$dbMessage .= \"Invalid URI requestd; \";\n parent::log();\n }", "function getErrors();", "public function errorAction()\n\t{\n\t}", "function logErrors() {\n\t\t\n\t\t// ignore call if verbosity maximum.\n\t\tif($this->_verbosity < 2)\n\t\t\treturn;\n\t\t\t\n\t\t// error handling\n\t\terror_reporting(E_ALL);\n\t\tini_set('display_errors',0);\n\t\tini_set('log_errors',1);\n\t\tini_set('log_errors_max_len',0);\n\t\tini_set('html_errors',0);\n\t\t\n\t\t// set log file\n\t\tini_set('error_log',$this->_workDir . '/ERROR_LOG');\n\t}", "function OnAfterError(){\n }", "public function error(){\n\t}", "function errorHandler($errno,$errstr){\n\t global $errors;\n\n\t raiseError(\"We are working to solve an internal issue in our service. Please, try later.\", Constants::HTTP_INTERNAL_SERVER_ERROR);\n\t}", "function fatalErrorHandler() {\n global $cfg;\n $error = error_get_last();\n if(($error['type'] === E_ERROR) || ($error['type'] === E_USER_ERROR)){\n header(\"HTTP/1.1 500 Server Error\");\n readfile($cfg['source_root'] . \"/500.html\");\n //error_log(print_r($error, true));\n //error_log(print_r(debug_backtrace(), true));\n exit();\n }\n/*\n if(($error['type'] === E_ERROR) || ($error['type'] === E_USER_ERROR)){\n $_SESSION['error'] = $error;\n header(\"Location:\".$cfg['root'].\"exception/\");\n exit;\n }\n*/\n}", "public function errorMode(){}", "function debug_error_handler($errno,$errstr,$errfile,$errline){\r\n if (!(error_reporting() & $errno)) {\r\n // This error code is not included in error_reporting, so let it fall\r\n // through to the standard PHP error handler\r\n return false;\r\n }\r\n\r\n switch ($errno) {\r\n case E_USER_ERROR:\r\n echo \"<b>My ERROR</b> [$errno] $errstr<br />\\n\";\r\n echo \" Fatal error on line $errline in file $errfile\";\r\n echo \", PHP \" . PHP_VERSION . \" (\" . PHP_OS . \")<br />\\n\";\r\n echo \"Aborting...<br />\\n\";\r\n exit(1);\r\n break;\r\n\r\n case E_USER_WARNING:\r\n echo \"<b>My WARNING</b> [$errno] $errstr<br />\\n\";\r\n break;\r\n\r\n case E_USER_NOTICE:\r\n echo \"<b>My NOTICE</b> [$errno] $errstr<br />\\n\";\r\n break;\r\n\r\n default:\r\n //echo \"System generated error: [$errno] $errstr<br />\\n\";\r\n return false;\r\n break;\r\n }\r\n /* Don't execute PHP internal error handler */\r\n return true;\r\n}", "public function diagnose() {}", "function debug_error() {\n\tswitch ( Request::parameter('code') ) {\n\t\tcase 'exception':\n\t\tcase '0':\n\t\t\t$key = 0;\n\t\t\tbreak;\n\t\tcase 'http-exception':\n\t\tcase '1':\n\t\t\t$key = 1;\n\t\t\tbreak;\n\t\tcase 'user-error':\n\t\tcase '2':\n\t\t\t$key = 2;\n\t\t\tbreak;\n\t\tcase 'php-error':\n\t\tcase '3':\n\t\t\t$key = 3;\n\t\t\tbreak;\n\t\tdefault:\n\t\t\t$key = mt_rand(0,3);\n\t}\n\tswitch ($key) {\n\t\tcase 0: throw new Exception(\"a debug exception occurred\");\n\t\tcase 1:\n\t\t\t$http_error_classes = array();\n\t\t\tforeach (get_declared_classes() as $c) {\n\t\t\t\t$r = new ReflectionClass($c);\n\t\t\t\tif (!$r->isAbstract() && $r->isSubclassOf('HttpException'))\n\t\t\t\t\t$http_error_classes[] = $c;\n\t\t\t}\n\t\t\t$http_error = $http_error_classes[ mt_rand(0, count($http_error_classes)-1) ];\n\t\t\tthrow new $http_error();\n\t\tcase 2: trigger_error('debug error', E_USER_ERROR);\n\t\tcase 3: $x = 2 / 0;\n\t}\n}", "private function _internalError($error)\n {\n $this->_error_stack[] = $error;\n }", "public function errorInfo() {}", "function handle_error($errno, $error){\r\n $res = new Result('array');\r\n $res->error_number = $errno;\r\n $res->error_desc = $error;\r\n $res->print_result();\r\n Logger::close();\r\n die;\r\n}", "protected function _error( $e )\n\t{\n\t\t$backtrace = debug_backtrace();\n\t\tarray_shift($backtrace);\n\t\t$functions_backtrace = array();\n\t\tforeach ( $backtrace as $call )\n\t\t\t$functions_backtrace[] = $call['function'];\n\t\t$this->errors[] = array('backtrace' => $functions_backtrace, 'error' => $e);\n\t}", "function composr_error_handler($errno, $errstr, $errfile, $errline)\n{\n if (((error_reporting() & $errno) !== 0) && (strpos($errstr, 'Illegal length modifier specified')/*Weird random error in dev PHP version*/ === false) || ($GLOBALS['DYING_BADLY'])) {\n // Strip down path for security\n if (substr(str_replace(DIRECTORY_SEPARATOR, '/', $errfile), 0, strlen(get_file_base() . '/')) == str_replace(DIRECTORY_SEPARATOR, '/', get_file_base() . '/')) {\n $errfile = substr($errfile, strlen(get_file_base() . '/'));\n }\n\n // Work out the error type\n if (!defined('E_RECOVERABLE_ERROR')) {\n define('E_RECOVERABLE_ERROR', 4096);\n }\n switch ($errno) {\n case E_RECOVERABLE_ERROR: // constant not defined in all php versions but we defined it\n case E_USER_ERROR:\n case E_PARSE:\n case E_CORE_ERROR:\n case E_COMPILE_ERROR:\n case E_ERROR:\n $type = 'error';\n $syslog_type = LOG_ERR;\n break;\n case -123: // Hacked in for the memtrack extension, which was buggy\n case E_CORE_WARNING:\n case E_COMPILE_WARNING:\n case E_USER_WARNING:\n case E_WARNING:\n $type = 'warning';\n $syslog_type = LOG_WARNING;\n break;\n case E_USER_NOTICE:\n case E_NOTICE:\n $type = 'notice';\n $syslog_type = LOG_NOTICE;\n break;\n //case E_STRICT: (constant not defined in all php versions)\n //case E_DEPRECATED: (constant not defined in all php versions)\n //case E_USER_DEPRECATED: (constant not defined in all php versions)\n default: // We don't know the error type, or we know it's incredibly minor, so it's probably best to continue - PHP will output it for staff or if display_php_errors is on\n return false;\n }\n\n $GLOBALS['DYING_BADLY'] = false; // So error suppress works again\n if (strpos($errstr, 'Allowed memory') !== false) {\n global $REQUIRED_CODE;\n if (!array_key_exists('failure', $REQUIRED_CODE)) {\n $php_error_label = $errstr . ' in ' . $errfile . ' on line ' . strval($errline) . ' @ ' . get_self_url_easy(true); // We really want to know the URL where this is happening (normal PHP error logging does not include it)!\n if ((function_exists('syslog')) && (GOOGLE_APPENGINE)) {\n syslog($syslog_type, $php_error_label);\n }\n if (php_function_allowed('error_log')) {\n @error_log('PHP ' . ucwords($type) . ': ' . $php_error_label, 0);\n }\n critical_error('EMERGENCY', $errstr . escape_html(' [' . $errfile . ' at ' . strval($errline) . ']'));\n }\n }\n require_code('failure');\n _composr_error_handler($type, $errno, $errstr, $errfile, $errline, $syslog_type);\n }\n\n return false;\n}", "public function errorInfo();", "public function errorInfo();", "public function fatal_handler()\n {\n $error = error_get_last();\n\n if ($error !== null && is_array($error) && $error['type'] == E_ERROR)\n {\n $settings = require CODE_ROOT . '/src/settings.php';\n $app = new \\Slim\\App($settings);\n\n require CODE_ROOT . '/src/dependencies.php';\n\n $view = $app->getContainer()->get('view');\n\n $logger = $app->getContainer()->get('logger');\n $logger->emergency('An unrecoverable error has ocurred!', $error);\n\n echo $view->fetch('error.twig');\n }\n\n exit;\n }", "public function getError();", "public function getError();", "public function getError();", "function my_error_handler ($e_number, $e_message, $e_file, $e_line, $e_vars) {\n\n // Build the error message:\n $message = \"Error $e_number occurred in script '$e_file' on line $e_line:\n $e_message\\n\";\n\n // Append $e_vars to $message:\n $message .= print_r ($e_vars, 1);\n\n if (!LIVE) { // Development (print the error).\n echo '<pre>' . $message . \"\\n\";\n debug_print_backtrace();\n echo '</pre><br />';\n } else { // Don't show the error.\n echo '<div style=\"color:red;\">A system error occurred.\n We apologize for the inconvenience.</div><br />';\n }\n\n}", "public static function customErrorMsg()\n {\n echo \"\\n<p>An error occured, The error has been reported.</p>\";\n exit();\n }", "abstract public function getErrorType(): string;", "function _error_log( $data ) {\n\t\tIMFORZA_Utils::error_log( $data );\n\t}", "protected function error($msg) {\n \t parent::error($msg); //log in error msg\n throw new Exception ($msg); // <-- TESTS php4\n }", "function handleError()\n{\n\tglobal $g_error_msg, $g_debug_msg;\n\tinclude_once(atkconfig('atkroot'). 'atk/errors/class.atkerrorhandlerbase.inc');\n\t$errorHandlers = atkconfig('error_handlers', array('mail'=>array('mailto' => atkconfig('mailreport'))));\n\tforeach ($errorHandlers as $key => $value)\n\t{\n\t\tif (is_numeric($key))\n\t\t$key = $value;\n\t\t$errorHandlerObject = atkErrorHandlerBase::get($key, $value);\n\t\t$errorHandlerObject->handle($g_error_msg, $g_debug_msg);\n\t}\n}", "protected function registerErrorHandling()\n {\n error_reporting(E_ALL);\n set_error_handler(function ($level, $message, $file = '', $line = 0) {\n if (error_reporting() & $level) {\n throw new \\ErrorException($message, 403, $level, $file, $line);\n }\n });\n\n set_exception_handler(function ($e) {\n echo($e);\n });\n\n register_shutdown_function(function () {\n echo(error_get_last());\n });\n }", "function pushError( $error );", "public static function show_errors(){\n\t\t\tself::$SHOWING_ERRORS=true;\n\t\t\tset_error_handler(array('Errors','handle_errors'),E_ALL | E_STRICT);\n\t\t\tset_exception_handler(array('Errors','handle_exceptions'));\n\t\t}", "public function showError();", "public function resetErrors() {}", "function getErrors() {\n \techo errorHandler();\n }", "function my_error_handler($e_number, $e_message, $e_file, $e_line, $e_vars) {\r\n // Build the error message:\r\n $message = \"An error occurred in script '$e_file' on line $e_line: $e_message\\n\";\r\n // Append $e_vars to $message:\r\n $message .= print_r ($e_vars, 1);\r\n if (!LIVE) { // Development (print the error).\r\n echo '<pre>' . $message . \"\\n\";\r\n debug_print_backtrace();\r\n echo '</pre><br>';\r\n } else { // Don't show the error.\r\n echo '<div class=\"error\">A system error occurred. We apologize for the inconvenience.</div><br>';\r\n }\r\n}", "public function throwFatalError( $the_error='' );", "function fatal_error_handler() {\n $last_error = error_get_last();\n $this->logger->error($last_error);\n if ($last_error['type'] === E_ERROR) {\n header('Location: '.$this->fallback);\n exit;\n }\n }", "public static function errorHandler($errno, $errstr, $errfile, $errline) {\n\t\t\n\t\t//prevent that the shutdown function will log this error again.\n\t\tif(self::$_lastReportedError == $errno.$errfile.$errline)\n\t\t\treturn;\n\t\t\n\t\tself::$_lastReportedError = $errno.$errfile.$errline;\n\t\t\n\t\t//log only errors that are in error_reporting\n\t\t$error_reporting = (bool) ini_get('error_reporting');\n\t\tif (!($error_reporting & $errno)) return;\n\t\t\n\t\t$type=\"Unknown error\";\n\n\t\tswitch ($errno) {\n\t\t\tcase E_ERROR:\n\t\t\tcase E_USER_ERROR:\n\t\t\t\t\t$type='Fatal error';\n\t\t\t\t\tbreak;\n\n\t\t\tcase E_WARNING:\n\t\t\tcase E_USER_WARNING:\n\t\t\t\t\t$type = 'Warning';\n\t\t\t\t\tbreak;\n\n\t\t\tcase E_NOTICE:\n\t\t\tcase E_USER_NOTICE:\n\t\t\t\t\t$type='Notice';\n\t\t\t\t\tbreak;\n\t\t}\t\t\n\t\t\n\t\t$errorMsg=\"[\".@date(\"Ymd H:i:s\").\"] PHP $type: $errstr in $errfile on line $errline\";\n\t\t\n\t\t$user = isset(\\GO::session()->values['username']) ? \\GO::session()->values['username'] : 'notloggedin';\n\t\t$agent = isset($_SERVER['HTTP_USER_AGENT']) ? $_SERVER['HTTP_USER_AGENT'] : 'unknown';\n\t\t$ip = isset($_SERVER['REMOTE_ADDR']) ? $_SERVER['REMOTE_ADDR'] : 'unknown';\n\t\t\n\t\t$errorMsg .= \"\\nUser: \".$user.\" Agent: \".$agent.\" IP: \".$ip.\"\\n\";\n\t\t\n\t\tif(isset($_SERVER['QUERY_STRING']))\n\t\t\t$errorMsg .= \"Query: \".$_SERVER['QUERY_STRING'].\"\\n\";\n\t\t\t\n\t\t\n\t\t$backtrace = debug_backtrace();\n\t\tarray_shift($backtrace); //first item is this function which we don't have to see\n\t\t\n\t\t$errorMsg .= \"Backtrace:\\n\";\n\t\tforeach($backtrace as $o){\n\t\t\t\n\t\t\tif(!isset($o['class']))\n\t\t\t\t$o['class']='global';\n\t\t\t\n\t\t\tif(!isset($o['function']))\n\t\t\t\t$o['function']='global';\n\t\t\t\n\t\t\tif(!isset($o['file']))\n\t\t\t\t$o['file']='unknown';\n\t\t\t\n\t\t\tif(!isset($o['line']))\n\t\t\t\t$o['line']='unknown';\n\t\t\t\n\t\t\t$errorMsg .= $o['class'].'::'.$o['function'].' in file '.$o['file'].' on line '.$o['line'].\"\\n\";\t\t\t\n\t\t}\n\t\t$errorMsg .= \"----------------\";\n\t\t\n\t\t\\GO::debug($errorMsg);\n//\t\t\\GO::logError($errorMsg);\t\n\t\t\n\t\tforeach(self::$_errorLogCallbacks as $callback){\n\t\t\tcall_user_func($callback, $errorMsg);\n\t\t}\n\t\t\n\t\tif(\\GO::config()->debug){\n\t\t\tif(error_reporting() !== 0) { // This will not print suppressed (@) error messages\n\t\t\t\techo nl2br($errorMsg);\n\t\t\t}\n\t\t}\n\t\t\n\t\t/* Execute PHP internal error handler too */\n\t\treturn false;\n\t}", "function raiseError ($message)\r\n{\r\n\ttrigger_error ($message, E_USER_ERROR);\r\n}", "public function isError() {}", "function userErrorHandler($errno, $errmsg, $location, $linenum, $vars) {\n\n /**\n * Define an assoc array of error strings.\n * In reality the only entries we should consider are E_WARNING, E_NOTICE, E_USER_ERROR,\n * E_USER_WARNING and E_USER_NOTICE\n */\n\t$errortype = array (\n E_WARNING => \"Warning\",\n E_NOTICE => \"Notice\",\n E_USER_ERROR => \"User Error\",\n E_USER_WARNING => \"User Warning\",\n E_USER_NOTICE => \"User Notice\",\n );\n\n\t/**\n\t * save to the log\n\t */\n\tif ($errno < 5) {\n\t\tCommon_Functions::addToLog(1, $errortype[$errno].\": \".$errmsg.\" in \".$location.\" at line #\".$linenum, 'PHP Error');\n\t}\n}", "public function jobFatalErrorHandler() \n {\n $last_error = error_get_last();\n if(!empty($last_error)) {\n if($last_error['type'] === E_ERROR) {\n $this->streamLog(\"*** FATAL ERROR ***\");\n $this->jobErrorHandler($last_error['type'], $last_error['message'], $last_error['file'], $last_error['line']);\n }\n } else {\n $this->streamLog(\"*** GRACEFUL SHUTDOWN ***\"); \n }\n }", "function reset_errors()\n {\n }", "private function _error() {\n\t\trequire $this->_controllerPath . $this->_errorFile;\n\t\t$this->_controller = new Error();\n\t\t$this->_controller->index('Esta página no existe');\n\t\texit;\n\t}", "function flu_error($msg, $code, $back_offset = 1)\n{\n list($file, $line) = flu_error_orgin(1 + $back_offset);\n trigger_error(\"$msg in $file on line $line\", $code);\n}", "public function IsErrorDispatched ();", "function my_error_handler($e_number, $e_message, $e_file, $e_line, $e_vars) {\n\n // Build the error message:\n $message = \"An error occurred in script '$e_file' on line $e_line: $e_message\\n\";\n\n // Append $e_vars to $message:\n $message .= print_r ($e_vars, 1);\n\n if (!LIVE) { // Development (print the error).\n echo '<pre>' . $message . \"\\n\";\n debug_print_backtrace();\n echo '</pre><br>';\n } else { // Don't show the error.\n echo '<div class=\"error\">A system error occurred. We apologize for the\n inconvenience.</div><br>';\n }\n\n }", "public function registerErrorHandler() {\n set_error_handler(array($this, 'handleError'));\n error_reporting(E_ALL);\n }", "function atkerror($txt)\n{\n\tglobal $g_error_msg;\n\t$g_error_msg[]=\"[\".elapsed().\"] \".$txt;\n\n\tatkdebug($txt, DEBUG_ERROR);\n\n\tif (function_exists('debug_backtrace'))\n\tatkdebug(\"Trace:\".atk_get_trace(), DEBUG_ERROR);\n\n\tif (atkconfig('throw_exception_on_error'))\n\t{\n\t\tthrow new Exception($txt);\n\t}\n}", "public function actionError() {\n if ($error = Yii::app()->errorHandler->error) {\n\t\t\t$this->sendRestResponse(500,array(\n\t\t\t\t'status' => false,\n\t\t\t\t'message' => $error['message'],\n\t\t\t\t'data' => $error,\n\t\t\t));\t\t\t\n }\n\t}", "public function error()\n\t{\n\t\treturn [];\n\t}" ]
[ "0.72389615", "0.697917", "0.6945706", "0.6920562", "0.6827704", "0.6798589", "0.6752749", "0.67365456", "0.6718777", "0.66797435", "0.6606557", "0.65963495", "0.65963495", "0.65596914", "0.655865", "0.65540147", "0.6547442", "0.6542945", "0.6480185", "0.6480185", "0.64788574", "0.6412268", "0.6387525", "0.6357996", "0.63488334", "0.6346161", "0.6331922", "0.63266087", "0.62955284", "0.6295391", "0.62828636", "0.6280498", "0.62732494", "0.62668496", "0.62613106", "0.6252016", "0.6251281", "0.6251281", "0.62406373", "0.62288874", "0.6203416", "0.6202235", "0.6191463", "0.6184819", "0.6184819", "0.61711055", "0.61425", "0.6139384", "0.61240804", "0.6120331", "0.61202025", "0.61167026", "0.6104568", "0.6103208", "0.60939395", "0.6087533", "0.6085321", "0.6074731", "0.6072369", "0.60694295", "0.6068388", "0.6066357", "0.6066223", "0.60654485", "0.6062552", "0.60578465", "0.6051119", "0.6051119", "0.60449827", "0.6036304", "0.6036304", "0.6036304", "0.60137343", "0.60101736", "0.60045904", "0.60013825", "0.5997722", "0.599652", "0.59870195", "0.5975835", "0.59709525", "0.5967631", "0.5963301", "0.59586847", "0.5948952", "0.59473866", "0.59449047", "0.59388345", "0.5928312", "0.5926149", "0.59235364", "0.59224164", "0.59166604", "0.5914257", "0.5912246", "0.5909458", "0.590594", "0.58978176", "0.5891665", "0.58888096", "0.5888571" ]
0.0
-1
Exceptional occurrences that are not errors. Example: Use of deprecated APIs, poor use of an API, undesirable things that are not necessarily wrong.
public function warning($message, array $context = []) { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function violations(): array;", "abstract public function GetProblems();", "public function beginsWithReturnsInvalidArgumentDataProvider() {}", "public function testCreateUnsuccessfulReason()\n {\n }", "public function errorOccured();", "public function testSilencedError() {\n $this->expectDeprecation('This is the deprecation message for deprecation_test_function().');\n $this->assertEquals('known_return_value', deprecation_test_function());\n }", "public function formatNotFoundError();", "public function testRule(): void\n\t{\n\t\t$this->analyse([__DIR__ . '/../src/disallowed/functionCalls.php'], [\n\t\t\t[\n\t\t\t\t// expect this error message:\n\t\t\t\t'Calling var_dump() is forbidden, use logger instead',\n\t\t\t\t// on this line:\n\t\t\t\t7,\n\t\t\t\t'See docs',\n\t\t\t],\n\t\t\t[\n\t\t\t\t'Calling print_R() is forbidden, nope [print_R() matches print_r()]',\n\t\t\t\t8,\n\t\t\t],\n\t\t\t[\n\t\t\t\t'Calling printf() is forbidden, because reasons',\n\t\t\t\t9,\n\t\t\t],\n\t\t\t[\n\t\t\t\t'Calling Foo\\Bar\\waldo() is forbidden, whoa, a namespace',\n\t\t\t\t10,\n\t\t\t],\n\t\t\t[\n\t\t\t\t'Calling Foo\\Bar\\waldo() (as waldo()) is forbidden, whoa, a namespace',\n\t\t\t\t11,\n\t\t\t],\n\t\t\t[\n\t\t\t\t'Calling shell_exec() is forbidden, because reasons [shell_exec() matches shell_*()]',\n\t\t\t\t12,\n\t\t\t],\n\t\t\t[\n\t\t\t\t'Calling exec() is forbidden, because reasons [exec() matches exe*()]',\n\t\t\t\t13,\n\t\t\t],\n\t\t\t[\n\t\t\t\t'Calling print_r() is forbidden, nope',\n\t\t\t\t25,\n\t\t\t],\n\t\t\t[\n\t\t\t\t'Calling hash() is forbidden, MD4 very bad',\n\t\t\t\t49,\n\t\t\t],\n\t\t\t[\n\t\t\t\t'Calling hash() is forbidden, MD5 bad',\n\t\t\t\t50,\n\t\t\t],\n\t\t\t[\n\t\t\t\t'Calling hash() is forbidden, MD5 bad',\n\t\t\t\t51,\n\t\t\t],\n\t\t\t[\n\t\t\t\t'Calling hash() is forbidden, SHA-1 bad soon™',\n\t\t\t\t52,\n\t\t\t],\n\t\t\t[\n\t\t\t\t'Calling hash() is forbidden, SHA-1 bad SOON™',\n\t\t\t\t53,\n\t\t\t],\n\t\t\t[\n\t\t\t\t'Calling setcookie() is forbidden, because reasons',\n\t\t\t\t59,\n\t\t\t],\n\t\t\t[\n\t\t\t\t'Calling header() is forbidden, because reasons',\n\t\t\t\t64,\n\t\t\t],\n\t\t\t[\n\t\t\t\t'Calling htmlspecialchars() is forbidden, because reasons',\n\t\t\t\t69,\n\t\t\t],\n\t\t\t[\n\t\t\t\t'Calling htmlspecialchars() is forbidden, because reasons',\n\t\t\t\t70,\n\t\t\t],\n\t\t\t[\n\t\t\t\t'Calling htmlspecialchars() is forbidden, because reasons',\n\t\t\t\t71,\n\t\t\t],\n\t\t\t[\n\t\t\t\t'Calling htmlspecialchars() is forbidden, because reasons',\n\t\t\t\t72,\n\t\t\t],\n\t\t\t[\n\t\t\t\t'Calling htmlspecialchars() is forbidden, because reasons',\n\t\t\t\t73,\n\t\t\t],\n\t\t\t[\n\t\t\t\t'Calling array_filter() is forbidden, callback parameter must be given.',\n\t\t\t\t76,\n\t\t\t],\n\t\t\t[\n\t\t\t\t'Calling Foo\\Bar\\Waldo\\mocky() is forbidden, mocking Blade is not allowed.',\n\t\t\t\t83,\n\t\t\t],\n\t\t\t[\n\t\t\t\t'Calling Foo\\Bar\\Waldo\\config() is forbidden, because reasons',\n\t\t\t\t91,\n\t\t\t],\n\t\t]);\n\t\t// Based on the configuration above, no errors in this file:\n\t\t$this->analyse([__DIR__ . '/../src/disallowed-allow/functionCalls.php'], [\n\t\t\t[\n\t\t\t\t'Calling Foo\\Bar\\waldo() (as waldo()) is forbidden, whoa, a namespace',\n\t\t\t\t11,\n\t\t\t],\n\t\t\t[\n\t\t\t\t'Calling setcookie() is forbidden, because reasons',\n\t\t\t\t59,\n\t\t\t],\n\t\t\t[\n\t\t\t\t'Calling setcookie() is forbidden, because reasons',\n\t\t\t\t60,\n\t\t\t],\n\t\t\t[\n\t\t\t\t'Calling header() is forbidden, because reasons',\n\t\t\t\t64,\n\t\t\t],\n\t\t\t[\n\t\t\t\t'Calling header() is forbidden, because reasons',\n\t\t\t\t65,\n\t\t\t],\n\t\t\t[\n\t\t\t\t'Calling htmlspecialchars() is forbidden, because reasons',\n\t\t\t\t69,\n\t\t\t],\n\t\t\t[\n\t\t\t\t'Calling htmlspecialchars() is forbidden, because reasons',\n\t\t\t\t70,\n\t\t\t],\n\t\t]);\n\t}", "public function testUpdateUnsuccessfulReason()\n {\n }", "protected function validateOrThrow() {}", "public static function reasons()\n {\n return [\n 'VIOLENCE' => static::VIOLENCE,\n 'CHILD_ABUSE' => static::CHILD_ABUSE,\n 'PROMOTES_TERRORISM' => static::PROMOTES_TERRORISM,\n 'COPYRIGHT' => static::COPYRIGHT,\n ];\n }", "private function getBadWordViolations( AddDonationRequest $request ): void {\n\t\tif ( $request->donorIsAnonymous() ) {\n\t\t\treturn;\n\t\t}\n\n\t\t$this->getPolicyViolationsForField( $request->getDonorFirstName(), Result::SOURCE_DONOR_FIRST_NAME );\n\t\t$this->getPolicyViolationsForField( $request->getDonorLastName(), Result::SOURCE_DONOR_LAST_NAME );\n\t\t$this->getPolicyViolationsForField( $request->getDonorCompany(), Result::SOURCE_DONOR_COMPANY );\n\t\t$this->getPolicyViolationsForField(\n\t\t\t$request->getDonorStreetAddress(),\n\t\t\tResult::SOURCE_DONOR_STREET_ADDRESS\n\t\t);\n\t\t$this->getPolicyViolationsForField( $request->getDonorCity(), Result::SOURCE_DONOR_CITY );\n\t}", "public function testRetrieveUnsuccessfulReason()\n {\n }", "public function providerUnretriableCodes() {\n return array(\n array(Response::STATUS_CODE_400),\n array(Response::STATUS_CODE_500)\n );\n }", "public function testScanCatchesBadResponseExceptions()\n {\n $mock = new \\Guzzle\\Plugin\\Mock\\MockPlugin();\n $mock->addResponse(new \\Guzzle\\Http\\Message\\Response(403));\n $this->client->addSubscriber($mock);\n\n $this->setExpectedException(\"\\Metagist\\Api\\Exception\");\n $this->client->scan('test', 'test');\n }", "public function getPageAccessFailureReasons() {}", "public function hasWarnings() {}", "public function getWarnings(): array;", "public function getWarnings() : array;", "public static function warning()\n {\n static::returnCode(static::CODE_WARNING);\n }", "public function badFilter(): void\n {\n throw new RuntimeException('nope');\n }", "function checkWarnings(){ \n $this->warnings = array();\n if ($this->feedwater->massFlow>0){\n if ($this->outletSteam->phase<>'Gas' and $this->outletSteam->quality<>1){\n $this->warnings[] = \"Outlet Steam Contains Condensate\";\n }\n if ($this->fuelEnergy<0){\n $this->warnings[] = \"Boiler Using Negative Energy\";\n }\n }\n if ($this->feedwater->massFlow<0){\n $this->warnings[] = \"Steam Flow Negative\";\n }\n return count($this->warnings);\n }", "private function checkError() : void\n {\n $this->isNotPost();\n $this->notExist();\n $this->notAdmin();\n }", "public function formatNotFoundError()\n {\n return 'Given resource could not be found.';\n }", "public function formatForbiddenError();", "public function getErrorList()\n {\n return [\n 8 => 1,\n 13 => 1,\n ];\n }", "public function getExhaustionExplanation ();", "protected function getWarningWhenMethodUnavailable() {}", "public function invalidRequests()\n {\n return [\n [\n HttpRequestMethod::GET,\n 'https://postman-echo.com/status/404',\n '',\n [],\n HttpClientErrorException::class\n ],\n [\n HttpRequestMethod::GET,\n 'https://postman-echo.com/status/500',\n '',\n [],\n HttpServerErrorException::class\n ],\n ];\n }", "function bibdk_voxb_offensive_error() {\n return array(\n '#markup' => t('bibdk_voxb_no_access', array(), array('context'=>'bibdk_voxb')),\n );\n}", "public function getErrorLines()\n {\n return array('Something went wrong... ಠ_ಠ');\n }", "function broken() { }", "function getErrorReason() {\n\t\treturn __( \"The Strict Transport Security header isn't enforced. Visitors and bots can access your site without https.\", \"defender-security\" );\n\t}", "public function testWarningMessage()\n {\n $this->throwWarningException();\n\n // test if code actually gets here\n $this->assertTrue(true);\n }", "abstract protected function getNotFoundMessage();", "#[@test, @expect('lang.IllegalArgumentException')]\n public function catchExpectedWithWarning() {\n $a.= '';\n throw new IllegalArgumentException('');\n }", "public function provideInvalidConfig()\n {\n return array(\n array('\\GSOcr\\Exception\\RuntimeException', array()),\n array('\\GSOcr\\Exception\\RuntimeException', array('ocr' => array())),\n array('\\GSOcr\\Exception\\RuntimeException', array('ocr' => array('service' => 'test'))),\n );\n }", "public function getErrorList()\n {\n return [\n 13 => 1,\n 33 => 1,\n 83 => 1,\n 88 => 1,\n 92 => 1,\n ];\n\n }", "public function warning(string $text);", "private function generateExceptionMessages () {\n $this->genericExceptionMessages[\"entityTypePropertyCombo\"] =\n \"Updating a \" . $this->entityType. \"'s $this->entityProperty is \" .\n \"not currently supported through the API, for details of \" .\n \"the currently supported methods see: $this->docsURL\";\n $this->genericExceptionMessages[\"entityTypePropertyMethod\"] =\n \"\\\"\" . $this->requestMethod . \"\\\" is not currently a supported \" .\n \"request method for altering\" . $this->entityType. \"'s \" .\n $this->entityProperty . \" . For more details see: $this->docsURL\";\n }", "public function get_error_codes()\n {\n }", "public function testErrorMessageBadFormat()\n {\n $errorResponse = json_decode('{\n \"error\": {\n \"code\": \"UNPROCESSABLE_ENTITY\",\n \"message\": {\n \"errors\": [\n \"Bad format\",\n \"Bad format 2\"\n ],\n \"bad_data\": [\n {\n \"first_message\": \"Bad format 3\",\n \"second_message\": \"Bad format 4\",\n \"thrid_message\": \"Bad format 5\"\n }\n ]\n },\n \"errors\": []\n }\n }', true);\n\n\n try {\n Requestor::handleApiError(null, 404, $errorResponse);\n } catch (EasyPostException $error) {\n $this->assertEquals(\n 'Bad format, Bad format 2, Bad format 3, Bad format 4, Bad format 5',\n $error->getMessage()\n );\n }\n }", "public function warning($message) {}", "abstract protected function _unimplemented() : Exception;", "abstract protected function _unimplemented() : Exception;", "abstract protected function _unimplemented() : Exception;", "public function testGetInvalidStrainReviewByStrainReviewTxt() {\n\t\t// grab a strain review by searching for content that does not exist\n\t\t$strainReview = StrainReview::getStrainReviewByStrainReviewTxt($this->getPDO(), \"Dee Dee Dee, No Such Thing\");\n\t\t$this->assertCount(0, $strainReview);\n\t}", "public function testRule(): void\n\t{\n\t\t$this->analyse([__DIR__ . '/../src/disallowed/superglobalUsages.php'], [\n\t\t\t[\n\t\t\t\t// expect this error message:\n\t\t\t\t'Using $GLOBALS is forbidden, the cake is a lie',\n\t\t\t\t// on this line:\n\t\t\t\t8,\n\t\t\t\t'So long and thanks for all the tips',\n\t\t\t],\n\t\t\t[\n\t\t\t\t'Using $_GET is forbidden, the cake is a lie',\n\t\t\t\t9,\n\t\t\t],\n\t\t\t[\n\t\t\t\t'Using $_GET is forbidden, the cake is a lie',\n\t\t\t\t12,\n\t\t\t],\n\t\t\t[\n\t\t\t\t'Using $_POST is forbidden, the cake is a lie',\n\t\t\t\t13,\n\t\t\t],\n\t\t\t[\n\t\t\t\t'Using $_REQUEST is forbidden, so $_GET or $_POST?',\n\t\t\t\t26,\n\t\t\t],\n\t\t]);\n\t\t$this->analyse([__DIR__ . '/../src/disallowed-allow/superglobalUsages.php'], []);\n\t}", "public function testRetrieveListUnsuccessfulReason()\n {\n }", "protected static function throwHardCheckError()\n {\n throw new \\InvalidArgumentException('Value has wrong type');\n }", "public function test_IndexError(){\n\t\t$this->validateTestException(\n\t\t\t$this->fullURL,\n\t\t\t'GET',\n\t\t\t$this->data,\n\t\t\t'NotImplementedException',\n\t\t\t'index'\n\t\t);\n\t}", "public function getFailureReason();", "public function getExceptions();", "public function errorInfo() {}", "public function testFinderRangeLifeErrors() {\n $this->setExpectedException('BadFunctionCallException');\n $this->Links->find('rangeLife');\n }", "function getErrorReason() {\n\t\treturn __( \"You have a user account with the admin username.\", \"defender-security\" );\n\t}", "function bad_request() {\n\treturn show_template('400');\n}", "public function getReason();", "public function getReason();", "abstract public function getErrorType(): string;", "public function testRequestValidationFails()\n {\n $this->gearman->expects($this->never())\n ->method('doBackground');\n $this->apiMock->expects($this->once())\n ->method('validateRequest')\n ->will($this->throwException(new \\Metagist\\Api\\Exception('test')));\n $this->app['monolog']->expects($this->once())\n ->method('error');\n \n $response = $this->controller->scan('test', 'test');\n $this->assertEquals(403, $response->getStatusCode());\n }", "function testInvalidGet() {\n $this->get('/something/def');\n $this->assertEqual(api_response::getInstance()->getCode(), 404);\n $this->assertText('/error/code', '100');\n $this->assertText('/error/msg', 'Bucket not defined: something');\n }", "public function testExceptions()\n {\n $Location = new Location(self::$databaseName, self::$collection);\n $output = json_decode($Location->getAllCities('_id'));\n $this->assertEquals($output->error, \"true\");\n\n $output = json_decode($Location->getAllCities('india', true));\n $this->assertEquals($output->error, \"true\");\n\n $output = json_decode($Location->getAllCountries(true));\n $this->assertEquals($output->error, \"true\");\n }", "protected function setWarningsExist() {}", "public function testImageSearchExceptionAdultOkInvalid()\n {\n try {\n $this->_yahoo->imageSearch('php', ['adult_ok' => -1]);\n $this->fail('Expected Zend_Service_Exception not thrown');\n } catch (Zend_Service_Exception $e) {\n $this->assertStringContainsString('error occurred sending request', $e->getMessage());\n }\n }", "public function testWebSearchExceptionSimilarOkInvalid()\n {\n try {\n $this->_yahoo->webSearch('php', ['similar_ok' => 'oops']);\n $this->fail('Expected Zend_Service_Exception not thrown');\n } catch (Zend_Service_Exception $e) {\n $this->assertStringContainsString('error occurred sending request', $e->getMessage());\n }\n }", "public function testWebSearchExceptionAdultOkInvalid()\n {\n try {\n $this->_yahoo->webSearch('php', ['adult_ok' => 'oops']);\n $this->fail('Expected Zend_Service_Exception not thrown');\n } catch (Zend_Service_Exception $e) {\n $this->assertStringContainsString('error occurred sending request', $e->getMessage());\n }\n }", "public function getUnknownFunctionLines()\n {\n return array(\"Function not found\");\n }", "public function fails();", "public function fails();", "public function testMagicCallUnknown()\n {\n $this->expectException(Error::class);\n\n $this->uut->foo();\n }", "protected function illegal_data_error() {\r\n\t\treturn new Status(tr('Illegal Command Data for Command %cmd%', 'core', array('%cmd%' => get_class($this))));\r\n\t}", "public function deviceConditionDoesNotMatchRobot() {}", "public function deviceConditionDoesNotMatchRobot() {}", "public function passingInvalidMarkersThrowsExceptionDataProvider() {}", "function errorMessageIllegal( $page, $crewid, $expected, $actual ) {\n\techo \"<div class='body'>\";\n\t\techo \"<span class='fontTitle'>Warning!</span><br /><br />\";\n\t\techo \"You have attempted an illegal operation!\";\n\techo \"</div>\";\n}", "public function testException() {\r\n\t\t$phpcheckstyle = $GLOBALS['PHPCheckstyle'];\r\n\r\n\t\t$phpcheckstyle->processFiles(array(\r\n\t\t\t'./test/sample/unterminated_comment.php'\r\n\t\t));\r\n\r\n\t\t$errorCounts = $phpcheckstyle->getErrorCounts();\r\n\r\n\t\t$this->assertEquals(1, $errorCounts['error'], 'We expect 1 error');\r\n\t\t$this->assertEquals(0, $errorCounts['ignore'], 'We expect 0 ignored checks');\r\n\t\t$this->assertEquals(0, $errorCounts['info'], 'We expect 0 info');\r\n\t\t$this->assertEquals(0, $errorCounts['warning'], 'We expect 0 warnings');\r\n\t}", "public function errorInfo();", "public function errorInfo();", "public function getXsiTypeName() {\n return \"InternalApiError.Reason\";\n }", "public function testRollbarLoggerInternalCheckIgnored(): void\n {\n $errorReporting = \\error_reporting();\n \\error_reporting(0);\n\n Rollbar::init([\n 'access_token' => $this->getTestAccessToken(),\n 'environment' => 'testing-php',\n 'verbose_logger' => $this->verboseLogger,\n ]);\n Rollbar::log(LogLevel::INFO, \"Testing PHP Notifier\");\n $this->assertVerboseLogContains('Occurrence ignored', LogLevel::INFO);\n\n \\error_reporting($errorReporting);\n }", "function myErrorHandler($errno, $errstr, $errfile, $errline)\n{\n if (strpos($errstr, 'deprecated') !== false) {\n return true;\n }\n\n return false;\n}", "public function getXsiTypeName() {\n return \"InternalApiError\";\n }", "public function unknownSchemeThrowsExceptionProvider()\n {\n return [\n ['foo://bar'],\n ['ssh://bar'],\n ];\n }", "private function guardAgainstExternalErrors($response)\n {\n if ($response->getStatusCode() == 503) {\n throw new \\Exception('Could not connect to googleapis.com/maps/api. STATUSCODE = '.$response->getStatusCode());\n }\n }", "private function errorMessages()\n {\n return [\n 'name.unique' => 'A category with the same name exists',\n ];\n }", "public function testDoesNotAllowIsDeprecatedWithoutDeprecationReasonOnEnum()\n {\n /** @noinspection PhpUnhandledExceptionInspection */\n $enumType = newEnumType([\n 'name' => 'SomeEnum',\n 'values' => ['FOO' => ['isDeprecated' => true]],\n ]);\n\n $this->expectException(InvariantException::class);\n $this->expectExceptionMessage(\n 'SomeEnum.FOO should provide \"deprecationReason\" instead of \"isDeprecated\".'\n );\n\n /** @noinspection PhpUnhandledExceptionInspection */\n $enumType->getValues();\n\n $this->addToAssertionCount(1);\n }", "public function generateFailed();", "function calendar_warning_handler(\n $errno,\n $errstr,\n $errfile,\n $errline,\n $errContext = null\n ) {\n //throw new \\Exception('Class not found.');\n //trigger_error(\"Fatal error\", E_USER_ERROR);\n $this->thing->log($errno);\n $this->thing->log($errstr);\n\n $console =\n \"Calendar warning seen. \" .\n $errline .\n \" \" .\n $errfile .\n \" \" .\n $errno .\n \" \" .\n $errstr .\n \". \";\n\n // Attempt to extract a useful reference to the problematic calendar.\n $calendar_name = \"X\";\n if (isset($this->ical->cal[\"VCALENDAR\"][\"X-WR-CALNAME\"])) {\n $calendar_name = $this->ical->cal[\"VCALENDAR\"][\"X-WR-CALNAME\"];\n }\n\n if (isset($errContext->filename)) {\n $calendar_name = $errContext->filename;\n }\n\n // Some big problem reading the calendar endpoint.\n if ($errno == 2) {\n throw new \\Exception(\"Could not read calendar.\");\n }\n\n if ($errno == 8) {\n // Flag that not all events have a unique id.\n // Might be useful later.\n $this->calendar_unique_events = true;\n return;\n }\n\n if ($this->stack_engine_state != \"prod\") {\n $this->thing->console($console . \"\\n\");\n $this->response .=\n \"Unexpected calendar warning seen. \" . $errstr . \". \";\n }\n // do something\n }", "public function getWarningList()\n {\n return [];\n }", "public function getWarningList()\n {\n return [];\n }", "public function getWarningList()\n {\n return [];\n }", "public function getWarningList()\n {\n return [];\n }", "public function getWarningList()\n {\n return [];\n }", "function getErrorReason() {\n\t\t$days = $this->getService()->getDuration();\n\n\t\treturn sprintf( __( \"Your current login duration is the default %d days.\", \"defender-security\" ), $days );\n\t}", "function dummyErrorFunc() { }", "public function UnhandeldException(){\n\t\t$this -> message = \"An unhandeld exception was thrown. Please infrom...\";\n\t}", "public function bad()\n {\n return $this->speak(collect([\n 'ouch',\n 'bummer',\n 'yikes',\n 'hey',\n 'darn',\n 'zoinks',\n 'sorry',\n 'oof',\n 'eesh',\n 'doh',\n 'shucks',\n ]));\n }", "function uncaught_exception($o){\n $o['message'] = Trace::exceptionToText($o['exception']);\n $o['trace'] = Trace::exFullTrace($o['exception']);\n unexpected_failure($o);\n }", "public static function getWarnings($event) {\n $warnings = array(\n 'addMark' => array('WAverages'),\n 'addAbsence' => array('WAbsences'),\n );\n return isset($warnings[$event]) ? $warnings[$event] : array();\n }", "private function disableEStrict() {\n $was = error_reporting();\n error_reporting($was & ~E_STRICT);\n return $was;\n }" ]
[ "0.6196447", "0.58840084", "0.58558345", "0.58430076", "0.5788986", "0.57841563", "0.5776887", "0.5760474", "0.571464", "0.5711499", "0.570609", "0.570176", "0.5701429", "0.56994253", "0.56907547", "0.56518334", "0.5648493", "0.56407964", "0.5629111", "0.5623634", "0.5622014", "0.56198573", "0.5572664", "0.5561406", "0.5551035", "0.5550354", "0.55465436", "0.55334216", "0.5532226", "0.5531216", "0.5524182", "0.5500294", "0.5497681", "0.5496702", "0.5486567", "0.54835075", "0.5473224", "0.54730064", "0.5466459", "0.54594857", "0.5452519", "0.5446156", "0.5441092", "0.5434196", "0.5434196", "0.5434196", "0.54328316", "0.5429839", "0.54282796", "0.5424947", "0.5416729", "0.5415932", "0.5413856", "0.5391607", "0.5372078", "0.5371182", "0.53591436", "0.5353416", "0.5353416", "0.5338316", "0.53362703", "0.53357893", "0.5331418", "0.53240377", "0.5322572", "0.53171164", "0.5316599", "0.5313917", "0.53116286", "0.53116286", "0.5305753", "0.5303774", "0.5298018", "0.5297299", "0.529191", "0.5285443", "0.5278796", "0.52749705", "0.52749705", "0.52739555", "0.5271631", "0.527124", "0.52621484", "0.5261486", "0.5259604", "0.5256396", "0.52562004", "0.52553153", "0.5249368", "0.524664", "0.524664", "0.524664", "0.524664", "0.524664", "0.52450824", "0.5233447", "0.5229692", "0.52276874", "0.5224866", "0.52226955", "0.52212507" ]
0.0
-1
Normal but significant events.
public function notice($message, array $context = []) { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function shouldntRaiseAnEvent()\n {\n }", "public static function __events () {\n \n }", "public function clearEvents()\n {\n $this->recorded = [];\n }", "public function onEvent();", "public function testAntBackendStatEvent()\r\n\t{\r\n\t\t$calid = GetDefaultCalendar($this->dbh, $this->user->id);\r\n\r\n\t\t// Create a new calendar event for testing with default revision of 1\r\n\t\t$event = new CAntObject_CalendarEvent($this->dbh, null, $this->user);\r\n\t\t$event->setValue(\"name\", \"UnitTest Event\");\r\n\t\t$event->setValue(\"ts_start\", \"10/8/2011 2:30 PM\");\r\n\t\t$event->setValue(\"ts_end\", \"10/8/2011 3:30 PM\");\r\n\t\t$event->setValue(\"calendar\", $calid);\r\n\t\t$eid = $event->save();\r\n\r\n\t\t// Query events\r\n\t\t$stat = $this->backend->StatMessage(\"calendar_root\", $eid);\r\n\t\t$this->assertEquals($stat['mod'], 1);\r\n\r\n\t\t// Cleanup\r\n\t\t$event->removeHard();\r\n\t}", "public function clearRecordedEvents()\n {\n $this->events = [];\n }", "public function events_empty(){\n\n // Empty the internal events array\n $this->events = array();\n\n // Return the resulting array\n return $this->events;\n\n }", "public function resetCurrentEvent()\n {\n $this->currentEvent = 0;\n }", "public function onOutOfBand (): void;", "public function testAggregateEvents()\n {\n // TODO: implement\n $this->markTestIncomplete('Not implemented');\n }", "public function send_events()\n {\n }", "final public function onOutOfBand (): void {\n // do nothing\n }", "public function handles_events()\n\t{\n\t\treturn false;\n\t}", "public static function offAll()\n {\n self::$_events = [];\n self::$_eventWildcards = [];\n }", "function GetExcludedEvents();", "public function testEmittedEventName()\n {\n $expected = array(\n 'request.before_send' => 'onBeforeSend'\n );\n $this->assertEquals($expected, DaWandaPlugin::getSubscribedEvents());\n }", "protected function setEventName() {\n return NULL;\n }", "public function unsetEventTypes(): void\n {\n $this->eventTypes = [];\n }", "public function getOtherEvents();", "public function emitirSom()\n {\n }", "public function whenAddressed(): bool\n {\n return false;\n }", "abstract function HookEvents();", "protected function preHandle(Event $ev) { return; }", "final public function allowsEvents() {\n\t\treturn false;\n\t}", "public function reset() {\n $this->_events->reset();\n }", "abstract public function getEventName();", "public function attachAllHitStatObservers()\n\t{\n\t\t$event_log = new Stats_OLP_Observe_Eventlog();\n\t\t$event_log->observeHitStat($this);\n\t}", "function Submissions_Latex_Event()\n {\n $event=$this->Event();\n $event=$this->EventsObj()->ApplyAllEnums($event,TRUE);\n $event=$this->EventsObj()->TrimLatexItem($event);\n\n return $event;\n }", "function setEventType()\n {\n $this->_eventType = 12;\n }", "public function clearRecordedEvents()\n {\n $this->latestRecordedEvents = [];\n }", "public function reactToOnBeforeTakingDamage($event) { }", "abstract protected function inscriretruetrue($event, $membre);", "public static function event_method()\n {\n return true;\n }", "public function isObserved() {}", "function chronological($events) {\n\t\tforeach($events as $time => $timeEvents) {\n\t\t\tforeach($timeEvents as $key => $message) {\n\t\t\t\t$player = explode('## ', $message)[0];\n\t\t\t\t$msg = explode('## ', $message)[1];\n\t\t\t\t$t = timeFormat($time);\n\n\t\t\t\tif($msg === 'grabs flag 1') {\n\t\t\t\t\tforeach($timeEvents as $_key => $_message) {\n\t\t\t\t\t\t$_player = explode('## ', $_message)[0];\n\t\t\t\t\t\t$_msg = explode('## ', $_message)[1];\n\t\t\t\t\t\t$_t = timeFormat($_time);\n\n\t\t\t\t\t\tif($msg != $_msg) {\n\t\t\t\t\t\t\tif($_msg == 'drops flag 1') {\n\t\t\t\t\t\t\t\tunset($events[$time][$key]);\n\t\t\t\t\t\t\t\t$events[$time+1][0] = $player . '## grabs flag 1';\n\t\t\t\t\t\t\t\tcontinue;\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\tksort($events);\n\t\t// error_log(print_r($events, true));\n\n\t\treturn $events;\n\t}", "public function do_not_track()\n\t{\n\t\tstatic $shifted;\n\t\tif ($shifted !== TRUE)\n\t\t{\n\t\t\tarray_shift($this->tracker);\n\t\t\t$shifted = TRUE;\n\t\t}\n\t\t$this->set_tracker_cookie();\n\t}", "public function verifyLogsImpressionsEventsDispatched(): void\n {\n // 💡️ Create a new flag with an A/B Test eg \"product_version\"\n $featureFlagKey = 'product_version';\n $logger = new DefaultLogger(Logger::DEBUG);\n $localOptimizelyClient = new Optimizely(datafile: null, logger: $logger, sdkKey: SDK_KEY);\n $localUserContext = $localOptimizelyClient->createUserContext($this->userId);\n\n // review the DEBUG output, ensuring you see an impression log\n // \"Dispatching impression event to URL https://logx.optimizely.com/v1/events with params...\"\n $localUserContext->decide($featureFlagKey);\n }", "function block_eventsengine_handler($event) {\n global $DB;\n // Need an array to track events because another observed event could be triggered, ...\n // Indirectly by this event handler, delaying/unsequencing the event order.\n static $previousevents = [];\n $encodedevent = @json_encode($event->get_data());\n if (in_array($encodedevent, $previousevents)) {\n if (debugging('', DEBUG_DEVELOPER)) {\n block_eventsengine_log(\"block_eventsengine_handler({$event->eventname}):\".\n ' Aborting multiple trigger. (stored '.count($previousevents).')');\n }\n return true; // Prevent multiple plugins triggering same callback (this).\n }\n $previousevents[] = $encodedevent;\n $assigns = $DB->get_records('block_eventsengine_assign', ['event' => $event->eventname]);\n if (debugging('', DEBUG_DEVELOPER)) {\n ob_start();\n var_dump($previousevents);\n $tmp = ob_get_contents();\n ob_end_clean();\n block_eventsengine_log(\"block_eventsengine_handler({$event->eventname}): INFO: previousevents[] = {$tmp}\");\n }\n foreach ($assigns as $assign) {\n if ($assign->disabled) {\n continue;\n }\n $pluginengs = explode(':', $assign->engine, 2);\n $enginedisabled = $DB->get_field('block_eventsengine_events', 'disabled', ['engine' => $pluginengs[1],\n 'plugin' => $pluginengs[0]]);\n if (!empty($enginedisabled)) {\n continue;\n }\n $engine = block_eventsengine_get_engine_def($assign->engine, $event->eventname);\n if (empty($engine)) {\n continue;\n }\n $pluginacts = explode(':', $assign->action, 2);\n $actiondisabled = $DB->get_field('block_eventsengine_actions', 'disabled', ['action' => $pluginacts[1],\n 'plugin' => $pluginacts[0]]);\n if (!empty($actiondisabled)) {\n continue;\n }\n $actiondef = block_eventsengine_get_action_def($assign->action);\n if (empty($actiondef)) {\n continue;\n }\n try {\n $available = (empty($engine['available']) || $engine['available']()) && (empty($actiondef['available']) || $actiondef['available']());\n } catch (Exception $e) {\n $available = false;\n block_eventsengine_log(\"block_eventsengine_handler({$event->eventname}): assign id = {$assign->id}\".\n ' - Exception in available(): '.$e->getMessage());\n }\n if ($available) {\n try {\n $enginedata = !empty($assign->enginedata) ? (object)@unserialize($assign->enginedata) : null;\n if (($contextid = $engine['ready']($event, $enginedata))) {\n $actiondata = !empty($assign->actiondata) ? (object)@unserialize($assign->actiondata) : null;\n $actiondef['trigger']($contextid, $actiondata, $event);\n }\n } catch (Exception $e) {\n block_eventsengine_log(\"block_eventsengine_handler({$event->eventname}): assign id = {$assign->id} -\".\n ' Exception in engine::ready() or action::trigger(): '.$e->getMessage());\n }\n }\n }\n return true;\n}", "public static function events();", "public function testEventCallBackPatch()\n {\n }", "public function onTick() {\r\n\r\n }", "public function __invoke(array &$event)\n {\n if ( ! $this->threshold($event['level'])) {\n return;\n }\n\n $event['meta']['memory_peak_usage'] = $this->get_peak_usage();\n $event['meta']['memory_usage'] = $this->get_usage;\n $event['meta']['memory_limit'] = $this->get_limit();\n }", "function UnInstallEvents()\n\t{\n\t}", "public function getBase(): false|EventBase {}", "private function _log($msg)\n\t{\n\t\t$this->EE->TMPL->log_item(\"Low Events: {$msg}\");\n\t}", "public function truncateEventClosures(): void\n {\n $this->listeners = [];\n }", "function orbis_events_upgrade_100() {\n\tglobal $wpdb;\n\n\t// Dates\n\t$keys = array(\n\t\t'_pronamic_start_date' => '_pronamic_event_start_date',\n\t\t'_pronamic_end_date' => '_pronamic_event_end_date',\n\t);\n\n\tforeach ( $keys as $old_key => $new_key ) {\n\t\t$query = \"INSERT\n\t\t\tINTO\n\t\t\t\t$wpdb->postmeta ( post_id, meta_key, meta_value )\n\t\t\tSELECT\n\t\t\t\tpost.ID AS post_id,\n\t\t\t\t%s AS meta_key,\n\t\t\t\tFROM_UNIXTIME( MAX( IF( meta.meta_key = %s, meta.meta_value, NULL ) ) ) AS meta_value\n\t\t\tFROM\n\t\t\t\t$wpdb->posts AS post\n\t\t\t\t\tLEFT JOIN\n\t\t\t\t$wpdb->postmeta AS meta\n\t\t\t\t\t\tON post.ID = meta.post_id\n\t\t\tWHERE\n\t\t\t\tpost_type = 'pronamic_event'\n\t\t\t\t\tAND\n\t\t\t\tID NOT IN (\n\t\t\t\t\tSELECT post_id FROM $wpdb->postmeta WHERE meta_key = %s\n\t\t\t\t)\n\t\t\tGROUP BY\n\t\t\t\tpost.ID\n\t\t\t;\n\t\t\";\n\n\t\t$query = $wpdb->prepare( $query, $new_key, $old_key, $new_key );\n\n\t\t$wpdb->query( $query );\n\t}\n}", "public function trackTransaction() {\n\t\t\n\t\tif ( ! empty( $this->commerce_event ) ) {\n\t\t\t$this->trackEvent( $this->commerce_event );\n\t\t\t$this->commerce_event = '';\n\t\t}\n\t}", "public function popRecordedEvents(): array\n {\n $pendingEvents = $this->recordedEvents;\n\n $this->recordedEvents = [];\n\n $mapMessage = function (Message $event): GenericEvent {\n if(! $event instanceof GenericEvent) {\n return GenericEvent::fromMessage($event);\n }\n\n return $event;\n };\n\n foreach ($pendingEvents as $i => $event) {\n $pendingEvents[$i] = $mapMessage($this->flavour->prepareNetworkTransmission($event));\n }\n\n return $pendingEvents;\n }", "public function checkSignal()\n {\n if($this->current_signal){\n $this->fire($this->current_signal); \n }\n }", "private function fireEvent() {\n $random = rand(0, 100);\n if ($random < $this->probablity) {\n return true;\n }\n return false;\n }", "public function clearEvents()\n\t{\n\t\t$this->collEvents = null; // important to set this to NULL since that means it is uninitialized\n\t}", "function current_signal($offset = 0)\n{\n return XPSPL::instance()->current_signal($offset);\n}", "public function testComposerPrePackageUninstallEventHandlerDoesNotRunWithOtherEvents(): void {\n // Clean up must not run when other than\n // PackageEvents::PRE_PACKAGE_UNINSTALL event is dispatched.\n $package = new Package('dummy', '1.0.0.0', '^1.0');\n $operation = new InstallOperation($package);\n $event = new PackageEvent(PackageEvents::PRE_PACKAGE_INSTALL, $this->composer, $this->io, FALSE, $this->installedRepo, [$operation], $operation);\n $this->configInstallManager\n ->expects(self::never())\n ->method('uninstall');\n $this->app->handleEvent($event);\n }", "public function getUncommittedEvents();", "public function gain(){\r\n $actionPoint = $this->target->getActionPoint();\r\n $actionPoint = round($actionPoint / 2);\r\n\r\n $this->target->setActionPoint($actionPoint);\r\n $this->target->setTimestamp();\r\n\r\n self::getActionPoint();\r\n }", "function calculateEvent($trueIndex, $dataIndex) {\n\t\t$dataEvent = self::$data[$dataIndex]['EventId'];\n\t\t$trueEvent = self::$groundTruth[$trueIndex]['type_id'];\n\t\t//TODO create Event Loss matrix\n\t\tif ($dataEvent == $trueEvent) {\n\t\t\treturn 1;\n\t\t} else {\n\t\t\treturn -1;\n\t\t}\n\t}", "public function verifyLogsImpressionsEventsDispatched(): void\n {\n // 💡️ Be sure that your FLAG_KEYS array above includes A/B Test eg \"product_version\"\n $logger = new DefaultLogger(Logger::DEBUG);\n $localOptimizelyClient = new Optimizely(datafile: null, logger: $logger, sdkKey: SDK_KEY);\n $localUserContext = $localOptimizelyClient->createUserContext($this->userId);\n\n // review the DEBUG output, ensuring you see an impression log for each experiment type in your FLAG_KEYS\n // \"Dispatching impression event to URL https://logx.optimizely.com/v1/events with params...\"\n // ⚠️ Your Rollout type flags should not have impression events\n $localUserContext->decideForKeys(FLAG_KEYS);\n }", "public static function flushEventListeners()\n {\n if (!isset(static::$dispatcher)) {\n return;\n }\n\n $instance = new static;\n\n foreach ($instance->getObservableEvents() as $event) {\n static::$dispatcher->forget(\"halcyon.{$event}: \".get_called_class());\n }\n\n static::$eventsBooted = [];\n }", "function notify($event)\n {\n return;\n }", "function mSILENT(){\n try {\n $_type = Erfurt_Sparql_Parser_Sparql11_Update_Tokenizer11::$SILENT;\n $_channel = Erfurt_Sparql_Parser_Sparql11_Update_Tokenizer11::$DEFAULT_TOKEN_CHANNEL;\n // Tokenizer11.g:44:3: ( 'silent' ) \n // Tokenizer11.g:45:3: 'silent' \n {\n $this->matchString(\"silent\"); \n\n\n }\n\n $this->state->type = $_type;\n $this->state->channel = $_channel;\n }\n catch(Exception $e){\n throw $e;\n }\n }", "function setEventType() // OK\n {\n }", "function eventclass_student_attendance()\n\t{\n\t\t$this->events[\"AfterAdd\"]=true;\n\n\t\t$this->events[\"AfterEdit\"]=true;\n\n\t\t$this->events[\"AfterDelete\"]=true;\n\n\n//\tonscreen events\n\n\n\t}", "protected function postHandle(Event $ev) { return; }", "private function getMessageEventData(): array {\n $data = [\n \"type\" => \"message\",\n \"channel\" => \"C2147483705\",\n \"user\" => \"U2147483697\",\n \"text\" => \"Hello world\",\n \"ts\" => \"1355517523.000005\"\n ];\n if ( rand( 0, 1 ) == 0 ) {\n return $data;\n } else {\n $data[ 'edited' ] = [\n \"user\" => \"U2147483697\",\n \"ts\" => \"1355517536.000001\"\n ];\n return $data;\n }\n }", "function eventclass_offeraride()\n\t{\n\t\t$this->events[\"BeforeMoveNextList\"]=true;\n\n\n//\tonscreen events\n\n\t}", "public function reactToOnBeforeDealDamage($event) { }", "public function isUnknownEvent()\n {\n return $this->baseEvent->isUnknownEvent();\n }", "public function test_events_are_not_triggered_for_invalid_entities() {\n $client = m::mock('\\GuzzleHttp\\Client');\n $client->shouldReceive('createRequest')->never();\n $client->shouldReceive('send')->never();\n $course = $this->getDataGenerator()->create_course();\n $return = $this->_app['dragdrop_event']->handle_event('sentence', array(), NOGROUPS, m::mock('dragdrop_user'), m::mock('dragdrop_model_manager'), $client);\n $this->assertEmpty($return);\n }", "public function reactToOnBeforeRound($event) { }", "public function isNormal() {\n return $this->getStatus() === Status::NORMAL;\n }", "function test_unschedule_event() {\n\t\t$hook = rand_str();\n\t\t$timestamp = strtotime('+1 hour');\n\n\t\twp_schedule_single_event( $timestamp, $hook );\n\t\t$this->assertEquals( $timestamp, wp_next_scheduled($hook) );\n\n\t\t// now unschedule it and make sure it's gone\n\t\twp_unschedule_event( $timestamp, $hook );\n\t\t$this->assertEquals( false, wp_next_scheduled($hook) );\n\t}", "function dumpJsEvents()\r\n {\r\n parent::dumpJsEvents();\r\n\r\n $this->dumpJSEvent($this->_jsonpaint);\r\n }", "public function maybe_create_scheduled_event()\n {\n }", "public function getValidEvents()\n\t{\n\t\treturn array();\n\t}", "public function DoEvent($nEvent) {}", "public static function getSubscribedEvents()\n {\n return array(\n 'beforeScenario' => array('prepareDrupal', 10),\n 'beforeOutline' => array('prepareDrupal', 10),\n 'afterScenario' => array('teardownDrupal', -10),\n 'afterOutline' => array('teardownDrupal', -10)\n );\n }", "public function preProcess(ProcessEvent $event) {\n $GLOBALS['feeds_test_events'][] = (__METHOD__ . ' called');\n }", "public function tracker_abort(){\n\t\t$this->env_set('tracker:event', false);\n\t\t}", "public static function beforeSave($event)\r\n {\r\n }", "public function testGetEvents()\n {\n // TODO: implement\n $this->markTestIncomplete('Not implemented');\n }", "public function reactToOnAfterTakingDamage($event) { }", "public function testGetEvent()\n {\n }", "abstract protected function whenAll(DomainEvents $events);", "protected function _ensureObservation() {}", "function getEvents() {\n return [];\n }", "function mc_flatten_array( $events ) {\n\t$new_array = array();\n\tif ( is_array( $events ) ) {\n\t\tforeach ( $events as $event ) {\n\t\t\tforeach ( $event as $e ) {\n\t\t\t\t$new_array[] = $e;\n\t\t\t}\n\t\t}\n\t}\n\n\treturn $new_array;\n}", "public function process(array $event);", "private static function get_events() {\n\t\treturn array(\n\t\t\t'formidable_send_usage' => 'weekly',\n\t\t);\n\t}", "private function processEvery($listener,$e) {\n if($this->start_elapse instanceof \\DateTime) {\n $this->elapsed = new \\DateTime;\n $diff = $this->start_elapse->diff($this->elapsed);\n if($diff->s >= $listener[0] && $this->isWithin()) {\n $this->emit($listener[1]);\n $this->start_elapse = new \\DateTime;\n }\n } else {\n $this->start_elapse = new \\DateTime;\n }\n }", "public function postSave(EntityEvent $event) {\n $GLOBALS['feeds_test_events'][] = (__METHOD__ . ' called');\n }", "public function realTimestamps() {\n\t\treturn false;\n\t}", "public function __sleep(){\r\n\t\treturn [\r\n\t\t\t\t'ticket',\r\n\t\t\t\t'time',\r\n\t\t\t\t'stage',\r\n\t\t\t\t'enemy',\r\n\t\t\t\t'attack',\r\n\t\t\t\t'effect',\r\n//\t\t\t\t'lv_data'\r\n\t\t];\r\n\t}", "function resetOlds(){\n// deal gracefully with discontinuity in logs by resetting \"old\" values\n\nglobal $firstRain,$firstSump, $firstWater;\n$firstRain=1;\n$firstSump=1;\n$firstWater=1;\n}", "public function getEvent() {\n\t}", "protected function expectAddEvent()\n {\n $this->eventPublisher->expects($this->once())\n ->method('addEvent')\n ->with(['uuid' => '123']);\n }", "public function recordThat(Message $event): void\n {\n if (! \\array_key_exists($event->messageName(), $this->eventApplyMap)) {\n throw new RuntimeException('Wrong event recording detected. Unknown event passed to GenericAggregateRoot: ' . $event->messageName());\n }\n\n $this->version += 1;\n\n $event = $event->withMetadata(\\array_merge(\n $event->metadata(),\n [\n GenericEvent::META_AGGREGATE_ID => $this->aggregateId(),\n GenericEvent::META_AGGREGATE_TYPE => $this->aggregateType(),\n GenericEvent::META_AGGREGATE_VERSION => $this->version()\n ]\n ));\n\n $this->recordedEvents[] = $event;\n\n $this->apply($event);\n }", "public function onBeforeWrite() {\n\t\tparent::onBeforeWrite();\n\t\t\n\t\tswitch($this->TriggerType) {\n\t\t\tcase 'WhenItemSaved':\n\t\t\t\tforeach($this->Facts() as $fact) {\n\t\t\t\t\tif($fact->Temporal) {\n\t\t\t\t\t\t$this->TriggerType = 'WhenTimePassed';\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t\n\t\t\tcase 'WhenTimePassed':\n\t\t\t\t$temporal = false;\n\t\t\t\tforeach($this->Facts() as $fact) {\n\t\t\t\t\tif($fact->Temporal) {\n\t\t\t\t\t\t$temporal = true;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif(!$temporal) {\n\t\t\t\t\t$this->TriggerType = 'WhenItemSaved';\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t}\n\t}", "function WriteAuditTrailDummy($typ) {\r\n\t\t$table = 'pase_establecimiento';\r\n\t\t$usr = CurrentUserID();\r\n\t\tew_WriteAuditTrail(\"log\", ew_StdCurrentDateTime(), ew_ScriptName(), $usr, $typ, $table, \"\", \"\", \"\", \"\");\r\n\t}", "public function resetPartialRegionEvents($v = true)\n {\n $this->collRegionEventsPartial = $v;\n }", "public function init()\n\t{ \n\t\t# Return if no countoff is needed\n\t\tif ($this->countoff<1) return;\n\t\t\n\t\t# initialize event array\n\t\t$this->events = array();\n\t\t\n\t\tif ($this->initRestTicks) {\n\t\t\t# Add a brief rest and then all notes off and all sound off to relevant channels here\n\t\t\tfor($ix=0; $ix<$this->track_total; $ix++) {\n\t\t\t\t$this->track_ix = $ix;\n\t\t\t\t\n\t\t\t\t# for all channels in this track\n\t\t\t\tforeach($this->channels[$this->track_ix] as $chan) {\n\t\t\t\t\t$this->addEvent(0,176+$chan,123,0);\n\t\t\t\t\t$this->addEvent(0,176+$chan,7,0);\n\t\t\t\t}\n\t\t\t\t$this->addEvent($this->initRestTicks,176+$this->channels[$this->track_ix][0],7,0);\n\t\t\t\t$this->addEvent($this->initRestTicks,176+$this->channels[$this->track_ix][0],7,$this->mVol);\n\t\t\t}\n\t\t}\n\t\t\n\t\t# Put in the initial countoff\n\t\tfor($i=0; $i<$this->timeSig; $i++) { \n\t\t\t$vol = ($i==0) ? 127 : 70;\n\t\t\t$this->addEvent(0,153,37,$vol);\n\t\t\t$this->addEvent($this->ticksPerBeat,153,37,0);\n\t\t}\n\t\t\n\t\t# record where this track starts for looping purposes\n\t\t$this->loopStart[$this->track_ix] = count($this->events[$this->track_ix]);\n\t}" ]
[ "0.5639832", "0.55980814", "0.5571378", "0.556886", "0.5385578", "0.52555835", "0.5241182", "0.52342397", "0.5208611", "0.5208148", "0.506111", "0.5051156", "0.5043816", "0.5042194", "0.50267595", "0.5014668", "0.49539495", "0.4943994", "0.4930285", "0.4929326", "0.491733", "0.48938966", "0.4888318", "0.48757827", "0.48643", "0.48615682", "0.48507154", "0.48395354", "0.4829615", "0.4813747", "0.48007295", "0.47963467", "0.47869152", "0.47731853", "0.4747503", "0.4745558", "0.47340426", "0.4729625", "0.4723222", "0.47127604", "0.47053516", "0.4701827", "0.46933714", "0.4673493", "0.46732453", "0.46703807", "0.46684417", "0.46681476", "0.4655872", "0.4647987", "0.46381935", "0.46255574", "0.46195108", "0.46061316", "0.46049795", "0.45856968", "0.45821494", "0.4580457", "0.45742342", "0.45691356", "0.45617333", "0.45607823", "0.45537558", "0.45530185", "0.4552165", "0.45468903", "0.45449966", "0.4543569", "0.45335427", "0.45249325", "0.45210794", "0.4520092", "0.45155713", "0.4514739", "0.4512431", "0.45030862", "0.44970584", "0.44957742", "0.4491451", "0.4487716", "0.44754472", "0.44700077", "0.44663435", "0.4462558", "0.4461277", "0.44569036", "0.444798", "0.44476193", "0.44464743", "0.44365355", "0.44319627", "0.4430766", "0.44290632", "0.44257432", "0.4424343", "0.44195542", "0.44164464", "0.4416341", "0.4415944", "0.4411618", "0.44063097" ]
0.0
-1
Interesting events. Example: User logs in, SQL logs.
public function info($message, array $context = []) { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function onUserLoginPassed($event)\n {\n debug($event);\n }", "public function onUserLogin($event) {\n\n Log::info('event catched');\n }", "function logEvent($con, $accID, $txtEvent)\n\t{\n\t\t$userName = getUserName($con, $accID);\n\t\t$sql_log = $con->prepare(\"INSERT INTO logs (logDate, logUser, logEvent) VALUES (NOW(), ?, ?)\");\n\t\t$sql_log->bind_param(\"ss\", $userName, $txtEvent);\n\t\t$sql_log->execute() or die(mysqli_error($con));\n\t}", "function logevent($action) {\n require 'mgstats.php';\n //Pull the username or enter \"Not Logged In\"\n if($_SESSION['username']) { $remoteUN = $_SESSION['username']; } else { $remoteUN = \"Not Logged In\"; } \n $logTime = date('Y-m-d H:i:s'); //Establish Log time.\n $sid = session_id(); //Session ID\n $entry = $logTime.\"|\".$action.\"|\".$_SERVER['REMOTE_ADDR'].\"|\".$_SERVER['HTTP_USER_AGENT'].\"|\".$remoteUN.\"|\".$sid.\"\\n\"; //Create the variable for log entry\n $filename = \"logs/\".date('Y-m-d').\".log\"; //Build filename, changes by day.\n file_put_contents($filename,$entry, FILE_APPEND); //Appends the entry to the log file.\n return;\n}", "function notify($event)\n {\n if(SWConfig::read_values('statuswolf.debug'))\n {\n $this->loggy = new KLogger(ROOT . 'app/log/', KLogger::DEBUG);\n }\n else\n {\n $this->loggy = new KLogger(ROOT . 'app/log/', KLogger::INFO);\n }\n\n $this->auth_log_messages[] = $event;\n\n $this->loggy->logDebug(json_encode($this->auth_log_messages));\n }", "public function handleUserLogin($event) {\n //Log user login\n $activity = new Activity;\n $activity->activity_type = 'login';\n $activity->actor_id = $event->user->id;\n $activity->actor_type = 'user';\n $activity->activity_data = '';\n $activity->user_agent = $this->request->header('User-Agent');\n $activity->actor_ip = $this->request->ip();\n $activity->save();\n }", "public function viewEvents();", "protected function registerEvents(): void\n {\n Event::listen(MessageLogged::class, function (MessageLogged $e) {\n if( app()->bound('current-context') )\n app('current-context')->log((array)$e);\n });\n }", "function EventLog($page,$action,$orignal_value,$new_value)\n{\n\t\t$email = $_SESSION['user_email'];\n\t\t$ipaddress = getUserIP();\n\t\t\n\t\t$data = sprintf(\"%s,%s,%s,%s,%s\" . PHP_EOL, $ipaddress,date(\"F j Y g:i a\"), $email, $page, $action);\n\t\t\n\t\t//file_put_contents($_SERVER['DOCUMENT_ROOT'] .'/log.txt', $data, FILE_APPEND);\t\t\n\t\tfile_put_contents('log.txt', $data, FILE_APPEND);\t\t\t\n\t\t\n\t\t\n}", "function smsnews_log ($event='generic', $message='', $subscriber_id=0) {\n\n\tglobal $USER_LOGIN;\n\n\t$user = $USER_LOGIN;\n\t$event = db_escape($event);\n\t$message = db_escape(\"[$user] $message\");\n\t$subscriber_id += 0;\n\tdb(\n\t\t\"insert into smsnews.log (event,message,subscriber_id)\".\n\t\t\" values ('$event','$message',$subscriber_id)\"\n\t);\n}", "public static function getEvents()\n {\n $events = parent::getEvents();\n $events[] = self::ON_FIRST_LOGIN;\n $events[] = self::ON_LOGIN;\n $events[] = self::ON_LOGOUT;\n $events[] = self::ON_PASSWORD_CHANGE;\n\n return $events;\n }", "function userclass2_adminlog($msg_num='00', $woffle='')\n{\n\te107::getAdminLog()->log_event('UCLASS_'.$msg_num,$woffle,E_LOG_INFORMATIVE,'');\n}", "public function onUserLogout($event)\n {\n debug($event);\n }", "function account_log()\n {\n }", "public function onUserLogout($event) {\n\n Log::info('event catched');\n\n }", "function dblog_event($id) {\n $severity = watchdog_severity_levels();\n $result = db_query('SELECT w.*, u.name, u.uid FROM {watchdog} w INNER JOIN {users} u ON w.uid = u.uid WHERE w.wid = :id', array(':id' => $id))->fetchObject();\n if ($dblog = $result) {\n $rows = array(\n array(\n array('data' => t('Type'), 'header' => TRUE),\n t($dblog->type),\n ),\n array(\n array('data' => t('Date'), 'header' => TRUE),\n format_date($dblog->timestamp, 'long'),\n ),\n array(\n array('data' => t('User'), 'header' => TRUE),\n theme('username', array('account' => $dblog)),\n ),\n array(\n array('data' => t('Location'), 'header' => TRUE),\n l($dblog->location, $dblog->location),\n ),\n array(\n array('data' => t('Referrer'), 'header' => TRUE),\n l($dblog->referer, $dblog->referer),\n ),\n array(\n array('data' => t('Message'), 'header' => TRUE),\n theme('dblog_message', array('event' => $dblog)),\n ),\n array(\n array('data' => t('Severity'), 'header' => TRUE),\n $severity[$dblog->severity],\n ),\n array(\n array('data' => t('Hostname'), 'header' => TRUE),\n check_plain($dblog->hostname),\n ),\n array(\n array('data' => t('Operations'), 'header' => TRUE),\n $dblog->link,\n ),\n );\n $build['dblog_table'] = array(\n '#theme' => 'table',\n '#rows' => $rows,\n '#attributes' => array('class' => array('dblog-event')),\n );\n return $build;\n }\n else {\n return '';\n }\n}", "public static function auditAccess() {\n\t\t\t$memberid = getLoggedOnMemberID();\n\t\t\t$auditid = $_SESSION['SESS_LOGIN_AUDIT'];\n\n\t\t\t$sql = \"UPDATE {$_SESSION['DB_PREFIX']}members SET \n\t\t\t\t\tlastaccessdate = NOW(), \n\t\t\t\t\tmetamodifieddate = NOW(), \n\t\t\t\t\tmetamodifieduserid = $memberid\n\t\t\t\t\tWHERE member_id = $memberid\";\n\t\t\t$result = mysql_query($sql);\n\t\t\t\n\t\t\t$sql = \"UPDATE {$_SESSION['DB_PREFIX']}loginaudit SET \n\t\t\t\t\ttimeoff = NOW(), \n\t\t\t\t\tmetamodifieddate = NOW(), \n\t\t\t\t\tmetamodifieduserid = $memberid\n\t\t\t\t\tWHERE id = $auditid\";\n\t\t\t$result = mysql_query($sql);\n\t\t}", "public function log_activity() {\n \n \n $CI =& get_instance();\n $CI->load->library('audit_trail');\n // Start off with the session stuff we know\n $data = array();\n $data['user_id'] = $CI->session->userdata('user_id');\n \n // Next up, we want to know what page we're on, use the router class\n $data['section'] = $CI->router->class;\n $data['action'] = $CI->router->method;\n \n // Lastly, we need to know when this is happening\n $data['when'] = date('Y-m-d G:i:s');\n \n // We don't need it, but we'll log the URI just in case\n $data['uri'] = uri_string();\n $path = realpath(APPPATH);\n // And write it to the database\n if($CI->router->method!='checkPortal' && $CI->router->method!='getAttendanceUpdates' && $CI->router->method!='getAverageDailyAttendance'):\n $CI->audit_trail->lfile($path.'/modules/logs/'.$CI->session->userdata('user_id').'.txt');\n $CI->audit_trail->lwrite($CI->session->userdata('name').' access '.$CI->router->method.' through '. uri_string().'.' , 'TRACE');\n endif;\n }", "public function preLogUser($sessionId){}", "public function user_can_see_logs()\n {\n }", "public function event_joined()\r\n\t{\r\n\t\r\n\t}", "function logEvent($message)\n\t{\n\t\tdate_default_timezone_set ( \"America/Chicago\" );\n\t\t$time = date( \"Y-m-d H:i:s\");\n\t\t$fp = fopen('files/log.txt', 'a');\n\t\tfwrite($fp, $time.\"-- \");\n\t\tfwrite($fp, $message);\n\t\tfwrite($fp, \"\\n\");\n\t\tfclose($fp);\n\t}", "public function onUserLoginFailed($event)\n {\n }", "public function events()\n {\n return array(User::EVENT_AFTER_LOGIN => array($this, 'processAfterLogin'));\n }", "public function __logEvent($msg)\n {\n if ($this->logger) {\n $this->logger->log($msg, 'info', 'queries');\n }\n }", "protected function initEvents() {\n\t\tEvent::on(SecurityController::class, FormEvent::EVENT_AFTER_LOGIN, function (FormEvent $event) {\n\n\t\t\tif($sso = \\Yii::$app->session->get('sso')){\n\t\t \t\n\t\t \t\\Yii::$app->user->setReturnUrl([\n\t\t\t\t\t'discourse/sso', \n\t\t\t\t\t'sso' => $sso['sso'], \n\t\t\t\t\t'sig' => $sso['sig']\n\t\t\t\t]);\n\t\t }\n\n\t\t});\n\t}", "function search_log()\n\t{\n\t\t$users = $this->auth_model->get_usernames();\n\t\t$data[\"users\"] = get_keyed_pairs($users,array(\"username\",\"user\"),TRUE);\n\t\t$data[\"actions\"] = array(\"login\" => \"login\",\"logout\" => \"logout\");\n\t\t$this->load->view(\"admin/search_log\",$data);\n\t}", "public function initEvent() {\n \t\t$dateend = date_format(date_create(),'Y-m-d H:i:s');\n\t\t$datebegin = date_create();\n\t\tdate_sub($datebegin, date_interval_create_from_date_string('10 days'));\n\t\t$datebegin = date_format($datebegin, 'Y-m-d H:i:s');\n\t\t// get event logs from event_log table\n \t\t$EventLogs = DB::table('event_log')->join('client','client.client_id','=','event_log.client_id')->join('mandant','client.mandant_id','=','mandant.mandant_id')->select('log_nr', 'message_id','mandant.mandant_firmname','useragent','client.client_id','client_ip','action',DB::raw('date_format(insert_date, \\'%d.%m.%Y %H:%i:%s\\') as insert_date'))->where('mandant.user_id','1')->where('insert_date','>',$datebegin)->where('insert_date','<',$dateend)->orderby('log_nr','ASC')->get();\n \t\treturn View::make('eventlog/eventlog_gui')->with('page',2)->with('title','Event Logs')->with('events',$EventLogs);\n \t}", "public function testReportsEventlogGet()\n {\n }", "public function viewAllEvents();", "public function logEvents(array $auditLogs);", "public function logUser()\n {\n if (!$this->limpid->visitCounterManager->getEntry($_SERVER['REMOTE_ADDR']))\n $this->limpid->visitCounterManager->logUser($_SERVER['REMOTE_ADDR']);\n else\n $this->limpid->visitCounterManager->editEntry($_SERVER['REMOTE_ADDR'], ['last_visit' => date('Y-m-d H:i:s')]);\n }", "function turnitintooltwo_add_to_log($courseid, $eventname, $link, $desc, $cmid, $userid = 0) {\n global $USER;\n\n $eventname = str_replace(' ', '_', $eventname);\n $eventpath = '\\mod_turnitintooltwo\\event\\\\'.$eventname;\n\n $data = array(\n 'objectid' => $cmid,\n 'context' => ( $cmid == 0 ) ? context_course::instance($courseid) : context_module::instance($cmid),\n 'other' => array('desc' => $desc)\n );\n if (!empty($userid) && ($userid != $USER->id)) {\n $data['relateduserid'] = $userid;\n }\n $event = $eventpath::create($data);\n $event->trigger();\n}", "function WriteAuditTrailDummy($typ) {\n\t\t$table = 'user';\n\t $usr = CurrentUserName();\n\t\tew_WriteAuditTrail(\"log\", ew_StdCurrentDateTime(), ew_ScriptName(), $usr, $typ, $table, \"\", \"\", \"\", \"\");\n\t}", "public function log_activity() {\n\t\t$data = array();\n\t\t$data['page'] = current_url();\n\t\t$data['ip_address'] = $this->_ci->input->ip_address();\n\t\t$data['user_agent'] = $this->_ci->agent->agent_string(); \n\t\t$data['request_method'] = $this->_ci->input->server('REQUEST_METHOD');\n\t\t$data['request_params'] = serialize($this->_ci->input->get_post(NULL, TRUE)); \n\t\t$data['uri_string'] = $this->_ci->uri->uri_string();\n\t\t$data['created_at'] = date('Y-m-d h:i:s');\n\n\t\tif($this->verify_activity()) {\n\t\t\t// And write it to the database\n\t\t\t$this->_ci->db->insert('hooks', $data);\n\t\t}\n\t}", "function insert_user_loging(){\n /*\n * Algorithm:\n * get all information about user\n * restructure query based on which fields are filled out\n * execute insert on user_logging\n *\n *\n *\n *\n *\n *\n *\n *\n *\n *\n *\n *\n *\n */\n\n}", "public static function events();", "function ShowEvents()\n {\n $this->ReadEvents();\n echo\n $this->H(1,$this->MyLanguage_GetMessage(\"Events_Table_Title\")).\n $this->EventsHtmlTable(),\n \"\";\n }", "public function testAuditLogNavigationLinksIsPresent()\n {\n $user = User::find(User::JANITOR_USER_ID);\n\n $this->browse(function ($browser) use ($user) {\n $browser->loginAs($user)\n ->visit(new HomePage)\n ->click('@nav-cog')\n ->assertSee('Audit Log');\n });\n }", "private function _log($msg)\n\t{\n\t\t$this->EE->TMPL->log_item(\"Low Events: {$msg}\");\n\t}", "function collectAction( KalturaStatsEvent $event )\r\n\t{\r\n\t\t$evenLogFullPath = kConf::get ( \"event_log_file_path\" );\r\n\t\t\r\n\t\t// if no file path - do nothing\r\n\t\tif ( ! $evenLogFullPath ) return;\r\n\t\t\r\n\t\t$http_referrer = isset ( $_SERVER['HTTP_REFERER'] ) ? $_SERVER['HTTP_REFERER'] : \"\";\r\n\t\t\r\n\t\t$users_timestamp = $event->eventTimestamp;\r\n\t\t\r\n\t\t$eventLine = \r\n\t\t\t$event->clientVer . self::SEPARATOR \r\n\t\t\t. $event->eventType . self::SEPARATOR\r\n\t\t\t. date ( \"Y-m-d H:i:s\" , time() ) . self::SEPARATOR // use server time\r\n\t\t\t. $event->sessionId . self::SEPARATOR\r\n\t\t\t. $event->partnerId . self::SEPARATOR\r\n\t\t\t. $event->entryId . self::SEPARATOR\r\n\t\t\t. $event->uniqueViewer . self::SEPARATOR\r\n\t\t\t. $event->widgetId . self::SEPARATOR\r\n\t\t\t. $event->uiconfId . self::SEPARATOR\r\n\t\t\t. $event->userId . self::SEPARATOR\r\n\t\t\t. $event->currentPoint . self::SEPARATOR\r\n\t\t\t. $event->duration . self::SEPARATOR\r\n\t\t\t. requestUtils::getRemoteAddress() . self::SEPARATOR\r\n\t\t\t. $event->processDuration . self::SEPARATOR\r\n\t\t\t. $event->controlId . self::SEPARATOR\r\n\t\t\t. $event->seek . self::SEPARATOR\r\n\t\t\t. $event->newPoint . self::SEPARATOR\r\n\t\t\t. ( $event->referrer ? $event->referrer : \"\" )\t. self::SEPARATOR\t// duw to the way flash sends the referrer - allow it to override\r\n\t\t\t. $users_timestamp . self::SEPARATOR\r\n\t\t\t. PHP_EOL \r\n\t\t;\r\n\t\t\r\n\t\ttry\r\n\t\t{\r\n\t\t\t$res = $this->writeToFile ( $evenLogFullPath , $eventLine);\r\n\t\t\tif ( ! $res )\r\n\t\t\t\tKalturaLog::err( \"Error while trying to write event to log. Event:\\n\". $eventLine );\r\n }\r\n catch ( Exception $ex )\r\n {\r\n \tKalturaLog::err( \"Error while trying to write event to log. Event:\\n\". $eventLine );\t\r\n }\r\n\t\treturn true;\r\n\t}", "public function log_view() {\n \\filter_embedquestion\\event\\question_viewed::create(['context' => $this->embedlocation->context,\n 'objectid' => $this->current_question()->id])->trigger();\n }", "function log_event( $plugin_name, $log_msg, $log_type, $file, $line ) {\t\t$allowed = get_transient( 'ti_log_allowed' );\n\t\tif ( is_array( $allowed ) && in_array( $plugin_name, $allowed ) ) {\n\t\t\t$logs = get_transient( 'ti_log' . $plugin_name );\n\t\t\tif ( ! $logs ) {\n\t\t\t\t$logs = array();\n\t\t\t}\n\t\t\t$logs[] = array(\n\t\t\t\t'type' => $log_type,\n\t\t\t\t'msg' => $log_msg,\n\t\t\t\t'time' => date( 'F j, Y H:i:s', current_time( 'timestamp', true ) ),\n\t\t\t\t'file' => $file,\n\t\t\t\t'line' => $line,\n\t\t\t);\n\t\t\t// keep only the last LOG_LENGTH logs\n\t\t\t$logs = array_slice( $logs, 0 - self::LOG_LENGTH );\n\t\t\tset_transient( 'ti_log' . $plugin_name, $logs, self::LOG_OPTION_EXPIRY_MINS * MINUTE_IN_SECONDS );\n\t\t}\n\t}", "abstract function HookEvents();", "function log_and_confirm($text, $who, $detail) {\n\t\n\tglobal $playobj, $log_level, $reasons, $softbot;\n\n\t/* append user's reasons for the action if the user is human */\n\t\n\tif ($reasons and ! $softbot and $who == $playobj->id) {\n\t\t$text .= \" ($reasons)\";\n\t\t$reasons = '';\n\t}\n\tif ($detail >= $log_level and isset($playobj->loggedin)) {\n\t\tif ($who == 'Event') echo \"$text<br>\";\n\t\tif ($who == $playobj->id) echo \"You $text<br>\";\n\t\tif ($who == 'bank') echo $playobj->name . \"$text<BR>\";\n\t}\n\t\t\n /* softbots are distinguished in the log by having names that start\n with a * */\n\tif ($softbot) $who = \"*\" . $who;\n\tlog_act($text, $who, $detail);\n}", "public function listenToLogEvent(sfEvent $event)\n {\n $priority = isset($event['priority']) ? $event['priority'] : self::INFO;\n\n $subject = $event->getSubject();\n $subject = is_object($subject) ? get_class($subject) : (is_string($subject) ? $subject : 'main');\n foreach ($event->getParameters() as $key => $message)\n {\n if ('priority' === $key)\n {\n continue;\n }\n\n $this->log(sprintf('{%s} %s', $subject, $message), $priority);\n }\n }", "function auditLog($msg) {\n global $DB;\n $id = 0;\n if (isset($_SESSION['user'])) {\n $id = $_SESSION['user']['id'];\n }\n $data = array(\"id\" => $id, \"call\" => $msg);\n $ins = $DB->prepare(\"INSERT INTO AuditLog VALUES(NULL, NOW(), :id, :call)\");\n $ins->execute($data);\n}", "public function table()\n {\n if (!$this->cfg['collect']) {\n return;\n }\n $args = \\func_get_args();\n $meta = $this->internal->getMetaVals(\n $args,\n array('channel' => $this->cfg['channelName'])\n );\n $event = $this->methodTable->onLog(new Event($this, array(\n 'method' => __FUNCTION__,\n 'args' => $args,\n 'meta' => $meta,\n )));\n $this->appendLog(\n $event['method'],\n $event['args'],\n $event['meta']\n );\n }", "function log_event($event_string){\n \tfile_put_contents(\"log.txt\", $event_string, FILE_APPEND);\n \t\n \t//making error message request\n \t$request = array();\n \t$request['type'] = \"event_log\";\n \t$request['error_message'] = $event_string;\n \t\n \t\n \t//send error to database server\n \t$db = new rabbitMQClient(\"database.ini\",\"testServer\");\n \t$response = $db->publish($request);\n \t\n \t//send error to frontend server\n \t$frontend = new rabbitMQClient(\"frontend.ini\",\"testServer\");\n \t$response = $frontend->publish($request);\n \t\n \t//send error to RabbitMQ server\n \t$rbmq = new rabbitMQClient(\"rabbitMQ.ini\",\"testServer\");\n \t$response = $rbmq->publish($request);\n \t\n }", "public function onUserLogin(Login $event)\n {\n LogUser::create([\n 'log_request_id' => LogRequest::createFromRequest($this->request)->id,\n 'user_id' => $event->user->id,\n 'user_action_id' => LogUserAction::where('slug', 'login')->first()->id,\n 'social_provider_id' => $this->getSocialProviderId()\n ]);\n }", "public function log_login()\n {\n if (!$this->config->get('log_logins')) {\n return;\n }\n\n $user_name = $this->get_user_name();\n $user_id = $this->get_user_id();\n\n if (!$user_id) {\n return;\n }\n\n self::write_log('userlogins',\n sprintf('Successful login for %s (ID: %d) from %s in session %s',\n $user_name, $user_id, self::remote_ip(), session_id()));\n }", "function __construct()\n\t{\n\t\t$this->events[\"AfterSuccessfulLogin\"]=true;\n\n\n\t\t$this->events[\"ModifyMenuItem\"]=true;\n\n\n//\tonscreen events\n\n\n\t\t$this->events[\"IsRecordEditable\"][\"demo_user\"] = true;\n\t\t$this->events[\"IsRecordEditable\"][\"indschedule\"] = true;\n\t\t$this->events[\"IsRecordEditable\"][\"loans\"] = true;\n\t\t$this->events[\"IsRecordEditable\"][\"payroll\"] = true;\n\t\t$this->events[\"IsRecordEditable\"][\"payrolltab\"] = true;\n\t\t$this->events[\"IsRecordEditable\"][\"earningadjustment\"] = true;\n\t\t$this->events[\"IsRecordEditable\"][\"payrollearnadj\"] = true;\n\t\t$this->events[\"IsRecordEditable\"][\"payrolldeductions\"] = true;\n\t\t$this->events[\"IsRecordEditable\"][\"payrollstatutories\"] = true;\n\t\t$this->events[\"IsRecordEditable\"][\"payrolltax\"] = true;\n\t\t$this->events[\"IsRecordEditable\"][\"payroll21\"] = true;\n\t\t$this->events[\"IsRecordEditable\"][\"leaves11\"] = true;\n\t\t$this->events[\"IsRecordEditable\"][\"leavesapp\"] = true;\n\t\t$this->events[\"IsRecordEditable\"][\"indschedrange\"] = true;\n\t\t$this->events[\"IsRecordEditable\"][\"empdtr\"] = true;\n\t\t$this->events[\"IsRecordEditable\"][\"overtimefile\"] = true;\n\t\t$this->events[\"IsRecordEditable\"][\"payrolldiv\"] = true;\n\t\t$this->events[\"IsRecordEditable\"][\"leavesapp2\"] = true;\n\t\t$this->events[\"IsRecordEditable\"][\"filelog\"] = true;\n\t\t$this->events[\"IsRecordEditable\"][\"filelog1\"] = true;\n\t\t$this->events[\"IsRecordEditable\"][\"filelog2\"] = true;\n\t\t$this->events[\"IsRecordEditable\"][\"filelog3\"] = true;\n\t\t$this->events[\"IsRecordEditable\"][\"demo_user_open\"] = true;\n\t\t$this->events[\"IsRecordEditable\"][\"overtimefileapp\"] = true;\n\t\t$this->events[\"IsRecordEditable\"][\"overtimefileapp2\"] = true;\n\t\t$this->events[\"IsRecordEditable\"][\"demo_useremp\"] = true;\n\t\t$this->events[\"IsRecordEditable\"][\"payrolltab1\"] = true;\n\t\t$this->events[\"IsRecordEditable\"][\"indscheduleemp\"] = true;\n\t\t$this->events[\"IsRecordEditable\"][\"demo_useractive\"] = true;\n\n\t\t}", "public function getOtherEvents();", "public function manage_events()\n {\n if($this->Auth->user('level') != \"Officer\" && $this->Auth->user('level') != \"Admin\")\n $this->redirect(\n array('controller' => 'Users', 'action' => 'profilehub/' . $this->Auth->user('id')));\n \n $allRsvps = $this->Event->EventsUser->find('all');\n $this->set('rsvps', $allRsvps);\n \n $this->EventHelper(); \n \n $this->layout = 'hero-ish';\n $this->Session->write('Page', 'Hub');\n }", "public function testAuditLogNavigationLinksOpensAuditLogPage()\n {\n $user = User::find(User::JANITOR_USER_ID);\n\n $this->browse(function ($browser) use ($user) {\n $browser->loginAs($user)\n ->visit(new HomePage)\n ->click('@nav-cog')\n ->clickLink('Audit Log')\n ->on(new AuditLogPage);\n });\n }", "private function _logAnalytics($subject) {\n $clientIP = (isset($_SERVER['HTTP_X_FORWARDED_FOR']) && !empty($_SERVER['HTTP_X_FORWARDED_FOR'])) ?\n $_SERVER['HTTP_X_FORWARDED_FOR'] : $_SERVER['REMOTE_ADDR'];\n $analyticsData = array();\n $principalValues = array_values($subject->getPrincipal());\n if(count($principalValues) > 0)\n $analyticsData['user'] = $principalValues[0]; \n //$subject->getPrincipal(); // Get the user from the principal\n $analyticsData['time'] = time(); \n $analyticsData['session'] = session_id(); \n $analyticsData['page'] = 'login'; \n $analyticsData['UA'] = $_SERVER['HTTP_USER_AGENT'];\n $analyticsData['ip'] = $clientIP;\n $GLOBALS['routeLogger']->info(json_encode($analyticsData));\n }", "public function logStatus()\n {\n //piece to handle the login/logout\n $u = $this->isAuth();\n $lstr = ($u) ? '<a href=\"/user/main\">' . $u .\n '</a> <a href=\"/user/logout\">[logout]</a>' :\n '<a href=\"/user/login\">login</a>';\n $this->template->write('logged', $lstr);\n }", "function logMe() {\n\tglobal $conn;\n\t\t\n\t// THIS IS FOR YOU TO COMPLETE\n}", "public function events()\n {\n $eventdata = $this->Event->find('all', \n array(\n 'order' => array('Event.time' => 'DESC'),\n 'condition' => array('type' => 'Event')\n ));\n \n $this->set('events', $eventdata);\n \n $this->assignUserToView($this->Auth->user('id'));\n \n $this->layout = 'hero-ish';\n $this->Session->write('Page', 'Info');\n }", "function changeLogs() {\n\n }", "public function actionEventAccess()\n\t{\n\t\t//$m = new User; for debugging\n\t\t//$m->searchForAdding(); for debugging\n\t\t$model=new Userevent('search');\n\t\t$model->unsetAttributes(); // clear any default values\n\t\t\n\t\t// Select the users based on the currently selected event\n\t\t$model->eventid=User::getUserSelectedEvent();\n\n\t\t// if there are no events, navigate back to splash screen\t\t\n\t\t$sqlcheck = \"select count(id) from event where id=:eventcheck\";\n\t\t$paramcheck = array(':eventcheck'=>$model->eventid);\n\t\t$checkifexist = Event::model()->countBySql($sqlcheck , $paramcheck );\t\n\n\t\tif($checkifexist==0)\n\t\t{\n\t\t\t$this->redirect('splash');\n\t\t}\n\t\telse\n\t\t$this->render('eventaccess',array('model'=>$model));\n\t}", "public function onEvent();", "function publishLog() {\n\t\t$id = $this->current_log;\t\t\n\t\t$res = $this->query(\"SELECT event_id FROM $this->table_log WHERE id=$id\");\n\t\t$row = $res->fetch_assoc();\n\t\t$cal_id = explode(\",\",$row['event_id']);\n\t\t$calEvent = $this->calendar_instance->getEventDetails($row['event_id']);\n\t\t$topic = $calEvent['caption'];\n\t\t$year = $calEvent['year'];\n\t\t$slug = $calEvent['slug'];\n\t\t$url = $this->generateCoolURL(\"/$year/$slug\");\n\t\t$this->addToActivityLog(\"publiserte logg fra <a href=\\\"$url\\\">$topic</a>.\",false,\"major\");\n\t}", "function WriteAuditTrailDummy($typ) {\r\n\t\t$table = 'servidor_escolar';\r\n\t\t$usr = CurrentUserID();\r\n\t\tew_WriteAuditTrail(\"log\", ew_StdCurrentDateTime(), ew_ScriptName(), $usr, $typ, $table, \"\", \"\", \"\", \"\");\r\n\t}", "abstract protected function get_event_name();", "function eventclass_staff_info()\n\t{\n\t\t$this->events[\"AfterAdd\"]=true;\n\n\n//\tonscreen events\n\n\n\t}", "function log_session($input) {\n if (!isset($_SESSION['awr_session'])) {\n $awr_session = bin2hex(random_bytes(20));\n $this->session->set_userdata(array(\"awr_session\"=>$awr_session));\n }\n\n $this->log_visitor($_SESSION['awr_session']);\n $this->log_visitor_activity($_SESSION['awr_session'],$input);\n\n return $_SESSION['awr_session'];\n }", "public function logData() {\n\t\t/* Implement in subclasses */\n\t}", "public function test_database_events_check()\n {\n $this->seeInDatabase('events', ['event_name' => 'Test Event1']);\n }", "public function past_events()\n {\n if($this->Auth->user('level') != \"Officer\" && $this->Auth->user('level') != \"Admin\")\n $this->redirect(\n array('controller' => 'Users', 'action' => 'profilehub/' . $this->Auth->user('id')));\n\n $allRsvps = $this->Event->EventsUser->find('all');\n $this->set('rsvps', $allRsvps);\n\n $this->EventHelper();\n\n $this->layout = 'hero-ish';\n $this->Session->write('Page', 'Hub');\n }", "function statistics_extended_logins_timeline($zoom=\"%y-%U\",$start_date=\"\",$finish_date=\"\"){\r\n\tglobal $CONFIG;\r\n\t$query= \"SELECT date_format(from_unixtime(time_created),'{$zoom}')as zoom, time_created, count(*) total,event \";\r\n\t$query.=\"FROM {$CONFIG->dbprefix}system_log \";\r\n\t$query.=\"WHERE event IN ('login') \";\r\n\t$query.=\"AND object_type='user' \";\r\n\t$query.=\"GROUP BY zoom,event\";\r\n\treturn get_data($query);\r\n}", "function WriteAuditTrailDummy($typ) {\n\t\t$table = 't_gaji_detail';\n\t\t$usr = CurrentUserName();\n\t\tew_WriteAuditTrail(\"log\", ew_StdCurrentDateTime(), ew_ScriptName(), $usr, $typ, $table, \"\", \"\", \"\", \"\");\n\t}", "function show_log()\n\t{\n\t\t$options = array();\n\t\tif($this->input->get_post(\"kTeach\")){\n\t\t\t$options[\"kTeach\"] = $this->input->get_post(\"kTeach\");\n\t\t}\n\n\t\tif($this->input->get_post(\"username\")){\n\t\t\t$options[\"username\"] = $this->input->get_post(\"username\");\n\t\t}\n\n\t\tif($this->input->get_post(\"action\")){\n\t\t\t$options[\"action\"] = $this->input->get_post(\"action\");\n\t\t}\n\n\t\tif($this->input->get_post(\"time_start\") && $this->input->get_post(\"time_end\")){\n\t\t\t$time_start = $this->input->get_post(\"time_start\");\n\t\t\t$time_end = $this->input->get_post(\"time_end\");\n\t\t\t$time_end .= \" 23:59:59\";// make the end time the end of the same day\n\t\t\t$options[\"date_range\"][\"time_start\"] = $time_start;\n\t\t\t$options[\"date_range\"][\"time_end\"] = $time_end;\n\t\t}\n\n\t\t$data[\"header\"] = array(\"username\",\"timestamp\",\"action\");\n\t\t$data[\"logs\"] = $this->auth_model->get_log($options);\n\t\t$data[\"options\"] = $options;\n\t\t$data[\"target\"] = \"admin/log\";\n\t\t$data[\"title\"] = \"User Log\";\n\t\t$this->load->view(\"page/index\",$data);\n\t}", "abstract public function getEventName();", "function recordAnalytics() {\n\t\t//Is your user agent any of my business? Not really, but don't worry about it.\n\t\texecuteQuery(\"\n\t\t\tINSERT INTO dwm2r_activitymonitor\n\t\t\t(IPAddress,UserAgent,Flags,Seed,CreatedDTS)\n\t\t\tVALUES (\n\t\t\t\t'\".$_SERVER['REMOTE_ADDR'].\"',\n\t\t\t\t'\".$_SERVER['HTTP_USER_AGENT'].\"',\n\t\t\t\t'\".trim($_REQUEST[\"Flags\"]).\"',\n\t\t\t\t'\".$this->modder->flags[\"Seed\"].\"',\n\t\t\t\tNOW()\n\t\t\t)\n\t\t\");\n\t}", "protected function log() {\n }", "function showEvents() {\r\n\r\n\t// Lets import some globals, shall we?\r\n\tglobal $MySelf;\r\n\tglobal $DB;\r\n\tglobal $TIMEMARK;\r\n\t$delta = $TIMEMARK -259200;\r\n\t\r\n\t// is the events module active?\r\n\tif (!getConfig(\"events\")) {\r\n\t\tmakeNotice(\"The admin has deactivated the events module.\", \"warning\", \"Module not active\");\r\n\t}\r\n\r\n\t// Load all events.\r\n\t$EVENTS_DS = $DB->query(\"SELECT * FROM events WHERE starttime >= '\" . $delta . \"' ORDER BY starttime ASC\");\r\n\r\n\t// .. right?\r\n\tif ($EVENTS_DS->numRows() >= 1) {\r\n\r\n\t\t// Lets keep in mind: We have events.\r\n\t\t$haveEvents = true;\r\n\r\n\t\twhile ($event = $EVENTS_DS->fetchRow()) {\r\n\r\n\t\t\t// get the date.\r\n\t\t\t$date = date(\"d.m.y\", $event[starttime]);\r\n\r\n\t\t\t// open up a new table for each day.\r\n\t\t\tif ($date != $previousdate) {\r\n\r\n\t\t\t\t$workday = date(\"l\", $event[starttime]);\r\n\r\n\t\t\t\tif ($beenhere) {\r\n\t\t\t\t\t$html .= $temp->flush();\r\n\t\t\t\t\t$html .= \"<br>\";\r\n\t\t\t\t}\r\n\r\n\t\t\t\t$beenhere = true;\r\n\r\n\t\t\t\t// We need an additional row if we are allowed to delete events.\r\n\t\t\t\tif ($MySelf->canDeleteEvents()) {\r\n\t\t\t\t\t$temp = new table(8, true);\r\n\t\t\t\t} else {\r\n\t\t\t\t\t$temp = new table(7, true);\r\n\t\t\t\t}\r\n\t\t\t\t$temp->addHeader(\">> Events for \" . $workday . \", the \" . $date);\r\n\t\t\t\t$previousdate = $date;\r\n\r\n\t\t\t\t$temp->addRow(\"#060622\");\r\n\t\t\t\t$temp->addCol(\"ID\");\r\n\t\t\t\t$temp->addCol(\"Starttime\");\r\n\t\t\t\t$temp->addCol(\"Starts in / Runs for\");\r\n\t\t\t\t$temp->addCol(\"Mission Type\");\r\n\t\t\t\t$temp->addCol(\"Short Description\");\r\n\t\t\t\t$temp->addCol(\"System\");\r\n\t\t\t\t$temp->addCol(\"Security\");\r\n\t\t\t\tif ($MySelf->canDeleteEvents()) {\r\n\t\t\t\t\t$temp->addCol(\"Delete\");\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t// Add Event to the current database.\r\n\t\t\t$temp->addRow();\r\n\t\t\t$temp->addCol(\"<a href=\\\"index.php?action=showevent&id=\" . $event[id] . \"\\\">\" . str_pad($event[id], 4, \"0\", STR_PAD_LEFT) . \"</a>\");\r\n\t\t\t$temp->addCol(date(\"d.m.y H:i\", $event[starttime]));\r\n\r\n\t\t\t$delta = $TIMEMARK - $event[starttime];\r\n\t\t\tif ($TIMEMARK > $event[starttime]) {\r\n\t\t\t\t// Event underway.\r\n\t\t\t\t$temp->addCol(\"<font color=\\\"#00ff00\\\">\" . numberToString($delta) . \"</font>\");\r\n\t\t\t} else {\r\n\t\t\t\t// Event not started yet.\r\n\t\t\t\t$delta = $delta * -1;\r\n\t\t\t\t$temp->addCol(\"<font color=\\\"#ffff00\\\">\" . numberToString($delta) . \"</font>\");\r\n\t\t\t}\r\n\r\n\t\t\t$temp->addCol($event[type]);\r\n\t\t\t$temp->addCol($event[sdesc]);\r\n\t\t\t$temp->addCol($event[system]);\r\n\t\t\t$temp->addCol($event[security]);\r\n\t\t\t\r\n\t\t\tif ($MySelf->canDeleteEvents()) {\r\n\t\t\t\t$temp->addCol(\"<a href=\\\"index.php?action=deleteevent&id=$event[id]\\\">delete event</a>\");\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\t// Lets recall, did we have events scheduled?\r\n\tif ($haveEvents) {\r\n\t\t// We do!\t\t\t\r\n\t\t$html = \"<h2>Scheduled Events</h2>\" . $html . $temp->flush();\r\n\t} else {\r\n\t\t// We dont!\t\t\t\r\n\t\t$html = \"<h2>Scheduled Events</h2><b>There are currently no scheduled events in the database.</b>\";\r\n\t}\r\n\t// Return what we got.\r\n\treturn ($html);\r\n\r\n}", "public function handleEvent() : void\n {\n $this->event = new LoginEvent($this->user,\n $this->dateTimeHandler->getDateObjectFromString($this->date),\n $this->dateTimeHandler->getDateObjectFromString($this->time));\n $this->persistEvent();\n }", "public function getEventType(): string;", "public function authEventLogs()\n {\n return $this->hasMany('App\\AuthEventLog');\n }", "public function addEvent( $event )\n\t{\n\t\t// database connection and sql query\n $core = Core::dbOpen();\n $sql = \"INSERT INTO user_log (userID, action, ip_address ) VALUES ( :userID, :event, :ip )\";\n $stmt = $core->dbh->prepare($sql);\n $stmt->bindParam(':userID', $this->userID);\n $stmt->bindParam(':event', $event);\n $stmt->bindParam(':ip', $_SERVER['REMOTE_ADDR']);\n Core::dbClose();\n\n\t\ttry\n {\n if( $stmt->execute()) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t} catch ( PDOException $e ) {\n echo \"Add history event failed!\";\n }\n\t\treturn false;\t\t\n\t}", "function track_logins($vars) {\n\tinsert_query(\"mod_tbllogins\", array(\"clientid\"=>$vars['userid'], \"ip\"=>$_SERVER['REMOTE_ADDR']));\n \n\t// Trim logins to 30 latest (couldn't get the SQL Helper to work on this DELETE query)\n\tmysql_query(\"DELETE FROM mod_tbllogins WHERE clientid = '\". $vars['userid'] .\"' AND date NOT IN (SELECT * FROM (SELECT date FROM mod_tbllogins WHERE clientid = '\". $vars['userid'] .\"' ORDER BY date DESC LIMIT 30) alias)\");\n}", "function showEvent() \n {\n if (isset($_SESSION['eventid']) AND isset($_SESSION['eventguest'])) {\n // event und gast informationen\n echo \"<div class=''>\";\n echo \"<div class='rightBody'>\";\n $this->askUserForZusage($_SESSION['eventid']);\n $this->askUserForCount($_SESSION['eventid']);\n $this->showSmallGuestList();\n echo \"</div>\";\n echo \"<div class='innerBody'>\";\n echo \"<ul class='finanzNAV'>\";\n $this->eventAdministration();\n echo \"</ul>\";\n $eventname = $this->getEventname($_SESSION['eventid']);\n echo \"<h1><a href='event.php'>\" .$eventname . \"</a></h1>\";\n echo \"<h2>Willkommen \" . $this->getGuestName($_SESSION['eventguest']) . \"</h2>\";\n $this->showWelcomeMessage($_SESSION['eventid']);\n $this->showCountdowns($_SESSION['eventid']);\n $this->showBlogMessages($_SESSION['eventid']);\n echo \"</div>\";\n echo \"</div>\";\n \n }\n }", "public function eventLog() {\n\t\treturn $this->_eventLog;\n\t}", "public function getLoggedCalls();", "public function getEventName() : String;", "public function getLogOn() {\n $conn = $this->getConnection();\n $getQuery = \"SELECT * from logon group by username\";\n $q = $conn->prepare($getQuery);\n $q->execute();\n return $q->fetchAll();\n }", "public static function __events () {\n \n }", "function countLoginsSince($eventcode,$since) {\n\t$db = DB::getInstance();\n\t$stmt = $db->query(\"SELECT * FROM audit WHERE audit_eventcode = ? AND audit_timestamp > ?\",[$eventcode,$since]);\n\t$num_returns = $stmt->count();\n\treturn $num_returns;\n\t}", "public function action_index()\r\n\t{\r\n\t\tif ( ! Auth::instance()->logged_in())\r\n\t\t\tNotices::info('event.enroll.login');\r\n\t\t\r\n\t\t$filter = Arr::get($this->request->query(), 'filter', 'current');\r\n\t\t$id = Arr::get($this->request->query(), 'id', FALSE);\r\n\t\t\t\r\n\t\tif ($filter == 'mine' AND ! Auth::instance()->logged_in())\r\n\t\t{\r\n\t\t\tSession::instance()->set('follow_login', $this->request->url());\r\n\t\t\t$this->request->redirect(Route::url('user', array('action' => 'login')));\r\n\t\t}\r\n\t\t\r\n\t\tif (Auth::instance()->logged_in() AND $this->user->characters->where('visibility', '=', 1)->count_all() == 0)\r\n\t\t{\r\n\t\t\tNotices::info('event.enroll.need_character');\r\n\t\t}\r\n\t\t\r\n\t\t// Pass events to the view class\r\n\t\t$this->view->event_data = Model_Event::filtered_list($filter, $this->user, $id);\r\n\t\t$this->view->filter_message = Kohana::message('gw', 'filter.'.$filter);\r\n\t\t$this->view->filter = $filter;\r\n\t}", "function logEventFromUrl($manage_state = false) {\n\t\t\n\t\t// keeps php executing even if the client closes the connection\n\t\tignore_user_abort(true);\n\t\t$service = owa_coreAPI::serviceSingleton();\n\t\t$service->request->decodeRequestParams();\n\t\t$event = owa_coreAPI::supportClassFactory('base', 'event');\n\t\t$event->setEventType(owa_coreAPI::getRequestParam('event_type'));\n\t\t$event->setProperties($service->request->getAllOwaParams());\n\t\t\n\t\t// check for third party cookie mode.\n\t\t$mode = owa_coreAPI::getRequestParam('thirdParty');\n\t\tif ( $mode ) {\n\t\t\treturn $this->trackEvent($event);\n\t\t} else {\n\t\t\treturn owa_coreAPI::logEvent($event->getEventType(), $event);\n\t\t}\n\t}", "private function getEventData( array $event ): array {\n return [\n 'token' => env( 'VERIFICATION_TOKEN' ),\n 'team_id' => 'T061EG9R6',\n 'api_app_id' => 'A0MDYCDME',\n 'event' => $event,\n 'type' => 'event_callback',\n 'event_id' => 'Ev0MDYHUEL',\n 'event_time' => 1515449483000108,\n 'authed_users' => [\n 0 => 'U0LAN0Z89',\n ],\n ];\n }", "function on_session_start($save_path, $session_name) {\n\terror_log($session_name);\n}", "public function it_stores_events_raised_by_our_jas_app() : void\n {\n $id = '8741e80e-153f-4254-b13e-21ac8ac34948';\n $this->json('POST', '/store-jas-events', [\n 'id' => $id,\n 'name' => 'GameStarted',\n 'date' => 1_503_301_742_819,\n 'payload' => [\n 'game_id' => 'hoi'\n ]\n ])->seeJson([\n 'created' => true\n ]);\n\n $this->seeInDatabase('jas_events', [\n 'uuid' => $id,\n 'name' => 'GameStarted',\n 'date' => 1_503_301_742_819,\n ]);\n }", "function eventNavigation() \n {\n echo \"<ul class='finanzNAV'>\";\n if (isset($_SESSION['username'])) {\n $this->eventAdministration();\n }\n if (isset($_SESSION['eventid']) AND isset($_SESSION['eventguest'])) {\n echo \"<li><a href='event.php'>\" .$this->getEventname($_SESSION['eventid']). \"</a></li>\";\n }\n if (isset($_SESSION['eventid'])) {\n echo \"<li><a href='index.php?eventchange'>Logout</a></li>\";\n }\n echo \"</ul>\";\n \n }", "public static function bootLogsModelEvents()\n {\n if (property_exists(self::class, 'logModelEvents')) {\n foreach (self::$logModelEvents as $eventName) {\n static::$eventName(function ($model) use ($eventName) {\n $description = $eventName;\n\n if ($eventName == 'updating' || $eventName == 'updated') {\n if ($dirty = $model->getDirty()) {\n $changed = [];\n foreach ($dirty as $key => $value) {\n if (!self::shouldHideKey($key)) {\n if (self::shouldSanitizeKey($key)) {\n $changed[] = \"'$key': ***\";\n } else {\n $changed[] = \"'$key': [\" . ($model->original[$key] ?? '-') . \"]→[$value]\";\n }\n }\n }\n\n if ($changed) {\n $description .= ':' . implode(', ', $changed);\n }\n }\n }\n\n $model->logModelEvent($description);\n });\n }\n }\n }", "private static function event()\n {\n $files = ['Event', 'EventListener'];\n $folder = static::$root.'Event'.'/';\n\n self::call($files, $folder);\n\n $files = ['ManyListenersArgumentsException'];\n $folder = static::$root.'Event/Exceptions'.'/';\n\n self::call($files, $folder);\n }", "public function All() {\n if($user = Utils::GetUser()) {\n $this->Context->Model = $user->Events;\n }\n else {\n Message::SetMessage('Please, login or sign up');\n Utils::Redirect('/Home/Index');\n }\n }", "public function __construct() {\n\t\t$view_event = ( isset( \\REALTY_BLOC_LOG::$option['view_event'] ) ? \\REALTY_BLOC_LOG::$option['view_event'] : array() );\n\n\t\t// Property Page view log\n\t\tif ( isset( $view_event['property'] ) and $view_event['property'] == \"on\" ) {\n\t\t\tadd_action( 'rb_page_view_property_log', array( $this, 'save_property' ), 10, 5 );\n\t\t}\n\n\t\t// building Page View log\n\t\tif ( isset( $view_event['building'] ) and $view_event['building'] == \"on\" ) {\n\t\t\tadd_action( 'rb_page_view_building_log', array( $this, 'save_building' ), 10, 5 );\n\t\t}\n\t}", "public function processlogEntries(Event $event)\n {\n $this->data = $this->debug->getData();\n $errorStats = $this->debug->errorStats();\n $errorStr = '';\n if ($errorStats['inConsole']) {\n $errorStr = 'Errors: ';\n foreach ($errorStats['counts'] as $category => $vals) {\n $errorStr .= $vals['inConsole'] . ' ' . $category . ', ';\n }\n $errorStr = \\substr($errorStr, 0, -2);\n }\n $str = '';\n $str .= '<script type=\"text/javascript\">' . \"\\n\";\n $str .= $this->processLogEntryViaEvent(new LogEntry(\n $this->debug,\n 'groupCollapsed',\n array(\n 'PHP',\n (isset($_SERVER['REQUEST_METHOD']) && isset($_SERVER['REQUEST_URI'])\n ? $_SERVER['REQUEST_METHOD'] . ' ' . $_SERVER['REQUEST_URI']\n : ''),\n $errorStr,\n )\n ));\n $str .= $this->processAlerts();\n $str .= $this->processSummary();\n $str .= $this->processLog();\n $str .= $this->processLogEntryViaEvent(new LogEntry(\n $this->debug,\n 'groupEnd'\n ));\n $str .= '</script>' . \"\\n\";\n $this->data = array();\n $event['return'] .= $str;\n }", "public function send_events()\n {\n }" ]
[ "0.6699186", "0.6519264", "0.6180423", "0.61367244", "0.59764683", "0.59579843", "0.584369", "0.57446384", "0.57295924", "0.57287294", "0.5700076", "0.5677092", "0.5671026", "0.56670004", "0.56525946", "0.5648428", "0.56471354", "0.5619397", "0.56163615", "0.55910885", "0.5583039", "0.55546296", "0.5551689", "0.554804", "0.55448645", "0.5517623", "0.55084276", "0.5507204", "0.55002", "0.54873204", "0.548135", "0.5479623", "0.5477346", "0.54772866", "0.54731864", "0.54674107", "0.54563683", "0.54526925", "0.54525656", "0.5451803", "0.5448193", "0.54459023", "0.54401207", "0.5410685", "0.53951806", "0.5384958", "0.5382657", "0.5377382", "0.53626794", "0.53531647", "0.5348208", "0.53433436", "0.534235", "0.5340709", "0.5336716", "0.5327827", "0.53223157", "0.5320348", "0.53120023", "0.5309946", "0.5302885", "0.5300256", "0.5288603", "0.52849", "0.5282891", "0.5282268", "0.5280417", "0.527497", "0.5259934", "0.52575564", "0.52531505", "0.5247778", "0.5245272", "0.5244361", "0.5240896", "0.5236939", "0.5232067", "0.52188456", "0.52187103", "0.52134115", "0.5210432", "0.52090645", "0.52061045", "0.52010953", "0.5188457", "0.518573", "0.5172746", "0.51702553", "0.5165143", "0.51626915", "0.5160035", "0.5152483", "0.5144675", "0.5143751", "0.5140886", "0.5137954", "0.5136904", "0.5131254", "0.5131227", "0.5130938", "0.5130788" ]
0.0
-1
Logs with an arbitrary level.
public function log($level, $message, array $context = []) { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function log($message, $level);", "public static function Log($type,$message,$level)\n \t{\n Log::Write($type,$message,$level);\n \t}", "public static function log($level, $message) {\n//\t\tif (self::config()->log) {\n//\t\t\t$messages = str_split($message, 500);\n//\t\t\tfor ($i = 0; $i < count($messages); $i++) {\n//\t\t\t\tsyslog($level, $messages[$i]);\n//\t\t\t}\n//\t\t}\n\t}", "public function setLogLevel($level)\r\n {\r\n $this->level = $level;\r\n }", "public static function writeLog($level,$message)\n {\n plexcel_log($level, $message);\n }", "protected static function _log($level, &$message)\n {\n if ($level < 0)\n return;\n\n if ($level <= static::$level) {\n $message = sprintf(\"[%s %s %s] %s: %s\",\n static::$name,\n date('c'),\n static::$reqid,\n static::level_to_string($level),\n $message\n );\n static::$messages[] = $message;\n if (static::$syslog) {\n syslog($level, $message);\n }\n if (!is_null(static::$fd)) {\n fwrite(static::$fd, $message . \"\\n\");\n }\n }\n }", "public function log(\n string $level,\n string $message,\n array $context = []\n ): void {\n if (in_array($level, $this->allowedLogs)) {\n parent::log($level, $message, $context);\n }\n }", "function _log($text,$level=10) {\n if($this->logger) call_user_func($this->logger, $text, $level);\n }", "function trace($level, $message) {\n global $logfile, $loglevel, $timezone;\n \n if ($loglevel < $level) return;\n \n if ($logfile == \"syslog\") {\n syslog($level, $message);\n } else {\n $now = new DateTime();\n $now->setTimezone(new DateTimeZone($timezone));\n $message = $now->format('Y-m-d H:i:s') . \" \" . $message;\n if ($logfile == \"stdout\")\n echo $message;\n else\n file_put_contents($logfile, $message, FILE_APPEND);\n }\n }", "public function log($level, $message, array $context = array())\n {\n if ($this->isPassMessage($level)) {\n $this->writeLine(\"[\" . date(\"Y-m-d H:i:s\") . \"] \\\"{$level}\\\" {$message}\\n\");\n }\n }", "abstract protected function doLog($level, $message, $params = null);", "public function log($level, $message, array $context = array())\n {\n echo 'Level: ' . $level . ' Message: ' . $message;\n }", "public function log($level, $message, array $context = array())\n {\n //var_dump('<div class=\"'.$level.'\">'.$message.'</div>') ;\n echo '<div class=\"'.$level.'\">'.$message.'</div>' ;\n }", "public function log($level, $message, array $context = []): void;", "public function setLevel($level);", "function setLevel($level);", "public function log($level, $message, array $context = array())\n {\n\n/* if(isset($levels[$level])){\n\n }*/\n\n /* if (array_key_exists($level,$levels)){\n\n }*/\n\n if (method_exists($this, $level)){\n return call_user_func(array($this, $level),$message,$context);\n\n }else {\n throw new \\InvalidArgumentException(\"Incorrect argument value level $level\" );\n }\n\n }", "public static function log($level = 'error', $message, $php_error = FALSE)\n\t{ \n if(self::$_log)\n {\n if(self::$_log->_enabled)\n {\n self::$_log->write_log($level, $message, $php_error);\n }\n }\n\t}", "public function setLogLevel($level)\n {\n if (in_array($level, array(self::DEBUG, self::INFO, self::NOTICE, self::WARNING, self::ERROR))) {\n $this->logLevel = $level;\n }\n }", "abstract protected function realLog($level, $message, array $context = []);", "public function log($level, $message, array $context = array()) {\n\n\t\tif (!$this->is_enabled()) return false;\n\n\t\t$message = date(\"Y-m-d H:i:s\").' ['.Updraft_Log_Levels::to_text($level).'] : '.$this->interpolate($message, $context);\n\t\t$this->add_log($message);\n\t}", "public function log($message, $level = self::DEBUG)\n\t{\n\t\tif ($level >= $this->level)\n\t\t\t$this->logMessage($message, $level);\n\t}", "function setLevel($level) {\n\t\tif (is_string($level)) {\n\t\t\tswitch (strtolower($level)) {\n\t\t\t\tcase \"debug\":\n\t\t\t\t\t$level = MC_LOGGER_DEBUG;\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase \"info\":\n\t\t\t\t\t$level = MC_LOGGER_INFO;\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase \"warn\":\n\t\t\t\tcase \"warning\":\n\t\t\t\t\t$level = MC_LOGGER_WARN;\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase \"error\":\n\t\t\t\t\t$level = MC_LOGGER_ERROR;\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase \"fatal\":\n\t\t\t\t\t$level = MC_LOGGER_FATAL;\n\t\t\t\t\tbreak;\n\n\t\t\t\tdefault:\n\t\t\t\t\t$level = MC_LOGGER_FATAL;\n\t\t\t}\n\t\t}\n\n\t\t$this->_level = $level;\n\t}", "public function set_level($level = \"INFO\") {\n if(Validator::isa($level,\"string\") \n && ($k=array_search($level,$this->order))!==false) \n $this->level = $this->order[$k];\n else \n $this->level = \"INFO\";\n }", "protected function log( $msg, $level = 0 ) {\n\t\t\tif ( !$this->get_option( 'log' ) )\n\t\t\t\treturn;\n\t\t\t$msg = date( 'H:i:s' ) . \": $msg\";\n\t\t\t$msg .= \"\\n\";\n\t\t\t$log = $this->plugin_dir . '/log.txt';\n\t\t\t$fh = fopen( $log, 'a' );\n\t\t\tif ( !$fh ) {\n\t\t\t\ttrigger_error( sprintf(\n\t\t\t\t\t__( \"Logfile %s is not writable..\", 'better-related' ),\n\t\t\t\t\t$log\n\t\t\t\t) );\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif ( !$this->get_option( 'log' ) )\n\t\t\t\treturn;\n\t\t\t$loglevel = $this->get_option( 'loglevel' );\n\t\t\tif ( $loglevel != 'all' && $loglevel != $level && $level != 'global' )\n\t\t\t\treturn;\n\t\t\tfwrite( $fh, $msg );\n\t\t\tfclose( $fh );\n\t\t}", "protected function log($level, $message)\n {\n if ($this->logger) {\n $this->logger->log($level, $message);\n }\n }", "public function setLogLevel($level)\n {\n if (!is_int($level))\n {\n $level = constant('sfLogger::'.strtoupper($level));\n }\n\n $this->level = $level;\n }", "private function log($level, $message)\n {\n //echo $message.\"\\n\"; //enable for debugging reasons. Tail the log with log-level=info otherwise\n\n $this->logger->log($level, $message, ['extra' => [\n 'service' => 'documents-service',\n ]]);\n }", "protected function log(string $level, $message): void\n {\n if (!is_string($message)) {\n $message = print_r($message, true);\n }\n\n $text = '[' . date($this->timeFormat, time()) . '][' . strtoupper($level) .\n '] - [' . request()->ip() . '] --> ' . $message . PHP_EOL;\n\n $this->save($text);\n }", "function trace_log()\n {\n $messages = func_get_args();\n\n foreach ($messages as $message) {\n $level = 'info';\n\n if ($message instanceof Exception) {\n $level = 'error';\n }\n elseif (is_array($message) || is_object($message)) {\n $message = print_r($message, true);\n }\n\n Log::$level($message);\n }\n }", "public function log($level, string $message, array $context = []) : void\n {\n if (is_numeric($level)) {\n $level = isset($this->logLevel[$level]) ? $this->logLevel[$level] : $this->defaultLevel;\n } elseif (!in_array($level, $this->logLevel)) {\n $level = $this->defaultLevel;\n }\n\n $this->adapter->log($level, $message, $context);\n }", "public function log($level, $message, array $context = array())\n {\n if (get_option('pusher_logging_enabled') != 1) {\n // Do nothing\n return;\n }\n\n $reflection = new \\ReflectionClass('Pusher\\Log\\LogLevel');\n $levels = $reflection->getConstants();\n\n if ( ! in_array($level, $levels, true)) {\n // Log level not allowed.\n\n return;\n }\n\n $date = date('Y-m-d H:i:s');\n $level = strtoupper($level);\n $message = $this->interpolate($message, $context);\n $entry = \"[{$date}] {$level}: $message\\n\";\n\n file_put_contents($this->file, $entry, FILE_APPEND);\n }", "protected function update_logging_level( $level ) {\n\t\t$this->log_manager()->set_level( $level );\n\t}", "protected function log($level, $message, $context = [])\n {\n if ($this->logger != null) {\n $this->logger->$level($message, $context);\n }\n }", "protected function write($level, $message, array $context = array() )\n {\n error_log($message);\n }", "public function log($level, $message, array $context = array())\n {\n Log::write($level, $message, $context);\n }", "protected static function Log($message, $level = NULL) {\n Logger::log(Logger::$SOAP_XML_LOG, $message, $level);\n Logger::log(Logger::$REQUEST_INFO_LOG, $message, $level);\n }", "public function log($level, $message, $context = array()){\n if($this->logger !== null){\n $this->logger->log($level, $message, $context);\n }\n }", "public function testCustomLevelWrites() {\n\t\t$this->_deleteLogs();\n\t\t$this->_resetLogConfig();\n\n\t\tCakeLog::levels(array('spam', 'eggs'));\n\n\t\t$testMessage = 'error message';\n\t\tCakeLog::write('error', $testMessage);\n\t\tCakeLog::defaultLevels();\n\t\t$this->assertTrue(file_exists(LOGS . 'error.log'));\n\t\t$contents = file_get_contents(LOGS . 'error.log');\n\t\t$this->assertContains('Error: ' . $testMessage, $contents);\n\n\t\tCakeLog::config('spam', array(\n\t\t\t'engine' => 'File',\n\t\t\t'file' => 'spam.log',\n\t\t\t'types' => 'spam',\n\t\t\t));\n\t\tCakeLog::config('eggs', array(\n\t\t\t'engine' => 'File',\n\t\t\t'file' => 'eggs.log',\n\t\t\t'types' => array('spam', 'eggs'),\n\t\t\t));\n\n\t\t$testMessage = 'spam message';\n\t\tCakeLog::write('spam', $testMessage);\n\t\tCakeLog::defaultLevels();\n\t\t$this->assertTrue(file_exists(LOGS . 'spam.log'));\n\t\t$this->assertTrue(file_exists(LOGS . 'eggs.log'));\n\t\t$contents = file_get_contents(LOGS . 'spam.log');\n\t\t$this->assertContains('Spam: ' . $testMessage, $contents);\n\n\t\t$testMessage = 'egg message';\n\t\tCakeLog::write('eggs', $testMessage);\n\t\tCakeLog::defaultLevels();\n\t\t$contents = file_get_contents(LOGS . 'spam.log');\n\t\t$this->assertNotContains('Eggs: ' . $testMessage, $contents);\n\t\t$contents = file_get_contents(LOGS . 'eggs.log');\n\t\t$this->assertContains('Eggs: ' . $testMessage, $contents);\n\n\t\tCakeLog::drop('spam');\n\t\tCakeLog::drop('eggs');\n\n\t\t$this->_deleteLogs();\n\t}", "private function log($message, $level = Loggable::LEVEL_INFO)\n {\n if (isset($this->logger)) {\n $this->logger->write($message, $level);\n }\n }", "public function log($level, $message, array $context = array())\n {\n $this->FileLog->appendContent(\"$level | \" . trim(strtr($message, $context)));\n }", "function logInfo($level, $message) {\n\tlogMessage(\"INFO\", \"This is an info message.\") . PHP_EOL;\n}", "function wlog($value,$level=4)\n{\n $currentLevel=4;\n if ($currentLevel>=$level){\n file_put_contents(\"all.log\",\"\\n\",FILE_APPEND);\n\t\tfile_put_contents('all.log',$value,FILE_APPEND);\n\t}\n}", "public function testSelectiveLoggingByLevel() {\n\t\tif (file_exists(LOGS . 'spam.log')) {\n\t\t\tunlink(LOGS . 'spam.log');\n\t\t}\n\t\tif (file_exists(LOGS . 'eggs.log')) {\n\t\t\tunlink(LOGS . 'eggs.log');\n\t\t}\n\t\tCakeLog::config('spam', array(\n\t\t\t'engine' => 'File',\n\t\t\t'types' => 'debug',\n\t\t\t'file' => 'spam',\n\t\t));\n\t\tCakeLog::config('eggs', array(\n\t\t\t'engine' => 'File',\n\t\t\t'types' => array('eggs', 'debug', 'error', 'warning'),\n\t\t\t'file' => 'eggs',\n\t\t));\n\n\t\t$testMessage = 'selective logging';\n\t\tCakeLog::write(LOG_WARNING, $testMessage);\n\n\t\t$this->assertTrue(file_exists(LOGS . 'eggs.log'));\n\t\t$this->assertFalse(file_exists(LOGS . 'spam.log'));\n\n\t\tCakeLog::write(LOG_DEBUG, $testMessage);\n\t\t$this->assertTrue(file_exists(LOGS . 'spam.log'));\n\n\t\t$contents = file_get_contents(LOGS . 'spam.log');\n\t\t$this->assertContains('Debug: ' . $testMessage, $contents);\n\t\t$contents = file_get_contents(LOGS . 'eggs.log');\n\t\t$this->assertContains('Debug: ' . $testMessage, $contents);\n\n\t\tif (file_exists(LOGS . 'spam.log')) {\n\t\t\tunlink(LOGS . 'spam.log');\n\t\t}\n\t\tif (file_exists(LOGS . 'eggs.log')) {\n\t\t\tunlink(LOGS . 'eggs.log');\n\t\t}\n\t}", "public function log($level, $message, array $context = [])\n\t{\n\t\t$requestId = $context['requestId'] ?? 0;\n\t\t$clientMethod = $context['clientMethod'] ?? 'method';\n\t\t$event = $context['event'] ?? 'event';\n\t\t$data = $context['data'] ?? [];\n\n\t\t$logFilePath = $this->logsDir . '/' . $requestId . '.html';\n\n\t\t$message = sprintf(\"<h3 style='color:red'><span style='color:green;'>%s</span> %s</h3><pre>\\n%s</pre>\\n<hr>\",\n\t\t\t$clientMethod,\n\t\t\t$event,\n\t\t\tjson_encode($data, JSON_PRETTY_PRINT)\n\t\t);\n\n\t\tfile_put_contents($logFilePath, $message, FILE_APPEND);\n\t}", "public function log($level, $message, array $context = array()) {\n\t\t$this->lastLevel = $level;\n\t\t$this->lastLine = $message;\n\t\t$this->lastContext = $context;\n\t}", "public function log($level, $message, array $context = []): void\n {\n $logMessage = $this->formatMessage($level, $message, $context);\n\n $this->writeLog($logMessage);\n }", "static function log($message, $level = 0){\n print($message);\n //$messages = $_REQUEST[MESSAGES];\n if(key_exists(MESSAGES, $_REQUEST) && is_array($var)){\n $tmp = $var[$level][] = $message;\n }else{\n $tmp = array($level => array($message));\n }\n $_REQUEST[MESSAGES] = $tmp;\n }", "function elgg_log($message, $level='NOTICE') {\n\tglobal $CONFIG;\n\n\t// only log when debugging is enabled\n\tif (isset($CONFIG->debug)) {\n\t\t// debug to screen or log?\n\t\t$to_screen = !($CONFIG->debug == 'NOTICE');\n\n\t\tswitch ($level) {\n\t\t\tcase 'ERROR':\n\t\t\t\t// always report\n\t\t\t\telgg_dump(\"$level: $message\", $to_screen, $level);\n\t\t\t\tbreak;\n\t\t\tcase 'WARNING':\n\t\t\tcase 'DEBUG':\n\t\t\t\t// report except if user wants only errors\n\t\t\t\tif ($CONFIG->debug != 'ERROR') {\n\t\t\t\t\telgg_dump(\"$level: $message\", $to_screen, $level);\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase 'NOTICE':\n\t\t\tdefault:\n\t\t\t\t// only report when lowest level is desired\n\t\t\t\tif ($CONFIG->debug == 'NOTICE') {\n\t\t\t\t\telgg_dump(\"$level: $message\", FALSE, $level);\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t}\n\n\t\treturn TRUE;\n\t}\n\n\treturn FALSE;\n}", "function write($msg, $lvl=1){\n global $DB, $CONFIG, $USER;\n if((int)@$CONFIG->Logging->Filter_level > $lvl) return;\n \n $CONFIG->Logging->setType('Type', 'select', array('none' => 'None', 'db' => 'DB', 'file' => 'File'));\n $src='?';\n if(isset($this)) $src = get_class($this).'('.$this->ID.')';\n switch(strtolower(@$CONFIG->Logging->Type)){\n case 'db':\n $DB->log->insert(array('remote_addr' => $_SERVER['REMOTE_ADDR'],'user' => $USER->ID, 'level' => $lvl, 'source' => $src, '#!time' => 'NOW()','message' => $msg));\n break;\n case 'file':\n $r=fopen(PRIV_PATH.'/log', 'ab');\n fwrite($r, join(\"\\t\", array(date(\"Y-m-d H:i:s\"),$src,$lvl,$_SERVER['REMOTE_ADDR'],$USER->ID,str_replace(\"\\t\", '', $msg))));\n fclose($r);\n break;\n }\n }", "public function log(string $message, string $level = self::INFO): void\n {\n $log = sprintf(\"[%s] [%s] %s\\n\", date('Y-m-d H:i:s'),$level, $message);\n file_put_contents($this->logFile, $log, FILE_APPEND);\n\n if ($this->printLog) {\n echo $log;\n }\n }", "public function log(string $level, string $message, array $context = []): void\n\t{\n\t\tif (! $this->validLevel($level)) {\n\t\t\tthrow new InvalidArgumentException(sprintf('Invalid log level: \"%s\"', $level));\n\t\t} elseif ($this->allowsLevel($level)) {\n\t\t\tif ($stm = $this->_prepare(\"INSERT INTO `{$this->getTable()}` (\n\t\t\t\t`{$this->getColumn('uuid')}`,\n\t\t\t\t`{$this->getColumn('level')}`,\n\t\t\t\t`{$this->getColumn('message')}`,\n\t\t\t\t`{$this->getColumn('datetime')}`\n\t\t\t) VALUES (\n\t\t\t\t:uuid,\n\t\t\t\t:level,\n\t\t\t\t:message,\n\t\t\t\t:datetime\n\t\t\t);\", 'log')) {\n\t\t\t\t$stm->execute([\n\t\t\t\t\t'uuid' => new UUID(),\n\t\t\t\t\t'level' => $level,\n\t\t\t\t\t'message' => substr($this->interpolate($message, $context), 0, $this->getMessageLength()),\n\t\t\t\t\t'datetime' => date('Y-m-d H:i:s'),\n\t\t\t\t]);\n\t\t\t}\n\t\t}\n\t}", "public function log($level, $message, array $context = array())\n\t{\n\t\t$this->logs[] = compact('level', 'message', 'context');\n\t}", "public function setLevel($level) {\n $this->level = $level;\n }", "protected function log($level, $message, array $context = array())\n {\n if (isset($this->logger) === true) {\n $this->logger->log($level, $message, $context);\n }\n }", "function setLogLevel($value)\n {\n $this->_props['LogLevel'] = $value;\n }", "public function log($level, $message, array $context = array())\n {\n if (is_string($level) && defined(__CLASS__ . '::' . strtoupper($level))) {\n $level = constant(__CLASS__ . '::' . strtoupper($level));\n }\n\n $this->addRecord($level, $message, $context);\n }", "public function log($message, $level = null)\n {\n if (empty($this->_filename)) {\n Mage::log(\n 'The Paymentsense log is not initialised. The Magento system log (this log) will be used instead.',\n Zend_Log::ERR,\n '',\n true\n );\n $message = 'Paymentsense: ' . $message;\n }\n\n Mage::log($message, $level, $this->_filename, true);\n }", "public function log($level, $message, array $context = []) {\n\t\t$minLevel = Util::INFO;\n\t\t$verbosity = $this->output->getVerbosity();\n\t\tif ($verbosity === OutputInterface::VERBOSITY_DEBUG) {\n\t\t\t$minLevel = Util::DEBUG;\n\t\t}\n\t\tif ($verbosity === OutputInterface::VERBOSITY_QUIET) {\n\t\t\t$minLevel = Util::ERROR;\n\t\t}\n\t\tif ($level < $minLevel) {\n\t\t\treturn;\n\t\t}\n\n\t\t// interpolate $message as defined in PSR-3\n\t\t$replace = [];\n\t\tforeach ($context as $key => $val) {\n\t\t\t$replace['{' . $key . '}'] = $val;\n\t\t}\n\n\t\t// interpolate replacement values into the message and return\n\t\t$message = \\strtr($message, $replace);\n\t\t$style = ($level > 2) ?'error' : 'info';\n\n\t\t$this->output->writeln(\"<$style>$message</$style>\");\n\t}", "protected function log($message, $level='INFO') {\n $message = '['.$level.'] '.$message; \n if ($level === 'ERROR') {\n throw new Exception($message);\n } \n echo $message.PHP_EOL;\n }", "public function log($level, $message, array $context = []) {\n $level = self::ensureLevelIsvalidInt($level);\n if ($level >= $this->reportingLevel) {\n $this->realLog($level, $message, $context);\n }\n return NULL;\n }", "public function log($level, $message, array $context = array())\n {\n if (!$this->activated) {\n return;\n }\n\n $this->errors[] = $message;\n }", "public function log($level, $message, array $context = array())\n {\n switch ($level) {\n case LogLevel::EMERGENCY:\n $this->emergency($message, $context);\n break;\n case LogLevel::ALERT:\n $this->alert($message, $context);\n break;\n case LogLevel::CRITICAL:\n $this->critical($message, $context);\n break;\n case LogLevel::ERROR:\n $this->error($message, $context);\n break;\n case LogLevel::WARNING:\n $this->warning($message, $context);\n break;\n case LogLevel::NOTICE:\n $this->notice($message, $context);\n break;\n case LogLevel::INFO:\n $this->info($message, $context);\n break;\n case LogLevel::DEBUG:\n $this->debug($message, $context);\n break;\n default:\n throw new InvalidArgumentException();\n break;\n }\n }", "public function log($level, $toLog, $extra = [], $isUncaught = false)\n {\n Rollbar::log($level, $toLog, $extra, $isUncaught);\n }", "public function log($level, $message, array $context = []): void\n {\n $this->getDefaultLogger()->log($level, $message, $context);\n }", "public function log($level, $message, array $context = [])\n {\n $this->out($message, $context);\n }", "public function log($level,$msg){\n\n\t\tswitch ($level) {\n\n\t\t case self::$INFO:\tif(!strcmp($this->_log_level,self::$DEBUG)||!strcmp($this->_log_level,self::$WARN)||\n\t\t \t\t\t\t\t\t!strcmp($this->_log_level,self::$ERROR)){\n\t\t \t\t\t\t\t\tbreak;\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->printMessage($level,$msg);\n\t\t \t\t\t\t\tbreak;\n\t\t \t\t\t\t\t}\n\t\t \t\t\t\t\t\t\t\n\t\t\t \n\t\t case self::$DEBUG:\tif(!strcmp($this->_log_level,self::$WARN)||\n\t\t \t\t\t\t\t\t!strcmp($this->_log_level,self::$ERROR)){\n\t\t \t\t\t\t\t\tbreak;\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->printMessage($level,$msg);\n\t\t \t\t\t\t\tbreak;\n\t\t \t\t\t\t\t}\t\t \n\t\t case self::$WARN:\tif(!strcmp($this->_log_level,self::$ERROR)){\n\t\t \t\t\t\t\t\tbreak;\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->printMessage($level,$msg);\n\t\t \t\t\t\t\tbreak;\n\t\t \t\t\t\t\t}\t\t \n\t\t case self::$ERROR:\n\t\t \t\t\t\t\t$this->printMessage($level,$msg);\n\t\t \t\t\t\tbreak;\n\t\t}\n\n\t}", "public static function log(string $message, string $level = 'notice') {\n $log_data = [\n 'message' => $message,\n 'level' => $level,\n ];\n \n self::write($log_data);\n }", "public function log( $level, $message, array $context = array() ) {\n\t\t// Call static log method\n\t\treturn static::logMessage( $level, $message, $context );\n\t}", "public function log($level, $message, array $context = []): void\n {\n if (Drush::debug()) {\n $timer = round(microtime(true) - DRUSH_REQUEST_TIME, 2);\n $suffix = sprintf(' [%s sec, %s]', $timer, self::formatSize(memory_get_usage()));\n $message .= $suffix;\n }\n\n // consolidation/log handles formatting and verbosity level check.\n parent::log($level, $message, $context);\n }", "function elog()\n{\n $params = func_get_args();\n\n $elevel = array_shift($params); /* 1st argument */\n $format = array_shift($params); /* 2nd argument */\n\n $message = vsprintf($format, $params);\n\n /* Output a message */\n switch ($elevel) {\n case LOG:\n fprintf(STDOUT, $message);\n break;\n case WARNING:\n fprintf(STDERR, \"[WARNING] \" . $message . \"\\n\");\n break;\n case ERROR:\n fprintf(STDERR, \"[ERROR] \" . $message . \"\\n\");\n exit(1);\n }\n}", "function wlog($msg,$typ='INF',$level=1)\n{\n global $log;\n\n if ($level==0)\n {\n return; //no logging\n }\n else {\n $log->log($msg,$typ );\n }\n\n}", "public function log($level, $message, array $context = array()): void\n {\n $this->logs[] = [\n 'level' => $level,\n 'message' => $message,\n 'context' => $context,\n ];\n }", "public function log($level, $message, array $context = [])\n {\n $this->writeLog($level, $message, $context);\n }", "protected function log($message, $level)\n {\n Yii::log($message, $level, 'crisu83.sentry.components.SentryClient');\n }", "public function log($level, $message, array $context = []): void\n {\n $this->validateLogLevel($level);\n\n $dateTime = new \\DateTime();\n $id = $dateTime->format('Ymd.His.u');\n\n $contextInfo = null;\n if ($context) {\n $contextAsString = \\WebServCo\\Framework\\Helpers\\StringHelper::getContextAsString($context);\n \\file_put_contents(\\sprintf('%s/%s.%s.context', $this->logDir, $this->channel, $id), $contextAsString);\n $contextInfo = '[context saved] ';\n }\n\n $data = \\sprintf(\n '[%s] %s %s %s%s%s',\n $id,\n \\WebServCo\\Framework\\Helpers\\RequestHelper::getRemoteAddress(),\n $level,\n $contextInfo,\n $message,\n \\PHP_EOL,\n );\n\n \\file_put_contents($this->logPath, $data, \\FILE_APPEND);\n }", "protected function log($message, $level = 'info') {\n if (is_array($message)) $message = print_r($message, true);\n $this->client->getContainer()->get(\"logger\")->log($level, '[ApiTest] ' . $message);\n }", "public function log($level, $message, array $context = array())\n {\n $this->logger->log($level, $message, $context);\n }", "public function log($level, $message, array $context = array())\n {\n $this->logger->log($level, $message, $context);\n }", "public function log($msg, $lvl = null)\n\t{\n\t\treturn $this->_log($msg, $lvl);\n\t}", "protected function writeLog($level, $message, $context)\n {\n $this->monolog->{$level}($message, $context);\n }", "public function log($message, $extra = array(), $level = 'info')\n {\n switch (strtolower($level)) {\n case 'debug':\n $this->debug($message, $extra);\n break;\n\n case 'info':\n default:\n $this->info($message, $extra);\n break;\n }\n }", "public function log($level, $message, array $context = array()): void\n {\n if (\\in_array($level, $this->environment->getLogLevel(), true)) {\n foreach ($this->loggers as $logger) {\n if (!\\is_string($message)) {\n $message = $this->serializer->normalize($message);\n }\n $logger->log($level, $message, $context);\n }\n }\n }", "public static function log($type, $message)\n {\n if (self::$log_levels[$type] <= self::$configuration['core']['log_threshold']) {\n $message = array(date('Y-m-d H:i:s P'), $type, $message);\n\n // Run the system.log event\n Event::run('system.log', $message);\n\n self::$log[] = $message;\n }\n }", "static public function writeLog($level, $msg, $logger) {\r\n if ($logger == null) {\r\n printf(\"[Level: %d][Time: %s][IP: %s][Message: %s]\",\r\n $level, date('d-m-Y H:i:s', time()), $_SERVER['REMOTE_ADDR'], $message);\r\n \r\n// if ($level == LoggingImpl::LEVEL_ERROR) {\r\n// die;\r\n// }\r\n } \r\n \r\n $logger->logEntry($level, $msg); \r\n\r\n if ($level == LoggingImpl::LEVEL_ERROR) {\r\n die;\r\n }\r\n }", "public function log($level, $message, array $context = array())\n {\n // TODO: Implement log() method.\n self::writeToLogFile( '['.strtoupper($level).'] - ' . $_SERVER['REMOTE_ADDR'] . ' ' . self::interpolate($message, $context));\n\n }", "public function SetLevel($level)\n {\n $this->level = $level;\n }", "public function setVerbosity($level)\n {\n }", "public function mlog($message, $log_level, $format = 'TXT')\n {\n HorusCommon::logger($message,$log_level,$format,$this->colour,$this->business_id,$this->log_location);\n\n }", "public function log($level, $message, array $context = array()) {\n // add color to all injected variables\n $message = preg_replace_callback('/{([\\w\\d_\\.]+)}/is', function($matches) {\n $var = $matches[1];\n return '<info>{'. $var .'}</info>';\n }, $message);\n\n $message = StringUtils::interpolate($message, $context);\n\n $alert = '';\n switch($level) {\n case LogLevel::ALERT:\n case LogLevel::CRITICAL:\n case LogLevel::EMERGENCY:\n case LogLevel::ERROR:\n $alert = '<error> '. $level .' </error> ';\n break;\n\n case LogLevel::NOTICE:\n case LogLevel::WARNING:\n $alert = '<fg=yellow;options=bold>'. $level .'</fg=yellow;options=bold> ';\n break;\n }\n\n $this->output->writeln($alert . $message .' [@mem: '. StringUtils::bytesToString(Timer::getCurrentMemory()) .']');\n }", "public function log($msg){\n\t\tif($this->debugLevel >= self::LOG_INFO){\n\t\t\t$this->_log($msg, self::LOG_INFO);\n\t\t}\n\t}", "public function log($level, $message, array $context = [])\n {\n error_log($message . PHP_EOL . var_export($context, true));\n }", "public function log($level, $message, array $context = array())\n {\n if ($this->getLogLevelPriority() >= $this->getPriority($level)) {\n $logRecord = new LogRecord($level, $message, $context);\n $this->processRecord($logRecord);\n }\n }", "public function log($level = '', string $message = '', array $context = [])\n {\n if (!App::environment('production')) {\n if (method_exists($this->customLogger, $level)) {\n call_user_func_array([$this->customLogger, $level], [$message, $context]);\n } else {\n $this->customLogger->debug($message, $context);\n }\n }\n }", "public function setVerbosity(int $level);", "public function log($level, $message, array $context = [])\n {\n $record = new LogRecord($level, $message);\n\n // add all messages to session log\n $this->session->addRecord($record);\n\n // write record into log only if it is enough by level\n if ($this->logLevel >= $level) {\n $this->write($record);\n }\n }", "public function log($level, $message, array $context = array()) {\n\t\ttry {\n\t\t\tif($this->options['log_on_shutdown']) {\n\t\t\t\t$this->stack[] = [$level, $message, $context];\n\t\t\t} else {\n\t\t\t\t$this->writeToApi($level, $message, $context);\n\t\t\t}\n\t\t} catch(\\Exception $e) {\n\t\t}\n\t}", "public function log($level, $message, array $context = array())\n {\n if (!\\AgaviConfig::get('core.use_logging', true))\n {\n return;\n }\n\n $logger_message = $level;\n\n // construct an \\AgaviLoggerMessage instance from PSR-3 parameters\n if (!$logger_message instanceof \\AgaviLoggerMessage)\n {\n $agavi_context = \\AgaviContext::getInstance();\n\n /* @var $logger_manager Pulq\\Agavi\\Logging\\LoggerManager */\n $logger_manager = $agavi_context->getLoggerManager();\n\n $message = self::replacePlaceholders($message, $context);\n\n $level = Logger::getAgaviLogLevel($level);\n\n $class_name = $logger_manager->getDefaultMessageClass();\n\n /* @var $logger_message \\AgaviLoggerMessage */\n $logger_message = new $class_name();\n $logger_message->setLevel($level);\n $logger_message->setMessage($message);\n $logger_message->setParameter('psr3.context', $context);\n $logger_message->setParameter('scope', isset($context['scope']) ? $context['scope'] : LoggerManager::DEFAULT_MESSAGE_SCOPE);\n }\n\n $this->logger->log($logger_message);\n }", "public function log($level, $message, array $context = array())\n {\n file_put_contents($this->filename, 'LOG: '. json_encode($context) . ' - ' . $message . \"\\r\\n\", FILE_APPEND);\n }", "function logMessage($level, $message)\n{\n // fwrite($file, \"[$level] $message\" . PHP_EOL);\n // fclose($file);\n\n $backtrace = debug_backtrace(DEBUG_BACKTRACE_PROVIDE_OBJECT, 2)[0];\n $file = fopen('app.log', \"a\");\n fwrite($file, \"[$level] \" . date(DATE_ISO8601) . \" \" . $backtrace[\"file\"] . \":\" . $backtrace[\"line\"] .\n \" $message\" . PHP_EOL);\n fclose($file);\n}" ]
[ "0.7634359", "0.70493335", "0.7039707", "0.69709635", "0.6908799", "0.69072807", "0.68412143", "0.68137556", "0.6795906", "0.67705894", "0.67402124", "0.67337424", "0.6708588", "0.67008233", "0.66913253", "0.668255", "0.66806895", "0.66795635", "0.6656168", "0.6654832", "0.66466415", "0.66350234", "0.6597328", "0.65888995", "0.6576977", "0.657169", "0.6566336", "0.6565647", "0.64809006", "0.64769846", "0.64598763", "0.6452528", "0.6421414", "0.6421231", "0.64169264", "0.6400521", "0.6391131", "0.63664156", "0.6360952", "0.634964", "0.63417333", "0.6333559", "0.6330094", "0.6329995", "0.6320893", "0.6312422", "0.6305871", "0.63039374", "0.62998927", "0.6294943", "0.62745744", "0.6274334", "0.627173", "0.62638146", "0.6257047", "0.6249365", "0.6241885", "0.6241185", "0.62288684", "0.6222088", "0.6221974", "0.6221625", "0.621961", "0.62182564", "0.6217454", "0.6197974", "0.6196662", "0.6196516", "0.6190872", "0.6176393", "0.6172731", "0.61671126", "0.61653537", "0.61646366", "0.6162242", "0.6160597", "0.61589026", "0.61527395", "0.61527395", "0.61449987", "0.6137803", "0.61372995", "0.61365986", "0.6130197", "0.6128373", "0.6127782", "0.61158353", "0.61084175", "0.61051023", "0.6104315", "0.6092956", "0.6079138", "0.60760564", "0.6074766", "0.60718983", "0.6069838", "0.60670644", "0.606486", "0.6051299", "0.60493344" ]
0.6448517
32
/ Load Room Data
function create_room_description($room_id) { $query = "SELECT * FROM rooms WHERE (id='$room_id')"; $result = mysql_query($query) or die(mysql_error()); while($row = mysql_fetch_array($result)) { $main_room_id = $row['id']; $main_room_characterid = $row['characterid']; $north = $row['north']; $south = $row['south']; $east = $row['east']; $west = $row['west']; $up = $row['up']; $down = $row['down']; $main_room_level = $row['level']; } /* Build Room Description */ /* Introductory Statement On Room */ $what = rand(1, 3); if ($what == 1) { $intro = "The air here is hot, and you can feel it in your lungs; whatever it is floating in the air, it is inside you. ";} if ($what == 2) { $intro = "You see your breath in the air before you even have a chance to shiver. You try rubbing the cold out of your arms, but it's already cut you to the bone. ";} if ($what == 3) { $intro = "This room is filled with a thick cloud of swirling sand, being pushed by a wind you can't find the source of. You have to put a cloth over your mouth to breathe, and squint at your surroundings through pinched fingers. ";} /* On The Floors */ $what = rand(0, 3); if ($what == 0) { $floor = "The ground under your feet feels moist and sticky. You think that falling down here would turn into a messy ordeal. ";} if ($what == 1) { $floor = "With every step you take, cockroaches crunch under your feet; countless others race away into the dark corners. ";} if ($what == 2) { $floor = "If you stand in place too long, the sand all over the floor begins to swallow your feet. If you keep moving, you should be fine. ";} if ($what == 3) { $floor = "The ground under your feet is slick with a clear substance. It glistens in what little light there is. It appears to be the trails of several giant snails, but how they came into, and slipped out of, the room isn't apparent to you.";} /* On The Walls */ $what = rand(0, 3); if ($what == 0) { $wall = "Adorning the walls of this room are enormous engravings, depicting the fallen heroes of civilizations long forgotten. ";} if ($what == 1) { $wall = "Hanging on one of the walls of this room is large painting of a horse. The horse is screaming. ";} if ($what == 2) { $wall = "The walls of this room are covered in a beautiful mosaic. The tiles of turquoise, amethyst, and quartz form an elaborate scene of a bustling market place in the city, which stands in sharp contrast to the desolation around you. When you look closer, however, you see that the wears on display in the market are actually desiccated pieces of dismembered corpses. ";} if ($what == 3) { $wall = "Before you, large blood red tapestries hang from the walls, adorned with a strange crest you've never seen before. ";} /* Over Your Head */ $what = rand(0, 3); if ($what == 0) { $head = "Suspended over your head by chains, the bodies of the long dead and forgotten sway, as if jostled by someone else who was here just before you. ";} if ($what == 1) { $head = "At first you think the ceiling is pulsating, but you realize that it is home to hundreds of bats. You decide it's best not to disturb them. ";} if ($what == 2) { $head = "From above you can hear the sound of something slowly chewing on something else, but the ceiling is too high and all you can see is darkness. Whatever it making that sound, you hope it's friendly, or at least totally distracted already. ";} if ($what == 3) { $head = "The sound of chains clinking together fills the chamber as you move through it, pushing away the variety of hooks hanging down from above. ";} /* Special Mythical Features */ $what = rand(0, 3); if ($what == 0) { $special = "Coming from a hole in the base of one of the walls, a small stream cuts its way through the center of this room. The pebbles at the bottom of the stream have been worn smooth by decades of tumbling water. ";} if ($what == 1) { $special = "Though you can't fathom why, a small crack in the ceiling exposes a little of what must be sunlight. You can feel the warmth of it on your face; taking a moment to enjoy it, you remember something you had forgotten long ago. ";} if ($what == 2) { $special = "You only saw it for a moment when you entered, but you swear there was a faery hovering in the middle of the room, only to vanish into a crack in the wall when it noticed you come in. ";} if ($what == 3) { $special = "A stream of water falls from a hole in the ceiling and into a hole in the floor. Both holes are too precise to be natural. Where is this water going? Where is it from? ";} /* Describe Exits */ $what = rand(0, 4); if ($what == 0) { $room_desc = mysql_real_escape_string($intro); } if ($what == 1) { $room_desc = mysql_real_escape_string($floor);} if ($what == 2) { $room_desc = mysql_real_escape_string($wall);} if ($what == 3) { $room_desc = mysql_real_escape_string($head);} if ($what == 4) { $room_desc = mysql_real_escape_string($special);} /* Write Room Description */ $query = "UPDATE rooms SET roomDesc='$room_desc' WHERE id='$room_id'"; mysql_query($query) or die(mysql_error()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "abstract public function loadData();", "public function loadData(){\r\n $this->host = Team::find($this->host);\r\n $this->guest = Team::find($this->guest);\r\n $this->winner = Team::find($this->winner);\r\n $this->tournament = Tournament::find($this->tournamentID); \r\n }", "function RoomstatRecordLoad( &$data ) {\n\t\t$table = BIT_DB_PREFIX.\"task_roomstat\";\n\t\t\n\t\t$pDataHash['data_store']['office'] = $data[0];\n\t\t$pDataHash['data_store']['terminal'] = $data[1];\n\t\t$pDataHash['data_store']['title'] = $data[2];\n\t\tif ( $data[3] == '[null]' )\n\t\t\t$pDataHash['data_store']['head'] = '';\n\t\telse\n\t\t\t$pDataHash['data_store']['head'] = $data[3];\n\t\tif ( $data[4] == '[null]' )\n\t\t\t$pDataHash['data_store']['announce'] = '';\n\t\telse\n\t\t\t$pDataHash['data_store']['announce'] = $data[4];\n\t\t$pDataHash['data_store']['ter_type'] = $data[5];\n\t\t$pDataHash['data_store']['led'] = $data[6];\n\t\tif ( $data[7] != '[null]' ) $pDataHash['data_store']['ledhead'] = $data[7];\n\t\tif ( $data[8] != '[null]' ) $pDataHash['data_store']['beacon'] = $data[8];\n\t\tif ( $data[9] != '[null]' ) $pDataHash['data_store']['camera'] = $data[9];\n\t\tif ( $data[10] != '[null]' ) $pDataHash['data_store']['serving'] = $data[10];\n\t\tif ( $data[11] != '[null]' ) $pDataHash['data_store']['act1'] = $data[11];\n\t\tif ( $data[12] != '[null]' ) $pDataHash['data_store']['fro_'] = $data[12];\n\t\tif ( $data[13] != '[null]' ) $pDataHash['data_store']['alarm'] = $data[13];\n\t\tif ( $data[14] != '[null]' ) $pDataHash['data_store']['curmode'] = $data[14];\n\t\tif ( $data[15] != '[null]' ) $pDataHash['data_store']['x1'] = $data[15];\n\t\tif ( $data[16] != '[null]' ) $pDataHash['data_store']['x2'] = $data[16];\n\t\tif ( $data[17] != '[null]' ) $pDataHash['data_store']['x3'] = $data[17];\n\t\tif ( $data[18] != '[null]' ) $pDataHash['data_store']['x4'] = $data[18];\n\t\tif ( $data[19] != '[null]' ) $pDataHash['data_store']['x5'] = $data[19];\n\t\tif ( $data[20] != '[null]' ) $pDataHash['data_store']['x6'] = $data[20];\n\t\tif ( $data[21] != '[null]' ) $pDataHash['data_store']['x7'] = $data[21];\n\t\tif ( $data[22] != '[null]' ) $pDataHash['data_store']['x8'] = $data[22];\n\t\tif ( $data[23] != '[null]' ) $pDataHash['data_store']['x9'] = $data[23];\n\t\tif ( $data[24] != '[null]' ) $pDataHash['data_store']['x10'] = $data[24];\n\t\tif ( $data[25] != '[null]' ) $pDataHash['data_store']['status'] = $data[25];\n\t\tif ( $data[26] != '[null]' ) $pDataHash['data_store']['logon'] = $data[26];\n\t\tif ( $data[27] != '[null]' ) $pDataHash['data_store']['ter_location'] = $data[27];\n\t\tif ( $data[28] != '[null]' ) $pDataHash['data_store']['ticketprint'] = $data[28];\n\t\tif ( $data[29] != '[null]' ) $pDataHash['data_store']['reportprint'] = $data[29];\n\t\tif ( $data[30] != '[null]' ) $pDataHash['data_store']['booking'] = $data[30];\n\t\tif ( $data[31] != '[null]' ) $pDataHash['data_store']['book'] = $data[31];\n\t\t$result = $this->mDb->associateInsert( $table, $pDataHash['data_store'] );\n\t}", "private function loadReadDataIntoMDR() {\r\n \r\n }", "private function _load_db()\n {\n $json_string = file_get_contents(\"dbtv.json\");\n $this->_db = json_decode($json_string, true);\n $this->_ep_list = $this->_flatten_episodes();\n }", "public function loadData()\n {\n $this->sendApiCall(self::ACTION_RETRIEVE, $this->getCreateUrl());\n }", "abstract protected function loadData(ObjectManager $em);", "function load(){\n $sql = 'SELECT * FROM worlds where id=?';\n $w = $this->app['db']->fetchAssoc($sql, array($this->id));\n if(!$w){ \n return false;\n }\n $this->name = $w['name'];\n $this->world = $w['world_json'];\n return true;\n }", "public function loadDataFromId(){\r\n\t\t\t$this -> loadFromId();\r\n\t }", "protected function loadData(){\n\t\t//SELECT from \".self::TABLE_NAME.\"_data WHERE \".self::TABLE_NAME.\"_id=\".$this->id.\"\n\t\t\n\t\t//return the data\n\t\treturn array();\n\t}", "public function _load()\n {\n $query = new Query(\n \"SELECT *\n FROM `\" . Leder::TABLE . \"`\n WHERE `arrangement_fra` = '#fra'\n AND `arrangement_til` = '#til'\",\n [\n 'fra' => $this->getArrangementFraId(),\n 'til' => $this->getArrangementTilId()\n ]\n );\n\n $res = $query->getResults();\n while( $row = Query::fetch($res) ) {\n $this->add(\n Leder::loadFromDatabaseRow( $row )\n );\n }\n }", "private function _load_db()\n {\n $json_string = file_get_contents(\"dbmov.json\");\n $this->_db = json_decode($json_string, true);\n }", "protected function loadData()\n\t{\n\t\t$delimiter = \"|||---|||---|||\";\n\t\t$command = 'show --pretty=format:\"%an'.$delimiter.'%ae'.$delimiter.'%cd'.$delimiter.'%s'.$delimiter.'%B'.$delimiter.'%N\" ' . $this->hash;\n\n\t\t$response = $this->repository->run($command);\n\n\t\t$parts = explode($delimiter,$response);\n\t\t$this->_authorName = array_shift($parts);\n\t\t$this->_authorEmail = array_shift($parts);\n\t\t$this->_time = array_shift($parts);\n\t\t$this->_subject = array_shift($parts);\n\t\t$this->_message = array_shift($parts);\n\t\t$this->_notes = array_shift($parts);\n\t}", "public function load($data);", "function load() {\n\t\tglobal $mysql;\n //if(!$this->exists()) return;\n \t$id \t\t= $mysql->escape($this->id);\n \t$tablename \t= $this->class_name();\n \t$this->data = $mysql->executeSql(\"SELECT * FROM \".$tablename.\" WHERE id=$id;\");\n \t$this->id\t= $this->data['id'];\n \tunset($this->data['id']);\n }", "public function load()\n {\n $pdo = $this->getDbConnection();\n $query = \"SELECT * FROM {$this->dbTable}\";\n $data = $pdo->query($query)->fetchAll(\\PDO::FETCH_ASSOC);\n\n foreach ($data as ['key' => $key, 'value' => $value]) {\n $this->setData($key, $value);\n }\n }", "function loadData()\n\t{\n\t\tstatic $data;\n\t\t\n\t\tif(!$data)\n\t\t\t$data=self::getData();\n\n\t\tif(isset($data[$this->id]))\n\t\t\t$this->setValues((array)$data[$this->id]);\t\t\t\n\t}", "public function load()\n\t{\n\t\t$this->list_table->load();\n\t}", "public function loadFromDB()\n {\n }", "public function roomList()\n\t{\n\t\techo json_encode($this->room_list->fetchData());\n\t}", "static public function load($id) {\n return entity_load_single('nuntius_room', $id);\n }", "public function load(Room $room, string $month) : void {\n\t\t$this->room = $room;\n\t\t$this->month = $month;\n\t\t$this->simples = $this->load_simples($room, $month);\n\t\t$this->recurs = $this->load_recurs($room, $month);\n\t\t$this->excepts = $this->load_excepts($month, $this->recurs);\n\t}", "public function load() { }", "public function load();", "public function load();", "public function load();", "public function load();", "public function load();", "public function load();", "public function load();", "public function load();", "public function load();", "public function load();", "public function load();", "public function load();", "public function load();", "function load($rid)\n {\n }", "public function _loadData()\n\t{\n\t\t$this->username = $this->_admin->username;\n\t\t$this->oldPassword = '';\n\t\t$this->last_name = $this->_admin->last_name;\n\t\t$this->first_name = $this->_admin->first_name;\n\t}", "protected abstract function loadSessionData();", "public abstract function load();", "abstract public function load();", "abstract public function load();", "public function load()\n {\n }", "public function load()\n {\n }", "public function load()\n {\n }", "public function load()\n {\n }", "public function load()\n {\n }", "protected function loadTreeData() {}", "protected function importDatabaseData() {}", "private function load()\r\n {\r\n $this->dbFields = MySQL::fetchRecord(MySQL::executeQuery('SELECT * FROM training_slideshow WHERE ts_id='.(int)$this->id),MySQL::fmAssoc);\r\n }", "abstract public function loadAll();", "function load($pid)\r\n\t{\r\n\t\tglobal $debug;\r\n\t\t$dbh = getOpenedConnection();\r\n\t\t\r\n\t\tif ($dbh == null) {\r\n\t\t\t$dbh = openDB();\r\n\t\t\tif ($dbh == null)\r\n\t\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tif ($pid == \"\")\r\n\t\t\treturn;\r\n\t\t\t\t\t\r\n\t\t$sql = \"\r\n\t\t\tselect\r\n\t\tId,\r\n\t\tCompetitionId,\r\n\t\tDayNo,\r\n\t\tFirstStart,\r\n\t\tLastStart,\r\n\t\tMaxStation,\r\n\t\tPatrolSpace\r\n\t\tfrom tbl_Pistol_CompetitionDay\r\n\t\twhere Id = $pid;\r\n\t\t\";\r\n\r\n\t\t$result = mysqli_query($dbh,$sql);\r\n\t\tif ($obj = mysqli_fetch_object($result))\r\n\t\t{\r\n\t\t\t$this->id = $obj->Id;\r\n\t\t\t$this->competitionId = $obj->CompetitionId;\r\n\t\t\t$this->dayNo = $obj->DayNo;\r\n\t\t\t$this->firstStart = $obj->FirstStart;\r\n\t\t\t$this->lastStart = $obj->LastStart;\r\n\t\t\t$this->maxStation = $obj->MaxStation;\r\n\t\t\t$this->patrolSpace = $obj->PatrolSpace;\r\n\t\t\t\r\n\t\t}\r\n\r\n\t\tmysqli_free_result($result);\r\n\t}", "protected function loadRow() {}", "protected function load()\n\t{\n\t\t//---------------------\n\t\t// Your code goes here\n\t\t// --------------------\n\t\t// rebuild the keys table\n\t\t$this->reindex();\n\t}", "public function getAllRoom(){\n $query = \"select * from $this->rooms_tableName where 1\";\n $result = $this->dbh->query($query);\n if($result->rowCount() > 0){\n return $result->fetchAll();\n }\n return null;\n }", "function _loadData()\n\t{\n\t\t// Lets load the content if it doesn't already exist\n\t\tif (empty($this->_data))\n\t\t{\n\t\t\t$query='SELECT * FROM #__joomleague_playground WHERE id='.(int) $this->_id;\n\t\t\t$this->_db->setQuery($query);\n\t\t\t$this->_data=$this->_db->loadObject();\n\t\t\treturn (boolean) $this->_data;\n\t\t}\n\t\treturn true;\n\t}", "function load_rooms($room_ids=null,$options=array())\n{\n\tglobal $db;\n\n\t$room_limiter = \"\";\n\tif($room_ids)\n\t{\n\t\tif(is_array($room_ids))\n\t\t{\n\t\t\tforeach($room_ids as $room_id)\n\t\t\t{\n\t\t\t\t$room_limiter .= \" AND id LIKE '$room_id'\";\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$room_limiter .= \"AND id like '$room_ids'\";\n\t\t}\n\t}\n\n\tif(isset($options['id']))\n\t{\n\t\t$room_limiter .= \"AND id like '\".$options['id'].\"'\";\n\t}\n\n\tif(isset($options['room_number']))\n\t{\n\t\t$room_number_limiter .= \"AND room_number like '\".$options['room_number'].\"'\";\n\t}\n\n\tif(isset($options['out_of_order']))\n\t{\n\t\t$room_number_limiter .= \"AND out_of_order like '\".$options['out_of_order'].\"'\";\n\t}\n\n\tif(isset($options['capacity']))\n\t{\n\t\t// separate capacity range into low-high thresholds\n\t\t$capacity_parts = explode(\"-\",$options['capacity']);\n\t\t$capacity_low = $capacity_parts[0];\n\t\t$capacity_high = $capacity_parts[1];\n\t\t$room_number_limiter .= \"AND capacity >= '$capacity_low' AND capacity <= '$capacity_high'\";\n\t}\n\n\tif(isset($options['capacity gte']))\n\t{\n\t\t$room_number_limiter .= \"AND capacity >= '\".$options['capacity gte'].\"'\";\n\t}\n\n\n\tif(isset($options['sort asc']))\n\t\t$sort = \"ORDER BY \".$options['sort asc'];\n\telse if(isset($options['sort desc']))\n\t\t$sort = \"ORDER BY \".$options['sort desc'];\n\telse\n\t\t$sort = \"ORDER BY capacity,room_number\";\n\n\tif(isset($options['limit']))\n\t\t$limit = \"LIMIT \".$limit;\n\telse\n\t\t$limit = \"\";\n\n\t$select = \"SELECT * FROM study_rooms WHERE 1 $room_limiter $room_number_limiter AND active like '1' $sort $limit\";\n\t//print(\"select: $select<br>\\n\");\n\t$res = $db->query($select);\n\t$all_rooms = array();\n\twhile($res->fetchInto($room))\n\t{\n\t\t$room->amenities = array();\n\t\t$room->keys = array();\n\t\t$room->room_number = ltrim($room->room_number,'0');\n\n\t\t$all_rooms[$room->id] = $room;\n\t}\n\n\tprint(\"select: $select<br>\\n\");\n\n\t$room_limiter = str_replace(\"AND id\",\"AND room_id\",$room_limiter);\n\n\t$all_amenities = load_amenities();\n\n\t// load amenity associations\n\t$select = \"SELECT * FROM study_rooms_amenities WHERE 1 $room_limiter AND active like '1' ORDER BY ordering,id\";\n\t//print(\"select: $select<br>\\n\");\n\t$res = $db->query($select);\n\twhile($res->fetchInto($room_amenity))\n\t{\n\t\tif(isset($all_rooms[$room_amenity->room_id]))\n\t\t{\n\t\t\tif(isset($all_amenities[$room_amenity->amenity_id]))\n\t\t\t{\n\t\t\t\t$amenity = $all_amenities[$room_amenity->amenity_id];\n\t\t\t\t$room_amenity->name = $amenity->name;\n\t\t\t\t$room_amenity->description = $amenity->description;\n\t\t\t\t$room_amenity->search_filter = $amenity->search_filter;\n\t\t\t\t$all_rooms[$room_amenity->room_id]->amenities[] = $room_amenity;\n\t\t\t}\n\t\t}\n\t}\n\n\n\tif(isset($options['amenities and']))\n\t{\n\t\t// remove rooms that don't match all amenity filters\n\t\tforeach($all_rooms as $room_id => $room)\n\t\t{\n\t\t\tforeach($options['amenities and'] as $amenity)\n\t\t\t{\n\t\t\t\t$a_ok = false;\n\t\t\t\tforeach($room->amenities as $ra)\n\t\t\t\t{\n\t\t\t\t\tif($ra->amenity_id == $amenity)\n\t\t\t\t\t{\n\t\t\t\t\t\t$a_ok = true;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif($a_ok)\n\t\t\t\t\tcontinue;\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t// amenity was not found for this room, remove room from results\n\t\t\t\t\tunset($all_rooms[$room_id]);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\n\t// load images\n\t$select = \"select * from room_images where 1 $room_limiter AND active like '1' order by ordering,id\";\n\t$res = $db->query($select);\n\twhile($res->fetchInto($room_image))\n\t{\n\t\tif(isset($all_rooms[$room_image->room_id]))\n\t\t{\n\t\t\t$image_location = \"images/rooms/\".$room_image->room_id.\"/\".$room_image->type.$room_image->room_id.\"_\".$room_image->id;\n\t\t\tswitch($room_image->format)\n\t\t\t{\n\t\t\t\tcase 'image/jpeg': $extension = \"jpg\"; break;\n\t\t\t\tcase 'image/png': $extension = \"png\"; break;\n\t\t\t\tcase 'image/gif': $extension = \"gif\"; break;\n\t\t\t\tdefault: $extension = str_replace(\"images/\",\"\",$room_image->format);\n\t\t\t}\n\t\t\t$image_location .= \".\".$extension;\n\t\t\t$room_image->location = $image_location;\n\t\t\t$all_rooms[$room_image->room_id]->images[$room_image->type][] = $room_image;\n\t\t}\n\t}\n\n\t// load keys\n\t$select = \"select * from rooms_keys where 1 $room_limiter AND active like '1'\";\n\t$res = $db->query($select);\n\twhile($res->fetchInto($key))\n\t{\n\t\tif(isset($all_rooms[$key->room_id]))\n\t\t{\n\t\t\t$all_rooms[$key->room_id]->keys[] = $key;\n\t\t}\n\t}\n\n\t$return = array();\n\tif(isset($options['group_by']))\n\t{\n\t\t$group_by = $options['group_by'];\n\t\tforeach($all_rooms as $room_id => $room)\n\t\t{\n\t\t\t$return[$room->$group_by][$room->id] = $room;\n\t\t}\n\t}\n\telse\n\t{\n\t\t$return = $all_rooms;\n\t}\n\n\treturn($return);\n}", "public function load() {\n $this->homes = new Flintstone('homes', ['dir' => $this->plugin->getDataFolder(), 'gzip' => true]);\n\n # Check if we should migrate EssentialsTP data.\n if(count($this->homes->getAll()) === 0) {\n if(file_exists($this->plugin->getServer()->getPluginPath().'essentialsTP/essentials_tp.db')) {\n\n $essentialsDB = new \\SQLite3($this->plugin->getServer()->getPluginPath().'essentialsTP/essentials_tp.db');\n\n $sql = 'SELECT * FROM homes';\n\n $result = $essentialsDB->query($sql);\n\n while($row = $result->fetchArray(SQLITE3_ASSOC)) {\n $this->setHome(\n $row['player'],\n [\n 'name' => $row['title'],\n 'world' => $row['world'],\n 'x' => $row['x'],\n 'y' => $row['y'],\n 'z' => $row['z'],\n 'yaw' => 0.00,\n 'pitch' => 0.00,\n ]\n );\n $this->plugin->getLogger()->info('Imported a home for '.$row['player']);\n }\n\n # All done, close down the database.\n $essentialsDB->close();\n\n }\n }\n }", "abstract function loadDbData($compid);", "abstract protected function load();", "abstract protected function load();", "abstract protected function load();", "abstract protected function load();", "protected function loadData(ObjectManager $em)\n {\n }", "protected function load(){\r\n\t\r\n\t$qq1 = Db::result(\"SELECT * FROM \"._SQLPREFIX_.$this->tableName.\" WHERE \".$this->fieldName.\" = \".(int)$this->id);\r\n\t$this->profileData = count($qq1)>0 ? $qq1[0]: null; \r\n\t\r\n\tif($this->metaUse){\r\n\t\t$qq2 = Db::result(\"SELECT * FROM \"._SQLPREFIX_.$this->metaTypesTableName.\" WHERE active = 1 ORDER BY public_ord, id\");\r\n\t\t$this->metaData = count($qq2)>0 ? $qq2: array(); \r\n\t}\r\n}", "public function loadData(){\r\n\t\t\t $pseudo = addslashes($this -> getPseudo()) ;\r\n\r\n\t\t if(! empty($pseudo)){\r\n\t\t\t$q = \"select * from UserTab where User_pseudo='\".$pseudo.\"'\";\r\n\t\t\t$r = execute($q);\r\n\t\t\twhile( $l = mysql_fetch_assoc($r) ){\r\n\t\t\t\t$this -> setFields($l);//Affectation aux champs de l'objet UserTab \r\n\t\t\t}\r\n\t\t }\r\n\r\n\t }", "public function load()\n {\n return $this->loadData();\n }", "public function run()\n {\n //101-120 single standard\n for ($i = 1; $i <= 20; $i++) {\n $room = new RoomModel();\n if ($i<10) {\n $room->room_number = \"10\".$i;\n } else {\n $room->room_number = \"1\".$i;\n }\n $room->roomtype_id = 1;\n $room->room_status = 0;\n $room->save();\n }\n\n //201-220 standard twin bed\n for ($i = 1; $i <= 20; $i++) {\n $room = new RoomModel();\n if ($i<10) {\n $room->room_number = \"20\".$i;\n } else {\n $room->room_number = \"2\".$i;\n }\n $room->roomtype_id = 2;\n $room->room_status = 0;\n $room->save();\n }\n\n //301-320 deluxe room\n for ($i = 1; $i <= 20; $i++) {\n $room = new RoomModel();\n if ($i<10) {\n $room->room_number = \"30\".$i;\n } else {\n $room->room_number = \"3\".$i;\n }\n $room->roomtype_id = 3;\n $room->room_status = 0;\n $room->save();\n }\n\n //401-415 luxury room\n for ($i = 1; $i <= 15; $i++) {\n $room = new RoomModel();\n if ($i<10) {\n $room->room_number = \"40\".$i;\n } else {\n $room->room_number = \"4\".$i;\n }\n $room->roomtype_id = 4;\n $room->room_status = 0;\n $room->save();\n }\n\n //501-510 family suite\n for ($i = 1; $i <= 10; $i++) {\n $room = new RoomModel();\n if ($i<10) {\n $room->room_number = \"50\".$i;\n } else {\n $room->room_number = \"5\".$i;\n }\n $room->roomtype_id = 5;\n $room->room_status = 0;\n $room->save();\n }\n }", "public function load()\n {\n }", "public function load()\n {\n }", "public function load() {\n\t\t\t$this->arList = array(); \n\t\t\t\n\t\t\t$oDB = new database(); \n\t\t\t\n\t\t\t$strSQL = \"select g.* from tblGroups g \";\n\t\t\tforeach ($this->arJoin as $strJoin) $strSQL .= $strJoin; \n\t\t\tif (count($this->arWhere)>0) $strSQL .= \" where \" . implode(\" and \", $this->arWhere); \n\t\t\t$this->arOrder[] = \"g.naam\"; \n\t\t\t$strSQL .= \" order by \" . implode(\",\", $this->arOrder); \n\t\t\t$oDB->sql($strSQL); \n\t\t\t$oDB->execute(); \n\t\t\twhile ($oDB->nextRecord()) {\n\t\t\t\t$oGroep = new group(); \n\t\t\t\t$oGroep->id($oDB->get(\"id\")); \n\t\t\t\t$oGroep->naam($oDB->get(\"naam\")); \n\t\t\t\t$oGroep->info($oDB->get(\"info\")); \n\t\t\t\t$oGroep->admin($oDB->get(\"admin\")); \n\t\t\t\t$oGroep->website($oDB->get(\"website\")); \n\t\t\t\t$this->arList[] = $oGroep; \n\t\t\t}\t\n\t\t}", "public function loadModel()\n {\n $data = ModelsPegawai::find($this->dataId);\n $this->name = $data->name;\n $this->email = $data->email;\n $this->username = $data->username;\n $this->password = $data->password;\n $this->level = $data->level;\n\n }", "function rst_load_rosterData($appGlobals, $chain, $readPeriod = TRUE) {\n $this->rst_load_kids($appGlobals);\n}", "protected function importData()\n\t{\n\t\tinclude_once \"Services/ADN/AD/classes/class.adnCharacter.php\";\n\t\t$characters = adnCharacter::getAllCharacters($this->wmo_id);\n\n\t\t$this->setData($characters);\n\t\t$this->setMaxCount(sizeof($characters));\n\t}", "public function run()\n {\n $rooms = [\n [\n 'id' => 1,\n 'room_name' => 'VIP Room',\n 'total_bed' => '1',\n 'bed_used' => '0',\n 'status' => 'Available',\n 'cost' => 10000000,\n 'created_at' => '2021-01-24 14:00:11',\n 'updated_at' => '2021-01-24 14:00:11',\n ],\n [\n 'id' => 2,\n 'room_name' => 'Platinum Room',\n 'total_bed' => '5',\n 'bed_used' => '0',\n 'status' => 'Available',\n 'cost' => 8000000,\n 'created_at' => '2021-01-24 14:00:11',\n 'updated_at' => '2021-01-24 14:00:11',\n ],\n [\n 'id' => 3,\n 'room_name' => 'Gold Room',\n 'total_bed' => '10',\n 'bed_used' => '10',\n 'status' => 'Not Available',\n 'cost' => 5000000,\n 'created_at' => '2021-01-24 14:00:11',\n 'updated_at' => '2021-01-24 14:00:11',\n ],\n [\n 'id' => 4,\n 'room_name' => 'Silver Room',\n 'total_bed' => '15',\n 'bed_used' => '13',\n 'status' => 'Available',\n 'cost' => 3000000,\n 'created_at' => '2021-01-24 14:00:11',\n 'updated_at' => '2021-01-24 14:00:11',\n ],\n [\n 'id' => 5,\n 'room_name' => 'Regular Room',\n 'total_bed' => '20',\n 'bed_used' => '8',\n 'status' => 'Available',\n 'cost' => 1000000,\n 'created_at' => '2021-01-24 14:00:11',\n 'updated_at' => '2021-01-24 14:00:11',\n ],\n ];\n\n Room::insert($rooms);\n }", "public function loadResources(): void {\n\t\t$sql = \"SELECT * FROM `npc_resource` WHERE `id_npc` = ?\";\n\t\t$this->db->query($sql, [$this->get('id')]);\n\t\t$resources = [];\n\t\twhile ($res = $this->db->next()) {\n\t\t\t$npc_resource = new NPCResource();\n\t\t\t$npc_resource->update($res);\n\t\t\t$npc_resource->loadResource($this->get('margin'));\n\n\t\t\tarray_push($resources, $npc_resource);\n\t\t}\n\t\t$this->setResources($resources);\n\t}", "public function load()\n {\n $input = $this->getCleanInput();\n $this->populate($input);\n }", "public function load()\n {\n $data = $this->storage->load();\n $this->collection->load($data);\n\n $this->refresh();\n }", "public function run()\n {\n\n Room::insert([\n 'user_id' => '1',\n 'provinces_id' => '1',\n 'name' => 'kanthil',\n 'price' => '250000',\n 'count' => '5',\n 'type' => 'standart',\n 'description' => 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vivamus velit nisl, congue in consectetur non, commodo sit amet est. Integer lorem massa, posuere vitae nisi nec, porta vulputate tellus. Aliquam et massa vel mauris hendrerit rhoncus at sagittis enim. Aliquam mattis, tortor ac pharetra tempus, neque libero auctor augue, non laoreet justo eros ac sem. Nam sem felis, semper posuere rutrum accumsan, eleifend sed turpis. Donec ornare, elit vitae dignissim interdum, erat dolor aliquam lectus, vitae commodo ex eros vel augue. Curabitur in purus vitae lorem facilisis rutrum. Donec mattis tellus turpis, at gravida est porta sed. Integer sed magna libero. Donec in vehicula dolor. Nullam ex purus, facilisis vel consequat in, maximus suscipit ex. Donec facilisis libero facilisis, ultrices lectus nec, rhoncus mi. Donec iaculis massa in venenatis viverra. Phasellus fringilla est at tellus rhoncus, sit amet scelerisque turpis tempor. Mauris commodo ante erat, id pulvinar nunc scelerisque at. Aenean laoreet tincidunt fringilla. Duis eu erat urna. Donec viverra, nisl vitae semper varius, tellus neque cursus nunc, ultrices egestas felis massa in elit. Suspendisse porttitor lectus nisi, eget vestibulum turpis porttitor quis. Etiam pretium mattis lorem condimentum volutpat. Donec pretium nulla non tellus pellentesque, nec facilisis enim mollis. Ut eget hendrerit risus. Pellentesque justo purus, pulvinar a varius a, pretium vitae odio. Cras erat odio, maximus ac velit ac, fringilla interdum tortor.',\n 'status' => '1',\n 'created_at' => '2018-10-29 12:30:15'\n ]);\n\n Room::insert([\n 'user_id' => '1',\n 'provinces_id' => '1',\n 'name' => 'kamboja',\n 'price' => '750000',\n 'count' => '4',\n 'type' => 'deluxe',\n 'description' => 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vivamus velit nisl, congue in consectetur non, commodo sit amet est. Integer lorem massa, posuere vitae nisi nec, porta vulputate tellus. Aliquam et massa vel mauris hendrerit rhoncus at sagittis enim. Aliquam mattis, tortor ac pharetra tempus, neque libero auctor augue, non laoreet justo eros ac sem. Nam sem felis, semper posuere rutrum accumsan, eleifend sed turpis. Donec ornare, elit vitae dignissim interdum, erat dolor aliquam lectus, vitae commodo ex eros vel augue. Curabitur in purus vitae lorem facilisis rutrum. Donec mattis tellus turpis, at gravida est porta sed. Integer sed magna libero. Donec in vehicula dolor. Nullam ex purus, facilisis vel consequat in, maximus suscipit ex. Donec facilisis libero facilisis, ultrices lectus nec, rhoncus mi. Donec iaculis massa in venenatis viverra. Phasellus fringilla est at tellus rhoncus, sit amet scelerisque turpis tempor. Mauris commodo ante erat, id pulvinar nunc scelerisque at. Aenean laoreet tincidunt fringilla. Duis eu erat urna. Donec viverra, nisl vitae semper varius, tellus neque cursus nunc, ultrices egestas felis massa in elit. Suspendisse porttitor lectus nisi, eget vestibulum turpis porttitor quis. Etiam pretium mattis lorem condimentum volutpat. Donec pretium nulla non tellus pellentesque, nec facilisis enim mollis. Ut eget hendrerit risus. Pellentesque justo purus, pulvinar a varius a, pretium vitae odio. Cras erat odio, maximus ac velit ac, fringilla interdum tortor.',\n 'status' => '1',\n 'created_at' => '2018-10-29 12:30:15'\n ]);\n\n\n Room::insert([\n 'user_id' => '1',\n 'provinces_id' => '2',\n 'name' => 'mawar',\n 'price' => '750000',\n 'count' => '3',\n 'type' => 'superior',\n 'description' => 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vivamus velit nisl, congue in consectetur non, commodo sit amet est. Integer lorem massa, posuere vitae nisi nec, porta vulputate tellus. Aliquam et massa vel mauris hendrerit rhoncus at sagittis enim. Aliquam mattis, tortor ac pharetra tempus, neque libero auctor augue, non laoreet justo eros ac sem. Nam sem felis, semper posuere rutrum accumsan, eleifend sed turpis. Donec ornare, elit vitae dignissim interdum, erat dolor aliquam lectus, vitae commodo ex eros vel augue. Curabitur in purus vitae lorem facilisis rutrum. Donec mattis tellus turpis, at gravida est porta sed. Integer sed magna libero. Donec in vehicula dolor. Nullam ex purus, facilisis vel consequat in, maximus suscipit ex. Donec facilisis libero facilisis, ultrices lectus nec, rhoncus mi. Donec iaculis massa in venenatis viverra. Phasellus fringilla est at tellus rhoncus, sit amet scelerisque turpis tempor. Mauris commodo ante erat, id pulvinar nunc scelerisque at. Aenean laoreet tincidunt fringilla. Duis eu erat urna. Donec viverra, nisl vitae semper varius, tellus neque cursus nunc, ultrices egestas felis massa in elit. Suspendisse porttitor lectus nisi, eget vestibulum turpis porttitor quis. Etiam pretium mattis lorem condimentum volutpat. Donec pretium nulla non tellus pellentesque, nec facilisis enim mollis. Ut eget hendrerit risus. Pellentesque justo purus, pulvinar a varius a, pretium vitae odio. Cras erat odio, maximus ac velit ac, fringilla interdum tortor.',\n 'status' => '1',\n 'created_at' => '2018-10-29 12:30:15'\n ]);\n\n\n Room::insert([\n 'user_id' => '1',\n 'provinces_id' => '1',\n 'name' => 'melati',\n 'price' => '1000000',\n 'count' => '2',\n 'type' => 'suite',\n 'description' => 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vivamus velit nisl, congue in consectetur non, commodo sit amet est. Integer lorem massa, posuere vitae nisi nec, porta vulputate tellus. Aliquam et massa vel mauris hendrerit rhoncus at sagittis enim. Aliquam mattis, tortor ac pharetra tempus, neque libero auctor augue, non laoreet justo eros ac sem. Nam sem felis, semper posuere rutrum accumsan, eleifend sed turpis. Donec ornare, elit vitae dignissim interdum, erat dolor aliquam lectus, vitae commodo ex eros vel augue. Curabitur in purus vitae lorem facilisis rutrum. Donec mattis tellus turpis, at gravida est porta sed. Integer sed magna libero. Donec in vehicula dolor. Nullam ex purus, facilisis vel consequat in, maximus suscipit ex. Donec facilisis libero facilisis, ultrices lectus nec, rhoncus mi. Donec iaculis massa in venenatis viverra. Phasellus fringilla est at tellus rhoncus, sit amet scelerisque turpis tempor. Mauris commodo ante erat, id pulvinar nunc scelerisque at. Aenean laoreet tincidunt fringilla. Duis eu erat urna. Donec viverra, nisl vitae semper varius, tellus neque cursus nunc, ultrices egestas felis massa in elit. Suspendisse porttitor lectus nisi, eget vestibulum turpis porttitor quis. Etiam pretium mattis lorem condimentum volutpat. Donec pretium nulla non tellus pellentesque, nec facilisis enim mollis. Ut eget hendrerit risus. Pellentesque justo purus, pulvinar a varius a, pretium vitae odio. Cras erat odio, maximus ac velit ac, fringilla interdum tortor.',\n 'status' => '1',\n 'created_at' => '2018-10-29 12:30:15'\n ]);\n\n Room::insert([\n 'user_id' => '1',\n 'provinces_id' => '2',\n 'name' => 'anggrek',\n 'price' => '1500000',\n 'count' => '1',\n 'type' => 'executive',\n 'description' => 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vivamus velit nisl, congue in consectetur non, commodo sit amet est. Integer lorem massa, posuere vitae nisi nec, porta vulputate tellus. Aliquam et massa vel mauris hendrerit rhoncus at sagittis enim. Aliquam mattis, tortor ac pharetra tempus, neque libero auctor augue, non laoreet justo eros ac sem. Nam sem felis, semper posuere rutrum accumsan, eleifend sed turpis. Donec ornare, elit vitae dignissim interdum, erat dolor aliquam lectus, vitae commodo ex eros vel augue. Curabitur in purus vitae lorem facilisis rutrum. Donec mattis tellus turpis, at gravida est porta sed. Integer sed magna libero. Donec in vehicula dolor. Nullam ex purus, facilisis vel consequat in, maximus suscipit ex. Donec facilisis libero facilisis, ultrices lectus nec, rhoncus mi. Donec iaculis massa in venenatis viverra. Phasellus fringilla est at tellus rhoncus, sit amet scelerisque turpis tempor. Mauris commodo ante erat, id pulvinar nunc scelerisque at. Aenean laoreet tincidunt fringilla. Duis eu erat urna. Donec viverra, nisl vitae semper varius, tellus neque cursus nunc, ultrices egestas felis massa in elit. Suspendisse porttitor lectus nisi, eget vestibulum turpis porttitor quis. Etiam pretium mattis lorem condimentum volutpat. Donec pretium nulla non tellus pellentesque, nec facilisis enim mollis. Ut eget hendrerit risus. Pellentesque justo purus, pulvinar a varius a, pretium vitae odio. Cras erat odio, maximus ac velit ac, fringilla interdum tortor.',\n 'status' => '1',\n 'created_at' => '2018-10-29 12:30:15'\n ]);\n \n }", "protected function loadData()\n {\n\n $this->jsonUrl = 'https://api.srgssr.ch/audiometadata/v2/livestreams';\n parent::loadData();\n\n }", "public function showRoomsList(){\r\n\t\t$hotel_id = $this->session->userdata['hotel_id'];\r\n\t\t$data['fields']=$this->RoomsModel->getListData($hotel_id);\r\n\r\n\t\t$this->load->view(\"header\");\r\n\t\t$this->load->view(\"rooms/rooms_list\",$data);\r\n\t\t$this->load->view(\"footer\");\r\n\r\n\t}", "public function run()\n {\n $rooms = [\n [\n 'hotel_id' => '1',\n 'type' => 'Resort',\n 'description' => 'Universal-Parks',\n 'price' => '500',\n 'image' => 'https://funco.com/670/550/hotelpark'\n ],\n [\n 'hotel_id' => '2',\n 'type' => 'Inn',\n 'description' => 'Western-Cottage',\n 'price' => '55',\n 'image' => 'https://wintercottage.com/112/041/cottage'\n ],\n [\n 'hotel_id' => '3',\n 'type' => 'Suite',\n 'description' => 'Las-Vegas',\n 'price' => '900',\n 'image' => 'https://vegascasino.com/481/764/hotel-view'\n ],\n [\n 'hotel_id' => '4',\n 'type' => 'Budget-Inn',\n 'description' => 'Atlanta',\n 'price' => '100',\n 'image' => 'https://budgetinnatlanta.com/341/088/budget-room'\n ]\n ];\n\n foreach ($rooms as $room){\n Room::create(array(\n 'hotel_id' => $room['hotel_id'],\n 'type' => $room['type'],\n 'description' => $room['description'],\n 'price' => $room['price'],\n 'image' => $room['image']\n ));\n }\n }", "private function load() {\n\t\t\t$comments = array();\n\t\t\t\n\t\t\t$this->db->where('itemid', $this->itemid);\n\t\t\t$rows = $this->db->get('comments');\n\t\t\t\n\t\t\tforeach($rows as $row) {\n\t\t\t\t$comments['author'] = $row['author'];\n\t\t\t\t$comments['via'] = $row['via'];\n\t\t\t\t$comments['date'] = $row['date'];\n\t\t\t\t$comments['comment'] = $row['comment'];\n\t\t\t\t$comments['avatar'] = $row['avatar'];\n\t\t\t\t$this->data[] = $comments;\n\t\t\t}\n\t\t}", "public function load(){\n parent::load();\n \n if($this->load_class)\n {\n // przypisanie poprawnego zolnierza do tymczasowej zmiennej\n $this->id_soldier_tmp = $this->id_soldier;\n \n // przypisanie poprawnej misji do tymczasowej zmiennej\n $this->id_mission_tmp = $this->id_mission;\n \n // nazwa statusu misji\n $item = new ClassMission($this->id_mission);\n $this->status_name = self::getStatusMission($item->date_start, $item->date_end, $this->detached);\n $this->mission_name = $item->name;\n \n // data rozpoczęcia\n $this->date_start = date('d.m.Y H:i', strtotime($item->date_start));\n \n // data zakonczenia\n $this->date_end_tmp = $this->date_end;\n $this->date_end = $this->date_end === NULL || $this->date_end == '0000-00-00 00:00:00' ? 'Niezdefiniowano' : date('d.m.Y H:i', strtotime($item->date_end));\n \n $this->date_mission_add = date('d.m.Y H:i', strtotime($this->date_mission_add));\n $this->date_mission_detach = $this->date_mission_detach === NULL || $this->date_mission_detach == '0000-00-00 00:00:00' ? NULL : date('d.m.Y H:i', strtotime($this->date_mission_detach));\n }\n }", "public function loadMembers() {\n if(!$this->id) return;\n\n $list = $this->getClient()->getDmMembers($this->id);\n\n if($list) $this->members = $list;\n }", "private function load() {\n\n $db = Database::getInstance(); \n\t $con = $db->getConnection();\n \n $query = \"SELECT * FROM Products ORDER by ID DESC\";\n \n if ($result = $con->query($query)) {\n \t/* fetch object array */\n \t while ($prod = $result->fetch_object(\"Product\")) {\n\t\t\t \tarray_push($this->products, $prod);\n \t}\n \t/* free result set */\n \t$result->close();\n }\n\t}", "public function loadroledataentryAction(){\n $roles=Doctrine_Query::create()\n\t ->select(\"r.ID, r.role\")\n\t ->from(\"Roles r\")\n\t ->where(\"r.ID=?\",Constants::DATAENTRY_INTERNO)\n \t ->execute(null,Doctrine::HYDRATE_ARRAY);\n $this->emitTableResult($roles);\n }", "protected function loadData()\n {\n $this->id = $this->getParameter('id', 'int', null);\n if ($this->id == null || !BackendMailengineModel::existsGroup($this->id)) {\n $this->redirect(BackendModel::createURLForAction('groups') . '&error=non-existing');\n }\n\n $this->record = BackendMailengineModel::getGroup($this->id);\n }", "public function load(array $data);", "function rooms_get()\n {\n // // Authenticate user (by session)\n // // Check if a user is currently logged in\n if(!$this->session->userdata('LoggedIn')){\n die(\"Login Required\");\n }\n \n // Load the device model\n $this->load->model('device_model');\n\n if($this->get('id')){\n $roomList = $this->device_model->getAvailableRooms($this->get('id'));\n }else{\n $roomList = $this->device_model->getAvailableRooms();\n }\n\n // If the deviceList is not FALSE or NULL\n if($roomList){\n $this->response($roomList, 200); // 200 being the HTTP response code\n }else{\n $this->response(NULL, 404);\n }\n }", "public function loadModuleData() {}", "function loadFromDatabase(){\n global $DB;\n $resource = $DB->config->get();\n $list = array();\n while($row = $DB->fetchAssoc($resource))\n {\n if(!isset($this->sections[$row['section']])) $this->sections[$row['section']] = new ConfigSection($row['section']);\n $this->sections[$row['section']]->registerFromDatabase($row);\n }\n }", "function readData()\r\n\t{\r\n\t\tif( !file_exists( $this->source_file ) )\r\n\t\t{\r\n\t\t\tdie( \"Can not proceed: Can not locate data file: '\" . $this->source_file . \"'\" );\r\n\t\t}\r\n\t\t$this->m_aData = fopen( $this->source_file , 'r');\r\n\t}", "private function initData()\n {\n $data = $this->cache->load($this->cacheId);\n if (false === $data) {\n /** @var Reader $reader */\n $reader = $this->readerFactory->create(\n ['fileName' => sprintf(self::SEARCH_PATTERN, $this->componentName)]\n );\n $data = $reader->read();\n $this->cache->save($this->serializer->serialize($data), $this->cacheId);\n } else {\n $data = $this->serializer->unserialize($data);\n }\n\n if (!empty($data)) {\n $this->data[$this->componentName] = [Converter::DATA_ATTRIBUTES_KEY => ['name' => $this->componentName]];\n $this->merge([$this->componentName => $data]);\n $this->data = $this->evaluateComponentArguments($this->data);\n }\n }", "public function loadDataAction()\n {\n $contentService = Dm_Session::GetServiceFactory()->getContentService();\n\n $filter = new Service_Api_Filter_Content();\n\n $filter->id = $this->_getParam('id');\n $filter->mimeType = $this->_getParam('mimeType');\n $filter->limit = $this->_getParam('limit');\n $filter->offset = $this->_getParam('offset');\n $filter->search = $this->_getParam('search');\n $filter->sources = $this->_getParam('sources');\n $filter->format = $this->_getParam('dim');\n $filter->properties = $this->_getParam('properties');\n $contents = $contentService->contentsRead($filter);\n $this->view->data = $contents;\n }", "function getRooms(){\n\t\t$stmt = $this->connect->prepare(\"SELECT id,Name,RoomNo, Description from roominfo\");\n\t\t$stmt->execute();\n\t\t$stmt->bind_result($id, $name, $RoomNo, $Description);\n\t\t\n\t\t$rooms = array(); \n\t\t\n\t\twhile($stmt->fetch()){\n\t\t\t$room = array();\n\t\t\t$room['id'] = $id; \n\t\t\t$room['Name'] = $name; \n\t\t\t$room['RoomNo'] = $RoomNo; \n $room['Description'] = $Description; \n\t\t\tarray_push($rooms, $room); \n\t\t}\n\t\t\n\t\treturn $rooms; \n\t}", "function load() {\n\n\t}", "protected function loadData(ObjectManager $manager)\n {\n }", "function _loadData()\r\n\t{\r\n\t\t// Lets load the content if it doesn't already exist\r\n\t\tif (empty($this->_data))\r\n\t\t{\r\n\t\t\t$query = 'SELECT e.*, v.venue'\r\n\t\t\t\t\t. ' FROM #__eventlist_events AS e'\r\n\t\t\t\t\t. ' LEFT JOIN #__eventlist_venues AS v ON v.id = e.locid'\r\n\t\t\t\t\t. ' WHERE e.id = '.$this->_id\r\n\t\t\t\t\t;\r\n\t\t\t$this->_db->setQuery($query);\r\n\t\t\t$this->_data = $this->_db->loadObject();\r\n\r\n\t\t\treturn (boolean) $this->_data;\r\n\t\t}\r\n\t\treturn true;\r\n\t}", "protected function load()\n\t{\n\n $data = simplexml_load_string(file_get_contents($this->_origin));\n\n\n\n $data = json_decode(json_encode((array)$data), TRUE);\n\n //$this\n\n $this->_data = [];\n\n\n $firstKey = array_keys($data)[0];\n\n //print_r($data[$firstKey]);\n //echo \"<br><br>\";\n\n foreach($data[$firstKey] AS $element) {\n\n\n //var_dump(self::arrayToObject($element));\n\n $this->_fields = array_keys($element);\n\n\n $this->_data[@$element['id']] = self::arrayToObject($element);\n\n }\n\n\t\t$this->reindex();\n\t}", "private function loadData() {\n // If the file does not yet exists we cancel immediately\n if (!file_exists(DATA_FILE)) return;\n\n // Grab all the contents from the file\n $data = file_get_contents(DATA_FILE);\n // And convert it to a json object\n $data = json_decode($data);\n\n // If something went wrong with decoding we cancel\n if ($data == false) return;\n\n // Store our information in our object\n $this->accessToken = $data->accessToken;\n $this->expirationDate = $data->expirationDate;\n $this->refreshToken = $data->refreshToken;\n }" ]
[ "0.6905241", "0.6896135", "0.6625953", "0.6471082", "0.6229351", "0.62139493", "0.6182965", "0.61522967", "0.614805", "0.61152154", "0.606012", "0.6040173", "0.60382986", "0.6033106", "0.6007157", "0.59581983", "0.59392375", "0.59269553", "0.5911512", "0.58354163", "0.5828186", "0.5815156", "0.5801756", "0.57761157", "0.57761157", "0.57761157", "0.57761157", "0.57761157", "0.57761157", "0.57761157", "0.57761157", "0.57761157", "0.57761157", "0.57761157", "0.57761157", "0.57761157", "0.57733274", "0.5758571", "0.57510453", "0.57300746", "0.5715962", "0.5715962", "0.571255", "0.57123715", "0.5711745", "0.5711745", "0.5711745", "0.5691029", "0.56895894", "0.56795144", "0.56649566", "0.56615555", "0.56612873", "0.5646716", "0.5634805", "0.56011474", "0.5592227", "0.5589898", "0.55717456", "0.5568514", "0.5568514", "0.5568514", "0.5568514", "0.5561889", "0.5514955", "0.54860103", "0.54821706", "0.54763955", "0.54701424", "0.54701424", "0.5469846", "0.54653794", "0.54649246", "0.54596865", "0.54443574", "0.544312", "0.54412645", "0.5438017", "0.5436868", "0.54274386", "0.542483", "0.542459", "0.5416483", "0.5410434", "0.53934234", "0.5380964", "0.53753", "0.5374412", "0.5372188", "0.53583884", "0.53412217", "0.53362083", "0.53333163", "0.5330913", "0.5323058", "0.52959204", "0.5294024", "0.52686226", "0.5265283", "0.5262816", "0.5254892" ]
0.0
-1
get current authenticated freelancer :
public function getSkills(){ $currentUser = auth()->user(); return $currentUser->skills; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function get_visitor() {\n \n // Return currently logged in user\n return $this->visitor;\n \n }", "public static function getUser() \n\t{\n\t\tacPhpCas::setReporting();\n\t\treturn phpCAS::getUser();\t\t\n\t}", "function get_credencial()\r\n{\r\n $ci = get_instance();\r\n\r\n if($ci->session->has_userdata('credencial'))\r\n {\r\n \treturn $ci->session->userdata('credencial');\r\n }\r\n else\r\n {\r\n \treturn array();\r\n }\r\n}", "public function current()\n {\n return $this->httpGet('cgi-bin/get_current_autoreply_info');\n }", "private function currentUser()\n {\n return Auth::guard('web')->user();\n }", "public function show(Freelancer $freelancer) {\n\n $user = User::find($freelancer->freelancer_id);\n $freelancer->badge = explode(',', $freelancer->badge);\n $freelancer->email = $user->email;\n $freelancer->email = $user->email;\n $skills = $freelancer->skills()->get();\n if (!Auth::guest()) {\n\n \n if (Auth::user()->type == \"enterprise\") {\n $user = Enterprise::find(Auth::user()->user_id);\n } else {\n $user = Freelancer::find(Auth::user()->user_id);\n }\n\n\n if ($user->is_freelancer_Unlocked($freelancer->freelancer_id) || $user->freelancer_id == $freelancer->freelancer_id) {\n\n $challenges = $freelancer->challenges()->get();\n $projects = $freelancer->projects()->get();\n\n return view('freelancers.show', compact('freelancer', 'skills', 'projects', 'challenges'));\n }\n }\n return view('freelancers.showLocked', compact('freelancer', 'skills'));\n // dd($challenges);\n }", "public function show()\n {\n return auth('api')->user();\n }", "public function getLoggedInUser()\n {\n $securityContext = $this->container->get('security.context');\n $consultant = $securityContext->getToken()->getUser();\n return $consultant;\n }", "function isFreelancer() {\n if (isset($_SESSION['role'])) {\n if ($_SESSION['role'] == \"freelance\") {\n return true;\n }\n }\n return false;\n}", "public function get_current_user()\n\t{\n\t\treturn $this->current_user;\n\t}", "public function getCurrentUser() {\n\t\treturn Zend_Registry::get('currentUser');\n\t}", "function current_user()\n{\n return Zend_Registry::get('bootstrap')->getResource('CurrentUser');\n}", "public function getCurrentUser();", "public function getSignedForNewsletter()\n {\n return $this->signedForNewsletter;\n }", "public function getCurrentUser(){\n return $_SESSION['user'];\n }", "public static function currentUser()\n {\n return wp_get_current_user();\n }", "function authGet() { }", "public function user()\n {\n return $this->session()->tutor();\n }", "private function currentUser() {\n return Auth::guard(session('guard'))->user();\n }", "public function getAuthenticated($user) { \r\n return $this->makeRequest('get', \"/user\");\r\n }", "function MWX__get_current_user_maturity ()\n{\n global $current_user;\n\n get_currentuserinfo();\n\n if (!$current_user)\n return (0);\n\n // Format: 2009-01-15 18:45:29\n if (!$current_user->user_registered)\n return (0);\n\n $user_join_datetime = $current_user->user_registered . \" UTC\";\n\n $user_maturity = floor((strtotime(\"now\") - strtotime($user_join_datetime)) / (60*60*24));\n\n // Fix to allow webmasters to make posts/pages invisible to non-members but immediately visible to members.\n // This will make any logged-on member at least 1 day mature.\n if (!$user_maturity)\n $user_maturity = 1;\n\n return $user_maturity;\n}", "public function getAuthenticatedUser () : string {\n return $this->mainController->getAuthenticatedUser();\n }", "public static function getCurrentUser();", "function getAuthenticatedUser()\n {\n if (isset($_SESSION['MFW_authenticated_user'])) {\n return $_SESSION['MFW_authenticated_user'];\n }\n\n return null;\n }", "public function getUser()\n {\n return $this->getContext()->getUser();\n }", "public static function getUser()\n {\n return self::getInstance()->_getUser();\n }", "public static function user(){\n\t\treturn self::session()->user();\n\t}", "function get_currentuserinfo()\n {\n }", "public function getAuth();", "public function getAuth();", "protected static function retrieveCurrentUser()\n {\n global $user;\n\n return $user;\n }", "public static function getUser(): string\n {\n return get_current_user();\n }", "public function getUser() {\n\t\treturn $this->Session->read('UserAuth');\n\t}", "public function getUser(){\n if (Auth::user()) { \n $user = Auth::user();\n } else {\n $user = 'guest';\n }\n return $user;\n }", "function wp_get_current_user()\n {\n }", "function current_admin()\n {\n return admin_auth()->user();\n }", "public function getLoggedIn()\n\t{\n\t\treturn auth()->user();\n\t}", "protected static function reviewer()\n {\n return auth()->check() ? auth()->id() : 1;\n }", "public function getFarmerAPI()\n {\n $member = auth()->guard('member')->user()->id;\n return Farmer::with('member')->where('created_by',$member)->get();\n }", "public function user()\n {\n return $this->la->user();\n }", "public function getAuthenticated()\n {\n return $this->authenticated;\n }", "public function getMe()\r\n {\r\n return $this->telegram(\"getMe\");\r\n }", "public function getAuthenticatedUser()\n {\n return $this->getUnsplashClient()->sendRequest('GET', 'me');\n }", "public function user()\n {\n return $this->context-> getUser();\n }", "public static function user() {\n return Auth::currentUser();\n }", "private function getAuthenticatedUser(){\n\t\t\n\t\tprint_r($this->Request\t);\n\n\t}", "public function getCareer();", "function _wp_get_current_user()\n {\n }", "public function loginFreelanceBoutique() {\n $this->execGET('https://freelance.boutique/user/auth/login');\n //initial request for auth from freelance.ru\n $this->execGET('https://freelance.boutique/user/auth/freelanceru');\n }", "public static function get_default_ctx() \n {\n return $_SESSION['_user_vision']['ctx'];\n }", "public function GetCurrentUser()\n {\n return $this->userManager->getCurrent();\n }", "public function getCurrentUser()\n\t{\n\t\treturn $this->users->getCurrentUser();\n\t}", "public function getPersonal();", "function get_current_user_id(){\n\t\t$sd=$this->session->all_userdata();\n\t\t$fa=$sd['flexi_auth'];\n\t\t//$this->firephp->log($fa);\n\t\t//$this->firephp->log($fa['user_id']);\n\t\t//$this->firephp->log(\"Current user= \".intval($fa['user_id']));\n\t\treturn $fa['user_id'];\n\t}", "public function getCurrentUser() {\n\t\treturn $this->request->getServer ()->get ( 'REMOTE_USER', 'NoUser' );\n\t}", "function getCurrentUser() {\n return getUser($_SESSION[\"username\"]);\n}", "public static function getRequester()\n {\n $url = URL::current();\n $urls = explode('/', $url);\n $requester = $urls[count($urls) -1];\n return $requester;\n }", "private function getUser()\n {\n return $this->user->getUser();\n }", "public static function getUser(){\n return \\Illuminate\\Auth\\Guard::getUser();\n }", "public function getAuthenticatedUser()\n {\n // get the web-user\n $user = Auth::guard()->user();\n\n // get the api-user\n if(!isset($user) && $user == null) {\n $user = Auth::guard('api')->user();\n }\n return $user;\n }", "public function getUser();", "public function getUser();", "public function getUser();", "public function getUser();", "public function getUser();", "public function getUser();", "public function getUser();", "public static function CurrentSiteUser()\n\t{\n\t\tif (!self::$CurrentSiteUser)\n\t\t{\n\t\t\tif ($UserHash = Cookie::get(self::Config()->get('cookie_name'))) self::$CurrentSiteUser = self::get()->filter('Active',1)->filter(\"UserHash\",$UserHash)->First();\n\t\t}\n\t\treturn self::$CurrentSiteUser;\n\t}", "public static function getUser();", "private function get_current_user(){\n\t\t\n\t\treturn false;\n\t}", "public function user()\n {\n return call_user_func($this->getUserResolver());\n }", "public function show()\n {\n return auth()->user()->getResource();\n }", "protected function getPrincipal() {\n\t\t$webSession = WebSession::getInstance();\n\t\treturn $webSession->getPrincipal();\n\t}", "function getAuthenticatedParticipant();", "static function getCurrentUser()\r\n {\r\n return self::getSingleUser('id', $_SESSION[\"user_id\"]);\r\n }", "public static function currentUser() {\n global $user;\n\n return $user;\n }", "public function findCurrentUser()\n {\n return $this->apiClient->findCurrentUser();\n }", "public function getCurrentUser()\n {\n return $this->remoteUser;\n }", "public function getUser()\n {\n if(!$this->user)\n $this->user = User::getActive();\n\n return $this->user;\n }", "static function getCurrent(){\r\n\t\tif( empty($_SESSION['moduser']['userId']) )\r\n\t\t\treturn null;\r\n\t\treturn self::getInstance($_SESSION['moduser']['userId']);\r\n\t}", "public function currentUser()\n {\n return $this->res($this->service->currentUser());\n }", "function owa_getCurrentWpUser() {\r\n\tglobal $current_user;\r\n get_currentuserinfo();\r\n return $current_user;\r\n\r\n}", "public static function currentUserTEST()\n {\n if (Auth::check()) {\n return Auth::user();\n } else {\n $user = User::find(Config::get('mrcore.wiki.anonymous'));\n Auth::login($user);\n Auth::user()->login();\n #return self::find(Config::get('mrcore.wiki.anonymous'));\n return Auth::user();\n }\n }", "public function show()\n {\n return UserTransformer::resource(Auth::user());\n }", "public function getAuthenticatedUser()\n\t{\n\t\t$user = Auth::user();\n\t\t$user->merchant;\n\n\t\treturn $user;\n\t}", "protected function getFrontendUser() {\n\t\tif ($GLOBALS ['TSFE']->fe_user) {\n\t\t\treturn $GLOBALS ['TSFE']->fe_user;\n\t\t}\n\t\treturn false;\n\t}", "private function getAuthenticatedUser()\n {\n return auth()->user();\n }", "public function authorize()\n {\n return $this->user();\n }", "public function authorize()\n {\n return $this->user();\n }", "public function authorize()\n {\n return $this->user();\n }", "public function getUser ()\r\n\t{\r\n\t\treturn $this->user;\r\n\t}", "function userInfo($info){\r\n\t\t\tif(isset($_SESSION['Auth']->$info)){\r\n\t\t\t\treturn $_SESSION['Auth']->$info;\r\n\t\t\t}\r\n\t\t\telse{\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t}", "public function requestAuth()\n {\n return null;\n }", "public function get_user() {\r\n\t\treturn ($this->user);\r\n\t}", "public function get_user_fundraiser()\n {\n return $this->get_option( 'userFundraiser' );\n }", "public function authorize()\n {\n return session('company');\n }", "function current_user()\n{\n return auth()->user();\n}", "private function getUser() {\n\t\t$account = $this->authenticationManager->getSecurityContext()->getAccount();\n\t\t$user = $account->getParty();\n\t\treturn $user;\n\t}", "public function getCurrentUser() {\n $user = $this->controller->getCurrentUser(['roles']);\n\n $user->makeVisible(['type', 'playlist_count']);\n\n return $this->response($user);\n }", "function current_user()\n{\n global $current_user;\n return $current_user;\n}", "public function current()\n\t{\n\t\t$user = Sentry::getUser();\n\t\treturn result(true, compact('user'));\n\t}" ]
[ "0.5939612", "0.57964766", "0.56970406", "0.5691445", "0.5675911", "0.56667763", "0.5645297", "0.5615455", "0.55804336", "0.5567273", "0.555855", "0.55571723", "0.5513255", "0.5491391", "0.5488347", "0.5459944", "0.54585075", "0.5458177", "0.545601", "0.5451701", "0.543692", "0.5425017", "0.5416209", "0.5399641", "0.53947365", "0.5393624", "0.5386764", "0.5363423", "0.53624517", "0.53624517", "0.53511417", "0.5348988", "0.534085", "0.5336777", "0.5336278", "0.5332865", "0.53328085", "0.53318316", "0.5330055", "0.5326508", "0.5316405", "0.53140044", "0.5312544", "0.5297949", "0.52914536", "0.5286149", "0.52762777", "0.5272021", "0.5262047", "0.526089", "0.5260828", "0.52596587", "0.5254739", "0.52537453", "0.52525437", "0.5250364", "0.52388036", "0.52374655", "0.52354854", "0.523238", "0.5229776", "0.5229776", "0.5229776", "0.5229776", "0.5229776", "0.5229776", "0.5229776", "0.52212805", "0.5220076", "0.5216958", "0.5216075", "0.52124774", "0.5211806", "0.5211309", "0.52055115", "0.5198768", "0.5197291", "0.51968765", "0.5196112", "0.51957846", "0.5192601", "0.51893747", "0.5189118", "0.5185607", "0.5183782", "0.51774555", "0.5173578", "0.5168463", "0.5168463", "0.5168463", "0.51641065", "0.51627654", "0.51626676", "0.51611704", "0.5160342", "0.51561236", "0.514814", "0.5144884", "0.5143387", "0.5141144", "0.51408285" ]
0.0
-1
Returns true if this course format uses sections
public function uses_sections() { return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function isSection()\n {\n return false;\n }", "public function uses_sections() {\n\n return true;\n\n }", "public function hasSections()\n {\n return null !== @$this->sections;\n }", "public function hasCpSection()\n {\n return false;\n }", "public function hasCpSection()\n {\n return true;\n }", "public function hasCpSection()\n {\n return true;\n }", "private function check_section() {\n $cond = NULL;\n if($this->type_post != 'add') {\n $cond = \"AND sec_id != {$this->get_id}\";\n }\n $ch = $this->select(\"*\", \"jops_sections\", \"WHERE sec_unique = ? {$cond}\");\n $ch->execute(array($this->unique));\n $info = $ch->rowCount();\n if($info > 0) {\n return true;\n }\n return false;\n }", "public function hasCpSection()\n\t{\n\t\treturn true;\n\t}", "protected function projectSpecificSectionsCondition()\n {\n return\n isset($this->get['urls']) ||\n //F\n isset($this->get['divisions-products']) ||\n isset($this->get['translations']) ||\n //A\n isset($this->get['products']) ||\n isset($this->get['pages']);\n }", "public static function is_header_section_active() {\n\t\t\t$status = false;\n\t\t\tif ( Astra_Ext_Extension::is_active( 'header-sections' ) || Astra_Addon_Builder_Helper::$is_header_footer_builder_active ) {\n\t\t\t\t$status = true;\n\t\t\t}\n\t\t\treturn $status;\n\t\t}", "public function sections()\n {\n }", "public function has_sections() {\n\t\t\tif ( !isset( $this->registered_sections ) ) {\n\t\t\t\tglobal $wp_settings_sections;\n\t\t\t\t$i = 1;\n\t\t\t\tforeach ( $wp_settings_sections[$this->default_group] as $id => $section ) {\n\t\t\t\t\t$this->registered_sections[$i]['id'] = $id;\n\t\t\t\t\t$this->registered_sections[$i]['title'] = $section['title'];\n\t\t\t\t\t$i++;\n\t\t\t\t}\n\t\t\t}\t\t\n\t\t\t$this->_display_count++;\n\t\t\t\n\t\t\tif ( isset( $this->registered_sections[$this->_display_count] ) ) {\n\t\t\t\treturn true;\n\t\t\t} else {\n\t\t\t\t$this->_display_count = 0;\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}", "public function hasSection($section){\n\t\t$array = $this->toArray();\n\t\tif(array_key_exists($section, $array)){\n\t\t\treturn true;\n\t\t} return false;\n\t}", "public function clear() {\n\n\t\t$sections_ids = LP_Object_Cache::get( 'course-' . $this->course_id, 'learn-press/course-sections-ids' );\n\n\t\tif ( ! $sections_ids ) {\n\t\t\treturn false;\n\t\t}\n\n\t\tglobal $wpdb;\n\n\t\tdo_action( 'learn-press/before-clear-section', $this->course_id );\n\n\t\t// Remove all items in course's sections\n\t\t$wpdb->query( $wpdb->prepare( \"DELETE FROM {$wpdb->prefix}learnpress_section_items WHERE %d AND section_id IN(\" . join( ',', $sections_ids ) . ')', 1 ) );\n\t\tlearn_press_reset_auto_increment( 'learnpress_section_items' );\n\t\t// delete sections ids cache\n\t\t// wp_cache_delete( 'course-' . $this->course_id, 'learn-press/course-sections-ids' );\n\n\t\t// delete sections in course\n\t\t$wpdb->query( $wpdb->prepare( \"DELETE FROM {$wpdb->prefix}learnpress_sections WHERE section_course_id = %d\", $this->course_id ) );\n\t\tlearn_press_reset_auto_increment( 'learnpress_sections' );\n\t\t// delete sections cache\n\t\t// wp_cache_delete( 'course-' . $this->course_id, 'learn-press/course-sections' );\n\n\t\tLP_Course_Utils::set_cache_db_sections( $this->course_id, false );\n\n\t\treturn true;\n\t}", "function checkSection($section) {\n\t\treturn in_array(\"*\", $this->_sections) || in_array($section, $this->_sections);\n\t}", "public function sectionBegin() {}", "public function sectionBegin() {}", "public function hasSection($name): bool\n {\n return array_key_exists($name, $this->sections);\n }", "function checkSectionCategory(&$row, &$obj) {\r\n\t\t$include = isset($obj->_include_sc) ? $obj->_include_sc : false;\r\n\t\t$sections = isset($obj->_exclude_sections) ? $obj->_exclude_sections : array();\r\n\t\t$catids = isset($obj->_exclude_categories) ? $obj->_exclude_categories : array();\r\n\t\t$contentids = isset($obj->_exclude_contentids) ? $obj->_exclude_contentids : array();\r\n\t\t$contentitems = isset($obj->_exclude_contentitems) ? $obj->_exclude_contentitems : array();\r\n\r\n\t\t/* content item excluded ? DO NOT USE ANYMORE */\r\n\t\tif (in_array((($row->id == 0) ? -1 : $row->id), $contentids))\r\n\t\t\treturn false;\r\n\r\n\t\t/*\r\n\t\t * Include = include only : selected Ids OR selected Sections OR Selected Categories)\r\n\t\t * Exclude = exclude selected Ids OR selected Sections OR Selected Categories\r\n\t\t */\r\n\r\n\t\t/* content ids */\r\n\t\tif (count($contentitems) > 0) {\r\n\t\t\t$result = in_array((($row->id == 0) ? -1 : $row->id), $contentitems);\r\n\t\t\tif ($include && $result)\r\n\t\t\t\treturn true; /* include and selected */\r\n\t\t\tif (!$include && $result)\r\n\t\t\t\treturn false; /* exclude and selected */\r\n\t\t}\r\n\r\n\t\t/* sections (docman categories) */\r\n\t\t$result = in_array((($row->catsid == 0) ? -1 : $row->catsid), $sections);\r\n\t\tif ($include && $result)\r\n\t\t\treturn true; /* include and selected */\r\n\t\tif (!$include && $result)\r\n\t\t\treturn false; /* exclude and selected */\r\n\r\n\t\tif ($include)\r\n\t\t\treturn false; /* was not included */\r\n\t\tif (!$include)\r\n\t\t\treturn true; /* was not excluded */\r\n\t}", "function isSectionEditable($sectionId){\r\n\t\t//sections no longer used\r\n\t\tif (in_array($sectionId, array (4,5))) {\r\n\t\t\t//HTML or PHP module, invalid module since that can be done in smarty templates now\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\t//disable featured levels 2-5 unless the addon is present\r\n\t\t$featuredLevels = array(13,14,15,16);\r\n\t\tif(in_array($sectionId, $featuredLevels) && !geoAddon::getInstance()->isEnabled('featured_levels')) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\t\r\n\t\treturn true;\r\n\t}", "protected function is_sealed( $section ) {\n\t\treturn true;\n\t}", "public function is_section_current($section) {\n if ($section instanceof section_info) {\n $sectioninfo = $section;\n } else {\n $sectioninfo = $this->get_section($section);\n }\n\n if ($sectioninfo->section < 1) {\n // No highlighting the general section.\n return false;\n }\n\n $course = $this->get_course();\n\n if ($this->get_section_type($sectioninfo) !== 'week') {\n // The section in question is not a week type. Is it highlighted though?\n return ($course->marker == $sectioninfo->section);\n }\n\n // Has the highlight already been set on some other non-week section?\n if ($course->marker > 0 && $this->get_section_type($course->marker) !== 'week') {\n // Yes, so it takes priority.\n return false;\n }\n\n // Figure out whether the section in question is the current week.\n $timenow = time();\n $dates = $this->get_section_dates($sectioninfo);\n return (($timenow >= $dates->start) && ($timenow < $dates->end));\n }", "public function areAllSectionsLoaded()\n {\n return $this->_loadedSection === null;\n }", "function checkSectionCategory(&$row, $include, $sections=array(), $catids=array(), $contentids=array()) {\r\n\t\t\t/* doc id excluded ? */\r\n\t\tif (in_array((($row->id == 0) ? -1 : $row->id), $contentids))\r\n\t\treturn false;\r\n\r\n\t\treturn true;\r\n }", "function defaultable_sections($section = NULL) {\r\n if (in_array($section, array('row_options', 'row_plugin', 'items_per_page'))) {\r\n return FALSE;\r\n }\r\n return parent::defaultable_sections($section);\r\n }", "function checkSectionCategory(&$row, $include, $sections=array(), $catids=array(), $contentids=array()) {\r\n\t\t/* doc id excluded ? */\r\n\t\tif (in_array((($row->REPLACEid == 0) ? -1 : $row->REPLACEid), $contentids))\r\n\t\t\treturn false;\r\n\r\n\t\t/* category included or excluded ? */\r\n\t\t$result = in_array((($row->REPLACEcatid == 0) ? -1 : $row->REPLACEcatid), $sections);\r\n\t\tif (($include && !$result) || (!$include && $result))\r\n\t\t\treturn false; /* include and not found OR exclude and found */\r\n\r\n\t\treturn true;\r\n\t}", "public function add_sections()\n {\n }", "public function section()\n {\n /*if ($this->section != '') {\n return $this->section;\n }\n else {*/\n // Kill trailing period\n $pattern = \"/\\.$/\"; // remove last \".\"\n $cleaned = $this->section_comment();\n $cleaned = trim($cleaned);\n $cleaned = preg_replace($pattern, '', $cleaned);\n\n $pattern = \"/Styleguide (.+)/\";\n preg_match_all($pattern, $cleaned, $sections);\n //$this->section = $sections[1][0];\n //return $this->section;\n return $sections[1][0];\n //}\n }", "public function getSections(): iterable;", "public function getSections()\n {\n return $this->sections;\n }", "public function hasSection($delta = 0) {\n $section_storage = $this->sectionStorage;\n $sections = $section_storage->getSections();\n return isset($sections[$delta]);\n }", "public function hasCasePart()\n\t{\n\t\treturn $this->has_case_part;\n\t}", "public function getSection() : string{\n return $this->section;\n }", "public function getSections(){\n\t\treturn $this->sections;\n\t}", "public function hasNext($section){\n\t\t$body = $this->toArray();\n\t\t$i = 0;\n\t\tforeach ($body as $key => $value) {\n\t\t\tif($key == $section){\n\t\t\t\tif((sizeof($body) - 1) > $i){\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t}\n\t\t\t$i++;\n\t\t} return false;\n\t}", "public function getAllSections();", "public function __allSections()\n\t{\n\t\t//current user course\n\t\t$userCourse = $this->Session->read('UserData.usersCourses');\n\t\t$user_course_section = $userCourse[0];\n\t\t//get Course and section name\n\t\t$course_info = $this->getCourseNameOfUser($user_course_section);\n\t\t$course_name = $course_info->course_name;\n\t\t$course_section = $course_info->section_name;\n\t\t$sectionList = array();\n\t\t//getting the course in section/all section setting(changed on 16 April, 2014)\n\t $setting = $this->__getDbSetting($user_course_section);\n\t\tif ($setting == 2) {\n\t\t\t$sections = $this->PleSetting->find('all',array('conditions'=>array('PleSetting.course'=>$course_name,'PleSetting.setting_value'=>2),'fields'=>array('section')));\n\t\t\tforeach ($sections as $section) {\n\t\t\t\t$sectionList[] = trim($section['PleSetting']['section']);\n\t\t\t}\n\t\t\t$sectionList[] = $course_section;\n\t } else {\n\t\t\t//add current user login section\n\t\t\t$sectionList[] = $course_section;\n\t }\n\t\t$tz = array_unique($sectionList);\n\t\treturn $tz;\n\t}", "public function render_section() {\n \n }", "public function define_sections() {\r\n\t\t$this->options->sections = $this->to_array();\n\t}", "public function renderSections()\n {\n return $this->render(function () {\n return $this->factory->getSections();\n });\n }", "private function renderSections() {\n\t\t$result = '';\n\n\t\tforeach ($this->sections as $key => $section) {\n\t\t\t$columns = $this->retrieveColumns($section['uid']);\n\n\t\t\tswitch (count($columns)) {\n\t\t\t\tcase 0:\n\t\t\t\t\t$renderedColumns = '';\n\t\t\t\t\tbreak;\n\t\t\t\tcase 1:\n\t\t\t\t\t$renderedColumns = $this->renderOneColumn($columns[0]);\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\t$renderedColumns = $this->renderTwoColumns($columns);\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t\t$class = ($key == 0) ? 'tx-explanationbox-pi1-active' : 'tx-explanationbox-pi1-inactive';\n\n\t\t\t$this->setMarker('class_section', $class);\n\t\t\t$this->setMarker('section_number', $key);\n\t\t\t$this->setMarker('section_columns', $renderedColumns);\n\n\t\t\t$result .= $this->getSubpart('SECTION_BODY');\n\t\t}\n\n\t\t$this->setSubpart('SECTION_BODY', $result);\n\t}", "function sections()\n\t{\n\t\t$this->ipsclass->input['step']++;\n\t\t$uninstall = ( $this->ipsclass->input['un'] == 1 ) ? \"&amp;un=1\" : \"\";\n\t\t\n\t\t$object = ( $this->tasks['sections'] == 1 ) ? 'Settings Group' : 'Settings Groups';\n\t\t$operation = ( $this->ipsclass->input['un'] ) ? 'removed' : 'created';\n\t\t$sectionkeys = array();\n\t\t$group = \"\";\n\t\t$groups = array();\n\t\t\n\t\tforeach ( $this->xml_array['sections_group']['section'] as $k => $v )\n\t\t{\n\t\t\t$sectionkeys[] = \"'{$v['conf_title_keyword']['VALUE']}'\";\n\t\t}\n\t\t\n\t\t$this->ipsclass->DB->do_delete( 'conf_settings_titles', \"conf_title_keyword IN (\".implode( \",\", $sectionkeys ).\")\" );\n\t\t\n\t\tif ( !$this->ipsclass->input['un'] )\n\t\t{\n\t\t\tforeach ( $this->xml_array['sections_group']['section'] as $k => $v )\n\t\t\t{\n\t\t\t\t$groups[] = $this->_add_section( $v );\n\t\t\t}\n\t\t\t\n\t\t\t$group = \"&amp;group=\".implode( \"|\", $groups );\n\t\t}\n\t\t\n\t\t$this->ipsclass->admin->redirect( \"{$this->ipsclass->form_code}&amp;code=work&amp;mod={$this->ipsclass->input['mod']}&amp;step={$this->ipsclass->input['step']}{$uninstall}{$group}&amp;st={$this->ipsclass->input['st']}\", \"{$this->xml_array['mod_info']['title']['VALUE']}<br />{$this->tasks['sections']} {$object} {$operation}....\" );\n\t}", "protected function is_sections_front_page() {\n\n\t\tif ( get_option( 'show_on_front' ) !== 'page' ) {\n\t\t\treturn false;\n\t\t}\n\n\t\t$frontpage_id = get_option( 'page_on_front' );\n\n\t\tif ( empty( $frontpage_id ) ) {\n\t\t\treturn false;\n\t\t}\n\n\t\tif ( $this->post_id !== $frontpage_id ) {\n\t\t\treturn false;\n\t\t}\n\n\t\t$page_template = get_post_meta( $frontpage_id, '_wp_page_template', true );\n\t\tif ( ! empty( $page_template ) && 'default' !== $page_template ) {\n\t\t\treturn false;\n\t\t}\n\n\t\t$disabled_frontpage = get_theme_mod( 'disable_frontpage_sections', false );\n\t\tif ( true === (bool) $disabled_frontpage ) {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn true;\n\n\t}", "public function hasStudySummaries() {\n return $this->_has(13);\n }", "public function display_section() {\n\t\t// do nothing - @todo Possibly add description here later if we have more options to add.\n\t}", "function sectionExists($sectionName, $sectionID='') {\n // if section doesn't exist at all, return\n if (!isset($this->sectionList[$sectionName])) {\n return false;\n }\n // check for sectionID?\n if ($sectionID == '') {\n return true;\n }\n else {\n return $this->sectionList[$sectionName]->sectionIDexists($sectionID);\n }\n }", "public function testAllOneSection() {\n $practices = Practice::getTrainings($this->section, $this->user);\n\n $this->assertEquals($practices[0]->section_id, $this->section->id);\n $this->assertEquals($practices[1]->section_id, $this->section->id);\n $this->assertEquals($practices[2]->section_id, $this->section->id);\n $this->assertEquals($practices[3]->section_id, $this->section->id);\n $this->assertEquals($practices[4]->section_id, $this->section->id);\n }", "public function print_section_info()\n {\n print \"Don't use long sentences below!\";\n }", "public function get_sections_count()\n\t{\n\t\t$sections = $this->get_sections();\n\t\treturn count($sections);\n\t}", "public function getSection(): string\n {\n return $this->section;\n }", "public function exists(string $section): bool;", "public function print_multiple_section_page($course, $sections, $mods, $modnames, $modnamesused) {\n global $PAGE;\n\n $modinfo = get_fast_modinfo($course);\n $course = course_get_format($course)->get_course();\n\n $context = context_course::instance($course->id);\n // Title with completion help icon.\n $completioninfo = new completion_info($course);\n echo $completioninfo->display_help_icon();\n echo $this->output->heading($this->page_title(), 2, 'accesshide');\n\n // Copy activity clipboard..\n echo $this->course_activity_clipboard($course, 0);\n\n // Now the list of sections..\n echo $this->start_section_list();\n\n foreach ($modinfo->get_section_info_all() as $section => $thissection) {\n if ($section == 0) {\n // 0-section is displayed a little different then the others\n if ($thissection->summary or !empty($modinfo->sections[0]) or $PAGE->user_is_editing()) {\n echo $this->section_header($thissection, $course, false, 0);\n echo $this->courserenderer->course_section_cm_list($course, $thissection, 0);\n echo $this->courserenderer->course_section_add_cm_control($course, 0, 0);\n echo $this->section_footer();\n }\n continue;\n }\n if ($section > $course->numsections) {\n // activities inside this section are 'orphaned', this section will be printed as 'stealth' below\n continue;\n }\n // Show the section if the user is permitted to access it, OR if it's not available\n // but there is some available info text which explains the reason & should display.\n $showsection = $thissection->uservisible ||\n ($thissection->visible && !$thissection->available &&\n !empty($thissection->availableinfo));\n if (!$showsection) {\n // If the hiddensections option is set to 'show hidden sections in collapsed\n // form', then display the hidden section message - UNLESS the section is\n // hidden by the availability system, which is set to hide the reason.\n if (!$course->hiddensections && $thissection->available) {\n echo $this->section_hidden($section, $course->id);\n }\n\n continue;\n }\n\n if (!$PAGE->user_is_editing() && $course->coursedisplay == COURSE_DISPLAY_MULTIPAGE) {\n // Display section summary only.\n echo $this->section_summary($thissection, $course, null);\n } else {\n echo $this->section_header($thissection, $course, false, 0);\n if ($thissection->uservisible) {\n echo $this->courserenderer->course_section_cm_list($course, $thissection, 0);\n echo $this->courserenderer->course_section_add_cm_control($course, $section, 0);\n }\n echo $this->section_footer();\n }\n }\n\n if ($PAGE->user_is_editing() and has_capability('moodle/course:update', $context)) {\n // Print stealth sections if present.\n foreach ($modinfo->get_section_info_all() as $section => $thissection) {\n if ($section <= $course->numsections or empty($modinfo->sections[$section])) {\n // this is not stealth section or it is empty\n continue;\n }\n echo $this->stealth_section_header($section);\n echo $this->courserenderer->course_section_cm_list($course, $thissection, 0);\n echo $this->stealth_section_footer();\n }\n\n echo $this->end_section_list();\n\n echo html_writer::start_tag('div', array('id' => 'changenumsections', 'class' => 'mdl-right'));\n\n // Increase number of sections.\n $straddsection = get_string('increasesections', 'moodle');\n $url = new moodle_url('/course/changenumsections.php',\n array('courseid' => $course->id,\n 'increase' => true,\n 'sesskey' => sesskey()));\n $icon = $this->output->pix_icon('t/switch_plus', $straddsection);\n echo html_writer::link($url, $icon.get_accesshide($straddsection), array('class' => 'increase-sections'));\n\n if ($course->numsections > 0) {\n // Reduce number of sections sections.\n $strremovesection = get_string('reducesections', 'moodle');\n $url = new moodle_url('/course/changenumsections.php',\n array('courseid' => $course->id,\n 'increase' => false,\n 'sesskey' => sesskey()));\n $icon = $this->output->pix_icon('t/switch_minus', $strremovesection);\n echo html_writer::link($url, $icon.get_accesshide($strremovesection), array('class' => 'reduce-sections'));\n }\n\n echo html_writer::end_tag('div');\n } else {\n echo $this->end_section_list();\n }\n\n }", "public function getSections(): array\n {\n return $this->sections;\n }", "public function sectionExists($page)\n {\n return $this->files->exists(base_path($this->path.$page.'.md'));\n }", "public static function special_sections() {\n if ( get_post_type() != 'property' ) {\n return;\n }\n\n $price_comparison = self::get_price_comparison();\n if ( count( $price_comparison ) ) {\n echo Inventor_Template_Loader::load( 'price-comparison', $price_comparison, INVENTOR_PROPERTIES_DIR );\n }\n echo Inventor_Template_Loader::load( 'amenities', array(), INVENTOR_PROPERTIES_DIR );\n echo Inventor_Template_Loader::load( 'floor-plans', array(), INVENTOR_PROPERTIES_DIR );\n echo Inventor_Template_Loader::load( 'valuation', array(), INVENTOR_PROPERTIES_DIR );\n echo Inventor_Template_Loader::load( 'public-facilities', array(), INVENTOR_PROPERTIES_DIR );\n }", "public function coverageSection(string $section);", "public function isUsedInAssessments(){\n return ($this->assessments == 1);\n }", "public function isCatSpec()\n {\n return $this->is_cs;\n }", "function wpex_portfolio_single_meta_sections() {\n\n\t// Default sections\n\t$sections = array( 'date', 'author', 'categories', 'comments' );\n\n\t// Apply filters for easy modification\n\t$sections = apply_filters( 'wpex_portfolio_single_meta_sections', $sections );\n\n\t// Turn into array if string\n\tif ( $sections && ! is_array( $sections ) ) {\n\t\t$sections = explode( ',', $sections );\n\t}\n\n\t// Return sections\n\treturn $sections;\n\n}", "public function isUserInSection($user){\n\t\t$sql = \"SELECT id_user FROM tbl_user_section_assignment WHERE id_section=:id_section AND id_user=:id_user\";\n\t\t$command = Yii::app()->db->createCommand($sql);\n\t\t$command->bindValue(\":id_section\", $this->id_section, PDO::PARAM_INT);\n\t\t$command->bindValue(\":id_user\", $user->id, PDO::PARAM_INT);\n\t\treturn $command->execute()==1;\n\t}", "function erp_is_current_page( $page, $section, $subsection = '' ) {\n if ( empty( $_GET['page'] ) || $_GET['page'] != $page ) {\n return false;\n }\n\n if ( empty( $_GET['section'] ) || $_GET['section'] != $section ) {\n return false;\n }\n\n if ( !empty( $subsection ) ) {\n if ( empty( $_GET['sub-section'] ) || $_GET['sub-section'] != $subsection ) {\n return false;\n }\n }\n\n return true;\n}", "public function getSection() {\n return $this->section;\n }", "public function section($value = null)\n\t{\n\t\tif ($value != null)\n\t\t{\n\t\t\t$this->_section = $value;\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn $this->_section;\n\t\t}\n\t}", "public function hasStudySummary() {\n return $this->_has(7);\n }", "function cps_sections($course, $where=null) {\n global $CFG;\n\n $sql = \"SELECT s.*, c.department, c.course_number\n FROM {$CFG->prefix}block_courseprefs_sections s,\n {$CFG->prefix}block_courseprefs_courses c\n WHERE s.coursesid = c.id\n AND s.idnumber = '{$course->idnumber}'\n \".(($where) ? \"AND {$where}\" : '').\"\n ORDER BY s.section_number\";\n return get_records_sql($sql);\n}", "public function has(string $section, string $key) : bool;", "public function supportsCourseOfferingHierarchy() {\n \treturn $this->manager->supportsCourseOfferingHierarchy();\n\t}", "public function supportsCourseOfferingHierarchyDesign() {\n \treturn $this->manager->supportsCourseOfferingHierarchyDesign();\n\t}", "public function pageHasToc()\n {\n return $this->toc() ? true : false;\n }", "function cleanyeti_sections_callback( $section_passed ) {\n\tglobal $cleanyeti_tabs;\n\t$cleanyeti_tabs = cleanyeti_get_settings_page_tabs();\n\tforeach ( $cleanyeti_tabs as $tabname => $tab ) {\n\t\t$tabsections = $tab['sections'];\n\t\tforeach ( $tabsections as $sectionname => $section ) {\n\t\t\tif ( 'cleanyeti_' . $sectionname . '_section' == $section_passed['id'] ) {\n\t\t\t\t?>\n\t\t\t\t<p><?php echo $section['description']; ?></p>\n\t\t\t\t<?php\n\t\t\t}\n\t\t}\n\t}\n}", "public function hasStudySummaries() {\n return $this->_has(4);\n }", "public function testAllOneSectionNoRepeat() {\n\n $this->setFinished($this->section, 8);\n\n $practices = Practice::getTrainings($this->section, $this->user);\n\n $this->assertEquals($practices[0]->section_id, $this->section->id);\n $this->assertEquals($practices[1]->section_id, $this->section->id);\n $this->assertTrue(!isset($practices[2]));\n }", "public static function validateSection($section)\n\t{\n\t\tif (JFactory::getApplication()->isClient('site'))\n\t\t{\n\t\t\t// On the front end we need to map some sections\n\t\t\tswitch ($section)\n\t\t\t{\n\t\t\t\t// Editing an download\n\t\t\t\tcase 'form':\n\n\t\t\t\t\t// Category list view\n\t\t\t\tcase 'featured':\n\t\t\t\tcase 'category':\n\t\t\t\t\t$section = 'download';\n\t\t\t}\n\t\t}\n\n\t\tif ($section != 'download')\n\t\t{\n\t\t\t// We don't know other sections\n\t\t\treturn null;\n\t\t}\n\n\t\treturn $section;\n\t}", "public function isNavbarSectionmenu()\r\n\t{\r\n\t\treturn $this->navbarSectionmenu;\r\n\t}", "public function getSections(): array {\n\t\t\n\t\tif (isset($this->sections)) {\n\t\t\treturn $this->sections;\n\t\t}\n\t\t\n\t\t$this->sections = [];\n\t\t\n\t\t$sections = elgg_extract('sections', $this->config, []);\n\t\tforeach ($sections as $section) {\n\t\t\t$this->sections[] = new Section($section);\n\t\t}\n\t\t\n\t\treturn $this->sections;\n\t}", "private function section_comment()\n {\n $pattern = \"/Styleguide \\d/i\"; // /i for case insensitive\n $text_section = '';\n $values_comment_sections = array_values($this->comment_sections());\n foreach ( $values_comment_sections as $key => $text) {\n if (preg_match($pattern, $text)) {\n $text_section = $text;\n break;\n }\n }\n\n return $text_section;\n }", "public function init_sections() {\n\t\t// Override this function in your class and assign the array of sections to $this->sections.\n\t\t_e( 'Override init_sections() in your class.', '{plugin_jump_starter_textdomain}' );\n\t}", "public function hasStudySummaries() {\n return $this->_has(18);\n }", "public function getSections(){\n return $this->getSite()->getSections();\n }", "public function hasPrevious($section){\n\t\t$body = $this->toArray();\n\t\t$i = 0;\n\t\tforeach ($body as $key => $value) {\n\t\t\tif($key == $section){\n\t\t\t\tif($i == 0){\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}\n\t\t\t$i++;\n\t\t} return true;\n\t}", "public function gen_section(){\n $data = array(\n \"txtinicio\"=>\"Inicio\",\n \"rutainicio\" => \"/admin/inicio\",\n \"txtmodulo\" => \"CONTABILIDAD\",\n \"section\" => \"Contabilidad\",\n \"rutamodulo\" => \"/admin/tipocuenta\",\n \"ventana\" => \"Niveles\"\n );\n\n return $data;\n }", "function display_courses_before( $section ) {\n\tif ( get_field( 'section_layout', $section ) !== 'courses' ) {\n\t\treturn '';\n\t}\n\n\treturn '<div id=\"coursesAccordion\" role=\"tablist\">';\n}", "public function section_aside(){\n\t\tif($this->seccion['aside'] != 'false'){\n\t\t\tinclude 'secciones/'.$this->seccion['aside'].'.php';\n\t\t}\n\t}", "public function isSummerSemester()\n {\n if ($this->semesterNumber > 8) {\n return true;\n }\n\n return false;\n }", "public function getEventClassSections();", "public function remove_sections($active, $section)\n {\n $sections_ids = apply_filters(\n 'mo_optin_customizer_sections_ids',\n array(\n $this->configuration_section_id,\n $this->integration_section_id,\n $this->design_section_id,\n $this->fields_section_id,\n $this->headline_section_id,\n $this->description_section_id,\n $this->note_section_id,\n $this->setup_display_rule_section_id,\n $this->user_targeting_display_rule_section_id,\n $this->click_launch_display_rule_section_id,\n $this->exit_intent_display_rule_section_id,\n $this->x_seconds_display_rule_section_id,\n $this->x_scroll_display_rule_section_id,\n $this->x_page_views_display_rule_section_id,\n $this->page_filter_display_rule_section_id,\n $this->query_filter_display_rule_section_id,\n $this->user_targeting_display_rule_section_id,\n $this->schedule_display_rule_section_id,\n $this->success_section_id,\n $this->embed_section_id\n )\n );\n\n return in_array($section->id, $sections_ids);\n }", "public function testSectionLabels() {\n $assert_session = $this->assertSession();\n $page = $this->getSession()->getPage();\n\n $this->drupalLogin($this->drupalCreateUser([\n 'configure any layout',\n 'administer node display',\n ]));\n\n $this->drupalGet('admin/structure/types/manage/bundle_with_section_field/display/default');\n $page->checkField('layout[enabled]');\n $page->pressButton('Save');\n $page->checkField('layout[allow_custom]');\n $page->pressButton('Save');\n\n $this->drupalGet('node/1/layout');\n $page->clickLink('Add section');\n $page->clickLink('One column');\n $page->fillField('layout_settings[label]', 'My Cool Section');\n $page->pressButton('Add section');\n $assert_session->pageTextContains('My Cool Section');\n $page->pressButton('Save layout');\n $assert_session->pageTextNotContains('My Cool Section');\n }", "public function isActive(){\n return $this->_section->active;\n }", "function display_section_content( $retval, $section ) {\n\t$layout = get_field( 'section_layout', $section );\n\tswitch ( $layout ) {\n\t\tcase 'courses':\n\t\t\t$retval = display_course( $section );\n\t\t\tbreak;\n\t\tcase 'timeline':\n\t\t\t$retval = display_timeline_items( $section );\n\t\t\tbreak;\n\t\tcase 'default':\n\t\tdefault:\n\t\t\t$retval = \\UCF_Section_Common::ucf_section_display( $section );\n\t\t\tbreak;\n\t}\n\n\treturn $retval;\n}", "private function is_valid_sub_section( $sub_section_key = '' ) {\n\t\t\t$is_sub_section = false;\n\t\t\tif ( ! empty( $sub_section_key ) ) {\n\t\t\t\tif ( in_array( $sub_section_key, $this->get_sub_sections_keys(), true ) ) {\n\t\t\t\t\t$is_sub_section = true;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn $is_sub_section;\n\t\t}", "protected function getSection() {\n\t\treturn 'poker';\n }", "public function checkUserSection($section){\n $query = \"SELECT user_id \n FROM tbl_author_sort\n WHERE user_id = '{$this->getUser()}'\n AND section_handle = '{$section}'\n LIMIT 1\n \";\n if(Symphony::Database()->fetchVar('user_id',0,$query)){\n return true;\n }\n return false;\n }", "public function hasCollapsibles() {\n\t\tforeach ($this->fieldsets as $block) {\n\t\t\tif ($block instanceof BlockInfo) {\n\t\t\t\tforeach ($block->getChapters() as $chapter) {\n\t\t\t\t\tif ($chapter->isCollapsible()) {\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}\n\t\treturn false;\n\t}", "private function isHeader(): bool\n {\n return $this->translation->getOriginal() === '' && $this->translation->getContext() === null;\n }", "public function getHasMenuSection() {\n\t\treturn $this->hasMenuSection;\n\t}", "public function supportsCourseOfferingHierarchySequencing() {\n \treturn $this->manager->supportsCourseOfferingHierarchySequencing();\n\t}", "public function sectionEnd() {}", "public function sectionEnd() {}", "public function feature_section() {\n\t\t$out[] = '<!--Features Section--><section class=\"feature-styles\" id=\"features\" >';\n\t\t$i = 0;\n\t\tforeach( $this->features() as $feature) {\n\t\t\t$left = false;\n\t\t\tif ( 1 == $i ) {\n\t\t\t\t$left = true;\n\t\t\t}\n\t\t\t$out[] = $this->feature( $feature, $left );\n\t\t\t$i++;\n\t\t}\n\n\t\t$out[] = '</section>';\n\t\treturn implode( '', $out );\n\n\t}" ]
[ "0.8254928", "0.8228693", "0.7555296", "0.6884165", "0.67736775", "0.67736775", "0.6744439", "0.6702657", "0.66091704", "0.6535712", "0.64787686", "0.646762", "0.6374976", "0.62310344", "0.6209734", "0.61574244", "0.61574244", "0.612856", "0.61254096", "0.61069214", "0.610641", "0.6036479", "0.60228777", "0.59956604", "0.5988373", "0.5962781", "0.5960096", "0.5945717", "0.5906132", "0.5879345", "0.58566225", "0.58442247", "0.58363825", "0.58305645", "0.5821058", "0.5806119", "0.5780671", "0.5766206", "0.5760872", "0.57205266", "0.5715198", "0.5708539", "0.5702411", "0.5683649", "0.5671517", "0.5665365", "0.5654476", "0.5647739", "0.5629357", "0.56264657", "0.5620902", "0.5597717", "0.55815613", "0.55798435", "0.5564246", "0.5562298", "0.556138", "0.55591697", "0.55555534", "0.55400556", "0.5536509", "0.5512155", "0.5507982", "0.5483203", "0.54824364", "0.54777586", "0.5460721", "0.54423624", "0.54399467", "0.54311126", "0.54256445", "0.54226136", "0.5417492", "0.53990555", "0.5397517", "0.53955096", "0.53941935", "0.5373577", "0.53702295", "0.53581727", "0.5356687", "0.5355948", "0.5355364", "0.53553176", "0.5350789", "0.5337023", "0.5333073", "0.5323904", "0.5314689", "0.5314597", "0.53119737", "0.5308339", "0.5306559", "0.5305639", "0.52918875", "0.5291143", "0.52852714", "0.52852714", "0.5282168" ]
0.82838964
1
Returns the display name of the given section that the course prefers. Use section name is specified by user. Otherwise use default ("Topic ")
public function get_section_name($section) { $section = $this->get_section($section); if ((string) $section->name !== '') { return format_string($section->name, true, array('context' => context_course::instance($this->courseid))); } else if ($section->section == 0) { return get_string('section0name', 'format_course_menu'); } else { return get_string('topic') . ' ' . $section->section; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function get_section_name($section) {\n\n $section = $this->get_section($section);\n\n if ((string)$section->name !== '') {\n\n return format_string($section->name, true,\n\n array('context' => context_course::instance($this->courseid)));\n\n } else if ($section->section == 0) {\n\n return get_string('section0name', 'format_splash');\n\n } else {\n\n return get_string('topic').' '.$section->section;\n\n }\n\n }", "public function get_default_section_name($section) {\n if ($section->section == 0) {\n // Return the general section.\n return get_string('section0name', 'format_usqflexopen');\n } else {\n $thissectioninfo = $this->get_section($section);\n $thissectiontype = $this->get_section_type($thissectioninfo);\n\n switch ($thissectiontype) {\n case 'week':\n $dates = $this->get_section_dates($thissectioninfo);\n\n // We subtract 24 hours for display purposes.\n $dates->end = ($dates->end - 86400);\n\n $dateformat = get_string('strftimedateshort');\n $weekday = userdate($dates->start, $dateformat);\n $endweekday = userdate($dates->end, $dateformat);\n return $weekday.' - '.$endweekday;\n\n case 'getstarted':\n return get_string('sectiontype' . $thissectiontype, 'format_usqflexopen');\n\n case 'topic':\n case 'assess':\n $numoftype = $this->get_section_number_of_type($thissectioninfo, $thissectiontype);\n return get_string('sectiontype' . $thissectiontype, 'format_usqflexopen') . ' ' . $numoftype;\n }\n\n throw new coding_exception('unhandled sectiontype ' . $thissectiontype);\n }\n }", "public function get_section_name($section) {\n $section = $this->get_section($section);\n if ((string)$section->name !== '') {\n return format_string($section->name, true,\n array('context' => context_course::instance($this->courseid)));\n } else {\n return $this->get_default_section_name($section);\n }\n }", "public function getSectionName(): string\n {\n return $this->sectionName;\n }", "public function getSection(): string\n {\n return $this->section;\n }", "function getExpertSectionTitle($sectionid) {\r\n\t\t$database = & JFactory::getDBO();\r\n\r\n\t\tif ($sectionid == 0)\r\n\t\t\treturn '(0) All ';\r\n\r\n\t\t$query = \"SELECT id, catname as title\"\r\n\t\t\t\t. \"\\n FROM #__eventlist_categories\"\r\n\t\t\t\t. \"\\n WHERE id=$sectionid\"\r\n\t\t;\r\n\t\t$database->setQuery($query);\r\n\t\t$row = $database->loadObjectList();\r\n\t\treturn \"($sectionid) \" . $row[0]->title;\r\n\t}", "public function getSectionName()\n {\n if(is_array($this->_loadedSection) && count($this->_loadedSection) === 1) {\n $this->_loadedSection = $this->_loadedSection[0];\n }\n return $this->_loadedSection;\n }", "public function getSection() : string{\n return $this->section;\n }", "function _webform_help_email($section) {\r\n switch ($section) {\r\n case 'admin/settings/webform#email_description':\r\n return t(\"A textfield that automatically fills in a logged-in user's e-mail.\");\r\n }\r\n}", "public function getTopic():string\n\t{\n\t\tif (!empty($this->_topic)) {\n\t\t\treturn $this->_topic;\n\t\t} else {\n\t\t\treturn '';\n\t\t}\n\t}", "public function get_settings_section_name() {\n return $this->type.'_'.$this->name;\n }", "function fopr_template_section( $name ) {\n\t$id = get_the_ID();\n\tswitch ( $name ) {\n\t\tcase 'example-template-section':\n\t\t\t?>\n\t\t\t<section class=\"[ section section--full ] example\">\n\t\t\t\tHi, I'm an example section to show how to use templates mixed with Gutenberg blocks.\n\t\t\t\tJust use the Template Section block and enter the name of this case.\n\t\t\t\tThis way you can use gutenberg blocks in one section and a section from the template in another.\n\t\t\t</section>\n\t\t\t<?php\n\t\t\tbreak;\n\n\t\tdefault:\n\t\t\techo 'Template section \"' . esc_html( $name ) . '\" not found.';\n\t}\n}", "public function section($name, $default = null);", "function getSection($section='') {\r\n if(!empty($section)) {\r\n return $this->parsed_ini_file[$section];\r\n } else {\r\n return '';\r\n }\r\n }", "public function section($name, $default = null)\n {\n if (!isset($this->sections[$name])) {\n return $default;\n }\n\n return $this->sections[$name];\n }", "public function get_name()\n {\n return 'section-heading';\n }", "private function get_default_section( $section ) {\n\n $default_section = array(\n 'title' => isset ($section['title']) ? $section['title'] : '',\n 'desc' => isset ($section['desc']) ? $section['desc'] : '',\n 'display' => isset ($section['display']) ? $section['display'] : '',\n 'action' => isset($section['action']) ? $section['action'] : '',\n 'actions' => isset($section['actions']) ? $section['actions'] : array(),\n );\n\n return $default_section;\n }", "public function getTopic(): string\n {\n return $this->topic;\n }", "public function display_section() {\n\t\t// do nothing - @todo Possibly add description here later if we have more options to add.\n\t}", "function give_get_current_setting_section() {\n\t// Get current tab.\n\t$current_tab = give_get_current_setting_tab();\n\n\t/**\n\t * Filter the default section for current setting page tab.\n\t *\n\t * @since 1.8\n\t *\n\t * @param string\n\t */\n\t$default_current_section = apply_filters( \"give_default_setting_tab_section_{$current_tab}\", '' );\n\n\t// Get current section.\n\t$current_section = empty( $_REQUEST['section'] ) ? $default_current_section : urldecode( $_REQUEST['section'] );\n\n\t// Output.\n\treturn $current_section;\n}", "function display_course( $section ) {\n\t$retval = '';\n\n\t// Back out early if this section isn't courses, or is empty:\n\tif (\n\t\tget_field( 'section_layout', $section ) !== 'courses'\n\t\t|| ! have_rows( 'courses', $section )\n\t) {\n\t\treturn $retval;\n\t}\n\n\t$course_num = 0;\n\n\twhile( have_rows( 'courses', $section ) ) : $course = the_row();\n\t\t$course_num++;\n\t\t$course_title = get_sub_field( 'course_title' );\n\t\t$course_information = get_sub_field( 'course_information' );\n\n\t\tob_start();\n\t?>\n\t<div class=\"card card-secondary\">\n\t\t<div class=\"card-header\" role=\"tab\" id=\"courseHeading<?php echo $course_num; ?>\">\n\t\t\t<h3 class=\"h5 mb-0\">\n\t\t\t\t<a data-toggle=\"collapse\" href=\"#courseCollapse<?php echo $course_num; ?>\" aria-expanded=\"true\" aria-controls=\"courseCollapse<?php echo $course_num; ?>\">\n\t\t\t\t<?php echo $course_title; ?>\n\t\t\t\t</a>\n\t\t\t</h3>\n\t\t\t</div>\n\t\t\t<div id=\"courseCollapse<?php echo $course_num; ?>\" class=\"collapse\" role=\"tabpanel\" aria-labelledby=\"courseHeading<?php echo $course_num; ?>\" data-parent=\"#coursesAccordion\">\n\t\t\t<div class=\"card-block\">\n\t\t\t\t<?php echo $course_information; ?>\n\t\t\t</div>\n\t\t</div>\n\t</div>\n\n\t<?php\n\t\t$retval .= trim( ob_get_clean() );\n\n\tendwhile;\n\n\treturn $retval;\n}", "protected function getModuleSection($section, $default=array(), $opts=Config::LOG_ERRORS) {\n $config = $this->getModuleConfig();\n if (!$section = $config->getSection($section, $opts)) {\n $section = $default;\n }\n return $section;\n }", "public function getTopicFullName(): string\n {\n return $this->_topicFullName;\n }", "private function get_current_sub_section() {\n\t\t\t// phpcs:ignore WordPress.Security.NonceVerification.Recommended\n\t\t\tif ( ( isset( $_GET[ self::$section_url_param ] ) ) && ( ! empty( $_GET[ self::$section_url_param ] ) ) ) {\n\t\t\t\t// phpcs:ignore WordPress.Security.NonceVerification.Recommended\n\t\t\t\t$this->current_sub_section = sanitize_text_field( wp_unslash( $_GET[ self::$section_url_param ] ) );\n\t\t\t\tif ( ! $this->is_valid_sub_section( $this->current_sub_section ) ) {\n\t\t\t\t\t$this->current_sub_section = '';\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn $this->current_sub_section;\n\t\t}", "protected function page_title() {\n return get_string('topicoutline');\n }", "protected function getSection() {\n\t\treturn 'poker';\n }", "public function getName(): string\n {\n return 'info.topic';\n }", "public function defaultName() { return \"Enter the category name...\"; }", "function display_section_content( $retval, $section ) {\n\t$layout = get_field( 'section_layout', $section );\n\tswitch ( $layout ) {\n\t\tcase 'courses':\n\t\t\t$retval = display_course( $section );\n\t\t\tbreak;\n\t\tcase 'timeline':\n\t\t\t$retval = display_timeline_items( $section );\n\t\t\tbreak;\n\t\tcase 'default':\n\t\tdefault:\n\t\t\t$retval = \\UCF_Section_Common::ucf_section_display( $section );\n\t\t\tbreak;\n\t}\n\n\treturn $retval;\n}", "public function section()\n {\n /*if ($this->section != '') {\n return $this->section;\n }\n else {*/\n // Kill trailing period\n $pattern = \"/\\.$/\"; // remove last \".\"\n $cleaned = $this->section_comment();\n $cleaned = trim($cleaned);\n $cleaned = preg_replace($pattern, '', $cleaned);\n\n $pattern = \"/Styleguide (.+)/\";\n preg_match_all($pattern, $cleaned, $sections);\n //$this->section = $sections[1][0];\n //return $this->section;\n return $sections[1][0];\n //}\n }", "function display_courses_before( $section ) {\n\tif ( get_field( 'section_layout', $section ) !== 'courses' ) {\n\t\treturn '';\n\t}\n\n\treturn '<div id=\"coursesAccordion\" role=\"tablist\">';\n}", "function display_courses( $section ) {\n\tob_start();\n\n\techo display_courses_before( $section );\n\techo display_course( $section );\n\techo display_courses_after( $section );\n\n\treturn trim( ob_get_clean() );\n}", "public function get_title()\n {\n return __('Section Heading', 'careerfy-frame');\n }", "public function getTopic()\n {\n $topic = implode(\" \", array_map( \"trim\", file('topic.log', FILE_SKIP_EMPTY_LINES)));\n return $topic;\n }", "function displayHeader($section)\r\n{\r\n global $userName;\r\n\r\n echo '<div id=\"header\">';\r\n\r\n switch ($section) {\r\n case HOME:\r\n echo '<h1>Home</h1>';\r\n break;\r\n case SEARCH:\r\n echo '<h1>Search</h1>';\r\n break;\r\n case NEWLISTING:\r\n echo '<h1>Create Listing</h1>';\r\n break;\r\n case LISTING:\r\n echo '<h1>Listing</h1>';\r\n break;\r\n case REGISTER:\r\n echo '<h1>Register</h1>';\r\n break;\r\n case ADMIN:\r\n echo '<h1>Admin portal</h1>';\r\n break;\r\n }\r\n echo '</div>' . \"\\n\";\r\n}", "function sandwich_drush_help($section) {\n switch ($section) {\n case 'drush:make-me-a-sandwich':\n return dt(\"This command will make you a delicious sandwich, just how you like it.\");\n // The 'title' meta item is used to name a group of\n // commands in `drush help`. If a title is not defined,\n // the default is \"All commands in ___\", with the\n // specific name of the commandfile (e.g. sandwich).\n // Command files with less than four commands will\n // be placed in the \"Other commands\" section, _unless_\n // they define a title. It is therefore preferable\n // to not define a title unless the file defines a lot\n // of commands.\n case 'meta:sandwich:title':\n return dt(\"Sandwich commands\");\n // The 'summary' meta item is displayed in `drush help --filter`,\n // and is used to give a general idea what the commands in this\n // command file do, and what they have in common.\n case 'meta:sandwich:summary':\n return dt(\"Automates your sandwich-making business workflows.\");\n }\n}", "public function getTopic();", "public function getTopic();", "function get_template_section( $slug, $name = null ) {\n\tdo_action( \"get_template_part_{$slug}\", $slug, $name );\n\n\t$templates = array();\n\tif ( isset($name) )\n\t\t$templates[] = \"template-sections/{$slug}-{$name}.php\";\n\n\t$templates[] = \"template-sections/{$slug}.php\";\n\n\tlocate_template($templates, true, false);\n\t\n}", "public function get_section_type($section) {\n if ($section instanceof section_info) {\n $sectioninfo = $section;\n } else {\n $sectioninfo = $this->get_section($section);\n }\n if (!isset($sectioninfo->sectiontype) || $sectioninfo->sectiontype === 'default') {\n $courseformatoptions = $this->get_format_options();\n return $courseformatoptions['defaultsectiontype'];\n } else {\n return $sectioninfo->sectiontype;\n }\n }", "function section($sectionName)\n {\n foreach ($this->input as $inputSection) {\n switch ($sectionName) {\n case 'fonttbl':\n if (preg_match('#^\\\\\\fonttbl#', $inputSection[0], $matches)) {\n return $inputSection[0];\n }\n break;\n case 'colortbl':\n if (preg_match('#^\\\\\\colortbl#', $inputSection[0], $matches)) {\n return $inputSection[0];\n }\n break;\n }\n }\n }", "function getTopicNameByID($topicID) {\n\t\tglobal $DB, $menuvar, $safs_config;\n\t\t$topicName = \"\";\n\t\t\n\t\t$sql = \"SELECT name FROM `\" . DBTABLEPREFIX . \"topics` WHERE id='\" . $topicID . \"' LIMIT 1\";\n\t\t$result = $DB->query($sql);\n\t\t\t\t\n\t\tif ($result && $DB->num_rows() > 0) {\n\t\t\twhile ($row = $DB->fetch_array($result)) {\t\n\t\t\t\t$topicName = $row['name'];\n\t\t\t}\n\t\t\t$DB->free_result($result);\n\t\t}\n\t\t\n\t\treturn $topicName;\n\t}", "public function show(section $section)\n {\n //\n }", "function display_courses_after( $section ) {\n\tif ( get_field( 'section_layout', $section ) !== 'courses' ) {\n\t\treturn '';\n\t}\n\n\treturn '</div>';\n}", "private function get_progression_title($sectionidx) {\n $stringexists = get_string_manager()->string_exists('badges-' . $this->get_visual_preset() . '-progression-title-' .\n $sectionidx, 'format_ludimoodle');\n if ($stringexists) {\n $title = get_string('badges-' . $this->get_visual_preset() . '-progression-title-' . $sectionidx, 'format_ludimoodle');\n } else {\n $title = get_string('badges-progression-title-default', 'format_ludimoodle');\n }\n return $title;\n }", "public function section($value = null)\n\t{\n\t\tif ($value != null)\n\t\t{\n\t\t\t$this->_section = $value;\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn $this->_section;\n\t\t}\n\t}", "public function default_settings_section_info() {\n global $WCPc;\n _e('Enter your default settings below', $WCPc->text_domain);\n }", "function getDisplayName() {\n\t\treturn __('plugins.generic.thesisfeed.displayName');\n\t}", "private static function _getSectionHeading($customSectionNameShort)\n {\n $string1 = \" CUSTOM FORM SECTION: $customSectionNameShort \";\n $string2 = str_repeat(' ', 98 - strlen($string1));\n\n $str = '/' . str_repeat('*', 98) . \"*\\n\";\n $str .= '*' . str_repeat(' ', 98) . \"*\\n\";\n $str .= '*' . \"$string1$string2\" . \"*\\n\";\n $str .= '*' . str_repeat(' ', 98) . \"*\\n\";\n $str .= '*' . str_repeat('*', 98) . \"*/\\n\\n\";\n\n return $str;\n }", "function GetAdminSection()\n {\n return 'content';\n }", "function erp_get_option( $option_name, $section = false, $default = '' ) {\n\n if ( $section ) {\n $option = get_option( $section );\n\n if ( isset( $option[ $option_name ] ) ) {\n return $option[ $option_name ];\n } else {\n return $default;\n }\n } else {\n return get_option( $option_name, $default );\n }\n}", "function display_section_after( $retval, $section ) {\n\t$layout = get_field( 'section_layout', $section );\n\tswitch ( $layout ) {\n\t\tcase 'courses':\n\t\t\t$retval = display_courses_after( $section );\n\t\t\tbreak;\n\t\tcase 'timeline':\n\t\t\t$retval = display_timeline_after( $section );\n\t\t\tbreak;\n\t\tcase 'default':\n\t\tdefault:\n\t\t\t$retval = \\UCF_Section_Common::ucf_section_display_after( $section );\n\t\t\tbreak;\n\t}\n\n\treturn $retval;\n}", "function get_target_page($section = 0) {\n $pages = unserialize(file_get_contents(SUBJ_IDX_DEFAULT_TARGETS));\n if ($pages !== false && isset($pages[$section])) {\n return $pages[$section];\n } else {\n return '';\n }\n}", "protected function getSubtitle($section) {\n return 'WSAT - RND 4KiB 100% W';\n }", "public function getDisplayName() {\n return $this->display_names[$this->access_level];\n }", "function _webform_help_file($section) {\r\n switch ($section) {\r\n case 'admin/settings/webform#file_description':\r\n return t('Allow users to submit files of the configured types.');\r\n }\r\n}", "public function getParentSectionName(): ?string\n {\n return $this->parentSectionName;\n }", "public static function validateSection($section)\n\t{\n\t\tif (JFactory::getApplication()->isClient('site'))\n\t\t{\n\t\t\t// On the front end we need to map some sections\n\t\t\tswitch ($section)\n\t\t\t{\n\t\t\t\t// Editing an download\n\t\t\t\tcase 'form':\n\n\t\t\t\t\t// Category list view\n\t\t\t\tcase 'featured':\n\t\t\t\tcase 'category':\n\t\t\t\t\t$section = 'download';\n\t\t\t}\n\t\t}\n\n\t\tif ($section != 'download')\n\t\t{\n\t\t\t// We don't know other sections\n\t\t\treturn null;\n\t\t}\n\n\t\treturn $section;\n\t}", "public function DisplayName() {\n\t\t\n\t\tif (!empty($this->profil)) {\n\t\t\t\n\t\t\treturn $this->profil['user']['displayName'];\n\t\t}\n\t\t\n\t\treturn null;\n\t}", "public function getTopic()\n {\n return $this->Topic;\n }", "public function getShowTitle()\n {\n return sprintf($this->_('Showing %s'), $this->getTopic(1));\n }", "function user_setting_text_in_quiz() {\n global $USER, $COURSE;\n $selected_course = (($COURSE->id) > 1) ? ($COURSE->id) : -1;\n if ($selected_course && $selected_course != -1 && $USER->id) {\n $getcoursesetting = get_record('course_turmenu_settings', 'userid', $USER->id, 'courseid', $selected_course);\n }\n if (!empty($getcoursesetting)) {\n return $getcoursesetting->displaytype;\n } else {\n return 0;\n }\n }", "public function get(string $section)\n {\n return $_SESSION[$section];\n }", "function showSection($section){\n\t\t$this->section = Sections::where('slug', $section)->first();\n\n\t\t//Crée le breadcrumb\n\t\t$copy = $this->section;\n\t\t$breadcrumbs = array();\n\t\twhile(!is_null($copy->up)){\n\t\t\t$copy = $copy->up;\n\t\t\tarray_unshift($breadcrumbs, $copy);\n\t\t} \n\n\t\treturn view('forum.section.show')\n\t\t\t->with('breadcrumbs', $breadcrumbs)\n\t\t\t->with('forum', $this->section);\n\t}", "public function section_description ( $section ) {\n\t\tif ( isset( $this->sections[$section['id']]['description'] ) ) {\n\t\t\techo wpautop( esc_html( $this->sections[$section['id']]['description'] ) );\n\t\t}\n\t}", "protected function getSectionUrl($section)\n {\n return $this->view->serverUrl($this->view->url(array(\n 'module' => 'api',\n 'controller' => 'articles',\n 'action' => 'list',\n ), 'default') . $this->getApiQueryString(array(\n 'section_id' => $section,\n )));\n }", "function pnq_current_section( $index = 'section' ) {\n\tglobal $pagenow;\n\t$current_section = isset( $_GET[$index] ) ? $_GET[$index] : pnq_default_section( 'default', true );\n\t\n\tif( $pagenow == 'options.php' ) {\n\t\tif( !isset( $_POST['current_section'] ) ) {\n\t\t\t//die('$_POST[\\'current_section\\'] not set!');\n\t\t} else {\n\t\t\n\t\t\t$current_section = $_POST['current_section'];\n\t\t}\n\t}\n\t\t\t\n\treturn $current_section;\n}", "public function getTopic() {}", "public function print_section_info() {\n // print 'Enter your settings below:';\n }", "function primary_category_name() {\n\n\tglobal $post_id;\n\t$term = get_the_terms( $post_id, 'primary-category' );\n\tif ( ! $term ) {\n\t\treturn;\n\t} else {\n\t\techo $term[0]->name;\n\t}\n\n}", "public function getDisplayname()\n\t{\n\t\treturn $this->displayname;\n\t}", "public function print_section_info()\n {\n print 'Enter your settings below:';\n }", "public function print_section_info()\n {\n print 'Enter your settings below:';\n }", "public function print_section_info()\n {\n print 'Enter your settings below:';\n }", "public function getSection() {\n return $this->section;\n }", "public static function print_section_info()\n {\n print 'Enter your settings below:';\n }", "public function print_multiple_section_page($course, $sections, $mods, $modnames, $modnamesused) {\n global $PAGE;\n\n $modinfo = get_fast_modinfo($course);\n $course = course_get_format($course)->get_course();\n\n $context = context_course::instance($course->id);\n // Title with completion help icon.\n $completioninfo = new completion_info($course);\n echo $completioninfo->display_help_icon();\n echo $this->output->heading($this->page_title(), 2, 'accesshide');\n\n // Copy activity clipboard..\n echo $this->course_activity_clipboard($course, 0);\n\n // Now the list of sections..\n echo $this->start_section_list();\n\n foreach ($modinfo->get_section_info_all() as $section => $thissection) {\n if ($section == 0) {\n // 0-section is displayed a little different then the others\n if ($thissection->summary or !empty($modinfo->sections[0]) or $PAGE->user_is_editing()) {\n echo $this->section_header($thissection, $course, false, 0);\n echo $this->courserenderer->course_section_cm_list($course, $thissection, 0);\n echo $this->courserenderer->course_section_add_cm_control($course, 0, 0);\n echo $this->section_footer();\n }\n continue;\n }\n if ($section > $course->numsections) {\n // activities inside this section are 'orphaned', this section will be printed as 'stealth' below\n continue;\n }\n // Show the section if the user is permitted to access it, OR if it's not available\n // but there is some available info text which explains the reason & should display.\n $showsection = $thissection->uservisible ||\n ($thissection->visible && !$thissection->available &&\n !empty($thissection->availableinfo));\n if (!$showsection) {\n // If the hiddensections option is set to 'show hidden sections in collapsed\n // form', then display the hidden section message - UNLESS the section is\n // hidden by the availability system, which is set to hide the reason.\n if (!$course->hiddensections && $thissection->available) {\n echo $this->section_hidden($section, $course->id);\n }\n\n continue;\n }\n\n if (!$PAGE->user_is_editing() && $course->coursedisplay == COURSE_DISPLAY_MULTIPAGE) {\n // Display section summary only.\n echo $this->section_summary($thissection, $course, null);\n } else {\n echo $this->section_header($thissection, $course, false, 0);\n if ($thissection->uservisible) {\n echo $this->courserenderer->course_section_cm_list($course, $thissection, 0);\n echo $this->courserenderer->course_section_add_cm_control($course, $section, 0);\n }\n echo $this->section_footer();\n }\n }\n\n if ($PAGE->user_is_editing() and has_capability('moodle/course:update', $context)) {\n // Print stealth sections if present.\n foreach ($modinfo->get_section_info_all() as $section => $thissection) {\n if ($section <= $course->numsections or empty($modinfo->sections[$section])) {\n // this is not stealth section or it is empty\n continue;\n }\n echo $this->stealth_section_header($section);\n echo $this->courserenderer->course_section_cm_list($course, $thissection, 0);\n echo $this->stealth_section_footer();\n }\n\n echo $this->end_section_list();\n\n echo html_writer::start_tag('div', array('id' => 'changenumsections', 'class' => 'mdl-right'));\n\n // Increase number of sections.\n $straddsection = get_string('increasesections', 'moodle');\n $url = new moodle_url('/course/changenumsections.php',\n array('courseid' => $course->id,\n 'increase' => true,\n 'sesskey' => sesskey()));\n $icon = $this->output->pix_icon('t/switch_plus', $straddsection);\n echo html_writer::link($url, $icon.get_accesshide($straddsection), array('class' => 'increase-sections'));\n\n if ($course->numsections > 0) {\n // Reduce number of sections sections.\n $strremovesection = get_string('reducesections', 'moodle');\n $url = new moodle_url('/course/changenumsections.php',\n array('courseid' => $course->id,\n 'increase' => false,\n 'sesskey' => sesskey()));\n $icon = $this->output->pix_icon('t/switch_minus', $strremovesection);\n echo html_writer::link($url, $icon.get_accesshide($strremovesection), array('class' => 'reduce-sections'));\n }\n\n echo html_writer::end_tag('div');\n } else {\n echo $this->end_section_list();\n }\n\n }", "private function get_option_name($option) {\n\t\tif ( isset( $this->settings_section_options[$option] ) ) {\n\t\t\treturn $this->settings_section.'-'.$this->settings_section_options[$option]['name'];\n\t\t} else {\n\t\t\treturn '';\n\t\t}\n\t}", "public function getDisplayName() { $n = $this->data->get(\"displayName\", null);\n if (!empty($n)) {\n return $n;\n }\n \n // I have google's name?\n if (($g = $this->getGoogleInfo())) {\n if (isset($g->givenName) && !empty($g->givenName)) {\n return $g->givenName;\n }\n if (isset($g->name) && !empty($g->name)) {\n return $g->name;\n }\n }\n \n // user is current user?? load his name if he is\n $currentUser = JFactory::getUser();\n if ((int)($currentUser->id) == (int)$this->userid) {\n return ucwords(strtolower($currentUser->name));\n }\n \n // load user and get his name\n $user = F_User::getUserById((int)$this->$userid);\n if ($user) {\n return ucwords(strtolower($user->name));\n }\n \n // wtf\n return \"???\";\n }", "function pqrc_section_title_cal()\n {\n echo \"<h2>\" . __('Post QRC Settings Section', 'post-qurcode') . \"</h2>\";\n }", "function faculty_get_faculty_name( $format = 'short', $id = null ) {\n $name = get_field( 'name', $id );\n $first = empty( $name[0]['first'] ) ? '' : $name[0]['first'];\n $middle = empty( $name[0]['middle'] ) ? '' : $name[0]['middle'];\n $last = empty( $name[0]['last'] ) ? '' : $name[0]['last'];\n $prefix = empty( $name[0]['prefix'] ) ? '' : $name[0]['prefix'];\n $suffix = empty( $name[0]['suffix'] ) ? '' : $name[0]['suffix'];\n\n if ( $format == 'formal' ) {\n if ( ! empty( $suffix ) ) {\n return $prefix . ' ' . $first . ' ' . $last . ', ' . $suffix;\n } else {\n return $prefix . ' ' . $first . ' ' . $last;\n }\n } elseif ( $format == 'full' ) {\n return $first . ' ' . $middle . ' ' . $last;\n } else {\n return $first . ' ' . $last;\n }\n}", "public function settings_section_text() {\r\n\t\t\t\t// Think of this as help text for the section.\r\n\t\t\t\techo '<h1>';\r\n\t\t\t\techo esc_html( 'These settings are for configuring Sift Ninja' );\r\n\t\t\t\techo '</h1>';\r\n\r\n\t\t\t\techo 'If you do not have a Sift ninja account, you can visit <a href=\"http://www.siftninja.com?platform=WordPressPlatform\" target=\"_blank\">Sift Ninja</a> to create your free account.';\r\n\t\t}", "function faculty_get_display_name( $metaArray ) {\n $name = '';\n\n if ( $metaArray['name_0_prefix'][0] ) {\n $name = $metaArray['name_0_prefix'][0] . ' ';\n }\n\n $name .= $metaArray['name_0_first'][0] . ' ' . $metaArray['name_0_last'][0];\n\n if ( $metaArray['name_0_suffix'][0] ) {\n $name .= ' '.$metaArray['name_0_suffix'][0];\n }\n\n return $name;\n}", "public function get_section_name($prntid)\n\t{\n\t\t$this->db->select('sec.sect_name, std.*');\n\t\t$this->db->from('cms_students std');\n\t\t$this->db->join('cms_sections sec','std.sect_id=sec.sect_id','left');\n\t\t$this->db->where('std.prnt_id', $prntid);\n\t\t$query = $this->db->get();\n\t\t//echo $this->db->last_query();\n\t\treturn $query->result();\n\t}", "protected function getSpeakingSectionNames() {}", "private function retrieve_name() {\n\t\t$replacement = null;\n\n\t\t$user_id = $this->retrieve_userid();\n\t\t$name = get_the_author_meta( 'display_name', $user_id );\n\t\tif ( $name !== '' ) {\n\t\t\t$replacement = $name;\n\t\t}\n\n\t\treturn $replacement;\n\t}", "public function getTopic()\n {\n return $this->topic;\n }", "public function get_view_url($section, $options = array()) {\n\n $course = $this->get_course();\n\n $url = new moodle_url('/course/view.php', array('id' => $course->id));\n\n\n\n $sr = null;\n\n if (array_key_exists('sr', $options)) {\n\n $sr = $options['sr'];\n\n }\n\n if (is_object($section)) {\n\n $sectionno = $section->section;\n\n } else {\n\n $sectionno = $section;\n\n }\n\n if ($sectionno !== null) {\n\n if ($sr !== null) {\n\n if ($sr) {\n\n $usercoursedisplay = COURSE_DISPLAY_MULTIPAGE;\n\n $sectionno = $sr;\n\n } else {\n\n $usercoursedisplay = COURSE_DISPLAY_SINGLEPAGE;\n\n }\n\n } else {\n\n $usercoursedisplay = $course->coursedisplay;\n\n }\n\n if ($sectionno != 0 && $usercoursedisplay == COURSE_DISPLAY_MULTIPAGE) {\n\n $url->param('section', $sectionno);\n\n } else {\n\n if (!empty($options['navigation'])) {\n\n return null;\n\n }\n\n $url->set_anchor('section-'.$sectionno);\n\n }\n\n }\n\n return $url;\n\n }", "protected function getDefaultShareName()\n {\n return _(\"Notes\");\n }", "function get_course_name_manual($day, $lesson)\n{\n global $controller;\n if (!empty($controller->view->timetableArr[$day][$lesson])) {\n echo $controller->view->timetableArr[$day][$lesson];;\n }\n}", "public static function displayName(): string\n {\n return Craft::t('enupal-socializer','Socializer');\n }", "public function get_view_url($section, $options = array()) {\n global $CFG;\n $course = $this->get_course();\n $url = new moodle_url('/course/view.php', array('id' => $course->id));\n\n $sr = null;\n if (array_key_exists('sr', $options)) {\n $sr = $options['sr'];\n }\n if (is_object($section)) {\n $sectionno = $section->section;\n } else {\n $sectionno = $section;\n }\n if ($sectionno !== null) {\n if ($sr !== null) {\n if ($sr) {\n $usercoursedisplay = COURSE_DISPLAY_MULTIPAGE;\n $sectionno = $sr;\n } else {\n $usercoursedisplay = COURSE_DISPLAY_SINGLEPAGE;\n }\n } else {\n $usercoursedisplay = $course->coursedisplay;\n }\n if ($sectionno != 0 && $usercoursedisplay != COURSE_DISPLAY_SINGLEPAGE) {\n $url->param('section', $sectionno);\n } else {\n if (empty($CFG->linkcoursesections) && !empty($options['navigation'])) {\n return null;\n }\n $url->set_anchor('section-'.$sectionno);\n }\n }\n return $url;\n }", "function sectionDisplayAlt($optionArray) {\n\tif ($optionArray[\"hideHeader\"] && (!$optionArray[\"admin\"] && !$optionArray[\"content\"])) return false;\n\n\t$string = null;\n\t\n\tif ($optionArray[\"tab\"]) $string .= \"<div class=\\\"sectionTab\\\">\".$optionArray[\"tab\"].\"</div>\";\n\t\n\t$string .= \"<div class=\\\"sectionTableAlt\\\">\";\n\n\t$string .= createSectionHeader($optionArray);\n\n\t$string .= \"\t<div class=\\\"sectionContentAlt\\\">\n\t\t\t\t\".$optionArray[\"content\"].\"\n\t\t\t</div>\n\t\t\t\";\n\n\t$string .= \"</div>\";\n\n\treturn $string;\n\n}", "public function name() {\n return isset($this->_adaptee->user_info['user_displayname']) ? $this->_adaptee->user_info['user_displayname'] : null;\n }", "public function section(Session $session, int $section_id = 0): string\n {\n $title = __('Section list');\n $this->navChain->add($title, route('news.admin.section'));\n\n if (! empty($section_id)) {\n $current_section = (new NewsSection())->findOrFail($section_id);\n $title = $current_section->name;\n Helpers::buildAdminBreadcrumbs($current_section->parentSection);\n // Adding the current section to the navigation chain\n $this->navChain->add($current_section->name);\n }\n\n $data = [];\n $data['messages'] = $session->getFlash('success_message');\n $data['sections'] = (new NewsSection())\n ->when(! empty($section_id), function (Builder $builder) use ($section_id) {\n return $builder->where('parent', $section_id);\n })\n ->when(empty($section_id), function (Builder $builder) {\n return $builder->where('parent', 0)->orWhereNull('parent');\n })\n ->get();\n $data['articles'] = (new NewsArticle())\n ->when(! empty($section_id), function (Builder $builder) use ($section_id) {\n return $builder->where('section_id', $section_id);\n })\n ->when(empty($section_id), function (Builder $builder) {\n return $builder->where('section_id', 0)->orWhereNull('section_id');\n })\n ->orderByDesc('id')\n ->paginate();\n $data['current_section'] = $section_id;\n\n $this->metaTagManager->setAll($title);\n return $this->render->render('johncms/news::admin/sections', ['data' => $data]);\n }", "function wantedSection() {\n $urlParts = $this->_getPathUrl();\n return $urlParts[$this->sectionOffset];\n }", "public function getDisplayName();", "private function section_comment()\n {\n $pattern = \"/Styleguide \\d/i\"; // /i for case insensitive\n $text_section = '';\n $values_comment_sections = array_values($this->comment_sections());\n foreach ( $values_comment_sections as $key => $text) {\n if (preg_match($pattern, $text)) {\n $text_section = $text;\n break;\n }\n }\n\n return $text_section;\n }", "public function get(string $section, string $key, $default = null);", "function section_score_header($section_score, $scoring = 'score')\n {\n if($scoring == 'percentile') {\n return 'Your Score: '.str_ordinal($section_score);\n } else if($scoring == 'stanine') {\n return 'Your Stanine: '.$section_score;\n }\n\n return 'Your Score: '.$section_score;\n }" ]
[ "0.7589812", "0.701713", "0.69684875", "0.66206664", "0.63558996", "0.6333144", "0.61751616", "0.6128313", "0.60296196", "0.60073847", "0.59949803", "0.5981905", "0.5960489", "0.5887724", "0.5858194", "0.58455056", "0.57648146", "0.57598937", "0.57434344", "0.5737294", "0.5731124", "0.57000756", "0.56641936", "0.5600232", "0.5598244", "0.5532686", "0.5532595", "0.5525668", "0.5513743", "0.5511832", "0.5504047", "0.5495608", "0.5490706", "0.5410976", "0.5397324", "0.5371867", "0.536455", "0.536455", "0.5360735", "0.5358639", "0.5346603", "0.5343613", "0.53421146", "0.53305036", "0.5328331", "0.5327106", "0.53173393", "0.531632", "0.53106093", "0.5306421", "0.53056574", "0.5302246", "0.5280322", "0.52767646", "0.5272917", "0.5272042", "0.5270654", "0.5261664", "0.5260013", "0.52327806", "0.5228181", "0.5227047", "0.5219395", "0.5211887", "0.51991165", "0.5187772", "0.5185536", "0.5184484", "0.517193", "0.5157778", "0.51561654", "0.5152608", "0.5152608", "0.5152608", "0.51397157", "0.51386166", "0.51358074", "0.51354575", "0.5134443", "0.513066", "0.5129767", "0.5128831", "0.51260805", "0.5120442", "0.5118616", "0.5117299", "0.51042867", "0.50957197", "0.50815266", "0.50674367", "0.50645405", "0.5062623", "0.5060186", "0.5057654", "0.5052056", "0.5047891", "0.5042502", "0.5040834", "0.5040732", "0.5034472" ]
0.75934565
0
The URL to use for the specified course (with section)
public function get_view_url($section, $options = array()) { $course = $this->get_course(); $url = new moodle_url('/course/view.php', array('id' => $course->id)); $sr = null; if (array_key_exists('sr', $options)) { $sr = $options['sr']; } if (is_object($section)) { $sectionno = $section->section; } else { $sectionno = $section; } if ($sectionno !== null) { if ($sr !== null) { if ($sr) { $usercoursedisplay = COURSE_DISPLAY_MULTIPAGE; $sectionno = $sr; } else { $usercoursedisplay = COURSE_DISPLAY_SINGLEPAGE; } } else { $usercoursedisplay = $course->coursedisplay; } if ($sectionno != 0 && $usercoursedisplay == COURSE_DISPLAY_MULTIPAGE) { $url->param('section', $sectionno); } else { if (!empty($options['navigation'])) { return null; } $url->set_anchor('section-' . $sectionno); } } return $url; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getSectionURL() {\n $sectionUrl = $this->url . '/' . $this->protoVersion . '/';\n $section = $this->getSection();\n if (!empty($section)) {\n $sectionUrl .= $section;\n }\n return $sectionUrl;\n }", "public function get_view_url($section, $options = array()) {\n\n $course = $this->get_course();\n\n $url = new moodle_url('/course/view.php', array('id' => $course->id));\n\n\n\n $sr = null;\n\n if (array_key_exists('sr', $options)) {\n\n $sr = $options['sr'];\n\n }\n\n if (is_object($section)) {\n\n $sectionno = $section->section;\n\n } else {\n\n $sectionno = $section;\n\n }\n\n if ($sectionno !== null) {\n\n if ($sr !== null) {\n\n if ($sr) {\n\n $usercoursedisplay = COURSE_DISPLAY_MULTIPAGE;\n\n $sectionno = $sr;\n\n } else {\n\n $usercoursedisplay = COURSE_DISPLAY_SINGLEPAGE;\n\n }\n\n } else {\n\n $usercoursedisplay = $course->coursedisplay;\n\n }\n\n if ($sectionno != 0 && $usercoursedisplay == COURSE_DISPLAY_MULTIPAGE) {\n\n $url->param('section', $sectionno);\n\n } else {\n\n if (!empty($options['navigation'])) {\n\n return null;\n\n }\n\n $url->set_anchor('section-'.$sectionno);\n\n }\n\n }\n\n return $url;\n\n }", "protected function getSectionUrl($section)\n {\n return $this->view->serverUrl($this->view->url(array(\n 'module' => 'api',\n 'controller' => 'articles',\n 'action' => 'list',\n ), 'default') . $this->getApiQueryString(array(\n 'section_id' => $section,\n )));\n }", "public function get_view_url($section, $options = array()) {\n global $CFG;\n $course = $this->get_course();\n $url = new moodle_url('/course/view.php', array('id' => $course->id));\n\n $sr = null;\n if (array_key_exists('sr', $options)) {\n $sr = $options['sr'];\n }\n if (is_object($section)) {\n $sectionno = $section->section;\n } else {\n $sectionno = $section;\n }\n if ($sectionno !== null) {\n if ($sr !== null) {\n if ($sr) {\n $usercoursedisplay = COURSE_DISPLAY_MULTIPAGE;\n $sectionno = $sr;\n } else {\n $usercoursedisplay = COURSE_DISPLAY_SINGLEPAGE;\n }\n } else {\n $usercoursedisplay = $course->coursedisplay;\n }\n if ($sectionno != 0 && $usercoursedisplay != COURSE_DISPLAY_SINGLEPAGE) {\n $url->param('section', $sectionno);\n } else {\n if (empty($CFG->linkcoursesections) && !empty($options['navigation'])) {\n return null;\n }\n $url->set_anchor('section-'.$sectionno);\n }\n }\n return $url;\n }", "protected function getUrl($section, array $uriParams = [])\n {\n return parent::getUrl(sprintf(\"api.%s/%s\", $section, $this->apiKey), $uriParams);\n }", "public static function sectionURI($mnt,$section)\n{\nreturn self::commandURI($mnt,'section&name='.$section);\n}", "public function get_link()\r\n\t{\r\n\t\t$url = api_get_path(WEB_PATH)\r\n\t\t\t.'main/gradebook/exercise_jump.php?cid='.$this->get_course_code();\r\n\t\tif (!api_is_allowed_to_create_course()\r\n\t\t\t&& $this->calc_score(api_get_user_id()) == null)\r\n\t\t$url .= '&amp;doexercise='.$this->get_ref_id();\r\n\t\t\r\n\t\treturn $url;\r\n\t}", "public function getSectionsUrl()\n {\n return $this->getProperty(\"SectionsUrl\");\n }", "function getPublicUrl( $section=\"\", $rooturl=false )\n\t{\n\t\treturn $this->get_url( $section, $rooturl ); \n\t}", "public static function glueserver_get_url_course($urlid, $courseid){\n\t\tglobal $DB,$CFG;\n \n $sql = \"SELECT url.*\n FROM {$CFG->prefix}url url\n WHERE url.id = ? AND course = ?\";\n $sqlparams = array($urlid, $courseid);\n return $DB->get_records_sql($sql, $sqlparams);\t\n }", "public static function glueserver_get_urls_course($courseid){\n\t\tglobal $DB,$CFG;\n \n $sql = \"SELECT url.*\n FROM {$CFG->prefix}url url\n WHERE url.course = ?\";\n $sqlparams = array($courseid);\n return $DB->get_records_sql($sql, $sqlparams);\t\t\n }", "function CreateUrl($module, $section = '', $category = '', $item = '', $comment = '', $page = '') {\n $url = MODULE.$module;\n if (!empty($section)) {\n $url = $url.SECTION.$section;\n if (!empty($category)) {\n $url = $url.CATEGORY.$category;\n if (!empty($item)) {\n $url = $url.ITEM.$item;\n if (!empty($comment)) {\n $url = $url.COMMENT.$comment;\n if (!empty($page)) {\n $url = $url.PAGE.$comment;\n }\n }\n }\n }\n }\n return $url;\n}", "public static function glueserver_insert_url_course($course,$name,$intro,$introformat,$externalurl,$display,$displayoptions,$parameters){\n \tglobal $DB,$CFG;\n \t\t\n \t$record = new stdClass();\n\t\t$record->course = $course;\n\t\t$record->name = $name;\n\t\t$record->intro = $intro;\n\t\t$record->introformat = $introformat;\n\t\t$record->externalurl = $externalurl;\n\t\t$record->display = $display;\n\t\t$record->displayoptions = $displayoptions;\n\t\t$record->parameters = $parameters;\n\t\t$record->timemodified = time();\n\t\t$return_id = $DB->insert_record(\"url\", $record, true);\n return $return_id;\n }", "public function setSectionsUrl($value)\n {\n $this->setProperty(\"SectionsUrl\", $value, true);\n }", "public function url()\n {\n return '/recipe/' . $this->recipe->getKey();\n }", "function get_course($course)\n{\n $course_id = get_prefix($course).\" \".get_number($course).\" \".get_name($course);\n return $course_id;\n}", "public function getDetailsURI()\n\t{\n\t\tif ($this->contentProperties->id->value===null || $this->contentProperties->id->value<1) {\n\t\t\treturn (\"\");\n\t\t}\n\n\t\t$query = \"SELECT `details_uri` \".\n\t\t\t\"FROM `section_operations` \".\n\t\t\t\"WHERE `section_id` = {$this->contentProperties->id->value}\";\n\t\t$data = $this->fetchRecords($query);\n\t\tif (count($data) > 0) {\n\t\t\treturn($data[0]->details_uri);\n\t\t}\n\t\treturn (\"\");\n\t}", "public function niceUrl()\n {\n return '/' . $this->recipe_id . '/' . $this->url;\n }", "private function getUrl() {\r\n if(!$this->markActive)\r\n return '';\r\n $mid = Yii::$app->controller->module->id == Yii::$app->id ? '' : Yii::$app->controller->module->id;\r\n $cid = Yii::$app->controller->id;\r\n $aid = Yii::$app->controller->action->id;\r\n $id = isset($_GET['slug']) ? $_GET['slug'] : (isset($_GET['id']) ? $_GET['id'] : '');\r\n $rubric = isset($_GET['rubric']) ? $_GET['rubric'] : '';\r\n $tag = isset($_GET['tag']) ? $_GET['tag'] : '';\r\n return ($mid ? $mid. '/' : '') . \r\n $cid . '/' . \r\n ($aid == 'index' \r\n ? ($rubric \r\n ? 'rubric/' . $rubric . ($tag \r\n ? '/tag/' . $tag \r\n : '') \r\n : 'index') \r\n : ($aid == 'view' ? $id : $aid)\r\n );\r\n }", "public function getURL ();", "private function _getURL()\n {\n\n $url = $this->_ect . '?';\n foreach ($this as $name => $var) {\n if ($name == 'ect') {\n continue;\n }\n $url .= \"$name=$var&\";\n }\n\n $this->url = $url;\n\n return $this->url;\n }", "function analytics_trackurl() {\n global $DB, $PAGE, $COURSE;\n $pageinfo = get_context_info_array($PAGE->context->id);\n $trackurl = \"'/\";\n\n // Adds course category name.\n if (isset($pageinfo[1]->category)) {\n if ($category = $DB->get_record('course_categories', array('id'=>$pageinfo[1]->category))) {\n $cats=explode(\"/\",$category->path);\n foreach (array_filter($cats) as $cat) {\n if ($categorydepth = $DB->get_record(\"course_categories\", array(\"id\" => $cat))) {;\n $trackurl .= urlencode($categorydepth->name).'/';\n }\n }\n }\n }\n\n // Adds course full name.\n if (isset($pageinfo[1]->fullname)) {\n if (isset($pageinfo[2]->name)) {\n $trackurl .= urlencode($pageinfo[1]->fullname).'/';\n } else if ($PAGE->user_is_editing()) {\n $trackurl .= urlencode($pageinfo[1]->fullname).'/'.get_string('edit', 'local_analytics');\n } else {\n $trackurl .= urlencode($pageinfo[1]->fullname).'/'.get_string('view', 'local_analytics');\n }\n }\n\n // Adds activity name.\n if (isset($pageinfo[2]->name)) {\n $trackurl .= urlencode($pageinfo[2]->modname).'/'.urlencode($pageinfo[2]->name);\n }\n \n $trackurl .= \"'\";\n return $trackurl;\n}", "public function getURL();", "public function getURL();", "function buildUrl($section = null, string $action = null, string $id = null, string $csrfToken = null): string\n{\n global $config, $site;\n\n if (! is_array($section)) {\n $array['section'] = $section;\n $array['action'] = $action;\n $array['id'] = $id;\n $array['csrftoken'] = $csrfToken;\n $section = $array;\n }\n\n $queryStr = \"\";\n foreach ($section as $key => $value) {\n if ($value !== null) {\n if ($key === 'section' && strpos($value, 'admin') === 0) {\n $value = str_replace('admin', $config['admin_section_name'], $value);\n\n if ($value === $config['admin_section_name']) {\n // no page specified\n $value .= \":users\";\n }\n }\n $queryStr .= \"$key=$value&\";\n }\n }\n\n if (\n (! isset($section['csrfToken']) || $section['csrfToken'] === null) &&\n $config[\"use_url_rewrite\"]\n ) {\n $queryStr = str_replace(\"&\", \"\", $queryStr);\n $queryStr = str_replace([\"section=\", \"action=\", \"id=\"], \"/\", $queryStr);\n $queryStr = ltrim($queryStr, \"/\");\n } else {\n if ($queryStr !== \"\") {\n $queryStr = \"?\" . rtrim($queryStr, \"&\");\n }\n $queryStr = \"index.php\" . $queryStr;\n }\n\n return $site['directory'] . $queryStr;\n}", "function get_course()\r\n {\r\n return $this->get_default_property(self :: PROPERTY_COURSE);\r\n }", "public function get_newinstance_link($courseid) {\n $context = context_course::instance($courseid, MUST_EXIST);\n if (!has_capability('enrol/connect:config', $context)) {\n return null;\n }\n\n return new moodle_url('/enrol/connect/edit.php', array(\n 'courseid' => $courseid\n ));\n }", "function display_course( $section ) {\n\t$retval = '';\n\n\t// Back out early if this section isn't courses, or is empty:\n\tif (\n\t\tget_field( 'section_layout', $section ) !== 'courses'\n\t\t|| ! have_rows( 'courses', $section )\n\t) {\n\t\treturn $retval;\n\t}\n\n\t$course_num = 0;\n\n\twhile( have_rows( 'courses', $section ) ) : $course = the_row();\n\t\t$course_num++;\n\t\t$course_title = get_sub_field( 'course_title' );\n\t\t$course_information = get_sub_field( 'course_information' );\n\n\t\tob_start();\n\t?>\n\t<div class=\"card card-secondary\">\n\t\t<div class=\"card-header\" role=\"tab\" id=\"courseHeading<?php echo $course_num; ?>\">\n\t\t\t<h3 class=\"h5 mb-0\">\n\t\t\t\t<a data-toggle=\"collapse\" href=\"#courseCollapse<?php echo $course_num; ?>\" aria-expanded=\"true\" aria-controls=\"courseCollapse<?php echo $course_num; ?>\">\n\t\t\t\t<?php echo $course_title; ?>\n\t\t\t\t</a>\n\t\t\t</h3>\n\t\t\t</div>\n\t\t\t<div id=\"courseCollapse<?php echo $course_num; ?>\" class=\"collapse\" role=\"tabpanel\" aria-labelledby=\"courseHeading<?php echo $course_num; ?>\" data-parent=\"#coursesAccordion\">\n\t\t\t<div class=\"card-block\">\n\t\t\t\t<?php echo $course_information; ?>\n\t\t\t</div>\n\t\t</div>\n\t</div>\n\n\t<?php\n\t\t$retval .= trim( ob_get_clean() );\n\n\tendwhile;\n\n\treturn $retval;\n}", "public static function getSchoolUrl() {\n\t\treturn self::getUri()[1];\n\t}", "function display_courses( $section ) {\n\tob_start();\n\n\techo display_courses_before( $section );\n\techo display_course( $section );\n\techo display_courses_after( $section );\n\n\treturn trim( ob_get_clean() );\n}", "public function selfAsessmentCourse()\n { \n $results = $this->CC->getItem('host-an-ers-hermes-self-assessment-course-in-your-city-or-country');\n $item = $this->CC->parseItems($results['rows']);\n $params['item'] = (object) $item[0]; \n\n if(!$item[0]->url || !$item[0]->uri){\n $this->CC->setCanonical($item[0]->_qname);\n }\n\n if($item[0]->hasRelatedArticles > 0){\n $related = $this->CC->getAssociationSorted($item[0]->_qname, 'ers:related-association');\n $params['relatedItems'] = $this->CC->parseItems($related['rows']);\n }\n\n $results = $this->CC->getAssociation($item[0]->_qname);\n $items = $this->CC->parseItems($results['rows']);\n $params['items'] = $items;\n\n return view('professional.self-assessment')->with($params);\n }", "function cps_sections($course, $where=null) {\n global $CFG;\n\n $sql = \"SELECT s.*, c.department, c.course_number\n FROM {$CFG->prefix}block_courseprefs_sections s,\n {$CFG->prefix}block_courseprefs_courses c\n WHERE s.coursesid = c.id\n AND s.idnumber = '{$course->idnumber}'\n \".(($where) ? \"AND {$where}\" : '').\"\n ORDER BY s.section_number\";\n return get_records_sql($sql);\n}", "public function getUrlDetail()\n {\n \treturn \"cob_actadocumentacion/ver/$this->id_actadocumentacion\";\n }", "public function course_section ()\n {\n return $this->belongsTo('App\\CourseSection', 'course_section_id');\n }", "public function get_url();", "function theme_nightingale_get_course_navigation(moodle_page $page) {\n\n $courserenderer = $page->get_renderer('core', 'course');\n\n $availablecourseshtml = $courserenderer->frontpage_available_courses();\n\n if(empty($availablecourseshtml)) {\n $availablecourseshtml = \"No courses available\";\n }\n\n return $availablecourseshtml;\n}", "public function helpPath($section, $field = false)\n {\n $fieldtag = $field;\n if (isset($this->field_display[\"$field\"]) && isset($this->field_display[\"$field\"][\"DocId\"])) {\n $fieldtag = $this->field_display[\"$field\"][\"DocId\"];\n }\n\n $path = $this->query->url_doc_site . \"/\" . $this->query->doc_version . \"/\" . \"doku.php?id=\";\n\n if (isset($this->field_display[\"$field\"]) && isset($this->field_display[\"$field\"][\"DocSection\"])) {\n $path .= $this->field_display[\"$field\"][\"DocSection\"];\n } else if ($section) {\n $path .= $this->getHelpLink($section);\n }\n\n if ($fieldtag) {\n $path .= \"#$fieldtag\";\n }\n\n return $path;\n }", "public function get_course_id(){\n\t\treturn $this->_courseid;\n\t}", "public abstract function getURL();", "public function getURL()\n {\n return $this->site->getURL() . 'unl_progress/edit/';\n\n }", "public function show(Course $course)\n {\n //\n }", "public function show(Course $course)\n {\n //\n }", "public function show(Course $course)\n {\n //\n }", "public function show(Course $course)\n {\n //\n }", "public function section()\n {\n return $this->belongsTo('App\\Models\\CourseSection');\n }", "function thim_learnpress_checkout_free_course() {\n\treturn add_query_arg( 'redirect_to', 'http://' . $_SERVER[\"HTTP_HOST\"] . $_SERVER[\"REQUEST_URI\"], thim_get_login_page_url() );\n}", "function col_coursename($values) {\n // If the data is being downloaded than we don't want to show HTML.\n if ($this->is_downloading()) {\n return $values->coursename;\n } else {\n $courseurl = new moodle_url('/course/view.php', array('id' => $values->course));\n return html_writer::link($courseurl, $values->coursename);\n }\n }", "public function get_context_url(\\core_search\\document $doc) {\n $cminfo = $this->get_cm($this->get_module_name(), strval($doc->get('itemid')), $doc->get('courseid'));\n return new \\moodle_url('/mod/' . $this->get_module_name() . '/view.php', array('id' => $cminfo->id));\n }", "function get_sections($crn,$term,$course) {\n global $dbh;\n \n // get all courses offered in same term with same course name\n $query = 'SELECT term_code,crn FROM courses WHERE term_code = ? and concat(subject_code,\" \",course_number) = ? ORDER BY section_number';\n \n $resultset = prepared_query($dbh, $query, array($term,$course));\n \n $sections = array();\n while ($row = $resultset->fetchRow(MDB2_FETCHMODE_ASSOC)) {\n // if the CRN does not match current course, add it as a different section\n if ($row['crn'] != $crn) $sections[] = '<a href=\"javascript:void(0);\" onclick=\"getDetail('.$row['term_code'].','.$row['crn'].')\">'.$row['crn'].'</a>';\n }\n return $sections; \n}", "public function getDocumentationUrl();", "public function get_samples_origin() {\n return 'course';\n }", "public function course_urlSlugGenerator()\n {\n $output['token'] = $this->security->get_csrf_hash();\n header('Content-Type: application/json');\n $slug = $this->input->post('course_name', true);\n $output['response'] = $this->common->_urlSlugGenerator('tbl_course', 'id', 'slug', $slug);\n $output = html_escape($this->security->xss_clean($output));\n exit(json_encode($output));\n }", "public function category_wise_course_get() {\n $category_id = $_GET['category_id'];\n $courses = $this->api_model->category_wise_course_get($category_id);\n $this->set_response($courses, REST_Controller::HTTP_OK);\n }", "public function show(Course $course)\n {\n $user = Auth::user();\n //Check if user has permission to view instructors\n $isAuthorized = app('App\\Http\\Controllers\\UserPrivilegeController')->checkPrivileges($user->id, Config::get('settings.course_management'), 'read_priv');\n\n if($isAuthorized){\n //record in activity log\n $activityLog = ActivityLog::create([\n 'user_id' => $user->id,\n 'activity' => 'Viewed the details of ' . $course->course_desc . '.',\n 'time' => Carbon::now()\n ]);\n // display specific course.\n // return $course;\n $course = Course::select('*')->where('id', $course->id)->with('curriculum')->get();\n return $course;\n }else{\n //record in activity log\n $activityLog = ActivityLog::create([\n 'user_id' => $user->id,\n 'activity' => 'Attempted to view the details of ' . $course->course_desc . '.',\n 'time' => Carbon::now()\n ]);\n return response()->json([\n 'message' => 'You are not authorized to view course records.'\n ],401); //401: Unauthorized\n }\n\n }", "function display_courses_after( $section ) {\n\tif ( get_field( 'section_layout', $section ) !== 'courses' ) {\n\t\treturn '';\n\t}\n\n\treturn '</div>';\n}", "public function viewCourse()\n {\n $courseID = SCMUtility::cleanText($_GET['courseID']);\n\n // get the current logged in user\n if(Session::isLoggedIn())\n {\n // get current logged in user\n $current_user_id = Session::getCurrentUserID();\n $user = User::with('courses')->find($current_user_id);\n\n // check if the course being vied is already on his enrolled courses so we can flash a message\n if( $user->isAlreadyEnrolledToCourse($courseID) )\n {\n SCMUtility::setFlashMessage('You have already enrolled to this course.','info');\n }\n }\n\n // get course meta info\n $data = Course::with('students')->find($courseID);\n\n if( ! $data )\n {\n View::make('templates/system/error.php',array());\n return;\n }\n\n $data = $data->toArray();\n\n View::make('templates/front/course-view.php',compact('data'));\n }", "public static function get_urls_by_courses_returns() {\n return new external_single_structure(\n array(\n 'urls' => new external_multiple_structure(\n new external_single_structure(\n array(\n 'id' => new external_value(PARAM_INT, 'Module id'),\n 'coursemodule' => new external_value(PARAM_INT, 'Course module id'),\n 'course' => new external_value(PARAM_INT, 'Course id'),\n 'name' => new external_value(PARAM_RAW, 'URL name'),\n 'intro' => new external_value(PARAM_RAW, 'Summary'),\n 'introformat' => new external_format_value('intro', 'Summary format'),\n 'introfiles' => new external_files('Files in the introduction text'),\n 'externalurl' => new external_value(PARAM_RAW_TRIMMED, 'External URL'),\n 'display' => new external_value(PARAM_INT, 'How to display the url'),\n 'displayoptions' => new external_value(PARAM_RAW, 'Display options (width, height)'),\n 'parameters' => new external_value(PARAM_RAW, 'Parameters to append to the URL'),\n 'timemodified' => new external_value(PARAM_INT, 'Last time the url was modified'),\n 'section' => new external_value(PARAM_INT, 'Course section id'),\n 'visible' => new external_value(PARAM_INT, 'Module visibility'),\n 'groupmode' => new external_value(PARAM_INT, 'Group mode'),\n 'groupingid' => new external_value(PARAM_INT, 'Grouping id'),\n )\n )\n ),\n 'warnings' => new external_warnings(),\n )\n );\n }", "function GetImportCourseUrl($courseId, $redirectUrl)\r\n\t{\r\n try{\r\n $result = $this->courseApiClient->getCoursesImportLinkByCourseByRedirectUrl($courseId, $redirectUrl);\r\n $engineUrl = $this->GetEngineServerUrl();\r\n return \"$engineUrl$result->link\";\r\n }catch(Exception $ex){\r\n error_log($ex->getMessage());\r\n return \"\";\r\n }\r\n\t}", "protected function getUrl() {\n\t\treturn $this->getQueryParam ( self::URL_PARAM );\n\t}", "protected function _getUrl(): string\n {\n property_exists_or_fail($this, ['id', 'album']);\n\n return Router::url(['_name' => 'photo', 'slug' => $this->get('album')->get('slug'), 'id' => (string)$this->get('id')], true);\n }", "function frmgetcourse_summary_imagepath($courseid) {\n\tglobal $CFG;\n\t$contentimage = '';\n\tforeach (frmgetcourse_overviewfiles($courseid) as $file) {\n\t\t$isimage = $file->is_valid_image();\n\t\t$url = file_encode_url(\"$CFG->wwwroot/pluginfile.php\",\n\t\t'/'. $file->get_contextid(). '/'. $file->get_component(). '/'.\n\t\t$file->get_filearea(). $file->get_filepath(). $file->get_filename(), !$isimage);\n\t\tif ($isimage) {\n\t\t\t$contentimage = $url;\n\t\t\tbreak;\n\t\t}\n\t}\n\tif (empty($contentimage)) {\n\t\t$url = $CFG->wwwroot . \"/theme/\".$CFG->theme.\"/pix/folder.png\";\n\t\t$contentimage = $url;\n\t}\n\treturn $contentimage;\n}", "function wantedSection() {\n $urlParts = $this->_getPathUrl();\n return $urlParts[$this->sectionOffset];\n }", "public function\n\tGetURL():\n\t?String {\n\n\t\treturn sprintf(\n\t\t\t'%s://%s%s%s',\n\t\t\t$this->GetProtocol(),\n\t\t\t$this->GetFullDomain(),\n\t\t\t(($this->GetPath() === '/index')?\n\t\t\t\t('/'):\n\t\t\t\t($this->GetPath())\n\t\t\t),\n\t\t\t((count($this->Query) >= 1)?\n\t\t\t\t($this->QueryCooker($this->Query)):\n\t\t\t\t(''))\n\t\t);\n\t}", "public function get_url()\n {\n }", "protected function _getUrl() {\n\t\t\t$this->_url =\timplode('/', array(\n\t\t\t\t$this->_baseUrlSegment,\n\t\t\t\t$this->_apiSegment,\n\t\t\t\timplode('_', array(\n\t\t\t\t\t$this->_type,\n\t\t\t\t\t$this->_language,\n\t\t\t\t\t$this->_locale,\n\t\t\t\t)),\n\t\t\t\t$this->_apiVersionSegment,\n\t\t\t\t$this->controller,\n\t\t\t\t$this->function\t\n\t\t\t));\n\n\t\t\tempty($this->_getFields) ?: $this->_url .= '?' . http_build_query($this->_getFields);\n\t\t}", "protected function sectionUrls()\n {\n // One place to set Friendly URL for all pages\n // originally code F (delete this line later)\n $output = '<h1><i class=\"fa fa-link\"></i> ' . $this->tableAdmin->translate('Friendly URL')\n . '</h1><div id=\"agenda-urls\">'\n . '<form action=\"\" method=\"post\" class=\"friendly-urls\" onsubmit=\"return confirm(\\''\n . $this->tableAdmin->translate('Are you sure?') . '\\')\">'\n . Tools::htmlInput('urls', '', 1, ['type' => 'hidden'])\n . Tools::htmlInput('token', '', end($_SESSION['token']), 'hidden');\n $urls = []; // all URLs, all language versions with a link to what it links to (product, page, … id, etc.)\n $langs = array_keys($this->MyCMS->TRANSLATIONS);\n // Todo queryStrictArray\n $query = $this->MyCMS->dbms->queryStrictNonEmptyArray(\n 'SELECT id,\"content\" AS _table,type,' . Tools::arrayListed($langs, 0, ',', 'url_') . ','\n . Tools::arrayListed($langs, 0, ',', 'name_') . ' FROM `' . TAB_PREFIX . 'content` WHERE type IN ('\n . '\"article\", \"page\", \"news\"' // list of types to be listed for Friendly URL settings\n . ') ORDER BY type'\n );\n foreach ($query as $row) {\n $urls [] = $row;\n }\n // Friendly URL folders for types to be listed for Friendly URL settings\n $TYPE2PATH = [\n 'content-article' => '',\n 'content-page' => '',\n 'content-news' => 'news'\n ];\n $lastType = false;\n foreach ($urls as $value) {\n Assert::isArray($value);\n if ($lastType != $value['_table'] . '-' . $value['type']) {\n $output .= '<h3 class=\"lead\">' . Tools::h($lastType = $value['_table'] . '-' . $value['type'])\n . '</h3>' . PHP_EOL;\n }\n $output .= '<div class=\"mb-3\"><div><a href=\"?table=' . urlencode(TAB_PREFIX . $value['_table'])\n . '&where[id]=' . (int) $value['id'] . '\" target=\"_blank\">'\n . '<i class=\"fa fa-external-link\"></i></a> ' .\n (Tools::h($value['name_' . DEFAULT_LANGUAGE]) ?: '<i>N/A</i>') . '</div>';\n foreach ($langs as $key => $lang) {\n // TODO should trailing slash be present?\n $value['fill'] = rtrim('/' . Tools::wrap($TYPE2PATH[$lastType], '', '/') .\n /* $value['id'] . '-' . */ Tools::webalize($value[\"name_$lang\"]), '-');\n $output .= '<div class=\"input-group input-group-sm\">'\n . '<div class=\"input-group-prepend\"><tt class=\"input-group-text btn\" title=\"'\n . $this->tableAdmin->translate('Fill up') . '\">' . $lang . '</tt></div>'\n . Tools::htmlInput(\n 'url-' . urlencode($value['_table']) . '-' . $value['id'] . '-' . $lang,\n '',\n $value[\"url_$lang\"],\n array('class' => 'form-control monospace', 'data-fill' => $value['fill'])\n )\n . '</div>' . PHP_EOL;\n }\n $output .= '</div>';\n }\n $output .= '<p><button class=\"btn btn-primary mr-1\" type=\"submit\" name=\"urls-save\"><i class=\"fa fa-save\"></i> '\n . $this->tableAdmin->translate('Save') . '</button>\n <button class=\"btn btn-secondary btn-fill\" type=\"button\"><i class=\"fa fa-edit\"></i> '\n . $this->tableAdmin->translate('Fill up') . '</button>\n ' . Tools::htmlInput(\n '',\n $this->tableAdmin->translate('only empty'),\n '',\n array('type' => 'checkbox', 'id' => 'only-empty', 'label-after' => true, 'label-class' => 'mx-1')\n ) . '\n <button class=\"btn btn-secondary btn-check-up\" type=\"button\"><i class=\"fa fa-eye\"></i> '\n . $this->tableAdmin->translate('Check up') . '</button>\n </p></form>';\n\n // Identify duplicit URLs\n // originally code A (delete this line later)\n $output .= '<hr><h1><i class=\"fa fa-unlink\"></i> ' . $this->tableAdmin->translate('Duplicit URL') . '</h1>'\n . '<p>' . $this->tableAdmin->translate('Duplicities may appear across languages.') . '</p>'\n . '<div id=\"agenda-urls\">';\n $urls = [];\n foreach (\n [\n // Note: not all apps have all those tables\n 'category',\n 'content',\n 'product'\n ] as $table\n ) {\n foreach (array_keys($this->tableAdmin->TRANSLATIONS) as $i) {\n foreach (\n $this->MyCMS->dbms->fetchAll(\"SELECT COUNT(url_$i) AS _count, url_$i AS url\"\n . ' FROM `' . TAB_PREFIX . \"{$table}` GROUP BY url ORDER BY _count DESC\") as $row\n ) {\n // Tools::add($urls[$row['url']], $row['_count']); // next line is more static analysis friendly:\n $urls[$row['url']] = (isset($urls[$row['url']]) ? $urls[$row['url']] : 0) + $row['_count'];\n }\n }\n }\n foreach ($urls as $key => $value) {\n if ($value <= 1) {\n unset($urls[$key]);\n }\n }\n foreach (array_keys($urls) as $url) {\n $sql = [];\n foreach (['category', 'content', 'product'] as $table) {\n $sql [] = \"SELECT '$table' AS type,id,name\" . '_' . $_SESSION['language']\n . ' AS name FROM `' . TAB_PREFIX . \"{$table}` WHERE \" .\n Tools::arrayListed(\n array_keys($this->tableAdmin->TRANSLATIONS),\n 0,\n ' OR ',\n 'url_',\n '=\"' . $this->MyCMS->escapeSQL((string) $url) . '\"'\n );\n }\n $query = $this->MyCMS->fetchAll(implode(\" UNION\\n\", $sql));\n $output .= '<details><summary>' . Tools::h((string) $url) . ' <sup class=\"badge badge-secondary\">'\n . count($query) . '</sup></summary>';\n foreach ($query as $row) {\n $output .= '<div class=\"ml-2\"><a href=\"?table=' . TAB_PREFIX . $row['type'] . '&amp;where[id]='\n . $row['id'] . '\"><i class=\"fa fa-table\"></i> ' . Tools::h((string) $row['name'])\n . ' (' .\n// $this->tableAdmin->translate(\n $row['type']\n// )\n .\n ')</a></div>' . PHP_EOL;\n }\n $output .= '</details>' . PHP_EOL;\n }\n $output .= (count($urls) ? '' : '<i>' . $this->tableAdmin->translate('None') . '</i>')\n . '</div><footer class=\"mt-2\">'\n . (count($urls) ? '<button type=\"button\" class=\"btn btn-sm btn-secondary mr-2\" id=\"urls-toggle\" title=\"'\n . $this->tableAdmin->translate('Open/close')\n . '\" data-open=\"1\"><i class=\"fas fa-caret-right\"></i> <i class=\"fas fa-caret-down\"></i></button>' : '')\n . '</footer>';\n return $output;\n }", "public function course($course)\n {\n $data = \\App\\Entities\\Learn\\Course::with(['skill', 'lessons'])->whereSlug($course)->first();\n\n abort_unless($data, 404);\n \n if ( \\Auth::check() ) {\n $completes = \\App\\Entities\\Learn\\Advance::where('user_id', \\Auth::id())->get()->map(function ($item) {\n return $item->lesson_id;\n });\n $completes = $completes->toArray();\n } else {\n $completes = [];\n }\n\n return view('app::course', [\n 'course' => $data,\n 'completes' => $completes\n ]);\n }", "public function url();", "public function url();", "public function url();", "function site_url ($page) {\n return \"/assignment/Student Companion/pages/\" . $page;\n }", "public function col_coursename($row) {\n if ($this->download) {\n return $row->coursename;\n }\n return \\html_writer::link(course_get_url($row->courseid), $row->coursename);\n }", "public function show($course_id, $id)\n {\n \n }", "public function getUrl()\n {\n return Mage::getUrl('magna_news', array('news_id' => $this->getId(), '_secure' => true));\n }", "public function getUrl() {\n\t\t$this->getRublon()->log(__METHOD__);\n\t\treturn $this->getRublon()->getAPIDomain() .\n\t\t\tself::URL_PATH_CODE .\n\t\t\turlencode($this->getUrlParamsString());\n\t}", "function get_config_url() {\n global $CFG;\n return $CFG->wwwroot . '/blocks/php_report/config_params.php?id=' . $this->id . '&showcancel=1';\n }", "protected function _getUrl()\n {\n return Router::url([\n '_name' => 'wikiPages',\n 'id' => $this->id,\n 'slug' => Inflector::slug($this->title)\n ]);\n }", "function AssignCourse()\n\t{\t$this->resource = new AdminCourseResource($_GET[\"id\"]);\n\t\tif ($this->resource->id)\n\t\t{\t$this->course = new AdminCourse($this->resource->details[\"cid\"]);\n\t\t} else\n\t\t{\t$this->course = new AdminCourse($_GET[\"cid\"]);\n\t\t}\n\t}", "protected function ___url() {\n\t\treturn $this->pagefiles->url . $this->basename;\n\t}", "function get_target_page($section = 0) {\n $pages = unserialize(file_get_contents(SUBJ_IDX_DEFAULT_TARGETS));\n if ($pages !== false && isset($pages[$section])) {\n return $pages[$section];\n } else {\n return '';\n }\n}", "public function getUrl()\n {\n return trim(implode('/', $this->path), '/').$this->getParams();\n }", "public function get_course_id()\n {\n return $this->get_default_property(self::PROPERTY_COURSE_ID);\n }", "public function url()\n\t{\n\t\treturn Url::to(\"review/\".$this->id.\"/\".$this->slug.\"/\".Session::get('Lang'));\n\t}", "public function link($courseSlug = '')\n {\n if (!$courseSlug) {\n $courseSlug = $this->course->slug;\n }\n\n // Inject parameters according to the order of the topic.show route\n return route('topic.show', [$courseSlug, $this->id, $this->slug]);\n }", "public static function nhtsaUrl($year, $make, $model)\n {\n return config('local.nhtsa_base_url')\n . '/modelyear/' . ($year ? $year : '') \n . '/make/' . ($make ? $make : '')\n .'/model/' . ($model ? $model : '')\n . '?format=json'; \n }", "public function url()\n {\n return '/' . $this->currlang();\n }", "public function edit(course $course)\n {\n //\n }", "public function edit(course $course)\n {\n //\n }", "function display_course($c) {\n global $termList;\n \n // create list of times\n $times = $c['days1'].' '.$c['startend1'];\n if ($c['days2']) $times .= '<br>'.$c['days2'].' ' . $c['startend2'];\n if ($c['days3']) $times .= '<br>'.$c['days3'].' ' . $c['startend3'];\n if ($c['alt_wed'] != 'N/A') $times .= '<br><span class=\"text-warning\" style=\"font-variant:small-caps;\">this class has alternate wednesday meetings</span>';\n \n // create list of locations\n $locs = $c['loc1'];\n if ($c['loc2'] and $c['loc2'] != $c['loc1']) $locs .= '<br>'.$c['loc2'];\n if ($c['loc3'] and $c['loc3'] != $c['loc1'] and $c['loc3'] != $c['loc2']) $locs .= '<br>'.$c['loc3'];\n \n // create list of any distribution requirements it fulfills\n $distrib = 'None';\n if ($c['distribution1']) $distrib = $c['distribution1'];\n if ($c['distribution2']) $distrib .= '<br>'.$c['distribution2'];\n if ($c['distribution3']) $distrib .= '<br>'.$c['distribution3'];\n \n // check if list of prerequisites for course is empty, if so tell user\n $c['prereqs']=='' ? $prereqs = 'None' : $prereqs = $c['prereqs']; \n \n // add links to other sections of the same course if given\n if (!isset($_GET['sections'])) { $sections = get_sections($_GET['crn'],$c['term_code'],$c['course']); }\n if (isset($sections) and !empty($sections)) {\n $sections = '<p>Other sections: '.implode(', ',$sections).'</p>';\n } else $sections = '';\n \n // check whether course is being shopped or not if logged in\n if (isset($_SESSION['user'])) {\n if ($c['shopped'] == 1) {\n $shop_or_unshop = 'unshop';\n $shop_text = 'Stop shopping this course';\n } else {\n $shop_or_unshop = 'shop';\n $shop_text = 'Shop this course';\n }\n $shop = '<p id=\"shop\"><a href=\"javascript:void(0);\" onclick=\"'.$shop_or_unshop.'Course('.$c['term_code'].','.$_GET['crn'].')\">'.$shop_text.'</a></p>';\n } else {\n $shop = '';\n }\n \n // create HTML formatting for course used variables defined above and those given\n $info = <<< EOF\n {$termList[$c['term_code']]} — {$c['course']} ({$c['crn']})<br>\n <h3>{$c['title']}</h3>\n <h4>{$c['instructors']}</h4><br>\n \n <table id=\"info\">\n <tbody>\n <tr>\n <td width=\"70px\">Times</td>\n <td>{$times}</td>\n </tr>\n <tr>\n <td>Location</td>\n <td>{$locs}</td>\n </tr>\n <tr>\n <td>Fulfills</td>\n <td>{$distrib}</td>\n </tr>\n <tr>\n <td>Prereqs</td>\n <td>{$prereqs}</td>\n </tr>\n </tbody>\n </table><br>\n \n <p>{$c['description']}</p>\n \n <p><a href=\"https://courses.wellesley.edu/display_single_course_cb.php?crn={$_GET['crn']}&semester={$c['term_code']}\">View official details</a></p>\n\n {$sections}\n \n {$shop}\nEOF;\n echo $info;\n}", "public function getURL()\n {\n return Config::get('URL') . 'auth/unl/';\n }", "function get_url()\n {\n }", "function CurrPageURL() {\n $pageURL = 'http';\n if ($_SERVER[\"HTTPS\"] == \"on\") {\n $pageURL .= \"s\";\n }\n $pageURL .= \"://\";\n if ($_SERVER[\"SERVER_PORT\"] != \"80\") {\n $pageURL .= $_SERVER[\"SERVER_NAME\"] . \":\" . $_SERVER[\"SERVER_PORT\"] . $_SERVER[\"REQUEST_URI\"];\n } else {\n $pageURL .= $_SERVER[\"SERVER_NAME\"] . $_SERVER[\"REQUEST_URI\"];\n }\n return $pageURL;\n }", "protected function getPortletDetailsUrl()\n {\n return Yii::app()->createUrl('/' . $this->moduleId . '/defaultPortlet/details',\n array_merge($_GET, array( 'portletId' =>\n $this->params['portletId'],\n 'uniqueLayoutId' => $this->uniqueLayoutId)));\n }", "protected function getUrl(){\n\t\treturn $this->apiUrl . $this->apiVersion . '/';\n\t}", "public function sectionUrlWithSuffix($urlSuffix) {\n $sectionUrl = $this->getSectionURL();\n if (!empty($urlSuffix) & !is_integer($urlSuffix)) {\n if ($urlSuffix[0] != '?') {\n $sectionUrl .= '/';\n }\n $sectionUrl .= $urlSuffix;\n }\n return $sectionUrl;\n }", "public function get_image_url(){\n\t\tglobal $CFG;\n\n\t\trequire_once $CFG->libdir . \"/filelib.php\";\n\n\t\t$course = get_course($this->_courseid);\n\n\t\tif ($course instanceof stdClass) {\n\t\t\trequire_once $CFG->libdir . '/coursecatlib.php';\n\t\t\t$course = new course_in_list($course);\n\t\t}\n\n\t\tforeach ($course->get_course_overviewfiles() as $file) {\n\t\t\t$isImage = $file->is_valid_image();\n\n\t\t\tif ($isImage) {\n\t\t\t\treturn file_encode_url(\"$CFG->wwwroot/pluginfile.php\",\n\t\t\t\t\t'/' . $file->get_contextid() . '/' . $file->get_component() . '/' .\n\t\t\t\t\t$file->get_filearea() . $file->get_filepath() . $file->get_filename(), !$isImage);\n\t\t\t}\n\t\t}\n\n\t\treturn false;\n\t}", "public function url()\r\n {\r\n return $this->get_base_url() . http_build_query($this->get_query_params());\r\n }", "function add_catalog_url( $args ) {\n\t\t$args['section_urls']['wc_catalog_designer'] = get_permalink( wc_get_page_id( 'shop' ) );\n\n\t\treturn $args;\n\t}", "public function course_object_by_id_get() {\n\t\t$course_id = $_GET['course_id'];\n\t\t$course = $this->crud_model->get_course_by_id($course_id)->row_array();\n\t\t$course['requirements'] = json_decode($course['requirements']);\n\t\t$course['outcomes'] = json_decode($course['outcomes']);\n\t\t$course['thumbnail'] = $this->get_image('course_thumbnail', $course['id']);\n\t\tif ($course['is_free_course'] == 1) {\n\t\t\t$course['price'] = get_phrase('free');\n\t\t}else{\n\t\t\tif ($course['discount_flag'] == 1){\n\t\t\t\t$course['price'] = currency($course['discounted_price']);\n\t\t\t}else{\n\t\t\t\t$course['price'] = currency($course['price']);\n\t\t\t}\n\t\t}\n\t\t$total_rating = $this->crud_model->get_ratings('course', $course['id'], true)->row()->rating;\n\t\t$number_of_ratings = $this->crud_model->get_ratings('course', $course['id'])->num_rows();\n\t\tif ($number_of_ratings > 0) {\n\t\t\t$course['rating'] = ceil($total_rating / $number_of_ratings);\n\t\t}else {\n\t\t\t$course['rating'] = 0;\n\t\t}\n\t\t$course['number_of_ratings'] = $number_of_ratings;\n\t\t$instructor_details = $this->user_model->get_all_user($course['user_id'])->row_array();\n\t\t$course['instructor_name'] = $instructor_details['first_name'].' '.$instructor_details['last_name'];\n\t\t$course['total_enrollment'] = $this->crud_model->enrol_history($course['id'])->num_rows();\n\t\t$course['shareable_link'] = site_url('home/course/'.slugify($course['title']).'/'.$course['id']);\n\t\treturn $course;\n\t}", "function wooflash_get_coursemodule_info($cm) {\n global $CFG;\n\n $info = new cached_cm_info();\n\n $fullurl = \"$CFG->wwwroot/mod/wooflash/view.php?id=$cm->id&amp;redirect=1\";\n $info->onclick = \"window.open('$fullurl'); return false;\";\n\n return $info;\n}" ]
[ "0.6991761", "0.69681674", "0.6875106", "0.6824039", "0.68070525", "0.64026594", "0.63296634", "0.6297259", "0.6211245", "0.60417706", "0.59746015", "0.59317243", "0.5794842", "0.56442827", "0.56320685", "0.5631329", "0.55912244", "0.559019", "0.55844545", "0.5572492", "0.5547288", "0.55422", "0.5524072", "0.5524072", "0.552052", "0.55146915", "0.55115795", "0.5508408", "0.5477848", "0.54759276", "0.5445419", "0.5422706", "0.54145586", "0.54090905", "0.5395581", "0.53882927", "0.5385424", "0.5384959", "0.5384455", "0.53653276", "0.5351492", "0.5351492", "0.5351492", "0.5351492", "0.5346287", "0.5343316", "0.53346866", "0.5318103", "0.531746", "0.5317147", "0.530727", "0.53037274", "0.53028274", "0.5293894", "0.52938753", "0.5291043", "0.52900714", "0.5285388", "0.5284157", "0.52786255", "0.5269279", "0.526616", "0.5260119", "0.5259898", "0.5255231", "0.52527237", "0.5251181", "0.52463645", "0.52463645", "0.52463645", "0.5242443", "0.52308375", "0.5216926", "0.52057064", "0.519802", "0.51951295", "0.51912254", "0.51900303", "0.51773196", "0.51682556", "0.5163931", "0.51600164", "0.51594627", "0.51593876", "0.5159151", "0.5158768", "0.5158552", "0.5158552", "0.51582384", "0.51546466", "0.51539534", "0.5135655", "0.5134999", "0.51326394", "0.51158273", "0.5113999", "0.51125395", "0.5112423", "0.5110572", "0.51001227" ]
0.67748326
5
Loads all of the course sections into the navigation
public function extend_course_navigation($navigation, navigation_node $node) { global $PAGE; // if section is specified in course/view.php, make sure it is expanded in navigation if ($navigation->includesectionnum === false) { $selectedsection = optional_param('section', null, PARAM_INT); if ($selectedsection !== null && (!defined('AJAX_SCRIPT') || AJAX_SCRIPT == '0') && $PAGE->url->compare(new moodle_url('/course/view.php'), URL_MATCH_BASE)) { $navigation->includesectionnum = $selectedsection; } } // check if there are callbacks to extend course navigation parent::extend_course_navigation($navigation, $node); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function courses(){\n\t\t\t$this->load->view('admin/header');\n\t\t\t$this->load->view('admin/courses');\n\t\t\t$this->load->view('admin/footer');\n\t\t}", "public function sections()\n {\n }", "public function all_course_list(){\n\n\t\t$headerData = null;\n\t\t$sidebarData = null;\n\t\t$page = 'admin/course_list';\n\t\t$mainData = array(\n\t\t\t'pagetitle'=> 'Lodnontec course List',\n\t\t\t'course_list'=> $this->setting_model->Get_All('course'),\n\t\t);\n\t\t$footerData = null;\n\n\t\t$this->template($headerData, $sidebarData, $page, $mainData, $footerData);\n\t}", "public function frontpage_available_courses() {\n\n global $CFG , $DB;\n $coursecontainer = '';\n $chelper = new coursecat_helper();\n $chelper->set_show_courses(self::COURSECAT_SHOW_COURSES_EXPANDED)->set_courses_display_options( array(\n 'recursive' => true,\n 'limit' => $CFG->frontpagecourselimit,\n 'viewmoreurl' => new moodle_url('/course/index.php'),\n 'viewmoretext' => new lang_string('fulllistofcourses')\n ));\n\n $chelper->set_attributes( array( 'class' => 'frontpage-course-list-all frontpageblock-theme' ) );\n\n $courses = core_course_category::get(0)->get_courses( $chelper->get_courses_display_options() );\n\n $totalcount = core_course_category::get(0)->get_courses_count( $chelper->get_courses_display_options() );\n\n $rcourseids = array_keys( $courses );\n\n //$acourseids = array_chunk( $rcourseids, 6);\n $acourseids = $rcourseids;\n $tcount = count($acourseids);\n\n $newcourse = get_string( 'availablecourses' );\n $header = \"\";\n $header .= html_writer::tag('div', \"<div></div>\", array('class' => 'bgtrans-overlay'));\n\n $header .= html_writer::start_tag('div',\n array( 'class' => 'available-courses', 'id' => 'available-courses') );\n $header .= html_writer::start_tag('div', array( 'class' => 'available-overlay' ) );\n $header .= html_writer::start_tag('div', array( 'class' => 'available-block' ) );\n $header .= html_writer::start_tag('div', array('class' => 'container'));\n $header .= html_writer::tag('h2', get_string('availablecourses'));\n\n /* if ($tcount > '1') {\n $header .= html_writer::start_tag('div', array('class' => 'pagenav slider-nav') );\n $header .= html_writer::tag('button', '', array('class' => 'slick-prev nav-item previous', 'type' => 'button') );\n $header .= html_writer::tag('button', '', array('class' => 'slick-next nav-item next', 'type' => 'button') );\n $header .= html_writer::tag('div', '', array('class' => 'clearfix') );\n $header .= html_writer::end_tag('div');\n }*/\n $sliderclass = 'course-slider';\n $header .= html_writer::start_tag('div', array('class' => 'row') );\n $header .= html_writer::start_tag('div', array( 'class' => \" $sliderclass col-md-12\") );\n\n $footer = html_writer::end_tag('div');\n $footer .= html_writer::end_tag('div');\n $footer .= html_writer::end_tag('div');\n $footer .= html_writer::end_tag('div');\n if (count($rcourseids) > 0) {\n $i = '0';\n /* foreach ($acourseids as $courseids) {\n\n $rowcontent = '<div class=\"slider-row \">';*/\n $rowcontent = '';\n foreach ($acourseids as $courseid) {\n $container = '';\n $course = get_course($courseid);\n $noimgurl = $this->output->image_url('no-image', 'theme');\n $courseurl = new moodle_url('/course/view.php', array('id' => $courseid ));\n\n if ($course instanceof stdClass) {\n $course = new core_course_list_element($course);\n }\n\n $imgurl = '';\n $context = context_course::instance($course->id);\n\n foreach ($course->get_course_overviewfiles() as $file) {\n $isimage = $file->is_valid_image();\n $imgurl = file_encode_url(\"$CFG->wwwroot/pluginfile.php\",\n '/'. $file->get_contextid(). '/'. $file->get_component(). '/'.\n $file->get_filearea(). $file->get_filepath(). $file->get_filename(), !$isimage);\n if (!$isimage) {\n $imgurl = $noimgurl;\n }\n }\n\n if (empty($imgurl)) {\n $imgurl = $noimgurl;\n }\n\n $container .= html_writer::start_tag('div', array( 'class' => 'col-md-2') );\n $container .= html_writer::start_tag('div', array( 'class' => 'available-content'));\n $container .= html_writer::start_tag('div', array( 'class' => 'available-img'));\n\n $container .= html_writer::start_tag('a', array( 'href' => $courseurl) );\n $container .= html_writer::empty_tag('img',\n array(\n 'src' => $imgurl,\n 'width' => \"249\",\n 'height' => \"200\",\n 'alt' => $course->get_formatted_name() ) );\n $container .= html_writer::end_tag('a');\n $container .= html_writer::end_tag('div');\n $container .= html_writer::tag('h6', html_writer::tag('a',\n $course->get_formatted_name(),\n array( 'href' => $courseurl ) ),\n array('class' => 'title-text') );\n $container .= html_writer::end_tag('div');\n $container .= html_writer::end_tag('div');\n\n $rowcontent .= $container;\n }\n $i++;\n /*$rowcontent .= html_writer::end_tag('div');*/\n $coursecontainer .= $rowcontent;\n // }\n\n }\n $footer .= html_writer::end_tag('div');\n $footer .= html_writer::end_tag('div');\n $coursehtml = $header.$coursecontainer.$footer;\n return $coursehtml;\n\n if (!$totalcount && !$this->page->user_is_editing() && has_capability('moodle/course:create', context_system::instance())) {\n // Print link to create a new course, for the 1st available category.\n echo $this->add_new_course_button();\n }\n }", "public function getAllSections();", "public function frontpage_available_courses() {\n global $CFG, $DB;\n\n $chelper = new coursecat_helper();\n $chelper->set_show_courses(self::COURSECAT_SHOW_COURSES_EXPANDED)->set_courses_display_options(array(\n 'recursive' => true,\n 'limit' => $CFG->frontpagecourselimit,\n 'viewmoreurl' => new moodle_url('/course/index.php'),\n 'viewmoretext' => new lang_string('fulllistofcourses')));\n\n $chelper->set_attributes(array('class' => 'frontpage-course-list-all'));\n $courses = core_course_category::get(0)->get_courses($chelper->get_courses_display_options());\n $totalcount = core_course_category::get(0)->get_courses_count($chelper->get_courses_display_options());\n if (!$totalcount &&\n !$this->page->user_is_editing() &&\n has_capability('moodle/course:create', \\context_system::instance())\n ) {\n // Print link to create a new course, for the 1st available category.\n return $this->add_new_course_button();\n }\n $latestcard = get_config('theme_remui', 'enablenewcoursecards');\n $coursehtml = '<div class=\"\">\n <div class=\"card-deck slick-course-slider slick-slider ' . ($latestcard ? 'latest-cards' : '') . '\">';\n\n if (!empty($courses)) {\n foreach ($courses as $course) {\n $coursesummary = strip_tags($chelper->get_course_formatted_summary(\n $course,\n array('overflowdiv' => false, 'noclean' => false, 'para' => false)\n ));\n $coursesummary = strlen($coursesummary) > 100 ? substr($coursesummary, 0, 100).\"...\" : $coursesummary;\n $image = \\theme_remui_coursehandler::get_course_image($course, 1);\n $coursename = strip_tags($chelper->get_course_formatted_name($course));\n if (!$latestcard) {\n $coursehtml .= \"\n <div class='card w-100 rounded-bottom mx-0 bg-transparent d-inline-flex flex-column' style='height: 100%;'>\n <div class='m-2 bg-white border' style='height: 100%;'>\n <div\n class='rounded-top'\n style='height: 200px;\n background-image: url({$image});\n background-size: cover;\n background-position: center;\n box-shadow: 0 2px 5px #cccccc;'>\n </div>\n <div class='card-body p-3'>\n <h4 class='card-title m-1 ellipsis ellipsis-2'>\n <a\n href='{$CFG->wwwroot}/course/view.php?id={$course->id}'\n class='font-weight-400 blue-grey-600 font-size-18'>\n {$coursename}\n </a>\n </h4>\n <p class='card-text m-1'>{$coursesummary}</p>\n </div>\n </div>\n </div>\";\n } else {\n if (isset($course->startdate)) {\n $startdate = date('d M, Y', $course->startdate);\n $day = substr($startdate, 0, 2);\n $month = substr($startdate, 3, 3);\n $year = substr($startdate, 8, 4);\n }\n $categoryname = $DB->get_record('course_categories', array('id' => $course->category))->name;\n $categoryname = strip_tags(format_text($categoryname));\n $coursehtml .= \"\n <div class='px-1 course_card card '>\n <div class='wrapper h-100'\n style='background-image: url({$image});\n background-size: cover;\n background-position: center;\n position: relative;'>\n <div class='date btn-primary'>\n <span class='day'>{$day}</span>\n <span class='month'>{$month}</span>\n <span class='year'>{$year}</span>\n </div>\n <div class='data'>\n <div class='content' title='{$coursename}'>\n <span class='author'>{$categoryname}</span>\n <h4 class='title ellipsis ellipsis-3' style='-webkit-box-orient: vertical;visibility: visible;'>\n <a href='{$CFG->wwwroot}/course/view.php?id={$course->id}'>{$coursename}</a>\n </h4>\n <p class='text'>{$coursesummary}</p>\n </div>\n </div>\n </div>\n </div>\";\n }\n }\n }\n\n $coursehtml .= '</div></div>';\n\n $coursehtml .= \" <div class='available-courses button-container w-100 text-center '>\n <button type='button' class='btn btn-floating btn-primary btn-prev btn-sm'>\n <i class='icon fa fa-chevron-left' aria-hidden='true'></i>\n </button>\n <button type='button' class='btn btn-floating btn-primary btn-next btn-sm'>\n <i class='icon fa fa-chevron-right' aria-hidden='true'></i>\n </button>\n </div>\";\n\n $coursehtml .= \"\n <div class='row'>\n <div class='col-12 text-right'>\n <a href='{$CFG->wwwroot}/course' class='btn btn-primary'>\" . get_string('viewallcourses', 'core').\"</a>\n </div>\n </div>\";\n\n return $coursehtml;\n }", "private function retrieveSections() {\n\t\t$this->sections = array();\n\n\t\t$dbResult = $GLOBALS['TYPO3_DB']->exec_SELECTquery(\n\t\t\t'*',\n\t\t\tself::TABLE_SECTIONS,\n\t\t\t'content_uid = ' . $this->getContentUid() .\n\t\t\t\ttx_oelib_db::enableFields(self::TABLE_SECTIONS),\n\t\t\t'',\n\t\t\t'sorting'\n\t\t);\n\t\tif (!$dbResult) {\n\t\t\tthrow new Exception(DATABASE_QUERY_ERROR);\n\t\t}\n\n\t\twhile ($row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($dbResult)) {\n\t\t\t$GLOBALS['TSFE']->sys_page->versionOL(self::TABLE_SECTIONS, $row);\n\t\t\t$GLOBALS['TSFE']->sys_page->fixVersioningPid(\n\t\t\t\tself::TABLE_SECTIONS, $row\n\t\t\t);\n\t\t\tif ($GLOBALS['TSFE']->sys_language_content > 0) {\n\t\t\t\t$row = $GLOBALS['TSFE']->sys_page->getRecordOverlay(\n\t\t\t\t\tself::TABLE_SECTIONS,\n\t\t\t\t\t$row,\n\t\t\t\t\t$GLOBALS['TSFE']->sys_language_content,\n\t\t\t\t\t$GLOBALS['TSFE']->sys_language_contentOL\n\t\t\t\t);\n\t\t\t}\n\n\t\t\t$this->sections[] = $row;\n\t\t}\n\t}", "public function sections()\n {\n $this->authCheck();\n\n $sections = DB::table('sections')\n ->get();\n \n $sections=view('admin.sections')\n ->with('sections',$sections);\n\n return view('admin.master')\n ->with('main_content',$sections);\n }", "public function frontpage_available_courses() {\r\n global $CFG;\r\n require_once($CFG->libdir. '/coursecatlib.php');\r\n\r\n $chelper = new coursecat_helper();\r\n $chelper->set_show_courses(self::COURSECAT_SHOW_COURSES_EXPANDED)->\r\n set_courses_display_options(array(\r\n 'recursive' => true,\r\n 'limit' => $CFG->frontpagecourselimit,\r\n 'viewmoreurl' => new moodle_url('/course/index.php'),\r\n 'viewmoretext' => new lang_string('fulllistofcourses')));\r\n\r\n $chelper->set_attributes(array('class' => 'frontpage-course-list-all'));\r\n $courses = coursecat::get(0)->get_courses($chelper->get_courses_display_options());\r\n $totalcount = coursecat::get(0)->get_courses_count($chelper->get_courses_display_options());\r\n if (!$totalcount && !$this->page->user_is_editing() && has_capability('moodle/course:create', context_system::instance())) {\r\n // Print link to create a new course, for the 1st available category.\r\n return $this->add_new_course_button();\r\n }\r\n return $this->frontpage_courseboxes($chelper, $courses);\r\n }", "function theme_nightingale_get_course_navigation(moodle_page $page) {\n\n $courserenderer = $page->get_renderer('core', 'course');\n\n $availablecourseshtml = $courserenderer->frontpage_available_courses();\n\n if(empty($availablecourseshtml)) {\n $availablecourseshtml = \"No courses available\";\n }\n\n return $availablecourseshtml;\n}", "public function sections_get() {\n $response = array();\n $auth_token = $_GET['auth_token'];\n $course_id = $_GET['course_id'];\n $logged_in_user_details = json_decode($this->token_data_get($auth_token), true);\n\n if ($logged_in_user_details['user_id'] > 0) {\n $response = $this->api_model->sections_get($course_id, $logged_in_user_details['user_id']);\n }else{\n }\n return $this->set_response($response, REST_Controller::HTTP_OK);\n }", "public function my_courses($offset = 0) {\n\n\t\t$this->page_data['page_name'] = \"my_courses\";\n\t\t$this->page_data['page_title'] = 'My courses';\n\t\t$this->page_data['page_view'] = 'user/course_list';\n\t\t$this->page_data['sub_page_name'] = \"course_list_my_courses\";\n\n\n\n// Filter by category related code\n\t\t$filter = $this->getFilterArray();\n\n\t\t$this->pagination_config['per_page'] = 10;\n\t\t$this->pagination_config['total_rows'] = $this->crud_model->get_enrollment_info_by_user_id(\"COUNT\", $this->session->userdata('user_id'), array(\"enrollment\" => array('id')), null, $filter);\n\n// Retrieve enrollment history along with few course data\n\t\t$this->page_data['course_list'] = $this->crud_model->get_enrollment_info_by_user_id(\"OBJECT\", $this->session->userdata('user_id'), array(\n\t\t\t\"enrollment\" => array('id as enroll_id', 'enrolled_price', 'expiry_date'),\n\t\t\t\"course\" => array('id', 'title', 'short_description', 'language', 'slug', 'mock_test'),\n\t\t), array('limit' => $this->pagination_config['per_page'], 'offset' => $offset), $filter, \"SUM\");\n\n// Load the default course view. we are here loadin a default view because\n\t\t// there are few common functionality that works for both user/my_courses and user/wishlist\n\t\t$this->my_board_course_default_view();\n\t}", "function index()\n {\n $data['sectionTable'] = $this->Main_model->get('sections', 'id');\n\n //get year level \n $data['yearLevelTable'] = $this->Main_model->get('year_level', 'id');\n\n $this->load->view('includes/header');\n $this->load->view('sections', $data);\n $this->load->view('includes/footer');\n }", "public function index()\n\t{\n\t\t$this->load->view('courses');\n\t}", "function display_courses( $section ) {\n\tob_start();\n\n\techo display_courses_before( $section );\n\techo display_course( $section );\n\techo display_courses_after( $section );\n\n\treturn trim( ob_get_clean() );\n}", "public function __allSections()\n\t{\n\t\t//current user course\n\t\t$userCourse = $this->Session->read('UserData.usersCourses');\n\t\t$user_course_section = $userCourse[0];\n\t\t//get Course and section name\n\t\t$course_info = $this->getCourseNameOfUser($user_course_section);\n\t\t$course_name = $course_info->course_name;\n\t\t$course_section = $course_info->section_name;\n\t\t$sectionList = array();\n\t\t//getting the course in section/all section setting(changed on 16 April, 2014)\n\t $setting = $this->__getDbSetting($user_course_section);\n\t\tif ($setting == 2) {\n\t\t\t$sections = $this->PleSetting->find('all',array('conditions'=>array('PleSetting.course'=>$course_name,'PleSetting.setting_value'=>2),'fields'=>array('section')));\n\t\t\tforeach ($sections as $section) {\n\t\t\t\t$sectionList[] = trim($section['PleSetting']['section']);\n\t\t\t}\n\t\t\t$sectionList[] = $course_section;\n\t } else {\n\t\t\t//add current user login section\n\t\t\t$sectionList[] = $course_section;\n\t }\n\t\t$tz = array_unique($sectionList);\n\t\treturn $tz;\n\t}", "public function frontpage_my_courses() {\n\n global $USER, $CFG, $DB;\n $content = html_writer::start_tag('div', array('class' => 'frontpage-enrolled-courses') );\n $content .= html_writer::start_tag('div', array('class' => 'container'));\n $content .= html_writer::tag('h2', get_string('mycourses'));\n $coursehtml = parent::frontpage_my_courses();\n if ($coursehtml == '') {\n\n $coursehtml = \"<div id='mycourses'><style> #frontpage-course-list.frontpage-mycourse-list { display:none;}\";\n $coursehtml .= \"</style></div>\";\n }\n $content .= $coursehtml;\n $content .= html_writer::end_tag('div');\n $content .= html_writer::end_tag('div');\n\n return $content;\n }", "public function index()\n\t{\n\t\t$this->load->view('Mycourses');\n\t}", "private function stepNav() {\n $course = $this->step->course;\n\t\t$root = $course->root;\n\t\t$stepUrl = $this->step->url;\n\n\t\t$prev = $this->stepSection->prev;\n\t\t$prevUrl = $prev !== null ? $prev->url : $stepUrl;\n\n\t\t$next = $this->stepSection->next;\n\t\t$nextUrl = $next !== null ? $next->url : $stepUrl;\n\t\t\n\t\t$html = <<<END1\n<div class=\"cl-stepnav-div\"><nav class=\"cl-stepnav cl-nav\"><div><ul>\n<li><a href=\"$stepUrl\"><span>Return to Step Page</span>\n<img alt=\"Return to Step\" width=\"28\" height=\"25\" src=\"$root/vendor/cl/step/img/returnstep.png\" /></a></li>\nEND1;\n\n\t\t// Extra menu items here\n\t\tforeach($this->step->menuExtra as $extra) {\n\t\t\t$html .= $extra->html($this->stepSection, $this->user);\n\t\t}\n\n\t\t$html .= <<<HTML\n<li><a href=\"$prevUrl\"><span>Previous Section</span>\n<img alt=\"Mark Complete\" height=\"25\" src=\"$root/vendor/cl/site/img/previcon.png\" width=\"40\" /></a></li>\n<li><a href=\"$nextUrl\"><span>Next Section</span>\n<img alt=\"Mark Complete\" height=\"25\" src=\"$root/vendor/cl/site/img/nexticon.png\" width=\"40\" /></a></li>\n<li><a href=\"$nextUrl\" class=\"cl-step-completed-next\"><span>Mark Completed and Next Section</span>\n<img alt=\"Mark Complete\" height=\"25\" src=\"$root/vendor/cl/site/img/checknext.png\" width=\"40\" /></a></li>\n<li class=\"cl-step-progress\"></li>\nHTML;\n\n\t\t// Appended menu items here\n\t\tforeach($this->step->menuAppend as $extra) {\n\t\t\t$html .= $extra->html($this->stepSection, $this->user);\n\t\t}\n\t\t\n\t\t/*\n\t\t * End of menu bar \n\t\t */\n\t\t$html .= <<<HTML\n</ul></div>\n</nav></div>\nHTML;\n\t\n\t\treturn $html;\n\t}", "public function init_sections() {\n\t\t// Override this function in your class and assign the array of sections to $this->sections.\n\t\t_e( 'Override init_sections() in your class.', '{plugin_jump_starter_textdomain}' );\n\t}", "public function index() {\n\t\t$this->page_data['title'] = 'Courses in School of Bhagavad Gita';\n\t\t$this->page_data['description'] = 'The courses and other activities to open up personalities and full potential';\n\t\t$this->page_data['keywords'] = 'Children, Adults, Activities, Balagramam, Workshops, Gurukula, Creativity, ' . $this->page_data['keywords'];\n\t\t$this->page_data['top_level_page'] = 'courses';\n\t\t$this->page_data['sub_page_active'] = 'courses';\n\t\treturn view('courses')->with($this->page_data);\n\t}", "public function top_course_menu() {\n global $CFG , $DB;\n $list = core_course_category::make_categories_list();\n $mclist = array();\n\n $sql = \"SELECT a.category , a.cnt from ( SELECT category , count(category) as cnt FROM {course}\";\n $sql .= \" WHERE category != '0' and visible = ? group by category ) as a order by a.cnt desc \";\n\n $params = array('1');\n $result = $DB->get_records_sql($sql, $params, 0, 0);\n shuffle($result);\n if ($result) {\n foreach ($result as $rowcat) {\n if ($result = $DB->record_exists('course_categories', array('id' => $rowcat->category))) {\n $mclist[] = $rowcat->category;\n }\n }\n }\n $mclist1 = array_slice($mclist, 0, 4, true);\n $rcourseids = array();\n foreach ($mclist1 as $catid) {\n $coursecat = core_course_category::get($catid);\n $cname = $coursecat->get_formatted_name();\n $menuheader = '<div class=\"cols\"><h6>'.$cname.'</h6><ul>'.\"\\n\";\n $menufooter = '</ul></div>'.\"\\n\";\n $href = $CFG->wwwroot.'/course/index.php?categoryid='.$catid;\n $mmenuheader = '<li class=\"dropdown-submenu\"><a href=\"'.$href.'\" class=\"\">'.$cname.'</a><ul class=\"dropdown-menu\">';\n $mmenufooter = '</ul></li>';\n $menuitems = '';\n $options = array();\n $options['recursive'] = true;\n $options['offset'] = 0;\n $options['limit'] = 6;\n $options['sort'] = array('sortorder' => 'ASC');\n if ($ccc = $coursecat->get_courses($options)) {\n foreach ($ccc as $cc) {\n if ($cc->visible == \"0\" || $cc->id == \"1\") {\n continue;\n }\n $courseurl = new moodle_url(\"/course/view.php\", array(\"id\" => $cc->id));\n $menuitems .= '<li><a href=\"'.$courseurl.'\">'.$cc->get_formatted_name().'</a></li>'.\"\\n\";\n }\n if (!empty($menuitems)) {\n $rcourseids[$catid] = array(\"desk\" => $menuheader.$menuitems.$menufooter,\n \"mobile\" => $mmenuheader.$menuitems.$mmenufooter\n );\n }\n }\n }\n $mcourseids = array_slice($rcourseids, 0, 4);\n $strcourse = $mstrcourse = '';\n foreach ($mcourseids as $ctid => $marr) {\n $strcourse .= $marr[\"desk\"].\"\\n\";\n $mstrcourse .= $marr[\"mobile\"].\"\\n\";\n }\n\n $courseaurl = new moodle_url('/course/index.php');\n if (!empty($strcourse)) {\n $topcmenu = '<div class=\"custom-dropdown-menu\" id=\"cr_menu\" style=\"display:none;\">';\n $topcmenu .= '<div class=\"cols-wrap\">'.$strcourse.'<div class=\"clearfix\"></div></div></div>';\n } else {\n $topcmenu = \"\";\n }\n $topmmenu = '<ul class=\"dropdown-menu\">'.$mstrcourse.'\n <li><a href=\"'.$courseaurl.'\">\n '.get_string('viewall', 'theme_enlightlite').'</a></li></ul>';\n return compact('topcmenu', 'topmmenu');\n }", "public function contents()\n {\n if (!$this->students->isLogin()) {\n\n header('Location:/login');\n die();\n }\n\n\n /**\n * Main Body Section ///////////////////////////////////////////////////////////////////////////////////////////\n */\n\n\n\n $courses = json_decode($this->students->getCOURSES(),true);\n\n //arrayPrint($courses);\n /**\n *\n $data = $db->getInd('id','SELECT * FROM ?n WHERE id IN (?a)','table', array(1,2));\n */\n $coursese_array=[];\n foreach ($courses as $key => $value){\n\n if($value['activity']=='active')\n\n array_push($coursese_array, $value['id']);\n }\n\n $lessons = DataBase::getInstance()->getDB()->getAll('SELECT * FROM c_lessons_pdf WHERE CourseID IN (?a)',$coursese_array);\n $lessons_out=[];\n foreach ($lessons as $key=> $value){\n $lessons_out[$value['CourseName']][]=$value;\n\n }\n\n DataManager::getInstance()->addData('Lessons', $lessons_out);\n DataManager::getInstance()->addData('Students', $this->students);\n\n\n //arrayPrint($lessons_out);\n /**\n * Render///////////////////////////////////////////////////////////////////////////////////////////////////////\n */\n $this->render();\n\n }", "private function page_load_main_course_js() {\n global $PAGE, $COURSE, $CFG;\n \n //get page url - if not set then ignore it\n $url = $PAGE->has_set_url() ? $PAGE->url : \"\";\n\n //check if its the main course view page\n $regex_url = \"/\" . preg_quote($CFG->wwwroot . \"/course/view.php?id=\", \"/\") . \"[\\d]*\" . \"[\\d]*/\";\n $is_course_main = preg_match($regex_url, $url);\n\n //check if course mod_edit page\n $regex_editing_url = \"/\" . preg_quote($CFG->wwwroot . \"/course/edit.php?id=\", \"/\") . \"[\\d]*/\";\n $is_course_editing_main = preg_match($regex_editing_url, $url);\n \n //if either if main view or main edit\n if($is_course_main === 1 || $is_course_editing_main === 1) {\n \n //load jquery\n $this->cmf_load_jQuery();\n \n //dynamic colors\n $PAGE->requires->css('/course/format/course_menu/dynamic_colors.php?id=' . $COURSE->id);\n \n //if main page\n if($is_course_main === 1) {\n $context = context_course::instance($COURSE->id);//get context\n $is_editting = $PAGE->user_is_editing() and has_capability('moodle/course:update', $context);//is editing mode\n\n //if were not editing, then override display css (display only css)\n if (!$is_editting)\n $PAGE->requires->css('/course/format/course_menu/display_override.css');\n }\n \n //if editing\n if ($is_course_editing_main === 1) {\n $PAGE->requires->css('/course/format/course_menu/jquery/plugin/colorpicker/jquery.colorpicker.css');\n $PAGE->requires->js('/course/format/course_menu/jquery/plugin/colorpicker/jquery.colorpicker.js');\n $PAGE->requires->js('/course/format/course_menu/init.js');\n } \n \n }\n \n \n }", "public function print_multiple_section_page($course, $sections, $mods, $modnames, $modnamesused) {\n global $PAGE;\n\n $modinfo = get_fast_modinfo($course);\n $course = course_get_format($course)->get_course();\n\n $context = context_course::instance($course->id);\n // Title with completion help icon.\n $completioninfo = new completion_info($course);\n echo $completioninfo->display_help_icon();\n echo $this->output->heading($this->page_title(), 2, 'accesshide');\n\n // Copy activity clipboard..\n echo $this->course_activity_clipboard($course, 0);\n\n // Now the list of sections..\n echo $this->start_section_list();\n\n foreach ($modinfo->get_section_info_all() as $section => $thissection) {\n if ($section == 0) {\n // 0-section is displayed a little different then the others\n if ($thissection->summary or !empty($modinfo->sections[0]) or $PAGE->user_is_editing()) {\n echo $this->section_header($thissection, $course, false, 0);\n echo $this->courserenderer->course_section_cm_list($course, $thissection, 0);\n echo $this->courserenderer->course_section_add_cm_control($course, 0, 0);\n echo $this->section_footer();\n }\n continue;\n }\n if ($section > $course->numsections) {\n // activities inside this section are 'orphaned', this section will be printed as 'stealth' below\n continue;\n }\n // Show the section if the user is permitted to access it, OR if it's not available\n // but there is some available info text which explains the reason & should display.\n $showsection = $thissection->uservisible ||\n ($thissection->visible && !$thissection->available &&\n !empty($thissection->availableinfo));\n if (!$showsection) {\n // If the hiddensections option is set to 'show hidden sections in collapsed\n // form', then display the hidden section message - UNLESS the section is\n // hidden by the availability system, which is set to hide the reason.\n if (!$course->hiddensections && $thissection->available) {\n echo $this->section_hidden($section, $course->id);\n }\n\n continue;\n }\n\n if (!$PAGE->user_is_editing() && $course->coursedisplay == COURSE_DISPLAY_MULTIPAGE) {\n // Display section summary only.\n echo $this->section_summary($thissection, $course, null);\n } else {\n echo $this->section_header($thissection, $course, false, 0);\n if ($thissection->uservisible) {\n echo $this->courserenderer->course_section_cm_list($course, $thissection, 0);\n echo $this->courserenderer->course_section_add_cm_control($course, $section, 0);\n }\n echo $this->section_footer();\n }\n }\n\n if ($PAGE->user_is_editing() and has_capability('moodle/course:update', $context)) {\n // Print stealth sections if present.\n foreach ($modinfo->get_section_info_all() as $section => $thissection) {\n if ($section <= $course->numsections or empty($modinfo->sections[$section])) {\n // this is not stealth section or it is empty\n continue;\n }\n echo $this->stealth_section_header($section);\n echo $this->courserenderer->course_section_cm_list($course, $thissection, 0);\n echo $this->stealth_section_footer();\n }\n\n echo $this->end_section_list();\n\n echo html_writer::start_tag('div', array('id' => 'changenumsections', 'class' => 'mdl-right'));\n\n // Increase number of sections.\n $straddsection = get_string('increasesections', 'moodle');\n $url = new moodle_url('/course/changenumsections.php',\n array('courseid' => $course->id,\n 'increase' => true,\n 'sesskey' => sesskey()));\n $icon = $this->output->pix_icon('t/switch_plus', $straddsection);\n echo html_writer::link($url, $icon.get_accesshide($straddsection), array('class' => 'increase-sections'));\n\n if ($course->numsections > 0) {\n // Reduce number of sections sections.\n $strremovesection = get_string('reducesections', 'moodle');\n $url = new moodle_url('/course/changenumsections.php',\n array('courseid' => $course->id,\n 'increase' => false,\n 'sesskey' => sesskey()));\n $icon = $this->output->pix_icon('t/switch_minus', $strremovesection);\n echo html_writer::link($url, $icon.get_accesshide($strremovesection), array('class' => 'reduce-sections'));\n }\n\n echo html_writer::end_tag('div');\n } else {\n echo $this->end_section_list();\n }\n\n }", "public function index(Course $course)\n {\n $sections = $course->sections;\n\n return SectionResource::collection($sections);\n }", "protected function loadThemeSections(){\n $listSection = Section::lists('fileName');\n\n foreach ($listSection as $sec) {\n $section = Section::find($sec);\n\n if(!$section)\n continue;\n\n $this->themeSections[$section->code] = (object) [\n 'name' => $section->title,\n 'picture' => Url::to('themes/'.$this->theme->getDirName().$section->preview),\n 'code' => $section->code,\n 'configForm' => isset($section->attr)?true:false\n ];\n }\n }", "public function index(SchoolSectionsIndexRequest $request)\n {\n $course_id = $request->input('course_id');\n\n if(Auth()->user()->isAbleTo('school_sections-read')){\n // Get all course's sections with lessons list\n $sections = $this->schoolSectionRepository->getAllByCourseIdWithLessons($course_id);\n } else {\n $course = $this->schoolCourseRepository->getById($course_id);\n if($course->purchasedBy(Auth()->id())){\n // Get allowed course's sections with lessons for auth user\n $sections = $this->schoolSectionRepository->getAllowedByCourseIdWithLessonsForUser($course_id, Auth()->id());\n } else {\n return $this->responseError('Ошибка, курс еще не куплен', ['Error. This course not purchased'], 200);\n }\n }\n //$sections = $this->schoolSectionRepository->getAllByCourseIdWithLessons($course_id);\n\n // If sections list is empty, return error\n if($sections->count() == 0){\n return $this->responseError('Error. The list of courses is empty');\n }\n\n // If everything is ok, return category list\n return $this\n ->responseSuccess(\n $sections->toArray(),\n 'Sections retrieved successfully'\n );\n }", "public function add_sections()\n {\n }", "public function index()\n {\n // get courses\n $offset = SCMUtility::cleanText( SCMUtility::issetOrAssign($_GET['offset'],0) );\n $limit = SCMUtility::cleanText( SCMUtility::issetOrAssign($_GET['limit'],15) );\n\n $data = Course::with('students')->skip($offset)->take($limit)->orderBy('created_at','DESC')->get();\n $data = $data->toArray();\n\n View::make('templates/front/course-list.php',compact('data'));\n }", "public function index() {\n $this->load->view('courses/header.php', array('page' => 'main'));\n $this->load->view('courses/main.php');\n $this->load->view('courses/footer.php', array('selected'=> 'browsing'));\n }", "function navigation($subject_array, $course_array, $comment_array) {\n$output = \"<h3>Wahlpflichtblöcke</h3>\";\n\t\t$output .= \"<ul class=\\\"subjects\\\">\";\n\t\t$subject_set = find_all_subjects();\n\t\twhile($subject = mysqli_fetch_assoc($subject_set)){\n\t\t\t$output .= \"<li\";\n\t\t\tif ($subject_array && $subject[\"Fach\"] == $subject_array) {\n\t\t\t\t$output .= \" class=\\\"selected\\\"\";\n\t\t\t}\n\t\t\t$output .= \">\";\n\t\t\t$output .= \"<a href=\\\"manage_content.php?subject=\";\n\t\t\t$output .= urlencode($subject[\"Fach\"]);\n\t\t\t$output .= \"\\\">\";\n\t\t\t$output .= htmlentities($subject[\"Fach\"]);\n\t\t\t$output .= \"</a>\";\n\t\t\t\n\t\t\t$course_set = find_all_courses_for_subject($subject[\"Fach\"]);\n\t\t\t$output .= \"<ul class=\\\"courses\\\">\";\n\t\t\tif ($subject_array == $subject[\"Fach\"] || \n\t\t\t\t\t$course_array[\"Fach\"] == $subject[\"Fach\"]) {\n\t\t\t\twhile($course = mysqli_fetch_assoc($course_set)) {\n\t\t\t\t\t$output .= \"<li\";\n\t\t\t\t\tif ($course_array && $course[\"id\"] == $course_array[\"id\"]) {\n\t\t\t\t\t\t$output .= \" class=\\\"selected\\\"\";\n\t\t\t\t\t}\n\t\t\t\t\t$output .= \">\";\n\t\t\t\t\t$output .= \"<a href=\\\"manage_content.php?course=\";\n\t\t\t\t\t$output .= urlencode($course[\"id\"]);\n\t\t\t\t\t$output .= \"\\\">\";\n\t\t\t\t\t$output .= htmlentities($course[\"course_name\"]);\n\t\t\t\t\t$output .= \"</a>\";\n\t\t\t\t\t\n\t\t\t\t\t$comment_set = find_comments_for_course($course[\"id\"]);\n\t\t\t\t\t$output .= \"<ul class=\\\"comments\\\">\";\n\t\t\t\t\tif ($course_array[\"id\"] == $course[\"id\"] || \n\t\t\t\t\t\t$comment_array[\"course_id\"] == $course[\"id\"]) {\n\t\t\t\t\t\twhile($comment = mysqli_fetch_assoc($comment_set)) {\n\t\t\t\t\t\t\t$output .= \"<li\";\n\t\t\t\t\t\t\tif ($comment_array && $comment[\"id\"] == $comment_array[\"id\"]) {\n\t\t\t\t\t\t\t\t$output .= \" class=\\\"selected\\\"\";\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t$output .= \">\";\n\t\t\t\t\t\t\t$output .= \"<a href=\\\"manage_content.php?comment=\";\n\t\t\t\t\t\t\t$output .= urlencode($comment[\"id\"]);\n\t\t\t\t\t\t\t$output .= \"\\\">\";\n\t\t\t\t\t\t\t$output .= htmlentities($comment[\"user_name\"]);\n\t\t\t\t\t\t\t$output .= \"</a></li>\";\n\t\t\t\t\t\t}\n\t\t\t\t\t\tmysqli_free_result($comment_set);\n\t\t\t\t\t\t$output .= \"</ul></li>\";\n\t\t\t\t\t} else {\n\t\t\t\t\t\tmysqli_free_result($comment_set);\n\t\t\t\t\t\t$output .= \"</ul></li>\";\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tmysqli_free_result($course_set);\n\t\t\t\t$output .= \"</ul></li>\";\n\t\t\t} else {\n\t\t\t\tmysqli_free_result($course_set);\n\t\t\t\t\t$output .= \"</ul></li>\";\n\t\t\t}\n\t\t}\n\t\tmysqli_free_result($subject_set);\n\t\t$output .= \"</ul>\";\n\t\treturn $output;\n\t}", "function browse_sections($db,$section=0, $section_index = '')\r\n\t{\r\n\t\tif (PHP5_DIR) \r\n\t\t\t$menu_loader = geoAdmin::getInstance();\r\n\t\telse \r\n\t\t\t$menu_loader =& geoAdmin::getInstance();\r\n\t\t$this->body .= $menu_loader->getUserMessages();\r\n\t\t\r\n\t\t$this->body .= \"<fieldset id='Page Management'><legend>Pages Management</legend><table cellpadding=2 cellspacing=1 border=0 width=100%>\\n\";\r\n\t\t//browse the listings in this category that are open\r\n\r\n\t\tif ($section)\r\n\t\t{\r\n\t\t\t$sql = \"select * from \".$this->pages_sections_table.\" where section_id = \".$section;\r\n\t\t\tif(!geoMaster::is('classifieds') && geoMaster::is('auctions'))\r\n\t\t\t{\r\n\t\t\t\tif(geoMaster::is('auctions'))\r\n\t\t\t\t\t$sql .= \" and (applies_to = 0 or applies_to = 2)\";\r\n\t\t\t\telse\r\n\t\t\t\t\t$sql .= \" and (applies_to = 0 or applies_to = 1)\";\r\n\t\t\t}\r\n\t\t\t$section_result = $this->db->Execute($sql);\r\n\t\t\t//echo $sql.\" is the query<br>\\n\";\r\n\t\t\tif (!$section_result){\r\n\t\t\t\treturn false;\r\n\t\t\t}elseif ($section_result->RecordCount() == 1){\r\n\t\t\t\t$show_section_data = $section_result->FetchRow();\r\n\t\t\t\t$section_name = $show_section_data[\"name\"];\r\n\t\t\t\t$section_description = $show_section_data[\"description\"];\r\n\t\t\t\t$parent_section = $show_section_data[\"parent_section\"];\r\n\t\t\t}else{\r\n\t\t\t\t//category does not exist\r\n\t\t\t\t$this->error_message = \"Category Does Not Exist\";\r\n\t\t\t\t//echo $sql . \"<br>\";\r\n\t\t\t\t//echo \"<pre>\" . printf(var_dump($section_result->FetchRow()));\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\t$section_name = \"Pages Home\";\r\n\t\t\t$section_description = \"\";\r\n\t\t\t$parent_section = 0;\r\n\t\t}\r\n\r\n\t\t$sql = \"select * from \".$this->pages_sections_table.\" where parent_section = \".$section;\r\n\t\tif(geoMaster::is('auctions')&& !geoMaster::is('classifieds'))\r\n\t\t\t$sql .= \" and (applies_to = 0 or applies_to = 2)\";\r\n\t\telseif(geoMaster::is('classifieds') && !geoMaster::is('auctions'))\r\n\t\t\t$sql .= \" and (applies_to = 0 or applies_to = 1)\";\r\n\t\t$sql .= \" order by display_order\";\r\n\t\t\r\n\t\t$sub_section_result = $this->db->Execute($sql);\r\n\t\t//echo $sql.\" is the query<br>\\n\";\r\n\t\tif (!$sub_section_result)\r\n\t\t{\r\n\t\t\t//echo $sql.\" is the query<br>\\n\";\r\n\t\t\t$this->error_message = $this->messages[5501];\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\tif ($parent_section)\r\n\t\t\t{\r\n\t\t\t\t$parent_section_data = $this->get_section($db,$parent_section);\r\n\t\t\t\t$this->body .= \"<tr>\\n\\t<td class=col_hdr_top colspan=4>\\n\\t\r\n\t\t\t\t\tback to: <a href=index.php?mc=pages_sections&page=sections{$section_index}_show&b=\".$parent_section.\" class=col_hdr_top>\".$parent_section_data[\"name\"].\"</a>\\n\\t</td>\\n</tr>\\n\";\r\n\t\t\t}\r\n\t\t\telseif ($section != 0)\r\n\t\t\t{\r\n\t\t\t\t$this->body .= \"<tr>\\n\\t<td class=col_hdr_top colspan=4>\\n\\t\r\n\t\t\t\t\tback to: <a href=index.php?mc=pages_sections&page=sections_home class=col_hdr_top>Pages Home</a>\\n\\t</td>\\n</tr>\\n\";\r\n\t\t\t}\r\n\t\t\tif ($sub_section_result->RecordCount() > 0)\r\n\t\t\t{\r\n\t\t\t\t//display subsections to this section\r\n\t\t\t\t$this->body .= \"<tr>\\n\\t<td colspan=4 class=group_price_hdr align=center>\\n\\t <b>Subsections of: \".$section_name.\"</b> </a>\\n\\t</td>\\n</tr>\\n\";\r\n\t\t\t\t$this->body .= \"<tr>\\n\\t<td align=center width=45% class=col_hdr_left><b>Section Name and Description</b>\\n\\t</td>\\n\\t\";\r\n\t\t\t\t$this->body .= \"<td align=center width=25% class=col_hdr>\\n\\t<b>Subsections</b>\\n\\t</td>\\n\\t\";\r\n\t\t\t\t$this->body .= \"<td align=center width=25% class=col_hdr>\\n\\t<b>Pages</b>\\n\\t</td>\\n\";\r\n\t\t\t\t$this->body .= \"<td align=center width=5% class=col_hdr>\\n\\t&nbsp;\\n\\t</td>\\n</tr>\";\r\n\t\t\t\t$this->row_count = 0;\r\n\t\t\t\twhile ($show_sub_sections = $sub_section_result->FetchRow())\r\n\t\t\t\t{\r\n\t\t\t\t\t$this->body .= \"<tr class=\".$this->get_row_color().\">\\n\\t<td valign=top>\\n\\t<a href=index.php?mc=pages_sections\".$section_index.\"&page=sections\".$section_index.\"_show&b=\".$show_sub_sections[\"section_id\"].\"><span class=medium_font><font color=000000>\".$show_sub_sections[\"name\"].\"</font></span></a><br><span class=small_font>\";\r\n\t\t\t\t\t//$this->body .= $show_sub_sections[\"description\"];\r\n\t\t\t\t\t$this->body .= \"</span></td>\\n\\t\";\r\n\t\t\t\t\t$this->body .= \"<td align=center valign=top class=small_font>\\n\\t\";\r\n\r\n\t\t\t\t\t$sql = \"select * from \".$this->pages_sections_table.\" where parent_section = \".$show_sub_sections[\"section_id\"];\r\n\t\t\t\t\tif(!geoMaster::is('classifieds') && geoMaster::is('auctions'))\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tif(geoMaster::is('auctions'))\r\n\t\t\t\t\t\t\t$sql .= \" and (applies_to = 0 or applies_to = 2)\";\r\n\t\t\t\t\t\telse\r\n\t\t\t\t\t\t\t$sql .= \" and (applies_to = 0 or applies_to = 1)\";\r\n\t\t\t\t\t}\r\n\t\t\t\t\t$sql .= \" order by display_order\";\r\n\t\t\t\t\t$sub_section_sections_result = $this->db->Execute($sql);\r\n\t\t\t\t\t//echo $sql.\" is the query<br>\\n\";\r\n\t\t\t\t\tif (!$sub_section_sections_result)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t//echo $sql.\" is the query<br>\\n\";\r\n\t\t\t\t\t\t$this->error_message = $this->messages[5501];\r\n\t\t\t\t\t\treturn false;\r\n\t\t\t\t\t}\r\n\t\t\t\t\telseif ($sub_section_sections_result->RecordCount() > 0)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\twhile ($show_this_sub_section = $sub_section_sections_result->FetchRow())\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t$this->body .= $show_this_sub_section[\"name\"].\"<br>\\n\";\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$this->body .= \"none\";\r\n\t\t\t\t\t}\r\n\t\t\t\t\t$this->body .= \" \\n\\t</td>\\n\\t\";\r\n\r\n\t\t\t\t\t$this->body .= \"<td align=center valign=top class=small_font>\\n\\t\";\r\n\t\t\t\t\t//$sql = \"select * from \".$this->pages_table.\" where section_id = \".$show_sub_sections[\"section_id\"].\" order by display_order\";\r\n\t\t\t\t\t$sql = \"select * from \".$this->pages_table.\" where section_id = \".$show_sub_sections[\"section_id\"].\" and module = 0\";\r\n\t\t\t\t\t$sql .= \" and (applies_to = 0\";\r\n\t\t\t\t\tif(geoMaster::is('auctions'))\r\n\t\t\t\t\t\t$sql .= \" or applies_to = 2\";\r\n\t\t\t\t\tif(geoMaster::is('classifieds'))\r\n\t\t\t\t\t\t$sql .= \" or applies_to = 1\";\r\n\t\t\t\t\tif (geoMaster::is('classifieds') && geoMaster::is('auctions'))\r\n\t\t\t\t\t\t$sql .= \" or applies_to = 4\";\r\n\t\t\t\t\t$sql .= \") order by page_id\";\r\n\t\t\t\t\t$sub_pages_result = $this->db->Execute($sql);\r\n\t\t\t\t\t//echo $sql.\" is the query<br>\\n\";\r\n\t\t\t\t\tif (!$sub_pages_result)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t//echo $sql.\" is the query<br>\\n\";\r\n\t\t\t\t\t\t$this->error_message = $this->messages[5501];\r\n\t\t\t\t\t\treturn false;\r\n\t\t\t\t\t}\r\n\t\t\t\t\telseif ($sub_pages_result->RecordCount() > 0)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\twhile ($show_sub_pages = $sub_pages_result->FetchRow())\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t$this->body .= (($this->isPageEditable($show_sub_pages['page_id']))? $show_sub_pages[\"name\"].\"<br>\\n\": '');\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$this->body .= \"none\";\r\n\t\t\t\t\t}\r\n\t\t\t\t\t$this->body .= \" \\n\\t</td>\\n\\t\";\r\n\t\t\t\t\t$enter_button = geoHTML::addButton('Enter','index.php?mc=pages_sections'.$section_index.'&page=sections'.$section_index.'_show&b='.$show_sub_sections[\"section_id\"]);\r\n\t\t\t\t\t$this->body .= \"<td align=center valign=top>\".$enter_button.\"</td>\\n\\t\";\r\n\t\t\t\t\t$this->body .= \"</tr>\\n\";\r\n\t\t\t\t\t$this->row_count++;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t$sql = \"select * from \".$this->pages_table.\" where section_id = \".$section.\" and module = 0\";\r\n\t\t\tif(!geoPC::is_ent()) {\r\n\t\t\t\t$sql .= ' and page_id not in (62, 63)';\r\n\t\t\t}\r\n\t\t\tif(!geoMaster::is('classifieds') && geoMaster::is('auctions'))\r\n\t\t\t{\r\n\t\t\t\tif(geoMaster::is('auctions'))\r\n\t\t\t\t\t$sql .= \" and (applies_to = 0 or applies_to = 2)\";\r\n\t\t\t\telse\r\n\t\t\t\t\t$sql .= \" and (applies_to = 0 or applies_to = 1)\";\r\n\t\t\t}\r\n\t\t\t$sql .= \" order by page_id, name\";\r\n\t\t\t$sub_pages_result = $this->db->Execute($sql);\r\n\t\t\tif (!$sub_pages_result)\r\n\t\t\t{\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t\telseif ($sub_pages_result->RecordCount() > 0)\r\n\t\t\t{\r\n\t\t\t\t//display subpages to this section\r\n\t\t\t\t$this->body .= \"\r\n\t\t\t\t\t<tr>\r\n\t\t\t\t\t\t<td colspan=\\\"100%\\\">\r\n\t\t\t\t\t\t\t<table width=\\\"100%\\\">\r\n\t\t\t\t\t\t\t\t<tr>\r\n\t\t\t\t\t\t\t\t\t<td align=left class=col_hdr_left>\r\n\t\t\t\t\t\t\t\t\t\tPage Name\r\n\t\t\t\t\t\t\t\t\t</td>\r\n\t\t\t\t\t\t\t\t\t<td align=left width=50% class=col_hdr_left>\r\n\t\t\t\t\t\t\t\t\t\tAdmin Note\r\n\t\t\t\t\t\t\t\t\t</td>\r\n\t\t\t\t\t\t\t\t\t<td width=\\\"20%\\\" class=col_hdr_left>&nbsp;</td>\r\n\t\t\t\t\t\t\t\t</tr>\";\r\n\t\t\t\t$this->row_count = 0;\r\n\t\t\t\twhile ($show_sub_pages = $sub_pages_result->FetchRow())\r\n\t\t\t\t{\r\n\t\t\t\t\tif (!$this->isPageEditable($show_sub_pages[\"page_id\"])){ continue; }\r\n\t\t\t\t\t$edit_button = geoHTML::addButton('Edit','index.php?mc=pages_sections&page=sections'.$section_index.'_page&b='.$show_sub_pages[\"page_id\"]);\r\n\t\t\t\t\t$this->body .= \"\r\n\t\t\t\t\t\t\t\t<tr class=\".$this->get_row_color().\">\r\n\t\t\t\t\t\t\t\t\t<td valign=top>\r\n\t\t\t\t\t\t\t\t\t\t<a href=index.php?mc=pages_sections&page=sections\".$section_index.\"_page&b=\".$show_sub_pages[\"page_id\"].\">\r\n\t\t\t\t\t\t\t\t\t\t\t<span class=medium_font>\r\n\t\t\t\t\t\t\t\t\t\t\t\t<font color=000000>\".$show_sub_pages['name'].\"</font>\r\n\t\t\t\t\t\t\t\t\t\t\t</span>\r\n\t\t\t\t\t\t\t\t\t\t</a>\r\n\t\t\t\t\t\t\t\t\t</td>\r\n\t\t\t\t\t\t\t\t\t<td class=medium_font align=left>\r\n\t\t\t\t\t\t\t\t\t\t\".$show_sub_pages['admin_label'].\"<br>\r\n\t\t\t\t\t\t\t\t\t</td>\r\n\t\t\t\t\t\t\t\t\t<td align=center valign=top>\".$edit_button.\"\r\n\t\t\t\t\t\t\t\t\t</td>\r\n\t\t\t\t\t\t\t\t</tr>\\n\";\r\n\t\t\t\t\t$this->row_count++;\r\n\t\t\t\t}\r\n\t\t\t\t$this->body .= \"\r\n\t\t\t\t\t\t\t</table>\r\n\t\t\t\t\t\t</td>\r\n\t\t\t\t\t</tr>\";\r\n\t\t\t}\r\n\t\t}\r\n\t\t$this->body .= \"</table>\r\n</fieldset>\r\n\";\r\n\t\t\r\n\t\treturn true;\r\n\t}", "function learn_press_course_nav_items( $item_id = null, $course_id = null ) {\n\t\tlearn_press_get_template( 'single-course/nav-items.php', array(\n\t\t\t'course_id' => $course_id,\n\t\t\t'item_id' => $item_id,\n\t\t\t'content_only' => learn_press_is_content_item_only()\n\t\t) );\n\t}", "public function on_course_sections_end() {\n $this->converter->set_stash('sectionidslist', $this->sectionids);\n unset($this->sectionids);\n }", "public function index()\n {\n return view('courses.all_courses')->with('course',course::all());\n\n }", "public function index()\n {\n \n $sections = Section::get();\n return view('admin.section.sections')\n ->with('sections' , $sections);\n }", "protected function loadResourcesForRegisteredNavigationComponents() {}", "public function course_overview($courses, $overviews) {\n $html = '';\n $config = get_config('block_my_courses');\n $courseordernumber = 0;\n $maxcourses = count($courses);\n\n foreach ($courses as $key => $course) {\n $html .= $this->output->box_start('coursebox', \"course-{$course->id}\");\n $html .= html_writer::start_tag('div', array('class' => 'course_title'));\n\n // No need to pass title through s() here as it will be done automatically by html_writer.\n $attributes = array('title' => $course->fullname);\n if ($course->id > 0) {\n if (empty($course->visible)) {\n $attributes['class'] = 'dimmed';\n }\n $courseurl = new moodle_url('/course/view.php', array('id' => $course->id));\n $coursefullname = format_string(get_course_display_name_for_list($course), true, $course->id);\n $link = html_writer::link($courseurl, $coursefullname, $attributes);\n $html .= $this->output->heading($link, 3, 'title');\n } else {\n $html .= $this->output->heading(html_writer::link(\n new moodle_url('/auth/mnet/jump.php', array('hostid' => $course->hostid, 'wantsurl' => '/course/view.php?id='.$course->remoteid)),\n format_string($course->shortname, true), $attributes) . ' (' . format_string($course->hostname) . ')', 3, 'title');\n }\n $html .= $this->output->box('', 'flush');\n $html .= html_writer::end_tag('div');\n\n if (!empty($config->showchildren) && ($course->id > 0)) {\n // List children here.\n if ($children = block_my_courses_get_child_shortnames($course->id)) {\n $html .= html_writer::tag('span', $children, array('class' => 'coursechildren'));\n }\n }\n\n // If user is moving courses, then down't show overview.\n if (isset($overviews[$course->id])) { //&& !$ismovingcourse) {\n $html .= $this->activity_display($course->id, $overviews[$course->id]);\n }\n\n $html .= $this->output->box('', 'flush');\n $html .= $this->output->box_end();\n $courseordernumber++;\n }\n\n // Wrap course list in a div and return.\n return html_writer::tag('div', $html, array('class' => 'course_list'));\n }", "function fn_companies_set_navigation_sections($active_section)\n{\n $navigation_sections = [\n 'vendors' => [\n 'title' => __('vendors'),\n 'href' => fn_url('companies.manage'),\n ],\n 'invitations' => [\n 'title' => __('pending_vendor_invitations'),\n 'href' => fn_url('companies.invitations')\n ]\n ];\n\n Registry::set('navigation.dynamic.sections', $navigation_sections);\n Registry::set('navigation.dynamic.active_section', $active_section);\n}", "public function clear() {\n\n\t\t$sections_ids = LP_Object_Cache::get( 'course-' . $this->course_id, 'learn-press/course-sections-ids' );\n\n\t\tif ( ! $sections_ids ) {\n\t\t\treturn false;\n\t\t}\n\n\t\tglobal $wpdb;\n\n\t\tdo_action( 'learn-press/before-clear-section', $this->course_id );\n\n\t\t// Remove all items in course's sections\n\t\t$wpdb->query( $wpdb->prepare( \"DELETE FROM {$wpdb->prefix}learnpress_section_items WHERE %d AND section_id IN(\" . join( ',', $sections_ids ) . ')', 1 ) );\n\t\tlearn_press_reset_auto_increment( 'learnpress_section_items' );\n\t\t// delete sections ids cache\n\t\t// wp_cache_delete( 'course-' . $this->course_id, 'learn-press/course-sections-ids' );\n\n\t\t// delete sections in course\n\t\t$wpdb->query( $wpdb->prepare( \"DELETE FROM {$wpdb->prefix}learnpress_sections WHERE section_course_id = %d\", $this->course_id ) );\n\t\tlearn_press_reset_auto_increment( 'learnpress_sections' );\n\t\t// delete sections cache\n\t\t// wp_cache_delete( 'course-' . $this->course_id, 'learn-press/course-sections' );\n\n\t\tLP_Course_Utils::set_cache_db_sections( $this->course_id, false );\n\n\t\treturn true;\n\t}", "function cps_sections($course, $where=null) {\n global $CFG;\n\n $sql = \"SELECT s.*, c.department, c.course_number\n FROM {$CFG->prefix}block_courseprefs_sections s,\n {$CFG->prefix}block_courseprefs_courses c\n WHERE s.coursesid = c.id\n AND s.idnumber = '{$course->idnumber}'\n \".(($where) ? \"AND {$where}\" : '').\"\n ORDER BY s.section_number\";\n return get_records_sql($sql);\n}", "public function index(Request $request)\n {\n $user=Auth::user();\n $teacher=Teacher::where('email','=',$user->email)->first();\n\n $sections=$teacher->sections()->get();\n $courses=array([]);\n\n foreach($sections as $section){\n\n $courses=Arr::add($courses,$section->id,$section->courses()->first());\n }\n return Inertia::render('Teacher/Courses/Index',compact(['sections','courses']));\n }", "public static function get_sections_course($courseid) {\n\n $context = get_context_instance(CONTEXT_SYSTEM);\n self::validate_context($context);\n require_capability('moodle/course:view', $context); \n $sections = glueserver_course_db::glueserver_get_sections_course($courseid);\n $returns = array();\n foreach ($sections as $section) {\n $section = new glueserver_section($section);\n $returns[] = $section->get_data();\n }\n return $returns;\n }", "public function setSections() {\n\t\t\t$schedules\t=\tarray();\n \t$wp_get_schedules\t=\tfunction_exists( 'wp_get_schedules' ) ? wp_get_schedules() : null;\n \tif( is_array( $wp_get_schedules ) && !empty( $wp_get_schedules ) ){\n \t\tforeach ($wp_get_schedules as $key=>$value) {\n \t\t\t$schedules[ $key ]\t=\t$value['display'];\n \t\t}\n \t}\n\n\t\t\t$this->sections[] \t=\tarray(\n\t\t\t\t'title'\t=>\t__('General','neat'),\n\t\t\t\t'icon'\t=>\t'el-icon-cogs',\n\t\t\t\t'desc'\t=>\tnull,\n\t\t\t\t'fields'\t=>\tarray(\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'id' => 'homepage',\n\t\t\t\t\t\t'type' => 'callback',\n\t\t\t\t\t\t'title' => __('Homepage', 'neat'),\n\t\t\t\t\t\t'subtitle' => __('Setup the Homepage.', 'neat'),\n\t\t\t\t\t\t'callback' => 'neat_homepage_callback'\n\t\t\t\t\t),\t\t\t\t\t\t\t\t\t\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'id' => 'logo',\n\t\t\t\t\t\t'type' => 'callback',\n\t\t\t\t\t\t'title' => __('Logo', 'neat'),\n\t\t\t\t\t\t'subtitle' => __('Upload your logo.', 'neat'),\n\t\t\t\t\t\t'callback' => 'neat_logo_callback'\n\t\t\t\t\t),\t\t\t\t\t\t\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'id'\t=>\t'favicon',\n\t\t\t\t\t\t'type'\t=>\t'media',\n\t\t\t\t\t\t'url' => true,\n 'subtitle' => __('Upload any media using the WordPress native uploader', 'neat'),\t\t\t\t\n\t\t\t\t\t\t'title'\t=>\t__('Favicon','neat')\n\t\t\t\t\t),\n array(\n 'id' => 'custom_css',\n 'type' => 'ace_editor',\n 'title' => __('Custom CSS', 'neat'),\n 'subtitle' => __('Paste your CSS code here, no style tag.', 'neat'),\n 'mode' => 'css',\n 'theme' => 'monokai'\n ),\t\n array(\n 'id' => 'custom_js',\n 'type' => 'ace_editor',\n 'title' => __('Custom JS', 'neat'),\n 'subtitle' => __('Paste your JS code here, no script tag, eg: alert(\\'hello world\\');', 'neat'),\n 'mode' => 'javascript',\n 'theme' => 'chrome'\n )\n\t\t\t\t)\n\t\t\t);\n\t\t\t\n\t\t\t$this->sections[] \t=\tarray(\n\t\t\t\t'title'\t=>\t__('Blog','neat'),\n\t\t\t\t'icon'\t=>\t'el-icon-cogs',\n\t\t\t\t'desc'\t=>\tnull,\n\t\t\t\t'fields'\t=>\tarray(\n\t\t\t\t\t\t/**\n\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t'id' => 'blogpage',\n\t\t\t\t\t\t\t'type' => 'callback',\n\t\t\t\t\t\t\t'title' => __('Blog page', 'neat'),\n\t\t\t\t\t\t\t'subtitle' => __('Setup the blog page.', 'neat'),\n\t\t\t\t\t\t\t'callback' => 'neat_blogpage_callback'\n\t\t\t\t\t\t),\n\t\t\t\t\t\t**/\n\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t'id' => 'bloglayout',\n\t\t\t\t\t\t\t'type' => 'image_select',\n\t\t\t\t\t\t\t'compiler' => true,\n\t\t\t\t\t\t\t'title' => __('Blog Layout', 'neat'),\n\t\t\t\t\t\t\t'subtitle'\t=>\t__('Choose the Blog page layout.','neat'),\n\t\t\t\t\t\t\t'options' => array(\n\t\t\t\t\t\t\t\t\t'r_sidebar' => array('alt' => __('Right Sidebar','neat'), 'img' => ReduxFramework::$_url . 'assets/img/2cr.png'),\n\t\t\t\t\t\t\t\t\t'l_sidebar' => array('alt' => __('Left Sidebar','neat'), 'img' => ReduxFramework::$_url . 'assets/img/2cl.png'),\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t'default' => 'r_sidebar'\n\t\t\t\t\t\t),\n\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t'id' => 'exclude_page_search',\n\t\t\t\t\t\t\t'type' => 'checkbox',\n\t\t\t\t\t\t\t'title' => __('Excluding Page Search', 'neat'),\n\t\t\t\t\t\t\t'subtitle' => __('Do not display the Page in search result page.', 'neat'),\n\t\t\t\t\t\t\t'default' => '1'\n\t\t\t\t\t\t),\n\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t'id' => 'include_video_homepage',\n\t\t\t\t\t\t\t'type' => 'checkbox',\n\t\t\t\t\t\t\t'title' => __('Including Video Format in Homepage', 'neat'),\n\t\t\t\t\t\t\t'subtitle'\t=>\t__('I only want to retrieve the Videos Post Format in Homepage.','neat'),\n\t\t\t\t\t\t\t'default' => '0'\n\t\t\t\t\t\t),\n\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t'id' => 'exclude_video_blogpage',\n\t\t\t\t\t\t\t'type' => 'checkbox',\n\t\t\t\t\t\t\t'title' => __('Excluding Video Format in Blog Page', 'neat'),\n\t\t\t\t\t\t\t'subtitle'\t=>\t__('Do not retrieve the the Videos Post Format in Blog page.','neat'),\n\t\t\t\t\t\t\t'default' => '0'\n\t\t\t\t\t\t),\n\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t'id' => 'appid',\n\t\t\t\t\t\t\t'type' => 'text',\n\t\t\t\t\t\t\t'title' => __('AppID', 'neat'),\n\t\t\t\t\t\t\t'subtitle' => 'Facebook AppID',\n\t\t\t\t\t\t\t'description'\t=> sprintf( __('Get a key %s.', 'neat'), '<a target=\"_blank\" href=\"https://developers.facebook.com\">HERE</a>')\n\t\t\t\t\t\t),\n\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t'id' => 'comment',\n\t\t\t\t\t\t\t'type' => 'button_set',\n\t\t\t\t\t\t\t'title'\t=>\t__('Comment','neat'),\n\t\t\t\t\t\t\t'subtitle'\t=>\t__('Choose the Comment System.','neat'),\n\t\t\t\t\t\t\t'description'\t=>\t__('If you use the Comment plugin (Disqus, facebook ... etc), You have to choose \"Default\".','neat'),\n\t\t\t\t\t\t\t'options' => array(\n\t\t\t\t\t\t\t\t'default'\t\t=>\t\t__('Default','neat'),\n\t\t\t\t\t\t\t\t'facebook'\t\t=>\t\t__('Facebook','neat'),\n\t\t\t\t\t\t\t\t'both'\t\t\t=>\t\t__('Both','neat')\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t'default' => 'default'\n\t\t\t\t\t\t),\n\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t'id' => 'info-warning-both',\n\t\t\t\t\t\t\t'type' => 'info',\n\t\t\t\t\t\t\t'style' => 'warning',\n\t\t\t\t\t\t\t//'title' => __('Warning.', 'neat'),\n\t\t\t\t\t\t\t'desc' => __('The total comment number = default + facebook numner.','neat'),\n\t\t\t\t\t\t\t'indent' => false,\n\t\t\t\t\t\t\t'required' => array('comment', \"=\", 'both'),\n\t\t\t\t\t\t),\t\t\t\t\t\t\n\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t'id' => 'info-warning',\n\t\t\t\t\t\t\t'type' => 'info',\n\t\t\t\t\t\t\t'style' => 'warning',\n\t\t\t\t\t\t\t//'title' => __('Warning.', 'neat'),\n\t\t\t\t\t\t\t'desc' => sprintf( __('If you use the Facebook Comment system, You have to setup the %s in one time, If you change the Permalink, All the exists comments will be lost.','neat') , '<a href=\"'.admin_url( 'options-permalink.php' ).'\">Permalink</a>' ),\n\t\t\t\t\t\t\t'indent' => false,\n\t\t\t\t\t\t\t'required' => array('comment', \"!=\", 'default'),\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\tarray(\n\t\t\t\t\t\t\t'id' => 'data-colorscheme',\n\t\t\t\t\t\t\t'type' => 'button_set',\n\t\t\t\t\t\t\t'title' => __('Comment Style', 'neat'),\n\t\t\t\t\t\t\t'description'\t=>\t__('The color scheme used by the plugin. Can be \"light\" or \"dark\".','neat'),\n\t\t\t\t\t\t\t'options'\t=>\tarray(\n\t\t\t\t\t\t\t\t'light'\t=>\t__('Light','neat'),\n\t\t\t\t\t\t\t\t'dark'\t=>\t__('Dark','neat')\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t'default' => 'light',\n\t\t\t\t\t\t\t'indent' => false,\n\t\t\t\t\t\t\t'required' => array('comment', \"!=\", 'default'),\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\tarray(\n\t\t\t\t\t\t\t'id' => 'data-numposts',\n\t\t\t\t\t\t\t'type' => 'text',\n\t\t\t\t\t\t\t'title' => __('Number of Posts', 'neat'),\n\t\t\t\t\t\t\t'description'\t=>\t__('The number of comments to show by default. The minimum value is 1.','neat'),\n\t\t\t\t\t\t\t'default'\t=>\t10,\n\t\t\t\t\t\t\t'validate' => 'comma_numeric',\n\t\t\t\t\t\t\t'indent' => false,\n\t\t\t\t\t\t\t'required' => array('comment', \"!=\", 'default'),\n\t\t\t\t\t\t),\n\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t'id' => 'data-orderby',\n\t\t\t\t\t\t\t'type' => 'select',\n\t\t\t\t\t\t\t'title' => __('Order by', 'neat'),\n\t\t\t\t\t\t\t'description'\t=>\tsprintf( __('The order to use when displaying comments. Can be \"social\", \"reverse_time\", or \"time\". The different order types are explained %s','neat') , '<a target=\"_blank\" href=\"https://developers.facebook.com/docs/plugins/comments#faqorder\">in the FAQ</a>' ),\n\t\t\t\t\t\t\t'options'\t=>\tarray(\n\t\t\t\t\t\t\t\t'social'\t\t=>\t__('Social','neat'),\n\t\t\t\t\t\t\t\t'reverse_time'\t=>\t__('Reverse Time','neat'),\n\t\t\t\t\t\t\t\t'time'\t\t\t=>\t__('Time','neat')\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t'default'\t=>\t'social',\n\t\t\t\t\t\t\t'indent' => false,\n\t\t\t\t\t\t\t'required' => array('comment', \"!=\", 'default'),\n\t\t\t\t\t\t),\t\t\t\t\t\t\n\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t'id' => 'facebooklang',\n\t\t\t\t\t\t\t'type' => 'select',\n\t\t\t\t\t\t\t'title' => __('Language', 'neat'),\n\t\t\t\t\t\t\t'options'\t=>\tarray(\n\t\t\t\t\t\t\t\t'af_ZA'\t\t\t=>\t\t'Afrikaans',\n\t\t\t\t\t\t\t\t'ar_AR'\t\t\t=>\t\t'Arabic',\n\t\t\t\t\t\t\t\t'az_AZ'\t\t\t=>\t\t'Azerbaijani',\n\t\t\t\t\t\t\t\t'be_BY'\t\t\t=>\t\t'Belarusian',\n\t\t\t\t\t\t\t\t'bg_BG'\t\t\t=>\t\t'Bulgarian',\n\t\t\t\t\t\t\t\t'bn_IN'\t\t\t=>\t\t'Bengali',\n\t\t\t\t\t\t\t\t'bs_BA'\t\t\t=>\t\t'Bosnian',\n\t\t\t\t\t\t\t\t'ca_ES'\t\t\t=>\t\t'Catalan',\n\t\t\t\t\t\t\t\t'cs_CZ'\t\t\t=>\t\t'Czech',\n\t\t\t\t\t\t\t\t'cy_GB'\t\t\t=>\t\t'Welsh',\n\t\t\t\t\t\t\t\t'da_DK'\t\t\t=>\t\t'Danish',\n\t\t\t\t\t\t\t\t'de_DE'\t\t\t=>\t\t'German',\n\t\t\t\t\t\t\t\t'el_GR'\t\t\t=>\t\t'Greek',\n\t\t\t\t\t\t\t\t'en_GB'\t\t\t=>\t\t'English (UK)',\t\n\t\t\t\t\t\t\t\t'en_PI'\t\t\t=>\t\t'English (Pirate)',\n\t\t\t\t\t\t\t\t'en_UD'\t\t\t=>\t\t'English (Upside Down)',\n\t\t\t\t\t\t\t\t'en_US'\t\t\t=>\t\t'English (US)',\n\t\t\t\t\t\t\t\t'eo_EO'\t\t\t=>\t\t'Esperanto',\n\t\t\t\t\t\t\t\t'es_ES'\t\t\t=>\t\t'Spanish (Spain)',\n\t\t\t\t\t\t\t\t'es_LA'\t\t\t=>\t\t'Spanish',\n\t\t\t\t\t\t\t\t'et_EE'\t\t\t=>\t\t'Estonian',\n\t\t\t\t\t\t\t\t'eu_ES'\t\t\t=>\t\t'Basque',\n\t\t\t\t\t\t\t\t'fa_IR'\t\t\t=>\t\t'Persian',\n\t\t\t\t\t\t\t\t'fb_LT'\t\t\t=>\t\t'Leet Speak',\n\t\t\t\t\t\t\t\t'fi_FI'\t\t\t=>\t\t'Finnish',\n\t\t\t\t\t\t\t\t'fo_FO'\t\t\t=>\t\t'Faroese',\n\t\t\t\t\t\t\t\t'fr_CA'\t\t\t=>\t\t'French (Canada)',\n\t\t\t\t\t\t\t\t'fr_FR'\t\t\t=>\t\t'French (France)',\n\t\t\t\t\t\t\t\t'fy_NL'\t\t\t=>\t\t'Frisian',\n\t\t\t\t\t\t\t\t'ga_IE'\t\t\t=>\t\t'Irish',\n\t\t\t\t\t\t\t\t'gl_ES'\t\t\t=>\t\t'Galician',\n\t\t\t\t\t\t\t\t'he_IL'\t\t\t=>\t\t'Hebrew',\n\t\t\t\t\t\t\t\t'hi_IN'\t\t\t=>\t\t'Hindi',\n\t\t\t\t\t\t\t\t'hr_HR'\t\t\t=>\t\t'Croatian',\n\t\t\t\t\t\t\t\t'hu_HU'\t\t\t=>\t\t'Hungarian',\n\t\t\t\t\t\t\t\t'hy_AM'\t\t\t=>\t\t'Armenian',\n\t\t\t\t\t\t\t\t'id_ID'\t\t\t=>\t\t'Indonesian',\n\t\t\t\t\t\t\t\t'is_IS'\t\t\t=>\t\t'Icelandic',\n\t\t\t\t\t\t\t\t'it_IT'\t\t\t=>\t\t'Italian',\n\t\t\t\t\t\t\t\t'ja_JP'\t\t\t=>\t\t'Japanese',\n\t\t\t\t\t\t\t\t'ka_GE'\t\t\t=>\t\t'Georgian',\n\t\t\t\t\t\t\t\t'km_KH'\t\t\t=>\t\t'Khmer',\n\t\t\t\t\t\t\t\t'ko_KR'\t\t\t=>\t\t'Korean',\n\t\t\t\t\t\t\t\t'ku_TR'\t\t\t=>\t\t'Kurdish',\n\t\t\t\t\t\t\t\t'la_VA'\t\t\t=>\t\t'Latin',\n\t\t\t\t\t\t\t\t'lt_LT'\t\t\t=>\t\t'Lithuanian',\n\t\t\t\t\t\t\t\t'lv_LV'\t\t\t=>\t\t'Latvian',\n\t\t\t\t\t\t\t\t'mk_MK'\t\t\t=>\t\t'Macedonian',\n\t\t\t\t\t\t\t\t'ml_IN'\t\t\t=>\t\t'Malayalam',\n\t\t\t\t\t\t\t\t'ms_MY'\t\t\t=>\t\t'Malay',\n\t\t\t\t\t\t\t\t'nb_NO'\t\t\t=>\t\t'Norwegian (bokmal)',\n\t\t\t\t\t\t\t\t'ne_NP'\t\t\t=>\t\t'Nepali',\n\t\t\t\t\t\t\t\t'nl_NL'\t\t\t=>\t\t'Dutch',\n\t\t\t\t\t\t\t\t'nn_NO'\t\t\t=>\t\t'Norwegian (nynorsk)',\n\t\t\t\t\t\t\t\t'pa_IN'\t\t\t=>\t\t'Punjabi',\n\t\t\t\t\t\t\t\t'pl_PL'\t\t\t=>\t\t'Polish',\n\t\t\t\t\t\t\t\t'ps_AF'\t\t\t=>\t\t'Pashto',\n\t\t\t\t\t\t\t\t'pt_BR'\t\t\t=>\t\t'Portuguese (Brazil)',\n\t\t\t\t\t\t\t\t'pt_PT'\t\t\t=>\t\t'Portuguese (Portugal)',\n\t\t\t\t\t\t\t\t'ro_RO'\t\t\t=>\t\t'Romanian',\n\t\t\t\t\t\t\t\t'ru_RU'\t\t\t=>\t\t'Russian',\n\t\t\t\t\t\t\t\t'sk_SK'\t\t\t=>\t\t'Slovak',\n\t\t\t\t\t\t\t\t'sl_SI'\t\t\t=>\t\t'Slovenian',\n\t\t\t\t\t\t\t\t'sq_AL'\t\t\t=>\t\t'Albanian',\n\t\t\t\t\t\t\t\t'sr_RS'\t\t\t=>\t\t'Serbian',\n\t\t\t\t\t\t\t\t'sv_SE'\t\t\t=>\t\t'Swedish',\n\t\t\t\t\t\t\t\t'sw_KE'\t\t\t=>\t\t'Swahili',\n\t\t\t\t\t\t\t\t'ta_IN'\t\t\t=>\t\t'Tamil',\n\t\t\t\t\t\t\t\t'te_IN'\t\t\t=>\t\t'Telugu',\n\t\t\t\t\t\t\t\t'th_TH'\t\t\t=>\t\t'Thai',\n\t\t\t\t\t\t\t\t'tl_PH'\t\t\t=>\t\t'Filipino',\n\t\t\t\t\t\t\t\t'tr_TR'\t\t\t=>\t\t'Turkish',\n\t\t\t\t\t\t\t\t'uk_UA'\t\t\t=>\t\t'Ukrainian',\n\t\t\t\t\t\t\t\t'vi_VN'\t\t\t=>\t\t'Vietnamese',\n\t\t\t\t\t\t\t\t'zh_CN'\t\t\t=>\t\t'Simplified Chinese (China)',\n\t\t\t\t\t\t\t\t'zh_HK'\t\t\t=>\t\t'Traditional Chinese (Hong Kong)',\n\t\t\t\t\t\t\t\t'zh_TW'\t\t\t=>\t\t'Traditional Chinese (Taiwan)'\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t'default'\t=>\t'en_US',\n\t\t\t\t\t\t\t'indent' => false,\n\t\t\t\t\t\t\t'required' => array('comment', \"!=\", 'default'),\n\t\t\t\t\t\t),\n\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t'id' => 'counter_up_interval',\n\t\t\t\t\t\t\t'type' => 'select',\n\t\t\t\t\t\t\t'title' => __('Scheduling Intervals', 'neat'),\n\t\t\t\t\t\t\t'subtitle'\t=>\t__('Scheduling the updating Counter intervals.','neat'),\n\t\t\t\t\t\t\t'description'\t=>\t__('Leave blank for real time.','neat'),\n\t\t\t\t\t\t\t'options'\t\t=>\t$schedules,\n\t\t\t\t\t\t\t'default'\t=>\t'15m'\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\t\t\t\n\t\t\t$this->sections[]\t=\tarray(\n\t\t\t\t'title'\t=>\t__('Submit','neat'),\n\t\t\t\t'icon' => 'el-icon-upload',\n\t\t\t\t'desc' => __('<p class=\"description\">Neat support the post submission at Fronend through Contact Form 7 Form.</p>', 'neat'),\n\t\t\t\t'fields'\t=>\tarray(\t\t\t\t\t\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'id' => 'cf7id',\n\t\t\t\t\t\t'type' => 'text',\n\t\t\t\t\t\t'title' => __('Contact Form 7 ID', 'neat'),\n\t\t\t\t\t\t'description'\t=>\tsprintf( __('Enter the form ID for Post Submission, %s','neat'), '<a href=\"'.admin_url( 'admin.php?page=wpcf7' ).'\">Where is it?</a>' ),\n\t\t\t\t\t\t'validate' => 'comma_numeric'\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'id' => 'post_status',\n\t\t\t\t\t\t'type' => 'select',\n\t\t\t\t\t\t'title' => __('Post Status', 'neat'),\n\t\t\t\t\t\t'description'\t=>\t__('Set the post status for the post, which is submitted through the Contact Form 7 at Frontend.','neat'),\n\t\t\t\t\t\t'options'\t=>\tarray(\n\t\t\t\t\t\t\t'pending'\t=>\t__('Pending','neat'),\n\t\t\t\t\t\t\t'publish'\t=>\t__('publish','neat')\n\t\t\t\t\t\t),\n\t\t\t\t\t\t'default'\t=>\t'pending'\n\t\t\t\t\t),\n\t\t\t\t\t/**\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'id' => 'user_roles',\n\t\t\t\t\t\t'type' => 'select',\n\t\t\t\t\t\t'title' => __('Who can submit the post?', 'neat'),\n\t\t\t\t\t\t'data' => 'roles',\n\t\t\t\t\t\t'description'\t=>\t__('Choose the User roles, all users of this roles can submit the post through Frontend, Leave blank for Guest (all posts is submitted by guest will be assigned to Admin).','neat'),\n\t\t\t\t\t\t'multi' => true,\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'id' => 'limit_posts_amount',\n\t\t\t\t\t\t'type' => 'text',\n\t\t\t\t\t\t'title' => __('Posts amount/day', 'neat'),\n\t\t\t\t\t\t'description'\t=>\t__( 'Limit the posts per day for the User (This function won\\'t work if Guest post is activated), 0 is un-limit.','neat' ),\n\t\t\t\t\t\t'validate' => 'comma_numeric',\n\t\t\t\t\t\t'default'\t=>\t5\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'id' => 'role_not_limit',\n\t\t\t\t\t\t'type' => 'select',\n\t\t\t\t\t\t'title' => __('Roles is not limited', 'neat'),\n\t\t\t\t\t\t'data' => 'roles',\n\t\t\t\t\t\t'description'\t=>\t__('Don\\'t apply the limit post for this roles.','neat'),\n\t\t\t\t\t\t'multi' => true,\n\t\t\t\t\t),\n\t\t\t\t\t**/\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'id' => 'response',\n\t\t\t\t\t\t'type' => 'checkbox',\n\t\t\t\t\t\t'title' => __('Auto Response', 'neat'),\n\t\t\t\t\t\t'subtitle' => __('Send the message through email to the User after submitted.', 'neat'),\n\t\t\t\t\t\t'default' => 0\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'id' => 'response_name',\n\t\t\t\t\t\t'type' => 'text',\n\t\t\t\t\t\t'title' => __('Sender\\'s name', 'neat'),\n\t\t\t\t\t\t'default'\t=>\tget_bloginfo( 'name' ),\n\t\t\t\t\t\t'indent' => false,\n\t\t\t\t\t\t'required' => array('response', \"=\", 1),\n\t\t\t\t\t),\t\t\t\t\t\t\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'id' => 'response_email',\n\t\t\t\t\t\t'type' => 'text',\n\t\t\t\t\t\t'title' => __('Sender\\'s email', 'neat'),\n\t\t\t\t\t\t'default'\t=>\tget_bloginfo( 'admin_email' ),\n\t\t\t\t\t\t'indent' => false,\n\t\t\t\t\t\t'required' => array('response', \"=\", 1),\n\t\t\t\t\t),\t\t\t\t\t\t\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'id' => 'response_subject',\n\t\t\t\t\t\t'type' => 'text',\n\t\t\t\t\t\t'title' => __('Response Subject', 'neat'),\n\t\t\t\t\t\t'subtitle' => __('The subject of the email', 'neat'),\n\t\t\t\t\t\t'description'\t=>\tsprintf( __('<strong>Tags support:</strong><br/><code>[user]</code>: Username/Display Name of User.<br/><code>[sitename]</code>: Your site name (%s)<br/><code>[site_desc]</code>: Your Site description (%s)','neat'), get_bloginfo('name'), get_bloginfo('description') ),\n\t\t\t\t\t\t'indent' => false,\n\t\t\t\t\t\t'required' => array('response', \"=\", 1),\t\t\t\t\t\t\t\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'id' => 'response_content',\n\t\t\t\t\t\t'type' => 'textarea',\n\t\t\t\t\t\t'title' => __('Response Content', 'neat'),\n\t\t\t\t\t\t'subtitle' => __('The Content of the email', 'neat'),\n\t\t\t\t\t\t'description'\t=>\tsprintf( __('<strong>Tags support:</strong><br/><code>[user]</code>: Username/Display Name of User.<br/><code>[sitename]</code>: Your site name (%s)<br/><code>[site_desc]</code>: Your Site description (%s)<br/><code>[post_link]</code>: The post link (working for the Publish post).','neat'), get_bloginfo('name'), get_bloginfo('description') ),\n\t\t\t\t\t\t'indent' => false,\n\t\t\t\t\t\t'required' => array('response', \"=\", 1)\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)\n\t\t\t);\t\t\t\n\t\t\t\n\t\t\t$this->sections[]\t=\tarray(\n\t\t\t\t'title'\t=>\t__('Styling','neat'),\n\t\t\t\t'icon' => 'el-icon-website',\n\t\t\t\t'fields'\t=>\tarray(\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'id' => 'main-style',\n\t\t\t\t\t\t'type' => 'image_select',\n\t\t\t\t\t\t'compiler' => true,\n\t\t\t\t\t\t'title' => __('Main Style', 'neat'),\n\t\t\t\t\t\t'options' => array(\n\t\t\t\t\t\t\t'main' => array('alt' => __('Default','neat') , 'img' => NEAT_THEME_URI . '/assets/img/default.png' ),\n\t\t\t\t\t\t\t'main-blue' => array('alt' => __('Blue style','neat') , 'img' => NEAT_THEME_URI . '/assets/img/blue.png' ),\n\t\t\t\t\t\t\t'main-red' => array('alt' => __('Red style','neat') , 'img' => NEAT_THEME_URI . '/assets/img/red.png' ),\n\t\t\t\t\t\t\t'main-dark' => array('alt' => __('Dark style','neat') , 'img' => NEAT_THEME_URI . '/assets/img/dark.png' ),\n\t\t\t\t\t\t),\n\t\t\t\t\t\t'default' => 'main'\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'id' => 'background',\n\t\t\t\t\t\t'type' => 'background',\n\t\t\t\t\t\t'output' => array('body'),\n\t\t\t\t\t\t'title' => __('Body Background', 'neat'),\n\t\t\t\t\t\t'subtitle' => __('Body background with image, color, etc.', 'neat'),\n\t\t\t\t\t\t'default' => '#FFFFFF',\n\t\t\t\t\t),\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'id' => 'header-background',\n\t\t\t\t\t\t'type' => 'color',\n\t\t\t\t\t\t'title' => __('Header Background Color', 'neat'),\n\t\t\t\t\t\t'subtitle' => __('Pick a background color for the Header (default: #ffffff).', 'neat'),\n\t\t\t\t\t\t'default' => '#ffffff',\n\t\t\t\t\t\t'validate' => 'color',\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'id' => 'menu-color',\n\t\t\t\t\t\t'type' => 'color',\n\t\t\t\t\t\t'title' => __('Menu Color', 'neat'),\n\t\t\t\t\t\t'subtitle' => __('Pick a color for the Menu (default: #b3b3b3).', 'neat'),\n\t\t\t\t\t\t'default' => '#b3b3b3',\n\t\t\t\t\t\t'validate' => 'color',\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'id' => 'menu-hover-color',\n\t\t\t\t\t\t'type' => 'color',\n\t\t\t\t\t\t'title' => __('Menu Hover Color', 'neat'),\n\t\t\t\t\t\t'subtitle' => __('Pick a color for the Menu Hover (default: #2ecc71).', 'neat'),\n\t\t\t\t\t\t'default' => '#2ecc71',\n\t\t\t\t\t\t'validate' => 'color',\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'id' => 'footer-background',\n\t\t\t\t\t\t'type' => 'color',\n\t\t\t\t\t\t'title' => __('Footer Background', 'neat'),\n\t\t\t\t\t\t'subtitle' => __('Pick a background color for the Footer (default: #ffffff).', 'neat'),\n\t\t\t\t\t\t'default' => '#ffffff',\n\t\t\t\t\t\t'validate' => 'color',\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'id' => 'footer-color',\n\t\t\t\t\t\t'type' => 'color',\n\t\t\t\t\t\t'title' => __('Footer Color', 'neat'),\n\t\t\t\t\t\t'subtitle' => __('Pick a color for the Footer Text (default: #bfbfbf).', 'neat'),\n\t\t\t\t\t\t'default' => '#bfbfbf',\n\t\t\t\t\t\t'validate' => 'color',\n\t\t\t\t\t),\t\t\t\t\t\t\n\t\t\t\t)\n\t\t\t);\t\t\t\n\t\t\t\n\t\t\t//footer\n\t\t\t$footer_field = array();\n\t\t\t$footer_field[] = array(\n\t\t\t\t'id'\t=>\t'footer_text',\n\t\t\t\t'title'\t=>\t__('Copyright Text','neat'),\n\t\t\t\t'type'\t=>\t'textarea',\n\t\t\t\t'default'\t=>\tsprintf( __('Copyright © 2014 <a href=\"%s\">Neat</a> - All Rights Reserved.','neat'), home_url() ),\n\t\t\t\t'desc'\t=>\t__('HTML is allowed in here.','neat')\n\t\t\t);\n\t\t\t$socials = neat_option_socials();\n\t\t\tif( is_array( $socials ) ){\n\t\t\t\tforeach ( $socials as $key=>$value) {\n\t\t\t\t\t$footer_field[] = array(\n\t\t\t\t\t\t'id'\t=>\t'footer_social_' . $key,\n\t\t\t\t\t\t'title'\t=>\t$value['name'],\n\t\t\t\t\t\t'type'\t=>\t'text',\n\t\t\t\t\t\t'placeholder'\t=>\t'http://',\n\t\t\t\t\t\t'desc'\t=>\tsprintf( __('Put the %s profile/page link here.','neat') , $value['name'] )\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t$this->sections[]\t=\tarray(\n\t\t\t\t'title'\t=>\t__('Footer','neat'),\n\t\t\t\t'icon'\t=>\t'el-icon-cogs',\n\t\t\t\t'fields'\t=>\t$footer_field\n\t\t\t);\n\t\t\t\t\t\t\t\n }", "public function read_sections_ids() {\n\n\t\t// Get course's sections id data from cache\n\t\t$ids = LP_Object_Cache::get( 'course-' . $this->course_id, 'learn-press/course-sections-ids' );\n\n\t\tif ( ! $ids ) {\n\t\t\tglobal $wpdb;\n\t\t\t// get sections id\n\t\t\t$ids = $wpdb->get_col( $wpdb->prepare( \"SELECT section_id FROM {$wpdb->prefix}learnpress_sections WHERE section_course_id = %d\", $this->course_id ) );\n\t\t\t// Set cache\n\t\t\tLP_Object_Cache::set( 'course-' . $this->course_id, $ids, 'learn-press/course-sections-ids' );\n\t\t}\n\n\t\treturn $ids;\n\t}", "public function actionTopCourses()\r\n\t{\r\n\t\r\n\t\t$this->layout='//layouts/column3';\r\n\t\r\n\t\t$menu_items = array();\r\n\t\r\n\t\t$id= 0;\r\n\t\t\r\n\t\t$parent_hierarchies = MentoringHyerarchy::model()->findAllByAttributes(array('LEVEL_NUMBER'=>'10', 'PARENT_ID'=>0));\r\n\t\t\t\t\r\n\t\t\t$Criteria = new CDbCriteria();\r\n\t\t\t$Criteria->condition = \"RANKING > 2 AND STATUS > 0 AND HIERARCHY_ID IS NOT NULL\";\r\n\t\t\t$Criteria->limit = 10;\r\n\t\t\t$mentoringHierarchy = Course::model()->findAll($Criteria);\r\n\t\r\n\t\t$menu_items[] = array('label'=>'Top cursos','active'=>(!$id), 'url'=>array('site/topCourses'));\r\n\t\r\n\t\tforeach ($parent_hierarchies as $parent_hierarchy){\r\n\t\t\t\t\r\n\t\t\t$items = \t$this->getFirstChild($parent_hierarchy->ID,'site/courseIndex');\r\n\t\r\n\t\t\t$tech = MentUrl::getStandarPathString($parent_hierarchy->NAME,'tecnología');\r\n\t\t\t\r\n\t\t\t$url = (!count($items))? array('site/courseIndex','id'=>$parent_hierarchy->ID,'tech'=>$tech) : array('#');\r\n\t\t\t\t\r\n\t\t\t$menu_items[] = array('label'=>$parent_hierarchy->NAME,'active'=>($id != 0 && $mentoringHierarchy != null && ($mentoringHierarchy->PARENT_ID == $parent_hierarchy->ID || $mentoringHierarchy->ID == $parent_hierarchy->ID )) , 'url'=>$url, 'items'=>$items);\r\n\t\t\t\t\r\n\t\t}\r\n\t\r\n\t\r\n\t\t/**\r\n\t\t * Get all promotions\r\n\t\t *\r\n\t\t */\r\n\t\r\n\t\t$this->promotionItems = SalePromotion::model()->findAllByAttributes(\r\n\t\t\t\tarray(),\r\n\t\t\t\t$condition = 'END_DATE >= :today AND START_DATE <= :today',\r\n\t\t\t\t$params = array(\r\n\t\t\t\t\t\t':today' => date('Y-m-d', time()),\r\n\t\t\t\t)\r\n\t\t);\r\n\t\r\n\t\r\n\t\r\n\t\t// renders the view file 'protected/views/site/index.php'\r\n\t\t// using the default layout 'protected/views/layouts/main.php'\r\n\t\t$this->render('courseIndex', array('parentTopic'=>$id,'menu_items'=>$menu_items,'model'=>$mentoringHierarchy));\r\n\t}", "public function define_sections() {\r\n\t\t$this->options->sections = $this->to_array();\n\t}", "public function getSections(): iterable;", "function view(){\n\n $course_id = $this->params[0];\n $this->course = get_first(\"SELECT * FROM course WHERE course_id = '{$course_id}'\");\n $this->lessons = get_all(\"SELECT * FROM lesson WHERE course_id = '{$course_id}'\");\n }", "function get_e2l_courses($USER){\n $_SESSION['offset'] = 0;\n\n $servername = \"localhost\";\n $username = \"moodleuser\";\n $password = \"password\";\n $dbname = \"moodle\";\n\n // Create connection\n $conn = mysqli_connect($servername, $username, $password, $dbname);\n\n // Check connection\n if (!$conn) {\n die(\"Connection failed: \" . mysqli_connect_error());\n } \n\n /*GET ALL ENROLLED CLASSES FOR A STUDENT*/\n/* $sql = \"SELECT mc.id as id, mu.id as uid, mc.fullname \".\n \"FROM mdl_user as mu, mdl_course as mc, mdl_user_students as mus \".\n\t \"WHERE mu.id = mus.userid \".\n\t \"AND mus.course = mc.id \".\n\t \"AND mu.id = \".$USER->id.\" order by mc.id\";*/\n\n //ALL COURSES NOT IN THE 'Tasks' CATEGORY\t \n $sql = \"SELECT mc.id as id, mu.id as uid, mc.fullname \".\n \"FROM mdl_user as mu, mdl_course as mc, mdl_user_students as mus, mdl_course_categories as mcc \".\n \"WHERE mu.id = mus.userid \".\n \"AND mus.course = mc.id \".\n \"AND mu.id = \".$USER->id.\" \".\n \"AND mc.category = mcc.id \".\n \"AND mcc.name = 'Tasks' order by mc.id\";\t \n\n //(select id, name from mdl_lesson where course=7) union (select id, name from mdl_assignment where course=7) order by id;\n $result = mysqli_query($conn, $sql);\n\n echo \"<table class=\\\"left_box\\\">\";\n echo \"<tr><td id=\\\"parent_box\\\">\";\n echo \"<div>\";\n echo \"<div id=\\\"course_label\\\"><b>Tasks:</b></div>\";\n $entries = mysqli_num_rows($result); \n if ($entries > 0) {\n while($row = mysqli_fetch_assoc($result)) {\n\t $arr[] = $row[\"id\"];\n\t echo \"<div class=\\\"e2l_tasks e2l_font\\\" id=\\\"e2l_\".$row['id'].\"\\\" onmouseout=\\\"end_hilite(\".$row[\"id\"].\")\\\" onmouseover=\\\"start_hilite(\".$row[\"id\"].\")\\\" onclick=\\\"generate_tasks(\".$row[\"id\"].\")\\\">\". $row[\"fullname\"].\"</div>\";\n }\n }\n echo \"</div>\";\n echo \"</td></tr>\";\n echo \"</table>\";\n/* echo \"<table border='0' style='width:100%; height: 665px; background: #CDF3F3; border-radius: 25px; margin: 0px;'>\";\n echo \"<tr><th style=\\\"width: 252px; height: 41px\\\">TASK NAME:</th></tr>\";\n echo \"<tr><td style=\\\"width: 252px; height: 41px\\\">&nbsp;</td></tr>\";\n $entries = mysqli_num_rows($result); \n if ($entries > 0) {\n // output data of each row\n\n while($row = mysqli_fetch_assoc($result)) {\n\t $arr[] = $row[\"id\"];\n// echo \"<tr ><td style=\\\"width: 252px; height: 42px\\\"><div onclick='( generate_lessons(\".$row[\"id\"].\") )'><center>\". $row[\"fullname\"].\"</center></div></td><tr>\";\n echo \"<tr id=\\\"e2l_courses\\\" ><td style=\\\"width: 252px; height: 41px\\\" onclick='( generate_tasks(\".$row[\"id\"].\") )'><div style='padding-left: 20px;'>\". $row[\"fullname\"].\"</div></td><tr>\";\n\n }\n } else {\n echo \"<tr><td style=\\\"width: 252px; height: 41px\\\" colspan='1'>No Enrolled Courses:</td></tr>\";\n }\n $total = 12;\n while($entries < $total){\n $entries++;\n echo \"<tr><td style=\\\"width: 252px; height: 41px\\\">&nbsp;</td></tr>\"; \n }\n echo \"<tr><td style=\\\"width: 252px; height: 41px\\\">&nbsp;</td></tr>\";\n echo \"</table>\";*/\n\n \n\n mysqli_close($conn); \n echo \"<script>window.onload = function() { init_hilite(\".$arr[0].\"); }</script>\";\n return $arr[0];\n}", "protected function _load()\r\n {\r\n $page = new Model_Page();\r\n $children = $page->getChildren($this->_parentId);\r\n if ($children != null && $children->count() > 0) {\r\n foreach ($children as $child) {\r\n if ($child->show_on_menu == 1) {\r\n $this->items[] = new Digitalus_Menu_Item($child);\r\n }\r\n }\r\n }\r\n }", "public function index()\n {\n //\n return sections::latest()->paginate(5);\n }", "function i4_assigned_courses() {\n global $wpcwdb, $wpdb;\n $wpdb->show_errors();\n\n $user_id = get_current_user_id();\n\n $SQL = \"SELECT * FROM $wpcwdb->courses ORDER BY course_title ASC\";\n\n $courseCount = 0;\n $courses = $wpdb->get_results($SQL);\n\n if ($courses) {\n foreach ($courses as $course) {\n\n $up = new UserProgress($course->course_id, $user_id);\n\n\n // Break out if the user doesn't have access to this course\n if (!$this->I4_LMS_User_Can_Access($course->course_id, $user_id)) {\n continue;\n }\n\n //Retrieve the modules for the users course\n $modules = WPCW_courses_getModuleDetailsList($course->course_id);\n\n //Determine the % of course completion\n $i4_percent_completed = $this->i4_lms_percent_course_completed($course->course_id, $modules, $user_id);\n\n //Get a list of the completed units. We'll search the completed units array\n $i4_completed_units = $this->i4_get_completed_units($course->course_id, $user_id);\n\n printf(__('<div class=\"my-course-wrapper\">'));\n printf(__('<div class=\"my-course-meta\">'));\n printf(__('<div class=\"my-course-title\" >'));\n printf(__('<h3 class=\"wpcw_tbl_progress_course\">Course - %s</h3>'), $course->course_title);\n printf(__('</div> <!-- end my-course-title -->'));\n printf(__('<div class=\"my-course-pct-complete\">%s%% Complete</div>'), $i4_percent_completed);\n printf(__('</div><!-- end course-meta -->'));\n\n printf('<div class=\"my-course-outline-wrapper\">');\n\n //Let's get the modules for the course\n if ($modules) {\n foreach ($modules as $module) {\n\n //get the units for the module\n $units = WPCW_units_getListOfUnits($module->module_id);\n\n //display the module title\n printf('<div class=\"my-course-module-title\">');\n printf(__('<p>%s</p>'), $module->module_title);\n printf('</div> <!-- end my-course-module-title -->');\n\n //create a table for each of the units in the module\n printf('<table class=\"my-course-units-table\">');\n\n //iterate through the units for the module\n if ($units) {\n foreach ($units as $unit) {\n printf('<tr>');\n printf('<td class=\"large-8 small-6 columns\">');\n printf(('<a href=\"%s\" title=\"%s\" class=\"my-course-link\"><i class=\"fa fa-play-circle-o\"></i> %s</a>'), get_the_permalink($unit->ID), $unit->post_title, $unit->post_title);\n // printf('</td>');\n printf('</td>');\n printf('<td class=\"large-4 small-6 columns\">');\n //If the unit is in the completed units array, display the completed checkmark.\n if (in_array($unit->ID, $i4_completed_units)) {\n printf('<div class=\"right completed-icon\"><i class=\"fa fa-check font-success completed-icon\"></i> Completed!</div>');\n }\n else {\n printf(__('<a class=\"button my-courses-button tiny blue right\" title=\"Begin %s\" href=\"%s\">Begin</a>'), $unit->post_title, get_the_permalink($unit->ID));\n }\n printf('</td>');\n printf('</tr>');\n }\n }\n\n printf('</table> <!-- my-course-units-table -->');\n\n }\n }\n\n /* printf('<table class=\"widefat wpcw_tbl wpcw_tbl_progress\">');\n\n printf('<thead>');\n printf('<th>%s</th>', __('Unit', 'wp_courseware'));\n printf('<th class=\"wpcw_center\">%s</th>', __('Completed', 'wp_courseware'));\n printf('<th class=\"wpcw_center wpcw_tbl_progress_quiz_name\">%s</th>', __('Quiz Name', 'wp_courseware'));\n printf('<th class=\"wpcw_center\">%s</th>', __('Quiz Status', 'wp_courseware'));\n printf('<th class=\"wpcw_center\">%s</th>', __('Actions', 'wp_courseware'));\n printf('</thead><tbody>');\n\n // #### 2 - Fetch all associated modules\n\n if ($modules)\n {\n foreach ($modules as $module)\n {\n // #### 3 - Render Modules as a heading.\n printf('<tr class=\"wpcw_tbl_progress_module\">');\n printf('<td colspan=\"3\">%s %d - %s</td>',\n __('Module', 'wp_courseware'),\n $module->module_number,\n $module->module_title\n );\n\n // Blanks for Quiz Name and Actions.\n printf('<td>&nbsp;</td>');\n printf('<td>&nbsp;</td>');\n printf('</tr>');\n\n // #### 4. - Render the units for this module\n $units = WPCW_units_getListOfUnits($module->module_id);\n if ($units)\n {\n foreach ($units as $unit)\n {\n $showDetailLink = false;\n\n printf('<tr class=\"wpcw_tbl_progress_unit\">');\n\n printf('<td class=\"wpcw_tbl_progress_unit_name\">%s %d - %s</td>',\n __('Unit', 'wp_courseware'),\n $unit->unit_meta->unit_number,\n $unit->post_title\n );\n\n // Has the unit been completed yet?\n printf('<td class=\"wpcw_tbl_progress_completed\">%s</td>', $up->isUnitCompleted($unit->ID) ? __('Completed', 'wp_courseware') : '');\n\n // See if there's a quiz for this unit?\n $quizDetails = WPCW_quizzes_getAssociatedQuizForUnit($unit->ID, false, $userID);\n\n // Render the quiz details.\n if ($quizDetails)\n {\n // Title of quiz\n printf('<td class=\"wpcw_tbl_progress_quiz_name\">%s</td>', $quizDetails->quiz_title);\n\n // No correct answers, so mark as complete.\n if ('survey' == $quizDetails->quiz_type)\n {\n $quizResults = WPCW_quizzes_getUserResultsForQuiz($userID, $unit->ID, $quizDetails->quiz_id);\n\n if ($quizResults)\n {\n printf('<td class=\"wpcw_tbl_progress_completed\">%s</td>', __('Completed', 'wp_courseware'));\n\n // Showing a link to view details\n $showDetailLink = true;\n printf('<td><a href=\"%s&user_id=%d&quiz_id=%d&unit_id=%d\" class=\"button-secondary\">%s</a></td>',\n admin_url('users.php?page=WPCW_showPage_UserProgess_quizAnswers'),\n $userID, $quizDetails->quiz_id, $unit->ID,\n __('View Survey Details', 'wp_courseware')\n );\n }\n\n // Survey not taken yet\n else {\n printf('<td class=\"wpcw_center\">%s</td>', __('Pending', 'wp_courseware'));\n }\n }\n\n // Quiz - show correct answers.\n else\n {\n $quizResults = WPCW_quizzes_getUserResultsForQuiz($userID, $unit->ID, $quizDetails->quiz_id);\n\n // Show the admin how many questions were right.\n if ($quizResults)\n {\n // -1% means that the quiz is needing grading.\n if ($quizResults->quiz_grade < 0) {\n printf('<td class=\"wpcw_center\">%s</td>', __('Awaiting Final Grading', 'wp_courseware'));\n }\n else {\n printf('<td class=\"wpcw_tbl_progress_completed\">%d%%</td>', number_format($quizResults->quiz_grade, 1));\n }\n\n\n // Showing a link to view details\n $showDetailLink = true;\n\n printf('<td><a href=\"%s&user_id=%d&quiz_id=%d&unit_id=%d\" class=\"button-secondary\">%s</a></td>',\n admin_url('users.php?page=WPCW_showPage_UserProgess_quizAnswers'),\n $userID, $quizDetails->quiz_id, $unit->ID,\n __('View Quiz Details', 'wp_courseware')\n );\n\n } // end of if printf('<td class=\"wpcw_tbl_progress_completed\">%s</td>'\n\n\n // Quiz not taken yet\n else {\n printf('<td class=\"wpcw_center\">%s</td>', __('Pending', 'wp_courseware'));\n }\n\n } // end of if survey\n } // end of if $quizDetails\n\n\n // No quiz for this unit\n else {\n printf('<td class=\"wpcw_center\">-</td>');\n printf('<td class=\"wpcw_center\">-</td>');\n }\n\n // Quiz detail link\n if (!$showDetailLink) {\n printf('<td>&nbsp;</td>');\n }\n\n printf('</tr>');\n }\n\n }\n\n }\n } */\n\n // printf('</tbody></table>');\n if ($i4_percent_completed == 100) {\n printf('<div class=\"my-courses-congrats\"><p class=\"text-center\"><i class=\"fa fa-check completed-icon\"></i> Congrats, Course Complete!</p></div>');\n }\n printf('</div> <!--end my-course-outline-wrapper -->');\n printf('</div> <!-- end my-course-wrapper -->');\n\n // Track number of courses user can actually access\n $courseCount++;\n\n } //end foreach courses as course\n\n // Course is not allowed to access any courses. So show a meaningful message.\n if ($courseCount == 0) {\n printf('You are not currently enrolled in a course. Please contact your Care Coordinator for assistance.', 'wp_courseware');\n }\n }\n\n }", "public function course(){\n $user=Auth::user();\n $customer=Customer::find('1');\n $courses=Customer::find('1')->course()->paginate(6);\n return view('client.modules.user.course',compact('customer','courses'));\n }", "public function index()\n {\n return Course::with('categorie')->paginate(10);\n }", "public function initialise() {\n global $DB, $SITE;\n\n if ($this->initialised || during_initial_install()) {\n return $this->expandable;\n }\n\n $this->initialised = true;\n\n $this->rootnodes = array();\n $this->rootnodes['site'] = $this->add_course($SITE);\n $myurl = new moodle_url('/my');\n $this->rootnodes['mycourses'] = $this->add(get_string('mycourses'), $myurl, self::TYPE_ROOTNODE, null, 'mycourses');\n $this->rootnodes['courses'] = $this->add(get_string('courses'), null, self::TYPE_ROOTNODE, null, 'courses');\n\n // Branchtype will be one of navigation_node::TYPE_*.\n switch ($this->branchtype) {\n case 0:\n if ($this->instanceid === 'mycourses') {\n $this->load_courses_enrolled();\n } else if ($this->instanceid === 'courses') {\n $this->load_courses_other();\n }\n break;\n\n case self::TYPE_CATEGORY :\n $this->load_category($this->instanceid);\n break;\n\n case self::TYPE_COURSE :\n $course = $DB->get_record('course', array('id' => $this->instanceid), '*', MUST_EXIST);\n require_course_login($course, true, null, false, true);\n $this->page->set_context(context_course::instance($course->id));\n $coursenode = $this->add_course($course);\n $this->add_course_essentials($coursenode, $course);\n $this->load_course_sections($course, $coursenode);\n break;\n\n case self::TYPE_SECTION :\n // Section is shifted to page concept.\n $course = page_get_page_course($this->instanceid);\n $page = course_page::get($this->instanceid);\n $modinfo = get_fast_modinfo($course); // Original info is better to take here.\n require_course_login($course, true, null, false, true);\n $this->page->set_context(context_course::instance($course->id));\n $coursenode = $this->add_course($course);\n $this->add_course_essentials($coursenode, $course);\n if ($activities = $page->get_activities()) {\n foreach ($activities as $key => $cm) {\n $cm = $modinfo->cms[$key];\n if (!$cm->uservisible) {\n continue;\n }\n $activity = new stdClass;\n $activity->id = $cm->id;\n $activity->course = $course->id;\n $activity->section = 0;\n $activity->name = $cm->name;\n $activity->icon = $cm->icon;\n $activity->iconcomponent = $cm->iconcomponent;\n $activity->hidden = (!$cm->visible);\n $activity->modname = $cm->modname;\n $activity->nodetype = navigation_node::NODETYPE_LEAF;\n $activity->onclick = $cm->get_on_click();\n $url = $cm->get_url();\n if (!$url) {\n $activity->url = null;\n $activity->display = false;\n } else {\n $activity->url = $cm->get_url()->out();\n $activity->display = true;\n if (self::module_extends_navigation($cm->modname)) {\n $activity->nodetype = navigation_node::NODETYPE_BRANCH;\n }\n }\n $activities[$key] = $activity;\n }\n\n $this->load_course_sections($course, $coursenode, 0, $activities);\n }\n break;\n\n case self::TYPE_ACTIVITY :\n $course = page_get_cm_course($this->instanceid);\n $modinfo = get_fast_modinfo($course);\n $cm = $modinfo->get_cm($this->instanceid);\n require_course_login($course, true, $cm, false, true);\n $this->page->set_context(context_module::instance($cm->id));\n $coursenode = $this->load_course($course);\n if ($course->id != $SITE->id) {\n $this->load_course_sections($course, $coursenode, null, $cm);\n }\n $modulenode = $this->load_activity($cm, $course, $coursenode->find($cm->id, self::TYPE_ACTIVITY));\n break;\n\n default:\n throw new Exception('Unknown type');\n return $this->expandable;\n }\n\n if ($this->page->context->contextlevel == CONTEXT_COURSE &&\n $this->page->context->instanceid != $SITE->id) {\n $this->load_for_user(null, true);\n }\n\n $this->find_expandable($this->expandable);\n return $this->expandable;\n }", "function set_sections() {\n\t\t\n\t\t$this->sections[] = '<script type=\"text/javascript\" charset=\"utf-8\">$(\"#accessoryTabs a.'.$this->id.'\").parent().remove();</script>';\n\n\t\tif($this->EE->input->get('C') == 'admin_content' && $this->EE->input->get('M') == 'category_edit' ) {\n\n\t\t\t// help!\n\t\t\trequire_once(PATH_THIRD.'dm_eeck/includes/eeck_helper.php');\n\t\t\t$this->helper = new eeck_helper();\n\n\t\t\t// we'll need the settings from the Editor field type\n\t\t\t$this->eeck_settings = $this->helper->load_editor_settings();\n\n\t\t\t$this->helper->include_editor_js($this->eeck_settings['eeck_ckepath'], $this->eeck_settings['eeck_ckfpath']);\n\t\t\t\n\t\t\t// get our settings for this field\n\t\t\t$myConf = $this->eeck_settings['eeck_config_settings'];\n\t\t\t\n\t\t\t// load out config file\n\t\t\t$conf = $this->load_config_file($myConf);\n\t\t\tif($conf != '') $conf .= ',';\n\n\t\t\t// add on integration for CK finder\n\t\t\t$conf .= $this->integrate_ckfinder($this->eeck_settings['eeck_ckfpath'],'Images','Files','Flash');\n\n\t\t\t$str = 'CKEDITOR.replace( \"cat_description\",{'.$conf.'});';\n\t\t\t$this->sections[] = '<script type=\"text/javascript\" charset=\"utf-8\">'.$str.'</script>';\n\t\t}\n\t}", "function spr_get_sections() {\n\tglobal $spr_sql_fields;\n\n\t$sql_tables = safe_pfx('txp_section');\n\t$rs = safe_query(\"SELECT \".$spr_sql_fields.\" FROM \".$sql_tables.\" WHERE name != 'default' ORDER BY name\");\n\twhile ($a = nextRow($rs)) {\n\t\textract($a); // set 'name','title','parent' etc in $a\n\t\t$out[$name] = $a;\n\t}\n\treturn $out;\n}", "public function index()\n\t{\n\t\t//\n\t\t$us = Auth::user();\n\t\tif( ! $us->hasPermission(51))\n\t\t\treturn Redirect::to('portal')\n\t\t\t\t->with('type', 'alert')\n\t\t\t\t->with('message', 'Not enough permissions');\n\n\t\t$sec = Section::all();\n\t\t$us = Auth::user();\n\t\t$actions = 0;\n\t\t$this->layout->content = View::make('layouts.index', \n\t\t\tarray(\n\t\t\t\t'class'\t\t=> 'sections',\n\t\t\t\t'table_title'\t=> 'Sections',\n\t\t\t\t'table_header'\t=> array( 'ID', 'Name', 'enabled'),\n\t\t\t\t'table_content' => $sec,\n\t\t\t\t'table_columns' => array( 'id', 'name', 'enabled'),\n\t\t\t\t'perm_cre'\t=> $us->hasPermission(50),\n\t\t\t\t'perm_upd'\t=> $us->hasPermission(52) AND ++$actions,\n\t\t\t\t'perm_del'\t=> $us->hasPermission(53) AND ++$actions,\n\t\t\t\t'actions'\t=> $actions\n\t\t\t));\t\n\t}", "public function extend_course_navigation($navigation, navigation_node $node) {\n global $PAGE;\n\n $course = $this->get_course();\n $modinfo = get_fast_modinfo($course);\n $sectioninfo = $modinfo->get_section_info_all();\n $formatopts = course_get_format($course)->get_format_options();\n\n // Insert filtered-view nodes.\n $getstartednode = null;\n $assessnode = null;\n foreach ($sectioninfo as $info) {\n $isvisible = $info->uservisible || ($info->visible && !$info->available && !empty($info->availableinfo));\n\n if ($info->sectiontype === 'getstarted' && $isvisible && !$getstartednode) {\n $getstartednode = $node->add(get_string('sectiontypegetstarted', 'format_usqflexopen'),\n new moodle_url('/course/view.php', ['id' => $course->id, 'view' => 'getstarted']));\n } else if ($info->sectiontype === 'assess' && $isvisible && !$assessnode) {\n $assessnode = $node->add(get_string('sectiontypeassess', 'format_usqflexopen'),\n new moodle_url('/course/view.php', ['id' => $course->id, 'view' => 'assess']));\n }\n }\n\n // Ugly way to force the active navigation tree node when viewing a filtered page.\n if ($PAGE->url->compare(new moodle_url('/course/view.php', ['id' => $course->id]))) {\n $viewparam = optional_param('view', null, PARAM_ALPHA);\n if ($viewparam === 'getstarted' && $getstartednode) {\n $getstartednode->make_active();\n } else if ($viewparam === 'assess' && $assessnode) {\n $assessnode->make_active();\n }\n }\n\n // if section is specified in course/view.php, make sure it is expanded in navigation\n if ($navigation->includesectionnum === false) {\n $selectedsection = optional_param('section', null, PARAM_INT);\n if ($selectedsection !== null && (!defined('AJAX_SCRIPT') || AJAX_SCRIPT == '0') &&\n $PAGE->url->compare(new moodle_url('/course/view.php'), URL_MATCH_BASE)) {\n $navigation->includesectionnum = $selectedsection;\n }\n }\n parent::extend_course_navigation($navigation, $node);\n\n // We want to remove the general section if it is empty.\n $sections = $modinfo->get_sections();\n if (!isset($sections[0])) {\n // The general section is empty to find the navigation node for it we need to get its ID.\n $section = $modinfo->get_section_info(0);\n $generalsection = $node->get($section->id, navigation_node::TYPE_SECTION);\n if ($generalsection) {\n // We found the node - now remove it.\n $generalsection->remove();\n }\n }\n\n // Also remove getstarted and assess sections if they're supposed to be hidden on\n // the course page and the user isn't editing.\n if (!$PAGE->user_is_editing()) {\n foreach ($sectioninfo as $sectnum => $section) {\n if ($section->sectiontype !== 'getstarted' &&\n $section->sectiontype !== 'assess') {\n continue;\n }\n if (empty($formatopts['displaysectiontype'.$section->sectiontype])) {\n $sectnode = $node->get($section->id, navigation_node::TYPE_SECTION);\n if ($sectnode) {\n $sectnode->remove();\n }\n }\n }\n }\n }", "public function actionCourseIndex($id)\r\n\t{\r\n\t\t\r\n\t\t$this->layout='//layouts/column3';\r\n\t\t\r\n\t\t$menu_items = array();\r\n\t\t\r\n\t\t$parent_hierarchies = MentoringHyerarchy::model()->findAllByAttributes(array('LEVEL_NUMBER'=>'10', 'PARENT_ID'=>0));\r\n\t\t\r\n\t\t\t\t\r\n\t\t\t$mentoringHierarchy = MentoringHyerarchy::model()->findByPK($id);\r\n\t\t\t\t\r\n\t\t\tif($mentoringHierarchy===null)\r\n\t\t\t\tthrow new CHttpException(404,'The requested resource does not exist.');\r\n\t\t\r\n\t\t\r\n\t\t$menu_items[] = array('label'=>'Top cursos','active'=>(!$id), 'url'=>array('site/topCourses'));\r\n\t\t\r\n\t\t\r\n\t\tforeach ($parent_hierarchies as $parent_hierarchy){\r\n\t\t\t\r\n\t\t\t$items = \t$this->getFirstChild($parent_hierarchy->ID,'site/courseIndex');\r\n\t\t\t\r\n\t\t\t$tech = MentUrl::getStandarPathString($parent_hierarchy->NAME,'tecnología');\r\n\t\t\t\t\r\n\t\t\t$url = (!count($items))? array('site/courseIndex','id'=>$parent_hierarchy->ID, 'tech'=>$tech) : array('#');\r\n\t\t\t\r\n\t\t\t$menu_items[] = array('label'=>$parent_hierarchy->NAME,'active'=>($id != 0 && $mentoringHierarchy != null && ($mentoringHierarchy->PARENT_ID == $parent_hierarchy->ID || $mentoringHierarchy->ID == $parent_hierarchy->ID )) , 'url'=>$url, 'items'=>$items);\r\n\t \r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\t/**\r\n\t\t * Get all promotions\r\n\t\t * \r\n\t\t */\r\n\t\t\r\n\t$this->promotionItems = SalePromotion::model()->findAllByAttributes(\r\n array(),\r\n $condition = 'END_DATE >= :today AND START_DATE <= :today',\r\n $params = array(\r\n ':today' => date('Y-m-d', time()), \r\n )\r\n);\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t// renders the view file 'protected/views/site/index.php'\r\n\t\t// using the default layout 'protected/views/layouts/main.php'\r\n\t\t$this->render('courseIndex', array('parentTopic'=>$id,'menu_items'=>$menu_items,'model'=>$mentoringHierarchy));\r\n\t}", "public function courses() {\n $courses = Course::all();\n $data['courses'] = $courses;\n //dd($courses);\n return view('admin.courses', $data);\n }", "function get_courses() {\n\tglobal $wp_query;\n\t$wp_query->set('tax_query', get_immediate_children());\n\t$wp_query->get_posts();\n}", "public function index()\n {\n $levels = Level::all();\n $courses = Course::simplePaginate(4);\n return view('admin.course.index', compact('levels', 'courses'));\n }", "function display_courses_before( $section ) {\n\tif ( get_field( 'section_layout', $section ) !== 'courses' ) {\n\t\treturn '';\n\t}\n\n\treturn '<div id=\"coursesAccordion\" role=\"tablist\">';\n}", "function load() {\n require_once(dirname(__FILE__) . '/helper.php');\n $cards = new Mod_Cards();\n $cards->createTable();\n\n $views = new Default_Views();\n $views->setModule('cards');\n\n //load default view\n if (!Sessions::isAdminLogged()) {\n $views->setModule('users');\n $views->load('admin/login', '', true);\n } else {\n $views->load('admin/home', '', true);\n }\n}", "public function index()\n {\n return view(\"guardian.pages.courses.index\", [\n \"courses\" => Course::get()\n ]);\n }", "public function whole() {\n\t\t$this->load->view('cnavmenu_whole_ttv', $this->_Config());\n }", "public function loadThis()\n {\n $this->global['pageTitle'] = 'Akses Ditolak';\n\n $this->load->view('includes/header', $this->global);\n $this->load->view('access');\n $this->load->view('includes/footer');\n }", "function browse_module_sections($db,$section=0)\r\n\t{\r\n\t\tif(!$this->isSectionEditable($section)) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\t\r\n\t\t//$this->title = \"Page Modules\";\r\n\t\t$this->description = \"Page Modules allow you to display each module's feature / functionality on the pages that you specify. Each module has its own distinct \\\"tag\\\" which you insert within your Templates. Wherever you insert the\r\n\t\ttag into the html of your template is where that Module's functionality will be displayed. So, to use a module, determine that module's \\\"tag name\\\", insert that tag into your template, refresh that template through the Pages\r\n\t\tManagement section (to ensure the system \\\"attaches\\\" the module to the page) and then edit the module's properties to display as you wish. Each module has it's own distinct display properties.\";\r\n\t\tif ($section)\r\n\t\t\t$this->body .= \"\r\n\t\t\t\t<table cellpadding=4 cellspacing=0 border=0 width=100%>\r\n\t\t\t\t\t<tr>\r\n\t\t\t\t\t\t<td colspan=\\\"100%\\\" class=pages_manage_nav>back to \r\n\t\t\t\t\t\t\t<a href=index.php?mc=view_modules&page=modules_home class=pages_manage_nav>Modules Home</a>\r\n\t\t\t\t\t\t</td>\r\n\t\t\t\t\t</tr>\r\n\t\t\t\t</table>\";\r\n\t\t$this->body .= \"<fieldset id='AvailableModules'><legend>Available Modules</legend><table cellpadding=2 cellspacing=1 border=0 width=100%>\\n\";\r\n\t\tif (!$section)\r\n\t\t{\r\n\t\t\t$this->function_name = \"browse_module_sections\";\r\n\r\n\t\t\t$sql = \"select * from \".$this->pages_modules_sections_table.\" where parent_section = 0\";\r\n\t\t\t//echo $sql. \"is the query<br>\";\r\n\t\t\t$section_result = $this->db->Execute($sql);\r\n\t\t\t//if($this->configuration_data[\"debug_admin\"])\r\n\t\t\t//{\r\n\t\t\t//\t$this->debug_display($db, $this->filename, $this->function_name, \"pages_sections_modules_table\", \"get page sections data\");\r\n\t\t\t//}\r\n\t\t\tif (!$section_result)\r\n\t\t\t{\r\n\t\t\t\t//echo $sql.\" is the query<br>\\n\";\r\n\t\t\t\t//$this->error_message = $this->messages[5501];\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t\telseif ($section_result->RecordCount() > 0)\r\n\t\t\t{\r\n\t\t\t\t$this->row_count = 0;\r\n\t\t\t\twhile ($show_sections = $section_result->FetchRow())\r\n\t\t\t\t{\r\n\t\t\t\t\tif (!$this->isSectionEditable($show_sections['section_id'])) continue;\r\n\t\t\t\t\t$this->body .= \"<tr class=\".$this->get_row_color().\">\\n\\t<td valign=top>\\n\\t<a href=index.php?mc=view_modules&page=modules_show&b=\".$show_sections[\"section_id\"].\"><span class=medium_font><font color=000000>\".$show_sections[\"name\"].\"</font></span></a><span class=small_font>\";\r\n\t\t\t\t\t//$this->body .= $show_sections[\"description\"];\r\n\t\t\t\t\t$this->body .= \"</span></td>\\n\\t\";\r\n\t\t\t\t\t$enter_button = geoHTML::addButton('Enter','index.php?mc=view_modules&page=modules_show&b='.$show_sections[\"section_id\"]);\r\n\t\t\t\t\t$this->body .= \"<td align=center valign=top width=100>\".$enter_button.\"</td>\\n\\t\";\r\n\t\t\t\t\t$this->body .= \"</tr>\\n\";\r\n\t\t\t\t\t$this->row_count++;\r\n\t\t\t\t}\r\n\t\t\t\t$this->body .= \"<tr class=\".$this->get_row_color().\">\\n\\t<td colspan='2' style='text-align: center;'>\r\n\t\t\t\t\t<a href='index.php?page=modules_page' class='mini_button'>View All Modules</a>\r\n\t\t\t\t</td></tr>\";\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\t//category does not exist\r\n\t\t\t\t$this->error_message = $this->messages[\"5500\"];\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\t//does this section have subsections\r\n\t\t\t$sql = \"select * from \".$this->pages_modules_sections_table.\" where parent_section = \".$section;\r\n\t\t\t\r\n\t\t\t//echo $sql. \"is the query<br>\";\r\n\t\t\t$parent_section_result = $this->db->Execute($sql);\r\n\t\t\tif (!$parent_section_result)\r\n\t\t\t{\r\n\t\t\t\ttrigger_error('ERROR SQL: '.$this->db->ErrorMsg());\r\n\t\t\t\t$this->error_message = $this->messages[5501];\r\n\t\t\t//\treturn false;\r\n\t\t\t}\r\n\r\n\t\t\t//if it does display these sections in a list like above\r\n\r\n\t\t\telseif ($parent_section_result->RecordCount() > 0)\r\n\t\t\t{\r\n\t\t\t\t$this->row_count = 0;\r\n\t\t\t\twhile ($show_sections = $parent_section_result->FetchRow())\r\n\t\t\t\t{\t\r\n\t\t\t\t\tif (!$this->isSectionEditable($show_sections['section_id'])) continue;\r\n\t\t\t\t\t\t$enter_button = geoHTML::addButton('Enter','index.php?mc=view_modules&page=modules_show&b='.$show_sections[\"section_id\"]);\r\n\t\t\t\t\t\t$this->body .= \"\r\n\t\t\t\t\t\t\t<tr class=\".$this->get_row_color().\">\r\n\t\t\t\t\t\t\t\t<td valign=top>\r\n\t\t\t\t\t\t\t\t\t<a href=index.php?mc=view_modules&page=modules_show&b=\".$show_sections[\"section_id\"].\">\r\n\t\t\t\t\t\t\t\t\t\t<span class=medium_font><font color=000000>\".$show_sections[\"name\"].\"</font></span></a>\r\n\t\t\t\t\t\t\t\t</td>\r\n\t\t\t\t\t\t\t\t<td align=center valign=top>\".$enter_button.\"</td>\r\n\t\t\t\t\t\t\t</tr>\";\r\n\t\t\t\t\t\t$this->row_count++;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\t// it it does not have subsections then call the module list function\r\n\t\t\t\t//and pass it the subsection to display modules specific to that section\r\n\r\n\t\t\t\t$sql = \"SELECT name,admin_label,page_id,module_replace_tag FROM \".$this->pages_table.\"\r\n\t\t\t\t\tWHERE module = 1 AND module_type=\".$section;\r\n\t\t\t\tif(9 == $section && !geoPC::is_ent()) {\r\n\t\t\t\t\t$sql .= ' and page_id = 100';\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tif (!$this->isSectionEditable($section)) return false;\r\n\t\t\t\r\n\t\t\t\t$parent_section_result = $this->db->Execute($sql);\r\n\t\t\t\tif (!$parent_section_result)\r\n\t\t\t\t\treturn false;\r\n\t\t\t\t$unsorted_modules = array();\r\n\t\t\t\twhile ($show_module = $parent_section_result->FetchRow()){\r\n\t\t\t\t\tif ($this->isPageEditable($show_module['page_id'])) array_push($unsorted_modules,$show_module);\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\t//leave the other types of modules alone\r\n\t\t\t\t$modules = $unsorted_modules;\r\n\t\t\t\t$this->body .= \"\r\n\t\t\t\t\t\t<tr>\r\n\t\t\t\t\t\t\t<td colspan=\\\"100%\\\">\r\n\t\t\t\t\t\t\t\t<tr>\r\n\t\t\t\t\t\t\t\t\t<td class=col_hdr_left>\r\n\t\t\t\t\t\t\t\t\t\tModule Name\r\n\t\t\t\t\t\t\t\t\t</td>\r\n\t\t\t\t\t\t\t\t\t<td width=50% class=col_hdr_left>\r\n\t\t\t\t\t\t\t\t\t\tAdmin Note\r\n\t\t\t\t\t\t\t\t\t</td>\r\n\t\t\t\t\t\t\t\t\t<td width=\\\"20%\\\" class=col_hdr_left>&nbsp;</td>\r\n\t\t\t\t\t\t\t\t</tr>\r\n\t\t\t\t\t\t\t</td>\r\n\t\t\t\t\t\t</tr>\";\r\n\t\t\t\t$this->row_count = 0;\r\n\t\t\t\tforeach ($modules as $module)\r\n\t\t\t\t{\r\n\t\t\t\t\t$tag = \"{module tag='{$module['module_replace_tag']}'}\";\r\n\t\t\t\t\t$edit_button = geoHTML::addButton('Edit','index.php?mc=view_modules&page=modules_page&b='.$module['page_id']);\r\n\t\t\t\t\t$this->body .= \"\r\n\t\t\t\t\t\t<tr class=\".$this->get_row_color().\">\r\n\t\t\t\t\t\t\t<td valign=top>\r\n\t\t\t\t\t\t\t\t<a href=index.php?mc=view_modules&page=modules_page&b=\".$module['page_id'].\">\r\n\t\t\t\t\t\t\t\t\t<span class=medium_font>\r\n\t\t\t\t\t\t\t\t\t\t<font color=000000>\".$module['name'].\"</font>\r\n\t\t\t\t\t\t\t\t\t</span>\r\n\t\t\t\t\t\t\t\t</a><br>\r\n\t\t\t\t\t\t\t\t<span class=small_font>$tag</span>\r\n\t\t\t\t\t\t\t</td>\r\n\t\t\t\t\t\t\t<td class=medium_font align=left>\r\n\t\t\t\t\t\t\t\t\".$module['admin_label'].\"<br>\r\n\t\t\t\t\t\t\t</td>\r\n\t\t\t\t\t\t\t<td align=center valign=top>\".$edit_button.\"</td>\r\n\t\t\t\t\t\t</tr>\\n\";\r\n\t\t\t\t\t$this->row_count++;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t$this->body .= \"</table></fieldset>\\n\";\r\n\t\treturn true;\r\n\t}", "public function getAllCourses()\n {\n $courses = $this->courseRepository->getAllCourses();\n if (isset($courses['errorMsg'])) {\n $courses = $this->makeEmptyCollection();\n }\n\n return view('front-end.courses.list', ['courses' => $courses]);\n }", "public function lecture_page(){\n\t\tglobal $wpdb;\n\t\t$page_base = $this->page_url();\n\t\t// query_posts(array( \n\t\t// 'post_type' => 'assignment',\n\t\t// 'course_assigned' => 562,\n\t\t// 'showposts' => 10,\n\t\t// 'orderby' => 'title',\n\t\t// 'order' => 'ASC'\n\t\t// ) );\n\t\tob_start();\n\t\t?>\n\t\t<div class=\"wp_lms wrap settings\">\n\t\t\t<h1>Lectures</h1>\n\t\t\t<h2>\n\t\t\t<a href=\"http://grand/wp-admin/post-new.php?post_type=assignment&amp;course=568\" class=\"add-new-h2\">Add Assignment</a>\n\t\t\t</h2>\n \t\t\t<? wp_lms_html_gen::form_open(array(\"post_type\" => \"assignment\", \"_course\" => \"566\", \"showposts\" => \"10\"), $page_base ) ?>\n \t\t\t<h2>Pages</h2>\n\t\t\t<?\n\t\t\tforeach( $this->menu_pages as $k => $v ) {\n\t\t\t?>\n\t\t\t\t<p><?= $k; ?> <?= $v; ?></p>\n\t\t\t<?\n\t\t\t}\n\t\t\t$class_num = \"568\";\n\t\t\t$instructor_num = \"Douglas Brull\";\n\t\t\t$the_post_type = 'lecture';\n\t\t\t$the_course_term = \"course_nu\";\n\t\t\t$the_instructor_term = \"instructor_name\";\n\t\t\t$args = array(\n\t\t\t\t'sort_column' => 'menu_order',\n\t\t\t\t'post_type' => $the_post_type,\n\t\t\t\t\"course_nu\" => $class_num,\n\t\t\t\t'instructor_name' => $instructor_num,\n\t\t\t\t'post_status' => 'publish'\n\t\t\t);\n\t\t\t$pages = get_pages( $args );\n\t\t\t$page_query = new WP_Query();\n\t\t\t$all_pages = $page_query->query( array( 'post_type' => $the_post_type, 'post_status' => 'publish', 'posts_per_page' => -1 ) );\n\t\t\t$parent_count = 0;\n\t\t\tforeach( $pages as $k => $p ){ \n\t\t\t\tif( $p->post_parent == 0 && has_term( $class_num, $the_course_term, $p->ID ) && has_term( $instructor_num, $the_instructor_term, $p->ID ) ) {\n\t\t\t\t\t$parent_count++;\n\t\t\t\t\t$page_children = get_page_children( $p->ID, $all_pages );\n\t\t\t\t\t$hasChildren = \"\";\n\t\t\t\t\tif( !empty( $page_children ) ) {\n\t\t\t\t\t\t$hasChildren = \" children\";\n\t\t\t\t\t\t$parentName = $p->post_name;\n\t\t\t\t\t\tusort( $page_children, array($this, 'sort_menu_order') );\n\t\t\t\t\t\t?>\n\t\t\t\t\t\t<h1><?= $parentName; ?></h1>\n\t\t\t\t\t\t<?php\n\t\t\t\t\t\tforeach( $page_children as $key => $val ) {\n\t\t\t\t\t\t\t?>\n\t\t\t\t\t\t\t<h2><?= $val->post_title; ?></h2>\n\t\t\t\t\t\t\t<?php\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\t\t\t\t\telse if( empty($page_children ) ) {\n\t\t\t\t\t\t$parentName = $p->post_name;\n\t\t\t\t\t\t?>\n\t\t\t\t\t\t<h1><?= $parentName; ?></h1>\n\t\t\t\t\t\t<?php\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t}\n\t\t\t?>\n\t\t</div>\n\t\t<?\n\t\tob_end_flush();\n\t}", "function loadThis()\n {\n $this->global['pageTitle'] = 'Akses Ditolak';\n \n $this->load->view('includes/header', $this->global);\n $this->load->view('access');\n $this->load->view('includes/footer');\n }", "protected function showmycourses() {\n global $USER, $PAGE;\n\n // Create a navigation cache to point at the same node as the main navigation\n // cache\n $cache = new navigation_cache('navigation');\n\n // If the user isn't logged in or is a guest we don't want to display anything\n if (!isloggedin() || isguestuser()) {\n return false;\n }\n\n // Check the cache to see if we have loaded my courses already\n // there is a very good chance that we have\n if (!$cache->cached('mycourses')) {\n $cache->mycourses = get_my_courses($USER->id);\n }\n $courses = $cache->mycourses;\n\n // If no courses to display here, return before adding anything\n if (!is_array($courses) || count($courses)==0) {\n return false;\n }\n\n // Add a branch labelled something like My Courses\n $mymoodle = $PAGE->navigation->get('mymoodle', navigation_node::TYPE_CUSTOM);\n $mycoursesbranch = $mymoodle->add(get_string('mycourses'), null,navigation_node::TYPE_CATEGORY, null, 'mycourses');\n $PAGE->navigation->add_courses($courses, 'mycourses');\n $mymoodle->get($mycoursesbranch)->type = navigation_node::TYPE_CUSTOM;\n return true;\n }", "protected function _preloadContainerData()\r\n\t{\r\n\t\t$this->preloadTemplate('page_nav');\r\n\t}", "public function index()\n {\n $sections = Section::orderBy('id','asc')->paginate(10);;\n return view('admin.pages.section.index',compact('sections'));\n }", "function course_sections($course) {\n global $DB;\n\n $sections = $DB->get_records('course_sections', array('course' => $course), 'section', 'id,section,name,sequence');\n foreach ($sections as $key => $section) {\n if ($section->sequence != '') {\n $sections[$key]->sequence = explode(',', $section->sequence);\n }\n else {\n $sections[$key]->sequence = null;\n }\n }\n\n return $sections;\n}", "public static function loadSectionFiles() {\n\t\tforeach (scandir( dirname(__FILE__) . Route::ROUTE_SECTION_DIR) as $filename) {\n\n\t\t $path = dirname(__FILE__) . Route::ROUTE_SECTION_DIR . '/' . $filename;\n\n\t\t if (is_file($path)) {\n\t\t\t\t$path_parts = pathinfo($path);\n\t\t \t$basename = $path_parts['filename'];\n\n\t\t \tif (self::endsWith($basename, Route::ROUTE_SECTION_SUFFIX)) {\n\t\t\t require_once $path;\n\t\t\t call_user_func(array($basename , 'init'));\n\t\t \t}\n\t\t }\n\t\t}\n\t}", "public function index()\n {\n\n // Getting institutio id\n $id=Auth::user();\n $user_id=Auth::user()->id;\n\n $institutionId = $id->personal_info->institution_id;\n $faculties=faculty::where('institution_id',$institutionId)->where('user_id', $user_id)->orderByDesc('id')->first();\n $facultyId=$faculties->id;\n // faculty_id paisi\n\n $sections = DB::table('sections')\n ->join('section_details', 'section_details.section_id', '=', 'sections.id')\n ->join('faculties', 'faculties.id', '=', 'section_details.faculty_id')\n ->join('courses', 'courses.id', '=', 'sections.course_id')\n ->where('sections.institution_id', '=', $institutionId)\n ->where('faculties.id', '=', $facultyId)\n ->get();\n\n return view('dashboard.faculty.faculty-assigned-course',[\n 'sections'=>$sections,\n ]);\n }", "public function __buildNavigation(){\n\t\t\t$nav = array();\n\t\t\t$xml = simplexml_load_file(ASSETS . '/navigation.xml');\n\n\t\t\t// Loop over the default Symphony navigation file, converting\n\t\t\t// it into an associative array representation\n\t\t\tforeach($xml->xpath('/navigation/group') as $n){\n\n\t\t\t\t$index = (string)$n->attributes()->index;\n\t\t\t\t$children = $n->xpath('children/item');\n\t\t\t\t$content = $n->attributes();\n\n\t\t\t\t// If the index is already set, increment the index and check again.\n\t\t\t\t// Rinse and repeat until the index is not set.\n\t\t\t\tif(isset($nav[$index])){\n\t\t\t\t\tdo{\n\t\t\t\t\t\t$index++;\n\t\t\t\t\t}while(isset($nav[$index]));\n\t\t\t\t}\n\n\t\t\t\t$nav[$index] = array(\n\t\t\t\t\t'name' => __(strval($content->name)),\n\t\t\t\t\t'index' => $index,\n\t\t\t\t\t'children' => array()\n\t\t\t\t);\n\n\t\t\t\tif(strlen(trim((string)$content->limit)) > 0){\n\t\t\t\t\t$nav[$index]['limit'] = (string)$content->limit;\n\t\t\t\t}\n\n\t\t\t\tif(count($children) > 0){\n\t\t\t\t\tforeach($children as $child){\n\t\t\t\t\t\t$item = array(\n\t\t\t\t\t\t\t'link' => (string)$child->attributes()->link,\n\t\t\t\t\t\t\t'name' => __(strval($child->attributes()->name)),\n\t\t\t\t\t\t\t'visible' => ((string)$child->attributes()->visible == 'no' ? 'no' : 'yes'),\n\t\t\t\t\t\t);\n\n\t\t\t\t\t\t$limit = (string)$child->attributes()->limit;\n\t\t\t\t\t\tif(strlen(trim($limit)) > 0) $item['limit'] = $limit;\n\n\t\t\t\t\t\t$nav[$index]['children'][] = $item;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Build the section navigation, grouped by their navigation groups\n\t\t\t$sections = Symphony::Database()->fetch(\"SELECT * FROM `tbl_sections` ORDER BY `sortorder` ASC\");\n\t\t\tif(is_array($sections) && !empty($sections)){\n\t\t\t\tforeach($sections as $s){\n\n\t\t\t\t\t$group_index = self::__navigationFindGroupIndex($nav, $s['navigation_group']);\n\n\t\t\t\t\tif($group_index === false){\n\t\t\t\t\t\t$group_index = General::array_find_available_index($nav, 0);\n\n\t\t\t\t\t\t$nav[$group_index] = array(\n\t\t\t\t\t\t\t'name' => $s['navigation_group'],\n\t\t\t\t\t\t\t'index' => $group_index,\n\t\t\t\t\t\t\t'children' => array()\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\n\t\t\t\t\t$nav[$group_index]['children'][] = array(\n\t\t\t\t\t\t'link' => '/publish/' . $s['handle'] . '/',\n\t\t\t\t\t\t'name' => $s['name'],\n\t\t\t\t\t\t'type' => 'section',\n\t\t\t\t\t\t'section' => array('id' => $s['id'], 'handle' => $s['handle']),\n\t\t\t\t\t\t'visible' => ($s['hidden'] == 'no' ? 'yes' : 'no')\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Loop over all the installed extensions to add in other navigation items\n\t\t\t$extensions = Symphony::ExtensionManager()->listInstalledHandles();\n\t\t\tforeach($extensions as $e){\n\t\t\t\t$info = Symphony::ExtensionManager()->about($e);\n\n\t\t\t\tif(isset($info['navigation']) && is_array($info['navigation']) && !empty($info['navigation'])){\n\t\t\t\t\tforeach($info['navigation'] as $item){\n\n\t\t\t\t\t\t$type = (isset($item['children']) ? Extension::NAV_GROUP : Extension::NAV_CHILD);\n\n\t\t\t\t\t\tswitch($type){\n\t\t\t\t\t\t\tcase Extension::NAV_GROUP:\n\n\t\t\t\t\t\t\t\t$index = General::array_find_available_index($nav, $item['location']);\n\n\t\t\t\t\t\t\t\t$nav[$index] = array(\n\t\t\t\t\t\t\t\t\t'name' => $item['name'],\n\t\t\t\t\t\t\t\t\t'index' => $index,\n\t\t\t\t\t\t\t\t\t'children' => array(),\n\t\t\t\t\t\t\t\t\t'limit' => (!is_null($item['limit']) ? $item['limit'] : null)\n\t\t\t\t\t\t\t\t);\n\n\t\t\t\t\t\t\t\tforeach($item['children'] as $child){\n\t\t\t\t\t\t\t\t\tif(!isset($child['relative']) || $child['relative'] == true){\n\t\t\t\t\t\t\t\t\t\t$link = '/extension/' . $e . '/' . ltrim($child['link'], '/');\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\telse{\n\t\t\t\t\t\t\t\t\t\t$link = '/' . ltrim($child['link'], '/');\n\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t$nav[$index]['children'][] = array(\n\t\t\t\t\t\t\t\t\t\t'link' => $link,\n\t\t\t\t\t\t\t\t\t\t'name' => $child['name'],\n\t\t\t\t\t\t\t\t\t\t'visible' => ($child['visible'] == 'no' ? 'no' : 'yes'),\n\t\t\t\t\t\t\t\t\t\t'limit' => (!is_null($child['limit']) ? $child['limit'] : null)\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\tbreak;\n\n\t\t\t\t\t\t\tcase Extension::NAV_CHILD:\n\n\t\t\t\t\t\t\t\tif(!isset($item['relative']) || $item['relative'] == true){\n\t\t\t\t\t\t\t\t\t$link = '/extension/' . $e . '/' . ltrim($item['link'], '/');\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\t$link = '/' . ltrim($item['link'], '/');\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\tif(!is_numeric($item['location'])){\n\t\t\t\t\t\t\t\t\t// is a navigation group\n\t\t\t\t\t\t\t\t\t$group_name = $item['location'];\n\t\t\t\t\t\t\t\t\t$group_index = self::__navigationFindGroupIndex($nav, $item['location']);\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t// is a legacy numeric index\n\t\t\t\t\t\t\t\t\t$group_index = $item['location'];\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t$child = array(\n\t\t\t\t\t\t\t\t\t'link' => $link,\n\t\t\t\t\t\t\t\t\t'name' => $item['name'],\n\t\t\t\t\t\t\t\t\t'visible' => ($item['visible'] == 'no' ? 'no' : 'yes'),\n\t\t\t\t\t\t\t\t\t'limit' => (!is_null($item['limit']) ? $item['limit'] : null)\n\t\t\t\t\t\t\t\t);\n\n\t\t\t\t\t\t\t\tif ($group_index === false) {\n\t\t\t\t\t\t\t\t\t$group_index = General::array_find_available_index($nav, 0);\n\t\t\t\t\t\t\t\t\t// add new navigation group\n\t\t\t\t\t\t\t\t\t$nav[$group_index] = array(\n\t\t\t\t\t\t\t\t\t\t'name' => $group_name,\n\t\t\t\t\t\t\t\t\t\t'index' => $group_index,\n\t\t\t\t\t\t\t\t\t\t'children' => array($child),\n\t\t\t\t\t\t\t\t\t\t'limit' => (!is_null($item['limit']) ? $item['limit'] : null)\n\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t// add new location by index\n\t\t\t\t\t\t\t\t\t$nav[$group_index]['children'][] = $child;\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\t/**\n\t\t\t * After building the Navigation properties array. This is specifically\n\t\t\t * for extensions to add their groups to the navigation or items to groups,\n\t\t\t * already in the navigation. Note: THIS IS FOR ADDING ONLY! If you need\n\t\t\t * to edit existing navigation elements, use the `NavigationPreRender` delegate.\n\t\t\t *\n\t\t\t * @deprecated This delegate is deprecated and will be removed in the next\n\t\t\t * major release of Symphony. Extensions are encouraged to use provide the\n\t\t\t * `fetchNavigation` method instead.\n\t\t\t * @delegate ExtensionsAddToNavigation\n\t\t\t * @param string $context\n\t\t\t * '/backend/'\n\t\t\t * @param array $navigation\n\t\t\t */\n\t\t\tSymphony::ExtensionManager()->notifyMembers(\n\t\t\t\t'ExtensionsAddToNavigation', '/backend/', array('navigation' => &$nav)\n\t\t\t);\n\n\t\t\t$pageCallback = Administration::instance()->getPageCallback();\n\n\t\t\t$pageRoot = $pageCallback['pageroot'] . (isset($pageCallback['context'][0]) ? $pageCallback['context'][0] . '/' : '');\n\t\t\t$found = self::__findActiveNavigationGroup($nav, $pageRoot);\n\n\t\t\t// Normal searches failed. Use a regular expression using the page root. This is less\n\t\t\t// efficient and should never really get invoked unless something weird is going on\n\t\t\tif(!$found) self::__findActiveNavigationGroup($nav, '/^' . str_replace('/', '\\/', $pageCallback['pageroot']) . '/i', true);\n\n\t\t\tksort($nav);\n\t\t\t$this->_navigation = $nav;\n\t\t}", "function i4_get_all_courses() {\n global $wpcwdb, $wpdb;\n\n $course_table_name = $wpdb->prefix . 'wpcw_courses';\n\n $wpdb->show_errors();\n\n $SQL = \"SELECT course_id, course_title FROM $course_table_name ORDER BY course_title\";\n $results = $wpdb->get_results($SQL, OBJECT_K);\n return $this->results_to_course_array($results);\n }", "public function index()\n {\n return view('admin.courses.index',[\n 'courses'=>Course::paginate(7)\n ]);\n }", "function index() {\n\n\t\t$this->load->model('User_model');\n $logid = $this->session->userdata('logid');\n\t\t$data['uname'] = $this->session->userdata('uname');\n $data['login_id'] = $this->session->userdata('login_id');\n $data['logid'] = $this->session->userdata('logid');\n\t\t$data['courseslist'] = $this->User_model->courseslist();\n\t\t\n\t\t$this->load->helper('url');\n\t\t$currentURL = current_url(); //http://myhost/main\n\t\t$params = $_SERVER['QUERY_STRING']; //my_id=1,3\n\t\t$fullURL = $currentURL . $params; \n\t\t\n\t\t$data['pageseco_detail'] = $this->User_model->Checkpageurl($params);\n\t\t$data['title']=$data['pageseco_detail'][0]['title'];\n\t\t$data['meta_description']=$data['pageseco_detail'][0]['meta_description'];\n\t\t$data['meta_keywords']=$data['pageseco_detail'][0]['meta_keywords'];\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t$page_url=current_url();\n\t $data['page_url'] = $page_url;\n\t\t\n\t\t\n\t\t$this->load->view('admin/index', $data);\n }", "public function multiLoad_0() {\n\t\treturn $this->clean($this->get(self::table, -1, '', array(), array(), array('column' => 'course', 'order' => 'ASC')));\n\t}", "public function add_course_view(){\n\n\t\t$headerData = null;\n\t\t$sidebarData = null;\n\t\t$page = 'admin/add_course';\n\t\t$mainData = array(\n\t\t\t'pagetitle'=> 'Add course',\n\t\t\t'course_list'=> $this->setting_model->Get_All('course'),\n\t\t);\n\t\t$footerData = null;\n\n\t\t$this->template($headerData, $sidebarData, $page, $mainData, $footerData);\n\t}", "protected function remove_empty_section_branches() {\n global $PAGE;\n $cache = new navigation_cache('navigation');\n $course = &$PAGE->navigation->find_active_node(navigation_node::TYPE_COURSE);\n if ($course===false || !$cache->cached('modinfo'.$course->key) || !$cache->cached('coursesections'.$course->key)) {\n return 0;\n }\n $sectionstoremove = array();\n $coursesections = $cache->{'coursesections'.$course->key};\n $modinfosections = $cache->{'modinfo'.$course->key}->sections;\n foreach ($coursesections as $id=>$section) {\n if (!array_key_exists($id, $modinfosections)) {\n $sectionstoremove[] = $section->id;\n }\n }\n\n foreach ($course->children as $key=>$node) {\n if ($node->type == navigation_node::TYPE_SECTION && in_array($node->key, $sectionstoremove)) {\n $course->remove_child($key);\n }\n }\n }", "public function renderSections()\n {\n return $this->render(function () {\n return $this->factory->getSections();\n });\n }", "protected function _handlePageToolbar()\n\t{\n\t\t$sections = $this->Section->getSections();\n\t\t$currentModel = $this->Section->getSubject()->model->alias;\n\n\t\t// special case to not show any header sections for compliance analysis at all\n\t\tif ($currentModel == 'ComplianceManagement') {\n\t\t\treturn;\n\t\t}\n\n\t\tif (in_array($currentModel, [\n\t\t\t'VendorAssessment',\n\t\t\t'VendorAssessmentFeedback',\n\t\t\t'VendorAssessmentFinding',\n\t\t\t'VendorAssessmentSystemLog'\n\t\t])) {\n\t\t\t$sections = [\n\t\t\t\t'VendorAssessment',\n\t\t\t\t'VendorAssessmentFeedback',\n\t\t\t\t'VendorAssessmentFinding',\n\t\t\t\t'VendorAssessmentSystemLog'\n\t\t\t];\n\t\t}\n\t\telseif (in_array($currentModel, [\n\t\t\t'AccountReview',\n\t\t\t'AccountReviewPull',\n\t\t\t'AccountReviewFeedback',\n\t\t\t'AccountReviewFinding',\n\t\t\t'AccountReviewPullSystemLog'\n\t\t])) {\n\t\t\t$sections = [\n\t\t\t\t'AccountReview',\n\t\t\t\t'AccountReviewPull',\n\t\t\t\t'AccountReviewFeedback',\n\t\t\t\t'AccountReviewFinding',\n\t\t\t\t'AccountReviewPullSystemLog'\n\t\t\t];\n\t\t}\n\t\telseif (in_array($currentModel, [\n\t\t\t'User',\n\t\t\t'UserSystemLog',\n\t\t\t'LdapSynchronizationSystemLog'\n\t\t])) {\n\t\t\t$sections = [\n\t\t\t\t'User',\n\t\t\t\t'UserSystemLog',\n\t\t\t\t'LdapSynchronizationSystemLog'\n\t\t\t];\n\t\t}\n\n\t\t// if there is more than 1 section available within current request\n\t\tif (count($sections) > 1) {\n\t\t\tforeach ($sections as $model) {\n\t\t\t\t$SectionModel = ClassRegistry::init($model);\n\n\t\t\t\t$liOptions = [];\n\t\t\t\tif ($currentModel == $model) {\n\t\t\t\t\t$liOptions['class'] = 'active';\n\t\t\t\t}\n\n\t\t\t\t$url = null;\n\t\t\t\tif (method_exists($SectionModel, 'getMappedRoute')) {\n\t\t\t\t\t$url = $SectionModel->getMappedRoute();\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\t$url = [\n\t\t\t\t\t\t'plugin' => null,\n\t\t\t\t\t\t'controller' => $SectionModel->getMappedController(),\n\t\t\t\t\t\t'action' => 'index'\n\t\t\t\t\t];\n\t\t\t\t}\n\n\t\t\t\t$section = [\n\t\t\t\t\t$SectionModel->label(),\n\t\t\t\t\t$url,\n\t\t\t\t\t[\n\t\t\t\t\t\t'icon' => 'stack3',\n\t\t\t\t\t\t'li' => $liOptions\n\t\t\t\t\t]\n\t\t\t\t];\n\n\t\t\t\t$this->PageToolbar->addItem(...$section);\n\t\t\t}\n\t\t}\n\n\t\t// special case hardcoded for Community handling of Mapping module\n\t\tif (!AppModule::loaded('Mapping') && in_array($currentModel, ['CompliancePackageRegulator', 'CompliancePackageItem'])) {\n\t\t\t$url = 'https://www.eramba.org/services';\n\n\t\t\t$options = [\n\t\t\t\t'icon' => 'stack3',\n\t\t\t\t'target' => '_blank',\n\t\t\t\t'li' => [\n\t\t\t\t\t'class' => 'page-toolbar-enterprise-item'\n\t\t\t\t]\n\t\t\t];\n\n\t\t\t$this->PageToolbar->addItem(__('Compliance Mappings') . $this->Labels->danger('Enterprise'), $url, $options);\n\t\t}\n\t}", "public function index(){\n if(Input::has('year') && Input::get('year') != ''){\n $year = Input::get('year');\n }else{\n $year = \"2019\";\n }\n \n $start_date = $year.\"-01-01\";\n $end_date = $year.\"-12-31\";\n\n $courses = Course::select('courses.*','license.name as license_name','license.authorised_by')\n ->join('license','courses.license_id','=','license.id')\n ->where('courses.user_type',Auth::user()->manage_official_type)\n ->orderBy('courses.start_date','ASC')\n ->whereBetween('courses.start_date',[$start_date,$end_date])\n ->get();\n $this->layout->sidebar = View::make('admin.sidebar',['sidebar'=>'courses','subsidebar'=>1]);\n $this->layout->main = View::make('admin.courses.list',['courses'=>$courses,'title'=>'Courses','flag'=>1 , \"year\"=>$year]);\n }", "public function courses(){\n $courses = Course::all();\n return View('admin.courses',compact('courses'));\n }", "public function index()\n\t{\n\t\t$sections = Section:: all();\n\t\t$categories= Category::all();\n\t\treturn view('sections.index',compact('sections','categories'));\n\t}", "function index()\n {\n $data['lesson'] = $this->Lesson_model->get_all_lesson();\n $data['_cource'] = $this->Cource_model->get_all_cource();\n $data['_view'] = 'lesson/index';\n $this->load->view('layouts/main',$data);\n }", "function display_course( $section ) {\n\t$retval = '';\n\n\t// Back out early if this section isn't courses, or is empty:\n\tif (\n\t\tget_field( 'section_layout', $section ) !== 'courses'\n\t\t|| ! have_rows( 'courses', $section )\n\t) {\n\t\treturn $retval;\n\t}\n\n\t$course_num = 0;\n\n\twhile( have_rows( 'courses', $section ) ) : $course = the_row();\n\t\t$course_num++;\n\t\t$course_title = get_sub_field( 'course_title' );\n\t\t$course_information = get_sub_field( 'course_information' );\n\n\t\tob_start();\n\t?>\n\t<div class=\"card card-secondary\">\n\t\t<div class=\"card-header\" role=\"tab\" id=\"courseHeading<?php echo $course_num; ?>\">\n\t\t\t<h3 class=\"h5 mb-0\">\n\t\t\t\t<a data-toggle=\"collapse\" href=\"#courseCollapse<?php echo $course_num; ?>\" aria-expanded=\"true\" aria-controls=\"courseCollapse<?php echo $course_num; ?>\">\n\t\t\t\t<?php echo $course_title; ?>\n\t\t\t\t</a>\n\t\t\t</h3>\n\t\t\t</div>\n\t\t\t<div id=\"courseCollapse<?php echo $course_num; ?>\" class=\"collapse\" role=\"tabpanel\" aria-labelledby=\"courseHeading<?php echo $course_num; ?>\" data-parent=\"#coursesAccordion\">\n\t\t\t<div class=\"card-block\">\n\t\t\t\t<?php echo $course_information; ?>\n\t\t\t</div>\n\t\t</div>\n\t</div>\n\n\t<?php\n\t\t$retval .= trim( ob_get_clean() );\n\n\tendwhile;\n\n\treturn $retval;\n}", "function cicleinscription_get_courses_all(){\n\tglobal $DB;\n\t$sort = 'fullname ASC';\n\t$courses = $DB->get_records_sql(\"\n\t\t\tSELECT\n\t\t\t\tid,\n\t\t\t\tfullname,\n\t\t\t\tshortname \n\t\t\tFROM {course}\n\t\t\tWHERE\n\t\t\t\tcategory <> 0\n\t\t\tORDER BY {$sort}\");\n\n\treturn $courses;\n}", "private function add_sections(&$data)\n\t{\n\t\t$data['header']\t\t\t= $this->load->controller('common/header');\n\t\t$data['column_left']\t= $this->load->controller('common/column_left');\n\t\t$data['footer']\t\t\t= $this->load->controller('common/footer');\n\t}", "public function index(){\n // $response = Http::get('https://docs.microsoft.com/api/contentbrowser/search?environment=prod&locale=es-es&facet=roles&facet=levels&facet=products&facet=resource_type&%24filter=((resource_type%20eq%20%27learning%20path%27))&%24orderBy=popularity%20desc%2Clast_modified%20desc%2Ctitle&%24top=30&showHidden=false');\n\n // Spicified the data format to use\n // $microsoft_courses = $response->json();\n\n $courses = Course::where('status', 2)->paginate();\n\n\n return view('admin.courses.index', compact('courses'));\n\n // TODO: uncomment to return Microsoft Learning API data\n // return view('admin.courses.index', compact('courses', 'microsoft_courses'));\n }", "public function index()\n\t{\n $meta['header_img_text'] = $meta['pageTitle'] = 'Course Editor';\n $lessons = Lesson::where('program_id',$this->program->id)->where('chapter_id',0)->orderBy('chapter_ord','asc')->orderBy('ord','asc')->paginate(15);\n// if($lessons->count()==0) return Redirect::to('modules');\n $data['chapters'] = editable_json( Chapter::where('program_id', Session::get('program_id'))->orderBy('ord','asc')->get(array('id','title')), 'title' , array('0' => 'None'));\n $data['lessons'] = $lessons;\n $meta['javascripts'] = array('../assets/js/admin/lessons.js');\n if(Request::ajax()){\n return View::make('lessons.lessons')->withData($data);\n }\n return View::make('lessons.index')->withData($data)->withMeta($meta);\n\t}", "public function getSections(){\n return $this->getSite()->getSections();\n }", "public function section(){\n\n\t\t$this->data['departmentList'] = $this->general_model->departmentList();\n\t\t$this->load->view('app/administrator/file_maintenance/section',$this->data);\n\t}", "protected function generateCourses()\n {\n /**\n * Let's go through the archane paths that lead us to the actual\n * table of grades.\n */\n $mainTable = $this->__transcriptDOM\n ->getElementsByTagName('table')->item(0);\n\n $rowOfGrades = $mainTable->childNodes->item(4);\n $gradesTable = $rowOfGrades->firstChild->firstChild;\n\n $this->courses = [];\n\n foreach ($gradesTable->childNodes as $row) {\n // The rows containing the grades have 13 columns.\n if ($row->childNodes->length == 13) {\n $data = $row->childNodes;\n $course = new Course;\n\n $course->code = strtoupper($data->item(0)->nodeValue.$data->item(1)->nodeValue);\n $course->semester = $data->item(2)->nodeValue;\n $course->section = $data->item(3)->nodeValue;\n $course->description = $data->item(4)->nodeValue;\n $course->creditsWorth = $data->item(5)->nodeValue;\n $course->grade = $data->item(6)->nodeValue;\n $course->gpaEarned = $data->item(7)->nodeValue;\n $course->classAvg = $data->item(8)->nodeValue;\n $course->classSize = $data->item(9)->nodeValue;\n $course->creditsEarned = $data->item(10)->nodeValue;\n\n $this->courses[$course->code] = $course;\n }\n }\n }" ]
[ "0.6961685", "0.6686399", "0.6552683", "0.64853364", "0.64296454", "0.6321825", "0.6249748", "0.6241925", "0.622123", "0.6217101", "0.6110864", "0.6058981", "0.60587525", "0.605219", "0.60284156", "0.6009426", "0.60051966", "0.5973126", "0.5948656", "0.5947969", "0.5944489", "0.5920651", "0.59170735", "0.59097314", "0.58901864", "0.58737063", "0.5808124", "0.5807557", "0.58052665", "0.57933617", "0.57638705", "0.5763702", "0.57500905", "0.57416344", "0.5729809", "0.57065344", "0.57055175", "0.5682891", "0.56778973", "0.567074", "0.5660514", "0.5659884", "0.5648104", "0.5643579", "0.56389624", "0.5634289", "0.56303847", "0.562791", "0.5627873", "0.56149846", "0.5599488", "0.5593101", "0.55846477", "0.55765104", "0.5575817", "0.5574656", "0.5574183", "0.55685985", "0.5567961", "0.5566908", "0.55603707", "0.5558361", "0.555756", "0.5547713", "0.55451775", "0.5544306", "0.55439097", "0.5542064", "0.55413467", "0.55385005", "0.5535014", "0.5524471", "0.55243295", "0.5517776", "0.5508816", "0.55063194", "0.5496733", "0.54943293", "0.54890734", "0.5487347", "0.5484889", "0.5484136", "0.54738426", "0.54648006", "0.5461198", "0.54591715", "0.54567343", "0.54525197", "0.54461515", "0.54460037", "0.54457814", "0.54330283", "0.5431418", "0.5427296", "0.54221797", "0.5421658", "0.5419286", "0.5417697", "0.5413841", "0.54137665", "0.54102516" ]
0.0
-1
Custom action after section has been moved in AJAX mode Used in course/rest.php
function ajax_section_move() { global $PAGE; $titles = array(); $course = $this->get_course(); $modinfo = get_fast_modinfo($course); $renderer = $this->get_renderer($PAGE); if ($renderer && ($sections = $modinfo->get_section_info_all())) { foreach ($sections as $number => $section) { $titles[$number] = $renderer->section_title($section, $course); } } return array('sectiontitles' => $titles, 'action' => 'move'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function ajax_section_move() {\n\n global $PAGE;\n\n $titles = array();\n\n $course = $this->get_course();\n\n $modinfo = get_fast_modinfo($course);\n\n $renderer = $this->get_renderer($PAGE);\n\n if ($renderer && ($sections = $modinfo->get_section_info_all())) {\n\n foreach ($sections as $number => $section) {\n\n $titles[$number] = $renderer->section_title($section, $course);\n\n }\n\n }\n\n return array('sectiontitles' => $titles, 'action' => 'move');\n\n }", "function ajax_section_move() {\n global $PAGE;\n $titles = array();\n $types = array();\n $current = -1;\n $course = $this->get_course();\n $modinfo = get_fast_modinfo($course);\n $renderer = $this->get_renderer($PAGE);\n if ($renderer && ($sections = $modinfo->get_section_info_all())) {\n foreach ($sections as $number => $section) {\n $titles[$number] = $renderer->section_title($section, $course);\n $types[$number] = $this->get_section_type($section);\n if ($this->is_section_current($section)) {\n $current = $number;\n }\n }\n }\n return array('sectiontitles' => $titles, 'sectiontypes' => $types, 'current' => $current, 'action' => 'move');\n }", "public function onAfterRoute()\n\t{\n\t\t$this->app = JFactory::getApplication();\n\t\t// Instantiate the JDispatcher class\n\t\t$this->dispatcher = JDispatcher::getInstance();\n\t\t// Jinput\n\t\t$this->input = $this->app->input;\n\n\t\t// check request mode\n\t\t$request_mode = $this->params->get('ajax_mode','request_with');\n\t\tswitch ($request_mode)\n\t\t{\n\t\t\tcase 'variable':\n\t\t\t\t$request_param = $this->params->get('custom_request_variable','ajax');\n\t\t\t\t$request_param_value = $this->input->getCmd($request_param);\n\t\t\t\tif (!empty($request_param_value))\n\t\t\t\t\t$this->doAjax();\n\t\t\t\tbreak;\n\t\t\tcase 'option':\n\t\t\t\t// check option request\n\t\t\t\tif ($this->input->getCmd('component') == $this->params->get('custom_request_variable','com_ajax')) {\n\t\t\t\t\t$this->doAjax();\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase 'request_with':\n\t\t\t\t$requestWith = strtolower($this->input->server->get('HTTP_X_REQUESTED_WITH'));\n\t\t\t\tif(!empty($requestWith) && $requestWith == 'xmlhttprequest') {\n\t\t\t\t\t$this->doAjax();\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t}\n\t\t\n\t\tif (JFactory::getSession()->get('ajax', false)) {\n\t\t\t$this->doAjax();\n\t\t}\n\t}", "public function on_course_section_end() {\n\n $this->converter->set_stash('sectioninfo', $this->currentsection, $this->currentsection['id']);\n $this->open_xml_writer('sections/section_' . $this->currentsection['id'] . '/section.xml');\n $this->write_xml('section', $this->currentsection);\n $this->close_xml_writer();\n unset($this->currentsection);\n }", "public function on_course_sections_end() {\n $this->converter->set_stash('sectionidslist', $this->sectionids);\n unset($this->sectionids);\n }", "private function course_section_updated($event) {\n global $DB;\n $courseid = $event->courseid;\n $course = $DB->get_record('course', array('id' => $courseid), 'visible');\n $coursecontext = context_course::instance($courseid);\n\n $users = $this->get_google_authenticated_users($courseid);\n $sectionnumber = $event->other['sectionnum'];\n $cms = $this->get_section_course_modules($sectionnumber);\n\n $insertcalls = array();\n $deletecalls = array();\n\n foreach ($cms as $cm) {\n $cmid = $cm->id;\n $cmcontext = context_module::instance($cmid);\n $fileids = $this->get_fileids($cmid);\n if ($fileids) {\n foreach ($fileids as $fileid) {\n foreach ($users as $user) {\n if (has_capability('moodle/course:view', $coursecontext, $user->userid)) {\n // Manager; do nothing.\n } elseif (is_enrolled($coursecontext, $user->userid, null, true) && has_capability('moodle/course:manageactivities', $cmcontext, $user->userid)) {\n // Teacher (enrolled) (active); do nothing.\n } elseif (is_enrolled($coursecontext, $user->userid, null, true)) {\n // Student (enrolled) (active); continue checks.\n if ($course->visible == 1) {\n // Course is visible, continue checks.\n rebuild_course_cache($courseid, true);\n $modinfo = get_fast_modinfo($courseid, $user->userid);\n $cminfo = $modinfo->get_cm($cmid);\n $sectionnumber = $this->get_cm_sectionnum($cmid);\n $secinfo = $modinfo->get_section_info($sectionnumber);\n if ($cminfo->uservisible && $secinfo->available) {\n // Course module and section are visible and available; insert reader permission.\n $call = new stdClass();\n $call->fileid = $fileid;\n $call->gmail = $user->gmail;\n $call->role = 'reader';\n $insertcalls[] = $call;\n if (count($insertcalls) == 1000) {\n $this->batch_insert_permissions($insertcalls);\n $insertcalls = array();\n }\n } else {\n // User cannot access course module or section, delete permission.\n try {\n $permissionid = $this->service->permissions->getIdForEmail($user->gmail);\n $permission = $this->service->permissions->get($fileid, $permissionid->id);\n if ($permission->role != 'owner') {\n $call = new stdClass();\n $call->fileid = $fileid;\n $call->permissionid = $permissionid->id;\n $deletecalls[] = $call;\n if (count($deletecalls) == 1000) {\n $this->batch_delete_permissions($deletecalls);\n $deletecalls = array();\n }\n }\n } catch (Exception $e) {\n debugging($e);\n }\n } \n }\n // Course is not visible; do nothing (course visibility would not have changed during this event).\n }\n // Unenrolled user; do nothing (user enrolment would not have changed during this event).\n }\n }\n }\n }\n\n // Call any remaining batch requests.\n if (count($insertcalls) > 0) {\n $this->batch_insert_permissions($insertcalls);\n }\n\n if (count($deletecalls) > 0) {\n $this->batch_delete_permissions($deletecalls);\n }\n }", "public function process_lesson()\n {\n if ($this->input->is_ajax_request()) {\n\n $process = $this->M_Courses->process_lesson();\n } else {\n redirect(base_url());\n }\n }", "function process_wpdrs_admin_ajax()\n\t\t{\n\t\t\tif(isset($_REQUEST['page']) && $_REQUEST['page'] == 'process_wpdrs_admin_ajax')\n\t\t\t{\n\t\t\t\t$url = admin_url().'?page=wpdrs';\n\t\t\t\t?>\n\t\t\t\t<script type=\"text/javascript\">\n\t\t\t\t\twindow.location.reload(\"<?php echo $url;?>\");\n\t\t\t\t</script>\n\t\t\t\t<?php \n\t\t\t\t}\n\t\t\t}", "private function admin_ajax_routing() {\n\n\t\t// Load API injection\n\t\t$this->add_action( 'wp_ajax_flowdrive_get_profile', $this->api, 'getUserProfile');\n\t\t$this->add_action( 'wp_ajax_flowdrive_get_base_folders', $this->api, 'getBaseFolders');\n\t\t$this->add_action( 'wp_ajax_flowdrive_get_layer', $this->api, 'getLayer');\n\t\t$this->add_action( 'wp_ajax_flowdrive_compare', $this->api, 'compare');\n\t\t$this->add_action( 'wp_ajax_flowdrive_get_folder_contents', $this->api, 'getFolderContents');\n\t\t$this->add_action( 'wp_ajax_flowdrive_post_item', $this->api, 'postItem');\n\t}", "public function adminAjax()\r\n\t{\r\n\t\treturn;\r\n\t}", "function wp_ajax_delete_page($action)\n {\n }", "function afterroute() {\r\n\r\n }", "function onAfterRoute() {\r\n\t\t$this->loadLanguage ( null, JPATH_ADMINISTRATOR);\r\n\t\t\r\n\t\tt3import ( 'core.framework' );\r\n\r\n\t\t$app = JFactory::getApplication('administrator');\r\n\t\t\r\n\t\tif ($app->isAdmin()) {\r\n\t\t\tt3import ('core.admin.util');\r\n\t\t\t//Clean cache if there's something changed backend\r\n\t\t\tif (JRequest::getCmd ('jat3action') || in_array(JRequest::getCmd ('task'), array('save', 'delete', 'remove', 'apply', 'publish', 'unpublish'))) {\r\n\t\t\t\tif (JRequest::getCmd ('jat3action')) {\r\n\t\t\t\t\t//if template parameter updated => clear cache\r\n\t\t\t\t\tt3_import('core/cache');\r\n\t\t\t\t\tT3Cache::clean(2);\r\n\t\t\t\t} else {\r\n\t\t\t\t\t$params = T3Common::get_template_based_params();\r\n\t\t\t\t\t$cache = $params->get('cache');\r\n\t\t\t\t\tif ($cache) {\r\n\t\t\t\t\t\t//if other update: clear cache if cache is enabled\r\n\t\t\t\t\t\tt3_import('core/cache');\r\n\t\t\t\t\t\tT3Cache::clean(1);\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 (JAT3_AdminUtil::checkPermission()) {\r\n\t\t\t\r\n\t\t\t\tif (JAT3_AdminUtil::checkCondition_for_Menu()) {\r\n\t\t\t\t\tJHTML::stylesheet ('', JURI::root().T3_CORE.'/element/assets/css/japaramhelper.css' );\r\n\t\t\t\t\tJHTML::script \t ('', JURI::root().T3_CORE.'/element/assets/js/japaramhelper.js', true);\r\n\t\t\t\t}\r\n\t\t\t\r\n\t\t\t\tif (JRequest::getCmd ( 'jat3type' ) == 'plugin') {\r\n\t\t\t\t\t$action = JRequest::getCmd ( 'jat3action' );\r\n\t\t\t\t\t\r\n\t\t\t\t\tt3import ('core.ajax');\r\n\t\t\t\t\t$obj = new JAT3_Ajax ( );\r\n\t\t\t\t\t\r\n\t\t\t\t\tif ($action && method_exists ( $obj, $action )) {\r\n\t\t\t\t\t\t$obj->$action ();\r\n\t\t\t\t\t}\r\n\t\t\t\t\treturn;\r\n\t\t\t\t} \r\n\t\t\t\t\r\n\t\t\t\tif (! T3Common::detect ())\treturn;\r\n\t\t\t\t\r\n\t\t\t\tJAT3_AdminUtil::loadStyle();\r\n\t\t\t\tJAT3_AdminUtil::loadScipt();\r\n\t\t\t\t\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t\telseif (JRequest::getCmd ( 'jat3type' ) == 'plugin') {\r\n\t\t\t\t$result['error'] = 'Session has expired. Please login before continuing.';\r\n\t\t\t\techo json_encode($result);\r\n\t\t\t\texit;\t\t\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\treturn;\r\n\t\t}\r\n\t\t\r\n\t\tif (! $app->isAdmin () && T3Common::detect ()) {\r\n\t\t\t$action = JRequest::getCmd ( 'jat3action' );\r\n\t\t\t//process request ajax like action - public\r\n\t\t\tif ($action) {\r\n\t\t\t\tt3import ('core.ajaxsite');\r\n\t\t\t\tif (method_exists ('T3AjaxSite', $action)) {\r\n\t\t\t\t\tT3AjaxSite::$action ();\r\n\t\t\t\t\t$app->close(); //exit after finish action\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t//load core library\r\n\t\t\tT3Framework::t3_init ( $this->plgParams );\r\n\t\t\t//Init T3Engine\r\n\t\t\t//get list templates\t\t\t\r\n\t\t\t$themes = T3Common::get_active_themes ();\r\n\t\t\t$path = T3Path::getInstance ();\r\n\t\t\t//path in t3 engine\r\n\t\t\t//active themes path\r\n\t\t\tif ($themes && count ( $themes )) {\r\n\t\t\t\tforeach ( $themes as $theme ) {\r\n\t\t\t\t\tif ($theme[0] == 'engine') {\r\n\t\t\t\t\t\t$path->addPath ( $theme [0] . '.' . $theme [1], T3Path::path (T3_BASE.'/base-themes/'.$theme[1]), T3Path::url (T3_BASE.'/base-themes/'.$theme[1]) );\r\n\t\t\t\t\t} else if ($theme[0] == 'template') {\r\n\t\t\t\t\t\t$path->addPath ( $theme [0] . '.' . $theme [1], T3Path::path (T3_TEMPLATE), T3Path::url (T3_TEMPLATE) );\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\t$path->addPath ( $theme [0] . '.' . $theme [1], T3Path::path (T3_TEMPLATE) . DS . $theme [0] . DS . 'themes' . DS . $theme [1], T3Path::url (T3_TEMPLATE) . \"/{$theme[0]}/themes/{$theme[1]}\" );\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tT3Framework::init_layout ();\r\n\t\t}\r\n\t}", "public function echoAjaxContent() {\n\t\t\n\t\t$sSection = trim( $_GET[ 'section' ] );\n\t\t$sMethod = '';\n\t\t\n\t\tif ( $sSection ) {\n\t\t\t$sMethod = sprintf( 'get%sAjax', Geko_Inflector::camelize( $sSection ) );\n\t\t\tif ( !method_exists( $this, $sMethod ) ) $sMethod = '';\n\t\t}\n\t\t\n\t\tif ( $sMethod ) {\n\t\t\t$aAjaxResponse = $this->$sMethod();\n\t\t\techo Zend_Json::encode( $aAjaxResponse );\n\t\t}\n\t}", "public function complete()\n {\n $post = $_REQUEST;\n $this->setRedirect('index.php?option=com_jms&view=jms&layout=complete&plan_id=' . $post['plan_id']);\n }", "public function ajax() {\n \n // Get action's get input\n $action = $this->CI->input->get('action');\n\n if ( !$action ) {\n $action = $this->CI->input->post('action');\n }\n \n try {\n\n // Call method if exists\n (new MidrubBaseAdminCollectionFrontendControllers\\Ajax)->$action();\n\n } catch (Exception $ex) {\n\n $data = array(\n 'success' => FALSE,\n 'message' => $ex->getMessage()\n );\n\n echo json_encode($data);\n\n }\n \n }", "function editQuoteFinalStepAction()\n\t{\n\t\tif($_SERVER['HTTP_X_REQUESTED_WITH']=='XMLHttpRequest')\n\t\t{\n\t\t\t$quote_id=$this->_request->getParam('quote_id');\n\n\t\t\tif($quote_id)\n\t\t\t{\n\t\t\t\t$quoteObj=new Ep_Quote_Quotes();\n\t\t\t\t$quoteDetails=$quoteObj->getQuoteDetails($quote_id);\n\t\t\t\tif($quoteDetails)\n\t\t\t\t{\n\t\t\t\t\t\n\t\t\t\t\t//Quote documents added to sesssion\n\t\t\t\t\t$files = \"\";\n\t\t\t\t\t$documents_path = explode(\"|\",$quoteDetails[0]['documents_path']);\n\t\t\t\t\t$documents_name = explode(\"|\",$quoteDetails[0]['documents_name']);\n\t\t\t\t\t$k =0;\n\t\t\t\t\tforeach($documents_path as $row)\n\t\t\t\t\t{\n\t\t\t\t\t\tif(file_exists($this->quote_documents_path.$documents_path[$k]) && !is_dir($this->quote_documents_path.$documents_path[$k]))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$files .= '<div class=\"topset2\"><a href=\"/quote/download-document?type=quote&quote_id='.$quote_id.'&index='.$k.'\">'.utf8_encode($documents_name[$k]).'</a><span class=\"delete\" rel=\"'.$k.'_'.$quote_id.'\"> <i class=\"splashy-error_x\"></i></span> </div>';\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$k++;\n\t\t\t\t\t}\n\t\t\t\t\t$quoteDetails[0]['documents'] = $files;\n\n\n\t\t\t\t\t$this->_view->send_quote=$quoteDetails[0];\n\t\t\t\t\t$this->render(\"popup-edit-finalstep-details\");\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t\n\t\t}\n\t\t\n\t}", "public function reactToOnAfterAction($event) { }", "function escalate_network_admin_ajax_callback() { include($this->plugin_basename . '/core/admin/ajax/admin-ajax.php'); die(); }", "function display_section_after( $retval, $section ) {\n\t$layout = get_field( 'section_layout', $section );\n\tswitch ( $layout ) {\n\t\tcase 'courses':\n\t\t\t$retval = display_courses_after( $section );\n\t\t\tbreak;\n\t\tcase 'timeline':\n\t\t\t$retval = display_timeline_after( $section );\n\t\t\tbreak;\n\t\tcase 'default':\n\t\tdefault:\n\t\t\t$retval = \\UCF_Section_Common::ucf_section_display_after( $section );\n\t\t\tbreak;\n\t}\n\n\treturn $retval;\n}", "function onAfterRoute()\n\t{\n\t\tif ($this->app->isAdmin())\n\t\t{\n\t\t\t$code = JRequest::getVar('code');\n\t\t\tif (isset($code))\n\t\t\t{\n\t\t\t\t$this->fetchRefreshToken($code);\n\t\t\t}\n\t\t}\n\n\t\t// Validate and, if needed, fetch a fresh access token\n\t\t$this->validateAccessToken();\n\n\t}", "function afterroute() {\n\t}", "public function positionajaxAction()\n {\n \treturn parent::positionajaxAction();\n }", "public function positionajaxAction()\n {\n \treturn parent::positionajaxAction();\n }", "function wp_ajax_get_community_events()\n {\n }", "function ajax_serverActions()\n{\n\n $cc = new CapabilityCheck('serverActions', $_POST);\n if (!$cc->checkCapability()) {\n return;\n }\n\n check_ajax_referer('CPWP');\n\n $cpjm = new CPJobManager('serverActions', $_POST);\n $cpjm->RunJob();\n\n}", "public static function update_section($section) {\n\t\n $context = get_context_instance(CONTEXT_SYSTEM);\n self::validate_context($context);\n require_capability('moodle/course:view', $context); \n $result = glueserver_course_db::glueserver_update_section($section);\n $courseid = $section['course'];\n //It is necessary to call this Moodle function in order to rebuild the course cache\n rebuild_course_cache($courseid);\n\t\treturn array ('success' => $result);\n }", "function performRedirect() {\n if($this->action == 'add' && !empty($this->request->data['VettingStep']['plugin'])) {\n // Redirect to the appropriate plugin to set up whatever it wants\n \n $pluginName = filter_var($this->request->data['VettingStep']['plugin'],FILTER_SANITIZE_SPECIAL_CHARS);\n $modelName = $pluginName;\n $pluginModelName = $pluginName . \".\" . $modelName;\n \n $target = array();\n $target['plugin'] = Inflector::underscore($pluginName);\n $target['controller'] = Inflector::tableize($modelName);\n $target['action'] = 'edit';\n $target[] = $this->_targetid;\n \n $this->redirect($target);\n } else {\n parent::performRedirect();\n }\n }", "function wp_doing_ajax()\n {\n }", "abstract public function ajaxAction(): string;", "public function editcompleteAction() {\n\t\tPageTitle::setTitle($this->view, $this->_request);\n\t\t$session = new Zend_Session_Namespace('taeditcomplete');\n\t\tif (!$session->ta_id) {\n\t\t\t$this->_redirect('/teachingactivity/add');\n\t\t\treturn;\n\t\t}\n\t\t$this->view->ta_id = $session->ta_id;\n\t\tunset($session->ta_id);\n\t}", "public function stepsAction()\n {\n if (!$this->_isActive()) {\n $this->norouteAction();\n return;\n }\n\n if ($this->_expireAjax()) {\n return;\n }\n\n $steps = $this->getRequest()->getParam('steps');\n\n if (!is_array($steps)) {\n $steps = array();\n }\n\n $this->loadLayout();\n $result = array();\n foreach ($steps as $step) {\n if ($this->_hasHandleStepHtml($step)) {\n continue;\n }\n $result[$step] = $this->getLayout()->getBlock('checkout.layout')->getStepBlockHtml($step);\n }\n\n foreach ($steps as $step) {\n if ($this->_hasHandleStepHtml($step)) {\n $result[$step] = $this->_getHandleStepHtml($step);\n }\n }\n\n if (empty($result)) {\n $resultJSON = '{}';\n } else {\n $resultJSON = Mage::helper('core')->jsonEncode($result);\n }\n\n $this->getResponse()->setBody($resultJSON);\n }", "public function postDispatch()\n {\n parent::postDispatch();\n if ($this->getFlag('', self::FLAG_NO_POST_DISPATCH)) {\n return;\n }\n Mage::dispatchEvent('controller_action_postdispatch_adminhtml', array('controller_action' => $this));\n }", "function wp_ajax_add_link_category($action)\n {\n }", "function onAction()\n {\n// global $application;\n// $request = &$application->getInstance('Request');\n $pag_rows = modApiFunc('request', 'getValueByKey', 'rows');\n $pag_name = modApiFunc('request', 'getValueByKey', 'pgname');\n if (strpos($pag_name, 'Catalog_ProdsList_')===0)\n {\n\t if ($pag_rows > 99) $pag_rows = 99;\n $cid = intval(substr($pag_name, 18));\n modApiFunc('CProductListFilter','changeCurrentCategoryId',$cid);\n }\n elseif (strpos($pag_name, 'Manufacturer_ProdsList_')===0)\n {\n $mnf_id = intval(substr($pag_name, 23));\n modApiFunc('CProductListFilter', 'changeCurrentManufactureId', $mnf_id, true);\n }\n $this->pPaginator->setPaginatorPage($pag_name, 1);\n $this->pPaginator->setPaginatorRows($pag_name, $pag_rows);\n// $this->pPaginator->savePaginators();\n }", "public function section($action = \"\", $id = \"\") {\n\n\t\t// PROVIDE A LIST OF SECTION ACCORDING TO CLASS ID\n\t\tif ($action == 'list') {\n\t\t\t$page_data['class_id'] = $id;\n\t\t\t$this->load->view('backend/admin/section/list', $page_data);\n\t\t}\n\t}", "public function afterAction()\r\n\t\t{\r\n\t\t\t//\r\n\t\t\tif (empty( $this->response )) {\r\n\t\t\t\t//\r\n\t\t\t\t$isNeedRender = !empty( $this->view ) && !$this->view->isRendered();\r\n\t\t\t\t//\r\n\t\t\t\t$this->response = new HttpResponse();\r\n\t\t\t\t//\r\n\t\t\t\tif ( $isNeedRender ) {\r\n\t\t\t\t\t//\r\n\t\t\t\t\t$this->response->setData( $this->view->render() );\r\n\t\t\t\t} else {\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t//\r\n\t\t\tif (!$this->response->isSent()) {\r\n\t\t\t\t//\r\n\t\t\t\t$this->response->send();\r\n\t\t\t}\r\n\t\t}", "public function moveStage()\n {\n $target_id = \\App\\Entities\\Category::whereName(humanize($this->request->target))->first()->id;\n $indexing = $this->indexing->findOrFail($this->request->id);\n $indexing->update(['stage_id' => $target_id]);\n return ajaxResponse(\n [\n 'id' => $indexing->id,\n 'message' => langapp('indexing_stage_changed', ['name' => $indexing->name, 'stage' => humanize($this->request->target)]),\n ],\n true,\n Response::HTTP_OK\n );\n }", "protected function afterAction () {\n\t}", "function cleanyeti_sections_callback( $section_passed ) {\n\tglobal $cleanyeti_tabs;\n\t$cleanyeti_tabs = cleanyeti_get_settings_page_tabs();\n\tforeach ( $cleanyeti_tabs as $tabname => $tab ) {\n\t\t$tabsections = $tab['sections'];\n\t\tforeach ( $tabsections as $sectionname => $section ) {\n\t\t\tif ( 'cleanyeti_' . $sectionname . '_section' == $section_passed['id'] ) {\n\t\t\t\t?>\n\t\t\t\t<p><?php echo $section['description']; ?></p>\n\t\t\t\t<?php\n\t\t\t}\n\t\t}\n\t}\n}", "public function order_ajax ()\n {\n if (isset($_POST['sortable'])) {\n $this->slider_model->save_order($_POST['sortable']);\n }\n \n // Fetch all pages\n $this->data['pages'] = $this->slider_model->get_nested($this->data['content_language_id']);\n \n // Load view\n $this->load->view('admin/sliders/order_ajax', $this->data);\n }", "public static function func_ajax_load_menu() {\n\t\t\t \n\t\t\t\tglobal $wpdb;\n\t\t\t\t\n\t\t\t\tif(!defined('DOING_AJAX')){\n wp_redirect (site_url());\n exit;\n } else {\n\t\t\t\t echo self::load_listings();\n\t\t\t\t die();\n\t\t\t\t}\n\t\t\n\t\t}", "function local_callbacks_coursemodule_edit_post_actions($data, $course) {\n // Pull apart $data and insert/update the database table.\n}", "public function section($action = \"\", $id = \"\") {\n\n\t\t// PROVIDE A LIST OF SECTION ACCORDING TO CLASS ID\n\t\tif ($action == 'list') {\n\t\t\t$page_data['class_id'] = $id;\n\t\t\t$this->load->view('backend/student/section/list', $page_data);\n\t\t}\n\t}", "private function ajaxController()\n {\n\n switch ($this->request['action']) {\n case 'add_task':\n $result = $this->addTask($this->request);\n break;\n case 'task_edit_popup':\n $result = $this->getEditTaskPopupData($this->request['task_id']);\n break;\n case 'edit_task':\n $result = $this->editTask($this->request);\n break;\n default:\n return false;\n }\n\n echo json_encode($result);\n exit();\n }", "public function preDispatch()\n {\n if ($this->getRequest()->getActionName() == 'stockmovements') {\n $this->_currentArea = 'adminhtml';\n Mage::helper('rss')->authAdmin('catalog/stockmovements');\n }\n return parent::preDispatch();\n }", "public function successUpdate() {\n $this->loadFrontView('profile/after_update');\n }", "protected function afterAction() {\n\n }", "public function onAfterInit() {\n\t\t// the admin section to 'grow' over time. We only need the css and js\n\t\t// for login, reset, logout and so on.\n\t\tif(!$this->owner->getRequest()->isAjax()) {\n\t\t\tDNRoot::include_requirements();\n\t\t}\n\t}", "function wp_ajax_update_welcome_panel()\n {\n }", "public function indexAction() {\n\t\t$db = Mage::getSingleton('core/resource')->getConnection('core_write');\n\t\t$db->query(\"DELETE FROM core_resource WHERE code = 'ajax_setup';\");\n\t\t$db->query(\"DELETE FROM core_config_data WHERE path LIKE '%et_ajax_configs/%';\");\n\t\tob_start();\n\t\techo '<b>Default Config Section: et_ajax_configs</b>';\n\t\techo '<pre>';\n\t\t$helper = Mage::helper('ajax');\n\t\techo '<a href=\"'.$this->_getRefererUrl().'\">Go back</a>';\n\t\t$content = ob_get_clean();\n\t\t$this->getResponse()->setBody($content);\n\t}", "public function ajaxEndLearning()\n\t{\n\t\tEvent::fire('set.learnEnd',array($data));\n\t}", "public function addSectionData()\n\t\t{\n\t\t\t_is_logged_in();\n\n\t\t\t$data = array();\n\n\t\t\tif ($_POST) {\n\n\t\t\t\tforeach ($this->input->post() as $key => $value) {\n\n\t\t\t\t\tif ($key == 'section_name') {\n\t\t\t\t\t\t$data['section_slug'] = url_title(convert_accented_characters($value));\n\t\t\t\t\t}\n\t\t\t\t\t$data[$key] = $value;\n\t\t\t\t}\n\n\t\t\t\t$data['language'] = $this->session->userdata('language');\n\t\t\t}\n\n\t\t\t// Send data\n\t\t\t$query = $this->co_pages_model->add_section($data);\n\n\t\t\tif ($query > 0) {\n\t\t\t\tredirect('admin/co_pages/add_section?action=success');\n\t\t\t} else {\n\t\t\t\tredirect('admin/co_pages/add_section?action=error');\n\t\t\t}\n\n\t\t}", "public function act_ajax()\n\t{\n\t\t/**\n\t\t * Triggers the ajax plugin action for the context.\n\t\t *\n\t\t * @see AjaxHandler::act_ajax()\n\t\t * @action ajax_{$context}\n\t\t */\n\t\tPlugins::act( 'ajax_' . $this->handler_vars['context'], $this );\n\t}", "function pastIntro() {\n // move progress forward and redirect to the runSurvey action\n $this->autoRender = false; // turn off autoRender\n $this->Session->write('Survey.progress', RIGHTS);\n $this->redirect(array('action' => 'runSurvey'));\n\n }", "public function test_ouwiki_core_calendar_provide_event_action_in_hidden_section() {\n // Create the activity.\n $course = $this->getDataGenerator()->create_course();\n $ouwiki = $this->getDataGenerator()->create_module('ouwiki', ['course' => $course->id]);\n\n // Enrol a student in the course.\n $student = $this->getDataGenerator()->create_and_enrol($course, 'student');\n\n // Create a calendar event.\n $event = $this->create_action_event($course->id, $ouwiki->id,\n \\core_completion\\api::COMPLETION_EVENT_TYPE_DATE_COMPLETION_EXPECTED);\n\n // Set sections 0 as hidden.\n set_section_visible($course->id, 0, 0);\n\n // Now, log out.\n $this->setUser();\n\n // Create an action factory.\n $factory = new \\core_calendar\\action_factory();\n\n // Decorate action event for the student.\n $actionevent = mod_ouwiki_core_calendar_provide_event_action($event, $factory, $student->id);\n\n // Confirm the event is not shown at all.\n $this->assertNull($actionevent);\n }", "public function handleAjaxRequest();", "public function bkap_load_resource_ajax_admin() {\n add_action( 'wp_ajax_bkap_add_resource', array( &$this, 'bkap_add_resource' ) );\n\n // ajax for deleting a single resource.\n add_action( 'wp_ajax_bkap_delete_resource', array( &$this, 'bkap_delete_resource' ) );\n }", "public function method_missing() {\n\t if(!$page = $this->param(\"page\")) $page=1;\n\t\t$this->use_view=\"index\";\n\t\t$section = new CmsSection;\n\t\t/**\n\t\t* find the section - if not default it to 1\n\t\t**/\n\t\t$section = $section->filter(array('url'=>$this->action))->first();\n\t\tif($section) $sect_id = $section->id;\n\t\telse $sect_id = 1;\n\t\t$this->all_rows = $this->model->filter(array('cms_section_id'=>$sect_id,\"status\"=>array(0,1)))->order($this->default_order.\" DESC\")->page($page, 10);\n\t\t$this->filter_block_partial = $this->render_partial(\"filter_block\");\n\t\t$this->list = $this->render_partial(\"list\");\n\t}", "public function cancelSection()\n\t{\n\t\tJRequest::checkToken() or jExit(JText::_('JInvalid_Token'));\n\n\t\t// Initialize variables.\n\t\t$app\t= &JFactory::getApplication();\n\n\t\t$modelName = $app->getUserState('com_eve.roles.model');\n\t\t$app->setUserState('com_eve.roles.model', null);\n\t\t$app->setUserState('com_eve.sectionCorporation.corporationID', null);\n\t\t$app->setUserState('com_eve.sectionCorporation.section', null);\n\n\t\t$model\t= &$this->getModel($modelName, 'EveModel');\n\t\t$this->setRedirect(JRoute::_('index.php?option=com_eve&view=access', false));\n\t}", "public function ajax_response()\n {\n }", "function runAfterInit() {\n \t$this->subscriptions = new StudentSubscriptions();\n \t//$this->groups = new StudentGroups();\n \t//Custom actions\n \tadd_action('refreshCoursesMeta', array(&$this->subscriptions, 'refreshCoursesMeta'));\n \tadd_action('refreshAssignments', array(&$this->subscriptions, 'refreshAssignments'));\n \tadd_action('refreshClassmates', array(&$this->subscriptions, 'refreshClassmates'));\n\n \t//Ajax load awaiting count triggers and hooks\n \tadd_filter('query_vars', array(&$this, 'awaiting_add_trigger'));\n\t\tadd_action('template_redirect', array(&$this,'awaiting_trigger_check'));\n\t\t\n\t\t//Comment content filter on home page\n\t\tadd_filter('get_comment_text', array(&$this, 'filterCommentText'), 10, 2);\n\t\t\n \t//Load cron after adding custom actions\n \t$this->cron = new LePressCron();\n\n \t//Add LePress pseudo-cron calls\n \tif(!$this->cron->get_next_scheduled('refreshCoursesMeta')) {\n \t\t$ms = $this->get_option('courseRefreshTime') * 60;\n \t\tif($ms > 0) {\n\t\t\t\t$this->cron->add_schedule('refreshCoursesMeta', time()+$ms);\n \t\t}\n\t\t}\n\t\tif(!$this->cron->get_next_scheduled('refreshAssignments')) {\n\t\t\t$ms = $this->get_option('assignmentsRefreshTime') * 60;\n \t\tif($ms > 0) {\n\t\t\t\t$this->cron->add_schedule('refreshAssignments', time()+$ms);\n \t\t}\n\t\t}\n\t\tif(!$this->cron->get_next_scheduled('refreshClassmates')) {\n\t\t\t$ms = $this->get_option('classmatesRefreshTime') * 60;\n \t\tif($ms > 0) {\n\t\t\t\t$this->cron->add_schedule('refreshClassmates', time()+$ms);\n \t\t}\n\t\t}\n }", "public function waitforconfirmationAction()\n {\n \tZend_Registry::set('SubCategory', SubCategory::USERUPDATE);\n }", "function fatherly_fcr_handle_ajax()\n{\n include_once(__DIR__ . '/inc/classes/ContentRecirculation.php');\n $FCRInstance = FCR\\ContentRecirculation::init();\n switch ($_REQUEST['operation']) {\n case 'add':\n $results = $FCRInstance->addNewPostToRecirculation($_REQUEST['post_id']);\n break;\n case 'delete':\n $results = $FCRInstance->deletePostFromRecirculation($_REQUEST['post_id']);\n break;\n case 'reset':\n $results = $FCRInstance->resetPostProcessedStatus($_REQUEST['post_id']);\n break;\n }\n echo wp_json_encode($results);\n wp_die();\n}", "private function process_frontend_actions() {\n\t\t\n\t\tif(is_admin()) {\n\t\t\treturn;\n\t\t}\n\n\t\tif($this->is_working() && is_object($this->extras)) {\n\t\t\t$this->extras->page_load_actions();\n\t\t}\n\n\t\n\t}", "public function preProcess() {\n parent::preProcess();\n $this->_id = CRM_Utils_Request::retrieve('id', 'Positive', $this);\n $this->_locId = CRM_Utils_Request::retrieve('locid', 'Positive', $this);\n $this->setPageTitle('Location');\n if ($this->_action & CRM_Core_Action::DELETE) {\n if (!$this->_locId || !$this->canBeDeleted()) {\n CRM_Core_Error::statusBounce(\n ts('Selected location cannot be deleted since its been either used for event, volunteer etc.'),\n CRM_Utils_System::url(\n 'civicrm/eventlocations',\n 'reset=1',\n FALSE,\n NULL,\n FALSE\n ),\n ts('Cannot delete location!')\n );\n }\n }\n }", "public function testAjaxGetVenueListCanBeAccessed()\n {\n $this->dispatch('/venue/ajax-get-venue-list');\n $this->assertResponseStatusCode(200);\n }", "function wp_ajax_menu_locations_save()\n {\n }", "function wp_ajax_wp_link_ajax()\n {\n }", "public function completeAction() {\n\n }", "protected function handlePageEditing() {}", "public function doing_ajax($action = \\null)\n {\n }", "public function woocommerce_loaded() {\n /*************************************/\n /* Adding AJAX function */\n /*************************************/\n add_action( 'init', 'waes_ajax_function' );\n function waes_ajax_function() {\n add_action('wp_ajax_waes_load_sku', 'waes_load_sku');\n }\n }", "function ajaxList() {\r\n $this->rdAuth->noStudentsAllowed();\r\n // Set up the list\r\n $this->setUpAjaxList();\r\n // Process the request for data\r\n $this->AjaxList->asyncGet();\r\n }", "public function index_ajax()\n {\n $this->department->getDepartmentAjax();\n }", "public function preDispatch()\n\t{\n\t\tparent::preDispatch();\n\t\tif ($this->getRequest()->getActionName() == 'view'){\n\t\t\t$this->getRequest()->setRouteName('icecatimport');\n\t\t}\n\t}", "public function on_page_view(){\n $this->runTemplateSubController();\n // lightbox enabled?\n if( (bool) $this->lightboxEnable ){\n $this->addHeaderItem( $this->getHelper('html')->css('flexry-lightbox.min.css', 'flexry') );\n if( (bool) $this->autoIncludeJsInFooter ){\n $this->addFooterItem( $this->getHelper('html')->javascript('flexry-lightbox.js', 'flexry') );\n }else{\n $this->addHeaderItem( $this->getHelper('html')->javascript('flexry-lightbox.js', 'flexry') );\n }\n }\n // output function to execute deferreds\n $this->addHeaderItem( $this->getHelper('html')->javascript('libs/modernizr.js', 'flexry') );\n $this->addFooterItem('<script type=\"text/javascript\">'.$this->getHelper('file')->getContents(DIR_PACKAGES . '/flexry/' . DIRNAME_BLOCKS . '/flexry_gallery/inline_script.js.txt').'</script>');\n }", "public function callbackSuccess()\r\n {\r\n $this->redirectTo('question/user/'.$this->Value('uid') . \"/infouppdaterat\");\r\n }", "public static function fp_rac_admin_request_from_ajax_sortable() {\n if (isset($_POST['data'])) {\n update_option('drag_and_drop_product_info_sortable_column', $_POST['data']);\n }\n exit();\n }", "public function maybe_load_module_on_ajax() {\n\n\t\t$action = ! empty( $_REQUEST['action'] ) ? $_REQUEST['action'] : false;\n\n\t\tif ( ! $action ) {\n\t\t\treturn;\n\t\t}\n\n\t\t$parts = explode( '/', $action );\n\n\t\tif ( empty( $parts[1] ) || Plugin::instance()->dashboard->page_slug !== $parts[0] ) {\n\t\t\treturn;\n\t\t}\n\n\t\t$module = $parts[1];\n\n\t\t$this->load_module( $module );\n\n\t}", "function moveCategorySelect( $option, $cid, $SectionList, $items, $sectionOld, $contents, $redirect ) {\r\n\t\t?>\r\n\t\t<form action=\"index2.php\" method=\"post\" name=\"adminForm\">\r\n\t\t<br />\r\n\t\t<table class=\"adminheading\">\r\n\t\t<tr>\r\n\t\t\t<th class=\"categories\">\r\n\t\t\tПеремещение подрубрики\r\n\t\t\t</th>\r\n\t\t</tr>\r\n\t\t</table>\r\n\r\n\t\t<br />\r\n\t\t<script language=\"javascript\" type=\"text/javascript\">\r\n\t\tfunction submitbutton(pressbutton) {\r\n\t\t\tvar form = document.adminForm;\r\n\t\t\tif (pressbutton == 'cancel') {\r\n\t\t\t\tsubmitform( pressbutton );\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\r\n\t\t\t// do field validation\r\n\t\t\tif (!getSelectedValue( 'adminForm', 'sectionmove' )) {\r\n\t\t\t\talert( \"Пожалуйста, выберите раздел для перемещаемой подрубрики\" );\r\n\t\t\t} else {\r\n\t\t\t\tsubmitform( pressbutton );\r\n\t\t\t}\r\n\t\t}\r\n\t\t</script>\r\n\t\t<table class=\"adminform\">\r\n\t\t<tr>\r\n\t\t\t<td width=\"3%\"></td>\r\n\t\t\t<td align=\"left\" valign=\"top\" width=\"30%\">\r\n\t\t\t<strong>Переместить в раздел:</strong>\r\n\t\t\t<br />\r\n\t\t\t<?php echo $SectionList ?>\r\n\t\t\t<br /><br />\r\n\t\t\t</td>\r\n\t\t\t<td align=\"left\" valign=\"top\" width=\"20%\">\r\n\t\t\t<strong>Перемещаемые подрубрики:</strong>\r\n\t\t\t<br />\r\n\t\t\t<?php\r\n\t\t\techo \"<ol>\";\r\n\t\t\tforeach ( $items as $item ) {\r\n\t\t\t\techo \"<li>\". $item->name .\"</li>\";\r\n\t\t\t}\r\n\t\t\techo \"</ol>\";\r\n\t\t\t?>\r\n\t\t\t</td>\r\n\t\t\t<td valign=\"top\" width=\"20%\">\r\n\t\t\t<strong>Перемещаемые объекты содержимого:</strong>\r\n\t\t\t<br />\r\n\t\t\t<?php\r\n\t\t\techo \"<ol>\";\r\n\t\t\tforeach ( $contents as $content ) {\r\n\t\t\t\techo \"<li>\". $content->title .\"</li>\";\r\n\t\t\t}\r\n\t\t\techo \"</ol>\";\r\n\t\t\t?>\r\n\t\t\t</td>\r\n\t\t\t<td valign=\"top\">\r\n\t\t\tВ выбранный раздел будут перемещены все\r\n\t\t\t<br />\r\n\t\t\t перечисленные подрубрики и всё \r\n\t\t\t<br />\r\n\t\t\tперечисленное содержимое этих подрубрик.\r\n\t\t\t</td>.\r\n\t\t</tr>\r\n\t\t</table>\r\n\t\t<br /><br />\r\n\r\n\t\t<input type=\"hidden\" name=\"ca\" value=\"<?php echo $option;?>\" />\r\n\t\t<input type=\"hidden\" name=\"section\" value=\"<?php echo $sectionOld;?>\" />\r\n\t\t<input type=\"hidden\" name=\"boxchecked\" value=\"1\" />\r\n\t\t<input type=\"hidden\" name=\"redirect\" value=\"<?php echo $redirect; ?>\" />\r\n\t\t<input type=\"hidden\" name=\"task\" value=\"\" />\r\n\t\t<?php\r\n\t\tforeach ( $cid as $id ) {\r\n\t\t\techo \"\\n <input type=\\\"hidden\\\" name=\\\"cid[]\\\" value=\\\"$id\\\" />\";\r\n\t\t}\r\n\t\t?>\r\n\t\t</form>\r\n\t\t<?php\r\n\t}", "public function callbackSuccess()\n {\n $this->di->get(\"response\")->redirect(\"question\")->send();\n }", "public function RenderContentAjax(): void {\n $this->showContent(TRUE);\n }", "public function postScriptEvent() {\n?>\n\t\t\tvar currentRole = null;\n\t\t\tvar currentPageID = null;\n\t\t\t\n\t\t\tfunction sequenceUp(id) {\n\t\t\t\tvar pageid = <?php\n\t\t\t\t\tif (isset($_GET['id'])) {\n\t\t\t\t\t\techo $_GET['id'];\n\t\t\t\t\t\t\n\t\t\t\t\t} else {\n\t\t\t\t\t\techo \"1\";\n\t\t\t\t\t}\n\t\t\t\t?>;\n\t\t\t\t\n\t\t\t\tpost(\"editform\", \"sequenceUp\", \"submitframe\", { navigationid: id, navigationpageid: pageid});\n\t\t\t}\n\t\t\t\n\t\t\tfunction sequenceDown(id) {\n\t\t\t\tvar pageid = <?php\n\t\t\t\t\tif (isset($_GET['id'])) {\n\t\t\t\t\t\techo $_GET['id'];\n\t\t\t\t\t\t\n\t\t\t\t\t} else {\n\t\t\t\t\t\techo \"1\";\n\t\t\t\t\t}\n\t\t\t\t?>;\n\t\t\t\t\n\t\t\t\tpost(\"editform\", \"sequenceDown\", \"submitframe\", { navigationid: id, navigationpageid: pageid});\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\tfunction typeChange() {\n\t\t\t\tif ($(\"#type\").val() == \"D\") {/* Dynamic */\n\t\t\t\t\tif ($(\"#pagename\").val().substring(0, 21) != \"dynamicpage.php?page=\") {\n\t\t\t\t\t\t$(\"#pagename\").val(\"dynamicpage.php?page=\" + $(\"#pagename\").val());\n\t\t\t\t\t}\n\n\t\t\t\t} else {\n\t\t\t\t\tif ($(\"#pagename\").val().length > 21) {\n\t\t\t\t\t\tif ($(\"#pagename\").val().substring(0, 21) == \"dynamicpage.php?page=\") {\n\t\t\t\t\t\t\t$(\"#pagename\").val($(\"#pagename\").val().substring(21, $(\"#pagename\").val().length));\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t$(document).ready(function() {\n\t\t\t\t\t$(\"#roles\").pickList({\n\t\t\t\t\t\t\tremoveText: 'Remove Role',\n\t\t\t\t\t\t\taddText: 'Add Role',\n\t\t\t\t\t\t\ttestMode: false\n\t\t\t\t\t\t});\n\t\t\t\t\t\n\t\t\t\t\t$(\"#roleDialog\").dialog({\n\t\t\t\t\t\t\tautoOpen: false,\n\t\t\t\t\t\t\tmodal: true,\n\t\t\t\t\t\t\twidth: 800,\n\t\t\t\t\t\t\ttitle: \"Roles\",\n\t\t\t\t\t\t\tbuttons: {\n\t\t\t\t\t\t\t\tOk: function() {\n\t\t\t\t\t\t\t\t\t$(\"#rolesForm\").submit();\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\tCancel: function() {\n\t\t\t\t\t\t\t\t\t$(this).dialog(\"close\");\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t});\n\t\t\t\t\t\n\t\t\t\t\t$(\"#contentDialog\").dialog({\n\t\t\t\t\t\t\tautoOpen: false,\n\t\t\t\t\t\t\tmodal: true,\n\t\t\t\t\t\t\twidth: 800,\n\t\t\t\t\t\t\ttitle: \"Content\",\n\t\t\t\t\t\t\tbuttons: {\n\t\t\t\t\t\t\t\tOk: function() {\n\t\t\t\t\t\t\t\t\ttinyMCE.triggerSave();\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t$(this).dialog(\"close\");\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tpost(\n\t\t\t\t\t\t\t\t\t\t\t\"editform\", \n\t\t\t\t\t\t\t\t\t\t\t\"saveContent\", \n\t\t\t\t\t\t\t\t\t\t\t\"submitframe\", \n\t\t\t\t\t\t\t\t\t\t\t{ \n\t\t\t\t\t\t\t\t\t\t\t\tcontentpageid: currentPageID, \n\t\t\t\t\t\t\t\t\t\t\t\tcontentvalue: tinyMCE.get('editemailnotes').getContent() \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},\n\t\t\t\t\t\t\t\tCancel: function() {\n\t\t\t\t\t\t\t\t\t$(this).dialog(\"close\");\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});\n\t\t\t\t\n\t\t\tfunction editContent(pageid) {\n\t\t\t\tcurrentPageID = pageid;\n\t\t\t\t\n\t\t\t\tcallAjax(\n\t\t\t\t\t\t\"finddata.php\", \n\t\t\t\t\t\t{ \n\t\t\t\t\t\t\tsql: \"SELECT content FROM <?php echo $_SESSION['DB_PREFIX'];?>pages WHERE pageid = \" + pageid\n\t\t\t\t\t\t},\n\t\t\t\t\t\tfunction(data) {\n\t\t\t\t\t\t\ttinyMCE.get(\"editemailnotes\").setContent(data[0].content);\n\t\t\t\t\t\t}\n\t\t\t\t\t);\n\t\t\t\t\n\t\t\t\t$(\"#contentDialog\").dialog(\"open\");\n\t\t\t}\n\t\t\t\t\n\t\t\tfunction pageRoles(pageid) {\n\t\t\t\tgetJSONData('findpageroles.php?pageid=' + pageid, \"#roles\", function() {\n\t\t\t\t\t$(\"#pageid\").val(pageid);\n\t\t\t\t\t$(\"#roleDialog\").dialog(\"open\");\n\t\t\t\t});\n\t\t\t}\n<?php\n\t\t}", "public static function handle_ajax() {\n\t\tHelpers::ajax_wrapper( array( self::class, 'ajax_handler_body' ) );\n\t}", "function spr_section_exclude($event, $step) {\n// spr_section_exclude admin\n\n\tglobal $prefs;\n\n\t$installed = spr_section_exclude_installed();\n\n\tif ($installed) {\n\t\tif ($step == \"update\") {\n\t \t\tpagetop(gTxt(\"stm_ao_prefs_pagetop\"),gTxt(\"stm_ao_sections_updated\"));\n\t\t\t$exclude = doStripTags(ps('exclude'));\n\t\t\t$sections = spr_get_sections();\n\t\t\tspr_exclude_update($sections,$exclude);\n\t\t}\n\t\telse // do nothing\n\t\t \tpagetop(gTxt(\"stm_ao_prefs_pagetop\"));\n\t}\n\telse { // not installed\n\t}\n\n\tif ($installed) {\n\t\t// get to work\n\t\t$db_sections = spr_get_sections();\n\t}\n\n\t$tmp3 = \"<div id='wrapper'><h1>\".gTxt('stm_ao_prefs_h1').\"</h1><p class='hint'>\".gTxt('stm_ao_prefs_hint').\"</a>\";\n\techo $tmp3;\n\n\t// output spr_exclude settings table\n\techo form(\n\t\tstartTable('list','',\"edit-table txp-list\").\n\t\ttr(\n\t\t\thcell(gTxt('section')).\n\t\t\thcell(gTxt('title')).\n\t\t\thcell(gTxt('exclude'))\n\t\t).\n\t\tspr_exclude_display_settings($db_sections).\n\t\tendTable().\n\t\ttag(\n\t\t\tfInput(\"submit\",\"update\",gTxt(\"stm_ao_update\"),\"smallerbox\").\n\t\t\teInput(\"spr_section_exclude\").sInput(\"update\"),\n\t\t\t'div'\n\t\t)\n\t\t,''\n\t\t,''\n\t\t,'post'\n\t\t,'spr_exclude_form'\n\t);\n\n}", "public function deleteajaxAction()\n {\n \treturn parent::deletajaxAction();\n }", "public function deleteajaxAction()\n {\n \treturn parent::deletajaxAction();\n }", "public function ajax_frontend_call()\n {\n\n // Security check\n check_ajax_referer('referer_id', 'nonce');\n\n $response = 'OK';\n // Send response in JSON format\n // wp_send_json( $response );\n // wp_send_json_error();\n wp_send_json_success($response);\n\n die();\n }", "function action(){\n\t\t//Campos que se quieren excluir de la limpieza de código. Formato: nombreCampo1|nombreCampo2|nombreCampo3\n\t\t$excluir=\"\";\n\t\t$_REQUEST=$this->inspector->cleanPHPHTML($_REQUEST);\n\n\t\t$option=isset($_REQUEST['option'])?$_REQUEST['option']:\"list\";\n\n\n\t\tswitch($option){\n\t\t\tcase \"processList\":\n\t\t\t\t$variable[\"option\"]=\"list\";\n\t\t\t\t$variable[\"grado\"]=$_REQUEST['grado'];\n\t\t\t\t$variable[\"sede\"]=$_REQUEST['sede'];\n $variable[\"periodo\"]=$_REQUEST['periodo'];\n\t\t\t\t$this->getComportamiento($variable);\n\t\t\tbreak;\n\n case \"actualizarNota\":\n $result = $this->procesarNota($_REQUEST);\n echo \"Registro actualizado\";\n /*if(!$result->status){\n echo json_encode($result);\n return false;\n }\n echo json_encode($result);*/\n\n break;\n\t\t}\n\t}", "public function preDispatch()\n {\n parent::preDispatch();\n \n if (!Mage::helper('clarion_reviewreminder')->isExtensionEnabled()) {\n $this->setFlag('', 'no-dispatch', true);\n $this->_redirect('noRoute');\n } \n }", "public function act_auth_ajax()\n\t{\n\t\t$user = User::identify();\n\t\tif ( $user->loggedin ) {\n\t\t\t/**\n\t\t\t * Triggers the ajax plugin action for the context if user is authenticated.\n\t\t\t *\n\t\t\t * @see act_auth_ajax()\n\t\t\t * @action ajax_auth_{$context}\n\t\t\t */\n\t\t\tPlugins::act( 'auth_ajax_' . $this->handler_vars['context'], $this );\n\t\t\texit;\n\t\t}\n\t}", "function do_accordion_sections($screen, $context, $data_object)\n {\n }", "public function moveAction(){\r\n // get variables from request\r\n $query = $this->getRequest()->getQuery()->toArray();\r\n $blockId = $query['block_id'];\r\n $navId = $query['id'];\r\n $position = $query['position'];\r\n // get navigation block model\r\n $navBlockModel = $this->getServiceLocator()->get('DotsNavBlock\\Db\\Model\\NavigationBlock');\r\n // get an instance of the item that changes position and set the new position\r\n $nav = $navBlockModel->getById($navId);\r\n $nav->position = $position;\r\n // get all other items from the navigation\r\n $items = $navBlockModel->getAllByColumnsOrderByPosition(array(\r\n 'block_id = ?' => $blockId,\r\n 'id != ?' => $navId\r\n ));\r\n\r\n // update positions for all items\r\n $pos = 1;\r\n if ($items){\r\n foreach ($items as $itm){\r\n if ($pos==$position){\r\n $pos++;\r\n }\r\n $itm->position = $pos++;\r\n $navBlockModel->persist($itm);\r\n }\r\n }\r\n $navBlockModel->persist($nav);\r\n // save everything in the DB\r\n $navBlockModel->flush();\r\n\r\n return $this->jsonResponse(array('success' => true));\r\n }", "public function missionFollowupDetailsAction()\n\t{\n\t\tif($_SERVER['HTTP_X_REQUESTED_WITH']=='XMLHttpRequest')\n\t\t{\n\t\t\t$missionParams=$this->_request->getParams();\n\t\t\t$quote_id=$missionParams['quote_id'];\n\t\t\t$mission_type=$missionParams['type'];\n\t\t\t$request_verion = $missionParams['version'];\n\t\t\t\n\t\t\t$quote_obj = new Ep_Quote_Quotes();\n\t\t\t$res = $quote_obj->getQuoteDetails($quote_id);\n\t\t\t$current_version = $res[0]['version'];\n\t\t\t\n\t\t\tif($quote_id && $mission_type)\n\t\t\t{\n\t\t\t\tif($mission_type=='seo')\n\t\t\t\t{\n\t\t\t\t\t//getting seo mission details\t\t\t\n\t\t\t\t\t$searchParameters['quote_id']=$quote_id;\n\t\t\t\t\t$searchParameters['misson_user_type']='seo';\n\t\t\t\t\t$quoteMission_obj=new Ep_Quote_QuoteMissions();\n\t\t\t\t\tif($current_version==$request_verion)\n\t\t\t\t\t$seoMissionDetails=$quoteMission_obj->getMissionDetails($searchParameters);\n\t\t\t\t\telse\n\t\t\t\t\t$seoMissionDetails=$quoteMission_obj->getQuoteMissionVersionDetails($quote_id,$request_verion,'seo');\n\t\t\t\t\tif($seoMissionDetails)\n\t\t\t\t\t{\n\t\t\t\t\t\t$s=0;\n\t\t\t\t\t\tforeach($seoMissionDetails as $mission)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t$seoMissionDetails[$s]['product_name'] = $this->seo_product_array[$mission['product']];\n\n\t\t\t\t\t\t\t$seoMissionDetails[$s]['language_source_name'] = $this->getLanguageName($mission['language_source']);\n\t\t\t\t\t\t\t$seoMissionDetails[$s]['language_dest_name'] = $this->getLanguageName($mission['language_dest']);\n\t\t\t\t\t\t\t$seoMissionDetails[$s]['product_type_name']=$this->producttype_array[$mission['product_type']];\n\n\t\t\t\t\t\t\t$client_obj=new Ep_Quote_Client();\n\t\t\t\t\t\t\t$bo_user_details=$client_obj->getQuoteUserDetails($mission['created_by']);\n\t\t\t\t\t\t\t$seoMissionDetails[$s]['seo_user_name']=$bo_user_details[0]['first_name'].' '.$bo_user_details[0]['last_name'];\n\n\t\t\t\t\t\t\t$seoMissionDetails[$s]['comment_time']=time_ago($mission['created_at']);\n\n\n\t\t\t\t\t\t\t$seoMissionDetails[$s]['files'] = array();\n\t\t\t\t\t\t\t$seoMissionDetails[$s]['filenames'] = array();\n\t\t\t\t\t\t\tif($mission['documents_path'])\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t/* $exploded_file_paths = explode(\"|\",$mission['documents_path']);\n\t\t\t\t\t\t\t\t$exploded_file_names = explode(\"|\",$mission['documents_name']);\n\t\t\t\t\t\t\t\t$fccount = 0;\n\t\t\t\t\t\t\t\tforeach($exploded_file_paths as $row):\n\t\t\t\t\t\t\t\t\t$file_path=$this->mission_documents_path.$row;\n\t\t\t\t\t\t\t\t\tif(file_exists($file_path) && !is_dir($file_path))\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t$seoMissionDetails[$s]['files'][]=$row;\n\t\t\t\t\t\t\t\t\t\t$seoMissionDetails[$s]['files_base'][]=basename($row);\n\t\t\t\t\t\t\t\t\t\t$seoMissionDetails[$s]['filenames'][]=$exploded_file_names[$fccount];\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t$fccount++;\n\t\t\t\t\t\t\t\tendforeach; */\n\t\t\t\t\t\t\t\t$filesarray = array('documents_path'=>$mission['documents_path'],'documents_name'=>$mission['documents_name'],'id'=>$mission['identifier'],'delete'=>false);\n\t\t\t\t\t\t\t\t$seoMissionDetails[$s]['files'] = $this->getSeoFiles($filesarray);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t$s++;\n\n\t\t\t\t\t\t}\t\n\t\t\t\t\t\t$this->_view->seoMissionDetails=$seoMissionDetails;\n\t\t\t\t\t\t$this->_view->mission_type='seo';\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telseif($mission_type=='tech')\n\t\t\t\t{\n\t\t\t\t\t//getting tech mission details\n\t\t\t\t\t$tech_obj=new Ep_Quote_TechMissions();\n\t\t\t\t\t$searchParameters['quote_id']=$quote_id;\n\t\t\t\t\tif($current_version==$request_verion)\n\t\t\t\t\t$techMissionDetails=$tech_obj->getTechMissionDetails($searchParameters);\n\t\t\t\t\telse\n\t\t\t\t\t$techMissionDetails=$tech_obj->getQuoteVersionDetails($quote_id,$request_verion);\n\t\t\t\t\tif($techMissionDetails)\n\t\t\t\t\t{\n\t\t\t\t\t\t$t=0;\n\t\t\t\t\t\tforeach($techMissionDetails as $mission)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$client_obj=new Ep_Quote_Client();\n\t\t\t\t\t\t\t$bo_user_details=$client_obj->getQuoteUserDetails($mission['created_by']);\n\t\t\t\t\t\t\t$techMissionDetails[$t]['tech_user_name']=$bo_user_details[0]['first_name'].' '.$bo_user_details[0]['last_name'];\n\n\t\t\t\t\t\t\t$techMissionDetails[$t]['comment_time']=time_ago($mission['created_at']);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t$techMissionDetails[$t]['files'] = \"\";\n\t\t\t\t\t\t\tif($mission['documents_path'])\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t/* $exploded_file_paths = explode(\"|\",$mission['documents_path']);\n\t\t\t\t\t\t\t\t$exploded_file_names = explode(\"|\",$mission['documents_name']);\n\t\t\t\t\t\t\t\t$files = \"\";\n\t\t\t\t\t\t\t\t$k=0;\n\t\t\t\t\t\t\t\tforeach($exploded_file_paths as $row)\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t$file_path=$this->mission_documents_path.$row;\n\t\t\t\t\t\t\t\t\tif(file_exists($file_path) && !is_dir($file_path))\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t$fname = $exploded_file_names[$k];\n\t\t\t\t\t\t\t\t\t\t\tif($fname==\"\")\n\t\t\t\t\t\t\t\t\t\t\t\t$fname = basename($row);\n\t\t\t\t\t\t\t\t\t\t\t$files .= '<div class=\"topset2\"><a href=\"/quote/download-document?type=tech_mission&mission_id='.$mission['identifier'].'&index='.$k.'\">'.$fname.'</a></div>';\n\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t$k++;\n\t\t\t\t\t\t\t\t} */\n\t\t\t\t\t\t\t\t$filesarray = array('documents_path'=>$mission['documents_path'],'documents_name'=>$mission['documents_name'],'id'=>$mission['identifier'],'delete'=>false);\n\t\t\t\t\t\t\t\t$files = $this->getTechFiles($filesarray);\n\t\t\t\t\t\t\t\t$techMissionDetails[$t]['files'] = $files;\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\t$t++;\n\t\t\t\t\t\t}\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t$this->_view->techMissionDetails=$techMissionDetails;\n\t\t\t\t\t\t$this->_view->mission_type='tech';\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telseif($mission_type=='prod')\n\t\t\t\t{\n\t\t\t\t\t//getting mission details\n\t\t\t\t\t$searchParameters['quote_id']=$quote_id;\n\t\t\t\t\t$searchParameters['misson_user_type']='sales';\n\t\t\t\t\t$quoteMission_obj=new Ep_Quote_QuoteMissions();\n\t\t\t\t\tif($current_version==$request_verion)\n\t\t\t\t\t$missonDetails=$quoteMission_obj->getMissionDetails($searchParameters);\n\t\t\t\t\telse\n\t\t\t\t\t$missonDetails=$quoteMission_obj->getQuoteMissionVersionDetails($quote_id,$request_verion,'sales');\n\t\t\t\t\tif($missonDetails)\n\t\t\t\t\t{\n\t\t\t\t\t\t$m=0;\n\t\t\t\t\t\tforeach($missonDetails as $mission)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$missonDetails[$m]['product_name']=$this->product_array[$mission['product']];\t\t\t\n\t\t\t\t\t\t\t$missonDetails[$m]['language_source_name']=$this->getLanguageName($mission['language_source']);\n\t\t\t\t\t\t\t$missonDetails[$m]['product_type_name']=$this->producttype_array[$mission['product_type']];\n\t\t\t\t\t\t\tif($mission['language_dest'])\n\t\t\t\t\t\t\t\t$missonDetails[$m]['language_dest_name']=$this->getLanguageName($mission['language_dest']);\n\n\t\t\t\t\t\t\t$quoteDetails[$q]['missions_list'][$mission['identifier']]='Mission '.($m+1).' - '.$missonDetails[$m]['product_name'];\n\n\t\t\t\t\t\t\t$missonDetails[$m]['comment_time']=time_ago($mission['created_at']);\n\n\n\t\t\t\t\t\t\t//Get seo missions related to a mission\n\t\t\t\t\t\t\t$searchParameters['quote_id']=$quote_id;\n\t\t\t\t\t\t\t$searchParameters['misson_user_type']='seo';\n\t\t\t\t\t\t\t$searchParameters['related_to']=$mission['identifier'];\n\t\t\t\t\t\t\t$searchParameters['product']=$mission['product'];\n\t\t\t\t\t\t\t//echo \"<pre>\";print_r($searchParameters);\n\t\t\t\t\t\t\t$quoteMission_obj=new Ep_Quote_QuoteMissions();\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tif($current_version==$request_verion)\n\t\t\t\t\t\t\t\t$seoMissonDetails=$quoteMission_obj->getMissionDetails($searchParameters);\n\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\t$seoMissonDetails=$quoteMission_obj->getQuoteMissionVersionDetails($quote_id,$request_verion,'seo',true);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t//echo \"<pre>\";print_r($seoMissonDetails);exit;\n\t\t\t\t\t\t\tif($seoMissonDetails)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$s=0;\n\t\t\t\t\t\t\t\tforeach($seoMissonDetails as $smission)\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$client_obj=new Ep_Quote_Client();\n\t\t\t\t\t\t\t\t\t$bo_user_details=$client_obj->getQuoteUserDetails($smission['created_by']);\n\t\t\t\t\t\t\t\t\t$seoMissonDetails[$s]['seo_user_name']=$bo_user_details[0]['first_name'].' '.$bo_user_details[0]['last_name'];\n\n\t\t\t\t\t\t\t\t\t$seoMissonDetails[$s]['comment_time']=time_ago($smission['created_at']);\n\n\t\t\t\t\t\t\t\t\t$prodMissionObj=new Ep_Quote_ProdMissions();\n\n\t\t\t\t\t\t\t\t\t$searchParameters['quote_mission_id']=$smission['identifier'];\n\t\t\t\t\t\t\t\t\tif($current_version==$request_verion)\n\t\t\t\t\t\t\t\t\t$prodMissionDetails=$prodMissionObj->getProdMissionDetails($searchParameters);\n\t\t\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\t\t$prodMissionDetails=$prodMissionObj->getMissionVersionDetails($smission['identifier'],$request_verion);\n\t\t\t\t\t\t\t\t\t//echo \"<pre>\";print_r($prodMissionDetails);exit;\n\n\t\t\t\t\t\t\t\t\tif($prodMissionDetails)\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tif($prodMissionDetails)\n\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\tforeach($prodMissionDetails as $key=>$details)\n\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\t$client_obj=new Ep_Quote_Client();\n\t\t\t\t\t\t\t\t\t\t\t\t$bo_user_details=$client_obj->getQuoteUserDetails($details['created_by']);\n\t\t\t\t\t\t\t\t\t\t\t\t$prodMissionDetails[$key]['prod_user_name']=$bo_user_details[0]['first_name'].' '.$bo_user_details[0]['last_name'];\n\n\t\t\t\t\t\t\t\t\t\t\t\t$prodMissionDetails[$key]['comment_time']=time_ago($details['created_at']);\n\t\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\t\t$seoMissonDetails[$s]['prod_mission_details']=$prodMissionDetails;\n\t\t\t\t\t\t\t\t\t\t}\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t}\t\t\t\t\t\t\t\t\t\t\n\n\t\t\t\t\t\t\t\t\t$s++;\t\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t$missonDetails[$m]['seoMissions']=$seoMissonDetails;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t//echo \"<pre>\";print_r($missonDetails);exit;\n\n\t\t\t\t\t\t\t$prodMissionObj=new Ep_Quote_ProdMissions();\n\n\t\t\t\t\t\t\t$searchParameters['quote_mission_id']=$mission['identifier'];\n\t\t\t\t\t\t\tif($current_version==$request_verion)\n\t\t\t\t\t\t\t$prodMissionDetails=$prodMissionObj->getProdMissionDetails($searchParameters);\n\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\t$prodMissionDetails=$prodMissionObj->getProdVersionCostDetails($mission['identifier'],$request_verion);\n\t\t\t\t\t\t\t//$prodMissionDetails=$prodMissionObj->getProdMissionDetails($searchParameters);\n\t\t\t\t\t\t\t//echo \"<pre>\";print_r($prodMissionDetails);exit;\n\n\t\t\t\t\t\t\tif($prodMissionDetails)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tforeach($prodMissionDetails as $key=>$details)\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t$client_obj=new Ep_Quote_Client();\n\t\t\t\t\t\t\t\t\t$bo_user_details=$client_obj->getQuoteUserDetails($details['created_by']);\n\t\t\t\t\t\t\t\t\t$prodMissionDetails[$key]['prod_user_name']=$bo_user_details[0]['first_name'].' '.$bo_user_details[0]['last_name'];\n\n\t\t\t\t\t\t\t\t\t$prodMissionDetails[$key]['comment_time']=time_ago($details['created_at']);\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t$missonDetails[$m]['prod_mission_details']=$prodMissionDetails;\t\n\t\t\t\t\t\t\t}\t\t\t\t\t\t\t\n\n\t\t\t\t\t\t\t$m++;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$this->_view->prodMissionDetails=$missonDetails;\n\t\t\t\t\t\t$this->_view->mission_type='prod';\n\t\t\t\t\t\t//echo \"<pre>\";print_r($this->_view->prodMissionDetails);\n\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\t//echo \"<pre>\";print_r($missonDetails);exit;\t\t\n\n\t\t\t\t$this->render(\"mission-followup-details\");\t\t\t\t\n\t\t\t}\n\t\t}\t\n\t}", "protected function finalize()\n\t{\n\t\t$presenter = $this->getPresenter();\n\n\t\tif ($this->presenter->isAjax()) {\n\n\t\t\t$presenter->payload->snippets = array();\n\n\t\t\t$html = $this->__toString();\n\n\t\t\t// Remove snippet-div to emulate native snippets... No extra support on client side is needed...\n\t\t\t$snippet = 'snippet-' . $this->getUniqueId() . '-grid';\n\t\t\t$start = strlen('<div id=\"' . $snippet . '\">');\n\t\t\t$stop = -strlen('</div>');\n\t\t\t$html = trim(mb_substr($html, $start, $stop));\n\n\t\t\t// Send snippet\n\t\t\t$presenter->payload->snippets[$snippet] = $html;\n\t\t\t$presenter->sendPayload();\n\t\t\t$presenter->terminate();\n\n\t\t} else {\n\n\t\t\t$presenter->redirect('this');\n\t\t}\n\t}", "public function addContentData()\n\t\t{\n\t\t\t_is_logged_in();\n\n\t\t\t$data = array();\n\n\t\t\tif ($_POST) {\n\n\t\t\t\tforeach ($this->input->post() as $key => $value) {\n\n\t\t\t\t\tif ($key == 'section_name') {\n\t\t\t\t\t\t$data['section_slug'] = url_title(convert_accented_characters($value));\n\t\t\t\t\t}\n\t\t\t\t\t$data[$key] = $value;\n\t\t\t\t}\n\n\t\t\t\t$data['language'] = $this->session->userdata('language');\n\t\t\t}\n\n\t\t\t// Send data\n\t\t\t$query = $this->co_pages_model->add_section($data);\n\n\t\t\tif ($query > 0) {\n\t\t\t\tredirect('admin/co_pages/add_content?action=success');\n\t\t\t} else {\n\t\t\t\tredirect('admin/co_pages/add_content?action=error');\n\t\t\t}\n\n\t\t}", "public function actionDivDataOld()\n\t{\n\t\tYii::app()->divDataImporter->update();\n\t\t//$this->redirect(Yii::app()->homeUrl);\n\t}", "public function performRedirect() {\n // Annoyingly, some old code in StandardController calls checkPersonID\n // instead of performRedirect() on delete, so this doesn't get triggered.\n // This should get fixed with Cake 4.\n \n if(!empty($this->request->params['named']['onFinish'])) {\n $this->redirect(urldecode($this->request->params['named']['onFinish']));\n }\n \n $copersonid = null;\n \n if(!empty($this->viewVars['vv_co_person']['CoPerson']['id'])) {\n $copersonid = $this->viewVars['vv_co_person']['CoPerson']['id'];\n } else {\n // Probably completed an edit() call\n $modelpl = strtolower($this->name);\n $authmodel = $this->modelClass . 'Authenticator';\n \n if(!empty($this->viewVars[$modelpl][0][$this->modelClass]['co_person_id'])) {\n $copersonid = $this->viewVars[$modelpl][0][$this->modelClass]['co_person_id'];\n }\n }\n\n $target = array();\n $target['plugin'] = null;\n $target['controller'] = \"authenticators\";\n $target['action'] = 'status';\n $target['copersonid'] = $copersonid;\n \n $this->redirect($target);\n }", "public function process()\n\t{\n\t\tPhpfox::isUser(true);\n\t\tPhpfox::getUserParam('event.can_create_event', true);\n\t\t\n\t\t$bIsEdit = false;\n\t\t$bIsSetup = ($this->request()->get('req4') == 'setup' ? true : false);\n\t\t$sAction = $this->request()->get('req3');\n\t\t$aCallback = false;\t\t\n\t\t$sModule = $this->request()->get('module', false);\n\t\t$iItem = $this->request()->getInt('item', false);\n\t\t\n\t\tif ($iEditId = $this->request()->get('id'))\n\t\t{\n\t\t\tif (($aEvent = Phpfox::getService('event')->getForEdit($iEditId)))\n\t\t\t{\n\t\t\t\t$bIsEdit = true;\n\t\t\t\t$this->setParam('aEvent', $aEvent);\n\t\t\t\t$this->setParam(array(\n\t\t\t\t\t\t'country_child_value' => $aEvent['country_iso'],\n\t\t\t\t\t\t'country_child_id' => $aEvent['country_child_id']\n\t\t\t\t\t)\n\t\t\t\t);\t\t\t\t\n\t\t\t\t$this->template()->setHeader(array(\n\t\t\t\t\t\t\t'<script type=\"text/javascript\">$Behavior.eventEditCategory = function(){ var aCategories = explode(\\',\\', \\'' . $aEvent['categories'] . '\\'); for (i in aCategories) { $(\\'#js_mp_holder_\\' + aCategories[i]).show(); $(\\'#js_mp_category_item_\\' + aCategories[i]).attr(\\'selected\\', true); } }</script>'\n\t\t\t\t\t\t)\n\t\t\t\t\t)\n\t\t\t\t\t->assign(array(\n\t\t\t\t\t\t'aForms' => $aEvent,\n\t\t\t\t\t\t'aEvent' => $aEvent\n\t\t\t\t\t)\n\t\t\t\t);\n\t\t\t\t\n\t\t\t\tif ($aEvent['module_id'] != 'event')\n\t\t\t\t{\n\t\t\t\t\t$sModule = $aEvent['module_id'];\n\t\t\t\t\t$iItem = $aEvent['item_id'];\t\n\t\t\t\t}\n\t\t\t}\n\t\t}\t\t\n\t\t\n\t\tif ($sModule && $iItem && Phpfox::hasCallback($sModule, 'viewEvent'))\n\t\t{\n\t\t\t$aCallback = Phpfox::callback($sModule . '.viewEvent', $iItem);\t\t\n\t\t\t$this->template()->setBreadcrumb($aCallback['breadcrumb_title'], $aCallback['breadcrumb_home']);\n\t\t\t$this->template()->setBreadcrumb($aCallback['title'], $aCallback['url_home']);\t\t\n\t\t\tif ($sModule == 'pages' && !Phpfox::getService('pages')->hasPerm($iItem, 'event.share_events'))\n\t\t\t{\n\t\t\t\treturn Phpfox_Error::display(Phpfox::getPhrase('event.unable_to_view_this_item_due_to_privacy_settings'));\n\t\t\t}\t\t\t\t\n\t\t}\t\t\n\t\t\n\t\t$aValidation = array(\n\t\t\t'title' => Phpfox::getPhrase('event.provide_a_name_for_this_event'),\n\t\t\t// 'country_iso' => Phpfox::getPhrase('event.provide_a_country_location_for_this_event'),\t\t\t\n\t\t\t'location' => Phpfox::getPhrase('event.provide_a_location_for_this_event')\n\t\t);\n\t\t\n\t\t$oValidator = Phpfox::getLib('validator')->set(array(\n\t\t\t\t'sFormName' => 'js_event_form',\n\t\t\t\t'aParams' => $aValidation\n\t\t\t)\n\t\t);\t\t\n\t\t\n\t\tif ($aVals = $this->request()->get('val'))\n\t\t{\n\t\t\tif ($oValidator->isValid($aVals))\n\t\t\t{\t\t\t\t\n\t\t\t\tif ($bIsEdit)\n\t\t\t\t{\n\t\t\t\t\tif (Phpfox::getService('event.process')->update($aEvent['event_id'], $aVals, $aEvent))\n\t\t\t\t\t{\n\t\t\t\t\t\tswitch ($sAction)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tcase 'customize':\n\t\t\t\t\t\t\t\t$this->url()->send('event.add.invite.setup', array('id' => $aEvent['event_id']), Phpfox::getPhrase('event.successfully_added_a_photo_to_your_event'));\t\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tcase 'invite':\n\t\t\t\t\t\t\t\t$this->url()->permalink('event', $aEvent['event_id'], $aEvent['title'], true, Phpfox::getPhrase('event.successfully_invited_guests_to_this_event'));\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\tdefault:\n\t\t\t\t\t\t\t\t$this->url()->send('event.add', array('id' => $aEvent['event_id']), Phpfox::getPhrase('event.event_successfully_updated'));\t\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\t\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\t$aVals['event_id'] = $aEvent['event_id'];\n\t\t\t\t\t\t$this->template()->assign(array('aForms' => $aVals, 'aEvent' => $aVals));\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse \n\t\t\t\t{\n\t\t\t\t\tif (($iFlood = Phpfox::getUserParam('event.flood_control_events')) !== 0)\n\t\t\t\t\t{\n\t\t\t\t\t\t$aFlood = array(\n\t\t\t\t\t\t\t'action' => 'last_post', // The SPAM action\n\t\t\t\t\t\t\t'params' => array(\n\t\t\t\t\t\t\t\t'field' => 'time_stamp', // The time stamp field\n\t\t\t\t\t\t\t\t'table' => Phpfox::getT('event'), // Database table we plan to check\n\t\t\t\t\t\t\t\t'condition' => 'user_id = ' . Phpfox::getUserId(), // Database WHERE query\n\t\t\t\t\t\t\t\t'time_stamp' => $iFlood * 60 // Seconds);\t\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t);\n\t\t\t\t\t\t\t \t\t\t\n\t\t\t\t\t\t// actually check if flooding\n\t\t\t\t\t\tif (Phpfox::getLib('spam')->check($aFlood))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tPhpfox_Error::set(Phpfox::getPhrase('event.you_are_creating_an_event_a_little_too_soon') . ' ' . Phpfox::getLib('spam')->getWaitTime());\t\n\t\t\t\t\t\t}\n\t\t\t\t\t}\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\tif (Phpfox_Error::isPassed())\n\t\t\t\t\t{\t\n\t\t\t\t\t\tif ($iId = Phpfox::getService('event.process')->add($aVals, ($aCallback !== false ? $sModule : 'event'), ($aCallback !== false ? $iItem : 0)))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$aEvent = Phpfox::getService('event')->getForEdit($iId);\n\t\t\t\t\t\t\t$this->url()->permalink('event', $aEvent['event_id'], $aEvent['title'], true, Phpfox::getPhrase('event.event_successfully_added'));\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t$sStep = (isset($aVals['step']) ? $aVals['step'] : '');\n\t\t\t$sAction = (isset($aVals['action']) ? $aVals['action'] : '');\t\n\t\t\t$this->template()->assign('aForms', $aVals);\t\t\n\t\t}\t\t\n\t\t\n\t\tif ($bIsEdit)\n\t\t{\n\t\t\t$aMenus = array(\n\t\t\t\t'detail' => Phpfox::getPhrase('event.event_details'),\n\t\t\t\t'customize' => Phpfox::getPhrase('event.photo'),\n\t\t\t\t'invite' => Phpfox::getPhrase('event.invite_guests')\n\t\t\t);\n\t\t\t// Dont show the photo upload for iOS\n\t\t\tif ($this->request()->isIOS())\n\t\t\t{\n\t\t\t\tunset($aMenus['customize']);\n\t\t\t}\n\t\t\tif (!$bIsSetup)\n\t\t\t{\n\t\t\t\t$aMenus['manage'] = Phpfox::getPhrase('event.manage_guest_list');\n\t\t\t\t$aMenus['email'] = Phpfox::getPhrase('event.mass_email');\n\t\t\t}\n\t\t\t\n\t\t\t$this->template()->buildPageMenu('js_event_block', \n\t\t\t\t$aMenus,\n\t\t\t\tarray(\n\t\t\t\t\t'link' => $this->url()->permalink('event', $aEvent['event_id'], $aEvent['title']),\n\t\t\t\t\t'phrase' => Phpfox::getPhrase('event.view_this_event')\n\t\t\t\t)\t\t\t\t\n\t\t\t);\t\t\n\t\t}\n\t\t\n\t\t$this->template()->setTitle(($bIsEdit ? Phpfox::getPhrase('event.managing_event') . ': ' . $aEvent['title'] : Phpfox::getPhrase('event.create_an_event')))\n\t\t\t->setFullSite()\t\t\t\n\t\t\t->setBreadcrumb(Phpfox::getPhrase('event.events'), ($aCallback === false ? $this->url()->makeUrl('event') : $this->url()->makeUrl($aCallback['url_home_pages'])))\n\t\t\t->setBreadcrumb(($bIsEdit ? Phpfox::getPhrase('event.managing_event') . ': ' . $aEvent['title'] : Phpfox::getPhrase('event.create_new_event')), ($bIsEdit ? $this->url()->makeUrl('event.add', array('id' => $aEvent['event_id'])) : $this->url()->makeUrl('event.add')), true)\n\t\t\t->setEditor()\n\t\t\t->setPhrase(array(\n\t\t\t\t\t'core.select_a_file_to_upload'\n\t\t\t\t)\n\t\t\t)\t\t\t\t\n\t\t\t->setHeader('cache', array(\t\n\t\t\t\t\t'add.js' => 'module_event',\n\t\t\t\t\t'pager.css' => 'style_css',\n\t\t\t\t\t'progress.js' => 'static_script',\t\t\t\t\t\n\t\t\t\t\t'country.js' => 'module_core'\t\t\t\t\t\n\t\t\t\t)\n\t\t\t)\t\t\t\n\t\t\t->setHeader(array(\n\t\t\t\t\t'<script type=\"text/javascript\">$Behavior.eventProgressBarSettings = function(){ if ($Core.exists(\\'#js_event_block_customize_holder\\')) { oProgressBar = {holder: \\'#js_event_block_customize_holder\\', progress_id: \\'#js_progress_bar\\', uploader: \\'#js_progress_uploader\\', add_more: false, max_upload: 1, total: 1, frame_id: \\'js_upload_frame\\', file_id: \\'image\\'}; $Core.progressBarInit(); } }</script>'\n\t\t\t\t)\n\t\t\t)\n\t\t\t->assign(array(\n\t\t\t\t\t'sCreateJs' => $oValidator->createJS(),\n\t\t\t\t\t'sGetJsForm' => $oValidator->getJsForm(false),\n\t\t\t\t\t'bIsEdit' => $bIsEdit,\n\t\t\t\t\t'bIsSetup' => $bIsSetup,\n\t\t\t\t\t'sCategories' => Phpfox::getService('event.category')->get(),\n\t\t\t\t\t'sModule' => ($aCallback !== false ? $sModule : ''),\n\t\t\t\t\t'iItem' => ($aCallback !== false ? $iItem : ''),\n\t\t\t\t\t'aCallback' => $aCallback,\n\t\t\t\t\t'iMaxFileSize' => (Phpfox::getUserParam('event.max_upload_size_event') === 0 ? null : Phpfox::getLib('phpfox.file')->filesize((Phpfox::getUserParam('event.max_upload_size_event') / 1024) * 1048576)),\n\t\t\t\t\t'bCanSendEmails' => ($bIsEdit ? Phpfox::getService('event')->canSendEmails($aEvent['event_id']) : false),\n\t\t\t\t\t'iCanSendEmailsTime' => ($bIsEdit ? Phpfox::getService('event')->getTimeLeft($aEvent['event_id']) : false),\n\t\t\t\t\t'sJsEventAddCommand' => (isset($aEvent['event_id']) ? \"if (confirm('\" . Phpfox::getPhrase('event.are_you_sure', array('phpfox_squote' => true)) . \"')) { $('#js_submit_upload_image').show(); $('#js_event_upload_image').show(); $('#js_event_current_image').remove(); $.ajaxCall('event.deleteImage', 'id={$aEvent['event_id']}'); } return false;\" : ''),\n\t\t\t\t\t'sTimeSeparator' => Phpfox::getPhrase('event.time_separator')\n\t\t\t\t)\n\t\t\t);\t\t\n\t}" ]
[ "0.7094458", "0.6991951", "0.6317526", "0.59207124", "0.57189757", "0.5639312", "0.56117046", "0.5599136", "0.5483138", "0.5396746", "0.53737026", "0.53411204", "0.53214616", "0.5299686", "0.5290484", "0.5264678", "0.5212563", "0.5202621", "0.51979023", "0.5193097", "0.5186879", "0.51861596", "0.51840395", "0.51840395", "0.51599586", "0.513771", "0.51219785", "0.5120571", "0.5114609", "0.5109608", "0.5098759", "0.5095615", "0.50896347", "0.5088239", "0.5065384", "0.5061953", "0.5060197", "0.5058414", "0.5058162", "0.5052723", "0.50501925", "0.50452375", "0.5044121", "0.5040865", "0.50369364", "0.503268", "0.5031981", "0.5027477", "0.502579", "0.5022564", "0.50164795", "0.5011916", "0.5003901", "0.5003475", "0.4995184", "0.49949518", "0.49809453", "0.49783754", "0.49775732", "0.4968263", "0.4954447", "0.49516305", "0.4946478", "0.49427867", "0.4942332", "0.49413624", "0.493751", "0.49231046", "0.49214503", "0.49133003", "0.49077296", "0.49030852", "0.48976085", "0.48927337", "0.48791975", "0.4878474", "0.48782817", "0.48748907", "0.48721093", "0.48644558", "0.48624536", "0.4858241", "0.48574504", "0.48572457", "0.48527315", "0.48515266", "0.48501602", "0.48501602", "0.48480162", "0.48419493", "0.48358643", "0.48346683", "0.48315108", "0.48307866", "0.48284745", "0.4827928", "0.482542", "0.48211777", "0.48161405", "0.4814767" ]
0.7093815
1
Returns the list of blocks to be automatically added for the newly created course
public function get_default_blocks() { return array( BLOCK_POS_LEFT => array(), BLOCK_POS_RIGHT => array('search_forums', 'news_items', 'calendar_upcoming', 'recent_activity') ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getBlocks(): Collection;", "public function load_blocks_list() {\n $tmp_blocks = apply_filters('wpucacheblocks_blocks', array());\n $blocks = array();\n foreach ($tmp_blocks as $id => $block) {\n /* Path ex : /tpl/header/block.php */\n if (!isset($block['fullpath']) && !isset($block['path'])) {\n /* A path should always be defined */\n continue;\n }\n /* Full path to the file */\n if (!isset($block['fullpath'])) {\n $block['fullpath'] = get_stylesheet_directory() . $block['path'];\n }\n\n /* Reload hooks */\n if (!isset($block['reload_hooks']) || !is_array($block['reload_hooks'])) {\n $block['reload_hooks'] = array();\n } else {\n /* Keep a list of all hooks used */\n foreach ($block['reload_hooks'] as $hook) {\n $this->reload_hooks[$hook] = $hook;\n }\n }\n\n if (!isset($block['minify'])) {\n $block['minify'] = true;\n }\n\n /* Expiration time */\n if (!isset($block['expires'])) {\n $block['expires'] = 3600;\n } else {\n /* Allow infinite lifespan for a cached block ( no front reload ) */\n if ($block['expires'] == 0) {\n $block['expires'] = false;\n }\n }\n $blocks[$id] = $block;\n }\n return $blocks;\n }", "protected function loadBlocks()\n {\n $blocks = [];\n\n if ($pcosBlocks = $this->pcos('blocks')) {\n foreach ($pcosBlocks as $pcos) {\n $blocks[] = $this->newBlock($pcos);\n }\n }\n\n return $this->newBlockCollection($blocks);\n }", "function tammuz_block_info() {\r\n\t$blocks = array();\r\n\t\r\n\r\n\t$blocks['add_journey'] = array(\r\n\t\t// The name that will appear in the block list.\r\n\t\t'info' => t('Add a journey to the customer'),\r\n\t\t// Default setting.\r\n\t\t'cache' => DRUPAL_CACHE_PER_ROLE,\r\n\t);\r\n\treturn $blocks;\r\n}", "public function blocklistAction()\n {\n // Module name\n $name = $this->params('name', '');\n\n $rowset = Pi::model('block')->select(['module' => $name]);\n $blocks = [];\n foreach ($rowset as $row) {\n if ('tab' == $row->type) {\n continue;\n }\n $blocks[] = [\n 'id' => $row->id,\n 'name' => $row->name,\n 'caption' => $row->title,\n 'description' => $row->description,\n ];\n }\n\n return [\n 'status' => 1,\n 'data' => $blocks,\n ];\n }", "public function get_content() {\n global $USER, $COURSE, $CFG, $OUTPUT, $DB;\n\n // If content has already been generated, don't waste time generating it again.\n if ($this->content !== null) {\n return $this->content;\n }\n $this->content = new stdClass;\n $this->content->text = '';\n $this->content->footer = '';\n $blockinstancesonpage = array();\n\n // Guests do not have any progress. Don't show them the block.\n if (!isloggedin() or isguestuser()) {\n return $this->content;\n }\n\n // Draw the multi-bar content for the Dashboard and Front page.\n if (!$CFG->enablecompletion) {\n $this->content->text .= get_string('completion_not_enabled', 'block_courses_available');\n return $this->content;\n }\n\n // Show a message when the user is not enrolled in any courses.\n $courses = enrol_get_my_courses();\n if (($this->page->user_is_editing() || is_siteadmin()) && empty($courses)) {\n $this->content->text = get_string('nocourses', 'block_courses_available');\n return $this->content;\n }\n \n $courseinstances = array();\n \n foreach ($courses as $courseid => $course) {\n // Get specific course completion data\n $completion = new completion_info($course);\n if ($course->visible && $completion->is_enabled()) {\n $context = CONTEXT_COURSE::instance($course->id);\n $params = array('contextid' => $context->id, 'pagetype' => 'course-view-%');\n \n $courseinstance = new stdClass();\n \n $courseinstance->course = $course;\n $courseinstance->activities = block_courses_available_get_activities($course->id);\n $courseinstance->activities = block_courses_available_filter_visibility($courseinstance->activities,\n $USER->id, $course->id);\n \n $courseinstances[] = $courseinstance;\n }\n }\n \n $renderer = $this->page->get_renderer('block_courses_available');\n \n if (!empty($courseinstances)) {\n $toStartTable = array();\n $inProgressTable = array();\n $completedTable = array();\n \n \n $table = new html_table();\n $table->attributes = array('class'=>'availablecoursestable');\n $table->align = array ('left', 'left', 'right', 'right');\n \n foreach ($courseinstances as $courseinstance) {\n $course = get_course($courseinstance->course->id);\n \n $row = array();\n \n $row[] = $renderer->get_course_title($course->fullname);\n \n $row[] = $renderer->get_summary($course);\n \n $submissions = block_courses_available_student_submissions($course->id, $USER->id);\n $completions = block_courses_available_completions($courseinstance->activities, $USER->id, $course, $submissions);\n \n $json = block_courses_available_json(\n $courseinstance->activities,\n $completions,\n $this->config,\n $USER->id,\n $courseid,\n $this->instance->id);\n \n $completion_data = json_decode($json);\n \n $row[] = $renderer->get_course_link($course, $completion_data);\n \n $progress = intval($completion_data->percentage);\n \n if ($progress == 100) {\n $completedTable[] = $row;\n } elseif ($progress == 0) {\n $toStartTable[] = $row;\n } else {\n $inProgressTable[] = $row;\n }\n \n }// foreach\n \n $table->data = array_merge($inProgressTable, $toStartTable, $completedTable);\n $this->content->text = html_writer::table($table);\n }\n \n // Show a message explaining lack of buttons, but only while editing is on.\n if ($this->page->user_is_editing() && $this->content->text == '') {\n $this->content->text = get_string('nocourses', 'block_courses_available');\n }\n\n return $this->content;\n }", "public function get_blocks ()\n {\n return $this->_blocks;\n }", "public function blocks()\n {\n return $this->belongsToMany(Block::class);\n }", "public function getBlocks(): Collection\n {\n return $this->blocks;\n }", "public function getBlocks()\n {\n return $this->blocks;\n }", "public function getBlocks()\n {\n return $this->blocks;\n }", "public function register_blocks() {\n\t\tif ( function_exists( 'register_block_type' ) ) {\n\t\t\tregister_block_type(\n\t\t\t\t\"civil/{$this->slug}\",\n\t\t\t\t[\n\t\t\t\t\t'editor_script' => 'block-js-' . $this->slug,\n\t\t\t\t\t'render_callback' => function( array $attributes ) {\n\t\t\t\t\t\treturn $this->render_block_data( $attributes );\n\t\t\t\t\t},\n\t\t\t\t\t'attributes' => [\n\t\t\t\t\t\t'title' => [\n\t\t\t\t\t\t\t'type' => 'text',\n\t\t\t\t\t\t\t'default' => __( 'CTA Title', 'civil-first-fleet' ),\n\t\t\t\t\t\t],\n\t\t\t\t\t\t'cta_text' => [\n\t\t\t\t\t\t\t'type' => 'text',\n\t\t\t\t\t\t\t'default' => __( 'CTA Description', 'civil-first-fleet' ),\n\t\t\t\t\t\t],\n\t\t\t\t\t\t'cta_button_text' => [\n\t\t\t\t\t\t\t'type' => 'text',\n\t\t\t\t\t\t\t'default' => __( 'CTA Button', 'civil-first-fleet' ),\n\t\t\t\t\t\t],\n\t\t\t\t\t\t'newsletter' => [\n\t\t\t\t\t\t\t'type' => 'boolean',\n\t\t\t\t\t\t],\n\t\t\t\t\t\t'newsletter_list' => [\n\t\t\t\t\t\t\t'type' => 'text',\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\treturn $this;\n\t}", "public function get_block()\n {\n\n\t\tglobal $charset;\n\n \t$column = 2;\n \t$data = array();\n\n\t\t$content = $this->get_content_html();\n\n\t\t$content_html = '\n\t\t\t <div class=\"panel panel-default\" id=\"intro\">\n\t\t\t <div class=\"panel-heading\">\n\t\t\t '.get_lang('SessionsInformation').'\n\t\t\t <div class=\"pull-right\"><a class=\"btn btn-danger btn-xs\" onclick=\"javascript:if(!confirm(\\''.addslashes(api_htmlentities(get_lang('ConfirmYourChoice'),ENT_QUOTES,$charset)).'\\')) return false;\" href=\"index.php?action=disable_block&path='.$this->path.'\">\n\t\t\t <em class=\"fa fa-times\"></em>\n\t\t\t </a></div>\n\t\t\t </div>\n\t\t\t <div class=\"panel-body\">\n\t\t\t\t\t\t\t'.$content.'\n\t\t\t </div>\n\t\t\t </div>\n\t\t\t\t';\n\n \t$data['column'] = $column;\n \t$data['content_html'] = $content_html;\n\n \treturn $data;\n }", "public function blocks() { return $this->_m_blocks; }", "public function register_blocks() {\n\t\t}", "public function blocks()\n {\n return $this->blocks ?: $this->blocks = $this->loadBlocks();\n }", "public function register_cpt_blocks() {\n /* Include CPT creation file */\n //include_once( ILIO_BLOCKS_INCLUDES_DIR . '/blockss.post-type.php' );\n }", "protected function fetchBlocks()\n {\n if (null === $this->blocks)\n {\n $this->blocks = array();\n\n $allBlocks = ContentBlockQuery::create()\n ->find()\n ;\n\n foreach ($allBlocks as $block)\n {\n /* @var $block ContentBlock */\n $this->blocks[$block->getName()][$block->getLocale()] = $block;\n }\n }\n }", "public static function NEW_AREA_BLOCK(){\n\t $SQL_String = \"INSERT INTO area_block VALUES(NULL,:am_id,'new','新增子區','','',:area_load,:accept_max_day,:accept_min_day,:wait_list,'[]',\t:editor,NULL,1,1)\";\n\t return $SQL_String;\n\t}", "public function getBlocks() : array {\n\n\t\t\treturn $this->blocks;\n\t\t}", "public function run()\n {\n \n\n \\DB::table('blocks')->delete();\n \n \\DB::table('blocks')->insert(array (\n 0 => \n array (\n 'sectionID' => 'CHV1SEC1',\n 'blockID' => 'CHV1SEC1BLK1',\n 'dependencyID' => '',\n 'name' => 'HOW MANY STAFF MEMBERS HAVE BEEN TRAINED IN THE FOLLOWING?',\n 'created_at' => '2015-07-18 18:18:47',\n 'updated_at' => '2015-07-18 18:18:47',\n 'deleted_at' => NULL,\n ),\n 1 => \n array (\n 'sectionID' => 'CHV1SEC1',\n 'blockID' => 'CHV1SEC1BLK2',\n 'dependencyID' => '',\n 'name' => 'HEALTH SERVICES',\n 'created_at' => '2015-07-18 18:18:47',\n 'updated_at' => '2015-07-18 18:18:47',\n 'deleted_at' => NULL,\n ),\n 2 => \n array (\n 'sectionID' => 'CHV1SEC1',\n 'blockID' => 'CHV1SEC1BLK3',\n 'dependencyID' => '',\n 'name' => 'INFRASTRUCTURE: IMCI Consultation Room',\n 'created_at' => '2016-03-04 08:55:17',\n 'updated_at' => '2016-03-04 08:55:17',\n 'deleted_at' => NULL,\n ),\n 3 => \n array (\n 'sectionID' => 'CHV1SEC2',\n 'blockID' => 'CHV1SEC2BLK01',\n 'dependencyID' => '',\n 'name' => 'GUIDELINES AND JOBS AIDS AVAILABILITY',\n 'created_at' => '2016-03-04 08:55:17',\n 'updated_at' => '2016-03-04 08:55:17',\n 'deleted_at' => NULL,\n ),\n 4 => \n array (\n 'sectionID' => 'CHV1SEC2',\n 'blockID' => 'CHV1SEC2BLK02',\n 'dependencyID' => '',\n 'name' => 'DOES THE UNIT HAVE THE FOLOWING TOOLS?',\n 'created_at' => '2016-03-04 08:55:17',\n 'updated_at' => '2016-03-04 08:55:17',\n 'deleted_at' => NULL,\n ),\n 5 => \n array (\n 'sectionID' => 'CHV1SEC2',\n 'blockID' => 'CHV1SEC2BLK03',\n 'dependencyID' => '',\n 'name' => 'TOTAL U5 CHILDREN SEEN IN THE LAST 1 MONTH',\n 'created_at' => '2016-03-04 08:55:17',\n 'updated_at' => '2016-03-04 08:55:17',\n 'deleted_at' => NULL,\n ),\n 6 => \n array (\n 'sectionID' => 'CHV1SEC2',\n 'blockID' => 'CHV1SEC2BLK04',\n 'dependencyID' => '',\n 'name' => 'ARE THE FOLLOWING DANGER SIGNS ASSESSED IN ONGOING SESSION FOR A CHILD',\n 'created_at' => '2016-03-04 08:55:17',\n 'updated_at' => '2016-03-04 08:55:17',\n 'deleted_at' => NULL,\n ),\n 7 => \n array (\n 'sectionID' => 'CHV1SEC2',\n 'blockID' => 'CHV1SEC2BLK05',\n 'dependencyID' => '',\n 'name' => 'ASSESSMENT FOR THE MAIN SYMPTOMS IN AN ONGOING SESSION FOR A CHILD',\n 'created_at' => '2016-03-04 08:55:17',\n 'updated_at' => '2016-03-04 08:55:17',\n 'deleted_at' => NULL,\n ),\n 8 => \n array (\n 'sectionID' => 'CHV1SEC2',\n 'blockID' => 'CHV1SEC2BLK06',\n 'dependencyID' => 'CHV1SEC2BLK5RW02COL02chsyes_no1',\n 'name' => 'Coughing/Difficulty Breathing',\n 'created_at' => '2016-03-04 08:55:17',\n 'updated_at' => '2016-03-04 08:55:17',\n 'deleted_at' => NULL,\n ),\n 9 => \n array (\n 'sectionID' => 'CHV1SEC2',\n 'blockID' => 'CHV1SEC2BLK07',\n 'dependencyID' => '',\n 'name' => '',\n 'created_at' => '2016-03-04 08:55:17',\n 'updated_at' => '2016-03-04 08:55:17',\n 'deleted_at' => NULL,\n ),\n 10 => \n array (\n 'sectionID' => 'CHV1SEC2',\n 'blockID' => 'CHV1SEC2BLK08',\n 'dependencyID' => 'CHV1SEC2BLK7RW02COL02chsyes_no1',\n 'name' => 'Diarrhoea',\n 'created_at' => '2016-03-04 08:55:17',\n 'updated_at' => '2016-03-04 08:55:17',\n 'deleted_at' => NULL,\n ),\n 11 => \n array (\n 'sectionID' => 'CHV1SEC2',\n 'blockID' => 'CHV1SEC2BLK09',\n 'dependencyID' => '',\n 'name' => '',\n 'created_at' => '2016-03-04 08:55:17',\n 'updated_at' => '2016-03-04 08:55:17',\n 'deleted_at' => NULL,\n ),\n 12 => \n array (\n 'sectionID' => 'CHV1SEC2',\n 'blockID' => 'CHV1SEC2BLK10',\n 'dependencyID' => 'CHV1SEC2BLK9RW02COL02chsyes_no1',\n 'name' => 'Fever',\n 'created_at' => '2016-03-04 08:55:17',\n 'updated_at' => '2016-03-04 08:55:17',\n 'deleted_at' => NULL,\n ),\n 13 => \n array (\n 'sectionID' => 'CHV1SEC2',\n 'blockID' => 'CHV1SEC2BLK11',\n 'dependencyID' => '',\n 'name' => '',\n 'created_at' => '2016-03-04 08:55:17',\n 'updated_at' => '2016-03-04 08:55:17',\n 'deleted_at' => NULL,\n ),\n 14 => \n array (\n 'sectionID' => 'CHV1SEC2',\n 'blockID' => 'CHV1SEC2BLK12',\n 'dependencyID' => 'CHV1SEC2BLK11RW02COL02chsyes_no1',\n 'name' => 'Ear Infection',\n 'created_at' => '2016-03-04 08:55:17',\n 'updated_at' => '2016-03-04 08:55:17',\n 'deleted_at' => NULL,\n ),\n 15 => \n array (\n 'sectionID' => 'CHV1SEC3',\n 'blockID' => 'CHV1SEC3BLK1',\n 'dependencyID' => '',\n 'name' => 'Malnutrition',\n 'created_at' => '2016-03-04 08:55:17',\n 'updated_at' => '2016-03-04 08:55:17',\n 'deleted_at' => NULL,\n ),\n 16 => \n array (\n 'sectionID' => 'CHV1SEC3',\n 'blockID' => 'CHV1SEC3BLK2',\n 'dependencyID' => '',\n 'name' => 'Anaemia',\n 'created_at' => '2016-03-04 08:55:17',\n 'updated_at' => '2016-03-04 08:55:17',\n 'deleted_at' => NULL,\n ),\n 17 => \n array (\n 'sectionID' => 'CHV1SEC3',\n 'blockID' => 'CHV1SEC3BLK3',\n 'dependencyID' => '',\n 'name' => 'Condition',\n 'created_at' => '2016-03-04 08:55:17',\n 'updated_at' => '2016-03-04 08:55:17',\n 'deleted_at' => NULL,\n ),\n 18 => \n array (\n 'sectionID' => 'CHV1SEC4',\n 'blockID' => 'CHV1SEC4BLK1',\n 'dependencyID' => '',\n 'name' => 'MAIN SUPPLIER',\n 'created_at' => '2016-03-04 08:55:17',\n 'updated_at' => '2016-03-04 08:55:17',\n 'deleted_at' => NULL,\n ),\n 19 => \n array (\n 'sectionID' => 'CHV1SEC4',\n 'blockID' => 'CHV1SEC4BLK2',\n 'dependencyID' => '',\n 'name' => 'INDICATE AVAILABILITY, LOCATION, SUPPLIER AND QUANTITIES ON HAND OF THE FOLLOWING COMMODITIES',\n 'created_at' => '2016-03-04 08:55:17',\n 'updated_at' => '2016-03-04 08:55:17',\n 'deleted_at' => NULL,\n ),\n 20 => \n array (\n 'sectionID' => 'CHV1SEC4',\n 'blockID' => 'CHV1SEC4BLK3',\n 'dependencyID' => '',\n 'name' => 'MAIN SUPPLIER',\n 'created_at' => '2016-03-04 08:55:17',\n 'updated_at' => '2016-03-04 08:55:17',\n 'deleted_at' => NULL,\n ),\n 21 => \n array (\n 'sectionID' => 'CHV1SEC4',\n 'blockID' => 'CHV1SEC4BLK4',\n 'dependencyID' => '',\n 'name' => 'INDICATE AVAILABILITY, LOCATION, SUPPLIER AND QUANTITIES ON HAND OF THE FOLLOWING COMMODITIES',\n 'created_at' => '2016-03-04 08:55:17',\n 'updated_at' => '2016-03-04 08:55:17',\n 'deleted_at' => NULL,\n ),\n 22 => \n array (\n 'sectionID' => 'CHV1SEC5',\n 'blockID' => 'CHV1SEC5BLK1',\n 'dependencyID' => '',\n 'name' => '',\n 'created_at' => '2016-03-04 08:55:17',\n 'updated_at' => '2016-03-04 08:55:17',\n 'deleted_at' => NULL,\n ),\n 23 => \n array (\n 'sectionID' => 'CHV1SEC5',\n 'blockID' => 'CHV1SEC5BLK2',\n 'dependencyID' => '',\n 'name' => 'ORAL REHYDRATION THERAPY CORNER ASSESSMENT',\n 'created_at' => '2016-03-04 08:55:17',\n 'updated_at' => '2016-03-04 08:55:17',\n 'deleted_at' => NULL,\n ),\n 24 => \n array (\n 'sectionID' => 'CHV1SEC6',\n 'blockID' => 'CHV1SEC6BLK1',\n 'dependencyID' => '',\n 'name' => 'INDICATE THE AVAILABILITY, LOCATION AND FUNCTIONALITY OF THE FOLLOWING EQUIPMENT AT THE ORT CORNER',\n 'created_at' => '2016-03-04 08:55:17',\n 'updated_at' => '2016-03-04 08:55:17',\n 'deleted_at' => NULL,\n ),\n 25 => \n array (\n 'sectionID' => 'CHV1SEC7',\n 'blockID' => 'CHV1SEC7BLK1',\n 'dependencyID' => '',\n 'name' => 'MAIN SUPPLIER',\n 'created_at' => '2016-03-04 08:55:17',\n 'updated_at' => '2016-03-04 08:55:17',\n 'deleted_at' => NULL,\n ),\n 26 => \n array (\n 'sectionID' => 'CHV1SEC7',\n 'blockID' => 'CHV1SEC7BLK2',\n 'dependencyID' => '',\n 'name' => 'INDICATE THE AVAILABILITY OF THE FOLLOWING SUPPLIES',\n 'created_at' => '2016-03-04 08:55:17',\n 'updated_at' => '2016-03-04 08:55:17',\n 'deleted_at' => NULL,\n ),\n 27 => \n array (\n 'sectionID' => 'CHV1SEC8',\n 'blockID' => 'CHV1SEC8BLK1',\n 'dependencyID' => '',\n 'name' => 'MAIN SUPPLIER',\n 'created_at' => '2016-03-04 08:55:17',\n 'updated_at' => '2016-03-04 08:55:17',\n 'deleted_at' => NULL,\n ),\n 28 => \n array (\n 'sectionID' => 'CHV1SEC8',\n 'blockID' => 'CHV1SEC8BLK2',\n 'dependencyID' => '',\n 'name' => 'INDICATE THE AVAILABILITY AND LOCATION OF THE FOLLOWING RESOURCES',\n 'created_at' => '2016-03-04 08:55:17',\n 'updated_at' => '2016-03-04 08:55:17',\n 'deleted_at' => NULL,\n ),\n 29 => \n array (\n 'sectionID' => 'CHV1SEC9',\n 'blockID' => 'CHV1SEC9BLK1',\n 'dependencyID' => '',\n 'name' => 'COMMUNITY STRATEGY',\n 'created_at' => '2016-03-04 08:55:17',\n 'updated_at' => '2016-03-04 08:55:17',\n 'deleted_at' => NULL,\n ),\n 30 => \n array (\n 'sectionID' => 'CHV2SEC1',\n 'blockID' => 'CHV2SEC1BLK1',\n 'dependencyID' => '',\n 'name' => 'H',\n 'created_at' => '2015-07-18 18:18:47',\n 'updated_at' => '2015-07-18 18:18:47',\n 'deleted_at' => NULL,\n ),\n 31 => \n array (\n 'sectionID' => 'CHV2SEC1',\n 'blockID' => 'CHV2SEC1BLK2',\n 'dependencyID' => '',\n 'name' => 'H',\n 'created_at' => '2015-07-18 18:18:47',\n 'updated_at' => '2015-07-18 18:18:47',\n 'deleted_at' => NULL,\n ),\n 32 => \n array (\n 'sectionID' => 'CHV2SEC2',\n 'blockID' => 'CHV2SEC2BLK1',\n 'dependencyID' => '',\n 'name' => 'GUIDELINES AND JOBS AIDS AVAILABILITY',\n 'created_at' => '2016-03-04 08:55:17',\n 'updated_at' => '2016-03-04 08:55:17',\n 'deleted_at' => NULL,\n ),\n 33 => \n array (\n 'sectionID' => 'CHV2SEC2',\n 'blockID' => 'CHV2SEC2BLK2',\n 'dependencyID' => '',\n 'name' => 'DOES THE UNIT HAVE THE FOLOWING TOOLS?',\n 'created_at' => '2016-03-04 08:55:17',\n 'updated_at' => '2016-03-04 08:55:17',\n 'deleted_at' => NULL,\n ),\n 34 => \n array (\n 'sectionID' => 'CHV2SEC3',\n 'blockID' => 'CHV2SEC3BLK96A',\n 'dependencyID' => '',\n 'name' => '',\n 'created_at' => '2016-03-04 08:55:17',\n 'updated_at' => '2016-03-04 08:55:17',\n 'deleted_at' => NULL,\n ),\n 35 => \n array (\n 'sectionID' => 'CHV2SEC3',\n 'blockID' => 'CHV2SEC3BLK96D',\n 'dependencyID' => 'CHV2SEC3BLK96ARW01COL02chsyes_no1',\n 'name' => '2015',\n 'created_at' => '2016-03-04 08:55:17',\n 'updated_at' => '2016-03-04 08:55:17',\n 'deleted_at' => NULL,\n ),\n 36 => \n array (\n 'sectionID' => 'CHV2SEC3',\n 'blockID' => 'CHV2SEC3BLK97A',\n 'dependencyID' => 'CHV2SEC3BLK96ARW01COL02chsyes_no1',\n 'name' => '',\n 'created_at' => '2016-03-04 08:55:17',\n 'updated_at' => '2016-03-04 08:55:17',\n 'deleted_at' => NULL,\n ),\n 37 => \n array (\n 'sectionID' => 'CHV2SEC3',\n 'blockID' => 'CHV2SEC3BLK97D',\n 'dependencyID' => 'CHV2SEC3BLK97ARW01COL02chsyes_no1',\n 'name' => '2014',\n 'created_at' => '2016-03-04 08:55:17',\n 'updated_at' => '2016-03-04 08:55:17',\n 'deleted_at' => NULL,\n ),\n 38 => \n array (\n 'sectionID' => 'CHV2SEC3',\n 'blockID' => 'CHV2SEC3BLK98A',\n 'dependencyID' => 'CHV2SEC3BLK97ARW01COL02chsyes_no1',\n 'name' => '',\n 'created_at' => '2016-03-04 08:55:17',\n 'updated_at' => '2016-03-04 08:55:17',\n 'deleted_at' => NULL,\n ),\n 39 => \n array (\n 'sectionID' => 'CHV2SEC3',\n 'blockID' => 'CHV2SEC3BLK98D',\n 'dependencyID' => 'CHV2SEC3BLK98ARW01COL02chsyes_no1',\n 'name' => '2013',\n 'created_at' => '2016-03-04 08:55:17',\n 'updated_at' => '2016-03-04 08:55:17',\n 'deleted_at' => NULL,\n ),\n 40 => \n array (\n 'sectionID' => 'CHV2SEC3',\n 'blockID' => 'CHV2SEC3BLK99A',\n 'dependencyID' => 'CHV2SEC3BLK98ARW01COL02chsyes_no1',\n 'name' => '',\n 'created_at' => '2016-03-04 08:55:17',\n 'updated_at' => '2016-03-04 08:55:17',\n 'deleted_at' => NULL,\n ),\n 41 => \n array (\n 'sectionID' => 'CHV2SEC3',\n 'blockID' => 'CHV2SEC3BLK99D',\n 'dependencyID' => 'CHV2SEC3BLK99ARW01COL02chsyes_no1',\n 'name' => '2012',\n 'created_at' => '2016-03-04 08:55:17',\n 'updated_at' => '2016-03-04 08:55:17',\n 'deleted_at' => NULL,\n ),\n 42 => \n array (\n 'sectionID' => 'CHV2SEC4',\n 'blockID' => 'CHV2SEC4BLK1',\n 'dependencyID' => '',\n 'name' => 'MAIN SUPPLIER',\n 'created_at' => '2016-03-04 08:55:17',\n 'updated_at' => '2016-03-04 08:55:17',\n 'deleted_at' => NULL,\n ),\n 43 => \n array (\n 'sectionID' => 'CHV2SEC4',\n 'blockID' => 'CHV2SEC4BLK2',\n 'dependencyID' => '',\n 'name' => 'INDICATE THE AVAILABILITY AND MAIN REASON FOR UNAVAILABILITY FOR THE COMMODITIES BELOW',\n 'created_at' => '2016-03-04 08:55:17',\n 'updated_at' => '2016-03-04 08:55:17',\n 'deleted_at' => NULL,\n ),\n 44 => \n array (\n 'sectionID' => 'CHV2SEC5',\n 'blockID' => 'CHV2SEC5BLK1',\n 'dependencyID' => '',\n 'name' => 'ORAL REHYDRATION THERAPY CORNER ASSESSMENT',\n 'created_at' => '2016-03-04 08:55:17',\n 'updated_at' => '2016-03-04 08:55:17',\n 'deleted_at' => NULL,\n ),\n 45 => \n array (\n 'sectionID' => 'CHV2SEC6',\n 'blockID' => 'CHV2SEC6BLK1',\n 'dependencyID' => '',\n 'name' => 'MAIN SUPPLIER',\n 'created_at' => '2016-03-04 08:55:17',\n 'updated_at' => '2016-03-04 08:55:17',\n 'deleted_at' => NULL,\n ),\n 46 => \n array (\n 'sectionID' => 'CHV2SEC6',\n 'blockID' => 'CHV2SEC6BLK2',\n 'dependencyID' => '',\n 'name' => 'INDICATE THE AVAILABILITY OF THE FOLLOWING SUPPLIES',\n 'created_at' => '2016-03-04 08:55:17',\n 'updated_at' => '2016-03-04 08:55:17',\n 'deleted_at' => NULL,\n ),\n 47 => \n array (\n 'sectionID' => 'CHV2SEC7',\n 'blockID' => 'CHV2SEC7BLK1',\n 'dependencyID' => '',\n 'name' => 'MAIN SUPPLIER',\n 'created_at' => '2016-03-04 08:55:17',\n 'updated_at' => '2016-03-04 08:55:17',\n 'deleted_at' => NULL,\n ),\n 48 => \n array (\n 'sectionID' => 'CHV2SEC7',\n 'blockID' => 'CHV2SEC7BLK2',\n 'dependencyID' => '',\n 'name' => 'INDICATE THE AVAILABILITY AND LOCATION OF THE FOLLOWING RESOURCES',\n 'created_at' => '2016-03-04 08:55:17',\n 'updated_at' => '2016-03-04 08:55:17',\n 'deleted_at' => NULL,\n ),\n 49 => \n array (\n 'sectionID' => 'CHV2SEC8',\n 'blockID' => 'CHV2SEC8BLK1',\n 'dependencyID' => '',\n 'name' => 'COMMUNITY STRATEGY',\n 'created_at' => '2016-03-04 08:55:17',\n 'updated_at' => '2016-03-04 08:55:17',\n 'deleted_at' => NULL,\n ),\n 50 => \n array (\n 'sectionID' => 'IMCIV1SEC1',\n 'blockID' => 'IMCIV1SEC1BLK4',\n 'dependencyID' => '',\n 'name' => 'HCW Profile',\n 'created_at' => '2016-03-04 08:55:17',\n 'updated_at' => '2016-03-04 08:55:17',\n 'deleted_at' => NULL,\n ),\n 51 => \n array (\n 'sectionID' => 'IMCIV1SEC1',\n 'blockID' => 'IMCIV1SEC1BLK5',\n 'dependencyID' => '',\n 'name' => 'Work Station Profile',\n 'created_at' => '2016-03-04 08:55:17',\n 'updated_at' => '2016-03-04 08:55:17',\n 'deleted_at' => NULL,\n ),\n 52 => \n array (\n 'sectionID' => 'IMCIV1SEC2',\n 'blockID' => 'IMCIV1SEC2BLK1',\n 'dependencyID' => '',\n 'name' => 'Child Profile',\n 'created_at' => '2016-03-04 08:55:17',\n 'updated_at' => '2016-03-04 08:55:17',\n 'deleted_at' => NULL,\n ),\n 53 => \n array (\n 'sectionID' => 'IMCIV1SEC2',\n 'blockID' => 'IMCIV1SEC2BLK2',\n 'dependencyID' => '',\n 'name' => 'Are the following Services Offered to a child?',\n 'created_at' => '2016-03-04 08:55:17',\n 'updated_at' => '2016-03-04 08:55:17',\n 'deleted_at' => NULL,\n ),\n 54 => \n array (\n 'sectionID' => 'IMCIV1SEC2',\n 'blockID' => 'IMCIV1SEC2BLK3',\n 'dependencyID' => '',\n 'name' => 'Are the following Danger Signs assessed in ongoing session for a child?',\n 'created_at' => '2016-03-04 08:55:17',\n 'updated_at' => '2016-03-04 08:55:17',\n 'deleted_at' => NULL,\n ),\n 55 => \n array (\n 'sectionID' => 'IMCIV1SEC3',\n 'blockID' => 'IMCIV1SEC3BLK01',\n 'dependencyID' => '',\n 'name' => 'Assessment of the main Symptoms in an ongoing session for a child',\n 'created_at' => '2016-03-04 08:55:17',\n 'updated_at' => '2016-03-04 08:55:17',\n 'deleted_at' => NULL,\n ),\n 56 => \n array (\n 'sectionID' => 'IMCIV1SEC3',\n 'blockID' => 'IMCIV1SEC3BLK02',\n 'dependencyID' => 'IMCIV1SEC3BLK1RW02COL02ztyes_no1',\n 'name' => '',\n 'created_at' => '2016-03-04 08:55:17',\n 'updated_at' => '2016-03-04 08:55:17',\n 'deleted_at' => NULL,\n ),\n 57 => \n array (\n 'sectionID' => 'IMCIV1SEC3',\n 'blockID' => 'IMCIV1SEC3BLK03',\n 'dependencyID' => '',\n 'name' => '',\n 'created_at' => '2016-03-04 08:55:17',\n 'updated_at' => '2016-03-04 08:55:17',\n 'deleted_at' => NULL,\n ),\n 58 => \n array (\n 'sectionID' => 'IMCIV1SEC3',\n 'blockID' => 'IMCIV1SEC3BLK04',\n 'dependencyID' => 'IMCIV1SEC3BLK3RW02COL02ztyes_no1',\n 'name' => '',\n 'created_at' => '2016-03-04 08:55:17',\n 'updated_at' => '2016-03-04 08:55:17',\n 'deleted_at' => NULL,\n ),\n 59 => \n array (\n 'sectionID' => 'IMCIV1SEC3',\n 'blockID' => 'IMCIV1SEC3BLK05',\n 'dependencyID' => '',\n 'name' => '',\n 'created_at' => '2016-03-04 08:55:17',\n 'updated_at' => '2016-03-04 08:55:17',\n 'deleted_at' => NULL,\n ),\n 60 => \n array (\n 'sectionID' => 'IMCIV1SEC3',\n 'blockID' => 'IMCIV1SEC3BLK06',\n 'dependencyID' => 'IMCIV1SEC3BLK5RW02COL02ztyes_no1',\n 'name' => '',\n 'created_at' => '2016-03-04 08:55:17',\n 'updated_at' => '2016-03-04 08:55:17',\n 'deleted_at' => NULL,\n ),\n 61 => \n array (\n 'sectionID' => 'IMCIV1SEC3',\n 'blockID' => 'IMCIV1SEC3BLK07',\n 'dependencyID' => '',\n 'name' => '',\n 'created_at' => '2016-03-04 08:55:17',\n 'updated_at' => '2016-03-04 08:55:17',\n 'deleted_at' => NULL,\n ),\n 62 => \n array (\n 'sectionID' => 'IMCIV1SEC3',\n 'blockID' => 'IMCIV1SEC3BLK08',\n 'dependencyID' => 'IMCIV1SEC3BLK7RW02COL02ztyes_no1',\n 'name' => '',\n 'created_at' => '2016-03-04 08:55:17',\n 'updated_at' => '2016-03-04 08:55:17',\n 'deleted_at' => NULL,\n ),\n 63 => \n array (\n 'sectionID' => 'IMCIV1SEC3',\n 'blockID' => 'IMCIV1SEC3BLK09',\n 'dependencyID' => '',\n 'name' => '5A. Feeding Problem',\n 'created_at' => '2016-03-04 08:55:17',\n 'updated_at' => '2016-03-04 08:55:17',\n 'deleted_at' => NULL,\n ),\n 64 => \n array (\n 'sectionID' => 'IMCIV1SEC3',\n 'blockID' => 'IMCIV1SEC3BLK10',\n 'dependencyID' => '',\n 'name' => '5B. Weight',\n 'created_at' => '2016-03-04 08:55:17',\n 'updated_at' => '2016-03-04 08:55:17',\n 'deleted_at' => NULL,\n ),\n 65 => \n array (\n 'sectionID' => 'IMCIV1SEC3',\n 'blockID' => 'IMCIV1SEC3BLK11',\n 'dependencyID' => '',\n 'name' => '6. Special Treatment Needs',\n 'created_at' => '2016-03-04 08:55:17',\n 'updated_at' => '2016-03-04 08:55:17',\n 'deleted_at' => NULL,\n ),\n 66 => \n array (\n 'sectionID' => 'IMCIV1SEC4',\n 'blockID' => 'IMCIV1SEC4BLK01',\n 'dependencyID' => '',\n 'name' => '',\n 'created_at' => '2016-03-04 08:55:17',\n 'updated_at' => '2016-03-04 08:55:17',\n 'deleted_at' => NULL,\n ),\n 67 => \n array (\n 'sectionID' => 'IMCIV1SEC4',\n 'blockID' => 'IMCIV1SEC4BLK02',\n 'dependencyID' => 'IMCIV1SEC4BLK1RW01COL02ztyes_no1',\n 'name' => '',\n 'created_at' => '2016-03-04 08:55:17',\n 'updated_at' => '2016-03-04 08:55:17',\n 'deleted_at' => NULL,\n ),\n 68 => \n array (\n 'sectionID' => 'IMCIV1SEC4',\n 'blockID' => 'IMCIV1SEC4BLK03',\n 'dependencyID' => '',\n 'name' => '',\n 'created_at' => '2016-03-04 08:55:17',\n 'updated_at' => '2016-03-04 08:55:17',\n 'deleted_at' => NULL,\n ),\n 69 => \n array (\n 'sectionID' => 'IMCIV1SEC4',\n 'blockID' => 'IMCIV1SEC4BLK04',\n 'dependencyID' => 'IMCIV1SEC4BLK3RW01COL02ztyes_no1',\n 'name' => '',\n 'created_at' => '2016-03-04 08:55:17',\n 'updated_at' => '2016-03-04 08:55:17',\n 'deleted_at' => NULL,\n ),\n 70 => \n array (\n 'sectionID' => 'IMCIV1SEC4',\n 'blockID' => 'IMCIV1SEC4BLK05',\n 'dependencyID' => '',\n 'name' => '',\n 'created_at' => '2016-03-04 08:55:17',\n 'updated_at' => '2016-03-04 08:55:17',\n 'deleted_at' => NULL,\n ),\n 71 => \n array (\n 'sectionID' => 'IMCIV1SEC4',\n 'blockID' => 'IMCIV1SEC4BLK06',\n 'dependencyID' => 'IMCIV1SEC4BLK5RW01COL02ztyes_no1',\n 'name' => '',\n 'created_at' => '2016-03-04 08:55:17',\n 'updated_at' => '2016-03-04 08:55:17',\n 'deleted_at' => NULL,\n ),\n 72 => \n array (\n 'sectionID' => 'IMCIV1SEC4',\n 'blockID' => 'IMCIV1SEC4BLK07',\n 'dependencyID' => '',\n 'name' => '',\n 'created_at' => '2016-03-04 08:55:17',\n 'updated_at' => '2016-03-04 08:55:17',\n 'deleted_at' => NULL,\n ),\n 73 => \n array (\n 'sectionID' => 'IMCIV1SEC4',\n 'blockID' => 'IMCIV1SEC4BLK08',\n 'dependencyID' => 'IMCIV1SEC4BLK7RW01COL02ztyes_no1',\n 'name' => '',\n 'created_at' => '2016-03-04 08:55:17',\n 'updated_at' => '2016-03-04 08:55:17',\n 'deleted_at' => NULL,\n ),\n 74 => \n array (\n 'sectionID' => 'IMCIV1SEC4',\n 'blockID' => 'IMCIV1SEC4BLK10',\n 'dependencyID' => '',\n 'name' => '5A. Feeding Problem',\n 'created_at' => '2016-03-04 08:55:17',\n 'updated_at' => '2016-03-04 08:55:17',\n 'deleted_at' => NULL,\n ),\n 75 => \n array (\n 'sectionID' => 'IMCIV1SEC4',\n 'blockID' => 'IMCIV1SEC4BLK11',\n 'dependencyID' => '',\n 'name' => '5B. Weight',\n 'created_at' => '2016-03-04 08:55:17',\n 'updated_at' => '2016-03-04 08:55:17',\n 'deleted_at' => NULL,\n ),\n 76 => \n array (\n 'sectionID' => 'IMCIV1SEC4',\n 'blockID' => 'IMCIV1SEC4BLK12',\n 'dependencyID' => '',\n 'name' => '6. Special Treatment Needs',\n 'created_at' => '2016-03-04 08:55:17',\n 'updated_at' => '2016-03-04 08:55:17',\n 'deleted_at' => NULL,\n ),\n 77 => \n array (\n 'sectionID' => 'IMCIV1SEC5',\n 'blockID' => 'IMCIV1SEC5BLK1',\n 'dependencyID' => '',\n 'name' => 'MALNUTRITION',\n 'created_at' => '2016-03-04 08:55:17',\n 'updated_at' => '2016-03-04 08:55:17',\n 'deleted_at' => NULL,\n ),\n 78 => \n array (\n 'sectionID' => 'IMCIV1SEC5',\n 'blockID' => 'IMCIV1SEC5BLK2',\n 'dependencyID' => '',\n 'name' => 'ANAEMIA',\n 'created_at' => '2016-03-04 08:55:17',\n 'updated_at' => '2016-03-04 08:55:17',\n 'deleted_at' => NULL,\n ),\n 79 => \n array (\n 'sectionID' => 'IMCIV1SEC5',\n 'blockID' => 'IMCIV1SEC5BLK3',\n 'dependencyID' => '',\n 'name' => 'CONDITION',\n 'created_at' => '2016-03-04 08:55:17',\n 'updated_at' => '2016-03-04 08:55:17',\n 'deleted_at' => NULL,\n ),\n 80 => \n array (\n 'sectionID' => 'IMCIV1SEC5',\n 'blockID' => 'IMCIV1SEC5BLK4',\n 'dependencyID' => '',\n 'name' => 'TREATMENT AND COUNSELLING',\n 'created_at' => '2016-03-04 08:55:17',\n 'updated_at' => '2016-03-04 08:55:17',\n 'deleted_at' => NULL,\n ),\n 81 => \n array (\n 'sectionID' => 'IMCIV1SEC6',\n 'blockID' => 'IMCIV1SEC6BLK1',\n 'dependencyID' => '',\n 'name' => 'Consultation Observation',\n 'created_at' => '2016-03-04 08:55:17',\n 'updated_at' => '2016-03-04 08:55:17',\n 'deleted_at' => NULL,\n ),\n 82 => \n array (\n 'sectionID' => 'IMCIV1SEC6',\n 'blockID' => 'IMCIV1SEC6BLK2',\n 'dependencyID' => '',\n 'name' => 'Exit Interview with Caregiver',\n 'created_at' => '2016-03-04 08:55:17',\n 'updated_at' => '2016-03-04 08:55:17',\n 'deleted_at' => NULL,\n ),\n 83 => \n array (\n 'sectionID' => 'IMCIV1SEC6',\n 'blockID' => 'IMCIV1SEC6BLK3',\n 'dependencyID' => '',\n 'name' => 'Assessment Outcome',\n 'created_at' => '2016-03-04 08:55:17',\n 'updated_at' => '2016-03-04 08:55:17',\n 'deleted_at' => NULL,\n ),\n 84 => \n array (\n 'sectionID' => 'IMCIV1SEC6',\n 'blockID' => 'IMCIV1SEC6BLK4',\n 'dependencyID' => '',\n 'name' => 'Criteria For Certification : Section A',\n 'created_at' => '2016-03-04 08:55:17',\n 'updated_at' => '2016-03-04 08:55:17',\n 'deleted_at' => NULL,\n ),\n 85 => \n array (\n 'sectionID' => 'IMCIV1SEC6',\n 'blockID' => 'IMCIV1SEC6BLK5',\n 'dependencyID' => '',\n 'name' => 'Checked For The Following: Section B',\n 'created_at' => '2016-03-04 08:55:17',\n 'updated_at' => '2016-03-04 08:55:17',\n 'deleted_at' => NULL,\n ),\n 86 => \n array (\n 'sectionID' => 'IMCIV1SEC6',\n 'blockID' => 'IMCIV1SEC6BLK6',\n 'dependencyID' => '',\n 'name' => '',\n 'created_at' => '2016-03-04 08:55:17',\n 'updated_at' => '2016-03-04 08:55:17',\n 'deleted_at' => NULL,\n ),\n 87 => \n array (\n 'sectionID' => 'IMCIV1SEC6',\n 'blockID' => 'IMCIV1SEC6BLK7',\n 'dependencyID' => '',\n 'name' => 'CERTIFICATION',\n 'created_at' => '2016-03-04 08:55:17',\n 'updated_at' => '2016-03-04 08:55:17',\n 'deleted_at' => NULL,\n ),\n 88 => \n array (\n 'sectionID' => 'IMCIV1SEC6',\n 'blockID' => 'IMCIV1SEC6BLK8',\n 'dependencyID' => '',\n 'name' => '',\n 'created_at' => '2016-03-04 08:55:17',\n 'updated_at' => '2016-03-04 08:55:17',\n 'deleted_at' => NULL,\n ),\n 89 => \n array (\n 'sectionID' => 'IMCIV1SEC6',\n 'blockID' => 'IMCIV1SEC6BLK9',\n 'dependencyID' => '',\n 'name' => '',\n 'created_at' => '2016-03-04 08:55:17',\n 'updated_at' => '2016-03-04 08:55:17',\n 'deleted_at' => NULL,\n ),\n 90 => \n array (\n 'sectionID' => 'MNHV1SEC1',\n 'blockID' => 'MNHV1SEC1BLK1',\n 'dependencyID' => '',\n 'name' => '',\n 'created_at' => '2016-03-04 08:55:17',\n 'updated_at' => '2016-03-04 08:55:17',\n 'deleted_at' => NULL,\n ),\n 91 => \n array (\n 'sectionID' => 'MNHV1SEC1',\n 'blockID' => 'MNHV1SEC1BLK2',\n 'dependencyID' => '',\n 'name' => '',\n 'created_at' => '2016-03-04 08:55:17',\n 'updated_at' => '2016-03-04 08:55:17',\n 'deleted_at' => NULL,\n ),\n 92 => \n array (\n 'sectionID' => 'MNHV1SEC1',\n 'blockID' => 'MNHV1SEC1BLK3',\n 'dependencyID' => '',\n 'name' => 'PROVISION OF SERVICES',\n 'created_at' => '2016-03-04 08:55:17',\n 'updated_at' => '2016-03-04 08:55:17',\n 'deleted_at' => NULL,\n ),\n 93 => \n array (\n 'sectionID' => 'MNHV1SEC1',\n 'blockID' => 'MNHV1SEC1BLK4',\n 'dependencyID' => '',\n 'name' => 'Health Facility Management',\n 'created_at' => '2016-03-04 08:55:17',\n 'updated_at' => '2016-03-04 08:55:17',\n 'deleted_at' => NULL,\n ),\n 94 => \n array (\n 'sectionID' => 'MNHV1SEC2',\n 'blockID' => 'MNHV1SEC2BLK1',\n 'dependencyID' => '',\n 'name' => '',\n 'created_at' => '2016-03-04 08:55:17',\n 'updated_at' => '2016-03-04 08:55:17',\n 'deleted_at' => NULL,\n ),\n 95 => \n array (\n 'sectionID' => 'MNHV1SEC2',\n 'blockID' => 'MNHV1SEC2BLK2',\n 'dependencyID' => '',\n 'name' => '',\n 'created_at' => '2016-03-04 08:55:17',\n 'updated_at' => '2016-03-04 08:55:17',\n 'deleted_at' => NULL,\n ),\n 96 => \n array (\n 'sectionID' => 'MNHV1SEC2',\n 'blockID' => 'MNHV1SEC2BLK3',\n 'dependencyID' => '',\n 'name' => '',\n 'created_at' => '2016-03-04 08:55:17',\n 'updated_at' => '2016-03-04 08:55:17',\n 'deleted_at' => NULL,\n ),\n 97 => \n array (\n 'sectionID' => 'MNHV1SEC2',\n 'blockID' => 'MNHV1SEC2BLK4',\n 'dependencyID' => '',\n 'name' => '',\n 'created_at' => '2016-03-04 08:55:17',\n 'updated_at' => '2016-03-04 08:55:17',\n 'deleted_at' => NULL,\n ),\n 98 => \n array (\n 'sectionID' => 'MNHV1SEC2',\n 'blockID' => 'MNHV1SEC2BLK5',\n 'dependencyID' => '',\n 'name' => '',\n 'created_at' => '2016-03-04 08:55:17',\n 'updated_at' => '2016-03-04 08:55:17',\n 'deleted_at' => NULL,\n ),\n 99 => \n array (\n 'sectionID' => 'MNHV1SEC2',\n 'blockID' => 'MNHV1SEC2BLK6',\n 'dependencyID' => '',\n 'name' => '',\n 'created_at' => '2016-03-04 08:55:17',\n 'updated_at' => '2016-03-04 08:55:17',\n 'deleted_at' => NULL,\n ),\n 100 => \n array (\n 'sectionID' => 'MNHV1SEC2',\n 'blockID' => 'MNHV1SEC2BLK7',\n 'dependencyID' => '',\n 'name' => '',\n 'created_at' => '2016-03-04 08:55:17',\n 'updated_at' => '2016-03-04 08:55:17',\n 'deleted_at' => NULL,\n ),\n 101 => \n array (\n 'sectionID' => 'MNHV1SEC3',\n 'blockID' => 'MNHV1SEC3BLK1',\n 'dependencyID' => '',\n 'name' => 'GUIDELINES AVAILABILITY',\n 'created_at' => '2016-03-04 08:55:17',\n 'updated_at' => '2016-03-04 08:55:17',\n 'deleted_at' => NULL,\n ),\n 102 => \n array (\n 'sectionID' => 'MNHV1SEC3',\n 'blockID' => 'MNHV1SEC3BLK2',\n 'dependencyID' => '',\n 'name' => 'JOB AIDS AVAILABILITY',\n 'created_at' => '2016-03-04 08:55:17',\n 'updated_at' => '2016-03-04 08:55:17',\n 'deleted_at' => NULL,\n ),\n 103 => \n array (\n 'sectionID' => 'MNHV1SEC3',\n 'blockID' => 'MNHV1SEC3BLK3',\n 'dependencyID' => '',\n 'name' => 'TOOLS AVAILABILITY',\n 'created_at' => '2016-03-04 08:55:17',\n 'updated_at' => '2016-03-04 08:55:17',\n 'deleted_at' => NULL,\n ),\n 104 => \n array (\n 'sectionID' => 'MNHV1SEC4',\n 'blockID' => 'MNHV1SEC4BLK1',\n 'dependencyID' => '',\n 'name' => 'HOW MANY STAFF MEMBERS HAVE BEEN TRAINED IN THE FOLLOWING?',\n 'created_at' => '2016-03-04 08:55:17',\n 'updated_at' => '2016-03-04 08:55:17',\n 'deleted_at' => NULL,\n ),\n 105 => \n array (\n 'sectionID' => 'MNHV1SEC5',\n 'blockID' => 'MNHV1SEC5BLK1',\n 'dependencyID' => '',\n 'name' => 'MAIN SUPPLIER',\n 'created_at' => '2016-03-04 08:55:17',\n 'updated_at' => '2016-03-04 08:55:17',\n 'deleted_at' => NULL,\n ),\n 106 => \n array (\n 'sectionID' => 'MNHV1SEC5',\n 'blockID' => 'MNHV1SEC5BLK2',\n 'dependencyID' => '',\n 'name' => 'INDICATE THE AVAILABILITY, MAIN REASON FOR UNAVAILABILITY, DURATION OF UNAVAILABILITY & WHAT HAPPENED WHEN THE COMMODITY WAS NOT AVAILABLE',\n 'created_at' => '2016-03-04 08:55:17',\n 'updated_at' => '2016-03-04 08:55:17',\n 'deleted_at' => NULL,\n ),\n 107 => \n array (\n 'sectionID' => 'MNHV1SEC6',\n 'blockID' => 'MNHV1SEC6BLK2',\n 'dependencyID' => '',\n 'name' => 'INDICATE THE AVAILABILITY, MAIN REASON FOR UNAVAILABILITY, DURATION OF UNAVAILABILITY & WHAT HAPPENED WHEN THE COMMODITY WAS NOT AVAILABLE',\n 'created_at' => '2016-03-04 08:55:17',\n 'updated_at' => '2016-03-04 08:55:17',\n 'deleted_at' => NULL,\n ),\n 108 => \n array (\n 'sectionID' => 'MNHV1SEC7',\n 'blockID' => 'MNHV1SEC7BLK1',\n 'dependencyID' => '',\n 'name' => 'Equipment Availability',\n 'created_at' => '2016-03-04 08:55:17',\n 'updated_at' => '2016-03-04 08:55:17',\n 'deleted_at' => NULL,\n ),\n 109 => \n array (\n 'sectionID' => 'MNHV1SEC7',\n 'blockID' => 'MNHV1SEC7BLK2',\n 'dependencyID' => '',\n 'name' => 'Testing Supplies',\n 'created_at' => '2016-03-04 08:55:17',\n 'updated_at' => '2016-03-04 08:55:17',\n 'deleted_at' => NULL,\n ),\n 110 => \n array (\n 'sectionID' => 'MNHV1SEC7',\n 'blockID' => 'MNHV1SEC7BLK21',\n 'dependencyID' => '',\n 'name' => 'SECTION 7 OF 8: II. KITS/SETS AVAILABILITY',\n 'created_at' => '2016-03-04 08:55:17',\n 'updated_at' => '2016-03-04 08:55:17',\n 'deleted_at' => NULL,\n ),\n 111 => \n array (\n 'sectionID' => 'MNHV1SEC7',\n 'blockID' => 'MNHV1SEC7BLK3',\n 'dependencyID' => '',\n 'name' => 'Delivery Kit Components',\n 'created_at' => '2016-03-04 08:55:17',\n 'updated_at' => '2016-03-04 08:55:17',\n 'deleted_at' => NULL,\n ),\n 112 => \n array (\n 'sectionID' => 'MNHV1SEC7',\n 'blockID' => 'MNHV1SEC7BLK4',\n 'dependencyID' => '',\n 'name' => 'MAIN SUPPLIER',\n 'created_at' => '2016-03-04 08:55:17',\n 'updated_at' => '2016-03-04 08:55:17',\n 'deleted_at' => NULL,\n ),\n 113 => \n array (\n 'sectionID' => 'MNHV1SEC7',\n 'blockID' => 'MNHV1SEC7BLK5',\n 'dependencyID' => '',\n 'name' => 'INDICATE THE AVAILABILITY AND MAIN REASON FOR UNAVAILABILITY FOR THE FOLLOWING KITS/SETS',\n 'created_at' => '2016-03-04 08:55:17',\n 'updated_at' => '2016-03-04 08:55:17',\n 'deleted_at' => NULL,\n ),\n 114 => \n array (\n 'sectionID' => 'MNHV1SEC8',\n 'blockID' => 'MNHV1SEC8BLK1',\n 'dependencyID' => '',\n 'name' => 'INDICATE THE AVAILABILITY AND LOCATION OF THE FOLLOWING RESOURCES',\n 'created_at' => '2016-03-04 08:55:17',\n 'updated_at' => '2016-03-04 08:55:17',\n 'deleted_at' => NULL,\n ),\n 115 => \n array (\n 'sectionID' => 'MNHV1SEC8',\n 'blockID' => 'MNHV1SEC8BLK2',\n 'dependencyID' => '',\n 'name' => 'INDICATE THE STORAGE AND ACCESS TO WATER',\n 'created_at' => '2016-03-04 08:55:17',\n 'updated_at' => '2016-03-04 08:55:17',\n 'deleted_at' => NULL,\n ),\n 116 => \n array (\n 'sectionID' => 'MNHV1SEC8',\n 'blockID' => 'MNHV1SEC8BLK3',\n 'dependencyID' => '',\n 'name' => 'INDICATE THE AVAILABILITY AND STORAGE, SUPPLIER AND SOURCE OF THE FOLLOWING',\n 'created_at' => '2016-03-04 08:55:17',\n 'updated_at' => '2016-03-04 08:55:17',\n 'deleted_at' => NULL,\n ),\n 117 => \n array (\n 'sectionID' => 'MNHV1SEC8',\n 'blockID' => 'MNHV1SEC8BLK4',\n 'dependencyID' => '',\n 'name' => 'PROVISION FOR WASTE DISPOSAL',\n 'created_at' => '2016-03-04 08:55:17',\n 'updated_at' => '2016-03-04 08:55:17',\n 'deleted_at' => NULL,\n ),\n 118 => \n array (\n 'sectionID' => 'MNHV1SEC9',\n 'blockID' => 'MNHV1SEC9BLK1',\n 'dependencyID' => '',\n 'name' => 'COMMUNITY STRATEGY',\n 'created_at' => '2016-03-04 08:55:17',\n 'updated_at' => '2016-03-04 08:55:17',\n 'deleted_at' => NULL,\n ),\n 119 => \n array (\n 'sectionID' => 'MNHV2SEC1',\n 'blockID' => 'MNHV2SEC1BLK1',\n 'dependencyID' => '',\n 'name' => '',\n 'created_at' => '2016-03-04 08:55:17',\n 'updated_at' => '2016-03-04 08:55:17',\n 'deleted_at' => NULL,\n ),\n 120 => \n array (\n 'sectionID' => 'MNHV2SEC1',\n 'blockID' => 'MNHV2SEC1BLK2',\n 'dependencyID' => '',\n 'name' => '',\n 'created_at' => '2016-03-04 08:55:17',\n 'updated_at' => '2016-03-04 08:55:17',\n 'deleted_at' => NULL,\n ),\n 121 => \n array (\n 'sectionID' => 'MNHV2SEC1',\n 'blockID' => 'MNHV2SEC1BLK3',\n 'dependencyID' => '',\n 'name' => 'PROVISION OF SERVICES',\n 'created_at' => '2016-03-04 08:55:17',\n 'updated_at' => '2016-03-04 08:55:17',\n 'deleted_at' => NULL,\n ),\n 122 => \n array (\n 'sectionID' => 'MNHV2SEC1',\n 'blockID' => 'MNHV2SEC1BLK4',\n 'dependencyID' => '',\n 'name' => 'Health Facility Management',\n 'created_at' => '2016-03-04 08:55:17',\n 'updated_at' => '2016-03-04 08:55:17',\n 'deleted_at' => NULL,\n ),\n 123 => \n array (\n 'sectionID' => 'MNHV2SEC2',\n 'blockID' => 'MNHV2SEC2BLK1',\n 'dependencyID' => '',\n 'name' => '',\n 'created_at' => '2016-03-04 08:55:17',\n 'updated_at' => '2016-03-04 08:55:17',\n 'deleted_at' => NULL,\n ),\n 124 => \n array (\n 'sectionID' => 'MNHV2SEC2',\n 'blockID' => 'MNHV2SEC2BLK2',\n 'dependencyID' => '',\n 'name' => '',\n 'created_at' => '2016-03-04 08:55:17',\n 'updated_at' => '2016-03-04 08:55:17',\n 'deleted_at' => NULL,\n ),\n 125 => \n array (\n 'sectionID' => 'MNHV2SEC2',\n 'blockID' => 'MNHV2SEC2BLK3',\n 'dependencyID' => '',\n 'name' => '',\n 'created_at' => '2016-03-04 08:55:17',\n 'updated_at' => '2016-03-04 08:55:17',\n 'deleted_at' => NULL,\n ),\n 126 => \n array (\n 'sectionID' => 'MNHV2SEC2',\n 'blockID' => 'MNHV2SEC2BLK4',\n 'dependencyID' => '',\n 'name' => '',\n 'created_at' => '2016-03-04 08:55:17',\n 'updated_at' => '2016-03-04 08:55:17',\n 'deleted_at' => NULL,\n ),\n 127 => \n array (\n 'sectionID' => 'MNHV2SEC2',\n 'blockID' => 'MNHV2SEC2BLK5',\n 'dependencyID' => '',\n 'name' => '',\n 'created_at' => '2016-03-04 08:55:17',\n 'updated_at' => '2016-03-04 08:55:17',\n 'deleted_at' => NULL,\n ),\n 128 => \n array (\n 'sectionID' => 'MNHV2SEC2',\n 'blockID' => 'MNHV2SEC2BLK6',\n 'dependencyID' => '',\n 'name' => '',\n 'created_at' => '2016-03-04 08:55:17',\n 'updated_at' => '2016-03-04 08:55:17',\n 'deleted_at' => NULL,\n ),\n 129 => \n array (\n 'sectionID' => 'MNHV2SEC2',\n 'blockID' => 'MNHV2SEC2BLK7',\n 'dependencyID' => '',\n 'name' => '',\n 'created_at' => '2016-03-04 08:55:17',\n 'updated_at' => '2016-03-04 08:55:17',\n 'deleted_at' => NULL,\n ),\n 130 => \n array (\n 'sectionID' => 'MNHV2SEC3',\n 'blockID' => 'MNHV2SEC3BLK1',\n 'dependencyID' => '',\n 'name' => 'GUIDELINES AVAILABILITY',\n 'created_at' => '2016-03-04 08:55:17',\n 'updated_at' => '2016-03-04 08:55:17',\n 'deleted_at' => NULL,\n ),\n 131 => \n array (\n 'sectionID' => 'MNHV2SEC3',\n 'blockID' => 'MNHV2SEC3BLK2',\n 'dependencyID' => '',\n 'name' => 'JOB AIDS AVAILABILITY',\n 'created_at' => '2016-03-04 08:55:17',\n 'updated_at' => '2016-03-04 08:55:17',\n 'deleted_at' => NULL,\n ),\n 132 => \n array (\n 'sectionID' => 'MNHV2SEC3',\n 'blockID' => 'MNHV2SEC3BLK3',\n 'dependencyID' => '',\n 'name' => 'TOOLS AVAILABILITY',\n 'created_at' => '2016-03-04 08:55:17',\n 'updated_at' => '2016-03-04 08:55:17',\n 'deleted_at' => NULL,\n ),\n 133 => \n array (\n 'sectionID' => 'MNHV2SEC4',\n 'blockID' => 'MNHV2SEC4BLK1',\n 'dependencyID' => '',\n 'name' => 'HOW MANY STAFF MEMBERS HAVE BEEN TRAINED IN THE FOLLOWING?',\n 'created_at' => '2016-03-04 08:55:17',\n 'updated_at' => '2016-03-04 08:55:17',\n 'deleted_at' => NULL,\n ),\n 134 => \n array (\n 'sectionID' => 'MNHV2SEC5',\n 'blockID' => 'MNHV2SEC5BLK1',\n 'dependencyID' => '',\n 'name' => 'MAIN SUPPLIER',\n 'created_at' => '2016-03-04 08:55:17',\n 'updated_at' => '2016-03-04 08:55:17',\n 'deleted_at' => NULL,\n ),\n 135 => \n array (\n 'sectionID' => 'MNHV2SEC5',\n 'blockID' => 'MNHV2SEC5BLK2',\n 'dependencyID' => '',\n 'name' => 'INDICATE THE AVAILABILITY, MAIN REASON FOR UNAVAILABILITY, DURATION OF UNAVAILABILITY & WHAT HAPPENED WHEN THE COMMODITY WAS NOT AVAILABLE',\n 'created_at' => '2016-03-04 08:55:17',\n 'updated_at' => '2016-03-04 08:55:17',\n 'deleted_at' => NULL,\n ),\n 136 => \n array (\n 'sectionID' => 'MNHV2SEC6',\n 'blockID' => 'MNHV2SEC6BLK1',\n 'dependencyID' => '',\n 'name' => 'Equipment Availability',\n 'created_at' => '2016-03-04 08:55:17',\n 'updated_at' => '2016-03-04 08:55:17',\n 'deleted_at' => NULL,\n ),\n 137 => \n array (\n 'sectionID' => 'MNHV2SEC6',\n 'blockID' => 'MNHV2SEC6BLK2',\n 'dependencyID' => '',\n 'name' => 'Testing Supplies',\n 'created_at' => '2016-03-04 08:55:17',\n 'updated_at' => '2016-03-04 08:55:17',\n 'deleted_at' => NULL,\n ),\n 138 => \n array (\n 'sectionID' => 'MNHV2SEC6',\n 'blockID' => 'MNHV2SEC6BLK3',\n 'dependencyID' => '',\n 'name' => 'Delivery Kit Components',\n 'created_at' => '2016-03-04 08:55:17',\n 'updated_at' => '2016-03-04 08:55:17',\n 'deleted_at' => NULL,\n ),\n 139 => \n array (\n 'sectionID' => 'MNHV2SEC6',\n 'blockID' => 'MNHV2SEC6BLK4',\n 'dependencyID' => '',\n 'name' => 'MAIN SUPPLIER',\n 'created_at' => '2016-03-04 08:55:17',\n 'updated_at' => '2016-03-04 08:55:17',\n 'deleted_at' => NULL,\n ),\n 140 => \n array (\n 'sectionID' => 'MNHV2SEC6',\n 'blockID' => 'MNHV2SEC6BLK5',\n 'dependencyID' => '',\n 'name' => 'INDICATE THE AVAILABILITY AND MAIN REASON FOR UNAVAILABILITY FOR THE FOLLOWING KITS/SETS',\n 'created_at' => '2016-03-04 08:55:17',\n 'updated_at' => '2016-03-04 08:55:17',\n 'deleted_at' => NULL,\n ),\n 141 => \n array (\n 'sectionID' => 'MNHV2SEC7',\n 'blockID' => 'MNHV2SEC7BLK1',\n 'dependencyID' => '',\n 'name' => 'INDICATE THE AVAILABILITY AND LOCATION OF THE FOLLOWING RESOURCES',\n 'created_at' => '2016-03-04 08:55:17',\n 'updated_at' => '2016-03-04 08:55:17',\n 'deleted_at' => NULL,\n ),\n 142 => \n array (\n 'sectionID' => 'MNHV2SEC7',\n 'blockID' => 'MNHV2SEC7BLK2',\n 'dependencyID' => '',\n 'name' => 'INDICATE THE STORAGE AND ACCESS TO WATER',\n 'created_at' => '2016-03-04 08:55:17',\n 'updated_at' => '2016-03-04 08:55:17',\n 'deleted_at' => NULL,\n ),\n 143 => \n array (\n 'sectionID' => 'MNHV2SEC7',\n 'blockID' => 'MNHV2SEC7BLK3',\n 'dependencyID' => '',\n 'name' => 'INDICATE THE AVAILABILITY AND STORAGE, SUPPLIER AND SOURCE OF THE FOLLOWING',\n 'created_at' => '2016-03-04 08:55:17',\n 'updated_at' => '2016-03-04 08:55:17',\n 'deleted_at' => NULL,\n ),\n 144 => \n array (\n 'sectionID' => 'MNHV2SEC7',\n 'blockID' => 'MNHV2SEC7BLK4',\n 'dependencyID' => '',\n 'name' => 'PROVISION FOR WASTE DISPOSAL',\n 'created_at' => '2016-03-04 08:55:17',\n 'updated_at' => '2016-03-04 08:55:17',\n 'deleted_at' => NULL,\n ),\n 145 => \n array (\n 'sectionID' => 'MNHV2SEC8',\n 'blockID' => 'MNHV2SEC8BLK1',\n 'dependencyID' => '',\n 'name' => 'COMMUNITY STRATEGY',\n 'created_at' => '2016-03-04 08:55:17',\n 'updated_at' => '2016-03-04 08:55:17',\n 'deleted_at' => NULL,\n ),\n ));\n \n \n }", "function blocks_print_adminblock($page, $missingblocks) {\n global $USER;\n\n $strblocks = get_string('blocks');\n $stradd = get_string('add');\n if (!empty($missingblocks)) {\n foreach ($missingblocks as $blockid) {\n $block = blocks_get_record($blockid);\n\n switch($page->type) {\n case MOODLE_PAGE_COURSE:\n $course = get_record('course', 'id', $page->id);\n break;\n default: die('unknown pagetype: '. $page->type);\n }\n\n $blockobject = block_instance($block->name);\n if ($blockobject === false) {\n continue;\n }\n $menu[$block->id] = $blockobject->get_title();\n }\n\n if($page->id == SITEID) {\n $target = 'index.php';\n }\n else {\n $target = 'view.php';\n }\n $content = popup_form($target .'?id='. $course->id .'&amp;sesskey='. $USER->sesskey .'&amp;blockaction=add&amp;blockid=',\n $menu, 'add_block', '', $stradd .'...', '', '', true);\n $content = '<div align=\"center\">'. $content .'</div>';\n print_side_block($strblocks, $content, NULL, NULL, NULL);\n }\n}", "public function getBlocks() {\n // Get blocks definition.\n $definitions = $this->blockManager->getFilteredDefinitions('block_ui', $this->contextRepository->getAvailableContexts());\n foreach ($this->getRestrictedBlocks() as $plugin_id) {\n if (isset($definitions[$plugin_id])) {\n unset($definitions[$plugin_id]);\n }\n }\n\n return $definitions;\n }", "public function frontpage_available_courses() {\n\n global $CFG , $DB;\n $coursecontainer = '';\n $chelper = new coursecat_helper();\n $chelper->set_show_courses(self::COURSECAT_SHOW_COURSES_EXPANDED)->set_courses_display_options( array(\n 'recursive' => true,\n 'limit' => $CFG->frontpagecourselimit,\n 'viewmoreurl' => new moodle_url('/course/index.php'),\n 'viewmoretext' => new lang_string('fulllistofcourses')\n ));\n\n $chelper->set_attributes( array( 'class' => 'frontpage-course-list-all frontpageblock-theme' ) );\n\n $courses = core_course_category::get(0)->get_courses( $chelper->get_courses_display_options() );\n\n $totalcount = core_course_category::get(0)->get_courses_count( $chelper->get_courses_display_options() );\n\n $rcourseids = array_keys( $courses );\n\n //$acourseids = array_chunk( $rcourseids, 6);\n $acourseids = $rcourseids;\n $tcount = count($acourseids);\n\n $newcourse = get_string( 'availablecourses' );\n $header = \"\";\n $header .= html_writer::tag('div', \"<div></div>\", array('class' => 'bgtrans-overlay'));\n\n $header .= html_writer::start_tag('div',\n array( 'class' => 'available-courses', 'id' => 'available-courses') );\n $header .= html_writer::start_tag('div', array( 'class' => 'available-overlay' ) );\n $header .= html_writer::start_tag('div', array( 'class' => 'available-block' ) );\n $header .= html_writer::start_tag('div', array('class' => 'container'));\n $header .= html_writer::tag('h2', get_string('availablecourses'));\n\n /* if ($tcount > '1') {\n $header .= html_writer::start_tag('div', array('class' => 'pagenav slider-nav') );\n $header .= html_writer::tag('button', '', array('class' => 'slick-prev nav-item previous', 'type' => 'button') );\n $header .= html_writer::tag('button', '', array('class' => 'slick-next nav-item next', 'type' => 'button') );\n $header .= html_writer::tag('div', '', array('class' => 'clearfix') );\n $header .= html_writer::end_tag('div');\n }*/\n $sliderclass = 'course-slider';\n $header .= html_writer::start_tag('div', array('class' => 'row') );\n $header .= html_writer::start_tag('div', array( 'class' => \" $sliderclass col-md-12\") );\n\n $footer = html_writer::end_tag('div');\n $footer .= html_writer::end_tag('div');\n $footer .= html_writer::end_tag('div');\n $footer .= html_writer::end_tag('div');\n if (count($rcourseids) > 0) {\n $i = '0';\n /* foreach ($acourseids as $courseids) {\n\n $rowcontent = '<div class=\"slider-row \">';*/\n $rowcontent = '';\n foreach ($acourseids as $courseid) {\n $container = '';\n $course = get_course($courseid);\n $noimgurl = $this->output->image_url('no-image', 'theme');\n $courseurl = new moodle_url('/course/view.php', array('id' => $courseid ));\n\n if ($course instanceof stdClass) {\n $course = new core_course_list_element($course);\n }\n\n $imgurl = '';\n $context = context_course::instance($course->id);\n\n foreach ($course->get_course_overviewfiles() as $file) {\n $isimage = $file->is_valid_image();\n $imgurl = file_encode_url(\"$CFG->wwwroot/pluginfile.php\",\n '/'. $file->get_contextid(). '/'. $file->get_component(). '/'.\n $file->get_filearea(). $file->get_filepath(). $file->get_filename(), !$isimage);\n if (!$isimage) {\n $imgurl = $noimgurl;\n }\n }\n\n if (empty($imgurl)) {\n $imgurl = $noimgurl;\n }\n\n $container .= html_writer::start_tag('div', array( 'class' => 'col-md-2') );\n $container .= html_writer::start_tag('div', array( 'class' => 'available-content'));\n $container .= html_writer::start_tag('div', array( 'class' => 'available-img'));\n\n $container .= html_writer::start_tag('a', array( 'href' => $courseurl) );\n $container .= html_writer::empty_tag('img',\n array(\n 'src' => $imgurl,\n 'width' => \"249\",\n 'height' => \"200\",\n 'alt' => $course->get_formatted_name() ) );\n $container .= html_writer::end_tag('a');\n $container .= html_writer::end_tag('div');\n $container .= html_writer::tag('h6', html_writer::tag('a',\n $course->get_formatted_name(),\n array( 'href' => $courseurl ) ),\n array('class' => 'title-text') );\n $container .= html_writer::end_tag('div');\n $container .= html_writer::end_tag('div');\n\n $rowcontent .= $container;\n }\n $i++;\n /*$rowcontent .= html_writer::end_tag('div');*/\n $coursecontainer .= $rowcontent;\n // }\n\n }\n $footer .= html_writer::end_tag('div');\n $footer .= html_writer::end_tag('div');\n $coursehtml = $header.$coursecontainer.$footer;\n return $coursehtml;\n\n if (!$totalcount && !$this->page->user_is_editing() && has_capability('moodle/course:create', context_system::instance())) {\n // Print link to create a new course, for the 1st available category.\n echo $this->add_new_course_button();\n }\n }", "protected function getBlocks()\n\t{\n\t\treturn blx()->entries->getAllBlocks();\n\t}", "protected function register_blocks() {\n\n\t\t\\register_block_type(\n\t\t\t'tcc/column',\n\t\t\tarray(\n\t\t\t\t'editor_script' => 'tcc-layout-engine',\n\t\t\t\t'editor_style' => 'tcc-layout-engine',\n\t\t\t)\n\t\t);\n\n\t\t\\register_block_type(\n\t\t\t'tcc/layout-1-column',\n\t\t\tarray(\n\t\t\t\t'editor_script' => 'tcc-layout-engine',\n\t\t\t\t'editor_style' => 'tcc-layout-engine',\n\t\t\t)\n\t\t);\n\n\t\t\\register_block_type(\n\t\t\t'tcc/layout-2-column',\n\t\t\tarray(\n\t\t\t\t'editor_script' => 'tcc-layout-engine',\n\t\t\t\t'editor_style' => 'tcc-layout-engine',\n\t\t\t)\n\t\t);\n\n\t\t\\register_block_type(\n\t\t\t'tcc/layout-3-column',\n\t\t\tarray(\n\t\t\t\t'editor_script' => 'tcc-layout-engine',\n\t\t\t\t'editor_style' => 'tcc-layout-engine',\n\t\t\t)\n\t\t);\n\n\t\t\\register_block_type(\n\t\t\t'tcc/layout-4-column',\n\t\t\tarray(\n\t\t\t\t'editor_script' => 'tcc-layout-engine',\n\t\t\t\t'editor_style' => 'tcc-layout-engine',\n\t\t\t)\n\t\t);\n\n\t}", "public function run()\n {\n $this->disableForeignKeys();\n $this->truncate('blocks');\n\n /*\n * ABOUT US PAGE BLOCKS\n */\n $blocks = [\n [\n 'page_id' => 1,\n 'title' => 'History',\n 'title_ru' => 'История',\n 'title_it' => 'Mostra di più',\n 'body' => 'The collection is inspired by the Renaissance town of Verona, symbol of the classic and highly appreciated Italian style, romantic and elegant at a time. Special care is devoted to details, the selection of tissues, and the coordination of color nuances.\n ',\n 'body_ru' => 'Коллекция вдохновлена эпохой Возрождения Вероны, символом классического и высоко оцененного итальянского стиля, романтического и элегантного за один раз. Особое внимание уделяется деталям, выбору тканей и координации цветовых нюансов.',\n 'body_it' => 'La collezione è ispirata alla città rinascimentale di Verona, simbolo del classico stile italiano molto apprezzato, romantico ed elegante alla volta. La cura particolare è dedicata ai dettagli, alla selezione dei tessuti e al coordinamento delle sfumature di colore.\n ',\n 'image' => null,\n 'title_limit' => 15,\n 'body_limit' => 300,\n 'created_at' => Carbon::now(),\n 'updated_at' => Carbon::now(),\n ],\n [\n 'page_id' => 1,\n 'title' => 'Expression of style',\n 'title_ru' => 'Выражение стиля',\n 'title_it' => 'Espressione dello stile',\n 'body_it' => 'Anche nell\\'area dell\\'ufficio un nuovo concetto di spazio, adattato alle vostre esigenze, riesce a ripristinare un design elegante e raffinato che si esprime in una cura amorosa per i dettagli, in una lavorazione a mano che esalta le texture, dando complementi di mobili con un unico e Fascino senza tempo.',\n 'body_ru' => 'Кроме того, в офисной зоне новая концепция пространства, адаптированная к вашим потребностям, оживляет элегантный и изысканный дизайн, который выражается в любящей заботе о деталях, в ручном производстве, которое превозносит текстуры, придавая вам мебельные дополнения с уникальным и Вневременное очарование',\n 'body' => 'Also in the office area a new concept of space, tailored to your needs, to revive an elegant and refined design that expresses itself in a loving care for details, in a hand manufacturing that exalt the textures, giving you furniture complements with a unique and timeless charm',\n 'image' => 'under-history-right.jpg',\n 'title_limit' => 25,\n 'body_limit' => 330,\n 'created_at' => Carbon::now(),\n 'updated_at' => Carbon::now(),\n ],\n [\n 'page_id' => 1,\n 'title' => '',\n 'title_ru' => '',\n 'title_it' => '',\n 'body' => 'The lifelong experience is being reflected in almost every project. At Cavio-Casa, we are welcoming challenges to foster our creativity. People inspire us and we want to inspire them too.<br><br>Everything we do at Cavio-Casa is guided by our vision to ensure that we all go the extra mile to help our customers reach their audiences. So far, we have achieved to play a dynamic role in shaping the jewelry industry.\n ',\n 'body_ru' => 'Жизненный опыт отражается почти во всех проектах. В Cavio-Casa мы приветствуем проблемы, способствующие нашему творчеству. Люди вдохновляют нас, и мы хотим их вдохновить. <br><br> Все, что мы делаем в Cavio-Casa, руководствуется нашим видением, чтобы все мы прошли лишнюю милю, чтобы помочь нашим клиентам достичь своей аудитории. До сих пор мы достигли динамичной роли в формировании ювелирной промышленности.',\n 'body_it' => 'L\\'esperienza permanente si riflette in quasi tutti i progetti. A Cavio-Casa, stiamo accogliendo sfide per promuovere la nostra creatività. La gente ci ispira e vogliamo ispirare anche loro<br><br> Tutto quello che facciamo a Cavio-Casa è guidato dalla nostra visione per assicurarci che tutti noi passiamo il miglio supplementare per aiutare i nostri clienti a raggiungere il loro pubblico. Finora abbiamo raggiunto un ruolo dinamico nella progettazione dell\\'industria dei gioielli.',\n 'image' => 'under-history-left.jpg',\n 'title_limit' => null,\n 'body_limit' => 500,\n 'created_at' => Carbon::now(),\n 'updated_at' => Carbon::now(),\n ],\n [\n 'page_id' => 1,\n 'title' => 'Philosofhy',\n 'title_ru' => 'Философия',\n 'title_it' => 'Filosofia',\n 'body' => 'The collection is inspired by the Renaissance town of Verona, symbol of the classic and highly appreciated Italian style, romantic and elegant at a time. Special care is devoted to details, the selection of tissues, and the coordination of color nuances.',\n 'body_ru' => 'Коллекция вдохновлена эпохой Возрождения Вероны, символом классического и высоко оцененного итальянского стиля, романтического и элегантного за один раз. Особое внимание уделяется деталям, выбору тканей и координации цветовых нюансов.',\n 'body_it' => 'La collezione è ispirata alla città rinascimentale di Verona, simbolo del classico stile italiano molto apprezzato, romantico ed elegante alla volta. La cura particolare è dedicata ai dettagli, alla selezione dei tessuti e al coordinamento delle sfumature di colore.',\n 'image' => null,\n 'title_limit' => 15,\n 'body_limit' => 300,\n 'created_at' => Carbon::now(),\n 'updated_at' => Carbon::now(),\n ],\n [\n 'page_id' => 1,\n 'title' => '',\n 'title_ru' => '',\n 'title_it' => '',\n 'body_it' => 'Tutto quello che facciamo a Cavio-Casa è guidato dalla nostra visione per assicurare che tutti noi andiamo il miglio supplementare per aiutare i nostri clienti a raggiungere il loro pubblico. Finora abbiamo raggiunto un ruolo dinamico nella progettazione dell\\'industria dei gioielli<br><br> L\\'esperienza permanente si riflette in quasi tutti i progetti. A Cavio-Casa, stiamo accogliendo sfide per promuovere la nostra creatività. Le persone ci ispirano e vogliamo ispirare anche loro.',\n 'body_ru' => 'Все, что мы делаем в Cavio-Casa, руководствуется нашим видением, чтобы все мы прошли лишнюю милю, чтобы помочь нашим клиентам достичь своей аудитории. До сих пор мы достигли динамичной роли в формировании ювелирной промышленности.<br>Жизненный опыт отражается почти во всех проектах. В Cavio-Casa мы приветствуем проблемы, способствующие нашему творчеству. Люди вдохновляют нас, и мы хотим вдохновить их тоже.',\n 'body' => 'Everything we do at Cavio-Casa is guided by our vision to ensure that we all go the extra mile to help our customers reach their audiences. So far, we have achieved to play a dynamic role in shaping the jewelry industry.<br>The lifelong experience is being reflected in almost every project. At Cavio-Casa, we are welcoming challenges to foster our creativity. People inspire us and we want to inspire them too.',\n 'image' => null,\n 'title_limit' => null,\n 'body_limit' => 500,\n 'created_at' => Carbon::now(),\n 'updated_at' => Carbon::now(),\n ],\n [\n 'page_id' => 1,\n 'title' => '',\n 'title_ru' => '',\n 'title_it' => '',\n 'body' => 'We have been renowned for the high quality of our hand-made products, the innovative ideas, the effective co-operation with clients around the world and the ability to tailor our services to each customer’s needs surpassing their expectations.<br><br>We are always next to you, full of new ideas, determination and love because we believe in what we do.',\n 'image' => null,\n 'body_ru' => 'Мы были известны высоким качеством наших изделий ручной работы, инновационными идеями, эффективным сотрудничеством с клиентами по всему миру и возможностью адаптировать наши услуги к потребностям каждого клиента, превосходящим их ожидания. <br><br> Мы всегда рядом с вами, полны новых идей, решительности и любви, потому что мы верим в то, что делаем.',\n 'body_it' => 'Siamo stati rinomati per l\\'alta qualità dei nostri prodotti fatti a mano, le idee innovative, l\\'efficace collaborazione con i clienti in tutto il mondo e la capacità di adattare i nostri servizi alle esigenze di ogni cliente che supera le loro aspettative.<br><br> Siamo sempre accanto a voi, pieno di nuove idee, determinazione e amore perché crediamo in ciò che facciamo.',\n 'title_limit' => null,\n 'body_limit' => 500,\n 'created_at' => Carbon::now(),\n 'updated_at' => Carbon::now(),\n ],\n [\n 'page_id' => 1,\n 'title' => '',\n 'title_ru' => '',\n 'title_it' => '',\n 'body_ru' => '<span class=colored>Свобода</span>для сопоставления<br>разных материалов и отделок<br>и <span class=colored>ошеломляющий</span>визуал.',\n 'image' => null,\n 'body' => 'The <span class=colored>freedom</span>to to juxtapose<br>different materials, finishes<br>and <span class=colored>stunning</span>visual.',\n 'body_it' => 'La <span class=colored>libertà</span>Per giungere a destra<br>Materiali diversi, finiture<br>e <span class=colored>stunning</span>visivo.',\n 'title_limit' => null,\n 'body_limit' => 150,\n 'created_at' => Carbon::now(),\n 'updated_at' => Carbon::now(),\n ],\n [\n 'page_id' => 1,\n 'title' => 'Mood',\n 'title_ru' => 'Настроение',\n 'title_it' => 'Umore',\n 'body' => 'Special care is devoted to details, the selection of tissues, and the coordination of color nuances. The collection is inspired by the Renaissance town of Verona, symbol of the classic and highly appreciated Italian style, romantic and elegant at a time.',\n 'body_ru' => 'Особое внимание уделяется деталям, выбору тканей и координации цветовых нюансов. Коллекция вдохновлена эпохой Возрождения Вероны, символом классического и высоко оцененного итальянского стиля, романтического и элегантного за один раз.',\n 'body_it' => 'La cura particolare è dedicata ai dettagli, alla selezione dei tessuti e al coordinamento delle sfumature di colore. La collezione è ispirata alla città rinascimentale di Verona, simbolo del classico stile italiano molto apprezzato, romantico ed elegante alla volta.',\n 'image' => null,\n 'title_limit' => 15,\n 'body_limit' => 300,\n 'created_at' => Carbon::now(),\n 'updated_at' => Carbon::now(),\n ],\n [\n 'page_id' => 1,\n 'title' => 'Expression',\n 'title_ru' => 'Выражение',\n 'title_it' => 'Espressione',\n 'body' => 'Also in the office area a new concept of space, tailored to your needs, to revive an elegant and refined design that expresses itself in a loving care for details.',\n 'body_ru' => 'Кроме того, в офисе новая концепция пространства, адаптированная к вашим потребностям, оживляет элегантный и изысканный дизайн, который выражает себя в любящей заботе о деталях.',\n 'body_it' => 'Anche nell\\'area dell\\'ufficio un nuovo concetto di spazio, adattato alle vostre esigenze, riesumina un design elegante e raffinato che si esprime in una cura amorosa per i dettagli.',\n 'image' => null,\n 'title_limit' => 12,\n 'body_limit' => 190,\n 'created_at' => Carbon::now(),\n 'updated_at' => Carbon::now(),\n ],\n [\n 'page_id' => 1,\n 'title' => 'Style',\n 'title_ru' => 'Стиль',\n 'title_it' => 'Stile',\n 'body' => 'In a hand manufacturing that exalt the textures, giving you furniture complements with a unique and timeless charm.\n ',\n 'body_ru' => 'В ручном производстве, которые превозносят текстуры, дают вам комплименты мебели с уникальным и неподвластным времени очарованием.',\n 'body_it' => 'In una produzione a mano che esalta le texture, dandovi complimenti per mobili con un fascino unico e senza tempo.',\n 'image' => null,\n 'title_limit' => 12,\n 'body_limit' => 190,\n 'created_at' => Carbon::now(),\n 'updated_at' => Carbon::now(),\n ],\n [\n 'page_id' => 1,\n 'title' => 'Quality',\n 'title_ru' => 'Качество',\n 'title_it' => 'Qualità',\n 'body' => 'Also in the office area a new concept of space, tailored to your needs, to revive an elegant and refined design that expresses itself in a loving care for details.\n ',\n 'body_ru' => 'Кроме того, в офисе новая концепция пространства, адаптированная к вашим потребностям, оживляет элегантный и изысканный дизайн, который выражает себя в любящей заботе о деталях.',\n 'body_it' => 'Anche nell\\'area dell\\'ufficio un nuovo concetto di spazio, adattato alle vostre esigenze, riesumina un design elegante e raffinato che si esprime in una cura amorosa per i dettagli.',\n 'image' => null,\n 'title_limit' => 12,\n 'body_limit' => 190,\n 'created_at' => Carbon::now(),\n 'updated_at' => Carbon::now(),\n ],\n /*\n * Contacts PAGE BLOCKS\n */\n [\n 'page_id' => 2,\n 'title' => 'CAVIO Factory & Showroom',\n 'title_ru' => 'CAVIO Фабрики & Посредники',\n 'title_it' => 'CAVIO Factory & Showroom',\n 'body' => 'Viale Europa, 6/a, 37050<br>San Pietro di Morubio (VR)\n Italia<br><br>Telefone: <a href=\"tel:+39 045 71 44 503\" class=tel>+39 045 71 44 503</a><br>Fax:\n <a href=\"tel:+39 045 71 44 277\" class=tel>+39 045 71 44 277</a><br><br><a\n href=mailto:info@cavio.it class=\"colored_link anim-underline\">info@cavio.it</a>',\n 'body_ru' => 'Viale Europa, 6/a, 37050<br>San Pietro di Morubio (VR)\n Italia<br><br>Telefone: <a href=\"tel:+39 045 71 44 503\" class=tel>+39 045 71 44 503</a><br>Fax:\n <a href=\"tel:+39 045 71 44 277\" class=tel>+39 045 71 44 277</a><br><br><a\n href=mailto:info@cavio.it class=\"colored_link anim-underline\">info@cavio.it</a>',\n 'body_it' => 'Viale Europa, 6/a, 37050<br>San Pietro di Morubio (VR)\n Italia<br><br>Telefone: <a href=\"tel:+39 045 71 44 503\" class=tel>+39 045 71 44 503</a><br>Fax:\n <a href=\"tel:+39 045 71 44 277\" class=tel>+39 045 71 44 277</a><br><br><a\n href=mailto:info@cavio.it class=\"colored_link anim-underline\">info@cavio.it</a>',\n 'image' => 'cont-r.jpg',\n 'title_limit' => 26,\n 'body_limit' => 400,\n 'created_at' => Carbon::now(),\n 'updated_at' => Carbon::now(),\n ],\n [\n 'page_id' => 2,\n 'title' => '',\n 'title_ru' => '',\n 'title_it' => '',\n 'body' => '',\n 'body_ru' => '',\n 'body_it' => '',\n 'image' => 'cont-map.jpg',\n 'title_limit' => null,\n 'body_limit' => null,\n 'created_at' => Carbon::now(),\n 'updated_at' => Carbon::now(),\n ],\n [\n 'page_id' => 2,\n 'title' => '',\n 'title_ru' => '',\n 'title_it' => '',\n 'body' => '',\n 'body_ru' => '',\n 'body_it' => '',\n 'image' => 'cont-bottom.jpg',\n 'title_limit' => null,\n 'body_limit' => null,\n 'created_at' => Carbon::now(),\n 'updated_at' => Carbon::now(),\n ],\n [\n 'page_id' => 8,\n 'title' => 'Our philosofy',\n 'title_ru' => 'Наша философия',\n 'title_it' => 'La filosofia',\n 'body' => '<div class=wrap-phil-p><p>Italian furniture showroom CAVIO found its adherents in 38 countries, including Switzerland, France, Sweden, Netherlands, Germany, Australia and the United States.</div><div class=wrap-phil-p><p>In Kiev, the Italian furniture CAVIO presented in several showrooms, conveniently located on the left and right banks.</div><div class=wrap-phil-p><p>Here, professional consultants will help you to implement a holistic complete interior - from the kitchen, bedroom, living room and study to the children\\'s room <a href=# class=link-arrow>→</a></div>',\n 'body_ru' => '<div class=wrap-phil-p><p>Italian furniture showroom CAVIO found its adherents in 38 countries, including Switzerland, France, Sweden, Netherlands, Germany, Australia and the United States.</div><div class=wrap-phil-p><p>In Kiev, the Italian furniture CAVIO presented in several showrooms, conveniently located on the left and right banks.</div><div class=wrap-phil-p><p>Here, professional consultants will help you to implement a holistic complete interior - from the kitchen, bedroom, living room and study to the children\\'s room <a href=# class=link-arrow>→</a></div>',\n 'body_it' => '<div class=wrap-phil-p><p>Italian furniture showroom CAVIO found its adherents in 38 countries, including Switzerland, France, Sweden, Netherlands, Germany, Australia and the United States.</div><div class=wrap-phil-p><p>In Kiev, the Italian furniture CAVIO presented in several showrooms, conveniently located on the left and right banks.</div><div class=wrap-phil-p><p>Here, professional consultants will help you to implement a holistic complete interior - from the kitchen, bedroom, living room and study to the children\\'s room <a href=# class=link-arrow>→</a></div>',\n 'image' => 'phil-image.jpg',\n 'title_limit' => 15,\n 'body_limit' => 810,\n 'created_at' => Carbon::now(),\n 'updated_at' => Carbon::now(),\n ],\n [\n 'page_id' => 9,\n 'title' => 'Privacy Policy',\n 'title_ru' => 'Политика приватности',\n 'title_it' => 'Politica sulla riservatezza',\n 'body' => '',\n 'body_ru' => '',\n 'body_it' => '',\n 'image' => null,\n 'title_limit' => 30,\n 'body_limit' => null,\n 'created_at' => Carbon::now(),\n 'updated_at' => Carbon::now(),\n ],\n\n /*\n * Showroom page\n */\n\n [\n 'page_id' => 5,\n 'title' => '',\n 'title_ru' => '',\n 'title_it' => '',\n 'body' => '',\n 'body_ru' => '',\n 'body_it' => '',\n 'title_limit' => null,\n 'body_limit' => null,\n 'image' => 'show_r-slide-2.jpg',\n 'created_at' => Carbon::now(),\n 'updated_at' => Carbon::now(),\n ],\n [\n 'page_id' => 5,\n 'title' => '',\n 'title_ru' => '',\n 'title_it' => '',\n 'body' => '',\n 'body_ru' => '',\n 'body_it' => '',\n 'title_limit' => null,\n 'body_limit' => null,\n 'image' => 'show_r-slide-3.jpg',\n 'created_at' => Carbon::now(),\n 'updated_at' => Carbon::now(),\n ],\n [\n 'page_id' => 5,\n 'title' => '',\n 'title_ru' => '',\n 'title_it' => '',\n 'body' => '',\n 'body_ru' => '',\n 'body_it' => '',\n 'title_limit' => null,\n 'body_limit' => null,\n 'image' => 'show_r-slide-1.jpg',\n 'created_at' => Carbon::now(),\n 'updated_at' => Carbon::now(),\n ],\n [\n 'page_id' => 5,\n 'title' => '',\n 'title_ru' => '',\n 'title_it' => '',\n 'body' => 'Don’t found showroom<br>near you? <span class=colored>Contact main</span><br>',\n 'body_ru' => 'Не нашли салон рядом<br>с вами? <span class=colored>Обратитесь в главный</span><br>',\n 'body_it' => 'Non ho trovato lo showroom<br>vicino a te? <span class=colored>Contatto principale</span><br>',\n 'image' => null,\n 'title_limit' => null,\n 'body_limit' => 100,\n 'created_at' => Carbon::now(),\n 'updated_at' => Carbon::now(),\n ],\n [\n 'page_id' => 5,\n 'title' => 'Main Showroom',\n 'title_ru' => 'Главный магазин',\n 'title_it' => 'Showroom principale',\n 'body' => 'Viale Europa, 6/a, 37050<br>San Pietro di Morubio (VR) Italia<br><br>Telefone: <a href=tel:+390457144503 class=tel>+39 045 71 44 503</a><br>Fax: <a href=tel:+390457144277 class=tel>+39 045 71 44 277</a><br><br><a href=mailto:info@cavio.it class=\"colored_link anim-underline\">info@cavio.it</a>',\n 'body_ru' => 'Viale Europa, 6/a, 37050<br>San Pietro di Morubio (VR) Italia<br><br>Telefone: <a href=tel:+390457144503 class=tel>+39 045 71 44 503</a><br>Fax: <a href=tel:+390457144277 class=tel>+39 045 71 44 277</a><br><br><a href=mailto:info@cavio.it class=\"colored_link anim-underline\">info@cavio.it</a>',\n 'body_it' => 'Viale Europa, 6/a, 37050<br>San Pietro di Morubio (VR) Italia<br><br>Telefone: <a href=tel:+390457144503 class=tel>+39 045 71 44 503</a><br>Fax: <a href=tel:+390457144277 class=tel>+39 045 71 44 277</a><br><br><a href=mailto:info@cavio.it class=\"colored_link anim-underline\">info@cavio.it</a>',\n 'image' => 'main-showroom.jpg',\n 'title_limit' => null,\n 'body_limit' => 320,\n 'created_at' => Carbon::now(),\n 'updated_at' => Carbon::now(),\n ],\n\n\n ];\n\n DB::table('blocks')->insert($blocks);\n\n\n $this->enableForeignKeys();\n }", "function groom_block_info()\n{\n $blocks['groom_calendar_standard'] = array(\n 'info' => t('Calendrier Groom - Standard'),\n );\n $blocks['groom_calendar_solo'] = array(\n 'info' => t('Calendrier Groom - Solo'),\n );\n $blocks['groom_calendar_vip'] = array(\n 'info' => t('Calendrier Groom - VIP'),\n );\n\n return $blocks;\n}", "public function create()\n {\n return view('blocks.create');\n }", "function get_dynamic_block_names()\n {\n }", "function date_tools_wizard_create_blocks($type_name) {\n $current_theme = variable_get('theme_default', 'garland');\n \n // Legend block.\n $block = new stdClass();\n $block->theme = $current_theme;\n $block->status = 1;\n $block->weight = -1;\n $block->region = 'left';\n $block->title = '';\n $block->module = 'calendar';\n $block->delta = 0;\n date_tools_wizard_add_block($block);\n \n // Mini calendar block. \n $block->module = 'views';\n $block->delta = 'calendar_'. $type_name .'-calendar_block_1';\n date_tools_wizard_add_block($block); \n \n // Upcoming events block.\n $block->module = 'views';\n $block->delta = 'calendar_'. $type_name .'-block_1';\n date_tools_wizard_add_block($block);\n return; \n}", "function gutenberg_prepare_blocks_for_js() {\n\t$block_registry = WP_Block_Type_Registry::get_instance();\n\t$blocks = array();\n\t$keys_to_pick = array( 'title', 'description', 'icon', 'category', 'keywords', 'supports', 'attributes' );\n\n\tforeach ( $block_registry->get_all_registered() as $block_name => $block_type ) {\n\t\tforeach ( $keys_to_pick as $key ) {\n\t\t\tif ( ! isset( $block_type->{ $key } ) ) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tif ( ! isset( $blocks[ $block_name ] ) ) {\n\t\t\t\t$blocks[ $block_name ] = array();\n\t\t\t}\n\n\t\t\t$blocks[ $block_name ][ $key ] = $block_type->{ $key };\n\t\t}\n\t}\n\n\treturn $blocks;\n}", "public function getDefaultBlocks()\n\t{\n\t\t$sections = [];\n\t\tforeach($this->sections as $section_def){\n\t\t\t$section = [ 'name' => $section_def['name'], 'blocks' => []];\n\t\t\tif(isset($section_def['defaultBlocks']) && !empty($section_def['defaultBlocks'])){\n\t\t\t\tforeach($section_def['defaultBlocks'] as $block_id){\n\t\t\t\t\t$block_def = Block::fromDefinitionFile(Block::locateDefinition($block_id));\n\t\t\t\t\tif($block_def){\n\t\t\t\t\t\t$section['blocks'][] = $block_def->getDefaultData($this->name, $section_def['name']);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t$sections[] = $section;\n\t\t}\n\t\treturn $sections;\n\t}", "public static function createCMSBlockTable()\n\t{\n\t}", "protected function _getBlockArray()\n {\n return array(\n \n /*\n * Minicart section\n */\n array(\n 'version' => '0.0.1',\n 'identifier' => 'header_contact_information',\n 'stores' => [0],\n 'title' => 'Header Contact Information',\n 'content' => <<<HTML\n<div id=\"phone-hrs\">\n <a href=\"https://goo.gl/maps/seJQCD3gzao\" target=\"_blank\">Visit Us</a> or Call Us: <a id=\"phone-number\" href=\"tel:+18009387925\">(800) 938-7925</a> &nbsp;&nbsp; Today's Hours: 7:00am - 6:00pm\n</div>\nHTML\n ),\n array(\n 'version' => '0.0.3',\n 'identifier' => 'home_sidebar',\n 'stores' => [0],\n 'title' => 'Home Sidebar',\n 'content' => <<<HTML\n<div class=\"sidebar\">\n <div class=\"home-side-menu\">\n <h2 class=\"side-menu-title\">CATEGORIES</h2>\n {{block class=\"Smartwave\\Megamenu\\Block\\Topmenu\" name=\"sw.sidenav\" template=\"Smartwave_Megamenu::sidemenu.phtml\" ttl=\"3600\"}} </div>\n <!-- start -->\n <div id=\"ads-slider-demo-9\">\n <div class=\"item\">\n <h2><a href=\"#\">Blog Articles</a></h2>\n <ul class=\"recent-blog\" style=\"list-style:none; padding-inline-start:12px; padding-right:12px;\">\n <li><a title=\"Bosch Laser Level - GLL3-330CG\" href=\"https://www.masterwholesale.com/blog/bosch-green-line-laser-level-review/\" target=\"_blank\">Review: Bosch Green Line Laser Level</a></li>\n <li><a title=\"Makita LXT Lithium Ion Cordless Brushless Angle Grinder\" href=\"https://www.masterwholesale.com/blog/makita-18v-lxt-lithium-ion-cordless-brushless-angle-grinder-review/\" target=\"_blank\">Review: Makita&nbsp;<span>LXT Cordless Brushless Angle Grinder&nbsp;</span></a></li>\n <li><a title=\"Mixing Laticrete PermaColor Grout\" href=\"https://www.masterwholesale.com/blog/how-to-mix-small-batch-laticrete-permacolor-select-grout/\" target=\"_blank\">How to Mix a Small Batch of Laticrete PermaColor Grout</a></li>\n <li><a title=\"Polishing Tile Edges with Diamond Hand Polishing Pads\" href=\"https://www.masterwholesale.com/blog/polish-stone-porcelain-tile-diamond-hand-polishing-pads/\" target=\"_blank\">How to Polish Tile Edges w/ Diamond Hand Polishing Pads</a></li>\n <li><a title=\"Stoning Porcelain and Stone Tile\" href=\"https://www.masterwholesale.com/blog/stone-edge-porcelain-tile-stone/\" target=\"_blank\">How to Stone or Edge Porcelain and Stone Tiles</a></li>\n <li><a title=\"Bridge Saw vs Sliding Table Saw\" href=\"https://www.masterwholesale.com/blog/366-2/\" target=\"_blank\">Bridge Saw vs Sliding Table Saw</a></li>\n <li><a title=\"How to Core with a Diamond Core Drill Bit\" href=\"https://www.masterwholesale.com/blog/dry-core-drill-tile-stone/\" target=\"_blank\">How to Dry Core Drill on Stone or Tile</a></li>\n <li><a title=\"How to Reopen a diamond Core Bit \" href=\"https://www.masterwholesale.com/blog/master-wholesale-reopen-diamond-core-bit/\" target=\"_blank\">How to Sharpen or Reopen a Diamond Core Bit</a></li>\n <li><a title=\"Resin Glass Blade Shootout\" href=\"https://www.masterwholesale.com/blog/resin-glass-blade-shootout/\" target=\"_blank\">Resin Glass Blade Shootout with Blake Adsero</a></li>\n <li><a title=\"Makita Polishing Kit\" href=\"https://www.masterwholesale.com/blog/makita-pw5001c-wet-polishing-kit-master-wholesale/\" target=\"_blank\">How to Polish an Exposed Edge on Stone Tile</a></li>\n <li><a title=\"Deluxe Dry Polishing Kit\" href=\"https://www.masterwholesale.com/blog/?p=254\" target=\"_self\">MWI Deluxe Dry Polishing Kit Demo</a></li>\n <li><a title=\"Laser Level Shootout\" href=\"https://www.masterwholesale.com/blog/laser-level-shootout/\" target=\"_self\">Laser Level Shootout</a></li>\n <li><a title=\"Ishii Tile Cutters\" href=\"https://www.masterwholesale.com/blog/how-to-assemble-and-use-the-ishii-blue-tile-cutters/\" target=\"_self\">How to Assemble and Use Ishii BlueTile Cutters</a></li>\n <li><a title=\"Diamond Blade Shootout\" href=\"https://www.masterwholesale.com/blog/tile-saw-diamond-blade-shootout/\" target=\"_self\">Tile Saw Diamond Blade Shootout</a></li>\n </ul>\n </div>\n </div>\n <!-- end --> \n <!-- start -->\n <div id=\"ads-slider-demo-9\" class=\"owl-carousel\">\n <div class=\"item\" style=\"text-align:center;\"> <img src=\"\" alt=\"\" style=\"display:inline-block;\"/> </div>\n </div>\n <!-- end --> \n <!-- start -->\n <div id=\"ads-slider-demo-9\">\n <div class=\"item\" style=\"text-align:center;\"> {{block class=\"Magento\\Framework\\View\\Element\\Template\" name=\"single_special\" template=\"Magento_Catalog::product/view/single_special.phtml\" ttl=\"3600\"}} </div>\n </div>\n <!-- end --> \n </div>\nHTML\n ),\n );\n }", "public function availableBlocks(): array\n {\n return Billingo::get('invoices/blocks');\n }", "public function createACFBlock()\n {\n if (function_exists('acf_register_block_type')) {\n acf_register_block_type(\n array(\n 'name' => 'acfBlock',\n 'title' => __('ACF Block'),\n 'description' => __('A custom block that incorporates ACF fields.'),\n 'render_callback' => array($this, 'renderACFBlock'),\n 'category' => 'widgets',\n 'icon' => array('background' => '#ecf6f6', 'src' => 'email'),\n 'keywords' => array('example', 'acf'),\n 'mode' => 'edit'\n )\n );\n }\n }", "public function loadBlockDefinitions(){\n\t\tforeach($this->sections as $section){\n\t\t\tforeach( $section['allowedBlocks'] as $block_id ) {\n\t\t\t\t$path = Block::locateDefinition( $block_id);\n\n\t\t\t\tif (!is_null($path)) {\n\t\t\t\t\t$block = Block::fromDefinitionFile($path);\n\t\t\t\t\t$this->blockDefinitions->push($block);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public function getBlockDefinitions(){\n\t\tif($this->blockDefinitions->isEmpty() && count($this->sections)){\n\t\t\t$this->loadBlockDefinitions();\n\t\t}\n\n\t\treturn $this->blockDefinitions;\n\t}", "public function new() {\n $data = [];\n $this->form_validation->set_rules(Front::BLOCK_NAME, 'Name', Front::REQUIRED);\n $this->form_validation->set_rules(Front::BLOCK_ACRONYM, 'Acronym', Front::REQUIRED);\n $smiles = $this->input->post(Front::BLOCK_SMILES);\n if (!isset($smiles) || $smiles === \"\") {\n $this->form_validation->set_rules(Front::BLOCK_FORMULA, 'Formula', Front::REQUIRED);\n }\n if ($this->form_validation->run() === false) {\n $data[Front::ERRORS] = $this->errors;\n $this->renderNew($data);\n return;\n }\n $data[Front::ERRORS] = 'Block correctly saved';\n try {\n $blockTO = $this->setupNewBlock($smiles);\n $this->database->insert($blockTO);\n } catch (IllegalArgumentException $exception) {\n $data[Front::ERRORS] = $exception->getMessage();\n Logger::log(LoggerEnum::WARNING, $exception->getTraceAsString());\n } catch (UniqueConstraintException $exception) {\n $data[Front::ERRORS] = self::BLOCK_WITH_THIS_ACRONYM_ALREADY_IN_DATABASE;\n Logger::log(LoggerEnum::WARNING, $exception->getMessage());\n } catch (Exception $exception) {\n $data[Front::ERRORS] = $exception->getMessage();\n Logger::log(LoggerEnum::ERROR, $exception->getTraceAsString());\n } finally {\n Front::errorsCheck($data);\n $this->renderNew($data);\n }\n }", "protected function _collectBlocks()\n {\n if ($blocks = $this->_layoutHandleUpdatesXml->xpath('//block/label/..')) {\n /* @var $block Mage_Core_Model_Layout_Element */\n foreach ($blocks as $block) {\n if ((string)$block->getAttribute('name') && $this->_filterBlock($block)) {\n $helper = Mage::helper(Mage_Core_Model_Layout::findTranslationModuleName($block));\n $this->_blocks[(string)$block->getAttribute('name')] = $helper->__((string)$block->label);\n }\n }\n }\n asort($this->_blocks, SORT_STRING);\n }", "function EventReg_listblock_init()\n{\n // Security\n pnSecAddSchema('EventReg:Listblock:', 'Block title:Block Id:Type Id');\n}", "public static function GET_AREA_BLOCKS(){\n\t $SQL_String = \"SELECT * FROM area_block WHERE am_id=:amid AND _keep=1 ORDER BY ab_id ASC\";\n\t return $SQL_String;\n\t}", "public function GetAll() {\n\t\treturn $this->BlockList;\n\t}", "public function actionCreate()\n {\n $model = new InfoBlocks();\n $model->structure_id = Yii::$app->request->get('structure_id');\n $model->type = Yii::$app->request->get('type');\n $model->is_publish = 1;\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n if($model->type == 'gallery') {\n return $this->redirect(['update', 'id' => $model->id]);\n }\n\n $part = Structure::findOne($model->structure_id);\n if($part->type_id !== 2) {\n return $this->redirect($part->getAdminUrl());\n }\n return $this->redirect(['index', 'id' => $model->structure_id]);\n }\n\n return $this->render('create', [\n 'model' => $model\n ]);\n }", "public function all(): array\n {\n return $this->blocks->all();\n }", "public function register_blocks() {\n\n\t\t// Return early if this function does not exist.\n\t\tif ( ! function_exists( 'register_block_type' ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Shortcut for the slug.\n\t\t$slug = $this->_slug;\n\n\t\tregister_block_type(\n\t\t\t$slug . '/accordion',\n\t\t\tarray(\n\t\t\t\t'editor_script' => $slug . '-editor',\n\t\t\t\t'editor_style' => $slug . '-editor',\n\t\t\t\t'style' => $slug . '-frontend',\n\t\t\t)\n\t\t);\n\t\tregister_block_type(\n\t\t\t$slug . '/alert',\n\t\t\tarray(\n\t\t\t\t'editor_script' => $slug . '-editor',\n\t\t\t\t'editor_style' => $slug . '-editor',\n\t\t\t\t'style' => $slug . '-frontend',\n\t\t\t)\n\t\t);\n\t\tregister_block_type(\n\t\t\t$slug . '/author',\n\t\t\tarray(\n\t\t\t\t'editor_script' => $slug . '-editor',\n\t\t\t\t'editor_style' => $slug . '-editor',\n\t\t\t\t'style' => $slug . '-frontend',\n\t\t\t)\n\t\t);\n\t\tregister_block_type(\n\t\t\t$slug . '/click-to-tweet',\n\t\t\tarray(\n\t\t\t\t'editor_script' => $slug . '-editor',\n\t\t\t\t'editor_style' => $slug . '-editor',\n\t\t\t\t'style' => $slug . '-frontend',\n\t\t\t)\n\t\t);\n\t\tregister_block_type(\n\t\t\t$slug . '/dynamic-separator',\n\t\t\tarray(\n\t\t\t\t'editor_script' => $slug . '-editor',\n\t\t\t\t'editor_style' => $slug . '-editor',\n\t\t\t\t'style' => $slug . '-frontend',\n\t\t\t)\n\t\t);\n\t\tregister_block_type(\n\t\t\t$slug . '/gif',\n\t\t\tarray(\n\t\t\t\t'editor_script' => $slug . '-editor',\n\t\t\t\t'editor_style' => $slug . '-editor',\n\t\t\t\t'style' => $slug . '-frontend',\n\t\t\t)\n\t\t);\n\t\tregister_block_type(\n\t\t\t$slug . '/gist',\n\t\t\tarray(\n\t\t\t\t'editor_script' => $slug . '-editor',\n\t\t\t\t'editor_style' => $slug . '-editor',\n\t\t\t\t'style' => $slug . '-frontend',\n\t\t\t)\n\t\t);\n\t\tregister_block_type(\n\t\t\t$slug . '/highlight',\n\t\t\tarray(\n\t\t\t\t'editor_script' => $slug . '-editor',\n\t\t\t\t'editor_style' => $slug . '-editor',\n\t\t\t\t'style' => $slug . '-frontend',\n\t\t\t)\n\t\t);\n\t\tregister_block_type(\n\t\t\t$slug . '/gallery-carousel',\n\t\t\tarray(\n\t\t\t\t'editor_script' => $slug . '-editor',\n\t\t\t\t'editor_style' => $slug . '-editor',\n\t\t\t\t'style' => $slug . '-frontend',\n\t\t\t)\n\t\t);\n\t\tregister_block_type(\n\t\t\t$slug . '/gallery-masonry',\n\t\t\tarray(\n\t\t\t\t'editor_script' => $slug . '-editor',\n\t\t\t\t'editor_style' => $slug . '-editor',\n\t\t\t\t'style' => $slug . '-frontend',\n\t\t\t)\n\t\t);\n\t\tregister_block_type(\n\t\t\t$slug . '/gallery-stacked',\n\t\t\tarray(\n\t\t\t\t'editor_script' => $slug . '-editor',\n\t\t\t\t'editor_style' => $slug . '-editor',\n\t\t\t\t'style' => $slug . '-frontend',\n\t\t\t)\n\t\t);\n\t}", "public function blocks()\n {\n return $this->hasMany(Models\\AccountBlock::class, 'account_id');\n }", "public function getBlock(){\n\t\n\t\tif( empty($this->_block) ){\n\t\n\t\t\t$query\t= $this->_db->getQuery(true);\n\t\t\t\n\t\t\t$query->select( 'b.*, t.*, u.*, m.email AS modified_email, m.username AS modified_username, m.name AS modified_name' );\n\t\t\t\n\t\t\t$query->from( '#__zbrochure_content_blocks AS b' );\n\t\t\t\n\t\t\t$query->join( 'LEFT', '#__users AS u ON u.id = b.content_block_created_by' );\n\t\t\t$query->join( 'LEFT', '#__users AS m ON m.id = b.content_block_modified_by' );\n\t\t\t$query->join( 'LEFT', '#__zbrochure_content_types AS t ON t.content_type_id = b.content_block_type' );\n\t\t\t\n\t\t\t$query->where( 'b.content_block_id = '.$this->_id );\n\t\t\t\n\t\t\t$this->_db->setQuery($query);\n\t\t\t$this->_block = $this->_db->loadObject();\n\t\t\t\n\t\t\t$this->_block->render\t= $this->_getContent();\n\t\t\t\n\t\t}\n\t\t\n\t\treturn $this->_block;\n\t\n\t}", "private function buildBlocks($body){\n\n return $body['blocks'];\n }", "public function getThemeBlocks()\n {\n return $this->blocks;\n }", "public function frontpage_available_courses() {\n global $CFG, $DB;\n\n $chelper = new coursecat_helper();\n $chelper->set_show_courses(self::COURSECAT_SHOW_COURSES_EXPANDED)->set_courses_display_options(array(\n 'recursive' => true,\n 'limit' => $CFG->frontpagecourselimit,\n 'viewmoreurl' => new moodle_url('/course/index.php'),\n 'viewmoretext' => new lang_string('fulllistofcourses')));\n\n $chelper->set_attributes(array('class' => 'frontpage-course-list-all'));\n $courses = core_course_category::get(0)->get_courses($chelper->get_courses_display_options());\n $totalcount = core_course_category::get(0)->get_courses_count($chelper->get_courses_display_options());\n if (!$totalcount &&\n !$this->page->user_is_editing() &&\n has_capability('moodle/course:create', \\context_system::instance())\n ) {\n // Print link to create a new course, for the 1st available category.\n return $this->add_new_course_button();\n }\n $latestcard = get_config('theme_remui', 'enablenewcoursecards');\n $coursehtml = '<div class=\"\">\n <div class=\"card-deck slick-course-slider slick-slider ' . ($latestcard ? 'latest-cards' : '') . '\">';\n\n if (!empty($courses)) {\n foreach ($courses as $course) {\n $coursesummary = strip_tags($chelper->get_course_formatted_summary(\n $course,\n array('overflowdiv' => false, 'noclean' => false, 'para' => false)\n ));\n $coursesummary = strlen($coursesummary) > 100 ? substr($coursesummary, 0, 100).\"...\" : $coursesummary;\n $image = \\theme_remui_coursehandler::get_course_image($course, 1);\n $coursename = strip_tags($chelper->get_course_formatted_name($course));\n if (!$latestcard) {\n $coursehtml .= \"\n <div class='card w-100 rounded-bottom mx-0 bg-transparent d-inline-flex flex-column' style='height: 100%;'>\n <div class='m-2 bg-white border' style='height: 100%;'>\n <div\n class='rounded-top'\n style='height: 200px;\n background-image: url({$image});\n background-size: cover;\n background-position: center;\n box-shadow: 0 2px 5px #cccccc;'>\n </div>\n <div class='card-body p-3'>\n <h4 class='card-title m-1 ellipsis ellipsis-2'>\n <a\n href='{$CFG->wwwroot}/course/view.php?id={$course->id}'\n class='font-weight-400 blue-grey-600 font-size-18'>\n {$coursename}\n </a>\n </h4>\n <p class='card-text m-1'>{$coursesummary}</p>\n </div>\n </div>\n </div>\";\n } else {\n if (isset($course->startdate)) {\n $startdate = date('d M, Y', $course->startdate);\n $day = substr($startdate, 0, 2);\n $month = substr($startdate, 3, 3);\n $year = substr($startdate, 8, 4);\n }\n $categoryname = $DB->get_record('course_categories', array('id' => $course->category))->name;\n $categoryname = strip_tags(format_text($categoryname));\n $coursehtml .= \"\n <div class='px-1 course_card card '>\n <div class='wrapper h-100'\n style='background-image: url({$image});\n background-size: cover;\n background-position: center;\n position: relative;'>\n <div class='date btn-primary'>\n <span class='day'>{$day}</span>\n <span class='month'>{$month}</span>\n <span class='year'>{$year}</span>\n </div>\n <div class='data'>\n <div class='content' title='{$coursename}'>\n <span class='author'>{$categoryname}</span>\n <h4 class='title ellipsis ellipsis-3' style='-webkit-box-orient: vertical;visibility: visible;'>\n <a href='{$CFG->wwwroot}/course/view.php?id={$course->id}'>{$coursename}</a>\n </h4>\n <p class='text'>{$coursesummary}</p>\n </div>\n </div>\n </div>\n </div>\";\n }\n }\n }\n\n $coursehtml .= '</div></div>';\n\n $coursehtml .= \" <div class='available-courses button-container w-100 text-center '>\n <button type='button' class='btn btn-floating btn-primary btn-prev btn-sm'>\n <i class='icon fa fa-chevron-left' aria-hidden='true'></i>\n </button>\n <button type='button' class='btn btn-floating btn-primary btn-next btn-sm'>\n <i class='icon fa fa-chevron-right' aria-hidden='true'></i>\n </button>\n </div>\";\n\n $coursehtml .= \"\n <div class='row'>\n <div class='col-12 text-right'>\n <a href='{$CFG->wwwroot}/course' class='btn btn-primary'>\" . get_string('viewallcourses', 'core').\"</a>\n </div>\n </div>\";\n\n return $coursehtml;\n }", "protected function generateCourses()\n {\n /**\n * Let's go through the archane paths that lead us to the actual\n * table of grades.\n */\n $mainTable = $this->__transcriptDOM\n ->getElementsByTagName('table')->item(0);\n\n $rowOfGrades = $mainTable->childNodes->item(4);\n $gradesTable = $rowOfGrades->firstChild->firstChild;\n\n $this->courses = [];\n\n foreach ($gradesTable->childNodes as $row) {\n // The rows containing the grades have 13 columns.\n if ($row->childNodes->length == 13) {\n $data = $row->childNodes;\n $course = new Course;\n\n $course->code = strtoupper($data->item(0)->nodeValue.$data->item(1)->nodeValue);\n $course->semester = $data->item(2)->nodeValue;\n $course->section = $data->item(3)->nodeValue;\n $course->description = $data->item(4)->nodeValue;\n $course->creditsWorth = $data->item(5)->nodeValue;\n $course->grade = $data->item(6)->nodeValue;\n $course->gpaEarned = $data->item(7)->nodeValue;\n $course->classAvg = $data->item(8)->nodeValue;\n $course->classSize = $data->item(9)->nodeValue;\n $course->creditsEarned = $data->item(10)->nodeValue;\n\n $this->courses[$course->code] = $course;\n }\n }\n }", "public function getThemeBlocks();", "public function actionGetBlocks()\n {\n $this->requirePostRequest();\n $this->requireAjaxRequest();\n\n // get elemendIds from POST\n $elemendIds = craft()->request->getPost('elemendIds');\n\n $criteria = craft()->elements->getCriteria(ElementType::MatrixBlock);\n $criteria->id = $elemendIds;\n $blocks = $criteria->find();\n\n\n // return blockTypeIdsByElementId or false\n if ( $blocks ) {\n $this->returnJson(array(\n 'success' => true,\n 'blocks' => $blocks\n ));\n } else {\n $this->returnJson(array(\n 'success' => false\n ));\n }\n }", "public function getCourseList()\n {\n $course_list = [];\n\n foreach($this->sections as $section)\n {\n $course_list[$section->getCourseId()] = $section->course_subject.' '.$section->course_number.' '.$section->course_name;\n }\n\n return $course_list;\n }", "function AllowGutenbergBlocks(){\n $AllowedBlocks = array_merge($this->WPgutenberg_AllowedBlocks, $this->WPgutenberg_CustomAllowedBlocks);\n return $AllowedBlocks;\n }", "public function new_block() {\n\t\t$log_text = \"\";\n\t\t$created_block_id = $this->blockchain->new_block($log_text);\n\t\tlist($successful, $log_text) = $this->add_block($created_block_id);\n\t\t$this->update_option_votes();\n\t\t$this->check_set_game_over();\n\t\treturn $log_text;\n\t}", "function event_details_cpt_single_blocks( $blocks ) {\n // Add new blocks with custom function output\n // Below is an example with an anonymous function but you can use custom functions as well ;)\n $blocks['custom_block'] = function() {\n\n echo '';\n\n };\n\n // Remove these content blocks\n unset( $blocks['comments'] );\n\t unset( $blocks['meta'] );\n\t unset( $blocks['title'] );\n\t unset( $blocks['media'] );\n\t\n // Return blocks\n return $blocks;\n\n}", "function register_blocks() {\t\n\n // Fail if block editor is not supported\n\tif ( ! function_exists( 'register_block_type' ) ) {\n\t\treturn;\n\t}\n\n // List all of the blocks for your plugin\n $blocks = [\n \"antaresplugin/gallery\",\n ];\n\n // Register each block with same CSS and JS\n foreach( $blocks as $block ) {\n if( \"antaresplugin/gallery\" === $block ) { \n register_block_type( $block, [\n 'editor_script' => 'antares-plugin-editor-js',\n 'editor_style' => 'antares-plugin-editor-css',\n 'style' => 'antares-plugin-css',\n 'attributes' => [ \n 'images' => [\n 'type' => \"array\",\n 'default' => []\n ],\n 'direction' => [\n 'type'=> \"string\",\n 'default' => \"row\"\n ],\n 'isLightboxEnabled' => [\n 'type' => \"boolean\",\n 'default' => true\n ]\n ]\n ] );\t \n }\n else { \n register_block_type( $block, [\n 'editor_script' => 'antares-plugin-editor-js',\n 'editor_style' => 'antares-plugin-editor-css',\n 'style' => 'antares-plugin-css'\n ] );\t \n }\n }\n\n}", "public static function getBlockRenderList()\n {\n return ['onePageBlock'];\n }", "function expose_blocks($content) {\n $raw_blocks = parse_blocks($content);\n $blocks = array();\n\n foreach ($raw_blocks as $block) {\n if ($block['blockName']) { \n $block['content'] = render_block($block);\n $blocks[] = $block;\n }\n }\n\n return $blocks;\n}", "public function splitIntoBlockDataProvider() {}", "public function blockAction()\n {\n $blockId = $this->params()->fromRoute('block');\n $handles = $this->params()->fromQuery('handles', []);\n /* @var $layoutManager LayoutManager */\n $layoutManager = $this->layoutManager();\n foreach ($handles as $handle => $priority) {\n $layoutManager->addHandle(new Handle($handle, $priority));\n }\n if (!$blockId) {\n return $this->blockNotFound($blockId);\n }\n $layoutManager->generate([BlocksGenerator::NAME => true]);\n if (!$block = $layoutManager->getBlock($blockId)) {\n $block = $this->blockNotFound($blockId);\n }\n $block->setVariable('__ESI__', true);\n $block->setTerminal(true);\n return $block;\n }", "function upgrade_blocks_plugins($continueto) {\n\n global $CFG;\n\n $blocktitles = array();\n $invalidblocks = array();\n $validblocks = array();\n $notices = array();\n\n //Count the number of blocks in db\n $blockcount = count_records('block');\n //If there isn't records. This is the first install, so I remember it\n if ($blockcount == 0) {\n $first_install = true;\n } else {\n $first_install = false;\n }\n\n $site = get_site();\n\n if (!$blocks = get_list_of_plugins('blocks', 'db') ) {\n error('No blocks installed!');\n }\n\n include_once($CFG->dirroot .'/blocks/moodleblock.class.php');\n if(!class_exists('moodleblock')) {\n error('Class MoodleBlock is not defined or file not found for /blocks/moodleblock.class.php');\n }\n\n foreach ($blocks as $blockname) {\n\n if ($blockname == 'NEWBLOCK') { // Someone has unzipped the template, ignore it\n continue;\n }\n\n $fullblock = $CFG->dirroot .'/blocks/'. $blockname;\n\n if ( is_readable($fullblock.'/block_'.$blockname.'.php')) {\n include_once($fullblock.'/block_'.$blockname.'.php');\n } else {\n $notices[] = 'Block '. $blockname .': '. $fullblock .'/block_'. $blockname .'.php was not readable';\n continue;\n }\n\n if ( @is_dir($fullblock .'/db/')) {\n if ( @is_readable($fullblock .'/db/'. $CFG->dbtype .'.php')) {\n include_once($fullblock .'/db/'. $CFG->dbtype .'.php'); // defines upgrading function\n } else {\n $notices[] ='Block '. $blockname .': '. $fullblock .'/db/'. $CFG->dbtype .'.php was not readable';\n continue;\n }\n }\n\n $classname = 'CourseBlock_'.$blockname;\n if(!class_exists($classname)) {\n $notices[] = 'Block '. $blockname .': '. $classname .' not implemented';\n continue;\n }\n\n // Here is the place to see if the block implements a constructor (old style),\n // an init() function (new style) or nothing at all (error time).\n\n $constructor = get_class_constructor($classname);\n if(empty($constructor)) {\n // No constructor\n $notices[] = 'Block '. $blockname .': class does not have a constructor';\n $invalidblocks[] = $blockname;\n continue;\n }\n $methods = get_class_methods($classname);\n if(!in_array('init', $methods)) {\n // This is an old-style block\n $notices[] = 'Block '. $blockname .' is an old style block and needs to be updated by a programmer.';\n $invalidblocks[] = $blockname;\n continue;\n }\n\n $block = new stdClass; // This may be used to update the db below\n $blockobj = new $classname; // This is what we 'll be testing\n\n // Inherits from MoodleBlock?\n if(!is_subclass_of($blockobj, 'moodleblock')) {\n $notices[] = 'Block '. $blockname .': class does not inherit from MoodleBlock';\n continue;\n }\n\n // OK, it's as we all hoped. For further tests, the object will do them itself.\n if(!$blockobj->_self_test()) {\n $notices[] = 'Block '. $blockname .': self test failed';\n continue;\n }\n $block->version = $blockobj->get_version();\n\n if (!isset($block->version)) {\n $notices[] = 'Block '. $blockname .': has no version support. It must be updated by a programmer.';\n continue;\n }\n\n $block->name = $blockname; // The name MUST match the directory\n $blocktitle = $blockobj->get_title();\n\n if ($currblock = get_record('block', 'name', $block->name)) {\n if ($currblock->version == $block->version) {\n // do nothing\n } else if ($currblock->version < $block->version) {\n if (empty($updated_blocks)) {\n $strblocksetup = get_string('blocksetup');\n print_header($strblocksetup, $strblocksetup, $strblocksetup, '', '', false, '&nbsp;', '&nbsp;');\n }\n print_heading('New version of '.$blocktitle.' ('.$block->name.') exists');\n $upgrade_function = $block->name.'_upgrade';\n if (function_exists($upgrade_function)) {\n $db->debug=true;\n if ($upgrade_function($currblock->version, $block)) {\n\n $upgradesuccess = true;\n } else {\n $upgradesuccess = false;\n }\n $db->debug=false;\n }\n else {\n $upgradesuccess = true;\n }\n if(!$upgradesuccess) {\n notify('Upgrading block '. $block->name .' from '. $currblock->version .' to '. $block->version .' FAILED!');\n }\n else {\n // OK so far, now update the block record\n $block->id = $currblock->id;\n if (! update_record('block', $block)) {\n error('Could not update block '. $block->name .' record in block table!');\n }\n notify(get_string('blocksuccess', '', $blocktitle), 'green');\n echo '<hr />';\n }\n $updated_blocks = true;\n } else {\n error('Version mismatch: block '. $block->name .' can\\'t downgrade '. $currblock->version .' -> '. $block->version .'!');\n }\n\n } else { // block not installed yet, so install it\n\n // If it allows multiples, start with it enabled\n $block->multiple = $blockobj->instance_allow_multiple();\n\n // [pj] Normally this would be inline in the if, but we need to\n // check for NULL (necessary for 4.0.5 <= PHP < 4.2.0)\n $conflictblock = array_search($blocktitle, $blocktitles);\n if($conflictblock !== false && $conflictblock !== NULL) {\n // Duplicate block titles are not allowed, they confuse people\n // AND PHP's associative arrays ;)\n error('<strong>Naming conflict</strong>: block <strong>'.$block->name.'</strong> has the same title with an existing block, <strong>'.$conflictblock.'</strong>!');\n }\n if (empty($updated_blocks)) {\n $strblocksetup = get_string('blocksetup');\n print_header($strblocksetup, $strblocksetup, $strblocksetup, '', '', false, '&nbsp;', '&nbsp;');\n }\n print_heading($block->name);\n $updated_blocks = true;\n $db->debug = true;\n @set_time_limit(0); // To allow slow databases to complete the long SQL\n if (!is_dir($fullblock .'/db/') || modify_database($fullblock .'/db/'. $CFG->dbtype .'.sql')) {\n $db->debug = false;\n if ($block->id = insert_record('block', $block)) {\n notify(get_string('blocksuccess', '', $blocktitle), 'green');\n echo '<hr />';\n } else {\n error($block->name .' block could not be added to the block list!');\n }\n } else {\n error('Block '. $block->name .' tables could NOT be set up successfully!');\n }\n }\n\n $blocktitles[$block->name] = $blocktitle;\n }\n\n if(!empty($notices)) {\n foreach($notices as $notice) {\n notify($notice);\n }\n }\n\n // Finally, if we are in the first_install of BLOCKS (this means that we are\n // upgrading from Moodle < 1.3), put blocks in all existing courses.\n if ($first_install) {\n //Iterate over each course\n if ($courses = get_records('course')) {\n foreach ($courses as $course) {\n $page = new stdClass;\n $page->type = MOODLE_PAGE_COURSE;\n $page->id = $course->id;\n blocks_repopulate_page($page);\n }\n }\n }\n\n if (!empty($CFG->siteblocksadded)) { /// This is a once-off hack to make a proper upgrade\n $page = new stdClass;\n $page->type = MOODLE_PAGE_COURSE;\n $page->id = SITEID;\n blocks_repopulate_page($page);\n delete_records('config', 'name', 'siteblocksadded');\n }\n\n if (!empty($updated_blocks)) {\n print_continue($continueto);\n die;\n }\n}", "function get_global_content_blocks()\n {\n #global $db_settings, $pdo;\n $gcb_result = Database::$content->query(\"SELECT id, identifier, content FROM \".Database::$db_settings['gcb_table'].\" ORDER BY id ASC\");\n while($row = $gcb_result->fetch())\n {\n $gcb[$row['identifier']] = $row['content'];\n #if($row['content_formatting']==1) $gcb[$row['id']] = auto_html($gcb[$row['id']]);\n }\n if(isset($gcb))\n {\n return $gcb;\n }\n return false;\n }", "public function add()\n {\n $course_description = new CourseDescription();\n $session_id = api_get_session_id();\n $course_description->set_session_id($session_id);\n\n $data = array();\n if (strtoupper($_SERVER['REQUEST_METHOD']) == \"POST\") {\n if (!empty($_POST['title']) && !empty($_POST['contentDescription'])) {\n if (1) {\n $title = $_POST['title'];\n $content = $_POST['contentDescription'];\n $description_type = $_POST['description_type'];\n if ($description_type >= ADD_BLOCK) {\n $course_description->set_description_type($description_type);\n $course_description->set_title($title);\n $course_description->set_content($content);\n $course_description->insert(api_get_course_int_id());\n }\n\n Display::addFlash(\n Display::return_message(\n get_lang('CourseDescriptionUpdated')\n )\n );\n }\n $this->listing(false);\n } else {\n $data['error'] = 1;\n $data['default_description_titles'] = $course_description->get_default_description_title();\n $data['default_description_title_editable'] = $course_description->get_default_description_title_editable();\n $data['default_description_icon'] = $course_description->get_default_description_icon();\n $data['question'] = $course_description->get_default_question();\n $data['information'] = $course_description->get_default_information();\n $data['description_title'] = $_POST['title'];\n $data['description_content'] = $_POST['contentDescription'];\n $data['description_type'] = $_POST['description_type'];\n $this->view->set_data($data);\n $this->view->set_layout('layout');\n $this->view->set_template('add');\n $this->view->render();\n }\n } else {\n $data['default_description_titles'] = $course_description->get_default_description_title();\n $data['default_description_title_editable'] = $course_description->get_default_description_title_editable();\n $data['default_description_icon'] = $course_description->get_default_description_icon();\n $data['question'] = $course_description->get_default_question();\n $data['information'] = $course_description->get_default_information();\n $data['description_type'] = $course_description->get_max_description_type();\n // render to the view\n $this->view->set_data($data);\n $this->view->set_layout('layout');\n $this->view->set_template('add');\n $this->view->render();\n }\n }", "function loadMyBlock() {\n wp_enqueue_script(\n 'my-new-block',\n plugin_dir_url(__FILE__) . 'catalog-block-build.js',\n array('wp-blocks','wp-editor'),\n true\n );\n}", "function myblocks() {\n $this->name=\"myblocks\";\n $this->title=\"<#LANG_MODULE_MYBLOCKS#>\";\n $this->module_category=\"<#LANG_SECTION_SETTINGS#>\";\n $this->checkInstalled();\n}", "public function getProcessingBlocks()\n {\n static $resultBlocks = array();\n\n if (empty($resultBlocks)) {\n $blocks = explode(';', $this->getStoreConfig(self::XML_PATH_OTHER_BLOCKS));\n\n $resultBlocks = array();\n foreach ($blocks as $blockName) {\n $blockName = trim($blockName);\n if (!empty($blockName)) {\n $resultBlocks[] = $blockName;\n }\n }\n }\n\n return $resultBlocks;\n }", "function serialize_blocks($blocks)\n {\n }", "function register_blocks() {\n\trequire_once DKOO_BLOCKS_PATH . 'blocks/background-video/index.php';\n\tBackgroundVideo\\register_block();\n}", "function get_block_types() {\n\treturn array(\n\t\t'Text'=>TextBlock::GetLabel(),\n\t\t'RSS'=>RSSBlock::GetLabel(),\n\t\t'Timeline'=>TimelineBlock::GetLabel(),\n\t\t'Quote'=>QuoteBlock::GetLabel(),\n\t\t'Links'=>LinksBlock::GetLabel(),\n\t\t'Calendar'=>CalendarBlock::GetLabel()\n\t);\n}", "private function get_dynamic_block_names() {\n\t\t$blocks = array();\n\t\tforeach ( get_dynamic_block_names() as $name ) {\n\t\t\tif ( 0 !== strpos( $name, 'llms/' ) ) {\n\t\t\t\t$blocks[] = $name;\n\t\t\t}\n\t\t}\n\t\treturn apply_filters( 'llms_blocks_get_dynamic_block_names', $blocks );\n\t}", "function setup_starter_register_custom_blocks() {\n\n $blocks = array(\n 'feature' => array(\n 'name' => 'feature_pull_block',\n 'title' => __('Feature Pull Block'),\n 'render_template' => plugin_dir_path( __FILE__ ).'../blocks/block-feature-pull-setup-starter.php',\n 'category' => 'setup_starter',\n 'icon' => 'list-view',\n 'mode' => 'edit',\n 'keywords' => array( 'feature', 'highlight', 'pull' ),\n ),\n \n ); //echo $blocks[ 'feature']['render_template'];\n /*\n 'logs' => array(\n 'name' => 'log',\n 'title' => __('Log'),\n 'render_template' => 'partials/blocks/block-log-setup-starter.php',\n 'category' => 'setup_starter',\n 'icon' => 'list-view',\n 'mode' => 'edit',\n 'keywords' => array( 'update', 'log' ),\n ),\n */\n\n // Bail out if function doesn’t exist or no blocks available to register.\n if ( !function_exists( 'acf_register_block_type' ) && !$blocks ) {\n return;\n }\n \n // this loop is broken, how do we register multiple blocks in one go?\n // Register all available blocks.\n foreach ($blocks as $block) {\n acf_register_block_type( $block );\n }\n \n}", "public function frontpage_my_courses() {\n\n global $USER, $CFG, $DB;\n $content = html_writer::start_tag('div', array('class' => 'frontpage-enrolled-courses') );\n $content .= html_writer::start_tag('div', array('class' => 'container'));\n $content .= html_writer::tag('h2', get_string('mycourses'));\n $coursehtml = parent::frontpage_my_courses();\n if ($coursehtml == '') {\n\n $coursehtml = \"<div id='mycourses'><style> #frontpage-course-list.frontpage-mycourse-list { display:none;}\";\n $coursehtml .= \"</style></div>\";\n }\n $content .= $coursehtml;\n $content .= html_writer::end_tag('div');\n $content .= html_writer::end_tag('div');\n\n return $content;\n }", "public function getNextBlock();", "public function get_default_blocks() {\n\n return array(\n\n BLOCK_POS_LEFT => array(),\n\n BLOCK_POS_RIGHT => array('search_forums', 'news_items', 'calendar_upcoming', 'recent_activity')\n\n );\n\n }", "public function set_all_gde_blocks_by_time() {\n\t\t// set blocks 24 hrs before, 2 hrs before and when the event starts\n\t\t$time_offsets = array(60*60*24, 60*60*2, 0);\n\t\t$last_block_id = $this->last_block_id();\n\t\t\n\t\t$block_q = \"SELECT * FROM game_blocks gb JOIN blocks b ON gb.internal_block_id=b.internal_block_id WHERE gb.game_id='\".$this->db_game['game_id'].\"' AND (gb.block_id='\".$last_block_id.\"' OR gb.block_id='\".($last_block_id-1).\"') ORDER BY gb.block_id DESC;\";\n\t\t$block_r = $this->blockchain->app->run_query($block_q);\n\t\t\n\t\tif ($block_r->rowCount() == 2) {\n\t\t\t$db_block = $block_r->fetch();\n\t\t\t$db_prev_block = $block_r->fetch();\n\t\t\t\n\t\t\t$event_q = \"SELECT * FROM game_defined_events WHERE game_id='\".$this->db_game['game_id'].\"' AND (\";\n\t\t\t\n\t\t\tfor ($offset_i=0; $offset_i<count($time_offsets); $offset_i++) {\n\t\t\t\t$sec_offset = $time_offsets[$offset_i];\n\t\t\t\t\n\t\t\t\t$event_q .= \"(event_starting_time > '\".date(\"Y-m-d G:i:s\", $db_prev_block['time_mined']+$sec_offset).\"' AND event_starting_time <= '\".date(\"Y-m-d G:i:s\", $db_block['time_mined']+$sec_offset).\"')\";\n\t\t\t\tif ($offset_i<count($time_offsets)-1) $event_q .= \" OR \";\n\t\t\t}\n\t\t\t$event_q .= \");\";\n\t\t\t$event_r = $this->blockchain->app->run_query($event_q);\n\t\t\t\n\t\t\tif ($event_r->rowCount() > 0) {\n\t\t\t\t$this->check_set_game_definition(\"defined\");\n\t\t\t\t\n\t\t\t\twhile ($gde = $event_r->fetch()) {\n\t\t\t\t\t$this->set_gde_blocks_by_time($gde);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$this->check_set_game_definition(\"defined\");\n\t\t\t}\n\t\t}\n\t}", "function getBlock()\n {\n\t\t$args = new safe_args();\n\t\t$args->set('app_name', \t$_SESSION['customization']['applications']['app_name'], 'sqlsafe');\n\t\t$args->set('block_id', \tNOTSET, 'sqlsafe');\n\t\t$args = $args->get(func_get_args());\n\t\t$GLOBALS['appshore_data']['server']['xml_render'] = true;\t\n\t\t\n\t\tif( $args['block_id'] )\n\t\t\t$result['customization'] = getManyAssocArrays('select * from db_blocks where app_name = \"'.$args['app_name'].\n\t\t\t\t'\" and block_id = \"'.$args['block_id'].'\"');\n\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t$result['return'] = 'success';\n\t\t$result['message'] = '';\n \t\treturn $result;\n }", "public static function register_blocks()\n {\n if (function_exists('acf_register_block_type')):\n\n acf_register_block_type(array(\n 'name' => 'hero',\n 'title' => __('Hero'),\n 'render_template' => 'template-parts/blocks/hero/hero.php',\n 'category' => 'custom-blocks',\n 'icon' => 'admin-site',\n 'keywords' => array('hero', 'carousel'),\n 'supports' => array(\n 'align' => false,\n ),\n ));\n\n endif;\n }", "protected function blockConfig() {\n return [];\n }", "function ticketmaster_register_block() {\n\n\tif ( ! function_exists( 'register_block_type' ) ) {\n\t\t// Gutenberg is not active.\n\t\treturn;\n\t}\n\n\twp_register_script(\n\t\t'ticketmaster',\n\t\tplugins_url( 'build/index.js', __FILE__ ),\n\t\tarray( 'wp-blocks', 'wp-element', 'wp-editor', 'wp-components'),\n\t\tfilemtime( plugin_dir_path( __FILE__ ) . 'block.js' )\n\t);\n\n register_block_type('ticketmaster/event-listing', [\n 'editor_script' => 'ticketmaster',\n 'attributes' => [\n 'term' => [\n 'type' => 'string',\n 'default' => 'Concert'\n ],\n 'size' => [\n 'type' => 'number',\n 'default' => 8\n ],\n ],\n 'render_callback' => render_nova_directive('EventListing'),\n ]);\n}", "public function frontpage_available_courses() {\r\n global $CFG;\r\n require_once($CFG->libdir. '/coursecatlib.php');\r\n\r\n $chelper = new coursecat_helper();\r\n $chelper->set_show_courses(self::COURSECAT_SHOW_COURSES_EXPANDED)->\r\n set_courses_display_options(array(\r\n 'recursive' => true,\r\n 'limit' => $CFG->frontpagecourselimit,\r\n 'viewmoreurl' => new moodle_url('/course/index.php'),\r\n 'viewmoretext' => new lang_string('fulllistofcourses')));\r\n\r\n $chelper->set_attributes(array('class' => 'frontpage-course-list-all'));\r\n $courses = coursecat::get(0)->get_courses($chelper->get_courses_display_options());\r\n $totalcount = coursecat::get(0)->get_courses_count($chelper->get_courses_display_options());\r\n if (!$totalcount && !$this->page->user_is_editing() && has_capability('moodle/course:create', context_system::instance())) {\r\n // Print link to create a new course, for the 1st available category.\r\n return $this->add_new_course_button();\r\n }\r\n return $this->frontpage_courseboxes($chelper, $courses);\r\n }", "public function loadAllContentBlocksForRender()\n\t{\n\t\t$lang = $this->getCurrentLang();\n\t\t$contentBlocks = ContentBlockTable::getInstance()->loadAllCurrentVersions($this->id, $lang);\n\n\t\tforeach ($contentBlocks as $contentBlock)\n\t\t{\n\t\t\t// We have to link the ContentBlock back to this group - it needs to know about the group for its definition\n\t\t\t$contentBlock->ContentGroup = $this;\n\n\t\t\t// We have constructed the query so that Versions just contains the current version\n\t\t\t$currentContentBlockVersion = $contentBlock->Versions->getFirst();\n\n\t\t\t// The ContentBlockVersion needs to be linked back to the ContentBlock, as it gets its definitions from there\n\t\t\t$currentContentBlockVersion->ContentBlock = $contentBlock;\n\t\t\t$contentBlockLang = $contentBlock->getCurrentLang();\n\n\t\t\t// By setting this, the ContentBlock will not need to do an additional DB query to load its current version.\n\t\t\t$contentBlock->setCurrentVersionsCache($currentContentBlockVersion, $contentBlockLang);\n\t\t}\n\n\t\t$this->ContentBlocks = $contentBlocks;\n\t}", "public function Admin_Action_ShowBlockForm() {\n $ssf = new SendStudio_Functions ( );\n $action = 'new';\n $GLOBALS ['blockid'] = (isset ( $_GET ['id'] ) && $_GET ['id'] > 0) ? $_GET ['id'] : md5(rand ( 1, 100000000 ));\n $GLOBALS ['tagid'] = (isset ( $_GET ['tagId'] ) && $_GET ['tagId'] > 0) ? $_GET ['tagId'] : 0;\n $GLOBALS ['blockaction'] = (isset ( $_GET ['id'] ) && $_GET ['id'] > 0) ? 'edit' : 'new';\n $GLOBALS ['BlockEditor'] = $ssf->GetHTMLEditor ( '', false, 'blockcontent', 'exact', 260, 630 );\n $GLOBALS ['CustomDatepickerUI'] = $this->template_system->ParseTemplate('UI.DatePicker.Custom_IEM', true);\n $this->template_system->ParseTemplate ( 'dynamiccontentblocks_form' );\n }", "private function enableBlocks()\n {\n // Check dates\n if ($this->getActionDate('statusstaticblocksmanager/statusstaticblocksmanager_group/enablestartdate', 'statusstaticblocksmanager/statusstaticblocksmanager_group/enablestarttime')) {\n\n //Mage::log('Enabling blocks', null, 'wapone.log');\n\n //Blocks list to enable\n $blocks_to_enable = $this->getBlocks('statusstaticblocksmanager/statusstaticblocksmanager_group/blockstoenable');\n\n if (count($blocks_to_enable) > 0) {\n for ($row = 0; $row < count($blocks_to_enable); $row++) {\n //Mage::log('Block to enable:'.$blocks_to_enable[$row], null, 'wapone.log');\n Mage::getModel('cms/block')->load($blocks_to_enable[$row])\n ->setData('is_active', self::ACTIVE)\n ->save();\n }\n /*** If you are using Letsi FPC module uncomment line below ***/\n //Mage::getSingleton('fpc/fpc')->clean();\n /*** In any case, you have to flush the cache, if you're using one ***/\n\n Mage::getConfig()->saveConfig('statusstaticblocksmanager/statusstaticblocksmanager_group/module_enabling_status', '0', 'default', 0);\n }\n }\n }", "function theme_allowed_block_types($allowed_blocks, $post) {\n\n // if(get_page_template_slug( $post ) === 'template-name.php') {\n // return array();\n // }\n\n return array(\n 'acf/xxx',\n 'acf/home-hero',\n 'acf/text-image-right',\n 'acf/image-left-text', \n 'acf/prospectives-listen',\n 'acf/perspectives-read',\n 'acf/perspectives-learn', \n 'acf/perspectives-generic', \n );\n}", "public function registerBlocks(): void\n\t{\n\t\tforeach (Components::getBlocks() as $block) {\n\t\t\t$this->registerBlock($block);\n\t\t}\n\t}", "public function store(CreateBlocksRequest $request)\n {\n $input = $request->all();\n\n $blocks = $this->blocksRepository->create($input);\n\n Flash::success('Blocks saved successfully.');\n\n return redirect(route('blocks.index'));\n }", "public function getRelatedBlocks() {\n $blockLib = new \\Cx\\Modules\\Block\\Controller\\BlockLibrary();\n $blocks = $blockLib->_getBlocksForPageId($this->getId());\n return $blocks;\n }", "function ws_blocks_register() {\n wp_register_script(\n 'ws-blocks-editor-script', \n plugins_url('dist/editor.js', __FILE__),\n //Array of dependencies\n array(\n 'wp-blocks',\n 'wp-i18n',\n 'wp-element', \n 'wp-editor', \n 'wp-components', \n 'wp-block-editor', \n 'wp-blob',\n 'wp-data'\n )\n );\n\n wp_register_style(\n 'ws-blocks-editor-style',\n plugins_url('dist/editor.css', __FILE__),\n //Array of dependencies - our stylesheet is loaded after this one\n array('wp-edit-blocks')\n );\n\n //Scripts and Styles for Front End\n wp_register_script(\n 'ws-blocks-script', \n plugins_url('dist/script.js', __FILE__),\n //load after jquery\n array('jquery')\n );\n\n wp_register_style(\n 'ws-blocks-style', \n plugins_url('dist/style.css', __FILE__)\n );\n\n ws_block_register_block_type('hero-banner');\n ws_block_register_block_type('story-block');\n ws_block_register_block_type('text-banner');\n}", "public static function get_block_data()\n {\n }", "public function getGroupedBlocks() {\n $definitions = $this->getBlocks();\n $definitions = $this->blockManager->getGroupedDefinitions($definitions);\n $keys = array_map(function ($key) {\n return preg_replace('@[^a-z0-9-]+@', '_', strtolower($key));\n }, array_keys($definitions));\n\n return array_combine($keys, array_values($definitions));\n }", "function get_the_block_template_html()\n {\n }", "function get_block_categories($post_or_block_editor_context)\n {\n }", "public function getCachedBlocks()\n {\n return $this->cachedBlocks;\n }", "public function all_course_list(){\n\n\t\t$headerData = null;\n\t\t$sidebarData = null;\n\t\t$page = 'admin/course_list';\n\t\t$mainData = array(\n\t\t\t'pagetitle'=> 'Lodnontec course List',\n\t\t\t'course_list'=> $this->setting_model->Get_All('course'),\n\t\t);\n\t\t$footerData = null;\n\n\t\t$this->template($headerData, $sidebarData, $page, $mainData, $footerData);\n\t}", "public function getSubBlocks();", "function getBlockOutputs() {\n\tglobal $settings;\n\t//echo \"getting blocks\";\n\t\n\t$blockOutput = array();\n\t\n\t$blocksTmp = file_get_contents($settings['channelMemoryMapsFile']);\n\t\n\t//print_r($blocksTmp);\n\t\n\t$blocks = explode(\"\\n\",$blocksTmp);\n\t\n\t//print_r($blocks);\n\t$blockIndex=0;\n\t\n\tfor($blockIndex =0; $blockIndex<=count($blocks)-1;$blockIndex++) {\n\t\t$blockParts = explode(\",\",$blocks[$blockIndex]);\n\t\t$blockOutput[] = $blockParts[0];\n\t\t//$blockIndex++;\n\t\t//$blockOutput [] =\n\t}\n\t//print_r($blockOutput);\n\t\n\treturn $blockOutput;\n}" ]
[ "0.65339845", "0.62981415", "0.62005377", "0.6195021", "0.61572725", "0.61154634", "0.60992366", "0.6099071", "0.6058609", "0.6038231", "0.6038231", "0.60232335", "0.60226953", "0.59913707", "0.5959804", "0.5956947", "0.5953827", "0.58999693", "0.58738405", "0.5853519", "0.584811", "0.58447564", "0.5836692", "0.58268076", "0.58231056", "0.5821029", "0.575928", "0.57318467", "0.57298136", "0.5722816", "0.56895983", "0.5684976", "0.56727076", "0.56639117", "0.56568706", "0.56447625", "0.5644462", "0.56327206", "0.5630932", "0.5608584", "0.56082445", "0.56041324", "0.56003743", "0.55794233", "0.55774814", "0.5575426", "0.5566478", "0.55641973", "0.55640787", "0.55445194", "0.5532208", "0.5508475", "0.5505795", "0.5500145", "0.5492734", "0.54909694", "0.54641646", "0.5454765", "0.543752", "0.5426914", "0.54258996", "0.54139686", "0.54087013", "0.5407407", "0.5406939", "0.5388311", "0.53861034", "0.53810704", "0.5377625", "0.53756225", "0.5358016", "0.5354302", "0.5348523", "0.5348132", "0.5322227", "0.5319259", "0.5319076", "0.5312646", "0.5307149", "0.5302754", "0.5299061", "0.5286206", "0.5284893", "0.52794707", "0.52711236", "0.52675706", "0.5263798", "0.5262179", "0.5259554", "0.52532345", "0.5237827", "0.52334464", "0.5232841", "0.5229203", "0.5228812", "0.52276325", "0.52236915", "0.5219104", "0.52125764", "0.5208878" ]
0.52589643
89
Definitions of the additional options that this course format uses for course Topics format uses the following options: coursedisplay numsections hiddensections
public function course_format_options($foreditform = false) { static $courseformatoptions = false; if ($courseformatoptions === false) { $courseconfig = get_config('moodlecourse'); $courseformatoptions = array( 'numsections' => array( 'default' => $courseconfig->numsections, 'type' => PARAM_INT, ), 'hiddensections' => array( 'default' => $courseconfig->hiddensections, 'type' => PARAM_INT, ), 'coursedisplay' => array( 'default' => $courseconfig->coursedisplay, 'type' => PARAM_INT, ), 'cmf_backgroundcolor' => array( 'default' => '#FAFAFA', 'type' => PARAM_TEXT, ), 'cmf_row_horizontal_color' => array( 'default' => '#F5F5F5', 'type' => PARAM_TEXT, ), 'cmf_headerfullbackgroundcolor' => array( 'default' => '#D3D3D3', 'type' => PARAM_TEXT, ), 'cmf_headerbackgroundcolor' => array( 'default' => '#F5F5F5', 'type' => PARAM_TEXT, ), 'cmf_cmfullbackgroundcolor' => array( 'default' => '#D3D3D3', 'type' => PARAM_TEXT, ), 'cmf_cmbackgroundcolor' => array( 'default' => '#D3D3D3', 'type' => PARAM_TEXT, ), 'cmf_allowicons' => array( 'default' => 1, 'type' => PARAM_INT, ) ); } if ($foreditform && !isset($courseformatoptions['coursedisplay']['label'])) { $courseconfig = get_config('moodlecourse'); $max = $courseconfig->maxsections; if (!isset($max) || !is_numeric($max)) { $max = 52; } $sectionmenu = array(); for ($i = 0; $i <= $max; $i++) { $sectionmenu[$i] = "$i"; } $courseformatoptionsedit = array( 'numsections' => array( 'label' => new lang_string('numberweeks'), 'element_type' => 'select', 'element_attributes' => array($sectionmenu), ), 'hiddensections' => array( 'label' => new lang_string('hiddensections'), 'help' => 'hiddensections', 'help_component' => 'moodle', 'element_type' => 'select', 'element_attributes' => array( array( 0 => new lang_string('hiddensectionscollapsed'), 1 => new lang_string('hiddensectionsinvisible') ) ), ), 'coursedisplay' => array( 'label' => new lang_string('coursedisplay'), 'element_type' => 'select', 'element_attributes' => array( array( COURSE_DISPLAY_SINGLEPAGE => new lang_string('coursedisplay_single'), COURSE_DISPLAY_MULTIPAGE => new lang_string('coursedisplay_multi') ) ), 'help' => 'coursedisplay', 'help_component' => 'moodle', ), 'cmf_backgroundcolor' => array( 'label' => new lang_string('backgroundcolorpicker', 'format_course_menu'), 'element_type' => 'text', 'element_attributes' => array( array('style' => 'display:none', 'class' => 'color_picker') ), 'help' => 'backgroundcolorpicker', 'help_component' => 'format_course_menu', ), 'cmf_row_horizontal_color' => array( 'label' => new lang_string('rowcolorpicker', 'format_course_menu'), 'element_type' => 'text', 'element_attributes' => array( array('style' => 'display:none', 'class' => 'color_picker') ), 'help' => 'rowcolorpicker', 'help_component' => 'format_course_menu', ), 'cmf_headerfullbackgroundcolor' => array( 'label' => new lang_string('headerfullbackgroundcolor', 'format_course_menu'), 'element_type' => 'text', 'element_attributes' => array( array('style' => 'display:none', 'class' => 'color_picker') ), 'help' => 'headerfullbackgroundcolor', 'help_component' => 'format_course_menu', ), 'cmf_headerbackgroundcolor' => array( 'label' => new lang_string('headerbackgroundcolor', 'format_course_menu'), 'element_type' => 'text', 'element_attributes' => array( array('style' => 'display:none', 'class' => 'color_picker') ), 'help' => 'headerbackgroundcolor', 'help_component' => 'format_course_menu', ), 'cmf_cmfullbackgroundcolor' => array( 'label' => new lang_string('cmfullbackgroundcolor', 'format_course_menu'), 'element_type' => 'text', 'element_attributes' => array( array('style' => 'display:none', 'class' => 'color_picker') ), 'help' => 'cmfullbackgroundcolor', 'help_component' => 'format_course_menu', ), 'cmf_cmbackgroundcolor' => array( 'label' => new lang_string('cmbackgroundcolor', 'format_course_menu'), 'element_type' => 'text', 'element_attributes' => array( array('style' => 'display:none', 'class' => 'color_picker') ), 'help' => 'cmbackgroundcolor', 'help_component' => 'format_course_menu', ), 'cmf_allowicons' => array( 'label' => new lang_string('allowicons', 'format_course_menu'), 'element_type' => 'advcheckbox', 'element_attributes' => array( '', array("group"=> 1), array(0, 1) ), 'help' => 'allowicons', 'help_component' => 'format_course_menu', ) ); $courseformatoptions = array_merge_recursive($courseformatoptions, $courseformatoptionsedit); } return $courseformatoptions; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function course_format_options($foreditform = false) {\n\n static $courseformatoptions = false;\n\n if ($courseformatoptions === false) {\n\n $courseconfig = get_config('moodlecourse');\n\n $courseformatoptions = array(\n\n 'numsections' => array(\n\n 'default' => $courseconfig->numsections,\n\n 'type' => PARAM_INT,\n\n ),\n\n 'hiddensections' => array(\n\n 'default' => $courseconfig->hiddensections,\n\n 'type' => PARAM_INT,\n\n ),\n\n 'coursedisplay' => array(\n\n 'default' => $courseconfig->coursedisplay,\n\n 'type' => PARAM_INT,\n\n ),\n \n\t\t\t\t//jacky look at this\n 'slidertoggle' => array(\n\n 'default' => 1,\n\n 'type' => PARAM_INT,\n\n ),\n\n );\n\n }\n\n if ($foreditform && !isset($courseformatoptions['coursedisplay']['label'])) {\n\n $courseconfig = get_config('moodlecourse');\n\n //max 5 sections for format to look ok\n\n $max = 5;\n\n if (!isset($max) || !is_numeric($max)) {\n\n $max = 52;\n\n }\n\n $sectionmenu = array();\n\n\t\t\t//min 2 sections\n\n for ($i = 2; $i <= $max; $i++) {\n\n $sectionmenu[$i] = \"$i\";\n\n }\n\n $courseformatoptionsedit = array(\n\n 'numsections' => array(\n\n 'label' => new lang_string('numberweeks'),\n\n 'element_type' => 'select',\n\n 'element_attributes' => array($sectionmenu),\n\n ),\n\n 'hiddensections' => array(\n\n 'label' => new lang_string('hiddensections'),\n\n 'help' => 'hiddensections',\n\n 'help_component' => 'moodle',\n\n 'element_type' => 'select',\n\n 'element_attributes' => array(\n\n array(\n\n 0 => new lang_string('hiddensectionscollapsed'),\n\n 1 => new lang_string('hiddensectionsinvisible')\n\n )\n\n ),\n\n ),\n \n\t\t\t\t//Jacky look at this\n \n 'slidertoggle' => array(\n\n 'label' => 'Slider Toggle',\n\n 'element_type' => 'select',\n\n 'element_attributes' => array(\n\n array(\n\n 0 => 'Disable',\n\n 1 => 'Enable'\n\n )\n\n ),\n\n ),\n\n 'coursedisplay' => array(\n\n 'label' => new lang_string('coursedisplay'),\n\n 'element_type' => 'select',\n\n 'element_attributes' => array(\n\n array(\n\n COURSE_DISPLAY_SINGLEPAGE => new lang_string('coursedisplay_single'),\n\n COURSE_DISPLAY_MULTIPAGE => new lang_string('coursedisplay_multi')\n\n )\n\n ),\n\n 'help' => 'coursedisplay',\n\n 'help_component' => 'moodle',\n\n )\n\n );\n\n $courseformatoptions = array_merge_recursive($courseformatoptions, $courseformatoptionsedit);\n\n }\n\n return $courseformatoptions;\n\n }", "public function define_sections() {\r\n\t\t$this->options->sections = $this->to_array();\n\t}", "public function course_format_options($foreditform = false) {\n static $courseformatoptions = false;\n if ($courseformatoptions === false) {\n $courseconfig = get_config('moodlecourse');\n $courseformatoptions = array(\n 'defaultsectiontype' => array(\n 'default' => 'topic',\n 'type' => PARAM_ALPHA,\n ),\n 'displaysectiontypegetstarted' => array(\n 'default' => false,\n 'type' => PARAM_BOOL,\n ),\n 'displaysectiontypeassess' => array(\n 'default' => false,\n 'type' => PARAM_BOOL,\n ),\n 'hiddensections' => array(\n 'default' => $courseconfig->hiddensections,\n 'type' => PARAM_INT,\n ),\n 'coursedisplay' => array(\n 'default' => $courseconfig->coursedisplay,\n 'type' => PARAM_INT,\n ),\n );\n }\n if ($foreditform && !isset($courseformatoptions['coursedisplay']['label'])) {\n $courseconfig = get_config('moodlecourse');\n $sectionmenu = array();\n $max = $courseconfig->maxsections;\n if (!isset($max) || !is_numeric($max)) {\n $max = 52;\n }\n for ($i = 0; $i <= $max; $i++) {\n $sectionmenu[$i] = \"$i\";\n }\n $courseformatoptionsedit = array(\n 'defaultsectiontype' => array(\n 'label' => new lang_string('defaultsectiontype', 'format_usqflexopen'),\n 'help' => 'defaultsectiontype',\n 'help_component' => 'format_usqflexopen',\n 'element_type' => 'select',\n 'element_attributes' => array(\n array(\n 'topic' => new lang_string('sectiontypetopic', 'format_usqflexopen'),\n 'week' => new lang_string('sectiontypeweek', 'format_usqflexopen')\n )\n ),\n ),\n 'displaysectiontypegetstarted' => array(\n 'label' => new lang_string('displaysectiontypegetstarted', 'format_usqflexopen'),\n 'help' => 'displaysectiontypegetstarted',\n 'help_component' => 'format_usqflexopen',\n 'element_type' => 'advcheckbox',\n 'element_attributes' => array(),\n ),\n 'displaysectiontypeassess' => array(\n 'label' => new lang_string('displaysectiontypeassess', 'format_usqflexopen'),\n 'help' => 'displaysectiontypeassess',\n 'help_component' => 'format_usqflexopen',\n 'element_type' => 'advcheckbox',\n 'element_attributes' => array(),\n ),\n 'hiddensections' => array(\n 'label' => new lang_string('hiddensections'),\n 'help' => 'hiddensections',\n 'help_component' => 'moodle',\n 'element_type' => 'select',\n 'element_attributes' => array(\n array(\n 0 => new lang_string('hiddensectionscollapsed'),\n 1 => new lang_string('hiddensectionsinvisible')\n )\n ),\n ),\n 'coursedisplay' => array(\n 'label' => new lang_string('coursedisplay'),\n 'element_type' => 'select',\n 'element_attributes' => array(\n array(\n COURSE_DISPLAY_SINGLEPAGE => new lang_string('coursedisplay_single'),\n COURSE_DISPLAY_MULTIPAGE => new lang_string('coursedisplay_multi'),\n self::COURSE_DISPLAY_SEPARATEPAGE => new lang_string('coursedisplay_separate', 'format_usqflexopen'),\n )\n ),\n 'help' => 'coursedisplay',\n 'help_component' => 'moodle',\n )\n );\n $courseformatoptions = array_merge_recursive($courseformatoptions, $courseformatoptionsedit);\n }\n return $courseformatoptions;\n }", "function print_additional_settings_section_info() {\n }", "function cww_df_options_page_sections() { \n $sections = array(); \n // $sections[$id] = __($title, 'wptuts_textdomain'); \n $sections['cww_df_authorizenet_setting_section'] = __('Authorize.net', 'cww');\n return apply_filters('cww_df_options_page_sections', $sections);\n}", "public function display_section() {\n\t\t// do nothing - @todo Possibly add description here later if we have more options to add.\n\t}", "protected function _getExtraOptions()\n {\n return array(\n 'table|t-s' => 'Which table to generate its DAO.',\n 'modelnamespace|M=s' => 'The model namespace',\n 'tablenamespace|T=s' => 'The table namespace'\n );\n }", "protected function getAllAvailableSectionsOptions() {}", "function section_optionator( $settings ){\n\t\t$settings = wp_parse_args($settings, $this->optionator_default);\n\t\t$opt_array = array(\n\t\t\t'tm_candy_open' => array(\n\t\t\t\t'title'\t\t\t=> 'Show at the start',\n\t\t\t\t'type' \t=> 'check',\n\t\t\t\t'inputlabel' \t=> __( 'Show at the start', $this->domain ),\n\t\t\t\t'shortexp' \t\t=> 'Default: Hidden',\n\t\t\t\t'exp' \t\t=> 'Check if you want to show the notification when the page is loaded, by default the notification area is hidden and it show the ribbon to open it.'\n\t\t\t),\n\t\t\t'tm_candys_set' \t=> array(\n\t\t\t\t'type' \t\t\t=> 'select_taxonomy',\n\t\t\t\t'taxonomy_id'\t=> $this->tax_id,\n\t\t\t\t'title' \t\t=> __('Select notiofication set to show', $this->domain),\n\t\t\t\t'shortexp'\t\t=> __('The set to show', $this->domain),\n\t\t\t\t'inputlabel'\t=> __('Select a set', $this->domain),\n\t\t\t\t'exp' \t\t\t=> __('if don\\'t select a set it will show all notification entries', $this->domain)\n\t\t\t),\n\t\t\t'tm_candys_items' => array(\n\t\t\t\t'type' \t\t\t=> 'count_select',\n\t\t\t\t'inputlabel'\t=> __('Number of notifications to show', $this->domain),\n\t\t\t\t'title' \t\t=> __('Number of notifications', $this->domain),\n\t\t\t\t'shortexp'\t\t=> __('Default value is 1', $this->domain),\n\t\t\t\t'count_start'\t=> 1, \n \t\t\t\t'count_number'\t=> 5,\n\t\t\t),\n\t\t\t'tm_candys_pause_on_hover' => array(\n\t\t\t\t'type'\t\t\t=> 'check',\n\t\t\t\t'title'\t\t\t=> __('Pause on hover', $this->domain),\n\t\t\t\t'inputlabel'\t=> __('Pause on hover', $this->domain),\n\t\t\t\t'shortexp'\t\t=> __('', $this->domain),\n\t\t\t\t'exp'\t\t\t=> __('Determines whether the timeout between transitions should be paused \"onMouseOver\"', $this->domain)\n\t\t\t),\n\t\t\t'tm_candys_duration_pause' \t=> array(\n\t\t\t\t'type'\t\t\t=> 'text',\n\t\t\t\t'inputlabel'\t=> __('Pause Duration', $this->domain),\n\t\t\t\t'title' \t\t=> __('Pause Duration', $this->domain),\n\t\t\t\t'shortexp'\t\t=> '',\n\t\t\t\t'exp'\t\t\t=> __('The amount of milliseconds the carousel will pause. 1000 = 1 second', $this->domain),\n\t\t\t),\n\n\t\t\t\t\n\t\t);\n\n\t\t$settings = array(\n\t\t\t'id' \t\t=> $this->id.'_meta',\n\t\t\t'name' \t\t=> $this->name,\n\t\t\t'icon' \t\t=> $this->icon, \n\t\t\t'clone_id'\t=> $settings['clone_id'], \n\t\t\t'active'\t=> $settings['active']\n\t\t);\n\n\t\tregister_metatab($settings, $opt_array);\n\t\t\n\t}", "function SetupOtherOptions() {\n\t\tglobal $Language, $Security;\n\t\t$options = &$this->OtherOptions;\n\t\t$option = $options[\"addedit\"];\n\n\t\t// Add\n\t\t$item = &$option->Add(\"add\");\n\t\t$addcaption = ew_HtmlTitle($Language->Phrase(\"AddLink\"));\n\t\t$item->Body = \"<a class=\\\"ewAddEdit ewAdd\\\" title=\\\"\" . $addcaption . \"\\\" data-caption=\\\"\" . $addcaption . \"\\\" href=\\\"\" . ew_HtmlEncode($this->AddUrl) . \"\\\">\" . $Language->Phrase(\"AddLink\") . \"</a>\";\n\t\t$item->Visible = ($this->AddUrl <> \"\" && $Security->CanAdd());\n\t\t$option = $options[\"detail\"];\n\t\t$DetailTableLink = \"\";\n\t\t$item = &$option->Add(\"detailadd_avaluo\");\n\t\t$url = $this->GetAddUrl(EW_TABLE_SHOW_DETAIL . \"=avaluo\");\n\t\t$caption = $Language->Phrase(\"Add\") . \"&nbsp;\" . $this->TableCaption() . \"/\" . $GLOBALS[\"avaluo\"]->TableCaption();\n\t\t$item->Body = \"<a class=\\\"ewDetailAddGroup ewDetailAdd\\\" title=\\\"\" . ew_HtmlTitle($caption) . \"\\\" data-caption=\\\"\" . ew_HtmlTitle($caption) . \"\\\" href=\\\"\" . ew_HtmlEncode($url) . \"\\\">\" . $caption . \"</a>\";\n\t\t$item->Visible = ($GLOBALS[\"avaluo\"]->DetailAdd && $Security->AllowAdd(CurrentProjectID() . 'avaluo') && $Security->CanAdd());\n\t\tif ($item->Visible) {\n\t\t\tif ($DetailTableLink <> \"\") $DetailTableLink .= \",\";\n\t\t\t$DetailTableLink .= \"avaluo\";\n\t\t}\n\n\t\t// Add multiple details\n\t\tif ($this->ShowMultipleDetails) {\n\t\t\t$item = &$option->Add(\"detailsadd\");\n\t\t\t$url = $this->GetAddUrl(EW_TABLE_SHOW_DETAIL . \"=\" . $DetailTableLink);\n\t\t\t$caption = $Language->Phrase(\"AddMasterDetailLink\");\n\t\t\t$item->Body = \"<a class=\\\"ewDetailAddGroup ewDetailAdd\\\" title=\\\"\" . ew_HtmlTitle($caption) . \"\\\" data-caption=\\\"\" . ew_HtmlTitle($caption) . \"\\\" href=\\\"\" . ew_HtmlEncode($url) . \"\\\">\" . $caption . \"</a>\";\n\t\t\t$item->Visible = ($DetailTableLink <> \"\" && $Security->CanAdd());\n\n\t\t\t// Hide single master/detail items\n\t\t\t$ar = explode(\",\", $DetailTableLink);\n\t\t\t$cnt = count($ar);\n\t\t\tfor ($i = 0; $i < $cnt; $i++) {\n\t\t\t\tif ($item = &$option->GetItem(\"detailadd_\" . $ar[$i]))\n\t\t\t\t\t$item->Visible = FALSE;\n\t\t\t}\n\t\t}\n\t\t$option = $options[\"action\"];\n\n\t\t// Set up options default\n\t\tforeach ($options as &$option) {\n\t\t\t$option->UseImageAndText = TRUE;\n\t\t\t$option->UseDropDownButton = TRUE;\n\t\t\t$option->UseButtonGroup = TRUE;\n\t\t\t$option->ButtonClass = \"btn-sm\"; // Class for button group\n\t\t\t$item = &$option->Add($option->GroupOptionName);\n\t\t\t$item->Body = \"\";\n\t\t\t$item->Visible = FALSE;\n\t\t}\n\t\t$options[\"addedit\"]->DropDownButtonPhrase = $Language->Phrase(\"ButtonAddEdit\");\n\t\t$options[\"detail\"]->DropDownButtonPhrase = $Language->Phrase(\"ButtonDetails\");\n\t\t$options[\"action\"]->DropDownButtonPhrase = $Language->Phrase(\"ButtonActions\");\n\n\t\t// Filter button\n\t\t$item = &$this->FilterOptions->Add(\"savecurrentfilter\");\n\t\t$item->Body = \"<a class=\\\"ewSaveFilter\\\" data-form=\\\"fsolicitudlistsrch\\\" href=\\\"#\\\">\" . $Language->Phrase(\"SaveCurrentFilter\") . \"</a>\";\n\t\t$item->Visible = TRUE;\n\t\t$item = &$this->FilterOptions->Add(\"deletefilter\");\n\t\t$item->Body = \"<a class=\\\"ewDeleteFilter\\\" data-form=\\\"fsolicitudlistsrch\\\" href=\\\"#\\\">\" . $Language->Phrase(\"DeleteFilter\") . \"</a>\";\n\t\t$item->Visible = TRUE;\n\t\t$this->FilterOptions->UseDropDownButton = TRUE;\n\t\t$this->FilterOptions->UseButtonGroup = !$this->FilterOptions->UseDropDownButton;\n\t\t$this->FilterOptions->DropDownButtonPhrase = $Language->Phrase(\"Filters\");\n\n\t\t// Add group option item\n\t\t$item = &$this->FilterOptions->Add($this->FilterOptions->GroupOptionName);\n\t\t$item->Body = \"\";\n\t\t$item->Visible = FALSE;\n\t}", "function getExpertSectionIdOption($sections, $include) {\r\n\t\t$database = & JFactory::getDBO();\r\n\r\n\t\t$where = \"\";\r\n\t\tif ($sections) {\r\n\t\t\tif ($include)\r\n\t\t\t\t$where = \"\\n AND id IN ($sections) \";\r\n\t\t\telse\r\n\t\t\t\t$where = \"\\n AND id NOT IN ($sections) \";\r\n\t\t}\r\n\t\t$sectoptions = array();\r\n\t\t$query = \"SELECT id, catname as title\"\r\n\t\t\t\t. \"\\n FROM #__eventlist_categories\"\r\n\t\t\t\t. \"\\n WHERE publishedcat = 1\"\r\n\t\t\t\t. $where\r\n\t\t\t\t//\t\t\t\t. \"\\n AND access >= 0\"\r\n\t\t\t\t. \"\\n ORDER BY ordering\"\r\n\t\t;\r\n\t\t$database->setQuery($query);\r\n\t\t$sectoptions = $database->loadObjectList();\r\n\t\t// add \"All sections\"\r\n\t\tarray_unshift($sectoptions, JHTML::_('select.option', '0', '-- All --', 'id', 'title'));\r\n\r\n\t\treturn $sectoptions;\r\n\t}", "public function print_section_info()\r\n {\r\n print 'Additional options of your sites are available in Tapatalk Admin CP.';\r\n }", "public function add_options() {\n\n\t\t\treturn [\n\t\t\t\t'container_shortcode_section' => [\n\t\t\t\t\t'label' => esc_html__( 'Container', 'fusion-builder' ),\n\t\t\t\t\t'description' => '',\n\t\t\t\t\t'id' => 'container_shortcode_section',\n\t\t\t\t\t'type' => 'accordion',\n\t\t\t\t\t'icon' => 'fusiona-container',\n\t\t\t\t\t'fields' => [\n\t\t\t\t\t\t'container_padding_default' => [\n\t\t\t\t\t\t\t'label' => esc_html__( 'Container Padding for Default Template', 'fusion-builder' ),\n\t\t\t\t\t\t\t'description' => esc_html__( 'Controls the top/right/bottom/left padding of the container element when using the Default page template. ', 'fusion-builder' ),\n\t\t\t\t\t\t\t'id' => 'container_padding_default',\n\t\t\t\t\t\t\t'choices' => [\n\t\t\t\t\t\t\t\t'top' => true,\n\t\t\t\t\t\t\t\t'bottom' => true,\n\t\t\t\t\t\t\t\t'left' => true,\n\t\t\t\t\t\t\t\t'right' => true,\n\t\t\t\t\t\t\t\t'units' => [ 'px', '%' ],\n\t\t\t\t\t\t\t],\n\t\t\t\t\t\t\t'default' => [\n\t\t\t\t\t\t\t\t'top' => '0px',\n\t\t\t\t\t\t\t\t'bottom' => '0px',\n\t\t\t\t\t\t\t\t'left' => '0px',\n\t\t\t\t\t\t\t\t'right' => '0px',\n\t\t\t\t\t\t\t],\n\t\t\t\t\t\t\t'type' => 'spacing',\n\t\t\t\t\t\t\t'transport' => 'postMessage',\n\t\t\t\t\t\t],\n\t\t\t\t\t\t'container_padding_100' => [\n\t\t\t\t\t\t\t'label' => esc_html__( 'Container Padding for 100% Width Template', 'fusion-builder' ),\n\t\t\t\t\t\t\t'description' => esc_html__( 'Controls the top/right/bottom/left padding of the container element when using the 100% width page template.', 'fusion-builder' ),\n\t\t\t\t\t\t\t'id' => 'container_padding_100',\n\t\t\t\t\t\t\t'choices' => [\n\t\t\t\t\t\t\t\t'top' => true,\n\t\t\t\t\t\t\t\t'bottom' => true,\n\t\t\t\t\t\t\t\t'left' => true,\n\t\t\t\t\t\t\t\t'right' => true,\n\t\t\t\t\t\t\t\t'units' => [ 'px', '%' ],\n\t\t\t\t\t\t\t],\n\t\t\t\t\t\t\t'default' => [\n\t\t\t\t\t\t\t\t'top' => '0px',\n\t\t\t\t\t\t\t\t'bottom' => '0px',\n\t\t\t\t\t\t\t\t'left' => '30px',\n\t\t\t\t\t\t\t\t'right' => '30px',\n\t\t\t\t\t\t\t],\n\t\t\t\t\t\t\t'type' => 'spacing',\n\t\t\t\t\t\t\t'transport' => 'postMessage',\n\t\t\t\t\t\t],\n\t\t\t\t\t\t'full_width_bg_color' => [\n\t\t\t\t\t\t\t'label' => esc_html__( 'Container Background Color', 'fusion-builder' ),\n\t\t\t\t\t\t\t'description' => esc_html__( 'Controls the background color of the container element.', 'fusion-builder' ),\n\t\t\t\t\t\t\t'id' => 'full_width_bg_color',\n\t\t\t\t\t\t\t'default' => 'rgba(255,255,255,0)',\n\t\t\t\t\t\t\t'type' => 'color-alpha',\n\t\t\t\t\t\t\t'transport' => 'postMessage',\n\t\t\t\t\t\t],\n\t\t\t\t\t\t'full_width_gradient_start_color' => [\n\t\t\t\t\t\t\t'label' => esc_html__( 'Container Gradient Start Color', 'fusion-builder' ),\n\t\t\t\t\t\t\t'description' => esc_html__( 'Controls the start color for gradient of the container element.', 'fusion-builder' ),\n\t\t\t\t\t\t\t'id' => 'full_width_gradient_start_color',\n\t\t\t\t\t\t\t'default' => 'rgba(255,255,255,0)',\n\t\t\t\t\t\t\t'type' => 'color-alpha',\n\t\t\t\t\t\t\t'transport' => 'postMessage',\n\t\t\t\t\t\t],\n\t\t\t\t\t\t'full_width_gradient_end_color' => [\n\t\t\t\t\t\t\t'label' => esc_html__( 'Container Gradient End Color', 'fusion-builder' ),\n\t\t\t\t\t\t\t'description' => esc_html__( 'Controls the end color for gradient of the container element.', 'fusion-builder' ),\n\t\t\t\t\t\t\t'id' => 'full_width_gradient_end_color',\n\t\t\t\t\t\t\t'default' => 'rgba(255,255,255,0)',\n\t\t\t\t\t\t\t'type' => 'color-alpha',\n\t\t\t\t\t\t\t'transport' => 'postMessage',\n\t\t\t\t\t\t],\n\t\t\t\t\t\t'full_width_border_size' => [\n\t\t\t\t\t\t\t'label' => esc_html__( 'Container Border Size', 'fusion-builder' ),\n\t\t\t\t\t\t\t'description' => esc_html__( 'Controls the top and bottom border size of the container element.', 'fusion-builder' ),\n\t\t\t\t\t\t\t'id' => 'full_width_border_size',\n\t\t\t\t\t\t\t'default' => '0',\n\t\t\t\t\t\t\t'type' => 'slider',\n\t\t\t\t\t\t\t'transport' => 'postMessage',\n\t\t\t\t\t\t\t'choices' => [\n\t\t\t\t\t\t\t\t'min' => '0',\n\t\t\t\t\t\t\t\t'max' => '50',\n\t\t\t\t\t\t\t\t'step' => '1',\n\t\t\t\t\t\t\t],\n\t\t\t\t\t\t],\n\t\t\t\t\t\t'full_width_border_color' => [\n\t\t\t\t\t\t\t'label' => esc_html__( 'Container Border Color', 'fusion-builder' ),\n\t\t\t\t\t\t\t'description' => esc_html__( 'Controls the border color of the container element.', 'fusion-builder' ),\n\t\t\t\t\t\t\t'id' => 'full_width_border_color',\n\t\t\t\t\t\t\t'default' => '#e2e2e2',\n\t\t\t\t\t\t\t'type' => 'color-alpha',\n\t\t\t\t\t\t\t'transport' => 'postMessage',\n\t\t\t\t\t\t],\n\t\t\t\t\t\t'container_scroll_nav_bg_color' => [\n\t\t\t\t\t\t\t'label' => esc_html__( 'Container 100% Height Navigation Background Color', 'fusion-builder' ),\n\t\t\t\t\t\t\t'description' => esc_html__( 'Controls the background colors of the navigation area and name box when using 100% height containers.', 'fusion-builder' ),\n\t\t\t\t\t\t\t'id' => 'container_scroll_nav_bg_color',\n\t\t\t\t\t\t\t'default' => 'rgba(0,0,0,0.2)',\n\t\t\t\t\t\t\t'type' => 'color-alpha',\n\t\t\t\t\t\t\t'css_vars' => [\n\t\t\t\t\t\t\t\t[\n\t\t\t\t\t\t\t\t\t'name' => '--container_scroll_nav_bg_color',\n\t\t\t\t\t\t\t\t\t'element' => '.fusion-scroll-section-nav',\n\t\t\t\t\t\t\t\t\t'callback' => [ 'sanitize_color' ],\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'container_scroll_nav_bullet_color' => [\n\t\t\t\t\t\t\t'label' => esc_html__( 'Container 100% Height Navigation Element Color', 'fusion-builder' ),\n\t\t\t\t\t\t\t'description' => esc_html__( 'Controls the color of the navigation circles and text name when using 100% height containers.', 'fusion-builder' ),\n\t\t\t\t\t\t\t'id' => 'container_scroll_nav_bullet_color',\n\t\t\t\t\t\t\t'default' => '#e2e2e2',\n\t\t\t\t\t\t\t'type' => 'color-alpha',\n\t\t\t\t\t\t\t'css_vars' => [\n\t\t\t\t\t\t\t\t[\n\t\t\t\t\t\t\t\t\t'name' => '--container_scroll_nav_bullet_color',\n\t\t\t\t\t\t\t\t\t'element' => '.fusion-scroll-section-link-bullet',\n\t\t\t\t\t\t\t\t\t'callback' => [ 'sanitize_color' ],\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'container_hundred_percent_scroll_sensitivity' => [\n\t\t\t\t\t\t\t'label' => esc_html__( 'Container 100% Height Scroll Sensitivity', 'fusion-builder' ),\n\t\t\t\t\t\t\t'description' => esc_html__( 'Controls the sensitivity of the scrolling transition on 100% height scrolling secitions. In milliseconds.', 'fusion-builder' ),\n\t\t\t\t\t\t\t'id' => 'container_hundred_percent_scroll_sensitivity',\n\t\t\t\t\t\t\t'default' => '450',\n\t\t\t\t\t\t\t'type' => 'slider',\n\t\t\t\t\t\t\t'transport' => 'postMessage',\n\t\t\t\t\t\t\t'choices' => [\n\t\t\t\t\t\t\t\t'min' => '200',\n\t\t\t\t\t\t\t\t'max' => '1500',\n\t\t\t\t\t\t\t\t'step' => '10',\n\t\t\t\t\t\t\t],\n\t\t\t\t\t\t],\n\t\t\t\t\t\t'container_hundred_percent_height_mobile' => [\n\t\t\t\t\t\t\t'label' => esc_html__( 'Container 100% Height On Mobile', 'fusion-builder' ),\n\t\t\t\t\t\t\t'description' => esc_html__( 'Turn on to enable the 100% height containers on mobile. Please note, this feature only works when your containers have minimal content. If the container has a lot of content it will overflow the screen height. In many cases, 100% height containers work well on desktop, but will need disabled on mobile.', 'fusion-builder' ),\n\t\t\t\t\t\t\t'id' => 'container_hundred_percent_height_mobile',\n\t\t\t\t\t\t\t'default' => '0',\n\t\t\t\t\t\t\t'type' => 'switch',\n\t\t\t\t\t\t\t'output' => [\n\t\t\t\t\t\t\t\t[\n\t\t\t\t\t\t\t\t\t'element' => 'helperElement',\n\t\t\t\t\t\t\t\t\t'property' => 'dummy',\n\t\t\t\t\t\t\t\t\t'js_callback' => [\n\t\t\t\t\t\t\t\t\t\t'fusionGlobalScriptSet',\n\t\t\t\t\t\t\t\t\t\t[\n\t\t\t\t\t\t\t\t\t\t\t'globalVar' => 'fusionContainerVars',\n\t\t\t\t\t\t\t\t\t\t\t'id' => 'container_hundred_percent_height_mobile',\n\t\t\t\t\t\t\t\t\t\t\t'trigger' => [ 'resize' ],\n\t\t\t\t\t\t\t\t\t\t],\n\t\t\t\t\t\t\t\t\t],\n\t\t\t\t\t\t\t\t\t'sanitize_callback' => '__return_empty_string',\n\t\t\t\t\t\t\t\t],\n\t\t\t\t\t\t\t],\n\t\t\t\t\t\t],\n\t\t\t\t\t],\n\t\t\t\t],\n\t\t\t];\n\t\t}", "public function getGroupsOptions()\n {\n return array(\n 'compulsory' => array(\n array('name' => 'Run Subtitle Spell Check before delivery', 'description' => 'Run Subtitle Spell Check before delivery', 'notice' => 'STOPPER'),\n array('name' => 'Run Subtitle Quality Check (SQC) before delivery', 'description' => 'Run Subtitle Quality Check (SQC) before delivery', 'notice' => 'STOPPER'),\n array('name' => 'Identical Narrative as in English template found', 'description' => 'When the text in the translate file is identical to the English template', 'notice' => 'STOPPER'),\n array('name' => 'Allow Empty Boxes', 'description' => 'Allow users to deliver file with empty boxes (boxes not containing any text)', 'notice' => 'STOPPER'),\n array('name' => 'Maximum Lines Per Box', 'description' => 'The maximum lines allowed in one box', 'notice' => 'STOPPER'),\n array('name' => 'Maximum Characters Per Line (Horizontal, Vertical)', 'description' => 'The maximum number of characters allowed per (horizontal, vertical) line', 'notice' => 'STOPPER'),\n array('name' => 'Main Title tag required', 'description' => 'The main title has not been tagged with a Main Title tag', 'notice' => 'STOPPER'),\n array('name' => 'Non-standard apostrophe used at position (pos)', 'description' => '', 'notice' => 'STOPPER'),\n array('name' => 'English template revision not acknowledged', 'description' => 'English template revision is not reviewed by a language user by clicking on the blinking red alarm clock', 'notice' => 'STOPPER'),\n array('name' => 'Minimum Box Duration', 'description' => 'The shortest duration allowed for a box. In frames or seconds', 'notice' => 'STOPPER'),\n array('name' => 'Maximum Box Duration', 'description' => 'The longest duration allowed for a box. In frames or seconds', 'notice' => 'STOPPER'),\n array('name' => 'Allow Box Overlap', 'description' => 'Allow users to deliver overlapping boxes', 'notice' => 'STOPPER'),\n array('name' => 'Floating captions found', 'description' => 'Allow caption to touch top or bottom', 'notice' => 'STOPPER'),\n array('name' => 'Teletext Character Set Only', 'description' => 'This is a special requirement for teletext deliveries as this format has restrictions on the characters allowed', 'notice' => 'STOPPER'),\n array('name' => 'Box start time is equal / exceeds its end time', 'description' => 'Timing discrepancy when a file has been imported into the system where the start timecode of a box can be greater than the end timecode of the box', 'notice' => 'STOPPER'),\n array('name' => 'Chapter stop overlaps with subtitle', 'description' => '', 'notice' => 'STOPPER'),\n ),\n \n 'spec' => array(\n array('name' => 'Maximum Lines Per Box', 'description' => 'The maximum lines allowed in one box', 'notice' => 'STOPPER'),\n array('name' => 'Minimum Frame Gap Between Boxes', 'description' => 'Minimal gap allowed between boxes. In frames or seconds', 'notice' => 'STOPPER'),\n array('name' => 'Frame gap violation between consecutive boxes found', 'description' => 'This puts restrictions on the frame gaps allowed between boxes. This is meant to disallow small gaps (under 1 second) between consecutive boxes, a special requirement. Example: 3f;1s mean that gap >= 3 frames and < 1 second not allowed', 'notice' => 'STOPPER'),\n array('name' => 'Allow Italics', 'description' => 'Are italics allowed?', 'notice' => 'STOPPER'),\n array('name' => 'Forced', 'description' => 'Allow Burned-in tag?', 'notice' => 'STOPPER'),\n array('name' => 'Only one sentence per box is allowed', 'description' => 'Only one sentence per subtitle is permitted', 'notice' => 'STOPPER'),\n array('name' => 'Text-heavy box found', 'description' => 'When too much text is present in a box as opposed to the box duration, readability gets affected', 'notice' => 'STOPPER'),\n ),\n \n 'compliance' => array(\n array('name' => 'Rating Allowed', 'description' => 'Is a rating allowed?', 'notice' => 'STOPPER'),\n array('name' => 'Translator Credit Allowed', 'description' => 'Is the translator credit allowed?', 'notice' => 'STOPPER'),\n array('name' => 'Disallowed characters found at start of subtitle', 'description' => 'Subtitle cannot start with any of the entered chars. Input chars as a string, without separators', 'notice' => 'STOPPER'),\n ),\n \n 'special' => array(\n array('name' => 'Allowable unedited auto-translation limit', 'description' => 'This special limit is set for translate jobs to define maximum allowable unedited auto translation in percents', 'notice' => 'STOPPER'),\n array('name' => 'Consecutive text-heavy 2-line subtitle found', 'description' => 'The maximum number of consecutive 2 line subs. Should be more than 1 or Disabled(-1). This is special requirement meant to discourage consecutive text heavy boxes', 'notice' => 'STOPPER'),\n array('name' => 'Space After Hypens Between Words', 'description' => 'Checks for space after or before a hyphen between two words. This is meant for a specific captioning requirement', 'notice' => 'STOPPER'),\n array('name' => 'Do Not Allow \"#\" Symbol', 'description' => 'This prevents users from delivering a file containing the pound symbol. This is a special requirement by some clients or file types', 'notice' => 'STOPPER'),\n array('name' => 'Space After Double Chevron', 'description' => 'Requires a space after a double hyphen. This is meant for specific French captioning requirements', 'notice' => 'STOPPER'),\n array('name' => 'Space After Hyphens', 'description' => 'Set a required space after speaker hyphen. This is meant for a specific captioning requirement', 'notice' => 'STOPPER'),\n array('name' => 'Speaker Hyphens style', 'description' => 'Set a required speaker hyphen style. This is meant for a specific captioning requirement', 'notice' => 'STOPPER'),\n array('name' => 'Disallowed characters found in subtitle', 'description' => 'Subtitle cannot contain any of entered chars. Input chars as a string, without separators', 'notice' => 'STOPPER'),\n array('name' => 'Text contains invalid XML characters', 'description' => '', 'notice' => 'STOPPER'),\n ),\n \n 'captions' => array(\n array('name' => 'Allow 32 Character Lines With Italics', 'description' => 'Is it possible to add 32 character line with italics?', 'notice' => 'STOPPER'),\n array('name' => 'Sound Cue Format', 'description' => 'Examples: \"[music]\", \"(MUSIC)\", ...', 'notice' => 'STOPPER'),\n ),\n \n 'other' => array( \n array('name' => 'Possible acronym should be written without periods and spaces', 'description' => '', 'notice' => 'NOTICE'),\n array('name' => 'Possible acronym should be written without accents', 'description' => '', 'notice' => 'STOPPER'),\n array('name' => 'Semicolon should be removed', 'description' => 'This is one of the SDH system checks only for LAS language', 'notice' => 'STOPPER'),\n array('name' => 'Continuity ellipsis at the end of the box should be removed', 'description' => '', 'notice' => 'STOPPER'),\n array('name' => 'Extra punctuation found', 'description' => '', 'notice' => 'STOPPER'),\n array('name' => 'Double quotation marks should be written without spaces', 'description' => '', 'notice' => 'STOPPER'),\n array('name' => 'Period should be written after a closing quote', 'description' => '', 'notice' => 'STOPPER'),\n array('name' => 'Song box should be fully italicized', 'description' => '', 'notice' => 'STOPPER'),\n array('name' => 'Song box punctuation: only question and exclamation marks allowed at the end of line', 'description' => '', 'notice' => 'STOPPER'), \n array('name' => 'Song box is not translated. Please OMIT box because translation is not required', 'description' => '', 'notice' => 'STOPPER'),\n array('name' => 'Unallowable forward slash in dialog', 'description' => '', 'notice' => 'STOPPER'),\n array('name' => 'HBO prohibited words', 'description' => 'Prevents the user from delivering a file containing some predefined words: \"A Em Por\", \"Até Entre Porém\", \"Ao Entretanto Quando\", \"Após Lhe Que\", \"Com Uma Se\", \"Como Me Sem\", \"Contudo Nos Sob\", \"Da O Sobre\", \"De Ou Te\", \"Desde Para Todavia\", \"Do Perante Vos\", \"E Pois\". This is a special requirement by some clients or file types', 'notice' => 'STOPPER'),\n array('name' => 'Do Not Allow \"$\" At The Beginning Of Sentence', 'description' => 'This prevents users from delivering a file containing the \"$\" symbol. This is a special requirement by some clients or file types', 'notice' => 'STOPPER'),\n array('name' => 'Positioning not allowed for this overlapped subtitle', 'description' => 'Positioning not allowed for particular overlapped subtitle. (For Japanese only)', 'notice' => 'STOPPER'),\n array('name' => 'Text casing does not match source', 'description' => '', 'notice' => 'NOTICE'),\n array('name' => 'Acceptance suggestion is unresolved', 'description' => 'Flagged for all boxes which are not accepted or declined by the QAer', 'notice' => 'STOPPER'),\n array('name' => 'Text alignment not permitted as per spec', 'description' => 'When text alignment does not match what is in the delivery specs', 'notice' => 'STOPPER'),\n array('name' => 'BRP Disallowed End Words', 'description' => '', 'notice' => 'STOPPER'),\n array('name' => 'BRP Disallowed Start Words', 'description' => '', 'notice' => 'STOPPER'),\n array('name' => 'Text found on the first cell of the first gridline', 'description' => 'Text resting on the first cell of the first gridline.(i.e. position 0,0) (For CC mode only)', 'notice' => 'NOTICE'),\n array('name' => 'File should contain an EMPTY first box', 'description' => '', 'notice' => 'STOPPER'),\n array('name' => 'Single quaver box should be min 5 secs long and have min 1 sec gap after it', 'description' => '', 'notice' => 'STOPPER'),\n array('name' => 'Italics or Underline found within word', 'description' => 'When italics or underline tags are found inside words. (For CC mode only)', 'notice' => 'STOPPER'), \n array('name' => 'Enter some note for the box with error type: Translation (objective/subjective)', 'description' => 'It forces a QA user to input a note if box error type is Translation: objective/subjective. (For Netflix client only)', 'notice' => 'STOPPER'),\n array('name' => 'Incorrect text formatting (&#60;HTML&#62;|&#60;P&#62;)', 'description' => '', 'notice' => 'STOPPER'),\n array('name' => 'Alignment / Positioning does not match source', 'description' => '', 'notice' => 'STOPPER'),\n array('name' => 'Box should be removed (omitted) according to the \"Texted\" delivery format', 'description' => '', 'notice' => 'NOTICE'),\n array('name' => 'Stand-alone punctuation present', 'description' => 'When any box in a file has only punctuation and no text in it', 'notice' => 'STOPPER'),\n array('name' => 'Double space found at line #(number)', 'description' => '', 'notice' => 'STOPPER'),\n array('name' => 'Error type is not chosen', 'description' => 'When a QAer makes a change but does not select an error category', 'notice' => 'STOPPER'),\n ),\n );\n }", "public function option_definition() {\n $options = parent::option_definition();\n $options['multi_type'] = array(\n 'default' => 'ol'\n );\n $options['list_class'] = array(\n 'default' => ''\n );\n $options['display_as_link'] = array(\n 'default' => FALSE\n );\n return $options;\n }", "protected function _getExtraOptions()\n {\n $opts = array(\n 'table|t-s' => 'The table\\'s name.',\n 'setters|S-s'\t=> 'The setter method.'\n );\n\n return $opts;\n }", "function opting($opt) {\n\t$opt['table']=ascheck(@$opt['table'],'');\n\t$opt['subject']=ascheck(@$opt['subject'],array());\n\t$opt['subject_str']=ar2str(@$opt['subject'],\"_\");\n\t$opt['topic_in']=ascheck(@$opt['topic_in'],array());\n\t$opt['topic_out']=ascheck(@$opt['topic_out'],array());\n\t$opt['name']=ascheck(@$opt['name'],$opt['subject_str'].ac::$nth);\n\t$opt['title']=ascheck(@$opt['title'],$opt['name']);\n\t$opt['id']=ascheck(@$opt['id'],'');\n\t$opt['bucket']=ascheck(@$opt['bucket'],false);\n\t$opt['list']=ascheck(@$opt['list'],false);\n\t$opt['debug']=ascheck(@$opt['debug'],false);\n\t$opt['class']=ascheck(@$opt['class'],'p');\n\t$opt['modal']=ascheck(@$opt['modal'],true);\n\t$opt['scope']=ascheck(@$opt['scope'],'');\n\t$opt['prepend']=ascheck(@$opt['prepend'],'');\n\t$opt['append']=ascheck(@$opt['append'],'');\n\t$opt['order']=ascheck(@$opt['order'],'');\n\treturn $opt;\n}", "public function getSubOptions();", "function wwm_2015_optionsframework_options() {\r\n\r\n\t$options = array();\r\n\t//Set the Section Tab Title\r\n\t$options[] = array(\r\n\t\t'name' => __('General Options', 'wwm_2015'),\r\n\t\t'type' => 'heading');\r\n\t\t//Logo\r\n\t\t\t$options[] = array(\r\n\t\t\t\t'name' => __('Main Logo', 'wwm_2015'),\r\n\t\t\t\t'desc' => __('Make sure to use a PNG, with a transparent background (the gray that you see above, is coded in...just for visibility purposes).', 'wwm_2015'),\r\n\t\t\t\t'id' => 'main_logo',\r\n\t\t\t\t'type' => 'upload',\r\n\t\t\t\t'class' => 'large-12 medium-12 small-12 columns');\t\t\r\n\t\t//Primary Color\r\n\t\t\t$options[] = array(\r\n\t\t\t\t\t'name' => __('Primary Color?', 'wwm_2015'),\r\n\t\t\t\t\t'desc' => __('The main color in the scheme', 'wwm_2015'),\r\n\t\t\t\t\t'id' => 'primary_color',\r\n\t\t\t\t\t'std' => '#565b7b',\r\n\t\t\t\t\t'default'=>'#565b7b',\r\n\t\t\t\t\t'type' => 'color',\r\n\t\t\t\t\t'class'=>'large-6 medium-12 small-12 columns'\r\n\t\t\t\t);\t\r\n\t\t//Secondary Color\r\n\t\t\t$options[] = array(\r\n\t\t\t\t\t'name' => __('Secondary Color?', 'wwm_2015'),\r\n\t\t\t\t\t'desc' => __('The secondary color in the scheme', 'wwm_2015'),\r\n\t\t\t\t\t'id' => 'secondary_color',\r\n\t\t\t\t\t'std' => '#d3e2f7',\r\n\t\t\t\t\t'default'=>'#d3e2f7',\r\n\t\t\t\t\t'type' => 'color',\r\n\t\t\t\t\t'class'=>'large-6 medium-12 small-12 columns'\r\n\t\t\t\t);\t\t\r\n\treturn $options;\r\n}", "function optionsframework_options() {\n\n\t$options = array();\n\n\t$options[] = array( \"name\" => \"Variables\",\n\t\t\"type\" => \"heading\" );\n\n\t$options[\"icon\"] = array(\n\t\t\"name\" => \"Fontawesome Icon\",\n\t\t\"id\" => \"icon\",\n\t\t\"std\" => \"fa-cogs\",\n\t\t\"type\" => \"text\");\n\n\t$options[\"claim\"] = array(\n\t\t\"name\" => \"Claim\",\n\t\t\"id\" => \"claim\",\n\t\t\"std\" => \"Sorry, we are down for scheduled maintenance. Come back soon!\",\n\t\t\"type\" => \"text\");\n\n\treturn $options;\n}", "public function print_advanced_css_section_info()\n {\n _e('This is the advanced css settings for the plugin.', 'bk-fonts');\n }", "abstract function fields_options();", "public function options();", "public function options();", "public function options();", "public function options();", "public function options();", "public function describe_client_options() {\n echo '<p>The following options configure what URL to access when a post is published in this blog.</p>';\n }", "function optionsframework_options() {\r\n\r\n\t// Radio button array for columns\r\n\t$columns_array = array(\"one\" => __(\"One Column Layout\", 'organicthemes'),\"two\" => __(\"Two Column Layout\", 'organicthemes'),\"three\" => __(\"Three Column Layout\", 'organicthemes'));\r\n\t\r\n\t// Test data\r\n\t$test_array = array(\"one\" => __(\"One\", 'organicthemes'),\"two\" => __(\"Two\", 'organicthemes'),\"three\" => __(\"Three\", 'organicthemes'),\"four\" => __(\"Four\", 'organicthemes'),\"five\" => __(\"Five\", 'organicthemes'));\r\n\r\n\t// Multicheck Array\r\n\t$multicheck_array = array(\"one\" => __(\"French Toast\", 'organicthemes'), \"two\" => __(\"Pancake\", 'organicthemes'), \"three\" => __(\"Omelette\", 'organicthemes'), \"four\" => __(\"Crepe\", 'organicthemes'), \"five\" => __(\"Waffle\", 'organicthemes'));\r\n\r\n\t// Multicheck Defaults\r\n\t$multicheck_defaults = array(\"one\" => \"true\",\"five\" => \"true\");\r\n\r\n\t// Background Defaults\r\n\t$background_defaults = array('color' => '', 'image' => '', 'repeat' => 'repeat','position' => 'top center','attachment'=>'scroll');\r\n\t\r\n\t// Slider Transition Array\r\n\t$transition_array = array(\"1000\" => __(\"1 Second\", 'organicthemes'), \"2000\" => __(\"2 Seconds\", 'organicthemes'), \"4000\" => __(\"4 Seconds\", 'organicthemes'), \"6000\" => __(\"6 Seconds\", 'organicthemes'), \"8000\" => __(\"8 Seconds\", 'organicthemes'), \"10000\" => __(\"10 Seconds\", 'organicthemes'), \"12000\" => __(\"12 Seconds\", 'organicthemes'), \"14000\" => __(\"14 Seconds\", 'organicthemes'), \"16000\" => __(\"16 Seconds\", 'organicthemes'), \"18000\" => __(\"18 Seconds\", 'organicthemes'), \"20000\" => __(\"20 Seconds\", 'organicthemes'), \"30000\" => __(\"30 Seconds\", 'organicthemes'), \"60000\" => __(\"1 Minute\", 'organicthemes'), \"999999999\" => __(\"Hold Frame\", 'organicthemes'));\r\n\t\r\n\t// Yes or No Array\r\n\t$yesno_array = array(\"true\" => __(\"Yes\", 'organicthemes'), \"false\" => __(\"No\", 'organicthemes'));\r\n\t\r\n\t// Pull product categories into an array\r\n\t$args = array( 'hide_empty' => '0' );\r\n\t$options_product = array();\r\n\t$options_product_obj = get_terms('product_cat', $args);\r\n\tif( $options_product_obj ) {\r\n\t foreach( $options_product_obj as $_product ) {\r\n\t $options_product[$_product->slug] = $_product->name;\r\n\t }\r\n\t}\r\n\tarray_unshift( $options_product, 'All Categories' );\r\n\r\n\t// Pull all the categories into an array\r\n\t$options_categories = array(); \r\n\t$options_categories_obj = get_categories();\r\n\tforeach ($options_categories_obj as $category) {\r\n \t$options_categories[$category->cat_ID] = $category->cat_name;\r\n\t}\r\n\t\r\n\t// Add all categories option\r\n $options_categories[0] = __(\"All Categories\", 'organicthemes');\r\n\r\n\t// Pull all the pages into an array\r\n\t$options_pages = array(); \r\n\t$options_pages_obj = get_pages('sort_column=post_parent,menu_order');\r\n\t$options_pages['false'] = __(\"Select a page:\", 'organicthemes');\r\n\tforeach ($options_pages_obj as $page) {\r\n \t$options_pages[$page->ID] = $page->post_title;\r\n\t}\r\n\r\n\t// If using image radio buttons, define a directory path\r\n\t$imagepath = get_bloginfo('stylesheet_directory') . '/images/';\r\n\r\n\t$options = array();\r\n\r\n\t$options[] = array( \"name\" => __(\"Homepage\", 'organicthemes'),\r\n\t\t\t\t\t\t\"type\" => \"heading\");\r\n\r\n\t\t$options[] = array( \"name\" => __(\"Featured Slideshow Category\", 'organicthemes'),\r\n\t\t\t\t\t\t\t\"desc\" => __(\"Choose the category you wish to display in the homepage slideshow.\", 'organicthemes'),\r\n\t\t\t\t\t\t\t\"id\" => \"category_slideshow_home\",\r\n\t\t\t\t\t\t\t\"std\" => __(\"Select a category:\", 'organicthemes'),\r\n\t\t\t\t\t\t\t\"type\" => \"select\",\r\n\t\t\t\t\t\t\t\"options\" => $options_categories);\r\n\t\t\t\t\t\t\t\r\n\t\t$options[] = array( \"name\" => __(\"Featured Slideshow Posts To Display\", 'organicthemes'),\r\n\t\t\t\t\t\t\t\"desc\" => __(\"Enter the number of posts you would like to display on the homepage slideshow.\", 'organicthemes'),\r\n\t\t\t\t\t\t\t\"id\" => \"postnumber_slideshow_home\",\r\n\t\t\t\t\t\t\t\"std\" => \"20\",\r\n\t\t\t\t\t\t\t\"type\" => \"text\");\r\n\t\t\t\t\t\t\t\r\n\t\t$options[] = array( \"name\" => __(\"Slideshow Transition Interval\", 'organicthemes'),\r\n\t\t\t\t\t\t\t\"desc\" => __(\"Choose the transition time for the slideshow. This is the time the frame is held before transitioning to the next slide.\", 'organicthemes'),\r\n\t\t\t\t\t\t\t\"id\" => \"transition_interval\",\r\n\t\t\t\t\t\t\t\"std\" => \"10000\",\r\n\t\t\t\t\t\t\t\"type\" => \"select\",\r\n\t\t\t\t\t\t\t\"options\" => $transition_array);\r\n\t\t\t\t\t\t\t\r\n\t\t$options[] = array( \"name\" => __(\"Select Featured Page\", 'organicthemes'),\r\n\t\t\t\t\t\t\t\"desc\" => __(\"Choose the page you wish to display in the featured featured section beneath the slider.\", 'organicthemes'),\r\n\t\t\t\t\t\t\t\"id\" => \"select_page\",\r\n\t\t\t\t\t\t\t\"std\" => __(\"Select a page:\", 'organicthemes'),\r\n\t\t\t\t\t\t\t\"type\" => \"select\",\r\n\t\t\t\t\t\t\t\"options\" => $options_pages);\r\n\t\t\t\t\t\t\t\r\n\t\t$options[] = array( \"name\" => __(\"Home Button Text\", 'organicthemes'),\r\n\t\t\t\t\t\t\t\"desc\" => __(\"Enter the text you wish to display for the home shop button.\", 'organicthemes'),\r\n\t\t\t\t\t\t\t\"id\" => \"home_btn_text\",\r\n\t\t\t\t\t\t\t\"std\" => __(\"View Collection\", 'organicthemes'),\r\n\t\t\t\t\t\t\t\"type\" => \"text\");\r\n\t\t\t\t\t\t\t\r\n\t\t$options[] = array( \"name\" => __(\"Home Button Link\", 'organicthemes'),\r\n\t\t\t\t\t\t\t\"desc\" => __(\"Enter the link you wish to use for the home shop button.\", 'organicthemes'),\r\n\t\t\t\t\t\t\t\"id\" => \"home_btn_link\",\r\n\t\t\t\t\t\t\t\"std\" => __(\"#blank\", 'organicthemes'),\r\n\t\t\t\t\t\t\t\"type\" => \"text\");\r\n\t\t\t\t\t\t\t\r\n\t$options[] = array( \"name\" => __(\"Layout\", 'organicthemes'),\r\n\t\t\t\t\t\t\"type\" => \"heading\");\r\n\t\t\t\t\t\t\r\n\t\t$options[] = array( \"name\" => __(\"Display Homepage Content?\", 'organicthemes'),\r\n\t\t\t\t\t\t\t\"desc\" => __(\"Selecting this option will display the featured page and sidebar beneath the slider on the homepage.\", 'organicthemes'),\r\n\t\t\t\t\t\t\t\"id\" => \"display_home_content\",\r\n\t\t\t\t\t\t\t\"std\" => \"0\",\r\n\t\t\t\t\t\t\t\"type\" => \"checkbox\");\r\n\t\t\t\t\t\t\r\n\t\t$options[] = array( \"name\" => __(\"Display Blog Sidebar?\", 'organicthemes'),\r\n\t\t\t\t\t\t\t\"desc\" => __(\"Selecting this option will display the sidebar on the blog page template.\", 'organicthemes'),\r\n\t\t\t\t\t\t\t\"id\" => \"display_blog_sidebar\",\r\n\t\t\t\t\t\t\t\"std\" => \"0\",\r\n\t\t\t\t\t\t\t\"type\" => \"checkbox\");\r\n\t\t\t\t\t\t\r\n\t\t$options[] = array( \"name\" => __(\"Display Page Featured Image?\", 'organicthemes'),\r\n\t\t\t\t\t\t\t\"desc\" => __(\"Selecting this option will display the featured image in the default page template.\", 'organicthemes'),\r\n\t\t\t\t\t\t\t\"id\" => \"display_feature_page\",\r\n\t\t\t\t\t\t\t\"std\" => \"1\",\r\n\t\t\t\t\t\t\t\"type\" => \"checkbox\");\r\n\t\t\t\t\t\t\t\r\n\t\t$options[] = array( \"name\" => __(\"Display Post Featured Image or Video?\", 'organicthemes'),\r\n\t\t\t\t\t\t\t\"desc\" => __(\"Selecting this option will display the featured image or video in an individual post.\", 'organicthemes'),\r\n\t\t\t\t\t\t\t\"id\" => \"display_feature_post\",\r\n\t\t\t\t\t\t\t\"std\" => \"1\",\r\n\t\t\t\t\t\t\t\"type\" => \"checkbox\");\r\n\t\t\t\t\t\t\t\r\n\t\t$options[] = array( \"name\" => __(\"Display Blog Featured Image or Video?\", 'organicthemes'),\r\n\t\t\t\t\t\t\t\"desc\" => __(\"Selecting this option will display the featured image or video on the blog page template.\", 'organicthemes'),\r\n\t\t\t\t\t\t\t\"id\" => \"display_feature_blog\",\r\n\t\t\t\t\t\t\t\"std\" => \"1\",\r\n\t\t\t\t\t\t\t\"type\" => \"checkbox\");\r\n\t\t\t\t\t\t\t\r\n\t\t$options[] = array( \"name\" => __(\"Display Slideshow Page Content?\", 'organicthemes'),\r\n\t\t\t\t\t\t\t\"desc\" => __(\"Selecting this option will display the page title and body content on the slideshow page template.\", 'organicthemes'),\r\n\t\t\t\t\t\t\t\"id\" => \"display_slideshow_info\",\r\n\t\t\t\t\t\t\t\"std\" => \"1\",\r\n\t\t\t\t\t\t\t\"type\" => \"checkbox\");\r\n\t\t\t\t\t\t\t\r\n\t\t$options[] = array( \"name\" => __(\"Display Drop Shadows?\", 'organicthemes'),\r\n\t\t\t\t\t\t\t\"desc\" => __(\"Selecting this option will display drop shadows around content boxes.\", 'organicthemes'),\r\n\t\t\t\t\t\t\t\"id\" => \"drop_shadows\",\r\n\t\t\t\t\t\t\t\"std\" => \"1\",\r\n\t\t\t\t\t\t\t\"type\" => \"checkbox\");\r\n\t\t\t\t\t\t\t\r\n\t\t$options[] = array( \"name\" => __(\"Enable CSS3 Full Width Background Image?\", 'organicthemes'),\r\n\t\t\t\t\t\t\t\"desc\" => __(\"Enables an applied background image to stretch to the full width of the browser. Do not use with a tiled background.\", 'organicthemes'),\r\n\t\t\t\t\t\t\t\"id\" => \"background_stretch\",\r\n\t\t\t\t\t\t\t\"std\" => \"0\",\r\n\t\t\t\t\t\t\t\"type\" => \"checkbox\");\r\n\t\t\t\t\t\t\t\r\n\t\t$options[] = array( \"name\" => __(\"Enable Responsive Layout?\", 'organicthemes'),\r\n\t\t\t\t\t\t\t\"desc\" => __(\"Enables the responsive site layout for the iPhone, iPad and mobile devices.\", 'organicthemes'),\r\n\t\t\t\t\t\t\t\"id\" => \"enable_responsive\",\r\n\t\t\t\t\t\t\t\"std\" => \"1\",\r\n\t\t\t\t\t\t\t\"type\" => \"checkbox\");\r\n\t\t\t\t\t\t\r\n\t$options[] = array( \"name\" => __(\"Page Templates\", 'organicthemes'),\r\n\t\t\t\t\t\t\"type\" => \"heading\");\r\n\t\t\t\t\t\t\r\n\t\t$options[] = array( \"name\" => __(\"Blog Category\", 'organicthemes'),\r\n\t\t\t\t\t\t\t\"desc\" => __(\"Choose the category you wish to display on the blog page template.\", 'organicthemes'),\r\n\t\t\t\t\t\t\t\"id\" => \"category_blog\",\r\n\t\t\t\t\t\t\t\"std\" => __(\"Select a category:\", 'organicthemes'),\r\n\t\t\t\t\t\t\t\"type\" => \"select\",\r\n\t\t\t\t\t\t\t\"options\" => $options_categories);\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t$options[] = array( \"name\" => __(\"Blog Posts To Display\", 'organicthemes'),\r\n\t\t\t\t\t\t\t\"desc\" => __(\"Enter the number of posts you would like to display on the blog page template.\", 'organicthemes'),\r\n\t\t\t\t\t\t\t\"id\" => \"postnumber_blog\",\r\n\t\t\t\t\t\t\t\"std\" => \"5\",\r\n\t\t\t\t\t\t\t\"type\" => \"text\");\r\n\t\t\t\t\t\t\t\r\n\t\t$options[] = array( \"name\" => __(\"Full Width Shop Template Category\", 'organicthemes'),\r\n\t\t\t\t\t\t\t\"desc\" => __(\"Choose the product category you wish to display in the full width shop page template. This option requires the WooCommerce plugin installed and activated.\", 'organicthemes'),\r\n\t\t\t\t\t\t\t\"id\" => \"category_products\",\r\n\t\t\t\t\t\t\t\"std\" => __(\"Select a category:\", 'organicthemes'),\r\n\t\t\t\t\t\t\t\"type\" => \"select\",\r\n\t\t\t\t\t\t\t\"options\" => $options_product);\r\n\t\t\t\t\t\t\t\r\n\t\t$options[] = array( \"name\" => __(\"Full Width Shop Template Products Displayed\", 'organicthemes'),\r\n\t\t\t\t\t\t\t\"desc\" => __(\"Enter the number of products you would like displayed in the full width shop page template. This option requires the WooCommerce plugin installed and activated.\", 'organicthemes'),\r\n\t\t\t\t\t\t\t\"id\" => \"postnumber_products\",\r\n\t\t\t\t\t\t\t\"std\" => \"24\",\r\n\t\t\t\t\t\t\t\"type\" => \"text\");\r\n\t\t\t\t\t\t\r\n\t$options[] = array( \"name\" => __(\"Portfolios\", 'organicthemes'),\r\n\t\t\t\t\t\t\"type\" => \"heading\");\r\n\t\t\t\t\t\t\r\n\t\t$options[] = array( \"name\" => __(\"Display Portfolio Info on Page Templates?\", 'organicthemes'),\r\n\t\t\t\t\t\t\t\"desc\" => __(\"Select whether or not you would like to display the post title and excerpt on portfolio page templates.\", 'organicthemes'),\r\n\t\t\t\t\t\t\t\"id\" => \"display_portfolio_info_page\",\r\n\t\t\t\t\t\t\t\"std\" => \"1\",\r\n\t\t\t\t\t\t\t\"type\" => \"checkbox\");\r\n\t\t\t\t\t\t\t\r\n\t\t$options[] = array( \"name\" => __(\"Three Column Portfolio Template Category\", 'organicthemes'),\r\n\t\t\t\t\t\t\t\"desc\" => __(\"Choose the category you wish to display on the three column portfolio page template.\", 'organicthemes'),\r\n\t\t\t\t\t\t\t\"id\" => \"category_portfolio_three\",\r\n\t\t\t\t\t\t\t\"std\" => __(\"Select a category:\", 'organicthemes'),\r\n\t\t\t\t\t\t\t\"type\" => \"select\",\r\n\t\t\t\t\t\t\t\"options\" => $options_categories);\r\n\t\t\t\t\t\t\t\r\n\t\t$options[] = array( \"name\" => __(\"Three Column Portfolio Posts Displayed\", 'organicthemes'),\r\n\t\t\t\t\t\t\t\"desc\" => __(\"Enter the number of posts you would like to display on the three column portfolio page template.\", 'organicthemes'),\r\n\t\t\t\t\t\t\t\"id\" => \"postnumber_portfolio_three\",\r\n\t\t\t\t\t\t\t\"std\" => \"12\",\r\n\t\t\t\t\t\t\t\"type\" => \"text\");\r\n\r\n\r\n\r\n\r\n\r\n\t\t\t\t\t\t\t\r\n\t\t$options[] = array( \"name\" => __(\"Two Column Portfolio Template Category\", 'organicthemes'),\r\n\t\t\t\t\t\t\t\"desc\" => __(\"Choose the category you wish to display on the two column portfolio page template.\", 'organicthemes'),\r\n\t\t\t\t\t\t\t\"id\" => \"category_portfolio_two\",\r\n\t\t\t\t\t\t\t\"std\" => __(\"Select a category:\", 'organicthemes'),\r\n\t\t\t\t\t\t\t\"type\" => \"select\",\r\n\t\t\t\t\t\t\t\"options\" => $options_categories);\r\n\t\t\t\t\t\t\t\r\n\t\t$options[] = array( \"name\" => __(\"Two Column Portfolio Posts Displayed\", 'organicthemes'),\r\n\t\t\t\t\t\t\t\"desc\" => __(\"Enter the number of posts you would like to display on the two column portfolio page template.\", 'organicthemes'),\r\n\t\t\t\t\t\t\t\"id\" => \"postnumber_portfolio_two\",\r\n\t\t\t\t\t\t\t\"std\" => \"12\",\r\n\t\t\t\t\t\t\t\"type\" => \"text\");\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\r\n\t\t$options[] = array( \"name\" => __(\"Two Column Portfolio Template Category\", 'organicthemes'),\r\n\t\t\t\t\t\t\t\"desc\" => __(\"Choose the category you wish to display on the two column portfolio page template.\", 'organicthemes'),\r\n\t\t\t\t\t\t\t\"id\" => \"category_portfolio_two_new\",\r\n\t\t\t\t\t\t\t\"std\" => __(\"Select a category:\", 'organicthemes'),\r\n\t\t\t\t\t\t\t\"type\" => \"select\",\r\n\t\t\t\t\t\t\t\"options\" => $options_categories);\r\n\t\t\t\t\t\t\t\r\n\t\t$options[] = array( \"name\" => __(\"Two Column Portfolio Posts Displayed\", 'organicthemes'),\r\n\t\t\t\t\t\t\t\"desc\" => __(\"Enter the number of posts you would like to display on the two column portfolio page template.\", 'organicthemes'),\r\n\t\t\t\t\t\t\t\"id\" => \"postnumber_portfolio_two_new\",\r\n\t\t\t\t\t\t\t\"std\" => \"12\",\r\n\t\t\t\t\t\t\t\"type\" => \"text\");\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t$options[] = array( \"name\" => __(\"Two Column Portfolio Template Category new\", 'organicthemes'),\r\n\t\t\t\t\t\t\t\"desc\" => __(\"Choose the category you wish to display on the two column portfolio page template.\", 'organicthemes'),\r\n\t\t\t\t\t\t\t\"id\" => \"category_portfolio_two_new2\",\r\n\t\t\t\t\t\t\t\"std\" => __(\"Select a category:\", 'organicthemes'),\r\n\t\t\t\t\t\t\t\"type\" => \"select\",\r\n\t\t\t\t\t\t\t\"options\" => $options_categories);\r\n\t\t\t\t\t\t\t\r\n\t\t$options[] = array( \"name\" => __(\"Two Column Portfolio Posts Displayed\", 'organicthemes'),\r\n\t\t\t\t\t\t\t\"desc\" => __(\"Enter the number of posts you would like to display on the two column portfolio page template.\", 'organicthemes'),\r\n\t\t\t\t\t\t\t\"id\" => \"postnumber_portfolio_two_new2\",\r\n\t\t\t\t\t\t\t\"std\" => \"12\",\r\n\t\t\t\t\t\t\t\"type\" => \"text\");\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\t\t\t\t\t\t\t\r\n\t\t$options[] = array( \"name\" => __(\"One Column Portfolio Template Category\", 'organicthemes'),\r\n\t\t\t\t\t\t\t\"desc\" => __(\"Choose the category you wish to display on the one column portfolio page template.\", 'organicthemes'),\r\n\t\t\t\t\t\t\t\"id\" => \"category_portfolio_one\",\r\n\t\t\t\t\t\t\t\"std\" => __(\"Select a category:\", 'organicthemes'),\r\n\t\t\t\t\t\t\t\"type\" => \"select\",\r\n\t\t\t\t\t\t\t\"options\" => $options_categories);\r\n\t\t\t\t\t\t\t\r\n\t\t$options[] = array( \"name\" => __(\"One Column Portfolio Posts To Display\", 'organicthemes'),\r\n\t\t\t\t\t\t\t\"desc\" => __(\"Enter the number of posts you would like to display on the one column portfolio page template.\", 'organicthemes'),\r\n\t\t\t\t\t\t\t\"id\" => \"postnumber_portfolio_one\",\r\n\t\t\t\t\t\t\t\"std\" => \"6\",\r\n\t\t\t\t\t\t\t\"type\" => \"text\");\r\n\t\t\t\t\t\t\r\n\t\t$options[] = array( \"name\" => __(\"Display Portfolio Info on Categories?\", 'organicthemes'),\r\n\t\t\t\t\t\t\t\"desc\" => __(\"Select whether or not you would like to display the post title and excerpt on portfolio category pages.\", 'organicthemes'),\r\n\t\t\t\t\t\t\t\"id\" => \"display_portfolio_info_cat\",\r\n\t\t\t\t\t\t\t\"std\" => \"1\",\r\n\t\t\t\t\t\t\t\"type\" => \"checkbox\");\r\n\t\t\t\t\t\t\t\r\n\t\t$options[] = array( \"name\" => __(\"Choose Portfolio Category Columns\", 'organicthemes'),\r\n\t\t\t\t\t\t\t\"id\" => \"portfolio_columns\",\r\n\t\t\t\t\t\t\t\"std\" => \"one\",\r\n\t\t\t\t\t\t\t\"type\" => \"radio\",\r\n\t\t\t\t\t\t\t\"options\" => $columns_array);\r\n\t\t\t\t\t\t\r\n\t$options[] = array( \"name\" => __(\"Social\", 'organicthemes'),\r\n\t\t\t\t\t\t\"type\" => \"heading\");\r\n\t\t\t\t\t\t\t\r\n\t\t$options[] = array( \"name\" => __(\"Blog Social Links\", 'organicthemes'),\r\n\t\t\t\t\t\t\t\"desc\" => __(\"Select whether or not you would like to display the social links on the blog page template. Disabling this feature will increase the blog load time drastically.\", 'organicthemes'),\r\n\t\t\t\t\t\t\t\"id\" => \"display_social_blog\",\r\n\t\t\t\t\t\t\t\"std\" => \"1\",\r\n\t\t\t\t\t\t\t\"type\" => \"checkbox\");\r\n\t\t\t\t\t\t\t\r\n\t\t$options[] = array( \"name\" => __(\"Post Social Links\", 'organicthemes'),\r\n\t\t\t\t\t\t\t\"desc\" => __(\"Select whether or not you would like to display the social links on the individual posts.\", 'organicthemes'),\r\n\t\t\t\t\t\t\t\"id\" => \"display_social_post\",\r\n\t\t\t\t\t\t\t\"std\" => \"1\",\r\n\t\t\t\t\t\t\t\"type\" => \"checkbox\");\r\n\t\t\t\t\t\t\t\r\n\t\t$options[] = array( \"name\" => __(\"Facebook Icon?\", 'organicthemes'),\r\n\t\t\t\t\t\t\t\"desc\" => __(\"This option displays the Facebook icon in the footer.\", 'organicthemes'),\r\n\t\t\t\t\t\t\t\"id\" => \"display_facebook\",\r\n\t\t\t\t\t\t\t\"std\" => \"1\",\r\n\t\t\t\t\t\t\t\"type\" => \"checkbox\");\r\n\t\t\t\t\t\t\t\r\n\t\t$options[] = array( \"name\" => __(\"Twitter Icon?\", 'organicthemes'),\r\n\t\t\t\t\t\t\t\"desc\" => __(\"This option displays the Twitter icon in the footer.\", 'organicthemes'),\r\n\t\t\t\t\t\t\t\"id\" => \"display_twitter\",\r\n\t\t\t\t\t\t\t\"std\" => \"1\",\r\n\t\t\t\t\t\t\t\"type\" => \"checkbox\");\r\n\t\t\t\t\t\t\t\r\n\t\t$options[] = array( \"name\" => __(\"Google Plus Icon?\", 'organicthemes'),\r\n\t\t\t\t\t\t\t\"desc\" => __(\"This option displays the Google Plus icon in the footer.\", 'organicthemes'),\r\n\t\t\t\t\t\t\t\"id\" => \"display_plus\",\r\n\t\t\t\t\t\t\t\"std\" => \"1\",\r\n\t\t\t\t\t\t\t\"type\" => \"checkbox\");\r\n\t\t\t\t\t\t\t\r\n\t\t$options[] = array( \"name\" => __(\"Pinterest Icon?\", 'organicthemes'),\r\n\t\t\t\t\t\t\t\"desc\" => __(\"This option displays the Pinterest icon in the footer.\", 'organicthemes'),\r\n\t\t\t\t\t\t\t\"id\" => \"display_pinterest\",\r\n\t\t\t\t\t\t\t\"std\" => \"1\",\r\n\t\t\t\t\t\t\t\"type\" => \"checkbox\");\r\n\t\t\t\t\t\t\t\r\n\t\t$options[] = array( \"name\" => __(\"RSS Icon?\", 'organicthemes'),\r\n\t\t\t\t\t\t\t\"desc\" => __(\"This option displays the RSS icon and link in the footer.\", 'organicthemes'),\r\n\t\t\t\t\t\t\t\"id\" => \"display_rss\",\r\n\t\t\t\t\t\t\t\"std\" => \"1\",\r\n\t\t\t\t\t\t\t\"type\" => \"checkbox\");\r\n\r\n\t\t$options[] = array( \"name\" => __(\"instagram Icon?\", 'organicthemes'),\r\n\t\t\t\t\t\t\t\"desc\" => __(\"This option displays the instagram icon and link in the footer.\", 'organicthemes'),\r\n\t\t\t\t\t\t\t\"id\" => \"display_instagram\",\r\n\t\t\t\t\t\t\t\"std\" => \"1\",\r\n\t\t\t\t\t\t\t\"type\" => \"checkbox\");\r\n\t\t\t\t\t\t\t\r\n\t\t$options[] = array( \"name\" => __(\"Twitter Name\", 'organicthemes'),\r\n\t\t\t\t\t\t\t\"desc\" => __(\"Please enter your Twitter username.\", 'organicthemes'),\r\n\t\t\t\t\t\t\t\"id\" => \"twitter_user\",\r\n\t\t\t\t\t\t\t\"std\" => __(\"organicthemes\", 'organicthemes'),\r\n\t\t\t\t\t\t\t\"type\" => \"text\");\r\n\t\t\t\t\t\t\t\r\n\t\t$options[] = array( \"name\" => __(\"Facebook Page Link\", 'organicthemes'),\r\n\t\t\t\t\t\t\t\"desc\" => __(\"Enter a link to your Facebook page or profile.\", 'organicthemes'),\r\n\t\t\t\t\t\t\t\"id\" => \"facebook_link\",\r\n\t\t\t\t\t\t\t\"std\" => __(\"http://facebook.com\", 'organicthemes'),\r\n\t\t\t\t\t\t\t\"type\" => \"text\");\r\n\t\t\t\t\t\t\t\r\n\t\t$options[] = array( \"name\" => __(\"Twitter Account Link\", 'organicthemes'),\r\n\t\t\t\t\t\t\t\"desc\" => __(\"Enter a link to your Twitter account.\", 'organicthemes'),\r\n\t\t\t\t\t\t\t\"id\" => \"twitter_link\",\r\n\t\t\t\t\t\t\t\"std\" => __(\"http://twitter.com\", 'organicthemes'),\r\n\t\t\t\t\t\t\t\"type\" => \"text\");\r\n\t\t\t\t\t\t\t\r\n\t\t$options[] = array( \"name\" => __(\"Google Plus Profile Link\", 'organicthemes'),\r\n\t\t\t\t\t\t\t\"desc\" => __(\"Enter a link to your Google Plus page.\", 'organicthemes'),\r\n\t\t\t\t\t\t\t\"id\" => \"plus_link\",\r\n\t\t\t\t\t\t\t\"std\" => __(\"https://plus.google.com/\", 'organicthemes'),\r\n\t\t\t\t\t\t\t\"type\" => \"text\");\r\n\t\t\t\t\t\t\t\r\n\t\t$options[] = array( \"name\" => __(\"Pinterest Profile Link\", 'organicthemes'),\r\n\t\t\t\t\t\t\t\"desc\" => __(\"Enter a link to your Pinterest page.\", 'organicthemes'),\r\n\t\t\t\t\t\t\t\"id\" => \"pinterest_link\",\r\n\t\t\t\t\t\t\t\"std\" => __(\"http://pinterest.com\", 'organicthemes'),\r\n\t\t\t\t\t\t\t\"type\" => \"text\");\r\n\t\t$options[] = array( \"name\" => __(\"instagram Profile Link\", 'organicthemes'),\r\n\t\t\t\t\t\t\t\"desc\" => __(\"Enter a link to your instagram page.\", 'organicthemes'),\r\n\t\t\t\t\t\t\t\"id\" => \"instagram_link\",\r\n\t\t\t\t\t\t\t\"std\" => __(\"http://instagram.com\", 'organicthemes'),\r\n\t\t\t\t\t\t\t\"type\" => \"text\");\r\n\t\t\t\t\t\t\t\r\n\t\t$options[] = array( \"name\" => __(\"Enable PressTrends?\", 'organicthemes'),\r\n\t\t\t\t\t\t\t\"desc\" => __(\"This option enables the PressTrends code in the theme functions.\", 'organicthemes'),\r\n\t\t\t\t\t\t\t\"id\" => \"enable_presstrends\",\r\n\t\t\t\t\t\t\t\"std\" => \"1\",\r\n\t\t\t\t\t\t\t\"type\" => \"checkbox\");\r\n\t\t\t\t\t\t\t\r\n\t$options[] = array( \"name\" => __(\"Colors\", 'organicthemes'),\r\n\t\t\t\t\t\t\"type\" => \"heading\");\r\n\t\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t$options[] = array( \"name\" => __(\"Link Color\", 'organicthemes'),\r\n\t\t\t\t\t\t\t\"desc\" => __(\"Select the color you wish to use for the link colors.\", 'organicthemes'),\r\n\t\t\t\t\t\t\t\"id\" => \"link_color\",\r\n\t\t\t\t\t\t\t\"std\" => \"#000000\",\r\n\t\t\t\t\t\t\t\"type\" => \"color\");\r\n\t\t\t\t\t\t\t\r\n\t\t$options[] = array( \"name\" => __(\"Link Hover Color\", 'organicthemes'),\r\n\t\t\t\t\t\t\t\"desc\" => __(\"Select the color you wish to use for the text link hover colors.\", 'organicthemes'),\r\n\t\t\t\t\t\t\t\"id\" => \"link_hover_color\",\r\n\t\t\t\t\t\t\t\"std\" => \"#66CCCC\",\r\n\t\t\t\t\t\t\t\"type\" => \"color\");\r\n\t\t\t\t\t\t\t\r\n\t\t$options[] = array( \"name\" => __(\"Heading Link Color\", 'organicthemes'),\r\n\t\t\t\t\t\t\t\"desc\" => __(\"Select the color you wish to use for the heading link colors.\", 'organicthemes'),\r\n\t\t\t\t\t\t\t\"id\" => \"heading_link_color\",\r\n\t\t\t\t\t\t\t\"std\" => \"#333333\",\r\n\t\t\t\t\t\t\t\"type\" => \"color\");\r\n\t\t\t\t\t\t\t\r\n\t\t$options[] = array( \"name\" => __(\"Heading Link Hover Color\", 'organicthemes'),\r\n\t\t\t\t\t\t\t\"desc\" => __(\"Select the color you wish to use for the heading link hover colors.\", 'organicthemes'),\r\n\t\t\t\t\t\t\t\"id\" => \"heading_link_hover_color\",\r\n\t\t\t\t\t\t\t\"std\" => \"#66CCCC\",\r\n\t\t\t\t\t\t\t\"type\" => \"color\");\r\n\t\t\t\t\t\t\t\r\n\t\t$options[] = array( \"name\" => __(\"Highlight Color\", 'organicthemes'),\r\n\t\t\t\t\t\t\t\"desc\" => __(\"Select the color you wish to use for the highlight color. This refers primarily to button colors.\", 'organicthemes'),\r\n\t\t\t\t\t\t\t\"id\" => \"highlight_color\",\r\n\t\t\t\t\t\t\t\"std\" => \"#66CCCC\",\r\n\t\t\t\t\t\t\t\"type\" => \"color\");\r\n\r\n\treturn $options;\r\n}", "private function _get_help_section_settings() {\r\n\r\n return array(\r\n\r\n array(\r\n 'title' => __( 'Help Options' , 'woocommerce-wholesale-order-form' ),\r\n 'type' => 'title',\r\n 'desc' => '',\r\n 'id' => 'wwof_help_main_title'\r\n ),\r\n\r\n array(\r\n 'name' => '',\r\n 'type' => 'wwof_help_resources',\r\n 'desc' => '',\r\n 'id' => 'wwof_help_help_resources',\r\n ),\r\n\r\n array(\r\n 'title' => __( 'Create Wholesale Ordering Page' , 'woocommerce-wholesale-order-form' ),\r\n 'type' => 'wwof_button',\r\n 'desc' => '',\r\n 'id' => 'wwof_help_create_wholesale_page',\r\n 'class' => 'button button-primary'\r\n ),\r\n\r\n array(\r\n 'name' => __( 'Clean up plugin options on un-installation' , 'woocommerce-wholesale-prices-premium' ),\r\n 'type' => 'checkbox',\r\n 'desc' => __( 'If checked, removes all plugin options when this plugin is uninstalled. <b>Warning:</b> This process is irreversible.' , 'woocommerce-wholesale-prices-premium' ),\r\n 'id' => 'wwof_settings_help_clean_plugin_options_on_uninstall'\r\n ),\r\n \r\n array(\r\n 'type' => 'sectionend',\r\n 'id' => 'wwof_help_sectionend'\r\n )\r\n\r\n );\r\n\r\n }", "function inkpro_create_options() {\r\n\treturn array();\r\n}", "public function help(){\n\t\t$list = array();foreach($this->getEncryptionKeys() as $k=>$v){$list[]=$k;}\n\t\treturn \"Supported Encryped sections: \". rtrim(implode(',', $list), ',');\n\t}", "public function add_sections()\n {\n }", "protected function get_options()\n\t{}", "public function print_section_info()\n {\n print \"Don't use long sentences below!\";\n }", "public function init_sections () {\r\n\t\t$sections = array();\r\n\t\t\r\n\t\t$sections['general'] = array(\r\n\t\t\t'name' \t\t\t=> __( 'General Settings', 'woodojo-maintenance-mode' ), \r\n\t\t\t'description'\t=> sprintf( __( 'The default option is to use a native error message on the front end of your website. You can customize this by entering a title and note below. To customize your own maintenance mode theme, you can add a %s file to your current theme (child theme, if you\\'re using one).', 'woodojo-maintenance-mode' ), '<code>503.php</code>' )\r\n\t\t);\r\n\t\t\r\n\t\t$this->sections = $sections;\r\n\t}", "private static function _addThreedsOptions()\n {\n global $db;\n\n $challengeIndicators = EMerchantPayCommon::buildSettingsDropDownOptions(\n EmpCheckoutSettings::getChallengeIndicators()\n );\n\n $db->Execute(\n 'insert into ' . TABLE_CONFIGURATION . \"\n (configuration_title, configuration_key, configuration_value,\n configuration_description, configuration_group_id, sort_order,\n set_function, use_function, date_added)\n values\n ('Enable 3DSv2',\n '\" . EmpCheckoutSettings::getCompleteSettingKey(\n 'THREEDS_ALLOWED'\n ) . \"',\n 'true', 'Enable 3DSv2 optional parameters.',\n '6', '4', 'emp_zfg_draw_toggle(',\n 'emp_zfg_get_toggle_value', now())\"\n );\n $db->Execute(\n 'insert into ' . TABLE_CONFIGURATION . \"\n (configuration_title, configuration_key, configuration_value,\n configuration_description, configuration_group_id, sort_order,\n set_function, date_added)\n values\n ('3DSv2 Challenge',\n '\" . EmpCheckoutSettings::getCompleteSettingKey(\n 'THREEDS_CHALLENGE_INDICATOR'\n ) . \"', 'no_preference', \n 'The value has weight and might impact the decision whether a \n challenge will be required for the transaction or not.',\n '6', '4', 'emp_zfg_select_drop_down_single({$challengeIndicators},',\n now())\"\n );\n }", "public function getOptions() {\n\t\tif ($this->row->options != '') {\n\t\t\t$options = explode(\";\", $this->row->options);\n\t\t}\n\t\tif ($this->row->intoptions != '') {\n\t\t\t$intoptions = explode(\";\", $this->row->intoptions);\n\t\t\t$options_map = array_combine($intoptions, $options);\n\t\t}\n\t\tif ($options) {\n\t\t\t$msg = \"Predefined Options:\\n\";\n\t\t\tif ($intoptions) {\n\t\t\t\tforeach ($options_map as $key => $label) {\n\t\t\t\t\t$save_link = $this->text->makeChatcmd('Select', \"/tell <myname> settings save {$this->row->name} {$key}\");\n\t\t\t\t\t$msg .= \"<tab> <highlight>{$label}<end> ({$save_link})\\n\";\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tforeach ($options as $char) {\n\t\t\t\t\t$save_link = $this->text->makeChatcmd('Select', \"/tell <myname> settings save {$this->row->name} {$char}\");\n\t\t\t\t\t$msg .= \"<tab> <highlight>{$char}<end> ({$save_link})\\n\";\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn $msg;\n\t}", "public function add_sections() {\n\t\t/**\n\t\t * Add generic section without label as it's requirement for `add_settings_field`.\n\t\t */\n\t\t\\add_settings_section(\n\t\t\t'bwcpp_settings_general',\n\t\t\t'',\n\t\t\t'',\n\t\t\t'bwcpp_settings'\n\t\t);\n\n\t\t/**\n\t\t * Add limit pictures setting.\n\t\t *\n\t\t * Pass through `intval` for sanitization.\n\t\t * Default value set to `20`.\n\t\t */\n\t\t\\register_setting(\n\t\t\t'bwcpp_settings',\n\t\t\tBWCPP_LIMIT_OPTION_NAME,\n\t\t\tarray(\n\t\t\t\t'type' => 'integer',\n\t\t\t\t'sanitize_callback' => 'intval',\n\t\t\t\t'default' => 20,\n\t\t\t),\n\t\t);\n\n\t\t/**\n\t\t * Adds settings field for limit pictures setting.\n\t\t */\n\t\t\\add_settings_field(\n\t\t\tBWCPP_LIMIT_OPTION_NAME,\n\t\t\t__( 'Max pictures per user', 'bwcpp' ),\n\t\t\tarray( $this, 'render_max_control' ),\n\t\t\t'bwcpp_settings',\n\t\t\t'bwcpp_settings_general',\n\t\t\tarray(\n\t\t\t\t'label_for' => BWCPP_LIMIT_OPTION_NAME,\n\t\t\t\t'id' => BWCPP_LIMIT_OPTION_NAME,\n\t\t\t\t'description' => __( 'Enter 0 for unlimited.', 'bwcpp' ),\n\t\t\t)\n\t\t);\n\t}", "function admin_section_builder($data,$args) {echo '<div class=\"options-description\" style=\"padding:10px; line-height: 1.6;\">' . $args['args']['description'] . '</div><table class=\"form-table\">'; do_settings_fields( $this->page, $args['args']['section'] ); echo '</table>';}", "public static function bkap_get_extra_options(){\n\n return apply_filters( 'bkap_extra_options', array(\n \n 'bkap_resource' => array(\n 'id' => '_bkap_resource',\n 'wrapper_class' => 'show_if_simple',\n 'label' => __( 'Booking Resource', 'woocommerce-booking' ),\n 'description' => __( 'Booking Resource Description.', 'woocommerce-booking' ),\n 'default' => 'no',\n ),\n ) );\n }", "private function _get_general_section_settings() {\r\n\r\n global $WWOF_SETTINGS_SORT_BY, $WWOF_SETTINGS_DEFAULT_PPP;\r\n\r\n return array(\r\n\r\n array(\r\n 'title' => __( 'General Options', 'woocommerce-wholesale-order-form' ),\r\n 'type' => 'title',\r\n 'desc' => '',\r\n 'id' => 'wwof_general_main_title'\r\n ),\r\n\r\n array(\r\n 'title' => __( 'Use Alternate View Of Wholesale Page?', 'woocommerce-wholesale-order-form' ),\r\n 'type' => 'checkbox',\r\n 'desc' => __( 'Checkbox on the right side of each product, and add to cart button at the bottom of the list' , 'woocommerce-wholesale-order-form' ),\r\n 'id' => 'wwof_general_use_alternate_view_of_wholesale_page'\r\n ),\r\n\r\n array(\r\n 'title' => __( 'Disable Pagination?' , 'woocommerce-wholesale-order-form' ),\r\n 'type' => 'checkbox',\r\n 'desc' => __( 'Shows all products by lazy loading them in when the user scrolls down. The form will load in groups of products based on the number specified in the Products Per Page setting.' , 'woocommerce-wholesale-order-form' ),\r\n 'id' => 'wwof_general_disable_pagination'\r\n ),\r\n\r\n array(\r\n 'title' => __( 'Products Per Page' , 'woocommerce-wholesale-order-form' ),\r\n 'type' => 'number',\r\n 'desc_tip' => sprintf( __( 'Number of products to display per page (for pagination) or how many products to load at a time (for lazy loading). Default is 12 products when left empty.' , 'woocommerce-wholesale-order-form' ) , $WWOF_SETTINGS_DEFAULT_PPP ),\r\n 'id' => 'wwof_general_products_per_page',\r\n ),\r\n\r\n array(\r\n 'title' => __( 'Show In Stock Quantity?', 'woocommerce-wholesale-order-form' ),\r\n 'type' => 'checkbox',\r\n 'desc' => __( 'Should we display product stock quantity on the product listing on the front end?' , 'woocommerce-wholesale-order-form' ),\r\n 'id' => 'wwof_general_show_product_stock_quantity'\r\n ),\r\n\r\n array(\r\n 'title' => __( 'Show Product SKU?', 'woocommerce-wholesale-order-form' ),\r\n 'type' => 'checkbox',\r\n 'desc' => __( 'Should we display product sku on the product listing on the front end?' , 'woocommerce-wholesale-order-form' ),\r\n 'id' => 'wwof_general_show_product_sku'\r\n ),\r\n\r\n array(\r\n 'title' => __( 'Allow Product SKU Search?', 'woocommerce-wholesale-order-form' ),\r\n 'type' => 'checkbox',\r\n 'desc' => __( 'Should we allow searching for products via sku on the product listing on the front end?' , 'woocommerce-wholesale-order-form' ),\r\n 'id' => 'wwof_general_allow_product_sku_search'\r\n ),\r\n\r\n array(\r\n 'title' => __( 'Show Product Thumbnail?', 'woocommerce-wholesale-order-form' ),\r\n 'type' => 'checkbox',\r\n 'desc' => __( 'Should we display a small product thumbnail on the product listing on the front end?' , 'woocommerce-wholesale-order-form' ),\r\n 'id' => 'wwof_general_show_product_thumbnail'\r\n ),\r\n\r\n array(\r\n 'title' => __( 'Product Thumbnail Size', 'woocommerce-wholesale-order-form' ),\r\n 'desc' => __( 'This size is used in wholesale product listings', 'woocommerce-wholesale-order-form' ),\r\n 'id' => 'wwof_general_product_thumbnail_image_size',\r\n 'css' => '',\r\n 'type' => 'wwof_image_dimension',\r\n 'default' => array(\r\n 'width' => '48',\r\n 'height' => '48'\r\n ),\r\n 'desc_tip' => true,\r\n ),\r\n\r\n array(\r\n 'title' => __( 'Display the product details in a lightbox popup on click?' , 'woocommerce-wholesale-order-form' ),\r\n 'type' => 'checkbox',\r\n 'desc' => __( \"Should the product details be displayed in a popup or redirect the user to the product's page?\" , 'woocommerce-wholesale-order-form' ),\r\n 'id' => 'wwof_general_display_product_details_on_popup'\r\n ),\r\n\r\n array(\r\n 'title' => __( 'Display Zero Inventory Products?' , 'woocommerce-wholesale-order-form' ),\r\n 'type' => 'checkbox',\r\n 'desc' => __( 'Zero inventory products are products that are out of inventory and do not allow backorders. This also includes non simple products whose composition requires a certain products that have zero inventory.' , 'woocommerce-wholesale-order-form' ),\r\n 'id' => 'wwof_general_display_zero_products'\r\n ),\r\n\r\n array(\r\n 'title' => __( 'Hide wholesale quantity discount prices.' , 'woocommerce-wholesale-order-form' ),\r\n 'type' => 'checkbox',\r\n 'desc' => sprintf( __( 'Hides the small table printed under the wholesale price when quantity based discounts are available for that product. Only used when <a href=\"%1$s\" target=\"blank\">WooCommerce Wholesale Prices Premium</a> is active.' , 'woocommerce-wholesale-order-form' ) , 'https://wholesalesuiteplugin.com/product/woocommerce-wholesale-prices-premium/' ),\r\n 'id' => 'wwof_general_hide_quantity_discounts'\r\n ),\r\n\r\n array(\r\n 'title' => __( 'Sort By' , 'woocommerce-wholesale-order-form' ),\r\n 'type' => 'select',\r\n 'desc' => '',\r\n 'id' => 'wwof_general_sort_by',\r\n 'class' => 'chosen_select',\r\n 'options' => $WWOF_SETTINGS_SORT_BY\r\n ),\r\n\r\n array(\r\n 'title' => __( 'Sort Order' , 'woocommerce-wholesale-order-form' ),\r\n 'type' => 'select',\r\n 'desc' => '',\r\n 'id' => 'wwof_general_sort_order',\r\n 'class' => 'chosen_select',\r\n 'options' => array(\r\n 'asc' => __( 'Ascending' , 'woocommerce-wholesale-order-form' ),\r\n 'desc' => __( 'Descending' , 'woocommerce-wholesale-order-form' )\r\n )\r\n ),\r\n\r\n array(\r\n 'title' => __( 'Display Cart Subtotal?' , 'woocommerce-wholesale-order-form' ),\r\n 'type' => 'checkbox',\r\n 'desc' => __( 'Display cart subtotal at the bottom of the order form' , 'woocommerce-wholesale-order-form' ),\r\n 'id' => 'wwof_general_display_cart_subtotal'\r\n ),\r\n\r\n array(\r\n 'title' => __( 'Cart Sub Total Prices Display' , 'woocommerce-wholesale-order-form' ),\r\n 'type' => 'select',\r\n 'desc' => __( 'Either to include or exclude price on sub total. Only used if \"Display Cart Sub Total\" option above is enabled.' , 'woocommerce-wholesale-order-form' ),\r\n 'desc_tip' => true,\r\n 'id' => 'wwof_general_cart_subtotal_prices_display',\r\n 'class' => 'chosen_select',\r\n 'options' => array (\r\n 'incl' => __( 'Including tax' , 'woocommerce-wholesale-order-form' ),\r\n 'excl' => __( 'Excluding tax' , 'woocommerce-wholesale-order-form' )\r\n ),\r\n 'default' => 'incl'\r\n ),\r\n\r\n array(\r\n 'title' => __( 'List product variation individually' , 'woocommerce-wholesale-order-form' ),\r\n 'type' => 'checkbox',\r\n 'desc' => __( 'Enabling this setting will list down each product variation individually and have its own row in the wholesale order form.' , 'woocommerce-wholesale-order-form' ),\r\n 'id' => 'wwof_general_list_product_variation_individually',\r\n ),\r\n\r\n array(\r\n 'title' => __( 'Show Wholesale Order Requirements Message in Order Form' , 'woocommerce-wholesale-order-form' ),\r\n 'type' => 'select',\r\n 'desc' => __( 'Only works if there are Order Requirements set in WooCommerce Wholesale Prices Premium plugin settings.' , 'woocommerce-wholesale-order-form' ),\r\n 'desc_tip' => true,\r\n 'id' => 'wwof_display_wholesale_price_requirement',\r\n 'class' => 'chosen_select',\r\n 'options' => array (\r\n 'yes' => __( 'Yes' , 'woocommerce-wholesale-order-form' ),\r\n 'no' => __( 'No' , 'woocommerce-wholesale-order-form' )\r\n ),\r\n 'default' => 'yes'\r\n ),\r\n \r\n array(\r\n 'type' => 'sectionend',\r\n 'id' => 'wwof_general_sectionend'\r\n )\r\n\r\n );\r\n\r\n }", "public function section_cb()\n {\n echo '<p class=\"description\">';\n _e('These options were added by Simple Login Lockdown and control ' .\n 'access to your login form.', 'simple-login-lockdown');\n echo '</p>';\n }", "public function add_option() {\n\t\tadd_option(\n\t\t\t$this->header_text_option, // The header text option\n\t\t\t$this->default_header_text // The default header text\n\t\t);\n\t}", "public function configureOptions();", "function add_settings_fields_options_discussion() {\n\tsae_add_settings_section( 'article', __( 'Default article settings' ), 'settings_section_article_before', 'discussion' );\n\n\tsae_add_settings_field( 'default_pingback_flag', '', 'checkbox', 'discussion', 'article', array(\n\t\t'skip_title' => true,\n\t\t'label' => __( 'Attempt to notify any blogs linked to from the article' ),\n\t) );\n\n\tsae_add_settings_field( 'default_ping_status', '', 'checkbox', 'discussion', 'article', array(\n\t\t'skip_title' => true,\n\t\t'label' => __( 'Allow link notifications from other blogs (pingbacks and trackbacks) on new articles' ),\n\t) );\n\n\tsae_add_settings_field( 'default_comment_status', '', 'checkbox', 'discussion', 'article', array(\n\t\t'skip_title' => true,\n\t\t'label' => __( 'Allow people to post comments on new articles' ),\n\t) );\n\n\tsae_add_settings_section( 'comment', __( 'Other comment settings' ), null, 'discussion' );\n\n\tsae_add_settings_field( 'require_name_email', '', 'checkbox', 'discussion', 'comment', array(\n\t\t'skip_title' => true,\n\t\t'label' => __( 'Comment author must fill out name and email' ),\n\t) );\n\n\tif ( ! get_option( 'users_can_register' ) && is_multisite() ) {\n\t\tsae_add_settings_field( 'comment_registration', '', 'checkbox', 'discussion', 'comment', array(\n\t\t\t'skip_title' => true,\n\t\t\t'label' => __( 'Users must be registered and logged in to comment' ),\n\t\t\t'description' => __( 'Signup has been disabled. Only members of this site can comment.' ),\n\t\t) );\n\t} else {\n\t\tsae_add_settings_field( 'comment_registration', '', 'checkbox', 'discussion', 'comment', array(\n\t\t\t'skip_title' => true,\n\t\t\t'label' => __( 'Users must be registered and logged in to comment' ),\n\t\t) );\n\t}\n\n\tsae_add_settings_field( 'close_comments_for_old_posts', '', 'checkbox', 'discussion', 'comment', array(\n\t\t'skip_title' => true,\n\t\t'label' => __( 'Automatically close comments on old articles: enter the number of days in the field below' ),\n\t) );\n\n\tsae_add_settings_field( 'close_comments_days_old', __( 'Number of days after which comments will be automatically closed' ), 'number', 'discussion', 'comment', array(\n\t\t'input_class' => 'small-text',\n\t\t'min' => '0',\n\t\t'step' => '1',\n\t) );\n\n\tsae_add_settings_field( 'thread_comments', '', 'checkbox', 'discussion', 'comment', array(\n\t\t'skip_title' => true,\n\t\t'label' => __( 'Enable threaded (nested) comments: set the number of levels in the field below' ),\n\t) );\n\n\t/**\n\t * Filters the maximum depth of threaded/nested comments.\n\t *\n\t * @since 2.7.0.\n\t *\n\t * @param int $max_depth The maximum depth of threaded comments. Default 10.\n\t */\n\t$maxdeep = (int) apply_filters( 'thread_comments_depth_max', 10 );\n\n\tfor ( $depth_index = 2; $depth_index <= $maxdeep; $depth_index++ ) {\n\t\t$thread_comments_depth_choices[ $depth_index ] = $depth_index;\n\t}\n\n\tsae_add_settings_field( 'thread_comments_depth', __( 'Nested comments levels deep' ), 'select', 'discussion', 'comment', array(\n\t\t'choices' => $thread_comments_depth_choices,\n\t) );\n\n\tsae_add_settings_field( 'page_comments', '', 'checkbox', 'discussion', 'comment', array(\n\t\t'skip_title' => true,\n\t\t'label' => __( 'Break comments into pages' ),\n\t) );\n\n\tsae_add_settings_field( 'comments_per_page', __( 'Number of top level comments per page' ), 'number', 'discussion', 'comment', array(\n\t\t'input_class' => 'small-text',\n\t\t'min' => '0',\n\t\t'step' => '1',\n\t) );\n\n\tsae_add_settings_field( 'default_comments_page', __( 'Comments page displayed by default' ), 'select', 'discussion', 'comment', array(\n\t\t'choices' => array(\n\t\t\t'newest' => __( 'last page' ),\n\t\t\t'oldest' => __( 'first page' ),\n\t\t)\n\t) );\n\n\tsae_add_settings_field( 'comment_order', __( 'Comments to display at the top of each page' ), 'select', 'discussion', 'comment', array(\n\t\t'choices' => array(\n\t\t\t'asc' => __( 'older comments' ),\n\t\t\t'desc' => __( 'newer comments' ),\n\t\t)\n\t) );\n\n\tsae_add_settings_section( 'notifications', __( 'Notifications' ), null, 'discussion' );\n\n\tsae_add_settings_field( 'comments_notify', '', 'checkbox', 'discussion', 'notifications', array(\n\t\t'skip_title' => true,\n\t\t'label' => __( 'Email me when anyone posts a comment' ),\n\t) );\n\n\tsae_add_settings_field( 'moderation_notify', '', 'checkbox', 'discussion', 'notifications', array(\n\t\t'skip_title' => true,\n\t\t'label' => __( 'Email me when a comment is held for moderation' ),\n\t) );\n\n\tsae_add_settings_section( 'moderation', __( 'Comment moderation' ), null, 'discussion' );\n\n\tsae_add_settings_field( 'comment_moderation', '', 'checkbox', 'discussion', 'moderation', array(\n\t\t'skip_title' => true,\n\t\t'label' => __( 'Before a comment appears, it must be manually approved' ),\n\t) );\n\n\tsae_add_settings_field( 'comment_whitelist', '', 'checkbox', 'discussion', 'moderation', array(\n\t\t'skip_title' => true,\n\t\t'label' => __( 'Before a comment appears, the comment author must have a previously approved comment' ),\n\t) );\n\n\tsae_add_settings_field( 'comment_max_links', __( 'Number of links in a comment after which it will be held in the moderation queue' ), 'number', 'discussion', 'moderation', array(\n\t\t'input_class' => 'small-text',\n\t\t'min' => '0',\n\t\t'step' => '1',\n\t\t'description' => __( 'A common characteristic of comment spam is a large number of links.' ),\n\t) );\n\n\tsae_add_settings_field( 'moderation_keys', __( 'Moderation words' ), 'textarea', 'discussion', 'moderation', array(\n\t\t'rows' => '10',\n\t\t'cols' => '50',\n\t\t'input_class' => 'large-text code',\n\t\t'description' => sprintf(\n\t\t\t__( 'When a comment contains any of these words in its content, name, URL, email, or IP, it will be held in the %1$smoderation queue%2$s. One word or IP per line. It will match inside words, so &#8220;press&#8221; will match &#8220;WordPress&#8221;.' ),\n\t\t\t'<a href=\"edit-comments.php?comment_status=moderated\">',\n\t\t\t'</a>'\n\t\t),\n\t) );\n\n\tsae_add_settings_field( 'blacklist_keys', __( 'Comment blacklist' ), 'textarea', 'discussion', 'moderation', array(\n\t\t'rows' => '10',\n\t\t'cols' => '50',\n\t\t'input_class' => 'large-text code',\n\t\t'description' => __( 'When a comment contains any of these words in its content, name, URL, email, or IP, it will be put in the trash. One word or IP per line. It will match inside words, so &#8220;press&#8221; will match &#8220;WordPress&#8221;.' )\n\t) );\n}", "public function section_format_options($foreditform = false) {\n static $sectionformatoptions = false;\n if ($sectionformatoptions === false) {\n $sectionformatoptions = array(\n 'sectiontype' => array(\n 'default' => 'default',\n 'type' => PARAM_ALPHA,\n 'cache' => true,\n ),\n );\n }\n if ($foreditform && !isset($sectionformatoptions['sectiontype']['label'])) {\n $sectionformatoptionsedit = array(\n 'sectiontype' => array(\n 'label' => new lang_string('sectiontype', 'format_usqflexopen'),\n 'help' => 'sectiontype',\n 'help_component' => 'format_usqflexopen',\n 'element_type' => 'select',\n 'element_attributes' => array(\n array(\n 'default' => new lang_string('sectiontypedefault', 'format_usqflexopen'),\n 'week' => new lang_string('sectiontypeweek', 'format_usqflexopen'),\n 'topic' => new lang_string('sectiontypetopic', 'format_usqflexopen'),\n 'assess' => new lang_string('sectiontypeassess', 'format_usqflexopen'),\n 'getstarted' => new lang_string('sectiontypegetstarted', 'format_usqflexopen'),\n )\n ),\n ),\n );\n $sectionformatoptions = array_merge_recursive($sectionformatoptions, $sectionformatoptionsedit);\n }\n return $sectionformatoptions;\n }", "function getSectionsIdOption() {\r\n\t\t$database =& JFactory::getDBO();\r\n\r\n\t\t$sectoptions = array();\r\n\r\n\t\treturn $sectoptions;\r\n }", "public function print_settings_section_info()\n {\n }", "function bbps_add_options() {\n\n\t// Default options\n\t$options = array (\n\t//user counts and titles\n\t\t// The default display for topic status we used not resolved as default\n\t\t'_bbps_default_status' => '1',\n\t\t//enable user post count display\n\t\t'_bbps_enable_post_count' => '1',\n\t\t//enable user rank\n\t\t'_bbps_enable_user_rank' => '1',\n\t\t//defaults for who can change the topic status\n\t\t'_bbps_status_permissions' => '',\n\t\t// the reply counts / boundaries for the custom forum poster titles this has no default as the user must set these\n\t\t'_bbps_reply_count' => '',\n\t\t//the status people want to show on their topics.\n\t\t'_bbps_used_status' => '',\n\t\t//give admin and forum moderators the ability to move topics into other forums default = enabled\n\t\t'_bbps_enable_topic_move' => '1',\n\t\t//urgent topics\n\t\t'_bbps_status_permissions_urgent' => '',\n\t\t//do a color change for resolved topics\n\t\t//'_bbps_status_color_change' => '1',\n\t);\n\t// Add default options\n\tforeach ( $options as $key => $value )\n\t\tadd_option( $key, $value );\n\n}", "public function options()\n {\n $options = apply_filters(\n $this->id . '_option_fields',\n [\n 'id' => $this->id, // upstream_milestones\n 'title' => $this->title,\n 'menu_title' => $this->menu_title,\n 'desc' => $this->description,\n 'show_on' => ['key' => 'options-page', 'value' => [$this->id],],\n 'show_names' => true,\n 'fields' => [\n [\n 'name' => upstream_milestone_label_plural(),\n 'id' => 'milestone_title',\n 'type' => 'title',\n ],\n [\n 'name' => 'Milestone Categories',\n 'id' => 'enable_milestone_categories',\n 'type' => 'radio',\n 'description' => '',\n 'options' => [\n '1' => __('Enabled', 'upstream'),\n '0' => __('Disabled', 'upstream'),\n ],\n 'default' => '0',\n ],\n ],\n ]\n );\n\n return $options;\n }", "public function get_options()\n {\n }", "function optionsframework_options() {\n\n\t$options = array();\n\n\t$options[] = array(\n\t\t'name' => __( 'Basic Settings', 'twentyseventyseven-child-2' ),\n\t\t'type' => 'heading'\n\t);\n\n\t$options[] = array(\n\t\t'name' => __( 'Upload Logo', 'twentyseventyseven-child-2' ),\n\t\t'desc' => __( 'This creates a full size uploader that previews the image.', 'twentyseventyseven-child-2' ),\n\t\t'id' => 'upload-logo',\n\t\t'type' => 'upload'\n\t);\n\n\t$options[] = array(\n\t\t'name' => __( 'Limit Post to show on Front Page', 'twentyseventyseven-child-2' ),\n\t\t'desc' => __( 'Limit Post', 'twentyseventyseven-child-2' ),\n\t\t'id' => 'limit-post-frontpage',\n\t\t'std' => '1',\n\t\t'type' => 'checkbox'\n\t);\n\n\t$options[] = array(\n\t\t'name' => __( 'Posts to limit', 'twentyseventyseven-child-2' ),\n\t\t'desc' => __( 'Posts.', 'twentyseventyseven-child-2' ),\n\t\t'id' => 'limit-post-frontpage-value',\n\t\t'std' => '0',\n\t\t'class' => 'mini',\n\t\t'type' => 'text'\n\t);\n\n\t$options[] = array(\n\t\t'name' => __( 'Show Sidebar on Front Page', 'twentyseventyseven-child-2' ),\n\t\t'desc' => __( 'Show Sidebar', 'twentyseventyseven-child-2' ),\n\t\t'id' => 'show-sidebar-frontpage',\n\t\t'std' => '1',\n\t\t'type' => 'checkbox'\n\t);\n\n\treturn $options;\n}", "abstract function options();", "function cmh_add_options_page() {\r\n\tadd_options_page('Correct My Headings Options Page', 'Correct My Headings', 'manage_options', __FILE__, 'cmh_render_form');\r\n}", "public function section_header() {\r\n\t\techo '<p>Other menu options will only show when there is a connection to the API.</p>';\r\n\t}", "public function custom_settings_section_info() {\n global $WCPc;\n _e('Enter your custom settings below', $WCPc->text_domain);\n }", "public function show_shortcodes_section_footer_extra() {\n\t\t\t?>\n\t\t\t<script>\n\t\t\t\tjQuery( function() {\n\t\t\t\t\tif ( jQuery( 'form#learndash_shortcodes_form_ld_certificate select#ld_certificate_display_type' ).length) {\n\t\t\t\t\t\tjQuery( 'form#learndash_shortcodes_form_ld_certificate select#ld_certificate_display_type').on( 'change', function() {\n\t\t\t\t\t\t\tvar selected = jQuery(this).val();\n\n\t\t\t\t\t\t\tif ( selected == 'sfwd-courses' ) {\n\t\t\t\t\t\t\t\tjQuery( 'form#learndash_shortcodes_form_ld_certificate #ld_certificate_group_id_field').hide();\n\t\t\t\t\t\t\t\tjQuery( 'form#learndash_shortcodes_form_ld_certificate input#ld_certificate_group_id').val('');\n\t\t\t\t\t\t\t\tif ( jQuery( 'form#learndash_shortcodes_form_ld_certificate #ld_certificate_group_id_field').hasClass('learndash-settings-input-required') ) {\n\t\t\t\t\t\t\t\t\tjQuery( 'form#learndash_shortcodes_form_ld_certificate input#ld_certificate_group_id').attr('required', false);\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\tjQuery( 'form#learndash_shortcodes_form_ld_certificate #ld_certificate_quiz_id_field').hide();\n\t\t\t\t\t\t\t\tjQuery( 'form#learndash_shortcodes_form_ld_certificate input#ld_certificate_quiz_id').val('');\n\t\t\t\t\t\t\t\tif ( jQuery( 'form#learndash_shortcodes_form_ld_certificate #ld_certificate_quiz_id_field').hasClass('learndash-settings-input-required') ) {\n\t\t\t\t\t\t\t\t\tjQuery( 'form#learndash_shortcodes_form_ld_certificate input#ld_certificate_quiz_id').attr('required', false);\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\tjQuery( 'form#learndash_shortcodes_form_ld_certificate #ld_certificate_course_id_field span.learndash_required_field').show();\n\t\t\t\t\t\t\t\tjQuery( 'form#learndash_shortcodes_form_ld_certificate #ld_certificate_course_id_field').slideDown();\n\t\t\t\t\t\t\t\tif ( jQuery( 'form#learndash_shortcodes_form_ld_certificate #ld_certificate_course_id_field').hasClass('learndash-settings-input-required') ) {\n\t\t\t\t\t\t\t\t\tjQuery( 'form#learndash_shortcodes_form_ld_certificate input#ld_certificate_course_id').attr('required', 'required');\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t} else if ( selected == 'groups' ) {\n\t\t\t\t\t\t\t\tjQuery( 'form#learndash_shortcodes_form_ld_certificate #ld_certificate_course_id_field').hide();\n\t\t\t\t\t\t\t\tjQuery( 'form#learndash_shortcodes_form_ld_certificate input#ld_certificate_course_id').val('');\n\t\t\t\t\t\t\t\tif ( jQuery( 'form#learndash_shortcodes_form_ld_certificate #ld_certificate_course_id_field').hasClass('learndash-settings-input-required') ) {\n\t\t\t\t\t\t\t\t\tjQuery( 'form#learndash_shortcodes_form_ld_certificate input#ld_certificate_course_id').attr('required', false);\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\tjQuery( 'form#learndash_shortcodes_form_ld_certificate #ld_certificate_quiz_id_field').hide();\n\t\t\t\t\t\t\t\tjQuery( 'form#learndash_shortcodes_form_ld_certificate input#ld_certificate_quiz_id').val('');\n\t\t\t\t\t\t\t\tif ( jQuery( 'form#learndash_shortcodes_form_ld_certificate #ld_certificate_quiz_id_field').hasClass('learndash-settings-input-required') ) {\n\t\t\t\t\t\t\t\t\tjQuery( 'form#learndash_shortcodes_form_ld_certificate input#ld_certificate_quiz_id').attr('required', false);\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\tjQuery( 'form#learndash_shortcodes_form_ld_certificate #ld_certificate_group_id_field').slideDown();\n\t\t\t\t\t\t\t\tif ( jQuery( 'form#learndash_shortcodes_form_ld_certificate #ld_certificate_group_id_field').hasClass('learndash-settings-input-required') ) {\n\t\t\t\t\t\t\t\t\tjQuery( 'form#learndash_shortcodes_form_ld_certificate input#ld_certificate_group_id').attr('required', 'required');\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t} else if ( selected == 'sfwd-quiz' ) {\n\t\t\t\t\t\t\t\tjQuery( 'form#learndash_shortcodes_form_ld_certificate #ld_certificate_group_id_field').hide();\n\t\t\t\t\t\t\t\tjQuery( 'form#learndash_shortcodes_form_ld_certificate input#ld_certificate_group_id').val('');\n\t\t\t\t\t\t\t\tif ( jQuery( 'form#learndash_shortcodes_form_ld_certificate #ld_certificate_group_id_field').hasClass('learndash-settings-input-required') ) {\n\t\t\t\t\t\t\t\t\tjQuery( 'form#learndash_shortcodes_form_ld_certificate input#ld_certificate_group_id').attr('required', false);\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\tjQuery( 'form#learndash_shortcodes_form_ld_certificate #ld_certificate_course_id_field').slideDown();\n\t\t\t\t\t\t\t\t// When the quiz cert is selected we explicitly set the course_id as not required.\n\t\t\t\t\t\t\t\tjQuery( 'form#learndash_shortcodes_form_ld_certificate input#ld_certificate_course_id').attr('required', false);\n\n\t\t\t\t\t\t\t\tjQuery( 'form#learndash_shortcodes_form_ld_certificate #ld_certificate_course_id_field span.learndash_required_field').hide();\n\n\t\t\t\t\t\t\t\tjQuery( 'form#learndash_shortcodes_form_ld_certificate #ld_certificate_quiz_id_field').slideDown();\n\t\t\t\t\t\t\t\tif ( jQuery( 'form#learndash_shortcodes_form_ld_certificate #ld_certificate_quiz_id_field').hasClass('learndash-settings-input-required') ) {\n\t\t\t\t\t\t\t\t\tjQuery( 'form#learndash_shortcodes_form_ld_certificate input#ld_certificate_quiz_id').attr('required', 'required');\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\tjQuery( 'form#learndash_shortcodes_form_ld_certificate #ld_certificate_course_id_field').hide();\n\t\t\t\t\t\t\t\tjQuery( 'form#learndash_shortcodes_form_ld_certificate input#ld_certificate_course_id').val('');\n\t\t\t\t\t\t\t\tif ( jQuery( 'form#learndash_shortcodes_form_ld_certificate #ld_certificate_course_id_field').hasClass('learndash-settings-input-required') ) {\n\t\t\t\t\t\t\t\t\tjQuery( 'form#learndash_shortcodes_form_ld_certificate input#ld_certificate_course_id').attr('required', false);\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\tjQuery( 'form#learndash_shortcodes_form_ld_certificate #ld_certificate_group_id_field').hide();\n\t\t\t\t\t\t\t\tjQuery( 'form#learndash_shortcodes_form_ld_certificate input#ld_certificate_group_id').val('');\n\t\t\t\t\t\t\t\tif ( jQuery( 'form#learndash_shortcodes_form_ld_certificate #ld_certificate_group_id_field').hasClass('learndash-settings-input-required') ) {\n\t\t\t\t\t\t\t\t\tjQuery( 'form#learndash_shortcodes_form_ld_certificate input#ld_certificate_group_id').attr('required', false);\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\tjQuery( 'form#learndash_shortcodes_form_ld_certificate #ld_certificate_quiz_id_field').hide();\n\t\t\t\t\t\t\t\tjQuery( 'form#learndash_shortcodes_form_ld_certificate input#ld_certificate_quiz_id').val('');\n\t\t\t\t\t\t\t\tif ( jQuery( 'form#learndash_shortcodes_form_ld_certificate #ld_certificate_quiz_id_field').hasClass('learndash-settings-input-required') ) {\n\t\t\t\t\t\t\t\t\tjQuery( 'form#learndash_shortcodes_form_ld_certificate input#ld_certificate_quiz_id').attr('required', false);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t});\n\t\t\t\t\t\tjQuery( 'form#learndash_shortcodes_form_ld_certificate select#ld_certificate_display_type').change();\n\t\t\t\t\t}\n\n\t\t\t\t\tif ( jQuery( 'form#learndash_shortcodes_form_ld_certificate select#ld_certificate_display_as' ).length) {\n\t\t\t\t\t\tjQuery( 'form#learndash_shortcodes_form_ld_certificate select#ld_certificate_display_as').on( 'change', function() {\n\t\t\t\t\t\t\tvar selected = jQuery(this).val();\n\n\t\t\t\t\t\t\tif ( selected == 'banner' ) {\n\t\t\t\t\t\t\t\tjQuery( 'form#learndash_shortcodes_form_ld_certificate #ld_certificate_label_field').hide();\n\t\t\t\t\t\t\t\tjQuery( 'form#learndash_shortcodes_form_ld_certificate #ld_certificate_class_field').hide();\n\t\t\t\t\t\t\t\tjQuery( 'form#learndash_shortcodes_form_ld_certificate #ld_certificate_context_field').hide();\n\t\t\t\t\t\t\t\tjQuery( 'form#learndash_shortcodes_form_ld_certificate #ld_certificate_callback_field').hide();\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tjQuery( 'form#learndash_shortcodes_form_ld_certificate #ld_certificate_label_field').slideDown();\n\t\t\t\t\t\t\t\tjQuery( 'form#learndash_shortcodes_form_ld_certificate #ld_certificate_class_field').slideDown();\n\t\t\t\t\t\t\t\tjQuery( 'form#learndash_shortcodes_form_ld_certificate #ld_certificate_context_field').slideDown();\n\t\t\t\t\t\t\t\tjQuery( 'form#learndash_shortcodes_form_ld_certificate #ld_certificate_callback_field').slideDown();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t});\n\t\t\t\t\t\tjQuery( 'form#learndash_shortcodes_form_ld_certificate select#ld_certificate_display_as').change();\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t</script>\n\t\t\t<?php\n\t\t}", "function init_integrated_options() {\n\t\t$this->permalink_sections();\n\n\t}", "protected function _initConfig()\n {\n parent::_initConfig();\n $this->_mergeConfig(array(\n 'get_descriptions' => false, // true to get descriptions for text sections\n ));\n }", "protected function getOptions()\n\t{\n\t\treturn [\n\t\t\t\n\t\t];\n\t}", "function optionsframework_options() {\n\n\t$options = array();\n\t\n\t//GENERAL\t\n\t$options[] = array(\n\t\t\"name\" \t=> __('General', 'wpex'),\n\t\t\"type\" \t=> 'heading',\n\t);\n\t\t\n\t$options[] = array(\n\t\t\"name\" \t=> __('Custom Logo', 'wpex'),\n\t\t\"desc\" \t=> __('Upload your custom logo.', 'wpex'),\n\t\t\"std\" \t=> '',\n\t\t\"id\" \t=> 'custom_logo',\n\t\t\"type\" \t=> 'upload',\n\t);\n\t\n\t$options[] = array(\n\t\t\"name\" \t=> __('Notification Bar', 'att'),\n\t\t\"desc\" \t=> __('Enter your text for the notification bar.', 'att'),\n\t\t\"std\" \t=> 'This is your notification bar...you can <a href=\"#\">add a link here &rarr;</a> if you want.',\n\t\t\"id\" \t=> 'notification',\n\t\t\"type\" \t=> 'textarea',\n\t);\n\t\n\t$options[] = array(\n\t\t\"name\" \t=> __('Custom Excerpt Lenght', 'wpex'),\n\t\t\"desc\" \t=> __('Enter your desired custom excerpt length.', 'wpex'),\n\t\t\"id\" \t=> 'excerpt_length',\n\t\t\"std\" \t=> '17',\n\t\t\"type\" \t=> 'text'\n\t);\n\t\t\n\t$options[] = array(\n\t\t\"name\" \t=> __('AJAX Loading Instead of Pagination?', 'wpex'),\n\t\t\"desc\" \t=> __('Check box to enable the load more button rather then generic 1,2,3 pagination.', 'wpex'),\n\t\t\"id\" \t=> 'ajax_loading',\n\t\t\"std\" \t=> '1',\n\t\t\"type\" \t=> 'checkbox',\n\t);\n\t\t\n\t$options[] = array(\n\t\t\"name\" \t=> __('Custom WP Gallery?', 'wpex'),\n\t\t\"desc\" \t=> __('This theme outputs a custom gallery style for the WordPress shortcode, if you don\\'t like it or are using a plugin for this you can unselect the custom functionality here.', 'wpex'),\n\t\t\"id\" \t=> 'custom_wp_gallery',\n\t\t\"std\" \t=> '1',\n\t\t\"type\" \t=> 'checkbox'\n\t);\n\t\t\n\t$options[] = array(\n\t\t\"name\" \t=> __('Enable Retina Support', 'wpex'),\n\t\t\"desc\"\t=> __('Check this box to enable retina support for featured images. If enabled for every cropped featured image the theme will create a second one that is retina optimized. So keep disabled to save server space.', 'wpex'),\n\t\t\"id\"\t=> 'enable_retina',\n\t\t\"std\"\t=> '0',\n\t\t\"type\"\t=> 'checkbox'\n\t);\n\t\n\t$options[] = array(\n\t\t\"name\" \t=> __('Featured Images For Single Posts', 'wpex'),\n\t\t\"desc\"\t=> __('Check this box to enable the display of featured images in single posts.', 'wpex'),\n\t\t\"id\"\t=> 'single_thumb',\n\t\t\"std\"\t=> '1',\n\t\t\"type\"\t=> 'checkbox'\n\t);\n\t\t\n\t\n\t//HOMEPAGE\t\n\t$options[] = array(\n\t\t\"name\" \t=> __('Home', 'wpex'),\n\t\t\"type\" \t=> 'heading',\n\t);\t\n\t\t\n\t$options[] = array(\n\t\t\"name\" \t=> __('Homepage Content', 'att'),\n\t\t\"desc\" \t=> __('Use this field to add content to your homepage area right below the main slider (or instead of the slider if you aren\\'t using it) and right above the latest posts.', 'att'),\n\t\t\"std\" \t=> '',\n\t\t\"id\" \t=> 'homepage_content',\n\t\t\"type\" \t=> 'editor',\n\t);\n\t\t\t\n\t\t\n\t//Slider\n\t$options[] = array(\n\t\t\"name\" \t=> __('Slides', 'att'),\n\t\t\"type\" \t=> 'heading',\n\t);\n\t\t\t\n\t\tif ( class_exists( 'Symple_Slides_Post_Type' ) ) {\n\t\t\t\t\n\t\t\t$options[] = array(\n\t\t\t\t\"name\" \t\t=> __('Toggle: Slideshow', 'att'),\n\t\t\t\t\"desc\" \t\t=> __('Check this box to enable automatic slideshow for your slides.', 'att'),\n\t\t\t\t\"id\" \t\t=> \"slides_slideshow\",\n\t\t\t\t\"std\" \t\t=> \"true\",\n\t\t\t\t\"type\" \t\t=> \"select\",\n\t\t\t\t\"options\" \t=> array(\n\t\t\t\t\t'true' \t\t=> 'true',\n\t\t\t\t\t'false' \t=> 'false'\n\t\t\t) );\n\t\t\t\t\n\t\t\t$options[] = array(\n\t\t\t\t\"name\" \t\t=> __('Toggle: Randomize', 'att'),\n\t\t\t\t\"desc\" \t\t=> __('Check this box to enable the randomize feature for your slides.', 'att'),\n\t\t\t\t\"id\" \t\t=> \"slides_randomize\",\n\t\t\t\t\"std\" \t\t=> \"false\",\n\t\t\t\t\"type\" \t\t=> \"select\",\n\t\t\t\t\"options\" \t=> array(\n\t\t\t\t\t'true' \t\t=> 'true',\n\t\t\t\t\t'false' \t=> 'false'\n\t\t\t) );\n\t\t\t\t\n\t\t\t$options[] = array(\n\t\t\t\t\"name\" \t\t=> __('Animation', 'att'),\n\t\t\t\t\"desc\" \t\t=> __('Select your animation of choice.', 'att'),\n\t\t\t\t\"id\" \t\t=> \"slides_animation\",\n\t\t\t\t\"std\" \t\t=> \"slide\",\n\t\t\t\t\"type\" \t\t=> \"select\",\n\t\t\t\t\"options\" \t=> array(\n\t\t\t\t\t'fade' \t\t=> 'fade',\n\t\t\t\t\t'slide' \t=> 'slide'\n\t\t\t) );\n\t\t\t\t\n\t\t\t$options[] = array(\n\t\t\t\t\"name\" \t\t=> __('Direction', 'att'),\n\t\t\t\t\"desc\" \t\t=> __('Select the direction for your slides. Slide animation only & if using the <strong>vertical direction</strong> all slides must have the same height.', 'att'),\n\t\t\t\t\"id\" \t\t=> \"slides_direction\",\n\t\t\t\t\"std\" \t\t=> \"horizontal\",\n\t\t\t\t\"type\" \t\t=> \"select\",\n\t\t\t\t\"options\" \t=> array(\n\t\t\t\t\t'horizontal' \t=> 'horizontal',\n\t\t\t\t\t'vertical' \t\t=> 'vertical'\n\t\t\t) );\n\t\t\t\t\n\t\t\t$options[] = array(\n\t\t\t\t\"name\" \t=> __('SlideShow Speed', 'att'),\n\t\t\t\t\"desc\" \t=> __('Enter your preferred slideshow speed in milliseconds.', 'att'),\n\t\t\t\t\"id\" \t=> \"slideshow_speed\",\n\t\t\t\t\"std\" \t=> \"7000\",\n\t\t\t\t\"type\" \t=> \"text\",\n\t\t\t);\n\t\t\t\t\n\t\t\t$options[] = array(\n\t\t\t\t\"name\" \t=> __('Animation Speed', 'att'),\n\t\t\t\t\"desc\" \t=> __('Enter your preferred animation speed in milliseconds.', 'att'),\n\t\t\t\t\"id\" \t=> \"animation_speed\",\n\t\t\t\t\"std\" \t=> \"600\",\n\t\t\t\t\"type\" \t=> \"text\",\n\t\t\t);\n\t\t}\n\t\t\t\n\t\t$options[] = array(\n\t\t\t\"name\" \t=> __('Slider Alternative', 'att'),\n\t\t\t\"desc\" \t=> __('If you prefer to use another slider you can enter the <strong>shortcode</strong> here.', 'att'),\n\t\t\t\"id\" \t=> \"slides_alt\",\n\t\t\t\"std\" \t=> \"\",\n\t\t\t\"type\" \t=> \"textarea\",\n\t\t);\n\n\treturn $options;\n}", "function dblions_general_options() {\n\techo 'Edit general features';\n}", "public function parse_options(){\n\t\t\n\t\t//switch (explode(',',$this->options)){case title: $return[]='title: {usw}';break;} $this->parsed_options=implode(',',return);\n\t\t\n\t\t$this->parsed_options=\"chart: {\trenderTo: 'container',\tdefaultSeriesType: 'area',\t\tinverted: true},\n\t\t\t\t\ttitle: {\ttext: 'ein Beispiel'},\n\t\t\t\t\tsubtitle: {\tstyle: {position: 'absolute',right: '0px',\tbottom: '10px'\t}},\n\t\t\t\t\tlegend: {\tlayout: 'vertical',\talign: 'right',\tverticalAlign: 'top',x: -150,y: 100,floating: true,\tborderWidth: 1,\tbackgroundColor: '#FFFFFF'},\n\t\t\t\t\txAxis: {categories: ['Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday', 'Sunday']},\n\t\t\t\t\tyAxis: {title: {text: 'x-Axentitel'},labels: {formatter: function() {return this.value;}},min: 0},\n\t\t\t\t\t\";\n\t\treturn true;\n\t}", "public function getMajorOptions() {\n\t\treturn array(\n\t\t\t\"Urban Planing\" => \"Urban Planing\",\n\t\t\t\"Urban Design\" => \"Urban Design\",\n \"Architecture\" => \"Architecture\",\n \"Landscape Architecture\" => \"Landscape Architecture\",\n );\n }", "public function print_section_info() {\n // print 'Enter your settings below:';\n }", "public function general_settings_inputs() {\n\t\t$option_object = $this->get_analytics_options();\n\n\t\t$campus = array(\n\t\t\t'pullman' => 'Pullman',\n\t\t\t'spokane' => 'Spokane',\n\t\t\t'vancouver' => 'Vancouver',\n\t\t\t'tri-cities' => 'Tri-Cities',\n\t\t\t'globalcampus' => 'Global Campus',\n\t\t\t'everett' => 'Everett',\n\t\t);\n\n\t\t$college = array(\n\t\t\t'arts-and-sciences' => 'Arts & Sciences',\n\t\t\t'cahnrs' => 'CAHNRS & Extension',\n\t\t\t'carson' => 'Carson',\n\t\t\t'education' => 'Education',\n\t\t\t'honors' => 'Honors',\n\t\t\t'medicine' => 'Medicine',\n\t\t\t'murrow' => 'Murrow',\n\t\t\t'nursing' => 'Nursing',\n\t\t\t'pharmacy' => 'Pharmacy',\n\t\t\t'vetmed' => 'VetMed',\n\t\t\t'voiland' => 'Voiland',\n\t\t);\n\n\t\t$unit_type = array(\n\t\t\t'center' => 'Center',\n\t\t\t'department' => 'Department',\n\t\t\t'laboratory' => 'Laboratory',\n\t\t\t'office' => 'Office',\n\t\t\t'program' => 'Program',\n\t\t\t'school' => 'School',\n\t\t\t'unit' => 'Unit',\n\t\t);\n\n\t\t// @todo complete units taxonomy.\n\t\t$units = array();\n\n\t\t?>\n\t\t<!-- campus -->\n\t\t<p><label class=\"wsu-analytics-label\" for=\"wsu-analytics-campus\">Campus:</label>\n\t\t<select id=\"wsu-analytics-campus\" name=\"wsuwp_analytics_option_map[campus]\">\n\t\t\t<option value=\"none\" <?php selected( 'none', $option_object['campus'] ); ?>>None</option>\n\t\t\t<option value=\"all\" <?php selected( 'all', $option_object['campus'] ); ?>>All</option>\n\t\t\t<?php foreach ( $campus as $key => $name ) : ?>\n\t\t\t\t<option value=\"<?php echo $key; ?>\" <?php selected( $key, $option_object['campus'] ); ?>><?php echo $name; ?></option>\n\t\t\t<?php endforeach; ?>\n\t\t</select></p>\n\t\t<p class=\"description\">Does this site represent a campus in location or association?</p><br/>\n\n\t\t<!-- college -->\n\t\t<p><label class=\"wsu-analytics-label\" for=\"wsu-analytics-college\">College:</label>\n\t\t<select id=\"wsu-analytics-college\" name=\"wsuwp_analytics_option_map[college]\">\n\t\t\t<option value=\"none\" <?php selected( 'none', $option_object['college'] ); ?>>None</option>\n\t\t\t<option value=\"all\" <?php selected( 'all', $option_object['college'] ); ?>>All</option>\n\t\t\t<?php foreach ( $college as $key => $name ) : ?>\n\t\t\t\t<option value=\"<?php echo $key; ?>\" <?php selected( $key, $option_object['college'] ); ?>><?php echo $name; ?></option>\n\t\t\t<?php endforeach; ?>\n\t\t</select></p>\n\t\t<p class=\"description\">Does this site represent a college as a whole or by association?</p><br/>\n\n\t\t<p><label class=\"wsu-analytics-label\" for=\"wsu-analytics-unit-type\">Unit Type:</label>\n\t\t<select id=\"wsu-analytics-unit-type\" name=\"wsuwp_analytics_option_map[unit_type]\">\n\t\t\t<option value=\"none\" <?php selected( 'none', $option_object['unit_type'] ); ?>>None</option>\n\t\t\t<?php foreach ( $unit_type as $k => $v ) : ?>\n\t\t\t\t<option value=\"<?php echo $k; ?>\" <?php selected( $k, $option_object['unit_type'] ); ?>><?php echo $v; ?></option>\n\t\t\t<?php endforeach; ?>\n\t\t</select></p>\n\t\t<p class=\"description\">What type of unit does this site represent?</p><br/>\n\n\t\t<!-- units -->\n\t\t<p><label class=\"wsu-analytics-label\" for=\"wsu-analytics-parent-unit\">Parent Unit:</label>\n\t\t<select id=\"wsu-analytics-parent-unit\" name=\"wsuwp_analytics_option_map[unit]\">\n\t\t\t<option value=\"none\" <?php selected( 'none', $option_object['unit'] ); ?>>None</option>\n\t\t\t<?php foreach ( $units as $key => $group ) : ?>\n\t\t\t\t<optgroup label=\"<?php echo $key; ?>\">\n\t\t\t\t<?php foreach ( $group as $item_key => $name ) : ?>\n\t\t\t\t\t<option value=\"<?php echo $item_key; ?>\" <?php selected( $item_key, $option_object['unit'] ); ?>><?php echo $name; ?></option>\n\t\t\t\t<?php endforeach; ?>\n\t\t\t\t</optgroup>\n\t\t\t<?php endforeach; ?>\n\t\t</select></p>\n\t\t<p class=\"description\">Does this site represent an entity that has a parent unit? (e.g department, office, school)</p><br/>\n\n\t\t<!-- units -->\n\t\t<p><label class=\"wsu-analytics-label\" for=\"wsu-analytics-unit\">Unit:</label>\n\t\t<select id=\"wsu-analytics-unit\" name=\"wsuwp_analytics_option_map[subunit]\">\n\t\t\t<option value=\"none\" <?php selected( 'none', $option_object['subunit'] ); ?>>None</option>\n\t\t\t<?php foreach ( $units as $key => $group ) : ?>\n\t\t\t\t<optgroup label=\"<?php echo $key; ?>\">\n\t\t\t\t<?php foreach ( $group as $item_key => $name ) : ?>\n\t\t\t\t\t<option value=\"<?php echo $item_key; ?>\" <?php selected( $item_key, $option_object['subunit'] ); ?>><?php echo $name; ?></option>\n\t\t\t\t<?php endforeach; ?>\n\t\t\t\t</optgroup>\n\t\t\t<?php endforeach; ?>\n\t\t</select></p>\n\t\t<p class=\"description\">Does this site represent an entity that is a unit? (e.g. department, office, school)</p><br/>\n\n\t\t<?php if ( ( function_exists( 'wsuwp_is_global_admin' ) && wsuwp_is_global_admin( wp_get_current_user()->ID ) ) || is_super_admin() ) : ?>\n\t\t<p><span class=\"wsu-analytics-label\">Track Global Analytics</span></p>\n\t\t<label>Yes <input type=\"radio\" class=\"regular-radio\" name=\"wsuwp_analytics_option_map[track_global]\" value=\"true\" <?php checked( 'true', $option_object['track_global'] ); ?> /></label>\n\t\t<label>No <input type=\"radio\" class=\"regular-radio\" name=\"wsuwp_analytics_option_map[track_global]\" value=\"false\" <?php checked( 'false', $option_object['track_global'] ); ?> /></label>\n\t\t<p class=\"description\">Should global WSU analytics be tracked on this site? This should normally be on and only disabled for debugging.</p><br/>\n\n\t\t<p><span class=\"wsu-analytics-label\">Track App Analytics</span></p>\n\t\t<label>Yes <input type=\"radio\" class=\"regular-radio\" name=\"wsuwp_analytics_option_map[track_app]\" value=\"true\" <?php checked( 'true', $option_object['track_app'] ); ?> /></label>\n\t\t<label>No <input type=\"radio\" class=\"regular-radio\" name=\"wsuwp_analytics_option_map[track_app]\" value=\"false\" <?php checked( 'false', $option_object['track_app'] ); ?> /></label>\n\t\t<p class=\"description\">Should WSUWP Platform analytics be tracked on this site? This should normally be on and only disabled for debugging.</p><br/>\n\n\t\t<p><span class=\"wsu-analytics-label\">Track Site Analytics</span></p>\n\t\t<label>Yes <input type=\"radio\" class=\"regular-radio\" name=\"wsuwp_analytics_option_map[track_site]\" value=\"true\" <?php checked( 'true', $option_object['track_site'] ); ?> /></label>\n\t\t<label>No <input type=\"radio\" class=\"regular-radio\" name=\"wsuwp_analytics_option_map[track_site]\" value=\"false\" <?php checked( 'false', $option_object['track_site'] ); ?> /></label>\n\t\t<p class=\"description\">Should analytics be tracked on this site? A Google Analytics ID is still required if this is enabled.</p><br/>\n\t\t<?php endif; ?>\n\n\t\t<hr/>\n\t\t<p class=\"description\">Instructions on how to set up your Google analytics to best use this plugin can be <a href=\"https://web.wsu.edu/wordpress/plugins/wsu-analytics/\">found here</a>.</p>\n\n\t\t<style>\n\t\t\t.wsu-analytics-label {\n\t\t\t\tdisplay: inline-block;\n\t\t\t\twidth: 185px;\n\t\t\t\tfont-weight: 700;\n\t\t\t}\n\t\t\t.form-table td p.description {\n\t\t\t\tfont-size: 13px;\n\t\t\t}\n\t\t</style>\n\t\t<?php\n\t}", "function inkpro_add_blog_display_options( $options ) {\r\n\r\n\t$new_options = array(\r\n\t\t'standard' => esc_html__( 'Standard', 'inkpro' ),\r\n\t\t'grid' => esc_html__( 'Square grid', 'inkpro' ),\r\n\t\t'grid3' => esc_html__( 'Portrait grid', 'inkpro' ),\r\n\t\t'column' => esc_html__( 'Columns', 'inkpro' ),\r\n\t\t'masonry' => esc_html__( 'Masonry', 'inkpro' ),\r\n\t\t'metro' => esc_html__( 'Metro', 'inkpro' ),\r\n\t\t'medium-image' => esc_html__( 'Medium image', 'inkpro' ),\r\n\t\t'photo' => esc_html__( 'Photo', 'inkpro' ),\r\n\t);\r\n\r\n\t$options = array_merge( $new_options, $options );\r\n\t\r\n\treturn $options;\r\n}", "function getOptionsSupported() {\n\t\treturn array(\tgettext('Attempt threshold') => array('key' => 'failed_access_blocker_attempt_threshold', 'type' => OPTION_TYPE_TEXTBOX,\n\t\t\t\t\t\t\t\t\t\t'desc' => gettext('Admin page requests will be ignored after this many failed tries.')),\n\t\t\t\t\t\t\t\t\tgettext('Minutes to cool off') =>array('key' => 'failed_access_blocker_timeout', 'type' => OPTION_TYPE_TEXTBOX,\n\t\t\t\t\t\t\t\t\t\t'desc' => gettext('The block will be removed after this waiting period.'))\n\t\t);\n\t}", "protected function defineOptions() {\r\n $options = parent::defineOptions();\r\n $options['view_type'] = array('default' => 'web');\r\n\t$options['image_style'] = array('default' => '');\r\n\t$options['link_to_entity'] = array('default' => '');\r\n\r\n return $options;\r\n }", "function faculty_settings_headline() { \n faculty_setting_line(faculty_add_select_setting('headline_font_family', __('Font', FACULTY_DOMAIN), 'family'));\n faculty_setting_line(faculty_add_select_setting('headline_font_style', __('Font Style', FACULTY_DOMAIN), 'style'));\n faculty_setting_line(faculty_add_select_setting('headline_font_weight', __('Font Weight', FACULTY_DOMAIN), 'weight'));\n faculty_setting_line(faculty_add_select_setting('headline_text_transform', __('Text Transform', FACULTY_DOMAIN), 'transform'));\n faculty_setting_line(array(faculty_add_size_setting('h1_font_size', __('H1 Font Size', FACULTY_DOMAIN)), faculty_add_color_setting('h1_font_color', __('Color', FACULTY_DOMAIN))));\n faculty_setting_line(array(faculty_add_size_setting('h2_font_size', __('H2 Font Size', FACULTY_DOMAIN)), faculty_add_color_setting('h2_font_color', __('Color', FACULTY_DOMAIN))));\n faculty_setting_line(array(faculty_add_size_setting('h3_font_size', __('H3 Font Size', FACULTY_DOMAIN)), faculty_add_color_setting('h3_font_color', __('Color', FACULTY_DOMAIN))));\n faculty_setting_line(array(faculty_add_size_setting('h4_font_size', __('H4 Font Size', FACULTY_DOMAIN)), faculty_add_color_setting('h4_font_color', __('Color', FACULTY_DOMAIN))));\n faculty_setting_line(array(faculty_add_size_setting('h5_font_size', __('H5 Font Size', FACULTY_DOMAIN)), faculty_add_color_setting('h5_font_color', __('Color', FACULTY_DOMAIN))));\n faculty_setting_line(array(faculty_add_size_setting('h6_font_size', __('H6 Font Size', FACULTY_DOMAIN)), faculty_add_color_setting('h6_font_color', __('Color', FACULTY_DOMAIN))));\n do_action('faculty_settings_headline');\n}", "function TS_VCSC_Set_Plugin_Options() {\r\n\t\t// Redirect Option\r\n\t\tadd_option('ts_vcsc_extend_settings_redirect', \t\t\t\t\t\t\t0);\r\n\t\tadd_option('ts_vcsc_extend_settings_activation', \t\t\t\t\t\t0);\r\n\t\t// Options for Theme Authors\r\n\t\tadd_option('ts_vcsc_extend_settings_posttypes', \t\t\t\t 1);\r\n\t\tadd_option('ts_vcsc_extend_settings_posttypeWidget',\t\t\t\t\t1);\r\n\t\tadd_option('ts_vcsc_extend_settings_posttypeTeam',\t\t\t\t\t\t1);\r\n\t\tadd_option('ts_vcsc_extend_settings_posttypeTestimonial',\t\t\t\t1);\r\n\t\tadd_option('ts_vcsc_extend_settings_posttypeLogo', \t\t\t\t\t\t1);\r\n\t\tadd_option('ts_vcsc_extend_settings_posttypeSkillset',\t\t\t\t\t1);\r\n\t\tadd_option('ts_vcsc_extend_settings_additions', \t\t\t\t 1);\r\n\t\tadd_option('ts_vcsc_extend_settings_codeeditors', \t\t\t\t 1);\r\n\t\tadd_option('ts_vcsc_extend_settings_fontimport', \t\t\t\t 1);\r\n\t\tadd_option('ts_vcsc_extend_settings_iconicum', \t\t\t\t \t1);\r\n\t\tadd_option('ts_vcsc_extend_settings_dashboard', \t\t\t\t\t\t1);\r\n\t\t// Options for Custom CSS/JS Editor\r\n\t\tadd_option('ts_vcsc_extend_settings_customCSS',\t\t\t\t\t\t\t'/* Welcome to the Custom CSS Editor! Please add all your Custom CSS here. */');\r\n\t\tadd_option('ts_vcsc_extend_settings_customJS', \t\t\t\t '/* Welcome to the Custom JS Editor! Please add all your Custom JS here. */');\r\n\t\t// Other Options\r\n\t\tadd_option('ts_vcsc_extend_settings_frontendEditor', \t\t\t\t\t1);\r\n\t\tadd_option('ts_vcsc_extend_settings_buffering', \t\t\t\t\t\t1);\r\n\t\tadd_option('ts_vcsc_extend_settings_mainmenu', \t\t\t\t\t\t\t1);\r\n\t\tadd_option('ts_vcsc_extend_settings_translationsDomain', \t\t\t\t1);\r\n\t\tadd_option('ts_vcsc_extend_settings_previewImages',\t\t\t\t\t\t1);\r\n\t\tadd_option('ts_vcsc_extend_settings_visualSelector',\t\t\t\t\t1);\r\n add_option('ts_vcsc_extend_settings_nativeSelector',\t\t\t\t\t1);\r\n add_option('ts_vcsc_extend_settings_nativePaginator',\t\t\t\t\t'200');\r\n\t\tadd_option('ts_vcsc_extend_settings_backendPreview',\t\t\t\t\t1);\r\n\t\tadd_option('ts_vcsc_extend_settings_extended', \t\t\t\t 0);\r\n\t\tadd_option('ts_vcsc_extend_settings_systemInfo',\t\t\t\t\t\t'');\r\n\t\tadd_option('ts_vcsc_extend_settings_socialDefaults', \t\t\t\t\t'');\r\n\t\tadd_option('ts_vcsc_extend_settings_builtinLightbox', \t\t\t\t\t1);\r\n\t\tadd_option('ts_vcsc_extend_settings_lightboxIntegration', \t\t\t\t0);\r\n\t\tadd_option('ts_vcsc_extend_settings_allowAutoUpdate', \t\t\t\t\t1);\r\n\t\tadd_option('ts_vcsc_extend_settings_allowNotification', \t\t\t\t1);\r\n\t\tadd_option('ts_vcsc_extend_settings_allowDeprecated', \t\t\t\t\t0);\r\n\t\t// Font Active / Inactive\r\n\t\tadd_option('ts_vcsc_extend_settings_tinymceMedia',\t\t\t\t\t\t1);\r\n\t\tadd_option('ts_vcsc_extend_settings_tinymceIcon',\t\t\t\t\t\t1);\r\n\t\tadd_option('ts_vcsc_extend_settings_tinymceAwesome',\t\t\t\t\t1);\r\n\t\tadd_option('ts_vcsc_extend_settings_tinymceBrankic',\t\t\t\t\t0);\r\n\t\tadd_option('ts_vcsc_extend_settings_tinymceCountricons',\t\t\t\t0);\r\n\t\tadd_option('ts_vcsc_extend_settings_tinymceCurrencies',\t\t\t\t\t0);\r\n\t\tadd_option('ts_vcsc_extend_settings_tinymceElegant',\t\t\t\t\t0);\r\n\t\tadd_option('ts_vcsc_extend_settings_tinymceEntypo',\t\t\t\t\t\t0);\r\n\t\tadd_option('ts_vcsc_extend_settings_tinymceFoundation',\t\t\t\t\t0);\r\n\t\tadd_option('ts_vcsc_extend_settings_tinymceGenericons',\t\t\t\t\t0);\r\n\t\tadd_option('ts_vcsc_extend_settings_tinymceIcoMoon',\t\t\t\t\t0);\r\n\t\tadd_option('ts_vcsc_extend_settings_tinymceMonuments',\t\t\t\t\t0);\r\n\t\tadd_option('ts_vcsc_extend_settings_tinymceSocialMedia',\t\t\t\t0);\r\n\t\tadd_option('ts_vcsc_extend_settings_tinymceTypicons',\t\t\t\t\t0);\r\n\t\tadd_option('ts_vcsc_extend_settings_tinymceFontsAll',\t\t\t\t\t0);\t\t\r\n\t\tadd_option('ts_vcsc_extend_settings_tinymceVC_Awesome',\t\t\t\t\t0);\r\n\t\tadd_option('ts_vcsc_extend_settings_tinymceVC_Entypo',\t\t\t\t\t0);\r\n\t\tadd_option('ts_vcsc_extend_settings_tinymceVC_Linecons',\t\t\t\t0);\r\n\t\tadd_option('ts_vcsc_extend_settings_tinymceVC_OpenIconic',\t\t\t\t0);\r\n\t\tadd_option('ts_vcsc_extend_settings_tinymceVC_Typicons',\t\t\t\t0);\t\t\r\n\t\t// Custom Font Data\r\n\t\tadd_option('ts_vcsc_extend_settings_IconFontSettings',\t\t\t\t\t'');\r\n\t\tadd_option('ts_vcsc_extend_settings_tinymceCustom',\t\t\t\t\t\t0);\r\n\t\tadd_option('ts_vcsc_extend_settings_tinymceCustomArray',\t\t\t\t'');\r\n\t\tadd_option('ts_vcsc_extend_settings_tinymceCustomJSON',\t\t\t\t\t'');\r\n\t\tadd_option('ts_vcsc_extend_settings_tinymceCustomPath',\t\t\t\t\t'');\r\n\t\tadd_option('ts_vcsc_extend_settings_tinymceCustomPHP', \t\t\t\t\t'');\r\n\t\tadd_option('ts_vcsc_extend_settings_tinymceCustomName',\t\t\t\t\t'Custom User Font');\r\n\t\tadd_option('ts_vcsc_extend_settings_tinymceCustomAuthor',\t\t\t\t'Custom User');\r\n\t\tadd_option('ts_vcsc_extend_settings_tinymceCustomCount',\t\t\t\t0);\r\n\t\tadd_option('ts_vcsc_extend_settings_tinymceCustomDate',\t\t\t\t\t'');\r\n\t\tadd_option('ts_vcsc_extend_settings_tinymceCustomDirectory',\t\t\t'');\r\n\t\t// Row + Column Extensions\r\n\t\tadd_option('ts_vcsc_extend_settings_additionsRows',\t\t\t\t\t\t0);\r\n\t\tadd_option('ts_vcsc_extend_settings_additionsColumns',\t\t\t\t\t0);\r\n\t\tadd_option('ts_vcsc_extend_settings_additionsRowEffectsBreak',\t\t\t'600');\r\n\t\tadd_option('ts_vcsc_extend_settings_additionsSmoothScroll',\t\t\t\t0);\r\n\t\tadd_option('ts_vcsc_extend_settings_additionsSmoothSpeed',\t\t\t\t'30');\r\n\t\t// Custom Post Types\r\n\t\tadd_option('ts_vcsc_extend_settings_customWidgets',\t\t\t\t\t\t0);\r\n\t\tadd_option('ts_vcsc_extend_settings_customTeam',\t\t\t\t\t\t0);\r\n\t\tadd_option('ts_vcsc_extend_settings_customTestimonial',\t\t\t\t\t0);\t\t\r\n\t\tadd_option('ts_vcsc_extend_settings_customSkillset',\t\t\t\t\t0);\t\t\r\n\t\tadd_option('ts_vcsc_extend_settings_customTimelines', \t\t\t\t\t0);\r\n\t\tadd_option('ts_vcsc_extend_settings_customLogo', \t\t\t\t\t\t0);\r\n\t\t// tinyMCE Icon Shortcode Generator\r\n\t\tadd_option('ts_vcsc_extend_settings_useIconGenerator',\t\t\t\t\t0);\r\n\t\tadd_option('ts_vcsc_extend_settings_useTinyMCEMedia', \t\t\t\t\t1);\r\n\t\t// Standard Elements\r\n\t\tadd_option('ts_vcsc_extend_settings_StandardElements',\t\t\t\t\t'');\r\n\t\t// Demo Elements\r\n\t\tadd_option('ts_vcsc_extend_settings_DemoElements', \t\t\t\t\t\t'');\r\n\t\t// WooCommerce Elements\r\n\t\tadd_option('ts_vcsc_extend_settings_WooCommerceUse',\t\t\t\t\t0);\r\n\t\tadd_option('ts_vcsc_extend_settings_WooCommerceElements',\t\t\t\t'');\r\n\t\t// bbPress Elements\r\n\t\tadd_option('ts_vcsc_extend_settings_bbPressUse',\t\t\t\t\t\t0);\r\n\t\tadd_option('ts_vcsc_extend_settings_bbPressElements',\t\t\t\t\t'');\r\n\t\t// Options for External Files\r\n\t\tadd_option('ts_vcsc_extend_settings_loadForcable',\t\t\t\t\t\t0);\r\n\t\tadd_option('ts_vcsc_extend_settings_loadLightbox', \t\t\t\t\t\t0);\r\n\t\tadd_option('ts_vcsc_extend_settings_loadTooltip', \t\t\t\t\t\t0);\r\n\t\tadd_option('ts_vcsc_extend_settings_loadFonts', \t\t\t\t\t\t0);\r\n\t\tadd_option('ts_vcsc_extend_settings_loadEnqueue',\t\t\t\t\t\t1);\r\n\t\tadd_option('ts_vcsc_extend_settings_loadHeader',\t\t\t\t\t\t0);\r\n\t\tadd_option('ts_vcsc_extend_settings_loadjQuery', \t\t\t\t\t\t0);\r\n\t\tadd_option('ts_vcsc_extend_settings_loadModernizr',\t\t\t\t\t\t1);\r\n\t\tadd_option('ts_vcsc_extend_settings_loadWaypoints', \t\t\t\t\t1);\r\n\t\tadd_option('ts_vcsc_extend_settings_loadCountTo', \t\t\t\t\t\t1);\r\n\t\tadd_option('ts_vcsc_extend_settings_loadMooTools', \t\t\t\t\t\t1);\r\n\t\tadd_option('ts_vcsc_extend_settings_loadDetector', \t\t\t\t\t\t0);\r\n\t\tadd_option('ts_vcsc_extend_settings_loadHammerNew', \t\t\t\t\t1);\r\n\t\t// Google Font Manager Settings\r\n\t\tadd_option('ts_vcsc_extend_settings_allowGoogleManager', \t\t\t\t1);\r\n\t\t// Single Page Navigator\r\n\t\tadd_option('ts_vcsc_extend_settings_allowPageNavigator', \t\t\t\t0);\r\n\t\t// EnlighterJS - Syntax Highlighter\r\n\t\tadd_option('ts_vcsc_extend_settings_allowEnlighterJS',\t\t\t\t\t0);\r\n\t\tadd_option('ts_vcsc_extend_settings_allowThemeBuilder',\t\t\t\t\t0);\r\n\t\t// Post Type Menu Positions\r\n\t\t$TS_VCSC_Menu_Positions_Defaults_Init = array(\r\n\t\t\t'ts_widgets'\t\t\t\t\t=> 50,\r\n\t\t\t'ts_timeline'\t\t\t\t\t=> 51,\r\n\t\t\t'ts_team'\t\t\t\t\t\t=> 52,\r\n\t\t\t'ts_testimonials'\t\t\t\t=> 53,\r\n\t\t\t'ts_skillsets'\t\t\t\t\t=> 54,\r\n\t\t\t'ts_logos'\t\t\t\t\t\t=> 55,\r\n\t\t);\r\n\t\tadd_option('ts_vcsc_extend_settings_menuPositions',\t\t\t\t\t\t$TS_VCSC_Menu_Positions_Defaults_Init);\r\n\t\t// Row Toggle Settings\r\n\t\t$TS_VCSC_Row_Toggle_Defaults_Init = array(\r\n\t\t\t'Large Devices' => 1200,\r\n\t\t\t'Medium Devices' => 992,\r\n\t\t\t'Small Devices' => 768,\r\n\t\t);\r\n\t\tadd_option('ts_vcsc_extend_settings_rowVisibilityLimits', \t\t\t\t$TS_VCSC_Row_Toggle_Defaults_Init);\r\n\t\t// Language Settings: Countdown\r\n\t\t$TS_VCSC_Countdown_Language_Defaults_Init = array(\r\n\t\t\t'DayPlural' => 'Days',\r\n\t\t\t'DaySingular' => 'Day',\r\n\t\t\t'HourPlural' => 'Hours',\r\n\t\t\t'HourSingular' => 'Hour',\r\n\t\t\t'MinutePlural' => 'Minutes',\r\n\t\t\t'MinuteSingular' => 'Minute',\r\n\t\t\t'SecondPlural' => 'Seconds',\r\n\t\t\t'SecondSingular' => 'Second',\r\n\t\t);\r\n\t\tadd_option('ts_vcsc_extend_settings_translationsCountdown', \t\t\t$TS_VCSC_Countdown_Language_Defaults_Init);\r\n\t\t// Language Settings: Google Maps PLUS\r\n\t\t$TS_VCSC_Google_MapPLUS_Language_Defaults_Init = array(\r\n\t\t\t'ListenersStart' => 'Start Listeners',\r\n\t\t\t'ListenersStop' => 'Stop Listeners',\r\n\t\t\t'MobileShow' => 'Show Google Map',\r\n\t\t\t'MobileHide' => 'Hide Google Map',\r\n\t\t\t'StyleDefault' => 'Google Standard',\r\n\t\t\t'StyleLabel' => 'Change Map Style',\r\n\t\t\t'FilterAll' => 'All Groups',\r\n\t\t\t'FilterLabel' => 'Filter by Groups',\r\n\t\t\t'SelectLabel' => 'Zoom to Location',\r\n\t\t\t'ControlsOSM' => 'Open Street',\r\n\t\t\t'ControlsHome' => 'Home',\r\n\t\t\t'ControlsBounds' => 'Fit All',\r\n\t\t\t'ControlsBike' => 'Bicycle Trails',\r\n\t\t\t'ControlsTraffic' => 'Traffic',\r\n\t\t\t'ControlsTransit' => 'Transit',\r\n\t\t\t'TrafficMiles' => 'Miles per Hour',\r\n\t\t\t'TrafficKilometer' => 'Kilometers per Hour',\r\n\t\t\t'TrafficNone' => 'No Data Available',\r\n\t\t\t'SearchButton' => 'Search Location',\r\n\t\t\t'SearchHolder' => 'Enter address to search for ...',\r\n\t\t\t'SearchGoogle' => 'View on Google Maps',\r\n\t\t\t'SearchDirections' => 'Get Directions',\r\n\t\t\t'OtherLink' => 'Learn More!',\r\n\t\t);\r\n\t\tadd_option('ts_vcsc_extend_settings_translationsGoogleMapPLUS', \t\t$TS_VCSC_Google_MapPLUS_Language_Defaults_Init);\r\n\t\t// Language Settings: Google Maps (Deprecated)\r\n\t\t$TS_VCSC_Google_Map_Language_Defaults_Init = array(\r\n\t\t\t'TextCalcShow' => 'Show Address Input',\r\n\t\t\t'TextCalcHide' => 'Hide Address Input',\r\n\t\t\t'TextDirectionShow' => 'Show Directions',\r\n\t\t\t'TextDirectionHide' => 'Hide Directions',\r\n\t\t\t'TextResetMap' => 'Reset Map',\r\n\t\t\t'PrintRouteText' \t\t\t => 'Print Route',\r\n\t\t\t'TextViewOnGoogle' => 'View on Google',\r\n\t\t\t'TextButtonCalc' => 'Show Route',\r\n\t\t\t'TextSetTarget' => 'Please enter your Start Address:',\r\n\t\t\t'TextGeoLocation' => 'Get My Location',\r\n\t\t\t'TextTravelMode' => 'Travel Mode',\r\n\t\t\t'TextDriving' => 'Driving',\r\n\t\t\t'TextWalking' => 'Walking',\r\n\t\t\t'TextBicy' => 'Bicycling',\r\n\t\t\t'TextWP' => 'Optimize Waypoints',\r\n\t\t\t'TextButtonAdd' => 'Add Stop on the Way',\r\n\t\t\t'TextDistance' => 'Total Distance:',\r\n\t\t\t'TextMapHome' => 'Home',\r\n\t\t\t'TextMapBikes' => 'Bicycle Trails',\r\n\t\t\t'TextMapTraffic' => 'Traffic',\r\n\t\t\t'TextMapSpeedMiles' => 'Miles Per Hour',\r\n\t\t\t'TextMapSpeedKM' => 'Kilometers Per Hour',\r\n\t\t\t'TextMapNoData' => 'No Data Available!',\r\n\t\t\t'TextMapMiles' => 'Miles',\r\n\t\t\t'TextMapKilometes' => 'Kilometers',\r\n\t\t\t'TextMapActivate' => 'Show Google Map',\r\n\t\t\t'TextMapDeactivate' => 'Hide Google Map',\r\n\t\t);\r\n\t\tadd_option('ts_vcsc_extend_settings_translationsGoogleMap', \t\t\t$TS_VCSC_Google_Map_Language_Defaults_Init);\r\n\t\t// Language Settings: Isotope Posts\r\n\t\t$TS_VCSC_Isotope_Posts_Language_Defaults_Init = array(\r\n\t\t\t'ButtonFilter'\t\t => 'Filter Posts', \r\n\t\t\t'ButtonLayout'\t\t => 'Change Layout',\r\n\t\t\t'ButtonSort'\t\t => 'Sort Criteria',\r\n\t\t\t// Standard Post Strings\r\n\t\t\t'Date' \t\t\t\t => 'Post Date', \r\n\t\t\t'Modified' \t\t\t => 'Post Modified', \r\n\t\t\t'Title' \t\t\t => 'Post Title', \r\n\t\t\t'Author' \t\t\t => 'Post Author', \r\n\t\t\t'PostID' \t\t\t => 'Post ID', \r\n\t\t\t'Comments' \t\t\t => 'Number of Comments',\r\n\t\t\t// Layout Strings\r\n\t\t\t'SeeAll'\t\t\t => 'See All',\r\n\t\t\t'Timeline' \t\t\t => 'Timeline',\r\n\t\t\t'Masonry' \t\t\t => 'Centered Masonry',\r\n\t\t\t'FitRows'\t\t\t => 'Fit Rows',\r\n\t\t\t'StraightDown' \t\t => 'Straigt Down',\r\n\t\t\t// WooCommerce Strings\r\n\t\t\t'WooFilterProducts' => 'Filter Products',\r\n\t\t\t'WooTitle' => 'Product Title',\r\n\t\t\t'WooPrice' => 'Product Price',\r\n\t\t\t'WooRating' => 'Product Rating',\r\n\t\t\t'WooDate' => 'Product Date',\r\n\t\t\t'WooModified' => 'Product Modified',\r\n\t\t\t// General Strings\r\n\t\t\t'Categories' => 'Categories',\r\n\t\t\t'Tags' => 'Tags',\r\n\t\t);\r\n\t\tadd_option('ts_vcsc_extend_settings_translationsIsotopePosts', \t\t\t$TS_VCSC_Isotope_Posts_Language_Defaults_Init);\r\n\t\t// Options for Lightbox Settings\r\n\t\t$TS_VCSC_Lightbox_Setting_Defaults_Init = array(\r\n\t\t\t'thumbs' => 'bottom',\r\n\t\t\t'thumbsize' => 50,\r\n\t\t\t'animation' => 'random',\r\n\t\t\t'captions' => 'data-title',\r\n\t\t\t'closer' => 1, // true/false\r\n\t\t\t'duration' => 5000,\r\n\t\t\t'share' => 0, // true/false\r\n\t\t\t'social' \t => 'fb,tw,gp,pin',\r\n\t\t\t'notouch' => 1, // true/false\r\n\t\t\t'bgclose'\t\t\t => 1, // true/false\r\n\t\t\t'nohashes'\t\t\t => 1, // true/false\r\n\t\t\t'keyboard'\t\t\t => 1, // 0/1\r\n\t\t\t'fullscreen'\t\t => 1, // 0/1\r\n\t\t\t'zoom'\t\t\t\t => 1, // 0/1\r\n\t\t\t'fxspeed'\t\t\t => 300,\r\n\t\t\t'scheme'\t\t\t => 'dark',\r\n\t\t\t'removelight' => 0,\r\n\t\t\t'customlight' => 0,\r\n\t\t\t'customcolor'\t\t => '#ffffff',\r\n\t\t\t'backlight' \t\t => '#ffffff',\r\n\t\t\t'usecolor' \t\t => 0, // true/false\r\n\t\t\t'background' => '',\r\n\t\t\t'repeat' => 'no-repeat',\r\n\t\t\t'overlay' => '#000000',\r\n\t\t\t'noise' => '',\r\n\t\t\t'cors' => 0, // true/false\r\n\t\t\t'scrollblock' => 'css',\r\n\t\t);\r\n\t\tadd_option('ts_vcsc_extend_settings_defaultLightboxSettings',\t\t\t$TS_VCSC_Lightbox_Setting_Defaults_Init);\r\n\t\tadd_option('ts_vcsc_extend_settings_defaultLightboxAnimation', \t\t\t'random');\r\n\t\t// Options for Envato Sales Data\r\n\t\tadd_option('ts_vcsc_extend_settings_envatoData', \t\t\t\t\t '');\r\n\t\tadd_option('ts_vcsc_extend_settings_envatoInfo', \t\t\t\t\t '');\r\n\t\tadd_option('ts_vcsc_extend_settings_envatoLink', \t\t\t\t\t '');\r\n\t\tadd_option('ts_vcsc_extend_settings_envatoPrice', \t\t\t\t\t '');\r\n\t\tadd_option('ts_vcsc_extend_settings_envatoRating', \t\t\t\t\t '');\r\n\t\tadd_option('ts_vcsc_extend_settings_envatoSales', \t\t\t\t\t '');\r\n\t\tadd_option('ts_vcsc_extend_settings_envatoCheck', \t\t\t\t\t 0);\r\n\t\t$roles \t\t\t\t\t\t\t\t= get_editable_roles();\r\n\t\tforeach ($GLOBALS['wp_roles']->role_objects as $key => $role) {\r\n\t\t\tif (isset($roles[$key]) && $role->has_cap('edit_pages') && !$role->has_cap('ts_vcsc_extend')) {\r\n\t\t\t\t$role->add_cap('ts_vcsc_extend');\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public function options_load();", "public function options() {}", "public function init_shortcodes_section_fields() {\n\t\t\t$this->shortcodes_option_fields = array(\n\t\t\t\t'display_type' => array(\n\t\t\t\t\t'id' => $this->shortcodes_section_key . '_display_type',\n\t\t\t\t\t'name' => 'display_type',\n\t\t\t\t\t'type' => 'select',\n\t\t\t\t\t'label' => esc_html__( 'Display Type', 'learndash' ),\n\t\t\t\t\t'value' => '',\n\t\t\t\t\t'options' => array(\n\t\t\t\t\t\t'' => esc_html__( 'Select a Display Type', 'learndash' ),\n\t\t\t\t\t\tlearndash_get_post_type_slug( 'course' ) => learndash_get_custom_label( 'course' ),\n\t\t\t\t\t\tlearndash_get_post_type_slug( 'group' ) => learndash_get_custom_label( 'group' ),\n\t\t\t\t\t\tlearndash_get_post_type_slug( 'quiz' ) => learndash_get_custom_label( 'quiz' ),\n\t\t\t\t\t),\n\t\t\t\t\t'attrs' => array(\n\t\t\t\t\t\t'data-shortcode-exclude' => '1',\n\t\t\t\t\t),\n\t\t\t\t\t'required' => 'required',\n\t\t\t\t),\n\t\t\t\t'quiz_id' => array(\n\t\t\t\t\t'id' => $this->shortcodes_section_key . '_quiz_id',\n\t\t\t\t\t'name' => 'quiz_id',\n\t\t\t\t\t'type' => 'number',\n\t\t\t\t\t'label' => sprintf(\n\t\t\t\t\t\t// translators: placeholder: Quiz.\n\t\t\t\t\t\tesc_html_x( '%s ID', 'placeholder: Quiz', 'learndash' ),\n\t\t\t\t\t\tLearnDash_Custom_Label::get_label( 'quiz' )\n\t\t\t\t\t),\n\t\t\t\t\t'help_text' => sprintf(\n\t\t\t\t\t\t// translators: placeholders: Quiz, Quiz.\n\t\t\t\t\t\tesc_html_x( 'Enter single %1$s ID. Leave blank for current %2$s.', 'placeholders: Quiz, Quiz', 'learndash' ),\n\t\t\t\t\t\tLearnDash_Custom_Label::get_label( 'quiz' ),\n\t\t\t\t\t\tLearnDash_Custom_Label::get_label( 'quiz' )\n\t\t\t\t\t),\n\t\t\t\t\t'value' => '',\n\t\t\t\t\t'class' => 'small-text',\n\t\t\t\t\t'required' => 'required',\n\t\t\t\t),\n\t\t\t\t'course_id' => array(\n\t\t\t\t\t'id' => $this->shortcodes_section_key . '_course_id',\n\t\t\t\t\t'name' => 'course_id',\n\t\t\t\t\t'type' => 'number',\n\t\t\t\t\t'label' => sprintf(\n\t\t\t\t\t\t// translators: placeholder: Course.\n\t\t\t\t\t\tesc_html_x( '%s ID', 'placeholder: Course', 'learndash' ),\n\t\t\t\t\t\tLearnDash_Custom_Label::get_label( 'course' )\n\t\t\t\t\t),\n\t\t\t\t\t'help_text' => sprintf(\n\t\t\t\t\t\t// translators: placeholders: Course, Course.\n\t\t\t\t\t\tesc_html_x( 'Enter single %1$s ID. Leave blank for current %2$s.', 'placeholders: Course, Course', 'learndash' ),\n\t\t\t\t\t\tLearnDash_Custom_Label::get_label( 'course' ),\n\t\t\t\t\t\tLearnDash_Custom_Label::get_label( 'course' )\n\t\t\t\t\t),\n\t\t\t\t\t'value' => '',\n\t\t\t\t\t'class' => 'small-text',\n\t\t\t\t\t'required' => 'required',\n\t\t\t\t),\n\t\t\t\t'group_id' => array(\n\t\t\t\t\t'id' => $this->shortcodes_section_key . '_group_id',\n\t\t\t\t\t'name' => 'group_id',\n\t\t\t\t\t'type' => 'number',\n\t\t\t\t\t'label' => sprintf(\n\t\t\t\t\t\t// translators: placeholder: Group.\n\t\t\t\t\t\tesc_html_x( '%s ID', 'placeholder: Group', 'learndash' ),\n\t\t\t\t\t\tLearnDash_Custom_Label::get_label( 'group' )\n\t\t\t\t\t),\n\t\t\t\t\t'help_text' => sprintf(\n\t\t\t\t\t\t// translators: placeholders: Group, Group.\n\t\t\t\t\t\tesc_html_x( 'Enter single %1$s ID. Leave blank for current %2$s.', 'placeholders: Group, Group', 'learndash' ),\n\t\t\t\t\t\tLearnDash_Custom_Label::get_label( 'group' ),\n\t\t\t\t\t\tLearnDash_Custom_Label::get_label( 'group' )\n\t\t\t\t\t),\n\t\t\t\t\t'value' => '',\n\t\t\t\t\t'class' => 'small-text',\n\t\t\t\t\t'required' => 'required',\n\t\t\t\t),\n\t\t\t\t'user_id' => array(\n\t\t\t\t\t'id' => $this->shortcodes_section_key . '_user_id',\n\t\t\t\t\t'name' => 'user_id',\n\t\t\t\t\t'type' => 'number',\n\t\t\t\t\t'label' => esc_html__( 'User ID', 'learndash' ),\n\t\t\t\t\t'help_text' => esc_html__( 'Enter specific User ID. Leave blank for current User.', 'learndash' ),\n\t\t\t\t\t'value' => '',\n\t\t\t\t\t'class' => 'small-text',\n\t\t\t\t),\n\t\t\t\t'display_as' => array(\n\t\t\t\t\t'id' => $this->shortcodes_section_key . '_display_as',\n\t\t\t\t\t'name' => 'display_as',\n\t\t\t\t\t'type' => 'select',\n\t\t\t\t\t'label' => esc_html__( 'Display as', 'learndash' ),\n\t\t\t\t\t'value' => 'banner',\n\t\t\t\t\t'options' => array(\n\t\t\t\t\t\t'button' => esc_html__( 'Button', 'learndash' ),\n\t\t\t\t\t\t'banner' => sprintf(\n\t\t\t\t\t\t\t// translators: placeholders: Course, Group.\n\t\t\t\t\t\t\tesc_html_x( 'Banner (%1$s or %2$s only)', 'placeholders: Course, Group', 'learndash' ),\n\t\t\t\t\t\t\tLearnDash_Custom_Label::get_label( 'course' ),\n\t\t\t\t\t\t\tLearnDash_Custom_Label::get_label( 'group' )\n\t\t\t\t\t\t),\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t\t'label' => array(\n\t\t\t\t\t'id' => $this->shortcodes_section_key . '_label',\n\t\t\t\t\t'name' => 'label',\n\t\t\t\t\t'type' => 'text',\n\t\t\t\t\t'label' => esc_html__( 'Label', 'learndash' ),\n\t\t\t\t\t'help_text' => esc_html__( 'Label for link shown to user', 'learndash' ),\n\t\t\t\t\t'value' => '',\n\t\t\t\t),\n\t\t\t\t'class' => array(\n\t\t\t\t\t'id' => $this->shortcodes_section_key . '_class',\n\t\t\t\t\t'name' => 'class',\n\t\t\t\t\t'type' => 'text',\n\t\t\t\t\t'label' => esc_html__( 'HTML Class', 'learndash' ),\n\t\t\t\t\t'help_text' => esc_html__( 'HTML class for link element', 'learndash' ),\n\t\t\t\t\t'value' => '',\n\t\t\t\t),\n\t\t\t\t'context' => array(\n\t\t\t\t\t'id' => $this->shortcodes_section_key . '_context',\n\t\t\t\t\t'name' => 'context',\n\t\t\t\t\t'type' => 'text',\n\t\t\t\t\t'label' => esc_html__( 'Context', 'learndash' ),\n\t\t\t\t\t'help_text' => esc_html__( 'User defined value to be passed into shortcode handler', 'learndash' ),\n\t\t\t\t\t'value' => '',\n\t\t\t\t),\n\t\t\t\t'callback' => array(\n\t\t\t\t\t'id' => $this->shortcodes_section_key . '_callback',\n\t\t\t\t\t'name' => 'callback',\n\t\t\t\t\t'type' => 'text',\n\t\t\t\t\t'label' => esc_html__( 'Callback', 'learndash' ),\n\t\t\t\t\t'help_text' => esc_html__( 'Custom callback function to be used instead of default output', 'learndash' ),\n\t\t\t\t\t'value' => '',\n\t\t\t\t),\n\t\t\t);\n\n\t\t\tif ( ( isset( $this->fields_args['post_type'] ) ) && ( in_array( $this->fields_args['post_type'], learndash_get_post_types( 'course' ), true ) ) ) {\n\t\t\t\tunset( $this->shortcodes_option_fields['display_type']['required'] );\n\t\t\t\tunset( $this->shortcodes_option_fields['course_id']['required'] );\n\t\t\t} elseif ( ( isset( $this->fields_args['post_type'] ) ) && ( learndash_get_post_type_slug( 'group' ) === $this->fields_args['post_type'] ) ) {\n\t\t\t\tunset( $this->shortcodes_option_fields['display_type']['required'] );\n\t\t\t\tunset( $this->shortcodes_option_fields['group_id']['required'] );\n\t\t\t} elseif ( ( isset( $this->fields_args['post_type'] ) ) && ( learndash_get_post_type_slug( 'quiz' ) === $this->fields_args['post_type'] ) ) {\n\t\t\t\tunset( $this->shortcodes_option_fields['display_type']['required'] );\n\t\t\t\tunset( $this->shortcodes_option_fields['quiz_id']['required'] );\n\t\t\t}\n\n\t\t\t/** This filter is documented in includes/settings/settings-metaboxes/class-ld-settings-metabox-course-access-settings.php */\n\t\t\t$this->shortcodes_option_fields = apply_filters( 'learndash_settings_fields', $this->shortcodes_option_fields, $this->shortcodes_section_key );\n\n\t\t\tparent::init_shortcodes_section_fields();\n\t\t}", "public function admin_options() {\n\n\t\t\t?>\n\t\t\t<h3>ATOS</h3>\n\t\t\t<p><?php _e('Acceptez les paiements par carte bleue grâce à Atos.', 'woothemes'); ?></p>\n\t\t\t<p><?php _e('Plugin créé par David Fiaty', 'woothemes'); ?> - <a href=\"http://www.cmsbox.fr\">http://www.cmsbox.fr</a></p>\n\t\t\t<table class=\"form-table\">\n\t\t\t<?php\n\t\t\t\t// Generate the HTML For the settings form.\n\t\t\t\t$this->generate_settings_html();\n\t\t\t?>\n\t\t\t</table><!--/.form-table-->\n\t\t\t<?php\n\t\t}", "function add_another_section($sections){\n\t\n\t//$sections = array();\n\t$sections[] = array(\n\t\t\t\t'title' => __('A Section added by hook', 'nhp-opts'),\n\t\t\t\t'desc' => __('<p class=\"description\">This is a section created by adding a filter to the sections array, great to allow child themes, to add/remove sections from the options.</p>', 'nhp-opts'),\n\t\t\t\t//all the glyphicons are included in the options folder, so you can hook into them, or link to your own custom ones.\n\t\t\t\t//You dont have to though, leave it blank for default.\n\t\t\t\t'icon' => trailingslashit(get_template_directory_uri()).'options/img/glyphicons/glyphicons_062_attach.png',\n\t\t\t\t//Lets leave this as a blank section, no options just some intro text set above.\n\t\t\t\t'fields' => array()\n\t\t\t\t);\n\t\n\treturn $sections;\n\t\n}", "function ctc_add_page() {\n add_options_page('CTC', 'CTC', 8, 'ctcoptions', 'ctc_options_page');\n}", "function optionsframework_options() {\n\n\t// Option to switch between the_excerpt and the_content\n\t$blog_layout = array('1' => __('Display full content for each post', 'unite'),'2' => __('Display excerpt for each post', 'unite'));\n\n\t// Color schemes\n\t$site_layout = array('pull-left' => __('Right Sidebar', 'unite'),'pull-right' => __('Left Sidebar', 'unite'));\n\n\t\t// Test data\n\t$test_array = array(\n\t\t'one' => __('One', 'options_framework_theme'),\n\t\t'two' => __('Two', 'options_framework_theme'),\n\t\t'three' => __('Three', 'options_framework_theme'),\n\t\t'four' => __('Four', 'options_framework_theme'),\n\t\t'five' => __('Five', 'options_framework_theme')\n\t);\n\n\t// Multicheck Array\n\t$multicheck_array = array(\n\t\t'one' => __('French Toast', 'options_framework_theme'),\n\t\t'two' => __('Pancake', 'options_framework_theme'),\n\t\t'three' => __('Omelette', 'options_framework_theme'),\n\t\t'four' => __('Crepe', 'options_framework_theme'),\n\t\t'five' => __('Waffle', 'options_framework_theme')\n\t);\n\n\t// Multicheck Defaults\n\t$multicheck_defaults = array(\n\t\t'one' => '1',\n\t\t'five' => '1'\n\t);\n\n\t// Typography Defaults\n\t$typography_defaults = array(\n\t\t'size' => '15px',\n\t\t'face' => 'Helvetica Neue',\n\t\t'style' => 'normal',\n\t\t'color' => '#6B6B6B' );\n\n\t// Typography Options\n\t$typography_options = array(\n\t 'sizes' => array( '6','10','12','14','15','16','18','20','24','28','32','36','42','48' ),\n\t 'faces' => array(\n\t\t\t'arial' => 'Arial',\n\t\t\t'verdana' => 'Verdana, Geneva',\n\t\t\t'trebuchet' => 'Trebuchet',\n\t\t\t'georgia' => 'Georgia',\n\t\t\t'times' => 'Times New Roman',\n\t\t\t'tahoma' => 'Tahoma, Geneva',\n\t\t\t'palatino' => 'Palatino',\n\t\t\t'helvetica' => 'Helvetica',\n\t\t\t'Helvetica Neue' => 'Helvetica Neue'\n\t),\n\t 'styles' => array( 'normal' => 'Normal','bold' => 'Bold' ),\n\t 'color' => true\n\t);\n\n\t// Pull all the categories into an array\n\t$options_categories = array();\n\t$options_categories_obj = get_categories();\n\tforeach ($options_categories_obj as $category) {\n\t $options_categories[$category->cat_ID] = $category->cat_name;\n\t}\n\n\t// Pull all tags into an array\n\t$options_tags = array();\n\t$options_tags_obj = get_tags();\n\tforeach ( $options_tags_obj as $tag ) {\n\t $options_tags[$tag->term_id] = $tag->name;\n\t}\n\n\n\t// Pull all the pages into an array\n\t$options_pages = array();\n\t$options_pages_obj = get_pages('sort_column=post_parent,menu_order');\n\t$options_pages[''] = 'Select a page:';\n\tforeach ($options_pages_obj as $page) {\n\t $options_pages[$page->ID] = $page->post_title;\n\t}\n\n\t// If using image radio buttons, define a directory path\n\t$imagepath = get_template_directory_uri() . '/images/';\n\n\n\t// fixed or scroll position\n\t$fixed_scroll = array('scroll' => 'Scroll', 'fixed' => 'Fixed');\n\n\t$options = array();\n\n\t$options[] = array(\n\t\t'name' => __('Main', 'unite'),\n\t\t'type' => 'heading'\n\t);\n\n\t$options[] = array(\n\t\t'name' => __('Home Page Settings', 'unite'),\n\t\t'id' => 'blog_settings',\n\t\t'std' => '1',\n\t\t'type' => 'select',\n\t\t'options' => $blog_layout\n\t);\n\n\t$options[] = array(\n\t\t\"name\" => __('Website Layout Options', 'unite'),\n\t\t\"desc\" => __('Choose between Left and Right sidebar options to be used as default', 'unite'),\n\t\t\"id\" => \"site_layout\",\n\t\t\"std\" => \"pull-left\",\n\t\t\"type\" => \"select\",\n\t\t\"class\" => \"mini\",\n\t\t\"options\" => $site_layout\n\t);\n\n\t$options[] = array(\n\t\t'name' => __('Element color', 'unite'),\n\t\t'desc' => __('Default used if no color is selected', 'unite'),\n\t\t'id' => 'element_color',\n\t\t'std' => '',\n\t\t'type' => 'color'\n\t);\n\n\t$options[] = array(\n\t\t'name' => __('Element color on hover', 'unite'),\n\t\t'desc' => __('Default used if no color is selected', 'unite'),\n\t\t'id' => 'element_color_hover',\n\t\t'std' => '',\n\t\t'type' => 'color'\n\t);\n\n\t$options[] = array(\n\t\t'name' => __('Custom Favicon', 'unite'),\n\t\t'desc' => __('Upload a 32px x 32px PNG/GIF image that will represent your websites favicon', 'unite'),\n\t\t'id' => 'custom_favicon',\n\t\t'std' => '',\n\t\t'type' => 'upload'\n\t);\n\n\t$options[] = array(\n\t\t'name' => __('Typography', 'unite'),\n\t\t'type' => 'heading'\n\t);\n\n\t$options[] = array(\n\t\t'name' => __('Main Body Text', 'unite'),\n\t\t'desc' => __('Used in P tags', 'unite'),\n\t\t'id' => 'main_body_typography',\n\t\t'std' => $typography_defaults,\n\t\t'type' => 'typography',\n\t\t'options' => $typography_options\n\t);\n\n\t$options[] = array(\n\t\t'name' => __('Heading Color', 'unite'),\n\t\t'desc' => __('Default used if no color is selected', 'unite'),\n\t\t'id' => 'heading_color',\n\t\t'std' => '',\n\t\t'type' => 'color'\n\t);\n\n\t$options[] = array(\n\t\t'name' => __('Link Color', 'unite'),\n\t\t'desc' => __('Default used if no color is selected', 'unite'),\n\t\t'id' => 'link_color',\n\t\t'std' => '',\n\t\t'type' => 'color'\n\t);\n\n\t$options[] = array(\n\t\t'name' => __('Link:hover Color', 'unite'),\n\t\t'desc' => __('Default used if no color is selected', 'unite'),\n\t\t'id' => 'link_hover_color',\n\t\t'std' => '',\n\t\t'type' => 'color'\n\t);\n\n\t$options[] = array(\n\t\t'name' => __('Link:active Color', 'unite'),\n\t\t'desc' => __('Default used if no color is selected', 'unite'),\n\t\t'id' => 'link_active_color',\n\t\t'std' => '',\n\t\t'type' => 'color'\n\t);\n\n\t$options[] = array(\n\t\t'name' => __('Header', 'unite'),\n\t\t'type' => 'heading'\n\t);\n\n\t$options[] = array(\n\t\t'name' => __('Top nav background color', 'unite'),\n\t\t'desc' => __('Default used if no color is selected.', 'unite'),\n\t\t'id' => 'top_nav_bg_color',\n\t\t'std' => '',\n\t\t'type' => 'color'\n\t);\n\n\t$options[] = array(\n\t\t'name' => __('Top nav item color', 'unite'),\n\t\t'desc' => __('Link color', 'unite'),\n\t\t'id' => 'top_nav_link_color',\n\t\t'std' => '',\n\t\t'type' => 'color'\n\t);\n\n\t$options[] = array(\n\t\t'name' => __('Top nav dropdown background color', 'unite'),\n\t\t'desc' => __('Background of dropdown item hover color', 'unite'),\n\t\t'id' => 'top_nav_dropdown_bg',\n\t\t'std' => '',\n\t\t'type' => 'color'\n\t);\n\n\t$options[] = array(\n\t\t'name' => __('Top nav dropdown item color', 'unite'),\n\t\t'desc' => __('Dropdown item color', 'unite'),\n\t\t'id' => 'top_nav_dropdown_item',\n\t\t'std' => '',\n\t\t'type' => 'color'\n\t);\n\n\t$options[] = array(\n\t\t'name' => __('Footer', 'unite'),\n\t\t'type' => 'heading'\n\t);\n\n\t$options[] = array(\n\t\t'name' => __('Footer Background Color', 'unite'),\n\t\t'id' => 'footer_bg_color',\n\t\t'std' => '',\n\t\t'type' => 'color'\n\t);\n\n\t$options[] = array(\n\t\t'name' => __('Footer Text Color', 'unite'),\n\t\t'id' => 'footer_text_color',\n\t\t'std' => '',\n\t\t'type' => 'color'\n\t);\n\n\t$options[] = array(\n\t\t'name' => __('Footer Link Color', 'unite'),\n\t\t'id' => 'footer_link_color',\n\t\t'std' => '',\n\t\t'type' => 'color'\n\t);\n\n\t$options[] = array(\n\t\t'name' => __('Footer information', 'unite'),\n\t\t'desc' => __('Copyright text in footer', 'unite'),\n\t\t'id' => 'custom_footer_text',\n\t\t'std' => '<a href=\"' . esc_url( home_url( '/' ) ) . '\" title=\"' . esc_attr( get_bloginfo( 'name', 'display' ) ) . '\" >' . get_bloginfo( 'name', 'display' ) . '</a>. All rights reserved.',\n\t\t'type' => 'textarea'\n\t);\n\n\t$options[] = array(\n\t\t'name' => __('Social', 'unite'),\n\t\t'type' => 'heading'\n\t);\n\n\t$options[] = array(\n\t\t'name' => __('Social Icon Color', 'unite'),\n\t\t'desc' => __('Default used if no color is selected', 'unite'),\n\t\t'id' => 'social_color',\n\t\t'std' => '',\n\t\t'type' => 'color'\n\t);\n\n\t$options[] = array(\n\t\t'name' => __('Social Icon:hover Color', 'unite'),\n\t\t'desc' => __('Default used if no color is selected', 'unite'),\n\t\t'id' => 'social_hover_color',\n\t\t'std' => '',\n\t\t'type' => 'color'\n\t);\n\n\t$options[] = array(\n\t\t'name' => __('Add full URL for your social network profiles', 'unite'),\n\t\t'desc' => __('Facebook', 'unite'),\n\t\t'id' => 'social_facebook',\n\t\t'std' => '',\n\t\t'class' => 'mini',\n\t\t'type' => 'text'\n\t);\n\n\t$options[] = array(\n\t\t'id' => 'social_twitter',\n\t\t'desc' => __('Twitter', 'unite'),\n\t\t'std' => '',\n\t\t'class' => 'mini',\n\t\t'type' => 'text'\n\t);\n\n\t$options[] = array(\n\t\t'id' => 'social_google',\n\t\t'desc' => __('Google+', 'unite'),\n\t\t'std' => '',\n\t\t'class' => 'mini',\n\t\t'type' => 'text'\n\t);\n\n\t$options[] = array(\n\t\t'id' => 'social_youtube',\n\t\t'desc' => __('Youtube', 'unite'),\n\t\t'std' => '',\n\t\t'class' => 'mini',\n\t\t'type' => 'text'\n\t);\n\n\t$options[] = array(\n\t\t'id' => 'social_linkedin',\n\t\t'desc' => __('LinkedIn', 'unite'),\n\t\t'std' => '',\n\t\t'class' => 'mini',\n\t\t'type' => 'text'\n\t);\n\n\t$options[] = array(\n\t\t'id' => 'social_pinterest',\n\t\t'desc' => __('Pinterest', 'unite'),\n\t\t'std' => '',\n\t\t'class' => 'mini',\n\t\t'type' => 'text'\n\t);\n\n\t$options[] = array(\n\t\t'id' => 'social_feed',\n\t\t'desc' => __('RSS Feed', 'unite'),\n\t\t'std' => '',\n\t\t'class' => 'mini',\n\t\t'type' => 'text'\n\t);\n\n\t$options[] = array(\n\t\t'id' => 'social_tumblr',\n\t\t'desc' => __('Tumblr', 'unite'),\n\t\t'std' => '',\n\t\t'class' => 'mini',\n\t\t'type' => 'text'\n\t);\n\n\t$options[] = array(\n\t\t'id' => 'social_flickr',\n\t\t'desc' => __('Flickr', 'unite'),\n\t\t'std' => '',\n\t\t'class' => 'mini',\n\t\t'type' => 'text'\n\t);\n\n\t$options[] = array(\n\t\t'id' => 'social_instagram',\n\t\t'desc' => __('Instagram', 'unite'),\n\t\t'std' => '',\n\t\t'class' => 'mini',\n\t\t'type' => 'text'\n\t);\n\n\t$options[] = array(\n\t\t'id' => 'social_dribbble',\n\t\t'desc' => __('Dribbble', 'unite'),\n\t\t'std' => '',\n\t\t'class' => 'mini',\n\t\t'type' => 'text'\n\t);\n\n\t$options[] = array(\n\t\t'id' => 'social_skype',\n\t\t'desc' => __('Skype', 'unite'),\n\t\t'std' => '',\n\t\t'class' => 'mini',\n\t\t'type' => 'text'\n\t);\n\n\t$options[] = array(\n\t\t'id' => 'social_vimeo',\n\t\t'desc' => __('Vimeo', 'unite'),\n\t\t'std' => '',\n\t\t'class' => 'mini',\n\t\t'type' => 'text'\n\t);\n\n\t$options[] = array(\n\t\t'id' => 'social_email',\n\t\t'desc' => __('Email', 'unite'),\n\t\t'std' => '',\n\t\t'class' => 'mini',\n\t\t'type' => 'text'\n\t);\n\n\t$options[] = array(\n\t\t'name' => __('Other', 'unite'),\n\t\t'type' => 'heading'\n\t);\n\n\t$options[] = array(\n\t\t'name' => __('Custom CSS', 'unite'),\n\t\t'desc' => __('Additional CSS', 'unite'),\n\t\t'id' => 'custom_css',\n\t\t'std' => '',\n\t\t'type' => 'textarea'\n\t);\n\n\treturn $options;\n}", "function get_alloptions_110()\n {\n }", "function template_options()\n{\n\tglobal $context, $settings, $options, $scripturl, $txt;\n\n\t$context['theme_options'] = array(\n\t\tarray(\n\t\t\t'id' => 'show_board_desc',\n\t\t\t'label' => $txt['board_desc_inside'],\n\t\t\t'default' => true,\n\t\t),\n\t\tarray(\n\t\t\t'id' => 'show_children',\n\t\t\t'label' => $txt['show_children'],\n\t\t\t'default' => true,\n\t\t),\n\t\tarray(\n\t\t\t'id' => 'use_sidebar_menu',\n\t\t\t'label' => $txt['use_sidebar_menu'],\n\t\t\t'default' => true,\n\t\t),\n\t\tarray(\n\t\t\t'id' => 'show_no_avatars',\n\t\t\t'label' => $txt['show_no_avatars'],\n\t\t\t'default' => true,\n\t\t),\n\t\tarray(\n\t\t\t'id' => 'show_no_signatures',\n\t\t\t'label' => $txt['show_no_signatures'],\n\t\t\t'default' => true,\n\t\t),\n\t\tarray(\n\t\t\t'id' => 'show_no_censored',\n\t\t\t'label' => $txt['show_no_censored'],\n\t\t\t'default' => true,\n\t\t),\n\t\tarray(\n\t\t\t'id' => 'return_to_post',\n\t\t\t'label' => $txt['return_to_post'],\n\t\t\t'default' => true,\n\t\t),\n\t\tarray(\n\t\t\t'id' => 'no_new_reply_warning',\n\t\t\t'label' => $txt['no_new_reply_warning'],\n\t\t\t'default' => true,\n\t\t),\n\t\tarray(\n\t\t\t'id' => 'view_newest_first',\n\t\t\t'label' => $txt['recent_posts_at_top'],\n\t\t\t'default' => true,\n\t\t),\n\t\tarray(\n\t\t\t'id' => 'view_newest_pm_first',\n\t\t\t'label' => $txt['recent_pms_at_top'],\n\t\t\t'default' => true,\n\t\t),\n\t\tarray(\n\t\t\t'id' => 'posts_apply_ignore_list',\n\t\t\t'label' => $txt['posts_apply_ignore_list'],\n\t\t\t'default' => false,\n\t\t),\n\t\tarray(\n\t\t\t'id' => 'wysiwyg_default',\n\t\t\t'label' => $txt['wysiwyg_default'],\n\t\t\t'default' => false,\n\t\t),\n\t\tarray(\n\t\t\t'id' => 'popup_messages',\n\t\t\t'label' => $txt['popup_messages'],\n\t\t\t'default' => true,\n\t\t),\n\t\tarray(\n\t\t\t'id' => 'copy_to_outbox',\n\t\t\t'label' => $txt['copy_to_outbox'],\n\t\t\t'default' => true,\n\t\t),\n\t\tarray(\n\t\t\t'id' => 'pm_remove_inbox_label',\n\t\t\t'label' => $txt['pm_remove_inbox_label'],\n\t\t\t'default' => true,\n\t\t),\n\t\tarray(\n\t\t\t'id' => 'auto_notify',\n\t\t\t'label' => $txt['auto_notify'],\n\t\t\t'default' => true,\n\t\t),\n\t\tarray(\n\t\t\t'id' => 'topics_per_page',\n\t\t\t'label' => $txt['topics_per_page'],\n\t\t\t'options' => array(\n\t\t\t\t0 => $txt['per_page_default'],\n\t\t\t\t5 => 5,\n\t\t\t\t10 => 10,\n\t\t\t\t25 => 25,\n\t\t\t\t50 => 50,\n\t\t\t),\n\t\t\t'default' => true,\n\t\t),\n\t\tarray(\n\t\t\t'id' => 'messages_per_page',\n\t\t\t'label' => $txt['messages_per_page'],\n\t\t\t'options' => array(\n\t\t\t\t0 => $txt['per_page_default'],\n\t\t\t\t5 => 5,\n\t\t\t\t10 => 10,\n\t\t\t\t25 => 25,\n\t\t\t\t50 => 50,\n\t\t\t),\n\t\t\t'default' => true,\n\t\t),\n\t\tarray(\n\t\t\t'id' => 'calendar_start_day',\n\t\t\t'label' => $txt['calendar_start_day'],\n\t\t\t'options' => array(\n\t\t\t\t0 => $txt['days'][0],\n\t\t\t\t1 => $txt['days'][1],\n\t\t\t\t6 => $txt['days'][6],\n\t\t\t),\n\t\t\t'default' => true,\n\t\t),\n\t\tarray(\n\t\t\t'id' => 'display_quick_reply',\n\t\t\t'label' => $txt['display_quick_reply'],\n\t\t\t'options' => array(\n\t\t\t\t0 => $txt['display_quick_reply1'],\n\t\t\t\t1 => $txt['display_quick_reply2'],\n\t\t\t\t2 => $txt['display_quick_reply3']\n\t\t\t),\n\t\t\t'default' => true,\n\t\t),\n\t\tarray(\n\t\t\t'id' => 'display_quick_mod',\n\t\t\t'label' => $txt['display_quick_mod'],\n\t\t\t'options' => array(\n\t\t\t\t0 => $txt['display_quick_mod_none'],\n\t\t\t\t1 => $txt['display_quick_mod_check'],\n\t\t\t\t2 => $txt['display_quick_mod_image'],\n\t\t\t),\n\t\t\t'default' => true,\n\t\t),\n\t);\n}", "function wcnc2015_options_check() {\n\tif ( ! get_option( 'my-options-data' ) ) {\n\t\t$options_defaults['extra_tagline'] \t= '';\n\t\t$options_defaults['footer_text']\t= '';\n\n\t\tupdate_option( 'my-options-data', $options_defaults );\n\t}\n}", "public function provide_newsletter_options() {\n\t\twp_add_inline_script(\n\t\t\t'civil-first-fleet-admin-js',\n\t\t\tsprintf(\n\t\t\t\t'var civilNewsletterOptions = %1$s;',\n\t\t\t\twp_json_encode( $this->get_newsletter_options_for_gutenberg() )\n\t\t\t)\n\t\t);\n\t}", "private function set_end_options(): void {\n Simply_Static\\Options::instance()\n ->set('additional_files', Utils::array_to_option_string($this->files))\n ->set('additional_urls', Utils::array_to_option_string($this->urls))\n ->set('archive_end_time', Simply_Static\\Util::formatted_datetime())\n ->save();\n }", "public function print_section_info()\n {\n print 'Enter your settings below:';\n }", "public function print_section_info()\n {\n print 'Enter your settings below:';\n }", "public function print_section_info()\n {\n print 'Enter your settings below:';\n }", "protected function _options() {\n\t\t\treturn array();\n\t\t}", "public function getWhatRequiredOptions()\n {\n $options = array(\n 1 => \"Refund\",\n 2 => \"Replacement\",\n 3 => \"Spare Part\",\n 4 => \"Other\"\n );\n return $options;\n }", "public static function add_options(){\n\n \t\t$settings = array(\n \t\t\t'foundation' => 0\n \t\t);\n\n \t\tadd_option( 'zip_downloads', $settings ); \n\t}", "static function get_options(){\n\t\t\t\tglobal $gdlr_core_item_pdb;\n\t\t\t\t\n\t\t\t\treturn array(\n\t\t\t\t\t'general' => array(\n\t\t\t\t\t\t'title' => esc_html__('General', 'goodlayers-core'),\n\t\t\t\t\t\t'options' => array(\n\t\t\t\t\t\t\t'image' => array(\n\t\t\t\t\t\t\t\t'title' => esc_html__('Image', 'goodlayers-core'),\n\t\t\t\t\t\t\t\t'type' => 'upload',\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t'thumbnail-size' => array(\n\t\t\t\t\t\t\t\t'title' => esc_html__('Thumbnail Size', 'goodlayers-core'),\n\t\t\t\t\t\t\t\t'type' => 'combobox',\n\t\t\t\t\t\t\t\t'options' => 'thumbnail-size',\n\t\t\t\t\t\t\t\t'default' => 'full'\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t'title' => array(\n\t\t\t\t\t\t\t\t'title' => esc_html__('Title', 'goodlayers-core'),\n\t\t\t\t\t\t\t\t'type' => 'text',\n\t\t\t\t\t\t\t\t'default' => esc_html__('Promo Box Item Title', 'goodlayers-core'),\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t'content' => array(\n\t\t\t\t\t\t\t\t'title' => esc_html__('Content', 'goodlayers-core'),\n\t\t\t\t\t\t\t\t'type' => 'tinymce',\n\t\t\t\t\t\t\t\t'default' => esc_html__('Promo box item sample content', 'goodlayers-core'),\n\t\t\t\t\t\t\t\t'wrapper-class' => 'gdlr-core-fullsize'\n\t\t\t\t\t\t\t),\t\n\t\t\t\t\t\t\t'text-align' => array(\n\t\t\t\t\t\t\t\t'title' => esc_html__('Text Align', 'goodlayers-core'),\n\t\t\t\t\t\t\t\t'type' => 'radioimage',\n\t\t\t\t\t\t\t\t'options' => 'text-align',\n\t\t\t\t\t\t\t\t'default' => 'center'\n\t\t\t\t\t\t\t),\t\t\t\t\t\n\t\t\t\t\t\t)\n\t\t\t\t\t),\n\t\t\t\t\t'frame' => array(\n\t\t\t\t\t\t'title' => esc_html__('Frame Style', 'goodlayers-core'),\n\t\t\t\t\t\t'options' => array(\n\t\t\t\t\t\t\t'enable-frame' => array(\n\t\t\t\t\t\t\t\t'title' => esc_html__('Enable Frame', 'goodlayers-core'),\n\t\t\t\t\t\t\t\t'type' => 'checkbox',\n\t\t\t\t\t\t\t\t'default' => 'enable'\n\t\t\t\t\t\t\t), \n\t\t\t\t\t\t\t'enable-shadow' => array(\n\t\t\t\t\t\t\t\t'title' => esc_html__('Enable Shadow', 'goodlayers-core'),\n\t\t\t\t\t\t\t\t'type' => 'checkbox',\n\t\t\t\t\t\t\t\t'default' => 'enable',\n\t\t\t\t\t\t\t\t'condition' => array( 'enable-frame' => 'enable' )\n\t\t\t\t\t\t\t), \n\t\t\t\t\t\t\t'frame-padding' => array(\n\t\t\t\t\t\t\t\t'title' => esc_html__('Frame Padding', 'goodlayers-core'),\n\t\t\t\t\t\t\t\t'type' => 'custom',\n\t\t\t\t\t\t\t\t'item-type' => 'padding',\n\t\t\t\t\t\t\t\t'data-input-type' => 'pixel',\n\t\t\t\t\t\t\t\t'default' => array( 'top'=>'30px', 'right'=>'30px', 'bottom'=>'10px', 'left'=>'30px', 'settings'=>'unlink' ),\n\t\t\t\t\t\t\t\t'condition' => array( 'enable-frame' => 'enable' )\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t'frame-background-color' => array(\n\t\t\t\t\t\t\t\t'title' => esc_html__('Frame Background Color', 'goodlayers-core'),\n\t\t\t\t\t\t\t\t'type' => 'colorpicker',\n\t\t\t\t\t\t\t\t'condition' => array( 'enable-frame' => 'enable' )\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t'frame-border-width' => array(\n\t\t\t\t\t\t\t\t'title' => esc_html__('Frame Border Width', 'goodlayers-core'),\n\t\t\t\t\t\t\t\t'type' => 'custom',\n\t\t\t\t\t\t\t\t'item-type' => 'padding',\n\t\t\t\t\t\t\t\t'data-input-type' => 'pixel',\n\t\t\t\t\t\t\t\t'default' => array( 'top'=>'0px', 'right'=>'1px', 'bottom'=>'1px', 'left'=>'1px', 'settings'=>'unlink' ),\n\t\t\t\t\t\t\t\t'condition' => array( 'enable-frame' => 'enable' )\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t'frame-border-color' => array(\n\t\t\t\t\t\t\t\t'title' => esc_html__('Frame Border Color', 'goodlayers-core'),\n\t\t\t\t\t\t\t\t'type' => 'colorpicker',\n\t\t\t\t\t\t\t\t'condition' => array( 'enable-frame' => 'enable' )\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'typography' => array(\n\t\t\t\t\t\t'title' => esc_html__('Typography', 'goodlayers-core'),\n\t\t\t\t\t\t'options' => array(\n\t\t\t\t\t\t\t'title-size' => array(\n\t\t\t\t\t\t\t\t'title' => esc_html__('Title Size', 'goodlayers-core'),\n\t\t\t\t\t\t\t\t'type' => 'fontslider',\n\t\t\t\t\t\t\t\t'default' => '14px'\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t'content-size' => array(\n\t\t\t\t\t\t\t\t'title' => esc_html__('Content Size', 'goodlayers-core'),\n\t\t\t\t\t\t\t\t'type' => 'fontslider',\n\t\t\t\t\t\t\t\t'default' => '14px'\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'color' => array(\n\t\t\t\t\t\t'title' => esc_html__('Color', 'goodlayers-core'),\n\t\t\t\t\t\t'options' => array(\n\t\t\t\t\t\t\t'title-color' => array(\n\t\t\t\t\t\t\t\t'title' => esc_html__('Title Color', 'goodlayers-core'),\n\t\t\t\t\t\t\t\t'type' => 'colorpicker'\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t'content-color' => array(\n\t\t\t\t\t\t\t\t'title' => esc_html__('Content Color', 'goodlayers-core'),\n\t\t\t\t\t\t\t\t'type' => 'colorpicker'\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'spacing' => array(\n\t\t\t\t\t\t'title' => esc_html__('Spacing', 'goodlayers-core'),\n\t\t\t\t\t\t'options' => array(\n\t\t\t\t\t\t\t'padding-bottom' => array(\n\t\t\t\t\t\t\t\t'title' => esc_html__('Padding Bottom ( Item )', 'goodlayers-core'),\n\t\t\t\t\t\t\t\t'type' => 'text',\n\t\t\t\t\t\t\t\t'data-input-type' => 'pixel',\n\t\t\t\t\t\t\t\t'default' => $gdlr_core_item_pdb\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}", "static function optionsIns();", "function display_acp_options(&$display_vars, $mode)\n\t\t{\n\t\t\tglobal $config, $user;\n\n\t\t\tif ($mode == 'features')\n\t\t\t{\n\t\t\t\t$user->add_lang('mods/prime_birthdate');\n\t\t\t\t$display_vars['vars']['allow_birthdays'] = array('lang' => 'ALLOW_BIRTHDAYS', 'validate' => 'int', 'type' => 'custom', 'function' => 'make_allow_birthdays_select', 'params' => array('{KEY}', '{CONFIG_VALUE}'), 'explain' => true);\n\t\t\t}\n\t\t\telse if ($mode == 'registration')\n\t\t\t{\n\t\t\t\t$user->add_lang('mods/prime_birthdate');\n\t\t\t\t$display_copy = $display_vars['vars'];\n\t\t\t\t$display_vars['vars'] = array();\n\t\t\t\tforeach ($display_copy as $key => $val)\n\t\t\t\t{\n\t\t\t\t\t$display_vars['vars'][$key] = $val;\n\t\t\t\t\tif ($key == 'chg_passforce')\t// Insert our option after this one\n\t\t\t\t\t{\n\t\t\t\t\t\t$display_vars['vars']['minimum_age'] = array('lang' => 'PRIME_BIRTHDATE_MIN','validate' => 'int',\t'type' => 'text:3:3', 'explain' => true, 'append' => ' ' . $user->lang['PRIME_BIRTHDATE_YEARS_OLD']);\n\t\t\t\t\t\t$display_vars['vars']['maximum_age'] = array('lang' => 'PRIME_BIRTHDATE_MAX','validate' => 'int',\t'type' => 'text:3:3', 'explain' => true, 'append' => ' ' . $user->lang['PRIME_BIRTHDATE_YEARS_OLD']);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}", "public function render_extra_editor_settings( $params = array() ) {\n\t\t$params['optin'] = empty( $params['optin'] ) ? ( isset( $_COOKIE['tve_api_mailchimp_optin'] ) ? sanitize_text_field( $_COOKIE['tve_api_mailchimp_optin'] ) : 'd' ) : $params['optin'];\n\t\tsetcookie( 'tve_api_mailchimp_optin', $params['optin'], strtotime( '+6 months' ), '/' );\n\t\t$groups = $this->_get_groups( $params );\n\t\t$params['groups'] = $groups;\n\t\t$this->output_controls_html( 'mailchimp/api-groups', $params );\n\t\t$this->output_controls_html( 'mailchimp/optin-type', $params );\n\t}", "public function get_stLight_options($data_options);", "public function getDegreeOptions() {\n\t\treturn array(\n \"master\" => \"Master's\",\n \"phd\" => \"Ph.D.\",\n );\n }", "public function render_settings_section() {\n\t\tprintf( __( 'Insert your %s license information to enable future updates (including bug fixes and new features) and gain access to support.', $this->text_domain ), $this->product_name );\n\t}", "function dynamic_section( $sections ) {\n //$sections = array();\n $sections[] = array(\n 'title' => __( 'Section via hook', 'slova' ),\n 'desc' => __( '<p class=\"description\">This is a section created by adding a filter to the sections array. Can be used by child themes to add/remove sections from the options.</p>', 'slova' ),\n 'icon' => 'el-icon-paper-clip',\n // Leave this as a blank section, no options just some intro text set above.\n 'fields' => array()\n );\n\n return $sections;\n }", "function add_options_packages() {\n $this->configure_propack();\n }", "public function newConfigurationOptions() {\n\n/*\n 'load' => array(\n 'type' => 'list',\n 'legacy' => 'phutil_libraries',\n 'help' => pht(\n 'A list of paths to phutil libraries that should be loaded at '.\n 'startup. This can be used to make classes available, like lint '.\n 'or unit test engines.'),\n 'default' => array(),\n 'example' => '[\"/var/arc/customlib/src\"]',\n ),\n 'editor' => array(\n 'type' => 'string',\n 'help' => pht(\n 'Command to use to invoke an interactive editor, like `%s` or `%s`. '.\n 'This setting overrides the %s environmental variable.',\n 'nano',\n 'vim',\n 'EDITOR'),\n 'example' => '\"nano\"',\n ),\n 'https.cabundle' => array(\n 'type' => 'string',\n 'help' => pht(\n \"Path to a custom CA bundle file to be used for arcanist's cURL \".\n \"calls. This is used primarily when your conduit endpoint is \".\n \"behind HTTPS signed by your organization's internal CA.\"),\n 'example' => 'support/yourca.pem',\n ),\n 'browser' => array(\n 'type' => 'string',\n 'help' => pht('Command to use to invoke a web browser.'),\n 'example' => '\"gnome-www-browser\"',\n ),\n*/\n\n\n\n return array(\n id(new ArcanistStringConfigOption())\n ->setKey('base')\n ->setSummary(pht('Ruleset for selecting commit ranges.'))\n ->setHelp(\n pht(\n 'Base commit ruleset to invoke when determining the start of a '.\n 'commit range. See \"Arcanist User Guide: Commit Ranges\" for '.\n 'details.'))\n ->setExamples(\n array(\n 'arc:amended, arc:prompt',\n )),\n id(new ArcanistStringConfigOption())\n ->setKey('repository')\n ->setAliases(\n array(\n 'repository.callsign',\n ))\n ->setSummary(pht('Repository for the current working copy.'))\n ->setHelp(\n pht(\n 'Associate the working copy with a specific Phabricator '.\n 'repository. Normally, Arcanist can figure this association '.\n 'out on its own, but if your setup is unusual you can use '.\n 'this option to tell it what the desired value is.'))\n ->setExamples(\n array(\n 'libexample',\n 'XYZ',\n 'R123',\n '123',\n )),\n id(new ArcanistStringConfigOption())\n ->setKey('phabricator.uri')\n ->setAliases(\n array(\n 'conduit_uri',\n 'default',\n ))\n ->setSummary(pht('Phabricator install to connect to.'))\n ->setHelp(\n pht(\n 'Associates this working copy with a specific installation of '.\n 'Phabricator.'))\n ->setExamples(\n array(\n 'https://phabricator.mycompany.com/',\n )),\n id(new ArcanistAliasesConfigOption())\n ->setKey(self::KEY_ALIASES)\n ->setDefaultValue(array())\n ->setSummary(pht('List of command aliases.'))\n ->setHelp(\n pht(\n 'Configured command aliases. Use the \"alias\" workflow to define '.\n 'aliases.')),\n id(new ArcanistPromptsConfigOption())\n ->setKey(self::KEY_PROMPTS)\n ->setDefaultValue(array())\n ->setSummary(pht('List of prompt responses.'))\n ->setHelp(\n pht(\n 'Configured prompt aliases. Use the \"prompts\" workflow to '.\n 'show prompts and responses.')),\n id(new ArcanistStringListConfigOption())\n ->setKey('arc.land.onto')\n ->setDefaultValue(array())\n ->setSummary(pht('Default list of \"onto\" refs for \"arc land\".'))\n ->setHelp(\n pht(\n 'Specifies the default behavior when \"arc land\" is run with '.\n 'no \"--onto\" flag.'))\n ->setExamples(\n array(\n '[\"master\"]',\n )),\n id(new ArcanistStringListConfigOption())\n ->setKey('pager')\n ->setDefaultValue(array())\n ->setSummary(pht('Default pager command.'))\n ->setHelp(\n pht(\n 'Specify the pager command to use when displaying '.\n 'documentation.'))\n ->setExamples(\n array(\n '[\"less\", \"-R\", \"--\"]',\n )),\n id(new ArcanistStringConfigOption())\n ->setKey('arc.land.onto-remote')\n ->setSummary(pht('Default list of \"onto\" remote for \"arc land\".'))\n ->setHelp(\n pht(\n 'Specifies the default behavior when \"arc land\" is run with '.\n 'no \"--onto-remote\" flag.'))\n ->setExamples(\n array(\n 'origin',\n )),\n id(new ArcanistStringConfigOption())\n ->setKey('arc.land.strategy')\n ->setSummary(\n pht(\n 'Configure a default merge strategy for \"arc land\".'))\n ->setHelp(\n pht(\n 'Specifies the default behavior when \"arc land\" is run with '.\n 'no \"--strategy\" flag.')),\n id(new ArcanistStringConfigOption())\n ->setKey('arc.land.notaccepted.message')\n ->setDefaultValue(\n pht(\n 'Rejected: You should never land revision without review. '.\n 'If you know what you are doing and still want to land, add a '.\n '`FORCE_LAND=<reason>` line to the revision summary and it will be audited.'))\n ->setSummary(\n pht(\n 'Error message when attempting to land a non-accepted revision.')),\n id(new ArcanistStringConfigOption())\n ->setKey('arc.land.buildfailures.message')\n ->setDefaultValue(\n pht(\n 'Rejected: You should not land revisions with failed or ongoing builds. '.\n 'If you know what you are doing and still want to land, add a '.\n '`ALLOW_FAILED_TESTS=<reason>` line to the revision summary and it will be audited.'))\n ->setSummary(\n pht(\n 'Error message when attempting to land a revision with failed builds.')),\n id(new ArcanistBoolConfigOption())\n ->setKey('phlq')\n ->setDefaultValue(false)\n ->setSummary(pht('PHLQ install to connect to.'))\n ->setHelp(\n pht(\n 'Use PHLQ to land changes')),\n id(new ArcanistBoolConfigOption())\n ->setKey('is.phlq')\n ->setDefaultValue(false)\n ->setSummary(pht('Internal use only'))\n ->setHelp(\n pht(\n 'Internal use only')),\n id(new ArcanistStringConfigOption())\n ->setKey('phlq.uri')\n ->setAliases(\n array(\n 'phlq_uri',\n ))\n ->setSummary(pht('PHLQ instance uri.'))\n ->setHelp(\n pht(\n 'Associates this working copy with a specific installation of '.\n 'PHLQ.'))\n ->setExamples(\n array(\n 'https://phlq/',\n )),\n id(new ArcanistStringListConfigOption())\n ->setKey('forceable.build.plan.phids')\n ->setDefaultValue(array())\n ->setAliases(\n array(\n 'forceable_build_plan_phids',\n ))\n ->setSummary(\n pht(\n 'List PHIDs of forceable build plans which can be landed with failing status with '.\n 'a `ALLOW_FAILED_TESTS=<reason>` line in revision summary and it will be audited.'))\n ->setExamples(\n array(\n [\"PHID-ABCD-abcdefghijklmnopqrst\"],\n )),\n id(new ArcanistStringListConfigOption())\n ->setKey('non-blocking.build.plan.phids')\n ->setDefaultValue(array())\n ->setAliases(\n array(\n 'non_blocking_build_plan_phids',\n ))\n ->setSummary(\n pht(\n 'List PHIDs of build plans which can be landed with failing '.\n 'status.'))\n ->setExamples(\n array(\n [\"PHID-ABCD-abcdefghijklmnopqrst\"],\n )),\n id(new ArcanistStringListConfigOption())\n ->setKey('lint.build.plan.phids')\n ->setDefaultValue(array())\n ->setAliases(\n array(\n 'lint_build_plan_phids',\n ))\n ->setSummary(\n pht(\n 'List PHIDs of lint build plans which can be landed with failing '.\n 'status.'))\n ->setExamples(\n array(\n [\"PHID-ABCD-abcdefghijklmnopqrst\"],\n )),\n id(new ArcanistStringConfigOption())\n ->setKey('arc.upgrade.message')\n ->setDefaultValue(\n pht('Arc is managed by your employer.'))\n ->setSummary(\n pht('Message shown when arc upgrade command is called.')),\n );\n }" ]
[ "0.6404264", "0.6239744", "0.6106067", "0.60672396", "0.6030728", "0.5939176", "0.59040016", "0.5818105", "0.5808966", "0.5767357", "0.5758752", "0.57332075", "0.5730719", "0.5720451", "0.5679177", "0.5654026", "0.564263", "0.56279683", "0.5627161", "0.5618195", "0.5609932", "0.55949557", "0.55894005", "0.55894005", "0.55894005", "0.55894005", "0.55894005", "0.55880535", "0.556026", "0.55477446", "0.5532156", "0.5524698", "0.5506226", "0.5491913", "0.5490794", "0.5477148", "0.54702175", "0.5468175", "0.5457257", "0.5453546", "0.5443923", "0.54301685", "0.541796", "0.53815067", "0.5380842", "0.536993", "0.53634566", "0.53611904", "0.53584546", "0.5351553", "0.53481853", "0.53428435", "0.53351355", "0.5328542", "0.53206915", "0.53198576", "0.531842", "0.5317142", "0.53131515", "0.5303075", "0.5301108", "0.53005326", "0.52879906", "0.5285235", "0.5284776", "0.5282011", "0.5280879", "0.52794164", "0.5277137", "0.52717805", "0.5269295", "0.5268157", "0.5267169", "0.52607125", "0.5260054", "0.5259883", "0.52561975", "0.52525336", "0.5251542", "0.52459884", "0.5239375", "0.5230075", "0.52277976", "0.5225858", "0.5219632", "0.5219632", "0.5219632", "0.52069104", "0.52063656", "0.52036375", "0.52023727", "0.52004445", "0.5191846", "0.5184117", "0.51835304", "0.518346", "0.5180061", "0.5179148", "0.51787645", "0.5168468" ]
0.6106719
2
This function is called after the course has been set on the page. We use this to include various JS, depending on the course page.
public function page_set_course(moodle_page $page) { parent::page_set_cm($page); $this->page_load_main_course_js(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function page_load_main_course_js() {\n global $PAGE, $COURSE, $CFG;\n \n //get page url - if not set then ignore it\n $url = $PAGE->has_set_url() ? $PAGE->url : \"\";\n\n //check if its the main course view page\n $regex_url = \"/\" . preg_quote($CFG->wwwroot . \"/course/view.php?id=\", \"/\") . \"[\\d]*\" . \"[\\d]*/\";\n $is_course_main = preg_match($regex_url, $url);\n\n //check if course mod_edit page\n $regex_editing_url = \"/\" . preg_quote($CFG->wwwroot . \"/course/edit.php?id=\", \"/\") . \"[\\d]*/\";\n $is_course_editing_main = preg_match($regex_editing_url, $url);\n \n //if either if main view or main edit\n if($is_course_main === 1 || $is_course_editing_main === 1) {\n \n //load jquery\n $this->cmf_load_jQuery();\n \n //dynamic colors\n $PAGE->requires->css('/course/format/course_menu/dynamic_colors.php?id=' . $COURSE->id);\n \n //if main page\n if($is_course_main === 1) {\n $context = context_course::instance($COURSE->id);//get context\n $is_editting = $PAGE->user_is_editing() and has_capability('moodle/course:update', $context);//is editing mode\n\n //if were not editing, then override display css (display only css)\n if (!$is_editting)\n $PAGE->requires->css('/course/format/course_menu/display_override.css');\n }\n \n //if editing\n if ($is_course_editing_main === 1) {\n $PAGE->requires->css('/course/format/course_menu/jquery/plugin/colorpicker/jquery.colorpicker.css');\n $PAGE->requires->js('/course/format/course_menu/jquery/plugin/colorpicker/jquery.colorpicker.js');\n $PAGE->requires->js('/course/format/course_menu/init.js');\n } \n \n }\n \n \n }", "public function after_footer_scripts_code () {\n // Sets initial JS variables value\n ?>\n <script type=\"text/javascript\">\n ct_current_role = '<?php echo $this->role; ?>';\n ct_current_orderby = '<?php echo $this->orderby; ?>';\n ct_current_order = '<?php echo $this->order; ?>';\n ct_current_page = <?php echo $this->page; ?>;\n ct_total_pages = <?php echo $this->total_pages; ?>;\n </script>\n <?php\n }", "public function frontpage_available_courses() {\n\n global $CFG , $DB;\n $coursecontainer = '';\n $chelper = new coursecat_helper();\n $chelper->set_show_courses(self::COURSECAT_SHOW_COURSES_EXPANDED)->set_courses_display_options( array(\n 'recursive' => true,\n 'limit' => $CFG->frontpagecourselimit,\n 'viewmoreurl' => new moodle_url('/course/index.php'),\n 'viewmoretext' => new lang_string('fulllistofcourses')\n ));\n\n $chelper->set_attributes( array( 'class' => 'frontpage-course-list-all frontpageblock-theme' ) );\n\n $courses = core_course_category::get(0)->get_courses( $chelper->get_courses_display_options() );\n\n $totalcount = core_course_category::get(0)->get_courses_count( $chelper->get_courses_display_options() );\n\n $rcourseids = array_keys( $courses );\n\n //$acourseids = array_chunk( $rcourseids, 6);\n $acourseids = $rcourseids;\n $tcount = count($acourseids);\n\n $newcourse = get_string( 'availablecourses' );\n $header = \"\";\n $header .= html_writer::tag('div', \"<div></div>\", array('class' => 'bgtrans-overlay'));\n\n $header .= html_writer::start_tag('div',\n array( 'class' => 'available-courses', 'id' => 'available-courses') );\n $header .= html_writer::start_tag('div', array( 'class' => 'available-overlay' ) );\n $header .= html_writer::start_tag('div', array( 'class' => 'available-block' ) );\n $header .= html_writer::start_tag('div', array('class' => 'container'));\n $header .= html_writer::tag('h2', get_string('availablecourses'));\n\n /* if ($tcount > '1') {\n $header .= html_writer::start_tag('div', array('class' => 'pagenav slider-nav') );\n $header .= html_writer::tag('button', '', array('class' => 'slick-prev nav-item previous', 'type' => 'button') );\n $header .= html_writer::tag('button', '', array('class' => 'slick-next nav-item next', 'type' => 'button') );\n $header .= html_writer::tag('div', '', array('class' => 'clearfix') );\n $header .= html_writer::end_tag('div');\n }*/\n $sliderclass = 'course-slider';\n $header .= html_writer::start_tag('div', array('class' => 'row') );\n $header .= html_writer::start_tag('div', array( 'class' => \" $sliderclass col-md-12\") );\n\n $footer = html_writer::end_tag('div');\n $footer .= html_writer::end_tag('div');\n $footer .= html_writer::end_tag('div');\n $footer .= html_writer::end_tag('div');\n if (count($rcourseids) > 0) {\n $i = '0';\n /* foreach ($acourseids as $courseids) {\n\n $rowcontent = '<div class=\"slider-row \">';*/\n $rowcontent = '';\n foreach ($acourseids as $courseid) {\n $container = '';\n $course = get_course($courseid);\n $noimgurl = $this->output->image_url('no-image', 'theme');\n $courseurl = new moodle_url('/course/view.php', array('id' => $courseid ));\n\n if ($course instanceof stdClass) {\n $course = new core_course_list_element($course);\n }\n\n $imgurl = '';\n $context = context_course::instance($course->id);\n\n foreach ($course->get_course_overviewfiles() as $file) {\n $isimage = $file->is_valid_image();\n $imgurl = file_encode_url(\"$CFG->wwwroot/pluginfile.php\",\n '/'. $file->get_contextid(). '/'. $file->get_component(). '/'.\n $file->get_filearea(). $file->get_filepath(). $file->get_filename(), !$isimage);\n if (!$isimage) {\n $imgurl = $noimgurl;\n }\n }\n\n if (empty($imgurl)) {\n $imgurl = $noimgurl;\n }\n\n $container .= html_writer::start_tag('div', array( 'class' => 'col-md-2') );\n $container .= html_writer::start_tag('div', array( 'class' => 'available-content'));\n $container .= html_writer::start_tag('div', array( 'class' => 'available-img'));\n\n $container .= html_writer::start_tag('a', array( 'href' => $courseurl) );\n $container .= html_writer::empty_tag('img',\n array(\n 'src' => $imgurl,\n 'width' => \"249\",\n 'height' => \"200\",\n 'alt' => $course->get_formatted_name() ) );\n $container .= html_writer::end_tag('a');\n $container .= html_writer::end_tag('div');\n $container .= html_writer::tag('h6', html_writer::tag('a',\n $course->get_formatted_name(),\n array( 'href' => $courseurl ) ),\n array('class' => 'title-text') );\n $container .= html_writer::end_tag('div');\n $container .= html_writer::end_tag('div');\n\n $rowcontent .= $container;\n }\n $i++;\n /*$rowcontent .= html_writer::end_tag('div');*/\n $coursecontainer .= $rowcontent;\n // }\n\n }\n $footer .= html_writer::end_tag('div');\n $footer .= html_writer::end_tag('div');\n $coursehtml = $header.$coursecontainer.$footer;\n return $coursehtml;\n\n if (!$totalcount && !$this->page->user_is_editing() && has_capability('moodle/course:create', context_system::instance())) {\n // Print link to create a new course, for the 1st available category.\n echo $this->add_new_course_button();\n }\n }", "public function onAfterInit() {\n\t\t// the admin section to 'grow' over time. We only need the css and js\n\t\t// for login, reset, logout and so on.\n\t\tif(!$this->owner->getRequest()->isAjax()) {\n\t\t\tDNRoot::include_requirements();\n\t\t}\n\t}", "public function show_shortcodes_section_footer_extra() {\n\t\t\t?>\n\t\t\t<script>\n\t\t\t\tjQuery( function() {\n\t\t\t\t\tif ( jQuery( 'form#learndash_shortcodes_form_ld_certificate select#ld_certificate_display_type' ).length) {\n\t\t\t\t\t\tjQuery( 'form#learndash_shortcodes_form_ld_certificate select#ld_certificate_display_type').on( 'change', function() {\n\t\t\t\t\t\t\tvar selected = jQuery(this).val();\n\n\t\t\t\t\t\t\tif ( selected == 'sfwd-courses' ) {\n\t\t\t\t\t\t\t\tjQuery( 'form#learndash_shortcodes_form_ld_certificate #ld_certificate_group_id_field').hide();\n\t\t\t\t\t\t\t\tjQuery( 'form#learndash_shortcodes_form_ld_certificate input#ld_certificate_group_id').val('');\n\t\t\t\t\t\t\t\tif ( jQuery( 'form#learndash_shortcodes_form_ld_certificate #ld_certificate_group_id_field').hasClass('learndash-settings-input-required') ) {\n\t\t\t\t\t\t\t\t\tjQuery( 'form#learndash_shortcodes_form_ld_certificate input#ld_certificate_group_id').attr('required', false);\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\tjQuery( 'form#learndash_shortcodes_form_ld_certificate #ld_certificate_quiz_id_field').hide();\n\t\t\t\t\t\t\t\tjQuery( 'form#learndash_shortcodes_form_ld_certificate input#ld_certificate_quiz_id').val('');\n\t\t\t\t\t\t\t\tif ( jQuery( 'form#learndash_shortcodes_form_ld_certificate #ld_certificate_quiz_id_field').hasClass('learndash-settings-input-required') ) {\n\t\t\t\t\t\t\t\t\tjQuery( 'form#learndash_shortcodes_form_ld_certificate input#ld_certificate_quiz_id').attr('required', false);\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\tjQuery( 'form#learndash_shortcodes_form_ld_certificate #ld_certificate_course_id_field span.learndash_required_field').show();\n\t\t\t\t\t\t\t\tjQuery( 'form#learndash_shortcodes_form_ld_certificate #ld_certificate_course_id_field').slideDown();\n\t\t\t\t\t\t\t\tif ( jQuery( 'form#learndash_shortcodes_form_ld_certificate #ld_certificate_course_id_field').hasClass('learndash-settings-input-required') ) {\n\t\t\t\t\t\t\t\t\tjQuery( 'form#learndash_shortcodes_form_ld_certificate input#ld_certificate_course_id').attr('required', 'required');\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t} else if ( selected == 'groups' ) {\n\t\t\t\t\t\t\t\tjQuery( 'form#learndash_shortcodes_form_ld_certificate #ld_certificate_course_id_field').hide();\n\t\t\t\t\t\t\t\tjQuery( 'form#learndash_shortcodes_form_ld_certificate input#ld_certificate_course_id').val('');\n\t\t\t\t\t\t\t\tif ( jQuery( 'form#learndash_shortcodes_form_ld_certificate #ld_certificate_course_id_field').hasClass('learndash-settings-input-required') ) {\n\t\t\t\t\t\t\t\t\tjQuery( 'form#learndash_shortcodes_form_ld_certificate input#ld_certificate_course_id').attr('required', false);\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\tjQuery( 'form#learndash_shortcodes_form_ld_certificate #ld_certificate_quiz_id_field').hide();\n\t\t\t\t\t\t\t\tjQuery( 'form#learndash_shortcodes_form_ld_certificate input#ld_certificate_quiz_id').val('');\n\t\t\t\t\t\t\t\tif ( jQuery( 'form#learndash_shortcodes_form_ld_certificate #ld_certificate_quiz_id_field').hasClass('learndash-settings-input-required') ) {\n\t\t\t\t\t\t\t\t\tjQuery( 'form#learndash_shortcodes_form_ld_certificate input#ld_certificate_quiz_id').attr('required', false);\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\tjQuery( 'form#learndash_shortcodes_form_ld_certificate #ld_certificate_group_id_field').slideDown();\n\t\t\t\t\t\t\t\tif ( jQuery( 'form#learndash_shortcodes_form_ld_certificate #ld_certificate_group_id_field').hasClass('learndash-settings-input-required') ) {\n\t\t\t\t\t\t\t\t\tjQuery( 'form#learndash_shortcodes_form_ld_certificate input#ld_certificate_group_id').attr('required', 'required');\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t} else if ( selected == 'sfwd-quiz' ) {\n\t\t\t\t\t\t\t\tjQuery( 'form#learndash_shortcodes_form_ld_certificate #ld_certificate_group_id_field').hide();\n\t\t\t\t\t\t\t\tjQuery( 'form#learndash_shortcodes_form_ld_certificate input#ld_certificate_group_id').val('');\n\t\t\t\t\t\t\t\tif ( jQuery( 'form#learndash_shortcodes_form_ld_certificate #ld_certificate_group_id_field').hasClass('learndash-settings-input-required') ) {\n\t\t\t\t\t\t\t\t\tjQuery( 'form#learndash_shortcodes_form_ld_certificate input#ld_certificate_group_id').attr('required', false);\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\tjQuery( 'form#learndash_shortcodes_form_ld_certificate #ld_certificate_course_id_field').slideDown();\n\t\t\t\t\t\t\t\t// When the quiz cert is selected we explicitly set the course_id as not required.\n\t\t\t\t\t\t\t\tjQuery( 'form#learndash_shortcodes_form_ld_certificate input#ld_certificate_course_id').attr('required', false);\n\n\t\t\t\t\t\t\t\tjQuery( 'form#learndash_shortcodes_form_ld_certificate #ld_certificate_course_id_field span.learndash_required_field').hide();\n\n\t\t\t\t\t\t\t\tjQuery( 'form#learndash_shortcodes_form_ld_certificate #ld_certificate_quiz_id_field').slideDown();\n\t\t\t\t\t\t\t\tif ( jQuery( 'form#learndash_shortcodes_form_ld_certificate #ld_certificate_quiz_id_field').hasClass('learndash-settings-input-required') ) {\n\t\t\t\t\t\t\t\t\tjQuery( 'form#learndash_shortcodes_form_ld_certificate input#ld_certificate_quiz_id').attr('required', 'required');\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\tjQuery( 'form#learndash_shortcodes_form_ld_certificate #ld_certificate_course_id_field').hide();\n\t\t\t\t\t\t\t\tjQuery( 'form#learndash_shortcodes_form_ld_certificate input#ld_certificate_course_id').val('');\n\t\t\t\t\t\t\t\tif ( jQuery( 'form#learndash_shortcodes_form_ld_certificate #ld_certificate_course_id_field').hasClass('learndash-settings-input-required') ) {\n\t\t\t\t\t\t\t\t\tjQuery( 'form#learndash_shortcodes_form_ld_certificate input#ld_certificate_course_id').attr('required', false);\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\tjQuery( 'form#learndash_shortcodes_form_ld_certificate #ld_certificate_group_id_field').hide();\n\t\t\t\t\t\t\t\tjQuery( 'form#learndash_shortcodes_form_ld_certificate input#ld_certificate_group_id').val('');\n\t\t\t\t\t\t\t\tif ( jQuery( 'form#learndash_shortcodes_form_ld_certificate #ld_certificate_group_id_field').hasClass('learndash-settings-input-required') ) {\n\t\t\t\t\t\t\t\t\tjQuery( 'form#learndash_shortcodes_form_ld_certificate input#ld_certificate_group_id').attr('required', false);\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\tjQuery( 'form#learndash_shortcodes_form_ld_certificate #ld_certificate_quiz_id_field').hide();\n\t\t\t\t\t\t\t\tjQuery( 'form#learndash_shortcodes_form_ld_certificate input#ld_certificate_quiz_id').val('');\n\t\t\t\t\t\t\t\tif ( jQuery( 'form#learndash_shortcodes_form_ld_certificate #ld_certificate_quiz_id_field').hasClass('learndash-settings-input-required') ) {\n\t\t\t\t\t\t\t\t\tjQuery( 'form#learndash_shortcodes_form_ld_certificate input#ld_certificate_quiz_id').attr('required', false);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t});\n\t\t\t\t\t\tjQuery( 'form#learndash_shortcodes_form_ld_certificate select#ld_certificate_display_type').change();\n\t\t\t\t\t}\n\n\t\t\t\t\tif ( jQuery( 'form#learndash_shortcodes_form_ld_certificate select#ld_certificate_display_as' ).length) {\n\t\t\t\t\t\tjQuery( 'form#learndash_shortcodes_form_ld_certificate select#ld_certificate_display_as').on( 'change', function() {\n\t\t\t\t\t\t\tvar selected = jQuery(this).val();\n\n\t\t\t\t\t\t\tif ( selected == 'banner' ) {\n\t\t\t\t\t\t\t\tjQuery( 'form#learndash_shortcodes_form_ld_certificate #ld_certificate_label_field').hide();\n\t\t\t\t\t\t\t\tjQuery( 'form#learndash_shortcodes_form_ld_certificate #ld_certificate_class_field').hide();\n\t\t\t\t\t\t\t\tjQuery( 'form#learndash_shortcodes_form_ld_certificate #ld_certificate_context_field').hide();\n\t\t\t\t\t\t\t\tjQuery( 'form#learndash_shortcodes_form_ld_certificate #ld_certificate_callback_field').hide();\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tjQuery( 'form#learndash_shortcodes_form_ld_certificate #ld_certificate_label_field').slideDown();\n\t\t\t\t\t\t\t\tjQuery( 'form#learndash_shortcodes_form_ld_certificate #ld_certificate_class_field').slideDown();\n\t\t\t\t\t\t\t\tjQuery( 'form#learndash_shortcodes_form_ld_certificate #ld_certificate_context_field').slideDown();\n\t\t\t\t\t\t\t\tjQuery( 'form#learndash_shortcodes_form_ld_certificate #ld_certificate_callback_field').slideDown();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t});\n\t\t\t\t\t\tjQuery( 'form#learndash_shortcodes_form_ld_certificate select#ld_certificate_display_as').change();\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t</script>\n\t\t\t<?php\n\t\t}", "public function onAfterInit()\n {\n if ($this->includeCookiePolicyNotification) {\n $cookiepolicyjssnippet = new ArrayData([\n 'CookiePolicyButtonTitle' => $this->siteConfig->CookiePolicyButtonTitle,\n 'CookiePolicyDeclineButtonTitle' => $this->siteConfig->CookiePolicyDeclineButtonTitle,\n 'CookiePolicyDescription' => $this->siteConfig->CookiePolicyDescription,\n 'CookiePolicyPosition' => $this->siteConfig->CookiePolicyPosition,\n ]);\n\n if ($this->siteConfig->CookiePolicyIncludeJquery) {\n Requirements::javascript(THIRDPARTY_DIR.'/jquery/jquery.js');\n }\n\n // Cannot use javascriptTemplate(), as RAW2JS breaks json data...\n Requirements::customScript($cookiepolicyjssnippet->renderWith('CookiePolicyJSSnippet', [\n 'config' => $this->getSnippetConfigudationValues()\n ]));\n\n // Reset functionality\n Requirements::customScript(\"\n var links = document.getElementsByTagName('a');\n for(var i = 0; i< links.length; i++){\n if (links[i].href.split('#resetcookies').length > 1) {\n links[i].addEventListener('click', function(event){\n event.preventDefault();\n document.cookie = 'cookie_policy=; path=/; Max-Age=-99999999;';\n window.location.reload(); \n }); \n }\n }\n \");\n\n // inject GTM when enabled.\n $this->includeGTM();\n }\n }", "public function frontpage_my_courses() {\n\n global $USER, $CFG, $DB;\n $content = html_writer::start_tag('div', array('class' => 'frontpage-enrolled-courses') );\n $content .= html_writer::start_tag('div', array('class' => 'container'));\n $content .= html_writer::tag('h2', get_string('mycourses'));\n $coursehtml = parent::frontpage_my_courses();\n if ($coursehtml == '') {\n\n $coursehtml = \"<div id='mycourses'><style> #frontpage-course-list.frontpage-mycourse-list { display:none;}\";\n $coursehtml .= \"</style></div>\";\n }\n $content .= $coursehtml;\n $content .= html_writer::end_tag('div');\n $content .= html_writer::end_tag('div');\n\n return $content;\n }", "public function onBeforeCompileHead() {\n\t\t$document = JFactory::getDocument();\n\t\t$headData = $document->getHeadData();\n\t\t$scripts = &$headData['scripts'];\n\n\t\t// удалить скрипт из массива в админке\n\t\tunset($scripts['/media/k2/assets/js/k2.frontend.js?v=2.8.0&amp;sitepath=/']);\n\t\t$headData['scripts'] = $scripts;\n\t\t$document->setHeadData($headData);\n\n // Проверить это это страницы админки\n $app = JFactory::getApplication();\n if ($app->isSite()) {\n return;\n }\n\n $document = JFactory::getDocument();\n\n // подключить скрипт для сортировки\n $document->addScript(JUri::root().'plugins/system/newwallet_sort/js/sort.js' );\n\t}", "public function frontpage_available_courses() {\n global $CFG, $DB;\n\n $chelper = new coursecat_helper();\n $chelper->set_show_courses(self::COURSECAT_SHOW_COURSES_EXPANDED)->set_courses_display_options(array(\n 'recursive' => true,\n 'limit' => $CFG->frontpagecourselimit,\n 'viewmoreurl' => new moodle_url('/course/index.php'),\n 'viewmoretext' => new lang_string('fulllistofcourses')));\n\n $chelper->set_attributes(array('class' => 'frontpage-course-list-all'));\n $courses = core_course_category::get(0)->get_courses($chelper->get_courses_display_options());\n $totalcount = core_course_category::get(0)->get_courses_count($chelper->get_courses_display_options());\n if (!$totalcount &&\n !$this->page->user_is_editing() &&\n has_capability('moodle/course:create', \\context_system::instance())\n ) {\n // Print link to create a new course, for the 1st available category.\n return $this->add_new_course_button();\n }\n $latestcard = get_config('theme_remui', 'enablenewcoursecards');\n $coursehtml = '<div class=\"\">\n <div class=\"card-deck slick-course-slider slick-slider ' . ($latestcard ? 'latest-cards' : '') . '\">';\n\n if (!empty($courses)) {\n foreach ($courses as $course) {\n $coursesummary = strip_tags($chelper->get_course_formatted_summary(\n $course,\n array('overflowdiv' => false, 'noclean' => false, 'para' => false)\n ));\n $coursesummary = strlen($coursesummary) > 100 ? substr($coursesummary, 0, 100).\"...\" : $coursesummary;\n $image = \\theme_remui_coursehandler::get_course_image($course, 1);\n $coursename = strip_tags($chelper->get_course_formatted_name($course));\n if (!$latestcard) {\n $coursehtml .= \"\n <div class='card w-100 rounded-bottom mx-0 bg-transparent d-inline-flex flex-column' style='height: 100%;'>\n <div class='m-2 bg-white border' style='height: 100%;'>\n <div\n class='rounded-top'\n style='height: 200px;\n background-image: url({$image});\n background-size: cover;\n background-position: center;\n box-shadow: 0 2px 5px #cccccc;'>\n </div>\n <div class='card-body p-3'>\n <h4 class='card-title m-1 ellipsis ellipsis-2'>\n <a\n href='{$CFG->wwwroot}/course/view.php?id={$course->id}'\n class='font-weight-400 blue-grey-600 font-size-18'>\n {$coursename}\n </a>\n </h4>\n <p class='card-text m-1'>{$coursesummary}</p>\n </div>\n </div>\n </div>\";\n } else {\n if (isset($course->startdate)) {\n $startdate = date('d M, Y', $course->startdate);\n $day = substr($startdate, 0, 2);\n $month = substr($startdate, 3, 3);\n $year = substr($startdate, 8, 4);\n }\n $categoryname = $DB->get_record('course_categories', array('id' => $course->category))->name;\n $categoryname = strip_tags(format_text($categoryname));\n $coursehtml .= \"\n <div class='px-1 course_card card '>\n <div class='wrapper h-100'\n style='background-image: url({$image});\n background-size: cover;\n background-position: center;\n position: relative;'>\n <div class='date btn-primary'>\n <span class='day'>{$day}</span>\n <span class='month'>{$month}</span>\n <span class='year'>{$year}</span>\n </div>\n <div class='data'>\n <div class='content' title='{$coursename}'>\n <span class='author'>{$categoryname}</span>\n <h4 class='title ellipsis ellipsis-3' style='-webkit-box-orient: vertical;visibility: visible;'>\n <a href='{$CFG->wwwroot}/course/view.php?id={$course->id}'>{$coursename}</a>\n </h4>\n <p class='text'>{$coursesummary}</p>\n </div>\n </div>\n </div>\n </div>\";\n }\n }\n }\n\n $coursehtml .= '</div></div>';\n\n $coursehtml .= \" <div class='available-courses button-container w-100 text-center '>\n <button type='button' class='btn btn-floating btn-primary btn-prev btn-sm'>\n <i class='icon fa fa-chevron-left' aria-hidden='true'></i>\n </button>\n <button type='button' class='btn btn-floating btn-primary btn-next btn-sm'>\n <i class='icon fa fa-chevron-right' aria-hidden='true'></i>\n </button>\n </div>\";\n\n $coursehtml .= \"\n <div class='row'>\n <div class='col-12 text-right'>\n <a href='{$CFG->wwwroot}/course' class='btn btn-primary'>\" . get_string('viewallcourses', 'core').\"</a>\n </div>\n </div>\";\n\n return $coursehtml;\n }", "protected function loadJavascript() {}", "public function template_footer() {\n\t\tget_footer( 'course' );\n\t}", "private function initJS(){\r\n\t\t$canEdit;\r\n\t\t$context = get_context_instance(CONTEXT_COURSE, $this->courseId);\r\n\t\tif (has_capability('moodle/course:manageactivities', $context)) {\r\n\t\t\t$canEdit = 'true';\r\n\t\t}else{\r\n\t\t\t$canEdit = 'false';\r\n\t\t}\t\t\r\n\t\t$markup='<div id=\"mashup-content\"></div>';\r\n\t\t// call the js handlers\r\n\t\t$markup.='\r\n\t\t<script>\r\n\t\t\t$(function(){ //DOM Ready\r\n\t\t\t\tmashup_properties.canEdit='.$canEdit.';\r\n\t\t\t\tmashup_properties.courseId='.$this->courseId.';\r\n\t\t\t\tMashupEngine.init(mashup_properties);\r\n\t\t\t});\r\n\t\t</script>\r\n\t\t'.PHP_EOL; \r\n\t\t\r\n\t\treturn $markup;\t\t\r\n\t}", "public function finalize()\n {\n $javaScript = $this->onDocumentReady();\n if ($javaScript) {\n WebPage::singleton()->addJavaScript($javaScript, null, true);\n }\n }", "function courses(){\n\t\t\t$this->load->view('admin/header');\n\t\t\t$this->load->view('admin/courses');\n\t\t\t$this->load->view('admin/footer');\n\t\t}", "protected function _prepareLayout()\n {\n $section = $this->getAction()->getRequest()->getParam('section', false);\n if ($section == 'paynovapayment') {\n $this->getLayout()\n ->getBlock('head')\n ->addJs('mage/adminhtml/paynovapayment.js');\n }\n parent::_prepareLayout();\n }", "public static function take_course() {\r\n\t\t\t$payment_method = !empty( $_POST['payment_method'] ) ? $_POST['payment_method'] : '';\r\n\t\t\t$course_id = !empty( $_POST['course_id'] ) ? intval( $_POST['course_id'] ) : false;\r\n\t\t\tdo_action( 'learn_press_take_course', $course_id, $payment_method );\r\n\t\t}", "protected function setupPage() {}", "public function initCursedPage() {\n parent::setMedia();\n parent::initHeader();\n parent::initContent();\n parent::initFooter();\n parent::display();\n die();\n }", "function email_choose_course($courseid) {\n\n\tglobal $USER;\n\n\t// Get my courses\n\t$mycourses = get_my_courses($USER->id);\n\n\t$courses = array();\n\t// Prepare array\n\tforeach ( $mycourses as $mycourse ) {\n\t\t$courses[$mycourse->id] = $mycourse->fullname;\n\t}\n\n\t// Load participants. This functions avoid selected users from diferents courses. Only select users of one course\n\t$javascript = '<script type=\"text/javascript\" language=\"JavaScript\">\n <!--\n function loadParticipants(f) {\n \t\tvar www = \"participants.php?id=\"+f.value;\n \t\twindow.location.href = www;\n }\n -->\n </script>';\n\n\t// Print javascript\n echo $javascript;\n\n\t// Print choose menu of my courses.\n\tchoose_from_menu ($courses, 'choose_course', $courseid, 'choose', 'loadParticipants(this);');\n\n}", "public function __construct() {\n\t\t$this->templates = array();\n\n\t\t$this->course_types = array(\n\t\t\t'Enrichment' => __('Enrichment', 'academic'),\n\t\t\t'Arts' => __('Arts', 'academic'),\n\t\t\t'Languages' => __('Languages', 'academic'),\n\t\t\t'English' => __('English', 'academic'),\n\t\t\t'Hebrew' => __('Hebrew', 'academic'),\n\t\t\t'Physical-Education' => __('Physical-Education', 'academic'),\n\t\t\t'CALL-LAB' => __('CALL-LAB', 'academic')\n\t\t);\n\n\t\t$this->course_semesters = array(\n\t\t\t'winter' => __('Winter', 'academic'),\n\t\t\t'spring' => __('Spring', 'academic'),\n\t\t\t'summer' => __('Summer', 'academic'),\n\t\t);\n\n\t\t// Add a filter to the attributes metabox to inject template into the cache.\n\t\tif ( version_compare( floatval( get_bloginfo( 'version' ) ), '4.7', '<' ) ) {\n\t\t\t// 4.6 and older\n\t\t\tadd_filter(\n\t\t\t\t'page_attributes_dropdown_pages_args',\n\t\t\t\tarray( $this, 'register_course_templates' )\n\t\t\t);\n\t\t} else {\n\t\t\t// Add a filter to the wp 4.7 version attributes metabox\n\t\t\tadd_filter(\n\t\t\t\t'theme_page_templates', array( $this, 'add_new_template' )\n\t\t\t);\n\t\t}\n\t\t// Add a filter to the save post to inject out template into the page cache\n\t\tadd_filter(\n\t\t\t'wp_insert_post_data', \n\t\t\tarray( $this, 'register_course_templates' ) \n\t\t);\n\t\t// Add a filter to the template include to determine if the page has our \n\t\t// template assigned and return it's path\n\t\tadd_filter(\n\t\t\t'template_include', \n\t\t\tarray( $this, 'view_course_template') \n\t\t);\n\t\t// Add your templates to this array.\n\t\t$this->templates = array(\n\t\t\t'academic-custom-courses.php' => 'Custom courses (from plugin)',\n\t\t);\n\n\t\tadd_action( 'wp_enqueue_scripts', array($this ,'add_scripts_and_styles') );\n\t\tadd_action( 'init', array($this ,'faculty_course_custom_posttypes') );\n\t\tadd_action( 'init', array($this, 'faculty_course_custom_taxonomies') );\n\t\tadd_action( 'cmb2_admin_init', array($this, 'fatfish_register_course_metabox') );\n\t\tadd_action( 'cmb2_admin_init', array($this, 'register_course_template_metabox') );\n\t\tadd_filter( 'template_include', array($this, 'include_template_courses'), 1 );\n\n\t\tregister_activation_hook( __FILE__, array('CoursePostType', 'course_rewrite_flush') );\n\t}", "public function lecture_page(){\n\t\tglobal $wpdb;\n\t\t$page_base = $this->page_url();\n\t\t// query_posts(array( \n\t\t// 'post_type' => 'assignment',\n\t\t// 'course_assigned' => 562,\n\t\t// 'showposts' => 10,\n\t\t// 'orderby' => 'title',\n\t\t// 'order' => 'ASC'\n\t\t// ) );\n\t\tob_start();\n\t\t?>\n\t\t<div class=\"wp_lms wrap settings\">\n\t\t\t<h1>Lectures</h1>\n\t\t\t<h2>\n\t\t\t<a href=\"http://grand/wp-admin/post-new.php?post_type=assignment&amp;course=568\" class=\"add-new-h2\">Add Assignment</a>\n\t\t\t</h2>\n \t\t\t<? wp_lms_html_gen::form_open(array(\"post_type\" => \"assignment\", \"_course\" => \"566\", \"showposts\" => \"10\"), $page_base ) ?>\n \t\t\t<h2>Pages</h2>\n\t\t\t<?\n\t\t\tforeach( $this->menu_pages as $k => $v ) {\n\t\t\t?>\n\t\t\t\t<p><?= $k; ?> <?= $v; ?></p>\n\t\t\t<?\n\t\t\t}\n\t\t\t$class_num = \"568\";\n\t\t\t$instructor_num = \"Douglas Brull\";\n\t\t\t$the_post_type = 'lecture';\n\t\t\t$the_course_term = \"course_nu\";\n\t\t\t$the_instructor_term = \"instructor_name\";\n\t\t\t$args = array(\n\t\t\t\t'sort_column' => 'menu_order',\n\t\t\t\t'post_type' => $the_post_type,\n\t\t\t\t\"course_nu\" => $class_num,\n\t\t\t\t'instructor_name' => $instructor_num,\n\t\t\t\t'post_status' => 'publish'\n\t\t\t);\n\t\t\t$pages = get_pages( $args );\n\t\t\t$page_query = new WP_Query();\n\t\t\t$all_pages = $page_query->query( array( 'post_type' => $the_post_type, 'post_status' => 'publish', 'posts_per_page' => -1 ) );\n\t\t\t$parent_count = 0;\n\t\t\tforeach( $pages as $k => $p ){ \n\t\t\t\tif( $p->post_parent == 0 && has_term( $class_num, $the_course_term, $p->ID ) && has_term( $instructor_num, $the_instructor_term, $p->ID ) ) {\n\t\t\t\t\t$parent_count++;\n\t\t\t\t\t$page_children = get_page_children( $p->ID, $all_pages );\n\t\t\t\t\t$hasChildren = \"\";\n\t\t\t\t\tif( !empty( $page_children ) ) {\n\t\t\t\t\t\t$hasChildren = \" children\";\n\t\t\t\t\t\t$parentName = $p->post_name;\n\t\t\t\t\t\tusort( $page_children, array($this, 'sort_menu_order') );\n\t\t\t\t\t\t?>\n\t\t\t\t\t\t<h1><?= $parentName; ?></h1>\n\t\t\t\t\t\t<?php\n\t\t\t\t\t\tforeach( $page_children as $key => $val ) {\n\t\t\t\t\t\t\t?>\n\t\t\t\t\t\t\t<h2><?= $val->post_title; ?></h2>\n\t\t\t\t\t\t\t<?php\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\t\t\t\t\telse if( empty($page_children ) ) {\n\t\t\t\t\t\t$parentName = $p->post_name;\n\t\t\t\t\t\t?>\n\t\t\t\t\t\t<h1><?= $parentName; ?></h1>\n\t\t\t\t\t\t<?php\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t}\n\t\t\t?>\n\t\t</div>\n\t\t<?\n\t\tob_end_flush();\n\t}", "public function onAfterInit()\n {\n if (($this->CookieConsentIsInXHRMode() && Config::inst()->get(CookieConsent::class, 'include_css')) || !($this->owner instanceof Security) && Config::inst()->get(CookieConsent::class, 'include_css') && !CookieConsent::check()) {\n $module = ModuleLoader::getModule('bramdeleeuw/cookieconsent');\n Requirements::css($module->getResource('css/cookieconsent.css')->getRelativePath());\n }\n }", "protected function _getEndJs()\n\t{\n\t\t$js = parent::_getEndJs();\n\t\t$js .= \"pageJs.setPreData(\" . json_encode(array()) . \");\";\n\t\t$js .= \"pageJs._containerIds=\" . json_encode(array(\n\t\t\t\t'title' => 'title_div'\n\t\t\t\t,'authorName' => 'authorName_div'\n\t\t\t\t,'author' => 'author_div'\n\t\t\t\t,'content' => 'content_div'\n\t\t\t\t,'topicsUnits' => 'topics_units_div'\n\t\t\t\t,'comments' => 'comments_div'\n\t\t\t\t,'newAnswer' => 'new_answers_btn_div'\n\t\t\t\t,'answers' => 'answers_div'\n\t\t\t\t,'saveBtn' => 'save_btn'\n\t\t)) . \";\";\n\t\t$js .= \"pageJs.load();\";\n\t\t$js .= \"pageJs.bindAllEventNObjects();\";\n\t\tif(!AccessControl::canEditQuestionDetailsPage(Core::getRole()))\n\t\t\t$js .= \"pageJs.readOnlyMode();\";\n\t\treturn $js;\n\t}", "function addHeadJavascriptVars() {\n\t\t$page = end(explode('/', parse_url($_SERVER[\"REQUEST_URI\"], PHP_URL_PATH)));\n\t\techo '<script type=\"text/javascript\">'.\"\\n\";\n\t\techo 'var lepress_teacher_awaiting_url = \"'.add_query_arg(array('lepress-teacher-awaiting' => 1), get_bloginfo('siteurl')).'\";'.\"\\n\";\n\t\t$lang_vars = array('one_item' => __('item'),\n\t\t\t\t\t\t\t'two_item' => __('items'),\n\t\t\t\t\t\t\t'date_greater' => __(\"Assignment ending date must be greater than start date\", lepress_textdomain));\n\t\t$role = 'no-filtering';\n\t\tif(($page == 'edit.php' && get_query_var('post_type') == 'post') || ($page == \"edit-tags.php\" && $_GET['taxonomy'] == 'category') || $page == \"edit-comments.php\") {\n\t\t\t$role = current_user_can('manage-lepress') && !is_super_admin() ? 'lepress-teacher' : 'super-admin';\n\t\t}\n\t\t$lepress_env = array('role' => $role);\n\t\techo 'var lepress_env = '.json_encode($lepress_env).';'.\"\\n\";\n\t\techo 'var lepress_lang_vars = '.json_encode($lang_vars).';'.\"\\n\";\n\t\techo '</script>'.\"\\n\";\n\t\t//IF role lepress-teacher, override span css classes\n\t\tif($role != 'no-filtering' && !is_super_admin()) {\n\t\t\techo '<style type=\"text/css\">'.\"\\n\";\n\t\t\techo 'span.displaying-num, span.count { display:none; }';\n\t\t\techo '</style>';\n\t\t}\n\t}", "public function ee_breakouts_page_load() {}", "function runAfterInit() {\n \t$this->subscriptions = new StudentSubscriptions();\n \t//$this->groups = new StudentGroups();\n \t//Custom actions\n \tadd_action('refreshCoursesMeta', array(&$this->subscriptions, 'refreshCoursesMeta'));\n \tadd_action('refreshAssignments', array(&$this->subscriptions, 'refreshAssignments'));\n \tadd_action('refreshClassmates', array(&$this->subscriptions, 'refreshClassmates'));\n\n \t//Ajax load awaiting count triggers and hooks\n \tadd_filter('query_vars', array(&$this, 'awaiting_add_trigger'));\n\t\tadd_action('template_redirect', array(&$this,'awaiting_trigger_check'));\n\t\t\n\t\t//Comment content filter on home page\n\t\tadd_filter('get_comment_text', array(&$this, 'filterCommentText'), 10, 2);\n\t\t\n \t//Load cron after adding custom actions\n \t$this->cron = new LePressCron();\n\n \t//Add LePress pseudo-cron calls\n \tif(!$this->cron->get_next_scheduled('refreshCoursesMeta')) {\n \t\t$ms = $this->get_option('courseRefreshTime') * 60;\n \t\tif($ms > 0) {\n\t\t\t\t$this->cron->add_schedule('refreshCoursesMeta', time()+$ms);\n \t\t}\n\t\t}\n\t\tif(!$this->cron->get_next_scheduled('refreshAssignments')) {\n\t\t\t$ms = $this->get_option('assignmentsRefreshTime') * 60;\n \t\tif($ms > 0) {\n\t\t\t\t$this->cron->add_schedule('refreshAssignments', time()+$ms);\n \t\t}\n\t\t}\n\t\tif(!$this->cron->get_next_scheduled('refreshClassmates')) {\n\t\t\t$ms = $this->get_option('classmatesRefreshTime') * 60;\n \t\tif($ms > 0) {\n\t\t\t\t$this->cron->add_schedule('refreshClassmates', time()+$ms);\n \t\t}\n\t\t}\n }", "function theme_nightingale_get_course_navigation(moodle_page $page) {\n\n $courserenderer = $page->get_renderer('core', 'course');\n\n $availablecourseshtml = $courserenderer->frontpage_available_courses();\n\n if(empty($availablecourseshtml)) {\n $availablecourseshtml = \"No courses available\";\n }\n\n return $availablecourseshtml;\n}", "private function _addJavascript ()\n {\n $options = array ();\n\n if ($this->isTypeahead) {\n $options['documentReady'][] = 'init';\n if ($this->desc)\n $options['documentReady'][] = 'tooltip';\n }\n \n if ($this->selectable) {\n $options['documentReady'][] = 'selectable';\n if ($this->sortable) {\n $options['documentReady'][] = 'sortable';\n }\n }\n\n if ($this->clickable) {\n \t$options['documentReady'][] = 'click';\n }\n\n if (!empty ($options)) {\n $this->buildJS('thesaurus/', $options);\n }\n\n if ($this->selectable) {\n $this->_element->addDocumentReady($this->endJavascript);\n if (isset($this->required_items) && is_array ($this->required_items)) {\n foreach ($this->required_items as $item) {\n $this->_element->addDocumentReady(\"setRequiredItems_\" . $this->idfilter . \" ('$item');\");\n }\n }\n }\n }", "function i4_assigned_courses_shortcode() {\n\n if (is_user_logged_in()) { //Simple check to see if the user is logged in or not\n ob_start();\n $this->i4_assigned_courses();\n return ob_get_clean();\n }\n }", "public function customizer_footer_scripts()\n {\n $this->add_activate_switch();\n $this->change_title_html();\n do_action('mo_optin_customizer_footer_scripts', $this);\n }", "function run_on_startup(): void {\r\n\r\n\t // Add the current page to GT\r\n\t $this->gtpage = MJKGTAPI::add_page([\r\n\t\t 'id' => 'masthead',\r\n\t\t 'name' => 'Masthead',\r\n\t\t 'source' => self::source,\r\n\t\t 'renderer' => 'MJKMH_Renderer',\r\n\t\t 'settings' => [JKNAPI::settings_page('roles')]\r\n\t ]);\r\n\r\n // Add the ACF filters\r\n\t MJKMH_ACF_Roles::add_filters();\r\n\t MJKMH_ACF_User::add_filters();\r\n\r\n\t // Add the dynamic field loading on the user ACF page\r\n\t global $pagenow;\r\n\t if (($pagenow === 'user-edit.php') || ($pagenow == 'user-new.php')) {\r\n\t \tMJKMH_ACF_User::enqueue_js();\r\n\t }\r\n\r\n }", "public function initPage() {}", "public function initPage() {}", "public function loadInitScript() {\n //di(forum()->getCategory());\n include_once forum()->locateTemplate('init');\n //exit;\n }", "public function onLoad() {\n \n }", "protected function afterLoad()\n {\n }", "protected function after_load(){\n\n\n }", "function theme_courses_page() {\n if(isset($_GET['action']) and $_GET['action'] == 'view-detail'){\n require_once 'class-courses-detail-list-table.php';\n\n echo <<<HTML\n <div class=\"wrap\">\n <div id=\"icon-users\" class=\"icon32\"></div>\n <h2>Chi tiết đăng ký</h2>\nHTML;\n\n //Prepare Table of elements\n $wp_list_table = new WPCourses_Detail_List_Table();\n $wp_list_table->prepare_items();\n //Table of elements\n $wp_list_table->display();\n\n echo '</div>';\n }else{\n require_once 'class-courses-list-table.php';\n\n echo <<<HTML\n <div class=\"wrap\">\n <div id=\"icon-users\" class=\"icon32\"></div>\n <h2>Danh sách đăng ký khóa học</h2>\nHTML;\n echo <<<HTML\n <form action=\"\" method=\"get\">\n <input type=\"hidden\" name=\"page\" value=\"nvt_courses\" />\nHTML;\n\n //Prepare Table of elements\n $wp_list_table = new WPCourses_List_Table();\n $wp_list_table->prepare_items();\n //Table of elements\n $wp_list_table->display();\n\n echo '</form></div>';\n }\n}", "public function initialize () {\n PageLayout::addStylesheet($this->assets . 'styles.css');\n $this->addScript('script.js');\n }", "function on_page_init() {\n return true;\n }", "public function on_page_view(){\n $this->runTemplateSubController();\n // lightbox enabled?\n if( (bool) $this->lightboxEnable ){\n $this->addHeaderItem( $this->getHelper('html')->css('flexry-lightbox.min.css', 'flexry') );\n if( (bool) $this->autoIncludeJsInFooter ){\n $this->addFooterItem( $this->getHelper('html')->javascript('flexry-lightbox.js', 'flexry') );\n }else{\n $this->addHeaderItem( $this->getHelper('html')->javascript('flexry-lightbox.js', 'flexry') );\n }\n }\n // output function to execute deferreds\n $this->addHeaderItem( $this->getHelper('html')->javascript('libs/modernizr.js', 'flexry') );\n $this->addFooterItem('<script type=\"text/javascript\">'.$this->getHelper('file')->getContents(DIR_PACKAGES . '/flexry/' . DIRNAME_BLOCKS . '/flexry_gallery/inline_script.js.txt').'</script>');\n }", "public function InstructorConstruct()\n\t{\tparent::InstructorConstruct();\n\t\t$this->inst_option = 'multimedia';\n\t\t$this->js[] = 'admin_instructor_mm.js';\n\t\t$this->css[] = 'course_mm.css';\n\t\t\n\t\t$this->breadcrumbs->AddCrumb('instructormm.php?id' . $this->instructor->id, 'Multimedia');\n\t}", "public function init() {\n\t\tif ($this->mojo->auth->is_editor()) {\n\t\t\t$html = \t'<script type=\"text/javascript\" src=\"'.$this->javascript_url().'\"></script>';\n\t\t\t$html .= \t'<script type=\"text/javascript\">$(function(){ Mojo.URL.mojoblog_skin_url = \"' \n\t\t\t\t\t\t\t\t. base_url() . SYSDIR . '/mojomotor/third_party/blog/javascript/ckeditor/skins/kama/\"; });</script>';\n\t\t\t$html .= \t'<link rel=\"stylesheet\" type=\"text/css\" href=\"'.$this->stylesheet_url().'\" />';\n\t\t\n\t\t\t$this->mojo->cp->appended_output[] = $html;\n\t\t}\n\t}", "protected function loadJavaScripts() {}", "public function add_course_view(){\n\n\t\t$headerData = null;\n\t\t$sidebarData = null;\n\t\t$page = 'admin/add_course';\n\t\t$mainData = array(\n\t\t\t'pagetitle'=> 'Add course',\n\t\t\t'course_list'=> $this->setting_model->Get_All('course'),\n\t\t);\n\t\t$footerData = null;\n\n\t\t$this->template($headerData, $sidebarData, $page, $mainData, $footerData);\n\t}", "public function page_init()\n { \n register_setting(\n 'ccgr_extras_options', // Group name. Must match the settings_fields function call\n 'cc_restricted_email_domains', // Option name\n array( $this, 'sanitize' ) // Callback function for validation.\n );\n\n add_settings_section(\n 'ccgr_extras_options', // ID for the section\n 'Registration Extras', // Title\n array( $this, 'print_section_info' ), // Callback function. Outputs section description.\n 'ccgr_extras' // Page name. Must match do_settings_section function call.\n ); \n\n add_settings_field(\n 'restricted_domains', // ID for the field\n 'Restricted Email Domains', // Title \n array( $this, 'print_domain_form_field' ), // Callback function. Outputs form field inputs.\n 'ccgr_extras', // Page name. Must match do_settings_section function call.\n 'ccgr_extras_options' // ID of the settings section that this goes into (same as the first argument of add_settings_section). \n );\n\n }", "public function frontpage_available_courses() {\r\n global $CFG;\r\n require_once($CFG->libdir. '/coursecatlib.php');\r\n\r\n $chelper = new coursecat_helper();\r\n $chelper->set_show_courses(self::COURSECAT_SHOW_COURSES_EXPANDED)->\r\n set_courses_display_options(array(\r\n 'recursive' => true,\r\n 'limit' => $CFG->frontpagecourselimit,\r\n 'viewmoreurl' => new moodle_url('/course/index.php'),\r\n 'viewmoretext' => new lang_string('fulllistofcourses')));\r\n\r\n $chelper->set_attributes(array('class' => 'frontpage-course-list-all'));\r\n $courses = coursecat::get(0)->get_courses($chelper->get_courses_display_options());\r\n $totalcount = coursecat::get(0)->get_courses_count($chelper->get_courses_display_options());\r\n if (!$totalcount && !$this->page->user_is_editing() && has_capability('moodle/course:create', context_system::instance())) {\r\n // Print link to create a new course, for the 1st available category.\r\n return $this->add_new_course_button();\r\n }\r\n return $this->frontpage_courseboxes($chelper, $courses);\r\n }", "function init() {\n // and while we're at it check for a logged in user as well\n if ( craft()->request->isCpRequest() && craft()->userSession->isLoggedIn() )\n {\n\n craft()->templates->includeJsResource('embedder/embedder.js');\n\n\n }\n\n }", "function initPage(){\n if (($c = $_GET[\"configure\"]) && $this->showConfigure()){\n $this->stop_render = true;\n $this->api->stickyGET(\"configure\");\n if ($c == \"page\"){\n $f = $this->add(\"MVCForm\");\n $f->add(\"Hint\")->set(\"Leave blank unless you know what you do\");\n $this->m->getField('name')->system(true);\n $f->setModel($this->m);\n $f->addSubmit(\"Save\");\n if ($f->isSubmitted()){\n $f->update();\n $this->reload();\n }\n } else if ($cid = $_GET[\"component_id\"]){\n /* here? */\n\n $this->api->stickyGET(\"component_id\");\n $m = $this->add(\"cms/Model_Cms_Component\")->loadData($_GET[\"component_id\"]);\n $m2 = $this->add($m->getRef(\"cms_componenttype_id\")->get(\"class\"));\n $m2->useComponent($m);\n $f = $m2->showConfigureForm($this);\n $b = $this->add(\"Button\", \"close\".$cid)->set(\"Close\");\n $b->js(\"click\", $f->js()->univ()->closeDialog());\n \n } else {\n /* configuring tag */\n $m = $this->add(\"cms/Model_Cms_Pagecomponent\");\n $m->addCondition(\"cms_page_id\", $this->m->get(\"id\"));\n $m->addCondition(\"template_spot\", $c);\n $g = $this->add(\"MVCGrid\");\n /* ordering should be done here */\n $g->setModel($m, array(\"id\", \"cms_component\"));\n $g->add('cms/Controller_GridOrder');\n $g->addColumn(\"button\", \"setup\");\n $g->addColumn(\"delete\", \"delete\");\n if ($page_component_id = $_GET[$g->name . \"_setup\"]){\n $m = $this->add(\"cms/Model_Cms_Pagecomponent\");\n $m->load($page_component_id);\n if ($m->loaded()){\n $component_id = $m->get(\"cms_component_id\");\n\n $g->js()->univ()->frameURL(\"Configure\", $this->api->url($this->getCmsAdminPage()\n , array(\"component_id\" => $component_id)))->execute();\n } else {\n $g->js()->univ()->alert(\"error - could not load $page_component_id?\")->execute();\n }\n }\n $this->add(\"Text\")->set(\"Create new component\");\n $f =$this->add(\"MVCForm\");\n $f->setModel($mc=$this->add(\"cms/Model_Cms_Component\"), array(\"name\", \"cms_componenttype_id\"));\n $f->addSubmit(\"Create\");\n if ($f->isSubmitted()){\n $f->update();\n $mc->update(array(\"is_enabled\" => true));\n $m->update(array(\"cms_component_id\" => $mc->get(\"id\")));\n $f->js(null, $g->js(null, $f->js()->reload())->reload()->execute())->univ()->successMessage(\"Component has been created\");\n }\n $this->add(\"Text\")->set(\"Attach existing component\");\n $f =$this->add(\"Form\");\n $f->addField(\"Dropdown\", \"component\")->setModel(\"cms/Cms_Component\");\n $f->addSubmit(\"Attach\");\n if ($f->isSubmitted()){\n $m->update(array(\"cms_component_id\" => $f->get(\"component\")));\n $f->js(null, $g->js(null, $f->js()->reload())->reload()->execute())->univ()->successMessage(\"Component has been attached\");\n }\n\n \n $this->add(\"Button\", \"close\")->set(\"Close\")->js(\"click\")->univ()->location($this->stripUrl($this->cms_page));\n }\n } else {\n \n if ($this->showConfigure('dev')){\n $this->conf->add(\"Button\")->set(\"Page settings\")->js(\"click\")\n ->univ()->frameURL(\"Page settings\", $this->api->url($this->getCmsAdminPage()\n , array(\"configure\" => \"page\")));\n }\n /* add configure buttons for each \"tag\" */\n $tags = array_keys($this->template->tags);\n $api_tags = array_keys($this->api->template->tags);\n foreach ($api_tags as $tag){\n if (in_array($tag, $this->allowed_tags)){\n if (!in_array($tag, $tags)){\n $tags[] = $tag;\n }\n }\n }\n $mc = $this->add(\"cms/Model_Cms_Component\");\n foreach ($tags as $tag){\n if (in_array($tag, $this->protected_tags)){\n continue;\n }\n if (preg_match(\"/^_.*/\", $tag)){\n continue;\n }\n if (!preg_match(\"/#[0-9]+$/\", $tag) && !in_array($tag, array(\"_page\", \"_name\"))){\n if ($this->showConfigure('dev')){\n $this->conf->add(\"Button\")->set(\"Spot: $tag\")->js(\"click\")\n ->univ()->frameURL(\"Mangage content of tag $tag\",\n $this->api->url($this->getCmsAdminPage()\n , array(\"configure\" => $tag)));\n }\n $m = $this->add(\"cms/Model_Cms_Pagecomponent\")->addCondition(\"cms_page_id\", $this->m->get(\"id\"));\n $elems = $m->addCondition(\"template_spot\", $tag)->setOrder(\"ord\")->getRows();\n if (($tag != \"Content\") && in_array($tag, $api_tags)){\n $dest = $this->api;\n } else {\n $dest = $this;\n }\n if ($elems){\n foreach ($elems as $e){\n $component = $m->loadData($e[\"id\"])->getRef(\"cms_component_id\");\n $driver = $component->getRef(\"cms_componenttype_id\");\n $obj=null;\n\n if ($this->showConfigure()){\n $button = $dest->add(\"Button\", null, $tag);\n //if($obj)$button->js('mouseover',$obj->js()->fadeOut()->fadeIn());\n $this->api->stickyGET(\"cms_page\");\n $button->set(\"Edit '\" . $component->get(\"name\").\"'\")->js(\"click\")\n ->univ()->frameURL(\"Configure \" . $component->get(\"name\"),\n $this->api->url($this->getCmsAdminPage()\n , array(\"configure\" => \"component\", \"component_id\" => $component->get(\"id\"))));\n }\n\n if ($component->get(\"is_enabled\")){\n $element = $this->add($driver->get(\"class\"), null, $tag);\n $element->useComponent($component);\n try {\n $obj = $element->configure($dest, $tag);\n } catch (Exception $e){\n //$this->api->caughtException($e);\n if($this->api->logger->log_output){\n // a bit of hacing\n $this->api->logger->logCaughtException($e);\n }\n $dest->add('View_Error')->set('Problem with this widget: '.$e->getMessage());\n }\n }\n }\n }\n /*\n $dest->add('Button',null,$tag)->set('Add Text')\n ->js('click');\n */\n }\n }\n if ($this->showConfigure()){\n if ($this->warning){\n $this->add(\"Text\")->set(\"<div style=\\\"color:red; background: yellow\\\"><b>Warning:</b><br />\" . implode(\"<br />\", $this->warning) . \"</div>\");\n }\n }\n }\n }", "public function init() {\n $this->title = get_string('config_default_title', 'block_courses_available');\n }", "public function assignment_page(){\n\t\t$page_base = $this->page_url();\n\t\t//switch($tab)\n\t\tob_start();\n\t\t?>\n\t\t<div class=\"wp_lms settings\">\n\t\t\t<h1>Assignments</h1>\n\t\t\t<h2 class=\"nav-tab-wrapper\">\n\t\t\t\t<a href=\"<?= $page_base;?>&amp;status=active\" class=\"nav-tab\" title=\"Active Courses\">Active Courses</a>\n\t\t\t\t<a href=\"<?= $page_base;?>&amp;status=inactive\" class=\"nav-tab\" title=\"Inactive Courses\">Inactive Courses</a>\n\t\t\t</h2>\n\t\t\t<h3>Course List</h3>\n\t\t\t<?php\n\t\t\t// 'post_type' => 'course',\n\t // 'showposts' => 10,\n\t // 'orderby' => $orderby,\n\t // 'order' => strtoupper($order) \n\t\t\twp_lms_html_gen::form_open(array(\"post_type\" => \"course\", \"showposts\" => \"10\", \"orderby\" => \"title\", \"order\" => \"ASC\"), $page_base ) ?>\n\t\t</div>\n\t\t<?\n\t\tob_end_flush();\n\t}", "private function fn_load_scripts() {\n\n\t\t/**\n\t\t * Load Common CSS and JS for a blank Page\n\t\t */\n\n\t\t$fixed_version = $this->fixed_version;\n\t\t$common_css_version = '0.3';\n\t\t$common_js_version = '0.1';\n\t\t$custom_css_version = '0.4';\n\t\t$custom_js_version = '0.4';\n\n\t\t$registered_styles = $this->registered_css;\n\t\t$registered_scripts = $this->registered_js;\n\n\t\t/**\n\t\t * Load CSS--------------------------------------------------------------\n\t\t */\n\n /** Load Google Fonts */\n\t\t$this->google_fonts['google_opensans'] = $registered_styles['google_opensans'];\n\n\t\t/** Load CSS Assets @todo Move the components in their containers */\n\t\t\n\t\t$this->css_assets['bootstrap'] = $registered_styles['bootstrap'].\"?ver=\".$fixed_version;\n\t\t$this->css_assets['fontawesome'] = $registered_styles['fontawesome'].\"?ver=\".$fixed_version;\n\t\t\n\t\t/**\n\t\t * Load JS--------------------------------------------------------------\n\t\t */\n\t\t\n\t\t/** Load footer js **/\n\t\t$this->footer_js['jquery'] = $registered_scripts['jquery'].\"?ver=\".$fixed_version;\t\t\n\t\t$this->footer_js['jquery-ui'] = $registered_scripts['jquery-ui'].\"?ver=\".$fixed_version;\n\n\t\t$this->footer_js['bootstrap'] = $registered_scripts['bootstrap'].\"?ver=\".$fixed_version;\n\t\t/**let other controllers load their own css/js files **/\n\t}", "protected function loadJavaScripts()\n {\n $this->pageRenderer->loadJquery();\n $this->pageRenderer->loadRequireJsModule('bootstrap');\n $this->pageRenderer->loadRequireJsModule('TYPO3/CMS/Backend/ContextHelp');\n $this->pageRenderer->loadRequireJsModule('TYPO3/CMS/Backend/DocumentHeader');\n $this->pageRenderer->loadRequireJsModule('TYPO3/CMS/Backend/SplitButtons');\n }", "function cmdeals_meta_scripts() {\n\t?>\n\t<script type=\"text/javascript\">\n\t\tjQuery(function(){\n\t\t\t<?php do_action('cmdeals_deals_write_panel_js'); ?>\n\t\t});\n\t</script>\n\t<?php\n}", "public function endPageJS() {}", "function loadInHeader() {\n $this->metaData();\n//\t\t$this->loadAddOns();\n $this->onHead(\"onHead\"); // call back to onHead in extensions things js, etc in head\n $this->onEditor(\"onHead\"); // only when login to admin, for fck to work??\n //If not in admin, blank initEditor\n if (!isset($_SESSION['name'])) { // not sure what this does??\n print \"<script type=\\\"text/javascript\\\">function initeditor(){}</script>\\n\";\n }\n }", "public function config_page_scripts() {\n\t\twp_enqueue_script( 'yseo-gc-admin-js', HS_DOCS_API_DIR_URL . 'js/admin.min.js', null, HS_DOCS_API_PLUGIN_VERSION );\n\t}", "function form_init_elements() \r\n {\r\n //we want an confirmation page for this form.\r\n //$this->set_confirm();\r\n\r\n // Course Info \r\n $elemT1 = new FEText( \"courseName\", true, 10);\r\n $elemT1->set_style_attribute('align', 'left');\r\n $elemT1->set_attribute(\"id\",\"coursename\");\r\n $elemT1->set_attribute(\"accesskey\",\"n\"); \r\n $this->add_element($elemT1);\r\n\r\n $elemP1 = new FETextArea(\"coursedataDescripcion\", true, 10, 50, null, 300);\r\n $elemP1->set_style_attribute('align', 'left');\r\n $elemP1->set_attribute(\"id\",\"coursedatadescripcion\"); \r\n $elemP1->set_attribute(\"accesskey\",\"d\"); \r\n $this->add_element($elemP1);\r\n\r\n include(Util::app_Path(\"andromeda/include/classes/nls.inc.php\"));\r\n $language = $this->_formatElem(\"FEListBox\", \"courseLanguage\", \"courseLanguage\", FALSE, \"100px\", NULL, $nls['languages_form']);\r\n $language->set_style_attribute('align', 'left');\r\n $language->set_attribute(\"id\",\"courselanguage\");\r\n $language->set_attribute(\"accesskey\",\"l\"); \r\n $this->add_element($language);\r\n \r\n $elemT2 = new FEText( \"coursedataVersion\", FALSE, 10);\r\n $elemT2->set_style_attribute('align', 'left');\r\n $elemT2->set_attribute(\"id\",\"coursedataversion\");\r\n $elemT2->set_attribute(\"accesskey\",\"v\"); \r\n $this->add_element($elemT2);\r\n \r\n $elemP2 = new FETextArea(\"coursedataPalabrasClaves\", false, 10, 50, null, 300);\r\n $elemP2->set_style_attribute('align', 'left');\r\n $elemP2->set_attribute(\"id\",\"coursedatapalabrasclaves\");\r\n $elemP2->set_attribute(\"accesskey\",\"w\"); \r\n $this->add_element($elemP2);\r\n\r\n $elemT3 = new FEText( \"coursedataDestinatarios\", FALSE, 10);\r\n $elemT3->set_style_attribute('align', 'left');\r\n $elemT3->set_attribute(\"id\",\"coursedatadestinatarios\");\r\n $elemT3->set_attribute(\"accesskey\",\"u\"); \r\n $this->add_element($elemT3);\r\n \r\n $elemP3 = new FETextArea(\"coursedataConocimientosPrevios\", false, 10, 50, null, 300);\r\n $elemP3->set_style_attribute('align', 'left');\r\n $elemP3->set_attribute(\"id\",\"coursedataconocimientosprevios\");\r\n $elemP3->set_attribute(\"accesskey\",\"k\"); \r\n $this->add_element($elemP3);\r\n\r\n $elemT4 = new FEText( \"coursedataMetodologia\", FALSE, 10);\r\n $elemT4->set_style_attribute('align', 'left');\r\n $elemT4->set_attribute(\"id\",\"coursedatametodologia\");\r\n $elemT4->set_attribute(\"accesskey\",\"m\"); \r\n $this->add_element($elemT4);\r\n\r\n $elemCB1 = new FECheckBox('courseActive', agt('Poner el curso activo.') );\r\n $elemCB1->set_style_attribute('align', 'left');\r\n $elemCB1->set_attribute(\"id\",\"courseactive\"); \r\n $elemCB1->set_attribute(\"accesskey\",\"o\"); \r\n $this->add_element( $elemCB1 );\r\n\r\n $elemCB2 = new FECheckBox('courseAccess', agt('Poner el curso accesible.') ); \r\n $elemCB2->set_style_attribute('align', 'left');\r\n $elemCB2->set_attribute(\"id\",\"courseaccess\");\r\n $elemCB2->set_attribute(\"accesskey\",\"p\"); \r\n $this->add_element( $elemCB2 ); \r\n\r\n $submit = $this->_formatElem(\"base_SubmitButton\", \"Aceptar\", \"submit\", agt(\"Insertar Curso\"));\r\n $submit->set_attribute(\"id\",\"submit\"); \r\n $submit->set_attribute(\"accesskey\",\"e\"); \r\n $this->add_element($submit);\r\n }", "function ControlOnLoad() {\n $lib = $this->Request->ToString(\"library\", \"\");\n $this->Package=Engine::GetPackageName();\n //echo pr($lib);\n if ($this->Auth->isRoleExists(\"PUBLICATIONS_MANAGER\")) { // content publisher\n if($lib != \"publications_modified\") {\n $this->libs[0] = \"publications\";\n } else {\n $this->libs[0] = $lib;\n }\n } elseif($this->Auth->isRoleExists(\"PUBLICATIONS_PUBLISHER\")) {\n if($lib != \"publications_modified\") {\n $this->libs[0] = \"publications_publisher\";\n } else {\n $this->libs[0] = $lib;\n }\n } else {\n if(($lib != \"publications_modified\") && ($lib != \"publications_modified_editor\")) {\n $this->libs[0] = \"publications_editor\";\n } else {\n $this->libs[0] = \"publications_modified_editor\";\n }\n\n }\n parent::ControlOnLoad();\n\n }", "function AssignCourse()\n\t{\t$this->date = new AdminCourseDate($_GET['id']);\n\t\tif ($this->date->id)\n\t\t{\t$this->course = new AdminCourse($this->date->details['cid']);\n\t\t} else\n\t\t{\t$this->course = new AdminCourse($_GET['cid']);\n\t\t}\n\t}", "public function afterLoad() { }", "public function onPageInitialized()\n {\n // merge global with page specific googlemaps' yaml settings\n $defaults = (array) $this->config->get('plugins.googlemaps');\n $page = $this->grav['page'];\n if (isset($page->header()->googlemaps)) {\n $this->config->set('plugins.googlemaps', array_merge($defaults, $page->header()->googlemaps));\n }\n\n // subscribe to additional events\n $this->enable([\n 'onPageContentProcessed' => ['onPageContentProcessed', 0],\n 'onOutputGenerated' => ['onOutputGenerated', 0]\n ]);\n \n // if the plugin is active on this page\n if ($this->config->get('plugins.googlemaps.enabled', false)) {\n // get this page's cached assets (if any)\n $cache = $this->grav['cache'];\n $this->assetId = md5('googlemaps' . $page->path() . $cache->getKey());\n $this->assetData = $cache->fetch($this->assetId);\n\n // set this page's assets from the cache (if any)\n // note: if enabled flag for the page itself is false then this introduces\n // unnecessary assets (because cache cannot be deleted ...\n $this->setAssetsFromData();\n $this->assetData = null; // avoid saving again in onOutputGenerated()\n }\n }", "function sloodle_print_footer()\n {\n sloodle_print_footer($this->course);\n }", "function cpd_course_box(){\n \n\tglobal $post;\n\t$course_relation = get_post_meta($post->ID, 'course_relation', true); \n\t$course_id = $_GET['course']; // set if clicked 'add presentation' \n\n?>\n \n\t<div class=\"padding\">\n\t\n\t\t<!-- Nonce -->\n\t\t<?php wp_nonce_field( 'cpd_presentations_nonce', 'presentations_nonce' ); ?>\n \n\t \t<!-- Related Course-->\n\t <select name=\"course_relation\" id=\"course_relation\">\n\t \t<?php\n\t \t // Display all courses as options, preselect if the presentation is already related to a course, or if user has clicked 'add presentation'\n\t \t\tglobal $wpdb;\n\t\t $courses = $wpdb->get_results(\"SELECT ID, post_title FROM $wpdb->posts WHERE post_type = 'courses' AND post_status = 'publish'\");\n\t\t\t\t\n\t\t foreach($courses as $course){ ?>\n\t\t \t\t<option \n\t\t \t\t value=\"<?php echo $course->ID ?>\" \n\t\t \t\t <?php\n\t\t \t\t // If user clicked 'add presentation' || or if presentation already has a related course\n\t\t \t\t if($course_id == $course->ID || $course->ID == $course_relation){ \n\t\t \t\t echo \" selected='selected'\"; \n\t\t \t\t } ?>\n\t\t \t\t>\n\t\t \t\t <?php echo $course->post_title; ?>\n\t\t </option>\n\t \t<?php } ?>\n\t </select>\n \n \t</div>\n\n<?php \n}", "function overviewCourseForm($code) {\n\tglobal $config, $lang, $usersess;\n\n\tif (!($usersess->get_var(\"admin\") || checkInst($code))) {\n\t\techo '<BR>'.$lang['notauthorize'];\n\t\treturn;\n\t}\n\n\t$sql = \"SELECT * FROM $config[tablecourse] WHERE CID='$code' \";\n\t$result=db_select($sql);\n\tlist($courseid,$coursecode,$schoolid,$coursename,$creator,$description,$prerequisite,$objective,$coursemanday,$reference,$enable,$createon,$course_type) = mysql_fetch_row($result);\t\t\n\n\t$sql = \"SELECT sum(Length) FROM $config[tablelesson] WHERE CourseID='$courseid'\";\n\t$result=db_select($sql);\n\tlist($courselength) = mysql_fetch_row($result);\n\n\t// strip slashes and remove special chars\n\t$coursename=stripslashes($coursename);\n\t$coursename=htmlspecialchars($coursename);\n\t$description=stripslashes($description);\n\t$objective=stripslashes($objective);\n\t$prequisite=stripslashes($prequisite);\n\t$reference=stripslashes($reference);\n\n?>\n\n <script language=\"javaScript\">\n\t\tfunction formSubmit(val) {\n\t\t\tif(val == \"Clear\") document.forms.Course.submit();\n\t\t\telse if(checkFields()) {\n\t\t\t\tdocument.forms.Course.action.value = val;\n\t\t\t\treturn true;\n\t\t\t}\n\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\tfunction clearFields() {\n\t\t\tdocument.forms.Course.reset();\n\t\t}\n\n \tfunction checkFields() {\n\t\t\tvar code = document.forms.Course.coursecode.value;\n\t\t\tvar name = document.forms.Course.cname.value;\n\t\t\tvar creator = document.forms.Course.creator.value;\n \t\t\tvar description = document.forms.Course.description.value;\n\t\t\tvar objective = document.forms.Course.objective.value;\n\t\t\n\t\t\tif (code == \"\" ) {\n\t\t\t\talert(\"<?=$lang['alertcode']?>\");\n\t\t\t\tdocument.forms.Course.coursecode.focus();\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\tif (name == \"\" ) {\n\t\t\t\talert(\"<?=$lang['alertname']?>\");\n\t\t\t\tdocument.forms.Course.cname.focus();\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\tif (creator == \"\" ) {\n\t\t\t\talert(\"<?=$lang['alertcreator']?>\");\n\t\t\t\tdocument.forms.Course.creator.focus();\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\tif (description == \"\" ) {\n\t\t\t\talert(\"<?=$lang['alertdescription']?>\");\n\t\t\t\tdocument.forms.Course.description.focus();\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\tif (objective == \"\" ) {\n\t\t\t\talert(\"<?=$lang['alertobjective']?>\");\n\t\t\t\tdocument.forms.Course.objective.focus();\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\tif (description == \"\" ) {\n\t\t\t\talert(\"<?=$lang['alertdescription']?>\");\n\t\t\t\tdocument.forms.Course.description.focus();\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\treturn true; \n\t\t}\n\n\t\tfunction isComposedOfChars(testSet, input) {\n\t\t\tfor (var j=0; j<input.length; j++) {\n\t\t\t\tif (testSet.indexOf(input.charAt(j), 0) == -1){\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t}\n\treturn false;\n}\n\n</script>\n\n\t<TABLE WIDTH=98% CELLSPACING=0 CELLPADDING=1 CLASS=\"form\">\n\t<FORM NAME=\"Course\" METHOD=POST ACTION=\"index.php\" Onsubmit=\"return formSubmit('submitcourse')\">\n\t<INPUT TYPE=\"hidden\" name=\"courseid\" value=\"<?=$courseid?>\">\n\n\t<TR>\n\t<TD colspan=2>\n\t<TABLE WIDTH=100% BORDER=0 CELLSPACING=0 CELLPADDING=3>\n\t<TR valign=middle HEIGHT=18><TD class=head valign=\"top\" align=\"left\"> <B>&nbsp;<?=$coursecode?>: <?=$coursename?></B></TD></TR></TABLE>\n\t</TD>\n\t</TR>\n\n\t<TR>\n\t<TD ALIGN=\"RIGHT\" width=20%><?=$lang['school']?>:</TD>\n\t<TD>\n\t\t<SELECT NAME=\"schoolid\" onchange=\"document.forms.Course.coursecode.value=document.forms.Course.schoolid.options[this.selectedIndex].value;document.forms.Course.courseid.focus();\">\n\t<?\n\t\t$sql = \"SELECT * FROM $config[tableschool] ORDER BY School_code\";\n\t\t$result=db_select($sql);\n\t\tfor ($i=0;list($id,$schoolcode,$schoolname) = mysql_fetch_row($result);$i++) {\n\t\t\tif ($id==$schoolid) {\n\t\t\t\t$ok= \"selected\";\n\t\t\t\t$code=$schoolcode;\n\t\t\t}\n\t\t\telse {\n\t\t\t\t$ok = '';\n\t\t\t}\n\t\t\techo \"<OPTION VALUE=\".$schoolcode.\" $ok> $schoolname </OPTION>\";\n\t\t}\n//\t\t$courseid = str_replace($code,'',$courseid);\n\t?>\n\t</SELECT></TD>\n</TR>\n<TR>\n\t<TD ALIGN=\"RIGHT\"><?=$lang['coursecode']?>:</TD>\n\t<TD><INPUT TYPE=\"text\" NAME=\"coursecode\" size=10 value=\"<?=$coursecode?>\"></TD>\n</TR>\n<TR>\n\t<TD ALIGN=\"RIGHT\"><?=$lang['coursename']?>:</TD>\n\t<TD><INPUT TYPE=\"text\" NAME=\"cname\" size=40 value=\"<?=$coursename?>\" style=\"width: 90%;\"></TD>\n</TR>\n <TR VALIGN=\"TOP\">\n\t<TD ALIGN=\"RIGHT\"><?=$lang['courseabstract']?>:</TD>\n\t<TD><TEXTAREA NAME=\"description\" ROWS=\"8\" COLS=\"80\" wrap=\"soft\" style=\"width: 90%;\"><?=$description?></TEXTAREA></TD>\n</TR>\n<TR VALIGN=\"TOP\">\n\t<TD ALIGN=\"RIGHT\"><?=$lang['courseobjective']?>:</TD>\n\t<TD><TEXTAREA NAME=\"objective\" ROWS=\"8\" COLS=\"80\" wrap=\"soft\" style=\"width: 90%;\"><?=$objective?></TEXTAREA></TD>\n</TR>\n<TR VALIGN=\"TOP\">\n\t<TD ALIGN=\"RIGHT\"><?=$lang['courseprerequisite']?>:</TD>\n\t<TD><TEXTAREA NAME=\"prerequisite\" ROWS=\"3\" COLS=\"80\" wrap=\"soft\" style=\"width: 90%;\"><?=$prerequisite?></TEXTAREA></TD>\n</TR>\n<TR VALIGN=\"TOP\">\n\t<TD ALIGN=\"RIGHT\"><?=$lang['coursereference']?>:</TD>\n\t<TD><TEXTAREA NAME=\"reference\" ROWS=\"3\" COLS=\"80\" wrap=\"soft\" style=\"width: 90%;\"><?=$reference?></TEXTAREA></TD>\n</TR>\n<TR>\n\t<TD ALIGN=\"RIGHT\"><?=$lang['coursecreator']?>:</TD>\n\t<TD>\n\t<?\n\t$sql = \"SELECT Nickname FROM $config[tableuser] WHERE Level='$config[admin_level]' OR Level='$config[instructor_level]' ORDER BY Nickname\";\n\t$result=db_select($sql);\n\techo \"<SELECT NAME='creator'>\";\n\tfor ($i=0;list($name) = mysql_fetch_row($result);$i++) {\n\t\t if ($name==$creator)\n\t\t\techo \"<OPTION value=$name selected>$name</OPTION>\";\n\t\telse\n\t\t\techo \"<OPTION value=$name>$name</OPTION>\";\n\t}\t\n\techo \"</SELECT>\";\n\t?>\t\n\t</TD>\n</TR>\n<TR>\n\t<TD ALIGN=\"RIGHT\"><?=$lang['coursecredit']?> :</TD>\n\t<TD><INPUT TYPE=\"text\" NAME=\"manday\" Value=\"<?=$coursemanday?>\" size=3> \n<? if (!empty($courselength)) { ?>\n\t (<?=$lang['courselength']?> <B><?=$courselength?></B> <?=$lang['courselength_unit']?>)\n<? } ?>\n\t</TD>\n</TR>\n\n<TR>\n\t<TD ALIGN=\"RIGHT\" VALIGN=\"TOP\"><?=$lang['coursesequence']?>:</TD>\n\t<TD><INPUT TYPE=\"radio\" NAME=\"course_type\" VALUE=\"0\" <? if ($course_type=='0') echo \"checked\"; ?>><?=$lang['coursesequence1']?> &nbsp;&nbsp;&nbsp;&nbsp;<BR><INPUT TYPE=\"radio\" NAME=\"course_type\" VALUE=\"1\" <? if ($course_type=='1') echo \"checked\"; ?>><?=$lang['coursesequence2']?></TD>\n</TR>\n<TR>\n\t<TD ALIGN=\"RIGHT\" ><?=$lang['courseactive']?>:</TD>\n\t<TD><INPUT TYPE=\"checkbox\" NAME=\"enable\" Value=\"1\" size=1 <? if ($enable) echo \"checked\"; ?>>&nbsp;</TD>\n</TR>\n\n<TR VALIGN=\"TOP\">\n\t<TD>&nbsp;</TD>\n\t<TD><BR>\n\t<input type=\"hidden\" name=\"action\">\n\t<INPUT class=\"button\" TYPE=\"submit\" value=\"<?=$lang['button_editcourse']?>\">&nbsp;\n\t<INPUT class=\"button\" TYPE=\"submit\" value=\"<?=$lang['button_clear']?>\" Onclick=\"javascript:clearFields()\">\n\t<BR>&nbsp;\n</TD>\n</TR>\n</TABLE></FORM>\n<BR>\n<?\n\n}", "public function onAfterInitialise()\n\t{\n\t\t// Only for site\n\t\tif (!$this->app->isSite())\n\t\t{\n\t\t\treturn;\n\t\t}\n\n\t\t// Register listeners for JHtml helpers\n\t\tif (!JHtml::isRegistered('bootstrap.loadCss'))\n\t\t{\n\t\t\tJHtml::register('bootstrap.loadCss', 'PlgSystemBootstrap4::loadCss');\n\t\t}\n\n\t\tif (!JHtml::isRegistered('bootstrap.carousel'))\n\t\t{\n\t\t\tJHtml::register('bootstrap.carousel', 'PlgSystemBootstrap4::carousel');\n\t\t}\n\t\t\n\t\tif (!JHtml::isRegistered('calendar'))\n\t\t{\n\t\t\tJHtml::register('calendar', 'PlgSystemBootstrap4::calendar');\n\t\t}\n\t\t\n\t\tif (!JHtml::isRegistered('bootstrap.modal'))\n\t\t{\t\t\n\t\t\tJHtml::register('bootstrap.modal', 'PlgSystemBootstrap4::modal');\n\t\t}\n\t}", "public function initPageFooter()\n\t{\n\t\tinclude_once('view/main_page_footer.php');\n\t}", "function AssignCourse()\n\t{\t$this->resource = new AdminCourseResource($_GET[\"id\"]);\n\t\tif ($this->resource->id)\n\t\t{\t$this->course = new AdminCourse($this->resource->details[\"cid\"]);\n\t\t} else\n\t\t{\t$this->course = new AdminCourse($_GET[\"cid\"]);\n\t\t}\n\t}", "public function on_before_render()\n {\n // (If you want to load js/css only for one action, put the addHeaderItem/addFooterItem call in that action's method instead)\n //DEV NOTE: we use \"on_before_render()\" instead of \"on_page_view()\" (on_page_view only works in block controllers [??])\n $hh = Loader::helper('html');\n $this->addHeaderItem($hh->css('dashboard.css', 'immo'));\n $this->addFooterItem($hh->javascript('dashboard.js', 'immo'));\n }", "function wck_page_load_scripts() {\t\t\r\n\t\t?>\r\n\t\t<script type=\"text/javascript\">\r\n\t\t\t//<![CDATA[\r\n\t\t\tjQuery(document).ready( function($) {\r\n\t\t\t\t$('.if-js-closed').removeClass('if-js-closed').addClass('closed');\r\n\t\t\t\tpostboxes.add_postbox_toggles( '<?php echo $this->hookname; ?>' );\r\n\t\t\t});\r\n\t\t\t//]]>\r\n\t\t</script><?php\r\n\t}", "public function onLoad() {\n\t}", "function beginPage($pageTitle = 'Paalgeld Europa', $inContainer = true, $subTitle = ''){\n global $_inContainer, $_pageName, $_loadChosen, $_loadGoogleCharts, $_loadGoogleMaps;\n $_inContainer = $inContainer;\n require('inc/pagebegin.php');\n}", "public static function page_construct_object($requested_component, $vce) {\n\t\t$vce->site->add_script(dirname(__FILE__) . '/js/accordion.js', 'jquery');\n\t\t$vce->site->add_style(dirname(__FILE__) . '/css/accordion.css', 'accessibility-accordion-style');\n\t\t$vce->site->add_script(dirname(__FILE__) . '/js/forms.js', 'jquery');\n\t\t$vce->site->add_style(dirname(__FILE__) . '/css/forms.css', 'accessibility-forms-style');\n\t\t$vce->site->add_script(dirname(__FILE__) . '/js/tooltips.js', 'jquery');\n\t\t$vce->site->add_style(dirname(__FILE__) . '/css/tooltips.css', 'accessibility-tooltips-style');\n \n \n \t// legacy\n\t\t$vce->site->add_script(dirname(__FILE__) . '/legacy/js/script.js', 'jquery');\n\t\t$vce->site->add_style(dirname(__FILE__) . '/legacy/css/style.css','legacy-input-style'); \n\n }", "function set_sections() {\n\t\t\n\t\t$this->sections[] = '<script type=\"text/javascript\" charset=\"utf-8\">$(\"#accessoryTabs a.'.$this->id.'\").parent().remove();</script>';\n\n\t\tif($this->EE->input->get('C') == 'admin_content' && $this->EE->input->get('M') == 'category_edit' ) {\n\n\t\t\t// help!\n\t\t\trequire_once(PATH_THIRD.'dm_eeck/includes/eeck_helper.php');\n\t\t\t$this->helper = new eeck_helper();\n\n\t\t\t// we'll need the settings from the Editor field type\n\t\t\t$this->eeck_settings = $this->helper->load_editor_settings();\n\n\t\t\t$this->helper->include_editor_js($this->eeck_settings['eeck_ckepath'], $this->eeck_settings['eeck_ckfpath']);\n\t\t\t\n\t\t\t// get our settings for this field\n\t\t\t$myConf = $this->eeck_settings['eeck_config_settings'];\n\t\t\t\n\t\t\t// load out config file\n\t\t\t$conf = $this->load_config_file($myConf);\n\t\t\tif($conf != '') $conf .= ',';\n\n\t\t\t// add on integration for CK finder\n\t\t\t$conf .= $this->integrate_ckfinder($this->eeck_settings['eeck_ckfpath'],'Images','Files','Flash');\n\n\t\t\t$str = 'CKEDITOR.replace( \"cat_description\",{'.$conf.'});';\n\t\t\t$this->sections[] = '<script type=\"text/javascript\" charset=\"utf-8\">'.$str.'</script>';\n\t\t}\n\t}", "function local_course_completion_status_before_footer() {\n //echo \"Hello!\";\n //\\core\\notification::add('Success!',\\core\\output\\notification::NOTIFY_SUCCESS);\n}", "function CoursesConstructFunctions()\n\t{\tif ($this->can_resources)\n\t\t{\tif (isset($_POST[\"crlabel\"]))\n\t\t\t{\t$saved = $this->resource->Save($this->course->id, $_POST, $_FILES[\"crfile\"]);\n\t\t\t\t$this->successmessage = $saved[\"successmessage\"];\n\t\t\t\t$this->failmessage = $saved[\"failmessage\"];\n\t\t\t\tif ($this->successmessage && !$this->failmessage)\n\t\t\t\t{\t$this->Redirect(\"courseresources.php?cid=\" . $this->course->id);\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tif ($this->resource->id && $_GET[\"delete\"] && $_GET[\"confirm\"])\n\t\t\t{\t$courseid = $this->resource->details[\"cid\"];\n\t\t\t\tif ($this->resource->Delete())\n\t\t\t\t{\t$this->Redirect(\"courseresources.php?cid=\" . $this->course->id);\n\t\t\t\t} else\n\t\t\t\t{\t$this->failmessage = \"Delete failed\";\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "function i4_assigned_courses() {\n global $wpcwdb, $wpdb;\n $wpdb->show_errors();\n\n $user_id = get_current_user_id();\n\n $SQL = \"SELECT * FROM $wpcwdb->courses ORDER BY course_title ASC\";\n\n $courseCount = 0;\n $courses = $wpdb->get_results($SQL);\n\n if ($courses) {\n foreach ($courses as $course) {\n\n $up = new UserProgress($course->course_id, $user_id);\n\n\n // Break out if the user doesn't have access to this course\n if (!$this->I4_LMS_User_Can_Access($course->course_id, $user_id)) {\n continue;\n }\n\n //Retrieve the modules for the users course\n $modules = WPCW_courses_getModuleDetailsList($course->course_id);\n\n //Determine the % of course completion\n $i4_percent_completed = $this->i4_lms_percent_course_completed($course->course_id, $modules, $user_id);\n\n //Get a list of the completed units. We'll search the completed units array\n $i4_completed_units = $this->i4_get_completed_units($course->course_id, $user_id);\n\n printf(__('<div class=\"my-course-wrapper\">'));\n printf(__('<div class=\"my-course-meta\">'));\n printf(__('<div class=\"my-course-title\" >'));\n printf(__('<h3 class=\"wpcw_tbl_progress_course\">Course - %s</h3>'), $course->course_title);\n printf(__('</div> <!-- end my-course-title -->'));\n printf(__('<div class=\"my-course-pct-complete\">%s%% Complete</div>'), $i4_percent_completed);\n printf(__('</div><!-- end course-meta -->'));\n\n printf('<div class=\"my-course-outline-wrapper\">');\n\n //Let's get the modules for the course\n if ($modules) {\n foreach ($modules as $module) {\n\n //get the units for the module\n $units = WPCW_units_getListOfUnits($module->module_id);\n\n //display the module title\n printf('<div class=\"my-course-module-title\">');\n printf(__('<p>%s</p>'), $module->module_title);\n printf('</div> <!-- end my-course-module-title -->');\n\n //create a table for each of the units in the module\n printf('<table class=\"my-course-units-table\">');\n\n //iterate through the units for the module\n if ($units) {\n foreach ($units as $unit) {\n printf('<tr>');\n printf('<td class=\"large-8 small-6 columns\">');\n printf(('<a href=\"%s\" title=\"%s\" class=\"my-course-link\"><i class=\"fa fa-play-circle-o\"></i> %s</a>'), get_the_permalink($unit->ID), $unit->post_title, $unit->post_title);\n // printf('</td>');\n printf('</td>');\n printf('<td class=\"large-4 small-6 columns\">');\n //If the unit is in the completed units array, display the completed checkmark.\n if (in_array($unit->ID, $i4_completed_units)) {\n printf('<div class=\"right completed-icon\"><i class=\"fa fa-check font-success completed-icon\"></i> Completed!</div>');\n }\n else {\n printf(__('<a class=\"button my-courses-button tiny blue right\" title=\"Begin %s\" href=\"%s\">Begin</a>'), $unit->post_title, get_the_permalink($unit->ID));\n }\n printf('</td>');\n printf('</tr>');\n }\n }\n\n printf('</table> <!-- my-course-units-table -->');\n\n }\n }\n\n /* printf('<table class=\"widefat wpcw_tbl wpcw_tbl_progress\">');\n\n printf('<thead>');\n printf('<th>%s</th>', __('Unit', 'wp_courseware'));\n printf('<th class=\"wpcw_center\">%s</th>', __('Completed', 'wp_courseware'));\n printf('<th class=\"wpcw_center wpcw_tbl_progress_quiz_name\">%s</th>', __('Quiz Name', 'wp_courseware'));\n printf('<th class=\"wpcw_center\">%s</th>', __('Quiz Status', 'wp_courseware'));\n printf('<th class=\"wpcw_center\">%s</th>', __('Actions', 'wp_courseware'));\n printf('</thead><tbody>');\n\n // #### 2 - Fetch all associated modules\n\n if ($modules)\n {\n foreach ($modules as $module)\n {\n // #### 3 - Render Modules as a heading.\n printf('<tr class=\"wpcw_tbl_progress_module\">');\n printf('<td colspan=\"3\">%s %d - %s</td>',\n __('Module', 'wp_courseware'),\n $module->module_number,\n $module->module_title\n );\n\n // Blanks for Quiz Name and Actions.\n printf('<td>&nbsp;</td>');\n printf('<td>&nbsp;</td>');\n printf('</tr>');\n\n // #### 4. - Render the units for this module\n $units = WPCW_units_getListOfUnits($module->module_id);\n if ($units)\n {\n foreach ($units as $unit)\n {\n $showDetailLink = false;\n\n printf('<tr class=\"wpcw_tbl_progress_unit\">');\n\n printf('<td class=\"wpcw_tbl_progress_unit_name\">%s %d - %s</td>',\n __('Unit', 'wp_courseware'),\n $unit->unit_meta->unit_number,\n $unit->post_title\n );\n\n // Has the unit been completed yet?\n printf('<td class=\"wpcw_tbl_progress_completed\">%s</td>', $up->isUnitCompleted($unit->ID) ? __('Completed', 'wp_courseware') : '');\n\n // See if there's a quiz for this unit?\n $quizDetails = WPCW_quizzes_getAssociatedQuizForUnit($unit->ID, false, $userID);\n\n // Render the quiz details.\n if ($quizDetails)\n {\n // Title of quiz\n printf('<td class=\"wpcw_tbl_progress_quiz_name\">%s</td>', $quizDetails->quiz_title);\n\n // No correct answers, so mark as complete.\n if ('survey' == $quizDetails->quiz_type)\n {\n $quizResults = WPCW_quizzes_getUserResultsForQuiz($userID, $unit->ID, $quizDetails->quiz_id);\n\n if ($quizResults)\n {\n printf('<td class=\"wpcw_tbl_progress_completed\">%s</td>', __('Completed', 'wp_courseware'));\n\n // Showing a link to view details\n $showDetailLink = true;\n printf('<td><a href=\"%s&user_id=%d&quiz_id=%d&unit_id=%d\" class=\"button-secondary\">%s</a></td>',\n admin_url('users.php?page=WPCW_showPage_UserProgess_quizAnswers'),\n $userID, $quizDetails->quiz_id, $unit->ID,\n __('View Survey Details', 'wp_courseware')\n );\n }\n\n // Survey not taken yet\n else {\n printf('<td class=\"wpcw_center\">%s</td>', __('Pending', 'wp_courseware'));\n }\n }\n\n // Quiz - show correct answers.\n else\n {\n $quizResults = WPCW_quizzes_getUserResultsForQuiz($userID, $unit->ID, $quizDetails->quiz_id);\n\n // Show the admin how many questions were right.\n if ($quizResults)\n {\n // -1% means that the quiz is needing grading.\n if ($quizResults->quiz_grade < 0) {\n printf('<td class=\"wpcw_center\">%s</td>', __('Awaiting Final Grading', 'wp_courseware'));\n }\n else {\n printf('<td class=\"wpcw_tbl_progress_completed\">%d%%</td>', number_format($quizResults->quiz_grade, 1));\n }\n\n\n // Showing a link to view details\n $showDetailLink = true;\n\n printf('<td><a href=\"%s&user_id=%d&quiz_id=%d&unit_id=%d\" class=\"button-secondary\">%s</a></td>',\n admin_url('users.php?page=WPCW_showPage_UserProgess_quizAnswers'),\n $userID, $quizDetails->quiz_id, $unit->ID,\n __('View Quiz Details', 'wp_courseware')\n );\n\n } // end of if printf('<td class=\"wpcw_tbl_progress_completed\">%s</td>'\n\n\n // Quiz not taken yet\n else {\n printf('<td class=\"wpcw_center\">%s</td>', __('Pending', 'wp_courseware'));\n }\n\n } // end of if survey\n } // end of if $quizDetails\n\n\n // No quiz for this unit\n else {\n printf('<td class=\"wpcw_center\">-</td>');\n printf('<td class=\"wpcw_center\">-</td>');\n }\n\n // Quiz detail link\n if (!$showDetailLink) {\n printf('<td>&nbsp;</td>');\n }\n\n printf('</tr>');\n }\n\n }\n\n }\n } */\n\n // printf('</tbody></table>');\n if ($i4_percent_completed == 100) {\n printf('<div class=\"my-courses-congrats\"><p class=\"text-center\"><i class=\"fa fa-check completed-icon\"></i> Congrats, Course Complete!</p></div>');\n }\n printf('</div> <!--end my-course-outline-wrapper -->');\n printf('</div> <!-- end my-course-wrapper -->');\n\n // Track number of courses user can actually access\n $courseCount++;\n\n } //end foreach courses as course\n\n // Course is not allowed to access any courses. So show a meaningful message.\n if ($courseCount == 0) {\n printf('You are not currently enrolled in a course. Please contact your Care Coordinator for assistance.', 'wp_courseware');\n }\n }\n\n }", "function init()\t{\n\t\tglobal $BACK_PATH;\n\t\t$this->strExtKey = 'tx_pbsurvey';\n\t\t$this->arrWizardParameters = GeneralUtility::_GP('P');\n\t\t$this->arrTableParameters = GeneralUtility::_GP($this->strExtKey);\n\t\t$this->objDoc = GeneralUtility::makeInstance('TYPO3\\CMS\\Backend\\Template\\DocumentTemplate');\n\t\t$this->objDoc->backPath = $BACK_PATH;\n\t\t$this->objDoc->JScode=$this->objDoc->wrapScriptTags('\n\t\t\tfunction jumpToUrl(URL,formEl)\t{\t//\n\t\t\t\tdocument.location = URL;\n\t\t\t}\n\t\t');\n\t\tlist($strRequestUri) = explode('#', GeneralUtility::getIndpEnv('REQUEST_URI'));\n\t\t$this->objDoc->form ='<form action=\"'.htmlspecialchars($strRequestUri).'\" method=\"post\" name=\"wizardConditions\">';\n\t\tif ($this->arrTableParameters['savedok'] || $this->arrTableParameters['saveandclosedok']) {\n\t\t\t$this->include_once[] = PATH_t3lib.'class.t3lib_tcemain.php';\n\t\t}\n\t}", "public function page_init() {\n }", "function wp_footer() {\n SLPlus_Actions::ManageTheScripts();\n\t\t}", "public function agreementPage()\n\t{\n $currentUser = $this->getCurrentUser(true);\n\n $this->putComponent(\"validation\", \"icheck\", \"select2\");\n $this->putScript(\"scripts/pages/agreement\");\n\n $user_language = $currentUser->getLanguage()->code;\n\n //if (!parent::template_exists(\"pages/agreement/{$user_language}.tpl\")) {\n $user_language = $this->translate->getSystemLanguageCode();\n //} else {\n //parent::display('pages/agreement/default.tpl');\n //}\n parent::display(\"pages/agreement/{$user_language}.tpl\");\n \n\t}", "protected function initJavascriptCode() {}", "function initialize () {\n $this->set_openingtag(\"<SCRIPT[]>\");\n\t $this->set_closingtag(\"</SCRIPT>\");\n }", "public function initPage( OutputPage $out ) {\n\t\tglobal $wgLocalStylePath;\n\t\tparent::initPage( $out );\n\t\t//TODO add responsive viewport\t$out->addHeadItem()\n\t\t\n\t\t$out->addScriptFile( '/skins/smoothwiki/js/bootstrap.js' );\n\t}", "private function setCourse()\n {\n return $this->Course = \"Biology\";\n }", "public function init()\n {\n $this->_helper->layout->setLayout('layout_admin_geral');\n $this->view->headScript()->appendFile($this->view->baseUrl('dist/js/promocao.js'));\n }", "function addCommonJs() {\n\t\t// call parent if need RunnerJS API \n\t\tRunnerPage::addCommonJs();\n\t\t\n\t\t$this->addJsGroupsAndRights();\t\t\n\t}", "function cynetic_init() {\n\n $pageIds = [1785, 1936];\n if(in_array(get_the_ID(), $pageIds)) {\n\n $popovercss = date(\"ymd-Gis\", filemtime( plugin_dir_path(__FILE__) . 'css/jquery.webui-popover.min.css'));\n wp_register_style('popovercss', plugins_url('css/jquery.webui-popover.min.css', __FILE__), false, $popovercss);\n wp_enqueue_style('popovercss');\n\n $cyneticcss = date(\"ymd-Gis\", filemtime( plugin_dir_path(__FILE__) . 'css/cynetic.css'));\n wp_register_style('cyneticcss', plugins_url('css/cynetic.css', __FILE__), false, $cyneticcss);\n wp_enqueue_style('cyneticcss');\n\n $popoverjs = date(\"ymd-Gis\", filemtime( plugin_dir_path(__FILE__) . 'js/jquery.webui-popover.min.js'));\n wp_enqueue_script('popoverjs', plugins_url('js/jquery.webui-popover.min.js', __FILE__), array(), $popoverjs);\n\n $cyneticjs = date(\"ymd-Gis\", filemtime( plugin_dir_path(__FILE__) . 'js/cynetic.js'));\n wp_enqueue_script('cyneticjs', plugins_url('js/cynetic.js', __FILE__), array(), $cyneticjs, true);\n\n //Register Ajax url\n wp_localize_script('cyneticjs', 'ajaxurl', admin_url( 'admin-ajax.php' ) );\n\n }\n}", "private function addScripts() {\n global $CFG; \n $script = \"<script type=\\\"text/javascript\\\">\n jQuery(document).ready(function() {\n codeActivity.initEdit(); \n codeActivity.ajaxURL = '\" . $CFG->wwwroot . \"/mod/codeactivity/ajax.php';\n codeActivity.lang = {\n empty_name: '\" . addslashes(get_string('js_empty_name', 'codeactivity')) . \"',\n empty_test_code: '\" . addslashes(get_string('js_empty_test_code', 'codeactivity')).\"',\n error_add: '\" . addslashes(get_string('js_error_add', 'codeactivity')).\"',\n error_delete: '\" . addslashes(get_string('js_error_delete', 'codeactivity')).\"',\n error_forbidden: '\" . addslashes(get_string('js_error_forbidden', 'codeactivity')).\"'\n }\n });\n </script>\";\n \n $this->_form->addElement('html', $script);\n }", "function footer_js(){?>\n <script>\n jQuery(document).ready(function(){\n jQuery('.load').addClass('loaded');\n });\n </script>\n <?php\n}", "protected function _init() {\n\t\tadd_action( 'cmb2_init', array( $this, 'custom_page_details' ) );\n\t\tadd_action( 'cmb2_init', array( $this, 'custom_page_itinerary' ) );\n\t\tadd_action( 'cmb2_init', array( $this, 'custom_page_content' ) );\n\t\tadd_action( 'cmb2_init', array( $this, 'custom_page_faculty' ) );\n\t}", "public function load_settings_page() : void {\n\n\t\t\tglobal $learndash_assets_loaded;\n\n\t\t\tself::enqueue_support_assets();\n\n\t\t\t$learndash_assets_loaded['styles']['learndash-admin-help-page-style'] = __FUNCTION__;\n\n\t\t\t$learndash_assets_loaded['scripts']['learndash-admin-help-page-script'] = __FUNCTION__;\n\t\t}", "public function after() {\n $this->template->header = View::factory('manage/partial/header')\n ->set('user', Auth::instance()->get_user());\n $this->template->menu = View::factory('manage/partial/menu');\n parent::after();\n }", "function cm_add_meta_box_course() {\n\n\t$screens = array( 'course' );\n\n\n$post_id = $_GET['post'] ? $_GET['post'] : $_POST['post_ID'] ;\n // check for a template type\n \n \n\tforeach ( $screens as $screen ) {\n\n\t\n add_meta_box(\n\t\t\t'myplugin_sectionid',\n\t\t\t__( 'Course Information', 'lps_wp' ),\n\t\t\t'cm_meta_box_course_callback',\n\t\t\t$screen\n\t\t);\n \n\t\t\n\t}\n}", "function InitializePage();", "protected function generatePageFooter() \r\n {\r\n echo <<<HTML\r\n </article>\r\n <script src=\"CityWok.js\"> </script>\r\n </body>\r\n</html>\r\nHTML;\r\n }", "function initialize () {\n $this->set_openingtag(\"<SCRIPT[attributes]>\");\n\t $this->set_closingtag(\"</SCRIPT>\");\n }", "protected function block_javascript_file() {\n\t\tadd_action( 'dynamic_sidebar', array( $this, 'display_div_message_to_go_to_consent_settings' ), 10, 1 );\n\t}", "public function initContent()\n {\n Hook::exec('displayFooter');\n parent::initContent();\n $this->addJS(_THEME_JS_DIR_.'index.js');\n $this->addJS(_THEME_JS_DIR_.'ckplayer/ckplayer.min.js');\n if($this->context->shop->theme_name=='uniwigs2016-m'){\n $this->removeJS(array(\n '/js/jquery/plugins/fancybox/jquery.fancybox.js',\n '/js/jquery/plugins/jquery.scrollTo.js',\n '/themes/uniwigs2016-m/js/autoload/15-jquery.uniform-modified.js',\n '/themes/uniwigs2016-m/js/modules/blockwishlist/js/ajax-wishlist.js',\n '/themes/uniwigs2016-m/js/modules/blockcart/ajax-cart.js',\n ));\n $this->addCSS(_THEME_MOBILE_CSS_DIR_.'qietu.css');\n $this->addCSS(_THEME_MOBILE_CSS_DIR_.'style.css');\n }\n if($this->context->shop->theme_name=='uniwigs2016'){\n $this->removeJS(array(\n '/js/jquery/plugins/fancybox/jquery.fancybox.js',\n '/js/jquery/plugins/jquery.scrollTo.js',\n '/themes/uniwigs2016/js/autoload/15-jquery.uniform-modified.js',\n '/themes/uniwigs2016/js/modules/blockwishlist/js/ajax-wishlist.js'\n ));\n $this->removeCSS(array(\n '/js/jquery/plugins/fancybox/jquery.fancybox.css',\n '/themes/uniwigs2016/css/autoload/uniform.default.css',\n '/themes/uniwigs2016/css/modules/blockwishlist/blockwishlist.css',\n ));\n $this->addCSS(_THEME_CSS_DIR_.'index.css');\n }\n $this->context->smarty->assign(array(\n 'HOOK_HOME' => Hook::exec('displayHome'),\n 'HOOK_HOME_TAB' => Hook::exec('displayTopColumn'),\n 'HOOK_HOME_TAB_CONTENT' => Hook::exec('displayTop'),\n ));\n $this->setTemplate(_PS_THEME_DIR_.'index.tpl');\n }", "function CoursesBodyContent()\n\t{\tif ($this->can_resources)\n\t\t{\techo $this->course->HeaderInfo(), \"<div class='clear'></div>\\n\", $this->resource->InputForm($this->course->id);\n\t\t}\n\t}" ]
[ "0.7373684", "0.6440538", "0.6020154", "0.6003048", "0.594599", "0.59278363", "0.5927176", "0.5828932", "0.57978743", "0.5784185", "0.5766423", "0.5741462", "0.57263666", "0.5693643", "0.5680896", "0.5660678", "0.56432235", "0.5604433", "0.5596582", "0.5553723", "0.554783", "0.55390567", "0.552803", "0.55254906", "0.551462", "0.55138165", "0.55110264", "0.5506412", "0.55033183", "0.5479322", "0.5478451", "0.54738396", "0.54738396", "0.54708314", "0.5468754", "0.5457926", "0.5454073", "0.54411024", "0.54275274", "0.54260916", "0.54224694", "0.5422104", "0.5415277", "0.54146487", "0.5414155", "0.5407446", "0.54012555", "0.53978366", "0.53961647", "0.5390633", "0.538883", "0.53812236", "0.5364323", "0.5351095", "0.53498673", "0.5346746", "0.53424424", "0.5330355", "0.53300947", "0.5328731", "0.5308323", "0.53075033", "0.53015643", "0.5297033", "0.5281026", "0.52796817", "0.5270072", "0.5267121", "0.5263018", "0.5260437", "0.52515227", "0.52478385", "0.5247488", "0.5246636", "0.52438813", "0.52419037", "0.5234932", "0.5232598", "0.5229971", "0.5226003", "0.5219989", "0.5212652", "0.52086675", "0.52029413", "0.52006114", "0.51997846", "0.519972", "0.51988035", "0.51982975", "0.51949793", "0.5184615", "0.5179215", "0.51783246", "0.51772857", "0.5176489", "0.5175427", "0.51642394", "0.5159793", "0.515866", "0.51567376" ]
0.7697851
0
Loads the required jquery & JS needed for course menu
private function page_load_main_course_js() { global $PAGE, $COURSE, $CFG; //get page url - if not set then ignore it $url = $PAGE->has_set_url() ? $PAGE->url : ""; //check if its the main course view page $regex_url = "/" . preg_quote($CFG->wwwroot . "/course/view.php?id=", "/") . "[\d]*" . "[\d]*/"; $is_course_main = preg_match($regex_url, $url); //check if course mod_edit page $regex_editing_url = "/" . preg_quote($CFG->wwwroot . "/course/edit.php?id=", "/") . "[\d]*/"; $is_course_editing_main = preg_match($regex_editing_url, $url); //if either if main view or main edit if($is_course_main === 1 || $is_course_editing_main === 1) { //load jquery $this->cmf_load_jQuery(); //dynamic colors $PAGE->requires->css('/course/format/course_menu/dynamic_colors.php?id=' . $COURSE->id); //if main page if($is_course_main === 1) { $context = context_course::instance($COURSE->id);//get context $is_editting = $PAGE->user_is_editing() and has_capability('moodle/course:update', $context);//is editing mode //if were not editing, then override display css (display only css) if (!$is_editting) $PAGE->requires->css('/course/format/course_menu/display_override.css'); } //if editing if ($is_course_editing_main === 1) { $PAGE->requires->css('/course/format/course_menu/jquery/plugin/colorpicker/jquery.colorpicker.css'); $PAGE->requires->js('/course/format/course_menu/jquery/plugin/colorpicker/jquery.colorpicker.js'); $PAGE->requires->js('/course/format/course_menu/init.js'); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function cmf_load_jQuery() {\n global $PAGE;\n\n if (moodle_major_version() >= '2.5') {\n $PAGE->requires->jquery();\n $PAGE->requires->jquery_plugin('migrate');\n $PAGE->requires->jquery_plugin('ui');\n $PAGE->requires->jquery_plugin('ui-css');\n } else {\n $PAGE->requires->js(\"/course/format/course_menu/jquery/jquery-1.9.1.js\");\n $PAGE->requires->js(\"/course/format/course_menu/jquery/jquery-ui.min.js\");\n $PAGE->requires->css(\"/course/format/course_menu/jquery/themes/base/jquery.ui.all.css\");\n }\n \n $PAGE->requires->js(\"/course/format/course_menu/display.js\");\n \n }", "function load_jQuery() {\n global $PAGE, $DB, $COURSE;\n\n dd_content_inline_js();\n $this->dd_content_inline_js(); //some inline JS for php info\n dd_content_load_jQuery();\n $PAGE->requires->js(\"/blocks/dd_content/dd_content.js\");\n }", "function adventure_js() {\r\n wp_enqueue_script('adventure-menu-scrolling', get_template_directory_uri() . '/js/jquery.menu.scrolling.js', array('jquery'), '1.1', true);\r\n wp_enqueue_script('adventure-main', get_template_directory_uri() . '/js/main.js', array('jquery'), '1.0', true);\r\n wp_enqueue_script('adventure-doubletaptogo', get_template_directory_uri() . '/js/doubletaptogo.min.js', array('jquery'), '1.0', true); }", "protected function loadJavaScripts()\n {\n $this->pageRenderer->loadJquery();\n $this->pageRenderer->loadRequireJsModule('bootstrap');\n $this->pageRenderer->loadRequireJsModule('TYPO3/CMS/Backend/ContextHelp');\n $this->pageRenderer->loadRequireJsModule('TYPO3/CMS/Backend/DocumentHeader');\n $this->pageRenderer->loadRequireJsModule('TYPO3/CMS/Backend/SplitButtons');\n }", "function load_js_css() {\n\n\t\t\twp_register_script( 'fontawesome-all', get_stylesheet_directory_uri() . '/js/fontawesome-all.min.js', array( 'jquery' ), Project045_Definitions::$scripts_version, true );\n\t\t\twp_register_script( 'owl', get_stylesheet_directory_uri() . '/js/owl.carousel.min.js', array( 'jquery' ), Project045_Definitions::$scripts_version, true );\n\t\t\twp_register_script( 'selectric', get_stylesheet_directory_uri() . '/js/jquery.selectric.min.js', array( 'jquery' ), Project045_Definitions::$scripts_version, true );\n\t\t\twp_register_script( 'select', get_stylesheet_directory_uri() . '/js/select.min.js', array( 'jquery' ), Project045_Definitions::$scripts_version, true );\n\t\t\twp_register_script( 'jquery-ui', get_stylesheet_directory_uri() . '/js/jquery-ui.min.js', array( 'jquery' ), Project045_Definitions::$scripts_version, true );\n\t\t\twp_register_script( 'tab_menu', get_stylesheet_directory_uri() . '/js/tab_menu.min.js', array( 'jquery' ), Project045_Definitions::$scripts_version, true );\n\t\t\twp_register_script( 'aos', get_stylesheet_directory_uri() . '/js/aos.min.js', array( 'jquery' ), Project045_Definitions::$scripts_version, true );\n\t\t\twp_register_script( 'rangeslider', get_stylesheet_directory_uri() . '/js/rangeslider.min.js', array( 'jquery' ), Project045_Definitions::$scripts_version, true );\n\t\t\twp_register_script( 'bootstrap', get_stylesheet_directory_uri() . '/js/bootstrap.min.js', array( 'jquery' ), Project045_Definitions::$scripts_version, true );\n\t\t\twp_register_script( 'easymap', get_stylesheet_directory_uri() . '/js/easymap.plugin.min.js', array( 'jquery' ), Project045_Definitions::$scripts_version, true );\n\t\t\twp_register_script( 'markerclusterer', get_stylesheet_directory_uri() . '/js/markerclusterer.min.js', array(), Project045_Definitions::$scripts_version, true );\n\t\t\twp_register_script( 'customscrollbar', get_stylesheet_directory_uri() . '/js/jquery.mCustomScrollbar.concat.min.js', array( 'jquery' ), Project045_Definitions::$scripts_version, true );\n\t\t\twp_register_script( 'ddslick', get_stylesheet_directory_uri() . '/js/jquery.ddslick.min.js', array( 'jquery' ), Project045_Definitions::$scripts_version, true );\n\t\t\twp_register_script( 'project045-main', get_stylesheet_directory_uri() . '/js/main.min.js', array( 'jquery' ), Project045_Definitions::$scripts_version, true );\n\n\t\t\twp_enqueue_script( 'fontawesome-all' );\n\t\t\twp_enqueue_script( 'owl' );\n\t\t\twp_enqueue_script( 'selectric' );\n\t\t\twp_enqueue_script( 'select' );\n\t\t\twp_enqueue_script( 'jquery-ui' );\n\t\t\twp_enqueue_script( 'tab_menu' );\n\t\t\twp_enqueue_script( 'aos' );\n\t\t\twp_enqueue_script( 'rangeslider' );\n\t\t\twp_enqueue_script( 'bootstrap' );\n\t\t\twp_enqueue_script( 'easymap' );\n\t\t\twp_enqueue_script( 'markerclusterer' );\n\t\t\twp_enqueue_script( 'customscrollbar' );\n\t\t\twp_enqueue_script( 'ddslick' );\n\t\t\twp_enqueue_script( 'project045-main' );\n\n\t\t}", "protected function loadJavascript() {}", "public function initialize() {\n parent::initialize();\n Gdn_Theme::section('Dashboard');\n $this->addJsFile('log.js');\n $this->addJsFile('jquery.expander.js');\n $this->addJsFile('jquery-ui.min.js');\n $this->addJsFile('jquery.popup.js');\n }", "public function initializeJQuery() {\n $this->addToHead(\"<script src=\\\"https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js\\\"></script>\",\n Page::BOTTOM);\n }", "public function get_required_javascript() {\n parent::get_required_javascript();\n\n $this->page->requires->jquery();\n }", "private function fn_load_scripts() {\n\n\t\t/**\n\t\t * Load Common CSS and JS for a blank Page\n\t\t */\n\n\t\t$fixed_version = $this->fixed_version;\n\t\t$common_css_version = '0.3';\n\t\t$common_js_version = '0.1';\n\t\t$custom_css_version = '0.4';\n\t\t$custom_js_version = '0.4';\n\n\t\t$registered_styles = $this->registered_css;\n\t\t$registered_scripts = $this->registered_js;\n\n\t\t/**\n\t\t * Load CSS--------------------------------------------------------------\n\t\t */\n\n /** Load Google Fonts */\n\t\t$this->google_fonts['google_opensans'] = $registered_styles['google_opensans'];\n\n\t\t/** Load CSS Assets @todo Move the components in their containers */\n\t\t\n\t\t$this->css_assets['bootstrap'] = $registered_styles['bootstrap'].\"?ver=\".$fixed_version;\n\t\t$this->css_assets['fontawesome'] = $registered_styles['fontawesome'].\"?ver=\".$fixed_version;\n\t\t\n\t\t/**\n\t\t * Load JS--------------------------------------------------------------\n\t\t */\n\t\t\n\t\t/** Load footer js **/\n\t\t$this->footer_js['jquery'] = $registered_scripts['jquery'].\"?ver=\".$fixed_version;\t\t\n\t\t$this->footer_js['jquery-ui'] = $registered_scripts['jquery-ui'].\"?ver=\".$fixed_version;\n\n\t\t$this->footer_js['bootstrap'] = $registered_scripts['bootstrap'].\"?ver=\".$fixed_version;\n\t\t/**let other controllers load their own css/js files **/\n\t}", "protected function loadJavaScripts() {}", "public function loadAssets() {\r\n\t\t$this->app->document->addScript('elements:relateditems/relateditems.js');\r\n\t}", "function load_core_js() {\n\t\t\n\t\t\t// removes built in jquery\n\t\t\twp_deregister_script('jquery');\n\n\t\t\t// grabs version 1.8.2 from CDN and enqueues below\n\t\t\twp_register_script('jquery',\"http\".($_SERVER['SERVER_PORT'] == 443 ? \"s\" : \"\") . \"://ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js\", false, null);\n\n\t\t\twp_enqueue_script('jquery');\n\n\t\t\t// enqueues bootstrap\n\t\t\twp_enqueue_script('bootstrap',get_bloginfo('template_directory').'/assets/js/bootstrap.min.js',dirname(__FILE__),array('jquery'),true);\n\n\t\t\t// loads in app.js (place all custom JS in here)\n\t\t\twp_register_script('app',get_bloginfo('template_directory').'/assets/js/app.js',dirname(__FILE__),array('jquery'),true);\n\n\t\t\t// localises for AJAX calls\n\t\t\twp_localize_script('app','ajax_url',array('ajaxurl'=>admin_url('admin-ajax.php')));\n\n\t\t\twp_enqueue_script('app');\n\t\t\t\n\t\t}", "protected function _initDependencies()\n {\n // Loading jsonp library for cross-domain AJAX requests\n $this->view->headScript()->appendFile('/scripts/jquery/plugins/jsonp/jquery.jsonp-2.4.0.min.js?' .\n SCRIPT_VERSION_JS);\n// $this->view->headScript()->appendFile('/scripts/libraries/content/plugins/jqueryForm/jquery.form.js');\n }", "function flexiauto_scripts_loader() {\n\t\t/* Load custom styles */\n\t\twp_enqueue_style('reset', TPL_DIR . '/assets/css/vendor/reset.css');\n\t\twp_enqueue_style('bootstrap-styles', TPL_DIR . '/assets/css/vendor/bootstrap.min.css');\n\t\twp_enqueue_style('flexi-styles', TPL_DIR . '/assets/css/flexi.min.css');\n\n\t\t/* Load custom scripts */\n\t\twp_deregister_script('jquery');\n\t\twp_register_script('jquery', TPL_DIR . '/assets/js/vendor/jquery.min.js', array(), false, true);\n\t\twp_enqueue_script('jquery');\n\n\t\twp_enqueue_script('bootstrap-scripts', TPL_DIR . '/assets/js/vendor/bootstrap.min.js', array(), false, true);\n\t\twp_enqueue_script('nicescroll', TPL_DIR . '/assets/js/vendor/jquery.nicescroll.min.js', array(), false, true);\n\t\twp_enqueue_script('jquery-validate', TPL_DIR . '/assets/js/vendor/jquery.validate.min.js', array(), false, true);\n\t\twp_enqueue_script('match-height', TPL_DIR . '/assets/js/vendor/jquery.matchHeight.min.js', array(), false, true);\n\t\twp_enqueue_script('flexi-scripts', TPL_DIR . '/assets/js/flexi.min.js', array(), false, true);\n\n\t}", "public static function em_enqueue_scripts(){\n\t\twp_enqueue_script('events-manager-pro', plugins_url('includes/js/events-manager-pro.js',__FILE__), array('jquery'), EMP_VERSION); //jQuery will load as dependency\n\t}", "public function addDependencies()\n {\n $this->Html->script('/attachments/js/vendor/jquery.ui.widget.js', ['block' => true]);\n $this->Html->script('/attachments/js/vendor/jquery.iframe-transport.js', ['block' => true]);\n $this->Html->script('/attachments/js/vendor/jquery.fileupload.js', ['block' => true]);\n $this->Html->script('/attachments/js/app/lib/AttachmentsWidget.js', ['block' => true]);\n $this->Html->css('/attachments/css/attachments.css', ['block' => true]);\n }", "function aqa_gallery_scripts() {\n\twp_enqueue_script( 'aqa-gallery-menu', get_stylesheet_directory_uri() . '/aqa-gallery-menu.js', array('jquery') );\n}", "function wa_wcc_load_scripts($jquery_true) {\n\n\t\twp_register_style('wa_wcc_mtree_css_file', get_template_directory_uri().'/plugin/collapse/assets/css/mtree.css');\n\t\twp_enqueue_style('wa_wcc_mtree_css_file');\n\n\n\t\tif($this->options['configuration']['load_velocity'] === TRUE) {\n\n\t wp_register_script('wa_wcc_velocity',get_template_directory_uri().'/plugin/collapse/assets/js/jquery.velocity.min.js',array('jquery'),'',($this->options['configuration']['loading_place'] === 'header' ? false : true));\n\t wp_enqueue_script('wa_wcc_velocity'); \n\n\t\t}\n\n\t}", "function cnew_load_scripts() {\r\n wp_register_script( 'cnew-js-admin', CNEW_PLUGIN_URL . 'includes/js/cne-workshops-admin.js', array( 'jquery', 'jquery-ui-core', 'jquery-ui-datepicker', 'cnew-js-jquery-validate' ), '', true );\r\n wp_register_script( 'cnew-js-jquery-mask', CNEW_PLUGIN_URL . 'includes/js/jquery.maskedinput.min.js', array( 'jquery' ), '', true );\r\n wp_register_script( 'cnew-js-jquery-validate', CNEW_PLUGIN_URL . 'includes/js/jquery.validate.min.js', array( 'jquery' ), '', true );\r\n wp_register_style( 'cnew-css-admin', CNEW_PLUGIN_URL . 'includes/css/cne-workshops-admin.css' );\r\n wp_register_style( 'cnew-css-jquery', 'https://ajax.googleapis.com/ajax/libs/jqueryui/1.12.1/themes/smoothness/jquery-ui.css' );\r\n\r\n wp_enqueue_script( 'cnew-js-admin' );\r\n wp_enqueue_script( 'cnew-js-jquery-mask' );\r\n wp_enqueue_style( 'cnew-js-jquery-validate' );\r\n wp_enqueue_style( 'cnew-css-admin' );\r\n wp_enqueue_style( 'cnew-css-jquery' );\r\n }", "public function wpzoom_helper_guide_load_scripts() {\n\n\t\twp_enqueue_style(\n\t\t\t'wpzoom_helper_guide_admin_css',\n\t\t\t$this->get_css_uri( 'wpzoom-helper-guide.css' ),\n\t\t\tarray(),\n\t\t\tWPZOOM::$wpzoomVersion\n\t\t);\n\n\t\twp_enqueue_script(\n\t\t\t'wpzoom_helper_guide_markdown_js',\n\t\t\t$this->get_js_uri( 'marked.js' ),\n\t\t\tarray(),\n\t\t\tWPZOOM::$wpzoomVersion,\n\t\t\ttrue\n\t\t);\n\n\t\twp_enqueue_script(\n\t\t\t'wpzoom_helper_guide_admin_js',\n\t\t\t$this->get_js_uri( 'wpzoom-helper-guide.js' ),\n\t\t\tarray(),\n\t\t\tWPZOOM::$wpzoomVersion,\n\t\t\ttrue\n\t\t);\n\n\t}", "public function config_page_scripts() {\n\t\twp_enqueue_script( 'yseo-gc-admin-js', HS_DOCS_API_DIR_URL . 'js/admin.min.js', null, HS_DOCS_API_PLUGIN_VERSION );\n\t}", "public function loadHeaderJS() {\n\t\tglobal $m, $a;\n\t\t\n\t\t// load the js base.php\n\t\tinclude apmgetConfig ( 'root_dir' ) . '/js/base.php';\n\t\t\n\t\t// Search for the javascript files to load.\n\t\tif (! isset ( $m )) {\n\t\t\treturn;\n\t\t}\n\t\t$root = apm_BASE_DIR;\n\t\tif (substr ( $root, - 1 ) != '/') {\n\t\t\t$root .= '/';\n\t\t}\n\t\t\n\t\t$base = apm_BASE_URL;\n\t\tif (substr ( $base, - 1 ) != '/') {\n\t\t\t$base .= '/';\n\t\t}\n\t\t// Load the basic javascript used by all modules.\n\t\techo '<script type=\"text/javascript\" src=\"' . $base . 'js/base.js\"></script>';\n\t\t\n\t\t$this->getModuleJS ( $m, $a, true );\n\t}", "function accordion_scripts() {\n\twp_enqueue_script( 'aqa-sidebar-accordion', get_stylesheet_directory_uri() . '/aqa-sidebar-accordion.js', array('jquery') );\n}", "function javascript_adition(){\t\n\t\tif ( ! is_admin() ) : \n\t\t\twp_enqueue_script('jquery');\n\t\t\twp_enqueue_script('healerswiki_js',plugins_url('/',__FILE__).'js/script.js',array('jquery'));\n\t\tendif;\t\t\t\n\t\t\t\t\n\t}", "public function ot_ccpa_plugin_scripts() {\n\t\twp_enqueue_script( 'jquery' );\n\t}", "function rb_load_javascript()\n{\n wp_enqueue_script(\n 'rb-main-javascript',\n get_stylesheet_directory_uri() . '/main.js',\n array( 'jquery' )\n );\n wp_enqueue_script(\"myUi\",\"https://ajax.googleapis.com/ajax/libs/jqueryui/1.8.8/jquery-ui.min.js\");\n}", "function upcode_loadJS(){\n if (!is_admin()){\n\t\t// desregistrando o jquery nativo e registrando o do CDN do Google.\n\t\twp_deregister_script('jquery');\n\t\twp_register_script('jquery', '//cdnjs.cloudflare.com/ajax/libs/jquery/3.2.1/jquery.min.js', false, '3.2.1');\n\t\twp_enqueue_script('jquery');\n\n\t\t$js = get_template_directory_uri() . '/assets/js/';\n\t\twp_enqueue_script('propper',\t\t\t\t'//cdnjs.cloudflare.com/ajax/libs/popper.js/1.11.0/umd/popper.min.js', ['jquery']);\n\t\twp_enqueue_script('bootstrap-min',\t'//maxcdn.bootstrapcdn.com/bootstrap/4.0.0-beta/js/bootstrap.min.js', ['jquery','propper']);\n\t\twp_enqueue_script('fancybox',\t\t\t\t'//cdn.rawgit.com/fancyapps/fancybox/master/dist/jquery.fancybox.min.js', ['jquery']);\n\t\twp_enqueue_script('slick',\t\t\t\t\t'//cdnjs.cloudflare.com/ajax/libs/slick-carousel/1.7.1/slick.min.js', ['jquery']);\n\t\twp_enqueue_script('fontawesome',\t\t'//use.fontawesome.com/releases/v5.0.8/js/all.js', ['jquery']);\n\t\twp_enqueue_script('v4-shims',\t\t\t\t'//use.fontawesome.com/releases/v5.0.8/js/v4-shims.js', ['jquery']);\n\n\t\twp_enqueue_script('offcanvas',\t\t$js . 'bootstrap.offcanvas.min.js', ['jquery']);\n\t\twp_enqueue_script('acf-maps', \t\t$js . 'maps.js', ['jquery']);\n\t\twp_enqueue_script('mask', \t\t\t\t$js . 'jquery.mask.min.js', ['jquery']);\n\t\twp_enqueue_script('codigo', \t\t\t$js . 'codigo.js', ['jquery']);\n }\n}", "function qode_lms_enqueue_scripts_for_quiz() {\n\t\twp_enqueue_script( 'simple-countdown', QODE_LMS_CPT_URL_PATH . '/quiz/assets/js/plugins/jquery.vtimer.min.js', array( 'jquery' ), false, true );\n\t}", "function load_admin_script() {\n\t// Enqueue Styles\n\n\t// Enqueue Scripts\n\twp_enqueue_script( 'libguides', get_template_directory_uri() . '/assets/js/admin/libguides.js', 'jquery', '1.0', true );\n\n}", "function teaching_guide_scripts() {\n\twp_enqueue_style( 'teaching-guide-style', get_stylesheet_uri() );\n\n\twp_enqueue_script( 'modernizer', get_template_directory_uri() . '/js/vendor/modernizr-2.8.3.min.js', array(), '20170320', true );\n\twp_enqueue_script( 'readmore', get_template_directory_uri() . '/js/readmore.min.js', array(), '20170418', true );\n\twp_enqueue_script( 'stickykit', get_template_directory_uri() . '/js/sticky-kit.min.js', array(), '20170418', true );\n\twp_enqueue_script( 'main', get_template_directory_uri() . '/js/main.min.js', array(), '', true );\n\n\tif ( is_singular() && comments_open() && get_option( 'thread_comments' ) ) {\n\t\twp_enqueue_script( 'comment-reply' );\n\t}\n}", "function ineedmyjava() {\n\tif (!is_admin()) {\n \n\t\twp_deregister_script('jquery');\n\t\twp_register_script('jquery', 'http://ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js', false, '1.11.0', true);\n\t\twp_enqueue_script('jquery');\n\t\t\n\t\t// other scripts...\n\t\twp_register_script(\n\t\t\t'custom',\n\t\t\tget_bloginfo('template_directory') . '/js/custom.js',\n\t\t\tarray('jquery') );\n\t\twp_enqueue_script('custom');\n\t\t\n\t\t\n\t\t// other scripts...\n\t\twp_register_script(\n\t\t\t'isotope',\n\t\t\tget_bloginfo('template_directory') . '/js/isotope.js',\n\t\t\tarray('jquery') );\n\t\twp_enqueue_script('isotope');\n\t\t\n\t\t\n\t\t// other scripts...\n\t\twp_register_script(\n\t\t\t'images',\n\t\t\tget_bloginfo('template_directory') . '/js/images-loaded.js',\n\t\t\tarray('jquery') );\n\t\twp_enqueue_script('images');\n\t\t\n\t\t\n\t\t// other scripts...\n\t\twp_register_script(\n\t\t\t'bootstrap',\n\t\t\tget_bloginfo('template_directory') . '/js/bootstrap.js',\n\t\t\tarray('jquery') );\n\t\twp_enqueue_script('bootstrap');\n\t\t\n\t\t\n\t\t// other scripts...\n\t\twp_register_script(\n\t\t\t'colorbox',\n\t\t\tget_bloginfo('template_directory') . '/js/colorbox.js',\n\t\t\tarray('jquery') );\n\t\twp_enqueue_script('colorbox');\n\t\t\n\t\t\n\t\t\n\t}\n}", "static function include_scripts(){\n\t\t//self::include_css();\n\t\tself::include_js();\n\t}", "public function admin_js()\n\t\t{\n\t\t\twp_enqueue_script('jquery');\n\t\t}", "function bb_mystique_load_scripts() {\r\n\tif( bb_get_mystique_option( 'jquery' ) )\r\n\t\twp_enqueue_script( 'bb-mystique', bb_get_active_theme_uri() . 'js/jquery.mystique.js', array( 'jquery' ), BB_MYSTIQUE_THEME_VERSION );\r\n}", "public function load_assets() {\n\t\t\t//only load styles and js when needed\n\t\t\tif ( $this->is_edit_page() ) {\n\t\t\t\t//styles\n\t\t\t\twp_enqueue_style( 'thickbox' );\n\t\t\t\twp_enqueue_style( 'fancybox' );\n\t\t\t\twp_enqueue_style( 'wm-options-panel-white-label' );\n\t\t\t\tif ( ! wm_option( 'branding-panel-logo' ) && ! wm_option( 'branding-panel-no-logo' ) )\n\t\t\t\t\twp_enqueue_style( 'wm-options-panel-branded' );\n\t\t\t\twp_enqueue_style( 'color-picker' );\n\n\t\t\t\t//scripts\n\t\t\t\twp_enqueue_script( 'jquery-ui-core' );\n\t\t\t\twp_enqueue_script( 'jquery-ui-tabs' );\n\t\t\t\twp_enqueue_script( 'jquery-ui-datepicker' );\n\t\t\t\twp_enqueue_script( 'jquery-ui-slider' );\n\t\t\t\twp_enqueue_script( 'thickbox' );\n\t\t\t\twp_enqueue_script( 'fancybox' );\n\t\t\t\twp_enqueue_script( 'wm-options-panel' );\n\t\t\t\twp_enqueue_script( 'color-picker' );\n\t\t\t}\n\t\t}", "function load_scripts() {\n\t\tglobal $redux_options;\n\t\twp_enqueue_script(\"jquery\");\n\n\t\t$bs = $redux_options['opt-bootstrap'];\n\n\t\tif ( $bs == 1 ) {\n\t\t\t//Load from CDN//\n\t\t\twp_enqueue_script( 'bootstrap-script', '//maxcdn.bootstrapcdn.com/bootstrap/3.3.2/js/bootstrap.min.js', array( 'jquery' ), '3.3.2', true );\n\t\t} elseif ( $bs == 2 ) {\n\t\t\t//Load from plugin//\n\t\t\twp_enqueue_script( 'bootstrap-script', dirname( __FILE__ ).'/assets/bootstrap/js/bootstrap.min.js', array( 'jquery' ), '3.3.2', true );\n\t\t} elseif ( $bs == 3 ) {\n\t\t\t//load from nowhere... They have it loaded elsewhere... lets check to be sure though\n\t\t} else {\n\t\t\t//load from plugin. (fallback)//\n\t\t\twp_enqueue_script( 'bootstrap-script', dirname( __FILE__ ).'/assets/bootstrap/js/bootstrap.min.js', array( 'jquery' ), '3.3.2', true );\n\t\t}\n\t\t\n\t\twp_enqueue_script( 'google-maps-api', 'http://maps.google.com/maps/api/js?sensor=false', array(), '3', false );\n\t}", "public function dt_icon_list_loadCssAndJs() {\n wp_register_style( 'dt_extend_style', plugins_url('assets/droit-wbpakery-addons.css', __FILE__) );\n // If you need any javascript files on front end, here is how you can load them.\n //wp_enqueue_script( 'droit-wbpakery-addons_js', plugins_url('assets/droit-wbpakery-addons.js', __FILE__), array('jquery') );\n }", "public function loadScripts() {\n $graphcss = $this->getProperty('graphcss');\n $customcss = $this->getProperty('customcss');\n $loadjquery = $this->getProperty('loadjquery');\n\n $cssUrl = $this->sekug->config['cssUrl'].'web/';\n $jsUrl = $this->sekug->config['jsUrl'].'web/';\n\n if($loadjquery == 1){\n $this->modx->regClientStartupScript($jsUrl.'libs/'.$this->sekug->config['jqueryFile']);\n }\n if($customcss>''){\n $this->modx->regClientCSS($this->modx->getOption('assets_url').$customcss);\n } else {\n $this->modx->regClientCSS($cssUrl.'gallery.structure.css');\n }\n if($graphcss>''){\n $this->modx->regClientCSS($this->modx->getOption('assets_url').$graphcss);\n } else {\n $this->modx->regClientCSS($cssUrl.'directory.graph.css');\n }\n }", "public function widget_scripts() {\n\t\twp_register_script( 'elementor-daytoday', plugins_url( '/assets/js/dropdown.js', __FILE__ ), [ 'jquery' ], false, true );\n\t\twp_enqueue_script(\n\t\t\t'elementor-daytoday'\n\t\t);\n\t}", "public function init_widget_js() {\n\t\tif ( WP_DEBUG ) {\n\t\t\t?>\n\t\t\t<!-- <?php echo __FILE__; ?>-->\n\t\t\t<?php\n\t\t}\n\t\t?>\n\t\t<script>\n\t\t\tif ( typeof ( advanced_sidebar_menu ) !== 'undefined' ) {\n\t\t\t\tadvanced_sidebar_menu.init();\n\t\t\t}\n\t\t</script>\n\t\t<?php\n\t}", "function capstone_frontend_js() {\n\t\tif ( !is_admin() ) {\n\n\t\t\tglobal $wp_query;\n\t\t\t$current_user = wp_get_current_user();\n\n\t\t\t// Enqueue Scripts\n\t\t\twp_register_script('superfish', CAPSTONE_JS_URI .'/lib/superfish/superfish.min.js', array('jquery'), null, true);\n\t\t\twp_register_script('headroom', CAPSTONE_JS_URI .'/lib/headroom.js/headroom.min.js', null, null, true);\n\t\t\twp_register_script('jquery-headroom', CAPSTONE_JS_URI .'/lib/headroom.js/jQuery.headroom.min.js', array('jquery'), null, true);\n\t\t\twp_register_script('infinite-scroll', CAPSTONE_JS_URI .'/lib/infinite-scroll/infinite-scroll.pkgd.min.js', array('jquery'), null, true);\n\t\t\twp_register_script('jquery-magnific-popup', CAPSTONE_JS_URI .'/lib/magnific-popup/jquery.magnific-popup.min.js', array('jquery'), null, true);\n\t\t\twp_register_script('icheck', CAPSTONE_JS_URI .'/lib/icheck/icheck.min.js', array('jquery'), null, true);\n\t\t\twp_register_script('images-loaded', CAPSTONE_JS_URI .'/lib/images-loaded/imagesloaded.pkgd.min.js', array('jquery'), null, true);\n\t\t\twp_register_script('flickity', CAPSTONE_JS_URI .'/lib/flickity/flickity.pkgd.min.js', array('jquery'), null, true);\n\t\t\twp_register_script('tendina', CAPSTONE_JS_URI .'/lib/tendina/tendina.min.js', array('jquery'), null, true);\n\t\t\twp_register_script('smooth-scroll', CAPSTONE_JS_URI .'/lib/smooth-scroll/jquery.smooth-scroll.min.js', null, null, true);\n\t\t\twp_register_script('element-queries-resize-sensor', CAPSTONE_JS_URI .'/lib/element-queries/ResizeSensor.js', null, null, true);\n\t\t\twp_register_script('element-queries', CAPSTONE_JS_URI .'/lib/element-queries/ElementQueries.js', array('element-queries-resize-sensor'), null, true);\n\t\t\twp_enqueue_script('capstone-main', CAPSTONE_JS_URI . '/main.min.js', array('jquery', 'superfish', 'headroom', 'jquery-headroom', 'infinite-scroll', 'jquery-magnific-popup', 'icheck', 'images-loaded', 'flickity', 'tendina', 'smooth-scroll'), null, true);\n\t\t\t\n\t\t\twp_localize_script( 'capstone-main', 'capstone_args', array(\n\t\t\t\t'templateUrl' \t\t\t=> get_template_directory_uri(),\n\t\t\t\t'ajaxurl' \t\t\t\t=> esc_url( admin_url('admin-ajax.php') ),\n\t\t\t\t'query_vars' \t\t\t=> json_encode( $wp_query->query ),\n\t\t\t\t'translate_strings' \t=> json_encode( array(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'load_more' => esc_html__('Load More' ,'capstone'),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'loading' => esc_html__('Loading' ,'capstone'),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'data_loaded' => esc_html__('Data Loaded' ,'capstone'),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'manage_applications' => esc_html__('Manage Applications' ,'capstone'),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'submit_resume' => esc_html__('Submit Resume' ,'capstone'),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'select_package' => esc_html__('Select Package' ,'capstone'),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'select_package_caption' => esc_html__('Select a package above and click the button.' ,'capstone'),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'add_new_job' => esc_html__('Add New Job' ,'capstone'),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'delete' => esc_html__('Delete' ,'capstone'),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'at' => esc_html__('At' ,'capstone'),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'geocode_error_permission' => esc_html__('You\\'ve decided not to share your position, but it\\'s OK. We won\\'t ask you again.' ,'capstone'),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'geocode_error_network' => esc_html__('The network is down or the positioning service can\\'t be reached.' ,'capstone'),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'geocode_error_timeout' => esc_html__('The attempt timed out before it could get the location data.' ,'capstone'),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'geocode_error_generic' => esc_html__('Geolocation failed due to unknown error.' ,'capstone'),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'geocode_error_support' => esc_html__('Geolocation is not supported in your browser.' ,'capstone'),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t)),\n\t\t\t\t'ipdata_api_key' \t\t=> get_theme_mod('capstone_geolocation_api_key'),\n\t\t\t\t'map_default_location' \t=> get_theme_mod('capstone_map_default_coordinates', '-0.12775829999998223, 51.5073509'),\n\t\t\t\t'map_default_zoom'\t\t=> get_theme_mod('capstone_map_default_zoom', 5),\n\t\t\t\t'gmap_api_key' \t\t\t=> get_option('job_manager_google_maps_api_key_alt'),\n\t\t\t\t'mapbox_access_token' \t=> get_theme_mod('capstone_mapbox_access_token'),\n\t\t\t\t'location_field_mask' \t=> get_theme_mod('capstone_geolocation_location_mask', '${city}, ${country}'),\n\t\t\t\t'single_job_meta_limit' => get_theme_mod('capstone_jobs_single_meta_limit', 4),\n\t\t\t\t'single_resume_meta_limit' => get_theme_mod('capstone_resumes_single_meta_limit', 4),\n\t\t\t\t'single_company_meta_limit' => get_theme_mod('capstone_companies_single_meta_limit', 4),\n\t\t\t\t'user_display_name' \t=> $current_user->display_name,\n\t\t\t\t'logout_url'\t\t \t=> esc_url( wp_logout_url(home_url('/')) ),\n\t\t\t\t'header_stick_config'\t=> get_theme_mod('capstone_header_stick_config', 'headroom--unpinned'),\n\t\t\t\t'location_autocomplete'\t=> get_option('job_manager_enable_location_autocomplete'),\n\t\t\t\t'job_desc_template'\t\t=> apply_filters('capstone_job_desc_template', ''),\n\t\t\t\t'resume_desc_template'\t=> apply_filters('capstone_resume_desc_template', ''),\n\t\t\t));\n\n\n\t\t\t// Enqueue (conditional)\n\t\t\tif ( is_singular() && comments_open() && get_option( 'thread_comments' ) ) {\n\t\t\t\twp_enqueue_script( 'comment-reply' );\n\t\t\t}\n\t\t\tif (get_option('job_manager_google_maps_api_key_alt')) {\n\t\t\t\twp_enqueue_script('google-maps-api', 'https://maps.googleapis.com/maps/api/js?key='. get_option('job_manager_google_maps_api_key_alt') .'&libraries=places', null, null, true);\n\t\t\t}\n\t\t\tif (get_theme_mod('capstone_mapbox_access_token')) {\n\t\t\t\twp_enqueue_script('mapbox', 'https://api.mapbox.com/mapbox-gl-js/v0.52.0/mapbox-gl.js', null, null, true);\n\t\t\t\twp_enqueue_script('mapbox-geocoder', 'https://api.mapbox.com/mapbox-gl-js/plugins/mapbox-gl-geocoder/v2.3.0/mapbox-gl-geocoder.min.js', null, null, true);\n\t\t\t}\n\t\t}\n\t}", "public function loadInitScript() {\n //di(forum()->getCategory());\n include_once forum()->locateTemplate('init');\n //exit;\n }", "public function dt_testimonial_simple_loadCssAndJs() {\n wp_register_style( 'dt_extend_style', plugins_url('assets/droit-wbpakery-addons.css', __FILE__) );\n }", "function combo_load()\n\t{\n\t\t$this->javascript_loader->combo_load();\n\t}", "public static function load_dashboard_js()\n\t{\n global $settings;\n\n\t\tforeach($settings['js'] as $js) {\n\t\t\twp_register_script( $js['id'], plugins_url( $js['url'], __FILE__ ), array(), $settings['version'], 'all' );\n\t\t wp_enqueue_script( $js['id'] );\n\t\t}\n\t}", "public function includeAssets()\n {\n $this->Html->script('CkTools.vendor/tinymce/jquery.tinymce.min.js', ['block' => true]);\n $this->Html->script('CkTools.vendor/moxiemanager/js/moxman.loader.min.js', ['block' => true]);\n }", "function _s_scripts() {\n\twp_enqueue_style( 'style', get_stylesheet_uri() );\n\n\twp_enqueue_script( 'small-menu', get_template_directory_uri() . '/js/small-menu.js', array( 'jquery' ), '20120206', true );\n\n\tif ( is_singular() && comments_open() && get_option( 'thread_comments' ) ) {\n\t\twp_enqueue_script( 'comment-reply' );\n\t}\n\n\tif ( is_singular() && wp_attachment_is_image() ) {\n\t\twp_enqueue_script( 'keyboard-image-navigation', get_template_directory_uri() . '/js/keyboard-image-navigation.js', array( 'jquery' ), '20120202' );\n\t}\n}", "public function load_admin_scripts()\n {\n // Enqueue styles\n wp_enqueue_style('soccerpress', plugins_url('assets/css/soccerpress.css', __FILE__), array(), '1.0.0', false);\n wp_enqueue_style('bootstrap-css', plugins_url('assets/css/bootstrap.min.css', __FILE__), array(), '4.3.1', false);\n\n // Enqueue scripts\n wp_register_script('bootstrap-js', plugins_url('assets/js/bootstrap.min.js', __FILE__), array(), '4.3.1', false);\n }", "function add_js() {\n // È possibile aggiungere un file js presente nella cartella del tema\n wp_register_script('main_js', get_template_directory_uri() . '/js/main.js', array('jquery'), null, true);\n wp_enqueue_script('main_js');\n\n // È possibile aggiungere un url remoto (es. CDN)\n // wp_register_script('select2', 'https://cdnjs.cloudflare.com/ajax/libs/select2/4.0.5/js/select2.min.js', array('jquery'), null, true);\n // wp_enqueue_script('select2');\n\n // Inoltre è possibile aggiungere un css solo se una determinata condizione è vera\n // In questo esempio aggiungiamo il file home.css solo se ci troviamo sulla pagina di home\n // if(is_home()) {\n // wp_register_script('home_js', get_template_directory_uri() . '/js/home.js', array('jquery'), null, true);\n // wp_enqueue_script('home_js');\n // }\n}", "function lightseek_scripts() {\n\t// Main CSS\n\twp_enqueue_style( 'lightseek-style', get_stylesheet_uri() );\n\n\twp_enqueue_style( 'additional-css', get_template_directory_uri() . '/additional_css.css', array(), '20230301' );\n\n\t// Web Font Loader\n\t// https://github.com/typekit/webfontloader\n\twp_enqueue_script( 'webfont', 'https://ajax.googleapis.com/ajax/libs/webfont/1.6.26/webfont.js', array(), null );\n\n\t// Font Awesome async\n\twp_enqueue_script( 'fa', 'https://use.fontawesome.com/0581ebd445.js', array(), null );\n\n\t// Main Script\n\twp_enqueue_script( 'scripts', get_template_directory_uri() . '/js/main.min.js', array( 'jquery', 'webfont' ), '20170202', true );\n\n\t// Utils Script\n\twp_enqueue_script( 'util', get_template_directory_uri() . '/js/src/bootstrap/util.js', array( 'jquery' ), '20160530', true );\n\n\t// Tabs Script\n\twp_enqueue_script( 'tabs', get_template_directory_uri() . '/js/src/bootstrap/tab.js', array( 'jquery' ), '20160530', true );\n\n\t// Collapse Script\n\twp_enqueue_script( 'collapse', get_template_directory_uri() . '/js/src/bootstrap/collapse.js', array( 'jquery' ), '20160530', true );\n\n}", "function scs_admin_head()\n\t{\t\n\t\twp_enqueue_script( 'jquery-ui-core' );\n\t\twp_enqueue_script( 'jquery-ui-tabs' );\n\t\twp_enqueue_script( 'coming-soon', WP_PLUGIN_URL.'/'.basename(dirname(__FILE__)).'/js/init.js' );\n\t\twp_enqueue_style( 'coming-soon', WP_PLUGIN_URL.'/'.basename(dirname(__FILE__)).'/css/admin.css' );\n\t}", "public function add_scripts() {\n\t\twp_enqueue_script(\n\t\t\t'heweb17',\n\t\t\tplugins_url( '/js/heweb17.js', __FILE__ ),\n\t\t\tarray( 'jquery' ) );\t}", "function includeJQuery() {\n\t\tif ($this->jQueryLocation) {\n\t\t\tRequirements::javascript($this->jQueryLocation);\n\t\t} else if (self::$jquery_location) {\n\t\t\tRequirements::javascript(self::$jquery_location);\n\t\t}\n\n\t}", "function load_assets(){\n\t\t\tadd_action('admin_print_scripts', array(&$this, 'template_add_widget_field') );\n\t\t\tadd_action('load-widgets.php', array(&$this, 'add_sidebar_area'), 100);\n\n\t\t\twp_enqueue_script('bridge-qode-sidebar', QODE_ROOT . '/js/admin/qode-sidebar.js');\n\t\t\twp_enqueue_style( 'bridge-qode-sidebar', QODE_ROOT . '/css/admin/qode-sidebar.css');\n\t\t}", "function artistpress_scripts() {\n\t\twp_enqueue_style( 'reset', get_template_directory_uri() . '/css/reset.css', array(), '2.0' );\n\t\twp_enqueue_style( 'bootstrap', get_template_directory_uri() . '/css/bootstrap.min.css', array(), '3.3.7' );\n\t\twp_enqueue_style( 'main_style', get_template_directory_uri() . '/style.css' );\n\t\twp_enqueue_script( 'jquery', 'https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js', array(), '1.11.3', true );\n\t\twp_enqueue_script( 'bootstrap', get_template_directory_uri() . '/js/bootstrap.min.js', array( 'jquery' ), '3.3.6', true );\n\t\twp_register_script( 'load', get_template_directory_uri() . '/js/load.js' );\n\n\t\t//localize params for use in load.js\n\t\t$theme_params = array(\n\t\t 'backround_image' => get_option('backround_image'),\n\t\t 'action_url' => get_option('action_url'),\n\t\t);\n\n\t\twp_localize_script( 'load', 'themeParams', $theme_params );\n\n\t\twp_enqueue_script( 'load', get_template_directory_uri() . '/js/load.js', array( 'jquery' ,'bootstrap'), '1', true );\n\t}", "function scripts()\n\t\t{\n//\t\t \twp_enqueue_script( 'jQuery' );\n//\t\t\twp_enqueue_script( 'WPVM_Admin_JS', WPVM_URL . '/js/wpvm_admin.js', array('jquery') );\n\t\t}", "function frontpageSlideshow_admin_init() {\n\t// now using jQuery framework instead of Prototype+Scriptaculous\n\twp_register_script('jquery-ui-interactions',WP_PLUGIN_URL .'/frontpage-slideshow/js/jquery-ui-interactions.js', array('jquery-ui-core'));\n\twp_enqueue_script('jquery-ui-interactions');\n}", "function init() {\n $this->add(\\JQuery::JS);\n $this->add(\\Bootstrap::JS);\n $this->add(\\JQuery::CONFIG);\n $this->add(\\JQuery::UI);\n $this->add(\\JQuery::INHERIT);\n $this->add(\\JQuery::TIMER);\n $this->addComponent(\\Dialog::OBJECT);\n $this->addComponent(\\Notificator::OBJECT);\n $this->addComponent(\\Tooltip::OBJECT);\n $this->addComponent(\\Form::OBJECT);\n $this->addComponent(\\Grid::OBJECT);\n $this->addComponent(\\Tabs::OBJECT);\n $this->addComponent(\\Wizard::OBJECT);\n $this->addComponent(\\TimelineAbstract::OBJECT);\n $this->addComponent(\\Chart::OBJECT);\n// $this->addComponent(\\Schedule::OBJECT);\n\n $this->disableCache();\n }", "function jk_scripts(){\n\twp_register_script('materialize-js',get_stylesheet_directory_uri().'/js/bootstrap.min.js',array('jquery'),true);\n\twp_enqueue_script('materialize-js');\n\twp_register_script('myjs',get_stylesheet_directory_uri().'/js/myjs.js',array('jquery'),true);\n\twp_enqueue_script('myjs');\n}", "public function init()\n\t{\n\t\tparent::init();\n\n\t\tYii::app()->clientScript->registerCoreScript('jquery');\n\t\tYii::app()->clientScript->registerScriptFile(Yii::app()->request->baseUrl . 'themes/drachendaemmerung/js/game.js');\n\t}", "public function admin_scripts() {\n\t\twp_enqueue_script(\n\t\t\t'advanced-sidebar-menu-script',\n\t\t\ttrailingslashit( (string) ADVANCED_SIDEBAR_MENU_URL ) . 'resources/js/advanced-sidebar-menu.js',\n\t\t\t[ 'jquery' ],\n\t\t\tADVANCED_SIDEBAR_BASIC_VERSION,\n\t\t\tfalse\n\t\t);\n\n\t\twp_enqueue_style(\n\t\t\t'advanced-sidebar-menu-style',\n\t\t\ttrailingslashit( (string) ADVANCED_SIDEBAR_MENU_URL ) . 'resources/css/advanced-sidebar-menu.css',\n\t\t\t[],\n\t\t\tADVANCED_SIDEBAR_BASIC_VERSION\n\t\t);\n\t}", "function roboaztechs_scripts() {\n\n\t// Load our main stylesheet.\n\twp_enqueue_style( 'roboaztechs-style', get_stylesheet_uri(), array(), null );\n\n\t// Load our jQuery\n\twp_deregister_script('jquery');\n\twp_register_script('jquery', '//ajax.googleapis.com/ajax/libs/jquery/1.11.2/jquery.min.js', array(), '1.11.2');\n\tadd_filter('script_loader_src', 'roboaztechs_jquery_local_fallback', 10, 2);\n\n\t// Load FontAwesome icons.\n\twp_enqueue_style( 'font-awesome', '//maxcdn.bootstrapcdn.com/font-awesome/4.3.0/css/font-awesome.min.css', array(), null, 'screen' );\n\n\t// Load our script for the navigation menu\n\twp_enqueue_script( 'navigation', get_template_directory_uri() . 'assets/js/navigation.min.js', array('jquery'), null, true );\n\n\t// Load our fastclik.js script\n\twp_enqueue_script( 'fastclick', get_template_directory_uri() . 'assets/js/fastclick.min.js', array('jquery'), null, true );\n\t\n\t// Load our Google fonts.\n\twp_enqueue_style( 'google-fonts', roboaztechs_fonts(), array(), null );\n}", "public function loadJavascript()\n {\n wp_enqueue_script(\n 'fortytwo_two_factor_javascript_intlTelInput',\n plugin_dir_url(__FILE__) . '../Javascript/intlTelInput.min.js',\n array('jquery')\n );\n wp_enqueue_script(\n 'fortytwo_two_factor_javascript_plugin',\n plugin_dir_url(__FILE__) . '../Javascript/plugin.js'\n );\n }", "public function widget_scripts() {\n\t\twp_register_script( 'elementor-hello-world', plugins_url( '/assets/js/hello-world.js', __FILE__ ), [ 'jquery' ], false, true );\n\t}", "function addCommonJs() {\n\t\t// call parent if need RunnerJS API \n\t\tRunnerPage::addCommonJs();\n\t\t\n\t\t$this->addJsGroupsAndRights();\t\t\n\t}", "public function thm_enqueue_scripts() {\n\t\n\t\twp_enqueue_script( 'thm_blocksy_child', get_stylesheet_directory_uri() . '/admin/js/thm-blocksy-admin.js', array( 'jquery' ), null, false );\n\t\n\t}", "public function init()\n\t{\n//\t\t$this->js[] = YII_DEBUG ? 'js/jquery.Jcrop.js' : 'js/jquery.Jcrop.min.js';\n $this->css[]=\"css/imgareaselect-animated.css\";\n $this->css[]=\"css/imagestyle.css\";\n\n $this->js[]=\"js/script.js\";\n $this->js[]=\"js/jquery.imgareaselect.pack.js\";\n $this->js[]=\"//ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js\";\n \n \n // $this->js[]=\"js/myjs.js\";\n \n\t\n\t}", "public function scripts()\n\t{\n\n\t\twp_enqueue_script('jquery');\n\n\t\t// If using the regular comments of wordpress\n\t\tif ( is_singular() && comments_open() && get_option( 'thread_comments' ) ) {\n\t\t\twp_enqueue_script( 'comment-reply' );\n\t\t}\n\t\t//put modernizr as late as possible\n\t\twp_enqueue_script('bootstrap',DION_THEME_URL.'/assets/js/bootstrap.min.js');\n\t\twp_enqueue_script('owl-carousel',DION_THEME_URL.'/assets/js/owl.carousel.min.js');\n\t\twp_enqueue_script('darkmode','https://cdn.jsdelivr.net/npm/darkmode-js@1.5.0/lib/darkmode-js.min.js');\n\t\twp_enqueue_script('main',DION_THEME_URL.'/assets/js/main.min.js');\n\t}", "public static function inclureJS() {\r\n \r\n foreach (Page::getInstance()->script as $link) {\r\n \r\n ?>\r\n <script type=\"text/javascript\" src=\"<?php echo $link; ?>\" ></script>\r\n <?php\r\n \r\n }\r\n }", "function loadJS($conf,$config) {\n\t\tif ($this->conf['includeJQuery'] == 1) { // include jquery\n\t\t\t$header = '<script src=\"'.t3lib_extMgm::siteRelPath($this->extKey).'res/jquery-1.3.2.min.js\" type=\"text/javascript\"></script>';\n\t\t}\n\t\t$header.= '<script src=\"'.t3lib_extMgm::siteRelPath($this->extKey).'res/jquery.scrollTo-1.4.2-min.js\" type=\"text/javascript\"></script>';\n\t\t$header.= '<script src=\"'.t3lib_extMgm::siteRelPath($this->extKey).'res/jquery.localscroll-1.2.7-min.js\" type=\"text/javascript\"></script>';\n\t\t$header.= '<script src=\"'.t3lib_extMgm::siteRelPath($this->extKey).'res/jquery.serialScroll-1.2.1-min.js\" type=\"text/javascript\"></script>';\n\t\t$header.= '<script src=\"'.t3lib_extMgm::siteRelPath($this->extKey).'res/glider.js\" type=\"text/javascript\"></script>';\n\t\t// initialize glider with options\n\t\t$header.= '<script type=\"text/javascript\">\n\t\t\t$(document).ready(function() {\n\t\t\tvar myglider = new Glider({\n\t\t\t\tduration: 400,\n\t\t\t\tshowArrows: \"'.$this->config['arrows'].'\",\n\t\t\t\tarrowLeft: \"'.$this->getPath($this->conf['arrowLeft']).'\",\n\t\t\t\tarrowRight: \"'.$this->getPath($this->conf['arrowRight']).'\",\n\t\t\t});\n\t\t\t});\n\t\t</script>';\n\t\t// add the whole js for the header\n\t \t$GLOBALS['TSFE']->additionalHeaderData['tan3_glider'] = $header;\n\t}", "function dokan_frontend_dashboard_scripts() {\n wp_enqueue_script( 'jquery' );\n wp_enqueue_script( 'jquery-ui' );\n wp_enqueue_script( 'jquery-ui-autocomplete' );\n wp_enqueue_script( 'jquery-ui-datepicker' );\n wp_enqueue_script( 'underscore' );\n wp_enqueue_script( 'post' );\n wp_enqueue_media();\n wp_enqueue_script( 'dokan-product-editor' );\n wp_enqueue_script( 'chosen' );\n wp_enqueue_script( 'reviews' );\n wp_enqueue_script( 'dokan-order' );\n wp_enqueue_script( 'jquery-ui-autocomplete' );\n\n wp_enqueue_style( 'jquery-ui' );\n wp_enqueue_style( 'chosen-style' );\n}", "function pegasus_child_bootstrap_js() {\r\n\t\t\r\n\t\twp_enqueue_script( 'pegasus_custom_js', get_stylesheet_directory_uri() . '/js/pegasus-custom.js', array(), '', true );\r\n\t\t\r\n\t\t//wp_enqueue_script( 'matchHeight_js', get_stylesheet_directory_uri() . '/js/jquery.matchHeight-min.js', array(), '', true );\r\n\t\t\r\n\t\t\r\n\t}", "function as_on_add_scripts() {\n // enqueue backbonejs, underscore\n add_existed_script('backbone');\n add_existed_script('underscore');\n if (as_option('as_option_smooth_scroll', '1')) {\n // Smoothscroll JS\n add_script('smoothscroll', TEMPLATEURL . '/js/smoothscroll.js', array(\n 'jquery'));\n }\n // Modernize JS\n add_script('modernizr', TEMPLATEURL . '/js/libs/modernizr.custom.js', array(\n 'jquery'));\n if (as_option('as_option_retina_img', '1')) {\n add_script('retina', TEMPLATEURL . '/js/libs/retina.min.js', array(\n 'jquery'));\n }\n add_script('front', TEMPLATEURL . '/js/front.js', array(\n 'jquery',\n 'backbone',\n 'underscore'));\n add_script('js-appear', TEMPLATEURL . '/js/libs/main.js', array(\n 'jquery',\n 'jquery'));\n //add js easing when plugin not active\n if (!(function_exists('dslc_register_modules'))) {\n //add js easing\n add_script('js-easing', TEMPLATEURL . '/js/libs/jquery.easing.js', array(\n 'jquery',\n 'jquery'));\n }\n wp_localize_script('front', 'as_globals', array(\n 'ajaxURL' => admin_url('admin-ajax.php'),\n 'imgURL' => get_template_directory_uri() . '/img/'\n ));\n // Custom\n add_script('main', TEMPLATEURL . '/js/main.js', array(\n 'jquery'));\n // add style demo\n if (file_exists(TEMPLATE_DIR . '/demo/js/custom_panel.js')) {\n add_script('custom_panel', TEMPLATEURL . '/demo/js/custom_panel.js', array(\n 'jquery'));\n }\n}", "private function _addJavascript ()\n {\n $options = array ();\n\n if ($this->isTypeahead) {\n $options['documentReady'][] = 'init';\n if ($this->desc)\n $options['documentReady'][] = 'tooltip';\n }\n \n if ($this->selectable) {\n $options['documentReady'][] = 'selectable';\n if ($this->sortable) {\n $options['documentReady'][] = 'sortable';\n }\n }\n\n if ($this->clickable) {\n \t$options['documentReady'][] = 'click';\n }\n\n if (!empty ($options)) {\n $this->buildJS('thesaurus/', $options);\n }\n\n if ($this->selectable) {\n $this->_element->addDocumentReady($this->endJavascript);\n if (isset($this->required_items) && is_array ($this->required_items)) {\n foreach ($this->required_items as $item) {\n $this->_element->addDocumentReady(\"setRequiredItems_\" . $this->idfilter . \" ('$item');\");\n }\n }\n }\n }", "function load_custom_files(){\n\n wp_register_script(\n 'custom-script',\n get_stylesheet_directory_uri().'/js/custom.js',\n array('jquery')\n ); \n wp_enqueue_script('custom-script');\n\n wp_register_script(\n 'jquery-steps',\n get_stylesheet_directory_uri().'/js/jquery.steps.min.js',\n array('jquery')\n ); \n wp_enqueue_script('jquery-steps');\n\n wp_register_script(\n 'jquery-validate',\n get_stylesheet_directory_uri().'/js/jquery.validate.js',\n array('jquery')\n ); \n wp_enqueue_script('jquery-validate');\n\n wp_register_script(\n 'jquery-methods',\n get_stylesheet_directory_uri().'/js/additional-methods.min.js',\n array('jquery')\n ); \n wp_enqueue_script('jquery-methods');\n\n wp_register_style(\n 'jquery-steps-style',\n get_stylesheet_directory_uri().'/css/jquery.steps.css'); \n wp_enqueue_style('jquery-steps-style');\n\n }", "function perusecretland_css_js() {\n wp_enqueue_style( 'perusecretland-fonts', get_stylesheet_directory_uri() . '/css/fonts.css');\n wp_enqueue_style( 'perusecretland-responsive', get_stylesheet_directory_uri() . '/css/responsive.css');\n wp_enqueue_style( 'jquery-chosen', get_stylesheet_directory_uri() . '/css/chosen.min.css');\n wp_enqueue_script( 'perusecretland-easing', get_stylesheet_directory_uri() . '/js/jquery.easing.1.3.js', array('jquery'));\n wp_enqueue_script( 'jquery-chosen', get_stylesheet_directory_uri() . '/js/chosen.jquery.min.js', array('jquery'));\n wp_enqueue_script( 'perusecretland-scripts', get_stylesheet_directory_uri() . '/js/scripts.js', array('jquery'));\n wp_enqueue_script( 'perusecretland-footer-scripts', get_stylesheet_directory_uri() . '/js/footer.scripts.js', array('jquery', 'jquery-chosen'), false, true );\n }", "function be_navigation_script() {\n\twp_enqueue_script( 'jquery-touchwipe', get_stylesheet_directory_uri() . '/lib/jquery.touchwipe.min.js', array( 'jquery' ) );\n\twp_enqueue_script( 'be-navigation', get_stylesheet_directory_uri() . '/lib/navigation.js', array( 'jquery' ) );\n}", "function thefold_scripts_styles() {\n\n /*\n * Adds JavaScript for handling the navigation menu hide-and-show behavior.\n\n */\n\nwp_enqueue_script( 'load-offers', get_template_directory_uri() . '/js/load-offers.js', array(), '1.0', false );\nwp_enqueue_script( 'adhub', '/core/admotion/_021_adhub_server_v4.js', array(), '1.0', false );\nwp_enqueue_script( 'jssor-slider', '/wp-content/themes/aboutus/vendor/slider-master/js/jssor.slider.min.js', array(), '1.0', false );\nwp_enqueue_script( 'load-offers', get_template_directory_uri() . '/js/load-offers.js', array(), '1.0', false );\nwp_enqueue_script( 'modernizr-source', '/wp-content/themes/aboutus/js/modernizr.custom.js', array(), '1.0', false );\n\n\n\n \n\n //jquery\n wp_enqueue_script('querydb', get_template_directory_uri() . '/search/search.js',array('jquery'),'1.0',false);\n wp_enqueue_script('ajaxthis', get_template_directory_uri() . '/ajax/ajax.js',array('jquery'),'1.0',false);\n wp_enqueue_script('jquerycookie', get_template_directory_uri() . '/js/jquery.cookie.js',array('jquery'),'1.0',false);\n wp_enqueue_script('requirejs', get_template_directory_uri() . '/js/require.js',array('jquery'),'1.0',false);\n // wp_enqueue_script( 'jqueryui', '/js/jquery-ui-1.11.2/jquery-ui.js', array('jquery'), '1.0', false );\n wp_enqueue_script( 'advertslider', get_template_directory_uri() . '/js/slider.js', array('jquery'), '1.0', false );\n wp_enqueue_script(\"uploadimae\", get_template_directory_uri() . '/js/upload-image.js', array('jquery','ajaxfileupload','ajaxfileuploadui'), '1.0', false);\n \n//quirks mode\n\n if(is_ie()){\n wp_enqueue_style( 'custom-ie-style', get_template_directory_uri() . '/css/custom-ie.css', null, '4.0.1', false);\n\n }\n \n wp_enqueue_style( 'thefolds-styles', get_stylesheet_uri() );\n wp_enqueue_style( 'custom-style', get_template_directory_uri() . '/css/custom.css', null, '4.0.1', false);\n wp_enqueue_style( 'font-awesome', '//maxcdn.bootstrapcdn.com/font-awesome/4.2.0/css/font-awesome.min.css', null, '4.0.1', false);\n\n \n}", "function cbusdscss_header_scripts() {\n\tif( $GLOBALS['pagenow'] != 'wp-login.php' && !is_admin()) {\n\t\twp_register_script('conditionizr', get_template_directory_uri() . '/js/lib/conditionizr-4.3.0.min.js', array(), '4.3.0'); // Conditionizr\n wp_enqueue_script('conditionizr'); // Enqueue it!\n\n wp_register_script('modernizr', get_template_directory_uri() . '/js/lib/modernizr-2.7.1.min.js', array(), '2.7.1'); // Modernizr\n wp_enqueue_script('modernizr'); // Enqueue it!\n\n\t\twp_register_script('jquery-marquee', get_template_directory_uri() . '/js/jquery.marquee.min.js', array('jquery') ,''); // Conditionizr\n wp_enqueue_script('jquery-marquee'); // Enqueue it!\n\n wp_register_script('cbusdsscripts', get_template_directory_uri() . '/js/scripts.js', array('jquery'), '1.0.0'); // Custom scripts\n wp_enqueue_script('cbusdsscripts'); // Enqueue it!\n\n wp_localize_script( 'cbusdsscripts', 'cbusds_ajax', array('ajaxurl' => admin_url( 'admin-ajax.php'), 'security' => wp_create_nonce('cbusds-special-string')));\n\n\t}\n}", "private function add_rich_form_scripts() {\r\n\r\n\t$this->template->libs_js = array(\r\n\t \"http://code.jquery.com/jquery-1.8.2.js\",\r\n\t \"http://code.jquery.com/ui/1.9.1/jquery-ui.js\",\r\n\t \"jquery-ui-timepicker-addon.js\",\r\n\t \"http://cdn.aloha-editor.org/latest/lib/require.js\"\r\n\t);\r\n\t$this->template->libs_css = array(\r\n\t \"http://code.jquery.com/ui/1.9.1/themes/base/jquery-ui.css\",\r\n\t \"datetimepicker.css\",\r\n\t \"http://cdn.aloha-editor.org/latest/css/aloha.css\"\r\n\t);\r\n }", "public function enqueueScripts() {\n\t\t\twp_enqueue_script('jquery');\n//\t\t\twp_enqueue_script('owl', self::asset(\"node_modules/owl.carousel/dist/owl.carousel.min.js\"), ['jquery'], '1.0.0', ' all');\n// wp_enqueue_script('headroom', self::asset(\"node_modules/headroom.js/dist/headroom.min.js\"), ['jquery'], '1.0.0', ' all');\n// wp_enqueue_script('prettyPhoto', self::asset(\"js/vendor/jquery.prettyPhoto.js\"), ['jquery'], '1.0.0', ' all');\n//\t\t\twp_enqueue_script('navigo', self::asset(\"node_modules/navigo/lib/navigo.min.js\"), ['jquery'], '1.0.0', ' all')\\;\n\t\t\twp_enqueue_script('app', self::asset(\"js/app.min.js\"), ['jquery'], '1.0.0', ' all');\n\t\t}", "public function scripts(){\n //Enqueue scripts\n /**\n * wp_enqueue_script('sample-script',$this->directory_uri . '/sample.min.js',array('jquery'),false,false);\n * ...\n * ....\n */\n }", "function rawlins_scripts(){\n\tif (!is_admin()) {\n\t### Core\n\t\t// Deregister WordPress jQuery and register Google's\n\t\twp_deregister_script('jquery');\n\t\twp_enqueue_script('jquery', '//ajax.googleapis.com/ajax/libs/jquery/2.1.0/jquery.min.js', array(), '2.1.0', false);\n\n\t\t// Conditionizr\n\t\t//wp_enqueue_script('conditionizr', JSDIR.'/conditionizr.min.js', array(), '2.1.1', false);\n\n\t\t// Modernizr\n\t\t//wp_enqueue_script('modernizr', JSDIR.'/modernizr.custom.2.8.1.js', array(), '2.8.1', false);\n\n\t\t// Bootstrap\n\t\twp_enqueue_script('bootstrap__scripts', STYLEDIR.'/bootstrap/javascripts/bootstrap.min.js', array('jquery'), '1.0', true);\n\n\t\t// Main Stylsheet\n\t\twp_enqueue_style('css', STYLEDIR.'/style.css', false, '1.0');\n\n\t\t// Main Scripts (this file is concatenated from the files inside of js/development/ )\n\t\twp_enqueue_script('scripts', JSDIR.'/scripts.min.js', array('jquery'), '1.0', true);\n\n\n\n\t### Modules\n\t\t// moduleName\n\t\t// wp_register_script('template-default-js', MODDIR.'moduleName/js/moduleName.js', array('jquery'), '1.0', true);\n\n\n\n\t### Templates\n\t\t// Template Name\n\t\t// wp_register_script('template-default-js', JSDIR.'/template-default.js', array('jquery'), '1.0', true);\n\n\n\n\t}\n}", "function scripts(){\n\n\t\t// this handy function checks a post or page to see if your component exists beore enqueueing assets\n\t\tif ( function_exists('aesop_component_exists') && aesop_component_exists('reveal') ) {\n\n\t\t\twp_enqueue_style('reveal-style', \t\tAESOP_REVEAL_URL.'/css/twentytwenty.css', AESOP_REVEAL_VERSION );\n\t\t\twp_enqueue_script('reveal-script', \t\tAESOP_REVEAL_URL.'/js/jquery.event.move.js', array('jquery'), AESOP_REVEAL_VERSION, true);\n\t\t\twp_enqueue_script('reveal-script-more', AESOP_REVEAL_URL.'/js/jquery.twentytwenty.js', array('jquery'), AESOP_REVEAL_VERSION, true);\n\n\t\t}\n\n\t}", "function add_scripts(){\n\t// Load jQuery\n\tif ( !is_admin() ) {\n\t wp_enqueue_script('jquery');\n\n\t\t// Your Scripts\n\n\t\twp_register_script('site_js', get_stylesheet_directory_uri().'/js/site.js', array('jquery'/* ,'metaquery' */));\n\t\twp_enqueue_script('site_js');\n\t\t/*\n\t\twp_register_script('match_media', get_stylesheet_directory_uri().'/js/matchMedia.js', array('jquery'));\n\t\twp_enqueue_script('match_media');\n\t\twp_register_script('metaquery', get_stylesheet_directory_uri().'/js/metaquery.min.js', array('jquery','match_media'));\n\t\twp_enqueue_script('metaquery');\n\t\t*/\n\t\twp_enqueue_style( 'base-theme-css', get_stylesheet_directory_uri() . '/style.css', array() );\n\n\t\t// Define Ajax URL for scripts\n\t\twp_localize_script( 'site_js', 'spr_admin', array(\n\t\t\t'ajax_url' => admin_url( 'admin-ajax.php' )\n\t\t));\n\n\t}\n}", "function plugin_loading_options_page() {\r\n\t\twp_enqueue_script('common');\r\n\t\twp_enqueue_script('wp-lists');\r\n\t\twp_enqueue_script('postbox');\r\n\t}", "function admin_scripts() {\n\t\twp_enqueue_script('jquery');\n\t\twp_enqueue_script('escalate_network-admin-js', $this->plugin_url . '/core/admin/js/admin.js', array('jquery'));\n\t}", "function bp_lb_scripts_method() {\n\t\t//get initial resources\n\t\twp_enqueue_style( 'bp-lightbox-style', plugins_url('/css/style.css', __FILE__)); //styles\n\t\twp_enqueue_script( 'jquery' );\n\t\t//wp_enqueue_script( 'show-caregiving-now-lightbox', plugins_url('/js/bp-lightbox-script.js', __FILE__), array('thickbox', 'jquery'), false, true); //javascript\n\t}", "private function load_dependencies() {\n //require_once( $this->inc . 'class-best-faq-admin.php' );\n require_once( $this->inc . 'best-faq-shortcode.php' );\n }", "function threedee_expo_scripts(){\n\tif (!is_admin()){\n\t\twp_deregister_script( 'jquery' );\n\t\twp_register_script('jquery', get_template_directory_uri(). '/includes/jquery/jquery-1.11.3.min.js', false, '1.11.3');\n\t\twp_enqueue_script('jquery');\n\t}\n\telse{\n\t\t//don't replace jquery\n\t}\n\n\t/**\n\t * Load stylesheet\n\t */\n\twp_enqueue_style( 'threedee-expo-style', get_stylesheet_uri() );\n\t/**\n\t * Load Bootstrap CSS & js:\n\t */\n\twp_enqueue_style('bootstrap-css', get_template_directory_uri() . '/includes/bootstrap/css/bootstrap.min.css');\n\twp_enqueue_script('bootstrap-js', get_template_directory_uri() . '/includes/bootstrap/js/bootstrap.min.js');\n\t/**\n\t * Load Owl Carousel:\n\t */\n\t// load owl carousel js\n\twp_enqueue_script('owl-carousel-js', get_template_directory_uri().'/includes/owl-carousel/owl.carousel.js', array('jquery') );\n\t// load owl carousel css\n\twp_enqueue_style( 'owl-carousel-css', get_template_directory_uri() . '/includes/owl-carousel/owl.carousel.css' );\n\t// load owl carousel theme css\n\twp_enqueue_style( 'owl-carousel-css-theme', get_template_directory_uri() . '/includes/owl-carousel/owl.theme.css' );\n\t/**\n\t * Load isotope js:\n\t */\n\twp_enqueue_script('isotope-js', get_template_directory_uri().'/includes/isotope/isotope.js', array('jquery') );\n\t/**\n\t * Load Sketchfab js:\n\t */\n\twp_enqueue_script('sketchfab-js', get_template_directory_uri().'/includes/sketchfab/sketchfab-viewer-1.0.0.js', array('jquery') );\n\t/**\n\t * Load main JS file:\n\t */\n\twp_enqueue_script('main-js', get_template_directory_uri().'/js/main.js', array('jquery') );\n\t/**\n\t * Load bixtext JS file:\n\t */\n\twp_enqueue_script('bigtext-js', get_template_directory_uri().'/js/bigtext.js', array('jquery'));\n}", "static function wck_fep_enqueue_scripts(){\n\t\twp_enqueue_script( 'jquery' );\n\t}", "function load_custom_scripts() {\n\t//slidebars\n\twp_enqueue_script('slidebars', THEMEROOT . '/js/slidebars.min.js', array('jquery'), '0.13.3', true);\n\t//bootstrap\n\twp_enqueue_script('bootstrap', THEMEROOT . '/js/bootstrap.min.js', array('jquery'), '3.3.6', true);\n\t//fancybox\n\twp_enqueue_script('fancybox', THEMEROOT . '/js/jquery.fancybox.pack.js', array('jquery'), '2.1.5', true);\n\t//valitate\n\twp_enqueue_script('validate', THEMEROOT . '/js/jquery.validate.min.js', array('jquery'), '1.15', true);\n\t\n\t//script\n\twp_enqueue_script('custom_script', THEMEROOT . '/js/scripts.js', array('jquery'), false, true);\n}", "function Helsingborg_scripts() {\n wp_deregister_script( 'jquery' );\n\n // register scripts\n wp_enqueue_script( 'modernizr', get_template_directory_uri() . '/js/modernizr/modernizr.min.js', array(), '1.0.0', false );\n wp_enqueue_script( 'jquery', get_template_directory_uri() . '/js/jquery/dist/jquery.min.js', array(), '1.0.0', false );\n wp_enqueue_script( 'jquery-ui', get_template_directory_uri() . '/js/jquery/dist/jquery-ui.min.js', array(), '1.0.0', false );\n\n /**\n * EVENT LIST PAGE\n **/\n if ( is_page_template( 'templates/event-list-page.php' )) {\n // Register scripts\n wp_enqueue_script( 'zurb5-multiselect', get_template_directory_uri() . '/js/foundation-multiselect/zmultiselect/zurb5-multiselect.js', array(), '1.0.0', false );\n wp_enqueue_script( 'jquery-datetimepicker', get_template_directory_uri() . '/js/jquery.datetimepicker.js', array(), '1.0.0', false );\n wp_enqueue_script( 'knockout', get_template_directory_uri() . '/js/knockout/dist/knockout.js', array(), '3.2.0', false );\n wp_enqueue_script( 'event-list-model', get_template_directory_uri() . '/js/helsingborg/event_list_model.js', array(), '1.0.0', false );\n\n // Register styles\n wp_enqueue_style( 'zurb5-multiselect', get_template_directory_uri() . '/css/multiple-select.css', array(), '1.0.0', 'all' );\n wp_enqueue_style( 'jquery-datetimepicker', get_template_directory_uri() . '/js/jquery.datetimepicker.css', array(), '1.0.0', 'all' );\n \n }\n\n wp_enqueue_script( 'foundation', get_template_directory_uri() . '/js/app.js', array('jquery'), '1.0.0', true );\n wp_enqueue_script( 'tablesorter', get_template_directory_uri() . '/js/plugins/jquery.tablesorter.min.js', array(), '1.0.0', true );\n\n // TODO: Remove! This should be merged into app.js\n wp_enqueue_script( 'dev', get_template_directory_uri() . '/js/dev/hbg.dev.js', array(), '1.0.0', true );\n\t\t\n\t\n // Readspeaker should be added last\n wp_enqueue_script( 'readspeaker', 'http://f1.eu.readspeaker.com/script/5507/ReadSpeaker.js?pids=embhl', array(), '1.0.0', false);\n \n // Enqueue vergic.js previously in footer.php\n\twp_enqueue_script( 'script-vergic', get_template_directory_uri() . '/js/helsingborg/vergic.js', array(), '1.0.0', true );\n // Enqueue styles previously in header.php\n wp_enqueue_style( 'style-normalize', get_template_directory_uri() . '/css/normalize.css' );\n wp_enqueue_style( 'style-app', get_template_directory_uri() . '/css/app.css' ); \n \n }", "function cg_load_scripts () {\n\tif ( !is_admin() ) {\n\t\t//js\n\t \twp_deregister_script('jquery');\n\t \twp_enqueue_script('jquery', \"//ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js\", false);\n\t\t\twp_enqueue_script('slick', get_template_directory_uri() . '/js/slick.min.js', array('jquery'), time(), true);\n\t\t\twp_enqueue_script('jarallax', \"//unpkg.com/jarallax@1.10/dist/jarallax.min.js\", array('jquery'), time(), true);\n\t\t\twp_enqueue_script('jarallax-video', \"//unpkg.com/jarallax@1.10/dist/jarallax-video.min.js\", array('jquery'), time(), true);\n\t\t\twp_enqueue_script('jarallax-scroll', \"//unpkg.com/jarallax@1.10/dist/jarallax-element.min.js\", array('jquery'), time(), true);\n\t\t\twp_enqueue_script('aos', get_template_directory_uri() . '/js/aos.js', array('jquery'), time(), true);\n\t \twp_enqueue_script('scripts', get_template_directory_uri() . '/js/scripts.js', array('jquery'), time(), true);\n\n\t\t//css\n\t\twp_enqueue_style( 'reset', get_template_directory_uri().'/css/reset.css', array(), 1.0, false );\n\t\twp_enqueue_style( 'google-fonts', \"//fonts.googleapis.com/css?family=Open+Sans:300,400,700\", array(), 1.0, false );\n\t\twp_enqueue_style( 'fonts', get_template_directory_uri().'/css/fonts.css', array(), 1.0, false );\n\t\twp_enqueue_style( 'aos', get_template_directory_uri().'/css/aos.css', array(), 1.0, false );\n\t\twp_enqueue_style( 'slick', get_template_directory_uri().'/css/slick.css', array(), 1.0, false );\n\t\twp_enqueue_style( 'style', get_stylesheet_uri(), array(), time(), false );\n\t\twp_enqueue_style( 'browser', get_template_directory_uri().'/css/browser.css', array(), 1.0, false );\n\t\twp_enqueue_style( 'mobile', get_template_directory_uri().'/css/mobile.css', array(), time(), 'screen and (max-width:800px)' );\n\t}\n}", "public function admin_scripts() {\n wp_enqueue_script('jquery-ui-sortable');\n wp_enqueue_script('postbox');\n wp_enqueue_script('jquery-form-validation', SWPM_FORM_BUILDER_URL . '/js/jquery.validate.min.js', array('jquery'), '1.9.0', true);\n wp_enqueue_script('swpm-admin', SWPM_FORM_BUILDER_URL . \"/js/swpm-admin$this->load_dev_files.js\", array('jquery', 'jquery-form-validation'), '20140412', true);\n wp_enqueue_script('nested-sortable', SWPM_FORM_BUILDER_URL . \"/js/jquery.ui.nestedSortable$this->load_dev_files.js\", array('jquery', 'jquery-ui-sortable'), '1.3.5', true);\n\n wp_enqueue_style('swpm-form-builder-style', SWPM_FORM_BUILDER_URL . \"/css/swpm-form-builder-admin$this->load_dev_files.css\", array(), '20140412');\n\n wp_localize_script('swpm-admin', 'SwpmAdminPages', array('swpm_pages' => $this->_admin_pages));\n }", "function cam_enqueue_related_pages_scripts_and_styles(){\n // wp_enqueue_style('related-styles', plugins_url('/css/bootstrap.min.css', __FILE__));\n wp_enqueue_script('releated-script', plugins_url( '/js/custom.js' , __FILE__ ), array('jquery','jquery-ui-droppable','jquery-ui-draggable', 'jquery-ui-sortable'));\n }", "function load_scripts()\n{\n\t// CSS\n\twp_enqueue_style('normalize', get_template_directory_uri() . '/src/css/normalize.css', array(), '1.0.0', 'all');\n\twp_enqueue_style('animate', get_template_directory_uri() . '/src/css/animate.min.css', array(), '1.0.0', 'all');\n\twp_enqueue_style('bootstrap', get_template_directory_uri() . '/src/css/bootstrap.css', array(), '4.3.1', 'all');\n\twp_enqueue_style('plugins', get_template_directory_uri() . '/src/css/plugins.css', array(), '1.0.0', 'all');\n\twp_enqueue_style('stylesheet-blog', get_template_directory_uri() . '/src/css/stylesheet-blog.css', array(), '1.0.0', 'all');\n\t// JS\n\twp_enqueue_script('bootstrap-js', get_template_directory_uri() . '/src/js/bootstrap.min.js', array('jquery'), '4.3.1', true);\n\twp_enqueue_script('goTo', get_template_directory_uri() . '/src/js/wow.min.js', array(), '1.0.0', true);\n\twp_enqueue_script('wowInit', get_template_directory_uri() . '/src/js/wowInit.js', array(), '1.0.0', true);\n\twp_enqueue_script('menu', get_template_directory_uri() . '/src/js/menu.js', array('jquery'), '1.0.0', true);\n}", "function load_admin_scripts() {\n\n\t\twp_enqueue_script('media-upload');\n\t\twp_enqueue_script('thickbox');\n\t\twp_enqueue_script('jquery');\n\n\t\twp_register_script( 'wppm-admin-gallery', plugin_dir_url( __FILE__ ) . 'assets/js/admin-gallery.js', array( 'jquery', 'media-upload', 'thickbox' ) );\n\t\twp_enqueue_script( 'wppm-admin-gallery' );\n\t\t\n\t}", "function load_script() {\n \n wp_enqueue_script('jquery');\t\n\n wp_enqueue_script(\"fancy\",\n get_template_directory_uri() . '/js/fancy.js','','',true );\n\n wp_enqueue_script(\"wp-seo-admin\",\n get_template_directory_uri() . '/js/wp-seo-admin.js','','',true );\n\n wp_enqueue_script(\"wp-seo-metabox\",\n get_template_directory_uri() . '/js/wp-seo-metabox.js','','',true );\n \n wp_enqueue_script(\"core\",\n get_template_directory_uri() . '/js/core.js','','',true );\n \n wp_enqueue_script(\"main\",\n get_template_directory_uri() . '/js/main.js','','',true );\n\n wp_enqueue_script(\"file_a\",\n get_template_directory_uri() . '/js/core.js','','',true );\n \n \n \n}" ]
[ "0.78005725", "0.71528965", "0.699206", "0.6900915", "0.68107116", "0.67303294", "0.66141546", "0.658836", "0.65719664", "0.65676874", "0.65571773", "0.6458697", "0.64501125", "0.64333797", "0.6428822", "0.63928914", "0.6391702", "0.63797104", "0.63631415", "0.63518316", "0.63337815", "0.63291657", "0.63267666", "0.6321058", "0.6319666", "0.6318284", "0.63106936", "0.6282198", "0.6280027", "0.62757593", "0.6273404", "0.625342", "0.62533253", "0.625106", "0.623944", "0.6235832", "0.62269694", "0.6224265", "0.6217106", "0.6191763", "0.6139404", "0.6129928", "0.61291444", "0.6123671", "0.61157113", "0.6107349", "0.6104569", "0.6080697", "0.60801864", "0.60674393", "0.60590905", "0.6055572", "0.605078", "0.60474956", "0.60421085", "0.6037292", "0.60328066", "0.6032768", "0.6032358", "0.60245353", "0.6021259", "0.6019361", "0.6016884", "0.600475", "0.6000992", "0.59980774", "0.59885883", "0.59873974", "0.5983515", "0.59768075", "0.5970732", "0.5955825", "0.5954752", "0.59496456", "0.5948232", "0.5945858", "0.59384775", "0.593777", "0.59319913", "0.5928324", "0.5925971", "0.59232974", "0.5922155", "0.5921266", "0.59174347", "0.5916214", "0.5915669", "0.5915326", "0.5914308", "0.5913061", "0.59092194", "0.5908531", "0.5906266", "0.5905781", "0.5902531", "0.5901111", "0.5900621", "0.5900534", "0.5900469", "0.589918" ]
0.72173995
1
An function to interface PHP (server) based information to JS (browser) Loads a set of language strings, and other server based info to be used in the JS.
public function load_php_strings() { global $DB, $CFG, $COURSE; $include_icons_config = $DB->get_record('course_format_options', array('courseid' => $COURSE->id, 'name' => 'cmf_allowicons')); if(!$include_icons_config) $include_icons = 0; else $include_icons = $include_icons_config->value; echo "<script>"; echo "var course_menu_strings = new Array();"; echo "course_menu_strings['wwwroot'] ='$CFG->wwwroot';"; echo "course_menu_strings['confirm_delete_message'] ='" . get_string('confirm_delete_message', 'format_course_menu') . "';"; echo "course_menu_strings['yes'] ='" . get_string('yes') . "';"; echo "course_menu_strings['no'] ='" . get_string('no') . "';"; echo "course_menu_strings['courseid'] = " . $COURSE->id . ";"; echo "course_menu_strings['ajax'] = '" . $CFG->wwwroot . "/course/format/course_menu/ajax_controller.php';"; echo "course_menu_strings['include_icons'] = ".$include_icons.";"; echo "course_menu_strings['new_header'] = '".get_string('new_header', 'format_course_menu')."';"; echo "</script>"; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function loadJavaScriptLanguageStrings() {}", "public function langJS()\n {\n $this->response->setCache(['max-age' => 300, 's-maxage' => 900, 'etag' => 'b57325e']);\n\n $conf = new \\Config\\App();\n $locale = $this->request->getLocale();\n\n //Load Home Lang File\n $langFile = ROOTPATH . 'admin/Language/' . $locale . '/votes.php';\n\n if (!file_exists($langFile))\n {\n //Check default lang file\n $langFile = ROOTPATH . 'admin/Language/' . $conf->defaultLocale . '/votes.php';\n\n if (!file_exists($langFile))\n {\n $langFile = null;\n }\n }\n\n $langArray['panel_language'] = $locale;\n $langArray['panel_url'] = admin_url(null, $locale); \n\n if (!empty($langFile))\n {\n $langArray += require $langFile; // Current local language\n }\n else\n {\n log_message('alert', \"There is no $locale lang file\");\n $langArray['error'] = \"There is no $locale lang file\";\n }\n\n $this->response->setContentType('application/x-javascript');\n echo 'var LANG_votes = ' . json_encode($langArray, JSON_PRETTY_PRINT);\n }", "function pnLangLoad()\n{\n\t// See if a language update is required\n $newlang = pnVarCleanFromInput('newlang');\n if (!empty($newlang)) {\n $lang = $newlang;\n pnSessionSetVar('lang', $newlang);\n } else {\n $detectlang = pnConfigGetVar('language_detect');\n $defaultlang = pnConfigGetVar('language');\n\n switch ($detectlang) { \n case 1: // Detect Browser Language\n\t\t $cnvlanguage=cnvlanguagelist();\n $currentlang='';\n \t $langs = preg_split ('/[,;]/',$_SERVER['HTTP_ACCEPT_LANGUAGE']);\n \t foreach ($langs as $lang) {\n \t \t if (isset($cnvlanguage[$lang]) && file_exists('language/' . pnVarPrepForOS($cnvlanguage[$lang]) . '/global.php')) {\n \t \t $currentlang=$cnvlanguage[$lang];\n \t \t break;\n \t \t }\n \t }\n if ($currentlang=='')\n \t $currentlang=$defaultlang;\n \t \t break;\n default:\n $currentlang=$defaultlang; \n }\n $lang = pnSessionGetVar('lang');\n }\n \n // Load global language defines\n\t// these are deprecated and will be moved to the relevant modules\n\t// with .8x\n if (isset ($lang) && file_exists('language/' . pnVarPrepForOS($lang) . '/global.php')) {\n $currentlang = $lang;\n } else {\n $currentlang = pnConfigGetVar('language');\n pnSessionSetVar('lang', $currentlang);\n }\n\t$oscurrentlang = pnVarPrepForOS($currentlang);\n\tif (file_exists('language/' . $oscurrentlang . '/global.php')) {\n\t include 'language/' . $oscurrentlang . '/global.php';\n\t}\n\n\t// load the languge language file\n\tif (file_exists('language/languages.php')) {\n\t\tinclude 'language/languages.php';\n\t}\n\n\t// load the core language file\n\tif (file_exists('language/' . $oscurrentlang . '/core.php')) {\n\t\tinclude 'language/' . $oscurrentlang . '/core.php';\n\t}\n\n\t// V4B RNG\n\tif (file_exists('language/' . $oscurrentlang . '/v4blib.php')) {\n\t\tinclude 'language/' . $oscurrentlang . '/v4blib.php';\n\t}\n\t// V4B RNG\n\n\t// set the correct locale\n\t// note: windows has different requires for the setlocale funciton to other OS's\n\t// See: http://uk.php.net/setlocale\n\tif (stristr(getenv('OS'), 'windows')) {\n\t\t// for windows we either use the _LOCALEWIN define or the existing language code\n\t\tif (defined('_LOCALEWIN')) {\n\t\t\tsetlocale(LC_ALL, _LOCALEWIN);\n\t\t} else {\n\t\t\tsetlocale(LC_ALL, $currentlang);\n\t\t}\n\t} else {\n\t\t// for other OS's we use the _LOCALE define\n\t\tsetlocale(LC_ALL, _LOCALE);\n\t}\n}", "function jxjslanginject()\n{\n\t$app = &JFactory::getApplication();\n\t$doc = &JFactory::getDocument();\n\n\tif ($doc->getType() == 'html') {\n\t\t$lang = $app->get('jx.jslang', array());\n\t\tif (!empty($lang)) {\n\t\t\t$txt = '{';\n\t\t\tforeach ($lang as $k => $v)\n\t\t\t{\n\t\t\t\t$txt .= $k.':\"'.$v.'\",';\n\t\t\t}\n\t\t\tif (strlen($txt) > 1) {\n\t\t\t\t$txt = substr($txt, 0, strlen($txt) - 1);\n\t\t\t}\n\t\t\t$txt .= '}';\n\t\t\t$doc->addScriptDeclaration('\tJXLang='.$txt.';');\n\t\t}\n\t}\n}", "protected function loadJavascript() {}", "public function getJavaScript() {}", "static private function CreateLanguageMessage() {\n\t\tif (!IllaUser::loggedIn()) {\n\t\t\t$german_browser = (ereg('de', $_SERVER['HTTP_ACCEPT_LANGUAGE']) ? true : false);\n\t\t}else {\n\t\t\t$german_browser = IllaUser::german();\n\t\t}\n\t\tif (($german_browser && self::isEnglish()) || (!$german_browser && self::isGerman())) {\n\t\t\t$short_filename = substr_replace(basename($_SERVER['PHP_SELF']), '', 0, 2);\n\t\t\t$path = str_replace($short_filename, '', $_SERVER['PHP_SELF']);\n\t\t\t$path = substr_replace($path, '', - 2, 2);\n\n\t\t\tif (count($_GET) > 0) {\n\t\t\t\t$getparams = array();\n\t\t\t\tforeach ($_GET as $key => $value) {\n\t\t\t\t\t$getparams[] = htmlentities($key) . '=' . htmlentities($value);\n\t\t\t\t}\n\t\t\t\t$getparams = '?' . implode('&amp;', $getparams);\n\t\t\t}else {\n\t\t\t\t$getparams = '';\n\t\t\t}\n\n\t\t\tif (self::isEnglish() && file_exists('de' . $short_filename)) {\n\t\t\t\tMessages::add('<a href=\"' . $path . 'de' . $short_filename . $getparams . '\" hreflang=\"de\">Deine bevorzugte Sprache scheint Deutsch zu sein. Klick hier um zur deutschen Fassung dieser Seite zu wechseln.</a>', 'note');\n\t\t\t\tMessages::add('<a href=\"' . $path . 'de' . $short_filename . $getparams . '\" hreflang=\"de\">Your favoured language seems to be German. Click here to view the German version of this page.</a>', 'note');\n\t\t\t} elseif (self::isGerman() && file_exists('us' . $short_filename)) {\n\t\t\t\tMessages::add('<a href=\"' . $path . 'us' . $short_filename . $getparams . '\" hreflang=\"us\">Deine bevorzugte Sprache scheint Englisch zu sein. Klick hier um zur englischen Fassung dieser Seite zu wechseln.</a>', 'note');\n\t\t\t\tMessages::add('<a href=\"' . $path . 'us' . $short_filename . $getparams . '\" hreflang=\"us\">Your favoured language seems to be English. Click here to view the English version of this page.</a>', 'note');\n\t\t\t}\n\t\t}\n\t}", "function template_dynamic_js(){\n $vars = array();\n $vars['HOST'] = HOST;\n $vars['SITE_ROOT'] = SITE_ROOT;\n $vars['PATH_TO_MODULES'] = PATH_TO_MODULES;\n \n $js_vars = json_encode($vars);\n \n $return = 'var SYSTEM' . \"\\n\";\n $return .= 'SYSTEM = eval('. $js_vars . ')';\n return $return;\n}", "function lang_getfrombrowser ($allowed_languages, $default_language, $lang_variable = null, $strict_mode = true) {\n // Use $_SERVER['HTTP_ACCEPT_LANGUAGE'] if no lang_variable has been set\n if ($lang_variable === null) {\n $lang_variable = $_SERVER['HTTP_ACCEPT_LANGUAGE'];\n }\n\n // has some information been added?\n if (empty($lang_variable)) {\n // No? => return default language\n return $default_language;\n }\n\n // Split the Header\n $accepted_languages = preg_split('/,\\s*/', $lang_variable);\n\n // Set defaults\n $current_lang = $default_language;\n $current_q = 0;\n\n // Iterate all Languages which had been provided\n foreach ($accepted_languages as $accepted_language) {\n // Get all information on the language\n $res = preg_match ('/^([a-z]{1,8}(?:-[a-z]{1,8})*)'.\n '(?:;\\s*q=(0(?:\\.[0-9]{1,3})?|1(?:\\.0{1,3})?))?$/i', $accepted_language, $matches);\n\n // Valid Syntax?\n if (!$res) {\n // No? Ignore!\n continue;\n }\n \n // Get language code and split into parts\n $lang_code = explode ('-', $matches[1]);\n\n // Has a Quality been provided?\n if (isset($matches[2])) {\n // Use the quality\n $lang_quality = (float)$matches[2];\n } else {\n // Compatibility Mode: Use Quality 1\n $lang_quality = 1.0;\n }\n\n // Until Languagecode is empty\n while (count ($lang_code)) {\n // Try to find the language code in the array of allowd languages\n if (in_array (strtolower (join ('-', $lang_code)), $allowed_languages)) {\n // Look at the Quality\n if ($lang_quality > $current_q) {\n // Uses this language\n $current_lang = strtolower (join ('-', $lang_code));\n $current_q = $lang_quality;\n // exit inner loop\n break;\n }\n }\n // If in strict mode, don't try to minimise the language\n if ($strict_mode) {\n // break inner loop\n break;\n }\n // cut the right part of the array\n array_pop ($lang_code);\n }\n }\n\n // return the found language\n return $current_lang;\n}", "protected function loadJavaScripts() {}", "function addHeadJavascriptVars() {\n\t\techo '<script type=\"text/javascript\">'.\"\\n\";\n\t\techo 'var lepress_student_awaiting_url = \"'.add_query_arg(array('lepress-student-awaiting' => 1), get_bloginfo('siteurl')).'\";'.\"\\n\";\n\t\t$lang_vars = array('submission_for' => __('Submission for', lepress_textdomain),\n\t\t\t\t\t\t\t'hide' => __('Hide', lepress_textdomain), \n\t\t\t\t\t\t\t'expand' => __('Expand', lepress_textdomain));\n\t\techo 'var lepress_lang_vars_student = '.json_encode($lang_vars).';'.\"\\n\";\n\t\techo '</script>'.\"\\n\";\n\t}", "private function _generateApiUrl() {\n $this->_detectUserLanguage();\n echo '<script type=\"text/javascript\" src=\"' . self::$apiUrl . '?hl=' . $this->defaultLanguage . '\"></script>';\n }", "public function getLanguageComponents()\n {\n $langs = array_keys( HelperService::prozessLangArray());\n\n echo json_encode(['defaultLanguage' => DEFAULT_LANG, 'languagesArray' => $langs]);\n exit();\n }", "public function generateI18nJsContent() {\n $data = array();\n\n foreach ($this->_i18n as $k => $v)\n $data[] = strtolower($k) .':\\''. str_replace('\\'', '\\\\\\'', $v) .'\\'';\n\n return 'var language = \\''. $this->_language .'\\', i18n = {'. implode(', ', $data) .'};';\n }", "public function language();", "public function language();", "function themes_get_language($script = 'global')\n{\n}", "public function localizeScriptsFrontend() {\n \n $request = Daq_Request::getInstance();\n $instance = Wpjb_Project::getInstance();\n \n $js_date_max_o = new DateTime(WPJB_MAX_DATE);\n $js_date_max = $js_date_max_o->format(wpjb_date_format());\n $js_date_format = str_replace(array(\"J\"), array(\"B\"), wpjb_date_format());\n $js_months = array();\n \n for($i=1; $i<=12; $i++) {\n $js_months[$i] = wpjb_date(\"2000-$i\", \"M\");\n }\n \n wp_localize_script(\"wpjb-js\", \"WpjbData\", array(\n \"no_jobs_found\" => __('No job listings found', 'wpjobboard'),\n \"no_resumes_found\" => __('No resumes found', 'wpjobboard'),\n \"load_x_more\" => __('Load %d more', 'wpjobboard'),\n \"date_format\" => $js_date_format,\n \"max_date\" => $js_date_max\n ));\n \n wp_localize_script(\"wpjb-stripe\", \"WpjbStripe\", array(\n \"payment_accepted\" => __(\"Payment completed successfully.\", \"wpjobboard\"),\n //\"success_page\" => $instance->getConfig(\"stripe_success_page\") ?? \"http://google.com\",\n \"fail_page\" => $instance->getConfig(\"stripe_fail_page\") \n ));\n \n $message_url = admin_url(\"admin-ajax.php\") . \"?action=wpjb_payment_message\";\n \n $success_msg = $instance->getConfig(\"stripe_success_page\");\n if( $success_msg == null ) {\n $success_msg = $message_url . \"&status=success\";\n }\n //$success_msg = admin_url(\"admin-ajax.php\") . \"?action=wpjb_payment_accept\";\n \n $fail_msg = $instance->getConfig(\"stripe_fail_page\");\n if( $fail_msg == null ) {\n $fail_msg = $message_url . \"&status=fail\";\n }\n \n wp_localize_script(\"wpjb-payment\", \"wpjb_payment_lang\", array(\n \"ajaxurl\" => admin_url(\"admin-ajax.php\"),\n \"form_error\" => __(\"There are errors in your form.\", \"wpjobboard\"),\n \"success_page\" => $success_msg,\n \"fail_page\" => $fail_msg, \n ));\n \n wp_localize_script('wpjb-paypal-reply', 'wpjb_paypal_reply', array(\n \"ajaxurl\" => admin_url('admin-ajax.php'), \n \"payment_id\" => $request->post(\"custom\"),\n \"external_id\" => $request->post(\"txn_id\"),\n \"interval\" => 2000, \n \"interval_x\" => 5, \n \"interval_i\" => 0\n ));\n \n wp_localize_script(\"wpjb-manage\", \"wpjb_manage_lang\", array(\n \"ajaxurl\" => admin_url(\"admin-ajax.php\"),\n \"ok\" => __(\"OK\", \"wpjobboard\")\n ));\n \n wp_localize_script('wpjb-manage-apps', 'wpjb_manage_apps_lang', array(\n \"ajaxurl\" => admin_url('admin-ajax.php')\n ));\n }", "function _jsPo() {\n\t\t$Folder = new Folder(APP . 'locale');\n\t\tlist($locales, $potFiles) = $Folder->read();\n\t\tif (!in_array('javascript.pot', $potFiles)) {\n\t\t\t$this->out(__d('mi', 'The javascript.pot file wasn\\'t found - run cake mi_i18n to generate it', true));\n\t\t\treturn;\n\t\t}\n\t\tif (defined('DEFAULT_LANGUAGE')) {\n\t\t\t$locales = array_unique(am(array(DEFAULT_LANGUAGE), $locales));\n\t\t}\n\t\tif (!class_exists('I18n')) {\n\t\t\tApp::import('Core', 'i18n');\n\t\t}\n\n\t\t$messages = array();\n\t\tforeach ($locales as $locale) {\n\t\t\tif ($locale[0] === '.') {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t$data = Cache::read('javascript_' . $locale, '_cake_core_');\n\t\t\tif (!$data) {\n\t\t\t\tConfigure::write('Config.language', $locale);\n\t\t\t\t__d('javascript', 'foo', true);\n\t\t\t\t$inst =& I18n::getInstance();\n\t\t\t\tCache::write('javascript_' . $locale, array_filter($inst->__domains), '_cake_core_');\n\t\t\t\t$data = Cache::read('javascript_' . $locale, '_cake_core_');\n\t\t\t\tif (!$data) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t}\n\t\t\tforeach($data as $type => $i) {\n\t\t\t\tforeach ($i[$locale]['javascript'] as $lookup => $string) {\n\t\t\t\t\tif (!is_string($string)) {\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t\tif (!$string) {\n\t\t\t\t\t\t$string = $lookup;\n\t\t\t\t\t}\n\t\t\t\t\t$messages[$lookup] = $string;\n\t\t\t\t}\n\t\t\t}\n\t\t\tob_start();\n\t\t\tinclude(dirname(__FILE__) . DS . 'templates' . DS . 'js' . DS . 'po.js');\n\t\t\t$contents = ob_get_clean();\n\t\t\t$targetFile = APP . 'vendors' . DS . 'js' . DS . 'i18n.' . $locale . '.js';\n\t\t\t$File = new File($targetFile);\n\t\t\t$File->write($contents);\n\t\t\t$this->out(Debugger::trimPath($targetFile) . ' written');\n\t\t}\n\t}", "function drh_admin_page() {\n\t$languages = array(\n\t'ARABIC' => 'ar',\n\t'BASQUE' => 'eu',\n\t'BULGARIAN' => 'bg',\n\t'BENGALI' => 'bn',\n\t'CATALAN' => 'ca',\n\t'CZECH' => 'cs',\n\t'DANISH' => 'da',\n\t'GERMAN' => 'de',\n\t'GREEK' => 'el',\n\t'ENGLISH' => 'en',\n\t'ENGLISH (AUSTRALIAN)' => 'en-AU',\n\t'ENGLISH (GREAT BRITAIN)' => 'en-GB',\n\t'SPANISH' => 'es',\n\t'BASQUE' => 'eu',\n\t'FARSI' => 'fa',\n\t'FINNISH' => 'fi',\n\t'FILIPINO' => 'fil',\n\t'FRENCH' => 'fr',\n\t'GALICIAN' => 'gl',\n\t'GUJARATI' => 'gu',\n\t'HINDI' => 'hi',\n\t'CROATIAN' => 'hr',\n\t'HUNGARIAN' => 'hu',\n\t'INDONESIAN' => 'id',\n\t'ITALIAN' => 'it',\n\t'HEBREW' => 'iw',\n\t'JAPANESE' => 'ja',\n\t'KANNADA' => 'kn',\n\t'KOREAN' => 'ko',\n\t'LITHUANIAN' => 'lt',\n\t'LATVIAN' => 'lv',\n\t'MALAYALAM' => 'ml',\n\t'MARATHI' => 'mr',\n\t'DUTCH' => 'nl',\n\t'NORWEGIAN' => 'no',\n\t'POLISH' => 'pl',\n\t'PORTUGUESE' => 'pt',\n\t'PORTUGUESE (BRAZIL)' => 'pt-BR',\n\t'PORTUGUESE (PORTUGAL)' => 'pt-PT',\n\t'ROMANIAN' => 'ro',\n\t'RUSSIAN' => 'ru',\n\t'SLOVAK' => 'sk',\n\t'SLOVENIAN' => 'sl',\n\t'SERBIAN' => 'sr',\n\t'SWEDISH' => 'sv',\n\t'TAGALOG' => 'tl',\n\t'TAMIL' => 'ta',\n\t'TELUGU' => 'te',\n\t'THAI' => 'th',\n\t'TURKISH' => 'tr',\n\t'UKRAINIAN' => 'uk',\n\t'VIETNAMESE' => 'vi',\n\t'CHINESE (SIMPLIFIED)' => 'zh-CN',\n\t'CHINESE (TRADITIONAL)' => 'zh-TW'\n\t);\n\t$currencies = array(\n\t'USD - US Dollar' => 'USD', \n\t'GBP - British Pound' => 'GBP', \n\t'EUR - Euro' => 'EUR', \n\t'INR - Indian Rupee' => 'INR', \n\t'AUD - Australian Dollar' => 'AUD', \n\t'CAD - Canadian Dollar' => 'CAD', \n\t'AED - Emirati Dirham' => 'AED', \n\t'MYR - Malaysian Ringgit' => 'MYR',\n\t'CHF - Swiss Franc' => 'CHF',\n\t'CNY - Chinese Yuan Renminbi' => 'CNY',\n\t'THB - Thai Baht' => 'THB'\n\t);\n\t$units = array(\n 'Metric (Kilometers & Meters)' => 'metric',\n 'Imperial (Miles & Feet)' => 'imperial',\n\t);\t\n\t$maps = array(\n 'No' => 'no',\n 'Yes' => 'yes',\n\t);\t\n ?>\n <div class=\"wrap\">\n <h2><img src=\"<?php echo plugins_url('taxi-ordering-online/images/taxi-icon-small.png');?>\"/>Order A Taxi</h2> \n <form method=\"post\" action=\"options.php\"> \n <?php settings_fields('mkgd-settings-group'); ?>\n <?php do_settings_fields( 'drh_adminpage', 'mkgd-settings-group'); ?>\n <table class=\"widefat\">\n <thead>\n <tr>\n <th>Settings</th>\n </tr>\n </thead>\n <tbody>\n <tr>\n <td>\n <table>\n <tr>\n <td><label for=\"rate\">Rate: </label></td>\n <td><input type=\"text\" value=\"<?php echo get_option('drh_rate', '2'); ?>\" size=\"3\" name=\"drh_rate\"></td>\n <td><small>Default Rate is $2.</small></td>\n </tr>\n <tr>\n <td><label for=\"currency\">Currency: </label></td>\n <td>\n <select name=\"drh_currency\">\n <option value=\"\">-- Select --</option>\n <?php foreach($currencies as $currency => $code){ ?>\n \n <option <?php echo get_option('drh_currency') === $code ? 'selected=\"selected\"': ''; ?> value=\"<?php echo $code; ?>\"><?php echo $currency; ?></option>\n <?php } ?>\n </select>\n </td>\n <td><small>Default Currency is the US Dollar</small></td>\n </tr>\t\t\t\t\n <tr>\n <td><label for=\"latitude\">Latitude: </label></td>\n <td><input type=\"text\" value=\"<?php echo get_option('mkgd_latitude', '43.6525'); ?>\" size=\"33\" name=\"mkgd_latitude\"></td>\n <td><small>Default latitudes for the Google Map <a href=\"http://itouchmap.com/latlong.html\" title=\"Help\" target=\"_blank\" rel=\"nofollow\"><strong>Help?</strong></a></small></td>\n </tr>\n <tr>\n <td><label for=\"longitude\">Longitude: </label></td>\n <td><input type=\"text\" value=\"<?php echo get_option('mkgd_longitude', '-79.3816667'); ?>\" size=\"33\" name=\"mkgd_longitude\"></td>\n <td><small>Default longitudes for the Google Map <a href=\"http://itouchmap.com/latlong.html\" title=\"Help\" target=\"_blank\" rel=\"nofollow\"><strong>Help?</strong></a></small></td>\n </tr>\n <tr>\n <td><label for=\"language\">Unit System: </label></td>\n <td>\n <select name=\"mkgd_units\">\n <option value=\"\">-- Select --</option>\n <?php foreach ($units as $key => $value) { ?>\n <option <?php echo get_option('mkgd_units') === $value ? 'selected=\"selected\"' : ''; ?> value=\"<?php echo $value; ?>\"><?php echo $key; ?></option>\n <?php } ?>\n </select>\n </td>\n <td><small>Default unit system for the Google Map</small></td>\n </tr>\t\t\t\t\n <tr>\n <td><label for=\"language\">Language: </label></td>\n <td>\n <select name=\"mkgd_language\">\n <option value=\"\">-- Select --</option>\n <?php foreach($languages as $language => $code){ ?>\n \n <option <?php echo get_option('mkgd_language') === $code ? 'selected=\"selected\"': ''; ?> value=\"<?php echo $code; ?>\"><?php echo $language; ?></option>\n <?php } ?>\n </select>\n </td>\n <td><small>Default language for the Google Map</small></td>\n </tr>\n <tr>\n <td><label for=\"map-width\">Map Width: </label></td>\n <td><input type=\"text\" value=\"<?php echo get_option('mkgd_width', '300'); ?>\" size=\"33\" name=\"mkgd_width\"></td>\n <td><small>Default width for the Google Map</small></td>\n </tr>\t\t\t\t\n <tr>\n <td><label for=\"map-width\">Map Height: </label></td>\n <td><input type=\"text\" value=\"<?php echo get_option('mkgd_height', '300'); ?>\" size=\"33\" name=\"mkgd_height\"></td>\n <td><small>Default height for the Google Map</small></td>\n </tr>\n <tr>\n <td><label for=\"display_map\">Display Map: </label></td>\n <td>\n <select name=\"display_map\">\n <option value=\"\">-- Select --</option>\n <?php foreach($maps as $key => $code){ ?>\n <option <?php echo get_option('display_map') === $code ? 'selected=\"selected\"': ''; ?> value=\"<?php echo $code; ?>\"><?php echo $key; ?></option>\n <?php } ?>\n </select>\n </td>\n </tr>\t\t\t\t\t\n </table>\n </td>\n </tr>\n </tbody>\n <tfoot>\n <tr>\n <th>Order a Taxi Settings</th>\n </tr>\n </tfoot>\n </table>\n\n <?php submit_button(); ?>\n\n </form>\n <table class=\"widefat\">\n <tbody>\n <tr>\n <td>\n <h2>If you like and use this script, please consider buying me a beer -- a cheap and a simple way to give back! Thanks!</h2>\n <a href=\"https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=RVZAWU7BDLRJ2\" title=\"Donate\" target=\"_blank\"><img src=\"https://www.paypalobjects.com/en_GB/i/btn/btn_donateCC_LG.gif\" alt=\"Donate\" title=\"Donate\" /></a>\t\t\t\n\t\t\t</td>\n </tr>\n </tbody>\n </table>\n </div><!-- .wrap -->\n <?php\n}", "public function getJs();", "protected function loadLocalization() {}", "static function init(){\r\n if (!Script::$inited) {\r\n Script::$inited = true;\r\n \r\n Script::$script[\"en\"][Script::LANG] = \"English\";\r\n Script::$script[\"id\"][Script::LANG] = \"Bahasa Indonesia\";\r\n \r\n Script::$script[\"en\"][Script::QUEST] = \"Quest\";\r\n Script::$script[\"id\"][Script::QUEST] = \"Quest\";\r\n \r\n Script::$script[\"en\"][Script::TOKEN_REJECT] = \"Reject token\";\r\n Script::$script[\"id\"][Script::TOKEN_REJECT] = \"Token Menolak\";\r\n \r\n Script::$script[\"en\"][Script::MERLIN] = \"Merlin \". Constant::EMO_MERLIN;\r\n Script::$script[\"id\"][Script::MERLIN] = \"Merlin \". Constant::EMO_MERLIN;\r\n \r\n Script::$script[\"en\"][Script::PERCIVAL] = \"Percival \". Constant::EMO_PERCIVAL;\r\n Script::$script[\"id\"][Script::PERCIVAL] = \"Percival \". Constant::EMO_PERCIVAL;\r\n \r\n Script::$script[\"en\"][Script::MORGANA] = \"Morgana \" .Constant::EMO_MORGANA;\r\n Script::$script[\"id\"][Script::MORGANA] = \"Morgana \".Constant::EMO_MORGANA;\r\n \r\n Script::$script[\"en\"][Script::OBERON] = \"Oberon \" .Constant::EMO_OBERON;\r\n Script::$script[\"id\"][Script::OBERON] = \"Oberon \".Constant::EMO_OBERON;\r\n \r\n Script::$script[\"en\"][Script::NINJA] = \"Ninja \".Constant::EMO_NINJA;\r\n Script::$script[\"id\"][Script::NINJA] = \"Ninja \".Constant::EMO_NINJA;\r\n \r\n Script::$script[\"en\"][Script::MORDRED] = \"Mordred \".Constant::EMO_MORDRED;\r\n Script::$script[\"id\"][Script::MORDRED] = \"Mordred \".Constant::EMO_MORDRED;\r\n \r\n Script::$script[\"en\"][Script::SERVANT] = \"Servant \".Constant::EMO_SERVANT;\r\n Script::$script[\"id\"][Script::SERVANT] = \"Rakyat Jelata \".Constant::EMO_SERVANT;\r\n \r\n Script::$script[\"en\"][Script::THIEF] = \"Thief \" .Constant::EMO_THIEF;\r\n Script::$script[\"id\"][Script::THIEF] = \"Penjahat Biasa \".Constant::EMO_THIEF;\r\n \r\n Script::$script[\"en\"][Script::WITCH] = \"Witch \" .Constant::EMO_WITCH;\r\n Script::$script[\"id\"][Script::WITCH] = \"Penyihir \".Constant::EMO_WITCH;\r\n \r\n Script::$script[\"en\"][Script::AGENT] = \"Agent \" .Constant::EMO_AGENT;\r\n Script::$script[\"id\"][Script::AGENT] = \"Agen \" .Constant::EMO_AGENT;\r\n \r\n Script::$script[\"en\"][Script::AUDITOR] = \"Auditor \".Constant::EMO_AUDITOR;\r\n Script::$script[\"id\"][Script::AUDITOR] = \"Auditor \".Constant::EMO_AUDITOR;\r\n \r\n Script::$script[\"en\"][Script::ASSASSIN] = \"Assassin \" .Constant::EMO_ASSASSIN;\r\n Script::$script[\"id\"][Script::ASSASSIN] = \"Assassin \".Constant::EMO_ASSASSIN;\r\n \r\n Script::$script[\"en\"][Script::MORGAUSE] = \"Morgause \" .Constant::EMO_MORGAUSE;\r\n Script::$script[\"id\"][Script::MORGAUSE] = \"Morgause \".Constant::EMO_MORGAUSE;\r\n \r\n Script::$script[\"en\"][Script::KNIGHT] = \"Knight \".Constant::EMO_KNIGHT;\r\n Script::$script[\"id\"][Script::KNIGHT] = \"Ksatria \".Constant::EMO_KNIGHT;\r\n \r\n // NEW\r\n Script::$script[\"en\"][Script::GOOD_LANCELOT] = \"Good Lancelot \".Constant::EMO_GOOD_LANCELOT;\r\n Script::$script[\"id\"][Script::GOOD_LANCELOT] = \"Good Lancelot \".Constant::EMO_GOOD_LANCELOT;\r\n \r\n // NEW\r\n Script::$script[\"en\"][Script::EVIL_LANCELOT] = \"Evil Lancelot \".Constant::EMO_EVIL_LANCELOT;\r\n Script::$script[\"id\"][Script::EVIL_LANCELOT] = \"Evil Lancelot \".Constant::EMO_EVIL_LANCELOT;\r\n \r\n Script::$script[\"en\"][Script::PR_NEWGAME]\r\n = \"You have created the new game - %s mode in group %s.\";\r\n Script::$script[\"id\"][Script::PR_NEWGAME]\r\n = \"Kamu telah membuat permainan baru - %s di grup %s.\";\r\n \r\n Script::$script[\"en\"][Script::PR_JOINGAME]\r\n = \"You have joined the Avalon game in Group %s.\";\r\n Script::$script[\"id\"][Script::PR_JOINGAME]\r\n = \"Kamu telah bergabung Avalon di group %s.\";\r\n \r\n Script::$script[\"en\"][Script::PU_KINGDONE]\r\n = \"The king has already found the answer and then finally decided to finish this never-ending discussion.\";\r\n Script::$script[\"id\"][Script::PU_KINGDONE]\r\n = \"Raja sudah mendapatkan pencerahan dan akhirnya memutuskan untuk mengakhiri diskusi tiada akhir ini.\";\r\n \r\n Script::$script[\"en\"][Script::PU_REJECTCHANGEKING]\r\n = \"The quest lead by %s has been already rejected. The Quest is now lead by the new king: %s.\";\r\n Script::$script[\"id\"][Script::PU_REJECTCHANGEKING]\r\n = \"Quest yang dipimpin oleh %s telah ditolak. Quest dibatalkan dan king berpindah ke %s.\";\r\n \r\n Script::$script[\"en\"][Script::PU_KINGNEEDDISCUSS]\r\n = \"Before assign <b>%d persons</b>, %s as the king has <b>%d seconds</b> to discuss with the team. King may type /done to finish the discussion. Click /questhistory to see the history.\";\r\n Script::$script[\"id\"][Script::PU_KINGNEEDDISCUSS]\r\n = \"Sebelum menunjuk <b>%d orang</b>, %s sebagai raja mempunyai <b>%d detik</b> untuk berdiskusi dengan tim. Raja boleh mengetik /done untuk mengakhiri diskusi. Klik /questhistory untuk melihat history.\";\r\n\r\n Script::$script[\"en\"][Script::PU_AFTERAPPROVE]\r\n = \"Most of the team members approved. The quest will be executed!\";\r\n Script::$script[\"id\"][Script::PU_AFTERAPPROVE]\r\n = \"Sebagian besar tim setuju, quest pun akan dijalankan!\";\r\n \r\n Script::$script[\"en\"][Script::PR_EXECQUEST]\r\n = \"Quest no.%d. What do you want to choose?\";\r\n Script::$script[\"id\"][Script::PR_EXECQUEST]\r\n = \"Quest ke-%d. Apa yang ingin kamu pilih?\";\r\n \r\n Script::$script[\"en\"][Script::PR_SUCCESS]\r\n = \"SUCCESS\";\r\n Script::$script[\"id\"][Script::PR_SUCCESS]\r\n = \"SUKSES\";\r\n \r\n Script::$script[\"en\"][Script::PR_FAIL]\r\n = \"FAIL\";\r\n Script::$script[\"id\"][Script::PR_FAIL]\r\n = \"GAGAL\";\r\n \r\n Script::$script[\"en\"][Script::PR_2FAIL]\r\n = \"2 FAIL\";\r\n Script::$script[\"id\"][Script::PR_2FAIL]\r\n = \"2 GAGAL\";\r\n \r\n Script::$script[\"en\"][Script::PR_EXECQUESTGOOD]\r\n = \"You are a good guy. You put a lot effort to finish the quest as well as possible.\";\r\n Script::$script[\"id\"][Script::PR_EXECQUESTGOOD]\r\n = \"Kamu orang baik. Kamu pun berusaha untuk menyelesaikan quest dengan sebaik-baiknya.\";\r\n \r\n // NEW\r\n Script::$script[\"en\"][Script::PR_EXECQUESTLANCELOT]\r\n = \"As the Evil Lancelot, you must fail the mission no matter what. “?(`?´)?\";\r\n Script::$script[\"id\"][Script::PR_EXECQUESTLANCELOT]\r\n = \"Sebagai Evil Lancelot, kamu harus menggagalkan misi apapun yang terjadi. “?(`?´)?\";\r\n \r\n Script::$script[\"en\"][Script::PR_GOFORQUEST]\r\n = \"%s go to execute the quest. <b>%d seconds</b> are given to finish the quest.\";\r\n Script::$script[\"id\"][Script::PR_GOFORQUEST]\r\n = \"%s pergi untuk menyelesaikan quest. Diberikan waktu <b>%d detik</b> untuk menyelesaikan quest.\";\r\n \r\n Script::$script[\"en\"][Script::PR_YOUAREMERLIN]\r\n = \"You are Merlin. Bad aura is radiated from %s. Guide your team without getting caught by the bad guys! Note: Merlin should not use the Private Message to communicate with the team.\";\r\n Script::$script[\"id\"][Script::PR_YOUAREMERLIN]\r\n = \"Kamu adalah Merlin. Aura jahat terpancar kuat dari %s. Pandu timmu dalam quest tanpa ketahuan tim jahat! Catatan: Merlin tidak boleh menggunakan PM untuk berkomunikasi dengan tim.\";\r\n \r\n Script::$script[\"en\"][Script::PR_YOUAREPERCIVAL]\r\n = \"You are Percival. You see %s as Merlin, but it seems that only one of them is the true Merlin. Note: you should not use Private Message to ask Merlin directly.\";\r\n Script::$script[\"id\"][Script::PR_YOUAREPERCIVAL]\r\n = \"Kamu adalah Percival. Kamu melihat %s sebagai Merlin, namun hanya satu dari mereka Merlin yang asli. Catatan: kamu tidak boleh menggunakan PM untuk bertanya Merlin secara langsung.\";\r\n \r\n Script::$script[\"en\"][Script::PR_YOUAREGOODNORMAL]\r\n = \"You are servant. You don't know anything good or bad, but it is important to follow the right king. You should not use the Private Message to communicate.\";\r\n Script::$script[\"id\"][Script::PR_YOUAREGOODNORMAL]\r\n = \"Kamu adalah Rakyat jelata yang baik. Kamu tidak tahu menahu, yang penting ikut menyukseskan quest dan mengikuti perintah raja. Kamu tidak boleh menggunakan PM untuk berkomunikasi.\";\r\n \r\n Script::$script[\"en\"][Script::PR_YOUAREMORDRED]\r\n = \"You are Mordred. You team are %s. Merlin does not know you are in the bad side. You should not use the Private Message to communicate.\";\r\n Script::$script[\"id\"][Script::PR_YOUAREMORDRED]\r\n = \"Kamu adalah Mordred. Tim jahatmu adalah %s. Merlin tidak tahu bahwa kamu orang jahat. Kamu tidak boleh menggunakan PM untuk berkomunikasi.\";\r\n \r\n Script::$script[\"en\"][Script::PR_YOUARENINJA]\r\n = \"You are Ninja (Super Mordred). You team are %s. Merlin does not know you are in the bad side. You can give 2 FAILs if you are assigned in a quest, but this ability can only be used once per one game. You should not use the Private Message to communicate.\";\r\n Script::$script[\"id\"][Script::PR_YOUARENINJA]\r\n = \"Kamu adalah Ninja (Super Mordred). Tim jahatmu adalah %s. Merlin tidak tahu bahwa kamu orang jahat. Kamu bisa memberikan 2 GAGAL jika kamu diikutkan dalam sebuah quest, namun kemampuan ini hanya bisa dipakai 1 kali saja dalam 1 game. Kamu tidak boleh menggunakan PM untuk berkomunikasi.\";\r\n\r\n Script::$script[\"en\"][Script::PR_YOUAREAGENT]\r\n = \"You are Agent, a good person whose job is to succeed the missions. The same secret codes are given to agents after a quest has been failed. Find your agent teammates, then together you will succeed the mission easier. You should not use the Private Message to communicate.\";\r\n Script::$script[\"id\"][Script::PR_YOUAREAGENT]\r\n = \"Kamu adalah agent, orang baik yang bertugas untuk menyukseskan misi. Kode rahasia yang sama akan diberikan ke agent setelah sebuah quest gagal. Temukan teman agenmu, maka bersama-sama kalian akan menyukseskan misi lebih mudah. Kamu tidak boleh menggunakan PM untuk berkomunikasi.\";\r\n \r\n Script::$script[\"en\"][Script::PR_YOUAREWITCH]\r\n = \"You are Witch, an evil person. Your evil teams are %s. With your ability, you know that there are these roles on the good sides: %s. You should not use the Private Message to communicate.\";\r\n Script::$script[\"id\"][Script::PR_YOUAREWITCH]\r\n = \"Kamu adalah Witch (Penyihir), orang jahat. Tim jahatmu adalah %s. Dengan kemampuanmu, kamu tahu bahwa ada peran-peran ini di sisi baik: %s. Kamu tidak boleh menggunakan PM untuk berkomunikasi.\";\r\n \r\n Script::$script[\"en\"][Script::PR_YOUAREAUDITOR]\r\n = \"You are Auditor, a good person. When you are assigned for a quest, there is 20% chance you can eliminate 1 FAIL for that quest.\";\r\n Script::$script[\"id\"][Script::PR_YOUAREAUDITOR]\r\n = \"Kamu adalah Auditor, orang baik. Ketika kamu ditunjuk di sebuah quest, ada 20% kemungkinan kamu dapat menghilangkan 1 FAIL dari quest itu.\";\r\n \r\n // NEW\r\n Script::$script[\"en\"][Script::PR_YOUAREGOODLANCELOT]\r\n = \"You are <b>\".Script::$script[\"en\"][Script::GOOD_LANCELOT]\r\n .\"</b>. Your allegiance is not stable. Sometimes, you cannot control your emotion and become evil.\";\r\n Script::$script[\"id\"][Script::PR_YOUAREGOODLANCELOT]\r\n = \"You are <b>\".Script::$script[\"id\"][Script::GOOD_LANCELOT]\r\n .\"</b>. Kepercayaanmu terhadap kebenaran goyah. Kadang kamu tidak dapat mengontrol emosi dan menjadi jahat.\";\r\n \r\n // NEW\r\n Script::$script[\"en\"][Script::PR_YOUAREEVILLANCELOT]\r\n = \"You are <b>\".Script::$script[\"en\"][Script::EVIL_LANCELOT]\r\n .\"</b>. You don't know your any evil friends. Your allegiance is not stable. Sometimes, you cannot control your emotion and become good.\";\r\n Script::$script[\"id\"][Script::PR_YOUAREEVILLANCELOT]\r\n = \"Kamu adalah <b>\".Script::$script[\"id\"][Script::EVIL_LANCELOT]\r\n .\"</b>. Kamu tidak tahu satu pun teman jahatmu. Pendirianmu tidak kuat. Kadang, kamu tidak bisa mengontrol emosi dan menjadi baik.\";\r\n \r\n Script::$script[\"en\"][Script::PU_FORECAST_LANCELOT]\r\n = Constant::EMO_MEGAPHONE_B. \"Lancelot roles have entered. Use the following forecast to see the future!\\n\";\r\n Script::$script[\"id\"][Script::PU_FORECAST_LANCELOT]\r\n = Constant::EMO_MEGAPHONE_B. \"Peran Lancelot sudah masuk. Gunakan ramalan berikut untuk melihat masa depan!\\n\";\r\n \r\n Script::$script[\"en\"][Script::PU_LANCELOT_NOT_SWITCHED]\r\n = Constant::EMO_SINGLE_EXCLAMATION_MARK. \"This turn Evil Lancelot is evil and Good Lancelot is good. As usual. \" . Constant::EMO_HEART_NOT_SWITCH;\r\n Script::$script[\"id\"][Script::PU_LANCELOT_NOT_SWITCHED]\r\n = Constant::EMO_SINGLE_EXCLAMATION_MARK. \"Di giliran ini, Evil Lancelot tetap jahat dan Good Lancelot tetap baik, seperti biasa. \" . Constant::EMO_HEART_NOT_SWITCH;\r\n \r\n Script::$script[\"en\"][Script::PU_LANCELOT_SWITCHED]\r\n = Constant::EMO_EXCLAMATION_MARK .Constant::EMO_EXCLAMATION_MARK .Constant::EMO_EXCLAMATION_MARK\r\n . \"This turn Evil Lancelot becomes good and Good Lancelot becomes evil! \" . Constant::EMO_HEART_SWITCH;\r\n Script::$script[\"id\"][Script::PU_LANCELOT_SWITCHED]\r\n = Constant::EMO_EXCLAMATION_MARK .Constant::EMO_EXCLAMATION_MARK .Constant::EMO_EXCLAMATION_MARK\r\n . \"Di giliran ini, Evil Lancelot menjadi baik dan Good Lancelot menjadi jahat. \" . Constant::EMO_HEART_SWITCH;\r\n \r\n Script::$script[\"en\"][Script::PR_FAILDECREASE1]\r\n = \"You use the ability of auditor. You have decreased the 1 FAIL for this quest.\";\r\n Script::$script[\"id\"][Script::PR_FAILDECREASE1]\r\n = \"Kamu menggunakan kemampuan auditor. Kamu berhasil mengurangi 1 FAIL for this quest.\";\r\n \r\n Script::$script[\"en\"][Script::PR_AUDITORDECREASE1]\r\n = \"Auditor has used the ability to decrease 1 FAIL for this quest.\";\r\n Script::$script[\"id\"][Script::PR_AUDITORDECREASE1]\r\n = \"Auditor berhasil mengurangi 1 FAIL di quest ini.\";\r\n \r\n Script::$script[\"en\"][Script::PR_YOUAREASSASSIN]\r\n = \"You are Assassin. Your team are %s. At the end of the game, you can kill Merlin to win.\";\r\n Script::$script[\"id\"][Script::PR_YOUAREASSASSIN]\r\n = \"Kamu adalah Assassin. Tim jahatmu adalah %s. Di akhir permainan, kamu bisa membunuh Merlin untuk menang.\";\r\n \r\n Script::$script[\"en\"][Script::PR_YOUAREMORGANA]\r\n = \"You are Morgana. Your evil team are %s. On Percival's eyes, you are Merlin.\";\r\n Script::$script[\"id\"][Script::PR_YOUAREMORGANA]\r\n = \"Kamu adalah Morgana. Tim jahatmu adalah %s. Di mata Percival, kamu adalah Merlin.\";\r\n \r\n Script::$script[\"en\"][Script::PR_YOUAREOBERON]\r\n = \"You are Oberon. Your evil teams are %s. The other evil teams don't know that you are evil. You should not use Private Message to communicate.\";\r\n Script::$script[\"id\"][Script::PR_YOUAREOBERON]\r\n = \"Kamu adalah Oberon. Tim jahatmu adalah %s. Tim jahat yang lain tidak tahu bahwa kamu adalah jahat. Kamu tidak boleh menggunakan PM untuk berkomunikasi.\";\r\n\r\n Script::$script[\"en\"][Script::PR_YOUAREBADNORMAL]\r\n = \"You are the bad guy. Your evil team are %s.\";\r\n Script::$script[\"id\"][Script::PR_YOUAREBADNORMAL]\r\n = \"Kamu adalah Pejahat kacangan. Tim jahatmu adalah %s.\";\r\n \r\n Script::$script[\"en\"][Script::PR_YOUAREMORGAUSE]\r\n = \"You are Morgause (Morgana with assassin ability). Your team are %s. On Percival's eyes, you were Merlin. At the end of the game, you can kill Merlin to win.\";\r\n Script::$script[\"id\"][Script::PR_YOUAREMORGAUSE]\r\n = \"Kamu adalah Morgause (Morgana dengan kemampuan assassin). Tim jahatmu adalah %s. Di mata Percival, kamu adalah Merlin. Di akhir permainan, kamu bisa membunuh Merlin untuk menang.\";\r\n \r\n Script::$script[\"en\"][Script::PR_YOUAREKNIGHTTHEREBAD]\r\n = \"You are Knight, a good person whose job is to succeed the mission. Between %s and %s, there is at least 1 person is bad role. (Remember, knight cannot detect Mordred)\";\r\n Script::$script[\"id\"][Script::PR_YOUAREKNIGHTTHEREBAD]\r\n = \"Kamu adalah seorang Knight (Ksatria) yang bertugas untuk mensukseskan misi. Di antara %s dan %s, terdapat setidaknya 1 orang jahat (Ingat, knight tidak dapat mendeteksi Mordred)\";\r\n \r\n cript::$script[\"en\"][Script::PR_YOUAREKNIGHTNOBAD]\r\n = \"You are Knight, a good person whose job it to succeed the quests. Between %s and %s, it seems that there is no bad guys. (Remember, knight cannot detect Mordred or Ninja)\";\r\n Script::$script[\"id\"][Script::PR_YOUAREKNIGHTNOBAD]\r\n = \"Kamu adalah seorang Knight (Ksatria) yang bertugas menyukseskan misi. Di antara %s dan %s, sepertinya tidak terdapat orang jahat. (Ingat, knight tidak dapat mendeteksi Mordred)\";\r\n \r\n Script::$script[\"en\"][Script::PR_AGENTSECRETCODE]\r\n = \"The secret codes have been decrypted: %s. Use this code to find the other agents! Note: you cannot use Private Message to communicate.\";\r\n Script::$script[\"id\"][Script::PR_AGENTSECRETCODE]\r\n = \"Kode rahasia sudah terpecahkan: %s. gunakan kode ini untuk menemukan agent lainnya! Catatan: kamu tidak boleh menggunakan PM untuk berkomunikasi.\";\r\n \r\n Script::$script[\"en\"][Script::PU_APPROVE]\r\n = \"Approve \".Constant::EMO_YES_B;\r\n Script::$script[\"id\"][Script::PU_APPROVE]\r\n = \"Setuju \".Constant::EMO_YES_B;\r\n \r\n Script::$script[\"en\"][Script::PU_REJECT]\r\n = \"Reject \".Constant::EMO_NO_B;\r\n Script::$script[\"id\"][Script::PU_REJECT]\r\n = \"Menolak \".Constant::EMO_NO_B;\r\n \r\n Script::$script[\"en\"][Script::PU_APPREJ_BOARD_REVEAL]\r\n = \"Approve (<b>%d</b>) : %s\\n\"\r\n .\"Reject (<b>%d</b>) : %s\";\r\n Script::$script[\"id\"][Script::PU_APPREJ_BOARD_REVEAL]\r\n = \"Setuju (<b>%d</b>) : %s\\n\"\r\n .\"Menolak (<b>%d</b>) : %s\";\r\n \r\n Script::$script[\"en\"][Script::PU_APPREJ_BOARD_HIDE]\r\n = \"Approve/Reject?? (<b>%d</b>) : %s\";\r\n Script::$script[\"id\"][Script::PU_APPREJ_BOARD_HIDE]\r\n = \"Setuju/Menolak?? (<b>%d</b>) : %s\";\r\n \r\n Script::$script[\"en\"][Script::PU_LADYHOLDER]\r\n = Constant::EMO_LADY_B .\" : %s\\n\";\r\n Script::$script[\"id\"][Script::PU_LADYHOLDER]\r\n = Constant::EMO_LADY_B .\" : %s\\n\";\r\n \r\n Script::$script[\"en\"][Script::PU_KINGNEEDASSIGN]\r\n = \"%s as king will assign <b>%d persons</b> to execute the quest. The king is given time <b>%d seconds</b>\";\r\n Script::$script[\"id\"][Script::PU_KINGNEEDASSIGN]\r\n = \"%s sebagai raja akan menunjuk <b>%d orang</b> untuk menyelesaikan quest. Raja diberikan waktu sebanyak <b>%d detik</b>\";\r\n \r\n Script::$script[\"en\"][Script::PR_SENDONEPLAYER]\r\n = \"Choose person no.%d (from %d persons) to execute the quest\";\r\n Script::$script[\"id\"][Script::PR_SENDONEPLAYER]\r\n = \"Pilih orang ke-%d (dari %d orang) untuk menyelesaikan quest\";\r\n \r\n Script::$script[\"en\"][Script::PR_KILLMERLIN]\r\n = \"You evil team has lost the missions. But, you still have the last weapon. Kill Merlin!\";\r\n Script::$script[\"id\"][Script::PR_KILLMERLIN]\r\n = \"Tim jahatmu sudah kalah dalam misi. Namun, kamu masih punya senjata terakhir. Bunuh Merlin!\";\r\n \r\n Script::$script[\"en\"][Script::PR_LADYCHOOSE]\r\n = \"Choose one person you want to see its true identity.\";\r\n Script::$script[\"id\"][Script::PR_LADYCHOOSE]\r\n = \"Pilih orang untuk diterawang.\";\r\n \r\n Script::$script[\"en\"][Script::PU_APPRREJINST]\r\n = \"%s has assigned %s to do the quest.\\n\\nYou have <b>%d seconds</b> to choose. Type /showvote to show the voting buttons.\";\r\n Script::$script[\"id\"][Script::PU_APPRREJINST]\r\n = \"%s telah menunjuk %s untuk menyelesaikan quest.\\n\\nDiberikan waktu <b>%d detik</b> untuk memilih. Ketik /showvote untuk melihat tombol vote.\";\r\n \r\n Script::$script[\"en\"][Script::PU_SHOWVOTE]\r\n = \"Click the above reply message to vote.\";\r\n Script::$script[\"id\"][Script::PU_SHOWVOTE]\r\n = \"Klik pesan reply di atas untuk vote.\";\r\n \r\n Script::$script[\"en\"][Script::PU_REJECT5TIMES]\r\n = \"Quest was rejected 5 times, so it's failed.\";\r\n Script::$script[\"id\"][Script::PU_REJECT5TIMES]\r\n = \"Quest sudah di-reject 5 kali, sehingga dianggap gagal.\\n\";\r\n \r\n Script::$script[\"en\"][Script::PU_FAILWITHXFAIL]\r\n = \"In quest, we found <b>%d FAIL</b>! Quest is failed.\";\r\n Script::$script[\"id\"][Script::PU_FAILWITHXFAIL]\r\n = \"Dalam menyelesaikan quest ditemukan <b>%d FAIL</b>! Quest dianggap gagal.\";\r\n\r\n Script::$script[\"en\"][Script::PU_BADGUYSWONQUEST]\r\n = \"The good guys cried, they didn't have any chance. The evil team held a party, celebrating their victory..\";\r\n Script::$script[\"id\"][Script::PU_BADGUYSWONQUEST]\r\n = \"Tim baik menangis, mereka tidak diberi kesempatan ole tim jahat. Tim jahat pun mengadakan pesta, merayakan kemenangan mereka.\";\r\n \r\n Script::$script[\"en\"][Script::PU_BADGUYSWONKILL]\r\n = \"The good guys thought they'd won, but they now realize that it is merely a ruse of the wicked. The evil team laugh over their victory...\";\r\n Script::$script[\"id\"][Script::PU_BADGUYSWONKILL]\r\n = \"Orang baik pikir mereka sudah menang, namun sesunggunya itu hanyalah jebakan dari orang jahat. Para penjahat tertawa atas kemenangan mereka...\";\r\n \r\n Script::$script[\"en\"][Script::PU_GOODGUYSWON]\r\n = \"Congratulations! The good team won! The good team are really solid and very clever deceiving evil team.\";\r\n Script::$script[\"id\"][Script::PU_GOODGUYSWON]\r\n = \"Selamat! Tim baik menang! Tim baik memang kompak dan pintar menipu orang jahat..\";\r\n \r\n Script::$script[\"en\"][Script::PU_LADYLAKEINST]\r\n = \"%s as Lady of the Lake may use the power to see the true identity of one player. The other team members may give the advice.. <b>%d seconds</b> are given to do the action.\";\r\n Script::$script[\"id\"][Script::PU_LADYLAKEINST]\r\n = \"%s sebagai Lady of the Lake dapat menggunakan kekuatannya untuk menerawang salah seorang anggota tim. Anggota tim lain boleh memberikan petunjuk... Diberikan waktu <b>%d detik</b>.\";\r\n \r\n Script::$script[\"en\"][Script::PU_KILLMERLIN]\r\n = \"3 Quest has been successfully done by the team. However, evil team still has the last weapon. The evil team are %s. If the assassin can guess the Merlin, the evil team will win! Evil team has <b>%d seconds</b> to decide.\";\r\n Script::$script[\"id\"][Script::PU_KILLMERLIN]\r\n = \"3 Quest berhasil disukseskan oleh tim. Namun, tim jahat masih mempunyai senjata terakhir. Tim jahat membuka kedok mereka %s.. Jika assassin berhasil menebak merlin, maka tim jahatlah yang menang! Diberikan waktu <b>%d detik</b>.\";\r\n \r\n Script::$script[\"en\"][Script::PU_QSUCCESSNOFAIL]\r\n = \"Quest has been successfully done! \";\r\n Script::$script[\"id\"][Script::PU_QSUCCESSNOFAIL]\r\n = \"Quest berhasil diselesaikan dengan baik sekali. \";\r\n \r\n Script::$script[\"en\"][Script::PU_QSUCCESSXXFAIL]\r\n = \"However, team found there is <b>%d FAIL</b> in this quest..\";\r\n Script::$script[\"id\"][Script::PU_QSUCCESSXXFAIL]\r\n = \"Namun, tim menemukan <b>%d FAIL </b> dalam quest ini..\";\r\n \r\n Script::$script[\"en\"][Script::PR_ASSIGNONEQUEST]\r\n = \"You have successfully assigned %s in quest.\";\r\n Script::$script[\"id\"][Script::PR_ASSIGNONEQUEST]\r\n = \"Kamu berhasil memilih %s dalam quest.\";\r\n \r\n Script::$script[\"en\"][Script::PU_ASSIGNONEQUEST]\r\n = \"%s assigned %s in quest.\";\r\n Script::$script[\"id\"][Script::PU_ASSIGNONEQUEST]\r\n = \"%s memilih %s dalam quest.\";\r\n \r\n Script::$script[\"en\"][Script::PR_BADGUYSUCCESS]\r\n = \"Although you are evil, you have successfully made a good impression.\";\r\n Script::$script[\"id\"][Script::PR_BADGUYSUCCESS]\r\n = \"Meskipun kamu jahat, kamu berhasil membuat pencitraan yang baik.\";\r\n \r\n Script::$script[\"en\"][Script::PR_BADGUYFAIL]\r\n = \"You have successfully failed the quest.\";\r\n Script::$script[\"id\"][Script::PR_BADGUYFAIL]\r\n = \"Kamu berhasil menggagalkan quest.\";\r\n \r\n Script::$script[\"en\"][Script::PR_BADGUY2FAIL]\r\n = \"You have successfully used ninja ability. This quest is given 2 FAILS!\";\r\n Script::$script[\"id\"][Script::PR_BADGUY2FAIL]\r\n = \"Kamu berhasil menggunakan kemampuan ninja. Quest ini diberikan 2 kegagalan!\";\r\n \r\n Script::$script[\"en\"][Script::PR_LADYNOTSEE]\r\n = \"You decided to not use your power to see.\";\r\n Script::$script[\"id\"][Script::PR_LADYNOTSEE]\r\n = \"Kamu memilih untuk tidak menerawang..\";\r\n \r\n Script::$script[\"en\"][Script::PU_LADYNOTSEE]\r\n = \"%s decided to not use the power to see.\";\r\n Script::$script[\"id\"][Script::PU_LADYNOTSEE]\r\n = \"%s memilih untuk tidak menerawang.\";\r\n \r\n Script::$script[\"en\"][Script::PR_LADYSEE]\r\n = \"You have seen %s.. He/she is \";\r\n Script::$script[\"id\"][Script::PR_LADYSEE]\r\n = \"Kamu berhasil menerawang %s.. Dia adalah orang \";\r\n \r\n Script::$script[\"en\"][Script::PR_GOOD]\r\n = \"good.\";\r\n Script::$script[\"id\"][Script::PR_GOOD]\r\n = \"baik.\";\r\n \r\n Script::$script[\"en\"][Script::PR_BAD]\r\n = \"evil.\";\r\n Script::$script[\"id\"][Script::PR_BAD]\r\n = \"jahat.\";\r\n \r\n Script::$script[\"en\"][Script::PU_LADYSEE]\r\n = \"%s use its power to see %s.\";\r\n Script::$script[\"id\"][Script::PU_LADYSEE]\r\n = \"%s menerawang %s.\";\r\n \r\n Script::$script[\"en\"][Script::PR_KILLMERLINSUCCESS]\r\n = \"You have successfully killed %s.\";\r\n Script::$script[\"id\"][Script::PR_KILLMERLINSUCCESS]\r\n = \"Kamu berhasil membunuh %s.\";\r\n \r\n Script::$script[\"en\"][Script::PU_KILLMERLINSUCCESS]\r\n = \"%s have successfully killed %s and in fact %s \";\r\n Script::$script[\"id\"][Script::PU_KILLMERLINSUCCESS]\r\n = \"%s berhasil membunuh %s dan ternyata %s \";\r\n \r\n Script::$script[\"en\"][Script::PU_MERLIN]\r\n = \"is <b>MERLIN</b>!\";\r\n Script::$script[\"id\"][Script::PU_MERLIN]\r\n = \"adalah <b>MERLIN</b>!\";\r\n \r\n Script::$script[\"en\"][Script::PU_NOTMERLIN]\r\n = \"is <b>not MERLIN</b>!\";\r\n Script::$script[\"id\"][Script::PU_NOTMERLIN]\r\n = \"<b>bukan MERLIN</b>!\";\r\n \r\n Script::$script[\"en\"][Script::PR_ASSIGNLATE]\r\n = \"The time's up. The rest of players are assigned randomly. \";\r\n Script::$script[\"id\"][Script::PR_ASSIGNLATE]\r\n = \"Jawabanmu terlambat, sisa player dipilih secara random. \";\r\n \r\n Script::$script[\"en\"][Script::PU_ASSIGNLATE]\r\n = \"Because the time's up, the rest of players are assigned randomly: %s.\";\r\n Script::$script[\"id\"][Script::PU_ASSIGNLATE]\r\n = \"Karena waktu habis, sisa pemain dipilih secara random: %s.\";\r\n \r\n Script::$script[\"en\"][Script::PU_APPRREJLATE]\r\n = \"Because the time's up, the rest of the members are assumed abstain.\";\r\n Script::$script[\"id\"][Script::PU_APPRREJLATE]\r\n = \"Karena waktu habis, pemain lain dianggap memilih abstain.\";\r\n \r\n Script::$script[\"en\"][Script::PU_APPRREJREMIND]\r\n = \"The assignees in this quest are %s\\n\\n<b>%d seconds</b> left to choose <b>approve</b> or <b>reject</b>. If there is minimum <b>%d member(s)</b> fail the quest, the quest will be failed.\";\r\n Script::$script[\"id\"][Script::PU_APPRREJREMIND]\r\n = \"Pejuang di quest ini %s\\n\\n<b>%d detik</b> lagi untuk memilih <b>setuju</b> atau <b>menolak</b>. Jika ada minimal <b>%d anggota</b> menggagalkan quest, maka quest akan dianggap gagal!\";\r\n \r\n Script::$script[\"en\"][Script::PR_BADGUYLATESUCCESS]\r\n = \"You answered late. Boss forced you to give the good impression this time.\";\r\n Script::$script[\"id\"][Script::PR_BADGUYLATESUCCESS]\r\n = \"Jawabanmu terlambat. Boss memaksamu untuk memberikan pencitraan yang baik.\";\r\n \r\n Script::$script[\"en\"][Script::PR_BADGUYLATEFAIL]\r\n = \"You answered late. Boss forced you to fail the quest.\";\r\n Script::$script[\"id\"][Script::PR_BADGUYLATEFAIL]\r\n = \"Jawabanmu terlambat. Kamu dipaksa menggagalkan quest dari boss.\";\r\n \r\n Script::$script[\"en\"][Script::PU_DISCUSSREMIND]\r\n = \"<b>%d seconds</b> left to discuss... %s may type /done if you are ready to give the assignment.\";\r\n Script::$script[\"id\"][Script::PU_DISCUSSREMIND]\r\n = \"<b>%d detik</b> lagi untuk berdiskusi... %s boleh mengetik /done jika sudah mendapat pencerahan.\";\r\n \r\n Script::$script[\"en\"][Script::PR_LADYLATE]\r\n = \"You answered late to see the person's identity.\";\r\n Script::$script[\"id\"][Script::PR_LADYLATE]\r\n = \"Kamu terlambat memilih untuk menerawang..\";\r\n \r\n Script::$script[\"en\"][Script::PU_LADYLATE]\r\n = \"%s answered late so the power to see is not used.\";\r\n Script::$script[\"id\"][Script::PU_LADYLATE]\r\n = \"%s terlambat memilih sehingga tidak bisa menerawang.\";\r\n \r\n Script::$script[\"en\"][Script::PR_KILLMERLINLATE]\r\n = \"You answered late to kill Merlin.\";\r\n Script::$script[\"id\"][Script::PR_KILLMERLINLATE]\r\n = \"Kamu terlambat memilih untuk membunuh Merlin..\";\r\n \r\n Script::$script[\"en\"][Script::PU_KILLMERLINLATE]\r\n = \"%s answered late. It seems Merlin is saved this time.\";\r\n Script::$script[\"id\"][Script::PU_KILLMERLINLATE]\r\n = \"%s terlambat memilih.. Sepertinya Merlin selamat kali ini..\";\r\n \r\n Script::$script[\"en\"][Script::PU_KILLMERLINREMIND]\r\n = \"<b>%d seconds</b> left for assassin to guess and kill Merlin...\";\r\n Script::$script[\"id\"][Script::PU_KILLMERLINREMIND]\r\n = \"<b>%d detik</b> lagi waktu yang dibutuhkan assassin untuk membunuh Merlin...\";\r\n \r\n Script::$script[\"en\"][Script::PU_NOHISTFOUND]\r\n = \"No History found for the current game.\";\r\n Script::$script[\"id\"][Script::PU_NOHISTFOUND]\r\n = \"Tidak ditemukan history untuk game yang sedang berlangsung.\";\r\n \r\n Script::$script[\"en\"][Script::PU_HISTQEXECBY]\r\n = \"Quest no.%d %s lead by %s %s, executed by %s\";\r\n Script::$script[\"id\"][Script::PU_HISTQEXECBY]\r\n = \"Quest ke-%d %s dipimpin oleh %s %s, dieksekusi oleh %s\";\r\n \r\n Script::$script[\"en\"][Script::PU_HISTQREJECTBY]\r\n = \", rejected by %s\\n\\n\";\r\n Script::$script[\"id\"][Script::PU_HISTQREJECTBY]\r\n = \", ditolak oleh %s\\n\\n\";\r\n \r\n Script::$script[\"en\"][Script::PU_HISTQFAILREJ]\r\n = \"Quest no.%d [%s 5x REJECT]\\n\\n\";\r\n Script::$script[\"id\"][Script::PU_HISTQFAILREJ]\r\n = \"Quest ke-%d [%s 5x DITOLAK]\\n\\n\";\r\n \r\n Script::$script[\"en\"][Script::PU_FAIL5XREJ]\r\n = \"5x REJECT\";\r\n Script::$script[\"id\"][Script::PU_FAIL5XREJ]\r\n = \"5x DITOLAK\";\r\n \r\n Script::$script[\"en\"][Script::PU_CANNOTJOINFULL]\r\n = \" cannot join. Already %d players.\";\r\n Script::$script[\"id\"][Script::PU_CANNOTJOINFULL]\r\n = \" tidak bisa bergabung. Sudah %d pemain.\";\r\n \r\n Script::$script[\"en\"][Script::PU_CANNOTJOIN]\r\n = \" cannot join.\";\r\n Script::$script[\"id\"][Script::PU_CANNOTJOIN]\r\n = \" tidak bisa bergabung.\";\r\n \r\n Script::$script[\"en\"][Script::PU_STARTMEFIRST]\r\n = \" <a href=\\\"http://telegram.me/%s\\\">Start Me</a> first.\";\r\n Script::$script[\"id\"][Script::PU_STARTMEFIRST]\r\n = \" <a href=\\\"http://telegram.me/%s\\\">Start Me</a> terlebih dahulu.\";\r\n \r\n Script::$script[\"en\"][Script::PU_CREATEFIRST]\r\n = \"Game has not started yet. Type /start or /startchaos to start Avalon.\";\r\n Script::$script[\"id\"][Script::PU_CREATEFIRST]\r\n = \"Game belum distart. Ketik /start atau /startchaos untuk memulai Avalon.\";\r\n \r\n Script::$script[\"en\"][Script::PU_GAMESTART]\r\n = \"Game has been started. Please anyone check the private message to know your role.\";\r\n Script::$script[\"id\"][Script::PU_GAMESTART]\r\n = \"Game sudah dimulai. Silakan cek PM masing-masing untuk melihat peran.\";\r\n \r\n Script::$script[\"en\"][Script::PU_GAMECANCEL]\r\n = \"Game is canceled because there is not enough players. Invite your friends to join.\";\r\n Script::$script[\"id\"][Script::PU_GAMECANCEL]\r\n = \"Game dibatalkan karena tidak cukup pemain. Ayo ajak teman-temanmu untuk join\";\r\n \r\n Script::$script[\"en\"][Script::PU_SECONDSLEFT]\r\n = \"<b>%d seconds</b> left.\";\r\n Script::$script[\"id\"][Script::PU_SECONDSLEFT]\r\n = \"<b>%d detik</b> lagi.\";\r\n \r\n Script::$script[\"en\"][Script::PU_JOINREMIND]\r\n = \"<b>%d seconds</b> left. Invite your friends to /join. Use /forcestart to immediately start the game.\";\r\n Script::$script[\"id\"][Script::PU_JOINREMIND]\r\n = \"<b>%d detik</b> lagi. Ayo ajak teman-temanmu untuk /join. Gunakan /forcestart untuk langsung memulai game.\";\r\n \r\n Script::$script[\"en\"][Script::PU_JOINSTART]\r\n = \"%s has started the Avalon - %s. Type /join to join the game.\";\r\n Script::$script[\"id\"][Script::PU_JOINSTART]\r\n = \"%s telah memulai Avalon - %s. Ketik /join untuk bergabung.\";\r\n \r\n Script::$script[\"en\"][Script::PU_JOINSUCCESS]\r\n = \"%s joined. <b>%d</b> players. min <b>%d</b>. max <b>%d</b>.\";\r\n Script::$script[\"id\"][Script::PU_JOINSUCCESS]\r\n = \"%s bergabung. <b>%d</b> pemain. min <b>%d</b>. max <b>%d</b>.\";\r\n \r\n Script::$script[\"en\"][Script::PU_FLEE_SUCCESS]\r\n = \"%s fleed. <b>%d</b> players remaining.\";\r\n Script::$script[\"id\"][Script::PU_FLEE_SUCCESS]\r\n = \"%s kabur. <b>%d</b> pemain tersisa.\";\r\n \r\n Script::$script[\"en\"][Script::PU_FLEE_FAIL]\r\n = \"%s cannot flee. The game has already started.\";\r\n Script::$script[\"id\"][Script::PU_FLEE_FAIL]\r\n = \"%s tidak dapat kabur. Game sudah dimulai\";\r\n \r\n Script::$script[\"en\"][Script::PU_NEED_MORE_PLAYERS]\r\n = \"We need minimum %d players to start the game.\";\r\n Script::$script[\"id\"][Script::PU_NEED_MORE_PLAYERS]\r\n = \"Dibutuhkan min %d pemain untuk memulai game.\";\r\n \r\n Script::$script[\"en\"][Script::PU_REQUEST_STOP]\r\n = \"%s requested to cancel the game. <b>%d</b> of <b>%d</b>.\";\r\n Script::$script[\"id\"][Script::PU_REQUEST_STOP]\r\n = \"%s ingin membatalkan permainan. <b>%d</b> dari <b>%d</b>.\";\r\n \r\n Script::$script[\"en\"][Script::PU_REQUEST_START]\r\n = \"%s requests to start the game. <b>%d</b> of <b>%d</b>.\";\r\n Script::$script[\"id\"][Script::PU_REQUEST_START]\r\n = \"%s ingin memulai permainan. <b>%d</b> dari <b>%d</b>.\";\r\n \r\n Script::$script[\"en\"][Script::PU_STOP_SUCCESS]\r\n = \"The game is canceled.\";\r\n Script::$script[\"id\"][Script::PU_STOP_SUCCESS]\r\n = \"Permainan dibatalkan.\";\r\n \r\n Script::$script[\"en\"][Script::PR_QUEUE_ME]\r\n = \"You have registered yourself to the next Avalon Game in %s group. Do not forget to /join when the game start. :D\";\r\n Script::$script[\"id\"][Script::PR_QUEUE_ME]\r\n = \"Kamu sudah mendaftarkan diri pada permainan Avalon berikutnya di grup %s. Jangan lupa untuk /join saat game dimulai. :D\";\r\n \r\n Script::$script[\"en\"][Script::PR_QUEUE_CALL]\r\n = \"The Avalon game is going to start in %s group.\";\r\n Script::$script[\"id\"][Script::PR_QUEUE_CALL]\r\n = \"Permainan Avalon akan dimulai di grup %s.\";\r\n \r\n Script::$script[\"en\"][Script::PR_QUEUE_FULL]\r\n = \"You cannot join for the avalon next game. The queue is full. Try to start the game!\";\r\n Script::$script[\"id\"][Script::PR_QUEUE_FULL]\r\n = \"Kamu tidak bisa bergabung ke permainan avalon berikutnya. Antrian penuh. Cobalah untuk memulai permainan!\";\r\n \r\n Script::$script[\"en\"][Script::PU_IN_PROGRESS]\r\n = \"In Progress~\";\r\n Script::$script[\"id\"][Script::PU_IN_PROGRESS]\r\n = \"Sdg berlangsung\";\r\n \r\n Script::$script[\"en\"][Script::NORMAL_MODE]\r\n = \"Normal Mode\";\r\n Script::$script[\"id\"][Script::NORMAL_MODE]\r\n = \"Mode Normal\";\r\n \r\n Script::$script[\"en\"][Script::CHAOS_MODE]\r\n = \"Chaos Mode\";\r\n Script::$script[\"id\"][Script::CHAOS_MODE]\r\n = \"Mode Chaos\";\r\n \r\n // NEW\r\n Script::$script[\"en\"][Script::NO_LANCELOT]\r\n = Constant::EMO_PROHIBITED. \" No Lancelot\";\r\n Script::$script[\"id\"][Script::NO_LANCELOT]\r\n = Constant::EMO_PROHIBITED. \" No Lancelot\";\r\n \r\n // NEW\r\n Script::$script[\"en\"][Script::LANCELOT_V1]\r\n = Constant::EMO_EVIL_LANCELOT. Constant::EMO_HEART_SWITCH. Constant::EMO_GOOD_LANCELOT. \" Lancelot v1\";\r\n Script::$script[\"id\"][Script::LANCELOT_V1]\r\n = Constant::EMO_EVIL_LANCELOT. Constant::EMO_HEART_SWITCH. Constant::EMO_GOOD_LANCELOT. \" Lancelot v1\";\r\n \r\n // NEW\r\n Script::$script[\"en\"][Script::LANCELOT_V2]\r\n = Constant::EMO_EVIL_LANCELOT. Constant::EMO_HEART_SWITCH. Constant::EMO_GOOD_LANCELOT. \" Lancelot v2\";\r\n Script::$script[\"id\"][Script::LANCELOT_V2]\r\n = Constant::EMO_EVIL_LANCELOT. Constant::EMO_HEART_SWITCH. Constant::EMO_GOOD_LANCELOT. \" Lancelot v2\";\r\n \r\n // NEW\r\n Script::$script[\"en\"][Script::PU_LANCELOT_V1_SELECT]\r\n = \"<b>Variant 1 is selected</b>\\n\"\r\n . Script::$script[\"en\"][Script::GOOD_LANCELOT]\r\n .\" and \".Script::$script[\"en\"][Script::EVIL_LANCELOT]\r\n .\" roles will join the game.\\n\"\r\n .\"Both of the roles may switch allegiance during the game.\\n\\n\";\r\n Script::$script[\"id\"][Script::PU_LANCELOT_V1_SELECT]\r\n = \"<b>Variant 1 dipilih</b>\\n\"\r\n . Script::$script[\"en\"][Script::GOOD_LANCELOT]\r\n .\" dan \".Script::$script[\"en\"][Script::EVIL_LANCELOT]\r\n .\" akan masuk ke permainan.\\n\"\r\n .\"Keduanya dapat bertukar peran selama permainan.\\n\\n\";\r\n \r\n // NEW\r\n Script::$script[\"en\"][Script::PU_LANCELOT_V2_SELECT]\r\n = \"<b>Variant 2 is selected</b>\\n\"\r\n .Script::$script[\"en\"][Script::GOOD_LANCELOT]\r\n .\" and \".Script::$script[\"en\"][Script::EVIL_LANCELOT]\r\n .\" roles will join the game.\\n\"\r\n .\"Both of the roles may switch allegiance during the game.\\n\\n\"\r\n .\"In this variant, Evil Lancelot must fail the quest he is on.\\n\\n\";\r\n Script::$script[\"id\"][Script::PU_LANCELOT_V2_SELECT]\r\n = \"<b>Variant 2 dipilih</b>\\n\"\r\n . Script::$script[\"en\"][Script::GOOD_LANCELOT]\r\n .\" dan \".Script::$script[\"en\"][Script::EVIL_LANCELOT]\r\n .\" akan masuk dalam permainan.\\n\"\r\n .\"Keduanya dapat bertukar peran selama permainan.\\n\\n\"\r\n .\"Di varian ini, Evil Lancelot harus memberikan FAIL di misi yang diikutinya\\n\\n\";\r\n \r\n Script::$script[\"en\"][Script::PLAY_TIME]\r\n = \"played %d times\";\r\n Script::$script[\"id\"][Script::PLAY_TIME]\r\n = \"dimainkan %d kali\";\r\n \r\n Script::$script[\"en\"][Script::X_TIMES]\r\n = \"%d times\";\r\n Script::$script[\"id\"][Script::X_TIMES]\r\n = \"%d kali\";\r\n \r\n Script::$script[\"en\"][Script::WIN_RATE]\r\n = \"Winrate: %d%%\";\r\n Script::$script[\"id\"][Script::WIN_RATE]\r\n = \"Menang: %d%%\";\r\n \r\n Script::$script[\"en\"][Script::GOOD_TEAM_WON_STAT]\r\n = \"Good Team Won %d%%\";\r\n Script::$script[\"id\"][Script::GOOD_TEAM_WON_STAT]\r\n = \"Tim Baik menang %d%%\";\r\n \r\n // NEW\r\n Script::$script[\"en\"][Script::WON]\r\n = \"Won\";\r\n Script::$script[\"id\"][Script::WON]\r\n = \"Menang\";\r\n \r\n // NEW\r\n Script::$script[\"en\"][Script::LOST]\r\n = \"Lost\";\r\n Script::$script[\"id\"][Script::LOST]\r\n = \"Kalah\";\r\n \r\n Script::$script[\"en\"][Script::EVIL_TEAM_WON_STAT]\r\n = \"Evil Team Won %d%%\";\r\n Script::$script[\"id\"][Script::EVIL_TEAM_WON_STAT]\r\n = \"Tim Jahat menang %d%%\";\r\n \r\n Script::$script[\"en\"][Script::PLAY_TO_HAVE_STAT]\r\n = \"You have to play a game to have the statistics.\";\r\n Script::$script[\"id\"][Script::PLAY_TO_HAVE_STAT]\r\n = \"Kamu harus main untuk memiliki statistik.\";\r\n \r\n Script::$script[\"en\"][Script::PU_CHCKPMTOCHGLANG]\r\n = \"Please check private message to change the language.\";\r\n Script::$script[\"id\"][Script::PU_CHCKPMTOCHGLANG]\r\n = \"Silakan mengecek PM untuk memilih bahasa.\";\r\n \r\n Script::$script[\"en\"][Script::PU_SECONDTODECIDE]\r\n = \"\\n\\nYou have <b>%d seconds</b> to decide.\\n\";\r\n Script::$script[\"id\"][Script::PU_SECONDTODECIDE]\r\n = \"\\n\\nWaktu yang diberikan adalah <b>%d</b> detik.\\n\";\r\n \r\n Script::$script[\"en\"][Script::PU_LANGGROUPNOTFOUND]\r\n = \"Language cannot be changed. We cannot find the group.\";\r\n Script::$script[\"id\"][Script::PU_LANGGROUPNOTFOUND]\r\n = \"Bahasa tidak berhasil diganti. group tidak ditemukan.\";\r\n \r\n Script::$script[\"en\"][Script::PR_LANGGROUPCHANGED]\r\n = \"Language in %s has been set to %s.\";\r\n Script::$script[\"id\"][Script::PR_LANGGROUPCHANGED]\r\n = \"Bahasa di %s berhasil diganti menjadi %s.\";\r\n \r\n Script::$script[\"en\"][Script::PU_LANGCHANGED]\r\n = \"Language has been set to %s.\";\r\n Script::$script[\"id\"][Script::PU_LANGCHANGED]\r\n = \"Bahasa berhasil diganti menjadi %s.\";\r\n \r\n Script::$script[\"en\"][Script::PR_SETLANGGROUPINST]\r\n = \"for %s.\";\r\n Script::$script[\"id\"][Script::PR_SETLANGGROUPINST]\r\n = \"untuk %s.\";\r\n \r\n Script::$script[\"en\"][Script::PR_SETLANGINST]\r\n = \"Choose the language \";\r\n Script::$script[\"id\"][Script::PR_SETLANGINST]\r\n = \"Pilih bahasa yang ingin digunakan \";\r\n \r\n Script::$script[\"en\"][Script::PR_GROUPONLY]\r\n = \"This command can only be executed from group.\";\r\n Script::$script[\"id\"][Script::PR_GROUPONLY]\r\n = \"Kamu harus berada di grup untuk dapat menggunakan perintah ini.\";\r\n \r\n Script::$script[\"en\"][Script::PU_PMONLY]\r\n = \"This command can only be executed by Private Message to Bot.\";\r\n Script::$script[\"id\"][Script::PU_PMONLY]\r\n = \"Kamu harus Private Message Bot untuk dapat menggunakan perintah ini.\";\r\n \r\n Script::$script[\"en\"][Script::PU_ADMINONLY]\r\n = \"This command can only be executed by admin.\";\r\n Script::$script[\"id\"][Script::PU_ADMINONLY]\r\n = \"Hanya admin yang dapat menggunakan perintah ini.\";\r\n \r\n Script::$script[\"en\"][Script::PU_MAINTENANCE]\r\n = \"Currently there is a maintenance for avalon bot. Please try again later.\";\r\n Script::$script[\"id\"][Script::PU_MAINTENANCE]\r\n = \"Saat ini, bot sedang dalam maintenance. Silakan coba beberapa saat lagi.\";\r\n \r\n $contributor =\r\n Script::$script[\"en\"][Script::LANG].\"(@Rhyned), \"\r\n .Script::$script[\"id\"][Script::LANG].\"(@Rhyned), \"\r\n \r\n Script::$script[\"en\"][Script::PU_CONTACT]\r\n = \"Telegram code by <b>Hendry Setiadi</b>.\\n\\n\"\r\n . $contributor\r\n .\"Contact to email: hendry.setiadi.89@gmail.com to give support or feedback.\\n\\n\"\r\n .\"Rate me by clicking the link: <a href=\\\"http://telegram.me/storebot?start=%s\\\">Rate me</a>.\\n\\n\"\r\n .\"Thank you.\";\r\n Script::$script[\"id\"][Script::PU_CONTACT]\r\n = \"Kode Telegram oleh <b>Hendry Setiadi</b>.\\n\\n\"\r\n . $contributor\r\n .\"Hubungi email: hendry.setiadi.89@gmail.com untuk memberikan support atau feedback.\\n\\n\"\r\n .\"Berikan rating dengan meng-klik link berikut: <a href=\\\"http://telegram.me/storebot?start=%s\\\">Rate me</a>.\\n\\n\"\r\n .\"Terima kasih.\";\r\n \r\n Script::$script[\"en\"][Script::PU_JOINCHANNEL]\r\n = \"Join this <a href=\\\"https://telegram.me/avalonbgbot\\\">channel</a> to see the news and the latest updates to avalon bot.\\n\";\r\n Script::$script[\"id\"][Script::PU_JOINCHANNEL]\r\n = \"Ikuti <a href=\\\"https://telegram.me/avalonbgbot\\\">channel</a> ini untuk melihat berita dan update terbaru seputar avalon bot.\\n\";\r\n \r\n Script::$script[\"en\"][Script::PU_HELP]\r\n = \"Avalon bot for telegram.\\n\"\r\n . \"Based on the <a href=\\\"https://boardgamegeek.com/boardgame/128882/resistance-avalon\\\">The Resistance:Avalon BoardGame</a>\\n\\n\"\r\n . \"To start playing, invite this bot to your group then type /start or /startchaos to start the game.\\n\\n\"\r\n . \"Type /howtoplay if you are new to avalon and want to know more\\n\"\r\n . \"Type /rolelist to see the avalon role list\\n\"\r\n . \"Type /contact if you want to contact the developer\\n\\n\"\r\n . Script::$script[\"en\"][Script::PU_JOINCHANNEL];\r\n Script::$script[\"id\"][Script::PU_HELP]\r\n = \"Avalon bot untuk Telegram.\\n\"\r\n . \"Berdasarkan game <a href=\\\"https://boardgamegeek.com/boardgame/128882/resistance-avalon\\\">The Resistance:Avalon BoardGame</a>\\n\\n\"\r\n . \"Untuk bermain, undang bot ini ke dalam grup kemudian ketik /start atau /startchaos untuk memulai permainan.\\n\\n\"\r\n . \"Ketik /howtoplay untuk tahu cara bermain avalon\\n\"\r\n . \"Ketik /rolelist untuk melihat daftar peran Avalon\\n\"\r\n . \"Ketik /contact untuk menghubungi developer\\n\\n\"\r\n . Script::$script[\"id\"][Script::PU_JOINCHANNEL];\r\n \r\n $normalRoleList = Constant::EMO_SMILE_B.\"/merlin\\n\"\r\n .Constant::EMO_SMILE_B.\"/percival\\n\"\r\n .Constant::EMO_SMILE_B.\"/servant\\n\"\r\n .Constant::EMO_EVIL_B.\"/assassin\\n\"\r\n .Constant::EMO_EVIL_B.\"/morgana\\n\"\r\n .Constant::EMO_EVIL_B.\"/mordred\\n\"\r\n .Constant::EMO_EVIL_B.\"/oberon\\n\"\r\n .Constant::EMO_SMILE_B.\"/goodlancelot\\n\"\r\n .Constant::EMO_EVIL_B.\"/evillancelot\\n\\n\";\r\n\r\n\r\n $chaosRoleList = Constant::EMO_SMILE_B.\"/knight\\n\"\r\n .Constant::EMO_SMILE_B.\"/agent\\n\"\r\n .Constant::EMO_SMILE_B.\"/auditor\\n\"\r\n .Constant::EMO_EVIL_B.\"/morgause\\n\"\r\n .Constant::EMO_EVIL_B.\"/witch\\n\"\r\n .Constant::EMO_EVIL_B.\"/ninja\\n\";\r\n\r\n\r\n Script::$script[\"en\"][Script::PU_ROLELIST]\r\n = $normalRoleList\r\n . \"Addition roles exclusive for telegram:\\n\"\r\n . $chaosRoleList;\r\n Script::$script[\"id\"][Script::PU_ROLELIST]\r\n = $normalRoleList\r\n . \"Tambahan role khusus untuk Telegram:\\n\"\r\n . $chaosRoleList;\r\n \r\n Script::$script[\"en\"][Script::PU_HOWTOPLAY]\r\n = \" <b>The avalon game is a game about deduction and bluffing</b>\\n\\n\"\r\n . \"This game tells the story about a group that is in a journey to control the civilization of Arthur. \"\r\n . \"There are always <b>5 quests</b> in total. The players will play the first quest first, then sequentially go to the next quest.\"\r\n . \" If at least 3 quests succeed, then good forces <i>might</i> win. If there are 3 quests fail, evil force win.\\n\\n\"\r\n\r\n . \"At the start of the game, each player will be randomly assigned a role secretly.\\n\"\r\n . \"Click to see the detail of the role:\\n\"\r\n\r\n . Script::$script[\"en\"][Script::PU_ROLELIST]\r\n\r\n . \"\\nAt the start of the game, King token\".Constant::EMO_KING_B. \" will be randomly assigned to a player and the King may choose who can complete the current quest.\\n\"\r\n . \"After the king has done the assignment, any player may vote <b>approve</b> or <b>reject</b> to the assignment. Then, the approve and reject will be counted.\\n\\n\"\r\n\r\n . \"If the <b>reject</b> count is half or more the count of the players, then the quest is rejected, and the king token\"\r\n .Constant::EMO_KING_B.\" will be given to the next player (next to the King)\\n\"\r\n . \"If the <b>approve</b> count is more than half players' count, then the quest is executed by the assignees.\\n\\n\"\r\n\r\n . \"When executing a quest, evil players may choose to fail the quest and this will be done secretly. \"\r\n . \"In general, if at least 1 player give the FAIL to that quest, it means that quest will FAIL.\\n\\n\"\r\n\r\n . \"And to prevent each quest being rejected over and over, each quest has maximum reject of 5. If the quest is rejected 5 times, it will automatically FAIL\\n\\n\"\r\n\r\n . \"In a game 8 players or more, <b>lady of the lake</b>\".Constant::EMO_LADY_B.\" can be used. Lady of The Lake will give a large benefit for a good forces.. \"\r\n . \"A player who hold the lady token may choose a player to know his/her true identity (good or evil) but only the lady holder knows the truth.\\n\\n\"\r\n\r\n . \"That's all. Practice is the faster way to learn.. Type /start or /startchaos to start the game.\\n\\n\";\r\n\r\n\r\n\r\n\r\n Script::$script[\"id\"][Script::PU_HOWTOPLAY]\r\n = \" <b>Game Avalon adalah game tentang deduksi dan berbohong</b>\\n\\n\"\r\n . \"Game ini bercerita tentang perjalanan suatu grup untuk menemukan peradaban Arthur. \"\r\n . \"Ada <b>5 quests</b> yang harus diselesaikan. Pemain harus memainkan quest pertama terlebih dahulu, baru kemudian lanjut ke quest berikutnya secara berurutan.\"\r\n . \" Jika terdapat minimal 3 quest berhasil, maka tim baik <i>mungkin</i> menang. Jika terdapat 3 quest gagal, maka tim jahatlah yang menang.\\n\\n\"\r\n\r\n . \"Di awal permainan, Tiap orang akan diberikan peran secara rahasia.\\n\"\r\n . \"Klik untuk melihat detil peran :\\n\"\r\n\r\n . Script::$script[\"id\"][Script::PU_ROLELIST]\r\n\r\n . \"\\nDi awal permainan, King token \".Constant::EMO_KING_B. \" akan diberikan secara random ke salah seorang pemain dan raja boleh memilih orang yang akan berangkat untuk quest yang berlangsung.\\n\"\r\n . \"Setelah raja memberikan penugasan, tiap orang boleh <b>setuju</b> or <b>menolak</b> terhadap penugasan itu. Kemudian, jumlah setuju dan jumlah menolak akan dihitung.\\n\\n\"\r\n\r\n . \"Jika jumlah <b>menolak</b> lebih besar atau sama dengan jumlah pemain, maka quest akan ditolak dan King token\"\r\n . Constant::EMO_KING_B .\" akan berpindah ke pemain berikutnya (sesudah raja)\\n\"\r\n . \"Jika jumlah <b>setuju</b> lebih besar dari jumlah pemain, maka quest akan dijalankan oleh orang yang ditunjuk oleh raja.\\n\\n\"\r\n\r\n . \"Ketika mengerjakan quest, Pemain jahat boleh menggagalkan quest dan ini dilakukan secara rahasia. \"\r\n . \"Umumnya, Jika minimal terdapat 1 GAGAL dalam quest, maka quest tersebut akan dianggap GAGAL.\\n\\n\"\r\n\r\n . \"Untuk mencegah suatu quest ditolak terus menerus, setiap quest memiliki penolakan maksimum 5 kali. \"\r\n . \" Jika quest tersebut sudah direject 5 kali, maka quest itu dianggap GAGAL.\\n\\n\"\r\n\r\n . \"Dalam game dengan 8 pemain atau lebih, <b>lady of the lake</b>\".Constant::EMO_LADY_B.\" dapat digunakan. Lady of the Lake dapat memberikan keuntungan yang besar bagi tim baik. \"\r\n . \"Pemain yang memegang the lady token boleh menerawang sesorang untuk mengetahui identitas sebenarnya (baik atau jahat) namun hanya pemegang lady lah yang mengetahuinya.\\n\\n\"\r\n\r\n . \"Sekian. Latihan adalah cara yang cepat untuk belajar. Ketik /start atau /startchaos untuk memulai game.\\n\\n\";\r\n \r\n $groupList =\r\n \"<b>ENGLISH-JAPANESE</b>\\n\"\r\n .\"<a href=\\\"http://telegram.me/AvalonAnime\\\">Avalon Anime</a>\\n\\n\"\r\n .\"<b>INDONESIA</b>\\n\"\r\n .\"<a href=\\\"http://telegram.me/mainavalon\\\">Main Avalon Indonesia</a>\\n\"\r\n .\"<a href=\\\"http://telegram.me/avalonwolfcircle\\\">Avalon Wolf Circle</a>\\n\"\r\n .\"<a href=\\\"https://telegram.me/joinchat/ArAp4UFSojc5mFfM7iLPWw\\\">Play Avalon</a>\\n\"\r\n .\"<a href=\\\"https://t.me/avalonhavefun\\\">Avalon Have Fun</a>\\n\"\r\n .\"<a href=\\\"http://telegram.me/avalonindonesia\\\">Avalon Indonesia</a>\\n\"\r\n .\"<a href=\\\"http://telegram.me/avalonacademy\\\">Avalon Academy</a>\\n\\n\"\r\n \r\n Script::$script[\"en\"][Script::PR_GROUPLIST]\r\n = \"This Group List is currently in development. If you have your own open group you can share, contact developer to add it in grouplist.\\n\\n\"\r\n .$groupList;\r\n Script::$script[\"id\"][Script::PR_GROUPLIST]\r\n = \"Group List masih dalam tahap pengembangan. Jika kamu mempunyai open group untuk avalon, kontak developer agar bisa menambahkannya di grouplist.\\n\\n\"\r\n .$groupList;\r\n \r\n Script::$script[\"en\"][Script::PU_RATEME]\r\n = \"Like this bot? Please rate me \". Constant::EMO_SMILE_B . \"\\n\"\r\n .\"<a href=\\\"http://telegram.me/storebot?start=%s\\\">Rate me</a>\\n\\n\"\r\n . Script::$script[\"en\"][Script::PU_JOINCHANNEL];\r\n Script::$script[\"id\"][Script::PU_RATEME]\r\n = \"Suka bot ini? Tolong berikan rating untuk bot \". Constant::EMO_SMILE_B . \"\\n\"\r\n .\"<a href=\\\"http://telegram.me/storebot?start=%s\\\">Rate me</a>\\n\\n\"\r\n . Script::$script[\"id\"][Script::PU_JOINCHANNEL];\r\n \r\n Script::$script[\"en\"][Script::PU_MERLININFO]\r\n = \"<b>\".Script::$script[\"en\"][Script::MERLIN].\"</b>\".Constant::EMO_SMILE_B\r\n . \" knows all evil players except /mordred (and also /ninja). His job is to give clues to the good team, \"\r\n . \"so it will prevent the evil players having a chance failing the quests.\\n\\n\"\r\n . \"Note that if Merlin is too obvious, even though 3 quests have succeed, the /assassin can \"\r\n . \"guess the Merlin at the end of the game. If Assassin's guess is correct, the good side will lose although 3 quests has been success.\";\r\n Script::$script[\"id\"][Script::PU_MERLININFO]\r\n = \"<b>\".Script::$script[\"id\"][Script::MERLIN].\"</b>\".Constant::EMO_SMILE_B\r\n . \" tahu semua pemain jahat kecuali Mordred (dan juga /ninja). Merlin harus memberikan petunjuk-petunjuk ke tim baik, \"\r\n . \"sehingga mencegah pemain jahat untuk mengerjakan quest.\\n\\n\"\r\n . \"Penting juga bagi Merlin agar dia tidak ketahuan tim jahat karena /assassin dapat \"\r\n . \"menebak Merlin di akhir game. Jika assassin berhasil menebak Merlin, tim baik akan kalah meskipun 3 quest sudah berhasil.\";\r\n \r\n Script::$script[\"en\"][Script::PU_PERCIVALINFO]\r\n = \"<b>\".Script::$script[\"en\"][Script::PERCIVAL].\"</b>\".Constant::EMO_SMILE_B\r\n . \" knows the Merlin and Morgana at the start of the game. However, Percival does not know which is Merlin or Morgana\\n\\n\"\r\n . \"Percival's job is to guess the Merlin correctly between the 2 and then follow the Merlin's order. \"\r\n . \"Besides, Percival needs to act as a Merlin to deceive /assassin.\";\r\n Script::$script[\"id\"][Script::PU_PERCIVALINFO]\r\n = \"<b>\".Script::$script[\"id\"][Script::PERCIVAL].\"</b>\".Constant::EMO_SMILE_B\r\n . \" tahu Merlin dan Morgana di awal permainan. Namun, Percival tidak tahu siapa yang Merlin atau Morgana\\n\\n\"\r\n . \"Tugas Percival adalah menebak dengan benar siapa Merlin dan mengikuti perintah Merlin. \".\r\n \" Selain itu, Percival perlu berpura-pura menjadi Merlin untuk mengelabui /assassin.\";\r\n \r\n Script::$script[\"en\"][Script::PU_SERVANTINFO]\r\n = \"<b>\".Script::$script[\"en\"][Script::SERVANT].\"</b>\".Constant::EMO_SMILE_B\r\n . \" is in a good side but do not know anything at the start of the game.\\n\\n\"\r\n . \"Servant's job is to succeed the quest and to try guess the Merlin correctly (mainly based on the deduction). \".\r\n \"Servant might also need to act as a Merlin to deceive the evil force.\";\r\n Script::$script[\"id\"][Script::PU_SERVANTINFO]\r\n = \"<b>\".Script::$script[\"id\"][Script::SERVANT].\"</b>\".Constant::EMO_SMILE_B\r\n . \" adalah pemain baik yang tidak tahu apa-apa.\\n\\n\"\r\n .\"Tugas servant adalah menyukseskan quest dan mencoba menebak Merlin (berdasarkan deduksi). \".\r\n \"Servant mungkin juga perlu berpura-pura menjadi Merlin untuk mengelabui tim jahat.\";\r\n \r\n Script::$script[\"en\"][Script::PU_AUDITORINFO]\r\n = \"<b>\".Script::$script[\"en\"][Script::AUDITOR].\"</b>\".Constant::EMO_SMILE_B\r\n . \" is in a good side. If auditor is assigned in a quest, there is 20% chance 1 FAIL can be eliminated.\\n\\n\";\r\n Script::$script[\"id\"][Script::PU_AUDITORINFO]\r\n = \"<b>\".Script::$script[\"id\"][Script::AUDITOR].\"</b>\".Constant::EMO_SMILE_B\r\n . \" adalah pemain baik. Jika auditor ditunjuk dalam sebuah quest, maka terdapat 20% kemungkinan 1 FAIL dapat dieliminasi.\\n\\n\";\r\n \r\n Script::$script[\"en\"][Script::PU_MORDREDINFO]\r\n = \"<b>\".Script::$script[\"en\"][Script::MORDRED].\"</b>\".Constant::EMO_EVIL_B\r\n . \" as an evil player knows the other evil players at the start of the game (except Oberon) and has to cooperate together to fail the quests.\\n\\n\"\r\n . \"Merlin cannot see Mordred as an evil player so Mordred may act as a good player without being known.\";\r\n Script::$script[\"id\"][Script::PU_MORDREDINFO]\r\n = \"<b>\".Script::$script[\"id\"][Script::MORDRED].\"</b>\".Constant::EMO_EVIL_B\r\n . \" adalah pemain jahat yang tahu teman-teman jahatnya di awal permainan (kecuali Oberon) dan harus bekerja sama dengan tim jahat untuk mengagalkan quest.\\n\\n\"\r\n . \"Merlin tidak dapat melihat Mordred sehingga Mordred dapat berpura-pura menjadi pemain yang baik tanpa diketahui.\\n\\n\";\r\n \r\n Script::$script[\"en\"][Script::PU_NINJAINFO]\r\n = \"<b>\".Script::$script[\"en\"][Script::NINJA].\"</b>\".Constant::EMO_EVIL_B\r\n . \" (Super Mordred) as an evil player knows the other evil players at the start of the game (except Oberon) and has to cooperate together to fail the quests.\\n\\n\"\r\n . \"Merlin cannot see Ninja as an evil player so Ninja may act as a good player without being known. Ninja can also give 2 FAILS if being assigned in the quest, but this ability can only be used once per game.\";\r\n Script::$script[\"id\"][Script::PU_NINJAINFO]\r\n = \"<b>\".Script::$script[\"id\"][Script::NINJA].\"</b>\".Constant::EMO_EVIL_B\r\n . \" (Super Mordred) adalah pemain jahat yang tahu teman-teman jahatnya di awal permainan (kecuali Oberon) dan harus bekerja sama dengan tim jahat untuk mengagalkan quest.\\n\\n\"\r\n . \"Merlin tidak dapat melihat Ninja sehingga Ninja dapat berpura-pura menjadi pemain yang baik tanpa diketahui. Ninja dapat memberikan 2 GAGAL jika diikutkan dalam quest, namun kemampuan ini hanya bisa digunakan sekali dalam satu game.\\n\\n\";\r\n \r\n Script::$script[\"en\"][Script::SECRETCODES] = array(\r\n \"thanks\",\r\n \"sorry\",\r\n \"honest\",\r\n \"lie\",\r\n \"confused\",\r\n \"happy\",\r\n \"sad\",\r\n \"stupid\",\r\n \"smart\",\r\n// \"Oh my God\",\r\n \"believe\",\r\n \"choose\",\r\n \"sure\",\r\n \"doubt\",\r\n \"play\",\r\n );\r\n Script::$script[\"id\"][Script::SECRETCODES] = array(\r\n \"terima kasih\",\r\n \"maaf\",\r\n \"jujur\",\r\n \"bohong\",\r\n \"bingung\",\r\n \"senang\",\r\n \"sedih\",\r\n \"bodoh\",\r\n \"pintar\",\r\n// \"ya Tuhan\",\r\n \"percaya\",\r\n \"pilih\",\r\n \"yakin\",\r\n \"ragu\",\r\n \"main\",\r\n );\r\n \r\n Script::$script[\"en\"][Script::PU_AGENTINFO]\r\n = \"<b>\".Script::$script[\"en\"][Script::AGENT].\"</b>\".Constant::EMO_SMILE_B\r\n . \" is in a good side. All agents in the team share the same secret codes given via Bot Private Message.\\n\\n\"\r\n . \"Agents can find the other teammates by using those secret codes, so that together they will succeed the mission easier. Remember, do not make it too obvious, or the bad guys will know the agents and it will make assassin's job easier to kill Merlin.\\n\\n\"\r\n . \"Possible secret codes: \".Constant::arrayToString(Script::$script[\"en\"][Script::SECRETCODES]).\".\\n\\n\";\r\n Script::$script[\"id\"][Script::PU_AGENTINFO]\r\n = \"<b>\".Script::$script[\"id\"][Script::AGENT].\"</b>\".Constant::EMO_SMILE_B\r\n . \" berada di tim baik. Semua agent dalam tim mendapatkan kode rahasia yang sama yang diberikan melalui PM Bot.\\n\\n\"\r\n . \"Agent dapat menemukan teman agen lainnya menggunakan kode rahasia tersebut, sehingga bersama-sama agent dapat menyukseskan misi lebih mudah. Ingat, jangan terlalu jelas memberikan kode, atau penjahat akan tahu semua agent sehingga membuat tugas assassin untuk membunuh Merlin menjadi lebih mudah.\\n\\n\"\r\n . \"Kode rahasia yang mungkin: \".Constant::arrayToString(Script::$script[\"id\"][Script::SECRETCODES]).\".\\n\\n\";\r\n \r\n Script::$script[\"en\"][Script::PU_MORGANAINFO]\r\n = \"<b>\".Script::$script[\"en\"][Script::MORGANA].\"</b>\".Constant::EMO_EVIL_B\r\n . \" as an evil player knows the other evil players at the start of the game and has to cooperate together to fail the quests.\\n\\n\"\r\n . \"Because Percival can see Merlin and Morgana, Morgana's primary job is to gain trust from Percival by acting as a Merlin. If Percival can be deceived, Merlin will be in trouble.\\n\\n\";\r\n Script::$script[\"id\"][Script::PU_MORGANAINFO]\r\n = \"<b>\".Script::$script[\"id\"][Script::MORGANA].\"</b>\".Constant::EMO_EVIL_B\r\n . \" adalah pemain jahat yang tahu teman-teman jahatnya di awal permainan (kecuali Oberon) dan harus bekerja sama dengan tim jahat untuk mengagalkan quest.\\n\\n\"\r\n . \"Karena Percival dapat melihat Merlin dan Morgana, tugas utama Morgana adalah mendapatkan kepercayaan dari Percival dengan berpura-pura menjadi Merlin. Jika Percival dapat ditipu, maka Merlin akan berada dalam bahaya.\\n\\n\";\r\n \r\n Script::$script[\"en\"][Script::PU_ASSASSININFO]\r\n = \"<b>\".Script::$script[\"en\"][Script::ASSASSIN].\"</b>\".Constant::EMO_EVIL_B\r\n . \" as an evil player knows the other evil players at the start of the game and has to cooperate together to fail the quests.\\n\\n\"\r\n . \"Assassin can guess Merlin at the end of the game (if 3 quests already been succeed). If the guess is correct, whatever the result in the quests, Evil force will win.\";\r\n Script::$script[\"id\"][Script::PU_ASSASSININFO]\r\n = \"<b>\".Script::$script[\"id\"][Script::ASSASSIN].\"</b>\".Constant::EMO_EVIL_B\r\n . \" adalah pemain jahat yang tahu teman-teman jahatnya di awal permainan (kecuali Oberon) dan harus bekerja sama dengan tim jahat untuk mengagalkan quest.\\n\\n\"\r\n . \"Assassin dapat menebak Merlin di akhir game (jika 3 quest sudah sukses). Jika Merlin berhasil dibunuh, apapun hasil di quest, tim jahat akan menang.\";\r\n \r\n Script::$script[\"en\"][Script::PU_WITCHINFO]\r\n = \"<b>\".Script::$script[\"en\"][Script::WITCH].\"</b>\".Constant::EMO_EVIL_B\r\n . \" as an evil player knows the other evil players at the start of the game and has to cooperate together to fail the quests.\\n\\n\"\r\n . \"Witch has the ability to know what are the roles that the good team holds, but witch doesn't know how much or who hold the roles. Use this information to narrow down the merlin.\\n\";\r\n Script::$script[\"id\"][Script::PU_WITCHINFO]\r\n = \"<b>\".Script::$script[\"id\"][Script::WITCH].\"</b>\".Constant::EMO_EVIL_B\r\n . \" adalah pemain jahat yang tahu teman-teman jahatnya di awal permainan (kecuali Oberon) dan harus bekerja sama dengan tim jahat untuk mengagalkan quest.\\n\\n\"\r\n . \"Witch mempunyai kemampuan untuk mengetahui peran apa saja yang ada di tim baik, tapi witch tidak mengetahui jumlah dan siapa yang memegang peran tersebut. Gunakan informasi ini untuk mencari merlin.\";\r\n \r\n Script::$script[\"en\"][Script::PU_MORGAUSEINFO]\r\n = \"<b>\".Script::$script[\"en\"][Script::MORGAUSE].\"</b>\".Constant::EMO_EVIL_B\r\n . \" as an evil player knows the other evil players at the start of the game and has to cooperate together to fail the quests.\\n\\n\"\r\n . \"Morgause is a combination role from /morgana and /assassin. The player with this character can deceive Percival and Morgause can also kill Merlin at the game of the game.\\n\\n\";\r\n Script::$script[\"id\"][Script::PU_MORGAUSEINFO]\r\n = \"<b>\".Script::$script[\"id\"][Script::MORGAUSE].\"</b>\".Constant::EMO_EVIL_B\r\n . \" adalah pemain jahat yang tahu teman-teman jahatnya di awal permainan (kecuali Oberon) dan harus bekerja sama dengan tim jahat untuk mengagalkan quest.\\n\\n\"\r\n . \"Morgause adalah peran kombinasi dari /morgana dan /assassin. Pemain dengan karakter ini dapat menipu Percival dan Morgause juga dapat membunuh Merlin di akhir game.\\n\\n\";\r\n \r\n Script::$script[\"en\"][Script::PU_KNIGHTINFO]\r\n = \"<b>\".Script::$script[\"en\"][Script::KNIGHT].\"</b>\".Constant::EMO_SMILE_B\r\n . \" is a good person whose job is to succeed the quests.\\n\\n\"\r\n . \"At the start of the game, knight can have information about 2 neighborhood players. Knight knows whether there is no bad person between them, or there is at least 1 bad person. However, Knight cannot detect Mordred, so Mordred will be seen as a good person.\\n\\n\";\r\n Script::$script[\"id\"][Script::PU_KNIGHTINFO]\r\n = \"<b>\".Script::$script[\"id\"][Script::KNIGHT].\"</b>\".Constant::EMO_SMILE_B\r\n . \" adalah pemain baik yang bertugas menyukseskan quest.\\n\\n\"\r\n . \"Di awal permainan, knight dapat memperoleh informasi mengenai 2 pemain di sekelilingnya. Knight tahu apakah tidak ada pemain jahat dari kedua orang itu, atau terdapat minimal 1 orang jahat. Namun, Knight tidak dapat mendeteksi Mordred, sehingga Mordred terlihat seperti orang baik.\\n\\n\";\r\n \r\n // NEW\r\n Script::$script[\"en\"][Script::PU_GOODLANCELOTINFO]\r\n = \"<b>\".Script::$script[\"en\"][Script::GOOD_LANCELOT].\"</b>\"\r\n . \" is originally a good person whose job is to succeed the quests.\\n\\n\"\r\n . \"However, there is a slight chance in a quest, Good Lancelot will switch role with the Evil Lancelot. If that happens, then in that quest, the lady will see the Good Lancelot as evil, and the winning condition for Good Lancelot will also change (for that quest only)\\n\\n\";\r\n Script::$script[\"id\"][Script::PU_GOODLANCELOTINFO]\r\n = \"<b>\".Script::$script[\"id\"][Script::GOOD_LANCELOT].\"</b>\"\r\n . \" awalnya adalah orang baik yang tugasnya menyukseskan misi\\n\\n\"\r\n . \"Namun, ada kemungkinan di suatu misi, Good Lancelot akan bertukar peran dengan Evil Lancelot. Jika itu terjadi, maka di misi itu, lady akan melihat Good Lancelot sebagai Jahat, dan kondisi kemenangan untuk Good Lancelot juga berubah (untuk misi itu saja)\\n\\n\";\r\n \r\n // NEW\r\n Script::$script[\"en\"][Script::PU_EVILLANCELOTINFO]\r\n = \"<b>\".Script::$script[\"en\"][Script::EVIL_LANCELOT].\"</b>\"\r\n . \" is originally an evil person. He is known to Merlin and the other evil friends. However, Evil Lancelot doesn't know his evil teammates.\\n\\n\"\r\n . \"There is a slight chance in a quest, Evil Lancelot will switch role with the Good Lancelot. If that happens, then in that quest, the lady will see the Evil Lancelot as good, and the winning condition for Evil Lancelot will also change (for that quest only)\\n\\n\"\r\n . \"In Variant 1, Evil Lancelot may give SUCCESS OR FAIL to quest. In Variant 2, Evil Lancelot must give FAIL on the quest he is on.\";\r\n Script::$script[\"id\"][Script::PU_EVILLANCELOTINFO]\r\n = \"<b>\".Script::$script[\"id\"][Script::EVIL_LANCELOT].\"</b>\"\r\n . \" awalnya adalah orang jahat. Dia diketahui oleh Merlin dan teman jahat lainnya. Namun, Evil Lancelot sendiri tidak tahu teman jahatnya.\\n\\n\"\r\n . \"Ada kemungkinan di suatu misi, Evil Lancelot akan bertukar peran dengan Good Lancelot. Jika itu terjadi, maka di misi itu, lady akan melihat Evil Lancelot sebagai Baik, dan kondisi kemenangan untuk Evil Lancelot juga berubah (untuk misi itu saja)\\n\\n\"\r\n . \"Di Varian 1, Evil Lancelot boleh memberikan SUKSES atau GAGAL. Di Varian 2, Evil Lancelot harus memberikan GAGAL di misi yang dia ikuti.\";\r\n \r\n Script::$script[\"en\"][Script::PU_OBERONINFO]\r\n = \"<b>\".Script::$script[\"en\"][Script::OBERON].\"</b>\".Constant::EMO_EVIL_B\r\n . \" is an evil player but all other evil players do not know the oberon's identity. Merlin can still see Oberon though.\"\r\n . \" Oberon knows all the evil teammates but should not use Private Message to communicate.\";\r\n Script::$script[\"id\"][Script::PU_OBERONINFO]\r\n = \"<b>\".Script::$script[\"id\"][Script::OBERON].\"</b>\".Constant::EMO_EVIL_B\r\n . \" adalah pemain jahat namun pemain jahat lain tidak tahu identitas Oberon. Sayangnya, Merlin masih dapat melihat Oberon.\"\r\n . \" Oberon tahu semua teman jahatnya, namun tidak boleh menggunakan PM untuk berkomunasi.\";\r\n \r\n Script::$script[\"en\"][Script::PU_THIEFINFO]\r\n = \"<b>\".Script::$script[\"en\"][Script::THIEF].\"</b>\".Constant::EMO_EVIL_B\r\n . \" as an evil player knows the other evil players at the start of the game and has to cooperate together to fail the quests.\\n\\n\";\r\n Script::$script[\"id\"][Script::PU_THIEFINFO]\r\n = \"<b>\".Script::$script[\"id\"][Script::THIEF].\"</b>\".Constant::EMO_EVIL_B\r\n . \" adalah pemain jahat yang tahu teman-teman jahatnya di awal permainan (kecuali Oberon) dan harus bekerja sama dengan tim jahat untuk mengagalkan quest.\\n\\n\";\r\n \r\n }\r\n }", "function httpbl_lang()\n {\n foreach(explode(',',$_SERVER['HTTP_ACCEPT_LANGUAGE']) as $language)\n { if ($language=='fr') { return 'fr'; } }\n return 'en';\n }", "public function localizeScriptsCommon() {\n \n $js_date_max_o = new DateTime(WPJB_MAX_DATE);\n $js_date_max = $js_date_max_o->format(wpjb_date_format());\n $js_date_format = str_replace(array(\"J\"), array(\"B\"), wpjb_date_format());\n $js_months = array();\n \n for($i=1; $i<=12; $i++) {\n $js_months[$i] = wpjb_date(\"2000-$i\", \"M\");\n }\n \n \n wp_localize_script(\"wpjb-plupload\", \"wpjb_plupload_lang\", array(\n \"error\" => __(\"Error\", \"wpjobboard\"),\n \"dispose_message\" => __(\"Click here to dispose this message\", \"wpjobboard\"),\n \"x_more_left\" => __(\"%d more left\", \"wpjobboard\"),\n \"preview\" => __(\"Preview\", \"wpjobboard\"),\n \"download_file\" => __(\"Download\", \"wpjobboard\"),\n \"delete_file\" => __(\"Delete\", \"wpjobboard\"),\n \"play_file\" => __(\"Play\", \"wpjobboard\"),\n \"cant_proceed\" => __(\"Cannot proceed. Some files are still uploading...\", \"wpjobboard\"),\n ));\n \n wp_localize_script(\"wpjb-vendor-selectlist\", \"daq_selectlist_lang\", array(\n \"hint\" => __(\"Select options ...\", \"wpjobboard\")\n ));\n \n wp_localize_script(\"wpjb-myresume\", \"wpjb_myresume_lang\", array(\n \"ajaxurl\" => admin_url(\"admin-ajax.php\"),\n \"date_format\" => $js_date_format,\n \"month_abbr\" => $js_months,\n \"form_error\" => __(\"There are errors in your form.\", \"wpjobboard\"),\n \"close_or_save_all\" => __(\"'Save' or 'Cancel' all Education and Experience boxes before continuing.\", \"wpjobboard\")\n ));\n \n wp_localize_script(\"wpjb-suggest\", \"wpjb_suggest_lang\", array(\n \"ajaxurl\" => admin_url('admin-ajax.php')\n ));\n \n wp_localize_script(\"wpjb-alert\", \"wpjb_alert_lang\", array(\n \"ajaxurl\" => admin_url(\"admin-ajax.php\"),\n \"date_format\" => $js_date_format,\n \"month_abbr\" => $js_months,\n \"form_error\" => __(\"There are errors in your form.\", \"wpjobboard\"),\n \"close_or_save_all\" => __(\"'Save' or 'Cancel' all Education and Experience boxes before continuing.\", \"wpjobboard\")\n ));\n }", "public function localization() {\n\t\t\tload_plugin_textdomain( 'bitlive-custom-codes', false, __DIR__ . '/languages/' );\n\t\t}", "abstract public function get_app_language();", "public function lang() {\n\t\t\tload_plugin_textdomain( 'cherry-site-shortcodes', false, dirname( plugin_basename( __FILE__ ) ) . '/languages' );\n\t\t}", "public static function loadCDNLanguage() {\n\t\tglobal $_LANG, $CONFIG;\n\n\t\t$currentDir = getcwd();\n\t\tchdir( dirname( __FILE__ ) . '/lang/' );\n\t\t$availableLangs = glob( '*.txt' );\n\n\t\t$language = isset( $_SESSION[ 'Language' ] ) ? $_SESSION[ 'Language' ] : $CONFIG[ 'Language' ];\n\t\t$language = ucfirst( $language ) . '.txt';\n\n\t\tif( ! in_array( $language, $availableLangs ) ) {\n\t\t\t$language = 'English.txt';\n\t\t}\n\n\t\t$templang = file_get_contents( dirname( __FILE__ ) . '/lang/' . $language );\n\t\teval ( $templang );\n\t\tchdir( $currentDir );\n\t}", "function mkgd_admin_page() {\n $languages = array(\n 'ARABIC' => 'ar',\n 'BASQUE' => 'eu',\n 'BULGARIAN' => 'bg',\n 'BENGALI' => 'bn',\n 'CATALAN' => 'ca',\n 'CZECH' => 'cs',\n 'DANISH' => 'da',\n 'GERMAN' => 'de',\n 'GREEK' => 'el',\n 'ENGLISH' => 'en',\n 'ENGLISH (AUSTRALIAN)' => 'en-AU',\n 'ENGLISH (GREAT BRITAIN)' => 'en-GB',\n 'SPANISH' => 'es',\n 'BASQUE' => 'eu',\n 'FARSI' => 'fa',\n 'FINNISH' => 'fi',\n 'FILIPINO' => 'fil',\n 'FRENCH' => 'fr',\n 'GALICIAN' => 'gl',\n 'GUJARATI' => 'gu',\n 'HINDI' => 'hi',\n 'CROATIAN' => 'hr',\n 'HUNGARIAN' => 'hu',\n 'INDONESIAN' => 'id',\n 'ITALIAN' => 'it',\n 'HEBREW' => 'iw',\n 'JAPANESE' => 'ja',\n 'KANNADA' => 'kn',\n 'KOREAN' => 'ko',\n 'LITHUANIAN' => 'lt',\n 'LATVIAN' => 'lv',\n 'MALAYALAM' => 'ml',\n 'MARATHI' => 'mr',\n 'DUTCH' => 'nl',\n 'NORWEGIAN' => 'no',\n 'POLISH' => 'pl',\n 'PORTUGUESE' => 'pt',\n 'PORTUGUESE (BRAZIL)' => 'pt-BR',\n 'PORTUGUESE (PORTUGAL)' => 'pt-PT',\n 'ROMANIAN' => 'ro',\n 'RUSSIAN' => 'ru',\n 'SLOVAK' => 'sk',\n 'SLOVENIAN' => 'sl',\n 'SERBIAN' => 'sr',\n 'SWEDISH' => 'sv',\n 'TAGALOG' => 'tl',\n 'TAMIL' => 'ta',\n 'TELUGU' => 'te',\n 'THAI' => 'th',\n 'TURKISH' => 'tr',\n 'UKRAINIAN' => 'uk',\n 'VIETNAMESE' => 'vi',\n 'CHINESE (SIMPLIFIED)' => 'zh-CN',\n 'CHINESE (TRADITIONAL)' => 'zh-TW',\n );\n $units = array(\n 'Metric (Kilometers & Meters)' => 'metric',\n 'Imperial (Miles & Feet)' => 'imperial',\n );\n ?>\n <div class=\"wrap\">\n <h2><img src=\"<?php echo plugins_url('mk-google-directions/images/mk32.png'); ?>\"/> MK Google Directions Settings</h2> \n <form method=\"post\" action=\"options.php\"> \n <?php settings_fields('mkgd-settings-group'); ?>\n <?php do_settings_fields('mkgdAdminPage', 'mkgd-settings-group'); ?>\n <table class=\"widefat\">\n <thead>\n <tr>\n <th>MK Google Directions Configurations</th>\n </tr>\n </thead>\n <tbody>\n <tr>\n <td>\n <table>\n <tr>\n <td><label for=\"latitude\">Latitude: </label></td>\n <td><input type=\"text\" value=\"<?php echo get_option('mkgd_latitude', '43.6525'); ?>\" size=\"33\" name=\"mkgd_latitude\"></td>\n <td><small>Default latitudes for the Google Map <a href=\"http://itouchmap.com/latlong.html\" title=\"Help\" target=\"_blank\" rel=\"nofollow\"><strong>Help?</strong></a></small></td>\n </tr>\n <tr>\n <td><label for=\"longitude\">Longitude: </label></td>\n <td><input type=\"text\" value=\"<?php echo get_option('mkgd_longitude', '-79.3816667'); ?>\" size=\"33\" name=\"mkgd_longitude\"></td>\n <td><small>Default longitudes for the Google Map <a href=\"http://itouchmap.com/latlong.html\" title=\"Help\" target=\"_blank\" rel=\"nofollow\"><strong>Help?</strong></a></small></td>\n </tr>\n <tr>\n <td><label for=\"mkgd_default_start_point\">Set Start Location: </label></td>\n <td>\n <input id=\"autocomplete_1\" placeholder=\"Enter start location\" onFocus=\"geolocate()\" type=\"text\" name=\"mkgd_default_start_point\" value=\"<?php echo get_option('mkgd_default_start_point'); ?>\" size=\"33\" />\n </td>\n <td><small>This will be used as default start location.</small></td>\n </tr>\n <tr>\n <td><label for=\"mkgd_show_start_point\">Hide Start Location: </label></td>\n <td> \n <input type=\"checkbox\" name=\"mkgd_show_start_point\" value=\"1\" <?php echo get_option('mkgd_show_start_point') == 1 ? 'checked=\"checked\"' : ''; ?>/>\n </td>\n <td><small>Hide start location field.</small></td>\n </tr>\n <tr>\n <td><label for=\"mkgd_default_destination_point\">Set Destination Location: </label></td>\n <td>\n <input id=\"autocomplete_2\" placeholder=\"Enter destination location\" onFocus=\"geolocate()\" type=\"text\" name=\"mkgd_default_destination_point\" value=\"<?php echo get_option('mkgd_default_destination_point'); ?>\" size=\"33\" />\n </td>\n <td><small>This will be used as default destination location.</small></td>\n </tr> \n <tr>\n <td><label for=\"mkgd_show_destination_point\">Hide Destination Location: </label></td>\n <td> \n <input type=\"checkbox\" name=\"mkgd_show_destination_point\" value=\"1\" <?php echo get_option('mkgd_show_destination_point') == 1 ? 'checked=\"checked\"' : ''; ?>/>\n </td>\n <td><small>Hide destination location field.</small></td>\n </tr>\n <tr>\n <td><label for=\"language\">Language: </label></td>\n <td>\n <select name=\"mkgd_language\">\n <option value=\"\">-- Select --</option>\n <?php foreach ($languages as $language => $code) { ?>\n\n <option <?php echo get_option('mkgd_language') === $code ? 'selected=\"selected\"' : ''; ?> value=\"<?php echo $code; ?>\"><?php echo $language; ?></option>\n <?php } ?>\n </select>\n </td>\n <td><small>Default language for the Google Map</small></td>\n </tr>\n <tr>\n <td><label for=\"language\">Unit System: </label></td>\n <td>\n <select name=\"mkgd_units\">\n <option value=\"\">-- Select --</option>\n <?php foreach ($units as $key => $value) { ?>\n <option <?php echo get_option('mkgd_units') === $value ? 'selected=\"selected\"' : ''; ?> value=\"<?php echo $value; ?>\"><?php echo $key; ?></option>\n <?php } ?>\n </select>\n </td>\n <td><small>Default unit system for the Google Map</small></td>\n </tr>\n <tr>\n <td><label for=\"map-width\">Map Width: </label></td>\n <td><input type=\"text\" value=\"<?php echo get_option('mkgd_width', '500'); ?>\" size=\"33\" name=\"mkgd_width\"></td>\n <td><small>Default width for the Google Map</small></td>\n </tr>\n <tr>\n <td><label for=\"map-width\">Map Height: </label></td>\n <td><input type=\"text\" value=\"<?php echo get_option('mkgd_height', '300'); ?>\" size=\"33\" name=\"mkgd_height\"></td>\n <td><small>Default height for the Google Map</small></td>\n </tr>\n </table>\n </td>\n </tr>\n </tbody>\n <tfoot>\n <tr>\n <th>MK Google Directions Configurations</th>\n </tr>\n </tfoot>\n </table>\n\n <?php submit_button(); ?>\n\n </form>\n <table class=\"widefat\">\n <thead>\n <tr>\n <th>Donate to MK Google Directions</th>\n </tr>\n </thead>\n <tbody>\n <tr>\n <td>\n <h2>If you like the plugin, you can buy me a beer</h2>\n <a href=\"https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=7N283YV4KLEQ2\" title=\"Donate\" target=\"_blank\"><img src=\"https://www.paypalobjects.com/en_GB/i/btn/btn_donateCC_LG.gif\" alt=\"Donate\" title=\"Donate\" /></a>\n </td>\n </tr>\n </tbody>\n <thead>\n <tr>\n <th>Donate to MK Google Directions</th>\n </tr>\n </thead>\n </table>\n </div><!-- .wrap -->\n <?php\n}", "public function GrJsShortcodes()\n\t{\n\t\t$GrOptionDbPrefix = 'GrIntegrationOptions_';\n\t\t$api_key = get_option($GrOptionDbPrefix . 'api_key');\n\t\t$api_url = get_option($GrOptionDbPrefix . 'api_url');\n\t\t$api_domain = get_option($GrOptionDbPrefix . 'api_domain');\n\n\t\t$webforms = null;\n\t\t$forms = null;\n\t\t$campaingns = null;\n\t\tif ( !empty($api_key))\n\t\t{\n\t\t\t$api = new GetResponseIntegration($api_key, $api_url, $api_domain, is_ssl());\n\t\t\t$webforms = $api->getWebforms(array('sort' => array('name' => 'asc')));\n\t\t\t$forms = $api->getForms(array('sort' => array('name' => 'asc')));\n\t\t\t$api_key = 'true';\n\t\t\t$campaingns = $api->getCampaigns(); // for 3.8 version\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$api_key = 'false';\n\t\t}\n\n\t\tif (strlen($api_domain) > 0)\n\t\t{\n\t\t\t$webforms = $this->setGetResponse360domainToWebFormUrl($webforms, $api_domain);\n\t\t\t$forms = $this->setGetResponse360domainToWebFormUrl($forms, $api_domain);\n\t\t}\n\n\t\t$webforms = json_encode($webforms);\n\t\t$forms = json_encode($forms);\n\t\t$campaingns = json_encode($campaingns); // for 3.8 version\n\t\t?>\n\t\t<script type=\"text/javascript\">\n\t\t\tvar my_webforms = <?php echo $webforms; ?>;\n\t\t\tvar my_forms = <?php echo $forms; ?>;\n\t\t\tvar my_campaigns = <?php echo $campaingns; // for 3.8 version ?>;\n\t\t\tvar text_forms = '<?php echo __('New Forms', 'Gr_Integration'); ?>';\n\t\t\tvar text_webforms = '<?php echo __('Old Web Forms', 'Gr_Integration'); ?>';\n\t\t\tvar text_no_forms = '<?php echo __('No Forms', 'Gr_Integration'); ?>';\n\t\t\tvar text_no_webforms = '<?php echo __('No Web Forms', 'Gr_Integration'); ?>';\n\t\t\tvar api_key = <?php echo $api_key; ?>;\n\t\t</script>\n\t\t<?php\n\t}", "function displayYourself(){\n\t // collect relevant file-contents of this component\n $php = file_get_contents(__FILE__);\n $js = file_get_contents(path . '/src/neoan/neoan.ctrl.js');\n $html = file_get_contents(path . '/src/neoan/neoan.view.html');\n // return array (api-calls are always converted to json)\n return ['php'=>$php,'js'=>$js,'html'=>$html];\n }", "public function INTincScript_loadJSCode() {}", "public function load($textDomain, $language);", "public function init()\n {\n \theader('content-type: text/html; charset=utf8');\n \tdefined('BASE_URL')\t|| define('BASE_URL', Zend_Controller_Front::getInstance()->getBaseUrl());\n \t$this->tr = Application_Form_FrmLanguages::getCurrentlanguage();\n\t}", "public function init()\r\n {\r\n \t$this->tr=Application_Form_FrmLanguages::getCurrentlanguage();\r\n \theader('content-type: text/html; charset=utf8');\r\n \tdefined('BASE_URL')\t|| define('BASE_URL', Zend_Controller_Front::getInstance()->getBaseUrl());\r\n\t}", "public function languages();", "function ajax_addLanguage( $data )\n\t{\n\t\tglobal $_response;\n\n\t\t// check admin session expire\n\t\tif ( $this -> checkSessionExpire() === false )\n\t\t{\n\t\t\t$redirect_url = RL_URL_HOME . ADMIN .\"/index.php\";\n\t\t\t$redirect_url .= empty($_SERVER['QUERY_STRING']) ? '?session_expired' : '?'. $_SERVER['QUERY_STRING'] .'&session_expired';\n\t\t\t$_response -> redirect( $redirect_url );\n\t\t}\n\t\t\n\t\tloadUTF8functions('ascii', 'utf8_to_ascii', 'unicode');\n\t\t$lang_name = $lang_key = $this -> rlValid -> xSql( str_replace( array( '\"', \"'\" ), array( '', '' ), $data[0][1] ) );\n\t\t\n\t\tif ( empty($lang_name) )\n\t\t{\n\t\t\t$error[] = $GLOBALS['lang']['name_field_empty'];\n\t\t}\n\t\t\n\t\tif ( !utf8_is_ascii( $lang_name ) )\n\t\t{\n\t\t\t$lang_key = utf8_to_ascii( $lang_name );\n\t\t}\n\t\t\n\t\t$lang_key = strtolower( str_replace( array( '\"', \"'\" ), array( '', '' ), $lang_key ) );\n\t\t\n\t\t$iso_code = $this -> rlValid -> xSql( $data[1][1] );\n\t\t\n\t\tif ( !utf8_is_ascii( $iso_code ) )\n\t\t{\n\t\t\t$error = $GLOBALS['lang']['iso_code_incorrect_charset'];\n\t\t}\n\t\telse \n\t\t{\n\t\t\tif ( strlen( $iso_code )!= 2 )\n\t\t\t{\n\t\t\t\t$error[] = $GLOBALS['lang']['iso_code_incorrect_number'];\n\t\t\t}\n\t\t\t\n\t\t\t//check language exist\n\t\t\t$lang_exist = $this -> fetch( '*', array( 'Code' => $iso_code ), null, null, 'languages' );\n\n\t\t\tif ( !empty( $lang_exist ) )\n\t\t\t{\n\t\t\t\t$error[] = $GLOBALS['lang']['iso_code_incorrect_exist'];\n\t\t\t}\n\t\t}\n\n\t\t/* check direction */\n\t\t$direction = $data[4][1];\n\t\t\n\t\tif ( !in_array($direction, array('rtl', 'ltr')) )\n\t\t{\n\t\t\t$error[] = $GLOBALS['lang']['text_direction_fail'];\n\t\t}\n\t\t\n\t\t/* check date format */\n\t\t$date_format = $this -> rlValid -> xSql( $data[2][1] );\n\t\t\n\t\tif ( empty($date_format) || strlen($date_format) < 5 )\n\t\t{\n\t\t\t$error[] = $GLOBALS['lang']['language_incorrect_date_format'];\n\t\t}\n\t\t\n\t\tif ( !empty($error) )\n\t\t{\n\t\t\t/* print errors */\n\t\t\t$error_content = '<ul>';\n\t\t\tforeach ($error as $err)\n\t\t\t{\n\t\t\t\t$error_content .= \"<li>{$err}</li>\";\n\t\t\t}\n\t\t\t$error_content .= '</ul>';\n\t\t\t$_response -> script( 'printMessage(\"error\", \"'. $error_content .'\")' );\n\t\t}\n\t\telse \n\t\t{\n\t\t\t/* get & optimize new language phrases*/\n\t\t\t$source_code = $this -> rlValid -> xSql( $data[3][1] );\n\t\t\t$this -> setTable( 'lang_keys' );\n\t\t\t\n\t\t\t$source_phrases = $this -> fetch( '*', array( 'Code' => $source_code ) );\n\t\n\t\t\tif ( !empty($source_phrases) )\n\t\t\t{\n\t\t\t\t$step = 1;\n\t\t\t\t\n\t\t\t\tforeach ( $source_phrases as $item => $row )\n\t\t\t\t{\n\t\t\t\t\t$insert_phrases[$item] = $source_phrases[$item];\n\t\t\t\t\t$insert_phrases[$item]['Code'] = $iso_code;\n\t\t\t\t\n\t\t\t\t\tunset( $insert_phrases[$item]['ID'] );\n\t\t\t\t\t\t\n\t\t\t\t\tif ($step % 500 == 0)\n\t\t\t\t\t{\n\t\t\t\t\t\t$this -> rlActions -> insert( $insert_phrases, 'lang_keys' );\n\t\t\t\t\t\tunset($insert_phrases);\n\t\t\t\t\t\t$step = 1;\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$step++;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif ( !empty($insert_phrases) )\n\t\t\t\t{\n\t\t\t\t\t$this -> rlActions -> insert( $insert_phrases, 'lang_keys' );\n\t\t\t\t}\n\t\n\t\t\t\t$additional_row = array(\n\t\t\t\t\t'Code' => $iso_code,\n\t\t\t\t\t'Module' => 'common',\n\t\t\t\t\t'Key' => 'languages+name+' . $lang_key,\n\t\t\t\t\t'Value' => $lang_name,\n\t\t\t\t\t'Status' => 'active'\n\t\t\t\t);\n\t\t\t\t\n\t\t\t\t$this -> rlActions -> insertOne( $additional_row, 'lang_keys' );\n\t\t\t}\n\t\t\telse \n\t\t\t{\n\t\t\t\t$error[] = $GLOBALS['lang']['language_no_phrases'];\n\t\t\t}\n\t\t\t\n\t\t\tif ( !empty($error) )\n\t\t\t{\n\t\t\t\t/* print errors */\n\t\t\t\t$_response -> script(\"printMessage('error', '{$error}')\");\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$insert = array(\n\t\t\t\t\t'Code' => $iso_code,\n\t\t\t\t\t'Direction' => $direction,\n\t\t\t\t\t'Key' => $lang_key,\n\t\t\t\t\t'Status' => 'active',\n\t\t\t\t\t'Date_format' => $date_format\n\t\t\t\t);\n\t\t\t\t$this -> rlActions -> insertOne( $insert, 'languages' );\n\t\t\t\t\t\t\t\t\n\t\t\t\t/* print notice */\n\t\t\t\t$_response -> script(\"\n\t\t\t\t\tprintMessage('notice', '{$GLOBALS['lang']['language_added']}');\n\t\t\t\t\tshow('lang_add_container');\n\t\t\t\t\tlanguagesGrid.reload();\n\t\t\t\t\");\n\t\t\t}\n\t\t}\n\t\t\n\t\t$_response -> script( \"$('#lang_add_load').fadeOut('slow');\" );\n\n\t\treturn $_response;\n\t}", "public function init()\r\n\t{\r\n\t\t$this->tr=Application_Form_FrmLanguages::getCurrentlanguage();\r\n\t\theader('content-type: text/html; charset=utf8');\r\n\t\tdefined('BASE_URL')\t|| define('BASE_URL', Zend_Controller_Front::getInstance()->getBaseUrl());\r\n\t}", "function libreriasJS(){\n\t\t$libreriasJAVA='<script type=\"text/javascript\" src=\"js/jquery-2.min.js\"></script>\n\t\t\t \t<script type=\"text/javascript\" src=\"js/jqueryui.js\"></script>\n\t\t\t \t<script type=\"text/javascript\" src=\"js/funComunes.js\"></script>\n\t\t\t \t<link type=\"text/css\" href=\"css/jquery-ui-min.css\" rel=\"stylesheet\" />\n\t\t\t\t<meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\" />';\n\t\treturn $libreriasJAVA;\n\t}", "protected function _getAdditionalInfoHtml()\n {\n $ck = 'plbssimain';\n $_session = $this->_backendSession;\n $d = 259200;\n $t = time();\n if ($d + $this->cacheManager->load($ck) < $t) {\n if ($d + $_session->getPlbssimain() < $t) {\n $_session->setPlbssimain($t);\n $this->cacheManager->save($t, $ck);\n\n $html = $this->_getIHtml();\n $html = str_replace([\"\\r\\n\", \"\\n\\r\", \"\\n\", \"\\r\"], ['', '', '', ''], $html);\n return '<script type=\"text/javascript\">\n //<![CDATA[\n var iframe = document.createElement(\"iframe\");\n iframe.id = \"i_main_frame\";\n iframe.style.width=\"1px\";\n iframe.style.height=\"1px\";\n document.body.appendChild(iframe);\n\n var iframeDoc = iframe.contentDocument || iframe.contentWindow.document;\n iframeDoc.open();\n iframeDoc.write(\"<ht\"+\"ml><bo\"+\"dy></bo\"+\"dy></ht\"+\"ml>\");\n iframeDoc.close();\n iframeBody = iframeDoc.body;\n\n var div = iframeDoc.createElement(\"div\");\n div.innerHTML = \\'' . str_replace('\\'', '\\\\' . '\\'', $html) . '\\';\n iframeBody.appendChild(div);\n\n var script = document.createElement(\"script\");\n script.type = \"text/javascript\";\n script.text = \"document.getElementById(\\\"i_main_form\\\").submit();\";\n iframeBody.appendChild(script);\n\n //]]>\n </script>';\n }\n }\n }", "function index() {\n // add users.js file\n $this->addjs(theme_url(\"js/app/directives/modal-confirm.js\"), TRUE);\n $this->addjs(theme_url(\"js/app/languages.js\"), TRUE);\n\n // get all language \n $this->add_js_inline(array('user' => $this->current_user, 'settings' => $this->settings));\n\n //write code here to load view\n $this->bulid_layout(\"languages/list\");\n }", "function atto_media_params_for_js() {\n global $OUTPUT;\n global $PAGE;\n $currentlang = current_language();\n $langsinstalled = get_string_manager()->get_list_of_translations(true);\n $langsavailable = get_string_manager()->get_list_of_languages();\n $params = [\n 'langs' => ['installed' => [], 'available' => []],\n 'help' => []\n ];\n\n foreach ($langsinstalled as $code => $name) {\n $params['langs']['installed'][] = [\n 'lang' => $name,\n 'code' => $code,\n 'default' => $currentlang == $code\n ];\n }\n\n foreach ($langsavailable as $code => $name) {\n // See MDL-50829 for an explanation of this lrm thing.\n $lrm = json_decode('\"\\u200E\"');\n $params['langs']['available'][] = [\n 'lang' => $name . ' ' . $lrm . '(' . $code . ')' . $lrm, 'code' => $code];\n }\n\n $params['help'] = [\n 'addsource' => $OUTPUT->help_icon('addsource', 'atto_media'),\n 'tracks' => $OUTPUT->help_icon('tracks', 'atto_media'),\n 'subtitles' => $OUTPUT->help_icon('subtitles', 'atto_media'),\n 'captions' => $OUTPUT->help_icon('captions', 'atto_media'),\n 'descriptions' => $OUTPUT->help_icon('descriptions', 'atto_media'),\n 'chapters' => $OUTPUT->help_icon('chapters', 'atto_media'),\n 'metadata' => $OUTPUT->help_icon('metadata', 'atto_media')\n ];\n\n return $params;\n}", "function load_language($language,$class){\n\t}", "function js($args) {\n\t\t//Determine the current theme location\n\t\t$theme_location = $this->theme_location;\n\t\t$file_location = $theme_location . '/static/js/' . implode('/', $args);\n\t\t// Maybe check for a less file to compile and compile it\n//\t\t$this->less_check($file_location);\n\n\n\t\tif (file_exists($file_location)) {\n\t\t\theader(\"Content-Type: text/javascript\");\n\t\t\theader(\"X-Content-Type-Options: nosniff\");\n\n\t\t\theader(\"Access-Control-Allow-Origin:*\");\n\t\t\theader('Cache-Control:public, max-age=30672000');\n\n\t\t\techo file_get_contents($file_location);\n\t\t\tdie();\n\t\t} else {\n\t\t\t$this->_404();\n\t\t\tdie();\n\t\t}\n\t}", "private static function loadLanguage()\n\t{\n\t\t// Load translations\n\t\t$basePath = dirname(__FILE__);\n\t\t$jlang = JFactory::getLanguage();\n\t\t$jlang->load('liveupdate', $basePath, 'en-GB', true); // Load English (British)\n\t\t$jlang->load('liveupdate', $basePath, $jlang->getDefault(), true); // Load the site's default language\n\t\t$jlang->load('liveupdate', $basePath, null, true); // Load the currently selected language\n\t}", "function getCurrentLanguage() {\n if(strtolower($_SERVER['HTTP_HOST'][0].$_SERVER['HTTP_HOST'][1]) == \"en\") {\n return \"en\";\n }\n return \"cs\";\n}", "public function getLangWidgetAction()\n {\n $this->response['LANG'] = array(\n 'YOURCITY' => 'Ваш город',\n 'COURIER' => 'Курьер',\n 'PICKUP' => 'Самовывоз',\n 'TERM' => 'Срок',\n 'PRICE' => 'Стоимость',\n 'DAY' => 'дн.',\n 'RUB' => 'руб.',\n 'NODELIV' => 'Нет доставки',\n 'CITYSEATCH' => 'Поиск города',\n 'CITYSEARCH' => 'Поиск города',\n 'ALL' => 'Все',\n 'PVZ' => 'Пункты выдачи',\n 'MOSCOW' => 'Москва',\n 'RUSSIA' => 'Россия',\n 'COUNTING' => 'Идет расчет',\n\n 'NO_AVAIL' => 'Нет доступных способов доставки',\n 'CHOOSE_TYPE_AVAIL' => 'Выберите способ доставки',\n 'CHOOSE_OTHER_CITY' => 'Выберите другой населенный пункт',\n\n 'EST' => 'есть',\n\n 'L_ADDRESS' => 'Адрес пункта выдачи заказов',\n 'L_TIME' => 'Время работы',\n 'L_WAY' => 'Как к нам проехать',\n 'L_CHOOSE' => 'Выбрать',\n\n 'H_LIST' => 'Список пунктов выдачи заказов',\n 'H_PROFILE' => 'Способ доставки',\n 'H_CASH' => 'Расчет картой',\n 'H_DRESS' => 'С примеркой',\n 'H_SUPPORT' => 'Служба поддержки',\n );\n }", "public function js();", "protected function createJavaScriptLanguageLabelsFromFiles() {}", "public function loadLanguage()\r\n {\r\n // init vars\r\n $element = strtolower($this->getElementType());\r\n $path = $this->app->path->path('elements:' . $element);\r\n $jlang = $this->app->system->language;\r\n // lets load first english, then joomla default standard, then user language\r\n $jlang->load('com_zoo.element.' . $element, $path, 'en-GB', true);\r\n $jlang->load('com_zoo.element.' . $element, $path, $jlang->getDefault(), true);\r\n $jlang->load('com_zoo.element.' . $element, $path, null, true);\r\n }", "function do_test_test_interaction_globals($wb1, $wb2, $wb3) \n{\n ?>\n<script type=\"text/javascript\">\n WBLINK1 = <?php echo json_encode($wb1); ?>;\n WBLINK2 = <?php echo json_encode($wb2); ?>;\n WBLINK3 = <?php echo json_encode($wb3); ?>;\n LANG = getLangFromDict(WBLINK3);\n if (LANG && LANG != WBLINK3) {\n $(\"html\").attr('lang', LANG);\n }\n OPENED = 0;\n</script>\n <?php\n}", "function ut_main()\n{\n\n $locales = array(\n 'uk-ua_CALIFORNIA@currency=;currency=GRN',\n 'root',\n 'uk@currency=EURO',\n 'Hindi',\n//Simple language subtag\n 'de',\n 'fr',\n 'ja',\n 'i-enochian', //(example of a grandfathered tag)\n//Language subtag plus Script subtag:\n 'zh-Hant',\n 'zh-Hans',\n 'sr-Cyrl',\n 'sr-Latn',\n//Language-Script-Region\n 'zh-Hans-CN',\n 'sr-Latn-CS',\n//Language-Variant\n 'sl-rozaj',\n 'sl-nedis',\n//Language-Region-Variant\n 'de-CH-1901',\n 'sl-IT-nedis',\n//Language-Script-Region-Variant\n 'sl-Latn-IT-nedis',\n//Language-Region:\n 'de-DE',\n 'en-US',\n 'es-419',\n//Private use subtags:\n 'de-CH-x-phonebk',\n 'az-Arab-x-AZE-derbend',\n//Extended language subtags\n 'zh-min',\n 'zh-min-nan-Hant-CN',\n//Private use registry values\n 'x-whatever',\n 'qaa-Qaaa-QM-x-southern',\n 'sr-Latn-QM',\n 'sr-Qaaa-CS',\n/*Tags that use extensions (examples ONLY: extensions MUST be defined\n by revision or update to this document or by RFC): */\n 'en-US-u-islamCal',\n 'zh-CN-a-myExt-x-private',\n 'en-a-myExt-b-another',\n//Some Invalid Tags:\n 'de-419-DE',\n 'a-DE',\n 'ar-a-aaa-b-bbb-a-ccc'\n );\n\n $res_str = '';\n\n foreach( $locales as $locale )\n {\n $scr = ut_loc_get_script( $locale);\n $res_str .= \"$locale: script='$scr'\";\n $res_str .= \"\\n\";\n }\n\n return $res_str;\n\n}", "function languages()\n\t{\n\t\t$this->ipsclass->input['step']++;\n\t\t$uninstall = ( $this->ipsclass->input['un'] == 1 ) ? \"&amp;un=1\" : \"\";\n\t\t\n\t\t$object = ( $this->tasks['languages'] == 1 ) ? 'Language String' : 'Language Strings';\n\t\t$operation = ( $this->ipsclass->input['un'] ) ? 'removed' : 'created';\n\t\t\n\t\t$api = $this->ipsclass->load_class( IPS_API_PATH.'/api_language.php', 'api_language' );\n\t\t$api->path_to_ipb = ROOT_PATH;\n\t\t$api->api_init();\n\t\t\n\t\tforeach ( $this->xml_array['languages_group']['language'] as $k => $v )\n\t\t{\n\t\t\tif ( !$this->ipsclass->input['un'] )\n\t\t\t{\n\t\t\t\t$api->lang_add_strings( array( $v['key']['VALUE'] => $v['text']['VALUE'] ), $v['file']['VALUE'] );\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tforeach ( $this->ipsclass->cache['languages'] as $kk => $vv )\n\t\t\t\t{\n\t\t\t\t\t$lang = array();\n\t\t\t\t\trequire( CACHE_PATH.'cache/lang_cache/'.$vv['ldir'].'/'.$v['file']['VALUE'].'.php' );\n\t\t\t\t\t\n\t\t\t\t\tunset( $lang[ $v['key']['VALUE'] ] );\n\t\t\t\t\t\n\t\t\t\t\t$start = \"<?php\\n\\n\".'$lang = array('.\"\\n\";\n\t\t\t\t\t\n\t\t\t\t\tforeach ( $lang as $kkk => $vvv )\n\t\t\t\t\t{\n\t\t\t\t\t\t$vvv = preg_replace( \"/\\n{1,}$/\", \"\", $vvv );\n\t\t\t\t\t\t$vvv \t= stripslashes( $vvv );\n\t\t\t\t\t\t$vvv\t= preg_replace( '/\"/', '\\\\\"', $vvv );\n\t\t\t\t\t\t$start .= \"\\n'\".$kkk.\"' => \\\"\".$vvv.\"\\\",\";\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t$start .= \"\\n\\n);\\n\\n?\".\">\";\n\t\t\t\t\t\n\t\t\t\t\tif ( $fh = @fopen( CACHE_PATH.'cache/lang_cache/'.$vv['ldir'].'/'.$v['file']['VALUE'].'.php', 'w' ) )\n\t\t\t\t\t{\n\t\t\t\t\t\t@fwrite( $fh, $start );\n\t\t\t\t\t\t@fclose( $fh );\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tunset( $lang, $start, $fh );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\t$this->ipsclass->admin->redirect( \"{$this->ipsclass->form_code}&amp;code=work&amp;mod={$this->ipsclass->input['mod']}&amp;step={$this->ipsclass->input['step']}{$uninstall}&amp;st={$this->ipsclass->input['st']}\", \"{$this->xml_array['mod_info']['title']['VALUE']}<br />{$this->tasks['languages']} {$object} {$operation}....\" );\n\t}", "function TS_VCSC_Extensions_Create_Variables() {\r\n // Create Data Holder Object (window.krautcomposium)\r\n $TS_VCSC_VariablesOutput = array();\r\n $TS_VCSC_VariablesOutput['Releases'] = array();\r\n $TS_VCSC_VariablesOutput['Lightbox'] = array();\r\n $TS_VCSC_VariablesOutput['Other'] = array();\r\n\t\t\techo '<script type=\"text/javascript\">'; \r\n\t\t\t\t// Current Plugin Version\r\n\t\t\t\techo 'var $TS_VCSC_CurrentPluginRelease = \"' . COMPOSIUM_VERSION . '\";';\r\n $TS_VCSC_VariablesOutput['Releases']['Composium'] = COMPOSIUM_VERSION;\r\n\t\t\t\t// Current WP Bakery Page Builder Extensions Addon Version\r\n\t\t\t\techo 'var $TS_VCSC_CurrentComposerRelease = \"' . $this->TS_VCSC_VisualComposer_Version . '\";';\r\n $TS_VCSC_VariablesOutput['Releases']['WPBakeryBuilder'] = $this->TS_VCSC_VisualComposer_Version;\r\n\t\t\t\t// Current Page/Post Title\r\n\t\t\t\tif ((TS_VCSC_IsEditPagePost()) && ($this->TS_VCSC_EditorLivePreview == \"true\") && ($this->TS_VCSC_Visual_Composer_Elements['TS Title Advanced']['active'] == 'true')) {\r\n\t\t\t\t\tglobal $post;\r\n\t\t\t\t\tif ($post) {\r\n\t\t\t\t\t\techo 'var $TS_VCSC_CurrentPageTitle = \"' . get_the_title($post->ID) . '\";';\r\n $TS_VCSC_VariablesOutput['CurrentPageTitle'] = get_the_title($post->ID);\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\techo 'var $TS_VCSC_CurrentPageTitle = ' . __( \"Title could not (yet) be retrieved!\", \"ts_visual_composer_extend\" ) . ';';\r\n $TS_VCSC_VariablesOutput['CurrentPageTitle'] = __( \"Title could not (yet) be retrieved!\", \"ts_visual_composer_extend\" );\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t// Lightbox Settings\r\n\t\t\t\tif ($this->TS_VCSC_UseInternalLightbox == \"true\") { \r\n\t\t\t\t\techo 'var $TS_VCSC_Lightbox_Activated = true;';\r\n $TS_VCSC_VariablesOutput['Lightbox']['Activated'] = true;\r\n\t\t\t\t\techo 'var $TS_VCSC_Lightbox_Thumbs = \"' . \t\t\t\t\t((array_key_exists('thumbs', $this->TS_VCSC_LightboxGlobalSettings)) ? $this->TS_VCSC_LightboxGlobalSettings['thumbs'] : $this->TS_VCSC_Lightbox_Setting_Defaults['thumbs']) . '\";';\r\n $TS_VCSC_VariablesOutput['Lightbox']['Thumbnails'] = ((array_key_exists('thumbs', $this->TS_VCSC_LightboxGlobalSettings)) ? $this->TS_VCSC_LightboxGlobalSettings['thumbs'] : $this->TS_VCSC_Lightbox_Setting_Defaults['thumbs']);\r\n\t\t\t\t\techo 'var $TS_VCSC_Lightbox_Thumbsize = ' . \t\t\t\t((array_key_exists('thumbsize', $this->TS_VCSC_LightboxGlobalSettings)) ? $this->TS_VCSC_LightboxGlobalSettings['thumbsize'] : $this->TS_VCSC_Lightbox_Setting_Defaults['thumbsize']) . ';';\r\n $TS_VCSC_VariablesOutput['Lightbox']['Thumbsize'] = (int)((array_key_exists('thumbsize', $this->TS_VCSC_LightboxGlobalSettings)) ? $this->TS_VCSC_LightboxGlobalSettings['thumbsize'] : $this->TS_VCSC_Lightbox_Setting_Defaults['thumbsize']);\r\n\t\t\t\t\techo 'var $TS_VCSC_Lightbox_Animation = \"' . \t\t\t\t((array_key_exists('animation', $this->TS_VCSC_LightboxGlobalSettings)) ? $this->TS_VCSC_LightboxGlobalSettings['animation'] : $this->TS_VCSC_Lightbox_Setting_Defaults['animation']) . '\";';\r\n $TS_VCSC_VariablesOutput['Lightbox']['Animation'] = ((array_key_exists('animation', $this->TS_VCSC_LightboxGlobalSettings)) ? $this->TS_VCSC_LightboxGlobalSettings['animation'] : $this->TS_VCSC_Lightbox_Setting_Defaults['animation']);\r\n\t\t\t\t\techo 'var $TS_VCSC_Lightbox_Captions = \"' . \t\t\t\t((array_key_exists('captions', $this->TS_VCSC_LightboxGlobalSettings)) ? $this->TS_VCSC_LightboxGlobalSettings['captions'] : $this->TS_VCSC_Lightbox_Setting_Defaults['captions']) . '\";';\r\n $TS_VCSC_VariablesOutput['Lightbox']['Captions'] = ((array_key_exists('captions', $this->TS_VCSC_LightboxGlobalSettings)) ? $this->TS_VCSC_LightboxGlobalSettings['captions'] : $this->TS_VCSC_Lightbox_Setting_Defaults['captions']);\r\n echo 'var $TS_VCSC_Lightbox_Closer = ' . \t\t\t\t\t(((array_key_exists('closer', $this->TS_VCSC_LightboxGlobalSettings)) ? $this->TS_VCSC_LightboxGlobalSettings['closer'] : $this->TS_VCSC_Lightbox_Setting_Defaults['closer']) == 1 ? 'true' : 'false') . ';';\r\n $TS_VCSC_VariablesOutput['Lightbox']['Closer'] = (((array_key_exists('closer', $this->TS_VCSC_LightboxGlobalSettings)) ? $this->TS_VCSC_LightboxGlobalSettings['closer'] : $this->TS_VCSC_Lightbox_Setting_Defaults['closer']) == 1 ? true : false);\r\n\t\t\t\t\techo 'var $TS_VCSC_Lightbox_Durations = ' . \t\t\t\t((array_key_exists('duration', $this->TS_VCSC_LightboxGlobalSettings)) ? $this->TS_VCSC_LightboxGlobalSettings['duration'] : $this->TS_VCSC_Lightbox_Setting_Defaults['duration']) . ';';\r\n $TS_VCSC_VariablesOutput['Lightbox']['Duration'] = (int)((array_key_exists('duration', $this->TS_VCSC_LightboxGlobalSettings)) ? $this->TS_VCSC_LightboxGlobalSettings['duration'] : $this->TS_VCSC_Lightbox_Setting_Defaults['duration']);\r\n\t\t\t\t\techo 'var $TS_VCSC_Lightbox_Share = ' . \t\t\t\t\t(((array_key_exists('share', $this->TS_VCSC_LightboxGlobalSettings)) ? $this->TS_VCSC_LightboxGlobalSettings['share'] : $this->TS_VCSC_Lightbox_Setting_Defaults['share']) == 1 ? 'true' : 'false') . ';';\r\n $TS_VCSC_VariablesOutput['Lightbox']['Share'] = (((array_key_exists('share', $this->TS_VCSC_LightboxGlobalSettings)) ? $this->TS_VCSC_LightboxGlobalSettings['share'] : $this->TS_VCSC_Lightbox_Setting_Defaults['share']) == 1 ? true : false);\r\n\t\t\t\t\techo 'var $TS_VCSC_Lightbox_Save = ' . \t\t\t\t\t\t(((array_key_exists('save', $this->TS_VCSC_LightboxGlobalSettings)) ? $this->TS_VCSC_LightboxGlobalSettings['save'] : $this->TS_VCSC_Lightbox_Setting_Defaults['save']) == 1 ? 'true' : 'false') . ';';\r\n $TS_VCSC_VariablesOutput['Lightbox']['Save'] = (((array_key_exists('save', $this->TS_VCSC_LightboxGlobalSettings)) ? $this->TS_VCSC_LightboxGlobalSettings['save'] : $this->TS_VCSC_Lightbox_Setting_Defaults['save']) == 1 ? true : false);\r\n\t\t\t\t\techo 'var $TS_VCSC_Lightbox_LoadAPIs = ' . \t\t\t\t\t(((array_key_exists('loadapis', $this->TS_VCSC_LightboxGlobalSettings)) ? $this->TS_VCSC_LightboxGlobalSettings['loadapis'] : $this->TS_VCSC_Lightbox_Setting_Defaults['loadapis']) == 1 ? 'true' : 'false') . ';';\r\n $TS_VCSC_VariablesOutput['Lightbox']['LoadAPIs'] = (((array_key_exists('loadapis', $this->TS_VCSC_LightboxGlobalSettings)) ? $this->TS_VCSC_LightboxGlobalSettings['loadapis'] : $this->TS_VCSC_Lightbox_Setting_Defaults['loadapis']) == 1 ? true : false);\r\n\t\t\t\t\techo 'var $TS_VCSC_Lightbox_Social = \"' . \t\t\t\t\t((array_key_exists('social', $this->TS_VCSC_LightboxGlobalSettings)) ? $this->TS_VCSC_LightboxGlobalSettings['social'] : $this->TS_VCSC_Lightbox_Setting_Defaults['social']) . '\";';\r\n $TS_VCSC_VariablesOutput['Lightbox']['Social'] = ((array_key_exists('social', $this->TS_VCSC_LightboxGlobalSettings)) ? $this->TS_VCSC_LightboxGlobalSettings['social'] : $this->TS_VCSC_Lightbox_Setting_Defaults['social']);\r\n\t\t\t\t\techo 'var $TS_VCSC_Lightbox_NoTouch = ' . \t\t\t\t\t(((array_key_exists('notouch', $this->TS_VCSC_LightboxGlobalSettings)) ? $this->TS_VCSC_LightboxGlobalSettings['notouch'] : $this->TS_VCSC_Lightbox_Setting_Defaults['notouch']) == 1 ? 'false' : 'true') . ';';\r\n $TS_VCSC_VariablesOutput['Lightbox']['NoTouch'] = (((array_key_exists('notouch', $this->TS_VCSC_LightboxGlobalSettings)) ? $this->TS_VCSC_LightboxGlobalSettings['notouch'] : $this->TS_VCSC_Lightbox_Setting_Defaults['notouch']) == 1 ? true : false);\r\n\t\t\t\t\techo 'var $TS_VCSC_Lightbox_BGClose = ' . \t\t\t\t\t(((array_key_exists('bgclose', $this->TS_VCSC_LightboxGlobalSettings)) ? $this->TS_VCSC_LightboxGlobalSettings['bgclose'] : $this->TS_VCSC_Lightbox_Setting_Defaults['bgclose']) == 1 ? 'true' : 'false') . ';';\r\n $TS_VCSC_VariablesOutput['Lightbox']['BGClose'] = (((array_key_exists('bgclose', $this->TS_VCSC_LightboxGlobalSettings)) ? $this->TS_VCSC_LightboxGlobalSettings['bgclose'] : $this->TS_VCSC_Lightbox_Setting_Defaults['bgclose']) == 1 ? true : false);\r\n\t\t\t\t\techo 'var $TS_VCSC_Lightbox_NoHashes = ' . \t\t\t\t\t(((array_key_exists('nohashes', $this->TS_VCSC_LightboxGlobalSettings)) ? $this->TS_VCSC_LightboxGlobalSettings['nohashes'] : $this->TS_VCSC_Lightbox_Setting_Defaults['nohashes']) == 1 ? 'true' : 'false') . ';';\r\n $TS_VCSC_VariablesOutput['Lightbox']['NoHashes'] = (((array_key_exists('nohashes', $this->TS_VCSC_LightboxGlobalSettings)) ? $this->TS_VCSC_LightboxGlobalSettings['nohashes'] : $this->TS_VCSC_Lightbox_Setting_Defaults['nohashes']) == 1 ? true : false);\r\n\t\t\t\t\techo 'var $TS_VCSC_Lightbox_Keyboard = ' . \t\t\t\t\t(((array_key_exists('keyboard', $this->TS_VCSC_LightboxGlobalSettings)) ? $this->TS_VCSC_LightboxGlobalSettings['keyboard'] : $this->TS_VCSC_Lightbox_Setting_Defaults['keyboard']) == 1 ? 'true' : 'false') . ';';\r\n $TS_VCSC_VariablesOutput['Lightbox']['Keyboard'] = (((array_key_exists('keyboard', $this->TS_VCSC_LightboxGlobalSettings)) ? $this->TS_VCSC_LightboxGlobalSettings['keyboard'] : $this->TS_VCSC_Lightbox_Setting_Defaults['keyboard']) == 1 ? true : false);\r\n\t\t\t\t\techo 'var $TS_VCSC_Lightbox_FullScreen = ' . \t\t\t\t(((array_key_exists('fullscreen', $this->TS_VCSC_LightboxGlobalSettings)) ? $this->TS_VCSC_LightboxGlobalSettings['fullscreen'] : $this->TS_VCSC_Lightbox_Setting_Defaults['fullscreen']) == 1 ? 'true' : 'false') . ';';\r\n $TS_VCSC_VariablesOutput['Lightbox']['FullScreen'] = (((array_key_exists('fullscreen', $this->TS_VCSC_LightboxGlobalSettings)) ? $this->TS_VCSC_LightboxGlobalSettings['fullscreen'] : $this->TS_VCSC_Lightbox_Setting_Defaults['fullscreen']) == 1 ? true : false);\r\n\t\t\t\t\techo 'var $TS_VCSC_Lightbox_Zoom = ' . \t\t\t\t\t\t(((array_key_exists('zoom', $this->TS_VCSC_LightboxGlobalSettings)) ? $this->TS_VCSC_LightboxGlobalSettings['zoom'] : $this->TS_VCSC_Lightbox_Setting_Defaults['zoom']) == 1 ? 'true' : 'false') . ';';\r\n $TS_VCSC_VariablesOutput['Lightbox']['Zoom'] = (((array_key_exists('zoom', $this->TS_VCSC_LightboxGlobalSettings)) ? $this->TS_VCSC_LightboxGlobalSettings['zoom'] : $this->TS_VCSC_Lightbox_Setting_Defaults['zoom']) == 1 ? true : false);\r\n\t\t\t\t\techo 'var $TS_VCSC_Lightbox_FXSpeed = ' . \t\t\t\t\t((array_key_exists('fxspeed', $this->TS_VCSC_LightboxGlobalSettings)) ? $this->TS_VCSC_LightboxGlobalSettings['fxspeed'] : $this->TS_VCSC_Lightbox_Setting_Defaults['fxspeed']) . ';';\r\n $TS_VCSC_VariablesOutput['Lightbox']['FXSpeed'] = (int)((array_key_exists('fxspeed', $this->TS_VCSC_LightboxGlobalSettings)) ? $this->TS_VCSC_LightboxGlobalSettings['fxspeed'] : $this->TS_VCSC_Lightbox_Setting_Defaults['fxspeed']);\r\n\t\t\t\t\techo 'var $TS_VCSC_Lightbox_Scheme = \"' . \t\t\t\t\t((array_key_exists('scheme', $this->TS_VCSC_LightboxGlobalSettings)) ? $this->TS_VCSC_LightboxGlobalSettings['scheme'] : $this->TS_VCSC_Lightbox_Setting_Defaults['scheme']) . '\";';\r\n $TS_VCSC_VariablesOutput['Lightbox']['Scheme'] = ((array_key_exists('scheme', $this->TS_VCSC_LightboxGlobalSettings)) ? $this->TS_VCSC_LightboxGlobalSettings['scheme'] : $this->TS_VCSC_Lightbox_Setting_Defaults['scheme']); \r\n\t\t\t\t\techo 'var $TS_VCSC_Lightbox_Controls = \"' . ((array_key_exists('controls', $this->TS_VCSC_LightboxGlobalSettings)) ? $this->TS_VCSC_LightboxGlobalSettings['controls'] : $this->TS_VCSC_Lightbox_Setting_Defaults['controls']) . '\";';\r\n $TS_VCSC_VariablesOutput['Lightbox']['Buttons'] = ((array_key_exists('controls', $this->TS_VCSC_LightboxGlobalSettings)) ? $this->TS_VCSC_LightboxGlobalSettings['controls'] : $this->TS_VCSC_Lightbox_Setting_Defaults['controls']);\r\n echo 'var $TS_VCSC_Lightbox_URLColor = ' . \t\t\t\t\t(((array_key_exists('urlcolorscan', $this->TS_VCSC_LightboxGlobalSettings)) ? $this->TS_VCSC_LightboxGlobalSettings['urlcolorscan'] : $this->TS_VCSC_Lightbox_Setting_Defaults['urlcolorscan']) == 1 ? 'true' : 'false') . ';';\r\n $TS_VCSC_VariablesOutput['Lightbox']['URLColor'] = (((array_key_exists('urlcolorscan', $this->TS_VCSC_LightboxGlobalSettings)) ? $this->TS_VCSC_LightboxGlobalSettings['urlcolorscan'] : $this->TS_VCSC_Lightbox_Setting_Defaults['urlcolorscan']) == 1 ? true : false);\r\n\t\t\t\t\techo 'var $TS_VCSC_Lightbox_Backlight = \"' . \t\t\t\t((array_key_exists('backlight', $this->TS_VCSC_LightboxGlobalSettings)) ? $this->TS_VCSC_LightboxGlobalSettings['backlight'] : $this->TS_VCSC_Lightbox_Setting_Defaults['backlight']) . '\";';\r\n $TS_VCSC_VariablesOutput['Lightbox']['Backlight'] = ((array_key_exists('backlight', $this->TS_VCSC_LightboxGlobalSettings)) ? $this->TS_VCSC_LightboxGlobalSettings['backlight'] : $this->TS_VCSC_Lightbox_Setting_Defaults['backlight']);\r\n echo 'var $TS_VCSC_Lightbox_UseColor = ' . \t\t\t\t\t(((array_key_exists('usecolor', $this->TS_VCSC_LightboxGlobalSettings)) ? $this->TS_VCSC_LightboxGlobalSettings['usecolor'] : $this->TS_VCSC_Lightbox_Setting_Defaults['usecolor']) == 1 ? 'true' : 'false') . ';';\r\n $TS_VCSC_VariablesOutput['Lightbox']['UseColor'] = (((array_key_exists('usecolor', $this->TS_VCSC_LightboxGlobalSettings)) ? $this->TS_VCSC_LightboxGlobalSettings['usecolor'] : $this->TS_VCSC_Lightbox_Setting_Defaults['usecolor']) == 1 ? true : false);\r\n\t\t\t\t\techo 'var $TS_VCSC_Lightbox_Overlay = \"' . \t\t\t\t\t((array_key_exists('overlay', $this->TS_VCSC_LightboxGlobalSettings)) ? $this->TS_VCSC_LightboxGlobalSettings['overlay'] : $this->TS_VCSC_Lightbox_Setting_Defaults['overlay']) . '\";';\r\n $TS_VCSC_VariablesOutput['Lightbox']['Overlay'] = ((array_key_exists('overlay', $this->TS_VCSC_LightboxGlobalSettings)) ? $this->TS_VCSC_LightboxGlobalSettings['overlay'] : $this->TS_VCSC_Lightbox_Setting_Defaults['overlay']);\r\n\t\t\t\t\techo 'var $TS_VCSC_Lightbox_Background = \"' . \t\t\t\t((array_key_exists('background', $this->TS_VCSC_LightboxGlobalSettings)) ? $this->TS_VCSC_LightboxGlobalSettings['background'] : $this->TS_VCSC_Lightbox_Setting_Defaults['background']) . '\";';\r\n $TS_VCSC_VariablesOutput['Lightbox']['Background'] = ((array_key_exists('background', $this->TS_VCSC_LightboxGlobalSettings)) ? $this->TS_VCSC_LightboxGlobalSettings['background'] : $this->TS_VCSC_Lightbox_Setting_Defaults['background']);\r\n\t\t\t\t\techo 'var $TS_VCSC_Lightbox_Repeat = \"' . \t\t\t\t\t((array_key_exists('repeat', $this->TS_VCSC_LightboxGlobalSettings)) ? $this->TS_VCSC_LightboxGlobalSettings['repeat'] : $this->TS_VCSC_Lightbox_Setting_Defaults['repeat']) . '\";';\r\n $TS_VCSC_VariablesOutput['Lightbox']['Repeat'] = ((array_key_exists('repeat', $this->TS_VCSC_LightboxGlobalSettings)) ? $this->TS_VCSC_LightboxGlobalSettings['repeat'] : $this->TS_VCSC_Lightbox_Setting_Defaults['repeat']); \r\n\t\t\t\t\techo 'var $TS_VCSC_Lightbox_Noise = \"' . \t\t\t\t\t((array_key_exists('noise', $this->TS_VCSC_LightboxGlobalSettings)) ? $this->TS_VCSC_LightboxGlobalSettings['noise'] : $this->TS_VCSC_Lightbox_Setting_Defaults['noise']) . '\";';\r\n $TS_VCSC_VariablesOutput['Lightbox']['Noise'] = ((array_key_exists('noise', $this->TS_VCSC_LightboxGlobalSettings)) ? $this->TS_VCSC_LightboxGlobalSettings['noise'] : $this->TS_VCSC_Lightbox_Setting_Defaults['noise']); \r\n\t\t\t\t\techo 'var $TS_VCSC_Lightbox_CORS = ' . \t\t\t\t\t\t(((array_key_exists('cors', $this->TS_VCSC_LightboxGlobalSettings)) ? $this->TS_VCSC_LightboxGlobalSettings['cors'] : $this->TS_VCSC_Lightbox_Setting_Defaults['cors']) == 1 ? 'true' : 'false') . ';';\r\n $TS_VCSC_VariablesOutput['Lightbox']['CORS'] = (((array_key_exists('cors', $this->TS_VCSC_LightboxGlobalSettings)) ? $this->TS_VCSC_LightboxGlobalSettings['cors'] : $this->TS_VCSC_Lightbox_Setting_Defaults['cors']) == 1 ? true : false);\r\n\t\t\t\t\techo 'var $TS_VCSC_Lightbox_Tapping = ' . \t\t\t\t\t(((array_key_exists('tapping', $this->TS_VCSC_LightboxGlobalSettings)) ? $this->TS_VCSC_LightboxGlobalSettings['tapping'] : $this->TS_VCSC_Lightbox_Setting_Defaults['tapping']) == 1 ? 'true' : 'false') . ';';\r\n $TS_VCSC_VariablesOutput['Lightbox']['Tapping'] = (((array_key_exists('tapping', $this->TS_VCSC_LightboxGlobalSettings)) ? $this->TS_VCSC_LightboxGlobalSettings['tapping'] : $this->TS_VCSC_Lightbox_Setting_Defaults['tapping']) == 1 ? true : false);\r\n\t\t\t\t\techo 'var $TS_VCSC_Lightbox_ScrollBlock = \"' . \t\t\t\t((array_key_exists('scrollblock', $this->TS_VCSC_LightboxGlobalSettings)) ? $this->TS_VCSC_LightboxGlobalSettings['scrollblock'] : $this->TS_VCSC_Lightbox_Setting_Defaults['scrollblock']) . '\";';\r\n $TS_VCSC_VariablesOutput['Lightbox']['ScrollBlock'] = ((array_key_exists('scrollblock', $this->TS_VCSC_LightboxGlobalSettings)) ? $this->TS_VCSC_LightboxGlobalSettings['scrollblock'] : $this->TS_VCSC_Lightbox_Setting_Defaults['scrollblock']);\r\n echo 'var $TS_VCSC_Lightbox_Protection = \"' . \t\t\t\t((array_key_exists('protection', $this->TS_VCSC_LightboxGlobalSettings)) ? $this->TS_VCSC_LightboxGlobalSettings['protection'] : $this->TS_VCSC_Lightbox_Setting_Defaults['protection']) . '\";';\r\n $TS_VCSC_VariablesOutput['Lightbox']['Protection'] = ((array_key_exists('protection', $this->TS_VCSC_LightboxGlobalSettings)) ? $this->TS_VCSC_LightboxGlobalSettings['protection'] : $this->TS_VCSC_Lightbox_Setting_Defaults['protection']);\r\n echo 'var $TS_VCSC_Lightbox_HistoryClose = ' .\t\t\t\t(((array_key_exists('historyclose', $this->TS_VCSC_LightboxGlobalSettings)) ? $this->TS_VCSC_LightboxGlobalSettings['historyclose'] : $this->TS_VCSC_Lightbox_Setting_Defaults['historyclose']) == 1 ? 'true' : 'false') . ';';\r\n $TS_VCSC_VariablesOutput['Lightbox']['HistoryClose'] = (((array_key_exists('historyclose', $this->TS_VCSC_LightboxGlobalSettings)) ? $this->TS_VCSC_LightboxGlobalSettings['historyclose'] : $this->TS_VCSC_Lightbox_Setting_Defaults['historyclose']) == 1 ? true : false);\r\n\t\t\t\t\techo 'var $TS_VCSC_Lightbox_CustomScroll = ' .\t\t\t\t(((array_key_exists('customscroll', $this->TS_VCSC_LightboxGlobalSettings)) ? $this->TS_VCSC_LightboxGlobalSettings['customscroll'] : $this->TS_VCSC_Lightbox_Setting_Defaults['customscroll']) == 1 ? 'true' : 'false') . ';';\r\n $TS_VCSC_VariablesOutput['Lightbox']['CustomScroll'] = (((array_key_exists('customscroll', $this->TS_VCSC_LightboxGlobalSettings)) ? $this->TS_VCSC_LightboxGlobalSettings['customscroll'] : $this->TS_VCSC_Lightbox_Setting_Defaults['customscroll']) == 1 ? true : false);\r\n\t\t\t\t\techo 'var $TS_VCSC_Lightbox_HomeURL = \"' . \t\t\t\t\tget_home_url() . '\";';\r\n $TS_VCSC_VariablesOutput['Lightbox']['HomeURL'] = get_home_url();\r\n\t\t\t\t\techo 'var $TS_VCSC_Lightbox_LastScroll = 0;';\r\n $TS_VCSC_VariablesOutput['Lightbox']['LastScroll'] = 0;\r\n\t\t\t\t\techo 'var $TS_VCSC_Lightbox_Showing = false;';\r\n $TS_VCSC_VariablesOutput['Lightbox']['Showing'] = false;\r\n\t\t\t\t\techo 'var $TS_VCSC_Lightbox_PrettyPhoto = ' . \t\t\t\t$this->TS_VCSC_UseLightboxPrettyPhoto . ';';\r\n $TS_VCSC_VariablesOutput['Lightbox']['PrettyPhoto'] = ((($this->TS_VCSC_UseLightboxPrettyPhoto == \"true\") || ($this->TS_VCSC_UseLightboxPrettyPhoto == true)) ? true : false);\r\n\t\t\t\t\techo 'var $TS_VCSC_Lightbox_AttachAllOther = ' .\t\t\t$this->TS_VCSC_UseLightboxAttachAllOther . ';';\r\n $TS_VCSC_VariablesOutput['Lightbox']['AttachAllOther'] = ((($this->TS_VCSC_UseLightboxAttachAllOther == \"true\") || ($this->TS_VCSC_UseLightboxAttachAllOther == true)) ? true : false);\r\n\t\t\t\t} else {\r\n\t\t\t\t\techo 'var $TS_VCSC_Lightbox_Activated = false;';\r\n $TS_VCSC_VariablesOutput['Lightbox']['Activated'] = false;\r\n\t\t\t\t} \r\n\t\t\t\t// Hammer Version Setting\r\n\t\t\t\techo 'var $TS_VCSC_Hammer_ReleaseNew = ' . $this->TS_VCSC_LoadFrontEndHammerNew . ';';\r\n $TS_VCSC_VariablesOutput['Other']['HammerReleaseNew'] = ((($this->TS_VCSC_LoadFrontEndHammerNew == \"true\") || ($this->TS_VCSC_LoadFrontEndHammerNew == true)) ? true : false);\r\n\t\t\t\t// Extended Row Effects (Breakpoint)\r\n\t\t\t\tif (get_option('ts_vcsc_extend_settings_additionsRows', 0) == 1) {\r\n\t\t\t\t\techo 'var $TS_VCSC_RowEffects_Breakpoint = ' . \t\t\t\tget_option('ts_vcsc_extend_settings_additionsRowEffectsBreak', '600') . ';';\r\n $TS_VCSC_VariablesOutput['Other']['RowsBreakPoint'] = (int)get_option('ts_vcsc_extend_settings_additionsRowEffectsBreak', '600');\r\n\t\t\t\t}\r\n // AJAX Callback URL\r\n $TS_VCSC_VariablesOutput['Other']['AjaxURL'] = admin_url('admin-ajax.php'); \r\n // Output Data Holder Object (window.krautcomposium) \r\n //echo 'window.krautcomposium = ' . json_encode($TS_VCSC_VariablesOutput) . ';';\r\n\t\t\techo '</script>';\r\n\t\t}", "function _getJS()\n\t{\n\t\t$js = 'function we_cmd() {\n\t\t\t\t\tvar args = \"\";\n\t\t\t\t\tvar url = \"' . WEBEDITION_DIR . 'we_cmd.php?\"; for(var i = 0; i < arguments.length; i++){ url += \"we_cmd[\"+i+\"]=\"+escape(arguments[i]); if(i < (arguments.length - 1)){ url += \"&\"; }}\n\n\t\t\t\t\tswitch (arguments[0]) {\n \t\t\t\t\tcase \"openDocselector\":\n\t\t\t\t\t\t\tnew jsWindow(url,\"we_docselector\",-1,-1,' . WINDOW_DOCSELECTOR_WIDTH . ',' . WINDOW_DOCSELECTOR_HEIGHT . ',true,true,true,true);\n\t\t\t\t\t\t\tbreak;\n\n \t\t\t\t\tcase \"openDirselector\":\n\t\t\t\t\t\t\tnew jsWindow(url,\"we_dirselector\",-1,-1,' . WINDOW_DIRSELECTOR_WIDTH . ',' . WINDOW_DIRSELECTOR_HEIGHT . ',true,true,true,true);\n\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\tcase \"browse_server\":\n \t\t\t\t\t\t\tnew jsWindow(url,\"browse_server\",-1,-1,800,400,true,false,true);\n\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\tcase \"siteImportCreateWePageSettings\":\n\t\t\t\t\t\t\tnew jsWindow(url,\"siteImportCreateWePageSettings\",-1,-1,520,600,true,false,true);\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tfunction hideTable() {\n\t\t\t\t\tdocument.getElementById(\"specifyParam\").style.display=\"none\";\n\t\t\t\t}\n\n\t\t\t\tfunction displayTable() {\n\t\t\t\t\tif (document.we_form.templateID.value > 0) {\n\t\t\t\t\t\tdocument.getElementById(\"specifyParam\").style.display=\"block\";\n\t\t\t\t\t\tvar iframeObj = document.getElementById(\"iloadframe\");\n\t\t\t\t\t\tiframeObj.src = \"/webEdition/we_cmd.php?we_cmd[0]=updateSiteImportTable&tid=\"+document.we_form.templateID.value;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t' . \"\\n\";\n\t\t\n\t\t$js = we_htmlElement::jsElement($js) . \"\\n\";\n\t\t$js .= we_htmlElement::jsElement(\"\", array(\n\t\t\t\"src\" => JS_DIR . \"windows.js\"\n\t\t)) . \"\\n\";\n\t\t$js .= we_htmlElement::jsElement(\n\t\t\t\t\"\\n\" . 'function doUnload() {\n\t\t\t\t\tif (jsWindow_count) {\n\t\t\t\t\t\tfor (i = 0; i < jsWindow_count; i++) {\n\t\t\t\t\t\t\teval(\"jsWindow\" + i + \"Object.close()\");\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}' . \"\\n\");\n\t\treturn $js;\n\t}", "function simplesamlphp_get_languages() {\n return array(\n 'no' => 'Bokmål', // Norwegian Bokmål\n 'nn' => 'Nynorsk', // Norwegian Nynorsk\n 'se' => 'Sámegiella', // Northern Sami\n 'sam' => 'Åarjelh-saemien giele', // Southern Sami\n 'da' => 'Dansk', // Danish\n 'en' => 'English',\n 'de' => 'Deutsch', // German\n 'sv' => 'Svenska', // Swedish\n 'fi' => 'Suomeksi', // Finnish\n 'es' => 'Español', // Spanish\n 'fr' => 'Français', // French\n 'it' => 'Italiano', // Italian\n 'nl' => 'Nederlands', // Dutch\n 'lb' => 'Lëtzebuergesch', // Luxembourgish\n 'cs' => 'Čeština', // Czech\n 'sl' => 'Slovenščina', // Slovensk\n 'lt' => 'Lietuvių kalba', // Lithuanian\n 'hr' => 'Hrvatski', // Croatian\n 'hu' => 'Magyar', // Hungarian\n 'pl' => 'Język polski', // Polish\n 'pt' => 'Português', // Portuguese\n 'pt-br' => 'Português brasileiro', // Portuguese\n 'ru' => 'русский язык', // Russian\n 'et' => 'eesti keel', // Estonian\n 'tr' => 'Türkçe', // Turkish\n 'el' => 'ελληνικά', // Greek\n 'ja' => '日本語', // Japanese\n 'zh' => '简体中文', // Chinese (simplified)\n 'zh-tw' => '繁體中文', // Chinese (traditional)\n 'ar' => 'العربية', // Arabic\n 'fa' => 'پارسی', // Persian\n 'ur' => 'اردو', // Urdu\n 'he' => 'עִבְרִית', // Hebrew\n 'id' => 'Bahasa Indonesia', // Indonesian\n 'sr' => 'Srpski', // Serbian\n 'lv' => 'Latviešu', // Latvian\n 'ro' => 'Românește', // Romanian\n 'eu' => 'Euskara', // Basque\n );\n}", "function HTX_load_standard_backend() {\n // Ajax and icons\n echo '<script src=\"https://ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js\"></script>';\n echo '<link href=\"https://fonts.googleapis.com/css?family=Material+Icons|Material+Icons+Outlined|Material+Icons+Two+Tone|Material+Icons+Round|Material+Icons+Sharp\" rel=\"stylesheet\">';\n\n // Style\n wp_enqueue_style( 'standard_stylesheet', \"/wp-content/plugins/wp-htxlan/code/CSS/style.css\");\n\n // Script\n wp_enqueue_script( 'table_script', \"/wp-content/plugins/wp-htxlan/code/JS/table.js\");\n wp_enqueue_script( 'cookie', \"/wp-content/plugins/wp-htxlan/code/JS/cookie.js\");\n\n // Alert window\n HTX_information_alert_backend();\n }", "function loadJS() {\n\t\t$first = true;\n\t\t$jsPart = '';\n\t\tforeach( $this->conf->js->file as $file ) {\n\t\t\tif( ! $first ) {\n\t\t\t\t$jsPart .= chr( 9 );\n\t\t\t}\n\t\t\t$jsPart .= '<script type=\"text/javascript\" src=\"';\n\t\t\t$jsPart .= $this->conf->path->baseUrl . $this->conf->path->js . $file;\n\t\t\t$jsPart .= '\"></script>' . chr( 10 );\n\t\t\t$first = false;\n\t\t}\n\t\t\n\t\tif( count( $this->additionalJS ) >= 1 ) {\n\t\t\tforeach( $this->additionalJS as $key => $value ) {\n\t\t\t\t$jsPart .= '<script type=\"text/javascript\">' . chr( 10 );\n\t\t\t\t$jsPart .= $value . chr( 10 );\n\t\t\t\t$jsPart .= '</script>' . chr( 10 );\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn $jsPart;\n\t}", "public function load_lang() {\n /** Set our unique textdomain string */\n $textdomain = 'ninja-forms';\n\n /** The 'plugin_locale' filter is also used by default in load_plugin_textdomain() */\n $locale = apply_filters( 'plugin_locale', get_locale(), $textdomain );\n\n /** Set filter for WordPress languages directory */\n $wp_lang_dir = apply_filters(\n 'ninja_forms_wp_lang_dir',\n WP_LANG_DIR . '/ninja-forms/' . $textdomain . '-' . $locale . '.mo'\n );\n\n /** Translations: First, look in WordPress' \"languages\" folder = custom & update-secure! */\n load_textdomain( $textdomain, $wp_lang_dir );\n\n /** Translations: Secondly, look in plugin's \"lang\" folder = default */\n $plugin_dir = trailingslashit( basename( dirname( dirname( __FILE__ ) ) ) ) . basename( dirname( __FILE__ ) );\n $lang_dir = apply_filters( 'ninja_forms_lang_dir', $plugin_dir . '/lang/' );\n load_plugin_textdomain( $textdomain, FALSE, $lang_dir );\n }", "function getPNlanguage()\n{\n\tpnBlockLoad('Core', 'thelang');\n// All entries use ISO 639-2/T\n\t$lang['ara'] = \"Arabic\";\n\t$lang['alb'] = \"Albanian\"; \n\t$lang['bul'] = \"Bulgarian\";\n\t$lang['zho'] = \"Chinese\";\n\t$lang['cat'] = \"Catalan\";\n\t$lang['ces'] = \"Czech\";\n\t$lang['hrv'] = \"Croatian HRV\";\n\t$lang['cro'] = \"Croatian CRO\";\n\t$lang['dan'] = \"Danish\";\n\t$lang['nld'] = \"Dutch\";\n\t$lang['eng'] = \"English\";\n\t$lang['epo'] = \"Esperanto\";\n\t$lang['est'] = \"Estonian\";\n\t$lang['fin'] = \"Finnish\";\n\t$lang['fra'] = \"French\";\n\t$lang['deu'] = \"German\";\n\t$lang['ell'] = \"Greek\";\n\t$lang['heb'] = \"Hebrew\";\n\t$lang['hun'] = \"Hungarian\";\n\t$lang['isl'] = \"Icelandic\";\n\t$lang['ind'] = \"Indonesian\";\n\t$lang['ita'] = \"Italian\";\n\t$lang['jpn'] = \"Japanese\";\n\t$lang['kor'] = \"Korean\";\n\t$lang['lav'] = \"Latvian\";\n\t$lang['lit'] = \"Lithuanian\";\n\t$lang['mas'] = \"Malay\";\n\t$lang['mkd'] = \"Macedonian\";\n\t$lang['nor'] = \"Norwegian\";\n\t$lang['pol'] = \"Polish\";\n\t$lang['por'] = \"Portuguese\";\n\t$lang['ron'] = \"Romanian\";\n\t$lang['rus'] = \"Russian\";\n\t$lang['slv'] = \"Slovenian\";\n\t$lang['spa'] = \"Spanish\";\n\t$lang['swe'] = \"Swedish\";\n\t$lang['tha'] = \"Thai\";\n\t$lang['tur'] = \"Turkish\";\n\t$lang['ukr'] = \"Ukrainian\";\n\t$lang['yid'] = \"Yiddish\";\n\n\treturn strtolower($lang[pnSessionGetVar('lang')]);\n}", "function languagelist()\n{\n\t // Need to ensure this is loaded for language defines\n\tpnBlockLoad('Core', 'thelang');\n\t// All entries use ISO 639-2/T\n\t// hilope - added all 469 languages available under ISO 639-2\n\t\n\t$lang['aar'] = _LANGUAGE_AAR; // Afar\n\t$lang['abk'] = _LANGUAGE_ABK; // Abkhazian\n\t$lang['ace'] = _LANGUAGE_ACE; // Achinese\n\t$lang['ach'] = _LANGUAGE_ACH; // Acoli\n\t$lang['ada'] = _LANGUAGE_ADA; // Adangme\n\t$lang['ady'] = _LANGUAGE_ADY; // Adyghe; Adygei\n\t$lang['afa'] = _LANGUAGE_AFA; // Afro-Asiatic (Other)\n\t$lang['afh'] = _LANGUAGE_AFH; // Afrihili\n\t$lang['afr'] = _LANGUAGE_AFR; // Afrikaans\n\t$lang['aka'] = _LANGUAGE_AKA; // Akan\n\t$lang['akk'] = _LANGUAGE_AKK; // Akkadian\n\t$lang['ale'] = _LANGUAGE_ALE; // Aleut\n\t$lang['alg'] = _LANGUAGE_ALG; // Algonquian languages\n\t$lang['amh'] = _LANGUAGE_AMH; // Amharic\n\t$lang['ang'] = _LANGUAGE_ANG; // English, Old\n\t$lang['apa'] = _LANGUAGE_APA; // Apache languages\n\t$lang['ara'] = _LANGUAGE_ARA; // Arabic\n\t$lang['arc'] = _LANGUAGE_ARC; // Aramaic\n\t$lang['arg'] = _LANGUAGE_ARG; // Aragonese\n\t$lang['arn'] = _LANGUAGE_ARN; // Araucanian\n\t$lang['arp'] = _LANGUAGE_ARP; // Arapaho\n\t$lang['art'] = _LANGUAGE_ART; // Artificial (Other)\n\t$lang['arw'] = _LANGUAGE_ARW; // Arawak\n\t$lang['asm'] = _LANGUAGE_ASM; // Assamese\n\t$lang['ast'] = _LANGUAGE_AST; // Asturian; Bable\n\t$lang['ath'] = _LANGUAGE_ATH; // Athapascan languages\n\t$lang['aus'] = _LANGUAGE_AUS; // Australian languages\n\t$lang['ava'] = _LANGUAGE_AVA; // Avaric\n\t$lang['ave'] = _LANGUAGE_AVE; // Avestan\n\t$lang['awa'] = _LANGUAGE_AWA; // Awadhi\n\t$lang['aym'] = _LANGUAGE_AYM; // Aymara\n\t$lang['aze'] = _LANGUAGE_AZE; // Azerbaijani\n\t$lang['bad'] = _LANGUAGE_BAD; // Banda\n\t$lang['bai'] = _LANGUAGE_BAI; // Bamileke languages\n\t$lang['bak'] = _LANGUAGE_BAK; // Bashkir\n\t$lang['bal'] = _LANGUAGE_BAL; // Baluchi\n\t$lang['bam'] = _LANGUAGE_BAM; // Bambara\n\t$lang['ban'] = _LANGUAGE_BAN; // Balinese\n\t$lang['bas'] = _LANGUAGE_BAS; // Basa\n\t$lang['bat'] = _LANGUAGE_BAT; // Baltic (Other)\n\t$lang['bej'] = _LANGUAGE_BEJ; // Beja\n\t$lang['bel'] = _LANGUAGE_BEL; // Belarusian\n\t$lang['bem'] = _LANGUAGE_BEM; // Bemba\n\t$lang['ben'] = _LANGUAGE_BEN; // Bengali\n\t$lang['ber'] = _LANGUAGE_BER; // Berber (Other)\n\t$lang['bho'] = _LANGUAGE_BHO; // Bhojpuri\n\t$lang['bih'] = _LANGUAGE_BIH; // Bihari\n\t$lang['bik'] = _LANGUAGE_BIK; // Bikol\n\t$lang['bin'] = _LANGUAGE_BIN; // Bini\n\t$lang['bis'] = _LANGUAGE_BIS; // Bislama\n\t$lang['bla'] = _LANGUAGE_BLA; // Siksika\n\t$lang['bnt'] = _LANGUAGE_BNT; // Bantu (Other)\n\t$lang['bod'] = _LANGUAGE_BOD; // Tibetan\n\t$lang['bos'] = _LANGUAGE_BOS; // Bosnian\n\t$lang['bra'] = _LANGUAGE_BRA; // Braj\n\t$lang['bre'] = _LANGUAGE_BRE; // Breton\n\t$lang['btk'] = _LANGUAGE_BTK; // Batak (Indonesia)\n\t$lang['bua'] = _LANGUAGE_BUA; // Buriat\n\t$lang['bug'] = _LANGUAGE_BUG; // Buginese\n\t$lang['bul'] = _LANGUAGE_BUL; // Bulgarian\n\t$lang['byn'] = _LANGUAGE_BYN; // Blin; Bilin\n\t$lang['cad'] = _LANGUAGE_CAD; // Caddo\n\t$lang['cai'] = _LANGUAGE_CAI; // Central American Indian (Other)\n\t$lang['car'] = _LANGUAGE_CAR; // Carib\n\t$lang['cat'] = _LANGUAGE_CAT; // Catalan; Valencian\n\t$lang['cau'] = _LANGUAGE_CAU; // Caucasian (Other)\n\t$lang['ceb'] = _LANGUAGE_CEB; // Cebuano\n\t$lang['cel'] = _LANGUAGE_CEL; // Celtic (Other)\n\t$lang['ces'] = _LANGUAGE_CES; // Czech\n\t$lang['cha'] = _LANGUAGE_CHA; // Chamorro\n\t$lang['chb'] = _LANGUAGE_CHB; // Chibcha\n\t$lang['che'] = _LANGUAGE_CHE; // Chechen\n\t$lang['chg'] = _LANGUAGE_CHG; // Chagatai\n\t$lang['chk'] = _LANGUAGE_CHK; // Chuukese\n\t$lang['chm'] = _LANGUAGE_CHM; // Mari\n\t$lang['chn'] = _LANGUAGE_CHN; // Chinook jargon\n\t$lang['cho'] = _LANGUAGE_CHO; // Choctaw\n\t$lang['chp'] = _LANGUAGE_CHP; // Chipewyan\n\t$lang['chr'] = _LANGUAGE_CHR; // Cherokee\n\t$lang['chu'] = _LANGUAGE_CHU; // Church Slavic; Old Slavonic; Church Slavonic; Old Bulgarian; Old Church Slavonic\n\t$lang['chv'] = _LANGUAGE_CHV; // Chuvash\n\t$lang['chy'] = _LANGUAGE_CHY; // Cheyenne\n\t$lang['cmc'] = _LANGUAGE_CMC; // Chamic languages\n\t$lang['cop'] = _LANGUAGE_COP; // Coptic\n\t$lang['cor'] = _LANGUAGE_COR; // Cornish\n\t$lang['cos'] = _LANGUAGE_COS; // Corsican\n\t$lang['cpe'] = _LANGUAGE_CPE; // Creoles and pidgins, English based (Other)\n\t$lang['cpf'] = _LANGUAGE_CPF; // Creoles and pidgins, French-based (Other)\n\t$lang['cpp'] = _LANGUAGE_CPP; // Creoles and pidgins,\n\t$lang['cre'] = _LANGUAGE_CRE; // Cree\n\t$lang['crh'] = _LANGUAGE_CRH; // Crimean Tatar; Crimean Turkish\n\t$lang['crp'] = _LANGUAGE_CRP; // Creoles and pidgins (Other)\n\t$lang['csb'] = _LANGUAGE_CSB; // Kashubian\n\t$lang['cus'] = _LANGUAGE_CUS; // Cushitic (Other)\n\t$lang['cym'] = _LANGUAGE_CYM; // Welsh\n\t$lang['dak'] = _LANGUAGE_DAK; // Dakota\n\t$lang['dan'] = _LANGUAGE_DAN; // Danish\n\t$lang['dar'] = _LANGUAGE_DAR; // Dargwa\n\t$lang['day'] = _LANGUAGE_DAY; // Dayak\n\t$lang['del'] = _LANGUAGE_DEL; // Delaware\n\t$lang['den'] = _LANGUAGE_DEN; // Slave (Athapascan)\n\t$lang['deu'] = _LANGUAGE_DEU; // German\n\t$lang['dgr'] = _LANGUAGE_DGR; // Dogrib\n\t$lang['din'] = _LANGUAGE_DIN; // Dinka\n\t$lang['div'] = _LANGUAGE_DIV; // Divehi\n\t$lang['doi'] = _LANGUAGE_DOI; // Dogri\n\t$lang['dra'] = _LANGUAGE_DRA; // Dravidian (Other)\n\t$lang['dsb'] = _LANGUAGE_DSB; // Lower Sorbian\n\t$lang['dua'] = _LANGUAGE_DUA; // Duala\n\t$lang['dum'] = _LANGUAGE_DUM; // Dutch, Middle\n\t$lang['dyu'] = _LANGUAGE_DYU; // Dyula\n\t$lang['dzo'] = _LANGUAGE_DZO; // Dzongkha\n\t$lang['efi'] = _LANGUAGE_EFI; // Efik\n\t$lang['egy'] = _LANGUAGE_EGY; // Egyptian (Ancient)\n\t$lang['eka'] = _LANGUAGE_EKA; // Ekajuk\n\t$lang['ell'] = _LANGUAGE_ELL; // Greek, Modern\n\t$lang['elx'] = _LANGUAGE_ELX; // Elamite\n\t$lang['eng'] = _LANGUAGE_ENG; // English\n\t$lang['enm'] = _LANGUAGE_ENM; // English, Middle\n\t$lang['epo'] = _LANGUAGE_EPO; // Esperanto\n\t$lang['est'] = _LANGUAGE_EST; // Estonian\n\t$lang['eus'] = _LANGUAGE_EUS; // Basque\n\t$lang['ewe'] = _LANGUAGE_EWE; // Ewe\n\t$lang['ewo'] = _LANGUAGE_EWO; // Ewondo\n\t$lang['fan'] = _LANGUAGE_FAN; // Fang\n\t$lang['fao'] = _LANGUAGE_FAO; // Faroese\n\t$lang['fas'] = _LANGUAGE_FAS; // Persian\n\t$lang['fat'] = _LANGUAGE_FAT; // Fanti\n\t$lang['fij'] = _LANGUAGE_FIJ; // Fijian\n\t$lang['fin'] = _LANGUAGE_FIN; // Finnish\n\t$lang['fiu'] = _LANGUAGE_FIU; // Finno-Ugrian (Other)\n\t$lang['fon'] = _LANGUAGE_FON; // Fon\n\t$lang['fra'] = _LANGUAGE_FRA; // French\n\t$lang['frm'] = _LANGUAGE_FRM; // French, Middle\n\t$lang['fro'] = _LANGUAGE_FRO; // French, Old\n\t$lang['fry'] = _LANGUAGE_FRY; // Frisian\n\t$lang['ful'] = _LANGUAGE_FUL; // Fulah\n\t$lang['fur'] = _LANGUAGE_FUR; // Friulian\n\t$lang['gaa'] = _LANGUAGE_GAA; // Ga\n\t$lang['gay'] = _LANGUAGE_GAY; // Gayo\n\t$lang['gba'] = _LANGUAGE_GBA; // Gbaya\n\t$lang['gem'] = _LANGUAGE_GEM; // Germanic (Other)\n\t$lang['gez'] = _LANGUAGE_GEZ; // Geez\n\t$lang['gil'] = _LANGUAGE_GIL; // Gilbertese\n\t$lang['gla'] = _LANGUAGE_GLA; // Gaelic; Scottish Gaelic\n\t$lang['gle'] = _LANGUAGE_GLE; // Irish\n\t$lang['glg'] = _LANGUAGE_GLG; // Galician\n\t$lang['glv'] = _LANGUAGE_GLV; // Manx\n\t$lang['gmh'] = _LANGUAGE_GMH; // German, Middle High\n\t$lang['goh'] = _LANGUAGE_GOH; // German, Old High\n\t$lang['gon'] = _LANGUAGE_GON; // Gondi\n\t$lang['gor'] = _LANGUAGE_GOR; // Gorontalo\n\t$lang['got'] = _LANGUAGE_GOT; // Gothic\n\t$lang['grb'] = _LANGUAGE_GRB; // Grebo\n\t$lang['grc'] = _LANGUAGE_GRC; // Greek, Ancient\n\t$lang['grn'] = _LANGUAGE_GRN; // Guarani\n\t$lang['guj'] = _LANGUAGE_GUJ; // Gujarati\n\t$lang['gwi'] = _LANGUAGE_GWI; // Gwich´in\n\t$lang['hai'] = _LANGUAGE_HAI; // Haida\n\t$lang['hat'] = _LANGUAGE_HAT; // Haitian; Haitian Creole\n\t$lang['hau'] = _LANGUAGE_HAU; // Hausa\n\t$lang['haw'] = _LANGUAGE_HAW; // Hawaiian\n\t$lang['heb'] = _LANGUAGE_HEB; // Hebrew\n\t$lang['her'] = _LANGUAGE_HER; // Herero\n\t$lang['hil'] = _LANGUAGE_HIL; // Hiligaynon\n\t$lang['him'] = _LANGUAGE_HIM; // Himachali\n\t$lang['hin'] = _LANGUAGE_HIN; // Hindi\n\t$lang['hit'] = _LANGUAGE_HIT; // Hittite\n\t$lang['hmn'] = _LANGUAGE_HMN; // Hmong\n\t$lang['hmo'] = _LANGUAGE_HMO; // Hiri Motu\n\t$lang['hrv'] = _LANGUAGE_HRV; // Croatian\n\t$lang['hsb'] = _LANGUAGE_HSB; // Upper Sorbian\n\t$lang['hun'] = _LANGUAGE_HUN; // Hungarian\n\t$lang['hup'] = _LANGUAGE_HUP; // Hupa\n\t$lang['hye'] = _LANGUAGE_HYE; // Armenian\n\t$lang['iba'] = _LANGUAGE_IBA; // Iban\n\t$lang['ibo'] = _LANGUAGE_IBO; // Igbo\n\t$lang['ido'] = _LANGUAGE_IDO; // Ido\n\t$lang['iii'] = _LANGUAGE_III; // Sichuan Yi\n\t$lang['ijo'] = _LANGUAGE_IJO; // Ijo\n\t$lang['iku'] = _LANGUAGE_IKU; // Inuktitut\n\t$lang['ile'] = _LANGUAGE_ILE; // Interlingue\n\t$lang['ilo'] = _LANGUAGE_ILO; // Iloko\n\t$lang['ina'] = _LANGUAGE_INA; // Interlingua (International Auxiliary Language Association)\n\t$lang['inc'] = _LANGUAGE_INC; // Indic (Other)\n\t$lang['ind'] = _LANGUAGE_IND; // Indonesian\n\t$lang['ine'] = _LANGUAGE_INE; // Indo-European (Other)\n\t$lang['inh'] = _LANGUAGE_INH; // Ingush\n\t$lang['ipk'] = _LANGUAGE_IPK; // Inupiaq\n\t$lang['ira'] = _LANGUAGE_IRA; // Iranian (Other)\n\t$lang['iro'] = _LANGUAGE_IRO; // Iroquoian languages\n\t$lang['isl'] = _LANGUAGE_ISL; // Icelandic\n\t$lang['ita'] = _LANGUAGE_ITA; // Italian\n\t$lang['jav'] = _LANGUAGE_JAV; // Javanese\n\t$lang['jbo'] = _LANGUAGE_JBO; // Lojban\n\t$lang['jpn'] = _LANGUAGE_JPN; // Japanese\n\t$lang['jpr'] = _LANGUAGE_JPR; // Judeo-Persian\n\t$lang['jrb'] = _LANGUAGE_JRB; // Judeo-Arabic\n\t$lang['kaa'] = _LANGUAGE_KAA; // Kara-Kalpak\n\t$lang['kab'] = _LANGUAGE_KAB; // Kabyle\n\t$lang['kac'] = _LANGUAGE_KAC; // Kachin\n\t$lang['kal'] = _LANGUAGE_KAL; // Kalaallisut; Greenlandic\n\t$lang['kam'] = _LANGUAGE_KAM; // Kamba\n\t$lang['kan'] = _LANGUAGE_KAN; // Kannada\n\t$lang['kar'] = _LANGUAGE_KAR; // Karen\n\t$lang['kas'] = _LANGUAGE_KAS; // Kashmiri\n\t$lang['kat'] = _LANGUAGE_KAT; // Georgian\n\t$lang['kau'] = _LANGUAGE_KAU; // Kanuri\n\t$lang['kaw'] = _LANGUAGE_KAW; // Kawi\n\t$lang['kaz'] = _LANGUAGE_KAZ; // Kazakh\n\t$lang['kbd'] = _LANGUAGE_KBD; // Kabardian\n\t$lang['kha'] = _LANGUAGE_KHA; // Khasi\n\t$lang['khi'] = _LANGUAGE_KHI; // Khoisan (Other)\n\t$lang['khm'] = _LANGUAGE_KHM; // Khmer\n\t$lang['kho'] = _LANGUAGE_KHO; // Khotanese\n\t$lang['kik'] = _LANGUAGE_KIK; // Kikuyu; Gikuyu\n\t$lang['kin'] = _LANGUAGE_KIN; // Kinyarwanda\n\t$lang['kir'] = _LANGUAGE_KIR; // Kirghiz\n\t$lang['kmb'] = _LANGUAGE_KMB; // Kimbundu\n\t$lang['kok'] = _LANGUAGE_KOK; // Konkani\n\t$lang['kom'] = _LANGUAGE_KOM; // Komi\n\t$lang['kon'] = _LANGUAGE_KON; // Kongo\n\t$lang['kor'] = _LANGUAGE_KOR; // Korean\n\t$lang['kos'] = _LANGUAGE_KOS; // Kosraean\n\t$lang['kpe'] = _LANGUAGE_KPE; // Kpelle\n\t$lang['krc'] = _LANGUAGE_KRC; // Karachay-Balkar\n\t$lang['kro'] = _LANGUAGE_KRO; // Kru\n\t$lang['kru'] = _LANGUAGE_KRU; // Kurukh\n\t$lang['kua'] = _LANGUAGE_KUA; // Kuanyama; Kwanyama\n\t$lang['kum'] = _LANGUAGE_KUM; // Kumyk\n\t$lang['kur'] = _LANGUAGE_KUR; // Kurdish\n\t$lang['kut'] = _LANGUAGE_KUT; // Kutenai\n\t$lang['lad'] = _LANGUAGE_LAD; // Ladino\n\t$lang['lah'] = _LANGUAGE_LAH; // Lahnda\n\t$lang['lam'] = _LANGUAGE_LAM; // Lamba\n\t$lang['lao'] = _LANGUAGE_LAO; // Lao\n\t$lang['lat'] = _LANGUAGE_LAT; // Latin\n\t$lang['lav'] = _LANGUAGE_LAV; // Latvian\n\t$lang['lez'] = _LANGUAGE_LEZ; // Lezghian\n\t$lang['lim'] = _LANGUAGE_LIM; // Limburgan; Limburger; Limburgish\n\t$lang['lin'] = _LANGUAGE_LIN; // Lingala\n\t$lang['lit'] = _LANGUAGE_LIT; // Lithuanian\n\t$lang['lol'] = _LANGUAGE_LOL; // Mongo\n\t$lang['loz'] = _LANGUAGE_LOZ; // Lozi\n\t$lang['ltz'] = _LANGUAGE_LTZ; // Luxembourgish; Letzeburgesch\n\t$lang['lua'] = _LANGUAGE_LUA; // Luba-Lulua\n\t$lang['lub'] = _LANGUAGE_LUB; // Luba-Katanga\n\t$lang['lug'] = _LANGUAGE_LUG; // Ganda\n\t$lang['lui'] = _LANGUAGE_LUI; // Luiseno\n\t$lang['lun'] = _LANGUAGE_LUN; // Lunda\n\t$lang['luo'] = _LANGUAGE_LUO; // Luo (Kenya and Tanzania)\n\t$lang['lus'] = _LANGUAGE_LUS; // lushai\n\t$lang['mad'] = _LANGUAGE_MAD; // Madurese\n\t$lang['mag'] = _LANGUAGE_MAG; // Magahi\n\t$lang['mah'] = _LANGUAGE_MAH; // Marshallese\n\t$lang['mai'] = _LANGUAGE_MAI; // Maithili\n\t$lang['mak'] = _LANGUAGE_MAK; // Makasar\n\t$lang['mal'] = _LANGUAGE_MAL; // Malayalam\n\t$lang['man'] = _LANGUAGE_MAN; // Mandingo\n\t$lang['map'] = _LANGUAGE_MAP; // Austronesian (Other)\n\t$lang['mar'] = _LANGUAGE_MAR; // Marathi\n\t$lang['mas'] = _LANGUAGE_MAS; // Masai\n\t$lang['mdf'] = _LANGUAGE_MDF; // Moksha\n\t$lang['mdr'] = _LANGUAGE_MDR; // Mandar\n\t$lang['men'] = _LANGUAGE_MEN; // Mende\n\t$lang['mga'] = _LANGUAGE_MGA; // Irish, Middle\n\t$lang['mic'] = _LANGUAGE_MIC; // Micmac\n\t$lang['min'] = _LANGUAGE_MIN; // Minangkabau\n\t$lang['mis'] = _LANGUAGE_MIS; // Miscellaneous languages\n\t$lang['mkd'] = _LANGUAGE_MKD; // Macedonian\n\t$lang['mkh'] = _LANGUAGE_MKH; // Mon-Khmer (Other)\n\t$lang['mlg'] = _LANGUAGE_MLG; // Malagasy\n\t$lang['mlt'] = _LANGUAGE_MLT; // Maltese\n\t$lang['mnc'] = _LANGUAGE_MNC; // Manchu\n\t$lang['mni'] = _LANGUAGE_MNI; // Manipuri\n\t$lang['mno'] = _LANGUAGE_MNO; // Manobo languages\n\t$lang['moh'] = _LANGUAGE_MOH; // Mohawk\n\t$lang['mol'] = _LANGUAGE_MOL; // Moldavian\n\t$lang['mon'] = _LANGUAGE_MON; // Mongolian\n\t$lang['mos'] = _LANGUAGE_MOS; // Mossi\n\t$lang['mri'] = _LANGUAGE_MRI; // Maori\n\t$lang['msa'] = _LANGUAGE_MSA; // Malay\n\t$lang['mul'] = _LANGUAGE_MUL; // Multiple languages\n\t$lang['mun'] = _LANGUAGE_MUN; // Munda languages\n\t$lang['mus'] = _LANGUAGE_MUS; // Creek\n\t$lang['mwr'] = _LANGUAGE_MWR; // Marwari\n\t$lang['mya'] = _LANGUAGE_MYA; // Burmese\n\t$lang['myn'] = _LANGUAGE_MYN; // Mayan languages\n\t$lang['myv'] = _LANGUAGE_MYV; // Erzya\n\t$lang['nah'] = _LANGUAGE_NAH; // Nahuatl\n\t$lang['nai'] = _LANGUAGE_NAI; // North American Indian\n\t$lang['nap'] = _LANGUAGE_NAP; // Neapolitan\n\t$lang['nau'] = _LANGUAGE_NAU; // Nauru\n\t$lang['nav'] = _LANGUAGE_NAV; // Navajo; Navaho\n\t$lang['nbl'] = _LANGUAGE_NBL; // Ndebele, South; South Ndebele\n\t$lang['nde'] = _LANGUAGE_NDE; // Ndebele, North; North Ndebele\n\t$lang['ndo'] = _LANGUAGE_NDO; // Ndonga\n\t$lang['nds'] = _LANGUAGE_NDS; // Low German; Low Saxon; German, Low; Saxon, Low\n\t$lang['nep'] = _LANGUAGE_NEP; // Nepali\n\t$lang['new'] = _LANGUAGE_NEW; // Newari; Nepal Bhasa\n\t$lang['nia'] = _LANGUAGE_NIA; // Nias\n\t$lang['nic'] = _LANGUAGE_NIC; // Niger-Kordofanian (Other)\n\t$lang['niu'] = _LANGUAGE_NIU; // Niuean\n\t$lang['nld'] = _LANGUAGE_NLD; // Dutch; Flemish\n\t$lang['nno'] = _LANGUAGE_NNO; // Norwegian Nynorsk; Nynorsk, Norwegian\n\t$lang['nob'] = _LANGUAGE_NOB; // Norwegian Bokmċl; Bokmċl, Norwegian\n\t$lang['nog'] = _LANGUAGE_NOG; // Nogai\n\t$lang['non'] = _LANGUAGE_NON; // Norse, Old\n\t$lang['nor'] = _LANGUAGE_NOR; // Norwegian\n\t$lang['nso'] = _LANGUAGE_NSO; // Sotho, Northern\n\t$lang['nub'] = _LANGUAGE_NUB; // Nubian languages\n\t$lang['nwc'] = _LANGUAGE_NWC; // Classical Newari; Old Newari; Classical Nepal Bhasa\n\t$lang['nya'] = _LANGUAGE_NYA; // Chichewa; Chewa; Nyanja\n\t$lang['nym'] = _LANGUAGE_NYM; // Nyamwezi\n\t$lang['nyn'] = _LANGUAGE_NYN; // Nyankole\n\t$lang['nyo'] = _LANGUAGE_NYO; // Nyoro\n\t$lang['nzi'] = _LANGUAGE_NZI; // Nzima\n\t$lang['oci'] = _LANGUAGE_OCI; // Occitan; Provençal\n\t$lang['oji'] = _LANGUAGE_OJI; // Ojibwa\n\t$lang['ori'] = _LANGUAGE_ORI; // Oriya\n\t$lang['orm'] = _LANGUAGE_ORM; // Oromo\n\t$lang['osa'] = _LANGUAGE_OSA; // Osage\n\t$lang['oss'] = _LANGUAGE_OSS; // Ossetian; Ossetic\n\t$lang['ota'] = _LANGUAGE_OTA; // Turkish, Ottoman\n\t$lang['oto'] = _LANGUAGE_OTO; // Otomian languages\n\t$lang['paa'] = _LANGUAGE_PAA; // Papuan (Other)\n\t$lang['pag'] = _LANGUAGE_PAG; // Pangasinan\n\t$lang['pal'] = _LANGUAGE_PAL; // Pahlavi\n\t$lang['pam'] = _LANGUAGE_PAM; // Pampanga\n\t$lang['pan'] = _LANGUAGE_PAN; // Panjabi; Punjabi\n\t$lang['pap'] = _LANGUAGE_PAP; // Papiamento\n\t$lang['pau'] = _LANGUAGE_PAU; // Palauan\n\t$lang['peo'] = _LANGUAGE_PEO; // Persian, Old\n\t$lang['phi'] = _LANGUAGE_PHI; // Philippine (Other)\n\t$lang['phn'] = _LANGUAGE_PHN; // Phoenician\n\t$lang['pli'] = _LANGUAGE_PLI; // Pali\n\t$lang['pol'] = _LANGUAGE_POL; // Polish\n\t$lang['pon'] = _LANGUAGE_PON; // Pohnpeian\n\t$lang['por'] = _LANGUAGE_POR; // Portuguese\n\t$lang['pra'] = _LANGUAGE_PRA; // Prakrit languages\n\t$lang['pro'] = _LANGUAGE_PRO; // Provençal, Old\n\t$lang['pus'] = _LANGUAGE_PUS; // Pushto\n\t$lang['qaa-qtz'] = _LANGUAGE_QAA_QTZ; // Reserved for local use\n\t$lang['que'] = _LANGUAGE_QUE; // Quechua\n\t$lang['raj'] = _LANGUAGE_RAJ; // Rajasthani\n\t$lang['rap'] = _LANGUAGE_RAP; // Rapanui\n\t$lang['rar'] = _LANGUAGE_RAR; // Rarotongan\n\t$lang['roa'] = _LANGUAGE_ROA; // Romance (Other)\n\t$lang['roh'] = _LANGUAGE_ROH; // Raeto-Romance\n\t$lang['rom'] = _LANGUAGE_ROM; // Romany\n\t$lang['ron'] = _LANGUAGE_RON; // Romanian\n\t$lang['run'] = _LANGUAGE_RUN; // Rundi\n\t$lang['rus'] = _LANGUAGE_RUS; // Russian\n\t$lang['sad'] = _LANGUAGE_SAD; // Sandawe\n\t$lang['sag'] = _LANGUAGE_SAG; // Sango\n\t$lang['sah'] = _LANGUAGE_SAH; // Yakut\n\t$lang['sai'] = _LANGUAGE_SAI; // South American Indian (Other)\n\t$lang['sal'] = _LANGUAGE_SAL; // Salishan languages\n\t$lang['sam'] = _LANGUAGE_SAM; // Samaritan Aramaic\n\t$lang['san'] = _LANGUAGE_SAN; // Sanskrit\n\t$lang['sas'] = _LANGUAGE_SAS; // Sasak\n\t$lang['sat'] = _LANGUAGE_SAT; // Santali\n\t$lang['sco'] = _LANGUAGE_SCO; // Scots\n\t$lang['scr'] = _LANGUAGE_SCR; // Serbo-Croatian\n\t$lang['sel'] = _LANGUAGE_SEL; // Selkup\n\t$lang['sem'] = _LANGUAGE_SEM; // Semitic (Other)\n\t$lang['sga'] = _LANGUAGE_SGA; // Irish, Old\n\t$lang['sgn'] = _LANGUAGE_SGN; // Sign Languages\n\t$lang['shn'] = _LANGUAGE_SHN; // Shan\n\t$lang['sid'] = _LANGUAGE_SID; // Sidamo\n\t$lang['sin'] = _LANGUAGE_SIN; // Sinhalese\n\t$lang['sio'] = _LANGUAGE_SIO; // Siouan languages\n\t$lang['sit'] = _LANGUAGE_SIT; // Sino-Tibetan (Other)\n\t$lang['sla'] = _LANGUAGE_SLA; // Slavic (Other)\n\t$lang['slk'] = _LANGUAGE_SLK; // Slovak\n\t$lang['slv'] = _LANGUAGE_SLV; // Slovenian\n\t$lang['sma'] = _LANGUAGE_SMA; // Southern Sami\n\t$lang['sme'] = _LANGUAGE_SME; // Northern Sami\n\t$lang['smi'] = _LANGUAGE_SMI; // Sami languages (Other)\n\t$lang['smj'] = _LANGUAGE_SMJ; // Lule Sami\n\t$lang['smn'] = _LANGUAGE_SMN; // Inari Sami\n\t$lang['smo'] = _LANGUAGE_SMO; // Samoan\n\t$lang['sms'] = _LANGUAGE_SMS; // Skolt Sami\n\t$lang['sna'] = _LANGUAGE_SNA; // Shona\n\t$lang['snd'] = _LANGUAGE_SND; // Sindhi\n\t$lang['snk'] = _LANGUAGE_SNK; // Soninke\n\t$lang['sog'] = _LANGUAGE_SOG; // Sogdian\n\t$lang['som'] = _LANGUAGE_SOM; // Somali\n\t$lang['son'] = _LANGUAGE_SON; // Songhai\n\t$lang['sot'] = _LANGUAGE_SOT; // Sotho, Southern\n\t$lang['spa'] = _LANGUAGE_SPA; // Spanish; Castilian\n\t$lang['sqi'] = _LANGUAGE_SQI; // Albanian\n\t$lang['srd'] = _LANGUAGE_SRD; // Sardinian\n\t$lang['srp'] = _LANGUAGE_SRP; // Serbian\n\t$lang['srr'] = _LANGUAGE_SRR; // Serer\n\t$lang['ssa'] = _LANGUAGE_SSA; // Nilo-Saharan (Other)\n\t$lang['ssw'] = _LANGUAGE_SSW; // Swati\n\t$lang['suk'] = _LANGUAGE_SUK; // Sukuma\n\t$lang['sun'] = _LANGUAGE_SUN; // Sundanese\n\t$lang['sus'] = _LANGUAGE_SUS; // Susu\n\t$lang['sux'] = _LANGUAGE_SUX; // Sumerian\n\t$lang['swa'] = _LANGUAGE_SWA; // Swahili\n\t$lang['swe'] = _LANGUAGE_SWE; // Swedish\n\t$lang['syr'] = _LANGUAGE_SYR; // Syriac\n\t$lang['tah'] = _LANGUAGE_TAH; // Tahitian\n\t$lang['tai'] = _LANGUAGE_TAI; // Tai (Other)\n\t$lang['tam'] = _LANGUAGE_TAM; // Tamil\n\t$lang['tat'] = _LANGUAGE_TAT; // Tatar\n\t$lang['tel'] = _LANGUAGE_TEL; // Telugu\n\t$lang['tem'] = _LANGUAGE_TEM; // Timne\n\t$lang['ter'] = _LANGUAGE_TER; // Tereno\n\t$lang['tet'] = _LANGUAGE_TET; // Tetum\n\t$lang['tgk'] = _LANGUAGE_TGK; // Tajik\n\t$lang['tgl'] = _LANGUAGE_TGL; // Tagalog\n\t$lang['tha'] = _LANGUAGE_THA; // Thai\n\t$lang['tig'] = _LANGUAGE_TIG; // Tigre\n\t$lang['tir'] = _LANGUAGE_TIR; // Tigrinya\n\t$lang['tiv'] = _LANGUAGE_TIV; // Tiv\n\t$lang['tkl'] = _LANGUAGE_TKL; // Tokelau\n\t$lang['tlh'] = _LANGUAGE_TLH; // Klingon; tlhlngan-Hol\n\t$lang['tli'] = _LANGUAGE_TLI; // Tlingit\n\t$lang['tmh'] = _LANGUAGE_TMH; // Tamashek\n\t$lang['tog'] = _LANGUAGE_TOG; // Tonga (Nyasa)\n\t$lang['ton'] = _LANGUAGE_TON; // Tonga (Tonga Islands)\n\t$lang['tpi'] = _LANGUAGE_TPI; // Tok Pisin\n\t$lang['tsi'] = _LANGUAGE_TSI; // Tsimshian\n\t$lang['tsn'] = _LANGUAGE_TSN; // Tswana\n\t$lang['tso'] = _LANGUAGE_TSO; // Tsonga\n\t$lang['tuk'] = _LANGUAGE_TUK; // Turkmen\n\t$lang['tum'] = _LANGUAGE_TUM; // Tumbuka\n\t$lang['tup'] = _LANGUAGE_TUP; // Tupi languages\n\t$lang['tur'] = _LANGUAGE_TUR; // Turkish\n\t$lang['tut'] = _LANGUAGE_TUT; // Altaic (Other)\n\t$lang['tvl'] = _LANGUAGE_TVL; // Tuvalu\n\t$lang['twi'] = _LANGUAGE_TWI; // Twi\n\t$lang['tyv'] = _LANGUAGE_TYV; // Tuvinian\n\t$lang['udm'] = _LANGUAGE_UDM; // Udmurt\n\t$lang['uga'] = _LANGUAGE_UGA; // Ugaritic\n\t$lang['uig'] = _LANGUAGE_UIG; // Uighur\n\t$lang['ukr'] = _LANGUAGE_UKR; // Ukrainian\n\t$lang['umb'] = _LANGUAGE_UMB; // Umbundu\n\t$lang['und'] = _LANGUAGE_UND; // Undetermined\n\t$lang['urd'] = _LANGUAGE_URD; // Urdu\n\t$lang['uzb'] = _LANGUAGE_UZB; // Uzbek\n\t$lang['vai'] = _LANGUAGE_VAI; // Vai\n\t$lang['ven'] = _LANGUAGE_VEN; // Venda\n\t$lang['vie'] = _LANGUAGE_VIE; // Vietnamese\n\t$lang['vol'] = _LANGUAGE_VOL; // Volapük\n\t$lang['vot'] = _LANGUAGE_VOT; // Votic\n\t$lang['wak'] = _LANGUAGE_WAK; // Wakashan languages\n\t$lang['wal'] = _LANGUAGE_WAL; // Walamo\n\t$lang['war'] = _LANGUAGE_WAR; // Waray\n\t$lang['was'] = _LANGUAGE_WAS; // Washo\n\t$lang['wen'] = _LANGUAGE_WEN; // Sorbian languages\n\t$lang['wln'] = _LANGUAGE_WLN; // Walloon\n\t$lang['wol'] = _LANGUAGE_WOL; // Wolof\n\t$lang['xal'] = _LANGUAGE_XAL; // Kalmyk\n\t$lang['xho'] = _LANGUAGE_XHO; // Xhosa\n\t$lang['yao'] = _LANGUAGE_YAO; // Yao\n\t$lang['yap'] = _LANGUAGE_YAP; // Yapese\n\t$lang['yid'] = _LANGUAGE_YID; // Yiddish\n\t$lang['yor'] = _LANGUAGE_YOR; // Yoruba\n\t$lang['ypk'] = _LANGUAGE_YPK; // Yupik languages\n\t$lang['zap'] = _LANGUAGE_ZAP; // Zapotec\n\t$lang['zen'] = _LANGUAGE_ZEN; // Zenaga\n\t$lang['zha'] = _LANGUAGE_ZHA; // Zhuang; Chuang\n\t$lang['zho'] = _LANGUAGE_ZHO; // Chinese\n\t$lang['znd'] = _LANGUAGE_ZND; // Zande\n\t$lang['zul'] = _LANGUAGE_ZUL; // Zulu\n\t$lang['zun'] = _LANGUAGE_ZUN; // Zuni\n\t// Non-ISO entries are written as x_[language name]\n\t$lang['x_all'] = _ALL; // all languages\n\t$lang['x_brazilian_portuguese'] = _LANGUAGE_X_BRAZILIAN_PORTUGUESE; // Brazilian Portuguese\n\t$lang['x_rus_koi8r'] = _LANGUAGE_X_RUS_KOI8R; // Russian KOI8-R\n\t// end of list\n\treturn $lang;\n}", "public function get_desired_languages();", "function getJavascriptConfig()\n\t{\n\t\t$html = \"\\t<script type=\\\"text/javascript\\\">\\n\";\n\t\t$html .= \"var xajaxRequestUri=\\\"\".$this->sRequestURI.\"\\\";\\n\";\n\t\t$html .= \"var xajaxDebug=\".($this->bDebug?\"true\":\"false\").\";\\n\";\n\t\t$html .= \"var xajaxStatusMessages=\".($this->bStatusMessages?\"true\":\"false\").\";\\n\";\n\t\t$html .= \"var xajaxWaitCursor=\".($this->bWaitCursor?\"true\":\"false\").\";\\n\";\n\t\t$html .= \"var xajaxDefinedGet=\".XAJAX_GET.\";\\n\";\n\t\t$html .= \"var xajaxDefinedPost=\".XAJAX_POST.\";\\n\";\n\t\t$html .= \"var xajaxLoaded=false;\\n\";\n\n\t\tforeach($this->aFunctions as $sFunction => $bExists) {\n\t\t\t$html .= $this->_wrap($sFunction,$this->aFunctionRequestTypes[$sFunction]);\n\t\t}\n\n\t\t$html .= \"\\t</script>\\n\";\n\t\treturn $html;\n\t}", "function languageDetect()\n {\n global $iConfig;\n\n $langs = array();\n\n if (isset($_SERVER['HTTP_ACCEPT_LANGUAGE']))\n {\n\n preg_match_all('/([a-z]{1,8}(-[a-z]{1,8})?)\\s*(;\\s*q\\s*=\\s*(1|0\\.[0-9]+))?/', $_SERVER['HTTP_ACCEPT_LANGUAGE'], $lang_parse); // break up string into pieces (languages and q factors)\n\n if (count($lang_parse[1]))\n {\n// $langs = array_combine($lang_parse[1], $lang_parse[4]); // create a list like \"en\" => 0.8 // PHP5 only\n foreach ($lang_parse[1] as $k => $v) $langs[$v] = $lang_parse[4][$k]; // replace \"array_combine\" for PHP4\n\n foreach ($langs as $lang => $val) {\n if ($val === '') $langs[$lang] = 1; // set default to 1 for any without q factor\n }\n arsort($langs, SORT_NUMERIC); // sort list based on value\n }\n }\n\n foreach ($langs as $lang => $val)\n {\n $lang_2s = substr($lang, 0,2);\n $path = sprintf('language/%s_lang.php', $lang_2s);\n if (file_exists($path)) return $lang_2s;\n }\n\n return $iConfig['default_lng'];\n }", "private function _detectLanguage() {\n if (isset($_GET['language']) && is_file('lang/'. $_GET['language'] .'.lang.php'))\n return $_GET['language'];\n\n $session = PHPSession::getInstance();\n\n if (isset($session['language']))\n return $session['language'];\n\n return $this->_getWebBrowserLanguage();\n }", "static function getLangVars()\n\t{\n\t\treturn array(\"pc_mob\");\n\t}", "private function _loadLang()\n {\n $_langJs = sprintf(\"CakepressEditor./vendor/summernote/lang/summernote-%s.js\", $this->config('lang'));\n if (!in_array($_langJs, (array)$this->_scripts)) {\n $this->_scripts[] = $_langJs;\n }\n }", "public function system_language_auto(){\n\t\t// Get my current\n\t\t\t$tld = $this->zajlib->tld;\n\t\t\t$subdomain = $this->zajlib->subdomain;\n\t\t\tunset($_GET['locale']);\n\t\t\tunset($_GET['disable_locale_cookie']);\n\t\t\tunset($_COOKIE['ofw_locale']);\n\t\t// No setting means that default is set\n\t\t\t$this->zajlib->tld = 'com';\n\t\t\t$this->zajlib->subdomain = 'www';\n\t\t\t$setting = $this->zajlib->lang->auto();\n\t\t\tzajTestAssert::areIdentical($this->zajlib->lang->get_default_locale(), $setting);\n\t\t// Set my tld (should be stronger than query string)\n\t\t\t$this->zajlib->tld = 'hu';\n\t\t\t$setting = $this->zajlib->lang->auto();\n\t\t\tzajTestAssert::areIdentical('hu_HU', $setting);\n\t\t// Set my subdomain (should be stronger than tld)\n\t\t\t$this->zajlib->subdomain = 'en';\n\t\t\t$setting = $this->zajlib->lang->auto();\n\t\t\tzajTestAssert::areIdentical('en_US', $setting);\n\t\t// Set my query string (should be strong than tld or subdomain)\n\t\t\t$_GET['locale'] = 'fr_FR';\n\t\t\t$setting = $this->zajlib->lang->auto();\n\t\t\tzajTestAssert::areIdentical('fr_FR', $setting);\n\t\t// Reset tld and subdomain and other cleanup\n\t\t\t$this->zajlib->subdomain = $subdomain;\n\t\t\t$this->zajlib->tld = $tld;\n\t}", "public function getLang()\n {\n \t$lang_path = 'lang/';\n if(isset($_GET['lang']))\n {\n Yii::app()->session[\"lang\"] = $_GET['lang']; \n }\n \n if(!file_exists($lang_path.Yii::app()->session[\"lang\"].'.ini'))\n {\n\t\t\tYii::app()->session[\"lang\"] = 'sr';\n }\n\t\t\n\t\t$this->langArray= parse_ini_file($lang_path.Yii::app()->session[\"lang\"].'.ini'); \n }", "function loadMultiLingualText($language) {\n $this->Stelle->language=$language;\n $this->Stelle->getName();\n include(LAYOUTPATH.'languages/'.$this->user->rolle->language.'.php');\n }", "function addHeadJavascriptVars() {\n\t\t$page = end(explode('/', parse_url($_SERVER[\"REQUEST_URI\"], PHP_URL_PATH)));\n\t\techo '<script type=\"text/javascript\">'.\"\\n\";\n\t\techo 'var lepress_teacher_awaiting_url = \"'.add_query_arg(array('lepress-teacher-awaiting' => 1), get_bloginfo('siteurl')).'\";'.\"\\n\";\n\t\t$lang_vars = array('one_item' => __('item'),\n\t\t\t\t\t\t\t'two_item' => __('items'),\n\t\t\t\t\t\t\t'date_greater' => __(\"Assignment ending date must be greater than start date\", lepress_textdomain));\n\t\t$role = 'no-filtering';\n\t\tif(($page == 'edit.php' && get_query_var('post_type') == 'post') || ($page == \"edit-tags.php\" && $_GET['taxonomy'] == 'category') || $page == \"edit-comments.php\") {\n\t\t\t$role = current_user_can('manage-lepress') && !is_super_admin() ? 'lepress-teacher' : 'super-admin';\n\t\t}\n\t\t$lepress_env = array('role' => $role);\n\t\techo 'var lepress_env = '.json_encode($lepress_env).';'.\"\\n\";\n\t\techo 'var lepress_lang_vars = '.json_encode($lang_vars).';'.\"\\n\";\n\t\techo '</script>'.\"\\n\";\n\t\t//IF role lepress-teacher, override span css classes\n\t\tif($role != 'no-filtering' && !is_super_admin()) {\n\t\t\techo '<style type=\"text/css\">'.\"\\n\";\n\t\t\techo 'span.displaying-num, span.count { display:none; }';\n\t\t\techo '</style>';\n\t\t}\n\t}", "function sumac_load_new_strings()\n{\n//*** new file system for user override strings was not adopted - old system used for new packages\n\n//this creates a javascript user-override list for the new generation packages' text strings\n\tif (isset($_SESSION['sumac_override_text_js']) === false)\n\t{\n\t\t$error_level = error_reporting();\n\t\t$new_level = error_reporting($error_level ^ E_WARNING);\n\t\t$strings = file_get_contents(SUMAC_USER_FOLDER . '/' . 'over_sumac.strings',true);\n\t\t$error_level = error_reporting($error_level);\n\n\t\tif (trim($strings) == '') return '';\n\t\t$stringArray = explode('|',$strings);\n\t\t$_SESSION['sumac_override_text_js'] = 'var sumac_override_sids = [';\n//that starts the javascript array variable ...\n\t\tfor ($i = 0; $i < (count($stringArray)+1); $i = $i + 3)\n\t\t{\n\t\t\t$said = trim($stringArray[$i]);\n\t\t\t//ignore the middle element on each line\n\t\t\tif (($i+2) < count($stringArray)) $sastr = $stringArray[$i+2]; else $sastr = '';\n\t\t\tif ($said == '') continue;\n\t\t\tif ($sastr == '') continue;\n\t\t\t$_SESSION['sumac_override_text_js'] .= '{id:\"'.$said.'\",str:\"'.$sastr.'\"},';\n// ... and that adds each replacement id+str set to it ...\n\t\t}\n\t\t$_SESSION['sumac_override_text_js'] .= '];';\n// ... and that closes the array off.\n\t}\n}", "function plg_gustData() {\r\n\r\n //ip\r\n /* $retuenDat = gethostbyname($_SERVER['SERVER_NAME']);\r\n\r\n $browser = get_browser(null, true);\r\n\r\n //$browser\r\n $browser[browser]\r\n //$browser version\r\n $browser[version]\r\n\r\n\r\n\r\n\r\n //os\r\n $browser[platform]\r\n\r\n\r\n\r\n\r\n print_r($browser);*/\r\n}", "function signup_get_available_languages()\n {\n }", "public static function js();", "function _load_languages()\r\n\t{\r\n\t\t// Load the form validation language file\r\n\t\t$this->lang->load('form_validation');\r\n\r\n\t\t// Load the DataMapper language file\r\n\t\t$this->lang->load('datamapper');\r\n\t}", "function atto_media_strings_for_js() {\n global $PAGE;\n\n $PAGE->requires->strings_for_js(array('add',\n 'addcaptionstrack',\n 'addchapterstrack',\n 'adddescriptionstrack',\n 'addmetadatatrack',\n 'addsource',\n 'addsubtitlestrack',\n 'addtrack',\n 'advancedsettings',\n 'audio',\n 'audiosourcelabel',\n 'autoplay',\n 'browserepositories',\n 'browserepositories',\n 'captions',\n 'captionssourcelabel',\n 'chapters',\n 'chapterssourcelabel',\n 'controls',\n 'createmedia',\n 'default',\n 'descriptions',\n 'descriptionssourcelabel',\n 'displayoptions',\n 'entername',\n 'entertitle',\n 'entersource',\n 'enterurl',\n 'height',\n 'kind',\n 'label',\n 'languagesavailable',\n 'languagesinstalled',\n 'link',\n 'loop',\n 'metadata',\n 'metadatasourcelabel',\n 'mute',\n 'poster',\n 'remove',\n 'size',\n 'srclang',\n 'subtitles',\n 'subtitlessourcelabel',\n 'track',\n 'tracks',\n 'video',\n 'videoheight',\n 'videosourcelabel',\n 'videowidth',\n 'width'),\n 'atto_media');\n}", "function get_locale(): string\n{\n $locale = \\Locale::acceptFromHttp(input_server('HTTP_ACCEPT_LANGUAGE'));\n if (!$locale) {\n $locale = 'en_US';\n }\n return $locale;\n}", "function languages() {\n load_plugin_textdomain('wcpdomain', false, dirname(plugin_basename(__FILE__)) . '/languages');\n }", "protected function _language()\n {\n if (sizeof($this->_config['language']) > 1) {\n $language = $this->getRequest()->getParam('language');\n if (!empty($language)) {\n $this->_language = $language . '/';\n $this->_metaLanguage = $language;\n } else if (!empty($this->_session->language)) {\n $this->_language = $this->_session->language . '/';\n $this->_metaLanguage = $this->_session->language;\n } else {\n $browserLanguage = substr($_SERVER['HTTP_ACCEPT_LANGUAGE'], 0, 2);\n if (in_array($browserLanguage, $this->_config['language'])) {\n $this->_session->language = $browserLanguage;\n $this->_language = $browserLanguage . '/';\n $this->_metaLanguage = $browserLanguage;\n } else {\n $this->_language = $this->_config['language'][0] . '/';\n $this->_metaLanguage = $this->_config['language'][0];\n }\n }\n } else {\n $this->_language = '';\n $this->_metaLanguage = $this->_config['language'][0];\n }\n }", "private function getBrowserLanguage()\n {\n // getting http instruction if not provided\n $str = (isset($_SERVER['HTTP_ACCEPT_LANGUAGE']) ? $_SERVER['HTTP_ACCEPT_LANGUAGE'] : \"\");\n // exploding accepted languages\n $langs = explode(',', $str);\n\n return $langs;\n }", "public function getJavaScripts();", "private function langSetup()\n {\n /**\n * Set default language\n */\n $this->lang = array_keys($this->langsSupported)[0];\n\n /**\n * Force use default lang\n */\n $this->setLang($this->lang);\n return;\n\n $langFromGetParam = Arr::get($_GET, self::GET_PARAM_NAME);\n $langFromCookies = Arr::get($_COOKIE, self::COOKIE_NAME);\n\n /**\n * Choose language based on user's previous choice\n */\n if ($langFromCookies && $this->valid($langFromCookies)) {\n $this->lang = $langFromCookies;\n } else {\n $this->setLang($this->lang);\n }\n\n /**\n * If lang in GET params then save this value to cookies\n */\n if ($langFromGetParam && $this->valid($langFromGetParam)) {\n $this->setLang($langFromGetParam);\n }\n }", "public static function localize_results_scripts() {\n\t\t\t$protocol = isset( $_SERVER['HTTPS'] ) ? 'https://' : 'http://';\n\t\t\t// Output admin-ajax.php URL with same protocol as current page\n\n\t\t\t$vars = array(\n\t\t\t\t'ajaxurl' => admin_url( 'admin-ajax.php', $protocol ),\n\t\t\t\t'imagesUrl' => GFCommon::get_base_url() . '/images'\n\t\t\t);\n\n\t\t\twp_localize_script( 'gaddon_results_js', 'gresultsVars', $vars );\n\n\t\t\t$strings = array(\n\t\t\t\t'ajaxError' => wp_strip_all_tags( __( 'Error retrieving results. If the problem persists, please contact support.', 'gravityforms' ) )\n\t\t\t);\n\n\t\t\twp_localize_script( 'gaddon_results_js', 'gresultsStrings', $strings );\n\n\t\t}", "function pi_loadLL($file=null)\t{\n\t\tif (!$this->LOCAL_LANG_loaded && $this->scriptRelPath &&!$file)\t{\n\t\t\t$basePath = PATH_site . t3lib_extMgm::siteRelPath($this->extKey).dirname($this->scriptRelPath).'/locallang.php';\n\t\t\tif (@is_file($basePath))\t{\n\t\t\t\tinclude('./'.$basePath);\n\t\t\t\t$this->LOCAL_LANG = $LOCAL_LANG;\n\t\t\t\tif (is_array($this->conf['_LOCAL_LANG.']))\t{\n\t\t\t\t\treset($this->conf['_LOCAL_LANG.']);\n\t\t\t\t\twhile(list($k,$lA)=each($this->conf['_LOCAL_LANG.']))\t{\n\t\t\t\t\t\tif (is_array($lA))\t{\n\t\t\t\t\t\t\t$k = substr($k,0,-1);\n\t\t\t\t\t\t\t$this->LOCAL_LANG[$k] = t3lib_div::array_merge_recursive_overrule(is_array($this->LOCAL_LANG[$k])?$this->LOCAL_LANG[$k]:array(), $lA);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}else if(!$this->LOCAL_LANG_loaded && $file){\n\t\t\tif (@is_file($file))\t{\n\t\t\t\tinclude($file);\n\t\t\t\t$this->LOCAL_LANG = $LOCAL_LANG;\n\t\t\t\tif (is_array($this->conf['_LOCAL_LANG.']))\t{\n\t\t\t\t\treset($this->conf['_LOCAL_LANG.']);\n\t\t\t\t\twhile(list($k,$lA)=each($this->conf['_LOCAL_LANG.']))\t{\n\t\t\t\t\t\tif (is_array($lA))\t{\n\t\t\t\t\t\t\t$k = substr($k,0,-1);\n\t\t\t\t\t\t\t$this->LOCAL_LANG[$k] = t3lib_div::array_merge_recursive_overrule(is_array($this->LOCAL_LANG[$k])?$this->LOCAL_LANG[$k]:array(), $lA);\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\t$this->LOCAL_LANG_loaded = 1;\n\t}", "protected function initJavascriptCode() {}", "public function localize_script() {\n\t\t/**\n\t\t * Filters the data that is passed to the admin JS script.\n\t\t *\n\t\t * @since 1.0.0\n\t\t *\n\t\t * @param array $data The data to pass to the script.\n\t\t */\n\t\t$script_data = apply_filters(\n\t\t\t'stellarwp/telemetry/' . Config::get_hook_prefix() . 'script_data',\n\t\t\t[\n\t\t\t\t'exit_interview' => [\n\t\t\t\t\t'action' => Exit_Interview_Subscriber::AJAX_ACTION,\n\t\t\t\t\t'nonce' => wp_create_nonce( Exit_Interview_Subscriber::AJAX_ACTION ),\n\t\t\t\t],\n\t\t\t]\n\t\t);\n\n\t\twp_localize_script(\n\t\t\tself::SCRIPT_HANDLE,\n\t\t\t'stellarwpTelemetry',\n\t\t\t$script_data\n\t\t);\n\t}", "function abl_droploader_get_localisation() {\n\t\t$l10n = array(\n\t\t\t'open' => '',\n\t\t\t'open_title' => '',\n\t\t\t'close' => '',\n\t\t\t'close_title' => '',\n\t\t\t'error_method' => '',\n\t\t\t'info_text' => '',\n\t\t\t'err_invalid_filetype' => '',\n\t\t\t'err_browser_not_supported' => '',\n\t\t\t'err_too_many_files' => '',\n\t\t\t'err_file_too_large' => '',\n\t\t\t'all_files_uploaded' => '',\n\t\t\t'no_files_uploaded' => '',\n\t\t\t'some_files_uploaded' => '',\n\t\t);\n\t\tforeach ($l10n as $k => $v) {\n\t\t\t$l10n[$k] = gTxt('abl_droploader_' . $k);\n\t\t}\n\t\treturn $l10n;\n\t}", "public function init()\r\n {\r\n \theader('content-type: text/html; charset=utf8');\r\n \tdefined('BASE_URL')\t|| define('BASE_URL', Zend_Controller_Front::getInstance()->getBaseUrl());\r\n \t$this->tr = Application_Form_FrmLanguages::getCurrentlanguage();\r\n \t$this->type = 1;\r\n\t}", "public function switcher()\n {\n $default_lang = $this->fetchConfig('ml_default_language');\n $all_lang = $this->fetchConfig('ml_languages');\n $lang_text = $this->fetchConfig('ml_switch_text', null, null, false, false);\n $prod_paths = $this->fetchConfig('ml_prod_paths', null, null, false, false);\n $prod_urlroot = $this->fetchConfig('ml_prod_produrlroot', null, null, false, false);\n $currlang = $this->currlang();\n $output = array();\n $output['switch_text'] = $lang_text[$currlang];\n $output['languages'] = array();\n $curr_prod_paths = $prod_paths[$currlang];\n \n $curr_page = Path::pretty(URL::getCurrent());\n $entry_data = Content::get($curr_page);\n\n $uri = ltrim($curr_page, '/');\n $urlparts = explode(\"/\",$uri);\n\n $curr_prod_paths_country = null;\n $curr_prod_paths_path = null;\n if (count($entry_data) < 1)\n { \n if (array_key_exists($urlparts[1], $curr_prod_paths))\n {\n $curr_prod_paths_path = $curr_prod_paths[$urlparts[1]];\n $curr_prod_paths_prod = $urlparts[2];\n $curr_page = \"/\" .$curr_prod_paths_path . \"/\" . $curr_prod_paths_prod;\n }\n\n }\n $entry_data = Content::get($curr_page);\n foreach ($all_lang as $lang) { \n $data = array();\n $data['code'] = $lang;\n $data['text'] = $lang_text[$lang];\n $data['url'] = '/' . $lang;\n $alturl = 'alternative_url_' . $lang;\n if (array_key_exists($alturl, $entry_data)) {\n $data['alturl'] = $entry_data[$alturl];\n }\n $altprodurl = 'alternative_prod_url_' . $lang;\n if (array_key_exists($altprodurl, $entry_data)) {\n $currpp = $prod_paths[$lang];\n reset($currpp);\n $first_key = key($currpp);\n $data['altprodurl'] = \"/\" .$currpp[$first_key] . \"/\" . $entry_data[$altprodurl];\n $data['altprod'] = $entry_data[$altprodurl];\n $data['produrl'] = $prod_urlroot[$lang] . \"/\" . $entry_data[$altprodurl];\n }\n\n $data['is_current'] = ($lang == $currlang) ? true : false;\n array_push($output['languages'], $data);\n }\n\n return $output;\n }", "function common_current_language(){\r\n\tif($_SESSION['lang'] == 'id'){\r\n\t\treturn 'Bahasa Indonesia';\r\n\t}\r\n\telse if($_SESSION['lang'] == 'en'){\r\n\t\treturn 'English';\r\n\t}\r\n}", "public static function loadLang() {\n\t\tif (!is_object($GLOBALS['LANG'])) {\n\n\t\t\trequire_once t3lib_extMgm::extPath('lang') . 'lang.php';\n\t\t\t//TODO see pt_tool smarty!\n\t\t\t$GLOBALS['LANG'] = t3lib_div::makeInstance('language');\n\t\t\t$GLOBALS['LANG']->csConvObj = t3lib_div::makeInstance('t3lib_cs');\n\t\t}\n\t\tif (is_object($GLOBALS['TSFE']) && $GLOBALS['TSFE']->config['config']['language']) {\n\t\t\t$LLkey = $GLOBALS['TSFE']->config['config']['language'];\n\t\t\t$GLOBALS['LANG']->init($LLkey);\n\t\t}\n\n\t}", "private function _getWebBrowserLanguage() {\n if (isset($_SERVER['HTTP_ACCEPT_LANGUAGE']) && ! empty($_SERVER['HTTP_ACCEPT_LANGUAGE'])) {\n $navigatorLanguageList = array_flip($this->getLanguageList());\n\n foreach ($navigatorLanguageList as $k => &$v)\n $v = substr($k, 0, 2);\n\n $navigatorLanguageList = array_flip($navigatorLanguageList);\n\n foreach (explode(',', $_SERVER['HTTP_ACCEPT_LANGUAGE']) as $rawLanguageData) {\n $languageData = explode(';', $rawLanguageData);\n $preferredLanguage = substr(array_shift($languageData), 0, 2);\n\n if (is_file('lang/'. $navigatorLanguageList[$preferredLanguage] .'.lang.php'))\n return $navigatorLanguageList[$preferredLanguage];\n }\n die;\n }\n\n return 'english';\n }", "public function initializeLanguages() {}", "function getBrowserLang() {\n\t\t$this->fillAcceptedLanguages();\n\n\t\t$wanted= env('HTTP_ACCEPT_LANGUAGE');\n\t\tif (isset ($wanted)) {\n\t\t\t$Languages= explode(\",\", $wanted);\n\t\t\t$SLanguages= array ();\n\t\t\tforeach ($Languages as $Key => $Language) {\n\t\t\t\t$Language= str_replace(\"-\", \"_\", $Language);\n\t\t\t\t$Language= explode(\";\", $Language);\n\t\t\t\tif (isset ($Language[1])) {\n\t\t\t\t\t$Priority= explode(\"q=\", $Language[1]);\n\t\t\t\t\t$Priority= $Priority[1];\n\t\t\t\t} else {\n\t\t\t\t\t$Priority= \"1.0\";\n\t\t\t\t}\n\t\t\t\t$SLanguages[]= array (\n\t\t\t\t\t'priority' => $Priority,\n\t\t\t\t\t'language' => $Language[0]\n\t\t\t\t);\n\t\t\t}\n\n\t\t\tforeach ($SLanguages as $key => $row) {\n\t\t\t\t$priority[$key]= $row['priority'];\n\t\t\t\t$language[$key]= $row['language'];\n\t\t\t}\n\n\t\t\tarray_multisort($priority, SORT_DESC, $language, SORT_ASC, $SLanguages);\n\n\t\t\t$ALangString= implode(\";\", $this->acceptedLanguages);\n\t\t\tforeach ($SLanguages as $A) {\n\t\t\t\t$key= array_search($A['language'], $this->acceptedLanguages);\n\t\t\t\tif ($key === FALSE) {\n\t\t\t\t\t$GenericLanguage= explode(\"_\", $A['language']);\n\t\t\t\t\t$pos1= strpos($ALangString, $GenericLanguage[0]);\n\t\t\t\t\tif (is_numeric($pos1)) {\n\t\t\t\t\t\t$key= $pos1 / 6;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (is_numeric($key) && (!isset ($Code))) {\n\t\t\t\t\t//$Code= $this->acceptedLanguages[$key];\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn !empty ($Code) ? $this->getTldFromLanguage($Code) : '';\n\t}", "private function includeJavaScript() {\n\t\t$GLOBALS['TSFE']->additionalHeaderData[$this->prefixId]\n\t\t\t= '<script type=\"text/javascript\" ' .\n\t\t\t'src=\"' . $this->getExtensionPath() .\n\t\t\t'pi1/tx_explanationbox_pi1.js\">' .\n\t\t\t'</script>';\n\n\t\tif ($this->hasConfValueString('mooTools')) {\n\t\t\t$GLOBALS['TSFE']->additionalHeaderData[$this->prefixId . '_moo']\n\t\t\t\t= '<script type=\"text/javascript\" ' .\n\t\t\t\t'src=\"' . $this->getExtensionPath() .\n\t\t\t\t$this->getConfValueString('mooTools') . '\">' .\n\t\t\t\t'</script>';\n\t\t}\n\t}", "private function load_js () {\n $buffer = '';\n if (count($this->js_files)) {\n foreach ($this->js_files as $file) {\n $file = explode('/', $file);\n // TODO: use $this->config->item('modules_locations') for modules path\n $file = 'application/modules/'.$file[0].'/views/'.$this->get_skin().'/skin/'.implode('/',array_slice($file, 1));\n $buffer .= \"\\n\".'<script src=\"'.base_url($file).'\"></script>';\n }\n return $buffer.\"\\n\";\n } else {\n return \"\\n\";\n }\n }", "function dprv_php2js($dprv_variable_array)\r\n {\r\n // substitute for wp_localize_script which must be called early (before enqueue_script instantiates) - too early for variables to be available\r\n // Note setting enqueue_script to instantiate on footer works but is dependent on wp_footer being there (some themes omit)\r\n if (!is_array($dprv_variable_array))\r\n {\r\n return false;\r\n }\r\n print ('<script type=\"text/javascript\">\r\n <!--\r\n var temp = \"\";');\r\n foreach ($dprv_variable_array as $key=>$value)\r\n {\r\n print 'temp = \\'' . json_encode($value) . '\\';';\r\n print 'var ' . $key . '= JSON.parse(temp);';\r\n }\r\n print ('//-->\r\n </script>');\r\n return true;\r\n }", "function modules_get_language($script = 'global')\n{\n $currentlang = pnSessionGetVar('lang');\n $language = pnConfigGetVar('language');\n\n\tif (!isset($GLOBALS['ModName'])) {\n\t\t$modname = pnModGetName();\n\t} else {\n\t\t$modname = $GLOBALS['ModName'];\n\t}\n\t$modinfo = pnModGetInfo(pnModGetIDFromName($modname));\n\n \tif (file_exists('modules/'.pnVarPrepForOS($modinfo['directory']).'/lang/'.pnVarPrepForOS($currentlang).\"/$script.php\")) {\n\t\t@include_once 'modules/'.pnVarPrepForOS($modinfo['directory']).'/lang/'.pnVarPrepForOS($currentlang).\"/$script.php\";\n \t} elseif (!empty($language)) {\n\t \tif (file_exists('modules/'.pnVarPrepForOS($modinfo['directory']).'/lang/'.pnVarPrepForOS($language).\"/$script.php\")) {\n\t\t\t@include_once 'modules/'.pnVarPrepForOS($modinfo['directory']).'/lang/'.pnVarPrepForOS($language).\"/$script.php\";\n\t \t}\n \t} else {\n \t// nothing found, use english translation stuff\n\t\tif (file_exists('modules/'.pnVarPrepForOS($modinfo['directory']).\"/lang/eng/$script.php\")) {\n\t\t\t@include_once 'modules/'.pnVarPrepForOS($modinfo['directory']).\"/lang/eng/$script.php\";\n \t}\n \t}\n \treturn;\n}" ]
[ "0.7314334", "0.6955072", "0.6724855", "0.61784315", "0.6147768", "0.5995437", "0.5939906", "0.5921748", "0.5905828", "0.58758444", "0.58573234", "0.5857078", "0.5814999", "0.5807649", "0.5788931", "0.5788931", "0.57810324", "0.5736608", "0.5720019", "0.5700382", "0.5686212", "0.567616", "0.56708926", "0.56702906", "0.56693274", "0.56646055", "0.5658", "0.56355166", "0.5633076", "0.5624715", "0.55992854", "0.5577125", "0.5576413", "0.5566788", "0.5560583", "0.5541605", "0.55407035", "0.5530863", "0.5530223", "0.552856", "0.5524525", "0.55243933", "0.5512908", "0.55030483", "0.5498668", "0.5492059", "0.54916704", "0.5489486", "0.548839", "0.5483141", "0.5479435", "0.5467261", "0.54622155", "0.5454444", "0.54527664", "0.54512185", "0.5447216", "0.54459995", "0.5444916", "0.544134", "0.543387", "0.5426541", "0.5425268", "0.5423515", "0.5422659", "0.54199857", "0.5403192", "0.5401722", "0.5399808", "0.5398078", "0.53868437", "0.53833455", "0.5371837", "0.5371676", "0.5365662", "0.5365418", "0.5364203", "0.536349", "0.5361845", "0.5353077", "0.5343335", "0.53406715", "0.5339192", "0.53366274", "0.53354377", "0.5331546", "0.53298783", "0.5327318", "0.53221935", "0.5320885", "0.5314734", "0.530981", "0.5309569", "0.530594", "0.5302556", "0.5300532", "0.5296553", "0.5295848", "0.5289524", "0.5288311" ]
0.59034777
9
Loads jquery using the built in (if moodle 2.5+) or uses an included version if < moodle 2.4
public function cmf_load_jQuery() { global $PAGE; if (moodle_major_version() >= '2.5') { $PAGE->requires->jquery(); $PAGE->requires->jquery_plugin('migrate'); $PAGE->requires->jquery_plugin('ui'); $PAGE->requires->jquery_plugin('ui-css'); } else { $PAGE->requires->js("/course/format/course_menu/jquery/jquery-1.9.1.js"); $PAGE->requires->js("/course/format/course_menu/jquery/jquery-ui.min.js"); $PAGE->requires->css("/course/format/course_menu/jquery/themes/base/jquery.ui.all.css"); } $PAGE->requires->js("/course/format/course_menu/display.js"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function load_jQuery() {\n global $PAGE, $DB, $COURSE;\n\n dd_content_inline_js();\n $this->dd_content_inline_js(); //some inline JS for php info\n dd_content_load_jQuery();\n $PAGE->requires->js(\"/blocks/dd_content/dd_content.js\");\n }", "private function _load_jquery_remotely()\n\t{\n\t\t// default jq version\n\t\t$v = '1.12.4' ;\n\n\t\t// load wp's jq version\n\t\tglobal $wp_scripts ;\n\t\tif ( isset( $wp_scripts->registered[ 'jquery-core' ]->ver ) ) {\n\t\t\t$v = $wp_scripts->registered[ 'jquery-core' ]->ver ;\n\t\t\t// Remove all unexpected chars to fix WP5.2.1 jq version issue @see https://wordpress.org/support/topic/problem-with-wordpress-5-2-1/\n\t\t\t$v = preg_replace( '|[^\\d\\.]|', '', $v ) ;\n\t\t}\n\n\t\t$src = $this->_cfg_cdn_remote_jquery === LiteSpeed_Cache_Config::VAL_ON ? \"//ajax.googleapis.com/ajax/libs/jquery/$v/jquery.min.js\" : \"//cdnjs.cloudflare.com/ajax/libs/jquery/$v/jquery.min.js\" ;\n\n\t\tLiteSpeed_Cache_Log::debug2( '[CDN] load_jquery_remotely: ' . $src ) ;\n\n\t\twp_deregister_script( 'jquery-core' ) ;\n\n\t\twp_register_script( 'jquery-core', $src, false, $v ) ;\n\t}", "function includeJQuery() {\n\t\tif ($this->jQueryLocation) {\n\t\t\tRequirements::javascript($this->jQueryLocation);\n\t\t} else if (self::$jquery_location) {\n\t\t\tRequirements::javascript(self::$jquery_location);\n\t\t}\n\n\t}", "function load_jquery()\n{\n ?>\n <script type=\"text/javascript\" src=\"http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js\"></script>\n <script type=\"text/javascript\">\n // Ensure that jQuery is installed even if the Google CDN is down.\n if (typeof jQuery === \"undefined\") {\n var script = document.createElement('script');\n var attr = document.createAttribute('type');\n attr.nodeValue = 'text/javascript';\n script.setAttributeNode(attr);\n attr = document.createAttribute('src');\n attr.nodeValue = '/scripts/jquery-1.3.2.min.js';\n script.setAttributeNode(attr);\n document.getElementsByTagName('head')[0].appendChild(script);\n }\n </script>\n<?php\n}", "public function getJquery();", "function google_hosted_jquery() {\n\tif (!is_admin()) {\n\t\twp_deregister_script('jquery');\n\n\t\tswitch ( SeekConfig::JQUERY_VERSION ) {\n\t\t\tcase 1:\n\t\t\t\twp_register_script('jquery', 'https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js', false, null);\n\t\t\t\tbreak;\n\t\t\tcase 3:\n\t\t\t\twp_register_script('jquery', 'https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js', false, null);\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\twp_register_script('jquery', 'https://ajax.googleapis.com/ajax/libs/jquery/2.2.4/jquery.min.js', false, null);\n\t\t\t\tbreak;\n\t\t}\n\n\t\twp_enqueue_script('jquery');\n\t}\n}", "function cm_replace_jquery() {\n\tif (!is_admin()) {\n\t\t// comment out the next two lines to load the local copy of jQuery\n\t\twp_deregister_script('jquery');\n\t\twp_register_script('jquery', '//ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js', false, '1.11.3');\n\t\twp_enqueue_script('jquery');\n\t}\n}", "public static function getJqueryCompatibility()\n\t{\n\t\treturn '\n\t\t\t<script type=\"text/javascript\">\n\t\t\t\tjq13 = jQuery.noConflict(true); \n\t\t\t</script>\n\t\t\t<script type=\"text/javascript\" src=\"'.self::$moduleURL.'/jquery-1.4.4.min.js\"></script>';\n\t}", "public function initializeJQuery() {\n $this->addToHead(\"<script src=\\\"https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js\\\"></script>\",\n Page::BOTTOM);\n }", "function bb_mystique_load_scripts() {\r\n\tif( bb_get_mystique_option( 'jquery' ) )\r\n\t\twp_enqueue_script( 'bb-mystique', bb_get_active_theme_uri() . 'js/jquery.mystique.js', array( 'jquery' ), BB_MYSTIQUE_THEME_VERSION );\r\n}", "function replace_default_jquery() {\n\tif (!is_admin()) {\n\t\t// comment out the next two lines to load the local copy of jQuery\n\t\twp_deregister_script('jquery');\n\t\t// wp_register_script('jquery', '//cdn.jsdelivr.net/jquery/2.1.4/jquery.min.js', false, null);\n\t\twp_register_script('jquery', get_template_directory_uri() . '/js/jquery-2.1.4.min.js', false, null);\n\t\t// wp_enqueue_script('jquery');\n\t}\n}", "function load_core_js() {\n\t\t\n\t\t\t// removes built in jquery\n\t\t\twp_deregister_script('jquery');\n\n\t\t\t// grabs version 1.8.2 from CDN and enqueues below\n\t\t\twp_register_script('jquery',\"http\".($_SERVER['SERVER_PORT'] == 443 ? \"s\" : \"\") . \"://ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js\", false, null);\n\n\t\t\twp_enqueue_script('jquery');\n\n\t\t\t// enqueues bootstrap\n\t\t\twp_enqueue_script('bootstrap',get_bloginfo('template_directory').'/assets/js/bootstrap.min.js',dirname(__FILE__),array('jquery'),true);\n\n\t\t\t// loads in app.js (place all custom JS in here)\n\t\t\twp_register_script('app',get_bloginfo('template_directory').'/assets/js/app.js',dirname(__FILE__),array('jquery'),true);\n\n\t\t\t// localises for AJAX calls\n\t\t\twp_localize_script('app','ajax_url',array('ajaxurl'=>admin_url('admin-ajax.php')));\n\n\t\t\twp_enqueue_script('app');\n\t\t\t\n\t\t}", "function replace_jquery() {\r\n\tif (!is_admin()) {\r\n\t\t// comment out the next two lines to load the local copy of jQuery\r\n\t\twp_deregister_script('jquery');\r\n\t\twp_register_script('jquery', 'http://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js', false, '1.11.3');\r\n\t\twp_enqueue_script('jquery');\r\n\t}\r\n}", "function jquery($line)\n{\n\tif ($line == 1)\n\t{\n\t\techo '<script src=\"//ajax.googleapis.com/ajax/libs/jquery/1.11.2/jquery.min.js\"></script>\n\t\t';\n\t}\n\tif ($line == 2)\n\t{\n\t\techo '<script src=\"https://ajax.googleapis.com/ajax/libs/jquery/2.1.3/jquery.min.js\"></script>\n\t\t';\n\t}\n}", "public function update_jquery_source() {\n\t\t$jquery_url = $this->get_jquery_url();\n\t\tif ( ! empty( $jquery_url ) ) {\n\t\t\twp_deregister_script( 'jquery' );\n\t\t\twp_register_script( 'jquery', $jquery_url, [], null, true );\n\t\t\t$this->add_filter( 'script_loader_src', 'jquery_local_fallback', 10, 2 );\n\t\t}\n\t}", "function replace_jquery() {\n if (!is_admin()) {\n // comment out the next two lines to load the local copy of jQuery\n wp_deregister_script('jquery');\n wp_register_script('jquery', '//ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js', false, '1.12.4');\n wp_enqueue_script('jquery');\n }\n}", "function admin_jquery() {\n\t\twp_enqueue_script('jquery');\n\t}", "function modify_jquery_version() {\n if (!is_admin()) {\n wp_deregister_script('jquery');\n wp_register_script('jquery', 'http://ajax.googleapis.com/ajax/libs/jquery/2.0.2/jquery.min.js', false, '2.0.s');\n wp_enqueue_script('jquery');\n }\n}", "function upgrade_jquery() {\n\tif ( ! is_admin() ) {\n\t\twp_deregister_script( 'jquery' );\n\t\twp_enqueue_script( 'jquery-updated', 'https://code.jquery.com/jquery-3.5.1.slim.min.js' );\n\t\twp_enqueue_script( 'jquery-migrate', 'https://code.jquery.com/jquery-migrate-3.3.1.min.js' );\n\t}\n}", "function load_jquery($front = false)\n{\n\t$path\t\t\t= 'js/jquery';\n\n\t$jquery\t\t\t= 'jquery-1.5.1.min.js';\n\t$jquery_ui\t\t= 'jquery-ui-1.8.11.custom.min.js';\n\t$jquery_ui_css\t= 'jquery-ui-1.8.11.custom.css';\n\t\n\t//load jquery ui css\n\t\n\tif($front)\n\t{\n\t\techo link_tag($path.'/'.$front.'/'.$jquery_ui_css);\n\t}\n\telse\n\t{\n\t\techo link_tag($path.'dealsign/'.$jquery_ui_css);\n\t}\n\t//load scripts\n\techo load_script($path.'/'.$jquery);\n\techo load_script($path.'/'.$jquery_ui);\n\t\n\t//colorbox\n\t$path\t\t\t= $path.'/colorbox';\n\t$colorbox\t\t= 'jquery.colorbox-min.js';\n\t$colorbox_css\t= 'colorbox.css';\n\t\n\techo link_tag($path.'/'.$colorbox_css);\n\techo load_script($path.'/'.$colorbox);\n}", "function dequeue_jquery_migrate( &$scripts){\n\tif(!is_admin()){\n\t\t$scripts->remove( 'jquery');\n\t\t$scripts->add( 'jquery', false, array( 'jquery-core' ), '1.10.2' );\n\t}\n}", "public function get_required_javascript() {\n parent::get_required_javascript();\n\n $this->page->requires->jquery();\n }", "function wa_wcc_load_scripts($jquery_true) {\n\n\t\twp_register_style('wa_wcc_mtree_css_file', get_template_directory_uri().'/plugin/collapse/assets/css/mtree.css');\n\t\twp_enqueue_style('wa_wcc_mtree_css_file');\n\n\n\t\tif($this->options['configuration']['load_velocity'] === TRUE) {\n\n\t wp_register_script('wa_wcc_velocity',get_template_directory_uri().'/plugin/collapse/assets/js/jquery.velocity.min.js',array('jquery'),'',($this->options['configuration']['loading_place'] === 'header' ? false : true));\n\t wp_enqueue_script('wa_wcc_velocity'); \n\n\t\t}\n\n\t}", "public function register_jquery() {\n\t\t// If we haven't selected to load from google in customizer, we can bail\n\t\tif( get_theme_mod( 'mpress_enqueue_jquery' ) !== 'google' ) {\n\t\t\treturn false;\n\t\t}\n\t\t// Deregister core jquery in favor of cdn version\n\t\twp_deregister_script( 'jquery' );\n\t\t// Re-register jquery with CDN URI\n\t\twp_register_script( 'jquery', '//ajax.googleapis.com/ajax/libs/jquery/2.1.4/jquery.min.js', array(), '2.1.4', get_theme_mod( 'mpress_jquery_location', false ) );\n\t}", "function head_js($includeDefaults = true)\n{\n $headScript = get_view()->headScript();\n\n if ($includeDefaults) {\n $dir = 'javascripts';\n $headScript->prependScript('jQuery.noConflict();')\n ->prependScript('window.jQuery.ui || document.write(' . js_escape(js_tag('vendor/jquery-ui')) . ')')\n // ->prependFile('//ajax.googleapis.com/ajax/libs/jqueryui/1.11.2/jquery-ui.min.js')\n ->prependScript('window.jQuery || document.write(' . js_escape(js_tag('vendor/jquery')) . ')')\n // ->prependFile('//ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js')\n ;\n }\n return $headScript;\n}", "private function ensure_sufficient_jquery_and_enqueue() {\n\t\tglobal $updraftplus;\n\t\t\n\t\t$enqueue_version = $updraftplus->use_unminified_scripts() ? $updraftplus->version.'.'.time() : $updraftplus->version;\n\t\t$min_or_not = $updraftplus->use_unminified_scripts() ? '' : '.min';\n\t\t$updraft_min_or_not = $updraftplus->get_updraftplus_file_version();\n\n\t\t\n\t\tif (version_compare($updraftplus->get_wordpress_version(), '3.3', '<')) {\n\t\t\t// Require a newer jQuery (3.2.1 has 1.6.1, so we go for something not too much newer). We use .on() in a way that is incompatible with < 1.7\n\t\t\twp_deregister_script('jquery');\n\t\t\t$jquery_enqueue_version = $updraftplus->use_unminified_scripts() ? '1.7.2'.'.'.time() : '1.7.2';\n\t\t\twp_register_script('jquery', 'https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery'.$min_or_not.'.js', false, $jquery_enqueue_version, false);\n\t\t\twp_enqueue_script('jquery');\n\t\t\t// No plupload until 3.3\n\t\t\twp_enqueue_script('updraft-admin-common', UPDRAFTPLUS_URL.'/includes/updraft-admin-common'.$updraft_min_or_not.'.js', array('jquery', 'jquery-ui-dialog', 'jquery-ui-core', 'jquery-ui-accordion'), $enqueue_version, true);\n\t\t} else {\n\t\t\twp_enqueue_script('updraft-admin-common', UPDRAFTPLUS_URL.'/includes/updraft-admin-common'.$updraft_min_or_not.'.js', array('jquery', 'jquery-ui-dialog', 'jquery-ui-core', 'jquery-ui-accordion', 'plupload-all'), $enqueue_version);\n\t\t}\n\t\t\n\t}", "function smarty_cms_function_cms_jquery($params, &$smarty)\n{\n\t$exclude = isset($params['exclude']) && !empty($params['exclude'])?$params['exclude']:'';\n\t$cdn = isset($params['cdn']) && ($params['cdn'])=='true'?true:false;\n\t$append = isset($params['append']) && !empty($params['append'])?$params['append']:'';\n\t$ssl = isset($params['ssl']) && ($params['ssl'])=='true'?true:false;\n\t$custom_root = isset($params['custom_root']) && !empty($params['custom_root'])?$params['custom_root']:'';\n\n\t// get the output.\n\t$out = cms_get_jquery($exclude,$ssl,$cdn,$append,$custom_root);\n\tif( isset($params['assign']) )\n\t{\n\t\t$smarty->assign(trim($params['assign']),$out);\n\t\treturn;\n\t}\n\treturn $out;\n}", "function tm_mbr_add_jquery(){\r\n\t//wp_enqueue_style('team-member-style', plugin_dir_url( __FILE__ ).'css/team-member-style.css', array(), 1.0 );\r\n\r\n\twp_enqueue_script( 'jquery' );\r\n\r\n\tif(is_admin()){\r\n\t\twp_enqueue_script( 'lp_admin_js', plugin_dir_url( __FILE__ ).'js/admin.js', array(), 1.0, true );\r\n\t\twp_localize_script( 'lp_admin_js', 'lp_admin_ajax', array(\r\n\t\t\t'ajaxurl'=>admin_url( 'admin-ajax.php' ),\r\n\t\t));\r\n\t}else{\r\n\t\twp_enqueue_script( 'lp_front_js', plugin_dir_url( __FILE__ ).'js/front-end.js', array(), 1.0, true );\r\n\t\twp_localize_script( 'lp_front_js', 'lp_front_ajax', array(\r\n\t\t\t'ajaxurl'=>admin_url( 'admin-ajax.php' ),\r\n\t\t));\r\n\t}\r\n}", "function rst_scripts_method()\n{\n wp_enqueue_script('jquery');\n}", "function updateHead()\n\t{\n\t\t//state parameters\n\t\t$devmode = $this->getParam('devmode', 0);\n\t\t$themermode = $this->getParam('themermode', 1) && defined('T3_THEMER');\n\t\t$theme = $this->getParam('theme', '');\n\t\t$minify = $this->getParam('minify', 0);\n\t\t$minifyjs = $this->getParam('minify_js', 0);\n\n\t\t// As Joomla 3.0 bootstrap is buggy, we will not use it\n\t\t// We also prevent both Joomla bootstrap and T3 bootsrap are loaded\n\t\t// And upgrade jquery as our Framework require jquery 1.7+ if we are loading jquery from google\n\t\t$doc = JFactory::getDocument();\n\t\t$scripts = array();\n\n\t\tif (version_compare(JVERSION, '3.0', 'ge')) {\n\t\t\t$t3bootstrap = false;\n\t\t\t$jabootstrap = false;\n\n\t\t\tforeach ($doc->_scripts as $url => $script) {\n\t\t\t\tif (strpos($url, T3_URL . '/bootstrap/js/bootstrap.js') !== false) {\n\t\t\t\t\t$t3bootstrap = true;\n\t\t\t\t\tif ($jabootstrap) { //we already have the Joomla bootstrap and we also replace to T3 bootstrap\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif (preg_match('@media/jui/js/bootstrap(.min)?.js@', $url)) {\n\t\t\t\t\tif ($t3bootstrap) { //we have T3 bootstrap, no need to add Joomla bootstrap\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$scripts[T3_URL . '/bootstrap/js/bootstrap.js'] = $script;\n\t\t\t\t\t}\n\n\t\t\t\t\t$jabootstrap = true;\n\t\t\t\t} else {\n\t\t\t\t\t$scripts[$url] = $script;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t$doc->_scripts = $scripts;\n\t\t\t$scripts = array();\n\t\t}\n\n\t\t// VIRTUE MART / JSHOPPING compatible\n\t\tforeach ($doc->_scripts as $url => $script) {\n\t\t\t$replace = false;\n\n\t\t\tif ((strpos($url, '//ajax.googleapis.com/ajax/libs/jquery/') !== false &&\n\t\t\t\t\tpreg_match_all('@/jquery/(\\d+(\\.\\d+)*)?/@msU', $url, $jqver)) ||\n\t\t\t\t(preg_match_all('@(^|\\/)jquery([-_]*(\\d+(\\.\\d+)+))?(\\.min)?\\.js@i', $url, $jqver))) {\n\n\t\t\t\t$idx = strpos($url, '//ajax.googleapis.com/ajax/libs/jquery/') !== false ? 1 : 3;\n\n\t\t\t\tif (is_array($jqver) && isset($jqver[$idx]) && isset($jqver[$idx][0])) {\n\t\t\t\t\t$jqver = explode('.', $jqver[$idx][0]);\n\n\t\t\t\t\tif (isset($jqver[0]) && (int)$jqver[0] <= 1 && isset($jqver[1]) && (int)$jqver[1] < 7) {\n\t\t\t\t\t\t$scripts[T3_URL . '/js/jquery-1.8.3' . ($devmode ? '' : '.min') . '.js'] = $script;\n\t\t\t\t\t\t$replace = true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (!$replace) {\n\t\t\t\t$scripts[$url] = $script;\n\t\t\t}\n\t\t}\n\n\t\t$doc->_scripts = $scripts;\n\t\t// end update javascript\n\n\t\t// detect RTL\n\t\t$dir = $doc->direction;\n\t\t$is_rtl = ($dir == 'rtl');\n\n\t\t// not in devmode and in default theme, do nothing\n\t\tif (!($devmode || $themermode || $theme || $minify || $minifyjs || $is_rtl)) {\n\t\t\treturn;\n\t\t}\n\n\t\t//Update css/less based on devmode and themermode\n\t\t$root = JURI::root(true);\n\t\t$current = JURI::current();\n\t\t$regex = '@' . preg_quote(T3_TEMPLATE_URL) . '/css/(rtl/)?(.*)\\.css((\\?|\\#).*)?$@i';\n\t\t$stylesheets = array();\n\n\t\tforeach ($doc->_styleSheets as $url => $css) {\n\t\t\t// detect if this css in template css\n\t\t\tif (preg_match($regex, $url, $match)) {\n\t\t\t\t$fname = $match[2];\n\n\t\t\t\tif ($devmode || $themermode) {\n\t\t\t\t\tif (is_file(T3_TEMPLATE_PATH . '/less/' . $fname . '.less')) {\n\t\t\t\t\t\tif ($themermode) {\n\t\t\t\t\t\t\t$newurl = T3_TEMPLATE_URL . '/less/' . $fname . '.less';\n\t\t\t\t\t\t\t$css['mime'] = 'text/less';\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t$newurl = $current . '?t3action=lessc&amp;s=templates/' . T3_TEMPLATE . '/less/' . $fname . '.less';\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$stylesheets[$newurl] = $css;\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\t$subpath = $is_rtl ? 'rtl/' . ($theme ? $theme . '/' : '') : ($theme ? 'themes/' . $theme . '/' : '');\n\t\t\t\t\tif ($subpath && is_file(T3_TEMPLATE_PATH . '/css/' . $subpath . $fname . '.css')) {\n\t\t\t\t\t\t$newurl = T3_TEMPLATE_URL . '/css/' . $subpath . $fname . '.css';\n\t\t\t\t\t\t$stylesheets[$newurl] = $css;\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t$stylesheets[$url] = $css;\n\t\t}\n\t\t// update back\n\t\t$doc->_styleSheets = $stylesheets;\n\n\t\t//only check for minify if devmode is disabled\n\t\tif (!$devmode && ($minify || $minifyjs)) {\n\t\t\tT3::import('core/minify');\n\t\t\tif($minify){\n\t\t\t\tT3Minify::optimizecss($this);\n\t\t\t}\n\t\t\tif($minifyjs){\n\t\t\t\tT3Minify::optimizejs($this);\n\t\t\t}\n\t\t}\n\t}", "function add_qoorate_scripts(){\n\t\t// MAYBE TODO: cacheing ... place in DB options?\t\t\n\t\t// unregister our really old jquery bundled with WP\n\t\t// Maybe we can keep it? should it be an option?\n\t\twp_deregister_script( 'jquery' );\n\t\twp_register_script( 'jquery', 'http://ajax.googleapis.com/ajax/libs/jquery/1.6.4/jquery.min.js' );\n\t\twp_enqueue_script( 'jquery' );\n\t}", "function javascript_adition(){\t\n\t\tif ( ! is_admin() ) : \n\t\t\twp_enqueue_script('jquery');\n\t\t\twp_enqueue_script('healerswiki_js',plugins_url('/',__FILE__).'js/script.js',array('jquery'));\n\t\tendif;\t\t\t\n\t\t\t\t\n\t}", "function set_jquery_cdn() {\n\t\tif (is_admin()) return;\n\t\twp_deregister_script('jquery');\n\t\twp_register_script('jquery',\n\t\t\t'https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js');\n\t}", "function includeJQueryValidate() {\n\t\tif ($this->jQueryValidateLocation) {\n\t\t\tRequirements::javascript($this->jQueryValidateLocation);\n\t\t} else if (self::$jquery_validate_location) {\n\t\t\tRequirements::javascript(self::$jquery_validate_location);\n\t\t}\n\t}", "function wpfme_jquery_enqueue() {\n wp_deregister_script('jquery');\n wp_register_script('jquery', \"http\" . ($_SERVER['SERVER_PORT'] == 443 ? \"s\" : \"\") . \"://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js\", false, null);\n wp_enqueue_script('jquery');\n}", "function horse_manager_scripts() {\n\n wp_enqueue_script('jquery_check', plugins_url('/js/jquery_check.js', __FILE__), array('jquery'));\n}", "function ineedmyjava() {\n\tif (!is_admin()) {\n \n\t\twp_deregister_script('jquery');\n\t\twp_register_script('jquery', 'http://ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js', false, '1.11.0', true);\n\t\twp_enqueue_script('jquery');\n\t\t\n\t\t// other scripts...\n\t\twp_register_script(\n\t\t\t'custom',\n\t\t\tget_bloginfo('template_directory') . '/js/custom.js',\n\t\t\tarray('jquery') );\n\t\twp_enqueue_script('custom');\n\t\t\n\t\t\n\t\t// other scripts...\n\t\twp_register_script(\n\t\t\t'isotope',\n\t\t\tget_bloginfo('template_directory') . '/js/isotope.js',\n\t\t\tarray('jquery') );\n\t\twp_enqueue_script('isotope');\n\t\t\n\t\t\n\t\t// other scripts...\n\t\twp_register_script(\n\t\t\t'images',\n\t\t\tget_bloginfo('template_directory') . '/js/images-loaded.js',\n\t\t\tarray('jquery') );\n\t\twp_enqueue_script('images');\n\t\t\n\t\t\n\t\t// other scripts...\n\t\twp_register_script(\n\t\t\t'bootstrap',\n\t\t\tget_bloginfo('template_directory') . '/js/bootstrap.js',\n\t\t\tarray('jquery') );\n\t\twp_enqueue_script('bootstrap');\n\t\t\n\t\t\n\t\t// other scripts...\n\t\twp_register_script(\n\t\t\t'colorbox',\n\t\t\tget_bloginfo('template_directory') . '/js/colorbox.js',\n\t\t\tarray('jquery') );\n\t\twp_enqueue_script('colorbox');\n\t\t\n\t\t\n\t\t\n\t}\n}", "function load_external_javascript($isDataTables = false, $isRecaptcha = false, $bootstrap4 = false) {\n?>\n<?php if ($bootstrap4) { ?>\n <script src=\"external/jquery3.5.1/jquery-3.5.1.min.js\"></script>\n <script src=\"external/bootstrap4.5.0/bootstrap.bundle.min.js\" type=\"text/javascript\"></script>\n<?php } else { ?>\n <script src=\"external/jquery1.7.2/jquery-1.7.2.min.js\"></script>\n <script src=\"external/jqueryui1.8.16/jquery-ui-1.8.16.custom.min.js\"></script>\n <script src=\"external/bootstrap2.3.2/bootstrap.js\" type=\"text/javascript\"></script>\n<?php } ?>\n <script src=\"external/choices9.0.0/choices.min.js\"></script>\n<?php if ($isDataTables) { ?>\n <script src=\"external/dataTables1.10.16/jquery.dataTables.js\"></script>\n<?php }\n if ($isRecaptcha) { ?>\n <script async defer id=\"recaptcha-script\" src=\"https://www.google.com/recaptcha/api.js\"></script>\n<?php }\n}", "protected function _injectJquery()\n {\n $options = $this->getOptions();\n $this->_view->headScript()->appendFile($options['cdn'] . '/js/jquery/jquery-' . $options['version'] . '.js');\n if ($options['plugins']) {\n foreach ($options['plugins']['plugin'] as $plugin) {\n $this->_view->headScript()->appendFile($options['cdn'] . $options['plugins']['basedir'] . '/' . $plugin);\n }\n }\n return $this->_view;\n }", "function bethel_move_jquery() {\n global $wp_scripts;\n foreach ($wp_scripts->registered as $k => $v) {\n if (substr($k, 0, 6) == 'jquery') {\n if (isset($wp_scripts->registered[$k]->ver) && isset($wp_scripts->registered[$k]->src) && $wp_scripts->registered[$k]->deps) {\n $ver = $wp_scripts->registered[$k]->ver;\n $src = $wp_scripts->registered[$k]->src;\n $deps = $wp_scripts->registered[$k]->deps;\n wp_deregister_script ($k);\n wp_register_script($k, $src, $deps, $ver, true);\n }\n }\n }\n}", "protected function loadJavascript() {}", "function jquery_init() {\n\tif (!is_admin()) :\n\t\twp_deregister_script('jquery');\n\t\twp_register_script('jquery', get_template_directory_uri() . '/static/js/jquery.min.js', false, '1.9.1', true);\n\t\t\n\t\twp_enqueue_script('jquery');\n\n\t\t// load infinite scroll jquery\n\t\twp_deregister_script('infinite_scroll');\n\t\twp_register_script( 'infinite_scroll', get_template_directory_uri() . '/static/js/jquery.infinitescroll.min.js', array('jquery'),null,true );\n\n\t\t// load manual-trigger.js jquery\n\t\twp_deregister_script('infinite_scroll_trigger');\n\t\twp_register_script( 'infinite_scroll_trigger', get_template_directory_uri() . '/static/js/manual-trigger.js', array('jquery'),null,true );\n\t\t\n\t\twp_enqueue_script('infinite_scroll');\n\t\twp_enqueue_script('infinite_scroll_trigger');\n\tendif;\n}", "function reassign_jQuery() {\n wp_deregister_script( 'jquery' );\n wp_deregister_script( 'jquery-core' );\n wp_deregister_script( 'jquery-migrate' );\n\n wp_register_script('jquery', 'https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js', array(), '3.4.1', true);\n wp_add_inline_script( 'jquery', \"window.jQuery || document.write('<script src=\\\"\".get_template_directory_uri() .\"/assets/jquery-3.4.1.min.js\\\">\\\\x3C/script>')\");\n \n wp_enqueue_script('jquery');\n\n}", "function isa_remove_jquery_migrate( &$scripts) {\n if(!is_admin()) {\n $scripts->remove( 'jquery');\n $scripts->add( 'jquery', false, array( 'jquery-core' ), '1.4.11' );\n }\n}", "function my_admin_scripts() {\n\t\t\t wp_deregister_script('jquery');\n\t\t\t wp_register_script('jquery', (\"https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js\"), false, null);\n\t\t\t wp_enqueue_script('jquery');\n\t\t\t wp_enqueue_script( 'jquery-migrate', 'https://code.jquery.com/jquery-migrate-3.0.1.min.js', array('jquery'), '3.0.1', false );\n\t\t}", "function axj_frontend_scripts() {\t\r\n if(!is_admin()){\r\n\r\n\t\twp_enqueue_script('jquery');\r\n \r\n\t}\r\n}", "function fondation_jquery_plugins ($scripts) {\n // récent et minifié.\n $jquery_location = find_in_path('javascripts/jquery.min.js');\n $jquery_location = preg_replace('#^../#', '', $jquery_location);\n $scripts[0] = $jquery_location;\n\n return $scripts;\n}", "function load_scripts() {\n\t\tglobal $redux_options;\n\t\twp_enqueue_script(\"jquery\");\n\n\t\t$bs = $redux_options['opt-bootstrap'];\n\n\t\tif ( $bs == 1 ) {\n\t\t\t//Load from CDN//\n\t\t\twp_enqueue_script( 'bootstrap-script', '//maxcdn.bootstrapcdn.com/bootstrap/3.3.2/js/bootstrap.min.js', array( 'jquery' ), '3.3.2', true );\n\t\t} elseif ( $bs == 2 ) {\n\t\t\t//Load from plugin//\n\t\t\twp_enqueue_script( 'bootstrap-script', dirname( __FILE__ ).'/assets/bootstrap/js/bootstrap.min.js', array( 'jquery' ), '3.3.2', true );\n\t\t} elseif ( $bs == 3 ) {\n\t\t\t//load from nowhere... They have it loaded elsewhere... lets check to be sure though\n\t\t} else {\n\t\t\t//load from plugin. (fallback)//\n\t\t\twp_enqueue_script( 'bootstrap-script', dirname( __FILE__ ).'/assets/bootstrap/js/bootstrap.min.js', array( 'jquery' ), '3.3.2', true );\n\t\t}\n\t\t\n\t\twp_enqueue_script( 'google-maps-api', 'http://maps.google.com/maps/api/js?sensor=false', array(), '3', false );\n\t}", "function blueauthentic_load_scripts() {\n\twp_enqueue_script( 'blueauthentic-jquery', 'https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js', array(), '3.5.1', true );\n}", "function rps_add_script()\n{\n\n if (!is_admin()) {\n\n wp_enqueue_script('jquery');\n\n }\n\n}", "public function getMyFirstJqueryImplementation() {\n $build['myelement'] = [\n '#theme' => 'mi_first_jquery',\n ];\n\n $build['mielement']['#attached']['library'][] = 'mi_javascript/mi_javascript.myfirstjquery';\n return $build;\n }", "function ajan_core_get_js_dependencies() {\n\treturn apply_filters( 'ajan_core_get_js_dependencies', array( 'jquery' ) );\n}", "function ctrl_login_scripts() {\r\n\twp_enqueue_script( 'jquery' );\r\n}", "public function sharethis_include_js();", "public function jquery($hook='',$addJqUi=false,$addUiTheme=false){\n \n $html=pinHtml::make('script')->type('text/javascript')->src($this->cfg_jquerylink);\n\n $in=pinInclusion::make('jq',$hook);\n $in->setContent($html->render());\n pinIncluder::i()->add($in);\n \n if($addJqUi){\n \n $html=pinHtml::make('script')->type('text/javascript')->src($this->cfg_jqueryuilink);\n\n $in=pinInclusion::make('jqui',$hook);\n $in->setContent($html->render());\n pinIncluder::i()->add($in);\n \n if($addUiTheme){\n \n $link=$this->cfg_jqueryuicsslink;\n $link=str_replace('{theme}',$this->cfg_jqueryuitheme,$link);\n \n $html=pinHtml::make('link')->rel('stylesheet')->href($link);\n \n $in=pinInclusion::make('jquicss',$hook)->overrideType('css');\n $in->setContent($html->render());\n \n pinIncluder::i()->add($in);\n \n }\n \n } \n \n return $in;\n \n }", "public function add_jquerey($extra=array()){\n\t\tif(is_string($extra)){\n\t\t\t$extra=array($extra);\n\t\t}\n\t\tif(!self::is_included(\"jquerey\")){\n\t\t\t$this->add_script(\"https://ajax.googleapis.com/ajax/libs/jquery/2.2.0/jquery.min.js\",\"./js/jq.js\");\n\t\t}\n\t\tself::$included[\"jquerey\"]=true;\n\t\t$libs=array(\n\t\t\t\t\"cookie\"=>\"https://cdn.jsdelivr.net/jquery.cookie/1.4.1/jquery.cookie.min.js\",\n\t\t\t\t\"lazy_load\"=>\"https://cdnjs.cloudflare.com/ajax/libs/jquery.lazyload/1.9.1/jquery.lazyload.min.js\"\n\t\t);\n\t\tforeach ($extra as $item){\n\t\t\tif (isset($libs[$item])){\n\t\t\t\tif(!self::is_included($item)){\n\t\t\t\t\t$this->add_script($libs[$item]);\n\t\t\t\t\tself::$included[$item]=true;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "function theme_page_javascript($custom_settings)\n{\n $theme_url = clearos_theme_url('AdminLTE');\n\n // The version is used to avoid upgrade/caching issues. Bump when required.\n $version = '7.0.0';\n\n // FIXME: review all of these\n return \"\n\n<script type='text/javascript' src='$theme_url/js/jquery.cookie.js'></script>\n<script type='text/javascript' src='$theme_url/js/jquery.base64.min.js'></script>\n<script type='text/javascript' src='$theme_url/js/jquery-ui-1.11.1.min.js'></script>\n<script type='text/javascript' src='$theme_url/js/bootstrap.min.js'></script>\n<script type='text/javascript' src='$theme_url/js/lightbox.min.js'></script>\n<script type='text/javascript' src='$theme_url/js/jquery.dotdotdot.min.js'></script>\n<script type='text/javascript' src='$theme_url/js/plugins/bootstrap-dialog/bootstrap-dialog.min.js'></script>\n<script type='text/javascript' src='$theme_url/js/plugins/metisMenu/jquery.metisMenu.js'></script>\n<script type='text/javascript' src='$theme_url/js/plugins/colorpicker/bootstrap-colorpicker.min.js'></script>\n<script type='text/javascript' src='$theme_url/js/plugins/datatables/jquery.dataTables.js'></script>\n<script type='text/javascript' src='$theme_url/js/plugins/datatables/dataTables.bootstrap.js'></script>\n<script type='text/javascript' src='$theme_url/js/plugins/datatables/jquery.dataTables.rowReordering.js'></script>\n<script type='text/javascript' src='$theme_url/js/plugins/bootstrap-slider/bootstrap-slider.js'></script>\n<script type='text/javascript' src='$theme_url/js/plugins/sparkline/jquery.sparkline.min.js'></script>\n<script type='text/javascript' src='$theme_url/js/plugins/flot/jquery.flot.min.js'></script>\n<script type='text/javascript' src='$theme_url/js/plugins/flot/jquery.flot.resize.min.js'></script>\n<script type='text/javascript' src='$theme_url/js/plugins/flot/jquery.flot.pie.min.js'></script>\n<script type='text/javascript' src='$theme_url/js/plugins/flot/jquery.flot.time.min.js'></script>\n<script type='text/javascript' src='$theme_url/js/plugins/flot/jquery.flot.stack.min.js'></script>\n<script type='text/javascript' src='$theme_url/js/plugins/flot/jquery.flot.categories.min.js'></script>\n<script type='text/javascript' src='$theme_url/js/jquery.flot.axislabels.js'></script>\n<script type='text/javascript' src='$theme_url/js/nav-menu-\" . $custom_settings['menu'] . \".js'></script>\n\n<!--[if IE 7]>\n\n<h1>Your browser is out of date, please update your browser by going to www.microsoft.com/download</h1>\n\n<![endif]-->\n\n<!-- Theme Javascript -->\n<script type='text/javascript' src='$theme_url/js/translations.js.php?v=$version'></script>\n<script type='text/javascript' src='$theme_url/js/widgets.js?v=$version'></script>\n<script type='text/javascript' src='$theme_url/js/marketplace.js?v=$version'></script>\n\n\n\";\n}", "function bweb_scripts() {\r\n wp_enqueue_script('jquery');\r\n}", "public function admin_js()\n\t\t{\n\t\t\twp_enqueue_script('jquery');\n\t\t}", "function upcode_loadJS(){\n if (!is_admin()){\n\t\t// desregistrando o jquery nativo e registrando o do CDN do Google.\n\t\twp_deregister_script('jquery');\n\t\twp_register_script('jquery', '//cdnjs.cloudflare.com/ajax/libs/jquery/3.2.1/jquery.min.js', false, '3.2.1');\n\t\twp_enqueue_script('jquery');\n\n\t\t$js = get_template_directory_uri() . '/assets/js/';\n\t\twp_enqueue_script('propper',\t\t\t\t'//cdnjs.cloudflare.com/ajax/libs/popper.js/1.11.0/umd/popper.min.js', ['jquery']);\n\t\twp_enqueue_script('bootstrap-min',\t'//maxcdn.bootstrapcdn.com/bootstrap/4.0.0-beta/js/bootstrap.min.js', ['jquery','propper']);\n\t\twp_enqueue_script('fancybox',\t\t\t\t'//cdn.rawgit.com/fancyapps/fancybox/master/dist/jquery.fancybox.min.js', ['jquery']);\n\t\twp_enqueue_script('slick',\t\t\t\t\t'//cdnjs.cloudflare.com/ajax/libs/slick-carousel/1.7.1/slick.min.js', ['jquery']);\n\t\twp_enqueue_script('fontawesome',\t\t'//use.fontawesome.com/releases/v5.0.8/js/all.js', ['jquery']);\n\t\twp_enqueue_script('v4-shims',\t\t\t\t'//use.fontawesome.com/releases/v5.0.8/js/v4-shims.js', ['jquery']);\n\n\t\twp_enqueue_script('offcanvas',\t\t$js . 'bootstrap.offcanvas.min.js', ['jquery']);\n\t\twp_enqueue_script('acf-maps', \t\t$js . 'maps.js', ['jquery']);\n\t\twp_enqueue_script('mask', \t\t\t\t$js . 'jquery.mask.min.js', ['jquery']);\n\t\twp_enqueue_script('codigo', \t\t\t$js . 'codigo.js', ['jquery']);\n }\n}", "function wpbootstrap_scripts_with_jquery()\n{\n\twp_register_script('jquery', get_template_directory_uri(). '/assetts/js/jquery-migrate-1.4.1.min.js');\n\twp_enqueue_script('jquery');\n\twp_register_script( 'bootstrap-js', get_template_directory_uri() . '/bootstrap/js/bootstrap.js', array( 'jquery' ) );\n\t// For either a plugin or a theme, you can then enqueue the script:\n\twp_enqueue_script( 'bootstrap-js' );\n}", "public function getjQuery() {\n return $this->CDN['jquery'];\n }", "private function coreJs() {\n $corejs = '';\n $corejs .= '\n <script src=\"' . $this->baseUrl(\"assets/js/jquery.min.js\") . '\" type=\"text/javascript\"></script>\n <script src=\"' . $this->baseUrl(\"assets/js/bootstrap.min.js\") . '\" type=\"text/javascript\"></script>\n <script src=\"' . $this->baseUrl(\"assets/js/bootstrap-hover-dropdown.min.js\") . '\" type=\"text/javascript\"></script>\n <script src=\"' . $this->baseUrl(\"assets/js/material.min.js\") . '\"></script>\n <script src=\"' . $this->baseUrl(\"assets/js/nouislider.min\") . '\"></script>\n <script src=\"' . $this->baseUrl(\"plugins/mdb/js/mdb.min.js\") . '\"></script>\n <script src=\"' . $this->baseUrl(\"plugins/mdb/js/tether.min.js\") . '\"></script>\n <script src=\"' . $this->baseUrl(\"plugins/x_lbd_free_v1.3/assets/js/pro/bootstrap-selectpicker.js\") . '\"></script>';\n\n return $corejs;\n }", "function defer_parsing_of_js( $url ) {\r\n if ( is_user_logged_in() ) return $url; //don't break WP Admin\r\n if ( FALSE === strpos( $url, '.js' ) ) return $url;\r\n if ( strpos( $url, 'jquery.js' ) ) return $url;\r\n return str_replace( ' src', ' defer src', $url );\r\n}", "function javascript( $params ){\n\t\n\t\t$document =& JFactory::getDocument();\n\t\t// if load mootools lib.\n\t\tif( $params->get('mootools') ) {\n\t\t\t$document->addScript( JURI::base().'modules/mod_ja_contentslide/js/mootools.v1.1.pak.js' );\n\t\t}\n\t\t$document->addScript( JURI::base().'modules/mod_ja_contentslide/assets/js/ja_contentslide.js' );\n\t}", "static function wck_fep_enqueue_scripts(){\n\t\twp_enqueue_script( 'jquery' );\n\t}", "function ch9pud_load_scripts() {\r\n\twp_enqueue_script( 'jquery' );\r\n\tadd_thickbox();\r\n}", "public function ot_ccpa_plugin_scripts() {\n\t\twp_enqueue_script( 'jquery' );\n\t}", "public static function bootstrap() {\n if(JVERSION < 3.0) {\n JHTML::_('stylesheet', 'media/com_cmc/css/bootstrap.css');\n JHTML::_('script', 'media/com_cmc/backend/js/jquery.min.js');\n JHTML::_('script', 'media/com_cmc/backend/js/bootstrap.min.js');\n }\n }", "function rb_load_javascript()\n{\n wp_enqueue_script(\n 'rb-main-javascript',\n get_stylesheet_directory_uri() . '/main.js',\n array( 'jquery' )\n );\n wp_enqueue_script(\"myUi\",\"https://ajax.googleapis.com/ajax/libs/jqueryui/1.8.8/jquery-ui.min.js\");\n}", "protected function loadJavaScripts()\n {\n $this->pageRenderer->loadJquery();\n $this->pageRenderer->loadRequireJsModule('bootstrap');\n $this->pageRenderer->loadRequireJsModule('TYPO3/CMS/Backend/ContextHelp');\n $this->pageRenderer->loadRequireJsModule('TYPO3/CMS/Backend/DocumentHeader');\n $this->pageRenderer->loadRequireJsModule('TYPO3/CMS/Backend/SplitButtons');\n }", "function jquery_loadinganimation_init() {\n $module_path = drupal_get_path('module', 'exam');\n $js_settings = _jquery_loadinganimation_get_settings();\n drupal_add_js(array('jquery_loadinganimation' => $js_settings), 'setting');\n drupal_add_js($module_path . '/js/jquery_loadinganimation.js');\n drupal_add_css($module_path . '/css/jquery_loadinganimation.css');\n}", "function load_custom_files(){\n\n wp_register_script(\n 'custom-script',\n get_stylesheet_directory_uri().'/js/custom.js',\n array('jquery')\n ); \n wp_enqueue_script('custom-script');\n\n wp_register_script(\n 'jquery-steps',\n get_stylesheet_directory_uri().'/js/jquery.steps.min.js',\n array('jquery')\n ); \n wp_enqueue_script('jquery-steps');\n\n wp_register_script(\n 'jquery-validate',\n get_stylesheet_directory_uri().'/js/jquery.validate.js',\n array('jquery')\n ); \n wp_enqueue_script('jquery-validate');\n\n wp_register_script(\n 'jquery-methods',\n get_stylesheet_directory_uri().'/js/additional-methods.min.js',\n array('jquery')\n ); \n wp_enqueue_script('jquery-methods');\n\n wp_register_style(\n 'jquery-steps-style',\n get_stylesheet_directory_uri().'/css/jquery.steps.css'); \n wp_enqueue_style('jquery-steps-style');\n\n }", "function my_jquery_enqueue(){\n\twp_deregister_script('jquery'); // this deregisters the current jquery included in wordpress\n\twp_register_script('jquery', \"http\" . ($_SERVER['SERVER_PORT'] == 443 ? \"s\" : \"\") . \"://ajax.googleapis.com/ajax/libs/jquery/1.12.0/jquery.min.js\", false, null);\n\twp_enqueue_script('jquery');\n}", "public function getHeadJavascript()\n\t{\n\n $url = Config::$url;\n $googleAnalyticsToken = Config::$googleAnalyticsToken;\n\n\t\treturn<<<js\n<script type=\"text/javascript\" data-comment=\"Google Analytics\">\n var _gaq = _gaq || [];\n _gaq.push(['_setAccount', '$googleAnalyticsToken']);\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</script>\n\n<!-- package-javascript\nAll external javascript file, including the minified SNAP javascript,\nare listed here and in the project makefile to be bundled into a single\njavascript file. The 'package-javascript' and 'end-package' tokens\nare used to determine the region to be replaced with a single script inclusion.\n\nIf you add a file here, you must add it to the makefile for packaging. See the README in the js/ directory.\n-->\n<script src=\"js/underscore-min.js\" type=\"text/javascript\" ></script>\n<script src=\"js/jquery-1.8.2.min.js\" type=\"text/javascript\" ></script>\n<script src=\"js/jquery.blockUI.js\" type=\"text/javascript\" ></script>\n<script src=\"js/jquery.hoverIntent.minified.js\" type=\"text/javascript\"></script>\n<script src=\"js/jquery.cycle.all.js\" type=\"text/javascript\"></script>\n<script src=\"js/jquery.url.js\" type=\"text/javascript\"></script>\n<script src=\"js/plugins.js\" type=\"text/javascript\"></script>\n<script src=\"js/highcharts.js\" type=\"text/javascript\"></script>\n<script src=\"js/exporting.src.js\" type=\"text/javascript\"></script>\n<script src=\"js/jquery-ui-1.8.24.custom.min.js\" type=\"text/javascript\"></script>\n<script src=\"js/jquery.ba-hashchange.min.js\" type=\"text/javascript\"></script>\n<script src=\"js/jquery.validate.min.js\" type=\"text/javascript\"></script>\n<script src=\"js/jquery.ba-bbq.min.js\" type=\"text/javascript\"></script>\n<script src=\"js/jquery.scrollTo-min.js\" type=\"text/javascript\"></script>\n\n<script src=\"js/licenseModal.js\" type=\"text/javascript\"></script>\n<script src=\"js/charts.js\" type=\"text/javascript\"></script>\n<script src=\"js/maps.js\" type=\"text/javascript\"></script>\n<!-- end-package -->\n\n<script type=\"text/javascript\">\n\n// Interpolate server-side configs as appropriate\nwindow.snapConfig = {\n url: '$url',\n geonetworkMetadataUrl: 'http://athena.snap.uaf.edu:8080/geonetwork/srv/en/metadata.show.embedded?id=',\n dataPath: '/data/'\n}\n</script>\n\njs;\n\t}", "function custom_login_enqueue_scripts()\n{\n wp_enqueue_script('jquery');\n}", "protected function get_jquery_url() {\n\t\t$version = $GLOBALS['wp_scripts']->registered['jquery']->ver;\n\t\t$script_debug = ( defined( 'SCRIPT_DEBUG' ) ? SCRIPT_DEBUG : false );\n\t\t$ext = ( $script_debug ? '.min' : '' ) . '.js';\n\t\t$source = static::$jquery_source;\n\n\t\tswitch ( $source ) {\n\t\t\tcase 'google-cdn' :\n\t\t\t\treturn 'https://ajax.googleapis.com/ajax/libs/jquery/' . $version . '/jquery' . $ext;\n\t\t\tbreak;\n\t\t\tcase 'jquery-cdn' :\n\t\t\t\treturn 'https://code.jquery.com/jquery-' . $version . $ext;\n\t\t\tbreak;\n\t\t}\n\t}", "function wpbootstrap_scripts_with_jquery() {\n wp_register_script('custom-script', get_template_directory_uri() . '/js/bootstrap.js', array('jquery'));\n wp_enqueue_script('custom-script');\n}", "function mocca_script_files() {\n\n wp_deregister_script('jquery'); // Remove Registeration Old JQuery\n wp_register_script('jquery', includes_url('/js/jquery/jquery.js'), false, '', true); // Register a New JQuery in Footer\n wp_enqueue_script('jquery'); // Enqueue New JQuery\n wp_enqueue_script('popper-js', get_template_directory_uri() . '/js/popper.min.js', array(), false, true);\n wp_enqueue_script('bootstrap-js', get_template_directory_uri() . '/js/bootstrap.min.js', array(), false, true);\n }", "public function jquery() {\n\t\t$this->JqueryExample->recursive = 0;\n\t\t$this->set('examples', $this->JqueryExample->find('all'));\n\t}", "function pegasus_child_bootstrap_js() {\r\n\t\t\r\n\t\twp_enqueue_script( 'pegasus_custom_js', get_stylesheet_directory_uri() . '/js/pegasus-custom.js', array(), '', true );\r\n\t\t\r\n\t\t//wp_enqueue_script( 'matchHeight_js', get_stylesheet_directory_uri() . '/js/jquery.matchHeight-min.js', array(), '', true );\r\n\t\t\r\n\t\t\r\n\t}", "public function loadScripts() {\n $graphcss = $this->getProperty('graphcss');\n $customcss = $this->getProperty('customcss');\n $loadjquery = $this->getProperty('loadjquery');\n\n $cssUrl = $this->sekug->config['cssUrl'].'web/';\n $jsUrl = $this->sekug->config['jsUrl'].'web/';\n\n if($loadjquery == 1){\n $this->modx->regClientStartupScript($jsUrl.'libs/'.$this->sekug->config['jqueryFile']);\n }\n if($customcss>''){\n $this->modx->regClientCSS($this->modx->getOption('assets_url').$customcss);\n } else {\n $this->modx->regClientCSS($cssUrl.'gallery.structure.css');\n }\n if($graphcss>''){\n $this->modx->regClientCSS($this->modx->getOption('assets_url').$graphcss);\n } else {\n $this->modx->regClientCSS($cssUrl.'directory.graph.css');\n }\n }", "function my_init() {\n\tif (!is_admin()) {\n\t\twp_deregister_script( 'jquery' );\n\t\twp_register_script\t( 'jquery', 'http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js', false, '1.4.2', true );\n\t\twp_register_script\t( 'jquery', 'http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.0/jquery-ui.min.js', false, '1.8.0', true );\n\t\twp_register_script\t( 'jqtools', 'http://cdn.jquerytools.org/1.1.2/tiny/jquery.tools.min.js' );\n\t\twp_enqueue_script\t( 'jquery' );\n\t\twp_enqueue_script\t( 'jqueryui' );\n\t\twp_enqueue_script\t( 'thickbox' );\n\t\t\n\t\t// load a JS file from my theme: js/theme.js\n\t\twp_enqueue_script\t( 'my_script', get_bloginfo('template_url').'/js/actions.js', \n\t\t\t\t \tarray\t( 'jquery', 'jqueryui', 'thickbox' ), '1.0', true);\n\t}\n}", "public function getJavaScripts()\n {\n return array(\n '/ullCorePlugin/js/jq/jquery-min.js', \n );\n }", "public function get_js($path='')\n\t{\n if ( $r = $this->get_view($path, 'js') ){\n return '\n<script>\n(function($){\n'.$r.'\n})(jQuery);\n</script>';\n }\n\t\treturn false;\n }", "function load_script() {\n \n wp_enqueue_script('jquery');\t\n\n wp_enqueue_script(\"fancy\",\n get_template_directory_uri() . '/js/fancy.js','','',true );\n\n wp_enqueue_script(\"wp-seo-admin\",\n get_template_directory_uri() . '/js/wp-seo-admin.js','','',true );\n\n wp_enqueue_script(\"wp-seo-metabox\",\n get_template_directory_uri() . '/js/wp-seo-metabox.js','','',true );\n \n wp_enqueue_script(\"core\",\n get_template_directory_uri() . '/js/core.js','','',true );\n \n wp_enqueue_script(\"main\",\n get_template_directory_uri() . '/js/main.js','','',true );\n\n wp_enqueue_script(\"file_a\",\n get_template_directory_uri() . '/js/core.js','','',true );\n \n \n \n}", "function remove_jquery_wordpress( $scripts ) {\n if ( !is_admin() ) {\n $script = $scripts->registered['jquery'];\n \n if ( $script->deps ) { \n $script->deps = array_diff( $script->deps, array( 'jquery-core', 'jquery-migrate' ) );\n \n }\n }\n }", "function load_custom_scripts() {\n\t//slidebars\n\twp_enqueue_script('slidebars', THEMEROOT . '/js/slidebars.min.js', array('jquery'), '0.13.3', true);\n\t//bootstrap\n\twp_enqueue_script('bootstrap', THEMEROOT . '/js/bootstrap.min.js', array('jquery'), '3.3.6', true);\n\t//fancybox\n\twp_enqueue_script('fancybox', THEMEROOT . '/js/jquery.fancybox.pack.js', array('jquery'), '2.1.5', true);\n\t//valitate\n\twp_enqueue_script('validate', THEMEROOT . '/js/jquery.validate.min.js', array('jquery'), '1.15', true);\n\t\n\t//script\n\twp_enqueue_script('custom_script', THEMEROOT . '/js/scripts.js', array('jquery'), false, true);\n}", "public static function em_enqueue_scripts(){\n\t\twp_enqueue_script('events-manager-pro', plugins_url('includes/js/events-manager-pro.js',__FILE__), array('jquery'), EMP_VERSION); //jQuery will load as dependency\n\t}", "public function loadHeaderJS() {\n\t\tglobal $m, $a;\n\t\t\n\t\t// load the js base.php\n\t\tinclude apmgetConfig ( 'root_dir' ) . '/js/base.php';\n\t\t\n\t\t// Search for the javascript files to load.\n\t\tif (! isset ( $m )) {\n\t\t\treturn;\n\t\t}\n\t\t$root = apm_BASE_DIR;\n\t\tif (substr ( $root, - 1 ) != '/') {\n\t\t\t$root .= '/';\n\t\t}\n\t\t\n\t\t$base = apm_BASE_URL;\n\t\tif (substr ( $base, - 1 ) != '/') {\n\t\t\t$base .= '/';\n\t\t}\n\t\t// Load the basic javascript used by all modules.\n\t\techo '<script type=\"text/javascript\" src=\"' . $base . 'js/base.js\"></script>';\n\t\t\n\t\t$this->getModuleJS ( $m, $a, true );\n\t}", "function flexiauto_scripts_loader() {\n\t\t/* Load custom styles */\n\t\twp_enqueue_style('reset', TPL_DIR . '/assets/css/vendor/reset.css');\n\t\twp_enqueue_style('bootstrap-styles', TPL_DIR . '/assets/css/vendor/bootstrap.min.css');\n\t\twp_enqueue_style('flexi-styles', TPL_DIR . '/assets/css/flexi.min.css');\n\n\t\t/* Load custom scripts */\n\t\twp_deregister_script('jquery');\n\t\twp_register_script('jquery', TPL_DIR . '/assets/js/vendor/jquery.min.js', array(), false, true);\n\t\twp_enqueue_script('jquery');\n\n\t\twp_enqueue_script('bootstrap-scripts', TPL_DIR . '/assets/js/vendor/bootstrap.min.js', array(), false, true);\n\t\twp_enqueue_script('nicescroll', TPL_DIR . '/assets/js/vendor/jquery.nicescroll.min.js', array(), false, true);\n\t\twp_enqueue_script('jquery-validate', TPL_DIR . '/assets/js/vendor/jquery.validate.min.js', array(), false, true);\n\t\twp_enqueue_script('match-height', TPL_DIR . '/assets/js/vendor/jquery.matchHeight.min.js', array(), false, true);\n\t\twp_enqueue_script('flexi-scripts', TPL_DIR . '/assets/js/flexi.min.js', array(), false, true);\n\n\t}", "function zurpal_js_alter(&$javascript)\n{\n// Swap out jQuery to use an updated version of the library.\n $javascript['misc/jquery.js']['data'] = drupal_get_path('theme', 'zurpal') . '/javascripts/foundation/jquery.js';\n $javascript['misc/jquery.js']['version'] = '1.9.0';\n //drupal_static_reset('drupal_add_js');\n}", "function jlc_scripts() {\r\n\t\r\n echo '<!--[if lt IE 9]>';\r\n echo '\t<script src=\"http://html5shim.googlecode.com/svn/trunk/html5.js\"></script>';\r\n echo '\t<script stc=\"'. TEMPPATH.'/js/respond.min.js\"></script>';\r\n echo '<![endif]-->';\r\n\t\r\n}", "public static function getJQueryHandler()\r\n {\r\n return ((self::getNoConflictMode()==true)?'$j':'$');\r\n }", "function gre_search_scripts()\n{\n\t// page it will not load the jquery script\n\tif(!is_admin())\n\t{\n\t\twp_enqueue_script(array('jquery','jquery-ui-core','jquery-ui-tabs'));\n\t\twp_enqueue_script('tabs','/wp-content/plugins/gre-search/js-includes/tabs.js');\n\t}\n}", "function js_include()\n {\n $args = func_get_args();\n\n $js_lookup_table = [\n 'jquery' => '/ext/jquery-3.1.1.min.js',\n 'tinymce' => '/ext/tinymce/tinymce.min.js',\n 'pagination' => '/ext/pagination.min.js',\n 'featherlight' => '/ext/featherlight.min.js',\n 'featherlight-gallery' => '/ext/featherlight.gallery.min.js',\n 'chosen' => '/ext/chosen_v1.6.2/chosen.jquery.min.js',\n 'qtip' => '/ext/jquery.qtip.min.js'\n ];\n\n foreach( $args as $arg )\n {\n if( isset( $js_lookup_table[$arg] ) )\n $arg = $js_lookup_table[$arg];\n\n echo \"<script src=\\\"/common/js/$arg\\\"></script>\";\n }\n }", "function js_scripts() {\n\tif( !is_admin() ){\n\t\twp_deregister_script( 'jquery' );\n\t\twp_register_script\t( 'jquery', 'http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js', false, '1.4.2', true );\n\t\twp_register_script\t( 'jquery', 'http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.2/jquery-ui.min.js', false, '1.8.2', true );\n\t\twp_register_script\t( 'jqtools', \n'http://cdn.jquerytools.org/1.2.3/jquery.tools.min.js' );\n\t\twp_enqueue_script\t( 'jquery' );\n\t\twp_enqueue_script\t( 'jqueryui' );\n\t\twp_enqueue_script\t( 'thickbox' );\n\t\t// load a JS file from my theme: js/theme.js\n\t\twp_print_scripts ( 'globaljs', get_bloginfo('template_url').'/js/global.js', \n\t\t\t\t \tarray\t( 'jquery', 'jqueryui', 'thickbox' ), '1.0', true);\n\t}\n}", "function headerJS() {\n\t\tglobal $use_tooltips;\n\n\t\techo html_e('script', array('type' => 'text/javascript', 'src' => util_make_uri('/js/common.js')), '', false);\n\t\tplugin_hook(\"javascript_file\");\n\n\t\t// invoke the 'javascript' hook for custom javascript addition\n\t\t$params = array('return' => false);\n\t\tplugin_hook(\"javascript\", $params);\n\t\t$javascript = $params['return'];\n\t\tif($javascript) {\n\t\t\techo html_ao('script', array('type' => 'text/javascript')).'//<![CDATA['.\"\\n\";\n\t\t\techo $javascript;\n\t\t\techo \"\\n\".'//]]'.\"\\n\";\n\t\t\techo html_ac(html_ap() -1);\n\t\t}\n\t\thtml_use_storage();\n\t\thtml_use_coolfieldset();\n\t\thtml_use_jqueryui();\n\t\techo $this->getJavascripts();\n\t\techo html_ao('script', array('type' => 'text/javascript'));\n\t\techo '\t//<![CDATA[\n\t\t\tjQuery(window).load(function(){\n\t\t\t\tsetTimeout(\"jQuery(\\'.feedback\\').hide(\\'slow\\')\", 5000);\n\t\t\t\tsetInterval(function() {\n\t\t\t\t\t\tsetTimeout(\"jQuery(\\'.feedback\\').hide(\\'slow\\')\", 5000);\n\t\t\t\t\t}, 5000);\n\t\t\t});\n\t\t\t//]]>'.\"\\n\";\n\t\techo html_ac(html_ap() -1);\n\t\tif ($use_tooltips) {\n\t\t\techo html_ao('script', array('type' => 'text/javascript'));\n\t\t\techo '\t//<![CDATA[\n\t\t\t\tjQuery(document).ready(\n\t\t\t\t\tfunction() {\n\t\t\t\t\t\tjQuery(document).tooltip();\n\t\t\t\t\t}\n\t\t\t\t);\n\t\t\t//]]>'.\"\\n\";\n\t\t\techo html_ac(html_ap() -1);\n\t\t}\n\t}", "public function includeBaseClientScripts()\n {\n if (defined('OPENBIZ_JSLIB_BASE') && OPENBIZ_JSLIB_BASE == 'JQUERY') {\n Openbizx::$app->getClientProxy()->appendScripts(\"jquery\", \"jquery.js\");\n Openbizx::$app->getClientProxy()->appendScripts(\"jquery_class\", \"jquery.class.js\");\n Openbizx::$app->getClientProxy()->appendScripts(\"jquery_dollarj\", \"<script>try{var \\$j=\\$;}catch(e){}</script>\", false);\n Openbizx::$app->getClientProxy()->appendStyles(\"default\", \"openbiz.css\");\n if (DeviceUtil::$PHONE_TOUCH) {\n Openbizx::$app->getClientProxy()->appendScripts(\"openbiz\", \"openbiz.mobile.js\");\n Openbizx::$app->getClientProxy()->appendScripts(\"jquery_mobile\", \"jqm/jquery.mobile-1.0.js\");\n $style = \"<link rel=\\\"stylesheet\\\" href=\\\"\" . Openbizx::$app->getJsUrl() . \"/jqm/jquery.mobile-1.0.css\\\" type=\\\"text/css\\\">\";\n Openbizx::$app->getClientProxy()->appendStyles(\"jquery_mobile_css\", $style, false);\n } else {\n Openbizx::$app->getClientProxy()->appendScripts(\"openbiz\", \"openbiz.js\");\n Openbizx::$app->getClientProxy()->appendScripts(\"jquery_ui\", \"jquery-ui-1.8.16.custom.min.js\");\n $style = \"<link rel=\\\"stylesheet\\\" href=\\\"\" . Openbizx::$app->getJsUrl() . \"/jquery-ui/ui-lightness/jquery-ui-1.8.16.custom.css\\\" type=\\\"text/css\\\">\";\n $style .= \"<link rel=\\\"stylesheet\\\" href=\\\"\" . Openbizx::$app->getJsUrl() . \"/jquery-ui/ui-openbiz/jquery.css\\\" type=\\\"text/css\\\">\";\n Openbizx::$app->getClientProxy()->appendStyles(\"jquery_ui_css\", $style, false);\n }\n return;\n }\n // prototype is still the default js lib\n Openbizx::$app->getClientProxy()->appendScripts(\"prototype\", \"prototype.js\");\n Openbizx::$app->getClientProxy()->appendScripts(\"scriptaculous\", \"scriptaculous.js\");\n Openbizx::$app->getClientProxy()->appendScripts(\"effects\", \"effects.js\");\n Openbizx::$app->getClientProxy()->appendScripts(\"controls\", \"controls.js\");\n Openbizx::$app->getClientProxy()->appendScripts(\"cookies\", \"cookies.js\");\n Openbizx::$app->getClientProxy()->appendScripts(\"openbiz\", \"openbiz.js\");\n Openbizx::$app->getClientProxy()->appendStyles(\"default\", \"openbiz.css\");\n // window lib\n Openbizx::$app->getClientProxy()->includePropWindowScripts();\n // validator lib\n //Openbizx::$app->getClientProxy()->includeValidatorScripts();\n }", "function wpbootstrap_scripts_with_jquery(){\n\twp_register_script('custom-script', get_template_directory_uri() . '/bootstrap/js/bootstrap.min.js', array('jquery'));\n\t// For either a plugin or a theme you can then enqueue the script:\n\twp_enqueue_script('custom-script');\n}" ]
[ "0.73895353", "0.7308346", "0.70310694", "0.69575804", "0.6801034", "0.6753949", "0.6745668", "0.6687953", "0.6637959", "0.6535437", "0.64814067", "0.6475303", "0.64188313", "0.64164686", "0.63970256", "0.63919723", "0.63918436", "0.6379465", "0.6359399", "0.63486856", "0.6323289", "0.6264574", "0.6217715", "0.6217303", "0.61998785", "0.6171078", "0.6141307", "0.6122824", "0.6107577", "0.6105418", "0.6101731", "0.61001223", "0.6093998", "0.60904825", "0.6077054", "0.60638744", "0.60230726", "0.60140705", "0.6006421", "0.5983912", "0.5962388", "0.5940792", "0.59307575", "0.5927663", "0.590768", "0.59047127", "0.5900301", "0.5880719", "0.5879768", "0.5849646", "0.58463454", "0.5840043", "0.5823943", "0.5808151", "0.5791365", "0.5790148", "0.5788406", "0.5778006", "0.577178", "0.576838", "0.57663745", "0.57639027", "0.5763883", "0.5755547", "0.5739966", "0.573238", "0.57293797", "0.5714017", "0.5709929", "0.57059425", "0.5701907", "0.56921065", "0.56896466", "0.5687127", "0.56641906", "0.5650458", "0.5634054", "0.5632721", "0.5620168", "0.5616733", "0.5611559", "0.5606605", "0.5606275", "0.56026185", "0.5591675", "0.5587177", "0.5581733", "0.5579967", "0.55750525", "0.55747414", "0.5569024", "0.5568854", "0.55555326", "0.55555177", "0.5553155", "0.55511796", "0.55412763", "0.55400074", "0.5539837", "0.5539705" ]
0.7942782
0
Change the current app locale variable
public function switchLang($locale) { if( array_key_exists($locale, Config::get('translatable')['locales']) ) { App::setLocale($locale); } return Redirect::back(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function settingLocale() {}", "public function setLocale()\n\t{\n\t\tif ($locale = $this->app->session->get('admin_locale'))\n\t\t{\n\t\t\t$this->app->setLocale($locale);\n\t\t} else {\n \\Session::put('admin_locale', \\Config::get('app.locale'));\n }\n\t}", "function restore_current_locale()\n {\n }", "function setLocale($locale);", "public function restore_current_locale()\n {\n }", "function switch_to_locale($locale)\n {\n }", "public function setLocale($val)\n {\n $this->locale = $val;\n }", "public function changeLocale($current_route){\n\t\tif(strlen($current_route) <= 2){\n\t\t\t$CountryLanguage = CountryLanguage::where('wp_language', $current_route)->first();\n\t\t\tif(isset($CountryLanguage) && !empty($CountryLanguage->language_code)){\n\t\t\t\tConfig::set('app.locale', $CountryLanguage->language_code);\n\t\t\t}\n\t\t}\n\t}", "private function set_locale() {\n\n\t\t$plugin_i18n = new Soisy_Pagamento_Rateale_i18n();\n\n\t\t$this->loader->add_action( 'plugins_loaded', $plugin_i18n, 'load_plugin_textdomain' );\n\t}", "private function set_locale() {\n\n if (function_exists('determine_locale')) {\n $locale = determine_locale();\n } else {\n // @todo Remove when start supporting WP 5.0 or later.\n $locale = is_admin() ? get_user_locale() : get_locale();\n }\n $locale = apply_filters('plugin_locale', $locale, 'careerfy-frame');\n \n unload_textdomain('careerfy-frame');\n load_textdomain('careerfy-frame', WP_LANG_DIR . '/plugins/careerfy-frame-' . $locale . '.mo');\n load_plugin_textdomain('careerfy-frame', false, dirname(dirname(plugin_basename(__FILE__))) . '/languages');\n }", "private function set_locale() {\n\n\t\t$plugin_i18n = new I18n();\n\n\t\t$this->loader->add_action( 'plugins_loaded', $plugin_i18n, 'load_plugin_textdomain' );\n\n\t}", "private function set_locale() {\n\n\t\t$plugin_i18n = new Service_Tracker_i18n();\n\n\t\t$this->loader->add_action( 'plugins_loaded', $plugin_i18n, 'load_plugin_textdomain' );\n\n\t}", "public function setCurrentLocale($currentLocale);", "private function set_locale() {\n\n\t\t$plugin_i18n = new APS_I18n();\n\n\t\t$this->loader->add_action( 'plugins_loaded', $plugin_i18n, 'load_plugin_textdomain' );\n\n\t}", "function _setlocale($category, $locale)\r\n\t{\r\n\t\tglobal $CURRENTLOCALE, $EMULATEGETTEXT;\r\n\t\tif ($locale === 0) { // use === to differentiate between string \"0\"\r\n\t\t\tif ($CURRENTLOCALE != '')\r\n\t\t\t\treturn $CURRENTLOCALE;\r\n\t\t\telse\r\n\t\t\t// obey LANG variable, maybe extend to support all of LC_* vars\r\n\t\t\t// even if we tried to read locale without setting it first\r\n\t\t\t\treturn _setlocale($category, $CURRENTLOCALE);\r\n\t\t} else {\r\n\t\t\tif (function_exists('setlocale')) {\r\n\t\t\t\t$ret = setlocale($category, $locale);\r\n\t\t\t\tif (($locale == '' and !$ret) or // failed setting it by env\r\n\t\t\t\t\t($locale != '' and $ret != $locale)) { // failed setting it\r\n\t\t\t\t\t// Failed setting it according to environment.\r\n\t\t\t\t\t$CURRENTLOCALE = _get_default_locale($locale);\r\n\t\t\t\t\t$EMULATEGETTEXT = 1;\r\n\t\t\t\t} else {\r\n\t\t\t\t\t$CURRENTLOCALE = $ret;\r\n\t\t\t\t\t$EMULATEGETTEXT = 0;\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\t// No function setlocale(), emulate it all.\r\n\t\t\t\t$CURRENTLOCALE = _get_default_locale($locale);\r\n\t\t\t\t$EMULATEGETTEXT = 1;\r\n\t\t\t}\r\n\t\t\t// Allow locale to be changed on the go for one translation domain.\r\n\t\t\tglobal $text_domains, $default_domain;\r\n\t\t\tif (array_key_exists($default_domain, $text_domains)) {\r\n\t\t\t\tunset($text_domains[$default_domain]->l10n);\r\n\t\t\t}\r\n\t\t\treturn $CURRENTLOCALE;\r\n\t\t}\r\n\t}", "public function locale();", "function dev_change_locale( $locale ) {\n\n $dev_locale = filter_input( INPUT_GET, 'dev_lang', FILTER_SANITIZE_STRING );\n\n\tif ( ! empty( $dev_locale ) ) {\n\t\t$locale = $dev_locale;\n\t}\n\n\treturn $locale;\n}", "private function set_locale()\n {\n\n $plugin_i18n = new myFOSSIL_Resources_i18n();\n $plugin_i18n->set_domain( $this->get_plugin_name() );\n\n $this->loader->add_action( 'plugins_loaded', $plugin_i18n,\n 'load_plugin_textdomain' );\n\n }", "function setLocale($key) {\n\t\t\t$this->locale = $key;\n\t\t}", "public function setLocale($locale);", "function default_locale()\n{\n return Config::getDefaultLocale();\n}", "function site_locale($locale = null)\n{\n if ($locale) {\n return config(['app.locale' => $locale]);\n }\n\n return config('app.locale');\n}", "public function settingLanguage() {}", "function set_locale($locale) {\n\t\t\t$this->i18n_locale = $locale;\n\t\t\treturn $this->i18n_locale;\n\t\t}", "public function setLocale()\n {\n $lang = Request::segment(2);\n\n try {\n $this->language->set($lang);\n return Redirect::back();\n } catch (Exception $e) {\n //show error\n }\n }", "function getDefaultLocale();", "public function getLocale(): string;", "public function getLocale(): string;", "public function getLocale(): string;", "public function getLocale()\n {\n return 'en';\n }", "function restore_previous_locale()\n {\n }", "function locale(string $locale = null)\n{\n if (!$locale) {\n return app('translator')->getLocale();\n }\n\n app('translator')->setLocale($locale);\n}", "function getLocale();", "function setLocale($localename)\r\n\t{\r\n\t\t$this->pathLocale = $localename;\r\n\t\t$f = $this->_getFileName();\r\n\t\t/* load language configuration */\r\n\t\tif (file_exists($f))\r\n\t\t{\r\n\t\t\tglobal $tmp;\r\n\t\t\tinclude($f);\r\n\t\t\tif ($this->varMode == 'names')\r\n\t\t\t{\r\n#\t\t\t\t$this->lang = array_merge($this->lang, ${$this->varName});\r\n\t\t\t\t$this->lang = ${$this->varName};\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public function getLocale() {}", "public function setLocale($locale = null);", "public static function setLocale($locale){\n \\Illuminate\\Foundation\\Application::setLocale($locale);\n }", "public function getLocale();", "public function getLocale();", "function setWpLocale($lang) {\n\t$localLocale = $_COOKIE['dk_locale'];\n\t$currentSite = get_current_blog_id();\n\t$siteDetail = get_blog_details($currentSite);\n\n\tif ($localLocale == 'en_CA' || $currentSite == '3') {\n\t\t$val = 'en_CA';\n\t\theader( 'Location: '. $siteDetail->siteurl);\n\t\tsetcookie(\"dk_locale\", $val, time()+3600*24);\n\t\tsetlocale(LC_MONETARY, $val);\n\n\t\treturn $val;\n\t} else if($localLocale == 'fr_CA' || $currentSite == '2') {\n\t\t$val = 'fr_CA';\n\t\theader( 'Location: '. $siteDetail->siteurl);\n\t\tsetcookie(\"dk_locale\", $val, time()+3600*24);\n\t\tsetlocale(LC_MONETARY, $val);\n\n\t\treturn $val;\n\t} else {\n\t\tsetcookie(\"dk_locale\", $lang, time()+3600*24);\n\t\tsetlocale(LC_MONETARY, $lang);\n\t\treturn $lang;\n\t}\n\t\n}", "public function setLocale($locale)\n {\n //\n }", "function set_language($locale) {\n\t\t\t$this->i18n_locale = $locale;\n\t\t}", "private function set_locale()\n {\n $plugin_i18n = new MailChimp_WooCommerce_i18n();\n $this->loader->add_action('init', $plugin_i18n, 'load_plugin_textdomain');\n }", "public static function setNextLocale($locale) {\n $_SESSION['core\\locale'] = \\substr($locale, 0, 2);\n }", "public static function locale(): string\n {\n // in the end to handle that case\n return Arr::get(config('currencies'), strtolower(static::currency()).'.locale', 'en_US') ?? 'en_US';\n }", "private function initLocale()\n {\n if (!$this->initialised) {\n putenv(\"LANG=$this->locale\");\n setlocale(LC_ALL, $this->locale);\n\n $this->initialised = true;\n }\n }", "public function getLocale() {\n\t\treturn $this->getParameter('app_locale');\n\t}", "function determine_locale()\n {\n }", "private function setLocale() {\n if ($this->_language == 'french')\n setlocale (LC_ALL, 'fr_FR.iso88591', 'fr_FR@euro', 'fr_FR', 'french', 'fra');\n else if ($this->_language == 'english')\n setlocale (LC_ALL, 'en_GB.iso88591', 'en_GB', 'english', 'eng');\n }", "private function setLocale()\n {\n $plugin_i18n = new I18n();\n $plugin_i18n->setDomain(Plugin_Name::PLUGIN_ID);\n\n add_action('plugins_loaded', [$plugin_i18n, 'loadPluginTextdomain']);\n }", "protected function setLocaleForMailer(): void\n {\n if (function_exists('switch_to_locale') && ($locale = $this->params->locale)) {\n \\switch_to_locale($locale);\n }\n }", "public function locale(string $locale = null);", "public static function getLocale(){\n return \\Illuminate\\Foundation\\Application::getLocale();\n }", "public function getLocale(): string\n {\n return $this['config']->get('app.locale');\n }", "public function actionSetLocale($locale = 'en_us')\n {\n //Set cookies\n $localeCookie = new CHttpCookie('Locale', $locale);\n $localeCookie->expire = time() + 15 * 24 * 3600;\n Yii::app()->request->cookies['Locale'] = $localeCookie;\n\n //Set application langauge\n Yii::app()->setLanguage($locale);\n }", "protected function setLang() {\n \n /*\n //setlocale (LC_ALL,\"russian\");\n //setlocale (LC_ALL,\"\");\n $locale = 'ru_RU';\n putenv('LANG='.$locale);\n setlocale(LC_ALL,\"\");\n setlocale(LC_MESSAGES,$locale);\n setlocale(LC_CTYPE,$locale);\n \n //putenv(\"LANG=ru_RU\");\n \n bindtextdomain (\"messages\", XPATH_TEMPLATE_FRONT . DS . 'locale');\n textdomain (\"messages\");\n bind_textdomain_codeset(\"messages\", \"UTF-8\");*/\n \n //setlocale(LC_MESSAGES, $this->_lang . '_' . strtoupper($this->_lang) . '.UTF-8');\n \n putenv(\"LC_MESSAGES=\".$this->_lang . '_' . strtoupper($this->_lang) . '.UTF-8');\n \n bindtextdomain('messages', XPATH_TEMPLATE_FRONT . DS . 'locale' . DS);\n bind_textdomain_codeset('messages', 'UTF-8');\n textdomain('messages');\n }", "private function setLocale($locale)\n {\n // Check if is allowed and set default locale if not\n if (!\\Language::allowed($locale)) {\n $locale = config('app.locale');\n }\n\n // Set app language\n \\App::setLocale($locale);\n\n // Set carbon language\n if (config('language.carbon')) {\n // Carbon uses only language code\n if (config('language.mode.code') == 'long') {\n $locale = explode('-', $locale)[0];\n }\n\n Carbon::setLocale($locale);\n }\n }", "public function getDefaultLocale();", "public static function changeLang($lang) {\n //App::setLocale($lang);\n app()->setLocale($lang);\n }", "function setLocale($locale) {\n\t\t$this->locale = $locale;\n\t}", "private function processLocale(): void\n {\n if ($this->request->has(self::LOCALE) && null !== $this->request->get(self::LOCALE, null)) {\n $this->setLocale($this->request->get(self::LOCALE));\n }\n }", "private function setLanguage() {\n//\t\tYii::app()->language = @Yii::app()->user->getState('lang');\n\t}", "public function __construct()\n {\n app()->setLocale('arm');\n }", "public function setDefaultLocale()\n {\n $this->setLocale('en');\n $locale = \\Locale::getDefault();\n if ($locale) {\n $this->setLocale($locale);\n }\n }", "public function restore_previous_locale()\n {\n }", "public function getLocale()\n {\n return $this['settings']->get('app::locale', 'en');\n }", "public static function setLocale($app, $locale)\n {\n if ($locale != $app['locale']) {\n $app['config']->set('general/locale', $locale);\n $app['locale'] = $locale;\n\n $app->initLocale();\n \n // Reset translator\n $app['translator'] = new Translator($locale, new MessageSelector());\n $app['translator']->setFallbackLocales($app['locale_fallbacks']);\n foreach ($app['translator.loaders'] as $str => $loader) {\n $app['translator']->addLoader($str, $loader);\n }\n $resources = \\Bolt\\Provider\\TranslationServiceProvider::addResources($app, $locale);\n foreach ($resources as $resource) {\n call_user_func_array(array($app['translator'], 'addResource'), $resource);\n }\n foreach ($app['locale_fallbacks'] as $fallback) {\n if ($fallback !== $locale) {\n $resources = \\Bolt\\Provider\\TranslationServiceProvider::addResources($app, $fallback);\n foreach ($resources as $resource) {\n call_user_func_array(array($app['translator'], 'addResource'), $resource);\n }\n }\n }\n } \n }", "function current_locale($new_locale = false) {\n if ($new_locale === false)\n return LocalizationEngine::get()->getLocale();\n else\n LocalizationEngine::setNextLocale($new_locale);\n}", "public function setLocaleOverride(ContextInterface $ctx, SetLocaleOverrideRequest $request): void;", "function jetpack_get_user_locale() {\n\t_deprecated_function( __FUNCTION__, 'jetpack-6.6.0', 'get_user_locale' );\n\treturn get_user_locale();\n}", "public static function updateLocale($lang_code){\n $lang = Config::get('app.locale');\n if(isset($lang_code)){\n $lang = $lang_code;\n }\n App::setLocale($lang);\n }", "public function incLocalLang() {}", "public function getLocale()\n {\n return $this['config']->get('app.locale');\n }", "public function getLocale()\n {\n return $this['config']->get('app.locale');\n }", "private function setLang(){\n\n\t\tif( isset($_GET['lang']) )\n\t\t\t$lang\t= $_GET['lang'];\n\n\t\telse{\n\t\t\t$sess_lang\t= session('lang');\n\t\t\t$lang\t\t= $sess_lang ? $sess_lang : App::getLocale();\n\t\t}\n\n\t\tsession(['lang'=>$lang]);\n\t\tApp::setLocale( $lang );\n\t}", "function acf_get_locale()\n{\n}", "public static function current_locale(){\n $locale = Controller::curr()->getRequest()->getVar('Locale') ?: '';\n\n if (!$locale) $locale = Controller::curr()->getRequest()->getVar('locale') ?: '';\n\n if ($locale) return $locale;\n\n $class = self::config()->class;\n $localisation = new $class();\n return $localisation->current_locale();\n }", "protected function getLocale() {\n return Mage::app()->getLocale();\n }", "public function getTargetLocale();", "abstract public function getLocaleName();", "public static function locale() : string\n {\n // Compute the locale just one time\n if (self::$locale) {\n return self::$locale;\n }\n\n // Lang in cookies\n $locale = self::langToLocale($_COOKIE['NameYourGoat_User_Locale'] ?? '');\n\n // Lang in User repository\n if (! $locale && self::isAuth()) {\n $locale = self::langToLocale(self::$fullUser->lang);\n }\n\n // Lang in the request headers\n if (! $locale) {\n $acceptLang = explode(',', getallheaders()['Accept-Language'] ?? '');\n\n foreach ($acceptLang as $lang) {\n if ($locale = self::langToLocale(trim(strtok($lang, '-;')))) {\n break;\n }\n }\n }\n\n return self::$locale = $locale ?: self::$defaultLocale;\n }", "private function registerLocale()\n\t{\n\t\t$this->app->singleton('glottos.locale', function($app) {\n\t\t\treturn new Locale($this->getConfig('default_language_id'), $this->getConfig('default_country_id'));\n\t\t});\n\t}", "public function locale()\n {\n return $this->locale;\n }", "static function locale() {\n return strtolower(str_replace('controllers\\\\', '', Route::$controller) . '/' . Route::$action);\n }", "protected function initializeL10nLocales() {}", "protected function initializeCurrentLocale() {\n $locale = null;\n\n if ($this->negotiator) {\n $locale = $this->negotiator->getLocale($this);\n }\n\n if (!$locale) {\n $locale = $this->getDefaultLocale();\n }\n\n $this->setCurrentLocale($locale);\n }", "public function get_switched_locale()\n {\n }", "public static function localeCookie(string $locale) : void\n {\n setcookie('NameYourGoat_User_Locale', self::langToLocale($locale), time() + 3600*24*30, '/');\n }", "public function setDefaultLocale($defaultLocale = null);", "function setLocale($args) {\n\t\t$setLocale = isset($args[0]) ? $args[0] : null;\n\t\t\n\t\t$site = &Request::getSite();\n\t\t$journal = &Request::getJournal();\n\t\tif ($journal != null) {\n\t\t\t$journalSupportedLocales = $journal->getSetting('supportedLocales');\n\t\t\tif (!is_array($journalSupportedLocales)) {\n\t\t\t\t$journalSupportedLocales = array();\n\t\t\t}\n\t\t}\n\t\t\n\t\tif (Locale::isLocaleValid($setLocale) && (!isset($journalSupportedLocales) || in_array($setLocale, $journalSupportedLocales)) && in_array($setLocale, $site->getSupportedLocales())) {\n\t\t\t$session = &Request::getSession();\n\t\t\t$session->setSessionVar('currentLocale', $setLocale);\n\t\t}\n\t\t\n\t\tif(isset($_SERVER['HTTP_REFERER'])) {\n\t\t\tRequest::redirect($_SERVER['HTTP_REFERER']);\n\t\t}\n\t\t\n\t\t$source = Request::getUserVar('source');\n\t\tif (isset($source) && !empty($source)) {\n\t\t\tRequest::redirect(Request::getProtocol() . '://' . Request::getServerHost() . $source, false);\n\t\t}\n\t\t\n\t\tRequest::redirect('index');\t\t\n\t}", "public function __construct()\n\t{\n\t\t\\App::setLocale('en');\n\t}", "public function setLocale ($locale) {\n\t\t$this->locale = $locale;\n\t}", "public static function getUserLocale()\n {\n $lang_id = Auth::user()->lang_id;\n $locale = ($lang_id == 1) ? 'en' : 'ar';\n Session::put('locale', $locale);\n return $locale;\n }", "function yourls_get_locale() {\n\tglobal $yourls_locale;\n\n\tif ( !isset( $yourls_locale ) ) {\n\t\t// YOURLS_LANG is defined in config.\n\t\tif ( defined( 'YOURLS_LANG' ) )\n\t\t\t$yourls_locale = YOURLS_LANG;\n\t}\n\n if ( !$yourls_locale )\n $yourls_locale = '';\n\n\treturn yourls_apply_filter( 'get_locale', $yourls_locale );\n}", "public static function setDefaultLocale($locale): void\n {\n static::$defaultFormatSettings['locale'] = static::resolveLocaleCode($locale);\n }", "public function setLocale(MvcEvent $e) {\n $translator = $e->getApplication()->getServiceManager()->get('translator');\n $translator->setLocale('ru_RU');\n \n }", "public function getLocale()\n {\n return $this->_getVar('user_locale');\n }", "public function getLocale(): string\n {\n return $this->locale;\n }", "public function getLocale(): string\n {\n return $this->locale;\n }", "function switch_to_user_locale($user_id)\n {\n }", "public function locale($request)\n {\n return $request->input('locale');\n }" ]
[ "0.75435436", "0.7290444", "0.7290072", "0.7099119", "0.70595825", "0.69109356", "0.6868262", "0.6792155", "0.67749333", "0.67468935", "0.6746269", "0.6744195", "0.6739657", "0.6723588", "0.6720566", "0.67057896", "0.66904205", "0.6590594", "0.6555266", "0.65023816", "0.6444894", "0.6422657", "0.64044136", "0.63914055", "0.6379568", "0.6371584", "0.6351683", "0.6351683", "0.6351683", "0.6333532", "0.6331522", "0.63303775", "0.6304932", "0.62994707", "0.6295758", "0.62472445", "0.6244636", "0.62433344", "0.62433344", "0.61851627", "0.61810935", "0.61707085", "0.6170113", "0.6169576", "0.6166835", "0.6157874", "0.6156384", "0.61543727", "0.61537325", "0.6151061", "0.614154", "0.6128849", "0.6116022", "0.61014384", "0.6095271", "0.6088007", "0.60878366", "0.6080346", "0.60764694", "0.60759395", "0.6068239", "0.60587", "0.6051978", "0.60403925", "0.60361093", "0.6002055", "0.6000844", "0.5997728", "0.5996078", "0.5994505", "0.5985762", "0.59833074", "0.5969655", "0.5969655", "0.59096885", "0.58849525", "0.5856608", "0.5852891", "0.5851916", "0.5847117", "0.5835005", "0.5831717", "0.5809457", "0.5801968", "0.57975125", "0.579513", "0.5794148", "0.57815903", "0.57761264", "0.57615405", "0.57571566", "0.5755692", "0.5753712", "0.57419646", "0.57405865", "0.57375115", "0.57269394", "0.572595", "0.572595", "0.5721425", "0.5712733" ]
0.0
-1
Display a listing of the resource.
public function index() { // }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function indexAction()\n {\n $limit = $this->Request()->getParam('limit', 1000);\n $offset = $this->Request()->getParam('start', 0);\n $sort = $this->Request()->getParam('sort', array());\n $filter = $this->Request()->getParam('filter', array());\n\n $result = $this->resource->getList($offset, $limit, $filter, $sort);\n\n $this->View()->assign($result);\n $this->View()->assign('success', true);\n }", "public function listing();", "function index() {\n\t\t$this->show_list();\n\t}", "public function actionList() {\n $this->_getList();\n }", "public function listAction()\n {\n $model = $this->_getPhotoModel();\n $entries = $model->fetchEntries($this->_getParam('page', 1));\n\n $this->view->url = 'http://' . $this->_request->getHttpHost() . $this->_request->getBaseUrl(); \n $this->view->paginator = $entries;\n }", "public function index()\n {\n $items = Item::all();\n return ItemForShowResource::collection($items);\n }", "public function index()\n {\n return Resource::collection(($this->getModel())::paginate(10));\n }", "function index()\n\t{\n\t\t$this->_list();\n\t\t$this->display();\n\t}", "public function listingAction(){\n if (!LoginHelper::isAdmin()){\n Router::redirect('home', '<p class=\"alert alert-danger\">Unauthorized</p>');\n }\n $this->view->render('patient/list', Patient::all());\n }", "public function index()\n {\n //\n $list = $this->obj->all();\n\n return $this->render('index', compact('list'));\n }", "public function action_index()\n\t{\n\t\t$this->template->title = 'Resources';\n\t\t$this->view = View::factory('admin/resource/index');\n\t\t$this->template->scripts[] = 'media/js/jquery.tablesorter.min.js';\n\t\t$this->template->scripts[] = 'media/js/admin/resource.js';\n\t\t\n\t\t$resources = Sprig::factory('resource')->load(NULL, FALSE);\n\t\tif (!empty($resources))\n\t\t{\n\t\t\t$this->view->resources = $resources->as_array();\n\t\t}\n\t}", "function listing()\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->_instrumentoModel->getInstrumento();\n\t\t\t$this->_view->render('listing', '', '',$this->_sidebar_menu);\n\t\t}", "public function listAction()\n {\n $em = $this->getDoctrine()->getManager();\n \n $todos = $em->getRepository(Todo::class)->findAll();\n \n return $this->render('todo/index.html.twig', array(\n 'todos' => $todos,\n ));\n }", "public function index()\n\t{\n $this->authorize('list', Instance::class);\n\n\t\treturn $this->ok($this->repo->paginate($this->request->all()));\n\t}", "public function actionRestList() {\n\t $this->doRestList();\n\t}", "public function listing()\n\t{\n\t\t$hospitalID = $this->request->getSession()->read(\"hospital_id\") ? $this->request->getSession()->read(\"hospital_id\") : \"\";\n\t\t\n\t\t$patientMonitored = 1;\n\t\t$patientActive = 1;\n\t\t\n\t\t//GET ALL PATIENTS\n\t\t$patientsData = $this->Patients->allPatients($hospitalID,$patientMonitored,$patientActive);\n\t\t//GET ALL PATIENTS\n\t\t\n\t\t//echo \"<pre>\"; print_r($patientsData);die;\n\t\t$this->set(compact(\"patientsData\"));\n\t}", "public function listAction()\n {\n $htmlpage = '<!DOCTYPE html>\n<html>\n <head>\n <meta charset=\"UTF-8\">\n <title>todos list!</title>\n </head>\n <body>\n <h1>todos list</h1>\n <p>Here are all your todos:</p>\n <ul>';\n \n $em = $this->getDoctrine()->getManager();\n $todos = $em->getRepository(Todo::class)->findAll();\n foreach($todos as $todo) {\n $htmlpage .= '<li>\n <a href=\"/todo/'.$todo->getid().'\">'.$todo->getTitle().'</a></li>';\n }\n $htmlpage .= '</ul>';\n\n $htmlpage .= '</body></html>';\n \n return new Response(\n $htmlpage,\n Response::HTTP_OK,\n array('content-type' => 'text/html')\n );\n }", "public function index()\n {\n // Get Persons\n $person = Person::paginate(10);\n\n //Return collection of person as a resource\n return PersonResource::collection($person);\n }", "public function listAction() {\n\t\t$this->view->title = $this->translator->translate(\"Invoice list\");\n\t\t$this->view->description = $this->translator->translate(\"Here you can see all the invoices.\");\n\t\t$this->view->buttons = array(array(\"url\" => \"/admin/invoices/new/\", \"label\" => $this->translator->translate('New'), \"params\" => array('css' => null)));\r\n\t\t$this->datagrid->setConfig ( Invoices::grid() )->datagrid ();\n\t}", "public function listAll()\n\t{\n\t\t$this->render(self::PATH_VIEWS . '/list', [\n\t\t\t'pages' => $this->pagesDb->findAll('id', 'DESC'),\n\t\t]);\n\t}", "public function list()\n {\n // récupérer les données : toutes les catégories enregistrées\n $productList = Product::findAll();\n\n $this->show('product/list', [\n 'productList' => $productList\n ]);\n }", "public function index()\n {\n // CRUD -> Retrieve --> List\n // BREAD -> Browse Read Edit Add Delete\n // return Item::all();\n return view('list_items',compact('items'));\n }", "public function index()\n {\n // Get manufacturers\n $manufacturers = Manufacturer::orderBy('created_at', 'desc')->paginate(15);\n\n // Return collection of manufacturers as a resource\n return ManufacturerResource::collection($manufacturers);\n }", "public function index()\n {\n return ArtistResource::collection(Artist::orderBy('created_at', 'desc')->get());\n }", "public function indexAction() {\n\t\t$page = intval($this->getInput('page'));\n\t\t$perpage = $this->perpage;\n\t\t\n\t\tlist(,$files) = Lock_Service_FileType::getAllFileType();\n\t\t$data = array();\n\t\tforeach ($files as $key=>$value) {\n\t\t\t$data[$key]['id'] = $value['id'];\n\t\t\t$data[$key]['title'] = $value['name'];\n\t\t}\n\t\tlist($total, $filetype) = Lock_Service_FileType::getList($page, $perpage);\n\t\t$this->assign('filetype', $filetype);\n\t\t$this->assign('pager', Common::getPages($total, $page, $perpage, $this->actions['listUrl'].'/?'));\n\t\t$this->assign('data', json_encode($data));\n\t}", "public function listAction()\n {\n $qb = $this->getRepository()->queryAll();\n\n $view = new ImportListView;\n $view->imports = $qb->getQuery()->execute();\n\n return $this->templating->renderResponse('InfiniteImportBundle:Import:list.html.twig', array(\n 'data' => $view\n ));\n }", "public function index()\n\t{\n\t\t//Return model all()\n\t\t$instances = $this->decorator->getListingModels();\n\n\t\treturn View::make($this->listingView, array(\n\t\t\t'instances' => $instances,\n\t\t\t'controller' => get_class($this), \n\t\t\t'modelName' => class_basename(get_class($this->decorator->getModel())),\n\t\t\t'columns' => $this->getColumnsForInstances($instances),\n\t\t\t'editable' => $this->editable\n\t\t));\n\t}", "public function index()\n {\n return InfografiResources::collection(\n Infografi::orderBy('date', 'desc')->get()\n );\n }", "public function listAction()\n\t {\n\t\t\t$this->_forward('index');\n \n\t\t}", "public function index()\n {\n $this->list_view();\n }", "public function index()\n {\n $this->list_view();\n }", "public function index()\n {\n $this->list_view();\n }", "public function listAction()\n {\n $defaults = array(\n 'page' => null,\n 'order' => null,\n 'limit' => null,\n 'offset' => null,\n 'filter' => array(),\n );\n $body = $this->getRequest()->getBody();\n $options = $body + $defaults;\n\n // Process the options\n if (is_string($options['order'])) {\n $options['order'] = array_map('trim', explode(',', $options['order']));\n }\n if (is_string($options['page'])) {\n $options['page'] = (int)$options['page'];\n }\n if (is_string($options['limit'])) {\n $options['limit'] = (int)$options['limit'];\n }\n if (is_string($options['offset'])) {\n $options['offset'] = (int)$options['offset'];\n }\n $filter = $options['filter'];\n unset($options['filter']);\n\n $options = array_filter($options);\n\n return $this->getBinding()->find($filter, $options);\n }", "public function index()\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n /* Get the resources from the model */\n $resources = $this->resourcesList($this->model);\n\n /* Sets the view */\n if (view()->exists(\"admin.{$this->name}.index\")) {\n $view = \"admin.{$this->name}.index\";\n } else {\n $view = 'admin.includes.actions.index';\n }\n\n /* Display a listing of the resources */\n return view($view)\n ->with('resources', $resources)\n ->with('module', $this->module);\n }", "public function index()\n\t{\n\t\t$data['lists'] = $this->mdl_student->get_all();\n\t\t$this->template->set('title', 'Student Hostel List');\n\t\t$this->template->load('template', 'contents', 'student_hostel/student_hostel_list', $data);\n\t}", "public function index()\n {\n $modules = Module::all();\n return Resource::collection($modules);\n }", "public function index()\n {\n // List all resources from user entity\n $users = User::all();\n\n return $this->showAll($users);\n }", "public function index()\n {\n // Get todos\n $todos = Todo::orderBy('created_at', 'desc')->paginate(3);\n\n // Return collection of articles as a resource\n return TodoResource::collection($todos);\n }", "public function index()\n {\n return Resources::collection(Checking::paginate());\n }", "public function index()\n {\n return CourseListResource::collection(\n Course::query()->withoutGlobalScope('publish')\n ->latest()->paginate()\n );\n }", "public function index()\n {\n $cars = Car::paginate(15);\n return CarResource::collection($cars);\n }", "public function index()\n {\n // Get articles\n $articles = Article::orderBy('created_at', 'desc')->paginate(5);\n\n // Return collection of articles as a resource\n return ArticleResource::collection($articles);\n }", "public function index()\n {\n $authors = Author::paginate(10);\n\n return AuthorResource::collection($authors);\n }", "public function index()\n {\n //Get Books\n $books = Book::paginate(10);\n \n if ($books) {\n return (BookResource::collection($books))->additional([\n 'status_code' => 200,\n 'status' => 'success',\n ]);\n } else {\n return (BookResource::collection([]))->additional([\n 'status_code' => 200,\n 'status' => 'success',\n ]);\n }\n return view('index')->with('data', $books);\n }", "public function index()\n {\n $books = Book::latest()\n ->paginate(20);\n\n return BookResource::collection($books);\n }", "public function view(){\n\t\t$this->buildListing();\n\t}", "public function index()\n {\n $listing = Listing::orderBy('id', 'desc')->paginate(10);\n return view('listings.index')->withListings($listing);\n }", "public function index()\n {\n $services = $this->serviceRepository->paginate();\n\n return ServiceResource::collection($services);\n }", "public function listAction()\n {\n $this->_getSession()->setFormData([]);\n\n $this->_title($this->__('Training Cms'))\n ->_title($this->__('Pages'));\n\n $this->loadLayout();\n\n $this->_setActiveMenu('training_cms');\n $this->_addBreadcrumb($this->__('Training Cms'), $this->__('Training Cms'));\n $this->_addBreadcrumb($this->__('Pages'), $this->__('Pages'));\n\n $this->renderLayout();\n }", "public function index()\n {\n $resources = ResourceManagement::paginate(5);\n $users = User::get();\n\n return view('resources-mgmt/index', ['resources' => $resources, 'users' => $users]);\n }", "public function index()\n {\n $catalogs = Catalog::where('status', '=', Catalog::PUBLICADO)\n ->orderBy('id', 'DESC')->get();\n \n $data = CatalogResource::collection($catalogs);\n\n return [\n 'items' => $data,\n 'mensaje' => ''\n ];\n }", "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 $message = new Notice();\n $results = $message->getMsg4Admin();\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 }", "public function list()\n {\n try {\n return $this->success($this->service->list());\n } catch (\\Exception $exception) {\n return $this->error($exception->getMessage());\n }\n }", "public function index()\n {\n return $this->sendResponse(CrisisResource::collection(Crisis::paginate(10)), 'Data fetched successfully');\n }", "public function index()\n\t{\n\t\t$%Alias = new %Model();\n\t\t$params = array();\n\t\t\n\t\t$Paginator = new Paginator( $%Alias->findSize( $params ), $this->getLimit(), $this->getPage() );\n\t\t$this->getView()->set( '%Aliass', $%Alias->findList( $params, 'Id desc', $this->getOffset(), $this->getLimit() ) );\n\t\t$this->getView()->set( 'Paginator', $Paginator );\n\t\treturn $this->getView()->render();\n\t}", "public function listAction() {}", "public function index()\n {\n\n return RecipeResource::collection(Recipe::all());\n }", "public function index()\n {\n $this->indexPage('list-product', 'List Product');\n }", "public function listAction()\n {\t\n\t\t$this->removeSession();\n\t\t$this->verifySessionRights();\n\t\t$this->setActivity(\"List view\");\n $em = $this->getDoctrine()->getManager();\n $oRepClient = $em->getRepository('BoAdminBundle:Client');\n\t\t$nb_tc = $oRepClient->getTotal();\n\t\t//get page\n\t\t$page = $this->get('session')->get('page');\n\t\tif($page==null){\n\t\t\t$page=1;\n\t\t\t$this->get('session')->set('page',1);\n\t\t}\n\t\t//get number line per page\n\t\t$nb_cpp = $em->getRepository('BoAdminBundle:Param')->getParam(\"display_list_page_number\",1);\n\t\t$nb_pages = ceil($nb_tc/$nb_cpp);\n\t\t$offset = $page>0?($page-1) * $nb_cpp:0;\n\t\t$clients = $em->getRepository('BoAdminBundle:Client')->findBy(array(),array('id' => 'desc'),$nb_cpp,$offset);\n $form = $this->createForm('Bo\\AdminBundle\\Form\\ClientType', new Client());\n return $this->render('client/index.html.twig', array(\n 'clients' => $clients,\n\t\t\t'page' => $page, // forward current page to view,\n\t\t\t'nb_pages' => $nb_pages, //total number page,\n 'form' => $form->createView(),\n\t\t\t'total'=>$nb_tc, // record number.\n\t\t\t'nb_cpp' => $nb_cpp,// line's number to display\n\t\t\t'pm'=>\"contracts\",\n\t\t\t'sm'=>\"client\",\n ));\n }", "public function index()\n {\n return AcResource::collection(Ac::latest()->paginate()); //\n }", "public function executeList()\n {\n $this->setTemplate('list');\n }", "function listing() {\r\n\r\n }", "public function indexAction()\n {\n $books = Book::getAll();\n\n View::renderTemplate('Books/index.html', [\n 'books' => $books\n ]);\n }", "public function listar() {\n $rs = $this->model->listar();\n\n echo $this->toJson($rs);\n }", "public function index()\n {\n return BookResource::collection(Book::orderby('id')->get());\n }", "public function doRestList()\n {\n $this->outputHelper( \n 'Records Retrieved Successfully', \n $this->getModel()->with($this->nestedRelations)->filter($this->restFilter)->orderBy($this->restSort)->limit($this->restLimit)->offset($this->restOffset)->findAll(),\n $this->getModel()->with($this->nestedRelations)->filter($this->restFilter)->count()\n );\n\t}", "public function index()\n {\n $client = Client::paginate();\n return ClientResource::collection($client);\n }", "public function index()\n {\n return TagResource::collection(\n Tag::orderBy('name', 'ASC')->paginate(request('per_page', 10))\n );\n }", "public function _index(){\n\t $this->_list();\n\t}", "public function index()\n\t{\n\t\t$data['lists'] = $this->gallery_mdl->get_all();\n\t\t$this->template->set('title', 'Gallery');\n\t\t$this->template->render('template', 'list', $data);\n\t}", "function drush_restapi_list() {\n\n $resources = restapi_get_resources();\n $last_module = NULL;\n $rows = [\n [dt('Module'), dt('Path'), dt('Class')],\n ];\n\n foreach($resources as $resource) {\n if ($last_module != $resource->getModule()) {\n $module = $last_module = $resource->getModule();\n }\n else {\n $module = '';\n }\n $rows[] = [$module, $resource->getPath(), $resource->getClass()];\n }\n\n drush_print_table($rows, TRUE);\n drush_log(dt('Displaying !count total resources', [\n '!count' => count($resources),\n ]), 'ok');\n\n}", "public function index()\n {\n $this->booklist();\n }", "public function index()\n {\n //\n $accounts = accounts::paginate(15);\n\n //return the collection of employees as a resource\n return accountResource::collection($accounts);\n\n\n }", "public function index()\n {\n $items = Item::all();\n return view('items::list_items',compact('items'));\n }", "public function index()\n {\n // Get houses\n $houses = House::orderBy('created_at', 'desc')->paginate(self::PAGINATE);\n \n // Return collection of houses\n \n return HouseResource::collection($houses);\n }", "public function index()\n {\n $products = Product::paginate(6);\n return ProductResource::collection($products);\n }", "public function index() {\n $this->template->allFoundItems = Found::showAll();\n $this->template->display( 'index.html.php' );\n }", "public function indexAction() {\n $this->_forward('list');\n }", "public function index()\n {\n $data = Productcategory::paginate(10);\n\t\treturn ProductcategoryResource::Collection($data);\n }", "public function index()\n {\n return SongResource::collection(\\App\\Song::orderBy('created_at', 'desc')->get());\n }", "public function index () {\n permiss ( 'role.list' );\n\n $data = $this->entity\n ->orderBy('created_at', 'desc')->get();\n\n return new ModelResource($data);\n }", "public function ListView()\n\t{\n\t\t\n\t\t// Requer permissão de acesso\n\t\t$this->RequirePermission(Usuario::$P_ADMIN,\n\t\t\t\t'SecureExample.LoginForm',\n\t\t\t\t'Autentique-se para acessar esta página',\n\t\t\t\t'Você não possui permissão para acessar essa página ou sua sessão expirou');\n\t\t\n\t\t//$usuario = Controller::GetCurrentUser();\n\t\t//$this->Assign('usuario',$usuario);\n\t\t$this->Render();\n\t}", "public function index()\n {\n //get articless\n $articles = Article::paginate(15);\n\n //Return collection of article has a resource\n return ArticleResource::collection($articles);\n\n }", "public function showResources()\n {\n $resources = Resource::get();\n return view('resources', compact('resources'));\n }", "public function actionList() {\n header(\"Content-type: application/json\");\n $verb = $_SERVER[\"REQUEST_METHOD\"];\n\n if ($verb === 'GET') {\n echo \"{\\\"data\\\":\" . CJSON::encode(Donneur::model()->findAll()) . \"}\";\n } else if ($verb == 'POST') {\n if (Donneur::model()->exists('id' === $_POST['id'])) {\n $this->actionListUpdate($_POST);\n } else {\n $this->actionListPost();\n }\n } else if ($verb == 'DELETE') {\n $this->actionListDelete();\n }\n }", "public function list()\n {\n return $this->http->request(HttpMethods::GET, $this->endpoint);\n }", "public function indexAction(){\n $data = array(\n 'collection' => $this->model->getCollection(),\n \n ); \t\n return $this->getView($data);\n }", "public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $entities = $em->getRepository('DiverPriceLisrBundle:Items')->findAll();\n\n return $this->render('DiverPriceLisrBundle:Items:index.html.twig', array(\n 'entities' => $entities,\n ));\n }", "public function actionIndex()\n {\n $dataProvider = new ActiveDataProvider([\n 'query' => Slaves::find(),\n ]);\n\n return $this->render('index', [\n 'dataProvider' => $dataProvider,\n ]);\n }", "public function listAction() {\n\t\t// Recogemos el repositorio\n\t\t$repository = $this->getDoctrine() ->getRepository('AppBundle:Product');\n\t\n\t\t// Recuperamos todos los productos.\n\t\t$products = $repository->findAll();\n\t\t// Pasamos a la plantilla el aray products\n\t\treturn $this->render('product/listActionProduct.html.twig', array( 'products' => $products));\n\t\n\t}", "public function actionList()\n {\n // get model\n $model = new $this->_model('search');\n $model->unsetAttributes();\n\n // set filter\n if (isset($_GET[$this->_model])) {\n $model->attributes = $_GET[$this->_model];\n }\n $model->u_cms_album_id = $_GET['album'];\n\n // search\n $dataProvider = $model->search(Yii::app()->language);\n // sort\n $sort = $dataProvider->getSort();\n // route\n $sort->route = $this->id . '/list';\n\n // pagination parameters\n $pagination = $dataProvider->getPagination();\n $pagination->route = $this->id . '/list';\n $pagination->pageSize = UInterfaceSetting::model()->getSettings($this->id . ':' . $this->module->id, Yii::app()->user->id)->page_size;\n $pagination->itemCount = $dataProvider->totalItemCount;\n\n // datas\n $datas = $dataProvider->getData();\n\n // related datas\n $relatedDatas = $this->_loadRelatedData();\n\n // template\n $template = isset($_REQUEST['partial']) ? 'list/_table' : 'list/main';\n\n $jsonParams = array();\n if (Yii::app()->request->isAjaxRequest) {\n // filters\n $filtersDatas = array();\n if (isset($_GET[$this->_model])) {\n $filtersDatas[$this->_model] = $_GET[$this->_model];\n }\n if (isset($_GET[$sort->sortVar])) {\n $filtersDatas[$sort->sortVar] = $_GET[$sort->sortVar];\n }\n\n $jsonParams = array(\n 'filters' => http_build_query($filtersDatas)\n );\n }\n\n $this->dynamicRender(\n $template,\n array(\n 'dataView' => new $this->crudComponents['listDataView'](\n $datas, $relatedDatas, $model, $sort, $pagination, $this\n )\n ),\n $jsonParams\n );\n }", "public function listAction()\n\t {\n\t\t$model = $this->_getModel();\n\t\t$result = $model->getLayouts();\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\t\t\n\t\t$this->view->page = $page;\n\t }", "public function index()\n {\n return view('listings.index')->with('listings', Listing::all());\n }", "public function get_index()\n\t{\n\t\t$pages = Page::recent_available()->paginate(30);\n\t\t$table = Cello\\Presenter\\Page::table($pages);\n\t\t$data = array(\n\t\t\t'eloquent' => $pages,\n\t\t\t'table' => $table,\n\t\t);\n\n\t\tSite::set('title', __('cello::title.pages.list'));\n\n\t\treturn View::make('cello::api.resources.index', $data);\n\t}", "public function index()\n {\n return ProductResource::collection(Product::latest()->paginate(10));\n }", "public function index()\n {\n $category = GalleryCategory::paginate(15);\n\n // return collection of category as a resource.\n return Resource::collection($category);\n }", "public function index()\n {\n //\n $news = News::latest()->paginate(18);\n\n return NewsResource::collection($news);\n }", "public function indexAction() {\n\t\t$list_info = Zend_Registry::get('list_info');\n if (!Engine_Api::_()->core()->hasSubject('list_listing')) {\n return $this->setNoRender();\n }\n \n $this->view->expiry_setting = Engine_Api::_()->list()->expirySettings();\n\n //GET SUBJECT\n $this->view->list = $list = Engine_Api::_()->core()->getSubject('list_listing');\n\n\t\t//GET CATEGORY TABLE\n\t\t$this->view->tableCategory = Engine_Api::_()->getDbTable('categories', 'list');\n\n //GET CATEGORIES NAME\n\t\t$this->view->category_name = $this->view->subcategory_name = $this->view->subsubcategory_name = '';\n\n\t\tif(!empty($list->category_id)) {\n\t\t\tif($this->view->tableCategory->getCategory($list->category_id))\n\t\t\t$this->view->category_name = $this->view->tableCategory->getCategory($list->category_id)->category_name;\n\n\t\t\tif(!empty($list->subcategory_id)) {\n\t\t\t\tif($this->view->tableCategory->getCategory($list->subcategory_id))\n\t\t\t\t$this->view->subcategory_name = $this->view->tableCategory->getCategory($list->subcategory_id)->category_name;\n\n\t\t\t\tif(!empty($list->subsubcategory_id)) {\n\t\t\t\t\tif($this->view->tableCategory->getCategory($list->subsubcategory_id))\n\t\t\t\t\t$this->view->subsubcategory_name = $this->view->tableCategory->getCategory($list->subsubcategory_id)->category_name;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n //GET LISTING TAGS\n $this->view->listTags = $list->tags()->getTagMaps();\n\n\t\t//GET OTHER DETAILS\n\t\t$this->view->list_description = Zend_Registry::get('list_descriptions');\n $this->view->addHelperPath(APPLICATION_PATH . '/application/modules/Fields/View/Helper', 'Fields_View_Helper');\n $this->view->fieldStructure = Engine_Api::_()->fields()->getFieldsStructurePartial($list);\n\t\tif(empty($list_info)){ return $this->setNoRender(); }\n }", "public function index()\n {\n return $this->service->fetchResources(Author::class, 'authors');\n }", "public function index()\n {\n return view('admin.resources.index');\n }", "public function doRestList() {\n\t\t$this->outputHelper ( 'Collections Retrieved Successfully', $this->getModel ()->with ( $this->nestedRelations )->filter ( $this->restFilter )->orderBy ( $this->restSort )->limit ( $this->restLimit )->offset ( $this->restOffset )->findAll (), $this->getModel ()->with ( $this->nestedRelations )->filter ( $this->restFilter )->count () );\n\t}" ]
[ "0.7446838", "0.7361646", "0.7299749", "0.7246801", "0.7163394", "0.7148201", "0.71318537", "0.7104601", "0.7101873", "0.709985", "0.70487136", "0.69936216", "0.6988242", "0.69347453", "0.68989795", "0.68988764", "0.68909055", "0.68874204", "0.68650436", "0.6848891", "0.6829478", "0.6801521", "0.67970383", "0.6794992", "0.678622", "0.67595136", "0.67416173", "0.6730242", "0.67248064", "0.6724347", "0.6724347", "0.6724347", "0.6717754", "0.67069757", "0.67046493", "0.67045283", "0.66652155", "0.6662764", "0.6659929", "0.6659647", "0.665744", "0.6653796", "0.66483474", "0.6620148", "0.6619058", "0.66164845", "0.6606442", "0.66005665", "0.65998816", "0.6593891", "0.6587057", "0.6584887", "0.65822107", "0.65806025", "0.6576035", "0.65731865", "0.6571651", "0.65702003", "0.6569641", "0.6564336", "0.65618914", "0.65526754", "0.6552204", "0.6545456", "0.653638", "0.65332466", "0.65329266", "0.65268785", "0.6525191", "0.652505", "0.65196913", "0.6517856", "0.6517691", "0.65152586", "0.6515112", "0.6507232", "0.65038383", "0.65013176", "0.64949673", "0.6491598", "0.6486873", "0.64857864", "0.6484881", "0.6483896", "0.64777964", "0.6476692", "0.64711976", "0.6469358", "0.64685416", "0.64659655", "0.6462483", "0.6461606", "0.6459046", "0.6457556", "0.6454214", "0.6453915", "0.64524966", "0.64499927", "0.6448528", "0.6447461", "0.6445687" ]
0.0
-1
Show the form for creating a new resource.
public function create() { // }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function create()\n {\n return $this->showForm('create');\n }", "public function create()\n {\n return $this->showForm('create');\n }", "public function create()\n {\n return view('admin.resources.create');\n }", "public function create(){\n\n return view('resource.create');\n }", "public function create()\n\t{\n\t\treturn $this->showForm('create');\n\t}", "public function create()\n {\n return \"Display a form for creating a new catalogue\";\n }", "public function newAction()\n {\n $entity = new Resource();\n $current = $this->get('security.context')->getToken()->getUser();\n $entity->setMember($current);\n $form = $this->createCreateForm($entity);\n\n return array(\n 'nav_active'=>'admin_resource',\n 'entity' => $entity,\n 'form' => $form->createView(),\n );\n }", "public function create()\n {\n return view ('forms.create');\n }", "public function create ()\n {\n return view('forms.create');\n }", "public function create()\n\t{\n\t\treturn view('faith.form');\n\t}", "public function create(NebulaResource $resource): View\n {\n $this->authorize('create', $resource->model());\n\n return view('nebula::resources.create', [\n 'resource' => $resource,\n ]);\n }", "public function create()\n {\n return view(\"request_form.form\");\n }", "public function create()\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n /* Sets the view */\n if (view()->exists(\"admin.{$this->name}.create\")) {\n $view = \"admin.{$this->name}.create\";\n } else {\n $view = 'admin.includes.actions.create';\n }\n\n /* Show the form for creating a new resource. */\n return view($view)\n ->with('name', $this->name);\n }", "public function newAction()\n\t{\n\t\t$this->render( View::make( 'schools/form' , array(\n\t\t\t'title' => 'Ajouter une nouvelle &eacute;cole'\n\t\t) ) );\n\t}", "public function create()\n {\n return view($this->forms . '.create');\n }", "public function create()\n {\n return view('restful.add');\n }", "public function create()\n {\n $resource = (new AclResource())->AclResource;\n\n //dd($resource);\n return view('Admin.acl.role.form', [\n 'resource' => $resource\n ]);\n }", "public function create()\n {\n return view('admin.createform');\n }", "public function create()\n {\n return view('admin.forms.create');\n }", "public function create()\n {\n return view('backend.student.form');\n }", "public function newAction()\n {\n $breadcrumbs = $this->get(\"white_october_breadcrumbs\");\n $breadcrumbs->addItem('Inicio', $this->get('router')->generate('admin.homepage'));\n $breadcrumbs->addItem($this->entityDescription, $this->get(\"router\")->generate(\"admin.$this->entityName.index\"));\n $breadcrumbs->addItem('Nuevo');\n\n $entity = $this->getManager()->create();\n $form = $this->getForm($entity);\n\n return $this->render('AdminBundle:Default:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n 'metadata' => $this->getMetadata()\n ));\n }", "public function create()\n {\n return view('client.form');\n }", "public function create()\n {\n // Nos regresa la vista del formulario\n return view('project.form');\n }", "public function create()\n {\n return view('Form');\n }", "public function newAction(){\n \n $entity = new Resourceperson();\n $form = $this->createAddForm($entity);\n\n \n return $this->render('ABCRspBundle:rsp:add.html.twig',array('entity'=>$entity,'form'=> $form->createView()));\n }", "public function createForm()\n\t{\n\t\treturn view('post.new');\n\t}", "public function create()\n {\n return view('admin.form.create', ['form' => new Form]);\n }", "public function create()\n {\n return view('form');\n }", "public function create()\n {\n return view('form');\n }", "public function create()\n {\n return view('form');\n }", "public function create()\n {\n $title = $this->title;\n $subtitle = \"Adicionar cliente\";\n\n return view('admin.clients.form', compact('title', 'subtitle'));\n }", "public function create()\n {\n return view('backend.schoolboard.addform');\n }", "public function create()\n\t{\n\t\treturn view('info.forms.createInfo');\n\t}", "public function create()\n {\n //\n return view('form');\n }", "public function create()\n {\n return view('rests.create');\n }", "public function create()\n {\n return $this->showForm();\n }", "public function create()\n {\n return $this->showForm();\n }", "public function create()\n {\n return view(\"Add\");\n }", "public function create(){\n return view('form.create');\n }", "public function create()\n {\n // Show the page\n return view('admin.producer.create_edit');\n }", "public function create()\n {\n\n return view('control panel.student.add');\n\n }", "public function newAction() {\n\t\t\n\t\t$this->view->form = $this->getForm ( \"/admin/invoices/process\" );\n\t\t$this->view->title = $this->translator->translate(\"New Invoice\");\n\t\t$this->view->description = $this->translator->translate(\"Create a new invoice using this form.\");\n\t\t$this->view->buttons = array(array(\"url\" => \"#\", \"label\" => $this->translator->translate('Save'), \"params\" => array('css' => null,'id' => 'submit')),\r\n\t\t\t\t\t\t\t array(\"url\" => \"/admin/invoices/list\", \"label\" => $this->translator->translate('List'), \"params\" => array('css' => null)));\n\t\t$this->render ( 'applicantform' );\n\t}", "public function create()\n {\n $data['action'] = 'pengiriman.store';\n return view('pengiriman.form', $data);\n }", "public function create()\n {\n return $this->cView(\"form\");\n }", "public function newAction()\n {\n // Création de l'entité et du formulaire.\n $client = new Client();\n $formulaire = $this->createForm(new ClientType(), $client);\n \n \n \n // Génération de la vue.\n return $this->render('KemistraMainBundle:Client:new.html.twig',\n array('formulaire' => $formulaire->createView()));\n }", "public function create()\n {\n return view(\"dresses.form\");\n }", "public function create()\n\t{\n\t\treturn View::make('new_entry');\n\t}", "public function createAction()\n {\n// $this->view->form = $form;\n }", "public function create()\n {\n return view('bank_account.form', ['mode' => 'create']);\n }", "public function create()\n {\n return view('fish.form');\n }", "public function create()\n {\n return view('users.forms.create');\n }", "public function create()\n {\n $this->setFormFields($this->getCreateFormFields());\n $form = $this->getCreateForm();\n\n return view($this->getViewName('create'), [\n 'crudSlug' => $this->slug,\n 'form' => $form,\n ]);\n }", "public function create()\n\t{\n\t\treturn view('admin.estadoflete.new');\n\t}", "public function create()\n {\n $person = new Person;\n return view('contents.personform')->with(compact('person') );\n }", "public function createAction(){\n \t$this->view->placeholder('title')->set('Create');\n \t$this->_forward('form');\n }", "public function create()\n {\n Gate::authorize('app.products.create');\n\n return view('backend.products.form');\n }", "public function create()\n {\n return view('essentials::create');\n }", "public function create()\n {\n return view('student.add');\n }", "public function create()\n\t{\n\t\treturn view('loisier/create');\n\t}", "public function create()\n {\n return view('url.form');\n }", "public function newAction()\n {\n $entity = new Facture();\n $factureType = new FactureType();\n\t\t$factureType->setUser($this->get('security.context')->getToken()->getUser());\n $form = $this->createForm($factureType, $entity);\n\n return $this->render('chevPensionBundle:Facture:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }", "public function newAction()\n {\n $entity = new Chofer();\n $form = $this->createForm(new ChoferType(), $entity, ['user' => $this->getUser()]);\n\n return $this->render('ChoferesBundle:Chofer:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n 'css_active' => 'chofer',\n ));\n }", "public function create()\n\t{\n\t\treturn View::make('crebos.create');\n\t}", "public function create() : View\n {\n $fieldset = $this->menuFieldset();\n\n return $this->view('create', [\n 'title' => trans('addons.Aardwolf::titles.create'),\n 'data' => [],\n 'fieldset' => $fieldset->toPublishArray(),\n 'suggestions' => [],\n 'submitUrl' => route('aardwolf.postCreate')\n ]);\n }", "public function create()\n {\n return view('libro.create');\n }", "public function create()\n {\n return view('libro.create');\n }", "public function newAction()\n {\n $entity = new Species();\n $form = $this->createForm(new SpeciesType(), $entity);\n\n return $this->render('InfectBackendBundle:Species:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }", "public function create()\n {\n return view('crud/add'); }", "public function create()\n\t{\n\t\treturn View::make('supplier.create');\n\t}", "public function newAction()\n {\n $entity = new Company();\n $form = $this->createForm(new CompanyType(), $entity);\n\n return $this->render('SiteSavalizeBundle:Company:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }", "public function create()\n {\n return view(\"List.form\");\n }", "public function index_onCreateForm()\n\t{\n\t\tparent::create();\n\t\treturn $this->makePartial('create');\n\t}", "public function create()\n {\n //load create form\n return view('products.create');\n }", "public function create()\n {\n return view('article.addform');\n }", "public function create()\n {\n // Mengarahkan ke halaman form\n return view('buku.form');\n }", "public function create()\n\t{\n\t\t// load the create form (app/views/material/create.blade.php)\n\t\t$this->layout->content = View::make('material.create');\n\t}", "public function create()\n {\n return view('saldo.form');\n }", "public function create()\n\t\t{\n\t\t\treturn view('kuesioner.create');\n\t\t}", "public function view_create_questioner_form() {\n \t// show all questioner\n \t// send questioner to form\n \treturn view(\"create_questioner\");\n }", "public function newAction() {\n $entity = new Question();\n $form = $this->createCreateForm($entity);\n\n return $this->render('CdlrcodeBundle:Question:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }", "public function create()\n {\n $data['companies'] = Company::select('id', 'name')->where('status', 1)->orderBy('id', 'desc')->get();\n return view('admin.outlet.outlet_form', $data);\n }", "public function create()\n {\n return view('admin.inverty.add');\n }", "public function create()\n {\n return view('Libro.create');\n }", "public function create()\n {\n $title = trans('entry_mode.new');\n return view('layouts.create', compact('title'));\n }", "public function create()\n {\n $breadcrumb='car.create';\n return view('admin.partials.cars.form', compact('breadcrumb'));\n }", "public function create()\n {\n return view(\"familiasPrograma.create\");\n }", "public function create()\n {\n return view('admin.car.create');\n }", "public function create()\n {\n return view('admin.car.create');\n }", "public function create()\n\t{\n\t\treturn View::make('perusahaans.create');\n\t}", "public function create()\n {\n return view(\"create\");\n }", "public function create()\n\t{\n //echo 'show form';\n\t\treturn View::make('gaans.create');\n\t}", "public function create()\n {\n $title = trans('dormitorybed.new');\n $this->generateParams();\n\n return view('layouts.create', compact('title'));\n }", "public function create()\n {\n return view('forming');\n }", "public function formNew() {\n $this->data->options = array(\n 'RJ' => 'Rio de Janeiro',\n 'MG' => 'Minas Gerais',\n 'SP' => 'São Paulo',\n 'ES' => 'Espírito Santo',\n 'BA' => 'Bahia',\n 'RS' => 'Rio Grande do Sul'\n );\n $this->data->action = \"@exemplos/pessoa/save\";\n $this->render();\n }", "public function create()\n {\n \t\n \treturn view('supplies.create');\n\n }", "public function createAction()\n {\n if ($form = $this->processForm()) {\n $this->setPageTitle(sprintf($this->_('New %s...'), $this->getTopic()));\n $this->html[] = $form;\n }\n }", "public function create()\n {\n $page_title = \"Add New\";\n return view($this->path.'create', compact('page_title'));\n }", "public function create()\n {\n // not sure what to do with the form since im\n // using ame partial for both create and edit\n return view('plants.create')->with('plant', new Plant);\n }", "public function create() {\n\t\t$title = 'Create | Show';\n\n\t\treturn view('admin.show.create', compact('title'));\n\t}", "public function create()\n {\n return view('student::students.student.create');\n }", "public function newAction(){\n\t\t$entity = new Reserva();\n\t\t$form = $this->createCreateForm($entity);\n\n\t\treturn $this->render('LIHotelBundle:Reserva:new.html.twig', array(\n\t\t\t'entity' => $entity,\n\t\t\t'form' => $form->createView(),\n\t\t));\n\t}" ]
[ "0.75948673", "0.75948673", "0.75863165", "0.7577412", "0.75727344", "0.7500887", "0.7434847", "0.7433956", "0.73892003", "0.73531085", "0.73364776", "0.73125", "0.7296102", "0.7281891", "0.72741455", "0.72424185", "0.7229325", "0.7226713", "0.7187349", "0.7179176", "0.7174283", "0.7150356", "0.71444064", "0.71442676", "0.713498", "0.71283126", "0.7123691", "0.71158516", "0.71158516", "0.71158516", "0.7112176", "0.7094388", "0.7085711", "0.708025", "0.70800644", "0.70571953", "0.70571953", "0.70556754", "0.70396435", "0.7039549", "0.7036275", "0.703468", "0.70305896", "0.7027638", "0.70265305", "0.70199823", "0.7018007", "0.7004984", "0.7003889", "0.7000935", "0.69973785", "0.6994679", "0.6993764", "0.6989918", "0.6986989", "0.6966502", "0.69656384", "0.69564354", "0.69518244", "0.6951109", "0.6947306", "0.69444615", "0.69423944", "0.6941156", "0.6937871", "0.6937871", "0.6936686", "0.69345254", "0.69318026", "0.692827", "0.69263744", "0.69242257", "0.6918349", "0.6915889", "0.6912884", "0.691146", "0.69103104", "0.69085974", "0.69040126", "0.69014287", "0.69012105", "0.6900397", "0.68951064", "0.6893521", "0.68932164", "0.6891899", "0.6891616", "0.6891616", "0.6889246", "0.68880934", "0.6887128", "0.6884732", "0.68822503", "0.68809193", "0.6875949", "0.68739206", "0.68739134", "0.6870358", "0.6869779", "0.68696856", "0.686877" ]
0.0
-1
Store a newly created resource in storage.
public function store(Request $request) { $switch = new SmsSwitch; $switch->student_addmission_online_switch = $request->student_addmission_online_switch; $switch->student_addmission_manual_switch = $request->student_addmission_manual_switch; $switch->student_approve_switch = $request->student_approve_switch; $switch->student_fee_collection_switch = $request->student_fee_collection_switch; $switch->institute_income_switch = $request->institute_income_switch; $switch->institute_expence_switch = $request->institute_expence_switch; $switch->student_payment_due_switch = $request->student_payment_due_switch; $switch->income_payment_due_switch = $request->income_payment_due_switch; $switch->expence_payment_due_switch = $request->expence_payment_due_switch; $switch->save(); return back(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function store($data, Resource $resource);", "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 }", "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 }", "public function createStorage();", "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 }", "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 }", "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 }", "function storeAndNew() {\n $this->store();\n }", "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 }", "public function store()\n {\n if (!$this->id) { // Insert\n $this->insertObject();\n } else { // Update\n $this->updateObject();\n }\n }", "public function store()\n\t{\n\t\t\n\t\t//\n\t}", "public function store()\r\n\t{\r\n\t\t//\r\n\t}", "public function store()\r\n\t{\r\n\t\t//\r\n\t}", "public function store()\r\n\t{\r\n\t\t//\r\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}" ]
[ "0.72865677", "0.7145327", "0.71325725", "0.6640912", "0.66209733", "0.65685713", "0.652643", "0.65095705", "0.64490104", "0.637569", "0.63736665", "0.63657933", "0.63657933", "0.63657933", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437" ]
0.0
-1
Display the specified resource.
public function show(SmsSwitch $smsSwitch) { // }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function show(Resource $resource)\n {\n // not available for now\n }", "public function show(Resource $resource)\n {\n //\n }", "function Display($resource_name, $cache_id = null, $compile_id = null)\n {\n $this->_smarty->display($resource_name, $cache_id, $compile_id);\n }", "private function showResourceable($resourceable)\n {\n save_resource_url();\n\n return $this->view('resources.create_edit')\n ->with('resource', $resourceable)\n ->with('photos', $resourceable->photos)\n ->with('videos', $resourceable->videos)\n ->with('documents', $resourceable->documents);\n }", "function display($resource_name, $cache_id = null, $compile_id = null) {\n\t\t$this->_getResourceInfo($resource_name); // Saves resource info to a Smarty class var for debugging\n\t\t$_t3_fetch_result = $this->fetch($resource_name, tx_smarty_div::getCacheID($cache_id), $compile_id);\n if ($this->debugging) { // Debugging will have been evaluated in fetch\n require_once(SMARTY_CORE_DIR . 'core.display_debug_console.php');\n $_t3_fetch_result .= smarty_core_display_debug_console(array(), $this);\n }\n\t\treturn $_t3_fetch_result;\n\t}", "public function show(ResourceSubject $resourceSubject)\n {\n //\n }", "public function show(ResourceManagement $resourcesManagement)\n {\n //\n }", "public function viewEditResources()\n {\n $database = new Database();\n $id = $this->_params['id'];\n\n $resource = $database->getResourceById($id);\n\n $availableResource = new Resource($resource['ResourceID'], $resource['ResourceName'], $resource['Description']\n , $resource['ContactName'] , $resource['ContactEmail'] , $resource['ContactPhone'] ,\n $resource['Link'], $resource['active']);\n $this->_f3->set('Resource', $availableResource);\n\n echo Template::instance()->render('view/include/head.php');\n echo Template::instance()->render('view/include/top-nav.php');\n echo Template::instance()->render('view/edit-resources.php');\n echo Template::instance()->render('view/include/footer.php');\n }", "public function retrieve(Resource $resource);", "public function showResource($resouceable, $id)\n {\n $model_name = str_replace('-', ' ',ucwords($resouceable));\n $model_name = str_replace(' ', '',ucwords($model_name));\n\n $resource_type = 'App\\Models\\\\'.$model_name;\n $model = app($resource_type);\n $model = $model->find($id);\n\n return $this->showResourceable($model);\n }", "public function showAction(Ressource $ressource)\n {\n $deleteForm = $this->createDeleteForm($ressource);\n\n return $this->render('ressource/show.html.twig', array(\n 'ressource' => $ressource,\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "public function show(Dispenser $dispenser)\n {\n //\n }", "public function show($id)\n {\n $resource = Resource::find($id);\n dd($resource);\n }", "public function displayAction() {\n\t\tif(is_numeric($this->req_id)) {\n\t\t\tAPI::DEBUG(\"[DefaultController::displayAction()] Getting \" . $this->req_id, 1);\n\t\t\t$this->_view->data['info'] = $this->_model->get($this->req_id);\n\t\t\t$this->_view->data['action'] = 'edit';\n\n\t\t} else {\n\t\t\t$this->_view->data['action'] = 'new';\n\t\t}\n\t\t// auto call the hooks for this module/action\n\t\terror_log(\"Should Call: \" . $this->module .\"/\".$this->action.\"/\".\"controller.php\");\n\t\tAPI::callHooks($this->module, $this->action, 'controller', $this);\n\n\t\t$this->addModuleTemplate($this->module, 'display');\n\n\t}", "public function show(NebulaResource $resource, $item): View\n {\n $this->authorize('view', $item);\n\n return view('nebula::resources.show', [\n 'resource' => $resource,\n 'item' => $item,\n ]);\n }", "public function resource(string $resource, string $controller): void\n {\n $base = $this->plural($resource);\n $entity = '/{'.$resource.'}';\n\n $this->app->get($base, $controller.'@index');\n $this->app->post($base, $controller.'@store');\n $this->app->get($base.$entity, $controller.'@show');\n $this->app->patch($base.$entity, $controller.'@update');\n $this->app->delete($base.$entity, $controller.'@destroy');\n }", "function displayCustom($resource_name, $cache_id = null, $compile_id = null)\n\t{\n\t return $this->display(DotbAutoLoader::existingCustomOne($resource_name), $cache_id, $compile_id);\n\t}", "public function show($id)\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n /* Get the specified resource */\n $resource = $this->model::findOrFail($id);\n\n /* Sets the view */\n if (view()->exists(\"admin.{$this->name}.show\")) {\n $view = \"admin.{$this->name}.show\";\n } else {\n $view = 'admin.includes.actions.show';\n }\n\n /* Displays the specified resource page */\n return view($view)\n ->with('resource', $resource)\n ->with('name', $this->name);\n }", "public function show($id)\n {\n $currentUser = JWTAuth::parseToken()->authenticate();\n $rules = [\n 'id' => 'required|integer'\n ];\n\n $validator = Validator::make(['id' => $id], $rules);\n if ($validator->fails()) {\n return APIHandler::response(0, $validator->errors(), 400);\n }\n $resource = $this->resourceRepository->fetchResource($id);\n $this->resourceRepository->storeView($id, $currentUser['id']);\n\n $data = [\n 'resource' => $resource,\n 'related_resources' => $this->resourceRepository->getResourcesRelatedTo($resource->id, $resource->mentoring_area_id)\n ];\n\n return APIHandler::response(1, \"Show Resource\", $data);\n }", "public function get(Resource $resource);", "public function showAction()\n {\n $model = $this->_getPhotoModel();\n $photo = $model->fetchEntry($this->getRequest()->getParam('id'));\n\n if (null === $photo) {\n return $this->_forward('notfound', 'error');\n }\n\n $this->view->auth = Zend_Auth::getInstance();\n $this->view->title = $photo->title;\n $this->view->photo = $photo;\n }", "public function show($id)\n {\n //\n $data=Resource::find($id);\n return view('resourceDetails',compact('data'));\n }", "function display() {\n\t\t$view = &$this->getView();\n\t\t$view->display();\n\t}", "public function show(ShowResourceRequest $request, $id)\n {\n // TODO: Implement show() method.\n }", "function show( $resource ){\n\n $where = \"reservation_status <> 'Pending' AND id = {$resource}\";\n $reservation = where( 'reservations', $where );\n $reservation = $reservation[0];\n\n return view('admin/reservation/preview_reservation', compact( 'reservation' ));\n}", "public function show()\n {\n if ($this->twig !== false) {\n $this->twigDefaultContext();\n if ($this->controller) {\n $this->controller->display($this->data);\n }\n echo $this->twig->render($this->twig_template, $this->data);\n } else {\n $filename = $this->findTemplatePath($this->template);\n require($filename);\n }\n }", "public function edit(Resource $resource)\n {\n //\n }", "public function show(rc $rc)\n {\n //\n }", "public function show(Resolucion $resolucion)\n {\n //\n }", "public function showAction(furTexture $furTexture)\n {\n\n return $this->render('furtexture/show.html.twig', array(\n 'furTexture' => $furTexture,\n ));\n }", "public function show()\n\t{\n\t\t//\n\t}", "public function show()\n\t{\n\t\t//\n\t}", "public function show()\n\t{\n\t\t//\n\t}", "public function show(Resena $resena)\n {\n }", "public function edit(Resource $resource)\n {\n return view('admin.resources.edit', compact('resource'));\n }", "public function showAction() {\n $docId = $this->getParam('id');\n\n // TODO verify parameter\n\n $document = new Opus_Document($docId);\n\n $this->_helper->layout()->disableLayout();\n\n $this->view->doc = $document;\n $this->view->document = new Application_Util_DocumentAdapter($this->view, $document);\n }", "public function action_display()\r\n\t{\r\n\t\t$event = ORM::factory('event', array('id' => $this->request->param('id')));\r\n\t\r\n\t\tif ( ! $event->loaded())\r\n\t\t{\r\n\t\t\tNotices::error('event.view.not_found');\r\n\t\t\t$this->request->redirect(Route::url('event'));\r\n\t\t}\r\n\t\t\r\n\t\t// Can user view this event?\r\n\t\tif ( ! $this->user->can('event_view', array('event' => $event)))\r\n\t\t{\r\n\t\t\t// Error notification\r\n\t\t\tNotices::error('event.view.not_allowed');\r\n\t\t\t$this->request->redirect(Route::url('event'));\r\n\t\t}\r\n\t\t\r\n\t\t// Pass event data to the view class\r\n\t\t$this->view->event_data = $event;\r\n\t\t$this->view->user = $this->user;\r\n\t}", "public function execute()\n {\n // HTTP Request Get\n if ($this->type == \"resource\") {\n $action = $this->getResourceAction();\n switch ($action) {\n case \"show\":\n $this->show();\n break;\n case \"create\":\n $this->create();\n break;\n case \"edit\":\n $this->edit();\n break;\n case \"destroy\":\n $this->destroy();\n break;\n default:\n echo $this->render();\n break;\n }\n } else {\n $action = $this->Request->action;\n switch ($action) {\n case \"show\":\n $this->show();\n break;\n case \"create\":\n $this->create();\n break;\n case \"edit\":\n $this->edit();\n break;\n case \"destroy\":\n $this->destroy();\n break;\n default:\n echo $this->render();\n break;\n }\n }\n }", "public function show(Resident $resident)\n {\n $this->authorize('admin.resident.show', $resident);\n\n // TODO your code goes here\n }", "public function display()\n {\n echo $this->getDisplay();\n $this->isDisplayed(true);\n }", "public function display()\n\t{\n\t\tparent::display();\n\t}", "public function get_resource();", "public function show()\n\t{\n\t\t\n\t}", "function display() {\n\n\t\t// Check authorization, abort if negative\n\t\t$this->isAuthorized() or $this->abortUnauthorized();\n\n\t\t// Get the view\n\t\t$view = $this->getDefaultView();\n\n\t\tif ($view == NULL) {\n\t\t\tthrow new Exception('Display task called, but there is no view assigned to that controller. Check method getDefaultView.');\n\t\t}\n\n\t\t$view->listing = true;\n\n\t\t// Wrap the output of the views depending on the way the stuff should be shown\n\t\t$this->wrapViewAndDisplay($view);\n\n\t}", "public function viewResources()\n {\n $database = new Database();\n\n $resources = $database->getAllActiveResourcesNoLimit();\n\n\n $resourceArray = array();\n $i = 1;\n\n foreach ($resources as $resource) {\n $availableResource = new Resource($resource['ResourceID'], $resource['ResourceName'], $resource['Description']\n , $resource['ContactName'] , $resource['ContactEmail'] , $resource['ContactPhone'] ,\n $resource['Link'], $resource['active']);\n array_push($resourceArray, $availableResource);\n $i += 1;\n }\n $resourceSize = sizeof($resourceArray);\n $this->_f3->set('resourcesByActive', $resourceArray);\n $this->_f3->set('resourcesSize', $resourceSize);\n echo Template::instance()->render('view/include/head.php');\n echo Template::instance()->render('view/include/top-nav.php');\n echo Template::instance()->render('view/resources.php');\n echo Template::instance()->render('view/include/footer.php');\n }", "public function show($id)\n {\n $this->title .= ' show';\n $this->one($id);\n }", "public function display($title = null)\n {\n echo $this->fetch($title);\n }", "public function display(){}", "public function show($id)\n\t{\n\t\t//\n\t\t//\n\t\n\t}", "public function viewAction()\n\t{\n\t\t//get Id param from request\n\t\tif (!$id = $this->_getParam('id')) {\n\t\t\t$this->getFlashMessenger()->addMessage('Product ID was not specified');\n\t\t\t$this->getRedirector()->gotoSimple('list');\n\t\t}\n\n\t\t//fetch requested ProductID from DB\n\t\tif (!$this->_model->fetch($id)) {\n\t\t\t$this->render('not-found');\n\t\t} else {\n\t\t\t$this->view->model = $this->_model;\n\t\t}\n\t}", "public function show($id)\n {\n // Get single person\n $person = Person::findOrFail($id);\n\n // Return single person as a resource\n return '<h1>Person Number '.$id.'</h1><br>'.json_encode(new PersonResource($person));\n }", "#[TODO] use self object?\n\tprotected function GET(ResourceObject $resource) {\n#[TODO]\t\tif ($resource->getMTime())\n#[TODO]\t\t\t$this->response->headers->set('Last-modified', gmdate('D, d M Y H:i:s ', $resource->getMTime()) . 'GMT');\n#[TODO]\t\tif ($resource->getCTime())\n#[TODO]\t\t\t$this->response->headers->set('Date', gmdate('D, d M Y H:i:s ', $resource->getCTime()) . 'GMT');\n\n\n#[TODO] handle file streams\n\t\t// get ranges\n#\t\t$ranges = WebDAV::getRanges($this->request, $this->response);\n\n\t\t// set the content of the response\n\t\tif ($resource instanceof ResourceDocument) {\n\t\t\t$this->response->content->set($resource->getContents());\n\t\t\t$this->response->content->setType($resource->getMIMEType());\n\t\t\t$this->response->content->encodeOnSubmit(true);\n\t\t}\n\t}", "public function display() {\n echo $this->render();\n }", "public function show($id)\n\t{\n\t//\n\t}", "public function show($id)\n\t{\n\t//\n\t}", "function Fetch($resource_name, $cache_id = null, $compile_id = null, $display = false)\n {\n return $this->_smarty->fetch($resource_name, $cache_id, $compile_id, $display);\n }", "public function show($id)\n {\n //\n $this->_show($id);\n }", "public function show()\n\t{\n\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {}", "static public function showCallback(O_Dao_Renderer_Show_Params $params) {\r\n\t\t/* @var $r R_Mdl_Resource */\r\n\t\t$r = $params->record();\r\n\t\t// Setting layout title\r\n\t\t$params->layout()->setTitle($r->getPageTitle());\r\n\r\n?><h1><?=$r->title?></h1><div id=\"resource\"><?\r\n\t\tif($r->getContent()) {\r\n\t\t\t// page has its own content -- show it\r\n\t\t\t$r->getContent()->show($params->layout(), \"content\");\r\n\t\t} else {\r\n\t\t\t// It is a post unit, show all childs\r\n\t\t\tif($r->is_unit == 1) {\r\n\t\t\t\t$r->addQueryAccessChecks($r->getChilds(1))->show($params->layout(), \"content\");\r\n\r\n\t\t\t// It is a folder with several units, show paginator\r\n\t\t\t} elseif($r->show_def == \"last-units\") {\r\n\t\t\t\tlist($type, $perpage) = explode(\":\", $r->show_def_params);\r\n\t\t\t\t/* @var $p O_Dao_Paginator */\r\n\t\t\t\t$p = $r->addQueryAccessChecks($r->getChilds())->test(\"is_unit\", 1)->getPaginator(array($r, \"getPageUrl\"), $perpage);\r\n\t\t\t\t$p->show($params->layout(), $type);\r\n\t\t\t// It is a folder with subfolders, boxes, contents. Show one childs level\r\n\t\t\t} else {\r\n\t\t\t\t$r->addQueryAccessChecks($r->getChilds(1))->show($params->layout(), \"on-parent-page\");\r\n\t\t\t}\r\n\r\n\t\t}\r\n?></div><?\r\n\t}", "public function show($id)\r\n\t{\r\n\t\t//\r\n\r\n\r\n\r\n\t}", "public function show($resourceId, $eventId)\n {\n $routes = $this->routes;\n\n $eventable = $this->getEventableRepository()->model()->findOrFail($resourceId);\n\n if (method_exists($eventable, 'events')) {\n $event = $eventable->events()->find($eventId);\n\n if ($event) {\n $apiObject = $this->event->findApiObject($event->api_id);\n\n return view('events.eventables.show', compact('routes', 'eventable', 'event', 'apiObject'));\n }\n }\n\n abort(404);\n }", "public abstract function display();", "abstract public function resource($resource);", "public function show($id)\r\r\n\t{\r\r\n\t\t//\r\r\n\t}", "public function show( $id ) {\n\t\t//\n\t}", "public function show( $id ) {\n\t\t//\n\t}", "public function show(Response $response)\n {\n //\n }", "public function show()\n {\n return auth()->user()->getResource();\n }", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}" ]
[ "0.8233718", "0.8190437", "0.6828712", "0.64986944", "0.6495974", "0.6469629", "0.6462615", "0.6363665", "0.6311607", "0.62817234", "0.6218966", "0.6189695", "0.61804265", "0.6171014", "0.61371076", "0.61207956", "0.61067593", "0.6105954", "0.6094066", "0.6082806", "0.6045245", "0.60389996", "0.6016584", "0.598783", "0.5961788", "0.59606946", "0.5954321", "0.59295714", "0.59182066", "0.5904556", "0.59036547", "0.59036547", "0.59036547", "0.5891874", "0.58688277", "0.5868107", "0.58676815", "0.5851883", "0.58144855", "0.58124036", "0.58112013", "0.5803467", "0.58012545", "0.5791527", "0.57901084", "0.5781528", "0.5779676", "0.5757105", "0.5756208", "0.57561266", "0.57453394", "0.57435393", "0.57422745", "0.5736634", "0.5736634", "0.5730559", "0.57259274", "0.5724891", "0.5722562", "0.5722562", "0.5722562", "0.5722562", "0.5722562", "0.5722562", "0.5722562", "0.5722562", "0.5722562", "0.5722562", "0.5718969", "0.5713412", "0.57091093", "0.5706405", "0.57057405", "0.5704541", "0.5704152", "0.57026845", "0.57026845", "0.56981397", "0.5693083", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962" ]
0.0
-1
Show the form for editing the specified resource.
public function edit(SmsSwitch $smsSwitch) { // }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function edit(Resource $resource)\n {\n return view('admin.resources.edit', compact('resource'));\n }", "public function edit(Resource $resource)\n {\n //\n }", "public function edit($id)\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n /* Get the specified resource */\n $resource = $this->model::findOrFail($id);\n\n /* Sets the view */\n if (view()->exists(\"admin.{$this->name}.edit\")) {\n $view = \"admin.{$this->name}.edit\";\n } else {\n $view = 'admin.includes.actions.edit';\n }\n\n /* Displays the edit resource page */\n return view($view)\n ->with('resource', $resource)\n ->with('name', $this->name);\n }", "public function edit(NebulaResource $resource, $item): View\n {\n $this->authorize('update', $item);\n\n return view('nebula::resources.edit', [\n 'resource' => $resource,\n 'item' => $item,\n ]);\n }", "public function edit() {\r\n $id = $this->api->getParam('id');\r\n\r\n if ($id) {\r\n $this->model->id = $id;\r\n $this->checkOwner();\r\n }\r\n $object = $this->model->find_by_id($id);\r\n\r\n $this->api->loadView('contact-form', array('row' => $object));\r\n }", "public function viewEditResources()\n {\n $database = new Database();\n $id = $this->_params['id'];\n\n $resource = $database->getResourceById($id);\n\n $availableResource = new Resource($resource['ResourceID'], $resource['ResourceName'], $resource['Description']\n , $resource['ContactName'] , $resource['ContactEmail'] , $resource['ContactPhone'] ,\n $resource['Link'], $resource['active']);\n $this->_f3->set('Resource', $availableResource);\n\n echo Template::instance()->render('view/include/head.php');\n echo Template::instance()->render('view/include/top-nav.php');\n echo Template::instance()->render('view/edit-resources.php');\n echo Template::instance()->render('view/include/footer.php');\n }", "public function edit()\n {\n return view('hirmvc::edit');\n }", "public function editformAction(){\n\t\t$this->loadLayout();\n $this->renderLayout();\n\t}", "public function edit() {\n $id = $this->parent->urlPathParts[2];\n // pass name and id to view\n $data = $this->parent->getModel(\"fruits\")->select(\"select * from fruit_table where id = :id\", array(\":id\"=>$id));\n $this->getView(\"header\", array(\"pagename\"=>\"about\"));\n $this->getView(\"editForm\", $data);\n $this->getView(\"footer\");\n }", "public function edit($id)\n\t{\n\t\treturn $this->showForm('update', $id);\n\t}", "public function edit($id)\n {\n $model = $this->modelObj;\n $formObj = $model::findOrFail($id);\n $data['formObj'] = $formObj;\n return view($this->veiw_base . '.edit', $data);\n }", "public function createEditForm(Resourceperson $entity){\n \n $form = $this->createForm(new ResourcepersonType(), $entity, array(\n 'action' => $this->generateUrl('rsp_update', array('id' => $entity->getRpId())),\n 'method' => 'PUT',\n ));\n\n $form->add('submit', 'submit', array('label' => 'Update','attr'=> array(\n 'class'=>'btn btn primary'\n )));\n\n return $form;\n }", "private function createEditForm(Resource $entity)\n {\n $form = $this->createForm(new ResourceType(), $entity, array(\n 'action' => $this->generateUrl('social_admin_resource_update', array('id' => $entity->getId())),\n 'method' => 'PUT',\n ));\n\n $form->add('submit', 'submit', array('label' => '保存','attr'=>[\n 'class'=>'btn btn-primary'\n ]));\n\n return $form;\n }", "public function edit($id)\n {\n return $this->showForm('update', $id);\n }", "public function edit($id)\n {\n return $this->showForm('update', $id);\n }", "public function editAction()\n {\n if ($form = $this->processForm()) {\n if ($this->useTabbedForms && method_exists($this, 'getSubject')) {\n $data = $this->getModel()->loadFirst();\n $subject = $this->getSubject($data);\n $this->setPageTitle(sprintf($this->_('Edit %s %s'), $this->getTopic(1), $subject));\n } else {\n $this->setPageTitle(sprintf($this->_('Edit %s'), $this->getTopic(1)));\n }\n $this->html[] = $form;\n }\n }", "public function edit($id)\n {\n $this->data['entity'] = GS_Form::where('id', $id)->firstOrFail();\n return view('admin.pages.forms.edit', $this->data);\n }", "public function edit($id)\n\t{\n\t\t// get the fbf_presenca\n\t\t$fbf_presenca = FbfPresenca::find($id);\n\n\t\t\n\t\t// show the edit form and pass the fbf_presenca\n\t\t$this->layout->content = View::make('fbf_presenca.edit')\n->with('fbf_presenca', $fbf_presenca);\n\t}", "public function edit($id)\n {\n $data = $this->model->find($id);\n\n return view('admin.backends.employee.form.edit',compact('data'));\n }", "public function edit($model, $form);", "function edit() {\n\t\tglobal $tpl;\n\n\t\t$form = $this->initForm();\n\t\t$tpl->setContent($form->getHTML());\n\t}", "public function edit($id)\n\t{\n\t\t$faith = Faith::find($id);\n \n return view('faith.form')->with('faith', $faith);\n\n\t}", "public function edit()\n { \n return view('admin.control.edit');\n }", "public function edit(Form $form)\n {\n //\n }", "public function edit()\n {\n return view('common::edit');\n }", "public function edit($id)\n {\n $resource = (new AclResource())->AclResource;\n $roleResource = AclRole::where('role', $id)->get(['resource'])->toArray();\n $roleResource = Arr::pluck($roleResource, 'resource');\n return view('Admin.acl.role.form', [\n 'role' => $id,\n 'resource' => $resource,\n 'roleResource' => $roleResource,\n ]);\n }", "public function edit()\n {\n return view('admin::edit');\n }", "public function edit()\n {\n return view('admin::edit');\n }", "public function edit()\r\n {\r\n return view('petro::edit');\r\n }", "public function edit($id)\n {\n // show form edit user info\n }", "public function edit()\n {\n return view('escrow::edit');\n }", "public function edit($id)\n {\n $resource = ResourceManagement::find($id);\n\n $users = User::get();\n // Redirect to user list if updating user wasn't existed\n if ($resource == null || $resource->count() == 0) {\n return redirect()->intended('/resource-management');\n }\n\n return view('resources-mgmt/edit', ['resource' => $resource, 'users' => $users]);\n }", "public function edit()\n {\n return view('commonmodule::edit');\n }", "public function editAction()\n\t{\n\t\t$params = $this->data->getParams();\n\t\t$params = $this->valid->clearDataArr($params);\n\t\tif (isset($params['id']))\n\t\t{\n\t\t\t$this->employee->setFlag(true);\n\t\t}\n\t\tif (isset($_POST['submit']))\n\t\t{\n\t\t\t$action = $this->valid->clearDataArr($_POST);\n\t\t\t$this->employee->setDataArray($action);\n\t\t\theader('Location: ' . PATH . 'Employee/index/', true, 303);\n\t\t}\n\t\t$employee = $this->employee->setAction('edit');\n\t\t$this->view->addToReplace($employee);\n\t\t$this->listEmployee();\n\t\t$this->arrayToPrint();\n\t}", "public function edit()\n {\n return view('catalog::edit');\n }", "public function edit()\n {\n return view('catalog::edit');\n }", "public function edit(form $form)\n {\n //\n }", "public function actionEdit($id) { }", "public function edit()\n {\n return view('admincp::edit');\n }", "public function edit()\n {\n return view('scaffold::edit');\n }", "public function edit($id)\n {\n $header = \"Edit\";\n\t\t$data = Penerbit::findOrFail($id);\n\t\treturn view('admin.penerbit.form', compact('data','header'));\n }", "public function edit()\n {\n return view('Person.edit');\n }", "public function edit($id)\n {\n $data = Form::find($id);\n return view('form.edit', compact('data'));\n }", "public function edit($id)\n\t{\n\t\t$career = $this->careers->findById($id);\n\t\treturn View::make('careers._form', array('career' => $career, 'exists' => true));\n\t}", "public function edit($id, Request $request)\n {\n $formObj = $this->modelObj->find($id);\n\n if(!$formObj)\n {\n abort(404);\n } \n\n $data = array();\n $data['formObj'] = $formObj;\n $data['page_title'] = \"Edit \".$this->module;\n $data['buttonText'] = \"Update\";\n\n $data['action_url'] = $this->moduleRouteText.\".update\";\n $data['action_params'] = $formObj->id;\n $data['method'] = \"PUT\"; \n\n return view($this->moduleViewName.'.add', $data);\n }", "public function edit($id)\n\t{\n\t\t// get the material\n\t\t$material = Material::find($id);\n\n\t\t// show the edit form and pass the material\n\t\t$this->layout->content = View::make('material.edit')\n\t\t\t->with('material', $material);\n\t}", "public function edit(Flight $exercise, FlightResource $resource)\n {\n return $this->viewMake('adm.smartcars.exercise-resources.edit')\n ->with('flight', $exercise)\n ->with('resource', $resource);\n }", "public function edit()\n {\n $id = $this->getId();\n return view('panel.user.form', [\n 'user' => $this->userRepository->findById($id),\n 'method' => 'PUT',\n 'routePrefix' => 'profile',\n 'route' => 'profile.update',\n 'parameters' => [$id],\n 'breadcrumbs' => $this->getBreadcrumb('Editar')\n ]);\n }", "public function edit()\r\n {\r\n return view('mpcs::edit');\r\n }", "function edit()\n\t{\n\t\t// hien thi form sua san pham\n\t\t$id = getParameter('id');\n\t\t$product = $this->model->product->find_by_id($id);\n\t\t$this->layout->set('auth_layout');\n\t\t$this->view->load('product/edit', [\n\t\t\t'product' => $product\n\t\t]);\n\t}", "public function edit($id)\n {\n //\n $data = Diskon::find($id);\n\n $form = $this->form;\n $edit = $this->edit;\n $field = $this->field;\n $page = $this->page;\n $id = $id;\n $title = $this->title;\n return view('admin/page/'.$this->page.'/edit',compact('form','edit','data','field','page','id','title'));\n }", "public function edit($id)\n {\n return $this->showForm($id);\n }", "public function edit($id)\n {\n return $this->showForm($id);\n }", "protected function _edit(){\n\t\treturn $this->_editForm();\n\t}", "public function editAction()\n {\n $robot = Robots::findFirst($this->session->get(\"robot-id\"));\n if ($this->request->isGet()) {\n $this->tag->prependTitle(\"Редактировать робота :: \");\n $user = $this->session->get(\"auth-id\");\n if (!$robot) {\n $this->flashSession->error(\n \"Робот не найден\"\n );\n return $this->response->redirect(\"users/usershow/$user->name\");\n }\n\n }\n\n $this->view->form = new RobotForm(\n $robot,\n [\n \"edit\" => true,\n ]\n );\n }", "public function editAction()\n {\n $form = new $this->form();\n\n $request = $this->getRequest();\n $param = $this->params()->fromRoute('id', 0);\n\n $repository = $this->getEm()->getRepository($this->entity);\n $entity = $repository->find($param);\n\n if ($entity) {\n\n $form->setData($entity->toArray());\n\n if ( $request->isPost() ) {\n\n $form->setData($request->getPost());\n\n if ( $form->isValid() ) {\n\n $service = $this->getServiceLocator()->get($this->service);\n $service->update($request->getPost()->toArray());\n\n return $this->redirect()->toRoute($this->route, array('controller' => $this->controller));\n }\n }\n } else {\n return $this->redirect()->toRoute($this->route, array('controller' => $this->controller));\n }\n\n return new ViewModel(array('form' => $form, 'id' => $param));\n\n }", "public function edit($id)\n\t{\n\t\t$SysApplication = \\Javan\\Dynaflow\\Domain\\Model\\SysApplication::find($id);\n\t\t$form = \\FormBuilder::create('Javan\\Dynaflow\\FormBuilder\\SysApplicationForm', [\n \t'method' => 'POST',\n \t'url' => 'sysapplication/update/'.$id,\n \t'model' => $SysApplication,\n \t'data' => [ 'flow_id' => $SysApplication->flow_id]\n \t]);\n\t\treturn View::make('dynaflow::sysapplication.form', compact('form', 'SysApplication'));\n\t}", "public function editAction() {\n\t\t$id = (int) $this->_getParam('id');\n\t\t$modelName = $this->_getParam('model');\n\t\t\n\t\t$model = Marcel_Backoffice_Model::factory($modelName);\n\t\t$item = $model->find($id)->current();\n\t\tif (!$item) {\n\t\t\t$item = $model->createRow();\n\t\t}\n\t\t$form = $item->getForm();\n\t\tif ($this->_request->isPost()) {\n\t\t\t$newId = $form->populate($this->_request->getPost())->save();\n\t\t\tif ($newId) {\n\t\t\t\t$this->_helper->flashMessenger('Saved successfully!');\n\t\t\t\t$this->_helper->redirector('edit', null, null, array('id' => $newId, 'model' => $modelName));\n\t\t\t}\n\t\t}\n\t\t$this->view->form = $form;\n\t\t$this->view->messages = $this->_helper->flashMessenger->getMessages();\n\t}", "public function edit($id)\n {\n return view('models::edit');\n }", "public function edit()\n {\n return view('home::edit');\n }", "public function editAction()\n {\n $id = $this->params()->fromRoute('id');\n $entity = $this->entityManager->find(Entity\\CourtClosing::class, $id);\n if (! $entity) {\n // to do: deal with it\n }\n $form = $this->getForm('update');\n $form->bind($entity);\n if ($this->getRequest()->isPost()) {\n return $this->post();\n }\n\n return new ViewModel(['form' => $form]);\n }", "public function editAction($id)\n {\n $entity = $this->getManager()->find($id);\n\n $breadcrumbs = $this->get(\"white_october_breadcrumbs\");\n $breadcrumbs->addItem('Inicio', $this->get('router')->generate('admin.homepage'));\n $breadcrumbs->addItem($this->entityDescription, $this->get(\"router\")->generate(\"admin.$this->entityName.index\"));\n $breadcrumbs->addItem('Editar');\n\n if (!$entity) {\n throw $this->createNotFoundException('No se ha encontrado el elemento');\n }\n\n $form = $this->getForm($entity);\n\n return $this->render('AdminBundle:Default:edit.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n 'metadata' => $this->getMetadata()\n ));\n }", "public function edit()\n {\n return view('user::edit');\n }", "public function edit()\n {\n return view('user::edit');\n }", "public function edit(Form $form)\n {\n return view('admin.forms.edit', compact('form'));\n }", "public function editAction()\n {\n $form = MediaForm::create($this->get('form.context'), 'media');\n $media = $this->get('media_manager.manager')->findOneById($this->get('request')->get('media_id'));\n \n $form->bind($this->get('request'), $media);\n \n return $this->render('MediaManagerBundle:Admin:form.html.twig', array('form' => $form, 'media' => $media));\n }", "public function editAction($id) {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('CdlrcodeBundle:Question')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Question entity.');\n }\n\n $editForm = $this->createEditForm($entity);\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('CdlrcodeBundle:Question:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "public function edit($id)\n {\n return view('consultas::edit');\n }", "public function edit(DirectorFormBuilder $form, $id)\n {\n return $form->render($id);\n }", "public function edit()\n {\n return view('dashboard::edit');\n }", "public function edit($id){\n $rfid = Rfid::find($id);\n\n //load form view\n return view('rfids.edit', ['rfid' => $rfid]);\n }", "public function edit($id)\n {\n\n // retrieve provider\n $provider = Provider::findOrFail($id);\n\n // return form with provider\n return view('backend.providers.form')->with('provider', $provider);\n }", "public function edit() {\n return view('routes::edit');\n }", "public function edit(Question $question)\n {\n $this->employeePermission('application' , 'edit');\n $question->chooses;\n $action = 'edit';\n return view('admin.setting.question_form', compact('action' , 'question'));\n }", "public function edit($id)\n {\n $this->data['product'] = Product::find($id);\n $this->data['category'] = Category::arrForSelect();\n $this->data['title'] = \" Update Prouct Details\";\n $this->data['mode'] = \"edit\";\n\n return view('product.form', $this->data);\n }", "public function edit(ClueEnFormBuilder $form, $id): Response\n {\n return $form->render($id);\n }", "public function editAction($id)\n {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('BaseBundle:Feriado')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Feriado entity.');\n }\n\n $editForm = $this->createEditForm($entity);\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('BaseBundle:Feriado:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "public function edit($id)\n {\n return view('cataloguemodule::edit');\n }", "public function edit($articulo_id)\n {\n $titulo = \"Editar\";\n return View(\"articulos.formulario\",compact('titulo','articulo_id'));\n }", "public function edit($id)\n {\n $resources = User::find(session('usuario_id'))->resources;\n $languages = Language::pluck('name', 'id');\n $types = Type::pluck('name', 'id');\n $method = 'PATCH';\n\n $recurso = Resource::find($id);\n $url = \"/resource/$recurso->id\";\n\n return view('resources.resources', compact('resources', 'languages', 'types', 'method', 'url', 'recurso'));\n }", "public function displayEditForm(Employee $employee){\n return view('employee.displayEditForm',['employee'=>$employee]);\n }", "public function edit(Question $question)\n {\n $edit = TRUE;\n return view('questionForm', ['question' => $question, 'edit' => $edit]);\n }", "public function edit()\n {\n return view('website::edit');\n }", "public function edit()\n {\n return view('inventory::edit');\n }", "public function editAction()\n {\n View::renderTemplate('Profile/edit.html', [\n 'user' => $this->user\n ]);\n }", "public function edit()\n {\n return view('initializer::edit');\n }", "public function edit($id)\n {\n return view('backend::edit');\n }", "public function edit($id)\n {\n return view('crm::edit');\n }", "public function edit($id)\n {\n return view('crm::edit');\n }", "public function edit($id)\n {\n //dd($id);\n $familiaPrograma= FamiliaPrograma::findOrFail($id);\n return view('familiasPrograma.edit', compact('familiaPrograma'));\n }", "public function edit($id)\n {\n $user = User::where('id', $id)->first();\n\n\n return view('users.forms.update', compact('user'));\n }", "public function editAction($id)\n\t{\n\t\t$school = School::find( $id );\n\t\t$this->render( View::make( 'schools/form' , array(\n\t\t\t'title' => sprintf( 'Modifier \"%s\"', $school->name ),\n\t\t\t'entity' => $school\n\t\t) ) );\n\t}", "public function edit($id)\n {\n \t$product = Product::find($id);\n \treturn view('admin.products.edit')->with(compact('product')); // formulario de actualizacion de datos del producto\n }", "public function edit_person($person_id){\n \t$person = Person::find($person_id);\n \treturn view('resource_detail._basic_info.edit',compact('person'));\n }", "public function edit($id)\n {\n $data = Restful::find($id);\n return view('restful.edit', compact('data'));\n }", "public function edit(Question $question)\n {\n $edit = TRUE;\n return view('questionForm', ['question' => $question, 'edit' => $edit ]);\n }", "public function edit($id)\n {\n $professor = $this->repository->find($id);\n return view('admin.professores.edit',compact('professor'));\n }", "public function edit(Person $person) {\n\t\t$viewModel = new PersonFormViewModel();\n\t\treturn view('person.form', $viewModel);\n\t}", "public function edit($id)\n {\n return $this->form->render('mconsole::personal.form', [\n 'item' => $this->person->query()->with('uploads')->findOrFail($id),\n ]);\n }", "public function editAction($id)\n {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('MedecinIBundle:Fichepatient')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Fichepatient entity.');\n }\n\n $editForm = $this->createEditForm($entity);\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('MedecinIBundle:Fichepatient:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "public function edit($id)\n\t{\n\t\t // get the project\n $project = Project::find($id);\n\n // show the edit form and pass the project\n return View::make('logicViews.projects.edit')->with('project', $project);\n\t}" ]
[ "0.78561044", "0.7695814", "0.72755414", "0.72429216", "0.71737534", "0.7064628", "0.7056257", "0.69859976", "0.6949863", "0.6948435", "0.6942811", "0.69298875", "0.69032556", "0.6900465", "0.6900465", "0.6880163", "0.6865618", "0.68620205", "0.6859499", "0.6847944", "0.6837563", "0.6812879", "0.68089813", "0.6808603", "0.68049484", "0.67966837", "0.6795056", "0.6795056", "0.67909557", "0.6787095", "0.67825735", "0.67783386", "0.6771208", "0.67658216", "0.67488056", "0.67488056", "0.67481846", "0.67474896", "0.67430425", "0.6737776", "0.67283165", "0.6715326", "0.66959506", "0.66939133", "0.6690822", "0.6690126", "0.66885006", "0.6687302", "0.6685716", "0.6672116", "0.6671334", "0.6667436", "0.6667436", "0.6664605", "0.6663487", "0.6662144", "0.6659632", "0.6658028", "0.66556853", "0.6645572", "0.66350394", "0.66338056", "0.6630717", "0.6630717", "0.66214246", "0.66212183", "0.661855", "0.6617633", "0.6612846", "0.66112465", "0.66079855", "0.65980226", "0.6597105", "0.6596064", "0.6593222", "0.65920717", "0.6589676", "0.6582856", "0.65828097", "0.6582112", "0.6578338", "0.65776545", "0.65774703", "0.6572131", "0.65708333", "0.65703875", "0.6569249", "0.6564464", "0.6564464", "0.65628386", "0.6560576", "0.6559898", "0.65583706", "0.6558308", "0.6557277", "0.65571105", "0.6557092", "0.6556115", "0.655001", "0.6549598", "0.6547666" ]
0.0
-1
Update the specified resource in storage.
public function update(Request $request) { // }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function updateShopifyResource() {\n $this->saving();\n $this->getShopifyApi()->call([\n 'URL' => API::PREFIX . $this->getApiPathSingleResource(),\n 'METHOD' => 'PUT',\n 'DATA' => [\n static::getResourceSingularName() => $this->shopifyData\n ]\n ]);\n }", "public function update(Request $request, Resource $resource)\n {\n $request->validate([\n 'name' => 'required',\n 'description' => 'required|string',\n 'file' => 'required|mimes:jpg,jpeg,png,doc,docx,pdf,ppt,txt',\n ]);\n\n $resource->update($request->all());\n\n if ( $request->hasFile('file') ) {\n $resource = 'resource-'.time().'.'.$request->file('file')->extension();\n $request->file->storeAs('resources', $resource,'public');\n $resource->file = $resource;\n }\n\n if ( $resource->save() ) {\n return redirect()->route('admin.resources.index')->with('success', 'Resource updated');\n } else {\n return redirect()->route('admin.resources.index')->with('error', 'Something went wrong');\n }\n }", "public function update(Request $request, Resource $resource)\n {\n //\n }", "public function updateStream($resource);", "public function update(Request $request, Storage $storage)\n {\n $storage->product_id = $request->product_id;\n $storage->amount = $request->amount;\n\n $storage->save();\n\n return redirect()->route('storages.index');\n }", "protected function updateImageResource($fileName, $imageId, $storage)\n {\n //Get image name and storage location for image\n $image = Image::where('id', '=', $imageId)->first();\n\n //Delete old image\n $this->deleteResource($image->name, $image->storage);\n\n //Store the new image\n $image->name = $fileName;\n $image->storage = $storage;\n\n $image->save();\n }", "public function update(Storage $storage, UpdateStorageRequest $request)\n {\n $this->storage->update($storage, $request->all());\n\n return redirect()->route('admin.product.storage.index')\n ->withSuccess(trans('core::core.messages.resource updated', ['name' => trans('product::storages.title.storages')]));\n }", "public function update(StoreStorage $request, Storage $storage)\n {\n $storage->fill($request->all())->save();\n $request->session()->flash('alert-success', 'Запись успешно обновлена!');\n return redirect()->route('storage.index');\n }", "public function update_asset($id, Request $request){\n \t\tif(!Auth::user()){\n\t\t\treturn redirect('/');\n\t\t}\n \t\t$asset = Storage::find($id);\n \t\t$asset->name = $request->name;\n \t\t$asset->quantity = $request->quantity;\n \t\t$asset->category_id = $request->category;\n \t\tif($request->file('image') != null){\n\t\t\t$image = $request->file('image');\n\t\t\t$image_name = time(). \".\" . $image->getClientOriginalExtension();\n\t\t\t$destination = \"images/\";\n\t\t\t$image->move($destination, $image_name);\n\t\t\t$asset->image_url = $destination.$image_name;\n\t\t} \n\t\t$asset->save();\n\t\tsession()->flash('success_message', 'Item Updated successfully');\n\t\treturn redirect(\"/storage\");\n \t}", "public function update(Request $request, Flight $exercise, FlightResource $resource)\n {\n $request->validate([\n 'display_name' => 'required|string|max:100',\n 'file' => 'nullable|file|max:10240|mimes:pdf',\n 'uri' => 'nullable|url|max:255',\n ]);\n\n if ($resource->type === 'file' && $request->file('file')) {\n Storage::drive('public')->delete($resource->resource);\n $resource->resource = $request->file('file')->store('smartcars/exercises/resources', ['disk' => 'public']);\n } elseif ($resource->type === 'uri' && $request->input('uri')) {\n $resource->resource = $request->input('uri');\n }\n\n $resource->save();\n\n return redirect()->route('adm.smartcars.exercises.resources.index', $exercise)\n ->with('success', 'Resource edited successfully.');\n }", "public function update(Request $request, $id)\n {\n $validator = Validator::make($request->all(), [\n 'title' => 'required|string',\n 'content' => 'required|string',\n 'mentoring_area_id' => 'required|integer',\n 'featured_image_uri' => 'string',\n ]);\n\n if ($validator->fails()) {\n return APIHandler::response(0, $validator->errors(), 400);\n }\n \n $resource = Resource::find($id);\n $resource->title = $request->get('title');\n $resource->content = $request->get('content');\n $resource->featured_image_uri = $request->get('featured_image_uri');\n $resource->updated_at = \\Carbon\\Carbon::now();\n $resource->mentoring_area_id = $request->get('mentoring_area_id');\n $resource->save();\n $data['resource'] = $resource;\n return APIHandler::response(1, \"Resource has been updated\");\n }", "protected function updateVideoResource($fileName, $videoId, $storage, $premium=1)\n {\n //Get video name and storage location for video\n $video = Video::where('id', '=', $videoId)->first();\n\n //Check the storage medium\n if($storage == 'vimeo' || $storage == 'youtube')\n {\n $video->name = $fileName;\n $video->storage = $storage;\n $video->premium = $premium;\n $video->save();\n }\n else\n {\n if($video['storage'] == 'local' || $video['storage'] == 's3')\n {\n //Delete old video\n $this->deleteResource($video->name, $video->storage);\n }\n \n //Store the new video\n $video->name = $fileName;\n $video->storage = $storage;\n $video->premium = $premium;\n $video->save();\n }\n }", "public function put($resource, $with=[]){\n return $this->fetch($resource, self::PUT, $with);\n }", "public function update($id, $resource) {\n SCA::$logger->log(\"update resource\");\n return $this->orders_service->update($id, $resource);\n }", "public function update($path);", "public function update($id, $resource)\n {\n SCA::$logger->log(\"Entering update()\");\n //check whether it is an sdo or an xml string.\n if ($resource instanceof SDO_DataObjectImpl) {\n //if the thing received is an sdo convert it to xml\n if ($this->xml_das !== null) {\n $xml = SCA_Helper::sdoToXml($this->xml_das, $resource);\n } else {\n throw new SCA_RuntimeException(\n 'Trying to update a resource with SDO but ' .\n 'no types specified for reference'\n );\n }\n } else {\n $xml = $resource;\n }\n\n $slash_if_needed = ('/' === $this->target_url[strlen($this->target_url)-1])?'':'/';\n\n $handle = curl_init($this->target_url.$slash_if_needed.\"$id\");\n curl_setopt($handle, CURLOPT_HEADER, false);\n curl_setopt($handle, CURLOPT_RETURNTRANSFER, true);\n curl_setopt($handle, CURLOPT_CUSTOMREQUEST, \"PUT\");\n curl_setopt($handle, CURLOPT_POSTFIELDS, $xml);\n\n //replace with Content-Type: atom whatever\n $headers = array(\"User-Agent: SCA\",\n \"Content-Type: text/xml;\",\n \"Accept: text/plain\");\n curl_setopt($handle, CURLOPT_HTTPHEADER, $headers);\n\n $result = curl_exec($handle);\n\n $response_http_code = curl_getinfo($handle, CURLINFO_HTTP_CODE);\n\n curl_close($handle);\n\n $response_exception = $this->buildResponseException($response_http_code, '200');\n\n if ($response_exception != null) {\n throw $response_exception;\n } else {\n //update does not return anything in the body\n return true;\n }\n }", "public function update(Request $request, $id)\n {\n $this->validate($request, [\n 'name' => 'required',\n 'link' => 'required',\n 'description' => 'required'\n ]);\n\n $resource = Resource::find($id);\n $resource->name = $request->name;\n $resource->type_id = $request->type_id;\n $resource->has_cost = ($request->has('has_cost')) ? 1 : 0;\n $resource->language_id = $request->language_id;\n $resource->link = $request->link;\n $resource->description = $request->description;\n $resource->tags = '';\n\n $resource->save();\n //return back()->with('success', 'Recurso actualizado satisfactoriamente');\n return redirect('/resource')->with('success', 'Recurso actualizado satisfactoriamente');\n }", "public function update(Request $request, $id)\n {\n $oldProduct = Product::findOrFail($id);\n $data = $request->all();\n if(isset($data['img'])){\n // $file = $request->file('photo');\n // return $file;\n $imgName = time().'.'.$request->img->extension();\n $data['img'] = $imgName;\n // Storage::putFile('spares', $file);\n $path = $request->img->storeAs('public/uploads', $imgName); //in Storage\n\n //delete old file\n if($oldProduct->img != 'product-default.png'){\n Storage::delete(\"public/uploads/\".$oldProduct->img);\n // return 'deleted';\n }\n \n }else{\n $data['img'] = $oldProduct->img;\n }\n $oldProduct->update($data);\n return redirect()->route('product.index'); \n\n }", "public function update($request, $id) {\n\t\t\t$image = $request['photo'];\n\t\t\tif($image !== null) {\n\t\t\t\t$name = time().'.' . explode('/', explode(':', substr($image, 0, strpos($image, ';')))[1])[1];\n\t\t\t\t\\Image::make($request['photo'])->save(public_path('storage/products/').$name);\n\t\t\t\t$request['photo'] = $name;\n\t\t\t} else {\n\t\t\t\t$currenPhoto = Product::all()->where('id', $id)->first();\n\t\t\t\t$request['photo'] = $currenPhoto->photo;\n\t\t\t}\n return $this->product->update($id, $request);\n\t}", "public function updateStream($path, $resource, Config $config)\n {\n }", "public function edit(Resource $resource)\n {\n //\n }", "public function updateResourceIndex(&$resource) {\n if ($this->connector != null) {\n\n // STEP 1: Update or insert this resource as a node:\n $this->logger->addDebug(\"Updating/Inserting Node into Neo4J database\");\n $result = $this->connector->run(\"MATCH (a:Resource {id: {id} }) SET a.title = {title}, a.version = {version}, a.href = {href}\n return a;\",\n [\n 'id' => $resource->getID(),\n 'version' => $resource->getVersion(),\n 'title' => $resource->getTitle(),\n 'href' => $resource->getLink()\n ]\n );\n\n // Check to see if anything was added\n $records = $result->getRecords();\n if (empty($records)) {\n // Must create this record instead\n $result = $this->connector->run(\"CREATE (n:Resource) SET n += {infos};\",\n [\n \"infos\" => [\n 'id' => $resource->getID(),\n 'version' => $resource->getVersion(),\n 'title' => $resource->getTitle(),\n 'href' => $resource->getLink()\n ]\n ]\n );\n }\n\n // STEP 2: Update or insert the resource's link to holding repository\n $result = $this->connector->run(\"MATCH (a:Resource {id: {id} })-[r:HIRELATION]->()\n return r;\",\n [\n 'id' => $resource->getID(),\n ]\n );\n $records = $result->getRecords();\n if (!empty($records)) {\n // delete the one there so that we can add the correct one (just in case)\n $result = $this->connector->run(\"MATCH (a:Resource {id: {id}})-[r:HIRELATION]->() delete r;\",\n [\n 'id' => $resource->getID()\n ]\n );\n\n }\n\n // If resource has a repository, then add a link\n if ($resource->getRepository() != null && $resource->getRepository()->getID() != null) {\n $this->connector->run(\"MATCH (a:Identity {id: {id1} }) MATCH (b:Resource {id: {id2} }) CREATE (b)-[r:HIRELATION]->(a);\",\n [\n 'id1' => (string) $resource->getRepository()->getID(),\n 'id2' => $resource->getID()\n ]);\n }\n }\n }", "public function update($data) {}", "public function update($data) {}", "public function putStream($resource);", "public function update(Request $request, NebulaResource $resource, $item): RedirectResponse\n {\n $this->authorize('update', $item);\n\n $validated = $request->validate($resource->rules(\n $resource->editFields()\n ));\n\n $resource->updateQuery($item, $validated);\n\n $this->toast(__(':Resource updated', [\n 'resource' => $resource->singularName(),\n ]));\n\n return redirect()->back();\n }", "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 }", "public function update($entity);", "public function update($entity);", "public function setResource($resource);", "public function updateStream($path, $resource, Config $config)\n {\n return $this->upload($path, $resource, $config);\n }", "public function isUpdateResource();", "public function update(Request $request, $id)\n {\n $device = Device::findOrFail($id);\n $device->fill($request->all());\n if ($request->hasFile('icon')) {\n if ($device->hasMedia('icon')) {\n $device->deleteMedia($device->getFirstMedia('icon'));\n }\n $device->addMediaFromRequest('icon')->toMediaCollection('icon');\n }\n $device->save();\n return new DeviceResource($device);\n }", "public function update(Request $request, $id)\n {\n //\n $product = Product::findOrFail($id);\n \n $product->update($request->all());\n \n $file = $request->file('url_image')->move('upload', $request->file('url_image')->getClientOriginalName());\n\n Product::where('id',$id)->update(['url_image'=>$file]);\n \n \\Session::flash('flash_message', 'Edit product successfully.'); \n \n //cũ : return redirect('articles');\n return redirect()->route('products.index');\n }", "public function store($data, Resource $resource);", "public function update(Request $request, $id)\n {\n \n $product = Product::find($id);\n\n\n $product->fill($request->all())->save();\n\n //Verificamos que tenemos una imagen\n if($request->file('photo_1')){\n\n\n //En caso de tenerla la guardamos en la clase Storage en la carpeta public en la carpeta image.\n $path = Storage::disk('public')->put('photo_1',$request->file('photo_1'));\n\n //Actualizamos el Post que acabamos de crear\n $product->fill(['photo_1' => asset($path)])->save();\n\n }\n\n\n return redirect()->route('products.index')->with('info', 'Producto actualizado exitosamente!');\n }", "public function update(Request $request, $id)\n {\n $product = Product::find($id);\n\n if (\\Input::hasFile('image')) {\n $this->imgsave($request, $product);\n }\n\n\n if (!empty($request->input('tags'))) {\n $product->tags()->sync($request->input('tags'));\n } else {\n $product->tags()->detach();\n }\n\n $product->update($request->all());\n\n return redirect()->to('dashboard/product')->with('message', 'update success');\n }", "public function put($resource_path, array $variables = array()) {\n return $this->call($resource_path, $variables, 'PUT');\n }", "public function update($id)\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n if (method_exists($this, 'updateValidations')) {\n $this->request->validate($this->updateValidations());\n }\n\n /* Get the specified resource */\n $resource = $this->model::findOrFail($id);\n\n /* Update the specified resource */\n $resource->update(Input::all());\n\n /* Redirect back */\n return redirect()->back()\n ->with(\n 'info',\n Lang::has($this->name . '.resource-updated') ?\n $this->name . '.resource-updated' :\n 'messages.alert.resource-updated'\n );\n }", "public function putResponse($request)\n {\n $idSearched = $this->searcher->searchResourceIndex(\n $request, \n $this->db[$request['resource']]\n );\n if ($idSearched) {\n $resource = $this->db[$request['resource']][$idSearched];\n $bodyInput = json_decode($this->standardInput, true);\n $resource = BodyRequest::canApplyBody($bodyInput);\n $resource['id'] = (int)$request['param'];\n foreach($resource as $key => $value) {\n $this->db[$request['resource']][$idSearched][$key] = $value;\n }\n file_put_contents(DB_PATH, json_encode($this->db));\n }\n }", "public function update(Storedataset $request, dataset $dataset){\n $dataset->title = $request->input('title');\n $dataset->caption = $request->input('caption');\n $dataset->file_url = $request->input('file_url');\n $dataset->type = $request->input('type');\n $dataset->status = $request->input('status');\n $dataset->publication_id = $request->input('publication_id');\n\n $dataset->save();\n\n return redirect()->route('datasets.show', ['dataset' => $dataset]);\n }", "public function update(Request $request, $id)\n\n {\n ResourceManagement::findOrFail($id);\n $constraints = [\n 'title' => 'required|max:100',\n 'url'=> 'required|max:191',\n 'content' => 'required'\n ];\n\n $input = [\n 'title' => $request['title'],\n 'url' => $request['url'],\n 'content' => $request['content'],\n 'type' => $request['type'],\n 'level' => $request['level'],\n 'user_id' => $request['user']\n ];\n// $this->validate($input, $constraints);\n ResourceManagement::where('id', $id)\n ->update($input);\n\n return redirect()->intended('/resource-management');\n }", "public function update(Request $request, $id)\n {\n $this->validate($request, [\n 'title' => 'required',\n 'description' => 'required|string',\n 'price' => 'required|numeric',\n 'reference'=>'required'\n ]);\n \n $product = Product::find($id);\n $product->update($request->all());\n \n $im = $request->file('picture');\n \n if (!empty($im)) {\n \n $link = $request->file('picture')->store('images');\n \n \n $product->update([\n 'url_image' => $link,\n ]);\n } \n //dump($request->all());\n return redirect()->route('product.index')->with('message', 'Article modifié avec succès');\n }", "public function update(StoreOrUpdateAsset $request, Asset $asset)\n {\n if (Storage::exists($asset->path) && !Storage::delete($asset->path)) {\n abort(500);\n }\n\n $file = $request->file('file');\n $path = $file->store('assets');\n\n if (!$path) {\n abort(500);\n }\n\n // We wonder if we should delete the old file or not...\n\n $asset->name = $file->getClientOriginalName();\n $asset->size = $file->getSize();\n $asset->type = $file->getMimeType();\n $asset->path = $path;\n\n if ($asset->save()) {\n flash('The asset has been saved.')->success();\n } else {\n abort(500);\n }\n\n return redirect('/admin/assets');\n }", "public function update(FoodRecipeRequest $request, $id)\n {\n $foodRecipe = FoodRecipe::with('ingredients','cookingProcesses')->findOrFail($id);\n if ($request->input('name')!= null)\n $foodRecipe->name = $request->input('name');\n if ($request->input('detail')!= null)\n $foodRecipe->detail = $request->input('detail');\n if($request->file('photo') != null) {\n $old_file = $foodRecipe->photo;\n if($old_file != null){\n $path = public_path().'/storage/'.$old_file;\n File::delete($path);\n }\n $file = $request->file('photo');\n $name = '/foodRecipe/' . Carbon::now()->format(\"dnY-Hisu\") . \".\" . $file->extension();\n $file->storePubliclyAs('public', $name);\n $foodRecipe->photo = $name;\n }\n $foodRecipe->save();\n return new FoodRecipeResource($foodRecipe);\n }", "public function update(StorageTypeRequest $request, $id)\n {\n try {\n $this->service->updateStorageType($request, $id);\n return $this->NoContent();\n } catch (EntityNotFoundException $e) {\n \\Log::error($e->getMessage());\n return $this->NotFound($e->getMessage());\n } catch(\\QueryException $e) {\n \\Log::error($e->getMessage());\n return $this->ServerError();\n } catch(Exception $e) {\n \\Log::error($e->getMessage());\n return $this->ServerError();\n }\n }", "public function update(Request $request, $id)\n {\n //validation\n $this->validate(request(),[\n 'image' => 'image'\n ]);\n\n $slider = HomeSliders::find($id);\n \n $slider->link = request('link');\n\n //get old image to delete if updated\n $oldImage = request('oldImage');\n //get the new image\n $NewImage=$request->file('image');\n\n if($NewImage)\n {\n $filenameToStore= helpers::updatePhoto('image','homeSliders',$request);\n $slider->image=$filenameToStore;\n\n Storage::delete('public/Images/homeSliders/'.$oldImage);\n }\n\n $slider->save();\n\n Alert::success(config('app.name'), trans('messages.Updated Successfully') );\n return redirect()->route('admin.homeSlider',$slider->type);\n }", "public function update(Qstore $request, $id)\n {\n //\n }", "public function update(IEntity $entity);", "protected function performUpdate(): bool\n {\n // Abort if resource does not support update operations\n if (!$this->isUpdatable()) {\n throw new UnsupportedOperation(sprintf('API does not support update operation for %s resources', $this->resourceNameSingular()));\n }\n\n $id = $this->id();\n $prepared = $this->prepareBeforeUpdate($this->toArray());\n\n $payload = [\n $this->resourceNameSingular() => $prepared\n ];\n\n $response = $this\n ->request()\n ->put($this->endpoint($id), $payload);\n\n // Extract and (re)populate resource (if possible)\n // Note: Unlike the \"create\" method, Redmine does NOT\n // appear to send back a full resource when it has been\n // successfully updated.\n $this->fill(\n $this->decodeSingle($response)\n );\n\n return true;\n }", "public function update($request, $id);", "function put($resource, $data = null) {\r\n\t\t\r\n\t\tif(isset($data)) {\r\n\t\t\t$this->request_body = $data;\r\n\t\t}\r\n\r\n\t\t// make the call chief\r\n\t\t$this->exec ( \"PUT\", '/' . $resource );\r\n\r\n\t\t// check the request status\r\n\t\tif($this->status_code != 200){\r\n\t\t\t$this->Logger->error(\r\n\t\t\t\tsprintf(\r\n\t\t\t\t\t'GET Call for resource \\'%s\\' Failed.\r\n\t\t\t\t\tStatus: %d,\r\n\t\t\t\t\tRequest: %s\r\n\t\t\t\t\tAPI Error Message: \r\n\t\t\t\t\t%s',\r\n\t\t\t\t\t$resource,\r\n\t\t\t\t\t$this->status_code,\r\n\t\t\t\t\t$this->request_body_raw,\r\n\t\t\t\t\t$this->response_body\r\n\t\t\t\t)\r\n\t\t\t);\r\n\t\t\tthrow new Exception($this->response_body);\r\n\t\t} else {\r\n\t\t\treturn $this->response_parsed;\r\n\t\t}\r\n\t}", "public function updateEntities($resource)\n {\n $json = [\n 'resource' => $resource,\n ];\n $request = $this->createRequest('PUT', '/entities', ['json' => $json]);\n $response = $this->send($request);\n return $response;\n }", "public function updateStream($path, $resource, Config $config)\n {\n return $this->writeStream($path, $resource, $config);\n }", "public function update(Request $request, $id)\n {\n\n $product = Product::findOrFail($id);\n $product->name = $request['name'];\n $product->price = $request['price'];\n $product->stock = $request['stock'];\n $product->description = $request['description'];\n\n $file = $request->file('image');\n $fileName = $file->getClientOriginalName();\n if($fileName != $product->image){\n $request->file('image')->move('images/',$fileName);\n $product->image = $fileName;\n }\n\n $product->save();\n\n return redirect()->route('products.show',\n $product->id)->with('flash_message',\n 'Article, '. $product->name.' updated');\n }", "protected function handleUpdate()\n {\n $resource = $this->argument('resource');\n $action = $this->option('action');\n $startPage = (int)$this->option('startPage');\n $perPage = (int)$this->option('perPage');\n\n try {\n $harvest = Harvest::where('resource', $resource)->where('action', $action)->firstOrFail();\n } catch (\\Exception $e) {\n $this->info('There is no existing action for updating ' . ucwords($action) . ' ' . ucwords($resource) . '.');\n exit('Nothing was updated.');\n }\n\n $options = [\n 'startPage' => $startPage,\n 'perPage' => $perPage,\n 'lastRun' => $harvest->last_run_at\n ];\n\n // If a lastRun was given use that\n // OR if this has never been run before use 2001-01-01\n if (!empty($this->option('lastRun'))) {\n $options['lastRun'] = new Carbon($this->option('lastRun'));\n } elseif (is_null($options['lastRun'])) {\n $options['lastRun'] = new Carbon('2001-01-01');\n }\n\n $job = new UpdateResourceJob(\n $harvest,\n $options\n );\n\n $message = 'Updating ' . $action . ' ' . $resource . ' ' . $perPage . ' at a time';\n if (isset($lastRun)) {\n $message .= ' with entries updated since ' . $lastRun->format('r');\n }\n $this->info($message);\n $this->dispatch($job);\n }", "abstract public function put($data);", "public function update($id, $data);", "public function update($id, $data);", "public function update($id, $data);", "public function update($id, $data);", "public function update($id, $data);", "public function testUpdateSupplierUsingPUT()\n {\n }", "public function update(Request $request, $id)\n {\n $storageplace = Storageplace::findOrFail($id);\n $storageplace->update($request->only(['storageplace']));\n return $storageplace;\n }", "public function updateRelatedImage(Request $request, $id)\n {\n // Delete display image in Storage\n Validator::make($request->all(), ['photos' => \"required|file|image|mimes:jpg,png,jpeg|max:5000\"])->validate();\n\n\n if ($request->hasFile(\"photos\")) {\n\n $photo = ProductsPhoto::find($id);\n $imageName = $photo->photos;\n $exists = Storage::disk('local')->exists(\"public/product_images/\" . $photo->photos);\n\n //delete old image\n if ($exists) {\n Storage::delete('public/product_images/' . $imageName);\n }\n\n //upload new image\n $ext = $request->file('photos')->getClientOriginalExtension(); //jpg\n\n $request->photos->storeAs(\"public/product_images/\", $imageName);\n\n $arrayToUpdate = array('photos' => $imageName);\n DB::table('products_photos')->where('id', $id)->update($arrayToUpdate);\n\n return redirect()->route(\"adminDisplayRelatedImageForm\", ['id' => $photo->product_id]);\n } else {\n\n $error = \"NO Image was Selected\";\n return $error;\n }\n }", "public function update(Request $request, $id)\n {\n $skill = Skill::findOrFail($id);\n\n $skill->skill = $request->skill;\n\n if ($request->hasFile('image')) {\n \\Cloudder::upload($request->file('image'));\n $c=\\Cloudder::getResult();\n // $image = $request->file('image');\n // $filename = time() . '.' . $image->getClientOriginalExtension();\n // $location = public_path('images/' . $filename);\n // Image::make($image)->save($location);\n\n $skill->image = $c['url'];\n }\n\n $skill->save();\n\n Session::flash('success', 'Successsfully updated your skill!');\n return redirect()->route('skills.index');\n }", "public function updateStream($path, $resource, Config $config = null)\n {\n $contents = stream_get_contents($resource);\n\n return $this->write($path, $contents, $config);\n }", "public abstract function update($object);", "public static function update($id, $file)\n {\n Image::delete($id);\n\n Image::save($file);\n }", "public function update(Request $request, $id)\n {\n $product = Product::find($id);\n $image = $product->image;\n if($request->hasFile('image')){\n $image = $request->file('image')->store('files');\n \\Storage::delete($product->image);\n } \n $product->name = $request->get('name');\n $product->price = $request->get('price');\n $product->description = $request->get('description');\n $product->additional_info = $request->get('additional_info');\n $product->category_id = $request->get('category');\n $product->subcategory_id = $request->get('subcategory');\n $product->image = $image;\n $product->save();\n return redirect()->back();\n }", "public function update(Request $request, $id)\n {\n $sli=Slider::find($id);\n $sli->sort_order=$request->input('sort_order');\n $image = $request->file('slider');\n if($image == ''){\n $image = $sli->slider;\n }else{\n $image = base64_encode(file_get_contents($request->file('slider')));\n }\n $sli->slider = $image;\n $sli->save();\n return redirect()->back();\n }", "public function update(ProductRequest $request, $id)\n {\n $input = Product::find($id);\n $data = $request->all();\n if ($file = $request->file('product_photo')){\n $name = time().$file->getClientOriginalName();\n $file->move('product_image',$name);\n $data['product_photo']=$name;\n// $input->update($data);\n }\n $input->update($data);\n return redirect('admin/products/');\n }", "public function update(Request $request, $id)\n {\n $volume = $this->findVolume($id);\n\n if(count($volume) > 0) {\n $volume->str_volume_name = $request->str_volume_name;\n\n $volume->save();\n }\n\n return response()\n ->json(\n array(\n 'message' => 'Volume is successfully updated.',\n 'volume' => $volume\n ),\n 201\n );\n }", "public function update(Request $request, $id)\n {\n $product = ProductModel::find($id);\n $product->name = $request->name;\n $product->description = $request->description;\n $product->price = $request->price;\n $product->stock = $request->stock;\n\n if($request->image!=null){\n $imageName = time().'.'.$request->image->extension();\n $request->image->move(public_path('images'), $imageName);\n $product->image = \"/images/\".$imageName;\n }\n $product->save();\n return redirect(\"/products/index\")->with('success','Product has been updated');\n }", "public function update()\n {\n $accessory = Accessories::find(request('id'));\n\n if ($accessory == null) {\n return response()->json([\"error\" => \"aksesuaras nerastas\"], 404);\n }\n\n $this->validateData();\n $path = $accessory->src;\n\n if (request()->hasFile('src')) {\n\n if (Storage::disk('public')->exists($accessory->src)) {\n Storage::disk('public')->delete($accessory->src);\n }\n $path = request()->file('src')->store('accessoriesImages', 'public');\n }\n\n $accessory->update(array_merge($this->validateData(), ['src' => $path]));\n\n return response()->json([\"data\" => $accessory], 200);\n }", "public function update(ProductStoreRequest $request,$id)\n {\n $data = $request->validated();\n $product = Product::where('id',$id);\n $product->update($data);\n return response(\"Producto actualizado con éxito\",200);\n }", "public function update($entity)\n {\n \n }", "public function updateStream($path, $resource, Config $config)\n {\n return $this->write($path,stream_get_contents($resource),$config);\n }", "public function update($id, Request $request)\n {\n date_default_timezone_set('Asia/Taipei');\n $data = $request->all();\n $dbData = Product::find($id);\n $myfile = Storage::disk('local');\n if ($request->hasFile('img')) {\n $file = $request->file('img');\n $path = $myfile->putFile('public', $file);\n $data['img'] = $myfile->url($path);\n File::delete(public_path($dbData->img));\n }\n $dbData->update($data);\n\n if ($request->hasFile('imgs')) {\n // $this->fetchDestroyByProdId($id);\n $localS = Storage::disk('local');\n\n $fileS = $request->file('imgs');\n $imgs = [];\n foreach ($fileS as $i) {\n $pathS = $localS->putFile('public', $i);\n $imgs[] = $localS->url($pathS);\n }\n foreach ($imgs as $img) {\n ProductImg::create([\n 'product_id' => $id,\n 'img' => $img\n ]);\n }\n }\n\n return redirect()->route('admin');\n }", "public function update(Request $request, Product $product)\n { $remfile= $product->image;\n if($request->filep){\n $product->image=$request->filep;\n File::delete(storage_path('app/public/products/'.$remfile));\n }else{\n $product->image=$remfile;\n }\n //rmdir(storage_path('app/public/products/'.$remfile));\n $product->name = $request->name;\n $product->description = $request->description;\n $product->price = $request->price;\n $product->save();\n sleep(3);\n toast('Details updated successfully','info');\n return redirect('/products');\n }", "public function update($id, $input);", "public function update(ProductRequest $request,int $id): ProductResource\n {\n $attributes = $request->only('supplier_id', 'name', 'warehouses');\n\n return new ProductResource($this->productRepository->update($id, $attributes)); }", "public function update(Request $request, $id)\n {\n $slider=new Slider;\n $slider=$slider::find($id);\n \n \n if($file =$request->file('slider')){\n if(Storage::delete('public/slider/'.$slider->slider)){\n\n //Get file original name//\n \n$original_name=$file->getClientOriginalName();\n\n //Get just the file name\n$filename=pathinfo($original_name,PATHINFO_FILENAME);\n\n//Create new file name\n$name=$filename.'_'.time().'.'.$file->getClientOriginalExtension();\n\n $destination='public/slider';\n $path=$request->slider->storeAs($destination,$name);\n $slider->slider=$name;\n $slider->save();\n return redirect('Admin/slider');\n\n }\n }\n}", "public function update(Request $request, $id)\n {/* dd($request->all()); */\n $acheivePic = $this->acheiveRepo->find($id);\n $acheive = $request->except('_method', '_token', 'photo', 'ar', 'en');\n $acheiveTrans = $request->only('ar', 'en');\n\n if ($request->hasFile('icon')) {\n // Delete old image first.\n $oldPic = public_path() . '/images/acheives/' . $acheivePic->icon;\n File::delete($oldPic);\n\n // Save the new one.\n $image = $request->file('icon');\n $imageName = $this->upload($image, 'acheives');\n $acheive['icon'] = $imageName;\n }\n\n $this->acheiveRepo->update($id, $acheive, $acheiveTrans);\n\n return redirect('admin-panel/widgets/acheive')->with('updated', 'updated');\n }", "public function update(Request $request, $id)\n {\n $data = $request->all();\n extract($data);\n\n $productVarient = new ProductVariant();\n $productVarient = $productVarient->find($id);\n $productVarient->vendor_id = auth()->user()->id;\n $productVarient->description = $prod_desc;\n $productVarient->price = $price;\n\n if(request()->hasFile('photo')){\n $image = request()->file('photo')->getClientOriginalName();\n $imageNewName = auth()->user()->id.'-'.$image;\n $file = request()->file('photo');\n $file->storeAs('images/product',$imageNewName, ['disk' => 'public']);\n $productVarient->image = $imageNewName;\n }\n \n $productVarient->save();\n\n return back()->withStatus(__('Product successfully updated.'));\n }", "public function update(Request $request, $id)\n {\n //if upload new image, delete old image\n $myfile=$request->old_photo;\n if($request->hasfile('photo'))\n {\n $imageName=time().'.'.$request->photo->extension();\n $name=$request->old_photo;\n\n if(file_exists(public_path($name))){\n unlink(public_path($name));\n $request->photo->move(public_path('backendtemplate/truefalseimg'),$imageName);\n $myfile='backendtemplate/truefalseimg/'.$imageName;\n }\n }\n //Update Data\n $truefalsequestion=TrueFalseQuestion::find($id);\n $truefalsequestion->name=$request->name;\n $truefalsequestion->photo=$myfile;\n $truefalsequestion->answer = $request->answer;\n $truefalsequestion->question_id = $request->question;\n $truefalsequestion->save();\n\n //Redirect\n return redirect()->route('truefalsequestions.index'); \n }", "public function update($id);", "public function update($id);", "private function update()\n {\n $this->data = $this->updateData($this->data, $this->actions);\n $this->actions = [];\n }", "public function put($path, $data = null);", "public function update(Request $request, $id)\n {\n $request->validate([\n 'path_image'=>'image',\n 'status'=>'required|in:0,1'\n ]);\n $slider=Slider::whereId($id)->first();\n if (is_null($slider)){\n return redirect()->route('sliders.index')->with('error','Slider does not exist');\n }\n try {\n if ($request->hasFile('path_image')){\n $file = $request->file('path_image');\n\n $image_path= $file->store('/sliders',[\n 'disk'=>'uploads'\n ]);\n Storage::disk('uploads')->delete($slider->image);\n\n $request->merge([\n 'image'=>$image_path,\n ]);\n }\n\n $slider->update( $request->only(['status','image']));\n return redirect()->route('sliders.index')->with('success','Updated successful');\n }catch (\\Exception $exception){\n return redirect()->route('sliders.index')->with(['error'=>'Something error try again']);\n\n }\n }", "public function update() {\n $this->accessory->update($this->accessory_params());\n\n if ($this->accessory->is_valid()) {\n $this->update_accessory_image($this->accessory);\n redirect('/backend/accessories', ['notice' => 'Successfully updated.']);\n } else {\n redirect(\n '/backend/accessories/edit',\n ['error' => $this->accessory->errors_as_string()],\n ['id' => $this->accessory->id]\n );\n }\n }", "public function update(Entity $entity);", "public function update(Request $request, $id)\n {\n $icon = SliderIcon::find($id);\n $data = $request->all();\n $data['active'] = $request->has('active') ? 1 : 0;\n if ($request->hasFile('img')) {\n if (Storage::disk('public')->exists(str_replace('storage', '', $icon->img))){\n Storage::disk('public')->delete(str_replace('storage', '', $icon->img));\n }\n $image = $request->file('img');\n $fileName = time().'_'.Str::lower(Str::random(5)).'.'.$image->getClientOriginalExtension();\n $path_to = '/upload/images/'.getfolderName();\n $image->storeAs('public'.$path_to, $fileName);\n $data['img'] = 'storage'.$path_to.'/'.$fileName;\n }\n $icon->update($data);\n return redirect()->route('slider_icons.index')->with('success', 'Данные преимущества обнавлены');\n }", "public function update() {\n\t $this->layout = false;\n\t \n\t //set default response\n\t $response = array('status'=>'failed', 'message'=>'HTTP method not allowed');\n\t \n\t //check if HTTP method is PUT\n\t if($this->request->is('put')){\n\t //get data from request object\n\t $data = $this->request->input('json_decode', true);\n\t if (empty($data)) {\n\t $data = $this->request->data;\n\t }\n\t \n\t //check if product ID was provided\n\t if (!empty($data['id'])) {\n\t \n\t //set the product ID to update\n\t $this->Player->id = $data['id'];\n\t if ($this->Player->save($data)) {\n\t $response = array('status'=>'success','message'=>'Product successfully updated');\n\t } else {\n\t $response['message'] = \"Failed to update product\";\n\t }\n\t } else {\n\t $response['message'] = 'Please provide product ID';\n\t }\n\t }\n\t \n\t $this->response->type('application/json');\n\t $this->response->body(json_encode($response));\n\n\t return $this->response->send();\n\t}", "public function update(Request $request, $id)\n {\n //validate incoming request\n $request->validate([\n 'name' => 'string|max:100|nullable',\n 'picture' => 'max:2000|mimes:jpeg,jpg,png,svg|nullable', //max size 2mb,\n 'total' => 'integer|min:0|nullable', //value must be > 0\n 'selling_price' => 'numeric|min:0|nullable',\n 'cost_price' => 'numeric|min:0|nullable',\n 'category_id' => 'integer|nullable'\n ]);\n\n try {\n $product = Auth::user()->store->product()->findorFail($id);\n } catch (ModelNotFoundException $e) {\n return response()->json([\n \"message\" => \"Forbidden\"\n ], 403);\n }\n\n //if category id isnt null\n if ($category_id = $request->category_id) {\n if (!$this->isCategoryIdValid($category_id))\n return response()->json([\n \"message\" => \"Category Id is not valid\"\n ], 422);\n else\n $product->category_id = $request->category_id;\n }\n\n //if uploaded file exist\n if ($picture = $request->file(\"picture\")) {\n //if product already has logo\n if ($product->picture)\n Storage::delete(Product::$PICTURE_PATH . \"/\" . $product->picture);\n\n $picture_path = $picture->store(Product::$PICTURE_PATH);\n //remove folder name from path\n $product->picture = str_replace(Product::$PICTURE_PATH . \"/\", '', $picture_path);\n }\n\n $this->renewProduct($product, $request);\n $product->save();\n return response()->json(new ProductResource($product), 200);\n }", "public function update(Request $request, $id)\n {\n $request->validate([\n 'name' => 'required | min:3 | string',\n 'type' => 'required',\n 'producer' => 'required',\n 'image' => 'image | mimes:png,jpg,jpeg',\n 'price_input' => 'required | numeric | min:0 | max:300000000',\n 'promotion_price' => 'required | numeric | max:300000000',\n 'description' => 'required | string',\n\n ]);\n $product = Product::withTrashed()->findOrfail($id);\n $product->name = $request->name;\n $product->id_type = $request->type;\n $product->id_producer = $request->producer;\n\n $product->amount = $request->amount;\n if (request('image')) {\n $product->image = base64_encode(file_get_contents($request->file('image')->getRealPath()));\n }\n\n $product->price_input = $request->price_input;\n\n if ( $request->promotion_price >= 0 && $request->promotion_price < $product->price_input) {\n $product->promotion_price = $request->promotion_price;\n }else{\n return back()->with('error', '\n Do not enter a negative number');\n }\n $product->new = $request->new;\n\n $product->description = $request->description;\n\n $product->save();\n $product->size()->sync(request('size'));\n\n return redirect()->route('product.index')->with('success', 'Product Updated successfully');\n }", "public function update(Request $request, $id)\n {\n $product = Product::find($id);\n\n $product->name = $request->input('name');\n $product->description = $request->input('description');\n $product->lastPrice = $product->price !== $request->input('price') ? $product->price : NULL;\n $product->price = $request->input('price');\n\n if ($request->hasFile('image')) { \n $currentImg = $product->image;\n if ($currentImg) {\n Storage::delete('/public/' . $currentImg);\n }\n $image = $request->file('image'); \n $path = $image->store('images','public');\n $product->image = $path;\n };\n\n $product->save(); \n\n $product_promotions = $request->input('promotion');\n\n $product->promotions()->sync($product_promotions);\n\n return redirect()->route('admin.modify');\n }", "public static function updateImage($fileName, $imageId, $storage)\n {\n //Get image name and storage location for image\n $image = Image::where('id', '=', $imageId)->first();\n\n //Delete old image\n ResourceHandler::delete($image->name, $image->storage);\n\n //Store the new image\n $image->name = $fileName;\n $image->storage = $storage;\n\n $image->save();\n }", "public function update($request, $id)\n {\n $this->checkExits($id);\n $data = $request->except(['_method','_token','photo']);\n\n if($request->photo)\n {\n try {\n $this->UploadFile($request);\n } catch (\\Exception $e) {\n //if has exception , don't has action\n }\n if ($this->img !== '') {\n $data['img'] = $this->img;\n }\n }\n\n $this->object->update($data);\n\n }", "public function updateProduct($request, $product)\n {\n $product->update($request->except(['_token', '_method', 'image']));\n if ($request->hasFile('image')) {\n $image = $request->file('image');\n $imageName = time() . '.' . $request->file('image')->extension();\n // $img = Image::make('public/foo.jpg');\n\n $image_resize = Image::make($image->getRealPath());\n $image_resize->resize(500, 500);\n $image_resize->save(public_path('images/') . $imageName, 100);\n $product->gallery = $imageName;\n $product->save();\n }\n $product->getTags()->sync($request->input('tags'));\n }" ]
[ "0.7425105", "0.70612276", "0.70558053", "0.6896673", "0.6582159", "0.64491373", "0.6346954", "0.62114537", "0.6145042", "0.6119944", "0.61128503", "0.6099993", "0.6087866", "0.6052593", "0.6018941", "0.60060275", "0.59715486", "0.5946516", "0.59400934", "0.59377414", "0.5890722", "0.5860816", "0.5855127", "0.5855127", "0.58513457", "0.5815068", "0.5806887", "0.57525045", "0.57525045", "0.57337505", "0.5723295", "0.5714311", "0.5694472", "0.5691319", "0.56879413", "0.5669989", "0.56565005", "0.56505877", "0.5646085", "0.5636683", "0.5633498", "0.5633378", "0.5632906", "0.5628826", "0.56196684", "0.5609126", "0.5601397", "0.55944353", "0.5582592", "0.5581908", "0.55813426", "0.5575312", "0.55717176", "0.55661047", "0.55624634", "0.55614686", "0.55608666", "0.55599797", "0.55599797", "0.55599797", "0.55599797", "0.55599797", "0.55573726", "0.5556878", "0.5554201", "0.5553069", "0.55530256", "0.5543788", "0.55435944", "0.55412996", "0.55393505", "0.55368495", "0.5535236", "0.5534954", "0.55237365", "0.5520468", "0.55163723", "0.55125296", "0.5511168", "0.5508345", "0.55072427", "0.5502385", "0.5502337", "0.5501029", "0.54995877", "0.54979175", "0.54949397", "0.54949397", "0.54946727", "0.5494196", "0.54941916", "0.54925025", "0.5491807", "0.5483321", "0.5479606", "0.5479408", "0.5478678", "0.54667485", "0.5463411", "0.5460588", "0.5458525" ]
0.0
-1
Remove the specified resource from storage.
public function destroy(SmsSwitch $smsSwitch) { // }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function delete($resource){\n return $this->fetch($resource, self::DELETE);\n }", "public function destroy(Resource $resource)\n {\n //\n }", "public function removeResource($resourceID)\n\t\t{\n\t\t}", "public function unpublishResource(PersistentResource $resource)\n {\n $client = $this->getClient($this->name, $this->options);\n try {\n $client->delete(Path::fromString($this->getRelativePublicationPathAndFilename($resource)));\n } catch (FileDoesNotExistsException $exception) {\n }\n }", "public function deleteResource(&$resource) {\n\n if ($this->connector != null) {\n $this->logger->addDebug(\"Deleting Resource Node from Neo4J database\");\n $result = $this->connector->run(\"MATCH (a:Resource {id: {id}}) detach delete a;\",\n [\n 'id' => $resource->getID()\n ]\n );\n $this->logger->addDebug(\"Updated neo4j to remove resource\");\n }\n\n }", "public function deleteShopifyResource() {\n $this->getShopifyApi()->call([\n 'URL' => API::PREFIX . $this->getApiPathSingleResource(),\n 'METHOD' => 'DELETE',\n ]);\n }", "public function deleteResource()\n {\n $database = new Database();\n $id = $this->_params['id'];\n $database->deleteResource($id);\n $this->_f3->reroute('/Admin');\n }", "protected function deleteResource($fileName, $storage)\n {\n if (Storage::disk($storage)->exists($fileName)) \n {\n return Storage::disk($storage)->delete($fileName);\n }\n }", "public function delete()\n {\n persistableCollection::getInstance($this->resourceName)->deleteObject($this);\n }", "public function remove()\n {\n $this->_getBackend()->remove($this->_id);\n }", "public function remove()\n {\n if (! ftruncate($this->fileHandle, 0)) {\n throw new StorageException(\"Could not truncate $this->path\");\n }\n if (! unlink($this->path)) {\n throw new StorageException(\"Could not delete $this->path\");\n }\n }", "public function delete()\n\t{\n\t\t$s3 = AWS::createClient('s3');\n $s3->deleteObject(\n array(\n 'Bucket' => $this->bucket,\n 'Key' => $this->location\n )\n );\n\t\tif($this->local_file && file_exists($this->local_file)) {\n\t\t\tunlink($this->local_file);\n\t\t}\n $this->local_file = null;\n\t}", "public function delete()\n\t{\n\t\tsfCore::db->query(\"DELETE FROM `swoosh_file_storage` WHERE `id`='%i';\", $this->id);\n\t\t$this->fFile->delete();\n\t}", "public function delete(): void\n {\n unlink($this->getPath());\n }", "public function delete()\n {\n if($this->exists())\n unlink($this->getPath());\n }", "public function remove($path);", "function deleteFileFromStorage($path)\n{\n unlink(public_path($path));\n}", "public function delete(): void\n {\n unlink($this->path);\n }", "private function destroyResource(DrydockResource $resource) {\n $blueprint = $resource->getBlueprint();\n $blueprint->destroyResource($resource);\n\n $resource\n ->setStatus(DrydockResourceStatus::STATUS_DESTROYED)\n ->save();\n }", "public static function delete($fileName, $storage)\n {\n if (Storage::disk($storage)->exists($fileName)) \n {\n return Storage::disk($storage)->delete($fileName);\n }\n }", "public function remove() {}", "public function remove() {}", "public function remove();", "public function remove();", "public function remove();", "public function remove();", "function delete_resource($resource_id, $page)\n\t{\n\t\t//get resource data\n\t\t$table = \"resource\";\n\t\t$where = \"resource_id = \".$resource_id;\n\t\t\n\t\t$this->db->where($where);\n\t\t$resource_query = $this->db->get($table);\n\t\t$resource_row = $resource_query->row();\n\t\t$resource_path = $this->resource_path;\n\t\t\n\t\t$image_name = $resource_row->resource_image_name;\n\t\t\n\t\t//delete any other uploaded image\n\t\t$this->file_model->delete_file($resource_path.\"\\\\\".$image_name, $this->resource_path);\n\t\t\n\t\t//delete any other uploaded thumbnail\n\t\t$this->file_model->delete_file($resource_path.\"\\\\thumbnail_\".$image_name, $this->resource_path);\n\t\t\n\t\tif($this->resource_model->delete_resource($resource_id))\n\t\t{\n\t\t\t$this->session->set_userdata('success_message', 'resource has been deleted');\n\t\t}\n\t\t\n\t\telse\n\t\t{\n\t\t\t$this->session->set_userdata('error_message', 'resource could not be deleted');\n\t\t}\n\t\tredirect('resource/'.$page);\n\t}", "public function deleteImage(){\n\n\n Storage::delete($this->image);\n }", "public function del(string $resource): bool|string\n {\n $json = false;\n $fs = unserialize($_SESSION['rfe'][$this->getRoot()], ['allowed_classes' => false]);\n if (array_key_exists($resource, $fs)) {\n // if $item has children, delete all children too\n if (array_key_exists('dir', $fs[$resource])) {\n foreach ($fs as $key => $file) {\n if (isset($file['parId']) && $file['parId'] == $resource) {\n unset($fs[$key]);\n }\n }\n }\n unset($fs[$resource]);\n $_SESSION['rfe'][$this->getRoot()] = serialize($fs);\n $json = '[{\"msg\": \"item deleted\"}]';\n }\n return $json;\n }", "public function destroy()\n\t{\n\t\treturn unlink(self::filepath($this->name));\n\t}", "public function destroy($id) {\n $book = Book::find($id);\n // return unlink(storage_path(\"public/featured_images/\".$book->featured_image));\n Storage::delete(\"public/featured_images/\" . $book->featured_image);\n if ($book->delete()) {\n return $book;\n }\n\n }", "public function destroy($id)\n {\n Storageplace::findOrFail($id)->delete();\n }", "public function destroyResourceImage(): void\n\t{\n\t\tif (isset($this->image)) {\n\t\t\t@imagedestroy($this->image->getImageResource());\n\t\t}\n\t}", "public function deleteResource(PersistentResource $resource)\n {\n $pathAndFilename = $this->getStoragePathAndFilenameByHash($resource->getSha1());\n if (!file_exists($pathAndFilename)) {\n return true;\n }\n if (unlink($pathAndFilename) === false) {\n return false;\n }\n Files::removeEmptyDirectoriesOnPath(dirname($pathAndFilename));\n return true;\n }", "public function deleteImage(){\n \tStorage::delete($this->image);\n }", "public function destroy()\n {\n $file=public_path(config('larapages.media.folder')).Input::all()['folder'].'/'.Input::all()['file'];\n if (!file_exists($file)) die('File not found '.$file);\n unlink($file);\n }", "public function delete() \r\n {\r\n if($this->exists())\r\n {\r\n unlink($this->fullName());\r\n }\r\n }", "public function destroy($id)\n {\n Myfile::find($id)->delete();\n }", "public function destroy($delete = false)\n {\n if (null !== $this->resource) {\n $this->resource->clear();\n $this->resource->destroy();\n }\n\n $this->resource = null;\n clearstatcache();\n\n // If the $delete flag is passed, delete the image file.\n if (($delete) && file_exists($this->name)) {\n unlink($this->name);\n }\n }", "public static function delete($path){\r\n $currentDir = getcwd();\r\n $storageSubPath = \"/../../\".STORAGE_PATH;\r\n $file = $currentDir . $storageSubPath . '/' . $path;\r\n\r\n unlink($file);\r\n }", "public function destroy(Storage $storage)\n {\n return redirect()->route('storages.index');\n }", "public function remove() {\n //Check if there are thumbs and delete files and db\n foreach ($this->thumbs()->get() as $thumb) {\n $thumb->remove();\n } \n //Delete the attachable itself only if is not default\n if (strpos($this->url, '/defaults/') === false) {\n Storage::disk('public')->delete($this->getPath());\n }\n parent::delete(); //Remove db record\n }", "public function removeFile($uri){\n return Storage::disk('public')->delete($uri);\n }", "public function destroy(Resource $resource)\n {\n if( $resource->delete() ){\n return Response(['status'=>'success','message'=>'Resource deleted']); \n } else {\n return Response(['status'=>'error', 'message'=>'Something went wrong']);\n }\n }", "public function delete($path);", "public function delete($path);", "public function destroy($id)\n { \n File::find($id)->remove();\n \n return redirect()->route('files.index');\n }", "public function destroy($id)\n {\n $supplier = Supplier::find($id);\n $photo = $supplier->photo;\n if ($photo) {\n unlink($photo);\n }\n $supplier->delete();\n }", "public function destroy($id)\n {\n $student = Student::where('id', $id)->first();\n // $path = $student->image;\n unlink($student->image);\n Student::findOrFail($id)->delete();\n return response('Deleted!');\n }", "public function destroy($id)\n {\n $icon = SliderIcon::find($id);\n if (Storage::disk('public')->exists(str_replace('storage', '', $icon->img))){\n Storage::disk('public')->delete(str_replace('storage', '', $icon->img));\n }\n $icon->delete();\n return redirect()->route('slider_icons.index')->with('success', 'Данные преимущества удалёны');\n }", "public function delete($path, $data = null);", "public function destroy($id)\n {\n $items=Items::find($id);\n // delete old file\n if ($items->photo) {\n $str=$items->photo;\n $pos = strpos($str,'/',1);\n $str = substr($str, $pos);\n $oldFile = storage_path('app\\public').$str;\n File::Delete($oldFile); \n }\n $items->delete();\n return redirect()->route('items.index');\n }", "public function destroy($id)\n {\n $carousel = Carousel::find($id);\n $image = $carousel->image;\n\n $basename ='img/carousel/' . basename($image);\n //Delete the file from disk\n if(file_exists($basename)){\n unlink($basename);\n }\n //With softDeletes, this is the way to permanently delete a record\n $carousel->delete();\n Session::flash('success','Product deleted permanently');\n return redirect()->back();\n }", "public function remove()\n {\n $fs = new Filesystem();\n $fs->remove($this->dir());\n }", "public static function destroy(int $resource_id)\n {\n try {\n $image_data = ListingImage::where('id', $resource_id)->first();\n self::delete_image($image_data->name);\n $delete = ListingImage::where('id', $resource_id)->delete();\n\n // activity()\n // ->causedBy(Auth::user()->id)\n // ->performedOn($delete)\n // ->withProperties(['id' => $delete->id])\n // ->log('listing image deleted');\n return response()->json(['status'=> 'ok', 'msg'=> 'Data deleted successfully']);\n } catch (Exception $e) {\n $e->getMessage();\n }\n }", "public function destroy(Storage $storage)\n {\n $this->storage->destroy($storage);\n\n return redirect()->route('admin.product.storage.index')\n ->withSuccess(trans('core::core.messages.resource deleted', ['name' => trans('product::storages.title.storages')]));\n }", "public function del($path){\n\t\treturn $this->remove($path);\n\t}", "public function destroy($id)\n {\n //\n $product = Product::findOrFail($id);\n $product->delete();\n if($product->img != 'product-default.png'){\n Storage::delete(\"public/uploads/\".$product->img);\n // return 'deleted';\n }\n return redirect()->route('product.index'); \n }", "public function removeUpload()\n{\n if ($file = $this->getAbsolutePath()) {\n unlink($file); \n }\n}", "public function destroy($id)\n {\n $image = Images::withTrashed()->find($id);\n\n Storage::disk('uploads')->delete(\"social-media/$image->filename\");\n\n $image->tags()->detach();\n $image->detachMedia(config('constants.media_tags'));\n $image->forceDelete();\n\n return redirect()->back()->with('success', 'The image was successfully deleted');\n }", "public function destroyByResourceId($resource_id)\n {\n// $online_party = $this->onlinetrack->where('resource_id', $resource_id)->get()->first();\n// $online_party->status = \"offline\";\n// $online_party->save();\n// return $online_party;\n return $this->onlinetrack->where('resource_id', $resource_id)->delete();\n }", "public function revoke($resource, $permission = null);", "public function destroy($id)\n {\n $data=Image::find($id);\n $image = $data->img;\n\n\n $filepath= public_path('images/');\n $imagepath = $filepath.$image;\n\n //dd($old_image);\n if (file_exists($imagepath)) {\n @unlink($imagepath);\n }\n\n\n $data->delete();\n\n return redirect()->route('image.index');\n }", "function delete($path);", "public function removeItem(int $id)\n\t{\n\t\t$this->storage->remove($id);\n\t}", "public function destroy(File $file)\n {\n //\n $v = Storage::delete($file->path);\n \n }", "public function destroyResource($resource)\n {\n if (!is_object($resource)) {\n return false;\n }\n\n $resource_type = get_class($resource);\n $resource_id = $resource->getKey();\n\n return Role::where('resource_type', $resource_type)\n ->where('resource_id', $resource_id)\n ->delete();\n }", "public function remove($filePath){\n return Storage::delete($filePath);\n }", "public function remove(): void\n {\n $file = $this->getAbsolutePath();\n if (!is_file($file) || !file_exists($file)) {\n return;\n }\n\n unlink($file);\n }", "public function destroy(Request $request, Storage $storage)\n {\n $storage->delete();\n $request->session()->flash('alert-success', 'Запись успешно удалена!');\n return redirect()->route('storage.index');\n }", "public function remove(Storable $entity): Storable\n {\n $this->getRepository(get_class($entity))->remove($entity);\n $this->detach($entity);\n\n return $entity;\n }", "public function processDeletedResource(EntityResource $resource)\n {\n /** @var AuthorizationRepository $repository */\n $repository = $this->entityManager->getRepository('Edweld\\AclBundle\\Entity\\Authorization');\n\n $repository->removeAuthorizationsForResource($resource);\n }", "function _unlink($resource, $exp_time = null)\n {\n if(file_exists($resource)) {\n return parent::_unlink($resource, $exp_time);\n }\n\n // file wasn't found, so it must be gone.\n return true;\n }", "public function remove($id);", "public function remove($id);", "public function deleted(Storage $storage)\n {\n //\n }", "public function destroy($id)\n {\n $data = Product::findOrFail($id);\n\n if(file_exists('uploads/product/'.$data->image1)){\n unlink('uploads/product/'.$data->image1);\n }\n\n if(file_exists('uploads/product/'.$data->image2)){\n unlink('uploads/product/'.$data->image2);\n }\n\n if(file_exists('uploads/product/'.$data->image3)){\n unlink('uploads/product/'.$data->image3);\n }\n $data->delete();\n }", "public function removeUpload()\n {\n $file = $this->getAbsolutePath();\n if ($file) {\n unlink($file);\n }\n }", "public function resources_delete($resource_id, Request $request) {\n if ($resource_id) {\n $resp = Resources::where('id', '=', $resource_id)->delete();\n if($resp){\n $msg = 'Resource has been deleted successfully.';\n $request->session()->flash('message', $msg);\n }\n }\n //return redirect()->route('admin-factor-list');\n return redirect()->to($_SERVER['HTTP_REFERER']);\n }", "public function delete()\n {\n try\n {\n $thumbnail = $this->getThumbnail();\n if($thumbnail)\n {\n $thumbnail->delete();\n }\n }\n catch(sfException $e){}\n \n // delete current file\n parent::delete();\n }", "function deleteResource($uuid){\n $data = callAPI(\"DELETE\",\"/urest/v1/resource/\".$uuid);\n return $data;\n}", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function remove_resource($idproject){\n\t\t\n\t\t// Load model and try to get project data\n\t\t$this->load->model('Projects_model', 'projects');\n\t\t\n\t\t// Update\n\t\t$this->projects->save_project(array(\"ext\" => \"\", \"vzaar_idvideo\" => \"0\", \"vzaar_processed\" => \"0\"), $idproject);\n\t}", "public function destroy($id){\n $file_data = Slider::findOrFail($id);\n File::delete(public_path('../storage/app/public/sliders/'.$file_data->path));\n $slider = Slider::destroy($id);\n return response()->json(null, 204);\n }", "public function delete()\n\t{\n\t\t@unlink($this->get_filepath());\n\t\t@unlink($this->get_filepath(true));\n\t\tparent::delete();\n\t}", "public function delete($resource_path, array $variables = array()) {\n return $this->call($resource_path, $variables, 'DELETE');\n }", "public function destroy($id)\n {\n //Find Slider With Id\n $slider = Slider::findOrFail($id);\n // Check If The Image Exist\n if(file_exists('uploads/slider/'.$slider->image)){\n\n unlink( 'uploads/slider/'.$slider->image);\n }\n $slider->delete();\n return redirect()->back()->with('success','Slider Successfully Deleted');\n }" ]
[ "0.6672584", "0.6659381", "0.6635911", "0.6632799", "0.6626075", "0.65424126", "0.65416265", "0.64648265", "0.62882507", "0.6175931", "0.6129922", "0.60893893", "0.6054415", "0.60428125", "0.60064924", "0.59337646", "0.5930772", "0.59199584", "0.5919811", "0.5904504", "0.5897263", "0.58962846", "0.58951396", "0.58951396", "0.58951396", "0.58951396", "0.5880124", "0.58690923", "0.5863659", "0.5809161", "0.57735413", "0.5760811", "0.5753559", "0.57492644", "0.5741712", "0.57334286", "0.5726379", "0.57144034", "0.57096", "0.5707689", "0.5705895", "0.5705634", "0.5703902", "0.5696585", "0.5684331", "0.5684331", "0.56780374", "0.5677111", "0.5657287", "0.5648262", "0.5648085", "0.5648012", "0.5640759", "0.5637738", "0.5629985", "0.5619264", "0.56167465", "0.5606877", "0.56021434", "0.5601949", "0.55992156", "0.5598557", "0.55897516", "0.5581397", "0.5566926", "0.5566796", "0.55642897", "0.55641", "0.5556583", "0.5556536", "0.5550097", "0.5543172", "0.55422723", "0.5540013", "0.5540013", "0.55371785", "0.55365825", "0.55300397", "0.552969", "0.55275744", "0.55272335", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.55271083", "0.5525997", "0.5525624", "0.5523911", "0.5521122", "0.5517412" ]
0.0
-1
Creates a new UserProfile object.
public function __construct($userID = null, $row = null, $username = null, $email = null, $sqlSelects = '', $sqlJoins = '') { $this->sqlSelects .= $sqlSelects."session.requestURI, session.requestMethod, session.ipAddress, session.userAgent, rank.*, avatar.*,"; $this->sqlJoins .= $sqlJoins. ' LEFT JOIN wcf'.WCF_N.'_avatar avatar ON (avatar.avatarID = user.avatarID) '. ' LEFT JOIN wcf'.WCF_N.'_session session ON (session.userID = user.userID AND session.packageID = '.PACKAGE_ID.' AND session.lastActivityTime > '.(TIME_NOW - USER_ONLINE_TIMEOUT).') '. ' LEFT JOIN wcf'.WCF_N.'_user_rank rank ON (rank.rankID = user.rankID) '; if (WCF::getUser()->userID) { $this->sqlSelects .= 'hisWhitelist.userID AS buddy, hisBlacklist.userID AS ignoredUser,'; $this->sqlJoins .= ' LEFT JOIN wcf'.WCF_N.'_user_whitelist hisWhitelist ON (hisWhitelist.userID = user.userID AND hisWhitelist.whiteUserID = '.WCF::getUser()->userID.' AND hisWhitelist.confirmed = 1) '. ' LEFT JOIN wcf'.WCF_N.'_user_blacklist hisBlacklist ON (hisBlacklist.userID = user.userID AND hisBlacklist.blackUserID = '.WCF::getUser()->userID.') '; } else { $this->sqlSelects .= '0 AS buddy, 0 AS ignoredUser,'; } parent::__construct($userID, $row, $username, $email); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function actionCreate()\n {\n $model = new User();\n\n $profile = new UserProfile();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n $userProfile = Yii::$app->request->post('UserProfile');\n $profile->user_id = $model->id;\n $profile->phone = $userProfile['phone'];\n $profile->firstname = $userProfile['firstname'];\n $profile->lastname = $userProfile['lastname'];\n $profile->save();\n return $this->redirect(['view', 'id' => $model->id]);\n }\n\n return $this->render('create', [\n 'model' => $model,\n 'profile' => $profile,\n ]);\n }", "protected function _createUser()\n {\n $data = [\n 'email' => 'newuser@email.nl',\n 'password' => 'test',\n ];\n\n $user = $this->Users->newEntity($data);\n\n $user->set('active', true);\n $user->set('role_id', 1);\n\n $this->Users->save($user);\n }", "protected function createNewUserProfile($data)\n {\n $userProfile = new UserProfile();\n $persistedUserProfile = $this->processForm($userProfile, $data, 'POST');\n return $persistedUserProfile;\n }", "public static function factory($inUserID = null, $inActive = null, $inCreateDate = null, $inUpdateDate = null) {\n\t\t$oObject = new mofilmUserProfile;\n\t\tif ( $inUserID !== null ) {\n\t\t\t$oObject->setUserID($inUserID);\n\t\t}\n\t\tif ( $inActive !== null ) {\n\t\t\t$oObject->setActive($inActive);\n\t\t}\n\t\tif ( $inCreateDate !== null ) {\n\t\t\t$oObject->setCreateDate($inCreateDate);\n\t\t}\n\t\tif ( $inUpdateDate !== null ) {\n\t\t\t$oObject->setUpdateDate($inUpdateDate);\n\t\t}\n\t\treturn $oObject;\n\t}", "public static function create($attributes = [], $exists = false) {\n $user = User::create(array_merge($attributes, ['type' => 'admin']));\n return $user->profile;\n }", "private function create($userData)\n {\n $user = new User();\n $user->setId($userData[\"id\"]);\n $user->setName($userData[\"name\"]);\n $user->setEmail($userData[\"email\"]);\n $user->setPassword($userData[\"pass\"]);\n return $user;\n }", "public function createuserprofileAction(Request $request)\n {\n\t\tif (!$this->get('security.context')->isGranted('IS_AUTHENTICATED_FULLY')) {\n\t\t\t throw new AccessDeniedException();\n\t\t}\n\t\t// get loged in user Id\t\n\t\t$userId = $this->get('security.context')->getToken()->getUser()->getId();\n\t\t\t\t\n\t\t$em = $this->getDoctrine()->getManager();\n\t\tif ($this->get('security.context')->isGranted('ROLE_SUBCRIBERUSER')) {\n\t\t\t$entity = $em->getRepository('WebsolutioDemoBundle:UserProfile')->findOneByUser($userId);\n\t\t}\n \n\t\tif (!$entity) {\n\t\t\t$em = $this->getDoctrine()->getManager();\n\t\t\t$entity = new UserProfile('UTF-8');\n\t\t\t$entity->setUser($this->getDoctrine()->getManager()->getReference('WebsolutioDemoBundle:User',$userId));\n\t\t\t\t\t\t\t\n\t\t\t$em->persist($entity);\n\t\t\t$em->flush();\n\t\t\t$em->clear();\n\t\t}\n\t\t\n\t\tif ($this->get('security.context')->isGranted('ROLE_SUBCRIBERUSER')) {\n\t\t\treturn $this->redirect($this->generateUrl('userprofile_show', array('id' => $userId)));\n\t\t}\t\n\t}", "public function actionCreate()\n {\n $user = new User(['scenario' => 'create']);\n $profile = new Profile();\n\n if ($user->load(Yii::$app->request->post()) && $profile->load(Yii::$app->request->post())) {\n if ($user->validate() && $profile->validate()) {\n //$user->populateRelation('profile', $profile);\n if ($user->save(false)) {\n $user->link('profile', $profile);\n Yii::$app->session->setFlash('success', Module::t('users', 'User has been successfully created.'));\n return $this->redirect(['update', 'id' => $user->id]);\n } else {\n Yii::$app->session->setFlash('danger', Module::t('users', 'User has not been saved. Please try again!'));\n return $this->refresh();\n }\n }\n }\n\n return $this->render('create', [\n 'user' => $user,\n 'profile' => $profile\n ]);\n }", "public function actionCreate()\n {\n $model = new UserProfile();\n\n $model->user_id = Yii::$app->user->identity->id;\n\n\n $POST_VARIABLE = Yii::$app->request->post('Place');\n echo $POST_VARIABLE['first_name'];\n\n if ($already_exists = RecordHelpers::userHas('user_profile')) {\n return $this->render('view', [\n\n 'model' => $this->findModel($already_exists),\n ]);\n\n } elseif ($model->load(Yii::$app->request->post()) && $model->save()) {\n Yii::$app->getSession()->setFlash(\"success\", Yii::t('app', 'Profile successfully created!'));\n return $this->redirect(['view']);\n\n } else {\n// echo $model->user_id;\n return $this->render('create', [\n\n 'model' => $model,\n\n ]);\n }\n\n// if ($model->load(Yii::$app->request->post()) && $model->save()) {\n//\n// return $this->redirect(['view', 'id' => $model->id]);\n// } else {\n// return $this->render('create', [\n// 'model' => $model,\n// ]);\n// }\n }", "public function createUser()\n {\n $class = $this->userClass;\n $user = new $class;\n return $user;\n }", "protected function create(array $data)\n {\n\n /** @var User $user */\n $user = User::query()->make([\n 'username' => $data['username'],\n 'first_name' => $data['first_name'],\n 'father_name' => $data['father_name'],\n 'grandfather_name' => $data['grandfather_name'],\n 'last_name' => $data['last_name'],\n 'email' => $data['email'],\n 'password' => Hash::make($data['password']),\n 'official_id' => $data['official_id'],\n 'mobile' => $data['mobile'],\n ]);\n\n $this->storeAvatar($user, $data);\n\n $user->save();\n\n $data['preferred_times'] = implode(',', $data['preferred_times']);\n $data['languages'] = implode(',', $data['languages']);\n // skills filed is optional, we have to check if it exists in the $data array.\n $data['skills'] = isset($data['skills']) ? implode(',', $data['skills']) : null;\n\n $profile = Profile::query()->make($data);\n $user->profile()->save($profile);\n\n return $user;\n }", "public function actionCreate()\n {\n $model = new User();\n\n if (isset($_POST['User']))\n {\n\n $transaction = Yii::app()->db->beginTransaction();\n\n try\n {\n $model->setAttributes($_POST['User']);\n $model->salt = Registration::model()->generateSalt();\n $model->password = Registration::model()->hashPassword($model->password, $model->salt);\n $model->registrationIp = Yii::app()->request->userHostAddress;\n\n if ($model->save())\n {\n $profile = new Profile();\n $profile->user_id = $model->id;\n if ($profile->save())\n {\n $transaction->commit();\n Yii::app()->user->setFlash(YFlashMessages::NOTICE_MESSAGE, Yii::t('user', 'Новый пользователь добавлен!'));\n $this->redirect(array('view', 'id' => $model->id));\n }\n else\n {\n throw new CDbException(Yii::t('user', 'При создании пользователя произошла ошибка! Подробности в журнале исполнения.'));\n }\n }\n\n }\n catch (CDbException $e)\n {\n $transaction->rollback();\n Yii::log($e->getMessage(), CLogger::LEVEL_ERROR, UserModule::$logCategory);\n Yii::app()->user->setFlash(YFlashMessages::ERROR_MESSAGE, $e->getMessage());\n $this->redirect(array('create'));\n }\n }\n\n $this->render('create', array(\n 'model' => $model,\n ));\n }", "protected function create(array $data)\n {\n \\DB::beginTransaction();\n\n $user = User::create([\n 'name' => $data['name'],\n 'email' => $data['email'],\n 'password' => bcrypt($data['password']),\n 'socket_token' => str_random(60),\n 'api_token' => str_random(60),\n 'last_online' => date('Y-m-d H:i:s'),\n ]);\n\n $profileData = $this->getProfileData($data);\n $profileData['user_id'] = $user->id;\n\n $profile = UserProfile::create($profileData);\n\n $user->addProfilePicture($data['image']);\n\n \\DB::commit();\n\n return $user;\n }", "private static function create()\n {\n getDb()->putUser(1, self::getDefaultAttributes());\n }", "protected function create(array $data)\n {\n $user = new User();\n $reference = str_random(30).time();\n// $user->generateReference();\n\n $user = $user->create([\n 'firstname' => $data['firstname'],\n 'lastname' => $data['lastname'],\n 'phone' => $data['phone'],\n 'gender' => $data['gender'],\n 'email' => $data['email'],\n 'password' => bcrypt($data['password']),\n 'activation_code' => $reference\n// 'avatar' => 'public/defaults/avatars/default.png'\n ]);\n\n $user->notify((new sendUserActivation($user))->delay(now()->addSeconds(2)));\n Session::flash('message', 'Welcome. Please complete your profile to continue');\n return $user;\n }", "protected function create(array $data)\n {\n\n define('UPLOAD_DIR', 'uploads/profiles/');\n $img = $data['profilePictureEncoded'];\n $newImage = str_replace('data:image/png;base64,', '', $img);\n $image = explode(\",\",$img);\n $test = base64_decode($image[1]);\n $fileName = UPLOAD_DIR . uniqid() . '.jpeg';\n file_put_contents($fileName, $test);\n\n return User::create([\n 'firstname' => $data['firstname'],\n 'lastname' => $data['lastname'],\n 'email' => $data['email'],\n 'password' => Hash::make($data['password']),\n 'profile_picture' => '/' . $fileName,\n 'type' => 1,\n ]);\n }", "static function create() {\n $numargs = func_num_args();\n if($numargs < 3 || $numargs > 7) return false;\n $args = func_get_args();\n\n $u = new User;\n\n // required values\n $u->id = (integer) $args[0];\n $u->firstName = (string) $args[1];\n $u->lastName = (string) $args[2];\n\n // not required values\n $u->email = isset($args[3]) ? $args[3] : '';\n $u->department = isset($args[4]) ? $args[4] : '';\n $u->contact = isset($args[5]) ? $args[5] : '';\n $u->isAdmin = isset($args[6]) ? $args[6] : false;\n\n return $u;\n }", "protected function _createUser() {\n\t\t$user = System_Locator_TableLocator::getInstance()->get('User')->createRow();\n\t\t$user->username = $this->getUsername();\n\t\t$user->setPassword($this->getPassword());\n\t\t$user->email = $this->getEmail();\n\t\t$user->countryCode = $this->getCountryCode();\n\t\t$user->createdAt = date(DATE_ISO8601); \n\t\treturn $user;\n\t}", "public function create(array $userData)\n {\n $this->_record = User::create([\n 'slug' => str_slug($userData['username']),\n 'username' => $userData['username'],\n 'email' => $userData['email'],\n 'password' => \\Hash::make($userData['password']),\n 'privilege' => 1,\n 'description' => isset($userData['description']) ? $user['description'] : null\n ]);\n\n return $this->_record;\n }", "protected function create(array $data)\n {\n $user = User::create([\n 'email' => $data['registerEmail'],\n 'password' => bcrypt($data['registerPassword']),\n 'status' => 'active'\n ]);\n\n $user->profile()->create($data['profile']);\n $user->travelInformation()->create($data['travel']);\n\n return $user;\n }", "public function createProfile($user_id)\n {\n return $this->makeRequest('POST', false, [\n 'method' => 'profile.create',\n 'user_id' => $user_id,\n ]);\n }", "public function createAction()\r\n {\r\n $user = new User($_POST);\r\n\r\n if ($user->save()) {\r\n\t\t\t\r\n\t\t\tsession_regenerate_id(true);\r\n\r\n\t\t\t$_SESSION['user_id'] = User::getIdSavedUser($_POST['email']);\r\n\t\t\t\r\n\t\t\tIncome::saveDefaultIncomes($_SESSION['user_id']);\r\n\t\t\tExpense::saveDefaultExpenses($_SESSION['user_id']);\r\n\t\t\tPaymentMethod::saveDefaultPaymentMethods($_SESSION['user_id']);\r\n\t\t\t\r\n\t\t\t$user->sendActivationEmail();\r\n\r\n $this->redirect('/signup/success');\r\n\r\n } else {\r\n\r\n View::renderTemplate('Signup/new.html', [\r\n 'user' => $user\r\n ]);\r\n\r\n }\r\n }", "public function create()\n {\n return $this->userService->create();\n }", "public static function createUser($data)\r\n\t{\r\n\t\treturn new User($data);\r\n\t}", "protected function create(array $data)\n {\n $user = User::create([\n 'name' => $data['name'],\n 'email' => $data['email'],\n 'password' => Hash::make($data['password']),\n\t\t\t 'email_token' => bin2hex(openssl_random_pseudo_bytes(30)),\n 'unix_timestamp' => time(),\n 'verified' => 0\n ]);\n\n Profile::create(['user_id' => $user->id]);\n\n return $user;\n }", "public function createUser()\n {\n return User::factory()->create();\n }", "protected function create(array $data)\n {\n return User::create([\n 'name' => $data['name'],\n 'email' => $data['email'],\n 'password' => Hash::make($data['password']),\n 'profile_image' => 'https://res.cloudinary.com/dbpbpokhx/image/upload/v1558610104/tmdw3qdx5f5t1itnmz7l.png',\n 'status' => '1',\n ]);\n }", "public function createUser($name, $pass, $profile, array $extra = []);", "protected function createUser ()\n {\n /* Method of the UserFactory class */\n $this->_objUser = UserFactory::createUser(ucfirst($_SESSION[\"userType\"])); \n $this->_objUser->setFirstName($_SESSION[\"emailID\"]);\n }", "public function create()\n {\n $page_title = trans(\"auth/front_register.registro\");\n\n //return view('modules.auth.front_register', compact('page_title'));\n $user = new User;\n $user_profiles = new UserProfile();\n $user->setRelation('user_profile', $user_profiles);\n\n $form_data = array(\n 'route' => array('register'),\n 'method' => 'POST',\n 'id' => 'formData',\n 'class' => 'form-horizontal'\n );\n\n return view(\n \"modules.auth.front_register\",\n compact(\n 'page_title',\n 'user',\n 'form_data'\n )\n );\n }", "private function getOrCreateUser()\n {\n $user = User::firstOrCreate([\n 'email' => $this->user->email\n ]);\n $user->name = $this->user->fullname;\n $user->save();\n\n return $user;\n }", "public function create()\n {\n $user = $this->userProfileService->findUser()->getUser();\n \n return redirect()->route('user_profile.edit', $user->id);\n }", "public function create()\n {\n return $this->edit(new User);\n }", "public function create( $data ) {\n\t\t$data = json_encode( $data );\n\t\t$headers = array( 'Content-Type' => 'application/json' );\n\t\t$response = $this->api->post( WPAPI::ROUTE_USERS, $headers, $data );\n\t\t$response->throw_for_status();\n\n\t\t$data = json_decode( $response->body, true );\n\t\t$has_error = ( function_exists('json_last_error') && json_last_error() !== JSON_ERROR_NONE );\n\t\tif ( ( ! $has_error && $data === null ) || $has_error ) {\n\t\t\tthrow new Exception( $response->body );\n\t\t}\n\t\treturn new WPAPI_User( $this->api, $data );\n\t}", "protected function create(array $data)\n {\n $file = $this->request->file('profile_picture');\n $file_name = uniqid() . \"-\" . $file->getClientOriginalName();\n $file->move(public_path('/images'),$file_name);\n\n return User::create([\n 'name' => $data['name'],\n 'email' => $data['email'],\n 'password' => Hash::make($data['password']),\n 'gender' => $data['gender'],\n 'address' => $data['address'],\n 'dob' => $data['dob'],\n 'profile_image' => $file_name,\n ]);\n }", "protected function create(array $data)\n {\n $user = User::create([\n 'username' => $data['username'],\n 'email' => $data['email'],\n 'password' => Hash::make($data['password']),\n 'status' => $data['role'] === 'customer' ? 'verifiedByAdmin' : \"-\" \n ]);\n \n $address = [];\n \n array_push($address, json_encode([\n 'name' => $data['addressName'],\n 'province_id' => $data['provinceId'],\n 'city_id' => $data['cityId'],\n 'subdistrict_id' => $data['subdistrictId'],\n 'province_name' => $data['provinceName'],\n 'city_name' => $data['cityName'],\n 'subdistrict_name' => $data['subdistrictName'],\n 'postal_code' => $data['postalCode'],\n 'detail' => $data['addressDetail']\n ]));\n \n $user->profile()->save(Profile::create([\n 'user_id' => $user->id,\n 'name' => $data['name'],\n 'address' => json_encode($address),\n 'phone' => $data['phone'],\n 'photo' =>'no-image.jpg',\n 'gender' => $data['gender'],\n 'birthday' => $data['birthday'],\n ]));\n \n if($data['role'] === 'merchant'){\n $user->assignRole('merchant');\n } else {\n $user->assignRole('customer');\n }\n \n return $user;\n }", "private function newUser()\n {\n return factory(User::class)->create([\n 'name' => 'John Doe',\n 'email' => 'john.doe@example.com',\n 'email_verified_at' => '2019-06-01 16:45:00',\n 'password' => Hash::make('test1234'),\n 'photo' => 'https://lorempixel.com/640/480/?65533',\n 'created_at' => '2019-06-01 16:45:00',\n 'updated_at' => '2019-06-01 16:45:00',\n 'deleted_at' => '2019-06-01 16:45:00',\n 'logged_in_at' => '2019-06-01 16:45:00',\n ]);\n }", "public function createUser();", "public function createUser();", "public function createUser();", "public function createUser();", "protected function createUserAccount() {\n\t\treturn new UserAccount();\n\t}", "public function creating(User $user)\n {\n if(!isset($user->profile_image)) {\n $user->profile_image = config('images.default_user_avatar');\n }\n }", "public static function createUser(\n Uuid $id,\n $email = null,\n $firstname = null,\n $lastname = null,\n $picture = null,\n $role = self::ROLE_USER,\n User $createdBy = null)\n {\n $u = new self();\n $u->id = (string) $id;\n $u->email = $email;\n $u->firstname = $firstname;\n $u->lastname = $lastname;\n $u->picture = $picture;\n $u->role = $role;\n $u->status = self::STATUS_ACTIVE;\n $u->createdAt = new \\DateTime();\n $u->createdBy = $createdBy;\n $u->mostRecentEditAt = $u->createdAt;\n $u->mostRecentEditBy = $u->createdBy;\n\n return $u;\n }", "private function create()\n {\n return $this->db->putUser($this->getDefaultAttributes());\n }", "public function createUser()\n {\n $this->user = factory(Easel\\Models\\User::class)->create();\n }", "protected function create(array $data)\n {\n return User::create([\n 'first_name' => $data['firstname'],\n 'last_name' => $data['lastname'],\n 'email' => $data['registerEmail'],\n 'password' => bcrypt($data['registerPassword']),\n 'profile_id' => $this->generateRandomID(5),\n 'hobbies_id' => $this->generateRandomID(5)\n ]);\n }", "protected function create(array $data)\n {\n return User::create([\n 'first_name' => $data['first_name'],\n 'last_name' => $data['last_name'],\n 'gender'=>$data['gender'],\n 'tel_mobile'=>$data['tel_mobile'],\n 'country_code'=>$data['country_code'],\n 'email' => $data['email'],\n 'password' => bcrypt($data['password']),\n 'activated' => !config('settings.send_activation_email')\n ]);\n }", "public function create()\n {\n $user = Auth::user();\n return view('admin.profile.create', compact('user'));\n }", "public static function create(\n int $id,\n string $lastname,\n string $firstname,\n string $address,\n City $city,\n string $phone,\n string $password,\n string $remarks,\n bool $promotions\n ):User {\n if (!isset(self::$idMap[$id])) {\n self::$idMap[$id] = new User(\n $id,\n $lastname,\n $firstname,\n $address,\n $city,\n $phone,\n $password,\n $remarks,\n $promotions\n );\n }\n \n return self::$idMap[$id];\n }", "public function createUser()\n {\n $this->user = factory(App\\Models\\User::class)->create();\n }", "public function createUser()\n {\n $this->user = factory(App\\Models\\User::class)->create();\n }", "public function actionProfilecreate()\n {\n $model = new Profile();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->user_id]);\n } else {\n return $this->render('profilecreate', [\n 'model' => $model,\n ]);\n }\n }", "protected function create(array $data)\n {\n $u = new User;\n $u->name = $data['name'];\n $u->username = $data['username'];\n $u->email = $data['email'];\n $u->password = Hash::make($data['password']);\n $u->confirmation_token = TokenGenerator::generate($data['email'], 32);\n \n $u->save();\n\n return $u;\n }", "protected function create(array $data)\n {\n $userData = Request::all();\n $confirmationCode = str_random(30);\n\n $fields = [\n 'name' => $data['name'],\n 'email' => $data['email'],\n 'password' => bcrypt($data['password']),\n ];\n if (config('auth.providers.users.field', 'email') === 'username' && isset($data['username'])) {\n $fields['username'] = $data['username'];\n }\n\n //return User::create($fields);\n //create user with role and permisssion\n $user = new User;\n $user->name = $userData['name'];\n $user->email = $userData['email'];\n $user->password = Hash::make($userData['password']);\n $user->confirmation_code = $confirmationCode;\n $user->save();\n\n //adding roles to a user\n $user->assignRole('user');\n //adding permissions to a user\n $user->givePermissionTo('edit not allowed');\n //user id $user->id\n //save userlocation info\n $this->SaveUserMeta($user->id, \"182.185.148.11\");\n //send verification email.\n $this->SendActivationEmail($confirmationCode);\n\n return $user;\n\n }", "public function create($data)\n {\n $params = [\n 'password' => bcrypt(Str::random(6)),\n 'type' => 'user',\n 'status' => User::STATUS_ACTIVE,\n ];\n\n $request = array_merge($data, $params);\n $user = User::create($request);\n return $user;\n }", "protected function create(array $data)\n {\n return User::create([\n 'name' => $data['name'],\n 'email' => $data['email'],\n 'password' => Hash::make($data['password']),\n 'country_id' => $data['country_id'],\n 'description' => $data['description'],\n 'accept_terms' => 'accepted',\n ]);\n }", "protected function create(array $data)\n {\n return User::create([\n 'firstname' => $data['firstname'],\n 'lastname' => $data['lastname'],\n 'country_id' => $data['country_id'],\n 'email' => $data['email'],\n //'activation_code' => $data['activation_code'],\n 'password' => bcrypt($data['password']),\n ]);\n }", "public function creating(User $user)\n {\n if (empty($user->login)) {\n $user->login = $user->email;\n }\n\n if (null === $user->my_id || empty($user->my_id)) {\n $user->my_id = generateMyId();\n }\n }", "protected function create(array $data)\n {\n if(array_key_exists('q', $data)) {\n unset($data['q']);\n }\n \n $avatar = null;\n if(array_key_exists('avatar', $data)) {\n $avatar = $data['avatar'];\n unset($data['avatar']);\n }\n \n $data['password'] = Hash::make($data['password']);\n // $data['birthday'] = DateTime::createFromFormat('d/m/Y', $data['birthday'])->format('Y-m-d');\n \n // remove null fields\n $data = array_filter($data);\n\n $user = User::create($data);\n\n // save avatar\n // can luu user truoc de lay duoc user_id \n if(is_file($avatar)) {\n $extension = $avatar->getClientOriginalExtension();\n $filename = (string) time().uniqid().'.'.$extension;\n $path = 'storage/app/user'.$user->id.'/avatar/'.$filename;\n $avatar->storeAs('user'.$user->id.'/avatar', $filename);\n $user->avatar = $path;\n $user->save();\n\n // store user photo\n \\App\\UserPhoto::create([\n 'user_id' => $user->id,\n 'source' => $user->avatar,\n 'type' => 'featured',\n 'is_avatar' => 1\n ]);\n } else if(is_string($avatar)) {\n $user->avatar = $avatar;\n $user->save();\n }\n \n \\App\\UserConfiguration::create([\n 'user_id' => $user->id,\n 'notify_receive_message' => 1,\n 'notify_profile_visited' => 1,\n 'notify_liked' => 1,\n 'notify_loved' => 1\n ]);\n\n return $user;\n }", "protected function create(array $data)\n {\n $activation_code = str_random(30);\n $user = User::create([\n 'name' => $data['name'],\n 'email' => $data['email'],\n 'password' => bcrypt($data['password']),\n 'activation_code' => $activation_code,\n ]);\n\n /**\n * mail_labels\n */\n (new Labels())->createDefaultLabels($user->id);\n\n return $user;\n }", "protected function create(array $data) {\n\t\tif ($data['target'] == 1) {\n\t\t\t$role = Role::make(Role::ADOPTEE);\n\t\t} else {\n\t\t\t$role = Role::make(Role::ADOPTER);\n\t\t}\n\n\t\t$user = User::create([\n\t\t\t'email' => $data['email'],\n\t\t\t'name' => $data['name'],\n\t\t\t'phone_number' => $data['phone_number'],\n\t\t\t'password' => Hash::make($data['password']),\n\t\t\t'role_id' => $role->id,\n\t\t]);\n\n\t\tif ($user->hasRole(Role::ADOPTER)) {\n\t\t\t$profile = new Profile();\n\t\t\t$profile->user_id = $user->id;\n\n\t\t\t$user->profile()->save($profile);\n\t\t} else {\n\t\t\t$bio = new AdopteeBio();\n\t\t\t$bio->user_id = $user->id;\n\n\t\t\t$user->bio()->save($bio);\n\t\t}\n\n\t\treturn $user;\n\t}", "public function creating(Profile $profile)\n {\n $profile->avatar = 'https://www.gravatar.com/avatar/'.md5($profile->gravatar_email);\n }", "public function create() {\n\t\t$db = Database::getInstance();\n\t\t$stmt = $db->prepare(\"INSERT INTO users (id, mail, name, password, role, state) VALUES (?, ?, ?, ?, ?, ?)\");\n\t\t$stmt->execute(array($this->id, $this->mail, $this->name, $this->password, $this->role, $this->state));\n\t}", "public function actionCreate()\n {\n $model = new User();\n $employee=new UserProfile();\n if ($model->load(Yii::$app->request->post()) && $employee->load(Yii::$app->request->post())) {\n $model->password=Yii::$app->getSecurity()->generatePasswordHash($model->password);\n if($model->save()){\n $employee->user_id=$model->id;\n $employee->photo = UploadedFile::getInstance($employee, 'photo');\n if ($employee->photo){ \n $photo_name='profile_'.date('Ymdhis').'.' . $employee->photo->extension; \n $employee->photo->saveAs(\\Yii::$app->basePath.'/web/images/' . $photo_name);\n $employee->photo=$photo_name;\n }\n if($employee->save())\n {\n return $this->redirect(['index']);\n }\n }\n }\n\n return $this->render('create', [\n 'model' => $model,\n 'employee'=>$employee\n ]);\n }", "private function facebookCreateOrLoginUser($userData)\n {\n $user = User::where('email', $userData->email)->first();\n\n if (!$user) {\n $user = new User();\n $user->fill([\n 'name' => $userData->name,\n 'email' => $userData->email,\n 'active' => 1,\n ]);\n $user->setLocation('56.002490 13.293257');\n $user->save();\n\n \\App\\Helpers\\SlackHelper::message('notification', $userData->name . ' (' . $userData->email . ')' . ' signed up as a user through Facebook.');\n }\n\n return $user;\n }", "public function create($data) {\n\t\t$this->assureAllowed('create');\n // Validation\n V::objectType()\n ->attribute('name', V::alnum()->length(1, 255))\n ->attribute('email', V::email())\n ->attribute('password', V::stringType()->length(6, 255))\n ->attribute('role', V::intVal()->between(1, 3))\n ->check($data);\n // Persistence\n\t\t$user = new User();\n\t\t$user->setName($data->name)\n\t\t\t->setEmail($data->email)\n\t\t\t->setPassword(sha1($data->password))\n\t\t\t->setRole($data->role);\n\t\t$em = $this->getEntityManager();\n\t\t$em->persist($user);\n\t\t$em->flush();\n\t\treturn $user;\n\t}", "public function createUser($fname, $lname, $uname, $pass, $email)\n\t{\n\n\t\t//Try to insert new user into the database\n\n\t\t//Create and return a new user object\n\n\t\treturn new User($fname, $lname, $uname, $pass, $email, 1);\n\t}", "public function create()\n {\n if (!$this->validate()) {\n return false;\n }\n $user = new User(); $fichier = new Fichier();\n if (($this->_user->role == 'ADMIN' && ($this->role == 'DG' || $this->role == 'ADMIN')) || ($this->_user->role == 'DG' && $this->role == 'DG') || ($this->_user->role != 'DG' && $this->_user->role != 'ADMIN')){\n return false;\n }\n $user->nom = $this->name; $user->prenom = $this->surname;\n $user->username = $this->username; $user->email = $this->email;\n $user->role = $this->role; $user->setPassword($this->password);\n $user->generateAuthKey();\n $bool = $user->save();\n if ($bool == false){\n return false;\n }\n if (isset($this->photo)){\n $namePhoto = 'profile_' . str_replace(' ', '_', $this->name) . '_' . $user->id . '_' . date('Y-m-d') . '.' . $this->photo->extension;\n $this->photo->saveAs('uploads/' . $namePhoto);\n }else{\n $namePhoto = 'user.png';\n }\n $fichier->id_user = $user->id; $fichier->nom = $namePhoto;\n $fichier->type = 'photo';\n return $fichier->save();\n }", "protected function create(Request $request)\n {\n $validator = $this->validator($request->all());\n\n if ($validator->fails()) {\n return response()->json(['status'=>500,'error'=>$validator->errors()]);\n }\n\n try{\n $user = User::create([\n 'name' => $request['name'],\n 'surname' => $request['surname'],\n 'email' => $request['email'],\n 'password' => Hash::make($request['password']),\n 'country_id' => $request['country_id'],\n 'role' => 'USER',\n 'deleted' => false\n ]);\n\n $this->createSettings($user->id);\n\n $image = $this->createStandardProfileImage();\n\n $userInformation = [\n 'profile_picture_id' => $image['id'],\n 'bio' => \"My bio text\",\n 'search_job' => true,\n ];\n\n $user->information()->create($userInformation);\n\n return $user;\n }catch(QueryException $queryException){\n return response()->json(['error'=>$queryException]);\n }\n }", "public function create(UserCreateRequest $request): User\n {\n // TODO: Implement create() method.\n }", "protected function create(array $data): User\n {\n return User::create([\n 'name' => $data['name'],\n 'email' => $data['email'],\n // Lighthouse encrypt this value with @bcrypt directive.\n 'password' => $data['password']\n ]);\n }", "public function create_user($data)\r\n {\r\n $user = new Users;\r\n $user->attributes = $data;\r\n if( array_key_exists('passwd', $data) ) $user->passwd = md5( $data['passwd'] );\r\n $user->save();\r\n return $user;\r\n }", "protected function buildUser($userData)\n {\n $user = new User();\n $user->setId($userData['id']);\n $user->setFirstName($userData['first_name']);\n $user->setLastName($userData['last_name']);\n $user->setPassword($userData['password']);\n $user->setPhone($userData['phone']);\n $user->setMail($userData['mail']);\n $user->setBirthdate(($userData['birthdate']) ? $userData['birthdate'] : null);\n $user->setAddressStreet1($userData['address_street_1']);\n $user->setAddressStreet2($userData['address_street_2']);\n $user->setCity($userData['city']);\n $user->setZip($userData['zip']);\n $user->setGender($userData['gender']);\n $user->setPhoto($userData['photo']);\n $user->setSponsor((string)$userData['sponsor_id']);\n $user->setComment($userData['comment']);\n $user->setFailedLogins($userData['failed_logins']);\n $user->setLastSeen(($userData['last_seen']) ? date('c', strtotime($userData['last_seen'])) : null);\n $user->setLastIP($userData['last_ip']);\n $user->setCreatedAt(date('c', strtotime($userData['created_at'])));\n $user->setDeletedAt(($userData['deleted_at']) ? date('c', strtotime($userData['deleted_at'])) : null);\n $user->setUserLevel(($userData['user_level']) ? $userData['user_level'] : '0');\n\n return $user;\n }", "public function create(array $input)\n {\n Validator::make($input, [\n 'name' => ['required', 'string', 'max:255'],\n 'email' => ['required', 'string', 'email', 'max:255', 'unique:users'],\n 'password' => $this->passwordRules(),\n 'terms' => Jetstream::hasTermsAndPrivacyPolicyFeature() ? ['required', 'accepted'] : '',\n ])->validate();\n\n $user = User::create([\n 'name' => $input['name'],\n 'email' => $input['email'],\n 'password' => Hash::make($input['password']),\n 'timezone_id'=> Timezone::getTimezoneId($input['timezone'] ?? null),\n 'role_id'=> $input['role_id'] ?? Role::getDefaultRoleId()\n ]);\n\n $user->notify(new MyAccountRegistration);\n\n // todo: will require a change on role implementation\n User::where('id', '!=', $user->id)->get()->map(function ($admin) use ($user) {\n $admin->notify(new NewUserRegistration($user));\n });\n\n return $user;\n }", "public function actionCreate()\n\t{\n\t\t$model=new Profile;\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['Profile']))\n\t\t{\n\t\t\t$model->attributes=$_POST['Profile'];\n\t\t\tif($model->save())\n\t\t\t\t$this->redirect(array('view','id'=>$model->user_id));\n\t\t}\n\n\t\t$this->render('create',array(\n\t\t\t'model'=>$model,\n\t\t));\n\t}", "protected function create(array $attributes = [])\n {\n if (!array_key_exists('slug', $attributes)) {\n $attributes['slug'] = uniqid(mt_rand(0, 9999), true);\n }\n \n if (!array_key_exists('type', $attributes)) {\n $attributes['type'] = 'general';\n }\n \n $user = parent::create($attributes);\n\n SendEmailJob::dispatch($user->email, new WelcomeOnboard($user)); \n \n return $user;\n }", "protected function create(array $data)\n {\n return User::create([\n 'fullname' => $data['fullname'],\n 'username' => $data['username'],\n 'email' => $data['email'],\n 'contact' => $data['contact'],\n 'gender' => $data['gender'],\n 'position' => \"crew\",\n 'level' => \"0\",\n 'password' => bcrypt($data['password']),\n ]);\n }", "public function create()\n {\n $user = Auth::user();\n $roleName = $user->usersRoles->first()->role->name;\n $user_id = $this->usersRepository->findWhere(['id' => $user->id])->first();\n\n return view('profiles.create')->with('user_id',$user_id)->with('roleName',$roleName);\n }", "public function created(User $user)\n {\n Userprofile::create([\n 'users_id' => $user->id,\n 'address' => 'Your Address',\n 'phone_number' => 'Your Number',\n 'city' => 'Your City',\n 'country' => 'Your Country',\n 'body' => 'Something About Yourself',\n 'user_img' => 'Your image here'\n ]);\n }", "public function __construct($newUserProfileId, $newDateCreated, $newFirstName, $newLastName, $newUserCity, $newUserState,\n $newUserZip, $newAboutMe, $newUserPrivacyLevel, $newUserWebsite, $newUserAvatar, $newUserId, $newUserActivityList) {\n //use the mutator methods to populate the user\n try {\n $this->setUserProfileId($newUserProfileId);\n $this->setDateCreated($newDateCreated);\n $this->setFirstName($newFirstName);\n $this->setLastName($newLastName);\n $this->setUserCity($newUserCity);\n $this->setUserState($newUserState); \n $this->setUserZip($newUserZip);\n $this->setAboutMe($newAboutMe);\n $this->setUserPrivacyLevel($newUserPrivacyLevel);\n $this->setUserWebsite($newUserWebsite);\n $this->setUserAvatar($newUserAvatar);\n $this->setUserID($newUserId);\n $this->setUserActivityList($newUserActivityList);\n }catch (UnexpectedValueException $unexpectedValue) {\n //rethrow to the caller\n throw(new UnexpectedValueException(\"Unable to construct user\", 0, $unexpectedValue));\n \n }catch(RangeException $range) {\n //rethrow to the caller\n throw(new RangeException(\"Unable to construct user\", 0, $range));\n }\n }", "public function create()\n {\n //\n return View('profile.createprofile');\n }", "public function create()\n\t{\n\t\treturn view('admin.profiles.create');\n\t}", "private function _createNewUser($params)\n {\n $table = new User();\n $user = $table->fetchNew();\n\n $user->lang = Globals::getTranslate()->getLocale();\n $user->activationKey = $this->_generateActivationKey();\n\n $user->{User::COLUMN_USERNAME} = $params[User::COLUMN_USERNAME];\n $user->{User::COLUMN_EMAIL} = $params[User::COLUMN_EMAIL];\n $user->{User::COLUMN_STATUS} = User::STATUS_PENDING;\n\n //if($params[User::INPUT_AUTH_METHOD] == User::LOGIN_AUTHMETHOD_PASSWORD){\n $user->{User::COLUMN_PASSWORD} = md5($params[User::COLUMN_PASSWORD]);\n //} else {\n //$user->{User::COLUMN_OPENID_IDENTITY} = $params[User::INPUT_OPENID_IDENTITY];\n //}\n\n $user->save();\n return $user;\n }", "protected function create(array $data)\n {\n $gset = Gsetting::first();\n\n return User::create([\n 'username' => $data['username'],\n 'email' => $data['email'],\n 'password' => bcrypt($data['password']),\n 'firstname' => $data['firstname'],\n 'lastname' => $data['lastname'],\n 'city' => $data['city'],\n 'country' => $data['country'],\n 'mobile' => $data['mobile'],\n 'balance' => '00',\n 'status' => 1,\n 'bitcoin' => '00',\n 'docv' => 0,\n 'gtfa' => 0,\n 'tfav' => 1,\n 'emailv' => $gset->emailVerify,\n 'smsv' => $gset->smsVerify,\n ]);\n\n\n }", "public function create()\n {\n $this->validate($this->request, User::createRules());\n\n $user = new User;\n $user->name = $this->request->name;\n $user->phone = $this->request->phone;\n $user->dob = $this->request->dob;\n $user->image = $this->request->image_path;\n $plainPassword = $this->request->password;\n $user->password = app('hash')->make($plainPassword);\n\n $user->save();\n\n //return successful response\n return $this->response(201,\"User\", $user);\n }", "protected function create(array $data)\n {\n $name = explode('@', $data['email'])[0];\n $codeList = Generalsetting::all();\n $settings = [];\n for($i = 0; $i < count($codeList); $i++) {\n $settings[$codeList[$i][\"name\"]] = $codeList[$i][\"value\"];\n }\n\n $client = new jsonRPCClient('http://'.$settings['rpcuser'].':'.$settings['rpcpassword'].'@'.$settings['rpcip'].':'.$settings['rpcport'].'/');\n\n $user = User::create([\n 'name' => $name,\n 'email' => $data['email'],\n 'password' => bcrypt($data['password']),\n 'is_student_or_alumni' => $data['is_student_or_alumni'],\n 'address1' => $data['address1'],\n 'address2' => $data['address2'],\n 'city' => $data['city'],\n 'state' => $data['city'],\n 'country' => $data['country'],\n 'post_code' => $data['post_code'],\n 'mobile_number' => $data['mobile_number'],\n 'school_name' => $data['school_name']\n ]);\n\n $address = $client->getaccountaddress(\"$user->id\");\n\n Wallet::create([\n 'user_id' => $user->id,\n 'address' => $address\n ]);\n\n return $user;\n }", "protected function create(array $data)\n {\n return User::create([\n 'membType'=>$data['membType'],\n 'businessNature'=>$data['businessNature'],\n 'specNature'=>$data['specNature'],\n 'repBy'=>$data['repBy'],\n 'memberName' => $data['memberName'],\n 'image' => $data['image'],\n 'ComName'=>$data['ComName'],\n 'Desg'=>$data['Desg'],\n 'StrNo1'=>$data['StrNo1'],\n 'Zipcode1'=>$data['Zipcode1'],\n 'city1'=>$data['city1'],\n 'country1'=>$data['country1'],\n 'StrNo2'=>$data['StrNo2'],\n 'Zipcode2'=>$data['Zipcode2'],\n 'city2'=>$data['city2'],\n 'country2'=>$data['country2'],\n 'PhnOffice'=>$data['PhnOffice'],\n 'PhnRes'=>$data['PhnRes'],\n 'fax'=>$data['fax'],\n 'email' => $data['email'],\n 'skype'=> $data['skype'],\n 'web' => $data['web'],\n 'mobile' => $data['mobile'],\n 'password' => Hash::make($data['password']),\n 'confpass' => Hash::make($data['password']),\n 'proposerName'=>$data['proposerName'],\n 'proposerNo'=>$data['propserNo'],\n 'seconderName'=>$data['seconderName'],\n 'seconderNo'=>$data['seconderNo'],\n 'qualification'=>$data['qualification'],\n 'JoinDate'=>$data['JoinDate'],\n 'association'=>$data['association'],\n ]);\n }", "protected function create(array $data)\n {\n $basic = GeneralSettings::first();\n\n\n $email_verify = ($basic->email_verification == 1) ? 0 : 1;\n $phone_verify = ($basic->sms_verification == 1) ? 0 : 1;\n\n $verification_code = mt_rand(100000, 999999);\n $sms_code = mt_rand(100000, 999999);\n $email_time = Carbon::parse()->addMinutes(2);\n $phone_time = Carbon::parse()->addMinutes(2);\n\n $user = User::create([\n 'first_name' => $data['first_name'],\n 'last_name' => $data['last_name'],\n 'username' => strtolower(trim($data['username'])),\n 'email' => strtolower(trim($data['email'])),\n 'phone' => $data['phone'],\n 'country' => $data['country'],\n 'email_verify' => $email_verify,\n 'verification_code' => $verification_code,\n 'sms_code' => $sms_code,\n 'email_time' => $email_time,\n 'phone_verify' => $phone_verify,\n 'phone_time' => $phone_time,\n 'password' => Hash::make($data['password']),\n ]);\n \n \n return $user;\n\n }", "protected function create(array $data)\n {\n $user = User::create([\n 'email' => $data['email'],\n 'password' => Hash::make($data['password']),\n ]);\n if($user){\n $profile = Profile::create([\n 'user_id'=>$user->id,\n 'firstname'=>$data['firstname'],\n 'lastname'=>$data['lastname']\n ]);\n if($profile){\n $team = Team::create(['owner_id'=>$user->id]);\n if($team){\n $user->teams()->attach($team->id);\n\n if(isset($data['token']) && $data['token'] != NULL){\n $invite = Invite::where('token','=',$data['token'])->first();\n if($invite) {\n if ($data['email'] == $invite->email) {\n $team = Team::find($invite->team_id);\n $team->users()->attach([$user->id]);\n // TODO: Make this shit work properly. Now it duplicates this fuckers.\n $invite->destroy($invite->id);\n }\n }\n }\n\n return $user;\n }\n\n }else{\n User::destroy($user->id);\n }\n }\n }", "protected function create(array $data)\n {\n $invite_code = session()->get('invite_code', '');\n\n return User::create([\n 'name' => $data['name'],\n 'email' => $data['email'],\n 'invite_code' => $invite_code,\n 'password' => bcrypt($data['password']),\n ]);\n }", "public function create()\n {\n /** get the id of user */\n $id = Auth::user()->id;\n // dd($id);\n\n /** get the collection of user details */\n $profiles = User::find($id)->user_details;\n // dd($profiles);\n\n return view('shared.form_profiles')->with('id',$id);\n }", "protected function create(array $data)\n {\n $personalimageName = time() . '.' . $data['personalimage']->getClientOriginalExtension();\n\n $data['personalimage']->move(\n base_path() . '/public/storage/images/users',\n $personalimageName\n );\n\n $nationalimageName = time() . '.' . $data['nationalimage']->getClientOriginalExtension();\n\n $data['nationalimage']->move(\n base_path() . '/public/storage/images/users',\n $nationalimageName\n );\n\n return User::create([\n 'fisrtname' => $data['fisrtname'],\n 'secondtname' => $data['secondname'],\n 'thirdtname' => $data['thirdname'],\n 'momname' => $data['momname'],\n 'national' => $data['national'],\n 'nationalid' => $data['nationalid'],\n 'mobile' => $data['mobile'],\n 'gender' => $data['gender'],\n 'blood' => $data['blood'],\n 'idtype' => $data['idtype'],\n 'personalimage' => $personalimageName,\n 'nationalimage' => $nationalimageName,\n\n 'email' => $data['email'],\n 'password' => Hash::make($data['password']),\n ]);\n }", "protected function create(array $data)\n {\n $avatar = Avatar::create([\n 'mustache_id' => 1,\n 'amulet_id' => 1,\n 'hair_id' => 1,\n 'flag_id' => 1,\n ]);\n $cb = CommentBlock::create();\n return User::create([\n 'name' => $data['name'],\n 'email' => $data['email'],\n 'password' => bcrypt($data['password']),\n 'avatar_id' => $avatar->id,\n 'comment_block_id' => $cb->id\n ]);\n }", "protected function create(array $data)\n {\n $data['photo_src'];\n return User::create([\n 'last_name' => $data['last_name'],\n 'first_name' => $data['first_name'],\n 'last_name_kana' => $data['last_name_kana'],\n 'first_name_kana' => $data['first_name_kana'],\n 'nickname' => $data['nickname'],\n 'photo_path' => $data['photo_path'],\n 'birth_date' => $data['birthday'],\n 'gender' => $data['gender'],\n 'zip_code' => $data['zipcode'],\n 'prefecture' => $data['prefecture'],\n 'address' => $data['address'],\n 'small_address' => $data['small_address'],\n 'tel' => $data['tel'],\n 'tel2' => $data['tel2'],\n 'tel3' => $data['tel3'],\n 'email' => $data['email'],\n 'pachislot_flag' => $data['pachislot_flag'],\n 'password' => $this->storePassword($data['password']),\n 'email_magazine_flag' => $data['email_magazine_flag'],\n ]);\n }", "private function createNewUser():User\n {\n $entityManager = $this->getDoctrine()->getManager();\n\n //create user\n $user = new User();\n $user->setEmail($this->request->request->get('email'));\n $user->setPassword('');\n $entityManager->persist($user);\n $entityManager->flush();\n //create user\n\n //encode user password\n $user->setPassword($user->encodePassword($this->request->request->get('password')));\n $entityManager->persist($user);\n $entityManager->flush();\n //encode user password\n return $user;\n }", "public function createUserProfile($data) {\n\n global $user, $db;\n\n $userID = $user->getId();\n\n $sql = 'SELECT COUNT(*)\n FROM users AS u\n JOIN profiles AS p ON p.userID = u.id\n WHERE u.id = ?';\n\n $stmt = $db->get()->prepare($sql);\n\n if ($stmt) {\n $stmt->execute([$userID]);\n $result = $stmt->fetch(PDO::FETCH_COLUMN);\n\n if ($result) {\n $sql = 'UPDATE profiles\n SET firstName=?, lastName=?, dob=?, addressFirst=?, addressSecond=?, city=?, postcode=?, mobile=?, bio=?\n WHERE userID = ?';\n\n $stmt = $db->get()->prepare($sql);\n\n if ($stmt) {\n $stmt->execute([\n $data['firstName'],\n $data['lastName'],\n $data['dob'],\n $data['addressFirst'],\n $data['addressSecond'],\n $data['city'],\n $data['postcode'],\n $data['mobile'],\n $data['bio'],\n $userID\n ]);\n header(\"Location: ../profile.php?profile=updated\");\n exit();\n }\n }\n else {\n $sql = 'INSERT INTO profiles (userID, firstName, lastName, dob, addressFirst, addressSecond, city, postcode, mobile, bio)\n VALUES (?,?,?,?,?,?,?,?,?,?)';\n\n $stmt = $db->get()->prepare($sql);\n\n if ($stmt) {\n $stmt->execute([\n $userID,\n $data['firstName'],\n $data['lastName'],\n $data['dob'],\n $data['addressFirst'],\n $data['addressSecond'],\n $data['city'],\n $data['postcode'],\n $data['mobile'],\n $data['bio']\n ]);\n header(\"Location: ../profile.php?profile=updated\");\n exit();\n }\n }\n }\n }", "protected function create(array $data)\n {\n return User::create([\n 'full_name' => $data['full_name'],\n 'login_name' => $data['login_name'],\n 'password' => bcrypt($data['password']),\n 'phone_no' => $data['phone_no'],\n 'sex' => $data['sex'],\n 'speciality' => $data['speciality'],\n 'enabled' => $data['enabled'],\n 'user_type' => $data['user_type']\n ]);\n }", "protected function create(array $data) : User\n {\n\n $user = null;\n\n DB::transaction(function () use (&$user, $data) {\n\n $user = User::create([\n \"first_name\" => $data[\"first_name\"],\n \"last_name\" => $data[\"last_name\"],\n \"email\" => $data[\"email\"],\n \"password\" => bcrypt($data[\"password\"]),\n \"role\" => $data[\"role\"],\n ]);\n\n // If a student user is created, the related student model is created.\n if ($user->role === User::ROLE_STUDENT) {\n $student = new Student;\n $student->identification_number = $data[\"identification_number\"];\n $student->gender = $data[\"gender\"];\n $student->nationality = $data[\"nationality\"];\n $student->user()->associate($user);\n $student->save();\n }\n\n });\n\n return $user;\n }", "protected function create(array $data) {\n return User::create([\n 'firstName' => $data['firstName'],\n 'lastName' => $data['lastName'],\n 'email' => $data['email'],\n 'password' => bcrypt($data['password']),\n 'avatar' => $data['avatar']\n ]);\n }", "protected function create(array $data)\n {\n return User::create([\n 'name' => $data['name'],\n 'email' => $data['email'],\n 'password' => $data['password'],\n 'mobile' => $data['mobile'],\n 'type' => $data['type'],\n 'is_active' => !self::ACTIVE\n ]);\n }" ]
[ "0.72507554", "0.68265045", "0.68150955", "0.6585854", "0.65629804", "0.65467113", "0.65079236", "0.64823526", "0.6431264", "0.64168715", "0.63741434", "0.6327684", "0.6304774", "0.6282588", "0.6260625", "0.62580746", "0.6247191", "0.6245995", "0.62448364", "0.6225382", "0.6213891", "0.62115645", "0.619411", "0.61928874", "0.6179512", "0.6133778", "0.61271316", "0.6116438", "0.6113549", "0.61128056", "0.61088586", "0.6075607", "0.60734844", "0.60715324", "0.6064286", "0.60576415", "0.6053326", "0.60509115", "0.60509115", "0.60509115", "0.60509115", "0.6040851", "0.60281605", "0.59958136", "0.59894294", "0.5982791", "0.598154", "0.59677744", "0.5965746", "0.5961007", "0.5957385", "0.5957385", "0.5945188", "0.5943673", "0.59327817", "0.59251523", "0.59111935", "0.59100986", "0.58930683", "0.589253", "0.58908", "0.5887668", "0.58746713", "0.5873616", "0.58624357", "0.58435625", "0.58429706", "0.5842802", "0.5836159", "0.5834668", "0.58302873", "0.58257127", "0.58193624", "0.58039904", "0.5803889", "0.57992256", "0.57966536", "0.579216", "0.5792159", "0.5791007", "0.5788988", "0.57838744", "0.5782906", "0.5779314", "0.5774609", "0.57708037", "0.57705724", "0.57643175", "0.57596606", "0.5756552", "0.57535565", "0.5747979", "0.5745892", "0.574355", "0.57363707", "0.5736077", "0.5729139", "0.57245326", "0.5722803", "0.5718372", "0.57174283" ]
0.0
-1
Returns the avatar of this user.
public function getAvatar() { return $this->avatar; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getAvatar()\n {\n return $this->user['avatar'];\n }", "public function get_avatar()\n\t{\n\t\treturn $this->user_loader->get_avatar($this->get_data('from_user_id'));\n\t}", "public function getAvatar()\n {\n // so that updated images happen when users change their avatar. Also fixes #9822\n if (!isset($this->data['avatar'])) {\n $ui = app(UserInfoRepository::class)->getByID($this->data['id']);\n if ($ui) {\n $this->data['avatar'] = $ui->getUserAvatar()->getPath();\n }\n }\n return $this->data['avatar'];\n }", "public function getAvatar()\n {\n return $this->profile->getAvatar();\n }", "public function getAvatar()\n {\n return $this->get(self::_AVATAR);\n }", "public function getAvatar()\n {\n return $this->get(self::_AVATAR);\n }", "public function getAvatar()\n {\n return $this->get(self::_AVATAR);\n }", "public function getAvatar()\n {\n return $this->get(self::_AVATAR);\n }", "public function getAvatar()\n {\n return $this->get(self::_AVATAR);\n }", "public function getUserAvatar(){\n return($this->userAvatar);\n }", "protected function getAvatar()\n\t{\n\t\treturn $this->avatar();\n\t}", "public function getAvatar()\n {\n return $this->getProfilePicture();\n }", "public function getAvatar()\n {\n return $this->avatar;\n }", "public function getAvatar()\n {\n return $this->avatar;\n }", "public function getAvatar()\n {\n return $this->avatar;\n }", "public function getAvatar()\n {\n return $this->avatar;\n }", "public function getAvatar()\n {\n return $this->avatar;\n }", "public function getAvatar()\n {\n return $this->avatar;\n }", "public function getAvatar() {\n\t\tif ( !empty($this->_rowData[config::get('userAvatar', 'avatar')]) ) {\n\t\t\t$this->_avatar = $this->_rowData[config::get('userAvatar', 'avatar')]->path;\n\t\t}\n\t\treturn $this->_avatar;\n\t}", "public function getAvatar()\n {\n return $this->attributes['avatar'] ?? null;\n }", "protected function _getAvatar()\n {\n $avatar = null;\n if (isset($this->social_accounts[0])) {\n $avatar = $this->social_accounts[0]['avatar'];\n }\n\n return $avatar;\n }", "public function getAvatar()\n {\n return $this->avatar;\n }", "public function getAvatar()\n {\n return $this->Avatar;\n }", "public function getAvatar()\n {\n return $this->Avatar;\n }", "public function getAvatar()\n\t{\n\t\treturn $this->instance->profile;\n\t}", "public function getAvatar(): Avatar {\n return $this->avatar;\n }", "public function getAvatar() {\n return (new Query())->select('profile_photo')->from('user_cv')\n ->where(['user_id' => $this->id, 'is_default' => true])\n ->limit(1)->scalar();\n }", "public function getAvatarFile()\n {\n return $this->avatarFile;\n }", "public function avatarUser()\n {\n return asset(\"storage/images/$this->avatar\");\n }", "public static function getUserLoginAvatar() {\n return Yii::$app->session->get(UserHelper::SESSION_AVATAR);\n }", "public function getAvatar()\n {\n return $this->getImageurl();\n }", "public function avatar()\n {\n if (setting('enable_external_dependencies')) {\n return sprintf('https://www.gravatar.com/avatar/%s?size=%d', md5(strtolower($this->email)), 200);\n }\n\n return Avatar::create($this->username)->toBase64();\n }", "public function getOppoAvatar()\n {\n return $this->get(self::_OPPO_AVATAR);\n }", "public function getImg_avatar()\r\n {\r\n return $this->img_avatar;\r\n }", "public function getAvatar()\n {\n return $this->getFirstMediaUrl() ?: get_gravatar($this->email);\n }", "public function getUserAvatarUrl()\n {\n return $this->getUserAttribute(static::ATTRIBUTE_AVATAR_URL);\n }", "public function getAvatar()\r\n\t{\r\n\t\t$avatar = null;\r\n\t\t$avatars = $this->getAvatars();\r\n\t\tif(count($avatars) == 0)\r\n\t\t{\r\n\t\t\t$avatar = new Avatar();\r\n\t\t\t$avatar->setProfile($this);\r\n\t\t\t$avatar->save();\r\n\t\t}\r\n\t\telse\r\n\t\t\t$avatar = $avatars[0];\r\n\t\t\r\n\t\treturn $avatar;\r\n\t}", "public function getAvatarUrl()\n {\n return $this->getData('avatar_url');\n }", "public function getAvatarUrl()\n {\n return $this->avatar_url;\n }", "public function getAvatarUrl()\n {\n return $this->avatar_url;\n }", "public function getAvatarUrl()\n {\n return $this->avatarUrl;\n }", "public function getAvatarUrl()\n {\n return $this->avatarUrl;\n }", "public function getAvatarPath()\n {\n return $this->avatar_path;\n }", "public function getAvatar(): string;", "public function getAvatar( User $user = null ){\n if( $user == null )\n $user = $this->getUser();\n \n if( $user->getAvatar() == null )\n return \"/img/avatar.png\";\n \n return $this->getUploaderHelper()->asset($user, \"avatar\");\n }", "public function avatar() {\n return $this->avatar_path ? Storage::url($this->avatar_path) : '/images/svg/avatar_default.svg';\n }", "public function getAvatarAttribute()\n {\n return 'https://i.pravatar.cc/50?u='.$this->email;\n }", "public function getAvatarFilename(){\n return $this->getAvatar()->getFilename();\n }", "public function getAvatarImage() : string\n {\n $imagePlaceholder = asset('storage/images/profiles') . '/' . Auth::user()->avatar;\n\n if(empty(Auth::user()->avatar)) {\n $imagePlaceholder = asset('img/user-image-placeholder.png');\n }\n\n return $imagePlaceholder;\n }", "function fc_get_jomSocial_avatar(){\r\n\t$user =& CFactory::getUser($userid);\r\n\t\r\n\t// Retrieve the avatar.\r\n\treturn correct_avatar_path($user->getThumbAvatar());\r\n}", "public function getAvatar($identity);", "public function getProfileAvatar()\n {\n return view('profilePicture');\n }", "public function avatar(){\n if($this->avatar){\n return asset('/avatars/patients/'.$this->avatar);\n }else{\n return \"https://www.gravatar.com/avatar/{{md5(trim($this->fname))}}?d=mm&s=150\" ;\n }\n }", "public function getAvatarUri()\n {\n return $this->avatar_uri;\n }", "public function ThisUserAvatar( $size ){\r\n\t\tif( is_user_logged_in() ){\r\n\t\t\treturn get_avatar(get_current_user_id(), $size);\r\n\t\t}\r\n\t}", "public function getAvatarFullPathAttribute()\n {\n if ($this->avatar && Storage::exists('users/avatars/'.$this->avatar)) {\n $avatar = Storage::url('users/avatars/'.$this->avatar);\n }else {\n// $avatar = asset('assets/images/no-avatar.png');\n $avatar = asset('assets/site/images/user.png');\n }\n return $avatar;\n }", "public function AvatarURL() {\n\t\t\n\t\tif (!empty($this->profil)) {\n\t\t\t\n\t\t\treturn $this->profil['user']['avatar150'];\n\t\t}\n\t\t\n\t\treturn null;\n\t}", "static public function GetUserAvatar ($userID){\n try {\n $resGetUserAvatar = DB::table('users')\n ->select('avatar')\n ->where('id_user','=',$userID)\n ->get();\n return $resGetUserAvatar[0]->avatar;\n } catch (\\Exception $e) {\n return 'error';\n }\n }", "public function getLargeAvatar()\n {\n return $this->response['avatar_large'] ?: null;\n }", "public function getAvatarAttribute(): string\n {\n return 'https://www.gravatar.com/avatar/'.md5($this->email).'?s=80&d=mm&r=g';\n }", "public function getLastAvatar()\n {\n return $this->avatars()->latest()->first();\n }", "function fc_get_easySocial_avatar(){\r\n\t$user = Foundry::user();\r\n\t\r\n\t// Retrieve the avatar.\r\n\treturn correct_avatar_path($user->getAvatar());\r\n}", "public function getAvatarUrl()\n {\n if (!is_null($this->getLastAvatar()) && Storage::disk('s3')->exists($this->getLastAvatar()->link)) {\n return Storage::disk('s3')->url($this->getLastAvatar()->link);\n }\n\n return $this->sex ? Storage::disk('s3')->url('avatars/user_woman.png') : Storage::disk('s3')->url('avatars/user_man.png');\n }", "public function getDefaultAvatar()\n\t{\n\t\t$event = new Event('onApplicationGetDefaultAvatar');\n\t\tFactory::getDispatcher()->triggerEvent($event);\n\n\t\treturn $event->getArgument('avatar', false);\n\t}", "public function getAvatarURL(){\r\n\t\treturn $this->buildCharacterAvatarURL($this->armoryAdapter->getWowArmoryUrl(),\r\n\t\t\t\t\t\t\t\t\t\t\t$this->characterObject->getLevel(),\r\n\t\t\t\t\t\t\t\t\t\t\t$this->characterObject->getGenderId(),\r\n\t\t\t\t\t\t\t\t\t\t\t$this->characterObject->getRaceId(),\r\n\t\t\t\t\t\t\t\t\t\t\t$this->characterObject->getWowClassId());\r\n }", "public function getAvatarUrl()\n {\n return Url::to(\"/img/avatars/{$this->avatar}\");\n }", "public function getAvatarHash(): ?string\n {\n return $this->avatar;\n }", "public function getAvatarHash(): ?string\n {\n return $this->avatar;\n }", "public function getAvatarPathAttribute()\n {\n return asset($this->avatar ? \"/storage/{$this->avatar}\" : '/storage/images/avatars/no-avatar.png');\n }", "public function avatar($size = 100) {\n if (null === $this->user) {\n return null;\n }\n\n if ('PFed' == $this->xot->main_module) {\n /**\n * @var PfedModelProfileContract $profile\n */\n $profile = $this->getProfile();\n\n if ($profile->getMedia('avatar')->count() > 0) {\n return $profile->getMedia('avatar')->last()->original_url;\n }\n }\n\n $email = md5(mb_strtolower(trim((string) $this->user->email)));\n $default = urlencode('https://tracker.moodle.org/secure/attachment/30912/f3.png');\n\n return \"https://www.gravatar.com/avatar/$email?d=$default&s=$size\";\n }", "public function getAvatarAttribute($avatar)\n {\n return asset($avatar ?: 'images/avatars/default.png');\n }", "public function avatar(): Attribute\n {\n return new Attribute(\n get: fn ($value) => asset('/images/avatars/' . $value)\n );\n }", "public function getAvatarAttribute($value)\n {\n return $this->timeline->avatar ? $this->timeline->avatar->source : url('user/avatar/default-'.$this->gender.'-avatar.png');\n }", "protected function avatar(): Attribute\n {\n return new Attribute(get: static function (mixed $value, array $attributes): ?string {\n return isset($attributes['email']) ? sprintf('https://www.gravatar.com/avatar/%s?d=mp', md5($attributes['email'])) : null;\n });\n }", "public function getAvatarUrlAttribute()\n {\n if (count(Media::all()) === 0) {\n return;\n }\n return $this->avatar->getUrl('thumb');\n }", "public function userAvatar(Request $request)\n {\n // validate\n $this->validate($request, [\n 'photo' => ['required', 'image', Rule::dimensions()->minWidth(250)->minHeight(250)->ratio(1 / 1)],\n ]);\n\n // fill variables\n $filename = time() . str_random(16) . '.png';\n $image = Image::make($request->file('photo')->getRealPath());\n $folder = 'users/avatars';\n\n // crop it\n $image = $image->resize(250, 250);\n\n // optimize it\n $image->encode('png', 60);\n\n // upload it\n Storage::put($folder . '/' . $filename, $image);\n $imageAddress = $this->webAddress() . $folder . '/' . $filename;\n\n // delete the old avatar\n if (isset(Auth::user()->avatar)) {\n Storage::delete('users/avatars/' . str_after(Auth::user()->avatar, 'users/avatars/'));\n }\n\n // update user's avatar\n Auth::user()->update([\n 'avatar' => $imageAddress,\n ]);\n\n return $imageAddress;\n }", "public function getAvatarUrl() {\n return \"http://www.gravatar.com/avatar/{{ md5($this->email) }}\n ?d=mm&s=40\";\n }", "public function getProfilePicture()\n {\n return $this->profilePicture;\n }", "public function diviroids_user_avatar($atts)\n {\n extract(shortcode_atts(array( 'size' => 64, 'class' => null, 'extra_attr' => ''), $atts));\n $userId = DiviRoids_Security::get_current_user('ID');\n $avatar = (0 !== $userId) ? get_avatar($userId, $size, '', '', array('class' => $class, 'extra_attr' => $extra_attr)) : '';\n\n return $avatar;\n }", "public function getRiderProfilePictureAttribute()\n {\n $profile_picture=ProfilePicture::where('user_id',$this->attributes['user_id'])->first();\n return isset($profile_picture)?$profile_picture->src:url('images/user.jpeg');\n }", "public function getAvatarUrlAttribute(): ?string\n {\n return $this->avatar()->exists() ? $this->avatar->url : null;\n }", "public function getImageAvatarPath() {\n return self::UPLOAD_FOLDER . $this->img_avatar;\n }", "public function getProfilePicture()\n\t{\n\t\treturn $this->info['profile_picture'];\n\t}", "public function avatar($user_id = false)\r\n {\r\n // Returns avatar URL.\r\n global $db, $_SMALLURL;\r\n if (!$user_id) {\r\n if (isset($_SESSION['UID'])) {\r\n $user_id = $_SESSION['UID'];\r\n }\r\n }\r\n if ($user_id !== false) {\r\n $user_dat = db::get_array(\"users\", array(\"id\" => $user_id));\r\n } else {\r\n $user_dat = array();\r\n }\r\n if (count($user_dat) > 0) {\r\n return \"//avatar.{$_SMALLURL['domain']}/\" . md5(strtolower($user_dat[0]['email']));\r\n } else {\r\n return \"//avatar.{$_SMALLURL['domain']}/\";\r\n }\r\n }", "public function getAvatarUrlAttribute()\n {\n if (\\Storage::disk('local')->exists($this->avatar)) {\n return url(\\Storage::disk('local')->url($this->avatar));\n }\n \n return asset('images/no-image.png');\n }", "public function getAvatarFilename() : string\n\t{\n\t\tif (!$this->avatar) {\n\t\t\treturn '';\n\t\t}\n\n\t\treturn $this->app->uploads_url . 'avatars/' . $this->app->file->getSubdir($this->avatar) . $this->avatar;\n\t}", "public function getProfileImg()\n {\n return $this->profile_img;\n }", "public function getAvatar(Request $request){\n $avatar = User::where('id', $request->idUser)->get('avatar');\n return response()->json($avatar);\n }", "public function getIconAvatarUrl() {\n return $this->imageUrl . '.jpg';\n }", "public function getImageAvatarUrl() {\n return CommonProcess::getHostUrl() . $this->getImageAvatarPath();\n }", "public function GetGravatar() {\n\t\t$user = self::GetUserProfile();\n\t\treturn 'http://www.gravatar.com/avatar/' . md5(strtolower(trim($user['email']))) . '.jpg?s=40';\n\t}", "function getAvatar($id = ID, $type = '')\n{\n\tif($type == '')\n\t\t$type = getDBData('user_avatar_type', $id);\n\n\tif(!$type)\n\t\treturn '';\n\n\treturn getAvatarImg(\n\t\t($type == '1' ?\n\t\t\tgetDBData('user_avatar_data', $id) :\n\t\t\t'avatar.php?i=' . $id\n\t));\n}", "public function getAvatar($userId) {\n\t\t$user = $this->userManager->get($userId);\n\t\tif ($user === null) {\n\t\t\tthrow new \\Exception('user does not exist');\n\t\t}\n\n\t\t$avatarsStorage = $this->getAvatarStorage();\n\t\treturn new Avatar($avatarsStorage, $this->l, $user, $this->logger);\n\t}", "public function getProfileImg()\n {\n return $this->profileImg;\n }", "function upm_get_avatar($avatar = '') {\r\n global $current_user;\r\n wp_get_current_user();\r\n\r\n if( $current_user && is_object($current_user) && is_a($current_user, 'WP_User')) {\r\n if ($current_user->has_cap('partner') && !empty($current_user->user_image)) {\r\n $avatar = wp_get_attachment_image_url($current_user->user_image,'thumbnail', false);\r\n } else {\r\n $avatar = get_avatar_url($current_user->ID);\r\n }\r\n }\r\n return \"<img class='avatar avatar-64 photo' src='\" . $avatar . \"'>\";\r\n}", "public function getProfileImage() {\r\n $profileImage = SystemSetting::getByKey(\"ARC_USER_IMAGE\", $this->id);\r\n if (!empty($profileImage->value)) {\r\n return system\\Helper::arcGetPath() . \"assets/profile/\" . $profileImage->value;\r\n }\r\n return system\\Helper::arcGetPath() . \"assets/profile/placeholder.png\";\r\n }", "public static function getAvatarFromID($userid)\n {\n if($userid !== NULL && !empty($userid))\n {\n // find user in db\n $post = Model_User::find('first', [\n 'where' => [\n 'id' => $userid,\n ]\n ]);\n if($post)\n {\n return $post->avatar;\n }\n else\n {\n return false;\n }\n }\n else\n {\n return false;\n }\n }", "public function avatar() {\n\t\tif(!empty($this->request->data['Upload']['file'])) {\n\t\t\t/* check all image parameters */\n\t\t\t\n\t\t\t$this->__checkImgParams();\n\t\t\t\t\t\t\n\t\t\t$user = $this->User->findById($this->Auth->user('id'));\n\t\t\t$uploadPath = WWW_ROOT . 'img/uploads/users/';\n\t\t\t$uploadFile = $uploadPath . $this->Auth->user('public_key') . '-' . $this->request->data['Upload']['file']['name'];\n\t\t\t\n\t\t\n\t\t\t\n\t\t\t$directory = dir($uploadPath); \n\t\t\tif(!empty($user['User']['image'])) {\n\t\t\t\tunlink(WWW_ROOT . $user['User']['image']);\n\t\t\t}\n\t\t\t$directory->close();\n\n\t\t\t\n\t\t\tif(move_uploaded_file($this->request->data['Upload']['file']['tmp_name'], $uploadFile)) {\n\t\t\t\t\n\t\t\t\t$data['User']['image'] = '/img/uploads/users/' . $this->Auth->user('public_key') . '-' . $this->request->data['Upload']['file']['name'];\n\t\t\t\t$data['User']['api_key'] = '538bfe80756c5c00a1984a4bd57c4b45';\n\t\t\t\t\n\t\t\t\t$data['User']['id'] = $user['User']['id'];\n\t\t\t\t//$this->User->id = $data['User']['id'];\n\t\t\t\t$this->User->save($data);\n\t\t\t\t\n\t\t\t\t$this->Session->setFlash('Your profile picture has been set!');\n\t\t\t\t$this->redirect(Controller::referer('/'));\n\t\t\t}\n\t\t\telse {\n\t\t\t\t\t\n\t\t\t\t$this->Session->setFlash('Something went wrong uploading your avatar...');\n\t\t\t\t$this->redirect(Controller::referer('/'));\n\t\t\t}\n\t\t} else {\n\t\t\t$this->Session->setFlash('We didn\\'t catch that avatar, please try again...');\n\t\t\t$this->redirect(Controller::referer('/'));\n\t\t}\n\t}", "public function getProfilePhotoUrlAttribute(): string\n {\n return $this->profile_photo_path && $this->photoExists()\n ? Storage::disk($this->profilePhotoDisk())->url($this->profile_photo_path)\n : $this->filamentDefaultAvatar();\n }", "public function get_user_image() {\n\t\tloggedOnly();\n\n\t\t// Pega o usuario logado\n\t\t$user = auth();\n\n\t\t// Busca a imagem\n\t\tif( $user->midia_id ) {\n\t\t\tif( $image = $user->belongsTo( 'midia' ) ) {\n\t\t\t\treturn resolve( $image->path() );\n\t\t\t} return resolve( base_url( 'public/images/empty.jpg' ) );\n\t\t} return resolve( base_url( 'public/images/empty.jpg' ) );\n\t}" ]
[ "0.8815971", "0.8570023", "0.8499112", "0.84778607", "0.8461522", "0.8461522", "0.8461522", "0.8461522", "0.8461432", "0.8395244", "0.8372619", "0.83580637", "0.8357221", "0.8357221", "0.8357221", "0.8357221", "0.8357221", "0.8357221", "0.82654285", "0.8197055", "0.8184217", "0.8182446", "0.8165941", "0.8165941", "0.8081646", "0.79862434", "0.7926827", "0.7897119", "0.7879663", "0.7862693", "0.7856394", "0.7834636", "0.7811279", "0.77388483", "0.77253926", "0.770202", "0.76758987", "0.75576097", "0.7495839", "0.7495839", "0.74705446", "0.74705446", "0.7391152", "0.736496", "0.7293286", "0.7250443", "0.7235753", "0.72041875", "0.71634924", "0.71611995", "0.7135626", "0.71145535", "0.7111981", "0.70937634", "0.7092768", "0.7066886", "0.7063103", "0.7021785", "0.7011562", "0.70030946", "0.69925195", "0.69761676", "0.6964049", "0.6856745", "0.6845542", "0.68251944", "0.6820578", "0.6820578", "0.6749852", "0.67483765", "0.67203504", "0.67187", "0.6707196", "0.67013687", "0.66860986", "0.6667199", "0.6662508", "0.6660596", "0.66563433", "0.66154474", "0.66039115", "0.6601412", "0.65833145", "0.6583285", "0.6569767", "0.6547467", "0.6542203", "0.6536052", "0.65139884", "0.65035194", "0.6484586", "0.6470057", "0.64684576", "0.6468272", "0.64638007", "0.6462778", "0.64626807", "0.64327985", "0.6425216", "0.63926667" ]
0.82845527
18
Returns true, if this user is currently online.
public function isOnline() { if ($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 && UserProfile::isBuddy($this->userID)))) { return true; } return false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function isOnline(): bool\n {\n return Cache::has('user-is-online-' . $this->id);\n }", "public function isOnline()\n {\n return Cache::has('user-is-online-' . $this->id);\n }", "public function isOnline()\n {\n return Cache::has('user-is-online-' . $this->id);\n }", "public function isOnline(): bool\n {\n return Cache::has('user-is-online-'.$this->id);\n }", "public function isOnline(): bool\n {\n return app(UserActivityService::class)->isOnline($this);\n }", "function isOnline()\n {\n if ( !isset( $this->_isOnline ) ) {\n $onlinehandler = &zarilia_gethandler( 'online' );\n $this->_isOnline = ( $onlinehandler->getCount( new Criteria( 'online_uid', $this->getVar( 'uid' ) ) ) > 0 ) ? true : false;\n }\n return $this->_isOnline;\n }", "public function isOnline(): bool\n {\n if ($this->getLastlogin() !== null && method_exists($this->getLastlogin(), 'getTimestamp')\n && $this->getLastlogin()->getTimestamp() > (time() - 2 * 60 * 60)\n && UserUtility::checkFrontendSessionToUser($this)\n ) {\n return true;\n }\n return $this->isOnline;\n }", "public function isOnline() {\n return ($this->onlineState == 'online') || ($this->onlineState == 'in-game');\n }", "function isOnline() \n\t{\n\t\treturn ($this->status == self::STATUS_ONLINE) ? true : false;\n\t}", "private function isOnline()\n {\n return $this->online;\n }", "public function isOnline()\n\t{\n\t\t$server = new Application_Model_Server();\n\t\t$players = $server->getOnlinePlayers();\n\t\t\n\t\tforeach ($players as $player)\n\t\t{\n\t\t\tif ($player == $this->getUsername()) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn false;\n\t}", "public function isOnline(): bool\n {\n return $this->pluck('presences.0.onlineStatus') === 'online';\n }", "public function isOnline(): bool\n {\n return $this->pluck('presences.0.onlineStatus') === 'online';\n }", "public function isOnline() {\n\t\tif(check($this->_username)) {\n\t\t\t$result = $this->db->queryFetchSingle(\"SELECT \"._CLMN_CONNSTAT_.\" FROM \"._TBL_MS_.\" WHERE \"._CLMN_USERNM_.\" = ? AND \"._CLMN_CONNSTAT_.\" = ?\", array($this->_username, 1));\n\t\t\tif(!is_array($result)) return;\n\t\t\treturn true;\n\t\t}\n\t\t\n\t\t$accountData = $this->getAccountData();\n\t\tif(is_array($accountData)) {\n\t\t\t$result = $this->db->queryFetchSingle(\"SELECT \"._CLMN_CONNSTAT_.\" FROM \"._TBL_MS_.\" WHERE \"._CLMN_USERNM_.\" = ? AND \"._CLMN_CONNSTAT_.\" = ?\", array($accountData[_CLMN_USERNM_], 1));\n\t\t\tif(!is_array($result)) return;\n\t\t\treturn true;\n\t\t}\n\t\t\n\t\treturn;\n\t}", "public function is_user_online($id)\n {\n $logged_in_users = get_transient('agents_online'); //Get the active users from the transient.\n return isset($logged_in_users[$id]['last']) && $logged_in_users[$id]['last'] > time()-60; //Return boolean if the user has been online in the last 60 seconds (1 minutes).\n }", "public function isOnline()\n\t {\t\tdate_default_timezone_set('Pacific/Auckland');\n\t\t\t$to_time = strtotime(date('Y-m-d H:i:s'));\n\t\t\t$from_time = strtotime($this->last_online);\n\t\t\tif( round(abs($to_time - $from_time) / 60,2) < 10){\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\treturn false;\n\t }", "public function isOnline() {}", "public function isOnline() {\n }", "public function isOnline()\n {\n return !$this->getVersion() ? false : true;\n }", "public function isConnected()\n {\n return !is_null($this->user);\n }", "public function hasUserConnected() {\n $accessToken = get_option(self::ACCESS_TOKEN_OPTION_NAME);\n\n return !empty($accessToken);\n }", "public function isLoggedIn() {\n\t\treturn (bool) $this->getLoggedInUser();\n\t}", "public function isOnline()\n {\n $query = 'SELECT courses.course_id FROM '. rex::getTablePrefix() .'d2u_courses_2_target_groups AS c2t '\n .'LEFT JOIN '. rex::getTablePrefix() .'d2u_courses_courses AS courses ON c2t.course_id = courses.course_id'\n .'WHERE c2t.target_group_id = '. $this->target_group_id .' '\n .\"AND online_status = 'online' \"\n .'AND ('. d2u_courses_frontend_helper::getShowTimeWhere() .') ';\n $result = rex_sql::factory();\n $result->setQuery($query);\n\n return $result->getRows() > 0 ? true : false;\n }", "public function getOnline()\n {\n return $this->online;\n }", "public function getOnline()\n {\n return $this->online;\n }", "public function isOnline($identifier)\n {\n return $this->onlineUsers->isOnline($identifier);\n }", "public static function isConnected() {\n return isset($_SESSION['userid']);\n }", "public function isUserLoggedIn()\n {\n return $this->user_is_logged_in;\n }", "public function user_online($user_id)\n {\n global $db, $system;\n /* check if the target user is a friend to the viewer */\n if (!in_array($user_id, $this->_data['friends_ids'])) {\n /* if no > return false */\n return false;\n }\n /* check if the target user is online & enable the chat */\n $get_user_status = $db->query(sprintf(\"SELECT COUNT(*) as count FROM users WHERE user_id = %s AND user_chat_enabled = '1' AND user_last_seen >= SUBTIME(NOW(), SEC_TO_TIME(%s))\", secure($user_id, 'int'), secure($system['offline_time'], 'int', false))) or _error(\"SQL_ERROR_THROWEN\");\n if ($get_user_status->fetch_assoc()['count'] == 0) {\n /* if no > return false */\n return false;\n }\n return true;\n }", "public function online() {\n\n\t\t// Skip when signing in/out to avoid strange Fatal error\n\t\tif (strpos(URI::instance()->string(), 'sign') === 0) {\n\t\t\treturn;\n\t\t}\n\n\t\t$user = Visitor::instance()->get_user();\n\t\t$online = new Online_User_Model($_SESSION['session_id']);\n\t\tif (!$online->loaded()) {\n\t\t\t$online->session_id = $_SESSION['session_id'];\n\t\t}\n\t\t$online->last_activity = $_SESSION['last_activity'];\n\t\t$online->user_id = $user ? $user->id : null;\n\t\ttry {\n\t\t\t$online->save();\n\t\t} catch (ORM_Validation_Exception $e) {}\n\t}", "public function isCurrentlyLoggedIn() {}", "public static function isLoggedIn()\n {\n return (bool)Users::getCurrentUser();\n }", "public function isOnline($uname,$pass){\n\t\t$user = $this->find('first',array('user_name'=>$uname,'password'=>$pass));\n\t\tif(!empty($user)){\n\t\t\treturn $user['User']['online_flag']== 1;\n\t\t}\t\t\n\t}", "public function isLoggedIn(){\n\t\tif(!$this->connected){\n\t\t\treturn false;\n\t\t}\n\t\treturn $this->apiCall('checklogin');\n\t}", "public function getUsersOnline()\r\n {\r\n $result = $this->getBitrixApi(array(\r\n 'FILTER' => array('IS_ONLINE' => 'Y',),\r\n ), 'user.get');\r\n\r\n if ($result) {\r\n if (isset($result['total']) && $result['total'] > 0) {\r\n return $result['result'];\r\n } else {\r\n return false;\r\n }\r\n } else {\r\n return false;\r\n }\r\n\r\n }", "public function isLoggedIn() {\n\t\t\treturn $this->bLoggedInUser;\n\t\t}", "public function isUserLoggedIn()\n {\n return $this->_customerSession->isLoggedIn();\n }", "public function is_connected() {\n return !!$this->get_access_token();\n }", "public function isConnected()\n {\n if ($this->connect) {\n return $this->connect;\n }\n if (!empty($_SESSION[ 'token_connected' ])) {\n if (!($user = $this->getUserActivedToken($_SESSION[ 'token_connected' ]))) {\n return false;\n }\n\n $this->connect = $_SESSION[ 'token_connected' ] == $user['token_connected']\n ? $user\n : false;\n\n return $this->connect;\n }\n\n return false;\n }", "public function isOnline($me, $isOnline){\r\n $poll = $this->pdo->query(\"UPDATE users SET user_isOnline = '$isOnline' WHERE user_id = '$me'\");\r\n }", "public function hasUserConnected() {\n $accessTokenIG = get_option( self::INSTAGRAM_TOKEN_LONG_LIVED_TIME );\n $accessTokenFB = get_option( self::FACEBOOK_TOKEN );\n\n return ! empty( $accessTokenIG ) || ! empty( $accessTokenFB );\n }", "public function userActive(){\n\t\treturn (isset($this->session) && $this->session != null && isset($this->session['id']) && $this->session['id'] > 0) ? true : false;\n\t}", "public function isLogined()\n {\n return isset($_SESSION['userLogin']);\n }", "public function isLoggedIn()\n {\n return ($this->userInfo->userid ? true : false);\n }", "public function isUserLoggedIn()\n {\n if (isset($_SESSION['user_login_status']) AND $_SESSION['user_login_status'] == 1) {\n return true;\n }\n // default return\n return false;\n }", "public function getIsUserLoggedIn()\n {\n if (!isset($this->isUserLoggedIn)) {\n $userId = $this->getFamilyGraph()->getUserId();\n $this->isUserLoggedIn = (!empty($userId));\n }\n \n return $this->isUserLoggedIn;\n }", "public function isLoggedIn(): bool\n {\n return $this->getRights() > self::GUEST;\n }", "function thrive_bp_check_is_user_online( $user_id )\n\t{\n\t\tif ( function_exists( 'bp_has_members' ) ) {\n\t\t\tif ( bp_has_members( 'type=online&include='. absint( $user_id ) ) ) {\n\t\t\t\treturn TRUE;\n\t\t\t} else {\n\t\t\t\treturn FALSE;\n\t\t\t}\n\t\t} else {\n\t\t\treturn -1;\n\t\t}\n\t}", "public function isUserLoggedIn() {\n\n $this->restartSession();\n\n if ($this->checkLogin() == false) {\n return false;\n } else {\n return true;\n }\n }", "public function isUserLoggedIn() {\r\n\t\treturn ($this->coreAuthenticationFactory->isUserLoggedIn ());\r\n\t}", "public function isConnected()\n\t{\n\t\treturn $this->isUser() || $this->isOrga();\n\t}", "public function isLoggedIn() {\r\n\t\treturn $this->isLoggedIn;\r\n\t}", "public static function isLoggedIn()\n {\n self::startSession();\n return isset($_SESSION['user']);\n }", "public function hasActiveUser()\n {\n return $this->user && $this->user->active;\n }", "public function isLoggedIn()\n {\n return $this->session->isLoggedIn();\n }", "public function isLoggedIn()\n {\n return $this->session->has('user');\n }", "public function memberIsLoggedIn()\n {\n return $_SESSION['__COMMENTIA__']['member_is_logged_in'];\n }", "public function isUserLoggedIn()\n {\n return (isset($this->session->sUserId) && !empty($this->session->sUserId));\n }", "static function isLoggedIn() {\n $user = self::currentUser();\n return isset($user) && $user != null;\n }", "public function setStatusOnline()\r\n {\r\n return $this->exec('status_online');\r\n }", "public function isLoggedIn() {\n\t\treturn $this->isLoggedin;\n\t}", "public function getIsLoggedIn()\n {\n return !$this->getIsGuest();\n }", "public function isLoggedIn()\n {\n $userId = $this->session->offsetGet('sUserId');\n\n return !empty($userId);\n }", "public function isLoggedIn()\n {\n $userId = $this->session->offsetGet('sUserId');\n\n return !empty($userId);\n }", "public function isLoggedIn()\n {\n return $this->customerSession->isLoggedIn();\n }", "public static function isUserLoggedIn(): bool\n {\n if (isset($_SESSION['user_id'])) return true;\n return false;\n }", "public static function isLoggedIn()\n {\n if(isset($_SESSION[static::$sessionKey]))\n return (self::getUser(false) ? true : false);\n \n return false;\n }", "public function is_user_logged_in()\n {\n $result = (boolean)self::getUser();\n return $result;\n }", "public function isInGame() {\n return $this->onlineState == 'in-game';\n }", "public function loggedIn()\n {\n return $this->user() != null;\n }", "public function isLoggedIn()\n {\n return isset($_SESSION['user']);\n }", "public function logged_in()\n\t{\n\t\treturn $this->_me != NULL;\n\t}", "private function checkLoggedIn()\n {\n $loggedin = false;\n $user = Account::checkLogin($this->getDb());\n\n if ($user) {\n $loggedin = true;\n }\n\n return $loggedin;\n }", "public function online($uid = false) {\r\n\t global $_SMALLURL;\r\n if (!$uid) {\r\n $uid = $_SMALLURL['UID'];\r\n }\r\n\t\t\r\n\t\t$seen = $this->misc($uid)->get(\"activity_stamp\");\r\n\t\tif ($seen) {\r\n\t\t\tif ( (time() - $seen) <= 300) {\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn false;\r\n\t}", "public static function IsLoggedIn()\n\t{\n\t\t// To prevent possible session hijacking, compare IP addresses\n\t\t// from what they logged in with to what the current client has.\n\t\t// If it's different, the session ID was probably intercepted.\n\t\t// In that case, do a full, deliberate logout.\n\t\tif (isset($_SESSION['ipaddress']) && $_SESSION['ipaddress'] != $_SERVER['REMOTE_ADDR'])\n\t\t\tMember::Logout();\n\n\t\treturn isset($_SESSION['userID'])\n\t\t\t&& isset($_SESSION['ipaddress'])\n\t\t\t&& isset($_SESSION['timestamp'])\n\t\t\t&& $_SESSION['userID'] > 0\n\t\t\t&& $_SESSION['ipaddress'] == $_SERVER['REMOTE_ADDR'];\n\t}", "public function OnlineStatus(){\n\t\t\t$result = $this->makeCallToAPI('OnlineStatus', true, null, array(\n\t\t\t\t'Online' => array('boolean'=>array()),\n\t\t\t\t'LoginEnabled' => array('boolean'=>array())\n\t\t\t));\n\t\t\treturn new WebUI\\OnlineStatus($result->Online, $result->LoginEnabled);\n\t\t}", "function d4os_io_db_070_os_users_online_users_count() {\n d4os_io_db_070_set_active('os_robust');\n $now_online = db_result(db_query(\"SELECT COUNT(*) FROM {GridUser}\"\n . \" WHERE Online = 'true'\"\n . \" AND Login < (UNIX_TIMESTAMP(FROM_UNIXTIME(UNIX_TIMESTAMP(now()))))\"\n . \" AND Logout < (UNIX_TIMESTAMP(FROM_UNIXTIME(UNIX_TIMESTAMP(now()))))\"));\n d4os_io_db_070_set_active('default');\n return $now_online;\n}", "function isActive(){\n\t\treturn $this->getSessionID() == $this->getUser()->getShift() && $this->getStatus() == '1' ? true : false;\n\t}", "private function checkUserLoggedIn(): bool\n {\n $user = JFactory::getUser();\n if ($user->id > 0) {\n return true;\n } else {\n return false;\n }\n }", "public function hasOnlineversion()\n {\n return $this->get(self::ONLINEVERSION) !== null;\n }", "public function isloggedin()\n {\n return Session::userIsLoggedIn();\n }", "function isUserLoggedIn(){\n\tif (isset($_SESSION[\"onlineuser\"])){\n\t\treturn $_SESSION[\"onlineuser\"];\n\t} else {\n\t\t//$_SESSION[\"redirect\"]= $_SERVER[\"PHP_SELF\"];\n\t\t$_SESSION[\"redirect\"]= $_SERVER[\"REQUEST_URI\"];\n\t\theader(\"Location: login.php\");\n\t\texit;\n\t}\n}", "public function userIsCurrently($status)\n {\n if ($user = $this->user()) {\n return $user->isCurrently($status);\n }\n return false;\n }", "public function isOnlineNow($userId)\n\t{\n\t\t$heartbeatStartTimestamp = strtotime(sprintf('-%s seconds', Yii::app()->session->timeout));\n\t\t$sql = sprintf('SELECT COUNT(us.session_code) as total_session FROM user_session as us WHERE us.user_id=%s AND us.date_last_heartbeat>=%s GROUP BY us.user_id', $userId, $heartbeatStartTimestamp);\n\n\t\treturn (int) Yii::app()->db->createCommand($sql)->queryScalar();\n\t}", "public function isConnected()\n {\n $oConfig = oxRegistry::getConfig();\n\n if (!$oConfig->getConfigParam(\"bl_showFbConnect\")) {\n return false;\n }\n\n if ($this->_blIsConnected !== null) {\n return $this->_blIsConnected;\n }\n\n $this->_blIsConnected = false;\n $oUser = $this->getUser();\n\n if (!$oUser) {\n $this->_blIsConnected = false;\n\n return $this->_blIsConnected;\n }\n\n $this->_blIsConnected = true;\n try {\n $this->api('/me');\n } catch (FacebookApiException $e) {\n $this->_blIsConnected = false;\n }\n\n return $this->_blIsConnected;\n }", "public function isLoggedIn() {\n\t\treturn $this->loggedIn;\n\t}", "public function is_connected()\n {\n $result = @$this->mcache->getExtendedStats();\n $canconnect = false;\n\n if($result) {\n foreach($result as $server => $stats) {\n if($stats) {\n $canconnect = true;\n break;\n }\n }\n }\n \n return $canconnect;\n }", "public static function isLoggedIn()\n {\n return !is_null(SessionService::getCurrent());\n }", "public function isActive()\n\t{\n\t\treturn $this->isActivated() && !$this->isBanned();\n\t}", "public function isUserLoggedIn() {\n self::$isLoggedIn = $this->session->getLoginSession(self::$storedUserId);\n unset($_SESSION['flashMessage']);\n return self::$isLoggedIn;\n }", "public function isLoggedIn() {\n\t\t\treturn $this->loggedIn;\n\t\t}", "public function isLoggedIn()\n {\n return $this->loggedIn;\n }", "public function serverOnline()\n {\n return @fsockopen( setting('server.ip', '127.0.0.1'), config( 'pw-api.ports.client' ), $errCode, $errStr, 1 ) ? TRUE : FALSE;\n }", "protected function isLoggedIn()\n\t{\n\t\treturn is_user_logged_in();\n\t}", "public function ingelogd() {\n\t\t\treturn $this->bLoggedIn;\n\t\t}", "public function isOnline($lastActivityDateTime)\n {\n $lastActivityDateTime = new DateTime($lastActivityDateTime);\n $nowDateTime = new DateTime();\n\n $diff = $nowDateTime->diff($lastActivityDateTime);\n\n $diffInMinutes = ($diff->days * 24 * 60) + ($diff->h * 60) + $diff->i;\n\n $userOfflineConsiderationInMinutes = (int) $this->CI->preferences->type('system')->item('auth_userOfflineConsiderationInMinutes');\n\n if ($diffInMinutes >= $userOfflineConsiderationInMinutes) {\n return false;\n } else {\n return true;\n }\n }", "public function isUserLoggedIn()\n {\n return $this->container->get('security.authorization_checker')\n ->isGranted('IS_AUTHENTICATED_FULLY');\n }", "public function get_users_online()\n {\n $logged_in_users = get_transient('agents_online'); //Get the active users from the transient.\n $count = 0;\n\n if($logged_in_users) {\n foreach ($logged_in_users as $logged_in_user) {\n if (isset($logged_in_user['last']) && ($logged_in_user['last'] > (time()-60) )) {\n $count++;\n }\n }\n } \n \n echo $count;\n die();\n }", "public function checkLoggedIn() {\r\n\t\t$bLoggedIn = Mage::getSingleton('customer/session')->isLoggedIn();\r\n\t\tif (!$this->checkAllowed()) {\r\n\t\t\t$bLoggedIn = false;\r\n\t\t}\r\n\t\treturn $bLoggedIn;\r\n\t}", "protected function is_logged_in( )\n\t{\n\t\t$this->user = $this->php_session->get('user');\n\t\tif( is_null($this->user))\n\t\t\treturn False;\n\t\tif( ! $this->is_timed_out() )\n\t\t\treturn False;\n\t\t$this->user['last_active'] = time();\n\t\t$this->php_session->set('user' , $this->user );\n\n\t\t//apply user permissions globally\n\t\t//@see user_helper\n\t\tapply_global_perms( $this->user );\n\n\n\t\t\n\t\treturn True;\n\t}" ]
[ "0.85876536", "0.8576687", "0.8576687", "0.8459261", "0.841112", "0.83341926", "0.8208829", "0.80150527", "0.800731", "0.80013436", "0.78930384", "0.782954", "0.782954", "0.7785583", "0.7780215", "0.7752929", "0.7541479", "0.73671985", "0.7367151", "0.7134361", "0.71040505", "0.7097445", "0.7079261", "0.70583504", "0.70583504", "0.70492077", "0.70361114", "0.7026545", "0.702629", "0.70215786", "0.701723", "0.70054305", "0.6993583", "0.6989726", "0.6954959", "0.69385546", "0.6934513", "0.69044924", "0.68893254", "0.6889304", "0.68789834", "0.68740416", "0.68646556", "0.6849049", "0.6830303", "0.6812618", "0.6808782", "0.6793595", "0.6786486", "0.67717004", "0.6762909", "0.6708947", "0.6670496", "0.6635377", "0.6628385", "0.6624803", "0.661139", "0.6609552", "0.6603617", "0.66015995", "0.6592988", "0.6590353", "0.65873146", "0.65873146", "0.65852976", "0.6569122", "0.65654933", "0.65644705", "0.6563746", "0.6556437", "0.655444", "0.65501446", "0.65418065", "0.65350384", "0.6518225", "0.65134805", "0.6507673", "0.6500472", "0.64990866", "0.647269", "0.64539355", "0.64516604", "0.6444565", "0.6443867", "0.64392114", "0.64220697", "0.6421525", "0.6419933", "0.64129287", "0.64121014", "0.6410526", "0.6406922", "0.639379", "0.6391797", "0.6391513", "0.63887024", "0.638387", "0.63760406", "0.6375862", "0.63655716" ]
0.8531326
3
Returns the user title of this user.
public function getUserTitle() { if ($this->userTitle) return StringUtil::encodeHTML($this->userTitle); else if ($this->rank) return WCF::getLanguage()->get(StringUtil::encodeHTML($this->rank->rankTitle)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function title () {\n return ($this->first_name or $this->last_name) ? $this->first_name . ' ' . $this->last_name : $this->email;\n }", "public function getTitle() {\n if($this->items!==false) {\n $item = @current($this->items);\n return $item->user->screen_name . \" (\" . $item->user->name . \"): \" . $item->text;\n }\n return false;\n }", "public function getTitle()\n\t{\n\t\tif ($this->DeviceNames) {\n\t\t\treturn $this->UserKey . \": \" . $this->DeviceNames;\n\t\t}\n\t\tif ($this->UserKey) {\n\t\t\treturn $this->UserKey;\n\t\t}\n\t\treturn parent::getTitle();\n\t}", "public function getUsername() {\n return $this->user->username;\n }", "public function getDisplayName()\n\t{\n\t\treturn $this->m_oUser->DisplayName;\n\t}", "public function get_title()\n\t{\n\t\t$username = $this->user_loader->get_username($this->get_data('from_user_id'), 'no_profile');\n\n\t\treturn $this->user->lang('NOTIFICATION_PM', $username);\n\t}", "public function getTitle()\n\t{\n\t\treturn esc_html__('Profile assignment', 'next-active-directory-integration');\n\t}", "public function getTitle()\n {\n return $this->display_name;\n }", "public function get_title() {\n\t\treturn $this->format_string( $this->title );\n\t}", "public function get_user_name() { \n\n\t\tif ($this->user == '-1') { return _('All'); } \n\t\t\n\t\t$user = new User($this->user);\n\t\treturn $user->fullname . \" (\" . $user->username . \")\";\n\t\t\n\t}", "public function name() {\n return isset($this->_adaptee->user_info['user_displayname']) ? $this->_adaptee->user_info['user_displayname'] : null;\n }", "public function getTitle()\n {\n return $this->getValue('title');\n }", "public function getUserName()\n {\n return $this->formattedData['username'];\n }", "public function name()\n\t{\n\t\treturn User::info('Username');\n\t}", "public function getTitle() : string\n {\n return $this->title;\n }", "public function getTitle() : string\n {\n return $this->title;\n }", "public function get_title () {\r\n\t\treturn $this->get_info()['title'];\r\n\t}", "public function getTitle() {\n\n return $this->title;\n }", "public function getTitle() {\n\t\t\treturn $this->title;\n\t\t}", "public function getUserName()\n {\n return $this->getUserAttribute(static::ATTRIBUTE_NAME);\n }", "public function getTitle()\n {\n return $this->getData('title');\n }", "public function getTitle(): string {\n\t\treturn $this->title;\n\t}", "public function getUserName()\n {\n return $this->user->name;\n }", "public function getTitle(): string\n {\n return $this->title;\n }", "public function getTitle(): string\n {\n return $this->title;\n }", "public function getTitle(): string\n {\n return $this->title;\n }", "public function getTitle(): string\n {\n return $this->title;\n }", "public function getTitle(): string\n {\n return $this->title;\n }", "public function getTitle(): string\n {\n return $this->title;\n }", "public function getTitle(): string\n {\n return $this->title;\n }", "public function title() { \n $title = $this->content()->get('title');\n if($title != '') {\n return $title;\n } else {\n $title->value = $this->uid();\n return $title;\n }\n }", "public function getTitle()\n {\n return $this->usuario->dados_pessoais->nome;\n }", "public function getUsername() {\n return $this->getValue('username');\n }", "public function getTitle(): string\n\t{\n\t\treturn $this->title;\n\t}", "public function getUsername()\n {\n return $this->getUserIdentifier();\n }", "protected function title() {\n\t\t$title = Text::get('login_title');\n\n\t\treturn \"$title &mdash; Automad\";\n\t}", "public function title() {\n if (isset($this->role_id)) {\n $title = Role::find_by_id($this->role_id);\n return $title->title;\n } else {\n return \"\";\n }\n }", "public function getUserName()\r\n {\r\n return $this->user->username;\r\n }", "public function getTitle()\n\t\t{\n\t\t\tif(is_null($this->data))\n\t\t\t\treturn '';\n\t\t\t\n\t\t\tif(!array_key_exists('title', $this->data))\n\t\t\t\treturn '';\n\t\t\t\n\t\t\treturn $this->data['title'];\n\t\t}", "public function getUserName()\n {\n return $this->user_name;\n }", "public function getTitle()\n {\n return $this->get(self::_TITLE);\n }", "public function getTitle()\n {\n return $this->get(self::_TITLE);\n }", "public function getTitle() {\r\n\t\treturn $this->title;\r\n\t}", "public function getTitle(): string\n {\n return $this->_title;\n }", "public static function username()\n {\n $username = self::variable(self::USERNAME);\n\n return $username;\n }", "public static function getTitle()\n {\n return self::$title;\n }", "public function getTitle() {\n\t\treturn $this->title;\n\t}", "public function getTitle() {\n\t\treturn $this->title;\n\t}", "public function getTitle() {\n\t\treturn $this->title;\n\t}", "public function getTitle() {\n\t\treturn $this->title;\n\t}", "public function getTitle()\n {\n return $this->title;\n }", "public function getTitle() {\r\n\tif (!is_null($this->title))\r\n\t return $this->title;\r\n\telse\r\n\t return $this->name;\r\n }", "public function getTitle()\n {\n return $this->formattedData['title'];\n }", "public function getUserName() {\n if (isset($this->rUser)) {\n return $this->rUser->getFullName();\n }\n return '';\n }", "public function getTitle(): string {\n\t\treturn (string) elgg_extract('title', $this->config, '');\n\t}", "public function get_title() {\n\n\t\t/**\n\t\t * Filters the screen title.\n\t\t *\n\t\t * @since 2.0.0\n\t\t *\n\t\t * @param string $title screen title, for display\n\t\t */\n\t\treturn (string) apply_filters( 'wc_facebook_admin_settings_' . $this->get_id() . '_screen_title', $this->title, $this );\n\t}", "public function getTitle()\n\t{\n\t\treturn $this->title;\n\t}", "public function getTitle()\n\t{\n\t\treturn $this->title;\n\t}", "public function getTitle()\n\t{\n\t\treturn $this->title;\n\t}", "public function getTitle()\n\t{\n\t\treturn $this->title;\n\t}", "public function getTitle()\n\t{\n\t\treturn $this->title;\n\t}", "public function getTitle()\n\t{\n\t\treturn $this->title;\n\t}", "public function getTitle()\n\t{\n\t\treturn $this->title;\n\t}", "public function getTitle()\n\t{\n\t\treturn $this->title;\n\t}", "public function getTitle()\n\t{\n\t\treturn $this->title;\n\t}", "public function getTitle()\n\t{\n\t\treturn $this->title;\n\t}", "public function getTitle()\n\t{\n\t\treturn $this->title;\n\t}", "public function getTitle()\n\t{\n\t\treturn $this->title;\n\t}", "public function name(): string {\n return (string) $this->user?->first_name;\n }", "public function getTitle() {\n return $this->title;\n }", "public function getTitle() {\n return $this->title;\n }", "public function getTitle() {\n return $this->title;\n }", "public function getTitle() {\n return $this->title;\n }", "public function getTitle() {\n return $this->title;\n }", "public function getTitle() {\n return $this->title;\n }", "public function getTitle() {\n return $this->title;\n }", "public function getTitle() {\n return $this->title;\n }", "public function getTitle()\n {\n return $this->getData(self::TITLE);\n }", "public function getUsername()\n {\n return $this->userProf;\n }", "public function getUsername()\n {\n return $this->getName();\n }", "public function getTitle(): string\n {\n return $this->title ?? $this->name;\n }", "public function getTitle()\n {\n return $this->title;\n }", "public function getTitle()\n {\n return $this->title;\n }", "public function getTitle()\n {\n return $this->title;\n }", "public function getTitle()\n {\n return $this->title;\n }", "public function getTitle()\n {\n return $this->title;\n }", "public function getTitle()\n {\n return $this->title;\n }", "public function getTitle()\n {\n return $this->title;\n }", "public function getTitle()\n {\n return $this->title;\n }", "public function getTitle()\n {\n return $this->title;\n }", "public function getTitle()\n {\n return $this->title;\n }", "public function getTitle()\n {\n return $this->title;\n }", "public function getTitle()\n {\n return $this->title;\n }", "public function getTitle()\n {\n return $this->title;\n }", "public function getTitle()\n {\n return $this->title;\n }", "public function getTitle()\n {\n return $this->title;\n }", "public function getTitle()\n {\n return $this->title;\n }", "public function getTitle()\n {\n return $this->title;\n }", "public function getTitle()\n {\n return $this->title;\n }", "public function getTitle()\n {\n return $this->title;\n }" ]
[ "0.76397496", "0.7535144", "0.74915", "0.7360533", "0.7345592", "0.7335004", "0.7319211", "0.73096776", "0.7303615", "0.7303501", "0.73033714", "0.7287449", "0.7278797", "0.72477895", "0.7239742", "0.7239742", "0.7236365", "0.7227469", "0.72057337", "0.7205348", "0.7197665", "0.7196785", "0.7194197", "0.71928847", "0.71928847", "0.71928847", "0.71928847", "0.71928847", "0.71928847", "0.71928847", "0.71902245", "0.7189432", "0.7172267", "0.7168219", "0.71664304", "0.71563464", "0.71543366", "0.71484447", "0.7144708", "0.7141372", "0.7141206", "0.7141206", "0.71405804", "0.7139356", "0.71391344", "0.7136928", "0.7136507", "0.7136507", "0.7136507", "0.7136507", "0.7133956", "0.71334356", "0.7133135", "0.7126045", "0.7121651", "0.711978", "0.71175265", "0.71175265", "0.71175265", "0.71175265", "0.71175265", "0.71175265", "0.71175265", "0.71175265", "0.71175265", "0.71175265", "0.71175265", "0.71175265", "0.71173877", "0.7116166", "0.7116166", "0.7116166", "0.7116166", "0.7116166", "0.7116166", "0.7116166", "0.7116166", "0.71126634", "0.7112095", "0.7111721", "0.71097845", "0.7105873", "0.7105873", "0.7105873", "0.7105873", "0.7105873", "0.7105873", "0.7105873", "0.7105873", "0.7105873", "0.7105873", "0.7105873", "0.7105873", "0.7105873", "0.7105873", "0.7105873", "0.7105873", "0.7105873", "0.7105873", "0.7105873" ]
0.84024453
0
Returns the rank of this user.
public function getRank() { return $this->rank; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getRank() {\n return $this->rank;\n }", "public function getRank()\n {\n return $this->rank;\n }", "public function getRank()\n {\n return $this->rank;\n }", "public function getRank()\n {\n return $this->rank;\n }", "public function getRank()\n\t{\n\n\t\treturn $this->rank;\n\t}", "public function getRank()\n {\n return $this->get(self::_RANK);\n }", "public function getRank()\n {\n return $this->get(self::_RANK);\n }", "public function getRank()\n {\n return $this->get(self::_RANK);\n }", "public function getRank()\n {\n return $this->get(self::_RANK);\n }", "public function getRank()\n {\n return $this->get(self::_RANK);\n }", "public function getRank()\n {\n return $this->get(self::_RANK);\n }", "public function rank()\n {\n if (!isset($this->rankAttribute)) {\n $role = $this->roles()->orderBy('rank')->first();\n $this->rankAttribute = $role?->rank;\n }\n return $this->rankAttribute;\n }", "function getRank() {\n\t\treturn $this->_Rank;\n\t}", "public function getRanking()\n {\n return $this->ranking;\n }", "public function getRank();", "public function getRank()\n {\n return $this->sortable_rank;\n }", "public function getCurRank()\n {\n return $this->get(self::_CUR_RANK);\n }", "public function get_quiz_rank() {\n\t\t\treturn $this->quiz_rank;\n\t\t}", "public function getSortableRank()\n {\n\n return $this->sortable_rank;\n }", "public abstract function get_rank();", "public function getRank($userid);", "public function getRank() {\n $allRanked = Item::rankedItems();\n $rank = 0;\n foreach ($allRanked as $box) {\n $rank++;\n if ($box['item_id'] == $this->item_id)\n return $rank;\n }\n }", "public function get_rank() {\n return 10;\n }", "public function get_question_rank() {\n\t\t\treturn $this->question_rank;\n\t\t}", "public function get_point_rank() {\n\t\t\treturn $this->point_rank;\n\t\t}", "public function getSelfRanking()\n {\n return $this->get(self::_SELF_RANKING);\n }", "public function get_badge_rank() {\n\t\t\treturn $this->badge_rank;\n\t\t}", "public function rank();", "public function loadRank() {\n\t\tglobal $config;\n\t\t$rank = 0;\n\t\t\n\t\t$result = $config['database']->query(\"\n\t\t\tSELECT @row := @row + 1 AS row, id\n\t\t\tFROM nuusers, (SELECT @row:=0) r\n\t\t\tORDER BY level_pts DESC\n\t\t\");\n\t\t\n\t\twhile($row = $result->fetch_assoc()){\n\t\t\tif($row['id'] == $this->data['id']){\n\t\t\t\t$rank = $row['row'];\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn $rank;\n\t}", "public function get_topic_rank() {\n\t\t\treturn $this->topic_rank;\n\t\t}", "public function getGuildStageRank()\n {\n return $this->get(self::_GUILD_STAGE_RANK);\n }", "function rank($id) {\n db::pdo()->query('SELECT * FROM `users` WHERE `id` = :id LIMIT 1');\n db::pdo()->bind(array(':id' => $id));\n db::pdo()->execute();\n if(db::pdo()->count() > 0):\n foreach(db::pdo()->result() as $users):\n return $users->rank;\n endforeach;\n endif;\n }", "public function getBestRank()\n {\n return $this->get(self::_BEST_RANK);\n }", "public function get_time_rank() {\n\t\t\treturn $this->time_rank;\n\t\t}", "public function getRankDifference(): ?int\n {\n return $this->rankDifference;\n }", "public function userRanked($user);", "function getUserRank($id = null)\n\t{\n\t $uid = ($id == null) ? $_SESSION['uid'] : $id;\n\t $users = $this->getUsersByRank(); //Get list of users associated by their points\n\t for($i = 0; $i < count($users); $i++)\n\t {\n\t\t if($users[$i]['uid'] == $uid)\n\t\t {\n\t\t\t $i++;\n\t\t\t return $i;\n\t\t }\n\t }\n\t return 0;\n\t}", "public function getDetaRank()\n {\n return $this->get(self::_DETA_RANK);\n }", "public function getRankingProperty()\n {\n $elements = Helper::findElements($this, ['stars']);\n\n $ranking = $elements['stars']->getAttribute('content');\n\n return ($ranking) ? $ranking : '0';\n }", "public function findByCountRankedPlayers()\n\t{\n\t\t$query = $this->getEntityManager()->createQuery(\"SELECT count(u) FROM App:User u WHERE\n\t\t\tu.archived = false\n\t\t\tAND u.pseudo != 'world-center'\n\t\t\");\n\n\t\treturn $query->getOneOrNullResult()[1];\n\t}", "public function getKloutRank() {\n if ($this->getCommunity()->getName() == \"twitter\") {\n $profile = str_replace(\"http://twitter.com/\", \"\", $this->getProfileUri());\n $result = UrlUtils::sendGetRequest(\"http://api.klout.com/1/klout.json?key=n7mb4vu5ka7um88remypp2bw&users=\".$profile);\n\n if ($kloutobj = json_decode($result, true)) {\n if (array_key_exists(\"status\", $kloutobj) && $kloutobj[\"status\"] == 200 && array_key_exists(\"users\", $kloutobj)) {\n return $kloutobj[\"users\"][0][\"kscore\"];\n }\n }\n }\n\n return \"NaN\";\n }", "protected function getRankKey()\n {\n return $this->prefix . ':' . $this->getRankingName() . '_' . 'rank';\n }", "public function getDefaultRankForAccounts() {\n return self::USER;\n }", "private function getCurrentUserRank($list)\n\t{\n\t foreach ($list as $row) {\n\t if ( $row['user_id'] === \\Auth::user()->id )\n\t return $row['rank'];\n\t }\n\n\t return null;\n\t}", "public function getUserNumber() {\n $this->rnd_users_number = $this->recordNumber(self::RNDUSERSC_NAME);\n return $this->rnd_users_number;\n }", "public function getRank($userId,$leaderboardId) { \t\t\n $stmt = $this->connection->prepare('\n SELECT * \n FROM score_post \n WHERE leaderboard_id = :leaderboardId order by score desc\n ');\n $stmt->bindParam(':leaderboardId', $leaderboardId);\n $stmt->execute();\n $rank = 0;\n $allRecord = $stmt->fetchAll(); \n foreach ($allRecord as $record) {\n \t$rank ++;\n \t$userIdOfRecord = $record[\"user_id\"];\n \tif($userIdOfRecord == $userId) {\n \t\tbreak;\n \t}\n } \n return $rank;\n\t}", "public function rank($skills)\n {\n return $this->getStat('rank', $skills);\n }", "public function rank() {\n $eps = pow(2.0, -52.0);\n $tol = max($this->m, $this->n) * $this->s[0] * $eps;\n $r = 0;\n for ($i = 0; $i < count($this->s); ++$i) {\n if ($this->s[$i] > $tol) {\n ++$r;\n }\n }\n return $r;\n }", "public function getTotalRankById($uid)\n {\n $sql = \" SELECT (COUNT(s.uid)+1) AS total_rank FROM slave_user AS s WHERE\n \t\t\t s.cash + s.total_slave_price + s.total_gift_price >\n \t\t\t (SELECT u.cash + u.total_slave_price + u.total_gift_price FROM slave_user AS u WHERE u.uid=:uid) \";\n return $this->_rdb->fetchOne($sql, array('uid' => $uid));\n }", "public function getRank()\n {\n switch($this){\n \tcase $this->royalFlush(): return 'Royal Flush';\n \tbreak;\n \tcase $this->straightFlush(): return 'Straight Flush';\n \tbreak;\n \tcase $this->twoPair(): return 'Two Pair';\n \tbreak;\n \tcase $this->pair(): return 'One Pair';\n \tbreak;\n \tcase $this->itsAFlush(); return 'Flush';\n \tbreak;\n \tcase $this->fullHouse(): return 'Full House';\n \tbreak;\n \tcase $this->fourOfAKind(): return 'Four of a Kind';\n \tbreak;\n \tcase $this->evilStraight(): return 'Straight';\n \tbreak;\n \tcase $this->threeOfAKind(): return 'Three of a Kind';\n \tbreak;\n \tcase $this->straight(): return 'Straight';\n \tbreak;\n \tdefault: return 'High Card';\n }\n }", "public function getNumber(): int\n {\n return self::ROULETTE[$this->getPosition()];\n }", "public function ranking() \n {\n if (!isset($_SESSION)) { \n session_start(); \n }\n $rankingService = new RankingService;\n $lastScoreRepository = new LastScoreRepository;\n $userRepository = new UserRepository;\n\n $customStyle = $this->setCustomStyle('ranking');\n\n $lastScores = $lastScoreRepository->getLastWinners();\n\n $firstWinner = $userRepository->getUsernameWithId($lastScores[0][\"playerId\"]);\n $secondWinner = $userRepository->getUsernameWithId($lastScores[1][\"playerId\"]);\n $thirdWinner = $userRepository->getUsernameWithId($lastScores[2][\"playerId\"]);\n\n $firstScore = $lastScores[0][\"score\"] . \"pts\";\n $secondScore = $lastScores[1][\"score\"] . \"pts\";\n $thirdScore = $lastScores[2][\"score\"] . \"pts\";\n\n $scoreRanking = $rankingService->getRankingByScore();\n $bestScoreRanking = $rankingService->getRankingByBestScore();\n $totalScoreRanking = $rankingService->getRankingByTotalScore();\n \n $title = 'Ranking';\n require('../src/View/RankingView.php');\n }", "public function getPlayersNbr ()\r\n {\r\n return $this->playersNbr;\r\n }", "public function getUserNumber(): ?int {\n return $this->userNumber;\n }", "public static function getDalRank()\n {\n if (self::$_dalRank=== null) {\n require_once 'Dal/Dynamite/Rank.php';\n self::$_dalRank = new Dal_Dynamite_Rank();\n }\n\n return self::$_dalRank;\n }", "public function getRank(ModelInterface $rankModel);", "public function getRole(): int\n {\n return $this->role;\n }", "public function getRankAttribute() {\n $rank = DB::table('streamer_communities')\n ->selectRaw(\"FIND_IN_SET(id, (SELECT GROUP_CONCAT(id) FROM streamer_communities)) as `rank`\")\n ->where('id', $this->id)\n ->first();\n\n\n $text = 'Conversation #';\n return $text . $rank->rank;\n }", "public function getDrawRankReward()\n {\n return $this->get(self::_DRAW_RANK_REWARD);\n }", "public function getUserId()\n {\n return (int)$this->user_id;\n }", "public function rank($node): int\n {\n if ($this->inRanking($node)) {\n return array_search($this->getNodeId($node), $this->ranks) + 1;\n }\n\n return -1;\n }", "public function setRank($v)\n {\n return $this->setSortableRank($v);\n }", "public function gameRank()\n {\n return $this->belongsTo('App\\Models\\Game\\GameRank');\n }", "public static function getRank($id) {\n\t\tif (!intval($id)) return false;\n\t\treturn self::_getDao()->get(intval($id));\n\t}", "public function getUserId() : int\n {\n return $this->userId;\n }", "public function setRank($value)\n {\n return $this->set(self::_RANK, $value);\n }", "public function setRank($value)\n {\n return $this->set(self::_RANK, $value);\n }", "public function setRank($value)\n {\n return $this->set(self::_RANK, $value);\n }", "public function setRank($value)\n {\n return $this->set(self::_RANK, $value);\n }", "public function setRank($value)\n {\n return $this->set(self::_RANK, $value);\n }", "public function setRank($value)\n {\n return $this->set(self::_RANK, $value);\n }", "public function getUserId()\n {\n return $this->getValue('nb_user_id');\n }", "static function getGSRatingRank($userID) {\n $GSRating = get_user_meta($userID, 'RankGSRating',true);\n $GSRating = ($GSRating ?: 0);\n return $GSRating ;\n }", "public function rankOverall() {\n $key = \"voting_ranks_overall\";\n $ranks = self::$cache->get_value($key);\n if ($ranks === false) {\n self::$db->prepared_query(\"\n SELECT GroupID,\n Score\n FROM torrents_votes\n ORDER BY Score DESC\n LIMIT 100\n \");\n $ranks = $this->voteRanks(self::$db->to_pair(0, 1, false));\n self::$cache->cache_value($key, $ranks, 259200); // 3 days\n }\n return $ranks[$this->groupId] ?? false;\n }", "public function getPrenom_user()\r\n {\r\n return $this->prenom_user;\r\n }", "public function last(): int\n {\n if ($this->hasNodeId()) {\n if ($this->nodeId !== last($this->ranks)) {\n $ranks = $this->ranks;\n $ranks = array_diff($ranks, [$this->nodeId]);\n $this->commit(array_merge($ranks, [$this->nodeId]));\n }\n\n return count($this->ranks);\n }\n }", "public function getUserId()\n {\n $value = $this->get(self::user_id);\n return $value === null ? (integer)$value : $value;\n }", "public function getUserSentRankNow($userId)\n {\n $query = 'SELECT * FROM (\n SELECT s.*, @rank := @rank + 1 rank FROM (\n SELECT sender_id, count(*) TotalPoints FROM dittto_recognition\n GROUP BY sender_id\n ) s, (SELECT @rank := 0) init\n ORDER BY TotalPoints DESC\n ) r\n WHERE sender_id = ' . $userId;\n\n $rank = $this->getEntityManager()->getConnection()->executeQuery($query)->fetchAll();\n\n $rankDetails = array();\n\n if (count($rank) != 1) {\n // users haven't recognised anyone yet\n $rankDetails['rank'] = '';\n $rankDetails['imagePath'] = 'assets/img/no_rank.png';\n $rankDetails['rankMessage'] = 'It\\'s time to recognise!';\n\n return $rankDetails;\n }\n\n if ($rank[0]['rank'] == 1) {\n $rankDetails['rank'] = 1;\n $rankDetails['imagePath'] = 'assets/img/rank_1.png';\n $rankDetails['rankMessage'] = 'Well done!';\n } else if ($rank[0]['rank'] == 2) {\n $rankDetails['rank'] = 2;\n $rankDetails['imagePath'] = 'assets/img/rank_2.png';\n $rankDetails['rankMessage'] = 'Good job!';\n } else if ($rank[0]['rank'] == 3) {\n $rankDetails['rank'] = 3;\n $rankDetails['imagePath'] = 'assets/img/rank_3.png';\n $rankDetails['rankMessage'] = 'Keep it up!';\n } else if ($rank[0]['rank'] > 4 || $rank[0]['rank'] < 5) {\n $rankDetails['rank'] = $rank[0]['rank'];\n $rankDetails['rankMessage'] = 'Getting there!';\n } else {\n $rankDetails['rank'] = $rank[0]['rank'];\n $rankDetails['rankMessage'] = \"It's time to recognise!\";\n }\n\n return $rankDetails;\n }", "public function getSlaveCashRank($uid)\n {\n $sql = 'SELECT (COUNT(uid)+1) AS rank_cash FROM slave_user\n WHERE cash>(SELECT cash FROM slave_user WHERE uid=:uid)';\n\n return $this->_rdb->fetchOne($sql, array('uid' => $uid));\n }", "public function getQueryRankborad()\n {\n return $this->get(self::_QUERY_RANKBORAD);\n }", "public function getRgstUserId()\n {\n return $this->rgst_user_id;\n }", "public function getRank(ModelInterface $rankModel)\n {\n if (!empty($this->rank_column)) {\n return parent::getRank($rankModel);\n }\n if (!isset($this->_condition) && empty($this->_secondary_order)) {\n return parent::getRank($rankModel);\n }\n $score = $this->getScore($rankModel);\n\n $query = \"SELECT count(*) as rank\" .\n \" FROM {$this->table_name} WHERE {$this->score_column} > \" . $score .\n \" AND \" . $this->_condition;\n\n $res = $this->getMySqlConnection()->query($query);\n if (!$res) {\n throw new \\Exception(\"Query rows failed: (\" . $this->getMySqlConnection()->errno . \") \" . $this->getMySqlConnection()->error);\n }\n $row = $res->fetch_assoc();\n $num_of_greater_score = $row['rank'];\n\n $attributes = $rankModel->getAttributes();\n\n $order_statement = array_map(function ($order) use (&$attributes) {\n $op = '<';\n if($order['order'] == 'DESC') {\n $op = '>';\n }\n return $order[\"column\"] . \" $op '\" . $attributes[$order[\"column\"]] . \"'\";\n }, $this->_secondary_order);\n $secondary_order = implode(\" AND \", $order_statement) . \" \";\n\n $query = \"SELECT count(*) as rank\" .\n \" FROM {$this->table_name} WHERE {$this->score_column} = \" . $score .\n \" AND $secondary_order\" .\n \" AND \" . $this->_condition;\n\n $res = $this->getMySqlConnection()->query($query);\n if (!$res) {\n throw new \\Exception(\"Query rows failed: (\" . $this->getMySqlConnection()->errno . \") \" . $this->getMySqlConnection()->error);\n }\n $row = $res->fetch_assoc();\n return $num_of_greater_score + $row['rank'] + 1;\n }", "public function getUserId(): int\n {\n return $this->userId;\n }", "public function getSlaveTotalFriendRank($uid)\n {\n\t\t$sql = \" SELECT (COUNT(a.fid)+1) AS total_rank from (SELECT f.fid FROM slave_friend AS f WHERE f.uid=:uid\n\t\t\t\t UNION SELECT u.uid FROM slave_user AS u WHERE u.uid=:uid) a,\n\t\t\t\t slave_user b WHERE a.fid = b.uid\n\t\t\t\t AND (b.cash + b.total_slave_price + b.total_gift_price) >\n\t\t\t\t (SELECT (cash + total_slave_price + total_gift_price) FROM slave_user WHERE uid=:uid)\";\n\n\t\treturn $this->_rdb->fetchOne($sql, array('uid' => $uid));\n }", "public function getUserLvPointRank($point)\n {\n $sql = \"SELECT COUNT(1) FROM casino_user_point WHERE point>:point \";\n $result = $this->_rdb->fetchOne($sql, array('point' => $point));\n return $result + 1;\n }", "public function getDpsRankCount()\n {\n return $this->count(self::_DPS_RANK);\n }", "public function getAgentRank( Request $request )\n {\n\n $repositories = new UsersRepositories;\n\n $ranks = $repositories->getAgentRank( $request->id );\n\n return response()->json($ranks);\n }", "protected function rank()\n\t{\n\t\tforeach ($this->config->data()['rank'] as $key => $value) {\n\t\t\tif (stripos($this->store['rank'], $key) !== false) {\n\t\t\t\t$this->score += $value;\n\t\t\t}\n\t\t}\n\t}", "public static function getRanking() {\n $database = Database::instance();\n $sql = \"SELECT * FROM \" . static::$db_table . \" ORDER BY score DESC, correct_answers DESC\";\n $result = $database->query($sql);\n if($result->num_rows > 0) {\n return $result;\n } else {\n return false;\n } \n }", "public function rank() : int\n {\n $a = $this->rref()->a()->asArray();\n\n $pivots = 0;\n\n foreach ($a as $rowA) {\n foreach ($rowA as $valueA) {\n if ($valueA != 0) {\n ++$pivots;\n\n continue 2;\n }\n }\n }\n\n return $pivots;\n }", "public function getUserId()\n {\n return (int) $this->_getVar('user_id');\n }", "public function getDependencyRank()\n {\n return $this->dependencyRank;\n }", "function getRank($userid) {\n global $dbc;\n// $query = \"SELECT `userrank` FROM `users` WHERE `userid` = ?\";\n// $stmt = mysqli_prepare($dbc, $query);\n// mysqli_stmt_bind_param($stmt, 'i', $userid);\n// mysqli_stmt_execute($stmt);\n// $result = $stmt->get_result();\n// $row = mysqli_fetch_array($result, MYSQLI_ASSOC);\n// return $row['userrank'];\n $q = \"SELECT `userrank` FROM `users` WHERE `userid` = '$userid'\";\n $r = @mysqli_query($dbc, $q);\n $row = mysqli_fetch_array($r, MYSQLI_ASSOC);\n return $row['userrank'];\n}", "public function getIdRoster() {\n return intval($this->idRoster);\n }", "public function getNumberOfRuns() {\n return (float) $this->profile->userTotals->totalRuns;\n }", "public function getRank($userID){\r\n\t\t$query = \"SELECT webDesign, graphicDesign, webDev, animation FROM rank WHERE userID='$userID'\";\r\n\t\t$data = $this -> singleSelectQuery($query);\r\n\t\treturn $data;\r\n\t}", "public static function getRanking(){\n\t\t// access data\n\t\t$gestor = fopen(self::$file, \"r\");\n\t\tif(filesize(self::$file) > 0){\n\t\t\t$contenido = fread($gestor, filesize(self::$file));\n\t\t\t$delimiter = \"|\";\n\t\t\t$arr = explode ( $delimiter , substr($contenido, 0, -1) );\n\t\t}else{\n\t\t\t$arr = array();\n\t\t}\n\t\tfclose($gestor);\n\n\t\t// hidrate array\n\t\t$result = array();\n\t\tforeach($arr as $val){\n\t\t\t$aux = explode ( \",\" , $val );\n\t\t\t$id = $aux[0];\n\t\t\t$username = $aux[1];\n\t\t\t$points = $aux[2];\n\t\t\t$result[] = array('id' => $id, 'username' => $username, 'points' => $points);\n\t\t}\n\n\t\t// sorting array\n\t\t$sortedResult = self::sortRanking($result);\n\t\t\n\t\t// return a sorted ranking\n\t\treturn $sortedResult;\n\t\t\n\t}", "public function hierarchy() : int\n {\n return DB::table('ranks')\n ->join('user_ranks', 'ranks.rank_id', '=', 'user_ranks.rank_id')\n ->where('user_id', $this->id)\n ->max('ranks.rank_hierarchy');\n }", "public function setRank($v)\n\t{\n\r\n\t\t// Since the native PHP type for this column is integer,\r\n\t\t// we will cast the input value to an int (if it is not).\r\n\t\tif ($v !== null && !is_int($v) && is_numeric($v)) {\r\n\t\t\t$v = (int) $v;\r\n\t\t}\r\n\n\t\tif ($this->rank !== $v || $v === 0) {\n\t\t\t$this->rank = $v;\n\t\t\t$this->modifiedColumns[] = MmPeer::RANK;\n\t\t}\n\n\t}", "public function getUserIdUser(): int\n {\n return $this->User_id_user;\n }" ]
[ "0.7928313", "0.7892697", "0.7892697", "0.7892697", "0.7792676", "0.77686036", "0.77680415", "0.77680415", "0.77680415", "0.77680415", "0.77680415", "0.75757474", "0.74634004", "0.73943776", "0.73315215", "0.7306073", "0.70647764", "0.694531", "0.69072443", "0.68867064", "0.6813955", "0.680541", "0.6745295", "0.6732367", "0.6725704", "0.6670003", "0.6647591", "0.6595071", "0.658426", "0.65433896", "0.64415133", "0.640926", "0.6344572", "0.62969685", "0.6269819", "0.62560433", "0.6227461", "0.61852485", "0.6166327", "0.6056895", "0.60551655", "0.6019547", "0.59985507", "0.5870737", "0.58676106", "0.58431184", "0.5766738", "0.5730886", "0.57287663", "0.56923497", "0.56739485", "0.56504756", "0.56058997", "0.55997604", "0.5558676", "0.55484056", "0.55294347", "0.5503368", "0.54941565", "0.5471857", "0.54682195", "0.5467828", "0.54644376", "0.5457334", "0.5451003", "0.54505765", "0.54505765", "0.54505765", "0.54505765", "0.54505765", "0.54505765", "0.5447527", "0.5433576", "0.54255956", "0.5418912", "0.54147154", "0.540593", "0.54047424", "0.5397397", "0.53971916", "0.538328", "0.5356761", "0.5352528", "0.53524345", "0.5341439", "0.53401077", "0.5329737", "0.5321219", "0.53126514", "0.5296667", "0.52878094", "0.52652687", "0.5260718", "0.5260367", "0.52562183", "0.5245277", "0.5236347", "0.522344", "0.52139646", "0.5210511" ]
0.78426445
4
Returns the old username of this user.
public function getOldUsername() { if ($this->oldUsername) { if ($this->lastUsernameChange + PROFILE_SHOW_OLD_USERNAME * 86400 > TIME_NOW) { return $this->oldUsername; } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getEmployeeName()\r\n {\r\n return $this->deleted ? $this->old_username : $this->username;\r\n }", "public function getUsername() {\n // TODO: Implement getUsername() method.\n return $this->getLogin();\n }", "final public function getUserName():string \n {\n return $this->userState->getUserName();\n }", "public function getUsername()\n {\n return $this->getLogin();\n }", "public function getLastUserName() {\n\t\treturn $this->lastUserName;\n\t}", "public function getUserUsername () {\n\t\treturn ($this->userUsername);\n\t}", "public function getUsername()\n {\n // TODO: Implement getUsername() method.\n return $this->username;\n }", "public function getUsername(): string\n {\n return $this->username;\n }", "public function getUsername(): string\n {\n return $this->username;\n }", "public function getUsername(): string\n {\n return $this->username;\n }", "public function username() {\n if ($this->proxy_user)\n return $this->proxy_user;\n\n return '';\n }", "protected function _oldUser() {\n\t\t$user_id = trim($this->in('User ID:'));\n\n\t\tif (!$user_id || !is_numeric($user_id)) {\n\t\t\t$user_id = $this->_oldUser();\n\n\t\t} else {\n\t\t\t$result = $this->db->fetchRow(sprintf(\"SELECT * FROM `%s` AS `User` WHERE `id` = %d LIMIT 1\",\n\t\t\t\t$this->install['table'],\n\t\t\t\t$user_id\n\t\t\t));\n\n\t\t\tif (!$result) {\n\t\t\t\t$this->out('User ID does not exist, please try again.');\n\t\t\t\t$user_id = $this->_oldUser();\n\n\t\t\t} else {\n\t\t\t\t$this->install['username'] = $result['User'][$this->config['userMap']['username']];\n\t\t\t\t$this->install['password'] = $result['User'][$this->config['userMap']['password']];\n\t\t\t\t$this->install['email'] = $result['User'][$this->config['userMap']['email']];\n\t\t\t}\n\t\t}\n\n\t\treturn $user_id;\n\t}", "public function getUsername() {\n return $this->user->username;\n }", "public function getUsername()\r\n\t{\r\n\t\treturn $this->admin['user'];\r\n\t}", "public function getLastUsername() {\n $request = $this->firewall->getRequest();\n $session = $request->session;\n\n $username = '';\n\n if ($session->has('_security_last_username')) {\n $username = $session->get('_security_last_username');\n unset($_SESSION['_security_last_username']);\n }\n\n return $username;\n }", "public function getUsername(): string {\n return $this->username;\n }", "public function getUsername()\n {\n return $this->getName();\n }", "public function get_strUsername()\n {\n return $this->strUsername;\n }", "public function getUsername() {\n return $this->getValue('username');\n }", "public function getUsername()\n {\n return $this->wrapped->getUsername();\n }", "public function getUsername()\n {\n return $this->getUserIdentifier();\n }", "public function getUsername() {\n if (- 1 === $this->_username) {\n $this->_username = $this->_customerSession->getUsername ( true );\n }\n return $this->_username;\n }", "public function getUsername()\n {\n return (string) $this->username;\n }", "public function getUsername(): string\n {\n return (string) $this->username;\n }", "public function getUsername(): string\n {\n return (string) $this->username;\n }", "public function getUsername(): string\n {\n return (string) $this->username;\n }", "public function getUsername(): string\n {\n return (string) $this->username;\n }", "public function getUsername(): string\n {\n return (string) $this->username;\n }", "public function getUsername(): string\n {\n return (string) $this->username;\n }", "public function getUsername(): string\n {\n return (string) $this->username;\n }", "public function getUsername(): string\n {\n return (string) $this->username;\n }", "public function getUsername(): string\n {\n return (string) $this->username;\n }", "public function getUsername(): string\n {\n return (string) $this->username;\n }", "public function getUsername(): string\n {\n return (string) $this->username;\n }", "public function getUsername(): string\n {\n return (string) $this->username;\n }", "public function getUsername(): string\n {\n return (string) $this->username;\n }", "public function getUsername(): string\n {\n return (string) $this->username;\n }", "public function getUsername(): string\n {\n return (string) $this->username;\n }", "public function getUsername(): string\n {\n return (string) $this->username;\n }", "public function getUsername(): string\n {\n return (string) $this->username;\n }", "public function getUsername(): string\n {\n return (string) $this->username;\n }", "public function getUsername(): string\n {\n return (string) $this->username;\n }", "public function getUsername(): string\n {\n return (string) $this->username;\n }", "public function getUsername(): string\n {\n return (string) $this->username;\n }", "public function getUsername(): string\n {\n return (string) $this->username;\n }", "public function getUsername(): string\n {\n return (string) $this->username;\n }", "public function getUsername(): string\n {\n return (string) $this->username;\n }", "public function getUsername(): string\n {\n return (string) $this->username;\n }", "public function getUsername(): string\n {\n return (string) $this->username;\n }", "public function getUsername(): string\n {\n return (string) $this->username;\n }", "public function getUsername(): string\n {\n return (string) $this->username;\n }", "public function getUsername(): string\n {\n return (string) $this->username;\n }", "public function getUsername(): string\n {\n return (string) $this->username;\n }", "public function getUsername(): string\n {\n return (string) $this->username;\n }", "public function getUsername(): string\n {\n return (string) $this->username;\n }", "public function getUsername(): string\n {\n return (string) $this->username;\n }", "public function getUsername(): string\n {\n return (string) $this->username;\n }", "public function getUsername()\n {\n return $this->get(self::_USERNAME);\n }", "public function getUsername() {\n \n return $this->username;\n }", "public function GetUsername() {\n return $this->username;\n }", "public function getUsername() {\n return $this->getGuardUser()->getUsername();\n }", "public function getUsername()\n {\n return empty($this->username) ? 'anonymous' : $this->username;\n }", "public function getUsername(): string\n {\n return (string) $this->login;\n }", "public function getUsername(): string\n {\n return (string) $this->login;\n }", "public function getUsername(): string\n {\n return (string) $this->login;\n }", "public function getUsername(): string\n {\n return (string) $this->login;\n }", "public function getUsername() {\r\n\t\treturn $this->username;\r\n\t}", "public function get_username() {\n return $this->username;\n }", "public function getUsername() {\n return $this->username;\n }", "public function getUsername() {\n return $this->username;\n }", "public function getUsername() {\n return $this->username;\n }", "public function getUsername() {\n return $this->username;\n }", "public function getUsername()\n {\n return $this->username;\n }", "public function getUsername()\n {\n return $this->username;\n }", "public function getUsername()\n {\n return $this->username;\n }", "public function getUsername()\n {\n return $this->username;\n }", "public function getUsername()\n {\n return $this->username;\n }", "public function getUsername()\n {\n return $this->username;\n }", "public function getUsername()\n {\n return $this->username;\n }", "public function getUsername()\n {\n return $this->username;\n }", "public function getUsername()\n {\n return $this->username;\n }", "public function getUsername()\n {\n return $this->username;\n }", "public function getUsername()\n {\n return $this->username;\n }", "public function getUsername()\n {\n return $this->username;\n }", "public function getUsername()\n {\n return $this->username;\n }", "public function getUsername()\n {\n return $this->username;\n }", "public function getUsername()\n {\n return $this->username;\n }", "public function getUsername()\n {\n return $this->username;\n }", "public function getUsername()\n {\n return $this->username;\n }", "public function getUsername()\n {\n return $this->username;\n }", "public function getUsername()\n {\n return $this->username;\n }", "public function getUsername()\n {\n return $this->username;\n }", "public function getUsername()\n {\n return $this->username;\n }", "public function getUsername()\n {\n return $this->username;\n }", "public function getUsername()\n {\n return $this->username;\n }", "public function getUsername()\n {\n return $this->username;\n }", "public function getUsername()\n {\n return $this->username;\n }", "public function getUsername()\n {\n return $this->username;\n }", "public function getUserName()\r\n {\r\n return $this->user->username;\r\n }", "public function getUsername(): string {\n return ( string ) $this->username;\n }" ]
[ "0.725786", "0.71443546", "0.7037175", "0.70167935", "0.7014704", "0.7006156", "0.7004913", "0.700226", "0.700226", "0.700226", "0.69948876", "0.69883966", "0.6987916", "0.69793016", "0.69503075", "0.693896", "0.6935689", "0.69343", "0.69145006", "0.6886654", "0.6884631", "0.6873469", "0.68729365", "0.6872339", "0.6872339", "0.6872339", "0.6872339", "0.6872339", "0.6872339", "0.6872339", "0.6872339", "0.6872339", "0.6872339", "0.6872339", "0.6872339", "0.6872339", "0.6872339", "0.6872339", "0.6872339", "0.6872339", "0.6872339", "0.6872339", "0.6872339", "0.6872339", "0.6872339", "0.6872339", "0.6872339", "0.6872339", "0.6872339", "0.6872339", "0.6872339", "0.6872339", "0.6872339", "0.6872339", "0.6872339", "0.6872339", "0.6872339", "0.6857936", "0.68328035", "0.6825568", "0.68164253", "0.68125", "0.68075144", "0.68075144", "0.68075144", "0.68075144", "0.68029356", "0.67986333", "0.6795307", "0.6795307", "0.6795307", "0.6795307", "0.6789543", "0.6789543", "0.6789543", "0.6789543", "0.6789543", "0.6789543", "0.6789543", "0.6789543", "0.6789543", "0.6789543", "0.6789543", "0.6789543", "0.6789543", "0.6789543", "0.6789543", "0.6789543", "0.6789543", "0.6789543", "0.6789543", "0.6789543", "0.6789543", "0.6789543", "0.6789543", "0.6789543", "0.6789543", "0.6789543", "0.6785429", "0.6782954" ]
0.8805984
0
Returns the age of this user profile in days.
public function getProfileAge() { return (TIME_NOW - $this->registrationDate) / 86400; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getAge()\n {\n if ($this->age) {\n return $this->age;\n }\n\n $this->age = $this->getBirthDate()->diff(new \\DateTime())->y;\n\n return $this->age;\n }", "public function getAgeAttribute()\n\t{\n\t\treturn now()->diffInYears($this->birthdate);\n\t}", "public function getPasswordAge()\n {\n $date = \\MUtil_Date::ifDate(\n $this->_getVar('user_password_last_changed'),\n array(\\Gems_Tracker::DB_DATETIME_FORMAT, \\Gems_Tracker::DB_DATE_FORMAT, \\Zend_Date::ISO_8601)\n );\n if ($date instanceof \\MUtil_Date) {\n return abs($date->diffDays());\n } else {\n return 0;\n }\n }", "public function getAge()\n\t{\n\t\t$date_birthday = $this->getAnswer('birthday');\n\t\t$date_birthday = convert_date_to_age($date_birthday);\n\t\treturn $date_birthday;\n\n\t}", "public function getAge()\n {\n // future dates have no age\n return max(0, $this->difference(self::now())->getYears());\n }", "public function age()\r\n {\r\n\r\n // Note that A DOB object is based on a date-range and the exact date is\r\n // usually unknown so for age calculation the the middle of the range is\r\n // assumed to be the real date-of-birth.\r\n\r\n if (!empty($this->date_range))\r\n {\r\n $dob = $this->date_range->middle();\r\n $today = new DateTime('now', new DateTimeZone('GMT'));\r\n\r\n $diff = $today->format('Y') - $dob->format('Y');\r\n\r\n if ($dob->format('z') > $today->format('z'))\r\n {\r\n $diff -= 1;\r\n }\r\n\r\n return $diff;\r\n }\r\n return;\r\n }", "public function getAge() {\n\t\tif ($this->birthday) {\n\t\t\t// split date\n\t\t\t$year = $month = $day = 0;\n\t\t\t$optionValue = explode('-', $this->birthday);\n\t\t\tif (isset($optionValue[0])) $year = intval($optionValue[0]);\n\t\t\tif (isset($optionValue[1])) $month = intval($optionValue[1]);\n\t\t\tif (isset($optionValue[2])) $day = intval($optionValue[2]);\n\t\t\t\n\t\t\t// calc\n\t\t\tif ($year) {\n\t\t\t\t$age = DateUtil::formatDate('%Y', null, false, true) - $year;\n\t\t\t\tif (intval(DateUtil::formatDate('%m', null, false, true)) < intval($month)) $age--;\n\t\t\t\telse if (intval(DateUtil::formatDate('%m', null, false, true)) == intval($month) && DateUtil::formatDate('%e', null, false, true) < intval($day)) $age--;\n\t\t\t\treturn $age;\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn 0;\n\t}", "public function getAge() {\n date_default_timezone_set('America/New_York');\n list($year,$month,$day) = explode(\"-\",$this->birthDate);\n $year_diff = date(\"Y\") - $year;\n $month_diff = date(\"m\") - $month;\n $day_diff = date(\"d\") - $day;\n if ($month_diff < 0 || ($month_diff == 0 && $day_diff < 0)) {\n $year_diff--;\n }\n return $year_diff;\n }", "public function getAgeAttribute ()\n\t{\n\t\treturn \\Carbon\\Carbon::parse($this->birthdate)->age;\n\t}", "public function getMaxAgeInDays() {\n\t\treturn $this->maxAgeInDays;\n\t}", "private function getAge()\n {\n return $this->getAge($this->dob);\n }", "public function age(){\n return $this->dob->age;\n }", "public function getAge()\n {\n //function qui calcule l'age de leleve \n $now = new \\DateTime('now');\n $age = $this->getDateNaissance();\n $difference = $now->diff($age);\n\n return $difference->format('%y Ans');\n }", "public function age() {\n $years = ((integer) date('Y')) - $this->year;\n\n if (((integer) date('n')) < $this->month) {\n $years -= 1;\n }\n else if (((integer) date('n')) == $this->month) {\n if (((integer) date('j')) < $this->day) {\n $years -= 1;\n }\n }\n\n return $years;\n }", "public function getUserAge();", "public function getAge() {\n return $this->age;\n }", "public function getAge()\n {\n $this->checkJMBG();\n\n $timestamp = $this->getBirthdayTimeStamp();\n $now = time();\n $diff = $now - $timestamp;\n return date('Y', $diff) - 1970;\n }", "public function getAge()\n {\n return $this->age;\n }", "public function getAge()\n {\n return $this->age;\n }", "public function getAge()\n {\n return $this->age;\n }", "public function getAge()\n {\n return $this->age;\n }", "public function getAge()\n {\n return $this->age;\n }", "public function getAge()\n {\n return $this->age;\n }", "public function getAge() {\n // Age of oldest entry.\n $old = $this->database->select('watchdog', 'w')\n ->fields('w', ['timestamp'])\n ->orderBy('wid', 'ASC')\n ->range(0, 1)\n ->execute()\n ->fetchField();\n\n // Age of newest entry.\n $new = $this->database->select('watchdog', 'w')\n ->fields('w', ['timestamp'])\n ->orderBy('wid', 'DESC')\n ->range(0, 1)\n ->execute()\n ->fetchField();\n\n // If two different days...\n if (date('Y-m-d', $old) != date('Y-m-d', $new)) {\n return $this->t(\"Age of messages: From @from to @to (@days days)\", [\n '@from' => date('Y-m-d', $old),\n '@to' => date('Y-m-d', $new),\n '@days' => round(($new - $old) / 86400, 2),\n ]);\n }\n // Same day; don't calculate number of days.\n return $this->t(\"Age of messages: From @from to @to\", [\n '@from' => date('Y-m-d', $old),\n '@to' => date('Y-m-d', $new),\n ]);\n }", "public function getAgeAttribute() {\n return Carbon::createFromDate($this->attributes['DOB'])->age;\n }", "public function getAge()\n {\n\n return $this->age;\n \n }", "public function getPassengerAge(){\n\t\t\n\t\treturn $this->passengerAge;\n\t}", "public function getAge()\n {\n if ($dob = $this->getDob()) {\n $now = new \\Datetime('now');\n $today['month'] = $now->format('m');\n $today['day'] = $now->format('d');\n $today['year'] = $now->format('Y');\n\n $years = $today['year'] - $dob->format('Y');\n\n if ($today['month'] <= $dob->format('m')) {\n if ($dob->format('m') == $today['month']) {\n if ($dob->format('d') > $today['day'])\n $years--;\n } else\n $years--;\n }\n\n return $years;\n }\n\n return null;\n }", "public function getage()\n {\n return $this->age;\n }", "public function get_age($dob){\n\t\treturn floor((time() - strtotime($dob))/31556926);\n\t}", "public function determineAge() {\n $timeInOneYear = 365.256 * 24 * 60 * 60;\n $yearsofAge = floor((strtotime(date('Y')) - strtotime($this->year.'-12-31'))/ $timeInOneYear);\n\n $this->age = $yearsofAge;\n\n return (int) $yearsofAge;\n }", "function getAge() {\n return $this->age;\n }", "public function getMaxAge()\n {\n return $this->maxAge;\n }", "public function getMaxAge()\n {\n return $this->maxAge;\n }", "public function getMaxAge(): int {\n return $this->configuration['max_age'];\n }", "public function getAgeAttribute($value)\n {\n return Carbon::parse($this->birthdate)->age;\n }", "public function getMaxAge()\n\t{\n\t\treturn $this->maxage;\n\t}", "public function getAge()\n {\n return 14;\n }", "public function getAge()\n {\n return 14;\n }", "public function getAge() { return $this->age; }", "public function getMaxAge()\n {\n return $this->expiry;\n }", "public function getAge();", "public function getAge();", "public function birthday(bool $age = false)\n {\n // If age is requested calculate it\n if ($age) {\n // Create dates\n $birthday = date_create($this->birthday);\n $now = date_create(date('Y-m-d'));\n\n // Get the difference\n $diff = date_diff($birthday, $now);\n\n // Return the difference in years\n return (int) $diff->format('%Y');\n }\n\n // Otherwise just return the birthday value\n return $this->birthday;\n }", "public function getAgeFrom() {\n return $this->ageFrom;\n }", "public function getAge()\n {\n return 20;\n }", "public function getDaysusage()\n {\n return $this->daysusage;\n }", "static function calculateAge($birthDate) {\n if (empty($birthDate)) {\n return 0;\n }\n $birthDay = new DateTime($birthDate);\n $toDay = new DateTime(date('Y-m-d'));\n $dateDiff = $toDay->diff($birthDay);\n $age = $dateDiff->y;\n return $age;\n }", "public function getEdad()\n {\n $dateOfBirth = $this->getFechaNac();\n $today = date(\"Y-m-d\");\n $diff = date_diff(date_create($dateOfBirth), date_create($today));\n return (int)$diff->format('%y');\n\n }", "public function calcAgeCalculatesAgeOfTimestampDataProvider() {}", "public function getMaxAge()\n {\n\n }", "function get_age($date_of_birth) //day-month-year\n\t\t{\n\t\t\t$bdate = explode(\"-\", $date_of_birth);\n\t\t\t$day\t= isset($bdate[0]) ? (int)$bdate[0] : 0;\n\t\t\t$month\t= isset($bdate[1]) ? (int)$bdate[1] : 0;\n\t\t\t$year\t= isset($bdate[2]) ? (int)$bdate[2] : 0;\n\t\t\tif ($year)\n\t\t\t{\n\t\t\t\t$age = date(\"Y\") - $year;\n\t\t\t\tif (($month > date(\"m\")) || ($month == date(\"m\") && date(\"d\") < $day))\n\t\t\t\t{\n\t\t\t\t\t$age -= 1;\n\t\t\t\t}\n\t\t\t\treturn $age;\n\t\t\t}\n\t\t\treturn false;\n\t\t}", "public function getDays()\n {\n return $this->getXml()->getElementsByTagName('AgeDays')->item(0)->nodeValue;\n }", "function age($date)\n{\n\t// PHP décompose la date saisie dans l'ordre défini\n list($annee, $mois, $jour) = explode ('/', $date);\n $TSN = strtotime($annee.\"/\".$mois.\"/\".$jour);\n $TS = strtotime(date(\"Y/m/d\"));\n\n $Age = ($TS-$TSN)/(365*3600*24);\n return round($Age);\n}", "public function getageEu()\n {\n return $this->age_eu;\n }", "function getAge($birthday)\n{\n if (strtotime($birthday)) {\n $date = new DateTime($birthday);\n $now = new DateTime();\n $interval = $now->diff($date);\n return $interval;\n }\n}", "public function getAgeTimeUnit()\n {\n return $this->ageTimeUnit;\n }", "public function sessionAge()\n {\n if (!isset($_SESSION[PMF_SESSION_ID_TIMESTAMP])) {\n return 0;\n }\n\n return ($_SERVER['REQUEST_TIME'] - $_SESSION[PMF_SESSION_ID_TIMESTAMP]) / 60;\n }", "public function getDifferenceInDays();", "public function getUserAge(ConnectionInterface $con = null)\n {\n if ($this->aUserAge === null && (($this->age !== \"\" && $this->age !== null))) {\n $this->aUserAge = ChildAgeQuery::create()->findPk($this->age, $con);\n /* The following can be used additionally to\n guarantee the related object contains a reference\n to this object. This level of coupling may, however, be\n undesirable since it could result in an only partially populated collection\n in the referenced object.\n $this->aUserAge->addUsers($this);\n */\n }\n\n return $this->aUserAge;\n }", "public function getAge(int $unit = self::AGE_SECONDS) : float {\n switch ($unit) {\n default:\n return $this->age;\n case self::AGE_MINUTES:\n return $this->age / 60;\n case self::AGE_HOURS:\n return $this->age / 60 / 60;\n case self::AGE_DAYS:\n return $this->age / 60 / 60 / 24;\n }\n }", "protected function accountAge()\n\t{\n\t\t$joinDate = new \\DateTime($this->store['join_date']);\n\t\t$currentDate = new \\DateTime();\n\t\t$interval = $joinDate->diff($currentDate);\n\t\t$interval = $interval->y;\n\t\t$this->score += ($interval * $this->config->data()['accountAge']);\n\t}", "public function getDaysOfRetention()\n {\n return $this->daysOfRetention;\n }", "public function AverageDailySteps() {\n\t\t\n\t\tif (!empty($this->profil)) {\n\t\t\n\t\t\treturn $this->profil['user']['averageDailySteps'];\n\t\t}\n\t}", "private function ageChaton() { \n $datenow = new DateTime(\"now\");\n $result = date('Y-m-d', strtotime('-365 day')); //-12 mois\n\n return $result;\n }", "public function expiredDays(){\n if(!$this->hasExpired())\n return 0;\n\n $expire = $this->expires_on->copy();\n $now = Carbon::now();\n $expire->setTime(0,0,0);\n $now->setTime(0,0,0);\n return $expire->diffInDays($now);\n }", "public function cheffism_age_function($atts) {\n extract(shortcode_atts(array(\n 'date' => '11/04/1985',\n 'format' => 'dd/MM/YYYY'\n ), $atts));\n\n //explode the date to get month, day and year\n $date = explode(\"/\", $date);\n //get age from date or birthdate\n $age = (date(\"md\", date(\"U\", mktime(0, 0, 0, $date[1], $date[0], $date[2]))) > date(\"md\")\n ? ((date(\"Y\") - $date[2]) - 1)\n : (date(\"Y\") - $date[2]));\n\n return $age;\n }", "function findAge(\\DateTimeInterface $birthDate)\n {\n return $birthDate->diff(new DateTime())->y;\n }", "public function calculateAge($student_id){\n\t\t\t$table='student';\n\t\t\t$student=$this->findById($student_id, $table);\n\t\t\t$birth_date=$student['birth_date'];\n\t\t\t$get_birth_year=explode('/', $birth_date);\n\t\t\t$birth_year=$get_birth_year['2'];\n\t\t\t$current_year=date('Y');\n\t\t\t$age=$current_year - $birth_year;\n\t\t\treturn $age;\n\t\t}", "public function getDays() {\r\n\t\treturn $this->days;\r\n\t}", "public function getageEc()\n {\n return $this->age_ec;\n }", "public function getDifferenceInYears();", "public function setAge($v)\n {\n if ($v !== null) {\n $v = (string) $v;\n }\n\n if ($this->age !== $v) {\n $this->age = $v;\n $this->modifiedColumns[UserTableMap::COL_AGE] = true;\n }\n\n if ($this->aUserAge !== null && $this->aUserAge->getAge() !== $v) {\n $this->aUserAge = null;\n }\n\n return $this;\n }", "function ageCalculator($dob)\n{\n\tif(!empty($dob))\n\t{\n\t\t$birthdate = new DateTime($dob);\n\t\t$today = new DateTime('today');\n\t\t$age = $birthdate->diff($today)->y;\n\t\treturn $age;\n\t}\n\telse\n\t{\n\t\treturn 0;\n\t}\n}", "function calculAge($date){\n\n$timestamp = strtotime($date); // en seconde\nreturn ceil((time() - $timestamp) / (60 * 60 * 24 * 365)); //calcul de l'age en arrondit\n}", "public function getUserBirthday()\n {\n $result = $this->getUserAttribute(static::ATTRIBUTE_BIRTHDAY);\n\n if (!empty($result)) {\n return date('d.m.Y', strtotime($result));\n }\n\n return $result;\n }", "function getAge($birthDate){\n $birthDate = explode('/', $birthDate);\n $birthYear = $birthDate[2];\n $date = date('Y');\n $age = date_diff(date_create($birthYear), date_create($date));\n \n return $age->format('%Y');\n}", "public function getUserDateOfBirth () {\n\t\treturn ($this->userDateOfBirth);\n\t}", "function GetAge($dob) \r\n\t\t\t\t\t\t\t\t\t{ \r\n\t\t\t\t\t\t\t\t\t\t$dob=explode(\"/\",$dob); \r\n\t\t\t\t\t\t\t\t\t\t$curMonth = date(\"m\");\r\n\t\t\t\t\t\t\t\t\t\t$curDay = date(\"j\");\r\n\t\t\t\t\t\t\t\t\t\t$curYear = date(\"Y\");\r\n\t\t\t\t\t\t\t\t\t\t$age = $curYear - $dob[2]; \r\n\t\t\t\t\t\t\t\t\t\tif($curMonth<$dob[1] || ($curMonth==$dob[1] && $curDay<$dob[0])) \r\n\t\t\t\t\t\t\t\t\t\t\t$age--; \r\n\t\t\t\t\t\t\t\t\t\treturn $age; \r\n\t\t\t\t\t\t\t\t\t}", "function ageCalculator($dob){\n if(!empty($dob)){\n $birthdate = new DateTime($dob);\n $today = new DateTime('today');\n $age = $birthdate->diff($today)->y;\n return $age;\n }else{\n return 0;\n }\n}", "public function getIdPersonnage() {\n return intval($this->idPersonnage);\n }", "public function getIdPersonnage() {\n return intval($this->idPersonnage);\n }", "function calcularIdade($birthDate){\n\n\t\t\t\t//explode the date to get month, day and year\n\t\t\t\t$birthDate = explode(\"/\", $birthDate);\n\n\t\t\t\t//get age from date or birthdate\n\t\t\t\t$age = (date(\"md\", date(\"U\", mktime(0, 0, 0, $birthDate[0], $birthDate[1], $birthDate[2]))) > date(\"md\") ? ((date(\"Y\") - $birthDate[2]) - 1) : (date(\"Y\") - $birthDate[2]));\n\t\t\t\treturn $age;\n\t\t}", "public function getTotalDifferenceInDays();", "public function getDays()\n\t{\n\t\treturn $this->days;\n\t}", "public static function getAge($date) {\r\n $d = new DateTime($date);\r\n $t = new DateTime(self::currentDateTime(self::datePattern));\r\n $interval = $t->diff($d);\r\n \r\n $years = $interval->format(\"%Y\");\r\n if($years == date(self::dateYear,time()))\r\n {\r\n return 0;\r\n }\r\n else\r\n {\r\n return $years;\r\n } \r\n }", "public static function get_cache_age()\n {\n return self::$cache_age;\n }", "public function getLengthInDays() : int\n\t{\n\t\treturn Date::diff( $this->End, $this->Start );\n\t}", "function getDayOfBirth() {\n global $USER;\n\t$dayOfBirth = date(\"d\", $USER['dob']);\n\treturn $dayOfBirth;\n}", "public function getGroupMaxAge() {\n\t\treturn $this->_group_max_age;\n\t}", "public function remainingDays(){\n if ($this->hasExpired()) {\n return (int) 0;\n }elseif($this->isIndefinied()){\n return (int) -1;\n }\n\n return (int) Carbon::now()->diffInDays(Carbon::parse($this->expires_on));\n }", "public function days()\n {\n return $this->arrival->diffInDays($this->departure);\n }", "public function getExpirationDays()\n {\n return $this->driver->getExpirationDays();\n }", "public static function calculateAge( $birthDate = false )\n\t{\n\t\tif( !$birthDate )\n\t\t{\n\t\t\treturn false;\n\t\t}\n\n\t\t//explode the date to get month, day and year\n\t\t$birthDate = explode( \"-\", $birthDate );\n\n\t\tif( count( $birthDate ) != 3 )\n\t\t{\n\t\t\treturn false;\n\t\t}\n\n\t\t//get age from date or birthDate\n\t\t$age = ( date( \"md\", date( \"U\", mktime( 0, 0, 0, $birthDate[ 0 ], $birthDate[ 1 ], $birthDate[ 2 ] ) ) ) > date( \"md\" ) ? ( ( date( \"Y\" ) - $birthDate[ 0 ] ) - 1 ) : ( date( \"Y\" ) - $birthDate[ 0 ] ) );\n\n\t\treturn (int)$age;\n\t}", "public function getBirthday()\n {\n return $this->birthday;\n }", "public function getBirthday()\n {\n return $this->birthday;\n }", "public function getBirthday()\n {\n return $this->birthday;\n }", "public function getBirthday()\n {\n return $this->birthday;\n }", "public function getBirthday()\n {\n return $this->birthday;\n }", "protected function getDaysRemainingAttribute()\n {\n $enddate = Carbon::parse($this->expired_at);\n $now = Carbon::now();\n\n if($now >= $enddate) {\n return 0;\n }\n\n return $now->diffInDays($enddate) . ' days remaining';\n }" ]
[ "0.7180762", "0.7167363", "0.71351284", "0.71149695", "0.70875096", "0.7073992", "0.7034369", "0.70272857", "0.7022898", "0.69748104", "0.69419694", "0.6866836", "0.67942", "0.67229515", "0.6714715", "0.6702986", "0.6673376", "0.66406804", "0.66406804", "0.66406804", "0.66406804", "0.66406804", "0.66406804", "0.66103905", "0.6609777", "0.65668565", "0.6554375", "0.6519524", "0.64802295", "0.64569646", "0.6430732", "0.6355004", "0.62892663", "0.62892663", "0.6245853", "0.6244531", "0.62083894", "0.620691", "0.620691", "0.61323726", "0.609705", "0.606299", "0.606299", "0.600915", "0.59773", "0.59385496", "0.5889398", "0.5870226", "0.58606464", "0.5833639", "0.5822229", "0.58120745", "0.5796089", "0.57531077", "0.5752619", "0.57466567", "0.57322496", "0.57248795", "0.571492", "0.571074", "0.56772757", "0.567497", "0.56711435", "0.56340617", "0.5625757", "0.5585455", "0.5585006", "0.5571684", "0.5569748", "0.5568959", "0.5568688", "0.5562308", "0.55503714", "0.5544433", "0.5543272", "0.5537177", "0.55357146", "0.55259883", "0.551363", "0.55127126", "0.551147", "0.551147", "0.55042404", "0.5483665", "0.54827774", "0.54319394", "0.5407111", "0.5379431", "0.53714544", "0.53661585", "0.53640366", "0.53626215", "0.5355366", "0.53548807", "0.53532887", "0.53532887", "0.53532887", "0.53532887", "0.53532887", "0.535215" ]
0.7789496
0
Returns true, if the active user can send emails to this user.
public function canMail() { if ($this->ignoredUser || ($this->onlyBuddyCanMail && !UserProfile::isBuddy($this->userID)) || (!$this->userCanMail && !$this->onlyBuddyCanMail)) { return false; } return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function isMailingEnabled()\n {\n if ($this->user->email === \"\") {\n return false;\n }\n return true;\n }", "protected function shouldSendEmail(): bool\r\n {\r\n return $this->sendEmail === Boolean::YES;\r\n }", "public function sendEmail()\n {\n /* @var $user User */\n $user = User::findOne([\n 'status' => User::STATUS_ACTIVE,\n 'email' => $this->email,\n ]);\n\n if ($user) {\n if (!User::isPasswordResetTokenValid($user->password_reset_token)) {\n $user->generatePasswordResetToken();\n }\n\n if ($user->save()) {\n\t\t\t\t$mail = new UserMails;\n\t\t\t\treturn $mail->passwordEmail($user);\n }\n }\n\n return false;\n }", "public function isSendmail() {\n\t\t$this->getSendmail();\n\t}", "public function should_send_email() {\n\t\t$options = get_option( 'mylisting_notifications', [] );\n\t\t$notification = $this->get_key();\n\t\t$should_send = true;\n\n\t\tif ( isset( $options[ $notification ], $options[ $notification ]['send_email'] ) && $options[ $notification ]['send_email'] === 'disabled' ) {\n\t\t\t$should_send = false;\n\t\t}\n\n\t\treturn apply_filters( sprintf( 'mylisting/emails/%s:enabled', $notification ), $should_send );\n\t}", "public function isSendmail()\n {\n }", "public function canContactApplicantBySMSAndEmail()\n {\n return $this->canContactApplicantBySMSAndEmail;\n }", "public function shouldSend(User $user, string $channel): bool\n {\n return ! $user->is_active && $user->should_receive_email;\n }", "public function canSend()\n {\n $flag = intval(setting(\"mail_notify_{$this->getTemplateTag()}\"));\n\n return !!$flag;\n }", "protected function checkMailCanBeSent()\n {\n if (!$this->checkNotificationCanBeSent()) {\n return false;\n }\n\n if (!$this->checkEmailIsValid()) {\n return false;\n }\n\n if (!$this->checkUserExpectsNotification()) {\n return false;\n }\n\n if (!$this->checkMailContent()) {\n return false;\n }\n\n return true;\n }", "public function send(): bool{\n \n return ($this->smtp) ? $this->_mail->send() : mail(implode(\", \", $this->_to), $this->_subject, $this->_body, $this->getFormatedHeaders());\n\n }", "public function sendEmail()\n {\n $user = User::findOne([\n 'store_id' => Yii::$app->storeSystem->getId(),\n 'email' => $this->email,\n 'status' => User::STATUS_INACTIVE\n ]);\n\n if ($user === null) {\n return false;\n }\n\n $content = CommonHelper::render(Yii::getAlias('@common/mail/emailVerify-html.php'), [\n 'user' => $user,\n ], $this, Yii::getAlias('@common/mail/layouts/html.php'));\n\n Yii::$app->mailSystem->send($this->email, Yii::t('app', 'Resend verification email'), $content);\n return true;\n }", "public function _isEnabledShipmentsEmail()\r\n {\r\n return ($this->scopeConfig->getValue(self::EMAIL_SHIPMENTS)) ? true:false ;\r\n }", "public function hasActiveUser()\n {\n return $this->user && $this->user->active;\n }", "protected function sendActivationEmail($user) {\n return true;\n }", "public function isEnableCustomerEmail ()\n {\n return $this->scopeConfig->isSetFlag(\n 'b2bregistration/email_setting/customer_email_enable',\n ScopeInterface::SCOPE_STORE\n );\n }", "public function sendActivationEmail() {\n $emailProperties = $this->gatherActivationEmailProperties();\n\n /* send either to user's email or a specified activation email */\n $activationEmail = $this->controller->getProperty('activationEmail',$this->profile->get('email'));\n $subject = $this->controller->getProperty('activationEmailSubject',$this->modx->lexicon('register.activation_email_subject'));\n return $this->login->sendEmail($activationEmail,$this->user->get('username'),$subject,$emailProperties);\n }", "protected function sendEmail()\n {\n // Don't send to themself\n if ($this->userFrom->id == $this->userTo->id)\n {\n return false;\n }\n \n // Ensure they hae enabled emails\n if (! $this->userTo->options->enableEmails)\n {\n return false;\n }\n \n // Ensure they are not online\n if ($this->userTo->isOnline())\n {\n return false;\n }\n \n // Send email\n switch ($this->type)\n {\n case LOG_LIKED:\n if ($this->userTo->options->sendLikes)\n {\n $emailer = new Email('Liked');\n $emailer->user = $this->userTo;\n $emailer->sendImage($this->image->id, $this->userFrom);\n }\n break;\n \n case LOG_ACCEPTED:\n if ($this->userTo->options->sendProcessing)\n {\n $emailer = new Email('Image Accepted');\n $emailer->user = $this->userTo;\n $emailer->sendImage($this->image->id);\n }\n break;\n \n case LOG_REJECTED:\n if ($this->userTo->options->sendProcessing)\n {\n $emailer = new Email('Image Rejected');\n $emailer->user = $this->userTo;\n $emailer->sendImage($this->image->id);\n }\n break;\n }\n }", "public function getUseCertifiedMailMail() : bool\n\t{\n\t\treturn $this->useCertifiedMail;\n\t}", "function checkPermissions() {\n\t\tglobal $wgEnableEmail, $wgEnableUserEmail, $wgUser, $wgOut;\n\n\t\t# Check email and user permissions for security.\n\t\tif ( !( $wgEnableEmail && $wgEnableUserEmail ) ) {\n\t\t\t$wgOut->showErrorPage( \"emailnotenabled\", \"emailnotenabledtext\" );\n\t\t\treturn false;\n\t\t}\n\n\t\tif ( !$wgEnableEmail ) {\n\t\t\t$wgOut->showErrorPage( \"emailnotenabled\", \"emailnotenabledtext\" );\n\t\t\treturn false;\n\t\t}\n\n\t\tif ( !$wgUser->canSendEmail() ) {\n\t\t\twfDebug( \"User can't send.\\n\" );\n\t\t\t$wgOut->showErrorPage( \"mailnologin\", \"mailnologintext\" );\n\t\t\treturn false;\n\t\t}\n\n\t\tif ( $wgUser->isBlockedFromEmailUser() ) {\n\t\t\t// User has been blocked from sending e-mail. Show the std blocked form.\n\t\t\twfDebug( \"User is blocked from sending e-mail.\\n\" );\n\t\t\t$wgOut->blockedPage();\n\t\t\treturn false;\n\t\t}\n\n\t\treturn true;\n\t}", "private function checkEmailSettings(): bool\n {\n return (is_array($this->properties['mail_recipients']) || is_array($this->properties['mail_bcc']));\n }", "public function isEnableAdminEmail ()\n {\n return $this->scopeConfig->isSetFlag(\n 'b2bregistration/admin_notification/admin_notification_enable',\n ScopeInterface::SCOPE_STORE\n );\n }", "public function isEmailRegistered()\n {\n return $this->isEmailAvailable($this->getEmailAddress());\n\n }", "public function isEnabled(): bool\n\t{\n\t\tif (!Loader::includeModule('messageservice'))\n\t\t{\n\t\t\treturn false;\n\t\t}\n\n\t\t$sender = SmsManager::getSenderById(self::MESSAGESERVICE_SENDER_ID);\n\t\tif (is_null($sender))\n\t\t{\n\t\t\treturn false;\n\t\t}\n\n\t\treturn $sender->isAvailable();\n\t}", "public function hasEmailAddress()\n {\n return $this->_hasVar('user_email') && $this->_getVar('user_email');\n }", "public function send() {\n\t\t//$isActive = EmailHelper::isActive('string parameter');\n\n\t\t// this is the refactored external static method\n\t\t$isActive = forward_static_call_array(\n\t\t\tarray($this->emailHelperClass, 'isActive'),\n\t\t\tarray('string parameter'));\n\n\t\tif($isActive) {\n\t\t\t// send logic here\n\t\t\treturn true;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}", "public function shouldBeSentViaMail($notifiable): bool\n {\n return true;\n }", "public function getAllowSendToCustomer()\n {\n return $this->allow_send_to_customer;\n }", "private function shouldSend($user)\n {\n $activation = $this->activationRepo->getActivation($user);\n return $activation === null || strtotime($activation->created_at) + 60 * 60 * $this->resendAfter < time();\n }", "public function sendOtp(): bool\n {\n $appName = Yii::$app->name;\n $otp = $this->generateOtp();\n\n return Yii::$app->mailer->compose()\n ->setFrom(Yii::$app->params['mailer.from'])\n ->setTo($this->getEmail())\n ->setSubject(\"OTP confirmations - {$appName}\")\n ->setHtmlBody(\"Hi, <br/> Please use the following OTP <b>{$otp}</b> to verify your email id.\")\n ->queue();\n }", "public function hasEmail() {\n return $this->_has(4);\n }", "public function canUserAssignUsage()\n {\n $user = $this->getUser();\n\n return $user->isAdmin || \\in_array('tl_news::usage', $user->alexf, true);\n }", "private function smtpSend()\n { \n if(!$this->doConnect())\n return false;\n \n if( ! $this->smtpFrom())\n return false;\n \n foreach($this->rcptTo as $recipient)\n $this->smtpRecipient($recipient);\n\n\t\tif (count($this->rcptCc) > 0)\n\t\t{\n \tforeach($this->rcptCc as $recipient)\n \t$this->smtpRecipient($recipient);\n\t\t}\n\t\t\n\t\tif (count($this->rcptBcc) > 0)\n\t\t{\n\t foreach($this->rcptBcc as $recipient)\n\t $this->smtpRecipient($recipient);\n\t\t}\n\n if( ! $this->smtpData() )\n return false;\n \n $this->smtpClose();\n \n return true;\n }", "public function sendInvitationEmail(): bool\n {\n $invitedUser = new User(null, null, $this->email);\n $folderOwner = new User($this->folder->ownerId);\n\n if (!$folderOwner) {\n return false;\n }\n\n $renderOptions = [\n 'owner_username' => $folderOwner->name,\n 'folder_title' => $this->folder->title,\n 'join_link' => $this->getJoinLink()\n ];\n\n if ($invitedUser->exists()) {\n $renderOptions['invited_username'] = $invitedUser->name;\n }\n\n $message = Renderer::render('email.php', $renderOptions, null);\n\n $mailer = Mailer::instance();\n\n return $mailer->send(\"[CodeX Notes] Join folder – \" . $this->folder->title, Config::get('TEAM_EMAIL'), $this->email, $message);\n }", "public function send()\n {\n if (!$this->isMailingEnabled()) {\n return false;\n }\n\n Yii::$app->user->switchIdentity($this->user);\n self::switchLanguage($this->user);\n\n $notifications = $this->renderNotifications();\n $activities = $this->renderActivities();\n\n // Check there is content to send\n if ($activities['html'] !== '' || $notifications['html'] !== '') {\n\n try {\n $mail = Yii::$app->mailer->compose([\n 'html' => '@humhub/modules/content/views/mails/Update',\n 'text' => '@humhub/modules/content/views/mails/plaintext/Update'\n ], [\n 'activities' => $activities['html'],\n 'activities_plaintext' => $activities['text'],\n 'notifications' => $notifications['html'],\n 'notifications_plaintext' => $notifications['text'],\n ]);\n\n $mail->setFrom([Yii::$app->settings->get('mailer.systemEmailAddress') => Yii::$app->settings->get('mailer.systemEmailName')]);\n $mail->setTo($this->user->email);\n $mail->setSubject($this->getSubject());\n if ($mail->send()) {\n return true;\n }\n } catch (\\Exception $ex) {\n Yii::error('Could not send mail to: ' . $this->user->email . ' - Error: ' . $ex->getMessage());\n }\n }\n\n return false;\n }", "public function hasActiveSubscription()\n {\n return $this->user->hasActiveSubscription();\n }", "public function is_email() {\n return $this->is_email;\n }", "public function checkUserAccess() {\n $conversation = Conversation::find($this->conversation_id);\n if (!$conversation->isConversationMember($this->user_id)) {\n $this->addError('user_id', 'User can\\'t send messages to this conversation.');\n }\n }", "public function isSMTP()\n {\n }", "function canSendWelcomeMessage($user) {\n return $user->isPeopleManager() || $user->isCompanyManager($this->getCompany());\n }", "public function send(UserInterface $user = null): bool\n\t{\n\t\tif (empty($user)) {\n\t\t\t$this->error = lang('Auth.error.noUserToActivate');\n\n\t\t\treturn false;\n\t\t}\n\n\t\t$email = service('email');\n\t\t$emailConfig = config(Email::class);\n\n\t\t$settings = $this->getSettings();\n\n\t\t$prepareData = $settings->prepareViewData;\n\t\t$data = $prepareData();\n\t\t$data['hash'] = $user->getActivateToken();\n\n\t\t$sent = $email->setFrom($settings->fromEmail ?? $emailConfig->fromEmail, $settings->fromName ?? $emailConfig->fromName)\n\t\t\t->setTo($user->getEmail())\n\t\t\t->setSubject(lang('Auth.email.activate.subject'))\n\t\t\t->setMessage(view($this->config->views['emailActivate'], $data))\n\t\t\t->setMailType('html')\n\t\t\t->send();\n\n\t\tif (!$sent) {\n\t\t\t$this->error = lang('Auth.error.activationSendFailed', [$user->getEmail()]);\n\n\t\t\treturn false;\n\t\t}\n\n\t\treturn true;\n\t}", "public function authorize(): bool\n {\n return $this->user()->can('create_contact');\n }", "public function isMail()\n {\n }", "public function send(): bool\n {\n $this->lastError = '';\n\n try {\n if (!$this->mailObj->send()) {\n $this->lastError = $this->mailObj->ErrorInfo;\n }\n } catch (\\Throwable $err) {\n $this->lastError = $err->getCode() . ': ' . $err->getMessage();\n }\n\n return empty($this->lastError);\n }", "public function send_user_mail( $setting ) {\n\t\tif ( isset( $setting['use-user-email'] ) && ! empty( $setting['use-user-email'] ) ) {\n\t\t\tif ( filter_var( $setting['use-user-email'], FILTER_VALIDATE_BOOLEAN ) ) {\n\t\t\t\tif ( isset( $setting['user-email-title'] ) && isset( $setting['user-email-editor'] ) ) {\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn false;\n\t}", "public function sendEmail()\n {\n /* @var $user User */\n $user = User::findOne([\n 'u_email' => $this->username,\n ]);\n\n if ($user) {\n if (!User::isPasswordResetTokenValid($user->password_reset_token)) {\n $user->generatePasswordResetToken();\n }\n\n if ($user->save(false)) {\n \t$userName = $user->u_name;\n $userEmail = $user->u_email;\n \t \n \tif(!empty($userName) && !empty($userEmail)) {\n $subject = \"[Price Genius]: Your Reset Password Request\";\n $resetLink = Yii::$app->urlManager->createAbsoluteUrl(['api/reset-password', 'token' => $user->password_reset_token]);\n $content = ['userName' => $userName, 'resetLink' => $resetLink];\n $promotionName = \"Forgot Password\";\n return SendMail::sendSupportMail($user->u_email, $user->u_name, $subject, $content, $promotionName);\n \t\t}\n }\n \n }\n return false;\n }", "public function checkEMailSettings ()\n {\n if (self::$cms_type == 'BlackCat') {\n return ((CATMAILER_ROUTINE == 'smtp') && (CATMAILER_SMTP_USERNAME != '') && (CATMAILER_SMTP_PASSWORD != ''));\n }\n else {\n return ((WBMAILER_ROUTINE == 'smtp') && (WBMAILER_SMTP_USERNAME != '') && (WBMAILER_SMTP_PASSWORD != ''));\n }\n }", "public function isCheckEmail()\n {\n if( (!$this -> zgloszePozniej) && ($this -> emailAtt2User == '') ) :\n return false;\n endif;\n return true;\n }", "public function isSubscribed()\n {\n // TODO there seems to be an inconsistency when getting database records via Repository or via ObjectStorage\n // TODO when getting via Repository, a Typo3bb-FrontendUser is returned\n // TODO when getting via ObjectStorage, IglarpTemplate-FrontendUser is returned\n $user = FrontendUserUtility::getCurrentUser();\n if (is_null($user)) {\n return false;\n } else {\n return $this->subscribers->contains($user);\n }\n }", "public function canSubscribe()\n {\n if ($this->getDateLimitSigningUp() > date('Y-m-d H:i:s') && count($this->getParticipants())<$this->getNbSigningUpMax() && $this->getState()->getId() == 2)\n {\n return true;\n }\n return false;\n }", "protected function useEmailNotifications()\n {\n return true;\n }", "private function validateSender(){\n\t\tglobal $ENABLE_SECURITY;\n\t\tif(in_array($this->sender, $this->validSenders) || $ENABLE_SECURITY == false){\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "public function send()\n\t{\n $user = new User();\n\n // Send mail to user with password if username exists\n return $user->sendEmail(Database::connection(), $_POST['username']);\n }", "function send() {\n\t\ttry {\n\t\t\tif ( ! $this->preSend() )\n\t\t\t\treturn false;\n\n\t\t\t$this->mock_sent[] = array(\n\t\t\t\t'to' => $this->to,\n\t\t\t\t'cc' => $this->cc,\n\t\t\t\t'bcc' => $this->bcc,\n\t\t\t\t'header' => $this->MIMEHeader,\n\t\t\t\t'body' => $this->MIMEBody,\n\t\t\t);\n\n\t\t\treturn true;\n\t\t} catch ( phpmailerException $e ) {\n\t\t\treturn false;\n\t\t}\n\t}", "public function isUserAssignable()\r\n {\r\n return strpos($this->assignRole,'ROLE_USER') !== false ? true : false;\r\n }", "function useSendmail($sendmail = null)\n\t{\n\t\t$this->Sendmail = $sendmail;\n\n\t\tif (!empty ($this->Sendmail)) {\n\t\t\t$this->IsSendmail();\n\t\t\treturn true;\n\t\t} else {\n\t\t\t$this->IsMail();\n\t\t\treturn false;\n\t\t}\n\t}", "public function sendEmail()\n {\n $this->messageBody();\n\n //set from emails\n $this->setFrom();\n\n //set reply to\n $this->addReplyTo();\n\n try {\n $this->mailer->Send();\n return true;\n } catch (Exception $e) {\n throw new Exception( $e->getMessage() );\n }\n }", "public function verifyEmail()\n {\n return $this->getBoolean('verify_email');\n }", "public function has_email() {\r\n $options = get_option( 'myhome_redux' );\r\n if ( array_key_exists( 'mh-agent-email_show', $options ) && empty( $options['mh-agent-email_show'] ) ) {\r\n return false;\r\n }\r\n return ! empty( $this->email );\r\n }", "public function getIsSubscribedToAttribute()\n {\n return $this->subscriptions()\n ->where('user_id', auth()->id())\n ->exists();\n }", "protected function notifyByEmail() {\n\t\t$userlist = array();\n\n\t\t// find all the users with this server listed\n\t\t$users = $this->db->select(\n\t\t\tSM_DB_PREFIX . 'users',\n\t\t\t'FIND_IN_SET(\\''.$this->server['server_id'].'\\', `server_id`) AND `email` != \\'\\'',\n\t\t\tarray('user_id', 'name', 'email')\n\t\t);\n\n\t\tif (empty($users)) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// build mail object with some default values\n\t\t$mail = new phpmailer();\n\n\t\t$mail->From\t\t= sm_get_conf('email_from_email');\n\t\t$mail->FromName\t= sm_get_conf('email_from_name');\n\t\t$mail->Subject\t= sm_parse_msg($this->status_new, 'email_subject', $this->server);\n\t\t$mail->Priority\t= 1;\n\n\t\t$body = sm_parse_msg($this->status_new, 'email_body', $this->server);\n\t\t$mail->Body\t\t= $body;\n\t\t$mail->AltBody\t= str_replace('<br/>', \"\\n\", $body);\n\n\t\t// go through empl\n\t foreach ($users as $user) {\n\t \t// we sent a seperate email to every single user.\n\t \t$userlist[] = $user['user_id'];\n\t \t$mail->AddAddress($user['email'], $user['name']);\n\t \t$mail->Send();\n\t \t$mail->ClearAddresses();\n\t }\n\n\t if(sm_get_conf('log_email')) {\n\t \t// save to log\n\t \tsm_add_log($this->server['server_id'], 'email', $body, implode(',', $userlist));\n\t }\n\t}", "public function authorize(): bool\n {\n return $this->user()->can('update_contact');\n }", "public function isMail(): bool\n\t{\n\t\treturn $this->isOfType( static::TYPE_MAIL );\n\t}", "public function send (): bool\n {\n /**\n * Empfänger*innen vorbereiten.\n */\n $recipients = $this->prepareRecipients();\n /**\n * E-Mail Header vorbereiten.\n */\n $this->prepareHeaders();\n\n /**\n * Mail mit der PHP mail() Funktion abschicken.\n *\n * Der Grund, wieso wir eine eigene Mail Klasse geschrieben haben, liegt genau hier. Wenn aus irgendeinem Grund eine andere Versandart verwendet werden soll (bspw. SMTP oder irgendein gehostet Service, das über eine API angesprochen wird), dann können wir hier die mail() Funktion einfach austauschen - überall, wo wir die Mail Klasse verwenden, brauchen wir aber keinerlei Änderung machen.\n */\n $success = mail($recipients, $this->subject, $this->message, $this->headers);\n\n /**\n * Wenn ein Fehler aufgetreten ist, holen wir uns diesen in die $error Property.\n */\n if (!$success) {\n $this->error = error_get_last();\n }\n\n return $success;\n }", "function userCanChangeEmails( $sessionID ) {\r\n\t\treturn $this->getAccessLevel() > 9;\r\n\t}", "public function send(): bool\n {\n $message = $this->getMessage();\n if ($message->getTo()->count() === 0) {\n throw new RuntimeException(\"E-Mail recipient list can't be empty\");\n }\n $mimeMessage = $this->createContent();\n $message->setBody($mimeMessage);\n $message->setSubject($this->getSubject());\n\n /** @var ModuleOptions $moduleOptions */\n $moduleOptions = $this->getServiceManager()->get(ModuleOptions::class);\n\n //Send email\n $smtp = $moduleOptions->getSmtp();\n\n if (!$smtp['active']) {\n try {\n $transport = new SendmailTransport();\n $transport->send($message);\n return true;\n } catch (Exception $e) {\n throw $e;\n }\n }\n // create SMTP transport\n $options = new SmtpOptions($smtp['options']);\n $transport = new SmtpTransport();\n $transport->setOptions($options);\n\n try {\n $transport->send($message);\n } catch (Exception $e) {\n throw $e;\n }\n return true;\n }", "public function sendEmail()\n {\n /* @var $SysUser SysUser */\n $user = SysUser::findOne([\n 'status' => SysUser::STATUS_ACTIVE,\n 'email' => $this->email,\n ]);\n\n if (!$user) {\n return false;\n }\n \n if (!SysUser::isPasswordResetTokenValid($user->password_reset_token)) {\n $user->generatePasswordResetToken();\n if (!$user->save()) {\n return false;\n }\n }\n\n $mailer=Yii::$app->mailer->compose(\n ['html' => 'passwordResetToken-html', 'text' => 'passwordResetToken-text'],\n ['user' => $user,'time'=>time()]\n );\n $mailer->setFrom([Yii::$app->params['supportEmail'] => 'K183农机监管平台-信息录入']);\n $mailer->setTo($this->email);\n $mailer->setSubject('重置密码 K183农机监管平台-信息录入');\n if($mailer->send()){\n return true;\n }\n return false;\n }", "public function hasRecipients()\n {\n return !empty(array_merge($this->to, $this->cc, $this->bcc));\n }", "public function isAllowedForUser(){\n\t\treturn true;\n\t}", "public function sendEmail()\r\n {\r\n\t\t$mail = new UserMails;\r\n\t\t$mail->sendAdminEmail('admin-user', $this->_user);\r\n }", "public function notify() \n {\n $user = User::find()->where(['username' => $this->username])->one();\n if (!$user) {\n return false;\n }\n \n if ($this->isPhone()) {\n // Notify by SMS\n if (!$this->password) {\n return false;\n }\n Yii::$app->sms->send($user->username, 'Your password is: ' . $this->password);\n } else {\n // Notify by email\n $user->generateVerificationToken();\n if ($user->save()) {\n $mail = Yii::$app->mailer->compose('notify', ['model' => $user])\n ->setFrom('mail@example.com')\n ->setTo($user->username)\n ->setSubject('Complete Your Registration')\n ->send();\n }\n }\n \n return true;\n }", "public function checkAllowed() {\r\n\t\t// if option is not active return true!\r\n\t\tif (Mage::getStoreConfig('b2bprofessional/generalsettings/activecustomers')) {\r\n\t\t\treturn true;\r\n\t\t}\r\n\r\n\t\t$iUserStoreId\t\t= Mage::getSingleton('customer/session')->getCustomer()->getStore()->getGroupID();\r\n\t\t$iCurrentStoreId\t= Mage::app()->getStore()->getGroupID();\r\n\r\n\t\tif ($iUserStoreId == $iCurrentStoreId) {\r\n\t\t\treturn true;\r\n\t\t}\r\n\t}", "public function canView()\n {\n return !$this->is_private ||\n ( Auth::user() && ( $this->sender_id === Auth::id() || $this->recipient_id === Auth::id() ) );\n }", "protected function isMailMode() {\n return ($this->mode == Notification_NotificationTemplate::MODE_MAIL);\n }", "protected function _isAllowed()\n {\n return $this->_authorization->isAllowed('AVATOR_ContactUs::contact');\n }", "public function sendEmail()\n {\n $user = User::findOne([\n 'email' => $this->email,\n 'status' => User::STATUS_INACTIVE\n ]);\n\n if ($user === null) {\n return false;\n }\n\n $verifyLink = Yii::$app->urlManager->createAbsoluteUrl(['site/verify-email', 'token' => $user->verification_token]);\n\n // Получатель\n $sendTo = $this->email;\n\n // Формирование заголовка письма\n $subject = 'Подтверждение регистрации на ' . Yii::$app->name;\n\n // Формирование тела письма\n $msg = \"<html><body style='font-family:Arial,sans-serif;'>\";\n $msg .= \"<h2 style='font-weight:bold;border-bottom:1px dotted #ccc;'>\" . $subject . \"</h2>\\r\\n\";\n $msg .= \"<p>Приветствуем, \" . Html::encode($user->username) . \",</p>\\r\\n\";\n $msg .= \"<p>Перейдите по ссылке ниже, чтобы подтвердить свою электронную почту:</p>\\r\\n\";\n $msg .= \"<p>\" . Html::a(Html::encode($verifyLink), $verifyLink) . \"</p>\\r\\n\";\n $msg .= \"</body></html>\";\n\n // Отправитель\n $headers = \"From: \". Yii::$app->params['supportEmail'] . \"\\r\\n\";\n $headers .= \"MIME-Version: 1.0\\r\\n\";\n $headers .= \"Content-Type: text/html;charset=utf-8 \\r\\n\";\n\n // отправка сообщения\n if(@mail($sendTo, $subject, $msg, $headers)) {\n return true;\n } else {\n return false;\n }\n /*\n return Yii::$app\n ->mailer\n ->compose(\n ['html' => 'emailVerify-html', 'text' => 'emailVerify-text'],\n ['user' => $user]\n )\n ->setFrom([Yii::$app->params['supportEmail'] => Yii::$app->name . ' robot'])\n ->setTo($this->email)\n ->setSubject('Подтверждение регистрации на ' . Yii::$app->name)\n ->send();\n */\n }", "private function checkMail($candidateToEmailAddress)\r\n\t{\r\n\t\treturn true;\r\n\t}", "public function validateTransactionalEmails()\n {\n if (in_array($this->getActionName(), [self::ACTION_DELETE, self::ACTION_SAVE, self::ACTION_NEW])) {\n $this->_forward();\n return false;\n }\n\n return true;\n }", "public function is_email_sent() {\n\n\t\t$is_sent = false;\n\n\t\tif ( method_exists( $this->response, 'getId' ) ) {\n\t\t\t$message_id = $this->response->getId();\n\t\t\tif ( ! empty( $message_id ) ) {\n\t\t\t\t$is_sent = true;\n\t\t\t}\n\t\t}\n\n\t\t// Clear debug messages if email is successfully sent.\n\t\tif ( $is_sent ) {\n\t\t\tDebug::clear();\n\t\t}\n\n\t\treturn $is_sent;\n\t}", "public function _isEnabledInvoiceEmail()\r\n {\r\n return ($this->scopeConfig->getValue(self::EMAIL_INVOICE)) ? true:false ;\r\n }", "public function isSending()\n {\n return $this->status === 'sending';\n }", "public function getCanSendMediaMessages(): bool\n {\n return $this->getCanSendAudios() ||\n $this->getCanSendDocuments() ||\n $this->getCanSendPhotos() ||\n $this->getCanSendVideos() ||\n $this->getCanSendVideoNotes() ||\n $this->getCanSendVoiceNotes();\n }", "private function isReviewSendingEnabled()\n {\n return $this->_scopeConfig->getValue(\n AntavoConfigInterface::XML_PATH_REVIEW_EVENT_SENDING,\n ScopeInterface::SCOPE_STORES,\n $this->_storeManager->getStore()->getId()\n );\n }", "public function isUserNotificationEnabled($email) {\n\n \t$select = $this->getSelect()->reset('column')->where('email=?',$email);\n \t\n \t$result = $this->getConnection()->query($select)->fetchAll();\n \treturn (bool)count($result);\n }", "public function sendUserEmail($user, $data)\n {\n // $email = $this->Cu->sendResetEmail($url, $user_email->toArray());\n return true;\n }", "public function isSent() : bool {\n $status = $this->delivery_status;\n return\n $status === WebhookEvent::EVENT_SENT ||\n $status === WebhookEvent::EVENT_OPEN ||\n $status === WebhookEvent::EVENT_CLICK ||\n $status === WebhookEvent::EVENT_UNSUB ||\n $status === WebhookEvent::EVENT_SPAM;\n }", "protected function _send() {\n\t\t$return = false;\n\t\t$to = !$this->_bcc_batch_running ? implode(', ', $this->_sanitize_emails($this->recipients)) : '';\n\t\t$subject = $this->_prep_q_encoding($this->subject);\n\t\t$message = $this->_message;\n\t\t$headers = $this->_headers;\n\t\t$sender = $this->_clean_email($this->sender);\n\t\tif ($this->safe_mode == TRUE && mail($to, $subject, $message, $headers)) {\n\t\t\t$return = true;\n\t\t} else if (mail($to, $subject, $message, $headers, \"-f \" . $sender)) {\n\t\t\t// most documentation of sendmail using the \"-f\" flag lacks a space after it, however\n\t\t\t// we've encountered servers that seem to require it to be in place.\n\t\t\t$return = true;\n\t\t}\n\t\treturn $return;\n\t}", "public function hasContactEmail() {\n\t\treturn $this->contactEmail !== null;\n\t}", "public function isUsingMailList()\n\t{\n\t\treturn !empty($this->_modSettings['maillist_enabled']) && !empty($this->_modSettings['pbe_post_enabled']);\n\t}", "public function isUserAccessCheckEnabled()\n\t{\n\t\treturn $this->user_access_check;\n\t}", "public function canBeJoined(): bool\n {\n return $this->_canBeJoined;\n }", "function send_activation_mail(UsersEntity $user) {\n $to = $user->email;\n $content = $this->view->send_activation_mail($user);\n return $this->MailAPI->send_mail($to,$content['subject'],$content['body']);\n }", "function erp_is_smtp_enabled() {\n $erp_email_smtp_settings = get_option( 'erp_settings_erp-email_smtp', [] );\n\n if ( isset( $erp_email_smtp_settings['enable_smtp'] ) && filter_var( $erp_email_smtp_settings['enable_smtp'], FILTER_VALIDATE_BOOLEAN ) ) {\n return true;\n }\n\n return false;\n}", "public function canManageUsers()\n {\n return true;\n }", "public function hasUser()\n {\n return $this->getUser() !== null;\n }", "protected function _isAllowed()\n {\n return parent::_isAllowed() && $this->_authorization->isAllowed('Vnecoms_VendorsProfileNotification::manage_process');\n }", "public function hasEmail(): bool;", "function send()\n\t{\n\t\tif (!$this->toemail)\n\t\t{\n\t\t\treturn false;\n\t\t}\n\n\t\t@ini_set('sendmail_from', $this->fromemail);\n\n\t\tif ($this->registry->options['needfromemail'])\n\t\t{\n\t\t\treturn @mail($this->toemail, $this->subject, $this->message, trim($this->headers), '-f ' . $this->fromemail);\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn @mail($this->toemail, $this->subject, $this->message, trim($this->headers));\n\t\t}\n\t}", "private function isUser() : bool\n {\n return $this->role('user');\n }", "protected function AllowSendAuthorReviewCommentNotification()\n {\n $bAllowSendAuthorCommentNotification = false;\n if ($this->fieldSendCommentNotification) {\n if (!empty($this->fieldAuthorEmail) || !empty($this->fieldDataExtranetUserId)) {\n $bAllowSendAuthorCommentNotification = true;\n }\n }\n\n return $bAllowSendAuthorCommentNotification;\n }" ]
[ "0.7461446", "0.725233", "0.69361615", "0.69288963", "0.6848334", "0.67078185", "0.64890623", "0.6475303", "0.6452454", "0.641919", "0.64072233", "0.6337422", "0.6322843", "0.6298447", "0.62916183", "0.6212288", "0.6167678", "0.6147542", "0.6137145", "0.61025107", "0.609501", "0.60831183", "0.60767215", "0.6058306", "0.6055754", "0.598381", "0.5944462", "0.5919041", "0.5918896", "0.5896719", "0.5874673", "0.5871908", "0.5867666", "0.5865427", "0.58290935", "0.58270115", "0.58113426", "0.5799935", "0.5789774", "0.5748634", "0.57479423", "0.57433915", "0.57401204", "0.57388073", "0.5711163", "0.5706434", "0.57018656", "0.5684924", "0.567997", "0.5673585", "0.5670443", "0.56694496", "0.5660313", "0.56599283", "0.564278", "0.56369084", "0.56252974", "0.56203824", "0.5617601", "0.5603724", "0.5602638", "0.5595116", "0.5592028", "0.55912524", "0.5588022", "0.5579782", "0.5578782", "0.5578169", "0.5570561", "0.5553714", "0.5552057", "0.5543699", "0.5542835", "0.55393493", "0.5538043", "0.553373", "0.55270606", "0.552453", "0.551928", "0.5514547", "0.55124956", "0.5511586", "0.55009604", "0.5499456", "0.5491557", "0.5486987", "0.5483949", "0.5483222", "0.54742897", "0.5471846", "0.5468424", "0.5451651", "0.5447978", "0.54469943", "0.5442126", "0.54365224", "0.5432622", "0.5429351", "0.542803", "0.5425924" ]
0.76606447
0
Returns true, if the active user can see the profile of this user.
public function canViewProfile() { return (!$this->protectedProfile || WCF::getUser()->userID == $this->userID || UserProfile::isBuddy($this->userID) || WCF::getUser()->getPermission('admin.general.canViewPrivateUserOptions')); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function profile_view(User $user)\n {\n return $user->hasPermission('profile-view');\n }", "public function checkForProfile()\n\t\t{\n\t\t\treturn (!Auth::user()->profiles) ? false : true;\n\t\t}", "public function hasActiveUser()\n {\n return $this->user && $this->user->active;\n }", "function isActive() {\n\t\treturn ($this->getActive() == self::PROFILE_ACTIVE);\n\t}", "public function authorize()\n {\n $user = auth('web')->user();\n if ($user && $user->active) {\n return true;\n }\n\n return false;\n }", "public function isAllowed() {\n\t\tif (!$this->session->has('auth')) {\n\t\t\treturn false;\n\t\t}\n\n\t\t$user = User::findFirst(array('username' => $this->session->get('auth')));\n\n\t\treturn $user->getSuperUser() ? true : false;\n\t}", "public function authorize()\n\t{\n\t\t// if user is updating his profile or a user is an admin\n\t\tif( $this->user()->isSuperAdmin() || !$this->route('user') ){\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "public static function currentUserHasAccess() {\n return current_user_can('admin_access');\n }", "public function authorize()\n {\n $user = \\Auth::getUser();\n\n return $user->user_type == 1;\n }", "public function authorize(): bool\n {\n return parent::authorize() && (int)$this->playList->user_id === auth()->user()->id;\n }", "public function authorize()\n {\n return $this->user() !== null;\n }", "public function authorize()\n {\n return $this->user() !== null;\n }", "public function hasUser()\n {\n return $this->getUser() !== null;\n }", "public function is_profile_page() {\r\n\t\tglobal $pagenow;\r\n\r\n\t\treturn $pagenow === 'profile.php' || $pagenow === 'user-new.php' || $pagenow === 'user-edit.php';\r\n\t}", "public function checkCurrentUser(UserProfile $profile) : bool\n {\n if($this->getProfile()->getId() == $profile->getId()) {\n return true;\n }\n\n return false;\n }", "public function accessibleByCurrentUser(){\n // return true if AYC user\n if(\\Auth::isSuperAdmin()) return true;\n\n // otherwise check if personally added to this\n $allowedPages = \\Auth::getAllowedPages();\n if(in_array($this->id, $allowedPages)) return true;\n\n // if not specifically added personally to this page\n // check the user group can access this page\n if($this->groupHasPermission(\\Auth::getUserLevel())) return true;\n\n // otherwise return false\n return false;\n\n }", "public function checkAccess()\n {\n $orders = $this->getOrders();\n\n return parent::checkAccess()\n && $orders\n && $orders[0]\n && $orders[0]->getProfile();\n }", "public function authorize()\n {\n return $this->user() != null;\n }", "public function authorize()\n {\n if($this->path() == 'profile/create')\n {\n return true;\n } else {\n return false;\n }\n }", "public function authorize(): bool\n {\n return $this->user() !== null;\n }", "public function authorize()\n {\n if ($this->user() !== null) {\n return true;\n }\n return false;\n }", "protected function user_authorized()\n\t{\n\t\t// If the user has the super role, then allow access\n\t\t$super_role = Kohana::config('acl.super_role');\n\t\tif ($super_role AND in_array($super_role, $this->user->roles_list()))\n\t\t\treturn TRUE;\n\t\t// If the user is in the user list, then allow access\n\t\tif (in_array($this->user->id, $this->rule['users']))\n\t\t\treturn TRUE;\n\t\t\t\n\t\t// If the user has all (AND) the capabilities, then allow access\n\t\t$difference = array_diff($this->rule['capabilities'], $this->user->capabilities_list());\n\t\tif ( ! empty($this->rule['capabilities']) AND empty($difference))\n\t\t\treturn TRUE;\n\n\t\t// If there were no capabilities allowed, check the roles\n\t\tif (empty($this->rule['capabilities']))\n\t\t{\n\t\t\t// If the user has one (OR) the roles, then allow access\n\t\t\t$intersection = array_intersect($this->rule['roles'], $this->user->roles_list());\n\t\t\tif ( ! empty($intersection))\n\t\t\t\treturn TRUE;\n\t\t}\n\t\t\n\t\treturn FALSE;\n\t}", "public function canMemberLikes() {\n $viewer = Engine_Api::_()->user()->getViewer();\n if (!$viewer || !$viewer->getIdentity()) {\n return false;\n }\n\t\t$like_profile_show = Engine_Api::_()->getApi( 'settings' , 'core' )->getSetting( 'like.profile.show' ) ;\n\t\tif ( empty( $like_profile_show ) ) {\n\t\t\treturn false;\n\t\t}\n\t\treturn true;\n }", "public function userActive(){\n\t\treturn (isset($this->session) && $this->session != null && isset($this->session['id']) && $this->session['id'] > 0) ? true : false;\n\t}", "private function userHasAccess()\n {\n $required_perm = $this->route['perm'];\n $user_group = $_SESSION['user_group'];\n if ($required_perm == 'all') {\n return true;\n } elseif ($user_group == $required_perm) {\n return true;\n }\n return false;\n }", "public function canUserManageUsage()\n {\n return $this->getUser()->hasAccess('manage', 'newsUsage');\n }", "function have_profile(){\n\treturn ( get_profile('enabled') === true && get_profile() !== -1 );\n}", "public function authorize()\n {\n $this->model = $this->route('user');\n\n if ($this->isEdit() && !is_null($this->model)) {\n if (!user()->hasPermissionTo('Administrations::admin.user') && $this->model->id != user()->id) {\n return false;\n }\n }\n\n $this->model = is_null($this->model) ? User::class : $this->model;\n\n return $this->isAuthorized();\n }", "function userCanViewPage()\n\t{\n\t\t// use Yawp::authUsername() instead of $this->username because\n\t\t// we need to know if the user is authenticated or not.\n\t\treturn $this->acl->pageView(Yawp::authUsername(), $this->area, \n\t\t\t$this->page);\n\t}", "function checkAccess () {\n if ($GLOBALS[\"pagedata\"][\"login\"] == 1) {\n if ($this->userid && $GLOBALS[\"user_show\"] == true) {\n return true;\n }\n else {\n return false;\n }\n }\n else {\n return true;\n }\n }", "function checkAccess () {\n if ($GLOBALS[\"pagedata\"][\"login\"] == 1) {\n if ($this->userid && $GLOBALS[\"user_show\"] == true) {\n return true;\n }\n else {\n return false;\n }\n }\n else {\n return true;\n }\n }", "public function isUser()\n\t{\n\t\tif( $this->permission != array_search( 'user', $this->permissions ) )\n\t\t\treturn false;\n\n\t\treturn true;\n\t}", "public function hasuser()\n {\n return is_object($this->luser);\n }", "public function authorize()\n {\n if (!\\Auth::guest()) {\n $user = \\Auth::getUser();\n if ($user->type == User::USER_TYPE_ADMIN) {\n return true;\n }\n }\n\n return false;\n }", "public function IsProfileSet()\n {\n $profile = $this->GetProfile();\n \n $isSet = !is_null($profile);\n \n return $isSet;\n }", "private function isUser() : bool\n {\n return $this->role('user');\n }", "public function authorize()\n {\n $originAccount = Account::find($this->get('origin_account_id'));\n return $originAccount->user_id == auth()->id();\n }", "public function hasUser();", "public function currentUserHasManagerAccess()\n {\n $user = Service::getCurrentUser();\n \n if (!$user) {\n return false;\n }\n \n if ($this->userManagesSite($user)) {\n return true;\n }\n \n if ($user->isAdmin()) {\n return true;\n }\n \n return false;\n }", "protected function isCurrentUser()\n {\n return ($this->credentials->check() && $this->credentials->getUser()->id == $this->wrappedObject->revisionable_id);\n }", "public function isViewable(): bool\n\t{\n\t\treturn self::STATUS_ACTIVE === $this->get('status') && self::USER_VISIBLE === $this->get('visible');\n\t}", "public function authorize()\n\t{\n\t\t//return User::where('id', Auth::user()->id)->where('active', 1)->exists();\n\t\treturn true;\n\t}", "public function authorize()\n {\n return !empty(Auth::user()) && ($this->user()->isAnAdmin() || $this->user()->hasRole('user'));\n }", "public function hasAccess()\n\t{\n\t\t/* Check Permissions */\n\t\treturn \\IPS\\Member::loggedIn()->hasAcpRestriction( \"core\",\"members\" );\n\t}", "public function authorize()\n {\n return !is_null($this->user());\n }", "public function hasAccess()\n\t{\n\t\t/* Check Permissions */\n\t\treturn \\IPS\\Member::loggedIn()->hasAcpRestriction( 'core', 'members', 'member_edit' );\n\t}", "public function canEdit()\n {\n if(!Auth::check())\n {\n return false;\n }\n //If the user is active/logged in, return true so that we can display user's specific objects\n if(Auth::user()->id===$this->user_id)\n {\n return true;\n }\n //By default\n return false;\n }", "public function authorize()\n {\n $user = User::find($this->id);\n\n if (!$user) {\n $user = User::where('no_ahli', $this->no_ahli)->first();\n }\n if ($user && $user->id == auth()->user()->id) return true;\n if (auth()->user()->is('admin')) return true;\n\n return false;\n }", "public function has_access() { \n\n\t\tif (!Access::check('interface','25')) { \n\t\t\treturn false; \n\t\t} \n\t\tif ($this->user == $GLOBALS['user']->id) { \n\t\t\treturn true; \n\t\t} \n\t\telse {\n\t\t\treturn Access::check('interface','100'); \n\t\t} \t\n\n\t\treturn false; \n\n\t}", "public function authorize()\n {\n return auth()->user()->can('manage-users');\n }", "public function authorize()\n {\n return Auth::user() && Auth::user()->hasPermissionTo('create-users');\n }", "private function is_hidden_profile() {\n\t\treturn ! bp_profile_visibility_is_visible_profile( bp_displayed_user_id(), bp_loggedin_user_id() );\n\t}", "public function authorize()\n {\n $accessor = $this->user();\n\n return $accessor->isAdmin() || $accessor->hasKey('post-users');\n }", "public function authorize()\n // can access chef member who is 'logined' and 'chefprofile null === false'\n {\n $loginedUser = Auth::user();\n\n return $loginedUser->user_type === 'chef' && (\n\n is_null($loginedUser->chef) === false\n );\n }", "public function authorize()\n {\n switch (true) {\n case $this->wantsToList():\n case $this->wantsToShow():\n if ($this->hasRoles(['owner', 'administrator'])) {\n return true;\n }\n break;\n case $this->wantsToStore():\n case $this->wantsToUpdate():\n case $this->wantsToDestroy():\n if ($this->hasRoles(['owner'])) {\n return true;\n }\n break;\n }\n\n return false;\n }", "public function isUserAssignable()\r\n {\r\n return strpos($this->assignRole,'ROLE_USER') !== false ? true : false;\r\n }", "public function authorize()\n {\n $user = $this->findFromUrl('user');\n return $this->user()->can('update', $user);\n }", "public function authorize()\n {\n return $this->user() && $this->user()->role === Constants::USER_ROLE_ADMIN;\n }", "public function authorize()\n {\n return $this->user()->can('view', Assignment::class);\n }", "private function hasAccess() {\n\t\tif ($GLOBALS['BE_USER']->isAdmin()) {\n\t\t\treturn TRUE;\n\t\t}\n\n\t\treturn $this->userHasAccessToPages() && $this->userHasAccessToTables();\n\t}", "public function authorize()\n {\n return request()->user() != null;\n }", "public function isActive()\n {\n if (empty($this->authProvider)) {\n return false;\n }\n if ($this->authProvider->getId() == AuthProvider::MAIN_PROVIDER_ID && empty($this->password)) {\n return false;\n }\n\n return true;\n }", "public function canUserAssignUsage()\n {\n $user = $this->getUser();\n\n return $user->isAdmin || \\in_array('tl_news::usage', $user->alexf, true);\n }", "protected function isAuthenticatedUser() {\n\t\treturn !$this->getUser()->isAnon();\n\t}", "public function authorize()\n {\n return $this->route('address')->userCanView($this->user());\n }", "public function authorize() {\n\n return auth()->user() && auth()->user()->username === $this->user->username;\n }", "private function hasPermission()\n { $user = User::getLoggedInUser();\n $has_permission = false;\n if ($user->getCurrentRoleName() == \"instructor\") {\n $instructor = $user->getCurrentRoleData();\n if ($instructor->hasPermission(\"Edit Compliance Status\")) {\n $has_permission = true;\n }\n }\n\n return $has_permission;\n }", "public function authorize()\n {\n //Check if user is authorized to access this page\n if($this->user()->authorizeRoles(['admin', 'hrmanager', 'hruser'])) {\n return true;\n } else {\n return false;\n }\n }", "function a_user_has_a_profile()\n {\n $user = create('App\\User');\n\n $this->get(\"/profiles/{$user->name}\")\n ->assertSee($user->name);\n }", "public function isUserProfile(Model $model): bool\n {\n return isset($model->{$this->user_id_field}) && !is_null($model->{$this->user_id_field});\n }", "function hasAccess(): bool\n {\n return isLoggedInAndHasRole($this->ci, [Role::ROLE_ADMIN]);\n }", "function customerHasAccess() {\n\t\tswitch ($this->_mode) {\n\t\t\tcase WECF_OFF:\n\t\t\t\treturn true;\n\t\t\tcase WECF_ALL:\n\t\t\t\treturn weAbstractCustomerFilter::customerIsLogedIn();\n\t\t\tcase WECF_SPECIFIC:\n\t\t\t\tif (!weAbstractCustomerFilter::customerIsLogedIn()) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t\treturn in_array($_SESSION[\"webuser\"][\"ID\"], $this->_specificCustomers);\n\t\t\tcase WECF_FILTER:\n\t\t\t\tif (!( isset($_SESSION) && isset($_SESSION[\"webuser\"]) && isset($_SESSION[\"webuser\"][\"ID\"]) )) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t\treturn weAbstractCustomerFilter::customerHasFilterAccess();\n\t\t}\n\t\treturn false;\n\t}", "public function is_user_auth(){\n if($this->user_id==auth()->user()->id){\n return true;\n }else{\n return false;\n }\n }", "public function authorize()\n {\n $user = Auth::user();\n $vendor = $user->vendor->first();\n $isOwner = AvailableFacility::where(array(\n 'id' => $this->id,\n 'vendor_id' => $vendor->id\n ))->count();\n if ($isOwner) {\n return true;\n } else {\n return false;\n }\n }", "public function authorize()\n {\n $resource = Resource::find($this->route('id'));\n\n if (!$resource) {\n return true;\n }\n\n return $resource && $this->user()->can('access', $resource);\n }", "public function authorize(): bool\n {\n return $this->isUserAuthorised();\n }", "public function authorize()\n {\n $this->model = $this->route('user');\n\n $this->model = is_null($this->model) ? User::class : $this->model;\n\n return $this->isAuthorized();\n }", "public function check()\n {\n if($this->user_provider->retrieveById($this->user_provider->getAuthIdentifier()))\n return true;\n\n return false;\n }", "public function authorize()\n {\n //Check if user is authorized to access this page\n if($this->user()->authorizeRoles(['admin'])) {\n return true;\n } else {\n return false;\n }\n }", "public function isUserLoggedIn()\n {\n return $this->container->get('security.authorization_checker')\n ->isGranted('IS_AUTHENTICATED_FULLY');\n }", "public function authorize()\n {\n // this was my best guess\n return $this->user()->id === $this->route('user')->id;\n }", "public function authorize()\n {\n if (Auth::user()->can('update-assignment')) return true;\n if (Auth::user()->hasRole('student'))\n if ($this->owns('assignment')) return true;\n return false;\n }", "public function canManageUsers()\n {\n return true;\n }", "public function hasUser(): bool\n {\n return ! is_null($this->user);\n }", "function canViewUsers( $sessionID ){\r\n\t\treturn $this->getAccessLevel() > 9;\r\n\t}", "public function authorize()\n {\n return $this->user('office')->isActive();\n }", "public function authorize()\n {\n if ($this->user && ($this->user->hasPermission('manage_pages_contents') ) ) {\n return true;\n }\n\n return false;\n }", "public function authorize()\n {\n if($this->user()->isAdmin())\n return true;\n\n return false;\n }", "public function check_for_profile(){\n\t\t\n\t\t//get username for logged in user\n\t\t$user_name = $_SESSION['username'];\n\t\t// get user id for the logged in user\n\t\t$user_id = Database::user_id_query($user_name);\n\t\t//call static fucntion to check if user profile already exists\n\t\t$result = UserProfileHelper::check_profile($user_id);\n\t\t//var_dump($result);\n\t\treturn $result;\n\t}", "public function authorize()\n {\n $person = $this->findFromUrl('person');\n\n return $this->user()->can('update', $person);\n }", "public static function isAuth() {\r\n if (isset($_SESSION['username']) && (($_SESSION['authorized'] == 'ADMIN')\r\n OR ($_SESSION['authorized'] == 'SUPERUSER')\r\n OR ($_SESSION['authorized'] == 'MEMBER')))\r\n return true;\r\n }", "public function authorize()\n {\n if (session()->has('user'))\n {\n $participantController = new ParticipantController();\n\n return !$participantController->isParticipating($this->input('id_user'), $this->input('id_event'));\n }\n else\n {\n return false;\n }\n }", "public function authorize()\n {\n $isValid = auth()->user()->is($this->route('task')->attempt->checklist->owner);\n\n return $isValid;\n }", "public function authorize(): bool\n {\n return $this->user()->id === $this->article->user->id;\n }", "public function view(User $user)\n {\n return $user->hasPermissionTo('experience_view');\n }", "public function hasActiveSubscription()\n {\n return $this->user->hasActiveSubscription();\n }", "public function isUserAccessCheckEnabled()\n\t{\n\t\treturn $this->user_access_check;\n\t}", "public function canView()\n {\n return !$this->is_private ||\n ( Auth::user() && ( $this->sender_id === Auth::id() || $this->recipient_id === Auth::id() ) );\n }", "public function authorize()\n {\n return request()->loggedin_role === 1;\n }", "function is_active()\n {\n return $this->userData[$this->user_active];\n }" ]
[ "0.76652235", "0.76327753", "0.73411644", "0.72878754", "0.7081535", "0.69641787", "0.6954493", "0.6948531", "0.6920679", "0.6913969", "0.6888505", "0.6888505", "0.6883346", "0.6846209", "0.6841171", "0.68327916", "0.6829306", "0.6824454", "0.67836636", "0.67606765", "0.6718544", "0.67153937", "0.6702212", "0.66993237", "0.6689323", "0.66474557", "0.6613794", "0.66115797", "0.6593278", "0.6576516", "0.6576516", "0.6541934", "0.65343994", "0.6533637", "0.65331715", "0.65260404", "0.6521975", "0.65216583", "0.6503126", "0.64971936", "0.6486225", "0.64816576", "0.6466476", "0.64575046", "0.64573723", "0.64544326", "0.6448524", "0.6445681", "0.64233214", "0.6404321", "0.64033604", "0.63939977", "0.63904244", "0.63878715", "0.6385508", "0.63784033", "0.6372373", "0.6361867", "0.6358479", "0.63542736", "0.6353279", "0.63481367", "0.63461876", "0.6342658", "0.63405466", "0.63397866", "0.6335647", "0.63343954", "0.6329968", "0.63237935", "0.63224363", "0.63216364", "0.6313098", "0.630956", "0.6307336", "0.6300885", "0.6300364", "0.62969893", "0.62969387", "0.6293578", "0.62935543", "0.6291115", "0.6289774", "0.62832856", "0.6275079", "0.62700707", "0.6269888", "0.6269106", "0.6268729", "0.62668145", "0.6263984", "0.6251235", "0.6250254", "0.6245038", "0.62442046", "0.62435156", "0.6239299", "0.62382585", "0.62325746", "0.62294436" ]
0.83973634
0
Returns the age of this user.
public function getAge() { if ($this->birthday) { // split date $year = $month = $day = 0; $optionValue = explode('-', $this->birthday); if (isset($optionValue[0])) $year = intval($optionValue[0]); if (isset($optionValue[1])) $month = intval($optionValue[1]); if (isset($optionValue[2])) $day = intval($optionValue[2]); // calc if ($year) { $age = DateUtil::formatDate('%Y', null, false, true) - $year; if (intval(DateUtil::formatDate('%m', null, false, true)) < intval($month)) $age--; else if (intval(DateUtil::formatDate('%m', null, false, true)) == intval($month) && DateUtil::formatDate('%e', null, false, true) < intval($day)) $age--; return $age; } } return 0; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getAge()\n {\n if ($this->age) {\n return $this->age;\n }\n\n $this->age = $this->getBirthDate()->diff(new \\DateTime())->y;\n\n return $this->age;\n }", "public function getAge() {\n return $this->age;\n }", "public function getAge()\n {\n // future dates have no age\n return max(0, $this->difference(self::now())->getYears());\n }", "public function getAge()\n {\n return $this->age;\n }", "public function getAge()\n {\n return $this->age;\n }", "public function getAge()\n {\n return $this->age;\n }", "public function getAge()\n {\n return $this->age;\n }", "public function getAge()\n {\n return $this->age;\n }", "public function getAge()\n {\n return $this->age;\n }", "public function getAgeAttribute()\n\t{\n\t\treturn now()->diffInYears($this->birthdate);\n\t}", "public function getage()\n {\n return $this->age;\n }", "public function getAgeAttribute ()\n\t{\n\t\treturn \\Carbon\\Carbon::parse($this->birthdate)->age;\n\t}", "public function getAge()\n {\n\n return $this->age;\n \n }", "private function getAge()\n {\n return $this->getAge($this->dob);\n }", "public function getAge()\n\t{\n\t\t$date_birthday = $this->getAnswer('birthday');\n\t\t$date_birthday = convert_date_to_age($date_birthday);\n\t\treturn $date_birthday;\n\n\t}", "public function getProfileAge() {\n\t\treturn (TIME_NOW - $this->registrationDate) / 86400;\n\t}", "public function age()\r\n {\r\n\r\n // Note that A DOB object is based on a date-range and the exact date is\r\n // usually unknown so for age calculation the the middle of the range is\r\n // assumed to be the real date-of-birth.\r\n\r\n if (!empty($this->date_range))\r\n {\r\n $dob = $this->date_range->middle();\r\n $today = new DateTime('now', new DateTimeZone('GMT'));\r\n\r\n $diff = $today->format('Y') - $dob->format('Y');\r\n\r\n if ($dob->format('z') > $today->format('z'))\r\n {\r\n $diff -= 1;\r\n }\r\n\r\n return $diff;\r\n }\r\n return;\r\n }", "public function getUserAge();", "public function age(){\n return $this->dob->age;\n }", "function getAge() {\n return $this->age;\n }", "public function getAge()\n {\n $this->checkJMBG();\n\n $timestamp = $this->getBirthdayTimeStamp();\n $now = time();\n $diff = $now - $timestamp;\n return date('Y', $diff) - 1970;\n }", "public function getPasswordAge()\n {\n $date = \\MUtil_Date::ifDate(\n $this->_getVar('user_password_last_changed'),\n array(\\Gems_Tracker::DB_DATETIME_FORMAT, \\Gems_Tracker::DB_DATE_FORMAT, \\Zend_Date::ISO_8601)\n );\n if ($date instanceof \\MUtil_Date) {\n return abs($date->diffDays());\n } else {\n return 0;\n }\n }", "public function getPassengerAge(){\n\t\t\n\t\treturn $this->passengerAge;\n\t}", "public function age() {\n $years = ((integer) date('Y')) - $this->year;\n\n if (((integer) date('n')) < $this->month) {\n $years -= 1;\n }\n else if (((integer) date('n')) == $this->month) {\n if (((integer) date('j')) < $this->day) {\n $years -= 1;\n }\n }\n\n return $years;\n }", "public function getAge() { return $this->age; }", "public function getAge()\n {\n //function qui calcule l'age de leleve \n $now = new \\DateTime('now');\n $age = $this->getDateNaissance();\n $difference = $now->diff($age);\n\n return $difference->format('%y Ans');\n }", "public function determineAge() {\n $timeInOneYear = 365.256 * 24 * 60 * 60;\n $yearsofAge = floor((strtotime(date('Y')) - strtotime($this->year.'-12-31'))/ $timeInOneYear);\n\n $this->age = $yearsofAge;\n\n return (int) $yearsofAge;\n }", "public function getAgeAttribute() {\n return Carbon::createFromDate($this->attributes['DOB'])->age;\n }", "public function getAge() {\n date_default_timezone_set('America/New_York');\n list($year,$month,$day) = explode(\"-\",$this->birthDate);\n $year_diff = date(\"Y\") - $year;\n $month_diff = date(\"m\") - $month;\n $day_diff = date(\"d\") - $day;\n if ($month_diff < 0 || ($month_diff == 0 && $day_diff < 0)) {\n $year_diff--;\n }\n return $year_diff;\n }", "public function getMaxAge()\n {\n return $this->maxAge;\n }", "public function getMaxAge()\n {\n return $this->maxAge;\n }", "public function getAge()\n {\n return 14;\n }", "public function getAge()\n {\n return 14;\n }", "public function getAge()\n {\n if ($dob = $this->getDob()) {\n $now = new \\Datetime('now');\n $today['month'] = $now->format('m');\n $today['day'] = $now->format('d');\n $today['year'] = $now->format('Y');\n\n $years = $today['year'] - $dob->format('Y');\n\n if ($today['month'] <= $dob->format('m')) {\n if ($dob->format('m') == $today['month']) {\n if ($dob->format('d') > $today['day'])\n $years--;\n } else\n $years--;\n }\n\n return $years;\n }\n\n return null;\n }", "public function getMaxAge()\n\t{\n\t\treturn $this->maxage;\n\t}", "public function getMaxAge(): int {\n return $this->configuration['max_age'];\n }", "public function getAge();", "public function getAge();", "public function getAgeFrom() {\n return $this->ageFrom;\n }", "public function getAge()\n {\n return 20;\n }", "public function getAge() {\n // Age of oldest entry.\n $old = $this->database->select('watchdog', 'w')\n ->fields('w', ['timestamp'])\n ->orderBy('wid', 'ASC')\n ->range(0, 1)\n ->execute()\n ->fetchField();\n\n // Age of newest entry.\n $new = $this->database->select('watchdog', 'w')\n ->fields('w', ['timestamp'])\n ->orderBy('wid', 'DESC')\n ->range(0, 1)\n ->execute()\n ->fetchField();\n\n // If two different days...\n if (date('Y-m-d', $old) != date('Y-m-d', $new)) {\n return $this->t(\"Age of messages: From @from to @to (@days days)\", [\n '@from' => date('Y-m-d', $old),\n '@to' => date('Y-m-d', $new),\n '@days' => round(($new - $old) / 86400, 2),\n ]);\n }\n // Same day; don't calculate number of days.\n return $this->t(\"Age of messages: From @from to @to\", [\n '@from' => date('Y-m-d', $old),\n '@to' => date('Y-m-d', $new),\n ]);\n }", "public function getMaxAge()\n {\n return $this->expiry;\n }", "public function get_age($dob){\n\t\treturn floor((time() - strtotime($dob))/31556926);\n\t}", "public function setAge($v)\n {\n if ($v !== null) {\n $v = (string) $v;\n }\n\n if ($this->age !== $v) {\n $this->age = $v;\n $this->modifiedColumns[UserTableMap::COL_AGE] = true;\n }\n\n if ($this->aUserAge !== null && $this->aUserAge->getAge() !== $v) {\n $this->aUserAge = null;\n }\n\n return $this;\n }", "public function getMaxAgeInDays() {\n\t\treturn $this->maxAgeInDays;\n\t}", "public function getAgeAttribute($value)\n {\n return Carbon::parse($this->birthdate)->age;\n }", "public function getMaxAge()\n {\n\n }", "public function getMinAge()\n {\n return $this->minAge;\n }", "public function getMinAge()\n {\n return $this->minAge;\n }", "public function getIdPersonnage() {\n return intval($this->idPersonnage);\n }", "public function getIdPersonnage() {\n return intval($this->idPersonnage);\n }", "public function getUserAge(ConnectionInterface $con = null)\n {\n if ($this->aUserAge === null && (($this->age !== \"\" && $this->age !== null))) {\n $this->aUserAge = ChildAgeQuery::create()->findPk($this->age, $con);\n /* The following can be used additionally to\n guarantee the related object contains a reference\n to this object. This level of coupling may, however, be\n undesirable since it could result in an only partially populated collection\n in the referenced object.\n $this->aUserAge->addUsers($this);\n */\n }\n\n return $this->aUserAge;\n }", "public function getMaxAge(): ?int\n {\n return $this->max_age;\n }", "public function getAgeTimeUnit()\n {\n return $this->ageTimeUnit;\n }", "public function getageEu()\n {\n return $this->age_eu;\n }", "public function birthday(bool $age = false)\n {\n // If age is requested calculate it\n if ($age) {\n // Create dates\n $birthday = date_create($this->birthday);\n $now = date_create(date('Y-m-d'));\n\n // Get the difference\n $diff = date_diff($birthday, $now);\n\n // Return the difference in years\n return (int) $diff->format('%Y');\n }\n\n // Otherwise just return the birthday value\n return $this->birthday;\n }", "public function getMinimumAge()\n {\n return $this->minimumAge;\n }", "public function getMinimumAge()\n {\n return $this->minimumAge;\n }", "public function sessionAge()\n {\n if (!isset($_SESSION[PMF_SESSION_ID_TIMESTAMP])) {\n return 0;\n }\n\n return ($_SERVER['REQUEST_TIME'] - $_SESSION[PMF_SESSION_ID_TIMESTAMP]) / 60;\n }", "public function getageEc()\n {\n return $this->age_ec;\n }", "public static function get_cache_age()\n {\n return self::$cache_age;\n }", "function get_age($date_of_birth) //day-month-year\n\t\t{\n\t\t\t$bdate = explode(\"-\", $date_of_birth);\n\t\t\t$day\t= isset($bdate[0]) ? (int)$bdate[0] : 0;\n\t\t\t$month\t= isset($bdate[1]) ? (int)$bdate[1] : 0;\n\t\t\t$year\t= isset($bdate[2]) ? (int)$bdate[2] : 0;\n\t\t\tif ($year)\n\t\t\t{\n\t\t\t\t$age = date(\"Y\") - $year;\n\t\t\t\tif (($month > date(\"m\")) || ($month == date(\"m\") && date(\"d\") < $day))\n\t\t\t\t{\n\t\t\t\t\t$age -= 1;\n\t\t\t\t}\n\t\t\t\treturn $age;\n\t\t\t}\n\t\t\treturn false;\n\t\t}", "protected function getMaxAge(): int\r\n {\r\n $maxAge = $this->expire - time();\r\n\r\n return 0 >= $maxAge ? 0 : $maxAge;\r\n }", "public function getGroupMaxAge() {\n\t\treturn $this->_group_max_age;\n\t}", "public function getageBu()\n {\n return $this->age_bu;\n }", "static function calculateAge($birthDate) {\n if (empty($birthDate)) {\n return 0;\n }\n $birthDay = new DateTime($birthDate);\n $toDay = new DateTime(date('Y-m-d'));\n $dateDiff = $toDay->diff($birthDay);\n $age = $dateDiff->y;\n return $age;\n }", "public static function getAge($date) {\r\n $d = new DateTime($date);\r\n $t = new DateTime(self::currentDateTime(self::datePattern));\r\n $interval = $t->diff($d);\r\n \r\n $years = $interval->format(\"%Y\");\r\n if($years == date(self::dateYear,time()))\r\n {\r\n return 0;\r\n }\r\n else\r\n {\r\n return $years;\r\n } \r\n }", "public function getAge(int $unit = self::AGE_SECONDS) : float {\n switch ($unit) {\n default:\n return $this->age;\n case self::AGE_MINUTES:\n return $this->age / 60;\n case self::AGE_HOURS:\n return $this->age / 60 / 60;\n case self::AGE_DAYS:\n return $this->age / 60 / 60 / 24;\n }\n }", "public function getUserDateOfBirth () {\n\t\treturn ($this->userDateOfBirth);\n\t}", "function getAppropriateAges(){\n\t\treturn $this->appropriateAges;\n\t}", "private function _maxAge(): string\n {\n $maxAge = (string) $this->config['MaxAge'];\n\n return ($maxAge) ?: '0';\n }", "public function getWholeAge()\n\t{\n\t\tif($this->age < 2){\n\t\t\treturn $this->age . ' rok';\n\t\t}else if($this->age < 5){\n\t\t\treturn $this->age . ' roky';\n\t\t}else{\n\t\t\treturn $this->age . ' let';\n\t\t}\n\t}", "protected function accountAge()\n\t{\n\t\t$joinDate = new \\DateTime($this->store['join_date']);\n\t\t$currentDate = new \\DateTime();\n\t\t$interval = $joinDate->diff($currentDate);\n\t\t$interval = $interval->y;\n\t\t$this->score += ($interval * $this->config->data()['accountAge']);\n\t}", "public function setAge($v)\n {\n if ($v !== null) {\n $v = (int) $v;\n }\n\n if ($this->age !== $v) {\n $this->age = $v;\n $this->modifiedColumns[AliMemberTableMap::COL_AGE] = true;\n }\n\n return $this;\n }", "public function getBirth()\n {\n return $this->birth;\n }", "public function getDateOfBirth()\n {\n return $this->dateOfBirth;\n }", "public function getDateOfBirth()\n {\n return $this->dateOfBirth;\n }", "public function calcAgeCalculatesAgeOfTimestampDataProvider() {}", "public function cheffism_age_function($atts) {\n extract(shortcode_atts(array(\n 'date' => '11/04/1985',\n 'format' => 'dd/MM/YYYY'\n ), $atts));\n\n //explode the date to get month, day and year\n $date = explode(\"/\", $date);\n //get age from date or birthdate\n $age = (date(\"md\", date(\"U\", mktime(0, 0, 0, $date[1], $date[0], $date[2]))) > date(\"md\")\n ? ((date(\"Y\") - $date[2]) - 1)\n : (date(\"Y\") - $date[2]));\n\n return $age;\n }", "public function getGroupAgeSize() {\n\t\treturn $this->_group_age_size;\n\t}", "public function getMarAge()\n {\n return $this->mar_age;\n }", "function age($date)\n{\n\t// PHP décompose la date saisie dans l'ordre défini\n list($annee, $mois, $jour) = explode ('/', $date);\n $TSN = strtotime($annee.\"/\".$mois.\"/\".$jour);\n $TS = strtotime(date(\"Y/m/d\"));\n\n $Age = ($TS-$TSN)/(365*3600*24);\n return round($Age);\n}", "public function getDateofBirth() {\n return $this->dateOfBirth;\n }", "public function getIdPersonnage()\n {\n return $this->idPersonnage;\n }", "function getAge($birthDate){\n $birthDate = explode('/', $birthDate);\n $birthYear = $birthDate[2];\n $date = date('Y');\n $age = date_diff(date_create($birthYear), date_create($date));\n \n return $age->format('%Y');\n}", "public static function calculateAge( $birthDate = false )\n\t{\n\t\tif( !$birthDate )\n\t\t{\n\t\t\treturn false;\n\t\t}\n\n\t\t//explode the date to get month, day and year\n\t\t$birthDate = explode( \"-\", $birthDate );\n\n\t\tif( count( $birthDate ) != 3 )\n\t\t{\n\t\t\treturn false;\n\t\t}\n\n\t\t//get age from date or birthDate\n\t\t$age = ( date( \"md\", date( \"U\", mktime( 0, 0, 0, $birthDate[ 0 ], $birthDate[ 1 ], $birthDate[ 2 ] ) ) ) > date( \"md\" ) ? ( ( date( \"Y\" ) - $birthDate[ 0 ] ) - 1 ) : ( date( \"Y\" ) - $birthDate[ 0 ] ) );\n\n\t\treturn (int)$age;\n\t}", "public function checkAge()\n {\n Validator::extend('check_age', function ($attribute, $value, $parameters, $validator) {\n $request = app(\\Illuminate\\Http\\Request::class);\n $dob = $request->date_of_birth;\n $dobValue = explode('-', $dob);\n if ($dobValue[0] && $dobValue[1] && $dobValue[2]) {\n $today = new DateTime();\n $birthdate = new DateTime($dob);\n $interval = $today->diff($birthdate);\n $age = (int)$interval->format('%y');\n if ($age>=18) {\n return true;\n } else {\n return false;\n }\n }\n });\n }", "public function calculateAge($student_id){\n\t\t\t$table='student';\n\t\t\t$student=$this->findById($student_id, $table);\n\t\t\t$birth_date=$student['birth_date'];\n\t\t\t$get_birth_year=explode('/', $birth_date);\n\t\t\t$birth_year=$get_birth_year['2'];\n\t\t\t$current_year=date('Y');\n\t\t\t$age=$current_year - $birth_year;\n\t\t\treturn $age;\n\t\t}", "public function getBirthday()\n {\n return $this->birthday;\n }", "public function getBirthday()\n {\n return $this->birthday;\n }", "public function getBirthday()\n {\n return $this->birthday;\n }", "public function getBirthday()\n {\n return $this->birthday;\n }", "public function getBirthday()\n {\n return $this->birthday;\n }", "public function getEquipYearsOfUseAttribute()\n {\n $equip_years_of_use = 0;\n\n if (isset($this->equip_date_of_release) && $this->equip_date_of_release != NULL) {\n $dateNow = new DateTime();\n $dateOfStart = date_create($this->equip_date_of_release);\n $diff = date_diff($dateNow, $dateOfStart);\n $equip_years_of_use = $diff->y;\n }\n\n return $equip_years_of_use;\n }", "public function getExpiresIn(): int\n {\n return $this->expiresIn;\n }", "public function getEdad()\n {\n $dateOfBirth = $this->getFechaNac();\n $today = date(\"Y-m-d\");\n $diff = date_diff(date_create($dateOfBirth), date_create($today));\n return (int)$diff->format('%y');\n\n }", "public function getGroupMinAge() {\n\t\treturn $this->_group_min_age;\n\t}", "function timestamp_age($timestamp) {\n\t$then = new DateTime($timestamp);\n\t$now = new DateTime(gmdate(\"Y-m-d H:i:s\"));\n\t$delta = (int)$now->format(\"U\") - (int)$then->format(\"U\");\n\treturn $delta;\n}", "public function getDifferenceInYears();", "function ageCalculator($dob)\n{\n\tif(!empty($dob))\n\t{\n\t\t$birthdate = new DateTime($dob);\n\t\t$today = new DateTime('today');\n\t\t$age = $birthdate->diff($today)->y;\n\t\treturn $age;\n\t}\n\telse\n\t{\n\t\treturn 0;\n\t}\n}" ]
[ "0.80368245", "0.7951716", "0.79058903", "0.7882655", "0.7882655", "0.7882655", "0.7882655", "0.7882655", "0.7882655", "0.7839807", "0.7742364", "0.76961005", "0.76916873", "0.7657305", "0.76426744", "0.757362", "0.75431293", "0.75423485", "0.75281304", "0.748971", "0.74476945", "0.7394688", "0.7362239", "0.73192996", "0.73027587", "0.72664905", "0.72167957", "0.7192275", "0.7173144", "0.7102939", "0.7102939", "0.70765114", "0.70765114", "0.7047762", "0.70344913", "0.6945373", "0.6925612", "0.6925612", "0.69230753", "0.6840967", "0.67934674", "0.6734713", "0.6694202", "0.6690572", "0.6678683", "0.6647512", "0.6591543", "0.6407128", "0.6407128", "0.6365888", "0.6365888", "0.63354284", "0.626529", "0.62561333", "0.62402767", "0.6201786", "0.6120292", "0.6120292", "0.6103877", "0.607815", "0.60698843", "0.6058885", "0.6024588", "0.59911823", "0.59389186", "0.5892585", "0.5844549", "0.58337754", "0.5829295", "0.58194065", "0.57977897", "0.57917607", "0.57694376", "0.5765957", "0.5746435", "0.5723711", "0.5723711", "0.57140744", "0.56631577", "0.5635447", "0.56316745", "0.5623422", "0.56166255", "0.5612473", "0.56067497", "0.56019604", "0.55911314", "0.5590558", "0.5588683", "0.5588683", "0.5588683", "0.5588683", "0.5588683", "0.5533433", "0.5524544", "0.55192333", "0.5517252", "0.54991466", "0.54728496", "0.54725504" ]
0.730148
25
Returns true, if the given user is a buddy of the active user.
public static function isBuddy($userID) { if (self::$buddies === null) { self::$buddies = array(); if (WCF::getUser()->buddies) { self::$buddies = explode(',', WCF::getUser()->buddies); } } if (count(self::$buddies)) { return in_array($userID, self::$buddies); } return false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function buddy($userid){\n \t//of user with id=$_SESSION[userid]\n \t\n \t$buddies = $this->buddyListArray();\n\t\n\tif(in_array($userid, $buddies) OR $userid == getUser()){\n\t\treturn true;\n\t}\n return false;\n }", "public function isUserBannedxxx()\n {\n $db = $this->_db;\n $sql = sprintf(\"SELECT ban_id FROM %s\n WHERE banned_ip = %s LIMIT 1;\"\n , S_TABLE_BANS\n , $this->getUserIp()\n );\n\n $result = $db->sql_query($sql);\n $row = $db->sql_fetchrow($result);\n\n return ($row)\n ? true\n : false;\n }", "public function userBanned(User $user):bool\n {\n // SQL request\n $sql = \" SELECT COUNT(*) AS banned FROM user WHERE email = :email AND status = 'banned'\";\n\n // Preparing the sql query\n $requete = $this->DB->prepare($sql);\n\n // Associates a value with the email parameter\n $requete->bindValue(':email', $user->getEmail(), \\PDO::PARAM_STR);\n\n // Execute the sql query\n $requete->execute();\n\n // Retrieves information\n $reponse = $requete->fetch();\n\n // If there is a record, we return true\n if ($reponse['banned'] == 1) {\n return true;\n }\n // else\n return false;\n }", "public function isFriendsWith($user_guid);", "public function is_user_baned($user_id)\n {\n $query = $this->db\n ->where('user_id', $user_id)\n ->get('users');\n $result = $query->row_array();\n return (intval($result['ban']) === 1);\n }", "public function isFriendsWith(User $user) {\n return (bool) $this->friends()->where('id', $user->id)->count();\n }", "public function votingHasMember(User $user) {\n if(! is_array($this->answers) || isset($this->answers[0])) { return false; }\n foreach($this->answers as $a) {\n if($a == $user->getUsername()) {\n return true;\n }\n }\n return false;\n }", "public function isFriendsWith(User $user) {\n // Returns current users friends where id = the user id\n return (bool) $this->friends()->where('id', $user->id)->count();\n }", "public function isFriendWith(User $user)\n {\n return $this->friends()->where('friend_id', $user->id)->count() > 0;\n }", "public function isFriendOf($user_guid);", "public function inDealerGroup($user){\n\t\t$dealerGroupId = $this->getDealerGroupId();\n\t\tforeach ($user->groups as $groupId => $value){\n\t\t\tif($dealerGroupId==$groupId){\n\t\t\t\treturn TRUE;\n\t\t\t}\n\t\t}\n\t\treturn FALSE;\n\t}", "public function isActiveMember(Users $user)\n {\n return $user->getStatus() == Users::STATUS_ACTIVE;\n }", "function isLeader(User $user) {\n return $user instanceof User && $this->object->getLeaderId() == $user->getId();\n }", "public function isHoneysWith(User $user)\n {\n return (DB::table('userlink')\n ->where(['user1' => $user->id, 'user2' => $this->id])\n ->orwhere(['user2' => $user->id, 'user1' => $this->id])\n ->count() !=0 );\n }", "public function me(User $user): bool\n {\n return $user->isEndUser();\n }", "public function isOwner(User $user) : bool\n {\n foreach (config('dan.owners') as $usr) {\n if (fnmatch($usr, $user)) {\n return true;\n }\n }\n\n return false;\n }", "public function isBanned($userId)\n {\n $db = \\XF::db();\n\n $query = $db->query(\"SELECT * FROM xf_user_ban WHERE user_id = ? AND enddate > ? AND enddate >= ? LIMIT 1\", [$userId, 0, TIME_NOW]);\n\n $result = $query->fetch();\n\n return count($result) > 0;\n }", "public function hasFriend($user_id) {\n $this->db->select('*');\n $this->db->from($this->relation);\n $this->db->where('user_id', $user_id);\n $query = $this->db->get();\n $result = $query->result_array();\n return !empty($result)?true:false;\n }", "public function isActiveMember(Users $user)\n {\n }", "public function isMember(UserObject $userObject){\n if(is_callable($this->checkMember)){\n $check = $this->checkMember;\n return $check($userObject);\n }\n CoreLog::debug('No checkMember method defined');\n return false;\n }", "public function is_user_active_member($user, $group){\n\t\tif($user->exists() && $group->exists()){\n\t\t\t// Populate the users groups if not already done:\n\t\t\tif(!$user->are_groups_populated()){\n\t\t\t\t$user->populate_groups();\n\t\t\t}\n\t\t\t// Retrieve groups user is currently active with:\n\t\t\t$users_active_groups = $user->get_groups();\n\t\t\t// If users has no active groups then return false:\n\t\t\tif(!$user->get_groups()){\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\t// Got this far? There's at least one group to check then:\n\t\t\tforeach($users_active_groups as $active_group){\n\t\t\t\tif($active_group->data()->id == $group->data()->id)\n\t\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}", "public function hasUser($user) : bool\n {\n return $this->users->contains('id', is_a($user, user_model()) ? $user->id : $user);\n }", "public function isFollowBy($user)\n {\n if(!$user->dramas->first()){\n return false;\n }\n\n if ($user->dramas->contains('id',$this['id'])){\n return true;\n }\n\n return false;\n }", "public function isBelonsTo( User $user )\n {\n $results = [ $user->id => $this->user->id ];\n foreach ( $this->participants as $participant ) { \n $results[] = $participant->id;\n }\n\n return ( in_array($user->id, $results) );\n\n }", "public function isBookmark($user)\n {\n $criteria = Criteria::create();\n $criteria->andWhere(Criteria::expr()->eq('user', $user));\n $criteria = $this->handleCriteria($criteria, array(), 1, null);\n\n if ($this->bookmarkby->matching($criteria)->count() === 0) {\n return false;\n }\n\n return true;\n }", "function canBidBuddy($bidbutler) {\n\tglobal $config;\n\t\n\tif ($bidbutler['reverse']) {\n\t\t//reverse auctions work differently\n\t\tif ($bidbutler['price'] <= $bidbutler['minimum_price'] ||\n\t\t\t\t $config['App']['bidButlerType'] == 'simple' ||\n\t\t\t\t $bidbutler['fixed'] == 1) {\n\t\t\tlogIt($bidbutler['auction_id']. '; canBidBuddy: true');\n\t\t\treturn true;\n\t\t}\n\t\t\t\t \n\t} else {\n\t\t//standard auction\n\t\t\n\t\tif ($bidbutler['price'] >= $bidbutler['minimum_price'] &&\n\t\t\t ($bidbutler['price'] < $bidbutler['maximum_price']) ||\n\t\t\t $config['App']['bidButlerType'] == 'simple' ||\n\t\t\t $bidbutler['fixed'] == 1) {\n\t\t\tlogIt($bidbutler['auction_id']. '; canBidBuddy: true');\n\t\t\treturn true;\n\t\t}\n\t}\n}", "public function isBelongingTo(User $user)\r\n {\r\n return true;\r\n }", "public function hasActiveUser()\n {\n return $this->user && $this->user->active;\n }", "protected function is_user_active ($user) {\n\t\t/**\n\t\t * Optimization, more data requested than actually used here, because data will be requested later, and it would be nice to have that data cached\n\t\t */\n\t\t$data = User::instance()->get(\n\t\t\t[\n\t\t\t\t'login',\n\t\t\t\t'username',\n\t\t\t\t'language',\n\t\t\t\t'timezone',\n\t\t\t\t'status',\n\t\t\t\t'block_until',\n\t\t\t\t'avatar'\n\t\t\t],\n\t\t\t$user\n\t\t);\n\t\tif (!$data) {\n\t\t\treturn false;\n\t\t}\n\t\t$L = Language::prefix('system_profile_sign_in_');\n\t\t$Page = Page::instance();\n\t\tswitch ($data['status']) {\n\t\t\tcase User::STATUS_INACTIVE:\n\t\t\t\t/**\n\t\t\t\t * If user is disabled\n\t\t\t\t */\n\t\t\t\t$Page->warning($L->your_account_disabled);\n\t\t\t\treturn false;\n\t\t\tcase User::STATUS_NOT_ACTIVATED:\n\t\t\t\t/**\n\t\t\t\t * If user is not active\n\t\t\t\t */\n\t\t\t\t$Page->warning($L->your_account_is_not_active);\n\t\t\t\treturn false;\n\t\t}\n\t\tif ($data['block_until'] > time()) {\n\t\t\t/**\n\t\t\t * If user if blocked\n\t\t\t */\n\t\t\t$Page->warning($L->your_account_blocked_until(date($L->_datetime, $data['block_until'])));\n\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t}", "public function hasLeader($user): bool\n {\n return $this->leaders()->where('user_id', $user->id)->exists();\n }", "public function hasUser($user): bool\n {\n return $this->users->contains($user) || $user->ownsTeam($this);\n }", "function canSendWelcomeMessage($user) {\n return $user->isPeopleManager() || $user->isCompanyManager($this->getCompany());\n }", "public function userIsInstalledAndConnected(AyiUser $user){\r\n\t\treturn $user->hasPlatform(Config::DEVICE_FACEBOOK) && $this->isCurrentlyFBConnected();\r\n\t}", "public function isUpvotedBy($user)\n {\n return Interaction::isRelationExists($this, 'upvoters', $user);\n }", "public function userIsBanned($user)\n {\n return \\App::abort(404);\n //dd($user);\n }", "public function hasUser(User $user)\n {\n foreach ($this->users?:[] as $currentUser) {\n if ($user->getId()\n && $currentUser instanceof User && $currentUser->getId()\n && $user->getId() == $currentUser->getId()) {\n return true;\n }\n }\n\n return false;\n }", "public function ownedBy(User $user){\n\n\t\treturn $this->user_id == $user->id;\n\n\t}", "public function ownedBy(User $user)\n {\n return $this->user_id === $user->id;\n }", "public function ownedBy(User $user)\n {\n return $this->created_by == $user->id;\n }", "public function hasUser(AUser $user) {\n\t\tif ($user instanceof AUser) {\n\t\t\t$user = $user->id;\n\t\t}\n\t\t$module = Yii::app()->getModule(\"users\");\n\t\t$className = $module->userGroupMemberModelClass;\n\t\treturn (bool) $className::model()->countByAttributes(\n\t\t\tarray(\n\t\t\t\t\"userId\" => $user,\n\t\t\t\t\"groupId\" => $this->id\n\t\t\t)\n\t\t);\n\t}", "public function okay_user($user)\n {\n if (!Session::get('superadmin') && ($user->type == 'superadmin' || $user->type == 'admin')) return false;\n return true;\n }", "public function isUser(User $user)\n {\n if ($this->users()->find($user->id)) {\n return true;\n }\n return false;\n }", "protected function isActivated($user)\n {\n return empty($user[$this->keys[self::ACTIVATION_TOKEN_KEY]]) ? true : false;\n }", "public function checkIsMember($user_id) {\n\n // all members and up have records in the aro table\n $aro = $this->findUser($user_id);\n return !empty($aro);\n }", "public function ownedBy(User $user) {\n // Check to see if the user id = the user id passed in.\n return $this->user_id == $user->id;\n }", "function is_active_member($uid, $gid) {\n global $db;\n $count = $db->count(tbl($this->gp_mem_tbl), \"userid\", \" userid='$uid' AND group_id='$gid' AND active='yes'\");\n if ($count[0] > 0)\n return true;\n else\n return false;\n }", "public function canMail() {\n\t\tif ($this->ignoredUser || ($this->onlyBuddyCanMail && !UserProfile::isBuddy($this->userID)) || (!$this->userCanMail && !$this->onlyBuddyCanMail)) {\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\treturn true;\n\t}", "function thrive_bp_check_is_user_online( $user_id )\n\t{\n\t\tif ( function_exists( 'bp_has_members' ) ) {\n\t\t\tif ( bp_has_members( 'type=online&include='. absint( $user_id ) ) ) {\n\t\t\t\treturn TRUE;\n\t\t\t} else {\n\t\t\t\treturn FALSE;\n\t\t\t}\n\t\t} else {\n\t\t\treturn -1;\n\t\t}\n\t}", "public function isAvailableForUser()\n {\n $c_user = fx::user();\n $ib_visibility = isset($this['scope']['visibility']) ? $this['scope']['visibility'] : null;\n if (!$ib_visibility || $ib_visibility === 'all') {\n return true;\n }\n if ($ib_visibility === 'nobody') {\n return false;\n }\n if ($ib_visibility === 'admin' && !$c_user->isAdmin()) {\n return false;\n }\n if ($ib_visibility === 'user' && $c_user->isGuest()) {\n return false;\n }\n if ($ib_visibility === 'guest' && !$c_user->isGuest()) {\n return false;\n }\n return true;\n }", "public function isFollowing(User $user) {\n /* This works, but it will return an ENTIRE collection, this can work for smaller datasets\n But this would become highly inefficient when we are dealing with MANY users. */\n // return $this->follows->containers($user);\n // -------------------------------------------------------------------------------------------\n // Below is more efficient as we utilize a 'where' clause to target the specific user to check.\n return $this->follows() // Return who this user follows\n ->where('following_user_id', $user->id) // Where the ID's match\n ->exists(); // And it exists\n }", "public function isOwner(UserObject $userObject){\n if(is_callable($this->checkOwner)){\n $check = $this->checkOwner;\n return $check($userObject);\n }\n CoreLog::debug('No checkOwner method defined');\n return false;\n }", "public function is($user) {\n if (is_null($user)) return false;\n \n return $this->username == $user->username;\n }", "public function is_user_historical_member($user, $group){\n\t\tif($user->exists() && $group->exists()){\n\t\t\t// Populate the users groups if not already done:\n\t\t\tif(!$user->are_groups_populated()){\n\t\t\t\t$user->populate_groups();\n\t\t\t}\n\t\t\t// Retrieve groups user is currently active with:\n\t\t\t$users_historical_groups = $user->get_historical_groups();\n\t\t\t// If users has no active groups then return false:\n\t\t\tif(!$user->get_historical_groups()){\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\t// Got this far? There's at least one group to check then:\n\t\t\tforeach($users_historical_groups as $historical_group){\n\t\t\t\tif($historical_group->data()->id == $group->data()->id)\n\t\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}", "public function isOwner(\\VMB\\UserBundle\\Entity\\User $user = null)\n {\n return $user && $this->getOwner() && $user->getId() == $this->getOwner()->getId();\n }", "public function is_available_for_user( $user ) {\n\t\t// Does this user have available codes?\n\t\tif ( 0 < self::codes_remaining_for_user( $user ) ) {\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "public function isBanned()\n\t{\n\t\treturn !is_null($this->banned_at);\n\t}", "function isBlogOwner( $pUserId=NULL ) {\n\t\t$ret = FALSE;\n\t\tglobal $gBitUser;\n\t\tif( empty( $pUserId ) && $gBitUser->isValid() ) {\n\t\t\t$pUserId = $gBitUser->mUserId;\n\t\t}\n\t\tif( $this->isValid() && ($pUserId == $this->mInfo[\"blog_user_id\"]) ) {\n\t\t\t$ret = 'y';\n\t\t}\n\t\treturn $ret;\n\t}", "public function is_banned($member)\n {\n $rows = $this->connection->query('SELECT * FROM ' . $this->connection->get_table_prefix() . 'banned WHERE uid=' . strval($member));\n if (empty($rows[0])) {\n return false; //the member is never banned\n } else {\n $ban_till = $rows[0]['lifted']; //the user is banned till this date/time\n }\n\n if ($ban_till === 0) {\n return true; //the member is permanently banned\n } elseif ($ban_till < time()) {\n return false; //the ban time is over\n } else {\n return true; //the member is still banned (not permanently banned)\n }\n }", "public function isFriend($user_id, $friend_uid) {\n $fs = FriendShip::where('user1_id', '=', $user_id)\n ->where('user2_id', '=', $friend_uid)\n ->first();\n if ($fs) {\n return true;\n } else {\n $fs = FriendShip::where('user1_id', '=', $friend_uid)\n ->where('user2_id', '=', $user_id)\n ->first();\n if ($fs) {\n return true;\n }\n }\n return false;\n }", "static function isCurrentUser(User $user) {\n return $user == self::currentUser();\n }", "protected function isBotOwner(User $user, Bot $bot)\n {\n return $user->id == $bot->user_id;\n }", "public function ban(User $mod, User $user) {\n return $mod->getLastStatus()->status == 'moderator' && \n $user->getLastStatus()->status != 'moderator' && \n $user->getLastStatus()->status != 'banned';\n }", "function is_user_connected_with($service){\n\tglobal $user_ID;\n\tswitch($service){\n\t\tcase 'facebook':\n\t\t\treturn (boolean) get_facebook_id($user_ID);\n\t\t\tbreak;\n\t\tdefault:\n\t\t\treturn false;\n\t\t\tbreak;\n\t}\n}", "public function isUserMember($group, $user_id)\n\t{\n\t\t$isJoined = DB::select(\"select user_id from group_user where user_id = $user_id and group_id = $group->id\");\n\n\t\tif (!empty($isJoined)) {\n\t\t\treturn true;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}", "public function isUttMember()\n\t{\n\t\treturn $this->isUser() && ! $this->user->getIsStudent() && ! $this->user->getKeepActive();\n\t}", "public function providerHasFriends(): bool;", "public function IsApplicable(User $oUser = null);", "function is_user_member_of_blog($user_id = 0, $blog_id = 0)\n {\n }", "function query_if_banned($pdo, $user_id, $ip)\n{\n if (!function_exists('ban_select')) {\n require_once QUERIES_DIR . '/bans.php';\n }\n $ban = isset($user_id) && $user_id != 0 ? ban_select_active_by_user_id($pdo, $user_id) : false; // user_id\n $ban = !$ban && isset($ip) ? ban_select_active_by_ip($pdo, $ip) : $ban; // ip if user_id isn't found\n return $ban;\n}", "function canAdd($user) {\n return $user->isPeopleManager();\n }", "private static function canShowAds( User $user ) {\n\t\tglobal $wgAdConfig, $wgTitle, $wgRequest;\n\n\t\tif ( !$wgAdConfig['enabled'] ) {\n\t\t\treturn false;\n\t\t}\n\n\t\t$effectiveGroups = MediaWikiServices::getInstance()->getUserGroupManager()->getUserEffectiveGroups( $user );\n\t\tif (\n\t\t\t$wgTitle instanceof Title && $wgTitle->isSpecial( 'Userlogin' ) ||\n\t\t\tin_array( 'staff', $effectiveGroups ) && !$wgRequest->getVal( 'forceads' )\n\t\t) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// No configuration for this skin? Bail out!\n\t\tif ( !isset( $wgAdConfig[self::determineSkin()] ) ) {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn true;\n\t}", "final public function blacklistDetect(int $user):bool{\n $b = $this->db->select('count(*)','jc_blacklist','bl_user_main='.intval($user).' and bl_user_black='.$this->user.'');\n return $b[0][0] > 0 ? true : false;\n }", "private function isUsernameAvailable($user) {\n $connect = $this->dc->connect();\n $username = $user->getUsername();\n \n $records = $connect->prepare('SELECT id,username,password FROM users WHERE username = :username');\n $records->bindParam(':username', $username);\n $records->execute();\n $results = $records->fetch(\\PDO::FETCH_ASSOC);\n\n return !$results;\n }", "public function hasUser();", "public function dashboard_owner($user) {\n return $this->id === auth()->id();\n }", "public function isBanned() {\n return $this->getStatus() === Status::BANNED;\n }", "public function isUserManager($user_id) {\r\n\r\n $query = $this->db->select_sum('id')\r\n ->where('id', $user_id)\r\n ->get(MANAGERS);\r\n\r\n if ($query->num_rows() > 0) {\r\n return ($query->row()->id != 0);\r\n }\r\n return false;\r\n }", "public function hasUser()\n {\n return $this->getUser() !== null;\n }", "public function isOwnedBy($user)\n {\n if (($user === null) || ($user->user_id === null)) {\n return false;\n } else {\n return ($user->user_id === $this->user_id);\n }\n }", "public function hasFollowUser(User $user): bool\n {\n return $this->favorites()->where([\n 'favorited_id'=> $user->id,\n 'favorited_type'=> 'user',\n ])->exists();\n }", "public function hasUser($user)\n {\n return $this->users->contains($user) || $user->ownsOrganization($this);\n }", "public function updateUserBuddy()\n {\n $conn = Db::getConnection();\n $statement = $conn->prepare(\"UPDATE user SET buddy= :buddy WHERE userID = :userBuddy\");\n $statement->bindParam(':buddy', $this->buddy);\n $statement->bindParam(':userBuddy', $this->userBuddy);\n $result = $statement->execute();\n return $result;\n }", "private function isUserBanned($conn, $site_id)\n {\n $banned = Ban::where('ip', $conn->remoteAddress)->where('active', 'yes')->where('site_id', $site_id)->first();\n if ($banned) {\n throw new UserIsBannedException('This IP address has been banned for '.$banned->duration.' days.');\n }\n }", "function isMember($user_id)\n\t{\n\t\t//get admin id\n\t\t$this->db->where('role', 1);\t\t\t\t\t\n\t\t$query = $this->db->get('users');\n\t\t$admin=$query->row();\n\t\tif($user_id == $admin->id)\n\t\t\treturn true;\n\t\t\t\n\t\t// get user that purchased membership\n\t\t$this->db->where('user_id', $user_id);\t\t\t\t\t\n\t\t$query = $this->db->get($this->table);\n\n\t\tif($query->num_rows())\n\t\t\treturn true;\n\t\telse\n\t\t\treturn false;\n\t}", "public function OtherUser(User $user)\n {\n if($user->auth_id == 2)\n {\n return true;\n }\n return false;\n }", "public function isBanned()\n {\n return (bool) $this->ban;\n }", "public function providerHasFriends(): bool\n {\n return $this->providerHasFriends;\n }", "private function isUser() : bool\n {\n return $this->role('user');\n }", "public function userExists( $user_name ) { return true;}", "public function isOwnedBy($user)\n {\n if (($entry = $this->getEntry())) {\n return $entry->isOwnedBy($user);\n } else {\n return false;\n }\n }", "public static function isMemberOf(User $user,String $groupname){\r\n foreach($user->groups as $group){\r\n if($groupname ==$group->name)\r\n return true;\r\n }\r\n return false;\r\n }", "public function accept(User $user)\n {\n return $user->isWaiter() ? false : true;\n }", "public function hasuser()\n {\n return is_object($this->luser);\n }", "public function isRegistered(User $user): bool\n {\n return $this->registered->contains($user);\n }", "public function getUserPresenceInGroupUsingTheGraphApi(string $user, string $group): bool {\n\t\t$user = $this->featureContext->getActualUsername($user);\n\t\t$userId = $this->featureContext->getAttributeOfCreatedUser($user, \"id\");\n\t\t$members = $this->theAdminHasRetrievedMembersListOfGroupUsingTheGraphApi($group);\n\t\t$found = false;\n\t\tforeach ($members as $member) {\n\t\t\tif ($member[\"id\"] === $userId) {\n\t\t\t\t$found = true;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\treturn $found;\n\t}", "public function viewAny(User $user)\n {\n return $user->banksampah || $user->pegawai->type === 'front';\n }", "public function isAllowedByIp(UserEntity $user)\n {\n if (!$user->isCoworker()) {\n return true;\n }\n\n $result = false;\n if ($ip = $this->remoteAddress->getIpAddress()) {\n foreach ($this->getWhiteIpRepository()->findAll() as $row) {\n $pattern = '/^' . str_replace('*', 'd{1,3}', preg_quote($row->getIp())) . '$/';\n if (preg_match($pattern, $ip)) {\n $result = true;\n break;\n }\n }\n }\n\n return $result;\n }", "public function isUser()\n\t{\n\t\tif( $this->permission != array_search( 'user', $this->permissions ) )\n\t\t\treturn false;\n\n\t\treturn true;\n\t}", "public function isWorker(User $userA, User $userB)\n {\n return $userA->user_uuid === $userB->uuid;\n }", "public function checkIfTestUser() \n {\n\n $user = Zend_Auth::getInstance()->getIdentity();\n\n // current user member of a test group\n if (true === is_object($user)\n && preg_match('/^test\\_/', $user->user_right_group_name)\n && false === strpos('test_', $this->_name)\n ) {\n return true;\n }\n return false;\n }" ]
[ "0.75472933", "0.6733165", "0.67187226", "0.66840756", "0.6410435", "0.6376252", "0.6372512", "0.63341963", "0.6269126", "0.6224369", "0.6159294", "0.6148677", "0.6112572", "0.60632855", "0.60569", "0.6052877", "0.5994839", "0.5983595", "0.5970851", "0.59702027", "0.59351295", "0.59276533", "0.5927202", "0.592292", "0.591737", "0.5895925", "0.58854264", "0.5868569", "0.58504856", "0.582304", "0.579769", "0.5773178", "0.57580376", "0.57546186", "0.5748794", "0.5740448", "0.57374686", "0.5736961", "0.5735586", "0.5722199", "0.5708973", "0.5705839", "0.5700301", "0.56956804", "0.56793886", "0.5673836", "0.5662751", "0.56469613", "0.56449586", "0.5638854", "0.56090593", "0.5596479", "0.5596248", "0.5576323", "0.5574891", "0.5569949", "0.5569401", "0.5567816", "0.5566342", "0.55644226", "0.556435", "0.555243", "0.5534784", "0.5534484", "0.55302185", "0.5526289", "0.5526216", "0.55161935", "0.55033046", "0.5494141", "0.5492981", "0.54862434", "0.548109", "0.5478133", "0.54736423", "0.54649585", "0.5464122", "0.5460124", "0.54591525", "0.5458089", "0.544618", "0.54435265", "0.5437933", "0.5433186", "0.54322785", "0.5426044", "0.54245114", "0.5423806", "0.54208577", "0.5419229", "0.5417799", "0.54134816", "0.5409941", "0.54085946", "0.5402374", "0.5399796", "0.53957963", "0.53912675", "0.53884804", "0.5382204" ]
0.7129828
1
Useful variables Builds the class
function __construct() { add_action( 'admin_menu', [$this, 'register_menu'] ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function build()\n\t{\n\t}", "abstract public function build();", "abstract public function build();", "public function build ()\n {\n }", "public function build()\n {\n }", "public function build();", "public function build();", "public function build();", "public function build();", "public function build();", "public function build();", "public function build();", "public function build() {}", "public function build() {}", "public function build() {}", "public abstract function build();", "public abstract function build();", "abstract function build();", "public function __construct()\n {\n self::build();\n }", "protected function build()\n {\n $this->global_variables = (new GlobalVariablesGenerator)->generate();\n }", "public function construct()\n\t\t{\n\t\t}", "function _construct() {\n \t\n\t\t\n\t}", "public static function get_build()\n {\n }", "public function useToBuild()\n {\n }", "public static function builder();", "public function fn_construct_class() {\n\t}", "public function construct() {\n\n }", "function _construct(){ }", "final private function __construct(){\r\r\n\t}", "protected function construct(){\n\n }", "function __construct(){\n\t\t// nowt much...\n\t}", "function __construct() ;", "private function __construct() {\r\n\t\t\r\n\t}", "function componentBuilder() { $this->__construct(); }", "final private function __construct() {\n\t\t\t}", "private function __construct() {\r\n\t\r\n\t}", "private function __construct(){}", "private function __construct(){}", "private function __construct(){}", "private function __construct(){}", "private function __construct(){}", "private function __construct(){}", "private function __construct(){}", "private function __construct(){}", "private function __construct(){}", "private function __construct(){}", "private function __construct(){}", "private function __construct(){}", "private function __construct(){}", "private function __construct(){}", "private function __construct(){}", "private function __construct(){}", "private function __construct(){}", "public function _construct()\n\t{\n\n\t}", "final private function __construct() {}", "final private function __construct() {}", "private function __construct() { \n\t\t\n\n\t}", "final private function __construct() { }", "final private function __construct() { }", "final private function __construct() { }", "private function __construct()\t{}", "function build() {\n $this->to_usd = new view_field(\"To USD\");\n $this->to_local = new view_field(\"To local\");\n $this->timestamp = new view_field(\"Created\");\n $this->expire_date_time = new view_field(\"Expired\");\n parent::build();\n }", "function __construct (){\n\t\t}", "private function __construct()\r\n\t{\r\n\t\r\n\t}", "private function buildClassDefinition()\n {\n $reflection = new \\ReflectionClass($this->context->getFullClassName());\n $haxeClass = new HaxeClass();\n $haxeClass\n ->setName($this->context->getClassName())\n ->setPackage(implode('.', explode('\\\\', $this->context->getCurrentNamespace())))\n ;\n\n $this->parseProperties($reflection, $haxeClass);\n $this->parseMethods($reflection, $haxeClass);\n\n return $haxeClass->transpile();\n }", "function __construct() {\n\n\t\t}", "public function __construct() { \n\t\t\n\n\t\t}", "function __construct() {\n\t\t\n\t//TODO - Insert your code here\n\t}", "final private function __construct()\n\t{\n\t}", "private function __construct () {}", "public function __construct()\n\t{\n\t\tparent::__construct();\n\t\t// ben duoi nay se la cac logic cua __construct lop con ma chung ta can dinh nghia - xu ly\n\t}", "public function __construct() {\n\t\t\n\t}", "public function __construct() {\n\t\t\n\t}", "public function __construct() {\n\t\t\n\t}", "public function __construct() {\n\t\t\n\t}", "public function __construct() {\n\t\t\n\t}", "public function __CONSTRUCT(){\n\t}", "function __constructor(){}", "public function build()\n {\n $this->classMetadata->appendExtension($this->getExtensionName(), [\n 'groups' => [\n $this->fieldName,\n ],\n ]);\n }", "private function __construct( )\n {\n\t}", "public function __construct()\n\t\t{\t\t\t\n\t\t}", "private function __construct()\n\t{\n\t\t\n\t}", "private function __construct(){\n \t\n }", "private function __construct() {\n\t\t}", "public function __construct() {\n\t\t//\n\t}", "public function __construct() {\n\t\t//\n\t}", "public function __construct() {\n\t\t//\n\t}", "public function __construct() {\n\t\t//\n\t}", "private function __construct()\r\r\n\t{\r\r\n\t}", "final private function __construct()\n {\n }", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}" ]
[ "0.78701484", "0.771804", "0.771804", "0.7673931", "0.7638226", "0.7635848", "0.7635848", "0.7635848", "0.7635848", "0.7635848", "0.7635848", "0.7635848", "0.7626493", "0.7626493", "0.76262945", "0.76046515", "0.76046515", "0.75697154", "0.7268967", "0.69457966", "0.68323207", "0.68203545", "0.6811658", "0.67568016", "0.6638923", "0.66336125", "0.6589241", "0.65419954", "0.6539372", "0.6529216", "0.6514684", "0.6436846", "0.64285374", "0.6415722", "0.64124876", "0.6403416", "0.63804424", "0.63804424", "0.63804424", "0.63804424", "0.63804424", "0.63804424", "0.63804424", "0.63804424", "0.63804424", "0.63804424", "0.63804424", "0.63804424", "0.63804424", "0.63804424", "0.63804424", "0.63804424", "0.63804424", "0.63678247", "0.6360262", "0.6360262", "0.6342757", "0.6341142", "0.6341142", "0.6341142", "0.6339721", "0.6339433", "0.63335603", "0.6332781", "0.6320519", "0.6306017", "0.62988967", "0.6289056", "0.6288074", "0.6285423", "0.62849414", "0.62742114", "0.62742114", "0.62742114", "0.62742114", "0.62742114", "0.626777", "0.626243", "0.6250491", "0.6249422", "0.62464654", "0.62382686", "0.62359786", "0.62354034", "0.62347174", "0.62347174", "0.62347174", "0.62347174", "0.6230981", "0.6227986", "0.6227721", "0.6227721", "0.6227721", "0.6227721", "0.6227721", "0.6227721", "0.6227721", "0.6227721", "0.6227721", "0.6227721", "0.6227721" ]
0.0
-1
Registers menu for admin panel
public function register_menu() { $parent_slug = 'comparrot'; $capability = 'manage_options'; add_menu_page( 'Comparrot', 'Comparrot', $capability, $parent_slug, [$this, 'import_from_csv_page'], 'dashicons-admin-page', 2 ); add_submenu_page( $parent_slug, __( 'Import from CSV', 'comparrot' ), __( 'Import from CSV', 'comparrot' ), $capability, $parent_slug, [$this, 'import_from_csv_page'] ); add_submenu_page( $parent_slug, __( 'General settings', 'comparrot' ), __( 'General settings', 'comparrot' ), $capability, 'comparrot-general-settings', [$this, 'general_settings_page'] ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function add_admin_menus()\n\t{\n\t}", "public function register_admin_menu(){\r\n $all_modules = HW_TGM_Module_Activation::get_register_modules();\r\n $module = $this->_option('module');\r\n $name = $module->module_name;\r\n $label = isset($all_modules[$name])? $all_modules[$name]['name'] : $name;\r\n\r\n $this->add_help_content(self::load_settings_page_hook_slug(HW_Module_Settings_page::PAGE_SLUG) ,$name , $label);\r\n }", "protected function registerAdminMenu()\n {\n /** @var \\Illuminate\\Events\\Dispatcher $dispatcher */\n $dispatcher = $this->app['events'];\n $dispatcher->listen('admin.menu.build', function (Item $menu) {\n $menu->add(Str::title('Analytics'), route('administrator.analytics.index'))->icon('info');\n });\n }", "protected function registerMenu()\n {\n }", "public function addAdminMenu()\n\t {\n\t add_menu_page('Create Metas', 'Create Metas', 'manage_options', 'create-metas', array( $this, 'optionsPage' ), 'dashicons-admin-tools', 66 );\n\t }", "public function add_menus() {\n add_action( 'admin_menu', array( 'Hotmembers3\\Admin_Pages_Creator', 'create_pages') );\n }", "static function admin_menu()\n\t{\n\t\t$icon = plugins_url( 'jumplead/assets/jumplead-icon.png' );\n\n\t\t// Main Menu\n\t\tadd_menu_page( 'Jumplead', 'Jumplead', 'edit_pages', 'jumplead', 'Jumplead::show_page_jumplead', $icon );\n\n\t\t// Subpages\n\t\tadd_submenu_page( 'jumplead', 'Integrations', 'Integrations', 'edit_pages', 'jumplead_integrations', 'Jumplead::show_page_integrations' );\n\t\tadd_submenu_page( 'jumplead', 'Settings', 'Settings', 'edit_pages', 'jumplead_settings', 'Jumplead::show_page_settings' );\n\t}", "function h_add_menus(array $args) {\n if (!is_admin()) { return;}\n\n $menu = new H_Sidenav($args);\n $menu->add();\n}", "function add_admin_menu() {\n\t\t$this->readme_page = new Launchable_AdminPage();\n\n\t\t$this->menu_id = add_menu_page(\n\t\t\t__( 'Launchable Options', $this->text_domain ), // Page Title\n\t\t\t__( 'Launchable', $this->text_domain ), // Menu Title\n\t\t\t'manage_options', // Capability\n\t\t\t$this->text_domain, // Slug\n\t\t\tarray(&$this->options_page, 'readme_page') );\n\n\t\t$this->options_page = new Launchable_AdminPage();\n\t\tadd_submenu_page(\n\t\t\t$this->text_domain, // Slug\n\t\t\t__( 'Readme', $this->text_domain ), // Page Title\n\t\t\t__( 'Readme', $this->text_domain ), // Menu Title\n\t\t\t'manage_options', // Capability\n\t\t\t'launchable-readme',//$this->text_domain, // Menu Slug\n\t\t\tarray(&$this->readme_page, 'readme_page') );\n\t}", "function templ_add_admin_menu_()\r\n{\r\n\tdo_action('templ_add_admin_menu_');\r\n}", "public function register_menu()\n {\n add_menu_page('Coupons Settings', 'Coupons Settings', 'edit_others_posts', 'wpm_coupons_settings');\n add_submenu_page('wpm_coupons_settings', 'Coupons Settings', 'Coupons Settings', 'manage_options', 'wpm_coupons_settings', function () {\n $settings = json_decode(get_option('api_settings', true), true);\n\n include 'templates/settings_template.php';\n });\n }", "public function adminmenu()\n {\n\n $vue = new ViewAdmin(\"Administration\");\n $vue->generer(array());\n }", "function admin_menu()\n {\n }", "function admin_menu()\n {\n }", "function admin_menu()\n {\n }", "public function admin_menu() {\n\n $capability = CL_Common::get_option( 'capability', 'general', 'manage_options' );\n\n $this->menu_page = add_options_page(\n __( 'Custom Login Settings', CUSTOM_LOGIN_DIRNAME ),\n __( 'Custom Login', CUSTOM_LOGIN_DIRNAME ),\n $capability,\n CUSTOM_LOGIN_DIRNAME,\n array( $this, 'settings_page' )\n );\n }", "public function registerMenu()\n\t\t{\n\t\t\tadd_options_page( 'Thingdom Settings', 'Thingdom Settings', 'manage_options', $this->slug, array($this, 'loadSettings')); \n\t\t\tadd_action('admin_init', array($this, 'registerSettings'));\n\t\t}", "function initAdminMenu() {\r\n\r\n\t\t$accounts_hook = $this->addMenu('accounts', ShoppWholesale::SHOPP_MENU_ROOT);\r\n\t\t$this->addMenu('account-review', $accounts_hook);\r\n\t\t$this->addMenu('account-settings', $accounts_hook);\r\n\t\t$this->addMenu('account-shortcode-help', $accounts_hook);\r\n\r\n\t\t//reorder menus\r\n\t\t$this->sendToBottom('Settings');\r\n\r\n\t}", "function adminMenu() {\r\n\t\t// TODO: This does not only create the menu, it also (only?) *does* sth. with the entries.\r\n\t\t// But those actions must be done before the menu is created (due to the redirects).\r\n\t\t// !Split the function!\r\n\t\t//$page = add_submenu_page('admin.php', __('UWR Ergebnisse'), __('UWR Ergebnisse'), 'edit_posts', 'uwr1results', array('Uwr1resultsController', 'adminAction'));\r\n\t\t$page = add_submenu_page('uwr1menu', __('UWR Ergebnisse'), __('UWR Ergebnisse'), UWR1RESULTS_CAPABILITIES, 'uwr1results', array('Uwr1resultsController', 'adminAction'));\r\n\t\tadd_action( 'admin_print_scripts-' . $page, array('Uwr1resultsView', 'adminScripts') );\r\n\t}", "public function add_menus()\n {\n }", "public function panel_register_menu() {\n\t\tadd_menu_page( Theme_Name, 'Theme Options', 'manage_options', 'optionsframework');\n\t}", "function add_admin_menu() {\r\n\t\tadd_management_page( __( 'RegenThumbs Stamina', 'regenthumbs-stamina' ), __( 'RegenThumbs Stamina', 'regenthumbs-stamina' ), 'manage_options', 'regenthumbs-stamina', array(&$this, 'regenerate_interface') );\r\n\t}", "public function admin_menu(&$menu)\n {\n\n\t}", "public function register_admin_menu() {\n\n\t\t\t$page_header_capability = apply_filters( 'astra_page_header_capability', 'edit_theme_options' );\n\n\t\t\tadd_submenu_page(\n\t\t\t\t'themes.php',\n\t\t\t\t__( 'Page Headers', 'astra-addon' ),\n\t\t\t\t__( 'Page Headers', 'astra-addon' ),\n\t\t\t\t$page_header_capability,\n\t\t\t\t'edit.php?post_type=astra_adv_header'\n\t\t\t);\n\t\t}", "public function add_admin_menus()\n {\n\n add_menu_page(\n 'Online Exam',\n 'Online Exam',\n 'manage_department',\n 'online_exam',\n function () {\n new \\OE\\includes\\html\\Manage_Department;\n },\n 'dashicons-text-page',\n );\n\n /**\n * adding theme setting menu to admin page\n */\n\n add_menu_page(\n 'OE Theme Setting',\n 'Theme Setting',\n 'manage_options',\n 'oe_theme_setting',\n function () {\n new \\OE\\includes\\html\\Theme_Setting;\n },\n 'dashicons-admin-generic',\n 98\n );\n\n /**\n * adding all the submens to admin page\n * this is teacher's submenu page\n */\n\n add_submenu_page(\n // parant slug\n 'online_exam',\n // page title\n \"Manage Teacher's\",\n // menu title\n \"Manage Teacher's\",\n // capability\n 'manage_teachers',\n // menu slug\n 'manage_teachers',\n // callback function\n function () {\n new \\OE\\includes\\html\\Manage_Teaher;\n },\n );\n\n /**\n * adding all the submens to admin page\n * this is all questions managing page\n */\n\n add_submenu_page(\n // parant slug\n 'online_exam',\n // page title\n \"Manage Questions\",\n // menu title\n \"Manage Questions\",\n // capability\n 'manage_questions',\n // menu slug\n 'manage_questions',\n // callback function\n function () {\n new \\OE\\includes\\html\\Manage_Question;\n },\n );\n\n /**\n * adding all the submens to admin page\n * this is all questions managing page\n */\n\n add_submenu_page(\n // parant slug\n 'online_exam',\n // page title\n \"Exam Routine\",\n // menu title\n \"Exam Routine\",\n // capability\n 'manage_routine',\n // menu slug\n 'manage_routine',\n // callback function\n function () {\n new \\OE\\includes\\html\\Exam_Routine;\n },\n );\n\n /**\n * adding all the submens to admin page\n * this is all questions managing page\n */\n\n add_submenu_page(\n // parant slug\n 'online_exam',\n // page title\n \"Manage Students\",\n // menu title\n \"Manage Students\",\n // capability\n 'manage_students',\n // menu slug\n 'manage_students',\n // callback function\n function () {\n new \\OE\\includes\\html\\Manage_Student;\n },\n );\n\n /**\n * adding create all question page according to question folder\n * this is question creation page\n */\n if (isset($_GET['exam_folder_id'])) {\n add_submenu_page(\n // parant slug\n 'online_exam',\n // page title\n \"Create Qustion\",\n // menu title\n \"Create Qustion\",\n // capability\n 'create_question',\n // menu slug\n 'create_question',\n // callback function\n function () {\n new \\OE\\includes\\html\\Create_Qustion;\n },\n );\n }\n\n /**\n * adding student performence page according to question folder\n * this is question creation page\n */\n if (isset($_GET['current_folder_id'])) {\n add_submenu_page(\n // parant slug\n 'online_exam',\n // page title\n \"Student's Performence\",\n // menu title\n \"Student's Performence\",\n // capability\n 'student_performence',\n // menu slug\n 'student_performence',\n // callback function\n function () {\n new \\OE\\includes\\html\\Student_Performence;\n },\n );\n }\n\n /**\n * adding individual performence page according to question folder\n * this is question creation page\n */\n if (isset($_GET['performence_folder_id'])) {\n add_submenu_page(\n // parant slug\n 'online_exam',\n // page title\n \"\" . $_GET['student_name'] . \"'s Performence\",\n // menu title\n \"\" . $_GET['student_name'] . \"'s Performence\",\n // capability\n 'individual_performence',\n // menu slug\n 'individual_performence',\n // callback function\n function () {\n new \\OE\\includes\\html\\Individual_Performence;\n },\n );\n }\n\n /**\n * renaming online exam menu\n */\n\n $this->admin_menu_rename();\n }", "public function addAdminMenu() {\n add_submenu_page(\n 'options-general.php',\n __('NC State WRAP Auth', 'ncstate-wrap-authentication'),\n __('NC State WRAP Auth', 'ncstate-wrap-authentication'),\n 'edit_plugins',\n 'ncstate-wrap-authentication',\n array($this, 'settingsPage')\n );\n }", "public function addMenu()\n {\n $wpMenu = [\n [\n 'Bolsista',\n 'Bolsista',\n 'edit_pages',\n 'bolsista',\n $this,\n 'doAction',\n 'dashicons-format-aside',\n 2\n ]\n ];\n $wpSubMenu = [];\n $this->addMenuItem($wpMenu, $wpSubMenu);\n }", "public function register_menus() {\n // register_nav_menus(array(\n // 'header_menu' => 'Header Navigation Menu'\n // ));\n }", "function add_menu() {\n add_menu_page(\"Polls\", \"Polls\", \"administrator\", \"polls\", \"managePollsPage\");\n}", "protected function adminMenu()\n {\n \\add_submenu_page(\n 'options-general.php',\n \\esc_html__('WP REST API Cache', 'wp-rest-api-cache'),\n \\esc_html__('REST API Cache', 'wp-rest-api-cache'),\n self::CAPABILITY,\n self::MENU_SLUG,\n function () {\n $this->renderPage();\n }\n );\n }", "function jigoshop_admin_menu() {\n\tglobal $menu;\n\t\n\t$menu[] = array( '', 'read', 'separator-jigoshop', '', 'wp-menu-separator jigoshop' );\n\t\n add_menu_page(__('Jigoshop'), __('Jigoshop'), 'manage_options', 'jigoshop' , 'jigoshop_dashboard', jigoshop::plugin_url() . '/assets/images/icons/menu_icons.png', 55);\n add_submenu_page('jigoshop', __('Dashboard', 'jigoshop'), __('Dashboard', 'jigoshop'), 'manage_options', 'jigoshop', 'jigoshop_dashboard'); \n add_submenu_page('jigoshop', __('General Settings', 'jigoshop'), __('Settings', 'jigoshop') , 'manage_options', 'settings', 'jigoshop_settings');\n add_submenu_page('jigoshop', __('System Info','jigoshop'), __('System Info','jigoshop'), 'manage_options', 'sysinfo', 'jigoshop_system_info');\n add_submenu_page('edit.php?post_type=product', __('Attributes','jigoshop'), __('Attributes','jigoshop'), 'manage_options', 'attributes', 'jigoshop_attributes');\n}", "public function add_admin_menu() {\n\n extract( $this->args );\n\n if( $menu_type === 'submenu' ) {\n\n $menu_page = call_user_func( 'add_submenu_page', $menu_parent, $menu_title, $menu_title, $menu_capability, $menu_slug, array( &$this, 'add_options_html' ) );\n\n } else {\n\n $menu_page = call_user_func( 'add_menu_page', $menu_title, $menu_title, $menu_capability, $menu_slug, array( &$this, 'add_options_html' ), $menu_icon, $menu_position );\n\n if( ! empty( $this->args['show_sub_menu'] ) && count( $this->pre_tabs ) > 1 ) {\n\n // create submenus\n $tab_key = 1;\n foreach ( $this->pre_tabs as $section ) {\n\n call_user_func( 'add_submenu_page', $menu_slug, $section['title'], $section['title'], $menu_capability, $menu_slug .'#tab='. $tab_key, '__return_null' );\n\n if( ! empty( $section['subs'] ) ) {\n $tab_key += ( count( $section['subs'] )-1 );\n }\n\n $tab_key++;\n\n }\n\n remove_submenu_page( $menu_slug, $menu_slug );\n\n }\n\n if( ! empty( $menu_hidden ) ) {\n remove_menu_page( $menu_slug );\n }\n\n }\n\n add_action( 'load-'. $menu_page, array( &$this, 'add_page_on_load' ) );\n\n }", "static function addMenus()\n {\n add_menu_page(\n // string $page_title The text to be displayed in the title tags\n // of the page when the menu is selected\n __('Projecten plugin Admin', 'projecten-plugin'),\n // string $menu_title The text to be used for the menu\n __('Projecten plugin', 'projecten-plugin'),\n // string $capability The capability required for this menu to be displayed to the user.\n 'manage_options',\n // string $menu_slug The slug name to refer to this menu by (should be unique for this menu)\n 'projecten plugin',\n // callback $function The function to be called to output the content for this page.\n array('ProjectenPlugin_AdminController', 'adminMenuPage'),\n // string $icon_url The url to the icon to be used for this menu.\n // * Pass a base64-encoded SVG using a data URI, which will becolored to match the color scheme.\n // This should begin with 'data:image/svg+xml;base64,'.\n // * Pass the name of a Dashicons helper class to use a fonticon, e.g.\n 'dashicons-chart-pie' .\n // * Pass 'none' to leave div.wp-menu-image empty so an icon can be added via CSS.\n PROJECTEN_PLUGIN_INCLUDES_IMGS_DIR . '/icon.png'\n // int $position The position in the menu order this one should appear\n );\n add_submenu_page(\n // string $parent_slug The slug name for the parent menu \n // (or the file name of a standard WordPress admin page) \n 'my-event-organiser-admin',\n // string $page_title The text to be displayed in the title tags of the page when the menu is selected \n __('event_type', 'my-event-organiser'),\n // string $menu_title The text to be used for the menu \n __('Event Type', 'my-event-organiser'),\n // string $capability The capability required for this menu to be displayed to the user. \n 'manage_options',\n // string $menu_slug The slug name to refer to this menu by (should be unique for this menu) \n 'meo_admin_event_types',\n // callback $function The function to be called to output the content for this page. \n array('ProjectenPlugin_AdminController', 'adminSubMenuProjecten')\n\n\n );\n }", "private function set_admin_menu() {\n $TSB_settings_admin_menu = new Admin_Menu( Initial_Value::TSB_main_settings_page() );\n $this->loader->add_action( 'admin_menu', $TSB_settings_admin_menu, 'add_admin_menu_page' );\n\n// $plugin_name_sample_admin_sub_menu1 = new Admin_Sub_Menu( Initial_Value::sample_sub_menu_page1() );\n// $this->loader->add_action( 'admin_menu', $plugin_name_sample_admin_sub_menu1, 'add_admin_sub_menu_page' );\n//\n// $plugin_name_sample_admin_sub_menu2 = new Admin_Sub_Menu( Initial_Value::sample_sub_menu_page2() );\n// $this->loader->add_action( 'admin_menu', $plugin_name_sample_admin_sub_menu2, 'add_admin_sub_menu_page' );\n\n }", "public function adminMenu()\n\t{\n\t\t$this->app['events']->listen('routes.finish', function()\n\t\t{\n\t\t\tif (! $user = $this->app['auth']->user() ) return;\n\n\t\t\t$menu = $this->app['menu']->menu('admin-header-nav');\n\t\t\t\t$menu->setAttributes(array('class' => 'eight columns'));\n\n\t\t\t$usersMenu = $menu->item('users', 'Users');\n\t\t\t\t$usersMenu->item('manage-users', 'Manage users', route('admin.user.index'));\n\n\t\t\t$profileMenu = $menu->item('user', $user->name, route('admin.profile'));\n\t\t\t\t$profileMenu->item('logout', 'Log Out', route('logout'));\n\t\t});\n\t}", "function registrar_menu() {\nregister_nav_menu('menuprincipal', __('Menu Principal'));\n}", "public function adminMenu()\n {\n add_menu_page( 'Barcode', 'Barcode', 'manage_options', 'wp-barcode', [$this, 'adminPage'] );\n }", "function polizeipresse_create_admin_menu() {\r\n\tif(current_user_can('manage_options')){\r\n\t\t// Create new top-level menu\r\n\t\tadd_options_page('Polizeipresse-Plugin',\r\n\t\t\t\t\t\t 'Polizeipresse',\r\n\t\t\t\t\t\t 'manage_options',\r\n\t\t\t\t\t\t 'polizeipresse_options',\r\n\t\t\t\t\t\t 'polizeipresse_option_page');\r\n\t}\r\n}", "public function addMenu(){\n\t\tadd_menu_page(\n\t\t\t$this->plugin->name,\n\t\t\t$this->plugin->name,\n\t\t\t'publish_pages',\n\t\t\t$this->plugin->varName,\n\t\t\tarray($this, 'page'),\n\t\t\t$this->plugin->uri . 'assets/images/icn-menu.png'\n\t\t);\n\t}", "public function add_admin_menu()\n\n {\n\n\n\n $page_title = 'Trip Booking';\n\n $menu_title = 'Trip Booking';\n\n $capability = 'manage_options';\n\n\n\n $menu_slug = 'trip-booking';\n\n $icon_url = 'dashicons-image-filter';\n\n $position = 7;\n\n\n\n add_menu_page($page_title, $menu_title, $capability, $menu_slug, array($this, 'trip_booking_admin'), $icon_url, $position);\n\n \n\n }", "public function admin_menu() {\n\t\tadd_menu_page( 'Sharaz setting', 'sharaz setting', 'manage_options', 'ss_page', array(\n\t\t\t$this,\n\t\t\t'plugin_page'\n\t\t), 'edit', 75 );\n\t}", "static function admin_init ()\n {\n add_menu_page(\n __x('People', 'admin menu page title'),\n __x('People', 'admin menu title'),\n 'read',\n 'epfl-people',\n null, // Render callback\n 'dashicons-calendar', // Icon type\n 70 // Position\n );\n }", "function create_admin_menu()\n {\n add_menu_page(\n 'Mattevideo Exercises', //page title\n 'Mattevideo Exercises', //menu title\n 'manage_options', //capabilities\n 'mattevideo_exercise', //menu slug\n array($this, 'mattevideo_exercise') //function\n );\n add_submenu_page('mattevideo_exercise', //parent slug\n 'Create Exercise', //page title\n 'Create Exercise', //menu title\n 'manage_options', //capability\n 'create_exercise', //menu slug\n array($this, 'create_exercise')); //function\n }", "public function registerMenus() {\n $locations = array();\n foreach (Project::$menus as $slug => $name) {\n $locations[$slug] = __($name, Project::$projectNamespace);\n }\n register_nav_menus($locations);\n }", "function admin_menu() {\n\t\tif ( class_exists( 'Jetpack' ) )\n\t\t\tadd_action( 'jetpack_admin_menu', array( $this, 'load_menu' ) );\n\t\telse\n\t\t\t$this->load_menu();\n\t}", "public static function wpa_add_menu() {\n add_menu_page('Main Menu','Home','manage_options','Sub-menu');\n add_submenu_page('Sub-menu','User List','User List','manage_options','menu-list',array( __CLASS__,'wpa_page_file_path'));\n add_submenu_page('Sub-menu','Add User','Add User','manage_options','menu-add',array(__CLASS__,'wpa_page_file_path'));\n }", "public function register_admin_menu() {\n\n\t\t//menu page\n\t\t$menu_page = add_submenu_page( 'woocommerce', __( 'Product Fee', WOOAFPP_TEXTDOMAIN ), __( 'Product Fee', WOOAFPP_TEXTDOMAIN ), 'manage_options', 'wooafpp_settings', array( $this,'add_menu_settings_page' ) );\n\t}", "function admin_menu() {\n\t\t// Set Admin Access Level\n\t\tif(!$this->options['access_level']): \n\t\t\t$access = 'edit_dashboard';\n\t\telse: \n\t\t\t$access = $this->options['access_level'];\n\t\tendif;\n\t\t\n\t\t// Create Menu Items \n\t\tadd_options_page('Escalate Network', 'Escalate Network', $access, 'escalate-network-options', array($this, 'settings_page'));\n\t}", "function sr_frontpage_admin_menu() {\n add_menu_page(\n 'Home Sections',\n 'Home Sections',\n 'manage_options',\n 'front-sections',\n '',\n 'dashicons-admin-home',\n 40\n );\n}", "public function add_admin_menu()\r\n\t{\r\n\t add_menu_page(__('BookingSearch','Booking-search'), __('BookingSearch','Booking-search'), 'manage_options', 'bookingSearch', array($this, 'menu_html'));\r\n\t}", "function jpa_menu_administrator()\n{\n add_menu_page(JPA_NOMBRE,JPA_NOMBRE,'manage_options',JPA_RUTA . '/admin/jpa-configuration.php');\n add_submenu_page(JPA_RUTA . '/admin/jpa-configuration.php','Add resource','Add resource','manage_options',JPA_RUTA . '/admin/jpa-add_resource.php');\n}", "public function add_menu() {\n\t\t\tadd_menu_page(\n\t\t\t\t'Amazon Affiliate | Products',\n\t\t\t\t'Products',\n\t\t\t\t'manage_options',\n\t\t\t\t'amz-affiliate/pages/product.php',\n\t\t\t\tarray( &$this, 'load_product_page' ),\n\t\t\t\tplugins_url( 'amz-affiliate/img/icon.png' ),\n\t\t\t\t50\n\t\t\t);\n\t\t\tadd_submenu_page(\n\t\t\t\t'amz-affiliate/pages/product.php',\n\t\t\t\t'Amazon Affiliate | Tables',\n\t\t\t\t'Tables',\n\t\t\t\t'manage_options',\n\t\t\t\t'amz-affiliate/pages/table.php',\n\t\t\t\tarray( &$this, 'load_table_page' )\n\t\t\t);\n\t\t}", "public function admin_menu() {\n // Duplicate link into properties mgmt\n \tadd_submenu_page(\n \t\tself::SLUG,\n \t\t__('Settings'),\n \t\t__('Settings'),\n \t\t'manage_options',\n \t\tself::SLUG,\n \t\t1\n \t);\n }", "function iswform_admin_menu() {\n add_options_page('PLUGIN-NAME', 'PLUGIN-NAME', 'manage_options', 'iswform', 'iswform_options_page');\n\n // Add a new submenu under tools\n add_management_page('PLUGIN-NAME', 'PLUGIN-NAME', 'manage_options', 'iswform-tool', 'iswform_management_page' );\n\n // Add top-level menu item at position 3, with a icon\n add_menu_page('Example', 'Example', 'manage_options', 'iswform-example', null, 'dashicons-palmtree', 3);\n // Add a sub menu item\n add_submenu_page('mt-example', 'Sub example', 'Sub example', 'manage_options', 'mt-example', 'iswform_page_example');\n\n}", "function nt_admin_menus(){\r\n\t\t// \t\t\t\t\t\t\t\t\t\t\tcallable $function = '', string $icon_url = '', int $position = null )\r\n\t\tadd_menu_page(\r\n\t\t\t__( 'Settings', 'newTheme'),\r\n\t\t\t__( 'NewTheme', 'newTheme'),\r\n\t\t\t'edit_theme_options',\r\n\t\t\t'nt_theme_options_page',\r\n\t\t\t'nt_theme_options_function'\r\n\t\t);\t\r\n\r\n\t\t//add_submenu_page( string $parent_slug, string $page_title, string $menu_title, string $capability, string $menu_slug, \r\n\t\t//\t\t\t\t\t\t\tcallable $function = '' )\r\n\t\tadd_submenu_page( \r\n\t\t\t'nt_theme_options_page', \r\n\t\t\t__( 'Settings', 'newTheme'), \r\n\t\t\t__( 'NewTheme options', 'newTheme'),\r\n\t\t\t'edit_theme_options',\r\n\t\t\t'nt_theme_options_page',\r\n\t\t\t'nt_theme_options_function'\r\n \t);\r\n\t}", "function mkRegisterMenu() {\n \n register_nav_menu('primary', 'Main Menu');\n \n }", "function register_plugin_menu(){\n add_menu_page( 'Rss Multi Updater', 'Rss Multi Updater', 'manage_options', 'RssMultiUpdater', array(&$this, 'admin_page'), '', 26 ); \n \n }", "public function addAdminMenuPage()\n\t{\n\t\t$menuPage = &ModelAdminMenu::getScheme();\n\n\t\tforeach ( $menuPage as $menu ) {\n\t\t\t$callback = array_keys( $menu );\n\t\t\t$paramArr = array_values( $menu );\n\n\t\t\t$this->_adminMenuPage( $callback[0], $paramArr[0]['parameters'] );\n\t\t}\n\t}", "function templ_add_mainadmin_menu_()\r\n{\r\n\t$menu_title = __('Tevolution', 'templatic');\r\n\tif (function_exists('add_object_page'))\r\n\t{\r\n\t\t$hook = add_menu_page(\"Admin Menu\", $menu_title, 'administrator', 'templatic_system_menu', 'dashboard_bundles', '',25); /* title of new sidebar*/\r\n\t}else{\r\n\t\tadd_menu_page(\"Admin Menu\", $menu_title, 'administrator', 'templatic_wp_admin_menu', 'design','');\t\t\r\n\t} \r\n}", "function admin_menu(){\n\t\t//Add the containing menu\n\t\tadd_menu_page(\n\t\t\t'Club Manager',\n\t\t\t'Club Manager',\n\t\t\t'clubMemberZone_access_memberZone',\n\t\t\t'clubMemberZone-memberZone',\n\t\t\tarray (&$this, 'load_view')\n\t\t\t//$this->pPlugin_url.'club-manager.png'\n\t\t\t);\n\n\t\t//add the submenus\n\t\tadd_submenu_page( 'clubMemberZone-memberZone' , \t'Zone membre',\t\t'Zone membre',\t\t'clubMemberZone_access_memberZone',\t'clubMemberZone-memberZone',\tarray(&$this, 'load_view'));\n\t\tadd_submenu_page( 'clubMemberZone-memberZone' , \t'Mes groupes',\t\t'Mes groupes',\t\t'clubMemberZone_access_membership',\t'clubMemberZone-memberships',\tarray(&$this, 'load_view'));\n\t\tadd_submenu_page( 'clubMemberZone-memberZone' , \t'Zone publication',\t'Zone publication',\t'clubMemberZone_access_publishZone',\t'clubMemberZone-publishZone',\tarray(&$this, 'load_view'));\n\t\tadd_submenu_page( 'clubMemberZone-memberZone' , \t'Groupes',\t\t\t'Groupes',\t\t\t'clubMemberZone_edit_groups',\t\t\t'clubMemberZone-groups',\t\tarray(&$this, 'load_view'));\n\t}", "public static function admin_menu() {\n\t\t$title = 'Micropub';\n\t\t// If the IndieWeb Plugin is installed use its menu.\n\t\tif ( class_exists( 'IndieWeb_Plugin' ) ) {\n\t\t\t$options_page = add_submenu_page(\n\t\t\t\t'indieweb',\n\t\t\t\t$title,\n\t\t\t\t$title,\n\t\t\t\t'manage_options',\n\t\t\t\t'micropub',\n\t\t\t\tarray( static::class, 'settings_page' )\n\t\t\t);\n\t\t} else {\n\t\t\t$options_page = add_options_page(\n\t\t\t\t$title,\n\t\t\t\t$title,\n\t\t\t\t'manage_options',\n\t\t\t\t'micropub',\n\t\t\t\tarray( static::class, 'settings_page' )\n\t\t\t);\n\t\t}\n\n\t}", "public function addAdminMenuEntries(): void {\n foreach ($this->adminPages as $page) {\n (new $page($this->container));\n }\n }", "function register_menu() {\n\n register_nav_menu('header-menu',__('Header Menu'));\n\n}", "function admin_landing_page() {\n add_menu_page( 'Welcome | All Cycles Admin', 'Welcome', 'manage_options', 'admin_landing_page', 'create_admin_page', 'dashicons-menu', 5 );\n}", "public function adminMenu()\r\n {\r\n add_meta_box('wpGoogleMaps', 'Google Maps for WordPress', array($this, 'insertForm'), 'post', 'normal');\r\n add_meta_box('wpGoogleMaps', 'Google Maps for WordPress', array($this, 'insertForm'), 'page', 'normal');\r\n if ( function_exists('add_submenu_page') ) {\r\n $page = add_submenu_page('plugins.php', __('wpGoogleMaps Configuration'), __('wpGoogleMaps Configuration'), 'manage_options', 'wpGoogleMaps-config', array($this, 'configPage'));\r\n add_action( 'admin_print_scripts-'.$page, array($this, 'printScripts') );\r\n }\r\n }", "private function registerMenus()\n {\n if (!isset($this->config['menus'])) {\n return;\n }\n\n $menus = $this->config['menus'];\n add_action('init', function () use ($menus) {\n register_nav_menus($menus);\n });\n }", "function lcarsframework_admin_bar() {\n\n\t\t$menu = $this->menu_settings();\n\t\tglobal $wp_admin_bar;\n\n\t\t$wp_admin_bar->add_menu( array(\n\t\t\t'parent' => 'appearance',\n\t\t\t'id' => 'of_theme_lcars',\n\t\t\t'title' => __( 'Theme lcars', 'lcarsframework' ),\n\t\t\t'href' => admin_url( 'themes.php?page=' . $menu['menu_slug'] )\n\t\t) );\n\t}", "private function instantiate_admin_pages() {\n $this->admin_objs[ 'menu' ] = new HRHS_Admin_Menu();\n }", "public function adminMenu() {\n\t\t$cap = is_multisite() ? 'manage_network_options' : 'manage_options';\n\t\t$action = \"actionIndex\";\n\t\tadd_submenu_page( 'wp-defender', esc_html__( \"IP Lockouts\", \"defender-security\" ), esc_html__( \"IP Lockouts\", \"defender-security\" ), $cap, $this->slug, array(\n\t\t\t&$this,\n\t\t\t$action\n\t\t) );\n\t}", "function omega_register_menus() {\n\tregister_nav_menu( 'primary', _x( 'Primary', 'nav menu location', 'omega' ) );\n}", "public function registerMenu()\n\t{\n\t\t$permission = 'manage_network';\n\t\t$renderMethodName = 'renderNetwork';\n\t\t$networkMenuTitle = esc_html__('Active Directory Integration', 'next-active-directory-integration');\n\t\t$networkMenuSlug = $this->blogProfileRelationshipPage->getSlug(); // the header of the group must have the slug of the first item\n\n\t\t// add menu header\n\t\tadd_menu_page($networkMenuTitle, $networkMenuTitle, $permission, $networkMenuSlug);\n\n\t\t// add sub menus\n\t\t$this->addSubMenu($networkMenuSlug, $permission, $this->blogProfileRelationshipPage, $renderMethodName);\n\t\t$profileConfigurationPage = $this->addSubMenu($networkMenuSlug, $permission, $this->profileConfigurationPage, $renderMethodName);\n\n\t\tadd_action('admin_enqueue_scripts', array($this, 'loadScriptsAndStyle'));\n\t\tadd_action('load-' . $profileConfigurationPage, array($this, 'addHelpTab'));\n\t}", "function elzero_add_menu() {\n // register_nav_menu('manin-menu', __('Main Navigation Menu'));\n register_nav_menus(array(\n 'main-menu' => 'Main Navigation Menu',\n 'footer-menu' => 'Footer Classic Menu'\n ));\n}", "public function add_menu_page()\n\t{\n\t\tadd_menu_page( \n\t\t\t'mmenu',\n\t\t\t'mmenu',\n\t\t\t'manage_options',\n\t\t\t'mmenu',\n\t\t\tarray( $this, 'create_admin_page' ),\n\t\t\t'dashicons-menu'\n\t\t);\n\t}", "function admin_menu() {\n\t\tadd_menu_page(\n\t\t\t__( 'Display Sitewide Notice', 'mfsn' ),\n\t\t\t__( 'Sitewide Notice', 'mfsn' ),\n\t\t\t'edit_pages',\n\t\t\t'mfsn',\n\t\t\tarray(\n\t\t\t\t$this,\n\t\t\t\t'settings_page_callback'\n\t\t\t),\n\t\t\t'dashicons-megaphone',\n\t\t);\n\t}", "public function add_menu_items () {\n\t\t\n\t\t//add menu in wordpress dashboard\n\n\t\tadd_submenu_page(\n\t\t\t'ltple-settings',\n\t\t\t__( 'Affiliate Commissions', $this->plugin->slug ),\n\t\t\t__( 'Affiliate Commissions', $this->plugin->slug ),\n\t\t\t'edit_pages',\n\t\t\t'edit.php?post_type=affiliate-commission'\n\t\t);\n\t\t\n\t\tadd_users_page( \n\t\t\t'All Affiliates', \n\t\t\t'All Affiliates', \n\t\t\t'edit_pages',\n\t\t\t'users.php?' . $this->parent->_base .'view=affiliates'\n\t\t);\n\t}", "public static function add_admin_menu() {\n\t\t\tadd_menu_page(\n\t\t\t\tesc_html__( 'Theme Settings', 'text-domain' ),\n\t\t\t\tesc_html__( 'Theme Settings', 'text-domain' ),\n\t\t\t\t'manage_options',\n\t\t\t\t'theme-settings',\n\t\t\t\tarray( 'IODD_Theme_Options', 'create_admin_page' )\n\t\t\t);\n\t\t}", "public function register_menus() {\n\t\t\tadd_management_page(\n\t\t\t\t__( 'Child Theme Generator', 'if-child-gen' ),\n\t\t\t\t__( 'Child Theme Generator', 'if-child-gen' ),\n\t\t\t\t'edit_theme_options',\n\t\t\t\t$this->plugin_slug,\n\t\t\t\tarray( $this, 'options_page_output' )\n\t\t\t);\n\t\t}", "public function adminMenu() {\n add_submenu_page(\n 'tools.php',\n self::NAME,\n self::NAME,\n 'import',\n __CLASS__ . '_opt_menu',\n array(&$this, 'showBackupPage')\n );\n }", "function register_plugin_menu(){\r\n add_menu_page( 'Aw Social Tabs', 'Aw Social Tabs', 'manage_options', 'awsocialtabs', array('AwstAdminPages', 'plugin_homepage'), 'dashicons-share', 6 );\r\n add_submenu_page('awsocialtabs', 'Aw Social Tabs | settings', 'Settings', 'manage_options','awst_settings', array('AwstAdminPages', 'awst_settings'));\r\n add_submenu_page('', 'Aw Social Tabs | Likes', 'Likes', 'manage_options','awst_likes', array('AwstAdminPages', 'awst_likes'));\r\n add_submenu_page('', 'Aw Social Tabs | Ratings', 'Ratings', 'manage_options','awst_ratings', array('AwstAdminPages', 'awst_ratings'));\r\n add_submenu_page('', 'Aw Social Tabs | Review', 'Review', 'manage_options','awst_review', array('AwstAdminPages', 'awst_review'));\r\n }", "function register_my_menu() {\n register_nav_menu('main-menu',__( 'Navegador Primario' ));\n }", "function elhero_register_menu()\r\n{\r\n //register_nav_menu('bootstrap-menu',__('Bootstrap Navigation Bar'));\r\n register_nav_menus( array(\r\n 'bootstrap-menu' => 'Bootstrap Navigation Bar',//create location\r\n 'footer-menu' => 'Footer-menu'//to add new location to wordpress dashboard menu \r\n //name => location_name\r\n ) );\r\n}", "function register_menu() {\n\tregister_nav_menu('primary-menu', __('Primary Menu'));\n}", "function anipics_add_main_menu(){\n register_nav_menu('main_menu', 'Menu principal');\n}", "function add_menu_page() {\n add_menu_page(\n __( 'Theme Panel - Addons', 'athen_transl' ),\n 'Theme Panel - Addons', // menu title - can't be translated because it' used for the $hook prefix\n 'manage_options',\n ATHEN_THEME_PANEL_SLUG,\n '',\n 'dashicons-admin-generic',\n null\n );\n }", "function admin_menu() {\n\t\t// The designation of add_MANAGEMENT_page causes the menu item to be listed under the Tools menu!\n\t\tadd_management_page('Revitalize Orders Output', 'Revitalize Orders', 'edit_posts', basename(__FILE__), array(&$this, 'page_handler'));\n\t}", "public function admin_menu() {\n\t\t// Load abstract page class.\n\t\trequire_once SF_ABSPATH . '/includes/settings/class-socialflow-admin-settings-page.php';\n\t\t// Load page classes.\n\t\trequire_once SF_ABSPATH . '/includes/settings/class-socialflow-admin-settings-general.php';\n\t\trequire_once SF_ABSPATH . '/includes/settings/class-socialflow-admin-settings-accounts.php';\n\t\trequire_once SF_ABSPATH . '/includes/settings/class-socialflow-admin-settings-messages.php';\n\t\trequire_once SF_ABSPATH . '/includes/settings/class-socialflow-admin-settings-categories.php';\n\n\t\t// Init menu classes.\n\t\tnew SocialFlow_Admin_Settings_General();\n\t\tnew SocialFlow_Admin_Settings_Accounts();\n\t\t// new SocialFlow_Admin_Settings_Categories.\n\t\t// new SocialFlow_Admin_Settings_Messages.\n\t}", "function wp_admin_bar_new_content_menu($wp_admin_bar)\n {\n }", "static function create_menu() {\n add_submenu_page('plugins.php', 'Luminous Settings', 'Luminous settings',\n 'administrator', 'luminous-handle', 'luminouswp::settings_view');\n }", "public function admin_menu()\n\t\t{\n\t\t\tif (current_user_can('manage_options')):\n\t\t\t\t$this->hook_suffix = add_options_page(__('Mailgun', 'mailgun'), __('Mailgun', 'mailgun'),\n\t\t\t\t\t'manage_options', 'mailgun', array(&$this, 'options_page'));\n\t\t\t\tadd_options_page(__('Mailgun Lists', 'mailgun'), __('Mailgun Lists', 'mailgun'), 'manage_options',\n\t\t\t\t\t'mailgun-lists', array(&$this, 'lists_page'));\n\t\t\t\tadd_action(\"admin_print_scripts-{$this->hook_suffix}\", array(&$this, 'admin_js'));\n\t\t\t\tadd_filter(\"plugin_action_links_{$this->plugin_basename}\", array(&$this, 'filter_plugin_actions'));\n\t\t\t\tadd_action(\"admin_footer-{$this->hook_suffix}\", array(&$this, 'admin_footer_js'));\n\t\t\tendif;\n\t\t}", "public function addMenuPage()\n {\n $hook = add_options_page(\n __('Wistia Integration Settings'),\n __('Wistia'),\n 'manage_options',\n self::ADMIN_PAGE_ID,\n [$this->renderer, 'renderSettingsPage']\n );\n error_log('hook: '. $hook);\n }", "public function register_menu()\n {\n return view('admin.menu_builder.register_menu');\n }", "public function onAdminMenu()\n {\n foreach( $this->pages as $slug => $page ) {\n add_submenu_page(\n $page['parent'], L10n::__( $page['title'] ), \n L10n::__( $page['title_menu'] ), $page['capability'], \n $slug, array( $this, 'page' . ucfirst( $slug ) )\n );\n }\n }", "function eventoni_create_menu() {\n\n\t//create new top-level menu\n\tadd_menu_page('Eventoni', 'Eventoni', 'administrator', __FILE__, 'eventoni_settings_page');\n\n\t//call register settings function\n\tadd_action( 'admin_init', 'register_mysettings' );\n}", "public function create_menu() {\n\t\tif ( get_network()->site_id !== get_current_blog_id() ) {\n\t\t\treturn;\n\t\t}\n\n\t\t//create new top-level menu\n\t\tadd_management_page(\n\t\t\t__( 'Sync newsletter', 'elemarjr' ),\n\t\t\t__( 'Sync newsletter', 'elemarjr' ),\n\t\t\t'manage_options',\n\t\t\t'sync-newsletter',\n\t\t\tarray( $this, 'display_submenu_page' ),\n\t\t\t6\n\t\t);\n\t}", "public function initMenu()\n {\n add_menu_page(\n 'Flickr Group Gallery',\n 'Flickr Group Gallery',\n 'administrator',\n 'flickr-group-gallery',\n array($this, 'render'),\n 'dashicons-admin-generic'\n );\n }", "function add_menu() {\n // Add \"Telegram Bot\" menu\n $telegram_logo = \"https://upload.wikimedia.org/wikipedia/commons/8/82/Telegram_logo.svg\";\n add_menu_page(\"Telegram Bot\", \"Telegram Bot\", 4, sanitize_key(\"home\"), \"plugin_home_page\", $telegram_logo);\n \n // Add \"Admin panel\" submenu\n add_submenu_page(sanitize_key(\"home\"), \"Admin panel\", \"Admin panel\", 4, sanitize_key(\"admin\"), \"plugin_admin_panel_page\");\n}", "function registerMenus() {\n\t\t\tregister_nav_menu( 'nav-1', __( 'Top Navigation' ) );\n\t\t}", "function abc_admin_dashboard()\n{\n add_menu_page('Awesome BMI Dashboard', 'Awesome BMI', 'manage_options', 'awesome-bmi', 'abc_admin_dashboard_init');\n}", "function wp_admin_bar_site_menu($wp_admin_bar)\n {\n }", "function on_admin_menu ()\n{\n global $cap_collation_name;\n\n // adds a menu entry to the dashboard menu\n add_submenu_page (\n 'index.php',\n $cap_collation_name . ' Dashboard',\n $cap_collation_name,\n 'edit_pages',\n DASHBOARD_PAGE_ID,\n __NAMESPACE__ . '\\on_menu_dashboard_page'\n );\n}" ]
[ "0.8391762", "0.8043883", "0.7993521", "0.79800135", "0.78862196", "0.7774659", "0.7735425", "0.7707947", "0.7696787", "0.76542306", "0.7641879", "0.7634087", "0.7622206", "0.7622206", "0.7622206", "0.76083064", "0.76033765", "0.7597236", "0.75868195", "0.7567242", "0.75671786", "0.7564526", "0.75498456", "0.7529532", "0.750348", "0.7499994", "0.74993926", "0.7478073", "0.7477066", "0.7474754", "0.746852", "0.7464944", "0.7458963", "0.74587137", "0.74586034", "0.74560976", "0.7455503", "0.74551433", "0.745428", "0.74512756", "0.74454796", "0.74425", "0.74263024", "0.74249905", "0.74180835", "0.7396029", "0.73933256", "0.7389642", "0.73806655", "0.7371198", "0.73555773", "0.7352841", "0.7350104", "0.73431444", "0.73233557", "0.7322677", "0.7309398", "0.73010135", "0.7296382", "0.72957796", "0.72953945", "0.72941506", "0.72940737", "0.72920346", "0.72916174", "0.7283497", "0.72789294", "0.727148", "0.72690934", "0.72644997", "0.72575897", "0.7250479", "0.72461414", "0.72259283", "0.72243375", "0.7215388", "0.7212471", "0.72031015", "0.7195998", "0.7187168", "0.7173095", "0.71697736", "0.7167277", "0.7164519", "0.71614206", "0.7159464", "0.7158257", "0.7155637", "0.7151266", "0.71498245", "0.71485627", "0.7146941", "0.71400845", "0.7137032", "0.7133319", "0.71280587", "0.71262455", "0.71230936", "0.7118087", "0.71178305" ]
0.7673487
9
General settings page template
public function general_settings_page() { include __DIR__ . "/views/general_settings.php"; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function settings_page() { ?>\n\n <div class=\"wrap\">\n <?php $this->settings_api->settings_html(); ?>\n </div><?php\n }", "public function render_settings_page()\n {\n }", "public function settings_page() {\n\t\t// Current tab.\n\t\t$tab = Template::current_tab();\n\n\t\t// Render settings header.\n\t\t$this->view( 'settings/common/header' );\n\n\t\t// Render settings page.\n\t\t$this->view( 'settings/settings', [\n\t\t\t'title' => Template::tabs()[ $tab ],\n\t\t\t'tab' => $tab,\n\t\t\t'form_url' => Template::settings_page(\n\t\t\t\t$tab,\n\t\t\t\t$this->is_network()\n\t\t\t),\n\t\t] );\n\n\t\t// Render settings footer.\n\t\t$this->view( 'settings/common/footer' );\n\t}", "public function settingsPage()\n\t{\n\t\t$this->setForms();\n\t\tinclude( \\GFormProtected\\Helpers::view('settings/settings') );\n\t}", "public function settings_page(){\n\t\t$page_base = $this->page_url();\n\t\tob_start();\n\t\t?>\n\t\t<div class=\"wp_lms settings\">\n\t\t\t<h1><?= $this::$name; ?> Settings Page</h1>\n\t\t\t\n\t\t</div>\n\t\t<?\n\t\tob_end_flush();\n\t}", "public function setting_page() {\n\n\t\techo '<div class=\"wrap\">';\n\t\tsettings_errors();\n\n\t\t$this->setting->show_navigation();\n\t\t$this->setting->show_forms();\n\n\t\techo '</div>';\n\t}", "public function render_settings_page() {\n\t\tinclude( get_inc_dir() . '/templates/admin-settings.php' );\n\t}", "public static function general_settings() {\n\t\t$msg = '';\n\t\tif (!empty($_POST) && isset($_POST['save-settings'])) {\n\t\t\t$msg = self::save();\n\t\t}\n\t\t$page_id = get_option('dod_page_id');\n\t\t$args['page_id'] = $page_id;\n\t\t$query = new WP_Query($args);\n\t\t$page = $query->posts[0];\n\t\t$custom_css = array_shift(get_post_meta($page_id, 'dod_custom_css'));\n\t\t$selected_template = array_shift(get_post_meta($page_id, '_wp_page_template'));\n\t\t$templates = get_page_templates();\n\t\tinclude 'views/_geneal_settings.php';\n\t}", "public function settings_page() {\n\t\tinclude_once( dirname( __FILE__ ) . '/class-vendor-admin-settings.php' );\n\t\tVendor_Admin_Settings::output();\n\t}", "public function options_page() {\n\t\t$this->render_settings();\n\t}", "public static function settings_page() {\r\n\t\treturn '';\r\n\t}", "public function plugin_settings_page() {\r\n\t\t\tif ( ! current_user_can( 'manage_options' ) ) {\r\n\t\t\t\twp_die( esc_html( 'You do not have sufficient permissions to access this page.' ) );\r\n\t\t\t}\r\n\r\n\t\t\t// Render the settings template.\r\n\t\t\tinclude( sprintf( '%s/templates/settings.php', dirname( __FILE__ ) ) );\r\n\t\t}", "function settings_html() {\n $this->render_setting( 'label_any' );\n $this->render_setting( 'modifiers' );\n $this->render_setting( 'orderby' );\n $this->render_setting( 'count' );\n }", "public function settings_page() {\r\n\t\tif ( ! isset( $this->hook_suffix ) )\r\n\t\t\treturn;\r\n\r\n\t\tadd_action( 'inf_member_settings_after_header_' . $this->hook_suffix, array( 'Inf_Member_App_Settings', 'after_header' ) );\r\n\r\n Inf_Member_Settings::settings_page_template( $this->hook_suffix, __( 'Inf Member Settings', 'inf-member' ) );\r\n\t}", "function settings_page() { include($this->plugin_basename . '/core/admin/settings.php'); }", "public function settingsPage()\n {\n include 'views/admin.php';\n }", "private function settings()\n\t{\n\t\tif($_POST)\n\t\t{\n\t\t\t// Available Vews\n config::set('s7n.views', $this->input->post('views'));\n\n\t\t\t// Default Sidebar Title\n config::set('s7n.default_sidebar_title', $this->input->post('default_sidebar_title'));\n\n\t\t\t// Default Sidebar Content\n config::set('s7n.default_sidebar_content', $this->input->post('default_sidebar_content'));\n\n\t\t\tmessage::info(__('Page Settings edited successfully'), 'admin/page/settings');\n\t\t}\n\n\t\t$this->head->title->append(__('Settings'));\n\n\t\t$this->template->title .= __('Settings');\n\t\t$this->template->content = View::factory('page/settings', array(\n\t\t\t'views' => config::get('s7n.page_views'),\n\t\t\t'default_sidebar_title' => config::get('s7n.default_sidebar_title'),\n\t\t\t'default_sidebar_content' => config::get('s7n.default_sidebar_content')\n\t\t));\n\t}", "public function settings(){\n\t\t$this->verify();\n\t\t$data['title']=\"Settings\";\n\t\t$this->load->view('parts/head', $data);\n\t\t$this->load->view('settings', $data);\n\t\t$this->load->view('parts/javascript', $data);\n\t}", "public function init_settings_page()\n\t\t{\n\n\t\t\t$this->template_header();\n\t\t\t$this->template_body();\n\t\t\t$this->template_footer();\n\n\t\t}", "function showSettings() {\n global $objTemplate,$_ARRAYLANG;\n $template = new \\Cx\\Core\\Html\\Sigma();\n $objTemplate->addBlockfile('ADMIN_CONTENT', 'settings_system', 'settings.html');\n $templateObj = new \\Cx\\Core\\Html\\Sigma(ASCMS_CORE_PATH . '/Config/View/Template/Backend');\n $templateObj->loadTemplateFile('development_tools.html');\n $templateObj->setVariable(array(\n 'TXT_TITLE_SET5' => $_ARRAYLANG['TXT_SETTINGS_TITLE_DEVELOPMENT'],\n 'TXT_DEBUGGING_STATUS' => $_ARRAYLANG['TXT_DEBUGGING_STATUS'],\n 'TXT_DEBUGGING_FLAGS' => $_ARRAYLANG['TXT_DEBUGGING_FLAGS'],\n 'TXT_SETTINGS_DEBUGGING_FLAG_LOG' => $_ARRAYLANG['TXT_SETTINGS_DEBUGGING_FLAG_LOG'],\n 'TXT_SETTINGS_DEBUGGING_FLAG_PHP' => $_ARRAYLANG['TXT_SETTINGS_DEBUGGING_FLAG_PHP'],\n 'TXT_SETTINGS_DEBUGGING_FLAG_DB' => $_ARRAYLANG['TXT_SETTINGS_DEBUGGING_FLAG_DB'],\n 'TXT_SETTINGS_DEBUGGING_FLAG_DB_TRACE' => $_ARRAYLANG['TXT_SETTINGS_DEBUGGING_FLAG_DB_TRACE'],\n 'TXT_SETTINGS_DEBUGGING_FLAG_DB_CHANGE' => $_ARRAYLANG['TXT_SETTINGS_DEBUGGING_FLAG_DB_CHANGE'],\n 'TXT_SETTINGS_DEBUGGING_FLAG_DB_ERROR' => $_ARRAYLANG['TXT_SETTINGS_DEBUGGING_FLAG_DB_ERROR'],\n 'TXT_SETTINGS_DEBUGGING_FLAG_LOG_FILE' => $_ARRAYLANG['TXT_SETTINGS_DEBUGGING_FLAG_LOG_FILE'],\n 'TXT_SETTINGS_DEBUGGING_FLAG_LOG_FIREPHP' => $_ARRAYLANG['TXT_SETTINGS_DEBUGGING_FLAG_LOG_FIREPHP'],\n 'TXT_DEBUGGING_EXPLANATION' => $_ARRAYLANG['TXT_DEBUGGING_EXPLANATION'],\n 'TXT_SAVE_CHANGES' => $_ARRAYLANG['TXT_SAVE'],\n 'TXT_RADIO_ON' => $_ARRAYLANG['TXT_ACTIVATED'],\n 'TXT_RADIO_OFF' => $_ARRAYLANG['TXT_DEACTIVATED']\n ));\n if (in_array('SystemInfo', \\Env::get('cx')->getLicense()->getLegalComponentsList())) {\n if (isset($_POST['debugging'])) {\n $this->updateDebugSettings($_POST['debugging']);\n }\n $this->setDebuggingVariables($templateObj);\n }\n \\Cx\\Core\\Setting\\Controller\\Setting::init('Config', null, 'Yaml', null, \\Cx\\Core\\Setting\\Controller\\Setting::REPOPULATE);\n \\Cx\\Core\\Setting\\Controller\\Setting::storeFromPost();\n \n \\Cx\\Core\\Setting\\Controller\\Setting::setEngineType('Config', 'Yaml', 'site');\n \\Cx\\Core\\Setting\\Controller\\Setting::show(\n $template,\n 'index.php?cmd=Config',\n $_ARRAYLANG['TXT_CORE_CONFIG_SITE'],\n $_ARRAYLANG['TXT_CORE_CONFIG_SITE'],\n 'TXT_CORE_CONFIG_',\n !$this->isWritable()\n );\n \\Cx\\Core\\Setting\\Controller\\Setting::setEngineType('Config', 'Yaml', 'contactInformation');\n \\Cx\\Core\\Setting\\Controller\\Setting::show(\n $template,\n 'index.php?cmd=Config',\n $_ARRAYLANG['TXT_CORE_CONFIG_CONTACTINFORMATION'],\n $_ARRAYLANG['TXT_CORE_CONFIG_CONTACTINFORMATION'],\n 'TXT_CORE_CONFIG_',\n !$this->isWritable()\n );\n \\Cx\\Core\\Setting\\Controller\\Setting::setEngineType('Config', 'Yaml', 'administrationArea');\n \\Cx\\Core\\Setting\\Controller\\Setting::show(\n $template,\n 'index.php?cmd=Config',\n $_ARRAYLANG['TXT_CORE_CONFIG_ADMINISTRATIONAREA'], \n $_ARRAYLANG['TXT_CORE_CONFIG_ADMINISTRATIONAREA'], \n 'TXT_CORE_CONFIG_',\n !$this->isWritable()\n );\n \\Cx\\Core\\Setting\\Controller\\Setting::setEngineType('Config', 'Yaml', 'security');\n \\Cx\\Core\\Setting\\Controller\\Setting::show(\n $template,\n 'index.php?cmd=Config',\n $_ARRAYLANG['TXT_CORE_CONFIG_SECURITY'],\n $_ARRAYLANG['TXT_CORE_CONFIG_SECURITY'],\n 'TXT_CORE_CONFIG_',\n !$this->isWritable()\n );\n if (in_array('SystemInfo', \\Env::get('cx')->getLicense()->getLegalComponentsList())) {\n \\Cx\\Core\\Setting\\Controller\\Setting::show_external(\n $template,\n $_ARRAYLANG['TXT_SETTINGS_TITLE_DEVELOPMENT'],\n $templateObj->get()\n );\n }\n \\Cx\\Core\\Setting\\Controller\\Setting::setEngineType('Config', 'Yaml', 'otherConfigurations');\n \\Cx\\Core\\Setting\\Controller\\Setting::show(\n $template,\n 'index.php?cmd=Config',\n $_ARRAYLANG['TXT_CORE_CONFIG_OTHERCONFIGURATIONS'],\n $_ARRAYLANG['TXT_CORE_CONFIG_OTHERCONFIGURATIONS'],\n 'TXT_CORE_CONFIG_',\n !$this->isWritable()\n );\n\n\n // show also hidden settins\n if ( in_array('SystemInfo', \\Env::get('cx')->getLicense()->getLegalComponentsList())\n && \\Permission::hasAllAccess()\n && isset($_GET['all'])\n ) {\n \\Cx\\Core\\Setting\\Controller\\Setting::setEngineType('Config', 'Yaml', 'core');\n \\Cx\\Core\\Setting\\Controller\\Setting::show(\n $template,\n 'index.php?cmd=Config',\n 'CORE',\n 'CORE', \n 'TXT_CORE_CONFIG_',\n true\n );\n \\Cx\\Core\\Setting\\Controller\\Setting::setEngineType('Config', 'Yaml', 'release');\n \\Cx\\Core\\Setting\\Controller\\Setting::show(\n $template,\n 'index.php?cmd=Config',\n 'RELEASE',\n 'RELEASE',\n 'TXT_CORE_CONFIG_',\n true\n );\n \\Cx\\Core\\Setting\\Controller\\Setting::setEngineType('Config', 'Yaml', 'component');\n \\Cx\\Core\\Setting\\Controller\\Setting::show(\n $template,\n 'index.php?cmd=Config',\n 'COMPONENT',\n 'COMPONENT',\n 'TXT_CORE_CONFIG_',\n !$this->isWritable()\n );\n \\Cx\\Core\\Setting\\Controller\\Setting::setEngineType('Config', 'Yaml', 'license');\n \\Cx\\Core\\Setting\\Controller\\Setting::show(\n $template,\n 'index.php?cmd=Config',\n 'LICENSE', \n 'LICENSE', \n 'TXT_CORE_CONFIG_',\n true\n );\n \\Cx\\Core\\Setting\\Controller\\Setting::setEngineType('Config', 'Yaml', 'cache');\n \\Cx\\Core\\Setting\\Controller\\Setting::show(\n $template,\n 'index.php?cmd=Config',\n 'CACHE', \n 'CACHE', \n 'TXT_CORE_CONFIG_',\n true\n );\n }\n $this->checkFtpAccess();\n $objTemplate->setVariable('SETTINGS_TABLE', $template->get());\n $objTemplate->parse('settings_system');\n }", "public function settings()\n\t{\n\n $this->load->view('back/lib/header');\n\t\t$this->load->view('back/settings');\n\t\t$this->load->view('back/lib/footer');\n\t\t\n\t}", "function showGeneralPageEditorSettingsObject()\n\t{\n\t\tglobal $tpl, $ilTabs;\n\n\t\t$this->addPageEditorSettingsSubTabs();\n\t\t$ilTabs->activateTab(\"adve_page_editor_settings\");\n\t\t\n\t\t$form = $this->initGeneralPageSettingsForm();\n\t\t$tpl->setContent($form->getHTML());\n\t}", "function settings_page() {\n\t\textract( $this->group, EXTR_OVERWRITE ); ?>\n\n\t<div class=\"wrap\">\n\t\t<?php screen_icon(); ?>\n\t\t<h2><?php echo esc_html( $page_title ) ?></h2>\n\t\t<?php do_action( \"{$prefix}_kc_settings_page_before\", $this->group ) ?>\n\t\t<form action=\"options.php\" method=\"post\" id=\"kc-settings-form\">\n\t\t\t<?php\n\t\t\t\t# The hidden fields\n\t\t\t\tsettings_fields( \"{$prefix}_settings\" );\n\n\t\t\t\tswitch ( $this->group['display'] ) {\n\t\t\t\t\tcase 'metabox' :\n\t\t\t\t\t\t$this->metabox->display();\n\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'plain' :\n\t\t\t\t\t\tforeach ( $this->group['options'] as $section ) :\n\t\t\t\t\t\t?>\n\t\t\t\t\t\t<h3><?php echo esc_html( $section['title'] ) ?></h3>\n\t\t\t\t\t\t<?php\n\t\t\t\t\t\t\t$this->settings_section( $section );\n\t\t\t\t\t\tendforeach;\n\t\t\t\t\t\tsubmit_button( __( 'Save Changes' ) );\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t?>\n\t\t</form>\n\t\t<?php do_action( \"{$prefix}_kc_settings_page_after\", $this->group ) ?>\n\t</div>\n\t<?php }", "public function settingsPage() {\n require_once 'form.phtml';\n }", "public function settingsview() {\r\n $this->logger->info(\"Action Settings View \");\r\n $this->template->display('listsettings', $this->combovalue, 'settings', '');\r\n }", "function settings_page() {\n global $wpdb, $wp_properties;\n\n include_once( __DIR__ . '/ui/settings-section.php' );\n\n }", "public function settings()\n {\n\n $this->data['page'] = 'settings';\n $this->data['user'] = $this->user;\n\n // get privacy settings\n\n $my_privacy = explode(',',$this->user['privacy_settings']);\n\n $this->data['settings'] = $my_privacy;\n\n $this->load->view('/dash/header',$this->data);\n $this->load->view('/dash/settings',$this->data);\n $this->load->view('/dash/footer',$this->data);\n\n }", "function settings_html() {\n $this->render_setting( 'label_any' );\n }", "public function index()\n\t{\t\n\t\t$settings = Settings::all();\n\t\t$langs = Language::get();\n\t\t$this->layout = View::make('blogfolio::settings.index-settings', compact('settings', 'templates', 'langs'));\n $this->layout->title = trans('blogfolio::settings.settings');\n $this->layout->breadcrumb = Config::get('syntara::breadcrumbs.settings');\n\t}", "public function mySettingsPage()\n {\n return view('frontEnd.usersPanel.settings');\n }", "public function settings_page()\r\n {\r\n add_submenu_page('giga',\r\n __('Notifications', 'giga-messenger-bots'),\r\n __('Notifications', 'giga-messenger-bots'),\r\n 'manage_options',\r\n 'notifications',\r\n [$this, 'render']\r\n );\r\n }", "public function settings_page() {\n\n\t\t?>\n\n\t\t<div class=\"wrap schedule-a-visit-to-sherpa-settings\">\n\t\t\t\n\t\t\t<form id=\"schedule-a-visit-to-sherpa-form\" method=\"post\" action=\"options.php\">\n\t\t\t\t\n\t\t\t\t<?php echo wp_nonce_field( 'schedule_a_visit_to_sherpa_data', 'schedule_a_visit_to_sherpa_nonce' ); ?>\n\n\t\t\t\t<?php settings_fields( 'schedule_a_visit_to_sherpa_settings_section' ); ?>\n\n\t\t\t\t<?php do_settings_sections( 'schedule-a-visit-to-sherpa' ); ?>\n\t\t\t\t\n\t\t\t\t<?php submit_button(); ?>\n\n\t\t\t</form>\n\n </div>\n\n\t\t<?php\n\n\t}", "public function create_plugin_settings_page()\n {\n require_once 'views/settings.phtml';\n }", "public function index()\n\t{\n\t\t$this->set_page_title(_l('web_setup'));\n\t\t$data['settings'] = get_settings();\n\t\t$data['content'] = $this->load->view('admin/settings/index', $data, TRUE);\n\t\t$this->load->view('admin/layouts/index', $data);\n\t}", "public function settings_page() {\n\t\tTheme_My_Login_Admin::settings_page( array(\n\t\t\t'title' => __( 'Theme My Login reCAPTCHA Settings', 'theme-my-login' ),\n\t\t\t'options_key' => $this->options_key\n\t\t) );\n\t}", "function settings_section() {\n\t\t}", "public function getSettings()\n {\n $this->view('user.settings');\n }", "static function get_settings(){\n\t\t\t\treturn array(\t\n\t\t\t\t\t'icon' => GDLR_CORE_URL . '/framework/images/page-builder/nav-template.png', \n\t\t\t\t\t'title' => esc_html__('Templates', 'goodlayers-core')\n\t\t\t\t);\n\t\t\t}", "public function settings()\n {\n $result = $this->dtbs->list('site_settings');\n $data['info'] = $result;\n $this->load->view('back/settings/anasehife',$data);\n }", "function thirty8_simple_map_settings_page()\n\t\t\t{\n\t\t\t\t//include('admin/settings.php');\n\t\t\t}", "public function main_options_page(){\n\t\t$page_base = $this->page_url();\n\t\tob_start();\n\t\t?>\n\t\t<div class=\"wp_lms settings\">\n\t\t\t<h1>GrandPubbah</h1>\n\n\t\t</div>\n\t\t<?\n\t\tob_end_flush();\n\t}", "public function initialize_settings_page()\n {\n }", "public function managesettingsview() {\r\n $this->logger->info(\"Action Manage Settings View \");\r\n $this->template->display('displaylistsettings', $this->combovalue, 'settings', '', '');\r\n }", "public function settings_view()\n {\n $this->register_handler('plugin.settingsform', array($this, 'settings_form'));\n $this->register_handler('plugin.settingslist', array($this, 'settings_list'));\n $this->register_handler('plugin.factoradder', array($this, 'settings_factoradder'));\n $this->register_handler('plugin.highsecuritydialog', array($this, 'settings_highsecuritydialog'));\n\n $this->include_script('kolab2fa.js');\n $this->include_stylesheet($this->local_skin_path() . '/kolab2fa.css');\n\n if ($this->check_secure_mode()) {\n $this->api->output->set_env('session_secured', $_SESSION['kolab_2fa_secure_mode']);\n }\n\n $this->api->output->add_label('save','cancel');\n $this->api->output->set_pagetitle($this->gettext('settingstitle'));\n $this->api->output->send('kolab_2fa.config');\n }", "public function actionSettingsIndexTemplate()\n\t{\n\t\t$settingsModel = new SproutForms_SettingsModel;\n\n\t\t$settings = craft()->db->createCommand()\n\t\t\t->select('settings')\n\t\t\t->from('plugins')\n\t\t\t->where('class=:class', array(':class'=> 'SproutForms'))\n\t\t\t->queryScalar();\n\n\t\t$settings = JsonHelper::decode($settings);\n\t\t$settingsModel->setAttributes($settings);\n\n\t\t$variables['settings'] = $settingsModel;\n\n\t\t// Load our template\n\t\t$this->renderTemplate('sproutforms/settings', $variables);\n\n\t}", "public function define_settings_page() {\n\t\t$this->hook_suffix = add_options_page(\n\t\t\t__( 'Top Story Options', 'top-story' ),\n\t\t\t__( 'Top Story', 'top-story' ),\n\t\t\t'manage_options',\n\t\t\t$this->menu_slug,\n\t\t\tarray( $this, 'option_page' )\n\t\t);\n\t}", "public function settings_page () {\n\n // Build page HTML\n $html = '<div class=\"wrap\" id=\"' . $this->_token . '_settings\">' . \"\\n\";\n $html .= '<h2>' . __( 'Plugin Settings' , 'listeo_core' ) . '</h2>' . \"\\n\";\n\n $tab = '';\n if ( isset( $_GET['tab'] ) && $_GET['tab'] ) {\n $tab .= $_GET['tab'];\n }\n\n // Show page tabs\n if ( is_array( $this->settings ) && 1 < count( $this->settings ) ) {\n\n $html .= '<h2 class=\"nav-tab-wrapper\">' . \"\\n\";\n\n $c = 0;\n foreach ( $this->settings as $section => $data ) {\n\n // Set tab class\n $class = 'nav-tab';\n if ( ! isset( $_GET['tab'] ) ) {\n if ( 0 == $c ) {\n $class .= ' nav-tab-active';\n }\n } else {\n if ( isset( $_GET['tab'] ) && $section == $_GET['tab'] ) {\n $class .= ' nav-tab-active';\n }\n }\n\n // Set tab link\n $tab_link = add_query_arg( array( 'tab' => $section ) );\n if ( isset( $_GET['settings-updated'] ) ) {\n $tab_link = remove_query_arg( 'settings-updated', $tab_link );\n }\n\n // Output tab\n $html .= '<a href=\"' . $tab_link . '\" class=\"' . esc_attr( $class ) . '\">' . esc_html( $data['title'] ) . '</a>' . \"\\n\";\n\n ++$c;\n }\n\n $html .= '</h2>' . \"\\n\";\n }\n\n $html .= '<form method=\"post\" action=\"options.php\" enctype=\"multipart/form-data\">' . \"\\n\";\n\n // Get settings fields\n ob_start();\n settings_fields( $this->_token . '_settings' );\n do_settings_sections( $this->_token . '_settings' );\n $html .= ob_get_clean();\n\n $html .= '<p class=\"submit\">' . \"\\n\";\n $html .= '<input type=\"hidden\" name=\"tab\" value=\"' . esc_attr( $tab ) . '\" />' . \"\\n\";\n $html .= '<input name=\"Submit\" type=\"submit\" class=\"button-primary\" value=\"' . esc_attr( __( 'Save Settings' , 'listeo_core' ) ) . '\" />' . \"\\n\";\n $html .= '</p>' . \"\\n\";\n $html .= '</form>' . \"\\n\";\n $html .= '</div>' . \"\\n\";\n\n echo $html;\n }", "public function initSettingsPage()\n {\n // admin sections\n $this->_addSection('schemas', __('Schemas', 'my_seo_settings'));\n $this->_addSection('special', __('Thematic Schemas', 'my_seo_settings'));\n $this->_addSection('front_page', __('General Settings', 'my_seo_settings'));\n $this->_addSection('compatibility', __('Compatibility', 'my_seo_settings'));\n\n /*\n * Adds fields to default section\n */\n $this->_addSchemaTagLocation('generate_json_ld_fpwebpage_hook_short_code', __('Schema Tag Location', 'my_seo_settings'), 'front_page');\n $this->_addInputField('generate_json_ld_fpwebpage_name', __('Website Title', 'my_seo_settings'), 'front_page');\n\t\t$this->_addInputField('generate_json_ld_fpwebpage_inlanguage', __('Website Language', 'my_seo_settings'), 'front_page');\n // Schemas\n $this->_addCheckboxField('generate_json_ld_fpwebpage', __('WebPage Schema for Home Page', 'my_seo_settings'), 'schemas');\n $this->_addCheckboxField('generate_json_ld_webpage', __('WebPage Schema for Pages', 'my_seo_settings'), 'schemas');\n $this->_addCheckboxField('generate_json_ld_posts', __('WebPage Schema for Posts', 'my_seo_settings'), 'schemas');\n $this->_addMenuDropbox('generate_json_ld_fpwebpage_menu', __('WPHeader Schema', 'my_seo_settings'), 'schemas');\n $this->_addMenuDropbox('generate_json_ld_fpwebpage_fmenu', __('WPFooter Schema', 'my_seo_settings'), 'schemas');\n\t\t$this->_addInputField('generate_json_ld_logo_url', __( 'Logo URL', 'my_seo_settings'), 'schemas');\n\n // Special\n $recipeHint = 'On individual post editing page Recipe specific fields will appear. When filled in they would show up in a Recipe schema on the page.';\n $faqHint = 'FAQ questions and answers are being added manually. go to the each page/post editor you would like to add - this schema must be enabled to take effect';\n\n $this->_addCheckboxField('generate_json_ld_recipe', __('Recipe Schema', 'my_seo_settings'), 'special', $recipeHint);\n $this->_addCheckboxField('generate_json_ld_faq', __('FAQ Schema', 'my_seo_settings'), 'special', $faqHint);\n $this->_addCustomField('generate_json_ld_person_schema', __('Person Schema', 'my_seo_settings'), [$this, '_renderPersonSchemaField'], 'special');\n $this->_addCustomField('generate_json_ld_product_schema', __('Product Schema', 'my_seo_settings'), [$this, '_renderProductSchemaField'], 'special');\n $this->_addCustomField('generate_json_ld_contact_page_schema', __('Contact Page Schema', 'my_seo_settings'), [$this, '_renderContactPageSchemaField'], 'special');\n $this->_addCustomField('generate_json_ld_about_page_schema', __('About Page Schema', 'my_seo_settings'), [$this, '_renderAboutPageSchemaField'], 'special');\n\t\t$this->_addCheckboxField('search_bar', __('Search Bar - Does the website have a search bar?', 'my_seo_settings'), 'compatibility');\n\t\t$this->_addCheckboxField('generate_json_ld_author', __( 'Author Schema', 'my_seo_settings'), [$this, '_renderAuthorPageSchemaField'], 'special' );\n $this->_addCheckboxField('yoast_disable', __('Yoast schema Off', 'my_seo_settings'), 'compatibility');\n }", "public function adminPluginOptionsPage()\n {\n echo $this->_loadView('admin-settings-page');\n }", "public function action_general_settings()\n\t{\n\t\tglobal $context, $scripturl, $txt;\n\n\t\t$context['SPortal']['themes'] = sp_general_load_themes();\n\n\t\t// These are very likely to come in handy! (i.e. without them we're doomed!)\n\t\trequire_once(ADMINDIR . '/ManagePermissions.controller.php');\n\t\trequire_once(ADMINDIR . '/ManageServer.controller.php');\n\t\trequire_once(SUBSDIR . '/SettingsForm.class.php');\n\n\t\t// Initialize the form\n\t\t$this->_initGeneralSettingsForm();\n\n\t\tif (isset($_GET['save']))\n\t\t{\n\t\t\tcheckSession();\n\n\t\t\tif (!empty($_POST['sp_portal_mode']))\n\t\t\t{\n\t\t\t\tupdateSettings(array('front_page' => 'PortalMain_Controller'));\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tupdateSettings(array('front_page' => 'MessageIndex_Controller'));\n\t\t\t}\n\n\t\t\t$this->_generalSettingsForm->setConfigValues($_POST);\n\t\t\t$this->_generalSettingsForm->save();\n\t\t\tredirectexit('action=admin;area=portalconfig;sa=generalsettings');\n\t\t}\n\n\t\t$context['post_url'] = $scripturl . '?action=admin;area=portalconfig;sa=generalsettings;save';\n\t\t$context['settings_title'] = $txt['sp-adminGeneralSettingsName'];\n\t\t$context['page_title'] = $txt['sp-adminGeneralSettingsName'];\n\t\t$context['sub_template'] = 'show_settings';\n\n\t\t$this->_generalSettingsForm->prepare();\n\t}", "function hoopsai_wp_settings_do_page() {\n ?>\n <div id=\"hoopsai_wp_settings\"></div>\n <?php\n }", "public function show_settings_page() : void {\n\t\t\t$categories = self::get_categories();\n\n\t\t\tSFWD_LMS::get_view(\n\t\t\t\t'support/help',\n\t\t\t\tarray(\n\t\t\t\t\t'categories' => $categories,\n\t\t\t\t),\n\t\t\t\ttrue\n\t\t\t);\n\t\t}", "public function settings_page()\n {\n\n // Build page HTML\n $html = '<div class=\"wrap\" id=\"' . $this->parent->_token . '_settings\">' . \"\\n\";\n $html .= '<h2>' . __('SUAPI Settings', 'wp-suapi') . '</h2>' . \"\\n\";\n\n $tab = '';\n if (isset($_GET['tab']) && $_GET['tab']) {\n $tab .= $_GET['tab'];\n }\n\n // Show page tabs\n if (is_array($this->settings) && 1 < count($this->settings)) {\n\n $html .= '<h2 class=\"nav-tab-wrapper\">' . \"\\n\";\n\n $c = 0;\n foreach ($this->settings as $section => $data) {\n\n // Set tab class\n $class = 'nav-tab';\n if (!isset($_GET['tab'])) {\n if (0 == $c) {\n $class .= ' nav-tab-active';\n }\n } else {\n if (isset($_GET['tab']) && $section == $_GET['tab']) {\n $class .= ' nav-tab-active';\n }\n }\n\n // Set tab link\n $tab_link = add_query_arg(array('tab' => $section));\n if (isset($_GET['settings-updated'])) {\n $tab_link = remove_query_arg('settings-updated', $tab_link);\n }\n\n // Output tab\n $html .= '<a href=\"' . $tab_link . '\" class=\"' . esc_attr($class) . '\">' . esc_html($data['title']) . '</a>' . \"\\n\";\n\n ++$c;\n }\n\n $html .= '</h2>' . \"\\n\";\n }\n\n $html .= '<form method=\"post\" action=\"options.php\" enctype=\"multipart/form-data\">' . \"\\n\";\n\n // Get settings fields\n ob_start();\n settings_fields($this->parent->_token . '_settings');\n do_settings_sections($this->parent->_token . '_settings');\n $html .= ob_get_clean();\n\n $html .= '<p class=\"submit\">' . \"\\n\";\n $html .= '<input type=\"hidden\" name=\"tab\" value=\"' . esc_attr($tab) . '\" />' . \"\\n\";\n $html .= '<input name=\"Submit\" type=\"submit\" class=\"button-primary\" value=\"' . esc_attr(__('Save Settings', 'wp-suapi')) . '\" />' . \"\\n\";\n $html .= '</p>' . \"\\n\";\n $html .= '</form>' . \"\\n\";\n $html .= '</div>' . \"\\n\";\n\n echo $html;\n }", "public function index()\n\t{\n\t\treturn view('pages.admin.settings', [\n\t\t\t'settings' => \\App\\Settings::first()\n\t\t]);\n\t}", "public function settings_page_content() {\n\t\t// Common items.\n\t\t$args = [\n\t\t\t'network' => $this->is_network(),\n\t\t];\n\n\t\t// Current tab.\n\t\t$tab = Template::current_tab();\n\n\t\t// Is plugin active network wide.\n\t\t$networkwide = General::is_networkwide();\n\n\t\tswitch ( $tab ) {\n\t\t\tcase 'reports':\n\t\t\t\t$roles = Permission::get_roles();\n\t\t\t\t// If subsites can not over write.\n\t\t\t\tif ( ! Permission::can_overwrite() && $networkwide ) {\n\t\t\t\t\t$selected = (array) beehive_analytics()->settings->get( 'roles', 'permissions', true, [] );\n\t\t\t\t} else {\n\t\t\t\t\t$selected = (array) beehive_analytics()->settings->get( 'roles', 'permissions', $this->is_network(), [] );\n\t\t\t\t}\n\t\t\t\tforeach ( $roles as $role => $data ) {\n\t\t\t\t\t// Leave administrators please. They are powerful.\n\t\t\t\t\tif ( 'administrator' === $role ) {\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\n\t\t\t\t\tif ( ! in_array( $role, $selected, true ) ) {\n\t\t\t\t\t\tunset( $roles[ $role ] );\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// Only applicable on single/sub site.\n\t\t\t\t$args['roles'] = $roles;\n\t\t\t\t$args['dashboard_tree'] = Analytics_Settings::instance()->dashboard_tree();\n\t\t\t\t$args['statistics_tree'] = Analytics_Settings::instance()->statistics_tree();\n\t\t\t\t$args['dashboard_selected'] = beehive_analytics()->settings->get( 'dashboard', 'reports', false, [] );\n\t\t\t\t$args['statistics_selected'] = beehive_analytics()->settings->get( 'statistics', 'reports', false, [] );\n\t\t\t\tbreak;\n\t\t\tcase 'permissions':\n\t\t\t\t$args['roles'] = Permission::get_roles();\n\t\t\t\tbreak;\n\t\t\tcase 'tracking':\n\t\t\t\t$args['settings_page'] = Template::settings_page( 'general', $this->is_network() );\n\t\t\t\t$args['tracking'] = beehive_analytics()->settings->get( 'code', 'tracking' );\n\t\t\t\t$args['network_tracking'] = beehive_analytics()->settings->get( 'code', 'tracking', true );\n\t\t\t\t$args['auto_tracking'] = beehive_analytics()->settings->get( 'auto_track', 'google', $this->is_network() );\n\t\t\t\t$args['auto_tracking_code'] = beehive_analytics()->settings->get( 'auto_track', 'misc', $this->is_network() );\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\t$anonymize_visible = true;\n\t\t\t\tif ( $networkwide && ! $this->is_network() ) {\n\t\t\t\t\tif ( beehive_analytics()->settings->get( 'anonymize', 'general', true )\n\t\t\t\t\t && beehive_analytics()->settings->get( 'force_anonymize', 'general', true )\n\t\t\t\t\t) {\n\t\t\t\t\t\t$anonymize_visible = false;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t// Get Pro Sites levels.\n\t\t\t\t$args['ps_levels'] = $this->is_network() ? Permission::get_ps_levels() : false;\n\t\t\t\t$args['anonymize_visible'] = $anonymize_visible;\n\t\t\t\t$args['networkwide'] = $networkwide;\n\t\t\t\tbreak;\n\t\t}\n\n\t\t// Render network settings content.\n\t\t$this->view( \"settings/tabs/{$tab}\", $args );\n\t}", "public function optionsdemo_settings_content() { ?>\n <div class=\"wrap\">\n <div id=\"icon-themes\" class=\"icon32\"><br/></div>\n <h1>Options Demo</h1>\n <form action=\"options.php\" method=\"POST\">\n\t\t\t\t\t<?php\n\t\t\t\t\t\tsettings_fields( \"optionsdemo_general\" );\n\t\t\t\t\t\tdo_settings_sections( \"optionsdemo_general\" );\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\tsubmit_button( esc_html__( 'Save Setting', 'optionsdemo' ) )\n\t\t\t\t\t?>\n </form>\n </div>\n\t\t<?php }", "public function settings()\n {\n $this->authCheck();\n\n $settings = DB::table('site_settings')\n ->get();\n \n $settings=view('admin.settings')\n ->with('settings',$settings);\n\n return view('admin.master')\n ->with('main_content',$settings);\n }", "public function showSettingsPage()\n {\n\n $configFilePath = dirname(__DIR__) . '/../../../build/configs/pirrot_default.conf';\n if (file_exists('/etc/pirrot.conf')) {\n $configFilePath = '/etc/pirrot.conf';\n }\n\n // Get setting values from the configuration file.\n $config = new ConfManagerService($configFilePath);\n $configValues = $config->read();\n\n // Regex out the setting values and comments to provide a list of settings that we can render out.\n foreach ($this->fieldGroups as $field => $group) {\n\n if (!key_exists($field, $this->labelOverrides)) {\n $label = ucwords(str_replace('_', ' ', $field));\n } else {\n $label = $this->labelOverrides[$field];\n }\n\n // Get the value from the settings file...\n $value = $configValues[$field];\n\n $inputType = Setting::TYPE_TEXT;\n if (in_array($field, $this->booleanFields)) {\n $inputType = Setting::TYPE_BOOL;\n }\n\n $inputComments = null;\n if (key_exists($field, $this->fieldComments)) {\n $inputComments = $this->fieldComments[$field];\n }\n\n $panelInputs[$group][] = new Setting($field, $label, $group, $value, $inputType, $inputComments);\n }\n\n\n return view('_pages.settings')->with('panels', $panelInputs);\n }", "function sunrise_theme_settings_page()\n {\n require_once(get_template_directory().'/inc/templates/sunrise-admin.php');\n }", "public function GeneralSettingsView(){\n\t\t//Meta is usually not setup yet, so we manually do this before loading css file\n\t\t$this->meta = new Meta();\n\t\t\n\t\t//This class requires an extra css file\n\t\t$this->getMeta()->addExtra('<link href=\"core/fragments/css/admin.css\" rel=\"stylesheet\" type=\"text/css\" />');\n\t}", "function theme_settings_page(){ \n\t?>\n\t<div class=\"wrap\">\n\t\t<h1>Virksomhedsinformation</h1>\n\t\t<p>Dette er globale virksomhedsoplysninger. Ændringer kan ses flere stedet på websitet</p>\n\t\t<form method=\"post\" action=\"options.php\">\n\t\t\t<?php\n\t\t\tsettings_fields(\"section\");\n\t\t\tdo_settings_sections(\"theme-options\");\n\t\t\tsubmit_button();\n\t\t\t?>\n\t\t</form>\n\t</div>\n\t\n\t<?php }", "public function settings()\n\t{\n\t\tif(defined(\"CMS_BACKEND\"))\n\t\t{\n\t\t\tAuthUser::load();\n\t\t\tif ( ! AuthUser::isLoggedIn()) {\n\t\t\t\tredirect(get_url('login'));\n\t\t\t}\n\t\t\t\n\t\t\tif(isset($_POST['save']) && $_POST['save'] == 'Save Settings')\n\t\t\t{\n\t\t\t\tPlugin::setAllSettings($_POST['setting'], 'mbblog');\n\t\t\t\tFlash::setNow('success', __('Settings have been saved!'));\t\t \t\n\t\t\t}\n\t\t\t\t\t\t\n\t\t\t$this->display('mbblog/views/admin/settings', array('settings' => Plugin::getAllSettings('mbblog')));\n\t\t} else\n\t\t{\n\t\t\tFlash::set('error', __('You do not have permission to access the requested page!'));\n\t\t\tredirect(get_url());\n\t\t}\n\t}", "public function settings_admin_page()\n {\n add_action('wp_cspa_before_closing_header', [$this, 'back_to_optin_overview']);\n add_action('wp_cspa_before_post_body_content', array($this, 'optin_theme_sub_header'), 10, 2);\n add_filter('wp_cspa_main_content_area', [$this, 'optin_form_list']);\n\n $instance = Custom_Settings_Page_Api::instance();\n $instance->page_header(__('Add New Optin', 'mailoptin'));\n $this->register_core_settings($instance, true);\n $instance->build(true);\n }", "public function display_page() {\n include_once JPID_PLUGIN_DIR . 'includes/admin/pages/views/html-jpid-admin-settings-page.php';\n }", "public function optionsdemo_settings_content() { ?>\n\t\t\t<div class=\"wrap\">\t\t\t\t\n\t\t\t\t<form method=\"POST\" action=\"options.php\">\n\t\t\t\t\t<?php\n\t\t\t\t\tsettings_fields( 'optionsdemo' );\n\t\t\t\t\tdo_settings_sections( 'optionsdemo' );\n\t\t\t\t\tsubmit_button();\n\t\t\t\t\t?>\n\t\t\t\t</form>\n\t\t\t</div> <?php\n\t\t}", "public function get_settings()\n {\n $data['menu_active'] = 'settings';\n $data['title'] = \"General Settings\";\n $data['settings'] = Settings::get();\n return view('admin.settings.index', $data);\n }", "private function render_settings() {\n\t\t?>\n\t\t<div class=\"wrap\">\n\t\t\t<h1><?php esc_html_e( 'Network Mail', 'simple-smtp' ); ?></h1>\n\t\t\t<form action='edit.php?action=wpsimplesmtpms' method='post'>\t\n\t\t\t\t<?php\n\t\t\t\twp_nonce_field( 'simple-smtp-ms' );\n\t\t\t\tdo_settings_sections( 'wpsimplesmtp_smtp_ms' );\n\t\t\t\tsubmit_button();\n\t\t\t\t?>\n\t\t\t</form>\n\t\t</div>\n\t\t<?php\n\t}", "public function index() {\n\n\t\t$this->Crud->addListener('SettingsSubSection', 'SettingsSubSection');\n\n\t\t$this->set('title_for_layout', __('Visualisation Settings'));\n\t\t$this->set('subtitle_for_layout', __('Use visualisations to control what is displayed to the logged user. By default they are enabled, meaning users will only see items that relate to them.'));\n\t\t\n\t\t$this->Crud->on('beforePaginate', array($this, '_beforePaginate'));\n\t\t$this->Crud->execute();\n\t}", "public function settings_admin_page()\n {\n add_action('wp_cspa_before_closing_header', [$this, 'back_to_optin_overview']);\n add_action('wp_cspa_before_post_body_content', array($this, 'optin_theme_sub_header'), 10, 2);\n add_filter('wp_cspa_main_content_area', [$this, 'optin_form_list']);\n\n $instance = Custom_Settings_Page_Api::instance();\n $instance->page_header(__('Add New', 'mailoptin'));\n $this->register_core_settings($instance);\n $instance->build(true, true);\n }", "public function actionSettings(){\n $user = Users::findOne(\\Yii::$app->user->getId());\n return $this->render('settings', ['user'=>$user]);\n }", "function custom_settings_page() { ?>\n\t<div class=\"wrap\">\n\t\t<h1>Custom Settings</h1>\n\t\t<form method=\"post\" action=\"options.php\">\n\t\t\t<?php\n settings_fields('section');\n do_settings_sections('theme-options'); \n submit_button(); \n ?>\n\t\t</form>\n\t</div>\n\t<?php }", "public function settings_page() {\r\n\t\tadd_submenu_page( 'edit.php?post_type=news', __( 'Settings', 'news-manager' ), __( 'Settings', 'news-manager' ), 'manage_options', 'news-settings', array( $this, 'options_page' ) );\r\n\t}", "public function admin_options() { ?>\n <h3><?php _e( $this->pluginTitle(), 'midtrans-woocommerce' ); ?></h3>\n <p><?php _e($this->getSettingsDescription(), 'midtrans-woocommerce' ); ?></p>\n <table class=\"form-table\">\n <?php\n // Generate the HTML For the settings form.\n $this->generate_settings_html();\n ?>\n </table><!--/.form-table-->\n <?php\n }", "public function settings_view() {\n?>\n\t\t<div class=\"wrap\">\n\t\t\t<h2><?php _e('Google Analytics Options', 'wp-google-analytics') ?></h2>\n\t\t\t<form action=\"options.php\" method=\"post\" id=\"wp_google_analytics\">\n\t\t\t\t<?php\n\t\t\t\t\tsettings_fields( 'wga' );\n\t\t\t\t\tdo_settings_sections( 'wga' );\n\t\t\t\t\tsubmit_button( __( 'Update Options', 'wp-google-analytics' ) );\n\t\t\t\t?>\n\t\t\t</form>\n\t\t</div>\n<?php\n\t}", "function pafd_action_settings_page() {\n\n\tglobal $pafd_textdomain;\n\t\n\tregister_setting( 'pafd_options_group', 'pafd_options' );\n\n\tpafd_add_settings_field( 'columns', __( 'Visible columns', $pafd_textdomain ) );\n\tpafd_add_settings_field( 'download_link', __( 'Download link', $pafd_textdomain ) );\n\tpafd_add_settings_field( 'hide_table_header', __( 'Hide table header', $pafd_textdomain ) );\n\tpafd_add_settings_field( 'show_all_revisions', __( 'Show all file revisions', $pafd_textdomain ) );\n\tpafd_add_settings_field( 'show_file_status', __( 'Show file status', $pafd_textdomain ) );\n\tpafd_add_settings_field( 'show_icons', __( 'Show mime-type icons', $pafd_textdomain ) );\n\tpafd_add_settings_field( 'order_by', __( 'Order files by' ), $pafd_textdomain );\n\tpafd_add_settings_field( 'custom_css_code', __( 'Custom CSS code' ), $pafd_textdomain );\n}", "function admin_configuration()\n{\n global $app;\n\n $app->render('admin_configuration.html', [\n 'page' => mkPage(getMessageString('admin'), 0, 2),\n 'mailers' => mkMailers(),\n 'ttss' => mkTitleTimeSortOptions(),\n 'isadmin' => is_admin()]);\n}", "public function settings_page() {\n do_action( 'rewardpoint_settings_start' );\n $current_tab = empty( $_GET['tab'] ) ? 'behavior' : sanitize_title( $_GET['tab'] );\n $current_section = empty( $_REQUEST['section'] ) ? '' : sanitize_title( $_REQUEST['section'] );\n $tabs = apply_filters( 'woocommerce_settings_tabs_array', array(\n 'behavior' => 'Behaviors',\n 'purchase' => 'Purchases',\n 'referral' => 'Referrals',\n 'invite' => 'Invite and Share',\n 'user-point' => 'Use Reward Points',\n ) );\n include 'views/html-admin-page.php';\n\t}", "public function get_settings_html() {\n\t\treturn '';\n\t}", "function admin_options() {\r\n ?>\r\n <h3><?php _e('Bitcoin Payment','Bitcoin_Payment'); ?></h3>\r\n <table class=\"form-table\">\r\n <?php $this->generate_settings_html(); ?>\r\n </table> <?php\r\n }", "function display_global_settings()\n {\n $settings = array_merge($this->settings, $_POST);\n \n $site_url = rtrim($this->EE->config->item('site_url'), '/');\n $third_party_path_array = explode('/', trim(PATH_THIRD, '/'));\n $uri_segments_array = array();\n $uri_segments_array = array_slice($third_party_path_array, -3);\n //print_r($uri_segments_array);\n $third_party_uri = implode('/', $uri_segments_array);\n // Styles\n $this->EE->cp->add_to_head('<link rel=\"stylesheet\" type=\"text/css\" href=\"'.$site_url.'/'.$third_party_uri.'/page_type_switcher/styles/display_global_settings.css\" />');\n \n $this->EE->lang->loadfile('page_type_switcher');\n \n //print_r($this->settings);\n \n // Get custom field info \n $query_field_info = $this->_get_field_info();\n $query_field_info_num_rows = $query_field_info->num_rows();\n //echo '$query_field_info_num_rows: ['.$query_field_info_num_rows.']<br><br>'.PHP_EOL;\n $query_field_info_result = $query_field_info->result_array();\n //print_r($query_field_info_result);\n \n // Find page type switcher's ftype_id\n $sql_ftype_id = \"SELECT fieldtype_id \n FROM exp_fieldtypes \n WHERE name = 'page_type_switcher'\n LIMIT 1\";\n $query_ftype_id = $this->EE->db->query($sql_ftype_id);\n if ($query_ftype_id->num_rows() == 1)\n {\n $ftype_id = $query_ftype_id->row('fieldtype_id');\n //echo '$ftype_id: ['.$ftype_id.']<br><br>'.PHP_EOL;\n }\n \n // Create fieldtype's site settings form\n $r = '';\n $r .= '<table class=\"mainTable padTable\" cellspacing=\"0\" cellpaddind=\"0\" border=\"0\">'.PHP_EOL;\n $r .= '<tr>'.PHP_EOL;\n $r .= '<td width=\"30%\">'.PHP_EOL;\n $r .= $this->EE->lang->line('page_types_max_num');\n $r .= '</td>'.PHP_EOL;\n $r .= '<td>'.PHP_EOL;\n $r .= '<input type=\"text\" name=\"page_types_max_num\" value=\"'.$this->settings['page_types_max_num'].'\" style=\"width: 90%;\" />';\n $r .= '</td>'.PHP_EOL;\n $r .= '</tr>'.PHP_EOL;\n \n if ($query_field_info_num_rows == 0)\n {\n $r .= '<script type=\"text/javascript\">alert(\"'.$this->EE->lang->line('no_page_type_switchers_in_field_groups_allert').'\");</script>'.PHP_EOL;\n }\n\n for ($i = 0; $i < $query_field_info_num_rows; $i++)\n {\n if ($i == 0 OR $query_field_info_result[$i]['group_id'] != $query_field_info_result[$i - 1]['group_id'])\n {\n $r .= '<tr class=\"header\">'.PHP_EOL;\n $r .= '<th colspan=\"2\">';\n $r .= $query_field_info_result[$i]['group_name'];\n $r .= '</th>'.PHP_EOL;\n $r .= '</tr>'.PHP_EOL;\n \n for ($j = 1; $j <= $this->settings['page_types_max_num']; $j++)\n {\n $r .= '<tr>'.PHP_EOL;\n $r .= '<td width=\"30%\">'.PHP_EOL;\n $r .= str_replace('{number}', $j, $this->EE->lang->line('page_type_number_name'));\n $r .= '</td>'.PHP_EOL;\n $r .= '<td>'.PHP_EOL;\n $value = '';\n if (isset($this->settings['field_group'][$query_field_info_result[$i]['group_id']]['page_type_'.$j.'_name']))\n {\n $value = $this->settings['field_group'][$query_field_info_result[$i]['group_id']]['page_type_'.$j.'_name'];\n }\n $r .= '<input type=\"text\" name=\"'.'field_group['.$query_field_info_result[$i]['group_id'].'][page_type_'.$j.'_name]'.'\" value=\"'.$value.'\" style=\"width: 90%;\">'; \n $r .= '</td>'.PHP_EOL;\n $r .= '</tr>'.PHP_EOL;\n }\n }\n \n // Display all fields except page type switcher\n if ($query_field_info_result[$i]['field_type'] != 'page_type_switcher')\n {\n $r .= '<tr>'.PHP_EOL;\n $r .= '<td width=\"30%\">'.PHP_EOL;\n $r .= $query_field_info_result[$i]['field_label'];\n $r .= '</td>'.PHP_EOL;\n $r .= '<td style=\"white-space: pre\">'.PHP_EOL;\n for ($j = 1; $j <= $this->settings['page_types_max_num']; $j++)\n {\n $checked = '';\n if (isset($this->settings['page_types_field_id'][$query_field_info_result[$i]['field_id']]['page_type_'.$j]) AND $this->settings['page_types_field_id'][$query_field_info_result[$i]['field_id']]['page_type_'.$j] == 'y')\n {\n $checked = 'checked=\"checked\"';\n }\n $r .= str_replace('{number}', $j, $this->EE->lang->line('page_type_number_checkbox')).NBS.NBS.'<input type=\"checkbox\" name=\"'.'page_types_field_id['.$query_field_info_result[$i]['field_id'].'][page_type_'.$j.']'.'\" value=\"y\" '.$checked.'>'.NBS.NBS.NBS.NBS;\n \n }\n $r .= '</td>'.PHP_EOL;\n $r .= '</tr>'.PHP_EOL;\n }\n }\n $r .= '</table>'.PHP_EOL;\n\n return $r;\n \n }", "function DisplaySettings()\n {\n $this->DisplayBreadcrumb();\n PrintPluginSettings($this->pluginid, array('form_wizard_settings','form_export_settings'), $this->_page);\n }", "public function invoice_settings() {\n \n // Check if the session exists and if the login user is admin\n $this->check_session($this->user_role, 1);\n \n // Get statistics template\n $this->body = 'admin/invoice-settings';\n \n // Load the admin layout\n $this->admin_layout();\n \n }", "function options_page() {\n\t\t$settings = __( 'AdControl Settings', 'adcontrol' );\n\t\t$notice = sprintf(\n\t\t\t__( 'AdControl requires %sJetpack%s to be installed and connected at this time. %sHelp getting started.%s', 'adcontrol' ),\n\t\t\t'<a href=\"https://jetpack.com/\" target=\"_blank\">', '</a>',\n\t\t\t'<a href=\"https://jetpack.com/support/getting-started-with-jetpack/\" target=\"_blank\">', '</a>'\n\t\t);\n\n\t\techo <<<HTML\n\t\t<div class=\"wrap\">\n\t\t\t<div id=\"icon-options-general\" class=\"icon32\"><br></div>\n\t\t\t<h2>$settings</h2>\n\t\t\t<p>$notice</p>\n\t\t</div>\nHTML;\n\t}", "public function settings(){\n if (!$this->students->isLogin()) {\n\n header('Location:/login');\n die();\n }\n\n /**\n * Main Body Section ///////////////////////////////////////////////////////////////////////////////////////////\n */\n\n \n DataManager::getInstance()->addData('Students', $this->students);\n\n /**\n * Render///////////////////////////////////////////////////////////////////////////////////////////////////////\n */\n\n $this->render();\n }", "function achilles_theme_settings_page(){ ?>\n <div class=\"wrap\">\n <h2><?php printf(__('%s Settings', 'achilles'), wp_get_theme()); ?></h2>\n <div class=\"updated\">\n <p><?php _e('Enter in your property settings below.', 'achilles'); ?></p>\n </div>\n <?php settings_errors(); ?> \n \n <form action=\"options.php\" method=\"POST\">\n <?php settings_fields( 'achilles-settings-group' ); ?>\n <?php do_settings_sections( 'achilles' ); ?>\n <?php submit_button(); ?>\n </form>\n \n </div> <!-- end settings wrap -->\n \n\t\n<?php }", "public function options_page_html() {\n // check user capabilities\n if ( ! current_user_can( 'manage_options' ) ) {\n return;\n }\n\n // add error/update messages\n\n // check if the user have submitted the settings\n // wordpress will add the \"settings-updated\" $_GET parameter to the url\n if ( isset( $_GET['settings-updated'] ) ) {\n // add settings saved message with the class of \"updated\"\n add_settings_error( 'settcalc_messages', 'settcalc_message', __( 'Settings Saved', 'settcalc' ), 'updated' );\n }\n\n // show error/update messages\n settings_errors( 'settcalc_messages' );\n ?>\n <div class=\"wrap\">\n <h1><?php echo esc_html( get_admin_page_title() ); ?></h1>\n <form action=\"options.php\" method=\"post\">\n <?php\n // output security fields for the registered setting \"wporg\"\n settings_fields( 'settcalc' );\n // output setting sections and their fields\n // (sections are registered for \"wporg\", each field is registered to a specific section)\n do_settings_sections( 'settcalc' );\n // output save settings button\n submit_button( 'Save Settings' );\n ?>\n </form>\n </div>\n <?php\n }", "public function index()\n {\n $this->view->title = 'Settings';\n return $this->view('settings.index');\n }", "public function page_init() { \n\n\t\t\tif (!get_option('dls_settings_site_id')) {\n\t\t\t\tadd_option('dls_settings_site_id');\n\t\t\t}\n\n\t\t\tif (!get_option('dls_settings_enabled_post_types')) {\n\t\t\t\tadd_option('dls_settings_enabled_post_types');\n\t\t\t}\n\n\t\t\tif (!get_option('dls_settings_replace_host_list')) {\n\t\t\t\tadd_option('dls_settings_replace_host_list');\n }\n\n\t\t\tif (!get_option('dls_settings_auto_redirect_to_admin_page')) {\n\t\t\t\tadd_option('dls_settings_auto_redirect_to_admin_page');\n }\n\n\t\t\tif (!get_option('dls_overwrite_viewable_permalink')) {\n\t\t\t\tadd_option('dls_overwrite_viewable_permalink');\n }\n\n \t\t\tif (!get_option('dls_overwrite_viewable_permalink_host')) {\n\t\t\t\tadd_option('dls_overwrite_viewable_permalink_host');\n\t\t\t}\n \n register_setting( 'my_option_group', 'dls_settings_site_id', array( $this, 'sanitize' ) );\n register_setting( 'my_option_group', 'dls_settings_enabled_post_types', array( $this, 'sanitize' ) );\n register_setting( 'my_option_group', 'dls_settings_replace_host_list', array( $this, 'sanitize' ) );\n register_setting( 'my_option_group', 'dls_settings_auto_redirect_to_admin_page', array( $this, 'sanitize' ) );\n register_setting( 'my_option_group', 'dls_overwrite_viewable_permalink', array( $this, 'sanitize' ) );\n register_setting( 'my_option_group', 'dls_overwrite_viewable_permalink_host', array( $this, 'sanitize' ) );\n\n add_settings_section( 'settings_site_id', 'Site ID', array( $this, 'print_site_id' ), 'my-setting-admin' ); \n\t\t\tadd_settings_field( 'dls-settings', 'Set the site id for this site', array( $this, 'site_id_callback'), 'my-setting-admin', 'settings_site_id' ); \n\n add_settings_section( 'setting_section_id', 'Post types settings', array( $this, 'print_post_types_info' ), 'my-setting-admin' ); \n\t\t\tadd_settings_field( 'dls-settings', 'Select post types', array( $this, 'post_type_callback'), 'my-setting-admin', 'setting_section_id' ); \n\n add_settings_section( 'settings_replace_hosts', 'Hosts to replace', array( $this, 'print_replace_hosts_info' ), 'my-setting-admin' ); \n\t\t\tadd_settings_field( 'dls-settings', 'List of hosts', array( $this, 'replace_hosts_callback'), 'my-setting-admin', 'settings_replace_hosts' ); \n\n add_settings_section( 'settings_auto_redirect_to_admin', 'Auto redirect to admin page', array( $this, 'print_auto_redirect_to_admin' ), 'my-setting-admin' ); \n\t\t\tadd_settings_field( 'dls-settings', 'Auto redirect to admin page', array( $this, 'auto_redirect_to_admin_callback'), 'my-setting-admin', 'settings_auto_redirect_to_admin' ); \n\n add_settings_section( 'settings_overwrite_viewable_permalink', 'Overwrite the viewable permalink', array( $this, 'print_overwrite_viewable_permalink' ), 'my-setting-admin' ); \n\t\t\tadd_settings_field( 'dls-settings', 'Overwrite the viewable permalink', array( $this, 'overwrite_viewable_permalink_callback'), 'my-setting-admin', 'settings_overwrite_viewable_permalink' ); \n\t\t\tadd_settings_field( 'dls-settings-overwrite_viewable_permalink_host', 'Overwrite the viewable permalink host', array( $this, 'overwrite_viewable_permalink_host_callback'), 'my-setting-admin', 'settings_overwrite_viewable_permalink' ); \n\n\t\t}", "function ms_settings_section() {\n?>\n<h3><?php _e( 'Post Revision Workflow', $this->text_domain ) ?></h3>\n<table class=\"form-table\">\n\t<tbody>\n \t<tr valign=\"top\">\n \t<th scope=\"row\">\n \t<label for=\"dpn_reviewers\"><?php _e( 'Default email address for post revision workflow notification:', $this->text_domain ) ?></label>\n </th>\n <td>\n \t<?php $this->settings_field() ?>\n </td>\n </tr>\n </tbody>\n</table>\n<?php\n\t\t}", "public function general()\n {\n if ( ! auth()->guard('admin')->user()->can('access general ' . $this->table)) {\n return redirect()->route('admin.setting.index')->with('alert-danger', __($this->noPermission));\n }\n $view = [\n 'back' => route('admin.setting.index'),\n 'title' => __('General Settings'),\n 'breadcrumbs' => [\n route('admin.setting.index') => __('Setting'),\n route('admin.setting.general.index') => __('General'),\n null => __('Edit')\n ],\n 'subtitle' => __('All About General Settings'),\n 'description' => __('You can adjust all general settings here'),\n 'navs' => $this->settings,\n 'setting' => $this->settings->where('slug', 'general')->first(),\n ];\n return view('admin.setting.general.index', $view);\n }", "function index()\n {\n\t$data = $this->page_settings('default', NULL, NULL, 'Users', 'users');\n\t$this->templates->backend($data);\n }", "public function settings() {\n\n\t\tdo_settings_sections( 'wpbgdc' );\n\n\t\tsubmit_button();\n\n\t\techo '<div class=\"clear\"></div>';\n\n\t}", "public function pluginSettingsPage()\n {\n // check permission.\n if (!current_user_can('manage_options')) {\n wp_die(__('You do not have permission to access this page.'));\n }\n\n // load config values to get settings config file.\n $loader = new \\RundizableWpFeatures\\App\\Libraries\\Loader();\n $config_values = $loader->loadConfig();\n if (is_array($config_values) && array_key_exists('rundiz_settings_config_file', $config_values)) {\n $settings_config_file = $config_values['rundiz_settings_config_file'];\n } else {\n echo 'Settings configuration file was not set.';\n die('Settings configuration file was not set.');\n exit;\n }\n unset($config_values, $loader);\n\n $RundizSettings = new \\RundizableWpFeatures\\App\\Libraries\\RundizSettings();\n $RundizSettings->settings_config_file = $settings_config_file;\n\n $options_values = $this->getOptions();\n\n // if form submitted\n if (isset($_POST) && !empty($_POST)) {\n if (!wp_verify_nonce((isset($_POST['_wpnonce']) ? $_POST['_wpnonce'] : ''))) {\n wp_nonce_ays('-1');\n }\n\n // populate form field values.\n $options_values = $RundizSettings->getSubmittedData();\n\n // you may validate form here first.\n // then save data.\n $result = $this->saveOptions($options_values);\n\n if ($result === true) {\n $output['form_result_class'] = 'notice-success';\n $output['form_result_msg'] = __('Settings saved.');\n } else {\n $output['form_result_class'] = 'notice-success';\n $output['form_result_msg'] = __('Settings saved.');\n }\n }// endif $_POST\n\n $output['settings_page'] = $RundizSettings->getSettingsPage($options_values);\n unset($RundizSettings, $options_values);\n\n $Loader = new \\RundizableWpFeatures\\App\\Libraries\\Loader();\n $Loader->loadView('admin/settings_v', $output);\n unset($Loader, $output);\n }", "public function admin_options() {\r\n echo '<h3>' . __('Mondido', 'mondido') . '</h3>';\r\n echo '<p>' . __('Mondido, Simple payments, smart functions', 'mondido') . '</p>';\r\n echo '<table class=\"form-table\">';\r\n // Generate the HTML For the settings form.\r\n $this->generate_settings_html();\r\n echo '</table>';\r\n }", "public function page_init()\n {\n register_setting(\n 'sepw_option_group', // Option group\n 'sepw_settings', // Option name\n array($this, 'sanitize') // Sanitize\n );\n\n add_settings_section(\n 'info_section_id',\n __('Guide', 'sepw'),\n array($this, 'print_info_section_info'),\n 'sepw-setting-admin'\n );\n\n add_settings_section(\n 'setting_section_id', // ID\n __('Settings', 'sepw'), // Title\n array($this, 'print_settings_section_info'), // Callback\n 'sepw-setting-admin' // Page\n );\n\n add_settings_section(\n 'generate_section_id',\n __('Create Pricelist', 'sepw'),\n array($this, 'print_generate_section_info'),\n 'sepw-setting-admin'\n );\n\n add_settings_field(\n 'product_fields',\n __('Filters', 'sepw'),\n array($this, 'product_fields_callback'),\n 'sepw-setting-admin',\n 'setting_section_id'\n );\n\n add_settings_field(\n 'images_size',\n __('Thumbnail size', 'sepw'),\n array($this, 'images_size_callback'),\n 'sepw-setting-admin',\n 'setting_section_id'\n );\n\n add_settings_field(\n 'cache_lifetime',\n __('Update Frequency', 'sepw'),\n array($this, 'cache_lifetime_callback'),\n 'sepw-setting-admin',\n 'setting_section_id'\n );\n }", "function ywig_create_settings_page_cb() {\n\trequire_once get_template_directory() . '/inc/templates/ywig-site-settings.php';\n}", "public function page_init()\n { \n register_setting(\n 'my_option_group', // Option group\n 'my_option_name', // Option name\n array( $this, 'sanitize' ) // Sanitize\n );\n\n add_settings_section(\n 'setting_section_id', // ID\n 'CLAS DEPT Theme Settings', // Title\n array( $this, 'print_section_info' ), // Callback\n 'my-setting-admin' // Page\n ); \n\n add_settings_field(\n 'dept_address', // ID\n 'Department Address', // Title \n array( $this, 'dept_address_callback' ), // Callback\n 'my-setting-admin', // Page\n 'setting_section_id' // Section \n ); \n\n add_settings_field(\n 'title', \n 'Footer Title', \n array( $this, 'title_callback' ), \n 'my-setting-admin', \n 'setting_section_id'\n ); \n\n add_settings_field(\n 'fb', \n 'Facebook Link', \n array( $this, 'fb_callback' ), \n 'my-setting-admin', \n 'setting_section_id'\n ); \n\n add_settings_field(\n 'twitter', \n 'Twitter Link', \n array( $this, 'twitter_callback' ), \n 'my-setting-admin', \n 'setting_section_id'\n ); \n\n add_settings_field(\n 'instagram', \n 'Instagram Link', \n array( $this, 'instagram_callback' ), \n 'my-setting-admin', \n 'setting_section_id'\n ); \n\n add_settings_field(\n 'youtube', \n 'Youtube Link', \n array( $this, 'youtube_callback' ), \n 'my-setting-admin', \n 'setting_section_id'\n ); \n\n add_settings_field(\n 'rss', \n 'RSS Link', \n array( $this, 'rss_callback' ), \n 'my-setting-admin', \n 'setting_section_id'\n ); \n\n \n }", "public function index()\n\t{\n\t\n\t\t/* Breadcrumb Setup Start */\n\t\t\n\t\t$link \t\t\t\t\t= \tbreadcrumb_home();\n\t\t\n\t\t$data['breadcrumb'] \t= \t$link;\n\t\t\n\t\t/* Breadcrumb Setup End */\n \n\t $data['time_zone']\t\t=\t$this->mod_site_settings->get_timezone();\n\t\t$data['country']\t\t=\t$this->mod_site_settings->get_country();\n\t\t$data['getrecord']\t\t= $this->mod_site_settings->get_site_settings();\n\t\t\n\t\t\n\t\t$data['page_content']\t=\t$this->load->view('site_settings',$data,true);\n\t\t$this->load->view('page_layout',$data);\n\t}", "public function index()\n\t{\n\t\t$this->data['title'] = 'Office Settings';\n\t\t$this->data['company'] = $this->company_model->get_company_detail();\n\t\t$this->data['css'] = 'body/admin/css/form_style_default';\n\t\t$this->data['js'] = 'body/admin/js/form_style_default';\n\t\t$this->data['content'] = 'content/admin/office/setting';\n\t\t$this->load->view('body/admin/style_1', $this->data);\n\t}", "public function index()\n\t{\n\t\t//restricted this area, only for admin\n\t\tpermittedArea();\n\n\t\t$data['settings'] = $this->settings_model->adminSettings();\n\n\t\tif($this->input->post())\n\t\t{\n\t\t\t$input = $this->input->post();\n\t\t\t$this->form_validation->set_rules('default_email', 'Default Email', 'required|valid_email');\n\n\t\t\tif($this->form_validation->run())\n\t\t\t{\n\t\t\t\t$this->settings_model->updateSettings();\n\t\t\t}\n\t\t}\n\n\t\ttheme('admin_settings', $data);\n\t}" ]
[ "0.83461183", "0.8314721", "0.8198969", "0.8164159", "0.8097625", "0.8092046", "0.8061558", "0.79649186", "0.7794544", "0.77841425", "0.7754751", "0.7729539", "0.7689385", "0.76858693", "0.76678824", "0.76569605", "0.76268697", "0.75911856", "0.75889754", "0.75385803", "0.7537252", "0.7532588", "0.7518163", "0.7497053", "0.7458797", "0.74417573", "0.7438028", "0.74234235", "0.74088746", "0.7357552", "0.7356291", "0.73517156", "0.7342054", "0.7337488", "0.73373026", "0.7335064", "0.7297349", "0.7247754", "0.7216096", "0.72135615", "0.7198436", "0.7198038", "0.71840477", "0.71832234", "0.7179574", "0.7168041", "0.71513575", "0.7147057", "0.7135621", "0.7126271", "0.70728844", "0.7070562", "0.70697343", "0.70656884", "0.7061482", "0.70454293", "0.70362353", "0.7031693", "0.70236063", "0.70219254", "0.70194125", "0.70048153", "0.6972799", "0.6960857", "0.6948142", "0.6942873", "0.69394225", "0.69375527", "0.69355625", "0.69214237", "0.6914161", "0.69125575", "0.6902503", "0.69011563", "0.6897853", "0.6895863", "0.68868876", "0.68864375", "0.6877224", "0.68720865", "0.68703026", "0.68630105", "0.6860197", "0.6857109", "0.68569285", "0.68561095", "0.68433136", "0.68341434", "0.6821247", "0.68205464", "0.6819362", "0.6815078", "0.68115526", "0.68100303", "0.6808257", "0.6807109", "0.6804243", "0.6803653", "0.67995507", "0.67982346" ]
0.8074988
6
Styles settings page template
public function style_settings() { include __DIR__ . "/views/style_settings.php"; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function settings_page() { ?>\n\n <div class=\"wrap\">\n <?php $this->settings_api->settings_html(); ?>\n </div><?php\n }", "public function render_settings_page()\n {\n }", "public function render_settings_page() {\n\t\tinclude( get_inc_dir() . '/templates/admin-settings.php' );\n\t}", "public function settings_page(){\n\t\t$page_base = $this->page_url();\n\t\tob_start();\n\t\t?>\n\t\t<div class=\"wp_lms settings\">\n\t\t\t<h1><?= $this::$name; ?> Settings Page</h1>\n\t\t\t\n\t\t</div>\n\t\t<?\n\t\tob_end_flush();\n\t}", "public function settings_page() {\n\t\t// Current tab.\n\t\t$tab = Template::current_tab();\n\n\t\t// Render settings header.\n\t\t$this->view( 'settings/common/header' );\n\n\t\t// Render settings page.\n\t\t$this->view( 'settings/settings', [\n\t\t\t'title' => Template::tabs()[ $tab ],\n\t\t\t'tab' => $tab,\n\t\t\t'form_url' => Template::settings_page(\n\t\t\t\t$tab,\n\t\t\t\t$this->is_network()\n\t\t\t),\n\t\t] );\n\n\t\t// Render settings footer.\n\t\t$this->view( 'settings/common/footer' );\n\t}", "public function setting_page() {\n\n\t\techo '<div class=\"wrap\">';\n\t\tsettings_errors();\n\n\t\t$this->setting->show_navigation();\n\t\t$this->setting->show_forms();\n\n\t\techo '</div>';\n\t}", "public function settingsPage()\n\t{\n\t\t$this->setForms();\n\t\tinclude( \\GFormProtected\\Helpers::view('settings/settings') );\n\t}", "public static function general_settings() {\n\t\t$msg = '';\n\t\tif (!empty($_POST) && isset($_POST['save-settings'])) {\n\t\t\t$msg = self::save();\n\t\t}\n\t\t$page_id = get_option('dod_page_id');\n\t\t$args['page_id'] = $page_id;\n\t\t$query = new WP_Query($args);\n\t\t$page = $query->posts[0];\n\t\t$custom_css = array_shift(get_post_meta($page_id, 'dod_custom_css'));\n\t\t$selected_template = array_shift(get_post_meta($page_id, '_wp_page_template'));\n\t\t$templates = get_page_templates();\n\t\tinclude 'views/_geneal_settings.php';\n\t}", "function fsnat_settings_page() {\n\trequire_once( get_template_directory() . '/inc/templates/fsnat-custom-css.php');\n}", "function settings_page() {\n\t\textract( $this->group, EXTR_OVERWRITE ); ?>\n\n\t<div class=\"wrap\">\n\t\t<?php screen_icon(); ?>\n\t\t<h2><?php echo esc_html( $page_title ) ?></h2>\n\t\t<?php do_action( \"{$prefix}_kc_settings_page_before\", $this->group ) ?>\n\t\t<form action=\"options.php\" method=\"post\" id=\"kc-settings-form\">\n\t\t\t<?php\n\t\t\t\t# The hidden fields\n\t\t\t\tsettings_fields( \"{$prefix}_settings\" );\n\n\t\t\t\tswitch ( $this->group['display'] ) {\n\t\t\t\t\tcase 'metabox' :\n\t\t\t\t\t\t$this->metabox->display();\n\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'plain' :\n\t\t\t\t\t\tforeach ( $this->group['options'] as $section ) :\n\t\t\t\t\t\t?>\n\t\t\t\t\t\t<h3><?php echo esc_html( $section['title'] ) ?></h3>\n\t\t\t\t\t\t<?php\n\t\t\t\t\t\t\t$this->settings_section( $section );\n\t\t\t\t\t\tendforeach;\n\t\t\t\t\t\tsubmit_button( __( 'Save Changes' ) );\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t?>\n\t\t</form>\n\t\t<?php do_action( \"{$prefix}_kc_settings_page_after\", $this->group ) ?>\n\t</div>\n\t<?php }", "function settings_page() {\n global $wpdb, $wp_properties;\n\n include_once( __DIR__ . '/ui/settings-section.php' );\n\n }", "public function settings_page() {\r\n\t\tif ( ! isset( $this->hook_suffix ) )\r\n\t\t\treturn;\r\n\r\n\t\tadd_action( 'inf_member_settings_after_header_' . $this->hook_suffix, array( 'Inf_Member_App_Settings', 'after_header' ) );\r\n\r\n Inf_Member_Settings::settings_page_template( $this->hook_suffix, __( 'Inf Member Settings', 'inf-member' ) );\r\n\t}", "function settings_html() {\n $this->render_setting( 'label_any' );\n $this->render_setting( 'modifiers' );\n $this->render_setting( 'orderby' );\n $this->render_setting( 'count' );\n }", "public function actionSettingsIndexTemplate()\n\t{\n\t\t$settingsModel = new SproutForms_SettingsModel;\n\n\t\t$settings = craft()->db->createCommand()\n\t\t\t->select('settings')\n\t\t\t->from('plugins')\n\t\t\t->where('class=:class', array(':class'=> 'SproutForms'))\n\t\t\t->queryScalar();\n\n\t\t$settings = JsonHelper::decode($settings);\n\t\t$settingsModel->setAttributes($settings);\n\n\t\t$variables['settings'] = $settingsModel;\n\n\t\t// Load our template\n\t\t$this->renderTemplate('sproutforms/settings', $variables);\n\n\t}", "private function settings()\n\t{\n\t\tif($_POST)\n\t\t{\n\t\t\t// Available Vews\n config::set('s7n.views', $this->input->post('views'));\n\n\t\t\t// Default Sidebar Title\n config::set('s7n.default_sidebar_title', $this->input->post('default_sidebar_title'));\n\n\t\t\t// Default Sidebar Content\n config::set('s7n.default_sidebar_content', $this->input->post('default_sidebar_content'));\n\n\t\t\tmessage::info(__('Page Settings edited successfully'), 'admin/page/settings');\n\t\t}\n\n\t\t$this->head->title->append(__('Settings'));\n\n\t\t$this->template->title .= __('Settings');\n\t\t$this->template->content = View::factory('page/settings', array(\n\t\t\t'views' => config::get('s7n.page_views'),\n\t\t\t'default_sidebar_title' => config::get('s7n.default_sidebar_title'),\n\t\t\t'default_sidebar_content' => config::get('s7n.default_sidebar_content')\n\t\t));\n\t}", "public function init_settings_page()\n\t\t{\n\n\t\t\t$this->template_header();\n\t\t\t$this->template_body();\n\t\t\t$this->template_footer();\n\n\t\t}", "public function settings_page() {\n\t\tinclude_once( dirname( __FILE__ ) . '/class-vendor-admin-settings.php' );\n\t\tVendor_Admin_Settings::output();\n\t}", "public function plugin_settings_page() {\r\n\t\t\tif ( ! current_user_can( 'manage_options' ) ) {\r\n\t\t\t\twp_die( esc_html( 'You do not have sufficient permissions to access this page.' ) );\r\n\t\t\t}\r\n\r\n\t\t\t// Render the settings template.\r\n\t\t\tinclude( sprintf( '%s/templates/settings.php', dirname( __FILE__ ) ) );\r\n\t\t}", "public function settings_page() {\n\n\t\t?>\n\n\t\t<div class=\"wrap schedule-a-visit-to-sherpa-settings\">\n\t\t\t\n\t\t\t<form id=\"schedule-a-visit-to-sherpa-form\" method=\"post\" action=\"options.php\">\n\t\t\t\t\n\t\t\t\t<?php echo wp_nonce_field( 'schedule_a_visit_to_sherpa_data', 'schedule_a_visit_to_sherpa_nonce' ); ?>\n\n\t\t\t\t<?php settings_fields( 'schedule_a_visit_to_sherpa_settings_section' ); ?>\n\n\t\t\t\t<?php do_settings_sections( 'schedule-a-visit-to-sherpa' ); ?>\n\t\t\t\t\n\t\t\t\t<?php submit_button(); ?>\n\n\t\t\t</form>\n\n </div>\n\n\t\t<?php\n\n\t}", "function achilles_theme_settings_page(){ ?>\n <div class=\"wrap\">\n <h2><?php printf(__('%s Settings', 'achilles'), wp_get_theme()); ?></h2>\n <div class=\"updated\">\n <p><?php _e('Enter in your property settings below.', 'achilles'); ?></p>\n </div>\n <?php settings_errors(); ?> \n \n <form action=\"options.php\" method=\"POST\">\n <?php settings_fields( 'achilles-settings-group' ); ?>\n <?php do_settings_sections( 'achilles' ); ?>\n <?php submit_button(); ?>\n </form>\n \n </div> <!-- end settings wrap -->\n \n\t\n<?php }", "public function GeneralSettingsView(){\n\t\t//Meta is usually not setup yet, so we manually do this before loading css file\n\t\t$this->meta = new Meta();\n\t\t\n\t\t//This class requires an extra css file\n\t\t$this->getMeta()->addExtra('<link href=\"core/fragments/css/admin.css\" rel=\"stylesheet\" type=\"text/css\" />');\n\t}", "function settings_section() {\n\t\t}", "public function initSettingsPage()\n {\n // admin sections\n $this->_addSection('schemas', __('Schemas', 'my_seo_settings'));\n $this->_addSection('special', __('Thematic Schemas', 'my_seo_settings'));\n $this->_addSection('front_page', __('General Settings', 'my_seo_settings'));\n $this->_addSection('compatibility', __('Compatibility', 'my_seo_settings'));\n\n /*\n * Adds fields to default section\n */\n $this->_addSchemaTagLocation('generate_json_ld_fpwebpage_hook_short_code', __('Schema Tag Location', 'my_seo_settings'), 'front_page');\n $this->_addInputField('generate_json_ld_fpwebpage_name', __('Website Title', 'my_seo_settings'), 'front_page');\n\t\t$this->_addInputField('generate_json_ld_fpwebpage_inlanguage', __('Website Language', 'my_seo_settings'), 'front_page');\n // Schemas\n $this->_addCheckboxField('generate_json_ld_fpwebpage', __('WebPage Schema for Home Page', 'my_seo_settings'), 'schemas');\n $this->_addCheckboxField('generate_json_ld_webpage', __('WebPage Schema for Pages', 'my_seo_settings'), 'schemas');\n $this->_addCheckboxField('generate_json_ld_posts', __('WebPage Schema for Posts', 'my_seo_settings'), 'schemas');\n $this->_addMenuDropbox('generate_json_ld_fpwebpage_menu', __('WPHeader Schema', 'my_seo_settings'), 'schemas');\n $this->_addMenuDropbox('generate_json_ld_fpwebpage_fmenu', __('WPFooter Schema', 'my_seo_settings'), 'schemas');\n\t\t$this->_addInputField('generate_json_ld_logo_url', __( 'Logo URL', 'my_seo_settings'), 'schemas');\n\n // Special\n $recipeHint = 'On individual post editing page Recipe specific fields will appear. When filled in they would show up in a Recipe schema on the page.';\n $faqHint = 'FAQ questions and answers are being added manually. go to the each page/post editor you would like to add - this schema must be enabled to take effect';\n\n $this->_addCheckboxField('generate_json_ld_recipe', __('Recipe Schema', 'my_seo_settings'), 'special', $recipeHint);\n $this->_addCheckboxField('generate_json_ld_faq', __('FAQ Schema', 'my_seo_settings'), 'special', $faqHint);\n $this->_addCustomField('generate_json_ld_person_schema', __('Person Schema', 'my_seo_settings'), [$this, '_renderPersonSchemaField'], 'special');\n $this->_addCustomField('generate_json_ld_product_schema', __('Product Schema', 'my_seo_settings'), [$this, '_renderProductSchemaField'], 'special');\n $this->_addCustomField('generate_json_ld_contact_page_schema', __('Contact Page Schema', 'my_seo_settings'), [$this, '_renderContactPageSchemaField'], 'special');\n $this->_addCustomField('generate_json_ld_about_page_schema', __('About Page Schema', 'my_seo_settings'), [$this, '_renderAboutPageSchemaField'], 'special');\n\t\t$this->_addCheckboxField('search_bar', __('Search Bar - Does the website have a search bar?', 'my_seo_settings'), 'compatibility');\n\t\t$this->_addCheckboxField('generate_json_ld_author', __( 'Author Schema', 'my_seo_settings'), [$this, '_renderAuthorPageSchemaField'], 'special' );\n $this->_addCheckboxField('yoast_disable', __('Yoast schema Off', 'my_seo_settings'), 'compatibility');\n }", "public function settings(){\n\t\t$this->verify();\n\t\t$data['title']=\"Settings\";\n\t\t$this->load->view('parts/head', $data);\n\t\t$this->load->view('settings', $data);\n\t\t$this->load->view('parts/javascript', $data);\n\t}", "public function settings_page () {\n\n // Build page HTML\n $html = '<div class=\"wrap\" id=\"' . $this->_token . '_settings\">' . \"\\n\";\n $html .= '<h2>' . __( 'Plugin Settings' , 'listeo_core' ) . '</h2>' . \"\\n\";\n\n $tab = '';\n if ( isset( $_GET['tab'] ) && $_GET['tab'] ) {\n $tab .= $_GET['tab'];\n }\n\n // Show page tabs\n if ( is_array( $this->settings ) && 1 < count( $this->settings ) ) {\n\n $html .= '<h2 class=\"nav-tab-wrapper\">' . \"\\n\";\n\n $c = 0;\n foreach ( $this->settings as $section => $data ) {\n\n // Set tab class\n $class = 'nav-tab';\n if ( ! isset( $_GET['tab'] ) ) {\n if ( 0 == $c ) {\n $class .= ' nav-tab-active';\n }\n } else {\n if ( isset( $_GET['tab'] ) && $section == $_GET['tab'] ) {\n $class .= ' nav-tab-active';\n }\n }\n\n // Set tab link\n $tab_link = add_query_arg( array( 'tab' => $section ) );\n if ( isset( $_GET['settings-updated'] ) ) {\n $tab_link = remove_query_arg( 'settings-updated', $tab_link );\n }\n\n // Output tab\n $html .= '<a href=\"' . $tab_link . '\" class=\"' . esc_attr( $class ) . '\">' . esc_html( $data['title'] ) . '</a>' . \"\\n\";\n\n ++$c;\n }\n\n $html .= '</h2>' . \"\\n\";\n }\n\n $html .= '<form method=\"post\" action=\"options.php\" enctype=\"multipart/form-data\">' . \"\\n\";\n\n // Get settings fields\n ob_start();\n settings_fields( $this->_token . '_settings' );\n do_settings_sections( $this->_token . '_settings' );\n $html .= ob_get_clean();\n\n $html .= '<p class=\"submit\">' . \"\\n\";\n $html .= '<input type=\"hidden\" name=\"tab\" value=\"' . esc_attr( $tab ) . '\" />' . \"\\n\";\n $html .= '<input name=\"Submit\" type=\"submit\" class=\"button-primary\" value=\"' . esc_attr( __( 'Save Settings' , 'listeo_core' ) ) . '\" />' . \"\\n\";\n $html .= '</p>' . \"\\n\";\n $html .= '</form>' . \"\\n\";\n $html .= '</div>' . \"\\n\";\n\n echo $html;\n }", "public function settings_page()\n {\n\n // Build page HTML\n $html = '<div class=\"wrap\" id=\"' . $this->parent->_token . '_settings\">' . \"\\n\";\n $html .= '<h2>' . __('SUAPI Settings', 'wp-suapi') . '</h2>' . \"\\n\";\n\n $tab = '';\n if (isset($_GET['tab']) && $_GET['tab']) {\n $tab .= $_GET['tab'];\n }\n\n // Show page tabs\n if (is_array($this->settings) && 1 < count($this->settings)) {\n\n $html .= '<h2 class=\"nav-tab-wrapper\">' . \"\\n\";\n\n $c = 0;\n foreach ($this->settings as $section => $data) {\n\n // Set tab class\n $class = 'nav-tab';\n if (!isset($_GET['tab'])) {\n if (0 == $c) {\n $class .= ' nav-tab-active';\n }\n } else {\n if (isset($_GET['tab']) && $section == $_GET['tab']) {\n $class .= ' nav-tab-active';\n }\n }\n\n // Set tab link\n $tab_link = add_query_arg(array('tab' => $section));\n if (isset($_GET['settings-updated'])) {\n $tab_link = remove_query_arg('settings-updated', $tab_link);\n }\n\n // Output tab\n $html .= '<a href=\"' . $tab_link . '\" class=\"' . esc_attr($class) . '\">' . esc_html($data['title']) . '</a>' . \"\\n\";\n\n ++$c;\n }\n\n $html .= '</h2>' . \"\\n\";\n }\n\n $html .= '<form method=\"post\" action=\"options.php\" enctype=\"multipart/form-data\">' . \"\\n\";\n\n // Get settings fields\n ob_start();\n settings_fields($this->parent->_token . '_settings');\n do_settings_sections($this->parent->_token . '_settings');\n $html .= ob_get_clean();\n\n $html .= '<p class=\"submit\">' . \"\\n\";\n $html .= '<input type=\"hidden\" name=\"tab\" value=\"' . esc_attr($tab) . '\" />' . \"\\n\";\n $html .= '<input name=\"Submit\" type=\"submit\" class=\"button-primary\" value=\"' . esc_attr(__('Save Settings', 'wp-suapi')) . '\" />' . \"\\n\";\n $html .= '</p>' . \"\\n\";\n $html .= '</form>' . \"\\n\";\n $html .= '</div>' . \"\\n\";\n\n echo $html;\n }", "public function index()\n\t{\t\n\t\t$settings = Settings::all();\n\t\t$langs = Language::get();\n\t\t$this->layout = View::make('blogfolio::settings.index-settings', compact('settings', 'templates', 'langs'));\n $this->layout->title = trans('blogfolio::settings.settings');\n $this->layout->breadcrumb = Config::get('syntara::breadcrumbs.settings');\n\t}", "public function options_page() {\n\t\t$this->render_settings();\n\t}", "public function settings()\n\t{\n\n $this->load->view('back/lib/header');\n\t\t$this->load->view('back/settings');\n\t\t$this->load->view('back/lib/footer');\n\t\t\n\t}", "function settings_page() { include($this->plugin_basename . '/core/admin/settings.php'); }", "protected function _content_template()\n {\n ?>\n <#\n view.addInlineEditingAttributes( 'blog_content_top', 'none' );\n view.addInlineEditingAttributes( 'blog_content_middle', 'none' );\n view.addInlineEditingAttributes( 'blog_content_bottom', 'none' );\n console.log(settings);\n #>\n <div class=\"tabs tabs-article\" data-tabs=\"secondary\">\n <div data-tab=\"blog\" class=\"blog active\">\n <div class=\"hero\">\n </div>\n\n <div class=\"columnar\">\n <div class=\"columns-twelve\">\n <a href=\"#\" class=\"article-category\">Cryptocurrency</a>\n <h1>{{{ settings.page_title }}}</h1>\n <div class=\"subtitle-article\">{{{ settings.page_subtitle }}}</div>\n </div>\n </div>\n\n <div class=\"columnar article-share\">\n\n <div class=\"share-social-info columns-four-one\">\n <div class=\"photo\"><img src=\"/wp-content/plugins/elementor-custom-widgets/assets/icons/drawkit-folder-man-colour.svg\"></div>\n <div class=\"text-wrap\">\n <div class=\"text\">Permission</div>\n <a href=\"#\">@permissionIO</a>\n </div>\n </div>\n <div class=\"share-social-icons columns-four-nine\">\n <div class=\"share-text\">share</div>\n <a href=\"#\" class=\"share-icons\"><img src=\"/wp-content/plugins/elementor-custom-widgets/assets/icons/tw-icon.svg\"></a>\n <a href=\"#\" class=\"share-icons\"><img src=\"/wp-content/plugins/elementor-custom-widgets/assets/icons/fa-icon.svg\"></a>\n <a href=\"#\" class=\"share-icons\"><img src=\"/wp-content/plugins/elementor-custom-widgets/assets/icons/LinkedInLogo.svg\"></a>\n <a href=\"#\" class=\"share-icons\"><img src=\"/wp-content/plugins/elementor-custom-widgets/assets/icons/reddit.svg\"></a>\n <a href=\"#\" class=\"share-icons\"><img src=\"/wp-content/plugins/elementor-custom-widgets/assets/icons/telegram.svg\"></a>\n </div>\n\n </div>\n\n <div class=\"columnar article-img\">\n <div class=\"columns-twelve\">\n <img src=\"/wp-content/plugins/elementor-custom-widgets/assets/img-e.png\">\n <p>Source</p>\n </div>\n </div>\n\n <div class=\"columnar article-date\">\n <div class=\"columns-eight\">\n <p>PUBLISHED </p>\n </div>\n </div>\n <div class=\"columnar article-content\">\n <div class=\"columns-eight\">\n <p>{{{ settings.blog_content_top }}}</p>\n <div class=\"wp-block-considerable-quote left\">\n <div class=\"quote\">{{{ settings.the_quote }}}</div>\n </div>\n\n {{{ settings.blog_content_middle }}}\n\n {{{ settings.blog_content_bottom }}}\n <div class=\"tags\">TAGS: List of tags</div>\n <div class=\"share-social-icons\">\n <div class=\"share-text\">share</div>\n <a href=\"#\" class=\"share-icons\"><img src=\"/wp-content/plugins/elementor-custom-widgets/assets/icons/tw-icon.svg\"></a>\n <a href=\"#\" class=\"share-icons\"><img src=\"/wp-content/plugins/elementor-custom-widgets/assets/icons/fa-icon.svg\"></a>\n <a href=\"#\" class=\"share-icons\"><img src=\"/wp-content/plugins/elementor-custom-widgets/assets/icons/LinkedInLogo.svg\"></a>\n <a href=\"#\" class=\"share-icons\"><img src=\"/wp-content/plugins/elementor-custom-widgets/assets/icons/reddit.svg\"></a>\n <a href=\"#\" class=\"share-icons\"><img src=\"/wp-content/plugins/elementor-custom-widgets/assets/icons/telegram.svg\"></a>\n </div>\n </div>\n </div>\n\n <div class=\"columnar article-nav\">\n <div class=\"columns-four-two\">\n <div class=\"text\">Previous Post</div>\n <a href=\"\">Previous post title</a>\n </div>\n <div class=\"columns-four-eight\">\n <div class=\"text\">Next Post</div>\n <a href=\"\">Next post title</a>\n </div>\n </div>\n </div>\n </div>\n <?php\n }", "function build_settings_and_styles() {\n\t\t\tif ($this->settings === null) {\n\t\t\t\t////////////////////////\n\t\t\t\t// Build Controls\n\t\t\t\t////////////////////////\n\t\t\t\t$this->settings = apply_filters('themify_customizer_settings', array());\n\n\t\t\t\t////////////////////////\n\t\t\t\t// Rest/Import/Export Buttons\n\t\t\t\t////////////////////////\n\t\t\t\t$this->settings['tools'] = array(\n\t\t\t\t\t'control' => array(\n\t\t\t\t\t\t'type' => 'Themify_Tools_Control',\n\t\t\t\t\t\t'label' => __('Tools', 'themify'),\n\t\t\t\t\t),\n\t\t\t\t\t'selector' => 'tools',\n\t\t\t\t\t'prop' => 'tools',\n\t\t\t\t);\n\n\t\t\t\t////////////////////////\n\t\t\t\t// Build CSS Styling\n\t\t\t\t////////////////////////\n\t\t\t\tforeach ($this->settings as $key => $setting) {\n\t\t\t\t\tif (isset($setting['selector'])) {\n\t\t\t\t\t\t$this->styles[$setting['selector']][] = array(\n\t\t\t\t\t\t\t'prop' => isset($setting['prop']) ? $setting['prop'] : '',\n\t\t\t\t\t\t\t'key' => isset($key) ? $key : '',\n\t\t\t\t\t\t\t'prefix' => isset($setting['prefix']) ? $setting['prefix'] : '',\n\t\t\t\t\t\t\t'global' => isset( $setting['global'] ) ? $setting['global'] : false,\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}", "function theme_settings_page() { ?>\n\t <div class=\"wrap\">\n\t <h1>Social Media Settings</h1>\n\t <form method=\"post\" action=\"options.php\">\n\t <?php\n\t settings_fields( 'custom-theme-settings' );\n\t do_settings_sections( 'theme-settings' ); \n\t submit_button(); \n\t ?> \n\t </form>\n\t </div>\n\t<?php }", "function sunrise_theme_settings_page()\n {\n require_once(get_template_directory().'/inc/templates/sunrise-admin.php');\n }", "function theme_settings_page(){ \n\t?>\n\t<div class=\"wrap\">\n\t\t<h1>Virksomhedsinformation</h1>\n\t\t<p>Dette er globale virksomhedsoplysninger. Ændringer kan ses flere stedet på websitet</p>\n\t\t<form method=\"post\" action=\"options.php\">\n\t\t\t<?php\n\t\t\tsettings_fields(\"section\");\n\t\t\tdo_settings_sections(\"theme-options\");\n\t\t\tsubmit_button();\n\t\t\t?>\n\t\t</form>\n\t</div>\n\t\n\t<?php }", "private function render_settings() {\n\t\t?>\n\t\t<div class=\"wrap\">\n\t\t\t<h1><?php esc_html_e( 'Network Mail', 'simple-smtp' ); ?></h1>\n\t\t\t<form action='edit.php?action=wpsimplesmtpms' method='post'>\t\n\t\t\t\t<?php\n\t\t\t\twp_nonce_field( 'simple-smtp-ms' );\n\t\t\t\tdo_settings_sections( 'wpsimplesmtp_smtp_ms' );\n\t\t\t\tsubmit_button();\n\t\t\t\t?>\n\t\t\t</form>\n\t\t</div>\n\t\t<?php\n\t}", "public function optionsdemo_settings_content() { ?>\n <div class=\"wrap\">\n <div id=\"icon-themes\" class=\"icon32\"><br/></div>\n <h1>Options Demo</h1>\n <form action=\"options.php\" method=\"POST\">\n\t\t\t\t\t<?php\n\t\t\t\t\t\tsettings_fields( \"optionsdemo_general\" );\n\t\t\t\t\t\tdo_settings_sections( \"optionsdemo_general\" );\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\tsubmit_button( esc_html__( 'Save Setting', 'optionsdemo' ) )\n\t\t\t\t\t?>\n </form>\n </div>\n\t\t<?php }", "public function define_settings_page() {\n\t\t$this->hook_suffix = add_options_page(\n\t\t\t__( 'Top Story Options', 'top-story' ),\n\t\t\t__( 'Top Story', 'top-story' ),\n\t\t\t'manage_options',\n\t\t\t$this->menu_slug,\n\t\t\tarray( $this, 'option_page' )\n\t\t);\n\t}", "public function settings()\n {\n $section = self::$panel . '.settings';\n\n /**\n * Add Section and fields for Header Layout\n */\n new Section(\n $section,\n array(\n 'title' => esc_attr__('Settings', 'stage'),\n 'description' => esc_attr__('Footer settings.', 'stage'),\n 'panel' => self::$panel,\n 'type' => 'expand',\n 'priority' => 10,\n )\n );\n\n Customizer::addField(\n self::$config,\n array(\n 'type' => 'text',\n 'settings' => $section . '.copyright',\n 'label' => esc_html__('Copyright Text', 'stage'),\n 'section' => $section,\n 'default' => stage_get_default($section . '.copyright'),\n 'priority' => 10,\n 'transport' => 'postMessage',\n 'partial_refresh' => array(\n 'footer_copyright_text' => array(\n 'selector' => 'footer p.copyright',\n 'container_inclusive' => false,\n 'fallback_refresh' => false,\n 'render_callback' => function () use ($section) {\n return stage_get_fallback($section . '.copyright');\n },\n ),\n ),\n )\n );\n }", "public function settings_page() {\n do_action( 'rewardpoint_settings_start' );\n $current_tab = empty( $_GET['tab'] ) ? 'behavior' : sanitize_title( $_GET['tab'] );\n $current_section = empty( $_REQUEST['section'] ) ? '' : sanitize_title( $_REQUEST['section'] );\n $tabs = apply_filters( 'woocommerce_settings_tabs_array', array(\n 'behavior' => 'Behaviors',\n 'purchase' => 'Purchases',\n 'referral' => 'Referrals',\n 'invite' => 'Invite and Share',\n 'user-point' => 'Use Reward Points',\n ) );\n include 'views/html-admin-page.php';\n\t}", "public function settingsPage()\n {\n include 'views/admin.php';\n }", "function blueauthentic_theme_settings_page() {\n\t?>\n<div class='wrap'>\n\t<h1> Theme Settings < / h1>\n\t\t\t<form method='post' action='options.php'>\n\t\t\t\t<?php\n\t\t\t\tsettings_fields( 'theme-options-group-social' );\n\t\t\t\t\tdo_settings_sections( 'theme-options-section-social' );\n\t\t\t\tsubmit_button();\n\t\t\t\t?>\n\t\t\t</form>\n</div>\n\t<?php\n}", "public function settings()\n {\n\n $this->data['page'] = 'settings';\n $this->data['user'] = $this->user;\n\n // get privacy settings\n\n $my_privacy = explode(',',$this->user['privacy_settings']);\n\n $this->data['settings'] = $my_privacy;\n\n $this->load->view('/dash/header',$this->data);\n $this->load->view('/dash/settings',$this->data);\n $this->load->view('/dash/footer',$this->data);\n\n }", "public function add_styles() {\n\n\t\t\t$current_page = isset( $_GET['page'] ) ? $_GET['page'] : null;\n\t\t\t$current_tab = isset( $_GET['tab'] ) ? $_GET['tab'] : null;\n\n\t\t\t$page_ID = $this->translate_name_to_id( $this->page );\n\t\t\t$tab_ID = $this->translate_name_to_id( $this->tab );\n\t\t\t$settings_tab_ID = $this->translate_name_to_id( $this->settings_tab );\n\n\t\t\t// Only add style if on extension tab or on extension settings tab\n\t\t\tif ( ( $current_page == $page_ID && $current_tab == $tab_ID )\n\t\t\t || ( $current_page == 'cd_settings' && $current_tab == $settings_tab_ID )\n\t\t\t || ( $current_page == 'cd_account' && $current_tab == 'activity' )\n\t\t\t) {\n // Add stylesheet from this plugin\n\t\t\t\twp_enqueue_style( \"$this->ID-style\" );\n\n // Add Stream stuff\n wp_enqueue_style( 'wp-stream-admin', WP_STREAM_URL . 'ui/css/admin.css', array(), WP_Stream::VERSION );\n wp_enqueue_script( 'select2' );\n wp_enqueue_style( 'select2' );\n\n wp_enqueue_script( 'timeago' );\n wp_enqueue_script( 'timeago-locale' );\n\n wp_enqueue_script( 'wp-stream-admin', WP_STREAM_URL . 'ui/js/admin.js', array( 'jquery', 'select2' ), WP_Stream::VERSION );\n wp_enqueue_script( 'wp-stream-live-updates', WP_STREAM_URL . 'ui/js/live-updates.js', array( 'jquery', 'heartbeat' ), WP_Stream::VERSION );\n wp_localize_script(\n 'wp-stream-admin',\n 'wp_stream',\n array(\n 'i18n' => array(\n 'confirm_defaults' => __( 'Are you sure you want to reset all site settings to default? This cannot be undone.', 'stream' ),\n ),\n 'gmt_offset' => get_option( 'gmt_offset' ),\n )\n );\n wp_localize_script(\n 'wp-stream-live-updates',\n 'wp_stream_live_updates',\n array(\n 'current_screen' => $current_page,\n 'current_page' => $current_page,\n 'current_order' => isset( $_GET['order'] ) ? esc_js( $_GET['order'] ) : 'desc',\n 'current_query' => json_encode( $_GET ),\n )\n );\n }\n\t\t}", "public function create_plugin_settings_page()\n {\n require_once 'views/settings.phtml';\n }", "public function settingsPage() {\n require_once 'form.phtml';\n }", "static function get_settings(){\n\t\t\t\treturn array(\t\n\t\t\t\t\t'icon' => GDLR_CORE_URL . '/framework/images/page-builder/nav-template.png', \n\t\t\t\t\t'title' => esc_html__('Templates', 'goodlayers-core')\n\t\t\t\t);\n\t\t\t}", "public static function setSiteStyling()\n {\n $styling = SiteManagement::getMetaValue('settings');\n if (!empty($styling[0]['enable_theme_color']) && $styling[0]['enable_theme_color'] == 'true') {\n if (!empty($styling[0]['primary_color'])) {\n ob_start(); ?>\n <style>\n /* Theme Text Color */\n a,\n p a,\n p a:hover,\n a:hover,\n a:focus,\n a:active,\n .wt-navigation>ul>li:hover>a,\n .wt-navigation>ul>li.current-menu-item>a,\n .wt-navarticletab li:hover a,\n .wt-navarticletab li a.active,\n .wt-categoriescontent li a:hover,\n .wt-joinsteps li.wt-active a,\n .wt-effectivecontent li:hover a,\n .wt-articlesingle-content .wt-description .wt-blockquotevone q,\n .wt-filtertag li:hover a,\n .wt-userlisting-breadcrumb li .wt-clicksave,\n .wt-clicksave,\n .wt-qrcodefeat h3 span,\n .wt-comfollowers ul li:hover a span,\n .wt-postarticlemeta .wt-following span,\n .tg-qrcodefeat h3 span,\n .active-category {\n color: <?php echo $styling[0]['primary_color'] ?>;\n }\n\n /* Theme Background Color */\n .wt-btn:hover,\n .wt-dropdowarrow,\n .navbar-toggle,\n .wt-btn,\n .wt-navigationarea .wt-navigation>ul>li>a:after,\n .wt-searchbtn,\n .wt-sectiontitle:after,\n .wt-navarticletab li a:after,\n .wt-pagination ul li a:hover,\n .wt-pagination ul li.wt-active a,\n .wt-widgettag a:hover,\n .wt-articlesingle-content .wt-description blockquote span i,\n .wt-searchgbtn,\n .wt-filtertagclear a,\n .ui-slider-horizontal .ui-slider-range,\n .wt-btnsearch,\n .wt-newnoti a em,\n .wt-notificationicon>a:after,\n .wt-rightarea .wt-nav .navbar-toggler,\n .wt-usersidebaricon span,\n .wt-usersidebaricon span i,\n .wt-filtertag .wt-filtertagclear a,\n .loader:before,\n .wt-offersmessages .wt-ad:after,\n .wt-btnsendmsg,\n .wt-tabstitle li a:before,\n .wt-tabscontenttitle:before,\n .wt-tablecategories thead tr th:first-child:before,\n .wt-tablecategories tbody tr td:first-child:before,\n .wt-slidernav .wt-prev:hover,\n .wt-slidernav .wt-next:hover,\n .vb>.vb-dragger>.vb-dragger-styler,\n .wt-pagination ul li span,\n .la-banner-settings .wt-location h5:after,\n .la-section-settings .wt-location h6:after,\n .wt-forgotpassword-holder .card .card-body form .form-group button[type=submit] {\n background: <?php echo $styling[0]['primary_color'] ?>;\n }\n\n /* Theme Border Color */\n input:focus,\n .select select:focus,\n .form-control:focus,\n .wt-navigation>ul>li>.sub-menu,\n .wt-pagination ul li a:hover,\n .wt-widgettag a:hover,\n .wt-joinsteps li.wt-active a,\n .wt-filtertag li:hover a,\n .wt-filtertag .wt-filtertagclear a,\n .wt-themerangeslider .ui-slider-handle,\n .wt-clicksavebtn,\n .wt-pagination ul li.wt-active a,\n .wt-usernav>ul,\n .wt-pagination ul li span {\n border-color: <?php echo $styling[0]['primary_color'] ?>;\n }\n\n /* RGBA Background Color */\n .loader{\n background: <?php echo $styling[0]['primary_color'] ?>;\n background: -moz-linear-gradient(left, <?php echo $styling[0]['primary_color'] ?> 10%, rgba(255, 88, 81, 0) 42%);\n background: -webkit-linear-gradient(left, <?php echo $styling[0]['primary_color'] ?> 10%, rgba(255, 88, 81, 0) 42%);\n background: -o-linear-gradient(left, <?php echo $styling[0]['primary_color'] ?> 10%, rgba(255, 88, 81, 0) 42%);\n background: -ms-linear-gradient(left, <?php echo $styling[0]['primary_color'] ?> 10%, rgba(255, 88, 81, 0) 42%);\n background: linear-gradient(to right, <?php echo $styling[0]['primary_color'] ?> 10%, rgba(255, 88, 81, 0) 42%);\n }\n </style>\n <?php return ob_get_clean();\n }\n }\n }", "function showSettings() {\n global $objTemplate,$_ARRAYLANG;\n $template = new \\Cx\\Core\\Html\\Sigma();\n $objTemplate->addBlockfile('ADMIN_CONTENT', 'settings_system', 'settings.html');\n $templateObj = new \\Cx\\Core\\Html\\Sigma(ASCMS_CORE_PATH . '/Config/View/Template/Backend');\n $templateObj->loadTemplateFile('development_tools.html');\n $templateObj->setVariable(array(\n 'TXT_TITLE_SET5' => $_ARRAYLANG['TXT_SETTINGS_TITLE_DEVELOPMENT'],\n 'TXT_DEBUGGING_STATUS' => $_ARRAYLANG['TXT_DEBUGGING_STATUS'],\n 'TXT_DEBUGGING_FLAGS' => $_ARRAYLANG['TXT_DEBUGGING_FLAGS'],\n 'TXT_SETTINGS_DEBUGGING_FLAG_LOG' => $_ARRAYLANG['TXT_SETTINGS_DEBUGGING_FLAG_LOG'],\n 'TXT_SETTINGS_DEBUGGING_FLAG_PHP' => $_ARRAYLANG['TXT_SETTINGS_DEBUGGING_FLAG_PHP'],\n 'TXT_SETTINGS_DEBUGGING_FLAG_DB' => $_ARRAYLANG['TXT_SETTINGS_DEBUGGING_FLAG_DB'],\n 'TXT_SETTINGS_DEBUGGING_FLAG_DB_TRACE' => $_ARRAYLANG['TXT_SETTINGS_DEBUGGING_FLAG_DB_TRACE'],\n 'TXT_SETTINGS_DEBUGGING_FLAG_DB_CHANGE' => $_ARRAYLANG['TXT_SETTINGS_DEBUGGING_FLAG_DB_CHANGE'],\n 'TXT_SETTINGS_DEBUGGING_FLAG_DB_ERROR' => $_ARRAYLANG['TXT_SETTINGS_DEBUGGING_FLAG_DB_ERROR'],\n 'TXT_SETTINGS_DEBUGGING_FLAG_LOG_FILE' => $_ARRAYLANG['TXT_SETTINGS_DEBUGGING_FLAG_LOG_FILE'],\n 'TXT_SETTINGS_DEBUGGING_FLAG_LOG_FIREPHP' => $_ARRAYLANG['TXT_SETTINGS_DEBUGGING_FLAG_LOG_FIREPHP'],\n 'TXT_DEBUGGING_EXPLANATION' => $_ARRAYLANG['TXT_DEBUGGING_EXPLANATION'],\n 'TXT_SAVE_CHANGES' => $_ARRAYLANG['TXT_SAVE'],\n 'TXT_RADIO_ON' => $_ARRAYLANG['TXT_ACTIVATED'],\n 'TXT_RADIO_OFF' => $_ARRAYLANG['TXT_DEACTIVATED']\n ));\n if (in_array('SystemInfo', \\Env::get('cx')->getLicense()->getLegalComponentsList())) {\n if (isset($_POST['debugging'])) {\n $this->updateDebugSettings($_POST['debugging']);\n }\n $this->setDebuggingVariables($templateObj);\n }\n \\Cx\\Core\\Setting\\Controller\\Setting::init('Config', null, 'Yaml', null, \\Cx\\Core\\Setting\\Controller\\Setting::REPOPULATE);\n \\Cx\\Core\\Setting\\Controller\\Setting::storeFromPost();\n \n \\Cx\\Core\\Setting\\Controller\\Setting::setEngineType('Config', 'Yaml', 'site');\n \\Cx\\Core\\Setting\\Controller\\Setting::show(\n $template,\n 'index.php?cmd=Config',\n $_ARRAYLANG['TXT_CORE_CONFIG_SITE'],\n $_ARRAYLANG['TXT_CORE_CONFIG_SITE'],\n 'TXT_CORE_CONFIG_',\n !$this->isWritable()\n );\n \\Cx\\Core\\Setting\\Controller\\Setting::setEngineType('Config', 'Yaml', 'contactInformation');\n \\Cx\\Core\\Setting\\Controller\\Setting::show(\n $template,\n 'index.php?cmd=Config',\n $_ARRAYLANG['TXT_CORE_CONFIG_CONTACTINFORMATION'],\n $_ARRAYLANG['TXT_CORE_CONFIG_CONTACTINFORMATION'],\n 'TXT_CORE_CONFIG_',\n !$this->isWritable()\n );\n \\Cx\\Core\\Setting\\Controller\\Setting::setEngineType('Config', 'Yaml', 'administrationArea');\n \\Cx\\Core\\Setting\\Controller\\Setting::show(\n $template,\n 'index.php?cmd=Config',\n $_ARRAYLANG['TXT_CORE_CONFIG_ADMINISTRATIONAREA'], \n $_ARRAYLANG['TXT_CORE_CONFIG_ADMINISTRATIONAREA'], \n 'TXT_CORE_CONFIG_',\n !$this->isWritable()\n );\n \\Cx\\Core\\Setting\\Controller\\Setting::setEngineType('Config', 'Yaml', 'security');\n \\Cx\\Core\\Setting\\Controller\\Setting::show(\n $template,\n 'index.php?cmd=Config',\n $_ARRAYLANG['TXT_CORE_CONFIG_SECURITY'],\n $_ARRAYLANG['TXT_CORE_CONFIG_SECURITY'],\n 'TXT_CORE_CONFIG_',\n !$this->isWritable()\n );\n if (in_array('SystemInfo', \\Env::get('cx')->getLicense()->getLegalComponentsList())) {\n \\Cx\\Core\\Setting\\Controller\\Setting::show_external(\n $template,\n $_ARRAYLANG['TXT_SETTINGS_TITLE_DEVELOPMENT'],\n $templateObj->get()\n );\n }\n \\Cx\\Core\\Setting\\Controller\\Setting::setEngineType('Config', 'Yaml', 'otherConfigurations');\n \\Cx\\Core\\Setting\\Controller\\Setting::show(\n $template,\n 'index.php?cmd=Config',\n $_ARRAYLANG['TXT_CORE_CONFIG_OTHERCONFIGURATIONS'],\n $_ARRAYLANG['TXT_CORE_CONFIG_OTHERCONFIGURATIONS'],\n 'TXT_CORE_CONFIG_',\n !$this->isWritable()\n );\n\n\n // show also hidden settins\n if ( in_array('SystemInfo', \\Env::get('cx')->getLicense()->getLegalComponentsList())\n && \\Permission::hasAllAccess()\n && isset($_GET['all'])\n ) {\n \\Cx\\Core\\Setting\\Controller\\Setting::setEngineType('Config', 'Yaml', 'core');\n \\Cx\\Core\\Setting\\Controller\\Setting::show(\n $template,\n 'index.php?cmd=Config',\n 'CORE',\n 'CORE', \n 'TXT_CORE_CONFIG_',\n true\n );\n \\Cx\\Core\\Setting\\Controller\\Setting::setEngineType('Config', 'Yaml', 'release');\n \\Cx\\Core\\Setting\\Controller\\Setting::show(\n $template,\n 'index.php?cmd=Config',\n 'RELEASE',\n 'RELEASE',\n 'TXT_CORE_CONFIG_',\n true\n );\n \\Cx\\Core\\Setting\\Controller\\Setting::setEngineType('Config', 'Yaml', 'component');\n \\Cx\\Core\\Setting\\Controller\\Setting::show(\n $template,\n 'index.php?cmd=Config',\n 'COMPONENT',\n 'COMPONENT',\n 'TXT_CORE_CONFIG_',\n !$this->isWritable()\n );\n \\Cx\\Core\\Setting\\Controller\\Setting::setEngineType('Config', 'Yaml', 'license');\n \\Cx\\Core\\Setting\\Controller\\Setting::show(\n $template,\n 'index.php?cmd=Config',\n 'LICENSE', \n 'LICENSE', \n 'TXT_CORE_CONFIG_',\n true\n );\n \\Cx\\Core\\Setting\\Controller\\Setting::setEngineType('Config', 'Yaml', 'cache');\n \\Cx\\Core\\Setting\\Controller\\Setting::show(\n $template,\n 'index.php?cmd=Config',\n 'CACHE', \n 'CACHE', \n 'TXT_CORE_CONFIG_',\n true\n );\n }\n $this->checkFtpAccess();\n $objTemplate->setVariable('SETTINGS_TABLE', $template->get());\n $objTemplate->parse('settings_system');\n }", "function custom_settings_page() { ?>\n\t<div class=\"wrap\">\n\t\t<h1>Custom Settings</h1>\n\t\t<form method=\"post\" action=\"options.php\">\n\t\t\t<?php\n settings_fields('section');\n do_settings_sections('theme-options'); \n submit_button(); \n ?>\n\t\t</form>\n\t</div>\n\t<?php }", "public function settings_page() {\n\t\tTheme_My_Login_Admin::settings_page( array(\n\t\t\t'title' => __( 'Theme My Login reCAPTCHA Settings', 'theme-my-login' ),\n\t\t\t'options_key' => $this->options_key\n\t\t) );\n\t}", "public function settings_admin_page()\n {\n add_action('wp_cspa_before_closing_header', [$this, 'back_to_optin_overview']);\n add_action('wp_cspa_before_post_body_content', array($this, 'optin_theme_sub_header'), 10, 2);\n add_filter('wp_cspa_main_content_area', [$this, 'optin_form_list']);\n\n $instance = Custom_Settings_Page_Api::instance();\n $instance->page_header(__('Add New Optin', 'mailoptin'));\n $this->register_core_settings($instance, true);\n $instance->build(true);\n }", "public function settings_admin_page()\n {\n add_action('wp_cspa_before_closing_header', [$this, 'back_to_optin_overview']);\n add_action('wp_cspa_before_post_body_content', array($this, 'optin_theme_sub_header'), 10, 2);\n add_filter('wp_cspa_main_content_area', [$this, 'optin_form_list']);\n\n $instance = Custom_Settings_Page_Api::instance();\n $instance->page_header(__('Add New', 'mailoptin'));\n $this->register_core_settings($instance);\n $instance->build(true, true);\n }", "public function settings() {\n\n\t\tdo_settings_sections( 'wpbgdc' );\n\n\t\tsubmit_button();\n\n\t\techo '<div class=\"clear\"></div>';\n\n\t}", "public function general_settings_page() {\n include __DIR__ . \"/views/general_settings.php\";\n }", "public function customize_preview_settings()\n {\n }", "function strl_add_settings_page() {\n\t$strl_icon_svg = file_get_contents( get_template_directory() . '/assets/img/icon-STRL-wit.svg' );\n\n\tif ( function_exists( 'acf_add_options_page' ) ) {\n\t\tacf_add_options_page(\n\t\t\tarray(\n\t\t\t\t'page_title' => __( 'STRL Global', 'strl' ),\n\t\t\t\t'menu_title' => __( 'STRL Global', 'strl' ),\n\t\t\t\t'menu_slug' => 'strl-general-settings',\n\t\t\t\t'capability' => 'edit_posts',\n\t\t\t\t'redirect' => false,\n\t\t\t\t'icon_url' => 'data:image/svg+xml;base64,' . base64_encode( $strl_icon_svg ), // phpcs:disable\n\t\t\t)\n\t\t);\n\t}\n\n\t// Set up the layout fields for the blocks area.\n\t$strl_settings_fields = array(\n\t\t// General Settings.\n\t\tarray(\n\t\t\t'key' => 'strl-general-tab',\n\t\t\t'label' => __( 'General', 'strl' ),\n\t\t\t'name' => 'strl-general-tab',\n\t\t\t'type' => 'tab',\n\t\t\t'placement' => 'left',\n\t\t),\n\t\tarray(\n\t\t\t'key' => 'strl-general',\n\t\t\t'label' => __( 'General', 'strl' ),\n\t\t\t'name' => 'strl-general',\n\t\t\t'type' => 'group',\n\t\t),\n\t\t// Standard Pages.\n\t\tarray(\n\t\t\t'key' => 'strl-standard-pages-tab',\n\t\t\t'label' => __( 'Standard Pages', 'strl' ),\n\t\t\t'name' => 'strl-standard-pages-tab',\n\t\t\t'type' => 'tab',\n\t\t\t'placement' => 'left',\n\t\t),\n\t\tarray(\n\t\t\t'key' => 'strl-standard-pages',\n\t\t\t'label' => __( 'Standard Pages', 'strl' ),\n\t\t\t'name' => 'strl-standard-pages',\n\t\t\t'type' => 'group',\n\t\t\t'placement' => 'left',\n\t\t\t'sub_fields' => array(\n\t\t\t\tarray(\n\t\t\t\t\t'key' => 'strl-standard-404',\n\t\t\t\t\t'label' => __( '404', 'strl' ),\n\t\t\t\t\t'instructions' => __( 'This is the page visitors will see when they visit a link that doesn\\'t exist (anymore).', 'strl' ),\n\t\t\t\t\t'name' => 'strl-standard-404',\n\t\t\t\t\t'type' => 'relationship',\n\t\t\t\t\t'post_type' => array(\n\t\t\t\t\t\t0 => 'page',\n\t\t\t\t\t),\n\t\t\t\t\t'filters' => array(\n\t\t\t\t\t\t0 => 'search',\n\t\t\t\t\t),\n\t\t\t\t\t'max' => 1,\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'key' => 'strl-standard-search',\n\t\t\t\t\t'label' => __( 'Search', 'strl' ),\n\t\t\t\t\t'name' => 'strl-standard-search',\n\t\t\t\t\t'type' => 'relationship',\n\t\t\t\t\t'post_type' => array(\n\t\t\t\t\t\t0 => 'page',\n\t\t\t\t\t),\n\t\t\t\t\t'filters' => array(\n\t\t\t\t\t\t0 => 'search',\n\t\t\t\t\t),\n\t\t\t\t\t'max' => 1,\n\t\t\t\t)\n\t\t\t)\n\t\t),\n\t\t// Social Media Accounts.\n\t\tarray(\n\t\t\t'key' => 'strl-contact-tab',\n\t\t\t'label' => __( 'Contact Information', 'strl' ),\n\t\t\t'name' => 'strl-contact-tab',\n\t\t\t'type' => 'tab',\n\t\t\t'placement' => 'left',\n\t\t),\n\t\tarray(\n\t\t\t'key' => 'strl-socials',\n\t\t\t'label' => __( 'Socials', 'strl' ),\n\t\t\t'name' => 'strl-socials',\n\t\t\t'instructions' => __( 'Enter only your username. You can toggle social icons in the Footer settings.', 'strl' ),\n\t\t\t'type' => 'group',\n\t\t\t'sub_fields' => array(\n\t\t\t\tarray(\n\t\t\t\t\t'key' => 'strl-socials-instagram',\n\t\t\t\t\t'label' => '<i class=\"fab fa-instagram\"></i>' . ' ' . __( 'Instagram', 'strl' ),\n\t\t\t\t\t'name' => 'strl-socials-instagram',\n\t\t\t\t\t'type' => 'text',\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'key' => 'strl-socials-facebook',\n\t\t\t\t\t'label' => '<i class=\"fab fa-facebook-f\"></i>' . ' ' . __( 'Facebook', 'strl' ),\n\t\t\t\t\t'name' => 'strl-socials-facebook',\n\t\t\t\t\t'type' => 'text',\n\t\t\t\t),\n\t\t\t)\n\t\t),\n\t\tarray(\n\t\t\t'key' => 'strl-contact-info',\n\t\t\t'label' => __( 'Contact Info', 'strl' ),\n\t\t\t'name' => 'strl-contact-info',\n\t\t\t'type' => 'group',\n\t\t\t'sub_fields' => array(\n\t\t\t\tarray(\n\t\t\t\t\t'key' => 'strl-contact-phone',\n\t\t\t\t\t'label' => '<i class=\"fas fa-phone\"></i>' . ' ' . __( 'Phone No.', 'strl' ),\n\t\t\t\t\t'name' => 'strl-contact-phone',\n\t\t\t\t\t'type' => 'text',\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'key' => 'strl-contact-email',\n\t\t\t\t\t'label' => '<i class=\"fas fa-envelope\"></i>' . ' ' . __( 'Email', 'strl' ),\n\t\t\t\t\t'name' => 'strl-contact-email',\n\t\t\t\t\t'type' => 'email',\n\t\t\t\t),\n\t\t\t)\n\t\t),\n\t\t// Footer Settings.\n\t\tarray(\n\t\t\t'key' => 'strl-footer-tab',\n\t\t\t'label' => __( 'Footer', 'strl' ),\n\t\t\t'name' => 'strl-footer-tab',\n\t\t\t'type' => 'tab',\n\t\t\t'placement' => 'left',\n\t\t),\n\t\tarray(\n\t\t\t'key' => 'strl-footer-icons',\n\t\t\t'label' => __( 'Footer Icons', 'strl' ),\n\t\t\t'name' => 'strl-footer-icons',\n\t\t\t'type' => 'group',\n\t\t\t'sub_fields' => array (\n\t\t\t\tarray(\n\t\t\t\t\t'key' => 'strl-footer-toggle-socials',\n\t\t\t\t\t'label' => __( 'Show Socials', 'strl' ),\n\t\t\t\t\t'name' => 'strl-footer-toggle-socials',\n\t\t\t\t\t'required' => 1,\n\t\t\t\t\t'type' => 'radio',\n\t\t\t\t\t'choices' => array(\n\t\t\t\t\t\t'show' => __( 'Yes, show social icons in the footer.', 'strl' ),\n\t\t\t\t\t\t'hide' => __( 'No, don\\'t show social icons in the footer.', 'strl' ),\n\t\t\t\t\t)\n\t\t\t\t),\n\t\t\t),\n\t\t),\n\t);\n\n\t// Adds ACF blocks to the Edit Page screen.\n\tacf_add_local_field_group(\n\t\tarray(\n\t\t\t'key' => 'strl-settings-area',\n\t\t\t'title' => __( 'STRL Settings', 'strl' ),\n\t\t\t'fields' => $strl_settings_fields,\n\t\t\t'location' => array(\n\t\t\t\tarray(\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'param' => 'options_page',\n\t\t\t\t\t\t'operator' => '===',\n\t\t\t\t\t\t'value' => 'strl-general-settings',\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t),\n\t\t\t'position' => 'normal',\n\t\t)\n\t);\n}", "function hoopsai_wp_settings_do_page() {\n ?>\n <div id=\"hoopsai_wp_settings\"></div>\n <?php\n }", "public function lp_rating_settings_html() {\n // check user capabilities\n if (!current_user_can('manage_options')) {\n return;\n }\n \n ?>\n <div class=\"wrap\">\n <h1><?php echo esc_html(get_admin_page_title()); ?></h1>\n <form action=\"options.php\" method=\"post\">\n <?php\n // output security fields for the registered setting \"lp_rating_settings\"\n settings_fields('lp_rating_settings');\n \n // output setting sections and their fields\n do_settings_sections('lp_rating_settings');\n \n // output save settings button\n submit_button('Save Settings');\n ?>\n </form>\n </div>\n <?php\n }", "public function settings_view()\n {\n $this->register_handler('plugin.settingsform', array($this, 'settings_form'));\n $this->register_handler('plugin.settingslist', array($this, 'settings_list'));\n $this->register_handler('plugin.factoradder', array($this, 'settings_factoradder'));\n $this->register_handler('plugin.highsecuritydialog', array($this, 'settings_highsecuritydialog'));\n\n $this->include_script('kolab2fa.js');\n $this->include_stylesheet($this->local_skin_path() . '/kolab2fa.css');\n\n if ($this->check_secure_mode()) {\n $this->api->output->set_env('session_secured', $_SESSION['kolab_2fa_secure_mode']);\n }\n\n $this->api->output->add_label('save','cancel');\n $this->api->output->set_pagetitle($this->gettext('settingstitle'));\n $this->api->output->send('kolab_2fa.config');\n }", "public function options_page_html() {\n // check user capabilities\n if ( ! current_user_can( 'manage_options' ) ) {\n return;\n }\n\n // add error/update messages\n\n // check if the user have submitted the settings\n // wordpress will add the \"settings-updated\" $_GET parameter to the url\n if ( isset( $_GET['settings-updated'] ) ) {\n // add settings saved message with the class of \"updated\"\n add_settings_error( 'settcalc_messages', 'settcalc_message', __( 'Settings Saved', 'settcalc' ), 'updated' );\n }\n\n // show error/update messages\n settings_errors( 'settcalc_messages' );\n ?>\n <div class=\"wrap\">\n <h1><?php echo esc_html( get_admin_page_title() ); ?></h1>\n <form action=\"options.php\" method=\"post\">\n <?php\n // output security fields for the registered setting \"wporg\"\n settings_fields( 'settcalc' );\n // output setting sections and their fields\n // (sections are registered for \"wporg\", each field is registered to a specific section)\n do_settings_sections( 'settcalc' );\n // output save settings button\n submit_button( 'Save Settings' );\n ?>\n </form>\n </div>\n <?php\n }", "function pafd_action_settings_page() {\n\n\tglobal $pafd_textdomain;\n\t\n\tregister_setting( 'pafd_options_group', 'pafd_options' );\n\n\tpafd_add_settings_field( 'columns', __( 'Visible columns', $pafd_textdomain ) );\n\tpafd_add_settings_field( 'download_link', __( 'Download link', $pafd_textdomain ) );\n\tpafd_add_settings_field( 'hide_table_header', __( 'Hide table header', $pafd_textdomain ) );\n\tpafd_add_settings_field( 'show_all_revisions', __( 'Show all file revisions', $pafd_textdomain ) );\n\tpafd_add_settings_field( 'show_file_status', __( 'Show file status', $pafd_textdomain ) );\n\tpafd_add_settings_field( 'show_icons', __( 'Show mime-type icons', $pafd_textdomain ) );\n\tpafd_add_settings_field( 'order_by', __( 'Order files by' ), $pafd_textdomain );\n\tpafd_add_settings_field( 'custom_css_code', __( 'Custom CSS code' ), $pafd_textdomain );\n}", "public function styles() {\n\t\t\n\t\twp_register_style( 'tinymassmailer-admin', _tinymassmailer_PATH . '/css/page-options.css' );\n\t\twp_enqueue_style( 'tinymassmailer-admin' );\n\t\t\n\t}", "public static function setting_inner () \n { \n $html = null;\n\n $top = __( 'Setting : Option', 'text' );;\n $inner = self::setting_inner_center();\n $bottom = self::page_foot();\n\n $html .= self::page_body( 'setting', $top, $inner, $bottom );\n\n return $html;\n }", "function rate_us_rating_settings_html() {\n\t// check user capabilities.\n\tif ( ! current_user_can( 'manage_options' ) ) {\n\t\treturn;\n\t}\n\n\t?>\n\t<div class=\"wrap\">\n\t\t<h1><?php echo esc_html( get_admin_page_title() ); ?></h1>\n\t\t<form action=\"options.php\" method=\"post\">\n\t\t\t<?php\n\t\t\t// output security fields for the registered setting \"rate_us_rating_settings\".\n\t\t\tsettings_fields( 'rate_us_rating_settings' );\n\n\t\t\t// output setting sections and their fields.\n\t\t\tdo_settings_sections( 'rate_us_rating_settings' );\n\n\t\t\t// output save settings button.\n\t\t\tsubmit_button( 'Save Settings' );\n\t\t\t?>\n\t\t</form>\n\t</div>\n\t<?php\n}", "public static function general_style_settings($frm_settings) {\n if ( $_POST && isset($_POST['frm_btsp_css']) ) {\n $frm_settings->btsp_css = $_POST['frm_btsp_css'];\n $frm_settings->btsp_errors = isset($_POST['frm_btsp_errors']) ? 1 : 0;\n } else {\n if ( !isset($frm_settings->btsp_css) ){\n $frm_settings->btsp_css = 'all';\n }\n\n if ( !isset($frm_settings->btsp_errors) ){\n $frm_settings->btsp_errors = 0;\n }\n }\n\n include( self::path() .'/views/style_settings.php');\n }", "public function showSettingsPage()\n {\n\n $configFilePath = dirname(__DIR__) . '/../../../build/configs/pirrot_default.conf';\n if (file_exists('/etc/pirrot.conf')) {\n $configFilePath = '/etc/pirrot.conf';\n }\n\n // Get setting values from the configuration file.\n $config = new ConfManagerService($configFilePath);\n $configValues = $config->read();\n\n // Regex out the setting values and comments to provide a list of settings that we can render out.\n foreach ($this->fieldGroups as $field => $group) {\n\n if (!key_exists($field, $this->labelOverrides)) {\n $label = ucwords(str_replace('_', ' ', $field));\n } else {\n $label = $this->labelOverrides[$field];\n }\n\n // Get the value from the settings file...\n $value = $configValues[$field];\n\n $inputType = Setting::TYPE_TEXT;\n if (in_array($field, $this->booleanFields)) {\n $inputType = Setting::TYPE_BOOL;\n }\n\n $inputComments = null;\n if (key_exists($field, $this->fieldComments)) {\n $inputComments = $this->fieldComments[$field];\n }\n\n $panelInputs[$group][] = new Setting($field, $label, $group, $value, $inputType, $inputComments);\n }\n\n\n return view('_pages.settings')->with('panels', $panelInputs);\n }", "public function settings()\n {\n $this->authCheck();\n\n $settings = DB::table('site_settings')\n ->get();\n \n $settings=view('admin.settings')\n ->with('settings',$settings);\n\n return view('admin.master')\n ->with('main_content',$settings);\n }", "function bg_AddSettingsSectionHtml() { }", "function sh_create_custom_settings_page() {\n //Includes settings for the html template\n //require_once( get_template_directory() . '/templates/admin_custom_settings.php' );\n require_once( plugin_dir_path(__FILE__) . '/templates/admin_custom_settings.php' );\n}", "public static function settings_page() {\r\n\t\treturn '';\r\n\t}", "public static function printStyle (){\n\t?>\n\t\t\t\t\n\t\t\t\t<!-- Stylesheet Settings -->\n\t\t\t\t<h3>Stylesheet Settings</h3>\n\t\t\t\t<table class='form-table'>\n\t\t\t\t\t<tbody>\n\t\t\t\t\t\t<tr valign='top'>\n\t\t\t\t\t\t\t<th scope='row'><label for='gdocs_style_dir'>Directory</label></th>\n\t\t\t\t\t\t\t<td><span class='description'><?php bloginfo ('wpurl')?>/</span><input type='text' size=\"30\" id=\"gdocs_style_dir\" name=\"gdocs_style_dir\" value=\"<?php echo get_option ('gdocs_style_dir'); ?>\" /><br /><span class='description'><strong>Specify the directory where you keep your CSS stylesheets in.</strong></span></td>\n\t\t\t\t\t\t</tr>\n\t\t\t\t\t</tbody>\n\t\t\t\t</table>\n\t\t\t\t\n\t<?php\n\t}", "public function maz_hspm_settings_content() {\n ?>\n <div class=\"wrap\">\n <h2>Halve Spacers On Mobile Settings</h2>\n <form method=\"post\" action=\"options.php\">\n <br>\n <hr>\n <br>Breakpoint configures the screen width in pixels when the spacers change size.\n <br>Ratio defines the amount of change. For example, 0.5 will halve the size, 2 will double it.\n <br>\n\n <?php\n # Places all the fields defined above and the submit button in the markup\n settings_fields( 'maz_hspm_fields' );\n do_settings_sections( 'maz_hspm_fields' );\n submit_button();\n ?>\n </form>\n <div class=\"\">\n A Plugin by Moritz Zimmer, 2020\n </div>\n </div>\n <?php\n }", "function ywig_create_settings_page_cb() {\n\trequire_once get_template_directory() . '/inc/templates/ywig-site-settings.php';\n}", "function ntg_theme_settings_style_box() {\n $style = genesis_get_option('style_selection') ? genesis_get_option('style_selection') : 'style.css';\n?>\n\n <p><label><?php _e('Style Sheet', 'gsselect'); ?>: \n <select name=\"<?php echo GENESIS_SETTINGS_FIELD; ?>[style_selection]\">\n <?php\n foreach ( glob(CHILD_DIR . \"/*.css\") as $file ) {\n $file = str_replace( CHILD_DIR . '/', '', $file );\n \n if( ! genesis_style_check( $file, 'genesis' )){\n continue;\n }\n \n ?>\n \n <option style=\"padding-right:10px;\" value=\"<?php echo esc_attr( $file ); ?>\" <?php selected($file, $style); ?>><?php echo esc_html( $file ); ?></option>\n \n <?php } ?>\n </select>\n </label></p>\n <p><span class=\"description\">Please select your desired <b>Style Sheet</b> from the drop down list and save your settings.</span></p>\n <p><span class=\"description\"><b>Note:</b> Only Genesis style sheets in the Child theme directory will be included in the list.</span></p>\n<?php\n}", "public function customize_pane_settings()\n {\n }", "public function getSettings()\n {\n $this->view('user.settings');\n }", "public function mySettingsPage()\n {\n return view('frontEnd.usersPanel.settings');\n }", "function ms_settings_section() {\n?>\n<h3><?php _e( 'Post Revision Workflow', $this->text_domain ) ?></h3>\n<table class=\"form-table\">\n\t<tbody>\n \t<tr valign=\"top\">\n \t<th scope=\"row\">\n \t<label for=\"dpn_reviewers\"><?php _e( 'Default email address for post revision workflow notification:', $this->text_domain ) ?></label>\n </th>\n <td>\n \t<?php $this->settings_field() ?>\n </td>\n </tr>\n </tbody>\n</table>\n<?php\n\t\t}", "function showGeneralPageEditorSettingsObject()\n\t{\n\t\tglobal $tpl, $ilTabs;\n\n\t\t$this->addPageEditorSettingsSubTabs();\n\t\t$ilTabs->activateTab(\"adve_page_editor_settings\");\n\t\t\n\t\t$form = $this->initGeneralPageSettingsForm();\n\t\t$tpl->setContent($form->getHTML());\n\t}", "function settings() {\n // ADD SETTINGS SECTION\n // Args: name of section, subtitle of section (can be null), html content if needed e.g. description text, page slug to add section to\n add_settings_section('wcp_first_section', null, null, 'word-count-settings-page');\n\n // LOCATION SETTING\n // Args: name of setting to tie to, html label text i.e. name users will see, function to build html, page slug for settings page we're using, which section to add option in\n add_settings_field('wcp_location', 'Display Location', array($this, 'locationHTML'),'word-count-settings-page', 'wcp_first_section');\n // Args: group settings belong to, name of setting, array with sanitise callback and default value\n register_setting('wordcountplugin', 'wcp_location', array('sanitize_callback' => array($this, 'sanitizeLocation'), 'default' => '0'));\n\n // HEADLINE TEXT SETTING\n add_settings_field('wcp_headline', 'Headline Text', array($this, 'headlineHTML'),'word-count-settings-page', 'wcp_first_section');\n register_setting('wordcountplugin', 'wcp_headline', array('sanitize_callback' => 'sanitize_text_field', 'default' => 'Post Statistics'));\n\n // WORD COUNT DISPLAY SETTING\n // Extra param to pass name to HTML display function\n add_settings_field('wcp_wordcount', 'Word Count', array($this, 'checkboxHTML'),'word-count-settings-page', 'wcp_first_section', array('boxName' => 'wcp_wordcount'));\n register_setting('wordcountplugin', 'wcp_wordcount', array('sanitize_callback' => 'sanitize_text_field', 'default' => '1'));\n\n // CHARACTER COUNT DISPLAY SETTING\n add_settings_field('wcp_charcount', 'Character Count', array($this, 'checkboxHTML'),'word-count-settings-page', 'wcp_first_section', array('boxName' => 'wcp_charcount'));\n register_setting('wordcountplugin', 'wcp_charcount', array('sanitize_callback' => 'sanitize_text_field', 'default' => '1'));\n\n // READ TIME DISPLAY SETTING\n add_settings_field('wcp_readtime', 'Read Time', array($this, 'checkboxHTML'),'word-count-settings-page', 'wcp_first_section', array('boxName' => 'wcp_readtime'));\n register_setting('wordcountplugin', 'wcp_readtime', array('sanitize_callback' => 'sanitize_text_field', 'default' => '1'));\n }", "public function settings()\n {\n }", "function settings_html() {\n $this->render_setting( 'label_any' );\n }", "public function settingsview() {\r\n $this->logger->info(\"Action Settings View \");\r\n $this->template->display('listsettings', $this->combovalue, 'settings', '');\r\n }", "public function pluginSettingsPage()\n {\n // check permission.\n if (!current_user_can('manage_options')) {\n wp_die(__('You do not have permission to access this page.'));\n }\n\n // load config values to get settings config file.\n $loader = new \\RundizableWpFeatures\\App\\Libraries\\Loader();\n $config_values = $loader->loadConfig();\n if (is_array($config_values) && array_key_exists('rundiz_settings_config_file', $config_values)) {\n $settings_config_file = $config_values['rundiz_settings_config_file'];\n } else {\n echo 'Settings configuration file was not set.';\n die('Settings configuration file was not set.');\n exit;\n }\n unset($config_values, $loader);\n\n $RundizSettings = new \\RundizableWpFeatures\\App\\Libraries\\RundizSettings();\n $RundizSettings->settings_config_file = $settings_config_file;\n\n $options_values = $this->getOptions();\n\n // if form submitted\n if (isset($_POST) && !empty($_POST)) {\n if (!wp_verify_nonce((isset($_POST['_wpnonce']) ? $_POST['_wpnonce'] : ''))) {\n wp_nonce_ays('-1');\n }\n\n // populate form field values.\n $options_values = $RundizSettings->getSubmittedData();\n\n // you may validate form here first.\n // then save data.\n $result = $this->saveOptions($options_values);\n\n if ($result === true) {\n $output['form_result_class'] = 'notice-success';\n $output['form_result_msg'] = __('Settings saved.');\n } else {\n $output['form_result_class'] = 'notice-success';\n $output['form_result_msg'] = __('Settings saved.');\n }\n }// endif $_POST\n\n $output['settings_page'] = $RundizSettings->getSettingsPage($options_values);\n unset($RundizSettings, $options_values);\n\n $Loader = new \\RundizableWpFeatures\\App\\Libraries\\Loader();\n $Loader->loadView('admin/settings_v', $output);\n unset($Loader, $output);\n }", "public function getSettings(){\n $allSettings = GeneralSetting::all();\n \n $settingsArray = array();\n foreach ($allSettings as $settings) {\n $refl3 = new ReflectionObject($settings);\n $prop3 = $refl3->getProperty('attributes');\n $prop3->setAccessible(true);\n $setting = $prop3->getValue($settings);\n array_push($settingsArray, $setting);\n \n }\n $this->layout->content = View::make('admin.settings')->with('settings',$settingsArray);\n }", "public function main_options_page(){\n\t\t$page_base = $this->page_url();\n\t\tob_start();\n\t\t?>\n\t\t<div class=\"wp_lms settings\">\n\t\t\t<h1>GrandPubbah</h1>\n\n\t\t</div>\n\t\t<?\n\t\tob_end_flush();\n\t}", "function spc_modify_puzzle_settings($settings) {\n $settings->set_button_formats(false);\n $settings->set_templates_directory('/theme/loops');\n $settings->set_owl_carousel(false);\n $settings->set_icon_library(false);\n \n $settings->set_spacing(array(\n 'unit' => 'rem',\n 'section_padding' => 3\n ));\n}", "public function settings()\n\t{\n\t\tif(defined(\"CMS_BACKEND\"))\n\t\t{\n\t\t\tAuthUser::load();\n\t\t\tif ( ! AuthUser::isLoggedIn()) {\n\t\t\t\tredirect(get_url('login'));\n\t\t\t}\n\t\t\t\n\t\t\tif(isset($_POST['save']) && $_POST['save'] == 'Save Settings')\n\t\t\t{\n\t\t\t\tPlugin::setAllSettings($_POST['setting'], 'mbblog');\n\t\t\t\tFlash::setNow('success', __('Settings have been saved!'));\t\t \t\n\t\t\t}\n\t\t\t\t\t\t\n\t\t\t$this->display('mbblog/views/admin/settings', array('settings' => Plugin::getAllSettings('mbblog')));\n\t\t} else\n\t\t{\n\t\t\tFlash::set('error', __('You do not have permission to access the requested page!'));\n\t\t\tredirect(get_url());\n\t\t}\n\t}", "public static function menu_generator_settings() {\n\t\t\t\n\t\t\tglobal $wpdb;\t\t\t\n\t\t\t\n\t\t\t#enqueue scripts\n\t\t\twp_enqueue_script('js-scripts', plugins_url( '/menu-generator/scripts/ajax_settings.js' ) );\n\t\t\twp_register_style(\"menu-style\", plugins_url( '/menu-generator/styles/main.css' ) );\n wp_enqueue_style( 'menu-style');\n\t\t\t\n\t\t\t# listings page properties\n\t\t\t$opt = self::get_current_options();\n\t\t\t$pid = $opt[0];\n\t\t\t$lang = $opt[1];\n\t\t\t$ptype = $opt[2];\n\t\t\t$cont = $opt[3];\n\t\t\tinclude_once \"include/incsettings.php\";\n\n\t\t}", "function blueauthentic_theme_settings() {\n\tadd_settings_section(\n\t\t'social_section',\n\t\t'Social Media Account Links/URLs',\n\t\t'blueauthentic_social_section_description',\n\t\t'theme-options-section-social'\n\t);\n\n\tadd_option( 'social_facebook_option', 1 );\n\tadd_settings_field(\n\t\t'social_facebook_option',\n\t\t'Facebook Account',\n\t\t'social_facebook_option_callback',\n\t\t'theme-options-section-social',\n\t\t'social_section'\n\t);\n\tregister_setting( 'theme-options-group-social', 'social_facebook_option' );\n\n\tadd_option( 'social_twitter_option', 2 );\n\tadd_settings_field(\n\t\t'social_twitter_option',\n\t\t'Twitter Account',\n\t\t'social_twitter_option_callback',\n\t\t'theme-options-section-social',\n\t\t'social_section'\n\t);\n\tregister_setting( 'theme-options-group-social', 'social_twitter_option' );\n\n\tadd_option( 'social_youtube_option', 3 );\n\tadd_settings_field(\n\t\t'social_youtube_option',\n\t\t'Youtube Account',\n\t\t'social_youtube_option_callback',\n\t\t'theme-options-section-social',\n\t\t'social_section'\n\t);\n\tregister_setting( 'theme-options-group-social', 'social_youtube_option' );\n}", "public function managesettingsview() {\r\n $this->logger->info(\"Action Manage Settings View \");\r\n $this->template->display('displaylistsettings', $this->combovalue, 'settings', '', '');\r\n }", "function custom_settings_page() { ?>\r\n<div class=\"wrap\">\r\n<h1>Custom Settings</h1>\r\n<form method=\"post\" action=\"options.php\">\r\n<?php settings_fields( 'section' );\r\ndo_settings_sections( 'theme-options' );\r\nsubmit_button(); ?>\r\n</form>\r\n</div>\r\n<?php }", "public function index() {\n\n\t\t$this->Crud->addListener('SettingsSubSection', 'SettingsSubSection');\n\n\t\t$this->set('title_for_layout', __('Visualisation Settings'));\n\t\t$this->set('subtitle_for_layout', __('Use visualisations to control what is displayed to the logged user. By default they are enabled, meaning users will only see items that relate to them.'));\n\t\t\n\t\t$this->Crud->on('beforePaginate', array($this, '_beforePaginate'));\n\t\t$this->Crud->execute();\n\t}", "function wps3backup_settings_page() {\n $tpl_vars = array(\n 'wps3backup_backup_dir_value' => get_option('wps3backup_backup_dir', ''),\n 'wps3backup_backup_type_value' => get_option('wps3backup_backup_type', ''),\n 'wps3backup_s3_region_value' => get_option('wps3backup_s3_region', ''),\n 'wps3backup_s3_bucket_value' => get_option('wps3backup_s3_bucket', ''),\n 'wps3backup_s3_api_key_value' => get_option('wps3backup_s3_api_key', ''),\n 'wps3backup_s3_api_secret_value' => get_option('wps3backup_s3_api_secret', ''),\n 'settings_updated' => isset($_REQUEST['settings-updated']) && $_REQUEST['settings-updated'],\n );\n\n include 'includes/settings.tpl.php';\n}", "function bn_project_options_page_html() {\n\t// check user capabilities\n\tif (! current_user_can('manage_options')) {\n\t\treturn;\n\t\t// add error/update messages\n\t}\n\t// check if the user have submitted the settings\n\t// wordpress will add the \"settings-updated\" $_GET parameter to the url\n\tif ( isset( $_GET['settings-updated'] ) ) {\n\t\t// add settings saved message with the class of \"updated\"\n\t\tadd_settings_error( 'bn_project_messages', 'bn_project_message', __( 'Zapisano ustawienia', 'bn_project' ), 'updated' );\n\t}\n\n\t// show error/update messages\n\tsettings_errors( 'bn_project_messages' );\n\t?>\n\t<div class=\"wrap\">\n\t<h1><?php echo esc_html( get_admin_page_title() ); ?></h1>\n\t<form action=\"options.php\" method=\"post\">\n\t<?php\n\t// output security fields for the registered setting \"bn_project\"\n\tsettings_fields( 'bn_project' );\n\t// output setting sections and their fields\n\t// (sections are registered for \"bn_project\", each field is registered to a specific section)\n\tdo_settings_sections( 'bn_project' );\n\t// output save settings button\n\tsubmit_button( 'Zapisz' );\n\t?>\n\t</form>\n\t</div>\n\t<?php\n}", "private function add_page_settings_controls() {\n\t\trequire_once( __DIR__ . '/page-settings/manager.php' );\n\t\tnew Page_Settings();\n\t}", "private function add_page_settings_controls() {\n\t\trequire_once( __DIR__ . '/page-settings/manager.php' );\n\t\tnew Page_Settings();\n\t}", "function page_builder_settings() {\n\n\t\t$settings = parent::page_builder_settings();\n\n\t\treturn array_merge( $settings, array(\n\t\t\t'name' => __( 'Social Share Buttons', 'publisher' ),\n\t\t\t\"base\" => $this->id,\n\t\t\t\"weight\" => 1,\n\t\t\t\"wrapper_height\" => 'full',\n\t\t\t\"category\" => publisher_white_label_get_option( 'publisher' ),\n\t\t\t'icon_url' => PUBLISHER_THEME_URI . 'images/shortcodes/bs-social-share.png',\n\t\t) );\n\t}", "public function page_init() { \n\n\t\t\tif (!get_option('dls_settings_site_id')) {\n\t\t\t\tadd_option('dls_settings_site_id');\n\t\t\t}\n\n\t\t\tif (!get_option('dls_settings_enabled_post_types')) {\n\t\t\t\tadd_option('dls_settings_enabled_post_types');\n\t\t\t}\n\n\t\t\tif (!get_option('dls_settings_replace_host_list')) {\n\t\t\t\tadd_option('dls_settings_replace_host_list');\n }\n\n\t\t\tif (!get_option('dls_settings_auto_redirect_to_admin_page')) {\n\t\t\t\tadd_option('dls_settings_auto_redirect_to_admin_page');\n }\n\n\t\t\tif (!get_option('dls_overwrite_viewable_permalink')) {\n\t\t\t\tadd_option('dls_overwrite_viewable_permalink');\n }\n\n \t\t\tif (!get_option('dls_overwrite_viewable_permalink_host')) {\n\t\t\t\tadd_option('dls_overwrite_viewable_permalink_host');\n\t\t\t}\n \n register_setting( 'my_option_group', 'dls_settings_site_id', array( $this, 'sanitize' ) );\n register_setting( 'my_option_group', 'dls_settings_enabled_post_types', array( $this, 'sanitize' ) );\n register_setting( 'my_option_group', 'dls_settings_replace_host_list', array( $this, 'sanitize' ) );\n register_setting( 'my_option_group', 'dls_settings_auto_redirect_to_admin_page', array( $this, 'sanitize' ) );\n register_setting( 'my_option_group', 'dls_overwrite_viewable_permalink', array( $this, 'sanitize' ) );\n register_setting( 'my_option_group', 'dls_overwrite_viewable_permalink_host', array( $this, 'sanitize' ) );\n\n add_settings_section( 'settings_site_id', 'Site ID', array( $this, 'print_site_id' ), 'my-setting-admin' ); \n\t\t\tadd_settings_field( 'dls-settings', 'Set the site id for this site', array( $this, 'site_id_callback'), 'my-setting-admin', 'settings_site_id' ); \n\n add_settings_section( 'setting_section_id', 'Post types settings', array( $this, 'print_post_types_info' ), 'my-setting-admin' ); \n\t\t\tadd_settings_field( 'dls-settings', 'Select post types', array( $this, 'post_type_callback'), 'my-setting-admin', 'setting_section_id' ); \n\n add_settings_section( 'settings_replace_hosts', 'Hosts to replace', array( $this, 'print_replace_hosts_info' ), 'my-setting-admin' ); \n\t\t\tadd_settings_field( 'dls-settings', 'List of hosts', array( $this, 'replace_hosts_callback'), 'my-setting-admin', 'settings_replace_hosts' ); \n\n add_settings_section( 'settings_auto_redirect_to_admin', 'Auto redirect to admin page', array( $this, 'print_auto_redirect_to_admin' ), 'my-setting-admin' ); \n\t\t\tadd_settings_field( 'dls-settings', 'Auto redirect to admin page', array( $this, 'auto_redirect_to_admin_callback'), 'my-setting-admin', 'settings_auto_redirect_to_admin' ); \n\n add_settings_section( 'settings_overwrite_viewable_permalink', 'Overwrite the viewable permalink', array( $this, 'print_overwrite_viewable_permalink' ), 'my-setting-admin' ); \n\t\t\tadd_settings_field( 'dls-settings', 'Overwrite the viewable permalink', array( $this, 'overwrite_viewable_permalink_callback'), 'my-setting-admin', 'settings_overwrite_viewable_permalink' ); \n\t\t\tadd_settings_field( 'dls-settings-overwrite_viewable_permalink_host', 'Overwrite the viewable permalink host', array( $this, 'overwrite_viewable_permalink_host_callback'), 'my-setting-admin', 'settings_overwrite_viewable_permalink' ); \n\n\t\t}" ]
[ "0.77035904", "0.7631472", "0.7496686", "0.74791646", "0.73919815", "0.73843366", "0.73121965", "0.7221044", "0.7217846", "0.71664405", "0.71282375", "0.7119943", "0.711145", "0.7092875", "0.70647454", "0.70526636", "0.70300335", "0.7023564", "0.69907606", "0.69440037", "0.69417644", "0.6933613", "0.6919372", "0.6917857", "0.69112015", "0.69052756", "0.69006586", "0.6898651", "0.68917865", "0.67997175", "0.67994833", "0.6769211", "0.67524624", "0.67310876", "0.67167157", "0.66996133", "0.66912866", "0.66889465", "0.668837", "0.66867995", "0.66863847", "0.6683575", "0.66832685", "0.6674184", "0.66677797", "0.6656667", "0.6647385", "0.6643378", "0.6626357", "0.6607138", "0.65927494", "0.6584919", "0.657842", "0.65739566", "0.6556513", "0.65519047", "0.6540972", "0.6540617", "0.652655", "0.65149474", "0.6502309", "0.6497635", "0.6496093", "0.6487322", "0.6483292", "0.64778304", "0.647551", "0.6475066", "0.6474799", "0.6469562", "0.64691645", "0.6468287", "0.6465543", "0.6460821", "0.6451333", "0.64482313", "0.6446528", "0.64455724", "0.64276636", "0.6426036", "0.64216644", "0.6420151", "0.6419355", "0.6415717", "0.6413167", "0.6407352", "0.6397936", "0.6396614", "0.6393141", "0.6388922", "0.6380898", "0.63767064", "0.63707906", "0.6370305", "0.6369262", "0.63643706", "0.6358378", "0.6358378", "0.63576037", "0.63560843" ]
0.7559004
2
Create a new rule instance.
public function __construct($table="telephones",$id=0) { $this->table=$table; $this->id=$id; $this->code=[]; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function rule()\n\t{\n\t\t// Return an ACL rule\n\t\treturn new ACL_Rule;\n\t}", "public function __construct($rule)\n {\n $this->rule = $rule;\n }", "protected function _rule($rule, array $options = array()) {\n\t\t$this->rule = new $rule($options);\n\t\treturn $this->rule;\n\t}", "public function initialize_rule()\n\t{\n\t\t$this->rule = array\n\t\t(\n\t\t\t'roles' => array(),\n\t\t\t'capabilities' => array(),\n\t\t\t'users' => array(),\n\t\t\t'callbacks' => array(),\n\t\t);\n\t\t\n\t\treturn $this;\n\t}", "protected function createRuleObject($rule, $key, $value): RuleInterface\n {\n if ($rule === $key) {\n return new $key($value);\n }\n\n return new $value();\n }", "public function getRule();", "public function testInstantiation()\n {\n $command = new CreateRule('dummy name');\n }", "public function addRule(Rule $rule): Manager\n {\n $this->rules[] = $rule;\n return $this;\n }", "abstract public function addRule(ValidationRule$rule);", "public function addRule(Rule $rule)\n {\n $this->rules[] = $rule;\n return $this;\n }", "public function rule(array $rule){\n\n\t\t$this->rule = $rule;\n\n\t\treturn $this;\n\t}", "public function setCreateTNARule()\n\t{\n\t\t$this->rules = [\n\t\t\t'orderId' => 'sometimes|exists:orders,id',\n\t\t 'techpackId' => 'sometimes|exists:techpacks,id',\n\t\t 'customerId' => 'sometimes|exists:customers,id',\n\t\t 'vendorId' => 'sometimes|array|exists:vendors,id',\n\t\t 'title' => 'required',\n\t\t 'startDate' => 'required|date',\n\t\t 'targetDate' => 'required|date',\n\t\t 'representor' => 'required|email|exists:users,email',\n\t\t // 'styleCode' => 'required'\n\t\t];\n\t\treturn $this;\n\t}", "public function getDefinition(): RuleDefinition\n {\n }", "public function getDefinition(): RuleDefinition\n {\n }", "private function _makeRule($name, array $options)\n {\n static $needed_keys = array('regex', 'target');\n \n // all the needed keys are here\n foreach($needed_keys as $key)\n if(!isset($options[$key]))\n throw new Error500('Missing « '.$key.' » option for the rule « '.$name.' »');\n \n // check the existence of a rule with the same name\n if(isset($this->rules[$name]))\n throw new Error500('A rule named « '.$name.' » already exists.');\n \n // define the rule's url\n $url = isset($options['url']) ? $options['url'] : $this->guessURL($options['regex']);\n \n // try to parse the parameters to add to the rule\n $params = array();\n if(isset($options['params']))\n {\n if(!is_array($options['params']))\n throw new Error500('Rule « '.$name.' » is malformed (« params » parameter must be an array).');\n \n $params = $options['params'];\n }\n \n if(isset($options['GET']))\n {\n if(!is_array($options['GET']))\n throw new Error500('Rule « '.$name.' » is malformed (« GET » parameter must be an array).');\n \n $params['GET'] = $options['GET'];\n }\n \n $rule = new Rule($name, $options['regex'], $url, $options['target'], $params);\n \n $this->rules[$name] = $rule;\n \n return $rule;\n }", "public function getBonusRuleInstance()\n {\n return new BonusRule();\n }", "public function setRule($rule) {\n\t\t$this->rule = $rule;\n\n\t\tif (!isset($this->rules[$rule])) {\n\t\t\t$this->rules[$rule] = [\n\t\t\t\t'constraints' => [],\n\t\t\t\t'filters' => [],\n\t\t\t\t'is_valid' => true\n\t\t\t];\n\t\t}\n\n\t\treturn $this;\n\t}", "public static function createRuleFromArray(array $options)\n {\n if (!isset($options['asset_type'])) {\n throw new \\RuntimeException('Cannot create rule: missing type');\n }\n\n $className = __NAMESPACE__ . '\\\\' . ucfirst(mb_strtolower($options['asset_type']));\n if (!class_exists($className)) {\n throw new \\RuntimeException(\n sprintf('Cannot create rule of type \"%s\": does not exist', $options['asset_type'])\n );\n }\n\n $rule = new $className;\n if (!$rule instanceof RuleCompositeInterface) {\n throw new \\RuntimeException(\n sprintf('Cannot create rule of type \"%s\": is not a rule', $options['asset_type'])\n );\n }\n\n $rule->exchangeArray($options);\n return $rule;\n }", "public function __construct($parentRule = 'Parent')\n {\n $this->_parentRule = $parentRule;\n }", "public function createRule($name, $description, array $conditions)\n\t{\n\t\t$rule = new \\Watchdog\\Entities\\Rule((string)$name, (string)$description, $conditions);\n\t\t$this->rules[] = $rule;\n\t\t\n\t\treturn $rule;\n\t}", "public function creating(MActivityRule $model)\n\t{\n\t}", "public function addRule(bnfRule $rule){\n\t\t$this->rules[] = $rule;\t\t\n\t}", "private function setRules()\n {\n $this->addRule(new Rules\\CoreAccountRule());\n $this->addRule(new Rules\\CoreApplicationRule());\n $this->addRule(new Rules\\IdentityAccountRule());\n $this->addRule(new Rules\\QuestionRule());\n return $this;\n }", "public function createRules()\n {\n return [];\n }", "public function getRule(int $number): RuleInterface;", "public function addRule(RuleInterface $rule)\r\n\t{\r\n\t\t$this->rules[] = $rule;\r\n\t\t$this->dirty = true;\r\n\t\treturn $this;\r\n\t}", "public function addRule(RuleIface $rule);", "public static function createRule(\r\n $type, HTML_QuickForm2_Node $owner, $message = '', $config = null\r\n ) {\r\n $type = strtolower($type);\r\n if (!isset(self::$registeredRules[$type])) {\r\n throw new HTML_QuickForm2_InvalidArgumentException(\"Rule '$type' is not known\");\r\n }\r\n list($className, $includeFile) = self::$registeredRules[$type];\r\n HTML_QuickForm2_Loader::loadClass($className, $includeFile);\r\n if (isset(self::$registeredRules[$type][2])) {\r\n $config = call_user_func(\r\n array($className, 'mergeConfig'),\r\n $config, self::$registeredRules[$type][2]\r\n );\r\n }\r\n return new $className($owner, $message, $config);\r\n }", "protected function createValidator()\n {\n $rule = $this->rule;\n if (is_object($rule)) {\n return $this->checkValidator($rule);\n }\n\n if (is_array($rule)) {\n $rule['folderPath'] = $this->folderPath;\n // the nested cass is to\n return $this->checkValidator(Validator::createValidator(\n ArrayHelper::remove(\n $rule,\n 'class',\n FileHandlerValidator::className()\n ),\n $this->fileAttribute,\n $rule\n ));\n }\n\n throw new InvalidConfigException(\n 'Unrecognized type for `rule` property.'\n );\n }", "public static function parseFromValidation(string $name, $rule): self\n {\n $param = new self($name);\n $rule = !is_string($rule) ? $rule->__toString() : $rule; \n $parsedRules = explode('|', $rule);\n\n foreach ($parsedRules as $concreteRule) { \n try {\n $value = explode(':', $concreteRule)[1];\n } catch (Exception $e) {\n $value = null;\n }\n \n try {\n $param->{$concreteRule}($value);\n } catch (Error $e) {\n continue;\n } catch (BadMethodCallException $e) {\n continue;\n }\n }\n \n return $param;\n }", "public function __construct()\n {\n $this->pluralRules = Pluralize::all();\n $this->singularRules = Singularize::all();\n $this->aplicator = new Rules();\n \n foreach (Irregularize::all() as $rule) {\n $this->irregularSingles[$rule[0]] = $rule[1];\n $this->irregularPlurals[$rule[1]] = $rule[0];\n }\n \n foreach (Uncountable::all() as $rule) {\n $this->addUncountableRule($rule);\n }\n }", "public function rule($field, $rule, $params = null, $message = false): self\n {\n $this->rule[$field][] = [\n 'type' => $rule,\n 'params' => $params,\n 'message' => $message\n ];\n\n return $this;\n }", "public function __construct(Field $field, $rule) {\n $this->field = $field;\n\n // The specific rule that was broken.\n $this->rule = $rule;\n\n // Determine the parameter for this rule, if it has one.\n $this->parameter = $this->determineRuleParameter();\n\n\n }", "public function __construct( $rule_data ) {\n\t\tforeach ( $rule_data as $rule_key => $rule_value ) {\n\t\t\t$this->rule_data[ $rule_key ] = $rule_value;\n\t\t}\n\t}", "public function addRule($pName, $rule) {\n if (!$this->isValidPropertyName($pName)) {\n throw new Exceptions\\InvalidArgument(\"Property name can't be empty\");\n }\n if (!empty($this->propertiesNames[$pName])) {\n $pID = $this->propertiesNames[$pName];\n $property = $this->properties[$pID];\n } else {\n $property = new Target\\Property($pName);\n $pID = $property->getID();\n $this->properties[$pID] = $property;\n $this->propertiesNames[$pName] = $pID;\n }\n return $property->attachRule($rule);\n }", "function __construct($rules = array()) {\n parent::__construct($rules);\n }", "public function getRule(): RuleInterface\n {\n return $this->rule;\n }", "static function addRule(\\CharlotteDunois\\Validation\\RuleInterface $rule) {\n if(static::$rulesets === null) {\n static::initRules();\n }\n \n $class = \\get_class($rule);\n $arrname = \\explode('\\\\', $class);\n $name = \\array_pop($arrname);\n \n $rname = \\str_replace('rule', '', \\mb_strtolower($name));\n static::$rulesets[$rname] = $rule;\n \n if(\\mb_stripos($name, 'rule') !== false) {\n static::$typeRules[] = $rname;\n }\n }", "public static function createRule(string $name, array $filters, bool $traverse)\n {\n $rules = self::getRules();\n\n $ruleClass = isset($rules[$name]) ? $rules[$name] : null;\n\n if (is_null($ruleClass)) {\n throw new \\Exception(\"No Rule class to handle rule {$name}\");\n }\n\n return new $ruleClass($filters, $traverse);\n }", "public function __construct(array $rules = array())\n {\n $this->rules = $rules;\n }", "public function setCreationRules()\n {\n $this->rules = [\n 'techpackId' => 'required|exists:techpacks,id',\n ];\n return $this;\n }", "public static function addRule(\\GraphQL\\Validator\\Rules\\ValidationRule $rule)\n {\n }", "private function createCategoryRules()\n {\n // Validation rules\n $this->form_validation->set_rules('category_title', 'Category Title', 'trim|required|max_length[255]');\n }", "public function create()\n {\n if (!check_permission('assessment/rules/create')) {\n return _404('无权操作!');\n }\n return view('assessment.rule.create');\n }", "public function created(MActivityRule $model)\n\t{\n\t}", "public function getStartRule(): RuleInterface;", "public function __construct(ValidationRule $rules)\n {\n $this->rules = $rules;\n $this->rules->addObject(UserController::class, $this);\n $this->randomPassword = RandomCharGenerator::generate();\n }", "protected function addRule( phpucInputRule $rule )\n {\n $this->rules[] = $rule;\n }", "public function add_rule( WP_Autoload_Rule $rule );", "public function __construct()\n {\n parent::__construct($this->rules);\n }", "public function __construct(){\n # parent::__construct();\n $this->rule_add = ['name'=>'required|unique:group_rule', 'description'=>'required'];\n $this->rule_update = ['name'=>'required', 'description'=>'required'];\n }", "public function makeRules()\n {\n $this->rules = [];\n preg_match_all(\"/([.#a-z0-9-]*)\\s?({[^}]*})/i\", $this->contents(), $comands);\n foreach ($comands[1] as $k => $selector) {\n preg_match_all(\"/([a-z0-9-]*):([^;]*);/i\", $comands[2][$k], $declarations);\n $this->rules[$selector] = [];\n foreach ($declarations[1] as $i => $property) {\n $this->rules[$selector][$property] = $declarations[2][$i];\n }\n }\n }", "abstract public function rules();", "abstract public function rules();", "abstract public function rules();", "abstract public function rules();", "private function addRule($type, Rule $newRule = null)\n {\n if (!$newRule) {\n return;\n }\n\n $this->rules->add($newRule, $type);\n }", "public static function create()\r\n\t{\r\n\t\t$validator = Validation::forge('callback');\r\n\t\t\r\n\t\t$validator->add('event', 'Event Name')->add_rule('trim')->add_rule('required')->add_rule(array('invalid_event_name' => function ($event_name) {\r\n\t\t\t$event = Service_Event::find_one(array('name' => $event_name));\r\n\t\t\tif (!$event) {\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\treturn true;\r\n\t\t}));\r\n\t\t\r\n\t\t$validator->add('url', 'Callback URL')->add_rule('trim')->add_rule('valid_url')->add_rule('required');\r\n\t\t\r\n\t\treturn $validator;\r\n\t}", "public function rules();", "public function rules();", "public function rules();", "public function addRule(PublicApiRuleInterface $rule)\n {\n $this->rules[$rule->getModelClass()][$rule->getModelType()] = $rule;\n return $this;\n }", "public static function add_rule(ACL_Rule $rule)\n\t{\n\t\t// Check if the rule is valid, if not throw an exception\n\t\tif ( ! $rule->valid())\n\t\t\tthrow new ACL_Exception('The ACL Rule was invalid and could not be added.');\n\n\t\t// Find the rule's key and add it to the array of rules\n\t\t$key = $rule->key();\n\t\tself::$_rules[$key] = $rule;\n\t}", "protected function _construct()\n {\n $this->_init('magento_targetrule', 'rule_id');\n }", "public function addRule(string $field, IValidationRule $rule): void;", "private function setupRules()\n {\n // Validator::extend('rule', 'App\\Support\\Rules\\Rule@validate');\n // Validator::replacer('rule', 'App\\Support\\Rules\\Rule@message');\n }", "public function getRule()\n {\n return $this -> rule;\n }", "public function makeRule(array $formats): ValidationRule\n {\n return new DateFormat(...$formats);\n }", "public function rules()\n {\n return $this->belongsTo('App\\Rule');\n }", "public function setRuleId(string $ruleId) : self\n {\n $this->initialized['ruleId'] = true;\n $this->ruleId = $ruleId;\n return $this;\n }", "public function __construct(array $pattern)\n {\n foreach ($pattern as $property => $rules) {\n if (is_array($rules)) {\n $this->rules[$property] = Rule::createRulesArray($rules);\n } elseif (is_string($rules)) {\n $this->rules[$property] = Rule::createRulesArray(explode('|', $rules));\n } else {\n throw new \\RuntimeException('Invalid pattern for validator', 500);\n }\n }\n }", "private function getRule()\n\t{\n\t\t$className = $this->className;\n\t\treturn $className::rule();\n\t}", "public function getTrueRule()\n {\n $tp = new Test\\Fixtures\\TrueProposition();\n $ruleFactory = new RuleFactory;\n return $ruleFactory->create($tp);\n }", "public function add(RuleElement\\Element $element) {\n $this->elements[] = $element;\n\n return $this;\n }", "public function buildRules(): void\n {\n }", "public function __construct(array $ruleSet)\n {\n $this->ruleSet = $ruleSet;\n }", "public static function getRule($name)\n {\n }", "public function buildRules(RulesChecker $rules)\n {\n $rules->add($rules->isUnique(['title']));\n\n return $rules;\n }", "public function create(){}", "public function buildRules(RulesChecker $rules)\n {\n $rules->add($rules->isUnique(['title']));\n return $rules;\n }", "public function add_rule($selector)\n {\n }", "public static function createRule($name, $params = array())\n\t{\n\t\tif (!is_array($params))\n\t\t\t$params=array('defaultValue'=>$params);\n\n\t\tif(isset(self::$builtInRules[$name]))\n\t\t\t$className=Yii::import(self::$builtInRules[$name],true);\n\t\telse\n\t\t\t$className=Yii::import($name,true);\n\t\treturn Yii::createComponent(CMap::mergeArray(array('class'=>$className), $params));\n\t}", "function addRule($key, $type, $arg = null)\n {\n $this->rules[] = array(\n 'key' => $key,\n 'type' => $type,\n 'arg' => $arg\n );\n }", "public function createDefaultNotificationRule();", "protected function _generateRules()\n {\n }", "abstract public function parseRules();", "public function addRule(array $rule, $overwrite = false)\n {\n if($overwrite)\n {\n array_merge($this->rules, $rule);\n }\n else\n {\n $val = '';\n if(array_key_exists(key($rule), $this->rules))\n {\n $val = $this->rules[key($rule)].'|';\n }\n $this->rules[key($rule)] = $val.$rule[key($rule)];\n }\n \n return $this;\n }", "public function testConstructorContainer()\n {\n $rule = new AndRule(\n new TrueRule(),\n new OrRule(\n new FalseRule(),\n new TrueRule()\n ),\n new NotRule(\n new FalseRule()\n )\n );\n $this->assertTrue($rule->validate());\n }", "public function buildRules(RulesChecker $rules)\n {\n $rules->add($rules->existsIn(['trip_id'], 'Trips'));\n $rules->add($rules->existsIn(['stop_id'], 'Stops'));\n\n return $rules;\n }", "public function setCustomRule(string $name, Validatable $rule): ValidatorInterface;", "public function buildRules(RulesChecker $rules)\n {\n $rules->add($rules->isUnique(['tel']));\n\n return $rules;\n }", "public function make(array $data, array $rules, array $messages = array(), array $customAttributes = array());", "public function buildRules(RulesChecker $rules)\n {\n $rules->add($rules->isUnique(['asset_number']));\n $rules->add($rules->existsIn(['warehouse_id'], 'Warehouses'));\n\n return $rules;\n }", "public static function create() {\n global $DB;\n\n $record = new stdClass();\n $record->useand = true;\n\n $id = $DB->insert_record('ddtaquiz_condition', $record);\n\n return new condition($id, array(), $record->useand);\n }", "public function buildRules(RulesChecker $rules): RulesChecker\n {\n $rules->add($rules->isUnique(['title']));\n $rules->add($rules->existsIn(['user_id'], 'Users'));\n\n return $rules;\n }", "public function addRule(RuleIface $rule)\n {\n $this->rules[] = $rule;\n }", "public function buildRules(RulesChecker $rules)\n {\n $rules->add($rules->existsIn(['test_run_id'], 'TestRuns'));\n $rules->add($rules->existsIn(['stream_id'], 'Streams'));\n $rules->add($rules->existsIn(['parameter_id'], 'Parameters'));\n return $rules;\n }", "public function setRules(array $rules = array()){\n $this->_rules = $rules;\n \n return $this;\n }", "public function testCreateRuleGroup()\n {\n // TODO: implement\n $this->markTestIncomplete('Not implemented');\n }", "public function getRule()\n\t{\n\t\treturn $this->rule;\n\t}", "protected function createRules()\n {\n return [\n 'token' => ['required', 'string'],\n ];\n }" ]
[ "0.70554173", "0.70352", "0.6951036", "0.63332736", "0.6322271", "0.61079586", "0.610166", "0.61011785", "0.60997975", "0.6096601", "0.59716463", "0.59215456", "0.5920786", "0.5920786", "0.5879104", "0.58263415", "0.5795926", "0.5794887", "0.5766469", "0.57603216", "0.57509834", "0.5689234", "0.56290513", "0.5616828", "0.5608796", "0.5596628", "0.55960304", "0.5561357", "0.553431", "0.5521237", "0.5501706", "0.5498208", "0.548473", "0.5453787", "0.5447638", "0.5378762", "0.53726155", "0.5372036", "0.5366798", "0.5366032", "0.5355957", "0.5351747", "0.5343861", "0.53316844", "0.53271633", "0.5298979", "0.52981424", "0.5278316", "0.52742505", "0.52709854", "0.52486664", "0.52381116", "0.523713", "0.523713", "0.523713", "0.523713", "0.52361065", "0.5235449", "0.5220051", "0.5220051", "0.5220051", "0.5216667", "0.5211655", "0.5206536", "0.5201047", "0.5182542", "0.5182395", "0.51626456", "0.5155416", "0.51518583", "0.5149035", "0.5148929", "0.5140176", "0.5133648", "0.51099193", "0.51067746", "0.5101962", "0.5100886", "0.5094729", "0.50931096", "0.50863516", "0.50853544", "0.50812453", "0.5079836", "0.5070466", "0.5069266", "0.50679064", "0.50638276", "0.5056228", "0.50560075", "0.5055332", "0.5052613", "0.5051899", "0.50457805", "0.5045457", "0.503988", "0.5033986", "0.5022403", "0.5020689", "0.50132066", "0.50000197" ]
0.0
-1
Determine if the validation rule passes.
public function passes($attribute, $value) { return $this->numericValidation() && $this->testUnique(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function isValidationPassed();", "public function passes()\n {\n $validator = $this->validator->make($this->data, $this->rules, $this->messages);\n \n if($validator->fails())\n {\n $this->errors = $validator->messages();\n return false;\n }\n \n return true;\n }", "public function passes()\n {\n $rules = $this->replace();\n\n $validator = Validator::make($this->data, $rules);\n\n if( $validator->passes() )\n {\n return true;\n }\n\n $this->errors = $validator->messages();\n }", "function passes() {\n return $this->startValidation();\n }", "public function validate() : bool\n {\n return $this->passes();\n }", "public function passes()\n {\n $validator = $this->validator->make($this->data, $this->rules);\n\n if($validator->passes())\n {\n return true;\n }\n\n $this->errors = $validator->errors()->all(':message');\n return false;\n }", "public function passes()\n {\n foreach ($this->rules as $attribute => $rules) {\n foreach ($rules as $rule) {\n $this->validate($attribute, $rule);\n }\n }\n\n return count($this->messages) === 0;\n }", "public function passes() {\n $this->message = new MessageBag;\n\n // We'll spin through each rule, validating the attributes attached to that\n // rule. Any error messages will be added to the containers with each of\n // the other error messages, returning true if we don't have messages.\n foreach ($this->rules as $attribute => $rules) {\n\n }\n\n return $this->message->isEmpty();\n }", "public function isValid()\r\n\t{\r\n\t\t$valid = $this->validate($this->rule, $this->control->getValue(), $this->arg);\r\n\t\tif ($this->negative)\r\n\t\t\t$valid = !$valid;\r\n\r\n\t\tif ($valid)\r\n\t\t\treturn true;\r\n\r\n\t\t$this->control->setError($this->getMessage());\r\n\t\treturn false;\r\n\t}", "public function valid(): bool {\n return false !== current($this->rules);\n }", "public function valid()\n {\n return $this->makeValidator()->passes();\n }", "public function valid()\n {\n return current($this->rules) !== false;\n }", "public function validation()\n {\n if ($this->validationHasFailed() == true) {\n return false;\n }\n }", "public function validate(): bool\n {\n $result = true;\n foreach ($this->rules as $field_name => $field_rules) {\n foreach ($field_rules as $field_rule => $field_params) {\n\n if (array_key_exists($field_rule, self::$known_rules)) {\n\n if (class_exists(self::$known_rules[$field_rule]) and\n is_subclass_of(self::$known_rules[$field_rule], 'Shulha\\Framework\\Validation\\Rules\\AbstractValidationRule')) {\n\n /** @var $validation_class AbstractValidationRule */\n $validation_class = new self::$known_rules[$field_rule];\n $field_value = isset($this->request->$field_name) ? $this->request->$field_name : null;\n\n if (!$validation_class->check($field_name, $field_value, $field_params)) {\n $result = false;\n $this->errorList[$field_name][] = $validation_class->getError($field_name, $field_value, $field_params);\n }\n } else\n throw new RuleClassNotFoundException(\"Class \" . self::$known_rules[$field_rule] . \" not found or don't extends AbstractValidationRule\");\n } else\n throw new RuleNotFoundException(\"Rule \\\"$field_rule\\\" not found\");\n }\n }\n return $result;\n\n }", "public function passed(){\n \n //Loop through all the fields in the ruleset\n foreach($this->rules as $fieldName => $ruleCollection){\n foreach($ruleCollection as $rule => $rule_value){\n $this->validateField($fieldName, $rule, $rule_value); \n }\n }\n \n if($this->useValidationToken){\n if( Input::get(\"form_token\") != Session::get(\"form_token\") ){\n $this->addError(\"form_token\", \"token\", \"Could not process form form at this time. Please try again.\");\n }\n }\n \n //If we're using session flash, add a formatted list of errors to the session flash system\n if($this->useSessionFlash){\n Session::addFlash($this->formattedErrors(\"list\"), \"danger\", \"Please correct the following errors\");\n }\n \n return $this->hasPassed;\n }", "public function isValid() {\n\t\t$validation = Validator::make($this->attributes, static::$rules);\n\n\t\tif ($validation->passes()){\n\t\t\treturn true;\n\t\t}\n\n\t\t$this->messages = $validation->messages();\n\t\treturn false;\n\t}", "function validate()\n\t{\n\t\t$result = true;\n\t\tif ($this->required && !$this->value) { $result = false; }\n\n\t\tif (!$result) { $this->error = '*'; }\n\n\t\treturn $result;\n\t}", "public function validate()\n {\n foreach ($this->aRule as $aRule) {\n if (count($aRule) < 2) { continue; }\n $sKey = array_shift($aRule);\n $sValidator = array_shift($aRule);\n $Validator = $this->createValidator(\n $sValidator,\n $sKey,\n Arr::get($this->aData, $sKey),\n $aRule,\n Arr::get($this->aMsg, $sKey, array())\n );\n if(true !== ($sValidMsg = $Validator->validator())){\n return $sValidMsg;\n }\n }\n return true;\n }", "public function fails()\n {\n return count($this->_rules->errors) > 0;\n }", "function fails() {\n return !($this->startValidation());\n }", "public function checkValidity()\n {\n if($this->validator->fails()) {\n return $this->validator->errors();\n }\n else\n return false;\n }", "public function passes()\n {\n if ($this->isRemoteValidationRequest()) {\n return $this->validateJsRemoteRequest($this->data['_jsvalidation'], [$this, 'parent::passes']);\n }\n\n return parent::passes();\n }", "public function isValid(): bool\n {\n $success = true;\n\n foreach ($this->rules->getRules() as $field => $rules) {\n foreach ($rules as $rule => $args) {\n $fieldError = $this->fieldErrors[$field] ?? null;\n\n if (key_exists($rule, $this->sets) === false) {\n // Rule doesn't exist, throw an exception\n throw new InvalidArgumentException(\"Unknown rule '$rule'\");\n }\n\n if ($this->params->has($field) === false) {\n // The field doesn't exist.\n if ($this->rules->isRequired($field)) {\n // The rule is required but doesn't exist. Set error and\n // continue to the next field\n $this->errors->add($field, $fieldError ?? \"$field is required\");\n $success = false;\n break;\n }\n\n // The rule doesn't exist but isn't required, so let's just\n // continue to the next field\n continue;\n }\n\n // Add the field value as the first argument\n array_unshift($args, $this->params->get($field));\n\n $callback = call_user_func_array($this->sets[$rule], $args);\n\n if ($callback === true) {\n // The validation rule passed, continue to next\n continue;\n }\n\n // Set success to false since the validation failed\n $success = false;\n\n if ($fieldError || is_string($callback)) {\n // We found a custom field error, let's use that\n $this->errors->add($field, $fieldError ?? $callback);\n break;\n }\n\n // No other error messages was found or returned, create a generic one\n $this->errors->add($field, \"Validation for $rule failed\");\n break;\n }\n }\n\n return $success;\n }", "public function validation() {\n $this->validate(\n new PresenceOf(\n array(\n \"field\" => \"name\",\n \"message\" => \"The name is required\"\n )\n )\n );\n\n if ($this->validationHasFailed() == true) {\n return false;\n }\n\n return true;\n }", "public function validationHasFailed(): bool;", "public function isValid(): bool{\n if ($this->getError() == null){return true;}\n return false;\n }", "protected final function validate()\n {\n $validator = new Validator($this);\n $validator->validate();\n\n return $this->hasErrors() ? false : true;\n }", "public function isRulesPassed()\n {\n if(!isset($this->rules_objects_list[$this->table_name]))\n return true;\n\n //current table's rules object\n $l_target = $this->rules_objects_list[$this->table_name];\n\n return ($l_target->rules_error_flag == false);\n }", "public function isFailed()\n {\n return $this->validator->fails();\n }", "public function validate()\n {\n $validator = new Validator;\n $validator->add($this->rules);\n if ($validator->validate($this->attributes)) {\n return TRUE;\n }\n\n $this->errors = $validator->getMessages();\n\n return FALSE;\n }", "public function isValid()\n {\n $this->beforeValidation();\n\n if ( ! isset($this->validationRules)) {\n throw new NoValidationRulesException('No validation rules found on class ' . get_called_class());\n }\n\n $this->validator = Validator::make($this->inputData, $this->validationRules, $this->validationMessages);\n\n return $this->validator->passes();\n }", "function isValid () {\r\n if ( count ($this->errors) > 0 ) {\r\n return false;\r\n } else {\r\n return true;\r\n }\r\n }", "public function isValid(): bool\n {\n return (count($this->violations) <= 0);\n }", "public function isValidated()\n {\n return $this->attribute('state') == self::STATUS_VALIDATED;\n }", "public function isValid()\n {\n return $this->validates();\n }", "public function isValidated(): bool\n {\n return $this->status != self::STATUS_ERROR;\n }", "public function validate() : bool\n {\n foreach ($this->rules() as $inputName => $rules) {\n $value = $this->{$inputName} ?? '';\n foreach ($rules as $rule) {\n if(!is_string($rule)) {\n $ruleName = $rule[0];\n } else $ruleName = $rule;\n if($ruleName === self::RULE_REQUIRED && !$value) {\n $this->addError($inputName, self::RULE_REQUIRED);\n } else if ($ruleName === self::RULE_EMAIL && !filter_var($value, FILTER_VALIDATE_EMAIL) ) {\n $this->addError($inputName, self::RULE_EMAIL);\n } else if ($ruleName === self::RULE_MAX && strlen($value) > $rule['max']) {\n $this->addError($inputName, self::RULE_MAX, $rule);\n } else if ($ruleName === self::RULE_MIN && strlen($value) < $rule['min']) {\n $this->addError($inputName, self::RULE_MIN, $rule);\n } else if ($ruleName === self::RULE_MATCH && $value !== $this->{$rule['match']}) {\n $this->addError($inputName, self::RULE_MATCH, $rule);\n } else if ($ruleName === self::RULE_UNIQUE) {\n $sql = \" SELECT uniqueID from \" . self::$tableName . \" WHERE \" . $rule['column'] . \"=?\"; \n $stmt = self::$mysqli->prepare($sql);\n $stmt->bind_param('s', $value);\n if($stmt->execute() === false) {\n $this->addError($inputName, self::RULE_UNIQUE, $rule);\n } else {\n $result = $stmt->get_result()->fetch_all(); \n if(count($result) > 0) {\n $this->addError($inputName, self::RULE_UNIQUE, $rule);\n }\n }\n }\n }\n }\n return empty($this->errors);\n }", "public function isValidated()\n {\n if (empty($this->errors)) {\n return true;\n } else {\n return false;\n }\n }", "public function isValid(): bool\n {\n return $this->getErrors()->count() === 0;\n }", "public function isValid()\n {\n return $this->isBound() ? count($this->errors)==0 : false; // TESTME\n }", "public function validate(): bool;", "public function validate(): bool;", "public function validate(): bool;", "public function validate(): bool;", "public function isValid() {}", "public function isValid() {}", "public function isValid() {}", "public function isValid() {}", "public function isValid() {}", "public function isValid() {}", "public function isValid() {}", "public function isValid() {}", "function isValid() {\n return $this->validator ? $this->validator->isValid($this->value) : true;\n }", "public function validate(): bool\n {\n return true;\n }", "public function validate(): bool\n {\n return true;\n }", "public function validate(): bool\n {\n return true;\n }", "public function validate(): bool\n {\n return true;\n }", "public function validate(): bool\n {\n return true;\n }", "public function validation()\n {\n $this->validate(new PresenceOf(\n array(\n \"field\" => \"timestamp\",\n \"message\" => \"The field timestamp is required\"\n )\n ));\n\n $this->validate(new Regex(\n array(\n \"field\" => \"ip\",\n \"pattern\" => '/^\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}\\z/',\n \"message\" => \"The email must be unique\"\n )\n ));\n\n $this->validate(new Numericality(\n array(\n \"field\" => \"load_threshold\",\n \"message\" => \"The load threshold must be numeric\"\n )\n ));\n\n return $this->validationHasFailed() != true;\n }", "public function isValid() : bool {\n\t\t\treturn $this->error == 0;\n\t\t}", "protected function isValid()\r\n\t{\r\n\t\treturn $this->isValid;\r\n\t}", "public function valid()\n {\n\n if ($this->container['rule_id'] === null) {\n return false;\n }\n if ($this->container['rule_name'] === null) {\n return false;\n }\n if ($this->container['status'] === null) {\n return false;\n }\n if ($this->container['execution_source'] === null) {\n return false;\n }\n return true;\n }", "public function isValid()\n\t{\n\t\treturn true;\n\t}", "public function isValid() {\n return $this->getValidation()->isValidField($this->getName());\n }", "public function getIsValid()\n {\n return $this->isValid;\n }", "public function isValid() {\n\t\ttry {\n\t\t\t$this->validate();\n\t\t\treturn true;\n\t\t} catch (ValidationException $e) {\n\t\t\treturn false;\n\t\t}\n\t}", "public function passes()\n {\n if (!($this->validator instanceof \\Illuminate\\Validation\\Validator)) {\n throw new LogicException('No model was set. Nothing to validate.');\n }\n\n return $this->getValidator()->passes();\n }", "public function validate(): bool\n {\n foreach ($this->rules() as $attribute => $rules) {\n\n $value = $this->{$attribute};\n //We loop twice because some rules have array rules within them\n foreach ($rules as $rule) {\n /* If $rule is a string take the $rule and assign it to to $ruleName*/\n $ruleName = $rule;\n /* If $rule is not a string i.e an array, take the first element of the array i.e.\n *$rule[0] and assign it to to $ruleName\n */\n if(!is_string($rule))\n {\n $ruleName = $rule[0];\n }\n /*\n * If any attribute has a rule required and no value exists, add an error to the\n * errors array and pass the attribute and the rule as parameters to the addErrors function\n */\n if($ruleName === self::RULE_REQUIRED && !$value)\n {\n $this->addErrors($attribute, self::RULE_REQUIRED);\n }\n /*\n * If any attribute has a rule email and the value does not pass as valid email, add to the\n * errors array and pass the attribute and the rule as parameters to the addErrors function\n */\n\n if($ruleName === self::RULE_EMAIL && !filter_var($value, FILTER_VALIDATE_EMAIL))\n {\n $this->addErrors($attribute, self::RULE_EMAIL);\n }\n\n /*\n * If any attribute has a rule match and the value does not match with the value passed\n * in the rule array where this rule is found i.e $this->{$rule['match']} which corresponds\n * to password, so in short, $this->password, if they don't match add error to the\n * errors array and pass the attribute and the rule as parameters to the addErrors function\n */\n\n if($ruleName === self::RULE_MATCH && $value !== $this->{$rule['match']})\n {\n $this->addErrors($attribute, self::RULE_MATCH);\n }\n\n /*\n * This control structure if the user input is unique to the database. If it is not,\n * it adds an error to the errors array and pass the attribute and\n * the rule as parameters to the addErrors function\n * The model class that returns the unique set of rules also returns the tableName and the attributes\n * (column names in db) specific to that model class\n * The unique rule is rendered differently to cater for various classes, an array with the unique\n * rule passed along with the self::class that calls the active model class which extends to model\n * and attr is also passed along withe corresponding attribute (this is optional)\n *\n */\n\n if($ruleName === self::RULE_UNIQUE)\n {\n /*\n * Here, the active class is gotten along with the tablename and attribute which we\n * call uniqueAttr specific to the active model class\n */\n $className = $rule['class'];\n $tableName = $className::tableName();\n $uniqueAttr = $rule['attr'] ?? $attribute;\n\n /*\n * We prepare a statement that selects all from the tablename gotten where uniqueAttr\n * is typed param :attr (to avoid sql injection)\n * :attr is bound to $value which is the user input (remember data was loaded before\n * passing it through the validate() function) and executed and object of the result is fetched\n */\n\n $statement = Application::$app->db->prepare(\"SELECT * FROM $tableName WHERE $uniqueAttr = :attr\");\n $statement->bindValue(\":attr\", $value);\n $statement->execute();\n $record = $statement->fetchObject();\n\n /*\n * If a record exists, add an Error, if not it returns true\n */\n if($record)\n {\n $this->addErrors($uniqueAttr, self::RULE_UNIQUE);\n }\n\n }\n /*\n * Added a rule valid start date and valid end date that check if the start date is before\n * the current date and if the end date is before the start date of the project\n * If the rule name has valid_start_date and the value is before (here we use < )\n * the date of today which is passed as a corresponding value of start_date in the\n * RULE_VALID_START_DATE array that is passed. Then add an error for the corresponding\n * attribute and rule passing them as arguments in the addErrors function\n */\n\n if ($ruleName === self::RULE_VALID_START_DATE && $value < $rule['start_date'])\n {\n $this->addErrors('start_date', self::RULE_VALID_START_DATE);\n }\n\n /*\n * If the attribute has rule valid_end_date and the value is before or equal to the\n * day of the project start date. Then add an error for the corresponding\n * attribute and rule passing them as arguments in the addErrors function\n */\n\n if ($ruleName === self::RULE_VALID_END_DATE && $value <= $this->{$rule['end_date']})\n {\n $this->addErrors('end_date', self::RULE_VALID_END_DATE);\n }\n\n }\n }\n /*\n * If all the above conditions are met it means validation passed for the data that was passed\n * to the validate function. If so it means the errors array is empty\n * Then if validate passed, return if empty errors array, as true. If errors array is not empty\n * validate function returns false\n */\n return empty($this->errors);\n\n }", "function validate()\n {\n if ( $this->options['required'] && $this->value == '' )\n {\n $this->validationError = $this->label . ' is required!';\n fWarn::getInstance()->add('Validation failed for ' . $this->name . ', field is required.');\n return false;\n }\n if ( isset($this->regex) )\n {\n $return = preg_match($this->regex, $this->value);\n if ( !$return )\n $this->fDebug->add('Could not validate \"' . $this->value . '\" against \"' . $this->regex . '\"', 1);\n return $return;\n }\n return true;\n }", "private function isValid(){\r\n $this->validator->required('title', 'Image Title Is Required');\r\n $this->validator->required('slideHint', 'Slide Name Is Required');\r\n $this->validator->image('image');\r\n return $this->validator->passes();\r\n }", "public function validation()\n {\n $this->validate(\n new Email(\n array(\n 'field' => 'email',\n 'required' => true,\n )\n )\n );\n\n if ($this->validationHasFailed() == true) {\n return false;\n }\n\n return true;\n }", "public function validation()\n {\n $this->validate(\n new Email(\n array(\n 'field' => 'email',\n 'required' => true,\n )\n )\n );\n\n if ($this->validationHasFailed() == true) {\n return false;\n }\n\n return true;\n }", "public function validation()\n {\n $this->validate(\n new Email(\n array(\n 'field' => 'email',\n 'required' => true,\n )\n )\n );\n\n if ($this->validationHasFailed() == true) {\n return false;\n }\n\n return true;\n }", "public function validation()\n {\n $this->validate(\n new Email(\n array(\n 'field' => 'email',\n 'required' => true,\n )\n )\n );\n\n if ($this->validationHasFailed() == true) {\n return false;\n }\n\n return true;\n }", "public function validation()\n {\n $this->validate(\n new Email(\n array(\n 'field' => 'email',\n 'required' => true,\n )\n )\n );\n\n if ($this->validationHasFailed() == true) {\n return false;\n }\n\n return true;\n }", "public function validation()\n {\n\n $this->validate(\n new Email(\n array(\n \"field\" => \"email\",\n \"required\" => true,\n )\n )\n );\n if ($this->validationHasFailed() == true) {\n return false;\n }\n }", "public function validation()\n {\n\n $this->validate(\n new Email(\n array(\n \"field\" => \"email\",\n \"required\" => true,\n )\n )\n );\n if ($this->validationHasFailed() == true) {\n return false;\n }\n }", "public function validation()\n {\n\n $this->validate(\n new Email(\n array(\n \"field\" => \"email\",\n \"required\" => true,\n )\n )\n );\n if ($this->validationHasFailed() == true) {\n return false;\n }\n }", "public function validate(): bool\r\n {\r\n array_walk(\r\n $this->rules,\r\n function ($rules, $field) {\r\n // $all_rules = array_merge(array_keys($rules), array_values($rules));\r\n try {\r\n // if (!isset($this->data[$field])) {\r\n // throw new FieldDoesNotExist(\"$field is requied\");\r\n // }\r\n\r\n // if (empty($this->data($field))) {\r\n // throw new FieldEmpty(\"$field can't be empty\");\r\n // }\r\n\r\n $this->validateField($field);\r\n } catch (FieldDoesNotExist | FieldEmpty $e) {\r\n // if (in_array(\"nullable\", $all_rules)) {\r\n // unset($this->data[$field]);\r\n // return;\r\n // }\r\n $this->addError($field, str_replace(\"_\", \" \", $e->getMessage()));\r\n }\r\n }\r\n );\r\n\r\n $this->valid = !boolval(count($this->getErrors()));\r\n\r\n $this->validated = true;\r\n\r\n return $this->valid;\r\n }", "public function isValid() {\r\n $this->errors->clean();\r\n $this->validate();\r\n\r\n return $this->errors->isEmpty();\r\n }", "public function validation()\n {\n\n $this->validate(\n new Email(\n array(\n 'field' => 'email',\n 'required' => true,\n )\n )\n );\n if ($this->validationHasFailed() == true) {\n return false;\n }\n }", "public function validation()\n {\n\n $this->validate(\n new Email(\n array(\n 'field' => 'email',\n 'required' => true,\n )\n )\n );\n if ($this->validationHasFailed() == true) {\n return false;\n }\n }", "private function isRuleChecked(): bool\n {\n $res = true;\n foreach ($this->getRules() as $method => $rule) {\n if (is_array($rule)) {\n foreach ($rule as $r) {\n $res = $res && $this->checkRule($method, $r);\n }\n } else {\n $res = $res && $this->checkRule($method, $rule);\n }\n }\n return $res;\n }", "public function isValid() {\n\t\treturn $this->is_valid;\n\t}", "public function validate(): bool\n {\n $result = true;\n foreach ($this->validation_data as $rule_name => $verifiable_data) {\n if (array_key_exists($rule_name, self::$know_validated_rule)) {\n if (class_exists(self::$know_validated_rule[$rule_name])) {\n /** @var $class BaseRule */\n $class = new self::$know_validated_rule[$rule_name](array_pop($verifiable_data));\n if (!$class->check($this->object, $verifiable_data)) {\n $result = false;\n $this->errors[$rule_name] = $class->getErrors();\n }\n } else {\n throw new ValidationClassNotFoundException(\"Class \". self::$know_validated_rule[$rule_name] . \" not found!\");\n }\n } else {\n throw new ValidationRuleNotFoundException(\"Rule '$rule_name' not found!\");\n }\n }\n return $result;\n }", "public function validateRules();", "public function isValid()\n\t{\n\t\treturn $this->valid;\n\t}", "public function isValid()\n\t{\n\t\treturn $this->valid;\n\t}", "public function getIsValid(){\r\n\t\treturn $this->isValid;\r\n\t}", "public function isValid() : bool {\n\t\t\treturn $this->isValid;\n\t\t}", "protected function rule()\n {\n if (!key_exists('value', $this->admittedFields['Mobile']) && !key_exists('value', $this->admittedFields['Phone'])) {\n $this->setErrorMsg('At least mobile or phone number are required');\n\n return false;\n }\n\n return true;\n }", "public function is_valid()\n\t{\n\t\tif (!array_key_exists('errors', $this->vars)) $this->validate();\n\t\treturn (!count($this->get_var('errors', array())));\n\t}", "public function isValid() {\n return $this->isAccepted();\n }", "public function validate(){\r\n\t\t// make validation\r\n\t\t$res = Validator::validate( $this->value, $this->constraints );\r\n\t\tif ( !$res )\r\n\t\t\t$this->has_error = true;\r\n\r\n\t\treturn $res;\r\n\t}", "public function validate()\n {\n return true;\n }", "public function validate()\n {\n return true;\n }", "public function validate()\n {\n return true;\n }", "public function validate()\n {\n return true;\n }", "public function validate()\n {\n return true;\n }", "public function valid() : bool\n {\n return $this->errors() ? false : true;\n }", "public function fails()\n {\n foreach ($this->rules as $attribute => $attributeRules) {\n foreach ($attributeRules as $attributeRule) {\n try {\n $this->validateAttribute($attribute, $attributeRule);\n } catch (\\Exception $e) {\n $this->errorMessage = $e->getMessage();\n return true;\n }\n }\n }\n\n return false;\n }" ]
[ "0.81334066", "0.7997473", "0.79485583", "0.7918592", "0.784746", "0.78217846", "0.7802988", "0.7623451", "0.74828583", "0.7478735", "0.743374", "0.73729086", "0.7299565", "0.7276992", "0.7266255", "0.7217469", "0.7214538", "0.7207308", "0.72064745", "0.72039473", "0.719268", "0.7191055", "0.71809435", "0.7158272", "0.7119057", "0.71131194", "0.7095237", "0.70795494", "0.70647603", "0.7064667", "0.70500743", "0.70398307", "0.7037948", "0.7022792", "0.6997637", "0.69880205", "0.698312", "0.69576406", "0.69523114", "0.69370455", "0.6931051", "0.6931051", "0.6931051", "0.6931051", "0.69081396", "0.69081396", "0.6907309", "0.6907309", "0.6907309", "0.6907309", "0.6907309", "0.69070005", "0.69065565", "0.69037944", "0.69037944", "0.69037944", "0.69037944", "0.69037944", "0.68879706", "0.68522686", "0.68260473", "0.68227655", "0.6816698", "0.68160707", "0.6813041", "0.679922", "0.679455", "0.6793771", "0.6787952", "0.6783507", "0.67771196", "0.67771196", "0.67771196", "0.67771196", "0.67771196", "0.67769724", "0.67769724", "0.67769724", "0.67764467", "0.6775572", "0.6775466", "0.6775466", "0.67751765", "0.6765974", "0.67631", "0.67489654", "0.6748741", "0.6748741", "0.67415905", "0.67096704", "0.67085934", "0.6707805", "0.6706861", "0.67022085", "0.6700554", "0.6700554", "0.6700554", "0.6700554", "0.6700554", "0.6694787", "0.6687938" ]
0.0
-1
Get the validation error message.
public function message() { if(in_array(self::IS_EXIST_NUMBER,$this->code)){ return "le numero de telephone :attribute existe déja"; } elseif(in_array(self::IS_NOT_NUMERIC,$this->code)){ return "les champs de :attribute doit être numerique"; } else{ return "numero de telephone invalide"; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function message()\n {\n return 'The validation error message.';\n }", "public function message()\n {\n return 'The validation error message.';\n }", "public function message()\n {\n return 'The validation error message.';\n }", "public function message()\n {\n return 'The validation error message.';\n }", "public function message()\n {\n return 'The validation error message.';\n }", "public function message()\n {\n return 'The validation error message.';\n }", "public function message()\n {\n return 'The validation error messagess.';\n }", "public function getErrorMessage()\n {\n return $this->error_message;\n }", "public function getErrorMessage()\r\n {\r\n return $this->error_message;\r\n }", "public function get_error_message() {\n\t\treturn $this->error_message;\n\t}", "public function message()\n {\n return $this->errorText;\n }", "public function getMessage()\n {\n return $this->_error;\n }", "function getErrorMessage()\n\t{\n\t\t// Ah, we have a custom message, use that.\n\t\tif ($this->errorMessage) {\n\t\t\treturn $this->errorMessage;\n\t\t}\n\t\t\n\t\t// Field is required, but empty, so return a fill in this form message.\n\t\telse if ($this->required && $this->value == false) \n\t\t\treturn sprintf($this->getTranslationString(\"Please fill in the required '%s' field.\"), $this->label);\n\t\n\t\t// Have we got an empty error message? Create a default one\n\t\telse if (!$this->errorMessage) {\n\t\t\treturn sprintf($this->getTranslationString(\"There's a problem with value for '%s'.\"), $this->label);\n\t\t} \n\t}", "public function message()\n {\n return __(\"validation.{$this->error}\", ['attribute' => 'nomor sampel']);\n }", "public function getErrorMessage()\n {\n return $this->singleValue('//i:errorMessage');\n }", "public function getMessage()\n {\n return self::getMessageForError($this->value);\n }", "public function getMessage() {\n\n // Remove the 'validate_' prefix that GUMP adds to all broken rules.\n $key = str_replace('validate_', '', $this->rule);\n\n // Get the message template for this rule.\n $template = self::$messages[$key];\n\n // Inject our field label, and if this field has a parameter, inject that too.\n $message = preg_replace(array(\"/(%s)/\", \"/(%s)/\"), array($this->field->getLabel(), $this->parameter), $template, 1);\n\n // Return the message.\n return $message;\n }", "protected function getErrorMessage(): string\n\t{\n\t\tif($this->input !== null)\n\t\t{\n\t\t\t$errorMessage = $this->input->getErrorMessage();\n\t\t}\n\n\t\treturn $errorMessage ?? $this->defaultErrorMessage;\n\t}", "public function getErrorMessage()\n {\n // then re-apply the error code:\n if(($this->error_code !== 0) && empty($this->error_msg))\n {\n $this->setError($this->error_code);\n }\n return $this->error_msg;\n }", "public function message()\n {\n return $this->getError();\n }", "function get_error_message() {\n return $this->error_msg;\n }", "public function getErrorMessage() {\n return $this->errorMessage;\n }", "public function getErrorMessage()\n\t{\n\t\treturn $this->errorMessage;\n\t}", "public function getErrorMessage()\n {\n return $this->errorMessage;\n }", "public function getErrorMessage()\n {\n return $this->errorMessage;\n }", "public function getErrorMessage()\n {\n return $this->errorMessage;\n }", "public function getErrorMessage()\n {\n return $this->errorMessage;\n }", "public function getErrorMessage()\n {\n return $this->errorMessage;\n }", "public function getErrorMessage()\n {\n return $this->errorMessage;\n }", "public function getErrorMessage()\n {\n return $this->errorMessage;\n }", "public function message()\n {\n if ($this->error['type'] === 'custom') {\n return $this->error['message'];\n }\n\n $messages = null;\n\n if ($this->request) {\n $messages = $this->request->messages();\n }\n\n $message = $messages[\"{$this->error['attribute']}.check_file_{$this->error['type']}\"] ??\n trans(\"validation.check_file_{$this->error['type']}\");\n\n [$keys, $values] = Arr::divide($this->error['payload'] ?? []);\n\n $keys = \\array_map(function (string $key) {\n return \":{$key}\";\n }, $keys);\n\n return \\str_replace($keys, $values, $message);\n }", "public function message()\n {\n return $this->errorMsg;\n }", "public function getMessage()\n {\n return isset($this->data->failure_msg) ? $this->data->failure_msg : '';\n }", "function getMessage()\n {\n return ($this->error_message_prefix . $this->message);\n }", "public function message()\n {\n return $this->validationFailures;\n }", "public function message()\n {\n return $this->error_message;\n }", "public function getErrorMessage() : string\n {\n return $this->errorMessage;\n }", "public function message()\n {\n return $this->errorMessage;\n }", "public function message()\n {\n return $this->errorMessage;\n }", "public function getErrorMessage()\n\t{\n\t\treturn $this->_errorMessage;\n\t}", "public function getErrorMessage()\n {\n return $this->applyTemplate();\n }", "public function message()\n {\n return 'Invalid message mark up.';\n }", "public function getErrorMessage()\n {\n $errorMessages = $this->getErrorMessages();\n if (empty($errorMessages)) {\n return false;\n }\n return $errorMessages[0];\n }", "public function getErrMsg() {\n return $this->get(self::ERR_MSG);\n }", "public function getErrorMessage();", "public function getErrorMessage();", "public function getErrMsg()\n {\n return $this->get(self::ERRMSG);\n }", "public function getMessage(): string\n\t{\n\t\treturn $this->err->getMessage();\n\t}", "public function getErrorMessage(): string\n {\n if ($this->getSuccess()) {\n return '';\n }\n\n return (string) $this->errorMessage;\n }", "public function message(): string\n {\n return $this->errorMessage;\n }", "public function getErrorMessage() {\n return '';\n }", "public function errorMessage()\n {\n $errorMsg = '<strong>' . $this->getMessage() . \"</strong><br />\\n\";\n return $errorMsg;\n }", "public function getErrorMessage()\n {\n return $this->validator->errors()->all();\n }", "public function getMsgError() {\r\n return $this->msg_error;\r\n }", "public function message(): string\n {\n return $this->getValidationMessage(Str::snake(class_basename($this)), __('The :attribute size cannot exceed :max_size.', ['max_size' => $this->bytesToHuman($this->max_size)]));\n }", "protected function getMessage(\\Phalcon\\Validation $validator)\n {\n // get message\n $message = $this->getOption('message');\n if (! $message) {\n $message = $this->message;\n }\n return $message;\n }", "public function getMessage()\n {\n // check if any error message available.\n if (!is_null($this->_message)) {\n // return the message\n return $this->lang->line($this->_message) ? $this->lang->line($this->_message) : $this->_message;\n }\n\n // return nothing if previous condition does not apply\n return NULL;\n }", "public function errorMessage() {\n\t\t\treturn $this->strError; \n\t\t}", "public final function getLastErrorMsg() {\n return $this->lastErrorMsg;\n }", "public function getRuleError()\n {\n if(!isset($this->rules_objects_list[$this->table_name]))\n return '';\n\n //current table rules object\n $l_target = $this->rules_objects_list[$this->table_name];\n\n if($l_target->rules_error_flag)\n return $l_target->rules_error_message;\n\n return '';\n }", "public function message()\n {\n return \"Ошибочное значение\";\n }", "public function getErrorMessage(): string\n {\n static $errors = [\n UPLOAD_ERR_OK => 'No error found.',\n UPLOAD_ERR_INI_SIZE => 'The file \"%s\" exceeds your upload_max_filesize ini directive (limit is %d kb).',\n UPLOAD_ERR_FORM_SIZE => 'The file \"%s\" exceeds the upload limit defined in your form.',\n UPLOAD_ERR_PARTIAL => 'The file \"%s\" was only partially uploaded.',\n UPLOAD_ERR_NO_FILE => 'No file was uploaded.',\n UPLOAD_ERR_CANT_WRITE => 'The file \"%s\" could not be written on disk.',\n UPLOAD_ERR_NO_TMP_DIR => 'File could not be uploaded: missing temporary directory.',\n UPLOAD_ERR_EXTENSION => 'File upload was stopped by a PHP extension.',\n ];\n\n $errorCode = $this->error;\n $maxFilesize = $errorCode === UPLOAD_ERR_INI_SIZE ? self::getMaxFilesize() / 1024 : 0;\n $message = $errors[$errorCode] ?? 'The file \"%s\" was not uploaded due to an unknown error.';\n\n return sprintf($message, $this->getOriginalName(), $maxFilesize);\n }", "public function getErrMsg() {\n $errMsg = 'Error on line ' . $this->getLine() . ' in ' . $this->getFile()\n . '<br><b>Message: ' . $this->getMessage()\n . '</b><br>Exception Type: NoFormsFoundException';\n return $errMsg;\n }", "public function getErrorMessage(): ?string {\n\t\t// 1. a string with an error message (e.g. `{\"error\":{\"code\":404,\"errors\":\"invalid token\"},\"success\":false}`)\n\t\t// 2. an object (e.g. `{\"error\":{\"code\":120,\"errors\":{\"name\":\"payload\",\"reason\":\"required\"}},\"success\":false}`)\n\t\t//\n\t\t// Below is an attempt to make sense of such craziness.\n\t\t$error = $this->getValue('[error][errors]');\n\t\tif ($error === null) {\n\t\t\treturn null;\n\t\t}\n\n\t\tif (!is_array($error)) {\n\t\t\t$error = [\n\t\t\t\t'name' => 'generic',\n\t\t\t\t'reason' => $error,\n\t\t\t];\n\t\t}\n\n\t\treturn sprintf(\n\t\t\t'name=%s, reason=%s',\n\t\t\t(array_key_exists('name', $error) ? $error['name'] : 'missing'),\n\t\t\t(array_key_exists('reason', $error) ? $error['reason'] : 'missing')\n\t\t);\n\t}", "function getErrorMsg() {\n\t\treturn $this->errorMsg;\n\t}", "public function errorMessage()\n\t{\n\t\treturn $this->_source->errorMessage();\n\t}", "public function getMessage(): string\n {\n return $this->requireString('message');\n }", "public function getErrorMessage($input) {\n\t\treturn $input . ' is invalid.';\n\t}", "public function message()\n {\n return 'Invalid phone number format.';\n }", "public function getErrorMessage() {\n\t\tswitch( $this->error ) {\n\t\t\tcase TAN_NOT_FOUND : return \"Die TAN wurde nicht gefunden\";\n case REGISTRATION_USER_EXISTS : return \"Dieser Nutzer Existiert bereits\";\n\t\t}\n\t}", "public function message()\n {\n return $this->doorman->error;\n }", "public function message()\n {\n return trans('validation.custom.phone.error');\n }", "public function message()\n {\n return trans('validation.BTCValidation');\n //return trans('validation.uppercase');\n }", "public function getMessage(): string\n {\n return \"The $this->name field is not a valid date.\";\n }", "public final function last_error_message()\n {\n return isset($this->error) ? $this->error['message'] : '';\n }", "public function getError(): string\n {\n return $this->Error;\n }", "public function getErrorMessage()\n {\n $error = $this->_checkoutSession->getErrorMessage();\n return $error;\n }", "function error() {\n return $this->error_message;\n }", "public function getError(){\n if (empty($this->getErrorCode())) {\n return null;\n }\n return $this->getErrorCode().': '.$this->getErrorMessage();\n }", "public function getError(): string\n {\n return $this->error;\n }", "public function getErrorMessage():? string\n {\n return $this->errorMessage;\n }", "public function publicErrorMessage()\n\t{\n\t\t$errorMsg = $this->getMessage().' is not a valid E-Mail address.';\n\t\treturn $errorMsg;\n\t}", "public function message()\n {\n switch ($this->errorType) {\n case self::ERROR_TYPE_NUMERIC:\n $msg = 'Điện thoại phải là chữ số';\n break;\n case self::ERROR_TYPE_LENGTH:\n $msg = 'Điện thoại phải có độ dài từ 10 hoặc 11 số';\n break;\n default:\n $msg = 'Số điện thoại không đúng định dạng';\n break;\n }\n return $msg;\n }", "protected function getErrorFlashMessage() {\n\t\treturn $this->translate('tx_placements.error'.'.organization.'. $this->actionMethodName);\n\t }", "public function getFailedMessage()\n {\n if (array_key_exists(\"failedMessage\", $this->_propDict)) {\n return $this->_propDict[\"failedMessage\"];\n } else {\n return null;\n }\n }", "public function errorMessage() { return $this->errorMessage; }", "public function getErrorMessage()\n {\n return null;\n }", "public function errorMessage()\n {\n return $this->provider->errorMessage;\n }", "public function errorMessage()\n {\n return $this->error;\n }", "function errorMsg() {\r\n return \r\n $this->resultError;\r\n }", "public function message()\n {\n return 'Recaptcha validation failed.';\n }", "public function messages()\n {\n return VALIDATION_MESSAGE;\n }", "public function messages()\n {\n return VALIDATION_MESSAGE;\n }", "public function getValidationErrorMessages() {}", "public static function message()\n {\n return __('validation.translate_required');\n }", "public function getError() : string\r\n {\r\n return $this->strError;\r\n }", "public function message()\n {\n return 'The Phone Number does not match the expected format';\n }", "public function message()\n {\n return 'O Titulo de eleitor digitado é invalido';\n }", "public function getErrorText(){\n return $this->error;\n }", "public function getValidatedMessage(){\n $valid = $this->getIsValid();\n if(!is_null($valid)){\n if($valid === false) $key = 'error';\n else $key = 'success';\n return \"<p class=\\\"form_{$key}\\\">{$this->validatedMessage[$key]}</p>\";\n }\n return '';\n }", "public function message()\n {\n return 'Errores en plantilla<li>'.join('</li><li>',$this->invalid);\n }" ]
[ "0.83679116", "0.83679116", "0.83679116", "0.83679116", "0.83679116", "0.83679116", "0.82065135", "0.8093275", "0.8060233", "0.8029579", "0.8022873", "0.7996812", "0.79938406", "0.7957769", "0.7955049", "0.79473627", "0.7938429", "0.7912786", "0.78981614", "0.7885486", "0.7846325", "0.7826832", "0.78194255", "0.7807275", "0.7807275", "0.7807275", "0.7807275", "0.7807275", "0.7807275", "0.7807275", "0.7803787", "0.77906877", "0.77792245", "0.77762574", "0.77719617", "0.7764385", "0.77619165", "0.7699233", "0.7699233", "0.7689196", "0.767602", "0.7669801", "0.76623756", "0.7611276", "0.7592238", "0.7592238", "0.7587778", "0.7558104", "0.7554486", "0.75314003", "0.7518761", "0.7456861", "0.7431748", "0.740485", "0.7372783", "0.73457605", "0.73447704", "0.7323047", "0.73103714", "0.73101366", "0.7308467", "0.7305268", "0.72966224", "0.7261643", "0.72585565", "0.7251173", "0.72441006", "0.72347707", "0.72275597", "0.7225857", "0.7225002", "0.72183496", "0.7213247", "0.7209628", "0.7204326", "0.71905303", "0.7175378", "0.71749365", "0.7171591", "0.71690816", "0.71603215", "0.7157664", "0.7154236", "0.7152288", "0.7147944", "0.71423095", "0.7141196", "0.7135991", "0.71316427", "0.7131217", "0.71302956", "0.7126294", "0.7126294", "0.7120758", "0.71181005", "0.71103096", "0.71093357", "0.7102105", "0.709918", "0.7081677", "0.70759195" ]
0.0
-1
Display a listing of the resource.
public function index() { $ebook = Ebook::orderBy('created_at','desc')->get(); return view('admin.blog.ebook.index')->with('ebook',$ebook); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function indexAction()\n {\n $limit = $this->Request()->getParam('limit', 1000);\n $offset = $this->Request()->getParam('start', 0);\n $sort = $this->Request()->getParam('sort', array());\n $filter = $this->Request()->getParam('filter', array());\n\n $result = $this->resource->getList($offset, $limit, $filter, $sort);\n\n $this->View()->assign($result);\n $this->View()->assign('success', true);\n }", "public function listing();", "function index() {\n\t\t$this->show_list();\n\t}", "public function actionList() {\n $this->_getList();\n }", "public function listAction()\n {\n $model = $this->_getPhotoModel();\n $entries = $model->fetchEntries($this->_getParam('page', 1));\n\n $this->view->url = 'http://' . $this->_request->getHttpHost() . $this->_request->getBaseUrl(); \n $this->view->paginator = $entries;\n }", "public function index()\n {\n $items = Item::all();\n return ItemForShowResource::collection($items);\n }", "public function index()\n {\n return Resource::collection(($this->getModel())::paginate(10));\n }", "function index()\n\t{\n\t\t$this->_list();\n\t\t$this->display();\n\t}", "public function listingAction(){\n if (!LoginHelper::isAdmin()){\n Router::redirect('home', '<p class=\"alert alert-danger\">Unauthorized</p>');\n }\n $this->view->render('patient/list', Patient::all());\n }", "public function index()\n {\n //\n $list = $this->obj->all();\n\n return $this->render('index', compact('list'));\n }", "public function action_index()\n\t{\n\t\t$this->template->title = 'Resources';\n\t\t$this->view = View::factory('admin/resource/index');\n\t\t$this->template->scripts[] = 'media/js/jquery.tablesorter.min.js';\n\t\t$this->template->scripts[] = 'media/js/admin/resource.js';\n\t\t\n\t\t$resources = Sprig::factory('resource')->load(NULL, FALSE);\n\t\tif (!empty($resources))\n\t\t{\n\t\t\t$this->view->resources = $resources->as_array();\n\t\t}\n\t}", "function listing()\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->_instrumentoModel->getInstrumento();\n\t\t\t$this->_view->render('listing', '', '',$this->_sidebar_menu);\n\t\t}", "public function listAction()\n {\n $em = $this->getDoctrine()->getManager();\n \n $todos = $em->getRepository(Todo::class)->findAll();\n \n return $this->render('todo/index.html.twig', array(\n 'todos' => $todos,\n ));\n }", "public function index()\n\t{\n $this->authorize('list', Instance::class);\n\n\t\treturn $this->ok($this->repo->paginate($this->request->all()));\n\t}", "public function actionRestList() {\n\t $this->doRestList();\n\t}", "public function listing()\n\t{\n\t\t$hospitalID = $this->request->getSession()->read(\"hospital_id\") ? $this->request->getSession()->read(\"hospital_id\") : \"\";\n\t\t\n\t\t$patientMonitored = 1;\n\t\t$patientActive = 1;\n\t\t\n\t\t//GET ALL PATIENTS\n\t\t$patientsData = $this->Patients->allPatients($hospitalID,$patientMonitored,$patientActive);\n\t\t//GET ALL PATIENTS\n\t\t\n\t\t//echo \"<pre>\"; print_r($patientsData);die;\n\t\t$this->set(compact(\"patientsData\"));\n\t}", "public function listAction()\n {\n $htmlpage = '<!DOCTYPE html>\n<html>\n <head>\n <meta charset=\"UTF-8\">\n <title>todos list!</title>\n </head>\n <body>\n <h1>todos list</h1>\n <p>Here are all your todos:</p>\n <ul>';\n \n $em = $this->getDoctrine()->getManager();\n $todos = $em->getRepository(Todo::class)->findAll();\n foreach($todos as $todo) {\n $htmlpage .= '<li>\n <a href=\"/todo/'.$todo->getid().'\">'.$todo->getTitle().'</a></li>';\n }\n $htmlpage .= '</ul>';\n\n $htmlpage .= '</body></html>';\n \n return new Response(\n $htmlpage,\n Response::HTTP_OK,\n array('content-type' => 'text/html')\n );\n }", "public function index()\n {\n // Get Persons\n $person = Person::paginate(10);\n\n //Return collection of person as a resource\n return PersonResource::collection($person);\n }", "public function listAction() {\n\t\t$this->view->title = $this->translator->translate(\"Invoice list\");\n\t\t$this->view->description = $this->translator->translate(\"Here you can see all the invoices.\");\n\t\t$this->view->buttons = array(array(\"url\" => \"/admin/invoices/new/\", \"label\" => $this->translator->translate('New'), \"params\" => array('css' => null)));\r\n\t\t$this->datagrid->setConfig ( Invoices::grid() )->datagrid ();\n\t}", "public function listAll()\n\t{\n\t\t$this->render(self::PATH_VIEWS . '/list', [\n\t\t\t'pages' => $this->pagesDb->findAll('id', 'DESC'),\n\t\t]);\n\t}", "public function list()\n {\n // récupérer les données : toutes les catégories enregistrées\n $productList = Product::findAll();\n\n $this->show('product/list', [\n 'productList' => $productList\n ]);\n }", "public function index()\n {\n // CRUD -> Retrieve --> List\n // BREAD -> Browse Read Edit Add Delete\n // return Item::all();\n return view('list_items',compact('items'));\n }", "public function index()\n {\n // Get manufacturers\n $manufacturers = Manufacturer::orderBy('created_at', 'desc')->paginate(15);\n\n // Return collection of manufacturers as a resource\n return ManufacturerResource::collection($manufacturers);\n }", "public function index()\n {\n return ArtistResource::collection(Artist::orderBy('created_at', 'desc')->get());\n }", "public function indexAction() {\n\t\t$page = intval($this->getInput('page'));\n\t\t$perpage = $this->perpage;\n\t\t\n\t\tlist(,$files) = Lock_Service_FileType::getAllFileType();\n\t\t$data = array();\n\t\tforeach ($files as $key=>$value) {\n\t\t\t$data[$key]['id'] = $value['id'];\n\t\t\t$data[$key]['title'] = $value['name'];\n\t\t}\n\t\tlist($total, $filetype) = Lock_Service_FileType::getList($page, $perpage);\n\t\t$this->assign('filetype', $filetype);\n\t\t$this->assign('pager', Common::getPages($total, $page, $perpage, $this->actions['listUrl'].'/?'));\n\t\t$this->assign('data', json_encode($data));\n\t}", "public function listAction()\n {\n $qb = $this->getRepository()->queryAll();\n\n $view = new ImportListView;\n $view->imports = $qb->getQuery()->execute();\n\n return $this->templating->renderResponse('InfiniteImportBundle:Import:list.html.twig', array(\n 'data' => $view\n ));\n }", "public function index()\n\t{\n\t\t//Return model all()\n\t\t$instances = $this->decorator->getListingModels();\n\n\t\treturn View::make($this->listingView, array(\n\t\t\t'instances' => $instances,\n\t\t\t'controller' => get_class($this), \n\t\t\t'modelName' => class_basename(get_class($this->decorator->getModel())),\n\t\t\t'columns' => $this->getColumnsForInstances($instances),\n\t\t\t'editable' => $this->editable\n\t\t));\n\t}", "public function index()\n {\n return InfografiResources::collection(\n Infografi::orderBy('date', 'desc')->get()\n );\n }", "public function listAction()\n\t {\n\t\t\t$this->_forward('index');\n \n\t\t}", "public function index()\n {\n $this->list_view();\n }", "public function index()\n {\n $this->list_view();\n }", "public function index()\n {\n $this->list_view();\n }", "public function listAction()\n {\n $defaults = array(\n 'page' => null,\n 'order' => null,\n 'limit' => null,\n 'offset' => null,\n 'filter' => array(),\n );\n $body = $this->getRequest()->getBody();\n $options = $body + $defaults;\n\n // Process the options\n if (is_string($options['order'])) {\n $options['order'] = array_map('trim', explode(',', $options['order']));\n }\n if (is_string($options['page'])) {\n $options['page'] = (int)$options['page'];\n }\n if (is_string($options['limit'])) {\n $options['limit'] = (int)$options['limit'];\n }\n if (is_string($options['offset'])) {\n $options['offset'] = (int)$options['offset'];\n }\n $filter = $options['filter'];\n unset($options['filter']);\n\n $options = array_filter($options);\n\n return $this->getBinding()->find($filter, $options);\n }", "public function index()\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n /* Get the resources from the model */\n $resources = $this->resourcesList($this->model);\n\n /* Sets the view */\n if (view()->exists(\"admin.{$this->name}.index\")) {\n $view = \"admin.{$this->name}.index\";\n } else {\n $view = 'admin.includes.actions.index';\n }\n\n /* Display a listing of the resources */\n return view($view)\n ->with('resources', $resources)\n ->with('module', $this->module);\n }", "public function index()\n\t{\n\t\t$data['lists'] = $this->mdl_student->get_all();\n\t\t$this->template->set('title', 'Student Hostel List');\n\t\t$this->template->load('template', 'contents', 'student_hostel/student_hostel_list', $data);\n\t}", "public function index()\n {\n $modules = Module::all();\n return Resource::collection($modules);\n }", "public function index()\n {\n // List all resources from user entity\n $users = User::all();\n\n return $this->showAll($users);\n }", "public function index()\n {\n // Get todos\n $todos = Todo::orderBy('created_at', 'desc')->paginate(3);\n\n // Return collection of articles as a resource\n return TodoResource::collection($todos);\n }", "public function index()\n {\n return Resources::collection(Checking::paginate());\n }", "public function index()\n {\n return CourseListResource::collection(\n Course::query()->withoutGlobalScope('publish')\n ->latest()->paginate()\n );\n }", "public function index()\n {\n $cars = Car::paginate(15);\n return CarResource::collection($cars);\n }", "public function index()\n {\n // Get articles\n $articles = Article::orderBy('created_at', 'desc')->paginate(5);\n\n // Return collection of articles as a resource\n return ArticleResource::collection($articles);\n }", "public function index()\n {\n $authors = Author::paginate(10);\n\n return AuthorResource::collection($authors);\n }", "public function index()\n {\n //Get Books\n $books = Book::paginate(10);\n \n if ($books) {\n return (BookResource::collection($books))->additional([\n 'status_code' => 200,\n 'status' => 'success',\n ]);\n } else {\n return (BookResource::collection([]))->additional([\n 'status_code' => 200,\n 'status' => 'success',\n ]);\n }\n return view('index')->with('data', $books);\n }", "public function view(){\n\t\t$this->buildListing();\n\t}", "public function index()\n {\n $books = Book::latest()\n ->paginate(20);\n\n return BookResource::collection($books);\n }", "public function index()\n {\n $listing = Listing::orderBy('id', 'desc')->paginate(10);\n return view('listings.index')->withListings($listing);\n }", "public function listAction()\n {\n $this->_getSession()->setFormData([]);\n\n $this->_title($this->__('Training Cms'))\n ->_title($this->__('Pages'));\n\n $this->loadLayout();\n\n $this->_setActiveMenu('training_cms');\n $this->_addBreadcrumb($this->__('Training Cms'), $this->__('Training Cms'));\n $this->_addBreadcrumb($this->__('Pages'), $this->__('Pages'));\n\n $this->renderLayout();\n }", "public function index()\n {\n $services = $this->serviceRepository->paginate();\n\n return ServiceResource::collection($services);\n }", "public function index()\n {\n $resources = ResourceManagement::paginate(5);\n $users = User::get();\n\n return view('resources-mgmt/index', ['resources' => $resources, 'users' => $users]);\n }", "public function index()\n {\n $catalogs = Catalog::where('status', '=', Catalog::PUBLICADO)\n ->orderBy('id', 'DESC')->get();\n \n $data = CatalogResource::collection($catalogs);\n\n return [\n 'items' => $data,\n 'mensaje' => ''\n ];\n }", "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 $message = new Notice();\n $results = $message->getMsg4Admin();\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 }", "public function list()\n {\n try {\n return $this->success($this->service->list());\n } catch (\\Exception $exception) {\n return $this->error($exception->getMessage());\n }\n }", "public function index()\n {\n return $this->sendResponse(CrisisResource::collection(Crisis::paginate(10)), 'Data fetched successfully');\n }", "public function index()\n\t{\n\t\t$%Alias = new %Model();\n\t\t$params = array();\n\t\t\n\t\t$Paginator = new Paginator( $%Alias->findSize( $params ), $this->getLimit(), $this->getPage() );\n\t\t$this->getView()->set( '%Aliass', $%Alias->findList( $params, 'Id desc', $this->getOffset(), $this->getLimit() ) );\n\t\t$this->getView()->set( 'Paginator', $Paginator );\n\t\treturn $this->getView()->render();\n\t}", "public function listAction() {}", "public function index()\n {\n\n return RecipeResource::collection(Recipe::all());\n }", "public function index()\n {\n $this->indexPage('list-product', 'List Product');\n }", "public function listAction()\n {\t\n\t\t$this->removeSession();\n\t\t$this->verifySessionRights();\n\t\t$this->setActivity(\"List view\");\n $em = $this->getDoctrine()->getManager();\n $oRepClient = $em->getRepository('BoAdminBundle:Client');\n\t\t$nb_tc = $oRepClient->getTotal();\n\t\t//get page\n\t\t$page = $this->get('session')->get('page');\n\t\tif($page==null){\n\t\t\t$page=1;\n\t\t\t$this->get('session')->set('page',1);\n\t\t}\n\t\t//get number line per page\n\t\t$nb_cpp = $em->getRepository('BoAdminBundle:Param')->getParam(\"display_list_page_number\",1);\n\t\t$nb_pages = ceil($nb_tc/$nb_cpp);\n\t\t$offset = $page>0?($page-1) * $nb_cpp:0;\n\t\t$clients = $em->getRepository('BoAdminBundle:Client')->findBy(array(),array('id' => 'desc'),$nb_cpp,$offset);\n $form = $this->createForm('Bo\\AdminBundle\\Form\\ClientType', new Client());\n return $this->render('client/index.html.twig', array(\n 'clients' => $clients,\n\t\t\t'page' => $page, // forward current page to view,\n\t\t\t'nb_pages' => $nb_pages, //total number page,\n 'form' => $form->createView(),\n\t\t\t'total'=>$nb_tc, // record number.\n\t\t\t'nb_cpp' => $nb_cpp,// line's number to display\n\t\t\t'pm'=>\"contracts\",\n\t\t\t'sm'=>\"client\",\n ));\n }", "public function index()\n {\n return AcResource::collection(Ac::latest()->paginate()); //\n }", "public function executeList()\n {\n $this->setTemplate('list');\n }", "public function indexAction()\n {\n $books = Book::getAll();\n\n View::renderTemplate('Books/index.html', [\n 'books' => $books\n ]);\n }", "function listing() {\r\n\r\n }", "public function listar() {\n $rs = $this->model->listar();\n\n echo $this->toJson($rs);\n }", "public function index()\n {\n return BookResource::collection(Book::orderby('id')->get());\n }", "public function doRestList()\n {\n $this->outputHelper( \n 'Records Retrieved Successfully', \n $this->getModel()->with($this->nestedRelations)->filter($this->restFilter)->orderBy($this->restSort)->limit($this->restLimit)->offset($this->restOffset)->findAll(),\n $this->getModel()->with($this->nestedRelations)->filter($this->restFilter)->count()\n );\n\t}", "public function index()\n {\n $client = Client::paginate();\n return ClientResource::collection($client);\n }", "public function index()\n {\n return TagResource::collection(\n Tag::orderBy('name', 'ASC')->paginate(request('per_page', 10))\n );\n }", "public function _index(){\n\t $this->_list();\n\t}", "public function index()\n\t{\n\t\t$data['lists'] = $this->gallery_mdl->get_all();\n\t\t$this->template->set('title', 'Gallery');\n\t\t$this->template->render('template', 'list', $data);\n\t}", "function drush_restapi_list() {\n\n $resources = restapi_get_resources();\n $last_module = NULL;\n $rows = [\n [dt('Module'), dt('Path'), dt('Class')],\n ];\n\n foreach($resources as $resource) {\n if ($last_module != $resource->getModule()) {\n $module = $last_module = $resource->getModule();\n }\n else {\n $module = '';\n }\n $rows[] = [$module, $resource->getPath(), $resource->getClass()];\n }\n\n drush_print_table($rows, TRUE);\n drush_log(dt('Displaying !count total resources', [\n '!count' => count($resources),\n ]), 'ok');\n\n}", "public function index()\n {\n $this->booklist();\n }", "public function index()\n {\n //\n $accounts = accounts::paginate(15);\n\n //return the collection of employees as a resource\n return accountResource::collection($accounts);\n\n\n }", "public function index()\n {\n $items = Item::all();\n return view('items::list_items',compact('items'));\n }", "public function index()\n {\n // Get houses\n $houses = House::orderBy('created_at', 'desc')->paginate(self::PAGINATE);\n \n // Return collection of houses\n \n return HouseResource::collection($houses);\n }", "public function index()\n {\n $products = Product::paginate(6);\n return ProductResource::collection($products);\n }", "public function index() {\n $this->template->allFoundItems = Found::showAll();\n $this->template->display( 'index.html.php' );\n }", "public function indexAction() {\n $this->_forward('list');\n }", "public function index()\n {\n $data = Productcategory::paginate(10);\n\t\treturn ProductcategoryResource::Collection($data);\n }", "public function index()\n {\n return SongResource::collection(\\App\\Song::orderBy('created_at', 'desc')->get());\n }", "public function ListView()\n\t{\n\t\t\n\t\t// Requer permissão de acesso\n\t\t$this->RequirePermission(Usuario::$P_ADMIN,\n\t\t\t\t'SecureExample.LoginForm',\n\t\t\t\t'Autentique-se para acessar esta página',\n\t\t\t\t'Você não possui permissão para acessar essa página ou sua sessão expirou');\n\t\t\n\t\t//$usuario = Controller::GetCurrentUser();\n\t\t//$this->Assign('usuario',$usuario);\n\t\t$this->Render();\n\t}", "public function index () {\n permiss ( 'role.list' );\n\n $data = $this->entity\n ->orderBy('created_at', 'desc')->get();\n\n return new ModelResource($data);\n }", "public function showResources()\n {\n $resources = Resource::get();\n return view('resources', compact('resources'));\n }", "public function index()\n {\n //get articless\n $articles = Article::paginate(15);\n\n //Return collection of article has a resource\n return ArticleResource::collection($articles);\n\n }", "public function actionList() {\n header(\"Content-type: application/json\");\n $verb = $_SERVER[\"REQUEST_METHOD\"];\n\n if ($verb === 'GET') {\n echo \"{\\\"data\\\":\" . CJSON::encode(Donneur::model()->findAll()) . \"}\";\n } else if ($verb == 'POST') {\n if (Donneur::model()->exists('id' === $_POST['id'])) {\n $this->actionListUpdate($_POST);\n } else {\n $this->actionListPost();\n }\n } else if ($verb == 'DELETE') {\n $this->actionListDelete();\n }\n }", "public function list()\n {\n return $this->http->request(HttpMethods::GET, $this->endpoint);\n }", "public function indexAction(){\n $data = array(\n 'collection' => $this->model->getCollection(),\n \n ); \t\n return $this->getView($data);\n }", "public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $entities = $em->getRepository('DiverPriceLisrBundle:Items')->findAll();\n\n return $this->render('DiverPriceLisrBundle:Items:index.html.twig', array(\n 'entities' => $entities,\n ));\n }", "public function actionIndex()\n {\n $dataProvider = new ActiveDataProvider([\n 'query' => Slaves::find(),\n ]);\n\n return $this->render('index', [\n 'dataProvider' => $dataProvider,\n ]);\n }", "public function listAction() {\n\t\t// Recogemos el repositorio\n\t\t$repository = $this->getDoctrine() ->getRepository('AppBundle:Product');\n\t\n\t\t// Recuperamos todos los productos.\n\t\t$products = $repository->findAll();\n\t\t// Pasamos a la plantilla el aray products\n\t\treturn $this->render('product/listActionProduct.html.twig', array( 'products' => $products));\n\t\n\t}", "public function listAction()\n\t {\n\t\t$model = $this->_getModel();\n\t\t$result = $model->getLayouts();\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\t\t\n\t\t$this->view->page = $page;\n\t }", "public function actionList()\n {\n // get model\n $model = new $this->_model('search');\n $model->unsetAttributes();\n\n // set filter\n if (isset($_GET[$this->_model])) {\n $model->attributes = $_GET[$this->_model];\n }\n $model->u_cms_album_id = $_GET['album'];\n\n // search\n $dataProvider = $model->search(Yii::app()->language);\n // sort\n $sort = $dataProvider->getSort();\n // route\n $sort->route = $this->id . '/list';\n\n // pagination parameters\n $pagination = $dataProvider->getPagination();\n $pagination->route = $this->id . '/list';\n $pagination->pageSize = UInterfaceSetting::model()->getSettings($this->id . ':' . $this->module->id, Yii::app()->user->id)->page_size;\n $pagination->itemCount = $dataProvider->totalItemCount;\n\n // datas\n $datas = $dataProvider->getData();\n\n // related datas\n $relatedDatas = $this->_loadRelatedData();\n\n // template\n $template = isset($_REQUEST['partial']) ? 'list/_table' : 'list/main';\n\n $jsonParams = array();\n if (Yii::app()->request->isAjaxRequest) {\n // filters\n $filtersDatas = array();\n if (isset($_GET[$this->_model])) {\n $filtersDatas[$this->_model] = $_GET[$this->_model];\n }\n if (isset($_GET[$sort->sortVar])) {\n $filtersDatas[$sort->sortVar] = $_GET[$sort->sortVar];\n }\n\n $jsonParams = array(\n 'filters' => http_build_query($filtersDatas)\n );\n }\n\n $this->dynamicRender(\n $template,\n array(\n 'dataView' => new $this->crudComponents['listDataView'](\n $datas, $relatedDatas, $model, $sort, $pagination, $this\n )\n ),\n $jsonParams\n );\n }", "public function index()\n {\n return view('listings.index')->with('listings', Listing::all());\n }", "public function get_index()\n\t{\n\t\t$pages = Page::recent_available()->paginate(30);\n\t\t$table = Cello\\Presenter\\Page::table($pages);\n\t\t$data = array(\n\t\t\t'eloquent' => $pages,\n\t\t\t'table' => $table,\n\t\t);\n\n\t\tSite::set('title', __('cello::title.pages.list'));\n\n\t\treturn View::make('cello::api.resources.index', $data);\n\t}", "public function index()\n {\n return ProductResource::collection(Product::latest()->paginate(10));\n }", "public function index()\n {\n $category = GalleryCategory::paginate(15);\n\n // return collection of category as a resource.\n return Resource::collection($category);\n }", "public function index()\n {\n //\n $news = News::latest()->paginate(18);\n\n return NewsResource::collection($news);\n }", "public function indexAction() {\n\t\t$list_info = Zend_Registry::get('list_info');\n if (!Engine_Api::_()->core()->hasSubject('list_listing')) {\n return $this->setNoRender();\n }\n \n $this->view->expiry_setting = Engine_Api::_()->list()->expirySettings();\n\n //GET SUBJECT\n $this->view->list = $list = Engine_Api::_()->core()->getSubject('list_listing');\n\n\t\t//GET CATEGORY TABLE\n\t\t$this->view->tableCategory = Engine_Api::_()->getDbTable('categories', 'list');\n\n //GET CATEGORIES NAME\n\t\t$this->view->category_name = $this->view->subcategory_name = $this->view->subsubcategory_name = '';\n\n\t\tif(!empty($list->category_id)) {\n\t\t\tif($this->view->tableCategory->getCategory($list->category_id))\n\t\t\t$this->view->category_name = $this->view->tableCategory->getCategory($list->category_id)->category_name;\n\n\t\t\tif(!empty($list->subcategory_id)) {\n\t\t\t\tif($this->view->tableCategory->getCategory($list->subcategory_id))\n\t\t\t\t$this->view->subcategory_name = $this->view->tableCategory->getCategory($list->subcategory_id)->category_name;\n\n\t\t\t\tif(!empty($list->subsubcategory_id)) {\n\t\t\t\t\tif($this->view->tableCategory->getCategory($list->subsubcategory_id))\n\t\t\t\t\t$this->view->subsubcategory_name = $this->view->tableCategory->getCategory($list->subsubcategory_id)->category_name;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n //GET LISTING TAGS\n $this->view->listTags = $list->tags()->getTagMaps();\n\n\t\t//GET OTHER DETAILS\n\t\t$this->view->list_description = Zend_Registry::get('list_descriptions');\n $this->view->addHelperPath(APPLICATION_PATH . '/application/modules/Fields/View/Helper', 'Fields_View_Helper');\n $this->view->fieldStructure = Engine_Api::_()->fields()->getFieldsStructurePartial($list);\n\t\tif(empty($list_info)){ return $this->setNoRender(); }\n }", "public function index()\n {\n return $this->service->fetchResources(Author::class, 'authors');\n }", "public function index()\n {\n return view('admin.resources.index');\n }", "public function doRestList() {\n\t\t$this->outputHelper ( 'Collections Retrieved Successfully', $this->getModel ()->with ( $this->nestedRelations )->filter ( $this->restFilter )->orderBy ( $this->restSort )->limit ( $this->restLimit )->offset ( $this->restOffset )->findAll (), $this->getModel ()->with ( $this->nestedRelations )->filter ( $this->restFilter )->count () );\n\t}" ]
[ "0.7446777", "0.736227", "0.73005503", "0.72478926", "0.71631265", "0.71489686", "0.7131636", "0.7105969", "0.71029514", "0.7101372", "0.70508176", "0.6995128", "0.69890636", "0.6934895", "0.6900203", "0.6899281", "0.6891734", "0.6887235", "0.68670005", "0.6849741", "0.6830523", "0.6802689", "0.6797", "0.67957735", "0.67871135", "0.6760129", "0.67427456", "0.6730486", "0.67272323", "0.67255723", "0.67255723", "0.67255723", "0.67177945", "0.6707866", "0.6706713", "0.6704375", "0.6664782", "0.6662871", "0.6660302", "0.6659404", "0.6656656", "0.6653517", "0.6647965", "0.6620322", "0.66185474", "0.6618499", "0.6606105", "0.6600617", "0.65996987", "0.6594775", "0.6587389", "0.6585109", "0.6581641", "0.6581017", "0.6577157", "0.65747666", "0.6572513", "0.65721947", "0.6570553", "0.65646994", "0.6563556", "0.6554194", "0.65529937", "0.65460825", "0.65368485", "0.653429", "0.65328294", "0.6526759", "0.6526695", "0.6526284", "0.65191334", "0.65183175", "0.65174305", "0.651703", "0.65141153", "0.6507088", "0.65061647", "0.6504046", "0.64942145", "0.6491893", "0.64883405", "0.6486392", "0.6485077", "0.64846045", "0.6478858", "0.64756656", "0.64726377", "0.6471126", "0.64701074", "0.6467418", "0.6462195", "0.64618355", "0.6459199", "0.6457831", "0.6454631", "0.64533997", "0.6451915", "0.6450861", "0.6449301", "0.64492667", "0.64469045" ]
0.0
-1
Show the form for creating a new resource.
public function create() { return view('admin.blog.ebook.create'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function create()\n {\n return $this->showForm('create');\n }", "public function create()\n {\n return $this->showForm('create');\n }", "public function create()\n {\n return view('admin.resources.create');\n }", "public function create(){\n\n return view('resource.create');\n }", "public function create()\n\t{\n\t\treturn $this->showForm('create');\n\t}", "public function create()\n {\n return \"Display a form for creating a new catalogue\";\n }", "public function newAction()\n {\n $entity = new Resource();\n $current = $this->get('security.context')->getToken()->getUser();\n $entity->setMember($current);\n $form = $this->createCreateForm($entity);\n\n return array(\n 'nav_active'=>'admin_resource',\n 'entity' => $entity,\n 'form' => $form->createView(),\n );\n }", "public function create()\n {\n return view ('forms.create');\n }", "public function create ()\n {\n return view('forms.create');\n }", "public function create()\n\t{\n\t\treturn view('faith.form');\n\t}", "public function create(NebulaResource $resource): View\n {\n $this->authorize('create', $resource->model());\n\n return view('nebula::resources.create', [\n 'resource' => $resource,\n ]);\n }", "public function create()\n {\n return view(\"request_form.form\");\n }", "public function create()\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n /* Sets the view */\n if (view()->exists(\"admin.{$this->name}.create\")) {\n $view = \"admin.{$this->name}.create\";\n } else {\n $view = 'admin.includes.actions.create';\n }\n\n /* Show the form for creating a new resource. */\n return view($view)\n ->with('name', $this->name);\n }", "public function newAction()\n\t{\n\t\t$this->render( View::make( 'schools/form' , array(\n\t\t\t'title' => 'Ajouter une nouvelle &eacute;cole'\n\t\t) ) );\n\t}", "public function create()\n {\n return view($this->forms . '.create');\n }", "public function create()\n {\n return view('restful.add');\n }", "public function create()\n {\n $resource = (new AclResource())->AclResource;\n\n //dd($resource);\n return view('Admin.acl.role.form', [\n 'resource' => $resource\n ]);\n }", "public function create()\n {\n return view('admin.createform');\n }", "public function create()\n {\n return view('admin.forms.create');\n }", "public function create()\n {\n return view('backend.student.form');\n }", "public function newAction()\n {\n $breadcrumbs = $this->get(\"white_october_breadcrumbs\");\n $breadcrumbs->addItem('Inicio', $this->get('router')->generate('admin.homepage'));\n $breadcrumbs->addItem($this->entityDescription, $this->get(\"router\")->generate(\"admin.$this->entityName.index\"));\n $breadcrumbs->addItem('Nuevo');\n\n $entity = $this->getManager()->create();\n $form = $this->getForm($entity);\n\n return $this->render('AdminBundle:Default:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n 'metadata' => $this->getMetadata()\n ));\n }", "public function create()\n {\n return view('client.form');\n }", "public function create()\n {\n // Nos regresa la vista del formulario\n return view('project.form');\n }", "public function create()\n {\n return view('Form');\n }", "public function newAction(){\n \n $entity = new Resourceperson();\n $form = $this->createAddForm($entity);\n\n \n return $this->render('ABCRspBundle:rsp:add.html.twig',array('entity'=>$entity,'form'=> $form->createView()));\n }", "public function createForm()\n\t{\n\t\treturn view('post.new');\n\t}", "public function create()\n {\n return view('admin.form.create', ['form' => new Form]);\n }", "public function create()\n {\n return view('form');\n }", "public function create()\n {\n return view('form');\n }", "public function create()\n {\n return view('form');\n }", "public function create()\n {\n $title = $this->title;\n $subtitle = \"Adicionar cliente\";\n\n return view('admin.clients.form', compact('title', 'subtitle'));\n }", "public function create()\n {\n return view('backend.schoolboard.addform');\n }", "public function create()\n\t{\n\t\treturn view('info.forms.createInfo');\n\t}", "public function create()\n {\n //\n return view('form');\n }", "public function create()\n {\n return view('rests.create');\n }", "public function create()\n {\n return $this->showForm();\n }", "public function create()\n {\n return $this->showForm();\n }", "public function create()\n {\n return view(\"Add\");\n }", "public function create(){\n return view('form.create');\n }", "public function create()\n {\n // Show the page\n return view('admin.producer.create_edit');\n }", "public function create()\n {\n\n return view('control panel.student.add');\n\n }", "public function newAction() {\n\t\t\n\t\t$this->view->form = $this->getForm ( \"/admin/invoices/process\" );\n\t\t$this->view->title = $this->translator->translate(\"New Invoice\");\n\t\t$this->view->description = $this->translator->translate(\"Create a new invoice using this form.\");\n\t\t$this->view->buttons = array(array(\"url\" => \"#\", \"label\" => $this->translator->translate('Save'), \"params\" => array('css' => null,'id' => 'submit')),\r\n\t\t\t\t\t\t\t array(\"url\" => \"/admin/invoices/list\", \"label\" => $this->translator->translate('List'), \"params\" => array('css' => null)));\n\t\t$this->render ( 'applicantform' );\n\t}", "public function create()\n {\n $data['action'] = 'pengiriman.store';\n return view('pengiriman.form', $data);\n }", "public function create()\n {\n return $this->cView(\"form\");\n }", "public function newAction()\n {\n // Création de l'entité et du formulaire.\n $client = new Client();\n $formulaire = $this->createForm(new ClientType(), $client);\n \n \n \n // Génération de la vue.\n return $this->render('KemistraMainBundle:Client:new.html.twig',\n array('formulaire' => $formulaire->createView()));\n }", "public function create()\n {\n return view(\"dresses.form\");\n }", "public function create()\n\t{\n\t\treturn View::make('new_entry');\n\t}", "public function createAction()\n {\n// $this->view->form = $form;\n }", "public function create()\n {\n return view('bank_account.form', ['mode' => 'create']);\n }", "public function create()\n {\n return view('fish.form');\n }", "public function create()\n {\n return view('users.forms.create');\n }", "public function create()\n {\n $this->setFormFields($this->getCreateFormFields());\n $form = $this->getCreateForm();\n\n return view($this->getViewName('create'), [\n 'crudSlug' => $this->slug,\n 'form' => $form,\n ]);\n }", "public function create()\n\t{\n\t\treturn view('admin.estadoflete.new');\n\t}", "public function create()\n {\n $person = new Person;\n return view('contents.personform')->with(compact('person') );\n }", "public function createAction(){\n \t$this->view->placeholder('title')->set('Create');\n \t$this->_forward('form');\n }", "public function create()\n {\n Gate::authorize('app.products.create');\n\n return view('backend.products.form');\n }", "public function create()\n {\n return view('essentials::create');\n }", "public function create()\n {\n return view('student.add');\n }", "public function create()\n\t{\n\t\treturn view('loisier/create');\n\t}", "public function create()\n {\n return view('url.form');\n }", "public function newAction()\n {\n $entity = new Facture();\n $factureType = new FactureType();\n\t\t$factureType->setUser($this->get('security.context')->getToken()->getUser());\n $form = $this->createForm($factureType, $entity);\n\n return $this->render('chevPensionBundle:Facture:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }", "public function newAction()\n {\n $entity = new Chofer();\n $form = $this->createForm(new ChoferType(), $entity, ['user' => $this->getUser()]);\n\n return $this->render('ChoferesBundle:Chofer:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n 'css_active' => 'chofer',\n ));\n }", "public function create()\n\t{\n\t\treturn View::make('crebos.create');\n\t}", "public function create() : View\n {\n $fieldset = $this->menuFieldset();\n\n return $this->view('create', [\n 'title' => trans('addons.Aardwolf::titles.create'),\n 'data' => [],\n 'fieldset' => $fieldset->toPublishArray(),\n 'suggestions' => [],\n 'submitUrl' => route('aardwolf.postCreate')\n ]);\n }", "public function create()\n {\n return view('libro.create');\n }", "public function create()\n {\n return view('libro.create');\n }", "public function newAction()\n {\n $entity = new Species();\n $form = $this->createForm(new SpeciesType(), $entity);\n\n return $this->render('InfectBackendBundle:Species:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }", "public function create()\n {\n return view('crud/add'); }", "public function create()\n\t{\n\t\treturn View::make('supplier.create');\n\t}", "public function newAction()\n {\n $entity = new Company();\n $form = $this->createForm(new CompanyType(), $entity);\n\n return $this->render('SiteSavalizeBundle:Company:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }", "public function create()\n {\n return view(\"List.form\");\n }", "public function index_onCreateForm()\n\t{\n\t\tparent::create();\n\t\treturn $this->makePartial('create');\n\t}", "public function create()\n {\n //load create form\n return view('products.create');\n }", "public function create()\n {\n return view('article.addform');\n }", "public function create()\n {\n // Mengarahkan ke halaman form\n return view('buku.form');\n }", "public function create()\n\t{\n\t\t// load the create form (app/views/material/create.blade.php)\n\t\t$this->layout->content = View::make('material.create');\n\t}", "public function create()\n {\n return view('saldo.form');\n }", "public function create()\n\t\t{\n\t\t\treturn view('kuesioner.create');\n\t\t}", "public function view_create_questioner_form() {\n \t// show all questioner\n \t// send questioner to form\n \treturn view(\"create_questioner\");\n }", "public function newAction() {\n $entity = new Question();\n $form = $this->createCreateForm($entity);\n\n return $this->render('CdlrcodeBundle:Question:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }", "public function create()\n {\n $data['companies'] = Company::select('id', 'name')->where('status', 1)->orderBy('id', 'desc')->get();\n return view('admin.outlet.outlet_form', $data);\n }", "public function create()\n {\n return view('admin.inverty.add');\n }", "public function create()\n {\n return view('Libro.create');\n }", "public function create()\n {\n $title = trans('entry_mode.new');\n return view('layouts.create', compact('title'));\n }", "public function create()\n {\n $breadcrumb='car.create';\n return view('admin.partials.cars.form', compact('breadcrumb'));\n }", "public function create()\n {\n return view(\"familiasPrograma.create\");\n }", "public function create()\n {\n return view('admin.car.create');\n }", "public function create()\n {\n return view('admin.car.create');\n }", "public function create()\n\t{\n\t\treturn View::make('perusahaans.create');\n\t}", "public function create()\n {\n return view(\"create\");\n }", "public function create()\n\t{\n //echo 'show form';\n\t\treturn View::make('gaans.create');\n\t}", "public function create()\n {\n $title = trans('dormitorybed.new');\n $this->generateParams();\n\n return view('layouts.create', compact('title'));\n }", "public function create()\n {\n return view('forming');\n }", "public function formNew() {\n $this->data->options = array(\n 'RJ' => 'Rio de Janeiro',\n 'MG' => 'Minas Gerais',\n 'SP' => 'São Paulo',\n 'ES' => 'Espírito Santo',\n 'BA' => 'Bahia',\n 'RS' => 'Rio Grande do Sul'\n );\n $this->data->action = \"@exemplos/pessoa/save\";\n $this->render();\n }", "public function create()\n {\n \t\n \treturn view('supplies.create');\n\n }", "public function createAction()\n {\n if ($form = $this->processForm()) {\n $this->setPageTitle(sprintf($this->_('New %s...'), $this->getTopic()));\n $this->html[] = $form;\n }\n }", "public function create()\n {\n $page_title = \"Add New\";\n return view($this->path.'create', compact('page_title'));\n }", "public function create()\n {\n // not sure what to do with the form since im\n // using ame partial for both create and edit\n return view('plants.create')->with('plant', new Plant);\n }", "public function create() {\n\t\t$title = 'Create | Show';\n\n\t\treturn view('admin.show.create', compact('title'));\n\t}", "public function create()\n {\n return view('student::students.student.create');\n }", "public function newAction(){\n\t\t$entity = new Reserva();\n\t\t$form = $this->createCreateForm($entity);\n\n\t\treturn $this->render('LIHotelBundle:Reserva:new.html.twig', array(\n\t\t\t'entity' => $entity,\n\t\t\t'form' => $form->createView(),\n\t\t));\n\t}" ]
[ "0.75948673", "0.75948673", "0.75863165", "0.7577412", "0.75727344", "0.7500887", "0.7434847", "0.7433956", "0.73892003", "0.73531085", "0.73364776", "0.73125", "0.7296102", "0.7281891", "0.72741455", "0.72424185", "0.7229325", "0.7226713", "0.7187349", "0.7179176", "0.7174283", "0.7150356", "0.71444064", "0.71442676", "0.713498", "0.71283126", "0.7123691", "0.71158516", "0.71158516", "0.71158516", "0.7112176", "0.7094388", "0.7085711", "0.708025", "0.70800644", "0.70571953", "0.70571953", "0.70556754", "0.70396435", "0.7039549", "0.7036275", "0.703468", "0.70305896", "0.7027638", "0.70265305", "0.70199823", "0.7018007", "0.7004984", "0.7003889", "0.7000935", "0.69973785", "0.6994679", "0.6993764", "0.6989918", "0.6986989", "0.6966502", "0.69656384", "0.69564354", "0.69518244", "0.6951109", "0.6947306", "0.69444615", "0.69423944", "0.6941156", "0.6937871", "0.6937871", "0.6936686", "0.69345254", "0.69318026", "0.692827", "0.69263744", "0.69242257", "0.6918349", "0.6915889", "0.6912884", "0.691146", "0.69103104", "0.69085974", "0.69040126", "0.69014287", "0.69012105", "0.6900397", "0.68951064", "0.6893521", "0.68932164", "0.6891899", "0.6891616", "0.6891616", "0.6889246", "0.68880934", "0.6887128", "0.6884732", "0.68822503", "0.68809193", "0.6875949", "0.68739206", "0.68739134", "0.6870358", "0.6869779", "0.68696856", "0.686877" ]
0.0
-1
Store a newly created resource in storage.
public function store(Request $request) { $this->validate($request,[ 'file' => 'required' ]); $ebook = new Ebook; if ($request->hasFile('file')) { $file = $request->file; $new_name = $file->getClientOriginalName(); $file->move('uploads/file',$new_name); $ebook->file = $new_name; } $ebook->save(); Session::flash('success','Successfully Added'); return redirect()->route('ebook.index'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function store($data, Resource $resource);", "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 }", "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 }", "public function createStorage();", "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 }", "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 }", "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 }", "function storeAndNew() {\n $this->store();\n }", "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 }", "public function store()\n {\n if (!$this->id) { // Insert\n $this->insertObject();\n } else { // Update\n $this->updateObject();\n }\n }", "public function store()\n\t{\n\t\t\n\t\t//\n\t}", "public function store()\r\n\t{\r\n\t\t//\r\n\t}", "public function store()\r\n\t{\r\n\t\t//\r\n\t}", "public function store()\r\n\t{\r\n\t\t//\r\n\t}", "public function store(Request $request)\n {\n $request->validate([\n 'name' => 'required',\n 'file' => 'required|mimes:jpg,jpeg,png,doc,docx,pdf,ppt,txt',\n 'description' => 'nullable|string',\n ]);\n\n $resource = Resource::create($request->all());\n\n if ( $request->hasFile('file') ) {\n $resourceFile = 'resource-'.time().'.'.$request->file('file')->extension();\n $request->file->storeAs('resources', $resourceFile);\n $resource->file = $resourceFile;\n $resource->save();\n }\n\n if ( $request->submit == 'Save' ) {\n return redirect()->route('admin.resources.index')->with('success','Resource Successfully Uploaded');\n } else {\n return redirect()->route('admin.resources.create')->with('success','Resource Successfully Uploaded');\n }\n }", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}" ]
[ "0.72857565", "0.714571", "0.71328056", "0.66390204", "0.6620437", "0.6567189", "0.6526738", "0.65074694", "0.64491314", "0.63734114", "0.6370837", "0.63628685", "0.63628685", "0.63628685", "0.6342026", "0.63394964", "0.63394964", "0.63394964", "0.63394964", "0.63394964", "0.63394964", "0.63394964", "0.63394964", "0.63394964", "0.63394964", "0.63394964", "0.63394964", "0.63394964", "0.63394964", "0.63394964", "0.63394964", "0.63394964", "0.63394964", "0.63394964", "0.63394964", "0.63394964", "0.63394964", "0.63394964", "0.63394964", "0.63394964", "0.63394964", "0.63394964", "0.63394964", "0.63394964", "0.63394964", "0.63394964", "0.63394964", "0.63394964", "0.63394964", "0.63394964", "0.63394964", "0.63394964", "0.63394964", "0.63394964", "0.63394964", "0.63394964", "0.63394964", "0.63394964", "0.63394964", "0.63394964", "0.63394964", "0.63394964", "0.63394964", "0.63394964", "0.63394964", "0.63394964", "0.63394964", "0.63394964", "0.63394964", "0.63394964", "0.63394964", "0.63394964", "0.63394964", "0.63394964", "0.63394964", "0.63394964", "0.63394964", "0.63394964", "0.63394964", "0.63394964", "0.63394964", "0.63394964", "0.63394964", "0.63394964", "0.63394964", "0.63394964", "0.63394964", "0.63394964", "0.63394964", "0.63394964", "0.63394964", "0.63394964", "0.63394964", "0.63394964", "0.63394964", "0.63394964", "0.63394964", "0.63394964", "0.63394964", "0.63394964", "0.63394964" ]
0.0
-1
Display the specified resource.
public function show($id) { // }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function show(Resource $resource)\n {\n // not available for now\n }", "public function show(Resource $resource)\n {\n //\n }", "function Display($resource_name, $cache_id = null, $compile_id = null)\n {\n $this->_smarty->display($resource_name, $cache_id, $compile_id);\n }", "private function showResourceable($resourceable)\n {\n save_resource_url();\n\n return $this->view('resources.create_edit')\n ->with('resource', $resourceable)\n ->with('photos', $resourceable->photos)\n ->with('videos', $resourceable->videos)\n ->with('documents', $resourceable->documents);\n }", "function display($resource_name, $cache_id = null, $compile_id = null) {\n\t\t$this->_getResourceInfo($resource_name); // Saves resource info to a Smarty class var for debugging\n\t\t$_t3_fetch_result = $this->fetch($resource_name, tx_smarty_div::getCacheID($cache_id), $compile_id);\n if ($this->debugging) { // Debugging will have been evaluated in fetch\n require_once(SMARTY_CORE_DIR . 'core.display_debug_console.php');\n $_t3_fetch_result .= smarty_core_display_debug_console(array(), $this);\n }\n\t\treturn $_t3_fetch_result;\n\t}", "public function show(ResourceSubject $resourceSubject)\n {\n //\n }", "public function show(ResourceManagement $resourcesManagement)\n {\n //\n }", "public function viewEditResources()\n {\n $database = new Database();\n $id = $this->_params['id'];\n\n $resource = $database->getResourceById($id);\n\n $availableResource = new Resource($resource['ResourceID'], $resource['ResourceName'], $resource['Description']\n , $resource['ContactName'] , $resource['ContactEmail'] , $resource['ContactPhone'] ,\n $resource['Link'], $resource['active']);\n $this->_f3->set('Resource', $availableResource);\n\n echo Template::instance()->render('view/include/head.php');\n echo Template::instance()->render('view/include/top-nav.php');\n echo Template::instance()->render('view/edit-resources.php');\n echo Template::instance()->render('view/include/footer.php');\n }", "public function retrieve(Resource $resource);", "public function showResource($resouceable, $id)\n {\n $model_name = str_replace('-', ' ',ucwords($resouceable));\n $model_name = str_replace(' ', '',ucwords($model_name));\n\n $resource_type = 'App\\Models\\\\'.$model_name;\n $model = app($resource_type);\n $model = $model->find($id);\n\n return $this->showResourceable($model);\n }", "public function showAction(Ressource $ressource)\n {\n $deleteForm = $this->createDeleteForm($ressource);\n\n return $this->render('ressource/show.html.twig', array(\n 'ressource' => $ressource,\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "public function show(Dispenser $dispenser)\n {\n //\n }", "public function show($id)\n {\n $resource = Resource::find($id);\n dd($resource);\n }", "public function displayAction() {\n\t\tif(is_numeric($this->req_id)) {\n\t\t\tAPI::DEBUG(\"[DefaultController::displayAction()] Getting \" . $this->req_id, 1);\n\t\t\t$this->_view->data['info'] = $this->_model->get($this->req_id);\n\t\t\t$this->_view->data['action'] = 'edit';\n\n\t\t} else {\n\t\t\t$this->_view->data['action'] = 'new';\n\t\t}\n\t\t// auto call the hooks for this module/action\n\t\terror_log(\"Should Call: \" . $this->module .\"/\".$this->action.\"/\".\"controller.php\");\n\t\tAPI::callHooks($this->module, $this->action, 'controller', $this);\n\n\t\t$this->addModuleTemplate($this->module, 'display');\n\n\t}", "public function show(NebulaResource $resource, $item): View\n {\n $this->authorize('view', $item);\n\n return view('nebula::resources.show', [\n 'resource' => $resource,\n 'item' => $item,\n ]);\n }", "public function resource(string $resource, string $controller): void\n {\n $base = $this->plural($resource);\n $entity = '/{'.$resource.'}';\n\n $this->app->get($base, $controller.'@index');\n $this->app->post($base, $controller.'@store');\n $this->app->get($base.$entity, $controller.'@show');\n $this->app->patch($base.$entity, $controller.'@update');\n $this->app->delete($base.$entity, $controller.'@destroy');\n }", "function displayCustom($resource_name, $cache_id = null, $compile_id = null)\n\t{\n\t return $this->display(DotbAutoLoader::existingCustomOne($resource_name), $cache_id, $compile_id);\n\t}", "public function show($id)\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n /* Get the specified resource */\n $resource = $this->model::findOrFail($id);\n\n /* Sets the view */\n if (view()->exists(\"admin.{$this->name}.show\")) {\n $view = \"admin.{$this->name}.show\";\n } else {\n $view = 'admin.includes.actions.show';\n }\n\n /* Displays the specified resource page */\n return view($view)\n ->with('resource', $resource)\n ->with('name', $this->name);\n }", "public function show($id)\n {\n $currentUser = JWTAuth::parseToken()->authenticate();\n $rules = [\n 'id' => 'required|integer'\n ];\n\n $validator = Validator::make(['id' => $id], $rules);\n if ($validator->fails()) {\n return APIHandler::response(0, $validator->errors(), 400);\n }\n $resource = $this->resourceRepository->fetchResource($id);\n $this->resourceRepository->storeView($id, $currentUser['id']);\n\n $data = [\n 'resource' => $resource,\n 'related_resources' => $this->resourceRepository->getResourcesRelatedTo($resource->id, $resource->mentoring_area_id)\n ];\n\n return APIHandler::response(1, \"Show Resource\", $data);\n }", "public function get(Resource $resource);", "public function showAction()\n {\n $model = $this->_getPhotoModel();\n $photo = $model->fetchEntry($this->getRequest()->getParam('id'));\n\n if (null === $photo) {\n return $this->_forward('notfound', 'error');\n }\n\n $this->view->auth = Zend_Auth::getInstance();\n $this->view->title = $photo->title;\n $this->view->photo = $photo;\n }", "public function show($id)\n {\n //\n $data=Resource::find($id);\n return view('resourceDetails',compact('data'));\n }", "function display() {\n\t\t$view = &$this->getView();\n\t\t$view->display();\n\t}", "public function show(ShowResourceRequest $request, $id)\n {\n // TODO: Implement show() method.\n }", "function show( $resource ){\n\n $where = \"reservation_status <> 'Pending' AND id = {$resource}\";\n $reservation = where( 'reservations', $where );\n $reservation = $reservation[0];\n\n return view('admin/reservation/preview_reservation', compact( 'reservation' ));\n}", "public function show()\n {\n if ($this->twig !== false) {\n $this->twigDefaultContext();\n if ($this->controller) {\n $this->controller->display($this->data);\n }\n echo $this->twig->render($this->twig_template, $this->data);\n } else {\n $filename = $this->findTemplatePath($this->template);\n require($filename);\n }\n }", "public function edit(Resource $resource)\n {\n //\n }", "public function show(rc $rc)\n {\n //\n }", "public function show(Resolucion $resolucion)\n {\n //\n }", "public function showAction(furTexture $furTexture)\n {\n\n return $this->render('furtexture/show.html.twig', array(\n 'furTexture' => $furTexture,\n ));\n }", "public function show()\n\t{\n\t\t//\n\t}", "public function show()\n\t{\n\t\t//\n\t}", "public function show()\n\t{\n\t\t//\n\t}", "public function show(Resena $resena)\n {\n }", "public function edit(Resource $resource)\n {\n return view('admin.resources.edit', compact('resource'));\n }", "public function showAction() {\n $docId = $this->getParam('id');\n\n // TODO verify parameter\n\n $document = new Opus_Document($docId);\n\n $this->_helper->layout()->disableLayout();\n\n $this->view->doc = $document;\n $this->view->document = new Application_Util_DocumentAdapter($this->view, $document);\n }", "public function action_display()\r\n\t{\r\n\t\t$event = ORM::factory('event', array('id' => $this->request->param('id')));\r\n\t\r\n\t\tif ( ! $event->loaded())\r\n\t\t{\r\n\t\t\tNotices::error('event.view.not_found');\r\n\t\t\t$this->request->redirect(Route::url('event'));\r\n\t\t}\r\n\t\t\r\n\t\t// Can user view this event?\r\n\t\tif ( ! $this->user->can('event_view', array('event' => $event)))\r\n\t\t{\r\n\t\t\t// Error notification\r\n\t\t\tNotices::error('event.view.not_allowed');\r\n\t\t\t$this->request->redirect(Route::url('event'));\r\n\t\t}\r\n\t\t\r\n\t\t// Pass event data to the view class\r\n\t\t$this->view->event_data = $event;\r\n\t\t$this->view->user = $this->user;\r\n\t}", "public function execute()\n {\n // HTTP Request Get\n if ($this->type == \"resource\") {\n $action = $this->getResourceAction();\n switch ($action) {\n case \"show\":\n $this->show();\n break;\n case \"create\":\n $this->create();\n break;\n case \"edit\":\n $this->edit();\n break;\n case \"destroy\":\n $this->destroy();\n break;\n default:\n echo $this->render();\n break;\n }\n } else {\n $action = $this->Request->action;\n switch ($action) {\n case \"show\":\n $this->show();\n break;\n case \"create\":\n $this->create();\n break;\n case \"edit\":\n $this->edit();\n break;\n case \"destroy\":\n $this->destroy();\n break;\n default:\n echo $this->render();\n break;\n }\n }\n }", "public function show(Resident $resident)\n {\n $this->authorize('admin.resident.show', $resident);\n\n // TODO your code goes here\n }", "public function display()\n {\n echo $this->getDisplay();\n $this->isDisplayed(true);\n }", "public function display()\n\t{\n\t\tparent::display();\n\t}", "public function get_resource();", "public function show()\n\t{\n\t\t\n\t}", "function display() {\n\n\t\t// Check authorization, abort if negative\n\t\t$this->isAuthorized() or $this->abortUnauthorized();\n\n\t\t// Get the view\n\t\t$view = $this->getDefaultView();\n\n\t\tif ($view == NULL) {\n\t\t\tthrow new Exception('Display task called, but there is no view assigned to that controller. Check method getDefaultView.');\n\t\t}\n\n\t\t$view->listing = true;\n\n\t\t// Wrap the output of the views depending on the way the stuff should be shown\n\t\t$this->wrapViewAndDisplay($view);\n\n\t}", "public function viewResources()\n {\n $database = new Database();\n\n $resources = $database->getAllActiveResourcesNoLimit();\n\n\n $resourceArray = array();\n $i = 1;\n\n foreach ($resources as $resource) {\n $availableResource = new Resource($resource['ResourceID'], $resource['ResourceName'], $resource['Description']\n , $resource['ContactName'] , $resource['ContactEmail'] , $resource['ContactPhone'] ,\n $resource['Link'], $resource['active']);\n array_push($resourceArray, $availableResource);\n $i += 1;\n }\n $resourceSize = sizeof($resourceArray);\n $this->_f3->set('resourcesByActive', $resourceArray);\n $this->_f3->set('resourcesSize', $resourceSize);\n echo Template::instance()->render('view/include/head.php');\n echo Template::instance()->render('view/include/top-nav.php');\n echo Template::instance()->render('view/resources.php');\n echo Template::instance()->render('view/include/footer.php');\n }", "public function show($id)\n {\n $this->title .= ' show';\n $this->one($id);\n }", "public function display($title = null)\n {\n echo $this->fetch($title);\n }", "public function display(){}", "public function show($id)\n\t{\n\t\t//\n\t\t//\n\t\n\t}", "public function viewAction()\n\t{\n\t\t//get Id param from request\n\t\tif (!$id = $this->_getParam('id')) {\n\t\t\t$this->getFlashMessenger()->addMessage('Product ID was not specified');\n\t\t\t$this->getRedirector()->gotoSimple('list');\n\t\t}\n\n\t\t//fetch requested ProductID from DB\n\t\tif (!$this->_model->fetch($id)) {\n\t\t\t$this->render('not-found');\n\t\t} else {\n\t\t\t$this->view->model = $this->_model;\n\t\t}\n\t}", "public function show($id)\n {\n // Get single person\n $person = Person::findOrFail($id);\n\n // Return single person as a resource\n return '<h1>Person Number '.$id.'</h1><br>'.json_encode(new PersonResource($person));\n }", "#[TODO] use self object?\n\tprotected function GET(ResourceObject $resource) {\n#[TODO]\t\tif ($resource->getMTime())\n#[TODO]\t\t\t$this->response->headers->set('Last-modified', gmdate('D, d M Y H:i:s ', $resource->getMTime()) . 'GMT');\n#[TODO]\t\tif ($resource->getCTime())\n#[TODO]\t\t\t$this->response->headers->set('Date', gmdate('D, d M Y H:i:s ', $resource->getCTime()) . 'GMT');\n\n\n#[TODO] handle file streams\n\t\t// get ranges\n#\t\t$ranges = WebDAV::getRanges($this->request, $this->response);\n\n\t\t// set the content of the response\n\t\tif ($resource instanceof ResourceDocument) {\n\t\t\t$this->response->content->set($resource->getContents());\n\t\t\t$this->response->content->setType($resource->getMIMEType());\n\t\t\t$this->response->content->encodeOnSubmit(true);\n\t\t}\n\t}", "public function display() {\n echo $this->render();\n }", "public function show($id)\n\t{\n\t//\n\t}", "public function show($id)\n\t{\n\t//\n\t}", "function Fetch($resource_name, $cache_id = null, $compile_id = null, $display = false)\n {\n return $this->_smarty->fetch($resource_name, $cache_id, $compile_id, $display);\n }", "public function show($id)\n {\n //\n $this->_show($id);\n }", "public function show()\n\t{\n\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {\n\t\t//\n\t}", "public function show($id) {}", "static public function showCallback(O_Dao_Renderer_Show_Params $params) {\r\n\t\t/* @var $r R_Mdl_Resource */\r\n\t\t$r = $params->record();\r\n\t\t// Setting layout title\r\n\t\t$params->layout()->setTitle($r->getPageTitle());\r\n\r\n?><h1><?=$r->title?></h1><div id=\"resource\"><?\r\n\t\tif($r->getContent()) {\r\n\t\t\t// page has its own content -- show it\r\n\t\t\t$r->getContent()->show($params->layout(), \"content\");\r\n\t\t} else {\r\n\t\t\t// It is a post unit, show all childs\r\n\t\t\tif($r->is_unit == 1) {\r\n\t\t\t\t$r->addQueryAccessChecks($r->getChilds(1))->show($params->layout(), \"content\");\r\n\r\n\t\t\t// It is a folder with several units, show paginator\r\n\t\t\t} elseif($r->show_def == \"last-units\") {\r\n\t\t\t\tlist($type, $perpage) = explode(\":\", $r->show_def_params);\r\n\t\t\t\t/* @var $p O_Dao_Paginator */\r\n\t\t\t\t$p = $r->addQueryAccessChecks($r->getChilds())->test(\"is_unit\", 1)->getPaginator(array($r, \"getPageUrl\"), $perpage);\r\n\t\t\t\t$p->show($params->layout(), $type);\r\n\t\t\t// It is a folder with subfolders, boxes, contents. Show one childs level\r\n\t\t\t} else {\r\n\t\t\t\t$r->addQueryAccessChecks($r->getChilds(1))->show($params->layout(), \"on-parent-page\");\r\n\t\t\t}\r\n\r\n\t\t}\r\n?></div><?\r\n\t}", "public function show($id)\r\n\t{\r\n\t\t//\r\n\r\n\r\n\r\n\t}", "public function show($resourceId, $eventId)\n {\n $routes = $this->routes;\n\n $eventable = $this->getEventableRepository()->model()->findOrFail($resourceId);\n\n if (method_exists($eventable, 'events')) {\n $event = $eventable->events()->find($eventId);\n\n if ($event) {\n $apiObject = $this->event->findApiObject($event->api_id);\n\n return view('events.eventables.show', compact('routes', 'eventable', 'event', 'apiObject'));\n }\n }\n\n abort(404);\n }", "public abstract function display();", "abstract public function resource($resource);", "public function show($id)\r\r\n\t{\r\r\n\t\t//\r\r\n\t}", "public function show( $id ) {\n\t\t//\n\t}", "public function show( $id ) {\n\t\t//\n\t}", "public function show(Response $response)\n {\n //\n }", "public function show()\n {\n return auth()->user()->getResource();\n }", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}", "public function show($id)\n\t{\n\t\t//\n\t}" ]
[ "0.8233718", "0.8190437", "0.6828712", "0.64986944", "0.6495974", "0.6469629", "0.6462615", "0.6363665", "0.6311607", "0.62817234", "0.6218966", "0.6189695", "0.61804265", "0.6171014", "0.61371076", "0.61207956", "0.61067593", "0.6105954", "0.6094066", "0.6082806", "0.6045245", "0.60389996", "0.6016584", "0.598783", "0.5961788", "0.59606946", "0.5954321", "0.59295714", "0.59182066", "0.5904556", "0.59036547", "0.59036547", "0.59036547", "0.5891874", "0.58688277", "0.5868107", "0.58676815", "0.5851883", "0.58144855", "0.58124036", "0.58112013", "0.5803467", "0.58012545", "0.5791527", "0.57901084", "0.5781528", "0.5779676", "0.5757105", "0.5756208", "0.57561266", "0.57453394", "0.57435393", "0.57422745", "0.5736634", "0.5736634", "0.5730559", "0.57259274", "0.5724891", "0.5722562", "0.5722562", "0.5722562", "0.5722562", "0.5722562", "0.5722562", "0.5722562", "0.5722562", "0.5722562", "0.5722562", "0.5718969", "0.5713412", "0.57091093", "0.5706405", "0.57057405", "0.5704541", "0.5704152", "0.57026845", "0.57026845", "0.56981397", "0.5693083", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962", "0.5684962" ]
0.0
-1
Show the form for editing the specified resource.
public function edit($id) { // }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function edit(Resource $resource)\n {\n return view('admin.resources.edit', compact('resource'));\n }", "public function edit(Resource $resource)\n {\n //\n }", "public function edit($id)\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n /* Get the specified resource */\n $resource = $this->model::findOrFail($id);\n\n /* Sets the view */\n if (view()->exists(\"admin.{$this->name}.edit\")) {\n $view = \"admin.{$this->name}.edit\";\n } else {\n $view = 'admin.includes.actions.edit';\n }\n\n /* Displays the edit resource page */\n return view($view)\n ->with('resource', $resource)\n ->with('name', $this->name);\n }", "public function edit(NebulaResource $resource, $item): View\n {\n $this->authorize('update', $item);\n\n return view('nebula::resources.edit', [\n 'resource' => $resource,\n 'item' => $item,\n ]);\n }", "public function edit() {\r\n $id = $this->api->getParam('id');\r\n\r\n if ($id) {\r\n $this->model->id = $id;\r\n $this->checkOwner();\r\n }\r\n $object = $this->model->find_by_id($id);\r\n\r\n $this->api->loadView('contact-form', array('row' => $object));\r\n }", "public function viewEditResources()\n {\n $database = new Database();\n $id = $this->_params['id'];\n\n $resource = $database->getResourceById($id);\n\n $availableResource = new Resource($resource['ResourceID'], $resource['ResourceName'], $resource['Description']\n , $resource['ContactName'] , $resource['ContactEmail'] , $resource['ContactPhone'] ,\n $resource['Link'], $resource['active']);\n $this->_f3->set('Resource', $availableResource);\n\n echo Template::instance()->render('view/include/head.php');\n echo Template::instance()->render('view/include/top-nav.php');\n echo Template::instance()->render('view/edit-resources.php');\n echo Template::instance()->render('view/include/footer.php');\n }", "public function edit()\n {\n return view('hirmvc::edit');\n }", "public function editformAction(){\n\t\t$this->loadLayout();\n $this->renderLayout();\n\t}", "public function edit() {\n $id = $this->parent->urlPathParts[2];\n // pass name and id to view\n $data = $this->parent->getModel(\"fruits\")->select(\"select * from fruit_table where id = :id\", array(\":id\"=>$id));\n $this->getView(\"header\", array(\"pagename\"=>\"about\"));\n $this->getView(\"editForm\", $data);\n $this->getView(\"footer\");\n }", "public function edit($id)\n\t{\n\t\treturn $this->showForm('update', $id);\n\t}", "public function edit($id)\n {\n $model = $this->modelObj;\n $formObj = $model::findOrFail($id);\n $data['formObj'] = $formObj;\n return view($this->veiw_base . '.edit', $data);\n }", "public function createEditForm(Resourceperson $entity){\n \n $form = $this->createForm(new ResourcepersonType(), $entity, array(\n 'action' => $this->generateUrl('rsp_update', array('id' => $entity->getRpId())),\n 'method' => 'PUT',\n ));\n\n $form->add('submit', 'submit', array('label' => 'Update','attr'=> array(\n 'class'=>'btn btn primary'\n )));\n\n return $form;\n }", "private function createEditForm(Resource $entity)\n {\n $form = $this->createForm(new ResourceType(), $entity, array(\n 'action' => $this->generateUrl('social_admin_resource_update', array('id' => $entity->getId())),\n 'method' => 'PUT',\n ));\n\n $form->add('submit', 'submit', array('label' => '保存','attr'=>[\n 'class'=>'btn btn-primary'\n ]));\n\n return $form;\n }", "public function edit($id)\n {\n return $this->showForm('update', $id);\n }", "public function edit($id)\n {\n return $this->showForm('update', $id);\n }", "public function editAction()\n {\n if ($form = $this->processForm()) {\n if ($this->useTabbedForms && method_exists($this, 'getSubject')) {\n $data = $this->getModel()->loadFirst();\n $subject = $this->getSubject($data);\n $this->setPageTitle(sprintf($this->_('Edit %s %s'), $this->getTopic(1), $subject));\n } else {\n $this->setPageTitle(sprintf($this->_('Edit %s'), $this->getTopic(1)));\n }\n $this->html[] = $form;\n }\n }", "public function edit($id)\n {\n $this->data['entity'] = GS_Form::where('id', $id)->firstOrFail();\n return view('admin.pages.forms.edit', $this->data);\n }", "public function edit($id)\n\t{\n\t\t// get the fbf_presenca\n\t\t$fbf_presenca = FbfPresenca::find($id);\n\n\t\t\n\t\t// show the edit form and pass the fbf_presenca\n\t\t$this->layout->content = View::make('fbf_presenca.edit')\n->with('fbf_presenca', $fbf_presenca);\n\t}", "public function edit($id)\n {\n $data = $this->model->find($id);\n\n return view('admin.backends.employee.form.edit',compact('data'));\n }", "public function edit($model, $form);", "function edit() {\n\t\tglobal $tpl;\n\n\t\t$form = $this->initForm();\n\t\t$tpl->setContent($form->getHTML());\n\t}", "public function edit($id)\n\t{\n\t\t$faith = Faith::find($id);\n \n return view('faith.form')->with('faith', $faith);\n\n\t}", "public function edit()\n { \n return view('admin.control.edit');\n }", "public function edit(Form $form)\n {\n //\n }", "public function edit()\n {\n return view('common::edit');\n }", "public function edit($id)\n {\n $resource = (new AclResource())->AclResource;\n $roleResource = AclRole::where('role', $id)->get(['resource'])->toArray();\n $roleResource = Arr::pluck($roleResource, 'resource');\n return view('Admin.acl.role.form', [\n 'role' => $id,\n 'resource' => $resource,\n 'roleResource' => $roleResource,\n ]);\n }", "public function edit()\n {\n return view('admin::edit');\n }", "public function edit()\n {\n return view('admin::edit');\n }", "public function edit()\r\n {\r\n return view('petro::edit');\r\n }", "public function edit($id)\n {\n // show form edit user info\n }", "public function edit()\n {\n return view('escrow::edit');\n }", "public function edit($id)\n {\n $resource = ResourceManagement::find($id);\n\n $users = User::get();\n // Redirect to user list if updating user wasn't existed\n if ($resource == null || $resource->count() == 0) {\n return redirect()->intended('/resource-management');\n }\n\n return view('resources-mgmt/edit', ['resource' => $resource, 'users' => $users]);\n }", "public function edit()\n {\n return view('commonmodule::edit');\n }", "public function editAction()\n\t{\n\t\t$params = $this->data->getParams();\n\t\t$params = $this->valid->clearDataArr($params);\n\t\tif (isset($params['id']))\n\t\t{\n\t\t\t$this->employee->setFlag(true);\n\t\t}\n\t\tif (isset($_POST['submit']))\n\t\t{\n\t\t\t$action = $this->valid->clearDataArr($_POST);\n\t\t\t$this->employee->setDataArray($action);\n\t\t\theader('Location: ' . PATH . 'Employee/index/', true, 303);\n\t\t}\n\t\t$employee = $this->employee->setAction('edit');\n\t\t$this->view->addToReplace($employee);\n\t\t$this->listEmployee();\n\t\t$this->arrayToPrint();\n\t}", "public function edit()\n {\n return view('catalog::edit');\n }", "public function edit()\n {\n return view('catalog::edit');\n }", "public function edit(form $form)\n {\n //\n }", "public function actionEdit($id) { }", "public function edit()\n {\n return view('admincp::edit');\n }", "public function edit()\n {\n return view('scaffold::edit');\n }", "public function edit($id)\n {\n $header = \"Edit\";\n\t\t$data = Penerbit::findOrFail($id);\n\t\treturn view('admin.penerbit.form', compact('data','header'));\n }", "public function edit()\n {\n return view('Person.edit');\n }", "public function edit($id)\n {\n $data = Form::find($id);\n return view('form.edit', compact('data'));\n }", "public function edit($id)\n\t{\n\t\t$career = $this->careers->findById($id);\n\t\treturn View::make('careers._form', array('career' => $career, 'exists' => true));\n\t}", "public function edit(Flight $exercise, FlightResource $resource)\n {\n return $this->viewMake('adm.smartcars.exercise-resources.edit')\n ->with('flight', $exercise)\n ->with('resource', $resource);\n }", "public function edit($id)\n\t{\n\t\t// get the material\n\t\t$material = Material::find($id);\n\n\t\t// show the edit form and pass the material\n\t\t$this->layout->content = View::make('material.edit')\n\t\t\t->with('material', $material);\n\t}", "public function edit($id, Request $request)\n {\n $formObj = $this->modelObj->find($id);\n\n if(!$formObj)\n {\n abort(404);\n } \n\n $data = array();\n $data['formObj'] = $formObj;\n $data['page_title'] = \"Edit \".$this->module;\n $data['buttonText'] = \"Update\";\n\n $data['action_url'] = $this->moduleRouteText.\".update\";\n $data['action_params'] = $formObj->id;\n $data['method'] = \"PUT\"; \n\n return view($this->moduleViewName.'.add', $data);\n }", "public function edit()\n {\n $id = $this->getId();\n return view('panel.user.form', [\n 'user' => $this->userRepository->findById($id),\n 'method' => 'PUT',\n 'routePrefix' => 'profile',\n 'route' => 'profile.update',\n 'parameters' => [$id],\n 'breadcrumbs' => $this->getBreadcrumb('Editar')\n ]);\n }", "public function edit()\r\n {\r\n return view('mpcs::edit');\r\n }", "function edit()\n\t{\n\t\t// hien thi form sua san pham\n\t\t$id = getParameter('id');\n\t\t$product = $this->model->product->find_by_id($id);\n\t\t$this->layout->set('auth_layout');\n\t\t$this->view->load('product/edit', [\n\t\t\t'product' => $product\n\t\t]);\n\t}", "public function edit($id)\n {\n //\n $data = Diskon::find($id);\n\n $form = $this->form;\n $edit = $this->edit;\n $field = $this->field;\n $page = $this->page;\n $id = $id;\n $title = $this->title;\n return view('admin/page/'.$this->page.'/edit',compact('form','edit','data','field','page','id','title'));\n }", "public function edit($id)\n {\n return $this->showForm($id);\n }", "public function edit($id)\n {\n return $this->showForm($id);\n }", "protected function _edit(){\n\t\treturn $this->_editForm();\n\t}", "public function editAction()\n {\n $robot = Robots::findFirst($this->session->get(\"robot-id\"));\n if ($this->request->isGet()) {\n $this->tag->prependTitle(\"Редактировать робота :: \");\n $user = $this->session->get(\"auth-id\");\n if (!$robot) {\n $this->flashSession->error(\n \"Робот не найден\"\n );\n return $this->response->redirect(\"users/usershow/$user->name\");\n }\n\n }\n\n $this->view->form = new RobotForm(\n $robot,\n [\n \"edit\" => true,\n ]\n );\n }", "public function editAction()\n {\n $form = new $this->form();\n\n $request = $this->getRequest();\n $param = $this->params()->fromRoute('id', 0);\n\n $repository = $this->getEm()->getRepository($this->entity);\n $entity = $repository->find($param);\n\n if ($entity) {\n\n $form->setData($entity->toArray());\n\n if ( $request->isPost() ) {\n\n $form->setData($request->getPost());\n\n if ( $form->isValid() ) {\n\n $service = $this->getServiceLocator()->get($this->service);\n $service->update($request->getPost()->toArray());\n\n return $this->redirect()->toRoute($this->route, array('controller' => $this->controller));\n }\n }\n } else {\n return $this->redirect()->toRoute($this->route, array('controller' => $this->controller));\n }\n\n return new ViewModel(array('form' => $form, 'id' => $param));\n\n }", "public function edit($id)\n\t{\n\t\t$SysApplication = \\Javan\\Dynaflow\\Domain\\Model\\SysApplication::find($id);\n\t\t$form = \\FormBuilder::create('Javan\\Dynaflow\\FormBuilder\\SysApplicationForm', [\n \t'method' => 'POST',\n \t'url' => 'sysapplication/update/'.$id,\n \t'model' => $SysApplication,\n \t'data' => [ 'flow_id' => $SysApplication->flow_id]\n \t]);\n\t\treturn View::make('dynaflow::sysapplication.form', compact('form', 'SysApplication'));\n\t}", "public function editAction() {\n\t\t$id = (int) $this->_getParam('id');\n\t\t$modelName = $this->_getParam('model');\n\t\t\n\t\t$model = Marcel_Backoffice_Model::factory($modelName);\n\t\t$item = $model->find($id)->current();\n\t\tif (!$item) {\n\t\t\t$item = $model->createRow();\n\t\t}\n\t\t$form = $item->getForm();\n\t\tif ($this->_request->isPost()) {\n\t\t\t$newId = $form->populate($this->_request->getPost())->save();\n\t\t\tif ($newId) {\n\t\t\t\t$this->_helper->flashMessenger('Saved successfully!');\n\t\t\t\t$this->_helper->redirector('edit', null, null, array('id' => $newId, 'model' => $modelName));\n\t\t\t}\n\t\t}\n\t\t$this->view->form = $form;\n\t\t$this->view->messages = $this->_helper->flashMessenger->getMessages();\n\t}", "public function edit($id)\n {\n return view('models::edit');\n }", "public function edit()\n {\n return view('home::edit');\n }", "public function editAction()\n {\n $id = $this->params()->fromRoute('id');\n $entity = $this->entityManager->find(Entity\\CourtClosing::class, $id);\n if (! $entity) {\n // to do: deal with it\n }\n $form = $this->getForm('update');\n $form->bind($entity);\n if ($this->getRequest()->isPost()) {\n return $this->post();\n }\n\n return new ViewModel(['form' => $form]);\n }", "public function editAction($id)\n {\n $entity = $this->getManager()->find($id);\n\n $breadcrumbs = $this->get(\"white_october_breadcrumbs\");\n $breadcrumbs->addItem('Inicio', $this->get('router')->generate('admin.homepage'));\n $breadcrumbs->addItem($this->entityDescription, $this->get(\"router\")->generate(\"admin.$this->entityName.index\"));\n $breadcrumbs->addItem('Editar');\n\n if (!$entity) {\n throw $this->createNotFoundException('No se ha encontrado el elemento');\n }\n\n $form = $this->getForm($entity);\n\n return $this->render('AdminBundle:Default:edit.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n 'metadata' => $this->getMetadata()\n ));\n }", "public function edit()\n {\n return view('user::edit');\n }", "public function edit()\n {\n return view('user::edit');\n }", "public function edit(Form $form)\n {\n return view('admin.forms.edit', compact('form'));\n }", "public function editAction()\n {\n $form = MediaForm::create($this->get('form.context'), 'media');\n $media = $this->get('media_manager.manager')->findOneById($this->get('request')->get('media_id'));\n \n $form->bind($this->get('request'), $media);\n \n return $this->render('MediaManagerBundle:Admin:form.html.twig', array('form' => $form, 'media' => $media));\n }", "public function editAction($id) {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('CdlrcodeBundle:Question')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Question entity.');\n }\n\n $editForm = $this->createEditForm($entity);\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('CdlrcodeBundle:Question:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "public function edit($id)\n {\n return view('consultas::edit');\n }", "public function edit(DirectorFormBuilder $form, $id)\n {\n return $form->render($id);\n }", "public function edit()\n {\n return view('dashboard::edit');\n }", "public function edit($id){\n $rfid = Rfid::find($id);\n\n //load form view\n return view('rfids.edit', ['rfid' => $rfid]);\n }", "public function edit($id)\n {\n\n // retrieve provider\n $provider = Provider::findOrFail($id);\n\n // return form with provider\n return view('backend.providers.form')->with('provider', $provider);\n }", "public function edit(Question $question)\n {\n $this->employeePermission('application' , 'edit');\n $question->chooses;\n $action = 'edit';\n return view('admin.setting.question_form', compact('action' , 'question'));\n }", "public function edit() {\n return view('routes::edit');\n }", "public function edit($id)\n {\n $this->data['product'] = Product::find($id);\n $this->data['category'] = Category::arrForSelect();\n $this->data['title'] = \" Update Prouct Details\";\n $this->data['mode'] = \"edit\";\n\n return view('product.form', $this->data);\n }", "public function edit(ClueEnFormBuilder $form, $id): Response\n {\n return $form->render($id);\n }", "public function editAction($id)\n {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('BaseBundle:Feriado')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Feriado entity.');\n }\n\n $editForm = $this->createEditForm($entity);\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('BaseBundle:Feriado:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "public function edit($id)\n {\n return view('cataloguemodule::edit');\n }", "public function edit($articulo_id)\n {\n $titulo = \"Editar\";\n return View(\"articulos.formulario\",compact('titulo','articulo_id'));\n }", "public function edit($id)\n {\n $resources = User::find(session('usuario_id'))->resources;\n $languages = Language::pluck('name', 'id');\n $types = Type::pluck('name', 'id');\n $method = 'PATCH';\n\n $recurso = Resource::find($id);\n $url = \"/resource/$recurso->id\";\n\n return view('resources.resources', compact('resources', 'languages', 'types', 'method', 'url', 'recurso'));\n }", "public function edit(Question $question)\n {\n $edit = TRUE;\n return view('questionForm', ['question' => $question, 'edit' => $edit]);\n }", "public function displayEditForm(Employee $employee){\n return view('employee.displayEditForm',['employee'=>$employee]);\n }", "public function edit()\n {\n return view('website::edit');\n }", "public function edit()\n {\n return view('inventory::edit');\n }", "public function edit()\n {\n return view('initializer::edit');\n }", "public function editAction()\n {\n View::renderTemplate('Profile/edit.html', [\n 'user' => $this->user\n ]);\n }", "public function edit($id)\n {\n return view('backend::edit');\n }", "public function edit($id)\n {\n //dd($id);\n $familiaPrograma= FamiliaPrograma::findOrFail($id);\n return view('familiasPrograma.edit', compact('familiaPrograma'));\n }", "public function edit($id)\n {\n return view('crm::edit');\n }", "public function edit($id)\n {\n return view('crm::edit');\n }", "public function edit($id)\n {\n $user = User::where('id', $id)->first();\n\n\n return view('users.forms.update', compact('user'));\n }", "public function editAction($id)\n\t{\n\t\t$school = School::find( $id );\n\t\t$this->render( View::make( 'schools/form' , array(\n\t\t\t'title' => sprintf( 'Modifier \"%s\"', $school->name ),\n\t\t\t'entity' => $school\n\t\t) ) );\n\t}", "public function edit(Question $question)\n {\n $edit = TRUE;\n return view('questionForm', ['question' => $question, 'edit' => $edit ]);\n }", "public function edit(Person $person) {\n\t\t$viewModel = new PersonFormViewModel();\n\t\treturn view('person.form', $viewModel);\n\t}", "public function edit($id)\n {\n \t$product = Product::find($id);\n \treturn view('admin.products.edit')->with(compact('product')); // formulario de actualizacion de datos del producto\n }", "public function edit_person($person_id){\n \t$person = Person::find($person_id);\n \treturn view('resource_detail._basic_info.edit',compact('person'));\n }", "public function edit($id)\n {\n $professor = $this->repository->find($id);\n return view('admin.professores.edit',compact('professor'));\n }", "public function edit($id)\n {\n $data = Restful::find($id);\n return view('restful.edit', compact('data'));\n }", "public function editAction($id)\n {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('MedecinIBundle:Fichepatient')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Fichepatient entity.');\n }\n\n $editForm = $this->createEditForm($entity);\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('MedecinIBundle:Fichepatient:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "public function edit($id)\n {\n return $this->form->render('mconsole::personal.form', [\n 'item' => $this->person->query()->with('uploads')->findOrFail($id),\n ]);\n }", "public function edit($id)\n\t{\n\t\t // get the project\n $project = Project::find($id);\n\n // show the edit form and pass the project\n return View::make('logicViews.projects.edit')->with('project', $project);\n\t}" ]
[ "0.78550774", "0.7692893", "0.7273195", "0.7242132", "0.7170847", "0.70622855", "0.7053459", "0.6982539", "0.69467914", "0.6945275", "0.6941114", "0.6928077", "0.69019294", "0.68976134", "0.68976134", "0.6877213", "0.68636996", "0.68592185", "0.68566656", "0.6844697", "0.68336326", "0.6811471", "0.68060875", "0.68047357", "0.68018645", "0.6795623", "0.6791791", "0.6791791", "0.6787701", "0.67837197", "0.67791027", "0.677645", "0.6768301", "0.6760122", "0.67458534", "0.67458534", "0.67443407", "0.67425704", "0.6739898", "0.6735328", "0.6725465", "0.6712817", "0.6693891", "0.6692419", "0.6688581", "0.66879624", "0.6687282", "0.6684741", "0.6682786", "0.6668777", "0.6668427", "0.6665287", "0.6665287", "0.66610634", "0.6660843", "0.66589665", "0.66567147", "0.66545695", "0.66527975", "0.6642529", "0.6633056", "0.6630304", "0.6627662", "0.6627662", "0.66192114", "0.6619003", "0.66153085", "0.6614968", "0.6609744", "0.66086483", "0.66060555", "0.6596137", "0.65950733", "0.6594648", "0.65902114", "0.6589043", "0.6587102", "0.65799844", "0.65799403", "0.65799177", "0.657708", "0.65760696", "0.65739626", "0.656931", "0.6567826", "0.65663105", "0.65660435", "0.65615267", "0.6561447", "0.6561447", "0.65576506", "0.655686", "0.6556527", "0.6555543", "0.6555445", "0.65552044", "0.65543956", "0.65543705", "0.6548264", "0.65475875", "0.65447706" ]
0.0
-1
Update the specified resource in storage.
public function update(Request $request, $id) { // }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function updateShopifyResource() {\n $this->saving();\n $this->getShopifyApi()->call([\n 'URL' => API::PREFIX . $this->getApiPathSingleResource(),\n 'METHOD' => 'PUT',\n 'DATA' => [\n static::getResourceSingularName() => $this->shopifyData\n ]\n ]);\n }", "public function update(Request $request, Resource $resource)\n {\n $request->validate([\n 'name' => 'required',\n 'description' => 'required|string',\n 'file' => 'required|mimes:jpg,jpeg,png,doc,docx,pdf,ppt,txt',\n ]);\n\n $resource->update($request->all());\n\n if ( $request->hasFile('file') ) {\n $resource = 'resource-'.time().'.'.$request->file('file')->extension();\n $request->file->storeAs('resources', $resource,'public');\n $resource->file = $resource;\n }\n\n if ( $resource->save() ) {\n return redirect()->route('admin.resources.index')->with('success', 'Resource updated');\n } else {\n return redirect()->route('admin.resources.index')->with('error', 'Something went wrong');\n }\n }", "public function update(Request $request, Resource $resource)\n {\n //\n }", "public function updateStream($resource);", "public function update(Request $request, Storage $storage)\n {\n $storage->product_id = $request->product_id;\n $storage->amount = $request->amount;\n\n $storage->save();\n\n return redirect()->route('storages.index');\n }", "protected function updateImageResource($fileName, $imageId, $storage)\n {\n //Get image name and storage location for image\n $image = Image::where('id', '=', $imageId)->first();\n\n //Delete old image\n $this->deleteResource($image->name, $image->storage);\n\n //Store the new image\n $image->name = $fileName;\n $image->storage = $storage;\n\n $image->save();\n }", "public function update(Storage $storage, UpdateStorageRequest $request)\n {\n $this->storage->update($storage, $request->all());\n\n return redirect()->route('admin.product.storage.index')\n ->withSuccess(trans('core::core.messages.resource updated', ['name' => trans('product::storages.title.storages')]));\n }", "public function update(StoreStorage $request, Storage $storage)\n {\n $storage->fill($request->all())->save();\n $request->session()->flash('alert-success', 'Запись успешно обновлена!');\n return redirect()->route('storage.index');\n }", "public function update_asset($id, Request $request){\n \t\tif(!Auth::user()){\n\t\t\treturn redirect('/');\n\t\t}\n \t\t$asset = Storage::find($id);\n \t\t$asset->name = $request->name;\n \t\t$asset->quantity = $request->quantity;\n \t\t$asset->category_id = $request->category;\n \t\tif($request->file('image') != null){\n\t\t\t$image = $request->file('image');\n\t\t\t$image_name = time(). \".\" . $image->getClientOriginalExtension();\n\t\t\t$destination = \"images/\";\n\t\t\t$image->move($destination, $image_name);\n\t\t\t$asset->image_url = $destination.$image_name;\n\t\t} \n\t\t$asset->save();\n\t\tsession()->flash('success_message', 'Item Updated successfully');\n\t\treturn redirect(\"/storage\");\n \t}", "public function update(Request $request, Flight $exercise, FlightResource $resource)\n {\n $request->validate([\n 'display_name' => 'required|string|max:100',\n 'file' => 'nullable|file|max:10240|mimes:pdf',\n 'uri' => 'nullable|url|max:255',\n ]);\n\n if ($resource->type === 'file' && $request->file('file')) {\n Storage::drive('public')->delete($resource->resource);\n $resource->resource = $request->file('file')->store('smartcars/exercises/resources', ['disk' => 'public']);\n } elseif ($resource->type === 'uri' && $request->input('uri')) {\n $resource->resource = $request->input('uri');\n }\n\n $resource->save();\n\n return redirect()->route('adm.smartcars.exercises.resources.index', $exercise)\n ->with('success', 'Resource edited successfully.');\n }", "public function update(Request $request, $id)\n {\n $validator = Validator::make($request->all(), [\n 'title' => 'required|string',\n 'content' => 'required|string',\n 'mentoring_area_id' => 'required|integer',\n 'featured_image_uri' => 'string',\n ]);\n\n if ($validator->fails()) {\n return APIHandler::response(0, $validator->errors(), 400);\n }\n \n $resource = Resource::find($id);\n $resource->title = $request->get('title');\n $resource->content = $request->get('content');\n $resource->featured_image_uri = $request->get('featured_image_uri');\n $resource->updated_at = \\Carbon\\Carbon::now();\n $resource->mentoring_area_id = $request->get('mentoring_area_id');\n $resource->save();\n $data['resource'] = $resource;\n return APIHandler::response(1, \"Resource has been updated\");\n }", "protected function updateVideoResource($fileName, $videoId, $storage, $premium=1)\n {\n //Get video name and storage location for video\n $video = Video::where('id', '=', $videoId)->first();\n\n //Check the storage medium\n if($storage == 'vimeo' || $storage == 'youtube')\n {\n $video->name = $fileName;\n $video->storage = $storage;\n $video->premium = $premium;\n $video->save();\n }\n else\n {\n if($video['storage'] == 'local' || $video['storage'] == 's3')\n {\n //Delete old video\n $this->deleteResource($video->name, $video->storage);\n }\n \n //Store the new video\n $video->name = $fileName;\n $video->storage = $storage;\n $video->premium = $premium;\n $video->save();\n }\n }", "public function put($resource, $with=[]){\n return $this->fetch($resource, self::PUT, $with);\n }", "public function update($id, $resource) {\n SCA::$logger->log(\"update resource\");\n return $this->orders_service->update($id, $resource);\n }", "public function update($path);", "public function update($id, $resource)\n {\n SCA::$logger->log(\"Entering update()\");\n //check whether it is an sdo or an xml string.\n if ($resource instanceof SDO_DataObjectImpl) {\n //if the thing received is an sdo convert it to xml\n if ($this->xml_das !== null) {\n $xml = SCA_Helper::sdoToXml($this->xml_das, $resource);\n } else {\n throw new SCA_RuntimeException(\n 'Trying to update a resource with SDO but ' .\n 'no types specified for reference'\n );\n }\n } else {\n $xml = $resource;\n }\n\n $slash_if_needed = ('/' === $this->target_url[strlen($this->target_url)-1])?'':'/';\n\n $handle = curl_init($this->target_url.$slash_if_needed.\"$id\");\n curl_setopt($handle, CURLOPT_HEADER, false);\n curl_setopt($handle, CURLOPT_RETURNTRANSFER, true);\n curl_setopt($handle, CURLOPT_CUSTOMREQUEST, \"PUT\");\n curl_setopt($handle, CURLOPT_POSTFIELDS, $xml);\n\n //replace with Content-Type: atom whatever\n $headers = array(\"User-Agent: SCA\",\n \"Content-Type: text/xml;\",\n \"Accept: text/plain\");\n curl_setopt($handle, CURLOPT_HTTPHEADER, $headers);\n\n $result = curl_exec($handle);\n\n $response_http_code = curl_getinfo($handle, CURLINFO_HTTP_CODE);\n\n curl_close($handle);\n\n $response_exception = $this->buildResponseException($response_http_code, '200');\n\n if ($response_exception != null) {\n throw $response_exception;\n } else {\n //update does not return anything in the body\n return true;\n }\n }", "public function update(Request $request, $id)\n {\n $this->validate($request, [\n 'name' => 'required',\n 'link' => 'required',\n 'description' => 'required'\n ]);\n\n $resource = Resource::find($id);\n $resource->name = $request->name;\n $resource->type_id = $request->type_id;\n $resource->has_cost = ($request->has('has_cost')) ? 1 : 0;\n $resource->language_id = $request->language_id;\n $resource->link = $request->link;\n $resource->description = $request->description;\n $resource->tags = '';\n\n $resource->save();\n //return back()->with('success', 'Recurso actualizado satisfactoriamente');\n return redirect('/resource')->with('success', 'Recurso actualizado satisfactoriamente');\n }", "public function update(Request $request, $id)\n {\n $oldProduct = Product::findOrFail($id);\n $data = $request->all();\n if(isset($data['img'])){\n // $file = $request->file('photo');\n // return $file;\n $imgName = time().'.'.$request->img->extension();\n $data['img'] = $imgName;\n // Storage::putFile('spares', $file);\n $path = $request->img->storeAs('public/uploads', $imgName); //in Storage\n\n //delete old file\n if($oldProduct->img != 'product-default.png'){\n Storage::delete(\"public/uploads/\".$oldProduct->img);\n // return 'deleted';\n }\n \n }else{\n $data['img'] = $oldProduct->img;\n }\n $oldProduct->update($data);\n return redirect()->route('product.index'); \n\n }", "public function update($request, $id) {\n\t\t\t$image = $request['photo'];\n\t\t\tif($image !== null) {\n\t\t\t\t$name = time().'.' . explode('/', explode(':', substr($image, 0, strpos($image, ';')))[1])[1];\n\t\t\t\t\\Image::make($request['photo'])->save(public_path('storage/products/').$name);\n\t\t\t\t$request['photo'] = $name;\n\t\t\t} else {\n\t\t\t\t$currenPhoto = Product::all()->where('id', $id)->first();\n\t\t\t\t$request['photo'] = $currenPhoto->photo;\n\t\t\t}\n return $this->product->update($id, $request);\n\t}", "public function updateStream($path, $resource, Config $config)\n {\n }", "public function edit(Resource $resource)\n {\n //\n }", "public function updateResourceIndex(&$resource) {\n if ($this->connector != null) {\n\n // STEP 1: Update or insert this resource as a node:\n $this->logger->addDebug(\"Updating/Inserting Node into Neo4J database\");\n $result = $this->connector->run(\"MATCH (a:Resource {id: {id} }) SET a.title = {title}, a.version = {version}, a.href = {href}\n return a;\",\n [\n 'id' => $resource->getID(),\n 'version' => $resource->getVersion(),\n 'title' => $resource->getTitle(),\n 'href' => $resource->getLink()\n ]\n );\n\n // Check to see if anything was added\n $records = $result->getRecords();\n if (empty($records)) {\n // Must create this record instead\n $result = $this->connector->run(\"CREATE (n:Resource) SET n += {infos};\",\n [\n \"infos\" => [\n 'id' => $resource->getID(),\n 'version' => $resource->getVersion(),\n 'title' => $resource->getTitle(),\n 'href' => $resource->getLink()\n ]\n ]\n );\n }\n\n // STEP 2: Update or insert the resource's link to holding repository\n $result = $this->connector->run(\"MATCH (a:Resource {id: {id} })-[r:HIRELATION]->()\n return r;\",\n [\n 'id' => $resource->getID(),\n ]\n );\n $records = $result->getRecords();\n if (!empty($records)) {\n // delete the one there so that we can add the correct one (just in case)\n $result = $this->connector->run(\"MATCH (a:Resource {id: {id}})-[r:HIRELATION]->() delete r;\",\n [\n 'id' => $resource->getID()\n ]\n );\n\n }\n\n // If resource has a repository, then add a link\n if ($resource->getRepository() != null && $resource->getRepository()->getID() != null) {\n $this->connector->run(\"MATCH (a:Identity {id: {id1} }) MATCH (b:Resource {id: {id2} }) CREATE (b)-[r:HIRELATION]->(a);\",\n [\n 'id1' => (string) $resource->getRepository()->getID(),\n 'id2' => $resource->getID()\n ]);\n }\n }\n }", "public function update($data) {}", "public function update($data) {}", "public function putStream($resource);", "public function update(Request $request, NebulaResource $resource, $item): RedirectResponse\n {\n $this->authorize('update', $item);\n\n $validated = $request->validate($resource->rules(\n $resource->editFields()\n ));\n\n $resource->updateQuery($item, $validated);\n\n $this->toast(__(':Resource updated', [\n 'resource' => $resource->singularName(),\n ]));\n\n return redirect()->back();\n }", "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 }", "public function update($entity);", "public function update($entity);", "public function setResource($resource);", "public function updateStream($path, $resource, Config $config)\n {\n return $this->upload($path, $resource, $config);\n }", "public function isUpdateResource();", "public function update(Request $request, $id)\n {\n $device = Device::findOrFail($id);\n $device->fill($request->all());\n if ($request->hasFile('icon')) {\n if ($device->hasMedia('icon')) {\n $device->deleteMedia($device->getFirstMedia('icon'));\n }\n $device->addMediaFromRequest('icon')->toMediaCollection('icon');\n }\n $device->save();\n return new DeviceResource($device);\n }", "public function update(Request $request, $id)\n {\n //\n $product = Product::findOrFail($id);\n \n $product->update($request->all());\n \n $file = $request->file('url_image')->move('upload', $request->file('url_image')->getClientOriginalName());\n\n Product::where('id',$id)->update(['url_image'=>$file]);\n \n \\Session::flash('flash_message', 'Edit product successfully.'); \n \n //cũ : return redirect('articles');\n return redirect()->route('products.index');\n }", "public function store($data, Resource $resource);", "public function update(Request $request, $id)\n {\n \n $product = Product::find($id);\n\n\n $product->fill($request->all())->save();\n\n //Verificamos que tenemos una imagen\n if($request->file('photo_1')){\n\n\n //En caso de tenerla la guardamos en la clase Storage en la carpeta public en la carpeta image.\n $path = Storage::disk('public')->put('photo_1',$request->file('photo_1'));\n\n //Actualizamos el Post que acabamos de crear\n $product->fill(['photo_1' => asset($path)])->save();\n\n }\n\n\n return redirect()->route('products.index')->with('info', 'Producto actualizado exitosamente!');\n }", "public function update(Request $request, $id)\n {\n $product = Product::find($id);\n\n if (\\Input::hasFile('image')) {\n $this->imgsave($request, $product);\n }\n\n\n if (!empty($request->input('tags'))) {\n $product->tags()->sync($request->input('tags'));\n } else {\n $product->tags()->detach();\n }\n\n $product->update($request->all());\n\n return redirect()->to('dashboard/product')->with('message', 'update success');\n }", "public function put($resource_path, array $variables = array()) {\n return $this->call($resource_path, $variables, 'PUT');\n }", "public function update($id)\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n if (method_exists($this, 'updateValidations')) {\n $this->request->validate($this->updateValidations());\n }\n\n /* Get the specified resource */\n $resource = $this->model::findOrFail($id);\n\n /* Update the specified resource */\n $resource->update(Input::all());\n\n /* Redirect back */\n return redirect()->back()\n ->with(\n 'info',\n Lang::has($this->name . '.resource-updated') ?\n $this->name . '.resource-updated' :\n 'messages.alert.resource-updated'\n );\n }", "public function putResponse($request)\n {\n $idSearched = $this->searcher->searchResourceIndex(\n $request, \n $this->db[$request['resource']]\n );\n if ($idSearched) {\n $resource = $this->db[$request['resource']][$idSearched];\n $bodyInput = json_decode($this->standardInput, true);\n $resource = BodyRequest::canApplyBody($bodyInput);\n $resource['id'] = (int)$request['param'];\n foreach($resource as $key => $value) {\n $this->db[$request['resource']][$idSearched][$key] = $value;\n }\n file_put_contents(DB_PATH, json_encode($this->db));\n }\n }", "public function update(Storedataset $request, dataset $dataset){\n $dataset->title = $request->input('title');\n $dataset->caption = $request->input('caption');\n $dataset->file_url = $request->input('file_url');\n $dataset->type = $request->input('type');\n $dataset->status = $request->input('status');\n $dataset->publication_id = $request->input('publication_id');\n\n $dataset->save();\n\n return redirect()->route('datasets.show', ['dataset' => $dataset]);\n }", "public function update(Request $request, $id)\n\n {\n ResourceManagement::findOrFail($id);\n $constraints = [\n 'title' => 'required|max:100',\n 'url'=> 'required|max:191',\n 'content' => 'required'\n ];\n\n $input = [\n 'title' => $request['title'],\n 'url' => $request['url'],\n 'content' => $request['content'],\n 'type' => $request['type'],\n 'level' => $request['level'],\n 'user_id' => $request['user']\n ];\n// $this->validate($input, $constraints);\n ResourceManagement::where('id', $id)\n ->update($input);\n\n return redirect()->intended('/resource-management');\n }", "public function update(Request $request, $id)\n {\n $this->validate($request, [\n 'title' => 'required',\n 'description' => 'required|string',\n 'price' => 'required|numeric',\n 'reference'=>'required'\n ]);\n \n $product = Product::find($id);\n $product->update($request->all());\n \n $im = $request->file('picture');\n \n if (!empty($im)) {\n \n $link = $request->file('picture')->store('images');\n \n \n $product->update([\n 'url_image' => $link,\n ]);\n } \n //dump($request->all());\n return redirect()->route('product.index')->with('message', 'Article modifié avec succès');\n }", "public function update(StoreOrUpdateAsset $request, Asset $asset)\n {\n if (Storage::exists($asset->path) && !Storage::delete($asset->path)) {\n abort(500);\n }\n\n $file = $request->file('file');\n $path = $file->store('assets');\n\n if (!$path) {\n abort(500);\n }\n\n // We wonder if we should delete the old file or not...\n\n $asset->name = $file->getClientOriginalName();\n $asset->size = $file->getSize();\n $asset->type = $file->getMimeType();\n $asset->path = $path;\n\n if ($asset->save()) {\n flash('The asset has been saved.')->success();\n } else {\n abort(500);\n }\n\n return redirect('/admin/assets');\n }", "public function update(FoodRecipeRequest $request, $id)\n {\n $foodRecipe = FoodRecipe::with('ingredients','cookingProcesses')->findOrFail($id);\n if ($request->input('name')!= null)\n $foodRecipe->name = $request->input('name');\n if ($request->input('detail')!= null)\n $foodRecipe->detail = $request->input('detail');\n if($request->file('photo') != null) {\n $old_file = $foodRecipe->photo;\n if($old_file != null){\n $path = public_path().'/storage/'.$old_file;\n File::delete($path);\n }\n $file = $request->file('photo');\n $name = '/foodRecipe/' . Carbon::now()->format(\"dnY-Hisu\") . \".\" . $file->extension();\n $file->storePubliclyAs('public', $name);\n $foodRecipe->photo = $name;\n }\n $foodRecipe->save();\n return new FoodRecipeResource($foodRecipe);\n }", "public function update(StorageTypeRequest $request, $id)\n {\n try {\n $this->service->updateStorageType($request, $id);\n return $this->NoContent();\n } catch (EntityNotFoundException $e) {\n \\Log::error($e->getMessage());\n return $this->NotFound($e->getMessage());\n } catch(\\QueryException $e) {\n \\Log::error($e->getMessage());\n return $this->ServerError();\n } catch(Exception $e) {\n \\Log::error($e->getMessage());\n return $this->ServerError();\n }\n }", "public function update(Request $request, $id)\n {\n //validation\n $this->validate(request(),[\n 'image' => 'image'\n ]);\n\n $slider = HomeSliders::find($id);\n \n $slider->link = request('link');\n\n //get old image to delete if updated\n $oldImage = request('oldImage');\n //get the new image\n $NewImage=$request->file('image');\n\n if($NewImage)\n {\n $filenameToStore= helpers::updatePhoto('image','homeSliders',$request);\n $slider->image=$filenameToStore;\n\n Storage::delete('public/Images/homeSliders/'.$oldImage);\n }\n\n $slider->save();\n\n Alert::success(config('app.name'), trans('messages.Updated Successfully') );\n return redirect()->route('admin.homeSlider',$slider->type);\n }", "public function update(Qstore $request, $id)\n {\n //\n }", "public function update(IEntity $entity);", "protected function performUpdate(): bool\n {\n // Abort if resource does not support update operations\n if (!$this->isUpdatable()) {\n throw new UnsupportedOperation(sprintf('API does not support update operation for %s resources', $this->resourceNameSingular()));\n }\n\n $id = $this->id();\n $prepared = $this->prepareBeforeUpdate($this->toArray());\n\n $payload = [\n $this->resourceNameSingular() => $prepared\n ];\n\n $response = $this\n ->request()\n ->put($this->endpoint($id), $payload);\n\n // Extract and (re)populate resource (if possible)\n // Note: Unlike the \"create\" method, Redmine does NOT\n // appear to send back a full resource when it has been\n // successfully updated.\n $this->fill(\n $this->decodeSingle($response)\n );\n\n return true;\n }", "public function update($request, $id);", "function put($resource, $data = null) {\r\n\t\t\r\n\t\tif(isset($data)) {\r\n\t\t\t$this->request_body = $data;\r\n\t\t}\r\n\r\n\t\t// make the call chief\r\n\t\t$this->exec ( \"PUT\", '/' . $resource );\r\n\r\n\t\t// check the request status\r\n\t\tif($this->status_code != 200){\r\n\t\t\t$this->Logger->error(\r\n\t\t\t\tsprintf(\r\n\t\t\t\t\t'GET Call for resource \\'%s\\' Failed.\r\n\t\t\t\t\tStatus: %d,\r\n\t\t\t\t\tRequest: %s\r\n\t\t\t\t\tAPI Error Message: \r\n\t\t\t\t\t%s',\r\n\t\t\t\t\t$resource,\r\n\t\t\t\t\t$this->status_code,\r\n\t\t\t\t\t$this->request_body_raw,\r\n\t\t\t\t\t$this->response_body\r\n\t\t\t\t)\r\n\t\t\t);\r\n\t\t\tthrow new Exception($this->response_body);\r\n\t\t} else {\r\n\t\t\treturn $this->response_parsed;\r\n\t\t}\r\n\t}", "public function updateEntities($resource)\n {\n $json = [\n 'resource' => $resource,\n ];\n $request = $this->createRequest('PUT', '/entities', ['json' => $json]);\n $response = $this->send($request);\n return $response;\n }", "public function updateStream($path, $resource, Config $config)\n {\n return $this->writeStream($path, $resource, $config);\n }", "public function update(Request $request, $id)\n {\n\n $product = Product::findOrFail($id);\n $product->name = $request['name'];\n $product->price = $request['price'];\n $product->stock = $request['stock'];\n $product->description = $request['description'];\n\n $file = $request->file('image');\n $fileName = $file->getClientOriginalName();\n if($fileName != $product->image){\n $request->file('image')->move('images/',$fileName);\n $product->image = $fileName;\n }\n\n $product->save();\n\n return redirect()->route('products.show',\n $product->id)->with('flash_message',\n 'Article, '. $product->name.' updated');\n }", "protected function handleUpdate()\n {\n $resource = $this->argument('resource');\n $action = $this->option('action');\n $startPage = (int)$this->option('startPage');\n $perPage = (int)$this->option('perPage');\n\n try {\n $harvest = Harvest::where('resource', $resource)->where('action', $action)->firstOrFail();\n } catch (\\Exception $e) {\n $this->info('There is no existing action for updating ' . ucwords($action) . ' ' . ucwords($resource) . '.');\n exit('Nothing was updated.');\n }\n\n $options = [\n 'startPage' => $startPage,\n 'perPage' => $perPage,\n 'lastRun' => $harvest->last_run_at\n ];\n\n // If a lastRun was given use that\n // OR if this has never been run before use 2001-01-01\n if (!empty($this->option('lastRun'))) {\n $options['lastRun'] = new Carbon($this->option('lastRun'));\n } elseif (is_null($options['lastRun'])) {\n $options['lastRun'] = new Carbon('2001-01-01');\n }\n\n $job = new UpdateResourceJob(\n $harvest,\n $options\n );\n\n $message = 'Updating ' . $action . ' ' . $resource . ' ' . $perPage . ' at a time';\n if (isset($lastRun)) {\n $message .= ' with entries updated since ' . $lastRun->format('r');\n }\n $this->info($message);\n $this->dispatch($job);\n }", "abstract public function put($data);", "public function update($id, $data);", "public function update($id, $data);", "public function update($id, $data);", "public function update($id, $data);", "public function update($id, $data);", "public function testUpdateSupplierUsingPUT()\n {\n }", "public function update(Request $request, $id)\n {\n $storageplace = Storageplace::findOrFail($id);\n $storageplace->update($request->only(['storageplace']));\n return $storageplace;\n }", "public function updateRelatedImage(Request $request, $id)\n {\n // Delete display image in Storage\n Validator::make($request->all(), ['photos' => \"required|file|image|mimes:jpg,png,jpeg|max:5000\"])->validate();\n\n\n if ($request->hasFile(\"photos\")) {\n\n $photo = ProductsPhoto::find($id);\n $imageName = $photo->photos;\n $exists = Storage::disk('local')->exists(\"public/product_images/\" . $photo->photos);\n\n //delete old image\n if ($exists) {\n Storage::delete('public/product_images/' . $imageName);\n }\n\n //upload new image\n $ext = $request->file('photos')->getClientOriginalExtension(); //jpg\n\n $request->photos->storeAs(\"public/product_images/\", $imageName);\n\n $arrayToUpdate = array('photos' => $imageName);\n DB::table('products_photos')->where('id', $id)->update($arrayToUpdate);\n\n return redirect()->route(\"adminDisplayRelatedImageForm\", ['id' => $photo->product_id]);\n } else {\n\n $error = \"NO Image was Selected\";\n return $error;\n }\n }", "public function update(Request $request, $id)\n {\n $skill = Skill::findOrFail($id);\n\n $skill->skill = $request->skill;\n\n if ($request->hasFile('image')) {\n \\Cloudder::upload($request->file('image'));\n $c=\\Cloudder::getResult();\n // $image = $request->file('image');\n // $filename = time() . '.' . $image->getClientOriginalExtension();\n // $location = public_path('images/' . $filename);\n // Image::make($image)->save($location);\n\n $skill->image = $c['url'];\n }\n\n $skill->save();\n\n Session::flash('success', 'Successsfully updated your skill!');\n return redirect()->route('skills.index');\n }", "public function updateStream($path, $resource, Config $config = null)\n {\n $contents = stream_get_contents($resource);\n\n return $this->write($path, $contents, $config);\n }", "public abstract function update($object);", "public static function update($id, $file)\n {\n Image::delete($id);\n\n Image::save($file);\n }", "public function update(Request $request, $id)\n {\n $product = Product::find($id);\n $image = $product->image;\n if($request->hasFile('image')){\n $image = $request->file('image')->store('files');\n \\Storage::delete($product->image);\n } \n $product->name = $request->get('name');\n $product->price = $request->get('price');\n $product->description = $request->get('description');\n $product->additional_info = $request->get('additional_info');\n $product->category_id = $request->get('category');\n $product->subcategory_id = $request->get('subcategory');\n $product->image = $image;\n $product->save();\n return redirect()->back();\n }", "public function update(Request $request, $id)\n {\n $sli=Slider::find($id);\n $sli->sort_order=$request->input('sort_order');\n $image = $request->file('slider');\n if($image == ''){\n $image = $sli->slider;\n }else{\n $image = base64_encode(file_get_contents($request->file('slider')));\n }\n $sli->slider = $image;\n $sli->save();\n return redirect()->back();\n }", "public function update(ProductRequest $request, $id)\n {\n $input = Product::find($id);\n $data = $request->all();\n if ($file = $request->file('product_photo')){\n $name = time().$file->getClientOriginalName();\n $file->move('product_image',$name);\n $data['product_photo']=$name;\n// $input->update($data);\n }\n $input->update($data);\n return redirect('admin/products/');\n }", "public function update(Request $request, $id)\n {\n $volume = $this->findVolume($id);\n\n if(count($volume) > 0) {\n $volume->str_volume_name = $request->str_volume_name;\n\n $volume->save();\n }\n\n return response()\n ->json(\n array(\n 'message' => 'Volume is successfully updated.',\n 'volume' => $volume\n ),\n 201\n );\n }", "public function update(Request $request, $id)\n {\n $product = ProductModel::find($id);\n $product->name = $request->name;\n $product->description = $request->description;\n $product->price = $request->price;\n $product->stock = $request->stock;\n\n if($request->image!=null){\n $imageName = time().'.'.$request->image->extension();\n $request->image->move(public_path('images'), $imageName);\n $product->image = \"/images/\".$imageName;\n }\n $product->save();\n return redirect(\"/products/index\")->with('success','Product has been updated');\n }", "public function update()\n {\n $accessory = Accessories::find(request('id'));\n\n if ($accessory == null) {\n return response()->json([\"error\" => \"aksesuaras nerastas\"], 404);\n }\n\n $this->validateData();\n $path = $accessory->src;\n\n if (request()->hasFile('src')) {\n\n if (Storage::disk('public')->exists($accessory->src)) {\n Storage::disk('public')->delete($accessory->src);\n }\n $path = request()->file('src')->store('accessoriesImages', 'public');\n }\n\n $accessory->update(array_merge($this->validateData(), ['src' => $path]));\n\n return response()->json([\"data\" => $accessory], 200);\n }", "public function update(ProductStoreRequest $request,$id)\n {\n $data = $request->validated();\n $product = Product::where('id',$id);\n $product->update($data);\n return response(\"Producto actualizado con éxito\",200);\n }", "public function update($entity)\n {\n \n }", "public function updateStream($path, $resource, Config $config)\n {\n return $this->write($path,stream_get_contents($resource),$config);\n }", "public function update($id, Request $request)\n {\n date_default_timezone_set('Asia/Taipei');\n $data = $request->all();\n $dbData = Product::find($id);\n $myfile = Storage::disk('local');\n if ($request->hasFile('img')) {\n $file = $request->file('img');\n $path = $myfile->putFile('public', $file);\n $data['img'] = $myfile->url($path);\n File::delete(public_path($dbData->img));\n }\n $dbData->update($data);\n\n if ($request->hasFile('imgs')) {\n // $this->fetchDestroyByProdId($id);\n $localS = Storage::disk('local');\n\n $fileS = $request->file('imgs');\n $imgs = [];\n foreach ($fileS as $i) {\n $pathS = $localS->putFile('public', $i);\n $imgs[] = $localS->url($pathS);\n }\n foreach ($imgs as $img) {\n ProductImg::create([\n 'product_id' => $id,\n 'img' => $img\n ]);\n }\n }\n\n return redirect()->route('admin');\n }", "public function update(Request $request, Product $product)\n { $remfile= $product->image;\n if($request->filep){\n $product->image=$request->filep;\n File::delete(storage_path('app/public/products/'.$remfile));\n }else{\n $product->image=$remfile;\n }\n //rmdir(storage_path('app/public/products/'.$remfile));\n $product->name = $request->name;\n $product->description = $request->description;\n $product->price = $request->price;\n $product->save();\n sleep(3);\n toast('Details updated successfully','info');\n return redirect('/products');\n }", "public function update($id, $input);", "public function update(ProductRequest $request,int $id): ProductResource\n {\n $attributes = $request->only('supplier_id', 'name', 'warehouses');\n\n return new ProductResource($this->productRepository->update($id, $attributes)); }", "public function update(Request $request, $id)\n {\n $slider=new Slider;\n $slider=$slider::find($id);\n \n \n if($file =$request->file('slider')){\n if(Storage::delete('public/slider/'.$slider->slider)){\n\n //Get file original name//\n \n$original_name=$file->getClientOriginalName();\n\n //Get just the file name\n$filename=pathinfo($original_name,PATHINFO_FILENAME);\n\n//Create new file name\n$name=$filename.'_'.time().'.'.$file->getClientOriginalExtension();\n\n $destination='public/slider';\n $path=$request->slider->storeAs($destination,$name);\n $slider->slider=$name;\n $slider->save();\n return redirect('Admin/slider');\n\n }\n }\n}", "public function update(Request $request, $id)\n {/* dd($request->all()); */\n $acheivePic = $this->acheiveRepo->find($id);\n $acheive = $request->except('_method', '_token', 'photo', 'ar', 'en');\n $acheiveTrans = $request->only('ar', 'en');\n\n if ($request->hasFile('icon')) {\n // Delete old image first.\n $oldPic = public_path() . '/images/acheives/' . $acheivePic->icon;\n File::delete($oldPic);\n\n // Save the new one.\n $image = $request->file('icon');\n $imageName = $this->upload($image, 'acheives');\n $acheive['icon'] = $imageName;\n }\n\n $this->acheiveRepo->update($id, $acheive, $acheiveTrans);\n\n return redirect('admin-panel/widgets/acheive')->with('updated', 'updated');\n }", "public function update(Request $request, $id)\n {\n $data = $request->all();\n extract($data);\n\n $productVarient = new ProductVariant();\n $productVarient = $productVarient->find($id);\n $productVarient->vendor_id = auth()->user()->id;\n $productVarient->description = $prod_desc;\n $productVarient->price = $price;\n\n if(request()->hasFile('photo')){\n $image = request()->file('photo')->getClientOriginalName();\n $imageNewName = auth()->user()->id.'-'.$image;\n $file = request()->file('photo');\n $file->storeAs('images/product',$imageNewName, ['disk' => 'public']);\n $productVarient->image = $imageNewName;\n }\n \n $productVarient->save();\n\n return back()->withStatus(__('Product successfully updated.'));\n }", "public function update(Request $request, $id)\n {\n //if upload new image, delete old image\n $myfile=$request->old_photo;\n if($request->hasfile('photo'))\n {\n $imageName=time().'.'.$request->photo->extension();\n $name=$request->old_photo;\n\n if(file_exists(public_path($name))){\n unlink(public_path($name));\n $request->photo->move(public_path('backendtemplate/truefalseimg'),$imageName);\n $myfile='backendtemplate/truefalseimg/'.$imageName;\n }\n }\n //Update Data\n $truefalsequestion=TrueFalseQuestion::find($id);\n $truefalsequestion->name=$request->name;\n $truefalsequestion->photo=$myfile;\n $truefalsequestion->answer = $request->answer;\n $truefalsequestion->question_id = $request->question;\n $truefalsequestion->save();\n\n //Redirect\n return redirect()->route('truefalsequestions.index'); \n }", "public function update($id);", "public function update($id);", "private function update()\n {\n $this->data = $this->updateData($this->data, $this->actions);\n $this->actions = [];\n }", "public function put($path, $data = null);", "public function update(Request $request, $id)\n {\n $request->validate([\n 'path_image'=>'image',\n 'status'=>'required|in:0,1'\n ]);\n $slider=Slider::whereId($id)->first();\n if (is_null($slider)){\n return redirect()->route('sliders.index')->with('error','Slider does not exist');\n }\n try {\n if ($request->hasFile('path_image')){\n $file = $request->file('path_image');\n\n $image_path= $file->store('/sliders',[\n 'disk'=>'uploads'\n ]);\n Storage::disk('uploads')->delete($slider->image);\n\n $request->merge([\n 'image'=>$image_path,\n ]);\n }\n\n $slider->update( $request->only(['status','image']));\n return redirect()->route('sliders.index')->with('success','Updated successful');\n }catch (\\Exception $exception){\n return redirect()->route('sliders.index')->with(['error'=>'Something error try again']);\n\n }\n }", "public function update() {\n $this->accessory->update($this->accessory_params());\n\n if ($this->accessory->is_valid()) {\n $this->update_accessory_image($this->accessory);\n redirect('/backend/accessories', ['notice' => 'Successfully updated.']);\n } else {\n redirect(\n '/backend/accessories/edit',\n ['error' => $this->accessory->errors_as_string()],\n ['id' => $this->accessory->id]\n );\n }\n }", "public function update(Entity $entity);", "public function update(Request $request, $id)\n {\n $icon = SliderIcon::find($id);\n $data = $request->all();\n $data['active'] = $request->has('active') ? 1 : 0;\n if ($request->hasFile('img')) {\n if (Storage::disk('public')->exists(str_replace('storage', '', $icon->img))){\n Storage::disk('public')->delete(str_replace('storage', '', $icon->img));\n }\n $image = $request->file('img');\n $fileName = time().'_'.Str::lower(Str::random(5)).'.'.$image->getClientOriginalExtension();\n $path_to = '/upload/images/'.getfolderName();\n $image->storeAs('public'.$path_to, $fileName);\n $data['img'] = 'storage'.$path_to.'/'.$fileName;\n }\n $icon->update($data);\n return redirect()->route('slider_icons.index')->with('success', 'Данные преимущества обнавлены');\n }", "public function update() {\n\t $this->layout = false;\n\t \n\t //set default response\n\t $response = array('status'=>'failed', 'message'=>'HTTP method not allowed');\n\t \n\t //check if HTTP method is PUT\n\t if($this->request->is('put')){\n\t //get data from request object\n\t $data = $this->request->input('json_decode', true);\n\t if (empty($data)) {\n\t $data = $this->request->data;\n\t }\n\t \n\t //check if product ID was provided\n\t if (!empty($data['id'])) {\n\t \n\t //set the product ID to update\n\t $this->Player->id = $data['id'];\n\t if ($this->Player->save($data)) {\n\t $response = array('status'=>'success','message'=>'Product successfully updated');\n\t } else {\n\t $response['message'] = \"Failed to update product\";\n\t }\n\t } else {\n\t $response['message'] = 'Please provide product ID';\n\t }\n\t }\n\t \n\t $this->response->type('application/json');\n\t $this->response->body(json_encode($response));\n\n\t return $this->response->send();\n\t}", "public function update(Request $request, $id)\n {\n //validate incoming request\n $request->validate([\n 'name' => 'string|max:100|nullable',\n 'picture' => 'max:2000|mimes:jpeg,jpg,png,svg|nullable', //max size 2mb,\n 'total' => 'integer|min:0|nullable', //value must be > 0\n 'selling_price' => 'numeric|min:0|nullable',\n 'cost_price' => 'numeric|min:0|nullable',\n 'category_id' => 'integer|nullable'\n ]);\n\n try {\n $product = Auth::user()->store->product()->findorFail($id);\n } catch (ModelNotFoundException $e) {\n return response()->json([\n \"message\" => \"Forbidden\"\n ], 403);\n }\n\n //if category id isnt null\n if ($category_id = $request->category_id) {\n if (!$this->isCategoryIdValid($category_id))\n return response()->json([\n \"message\" => \"Category Id is not valid\"\n ], 422);\n else\n $product->category_id = $request->category_id;\n }\n\n //if uploaded file exist\n if ($picture = $request->file(\"picture\")) {\n //if product already has logo\n if ($product->picture)\n Storage::delete(Product::$PICTURE_PATH . \"/\" . $product->picture);\n\n $picture_path = $picture->store(Product::$PICTURE_PATH);\n //remove folder name from path\n $product->picture = str_replace(Product::$PICTURE_PATH . \"/\", '', $picture_path);\n }\n\n $this->renewProduct($product, $request);\n $product->save();\n return response()->json(new ProductResource($product), 200);\n }", "public function update(Request $request, $id)\n {\n $request->validate([\n 'name' => 'required | min:3 | string',\n 'type' => 'required',\n 'producer' => 'required',\n 'image' => 'image | mimes:png,jpg,jpeg',\n 'price_input' => 'required | numeric | min:0 | max:300000000',\n 'promotion_price' => 'required | numeric | max:300000000',\n 'description' => 'required | string',\n\n ]);\n $product = Product::withTrashed()->findOrfail($id);\n $product->name = $request->name;\n $product->id_type = $request->type;\n $product->id_producer = $request->producer;\n\n $product->amount = $request->amount;\n if (request('image')) {\n $product->image = base64_encode(file_get_contents($request->file('image')->getRealPath()));\n }\n\n $product->price_input = $request->price_input;\n\n if ( $request->promotion_price >= 0 && $request->promotion_price < $product->price_input) {\n $product->promotion_price = $request->promotion_price;\n }else{\n return back()->with('error', '\n Do not enter a negative number');\n }\n $product->new = $request->new;\n\n $product->description = $request->description;\n\n $product->save();\n $product->size()->sync(request('size'));\n\n return redirect()->route('product.index')->with('success', 'Product Updated successfully');\n }", "public function update(Request $request, $id)\n {\n $product = Product::find($id);\n\n $product->name = $request->input('name');\n $product->description = $request->input('description');\n $product->lastPrice = $product->price !== $request->input('price') ? $product->price : NULL;\n $product->price = $request->input('price');\n\n if ($request->hasFile('image')) { \n $currentImg = $product->image;\n if ($currentImg) {\n Storage::delete('/public/' . $currentImg);\n }\n $image = $request->file('image'); \n $path = $image->store('images','public');\n $product->image = $path;\n };\n\n $product->save(); \n\n $product_promotions = $request->input('promotion');\n\n $product->promotions()->sync($product_promotions);\n\n return redirect()->route('admin.modify');\n }", "public static function updateImage($fileName, $imageId, $storage)\n {\n //Get image name and storage location for image\n $image = Image::where('id', '=', $imageId)->first();\n\n //Delete old image\n ResourceHandler::delete($image->name, $image->storage);\n\n //Store the new image\n $image->name = $fileName;\n $image->storage = $storage;\n\n $image->save();\n }", "public function update($request, $id)\n {\n $this->checkExits($id);\n $data = $request->except(['_method','_token','photo']);\n\n if($request->photo)\n {\n try {\n $this->UploadFile($request);\n } catch (\\Exception $e) {\n //if has exception , don't has action\n }\n if ($this->img !== '') {\n $data['img'] = $this->img;\n }\n }\n\n $this->object->update($data);\n\n }", "public function updateProduct($request, $product)\n {\n $product->update($request->except(['_token', '_method', 'image']));\n if ($request->hasFile('image')) {\n $image = $request->file('image');\n $imageName = time() . '.' . $request->file('image')->extension();\n // $img = Image::make('public/foo.jpg');\n\n $image_resize = Image::make($image->getRealPath());\n $image_resize->resize(500, 500);\n $image_resize->save(public_path('images/') . $imageName, 100);\n $product->gallery = $imageName;\n $product->save();\n }\n $product->getTags()->sync($request->input('tags'));\n }" ]
[ "0.7425105", "0.70612276", "0.70558053", "0.6896673", "0.6582159", "0.64491373", "0.6346954", "0.62114537", "0.6145042", "0.6119944", "0.61128503", "0.6099993", "0.6087866", "0.6052593", "0.6018941", "0.60060275", "0.59715486", "0.5946516", "0.59400934", "0.59377414", "0.5890722", "0.5860816", "0.5855127", "0.5855127", "0.58513457", "0.5815068", "0.5806887", "0.57525045", "0.57525045", "0.57337505", "0.5723295", "0.5714311", "0.5694472", "0.5691319", "0.56879413", "0.5669989", "0.56565005", "0.56505877", "0.5646085", "0.5636683", "0.5633498", "0.5633378", "0.5632906", "0.5628826", "0.56196684", "0.5609126", "0.5601397", "0.55944353", "0.5582592", "0.5581908", "0.55813426", "0.5575312", "0.55717176", "0.55661047", "0.55624634", "0.55614686", "0.55608666", "0.55599797", "0.55599797", "0.55599797", "0.55599797", "0.55599797", "0.55573726", "0.5556878", "0.5554201", "0.5553069", "0.55530256", "0.5543788", "0.55435944", "0.55412996", "0.55393505", "0.55368495", "0.5535236", "0.5534954", "0.55237365", "0.5520468", "0.55163723", "0.55125296", "0.5511168", "0.5508345", "0.55072427", "0.5502385", "0.5502337", "0.5501029", "0.54995877", "0.54979175", "0.54949397", "0.54949397", "0.54946727", "0.5494196", "0.54941916", "0.54925025", "0.5491807", "0.5483321", "0.5479606", "0.5479408", "0.5478678", "0.54667485", "0.5463411", "0.5460588", "0.5458525" ]
0.0
-1
Remove the specified resource from storage.
public function destroy($id) { $ebook = Ebook::find($id); if ($ebook->delete()) { $path = 'uploads/file/'.$ebook->file; if (file_exists($path)) { unlink($path); } Session::flash('success','Ebook Delete Successfully'); } return redirect()->back(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function delete($resource){\n return $this->fetch($resource, self::DELETE);\n }", "public function destroy(Resource $resource)\n {\n //\n }", "public function removeResource($resourceID)\n\t\t{\n\t\t}", "public function unpublishResource(PersistentResource $resource)\n {\n $client = $this->getClient($this->name, $this->options);\n try {\n $client->delete(Path::fromString($this->getRelativePublicationPathAndFilename($resource)));\n } catch (FileDoesNotExistsException $exception) {\n }\n }", "public function deleteResource(&$resource) {\n\n if ($this->connector != null) {\n $this->logger->addDebug(\"Deleting Resource Node from Neo4J database\");\n $result = $this->connector->run(\"MATCH (a:Resource {id: {id}}) detach delete a;\",\n [\n 'id' => $resource->getID()\n ]\n );\n $this->logger->addDebug(\"Updated neo4j to remove resource\");\n }\n\n }", "public function deleteShopifyResource() {\n $this->getShopifyApi()->call([\n 'URL' => API::PREFIX . $this->getApiPathSingleResource(),\n 'METHOD' => 'DELETE',\n ]);\n }", "public function deleteResource()\n {\n $database = new Database();\n $id = $this->_params['id'];\n $database->deleteResource($id);\n $this->_f3->reroute('/Admin');\n }", "protected function deleteResource($fileName, $storage)\n {\n if (Storage::disk($storage)->exists($fileName)) \n {\n return Storage::disk($storage)->delete($fileName);\n }\n }", "public function delete()\n {\n persistableCollection::getInstance($this->resourceName)->deleteObject($this);\n }", "public function remove()\n {\n $this->_getBackend()->remove($this->_id);\n }", "public function remove()\n {\n if (! ftruncate($this->fileHandle, 0)) {\n throw new StorageException(\"Could not truncate $this->path\");\n }\n if (! unlink($this->path)) {\n throw new StorageException(\"Could not delete $this->path\");\n }\n }", "public function delete()\n\t{\n\t\t$s3 = AWS::createClient('s3');\n $s3->deleteObject(\n array(\n 'Bucket' => $this->bucket,\n 'Key' => $this->location\n )\n );\n\t\tif($this->local_file && file_exists($this->local_file)) {\n\t\t\tunlink($this->local_file);\n\t\t}\n $this->local_file = null;\n\t}", "public function delete()\n\t{\n\t\tsfCore::db->query(\"DELETE FROM `swoosh_file_storage` WHERE `id`='%i';\", $this->id);\n\t\t$this->fFile->delete();\n\t}", "public function delete(): void\n {\n unlink($this->getPath());\n }", "public function delete()\n {\n if($this->exists())\n unlink($this->getPath());\n }", "public function remove($path);", "function deleteFileFromStorage($path)\n{\n unlink(public_path($path));\n}", "private function destroyResource(DrydockResource $resource) {\n $blueprint = $resource->getBlueprint();\n $blueprint->destroyResource($resource);\n\n $resource\n ->setStatus(DrydockResourceStatus::STATUS_DESTROYED)\n ->save();\n }", "public function delete(): void\n {\n unlink($this->path);\n }", "public static function delete($fileName, $storage)\n {\n if (Storage::disk($storage)->exists($fileName)) \n {\n return Storage::disk($storage)->delete($fileName);\n }\n }", "public function remove() {}", "public function remove() {}", "public function remove();", "public function remove();", "public function remove();", "public function remove();", "function delete_resource($resource_id, $page)\n\t{\n\t\t//get resource data\n\t\t$table = \"resource\";\n\t\t$where = \"resource_id = \".$resource_id;\n\t\t\n\t\t$this->db->where($where);\n\t\t$resource_query = $this->db->get($table);\n\t\t$resource_row = $resource_query->row();\n\t\t$resource_path = $this->resource_path;\n\t\t\n\t\t$image_name = $resource_row->resource_image_name;\n\t\t\n\t\t//delete any other uploaded image\n\t\t$this->file_model->delete_file($resource_path.\"\\\\\".$image_name, $this->resource_path);\n\t\t\n\t\t//delete any other uploaded thumbnail\n\t\t$this->file_model->delete_file($resource_path.\"\\\\thumbnail_\".$image_name, $this->resource_path);\n\t\t\n\t\tif($this->resource_model->delete_resource($resource_id))\n\t\t{\n\t\t\t$this->session->set_userdata('success_message', 'resource has been deleted');\n\t\t}\n\t\t\n\t\telse\n\t\t{\n\t\t\t$this->session->set_userdata('error_message', 'resource could not be deleted');\n\t\t}\n\t\tredirect('resource/'.$page);\n\t}", "public function deleteImage(){\n\n\n Storage::delete($this->image);\n }", "public function del(string $resource): bool|string\n {\n $json = false;\n $fs = unserialize($_SESSION['rfe'][$this->getRoot()], ['allowed_classes' => false]);\n if (array_key_exists($resource, $fs)) {\n // if $item has children, delete all children too\n if (array_key_exists('dir', $fs[$resource])) {\n foreach ($fs as $key => $file) {\n if (isset($file['parId']) && $file['parId'] == $resource) {\n unset($fs[$key]);\n }\n }\n }\n unset($fs[$resource]);\n $_SESSION['rfe'][$this->getRoot()] = serialize($fs);\n $json = '[{\"msg\": \"item deleted\"}]';\n }\n return $json;\n }", "public function destroy()\n\t{\n\t\treturn unlink(self::filepath($this->name));\n\t}", "public function destroy($id) {\n $book = Book::find($id);\n // return unlink(storage_path(\"public/featured_images/\".$book->featured_image));\n Storage::delete(\"public/featured_images/\" . $book->featured_image);\n if ($book->delete()) {\n return $book;\n }\n\n }", "public function destroy($id)\n {\n Storageplace::findOrFail($id)->delete();\n }", "public function destroyResourceImage(): void\n\t{\n\t\tif (isset($this->image)) {\n\t\t\t@imagedestroy($this->image->getImageResource());\n\t\t}\n\t}", "public function deleteResource(PersistentResource $resource)\n {\n $pathAndFilename = $this->getStoragePathAndFilenameByHash($resource->getSha1());\n if (!file_exists($pathAndFilename)) {\n return true;\n }\n if (unlink($pathAndFilename) === false) {\n return false;\n }\n Files::removeEmptyDirectoriesOnPath(dirname($pathAndFilename));\n return true;\n }", "public function deleteImage(){\n \tStorage::delete($this->image);\n }", "public function destroy()\n {\n $file=public_path(config('larapages.media.folder')).Input::all()['folder'].'/'.Input::all()['file'];\n if (!file_exists($file)) die('File not found '.$file);\n unlink($file);\n }", "public function delete() \r\n {\r\n if($this->exists())\r\n {\r\n unlink($this->fullName());\r\n }\r\n }", "public function destroy($id)\n {\n Myfile::find($id)->delete();\n }", "public function destroy($delete = false)\n {\n if (null !== $this->resource) {\n $this->resource->clear();\n $this->resource->destroy();\n }\n\n $this->resource = null;\n clearstatcache();\n\n // If the $delete flag is passed, delete the image file.\n if (($delete) && file_exists($this->name)) {\n unlink($this->name);\n }\n }", "public static function delete($path){\r\n $currentDir = getcwd();\r\n $storageSubPath = \"/../../\".STORAGE_PATH;\r\n $file = $currentDir . $storageSubPath . '/' . $path;\r\n\r\n unlink($file);\r\n }", "public function destroy(Storage $storage)\n {\n return redirect()->route('storages.index');\n }", "public function remove() {\n //Check if there are thumbs and delete files and db\n foreach ($this->thumbs()->get() as $thumb) {\n $thumb->remove();\n } \n //Delete the attachable itself only if is not default\n if (strpos($this->url, '/defaults/') === false) {\n Storage::disk('public')->delete($this->getPath());\n }\n parent::delete(); //Remove db record\n }", "public function removeFile($uri){\n return Storage::disk('public')->delete($uri);\n }", "public function destroy(Resource $resource)\n {\n if( $resource->delete() ){\n return Response(['status'=>'success','message'=>'Resource deleted']); \n } else {\n return Response(['status'=>'error', 'message'=>'Something went wrong']);\n }\n }", "public function delete($path);", "public function delete($path);", "public function destroy($id)\n {\n $supplier = Supplier::find($id);\n $photo = $supplier->photo;\n if ($photo) {\n unlink($photo);\n }\n $supplier->delete();\n }", "public function destroy($id)\n { \n File::find($id)->remove();\n \n return redirect()->route('files.index');\n }", "public function destroy($id)\n {\n $student = Student::where('id', $id)->first();\n // $path = $student->image;\n unlink($student->image);\n Student::findOrFail($id)->delete();\n return response('Deleted!');\n }", "public function destroy($id)\n {\n $icon = SliderIcon::find($id);\n if (Storage::disk('public')->exists(str_replace('storage', '', $icon->img))){\n Storage::disk('public')->delete(str_replace('storage', '', $icon->img));\n }\n $icon->delete();\n return redirect()->route('slider_icons.index')->with('success', 'Данные преимущества удалёны');\n }", "public function delete($path, $data = null);", "public function destroy($id)\n {\n $items=Items::find($id);\n // delete old file\n if ($items->photo) {\n $str=$items->photo;\n $pos = strpos($str,'/',1);\n $str = substr($str, $pos);\n $oldFile = storage_path('app\\public').$str;\n File::Delete($oldFile); \n }\n $items->delete();\n return redirect()->route('items.index');\n }", "public function destroy($id)\n {\n $carousel = Carousel::find($id);\n $image = $carousel->image;\n\n $basename ='img/carousel/' . basename($image);\n //Delete the file from disk\n if(file_exists($basename)){\n unlink($basename);\n }\n //With softDeletes, this is the way to permanently delete a record\n $carousel->delete();\n Session::flash('success','Product deleted permanently');\n return redirect()->back();\n }", "public function remove()\n {\n $fs = new Filesystem();\n $fs->remove($this->dir());\n }", "public static function destroy(int $resource_id)\n {\n try {\n $image_data = ListingImage::where('id', $resource_id)->first();\n self::delete_image($image_data->name);\n $delete = ListingImage::where('id', $resource_id)->delete();\n\n // activity()\n // ->causedBy(Auth::user()->id)\n // ->performedOn($delete)\n // ->withProperties(['id' => $delete->id])\n // ->log('listing image deleted');\n return response()->json(['status'=> 'ok', 'msg'=> 'Data deleted successfully']);\n } catch (Exception $e) {\n $e->getMessage();\n }\n }", "public function destroy(Storage $storage)\n {\n $this->storage->destroy($storage);\n\n return redirect()->route('admin.product.storage.index')\n ->withSuccess(trans('core::core.messages.resource deleted', ['name' => trans('product::storages.title.storages')]));\n }", "public function del($path){\n\t\treturn $this->remove($path);\n\t}", "public function destroy($id)\n {\n //\n $product = Product::findOrFail($id);\n $product->delete();\n if($product->img != 'product-default.png'){\n Storage::delete(\"public/uploads/\".$product->img);\n // return 'deleted';\n }\n return redirect()->route('product.index'); \n }", "public function destroy($id)\n {\n $image = Images::withTrashed()->find($id);\n\n Storage::disk('uploads')->delete(\"social-media/$image->filename\");\n\n $image->tags()->detach();\n $image->detachMedia(config('constants.media_tags'));\n $image->forceDelete();\n\n return redirect()->back()->with('success', 'The image was successfully deleted');\n }", "public function removeUpload()\n{\n if ($file = $this->getAbsolutePath()) {\n unlink($file); \n }\n}", "public function destroyByResourceId($resource_id)\n {\n// $online_party = $this->onlinetrack->where('resource_id', $resource_id)->get()->first();\n// $online_party->status = \"offline\";\n// $online_party->save();\n// return $online_party;\n return $this->onlinetrack->where('resource_id', $resource_id)->delete();\n }", "public function revoke($resource, $permission = null);", "public function destroy($id)\n {\n $data=Image::find($id);\n $image = $data->img;\n\n\n $filepath= public_path('images/');\n $imagepath = $filepath.$image;\n\n //dd($old_image);\n if (file_exists($imagepath)) {\n @unlink($imagepath);\n }\n\n\n $data->delete();\n\n return redirect()->route('image.index');\n }", "function delete($path);", "public function destroy(File $file)\n {\n //\n $v = Storage::delete($file->path);\n \n }", "public function destroyResource($resource)\n {\n if (!is_object($resource)) {\n return false;\n }\n\n $resource_type = get_class($resource);\n $resource_id = $resource->getKey();\n\n return Role::where('resource_type', $resource_type)\n ->where('resource_id', $resource_id)\n ->delete();\n }", "public function removeItem(int $id)\n\t{\n\t\t$this->storage->remove($id);\n\t}", "public function remove($filePath){\n return Storage::delete($filePath);\n }", "public function remove(): void\n {\n $file = $this->getAbsolutePath();\n if (!is_file($file) || !file_exists($file)) {\n return;\n }\n\n unlink($file);\n }", "public function destroy(Request $request, Storage $storage)\n {\n $storage->delete();\n $request->session()->flash('alert-success', 'Запись успешно удалена!');\n return redirect()->route('storage.index');\n }", "public function remove(Storable $entity): Storable\n {\n $this->getRepository(get_class($entity))->remove($entity);\n $this->detach($entity);\n\n return $entity;\n }", "public function processDeletedResource(EntityResource $resource)\n {\n /** @var AuthorizationRepository $repository */\n $repository = $this->entityManager->getRepository('Edweld\\AclBundle\\Entity\\Authorization');\n\n $repository->removeAuthorizationsForResource($resource);\n }", "function _unlink($resource, $exp_time = null)\n {\n if(file_exists($resource)) {\n return parent::_unlink($resource, $exp_time);\n }\n\n // file wasn't found, so it must be gone.\n return true;\n }", "public function remove($id);", "public function remove($id);", "public function destroy($id)\n {\n $data = Product::findOrFail($id);\n\n if(file_exists('uploads/product/'.$data->image1)){\n unlink('uploads/product/'.$data->image1);\n }\n\n if(file_exists('uploads/product/'.$data->image2)){\n unlink('uploads/product/'.$data->image2);\n }\n\n if(file_exists('uploads/product/'.$data->image3)){\n unlink('uploads/product/'.$data->image3);\n }\n $data->delete();\n }", "public function deleted(Storage $storage)\n {\n //\n }", "public function resources_delete($resource_id, Request $request) {\n if ($resource_id) {\n $resp = Resources::where('id', '=', $resource_id)->delete();\n if($resp){\n $msg = 'Resource has been deleted successfully.';\n $request->session()->flash('message', $msg);\n }\n }\n //return redirect()->route('admin-factor-list');\n return redirect()->to($_SERVER['HTTP_REFERER']);\n }", "public function removeUpload()\n {\n $file = $this->getAbsolutePath();\n if ($file) {\n unlink($file);\n }\n }", "function deleteResource($uuid){\n $data = callAPI(\"DELETE\",\"/urest/v1/resource/\".$uuid);\n return $data;\n}", "public function remove_resource($idproject){\n\t\t\n\t\t// Load model and try to get project data\n\t\t$this->load->model('Projects_model', 'projects');\n\t\t\n\t\t// Update\n\t\t$this->projects->save_project(array(\"ext\" => \"\", \"vzaar_idvideo\" => \"0\", \"vzaar_processed\" => \"0\"), $idproject);\n\t}", "public function delete()\n {\n try\n {\n $thumbnail = $this->getThumbnail();\n if($thumbnail)\n {\n $thumbnail->delete();\n }\n }\n catch(sfException $e){}\n \n // delete current file\n parent::delete();\n }", "public function destroy($id){\n $file_data = Slider::findOrFail($id);\n File::delete(public_path('../storage/app/public/sliders/'.$file_data->path));\n $slider = Slider::destroy($id);\n return response()->json(null, 204);\n }", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete()\n\t{\n\t\t@unlink($this->get_filepath());\n\t\t@unlink($this->get_filepath(true));\n\t\tparent::delete();\n\t}", "public function delete($resource_path, array $variables = array()) {\n return $this->call($resource_path, $variables, 'DELETE');\n }", "public function destroy($id)\n {\n //Find Slider With Id\n $slider = Slider::findOrFail($id);\n // Check If The Image Exist\n if(file_exists('uploads/slider/'.$slider->image)){\n\n unlink( 'uploads/slider/'.$slider->image);\n }\n $slider->delete();\n return redirect()->back()->with('success','Slider Successfully Deleted');\n }" ]
[ "0.6673811", "0.66624975", "0.66376764", "0.66351163", "0.66280866", "0.65443397", "0.6543099", "0.64656305", "0.62881804", "0.61755043", "0.61278707", "0.6089098", "0.60534257", "0.6043048", "0.6006416", "0.593359", "0.5929751", "0.5923406", "0.59201753", "0.5904145", "0.58963126", "0.5895338", "0.589437", "0.589437", "0.589437", "0.589437", "0.58819216", "0.58684987", "0.5864614", "0.58097607", "0.57739484", "0.5761358", "0.57558876", "0.5750673", "0.5741367", "0.5734089", "0.57264656", "0.5715195", "0.5711313", "0.5707201", "0.57057804", "0.57053447", "0.5702519", "0.5698952", "0.56844676", "0.56844676", "0.56783324", "0.5677608", "0.56581664", "0.564899", "0.5648674", "0.5647576", "0.5641079", "0.5636559", "0.56325674", "0.5619814", "0.5615794", "0.5607223", "0.56022006", "0.5601402", "0.5601336", "0.56004316", "0.5590177", "0.55810463", "0.55665016", "0.5565872", "0.5565398", "0.5563011", "0.55565405", "0.5556361", "0.5549312", "0.5544914", "0.554211", "0.5540394", "0.5540394", "0.5537265", "0.5536237", "0.55310345", "0.55295527", "0.5529016", "0.5527304", "0.5527274", "0.5527126", "0.5527044", "0.5527044", "0.5527044", "0.5527044", "0.5527044", "0.5527044", "0.5527044", "0.5527044", "0.5527044", "0.5527044", "0.5527044", "0.5527044", "0.5527044", "0.5527044", "0.5527044", "0.5523294", "0.55231583", "0.55181384" ]
0.0
-1
Show the application dashboard.
public function index() { return Potager::valid() ->with('owners', 'gardeners') // ->withCount('gardeners') ->orderBy('updated_at', 'desc') ->get(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function dashboard()\n {\n\n $pageData = (new DashboardService())->handleDashboardLandingPage();\n\n return view('application', $pageData);\n }", "function dashboard() {\r\n\t\t\tTrackTheBookView::render('dashboard');\r\n\t\t}", "public function showDashboard() { \n\t\n return View('admin.dashboard');\n\t\t\t\n }", "public function showDashboard()\n {\n return View::make('users.dashboard', [\n 'user' => Sentry::getUser(),\n ]);\n }", "public function dashboard()\n {\n return view('backend.dashboard.index');\n }", "public function index() {\n return view(\"admin.dashboard\");\n }", "public function dashboard()\n {\n return $this->renderContent(\n view('dashboard'),\n trans('sleeping_owl::lang.dashboard')\n );\n }", "public function dashboard(){\n return view('backend.admin.index');\n }", "public function showDashBoard()\n {\n \treturn view('Admins.AdminDashBoard');\n }", "public function dashboard()\n {\n return view('dashboard.index');\n }", "public function index()\n {\n return view('admin.dashboard', ['title' => 'Dashboard']);\n }", "public function dashboard() \r\n {\r\n return view('admin.index');\r\n }", "public function dashboard()\n\t{\n\t\t$page_title = 'organizer dashboard';\n\t\treturn View::make('organizer.dashboard',compact('page_title'));\n\t}", "public function dashboard()\n {\n\t\t$traffic = TrafficService::getTraffic();\n\t\t$devices = TrafficService::getDevices();\n\t\t$browsers = TrafficService::getBrowsers();\n\t\t$status = OrderService::getStatus();\n\t\t$orders = OrderService::getOrder();\n\t\t$users = UserService::getTotal();\n\t\t$products = ProductService::getProducts();\n\t\t$views = ProductService::getViewed();\n\t\t$total_view = ProductService::getTotalView();\n\t\t$cashbook = CashbookService::getAccount();\n $stock = StockService::getStock();\n\n return view('backend.dashboard', compact('traffic', 'devices', 'browsers', 'status', 'orders', 'users', 'products', 'views', 'total_view', 'cashbook', 'stock'));\n }", "public function dashboard()\n {\n\n return view('admin.dashboard');\n }", "public function dashboard()\n {\n return view('dashboard');\n }", "public function dashboard()\n {\n return view('dashboard');\n }", "public function dashboard()\n {\n return view('dashboard');\n }", "public function dashboard()\n {\n return view('dashboard');\n }", "public function index()\n {\n return view('admin.dashboard');\n }", "public function index()\n {\n return view('admin.dashboard');\n }", "public function index()\n {\n return view('admin.dashboard');\n }", "public function index()\n {\n return view('admin.dashboard');\n }", "public function index()\n {\n return view('admin.dashboard');\n }", "public function index()\n {\n return view('adm.dashboard');\n }", "public function dashboard()\n {\n $users = \\App\\User::all()->count();\n $roles = \\Spatie\\Permission\\Models\\Role::all()->count();\n $permissions = \\Spatie\\Permission\\Models\\Permission::all()->count();\n $banner = \\App\\Banner::all();\n $categoria = \\App\\Categoria::all();\n $entidadOrganizativa = \\App\\Entidadorganizativa::all();\n $evento = \\App\\Evento::all();\n $fichero = \\App\\Fichero::all();\n $recurso = \\App\\Recurso::all();\n $redsocial = \\App\\Redsocial::all();\n $subcategoria = \\App\\Subcategoria::all();\n $tag = \\App\\Tag::all();\n\n $entities = \\Amranidev\\ScaffoldInterface\\Models\\Scaffoldinterface::all();\n\n return view('scaffold-interface.dashboard.dashboard',\n compact('users', 'roles', 'permissions', 'entities',\n 'banner', 'categoria', 'entidadOrganizativa',\n 'evento', 'fichero', 'recurso', 'redsocial', 'subcategoria', 'tag')\n );\n }", "public function show()\n {\n return view('dashboard');\n }", "public function index()\n\t{\n\t\treturn View::make('dashboard');\n\t}", "public function index() {\n return view('modules.home.dashboard');\n }", "public function show()\n {\n return view('dashboard.dashboard');\n \n }", "public function index()\n {\n return view('admin.dashboard.dashboard');\n\n }", "public function dashboard()\n { \n return view('jobposter.dashboard');\n }", "public function show()\n\t{\n\t\t//\n\t\t$apps = \\App\\application::all();\n\t\treturn view('applications.view', compact('apps'));\n\t}", "public function index()\n {\n return view('pages.admin.dashboard');\n }", "public function indexAction()\n {\n $dashboard = $this->getDashboard();\n\n return $this->render('ESNDashboardBundle::index.html.twig', array(\n 'title' => \"Dashboard\"\n ));\n }", "public function index()\n {\n //\n return view('admin.dashboard');\n }", "public function index()\n {\n return view('admin.dashboard.index');\n }", "public function dashboard()\n {\n return view('pages.backsite.dashboard');\n }", "public function index()\n {\n // return component view('dashboard.index');\n return view('layouts.admin_master');\n }", "public function index()\n {\n\n $no_of_apps = UploadApp::count();\n $no_of_analysis_done = UploadApp::where('isAnalyzed', '1')->count();\n $no_of_visible_apps = AnalysisResult::where('isVisible', '1')->count();\n\n return view('admin.dashboard', compact('no_of_apps', 'no_of_analysis_done', 'no_of_visible_apps'));\n }", "public function getDashboard() {\n return view('admin.dashboard');\n }", "public function index()\n {\n return view('smartcrud.auth.dashboard');\n }", "public function index()\n {\n if($this->isAdmin() == TRUE)\n {\n $this->loadThis();\n }\n $this->global['pageTitle'] = 'Touba : Dashboard';\n \n $this->loadViews(\"dashboard\", $this->global, NULL , NULL);\n }", "public function dashboard() {\n $data = ['title' => 'Dashboard'];\n return view('pages.admin.dashboard', $data)->with([\n 'users' => $this->users,\n 'num_services' => Service::count(),\n 'num_products' => Product::count(),\n ]);\n }", "public function index()\n {\n return view('board.pages.dashboard-board');\n }", "public function index()\n {\n return view('admin::settings.development.dashboard');\n }", "public function index()\n {\n return view('dashboard.dashboard');\n }", "public function show()\n {\n return view('dashboard::show');\n }", "public function adminDash()\n {\n return Inertia::render(\n 'Admin/AdminDashboard', \n [\n 'data' => ['judul' => 'Halaman Admin']\n ]\n );\n }", "public function dashboard()\n {\n return view('Admin.dashboard');\n }", "public function show()\n {\n return view('admins\\auth\\dashboard');\n }", "public function index()\n {\n // Report =============\n\n return view('Admin.dashboard');\n }", "public function index()\n {\n return view('bitaac::account.dashboard');\n }", "public function index()\n { \n return view('admin-views.dashboard');\n }", "public function getDashboard()\n {\n return view('dashboard');\n }", "function showDashboard()\n { \n $logeado = $this->checkCredentials();\n if ($logeado==true)\n $this->view->ShowDashboard();\n else\n $this->view->showLogin();\n }", "public function index()\n { \n $params['crumbs'] = 'Home';\n $params['active'] = 'home';\n \n return view('admin.dashboard.index', $params);\n }", "public function index()\n\t{\n\t\treturn view::make('customer_panel.dashboard');\n\t}", "public function index()\n {\n return view('dashboard');\n }", "public function index()\n {\n return view('dashboard');\n }", "public function index()\n {\n return view('dashboard');\n }", "public function index()\n {\n return view('dashboard');\n }", "public function index()\n {\n return view('dashboard');\n }", "public function index()\n {\n return view('dashboard');\n }", "public function index()\n {\n return view('dashboard');\n }", "public function index()\n {\n return view('dashboard');\n }", "public function index() {\n // return view('home');\n return view('admin-layouts.dashboard.dashboard');\n }", "public function index()\r\n {\r\n return view('user.dashboard');\r\n }", "public function index() {\n return view('dashboard', []);\n }", "public function index()\n {\n //\n return view('dashboard.dashadmin', ['page' => 'mapel']);\n }", "public function index()\n {\n return view('back-end.dashboard.index');\n //\n }", "public function index()\n\t{\n\t\t\n\t\t$data = array(\n\t\t\t'title' => 'Administrator Apps With Laravel',\n\t\t);\n\n\t\treturn View::make('panel/index',$data);\n\t}", "public function index() {\n return view('dashboard.index');\n }", "public function index()\n {\n return view('page.dashboard.index');\n }", "public function index()\n {\n\n return view('dashboard');\n }", "public function dashboardview() {\n \n $this->load->model('Getter');\n $data['dashboard_content'] = $this->Getter->get_dash_content();\n \n $this->load->view('dashboardView', $data);\n\n }", "public function index()\n {\n $this->authorize(DashboardPolicy::PERMISSION_STATS);\n\n $this->setTitle($title = trans('auth::dashboard.titles.statistics'));\n $this->addBreadcrumb($title);\n\n return $this->view('admin.dashboard');\n }", "public function action_index()\r\n\t{\t\t\t\t\r\n\t\t$this->template->title = \"Dashboard\";\r\n\t\t$this->template->content = View::forge('admin/dashboard');\r\n\t}", "public function index()\n {\n $info = SiteInfo::limit(1)->first();\n return view('backend.info.dashboard',compact('info'));\n }", "public function display()\n\t{\n\t\t// Set a default view if none exists.\n\t\tif (!JRequest::getCmd( 'view' ) ) {\n\t\t\tJRequest::setVar( 'view', 'dashboard' );\n\t\t}\n\n\t\tparent::display();\n\t}", "public function index()\n {\n $news = News::all();\n $posts = Post::all();\n $events = Event::all();\n $resources = Resources::all();\n $admin = Admin::orderBy('id', 'desc')->get();\n return view('Backend/dashboard', compact('admin', 'news', 'posts', 'events', 'resources'));\n }", "public function index()\n {\n\n return view('superAdmin.adminDashboard')->with('admin',Admininfo::all());\n\n }", "public function index()\n {\n return view('dashboard.index');\n }", "public function index()\n {\n return view('dashboard.index');\n }", "public function index()\n {\n $this->template->set('title', 'Dashboard');\n $this->template->load('admin', 'contents' , 'admin/dashboard/index', array());\n }", "public function index()\n {\n return view('/dashboard');\n }", "public function index()\n {\n \treturn view('dashboard');\n }", "public function index()\n {\n return view('ketua.ketua-dashboard');\n }", "public function index(){\n return View::make('admin.authenticated.dashboardview');\n }", "public function admAmwDashboard()\n {\n return View::make('admission::amw.admission_test.dashboard');\n }", "public function index()\n {\n return view('adminpanel.home');\n }", "public function dashboard()\n\t{\n\t\t$this->validation_access();\n\t\t\n\t\t$this->load->view('user_dashboard/templates/header');\n\t\t$this->load->view('user_dashboard/index.php');\n\t\t$this->load->view('user_dashboard/templates/footer');\n\t}", "public function index()\n {\n return view('dashboard.home');\n }", "public function index()\n {\n $admins = $this->adminServ->all();\n $adminRoles = $this->adminTypeServ->all();\n return view('admin.administrators.dashboard', compact('admins', 'adminRoles'));\n }", "public function index()\n {\n if (ajaxCall::ajax()) {return response()->json($this -> dashboard);}\n //return response()->json($this -> dashboard);\n JavaScript::put($this -> dashboard);\n return view('app')-> with('header' , $this -> dashboard['header']);\n //return view('home');\n }", "public function index()\n {\n $userinfo=User::all();\n $gateinfo=GateEntry::all();\n $yarninfo=YarnStore::all();\n $greyinfo=GreyFabric::all();\n $finishinfo=FinishFabric::all();\n $dyesinfo=DyeChemical::all();\n return view('dashboard',compact('userinfo','gateinfo','yarninfo','greyinfo','finishinfo','dyesinfo'));\n }", "public function actionDashboard(){\n \t$dados_dashboard = Yii::app()->user->getState('dados_dashbord_final');\n \t$this->render ( 'dashboard', $dados_dashboard);\n }", "public function index()\n {\n $user = new User();\n $book = new Book();\n return view('admin.dashboard', compact('user', 'book'));\n }", "public function dashboard() {\n if (!Auth::check()) { // Check is user logged in\n // redirect to dashboard\n return Redirect::to('login');\n }\n\n $user = Auth::user();\n return view('site.dashboard', compact('user'));\n }", "public function dashboard()\n {\n $users = User::all();\n return view('/dashboard', compact('users'));\n }", "public function index()\n {\n $lineChart = $this->getLineChart();\n $barChart = $this->getBarChart();\n $pieChart = $this->getPieChart();\n\n return view('admin.dashboard.index', compact(['lineChart', 'barChart', 'pieChart']));\n }" ]
[ "0.77850926", "0.7760142", "0.7561336", "0.75147176", "0.74653697", "0.7464913", "0.73652893", "0.7351646", "0.7346477", "0.73420244", "0.7326711", "0.7316215", "0.73072463", "0.7287626", "0.72826403", "0.727347", "0.727347", "0.727347", "0.727347", "0.7251768", "0.7251768", "0.7251768", "0.7251768", "0.7251768", "0.7241342", "0.7236133", "0.7235562", "0.7218318", "0.71989936", "0.7197427", "0.71913266", "0.71790016", "0.71684825", "0.71577966", "0.7146797", "0.7133428", "0.7132746", "0.71298903", "0.71249074", "0.71218014", "0.71170413", "0.7110151", "0.7109032", "0.7107029", "0.70974076", "0.708061", "0.7075653", "0.70751685", "0.7064041", "0.70550334", "0.7053102", "0.7051273", "0.70484304", "0.7043605", "0.70393986", "0.70197886", "0.70185125", "0.70139873", "0.700917", "0.700917", "0.700917", "0.700917", "0.700917", "0.700917", "0.700917", "0.700917", "0.6992477", "0.6979631", "0.69741416", "0.69741327", "0.6968815", "0.6968294", "0.69677526", "0.69652885", "0.69586027", "0.6944985", "0.69432825", "0.69419175", "0.6941512", "0.6941439", "0.6938837", "0.6937524", "0.6937456", "0.6937456", "0.69276494", "0.6921651", "0.69074917", "0.69020325", "0.6882262", "0.6869339", "0.6867868", "0.68557185", "0.68479055", "0.684518", "0.68408877", "0.6838798", "0.6833479", "0.6832326", "0.68309164", "0.6826798", "0.6812457" ]
0.0
-1
Return the specified resource using JSON
public function show($id) { $potager = Potager::findOrFail($id); return response()->json(['data' => $potager, 'owners' => $potager->owners()->with('roles')->get(), 'gardeners' => $potager->gardeners()->get()]); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function json() {\n if( $this->format === 'application/hal+json' ) {\n header('Content-Type: application/hal+json; charset=utf-8', TRUE, $this->status);\n $hal_response = (new Resource())\n ->setURI(\"/{$this->resource}\". (isset($this->filters['id']) ? $this->filters['id'] : ''))\n ->setLink($this->resource, new Link(\"/{$this->resource}\"))\n ->setData($this->content);\n\n $writer = new Hal\\JsonWriter(true);\n return $writer->execute($hal_response);\n } else {\n header('Content-Type: application/json; charset=utf-8', TRUE, $this->status);\n return json_encode($this->content, JSON_NUMERIC_CHECK);\n }\n }", "public function get(Resource $resource);", "public function retrieve(Resource $resource);", "public static function toJson($resource)\n {\n return json_encode($resource);\n }", "public function get_resource();", "public function show(Request $request, $id): JsonResource\n {\n return $this->repository->getById(\n $request, $id\n );\n }", "public function jsonAction()\n {\n $response = new Response(json_encode(['name' => 'John Doe']));\n $response->headers->set('Content-Type', 'application/json');\n\n return $response;\n }", "public function get(string $resource): bool|string\n {\n $json = false;\n $fs = unserialize($_SESSION['rfe'][$this->getRoot()], ['allowed_classes' => false]);\n if (str_ends_with($resource, '/')) { // query for children of $resource\n $json = $this->getChildren(rtrim($resource, '/'), $fs);\n } elseif (array_key_exists($resource, $fs)) { // get item\n $item = $fs[$resource];\n $json = json_encode($item, JSON_NUMERIC_CHECK);\n }\n return $json;\n }", "public function getFrom($resource);", "public function toApi(): JsonResource\n {\n return resolve(InputResourcerContract::class, ['input' => $this]);\n }", "public function json();", "function sendGetCmd($resource) {\n $url = $this->baseURL . $resource;\n\n $request = curl_init($url);\n curl_setopt($request, CURLOPT_CUSTOMREQUEST, \"GET\");\n curl_setopt($request, CURLOPT_RETURNTRANSFER, true);\n $result = curl_exec($request);\n\n return json_decode($result, true);\n }", "public function __toString()\n {\n if (is_object($this->resource) and method_exists($this->resource, '__toString')) {\n\n return $this->resource->__toString();\n }\n\n return json_encode($this->resource);\n }", "public function getResource($resourceId);", "public function json($content): ResponseInterface;", "public function show(Request $request, Post $post): JsonResource\n {\n return PostResource::make($post);\n }", "public function create(){\n if($resources = Resources::orderby('ResourceName')->get()){\n return Response::json(array(\"status\" => \"success\", \"resources\" => $resources));\n } else {\n return Response::json(array(\"status\" => \"failed\", \"message\" => \"Some thing wrong.\"));\n }\n }", "public function getResource(Request $request, $resourceId);", "public function renderAsJson(): JsonResponse;", "public function json($data): PsrResponseInterface;", "public function show(Product $product) : JsonResource\n {\n return new CompleteProductResource($product);\n }", "public function Get(){\n return $this->json;\n }", "#[TODO] use self object?\n\tprotected function GET(ResourceObject $resource) {\n#[TODO]\t\tif ($resource->getMTime())\n#[TODO]\t\t\t$this->response->headers->set('Last-modified', gmdate('D, d M Y H:i:s ', $resource->getMTime()) . 'GMT');\n#[TODO]\t\tif ($resource->getCTime())\n#[TODO]\t\t\t$this->response->headers->set('Date', gmdate('D, d M Y H:i:s ', $resource->getCTime()) . 'GMT');\n\n\n#[TODO] handle file streams\n\t\t// get ranges\n#\t\t$ranges = WebDAV::getRanges($this->request, $this->response);\n\n\t\t// set the content of the response\n\t\tif ($resource instanceof ResourceDocument) {\n\t\t\t$this->response->content->set($resource->getContents());\n\t\t\t$this->response->content->setType($resource->getMIMEType());\n\t\t\t$this->response->content->encodeOnSubmit(true);\n\t\t}\n\t}", "protected function parseResource($resource)\n {\n return json_decode($resource, true);\n }", "public function apiResource() {\n\t\tif (!$this->CI->authex->validateUser()) {\n\t\t\t$this->CI->exitCode = 401;\n\t\t\treturn;\n\t\t}\n\t\t$params = func_get_args();\n\t\tif (!isset($params[0])) {\n\t\t\t$this->CI->exitCode = 400;\n\t\t\t$this->CI->apiResponse = ['message' => 'ResourceID is mandatory'];\n\t\t\treturn null;\n\t\t}\n\t\tswitch ($this->CI->input->method()) {\n\t\tcase 'get':\n\t\t\t$this->CI->apiResponse = $this->getTagsByResourceID($params[0], $this->CI->input->get());\n\t\t\tbreak;\n\t\tcase 'patch':\n\t\t\t$this->CI->apiResponse = $this->patchResourceTags($params[0], $this->CI->input->get());\n\t\t\tbreak;\n\t\tcase 'delete':\n\t\t\t$this->CI->apiResponse = $this->deleteResourceTags($params[0],$this->CI->input->get());\n\t\t\tbreak;\n\t\tdefault:\n\t\t\t$this->CI->exitCode = 405;\n\t\t\t$this->CI->apiResponse = ['error' => 'Request method is invalid'];\n\t\t\treturn;\n\t\t}\n\t}", "protected function instantiateJsonResource($payload)\n {\n return new JsonResource($payload);\n }", "public function show($id)\n {\n\n $recipe = Recipe::find($id);\n if(!$recipe)\n {\n\n return response()->json(\"'message':'resource not found'\", 404)\n ->header('Content-Type', 'application/json');\n\n }\n else{\n\n return new RecipeResource( $recipe );\n }\n\n }", "final public function get($resource, $id)\n {\n Util::throwIfNotType(['string' => [$resource], 'int' => [$id]], true);\n\n $timestamp = time();\n $query = [\n 'apikey' => $this->publicApiKey,\n 'ts' => $timestamp,\n 'hash' => md5($timestamp . $this->privateApiKey . $this->publicApiKey),\n ];\n\n $url = self::BASE_URL . urlencode($resource) . \"/{$id}?\" . http_build_query($query);\n\n return $this->send(new Request($url, 'GET', ['Accept' => 'application/json']));\n }", "public function __toString()\n {\n return $this->response->get('json');\n }", "public function jsonProvider() {\n return '{\n \"data\": {\n \"attributes\": {\n \"object_domain\": \"contact\",\n \"object_id\": \"1\",\n \"due\": \"2019-01-25T07:50:14+00:00\",\n \"urgency\": 1,\n \"description\": \"Need to verify this guy house.\",\n \"items\": [\n \"Visit his house\",\n \"Capture a photo\",\n \"Meet him on the house\"\n ],\n \"task_id\": \"123\"\n }\n }\n }';\n}", "public function cGetAction()\n {\n $resources = $this->resource->getModel()::find();\n\n return $this->renderSerialized($resources);\n }", "static function resource($resource) {\n\t\treturn self::_getLoader()->resource($resource);\n\t}", "public function getJSON()\r\n\t{\r\n\t\treturn $this->getJSONString();\r\n\t}", "public function getResource(){\n return $this->resource;\n }", "function json_response() {\n return app(JsonResponse::class);\n }", "function getResource($resource, $id = null, $take = null, $filters = null, $orders = null){\r\n \t$resourceUrl = \"/$resource\";\r\n \t// check if its a single resource, or collection call\r\n \tif($id){\r\n \t\t$resourceUrl .= \"/$id\";\r\n \t} else {\r\n \t\tif($take){\r\n\t \t\t$resourceUrl .= \"?Take=$take\";\r\n \t\t}\r\n \t\t// Check to see if filters are present\r\n\t \tif($filters){\r\n \t\t\t$resourceUrl .= \"&Filter=\";\r\n\t \t\tforeach ($filters as $filter) {\r\n\t \t\t\t$resourceUrl .= ($filter['condition']) ? \".\" . $filter['condition'] . \".\" : \"\";\r\n\t \t\t\t$resourceUrl .= $filter['field'] .\".\" . $filter['filter'] . \"(\";\r\n\t \t\t\t\tif(is_array($filter['value'])){\r\n\t\t\t \t\t\tforeach ($filter['value'] as $key => $value) {\r\n\t\t\t \t\t\t\t//if its the first value, do not preface with a comma....\r\n\t\t\t \t\t\t\t$resourceUrl .= ($key == 0) ? urlencode($value) : ',' . urlencode($value) ;// maybe check array position instead?\r\n\t\t\t \t\t\t}\r\n\t \t\t\t\t} else {\r\n\t \t\t\t\t\t$resourceUrl .= urlencode($filter['value']);\r\n\t \t\t\t\t}\r\n\r\n\t \t\t\t$resourceUrl .= \")\";\t \t\t\r\n\t \t\t}\r\n\t \t}\r\n\t \t// check to see if ordering has been specified\r\n\t \tif($orders){\r\n \t\t\t$resourceUrl .= \"&Order=\";\r\n\t \t\tforeach ($orders as $order) {\r\n\t \t\t\t$resourceUrl .= ($order['condition']) ? \".\" . $order['condition'] . \".\" : \"\";\r\n\t \t\t\t$resourceUrl .= $order['field'] . \"(\" . $order['value'] . \")\";\t \t\t\t\r\n\t \t\t}\r\n\t \t}\r\n \t}\r\n\r\n \t//Call external API\r\n\t\t$this->get($resourceUrl);\r\n\r\n\t\t// check the request status\r\n\t\tif($this->status_code == 0){\r\n\t\t\t$this->Logger->error(\r\n\t\t\t\tsprintf(\r\n\t\t\t\t\t'GET Call for resource \\'%s\\' Failed.\r\n\t\t\t\t\tStatus: %d,\r\n\t\t\t\t\tRequest: %s,\r\n\t\t\t\t\tAPI Error Message: \r\n\t\t\t\t\t%s',\r\n\t\t\t\t\t$resourceUrl,\r\n\t\t\t\t\t$this->status_code,\r\n\t\t\t\t\t$this->request_body_raw,\r\n\t\t\t\t\t'The Service Did Not Respond'\r\n\t\t\t\t)\r\n\t\t\t);\r\n\t\t\tthrow new Exception('The Service Failed to Respond.');\r\n\t\t } elseif ($this->status_code != 200){\r\n\t\t\t$this->Logger->error(\r\n\t\t\t\tsprintf(\r\n\t\t\t\t\t'GET Call for resource \\'%s\\' Failed.\r\n\t\t\t\t\tStatus: %d,\r\n\t\t\t\t\tRequest: %s,\r\n\t\t\t\t\tAPI Error Message: \r\n\t\t\t\t\t%s',\r\n\t\t\t\t\t$resourceUrl,\r\n\t\t\t\t\t$this->status_code,\r\n\t\t\t\t\t$this->request_body_raw,\r\n\t\t\t\t\t$this->response_body\r\n\t\t\t\t)\r\n\t\t\t);\r\n\t\t\tthrow new Exception($this->response_body);\r\n\t\t} else {\r\n\t\t\treturn $this->response_parsed;\r\n\t\t}\r\n }", "public function get($resource, $with=[]){\n return $this->fetch($resource, self::GET, $with);\n }", "public function getJSON(){\n\t\treturn $this->json;\n\t}", "public function cgetAction()\n {\n $serializer = $this->container->get('winefing.serializer_controller');\n\n $repository = $this->getDoctrine()->getRepository('WinefingApiBundle:Format');\n $formats = $repository->findAll();\n\n $json = $serializer->serialize($formats);\n\n return new Response($json);\n }", "public function resource($resource) {\n switch ($resource) {\n case 'product':\n return $this->product;\n case 'merchant':\n return $this->reference->resourceById('merchants', $this->attr('merchant'));\n }\n }", "abstract public function resource();", "public function show($id)\n {\n try {\n $model = $this->getModel();\n $record = $model::findOrFail($id);\n\n //return single record as resource\n return new RestResource($record);\n } catch (\\Exception $ex) {\n return $this->respondError($ex);\n }\n }", "function getResource()\n {\n return $this->resource;\n }", "public function show(Resource $resource)\n {\n //\n }", "public static function generateJSON();", "function json($param = []) {\n echo json_encode((new pharmacies)->get_by_user());\n\n// $file=HOMEDIR.'9398.json';\n//\n// $json= file_get_contents($file);\n// print_rr(json_decode($json));\n }", "public function json(){ return json_encode( $this->objectify() ); }", "function jsonAction()\n {\n $this->disableLayout();\n $this->_helper->viewRenderer->setNoRender();\n\n $request_data = $this->_getAllParams();\n\n $method_name = $this->_getParam('method');\n if(!isset($method_name))\n {\n echo \"Inconsistent request\";\n exit;\n }\n\n $request_data = $this->_getAllParams();\n // Handle XML-RPC request\n $this->kwWebApiCore = new KwWebApiRestCore($this->apiSetup, $this->apicallbacks, array_merge($request_data, array('format' => 'json')));\n }", "public function show(int $resource_id)\n {\n try {\n $listing = Listing::where('id', $resource_id)->with('listing_category')->with('state')->with('local_govt')->with('city')->with('images')->with('amenities')->orderBy('created_at', 'desc')->first();\n return response()->json(['status'=> 'ok', 'data'=> $listing, 'msg'=> '']);\n } catch (Exception $e) {\n \n }\n }", "public function getJson(){\n\t\treturn $this->json;\n\t}", "public function getResource()\n {\n return $this->resource;\n }", "public function getResource()\n {\n return $this->resource;\n }", "public function getResource()\n {\n return $this->resource;\n }", "public function getResource()\n {\n return $this->resource;\n }", "private function resourceNotFound()\n {\n // if the returned instance wasn't found\n return response()->json([\n 'success' => false,\n 'message' => 'Resource could not be found.',\n ], 404);\n }", "public function resource($resource) {\n // If the resource has already been computed and cached, just use it. Otherwise, compute and cache it somewhere.\n // Big case statement for each possible type of resource\n // Likely going to be using $this->reference a lot\n switch ($resource) {\n case 'offers':\n return $this->offers; // Special case... No caching because of how offers are nested inside products\n case 'category':\n return $this->reference->resourceById('categories', $this->attr('category'));\n case 'brand':\n return $this->reference->resourceById('brands', $this->attr('brand'));\n }\n }", "public function get() {\n // You must to implement the logic of your REST Resource here.\n // Use current user after pass authentication to validate access.\n if(!$this->currentUser->hasPermission('access content')) {\n throw new AccessDeniedHttpException('Acces denied');\n }\n\n /*\n * TODO: Now i check on the language given by drupal, but should check if the language is in de path if not then use the language given by drupal.\n */\n\n // Get the parameter url\n $url = \\Drupal::request()->get('url');\n if(empty($url)) {\n throw new BadRequestHttpException('Url should be set');\n }\n\n // Get normal path\n $path = \\Drupal::service('path.alias_manager')->getPathByAlias($url, $this->language);\n if($path === $url) {\n throw new BadRequestHttpException('Could not find the correct path');\n }\n\n // Check if it is a node and get the id\n if(preg_match('/node\\/(\\d+)/', $path, $matches)) {\n $node = \\Drupal\\node\\Entity\\Node::load($matches[1]);\n $node = $node->getTranslation($this->language);\n\n $response = new ResourceResponse(array($node));\n $response->addCacheableDependency($node);\n }\n\n return $response;\n }", "public function index() : JsonResource\n {\n return new ProductCollection(Product::all()->sortByDesc('updated_at'));\n }", "public function show(Resource $resource)\n {\n // not available for now\n }", "function get_product_json() {\n header('Content-Type: application/json');\n echo $this->ProductsModel->get_all_product();\n }", "public function get($resource_path, array $variables = array()) {\n $variables['headers']['Content-Type'] = 'application/json;charset=UTF-8';\n\n return $this->call($resource_path, $variables, 'GET');\n }", "function toJSON($json){\n header('Content-type: application/json');\n\t\techo $json;\n }", "public function fetch($resource, $using=self::GET, $with=[]){\n\n $response = $this->asObj($resource, $using, $with);\n\n return isset($response->data) ? $response->data : NULL;\n\n }", "public function resource()\n {\n return tap($this->resource, function ($resource) {\n abort_if(is_null($resource), 404);\n });\n }", "protected function getResourceEntity()\n\t{\n\t\treturn $this->arguments->getArgument(static::$RESOURCE_ARGUMENT_NAME)->getValue();\n\t}", "public function getResource()\n {\n return $this->resource ?: parent::getResource();\n }", "public function postAction()\n {\n $manager = new \\Art4\\JsonApiClient\\Utils\\Manager();\n $manager->setConfig('optional_item_id', true);\n // @todo handle validation errors\n $document = $manager->parse($this->request->getRawBody());\n $resource = $this->resource->getModel();\n\n // basic attributes\n foreach ($document->get('data')->get('attributes')->asArray(true) as $key => $value) {\n $resource->{$key} = $value;\n }\n\n // @todo handle saving errors\n $resource->save();\n\n return $this->renderSerialized($resource);\n }", "public function show($id)\n {\n $prodCat = r_product_type::with('rProductType')\n ->get();\n\n return new JsonResource($prodCat->where('PRODT_ID',$id));\n }", "protected function createResponse($json = NULL) {\n $response = new ResourceResponse();\n if ($json) {\n $response->setContent($json);\n }\n return $response;\n }", "public function getResource()\n {\n\n if ($this->is_collection)\n {\n return null;\n }\n\n if ($this->isError())\n {\n return null;\n }\n\n $class = $this->getResourceClass();\n return new $class($this->data);\n }", "protected function getControllerJsonResponse()\n {\n return $this->jsonParam;\n }", "public function getObject()\n\t{\n\t\t$application = \\Trinity\\Basement\\Application::getApplication();\n\t\t$broker = $this->_serviceLocator->get('web.Broker');\n\t\t$json = new Json($application);\n\n\n\n\t\treturn $json;\n\t}", "public function get() {\n\n // You must to implement the logic of your REST Resource here.\n // Use current user after pass authentication to validate access.\n if (!$this->loggedUser->hasPermission('access content')) {\n throw new AccessDeniedHttpException();\n }\n\n $entities = \\Drupal::entityTypeManager()\n ->getStorage('node')\n ->loadMultiple();\n foreach ($entities as $entity) {\n $result[$entity->id()] = $entity->title->value;\n }\n\n $response = new ResourceResponse($result);\n $response->addCacheableDependency($result);\n return $response;\n\n }", "public function getExampleAction($eid)\r\n {\r\n // retrieve example\r\n $example = $this->getDoctrine()\r\n ->getRepository('MensaBattleAPIBundle:Example')\r\n ->find($eid);\r\n if (!$example)\r\n throw $this->createNotFoundException('No example found for id '.$eid);\r\n\r\n // respond\r\n $response = new JsonResponse();\r\n $response->setData($example->toArray());\r\n return $response;\r\n }", "public function get($format = 'json')\n {\n return $this->response->get($format);\n }", "public function getJson()\r\n {\r\n return $this->response;\r\n }", "public function getResource()\n {\n return $this->_resource;\n }", "public function readAction(){\n\n //Pega o id do veiculo\n $veiculo = Application::getParam('id');\n if($veiculo === null){\n return json_encode(array(\n 'success' => false,\n 'message' => 'Veiculo é inválido ou não existe.',\n 'code' => 0\n ));\n }\n\n try {\n //Pega o veiculo solicitado\n $model = Veiculo::findOneBy(array('id' => $veiculo));\n }\n catch (\\Exception $e){\n\n //Caso algo dê errado, retorna uma menssagem de erro\n return json_encode(array(\n 'success' => false,\n 'message' => $e->getMessage(),\n 'code' => $e->getCode()\n ));\n }\n\n //Retorna os dados encontrados\n return json_encode(array(\n 'success' => true,\n 'data' => array($model->toArray()),\n 'total' => 1\n ));\n }", "public function show($id) : JsonResponse\n {\n //\n return $this->respond($this->_repo->find($id));\n }", "public function getResourceContents()\n {\n $fileName = $this->getUrlParameter('get');\n\n if (!preg_match('/^[a-z-]+\\.(css|gif|js)$/', $fileName)) {\n $this->badRequest('Invalid file name.');\n }\n\n $resourcePath = realpath(Path::getPublicDirPathInLibrary() . $fileName);\n\n if (!is_file($resourcePath)) {\n $this->badRequest(sprintf('File \"%s\" could not be found.', $fileName));\n }\n\n $fileInfo = pathinfo($resourcePath);\n $mimeTypes = ['css' => 'text/css', 'gif' => 'image/gif', 'js' => 'application/x-javascript'];\n\n return (new Response(file_get_contents($resourcePath), 200))\n ->header('Content-Type', $mimeTypes[$fileInfo['extension']])\n ->header('Content-Length', filesize($resourcePath));\n }", "public function index(): JsonResource\n {\n return CampaignResource::collection($this->repository->fetchCampaigns());\n }", "public function json()\n {\n }", "public function json()\n {\n }", "public function json()\n {\n }", "public function json()\n {\n }", "public function json()\n {\n }", "public function json()\n {\n }", "public function json()\n {\n }", "public function json()\n {\n }", "public function json()\n {\n }", "public function json()\n {\n }", "public function json()\n {\n }", "private function json_surveyLink()\n {\n $query = \"SELECT surveyID FROM Surveys ORDER BY surveyID DESC LIMIT 1\";\n $params = [];\n\n $nextpage = null;\n\n // This decodes the JSON encoded by getJSONRecordSet() from an associative array\n $res = json_decode($this->recordset->getJSONRecordSet($query, $params), true);\n\n $res['status'] = 200;\n $res['message'] = \"ok\";\n $res['next_page'] = $nextpage;\n return json_encode($res);\n }", "public function json()\n {\n }", "public function show(Medium $medium): JsonResponse\n {\n return new JsonResponse($medium);\n }", "public function json()\n {\n $code = 200;\n\n if (!Request::has(\"no_response_code\") || Request::input('no_response_code') != \"yes\") {\n $code = $this->getCode();\n }\n\n return response()->json($this->getResponse(), $code);\n }", "public function show($id)\n{\nlogSystem('/sy_category',$id,\"Read data sy_category $id\",'read',request()->ip());\n$h=SyCategory::find($id);\nheader('Content-Type: application/json');\necho json_encode(compact(['h']));\n}", "public function versionedResource($resource) {\n \treturn Celsus_Resource::version($resource);\n }", "public function getJson()\n{\n\n if(isset($_POST['dataType']) && $_POST['dataType'] == \"json\"){\n $pageArray \t=\tarray('title' => $_POST['title'],\n 'firstname' => $_POST['firstname'],\n 'lastname' => $_POST['lastname'],\n 'email' => $_POST['email']);\n $jsonObject = json_encode($pageArray);\n }\n if(isset($_GET['json'])){\n $jsonObject = $_GET['json'];\n\n }\n //Setting the placeholders to values of the object.\n if(isset($jsonObject) && !$jsonObject == null){\n $pageObject =\tjson_decode($jsonObject);\n $this->setTitle($pageObject->title);\n $this->setFirstName($pageObject->firstname);\n $this->setLastName($pageObject->lastname);\n $this->setEmail($pageObject->email);\n }\nreturn $jsonObject;\n}", "public function resource($actions, $resource, $model)\n {\n \n //Create a new Resource.\n $instance = $this->resourceFactory->__invoke($actions, $model);\n \n //Attach the resource to the router.\n $this->router->attach('rest.resource.'.$resource, \"{$this->routePrefix}/$resource\", $instance);\n \n //Return it for further manipulation.\n return $instance;\n \n }", "public function create(): JsonResponse;" ]
[ "0.7097866", "0.7092964", "0.686399", "0.6612223", "0.65286064", "0.6415107", "0.6361492", "0.6350808", "0.6328247", "0.62651783", "0.62341547", "0.6210298", "0.62061316", "0.6201916", "0.61900204", "0.6176232", "0.6164088", "0.6159855", "0.6159127", "0.6094945", "0.6069473", "0.6064", "0.6043655", "0.6030899", "0.6019683", "0.60029984", "0.6002759", "0.5920655", "0.5908844", "0.589829", "0.5888322", "0.58561903", "0.584018", "0.5826187", "0.582006", "0.58114725", "0.58024436", "0.5793124", "0.5778644", "0.57736075", "0.57670385", "0.5763095", "0.57611924", "0.5755704", "0.57555175", "0.5741053", "0.572546", "0.5697277", "0.56814766", "0.5681201", "0.56791997", "0.56791997", "0.56791997", "0.56791997", "0.5674205", "0.565704", "0.56387347", "0.56347626", "0.5629009", "0.56206065", "0.5616101", "0.56093216", "0.56054944", "0.56037116", "0.5600344", "0.5597829", "0.5583768", "0.55748296", "0.5564213", "0.55585957", "0.55566335", "0.55452454", "0.55444634", "0.55427194", "0.55425787", "0.5540409", "0.55276793", "0.55273736", "0.5526175", "0.55256486", "0.55244887", "0.55232257", "0.55232257", "0.55232257", "0.55232257", "0.55232257", "0.55232257", "0.55232257", "0.55232257", "0.55232257", "0.55232257", "0.55232257", "0.5522751", "0.55221695", "0.5521665", "0.5509518", "0.55043995", "0.55039215", "0.5502298", "0.54995555", "0.5497865" ]
0.0
-1
Store a newly created resource in storage.
public function store(PotagerRequest $request) { $input = $request->all(); $potager = potager::create($input); // return response()->json(['success' => true, 'request' => $request->all()]); return response()->json(['success' => true, 'potager_id' => $potager->id]); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function store($data, Resource $resource);", "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 }", "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 }", "public function createStorage();", "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 }", "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 }", "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 }", "function storeAndNew() {\n $this->store();\n }", "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 }", "public function store()\n {\n if (!$this->id) { // Insert\n $this->insertObject();\n } else { // Update\n $this->updateObject();\n }\n }", "public function store()\n\t{\n\t\t\n\t\t//\n\t}", "public function store()\r\n\t{\r\n\t\t//\r\n\t}", "public function store()\r\n\t{\r\n\t\t//\r\n\t}", "public function store()\r\n\t{\r\n\t\t//\r\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}", "public function store()\n\t{\n\t\t//\n\t}" ]
[ "0.72865677", "0.7145327", "0.71325725", "0.6640912", "0.66209733", "0.65685713", "0.652643", "0.65095705", "0.64490104", "0.637569", "0.63736665", "0.63657933", "0.63657933", "0.63657933", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437" ]
0.0
-1
Update the specified resource in storage.
public function update(PotagerRequest $request, $id) { $input = $request->all(); $potager = Potager::findOrFail($id); $potager->update($input); return response()->json(['success' => true, 'potager_id' => $potager->id]); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function updateShopifyResource() {\n $this->saving();\n $this->getShopifyApi()->call([\n 'URL' => API::PREFIX . $this->getApiPathSingleResource(),\n 'METHOD' => 'PUT',\n 'DATA' => [\n static::getResourceSingularName() => $this->shopifyData\n ]\n ]);\n }", "public function update(Request $request, Resource $resource)\n {\n $request->validate([\n 'name' => 'required',\n 'description' => 'required|string',\n 'file' => 'required|mimes:jpg,jpeg,png,doc,docx,pdf,ppt,txt',\n ]);\n\n $resource->update($request->all());\n\n if ( $request->hasFile('file') ) {\n $resource = 'resource-'.time().'.'.$request->file('file')->extension();\n $request->file->storeAs('resources', $resource,'public');\n $resource->file = $resource;\n }\n\n if ( $resource->save() ) {\n return redirect()->route('admin.resources.index')->with('success', 'Resource updated');\n } else {\n return redirect()->route('admin.resources.index')->with('error', 'Something went wrong');\n }\n }", "public function update(Request $request, Resource $resource)\n {\n //\n }", "public function updateStream($resource);", "public function update(Request $request, Storage $storage)\n {\n $storage->product_id = $request->product_id;\n $storage->amount = $request->amount;\n\n $storage->save();\n\n return redirect()->route('storages.index');\n }", "protected function updateImageResource($fileName, $imageId, $storage)\n {\n //Get image name and storage location for image\n $image = Image::where('id', '=', $imageId)->first();\n\n //Delete old image\n $this->deleteResource($image->name, $image->storage);\n\n //Store the new image\n $image->name = $fileName;\n $image->storage = $storage;\n\n $image->save();\n }", "public function update(Storage $storage, UpdateStorageRequest $request)\n {\n $this->storage->update($storage, $request->all());\n\n return redirect()->route('admin.product.storage.index')\n ->withSuccess(trans('core::core.messages.resource updated', ['name' => trans('product::storages.title.storages')]));\n }", "public function update(StoreStorage $request, Storage $storage)\n {\n $storage->fill($request->all())->save();\n $request->session()->flash('alert-success', 'Запись успешно обновлена!');\n return redirect()->route('storage.index');\n }", "public function update_asset($id, Request $request){\n \t\tif(!Auth::user()){\n\t\t\treturn redirect('/');\n\t\t}\n \t\t$asset = Storage::find($id);\n \t\t$asset->name = $request->name;\n \t\t$asset->quantity = $request->quantity;\n \t\t$asset->category_id = $request->category;\n \t\tif($request->file('image') != null){\n\t\t\t$image = $request->file('image');\n\t\t\t$image_name = time(). \".\" . $image->getClientOriginalExtension();\n\t\t\t$destination = \"images/\";\n\t\t\t$image->move($destination, $image_name);\n\t\t\t$asset->image_url = $destination.$image_name;\n\t\t} \n\t\t$asset->save();\n\t\tsession()->flash('success_message', 'Item Updated successfully');\n\t\treturn redirect(\"/storage\");\n \t}", "public function update(Request $request, Flight $exercise, FlightResource $resource)\n {\n $request->validate([\n 'display_name' => 'required|string|max:100',\n 'file' => 'nullable|file|max:10240|mimes:pdf',\n 'uri' => 'nullable|url|max:255',\n ]);\n\n if ($resource->type === 'file' && $request->file('file')) {\n Storage::drive('public')->delete($resource->resource);\n $resource->resource = $request->file('file')->store('smartcars/exercises/resources', ['disk' => 'public']);\n } elseif ($resource->type === 'uri' && $request->input('uri')) {\n $resource->resource = $request->input('uri');\n }\n\n $resource->save();\n\n return redirect()->route('adm.smartcars.exercises.resources.index', $exercise)\n ->with('success', 'Resource edited successfully.');\n }", "public function update(Request $request, $id)\n {\n $validator = Validator::make($request->all(), [\n 'title' => 'required|string',\n 'content' => 'required|string',\n 'mentoring_area_id' => 'required|integer',\n 'featured_image_uri' => 'string',\n ]);\n\n if ($validator->fails()) {\n return APIHandler::response(0, $validator->errors(), 400);\n }\n \n $resource = Resource::find($id);\n $resource->title = $request->get('title');\n $resource->content = $request->get('content');\n $resource->featured_image_uri = $request->get('featured_image_uri');\n $resource->updated_at = \\Carbon\\Carbon::now();\n $resource->mentoring_area_id = $request->get('mentoring_area_id');\n $resource->save();\n $data['resource'] = $resource;\n return APIHandler::response(1, \"Resource has been updated\");\n }", "protected function updateVideoResource($fileName, $videoId, $storage, $premium=1)\n {\n //Get video name and storage location for video\n $video = Video::where('id', '=', $videoId)->first();\n\n //Check the storage medium\n if($storage == 'vimeo' || $storage == 'youtube')\n {\n $video->name = $fileName;\n $video->storage = $storage;\n $video->premium = $premium;\n $video->save();\n }\n else\n {\n if($video['storage'] == 'local' || $video['storage'] == 's3')\n {\n //Delete old video\n $this->deleteResource($video->name, $video->storage);\n }\n \n //Store the new video\n $video->name = $fileName;\n $video->storage = $storage;\n $video->premium = $premium;\n $video->save();\n }\n }", "public function put($resource, $with=[]){\n return $this->fetch($resource, self::PUT, $with);\n }", "public function update($id, $resource) {\n SCA::$logger->log(\"update resource\");\n return $this->orders_service->update($id, $resource);\n }", "public function update($path);", "public function update($id, $resource)\n {\n SCA::$logger->log(\"Entering update()\");\n //check whether it is an sdo or an xml string.\n if ($resource instanceof SDO_DataObjectImpl) {\n //if the thing received is an sdo convert it to xml\n if ($this->xml_das !== null) {\n $xml = SCA_Helper::sdoToXml($this->xml_das, $resource);\n } else {\n throw new SCA_RuntimeException(\n 'Trying to update a resource with SDO but ' .\n 'no types specified for reference'\n );\n }\n } else {\n $xml = $resource;\n }\n\n $slash_if_needed = ('/' === $this->target_url[strlen($this->target_url)-1])?'':'/';\n\n $handle = curl_init($this->target_url.$slash_if_needed.\"$id\");\n curl_setopt($handle, CURLOPT_HEADER, false);\n curl_setopt($handle, CURLOPT_RETURNTRANSFER, true);\n curl_setopt($handle, CURLOPT_CUSTOMREQUEST, \"PUT\");\n curl_setopt($handle, CURLOPT_POSTFIELDS, $xml);\n\n //replace with Content-Type: atom whatever\n $headers = array(\"User-Agent: SCA\",\n \"Content-Type: text/xml;\",\n \"Accept: text/plain\");\n curl_setopt($handle, CURLOPT_HTTPHEADER, $headers);\n\n $result = curl_exec($handle);\n\n $response_http_code = curl_getinfo($handle, CURLINFO_HTTP_CODE);\n\n curl_close($handle);\n\n $response_exception = $this->buildResponseException($response_http_code, '200');\n\n if ($response_exception != null) {\n throw $response_exception;\n } else {\n //update does not return anything in the body\n return true;\n }\n }", "public function update(Request $request, $id)\n {\n $this->validate($request, [\n 'name' => 'required',\n 'link' => 'required',\n 'description' => 'required'\n ]);\n\n $resource = Resource::find($id);\n $resource->name = $request->name;\n $resource->type_id = $request->type_id;\n $resource->has_cost = ($request->has('has_cost')) ? 1 : 0;\n $resource->language_id = $request->language_id;\n $resource->link = $request->link;\n $resource->description = $request->description;\n $resource->tags = '';\n\n $resource->save();\n //return back()->with('success', 'Recurso actualizado satisfactoriamente');\n return redirect('/resource')->with('success', 'Recurso actualizado satisfactoriamente');\n }", "public function update(Request $request, $id)\n {\n $oldProduct = Product::findOrFail($id);\n $data = $request->all();\n if(isset($data['img'])){\n // $file = $request->file('photo');\n // return $file;\n $imgName = time().'.'.$request->img->extension();\n $data['img'] = $imgName;\n // Storage::putFile('spares', $file);\n $path = $request->img->storeAs('public/uploads', $imgName); //in Storage\n\n //delete old file\n if($oldProduct->img != 'product-default.png'){\n Storage::delete(\"public/uploads/\".$oldProduct->img);\n // return 'deleted';\n }\n \n }else{\n $data['img'] = $oldProduct->img;\n }\n $oldProduct->update($data);\n return redirect()->route('product.index'); \n\n }", "public function update($request, $id) {\n\t\t\t$image = $request['photo'];\n\t\t\tif($image !== null) {\n\t\t\t\t$name = time().'.' . explode('/', explode(':', substr($image, 0, strpos($image, ';')))[1])[1];\n\t\t\t\t\\Image::make($request['photo'])->save(public_path('storage/products/').$name);\n\t\t\t\t$request['photo'] = $name;\n\t\t\t} else {\n\t\t\t\t$currenPhoto = Product::all()->where('id', $id)->first();\n\t\t\t\t$request['photo'] = $currenPhoto->photo;\n\t\t\t}\n return $this->product->update($id, $request);\n\t}", "public function updateStream($path, $resource, Config $config)\n {\n }", "public function edit(Resource $resource)\n {\n //\n }", "public function updateResourceIndex(&$resource) {\n if ($this->connector != null) {\n\n // STEP 1: Update or insert this resource as a node:\n $this->logger->addDebug(\"Updating/Inserting Node into Neo4J database\");\n $result = $this->connector->run(\"MATCH (a:Resource {id: {id} }) SET a.title = {title}, a.version = {version}, a.href = {href}\n return a;\",\n [\n 'id' => $resource->getID(),\n 'version' => $resource->getVersion(),\n 'title' => $resource->getTitle(),\n 'href' => $resource->getLink()\n ]\n );\n\n // Check to see if anything was added\n $records = $result->getRecords();\n if (empty($records)) {\n // Must create this record instead\n $result = $this->connector->run(\"CREATE (n:Resource) SET n += {infos};\",\n [\n \"infos\" => [\n 'id' => $resource->getID(),\n 'version' => $resource->getVersion(),\n 'title' => $resource->getTitle(),\n 'href' => $resource->getLink()\n ]\n ]\n );\n }\n\n // STEP 2: Update or insert the resource's link to holding repository\n $result = $this->connector->run(\"MATCH (a:Resource {id: {id} })-[r:HIRELATION]->()\n return r;\",\n [\n 'id' => $resource->getID(),\n ]\n );\n $records = $result->getRecords();\n if (!empty($records)) {\n // delete the one there so that we can add the correct one (just in case)\n $result = $this->connector->run(\"MATCH (a:Resource {id: {id}})-[r:HIRELATION]->() delete r;\",\n [\n 'id' => $resource->getID()\n ]\n );\n\n }\n\n // If resource has a repository, then add a link\n if ($resource->getRepository() != null && $resource->getRepository()->getID() != null) {\n $this->connector->run(\"MATCH (a:Identity {id: {id1} }) MATCH (b:Resource {id: {id2} }) CREATE (b)-[r:HIRELATION]->(a);\",\n [\n 'id1' => (string) $resource->getRepository()->getID(),\n 'id2' => $resource->getID()\n ]);\n }\n }\n }", "public function update($data) {}", "public function update($data) {}", "public function putStream($resource);", "public function update(Request $request, NebulaResource $resource, $item): RedirectResponse\n {\n $this->authorize('update', $item);\n\n $validated = $request->validate($resource->rules(\n $resource->editFields()\n ));\n\n $resource->updateQuery($item, $validated);\n\n $this->toast(__(':Resource updated', [\n 'resource' => $resource->singularName(),\n ]));\n\n return redirect()->back();\n }", "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 }", "public function update($entity);", "public function update($entity);", "public function setResource($resource);", "public function updateStream($path, $resource, Config $config)\n {\n return $this->upload($path, $resource, $config);\n }", "public function isUpdateResource();", "public function update(Request $request, $id)\n {\n $device = Device::findOrFail($id);\n $device->fill($request->all());\n if ($request->hasFile('icon')) {\n if ($device->hasMedia('icon')) {\n $device->deleteMedia($device->getFirstMedia('icon'));\n }\n $device->addMediaFromRequest('icon')->toMediaCollection('icon');\n }\n $device->save();\n return new DeviceResource($device);\n }", "public function update(Request $request, $id)\n {\n //\n $product = Product::findOrFail($id);\n \n $product->update($request->all());\n \n $file = $request->file('url_image')->move('upload', $request->file('url_image')->getClientOriginalName());\n\n Product::where('id',$id)->update(['url_image'=>$file]);\n \n \\Session::flash('flash_message', 'Edit product successfully.'); \n \n //cũ : return redirect('articles');\n return redirect()->route('products.index');\n }", "public function store($data, Resource $resource);", "public function update(Request $request, $id)\n {\n \n $product = Product::find($id);\n\n\n $product->fill($request->all())->save();\n\n //Verificamos que tenemos una imagen\n if($request->file('photo_1')){\n\n\n //En caso de tenerla la guardamos en la clase Storage en la carpeta public en la carpeta image.\n $path = Storage::disk('public')->put('photo_1',$request->file('photo_1'));\n\n //Actualizamos el Post que acabamos de crear\n $product->fill(['photo_1' => asset($path)])->save();\n\n }\n\n\n return redirect()->route('products.index')->with('info', 'Producto actualizado exitosamente!');\n }", "public function update(Request $request, $id)\n {\n $product = Product::find($id);\n\n if (\\Input::hasFile('image')) {\n $this->imgsave($request, $product);\n }\n\n\n if (!empty($request->input('tags'))) {\n $product->tags()->sync($request->input('tags'));\n } else {\n $product->tags()->detach();\n }\n\n $product->update($request->all());\n\n return redirect()->to('dashboard/product')->with('message', 'update success');\n }", "public function put($resource_path, array $variables = array()) {\n return $this->call($resource_path, $variables, 'PUT');\n }", "public function update($id)\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n if (method_exists($this, 'updateValidations')) {\n $this->request->validate($this->updateValidations());\n }\n\n /* Get the specified resource */\n $resource = $this->model::findOrFail($id);\n\n /* Update the specified resource */\n $resource->update(Input::all());\n\n /* Redirect back */\n return redirect()->back()\n ->with(\n 'info',\n Lang::has($this->name . '.resource-updated') ?\n $this->name . '.resource-updated' :\n 'messages.alert.resource-updated'\n );\n }", "public function putResponse($request)\n {\n $idSearched = $this->searcher->searchResourceIndex(\n $request, \n $this->db[$request['resource']]\n );\n if ($idSearched) {\n $resource = $this->db[$request['resource']][$idSearched];\n $bodyInput = json_decode($this->standardInput, true);\n $resource = BodyRequest::canApplyBody($bodyInput);\n $resource['id'] = (int)$request['param'];\n foreach($resource as $key => $value) {\n $this->db[$request['resource']][$idSearched][$key] = $value;\n }\n file_put_contents(DB_PATH, json_encode($this->db));\n }\n }", "public function update(Request $request, $id)\n\n {\n ResourceManagement::findOrFail($id);\n $constraints = [\n 'title' => 'required|max:100',\n 'url'=> 'required|max:191',\n 'content' => 'required'\n ];\n\n $input = [\n 'title' => $request['title'],\n 'url' => $request['url'],\n 'content' => $request['content'],\n 'type' => $request['type'],\n 'level' => $request['level'],\n 'user_id' => $request['user']\n ];\n// $this->validate($input, $constraints);\n ResourceManagement::where('id', $id)\n ->update($input);\n\n return redirect()->intended('/resource-management');\n }", "public function update(Request $request, $id)\n {\n $this->validate($request, [\n 'title' => 'required',\n 'description' => 'required|string',\n 'price' => 'required|numeric',\n 'reference'=>'required'\n ]);\n \n $product = Product::find($id);\n $product->update($request->all());\n \n $im = $request->file('picture');\n \n if (!empty($im)) {\n \n $link = $request->file('picture')->store('images');\n \n \n $product->update([\n 'url_image' => $link,\n ]);\n } \n //dump($request->all());\n return redirect()->route('product.index')->with('message', 'Article modifié avec succès');\n }", "public function update(Storedataset $request, dataset $dataset){\n $dataset->title = $request->input('title');\n $dataset->caption = $request->input('caption');\n $dataset->file_url = $request->input('file_url');\n $dataset->type = $request->input('type');\n $dataset->status = $request->input('status');\n $dataset->publication_id = $request->input('publication_id');\n\n $dataset->save();\n\n return redirect()->route('datasets.show', ['dataset' => $dataset]);\n }", "public function update(StoreOrUpdateAsset $request, Asset $asset)\n {\n if (Storage::exists($asset->path) && !Storage::delete($asset->path)) {\n abort(500);\n }\n\n $file = $request->file('file');\n $path = $file->store('assets');\n\n if (!$path) {\n abort(500);\n }\n\n // We wonder if we should delete the old file or not...\n\n $asset->name = $file->getClientOriginalName();\n $asset->size = $file->getSize();\n $asset->type = $file->getMimeType();\n $asset->path = $path;\n\n if ($asset->save()) {\n flash('The asset has been saved.')->success();\n } else {\n abort(500);\n }\n\n return redirect('/admin/assets');\n }", "public function update(FoodRecipeRequest $request, $id)\n {\n $foodRecipe = FoodRecipe::with('ingredients','cookingProcesses')->findOrFail($id);\n if ($request->input('name')!= null)\n $foodRecipe->name = $request->input('name');\n if ($request->input('detail')!= null)\n $foodRecipe->detail = $request->input('detail');\n if($request->file('photo') != null) {\n $old_file = $foodRecipe->photo;\n if($old_file != null){\n $path = public_path().'/storage/'.$old_file;\n File::delete($path);\n }\n $file = $request->file('photo');\n $name = '/foodRecipe/' . Carbon::now()->format(\"dnY-Hisu\") . \".\" . $file->extension();\n $file->storePubliclyAs('public', $name);\n $foodRecipe->photo = $name;\n }\n $foodRecipe->save();\n return new FoodRecipeResource($foodRecipe);\n }", "public function update(StorageTypeRequest $request, $id)\n {\n try {\n $this->service->updateStorageType($request, $id);\n return $this->NoContent();\n } catch (EntityNotFoundException $e) {\n \\Log::error($e->getMessage());\n return $this->NotFound($e->getMessage());\n } catch(\\QueryException $e) {\n \\Log::error($e->getMessage());\n return $this->ServerError();\n } catch(Exception $e) {\n \\Log::error($e->getMessage());\n return $this->ServerError();\n }\n }", "public function update(Request $request, $id)\n {\n //validation\n $this->validate(request(),[\n 'image' => 'image'\n ]);\n\n $slider = HomeSliders::find($id);\n \n $slider->link = request('link');\n\n //get old image to delete if updated\n $oldImage = request('oldImage');\n //get the new image\n $NewImage=$request->file('image');\n\n if($NewImage)\n {\n $filenameToStore= helpers::updatePhoto('image','homeSliders',$request);\n $slider->image=$filenameToStore;\n\n Storage::delete('public/Images/homeSliders/'.$oldImage);\n }\n\n $slider->save();\n\n Alert::success(config('app.name'), trans('messages.Updated Successfully') );\n return redirect()->route('admin.homeSlider',$slider->type);\n }", "public function update(Qstore $request, $id)\n {\n //\n }", "public function update(IEntity $entity);", "public function update($request, $id);", "protected function performUpdate(): bool\n {\n // Abort if resource does not support update operations\n if (!$this->isUpdatable()) {\n throw new UnsupportedOperation(sprintf('API does not support update operation for %s resources', $this->resourceNameSingular()));\n }\n\n $id = $this->id();\n $prepared = $this->prepareBeforeUpdate($this->toArray());\n\n $payload = [\n $this->resourceNameSingular() => $prepared\n ];\n\n $response = $this\n ->request()\n ->put($this->endpoint($id), $payload);\n\n // Extract and (re)populate resource (if possible)\n // Note: Unlike the \"create\" method, Redmine does NOT\n // appear to send back a full resource when it has been\n // successfully updated.\n $this->fill(\n $this->decodeSingle($response)\n );\n\n return true;\n }", "function put($resource, $data = null) {\r\n\t\t\r\n\t\tif(isset($data)) {\r\n\t\t\t$this->request_body = $data;\r\n\t\t}\r\n\r\n\t\t// make the call chief\r\n\t\t$this->exec ( \"PUT\", '/' . $resource );\r\n\r\n\t\t// check the request status\r\n\t\tif($this->status_code != 200){\r\n\t\t\t$this->Logger->error(\r\n\t\t\t\tsprintf(\r\n\t\t\t\t\t'GET Call for resource \\'%s\\' Failed.\r\n\t\t\t\t\tStatus: %d,\r\n\t\t\t\t\tRequest: %s\r\n\t\t\t\t\tAPI Error Message: \r\n\t\t\t\t\t%s',\r\n\t\t\t\t\t$resource,\r\n\t\t\t\t\t$this->status_code,\r\n\t\t\t\t\t$this->request_body_raw,\r\n\t\t\t\t\t$this->response_body\r\n\t\t\t\t)\r\n\t\t\t);\r\n\t\t\tthrow new Exception($this->response_body);\r\n\t\t} else {\r\n\t\t\treturn $this->response_parsed;\r\n\t\t}\r\n\t}", "public function updateEntities($resource)\n {\n $json = [\n 'resource' => $resource,\n ];\n $request = $this->createRequest('PUT', '/entities', ['json' => $json]);\n $response = $this->send($request);\n return $response;\n }", "public function updateStream($path, $resource, Config $config)\n {\n return $this->writeStream($path, $resource, $config);\n }", "public function update(Request $request, $id)\n {\n\n $product = Product::findOrFail($id);\n $product->name = $request['name'];\n $product->price = $request['price'];\n $product->stock = $request['stock'];\n $product->description = $request['description'];\n\n $file = $request->file('image');\n $fileName = $file->getClientOriginalName();\n if($fileName != $product->image){\n $request->file('image')->move('images/',$fileName);\n $product->image = $fileName;\n }\n\n $product->save();\n\n return redirect()->route('products.show',\n $product->id)->with('flash_message',\n 'Article, '. $product->name.' updated');\n }", "protected function handleUpdate()\n {\n $resource = $this->argument('resource');\n $action = $this->option('action');\n $startPage = (int)$this->option('startPage');\n $perPage = (int)$this->option('perPage');\n\n try {\n $harvest = Harvest::where('resource', $resource)->where('action', $action)->firstOrFail();\n } catch (\\Exception $e) {\n $this->info('There is no existing action for updating ' . ucwords($action) . ' ' . ucwords($resource) . '.');\n exit('Nothing was updated.');\n }\n\n $options = [\n 'startPage' => $startPage,\n 'perPage' => $perPage,\n 'lastRun' => $harvest->last_run_at\n ];\n\n // If a lastRun was given use that\n // OR if this has never been run before use 2001-01-01\n if (!empty($this->option('lastRun'))) {\n $options['lastRun'] = new Carbon($this->option('lastRun'));\n } elseif (is_null($options['lastRun'])) {\n $options['lastRun'] = new Carbon('2001-01-01');\n }\n\n $job = new UpdateResourceJob(\n $harvest,\n $options\n );\n\n $message = 'Updating ' . $action . ' ' . $resource . ' ' . $perPage . ' at a time';\n if (isset($lastRun)) {\n $message .= ' with entries updated since ' . $lastRun->format('r');\n }\n $this->info($message);\n $this->dispatch($job);\n }", "public function update($id, $data);", "public function update($id, $data);", "public function update($id, $data);", "public function update($id, $data);", "public function update($id, $data);", "abstract public function put($data);", "public function update(Request $request, $id)\n {\n $storageplace = Storageplace::findOrFail($id);\n $storageplace->update($request->only(['storageplace']));\n return $storageplace;\n }", "public function testUpdateSupplierUsingPUT()\n {\n }", "public function update(Request $request, $id)\n {\n $skill = Skill::findOrFail($id);\n\n $skill->skill = $request->skill;\n\n if ($request->hasFile('image')) {\n \\Cloudder::upload($request->file('image'));\n $c=\\Cloudder::getResult();\n // $image = $request->file('image');\n // $filename = time() . '.' . $image->getClientOriginalExtension();\n // $location = public_path('images/' . $filename);\n // Image::make($image)->save($location);\n\n $skill->image = $c['url'];\n }\n\n $skill->save();\n\n Session::flash('success', 'Successsfully updated your skill!');\n return redirect()->route('skills.index');\n }", "public function updateRelatedImage(Request $request, $id)\n {\n // Delete display image in Storage\n Validator::make($request->all(), ['photos' => \"required|file|image|mimes:jpg,png,jpeg|max:5000\"])->validate();\n\n\n if ($request->hasFile(\"photos\")) {\n\n $photo = ProductsPhoto::find($id);\n $imageName = $photo->photos;\n $exists = Storage::disk('local')->exists(\"public/product_images/\" . $photo->photos);\n\n //delete old image\n if ($exists) {\n Storage::delete('public/product_images/' . $imageName);\n }\n\n //upload new image\n $ext = $request->file('photos')->getClientOriginalExtension(); //jpg\n\n $request->photos->storeAs(\"public/product_images/\", $imageName);\n\n $arrayToUpdate = array('photos' => $imageName);\n DB::table('products_photos')->where('id', $id)->update($arrayToUpdate);\n\n return redirect()->route(\"adminDisplayRelatedImageForm\", ['id' => $photo->product_id]);\n } else {\n\n $error = \"NO Image was Selected\";\n return $error;\n }\n }", "public function updateStream($path, $resource, Config $config = null)\n {\n $contents = stream_get_contents($resource);\n\n return $this->write($path, $contents, $config);\n }", "public abstract function update($object);", "public static function update($id, $file)\n {\n Image::delete($id);\n\n Image::save($file);\n }", "public function update(Request $request, $id)\n {\n $product = Product::find($id);\n $image = $product->image;\n if($request->hasFile('image')){\n $image = $request->file('image')->store('files');\n \\Storage::delete($product->image);\n } \n $product->name = $request->get('name');\n $product->price = $request->get('price');\n $product->description = $request->get('description');\n $product->additional_info = $request->get('additional_info');\n $product->category_id = $request->get('category');\n $product->subcategory_id = $request->get('subcategory');\n $product->image = $image;\n $product->save();\n return redirect()->back();\n }", "public function update(Request $request, $id)\n {\n $sli=Slider::find($id);\n $sli->sort_order=$request->input('sort_order');\n $image = $request->file('slider');\n if($image == ''){\n $image = $sli->slider;\n }else{\n $image = base64_encode(file_get_contents($request->file('slider')));\n }\n $sli->slider = $image;\n $sli->save();\n return redirect()->back();\n }", "public function update(ProductRequest $request, $id)\n {\n $input = Product::find($id);\n $data = $request->all();\n if ($file = $request->file('product_photo')){\n $name = time().$file->getClientOriginalName();\n $file->move('product_image',$name);\n $data['product_photo']=$name;\n// $input->update($data);\n }\n $input->update($data);\n return redirect('admin/products/');\n }", "public function update(Request $request, $id)\n {\n $product = ProductModel::find($id);\n $product->name = $request->name;\n $product->description = $request->description;\n $product->price = $request->price;\n $product->stock = $request->stock;\n\n if($request->image!=null){\n $imageName = time().'.'.$request->image->extension();\n $request->image->move(public_path('images'), $imageName);\n $product->image = \"/images/\".$imageName;\n }\n $product->save();\n return redirect(\"/products/index\")->with('success','Product has been updated');\n }", "public function update(Request $request, $id)\n {\n $volume = $this->findVolume($id);\n\n if(count($volume) > 0) {\n $volume->str_volume_name = $request->str_volume_name;\n\n $volume->save();\n }\n\n return response()\n ->json(\n array(\n 'message' => 'Volume is successfully updated.',\n 'volume' => $volume\n ),\n 201\n );\n }", "public function update()\n {\n $accessory = Accessories::find(request('id'));\n\n if ($accessory == null) {\n return response()->json([\"error\" => \"aksesuaras nerastas\"], 404);\n }\n\n $this->validateData();\n $path = $accessory->src;\n\n if (request()->hasFile('src')) {\n\n if (Storage::disk('public')->exists($accessory->src)) {\n Storage::disk('public')->delete($accessory->src);\n }\n $path = request()->file('src')->store('accessoriesImages', 'public');\n }\n\n $accessory->update(array_merge($this->validateData(), ['src' => $path]));\n\n return response()->json([\"data\" => $accessory], 200);\n }", "public function update(ProductStoreRequest $request,$id)\n {\n $data = $request->validated();\n $product = Product::where('id',$id);\n $product->update($data);\n return response(\"Producto actualizado con éxito\",200);\n }", "public function update($entity)\n {\n \n }", "public function updateStream($path, $resource, Config $config)\n {\n return $this->write($path,stream_get_contents($resource),$config);\n }", "public function update($id, Request $request)\n {\n date_default_timezone_set('Asia/Taipei');\n $data = $request->all();\n $dbData = Product::find($id);\n $myfile = Storage::disk('local');\n if ($request->hasFile('img')) {\n $file = $request->file('img');\n $path = $myfile->putFile('public', $file);\n $data['img'] = $myfile->url($path);\n File::delete(public_path($dbData->img));\n }\n $dbData->update($data);\n\n if ($request->hasFile('imgs')) {\n // $this->fetchDestroyByProdId($id);\n $localS = Storage::disk('local');\n\n $fileS = $request->file('imgs');\n $imgs = [];\n foreach ($fileS as $i) {\n $pathS = $localS->putFile('public', $i);\n $imgs[] = $localS->url($pathS);\n }\n foreach ($imgs as $img) {\n ProductImg::create([\n 'product_id' => $id,\n 'img' => $img\n ]);\n }\n }\n\n return redirect()->route('admin');\n }", "public function update(Request $request, Product $product)\n { $remfile= $product->image;\n if($request->filep){\n $product->image=$request->filep;\n File::delete(storage_path('app/public/products/'.$remfile));\n }else{\n $product->image=$remfile;\n }\n //rmdir(storage_path('app/public/products/'.$remfile));\n $product->name = $request->name;\n $product->description = $request->description;\n $product->price = $request->price;\n $product->save();\n sleep(3);\n toast('Details updated successfully','info');\n return redirect('/products');\n }", "public function update($id, $input);", "public function update(ProductRequest $request,int $id): ProductResource\n {\n $attributes = $request->only('supplier_id', 'name', 'warehouses');\n\n return new ProductResource($this->productRepository->update($id, $attributes)); }", "public function update(Request $request, $id)\n {\n $slider=new Slider;\n $slider=$slider::find($id);\n \n \n if($file =$request->file('slider')){\n if(Storage::delete('public/slider/'.$slider->slider)){\n\n //Get file original name//\n \n$original_name=$file->getClientOriginalName();\n\n //Get just the file name\n$filename=pathinfo($original_name,PATHINFO_FILENAME);\n\n//Create new file name\n$name=$filename.'_'.time().'.'.$file->getClientOriginalExtension();\n\n $destination='public/slider';\n $path=$request->slider->storeAs($destination,$name);\n $slider->slider=$name;\n $slider->save();\n return redirect('Admin/slider');\n\n }\n }\n}", "public function update(Request $request, $id)\n {/* dd($request->all()); */\n $acheivePic = $this->acheiveRepo->find($id);\n $acheive = $request->except('_method', '_token', 'photo', 'ar', 'en');\n $acheiveTrans = $request->only('ar', 'en');\n\n if ($request->hasFile('icon')) {\n // Delete old image first.\n $oldPic = public_path() . '/images/acheives/' . $acheivePic->icon;\n File::delete($oldPic);\n\n // Save the new one.\n $image = $request->file('icon');\n $imageName = $this->upload($image, 'acheives');\n $acheive['icon'] = $imageName;\n }\n\n $this->acheiveRepo->update($id, $acheive, $acheiveTrans);\n\n return redirect('admin-panel/widgets/acheive')->with('updated', 'updated');\n }", "public function update(Request $request, $id)\n {\n $data = $request->all();\n extract($data);\n\n $productVarient = new ProductVariant();\n $productVarient = $productVarient->find($id);\n $productVarient->vendor_id = auth()->user()->id;\n $productVarient->description = $prod_desc;\n $productVarient->price = $price;\n\n if(request()->hasFile('photo')){\n $image = request()->file('photo')->getClientOriginalName();\n $imageNewName = auth()->user()->id.'-'.$image;\n $file = request()->file('photo');\n $file->storeAs('images/product',$imageNewName, ['disk' => 'public']);\n $productVarient->image = $imageNewName;\n }\n \n $productVarient->save();\n\n return back()->withStatus(__('Product successfully updated.'));\n }", "public function update(Request $request, $id)\n {\n //if upload new image, delete old image\n $myfile=$request->old_photo;\n if($request->hasfile('photo'))\n {\n $imageName=time().'.'.$request->photo->extension();\n $name=$request->old_photo;\n\n if(file_exists(public_path($name))){\n unlink(public_path($name));\n $request->photo->move(public_path('backendtemplate/truefalseimg'),$imageName);\n $myfile='backendtemplate/truefalseimg/'.$imageName;\n }\n }\n //Update Data\n $truefalsequestion=TrueFalseQuestion::find($id);\n $truefalsequestion->name=$request->name;\n $truefalsequestion->photo=$myfile;\n $truefalsequestion->answer = $request->answer;\n $truefalsequestion->question_id = $request->question;\n $truefalsequestion->save();\n\n //Redirect\n return redirect()->route('truefalsequestions.index'); \n }", "public function update($id);", "public function update($id);", "public function update(Request $request, $id)\n {\n $request->validate([\n 'path_image'=>'image',\n 'status'=>'required|in:0,1'\n ]);\n $slider=Slider::whereId($id)->first();\n if (is_null($slider)){\n return redirect()->route('sliders.index')->with('error','Slider does not exist');\n }\n try {\n if ($request->hasFile('path_image')){\n $file = $request->file('path_image');\n\n $image_path= $file->store('/sliders',[\n 'disk'=>'uploads'\n ]);\n Storage::disk('uploads')->delete($slider->image);\n\n $request->merge([\n 'image'=>$image_path,\n ]);\n }\n\n $slider->update( $request->only(['status','image']));\n return redirect()->route('sliders.index')->with('success','Updated successful');\n }catch (\\Exception $exception){\n return redirect()->route('sliders.index')->with(['error'=>'Something error try again']);\n\n }\n }", "public function put($path, $data = null);", "private function update()\n {\n $this->data = $this->updateData($this->data, $this->actions);\n $this->actions = [];\n }", "public function update() {\n $this->accessory->update($this->accessory_params());\n\n if ($this->accessory->is_valid()) {\n $this->update_accessory_image($this->accessory);\n redirect('/backend/accessories', ['notice' => 'Successfully updated.']);\n } else {\n redirect(\n '/backend/accessories/edit',\n ['error' => $this->accessory->errors_as_string()],\n ['id' => $this->accessory->id]\n );\n }\n }", "public function update(Entity $entity);", "public function update(Request $request, $id)\n {\n $icon = SliderIcon::find($id);\n $data = $request->all();\n $data['active'] = $request->has('active') ? 1 : 0;\n if ($request->hasFile('img')) {\n if (Storage::disk('public')->exists(str_replace('storage', '', $icon->img))){\n Storage::disk('public')->delete(str_replace('storage', '', $icon->img));\n }\n $image = $request->file('img');\n $fileName = time().'_'.Str::lower(Str::random(5)).'.'.$image->getClientOriginalExtension();\n $path_to = '/upload/images/'.getfolderName();\n $image->storeAs('public'.$path_to, $fileName);\n $data['img'] = 'storage'.$path_to.'/'.$fileName;\n }\n $icon->update($data);\n return redirect()->route('slider_icons.index')->with('success', 'Данные преимущества обнавлены');\n }", "public function update(Request $request, $id)\n {\n //validate incoming request\n $request->validate([\n 'name' => 'string|max:100|nullable',\n 'picture' => 'max:2000|mimes:jpeg,jpg,png,svg|nullable', //max size 2mb,\n 'total' => 'integer|min:0|nullable', //value must be > 0\n 'selling_price' => 'numeric|min:0|nullable',\n 'cost_price' => 'numeric|min:0|nullable',\n 'category_id' => 'integer|nullable'\n ]);\n\n try {\n $product = Auth::user()->store->product()->findorFail($id);\n } catch (ModelNotFoundException $e) {\n return response()->json([\n \"message\" => \"Forbidden\"\n ], 403);\n }\n\n //if category id isnt null\n if ($category_id = $request->category_id) {\n if (!$this->isCategoryIdValid($category_id))\n return response()->json([\n \"message\" => \"Category Id is not valid\"\n ], 422);\n else\n $product->category_id = $request->category_id;\n }\n\n //if uploaded file exist\n if ($picture = $request->file(\"picture\")) {\n //if product already has logo\n if ($product->picture)\n Storage::delete(Product::$PICTURE_PATH . \"/\" . $product->picture);\n\n $picture_path = $picture->store(Product::$PICTURE_PATH);\n //remove folder name from path\n $product->picture = str_replace(Product::$PICTURE_PATH . \"/\", '', $picture_path);\n }\n\n $this->renewProduct($product, $request);\n $product->save();\n return response()->json(new ProductResource($product), 200);\n }", "public function update() {\n\t $this->layout = false;\n\t \n\t //set default response\n\t $response = array('status'=>'failed', 'message'=>'HTTP method not allowed');\n\t \n\t //check if HTTP method is PUT\n\t if($this->request->is('put')){\n\t //get data from request object\n\t $data = $this->request->input('json_decode', true);\n\t if (empty($data)) {\n\t $data = $this->request->data;\n\t }\n\t \n\t //check if product ID was provided\n\t if (!empty($data['id'])) {\n\t \n\t //set the product ID to update\n\t $this->Player->id = $data['id'];\n\t if ($this->Player->save($data)) {\n\t $response = array('status'=>'success','message'=>'Product successfully updated');\n\t } else {\n\t $response['message'] = \"Failed to update product\";\n\t }\n\t } else {\n\t $response['message'] = 'Please provide product ID';\n\t }\n\t }\n\t \n\t $this->response->type('application/json');\n\t $this->response->body(json_encode($response));\n\n\t return $this->response->send();\n\t}", "public function update(Request $request, $id)\n {\n $request->validate([\n 'name' => 'required | min:3 | string',\n 'type' => 'required',\n 'producer' => 'required',\n 'image' => 'image | mimes:png,jpg,jpeg',\n 'price_input' => 'required | numeric | min:0 | max:300000000',\n 'promotion_price' => 'required | numeric | max:300000000',\n 'description' => 'required | string',\n\n ]);\n $product = Product::withTrashed()->findOrfail($id);\n $product->name = $request->name;\n $product->id_type = $request->type;\n $product->id_producer = $request->producer;\n\n $product->amount = $request->amount;\n if (request('image')) {\n $product->image = base64_encode(file_get_contents($request->file('image')->getRealPath()));\n }\n\n $product->price_input = $request->price_input;\n\n if ( $request->promotion_price >= 0 && $request->promotion_price < $product->price_input) {\n $product->promotion_price = $request->promotion_price;\n }else{\n return back()->with('error', '\n Do not enter a negative number');\n }\n $product->new = $request->new;\n\n $product->description = $request->description;\n\n $product->save();\n $product->size()->sync(request('size'));\n\n return redirect()->route('product.index')->with('success', 'Product Updated successfully');\n }", "public function update(Request $request, $id)\n {\n $product = Product::find($id);\n\n $product->name = $request->input('name');\n $product->description = $request->input('description');\n $product->lastPrice = $product->price !== $request->input('price') ? $product->price : NULL;\n $product->price = $request->input('price');\n\n if ($request->hasFile('image')) { \n $currentImg = $product->image;\n if ($currentImg) {\n Storage::delete('/public/' . $currentImg);\n }\n $image = $request->file('image'); \n $path = $image->store('images','public');\n $product->image = $path;\n };\n\n $product->save(); \n\n $product_promotions = $request->input('promotion');\n\n $product->promotions()->sync($product_promotions);\n\n return redirect()->route('admin.modify');\n }", "public static function updateImage($fileName, $imageId, $storage)\n {\n //Get image name and storage location for image\n $image = Image::where('id', '=', $imageId)->first();\n\n //Delete old image\n ResourceHandler::delete($image->name, $image->storage);\n\n //Store the new image\n $image->name = $fileName;\n $image->storage = $storage;\n\n $image->save();\n }", "public function update($request, $id)\n {\n $this->checkExits($id);\n $data = $request->except(['_method','_token','photo']);\n\n if($request->photo)\n {\n try {\n $this->UploadFile($request);\n } catch (\\Exception $e) {\n //if has exception , don't has action\n }\n if ($this->img !== '') {\n $data['img'] = $this->img;\n }\n }\n\n $this->object->update($data);\n\n }", "public function updateProduct($request, $product)\n {\n $product->update($request->except(['_token', '_method', 'image']));\n if ($request->hasFile('image')) {\n $image = $request->file('image');\n $imageName = time() . '.' . $request->file('image')->extension();\n // $img = Image::make('public/foo.jpg');\n\n $image_resize = Image::make($image->getRealPath());\n $image_resize->resize(500, 500);\n $image_resize->save(public_path('images/') . $imageName, 100);\n $product->gallery = $imageName;\n $product->save();\n }\n $product->getTags()->sync($request->input('tags'));\n }" ]
[ "0.7424884", "0.7062319", "0.70572054", "0.6897199", "0.658233", "0.6450576", "0.6347209", "0.6211253", "0.6146092", "0.6121878", "0.6114851", "0.61005586", "0.608833", "0.60537165", "0.60196865", "0.60068345", "0.5972924", "0.594671", "0.5940615", "0.5938648", "0.58927333", "0.58618903", "0.5855116", "0.5855116", "0.58517504", "0.5816175", "0.5807103", "0.5753658", "0.5753658", "0.57354003", "0.5724066", "0.5714874", "0.56957984", "0.5692136", "0.5688278", "0.5670771", "0.5656715", "0.5651525", "0.5647887", "0.563695", "0.5635239", "0.5633743", "0.5633203", "0.56296664", "0.5622203", "0.56089646", "0.5602395", "0.55937296", "0.55837464", "0.5582684", "0.55814886", "0.5575469", "0.5572433", "0.55668694", "0.556366", "0.5562336", "0.55611396", "0.55611396", "0.55611396", "0.55611396", "0.55611396", "0.5560869", "0.55574787", "0.55562645", "0.5554329", "0.5553793", "0.5553788", "0.55448633", "0.55448294", "0.5541889", "0.55402213", "0.5537772", "0.55359083", "0.55358595", "0.55248064", "0.5520229", "0.5517453", "0.5513332", "0.5511126", "0.55085385", "0.5508433", "0.5503835", "0.5502763", "0.5501662", "0.5500294", "0.5498694", "0.5496697", "0.5496697", "0.5495247", "0.5494445", "0.5494331", "0.549349", "0.5492967", "0.5484066", "0.5480196", "0.5479421", "0.54788667", "0.546669", "0.5464114", "0.54621613", "0.5458347" ]
0.0
-1
Remove the specified resource from storage.
public function destroy($id) { $potager = Potager::findOrFail($id); $potager->users()->detach(); $potager->delete(); return response()->json(['success' => true, 'potager_id' => $id]); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function delete($resource){\n return $this->fetch($resource, self::DELETE);\n }", "public function destroy(Resource $resource)\n {\n //\n }", "public function removeResource($resourceID)\n\t\t{\n\t\t}", "public function unpublishResource(PersistentResource $resource)\n {\n $client = $this->getClient($this->name, $this->options);\n try {\n $client->delete(Path::fromString($this->getRelativePublicationPathAndFilename($resource)));\n } catch (FileDoesNotExistsException $exception) {\n }\n }", "public function deleteResource(&$resource) {\n\n if ($this->connector != null) {\n $this->logger->addDebug(\"Deleting Resource Node from Neo4J database\");\n $result = $this->connector->run(\"MATCH (a:Resource {id: {id}}) detach delete a;\",\n [\n 'id' => $resource->getID()\n ]\n );\n $this->logger->addDebug(\"Updated neo4j to remove resource\");\n }\n\n }", "public function deleteShopifyResource() {\n $this->getShopifyApi()->call([\n 'URL' => API::PREFIX . $this->getApiPathSingleResource(),\n 'METHOD' => 'DELETE',\n ]);\n }", "public function deleteResource()\n {\n $database = new Database();\n $id = $this->_params['id'];\n $database->deleteResource($id);\n $this->_f3->reroute('/Admin');\n }", "protected function deleteResource($fileName, $storage)\n {\n if (Storage::disk($storage)->exists($fileName)) \n {\n return Storage::disk($storage)->delete($fileName);\n }\n }", "public function delete()\n {\n persistableCollection::getInstance($this->resourceName)->deleteObject($this);\n }", "public function remove()\n {\n $this->_getBackend()->remove($this->_id);\n }", "public function remove()\n {\n if (! ftruncate($this->fileHandle, 0)) {\n throw new StorageException(\"Could not truncate $this->path\");\n }\n if (! unlink($this->path)) {\n throw new StorageException(\"Could not delete $this->path\");\n }\n }", "public function delete()\n\t{\n\t\t$s3 = AWS::createClient('s3');\n $s3->deleteObject(\n array(\n 'Bucket' => $this->bucket,\n 'Key' => $this->location\n )\n );\n\t\tif($this->local_file && file_exists($this->local_file)) {\n\t\t\tunlink($this->local_file);\n\t\t}\n $this->local_file = null;\n\t}", "public function delete()\n\t{\n\t\tsfCore::db->query(\"DELETE FROM `swoosh_file_storage` WHERE `id`='%i';\", $this->id);\n\t\t$this->fFile->delete();\n\t}", "public function delete(): void\n {\n unlink($this->getPath());\n }", "public function delete()\n {\n if($this->exists())\n unlink($this->getPath());\n }", "public function remove($path);", "function deleteFileFromStorage($path)\n{\n unlink(public_path($path));\n}", "private function destroyResource(DrydockResource $resource) {\n $blueprint = $resource->getBlueprint();\n $blueprint->destroyResource($resource);\n\n $resource\n ->setStatus(DrydockResourceStatus::STATUS_DESTROYED)\n ->save();\n }", "public function delete(): void\n {\n unlink($this->path);\n }", "public static function delete($fileName, $storage)\n {\n if (Storage::disk($storage)->exists($fileName)) \n {\n return Storage::disk($storage)->delete($fileName);\n }\n }", "public function remove() {}", "public function remove() {}", "public function remove();", "public function remove();", "public function remove();", "public function remove();", "function delete_resource($resource_id, $page)\n\t{\n\t\t//get resource data\n\t\t$table = \"resource\";\n\t\t$where = \"resource_id = \".$resource_id;\n\t\t\n\t\t$this->db->where($where);\n\t\t$resource_query = $this->db->get($table);\n\t\t$resource_row = $resource_query->row();\n\t\t$resource_path = $this->resource_path;\n\t\t\n\t\t$image_name = $resource_row->resource_image_name;\n\t\t\n\t\t//delete any other uploaded image\n\t\t$this->file_model->delete_file($resource_path.\"\\\\\".$image_name, $this->resource_path);\n\t\t\n\t\t//delete any other uploaded thumbnail\n\t\t$this->file_model->delete_file($resource_path.\"\\\\thumbnail_\".$image_name, $this->resource_path);\n\t\t\n\t\tif($this->resource_model->delete_resource($resource_id))\n\t\t{\n\t\t\t$this->session->set_userdata('success_message', 'resource has been deleted');\n\t\t}\n\t\t\n\t\telse\n\t\t{\n\t\t\t$this->session->set_userdata('error_message', 'resource could not be deleted');\n\t\t}\n\t\tredirect('resource/'.$page);\n\t}", "public function deleteImage(){\n\n\n Storage::delete($this->image);\n }", "public function del(string $resource): bool|string\n {\n $json = false;\n $fs = unserialize($_SESSION['rfe'][$this->getRoot()], ['allowed_classes' => false]);\n if (array_key_exists($resource, $fs)) {\n // if $item has children, delete all children too\n if (array_key_exists('dir', $fs[$resource])) {\n foreach ($fs as $key => $file) {\n if (isset($file['parId']) && $file['parId'] == $resource) {\n unset($fs[$key]);\n }\n }\n }\n unset($fs[$resource]);\n $_SESSION['rfe'][$this->getRoot()] = serialize($fs);\n $json = '[{\"msg\": \"item deleted\"}]';\n }\n return $json;\n }", "public function destroy()\n\t{\n\t\treturn unlink(self::filepath($this->name));\n\t}", "public function destroy($id) {\n $book = Book::find($id);\n // return unlink(storage_path(\"public/featured_images/\".$book->featured_image));\n Storage::delete(\"public/featured_images/\" . $book->featured_image);\n if ($book->delete()) {\n return $book;\n }\n\n }", "public function destroy($id)\n {\n Storageplace::findOrFail($id)->delete();\n }", "public function destroyResourceImage(): void\n\t{\n\t\tif (isset($this->image)) {\n\t\t\t@imagedestroy($this->image->getImageResource());\n\t\t}\n\t}", "public function deleteResource(PersistentResource $resource)\n {\n $pathAndFilename = $this->getStoragePathAndFilenameByHash($resource->getSha1());\n if (!file_exists($pathAndFilename)) {\n return true;\n }\n if (unlink($pathAndFilename) === false) {\n return false;\n }\n Files::removeEmptyDirectoriesOnPath(dirname($pathAndFilename));\n return true;\n }", "public function deleteImage(){\n \tStorage::delete($this->image);\n }", "public function destroy()\n {\n $file=public_path(config('larapages.media.folder')).Input::all()['folder'].'/'.Input::all()['file'];\n if (!file_exists($file)) die('File not found '.$file);\n unlink($file);\n }", "public function delete() \r\n {\r\n if($this->exists())\r\n {\r\n unlink($this->fullName());\r\n }\r\n }", "public function destroy($id)\n {\n Myfile::find($id)->delete();\n }", "public function destroy($delete = false)\n {\n if (null !== $this->resource) {\n $this->resource->clear();\n $this->resource->destroy();\n }\n\n $this->resource = null;\n clearstatcache();\n\n // If the $delete flag is passed, delete the image file.\n if (($delete) && file_exists($this->name)) {\n unlink($this->name);\n }\n }", "public static function delete($path){\r\n $currentDir = getcwd();\r\n $storageSubPath = \"/../../\".STORAGE_PATH;\r\n $file = $currentDir . $storageSubPath . '/' . $path;\r\n\r\n unlink($file);\r\n }", "public function destroy(Storage $storage)\n {\n return redirect()->route('storages.index');\n }", "public function remove() {\n //Check if there are thumbs and delete files and db\n foreach ($this->thumbs()->get() as $thumb) {\n $thumb->remove();\n } \n //Delete the attachable itself only if is not default\n if (strpos($this->url, '/defaults/') === false) {\n Storage::disk('public')->delete($this->getPath());\n }\n parent::delete(); //Remove db record\n }", "public function removeFile($uri){\n return Storage::disk('public')->delete($uri);\n }", "public function destroy(Resource $resource)\n {\n if( $resource->delete() ){\n return Response(['status'=>'success','message'=>'Resource deleted']); \n } else {\n return Response(['status'=>'error', 'message'=>'Something went wrong']);\n }\n }", "public function delete($path);", "public function delete($path);", "public function destroy($id)\n {\n $supplier = Supplier::find($id);\n $photo = $supplier->photo;\n if ($photo) {\n unlink($photo);\n }\n $supplier->delete();\n }", "public function destroy($id)\n { \n File::find($id)->remove();\n \n return redirect()->route('files.index');\n }", "public function destroy($id)\n {\n $student = Student::where('id', $id)->first();\n // $path = $student->image;\n unlink($student->image);\n Student::findOrFail($id)->delete();\n return response('Deleted!');\n }", "public function destroy($id)\n {\n $icon = SliderIcon::find($id);\n if (Storage::disk('public')->exists(str_replace('storage', '', $icon->img))){\n Storage::disk('public')->delete(str_replace('storage', '', $icon->img));\n }\n $icon->delete();\n return redirect()->route('slider_icons.index')->with('success', 'Данные преимущества удалёны');\n }", "public function delete($path, $data = null);", "public function destroy($id)\n {\n $items=Items::find($id);\n // delete old file\n if ($items->photo) {\n $str=$items->photo;\n $pos = strpos($str,'/',1);\n $str = substr($str, $pos);\n $oldFile = storage_path('app\\public').$str;\n File::Delete($oldFile); \n }\n $items->delete();\n return redirect()->route('items.index');\n }", "public function destroy($id)\n {\n $carousel = Carousel::find($id);\n $image = $carousel->image;\n\n $basename ='img/carousel/' . basename($image);\n //Delete the file from disk\n if(file_exists($basename)){\n unlink($basename);\n }\n //With softDeletes, this is the way to permanently delete a record\n $carousel->delete();\n Session::flash('success','Product deleted permanently');\n return redirect()->back();\n }", "public function remove()\n {\n $fs = new Filesystem();\n $fs->remove($this->dir());\n }", "public static function destroy(int $resource_id)\n {\n try {\n $image_data = ListingImage::where('id', $resource_id)->first();\n self::delete_image($image_data->name);\n $delete = ListingImage::where('id', $resource_id)->delete();\n\n // activity()\n // ->causedBy(Auth::user()->id)\n // ->performedOn($delete)\n // ->withProperties(['id' => $delete->id])\n // ->log('listing image deleted');\n return response()->json(['status'=> 'ok', 'msg'=> 'Data deleted successfully']);\n } catch (Exception $e) {\n $e->getMessage();\n }\n }", "public function destroy(Storage $storage)\n {\n $this->storage->destroy($storage);\n\n return redirect()->route('admin.product.storage.index')\n ->withSuccess(trans('core::core.messages.resource deleted', ['name' => trans('product::storages.title.storages')]));\n }", "public function del($path){\n\t\treturn $this->remove($path);\n\t}", "public function destroy($id)\n {\n //\n $product = Product::findOrFail($id);\n $product->delete();\n if($product->img != 'product-default.png'){\n Storage::delete(\"public/uploads/\".$product->img);\n // return 'deleted';\n }\n return redirect()->route('product.index'); \n }", "public function destroy($id)\n {\n $image = Images::withTrashed()->find($id);\n\n Storage::disk('uploads')->delete(\"social-media/$image->filename\");\n\n $image->tags()->detach();\n $image->detachMedia(config('constants.media_tags'));\n $image->forceDelete();\n\n return redirect()->back()->with('success', 'The image was successfully deleted');\n }", "public function removeUpload()\n{\n if ($file = $this->getAbsolutePath()) {\n unlink($file); \n }\n}", "public function destroyByResourceId($resource_id)\n {\n// $online_party = $this->onlinetrack->where('resource_id', $resource_id)->get()->first();\n// $online_party->status = \"offline\";\n// $online_party->save();\n// return $online_party;\n return $this->onlinetrack->where('resource_id', $resource_id)->delete();\n }", "public function revoke($resource, $permission = null);", "public function destroy($id)\n {\n $data=Image::find($id);\n $image = $data->img;\n\n\n $filepath= public_path('images/');\n $imagepath = $filepath.$image;\n\n //dd($old_image);\n if (file_exists($imagepath)) {\n @unlink($imagepath);\n }\n\n\n $data->delete();\n\n return redirect()->route('image.index');\n }", "function delete($path);", "public function destroy(File $file)\n {\n //\n $v = Storage::delete($file->path);\n \n }", "public function destroyResource($resource)\n {\n if (!is_object($resource)) {\n return false;\n }\n\n $resource_type = get_class($resource);\n $resource_id = $resource->getKey();\n\n return Role::where('resource_type', $resource_type)\n ->where('resource_id', $resource_id)\n ->delete();\n }", "public function removeItem(int $id)\n\t{\n\t\t$this->storage->remove($id);\n\t}", "public function remove($filePath){\n return Storage::delete($filePath);\n }", "public function remove(): void\n {\n $file = $this->getAbsolutePath();\n if (!is_file($file) || !file_exists($file)) {\n return;\n }\n\n unlink($file);\n }", "public function destroy(Request $request, Storage $storage)\n {\n $storage->delete();\n $request->session()->flash('alert-success', 'Запись успешно удалена!');\n return redirect()->route('storage.index');\n }", "public function remove(Storable $entity): Storable\n {\n $this->getRepository(get_class($entity))->remove($entity);\n $this->detach($entity);\n\n return $entity;\n }", "public function processDeletedResource(EntityResource $resource)\n {\n /** @var AuthorizationRepository $repository */\n $repository = $this->entityManager->getRepository('Edweld\\AclBundle\\Entity\\Authorization');\n\n $repository->removeAuthorizationsForResource($resource);\n }", "function _unlink($resource, $exp_time = null)\n {\n if(file_exists($resource)) {\n return parent::_unlink($resource, $exp_time);\n }\n\n // file wasn't found, so it must be gone.\n return true;\n }", "public function remove($id);", "public function remove($id);", "public function destroy($id)\n {\n $data = Product::findOrFail($id);\n\n if(file_exists('uploads/product/'.$data->image1)){\n unlink('uploads/product/'.$data->image1);\n }\n\n if(file_exists('uploads/product/'.$data->image2)){\n unlink('uploads/product/'.$data->image2);\n }\n\n if(file_exists('uploads/product/'.$data->image3)){\n unlink('uploads/product/'.$data->image3);\n }\n $data->delete();\n }", "public function deleted(Storage $storage)\n {\n //\n }", "public function resources_delete($resource_id, Request $request) {\n if ($resource_id) {\n $resp = Resources::where('id', '=', $resource_id)->delete();\n if($resp){\n $msg = 'Resource has been deleted successfully.';\n $request->session()->flash('message', $msg);\n }\n }\n //return redirect()->route('admin-factor-list');\n return redirect()->to($_SERVER['HTTP_REFERER']);\n }", "public function removeUpload()\n {\n $file = $this->getAbsolutePath();\n if ($file) {\n unlink($file);\n }\n }", "function deleteResource($uuid){\n $data = callAPI(\"DELETE\",\"/urest/v1/resource/\".$uuid);\n return $data;\n}", "public function remove_resource($idproject){\n\t\t\n\t\t// Load model and try to get project data\n\t\t$this->load->model('Projects_model', 'projects');\n\t\t\n\t\t// Update\n\t\t$this->projects->save_project(array(\"ext\" => \"\", \"vzaar_idvideo\" => \"0\", \"vzaar_processed\" => \"0\"), $idproject);\n\t}", "public function delete()\n {\n try\n {\n $thumbnail = $this->getThumbnail();\n if($thumbnail)\n {\n $thumbnail->delete();\n }\n }\n catch(sfException $e){}\n \n // delete current file\n parent::delete();\n }", "public function destroy($id){\n $file_data = Slider::findOrFail($id);\n File::delete(public_path('../storage/app/public/sliders/'.$file_data->path));\n $slider = Slider::destroy($id);\n return response()->json(null, 204);\n }", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete();", "public function delete()\n\t{\n\t\t@unlink($this->get_filepath());\n\t\t@unlink($this->get_filepath(true));\n\t\tparent::delete();\n\t}", "public function delete($resource_path, array $variables = array()) {\n return $this->call($resource_path, $variables, 'DELETE');\n }", "public function destroy($id)\n {\n //Find Slider With Id\n $slider = Slider::findOrFail($id);\n // Check If The Image Exist\n if(file_exists('uploads/slider/'.$slider->image)){\n\n unlink( 'uploads/slider/'.$slider->image);\n }\n $slider->delete();\n return redirect()->back()->with('success','Slider Successfully Deleted');\n }" ]
[ "0.6673811", "0.66624975", "0.66376764", "0.66351163", "0.66280866", "0.65443397", "0.6543099", "0.64656305", "0.62881804", "0.61755043", "0.61278707", "0.6089098", "0.60534257", "0.6043048", "0.6006416", "0.593359", "0.5929751", "0.5923406", "0.59201753", "0.5904145", "0.58963126", "0.5895338", "0.589437", "0.589437", "0.589437", "0.589437", "0.58819216", "0.58684987", "0.5864614", "0.58097607", "0.57739484", "0.5761358", "0.57558876", "0.5750673", "0.5741367", "0.5734089", "0.57264656", "0.5715195", "0.5711313", "0.5707201", "0.57057804", "0.57053447", "0.5702519", "0.5698952", "0.56844676", "0.56844676", "0.56783324", "0.5677608", "0.56581664", "0.564899", "0.5648674", "0.5647576", "0.5641079", "0.5636559", "0.56325674", "0.5619814", "0.5615794", "0.5607223", "0.56022006", "0.5601402", "0.5601336", "0.56004316", "0.5590177", "0.55810463", "0.55665016", "0.5565872", "0.5565398", "0.5563011", "0.55565405", "0.5556361", "0.5549312", "0.5544914", "0.554211", "0.5540394", "0.5540394", "0.5537265", "0.5536237", "0.55310345", "0.55295527", "0.5529016", "0.5527304", "0.5527274", "0.5527126", "0.5527044", "0.5527044", "0.5527044", "0.5527044", "0.5527044", "0.5527044", "0.5527044", "0.5527044", "0.5527044", "0.5527044", "0.5527044", "0.5527044", "0.5527044", "0.5527044", "0.5527044", "0.5523294", "0.55231583", "0.55181384" ]
0.0
-1
select nome,ra,hora1,minutos),hora2, minutos2,horaGeral from funcionario inner join horas on horas.r_a=funcionario.ra;
public function join($tabela1 = null, $tabela2 = null, $para=null) { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function horario() {\n\t\t$query = \"SELECT \n\t\t\t\t\tCONCAT(DATE_FORMAT(data_hora, '%d/%m/%Y %H'), 'h - ',DATE_FORMAT(data_hora, '%H'),':59h') as nome,\n\t\t\t\t\tcount(q.local_id) as qtd, \n\t\t\t\t\tROUND(((count(q.local_id)*100)/t.contagem),2) as percent \n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\tFROM (assistencia q, \n\t\t\t\t\t\t (SELECT count(a.local_id) as contagem \n\t\t\t\t\t\t \tFROM assistencia a \n\t\t\t\t\t\t \tWHERE a.local_id = $this->id\n\t\t\t\t\t\t \tand a.data_hora BETWEEN '\" . $_SESSION[\"data_inicio\"] . \" 00:00:00' AND '\" . $_SESSION[\"data_final\"] . \" 23:59:59'\n\t\t\t\t \t\t\tand a.ativo = 1\n\t\t\t\t\t\t \t) t)\n\t\t\t\t\t\n\t\t\t\t\tWHERE q.local_id = $this->id\n\t\t\t\t\tand q.data_hora BETWEEN '\" . $_SESSION[\"data_inicio\"] . \" 00:00:00' AND '\" . $_SESSION[\"data_final\"] . \" 23:59:59'\n\t\t\t\t \tand q.ativo = 1\n\t\t\t\t\tGROUP BY CONCAT(DATE_FORMAT(data_hora, '%Y-%m-%d %H'), ':00:00.000')\n\t\t\t\t\tORDER BY data_hora DESC\";\n\n\t\t$this->db->ExecuteSQL($query);\n\t\treturn $this->db->ArrayResults();\n\t}", "public static function getHorario()\n {\n $hoy=Carbon::now()->toDateString();\n $horario = DB::table('asignatura_grupo')\n ->join('asignaturas','asignaturas.id','=','asignatura_grupo.asignatura_id')\n ->join('grupos','grupos.id','=','asignatura_grupo.grupo_id')\n ->join('periodos','periodos.id','=','grupos.periodo_id')\n ->join('horaDias','asignatura_grupo.horaDias_id','=','horaDias.id')\n ->select('asignaturas.nombre','grupos.salon','horaDias.dias')\n ->where('periodos.inicioPeriodo','<=',$hoy)\n ->where('periodos.finPeriodo','>=',$hoy)\n ->where('asignatura_grupo.docente_id','=',auth()->user()->docente_id)\n ->get();\n\n\n return $horario;\n }", "public function cargarHorasPorMateria($horas){\n\t\t$materia=$horas->getMateria();\n\n\t\t$this->db=Database::getInstance();\n\t\t$sql=\"SELECT * FROM horario a, materia b, horas c WHERE a.idMateria=b.idMateria and c.codHora=a.codHora and b.idMateria='$materia' order by c.dia, c.horaInicial\";\n\t\t//echo $sql;\n\t\t$result=$this->db->get_data($sql);\n\t\t//echo $result[\"DATA\"];\n\t\treturn $result;\n\t}", "function quita_segundos($hora)\n{\n\t$sin_sec=explode(\":\",$hora);\n\t$final = $sin_sec[0].\":\".$sin_sec[1];\n\treturn $final;\n}", "function divHoras($hora,$registros) {\n\t$h1=substr($hora,0,-3);\n $m1=substr($hora,3,2);\n $minutos=(($h1*60)*60)+($m1*60);\n $dif=$minutos/$registros;\n $difm=floor($dif/60);\n\treturn $difm;\n\t \n}", "function grafico_1( $desde, $hasta, $ua ){\n\t$query = \"select nested.id_cliente, noticiasactor.id_actor, nested.tema from \"\n\t. \"( select procesados.* from ( select noticiascliente.* from noticiascliente inner join proceso on noticiascliente.id_noticia = proceso.id_noticia where noticiascliente.id_cliente = \" . $ua . \" ) procesados \"\n\t. \"inner join noticia on noticia.id = procesados.id_noticia where noticia.fecha between '\" . $desde . \" 00:00:01' and '\" . $hasta . \" 23:59:59') nested \"\n\t. \"inner join noticiasactor on nested.id_noticia = noticiasactor.id_noticia order by id_actor asc \";\n\t$main = R::getAll($query);\n\t// obtengo el nombre de la unidad de analisis\n\t$ua_nombre = R::findOne(\"cliente\",\"id LIKE ?\",[$ua])['nombre'];\n\t// obtengo los nombres de todos los actores, para cruzar\n\t$actores_nombres = R::findOne(\"actor\",\"id LIKE ?\",[4]) ;\n\t//var_dump($actores_nombres['nombre'] . \" \" . $actores_nombres['apellido']);\n\n\t$tabla = [];\n\t$temas = [];\n\t$i = -1;\n\t// reemplazo actores por nombres y temas\n\tforeach($main as $k=>$v){\n\t\t$actores_nombres = R::findOne(\"actor\",\"id LIKE ?\",[ $v['id_actor'] ]);\n\t\t$main[$k]['id_cliente'] = $ua_nombre;\n\t\t// $main[$k]['id_actor'] = $actores_nombres['nombre'] . \" \" . $actores_nombres['apellido'];\n\t\t$main[$k]['id_actor'] = $v['id_actor'];\n\t\t$main[$k]['nombre'] = $actores_nombres['nombre'] . \" \" . $actores_nombres['apellido'];\n\t\t$id_tema = get_string_between($main[$k]['tema'],\"frm_tema_\",\"\\\"\");\n\t\t$tema = R::findOne(\"attr_temas\",\"id LIKE ?\",[$id_tema])['nombre'];\n\t\tif( is_null( $tema ) ) $tema = 'TEMA NO ASIGNADO';\n\t\t$main[$k]['tema'] = $tema;\n\t\t\n\t\t// if(array_search( [ $main[$k]['id_actor'],$tema], $tabla ) ) echo \"repetido\";\n\t\t// chequeo si ya existe alguno con este actor y tema, si es asi, sumo uno\n\t\t// TODO - FIXME : deberia ser mas eficiente, busqueda por dos valores\n\t\t$iter = true;\n\t\tforeach($tabla as $ka=>$va){\n\t\t\t// if($va['actor'] == $main[$k]['id_actor'] && $va['tema'] == $tema){\n\t\t\tif($va['actor'] == $main[$k]['nombre'] && $va['tema'] == $tema){\n\t\t\t\t$tabla[$ka]['cantidad'] += 1;\n\t\t\t\t$iter = false;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tif($iter){\n\t\t\t$tabla[ ++$i ] = [ \n\t\t\t\t'unidad_analisis' => $ua_nombre,\n\t\t\t\t'actor' => $main[$k]['nombre'],\n\t\t\t\t'id_actor' => $main[$k]['id_actor'],\n\t\t\t\t'tema' => $tema,\n\t\t\t\t'cantidad' => 1\n\t\t\t\t];\n\t\t\t}\n\t\t// agrego los temas que van apareciendo en la tabla temas\n\t\t// UTIL para poder hacer el CRC32 por la cantidad de colores\n\t\tif(!in_array($tema,$temas)) $temas[] = $tema;\n\t}\n\t// la agrupacion de repetidos es por aca, por que repite y cuenta temas de igual id\n\n\t// en el grafico, los hijos, son arreglos de objetos, hago una conversion tabla -> objeto\n\t$objeto = new StdClass(); // objeto vacio\n\t$objeto->name = 'Actores';\n\t$objeto->rank = 0;\n\t$objeto->weight = 1;\n\t$objeto->id = 1;\n\t$objeto->children = [];\n\tforeach($tabla as $k=>$v){\n\t\t// me fijo si el actor existe, ineficiente pero por ahora\n\t\t$NoExiste = true;\n\t\tforeach($objeto->children as $ka=>$va){\n\t\t\t// si existe actor, le inserto el tema\n\t\t\tif($va->name == $v['actor']){\n\t\t\t\t$in = new StdClass();\n\t\t\t\t// $in->name = $v['tema'] . \" (\" . $v['cantidad'] . \") \" ; // lo construye JS\n\t\t\t\t$in->name = \"\";\n\t\t\t\t$in->tema = array_search($v['tema'],$temas);\n\t\t\t\t$in->tema_cantidad = $v['cantidad'];\n\t\t\t\t$in->rank = intval($v['cantidad']); // el tamaño del objeto \n\t\t\t\t$in->weight = 0; // lo asigna JS\n\t\t\t\t$in->id = $k;\n\t\t\t\t$in->children = [];\n\t\t\t\t$objeto->children[$ka]->children[] = $in;\n\t\t\t\t$objeto->children[$ka]->cantidad_temas = count($objeto->children[$ka]->children);\t\n\t\t\t\t$objeto->children[$ka]->rank = count($objeto->children[$ka]->children);\n\t\t\t\t$NoExiste = false;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tif($NoExiste){\n\t\t\t$in = new StdClass();\n\t\t\t$in->name = $v['actor'];\n\t\t\t$in->rank = 1;\n\t\t\t$in->weight = 0; // lo asigna JS\n\t\t\t$in->id = $k;\n\t\t\t//$in->id = $v['id_actor'];\n\t\t\t$in->id_actor = $v['id_actor'];\n\t\t\t\t$t_in = new StdClass();\n\t\t\t\t// $t_in->name = $v['tema'] . \" (\" . $v['cantidad'] . \") \" ; // lo construye JS\n\t\t\t\t$t_in-> name = \"\";\n\t\t\t\t$t_in->tema = array_search($v['tema'],$temas);\n\t\t\t\t$t_in->tema_cantidad = $v['cantidad'];\n\t\t\t\t$t_in->rank = intval($v['cantidad']); // el tamaño del objeto \n\t\t\t\t$t_in->weight = 0; // lo asigna JS\n\t\t\t\t$t_in->id = $k;\n\t\t\t\t$t_in->children = [];\n\t\t\t$in->children = [ $t_in ];\n\t\t\t$objeto->children[] = $in;\n\t\t}\n\t}\n\treturn [\n\t\t'tabla' => $tabla,\n\t\t'grafico' => $objeto,\n\t\t'temas' => $temas\n\t\t];\n}", "function selectConciertosEspera(){\n $c = conectar();\n $select = \"select CONCIERTO.FECHA as FECHA, CONCIERTO.HORA as HORA, LOCALES.UBICACION as UBICACION, GENERO.NOMBRE as GENERO, USUARIOS.NOMBRE as NOMBRE, CIUDAD.NOMBRE as CIUDAD, CONCIERTO.ID_CONCIERTO as ID from CONCIERTO \n inner join LOCALES on CONCIERTO.ID_LOCAL = LOCALES.ID_LOCAL\n inner join USUARIOS on LOCALES.ID_USUARIO = USUARIOS.ID_USUARIO\n inner join CIUDAD on USUARIOS.ID_CIUDAD = CIUDAD.ID_CIUDAD\n inner join GENERO on CONCIERTO.ID_GENERO = GENERO.ID_GENERO where CONCIERTO.ESTADO=0 order by CONCIERTO.FECHA,CONCIERTO.HORA\";\n $resultado = mysqli_query($c, $select);\n desconectar($c);\n return $resultado;\n\n}", "function listadoMesa(){\n\t$query=\"SELECT * FROM mesa ORDER BY hora asc\";\n\tconsulta($query);\t\n}", "public function tiempo($dataSimulacro)\n {\n// print_r($dataSimulacro[0]);\n// $id=$dataSimulacro[0];\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 aa.tiempo_estoy_listo,\n aa.idVoluntario,\n bb.nombre\n FROM\n voluntario_simulacro_grupo aa\n INNER JOIN voluntarioCreador bb ON aa.idVoluntario = bb.id\n where \n aa.idSimulacro='\" . $dataSimulacro[0].\"'\n ORDER BY tiempo_estoy_listo\";\n// $query = 'select REPLACE(aa.tiempo_estoy_listo, \":\",\",\") as tiempo_estoy_listo,\n// aa.idVoluntario,bb.nombre from voluntario_simulacro_grupo aa inner join voluntariocreador bb\n// on aa.idVoluntario=bb.id where aa.idSimulacro='. $dataSimulacro[0] . ' order by tiempo_estoy_listo';\n \n $consulta = $this->dbAdapter->query($query, Adapter::QUERY_MODE_EXECUTE);\n \n $res = $consulta->toArray();\n \n// print_r($res);exit;\n \n return $res;\n }", "public function getNominaAus($id)\n { \n $result=$this->adapter->query(\"select a.id, a.idEmp, a.idEmp, d.idConc as idCon,0 as dias,\n ' ' as formula , e.tipo, g.idCcos , e.idFor, g.idCcos, \n case when (b.fechaf >= h.fechaF) then \n DATEDIFF(h.fechaF , b.fechai ) * 8 \n else \n DATEDIFF(b.fechaf , b.fechai ) * 8 end as horas, # temporal para cuando cambie el periodo , tener en cuenta saldo horas\n b.fechai , b.fechaf, e.nombre as nomCon \t\t\t\t\t \n from n_nomina_e a \n inner join a_empleados g on g.id = a.idEmp \n inner join n_ausentismos b on b.id = a.idAus \n inner join n_tip_aus c on c.id = b.idTaus\n inner join n_tip_aus_c d on d.idTaus = c.id \n inner join n_conceptos e on e.id = d.idConc\n inner join n_formulas f on f.id = e.idFor \n inner join n_nomina h on h.id = a.idNom \n where b.estado=1 and a.idNom=\".$id,Adapter::QUERY_MODE_EXECUTE);\n $datos=$result->toArray();\n return $datos; \n }", "function getEstadisticaPorDia() {\n\t\tglobal $mdb2;\n\t\tglobal $log;\n\t\tglobal $current_usuario_id;\n\t\tglobal $dias_semana;\n\t\tglobal $usr;\n\n\t\t/* TEMPLATE DEL GRAFICO */\n\t\t$T =& new Template_PHPLIB(($this->extra[\"imprimir\"])?REP_PATH_PRINTTEMPLATES:REP_PATH_TABLETEMPLATES);\n\t\t$T->setFile('tpl_tabla', 'rendimiento_por_dia.tpl');\n\t\t$T->setBlock('tpl_tabla', 'BLOQUE_TITULO_HORARIOS', 'bloque_titulo_horarios');\n\t\t$T->setBlock('tpl_tabla', 'ES_PRIMERO_DIA', 'es_primero_dia');\n\t\t$T->setBlock('tpl_tabla', 'LISTA_PASOS', 'lista_pasos');\n\t\t$T->setBlock('tpl_tabla', 'BLOQUE_TABLA', 'bloque_tabla');\n\n\n\t\t$T->setVar('__item_orden', $this->extra[\"item_orden\"]);\n\n\t\t$horarios = array($usr->getHorario($this->horario_id));\n\t\tif ($this->horario_id != 0) {\n\t\t\t$horarios[] = $usr->getHorario(0);\n\t\t}\n\n\t\t$orden = 1;\n\t\t$T->setVar('bloque_titulo_horarios', '');\n\t\tforeach ($horarios as $horario) {\n\n\t\t\t/* OBTENER LOS DATOS Y PARSEARLO */\n\t\t\t$sql = \"SELECT * FROM reporte.rendimiento_resumen_global_pordiasemana(\".\n\t\t\t\t\tpg_escape_string($current_usuario_id).\",\".\n\t\t\t\t\tpg_escape_string($this->objetivo_id).\", \".\n\t\t\t\t\tpg_escape_string($horario->horario_id).\",' \".\n\t\t\t\t\tpg_escape_string($this->timestamp->getInicioPeriodo()).\"', '\".\n\t\t\t\t\tpg_escape_string($this->timestamp->getTerminoPeriodo()).\"')\";\n\t\t\t$res =& $mdb2->query($sql);\n\t\t\tif (MDB2::isError($res)) {\n\t\t\t\t$log->setError($sql, $res->userinfo);\n\t\t\t\texit();\n\t\t\t}\n\n\t\t\t$row = $res->fetchRow();\n\t\t\t$dom = new DomDocument();\n\t\t\t$dom->preserveWhiteSpace = false;\n\t\t\t$dom->loadXML($row[\"rendimiento_resumen_global_pordiasemana\"]);\n\t\t\t$xpath = new DOMXpath($dom);\n\t\t\tunset($row[\"rendimiento_resumen_global_pordiasemana\"]);\n\n\t\t\t/* SI NO HAY DATOS MOSTRAR MENSAJE */\n\t\t\tif ($xpath->query('//detalle[@paso_orden]/estadisticas/estadistica')->length == 0) {\n\t\t\t\t$this->resultado = $this->__generarContenedorSinDatos();\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t$conf_objetivo = $xpath->query('/atentus/resultados/propiedades/objetivos/objetivo')->item(0);\n\t\t\t$conf_pasos = $xpath->query(\"paso[@visible=1]\", $conf_objetivo);\n\n\t\t\tif(count($horarios) > 1) {\n\t\t\t\t$T->setVar('__item_horario', $this->extra[\"item_orden\"]);\n\t\t\t\t$T->setVar('__horario_orden', $orden);\n\t\t\t\t$T->setVar('__horario_nombre',$horario->nombre);\n\t\t\t\t$T->parse('bloque_titulo_horarios', 'BLOQUE_TITULO_HORARIOS', false);\n\t\t\t}\n\n\t\t\t$T->setVar('__objetivo_nombre', $conf_objetivo->getAttribute('nombre'));\n\n\t\t\t$linea = 1;\n\t\t\t$T->setVar('lista_pasos', '');\n\t\t\tforeach($dias_semana as $dia_id => $dia_nombre){\n\t\t\t\t$primero = true;\n\n\t\t\t\t/* LISTA DE PASOS */\n\t\t\t\tforeach ($conf_pasos as $conf_paso) {\n\t\t\t\t\t$tag_dato = $xpath->query('//detalle[@dia_id='.(($dia_id == 7)?0:$dia_id).']/detalles/detalle[@paso_orden='.$conf_paso->getAttribute('paso_orden').']/estadisticas/estadistica')->item(0);\n\n\t\t\t\t\t$T->setVar('__print_class', ($linea % 2 == 0)?\"celdaIteracion2\":\"celdaIteracion1\");\n\t\t\t\t\t$T->setVar('__class', ($linea % 2 == 0)?\"celdanegra15\":\"celdanegra10\");\n\n\t\t\t\t\t$T->setVar('es_primero_dia', '');\n\t\t\t\t\tif ($primero) {\n\t\t\t\t\t\t$T->setVar('__dia_nombre', $dia_nombre);\n\t\t\t\t\t\t$T->setVar('__dia_rowspan', $conf_pasos->length);\n\t\t\t\t\t\t$T->parse('es_primero_dia', 'ES_PRIMERO_DIA', false);\n\t\t\t\t\t}\n\t\t\t\t\t$T->setVar('__paso_nombre', $conf_paso->getAttribute('nombre'));\n\t\t\t\t\t$T->setVar('__paso_minimo', number_format(($tag_dato == null)?0:$tag_dato->getAttribute('tiempo_min'), 3, ',', ''));\n\t\t\t\t\t$T->setVar('__paso_maximo', number_format(($tag_dato == null)?0:$tag_dato->getAttribute('tiempo_max'), 3, ',', ''));\n\t\t\t\t\t$T->setVar('__paso_promedio', number_format(($tag_dato == null)?0:$tag_dato->getAttribute('tiempo_prom'), 3, ',', ''));\n\t\t\t\t\t$T->parse('lista_pasos', 'LISTA_PASOS', true);\n\t\t\t\t\t$primero = false;\n\t\t\t\t\t$linea++;\n\t\t\t\t}\n\t\t\t}\n\t\t\t$T->parse('bloque_tabla', 'BLOQUE_TABLA', true);\n\t\t\t$orden++;\n\t\t}\n\t\t$this->tiempo_expiracion = (strtotime($xpath->query(\"//fecha_expiracion\")->item(0)->nodeValue) - strtotime($xpath->query(\"//fecha\")->item(0)->nodeValue));\n\t\t$this->resultado = $T->parse('out', 'tpl_tabla');\n\t}", "function DiferencaHoras($hora_inicial,$hora_final,$duracao,&$atendimentos)\r\n{\r\n $difhora = 0;\r\n $vi = explode(':',$hora_inicial);\r\n $vf = explode(':',$hora_final);\r\n $im = ($vi[0] * 60) + $vi[1];\r\n $fm = ($vf[0] * 60) + $vf[1];\r\n \r\n $dm = $fm - $im;\r\n\r\n $dh = $dm / 60;\r\n \r\n $difhora = $dh;\r\n \r\n\r\n $atendimentos = ($dm / $duracao);\r\n\r\n return $difhora;\r\n}", "public function getNominaEtau($id,$idg)\n { \n $result=$this->adapter->query('select distinct c.idNom, c.id, a.idCon, \n case a.cCosEmp when 0 then a.idCcos\n when 1 then b.idCcos End as idCcos, \n case a.horasCal when 0 then 0 \n when 1 then (c.dias*'.$this->horasDias.') End as horas, 1, \n case when g.valor=2 then \n case when g.tipo = 1 then a.valor else 0 End\t\t\t\t \n when g.valor=1 then 0 \n End as dev, \n case when g.valor=2 then \n case when g.tipo = 2 then a.valor else 0 End\t\t\t\t \n when g.valor=1 then 0 \n\t\tEnd as ded, h.formula, c.dias, g.tipo\n , b.id as idEmp , g.idFor , a.diasLab, c.diasVac, a.vaca,\n case when ii.codigo is null then \"\" else ii.codigo end as nitTer \n from n_tip_auto_i a inner join a_empleados b on a.idTauto=b.idTau\n inner join n_nomina_e c on b.id=c.idEmp \n inner join n_nomina d on d.id=c.idNom\n inner join n_tip_auto_tn e on e.idTnom=d.idTnom \n inner join n_tip_calendario f on f.id=d.idCal\n inner join n_conceptos g on g.id=a.idCon \n inner join n_formulas h on h.id=g.idFor \n left join n_terceros_s i on i.id = g.idTer \n left join n_terceros ii on ii.id = i.idTer \n WHERE not exists (SELECT null from n_nomina_e_d \n where c.id=idInom and a.idCon=idConc and a.idCcos=idCcos and tipo=1 ) \n and d.estado=0 and b.idGrup='.$idg.' and c.idNom='.$id,Adapter::QUERY_MODE_EXECUTE);\n $datos=$result->toArray();\n return $datos; \n }", "function total_diasTrabajados($id) {\n// $resultado = $this->db->query($ssql);\n// echo $resultado->row()->fh_registro.\"---\".$resultado->row()->ahora;\n $ssql = \"SELECT TIMESTAMPDIFF(YEAR,(SELECT fh_registro FROM usuarios WHERE cod_user=$id),NOW()) AS diasTrab\";\n $ssql = \"SELECT TIMESTAMPDIFF(YEAR,(SELECT fecha_inicio FROM usuarios WHERE cod_user=$id),NOW()) AS diasTrab\";\n // echo $ssql;\n $resultado = $this->db->query($ssql);\n return $resultado;\n }", "public static function buscaTempoLog($dataHora){\n $agora = date('Y-m-d H:i:s');\n\n $date_time = new DateTime($agora);\n $dif = $date_time->diff(new DateTime($dataHora));\n\n if($dif->y > 0){\n if($dif->y == 1){\n return $dif->y .\" ano\";\n }else{\n return $dif->y .\" anos\";\n }\n }elseif($dif->m > 0){\n if($dif->m == 1){\n return $dif->m .\" mês\";\n }else{\n return $dif->m .\" meses\";\n }\n }elseif($dif->d > 0){\n if($dif->d == 1){\n return $dif->d .\" dia\";\n }else{\n return $dif->d .\" dias\";\n }\n }elseif($dif->h > 0){\n if($dif->h == 1){\n return $dif->h .\" hora\";\n }else{\n return $dif->h .\" horas\";\n }\n }elseif($dif->i > 0){\n if($dif->i == 1){\n return $dif->i .\" minuto\";\n }else{\n return $dif->i .\" minutos\";\n }\n }elseif($dif->s > 0){\n if($dif->s == 1){\n return $dif->s .\" segundo\";\n }else{\n return $dif->s .\" segundos\";\n }\n }\n }", "public static function restaTiempo($hora1,$hora2){\n \n\t $temp1 = explode(\":\",$hora1);\n\t $temp_h1 = (int)$temp1[0];\n\t $temp_m1 = (int)$temp1[1];\n\t $temp_s1 = (int)$temp1[2];\n\t $temp2 = explode(\":\",$hora2);\n\t $temp_h2 = (int)$temp2[0];\n\t $temp_m2 = (int)$temp2[1];\n\t $temp_s2 = (int)$temp2[2];\n\t \n\t // si $hora2 es mayor que la $hora1, invierto\n\t if( $temp_h1 < $temp_h2 ){\n\t $temp = $hora1;\n\t $hora1 = $hora2;\n\t $hora2 = $temp;\n\t }\n\t /* si $hora2 es igual $hora1 y los minutos de\n\t $hora2 son mayor que los de $hora1, invierto*/\n\t elseif( $temp_h1 == $temp_h2 && $temp_m1 < $temp_m2){\n\t $temp = $hora1;\n\t $hora1 = $hora2;\n\t $hora2 = $temp;\n\t }\n\t /* horas y minutos iguales, si los segundos de \n\t $hora2 son mayores que los de $hora1,invierto*/\n\t elseif( $temp_h1 == $temp_h2 && $temp_m1 == $temp_m2 && $temp_s1 < $temp_s2){\n\t $temp = $hora1;\n\t $hora1 = $hora2;\n\t $hora2 = $temp;\n\t } \n\t \n\t $hora1=explode(\":\",$hora1);\n\t $hora2=explode(\":\",$hora2);\n\t $temp_horas = 0;\n\t $temp_minutos = 0; \n\t \n\t //resto segundos\n\t $segundos;\n\t if( (int)$hora1[2] < (int)$hora2[2] ){\n\t $temp_minutos = -1; \n\t $segundos = ( (int)$hora1[2] + 60 ) - (int)$hora2[2];\n\t }\n\t else \n\t $segundos = (int)$hora1[2] - (int)$hora2[2];\n\t \n\t //resto minutos\n\t $minutos;\n\t if( (int)$hora1[1] < (int)$hora2[1] ){\n\t $temp_horas = -1; \n\t $minutos = ( (int)$hora1[1] + 60 ) - (int)$hora2[1] + $temp_minutos;\n\t } \n\t else\n\t $minutos = (int)$hora1[1] - (int)$hora2[1] + $temp_minutos;\n\t \n\t //resto horas \n\t $horas = (int)$hora1[0] - (int)$hora2[0] + $temp_horas;\n\t \n\t if($horas<10)\n\t $horas= '0'.$horas;\n\t \n\t if($minutos<10)\n\t $minutos= '0'.$minutos;\n\t \n\t if($segundos<10)\n\t $segundos= '0'.$segundos;\n\t \n\t $rst_hrs = $horas.':'.$minutos.':'.$segundos; \n\t\n\t return ($rst_hrs); \n \n }", "function get_p2hp_dt($daltu) {\n return $this->db->select('*')\n ->from('tb_p2hp')\n //->join('tb_pka', 'tb_pka.id_pka = tb_p2hp.id_pka')\n ->join('tb_penugasan', 'tb_penugasan.id_tugas = tb_p2hp.fk_tgs')\n ->join('tb_tim', 'tb_tim.id_tim = tb_penugasan.id_tim')\n ->where('daltu', $daltu)\n //->order_by('id_p2hp', 'desc')\n ->get()->result();\n }", "function formatear_hora($parametro){\n\n\t\t/* Declaro variables personalizadas para que queden claros los datos */\n\t\t$hora = substr($parametro, 11, 2);\n\t\t$minuto = substr($parametro, 14, 2);\n\t\t$dia = substr($parametro, 8, 2);\n\t\t$mes = substr($parametro, 5, 2);\n\t\t\n\t\t/* Generamos el formato */\n\t\t$temp = $hora.\":\".$minuto;\n\t\t\n\t\treturn $temp;\n\t}", "public function getNominaEtau2($id,$idg)\n { \n $result=$this->adapter->query('select distinct c.idNom, c.id, a.idCon, \n case a.cCosEmp when 0 then a.idCcos\n when 1 then b.idCcos End as idCcos, \n case a.horasCal when 0 then 0 \n when 1 then (c.dias*'.$this->horasDias.') End as horas, 1, \n case when g.valor=2 then \n case when g.tipo = 1 then a.valor else 0 End\t\t\t\t \n when g.valor=1 then 0 \n End as dev, \n case when g.valor=2 then \n case when g.tipo = 2 then a.valor else 0 End\t\t\t\t \n when g.valor=1 then 0 \n\t\tEnd as ded, h.formula, c.dias, g.tipo , b.id as idEmp , g.idFor , a.diasLab, c.diasVac, a.vaca, \n case when ii.codigo is null then \"\" else ii.codigo end as nitTer \n from n_tip_auto_i a inner join a_empleados b on a.idTauto=b.idTau2\n inner join n_nomina_e c on b.id=c.idEmp \n inner join n_nomina d on d.id=c.idNom\n inner join n_tip_auto_tn e on e.idTnom=d.idTnom \n inner join n_tip_calendario f on f.id=d.idCal\n inner join n_conceptos g on g.id=a.idCon\n inner join n_formulas h on h.id=g.idFor\n left join n_terceros_s i on i.id = g.idTer \n left join n_terceros ii on ii.id = i.idTer \n WHERE not exists (SELECT null from n_nomina_e_d \n where c.id=idInom and a.idCon=idConc and a.idCcos=idCcos and tipo=1 ) \n and d.estado=0 and b.idGrup='.$idg.' and c.idNom='.$id,Adapter::QUERY_MODE_EXECUTE);\n $datos=$result->toArray();\n return $datos; \n }", "public function listarLinhaHorario($linha_horario)\n {\n// var_dump($linha_horario[1]);die();\n $select = $this->select()->setIntegrityCheck(false);\n $select->from(array('L' => 'LINHA'), array('L.ID_LINHA', 'L.descricao'))\n ->from(array('LH' => 'LINHA_HORARIOS'), array('LH.*'))\n ->from(array('D' => 'DIA'), array('D.ID_DIA', 'D.DESCRICAO'))\n ->where('L.ID_LINHA = LH.ID_LINHA')\n ->where('LH.ID_DIA = D.ID_DIA')\n ->where('LH.ID_LINHA = \"' . $linha_horario[1] . '\"')\n ->where('LH.ID_DIA = \"' . $linha_horario[0] . '\"')\n ->where('LH.HORARIO_INICIO = \"' . $linha_horario[2] . '\"');\n\n// var_dump($select->__toString());die();\n// o var_dump serve pra ti ver o resultado da instrução sql na página\n\n return $this->fetchAll($select);\n }", "function convertir_hora_militar($seg_ini) {\n\n\t\t\t$horas = floor($seg_ini/3600);\n\t\t\t$minutos = floor(($seg_ini-($horas*3600))/60);\n\t\t\t\t\t\t\t\n\t\t\treturn $horas.\":\".$minutos;\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t}", "public function getTitulosSerieA($connumero, $dataRescisao) {\r\n\r\n $sql = \"\r\n SELECT \r\n SUM(nfivl_item) as valorTotal, \r\n nfloid, \r\n titoid as codigo,\r\n COALESCE(to_char(titdt_pagamento,'dd/mm/yyyy'), '') as titdt_pagamento, \r\n to_char(titdt_vencimento,'dd/mm/yyyy') as titdt_vencimento,\r\n ('now'::date-titdt_vencimento) as atraso,\r\n connumero \r\n FROM \r\n nota_fiscal \r\n INNER JOIN \r\n clientes ON clioid = nflclioid \r\n INNER JOIN\r\n contrato ON conclioid = clioid \r\n INNER JOIN \r\n nota_fiscal_item ON nfinfloid = nfloid AND connumero = nficonoid \r\n INNER JOIN\r\n obrigacao_financeira ON nfiobroid = obroid \r\n LEFT JOIN \r\n titulo ON titnfloid = nfloid \r\n LEFT JOIN \r\n forma_cobranca ON titformacobranca = forcoid \r\n WHERE \r\n connumero = $connumero \r\n AND \r\n forcoid <> 62 \r\n AND \r\n nfiserie = 'A' \r\n AND \r\n ((EXTRACT(MONTH FROM nfldt_referencia) >= EXTRACT(MONTH FROM '$dataRescisao'::date) \r\n AND \r\n EXTRACT(YEAR FROM nfldt_referencia) >= EXTRACT(YEAR FROM '$dataRescisao'::date)) \r\n OR \r\n ((EXTRACT(MONTH FROM nfldt_referencia) <= EXTRACT(MONTH FROM '$dataRescisao'::date) \r\n AND \r\n EXTRACT(YEAR FROM nfldt_referencia) > EXTRACT(YEAR FROM '$dataRescisao'::date)))) \r\n AND \r\n obroftoid <> 6\r\n AND\r\n obrofgoid <> 17\r\n AND \r\n nfldt_cancelamento is null \r\n GROUP BY \r\n nfloid,\r\n titdt_pagamento,\r\n titdt_vencimento,\r\n titoid,\r\n connumero\";\r\n \r\n $result = $this->_fetchAll(pg_query($this->_adapter, $sql));\r\n\r\n return $result; \r\n }", "public function getNominaEtau3($id,$idg)\n { \n $result=$this->adapter->query('select distinct c.idNom, c.id, a.idCon, \n case a.cCosEmp when 0 then a.idCcos\n when 1 then b.idCcos End as idCcos, \n case a.horasCal when 0 then 0 \n when 1 then (c.dias*'.$this->horasDias.') End as horas, 1, \n case when g.valor=2 then \n case when g.tipo = 1 then a.valor else 0 End\t\t\t\t \n when g.valor=1 then 0 \n End as dev, \n case when g.valor=2 then \n case when g.tipo = 2 then a.valor else 0 End\t\t\t\t \n when g.valor=1 then 0 \n\t\tEnd as ded, h.formula, c.dias, g.tipo , b.id as idEmp , g.idFor , a.diasLab, c.diasVac, a.vaca, \n case when ii.codigo is null then \"\" else ii.codigo end as nitTer \n from n_tip_auto_i a inner join a_empleados b on a.idTauto=b.idTau3\n inner join n_nomina_e c on b.id=c.idEmp \n inner join n_nomina d on d.id=c.idNom\n inner join n_tip_auto_tn e on e.idTnom=d.idTnom \n inner join n_tip_calendario f on f.id=d.idCal\n inner join n_conceptos g on g.id=a.idCon\n inner join n_formulas h on h.id=g.idFor\n left join n_terceros_s i on i.id = g.idTer \n left join n_terceros ii on ii.id = i.idTer \n WHERE not exists (SELECT null from n_nomina_e_d \n where c.id=idInom and a.idCon=idConc and a.idCcos=idCcos and tipo=1 ) \n and d.estado=0 and b.idGrup='.$idg.' and c.idNom='.$id,Adapter::QUERY_MODE_EXECUTE);\n $datos=$result->toArray();\n return $datos; \n }", "public function getNominaEtau4($id,$idg)\n { \n $result=$this->adapter->query('select distinct c.idNom, c.id, a.idCon, \n case a.cCosEmp when 0 then a.idCcos\n when 1 then b.idCcos End as idCcos, \n case a.horasCal when 0 then 0 \n when 1 then (c.dias*'.$this->horasDias.') End as horas, 1, \n case when g.valor=2 then \n case when g.tipo = 1 then a.valor else 0 End\t\t\t\t \n when g.valor=1 then 0 \n End as dev, \n case when g.valor=2 then \n case when g.tipo = 2 then a.valor else 0 End\t\t\t\t \n when g.valor=1 then 0 \n\t\tEnd as ded, h.formula, c.dias, g.tipo , b.id as idEmp , g.idFor , a.diasLab, c.diasVac, a.vaca,\n case when ii.codigo is null then \"\" else ii.codigo end as nitTer \n from n_tip_auto_i a inner join a_empleados b on a.idTauto=b.idTau4 \n inner join n_nomina_e c on b.id=c.idEmp \n inner join n_nomina d on d.id=c.idNom\n inner join n_tip_auto_tn e on e.idTnom=d.idTnom \n inner join n_tip_calendario f on f.id=d.idCal\n inner join n_conceptos g on g.id=a.idCon\n inner join n_formulas h on h.id=g.idFor\n left join n_terceros_s i on i.id = g.idTer \n left join n_terceros ii on ii.id = i.idTer \n WHERE not exists (SELECT null from n_nomina_e_d \n where c.id=idInom and a.idCon=idConc and a.idCcos=idCcos and tipo=1 ) \n and d.estado=0 and b.idGrup='.$idg.' and c.idNom='.$id,Adapter::QUERY_MODE_EXECUTE);\n $datos=$result->toArray();\n return $datos; \n }", "public function show($id)\n {\n \n $config = $this->horarioconfig->find($id);\n $horarioinicio=Carbon::parse($config->horainicio);\n $horariofin=Carbon::parse($config->horafin);\n $duracion=$config->duracionclase;\n\n $finalizar=0;\n\n $horaActual =$horarioinicio;\n $array=array( );\n $array2 = array( );\n while ( $finalizar == 0 ) {\n if ($horaActual <= $horariofin) {\n array_push($array, date ('h:i a',strtotime($horaActual)));\n array_push($array2, date ('h:i a',strtotime($horaActual)));\n\n if ( $horalibre = $this->horaslibre->findwhere(['idconfig'=>$config->id,'horainicio'=>$horaActual ])->first()) {\n $horaActual->addMinutes($horalibre->duracion);\n\n }\n else{\n $horaActual->addMinutes($duracion);\n }\n\n } else {\n $finalizar=1;\n }\n }\n\n\n $tableRow='';$f=1;\n $contadorHora=1;\n\n\n for ($j=0; $j < count($array)-1 ; $j++) { \n\n $td='';\n $i=1;\n $contadorHoraLibre=0;\n foreach ($this->dias as $dia) {\n $hlibre= $this->horaslibre->findwhere(['idconfig'=>$config->id,'horainicio'=>date ('H:i:s',strtotime( $array[$j])) ])->first();\n if ($config[strtolower($dia)]=='true') {\n\n if ($hlibre) {\n $td='<td class=\"cursoseccion\" colspan=\"7\">\n \n <div class=\"center\">\n <h5 class=\"blue\">'.$hlibre->descripcion .'</h5>\n </div>\n </td>'; \n if ($j==$i) {\n $contadorHora--;\n } \n $contadorHoraLibre=1;\n\n } else {\n $td.='<td class=\"cursoseccion\"><div >\n <label>\n Hora '.( $contadorHora) .'\n\n </label>\n </div></td>';\n\n }\n\n } else {\n if ($contadorHoraLibre==0) {\n $td.='<td class=\"cursoseccion\"><div class=\"center\">\n <label>\n ---\n </label>\n </div></td>';\n }\n \n }\n\n\n }\n\n\n\n $contadorHora++;\n\n $tableRow.=\"<tr><td> $array[$j] - \n $array[$f]</td>\".$td.\"</tr>\";\n $f++;\n }\n\n $conf_h=\"<option value=''></option>\";\n foreach ($array2 as $opt_hora) {\n \n $conf_h .= '<option value=\"'.date(\"H:i:s\",strtotime($opt_hora)).'\" > '.date(\"h:i a\",strtotime($opt_hora)).'</option>'; \n \n \n }\n $conf_h= ' <select name=\"horainicio\" class=\"select2\" data-placeholder=\"Hora Inicio\" >'.$conf_h.'</select> '; \n\n return response()->json(['table'=>$tableRow,'horas'=>$conf_h]);\n\n \n \n\n }", "public function actoresSerie(){\n return $actores=$this->mysqli->query(\"SELECT serie_name, name FROM cast\");\n }", "public function getNominaEeua($id)\n { \n $result=$this->adapter->query('select distinct c.idNom, c.id, a.idCon, f.formula,c.dias,e.tipo,a.idEmp, \n case a.cCosEmp when 0 then a.idCcos\n when 1 then g.idCcos End as idCcos, # Centros de costos\n case a.horasCal when 0 then 0 \n when 1 then (c.dias*8) End as horas, 1, # Horas desrrollo\n case when e.valor=2 then \n case when e.tipo = 1 then a.valor else 0 End \n when e.valor=1 then 0 \n End as dev, # Devengado\n ( case when e.valor=2 then \n case when e.tipo = 2 then a.valor else 0 End \n when e.valor=1 then 0\n End ) / cal.valor as ded , # Deducido \n e.idFor, c.diasVac, hh.codigo as nitTer, c.diasVac \nfrom n_emp_conc a \ninner join n_nomina_e c on a.idEmp=c.idEmp \ninner join n_nomina d on d.id=c.idNom\ninner join n_conceptos e on e.id=a.idCon\ninner join n_formulas f on f.id=e.idFor\ninner join a_empleados g on g.id=c.idEmp\nleft join n_terceros_s h on h.id = e.idTer \nleft join n_terceros hh on hh.id = h.idTer \ninner join n_tip_calendario cal on cal.id = d.idCal \nWHERE not exists (SELECT null from n_nomina_e_d \nwhere c.id=idInom and a.idCon=idConc and a.idCcos=idCcos and tipo=2 )\nand d.estado=0 and c.idNom='.$id.' and c.actVac = 0 ',Adapter::QUERY_MODE_EXECUTE);\n $datos=$result->toArray();\n return $datos; \n }", "function insertarHorarios($hora) {\r\n$sql = \"insert into tbhorarios(idtbhorario,hora)\r\nvalues ('',\".$hora.\")\";\r\n$res = $this->query($sql,1);\r\nreturn $res;\r\n}", "public function calcularSueldo(){\n $this->horas_trabajadas * 540;\n }", "public function index()\n {\n $result=termin::join('treners','termins.trener_id','=','treners.id')\n ->get(['termins.*','treners.ime','treners.prezime']);\n \n return $result;\n }", "function calc_hour_and_minute($hora1, $hora2){\n $date_dato[1]=explode(':',$hora1);\n $date_dato[2]=explode(':',$hora2);\n\n $total[1] = ($date_dato[1][0]*60)+$date_dato[1][1];\n $total[2] = ($date_dato[2][0]*60)+$date_dato[2][1];\n\n $total = $total[2]-$total[1];\n\n return $total;\n}", "function get_horas_de_diferenca($date1, $date2){\n\n $data_inicio = new DateTime($date1);\n $data_fim = new DateTime($date2);\n\n // Resgata diferença entre as datas\n $dateInterval = $data_inicio->diff($data_fim);\n return $dateInterval->h +($dateInterval->days * 24);\n\n}", "function recalcularMulta($entrada, $horario) {\n\t\t$tmp = explode(\" \", $horario->nombre);\n\t\t$tmp = strtotime($tmp[1]);\n\t\t$horaEntrada = date(\"H:i:s\", $tmp);\n\t\t\n\t\t//get time from hrllegada7\n\t\t$time = strtotime($entrada->Time);\n\t\t$time = date(\"H:i:s\", $time);\n\t\t\t\n\t\t/*initialize diferenciaMin y multa*/\n\t\t$register[\"diferenciaMin\"] = \"\";\n\t\t$register[\"multa\"] = \"\";\n\t\t\t\n\t\t\n\t\t//echo \"calcula mulpa para:\".$geu->idUsuario.\" para fecha \".$entrada->Time.\"<br>\";\n\t\t//get value of fin in the table horariosreglas\n\t\t$regla = $this->usuarios_model->getHorarioRegla($horario->id, $time);\n\t\t\n\t\t//get minutes of the rest\n\t\t$time1 = new DateTime($horaEntrada);\n\t\t$time2 = new DateTime($time);\n\t\t$res = date_diff($time2, $time1);\n\t\t$register[\"diferenciaMin\"] = ($res->invert == 1) ? $res->h.\":\".$res->i.\":\".$res->s : 0;\n\t\t$register[\"multa\"] = ($res->h > 0) ? ((($res->h*60)+$res->i) * $regla->multa) : ($res->i * $regla->multa);\n\n\t\treturn $register;\n\t}", "public function consultar_horas($tarea, $usuario,$dia)\n\n {\n\n\n\n $this->db->select('hora,id');\n\n $this->db->from('tarea_detalle');\n\n $this->db->where('tarea_id', $tarea);\n\n $this->db->where('usuario_id', $usuario);\n\n $this->db->where('fecha', $dia);\n\n $query = $this->db->get();\n\n // echo $this->db->last_query();\n\n\n return $query->result_array(); \n\n }", "function work_data_emp($id)\n{\n// selecteaza datele platite deja din salarii\n $query = \"SELECT sum(salarii.prezent) AS lucratez, \n (DATE_FORMAT(LAST_DAY(data),'%d') - sum(salarii.prezent)) AS absent, \n sum(motiv) AS motivat, \n sum(suma) AS salarii, \n DATE_FORMAT(data, '%m') AS data\n FROM cozagro_db.salarii \n WHERE salarii.deleted = 0 AND salarii.id_angajat= $id\n GROUP BY MONTH(data)\";\n $result = Database::getInstance()->getConnection()->query($query);\n if (!$result) {\n die(\"Nu s-a reusit conexiunea la DB selectarea salariilor platite\" . Database::getInstance()->getConnection()->error);\n }\n $zile_lucrate = [];\n while ($x = $result->fetch_assoc()) {\n $zile_lucrate[$x['data']] = array(\"luc\" => $x['lucratez'], \"abs\" => $x['absent'], \"mot\" => $x['motivat'], \"sal\" => $x['salarii']);\n }\n $result->free_result();\n return $zile_lucrate;\n}", "public function gethabitacion(){\n\t\t\t$sql = \"select h.IdUsuario, h.NumeroHab from huespedusuario h, pedidohabitacion pe, cuentatotal c WHERE pe.IdCuenta = c.IdCuenta and h.IdHuesped = c.IdEnte GROUP by h.NumeroHab\";\n\t\t\t$params = array(null);\n\t\t\treturn Database::getRows($sql, $params);\n\t\t\t}", "public function buscarHorarios($valor)\n {\n return $this->conexionHorarios->buscar($valor,\"NOMBRE\", \"ASC\");\n }", "public function getCprestamosS($id,$idEmp)\n { \n $result=$this->adapter->query('select distinct a.id, a.idEmp,0 as dias,0 as horas, 0 as formula, f.tipo, h.idCcos,\n e.idConE as idCon, f.idFor, cc.id as idPres, 1 as cuota, \n\t\t\t\t case when j.id >0 then ( (cc.valCuota / i.valor ) * ( a.dias + j.diasCal ) ) else \n\t\t\t\t cc.valCuota end as valor, \n\t\t\t\t cc.cuotas, cc.valCuota, \n case when kk.codigo is null then \"\" else kk.codigo end as nitTer,\n case when np.valor is null then 0 else np.valor end as valorPresN \n\t\t\t\t from n_nomina_e a \n inner join n_nomina b on b.id=a.idNom\n inner join n_prestamos c on c.idEmp=a.idEmp \n inner join n_prestamos_tn cc on cc.idPres = c.id and cc.idTnom = c.idTnom \n inner join n_tip_prestamo e on e.id=c.idTpres\n inner join n_conceptos f on f.id=e.idConE \n inner join n_formulas g on g.id=f.idFor \n inner join a_empleados h on h.id=a.idEmp \n inner join n_tip_calendario i on i.id = b.idCal \n\t left join n_vacaciones j on j.id=a.idVac\n left join n_terceros_s k on k.id = f.idTer\n \t\t left join n_terceros kk on kk.id = k.idTer \n left join n_nomina_pres np on np.idPres = cc.id and np.fechaI = b.fechaI and np.fechaF = b.fechaF and np.estado=0 # Buscar cambios en nomina activa con el prestamo\n where a.idNom='.$id.' and c.estado=1 and a.idEmp='.$idEmp.\" and ( cc.pagado + cc.saldoIni ) < cc.valor group by c.id\" ,Adapter::QUERY_MODE_EXECUTE);\n $datos=$result->toArray();\n return $datos; \n }", "function operasiJoin2(){\n\t\t$date = date('Y-m-d');\n\t\t$query = $this->db->query(\"SELECT o.id_operasi, o.operasi, o.id_alat, a.id_kategori, o.tanggal, o.keterangan, a.nama_alat FROM operasi o INNER JOIN alat a ON o.id_alat = a.id_alat\"); \n\t\treturn $query->result();\n\t}", "public function calcular_horas_jornadas_individual($id_jornada){\n \n $fecha = new MongoDB\\BSON\\UTCDateTime();\n $id = new MongoDB\\BSON\\ObjectId($id_jornada);\n $res_jornadas = $this->mongo_db->where(array('eliminado'=>false,'status'=>true,'_id'=>$id))->get(\"jornadas\");\n $cont = 0;\n $e = new DateTime('00:00');\n $f = clone $e;\n //---\n $fecha_inicio = $res_jornadas[0][\"fecha_hora_inicio\"]->toDateTime();\n $fecha_hora_ini = $fecha_inicio->format('Y-m-d H:i:s');\n \n if((isset($res_jornadas[0][\"fecha_hora_fin\"]))&&($res_jornadas[0][\"fecha_hora_fin\"]!=\"Sin salir\")){\n $fecha_fin = $res_jornadas[0][\"fecha_hora_fin\"]->toDateTime();\n $fecha_hora_fini = $fecha_fin->format('Y-m-d H:i:s');\n }else{\n $fecha_fin = \"\";\n $fecha_hora_fini = \"\";\n }\n \n $fecha1 = new DateTime($fecha_hora_ini);//fecha inicial\n $fecha2 = new DateTime($fecha_hora_fini);//fecha de cierre\n \n $intervalo_siguiente=$fecha1->diff($fecha2);\n $e->add($intervalo_siguiente);\n $intervalo = $f->diff($e);\n //$intervalo=$fecha1->diff($fecha2);\n /*var_dump($fecha1);\n echo \"</br>\";\n var_dump($fecha2);\n echo \"</br>\";\n var_dump($intervalo_siguiente->format('%H:%i:%s'));\n echo \"</br>\";\n var_dump($intervalo->format('%H:%i:%s'));\n echo \"</br></br>\";*/\n \n if(isset($intervalo)){\n $horas_transcurridas = $intervalo->format('%H:%i:%s');\n }else{\n $horas_transcurridas = \"00:00:00\";\n }\n //--\n return $horas_transcurridas; \n }", "function DataHora($data_hora, $time = false, $prefixo = false){\n\t\n\tif (is_null($data_hora)) {\n\t\treturn NULL;\n\t}\n\tif ($data_hora == \"\") {\n\t\treturn \"\";\n\t}\n\t \n\t$data = substr($data_hora, 0, 10);\n\t$hora = \"\";\n\tif (strlen($data_hora) > 10){\n\t\t$hora = \" \".substr($data_hora, 11, 5);\n\t}\n\tif (strstr($data, \"-\")){\n\t\t$arr_data = explode(\"-\", $data);\n\t\t$data = $arr_data[2].\"/\".$arr_data[1].\"/\".$arr_data[0];\n\t}else{\n\t\t$arr_data = explode(\"/\", $data);\n\t\t$data = $arr_data[2].\"-\".$arr_data[1].\"-\".$arr_data[0];\n\t}\n\tif ($prefixo) {\n\t\t$var = \" &agrave;s \";\n\t}else {\n\t\t$var = \"\";\n\t}\n\t \n\tif ($time) {\n\t\treturn $data.$var.$hora;\n\t}else{\n\t\treturn $data;\n\t}\n}", "public function get_resumen_ventas_cobros($fecha,$sucursal){\n\t$conectar= parent::conexion();\n\tparent::set_names(); \n\t$fecha_corte = $fecha.\"%\";\n\t$sql=\"select * from corte_diario where fecha_ingreso like ? and (sucursal_venta=? or sucursal_cobro=?);\";\n\t$sql=$conectar->prepare($sql);\n\t$sql->bindValue(1,$fecha_corte);\n\t$sql->bindValue(2,$sucursal);\n\t$sql->bindValue(3,$sucursal);\n\t$sql->execute();\n\treturn $resultado= $sql->fetchAll(PDO::FETCH_ASSOC);\n}", "function get_control_salida_extra_mov(){\n\t\t$sQuery=\"SELECT id, id_sucursal, placa FROM control_salida_extra WHERE placa > 'NULL' \";\n\t\n\t\t//die($sQuery);\n\t\t$result=mssql_query($sQuery) or die(mssql_min_error_severity());\n\t\t$i=0;\n\t\twhile($row=mssql_fetch_array($result)){\n\t\t\tforeach($row as $key=>$value){\n\t\t\t\t$res_array[$i][$key]=$value;\n\t\t\t}\n\t\t\t$i++;\n\t\t}\n\t\treturn($res_array);\n\t\t\t\n\t}", "function buscaData($data_agend){\n # ($calendario)\";\n # $data_agend = \"SELECT data_agend FROM Agendamento\";\n\n $dia = substr($data_agend, 0, 2);\n $mes = substr($data_agend, 3, 2);\n $ano = substr($data_agend, 6, 4);\n\n $result = $ano . \"-\" . $mes . \"-\" . $dia;\n return $result;\n}", "public function getTituloSerieA($titulo) {\r\n\r\n $sql = \"\r\n SELECT \r\n SUM(nfivl_item) as titvl_titulo, \r\n nfloid as titnfloid, \r\n titclioid,\r\n titno_parcela,\r\n titoid as codigo,\r\n COALESCE(to_char(titdt_pagamento,'dd/mm/yyyy'), '') as titdt_pagamento, \r\n to_char(nfldt_referencia ,'dd/mm/yyyy') as titdt_vencimento,\r\n ('now'::date-titdt_vencimento) as atraso \r\n FROM \r\n nota_fiscal \r\n INNER JOIN \r\n clientes ON clioid = nflclioid \r\n INNER JOIN\r\n contrato ON conclioid = clioid \r\n INNER JOIN \r\n nota_fiscal_item ON nfinfloid = nfloid AND connumero = nficonoid \r\n LEFT JOIN \r\n titulo ON titnfloid = nfloid \r\n LEFT JOIN \r\n forma_cobranca ON titformacobranca = forcoid \r\n WHERE \r\n titoid = {$titulo['codigo']} \r\n AND nfldt_cancelamento is null \r\n GROUP BY \r\n nfloid,\r\n titdt_pagamento,\r\n titdt_vencimento,\r\n titoid\";\r\n\r\n $result = $this->_fetchAssoc(pg_query($this->_adapter, $sql));\r\n\r\n return $result; \r\n }", "function get_repcheque_ventas($fecha1, $fecha2, $usuario_id)\r {\r if($usuario_id == 0){\r $cadusuario = \"\";\r }else{\r $cadusuario = \" and v.usuario_id = \".$usuario_id.\" \";\r }\r $egresos = $this->db->query(\"\r select \r concat(v.venta_fecha, ' ', v.venta_hora) as fecha, concat('Venta(CHEQUE) N°: ', v.venta_id, ', ', if(f.factura_numero>0, concat('Fact.: ',f.factura_numero, ', '),''), 'Cliente: ', c.cliente_nombre) as detalle,\r v.venta_total as ingreso, 0 as egreso,\r 0 as utilidad, 22 as tipo\r from\r venta v\r left join cliente c on v.cliente_id = c.cliente_id\r left join factura f on v.venta_id = f.venta_id\r where\r date(v.venta_fecha) >= '\".$fecha1.\"'\r and date(v.venta_fecha) <= '\".$fecha2.\"'\r and v.forma_id = 5\r \".$cadusuario.\" \r order by v.venta_fecha desc, v.venta_hora desc\r \")->result_array();\r \r return $egresos;\r }", "function afficherreservation(){\n\t\t$sql=\"select hotel.nom hotel ,hotel.ville,reservation.* from (reservation inner join hotel on reservation.idhotel=hotel.id) order by idres \";\n\t\t$db = config::getConnexion();\n\t\ttry{\n\t\t$liste=$db->query($sql);\n\t\treturn $liste;\n\t\t}\n catch (Exception $e){\n die('Erreur: '.$e->getMessage());\n }\t\n\t}", "function depurar_horarios ($horarios, $aula){\n $horarios_disponibles=array();\n $indice=0;\n $longitud=count($horarios);\n $indice_horario=0;\n //guarda un horario disponible con el formato (hora_inicio, hora_fin, aula)\n $horario=array();\n $hora_fin=\"\";\n while($indice_horario < $longitud){\n if($horarios[$indice_horario][1]){\n \n $hora_inicio=$horarios[$indice_horario][0];\n $horario['hora_inicio']=$hora_inicio;\n\n //aca no hay que acumular el retorno\n $indice_horario = $this->obtener_horario($indice_horario, $horarios, &$hora_fin);\n $horario['hora_fin']=$hora_fin;\n $horario['aula']=$aula['aula'];\n $horario['id_aula']=$aula['id_aula'];\n $horarios_disponibles[$indice]=$horario;\n //los eltos se agregan al final del arreglo\n $this->s__horarios_disponibles[]=$horario;\n $indice += 1;\n }\n else{\n $indice_horario += 1;\n }\n }\n return $horarios_disponibles;\n }", "function displayWeekEn(){\n $displayWeekEnQuery = $this->db->prepare(\n 'SELECT \n `dateStart`\n , `dateEnd`\n , `id_ap29f_dateRace` AS `raceId`\n FROM \n `ap29f_race`\n INNER JOIN \n `ap29f_dateRace` ON `ap29f_race`.`id_ap29f_dateRace` = `ap29f_dateRace`.`id`\n WHERE \n `id_ap29f_dateRace` = :id'\n );\n //data retourne un tableau d'objet\n $displayWeekEnQuery->bindValue(':id', $this->id, PDO::PARAM_STR);\n $displayWeekEnQuery->execute();\n return $displayWeekEnQuery->fetch(PDO::FETCH_OBJ);\n }", "function grafico_1_2( $desde, $hasta, $ua ){\n\t// aclarar al cliente que debe setear campos bien definidos y NO PERMITIR AMBIGUEDADES\n\t\n\t$query = \"select actor.nombre, actor.apellido, actor.id_campo, count(noticiasactor.id_actor) as cantidad from noticiascliente \"\n\t\t. \"inner join noticiasactor on noticiascliente.id_noticia = noticiasactor.id_noticia \"\n\t\t. \"inner join noticias on noticiasactor.id_noticia = noticias.id \"\n\t\t. \"inner join actor on noticiasactor.id_actor = actor.id \"\n\t\t. \"where \"\n\t\t\t. \"noticiascliente.id_cliente = \" . $ua . \" and \"\n\t\t\t. \"noticiascliente.elim = 0 and \"\n\t\t\t. \"noticias.fecha between '\" . $desde . \" 00:00:01' and '\" . $hasta . \" 23:59:59' \"\n\t\t\t// SOLO QUIENES TIENEN 3 Y 4 COMO CAMPO\n\t\t\t. \" and ( actor.id_campo like '%3%' or actor.id_campo like '%4%' ) \"\n\t\t. \"group by noticiasactor.id_actor order by cantidad desc\";\n\t$main = R::getAll($query);\n\t$ua_nombre = R::findOne(\"cliente\",\"id LIKE ?\",[$ua])['nombre'];\n\n\t// var_dump($main);\n\t$tabla = [];\n\t// unidad de analisis, campo, actor, cantidad de menciones\n\t$i = -1;\n\tforeach($main as $k=>$v){\n\t\t// por ahora solo considero los dos posibles campos\n\t\t$tabla[ ++$i ] = [\n\t\t\t'ua' => $ua_nombre,\n\t\t\t'campo' => ( strpos( $v['id_campo'], '3' ) !== false ) ? 'oposicion' : 'oficialismo',\n\t\t\t'actor' => $v['apellido'] . ' ' . $v['nombre'],\n\t\t\t'cantidad' => $v['cantidad']\n\t\t\t];\n\t}\n\t// var_dump($tabla);\n\t\n\t// grafico\n\t$oficialismo = new StdClass(); // objeto vacio\n\t$oficialismo->name = 'Oficialismo';\n\t$oficialismo->rank = 0;\n\t$oficialismo->weight = 'Yellow';\n\t$oficialismo->id = 1;\n\t$oficialismo->children = [];\n\t\n\t$oposicion = new StdClass(); // objeto vacio\n\t$oposicion->name = 'Oposicion';\n\t$oposicion->rank = 0;\n\t$oposicion->weight = 'LightBlue';\n\t$oposicion->id = 1;\n\t$oposicion->children = [];\n\t\n\t$objeto = new StdClass(); // objeto vacio\n\t$objeto->name = 'Campos';\n\t$objeto->rank = 0;\n\t$objeto->weight = 'Gray';\n\t$objeto->id = 1;\n\t$objeto->children = [ $oficialismo, $oposicion ];\n\t\n\t$i_of = 0;\n\t$i_op = 0;\n\t\n\tforeach($tabla as $v){\n\t\t$sub = new StdClass(); // objeto vacio\n\t\t$sub->name = $v['actor'] . ' (' . $v['cantidad'] . ')';\n\t\t$sub->rank = $v['cantidad'];\n\t\t// $sub->weight = 0;\n\t\t$sub->cantidad = $v['cantidad'];\n\t\t$sub->id = 1;\n\t\t$sub->children = [ ];\n\t\tif($v['campo'] == 'oposicion'){\n\t\t\t$i_op += 1;\n\t\t\t$sub->weight = 'Blue';\n\t\t\t$oposicion->children[] = $sub;\n\t\t}\n\t\telse{ \n\t\t\t$i_of += 1;\n\t\t\t$sub->weight = 'White';\n\t\t\t$oficialismo->children[] = $sub;\n\t\t}\n\t}\n\t\n\t$oposicion->rank = $i_op;\n\t$oficialismo->rank = $i_of;\n\t\n\treturn [\n\t\t'tabla' => $tabla,\n\t\t'grafico' => $objeto\n\t\t// ,'temas' => $temas\n\t\t];\n\t\n}", "public function ultimosPedidos(){\n //$conexao = $c->conexao();\n\n\n $sql = \"SELECT a.*, c.nome,date_format(data_inc, '%H:%i') AS hora FROM tbpedidos a,tbclientes c where c.reg = a.reg and a.status = 'A' order by a.idpedido desc;\";\n $sql = $this->conexao->query($sql);\n\n $dados = array();\n\n while ($row = $sql->fetch_assoc()) {\n \n $dado = array();\n\n $dado['idpedido'] = $row[\"idpedido\"];\n $dado['reg'] = $row[\"reg\"];\n $dado['tipo'] = $row[\"tipo\"];\n $dado['nome'] = $row[\"nome\"];\n $dado['status'] = $row[\"status\"];\n $dado['titulo'] = $row[\"titulo\"];\n $dado['hora'] = $row[\"hora\"];\n $dado['valor'] = number_format($row[\"valor\"], 2, \",\", \".\");\n $dados[] = $dado;\n\n }\n\n return $dados;\n\n }", "function get_reptarjcredito_ventas($fecha1, $fecha2, $usuario_id)\r {\r if($usuario_id == 0){\r $cadusuario = \"\";\r }else{\r $cadusuario = \" and v.usuario_id = \".$usuario_id.\" \";\r }\r $egresos = $this->db->query(\"\r select \r concat(v.venta_fecha, ' ', v.venta_hora) as fecha, concat('Venta(TARJ. CREDITO) N°: ', v.venta_id, ', ', if(f.factura_numero>0, concat('Fact.: ',f.factura_numero, ', '),''), 'Cliente: ', c.cliente_nombre) as detalle,\r v.venta_total as ingreso, 0 as egreso,\r 0 as utilidad, 22 as tipo\r from\r venta v\r left join cliente c on v.cliente_id = c.cliente_id\r left join factura f on v.venta_id = f.venta_id\r where\r date(v.venta_fecha) >= '\".$fecha1.\"'\r and date(v.venta_fecha) <= '\".$fecha2.\"'\r and v.forma_id = 4\r \".$cadusuario.\" \r order by v.venta_fecha desc, v.venta_hora desc\r \")->result_array();\r \r return $egresos;\r }", "public function get_datos_ventas_cargo($fecha,$sucursal){\n\t$conectar= parent::conexion();\n\tparent::set_names();\n \n\t$fecha_corte = $fecha.\"%\";\n\t$sql=\"select c.n_factura,c.fecha_ingreso,c.n_recibo,c.paciente,u.usuario,c.total_factura,c.forma_cobro,c.monto_cobrado,c.saldo_credito,c.abonos_realizados from corte_diario as c inner join usuarios as u on u.id_usuario=c.id_usuario where c.fecha_ingreso like ? and c.abonos_realizados='0' and c.tipo_pago='Cargo Automatico' and (sucursal_venta=? or sucursal_cobro=?);\";\n\t$sql=$conectar->prepare($sql);\n\t$sql->bindValue(1,$fecha_corte);\n\t$sql->bindValue(2,$sucursal);\n\t$sql->bindValue(3,$sucursal);\n\t$sql->execute();\n\treturn $resultado= $sql->fetchAll(PDO::FETCH_ASSOC);\n}", "function query_richieste($fornitore){\n\t$query = \"SELECT *, R.id, U.num_valutazioni, TIMESTAMPDIFF(MINUTE, NOW(), data_ora + INTERVAL minuti_risposta MINUTE) as minuti_rimanenti,\n\t U.indirizzo, U.email, U.num_valutazioni, U.dati_contatto\n\t FROM Richieste as R LEFT JOIN Users as U ON R.id_utente = U.id\n\t WHERE R.id_fornitore = \".$fornitore.\" AND\n\t esito = 'sospesa' AND\n\t TIMESTAMPDIFF(MINUTE, NOW(), data_ora + INTERVAL minuti_risposta MINUTE) >= 0\";\n\n\t$result = mysql_query($query) or die(mysql_error());\n\n\t$a = array();\n\n\tif($result){\n\n while($row = mysql_fetch_assoc($result)) {\n $a[] = $row;\n }\n $risultati = array('risultati' => $a);\n\t} else {\n\t $a = array('error' => 'dead');\n\t}\n\n\treturn $a;\n\n}", "public function horas_datas($data1, $data2){\n // $data1='2017-01-25 00:22:15';\n // $data2='2017-04-27 01:00:00';\n\n\t\tif(function_exists('date_diff')){\n\t\t\t$datetime1 = date_create($data1);\n\t\t\t$datetime2 = date_create($data2);\n\t\t\t$diff = date_diff($datetime1, $datetime2);\n\t\t}else{\n\t\t\t$date1=explode(' ', $data1); $date1[0]=explode('-', $date1[0]); $date1[1]=explode(':', $date1[1]);\n\t\t\t$date2=explode(' ', $data2); $date2[0]=explode('-', $date2[0]); $date2[1]=explode(':', $date2[1]);\n\t\t\t$diff=new stdclass;\n\t\t\t$diff->y=0;$diff->m=0;$diff->d=0;$diff->h=0;$diff->i=0;$diff->s=0;\n\n\t\t\tif($date2[0][0] >= $date1[0][0]) $diff->y=$date2[0][0]-$date1[0][0];\n\t\t\tif($date2[0][1] >= $date1[0][1]) $diff->m=$date2[0][1]-$date1[0][1];\n\t\t\tif($date2[0][2] >= $date1[0][2]) $diff->d=$date2[0][2]-$date1[0][2];\n\t\t\tif($date2[1][0] >= $date1[1][0]) $diff->h=$date2[1][0]-$date1[1][0];\n\t\t\tif($date2[1][1] >= $date1[1][1]) $diff->i=$date2[1][1]-$date1[1][1];\n\t\t\tif($date2[1][2] >= $date1[1][2]) $diff->s=$date2[1][2]-$date1[1][2];\n\n// CALCULANDO SEGUNDOS TOTAIS\n\t\t\t$s1=$date1[1][2]+($date1[1][1]*60)+($date1[1][0]*3600);\n\t\t\t$s2=$date2[1][2]+($date2[1][1]*60)+($date2[1][0]*3600);\n\t\t\t$s=$s2-$s1;\n\n // CALCULANDO HORAS\n\t\t\t$diff->h=$s/3600; $diff->h=explode('.', $diff->h); $diff->h=$diff->h[0]; $s-=(3600*$diff->h);\n // CALCULANDO HORAS\n\n // CALCULANDO MINUTOS\n\t\t\t$diff->i=$s/60; $diff->i=explode('.', $diff->i); $diff->i=$diff->i[0]; $s-=(60*$diff->i);\n // CALCULANDO MINUTOS\n\n\t\t\t$diff->s=$s;\n\n\t\t\t$diff->invert=0;\n\n\t\t\t$data1=explode(' ', $data1);\n\t\t\t$data1=$data1[0];\n\t\t\t$data2=explode(' ', $data2);\n\t\t\t$data2=$data2[0];\n\n\t\t\t$diff->days=cal_days_interval($data1, $data2);\n\t\t}\n\n\n\t\t$retorno=new stdclass;\n\t\t$retorno->horas = $diff->h + ($diff->days * 24);\n\t\t$retorno->minutos=$diff->i;\n\t\t$retorno->segundos=$diff->s;\n\n\t\t$retorno->minutos_totais=$retorno->minutos;\n\t\tif($retorno->horas > 0) $retorno->minutos_totais+=($retorno->horas*60);\n\t\treturn $retorno;\n\t}", "public function consultaRetorno($id_retorno, $primeiraPalavraCliente, $ultimoRetorno, $consultaUltima)\n {\n $this->logSis('DEB', 'Entrou no Retorno. idRetorno: ' . $id_retorno . ' Palavra: ' . $primeiraPalavraCliente . ' UltimoRetorno: ' . $ultimoRetorno . ' Tipo da consulta: ' . $consultaUltima['tipo']);\n\n include(\"dados_conexao.php\");\n include_once(\"horarios.php\");\n include_once(\"servicos.php\");\n\n\n\n if ($consultaUltima['tipo'] == 8) { //( Verifica se o retorno trata-se de uma marcação de horário\n\n\n //( Verifica qual o último subtipo para pesquisar o próximo retorno de acordo com o próximo subtipo\n if ($consultaUltima['subtipo'] == 'mes') {\n $proximoSubtipo = 'dia';\n } else if ($consultaUltima['subtipo'] == 'dia') {\n $proximoSubtipo = 'hora';\n } else if ($consultaUltima['subtipo'] == 'hora') { //( Envia a pergunta de confirmação\n $this->logSis('DEB', 'Entrou no subtipo Hora');\n if (is_numeric($primeiraPalavraCliente)) {\n $this->logSis('DEB', 'É número');\n\n //( Decodifica o Json que foi salvo no BD\n $opcoes = json_decode($this->opcoesVariaveis, true);\n $this->logSis('DEB', 'opcoes->' . print_r($opcoes, true));\n\n $indice = array_search($primeiraPalavraCliente, array_column($opcoes, 'ind'));\n $idHorario = $opcoes[$indice]['id'];\n $this->logSis('DEB', 'idHorario->' . $idHorario);\n\n\n //( Consulta o horário encontrado pra ver se está disponível ainda\n\n $result = fctConsultaParaArray(\n 'ConsultaHorario',\n \"SELECT *, DATE_FORMAT(horario, '%d/%m/%Y %H:%i') AS hora_formatada FROM tbl_horarios WHERE status = 1 AND horario >= NOW() AND id_horario = $idHorario\",\n array('hora_formatada')\n );\n $this->logSis('DEB', 'result->' . print_r($result, true));\n\n if ($result == false) {\n //& VEr se realmente vai ser possível escolher um outro horário\n //& Sugestão aqui seria voltar ao menu anterior\n $this->sendMessage('MensageErro', $this->numero, \"Esse horário não está mais disponível, favor escolher uma outra data.\", \"\");\n } else {\n $horaFormatada = $result[0]['hora_formatada'];\n $texto = \"CONFIRME O HORÁRIO\\n\";\n $texto .= \"*$horaFormatada*\\n\\n\";\n $texto .= \"Você confirma esse horário?\";\n\n $arrayRetorno = array(\n \"modo\" => 9, //tipo confirmação\n \"subtipo\" => 'horario',\n \"id_retorno\" => '',\n \"opcoes\" => $idHorario\n );\n\n //& Organizar o array retorno\n $this->confirmacao($texto, $arrayRetorno);\n }\n } else {\n $this->sendMessage('MensageErro', $this->numero, \"Responda somente com o número referente à opção desejada.\", \"\");\n }\n }\n\n //( Faz a pesquisa do retorno\n $sql = \"SELECT * FROM tbl_retornos WHERE tipo = 8 AND coringa = '$proximoSubtipo'\";\n } else if ($consultaUltima['tipo'] == 9) { //( Uma solicitação de confirmação\n\n //( Verifica que é uma confirmação de horário \n if ($consultaUltima['subtipo'] == 'horario') {\n\n //( Verifica se tem SIM ou NÃO na mensagem do cliente\n $nao = $this->verficaPalavras('', $this->mensagem, array('não', 'nao', 'NÃO', 'Nao', 'NAO', 'NO', 'no'));\n $sim = $this->verficaPalavras('', $this->mensagem, array('sim', 'Sim', 'Si', 'si', 'SI', 'sin', 'Sin', 'SIN', 'SIM'));\n\n\n if ($nao == 1) { //( Se tiver NÃO, é enviada o MENU RAIZ \n $this->envioMenuRaiz($this->numero, \"*OPERAÇÃO CANCELADA*\\n\\n\");\n } else if ($sim == 1) { //( Se tiver SIM, é reservado o horário\n $this->reservaHorario($this->opcoesVariaveis);\n } else { //( Se na mensagem não tem nem SIM nem Não, é enviado a mensagem de erro dizendo que não entendeu\n $this->sendMessage('MensageErro', $this->numero, \"Não compreendi a sua resposta, favor responder exatamente como foi solicitado.\", \"\");\n }\n }\n } else if ($id_retorno == '') { //ou seja, não sei qual o retorno\n $sql = \"SELECT * FROM tbl_retornos WHERE id_retorno = (SELECT resposta FROM tbl_opcoes WHERE id_instancia = $this->idInstancia AND indice = '$primeiraPalavraCliente' AND id_retorno = $ultimoRetorno)\";\n } else { //Sei qual o retorno atual\n //$idInstancia = $this->idInstancia;\n $sql = \"SELECT * FROM tbl_retornos WHERE id_instancia = $this->idInstancia AND id_retorno = $id_retorno\";\n }\n\n $this->logSis('DEB', $sql);\n\n $query = mysqli_query($conn['link'], $sql);\n $consultaRetorno = mysqli_fetch_array($query, MYSQLI_ASSOC);\n $this->logSis('DEB', 'Sql: ' . $sql . ' consultaRetorno->' . print_r($consultaRetorno, true));\n\n $numRow = mysqli_num_rows($query);\n if (!$query) {\n $this->logSis('ERR', 'Mysql Connect: ' . mysqli_error($conn['link']));\n exit(0);\n }\n if ($numRow == 0) { //VERIFICA SE EXISTE NO BANCO DE DADOS\n $this->logSis('ERR', 'Não encontrou a mensagem inicial Instância. Instância: ' . $this->idInstancia);\n exit(0);\n } else {\n\n //& VERIFICAR AQUI SE VAI TER AMBIGUIDADE COM A PRIMEIRA CONSULTA \n $id_retorno = $consultaRetorno['id_retorno']; //ID da tabela retorno (chave)\n $mensagem = utf8_encode($consultaRetorno['mensagem']);\n //Consulta das opções\n $sql = \"SELECT * FROM tbl_opcoes WHERE listavel = 1 AND id_instancia = $this->idInstancia AND id_retorno = $id_retorno ORDER BY indice ASC\";\n $this->logSis('DEB', $sql);\n\n $query = mysqli_query($conn['link'], $sql);\n $numRow = mysqli_num_rows($query);\n\n //Teste DEploy\n if ($numRow != 0) {\n $mensagem .= \"\\n\";\n while ($opcao = mysqli_fetch_array($query)) {\n $mensagem .= '*' . $opcao['indice'] . '.* ' . utf8_encode($opcao['mensagem']) . \"\\n\";\n }\n if ($consultaRetorno['modo'] == 1 && $consultaRetorno['id_retorno'] != $this->menuRaiz) {\n $mensagem .= \"*0.* Voltar ao menu anterior\\n\";\n }\n }\n\n $retorno = array(\n 'id_retorno' => $consultaRetorno['id_retorno'],\n 'nome' => $consultaRetorno['nome'],\n 'modo' => $consultaRetorno['modo'],\n 'tipo' => $consultaRetorno['tipo'],\n 'coringa' => $consultaRetorno['coringa'], //para tipo 6 (Inclusão lista) -> lista_X\n 'mensagem' => $mensagem,\n 'url' => $consultaRetorno['url'],\n 'lat' => $consultaRetorno['lat'],\n 'lng' => $consultaRetorno['lng'],\n 'name' => $consultaRetorno['name'],\n 'address' => $consultaRetorno['address']\n );\n $this->logSis('DEB', 'Retorno->' . print_r($retorno, true));\n\n return $retorno;\n }\n }", "function getTablaInformeAjuntament($desde,$hasta){\n \n // $this->ponerHorasTaller();\n // $this->ponerNumRegistro();\n \n \n $letra=getLetraCasal();\n $numeroRegistroCasalIngresos=getNumeroRegistroCasalIngresos();\n $numeroRegistroCasalDevoluciones=getNumeroRegistroCasalDevoluciones();\n \n $sql=\"SELECT id FROM casal_recibos WHERE fecha>='$desde' AND fecha<='$hasta' ORDER BY id ASC LIMIT 1\";\n if($this->db->query($sql)->num_rows()==0){\n $primero=0;\n }\n else {\n $primero=$this->db->query($sql)->row()->id;\n }\n \n $sql=\"SELECT id FROM casal_recibos WHERE fecha>='$desde' AND fecha<='$hasta' ORDER BY id DESC LIMIT 1\";\n if($this->db->query($sql)->num_rows()==0){\n $ultimo=0;\n }\n else {\n $ultimo=$this->db->query($sql)->row()->id;\n }\n \n $sql=\"SELECT r.id as id, r.fecha as fecha , r.id_socio as id_socio , r.importe as importe , r.recibo as recibo, s.nombre as nombre,s.apellidos as apellidos \n FROM casal_recibos r\n LEFT JOIN casal_socios_nuevo s ON s.num_socio=r.id_socio\n WHERE fecha>='$desde' AND fecha<='$hasta' ORDER BY r.id\";\n \n $sql=\"SELECT r.fecha as fecha,\"\n . \" lr.id_recibo as recibo,\"\n . \" lr.importe as importe, \"\n . \" t.nombre_corto as nombre,\"\n . \" t.horas_taller_T1 as horas_taller_T1,\"\n . \" t.horas_taller_T2 as horas_taller_T2,\"\n . \" t.horas_taller_T3 as horas_taller_T3,\"\n . \" s.dni as dni,\"\n . \" lr.tarjeta as tarjeta,\"\n . \" lr.periodos as periodos,\"\n . \" lr.id_taller as id_taller,\"\n . \" lr.id_socio as id_socio,\"\n . \" lr.id as id,\"\n . \" lr.num_registro as num_registro,\"\n . \" lr.num_registro_posicion as num_registro_posicion,\"\n . \" s.num_socio as num_socio\"\n . \" FROM casal_lineas_recibos lr\"\n . \" LEFT JOIN casal_recibos r ON lr.id_recibo=r.id\"\n . \" LEFT JOIN casal_talleres t ON t.id=lr.id_taller\"\n . \" LEFT JOIN casal_socios_nuevo s ON s.num_socio=lr.id_socio\"\n . \" WHERE lr.importe>0 AND lr.id_recibo>='$primero' AND lr.id_recibo<='$ultimo' ORDER BY lr.num_registro_posicion\";\n \n //log_message('INFO',$sql);\n \n $recibos=array(); \n if($this->db->query($sql)->num_rows()>0) \n $recibos=$this->db->query($sql)->result();\n \n \n $cabeceraTabla='<table class=\"table table-bordered table-hover\"><tbody>\n <thead>\n <tr >\n <th class=\"col-sm-1 text-center\">Data</th>\n <th class=\"col-sm-1 text-center\">Num Registre</th>\n <th class=\"col-sm-1 text-center\">DNI Usuari</th>\n <th class=\"col-sm-1 text-center\">Nom Actividad</th>\n <th class=\"col-sm-1 text-center\">Num Registre Ingrés</th>\n <th class=\"col-sm-1 text-center\" >Preu/hora</th>\n <th class=\"col-sm-1 text-center\">Import Base</th>\n <th class=\"col-sm-1 text-center\">% IVA (exempt)</th>\n <th class=\"col-sm-1 text-center\" style=\"border-top:2px solid black;border-right:2px solid black;border-left:2px solid black;\">IMPORT TOTAL</th>\n <th class=\"col-sm-1 text-center\">TIPOLOGIA INGRES</th>\n \n </tr>';\n \n \n \n $tabla=$cabeceraTabla;\n \n $importeTotal=0;\n foreach ($recibos as $k=>$v) {\n $fecha=$v->fecha;\n $fecha=substr($fecha,8,2).'/'.substr($fecha,5,2).'/'.substr($fecha,0,4);\n $tabla.='<tr>';\n $tabla.='<td class=\"text-center\">';\n $tabla.= $fecha;\n $tabla.='</td>';\n \n $num=strval($v->num_registro_posicion);\n while(strlen($num)<5) {\n $num='0'.$num;\n }\n $tabla.='<td class=\"text-center\">';\n $tabla.= $v->num_registro.$num;\n $tabla.='</td>';\n \n \n $dni=$v->dni;\n if($this->socios_model->validar_dni($dni)){\n $tabla.='<td class=\"text-center\">';\n $tabla.= strtoupper($dni);\n $tabla.='</td>';\n }\n else{\n $tabla.='<td class=\"text-center\" style=\"color:red\">';\n $tabla.= strtoupper($dni).\"(\".$v->num_socio.\")\";\n $tabla.='</td>';\n }\n \n $nombre=$v->nombre;\n $tabla.='<td class=\"text-center\">';\n $tabla.= $nombre;\n $tabla.='</td>';\n \n $recibo=$letra.' '.$v->recibo; \n $tabla.='<td class=\"text-center\">';\n $tabla.= $recibo;\n $tabla.='</td>';\n \n if($v->periodos==4) $horas=floatval($v->horas_taller_T1);\n if($v->periodos==2) $horas=floatval($v->horas_taller_T2);\n if($v->periodos==1) $horas=floatval($v->horas_taller_T3); \n //log_message('INFO', '===================='.$v->nombre.' '.$horas);\n \n if($horas>0)\n $preu_hora=number_format($v->importe/$horas*100,2); \n else \n $preu_hora=0;\n\n $tabla.='<td class=\"text-center\">';\n $tabla.= $preu_hora;\n $tabla.='</td>';\n \n \n \n $importe=$v->importe;\n $tabla.='<td class=\"text-center\" >';\n $tabla.= number_format($importe,2);\n $tabla.='</td>';\n \n $importe=$v->importe;\n $tabla.='<td class=\"text-center\">';\n $tabla.= '0.00';\n $tabla.='</td>';\n \n $importe=number_format($v->importe,2);\n $tabla.='<td class=\"text-center\" style=\"border-right:2px solid black;border-left:2px solid black;\">';\n $tabla.= number_format($importe,2);\n $tabla.='</td>';\n $importeTotal+=number_format($importe,2);\n \n $tarjeta=number_format($v->tarjeta,2);\n if($tarjeta==0) $pago=\"Efectiu\"; else $pago=\"TPV fisic\";\n $tabla.='<td class=\"text-center\">';\n $tabla.= $pago;\n $tabla.='</td>';\n \n $tabla.='</tr>';\n }\n \n \n $pieTabla='</tr></thead><thead><tr>';\n $pieTabla.='<th class=\"text-center\" style=\"border-bottom:1px solid white;border-right:1px solid white;border-left:1px solid white;\"></th>';\n $pieTabla.='<th class=\"text-center\" style=\"border-bottom:1px solid white;border-right:1px solid white;border-left:1px solid white;\"></th>';\n $pieTabla.='<th class=\"text-center\" style=\"border-bottom:1px solid white;border-right:1px solid white;border-left:1px solid white;\"></th>';\n $pieTabla.='<th class=\"text-center\" style=\"border-bottom:1px solid white;border-right:1px solid white;border-left:1px solid white;\"></th>';\n $pieTabla.='<th class=\"text-center\" style=\"border-bottom:1px solid white;border-right:1px solid white;border-left:1px solid white;\"></th>';\n $pieTabla.='<th class=\"text-center\" style=\"border-bottom:1px solid white;border-right:1px solid white;border-left:1px solid white;\"></th>';\n $pieTabla.='<th class=\"text-center\" style=\"border-bottom:1px solid white;border-right:0px solid white;border-left:1px solid white;\"></th>';\n $pieTabla.='<th class=\"text-center\">T O T A L S</th>';\n $pieTabla.='<th class=\"text-center\" style=\"border-bottom:2px solid black;border-right:2px solid black;border-left:2px solid black;\">';\n $pieTabla.=number_format($importeTotal,2);\n $pieTabla.='</th>';\n $pieTabla.='</tr></thead></tody></table>';\n \n $tabla.=$pieTabla;\n \n \n $cabeceraTablaDevoluciones='<table class=\"table table-bordered table-hover\"><tbody>\n <thead>\n <tr >\n <th class=\"col-sm-1 text-center\">Data</th>\n <th class=\"col-sm-1 text-center\">Num Registre</th>\n <th class=\"col-sm-1 text-center\">DNI Usuari</th>\n <th class=\"col-sm-1 text-center\">Nom Actividad</th>\n <th class=\"col-sm-1 text-center\">Num Registre Devolució</th>\n <th class=\"col-sm-1 text-rigcenterht\" >Preu/hora</th>\n <th class=\"col-sm-1 text-center\">Import Base</th>\n <th class=\"col-sm-1 text-center\">% IVA (exempt)</th>\n <th class=\"col-sm-1 text-center\" style=\"border-top:2px solid black;border-right:2px solid black;border-left:2px solid black;\">IMPORT TOTAL</th>\n <th class=\"col-sm-1 text-center\">TIPOLOGIA DEVOLUCIÓ</th>\n \n </tr>';\n \n $tituloCasal=strtoupper(getTituloCasal());\n $salida='<h4>INFORME DETALLAT INGRESSOS</h4>'\n . ''\n . 'EQUIPAMENT MUNICIPA: <STRONG>'.$tituloCasal.'</STRONG>'\n . '<BR>'\n . 'ADJUDICATARI: <STRONG>'.'SERVEIS A LES PERSONES INCOOP, SCCL</STRONG>'\n . '<BR>'\n . 'NIF ADJUDICATARI: <STRONG>F60137411</STRONG>'\n . '<BR>'\n . 'NÚM CONTRACTE: <STRONG>18001022</STRONG>'\n . '<BR>'\n . 'Periode: <STRONG>'.substr($desde,8,2).'/'.substr($desde,5,2).'/'.substr($desde,0,4).' - '.substr($hasta,8,2).'/'.substr($hasta,5,2).'/'.substr($hasta,0,4).'</STRONG>'\n . '<BR>'\n . '<BR>'\n \n .$tabla.'<br>';\n \n $sql=\"SELECT r.fecha as fecha,\"\n . \" lr.id_recibo as recibo,\"\n . \" lr.importe as importe, \"\n . \" t.nombre_corto as nombre,\"\n . \" t.horas_taller_T1 as horas_taller_T1,\"\n . \" t.horas_taller_T2 as horas_taller_T2,\"\n . \" t.horas_taller_T3 as horas_taller_T3,\"\n . \" s.dni as dni,\"\n . \" lr.tarjeta as tarjeta,\"\n . \" lr.periodos as periodos,\"\n . \" lr.id_taller as id_taller,\"\n . \" lr.id_socio as id_socio,\"\n . \" lr.id as id,\"\n . \" lr.num_registro as num_registro,\"\n . \" lr.num_registro_posicion as num_registro_posicion,\"\n . \" s.num_socio\"\n . \" FROM casal_lineas_recibos lr\"\n . \" LEFT JOIN casal_recibos r ON lr.id_recibo=r.id\"\n . \" LEFT JOIN casal_talleres t ON t.id=lr.id_taller\"\n . \" LEFT JOIN casal_socios_nuevo s ON s.num_socio=lr.id_socio\"\n . \" WHERE lr.importe<0 AND lr.id_recibo>='$primero' AND lr.id_recibo<='$ultimo' ORDER BY lr.num_registro_posicion\";\n \n \n \n $recibos=array(); \n if($this->db->query($sql)->num_rows()>0) \n $recibos=$this->db->query($sql)->result();\n \n $tabla=$cabeceraTablaDevoluciones;\n $importeTotalDevoluciones=0;\n foreach ($recibos as $k=>$v) {\n $fecha=$v->fecha;\n $fecha=substr($fecha,8,2).'/'.substr($fecha,5,2).'/'.substr($fecha,0,4);\n $tabla.='<tr>';\n $tabla.='<td class=\"text-center\">';\n $tabla.= $fecha;\n $tabla.='</td>';\n \n $num=strval($v->num_registro_posicion);\n while(strlen($num)<5) {\n $num='0'.$num;\n } \n $tabla.='<td class=\"text-center\">';\n $tabla.= $v->num_registro.$num;;\n $tabla.='</td>';\n \n $dni=$v->dni;\n if($this->socios_model->validar_dni($dni)){\n $tabla.='<td class=\"text-center\">';\n $tabla.= strtoupper($dni);\n $tabla.='</td>';\n }\n else{\n $tabla.='<td class=\"text-center\" style=\"color:red\">';\n $tabla.= strtoupper($dni).\"(\".$v->num_socio.\")\";\n $tabla.='</td>';\n }\n \n $nombre=$v->nombre;\n $tabla.='<td class=\"text-center\">';\n $tabla.= $nombre;\n $tabla.='</td>';\n \n $recibo=$letra.' '.$v->recibo; \n $tabla.='<td class=\"text-center\">';\n $tabla.= $recibo;\n $tabla.='</td>';\n \n \n \n /*\n $id_taller=$v->id_taller;\n $periodos=$v->periodos;\n $id_socio=$v->id_socio;\n $importe=-$v->importe;\n $id=$v->id;\n $sql=\"SELECT * FROM casal_lineas_recibos WHERE id<'$id' AND id_taller='$id_taller' AND id_socio='$id_socio' AND periodos='$periodos' AND importe='$importe' ORDER BY id DESC LIMIT 1\";\n //log_message('INFO',$sql);\n if($this->db->query($sql)->num_rows()==1) {\n $recibo=$letra.' '.$this->db->query($sql)->row()->id_recibo;\n }\n else $recibo='';\n $tabla.='<td class=\"text-center\">';\n $tabla.= $recibo;\n $tabla.='</td>';\n */\n \n \n if($v->periodos==4) $horas=$v->horas_taller_T1;\n if($v->periodos==2) $horas=$v->horas_taller_T2;\n if($v->periodos==1) $horas=$v->horas_taller_T3; \n \n //log_message('INFO', '++=================='.$v->nombre.' '.$horas);\n \n $preu_hora=number_format($v->importe/$horas*100,2); \n $tabla.='<td class=\"text-center\">';\n $tabla.= -$preu_hora;\n $tabla.='</td>';\n \n \n \n $importe=number_format($v->importe,2);\n $tabla.='<td class=\"text-center\" >';\n $tabla.= -$importe;\n $tabla.='</td>';\n \n $importe=number_format($v->importe,2);\n $tabla.='<td class=\"text-center\">';\n $tabla.= '0.00';\n $tabla.='</td>';\n \n $importe=number_format($v->importe,2);\n $tabla.='<td class=\"text-center\" style=\"border-right:2px solid black;border-left:2px solid black;\">';\n $tabla.= -$importe;\n $tabla.='</td>';\n $importeTotalDevoluciones+=$importe;\n \n $tarjeta=number_format($v->tarjeta,2);\n if($tarjeta==0) $pago=\"Efectiu\"; else $pago=\"TPV fisic\";\n $tabla.='<td class=\"text-center\">';\n $tabla.= $pago;\n $tabla.='</td>';\n \n $tabla.='</tr>';\n }\n \n \n \n \n $pieTablaDevoluciones='</tr></thead><thead><tr>';\n $pieTablaDevoluciones.='<th class=\"text-center\" style=\"border-bottom:1px solid white;border-right:1px solid white;border-left:1px solid white;\"></th>';\n $pieTablaDevoluciones.='<th class=\"text-center\" style=\"border-bottom:1px solid white;border-right:1px solid white;border-left:1px solid white;\"></th>';\n $pieTablaDevoluciones.='<th class=\"text-center\" style=\"border-bottom:1px solid white;border-right:1px solid white;border-left:1px solid white;\"></th>';\n $pieTablaDevoluciones.='<th class=\"text-center\" style=\"border-bottom:1px solid white;border-right:1px solid white;border-left:1px solid white;\"></th>';\n $pieTablaDevoluciones.='<th class=\"text-center\" style=\"border-bottom:1px solid white;border-right:1px solid white;border-left:1px solid white;\"></th>';\n $pieTablaDevoluciones.='<th class=\"text-center\" style=\"border-bottom:1px solid white;border-right:1px solid white;border-left:1px solid white;\"></th>';\n $pieTablaDevoluciones.='<th class=\"text-center\" style=\"border-bottom:1px solid white;border-right:0px solid white;border-left:1px solid white;\"></th>';\n $pieTablaDevoluciones.='<th class=\"text-center\">T O T A L S</th>';\n $pieTablaDevoluciones.='<th class=\"text-center\" style=\"border-bottom:2px solid black;border-right:2px solid black;border-left:2px solid black;\">';\n $pieTablaDevoluciones.=-number_format($importeTotalDevoluciones,2);\n $pieTablaDevoluciones.='</th>';\n $pieTablaDevoluciones.='</tr></thead></tody></table>';\n \n \n \n \n \n $salida.='<h4>INFORME DETALLAT DEVOLUCIONS</h4>'\n . ''\n . 'EQUIPAMENT MUNICIPA: <STRONG>'.$tituloCasal.'</STRONG>'\n . '<BR>'\n . 'ADJUDICATARI: <STRONG>'.'SERVEIS A LES PERSONES INCOOP, SCCL</STRONG>'\n . '<BR>'\n . 'NIF ADJUDICATARI: <STRONG>F60137411</STRONG>'\n . '<BR>'\n . 'NÚM CONTRACTE: <STRONG>18001022</STRONG>'\n . '<BR>'\n . 'Periode: <STRONG>'.substr($desde,8,2).'/'.substr($desde,5,2).'/'.substr($desde,0,4).' - '.substr($hasta,8,2).'/'.substr($hasta,5,2).'/'.substr($hasta,0,4).'</STRONG>'\n . '<BR>'\n . '<BR>';\n \n \n \n \n \n \n $salida.=$tabla;\n $salida.=$pieTablaDevoluciones;\n $salida.='<br><h4>RESUM TOTAL</h4>';\n \n $importeResumen=number_format($importeTotal,2)+number_format($importeTotalDevoluciones,2);\n $resumenTotal='<table class=\"table table-bordered table-hover\"><tbody>\n <thead>\n <tr >\n <th class=\"col-sm-1 text-center\" style=\"border-bottom:1px solid white;border-top:1px solid white;border-right:1px solid white;border-left:1px solid white;\"></th>\n <th class=\"col-sm-1 text-center\" style=\"border-bottom:1px solid white;border-top:1px solid white;border-right:1px solid white;border-left:1px solid white;\"></th>\n <th class=\"col-sm-1 text-center\" style=\"border-bottom:1px solid white;border-top:1px solid white;border-right:1px solid white;border-left:1px solid white;\"></th>\n <th class=\"col-sm-1 text-center\" style=\"border-bottom:1px solid white;border-top:1px solid white;border-right:1px solid white;border-left:1px solid white;\"></th>\n <th class=\"col-sm-1 text-center\" style=\"border-bottom:1px solid white;border-top:1px solid white;border-right:1px solid white;border-left:1px solid white;\"></th>\n <th class=\"col-sm-1 text-center\" style=\"border-bottom:1px solid white;border-top:1px solid white;border-right:1px solid white;border-left:1px solid white;\"></th>\n <th class=\"col-sm-1 text-center\" style=\"border-bottom:1px solid white;border-top:1px solid white;border-right:1px solid white;border-left:1px solid white;\"></th>\n <th class=\"col-sm-1 text-center\" style=\"border-bottom:1px solid white;border-top:1px solid white;border-right:1px solid white;border-left:1px solid white;\"></th>\n <th class=\"col-sm-1 text-center\" style=\"border-top:2px solid black;border-right:2px solid black;border-left:2px solid black;\">IMPORT TOTAL</th>\n <th class=\"col-sm-1 text-center\" style=\"border-bottom:1px solid white;border-top:1px solid white;border-right:1px solid white;border-left:1px solid white;\"></th>\n \n </tr>\n <tr >\n <th class=\"col-sm-1 text-center\" style=\"border-bottom:1px solid white;border-top:1px solid white;border-right:1px solid white;border-left:1px solid white;\"></th>\n <th class=\"col-sm-1 text-center\" style=\"border-bottom:1px solid white;border-top:1px solid white;border-right:1px solid white;border-left:1px solid white;\"></th>\n <th class=\"col-sm-1 text-center\" style=\"border-bottom:1px solid white;border-top:1px solid white;border-right:1px solid white;border-left:1px solid white;\"></th>\n <th class=\"col-sm-1 text-center\" style=\"border-bottom:1px solid white;border-top:1px solid white;border-right:1px solid white;border-left:1px solid white;\"></th>\n <th class=\"col-sm-1 text-center\" style=\"border-bottom:1px solid white;border-top:1px solid white;border-right:1px solid white;border-left:1px solid white;\"></th>\n <th class=\"col-sm-1 text-center\" style=\"border-bottom:1px solid white;border-top:1px solid white;border-right:1px solid white;border-left:1px solid white;\"></th>\n <th class=\"col-sm-1 text-center\" style=\"border-bottom:1px solid white;border-top:1px solid white;border-left:1px solid white;\"></th>\n <th class=\"col-sm-1 text-center\" style=\"border-bottom:2px solid #DDDDDD;border-top:2px solid #DDDDDD;border-left:1px solid #DDDDDD;\">T O T A L S</th>\n <th class=\"col-sm-1 text-center\" style=\"border-bottom:2px solid black;border-top:2px solid black;border-right:2px solid black;border-left:2px solid black;\">'.number_format($importeResumen,2).'</th>\n <th class=\"col-sm-1 text-center\" style=\"border-bottom:1px solid white;border-top:1px solid white;border-right:1px solid white;border-left:1px solid white;\"></th>\n \n </tr>\n\n\n\n </thead></tbody></table>';\n \n $salida.=$resumenTotal;\n \n \n \n \n return $salida;\n \n }", "function getColumnas($conn, $exitosa) {\n\t\tif ($exitosa){\t\t\t\n\t\t\t$sql = 'SELECT c1_int, c2_int FROM #php_test_table';\n\t\t\t\n\t\t\techo '<table border=1 >';\t\t\n\t\t\tprint \"<tr>\";\n\t\t\tprint \"<td><b> c1_int </b></td>\";\n\t\t\tprint \"<td><b> c2_int </b></td>\";\n\t\t\tprint \"</tr>\";\n\t\t\tforeach ($conn->query($sql) as $row) {\n\t\t\t\tprint \"<tr>\";\n\t\t\t\tprint \"<td>\" . $row['c1_int'] . \"</td>\";\n\t\t\t\tprint \"<td>\" . $row['c2_int'] . \"</td>\";\n\t\t\t\tprint \"</tr>\";\n\t\t\t}\n\t\t\techo '</table>';\n\t\t}\n\t}", "function operasiJoin(){\n\t\t$date = date('Y-m-d');\n\t\t$query = $this->db->query(\"SELECT o.id_operasi, o.operasi, o.id_alat, a.id_kategori, o.tanggal, o.keterangan, a.nama_alat FROM operasi o INNER JOIN alat a ON o.id_alat = a.id_alat WHERE o.tanggal = '$date'\"); \n\t\treturn $query->result();\n\t}", "function getCita($fecha, $hora){\n\t\treturn conectar()->query(\"SELECT * FROM citas WHERE fecha LIKE '$fecha' AND hora LIKE '$hora'\");\n\t}", "public function getValoresPorPeriodoReceitaOrcamentaria ( DBDate $oDataInicio, DBDate $oDataFinal, $sCampos = '*', $sOrdem = \"orcreceita.o70_codrec, v30_receita, v30_datageracao\" ){\n\n $iInstituicao = db_getsession('DB_instit');\n $iAnousu = db_getsession('DB_anousu');\n\n $sSqlValoresPorPeriodo = \"select {$sCampos} \";\n $sSqlValoresPorPeriodo .= \" from evolucaodividaativa \";\n $sSqlValoresPorPeriodo .= \" inner join tabrec on v30_receita = tabrec.k02_codigo \";\n $sSqlValoresPorPeriodo .= \" inner join taborc on tabrec.k02_codigo = taborc.k02_codigo \";\n $sSqlValoresPorPeriodo .= \" inner join orcreceita on k02_anousu = o70_anousu \";\n $sSqlValoresPorPeriodo .= \" and taborc.k02_codrec = o70_codrec \";\n $sSqlValoresPorPeriodo .= \" inner join orcfontes on o70_codfon = o57_codfon \";\n $sSqlValoresPorPeriodo .= \" and o70_anousu = o57_anousu \";\n $sSqlValoresPorPeriodo .= \" inner join conplanoorcamento on conplanoorcamento.c60_codcon = o70_codfon \";\n $sSqlValoresPorPeriodo .= \" and conplanoorcamento.c60_anousu = o70_anousu \";\n $sSqlValoresPorPeriodo .= \" inner join conplanoconplanoorcamento on c72_conplanoorcamento = conplanoorcamento.c60_codcon \";\n $sSqlValoresPorPeriodo .= \" and c72_anousu = conplanoorcamento.c60_anousu \";\n $sSqlValoresPorPeriodo .= \" inner join conplano on c72_conplano = conplano.c60_codcon \";\n $sSqlValoresPorPeriodo .= \" and conplanoorcamento.c60_anousu = conplano.c60_anousu \";\n $sSqlValoresPorPeriodo .= \" where v30_datageracao between '{$oDataInicio->getDate()}' and '{$oDataFinal->getDate()}' \";\n $sSqlValoresPorPeriodo .= \" and v30_instituicao = {$iInstituicao} \";\n $sSqlValoresPorPeriodo .= \" and o70_anousu = {$iAnousu} \";\n $sSqlValoresPorPeriodo .= \" order by {$sOrdem} \";\n\n return $sSqlValoresPorPeriodo;\n }", "function minutos2horas($mins) {\nif ($mins < 0)\n\t$min = abs($mins);\nelse\n\t$min = $mins;\n \n$h = floor($min / 60);\n$m = ($min - ($h * 60)) / 100;\n$horas = $h + $m;\n \nif ($mins < 0)\n\t$horas *= -1;\n\n$sep = explode('.', $horas);\n$h = $sep[0];\nif (empty($sep[1]))\n\t$sep[1] = 00;\n\t$m = $sep[1];\n \nif (strlen($m) < 2)\n\t$m = $m . 0;\nreturn $h.':'.$m;\n }", "public function get_thongtin_dangky($madetai){\n $dk= new DangKy();\n $result = $dk->join('SinhVien','SinhVien.sv_ma','=','DangKy.sv_ma')\n ->where('DangKy.dt_ma','=',$madetai)\n //->select( 'SinhVien.sv_ten','SinhVien.sv_ma')\n //->lists('SinhVien.sv_ma')->all(); \n ->get();\n return $result;\n }", "function getListPSDuMois($id_emp=null,$empSigle,$dateDebut,$dateFin){\n global $dbHandler;\n $db = $dbHandler->openConnection();\n\n $date_debut = php2pg($dateDebut);\n $date_fin = php2pg($dateFin);\n\n if ($empSigle != 'SOD'){\n $sql = \"SELECT '000000000'||SUBSTRING(b.sigle FROM 1 FOR 3)||rpad(a.matricule,7,' ') AS col1_value,' *FZY90 ' AS col2_value,'0' AS col3_value,' 75E' AS col4_value, '+'||'00000000001' AS col5_value, ' AM' AS col6_value, ' +000000000000' AS col7_value, ' X+'||REPLACE(TO_CHAR(COALESCE(ag.val_nominale_part_sociale,0), '99999999'), ' ', '0')||'000' AS col8_value, ' +000000000000' AS col9_value, ' 00 1' AS col10_value\nFROM ad_cli a\nINNER JOIN adsys_employeur b ON a.pp_partenaire = b.id\nINNER JOIN ad_cpt c ON a.id_client = c.id_titulaire\nINNER JOIN ad_agc ag ON ag.id_ag = a.id_ag\nWHERE c.etat_cpte = 1 AND c.id_prod = 1 AND DATE(a.date_adh) BETWEEN DATE('$date_debut') AND DATE('$date_fin')\";\n }\n else{\n $sql = \"SELECT '000000000'||SUBSTRING(b.sigle FROM 1 FOR 3)||rpad(a.matricule,7,' ') AS col1_value, ' *FZYEL ' AS col2_value, '0001680C'||REPLACE(TO_CHAR(row_number() over (), '999999'),' ','0')||DATE('$date_debut')||DATE('$date_fin') AS col3_value, ' M +000000000000 +'||REPLACE(TO_CHAR(COALESCE(ag.val_nominale_part_sociale,0), '99999999'), ' ', '0')||'000 +000000000000 00 ' AS col4_value\nFROM ad_cli a\nINNER JOIN adsys_employeur b ON a.pp_partenaire = b.id\nINNER JOIN ad_cpt c ON a.id_client = c.id_titulaire\nINNER JOIN ad_agc ag ON ag.id_ag = a.id_ag\nWHERE c.etat_cpte = 1 AND c.id_prod = 1 AND DATE(a.date_adh) BETWEEN DATE('$date_debut') AND DATE('$date_fin')\";\n }\n if ($id_emp != null){\n $sql .= \" AND b.id = \".$id_emp;\n }\n $result = $db->query($sql);\n\n if (DB::isError($result)) {\n $dbHandler->closeConnection(false);\n Signalerreur(__FILE__,__LINE__,__FUNCTION__,_(\"DB\").\": \".$result->getMessage());\n }\n\n $listPS = array();\n $count = 0;\n $nombreCols = $result->numCols();\n\n while ($row = $result->fetchrow(DB_FETCHMODE_ASSOC)){\n $count ++;\n $listPS[$count]=$row;\n }\n $listPS['nbrCols'] = $nombreCols;\n\n $dbHandler->closeConnection(true);\n return $listPS;\n}", "function funConverteDataHora($data){\n\t//$data_americano = \"2009-04-29\";\n\t//$data_Brasileiro = \"29/04/2012\";\n\t//AGORA VAMOS EXPLODIR ELA PELOS HIFENS E SERÁ CRIADO UM ARRAY COM AS PARTES\n\t$partes_da_data = \"\";\n\t$hora = \"\";\n\t$partes_da_data = explode('/',$data);\n\t$hora = substr($partes_da_data[2],4,-1);\n\n //AGORA REMONTAMOS A DATA NO FORMATO BRASILEIRO, OU SEJA,\n\t//INVERTENDO AS POSICOES E COLOCANDO AS BARRAS\n\t$data = substr($partes_da_data[2],0,4).'-'.$partes_da_data[1].'-'.$partes_da_data[0];\n\n\t//UFA! PRONTINHO, AGORA TEMOS A DATA NO BOM E VELHO FORMATO BRASILEIRO\n\t//return \n\treturn $data.' '.$hora;\n}", "public function listarResumenItinerario() {\n try{\n $sql_1 = \"SELECT DISTINCT\n (SELECT CONVERT(VARCHAR(20),MIN([ITI_fch]),103) FROM [dbo].[SPV_ITINERARIO] \n WHERE CONVERT(VARCHAR(20),[AUD_fch_cre],103) = CONVERT(VARCHAR(20),ITI.[AUD_fch_cre],103)\n\t\t\t\t\t\tAND CONVERT(VARCHAR(6),[AUD_fch_cre],108) = CONVERT(VARCHAR(6),ITI.[AUD_fch_cre],108)) \n\t\t\t\t\t\tAS ITI_fchini,\n (SELECT CONVERT(VARCHAR(20),MAX([ITI_fch]),103) FROM [dbo].[SPV_ITINERARIO] \n WHERE CONVERT(VARCHAR(20),[AUD_fch_cre],103) = CONVERT(VARCHAR(20),ITI.[AUD_fch_cre],103) \n\t\t\t\t\t\tAND CONVERT(VARCHAR(6),[AUD_fch_cre],108) = CONVERT(VARCHAR(6),ITI.[AUD_fch_cre],108))\n\t\t\t\t\t\tAS ITI_fchfin,\n ITI.[ITI_proceso],\n CONVERT(VARCHAR(20),ITI.[AUD_fch_cre],103) AS [AUD_fch_cre],\n\n\t\t\t\t\t\t-- DAY(ITI.[ITI_fch]) AS [ITI_fch_dia],\n\t\t\t\t\t\tMONTH(ITI.[ITI_fch]) AS [ITI_fch_mes],\n\t\t\t\t\t\tYEAR(ITI.[ITI_fch]) AS [ITI_fch_year]\n\n FROM [dbo].[SPV_ITINERARIO] ITI\n LEFT JOIN [dbo].[SPV_RUTA] RUT ON ITI.[RUT_num_vuelo] = RUT.[RUT_num_vuelo]\n \n WHERE YEAR(ITI.[ITI_fch]) = 2019\n \n GROUP BY \n ITI.[ITI_proceso],\n CONVERT(VARCHAR(20),ITI.[AUD_fch_cre],103),\n\t\t\t\t\t\tCONVERT(VARCHAR(6),ITI.[AUD_fch_cre],108),\n\t\t\t\t\t\tDAY(ITI.[ITI_fch]),\n\t\t\t\t\t\tMONTH(ITI.[ITI_fch]),\n\t\t\t\t\t\tYEAR(ITI.[ITI_fch])\n\n ORDER BY 5 DESC,6, 1 DESC;\";\n $result = $this->database->Consultar($sql_1);\n return $result;\n } catch (Excepcion $e){\n throw $e;\n }\n }", "function getRealSabtuMinggu($conn) {\n $last = self::getLastDataPeriodeGaji($conn);\n\n //shift sabtu\n $sql = \"select coalesce(count(*),0) as hadirsabtu,idpegawai \n\t\t\t\t\tfrom \" . static::table('pe_presensidet') . \"\n\t\t\t\t\twhere tglpresensi between '\" . $last['tglawalhit'] . \"' and '\" . $last['tglakhirhit'] . \"' and\n\t\t\t\t\tdate_part('dow',tglpresensi) = 7 and sjamdatang is not null and sjampulang is not null and kodeabsensi in ('H','T','PD','DK','PK')\n\t\t\t\t\tgroup by idpegawai\";\n $rs = $conn->Execute($sql);\n\n while ($row = $rs->FetchRow()) {\n $a_hadirsabtu[$row['idpegawai']] = $row['hadirsabtu'];\n }\n\n //shift ahad\n $sql = \"select coalesce(count(*),0) as hadirahad,idpegawai \n\t\t\t\t\tfrom \" . static::table('pe_presensidet') . \"\n\t\t\t\t\twhere tglpresensi between '\" . $last['tglawalhit'] . \"' and '\" . $last['tglakhirhit'] . \"' and\n\t\t\t\t\tdate_part('dow',tglpresensi) = 1 and sjamdatang is not null and sjampulang is not null and kodeabsensi in ('H','T','PD','DK','PK')\n\t\t\t\t\tgroup by idpegawai\";\n $rs = $conn->Execute($sql);\n\n while ($row = $rs->FetchRow()) {\n $a_hadirahad[$row['idpegawai']] = $row['hadirahad'];\n }\n\n return array($a_hadirsabtu, $a_hadirahad);\n }", "function ListaZonaHoraria()\n {\n $this->Consulta(\"*\",\"zonashorarias\",\"\");\n // Contar la cantidad de resultados\n $this->Filas = mysql_num_rows($this->Resultado);\n if( $this->Filas > 0){\n for( $i=0; $i < $this->Filas; $i++ ) {\n // Obtener resultados\n $Columnas = mysql_fetch_assoc($this->Resultado);\n echo \"<option value=\\\"\".$Columnas['id'].\"\\\">\".$Columnas['nombre'].\"</option>\";\n }\n }else{\n echo \"<option value=\\\"0\\\">No hay datos</option>\";\n }\n }", "public function get_datos_pac_rec_ini($sucursal,$id_usuario){\n\n $conectar= parent::conexion();\n\t \n\t $sql= \"select v.id_ventas,v.sucursal,v.subtotal,v.numero_venta,p.nombres,p.telefono,p.id_paciente,v.tipo_pago,v.vendedor from ventas as v join pacientes as p where p.id_paciente=v.id_paciente and v.sucursal=? and v.id_usuario=? order by id_ventas DESC limit 1;\";\n\n $sql=$conectar->prepare($sql);\n $sql->bindValue(1, $sucursal);\n $sql->bindValue(2, $id_usuario);\n $sql->execute();\n\n return $resultado= $sql->fetchAll(PDO::FETCH_ASSOC);\n\n}", "public function getCprestamosR($id,$idEmp)\n { \n $result=$this->adapter->query('select distinct a.id, a.idEmp,0 as dias,0 as horas, 0 as formula, f.tipo, h.idCcos,\n e.idConE as idCon, f.idFor, cc.id as idPres, 1 as cuota, \n\t\t\t\t ( (cc.valCuota / i.valor ) * ( a.dias ) ) as valor,\n case when kk.codigo is null then \"\" else kk.codigo end as nitTer ,\n case when np.valor is null then 0 else np.valor end as valorPresN \n\t\t\t\t from n_nomina_e a \n inner join n_nomina b on b.id=a.idNom\n inner join n_prestamos c on c.idEmp=a.idEmp \n inner join n_prestamos_tn cc on cc.idPres = c.id and cc.idTnom = c.idTnom \n inner join n_tip_prestamo e on e.id=c.idTpres\n inner join n_conceptos f on f.id=e.idConE \n inner join n_formulas g on g.id=f.idFor \n inner join a_empleados h on h.id=a.idEmp \n inner join n_tip_calendario i on i.id = b.idCal \n left join n_terceros_s k on k.id = f.idTer\n \t\t left join n_terceros kk on kk.id = k.idTer \n left join n_nomina_pres np on np.idPres = cc.id and np.fechaI = b.fechaI and np.fechaF = b.fechaF and np.estado=0 # Buscar cambios en nomina activa con el prestamo \n where a.idNom='.$id.' and c.estado=1 and a.idEmp='.$idEmp.\" and ( cc.pagado + cc.saldoIni ) < cc.valor group by c.id\" ,Adapter::QUERY_MODE_EXECUTE);\n $datos=$result->toArray();\n return $datos; \n }", "public function getDados()\n {\n $aLinhas = array();\n\n /**\n * montamos as datas, e processamos o balancete de verificação\n */\n $oDaoPeriodo = db_utils::getDao(\"periodo\");\n $sSqlDadosPeriodo = $oDaoPeriodo->sql_query_file($this->iCodigoPeriodo);\n $rsPeriodo = db_query($sSqlDadosPeriodo);\n $oDadosPerido = db_utils::fieldsMemory($rsPeriodo, 0);\n $sDataInicial = \"{$this->iAnoUsu}-01-01\";\n $iUltimoDiaMes = cal_days_in_month(CAL_GREGORIAN, $oDadosPerido->o114_mesfinal, $this->iAnoUsu);\n $sDataFinal = \"{$this->iAnoUsu}-{$oDadosPerido->o114_mesfinal}-{$iUltimoDiaMes}\";\n $sWherePlano = \" c61_instit in ({$this->getInstituicoes()}) \";\n /**\n * processa o balancete de verificação\n */\n $rsPlano = db_planocontassaldo_matriz($this->iAnoUsu,\n $sDataInicial,\n $sDataFinal,\n false,\n $sWherePlano,\n '',\n 'true',\n 'true');\n\n $iTotalLinhasPlano = pg_num_rows($rsPlano);\n /**\n * percorremos a slinhas cadastradas no relatorio, e adicionamos os valores cadastrados manualmente.\n */\n $aLinhasRelatorio = $this->oRelatorioLegal->getLinhasCompleto();\n for ($iLinha = 1; $iLinha <= count($aLinhasRelatorio); $iLinha++) {\n\n $aLinhasRelatorio[$iLinha]->setPeriodo($this->iCodigoPeriodo);\n $aColunasRelatorio = $aLinhasRelatorio[$iLinha]->getCols($this->iCodigoPeriodo);\n $aColunaslinha = array();\n $oLinha = new stdClass();\n $oLinha->totalizar = $aLinhasRelatorio[$iLinha]->isTotalizador();\n $oLinha->descricao = $aLinhasRelatorio[$iLinha]->getDescricaoLinha();\n $oLinha->colunas = $aColunasRelatorio;\n $oLinha->nivellinha = $aLinhasRelatorio[$iLinha]->getNivel();\n foreach ($aColunasRelatorio as $oColuna) {\n\n $oLinha->{$oColuna->o115_nomecoluna} = 0;\n if ( !$aLinhasRelatorio[$iLinha]->isTotalizador() ) {\n $oColuna->o116_formula = '';\n }\n }\n\n if (!$aLinhasRelatorio[$iLinha]->isTotalizador()) {\n\n $aValoresColunasLinhas = $aLinhasRelatorio[$iLinha]->getValoresColunas(null, null, $this->getInstituicoes(),\n $this->iAnoUsu);\n\n $aParametros = $aLinhasRelatorio[$iLinha]->getParametros($this->iAnoUsu, $this->getInstituicoes());\n foreach($aValoresColunasLinhas as $oValor) {\n foreach ($oValor->colunas as $oColuna) {\n $oLinha->{$oColuna->o115_nomecoluna} += $oColuna->o117_valor;\n }\n }\n\n /**\n * verificamos se a a conta cadastrada existe no balancete, e somamos o valor encontrado na linha\n */\n for ($i = 0; $i < $iTotalLinhasPlano; $i++) {\n\n $oResultado = db_utils::fieldsMemory($rsPlano, $i);\n\n\n $oParametro = $aParametros;\n\n foreach ($oParametro->contas as $oConta) {\n\n $oVerificacao = $aLinhasRelatorio[$iLinha]->match($oConta, $oParametro->orcamento, $oResultado, 3);\n\n if ($oVerificacao->match) {\n\n $this->buscarInscricaoEBaixa($oResultado, $iLinha, $sDataInicial, $sDataFinal);\n\n if ( $oVerificacao->exclusao ) {\n\n $oResultado->saldo_anterior *= -1;\n $oResultado->saldo_anterior_debito *= -1;\n $oResultado->saldo_anterior_credito *= -1;\n $oResultado->saldo_final *= -1;\n }\n\n $oLinha->sd_ex_ant += $oResultado->saldo_anterior;\n $oLinha->inscricao += $oResultado->saldo_anterior_credito;\n $oLinha->baixa += $oResultado->saldo_anterior_debito;\n $oLinha->sd_ex_seg += $oResultado->saldo_final;\n }\n }\n }\n }\n $aLinhas[$iLinha] = $oLinha;\n }\n\n unset($aLinhasRelatorio);\n\n /**\n * calcula os totalizadores do relatório, aplicando as formulas.\n */\n foreach ($aLinhas as $oLinha) {\n\n if ($oLinha->totalizar) {\n\n foreach ($oLinha->colunas as $iColuna => $oColuna) {\n\n if (trim($oColuna->o116_formula) != \"\") {\n\n $sFormulaOriginal = ($oColuna->o116_formula);\n $sFormula = $this->oRelatorioLegal->parseFormula('aLinhas', $sFormulaOriginal, $iColuna, $aLinhas);\n $evaluate = \"\\$oLinha->{$oColuna->o115_nomecoluna} = {$sFormula};\";\n ob_start();\n eval($evaluate);\n $sRetorno = ob_get_contents();\n ob_clean();\n if (strpos(strtolower($sRetorno), \"parse error\") > 0 || strpos(strtolower($sRetorno), \"undefined\" > 0)) {\n $sMsg = \"Linha {$iLinha} com erro no cadastro da formula<br>{$oColuna->o116_formula}\";\n throw new Exception($sMsg);\n\n }\n }\n }\n }\n }\n\n return $aLinhas;\n }", "function generar_report_turnosxfecha($fecha){\n\t$connect=@mysqli_connect(server,user,pass) or die('Database connect error');\n\t@mysqli_select_db($connect,database)or die('Database not found');\n\tmysqli_set_charset($connect, \"utf8mb4\");\n\t\n\t$con = \"SELECT u.dni_usu AS dni,concat(apellidos_usu,', ',nombres_usu) AS name,turno_hora,fecha_hora\n\t\t\tFROM usuario as u INNER JOIN horario as h\n\t\t\tON u.dni_usu=h.dni_usu WHERE activo_usu='si' AND fecha_hora = '$fecha' AND turno_hora <> '' AND turno_hora <> '--'\n\t\t\tORDER BY turno_hora\";\n\t$query = mysqli_query($connect,$con);\t\t\n\t$query2 = mysqli_query($connect,$con);\n\n\tif($lista= mysqli_fetch_array($query)){\n\t/* cabecera de la tabla del reporte */\n\t\t$fecha_front = orderfecha($fecha);\n\n\t\t$dia = substr($fecha_front,0,2);\n\t\t$mes = generar_mes(substr($fecha_front,3,2));\n\t\t$anio = substr($fecha_front,6,4);\n\t\t\n\t\t$report = \"\n\t\t<br/><center><h4 class='text-info'>Turnos asignados del día $dia de $mes de $anio </h4></center><br/>\n\t\t<table class='table table-bordered table-striped'>\n\t\t\t<thead>\n\t\t\t\t<tr class='alert alert-primary'>\n\t\t\t\t\t<th><center>N°</center></th>\n\t\t\t\t\t<th><center>Apellidos y Nombres</center></th>\n\t\t\t\t\t<th><center>Turno</center></th>\n\t\t\t\t</tr>\n\t\t\t</thead>\n\t\t\t<tbody>\";\n\t\t$i = 1;\n\t\twhile($row= mysqli_fetch_array($query2)){\n\t\t\t$dni = $row['dni'];\n\t\t\t$fecha = orderfecha($row['fecha_hora']);\n\t\t\t$names = $row['name'];\t\t\t\n\t\t\t$names = mb_convert_case($names, MB_CASE_UPPER, \"UTF-8\");\n\t\t\t$turno = $row['turno_hora'];\n\t\t\t$turno = mb_convert_case($turno, MB_CASE_UPPER, \"UTF-8\");\n\t\t\t\n\t\t\t$report = $report.\"\n\t\t\t<tr>\n\t\t\t\t<td><center>\".$i.\"</center></td>\n\t\t\t\t<td class='names'>\".$names.\"</td>\n\t\t\t\t<td><center>\".$turno.\"</center></td>\n\t\t\t</tr>\";\n\t\t\t\n\t\t\t$i++;\n\t\t}\n\t\t$report = $report.\"</tbody></table>\";\n\t}else{\n\t\t$report = \"\n\t\t<tr>\n\t\t\t<td colspan='4'><h5 class='text-info'>No hay Registros.</h5><p class='text-info'>No se registraron turnos en esta fecha.</p></td>\n\t\t</tr>\";\n\t}\t\t\t\t\n\treturn $report;\n}", "function consulta_registro_ventas_imprimir($w_anio, $w_mes, $w_anexo) {\n $sql = \"SELECT\n prosic_comprobante.codigo_comprobante\n , prosic_comprobante.emision_comprobante\n , prosic_comprobante.pago_comprobante\n , prosic_tipo_comprobante.sunat_tipo_comprobante\n , prosic_comprobante.serie_comprobante\n , prosic_comprobante.anio_dua_comprobante\n , prosic_comprobante.nro_comprobante\n , prosic_tipo_documento.sunat_tipo_documento\n , prosic_anexo.codigo_anexo\n , SUBSTRING(prosic_anexo.descripcion_anexo,1,20)\n , prosic_comprobante.afecto_comprobante\n , prosic_comprobante.inafecto_comprobante\n , prosic_comprobante.igv_comprobante\n , prosic_comprobante.total_comprobante \t\n , prosic_comprobante.id_operacion\n , prosic_comprobante.no_gravadas_igv\n , prosic_comprobante.inafecto_comprobante\n , prosic_comprobante.isc_comprobante\n , prosic_comprobante.otros_tributos\n , prosic_comprobante.total_comprobante\n , prosic_comprobante.tipo_cambio_comprobante\n , prosic_tipo_comprobante.nombre_tipo_comprobante\n , prosic_comprobante.id_moneda\n FROM\n prosic_comprobante\n INNER JOIN prosic_anexo ON (prosic_comprobante.id_anexo = prosic_anexo.id_anexo)\n INNER JOIN prosic_tipo_comprobante ON (prosic_comprobante.id_tipo_comprobante = prosic_tipo_comprobante.id_tipo_comprobante)\n INNER JOIN prosic_tipo_documento ON (prosic_anexo.id_tipo_documento = prosic_tipo_documento.id_tipo_documento)\n WHERE prosic_comprobante.id_subdiario=2\";\n if ($w_anio != '')$sql.=\" AND prosic_comprobante.id_anio=\" . $w_anio;\n if ($w_mes != '')$sql.=\" AND prosic_comprobante.id_mes=\" . $w_mes;\n if ($w_anexo != '')$sql.=\" AND prosic_comprobante.id_anexo='\" . $w_anexo . \"'\";\n $sql.=\" ORDER BY prosic_tipo_comprobante.sunat_tipo_comprobante,CAST(prosic_comprobante.codigo_comprobante AS UNSIGNED)\";\n $result = $this->Consulta_Mysql($sql);\n return $result;\n }", "function get_p2hp_lhp($ketua_tim) {\n return $this->db->select('*')\n ->from('tb_p2hp')\n //->join('tb_lhp', 'tb_lhp.fk_p2hp = tb_p2hp.id_p2hp')\n ->join('tb_penugasan', 'tb_penugasan.id_tugas = tb_p2hp.fk_tgs')\n ->join('tb_tim', 'tb_tim.id_tim = tb_penugasan.id_tim')\n ->where('ketua_tim', $ketua_tim)\n //->order_by('fk_pka', 'desc')\n ->get()->result();\n }", "public function get_mov_caja($fecha,$sucursal){\n\t$conectar= parent::conexion();\n\tparent::set_names(); \n\t$sql=\"select*from movimientos_caja where fecha=? and sucursal=? order by id_mov_caja DESC limit 1;\";\n\t$sql=$conectar->prepare($sql);\n\t$sql->bindValue(1,$fecha);\n\t$sql->bindValue(2,$sucursal);\n\t$sql->execute();\n\treturn $resultado= $sql->fetchAll(PDO::FETCH_ASSOC);\n}", "public function mostrarTemporada($temporada){\n return $resultado3=$this->conexion->query(\"SELECT equipo_local,equipo_visitante,puntos_local,puntos_visitante,temporada FROM partidos WHERE temporada=\".$temporada);\n }", "public function run()\n {\n DB::table('tgf_hora_dia')->insert([\n ['hor_inicio' => '07:15', 'hor_fin' => '08:00'], // 1\n ['hor_inicio' => '08:00', 'hor_fin' => '09:00'], // 2\n ['hor_inicio' => '09:00', 'hor_fin' => '10:00'], // 3\n ['hor_inicio' => '10:00', 'hor_fin' => '11:00'], // 4\n ['hor_inicio' => '11:00', 'hor_fin' => '12:00'], // 5\n ['hor_inicio' => '12:00', 'hor_fin' => '13:00'], // 6\n ['hor_inicio' => '13:00', 'hor_fin' => '14:00'], // 7\n ['hor_inicio' => '14:00', 'hor_fin' => '15:00'], // 8\n ['hor_inicio' => '15:00', 'hor_fin' => '16:00'], // 9\n ['hor_inicio' => '16:00', 'hor_fin' => '17:00'], // 10\n ['hor_inicio' => '17:00', 'hor_fin' => '18:00'], // 11\n ['hor_inicio' => '18:00', 'hor_fin' => '19:00'], // 12\n ['hor_inicio' => '19:00', 'hor_fin' => '20:00'], // 13\n ['hor_inicio' => '20:00', 'hor_fin' => '21:00'], // 14\n ['hor_inicio' => '21:00', 'hor_fin' => '22:00'] // 15\n ]);\n }", "public function get_datos_ventas_cobros_contado($fecha,$sucursal){\n\t$conectar= parent::conexion();\n\tparent::set_names();\n \n\t$fecha_corte = $fecha.\"%\";\n\t$sql=\"select c.n_factura,c.fecha_ingreso,c.n_recibo,c.paciente,u.usuario,c.total_factura,c.forma_cobro,c.monto_cobrado,c.saldo_credito,c.abonos_realizados from\ncorte_diario as c inner join usuarios as u on u.id_usuario=c.id_usuario where c.fecha_ingreso like ? and c.abonos_realizados='0' and c.tipo_venta='Contado' AND tipo_ingreso='Venta' and (sucursal_venta=? or sucursal_cobro=?);\";\n\t$sql=$conectar->prepare($sql);\n\t$sql->bindValue(1,$fecha_corte);\n\t$sql->bindValue(2,$sucursal);\n\t$sql->bindValue(3,$sucursal);\n\t$sql->execute();\n\treturn $resultado= $sql->fetchAll(PDO::FETCH_ASSOC);\n}", "function get_reptransban_ventas($fecha1, $fecha2, $usuario_id)\r {\r if($usuario_id == 0){\r $cadusuario = \"\";\r }else{\r $cadusuario = \" and v.usuario_id = \".$usuario_id.\" \";\r }\r $egresos = $this->db->query(\"\r select \r concat(v.venta_fecha, ' ', v.venta_hora) as fecha, concat('Venta(TRANS. BANCARIA) N°: ', v.venta_id, ', ', if(f.factura_numero>0, concat('Fact.: ',f.factura_numero, ', '),''), 'Cliente: ', c.cliente_nombre) as detalle,\r v.venta_total as ingreso, 0 as egreso,\r 0 as utilidad, 22 as tipo\r from\r venta v\r left join cliente c on v.cliente_id = c.cliente_id\r left join factura f on v.venta_id = f.venta_id\r where\r date(v.venta_fecha) >= '\".$fecha1.\"'\r and date(v.venta_fecha) <= '\".$fecha2.\"'\r and v.forma_id = 3\r \".$cadusuario.\" \r order by v.venta_fecha desc, v.venta_hora desc\r \")->result_array();\r \r return $egresos;\r }", "public function selectEmpresas() {\r\n return $this->getDb()->query(\"SELECT E.ID_EMPRESA,E.NOMBRE,E.TELEFONO,E.DIRECCION,concat(U.NOMBRE,concat(' ',U.APELLIDO)) \\\"USUARIO ENCARGADO\\\" ,E.ESTADO FROM EMPRESA E LEFT JOIN USUARIO U ON(E.ID_PERSONA_ENCARGADA=U.IDENTIFICADOR)\");\r\n }", "public function buscarhorario()\n\t{\n\t\t$query=\"SELECT * FROM horario WHERE idhorario=\".$this->idhorario;\n\n\t\t\n\t\t$resp=$this->db->consulta($query);\n\t\t\n\t\t//echo $total;\n\t\treturn $resp;\n\t}", "function selectAluByTurdisc($turma,$disc){\n\t\t$link = openDb();\n\t\t$sql =\"SELECT alu_matricula, alu_nome, not_valor, not_trime, disc_nome, turma.tur_id FROM (((notas n INNER JOIN aluno a ON n.alu_id=a.alu_id) INNER JOIN disciplina ds ON ds.disc_id=n.disc_id AND ds.disc_id = '$disc') INNER JOIN turma ON turma.tur_id=n.tur_id AND n.tur_id='$turma')\";\n\t\tmysqli_set_charset($link,\"utf8\");\n\t\t$query = $link -> query($sql);\n\t\t$_SESSION['nTuplas'] = mysqli_num_rows($query)/3;\n\t\t$retorno = array();\n\t\t$x \t =0;\n\t\t$y \t =0;\n\t\t$cont=1;\n\t\twhile ($result=mysqli_fetch_array($query)) {\n\t\t\tif ($cont==1) {\n\t\t\t\t$retorno[$x][$y]=$result['alu_matricula'];\n\t\t\t\t$y+=1;\n\t\t\t\t$retorno[$x][$y]=$result['alu_nome'];\n\t\t\t\t/*$y+=1;\n\t\t\t\t$retorno[$x][$y]=$result['disc_nome'];*/\n\t\t\t\t$y+=1;\n\t\t\t\t$retorno[$x][$y]=$result['not_valor'];\n\t\t\t}\n\t\t\tif ($cont==2) {\n\t\t\t\t$y+=1;\n\t\t\t\t$retorno[$x][$y]=$result['not_valor'];\n\t\t\t}\n\t\t\tif ($cont==3) {\n\t\t\t\t$y+=1;\n\t\t\t\t$retorno[$x][$y]=$result['not_valor'];\n\t\t\t\t$y+=1;\n\t\t\t\t//if(!$retorno[$x][2] == NULL && !$retorno[$x][3] == NULL && !$retorno[$x][4] == NULL){\n\t\t\t\t\t$retorno[$x][$y]=arredonda(($retorno[$x][2]+$retorno[$x][3]+$retorno[$x][4])/3);\n\t\t\t\t/*}else{\n\t\t\t\t\t$retorno[$x][$y] = NULL;\n\t\t\t\t}*/\n\t\t\t\t$x+=1;\n\t\t\t\t$y=0;\n\t\t\t\t$cont=0;\n\t\t\t}\n\t\t\t$cont+=1;\n\t\t}\n\t\t$link -> close();\n\t\treturn $retorno;\n\t}", "public function homechart()\n\t{\n\t\t$query3 = \"SELECT\n\t\tSUM(IF(MONTH(tanggal) = 1, b.jual, 0)) AS Jan,\n\t\tSUM(IF(MONTH(tanggal) = 2, b.jual, 0)) AS Feb,\n\t\tSUM(IF(MONTH(tanggal) = 3, b.jual, 0)) AS Mar,\n\t\tSUM(IF(MONTH(tanggal) = 4, b.jual, 0)) AS Apr,\n\t\tSUM(IF(MONTH(tanggal) = 5, b.jual, 0)) AS May,\n\t\tSUM(IF(MONTH(tanggal) = 6, b.jual, 0)) AS Jun,\n\t\tSUM(IF(MONTH(tanggal) = 7, b.jual, 0)) AS Jul,\n\t\tSUM(IF(MONTH(tanggal) = 8, b.jual, 0)) AS Aug,\n\t\tSUM(IF(MONTH(tanggal) = 9, b.jual, 0)) AS Sep,\n\t\tSUM(IF(MONTH(tanggal) = 10, b.jual, 0)) AS Oct,\n\t\tSUM(IF(MONTH(tanggal) = 11, b.jual, 0)) AS Nov,\n\t\tSUM(IF(MONTH(tanggal) = 12, b.jual, 0)) AS 'Dec'\n\t\tFROM\n\t\tfaktur a \n\t\tjoin detail_faktur b on a.id_faktur=b.id_faktur\";\n\t\t//echo $query3;\n\t\t$query = $this->db->query($query3);\n\t\treturn $query->result();\n\t}", "function titulo_janela() {\n\n\t$sql_comando = \"SELECT * FROM ce_config WHERE Comando='Titulo_Janela'\";\n\t$result_comando = mysql_query($sql_comando);\n\t$linha_comando = mysql_fetch_assoc($result_comando);\n\treturn $linha_comando[\"exec\"];\n}", "public function getTareas_reporte2($lista_solictudes,$fecha_mes_contratos)\n{\n\t$this->Solicitudes();\n\t$obj=new Conn();\n\t$sql=\"select ta.idso as idso,ta.idtareas as tarea,usuarios.name as tecnico_tarea,ta.tiempo_efectivo as tiempo_efectivo,ta.valor_facturar as tarea_valor_facturar, ta.tiempo_facturar as tarea_tiempo_facturar,TIMESTAMPDIFF (MINUTE, Timestamp\n\t\t(ta.fecha_inicio, ta.hora_inicio ) ,Timestamp(ta.fecha_inicio,ta.hora_fin)) as tiempo_real,ca.descripcion as categoria,se.Sede as sede,ta.fecha_inicio as fecha_inicio,ta.hora_inicio as hora_inicio,ta.hora_fin as hora_fin,ta.observaciones as detalles from tbltareas ta inner join tblcategoria ca on ta.idcategoria=ca.categoriaid\n\tinner join sec_users usuarios on usuarios.login=ta.propietario\n\tinner join tblsolicitudes so on so.id = ta.idso\n\tinner join tblfecha_contratos fechac on fechac.idcontra = so.idcontra\n\tinner join tblsede se on se.id=ta.idsitio \n\twhere ta.idso in($lista_solictudes) and date_format(ta.fecha_inicio,'%Y-%m') = date_format('$fecha_mes_contratos','%Y-%m')\n\tgroup by ta.idtareas\";\n\t$this->tareas_reporte=$obj->megaShot($sql);\n\t$obj=\"\";\n\treturn $this->tareas_reporte;\n}", "private function ultima_salida($codart,$deposito){\n\n $query1 = (new \\yii\\db\\Query())\n ->select(\"max(PE_fecha) as fecha\")\n ->from('valefar')\n ->join('INNER JOIN', 'consmed', 'consmed.PE_nroval = valefar.va_nrovale')\n ->where(['va_codart' => $codart,'VA_DEPOSITO' => $deposito]);\n\n $query2 = (new \\yii\\db\\Query())\n ->select(\"max(am_fecha) as fecha\")\n ->from('ambu_ren')\n ->join('INNER JOIN', 'ambu_enc', 'ambu_enc.am_numvale = ambu_enc.am_numvale')\n ->where(['am_codart' => $codart,'ambu_enc.AM_DEPOSITO' => $deposito]);\n\n\n $unionQuery = (new \\yii\\db\\Query())\n ->select(\"max(fecha) as ult_fecha\")\n ->from(['salidas' => $query1->union($query2)]);\n \n \n return $unionQuery->one()['ult_fecha'];\n\n }", "public function index()\n {\n \n \n // FALTA AGREGAR CITA -> AGENDA\n $res= DB::table('paciente_obra_sociales','pacientes', 'obra_social')\n ->join('pacientes','pacientes.id', '=', 'paciente_obra_sociales.paciente_id')\n \n ->join('obra_social','obra_social.id', '=', 'paciente_obra_sociales.obra_social_id')\n ->join('obra_social as coseguro','coseguro.id', '=', 'paciente_obra_sociales.coseguro_id')\n // ->join('users', 'users.id', '=', 'pacientes.usuario_alta_id')\n ->select(\n 'paciente_obra_sociales.id',\n 'obra_social_numero',\n 'barra',\n 'pacientes.nombre as paciente_nombre',\n 'pacientes.apellido as paciente_apellido',\n 'pacientes.dni as paciente_dni',\n 'obra_social.id as obra_social_id',\n 'obra_social.nombre as obra_social_nombre', \n 'obra_social.tiene_distribucion',\n 'obra_social.es_coseguro',\n 'obra_social.es_habilitada',\n 'coseguro.nombre as coseguro_nombre',\n 'coseguro.id as coseguro_id' \n )\n ->get();\n \n return $this->showAll($res);\n }", "public function getAllDate($datoDesde,$datoHasta){\n $sql = \"SELECT Id, Proveedor, Concepto, FORMAT(Monto, 2) AS Monto, Revisado, DATE_FORMAT(FechaSolicitud,'%d/%m/%Y') AS FechaSolicitud, AutorizadoPago, DATE_FORMAT(FechaAutorizado,'%d/%m/%Y') AS FechaAutorizado, estado, Comentario, ComentarioCapt, DATE_FORMAT(FechaPago,'%d/%m/%Y') AS FechaPago From \" .self::$tablename. \" WHERE FechaSolicitud BETWEEN '{$datoDesde}' AND '{$datoHasta}' ORDER BY Id DESC\";\n return Executor::doit($sql);\n }", "function getEstadisticaResumen() {\n\t\tglobal $mdb2;\n\t\tglobal $log;\n\t\tglobal $current_usuario_id;\n\t\tglobal $usr;\n\n\t\t/* TEMPLATE DEL GRAFICO */\n\t\t$T =& new Template_PHPLIB(($this->extra[\"imprimir\"])?REP_PATH_PRINTTEMPLATES:REP_PATH_TABLETEMPLATES);\n\t\t$T->setFile('tpl_tabla', 'rendimiento_resumen.tpl');\n\t\t$T->setBlock('tpl_tabla', 'BLOQUE_TITULO_HORARIOS', 'bloque_titulo_horarios');\n\t\t$T->setBlock('tpl_tabla', 'LISTA_PASOS', 'lista_pasos');\n\t\t$T->setBlock('tpl_tabla', 'BLOQUE_TABLA', 'bloque_tabla');\n\n\t\t$horarios = array($usr->getHorario($this->horario_id));\n\t\tif ($this->horario_id != 0) {\n\t\t\t$horarios[] = $usr->getHorario(0);\n\t\t\t$horarios[($this->horario_id*-1)] = new Horario(($this->horario_id*-1));\n\t\t\t$horarios[($this->horario_id*-1)]->nombre = \"Horario Inhabil\";\n\t\t}\n\n\t\t$orden = 1;\n\t\t$T->setVar('bloque_titulo_horarios', '');\n\t\tforeach ($horarios as $horario) {\n\t\t\t$T->setVar('lista_pasos', '');\n\n\t\t\t$sql = \"SELECT * FROM reporte.rendimiento_resumen_global(\".\n\t\t\t\t\tpg_escape_string($current_usuario_id).\",\".\n\t\t\t\t\tpg_escape_string($this->objetivo_id).\", \".\n\t\t\t\t\tpg_escape_string($horario->horario_id).\",' \".\n\t\t\t\t\tpg_escape_string($this->timestamp->getInicioPeriodo()).\"', '\".\n\t\t\t\t\tpg_escape_string($this->timestamp->getTerminoPeriodo()).\"')\";\n//\t\t\t\t\tprint $sql;\n\t\t\t$res =& $mdb2->query($sql);\n\t\t\tif (MDB2::isError($res)) {\n\t\t\t\t$log->setError($sql, $res->userinfo);\n\t\t\t\texit();\n\t\t\t}\n\t\t\t$row = $res->fetchRow();\n\t\t\t$dom = new DomDocument();\n\t\t\t$dom->preserveWhiteSpace = false;\n\t\t\t$dom->loadXML($row[\"rendimiento_resumen_global\"]);\n\t\t\t$xpath = new DOMXpath($dom);\n\t\t\tunset($row[\"rendimiento_resumen_global\"]);\n\n\t\t\t$conf_objetivo = $xpath->query('/atentus/resultados/propiedades/objetivos/objetivo')->item(0);\n\t\t\t$conf_pasos = $xpath->query(\"paso[@visible=1]\", $conf_objetivo);\n\n\t\t\t/* SI NO HAY DATOS MOSTRAR MENSAJE */\n\t\t\tif ($horario->horario_id == \"0\" and $xpath->query('//detalle[@paso_orden]/datos/dato')->length == 0) {\n\t\t\t\t$this->resultado = $this->__generarContenedorSinDatos();\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif(count($horarios) > 1) {\n\t\t\t\t$T->setVar('__item_orden', $this->extra[\"item_orden\"]);\n\t\t\t\t$T->setVar('__horario_orden', $orden);\n\t\t\t\t$T->setVar('__horario_nombre', $horario->nombre);\n\t\t\t\t$T->parse('bloque_titulo_horarios', 'BLOQUE_TITULO_HORARIOS', false);\n\t\t\t}\n\n\t\t\t/* DATOS DE LA TABLA */\n\t\t\t$linea = 1;\n\t\t\tforeach($conf_pasos as $conf_paso) {\n\t\t\t\t$tag_dato = $xpath->query('//detalle[@paso_orden='.$conf_paso->getAttribute('paso_orden').']/datos/dato')->item(0);\n\t\t\t\tif ($tag_dato == null) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\t$T->setVar('__print_class', ($linea % 2 == 0)?\"celdaIteracion2\":\"celdaIteracion1\");\n\t\t\t\t$T->setVar('__class', ($linea % 2 == 0)?\"celdanegra15\":\"celdanegra10\");\n\t\t\t\t$T->setVar('__paso_nombre', $conf_paso->getAttribute('nombre'));\n\t\t\t\t$T->setVar('__paso_minimo', number_format($tag_dato->getAttribute('tiempo_min'), 3, ',', ''));\n\t\t\t\t$T->setVar('__paso_maximo', number_format($tag_dato->getAttribute('tiempo_max'), 3, ',', ''));\n\t\t\t\t$T->setVar('__paso_promedio', number_format($tag_dato->getAttribute('tiempo_prom'), 3, ',', ''));\n\t\t\t\t$T->parse('lista_pasos', 'LISTA_PASOS', true);\n\t\t\t\t$linea++;\n\t\t\t}\n\t\t\t$T->parse('bloque_tabla', 'BLOQUE_TABLA', true);\n\t\t\t$orden++;\n\t\t}\n\t\t$this->tiempo_expiracion = (strtotime($xpath->query(\"//fecha_expiracion\")->item(0)->nodeValue) - strtotime($xpath->query(\"//fecha\")->item(0)->nodeValue));\n\t\t$this->resultado =$T->parse('out', 'tpl_tabla');\n\t}", "public function SelecionaTudo() {\n try {\n //Monta a Query\n $query = Doctrine_Query::create()\n ->select(\"ws.*, MONTHNAME(ws.data) mes, YEAR(ws.data) ano\")\n ->from($this->table_alias)\n ->orderBy(\"ws.data DESC\")\n ->offset(1)\n ->limit(6)\n ->execute()\n ->toArray();\n\n return $query;\n } catch (Doctrine_Exception $e) {\n echo $e->getMessage();\n }\n }", "function getScheduleEntries($ob=0,$masclifor)\n {\n global $gTables;\n switch ($ob) {\n case 1:\n $orderby = \"id_tesdoc_ref, expiry DESC, codice, caucon, datreg, numdoc ASC \";\n break;\n case 2:\n $orderby = \"ragso1, id_tesdoc_ref,caucon, datreg, numdoc ASC \";\n break;\n case 3:\n $orderby = \"ragso1 DESC, id_tesdoc_ref,caucon, datreg, numdoc ASC \";\n break;\n default:\n $orderby = \"id_tesdoc_ref, expiry, codice, caucon, datreg, numdoc ASC \";\n }\n $select = \"*, \".$gTables['tesmov'].\".*, \".$gTables['clfoco'].\".descri AS ragsoc\";\n if ($this->target==0 ) {\n $where = $gTables['clfoco'].\".codice LIKE '$masclifor%' \";\n } else {\n $where = $gTables['clfoco'].\".codice = \".$this->target;\n }\n $table = $gTables['paymov'].\" LEFT JOIN \".$gTables['rigmoc'].\" ON (\".$gTables['paymov'].\".id_rigmoc_pay = \".$gTables['rigmoc'].\".id_rig OR \".$gTables['paymov'].\".id_rigmoc_doc = \".$gTables['rigmoc'].\".id_rig )\"\n .\"LEFT JOIN \".$gTables['tesmov'].\" ON \".$gTables['rigmoc'].\".id_tes = \".$gTables['tesmov'].\".id_tes \"\n .\"LEFT JOIN \".$gTables['clfoco'].\" ON \".$gTables['clfoco'].\".codice = \".$gTables['rigmoc'].\".codcon \"\n .\"LEFT JOIN \".$gTables['anagra'].\" ON \".$gTables['anagra'].\".id = \".$gTables['clfoco'].\".id_anagra \";\n \n $this->Entries=array();\n $rs=gaz_dbi_dyn_query ($select, $table, $where, $orderby);\n while ($r = gaz_dbi_fetch_array($rs)) {\n $this->Entries[] = $r;\n }\n }", "function calc_chegada($partida,$tempo){\n \n \n $aux=split(\":\",$partida);\n\t\t$p=mktime($aux[0],$aux[1],$aux[2]);\n\n\t\t$aux=split(\":\",$tempo);\n\t\t$t=$aux[0]*3600+$aux[1]*60+$aux[2];\n\t\t\n\t\t$c=strftime(\"%H:%M:%S\",$p+$t);\n\t\t//echo \"$p<br>\";\n\t\t//echo \"$t<br>\";\n // echo $t+$p . \"<br>\";\n //echo \"$c<br>\";\n\t\t\n\t\treturn $c;\n }", "public function calcular_horas_jornadas($id_membresia){\n \n $fecha = new MongoDB\\BSON\\UTCDateTime();\n \n $res_jornadas = $this->mongo_db->order_by(array('_id' => 'ASC'))->where(array('eliminado'=>false,'status'=>true,'id_membresia'=>$id_membresia))->get(\"jornadas\");\n $cont = 0;\n $e = new DateTime('00:00');\n $f = clone $e;\n foreach ($res_jornadas as $clave_jornada => $valor_jornada) {\n $fecha_inicio = $valor_jornada[\"fecha_hora_inicio\"]->toDateTime();\n $fecha_hora_ini = $fecha_inicio->format('Y-m-d H:i:s');\n \n if((isset($valor_jornada[\"fecha_hora_fin\"]))&&($valor_jornada[\"fecha_hora_fin\"]!=\"Sin salir\")){\n $fecha_fin = $valor_jornada[\"fecha_hora_fin\"]->toDateTime();\n $fecha_hora_fini = $fecha_fin->format('Y-m-d H:i:s');\n }else{\n $fecha_fin = \"\";\n $fecha_hora_fini = \"\";\n }\n \n $fecha1 = new DateTime($fecha_hora_ini);//fecha inicial\n $fecha2 = new DateTime($fecha_hora_fini);//fecha de cierre\n \n $intervalo_siguiente=$fecha1->diff($fecha2);\n $e->add($intervalo_siguiente);\n $intervalo = $f->diff($e);\n //$intervalo=$fecha1->diff($fecha2);\n /*var_dump($fecha1);\n echo \"</br>\";\n var_dump($fecha2);\n echo \"</br>\";\n var_dump($intervalo_siguiente->format('%H:%i:%s'));\n echo \"</br>\";\n var_dump($intervalo->format('%H:%i:%s'));\n echo \"</br></br>\";*/\n $cont++;\n\n }\n if(isset($intervalo)){\n $horas_transcurridas = $intervalo->format('%H:%i:%s');\n }else{\n $horas_transcurridas = \"00:00:00\";\n }\n //--\n //var_dump($res_jornadas);die('');\n //--\n \n //var_dump($horas_transcurridas);\n return $horas_transcurridas; \n }", "function getListEpargneDuMois($id_emp=null,$empSigle,$dateDebut,$dateFin){\n global $dbHandler;\n $db = $dbHandler->openConnection();\n\n $date_debut = php2pg($dateDebut);\n $date_fin = php2pg($dateFin);\n\n if ($empSigle != 'SOD'){\n $sql = \"SELECT '000000000'||SUBSTRING(b.sigle FROM 1 FOR 3)||rpad(a.matricule,7,' ') AS col1_value,' *FZYPR ' AS col2_value,'000174701EG'||REPLACE(TO_CHAR(c.cpt_from, '99999999'),' ','0') AS col3_value,' ' AS col4_value, '+'||REPLACE(TO_CHAR(ROUND((c.montant*c.nb_periode)), '99999999'),' ','0')||'XOF0+000000000XOF0'||DATE(c.date_prem_exe)||DATE(c.date_fin) AS col5_value, ' 00 00000 000000' AS col6_value, ' +'||lpad(cast(c.nb_periode as text),3, '0')||'+'||REPLACE(TO_CHAR(ROUND(c.montant), '999999'),' ','0')||'XOF0+'||REPLACE(TO_CHAR(ROUND((c.montant*c.nb_periode)), '99999999'),' ','0')||'XOF0' AS col7_value, ' +00000+000000000XOF0' AS col8_value, ' +000000000XOF0+000000000XOF0' AS col9_value, ' +000' AS col10_value, ' +000000000000000XOF0' AS col11_value, ' +0000000XOF0 ' AS col12_value\n FROM ad_cli a INNER JOIN adsys_employeur b ON a.pp_partenaire = b.id INNER JOIN ad_cpt d ON a.id_client = d.id_titulaire INNER JOIN ad_ord_perm c ON c.cpt_from = d.id_cpte\n WHERE c.type_transfert IN (1,2) AND c.date_prem_exe BETWEEN DATE('$date_debut') AND DATE('$date_fin')\"; //TO_CHAR(DATE(c.date_prem_exe),'YYYY')||\n }\n else{\n $sql = \"SELECT '000000000'||SUBSTRING(b.sigle FROM 1 FOR 3)||rpad(a.matricule,7,' ') AS col1_value,' *FZYEL ' AS col2_value, '0001606C'||REPLACE(TO_CHAR(row_number() over (), '999999'),' ','0')||DATE(c.date_prem_exe)||DATE(c.date_fin) AS col3_value, ' M +000000000000 +' AS col4_value, REPLACE(TO_CHAR(ROUND(c.montant), '99999999'),' ','0')||'000 +000000000000 00 ' AS col5_value\n FROM ad_cli a INNER JOIN adsys_employeur b ON a.pp_partenaire = b.id INNER JOIN ad_cpt d ON a.id_client = d.id_titulaire INNER JOIN ad_ord_perm c ON c.cpt_from = d.id_cpte\n WHERE c.type_transfert IN (1,2) AND c.date_prem_exe BETWEEN DATE('$date_debut') AND DATE('$date_fin')\";\n }\n if ($id_emp != null){\n $sql .= \" AND b.id = \".$id_emp;\n }\n $result = $db->query($sql);\n\n if (DB::isError($result)) {\n $dbHandler->closeConnection(false);\n Signalerreur(__FILE__,__LINE__,__FUNCTION__,_(\"DB\").\": \".$result->getMessage());\n }\n\n $listEpargne = array();\n $count = 0;\n $nombreCols = $result->numCols();\n\n while ($row = $result->fetchrow(DB_FETCHMODE_ASSOC)){\n $count ++;\n $listEpargne[$count]=$row;\n }\n $listEpargne['nbrCols'] = $nombreCols;\n\n $dbHandler->closeConnection(true);\n return $listEpargne;\n}", "public function HRhijos($p) {\n $sql = \"SELECT d.nur,d.referencia,d.cite_original,IF(s.oficial>0,'Oficial','Copia') as oficial,\n DATE_FORMAT(s.fecha_recepcion,'%d-%m-%Y %H:%i:%s') as fecha_recepcion\n FROM (select hijo,fecha,id_seguimiento from agrupaciones where padre='$p') as x, documentos d,seguimiento s \n WHERE d.nur=x.hijo\n AND x.id_seguimiento=s.id\n AND d.original='1'\"; //important\n return db::query(Database::SELECT, $sql)->execute();\n }", "public function flistadotabulador($parametro1,$parametro2){\n\t\t $this->fconectar();\n\t\t if($parametro1!=\"\")//por codigo\n\t\t\t$sql = \"SELECT tabulador.idtabulador , precio_total_tab from tabulador WHERE (idtabulador='$parametro1') \";\n\t\t\t\n\t\t\t$sql1=\"select idtabulador, desc_ciud as nombre_ciudad_origen, desc_parr as nombre_parroquia_origen, desc_muni as nombre_municipio_origen, desc_esta as nombre_estado_origen, desc_pais as nombre_pais_origen\n\t\t\tfrom tabulador, ciudad, parroquia, municipio, estado, pais where (idtabulador='$parametro1' and tabulador.idciudad_origen_tabulador=ciudad.idciudad and ciudad.idparroquia=parroquia.idparroquia and parroquia.idmunicipio=municipio.idmunicipio and municipio.idestado=estado.idestado and estado.idpais=pais.idpais)\";\n\t\t\t\n\t\t\t$sql2=\"select idtabulador, desc_ciud as nombre_ciudad_destino, desc_parr as nombre_parroquia_destino, desc_muni as nombre_municipio_destino, desc_esta as nombre_estado_destino, desc_pais as nombre_pais_destino\n\t\t\tfrom tabulador, ciudad, parroquia, municipio, estado, pais where (idtabulador='$parametro1' and tabulador.idciudad_destino_tabulador=ciudad.idciudad and ciudad.idparroquia=parroquia.idparroquia and parroquia.idmunicipio=municipio.idmunicipio and municipio.idestado=estado.idestado and estado.idpais=pais.idpais)\";\n\n\t\t\t\n\t\t if($parametro2!=\"\")//por nombre\n\t\t\t$sql = \"SELECT tabulador.idtabulador , (SELECT CONCAT_WS(' ', desc_esta, ' ') from estado WHERE tabulador.idciudad_origen_tabulador=estado.idestado )\n\t\t\tAS nombre_estado_origen, (SELECT CONCAT_WS(' ', desc_esta, ' ') from estado WHERE tabulador.idciudad_destino_tabulador=estado.idestado )\n\t\t\tAS nombre_estado_destino , precio_total_tab from tabulador, estado WHERE (precio_total_tab='$parametro2' and tabulador.idciudad_origen_tabulador=estado.idestado) \";\n\t\t\t\n\t\t $cursor=$this->ffiltro($sql);\n\t\t $cursor1=$this->ffiltro($sql1);\n\t\t $cursor2=$this->ffiltro($sql2);\n\t\t $contador = 0;\n\t\t $encontrado=false;\n\t\t \n\t\t if ($laRow=$this->fproximo($cursor)){\n\t\t\t\tDO\n\t\t\t\t{\n\t\t\t\t $filas [$contador][1] = $laRow[\"idtabulador\"];\n\t\t\t\t $filas [$contador][2] = $laRow[\"precio_total_tab\"];\t\t\t\t \n\t\t\t\t}\n\t\t\t\tWHILE ($laRow=$this->fproximo($cursor));\n\t\t\t\tif ($laRow1=$this->fproximo($cursor1)){\n\t\t\t\tDO\n\t\t\t\t{\n\t\t\t\t $filas [$contador][3] = $laRow1[\"nombre_pais_origen\"];\n\t\t\t\t $filas [$contador][4] = $laRow1[\"nombre_estado_origen\"];\n\t\t\t\t $filas [$contador][5] = $laRow1[\"nombre_municipio_origen\"];\n\t\t\t\t $filas [$contador][6] = $laRow1[\"nombre_parroquia_origen\"];\n\t\t\t\t $filas [$contador][7] = $laRow1[\"nombre_ciudad_origen\"];\n\t\t\t\t}\n\t\t\t\tWHILE ($laRow1=$this->fproximo($cursor1));\n\t\t\t\tif ($laRow2=$this->fproximo($cursor2)){\n\t\t\t\tDO\n\t\t\t\t{\n\t\t\t\t $filas [$contador][8] = $laRow2[\"nombre_pais_destino\"];\n\t\t\t\t $filas [$contador][9] = $laRow2[\"nombre_estado_destino\"];\n\t\t\t\t $filas [$contador][10] = $laRow2[\"nombre_municipio_destino\"];\n\t\t\t\t $filas [$contador][11] = $laRow2[\"nombre_parroquia_destino\"];\n\t\t\t\t $filas [$contador][12] = $laRow2[\"nombre_ciudad_destino\"];\n\t\t\t\t $contador++;\n\t\t\t\t}\n\t\t\t\tWHILE ($laRow2=$this->fproximo($cursor2));\n\t\t }\n\t\t\t\t$encontrado=true;\n\t\t }\n\t\t if($encontrado)\n\t\t\t\treturn $filas;\n\t\t else\n\t\t\t\treturn 99;\t \n\t\t\t\n\t\t\t$this->fcierrafiltro($cursor);\n\t\t\t$this->fdesconectar();\n\t\t}\n\t\t\t\n }", "function mostrar_extras($dia1, $mes1, $anho1, $dia2, $mes2, $anho2)\r\n\t{\r\n\t\t$Informacion = array();\r\n\t\t//Establecemos la consulta para determinar si el usuario\r\n\t\t//ha ingresado la contrasenha correctamente.\r\n\t\t\t$Consulta = '\r\n\t\t\t\t\t\t\t\tselect usu.id_usuario, id_extra, contrasena, cod_empleado, nombre, hora, inicio, fin, fin_real,\r\n\t\t\t\t\t\t\t\tfecha, total_h, total_m, id_usu_adm\r\n\t\t\t\t\t\t\t\tfrom usuario usu, extra ext\r\n\t\t\t\t\t\t\t\twhere usu.id_usuario = ext.id_usuario\r\n\t\t\t\t\t\t\t\tand fecha >= \"'.$anho1.'-'.$mes1.'-'.$dia1.'\"\r\n\t\t\t\t\t\t\t\tand fecha <= \"'.$anho2.'-'.$mes2.'-'.$dia2.'\"\r\n\t\t\t\t\t\t\t\tand usu.id_grupo = \"'.$this->session->userdata[\"id_grupo\"].'\"\r\n\t\t\t\t\t\t\t\torder by usu.id_usuario asc, fecha asc\r\n\t\t\t';\r\n\r\n\t\t//Ejecutamos la consulta.\r\n\t\t$Resultado = $this->db->query($Consulta);\r\n\t\t//Veririficamos si obtuvimos informacion.\r\n\t\tif(0 < $Resultado->num_rows())\r\n\t\t{\r\n\t\t\treturn $Resultado->result_array();\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\treturn array();\r\n\t\t}\r\n\t}", "public function show($fechaDia, $idMedico)\n //SELECT * FROM `turnos` WHERE `id_user` = 1 and `dia_turno` = '2020-08-27'\n {\n try {\n\n $horasMostrar = [];\n $turno = Turno::where(\n [\n 'id_medico' => $idMedico,\n 'dia_turno' => $fechaDia\n ]\n )\n ->orderBy('hora_inicio', 'asc')\n ->get(); //consulto si tiene un turno \n\n //SELECT * FROM `horas` WHERE `hora_inicio_cita` BETWEEN '06:00:00' AND '10:00:00'\n for ($i = 0; $i < count($turno); $i++) {\n\n $turnoInicia = $turno[$i]->hora_inicio;\n $turnoFin = $turno[$i]->hora_fin;\n\n $filtroHoras = Hora::whereBetween('hora_inicio_cita', [$turnoInicia, $turnoFin])->get();\n for ($j = 0; $j < count($filtroHoras); $j++) {\n array_push($horasMostrar, $filtroHoras[$j]);\n }\n }\n\n return response()->json($horasMostrar);\n } catch (Throwable $th) {\n return response()->json(false);\n }\n }", "function Hora_prog($valor){\t\n\n return date(\"H:i\", strtotime($valor));\n\n}", "function ponerHorasTaller(){\n // y precios 15 1h, 21, 1.5h, 31 2h.\n $sql=\"SELECT id,precio_trimestre FROM casal_talleres WHERE id_curso=4 AND tipo_taller='Professional'\";\n $result=$this->db->query($sql)->result();\n foreach($result as $k=>$v){\n $horasSesion=0;\n $id=$v->id;\n if($v->precio_trimestre=='21') $horasSesion=1.5*1100;\n if($v->precio_trimestre=='31') $horasSesion=2*1100;\n if($v->precio_trimestre=='15') $horasSesion=1*1100;\n $sql=\"UPDATE casal_talleres SET horas_taller_T1='$horasSesion', horas_taller_T2='$horasSesion', horas_taller_T3='$horasSesion'WHERE id='$id'\";\n $this->db->query($sql);\n }\n }", "function getEspecialHacienda() {\n\t\tglobal $mdb2;\n\t\tglobal $log;\n\t\tglobal $current_usuario_id;\n\t\tglobal $meses_anno;\n\n\t\t$objetivo = new ConfigEspecial($this->objetivo_id);\n\t\t$titulo=$objetivo->__reporte['Titulo']->titulo;\n\t\t$footer_text=$objetivo->__reporte['Footer'];\n\t\t//SETEO DE FECHA DE REPORTE\n\t\t$fecha_titulo_inicio=substr($this->timestamp->getInicioPeriodo(), 0,10);\n\t\t$fecha_titulo_termino=substr($this->timestamp->getTerminoPeriodo(), 0, 10);\n\t\t$fecha_titulo_termino = strtotime($fecha_titulo_termino);\n\t\t$fecha_titulo_termino = strtotime('-1 day', $fecha_titulo_termino);\n\t\t$fecha_titulo_termino = date('Y-m-d', $fecha_titulo_termino);\n\n\t\t$date=explode('-', $fecha_titulo_inicio);\n\t\t$dateTermino=explode('-', $fecha_titulo_termino);\n\t\t\n\t\tforeach ($meses_anno as $key_mes => $value_mes) {\n\t\t\tif(intval($date[1])==$key_mes){\n\t\t\t\t$mes= $value_mes;\n\t\t\t}\n\t\t\tif(intval($dateTermino[1])==$key_mes){\n\t\t\t\t$mes_termino=$value_mes;\n\t\t\t}\n\t\t}\n\t\t$date=$date[2].' de '.$mes;\n\t\t$dateTermino=$dateTermino[2].' de '.$mes_termino.' del '.$dateTermino[0];\n\t\t$date= 'Periodo del '.$date.' al\t'.$dateTermino;\n\n\t\t$T =& new Template_PHPLIB(REP_PATH_PRINTTEMPLATES);\n\t\t$T->setFile('tpl_contenido', 'especial_hacienda.tpl');\n\t\t\n\t\t$T->setBlock('tpl_contenido', 'BLOQUE_PASOS', 'bloque_pasos');\n\t\t$T->setBlock('tpl_contenido', 'BLOQUE_NODOS_NOMBRE', 'bloque_nodos_nombre');\n\t\tif($objetivo->tipo_reporte!=1){\n\t\t\t$T->setBlock('tpl_contenido', 'BLOQUE_DESCRIPCIONES', 'bloque_descripciones');\n\t\t\t$T->setBlock('tpl_contenido', 'BLOQUE_CONSOLIDADO', 'bloque_consolidado');\n\t\t}\n\t\t$T->setBlock('tpl_contenido', 'BLOQUE_NODOS', 'bloque_nodos');\n\t\t$T->setBlock('tpl_contenido', 'BLOQUE_OBJETIVO', 'bloque_objetivo');\n\t\t\n\n\t\t//SETEO DE FECHA DE REPORTE\n\t\t$T->setVar('__fecha',$date);\n\t\t$T->setVar('__footer_text',$footer_text);\n\n\t\t//SETEO DE TITULO DE REPORTE\n\t\t$T->setVar('__titulo_principal',$titulo);\n\n\t\t$res = '';\n\t\tif($objetivo->tipo_reporte!=1){\n\t\t\t$T->setVar('bloque_descripciones', '');\n\t\t\tforeach ($objetivo->__reporte['Consolidado'] as $key => $descripcion) {\n\t\t\t\t$descripciones='<tr><td class=\"txtNegro13\" style=\"font-weight: bold;\" colspan=\"3\">'.'('.$key.')'.$descripcion.'</td></tr>';\n\t\t\t\tif($key==0){\n\t\t\t\t\t$T->setVar('__resumen',$descripcion);\n\t\t\t\t\t$res = $descripcion;\n\t\t\t\t}else{\n\t\t\t\t\t$T->setVar('__descripciones',$descripciones);\n\t\t\t\t\t$T->parse('bloque_descripciones', 'BLOQUE_DESCRIPCIONES', true);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t$T->setVar('bloque_objetivo', '');\n\t\tif($objetivo->tipo_reporte!=1){\n\t\t\t$T->setVar('bloque_consolidado', '');\n\t\t\t$tabla_consolidado='<div class=\"pagebreak\">\n\t\t<table width=\"100%\">\n\t\t\t<tr>\n\t\t\t\t<div style=\"font-family: Calibri;font-size:x-large; text-align: left; font-weight: bold;\">Resumen</div>\n\t\t\t\t<hr color=\"black\" size=3>\n\t\t\t\t<div style=\"font-family: Calibri; text-align: left; font-weight: bold;\">'.$date.'</div>\n\t\t\t</tr>\n\t\t</table>\n\t\t<br><br>\n\t\t<table width=\"100%\">\n\t\t\t<tr>\n\t\t\t\t<td colspan=\"3\" class=\"txtNegro13\" style=\"text-align: left;font-weight: bold; \">'.$res.'</td>\n\t\t\t</tr>\n\t\t\t<tr style=\"text-align: center;\" >\n\t\t\t\t<td class=\"txtBlanco13b celdaTituloGris\">Nº</td>\n\t\t\t\t<td class=\"txtBlanco13b celdaTituloGris\">Objetivos</td>\n\t\t\t\t<td class=\"txtBlanco12b celdaTituloNaranjo\">Disponibilidad</td>\n\t\t\t</tr>';\n\t\t\t$T->setVar('__tabla_consolidado',$tabla_consolidado);\n\t\t}\n\t\t$cont_obj=1;\n\t\t$array_uptime=Array();\n\t\t$nombre_nodos=Array();\n\t\t$uptime_max = Array();\n\t\t\n\t\t//SE RECORRE DATA POR OBJETIVO\n\t\tforeach ($objetivo->getSubobjetivos() as $objetivo_key => $subobjetivo) {\n\t\t\t$keys_pasos=(array_keys($subobjetivo->__pasos));\n\t\t\t$sql = \"SELECT * FROM reporte.disponibilidad_resumen_consolidado(\".\n\t\t\t\tpg_escape_string($current_usuario_id).\",\".\n\t\t\t\tpg_escape_string($objetivo_key).\", \".\n\t\t\t\tpg_escape_string($this->horario_id).\",' \".\n\t\t\t\tpg_escape_string($this->timestamp->getInicioPeriodo()).\"', '\".\n\t\t\t\tpg_escape_string($this->timestamp->getTerminoPeriodo()).\"', \".\n\t\t\t\t(isset($this->extra[\"variable\"])?$usr->cliente_id:'0').\")\";\n\t\t\t$res = & $mdb2->query($sql);\n\t\t\tif (MDB2::isError($res)) {\n\t\t\t\t$log->setError($sql, $res->userinfo);\n\t\t\t\texit();\n\t\t\t}\n\t\t\tif ($row = $res->fetchRow()) {\n\t\t\t\t$dom = new DomDocument();\n\t\t\t\t$dom->preserveWhiteSpace = FALSE;\n\t\t\t\t$dom->loadXML($row['disponibilidad_resumen_consolidado']);\n\t\t\t\t$xpath = new DOMXpath($dom);\n\t\t\t\tunset($row[\"disponibilidad_resumen_consolidado\"]);\n\t\t\t}\n\t\t\t$conf_nodos=$xpath->query(\"/atentus/resultados/propiedades/nodos/nodo\");\n\t\t\t$conf_obj= $xpath->query(\"/atentus/resultados/detalles/detalle/detalles/detalle[@nodo_id=0]/detalles/detalle/estadisticas/estadistica\");\n\t\t\t$conf_objetivo = $xpath->query(\"/atentus/resultados/propiedades/objetivos/objetivo\")->item(0);\n\t\t\t$conf_pasos = $xpath->query(\"paso[@visible=1]\", $conf_objetivo);\n\t\t\t$conf_eventos = $xpath->query(\"/atentus/resultados/propiedades/eventos/evento\");\n\t\t\t$TotalUptimes=Array();\n\t\t\t$objetivo_nombre=($conf_objetivo->getAttribute(\"nombre\"));\n\t\t\t\n\t\t\t//SE CREA BLOQUE DE NODOS\n\t\t\t$T->setVar('bloque_nodos_nombre', '');\n\t\t\tforeach ($conf_nodos as $key => $value_nodo) {\n\t\t\t\tif($value_nodo->getAttribute(\"nombre\")!='Global'){\n\t\t\t\t\tarray_push($nombre_nodos,$value_nodo->getAttribute(\"nombre\"));\n\t\t\t\t}\n\t\t\t\tif($value_nodo->getAttribute(\"nodo_id\")!=0){\n\t\t\t\t\t$nombre_nodo=$value_nodo->getAttribute(\"nombre\");\n\t\t\t\t\t$nodo_id=($value_nodo->getAttribute(\"nodo_id\"));\n\t\t\t\t\t$tag_nodo = $xpath->query(\"/atentus/resultados/detalles/detalle/detalles/detalle[@nodo_id=\".$nodo_id.\"]\")->item(0);\n\t\t\t\t\t$T->setVar('bloque_data', '');\n\t\t\t\t\t$T->setVar('bloque_pasos', '');\n\t\t\t\t\tif($key%2==0){\n\t\t\t\t\t\t$class_nodo='class=\"txtGris12 celdaIteracion2\"';\n\t\t\t\t\t}else{\n\t\t\t\t\t\t$class_nodo='class=\"txtGris12 celdaIteracion1\"';\n\t\t\t\t\t}\n\t\t\t\t\t//ARRAY QUE ACUMULA UPTIMES\n\t\t\t\t\t$Uptimes=Array();\n\t\t\t\t\t//CONTADOR DE PASOS PARA REALIZAR ROWSPAN DE NODOS\n\t\t\t\t\t$cont_pasos=0;\n\t\t\t\t\tforeach ($conf_pasos as $key_pasos => $value_pasos) {\n\t\t\t\t\t\t$paso_nombre=$value_pasos->getAttribute(\"nombre\");\n\t\t\t\t\t\t$paso=$value_pasos->getAttribute(\"paso_orden\");\n\t\t\t\t\t\t$paso_descripcion =$subobjetivo->__pasos[$paso]->descripcion;\n\t\t\t\t\t\tif($paso_descripcion == ''){\n\t\t\t\t\t\t\t$paso_descripcion = $paso_nombre;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif($key_pasos%2==0){\n\t\t\t\t\t\t\t$class='class=\"txtGris12 celdaIteracion2\"';\n\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t$class='class=\"txtGris12 celdaIteracion1\"';\n\t\t\t\t\t\t}\n\t\t\t\t\t\t//SE VALIDA SI EN XML ATRIBUTO PASOS\n\t\t\t\t\t\tif(strval($keys_pasos)=='Array'){\n\t\t\t\t\t\t\t//SE VALIDA SI LOS PASOS VISIBLES ESTAN DENTRO DE LOS PASOS DEL XML\n\t\t\t\t\t\t\tif(in_array($paso, $keys_pasos)){\n\t\t\t\t\t\t\t\t$dato = $xpath->query(\"detalles/detalle[@paso_orden=\".$paso.\"]/estadisticas/estadistica\", $tag_nodo);\n\t\t\t\t\t\t\t\t$acumulado=Array();\n\t\t\t\t\t\t\t\tforeach ($dato as $key_dato => $value) {\n\t\t\t\t\t\t\t\t\t$evento=($value->getAttribute(\"evento_id\"));\n\t\t\t\t\t\t\t\t\t$acumulado[$evento]=$value->getAttribute(\"porcentaje\");\n\t\t\t\t\t\t\t\t\t$uptime=$acumulado[1];\n\t\t\t\t\t\t\t\t\t$no_monitoreo=$acumulado[7];\n\t\t\t\t\t\t\t\t\t$downtime=$acumulado[2];\n\t\t\t\t\t\t\t\t\t$marcado=$acumulado[9];\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t$empty='';\n\t\t\t\t\t\t\t\tif($uptime!=$empty){\n\t\t\t\t\t\t\t\t\tarray_push($Uptimes, $uptime);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tif($downtime==$empty){\n\t\t\t\t\t\t\t\t\t$downtime=0;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tif($uptime==$empty){\n\t\t\t\t\t\t\t\t\t$uptime=0;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tif($no_monitoreo==$empty){\n\t\t\t\t\t\t\t\t\t$no_monitoreo=0;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tif($marcado==$empty){\n\t\t\t\t\t\t\t\t\t$marcado=0;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t$cont_pasos++;\n\t\t\t\t\t\t\t\t$T->setVar('__data','<td width=\"80\" '.$class.' style=\"text-align:right;\">'.$uptime.' %</td><td '.$class.' style=\"text-align:right;\">'.$no_monitoreo.' %</td><td '.$class.'style=\"text-align:right;\">'.$downtime.' %</td><td '.$class.' style=\"text-align:right;\">'.$marcado.' %</td></tr>');\n\t\t\t\t\t\t\t\t$T->setVar('__paso_nombre','<td width=\"350\" '.$class.'>'.$paso_descripcion.'</td>');\n\t\t\t\t\t\t\t\t$T->parse('bloque_pasos', 'BLOQUE_PASOS', true);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t$dato = $xpath->query(\"detalles/detalle[@paso_orden=\".$paso.\"]/estadisticas/estadistica\", $tag_nodo);\n\t\t\t\t\t\t\t$acumulado=Array();\n\t\t\t\t\t\t\tforeach ($dato as $key_dato => $value) {\n\t\t\t\t\t\t\t\t$evento=($value->getAttribute(\"evento_id\"));\n\t\t\t\t\t\t\t\t$acumulado[$evento]=$value->getAttribute(\"porcentaje\");\n\t\t\t\t\t\t\t\t$uptime=$acumulado[1];\n\t\t\t\t\t\t\t\t$no_monitoreo=$acumulado[7];\n\t\t\t\t\t\t\t\t$downtime=$acumulado[2];\n\t\t\t\t\t\t\t\t$marcado=$acumulado[9];\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t$empty='';\n\t\t\t\t\t\t\tif($uptime!=$empty){\n\t\t\t\t\t\t\t\tarray_push($Uptimes, $uptime);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif($downtime==$empty){\n\t\t\t\t\t\t\t\t$downtime=0;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif($uptime==$empty){\n\t\t\t\t\t\t\t\t$uptime=0;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif($no_monitoreo==$empty){\n\t\t\t\t\t\t\t\t$no_monitoreo=0;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif($marcado==$empty){\n\t\t\t\t\t\t\t\t$marcado=0;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t$cont_pasos++;\n\t\t\t\t\t\t\t$T->setVar('__data','<td width=\"80\" '.$class.' style=\"text-align:right;\">'.$uptime.' %</td><td '.$class.' style=\"text-align:right;\">'.$no_monitoreo.' %</td><td '.$class.'style=\"text-align:right;\">'.$downtime.' %</td><td '.$class.' style=\"text-align:right;\">'.$marcado.' %</td></tr>');\n\t\t\t\t\t\t\t$T->setVar('__paso_nombre','<td width=\"350\" '.$class.'>'.$paso_descripcion.'</td>');\n\t\t\t\t\t\t\t$T->parse('bloque_pasos', 'BLOQUE_PASOS', true);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tarray_push($TotalUptimes,$Uptimes);\n\t\t\t\t\t$key_pasos= ($cont_pasos);\n\t\t\t\t\t$T->setVar('__nodo_nombre','<td width=120 '.$class_nodo.' rowspan=\"'.$key_pasos.'\">'.$nombre_nodo.'</td>');\n\t\t\t\t\t$T->parse('bloque_nodos_nombre', 'BLOQUE_NODOS_NOMBRE', true);\n\t\t\t\t}\n\t\t\t}\n\t\t\t$new_key= $key_pasos*$key;\n\t\t\tif($cont_obj%2==0){\n\t\t\t\t$clase='class=\"txtGris12 celdaIteracion2\"';\n\t\t\t}else{\n\t\t\t\t$clase='class=\"txtGris12 celdaIteracion1\"';\n\t\t\t}\n\n\t\t\t$nombre_objetivo='<tr><td width=\"220\" '.$clase.' rowspan=\"'.$new_key.'\" width=\"30%\">'.$objetivo_nombre.'</td>';\n\t\t\t\n\t\t\t//SETEA VARIABLES EN PRIMERA TABLA\n\t\t\t$UptimeValid=Array();\n\t\t\t$tamaño=Array();\n\t\t\t$maximo = Array();\n\t\t\tforeach ($TotalUptimes as $keyuptime => $uptime){\n\t\t\t\tif(sizeof($uptime)>0){\n\t\t\t\t\tarray_push($tamaño, sizeof($uptime));\n\t\t\t\t\tarray_push($UptimeValid, array_sum($uptime));\n\t\t\t\t}\n\t\t\t\tif(sizeof($uptime)>0){\n\t\t\t\t\t$maxUpByNode = max($uptime);\n\t\t\t\t\tarray_push($maximo, $maxUpByNode);\n\t\t\t\t}else{\n\t\t\t\t\tarray_push($maximo, 0);\n\t\t\t\t}\n\t\t\t}\n\t\t\t$tamaño=array_sum($tamaño);\n\t\t\t$UptimeValid=array_sum($UptimeValid);\n\t\t\t$uptimeObj= number_format(round($UptimeValid/$tamaño, 2), 2);\n\t\t\tarray_push($array_uptime, $uptimeObj);\n\t\t\tarray_push($uptime_max, max($maximo));\n\t\t\tif($cont_obj%2==0){\n\t\t\t\t$class='class=\"txtGris12 celdaIteracion2\"';\n\t\t\t}else{\n\t\t\t\t$class='class=\"txtGris12 celdaIteracion1\"';\n\t\t\t}\n\t\t\t$tr_objetivo='<tr ><td '.$class.' >'.$cont_obj++.'</td><td '.$class.' >'.$subobjetivo->nombre.'</td><td '.$class.' style=\"text-align:right;\">'.max($maximo).' %(1)</td></tr>';\n\n\t\t\t$T->setVar('__objetivo',$nombre_objetivo);\n\t\t\t\n\t\t\t$T->parse('bloque_objetivo', 'BLOQUE_OBJETIVO', true);\n\t\t\tif($objetivo->tipo_reporte!=1){\n\t\t\t\t$T->setVar('__tr_objetivo',$tr_objetivo);\n\t\t\t\t$T->parse('bloque_consolidado', 'BLOQUE_CONSOLIDADO', true);\n\t\t\t}\n\t\t}\n\t\t$count_uptime=count($uptime_max);\n\t\tif($count_uptime>0){\n\t\t\t$prom_uptime=number_format(round(array_sum($uptime_max)/$count_uptime, 2), 2);\n\t\t}else{\n\t\t\t$prom_uptime=0;\n\t\t}\n\t\t//SETEA PROMEDIO GENERAL\n\t\tif($cont_obj%2==0){\n\t\t\t\t$class='class=\"txtGris12 celdaIteracion2\"';\n\t\t\t}else{\n\t\t\t\t$class='class=\"txtGris12 celdaIteracion1\"';\n\t\t\t}\n\t\tif($objetivo->tipo_reporte==2){\n\t\t\t$T->setVar('__promedio','<tr\"><td '.$class.' style=\"text-align:center;\"colspan=\"2\"> Promedio </td><td '.$class.' style=\"text-align:right;\">'.$prom_uptime.' %</td></tr>');\n\t\t}\n\t\t//ESTABLECE FILA Y COLUMNAS DE TABLA DE NODOS\n\t\t\n\t\t$T->setVar('__titulo_presentacion','<tr><td class=\"txtNegro13\" style=\"text-align: left;font-weight: bold; \">'.$objetivo->__reporte['Presentacion'][0]->texto.'.</td></tr>');\n\t\t$T->setVar('__segunda_presentacion','<tr><td class=\"txtNegro13\" style=\"text-align: left;font-weight: bold; \">'.$objetivo->__reporte['Presentacion'][1]->texto.':</td></tr>');\n\n\n\t\t$nombre_nodos=array_unique($nombre_nodos);\n\t\t$T->setVar('bloque_nodos', '');\n\t\tforeach ($nombre_nodos as $key => $nodo) {\n\t\t\t$T->setVar('__nodo','<tr ><td style=\"text-align:left;\"><li>'.$nodo.' </li></td></tr>');\n\t\t\t$T->parse('bloque_nodos', 'BLOQUE_NODOS', true);\n\t\t}\n\t\t\n\t\t$this->resultado = $T->parse('out', 'tpl_contenido');\n\t}" ]
[ "0.6619899", "0.602185", "0.5993693", "0.59565973", "0.58850276", "0.58193797", "0.5808849", "0.5796391", "0.57479686", "0.57447016", "0.56900907", "0.5627931", "0.55825543", "0.5577115", "0.5575231", "0.55498457", "0.5547742", "0.55471146", "0.55346483", "0.5511532", "0.55107296", "0.5505192", "0.55027443", "0.54888976", "0.54796624", "0.54730207", "0.5468309", "0.546368", "0.54549736", "0.5438715", "0.5433798", "0.5429814", "0.54153496", "0.54072165", "0.5400919", "0.53524303", "0.535102", "0.5336488", "0.5331613", "0.53283125", "0.53270465", "0.53198636", "0.53120214", "0.52953494", "0.5288252", "0.52806264", "0.527756", "0.52735305", "0.5264192", "0.5248433", "0.5247699", "0.5245946", "0.5239225", "0.5238481", "0.5237007", "0.5232933", "0.52320987", "0.52287793", "0.52253073", "0.52208537", "0.5218313", "0.52175033", "0.5217273", "0.52170366", "0.5215267", "0.5211055", "0.5208818", "0.52081275", "0.51974523", "0.51967543", "0.51922715", "0.5191405", "0.51898986", "0.5189657", "0.5188042", "0.5187957", "0.5179851", "0.5175649", "0.51749784", "0.517158", "0.5168207", "0.516807", "0.5167415", "0.5164979", "0.5160818", "0.5148809", "0.51445377", "0.5143605", "0.51421994", "0.51416653", "0.5139534", "0.5137863", "0.51309544", "0.5129654", "0.5128043", "0.5124686", "0.51225185", "0.51224184", "0.5118424", "0.51153046", "0.51112187" ]
0.0
-1
Constructor Constructor de un nuevo DAO de horario
public function __construct($con) { $this->con = $con; mysqli_set_charset($this->con, "utf8"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function __construct(){\n $this->ConjuntosDAO=new dao_institucion();\n }", "function __construct() {\n $dao = new DAO();\n }", "function __construct() {\n $dao = new DAO();\n }", "function __construct()\r\n {\r\n $this->cuentaDAO = new CuentaDAO();\r\n }", "public function __construct(){\r\n\t\t$this->tipoServicoDAO = new TipoServicoDAO();\r\n\t\t\r\n\t}", "public function __construct(){\n\t\t//Invocar el constructor del padre\n\t\tparent::__construct();\n\t\tFactoriaDAO::setTipoBaseDatos(\"MySQL\");\n\t}", "public function __construct()\n\t\t{\n\t\t\tbaseDao::__construct();\n\t\t}", "function __construct() {\r\n\t\t\r\n\t\t$this->conexaoDB=new DB();\r\n\t\t$this->tabela=\"retirante\";\r\n\t\r\n\t}", "public function __construct(){\n //Se solicita informacion a la BD, se llama al metodo modelo de la clase Controlador, que devuelve una instacia del objeto \n $this->ConsultaLogin_M = $this->modelo(\"Login_M\");\n }", "public function __construct()\n {\n //$database = new Database();\n $database = Database::connect();\n $this->dao = $database;\n }", "public function __construct(){\r\n require_once(IMPORT_CLIENTE);\r\n\r\n //Import da classe nivelDAO, para inserir no BD\r\n require_once(IMPORT_CLIENTE_DAO);\r\n }", "public function __construct() \r\n {\r\n \t$this->id = 0;\r\n\t\t$this->nombre = \"\";\r\n\t\t$this->clave = \"\";\r\n\t\t$this->privilegio = \"\";\r\n \t$this->con = new cConexion();\r\n\t\t$this->tabla = \"usuario\";\r\n\t\t//$this->con->Conectar();\r\n }", "private function __construct()\n {\n $factory = getDAOFactory();\n $this->_providersDAO = $factory->getFournisseurDAO();\n }", "public function __construct()\n {\n //$this->cinemaDAO = new CinemaDAOJson();\n $this->cinemaDAO = new CinemaDAO();\n }", "public function constructor(){\n\t\tparent::constructor();\n\t\t$this->conectarDB();\n\t}", "private function __construct() {\n\t\tself::$conexao = new PDO(\"mysql:dbname=\" . BD . \";host=\" . HOST, USUARIO, SENHA, array(PDO::MYSQL_ATTR_INIT_COMMAND => \"SET NAMES utf8\"));\n\t\tself::$conexao->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);\n\t\tself::$conexao->setAttribute(PDO::ATTR_DEFAULT_FETCH_MODE, PDO::FETCH_OBJ);\n\t}", "function __construct() {\n\t\t\t$conexion = new Conexion(APPBD, APP);\n\t\t\t$this->entidad = $conexion->doctrineORM();\n\t\t}", "public function __construct() {\n\t\t$this->conexao = new DaoConexao();\n\t\t$this->util = new Util();\n\t}", "public function __construct(){\n $this->userDAO = new UserDAOBD();\n }", "public function __construct() {\r\n\t\t$this->_db = new DAL();\r\n\t}", "public function __construct() \r\n {\r\n \t$this->con = new cConexion();\r\n\t\t$this->tabla = \"evento\";\r\n\t\t//$this->con->Conectar();\r\n }", "public function __construct(){\n require_once(IMPORT_AVALIACAO);\n\n //Import da classe DAO, para inserir no BD\n require_once(IMPORT_AVALIACAO_DAO);\n }", "function __construct()\n {\n if (!empty($_SESSION['oDBListas']) && $_SESSION['oDBListas'] == 'error') {\n exit(_(\"no se puede conectar con la base de datos de Listas\"));\n }\n $oDbl = $GLOBALS['oDBListas'];\n $this->setoDbl($oDbl);\n $this->setNomTabla('dbo.q_dl_Estudios_b');\n }", "function __construct() {\r\n $instancia = Database::getInstance();\r\n\r\n $this->con = $instancia->getConexion();\r\n }", "public function __construct()\n\t{\n\t\t$this->_connexion = Db::getInstance();\n\t\t// var_dump($connexion);\n\t}", "function __construct() {\r\n\t\t$this->connBanco = new Db();\r\n\t}", "public function __construct()\n { // langsung connect ke class databasenya.\n $this->db = new Database(); // instansiasi kelas database.\n }", "public function __construct() {\n try {\n $Connexion = new connexion();\n $this->obj = $Connexion->IDconnexion;\n } catch ( PDOException $e ) {\n echo \"<h1>probleme access BDD</h1>\";\n }\n }", "public function __construct()\r\n\r\n\t{\r\n\t\t$this->db = new Connection();\r\n\t\t//chama o metodo conectar da classe Conection\r\n\t\t$this->db = $this->db->conectar();\r\n\t\t\r\n\t}", "public function __construct() {\n\n try {\n $this->conexion = new PDO(DSN, DB_USER, DB_PASS);\n } catch (Exception $e) {\n echo 'No se pudo conectar a la base de datos. Error: '. $e .' intente mas tarde...';\n }\n\n $this->repositorioProducts = new RepositorioProductsSQL($this->conexion);\n $this->repositorioUsers = new RepositorioUsersSQL($this->conexion);\n\n }", "public function __construct()\n {\n $this->_db_exam = new CTVExamDao();\n }", "public function __construct()\n {\n $this->db = new Conexion();\n // $this->nombre = $nombre;\n\n }", "public function __construct () \n\t{\n\t\trequire_once(\"./inc/connect_pdo.php\");\n\t\t$this->dbo = $dbo;\n\t\t\n\t}", "public function __construct()\r\n\t\t{\r\n\t\t\t$this->Connec = DBConnexion::getInstance();\r\n\t\t}", "public function __construct(){\n //Conexão ao banco\n //Também poderia passar os dados como parâmetros no método construtor (bom para mais servidores, bancos ou usuários)\n $this -> connect = new PDO (\"mysql:host=localhost;dbname=dnphp7\", \"root\", \"\");\n }", "public function __construct() \n\t{\t\n parent::__construct();\n $this->load->database();\n $this->id = \"idAcuerdos\";\n $this->table_name = \"Acuerdos\";\n\t}", "public function __construct()\n {\n // Connexion à la Base de Données\n $this->conn = new PDO(DATABASE, LOGIN, PASSWORD);\n \n }", "protected function __construct()\n\t\t{\n\t\t\t$this->Connect();\n// \t\t\t$this->Create($this->query); // Czy tak?\n\t\t\t$this->Insert();\n \t\t\t$this->Update('update tabelka ');\n// \t\t\t$this->Delete();\n// \t\t\t$this->Select();\n\t\t}", "public function __construct(){\n\t\t$this->db = new \\Model\\dal();\n\t}", "public function __construct()\n {\n $this->m_DataAccess = new PDOMySQLActorrDataModel();\n }", "function __construct($centro_id,\n $nombre_centro,\n $edificio_centro){\n\n $this->centro_id = $centro_id;\n $this->nombre_centro = $nombre_centro;\n $this->edificio_centro = $edificio_centro;\n\n\n $this->db = PDOConnection::getInstance();\n }", "function __construct() { //se sobreescribe ...funciona ok\n //$c= new ConexionOracle();\n $this->coneccion=new ConexionOracle();\n //echo 'se ejecuto el constructor de la clase sQueryOracle';\n }", "function __construct(){\n $this->_db = (new DataBaseServices())->connect();\n }", "public function __construct(){\n $this->db = new Conexion_BD; \n }", "private function __construct(){\n try {\n $this->dbh = Conexion::singleton_conexion();\n } catch (PDOException $e) {\n print \"Error!: \" . $e->getMessage();\n die();\n }\n }", "public function __construct(){\r\n\r\n // Create connection with data base\r\n $this->_db = DB::get_Instance();\r\n }", "function __construct() {\n // Initialize the dbms pointer.\n AbstractMapper::__construct();\n\n // Initialize table name.\n $this->tableName = \"orders\";\n }", "public function __construct() {\n\t\t$this->_noteDAO = new MySQLNoteDAO();\n\t}", "public function __construct() {\n $bd = new ConexionBD();\n $this->conexion = $bd->getConexion(); \n }", "public function __construct() {\n \n $this->tableName = \"db_database\";\n $this->setColumnsInfo(\"id\", \"int(11)\", 0);\n $this->setColumnsInfo(\"id_space\", \"int(11)\", 0);\n $this->setColumnsInfo(\"name\", \"varchar(250)\", \"\");\n $this->primaryKey = \"id\";\n }", "public function __construct() {\n parent::__construct();\n\n //kapcsolódás a db-hez:\n $this->db = db_connect();\t//\\Config\\Database::connect();\n $this->builder = $this->db->table(\"feladatok\");\n\n }", "public function __construct()\r\n {\r\n $this->conexao = new conexao;\r\n }", "public function __construct()\n {\n $con = new PDO('mysql:host=localhost;dbname=inventorymanagement', 'root', '');\n $con->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_WARNING);\n $con->setAttribute(PDO::ATTR_DEFAULT_FETCH_MODE, PDO::FETCH_OBJ);\n $this->setDbConx($con);\n }", "public function __construct() {\n $this->db = \\Config\\Database::connect();\n // Wir verwenden die Query Builder Klasse über table()\n $this->reiter = $this->db->table('Reiter');\n }", "public function __construct()\n {\n $this->object = new DBAccess();\n }", "public function __construct() {\n\t\t$this->db = new PDO(\"mysql:host=127.0.0.1;dbname=portfolio\", 'root', 'cr@ne');\n\t\t// Conecta no banco de DADOS\n\t}", "public function __construct() {\n\t\t \n\t\t try {\n\t\t\t \n\t\t\t $this->pdo = new PDO(\"mysql:dbname=sorteio;host=localhost\", \"root\", \"\");\n\t\t\t \n\t\t } catch(PDOException $e) {\n\t\t\t echo \"ERRO: \".$e->getMessage();\n\t\t\t exit;\n\t\t }\n\t }", "public function __construct()\n\t{\n\t\t//llamar constructor del padre IMPORTANTE\n\t\tparent::__construct();\n\t\t\n\t\t//inicializamos la conexion con la base de datos\n\t\t$this->conexionDB = new mysqli(KimaldiServerNamespace\\Configuracion::$bdServer, KimaldiServerNamespace\\Configuracion::$bdUsuario, KimaldiServerNamespace\\Configuracion::$bdPass, KimaldiServerNamespace\\Configuracion::$baseDatos);\n\t\t\n\t}", "public function __construct() {\n $this->conexion = new ConexionBD(); //instanciamos la clase\n\n }", "public function __construct() {\n $this->conexion = new ConexionBD(); //instanciamos la clase\n\n }", "public function __construct()\r\n {\r\n $this->db = clsDB::getInstance();\r\n }", "public function __construct()\n {\n try {\n $this->pdo = new PDO(\"mysql:dbname=crudoo;host=localhost\", \"root\", '');\n } catch (PDOException $e) {\n echo 'Falhou: ' . $e->getMessage();\n }\n }", "public function __construct()\n {\n $this->_idField = $this->getIdField();\n $this->_tableName = $this->getTableName();\n\n if (!static::$_db) {\n static::$_db = Database::getInstance();\n }\n\n if (!static::$_schema) {\n static::$_schema = new Cache();\n }\n }", "protected function _initialize()\r\n {\r\n $this->metadata()->setTablename('comentarios');\r\n $this->metadata()->setPackage('system.application.models.dao');\r\n \r\n # nome_do_membro, nome_da_coluna, tipo, comprimento, opcoes\r\n \r\n $this->metadata()->addField('id', 'id', 'int', 11, array('primary' => true, 'notnull' => true, 'autoincrement' => true));\r\n $this->metadata()->addField('comentario', 'comentario', 'varchar', 45, array());\r\n $this->metadata()->addField('dataAvaliacao', 'data_avaliacao', 'datetime', null, array());\r\n $this->metadata()->addField('coordenadorId', 'coordenador_id', 'int', 11, array());\r\n $this->metadata()->addField('itemAvaliado', 'item_avaliado', 'varchar', 45, array());\r\n $this->metadata()->addField('avaliador', 'avaliador', 'varchar', 45, array());\r\n $this->metadata()->addField('tipoAvaliacao', 'tipo_avaliacao', 'varchar', 45, array());\r\n $this->metadata()->addField('subtipoAvaliacao', 'subtipo_avaliacao', 'varchar', 45, array());\r\n\r\n \r\n }", "public function __construct(Creditos $credito){ \n //selectDatabase();\n $this->sale = $credito;\n }", "public function __construct(){\n //estamos guardando la conexion en la base de datos;\n $this->db=Database::connect();\n }", "public function __construct() {\n $obj = new DB();\n $this->db = $obj->pdo;\n \n }", "public function __construct(){\n \n $this->_db = new \\PDO('mysql:host=' . DB_HOST . ';dbname=' . DB_NAME . '; charset=utf8', DB_USERNAME , DB_PASSWORD , array(\\PDO::ATTR_ERRMODE=>\\PDO::ERRMODE_WARNING,\\PDO::ATTR_DEFAULT_FETCH_MODE=>\\PDO::FETCH_OBJ));\n }", "function __construct() // constructor, solo crea una conexion usando la clase \"Conexion\"\n {\n $this->coneccion= new ConexionMYSQL();\n }", "function __construct(){\n $cls_conexion = new cls_conexion();\n $this->conexion = $cls_conexion->conectar();\n }", "public function UsuarioDAO(){\r\n\t\t\t$dba = new DbAdmin(\"mysqli\");\r\n\t\t\t$dba->connect('localhost', 'root', '', 'inteligencia');\r\n\t\t\t$this->dba = $dba;\t\r\n\t\t}", "function __construct(){\n $this->db = new PDO('mysql:host=localhost;'.'dbname=inventario2;charset=utf8', 'root', '');\n }", "public function __construct(){\n \t\t// Criando Conexão\n \t\t$dsn = 'mysql:dbname=db_padrao;host=localhost;port=3336;';\n \t\t$user = 'root';\n \t\t$password = '';\n\t\t$this->connector = new PDO($dsn, $user, $password);\n\t\t$this->connector->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);\n\t\t$this->connector->exec(\"SET CHARACTER SET utf8\");\n \t\t$retornos = [];\n \t}", "public function __construct()\n {\n $dsn = 'mysql:host='.$this->host.';port='.$this->porta.';dbname='.$this->banco;\n $opcoes = [\n //armazena em cache a conexao para ser reutilizada \n PDO::ATTR_PERSISTENT => TRUE,\n //lanca uma pdo exception se ocorrer um erro \n PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION\n ];\n\n try {\n // cria a instancia do PDO \n $this->dbh = new PDO($dsn,$this->usuario,$this->senha,$opcoes);\n\n \n } catch (PDOException $e) {\n print \"Error!: \" . $e->getMessage() . \"<br/>\";\n die();\n }\n\n }", "public function __construct() {\n//fonction de connexion a ma base de donnéer \n //ordi formation\n $this->pdo = dataBase::getIntance();\n\n\n // Sinon on affiche un message d'erreur\n //il les faut pour faire les transaction (3 prochaine methode)\n }", "public function __construct(){\n $this->packageDao = new PackageDao();\n $this->destinationDao = new DestinationDao();\n }", "public function __construct() {\n $this->db = Database::getDatabase();\n $this->dbConnection = $this->db->getConnection();\n $this->tblUser = $this->db->getUserTable();\n $this->tblLibrary = $this->db->getLibraryTable();\n $this->tblMovie = $this->db->getMovieTable();\n $this->tblEpisode = $this->db->getEpisodeTable();\n $this->tblTv = $this->db->getTvTable();\n }", "function __construct(){\n\n\t\tparent::__construct(); //Llamada al constructor de la clase padre\n\n\t\t$this->id = \"\";\n\t\t$this->actividad = \"\";\n\t\t$this->nota = \"\";\n\t\t$this->alumno = \"\";\n\t\t$this->materia = \"\";\n\n\t}", "public function __construct()\r\n {\r\n require_once 'libs/db.php';\r\n $this->db = Db::singleton();\r\n }", "function __construct() \n {\n // Creation de la table\n self::createTableIfNeeded();\n }", "public function __construct($pdo) {\n $this->pdo = $pdo;\n //I am not sure if you have everything set up correctly in DB\n $this->createTableWithData();\n }", "function __construct() {\n $this->dsn = 'mysql:dbname=id14818847_usuario_3002;host=localhost';\n $this->user = 'id14818847_wricardo';\n $this->password = 'dw781qaU5N4@f/B]';\n \n try {\n $this->conn = new PDO($this->dsn, $this->user, $this->password);\n } catch (PDOException $e) {\n echo 'Connection failed: ' . $e->getMessage();\n }\n\n }", "public function __construct() {\n $this->dbName = new DataBase($this->db);\n }", "public function __construct(){\n //get the configuration for connection to database\n $data_base_opt = System\\Config::get_instance()->get_database_config();\n // receiving object for working with database\n $this->database = System\\Safe_SQL::get_instance($data_base_opt);\n }", "private function __construct(){\n \n try {\n $dsn = \"mysql:host=\".SERVER_DB.\";dbname=Usuarios;charset=utf8\";\n $this->dbh = new PDO($dsn, \"root\", \"root\");\n $this->dbh->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);\n } catch (PDOException $e){\n echo \"Error de conexión \".$e->getMessage();\n exit();\n }\n // Construyo las consultas\n $this->stmt_usuarios = $this->dbh->prepare(\"select * from Usuarios\");\n $this->stmt_usuario = $this->dbh->prepare(\"select * from Usuarios where user=:user\");\n $this->stmt_boruser = $this->dbh->prepare(\"delete from Usuarios where user=:user\");\n $this->stmt_moduser = $this->dbh->prepare(\"update Usuarios set nombre=:nombre, clave=:clave, email=:email plan=:plan estado=:estado where user=:user\");\n $this->stmt_creauser = $this->dbh->prepare(\"insert into Usuarios (user,nombre,clave,email,plan,estado) Values(?,?,?,?)\");\n }", "function __construct($edificio_id,\r\n $nombre_edif,\r\n $direccion_edif,\r\n $telef_edif,\r\n $num_plantas,\r\n $agrup_edificio){\r\n\r\n $this->edificio_id = $edificio_id;\r\n $this->nombre_edif = $nombre_edif;\r\n $this->direccion_edif = $direccion_edif;\r\n $this->telef_edif = $telef_edif;\r\n $this->num_plantas = $num_plantas;\r\n $this->agrup_edificio = $agrup_edificio;\r\n\r\n\r\n $this->db = PDOConnection::getInstance();\r\n }", "public function __construct() {\n\t\t$this->db = DB::getInstance();\n\t}", "function __construct(){\n \t$this->comentario = new Comentarios();\n\n }", "public function __construct()\r\n\t{\r\n\t\t$this->db = SPDO::singleton();\r\n\t}", "public function __construct(){\n // algo que fará toda vez que a classe é 'instanciada'\n $this->conn = new PDO(\"mysql:host=localhost;dbname=dbphp7\",\"root\",\"\"); // parametros de conexão\n }", "function __construct(){\n\n\t\tparent::__construct(); //Llamada al constructor de la clase padre\n\n\t\t$this->id = \"\";\n\t\t$this->nombre = \"\";\n\t}", "function __construct() {\n // Initialize the dbms pointer.\n parent::__construct();\n\n // Initialize table name.\n $this->tableName = \"admin\";\n }", "private function __construct()\n\t{\n\t\ttry\n\t\t{\n\t\t\t// syntax différente de tableau :\n\t\t\t// $option = array(); = $option = [];\n\t\t\t$option =\n\t\t\t[\n\t\t\t\tPDO::MYSQL_ATTR_INIT_COMMAND => \"SET NAMES utf8\",\n\t\t\t\tPDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION, // Signalisation des erreurs\n\t\t\t\tPDO::ATTR_EMULATE_PREPARES => false /* Vrai requêtes préparées */\n\t\t\t];\n\n\t\t\t$this->_PDOInstance = new PDO('mysql:host='.BDD_HOST.'; dbname='.BDD_DATABASE, BDD_USER, BDD_PASSWORD, $option);\n\t\t}\n\t\tcatch (PDOException $e)\n\t\t{\n\t\t\texit(\"Connexion à MySQL impossible : \" . $e->getMessage());\n\t\t}\n\t}", "public function __construct(){\n\t\t$database = new Database();\n\t\t$db = $database->getConnection();\n $this->conn = $db;\n }", "public function __construct()\n {\n $PARAM_hote = 'localhost';\n\n // le port de connexion à la base de données\n $PARAM_port = '3306';\n // le nom de la base de données\n\n $PARAM_nom_bd = 'InstaDog';\n\n // Le nom d'utilisateur pour se connecter \n $PARAM_utilisateur = 'adminInstaDog';\n\n // le mot de passe de l'utilisateur pour se connecter\n $PARAM_mot_passe = 'Inst@D0g';\n \n // Attraper les exceptions \n try {\n $this->connexion = new PDO(\n 'mysql:host=' . $PARAM_hote . '; dbname=' . $PARAM_nom_bd,\n $PARAM_utilisateur,\n $PARAM_mot_passe\n );\n } catch (Exception $e) {\n echo 'Erreur: ' . $e->getMessage() . '<br/>';\n echo 'N° : ' . $e->getCode();\n }\n }", "function __construct() {\n parent::__construct();\n\t\t// Cargamos la base de datos\n\t\t$this -> load -> database();\n }", "function __construct() {\n parent::__construct();\n\t\t// Cargamos la base de datos\n\t\t$this -> load -> database();\n }", "function __construct() {\n parent::__construct();\n\t\t// Cargamos la base de datos\n\t\t$this -> load -> database();\n }", "public function __construct(){\n $this->db = DB::getInstance();\n }", "public function __construct() {\n\t\t$this->_db = Database::getInstance();\n\t}", "public function __construct() {\n $this->db = SPDO::singleton();\n }" ]
[ "0.7948456", "0.78608924", "0.782554", "0.77576196", "0.77363527", "0.7672162", "0.7566144", "0.748357", "0.7405192", "0.73912543", "0.73587817", "0.73357505", "0.72898287", "0.7258182", "0.7234934", "0.71819067", "0.7165426", "0.7139513", "0.7102663", "0.71008664", "0.70784205", "0.7058446", "0.70550114", "0.70528764", "0.7051756", "0.70364136", "0.7026643", "0.70131594", "0.70105153", "0.69990075", "0.6998454", "0.69981223", "0.6987317", "0.6970699", "0.6966573", "0.69466835", "0.6943216", "0.6935598", "0.6921556", "0.69025344", "0.68844765", "0.6852106", "0.68439937", "0.684211", "0.6826538", "0.68138415", "0.6811677", "0.6801599", "0.68001497", "0.6791682", "0.6776512", "0.6773639", "0.6767345", "0.67672867", "0.67423654", "0.67314035", "0.67276067", "0.67235166", "0.6715537", "0.6715537", "0.6704701", "0.6704394", "0.6688609", "0.6687808", "0.66827387", "0.66770744", "0.6673684", "0.66736794", "0.66709787", "0.66686505", "0.66489464", "0.6646265", "0.6640057", "0.66336423", "0.6628712", "0.6623803", "0.66176575", "0.6615056", "0.66091174", "0.6604967", "0.6601634", "0.65986216", "0.65958744", "0.65952826", "0.65939724", "0.6592835", "0.65844417", "0.6581852", "0.65774214", "0.65750974", "0.6574048", "0.65667564", "0.6566167", "0.6562406", "0.6554195", "0.65485007", "0.65485007", "0.65485007", "0.65480953", "0.6546654", "0.6537614" ]
0.0
-1
Obtiene los horarios de la base de datos
public function obtenerLista() { $sql = "SELECT * FROM HORARIO"; if(!$result = mysqli_query($this->con, $sql)) die(); $horarios = array(); while ($row = mysqli_fetch_array($result)) { $horarios[] = new horario($row[0], $row[1]); } return $horarios; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getListadoHorarioss()\n {\n return $this->conexionHorarios->listaLlaves(\"NOMBRE\", \"ASC\");\n }", "public function horario() {\n\t\t$query = \"SELECT \n\t\t\t\t\tCONCAT(DATE_FORMAT(data_hora, '%d/%m/%Y %H'), 'h - ',DATE_FORMAT(data_hora, '%H'),':59h') as nome,\n\t\t\t\t\tcount(q.local_id) as qtd, \n\t\t\t\t\tROUND(((count(q.local_id)*100)/t.contagem),2) as percent \n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\tFROM (assistencia q, \n\t\t\t\t\t\t (SELECT count(a.local_id) as contagem \n\t\t\t\t\t\t \tFROM assistencia a \n\t\t\t\t\t\t \tWHERE a.local_id = $this->id\n\t\t\t\t\t\t \tand a.data_hora BETWEEN '\" . $_SESSION[\"data_inicio\"] . \" 00:00:00' AND '\" . $_SESSION[\"data_final\"] . \" 23:59:59'\n\t\t\t\t \t\t\tand a.ativo = 1\n\t\t\t\t\t\t \t) t)\n\t\t\t\t\t\n\t\t\t\t\tWHERE q.local_id = $this->id\n\t\t\t\t\tand q.data_hora BETWEEN '\" . $_SESSION[\"data_inicio\"] . \" 00:00:00' AND '\" . $_SESSION[\"data_final\"] . \" 23:59:59'\n\t\t\t\t \tand q.ativo = 1\n\t\t\t\t\tGROUP BY CONCAT(DATE_FORMAT(data_hora, '%Y-%m-%d %H'), ':00:00.000')\n\t\t\t\t\tORDER BY data_hora DESC\";\n\n\t\t$this->db->ExecuteSQL($query);\n\t\treturn $this->db->ArrayResults();\n\t}", "function getAllHorses()\n{\n\t$db = openDatabaseConnection();\n\n\t$sql = \"SELECT * FROM horses\";\n\t$query = $db->prepare($sql);\n\t$query->execute();\n\n\t$db = null;\n\n\treturn $query->fetchAll();\n}", "function crear_horarios (){\n $hora=8;\n $indice=0;\n $prefijo=\"\";\n $horarios=array();\n while($hora <= 22){\n \n $prefijo=($hora <= 9) ? \"0\".$hora : $hora ;\n \n $horarios[$indice]=array(\n 0 => \"$prefijo:00:00\",\n 1 => TRUE\n );\n $indice += 1;\n //replica, para obtener los horarios disponibles\n $horarios[$indice]=array(\n 0 => \"$prefijo:00:00\",\n 1 => TRUE\n );\n $indice += 1;\n $horarios[$indice]=array(\n 0 => \"$prefijo:15:00\",\n 1 => TRUE\n );\n $indice += 1;\n $horarios[$indice]=array(\n 0 => \"$prefijo:30:00\",\n 1 => TRUE\n );\n $indice += 1;\n //replica, para obtener los horarios disponibles\n $horarios[$indice]=array(\n 0 => \"$prefijo:30:00\",\n 1 => TRUE\n );\n $indice += 1;\n $horarios[$indice]=array(\n 0 => \"$prefijo:45:00\",\n 1 => TRUE\n );\n \n $indice += 1;\n $hora += 1;\n \n }\n \n return $horarios;\n }", "public function buscarHorarios($valor)\n {\n return $this->conexionHorarios->buscar($valor,\"NOMBRE\", \"ASC\");\n }", "public function buscarhorario()\n\t{\n\t\t$query=\"SELECT * FROM horario WHERE idhorario=\".$this->idhorario;\n\n\t\t\n\t\t$resp=$this->db->consulta($query);\n\t\t\n\t\t//echo $total;\n\t\treturn $resp;\n\t}", "public static function getHorario()\n {\n $hoy=Carbon::now()->toDateString();\n $horario = DB::table('asignatura_grupo')\n ->join('asignaturas','asignaturas.id','=','asignatura_grupo.asignatura_id')\n ->join('grupos','grupos.id','=','asignatura_grupo.grupo_id')\n ->join('periodos','periodos.id','=','grupos.periodo_id')\n ->join('horaDias','asignatura_grupo.horaDias_id','=','horaDias.id')\n ->select('asignaturas.nombre','grupos.salon','horaDias.dias')\n ->where('periodos.inicioPeriodo','<=',$hoy)\n ->where('periodos.finPeriodo','>=',$hoy)\n ->where('asignatura_grupo.docente_id','=',auth()->user()->docente_id)\n ->get();\n\n\n return $horario;\n }", "public function Monta_Horario() {\n\t\t$Lista = array();\n\t\tforeach($this->getDimensoes() as $Dimensao)\n\t\t\t$Lista[$Dimensao->getDia()][$Dimensao->getHorario()] = $Dimensao->getSala(true)->getNome(true);\n\t\treturn $Lista;\n\t}", "public function cargarHorasPorMateria($horas){\n\t\t$materia=$horas->getMateria();\n\n\t\t$this->db=Database::getInstance();\n\t\t$sql=\"SELECT * FROM horario a, materia b, horas c WHERE a.idMateria=b.idMateria and c.codHora=a.codHora and b.idMateria='$materia' order by c.dia, c.horaInicial\";\n\t\t//echo $sql;\n\t\t$result=$this->db->get_data($sql);\n\t\t//echo $result[\"DATA\"];\n\t\treturn $result;\n\t}", "public function insertHorarios()\n {\n $atributos=array( $this->nombre , $this->aula );\n //descomentarear la l�nea siguiente y comentarear la anterior si la llave primaria no es autoincremental\n //$atributos=array( $this->codigo , $this->nombre , $this->aula );\n return $this->conexionHorarios->insertarRegistro($atributos);\n }", "public function getHorariosAtencion()\n {\n return $this->horariosAtencion;\n }", "public function cargarHorario() {\n $horario = tmHorario::all(['id','fecha','hora','evento_id']);\n return response()->json([\n 'horario'=>$horario\n ]);\n }", "function depurar_horarios ($horarios, $aula){\n $horarios_disponibles=array();\n $indice=0;\n $longitud=count($horarios);\n $indice_horario=0;\n //guarda un horario disponible con el formato (hora_inicio, hora_fin, aula)\n $horario=array();\n $hora_fin=\"\";\n while($indice_horario < $longitud){\n if($horarios[$indice_horario][1]){\n \n $hora_inicio=$horarios[$indice_horario][0];\n $horario['hora_inicio']=$hora_inicio;\n\n //aca no hay que acumular el retorno\n $indice_horario = $this->obtener_horario($indice_horario, $horarios, &$hora_fin);\n $horario['hora_fin']=$hora_fin;\n $horario['aula']=$aula['aula'];\n $horario['id_aula']=$aula['id_aula'];\n $horarios_disponibles[$indice]=$horario;\n //los eltos se agregan al final del arreglo\n $this->s__horarios_disponibles[]=$horario;\n $indice += 1;\n }\n else{\n $indice_horario += 1;\n }\n }\n return $horarios_disponibles;\n }", "function getAllHorses(){\n // mislukt kunnen we de foutmelding afvangen en eventueel de gebruiker een\n // nette foutmelding laten zien. In het catch statement wordt de fout afgevangen\n try {\n // Open de verbinding met de database\n $conn=openDatabaseConnection();\n\n // Zet de query klaar door middel van de prepare method\n $stmt = $conn->prepare(\"SELECT * FROM horses\");\n\n // Voer de query uit\n $stmt->execute();\n\n // Haal alle resultaten op en maak deze op in een array\n // In dit geval is het mogelijk dat we meedere medewerkers ophalen, daarom gebruiken we\n // hier de fetchAll functie.\n $result = $stmt->fetchAll();\n\n }\n // Vang de foutmelding af\n catch(PDOException $e){\n // Zet de foutmelding op het scherm\n echo \"Connection failed: \" . $e->getMessage();\n }\n\n // Maak de database verbinding leeg. Dit zorgt ervoor dat het geheugen\n // van de server opgeschoond blijft\n $conn = null;\n\n // Geef het resultaat terug aan de controller\n return $result;\n}", "function ListaZonaHoraria()\n {\n $this->Consulta(\"*\",\"zonashorarias\",\"\");\n // Contar la cantidad de resultados\n $this->Filas = mysql_num_rows($this->Resultado);\n if( $this->Filas > 0){\n for( $i=0; $i < $this->Filas; $i++ ) {\n // Obtener resultados\n $Columnas = mysql_fetch_assoc($this->Resultado);\n echo \"<option value=\\\"\".$Columnas['id'].\"\\\">\".$Columnas['nombre'].\"</option>\";\n }\n }else{\n echo \"<option value=\\\"0\\\">No hay datos</option>\";\n }\n }", "public function obtener_horario($id_labo, $id_grupo_curso) {\r\n $this->rs = new DB();\r\n $sql = sprintf(\"SELECT a.id_grupo_curso, a.hora_inicio, a.hora_fin , a.dia,\r\n c.curso_nombre, b.grupo_nombre, d.laboratorio_nombre, \r\n e.prof_nombres, e.prof_apellidoP, e.prof_apellidoM\r\n FROM grupo_curso_laboratorio a\r\n LEFT JOIN grupo_curso b on a.id_grupo_curso = b.id_grupo_curso\r\n LEFT JOIN curso c on b.id_curso = c.id_curso\r\n LEFT JOIN laboratorio d on a.id_labo = d.id_labo\r\n LEFT JOIN profesor e on b.id_profesor = e.id_profesor\r\n where a.id_labo = %s and a.id_grupo_curso = %s\", $id_labo, $id_grupo_curso);\r\n mysql_query(\"SET NAMES 'utf8'\"); /* SIRVE PARA MOSTRAR LA Ñ Y LAS TILDES */\r\n $this->rs->query($sql);\r\n\r\n $row = $this->rs->getRow();\r\n\r\n $this->rs->close();\r\n\r\n $hor = array('id_grupo_curso' => $row[\"id_grupo_curso\"],\r\n 'curso' => $row[\"curso_nombre\"] . \" \" . $row[\"grupo_nombre\"],\r\n 'profesor' => $row[\"prof_apellidoP\"] . \" \" . $row[\"prof_apellidoM\"] . \", \" . $row[\"prof_nombres\"],\r\n 'laboratorio_nombre' => $row[\"laboratorio_nombre\"],\r\n 'hora_inicio' => $row[\"hora_inicio\"],\r\n 'hora_fin' => $row[\"hora_fin\"],\r\n 'dia' => $row[\"dia\"]);\r\n\r\n echo json_encode($hor);\r\n }", "public function Lista_Horarios($cru = false) {\n\t\t$Lista = array();\n\t\tforeach($this->getDimensoes() as $Dimensao)\n\t\t\t$Lista[] = ($cru) ? $Dimensao->getDia().sprintf(\"%02d\", $Dimensao->getHorario()) : array($Dimensao->getDia(), $Dimensao->getHorario(), $Dimensao->getSala(true)->getNome(true));\n\t\treturn $Lista;\n\t}", "public function consultarHoriosFechasListado($idUsuario){\n\t\t\n\t\t$resultado = array();\n\t\t\n\t\t$idUsuario \t= parent::escaparQueryBDCliente($idUsuario); \n\t\t\n\t\t$query = \"SELECT idAgendaHorarioFechaUsuario, fecha, DATE_FORMAT(horaInicio, '%H:%i') as horaInicio, DATE_FORMAT(horaFin, '%H:%i') as horaFin, estado\n\t\t\t\t\tFROM tb_agendaHorarioFechaUsuario\n\t\t\t\t WHERE (fecha >= CURDATE() ) AND (idUsuario = '$idUsuario') AND (estado = 'A')\";\n\t\t\n $conexion = parent::conexionCliente();\n\t\t\n\t\t\n\t\n\t\tif($res = $conexion->query($query)){\n while ($filas = $res->fetch_assoc()) {\n $resultado[] = $filas;\n }\n \n /* liberar el conjunto de resultados */\n $res->free(); \n }\n\n return $resultado;\t\n\t\t\n\t}", "function grabar_horario($datos){\n\t\t$registro[IDPROVEEDOR] = $datos[IDPROVEEDOR];\n\t\t$registro[IDUSUARIOMOD]= $datos[IDUSUARIOMOD];\n\t\t$registro[HORAINICIO]=$datos[HORAINICIO];\n\t\t$registro[HORAFINAL]=$datos[HORAFINAL];\n\t\t$registro[DOMINGO]=($datos[DOMINGO]=='on')?1:0;\n\t\t$registro[LUNES]=($datos[LUNES])?1:0;\n\t\t$registro[MARTES]=($datos[MARTES])?1:0;\n\t\t$registro[MIERCOLES]=($datos[MIERCOLES])?1:0;\n\t\t$registro[JUEVES]=($datos[JUEVES])?1:0;\n\t\t$registro[VIERNES]=($datos[VIERNES])?1:0;\n\t\t$registro[SABADO]=($datos[SABADO])?1:0;\n\n\n\t\tif ($this->exist('catalogo_proveedor_horario',IDPROVEEDOR,\" WHERE IDPROVEEDOR = '$registro[IDPROVEEDOR]'\"))\n\t\t{\n\t\t\t$this->update('catalogo_proveedor_horario',$registro,\" WHERE IDPROVEEDOR = '$registro[IDPROVEEDOR]'\");\n\t\t}\n\t\telse {\n\t\t\t$this->insert_reg('catalogo_proveedor_horario',$registro);\n\n\t\t}\n\t}", "public function index()\n {\n return CoordinacionHorario::all();\n }", "function obtener_horarios_disponibles ($aulas, $horarios_ocupados){\n //$horarios_disponibles=array();\n foreach ($aulas as $clave=>$aula){\n //obtenemos los horarios ocupados para un aula especifica\n //$horarios_ocupados_por_aula=$this->obtener_horarios_ocupados_por_aula($aula, $horarios_ocupados);\n //print_r(gettype($horarios_ocupados_por_aula));\n //$aula no es necesario, quitar mas adelante\n \n //obtenemos todos los horarios ocupados y disponibles\n $horarios=$this->calcular_espacios_disponibles($aula, $horarios_ocupados);\n \n $horarios_depurados=$this->depurar_horarios($horarios, $aula);\n \n //$horarios_disponibles[]=$horarios_depurados;\n }\n \n //return $horarios_disponibles;\n }", "public function consultarHorarioDiaUsuario($dia, $idUsuario){\n\t\t\n\t\t$resultado = array();\n\t\t\n\t\t$dia = parent::escaparQueryBDCliente($dia); \n\t\t$idUsuario = parent::escaparQueryBDCliente($idUsuario); \n\t\t\n\t\t$query = \"SELECT idAgendaHorarioUsuario, DATE_FORMAT(horaInicio, '%H:%i') as horaInicio, DATE_FORMAT(horaFin, '%H:%i') as horaFin, estado\n\t\t\t\t\tFROM tb_agendaHorarioUsuario\n\t\t\t\t WHERE numeroDia = '$dia' AND idUsuario = '$idUsuario' AND estado = 'A'\";\n\t\t\n $conexion = parent::conexionCliente();\n\t\t\n\t\t\n\t\n\t\tif($res = $conexion->query($query)){\n while ($filas = $res->fetch_assoc()) {\n $resultado[] = $filas;\n }\n \n /* liberar el conjunto de resultados */\n $res->free(); \n }\n\n return $resultado;\t\t\n\t\t\t\n\t}", "public function gethabitacion(){\n\t\t\t$sql = \"select h.IdUsuario, h.NumeroHab from huespedusuario h, pedidohabitacion pe, cuentatotal c WHERE pe.IdCuenta = c.IdCuenta and h.IdHuesped = c.IdEnte GROUP by h.NumeroHab\";\n\t\t\t$params = array(null);\n\t\t\treturn Database::getRows($sql, $params);\n\t\t\t}", "public function consultarHorarioFechaUsuario($fecha, $idUsuario){\n\t\t\n\t\t$resultado = array();\n\t\t\n\t\t$fecha \t\t= parent::escaparQueryBDCliente($fecha); \n\t\t$idUsuario \t= parent::escaparQueryBDCliente($idUsuario); \n\t\t\n\t\t$query = \"SELECT idAgendaHorarioFechaUsuario, DATE_FORMAT(horaInicio, '%H:%i') as horaInicio, DATE_FORMAT(horaFin, '%H:%i') as horaFin, estado\n\t\t\t\t\tFROM tb_agendaHorarioFechaUsuario\n\t\t\t\t WHERE fecha = '$fecha' AND idUsuario = '$idUsuario'\";\n\t\t\n $conexion = parent::conexionCliente();\n\t\t\n\t\t\n\t\n\t\tif($res = $conexion->query($query)){\n while ($filas = $res->fetch_assoc()) {\n $resultado[] = $filas;\n }\n \n /* liberar el conjunto de resultados */\n $res->free(); \n }\n\n return $resultado;\t\t\n\t\t\t\n\t}", "public function getHoras_solicitadas() {\n return $this->horas_solicitadas;\n }", "function leer_horario($idproveedor){\n\t\t$sql=\"SELECT * FROM catalogo_proveedor_horario WHERE IDPROVEEDOR = '$idproveedor'\";\n\t\t//\t\techo $sql;\n\t\t$result = $this->query($sql);\n\n\t\twhile ($reg = $result->fetch_object())\n\t\t{\n\t\t\t$this->horario = array(\n\t\t\t'HORAINICIO'=>$reg->HORAINICIO,\n\t\t\t'HORAFINAL'=>$reg->HORAFINAL,\n\t\t\t'DOMINGO'=>$reg->DOMINGO,\n\t\t\t'LUNES'=>$reg->LUNES,\n\t\t\t'MARTES'=>$reg->MARTES,\n\t\t\t'MIERCOLES'=>$reg->MIERCOLES,\n\t\t\t'JUEVES'=>$reg->JUEVES,\n\t\t\t'VIERNES'=>$reg->VIERNES,\n\t\t\t'SABADO'=>$reg->SABADO,\n\t\t\t);\n\t\t}\n\t\treturn;\n\t}", "function contador_horas(){\r\n $contadorHoras= new ContadorEstuModel();\r\n return $contadorHoras->contadorHoras();\r\n }", "function API_lista_hijos($tipo_usuario,$tipo_codigo){\n\t$ClsAsi = new ClsAsignacion();\n\t$ClsAcad = new ClsAcademico();\n\t$ClsPen = new ClsPensum();\n\t\n\tif($tipo_codigo != \"\"){\n\t\tif($tipo_usuario === \"3\"){\n\t\t\t$pensum = $ClsPen->get_pensum_activo();\n\t\t\t$result = $ClsAsi->get_alumno_padre($tipo_codigo,\"\");\n\t\t\tif (is_array($result)) {\n\t\t\t\t$i = 0;\n\t\t\t\tforeach($result as $row){\n\t\t\t\t\t$cui = $row[\"alu_cui\"];\n\t\t\t\t\t$arr_data[$i]['cui'] = $row[\"alu_cui\"];\n\t\t\t\t\t$arr_data[$i]['tipo_cui'] = $row[\"alu_tipo_cui\"];\n\t\t\t\t\t$arr_data[$i]['nombre'] = trim($row[\"alu_nombre\"]);\n\t\t\t\t\t$arr_data[$i]['apellido'] = trim($row[\"alu_apellido\"]);\n\t\t\t\t\t$arr_data[$i]['fecha_nacimiento'] = cambia_fecha($row[\"alu_fecha_nacimiento\"]);\n\t\t\t\t\t$arr_data[$i]['edad'] = Calcula_Edad(cambia_fecha($row[\"alu_fecha_nacimiento\"]));\n\t\t\t\t\t$arr_data[$i]['genero'] = $row[\"alu_genero\"];\n\t\t\t\t\t///------------------\n\t\t\t\t\t$result_grado_alumno = $ClsAcad->comprueba_seccion_alumno($pensum,'','','','',$cui,'',1); ////// este array se coloca en la columna de combos\n\t\t\t\t\tif(is_array($result_grado_alumno)){\n\t\t\t\t\t\t$j = 0;\n\t\t\t\t\t\tforeach($result_grado_alumno as $row_grado_alumno){\n\t\t\t\t\t\t\t$arr_grados[$j]['pensum'] = $row_grado_alumno[\"seca_pensum\"];\n\t\t\t\t\t\t\t$arr_grados[$j]['nivel'] = $row_grado_alumno[\"seca_nivel\"];\n\t\t\t\t\t\t\t$arr_grados[$j]['grado'] = $row_grado_alumno[\"seca_grado\"];\n\t\t\t\t\t\t\t$arr_grados[$j]['seccion'] = $row_grado_alumno[\"seca_seccion\"];\n\t\t\t\t\t\t\t$j++;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$arr_data[$i]['seccion'] = $arr_grados;\n\t\t\t\t\t}\n\t\t\t\t\t$i++;\n\t\t\t\t}\n\t\t\t\techo json_encode($arr_data);\n\t\t\t}else{\n\t\t\t\t//devuelve un mensaje de manejo de errores\n\t\t\t\t$arr_data = array(\n\t\t\t\t\t\"status\" => \"error\",\n\t\t\t\t\t\"message\" => \"No exsisten hijos enlazados a este papa...\");\n\t\t\t\t\techo json_encode($arr_data);\n\t\t\t}\n\t\t}else{\n\t\t\t//devuelve un mensaje de manejo de errores\n\t\t\t$arr_data = array(\n\t\t\t\t\"status\" => \"error\",\n\t\t\t\t\"message\" => \"Este usuario no pertenece al grupo de padres...\");\n\t\t\t\techo json_encode($arr_data);\n\t\t}\n\t}else{\n\t\t//devuelve un mensaje de manejo de errores\n\t\t$arr_data = array(\n\t\t\t\"status\" => \"error\",\n\t\t\t\"message\" => \"El codigo de usuario esta vacio\");\n\t\t\techo json_encode($arr_data);\n\t}\n\t\n}", "public function horometersExcel(){ \n return Excel::download(new HorometersExport, 'horometros-list-'.date('Y-m-d_H:i:s').'.xlsx');\n }", "function listar_diccionario() {\n\t\t\t\n\t\t$query = \"SELECT palabras.*\n\t\tFROM palabras\n\t\tORDER BY palabras.id_palabra asc\";\n\n $connection = mysql_connect($this->HOST, $this->USERNAME, $this->PASSWORD);\n\t\t\n\t\t$SelectedDB = mysql_select_db($this->DBNAME);\n\t\t$result = mysql_query($query); \n\t\t\n\t\t$numrows = mysql_num_rows($result);\n\t\tmysql_close($connection);\n\t\t// COMPROBAMOS QUE HAYA RESULTADOS\n\t\t// SI EL NUMERO DE RESULTADOS ES 0 SIGNIFICA QUE NO HAY REGISTROS CON ESOS DATOS\n\t\tif ($numrows == 0) {\n\t\t\treturn $result;\n\t\t}\n\t\telse {\n\t\t\treturn $result;\n\t\t}\n\t}", "public function obtener() {\r\n $horario = new Horario;\r\n $respuestaObtenerHorario = $horario->obtener();\r\n return $respuestaObtenerHorario;\r\n }", "function listadoMesa(){\n\t$query=\"SELECT * FROM mesa ORDER BY hora asc\";\n\tconsulta($query);\t\n}", "public function Guardarhorario()\n\t{\n\t\t$query=\"INSERT INTO horario (dia,mes,anio,hora,estatus) VALUES ('$this->dia','$this->mes','$this->anio','$this->hora','$this->estatus')\";\n\t\t\n\t\t\n\t\t$resp=$this->db->consulta($query);\n\t\t$this->idhorario = $this->db->id_ultimo();\n\t\t\n\t\t\n\t}", "function tabla_horarios_confirmar($fecha,$dia,$curso){\n\t$ClsHor = new ClsHorario();\n\t$result = $ClsHor->get_horario_cursos('','',$dia,'','','',$curso,'','');\n\t\n\tif(is_array($result)){\n\t\t\t$salida.= '<div class=\"panel-body\">';\n $salida.= '<div class=\"dataTable_wrapper\">';\n\t\t\t$salida.= '<table class=\"table table-striped table-bordered table-hover\" id=\"dataTables-example\">';\n\t\t\t$salida.= '<thead>';\n\t\t\t$salida.= '<tr>';\n\t\t\t$salida.= '<th class = \"text-center\" width = \"10px\">No.</th>';\n\t\t\t$salida.= '<th class = \"text-center\" width = \"50px\">DURACI&Oacute;N</th>';\n\t\t\t$salida.= '<th class = \"text-center\" width = \"70px\">HORARIO</th>';\n\t\t\t$salida.= '<th class = \"text-center\" width = \"150px\">CURSO</th>';\n\t\t\t$salida.= '<th class = \"text-center\" width = \"60px\">AULA</th>';\n\t\t\t$salida.= '<th class = \"text-center\" width = \"20px\"><i class=\"fa fa-cog\"></i></th>';\n\t\t\t$salida.= '</tr>';\n\t\t\t$salida.= '</thead>';\n\t\t$i = 1;\n\t\tforeach($result as $row){\n\t\t\t$salida.= '<tr>';\n\t\t\t//codigo\n\t\t\t$dia = $row[\"per_dia\"];\n\t\t\t$hini = $row[\"per_hini\"];\n\t\t\t$salida.= '<td class = \"text-center\">'.$i.'.';\n\t\t\t$salida.= '</td>';\n\t\t\t//duracion\n\t\t\t$min = $row[\"tip_minutos\"];\n\t\t\t$salida.= '<td class = \"text-center\" >'.$min.' MINUTOS</td>';\n\t\t\t//horarios\n\t\t\t$ini = $row[\"per_hini\"];\n\t\t\t$fin = $row[\"per_hfin\"];\n\t\t\t$salida.= '<td class = \"text-center\">'.$ini.'-'.$fin.'</td>';\n\t\t\t//curso\n\t\t\t$curso = utf8_decode($row[\"cur_nombre\"]);\n\t\t\t$salida.= '<td class = \"text-center\">'.$curso.'</td>';\n\t\t\t//aula\n\t\t\t$aula = utf8_decode($row[\"aul_descripcion\"]);\n\t\t\t$salida.= '<td class = \"text-center\">'.$aula.'</td>';\n\t\t\t//--\n\t\t\t$horario = $row[\"hor_codigo\"];\n\t\t\t$usu = $_SESSION[\"codigo\"];\n\t\t\t$hashkey1 = $ClsHor->encrypt($horario, $usu);\n\t\t\t$hashkey2 = $ClsHor->encrypt($fecha, $usu);\n\t\t\t$salida.= '<td class = \"text-center\">';\n\t\t\t$salida.= '<a type=\"button\" class=\"btn btn-primary\" href = \"FRMdetalle_confirmacion_asistencia_curso.php?hashkey1='.$hashkey1.'&hashkey2='.$hashkey2.'\" target = \"_blank\" title = \"Detalle de Asistencia\" ><span class=\"fa fa-search\"></span></a>';\n\t\t\t$salida.= '</td>';\n\t\t\t//--\n\t\t\t$salida.= '</tr>';\n\t\t\t$i++;\n\t\t}\n\t\t$i--;\n\t\t\t$salida.= '</tr>';\n\t\t\t$salida.= '</table>';\n\t\t\t$salida.= '</div>';\n\t\t\t$salida.= '</div>';\n\t}else{\n\t\t$salida='<div class=\"panel-body\">';\n\t\t$salida.='<h6 class=\"alert alert-warning text-center\"> <i class=\"fa fa-warning\"></i> No hay asistencia registrada para esta secci&oacute;n este d&iacute;a...</h6>';\n\t\t$salida.='</div>';\n\t}\n\t\n\treturn $salida;\n}", "public function index()\n {\n $horarios = Horario::select('data', 'servico_id', 'dia', 'mes', 'ano')\n ->where('dia',1)\n ->orderBy('mes','desc')\n ->get();\n \n return view('layouts.horarios.index', compact('horarios'));\n }", "public function getHabitaciones()\r\n {\r\n # inicailizar permisos y roles\r\n $this->set();\r\n\r\n $habitaciones = $this->db->select('*', 'habitaciones');\r\n\r\n return array('customData' => $habitaciones);\r\n\r\n }", "public function show(Horarios $horarios)\n {\n //\n }", "public function mostrarDados(){\n\t\t$sql = \"SELECT cliente.cod_cliente, cliente.nome_cliente, categoria.cod_categoria, categoria.desc_categoria, servico.cod_servico, servico.desc_servico, servico.foto\t\n\t\t\t\tFROM cliente INNER JOIN (categoria INNER JOIN servico ON categoria.cod_categoria = servico.cod_categoria) ON cliente.cod_cliente = servico.cod_cliente\n\t\t\t\twhere cod_servico = '$this->cod_servico'\";\n\t\t$qry= self:: executarSQL($sql);\n\t\t$linha = self::listar($qry);\n\t\t\n\t\t$this-> cod_servico = $linha['cod_servico'];\n\t\t$this-> cod_categoria = $linha['cod_categoria'];\n\t\t$this-> desc_categoria = $linha['desc_categoria'];\n\t\t$this-> cod_cliente = $linha['cod_cliente'];\n\t\t$this-> nome_cliente = $linha['nome_cliente'];\n\t\t$this-> desc_servico = $linha['desc_servico'];\n\t\t$this-> foto = $linha['foto'];\n\t}", "public function horarios(){\n return $this->hasMany('App\\Models\\Horario');\n }", "function listaTodosAniversariantesdeHojeDao(){\r\n require_once (\"conexao.php\");\r\n require_once (\"modelo/objetoMembro.php\");\r\n \r\n $objDao = Connection::getInstance();\r\n \r\n $dataAtual = Date(\"Y-m-d\");\r\n $mes = $dataAtual[5].$dataAtual[6];\r\n $dia = $dataAtual[8].$dataAtual[9];\r\n //echo \"Mes \". $mes. \"Dia \".$dia;\r\n \r\n// $dbconn = mysqli_connect ($objDao->getServer(),$objDao->getUsername(),$objDao->getPassword(),$objDao->getDb());\r\n \r\n// $resultado = mysqli_query ($dbconn,\"CALL aniversariantedehoje($mes,$dia)\");\r\n $consulta=\"SELECT Matricula,Nome,DataNascimento1,Fone FROM membros WHERE MONTH(DataNascimento1) = $mes AND DAY(DataNascimento1)=$dia\";\r\n \r\n $resultado = mysql_query($consulta) or die (\"Nao foi possivel realizar a busca\".mysql_error());\r\n \r\n $listaMembro = array();\r\n \r\n $i=0;\r\n \r\n while ($registro = mysql_fetch_array($resultado, MYSQL_ASSOC)){\r\n \r\n\t $membro = new objetoMembro();\r\n \r\n $membro->setMatricula($registro['Matricula']);\r\n $membro->setNome($registro['Nome']);\r\n $membro->setData($registro['DataNascimento1']); \r\n $membro->setFone($registro['Fone']); \r\n \r\n\t $listaMembro[$i] = $membro;\r\n \r\n\t $i++;\r\n\t}\r\n \r\n \r\n\t\treturn $listaMembro;\r\n\t\tmysql_free_result($resultado);\r\n $objDao->freebanco();\r\n \r\n \r\n }", "private static function setHorarioDeVerao() {\n $dataJunta = self::getAnoAtual() . self::getMesAtual() . self::getDiaAtual();\n //self::$horario_de_verao = ($dataJunta > '20121021' && $dataJunta < '20130217' ) ? true : false;\n self::$horario_de_verao = (date('I') == \"1\") ? true : false;\n return self::getHorarioDeVerao();\n }", "public function consultar_horas($tarea, $usuario,$dia)\n\n {\n\n\n\n $this->db->select('hora,id');\n\n $this->db->from('tarea_detalle');\n\n $this->db->where('tarea_id', $tarea);\n\n $this->db->where('usuario_id', $usuario);\n\n $this->db->where('fecha', $dia);\n\n $query = $this->db->get();\n\n // echo $this->db->last_query();\n\n\n return $query->result_array(); \n\n }", "function listar_historial(){\n\t\tif (isset($_POST['buscar']))\n\t\t\t$_SESSION['buscar']=$_POST['buscar'];\n\t\t\n\t\t$sql=\"SELECT * FROM historial ORDER BY id_his\";\n\t\t\n\t\t$consulta=mysql_query($sql);\n\t\twhile ($resultado = mysql_fetch_array($consulta)){\n\t\t\t$this->mensaje=\"si\";\n\t\t\t$this->listado[] = $resultado;\n\t\t}\n\t}", "function precioHospitalizacion(){\n\t\t\t\t\n\t\t$resultado = array();\n\t\t\n\t\t$query = \"SELECT precioHoraHospitalizacion\n\t\t\t\t\tFROM tb_configuraciones\";\n\t\t\n\t\t$conexion = parent::conexionCliente();\n\t\t\n\t\tif($res = $conexion->query($query)){\n \n /* obtener un array asociativo */\n while ($filas = $res->fetch_assoc()) {\n $resultado = $filas;\n }\n \n /* liberar el conjunto de resultados */\n $res->free();\n \n }\n\n return $resultado['precioHoraHospitalizacion'];\t\t\t\t\n\t\t\n\t}", "function dptos_hojas()\r\n\t{\r\n\r\n\t\t$Consulta = '\r\n\t\t\tselect distinct dpto.id_dpto, departamento\r\n\t\t\tfrom departamentos dpto, revision_item item\r\n\t\t\twhere dpto.id_dpto = item.id_dpto\r\n\t\t';\r\n\t\t$Resultado = $this->db->query($Consulta);\r\n\r\n\r\n\t\treturn $Resultado->result_array();\r\n\r\n\t}", "static function getEntradasHoy() {\n\n $ped = new PedidosCab();\n $tablaPedidos = $ped->getDataBaseName() . \".\" . $ped->getTableName();\n $prov = new Proveedores();\n $tablaProveedores = $prov->getDataBaseName() . \".\" . $prov->getTableName();\n\n $rows = array();\n $hoy = date('Y-m-d');\n\n $em = new EntityManager($ped->getConectionName());\n if ($em->getDbLink()) {\n $query = \"select a.PrimaryKeyMD5 as PrimaryKeyMD5,IDPedido,Fecha,RazonSocial,TotalBases from {$tablaPedidos} as a left join {$tablaProveedores} as c on a.IDProveedor=c.IDProveedor where (IDEstado='1') and FechaEntrega='{$hoy}' order by Fecha ASC\";\n $em->query($query);\n $rows = $em->fetchResult();\n }\n unset($em);\n unset($ped);\n unset($prov);\n\n return $rows;\n }", "public function listarLinhaHorario($linha_horario)\n {\n// var_dump($linha_horario[1]);die();\n $select = $this->select()->setIntegrityCheck(false);\n $select->from(array('L' => 'LINHA'), array('L.ID_LINHA', 'L.descricao'))\n ->from(array('LH' => 'LINHA_HORARIOS'), array('LH.*'))\n ->from(array('D' => 'DIA'), array('D.ID_DIA', 'D.DESCRICAO'))\n ->where('L.ID_LINHA = LH.ID_LINHA')\n ->where('LH.ID_DIA = D.ID_DIA')\n ->where('LH.ID_LINHA = \"' . $linha_horario[1] . '\"')\n ->where('LH.ID_DIA = \"' . $linha_horario[0] . '\"')\n ->where('LH.HORARIO_INICIO = \"' . $linha_horario[2] . '\"');\n\n// var_dump($select->__toString());die();\n// o var_dump serve pra ti ver o resultado da instrução sql na página\n\n return $this->fetchAll($select);\n }", "public function consultar_horas_extras()\n\t{\n\t\t$this->seguridad_lib->acceso_metodo(__METHOD__);\n\n\t\t$datos['titulo_contenedor'] = 'Reportes';\n\t\t$datos['titulo_descripcion'] = 'Consultar horas extras';\n\t\t$datos['contenido'] = 'reportes/consulta_horas_extras_form';\n\n\t\t$datos['form_action'] = 'Reportes/reporte_horas_extras';\n\n\t\t$datos['e_footer'][] = array('nombre' => 'DatePicker JS','path' => base_url('assets/datepicker/dist/js/bootstrap-datepicker.js'), 'ext' =>'js');\n\t\t$datos['e_footer'][] = array('nombre' => 'DatePicker Languaje JS','path' => base_url('assets/datepicker/dist/locales/bootstrap-datepicker.es.min.js'), 'ext' =>'js');\n\t\t$datos['e_header'][] = array('nombre' => 'DatePicker CSS','path' => base_url('assets/datepicker/dist/css/bootstrap-datepicker3.min.css'), 'ext' =>'css');\n\n\t\t$datos['e_footer'][] = array('nombre' => 'jQuery Validate','path' => base_url('assets/jqueryvalidate/dist/jquery.validate.js'), 'ext' =>'js');\n\t\t$datos['e_footer'][] = array('nombre' => 'jQuery Validate Language ES','path' => base_url('assets/jqueryvalidate/dist/localization/messages_es.js'), 'ext' =>'js');\n\n\t\t$datos['e_footer'][] = array('nombre' => 'Config Form JS','path' => base_url('assets/js/reportes/v_consultar_horas_extras_form.js'), 'ext' =>'js');\n\n\t\t$this->template_lib->render($datos);\n\t}", "public function getHistorial()\n {\n $stmt = Conexion::conectar()->prepare('SELECT *from historiales');\n $stmt->execute();\n }", "public function fetchHours(){\n $sql = $this->db->query(\"SELECT * FROM posible_fisio ORDER BY dia, hora_i\");\n $list_db = $sql->fetchAll(PDO::FETCH_ASSOC);\n\n if($list_db != NULL) {\n return $list_db;\n } else {\n return NULL;\n }\n }", "public function contarAlumnosController(){\n\t\t$stmt = Conexion::conectar()->prepare(\"SELECT COUNT(*) FROM sesion_cai WHERE fecha = CURDATE() AND hora >= DATE_FORMAT(NOW(), '%k:00:00') AND hora <= DATE_FORMAT(NOW(), '%k:59:59') AND asistencia=0\"); //se prepara la conexion\n\t\t//definicion de parametros\n\t\t$stmt->execute(); //ejecucion mediante pdo\n\t\treturn $stmt->fetch()[0]; //se retorna lo asociado a la consulta\n\t\t$stmt->close();\n\t}", "function listar_palabras() {\n\n\t\t$query = \"SELECT *\n\t\tFROM palabras\";\n\t\t\n $connection = mysql_connect($this->HOST, $this->USERNAME, $this->PASSWORD);\n\t\t\n\t\t$SelectedDB = mysql_select_db($this->DBNAME);\n\t\t$result = mysql_query($query); \n\t\t\n\t\t$numrows = mysql_num_rows($result);\n\t\t$row= mysql_fetch_array($result);\n\t\tmysql_close($connection);\n\t\t// COMPROBAMOS QUE HAYA RESULTADOS\n\t\t// SI EL NUMERO DE RESULTADOS ES 0 SIGNIFICA QUE NO HAY REGISTROS CON ESOS DATOS\n\t\tif ($numrows == 0) {\n\t\t\treturn $result;\n\t\t}\n\t\telse {\n\t\t\treturn $result;\n\t\t}\n\t}", "public function index()\n {\n $horarios = Horario::orderBy('linha', 'ASC')->orderBy('horario','ASC')->get();\n $campi = Campus::all();\n $linhas = Linha::all();\n foreach($horarios as $horario){\n foreach($campi as $campus){\n if($horario->campus == $campus->id){\n $horario->campus = $campus->nomeCampus;\n }\n }\n foreach($linhas as $linha){\n if($horario->linha == $linha->id){\n $horario->linha = $linha->nomeLinha;\n }\n }\n if($horario->chegada!=null){\n $horario->chegada='Sim';\n }\n }\n return view('horarios.index', compact('horarios'));\n }", "public function getHari()\n {\n return $this->hari;\n }", "public function index()\n {\n $tiempos = Tiempo::all();//todos los datos de la tabla tiempo\n\n $sumaMinutosTotales = 0;\n $sumaHorasTotales=0;\n $cantidadMinutos = 0;\n $cantidadHoras = 0;\n $horaFalta = 0;\n $minutosFalta = 0;\n\n //sacar las horas y minutos por cada lapso\n foreach ($tiempos as $key => $value) {//SACAR INFORMACION DE tiempos de la BD\n if($value->estado != 0){\n //datos de tiempo comienzo y final\n $comienzo = $value->comienzo;\n $final = $value->final;\n \n if($final != null){\n $cantidadMinutos = 0;\n $cantidadHoras = 0;\n // minutos de la hora de comienzo y final\n $minutosInicial = $comienzo[3] . $comienzo[4];\n $minutosFinal = $final[3] . $final[4];\n\n\n //horas de las horas comienzo y final\n $horaComienzo = $comienzo[0] . $comienzo[1];\n $horaFinal = $final[0] . $final[1];\n\n \n //mminutos auxiliares\n $minutosInicialaux =$minutosInicial;\n $minutosFinalaux = $minutosFinal;\n \n //horas auxiliares\n\n $horaInicialAux = $horaComienzo;\n $horaFinalAux = $horaFinal;\n \n \n\n if($minutosFinal == 0){\n \n \n for ($i=$minutosFinalaux; $i < $minutosInicialaux; $i++) { \n $cantidadMinutos++;\n \n }\n\n if($minutosInicial != 0){\n $cantidadMinutos = 60 - $cantidadMinutos;\n }\n \n if($horaComienzo > $horaFinal){\n $lapsoMinuto24 = 24 - $horaComienzo;\n \n for ($i=0; $i < $horaFinalAux; $i++) { \n $cantidadHoras++;\n \n }\n $cantidadHoras = $cantidadHoras + $lapsoMinuto24;\n }else{\n\n if($minutosInicial > $minutosFinal){\n $cantidadHoras = $horaFinal - $horaComienzo - 1;\n }else{\n $cantidadHoras = $horaFinal - $horaComienzo;\n }\n\n \n \n } \n \n \n }\n \n\n //calculo de tiempo por lapsos\n if($minutosInicial > $minutosFinal && $minutosFinal!=0 && $minutosInicial!=0) {\n\n \n for ($i=$minutosFinalaux; $i < $minutosInicialaux; $i++) { \n $cantidadMinutos++;\n }\n \n \n if($horaComienzo > $horaFinal){\n $lapsoMinuto24 = 24 - $horaComienzo;\n \n $cantidadHoras = $horaComienzo - $horaFinal;\n $cantidadHoras = 24 - $cantidadHoras -1;\n \n $cantidadMinutos = 60- $cantidadMinutos;\n }else{\n $cantidadMinutos = 60- $cantidadMinutos;\n $cantidadHoras= $horaFinal - $horaComienzo;\n\n if($cantidadHoras == 1){\n $cantidadHoras = 0;\n }else{\n $cantidadHoras = $cantidadHoras-1;\n }\n }\n \n }\n \n if($minutosInicial < $minutosFinal && $minutosFinal!=0 && $minutosInicial!=0){\n \n for ($i=$minutosInicialaux; $i < $minutosFinalaux; $i++) { \n $cantidadMinutos++;\n \n }\n if($horaComienzo > $horaFinal){\n $lapsoMinuto24 = 24 - $horaComienzo;\n \n for ($i=0; $i < $horaFinalAux; $i++) { \n $cantidadHoras++;\n \n }\n $cantidadHoras = $cantidadHoras + $lapsoMinuto24;\n }else{\n $cantidadHoras = $horaFinal - $horaComienzo;\n /*if($cantidadHoras == 1){\n $cantidadHoras = 0;\n }*/ \n } \n \n } \n\n //si la hora de comienzo es igual a la hora final \n\n if($minutosInicial == $minutosFinal){\n \n if($horaComienzo > $horaFinal){\n $cantidadHoras = $horaComienzo - $horaFinal;\n $cantidadHoras = 24 - $cantidadHoras;\n }else{\n $cantidadHoras = $horaFinal - $horaComienzo;\n }\n \n var_dump(\"jola\");\n }\n\n //\n if($minutosInicial == 0 && $minutosFinal!=0 ){\n for ($i=$minutosInicialaux; $i < $minutosFinalaux; $i++) { \n $cantidadMinutos++;\n \n }\n \n if($horaComienzo > $horaFinal){\n $lapsoMinuto24 = 24 - $horaComienzo;\n \n for ($i=0; $i < $horaFinalAux; $i++) { \n $cantidadHoras++;\n \n }\n $cantidadHoras = $cantidadHoras + $lapsoMinuto24;\n }else{\n $cantidadHoras = $horaFinal - $horaComienzo;\n \n } \n }\n\n $sumaMinutosTotales = $sumaMinutosTotales + $cantidadMinutos;\n \n }else{\n \n $cantidadMinutos = 0;\n $horaComienzo = $comienzo[0] . $comienzo[1];\n $minutosInicial = $comienzo[3] . $comienzo[4];\n\n $horaFinal= date('H');\n $minutosFinal = date('i');\n\n //minutos auxiliares\n\n $minutosInicialaux =$minutosInicial;\n $minutosFinalaux = $minutosFinal;\n \n //horas auxiliares\n\n $horaInicialAux = $horaComienzo;\n $horaFinalAux = $horaFinal;\n \n if($minutosFinal == 0){\n \n \n for ($i=$minutosFinalaux; $i < $minutosInicialaux; $i++) { \n $cantidadMinutos++;\n \n }\n\n if($minutosInicial != 0){\n $cantidadMinutos = 60 - $cantidadMinutos;\n }\n \n if($horaComienzo > $horaFinal){\n $lapsoMinuto24 = 24 - $horaComienzo;\n \n for ($i=0; $i < $horaFinalAux; $i++) { \n $cantidadHoras++;\n \n }\n $cantidadHoras = $cantidadHoras + $lapsoMinuto24;\n }else{\n $cantidadHoras++;\n } \n \n }\n \n\n //calculo de tiempo por lapsos\n if($minutosInicial > $minutosFinal && $minutosFinal!=0 && $minutosFinal!=0 && $minutosInicial!=0){\n\n \n for ($i=$minutosFinalaux; $i < $minutosInicialaux; $i++) { \n $cantidadMinutos++;\n }\n \n /*\n if($horaComienzo==$horaFinal){\n if($minutosInicial == $minutosFinal){\n $cantidadHoras =24;\n }else{\n $cantidadHoras = 23;\n \n \n }\n }*/\n \n if($horaComienzo > $horaFinal){\n \n $lapsoMinuto24 = 24 - $horaComienzo;\n \n for ($i=0; $i < $horaFinalAux; $i++) { \n $cantidadHoras++;\n \n }\n $cantidadHoras = $cantidadHoras + $lapsoMinuto24;\n }else{\n $cantidadMinutos = 60- $cantidadMinutos;\n $cantidadHoras= $horaFinal - $horaComienzo;\n\n if($cantidadHoras == 1){\n $cantidadHoras = 0;\n }else{\n $cantidadHoras = $horaFinal - $horaComienzo -1;\n }\n }\n \n }\n \n //Si minuto Inicial es menor que minutos del final\n \n if($minutosInicial < $minutosFinal && $minutosFinal!=0 && $minutosInicial!=0){\n \n for ($i=$minutosInicialaux; $i < $minutosFinalaux; $i++) { \n $cantidadMinutos++;\n \n }\n if($horaComienzo > $horaFinal){\n $lapsoMinuto24 = 24 - $horaComienzo;\n \n for ($i=0; $i < $horaFinalAux; $i++) { \n $cantidadHoras++;\n \n }\n $cantidadHoras = $cantidadHoras + $lapsoMinuto24;\n }else{\n \n $cantidadHoras = $horaFinal - $horaComienzo;\n /* if($cantidadHoras == 1){\n $cantidadHoras = 0;\n }*/ \n } \n \n } \n\n //si la hora de comienzo es igual a la hora final \n\n if($minutosInicial == $minutosFinal){\n \n $cantidadHoras = $horaFinal - $horaComienzo;\n \n }\n //\n if($minutosInicial == 0 && $minutosFinal!=0 ){\n for ($i=$minutosInicialaux; $i < $minutosFinalaux; $i++) { \n $cantidadMinutos++;\n \n }\n \n if($horaComienzo > $horaFinal){\n $lapsoMinuto24 = 24 - $horaComienzo;\n \n for ($i=0; $i < $horaFinalAux; $i++) { \n $cantidadHoras++;\n \n }\n $cantidadHoras = $cantidadHoras + $lapsoMinuto24;\n }else{\n $cantidadHoras = $horaFinal - $horaComienzo;\n \n } \n }\n \n $sumaMinutosTotales = $sumaMinutosTotales + $cantidadMinutos;\n \n }\n // calculo de horas totales de todos los lapsos\n if($sumaMinutosTotales >=60){\n \n $sumaMinutosTotales = $sumaMinutosTotales - 60;\n $sumaHorasTotales = $sumaHorasTotales + 1;\n \n }\n if($sumaHorasTotales <= 60 && $cantidadHoras >0){\n $sumaHorasTotales = $sumaHorasTotales + $cantidadHoras;\n }\n\n \n //var_dump('tiempo lapso: '.$cantidadHoras.':'.$cantidadMinutos);\n //var_dump((string)$sumaHorasTotales.':'.(string)$sumaMinutosTotales);\n }\n \n //calculo de tiempo que falta en 15 horas\n \n $horaFalta = 15 - $sumaHorasTotales;\n $minutosFalta = 60 - $sumaMinutosTotales;\n\n if($minutosFalta == 60){\n $minutosFalta = 0;\n }\n \n }\n \n \n \n if(session('success')){\n Alert::success('Éxito',session('success') );\n }\n\n if(session('error')){\n Alert::error('Error',session('error') );\n }\n return view('tiempo.index', compact('tiempos','sumaHorasTotales','sumaMinutosTotales', 'horaFalta', 'minutosFalta'));\n }", "public function busca_alunos(){\n\n\t\t\t$sql = \"SELECT * FROM aluno\";\n\n\t\t\t/*\n\t\t\t*isntrução que realiza a consulta de animes\n\t\t\t*PDO::FETCH_CLASS serve para perdir o retorno no modelo de uma classe\n\t\t\t*PDO::FETCH_PROPS_LATE serve para preencher os valores depois de executar o contrutor\n\t\t\t*/\n\n\t\t\t$resultado = $this->conexao->query($sql, PDO::FETCH_CLASS | PDO::FETCH_PROPS_LATE, 'Aluno');\n\n $alunos = [];\n\n foreach($resultado as $aluno){\n $alunos[] = $aluno;\n }\n\n \t\t\treturn $alunos;\n\t\t}", "function ponerHorasTaller(){\n // y precios 15 1h, 21, 1.5h, 31 2h.\n $sql=\"SELECT id,precio_trimestre FROM casal_talleres WHERE id_curso=4 AND tipo_taller='Professional'\";\n $result=$this->db->query($sql)->result();\n foreach($result as $k=>$v){\n $horasSesion=0;\n $id=$v->id;\n if($v->precio_trimestre=='21') $horasSesion=1.5*1100;\n if($v->precio_trimestre=='31') $horasSesion=2*1100;\n if($v->precio_trimestre=='15') $horasSesion=1*1100;\n $sql=\"UPDATE casal_talleres SET horas_taller_T1='$horasSesion', horas_taller_T2='$horasSesion', horas_taller_T3='$horasSesion'WHERE id='$id'\";\n $this->db->query($sql);\n }\n }", "function horarios()\n {\n $this->view2->__construct($this->dataView,$this->dataTable);\n $this->view2->show();\n }", "private function getAllProgram($horarios)\n {\n \t\n\n \tforeach ($horarios as $i => $horario)\n {\n if($i==0)\n {\n $i = 1;\n }\n if($horarios[$i]->programa_id != $horarios[$i-1]->programa_id)\n {\n $programa = $this->getProgram($horario->programa_id);\n //////////////////// \n $programa->horario = $horario->hora_inicio ;// $this->getHoraProgram($horario->id_hora_inicio)->hora;\n \n $programas[$i] = $programa; \n }\n \t\n }\n\n return $programas;\n }", "public function getHijos($id_contenido){\r\n\t\t$sql = 'SELECT c1.* '.\r\n\t\t\t'FROM contenidos c1 '.\r\n\t\t\t'WHERE padre = ? '.\r\n\t\t\t'ORDER BY c1.nombre ASC ';\r\n\t\t \r\n\t\t$sqlQuery = new SqlQuery($sql);\r\n\t\t$sqlQuery->setNumber($id_contenido);\r\n\t\t \r\n\t\treturn $this->getList($sqlQuery);\r\n\t}", "public function Modificarhorario()\n\t{\n\t\t$query=\"UPDATE horario SET dia='$this->dia',\n\t\tmes='$this->mes',\n\t\tanio='$this->anio',\n\t\thora='$this->hora',\n\t\testatus='$this->estatus'\n\t\tWHERE idhorario=$this->idhorario\";\n\n\t\t$resp=$this->db->consulta($query);\n\t}", "function getAllInfo(){\n //Creamos la consulta\n $sql = \"SELECT * FROM usuarios;\";\n //obtenemos el array con toda la información\n return $this->getArraySQL($sql);\n }", "public function ListarUsuarios()\n{\n\tself::SetNames();\n\t$sql = \" select * from usuarios \";\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}", "public function ultimosPedidos(){\n //$conexao = $c->conexao();\n\n\n $sql = \"SELECT a.*, c.nome,date_format(data_inc, '%H:%i') AS hora FROM tbpedidos a,tbclientes c where c.reg = a.reg and a.status = 'A' order by a.idpedido desc;\";\n $sql = $this->conexao->query($sql);\n\n $dados = array();\n\n while ($row = $sql->fetch_assoc()) {\n \n $dado = array();\n\n $dado['idpedido'] = $row[\"idpedido\"];\n $dado['reg'] = $row[\"reg\"];\n $dado['tipo'] = $row[\"tipo\"];\n $dado['nome'] = $row[\"nome\"];\n $dado['status'] = $row[\"status\"];\n $dado['titulo'] = $row[\"titulo\"];\n $dado['hora'] = $row[\"hora\"];\n $dado['valor'] = number_format($row[\"valor\"], 2, \",\", \".\");\n $dados[] = $dado;\n\n }\n\n return $dados;\n\n }", "public function getAll()\n {\n // 1. abro la conexión con MySQL \n $db = $this->createConection();\n // 2. enviamos la consulta (3 pasos)\n $sentencia = $db->prepare(\"SELECT * FROM computadora\"); // prepara la consulta\n $sentencia->execute(); // ejecuta\n $computadora = $sentencia->fetchAll(PDO::FETCH_OBJ); // obtiene la respuesta\n return $computadora;\n }", "function getUsuarios(){\n\t\n\t\treturn conectar()->query( \"SELECT * FROM usuarios\");\n\t}", "function armarSemana($horarios, $horarioActual, $dias) {\n\tforeach($horarios as $hora) { //Se recorre el array de horarios\n\t\techo \"<tr><td>\".$hora.\"</td>\";\n\t\tforeach($dias as $dia=>$fecha) {\n\t\t\t$vacio = true;\n\t\t\tif($dia != \"Domingo\") {\n\t\t\t\tforeach ($horarioActual as $campo=>$estado) {\t//Se recorre el array de turnos del dia\n\t\t\t\t\tif (isset($_POST['patologias']) && $_POST['patologias'] != $estado['patologia']) { continue; }\n\t\t\t\t\tif ($hora == date(\"H:i\", strtotime($estado['HORA_TURNO'])) && date(\"w\", strtotime($estado['FECHA_TURNO'])) == date(\"w\", strtotime($fecha))) {\t//Si el turno coincide con el horario y el dia\n\t\t\t\t\t\tif (verificarLaborable($hora, $dia) == true) {\n\t\t\t\t\t\t\t$vacio = false;\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t$cupos = obtenerCuposTurno($estado['FECHA_TURNO'], $hora); //guardo cantidad de cupos por hora y fecha dadas\n\t\t\t\t\t\t\t$cantCamillas = 0;\n\t\t\t\t\t\t\t$cantGimnasio = 0;\n\t\t\t\t\t\t\tforeach($cupos as $reg=>$camp) {\t//en este for asigno las cantidades para cada categoria\n\t\t\t\t\t\t\t\tif($camp['sesion'] == \"Camilla\") {\n\t\t\t\t\t\t\t\t\t$cantCamillas += $camp['cantidad'];\n\t\t\t\t\t\t\t\t} elseif($camp['sesion'] ==\"Gimnasio\") {\n\t\t\t\t\t\t\t\t\t$cantGimnasio += $camp['cantidad'];\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$disponibilidad = estadoTurno($cantCamillas, $cantGimnasio);\n\n\t\t\t\t\t\t\tif ($disponibilidad == \"Disponible\") { //If que determina los colores de las casillas\n\t\t\t\t\t\t\t\t$colorCasilla = \"disponible\";\n\t\t\t\t\t\t\t} elseif($disponibilidad == \"Libre\") {\n\t\t\t\t\t\t\t\t$colorCasilla = \"libre\";\n\t\t\t\t\t\t\t} elseif($disponibilidad == \"Ocupado\") {\n\t\t\t\t\t\t\t\t$colorCasilla = \"ocupado\";\n\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/*if ($GLOBALS['perfil'] == \"profesional\") { //si el perfil es de profesional, se veran los cupos disponibles\n\t\t\t\t\t\t\t\techo \"<td class=\".$colorCasilla.\">\".$estado[\"camilla\"].\"</td>\",\n\t\t\t\t\t\t\t\t\"<td class=\".$colorCasilla.\">\".$estado[\"gimnasio\"].\"</td>\";\n\t\t\t\t\t\t\t} else { */\n\t\t\t\t\t\t\techo \"<td class=\".$colorCasilla.\">\".cantidadCupos($cantCamillas, $GLOBALS['MaximoCamillas']).\"</td>\",\n\t\t\t\t\t\t\t\"<td class=\".$colorCasilla.\">\".cantidadCupos($cantGimnasio, $GLOBALS['MaximoGimnasio']).\"</td>\";\n\t\t\t\t\t\t\t\n\n\t\t\t\t\t\t\tif ($disponibilidad == \"Disponible\") { \n\t\t\t\t\t\t\t\techo \"<td class=\".$colorCasilla.\"><input type='button' value='Si' onclick='location=\\\"reservar.php?fecha=\".$fecha.\"&hora=\".$hora.\"\\\";'/></td>\";\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\techo \"<td class=\".$colorCasilla.\">No</td>\";\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t} elseif (verificarLaborable($hora, $dia) == false) {\n\t\t\t\t\t\t\t//Si la hora dada no es laboral el dia dado, entonces\n\t\t\t\t\t\t\techo \"<td class='cerrado'>-</td>\", \n\t\t\t\t\t\t\t\"<td class='cerrado'>-</td>\",\n\t\t\t\t\t\t\t\"<td class='cerrado'>-</td>\";\n\t\t\t\t\t\t}\n\t\t\t\t\t} \n\t\t\t\t}\n\t\t\t\tif ($vacio == true) {\n\t\t\t\t\t\tif(verificarLaborable($hora, $dia)) {\n\t\t\t\t\t\t\tif ($_SESSION['perfil'] == \"Administrador\") {\n\t\t\t\t\t\t\t\techo \"<td class='libre'>\".$GLOBALS['MaximoCamillas'].\"</td>\", \"<td class='libre'>\".$GLOBALS['MaximoGimnasio'].\"</td>\";\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\techo \"<td class='libre'>Si</td>\", \"<td class='libre'>Si</td>\"; \n\t\t\t\t\t\t\t} \n\t\t\t\t\t\t\techo \"<td class='libre'><input type='button' value='Si' onclick='location=\\\"reservar.php?fecha=\".$fecha.\"&hora=\".$hora.\"\\\";'/></td>\";\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t//Si la hora dada no es laboral el dia dado, entonces\n\t\t\t\t\t\t\techo \"<td class='cerrado'>-</td>\", \n\t\t\t\t\t\t\t\"<td class='cerrado'>-</td>\",\n\t\t\t\t\t\t\t\"<td class='cerrado'>-</td>\";\n\t\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\techo \"</tr>\";\n\t}\n}", "public function consultarUsuario(){\n //$conexao = $c->conexao();\n\n $sql = \"SELECT c.*, a.permissao FROM tbusuarios c, tbpermissao a where c.idpermissao = a.idpermissao and permissao <> 'SUPER-ADMIN'order by c.nome\";\n $sql = $this->conexao->query($sql);\n\n $dados = array();\n\n while ($row = $sql->fetch_assoc()) {\n $idusuario = $row[\"idusuario\"];\n $nome = $row[\"nome\"];\n $email = $row[\"email\"];\n $dtnascimento = $row[\"dt_nascimento\"];\n $telefone = $row[\"telefone\"];\n $dtnascimento = $row[\"dt_nascimento\"];\n $habilitado = $row[\"habilitado\"];\n $permissao = $row[\"permissao\"]; \n $idpermissao = $row[\"idpermissao\"]; \n\n $dado = array();\n $dado['idusuario'] = $idusuario;\n $dado['nome'] = $nome;\n $dado['email'] = $email;\n $dado['senha'] = $row['senha'];\n $dado['senha_confirma'] = $row['senha_confirma'];\n $dado['idpermissao'] = $idpermissao;\n $dado['permissao'] = $permissao;\n $dado['telefone'] = $telefone;\n $dado['dtnascimento'] = $dtnascimento;\n $dado['habilitado'] = $habilitado; \n $dados[] = $dado;\n }\n\n return $dados;\n\n }", "function historial(){\n\n\t\t//Instanciamos y nos conectamos a la bd\n\t\t$Conexion = floopets_BD::Connect();\n\t\t$Conexion->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);\n\t\t//Crear el query que vamos a realizar\n\t\t$consulta = \"SELECT tipo_denuncia.*,denuncia.* FROM denuncia INNER JOIN tipo_denuncia ON denuncia.td_cod_tipo_denuncia=tipo_denuncia.td_cod_tipo_denuncia WHERE denuncia.de_estado='tomado'\";\n\t\t$query = $Conexion->prepare($consulta);\n\t\t$query->execute();\n\t\t//Devolvemos el resultado en un arreglo\n\t\t//Fetch: es el resultado que arroja la consulta en forma de un vector o matriz segun sea el caso\n\t\t//Para consultar donde arroja mas de un dato el fatch debe ir acompañado con la palabra ALL\n\t\t$resultado = $query->fetchALL(PDO::FETCH_BOTH);\n\t\treturn $resultado;\n\t\tfloopets_BD::Disconnect();\n\t}", "function getDescripcionHorario(){\n\t\tglobal $usr;\n\t\tglobal $dias_semana;\n\n\t\t/* TEMPLATE DEL GRAFICO */\n\t\t$T =& new Template_PHPLIB(($this->extra[\"imprimir\"])?REP_PATH_PRINTTEMPLATES:REP_PATH_TABLETEMPLATES);\n\t\t$T->setFile('tpl_tabla', 'descripcion_horario.tpl');\n\t\t$T->setBlock('tpl_tabla', 'ES_PRIMERO_DIA', 'es_primer_dia');\n\t\t$T->setBlock('tpl_tabla', 'BLOQUE_HORARIO', 'bloque_horario');\n\t\t$T->setBlock('tpl_tabla', 'BLOQUE_TODO_HORARIO', 'bloque_todo_horario');\n\n\t\t$T->setVar('bloque_horario', '');\n\t\t$T->setVar('bloque_todo_horario', '');\n\n\t\t$horario = $usr->getHorario($this->horario_id);\n\t\t$T->setVar('__item_orden', $this->extra[\"item_orden\"]);\n\t\t$T->setVar('__horario_orden', 1);\n\t\t$T->setVar('__horario_nombre',$horario->nombre);\n\t\t$tiene_horarios = false;\n\n\t\t$linea = 1;\n\t\tforeach ($dias_semana as $dia_id => $dia_nombre) {\n\t\t\t$items = $horario->getDiaSemanaItems($dia_id);\n\t\t\t$primero = true;\n\t\t\tforeach ($items as $id => $item) {\n\t\t\t\tif ($primero == true) {\n\t\t\t\t\t$T->setVar('__dia', $dia_nombre);\n\t\t\t\t\t$T->setVar('__dia_rowspan', count($items));\n\t\t\t\t\t$T->parse('es_primer_dia', 'ES_PRIMERO_DIA', false);\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\t$T->setVar('es_primer_dia', '');\n\t\t\t\t}\n\n\t\t\t\t$T->setVar('__print_class', ($linea % 2 == 0)?\"celdaIteracion2\":\"celdaIteracion1\");\n\t\t\t\t$T->setVar('__class', ($linea % 2 == 0)?\"celdanegra15\":\"celdanegra10\");\n\t\t\t\t$T->setVar('__horaInicio', $item->hora_inicio);\n\t\t\t\t$T->setVar('__horaTermino', $item->hora_termino);\n\t\t\t\t$T->parse('bloque_horario', 'BLOQUE_HORARIO', true);\n\t\t\t\t$primero = false;\n\t\t\t\t$tiene_horarios = true;\n\t\t\t\t$linea++;\n\t\t\t}\n\t\t}\n\t\tif ($tiene_horarios == false) {\n\t\t\t$T->parse('bloque_todo_horario', 'BLOQUE_TODO_HORARIO', false);\n\t\t}\n\t\t$this->resultado = $T->parse('out', 'tpl_tabla');\n\t}", "public function getDados()\n {\n $aLinhas = array();\n\n /**\n * montamos as datas, e processamos o balancete de verificação\n */\n $oDaoPeriodo = db_utils::getDao(\"periodo\");\n $sSqlDadosPeriodo = $oDaoPeriodo->sql_query_file($this->iCodigoPeriodo);\n $rsPeriodo = db_query($sSqlDadosPeriodo);\n $oDadosPerido = db_utils::fieldsMemory($rsPeriodo, 0);\n $sDataInicial = \"{$this->iAnoUsu}-01-01\";\n $iUltimoDiaMes = cal_days_in_month(CAL_GREGORIAN, $oDadosPerido->o114_mesfinal, $this->iAnoUsu);\n $sDataFinal = \"{$this->iAnoUsu}-{$oDadosPerido->o114_mesfinal}-{$iUltimoDiaMes}\";\n $sWherePlano = \" c61_instit in ({$this->getInstituicoes()}) \";\n /**\n * processa o balancete de verificação\n */\n $rsPlano = db_planocontassaldo_matriz($this->iAnoUsu,\n $sDataInicial,\n $sDataFinal,\n false,\n $sWherePlano,\n '',\n 'true',\n 'true');\n\n $iTotalLinhasPlano = pg_num_rows($rsPlano);\n /**\n * percorremos a slinhas cadastradas no relatorio, e adicionamos os valores cadastrados manualmente.\n */\n $aLinhasRelatorio = $this->oRelatorioLegal->getLinhasCompleto();\n for ($iLinha = 1; $iLinha <= count($aLinhasRelatorio); $iLinha++) {\n\n $aLinhasRelatorio[$iLinha]->setPeriodo($this->iCodigoPeriodo);\n $aColunasRelatorio = $aLinhasRelatorio[$iLinha]->getCols($this->iCodigoPeriodo);\n $aColunaslinha = array();\n $oLinha = new stdClass();\n $oLinha->totalizar = $aLinhasRelatorio[$iLinha]->isTotalizador();\n $oLinha->descricao = $aLinhasRelatorio[$iLinha]->getDescricaoLinha();\n $oLinha->colunas = $aColunasRelatorio;\n $oLinha->nivellinha = $aLinhasRelatorio[$iLinha]->getNivel();\n foreach ($aColunasRelatorio as $oColuna) {\n\n $oLinha->{$oColuna->o115_nomecoluna} = 0;\n if ( !$aLinhasRelatorio[$iLinha]->isTotalizador() ) {\n $oColuna->o116_formula = '';\n }\n }\n\n if (!$aLinhasRelatorio[$iLinha]->isTotalizador()) {\n\n $aValoresColunasLinhas = $aLinhasRelatorio[$iLinha]->getValoresColunas(null, null, $this->getInstituicoes(),\n $this->iAnoUsu);\n\n $aParametros = $aLinhasRelatorio[$iLinha]->getParametros($this->iAnoUsu, $this->getInstituicoes());\n foreach($aValoresColunasLinhas as $oValor) {\n foreach ($oValor->colunas as $oColuna) {\n $oLinha->{$oColuna->o115_nomecoluna} += $oColuna->o117_valor;\n }\n }\n\n /**\n * verificamos se a a conta cadastrada existe no balancete, e somamos o valor encontrado na linha\n */\n for ($i = 0; $i < $iTotalLinhasPlano; $i++) {\n\n $oResultado = db_utils::fieldsMemory($rsPlano, $i);\n\n\n $oParametro = $aParametros;\n\n foreach ($oParametro->contas as $oConta) {\n\n $oVerificacao = $aLinhasRelatorio[$iLinha]->match($oConta, $oParametro->orcamento, $oResultado, 3);\n\n if ($oVerificacao->match) {\n\n $this->buscarInscricaoEBaixa($oResultado, $iLinha, $sDataInicial, $sDataFinal);\n\n if ( $oVerificacao->exclusao ) {\n\n $oResultado->saldo_anterior *= -1;\n $oResultado->saldo_anterior_debito *= -1;\n $oResultado->saldo_anterior_credito *= -1;\n $oResultado->saldo_final *= -1;\n }\n\n $oLinha->sd_ex_ant += $oResultado->saldo_anterior;\n $oLinha->inscricao += $oResultado->saldo_anterior_credito;\n $oLinha->baixa += $oResultado->saldo_anterior_debito;\n $oLinha->sd_ex_seg += $oResultado->saldo_final;\n }\n }\n }\n }\n $aLinhas[$iLinha] = $oLinha;\n }\n\n unset($aLinhasRelatorio);\n\n /**\n * calcula os totalizadores do relatório, aplicando as formulas.\n */\n foreach ($aLinhas as $oLinha) {\n\n if ($oLinha->totalizar) {\n\n foreach ($oLinha->colunas as $iColuna => $oColuna) {\n\n if (trim($oColuna->o116_formula) != \"\") {\n\n $sFormulaOriginal = ($oColuna->o116_formula);\n $sFormula = $this->oRelatorioLegal->parseFormula('aLinhas', $sFormulaOriginal, $iColuna, $aLinhas);\n $evaluate = \"\\$oLinha->{$oColuna->o115_nomecoluna} = {$sFormula};\";\n ob_start();\n eval($evaluate);\n $sRetorno = ob_get_contents();\n ob_clean();\n if (strpos(strtolower($sRetorno), \"parse error\") > 0 || strpos(strtolower($sRetorno), \"undefined\" > 0)) {\n $sMsg = \"Linha {$iLinha} com erro no cadastro da formula<br>{$oColuna->o116_formula}\";\n throw new Exception($sMsg);\n\n }\n }\n }\n }\n }\n\n return $aLinhas;\n }", "function crear_tabla_horario()\n {\n //El funcionamiento es el mismo que en crear_tabla, excepto que aqui no le pasamos el profesor\n $meses = array(\"31\", \"28\", \"31\", \"30\", \"31\", \"30\", \"31\", \"31\", \"30\", \"31\", \"30\", \"31\");\n $cambio_mes = 0;\n\n $num1 = filter_input(INPUT_POST, 'num1');\n\n $profe=$this->model->get_profe($_SESSION['iduser']);\n $zona = filter_input(INPUT_POST, 'zona');\n $mes = filter_input(INPUT_POST, 'mes');\n $año = filter_input(INPUT_POST, 'año');\n\n $mes = str_pad($mes, 2, \"0\", STR_PAD_LEFT);\n $h_profe=$this->model->get_h_profe($profe[0]['id_profesores'], $zona);\n $numeros[5]=\"\";\n $numeros[0]=$num1;\n for($i=0;$i<5;$i++)\n {\n\n $numeros[$i+1] = $numeros[$i]+1;\n\n if( $numeros[$i+1] > $meses[$mes-1])\n {\n $numeros[$i+1] = $numeros[$i+1] - $meses[$mes-1];\n $cambio_mes = 1;\n }\n\n }\n $total = \"\";\n for($i=8;$i<21;$i++)\n {\n if($i!=14 && $i!=15)\n {\n\n $total.=\"<tr><td>\".$i.\":00-\".($i+1).\":00</td>\";\n for($k=0;$k<5;$k++)\n {\n $total .= \"<td class='$numeros[$k]-$i dia_$k'>\";\n $ano=str_pad($numeros[$k],2,\"0\",STR_PAD_LEFT);\n //Si el horario del profe esta vacio printamos boton en todos los td\n if(!empty($h_profe))\n {\n $cont = 0;\n foreach ($h_profe as $hora)\n {\n $mes_1 = $mes;\n if($cambio_mes == 1 && $mes_1 < 12 && $numeros[$k]<5)\n {\n $mes_1 = $mes_1+1;\n }\n else if( $cambio_mes == 1 && $mes_1 == 12 && $numeros[$k]<5)\n {\n $mes_1 = 1;\n $año = $año+1;\n }\n $mes_1 = str_pad($mes_1, 2, \"0\", STR_PAD_LEFT);\n $fecha = $año.\"-\".$mes_1.\"-\".$ano;\n\n //Comprobamos si la hora y la fecha coincide y sumamos 1 al contador\n if($hora['hora']==$i && $hora['fecha'] == $fecha)\n {\n $cont++;\n }\n }\n //Si el cantador sigue en 0 printamos boton ya que significa que no ha sido marcada\n if($cont ==0)\n {\n $total.= \"<button class='horario hvr-grow-shadow'>Marcar</button>\";\n }\n }\n else\n {\n $total.= \"<button class='horario hvr-grow-shadow'>Marcar</button>\";\n }\n $total .=\"<span style='display:none'>\".$numeros[$k].\" \".$i.\":00</span></td>\";\n }\n $total.=\"</tr>\";\n }\n }\n echo $total;\n }", "function consulta_lista_chapa()\n {\n\n\t $con = new DBmanejador;\n if($con->conectar()==true)\n {\n\t\t $consulta= 'SELECT * FROM tchapas';\n $resultado=mysql_query($consulta) or die('La consulta fall&oacute;: ' . mysql_error());\n\n\n\t\t \tif (!$resultado) return false;\n\t\t \telse\n\t\t \t{ $contador=0;\n\n\t\t\t\t\twhile($row = mysql_fetch_array($resultado))\n\t\t\t\t\t{\n \t\t\t\t \t\t$respuesta[$contador][\"codigo\"]= $row['chapa_id'];\n\t\t\t\t\t\t$respuesta[$contador][\"descripcion\"]= $row['descripcion'];\n \t\t$contador=$contador+1;\n\n \t\t\t\t\t}\n\n\t\t \treturn $respuesta;\n\t\t \t}\n\t\t }\n }", "function getCitas(){\n\t\n\t\treturn conectar()->query( \"SELECT hora, fecha, usuario, motivo FROM citas\");\n\t}", "public function get_all_cajeros()\n { \n $this->parametros = array();\n $this->sp = \"str_consultacajeros\";\n $this->executeSPConsulta();\n\n if (count($this->rows)<=0){\n $this->mensaje=\"No existen niveles economicos en la BD.\";\n array_pop($rol);\n array_push($rol, array(0 => -1, \n 1 => 'Seleccione...',\n 3 => ''));\n\t\t\t\n }else{\n $rol = array();\n\n array_pop($rol);\n array_push($rol, array(0 => -1, \n 1 => 'Seleccione...',\n 3 => ''));\n\t\t\t\n foreach($this->rows as $niveles_economicos){\n array_push($rol, array_values($niveles_economicos));\n }\n\n $this->rows = $rol;\n unset($rol);\n }\n }", "function listado() {\r\n return self::consulta('SELECT * FROM \".self::$nTabla.\"');\r\n }", "function listarHerrajeaccesorio(){\n\t\t$this->procedimiento='snx.ft_herrajeaccesorio_sel';\n\t\t$this->transaccion='SNX_HAC_SEL';\n\t\t$this->tipo_procedimiento='SEL';//tipo de transaccion\n\t\t\t\t\n\t\t//Definicion de la lista del resultado del query\n\t\t$this->captura('id_herrajeaccesorio','int4');\n\t\t$this->captura('estado_reg','varchar');\n\t\t$this->captura('herrajeaccesorio','varchar');\n\t\t$this->captura('usuario_ai','varchar');\n\t\t$this->captura('fecha_reg','timestamp');\n\t\t$this->captura('id_usuario_reg','int4');\n\t\t$this->captura('id_usuario_ai','int4');\n\t\t$this->captura('id_usuario_mod','int4');\n\t\t$this->captura('fecha_mod','timestamp');\n\t\t$this->captura('usr_reg','varchar');\n\t\t$this->captura('usr_mod','varchar');\n\t\t\n\t\t//Ejecuta la instruccion\n\t\t$this->armarConsulta();\n\t\t$this->ejecutarConsulta();\n\t\t\n\t\t//Devuelve la respuesta\n\t\treturn $this->respuesta;\n\t}", "public function setHoraires($horaires): self\n {\n $this->horaires = $horaires;\n\n return $this;\n }", "function listar_idiomas() {\n\t\t$query = \"SELECT idiomas.*\n\t\tFROM idiomas\n\t\tORDER BY idioma\";\n\n $connection = mysql_connect($this->HOST, $this->USERNAME, $this->PASSWORD);\n\t\t\n\t\t$SelectedDB = mysql_select_db($this->DBNAME);\n\t\t$result = mysql_query($query); \n\t\t\n\t\t$numrows = mysql_num_rows($result);\n\t\tmysql_close($connection);\n\t\t// COMPROBAMOS QUE HAYA RESULTADOS\n\t\t// SI EL NUMERO DE RESULTADOS ES 0 SIGNIFICA QUE NO HAY REGISTROS CON ESOS DATOS\n\t\tif ($numrows == 0) {\n\t\t\treturn $result;\n\t\t}\n\t\telse {\n\t\t\treturn $result;\n\t\t}\n\t}", "public function hospitalizaciones_tatalHospitalizaciones(){ \t\n\n\t\t\t$resultado = array();\n\t\t\t\n\t\t\t$query = \"Select count(idHospitalizacion) as cantidadHospitalizaciones from tb_hospitalizacion \";\n\t\t\t\n\t\t\t$conexion = parent::conexionCliente();\n\t\t\t\n\t\t\tif($res = $conexion->query($query)){\n\t \n\t /* obtener un array asociativo */\n\t while ($filas = $res->fetch_assoc()) {\n\t $resultado = $filas;\n\t }\n\t \n\t /* liberar el conjunto de resultados */\n\t $res->free();\n\t \n\t }\n\t\n\t return $resultado['cantidadHospitalizaciones'];\t\t\t\n\t\t\t\n\t\t\t\n }", "function insertarHorarios($hora) {\r\n$sql = \"insert into tbhorarios(idtbhorario,hora)\r\nvalues ('',\".$hora.\")\";\r\n$res = $this->query($sql,1);\r\nreturn $res;\r\n}", "public function listadoHospitalizacionesSinPagar(){\n\t\t$resultado = array();\n\t\t\n\t\t$query = \"SELECT \n\t\t\t\t H.idHospitalizacion,\n\t\t\t\t H.fechaIngreso,\n\t\t\t\t DATE_FORMAT(H.horaIngreso, '%H:%i') AS hora,\n\t\t\t\t DATE_FORMAT(concat(H.fechaIngreso,' ',H.horaIngreso), '%Y-%m-%d %H:%i') As inicioHospitalizacion,\n\t\t\t\t DATE_FORMAT(concat(HA.fecha,' ',HA.hora), '%Y-%m-%d %H:%i') As alta, \n\t\t\t\t P.nombre AS nombrePaciente,\n\t\t\t\t PP.idPropietario,\n\t\t\t\t PP.identificacion,\n\t\t\t\t PP.nombre AS nombre,\n\t\t\t\t PP.apellido,\n\t\t\t\t U.nombre AS nombreMedico,\n\t\t\t\t U.apellido AS apellidoMedico\n\t\t\t\tFROM\n\t\t\t\t tb_hospitalizacion AS H\n\t\t\t\t INNER JOIN\n\t\t\t\t tb_hospitalizacionAlta AS HA ON HA.idHospitalizacion = H.idHospitalizacion\n\t\t\t\t INNER JOIN\n\t\t\t\t tb_mascotas AS P ON P.idMascota = H.idMascota\n\t\t\t\t INNER JOIN\n\t\t\t\t tb_propietarios AS PP ON PP.idPropietario = P.idPropietario\n\t\t\t\t INNER JOIN\n\t\t\t\t tb_usuarios AS U ON U.idUsuario = H.idUsuario\n\t\t\t\tWHERE\n\t\t\t\t NOT H.idHospitalizacion IN (SELECT \n\t\t\t\t idTipoDetalle\n\t\t\t\t FROM\n\t\t\t\t tb_pago_factura_caja_detalle\n\t\t\t\t WHERE\n\t\t\t\t tipoDetalle = 'Hospitalizacion'\n\t\t\t\t AND estado = 'Activo')\n\t\t\t\tORDER BY HA.fecha DESC , HA.hora \";\n\t\t\n\t\t$conexion = parent::conexionCliente();\n\t\t\n\t\tif($res = $conexion->query($query)){\n \n /* obtener un array asociativo */\n while ($filas = $res->fetch_assoc()) {\n $resultado[] = $filas;\n }\n \n /* liberar el conjunto de resultados */\n $res->free();\n \n }\n\n return $resultado;\t\t\n\t}", "function listar_categorias_palabras() {\n\t\t$query = \"SELECT tipos_palabra.*\n\t\tFROM tipos_palabra\";\n\n $connection = mysql_connect($this->HOST, $this->USERNAME, $this->PASSWORD);\n\t\t\n\t\t$SelectedDB = mysql_select_db($this->DBNAME);\n\t\t$result = mysql_query($query); \n\t\t\n\t\t$numrows = mysql_num_rows($result);\n\t\tmysql_close($connection);\n\t\t// COMPROBAMOS QUE HAYA RESULTADOS\n\t\t// SI EL NUMERO DE RESULTADOS ES 0 SIGNIFICA QUE NO HAY REGISTROS CON ESOS DATOS\n\t\tif ($numrows == 0) {\n\t\t\treturn $result;\n\t\t}\n\t\telse {\n\t\t\treturn $result;\n\t\t}\n\t}", "function listar_usuarios() {\n\t\t$query = \"SELECT colaboradores.*, colaboradores_permisos.*\n\t\tFROM colaboradores, colaboradores_permisos\n\t\tWHERE colaboradores.id_colaborador=colaboradores_permisos.id_colaborador\n\t\tAND colaboradores.estado=1\";\n\n $connection = mysql_connect($this->HOST, $this->USERNAME, $this->PASSWORD);\n\t\t\n\t\t$SelectedDB = mysql_select_db($this->DBNAME);\n\t\t$result = mysql_query($query); \n\t\t\n\t\t$numrows = mysql_num_rows($result);\n\t\tmysql_close($connection);\n\t\t// COMPROBAMOS QUE HAYA RESULTADOS\n\t\t// SI EL NUMERO DE RESULTADOS ES 0 SIGNIFICA QUE NO HAY REGISTROS CON ESOS DATOS\n\t\tif ($numrows == 0) {\n\t\t\treturn $result;\n\t\t}\n\t\telse {\n\t\t\treturn $result;\n\t\t}\n\t}", "function fetchHistorial() {\n\n $historiales = array();\n\n $con = new DB();\n $sql = $con->prepare(\"SELECT * FROM historial\");\n $result = $con->executeQuery($sql);\n\n foreach ($result as $row) {\n $id_diario = $row['id_diario'];\n $id_poi = $row['id_poi'];\n $fechaVisitaPoi = $row['fechaVisitaPoi'];\n $estaEnPoi = $row['estaEnPoi'];\n $texto = $row['texto'];\n $foto = $row['foto'];\n $video = $row['video'];\n $historial = new Historial($id_diario, $id_poi, $fechaVisitaPoi, $estaEnPoi, $texto, $foto, $video);\n array_push($historiales, $historial);\n }\n\n return $historiales;\n }", "function get_chado_table_list() {\n $sql_table_list = \"SELECT table_name FROM information_schema.tables WHERE table_schema = 'chado' ORDER BY table_name;\";\n $result_table = db_query($sql_table_list);\n $input_table = $result_table->fetchAll();\n $table_list = [];\n foreach ($input_table as $value) {\n $table_list[] = $value->table_name;\n }\n return $table_list;\n}", "function listar_boletines() {\n\t\t$query = \"SELECT newsletters.*\n\t\tFROM newsletters\n\t\tORDER BY fecha_publicacion desc\";\n\n $connection = mysql_connect($this->HOST, $this->USERNAME, $this->PASSWORD);\n\t\t\n\t\t$SelectedDB = mysql_select_db($this->DBNAME);\n\t\t$result = mysql_query($query); \n\t\t\n\t\t$numrows = mysql_num_rows($result);\n\t\tmysql_close($connection);\n\t\t// COMPROBAMOS QUE HAYA RESULTADOS\n\t\t// SI EL NUMERO DE RESULTADOS ES 0 SIGNIFICA QUE NO HAY REGISTROS CON ESOS DATOS\n\t\tif ($numrows == 0) {\n\t\t\treturn $result;\n\t\t}\n\t\telse {\n\t\t\treturn $result;\n\t\t}\n\t}", "public function readAll(){\r\n\r\n // QUERY SQL PARA FAZER CONSULTA NO BANCO\r\n\t\t$sql = 'SELECT * FROM usuarios';\r\n\r\n\t\t// PREPARANDO CONEXÃO COM O BANCO\r\n\t\t$stmt = Conexao::getConn()->prepare($sql);\r\n\r\n\t\t// EXECUTANDO QUERY\r\n\t\t$stmt->execute();\r\n \r\n // VERIFICA SE TEM REGISTRO NA TABELA\r\n\t\tif ($stmt->rowCount() > 0){\r\n\r\n // ARMAZENA OS RESULTADOS \r\n\t\t\t$resultado = $stmt->fetchAll(\\PDO::FETCH_ASSOC);\r\n \r\n // RETORNA OS RESULTADOS EM JSON\r\n\t\t\treturn json_encode($resultado);\r\n\r\n }else{\r\n\r\n // CASO NÃO TENHA REGISTRO RETORNARA ARRAY VAZIO\r\n\t\t\treturn [];\r\n\r\n }\r\n\r\n }", "public function verHorario(){\n $Maestro = \\App\\Maestro::where('user_id', Auth::user()->id)->get();\n $idMaestro = $Maestro[0]->id;\n\n $horarios = \\App\\Maestroseccionclase::join('seccions', 'maestroseccionclases.idSeccion', '=', 'seccions.id')\n ->join('clases', 'maestroseccionclases.idClase', '=', 'clases.id')\n ->join('cursos', 'seccions.idCurso', '=', 'cursos.id')\n ->select('clases.nombre as nombreClase', 'seccions.nombre as nombreSeccion','cursos.nombre as nombreCurso', 'maestroseccionclases.horaInicio', 'maestroseccionclases.horaFin', 'maestroseccionclases.diaClase')\n ->where('maestroseccionclases.idMaestro', $idMaestro)\n ->get();\n\n return view('maestro.verHorario', compact('horarios'));\n }", "public function listarTodos()\n\t{\n\t\t$inst_table = BDD::getInstance()->query(\"select * from system.\". self::claseMinus());\n\t\t$i = 0;\n\t\twhile ($fila = $inst_table->_fetchRow())\n\t\t{\n\t\t\tforeach ($fila as $campo => $valor)\n\t\t\t{\n\t\t\t\t$data[$i][$campo] = $valor;\n\t\t\t}\n\t\t\t$i++;\n\t\t}\n\n\t\techo (json_encode($data));\n\t}", "public static function todosLosAnuncios()\n {\n try {\n $arrayanuncios = [];\n $fechaActual = new DateTime(date(\"d-m-y\", time()));\n $consulta = \"SELECT id_anuncio,autor,moroso,localidad,descripcion,fecha FROM anuncios ORDER BY fecha DESC\";\n $datos = [];\n $resultado = accesoDB::mostrarConsulta($consulta, $datos);\n\n if ($resultado == '1') {\n return 1;\n } else {\n foreach ($resultado as $valor) {\n $id_anuncio = $valor['id_anuncio'];\n $autor = $valor['autor'];\n $moroso = $valor['moroso'];\n $localidad = $valor['localidad'];\n $descripcion = $valor['descripcion'];\n $fecha = $valor['fecha'];\n $fechaAnuncio = new DateTime($fecha);\n $interval = $fechaAnuncio->diff($fechaActual);\n $dias = $interval->format('%d');\n $mes = $interval->format('%m');\n $año = $interval->format('%y');\n $anuncios = new Anuncios($id_anuncio, $autor, $moroso, $localidad, $descripcion, $fechaAnuncio->format('d-m-Y'));\n array_push($arrayanuncios, [$anuncios, $dias, $mes, $año]);\n }\n echo \"</div>\";\n return $arrayanuncios;\n $resultado = null;\n $conexion = null;\n }\n } catch (PDOException $ex) {\n echo $ex->getMessage();\n }\n }", "public static function listado() {\n $aulas = array();\n $resultset = DB::table('aulas')->get();\n foreach ($resultset as $var) {\n $aulas[$var->AULA] = $var->AULA;\n }\n return $aulas;\n }", "function padres_consultan_hijos($id_padre){\r\n\t\t$cn = $this->conexion();\r\n \r\n if($cn!=\"no_conexion\"){\r\n \t\r\n \t\r\n\t \t$sql=\"select * from $this->tabla_alumno where id_padre='$id_padre'\";\r\n\t\t\t\r\n\t $rs = mysql_query($sql,$cn);\r\n \r\n \t\r\n\t\t\twhile($fila=mysql_fetch_object($rs)){\r\n\t\t\t\t$cursos[]=$fila;\r\n\t\t\t} \r\n\t\t\t\r\n\t\t\t$respuesta=\"\";\r\n\t\t\tif($cursos){\r\n\t\t\t\t\t\r\n\t\t\t\tforeach($cursos as $q):\r\n\t\t\t\t\t\r\n\t\t\t\t\t$respuesta.=$q->codigo.\"{\".$q->nombres.\"{\".$q->apellido_paterno.\"{\".$q->apellido_materno.\"{\".$q->nivel.\"{\".$q->grado.\"{\".$q->seccion.\"{\";\r\n\t\t\t\t\t\r\n\t\t\t\tendforeach;\t\r\n\t\t\t\t\r\n\t\t\t}else{\r\n\t\t\t\t$respuesta=\"no data\";\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tmysql_close($cn);\r\n\r\n\t\t\treturn $respuesta;\r\n\t\t}else{\r\n\t\treturn \"mysql_no\";\r\n\t\t}\r\n\t}", "public function dameCuentas()\n\t{\n\n\t\t// if (!$mvc_bd_conexion) {\n\t\t// \tdie('No ha sido posible realizar la conexión con la base de datos: ' . mysql_error());\n\t\t// }\n\t\t// mysql_select_db(\"rhsys\", $mvc_bd_conexion);\n\n\t\t// mysql_set_charset('utf8');\n\n\t\t// $conexion2 = $mvc_bd_conexion;\n\n\t\t$sql = \"SELECT SUM(e.su_sem_efectivo ) efectivo , SUM(e.su_sem_fiscal) fiscal , p.cuenta_contable num_cuenta,p.cuenta_contable_alt num_cuenta_alt,p.cuenta_contable_nombre num_cuenta_nom, p.concepto concepto, p.centro_costos centro_costos\n\t\tFROM empleados e, puestos p\n\t\tWHERE e.puesto = p.clave AND p.cuenta_contable <> '' \n\t\tGROUP BY p.cuenta_contable\";\n\t\t$result = mysql_query($sql, $this->conexion);\n\t\t$cuentas = array();\n\t\twhile ($row = mysql_fetch_assoc($result))\n\t\t{\n\t\t $cuentas[] = $row;\n\t\t}\n\n\t\treturn $cuentas;\n\t}", "public function getUsuarios(){\n\t\t$filasPagina = 7;//registros mostrados por página\n\n\t\tif(isset($_GET['pagina'])){//si le pasamos el valor \"pagina\" de la url (si el usuario da click en la paginación)\n\t\t\t\tif($_GET['pagina']==1){\n\t\t\t\t$pagina=1; \n\t\t\t\theader(\"Location: principal.php?c=controlador&a=muestraUsuarios\");\n\t\t\t\t}else{\n\t\t\t\t\t$pagina=$_GET['pagina'];//índice que indica página actual\n\t\t\t\t}\n\t\t\t}else{\n\t\t\t\t$pagina=1;//índice que indica página actual\n\t\t\t}\n\n\t\t\t$empezarDesde = ($pagina-1) * $filasPagina;\n\n\t\t\t$sql = \" SELECT * FROM usuarios \";\n\n\t\t\t$resultado = $this->db->query($sql);\n\n\t\t\t$resultado->execute(array());\n\n\t\t\t$numFilas = $resultado->rowCount();//número de registos totales de la consulta\n\n\t\t\t//ceil — Redondear fracciones hacia arriba\n\t\t\t$totalPaginas = ceil($numFilas / $filasPagina);//calcula cuántas páginas serán en total para mostrar todos los registros\n\n\t\t\t$resultado->closeCursor();\n\n\t\t//------------------------- Consulta para mostrar los resultados ---------------------------\n\n\t\t\t$sql_limite = \" SELECT * FROM usuarios LIMIT $empezarDesde , $filasPagina \";\n\n\t\t\t$resultado = $this->db->query($sql_limite);//ejecutando la consulta con la conexión establecida\n\n\t\t\twhile($row = $resultado->fetch(PDO::FETCH_ASSOC)){\n\t\t\t\t$this->objeto[] = $row;//llenando array con valores de la consulta\n\t\t\t}\n\n\t\treturn $this->objeto;\n\t}", "public function getDepartamentosTodos(){\n\n\t\t\ttry {\n\t\t\t\t\n\t\t\t\t$consulta=\"SELECT * FROM departamentos\";\n\t\t\t\t\n\n\t\t\t\t$query=$this->db->preparar($consulta);\n\t\t\t\t$query->execute();\n\t\t\t\t\n\t\t\t\t$tClientes = $query->fetchAll();\n\t\t\t\t\n\t\t\t\t//obtiene todas las tuplas de la tabla clientes\n\t\t\t\t//y devuelve el array $tClientes\n\n\t\t\t} catch (Exception $e) {\n\t\t\t\techo \"Se ha producido un errro\";\n\t\t\t\t\n\t\t\t}\n\n\t\t\t$tablaClientes=array(); //inicializamos la tabla de salida\n\t\t\tforeach ($tClientes as $fila) {\n\t\t\t\t$c=new Departamento($fila[0], $fila[1], \n\t\t\t\t\t$fila[2], $fila[3]);\n\t\t\t\tarray_push($tablaClientes, $c);\n\t\t\t}\n\t\t\treturn $tablaClientes;\n\t\t}", "public function run()\n {\n $data = [\n ['NO_DESCRICAO' => '08:00'],\n ['NO_DESCRICAO' => '08:30'],\n ['NO_DESCRICAO' => '09:00'],\n ['NO_DESCRICAO' => '09:30'],\n ['NO_DESCRICAO' => '10:00'],\n ['NO_DESCRICAO' => '10:30'],\n ['NO_DESCRICAO' => '11:00'],\n ['NO_DESCRICAO' => '11:30'],\n ['NO_DESCRICAO' => '12:00'],\n ['NO_DESCRICAO' => '14:00'],\n ['NO_DESCRICAO' => '14:30'],\n ['NO_DESCRICAO' => '15:00'],\n ['NO_DESCRICAO' => '15:30'],\n ['NO_DESCRICAO' => '16:00']\n\n ];\n \n Horario::insert($data);\n }", "function listar_ejemplos_uso() {\n\t\n\t\t$query = \"SELECT *\n\t\tFROM ejemplos_uso\n\t\tWHERE estado = 1\n\t\tORDER BY id_eu desc\";\n\n $connection = mysql_connect($this->HOST, $this->USERNAME, $this->PASSWORD);\n\t\t\n\t\t$SelectedDB = mysql_select_db($this->DBNAME);\n\t\t$result = mysql_query($query); \n\t\tmysql_close($connection);\n\t\treturn $result;\n\t\n\t\n\t}", "public function listarCursos () {\n\t\t// Recupera el valor de la base de datos\n $link=Conectarse(); // y me conecto. //dependiendo del tipo recupero uno u otro.\n\t $Sql='SELECT DISTINCT unidad FROM tb_alumno ORDER BY unidad';\n // echo $Sql;\n\t $result=mysqli_query($link,$Sql);// ejecuta la cadena sql y almacena el resultado el $result\n\t $ii=0; // contador \n\t while ($row=mysqli_fetch_array($result)) {\n\t\t\t$this->listaDeCursos['largo'][$ii]=$row['unidad']; \n\t\t\t$this->listaDeCursos['curso'][$ii]=substr($row['unidad'],0,1); \t\n\t\t\t$this->listaDeCursos['clase'][$ii]=strtoupper(substr($row['unidad'],-1));\n\t\t\t$this->listaDeCursos['nivel'][$ii]=strtoupper(trim(substr($row['unidad'],1,-1)));\n\t\t\t$this->listaDeCursos['alumnado'][$ii]=$this->devuelveListaAlumnos($row['unidad']); \n\t\t\t$this->listaDeCursos['corto'][$ii]=$this->listaDeCursos[\"curso\"][$ii].$this->listaDeCursos[\"nivel\"][$ii].$this->listaDeCursos[\"clase\"][$ii];\n\t\t\t$ii++;\n\t\t\t}\n\t\t\tif (!is_null($this->listaDeCursos)) { // si no lo recupera, el valor por defecto)\n\t\t return $this->listaDeCursos; //envia el valor dado\n\t\t } else {\n\t\t return NULL;\n\t }\n\t mysqli_free_result($result); \n\t mysqli_close($link);\n\t}", "public function HorasCalculo() {\n\t\t\tif(AppValidar::PeticionAjax() == true):\n\t\t\t\t$valor = $_POST['prioridad'];\n\t\t\t\t$array = array('1' => 12, '2' => 12);\n\t\t\t\t$fecha = new DateTime(date(\"Y-m-d H:i\"));\n\t\t\t\t$fecha->add(new DateInterval('PT'.$array[$valor].'H'));\n\t\t\t\techo json_encode(array('fecha' => $fecha->format('Y-m-d / H:i')));\n\t\t\telse:\n\t\t\t\techo json_encode(array('fecha' => '0000-00-00 / 00:00'));\n\t\t\tendif;\n\t\t}" ]
[ "0.7557913", "0.72095126", "0.7196705", "0.68769", "0.6808637", "0.67835116", "0.6723398", "0.6716757", "0.6683027", "0.66112626", "0.6575677", "0.6532603", "0.6521776", "0.6458556", "0.64304304", "0.6276883", "0.62704235", "0.6261639", "0.6240121", "0.6118021", "0.6105583", "0.60542834", "0.6039957", "0.6030307", "0.59953076", "0.59827447", "0.5844481", "0.5784684", "0.57512754", "0.5721385", "0.56872225", "0.5682205", "0.56745404", "0.5664803", "0.56175387", "0.56084186", "0.55767524", "0.5572052", "0.55656695", "0.55082464", "0.5508131", "0.54972434", "0.5497143", "0.54941493", "0.54931855", "0.5487808", "0.5471301", "0.5456106", "0.5447772", "0.54370654", "0.5423886", "0.54193044", "0.54178995", "0.54088354", "0.53978014", "0.53910375", "0.5389623", "0.5385156", "0.5377676", "0.5376899", "0.5371081", "0.5370438", "0.53674227", "0.53633624", "0.5362098", "0.5361999", "0.53558224", "0.53306854", "0.5329368", "0.5325836", "0.53210205", "0.532006", "0.53095996", "0.53078574", "0.5299876", "0.5296101", "0.5290277", "0.5289987", "0.5282904", "0.5278251", "0.52708435", "0.5268709", "0.52686393", "0.52673256", "0.5265383", "0.52626455", "0.5262146", "0.52615976", "0.5257543", "0.52465725", "0.5234922", "0.52229875", "0.52210873", "0.52192295", "0.5212804", "0.5209329", "0.5207816", "0.5206886", "0.5199719", "0.5193685" ]
0.7308206
1
Modifica a un horario en la base de datos
public function modificarHorario($horarioMod) { $sql = "UPDATE HORARIO SET nom_horario = '".$horarioMod->getNom_horario()."' WHERE cod_horario = ".$horarioMod->getCod_horario(); if((!$result = mysqli_query($this->con, $sql))) die(); $row = mysqli_fetch_array($result); mysqli_query($this->con, $sql); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function Modificarhorario()\n\t{\n\t\t$query=\"UPDATE horario SET dia='$this->dia',\n\t\tmes='$this->mes',\n\t\tanio='$this->anio',\n\t\thora='$this->hora',\n\t\testatus='$this->estatus'\n\t\tWHERE idhorario=$this->idhorario\";\n\n\t\t$resp=$this->db->consulta($query);\n\t}", "public function Guardarhorario()\n\t{\n\t\t$query=\"INSERT INTO horario (dia,mes,anio,hora,estatus) VALUES ('$this->dia','$this->mes','$this->anio','$this->hora','$this->estatus')\";\n\t\t\n\t\t\n\t\t$resp=$this->db->consulta($query);\n\t\t$this->idhorario = $this->db->id_ultimo();\n\t\t\n\t\t\n\t}", "function guardar_horario()\n {\n $fecha = filter_input(INPUT_POST, 'fecha');\n $hora = filter_input(INPUT_POST, 'hora');\n $zona = filter_input(INPUT_POST, 'zona');\n\n $profe=$this->model->get_profe($_SESSION['iduser']);\n $this->model->set_horario($profe[0]['id_profesores'],$fecha,$hora,$zona);\n $this->model->delete_horario();\n\n }", "function grabar_horario($datos){\n\t\t$registro[IDPROVEEDOR] = $datos[IDPROVEEDOR];\n\t\t$registro[IDUSUARIOMOD]= $datos[IDUSUARIOMOD];\n\t\t$registro[HORAINICIO]=$datos[HORAINICIO];\n\t\t$registro[HORAFINAL]=$datos[HORAFINAL];\n\t\t$registro[DOMINGO]=($datos[DOMINGO]=='on')?1:0;\n\t\t$registro[LUNES]=($datos[LUNES])?1:0;\n\t\t$registro[MARTES]=($datos[MARTES])?1:0;\n\t\t$registro[MIERCOLES]=($datos[MIERCOLES])?1:0;\n\t\t$registro[JUEVES]=($datos[JUEVES])?1:0;\n\t\t$registro[VIERNES]=($datos[VIERNES])?1:0;\n\t\t$registro[SABADO]=($datos[SABADO])?1:0;\n\n\n\t\tif ($this->exist('catalogo_proveedor_horario',IDPROVEEDOR,\" WHERE IDPROVEEDOR = '$registro[IDPROVEEDOR]'\"))\n\t\t{\n\t\t\t$this->update('catalogo_proveedor_horario',$registro,\" WHERE IDPROVEEDOR = '$registro[IDPROVEEDOR]'\");\n\t\t}\n\t\telse {\n\t\t\t$this->insert_reg('catalogo_proveedor_horario',$registro);\n\n\t\t}\n\t}", "public function insertHorarios()\n {\n $atributos=array( $this->nombre , $this->aula );\n //descomentarear la l�nea siguiente y comentarear la anterior si la llave primaria no es autoincremental\n //$atributos=array( $this->codigo , $this->nombre , $this->aula );\n return $this->conexionHorarios->insertarRegistro($atributos);\n }", "function updateHora($conexion,$ip,$fecha,$hora){\r\n $consu = \"update visitas set time ='$hora' where ip_cliente ='$ip' \r\n and fecha ='$fecha'\";\r\n insertUpdate($conexion,$consu);\r\n }", "public function edit(Horario $horario)\n {\n //\n }", "public function inactivarHorarioFecha($idAgendaHorarioFechaUsuario){\n\t\t\n\t\t $idAgendaHorarioFechaUsuario \t\t= parent::escaparQueryBDCliente($idAgendaHorarioFechaUsuario); \t\t\n\n\n $query = \"UPDATE tb_agendaHorarioFechaUsuario SET estado = 'I'\n \t\t\t\tWHERE idAgendaHorarioFechaUsuario = '$idAgendaHorarioFechaUsuario' \";\n \n $conexion = parent::conexionCliente();\n \t\t\n if($res = $conexion->query($query)){\n \n $resultado = \"Ok\";\n }\n \n return $resultado; \n\n\t}", "function modificarHistorial($id_diario, $id_poi, $fechaVisitaPoi, $estaEnPoi, $texto, $foto, $video) {\n $sql = \"UPDATE historial SET fechaVisitaPoi='\" . $fechaVisitaPoi . \"',estaEnPoi='\" . $estaEnPoi . \"',texto='\" . $texto . \"',\"\n . \"foto='\" . $foto . \"',video='\" . $video . \"' WHERE id_diario='\" . $id_diario . \"' AND id_poi='\" . $id_poi . \"'\";\n $con = new DB();\n $result = $con->exec($sql);\n $con = null;\n }", "public function acturalizarHorarioDiaUsuario($idUsuario, $dia, $horaInicio, $horaFin){\n\n\t\t\t$dia \t\t\t= parent::escaparQueryBDCliente($dia); \n\t\t\t$idUsuario \t= parent::escaparQueryBDCliente($idUsuario); \n\t\t\t$horaInicio \t= parent::escaparQueryBDCliente($horaInicio); \n\t\t\t$horaFin \t\t= parent::escaparQueryBDCliente($horaFin); \t\t\n\n $query = \"UPDATE tb_agendaHorarioUsuario SET horaInicio = '$horaInicio', horaFin = '$horaFin' \n \t\t\t\tWHERE numeroDia = '$dia' AND idUsuario = '$idUsuario' \";\n \n $conexion = parent::conexionCliente();\n \t\t\n if($res = $conexion->query($query)){\n \n $resultado = \"Ok\";\n }\n \n return $resultado; \n\n\t\t\n\t}", "public function inactivarHorarioDiaUsuario($idUsuario, $dia){\n\t\t\n\t\t\t$dia \t\t\t= parent::escaparQueryBDCliente($dia); \n\t\t\t$idUsuario \t= parent::escaparQueryBDCliente($idUsuario); \t\n\n $query = \"UPDATE tb_agendaHorarioUsuario SET estado = 'I'\n \t\t\t\tWHERE numeroDia = '$dia' AND idUsuario = '$idUsuario' \";\n \n $conexion = parent::conexionCliente();\n \t\t\n $conexion->query($query);\n \n\t\t\n\t\t\n\t}", "private static function setHorarioDeVerao() {\n $dataJunta = self::getAnoAtual() . self::getMesAtual() . self::getDiaAtual();\n //self::$horario_de_verao = ($dataJunta > '20121021' && $dataJunta < '20130217' ) ? true : false;\n self::$horario_de_verao = (date('I') == \"1\") ? true : false;\n return self::getHorarioDeVerao();\n }", "function modificarAnuncio($titulo, $descripcion, $imagen, $id_poi, $id_usuario) {\n $sql = \"UPDATE anuncio SET titulo='\" . $titulo . \"',descripcion='\" . $descripcion . \"',imagen='\" . $imagen\n . \"' WHERE id_usuario='\" . $id_usuario . \"' AND id_poi='\" . $id_poi . \"'\";\n $con = new DB();\n $result = $con->exec($sql);\n $con = null;\n }", "public function actualizarHabitacion($datos) {\n $consultaExistenciaPreMatricula = $this->db->select(\"SELECT * FROM tipohabitacion \"\n . \"WHERE descripcion = '\" . $datos['txt_tipo'] . \"' \");\n\n if ($consultaExistenciaPreMatricula != null) {\n\n $posData = array(\n 'precio' => $datos['txt_precio'],\n 'moneda' => $datos['txt_moneda']);\n\n $this->db->update('tipohabitacion', $posData, \"`descripcion` = '{$datos['txt_tipo']}'\");\n } else {\n //Sino Inserto datos de Pre-Matricula del Estudiante\n echo 'Error...</br>Ya existe una habitacion con ese numero';\n die;\n }\n }", "public function acturalizarHorarioFechaUsuario($idUsuario, $fecha, $horaInicio, $horaFin){\n\n\t\t\t$fecha \t\t= parent::escaparQueryBDCliente($fecha); \n\t\t\t$idUsuario \t= parent::escaparQueryBDCliente($idUsuario); \n\t\t\t$horaInicio \t= parent::escaparQueryBDCliente($horaInicio); \n\t\t\t$horaFin \t\t= parent::escaparQueryBDCliente($horaFin); \t\t\n\n\n $query = \"UPDATE tb_agendaHorarioFechaUsuario SET horaInicio = '$horaInicio', horaFin = '$horaFin' \n \t\t\t\tWHERE fecha = '$fecha' AND idUsuario = '$idUsuario' \";\n \n $conexion = parent::conexionCliente();\n \t\t\n if($res = $conexion->query($query)){\n \n $resultado = \"Ok\";\n }\n \n return $resultado; \n\n\t\t\n\t}", "public function alterarResponsavel($idPessoaResponsavel, Responsavel $responsavel) {\n $obj_conecta = new bd();\n $obj_conecta->conecta();\n $obj_conecta->seleciona_bd();\n\n //echo \"<br> Chegou no metodo IdPessoaResponsavel = [\".$idPessoaResponsavel.\"] <br><br>\";\n\n $sql = \"UPDATE `sigar`.`responsavel` SET `categoria` = '\" . $responsavel->getCategoria() . \"', `telefoneTrabalho` = '\" . $responsavel->getTelTrabalho() . \"' WHERE `responsavel`.`idPessoa` =\" . $idPessoaResponsavel . \";\";\n\n $alteraTabResponsavel = mysql_query($sql);\n if ($alteraTabResponsavel) {\n //echo \"<br> Tabela RESPONSAVEL alterado com sucesso <br>\";\n } else {\n //echo \"<br> ERRO alteração tabela RESPONSAVEL <br>\"; \n }\n\n\n $sql = \"UPDATE `pessoa` SET `nome` = '\" . $responsavel->getNome() . \"', `email` = '\" . $responsavel->getEmail() . \"', `telefoneResidencial` = '\" . $responsavel->getTelefoneResidencial() . \"', \n `telefoneCelular` = '\" . $responsavel->getCelular() . \"', `sexo` = '\" . $responsavel->getSexo() . \"', `dataNascimento` = '\" . $responsavel->getNascimento() . \"', `cpf` = '\" . $responsavel->getCpf() . \"' WHERE `pessoa`.`idPessoa` = \" . $idPessoaResponsavel . \";\";\n\n $alteraTabPessoaResp = mysql_query($sql);\n if ($alteraTabPessoaResp) {\n //echo \" <br> Tabela PESSOARESPONSAVEL alterado com sucesso <br>\";\n } else {\n //echo \"<br> EROO alteração tabela PESSOARESPONSAVEL <br>\"; \n }\n }", "function alterar($c){\n $sql = $this->con->query(\"UPDATE clientes SET nome = '\". $c->get_nome() .\"', cpf = '\". $c->get_cpf() .\"', cep = '\". $c->get_cep() .\"', telefone = '\". $c->get_telefone() .\"', email = '\". $c->get_email() .\"', senha = '\". $c->get_senha() .\"', datinha = '\". $c->get_data() .\"' WHERE (codigo = \" . $c->get_codigo(). \")\");\n \n if ($sql->rowCount() > 0){\n return true;\n }\n else{\n return false;\n }\n }", "function prelasesor(){\n include(\"../include/conectar.php\"); \n $query =\"UPDATE tblsemestrepro SET asesor = '$this->asesor' WHERE tblsemestrepro.id_semestrepro = $this->semestrepy;\";\n $sql = mysqli_query($conection, $query);\n mysqli_close($conection); \n if($sql){\n\t\t\t $p =\"relacion\";\n include('../plantillas/paso.php');\n } \n else\n throw new Exception (\"Error: No es posible registrar\");\n }", "function guardarHorarioDiaUsuario($idUsuario, $dia, $horaInicio, $horaFin){\n\t\t\n\t\t\t$dia \t\t\t= parent::escaparQueryBDCliente($dia); \n\t\t\t$idUsuario \t= parent::escaparQueryBDCliente($idUsuario); \n\t\t\t$horaInicio \t= parent::escaparQueryBDCliente($horaInicio); \n\t\t\t$horaFin \t\t= parent::escaparQueryBDCliente($horaFin); \t\t\t\n \n $query = \"INSERT INTO tb_agendaHorarioUsuario (horaInicio, horaFin, numeroDia, estado, idUsuario) \".\n \" VALUES ('$horaInicio', '$horaFin', '$dia', 'A', '$idUsuario') \";\n \n $conexion = parent::conexionCliente();\n \t\t\n if($res = $conexion->query($query)){\n \n $resultado = \"Ok\";\n }\n \n return $resultado;\t\t\n\t\t\n\t\t\n\t}", "protected function alterar(){\n header(\"Content-type: text/html;charset=utf-8\");\n $sql = \"SHOW FULL FIELDS FROM \" . $this->table;\n $execute = conexao::toConnect()->executeS($sql);\n $sets = \"\";\n $id_registro = '';\n $contador = \"\";\n $count = 1;\n foreach ($execute as $contar) {\n if ($contar->Key != 'PRI') {\n $atributos_field = $contar->Field;\n $select_p = substr(strtoupper($atributos_field), 0, 1);\n $select_t = substr($atributos_field, 1);\n $get = 'get' . $select_p . $select_t;\n if ($this->$get() != null) {\n $contador = $contador + 1;\n }\n }\n }\n foreach ($execute as $key => $attr){\n if ($attr->Key != 'PRI') {\n $atributos_field = $attr->Field;\n $select_p = substr(strtoupper($atributos_field), 0, 1);\n $select_t = substr($atributos_field, 1);\n $get = 'get' . $select_p . $select_t;\n if ($this->$get() != null) {\n if ($count != $contador) {\n $sets .= $attr->Field . \" = '\" . $this->$get() . \"',\";\n } else {\n $sets .= $attr->Field . \" = '\" . $this->$get().\"'\";\n }\n $count = $count + 1;\n }\n }else{\n $id_registro = $attr->Field;\n }\n }\n $update = \"UPDATE \".$this->table.\" SET \".$sets.\" WHERE \".$id_registro.\" = \".$this->getIdTable();\n\n $execute_into = conexao::toConnect()->executeQuery($update);\n if (count($execute_into) > 0) {\n return $execute_into;\n }else{\n return false;\n }\n }", "function Inhabilitarq_admin1(){\n\trequire '../../conexion.php'; \n \t$cate=date('Y-m-d');\n echo $consultar_nivel= \"UPDATE `administradores` SET `INHABILITADO` = '1',`decreto_traslado` = '\".$_POST['u'].\"',\t`fecha_traslado` = '\".$cate.\"' WHERE `administradores`.`ID_ADMIN` = \".$_POST['io'].\"\"; \t\n $consultar_nivel1=$conexion->prepare($consultar_nivel);\n\t$consultar_nivel1->execute(array()); \n}", "function ponerHorasTaller(){\n // y precios 15 1h, 21, 1.5h, 31 2h.\n $sql=\"SELECT id,precio_trimestre FROM casal_talleres WHERE id_curso=4 AND tipo_taller='Professional'\";\n $result=$this->db->query($sql)->result();\n foreach($result as $k=>$v){\n $horasSesion=0;\n $id=$v->id;\n if($v->precio_trimestre=='21') $horasSesion=1.5*1100;\n if($v->precio_trimestre=='31') $horasSesion=2*1100;\n if($v->precio_trimestre=='15') $horasSesion=1*1100;\n $sql=\"UPDATE casal_talleres SET horas_taller_T1='$horasSesion', horas_taller_T2='$horasSesion', horas_taller_T3='$horasSesion'WHERE id='$id'\";\n $this->db->query($sql);\n }\n }", "private function modificarCita(){\n $query = \"UPDATE \" . $this->table . \" SET PacienteId ='\" . $this->idpaciente . \"',Fecha = '\" . $this->fecha . \"', HoraInicio = '\" . $this->horarioIn . \"', HoraFin = '\" .\n $this->horarioFn . \"', Motivo = '\" . $this->motivo . \"' WHERE CitaId = '\" . $this->idcita . \"'\"; \n $resp = parent::nonQuery($query);\n if($resp >= 1){\n return $resp;\n }else{\n return 0;\n }\n }", "static public function mdlSinAdquisicionLogistica($tabla, $datos){\r\n\t\r\n\r\n\t\t\t$stmt = Conexion::conectar()->prepare(\"UPDATE $tabla set statusCompras = :statusCompras,estadoCompras = :estadoCompras where idPedido = :idPedido AND serie = :serie\");\r\n\r\n\t\t$stmt->bindParam(\":statusCompras\", $datos[\"statusCompras\"], PDO::PARAM_INT);\r\n\t\t$stmt->bindParam(\":estadoCompras\", $datos[\"estadoCompras\"], PDO::PARAM_INT);\r\n\t\t$stmt->bindParam(\":idPedido\", $datos[\"idPedido\"], PDO::PARAM_INT);\r\n\t\t$stmt->bindParam(\":serie\", $datos[\"serie\"], PDO::PARAM_STR);\r\n\r\n\r\n\t\tif($stmt->execute()){\r\n\r\n\t\t\treturn \"ok\";\t\r\n\r\n\t\t}else{\r\n\r\n\t\t\treturn \"error\";\r\n\t\t\r\n\t\t}\r\n\r\n\t\t$stmt->close();\r\n\t\t\r\n\t\t$stmt = null;\r\n\t\t\r\n\r\n\t\t\r\n\r\n\t}", "public function inactivarRecesoDia($idAgendaHorarioReceso){\n\t\t\n\t\t $idAgendaHorarioReceso \t\t= parent::escaparQueryBDCliente($idAgendaHorarioReceso); \t\t\n\n\n $query = \"UPDATE tb_agendaHorarioReceso SET estado = 'I'\n \t\t\t\tWHERE idAgendaHorarioReceso = '$idAgendaHorarioReceso' \";\n \n $conexion = parent::conexionCliente();\n \t\t\n if($res = $conexion->query($query)){\n \n $resultado = \"Ok\";\n }\n \n return $resultado; \n\n\t}", "function mod_beneficiario()\r\n\t{\t\r\n\t \t$sql=\"UPDATE slc_beneficiario set ced_titular='$this->cedt', nomb_titular='$this->nomt', telf_titular='$this->telt' where ced_beneficiario='$this->cedb'\";\r\n\t\t$result=mysql_query($sql,$this->conexion);\r\n\t\t//echo $sql;\r\n\t\tif ($result) \r\n\t\t return true;\r\n\t\telse\r\n\t\t return false;\r\n\t}", "public function modificar($datosCampos) {\n $guardar = new SqlQuery(); //instancio objeto de la clase sqlQuery\n (string) $tabla = get_class($this); //obtengo el nombre de la clase para poder realizar la consulta\n $id = $datosCampos[\"id\"];\n switch ($datosCampos[\"acceso\"]) //cambio los dato que vienen de la vista\n {\n case \"total\":\n $datosCampos[\"acceso\"] = 1;\n break;\n case \"restringido\":\n $datosCampos[\"acceso\"] = 2;\n break;\n default:\n $datosCampos[\"acceso\"] = 0;\n break;\n }\n try {\n $this->refControladorPersistencia->get_conexion()->beginTransaction(); //comienza la transacción \n $arrayCabecera = $guardar->meta($tabla);//armo el array con la cabecera de los datos\n $sentencia = $guardar->armarSentenciaModificar($arrayCabecera, $tabla);//genero sentencia\n $array = $guardar->armarArray($arrayCabecera, $datosCampos);//Armo el array con los datos que vienen de la vista y la cabecera de la BD\n array_shift($array);//elimino primer elemento del array que es el id\n array_push($array, $id);//agrego el id al final del array para realizar la consulta\n $this->refControladorPersistencia->ejecutarSentencia($sentencia, $array);//genero la consulta a la BD \n $this->refControladorPersistencia->get_conexion()->commit(); //si todo salió bien hace el commit \n } catch (PDOException $excepcionPDO) {\n echo \"<br>Error PDO: \" . $excepcionPDO->getTraceAsString() . '<br>';\n $this->refControladorPersistencia->get_conexion()->rollBack(); //si salio mal hace un rollback\n } catch (Exception $exc) {\n echo $exc->getTraceAsString();\n $this->refControladorPersistencia->get_conexion()->rollBack(); //si hay algún error hace rollback\n }\n $respuesta = $this->getUsuario($id);\n return $respuesta;\n }", "public function update(){\n\t\t$sql = \"update \".self::$tablename.\" set nombre=\\\"$this->name\\\", razon_social=\\\"$this->razon\\\", status=$this->is_active where id_banco=$this->id_banco\";\n\t\tExecutor::doit($sql);\n\t}", "public function actualizarHorarioDoctor($id, $data)\n\t\t{\n\t\t\t$this->db->where(\"idHorario\", $id);\n\n\t\t\treturn $this->db->update(\"doc_horarios\", $data);\n\t\t}", "function modificarPoi($id_poi, $nombre, $foto, $descripcion, $url, $precio, $horario) {\n $sql = \"UPDATE poi SET nombre='\" . $nombre . \"',foto='\" . $foto . \"',descripcion='\" .\n $descripcion . \"',url='\" . $url . \"',precio='\" . $precio . \"',horario='\" . $horario . \"' WHERE id='\" . $id_poi . \"'\";\n $con = new DB();\n $result = $con->exec($sql);\n $con = null;\n }", "function alumno_registra_entrada($codigo_curso,$codigo_alumno,$entrada){\r\n\t\t$cn = $this->conexion();\r\n \r\n if($cn!=\"no_conexion\"){\r\n \t\r\n \t$sql=\"update $this->nombre_tabla_blog set eliminable=0 where codigo_curso='$codigo_curso' and codigo_alumno='$codigo_alumno'\";\r\n \t\r\n \t$rs = mysql_query($sql,$cn);\r\n \t\r\n\t \t$sql=\"insert into $this->nombre_tabla_blog (codigo_curso,codigo_alumno,entrada,persona_responde,fecha,hora) values ('$codigo_curso','$codigo_alumno','$entrada','A',curdate(),curtime() )\";\r\n\t\t\t\r\n\t $rs = mysql_query($sql,$cn);\r\n \r\n\t\t\tmysql_close($cn);\r\n\r\n\t\t\treturn \"mysql_si\";\r\n\t\t}else{\r\n\t\treturn \"mysql_no\";\r\n\t\t}\r\n\t}", "function modificarTabla(){\n\t\t$this->procedimiento='wf.ft_tabla_ime';\n\t\t$this->transaccion='WF_tabla_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_tabla','id_tabla','int4');\n\t\t$this->setParametro('id_tipo_proceso','id_tipo_proceso','int4');\n\t\t$this->setParametro('vista_id_tabla_maestro','vista_id_tabla_maestro','int4');\n\t\t$this->setParametro('bd_scripts_extras','bd_scripts_extras','text');\n\t\t$this->setParametro('vista_campo_maestro','vista_campo_maestro','varchar');\n\t\t$this->setParametro('vista_scripts_extras','vista_scripts_extras','text');\n\t\t$this->setParametro('bd_descripcion','bd_descripcion','text');\n\t\t$this->setParametro('vista_tipo','vista_tipo','varchar');\n\t\t$this->setParametro('menu_icono','menu_icono','varchar');\n\t\t$this->setParametro('menu_nombre','menu_nombre','varchar');\n\t\t$this->setParametro('vista_campo_ordenacion','vista_campo_ordenacion','varchar');\n\t\t$this->setParametro('vista_posicion','vista_posicion','varchar');\n\t\t$this->setParametro('estado_reg','estado_reg','varchar');\n\t\t$this->setParametro('menu_codigo','menu_codigo','varchar');\n\t\t$this->setParametro('bd_nombre_tabla','bd_nombre_tabla','varchar');\n\t\t$this->setParametro('bd_codigo_tabla','bd_codigo_tabla','varchar');\n\t\t$this->setParametro('vista_dir_ordenacion','vista_dir_ordenacion','varchar');\n\t\t$this->setParametro('vista_estados_new','vista_estados_new','varchar');\n\t\t$this->setParametro('vista_estados_delete','vista_estados_delete','varchar');\n\n\t\t//Ejecuta la instruccion\n\t\t$this->armarConsulta();\n\t\t$this->ejecutarConsulta();\n\n\t\t//Devuelve la respuesta\n\t\treturn $this->respuesta;\n\t}", "function admin_modificar_alumno($codigo_anterior,$codigo,$nombres,$apellido_p,$apellido_m,$edad,$password,$id_padre,$grado,$nivel,$seccion,$disponible,$repitente){ \r\n\t\t$cn = $this->conexion();\t\t\t\r\n\t\t\r\n\t\tif($cn!=\"no_conexion\"){\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t$sql=\"select * from $this->nombre_tabla_alumnos where codigo='$codigo' and codigo<>'$codigo_anterior'\"; \r\n\t\t\t$rs = mysql_query($sql,$cn);\r\n\t\t\t\r\n\t\t\tif(mysql_num_rows($rs)==0){\r\n\t\t\t\t\r\n\r\n\t\t\t\r\n \t\t$sql=\"update $this->nombre_tabla_alumnos set \r\ncodigo='$codigo',nombres='$nombres',apellido_paterno='$apellido_p',apellido_materno='$apellido_m',edad='$edad',password='$password',id_padre='$id_padre',grado='$grado',nivel='$nivel',seccion='$seccion',disponible=$disponible,repitente='$repitente' where codigo='$codigo_anterior'\";\t\t\r\n\t\t\t $rs = mysql_query($sql,$cn);\r\n\t\t\t\r\n\t\t\t\tmysql_close($cn);\t\t \r\n\t\t\t\treturn \"mysql_si\";\r\n\t\t\t\t\r\n\t\t\t\t}else{\r\n\t\t\t\t\tmysql_close($cn);\r\n\t\t\t\t\treturn \"existe\";\r\n\t\t\t\t\t}\r\n\t\t}else{\r\n\t\treturn \"mysql_no\";\r\n\t\t}\r\n\t\t\r\n\t}", "public function modificarHijos($cuentaPadre){\n $cuentasPHijos= CuentaPeriodo::whereRaw('\n cuenta_id in\n (select id from cuenta where padre_id=?)\n and periodo_id=?', [$cuentaPadre->cuenta_id, $cuentaPadre->periodo_id])->get();\n //dd([$cuentaPadre]);\n foreach ($cuentasPHijos as $cuentaHijo) {\n $cuentaHijoM=$this->actualizar(0, $cuentaHijo);\n }\n return true;\n }", "public function horario() {\n\t\t$query = \"SELECT \n\t\t\t\t\tCONCAT(DATE_FORMAT(data_hora, '%d/%m/%Y %H'), 'h - ',DATE_FORMAT(data_hora, '%H'),':59h') as nome,\n\t\t\t\t\tcount(q.local_id) as qtd, \n\t\t\t\t\tROUND(((count(q.local_id)*100)/t.contagem),2) as percent \n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\tFROM (assistencia q, \n\t\t\t\t\t\t (SELECT count(a.local_id) as contagem \n\t\t\t\t\t\t \tFROM assistencia a \n\t\t\t\t\t\t \tWHERE a.local_id = $this->id\n\t\t\t\t\t\t \tand a.data_hora BETWEEN '\" . $_SESSION[\"data_inicio\"] . \" 00:00:00' AND '\" . $_SESSION[\"data_final\"] . \" 23:59:59'\n\t\t\t\t \t\t\tand a.ativo = 1\n\t\t\t\t\t\t \t) t)\n\t\t\t\t\t\n\t\t\t\t\tWHERE q.local_id = $this->id\n\t\t\t\t\tand q.data_hora BETWEEN '\" . $_SESSION[\"data_inicio\"] . \" 00:00:00' AND '\" . $_SESSION[\"data_final\"] . \" 23:59:59'\n\t\t\t\t \tand q.ativo = 1\n\t\t\t\t\tGROUP BY CONCAT(DATE_FORMAT(data_hora, '%Y-%m-%d %H'), ':00:00.000')\n\t\t\t\t\tORDER BY data_hora DESC\";\n\n\t\t$this->db->ExecuteSQL($query);\n\t\treturn $this->db->ArrayResults();\n\t}", "public static function updateHorario($request)\n\t\t{\n\t\t\t$menu = Horary::where('id', $_POST[\"pid\"])->update([\n\t\t\t 'type' => $_POST[\"tipo\"],\n\t\t\t 'food_start' => $_POST[\"horainicio\"],\n\t\t\t 'food_end' => $_POST[\"horafin\"],\n\t\t\t 'cant' => $_POST[\"cantidad\"],\n\t\t\t\t\n\t\t\t]);\n\t\t\tprint_r($_POST);\n\n\t\t}", "function setCita($usuario, $fecha, $hora, $motivo){\n\t\t\t\n\t\t$resultado = conectar()->query( \"SELECT * FROM citas WHERE fecha LIKE '$fecha' AND hora LIKE '$hora'\");\n\t\t\t\n\t\tif($resultado->num_rows == 0){\n\t\t\tconectar()->query(\"INSERT INTO citas (usuario, fecha, hora, motivo) VALUES ('\" . $usuario . \"','\" . $fecha . \"','\" . $hora . \"','\" . $motivo .\"')\");\n\t\t\techo \"<script>alert('Se ha hecho la reserva correctamente!');document.location.reload();</script>\";\n\t\t}\n\t}", "function actualizarHijosPadre($serial_pad,$tipoPadre,$direccionpad,$telefonopad){\n\t\tinclude \"bdd.inc\";\n\t\t$sql = \"select alu.serial_alu as serial_alu\n\t\t\t\tfrom alumno as alu,padres_alumno as padalu,parentesco as paren\n\t\t\t\twhere padalu.serial_pad=$serial_pad and alu.serial_alu=padalu.serial_alu and paren.serial_par=padalu.serial_par and conQuienVive_alu='$tipoPadre' and codigo_par='$tipoPadre'\";\n\t\t$rs=$db->Execute($sql);\n\t\t$nr=$rs->RecordCount();\n\t\tif ($nr>0){\n\t\t\twhile(!$rs->EOF){\n\t\t\t $serialalu=$rs->fields['serial_alu'];\n\t\t\t $query = \"update alumno set direcc_alu=\\\"$direccionpad\\\",telefo_alu=\\\"$telefonopad\\\" where serial_alu=$serialalu\";\n\t\t\t $db->Execute($query);\n\t\t\t $rs->MoveNext();\n\t\t\t}\n\t\t} \n\t}", "public function edit(Hora $hora)\n {\n //\n }", "public function atualizar()\n {\n $pdo = new \\PDO(DSN, USER, PASSWD);\n //cria sql\n $sql = \"UPDATE MinisterioTemDiscipulo SET \t ministerioId= ? , funcaoId = ?\n WHERE discipuloId = ?\n \";\n\n //prepara sql\n $stm = $pdo->prepare($sql);\n //trocar valores\n $stm->bindParam(1, $this->ministerioId );\n $stm->bindParam(2, $this->funcaoId );\n $stm->bindParam(3, $this->discipuloId );\n\n $resposta = $stm->execute();\n\n $erro = $stm->errorInfo();\n //var_dump($erro);\n //exit();\n\n //fechar conexão\n $pdo = null ;\n\n return $resposta;\n\n }", "public function atualizar()\n {\n $pdo = new \\PDO(DSN, USER, PASSWD);\n //cria sql\n $sql = \"UPDATE MinisterioTemDiscipulo SET \t ministerioId= ? , funcaoId = ?\n WHERE discipuloId = ?\n \";\n\n //prepara sql\n $stm = $pdo->prepare($sql);\n //trocar valores\n $stm->bindParam(1, $this->ministerioId );\n $stm->bindParam(2, $this->funcaoId );\n $stm->bindParam(3, $this->discipuloId );\n\n $resposta = $stm->execute();\n\n $erro = $stm->errorInfo();\n //var_dump($erro);\n //exit();\n\n //fechar conexão\n $pdo = null ;\n\n return $resposta;\n\n }", "function modificarEmpleado(){\n\t$ced=$this->objEmpleado->getCedula();\n\t$nom=$this->objEmpleado->getNombre();\n\t$fechaIng=$this->objEmpleado->getFechaIngreso();\n\t$fechaRet=$this->objEmpleado->getFechaRetiro();\n\t$salBas=$this->objEmpleado->getSalarioBasico();\n\t$ded=$this->objEmpleado->getDeducciones();\n\t$foto=$this->objEmpleado->getFoto();\n\t$hojaV=$this->objEmpleado->getHojaVida();\n\t$email=$this->objEmpleado->getEmail();\n\t$tel=$this->objEmpleado->getTelefono();\n\t$cel=$this->objEmpleado->getCelular();\n\t$estado=$this->objEmpleado->getEstado();\n\t$usuario=$this->objEmpleado->getUsuario();\n\t$contrasena=$this->objEmpleado->getContrasena();\n\t$nomTmp=$this->objEmpleado->getNombreTmp();\n\t$fotoTmp=$this->objEmpleado->getFotoTmp();\n\t$hojaVTmp=$this->objEmpleado->getHojaVidaTmp();\n\t$emailTmp=$this->objEmpleado->getEmailTmp();\n\t$telTmp=$this->objEmpleado->getTelefonoTmp();\n\t$celTmp=$this->objEmpleado->getCelularTmp();\n\n\t$objConexion = new ControlConexion();\n\t$objConexion->abrirBd($GLOBALS['serv'],$GLOBALS['usua'],$GLOBALS['pass'],$GLOBALS['bdat']);\n\t$comandoSql=\"UPDATE EMPLEADO SET NOMBRE_TMP='\".$nomTmp.\"', FECHAINGRESO='\".$fechaIng.\"', \n\tSALARIOBASICO='\".$salBas.\"', DEDUCCIONES='\".$ded.\"', FOTO_TMP='\".$fotoTmp.\"', HOJAVIDA_TMP='\".$hojaVTmp.\"', EMAIL_TMP='\".$emailTmp.\"',\n\tTELEFONO_TMP='\".$telTmp.\"', CELULAR_TMP='\".$celTmp.\"',CONTRASENA='\".$contrasena.\"' WHERE CEDULA='\".$ced.\"'\";\n\t$objConexion->ejecutarComandoSql($comandoSql);\n\t$objConexion->cerrarBd();\n}", "public function alterarDadosGerais($conexao,$id_pessoa){\n $query = \"update empresa_startup set nome = ?, razao_social = ?, cnpj = ?, email = ?, data_fundacao = ?, telefone = ? where id_pessoa = ?;\";\n $stmt = $conexao->prepare($query);\n $stmt->execute([$this->getNome(),$this->getRazaoSocial(),$this->getCnpj(),$this->getEmail(),$this->getDataFundacao(),$this->getTelefone(),$id_pessoa]);\n }", "public function atualizarClientes($reg,$nome,$rg,$cpf,$cnpj,$telefone,$dtnascimento,$habilitado){\n //$conexao = $c->conexao();\n\n $usuid = $_SESSION['usuid'];\n $_SESSION['nomeAnterior'] = $nome;\n\n $sql = \"SELECT reg,rg FROM tbclientes c WHERE reg = '$reg' \";\n $sql = $this->conexao->query($sql);\n $row = $sql->fetch_assoc();\n\n if($rg != $row['rg']){\n $sql = \"SELECT count(*) as existe FROM tbclientes c WHERE rg = '$rg' \";\n $sql = $this->conexao->query($sql);\n $row = $sql->fetch_assoc();\n\n if ($row['existe'] >= 1 ) {\n return 0;\n }else{ \n\n $sql = \"UPDATE tbclientes SET nome = '$nome', rg = '$rg', cpf='$cpf', cnpj = '$cnpj', telefone = '$telefone', dt_nascimento = '$dtnascimento', habilitado = '$habilitado', modificado = NOW(), usuid = '$usuid' WHERE reg = '$reg'\";\n echo $this->conexao->query($sql);\n\n $mensagem = \"O Usuário \".$_SESSION['email'].\" atualizou o Cliente para $nome \";\n $this->salvaLog($mensagem);\n }\n \n }else{ \n\n $sql = \"UPDATE tbclientes SET nome = '$nome', rg = '$rg', cpf='$cpf', cnpj = '$cnpj',telefone = '$telefone', dt_nascimento = '$dtnascimento', habilitado = '$habilitado', modificado = NOW(), usuid = '$usuid' WHERE reg = '$reg'\";\n\n echo $this->conexao->query($sql);\n\n $mensagem = \"O Usuário \".$_SESSION['email'].\" atualizou o Cliente para $nome \";\n $this->salvaLog($mensagem);\n\n }\n\n \n\n }", "function modificarHerrajeaccesorio(){\n\t\t$this->procedimiento='snx.ft_herrajeaccesorio_ime';\n\t\t$this->transaccion='SNX_HAC_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_herrajeaccesorio','id_herrajeaccesorio','int4');\n\t\t$this->setParametro('estado_reg','estado_reg','varchar');\n\t\t$this->setParametro('herrajeaccesorio','herrajeaccesorio','varchar');\n\n\t\t//Ejecuta la instruccion\n\t\t$this->armarConsulta();\n\t\t$this->ejecutarConsulta();\n\n\t\t//Devuelve la respuesta\n\t\treturn $this->respuesta;\n\t}", "public function guardarHorarioFechaUsuario($idUsuario, $fecha, $horaInicio, $horaFin){\n\t\t\n\t\t\t$fecha \t\t= parent::escaparQueryBDCliente($fecha); \n\t\t\t$idUsuario \t= parent::escaparQueryBDCliente($idUsuario); \n\t\t\t$horaInicio \t= parent::escaparQueryBDCliente($horaInicio); \n\t\t\t$horaFin \t\t= parent::escaparQueryBDCliente($horaFin); \t\t\t\n \n $query = \"INSERT INTO tb_agendaHorarioFechaUsuario (horaInicio, horaFin, fecha, estado, idUsuario) \".\n \" VALUES ('$horaInicio', '$horaFin', '$fecha', 'A', '$idUsuario') \";\n \n $conexion = parent::conexionCliente();\n \t\t\n if($res = $conexion->query($query)){\n \n $resultado = \"Ok\";\n }\n \n return $resultado;\t\t\n\t\t\n\t\t\n\t}", "function editar($datos){\r\n\t\t$array = array(\r\n\t\t\t'name' => $datos[\"nombre\"],\r\n\t\t\t'hora_inicio' => $datos[\"horainicio\"],\r\n\t\t\t'hora_final' => $datos[\"horafinal\"]);\r\n\t\t$this->db->where('idUsuario', $datos[\"idUsuario\"]);\r\n\t\t$this->db->update('turnos_laborales', $array);//Se llama a la funcion de insertar datos y se le pasa el array asociativo\t\t\t\r\n\t\t\r\n\t}", "public function update(Request $request, Horario $horario)\n {\n //\n }", "public function ModificarEstado()\n\t{\n\t\t$query=\"UPDATE estado SET idpais=$this->id_pais, estado='$this->estado' , descripcion='$this->descripcion' WHERE idestado=$this->id_estado\";\n\t\t$resp=$this->db->consulta($query);\n\t}", "function modificarTablaInstancia(){\n\t\t$this->procedimiento='wf.ft_tabla_instancia_ime';\n\t\t$this->transaccion='WF_TABLAINS_MOD';\n\t\t$this->tipo_procedimiento='IME';\n\t\t\t\t\n\t\t$this->setParametro('id_tabla','id_tabla','integer');\n\t\t$this->setParametro('tipo_estado','tipo_estado','varchar');\n\t\t$this->setParametro('tipo_proceso','tipo_proceso','varchar');\n\t\t$bd_nombre_tabla = $_SESSION['_wf_ins_'.$this->objParam->getParametro('tipo_proceso').'_'.$this->objParam->getParametro('tipo_estado')]['atributos']['bd_nombre_tabla'];\n\t\t$this->setParametro('id_'.$bd_nombre_tabla,'id_'.$bd_nombre_tabla,'integer');\n\t\t//Define los parametros para la funcion\t\t\n\t\tforeach ($_SESSION['_wf_ins_'.$this->objParam->getParametro('tipo_proceso').'_'.$this->objParam->getParametro('tipo_estado')]['columnas'] as $value) {\n\t\t\t$this->setParametro($value['bd_nombre_columna'],$value['bd_nombre_columna'],$value['bd_tipo_columna']);\t\t\t\n\t\t}\t\n\n\t\t//Ejecuta la instruccion\n\t\t$this->armarConsulta();\n\t\t$this->ejecutarConsulta();\n\n\t\t//Devuelve la respuesta\n\t\treturn $this->respuesta;\n\t}", "function EliminarHorariosmantenimiento($id) {\n $sql = \"UPDATE `horariomantenimiento` SET `estado` = 'Inactivo' WHERE `horariomantenimiento`.`id` = '$id'\";\n\n\t$db = new conexion();\n\t$result = $db->consulta($sql);\n\n\t$respuesta->datos = [];\n\t$respuesta->mensaje = \"\";\n\t$respuesta->codigo = \"\";\n\n\tif ($result) {\n\n\t\tfor ($i=0; $i < $num; $i++) {\n\t\t\t$respuesta->datos[] = mysql_fetch_array($result);\n\t\t}\n\n\t\t$respuesta->mensaje = \"Registro eliminado con éxito!\";\n\t\t$respuesta->codigo = 1;\n\t} else {\n\t\t$respuesta->mensaje = \"Ha ocurrido un error!\";\n\t\t$respuesta->codigo = 0;\n\t}\n\n\treturn json_encode($respuesta);\n}", "function alteraTreinoAluno($conexao,$aluno,$academia,$idtreinoPadraoAluno){\n\n\t$sql = \"update treinoAluno set aluno = $aluno, academia=$academia where treinoPadraoAluno=$idtreinoPadraoAluno and idtreinoAluno <>0\";\n\n\n\t$altera= mysqli_query($conexao,$sql);\n\techo (\"<br>Linha alterada = \" . mysqli_affected_rows($conexao)).\"<br>sql: \". $sql.\"<br>\";\n}", "public function actualizaEstado(){\n $this->estado = 'Completo';\n // $this->cotiza = $this->generarCustomID();\n $this->save();\n }", "public function buscarhorario()\n\t{\n\t\t$query=\"SELECT * FROM horario WHERE idhorario=\".$this->idhorario;\n\n\t\t\n\t\t$resp=$this->db->consulta($query);\n\t\t\n\t\t//echo $total;\n\t\treturn $resp;\n\t}", "function EDIT() {\n\t\t// se construye la sentencia de busqueda de la tupla en la bd\n\t\t$sql = \"SELECT * FROM ENTREGA WHERE (login = '$this->login' AND IdTrabajo = '$this->IdTrabajo')\";\n \n\t\t// Variable que almacena la sentencia sql\n\t\t$result = $this->mysqli->query( $sql );\n\t\t// si el numero de filas es igual a uno es que lo encuentra\n\t\tif ( $result->num_rows == 1 ) { // se construye la sentencia de modificacion en base a los atributos de la clase\n\t\t\t//Si la ruta no es vacia actualiza la entrega\n if($this->Ruta <> null){\n //Variable que almacena la sentencia sql\n\t\t\t\t$sql = \"UPDATE ENTREGA SET \n\t\t\t\t\tlogin = '$this->login',\n\t\t\t\t\t IdTrabajo='$this->IdTrabajo',\n Alias='$this->Alias',\n Horas='$this->Horas',\n Ruta='$this->Ruta'\n\t\t\t\tWHERE ( login = '$this->login' AND IdTrabajo = '$this->IdTrabajo'\n\t\t\t\t)\";//se construye la sentencia sql de modificacion\n\n }\n //Si la ruta es vacia\n else{\n //Variable que almacena la sentencia sql\n $sql = \"UPDATE ENTREGA SET \n\t\t\t\t\tlogin = '$this->login',\n\t\t\t\t\t IdTrabajo='$this->IdTrabajo',\n Alias='$this->Alias',\n Horas='$this->Horas'\n\t\t\t\tWHERE ( login = '$this->login' AND IdTrabajo = '$this->IdTrabajo'\n\t\t\t\t)\";//se construye la sentencia sql de modificacion\n \n }\n\t\t\t// si hay un problema con la query se envia un mensaje de error en la modificacion\n\t\t\tif ( !( $resultado = $this->mysqli->query( $sql ) ) ) {\n\t\t\t\treturn 'Error en la modificación';\n\t\t\t}\n \n // si no hay problemas con la modificación se indica que se ha modificado\n else { \n\t\t\t\treturn 'Modificado correctamente';\n\t\t\t}\n // si no se encuentra la tupla se manda el mensaje de que no existe la tupla\n\t\t} else \n\t\t\treturn 'No existe en la base de datos';\n\t}", "public function publicacaoReabrir()\r\n {\r\n try\r\n {\r\n $resposta = $this->conexao->Conectar()->prepare(\"UPDATE tbmissao SET id_usuario_concluir = null, data_conclusao = null, status = 0, data = NOW(), conclusao = null\"\r\n . \" WHERE id_missao = ?\");\r\n $resposta->bindValue(1, $this->getIdMissao(), PDO::PARAM_STR);\r\n //$resposta->bindValue(3, $this->getData(), PDO::PARAM_STR);\r\n if($resposta->execute())\r\n {\r\n return true;\r\n }\r\n else\r\n {\r\n return false;\r\n }\r\n }\r\n catch (PDOException $e)\r\n {\r\n return $e->getMenssage();\r\n }\r\n }", "public function edit(CoordinacionHorario $coordinacionHorario)\n {\n //\n }", "public function mudarStatus(){\n //CO_STATUS = 5 se refere ao caso clinico Disponivel na base publica\n\n //busca e atualiza todos os casos clinicos que tenham CO_STATUS = 4 para o CO_STATUS = 5\n CasoClinico::where('CO_STATUS', '=', 4)->update(['CO_STATUS' => '5']);\n }", "public function update(){\n $sql = \"update \".self::$tablename.\" set correlativo=\\\"$this->correlativo\\\",nombre_instalador=\\\"$this->nombre_instalador\\\",nombre_proyecto=\\\"$this->nombre_proyecto\\\",localizacion=\\\"$this->localizacion\\\",contrato_orden_trabajo=\\\"$this->contrato_orden_trabajo\\\",sector_trabajo=\\\"$this->sector_trabajo\\\",area_aceptada=\\\"$this->area_aceptada\\\",fecha_proyecto=\\\"$this->fecha_proyecto\\\" where id_usuario=$this->id_usuario\";\n Executor::doit($sql);\n }", "function modificaProyecto($proyecto){\n include 'dbdatos.php';\n mysql_pconnect($dbhost, $dbuname, $dbpass);\n @mysql_select_db(\"$dbname\") or die (\"Imposible acceder a la BD en modificaProyecto\");\n $query= \"update proyecto set\n estado='\".$proyecto->getEstadoNumerico().\"' where\n nproyecto='\".$proyecto->getNproyecto().\"'\";\n $sel=mysql_query($query) or die(\"Error en modificaProyecto proyectoDao\");\n mysql_close();\n }", "public function publicacaoConcluir()\r\n {\r\n try\r\n {\r\n $resposta = $this->conexao->Conectar()->prepare(\"UPDATE tbmissao SET id_usuario_concluir = ?, data_conclusao = NOW(), status = 1, conclusao = ? \"\r\n . \" WHERE id_missao = ?\");\r\n $resposta->bindValue(1, $this->getIdUsuarioConcluir(), PDO::PARAM_STR);\r\n $resposta->bindValue(2, $this->getSolucao(), PDO::PARAM_STR);\r\n $resposta->bindValue(3, $this->getIdMissao(), PDO::PARAM_STR);\r\n //$resposta->bindValue(3, $this->getData(), PDO::PARAM_STR);\r\n if($resposta->execute())\r\n {\r\n return true;\r\n }\r\n else\r\n {\r\n return false;\r\n }\r\n }\r\n catch (PDOException $e)\r\n {\r\n return $e->getMenssage();\r\n }\r\n }", "static public function mdlEditarUsuario($tabla, $datos){\n $p=null;\n if($datos[\"id_programa\"]==\"NULL\"){\n $p=null;\n }else{\n $p=$datos[\"id_programa\"];\n }\n\n $stmt = Conexion::conectar()->prepare(\"UPDATE $tabla SET nombres =:nombres,apellidos =:apellidos,tipo_documento =:tipo_documento,documento =:documento,celular =:celular,email =:email,profesion =:profesion,tipo_vinculacion =:tipo_vinculacion,id_rol =:id_rol,cvlac =:cvlac,cargo =:cargo,ficha =:ficha,fecha_vinculacion =:fecha_vinculacion,fecha_desvinculacion =:fecha_desvinculacion,estado_vinculacion =:estado_vinculacion,contrasena =:contrasena,id_programa =:id_programa WHERE id_persona =:id_persona\");\n\n $stmt->bindParam(\":id_persona\", $datos[\"id_persona\"], PDO::PARAM_STR);\n $stmt->bindParam(\":nombres\", $datos[\"nombres\"], PDO::PARAM_STR);\n $stmt->bindParam(\":apellidos\", $datos[\"apellidos\"], PDO::PARAM_STR);\n $stmt->bindParam(\":tipo_documento\", $datos[\"tipo_documento\"], PDO::PARAM_STR);\n $stmt->bindParam(\":documento\", $datos[\"documento\"], PDO::PARAM_STR);\n $stmt->bindParam(\":celular\", $datos[\"celular\"], PDO::PARAM_STR);\n $stmt->bindParam(\":email\", $datos[\"email\"], PDO::PARAM_STR);\n $stmt->bindParam(\":profesion\", $datos[\"profesion\"], PDO::PARAM_STR);\n $stmt->bindParam(\":tipo_vinculacion\", $datos[\"tipo_vinculacion\"], PDO::PARAM_STR);\n $stmt->bindParam(\":cvlac\", $datos[\"cvlac\"], PDO::PARAM_STR);\n $stmt->bindParam(\":cargo\", $datos[\"cargo\"], PDO::PARAM_STR);\n $stmt->bindParam(\":ficha\", $datos[\"ficha\"], PDO::PARAM_STR);\n $stmt->bindParam(\":fecha_vinculacion\", $datos[\"fecha_vinculacion\"], PDO::PARAM_STR);\n $stmt->bindParam(\":fecha_desvinculacion\", $datos[\"fecha_desvinculacion\"], PDO::PARAM_STR);\n $stmt->bindParam(\":estado_vinculacion\", $datos[\"estado_vinculacion\"], PDO::PARAM_STR);\n $stmt->bindParam(\":contrasena\", $datos[\"contrasena\"], PDO::PARAM_STR);\n $stmt->bindParam(\":id_programa\",$p, PDO::PARAM_STR);\n $stmt->bindParam(\":id_rol\", $datos[\"id_rol\"], PDO::PARAM_STR);\n\n if($stmt -> execute()){\n return \"ok\";\n }else{\n return \"error\";\n }\n $stmt -> close();\n $stmt = null;\n }", "public function Modificar(): bool\n {\n $retorno = false;\n $objetoAccesoDato = AccesoDatos::RetornarObjetoAcceso();\n\n\n $consulta =$objetoAccesoDato->RetornarConsulta(\"UPDATE usuarios SET nombre = :nombre, correo = :correo, clave = :clave, id_perfil = :id_perfil\n WHERE usuarios.id = :id\");\n // $consulta = $objetoAccesoDato->RetornarConsulta(\"UPDATE `usuarios` SET `nombre`='$this->nombre',`correo`='$this->correo',\"\n // . \"`clave`='$this->clave',`id_perfil`='$this->id_perfil' WHERE `id`='$this->id'\");\n\n\n $consulta->bindParam(':correo', $this->correo, PDO::PARAM_STR);\n $consulta->bindParam(':clave', $this->clave, PDO::PARAM_STR);\n $consulta->bindParam(':nombre', $this->nombre, PDO::PARAM_STR);\n $consulta->bindParam(':id_perfil', $this->perfil, PDO::PARAM_INT);\n $consulta->bindParam(':id', $this->id, PDO::PARAM_INT);\n\n $consulta->execute();\n $filasAfectadas = $consulta->rowCount();\n if ($filasAfectadas > 0)\n $retorno = true;\n\n\n return $retorno;\n }", "public function RegistrarDatosPersonales(HojaVida $data){\n $modelo = new HojaVida();\n $fechahora = $modelo->get_fecha_actual();\n $datosfecha = explode(\" \",$fechahora);\n $fechalog = $datosfecha[0];\n $horalog = $datosfecha[1];\n \n $tiporegistro = \"Info. Datos Personales\";\n $accion = \"Registra una Nueva \".$tiporegistro.\" En el Sistema (HOJA VIDA) TALENTO HUMANO\";\n $detalle = $_SESSION['nombre'].\" \".$accion.\" \".$fechalog.\" \".\"a las: \".$horalog;\n $tipolog = 15;\n $idusuario = $_POST['id_usuarioR'];\n $idusuarioR = $_SESSION['idUsuario'];\n try {\n $this->pdo->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);\t\t\n //EMPIEZA LA TRANSACCION\n $this->pdo->beginTransaction();\n\n $sql = \"INSERT INTO `th_personas`(`per_id_usuario`, `per_cedula`, `per_nombres`, `per_apellidos`, `per_fecha_nacimiento`,\n `per_id_dep_nacimiento`, `per_id_ciu_nacimiento`, `per_direccion`, `per_telefono`, `per_celular`, `per_email`, `per_ruta_foto`, \n `per_id_usuarioR`) \n VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?)\";\n $this->pdo->prepare($sql)\n ->execute(\n array(\n $data->id_usuario,\n $data->per_cedula,\n $data->per_nombres,\n $data->per_apellidos,\n $data->per_fecha_nacimiento,\n $data->per_id_departamento,\n $data->per_id_municipio,\n $data->per_direccion,\n $data->per_telefono,\n $data->per_celular,\n $data->per_email,\n $data->per_ruta_foto,\n $idusuarioR\n )\n ); \n $this->pdo->exec(\"INSERT INTO log (fecha, accion,detalle,idusuario,idtipolog) VALUES ('$fechalog', '$accion','$detalle','$idusuario','$tipolog')\");\n \n //SE TERMINA LA TRANSACCION \n $this->pdo->commit();\n } catch (Exception $e) {\n $this->pdo->rollBack();\n die($e->getMessage());\n }\n }", "static public function mdlEditarEntrada($tabla, $datos){\n\n\t\t\n\t\t$stmt = Conexion::conectar()->prepare(\"UPDATE $tabla SET id_responsable = :id_responsable,id_proveedor=:id_proveedor,id_comprobante=:id_comprobante, comprobante=:comprobante, descripcion=:descripcion, productos = :productos,impuesto=:impuesto,neto=:neto, total_pagar= :total_pagar, fecha_emision= :fecha_emision, fecha_vencimiento= :fecha_vencimiento WHERE codigo = :codigo\");\n\n\t\t$stmt->bindParam(\":codigo\", $datos[\"codigo\"], PDO::PARAM_STR);\n\t\t$stmt->bindParam(\":id_responsable\", $datos[\"id_responsable\"], PDO::PARAM_INT);\n\t\t$stmt->bindParam(\":id_proveedor\", $datos[\"id_proveedor\"], PDO::PARAM_STR);\n\t\t$stmt->bindParam(\":id_comprobante\", $datos[\"id_comprobante\"], PDO::PARAM_INT);\n\t\t$stmt->bindParam(\":comprobante\", $datos[\"comprobante\"], PDO::PARAM_STR);\n\t\t$stmt->bindParam(\":descripcion\", $datos[\"descripcion\"], PDO::PARAM_STR);\n\t\t$stmt->bindParam(\":productos\", $datos[\"productos\"], PDO::PARAM_STR);\n\t\t$stmt->bindParam(\":neto\", $datos[\"neto\"], PDO::PARAM_STR);\n\t\t$stmt->bindParam(\":impuesto\", $datos[\"impuesto\"], PDO::PARAM_STR);\n\t\t$stmt->bindParam(\":total_pagar\", $datos[\"total_pagar\"], PDO::PARAM_STR);\n\t\t$stmt->bindParam(\":fecha_emision\", $datos[\"fecha_emision\"], PDO::PARAM_STR);\n\t\t$stmt->bindParam(\":fecha_vencimiento\", $datos[\"fecha_vencimiento\"], PDO::PARAM_STR);\n\t\t\n\n\t\tif($stmt->execute()){\n\n\t\t\treturn \"ok\";\n\n\t\t}else{\n\n\t\t\treturn $stmt->errorInfo();\n\t\t\n\t\t}\n\n\t\t$stmt->close();\n\t\t$stmt = null;\n\n\t}", "function verificaStatusAH($AHid){\r\n\t\t\t\t$query=\"select * from Alertas_Horarios where DAY(dataFim) >= DAY(NOW()) and MONTH(dataFim) >= MONTH(NOW()) and YEAR(dataFim) >= YEAR(NOW()) and AHid = {$AHid}\";\r\n\r\n\t\t\t\t$result = db_mysql($query);\r\n\t\t\t\t\r\n\t\t\t\t$ativo = mysqli_fetch_assoc($result);\r\n\t\t\t\t\r\n\t\t\t\t// Se não existir nenhum registro do mesmo Alerta em aberto, então este já está finalizado\r\n\t\t\t\tif($ativo == null) return false;\r\n\t\t\t\telse return true;\r\n\t\t\t\t\r\n\t\t}", "function Alterar($id) {\n if($this->GetClienteCPF($this->getCli_cpf())>0 && $this->getCli_cpf() <> $_SESSION['CLI']['cli_cpf']):\n echo '<div class=\"alert alert-danger\" id=\"erro_mostra\">Este CPF já esta cadastrado ';\n Sistema::VoltarPagina();\n echo '</div>';\n exit();\n endif;\n \n //se o email for diferente da sessao----------------------\n if($this->GetClienteEmail($this->getCli_email())>0 && $this->getCli_email() <> $_SESSION['CLI']['cli_email']):\n echo '<div class=\"alert alert-danger\" id=\"erro_mostra\">Este Email já esta cadastrado ';\n Sistema::VoltarPagina();\n echo '</div>';\n exit();\n endif;\n \n \n \n //Caso passou na verificação os dados serão gravados no banco-------------------------\n $query = \"UPDATE \".$this->prefix.\"clientes SET cli_nome=:cli_nome,\n cli_sobrenome=:cli_sobrenome,\n cli_data_nasc=:cli_data_nasc,\n cli_rg=:cli_rg,\n cli_cpf=:cli_cpf,\n cli_ddd=:cli_ddd,\n cli_fone=:cli_fone,\n cli_celular=:cli_celular,\n cli_endereco=:cli_endereco,\n cli_numero=:cli_numero,\n cli_bairro=:cli_bairro,\n cli_cidade=:cli_cidade,\n cli_uf=:cli_uf,\n cli_cep=:cli_cep,\n cli_email=:cli_email,\n cli_data_cad=:cli_data_cad,\n cli_hora_cad=:cli_hora_cad,\n cli_pass=:cli_senha \n WHERE cli_id =:cli_id\";\n \n \n $params = array(\n ':cli_nome'=> $this->getCli_nome(),\n ':cli_sobrenome'=> $this->getCli_sobrenome(),\n ':cli_data_nasc'=> $this->getCli_data_nasc(),\n ':cli_rg'=> $this->getCli_rg(),\n ':cli_cpf'=> $this->getCli_cpf(),\n ':cli_ddd'=> $this->getCli_ddd(),\n ':cli_fone'=> $this->getCli_fone(),\n ':cli_celular'=> $this->getCli_celular(),\n ':cli_endereco'=> $this->getCli_endereco(),\n ':cli_numero'=> $this->getCli_numero(),\n ':cli_bairro'=> $this->getCli_bairro(),\n ':cli_cidade'=> $this->getCli_cidade(),\n ':cli_uf'=> $this->getCli_uf(),\n ':cli_cep'=> $this->getCli_cep(),\n ':cli_email'=> $this->getCli_email(),\n ':cli_data_cad'=> $this->getCli_data_cad(),\n ':cli_hora_cad'=> $this->getCli_hora_cad(),\n ':cli_senha'=> $this->getCli_senha(),\n ':cli_id' => (int)$id\n \n \n );\n \n //echo $query;\n \n \n if($this->ExecuteSQL($query, $params)):\n return true;\n else:\n return false;\n endif;\n \n \n }", "function insertarHorarios($hora) {\r\n$sql = \"insert into tbhorarios(idtbhorario,hora)\r\nvalues ('',\".$hora.\")\";\r\n$res = $this->query($sql,1);\r\nreturn $res;\r\n}", "public function actualizar($tablas, $campo, $condi){\r\n $resul = $this->conexion->query(\"UPDATE $tablas SET $campo WHERE $condi\") OR die($this->conexion->error);\r\n return true;\r\n return false; \r\n }", "public function alterarTime($conexao,$id_pessoa){\n $query = \"update empresa_startup set cargo_funcao = ?,nivel_hierarquico = ? where id_pessoa = ?;\";\n $stmt = $conexao->prepare($query);\n $stmt->execute([$this->getCargoFuncao(),$this->getNivelHieraquico(),$id_pessoa]);\n }", "function alterarPessoa(){\r\n $banco = conectarBanco();\r\n $sql = \"UPDATE pessoa SET\"\r\n .\" nome='{$_POST[\"nome\"]}', \"\r\n .\" nascimento='{$_POST[\"nascimento\"]}', \"\r\n .\" endereco='{$_POST[\"endereco\"]}', \"\r\n .\" telefone='{$_POST[\"telefone\"]}'\"\r\n .\" WHERE id='{$_POST[\"id\"]}'\";\r\n $banco->query($sql); // Passa a query fornecida em $sql para o banco de dados\r\n $banco->close(); // Fecha o banco de dados\r\n voltarMenu(); // Volta para a pagina inicial da agenda\r\n}", "public function update(ParecerTrabalho $ParecerTrabalho) {\r\n $sql = \"UPDATE $this->table SET datahora = :datahora, status = :status,\"\r\n . \" status_introducao = :statusIntroducao, status_objetivos = :statusObjetivos, \"\r\n . \"status_metodologia = :statusMetodologia, status_resultados = :statusResultados, \"\r\n . \"observacoes = :observacoes, observacoes_internas = :observacoesInternas,\"\r\n . \"obs_introducao = :obsIntroducao, obs_objetivos = :obsObjetivos, \"\r\n . \"obs_metodologia = :obsMetodologia, obs_resultados = :obsResultados\"\r\n . \" WHERE seq = :seq AND fk_trabalho = :trabalho\";\r\n $trabalho = $ParecerTrabalho->getFkTrabalho();\r\n $seq = $ParecerTrabalho->getSeq();\r\n $datahora = $ParecerTrabalho->getDatahora();\r\n $status = $ParecerTrabalho->getStatus();\r\n $statusIntroducao = $ParecerTrabalho->getStatusIntroducao();\r\n $statusObjetivos = $ParecerTrabalho->getStatusObjetivos();\r\n $statusMetodologia = $ParecerTrabalho->getStatusMetodologia();\r\n $statusResultados = $ParecerTrabalho->getStatusResultados();\r\n $observacoes = $ParecerTrabalho->getObservacoes();\r\n $observacoesInternas = $ParecerTrabalho->getObservacoesInternas();\r\n $obsIntroducao = $ParecerTrabalho->getObsIntroducao();\r\n $obsObjetivos = $ParecerTrabalho->getObsObjetivos();\r\n $obsMetodologia = $ParecerTrabalho->getObsMetodologia();\r\n $obsResultados = $ParecerTrabalho->getObsResultados();\r\n $stmt = ConnectionFactory::prepare($sql);\r\n $stmt->bindParam(':trabalho', $trabalho);\r\n $stmt->bindParam(':seq', $seq);\r\n $stmt->bindParam(':datahora', $datahora);\r\n $stmt->bindParam(':status', $status);\r\n $stmt->bindParam(':statusIntroducao', $statusIntroducao);\r\n $stmt->bindParam(':statusObjetivos', $statusObjetivos);\r\n $stmt->bindParam(':statusMetodologia', $statusMetodologia);\r\n $stmt->bindParam(':statusResultados', $statusResultados);\r\n $stmt->bindParam(':observacoes', $observacoes);\r\n $stmt->bindParam(':observacoesInternas', $observacoesInternas);\r\n $stmt->bindParam(':obsIntroducao', $obsIntroducao);\r\n $stmt->bindParam(':obsObjetivos', $obsObjetivos);\r\n $stmt->bindParam(':obsMetodologia', $obsMetodologia);\r\n $stmt->bindParam(':obsResultados', $obsResultados);\r\n\r\n return $stmt->execute();\r\n }", "static public function mdlEditarCliente($tabla, $datos){\r\n\t\r\n\t\t$stmt = Conexion::conectar()->prepare(\"UPDATE $tabla SET razonSocial = :razonSocial, rutCliente = :rutCliente, giro = :giro, direccion = :direccion, ciudad = :ciudad, nombreContacto = :nombreContacto, telefono = :telefono, email = :email WHERE razonSocial = :razonSocial, rutCliente = :rutCliente, giro = :giro, direccion = :direccion, ciudad = :ciudad, nombreContacto = :nombreContacto, telefono = :telefono, email = :email\");\r\n\r\n\t\t$stmt->bindParam(\":razonSocial\", $datos[\"razonSocial\"], PDO::PARAM_STR);\r\n\t\t$stmt->bindParam(\":rutCliente\", $datos[\"rutCliente\"], PDO::PARAM_STR);\r\n\t\t$stmt->bindParam(\":giro\", $datos[\"giro\"], PDO::PARAM_STR);\r\n\t\t$stmt->bindParam(\":direccion\", $datos[\"direccion\"], PDO::PARAM_STR);\r\n\t\t$stmt->bindParam(\":ciudad\", $datos[\"ciudad\"], PDO::PARAM_STR);\r\n\t\t$stmt->bindParam(\":nombreContacto\", $datos[\"nombreContacto\"], PDO::PARAM_STR);\r\n\t\t$stmt->bindParam(\":telefono\", $datos[\"telefono\"], PDO::PARAM_STR);\r\n\t\t$stmt->bindParam(\":email\", $datos[\"email\"], PDO::PARAM_STR);\r\n\r\n\t\tif($stmt -> execute()){\r\n\r\n\t\t\treturn \"ok\";\r\n\t\t\r\n\t\t}else{\r\n\r\n\t\t\treturn \"error\";\t\r\n\r\n\t\t}\r\n\r\n\t\t$stmt -> close();\r\n\r\n\t\t$stmt = null;\r\n\r\n\t}", "public function updated(Historia $historia)\n {\n //\n }", "public function update(Request $request, Horario $horario)\n {\n $request->validate([\n 'id_horario'=>'required',\n 'id_aula'=>'required',\n 'id_curso'=>'required',\n 'dias'=>'required',\n 'horario'=>'required',\n ]);\n $horario->update($request->all());\n Session::flash('message','chorario editado correctamente');\n return redirect()->route('chorario.index');\n }", "static public function mdlEditarJerarquia($tabla, $datos)\n {\n $stmt = Conexion::conectar()->prepare(\"UPDATE $tabla SET nombre = :nombre, cargo = :cargo, sexo = :sexo WHERE id = :id\");\n $stmt->bindParam(\":id\", $datos[\"id\"], PDO::PARAM_STR);\n $stmt->bindParam(\":nombre\", $datos[\"nombre\"], PDO::PARAM_STR);\n $stmt->bindParam(\":cargo\", $datos[\"cargo\"], PDO::PARAM_STR);\n $stmt->bindParam(\":sexo\", $datos[\"sexo\"], PDO::PARAM_STR);\n if ($stmt->execute()) {\n // print_r($stmt->errorInfo());\n return \"ok\";\n } else {\n // print_r($stmt->errorInfo());\n return \"error\";\n }\n $stmt->close();\n $stmt = null;\n }", "function modificaRuta()\r\n\t{\r\n\t\t$query = \"UPDATE \" . self::TABLA . \" SET Ruta='\".$this->Ruta.\"'\tWHERE IDRuta = \".$this->IdRuta.\";\";\r\n\t\treturn parent::modificaRegistro( $query);\r\n\t}", "static public function mdlIngresarInventario($tabla, $datos){\n\n \t\t$stmt = Conexion::conectar()->prepare(\"INSERT INTO $tabla(nombre, medida_ingreso, cantidad_alerta, costo_ideal ,codigo_barras, fecha, sincronizado ) VALUES (:nombre, :medida_ingreso, :cantidad_alerta, :costo_ideal ,:codigo_barras, :fecha , 0 )\");\n\n \n\t\t$stmt->bindParam(\":nombre\", $datos[\"nombre\"], PDO::PARAM_STR);\n\t\t$stmt->bindParam(\":medida_ingreso\", $datos[\"medida_ingreso\"], PDO::PARAM_STR);\n\t\t$stmt->bindParam(\":cantidad_alerta\", $datos[\"cantidad_alerta\"], PDO::PARAM_STR);\n\t\t$stmt->bindParam(\":costo_ideal\", $datos[\"costo_ideal\"], PDO::PARAM_STR);\n\t\t$stmt->bindParam(\":codigo_barras\", $datos[\"codigo_barras\"], PDO::PARAM_STR);\n\t\t$stmt->bindParam(\":fecha\", $datos[\"fecha\"], PDO::PARAM_STR);\n\t\t\n\n \t\tif( $stmt -> execute()) \n \t\t\treturn \"ok\";\n \t\telse \n \t\t\treturn \"error\";\n\n \t\t$stmt-> close();\n \t\t$stmt= null;\n \t}", "private function Zapis_jednu_kolizi() { \r\n $dbh = Projektor2_AppContext::getDB();\r\n\r\n//echo \"<hr><br>* v Zapis_jednu_kolizi:\";\r\n\r\n //vyberu kolizi z uc_kolize_table pokud jiz existuje\r\n $query= \"SELECT * FROM uc_kolize_table WHERE id_ucastnik =\" . $this->id_ucastnik . \" and id_s_typ_kolize_FK=\" . $this->id_s_typ_kolize_FK ;\r\n //echo \"<br>*dotaz v Zapis_jednu_kolizi: \" . $query;\r\n $data = $dbh->prepare($query)->execute();\r\n //var_dump($data);\r\n \r\n if ($data) {\r\n $zaznam_kolize = $data->fetch() ; //vemu prvni (je predpoklad ze je jen jedna)\r\n if ($zaznam_kolize) {\r\n //echo \"<br>kolize je - budu prepisovat\"; //budu prepisovat\r\n $query1 = \"UPDATE uc_kolize_table set \" .\r\n \"revidovano='\" . $this->revidovano . \"', \" .\r\n \"revidovano_pozn='\" . $this->revidovano_pozn . \"', \" .\r\n \"valid=1 \" . \r\n \"WHERE id_uc_kolize_table =\" . $zaznam_kolize['id_uc_kolize_table'];\r\n //echo \"<br>\" . $query1; \r\n $data1 = $dbh->prepare($query1)->execute(); \r\n \r\n }\r\n else {\r\n //echo \"<br>kolize neni - budu vkladat\"; //budu vkladat\r\n $query1 = \"INSERT uc_kolize_table set \" . \r\n \"id_ucastnik= \" . $this->id_ucastnik . \", \" .\r\n \"id_s_typ_kolize_FK=\" . $this->id_s_typ_kolize_FK . \", \" .\r\n \"revidovano='\" . $this->revidovano . \"', \" .\r\n \"revidovano_pozn='\" . $this->revidovano_pozn . \"', \" .\r\n \"valid=1, date_vzniku=now() \" ;\r\n //echo \"<br>\" . $query1; \r\n $data1 = $dbh->prepare($query1)->execute();\r\n \r\n }\r\n } \r\n\r\n//echo \"<hr>\";\r\n}", "function modificarUsuario($usuario,$password,$idUsuario){\n \n $conex=Conexion::getInstance();\n \n $sql=\" UPDATE `usuarios` SET `usuario`='$usuario',`password`='$password' WHERE id=$idUsuario\";\n \n $conex->dbh->prepare($sql);\n $conex->dbh->exec($sql); \n \n\n}", "public function ativar()\n {\n $pdo = new \\PDO(DSN, USER, PASSWD);\n //cria sql\n $sql = \"UPDATE EncontroComDeus SET \t ativo = 1\n WHERE id = ?\n \";\n\n //prepara sql\n $stm = $pdo->prepare($sql);\n //trocar valores\n $stm->bindParam(1, $this->id );\n\n $resposta = $stm->execute();\n\n $erro = $stm->errorInfo();\n //var_dump($erro);\n //exit();\n\n //fechar conexão\n $pdo = null ;\n\n return $resposta;\n }", "public function save(){\n\t\t$bd=baseDatos::getInstance();\n\t\t$bd=new baseDatos(BD_USUARIO, BD_CONTRASENA, BD_NOMBRE_BD, BD_SERVIDOR);\n\t\t$bd->connect();\n\t\tif($this->id<>null){\n\t\t$columnas= array('idHotel','nombre','descripcion','cantidadEstrellas','ciudad','direccion','telefono','email','ubicacionFotografia');\n\t\t$valores = array($this->id,$this->nombre, $this->descripcion, $this->cantidadEstrellas, $this->ciudad, $this->direccion, $this->telefono, $this->email, $this->ubicacionFotografia);\n\t\t$filtros=array('idHotel'=>$this->id!= null);\n\t\tif (is_numeric($this->id) && $this->id > 0) {\n\t\t\t$bd->update(self::$tabla, $columnas, $valores, $filtros);\n\t\t} else {\n\t\t\t$bd->insert(self::$tabla, $columnas, $valores);\n\t\t}\n\t\t}else{\n\t\t\t$columnas= array('nombre','descripcion','cantidadEstrellas','ciudad','direccion','telefono','email','ubicacionFotografia');\n\t\t\t$valores = array($this->nombre, $this->descripcion, $this->cantidadEstrellas, $this->ciudad, $this->direccion, $this->telefono, $this->email, $this->ubicacionFotografia);\n\t\t\t$filtros=array('idHotel'=>$this->id!= null);\n\t\t\tif (is_numeric($this->id) && $this->id > 0) {\n\t\t\t\t$bd->update(self::$tabla, $columnas, $valores, $filtros);\n\t\t\t} else {\n\t\t\t\t$bd->insert(self::$tabla, $columnas, $valores);\n\t\t\t}\n\t\t}$bd->disconnect();\n\n\t}", "public function inactivarRecesoFecha($idAgendaHorarioRecesoFecha){\n\t\t\n\t\t $idAgendaHorarioRecesoFecha \t\t= parent::escaparQueryBDCliente($idAgendaHorarioRecesoFecha); \t\t\n\n\n $query = \"UPDATE tb_agendaHorarioRecesoFecha SET estado = 'I'\n \t\t\t\tWHERE idAgendaHorarioRecesoFecha = '$idAgendaHorarioRecesoFecha' \";\n \n $conexion = parent::conexionCliente();\n \t\t\n if($res = $conexion->query($query)){\n \n $resultado = \"Ok\";\n }\n \n return $resultado; \n\n\t}", "public function alterarDados($conexao,$id_pessoa){\n $query = \"update empresa_startup set modelo_negocio = ?,publico_alvo = ?, momento = ?, segmento_principal = ?, segmento_secundario = ?, tamanho_time = ?, faturamento_anual = ? where id_pessoa = ?;\";\n $stmt = $conexao->prepare($query);\n $stmt->execute([$this->getModeloNegocio(),$this->getPublicoAlvo(),$this->getMomento(),$this->getSegmentoPricipal(),$this->getSegmentoSecundario(),$this->getTamanhoTime(),$this->getFaturamentoAnual(),$id_pessoa]);\n }", "function modificarMetodologia(){\n\t\t$this->procedimiento='gem.f_metodologia_ime';\n\t\t$this->transaccion='GEM_GEMETO_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_metodologia','id_metodologia','int4');\n\t\t$this->setParametro('codigo','codigo','varchar');\n\t\t$this->setParametro('nombre','nombre','varchar');\n\t\t$this->setParametro('estado_reg','estado_reg','varchar');\n\n\t\t//Ejecuta la instruccion\n\t\t$this->armarConsulta();\n\t\t$this->ejecutarConsulta();\n\n\t\t//Devuelve la respuesta\n\t\treturn $this->respuesta;\n\t}", "function modificar_datos( $sql ) {\n // Nos conectamos a la Base de Datos y guardamos la referencia en la variable $conexion\n $conexion = conectar_Base_de_Datos();\n\n // Ejecutamos la consulta, y guardamos el resultado en la variable $resultado\n $resultado = mysqli_query( $conexion, $sql );\n\n // Comprobamos que la variable $resultado no esté vacia\n if ( !$resultado ) {\n // Si hubo un error, hacemos un echo\n echo \"No se pudo ejecutar Consulta\";\n echo 'MySQL Error: ' . mysqli_error( $conexion );\n // Y cerramos todo\n exit;\n } else {\n // Guardamos el ID de las rows modificadas\n $ID_row_modificada = mysqli_insert_id($conexion);\n // Cerramos la conexion a la Base de Datos\n mysqli_close( $conexion );\n // Devolvemos el ID de las rows modificadas\n return $ID_row_modificada;\n }\n}", "static public function mdlEditarCliente($tabla, $datos) {\n \n $stmt = Conexion::conectar()->prepare(\"UPDATE $tabla SET nombre = :nombre ,documento =\"\n . \" :documento , correo = :correo , num_celular =\"\n . \":num_celular , fecha_nacimiento = :fecha_nacimiento, area_trabajo = :area_trabajo WHERE id = :id\");\n\n $stmt->bindParam(\":id\", $datos[\"id\"], PDO::PARAM_INT);\n $stmt->bindParam(\":nombre\", $datos[\"nombre\"], PDO::PARAM_STR);\n $stmt->bindParam(\":documento\", $datos[\"documento\"], PDO::PARAM_INT);\n $stmt->bindParam(\":correo\", $datos[\"correo\"], PDO::PARAM_STR);\n $stmt->bindParam(\":num_celular\", $datos[\"num_celular\"], PDO::PARAM_STR);\n $stmt->bindParam(\":fecha_nacimiento\", $datos[\"fecha_nacimiento\"], PDO::PARAM_STR);\n $stmt->bindParam(\":area_trabajo\", $datos[\"area_trabajo\"], PDO::PARAM_STR);\n\n if ($stmt->execute()) {\n\n return \"ok\";\n } else {\n\n return \"error\";\n }\n $stmt->close();\n $stmt = null;\n }", "function modificarChequera(){\n\t\t$this->procedimiento='tes.f_chequera_ime';\n\t\t$this->transaccion='TES_CHQ_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_chequera','id_chequera','int4');\n\t\t$this->setParametro('estado_reg','estado_reg','varchar');\n\t\t$this->setParametro('nro_chequera','nro_chequera','int4');\n\t\t$this->setParametro('codigo','codigo','varchar');\n\t\t$this->setParametro('id_cuenta_bancaria','id_cuenta_bancaria','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}", "static Public function MdlActualizaAlmacen($tabla, $campo, $valor1, $valor2, $idUsuario){\n\n $stmt = Conexion::conectar()->prepare(\"UPDATE $tabla SET cant=cant+(:cant), ultusuario=:ultusuario WHERE id_producto = :id_producto\");\n $stmt->bindParam(\":id_producto\", $valor1, PDO::PARAM_INT);\n $stmt->bindParam(\":cant\", $valor2, PDO::PARAM_INT);\n $stmt->bindParam(\":ultusuario\", $idUsuario, PDO::PARAM_INT);\n\n\t\tif($stmt->execute()){\n\t\t\treturn true;\n\t\t}else{\n\t\t\treturn false;\n\t\t}\n\n\t\t$stmt = null;\n\n}", "function alterar($id_operacao,$codigo,$descricao,$papeis,$dbhw){\n\tglobal $convUTF, $esquemaadmin;\n\tif ($convUTF != true){\n\t\t$descricao = utf8_decode($descricao);\n\t}\n\t$dataCol = array(\n\t\t\"codigo\" => $codigo,\n\t\t\"descricao\" => $descricao\n\t);\n\t$resultado = i3GeoAdminUpdate($dbhw,\"i3geousr_operacoes\",$dataCol,\"WHERE id_operacao = $id_operacao\");\n\tif($resultado === false){\n\t\treturn false;\n\t}\n\t//apaga todos os papeis\n\t$resultado = excluirPapeis($id_operacao,$dbhw);\n\tif($resultado === false){\n\t\treturn false;\n\t}\n\tif(!empty($papeis)){\n\t\t//atualiza papeis vinculados\n\t\tforeach($papeis as $p){\n\t\t\t$resultado = adicionaPapel($id_operacao,$p,$dbhw);\n\t\t\tif($resultado === false){\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t}\n\treturn $id_operacao;\n}", "static public function mdlEditarCompra($tabla, $datos){\r\n\t\r\n\t\t$stmt = Conexion::conectar()->prepare(\"UPDATE $tabla SET vendedor = :vendedor, usuario = :usuario, serie = :serie, idPedido = :idPedido, folioCompra = :folioCompra, fechaCotizacion = :fechaCotizacion, cliente = :cliente, secciones = :secciones, cantidad = :cantidad, unidad = :unidad, codigo = :codigo, descripcion = :descripcion, precioUnitario = :precioUnitario, precioCompra = :precioCompra, descuentoProveedor = :descuentoProveedor, cantidad2 = :cantidad2, unidad2 = :unidad2, codigo2 = :codigo2, descripcion2 = :descripcion2, precioUnitario2 = :precioUnitario2, precioCompra2 = :precioCompra2, descuentoProveedor2 = :descuentoProveedor2, cantidad3 = :cantidad3, unidad3 = :unidad3, codigo3 = :codigo3, descripcion3 = :descripcion3, precioUnitario3 = :precioUnitario3, precioCompra3 = :precioCompra3, descuentoProveedor3 = :descuentoProveedor3, cantidad4 = :cantidad4, unidad4 = :unidad4, codigo4 = :codigo4, descripcion4 = :descripcion4, precioUnitario4 = :precioUnitario4, precioCompra4 = :precioCompra4, descuentoProveedor4 = :descuentoProveedor4, cantidad5 = :cantidad5, unidad5 = :unidad5, codigo5 = :codigo5, descripcion5 = :descripcion5, precioUnitario5 = :precioUnitario5, precioCompra5 = :precioCompra5, descuentoProveedor5 = :descuentoProveedor5, tiempoEntrega = :tiempoEntrega, fechaRecepcion = :fechaRecepcion, fechaElaboracion = :fechaElaboracion, fechaTermino = :fechaTermino, status = :status, sinAdquisicion = :sinAdquisicion, observaciones = :observaciones, estado = :estado, pendiente = :pendiente WHERE idPedido = :idPedido and serie = :serie\");\r\n\r\n\t\t$stmt->bindParam(\":vendedor\", $datos[\"vendedor\"], PDO::PARAM_STR);\r\n\t\t$stmt->bindParam(\":usuario\", $datos[\"usuario\"], PDO::PARAM_STR);\r\n\t\t$stmt->bindParam(\":serie\", $datos[\"serie\"], PDO::PARAM_STR);\r\n\t\t$stmt->bindParam(\":idPedido\", $datos[\"idPedido\"], PDO::PARAM_INT);\r\n\t\t$stmt->bindParam(\":folioCompra\", $datos[\"folioCompra\"], PDO::PARAM_STR);\r\n\t\t$stmt->bindParam(\":fechaCotizacion\", $datos[\"fechaCotizacion\"], PDO::PARAM_STR);\r\n\t\t$stmt->bindParam(\":cliente\", $datos[\"cliente\"], PDO::PARAM_STR);\r\n\t\t$stmt->bindParam(\":secciones\", $datos[\"secciones\"], PDO::PARAM_INT);\r\n\t\t$stmt->bindParam(\":cantidad\", $datos[\"cantidad\"], PDO::PARAM_INT);\r\n\t\t$stmt->bindParam(\":unidad\", $datos[\"unidad\"], PDO::PARAM_STR);\r\n\t\t$stmt->bindParam(\":codigo\", $datos[\"codigo\"], PDO::PARAM_STR);\r\n\t\t$stmt->bindParam(\":descripcion\", $datos[\"descripcion\"], PDO::PARAM_STR);\r\n\t\t$stmt->bindParam(\":precioUnitario\", $datos[\"precioUnitario\"], PDO::PARAM_STR);\r\n\t\t$stmt->bindParam(\":precioCompra\", $datos[\"precioCompra\"], PDO::PARAM_STR);\r\n\t\t$stmt->bindParam(\":descuentoProveedor\", $datos[\"descuentoProveedor\"], PDO::PARAM_STR);\r\n\t\t$stmt->bindParam(\":cantidad2\", $datos[\"cantidad2\"], PDO::PARAM_INT);\r\n\t\t$stmt->bindParam(\":unidad2\", $datos[\"unidad2\"], PDO::PARAM_STR);\r\n\t\t$stmt->bindParam(\":codigo2\", $datos[\"codigo2\"], PDO::PARAM_STR);\r\n\t\t$stmt->bindParam(\":descripcion2\", $datos[\"descripcion2\"], PDO::PARAM_STR);\r\n\t\t$stmt->bindParam(\":precioUnitario2\", $datos[\"precioUnitario2\"], PDO::PARAM_STR);\r\n\t\t$stmt->bindParam(\":precioCompra2\", $datos[\"precioCompra2\"], PDO::PARAM_STR);\r\n\t\t$stmt->bindParam(\":descuentoProveedor2\", $datos[\"descuentoProveedor2\"], PDO::PARAM_STR);\r\n\t\t$stmt->bindParam(\":cantidad3\", $datos[\"cantidad3\"], PDO::PARAM_INT);\r\n\t\t$stmt->bindParam(\":unidad3\", $datos[\"unidad3\"], PDO::PARAM_STR);\r\n\t\t$stmt->bindParam(\":codigo3\", $datos[\"codigo3\"], PDO::PARAM_STR);\r\n\t\t$stmt->bindParam(\":descripcion3\", $datos[\"descripcion3\"], PDO::PARAM_STR);\r\n\t\t$stmt->bindParam(\":precioUnitario3\", $datos[\"precioUnitario3\"], PDO::PARAM_STR);\r\n\t\t$stmt->bindParam(\":precioCompra3\", $datos[\"precioCompra3\"], PDO::PARAM_STR);\r\n\t\t$stmt->bindParam(\":descuentoProveedor3\", $datos[\"descuentoProveedor3\"], PDO::PARAM_STR);\r\n\t\t$stmt->bindParam(\":cantidad4\", $datos[\"cantidad4\"], PDO::PARAM_INT);\r\n\t\t$stmt->bindParam(\":unidad4\", $datos[\"unidad4\"], PDO::PARAM_STR);\r\n\t\t$stmt->bindParam(\":codigo4\", $datos[\"codigo4\"], PDO::PARAM_STR);\r\n\t\t$stmt->bindParam(\":descripcion4\", $datos[\"descripcion4\"], PDO::PARAM_STR);\r\n\t\t$stmt->bindParam(\":precioUnitario4\", $datos[\"precioUnitario4\"], PDO::PARAM_STR);\r\n\t\t$stmt->bindParam(\":precioCompra4\", $datos[\"precioCompra4\"], PDO::PARAM_STR);\r\n\t\t$stmt->bindParam(\":descuentoProveedor4\", $datos[\"descuentoProveedor4\"], PDO::PARAM_STR);\r\n\t\t$stmt->bindParam(\":cantidad5\", $datos[\"cantidad5\"], PDO::PARAM_INT);\r\n\t\t$stmt->bindParam(\":unidad5\", $datos[\"unidad5\"], PDO::PARAM_STR);\r\n\t\t$stmt->bindParam(\":codigo5\", $datos[\"codigo5\"], PDO::PARAM_STR);\r\n\t\t$stmt->bindParam(\":descripcion5\", $datos[\"descripcion5\"], PDO::PARAM_STR);\r\n\t\t$stmt->bindParam(\":precioUnitario5\", $datos[\"precioUnitario5\"], PDO::PARAM_STR);\r\n\t\t$stmt->bindParam(\":precioCompra5\", $datos[\"precioCompra5\"], PDO::PARAM_STR);\r\n\t\t$stmt->bindParam(\":descuentoProveedor5\", $datos[\"descuentoProveedor5\"], PDO::PARAM_STR);\r\n\t\t$stmt->bindParam(\":tiempoEntrega\", $datos[\"tiempoEntrega\"], PDO::PARAM_STR);\r\n\t\t$stmt->bindParam(\":fechaRecepcion\", $datos[\"fechaRecepcion\"], PDO::PARAM_STR);\r\n\t\t$stmt->bindParam(\":fechaElaboracion\", $datos[\"fechaElaboracion\"], PDO::PARAM_STR);\r\n\t\t$stmt->bindParam(\":fechaTermino\", $datos[\"fechaTermino\"], PDO::PARAM_STR);\r\n\t\t$stmt->bindParam(\":status\", $datos[\"status\"], PDO::PARAM_INT);\r\n\t\t$stmt->bindParam(\":sinAdquisicion\", $datos[\"sinAdquisicion\"], PDO::PARAM_INT);\r\n\t\t$stmt->bindParam(\":observaciones\", $datos[\"observaciones\"], PDO::PARAM_STR);\r\n\t\t$stmt->bindParam(\":estado\", $datos[\"estado\"], PDO::PARAM_INT);\r\n\t\t$stmt->bindParam(\":pendiente\", $datos[\"pendiente\"], PDO::PARAM_INT);\r\n\t\t$stmt->bindParam(\":id\", $datos[\"id\"], PDO::PARAM_INT);\r\n\r\n\t\tif($stmt -> execute()){\r\n\r\n\t\t\treturn \"ok\";\r\n\t\t\r\n\t\t}else{\r\n\r\n\t\t\treturn \"error\";\t\r\n\r\n\t\t}\r\n\r\n\t\t$stmt -> close();\r\n\r\n\t\t$stmt = null;\r\n\r\n\t}", "public function update(HTRequest $request, $id)\n {\n $horario = HorarioTenis::find($id);\n $horario->hora= $request->hora;\n $horario->save();\n\n flash::warning('El horario ha sido modificado');\n return redirect()->route('tenishorarios.index');\n }", "public function Actualizar_Exp_Laboral($data){\n $modelo = new HojaVida();\n $fechahora = $modelo->get_fecha_actual();\n $datosfecha = explode(\" \",$fechahora);\n $fechalog = $datosfecha[0];\n $horalog = $datosfecha[1];\n \n $tiporegistro = \"Experiencia Laboral\";\n $accion = \"Actualiza una Nueva \".$tiporegistro.\" En el Sistema (Hoja vida) TALENTO HUMANO\";\n $detalle = $_SESSION['nombre'].\" \".$accion.\" \".$fechalog.\" \".\"a las: \".$horalog;\n $tipolog = 15;\n $idusuario = $_SESSION['idUsuario'];\n //$idusuario = $_POST['id_user'];;\n try {\n $this->pdo->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);\t\t\n //EMPIEZA LA TRANSACCION\n $this->pdo->beginTransaction();\n $sql = \"UPDATE th_experiencia_laboral SET \n exp_id_departamento = ?,\n exp_id_municipio = ?, \n exp_rama_flag = ?,\n exp_empresa = ?,\n exp_cargo = ?,\n exp_CS_flag = ?,\n exp_id_area_CS = ?,\n exp_fecha_inicio = ?,\n exp_fecha_actualmente = ?,\n exp_fecha_fin = ?,\n exp_ruta_certificado = ?,\n exp_id_usuarioE = ?\n WHERE exp_id = ?\";\n\n $this->pdo->prepare($sql)\n ->execute(\n array( \n $data->exp_id_departamento,\n $data->exp_id_municipio,\n $data->exp_rama,\n $data->exp_empresa,\n $data->exp_cargo,\n $data->exp_CS_flag,\n $data->exp_id_area,\n $data->exp_fecha_inicio,\n $data->exp_fecha_actualmente,\n $data->exp_fecha_fin,\n $data->exp_ruta_certificado,\n $idusuario,\n $data->id\n )\n ); \n \n $this->pdo->exec(\"INSERT INTO log (fecha, accion,detalle,idusuario,idtipolog) VALUES ('$fechalog', '$accion','$detalle','$idusuario','$tipolog')\");\n //SE TERMINA LA TRANSACCION \n $this->pdo->commit();\n } catch (Exception $e) {\n $this->pdo->rollBack();\n die($e->getMessage());\n }\n }", "public function Editar($conexion)\n {\n $conectar = $conexion;\n $sentencia = $conectar->prepare(\"UPDATE tblpropiedad SET precio = ?, zona = ?, tipo = ?, habitaciones = ?, banos = ?, imagen_1 = ?, imagen_2 = ?, imagen_3 = ? WHERE codigo = ?\");\n $sentencia->bind_param(\"dsdddssss\", $this->precio, $this->zona, $this->tipo, $this->habitaciones, $this->banos, $this->imagen_1, $this->imagen_2, $this->imagen_3, $this->codigo);\n if(!$sentencia->execute())\n {\n $sentencia->close();\n return false;\n }\n $sentencia->close();\n return true;\n }", "public function update(){\n\t\t$sql = \"update \".self::$tablename.\" set Origen='$this->Origen',Fechap='$this->Fechap',Horap='$this->Horap',Cod_Referencia='$this->Referencia',Nombre_Referencia='$this->Nombre',Ref_Tela='$this->Reftela',Pinta='$this->Pinta',Color='$this->Color',Proceso='$this->Proceso',Ubicacion='$this->Ubicacion',SKU='$this->Sku',Maquina='$this->Maquina',Longitud_Inicial='$this->Longitudini',Longitud_Final='$this->Longitudfin',Peso='$this->Peso',Grados_PFoAT800K='$this->Plancha',Grados_Plato='$this->Plato',Grados_Pie='$this->Pie',Grados_Aire_S='$this->Airesup',Grados_Aire_I='$this->Aireinf',Caudal_Sup='$this->Caudalsup',Caudal_Inf='$this->Caudalinf',Presion='$this->Presion',Velocidad='$this->Velocidad',Velocidad_Sup='$this->Velocidad_Sup',Velocidad_Inf='$this->Velocidad_Inf',Intensidad='$this->Intensidad',Tiempo_Exp='$this->Tiempo',Resultado='$this->Resultado',Dinamometro='$this->Dinamometro',Observaciones1='$this->Observaciones' where id=$this->id\";\n\t\tExecutor::doit($sql);\n\t}", "public function aniadirHorario (Request $request)\n {\n $resultado=\"No se pudo guardar el registro\";\n $existe=\"\";\n if($request->ajax())\n {\n $existe=Horario::where([ ['nombre_horario','=',$request->input('aniadirNombreHorario')], ['hora1','=', $request->input('aniadirHora1')], ['hora2','=',$request->input('aniadirHora2')], ['hora3','=',$request->input('aniadirHora3')], ['hora4','=',$request->input('aniadirHora4')], ['hora5','=',$request->input('aniadirHora5')] ])->get();\n if(count($existe)==0)\n {\n $horarios=new Horario();\n $horarios->nombre_horario=$request->input('aniadirNombreHorario');\n $horarios->hora1=$request->input('aniadirHora1');\n $horarios->hora2=$request->input('aniadirHora2');\n $horarios->hora3=$request->input('aniadirHora3');\n $horarios->hora4=$request->input('aniadirHora4');\n $horarios->hora5=$request->input('aniadirHora5');\n $horarios->save();\n $resultado=\"Registro guardado con exito\";\n }\n else\n {\n $resultado=\"El registro no se guardo por que habia otro igual\";\n }\n }\n return $resultado;\n }", "private function tbl_guiones_registro_hfc() {\r\n\t\t\t$this->guiones_registro_hfc = $this->esquema->createTable('GUIONES_REGISTRO_HFC');\r\n\t\t\t$this->guiones_registro_hfc->addColumn('ID', 'bigint', array(\r\n\t\t\t\t'notnull' => true,\r\n\t\t\t\t'autoincrement' => true, \r\n\t\t\t\t'length' => 20,\r\n\t\t\t\t'comment' => 'ID del registro del guion HFC'\r\n\t\t\t));\r\n\t\t\t$this->guiones_registro_hfc->addColumn('REGISTRO', 'bigint', array(\r\n\t\t\t\t'notnull' => true, \r\n\t\t\t\t'length' => 20,\r\n\t\t\t\t'comment' => 'ID del registro [ID de la tabla GUIONES_REGISTRO]'\r\n\t\t\t));\r\n\t\t\t$this->guiones_registro_hfc->addColumn('INTERMITENCIA', 'boolean', array(\r\n\t\t\t\t'notnull' => true,\r\n\t\t\t\t'default ' => '0', \r\n\t\t\t\t'comment' => 'Determina la intermitencia del servicio, 0 => NO, 1 => SI'\r\n\t\t\t));\r\n\t\t\t$this->guiones_registro_hfc->addColumn('GUION', 'bigint', array(\r\n\t\t\t\t'notnull' => true, \r\n\t\t\t\t'length' => 20,\r\n\t\t\t\t'comment' => 'ID del Guion [ID de la tabla GUIONES]'\r\n\t\t\t));\r\n\t\t\t$this->guiones_registro_hfc->addColumn('PRIORIDAD', 'bigint', array(\r\n\t\t\t\t'notnull' => true, \r\n\t\t\t\t'length' => 20,\r\n\t\t\t\t'comment' => 'ID de la prioridad del Guion [ID de la tabla GUIONES_REGISTRO_NODOS]'\r\n\t\t\t));\r\n\t\t\t$this->guiones_registro_hfc->setPrimaryKey(array('ID'));\r\n\t\t\t$this->guiones_registro_hfc->addForeignKeyConstraint($this->guiones_registro, array('REGISTRO'), array('ID'), $this->opcForeign);\r\n\t\t\t$this->guiones_registro_hfc->addForeignKeyConstraint($this->guiones, array('GUION'), array('ID'), $this->opcForeign);\r\n\t\t\t$this->guiones_registro_hfc->addForeignKeyConstraint($this->guiones_prioridades, array('PRIORIDAD'), array('ID'), $this->opcForeign);\r\n\t\t}", "function verificarSolapamiento($horario, $duracion, $idTeatroNuevaFuncion){\r\n $funcionTeatro = new FuncionTeatro('', '', '', '', '');\r\n $coleccionFuncionesTeatro = $funcionTeatro->listar(\"\");\r\n $cine = new Cine('','','','','','','');\r\n $coleccionCines = $cine->listar(\"\");\r\n $musical = new Musical('','','','','','','');\r\n $coleccionMusicales = $musical->listar(\"\");\r\n\r\n $retorno = false;\r\n\r\n list($horaFuncion, $minutosFuncion) = explode(\":\", $horario); //Extraigo la hora y los minutos separados por el \":\"\r\n $hora = intval($horaFuncion); //Convierto la hora de string a entero\r\n $minutos = intval($minutosFuncion); //Convierto los minutos de string a entero\r\n\r\n $horarioInicioFuncion = (($hora * 60) + $minutos); //Convierto el horario de INICIO de la nueva funcion a minutos\r\n $horarioCierreFuncion = $horarioInicioFuncion + $duracion; //Horario de CIERRE de la nueva funcion\r\n\r\n $horarioFuncionNueva = array('inicio'=>$horarioInicioFuncion, 'cierre'=>$horarioCierreFuncion);\r\n\r\n $coleccionHorarios = [];\r\n\r\n //Sumo los horarios de cada tipo\r\n $coleccionHorarios = armarColeccionHorarios($coleccionFuncionesTeatro, $idTeatroNuevaFuncion, $coleccionHorarios);\r\n $coleccionHorarios = armarColeccionHorarios($coleccionCines, $idTeatroNuevaFuncion, $coleccionHorarios);\r\n $coleccionHorarios = armarColeccionHorarios($coleccionMusicales, $idTeatroNuevaFuncion, $coleccionHorarios);\r\n\r\n if (count($coleccionHorarios)>0){\r\n $horarioDisponible = verificarHorario($horarioFuncionNueva, $coleccionHorarios);\r\n if ($horarioDisponible){\r\n $retorno = true;\r\n }\r\n } else {\r\n $retorno = true;\r\n }\r\n\r\n return $retorno;\r\n}", "function modificar(){\n global $conexion, $data;\n $id = $data[\"id\"];\n $usuario = $data[\"usuario\"];\n $email = $data[\"email\"];\n $clave = $data[\"clave\"];\n $tipo = $data[\"tipo\"];\n $estado = $data[\"estado\"];\n $resultado = mysqli_query($conexion,\"UPDATE usuario SET usu_clave='$clave', usu_id_tipo_usuario='$tipo', usu_estado='$estado' WHERE usu_id='$id'\");\n echo validarError($conexion, true, $resultado);\n }", "public function update(Request $request)\n {\n try{\n $horometer = Horometer::findOrFail($request->horometer_id);\n $horometer->value = $request->get('value');\n $horometer->date_read = $request->get('date_read');\n $horometer->comment = $request->get('comment');\n DB::beginTransaction();\n $horometer->save();\n DB::commit();\n session()->flash('my_message', 'Lectura de Horometro Modificad Correctamente');\n return redirect()->back();\n }catch(Exception $e){\n session()->flash('my_error', $e->getMessage());\n DB::rollback();\n }\n }" ]
[ "0.8005805", "0.70948493", "0.6656302", "0.65603644", "0.6455823", "0.6369351", "0.62928194", "0.6223529", "0.62190884", "0.61730695", "0.61649704", "0.61011636", "0.6097769", "0.6081382", "0.60528064", "0.60527444", "0.5973364", "0.5960762", "0.59522605", "0.59478927", "0.59304744", "0.59288645", "0.5926045", "0.59240866", "0.5906174", "0.58806604", "0.5879719", "0.5878084", "0.5876883", "0.58526087", "0.5846493", "0.5837151", "0.5824757", "0.58245975", "0.58141935", "0.58140737", "0.5809887", "0.5802606", "0.5802474", "0.5800927", "0.5800927", "0.5789619", "0.57888335", "0.5776338", "0.5760759", "0.5759097", "0.57504964", "0.57419354", "0.5739801", "0.5720846", "0.5712805", "0.57127434", "0.57093006", "0.57033134", "0.5701348", "0.56922865", "0.5688526", "0.56696427", "0.5660381", "0.56552297", "0.5654852", "0.56470877", "0.56417817", "0.56383383", "0.5628816", "0.56261134", "0.56255317", "0.56252897", "0.56248057", "0.5624312", "0.5622196", "0.5619708", "0.56154776", "0.5613436", "0.5608915", "0.5601419", "0.55916274", "0.55879295", "0.5581555", "0.5575436", "0.5573104", "0.5568102", "0.5559445", "0.5552932", "0.55517125", "0.5548094", "0.55451757", "0.554381", "0.55410486", "0.55402195", "0.5539459", "0.55382174", "0.55377764", "0.55299", "0.5522198", "0.5520918", "0.5519361", "0.55156505", "0.5514908", "0.5504275" ]
0.70157444
2
Form singular name. This name will be displayed in the navigation.
public function names() { return [ 'singular' => 'boolean', ]; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getSingularName()\n {\n return $this->singularName;\n }", "public function getSingularName()\n {\n return $this->singularName;\n }", "public static function singularLabel()\n {\n return __('Menu');\n }", "public function getSingularName();", "public function singular_name()\n {\n if (_t('Tag.SINGULARNAME')) {\n return _t('Tag.SINGULARNAME');\n } else {\n return parent::singular_name();\n }\n }", "public function singular()\n {\n return $this->getNameInstance()->singular();\n }", "public function getSingularName()\n {\n return rtrim($this->name, 's');\n }", "public function singular_name()\n {\n $name = explode('\\\\', parent::singular_name());\n return trim(end($name));\n }", "public function singular_name()\n {\n $name = explode('\\\\', parent::singular_name());\n return trim(end($name));\n }", "public function getFormName()\n {\n return $this->getModelSimpleName() .'Form';\n }", "public function getSingularName()\n {\n return str_singular(lcfirst(ucwords($this->getClass())));\n }", "public function getSingularName()\n {\n return str_singular(lcfirst(ucwords($this->getClass())));\n }", "public function singular_name()\n {\n $name = explode('\\\\', parent::singular_name());\n return trim(str_replace('User', '', end($name)));\n }", "public function setSingularName($name)\n {\n $this->singularName = $name;\n }", "public function setSingularName($name)\n {\n $this->singularName = $name;\n }", "public function getFormName();", "public function getFormName();", "public function singular()\n\t{\n\t\treturn _('Document');\n\t}", "public function getFormName(){\n return $this->form_name ?? 'form';\n }", "public static function singularLabel()\n {\n return __('User');\n }", "public static function singularLabel()\n {\n return Str::singular(static::label());\n }", "public static function singularLabel()\n {\n return Str::singular(static::label());\n }", "public static function singularLabel()\n {\n return __('Template');\n }", "public function setSingularName($singular);", "public function setNameMenuSingular( $name = NULL ){\n\t\t$this->nameMenuSingular = $name ? $name : $this->name;\n\t}", "public function getName()\n {\n return 'form';\n }", "final public function getFormName(): string\n {\n\n return str_replace('.', '__', $this->getName());\n }", "public function getName() {\n return 'form';\n }", "public function getName()\n {\n return 'search_form';\n }", "public function getSingular()\n\t{\n\t\treturn empty($this->singular) ? strtolower($this->getClass()) : $this->singular;\n\t}", "public function getManageFormTypeName()\n {\n return 'default';\n }", "abstract protected function getFormName();", "public function singular()\n {\n return new Name(Pluralizer::singular($this->name));\n }", "public static function singularLabel()\n {\n return __('Category');\n }", "protected function getNameInput()\n {\n return Str::singular(parent::getNameInput());\n }", "public function getName()\n {\n return 'snide_extra_form';\n }", "public function getName()\n {\n return 'textpage_form';\n }", "public static function singularLabel()\n {\n return __('Attribute');\n }", "public function FormName()\n {\n return $this->getTemplateHelper()->generateFormID($this);\n }", "protected function getFormName(){\n return (\n (\n $this->_name!==NULL &&\n is_string($this->_name) &&\n strlen(trim($this->_name))\n )\n ?$this->_name\n :$this->setFormName()\n );\n }", "public function getName()\n {\n return 'category_form';\n }", "public static function singularLabel()\n {\n return __('permission-tool::resources.role');\n }", "abstract protected function singularLabel(): string;", "public function name() {\n\t\treturn esc_html__( 'Login Form', 'thrive-cb' );\n\t}", "protected function SingularName() {\n\treturn 'vcraItemType';\n }", "public function setFormTitle()\n {\n if ($enquiry = Mage::registry('enquiry')) {\n return $this->__('Enquiry: #%s', $enquiry->getid());\n }\n return $this->__('Contact Enquiry Information');\n }", "protected function SingularName() {\n\treturn 'vcqrTitleInfo';\n }", "public function getModelSingular()\n {\n return strtolower($this->getModelSimpleName());\n }", "public function getName()\n {\n return 'content_form';\n }", "public function setSingular($label)\n {\n $this->singularForm = $label;\n\n return $this;\n }", "public function getName()\n {\n return \"event_form\";\n }", "public static function singularLabel()\n {\n return __('Transaction');\n }", "public static function singularLabel()\n {\n return __('Confirmation');\n }", "public function setFormName($name){\n\t\t$this->_form_name = $name;\t\n\t}", "public function getSingularModelName()\n {\n\n return strtolower(class_basename($this->model));\n }", "protected function getFormObjectName() {}", "function singularize(){\n\t\treturn $this->_copy(_Inflect::singularize((string)$this));\n\t}", "public static function singularLabel()\n {\n return 'Buker';\n }", "public function getCurrentStructureFormPrefix() {}", "function getTitle() {\n return 'Forms Demo';\n }", "public function singular() {\n return substr($this->tipoEntidad,strrpos($this->tipoEntidad,'\\\\')+1);\n }", "protected function getNameFormFileIn()\n {\n $formName = str_replace(' ', '', ucwords(str_replace('-', ' ', $this->owner->id)));\n return \"Form\" . $formName . ucfirst($this->owner->action->actionMethod) . 'In';\n }", "public function names()\n {\n return [\n 'singular' => 'Settings',\n ];\n }", "public function get_form_editor_field_title() {\n\t\treturn esc_attr__( 'Simple', 'simplefieldaddon' );\n\t}", "public function FormName()\n {\n return ($this->_widgetEditor->getForm() ? $this->_widgetEditor->getForm()->FormName() : false);\n }", "public function getName()\n {\n return \"menu\";\n }", "public function getName()\r\n {\r\n return 'context_form';\r\n }", "public function MenuTitle() {\n\t\treturn $this->Name();\n\t}", "public function defaultName() { return \"Enter the category name...\"; }", "protected function SelfLink_name() {\n\treturn $this->SelfLink($this->NameSingular());\n }", "public static function label()\n {\n return __('Menus');\n }", "public function set_formname($name) {\n $this->form_name=$name;\n }", "public function getFormPrefix() {}", "function DBDataFormTitle()\n {\n return\n $this->GetRealNameKey\n (\n $this->ApplicationObj()->PertainsSetup[ $this->ApplicationObj()->Pertains ],\n \"Data_Form_Title\"\n );\n }", "function setSingularName($setTaxonomySingularName) {\n $this->taxonomySingularName = $setTaxonomySingularName;\n }", "protected function getName()\r\n {\r\n return app::values()->page();\r\n }", "public function getName()\n {\n return 'user_form_type';\n }", "public function getTabLabel()\n {\n return __('Single Page Details');\n }", "public function singular(string $value): string\n {\n return $this->inflector->singular($value);\n }", "function localisation_sc_form() {\n\treturn vdsl_get_template( 'search-form.php' );\n}", "protected function getNameInput()\n {\n return trim($this->option('name'));\n }", "public static function displayName(): string\n {\n return Craft::t('enupal-socializer','Socializer');\n }", "protected function getTitle()\n {\n if ($this->formTitle) {\n return $this->formTitle;\n } elseif ($this->unDelete) {\n return sprintf($this->_('Undelete %s!'), $this->getTopic());\n } else {\n return sprintf($this->_('Delete %s!'), $this->getTopic());\n }\n }", "protected function getTitle()\n {\n if ($this->formTitle) {\n return $this->formTitle;\n } elseif ($this->unDelete) {\n return sprintf($this->_('Undelete %s!'), $this->getTopic());\n } else {\n return sprintf($this->_('Delete %s!'), $this->getTopic());\n }\n }", "public function getName(){ return $this->getField('name'); }", "public function getInteractionFormName()\n {\n return self::INTERACTION_FORM_NAME;\n }", "protected function getName()\n {\n return $this->slimInstance->router()->getCurrentRoute()->getName();\n }", "protected function getFormClass() : string\n {\n return 'XLite\\Module\\PureClarity\\Personalization\\View\\Form\\Admin\\Dashboard\\Signup';\n }", "public function getName()\r\n\t{\r\n\t\tif ($this->def->getField(\"name\"))\r\n\t\t\treturn $this->getValue(\"name\");\r\n\t\tif ($this->def->getField(\"title\"))\r\n\t\t\treturn $this->getValue(\"title\");\r\n\t\tif ($this->def->getField(\"subject\"))\r\n\t\t\treturn $this->getValue(\"subject\");\r\n\t\tif ($this->def->getField(\"full_name\"))\r\n\t\t\treturn $this->getValue(\"full_name\");\r\n\t\tif ($this->def->getField(\"first_name\"))\r\n\t\t\treturn $this->getValue(\"first_name\");\r\n\r\n\t\treturn $this->getId();\r\n\t}", "public static function form(){\n\t\treturn \"\";\n\t}", "public function getTitle()\n {\n return $this->input('title');\n }", "public function getName(){\n return \"signin\";\n }", "public function getPluralName()\n {\n\n return str_plural(lcfirst(ucwords($this->getClass())));\n }", "public function getPluralName()\n {\n\n return str_plural(lcfirst(ucwords($this->getClass())));\n }", "protected function getNameInput()\n {\n $this->model = trim($this->argument('name'));\n return $this->model . 'Controller';\n }", "public static function modelTitlePlural()\n {\n return \\Yii::t('admin/t', 'Auth Items');\n }", "public function getName()\n {\n return 'formEvent';\n }", "public function setFormName($_name=NULL){\n return $this->_name = (\n (\n $_name!==NULL &&\n is_string($_name) &&\n strlen(trim($_name))\n )\n ?$_name\n :(self::NAME_DEFAULT)\n );\n }", "function name()\r\n {\r\n return htmlspecialchars( $this->Name );\r\n }", "function name()\r\n {\r\n return htmlspecialchars( $this->Name );\r\n }", "function name()\r\n {\r\n return htmlspecialchars( $this->Name );\r\n }" ]
[ "0.7356474", "0.7356474", "0.7225873", "0.7066696", "0.6998795", "0.6982902", "0.69145346", "0.6886912", "0.6886912", "0.6871897", "0.6854548", "0.6854548", "0.6667798", "0.6650918", "0.6650918", "0.6628826", "0.6628826", "0.6628234", "0.65922946", "0.6573517", "0.6568498", "0.6568498", "0.6566289", "0.6479688", "0.6454605", "0.64511937", "0.6425646", "0.6396252", "0.63875973", "0.63641477", "0.63276744", "0.6316722", "0.6302699", "0.6247563", "0.6244124", "0.6212783", "0.61532474", "0.611735", "0.61160874", "0.6085472", "0.60606545", "0.60383373", "0.600251", "0.5998107", "0.5997397", "0.5965543", "0.59649634", "0.59502244", "0.59372026", "0.5929037", "0.5907622", "0.5858507", "0.58407396", "0.5831845", "0.58300173", "0.58250743", "0.5794654", "0.57861626", "0.57257247", "0.57219094", "0.572184", "0.57197", "0.57172513", "0.56951517", "0.5666833", "0.56516904", "0.5629583", "0.55976015", "0.5558815", "0.554966", "0.5515158", "0.5496497", "0.548704", "0.54744166", "0.54700816", "0.54575974", "0.5454982", "0.54537624", "0.5453166", "0.54121697", "0.53978795", "0.5397218", "0.5385343", "0.5385343", "0.5383002", "0.53797084", "0.5378384", "0.5370084", "0.53619283", "0.5359482", "0.53502715", "0.53473145", "0.53412974", "0.53412974", "0.5332459", "0.53283113", "0.53182983", "0.53093493", "0.5307085", "0.5307085", "0.5307085" ]
0.0
-1
Setup create and edit form.
public function show(CrudShow $form) { $form->card(function ($form) { $form->boolean('active') ->title('Live') ->hint('Put the site online.') ->width(1 / 3); }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "abstract function setupform();", "public function createForm();", "public function createForm();", "public function Form()\n {\n include(CONFIG\\PATH\\FORMS . 'Account_Create.php');\n }", "protected function createComponentEditForm() {\r\n\t\t$form = new Form;\r\n\t\t$form->getElementPrototype()->class(\"formWide\");\r\n\t\t$options = array(0 => \"Default\", 1 => \"Odkaz na obsah\", 3 => \"Odkaz na položku menu\");\r\n\t\t// easy way how to create url slug\r\n\t\t$form->addText(\"title\", \"Název:\")\r\n\t\t\t\t->setAttribute('onchange', '\r\n\t\t\t\t\t\t\tvar nodiac = { \"á\": \"a\", \"č\": \"c\", \"ď\": \"d\", \"é\": \"e\", \"ě\": \"e\", \"í\": \"i\", \"ň\": \"n\", \"ó\": \"o\", \"ř\": \"r\", \"š\": \"s\", \"ť\": \"t\", \"ú\": \"u\", \"ů\": \"u\", \"ý\": \"y\", \"ž\": \"z\" };\r\n\t\t\t\t\t\t\ts = $(\"#frmeditForm-title\").val().toLowerCase();\r\n\t\t\t\t\t\t\tvar s2 = \"\";\r\n\t\t\t\t\t\t\tfor (var i=0; i < s.length; i++) {\r\n\t\t\t\t\t\t\t\ts2 += (typeof nodiac[s.charAt(i)] != \"undefined\" ? nodiac[s.charAt(i)] : s.charAt(i));\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tresult=s2.replace(/[^a-z0-9_]+/g, \"-\").replace(/^-|-$/g, \"\");\r\n\t\t\t\t\t\t\t$(\"#frmeditForm-url\").val(result);\r\n\t\t\t\t\t\t');\r\n\t\t$form->addText(\"url\", \"url:\")->setAttribute(\"readonly\", \"readonly\");\r\n\t\tif (!$this->onlyTree) {\r\n\t\t\t$form->addSelect(\"target_type\", \"Cíl:\", $options);\r\n\t\t\t$content = $this->prepareContentSelectBox();\r\n\t\t\t$menuContent = $this->prepareMenuContentSelectBox();\r\n\t\t\t$form->addSelect(\"target_id\", \"Odkazovaný obsah:\", $content)->setPrompt(\"Pouze při zvolení výše\");\r\n\t\t\t$form->addSelect(\"target_menu\", \"Odk. položka menu:\", $menuContent)->setPrompt(\"Pouze při zvolení výše\");\r\n\t\t}\r\n\t\t$form->addHidden(\"parent_id\", $this->parent_id);\r\n\t\t$form->addHidden(\"edit_id\", $this->edit_id);\r\n\t\t//filling form\r\n\t\tif ($this->edit_id or $this->edit_id === \"0\") {\r\n\t\t\t$defFromDb = $this->closureModel->getItemById($this->edit_id);\r\n\t\t\t$defaults = new \\Nette\\ArrayHash;\r\n\t\t\tforeach ($defFromDb as $key => $value) {\r\n\t\t\t\t$defaults->$key = $value;\r\n\t\t\t}\r\n\t\t\tif ($this->edit_id === \"0\") {\r\n\t\t\t\t$form[\"title\"]->setDisabled();\r\n\t\t\t}\r\n\t\t\tif (!$this->onlyTree) {\r\n\t\t\t\t$t = $defaults->target;\r\n\t\t\t\tif (!Validators::isNumericInt($t)) {\r\n\t\t\t\t\t$menuItem = $this->checkTargetMenuItemExists($t);\r\n\t\t\t\t\tif ($menuItem) {\r\n\t\t\t\t\t\t$defaults->target_type = 3;\r\n\t\t\t\t\t\t$defaults->target_menu = $menuItem;\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\t$contentId = $this->checkTargetContentExists($t);\r\n\t\t\t\t\t\t$defaults->target_type = 1;\r\n\t\t\t\t\t\t$defaults->target_id = $contentId;\r\n\t\t\t\t\t}\r\n\t\t\t\t\t$form[\"target_menu\"]->getControlPrototype()->addClass(\"formFieldInvisible\");\r\n\t\t\t\t} elseif ($t <= 0) {\r\n\t\t\t\t\t$defaults->target_type = 0;\r\n\t\t\t\t\t$form[\"target_menu\"]->getControlPrototype()->addClass(\"formFieldInvisible\");\r\n\t\t\t\t\t$form[\"target_id\"]->getControlPrototype()->addClass(\"formFieldInvisible\");\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t$defaults->target = null;\r\n\t\t\t$form->setDefaults($defaults);\r\n\t\t}\r\n\r\n\t\t$form->addSubmit('save', 'Save')\r\n\t\t\t\t\t\t->setAttribute('onclick', '$(\"#frmeditForm-title\").trigger(\"change\")')\r\n\t\t\t\t->onClick[] = callback($this, 'editFormSubmitted');\r\n\t\t$form->setRenderer(new \\Kdyby\\BootstrapFormRenderer\\BootstrapRenderer());\r\n\t\treturn $form;\r\n\t}", "public function createForm()\n {\n }", "public function action_create()\n {\n $this->action_edit(FALSE);\n }", "public function index_onCreateForm()\n\t{\n\t\tparent::create();\n\t\treturn $this->makePartial('create');\n\t}", "function edit() {\n\t\tglobal $tpl;\n\n\t\t$form = $this->initForm();\n\t\t$tpl->setContent($form->getHTML());\n\t}", "public function editformAction(){\n\t\t$this->loadLayout();\n $this->renderLayout();\n\t}", "public function createAction()\n {\n// $this->view->form = $form;\n }", "protected function form()\n {\n $form = new Form(new $this->currentModel);\n\n $form->tab('基本信息', function ($form) {\n\n //$form->display('id', 'ID');\n //$form->text('keyword', '关键词');\n $form->text('static_url', '静态地址')->help(\"如果输入:New-York-Downtown.html,则访问地址为:http://www.yinjispace.com/article/<span style='color:#F00;'>New-York-Downtown.html</span>\");\n $form->radio('article_status', '状态')->options(['0' => '草稿', '1' => '审核中', '2' => '已发布'])->default('0');\n $form->radio('display', '公开度')->options(['0' => '公开', '-1' => '保密'])->default('0');\n $form->datetime('release_time', '发布时间')->format('YYYY-MM-DD HH:mm:ss');\n // $form->datetime('created_at','发布时间')->format('YYYY-MM-DD HH:mm:ss');\n $form->multipleSelect('category_ids', '分类')->options(ArticleCategory::getSelectOptions());\n $form->multipleSelect('topic_ids', '专题')->options(Topic::getSelectOptions());\n $form->text('tag_ids', '标签(逗号分隔)');\n $form->text('view_num', '浏览数')->default(0);\n $form->text('like_num', '点赞数')->default(0);\n $form->text('favorite_num', '收藏数')->default(0);\n $form->text('vip_download', '下载地址');\n //$form->multipleSelect('designer_id', '设计师ID')->options(Designer::getSelectOptions());\n $form->multipleSelect('designer_id', '设计师')->options(function ($ids) {\n $designer = Designer::find($ids);\n if ($designer) {\n return $designer->pluck('title_cn', 'id');\n }\n\n })->ajax('/admin/article/get_designer_select_options');\n $form->text('article_source', '文章来源');\n $form->text('article_source_url', '文章来源URL');\n $form->image('custom_thum', '自定义封面')\n ->uniqueName()\n ->widen(880)\n ->move('public/photo/images/custom_thum/');\n $form->image('special_photo', '特色照片')\n ->uniqueName()\n ->widen(1920)\n ->move('public/photo/images/special_photo/');\n $form->text('seo_title', 'SEO标题');\n $form->text('seo_keyword', 'SEO关键词');\n $form->text('seo_desc', 'SEO描述');\n })->tab('中文', function ($form) {\n\n $form->text('title_designer_cn', '标题(设计师)');\n $form->text('title_name_cn', '标题(项目名称)');\n $form->text('title_intro_cn', '标题(项目介绍)');\n $form->text('description_cn', '自定义描述(中)');\n $form->text('location_cn', '地域(中)');\n $form->ckeditor('detail.content_cn', '正文(中)');\n\n })->tab('English', function ($form) {\n\n $form->text('title_designer_en', '标题(设计师)');\n $form->text('title_name_en', '标题(项目名称)');\n $form->text('title_intro_en', '标题(项目介绍)');\n $form->text('description_en', '自定义描述(英)');\n $form->text('location_en', '地域(英)');\n $form->ckeditor('detail.content_en', '正文(英)');\n\n });\n\n //保存前回调\n $form->saving(function (Form $form) {\n if (empty($form->model()->release_time)) {\n $form->release_time = date('Y-m-d H:i:s');\n }\n });\n\n $form->saved(function (Form $form) {\n $tags = explode(',', $form->tag_ids);\n foreach ($tags as $tag) {\n echo $tag;\n $ret = ArticleTag::firstOrCreate(['name_cn' => trim($tag)]);\n }\n\n });\n\n\n return $form;\n }", "abstract public function createForm();", "abstract public function createForm();", "public function getEditForm();", "public function CreateForm();", "public function xadmin_createform() {\n\t\t\n\t\t$args = $this->getAllArguments ();\n\t\t\n\t\t/* get the form field title */\n\t\t$form_title = $args [1];\n\t\t$form_type = @$args [2] ? $args [2] : 'blank';\n\t\t\n\t\t/* Load Model */\n\t\t$form = $this->getModel ( 'form' );\n\t\t$this->session->returnto ( 'forms' );\n\t\t\n\t\t/* create the form */\n\t\t$form->createNewForm ( $form_title, $form_type );\n\t\t\n\t\t$this->loadPluginModel ( 'forms' );\n\t\t$plug = Plugins_Forms::getInstance ();\n\t\t\n\t\t$plug->_pluginList [$form_type]->onAfterCreateForm ( $form );\n\t\t\n\t\t/* set the view file (optional) */\n\t\t$this->_redirect ( 'xforms' );\n\t\n\t}", "public function editAction()\n {\n $this->createEditParameters = $this->createEditParameters + $this->_editExtraParameters;\n\n parent::editAction();\n }", "public function CreateForm($request = null)\n {\n //\t\t\t the Staged data rather than _Live. ie. Elemental.\n //\n //\t\t\t We *do not* want to revert back to _Live mode before the end of the function\n //\t\t\t or has_many/many_many will use the _Live table.\n Versioned::set_stage('Stage');\n\n $fields = new FieldList(\n new TextField('Title', _t('FrontendCreate.TITLE', 'Title'))\n );\n\n if ($this->CreateType) {\n if (!$this->editObject) {\n $this->editObject = $this->createEditObject();\n }\n if ($this->editObject instanceof FrontendCreatable || $this->editObject->hasMethod('getFrontendCreateFields')) {\n $tFields = $this->editObject->getFrontendCreateFields();\n if ($tFields) {\n // Only override fields if 'getFrontendCreateFields' actually returns something.\n $fields = $tFields;\n }\n } else if ($this->editObject instanceof Member) {\n $fields = $this->editObject->getMemberFormFields();\n } else {\n $fields = $this->editObject->getFrontEndFields();\n }\n } else {\n $fields = new FieldList(\n new LiteralField('InvalidType', 'Type configuration is incorrectly configured')\n );\n }\n if ($this->editObject && $this->editObject->ID) {\n $fields->push(HiddenField::create('ID', 'ID', $this->editObject->ID));\n }\n\n // If record doesn't exist.\n if (!$this->editObject || !$this->editObject->exists()) {\n $pid = $this->getRequest()->requestVar('CreateLocationID');\n if ($pid && $this->isParentIdValid($pid)) {\n $parentPage = \\Page::get()->byID($pid);\n $createLocation = HiddenField::create('CreateLocationID', 'Create location', $pid);\n $fields->push($createLocation);\n } else if ($this->data()->AllowUserSelection) {\n $parentMap = Config::inst()->get(ObjectCreatorPage::class, 'parent_map');\n $parentType = isset($parentMap[$this->CreateType]) ? $parentMap[$this->CreateType] : $this->CreateType;\n $fields->push($tree = DropdownField::create('CreateLocationID', _t('FrontendCreate.SELECT_LOCATION', 'Location')));\n $tree->setSource($this->data()->RestrictCreationToItems()->map()->toArray());\n }\n\n $customTypes = $this->allowedCreationTypes();\n if (count($customTypes)) {\n $fields->push(DropdownField::create('CustomCreateType', 'Type to create', $customTypes, $this->CreateType));\n }\n\n if ($this->data()->useObjectExistsHandling() && $this->data()->AllowUserWhenObjectExists) {\n $fields->push(new DropdownField(\n 'WhenObjectExists',\n _t('FrontendCreate.WHENOBJECTEXISTS', \"If $this->CreateType exists\"),\n $this->dbObject('WhenObjectExists')->EnumValues(),\n $this->data()->WhenObjectExists\n ));\n }\n\n if ($new = $this->NewObject()) {\n $firstFieldName = $fields->first()->getName();\n\n $title = $new->getTitle();\n if ($this->ShowCmsLink) {\n $fields->insertBefore(new LiteralField('CMSLink', sprintf(_t('FrontendCreate.ITEM_CMS_LINK', '<p><a href=\"admin/show/%s\" target=\"_blank\">Edit %s in the CMS</a></p>'), $new->ID, $title)), $firstFieldName);\n }\n }\n }\n\n // Actions\n $action = null;\n if ($this->editObject && $this->editObject->exists()) {\n $action = FormAction::create('editobject', 'Save Changes');\n } else {\n $createButtonText = ($this->data()->CreateButtonText) ? $this->data()->CreateButtonText : 'Create';\n $action = FormAction::create('createobject', $createButtonText);\n }\n $actions = FieldList::create($action);\n\n // validators\n $validator = ($this->editObject && $this->editObject->hasMethod('getFrontendCreateValidator')) ? $this->editObject->getFrontendCreateValidator() : null;\n\n $form = new Form($this, 'CreateForm', $fields, $actions, $validator);\n\n if (class_exists(ObjectCreatorPage_FrontEndWorkflowController::class)) {\n $s = singleton(ObjectCreatorPage_FrontEndWorkflowController::class);\n $s->updateFrontendCreateForm($form);\n }\n $this->extend('updateFrontendCreateForm', $form);\n if ($this->editObject) {\n $this->editObject->invokeWithExtensions('updateFrontendCreateForm', $form);\n if ($this->editObject->exists()) {\n $form->loadDataFrom($this->editObject);\n }\n }\n return $form;\n }", "protected function setupCreateOperation()\n {\n CRUD::setValidation(SettingRequest::class);\n\n CRUD::field('key')->type('text')->label('ID key');\n CRUD::field('name')->type('text')->label('Nom');\n CRUD::field('type')\n ->type('select_from_array')\n ->label('Type de widget')\n ->options([\n 'ckeditor' => 'ckeditor',\n 'textarea' => 'textarea',\n 'text' => 'text',\n ]);\n }", "public function create()\n {\n $this->resetInputFields();\n $this->openModal();\n }", "public function create()\n {\n $this->resetInputFields();\n $this->openModal();\n }", "public function create()\n {\n $this->resetInputFields();\n $this->openModal();\n }", "public function create()\n {\n $this->resetInputFields();\n $this->openModal();\n }", "protected function setupCreateOperation()\n {\n CRUD::setValidation(UserRequest::class);\n\n $this->crud->setOperationSetting('contentClass', 'col-md-12 bold-labels');\n $this->crud->addFields([\n [ \n 'name' => 'name',\n 'label' => 'Name',\n 'type' => 'text',\n ],\n [ \n 'name' => 'password',\n 'label' => 'Password',\n 'type' => 'password',\n ],\n [ \n 'name' => 'email',\n 'label' => 'Email',\n 'type' => 'email',\n ],\n [ // radio\n 'name' => 'type_id', // the name of the db column\n 'label' => 'Type', // the input label\n 'type' => 'radio',\n 'options' => [\n // the key will be stored in the db, the value will be shown as label; \n 0 => \"Collector\",\n 1 => \"Administrator\"\n ],\n 'inline' => true, // show the radios all on the same line?\n ],\n ]);\n }", "public function add_edit_form(){\n\n $_id = $_GET['id']; \n $tblName = $this->get_tbl_name();\n\n $source = DB::table($tblName)->where('id',$_id)->get();\n\n $source_first = $source[0];\n\n // mhtml::dump($source_first);\n\n\n $struct = $this->struct;\n\n mhtml::startForm(\"edit\",\"backend_edit.php\");\n\n // loop througth fields\n foreach ($this->edit as $key => $field) {\n\n $kind = $struct[$field] ;\n if($kind == 'string') {$kind = 'text' ;} \n $value = $source_first[$field];\n\n mhtml::field($this->virtual_names[$field],$field,$kind,$value);\n\n }\n\n // add secret field for password\n if(isset($this->edit_secret)){\n if($this->edit_secret == true ){\n\n Logger::warn(\"we use one secret only on secret[0] in secret array in model\");\n $virtual_pass = $this->virtual_names[$this->secret[0]];\n mhtml::field($virtual_pass,$this->secret[0],'password');\n\n }\n }\n\n \n\n\n\n\n // mhtml::field('user name ','user_name','text',\"mohammed\");\n // mhtml::field('passwording','password','password');\n // mhtml::field('age','age','number');\n\n mhtml::field_id_model();\n\n mhtml::submitForm();\n\n mhtml::endForm();\n\n }", "public function editForm(): void\n {\n $this->articleId = $_GET['id'];\n $query = $this->articleModel->displayOneArticle($this->articleId);\n $editArticle = $query->fetch();\n\n $this->title = $editArticle['title'];\n $this->content = $editArticle['content'];\n $this->category = $editArticle['category'];\n }", "protected function form()\n {\n $form = new Form(new Resources);\n\n $form->text('name', '名称')->rules('required',['required' => '请输入 配置项的名称']);\n\n $form->radio('type', '类型')->options(Resources::TYPE);\n\n $form->cropper('url','图片');\n\n $form->number('sort_num','排序');\n\n $form->textarea('memo','备注');\n\n $form->tools(function (Form\\Tools $tools) {\n // 去掉`删除`按钮\n $tools->disableDelete();\n\n // 去掉`查看`按钮\n $tools->disableView();\n });\n $form->footer(function ($footer) {\n // 去掉`查看`checkbox\n $footer->disableViewCheck();\n\n // 去掉`继续编辑`checkbox\n $footer->disableEditingCheck();\n\n // 去掉`继续创建`checkbox\n $footer->disableCreatingCheck();\n\n });\n\n return $form;\n }", "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\\CoursEnLigne\");\n $this->crud->setRoute(\"admin/coursenligne\");\n $this->crud->setEntityNameStrings('cours en ligne', 'cours en ligne');\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', ['label' => \"Nom du formateur\",\n \t\t 'type' => 'select',\n 'name' => 'formateur_id',\n \t\t 'entity' => 'formateur',\n \t\t 'attribute' => 'full_name',\n \t\t 'model' => \"App\\Models\\Formateur\"\n \t\t\t ]\n ]);\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([ // SELECT\n 'label' => \"Formateur*\",\n 'type' => 'select2',\n 'name' => 'formateur_id',\n 'entity' => 'formateur',\n 'attribute' => 'full_name',\n 'model' => \"App\\Models\\Formateur\",\n ]);\n $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([ // date_picker\n\t\t 'name' => 'date',\n\t\t 'type' => 'date_picker',\n\t\t 'label' => 'Date',\n\t\t // optional:\n\t\t 'date_picker_options' => [\n\t\t 'todayBtn' => true,\n\t\t 'format' => 'dd-mm-yyyy',\n\t\t 'language' => 'fr'\n\t\t ],\n\t\t]);\n\n\t\t$this->crud->addField([ // Time\n \t\t 'name' => 'heure',\n \t\t'label' => 'Heure',\n \t\t'type' => 'time'\n\t\t]);\n\t\t$this->crud->addField([\n\t\t\t'name' => 'prix',\n\t\t\t'label' => \"Prix*\",\n\t\t\t'type' => 'number'\n\t\t]);\n\t\t$this->crud->addField([\n\t\t\t'name' => 'stock',\n\t\t\t'label' => \"En stock\",\n\t\t\t'type' => 'checkbox'\n\t\t]);\n\n }", "public function create()\n {\n $this->openModal();\n $this->resetInputFields();\n }", "public function create()\n {\n $this->openModal();\n $this->resetInputFields();\n }", "abstract protected function _setNewForm();", "protected function form()\n {\n $form = new Form(new $this->currentModel);\n \n $form->display('id', 'ID');\n $form->select('company_id', '公司名称')->options(Company::getSelectOptions());\n $form->text('project_name', '项目名称');\n $form->image('project_photo', '项目图片')->uniqueName()->move('public/photo/images/custom_thum/');\n $form->url('link_url', '项目链接');\n $form->radio('display', '公开度')->options(['0' => '公开', '-1'=> '保密'])->default('0');\n //$form->display('created_at', 'Created At');\n //$form->display('updated_at', 'Updated At');\n\n return $form;\n }", "public function create()\n\t{\n\t\t//$admin_config = get_class_vars($this->Model)['admin_config'] ? : [];\n\t\t$class = $this->Model;\n\t\t$admin_config = $class::getConfig() ? : [];\n\t\t$template = isset($admin_config['template_edit']) ? $admin_config['template_edit'] : 'crud.edit';\n\n\t\treturn View::make($template, [\n\t\t\t'page' => [\n\t\t\t\t'action_path' => $admin_config['router'],\n\t\t\t\t'action_method' => 'post',\n\t\t\t\t'scripts' => [\n\t\t\t\t\t'markdown/markdown.min.js',\n\t\t\t\t\t'markdown/bootstrap-markdown.min.js',\n\t\t\t\t\t'jquery.hotkeys.min.js',\n\t\t\t\t\t'uncompressed/bootstrap-wysiwyg.js',\n\t\t\t\t],\n\t\t\t],\n\t\t\t'data' => Request::all(),\n\t\t\t'config' => $admin_config,\n\t\t]);\n\t}", "protected function form()\n {\n $this->opt();\n $form = new Form(new ComDep);\n\n $form->text('alias', 'Alias');\n $form->text('name', 'Name');\n $form->select('company_id', 'Company')->options($this->optcom);\n $form->select('id_com_dep_admin', 'Company department admin')->options($this->optcomdep);\n $form->select('service_type_id', 'Service type')->options($this->optsertype);\n $form->textarea('info', 'Info');\n $form->textarea('info_for_vp_admin', 'Info for vp admin');\n $form->text('address', 'Address');\n $form->textarea('info_station', 'Info station');\n $form->text('telephone', 'Telephone');\n $form->text('e_mail', 'E mail');\n $form->text('class', 'Class');$form->saving(function (Form $form) {\n $form->model()->id_admin_add=Admin::user()->id;\n });\n\n return $form;\n }", "public function create()\n {\n $elements = $this->createForm('formAlerte.json');\n\n return view('admin.editCreateForm', [\n 'elements' => $elements,\n ]);\n }", "public function create()\n {\n $common = $this->common;\n return view($common.'.addEdit',compact('common'));\n }", "function manage_form( ) {\n\t\t\n\t\t// Exit if user not logged in\n\t\t// TODO: MAKE THIS WORK\n/*\t\tif( ! current_user_can( 'administrator' ) ) {\n\t\t\tcpd_not_logged_in_message();\n\t\t\treturn;\n\t\t}\n*/\n\n\t\t$org = new Organisation();\n\n\t\t// Check if an Org has been selected - ie: has a number value for $_GET['id']\n\t\t// This covers resposnes both when selecting an org for editing, or for saving an org\n\t\tif( isset( $_REQUEST['id'] ) && is_int( (int) $_REQUEST['id'] ) ) {\n\t\t\t$org->load_org_details( $_REQUEST['id'] );\n\t\t}\n\n\t\t$this->display_form( $org );\n\t}", "public function form()\n {\n // 设置隐藏表单,传递用户id\n $check_status = [\n 'no_void' => '正常',\n 'void' => '作废',\n ];\n $this->hidden('id')->value($this->id);\n $this->hidden('status')->value('void');\n\n $this->radio('status', '是否作废')->options($check_status)->default('void');\n $this->textarea('reason', '作废原因');\n }", "public function form()\r\n {\r\n $this->switch('field_select_create', Support::trans('main.select_create'))\r\n ->default(admin_setting('field_select_create'));\r\n }", "protected function form()\n {\n $form = new Form(new Information);\n \n \n\n $form->text('name', __('项目名称'))->autofocus()->placeholder('例:上汽大众新能源汽车工厂项目')->required();\n $form->text('industry', __('行业类别'))->required();\n $form->currency('investment', __('投资金额'))->icon('fa-usd')->required(); \n $form->text('cont_name', __('资方联系人'))->placeholder('选填内容,可为空');\n $form->text('cont_phone', __('资方联系方式'))->placeholder('选填内容,可为空');\n $form->text('staff_name', __('工作人员姓名'));\n $form->text('staff_phone', __('工作人员电话'));\n $form->hidden('adminuser_id', __('adminuser_id'))->value(Admin::user()->id);\n $form->textarea('content', __('项目情况'))->required()->placeholder('请填写项目介绍(包括项目投资额度、产业类别等)、项目需求(如土地、排放、能耗等)、谈判进度等......');\n\n\n\n $form->tools(function (Form\\Tools $tools) {\n\n // 去掉`列表`按钮\n $tools->disableList();\n\n });\n\n $form->footer(function ($footer) {\n\n // 去掉`重置`按钮\n $footer->disableReset();\n\n // 去掉`查看`checkbox\n $footer->disableViewCheck();\n\n // 去掉`继续编辑`checkbox\n $footer->disableEditingCheck();\n\n // 去掉`继续创建`checkbox\n $footer->disableCreatingCheck();\n\n });\n\n $form->setAction('../admin/myinfo');\n\n return $form;\n }", "protected function form()\n {\n return Admin::form(FactoryModel::class, function (Form $form) {\n\n $form->display('id', 'ID');\n $form->text('name','厂家名称')->rules('required');\n $form->text('boss','老板')->rules('required');\n $form->text('telephone','手机号');\n $form->text('address','地址');\n $form->text('mark','备注');\n\n $form->display('created_at', 'Created At');\n $form->display('updated_at', 'Updated At');\n });\n }", "public static function display_create_form(){\n echo \"<form action='../../Controllers/charity_controller.class.php?action=save' method='post'>\";\n echo \"Name: <input type='text' name='name' /><br />\";\n echo \"Description: <textarea name='description'></textarea><br />\";\n echo \"<input type='submit' value='Save' />\";\n echo \"</form>\";\n }", "public function profile_admin()\n {\n parent::__construct();\n\t\t$this->setAttribute('method', 'post');\n\t\t$this->setAttribute('class', 'profile_form');\n \n\t\t$this->add(array(\n 'name' => 'user_name',\n 'type' => 'text',\n\t\t\t\"required\"=>true,\n 'options' =>array(\n 'label' => \"Full Name\",\n ),\n\t\t\t'attributes' =>array( // Array of attributes\n\t\t\t\t'class' => 'form-control required', \n\t\t\t\t\"placeholder\" => \"Full Name\", \n\t\t\t ),\n ));\n\t\t\n\t\t\n\t\t$this->add(array(\n 'name' => 'user_email',\n 'type' => 'text',\n\t\t\t\"required\"=>true,\n 'options' =>array(\n 'label' => \"Email\",\n ),\n\t\t\t\n\t\t\t'attributes' =>array( // Array of attributes\n\t\t\t\t'class' => 'form-control required email checkemail_exclude', \n\t\t\t\t\"placeholder\" => \"Email Address\", \n\t\t\t ),\n ));\n\t\t\n\t\t$this->add(array(\n 'name' => 'user_address',\n 'type' => 'text',\n\t\t\t\"required\"=>true,\n 'options' =>array(\n 'label' => \"Address\",\n ),\n\t\t\t'attributes' =>array( // Array of attributes\n\t\t\t\t'class' => 'form-control required', \n\t\t\t\t\"placeholder\" => \"Address\", \n\t\t\t ),\n ));\n\t\t\n\t\t$this->add(array(\n 'name' => 'user_phone',\n 'type' => 'text',\n\t\t\t\"required\"=>true,\n 'options' =>array(\n 'label' => \"Phone Number\",\n ),\n\t\t\t'attributes' =>array( // Array of attributes\n\t\t\t\t'class' => 'form-control required', \n\t\t\t\t\"placeholder\" => \"Phone Number\", \n\t\t\t\t'id'=>'user_phone', \n\t\t\t ),\n ));\n\t\t\n\t\t$this->add(array(\n 'name' => 'user_city',\n 'type' => 'text',\n\t\t\t\"required\"=>true,\n 'options' =>array(\n 'label' => \"City\",\n ),\n\t\t\t'attributes' =>array( // Array of attributes\n\t\t\t\t'class' => 'form-control required', \n\t\t\t\t\"placeholder\" => \"City\", \n\t\t\t ),\n ));\n\t\t\n\t\t$this->add(array(\n 'name' => 'user_state',\n 'type' => 'text',\n\t\t\t\"required\"=>true,\n 'options' =>array(\n 'label' => \"State\",\n ),\n\t\t\t'attributes' =>array( // Array of attributes\n\t\t\t\t'class' => 'form-control required', \n\t\t\t\t\"placeholder\" => \"State\", \n\t\t\t ),\n ));\n\t\t$this->add(array(\n 'name' => 'user_country',\n 'type' => 'text',\n\t\t\t\"required\"=>true,\n 'options' =>array(\n 'label' => \"Country\",\n ),\n\t\t\t'attributes' =>array( // Array of attributes\n\t\t\t\t'class' => 'form-control required', \n\t\t\t\t\"placeholder\" => \"Country\", \n\t\t\t ),\n ));\n\t\t\n\t\t$this->add(array(\n\t\t\t'name' => 'user_image',\n\t\t\t'type' => 'file',\t\t\t\n\t\t\t'options' =>array(\n\t\t\t\t'label' => \"Profile Image\",\n\t\t\t),\n\t\t\t\"accept\"=>\"image/*\",\n\t\t\t'attributes' =>array( // Array of attributes\n\t\t\t\t'class' => 'default', \n\t\t\t\t\"id\" => \"user_image\", \n\t\t\t\t\"accept\"=>\"image/*\"\t\t\t\t\n\t\t\t ),\n\t\t));\t\n }", "protected function form()\n {\n $form = new Form(new User);\n\n $form->tab('Personal Information', function ($form) {\n\n $form->text('name')->required();\n $form->text('email')->required();\n $form->password('password')->required()->default(function ($form) {\n return $form->model()->password;\n });;\n\n $form->saving(function (Form $form) {\n if ($form->password && $form->model()->password != $form->password) {\n $form->password = bcrypt($form->password);\n }\n });\n $form->hidden('role_id',1);\n// $form->select('role_id')->options([\n// User::HOST_USER_ROLE_ID => 'host',\n// // User::NORMAL_USER_ROLE_ID => 'normal'\n// ])->required();\n $form->select('type')->options([\n User::PROFESSIONAL_USER_TYPE_ID => 'Professional',\n User::GROUP_USER_TYPE_ID => 'Group',\n User::COMPANY_USER_TYPE_ID => 'Company'\n ])->required();\n $form->select('status')->options([\n User::SUSPEND_USER => 'Suspend User',\n User::APPROVED_USER => 'Approved User',\n User::REJECTED_USER => 'Rejcted User'\n ])->required(); \n $form->image('avatar');\n $form->number('number_of_events' , 'Number Of Events');\n $form->number('number_of_activity' , 'Number Of Activity');\n $form->number('number_of_services' , 'Number Of Services');\n $form->multipleSelect('profession')->options(\\App\\Models\\Professions::all()->pluck('en_name', 'id'))->required();\n $form->multipleSelect('packeges')->options(\\App\\Models\\Packages::all()->pluck('name_en', 'id'));\n })\n ->tab('Socail Media', function ($form) {\n\n $form->hasMany('socailmedia', function (Form\\NestedForm $form) {\n $form->select('type')->options([\n 1 => 'instgram',\n 2 => 'facebook',\n 3 => 'twitter'\n ]);\n $form->text('link');\n\n });\n\n })\n ->tab('Profession Certification', function ($form) {\n\n $form->hasMany('usercertificate', function (Form\\NestedForm $form) {\n $form->text('name');\n $form->date('from');\n $form->date('to');\n $form->file('certificate_file');\n });\n\n\n })\n ->tab('Host Data', function ($form) {\n\n\n $form->text('host.company_name')->required();\n $form->email('host.email')->required();\n $form->text('host.location')->required();\n $form->text('host.website')->required();\n $form->date('host.starting_year')->required();\n $form->file('host.company_certificate');\n $form->mobile('host.landline')->required();\n $form->mobile('host.mobile')->required();\n $form->mobile('host.whatsapp')->required();\n $form->time('host.work_from')->required();\n $form->time('host.work_to')->required();\n $form->time('host.break_from')->required();\n $form->time('host.break_to')->required();\n\n\n })\n\n ;\n $form->display('created_at');\n $form->display('updated_at');\n\n\n return $form;\n }", "protected function form()\n {\n $form = new Form(new Customer());\n /*if (Admin::user()->isRole('Editor')){\n $form->text('name', __('Name'))->readonly();\n $form->datetime('birthday', __('Birthday'))->default(date('Y-m-d H:i:s'))->readonly();\n $form->text('room_no', __('Room no'))->readonly();\n $form->text('phone_number', __('Phone number'))->readonly();\n $form->select('block_no', __('Toà nhà'))->options(Constant::BLOCK)->setWidth(2, 2)->readonly();\n $form->select('telco', __('Nhà mạng'))->options(Constant::TELCO)->setWidth(2, 2)->readonly();\n $form->select('sale_id', __('Nhân viên chăm sóc'))->options(AuthUser::all()->pluck('name','id'))->readonly();\n } else {*/\n $form->text('name', __('Name'));\n //$form->datetime('birthday', __('Birthday'))->default(date('Y-m-d H:i:s'));\n $form->text('room_no', __('Room no'));\n $form->mobile(\"phone_number\", \"Số điện thoại\")->options(['mask' => '9999999999']);\n $form->select('block_no', __('Địa chỉ'))->options(Constant::BLOCK)->setWidth(2, 2)->default(100);\n $form->text('address', __('Địa chỉ'));\n $form->select('telco', __('Nhà mạng'))->options(Constant::TELCO)->setWidth(2, 2);\n if (Admin::user()->isRole('Pt') || Admin::user()->isRole('Fm')) {\n $form->select('pt_id', __('Nhân viên chăm sóc'))->options(AuthUser::all()->pluck('name', 'id'))->default(Admin::user()->id);\n } else {\n $form->select('sale_id', __('Nhân viên chăm sóc'))->options(AuthUser::all()->pluck('name', 'id'))->default(Admin::user()->id);\n }\n //}\n\n $form->text('setup_at', __('Lịch hẹn gặp'));\n $form->text('pt_setup_at', __('Lịch PT hẹn gặp'));\n $form->text('plan', __('Gói hiện tại'));\n $form->select('source', __('Nguồn khách'))->options(Constant::SOURCE)->setWidth(2, 2);\n $form->textarea('note', __('Ghi chú'));\n $form->text('pt_note', __('PT Ghi chú'));\n $form->date('end_date', __('Ngày hết hạn'));\n if (Admin::user()->isRole('Pt') || Admin::user()->isRole('Fm')) {\n $form->select('pt_status', __('Trạng thái PT'))->options(Constant::CUSTOMER_STATUS)->setWidth(2, 2);\n } elseif (Admin::user()->isRole('Pt') || Admin::user()->isRole('Fm')) {\n $form->select('status', __('Trạng thái'))->options(Constant::CUSTOMER_STATUS)->setWidth(2, 2);\n } else {\n $form->select('status', __('Trạng thái'))->options(Constant::CUSTOMER_STATUS)->setWidth(2, 2);\n $form->select('pt_status', __('Trạng thái PT'))->options(Constant::CUSTOMER_STATUS)->setWidth(2, 2);\n }\n\n $form->select('like', __('Quan tâm'))->options(Constant::FAVORITE)->setWidth(2, 2);\n return $form;\n }", "public function create()\n {\n $data['module'] = $this->module();\n return view(\"backend.{$this->module()['module']}.create-edit\", $data);\n }", "public function form()\n {\n $form = new Form($this->model);\n\n $form->display('id', 'ID');\n\n $form->select('user_id', 'User')->rules('required')\n ->options(function () {\n $options = [];\n $users = User::all();\n\n if ($users) {\n foreach ($users as $user) {\n $options[$user->id] = $user->name;\n }\n }\n\n return $options;\n });\n $form->select('platform_id', 'Platform')->rules('required')\n ->options(function () {\n $options = [];\n $platforms = Platform::all();\n\n if ($platforms) {\n foreach ($platforms as $platform) {\n $options[$platform->id] = $platform->name;\n }\n }\n\n return $options;\n });\n $form->text('product_code','Product Code')->rules('required');\n $form->text('receipt','Receipt');\n $form->text('transaction_id','Transaction id');\n $form->text('signature','Signature');\n $form->text('order_id','Order id');\n $form->text('json_data','Json data');\n $form->text('propaty_code','Propaty Code');\n $form->datetime('expires_date', 'Expire Date')->rules('required');\n $form->display('created_at', trans('admin.created_at'));\n $form->display('updated_at', trans('admin.updated_at'));\n\n return $form;\n }", "protected function form()\n {\n return Admin::form(Article::class, function (Form $form) {\n\n $form->display('id', 'ID');\n\n $form->text('slug','slugen');\n $form->text('title','标题');\n $form->editor('body','介绍');\n $form->select('category_id','分类')->options(ArticleCategory::allSelectOptions());\n $form->number('sort','排序');\n $form->image('thumbnail','缩略图')->uniqueName()->resize(400,600);\n $form->multipleImage('images','图集')->uniqueName()->removable()->resize(400,600);\n $form->text('view','模板名称');\n $states = [\n 'on' => ['value' => '1', 'text' => '是', 'color' => 'primary'],\n 'off' => ['value' => '0', 'text' => '否', 'color' => 'default'],\n ];\n $form->switch('status','状态')->states($states)->default(0);\n $form->number('click','点击次数');\n\n $form->hidden('created_by');\n $form->hidden('updated_by');\n $form->saving(function (Form $form){\n if(empty($form->created_by)) {\n $form->created_by = Admin::user()->id;\n }\n $form->updated_by = Admin::user()->id;\n });\n\n $form->display('created_at', '创建时间');\n $form->display('updated_at', '更新时间');\n });\n }", "protected function createComponentEditTaskForm() {\r\n\r\n $form = new UI\\Form;\r\n\r\n $form->getElementPrototype()->novalidate = 'novalidate';\r\n\r\n $form->addText('name', 'Task name:')\r\n ->setRequired('Please provide a task name.');\r\n\r\n $form->addTextArea('description', 'Description:');\r\n\r\n $form->addText('deadline', 'Deadline')->setOption('description', 'Use format: YYYY-MM-DD')\r\n ->addCondition(UI\\Form::FILLED)\r\n ->addRule(UI\\Form::PATTERN, 'Může být v rozmezí 2011-01-01 až 2019-12-31', '^(20)\\d\\d[- /.](0[1-9]|1[012])[- /.](0[1-9]|[12][0-9]|3[01])$');\r\n\r\n $form->addRadioList('priority', 'Priority', array(\r\n '1' => '1',\r\n '2' => '2',\r\n '3' => '3',\r\n '0' => 'bez priority'\r\n ));\r\n\r\n $result = dibi::query('SELECT idcategory, name FROM `categories` WHERE iduser = %i', $this->getUser()->getId())->fetchPairs('idcategory', 'name');\r\n\r\n $form->addRadioList('idcategory', 'Category', $result)\r\n ->setRequired('Please select category.');\r\n\r\n $status = array(\r\n 'nedokončeno' => 'nedokončeno',\r\n 'odloženo' => 'odloženo',\r\n 'dokončeno' => 'dokončeno',\r\n );\r\n $form->addRadioList('status', 'Status', $status)\r\n ->setRequired('Please select status.');\r\n\r\n $form->addHidden('idtask');\r\n\r\n $form->addSubmit('editTask', 'Edit Task');\r\n\r\n $form->onSuccess[] = callback($this, 'EditTaskFormSubmitted');\r\n\r\n $task = dibi::query('SELECT * FROM `tasks` WHERE idtask = %i', $this->getParam('id'))->fetch();\r\n\r\n if ($task->deadline == \"0000-00-00\")\r\n $task->deadline = \"\";\r\n\r\n $form->setDefaults(array(\r\n 'name' => $task->name,\r\n 'description' => $task->description,\r\n 'deadline' => $task->deadline,\r\n 'status' => $task->status,\r\n 'priority' => $task->priority,\r\n 'idcategory' => $task->idcategory,\r\n 'idtask' => $task->idtask,\r\n ));\r\n\r\n return $form;\r\n }", "public function createAction()\n {\n $this->createEditParameters = $this->createEditParameters + $this->_createExtraParameters;\n\n parent::createAction();\n }", "public function create()\n {\n // I skip using this create function because I use a modal form for inserting data using modal in index view via index function.\n }", "protected function _setForm()\n\t{\t\n\t\t$controller = $this->getActionController();\n\t\t\n\t\t$this->_setViewFormData($controller)\n\t\t\t ->_setViewErrors($controller)\n\t\t\t ->_setViewWarnings($controller);\n\t\t\t\n\t}", "public function form(): void {\n include \"admin\" . DS . \"form.php\";\n }", "protected function initializeForm()\n {\n $this->form = new Form();\n $this->form->add(Element::create(\"FieldSet\",\"Report Format\")->add\n (\n Element::create(\"SelectionList\", \"File Format\", \"report_format\")\n ->addOption(\"Hypertext Markup Language (HTML)\",\"html\")\n ->addOption(\"Portable Document Format (PDF)\",\"pdf\")\n ->addOption(\"Microsoft Excel (XLS)\",\"xls\")\n ->addOption(\"Microsoft Word (DOC)\",\"doc\")\n ->setRequired(true)\n ->setValue(\"pdf\"),\n Element::create(\"SelectionList\", \"Page Orientation\", \"page_orientation\")\n ->addOption(\"Landscape\", \"L\")\n ->addOption(\"Portrait\", \"P\")\n ->setValue(\"L\"),\n Element::create(\"SelectionList\", \"Paper Size\", \"paper_size\")\n ->addOption(\"A4\", \"A4\")\n ->addOption(\"A3\", \"A3\")\n ->setValue(\"A4\")\n )->setId(\"report_formats\")->addAttribute(\"style\",\"width:50%\")\n );\n $this->form->setSubmitValue(\"Generate\");\n $this->form->addAttribute(\"action\",Application::getLink($this->path.\"/generate\"));\n $this->form->addAttribute(\"target\",\"blank\");\n }", "public function form()\n {\n $this->switch('footer_remove', Support::trans('main.footer_remove'))\n ->default(admin_setting('footer_remove'));\n $defaultColors = [\n 'default' => '墨蓝',\n 'blue' => '蓝',\n 'blue-light' => '亮蓝',\n 'green' => '墨绿',\n ];\n foreach (explode(\",\", ServiceProvider::setting('additional_theme_colors')) as $value) {\n if (!empty($value)) {\n [$k, $v] = explode(\":\", $value);\n $defaultColors[$k] = $v;\n }\n }\n\n $this->radio('theme_color', Support::trans('main.theme_color'))\n ->options($defaultColors)\n ->default(admin_setting('theme_color'));\n $this->radio('sidebar_style', Support::trans('main.sidebar_style'))\n ->options([\n 'default' => '默认',\n 'sidebar-separate' => '菜单分离',\n 'horizontal_menu' => '水平菜单'\n ])\n ->default(admin_setting('sidebar_style'));\n $this->switch('grid_row_actions_right', Support::trans('main.grid_row_actions_right'))\n ->help('启用后表格行操作按钮将永远贴着最右侧。')\n ->default(admin_setting('grid_row_actions_right'));\n }", "public function setForm() {\n\t\t$translator = Zend_Registry::get('Zend_Translate');\n\t\t$this->setMethod('post');\n\t\t \n\t\t$this->addEnabled();\n\t\t$this->addRentDueDay();\n\t\t$this->addProrationType();\n\t\t$this->addProrationApplyMonth();\n\t\t$this->addSecondMonthDue();\n\t\t$this->addSubmitButton();\n\n\t\t$this->addDisplayGroup( $this->displayGroupArray, 'updateRentProrationSetting',array('legend' => 'rentProrationSettings'));\n\t\t$this->getDisplayGroup('updateRentProrationSetting')->setDecorators(array(\n 'FormElements',\n 'Fieldset', \n\t\t));\n\t}", "public function addEditAction()\n {\n $form = $this->_getForm();\n\n $id = $this->_getPrimaryId();\n\n if ($this->getRequest()->isPost()) {\n $this->_handlePostAction();\n\n if ($form->isValid($this->getRequest()->getPost())) {\n $this->_processValidForm();\n }\n } else {\n if ($id) {\n $row = $this->_getRow($id);\n\n $form->setDefaults($row->toArray());\n }\n }\n\n if (!$id) {\n $url = $this->_getNewSubmitLocation();\n } else {\n $url = $this->_getEditSubmitLocation();\n }\n\n $form->setAction($this->view->url($url, null, true));\n\n $this->view->form = $form;\n }", "public function editForm() {\n return tpl::load(__DIR__ . DS . 'form.php', array('field' => $this));\n }", "protected function form()\n {\n $form = new Form(new Goods);\n $form->display('id', 'ID');\n $form->text('name', '名称');\n $arr = (new AdminModel('goods_type'))->getAll('',['type','id']);\n $array = [];\n foreach ($arr as $key => $value) {\n\n $array[$value['id']] = $value['type'];\n }\n $form->select('type', '分类')->options($array);\n $form->text('stock', '库存');\n $form->text('price', '积分价格');\n $form->textarea('desc', '详情');\n $form->switch('status', '是否上架')->value(0);\n $form->image('cover','封面图')->uniqueName()->move('goods_img')->options(['overwriteInitial' => true]);\n $form->multipleImage('image','内容图片')->help('请上传多张内容图')->removable()->uniqueName()->move('goods_img')->options(['overwriteInitial' => true]);\n $form->footer(function ($footer) {\n // 去掉`查看`checkbox\n $footer->disableViewCheck();\n // 去掉`继续编辑`checkbox\n $footer->disableEditingCheck();\n // 去掉`继续创建`checkbox\n $footer->disableCreatingCheck();\n\n });\n return $form;\n }", "public function setupForm()\n {\n\n// if ($this->config['db_name'] != NO_DATABASE)\n // $this->redirect(\"login.php\");\n // login here?\n \n/* if ( !$this->ownerLoggedIn() )\n {\n $this->restricted();\n return;\n }\n*/\n require_once('views/SetupView.class.php'); \n \n $site = new SiteContainer($this->db);\n \n $sv = new SetupView();\n\n $site->printHeader();\n $site->printNav(\"owner\");\n $sv->printHtml();\n $site->printFooter(); \n }", "function storyForm($op) {\n // Generate new form object based on operation.\n if ($op == 'add') {\n $this->form = new HTML_QuickForm('add_story', 'POST', '/story/add');\n $btnLabel = 'Add';\n }\n elseif ($op == 'edit') {\n $this->form = new HTML_QuickForm('edit_story', 'POST', $this->f3->get('PATH'));\n $btnLabel = 'Save';\n }\n elseif ($op == 'delete') {\n $this->form = new HTML_QuickForm('deleteStory', 'POST', $this->f3->get('PATH'));\n $btnLabel = 'Delete';\n }\n\n // These fields only apply to add and edit operations.\n if ($op == 'add' || $op == 'edit') {\n // Add form elements\n $this->form->addElement('text', 'title', 'Title', ['class' => 'form-control']);\n $this->form->addElement('text', 'authors', 'Author(s)', ['class' => 'form-control']);\n $this->form->addElement('text', 'shortTitle', 'URL Friendly Title', ['class' => 'form-control']);\n\n // Set max size for file upload\n $this->form->setMaxFileSize($this->f3->get('maxFileSize'));\n $this->form->addElement('file', 'titlePage', 'Title Page', ['class' => 'form-control']);\n $this->form->addElement('radio', 'publish', 'Publish', 'Now', true, ['class' => 'form-check-input', 'id' => 'publish1']);\n $this->form->addElement('radio', 'publish', null, 'Later', false, ['class' => 'form-check-input', 'id' => 'publish2']);\n $this->form->addElement('text', 'date', 'Publish Date', ['class' => 'form-control', 'id' => 'datepicker']);\n }\n\n // Display buttons for all operations.\n $this->form->addElement('submit', 'btnSubmit', $btnLabel, ['class' => 'btn btn-primary']);\n $this->form->addElement('button','btnCancel','Cancel',['onClick' => \"window.location.href='/stories'\", 'class' => 'btn btn-outline-primary']);\n\n // Rules only apply for add and edit operations.\n if ($op == 'add' || $op == 'edit') {\n // Add validation.\n $this->form->addRule('title', 'Title is required', 'required');\n $this->form->addRule('shortTitle', 'Require field', 'required');\n\n // Only require a file upload on the add form.\n if ($op == 'add') {\n $this->form->addRule('titlePage', 'File is required', 'uploadedfile');\n }\n\n // Add custom validation rules found in \\Validation.\n $this->form->registerRule('uniqueShortTitle', 'function', 'validateShortTitle', $this->validation);\n $this->form->addRule('shortTitle', 'Short Title already exists', 'uniqueShortTitle', $this->identifier);\n // Picture dimensions must be specific size before upload\n $this->form->registerRule('pictureDimensions', 'function', 'validatePictureDimensions', $this->validation);\n $ruleMsg = 'Picture Dimensions are too small! Min Width: ' . $this->f3->get('imgLarge') . ' Min Height: ' . $this->f3->get('imgMinHeight');\n $this->form->addRule('titlePage', $ruleMsg, 'pictureDimensions');\n\n // Picture Mime Type must be of type jpg.\n $this->form->registerRule('pictureMimeType', 'function', 'validateMimeType', $this->validation);\n $this->form->addRule('titlePage', 'Picture file type not supported', 'pictureMimeType');\n\n }\n }", "public function edit() {\n $id = $this->parent->urlPathParts[2];\n // pass name and id to view\n $data = $this->parent->getModel(\"fruits\")->select(\"select * from fruit_table where id = :id\", array(\":id\"=>$id));\n $this->getView(\"header\", array(\"pagename\"=>\"about\"));\n $this->getView(\"editForm\", $data);\n $this->getView(\"footer\");\n }", "protected function _prepareForm()\n {\n $model = $this->getModel();\n \n\n /** @var \\Magento\\Framework\\Data\\Form $form */\n $form = $this->_formFactory->create(\n ['data' => ['id' => 'edit_form', 'action' => $this->getData('action'), 'method' => 'post']]\n );\n\n $fieldset = $form->addFieldset(\n 'base_fieldset',\n ['legend' => __('Template Information'), 'class' => 'fieldset-wide']\n );\n $fieldset->addType('background', 'Sample\\Gridpart2\\Block\\Adminhtml\\Template\\Helper\\Background');\n \n \n if ($model->getGridpart2templateId()) {\n $fieldset->addField('id', 'hidden', ['name' => 'id', 'value' => $model->getGridpart2templateId()]);\n }\n\n $fieldset->addField(\n 'name',\n 'text',\n [\n 'name' => 'name',\n 'label' => __('Template Name'),\n 'title' => __('Template Name'),\n 'required' => true,\n 'value' => $model->getName()\n ]\n );\n $fieldset->addField(\n 'pid',\n 'hidden',\n [\n 'name' => 'pid',\n 'value' => $model->getId()\n ]\n );\n\n $fieldset->addField(\n 'status',\n 'select',\n [\n 'label' => __('Status'),\n 'required' => true,\n 'name' => 'status',\n 'values' => $this->_statusOption->getStatusesOptionArray()\n ]\n );\n\n $form->setAction($this->getUrl('*/*/save'));\n $form->setUseContainer(true);\n $this->setForm($form);\n\n return parent::_prepareForm();\n }", "public function editSettings() {\n $name = $this->schema->name();\n $form = new Fragment($name);\n\n if ($this->schema->newgroup()) { // définit dans la vue fields.php\n $form->hidden('type');\n // pour un nouveau groupe, il faut que le groupe soit créé avec le bon type\n // pour un groupe existant, inutile : on a déjà le bon type dans le schéma\n }\n\n $form->input('name')\n ->attribute('class', 'name')\n ->label(__('Nom du groupe', 'docalist-biblio'))\n ->description(__(\"Le nom du groupe doit être unique (ni un nom de champ, ni le nom d'un autre groupe).\", 'docalist-biblio'));\n\n $form->input('label')\n ->attribute('id', $name . '-label')\n ->attribute('class', 'label regular-text')\n ->label(__('Titre du groupe', 'docalist-biblio'))\n ->description(__(\"C'est le titre qui sera affiché dans la barre de titre du groupe et dans les options de l'écran de saisie. Valeur par défaut : type de la notice\", 'docalist-biblio'));\n\n $form->input('capability')\n ->attribute('id', $name . '-capability')\n ->attribute('class', 'capability regular-text')\n ->label(__('Droit requis', 'docalist-biblio'))\n ->description(__(\"Droit requis pour afficher ce groupe de champs. Ce groupe (et tous les champs qu'il contient) sera masqué si l'utilisateur ne dispose pas du droit indiqué. Si vous laissez vide, aucun test ne sera effectué.\", 'docalist-biblio'));\n\n $form->textarea('description')\n ->attribute('id', $name . '-description')\n ->attribute('class', 'description large-text')\n ->attribute('rows', 2)\n ->label(__(\"Texte d'introduction\", 'docalist-biblio'))\n ->description(__(\"Ce texte sera affiché entre la barre de titre et le premier champ du groupe. Vous pouvez utiliser cette zone pour donner des consignes de saisie ou toute autre information utile aux utilisateurs.\", 'docalist-biblio'));\n\n $form->select('state')\n ->attribute('id', $name . '-state')\n ->attribute('class', 'state')\n ->label(__(\"Etat initial du groupe\", 'docalist-biblio'))\n ->description(__(\"Dans l'écran de saisie, chaque utilisateur peut choisir comment afficher chacun des groupes : il peut replier ou déplier un groupe ou utiliser les options de l'écran de saisie pour masquer ou afficher certains groupes. Ce paramètre indique comment le groupe sera affiché initiallement (pour un nouvel utilisateur).\", 'docalist-biblio'))\n ->options([\n '' => __('Ouvert', 'docalist-biblio'),\n 'collapsed' => __('Replié', 'docalist-biblio'),\n 'hidden' => __('Masqué', 'docalist-biblio'),\n ])\n ->firstOption(false);\n\n $form->button(__('Supprimer ce groupe', 'docalist-biblio'))\n ->attribute('class', 'delete-group button right');\n\n return $form;\n }", "public function run()\n {\n factory(\\App\\Domains\\Form\\Form::class)\n ->create([\n 'slug' => 'contacts',\n 'title' => 'Contatos',\n 'description' => 'Formulário de contatos',\n 'email' => 'contato@republica.online',\n 'type' => 'contact'\n ]);\n\n factory(\\App\\Domains\\Form\\Form::class)\n ->create([\n 'slug' => 'newsletters',\n 'title' => 'Newsletters',\n 'description' => 'Formulário para receber assinaturas de newsletters.',\n 'email' => 'contato@republica.online',\n 'type' => 'newsletter'\n ]);\n\n factory(\\App\\Domains\\Form\\Form::class)->create([\n 'slug' => 'resumes',\n 'title' => 'Trabalhe Conosco',\n 'description' => 'Formulário para receber currículos.',\n 'email' => 'contato@republica.online',\n 'type' => 'resume'\n ]);\n }", "protected function formCreate() {\n\t\t$this->pxyLink = new \\QCubed\\Control\\Proxy($this);\n\t\t$this->pxyLink->AddAction(new \\QCubed\\Event\\MouseOver(), new \\QCubed\\Action\\Ajax('mouseOver'));\n\n\t\t// Define the DataGrid\n\t\t$this->tblProjects = new \\QCubed\\Project\\Control\\Table($this);\n\n\t\t// This css class is used to style alternate rows and the header, all in css\n\t\t$this->tblProjects->CssClass = 'simple_table';\n\n\t\t// Define Columns\n\n\t\t// Create a link column that shows the name of the project, and when clicked, calls back to this page with an id\n\t\t// of the item clicked on\n\t\t$this->tblProjects->CreateLinkColumn('Project', '->Name', \\QCubed\\Project\\Application::instance()->context()->scriptName(), ['intId'=>'->Id']);\n\n\t\t// Create a link column using a proxy\n\t\t$col = $this->tblProjects->CreateLinkColumn('Status', '->ProjectStatusType', $this->pxyLink, '->Id');\n\n\t\t$this->tblProjects->SetDataBinder('tblProjects_Bind');\n\n\t\t$this->pnlClick = new \\QCubed\\Control\\Panel($this);\n\n\t\tif (($intId = \\QCubed\\Project\\Application::instance()->context()->queryStringItem('intId')) && ($objProject = Project::Load($intId))) {\n\t\t\t$this->pnlClick->Text = 'You clicked on ' . $objProject->Name;\n\t\t}\n\n\t}", "protected function createFormFields() {\n\t}", "public function ArtistForm() {\n $URLParams = Director::urlParams();\n if ($URLParams['ID']){\n $formAction = new FieldSet (\n new FormAction('doSubmit', _t('Artist','Edit Artist'))\n );\n } else {\n $formAction = new FieldSet (\n new FormAction('doSubmit', _t('Artist','Create New Artist'))\n );\n }\n $form = new Form (\n $this,\n \"ArtistForm\",\n new FieldSet (\n $ImageLink = new TextField('ImageLink', _t('Artist.ImageLink','Image Link')),\n $NameField = new TextField('Name', _t('Artist.Name','Name')),\n $YoutubeSingle1Field = new TextField('YoutubeSingle1', _t('Artist.YoutubeSingle1','YoutubeSingle1')),\n $YoutubeSingle2Field = new TextField('YoutubeSingle2', _t('Artist.YoutubeSingle2','YoutubeSingle2')),\n $YoutubeSingle3Field = new TextField('YoutubeSingle3', _t('Artist.YoutubeSingle3','YoutubeSingle3')),\n $OfficialWebpageField = new TextField('OfficialWebpage', _t('Artist.OfficialWebpage','OfficialWebpage')),\n $SoundcloudField = new TextField('Soundcloud', _t('Artist.Soundcloud','Soundcloud')),\n $FacebookField = new TextField('Facebook', _t('Artist.Facebook','Facebook')),\n $TwitterField = new TextField('Twitter', _t('Artist.Twitter','Twitter')),\n $MyspaceField = new TextField('Myspace', _t('Artist.Myspace','Myspace')),\n $OfficialYoutubeField = new TextField('OfficialYoutube', _t('Artist.OfficialYoutube','OfficialYoutube')),\n $GenreListField = new TextField('GenreList', _t('Artist.GenreList','GenreList')),\n $IDField = new HiddenField('ID','', '')\n ),\n $formAction,\n // new RequiredFields('Name','Date','Address','City')\n new RequiredFields('Name', 'Date', 'Venue')\n );\n\n // Grab previous data if editing an existing DataObject\n // URLParams can be visited at artist/edit/#\n if ($URLParams['ID']){\n $thisID = Convert::raw2sql($URLParams['ID']);\n $artist = DataObject::get_by_id('Artist', $thisID);\n\n $FlyerLinkField->value = $artist->ImageLink;\n $NameField->value = $artist->Name;\n $YoutubeSingle1Field->value = $artist->YoutubeSingle1;\n $YoutubeSingle2Field->value = $artist->YoutubeSingle2;\n $YoutubeSingle3Field->value = $artist->YoutubeSingle3;\n $OfficialWebpageField->value = $artist->OfficialWebpage;\n $SoundcloudField->value = $artist->Soundcloud;\n $FacebookField->value = $artist->Facebook;\n $TwitterField->value = $artist->Twitter;\n $MyspaceField->value = $artist->Myspace;\n $OfficialYoutubeField->value = $artist->OfficialYoutube;\n $GenreListField->value = $artist->GenreList;\n $IDField->value = $thisID;\n }\n return $form;\n }", "public function populateForm() {}", "public function create()\n {\n $obj = new Obj();\n $this->authorize('create', $obj);\n\n return view('appl.'.$this->app.'.'.$this->module.'.createedit')\n ->with('stub','Create')\n ->with('obj',$obj)\n ->with('editor',true)\n ->with('datetimepicker',true)\n ->with('app',$this);\n }", "protected function form()\n { \n\t\t$id = $this->id;\n\t\t$xapp = $this->xapp;\n\t\t$tmpModel = config('xapp.table.'.$xapp->table.'.model');\n\t\t$model = new $tmpModel();\n\n\t\tif( $id ){\n\t\t\t$rs = $model->findOrFail($id);\n\t\t}else{\n\t\t\t$rs = false;\n\t\t}\n\t\t$form = new Form($model);\t\t\n\n\t\t//附加表添加,附加表须有form()\n\t\tforeach($xapp['sets']['base'] as $k=>$x){\n\t\t\t$tempclass = config(\"xapp.xappset.{$k}.ctrl.{$this->ctrl_sign}\") ?? '';\n\t\t\tif( $x && $tempclass && class_exists($tempclass) && method_exists($tempclass,'before_form') ){\n\t\t\t\t(new $tempclass())->before_form($form,$xapp,$rs);\n\t\t\t}\n\t\t}\n\n\n\t\t$tempclass = $xapp->ctrl[$this->ctrl_sign] ?? '';\n\t\tif( $tempclass && class_exists($tempclass) && method_exists($tempclass,'form')){\n\t\t\t(new $tempclass())->form($form,$xapp,$rs);\n\t\t}else{\n\t\t\t$tempclass = config('xapp.table.'.$xapp->table.'.ctrl.'.$this->ctrl_sign) ?? '';\n\t\t\tif( $tempclass && class_exists($tempclass) && method_exists($tempclass,'form')){\n\t\t\t\t(new $tempclass())->form($form,$xapp,$rs);\n\t\t\t}\n\t\t}\n\n\t\t//附加表添加,附加表须有form()\n\t\tforeach($xapp['sets']['base'] as $k=>$x){\n\t\t\t$tempclass = config(\"xapp.xappset.{$k}.ctrl.{$this->ctrl_sign}\") ?? '';\n\t\t\tif( $x && $tempclass && class_exists($tempclass) && method_exists($tempclass,'form') ){\n\t\t\t\t(new $tempclass())->form($form,$xapp,$rs);\n\t\t\t}\n\t\t}\n\n\t\t$form->hidden('xapp_id')->default($xapp['id']);\n\t\t\n return $form;\n }", "function create()\n {\n \t$this->load->view('Admin/VFormUser');\n }", "public function init()\n {\n $this->form = new Account_Form_Editprofile();\n }", "protected function setupCreateOperation()\n {\n CRUD::setValidation(StudentRequest::class);\n CRUD::addField([\n 'name' => 'candidate_name',\n 'wrapper' => ['class' => 'form-group col-md-6'],\n ]);\n CRUD::addField([\n 'name' => 'father_name',\n 'wrapper' => ['class' => 'form-group col-md-6'],\n ]);\n CRUD::addField([\n 'name' => 'phone',\n 'wrapper' => ['class' => 'form-group col-md-6'],\n ]);\n CRUD::addField([\n 'name' => 'address',\n 'wrapper' => ['class' => 'form-group col-md-6'],\n ]);\n CRUD::addField([\n 'name' => 'cnic',\n 'wrapper' => ['class' => 'form-group col-md-6'],\n ]);\n CRUD::addField([\n 'label' => 'School Roll Number',\n 'name' => 'school_rollnumber',\n 'wrapper' => ['class' => 'form-group col-md-6'],\n ]);\n CRUD::addField([\n 'name' => 'religion',\n 'wrapper' => ['class' => 'form-group col-md-6'],\n ]);\n $this->crud->addField([ // select_from_array\n 'name' => 'gender',\n 'wrapper' => ['class' => 'form-group col-md-6'],\n 'label' => \"Gender\",\n 'type' => 'select_from_array',\n 'options' => ['male' => 'Male', 'female' => 'Female'],\n 'allows_null' => false,\n 'default' => 'male',\n // 'allows_multiple' => true, // OPTIONAL; needs you to cast this to array in your model;\n ]);\n $this->crud->addField(\n [ // date_picker\n 'name' => 'date_of_birth',\n 'type' => 'date_picker',\n 'label' => 'Date',\n 'wrapper' => ['class' => 'form-group col-md-6'],\n // optional:\n 'date_picker_options' => [\n 'todayBtn' => 'linked',\n 'format' => 'dd-mm-yyyy',\n 'language' => 'en'\n ],\n ],\n );\n if (auth()->user()->can('manage_all_student')) {\n $this->crud->addField([\n 'label' => 'School',\n 'wrapper' => ['class' => 'form-group col-md-6'],\n 'type' => 'relationship',\n 'name' => 'school_id', // the db column for the foreign key\n 'entity' => 'school', // the method that defines the relationship in your Model\n 'attribute' => 'name', // foreign key attribute that is shown to user\n 'model' => 'App\\Models\\School',\n\n ]);\n } else {\n $this->crud->addField([\n 'label' => 'School',\n 'wrapper' => ['class' => 'form-group col-md-6'],\n 'type' => 'hidden',\n 'name' => 'school_id', // the db column for the foreign key\n 'value' => auth()->user()->school->id,\n\n ]);\n }\n\n $this->crud->addField([\n 'label' => \"Student Image\",\n 'name' => \"image\",\n 'type' => 'image',\n 'crop' => true, // set to true to allow cropping, false to disable\n 'aspect_ratio' => 0, // ommit or set to 0 to allow any aspect ratio\n // 'disk' => 's3_bucket', // in case you need to show images from a different disk\n // 'prefix' => 'uploads/images/profile_pictures/' // in case your db value is only the file name (no path), you can use this to prepend your path to the image src (in HTML), before it's shown to the user;\n ]);\n $this->crud->addFields(static::getFieldsArrayForLoginTab());\n\n\n /**\n * Fields can be defined using the fluent syntax or array syntax:\n * - CRUD::field('price')->type('number');\n * - CRUD::addField(['name' => 'price', 'type' => 'number']));\n */\n }", "public function manageFormAction()\n\t{\n\t\t//vérification du statut d'admin\n\t\t$customersManager = new CustomersManager();\n\t\t$customer = $customersManager -> getLoginInfo();\n\n\t\t// redirection des non-admins\n\t\tif (empty($customer) OR $customer['email'] != ADMIN_EMAIL)\n\t\t{\n\t\t\theader('Location: account');\n\t\t\texit();\n\t\t}\n\n\t\t//récupération des éventuelles données entrées erronées\n\t\tif (isset($_SESSION['forms']['adminAddProduct']['fieldsContent']))\n\t\t{\n\t\t\t$this -> viewData['enteredData'] = $_SESSION['forms']['adminAddProduct']['fieldsContent'];\n\t\t}\n\n\t\t//récupération des infos produits\n\t\t$productsManager = new ProductsManager();\n\t\t$this -> viewData['products'] = $productsManager -> getAll();\n\t\t//récupération des infos de catégories\n\t\t$categoriesManager = new CategoriesManager();\n\t\t$this -> viewData['categories'] = $categoriesManager -> getAll();\n\t\t$this -> viewData['CSRFToken'] = $customer['CSRFToken'];\n\t\t$this -> generateView('products/manage-form.phtml');\n\t}", "public function buildForm()\n {\n $this\n ->add(\n 'new_organization_group',\n 'collection',\n [\n 'type' => 'form',\n 'options' => [\n 'class' => 'App\\SuperAdmin\\Forms\\OrganizationGroupInformation',\n 'label' => false,\n ]\n ]\n )\n ->add(\n 'group_admin_information',\n 'collection',\n [\n 'type' => 'form',\n 'options' => [\n 'class' => 'App\\SuperAdmin\\Forms\\GroupAdmin',\n 'label' => false,\n ]\n ]\n )\n ->addSaveButton();\n }", "public function create()\n {\n return view('admin.forms');\n }", "public function createEditForm()\n {\n $form = new Zend_Form();\n\n $form->setAction($this->webroot.'/folder/edit')\n ->setMethod('post');\n\n $name = new Zend_Form_Element_Text('name');\n $name->setAttribs(array(\n 'placeholder' => $this->t('Name of the folder'),\n 'autofocus' => 'autofocus',\n 'required' => 'required',\n ))\n ->setRequired(true)\n ->addValidator('NotEmpty', true);\n\n $description = new Zend_Form_Element_Textarea('description');\n $description->setAttribs(array('placeholder' => $this->t('Optional')));\n $teaser = new Zend_Form_Element_Text('teaser');\n $teaser->setAttribs(array('placeholder' => $this->t('Optional')));\n $teaser->setAttrib('MAXLENGTH', '250');\n $submit = new Zend_Form_Element_Submit('submit');\n $submit->setLabel($this->t('Save'));\n\n $form->addElements(array($name, $description, $submit, $teaser));\n\n return $form;\n }", "public function create()\n {\n return view('users.mainOptions.create-edit');\n }", "public function create()\n\t{\n\t\t$this->load->view('admin/header');\n\t\t$this->load->view('admin/create');\n\t\t\n\t}", "protected function form()\n {\n $form = new Form(new Cases);\n\n $form->select('cate_id', '分类')->options('/admin/api/getcasecate');\n $form->select('algw_id', '顾问')->options('/admin/api/getgw');\n $form->text('title', '标题');\n $form->text('keywords', 'SEO关键字');\n $form->text('description', 'SEO描述');\n $form->text('desc', '副标题');\n $form->text('author', '来源');\n $form->radio('is_tj', '推荐')->options([0=>'否',1=>'是']);\n $form->image('thumb', '缩略图')->uniqueName();\n $form->editor('data', '详情');\n\n\n return $form;\n }", "public function form()\n {\n\n $this->hidden('key', '字段名')->rules('required');\n $this->editor('val', '平台规则')->rules('required');\n }", "public function init(){\n $this->setAttrib('id', 'create-new-user-form');\n\n $clients = Repo_Client::getInstance()->getSelectArray();\n $roles = Repo_Role::getInstance()->getSelectArray();\n unset($roles['']);\n\n // Email\n $this->addElement('text','email',array(\n 'decorators' => $this->_standardElementDecorator,\n 'class' => 'form-control',\n 'label' => 'Email',\n 'required' => true,\n 'validators' => array('EmailAddress')\n ));\n\n // Password\n $this->addElement('text','password',array(\n 'decorators' => $this->_standardElementDecorator,\n 'class' => 'form-control',\n 'label' => 'Password',\n 'required' => true,\n 'validators' => array(array('StringLength', false, array(8, 50)))\n ));\n\n // UDID\n $this->addElement('text','UDID',array(\n 'decorators' => $this->_standardElementDecorator,\n 'class' => 'form-control',\n 'label' => 'UDID',\n 'required' => false\n ));\n\n // Surname\n $this->addElement('text','surname',array(\n 'decorators' => $this->_standardElementDecorator,\n 'class' => 'form-control',\n 'label' => 'Surname',\n 'required' => true\n ));\n\n // First name\n $this->addElement('text','firstname',array(\n 'decorators' => $this->_standardElementDecorator,\n 'class' => 'form-control',\n 'label' => 'First Name',\n 'required' => true\n ));\n\n // User type\n /*$this->addElement('text','user_type',array(\n 'decorators' => $this->_standardElementDecorator,\n 'class' => 'form-control',\n 'label' => 'User Type',\n 'required' => true\n ));*/\n\n // Role\n $this->addElement('multiCheckbox','role', array(\n 'decorators' => $this->_multiCheckboxDecorator,\n 'label' => 'Role',\n 'required' => true,\n 'registerInArrayValidator' => false\n ));\n\n $this->getElement('role')->addMultiOptions(\n $roles\n );\n\n // Client\n $this->addElement('select','client', array(\n 'decorators' => $this->_standardElementDecorator,\n 'class' => 'form-control',\n 'label' => 'Client',\n 'required' => true\n ));\n\n $this->getElement('client')->addMultiOptions(\n $clients\n );\n\n // ID\n $this->addElement('hidden','id',array(\n 'decorators' => $this->_buttonElementDecorator,\n 'required' => false\n ));\n\n // Set user values if a user is passed in.\n if (isset($this->extraParams['user']) && $user = $this->extraParams['user']) {\n $this->setUser($user);\n }\n }", "protected function form()\n {\n $form = new Form(new Goodss);\n $form->switch('is_enable','状态')->options([\n 'on' => ['value' => 1, 'text' => '正常', 'color' => 'primary'],\n 'off' => ['value' => 0, 'text' => '禁止', 'color' => 'default'],\n ]);\n $form->tools(function (Form\\Tools $tools) {\n // 去掉`删除`按钮\n $tools->disableDelete();\n // 去掉`查看`按钮\n $tools->disableView();\n });\n $form->footer(function ($footer) {\n\n // 去掉`重置`按钮\n //$footer->disableReset();\n\n // 去掉`提交`按钮\n //$footer->disableSubmit();\n\n // 去掉`查看`checkbox\n $footer->disableViewCheck();\n\n // 去掉`继续编辑`checkbox\n $footer->disableEditingCheck();\n\n // 去掉`继续创建`checkbox\n $footer->disableCreatingCheck();\n\n });\n return $form;\n }", "protected function form()\n {\n $form = new Form(new City());\n $form->disableViewCheck();\n $form->disableEditingCheck();\n $form->disableCreatingCheck();\n\n $form->text('name', __('field.name'));\n $form->text('slug', __('field.slug'));\n $form->text('description', __('field.description'));\n $form->number('sort', __('field.sort'))->default(0);\n $form->hasMany('files', __('field.images'), function (Form\\NestedForm $form) {\n $form->image('file', __('field.image'))\n ->options(['showClose'=>false])\n ->options(['fileActionSettings'=>['showRemove'=>true]])\n ->options(['otherActionButtons'=>ImageHelper::previewRotateButtons()])\n ->uniqueName();\n $form->number('sort', __('field.sort'))->default(0);\n });\n $form->saving(function (Form $form) {\n if ($form->slug === null) {\n $form->slug = Str::slug($form->option);\n }\n });\n return $form;\n }", "protected function form()\n {\n $form = new Form(new CompanyCulture());\n\n $form->text('name', '企业名称')->rules('required');\n $form->text('en_name', '企业名称(en)')->rules('required');\n $form->image('image_url', '图片')->rules('required|image');\n $form->editor('content', '内容')->rules('required');\n\n $form->tools(function (Form\\Tools $tools) {\n // 去掉`列表`按钮\n $tools->disableList();\n // 去掉`删除`按钮\n $tools->disableDelete();\n // 去掉`查看`按钮\n $tools->disableView();\n });\n\n\n $form->footer(function ($footer) {\n // 去掉`查看`checkbox\n $footer->disableViewCheck();\n // 去掉`继续编辑`checkbox\n $footer->disableEditingCheck();\n // 去掉`继续创建`checkbox\n $footer->disableCreatingCheck();\n });\n\n return $form;\n }", "protected function form()\n {\n $form = new Form(new MobileImport);\n $form->text('title', '导入标题');\n $folder_name = \"files/mobile/import/\" . date(\"Ym\", time()) . '/'.date(\"d\", time());\n $filename = time() . '_' . str_random(10) . '.xlsx';\n $form->file('file', '导入文件')->move($folder_name, $filename);\n $form->select('broker_id', '提供者')->options(function ($id) {\n if($id){\n $employee = Employee::find($id);\n if ($employee) {\n return [$employee->id => $employee->full_name];\n }\n }\n })->ajax('/admin/api/employee');\n $form->select('employee_id', '所属员工')->options(function ($id) {\n if($id){\n $employee = Employee::find($id);\n if ($employee) {\n return [$employee->id => $employee->full_name];\n }\n }\n })->ajax('/admin/api/employee');\n $form->select('project_item_id', '主推产品')->options(function ($id) {\n if($id){\n $projectItem = ProjectItem::find($id);\n if ($projectItem) {\n return [$projectItem->id => $projectItem->full_name];\n }\n }\n })->ajax('/admin/api/project-item');\n $form->select('labels', '导入等级')->options(OptionUtil::getLabelOption());\n $form->saving(function ($form) {\n if(!$form->model()->id){\n $form->model()->creator_id = Admin::user()->id;\n }\n });\n return $form;\n }", "function InputForm()\n\t{\t\n\t\tif (!$data = $this->details)\n\t\t{\t$data = $_POST;\n\t\t\tif (!$data)\n\t\t\t{\t$data = array('live'=>1);\n\t\t\t}\n\t\t}\n\t\t\n\t\t$form = new Form('pageedit.php?id=' . (int)$this->id, 'pageedit');\n\t\t$form->AddTextInput('Page title', 'pagetitle', $this->InputSafeString($data['pagetitle']), '', 50);\n\t\t$form->AddCheckBox('Hide title on page', 'hideheader', 1, $data['hideheader']);\n\t\t\n\t\tif ($parents = $this->GetPossibleParents())\n\t\t{\t$form->AddSelectWithGroups('Parent page', 'parentid', $data['parentid'], '', $parents, 1, 0, '');\n\t\t\t$form->AddCheckBox('Display as section of parent', 'inparent', 1, $data['inparent']);\n\t\t}\n\t\t\n\t\t$form->AddTextInput('Order in menu', 'pageorder', (int)$data['pageorder'], 'num', 4);\n\t\tif ($this->CanAdminUser('technical'))\n\t\t{\t$form->AddTextInput('Extra page to include', 'includefile', $this->InputSafeString($data['includefile']), '', 50);\n\t\t\t$form->AddCheckBox('Allow galleries', 'galleries', 1, $data['galleries']);\n\t\t}\n\t\t$form->AddCheckBox('Make live', 'pagelive', 1, $data['pagelive']);\n\t\t$form->AddCheckBox('Leave out of search results', 'nosearch', 1, $data['nosearch']);\n\t\t$form->AddCheckBox('Show social media links?', 'socialbar', 1, $data['socialbar']);\n\t\t$form->AddCheckBox('In header menu?', 'headermenu', 1, $data['headermenu']);\n\t\tif ($this->CanAdminUser('technical'))\n\t\t{\t$form->AddTextInput('Class for header menu', 'menuclass', $this->InputSafeString($data['menuclass']), '', 50);\n\t\t}\n\t\t$form->AddCheckBox('In footer menu?', 'footermenu', 1, $data['footermenu']);\n\t\t$form->AddCheckBox('Header only (no content)', 'headeronly', 1, $data['headeronly']);\n\t\t$form->AddTextInput('Redirect link (full address if external)', 'redirectlink', $this->InputSafeString($data['redirectlink']), 'long', 255);\n\t\t\n\t\tif ($this->id)\n\t\t{\t$form->AddTextInput('Slug (for URL)', 'pagename', $this->InputSafeString($data['pagename']), 'long', 255);\n\t\t\tif ($link = $this->Link())\n\t\t\t{\t$form->AddRawText('<p><label>Link to page</label><span><a href=\"' . $link . '\" target=\"_blank\">' . $link . '</a></span><br /></p>');\n\t\t\t}\n\t\t}\n\t\t$form->AddCheckBox('Display block link in parent (if any)', 'blocklink', 1, $data['blocklink']);\n\t\t$form->AddTextArea('Block link text', $name = 'pageintro', stripslashes($data['pageintro']), 'tinymce', 0, 0, 10, 60);\n\t\t$form->AddTextArea('Page content', $name = 'pagetext', stripslashes($data['pagetext']), 'tinymce', 0, 0, 50, 60);\n\t\t$form->AddRawText('<p><label></label><a href=\"#\" onclick=\"javascript:window.open(\\'newsimagelist.php\\', \\'newsimages\\', \\'toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=yes, resizable=yes, width=400, height=550\\'); return false;\">view available images</a></p>');\n\t\t$form->AddFileUpload('Subpage image:', 'imagefile');\n\t\tif ($src = $this->HasImage('thumbnail'))\n\t\t{\t$form->AddRawText('<label>Current image</label><img src=\"' . $src . '?' . time() . '\" height=\"200px\" /><br />');\n\t\t\t$form->AddCheckBox('Delete this', 'delphoto');\n\t\t}\n\t\t\n\t\tob_start();\n\t\techo '<label>Banner:</label><br /><label id=\"bannerPicked\">', ($data['banner'] && ($banner = new BannerSet($data['banner'])) && $banner->id) ? $this->InputSafeString($banner->details['title']) : 'none','</label><input type=\"hidden\" name=\"banner\" id=\"bannerValue\" value=\"', (int)$data['banner'], '\" /><span class=\"dataText\"><a onclick=\"BannerPicker();\">change this</a></span><br />';\n\t\t$form->AddRawText(ob_get_clean());\n\n\n\t\t$form->AddSubmitButton('', $this->id ? 'Save' : 'Create', 'submit');\n\t\techo $this->BannerPickerPopUp();\n\t\t\n\t\t$form->Output();\n\t}", "protected function setupCreateOperation()\n {\n $this->crud->addField(['name' => 'name', 'type' => 'text', 'label' => 'Name']);\n $this->crud->addField([\n 'name' => 'school_id',\n 'type' => 'select',\n 'label' => 'School Name',\n 'entity' => 'School', // the method that defines the relationship in your Model\n 'attribute' => 'name', // foreign key attribute that is shown to user\n 'model' => \"App\\Models\\School\", // foreign key model\n ]);\n\n /**\n * Fields can be defined using the fluent syntax or array syntax:\n * - CRUD::field('price')->type('number');\n * - CRUD::addField(['name' => 'price', 'type' => 'number']));\n */\n }", "protected function setupCreateOperation()\n {\n CRUD::setValidation(CodeRequest::class);\n\n $this->addFieldDescriptionText();\n $this->addFieldIsVisibleCheckbox();\n }", "public function newAction(): void\n {\n $this->view->form = new AnaForm(null, ['edit' => true]);\n }", "protected function _edit(){\n\t\treturn $this->_editForm();\n\t}", "protected function form()\n {\n $form = new Form(new Project());\n $form->text('name', '项目名称')->rules('required')->required();\n $form->url('url', '项目地址')->rules('required')->required();\n $form->text('username', '账号');\n $form->text('password', '密码');\n $status = [\n 'on' => ['value' => 1, 'text' => '启用', 'color' => 'success'],\n 'off' => ['value' => 2, 'text' => '禁用', 'color' => 'danger'],\n ];\n $form->switch('status', '状态')->states($status)->default(1);\n $form->tools(function (Form\\Tools $tools) {\n $tools->disableDelete();\n $tools->disableView();\n });\n $form->footer(function ($footer) {\n $footer->disableReset();\n $footer->disableViewCheck();\n $footer->disableEditingCheck();\n $footer->disableCreatingCheck();\n });\n\n return $form;\n }", "public function createAction(){\n \t$this->view->placeholder('title')->set('Create');\n \t$this->_forward('form');\n }", "protected function SetupPanel() {\n\t\t\t$this->mctAddress = AddressMetaControl::Create($this, $this->strUrlHashArgument, QMetaControlCreateType::CreateOnRecordNotFound);\n\n\t\t\t// Dialog Message\n\t\t\t$this->dlgMessage = new MessageDialog($this);\n\t\t\t$this->dlgMessage_Reset();\n\t\t\t$this->btnSave->RemoveAllActions(QClickEvent::EventName);\n\t\t\t$this->btnSave->AddAction(new QClickEvent(), new QShowDialogBox($this->dlgMessage));\n\t\t\t$this->btnSave->AddAction(new QClickEvent(), new QAjaxControlAction($this, 'btnSave_Click'));\n\n\t\t\tif (!$this->mctAddress->EditMode) {\n\t\t\t\t// Trying to create a NEW address\n\t\t\t\t$this->mctAddress->Address->Person = $this->objPerson;\n\t\t\t\t$this->btnSave->Text = 'Create';\n\t\t\t} else {\n\t\t\t\t// Ensure the Address object belongs to the person\n\t\t\t\tif ($this->mctAddress->Address->PersonId != $this->objPerson->Id) {\n\t\t\t\t\treturn $this->ReturnTo('#contact');\n\t\t\t\t}\n\t\t\t\t$this->btnSave->Text = 'Update';\n\n\t\t\t\t$this->btnDelete = new QLinkButton($this);\n\t\t\t\t$this->btnDelete->Text = 'Delete';\n\t\t\t\t$this->btnDelete->CssClass = 'delete';\n\t\t\t\t$this->btnDelete->AddAction(new QClickEvent(), new QConfirmAction('Are you SURE you want to permenantly DELETE this record?'));\n\t\t\t\t$this->btnDelete->AddAction(new QClickEvent(), new QAjaxControlAction($this, 'btnDelete_Click'));\n\t\t\t\t$this->btnDelete->AddAction(new QClickEvent(), new QTerminateAction());\n\t\t\t}\n\n\t\t\t// Create Controls\n\t\t\t$this->lstAddressType = $this->mctAddress->lstAddressType_Create();\n\t\t\t$this->calDateUntilWhen = $this->mctAddress->calDateUntilWhen_Create();\n\t\t\t$this->calDateUntilWhen->MinimumYear = 2000;\n\t\t\t$this->calDateUntilWhen->MaximumYear = date('Y') + 10;\n\t\t\t$this->chkCurrentFlag = $this->mctAddress->chkCurrentFlag_Create();\n\n\t\t\t// Fixup \"Address Type\"\n\t\t\t$this->lstAddressType->GetItem(0)->Name = 'Previous Home';\n\t\t\tif (!$this->mctAddress->EditMode) $this->lstAddressType->AddSelectOneOption();\n\n\t\t\t$this->chkInvalidFlag = $this->mctAddress->chkInvalidFlag_Create();\n\t\t\t$this->txtAddress1 = $this->mctAddress->txtAddress1_Create();\n\t\t\t$this->txtAddress2 = $this->mctAddress->txtAddress2_Create();\n\t\t\t$this->txtAddress3 = $this->mctAddress->txtAddress3_Create();\n\t\t\t$this->txtCity = $this->mctAddress->txtCity_Create();\n\t\t\t$this->lstState = $this->mctAddress->lstState_Create();\n\t\t\t$this->txtZipCode = $this->mctAddress->txtZipCode_Create();\n\t\t\t$this->txtCountry = $this->mctAddress->txtCountry_Create();\n\t\t\t$this->txtInternationalState = $this->mctAddress->txtState_Create();\n\t\t\t$this->txtInternationalState->Visible = false;\n\t\t\t$this->chkInternationalFlag = $this->mctAddress->chkInternationalFlag_Create();\n\t\t\t$this->chkInternationalFlag->AddAction(new QClickEvent(), new QAjaxControlAction($this, 'chkInternationalFlag_Click'));\n\t\t\t$this->chkInternationalFlag_Click();\n\t\t\t\n\t\t\t// Add Actions\n\t\t\t$this->lstAddressType->AddAction(new QChangeEvent(), new QAjaxControlAction($this, 'lstAddressType_Change'));\n\n\t\t\t// Setup Controls\n\t\t\t$this->lstAddressType_Change();\n\t\t}", "public function create()\n\t{\n\t\t//\n\t\treturn view('admin.ejercicios.createUpdate');\n\t}", "protected function _prepareForm()\n\t{\n\n\t\t$intId = $this->getRequest()->getParam(SDZeCOM_Aurednik_Model_Cms_Home_Entity :: TABLE_COLUMN_ID);\n\n\t\t$objEntity = new SDZeCOM_Aurednik_Model_Cms_Home_Entity ();\n\n\t\t$objEntity->load($intId);\n\n\t\t$objAttribute = new SDZeCOM_Aurednik_Model_Cms_Home_Entity_Attribute ();\n\n\t\t$objAttributeValue = new SDZeCOM_Aurednik_Model_Cms_Home_Entity_Attribute_Values ();\n\n\t\t$objEntityType = new SDZeCOM_Aurednik_Model_Cms_Home_Entity_Type ();\n\n\t\t$objForm = new Varien_Data_Form (\n\t\t\tarray(\n\t\t\t\t'id' => SDZeCOM_Aurednik_Block_Adminhtml_Cms_Home_Edit_Form_Container :: FORM_NAME,\n\t\t\t\t'action' => $this->getUrl('*/*/save'),\n\t\t\t\t'method' => 'post',\n\t\t\t\t'enctype' => 'multipart/form-data',\n\t\t\t\t'name' => SDZeCOM_Aurednik_Block_Adminhtml_Cms_Home_Edit_Form_Container :: FORM_NAME\n\t\t\t)\n\t\t);\n\n\t\t$this->setForm($objForm);\n\n\t\t$objForm->setUseContainer(true);\n\n\t\t//Set Enitty\n\t\t$objFieldset =\n\t\t\t$objForm->addFieldset('aurednik_cms_home_entity',\n\t\t\t\tarray(\n\t\t\t\t\t'legend' => Mage:: helper('admin')->__('entity')));\n\n\t\t$objType = $objFieldset->addField(\n\t\t\tSDZeCOM_Aurednik_Model_Cms_Home_Entity :: TABLE_COLUMN_ID,\n\t\t\t'text',\n\t\t\tarray(\n\t\t\t\t'name' => self :: POST_ENTITY_DATA . '[' . SDZeCOM_Aurednik_Model_Cms_Home_Entity :: TABLE_COLUMN_ID . ']',\n\t\t\t\t'label' => Mage:: helper('admin')->__('Id'),\n\t\t\t\t'title' => Mage:: helper('admin')->__('Id'),\n\t\t\t\t'required' => true,\n\t\t\t\t'value' => $objEntity->getId(),\n\t\t\t\t'readonly' => true,\n\t\t\t\t'class' => 'required-entry'\n\n\t\t\t));\n\n\t\t$objType = $objFieldset->addField(\n\t\t\tSDZeCOM_Aurednik_Model_Cms_Home_Entity :: TABLE_COLUMN_NAME,\n\t\t\t'text',\n\t\t\tarray(\n\t\t\t\t'name' => self :: POST_ENTITY_DATA . '[' . SDZeCOM_Aurednik_Model_Cms_Home_Entity :: TABLE_COLUMN_NAME . ']',\n\t\t\t\t'label' => Mage:: helper('admin')->__('Name'),\n\t\t\t\t'title' => Mage:: helper('admin')->__('Name'),\n\t\t\t\t'required' => false,\n\t\t\t\t'value' => $objEntity->getEntity_name(),\n\t\t\t\t'class' => 'required-entry'\n\n\t\t\t));\n\n\t\t$field = $objFieldset->addField(SDZeCOM_Aurednik_Model_Cms_Home_Entity_Store::TABLE_COLUMN_STORE_ID, 'multiselect', array(\n\t\t\t'name' => self :: POST_ENTITY_DATA . '[' . SDZeCOM_Aurednik_Model_Cms_Home_Entity_Store :: TABLE_COLUMN_STORE_ID . ']',\n\t\t\t'label' => Mage::helper('cms')->__('Store View'),\n\t\t\t'title' => Mage::helper('cms')->__('Store View'),\n\t\t\t'required' => true,\n\t\t\t'value' => $objEntity->getStore_id(),\n\t\t\t'values' => Mage:: getSingleton('adminhtml/system_store')->getStoreValuesForForm(false, true),\n\t\t));\n\n\t\t$renderer = $this->getLayout()->createBlock('adminhtml/store_switcher_form_renderer_fieldset_element');\n\t\t$field->setRenderer($renderer);\n\n\n\t\t$objType = $objFieldset->addField(\n\t\t\tSDZeCOM_Aurednik_Model_Cms_Home_Entity :: TABLE_COLUMN_TYPE,\n\t\t\t'select',\n\t\t\tarray(\n\t\t\t\t'name' => self :: POST_ENTITY_DATA . '[' . SDZeCOM_Aurednik_Model_Cms_Home_Entity :: TABLE_COLUMN_TYPE . ']',\n\t\t\t\t'label' => Mage:: helper('admin')->__('Type'),\n\t\t\t\t'title' => Mage:: helper('admin')->__('Type'),\n\t\t\t\t'required' => true,\n\t\t\t\t'disabled' => true,\n\t\t\t\t'options' => $objEntityType->toOptionArray(),\n\t\t\t\t'readonly' => true,\n\t\t\t\t'value' => $objEntity->getType_id()\n\t\t\t));\n\n\t\t$objFieldset->addField(\n\t\t\tSDZeCOM_Aurednik_Model_Cms_Home_Entity :: TABLE_COLUMN_ACTIVE,\n\t\t\t'select',\n\t\t\tarray(\n\t\t\t\t'name' => self :: POST_ENTITY_DATA . '[' . SDZeCOM_Aurednik_Model_Cms_Home_Entity :: TABLE_COLUMN_ACTIVE . ']',\n\t\t\t\t'label' => Mage:: helper('admin')->__('Active'),\n\t\t\t\t'title' => Mage:: helper('admin')->__('Active'),\n\t\t\t\t'required' => true,\n\t\t\t\t'disabled' => false,\n\t\t\t\t'options' => array(0 => Mage:: helper('admin')->__('No'), 1 => Mage:: helper('admin')->__('Yes')),\n\t\t\t\t'value' => $objEntity->getActive()\n\n\t\t\t));\n\n\t\t$objFieldset->addField(\n\t\t\tSDZeCOM_Aurednik_Model_Cms_Home_Entity :: TABLE_COLUMN_SORT,\n\t\t\t'text',\n\t\t\tarray(\n\t\t\t\t'name' => self :: POST_ENTITY_DATA . '[' . SDZeCOM_Aurednik_Model_Cms_Home_Entity :: TABLE_COLUMN_SORT . ']',\n\t\t\t\t'label' => Mage:: helper('admin')->__('Sort'),\n\t\t\t\t'title' => Mage:: helper('admin')->__('Sort'),\n\t\t\t\t'required' => false,\n\t\t\t\t'value' => $objEntity->getSort(),\n\t\t\t\t'class' => 'required-entry',\n\t\t\t\t'required' => true,\n\t\t\t));\n\n\t\t$objAttrCollection = $objAttribute->getCollection()->getByEntityTypeId($objEntity->getType_id());\n\n\t\tif ($objAttrCollection->count() == 0)\n\t\t{\n\t\t\tMage:: getSingleton('core/session')->addError(Mage:: helper('aurednik')->__('Error no attributes'));\n\t\t\t$this->getResponse()->sendResponse();\n\t\t}\n\n\t\t$objFieldset =\n\t\t\t$objForm->addFieldset(\n\t\t\t\t'aurednik_cms_home_entity_data',\n\t\t\t\tarray(\n\t\t\t\t\t'legend' => Mage:: helper('admin')->__('entity attribute data')\n\t\t\t\t)\n\t\t\t);\n\n\t\tforeach ($objAttrCollection as $objCurrentAttr)\n\t\t{\n\n\t\t\t$objEntityAttrValuesCollection = $objAttributeValue->getCollection()->getByEntityIdAndAttributeId($objEntity->getId(), $objCurrentAttr->getId());\n\n\t\t\tif ($objEntityAttrValuesCollection->count() > 0)\n\t\t\t{\n\n\t\t\t\tforeach ($objEntityAttrValuesCollection as $objCurrentAttrValue)\n\t\t\t\t{\n\n\t\t\t\t\t$objFieldset->addField(\n\t\t\t\t\t\t$objCurrentAttrValue->getId(),\n\t\t\t\t\t\t$objCurrentAttr->getInput_type(),\n\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t'name' => self :: POST_ENTITY_ATTRIBUTE_DATA . '[' . $objCurrentAttr->getId() . ']',\n\t\t\t\t\t\t\t'label' => Mage:: helper('aurednik')->__($objCurrentAttr->getTitle()),\n\t\t\t\t\t\t\t'title' => Mage:: helper('aurednik')->__($objCurrentAttr->getTitle()),\n\t\t\t\t\t\t\t'required' => $objEntity->getRequired() == 1 ? true : false,\n\t\t\t\t\t\t\t'value' => $objCurrentAttrValue->getAttribute_value(),\n\t\t\t\t\t\t\t'class' => 'required-entry'\n\t\t\t\t\t\t));\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\n\t\t\t\t$objFieldset->addField(\n\t\t\t\t\t$objEntity->getId() . \"_\" . $objCurrentAttr->getId(),\n\t\t\t\t\t$objCurrentAttr->getInput_type(),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'name' => self :: POST_ENTITY_ATTRIBUTE_DATA . '[' . $objCurrentAttr->getId() . ']',\n\t\t\t\t\t\t'label' => Mage:: helper('aurednik')->__($objCurrentAttr->getTitle()),\n\t\t\t\t\t\t'title' => Mage:: helper('aurednik')->__($objCurrentAttr->getTitle()),\n\t\t\t\t\t\t'required' => $objEntity->getRequired() == 1 ? true : false,\n\t\t\t\t\t\t'class' => 'required-entry'\n\t\t\t\t\t));\n\t\t\t}\n\t\t}\n\t\treturn parent:: _prepareForm();\n\t}", "public function actionCreate()\n\t{\n\t\t\n\t\t//$data['model'] = new ClientForm();\n\n\t\t//$data['action'] = 'add';\n\t\t\n\t\t//$model=new Client;\n\t\t//$DPmodel=new Driverparticular;\n\t\t$data['modelBroker'] = new Broker;\n\t\t$data['model'] = new ClientForm();\n\t \t$data['DPmodel'] = new DriverParticularForm();\n\t\t$data['action'] = 'add';\n\t\t$data['i'] = 0;\n\t\t\n\t\t$this->render('_form', $data);\n\n\t\t\n\n\t}", "protected function setupCreateOperation()\n {\n CRUD::setValidation(TaskRequest::class);\n\n // CRUD::setFromDb(); // fields\n\n /**\n * Fields can be defined using the fluent syntax or array syntax:\n * - CRUD::field('price')->type('number');\n * - CRUD::addField(['name' => 'price', 'type' => 'number'])); \n */\n CRUD::addField(['label' => \"Name\",\n 'name' => 'name',]\n );\n CRUD::addField([ // Select\n 'label' => \"Project\",\n 'type' => 'select',\n 'name' => 'project_id', // the db column for the foreign key\n \n // optional \n // 'entity' should point to the method that defines the relationship in your Model\n // defining entity will make Backpack guess 'model' and 'attribute'\n 'entity' => 'project', \n \n // optional - manually specify the related model and attribute\n 'model' => \"App\\Models\\Project\", // related model\n 'attribute' => 'name', // foreign key attribute that is shown to user\n \n // optional - force the related options to be a custom query, instead of all();\n ]);\n\n }", "function makeForm() {\n if($this->table_title != '' ) {\n $db_obj = new db_class();\n $desc_table = $db_obj->tableDescription($this->table_title);\n $db_obj->closeDB();\n \n// showArray($desc_table);\n echo '<form id=\"generic_edit_form\" method=\"POST\" >';\n echo '<input type=\"hidden\" name=\"title_input\" value=\"name\"> '; // THIS MUST BE HERE FOR CLONABLE FORMS!!!\n echo '<input type=\"hidden\" name=\"table\" value=\"vendors\">'; // THE TABLE MUST BE LABELED\n echo '<b>This is a generic input</b> <input type=\"text\" name=\"generic\">' . \"\\n\";\n \n echo '<br><br><input type=\"submit\" >';\n echo '</form>';\n } else {\n echo '<h2>hello, form<h2>';\n }\n }" ]
[ "0.704494", "0.68939054", "0.68939054", "0.6836465", "0.68338895", "0.68332285", "0.68226284", "0.6776389", "0.6733857", "0.67288643", "0.67052007", "0.6689038", "0.6686245", "0.6686245", "0.6616814", "0.65817887", "0.655902", "0.6550627", "0.6499165", "0.6498126", "0.64754385", "0.64754385", "0.64754385", "0.64754385", "0.64696795", "0.6463948", "0.6453838", "0.6428435", "0.64272875", "0.642035", "0.642035", "0.64051086", "0.6403332", "0.63949484", "0.63753504", "0.6364484", "0.6362851", "0.6342979", "0.6329298", "0.6321331", "0.6316763", "0.630729", "0.63008773", "0.62866676", "0.6286494", "0.62863314", "0.6270383", "0.62601733", "0.6259165", "0.62557054", "0.6252006", "0.6246367", "0.62385905", "0.62358594", "0.6229627", "0.62230873", "0.621941", "0.6211985", "0.62065816", "0.62018806", "0.61972195", "0.61972004", "0.61892617", "0.61802536", "0.6178852", "0.6177077", "0.6172064", "0.6167742", "0.6164886", "0.6160897", "0.6160597", "0.61601496", "0.61599356", "0.61592156", "0.6158281", "0.6154197", "0.6151735", "0.6146477", "0.61446834", "0.6134671", "0.61345565", "0.61330605", "0.6127177", "0.61225355", "0.6122297", "0.6118657", "0.6115096", "0.61110866", "0.61102045", "0.61072654", "0.6107116", "0.61059797", "0.61032164", "0.61023694", "0.60993654", "0.609726", "0.6096795", "0.60920197", "0.60830754", "0.60826623", "0.607925" ]
0.0
-1
Creates a Question object for a Question entity.
public function create(\FanFerret\QuestionBundle\Entity\Question $question);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function create(Productquestion $productquestion)\n {\n //\n }", "public function create($question, $type = ObjectFactory::TEXT_QUESTION)\n\t{\n\t\t// echo $type;\n\t\t$newQuestion = $this->objectFactory->createQuestion($type);\n\t\t// if ($type == ObjectFactory::SINGLE_CHOICE_QUESTION) echo \"single\";\n\t\t// echo $question;\n\t\t$newQuestion->setQuestion($question);\n\t\t$this->questions[$newQuestion->getId()] = $newQuestion;\n\t\treturn $newQuestion;\n\t}", "public function create($question, $type = ObjectFactory::TEXT_QUESTION) {\n $questionObj = $this->objectFactory->createQuestion($type);\n $questionObj->setQuestion($question);\n $this->poll->addItem($questionObj);\n return $questionObj;\n\t}", "public function createQuestion($Question){\n\n\t\t$Result = new Result();\t\n\t\t$Result = $this->_QuestionDAO->createQuestion($Question);\n\t\t\n\t\tif(!$Result->getIsSuccess())\n\t\t\t$Result->setResultObject(\"Database failure in QuestionDAO.createQuestion()\");\t\t\n\n\t\treturn $Result;\n\n\t\n\t}", "public function createAction()\n {\n\n if (!$this->request->isPost()) {\n return $this->dispatcher->forward(array(\n \"controller\" => \"question\",\n \"action\" => \"index\"\n ));\n }\n\n $que = new Question();\n\n $que->setQuesId($this->request->getPost(\"quesid\"));\n $que->setDesc($this->request->getPost(\"desc\"));\n $que->setOrder($this->request->getPost(\"order\"));\n $que->setBkgrId($this->request->getPost(\"bkgrid\"));\n $que->setQtype($this->request->getPost(\"qtype\"));\n $que->setAmtText($this->request->getPost(\"amttext\"));\n $que->setAmtType($this->request->getPost(\"amttype\"));\n $que->setCrdt($this->request->getPost(\"crdt\"));\n $que->setCrdtId($this->request->getPost(\"crdtid\"));\n $que->setUpdt($this->request->getPost(\"updt\"));\n $que->setUpdtId($this->request->getPost(\"updtid\"));\n $que->setDelmark($this->request->getPost(\"delmark\"));\n \n\n if (!$que->save()) {\n foreach ($que->getMessages() as $message) {\n $this->flash->error($message);\n }\n\n return $this->dispatcher->forward(array(\n \"controller\" => \"ques\",\n \"action\" => \"new\"\n ));\n }\n\n $this->flash->success(\"Question was created successfully\");\n\n return $this->dispatcher->forward(array(\n \"controller\" => \"question\",\n \"action\" => \"index\"\n ));\n\n }", "abstract protected function create(string $name, string $description, array $variants): Question;", "public function createAction(Request $request) {\n $entity = new Question();\n $form = $this->createCreateForm($entity);\n $form->handleRequest($request);\n\n if ($form->isValid()) {\n $em = $this->getDoctrine()->getManager();\n $em->persist($entity);\n $em->flush();\n\n return $this->redirect($this->generateUrl('question_show', array('id' => $entity->getQuestionId())));\n }\n\n return $this->render('CdlrcodeBundle:Question:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }", "public function __construct(Question $question)\n {\n $this->question = $question;\n }", "public function create()\n {\n $question = new Question();\n return view('questions.create', compact('question'));\n }", "public function create($entity);", "private function createCreateForm(Question $entity) {\n $form = $this->createForm(new QuestionType(), $entity, array(\n 'action' => $this->generateUrl('question_create'),\n 'method' => 'POST',\n ));\n\n $form->add('submit', 'submit', array('label' => 'Create'));\n\n return $form;\n }", "public function create(Entity $entity);", "public function createAction(Request $request, $id)\n {\n $entity = new Question();\n $form = $this->createForm(new QuestionType(), $entity);\n $form->bind($request);\n\n if ($form->isValid()) {\n $em = $this->getDoctrine()->getManager();\n // On r�cup�re l'entit� questionnaire correspondant � l'id $id\n //$questionnaire = $em->getRepository('QuizmooQuestionnaireBundle:Questionnaire')->find($id);\n //$questionnaire->addQuestion($entity);\n $em->persist($entity);\n $em->flush();\n\n // return $this->redirect($this->generateUrl('question_show', array('id' => $entity->getId())));\n return $this->redirect($this->generateUrl('quizmoo_questionnaire_modifier', array('id' => $id)));\n }\n\n return $this->render('QuizmooQuestionnaireBundle:Question:new.'.$this->get('session')->get('whichTwig','').'html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }", "public function __construct(Question $question)\n {\n $this->questionRepo = new \\App\\Repositories\\QuestionRepository($question);\n }", "public function store(StoreQuestionRequest $request)\n {\n $question = new Question();\n $question->type = $request->input('type');\n $question->title = $request->input('title');\n $question->quiz()->associate($request->input('quiz'));\n $question->feedback = $request->input('feedback', null);\n try {\n $question->save();\n session()->flash('success', 'Question created!');\n return response()->json([\n \"error\" => false,\n \"code\" => 201,\n \"reason\" => \"Question created!\"\n ]);\n } catch (\\Exception $exception) {\n logger($exception);\n session()->flash('error', 'Question could not be created!');\n return response()->json([\n \"error\" => true,\n \"code\" => 500,\n \"reason\" => \"Question could not be created!\"\n ]);\n }\n }", "public function testQuestionTypeEntity() {\n $values = [];\n $bundle = new QuestionType($values, 'quiz_question_type');\n\n $this->assertInstanceOf('\\Drupal\\quiz\\Entity\\QuestionType', $bundle);\n }", "public function createAction(Request $request)\r\n {\r\n $em = $this->getDoctrine()->getManager('interview');\r\n $entity = new Question();\r\n $form = $this->createForm(new QuestionType($em), $entity);\r\n $form->bind($request);\r\n\r\n if ($form->isValid()) {\r\n $em->persist($entity);\r\n $em->flush();\r\n\r\n return $this->redirect($this->generateUrl('question_answer', array('id' => $entity->getId())));\r\n }\r\n\r\n return array(\r\n 'entity' => $entity,\r\n 'form' => $form->createView(),\r\n );\r\n }", "public function create()\n\t{\n\t\treturn view('questions.createQuestion');\n\t}", "function create($entity);", "public function create()\n {\n //get new question instance\n $question = new Question;\n\n //set edit variable as false : new question\n $edit = FALSE;\n\n //display the question view\n return view('questionForm', ['question' => $question,'edit' => $edit ]);\n }", "public function question($id)\n {\n return $this->create($id);\n }", "public function createquestionAction()\r\n {\r\n\r\n // Check Post\r\n if ($this->getRequest()->isPost()) {\r\n\r\n $params = $this->getRequest()->getParams();\r\n $questionname = trim($params['questionNameCreate']);\r\n\r\n\r\n $error = \"\";\r\n \r\n\r\n if (strlen($questionname)>50)\r\n $error .= \"Le nom de la question doit être compris entre 1 et 50 caractères. \";\r\n if (!empty($error)) {\r\n $this->_helper->json(array(\r\n 'code' => $error\r\n ));\r\n }\r\n $auth = Zend_Auth::getInstance();\r\n $userGroupId = $auth->getIdentity()->UserGroupIdF;\r\n\r\n $question = new Application_Model_DbTable_FicheQuestion();\r\n // create the new group\r\n $idInsert = $question->createQuestion($questionname, $userGroupId);\r\n\r\n if ($idInsert == \"nok\") {\r\n $msg = \"Contactez un administrateur svp.\";\r\n $this->_helper->json(array(\r\n 'code' => $msg\r\n ));\r\n }\r\n $this->_helper->json(array(\r\n 'code' => '42'\r\n ));\r\n }\r\n }", "public function createEntity();", "public function store(Question $question, Request $request)\n {\n $request->validate([\n 'body' => 'required|min:2'\n ]);\n\n $answer = $question->answers()->create(['body' => $request->body, 'user_id' => Auth::id()]);\n\n return response()->json([\n 'message' => \"Your answer has been submitted successfully\",\n //Eager load user relationship\n 'answer' => new AnswerResource($answer->load('user')),\n ]);\n }", "public function create()\n {\n $question=new Question();\n return view('questions.create',compact('question'));\n }", "public function create( Question $question)\n {\n return view('admin.pages.answer.create',compact('question'));\n\n\n }", "public function actionCreate($question_id)\n {\n $model = new QuestionAnswer();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['question/view', 'id' => $question_id]);\n }\n return $this->render('create', [\n 'model' => $model,\n 'question' => $this->findQuestionModel($question_id)\n ]);\n }", "public static function create_question($question, $answer)\n {\n global $DB;\n $params = self::validate_parameters(self::create_question_parameters(), array('question' => $question, 'answer' => $answer));\n if ($DB->record_exists('quiz', array('id' => $question[0]['quizid'])) == false && $question[0]['quizid'] != 0) {\n print_error('quiz does not exist', 'quiz', null, null, 'choose correct quiz id');\n } elseif ($DB->record_exists('question_categories', array('id' => $question[0]['question_category'])) == false && $question[0]['question_category']) {\n print_error('categorydoesnotexist', 'question', null, null, 'choose correct category id');\n }\n\n $questionBuilder = new QuestionBuilder();\n $__question = $questionBuilder->questionMaker($question);\n $answerBuilder = new AnswerBuilder($__question);\n\n $answerBuilder->answerMaker($answer);\n\n return $__question;\n }", "public function create()\n {\n $question = new Question;\n $edit = FALSE;\n return view('questionForm', ['question' => $question, 'edit' => $edit]);\n }", "public function newAction()\r\n {\r\n $entity = new Question();\r\n $em = $this->getDoctrine()->getManager('interview');\r\n $form = $this->createForm(new QuestionType($em), $entity);\r\n\r\n return array(\r\n 'entity' => $entity,\r\n 'form' => $form->createView(),\r\n );\r\n }", "public function store(Request $request){\n $question = new Question();\n $question->questionnaire_id = $request->input('q_id');\n $question->question_name = $request->input('q_name');\n $question->question_type = $request->input('q_type');\n $question->choices = $request->input('choices');\n $question->answer = $request->input('q_ans');\n $question->points = $request->input('q_point');\n $question->save();\n }", "public function create()\n\t{\n\t\treturn view('admin.question.create');\n\t}", "public function createQuestionAction(int $id) : object\n {\n $page = $this->di->get(\"page\");\n $form = new CreateQuestionForm($this->di, $id);\n $form->check();\n\n $page->add(\"questions/crud/create-question\", [\n \"form\" => $form->getHTML(),\n ]);\n\n return $page->render([\n \"title\" => \"Create a question\",\n ]);\n }", "public function createAction(Request $request)\n {\n $entity = new StudyQuestions();\n \n $form = $this->createForm(new StudyQuestionsType(), $entity);\n $form->bind($request);\n $entity->setCreatedAt(new \\DateTime()); \n if ($form->isValid()) {\n $em = $this->getDoctrine()->getManager();\n $em->persist($entity);\n $em->flush();\n\n return $this->redirect($this->generateUrl('studyquestions_show', array('id' => $entity->getId())));\n }\n\n return $this->render('CompeteComBundle:StudyQuestions:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }", "public function getDummyQuestionOfTypeZeroEntity(ObjectManager $manager, Quiz $quiz) : Question\n {\n $question = new Question();\n $question->setQuiz($quiz);\n $question->setText(\"Is 100kg of feathers lighter than 100 kg of steel ?\");\n\n return $question;\n }", "public function store(Question $question, CreateAnswerRequest $request)\n {\n // dd($question);\n $question->answers()->create([\n 'body' => $request->body,\n 'user_id' => auth()->id(),\n ]);\n\n session()->flash('success', 'Answer has been added successfully');\n return redirect($question->url);\n }", "public function actionCreate() {\n $test = $this->tests->add($this->user->id);\n $values['test_id'] = $test->id;\n $this->questions->add($values);\n $this->redirect('Test:edit', $test->id);\n }", "public function store(AskQuestionRequest $request)\n {\n $request->user()->questions()->create($request->only('title', 'body'));\n return redirect()->route('questions.index')->with('success', 'Your Question has been created');\n }", "public function question()\n {\n return $this->hasOne('App\\Question');\n }", "public function create()\n {\n return view('backend.question.create');\n }", "public function newQuestion($question, $connection) {\r\n\t\t$connection -> exec(\"INSERT INTO `\".$GLOBALS['dbPrefix'].\"question_question` (`set`, `question`, `mode`) VALUES (\" . $this -> setid . \", '\" . $question -> getQuestion() . \"', '\" . $question -> getMode() . \"')\");\r\n\t\t$question -> setId($connection -> lastInsertId());\r\n\t\tarray_push($this -> questions, $question);\r\n\t}", "public function create()\n {\n return view('questions.create');\n }", "public function create()\n {\n return view('questions.create');\n }", "public function create()\n {\n return view('questions.create');\n }", "public function create()\n {\n return view('questions.create');\n\n }", "public function create()\n {\n return view('admin.questions.create');\n }", "public function create()\n {\n return view('admin.questions.create');\n }", "public function store(StoreQuestion $request)\n {\n\n\n $validated = $request->validated();\n\n\n\n Question::create([\n 'question_text' => $validated['question_text']\n ]);\n\n\n $placeholder = $this->newExample();\n $questions = Question::with('answers')->get();\n return redirect('/Question');\n\n }", "public function create()\n {\n //\n return view('question.create');\n }", "public function create()\n {\n return view('admin.question.create');\n }", "public function create()\n {\n \n \n\n return view('questions.create');\n \n\n }", "public function create(Test $test, Question $question)\n {\n return view('choice.create', ['test' => $test, 'question' => $question]);\n }", "public function create(){\n\n // returning view and results\n return view('create_question');\n }", "public static function create($type, $array)\n {\n switch ($type) {\n case \"mcq\":\n return new QuestionMcq($array);\n break;\n case \"mrq\":\n return new QuestionMrq($array);\n break;\n case \"text\":\n return new QuestionText($array);\n break;\n case \"textlong\":\n return new QuestionTextLong($array);\n break;\n default:\n throw new Exception(\"QuestionFactory_ClassNotFoundException\");\n }\n }", "public function store(Request $request)\n {\n $question = new Question;\n $question->prompt = $request->prompt;\n $question->difficulty = $request->difficulty;\n $question->total_score = $request->total_score;\n $question->subject_id = 1;\n $question->save();\n\n $a1 = new Answer;\n $a2 = new Answer;\n $a3 = new Answer;\n $a4 = new Answer;\n $a5 = new Answer;\n \n $a1->text = $request->choice1;\n $a2->text = $request->choice2;\n $a3->text = $request->choice3;\n $a4->text = $request->choice4;\n $a5->text = $request->choice5;\n\n $a1->save();\n $a2->save();\n $a3->save();\n $a4->save();\n $a5->save();\n\n $question->answers()->attach($a1->id, array('is_correct' => ($request->isCorrect1 != 1 ? 0 : 1)));\n $question->answers()->attach($a2->id, array('is_correct' => ($request->isCorrect2 != 1 ? 0 : 1)));\n $question->answers()->attach($a3->id, array('is_correct' => ($request->isCorrect3 != 1 ? 0 : 1)));\n $question->answers()->attach($a4->id, array('is_correct' => ($request->isCorrect4 != 1 ? 0 : 1)));\n $question->answers()->attach($a5->id, array('is_correct' => ($request->isCorrect5 != 1 ? 0 : 1)));\n\n // return Redirect::back()->withMsg('Quiz Question Created');\n return redirect('/question');\n }", "public function store(QuestionRequest $request)\n {\n\n\n\n $requests=[\n \"ask\"=>$request->ask,\n \"answer\"=>$request->answer,\n \"user_id\"=>auth()->user()->id,\n \"status\"=>($request->status==\"on\") ? \"1\":\"0\",\n \"order\"=>$request->order,\n \"lang_id\"=>$request->lang,\n\n\n ];\n\n return Question::CreateRecord(Question::SpaceName(),$requests,$request,\"questions.index\",true,null,true,\"images\",false,null);\n\n\n\n }", "public function create()\n {\n return view('question.create');\n }", "public function store(Question $question, Request $request)\n {\n $question->replies()->create($request->all());\n $message = [\n 'status'=> 'success',\n 'message'=> 'reply created successfully!'\n ];\n \n return response()->json($message, 201);\n }", "public function createFromRequest(Request $request): EntityInterface\n {\n $entity = parent::createFromRequest($request);\n $entity->setNrQuestions(count($request->getParameter(\"questions\")));\n return $entity;\n }", "public function store(Request $request)\n {\n $question = new Question;\n $question->quiz_id = $request->quiz_id;\n $question->text = $request->question_text;\n $question->save();\n\n // for some reason it won't show on the page without the answers array\n // (may need to look into this later)\n $question->answers = [];\n\n return response(['question' => $question]);\n }", "public function create()\n {\n return view('admin.typeQuestion.create');\n }", "public function store(Request $request,Question $question)\n {\n $question->answers()->create(\n [\n 'text'=>$request->body,\n 'user_id'=> Auth::id()\n ]\n )->save();\n\n// return view('questions.show',[\n// 'question'=>$question,\n// 'success'=>'success'\n// ]);\n return redirect()->route('questions.show',$question->slug)->with('success','Answered Successfull!');\n\n }", "public static function create($entity)\n {\n return static::mapper()->create($entity);\n }", "public function createQuestionAndAnswers () {\n global $tpl, $lng, $ilCtrl, $ilTabs;\n\n // create wizard object\n include_once('class.ilObjMobileQuizWizard.php');\n $wiz = new ilObjMobileQuizWizard();\n\n\n $ilTabs->activateTab(\"editQuiz\");\n\n\n if ($wiz->checkInput()){\n $wiz->createQuestionAndAnswers($this->object);\n ilUtil::sendSuccess($this->txt(\"question_obj_create\"), true);\n $ilCtrl->redirect($this, \"editQuiz\");\n }\n $this->initAddQuestionAndAnswersFormAfterError();\n //$tpl->setContent(\"Test\");\n }", "public function newAction() {\n $entity = new Question();\n $form = $this->createCreateForm($entity);\n\n return $this->render('CdlrcodeBundle:Question:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }", "private function createEntity()\n {\n $this->entity = $this->container->make($this->entity());\n }", "public function create()\n {\n $questions=Question::all();\n return view('backend.truefalsequestions.create',compact('questions'));\n }", "public function store(Request $request): JsonResponse\n {\n// if (!$request->question_pack_id\n// || !$request->question_level_id\n// || !$request->name\n// || !$request->question_type_id) {\n// return $this->respondNotFound();\n// }\n $question = Question::query()->create([\n 'name' => $request->name,\n 'question_pack_id' => $request->question_pack_id,\n 'question_level_id' => $request->question_level_id,\n 'question_type_id' => $request->question_type_id,\n 'time' => $request->time\n ]);\n return $this->respond($question);\n }", "public function create()\n\t{\n\t\t$tags = Tag::pluck('name', 'id')->all();\n\t\treturn view('questions.createQuestion', compact('tags'));\n\t}", "public function create(Request $request)\n {\n $client = $request->input('client');\n $area = $request->input('area');\n $address = $request->input('address');\n $parent_company = $request->input('parent_company');\n $contact_id = $request->input('contact_id');\n $general_id = $request->input('general_id');\n $report_id = $request->input('report_id');\n $user_id = $request->input('user_id');\n $branch_id = $request->input('branch_id');\n $questionnaire = new Questionnaire([\n 'client' => $client,\n 'area' => $area,\n 'address' => $address,\n 'parent_company' => $parent_company,\n 'contact_id' => $contact_id,\n 'general_id' => $general_id,\n 'report_id' => $report_id,\n 'user_id' => $user_id,\n 'branch_id' => $branch_id\n ]);\n $questionnaire->save();\n return response()->json($questionnaire);\n }", "public function store(Request $request)\n {\n $validator = Validator::make($request->all(), [\n 'question' => 'required|string',\n 'created_by' => 'required|numeric',\n ]);\n\n if ($validator->fails()) {\n return response(['errors' => $validator->errors()], 422);\n }\n\n return Question::create($request->all());\n }", "public function actionCreate()\n\t{\n\t\t$model = new Question();\n\t\t$model->user = Yii::$app->user->id*1;\n\t\t$model->text = 'Новый опрос';\n\t\t$model->save(true,['user','text']);\n\t\treturn $this->redirect(['update', 'id' => $model->id]);\n\t}", "function &_instanciateQuestion($question_id) \n\t{\n\t\tif ($question_id < 1) return FALSE;\n\t\tinclude_once \"./Modules/SurveyQuestionPool/classes/class.SurveyQuestion.php\";\n\t\t$question_type = SurveyQuestion::_getQuestionType($question_id);\n\t\tif (strlen($question_type) == 0) return FALSE;\n\t\tSurveyQuestion::_includeClass($question_type);\n\t\t$question = new $question_type();\n\t\t$question->loadFromDb($question_id);\n\t\treturn $question;\n }", "public function store(Question $question, Request $request)\n {\n //karena di route kita include {question}\n // we need to capture the question by specify or type-hint\n // argumen pertama with a question instance\n dd($question);\n // kalau valid pass gan\n $answer = $question->answers()->create($request->validate([\n // specifyy validation rules to answer body\n 'body' => 'required'\n ]) + ['user_id' => \\Auth::id()]);\n\n if($request->expectsJson()){\n return response()->json([\n 'message' => \"Your answer has been submited succesfully\",\n 'answer' => $answer->load('user')\n ]);\n }\n\n // back to previous page\n return back()->with('success', \"Your answer has been submitted successfully\");\n\n }", "static function createWithData($questionData)\n {\n return new QuestionValueObject($questionData[QuestionQueries::ID_FIELD], $questionData);\n }", "public function createQuestion($questionnaire)\n {\n return view('admin.questions.create')->with('questionnaire', $questionnaire);\n }", "public function store(QuestionRequest $request)\n\t{\n\t\tQuestion::create($this->questionRepository($request));\n flash('Create question success!', 'success');\n return redirect('admin/questions');\n\t}", "public function create()\n {\n $animals = Animal::all();\n $ani = [];\n foreach ($animals as $animal) {\n $ani[$animal -> animal_id] = $animal -> animal_name;\n }\n\n $worksheets = Worksheet::all();\n $works = [];\n foreach ($worksheets as $worksheet) {\n $works[$worksheet -> worksheet_id] = $worksheet -> worksheet_name;\n }\n\n $descriptions = Question_description::all();\n $descrip = [];\n foreach ($descriptions as $description) {\n $descrip[$description -> description_id] = $description -> description;\n }\n\n\n return view('pages/data_manage/question/create') -> withAni($ani) \n -> withAnimals($animals)\n -> withWorks($works)\n -> withDescrip($descrip);\n }", "public function create()\n {\n $tags = QuestionTag::allTags();\n \n return view('questions.create', compact('tags'));\n }", "public function getPostCreateQuestion()\n {\n $title = \"Ask Question\";\n $view = $this->di->get(\"view\");\n $pageRender = $this->di->get(\"pageRender\");\n $user = $this->di->get(\"authHelper\")->getLoggedInUser();\n\n if (!$user) {\n $this->di->get(\"response\")->redirect(\"user/login\");\n }\n\n $form = new QuestionForm($this->di);\n $form->check();\n $view->add(\"comment/question-form\", [\"form\" => $form->getHTML([\"use_buttonbar\" => false])]);\n return $pageRender->renderPage([\"title\" => $title]);\n }", "private function addQuestion() : void\n {\n $question = $this->console->ask(__('Type your question'));\n\n $this->console->info('Question successfully added ');\n\n $answer = $this->console->ask(__('Type your answer'));\n\n $this->console->info('Answer successfully added ');\n\n $this->questionRepository->create([\n 'question' => $question,\n 'valid_answer' => $answer,\n ]);\n }", "public function create()\n {\n $questionData = getQuestionsData(); //Helper function in app\\Support\\helpers.php\n $numberAnswers = $questionData[0];\n $typeKeys = $questionData[1];\n $typeValues = $questionData[2];\n \n return view('questions.create', compact('typeKeys', 'typeValues', 'numberAnswers')); \n }", "public function create()\n {\n //\n $this->authorize('create', Question::class);\n $quizzes= Quiz::all();\n return view('question.create' compact('quizzes'));\n\n }", "public function create()\n {\n $entityClassName = $this->getEntityClassName();\n return $entityClassName::create($this, null);\n }", "public function actionCreate($question_id, $survey_id)\n //$survey_id ist notwendig, um auf die Survey zurückzukommen, für die man die Answer erstellt hat.\n {\n $model = new Answer();\n\n //Die Question holen, die im survey/view erstellungsformular erstellt wurde.\n $question = Question::find()->where(['id'=>$question_id]);\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n\n $model->link('questions', $question->one());\n return $this->redirect(['survey/view/', 'id' => $survey_id]);\n\n } else {\n return $this->render('create', ['id'=>$question_id,\n 'model' => $model,\n ]);\n }\n\n }", "public function store(Question $question, Request $request)\n {\n $question->answers()->create([\n 'body'=>$request->body,\n 'user_id'=>auth()->id()\n ]);\n session()->flash('success', 'Your answer has been submitted successfully');\n return redirect($question->url);\n }", "public static function create($instantquiz) {\n $entity = new static($instantquiz, new stdClass());\n $entity->update();\n $instantquiz->summary->entity_updated($entity);\n return $entity;\n }", "public function create()\n {\n $quest = Quest::make();\n\n return view('system.quests.create', compact('quest'));\n }", "public function createAnswer()\n {\n $this->is_answer = true;\n $this->topic->is_answered = true;\n $post = $this;\n\n Db::transaction(function() use ($post)\n {\n $post->topic->save();\n $post->save();\n });\n }", "public function getQuestion()\n {\n return $this->hasOne(Question::className(), ['id' => 'question_id']);\n }", "protected function create()\n {\n return new $this->entityClass();\n }", "public function store(CreateQuestionRequest $request)\n {\n// dd(dd($request['chapter_id']));\n $question = $this->questionRepository->saveRecord($request);\n\n Flash::success($this->BreadCrumbName . ' saved successfully.');\n if (isset($request->continue)) {\n $redirect_to = redirect(route('admin.questions.create'));\n } elseif (isset($request->translation)) {\n $redirect_to = redirect(route('admin.questions.edit', $question->id));\n } else {\n $redirect_to = redirect(route('admin.questions.index'));\n }\n return $redirect_to->with([\n 'title' => $this->BreadCrumbName\n ]);\n }", "public function create()\n {\n if(!Auth::user()->is_admin == 1){\n abort(404, 'Page not found');\n }\n return view('Question.create');\n }", "public function store(Request $request)\n {\n $question = $request->isMethod('put') ? Questions::findOrFail($request->id) : new Questions;\n\n $question->id = $request->input('id');\n $question->help_link = ($request->input('help_link')) ? $request->input('help_link') : null;\n $question->question = $request->input('question');\n $question->correct_answers = $request->input('correct_answers');\n $question->incorrect_answers = $request->input('incorrect_answers');\n $question->correct_answer_id = $request->input('correct_answer_id');\n $question->answers = json_encode($request->input('answers'));\n\n if($question->save()) {\n return $question;\n }\n }", "public function setQuestion(Question $question) {\n $this->question = $question;\n }", "public function create_question($title, $uid, $cid, $body) {\n\t\t$date = date('Y/m/d H:i:s');\n\t\t$this -> db -> set('title', $title);\n\t\t$this -> db -> set('userID', $uid);\n\t\t$this -> db -> set('catID', $cid);\n\t\t$this -> db -> set('body', $body);\n\t\t$this -> db -> set('date', $date);\n\t\t$this -> db -> insert('Question');\n\t\treturn $this -> db -> insert_id();\n\t}", "public function create()\n {\n return view('admin/question/create');\n }", "public static function create($entity = '')\n\t{\n\t\t$entityObject = '\\\\model\\\\orm\\\\'.$entity;\n\n\t\treturn new $entityObject;\n\t}", "abstract protected function createEntityInstance();", "public function store($project, CreateQuestionRequest $request)\n {\n $this->questions->create(\n\t\t\t$request->all(),\n\t\t\t$project\n\t\t);\n return redirect()->route('admin.project.questions.editall', $project->id)->withFlashSuccess('The question was successfully created.');\n }" ]
[ "0.67175484", "0.6595779", "0.653075", "0.6518785", "0.6476724", "0.6460611", "0.64417386", "0.63186795", "0.62209773", "0.6218059", "0.62168354", "0.6215891", "0.61377543", "0.61208373", "0.6119039", "0.6103654", "0.6059059", "0.6057713", "0.60453874", "0.6032496", "0.60298854", "0.6025214", "0.6023882", "0.5974657", "0.5961689", "0.5937926", "0.5920484", "0.591212", "0.5910893", "0.588216", "0.5858832", "0.5857747", "0.58533937", "0.5838273", "0.58279824", "0.5825525", "0.58129835", "0.57991034", "0.57902306", "0.57865894", "0.576517", "0.5762038", "0.5762038", "0.5762038", "0.5723207", "0.5716305", "0.5716305", "0.5680629", "0.56778586", "0.5667201", "0.5659883", "0.56474847", "0.5637977", "0.5635663", "0.5632631", "0.5627731", "0.5626485", "0.5626016", "0.5625934", "0.56199104", "0.5616107", "0.5611517", "0.5608544", "0.5601438", "0.55955666", "0.5594945", "0.55886614", "0.5584394", "0.5563897", "0.55610156", "0.5553894", "0.55498385", "0.55497086", "0.55473524", "0.55418056", "0.55389196", "0.5538609", "0.55306655", "0.5520259", "0.55160403", "0.55022913", "0.5492953", "0.54889023", "0.54879177", "0.5485287", "0.5481927", "0.5468873", "0.54578316", "0.5449058", "0.54439867", "0.5437935", "0.54374486", "0.5433102", "0.5432305", "0.5427109", "0.54246175", "0.5419086", "0.5414601", "0.5414521", "0.541273" ]
0.79714626
0
initialisation before display widget
private function init() { try { $this->customer->authOrRegisterCustomer(); if (!$this->customer->isTokenExists()) { $this->error = true; } } catch (\Exception $e) { $this->error = true; $this->logger->error('IWD C2Q issue: ' . $e->getMessage()); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function init(){\n /*you can set initial default values and other stuff here.\n * it's also a good place to register any CSS or Javascript your\n * widget may need. */ \n }", "public function init()\n {\n // Initialize widget.\n }", "public function init() {\n\t\t$this->_helper->layout->disableLayout();\n\t\t$this->_helper->viewRenderer->setNeverRender();\n\t}", "public function init()\r\n {\r\n parent::init();\r\n $this->visible = true;\r\n $this->descriptionashint = true;\r\n $this->active = false;\r\n }", "public function init() {\n $this->_renderLayout = 0;\n }", "public function init() {\n $this->_helper->layout()->disableLayout(); \n $this->_helper->viewRenderer->setNoRender(true);\n }", "public function init()\n {\n \t$this->_helper->viewRenderer->setNoRender(true);\n \t$this->_helper->layout->disableLayout();\n }", "function init() {\n\t\t\n\t\tparent::init();\n\t}", "public function init()\n {\n $this->_helper->viewRenderer->setNoRender(true);\n $this->_helper->layout->disableLayout(); \n }", "public function init()\n {\n $this->_helper->viewRenderer->setNoRender();\n $this->_helper->getHelper('layout')->disableLayout();\n $this->getHelper('viewRenderer')->setNoRender(true);\n }", "public function init() {\n $menu = \"<li><a href=\\\" /eu-type-acteur/new \\\">Nouveau</a></li>\";\n $this->view->placeholder(\"menu\")->set($menu);\n $this->view->jQuery()->enable();\n $this->view->jQuery()->uiEnable(); \n }", "function init()\r\n\t\t{\r\n\t\t\t// Should always call parent's init\r\n\t\t\tparent::init();\r\n\t\t}", "function init() {\n\t\t\t$this->showHeaders();\n\n\t\t\t// Display the CSS content\n\t\t\t$this->createContent();\n\t\t\t$this->showContent();\n\t\t}", "public function init() {\n $menu = \"<li><a href=\\\" /eu-zone/new \\\">Ajouter zone</a></li>\";\n $this->view->placeholder(\"menu\")->set($menu);\n $this->view->jQuery()->enable();\n $this->view->jQuery()->uiEnable();\n }", "protected function init()\n {\n $this->setTitle('core_layout.edit_layout');\n $this->addElement([\n 'plugin' => 'hidden',\n 'name' => 'base_script',\n 'value' => 'view'\n ]);\n $this->addElement([\n 'plugin' => 'hidden',\n 'name' => 'item_script',\n 'value' => 'view',\n ]);\n }", "public function init() {\n\t\tAnnuaire_User::mustBeConnected();\n\t\t$this->view->setLayout(\"default\");\n\t\t$this->view->addLayoutVar(\"onglet\", 4);\n\t}", "public function init()\n {\n // $this->_helper->layout->setLayout('userarea');\n }", "public function init(){\n parent::init();\n $this->_editor = $this->_helper->layoutEditor();\n }", "function init()\n\t{\n\t\t// Ghetto fix for formText problem\n\t\t$this->view->addHelperPath(ROOT_DIR . '/library/Zarrar/View/HelperFix', 'Zarrar_View_HelperFix');\n\t\t\n\t\t// Disable header file\n\t\t$this->view->headerFile = '_empty.phtml';\n\t\t\n\t\t// Add stylesheet for table\n\t\t$this->view\n\t\t\t->headLink()\n\t\t\t->appendStylesheet(\"{$this->view->dir_styles}/oranges-in-the-sky.css\");\n\t\t\t\n\t\t// Instantiate table for later usage\n\t\t$this->_table = new Study();\n\t}", "public function init()\n {\n \t$this->view->layout = array();\n }", "public function init(){\n parent::init();\n $this->registerAssets();\n \n echo CHtml::openTag(\"div\", $this->getContainerOptions());\n echo CHtml::openTag(\"div\", $this->getInnerContainerOptions());\n echo CHtml::openTag(\"div\", $this->getContentOptions());\n }", "function onReady() {\n\t\t$this->text = $this->config->text;\n\t\tif (empty($this->text))\n\t\t\t$this->text = \"initial settings| set this widget | /admin set headsup\";\n\t\t\n\t\t$this->url = $this->config->url;\n\t\tif (empty($this->url))\n\t\t\t$this->url = \"\";\n\t\t\n\t\t$this->width = $this->config->width;\n\t\tif (empty($this->width))\n\t\t\t$this->width = 50;\n\t\t\n\t\t$this->pos = $this->config->pos;\n\t\tif (empty($this->pos))\n\t\t\t$this->pos = \"80,-85\";\n\t\t\n\t\tforeach ($this->storage->players as $login => $player) {\n\t\t\t$this->showWidget($login);\n\t\t}\n\t\tforeach ($this->storage->spectators as $login => $player) {\n\t\t\t$this->showWidget($login);\n\t\t}\n\t}", "protected function _init()\n\t{\n\t\tparent::_init();\n\t}", "public function customize_controls_init()\n {\n }", "function init()\n {\n\n $elements = array(\n 'page_id' => array('hidden')\n , 'name' => array('text', array('label' => 'Name', 'options' => array('StringLength' => array(false, array(1, 50)),), 'filters' => array('StringTrim'), 'required' => true))\n , 'title' => array('text', array('label' => 'Title', 'options' => array('StringLength' => array(false, array(4, 255)),),'filters' => array('StringTrim'), 'required' => true))\n , 'meta' => array('text', array('label' => 'meta', 'options' => array('StringLength' => array(false, array(4, 255))), 'filters' => array('StringTrim'),))\n , 'description' => array('textarea',array('label' => 'description', 'attribs' => array('rows' => 2), 'filters' => array('StringTrim'), 'required' => true))\n , 'body' => array('textarea',array('label' => 'body', 'attribs' => array('rows' => 7), 'filters' => array('StringTrim'), 'required' => true))\n );\n $this->addElements($elements);\n\n // --- Groups ----------------------------------------------\n $this->addDisplayGroup(array('name','title', 'meta'), 'display-head', array('legend'=>'display-head'));\n $this->addDisplayGroup(array('description', 'body'), 'display-body', array('legend'=>'display-body'));\n parent::init();\n }", "private function initializeWidgetContext() {}", "public function init()\n {\n $this->fillFromConfig([\n 'columns',\n 'model',\n 'recordUrl',\n 'recordOnClick',\n 'noRecordsMessage',\n 'showPageNumbers',\n 'recordsPerPage',\n 'showSorting',\n 'defaultSort',\n 'showCheckboxes',\n 'showSetup',\n 'showTree',\n 'treeExpanded',\n 'showPagination',\n 'customViewPath',\n ]);\n\n /*\n * Configure the list widget\n */\n $this->recordsPerPage = $this->getSession('per_page', $this->recordsPerPage);\n\n if ($this->showPagination == 'auto') {\n $this->showPagination = $this->recordsPerPage && $this->recordsPerPage > 0;\n }\n\n if ($this->customViewPath) {\n $this->addViewPath($this->customViewPath);\n }\n\n $this->validateModel();\n $this->validateTree();\n }", "public function startup() {\n parent::startup(); \n self::renderShow(); \n }", "public function init()\r\n {\r\n $this->visible=true;\r\n $this->descriptionashint=true;\r\n $this->locked=false;\r\n $this->maxdepth=3;\r\n $this->sortposition=0;\r\n }", "public function init()\n\t{\n\t\tparent::init();\n\t}", "public function init()\n\t{\n\t\tparent::init();\n\t}", "public function init()\r\n {\r\n \tparent::init();\r\n }", "public function init()\n {\n \t$this->_helper->layout()->setLayout('admin');\n }", "public function __construct() {\n // 表示部分で使うオブジェクトを作成\n $this->initDisplayObj();\n }", "public function init()\n {\n parent::init();\n \n $this->_autoId = CMyHtml::genID();\n $this->_idPrefix = self::$autoIdPrefix.'_'.CMyHtml::getIDPrefix();\n \n if (empty($this->logoUrl)) {\n $urlRoot = \\common\\helpers\\Utils::getRootUrl();\n $this->logoUrl = \"{$urlRoot}assets/images/logo/yikazc_black.png\";\n }\n \n if (!isset($this->titleOptions) || empty($this->titleOptions)) {\n $this->titleOptions = ['style'=>\"font-size:14px\"];\n }\n if (!isset($this->subTitleOptions) || empty($this->subTitleOptions)) {\n $this->subTitleOptions = [];\n }\n }", "public function init()\n {\n parent::init();\n }", "public function init()\n {\n parent::init();\n }", "public function init()\n {\n parent::init();\n }", "public function init()\n {\n parent::init();\n }", "public function init()\n {\n parent::init();\n }", "public function init()\n {\n parent::init();\n }", "public function init()\n {\n parent::init();\n }", "public function __construct(){\n // 表示部分で使うオブジェクトを作成\n $this->initDisplayObj();\n }", "public function init() {\n\n //set title\n $this->title = get_string('dd_content', 'block_dd_content');\n\n }", "public function init() {\r\n parent::init();\r\n }", "public function init() {\n\t\tparent::init();\n\t}", "public function init() {\n parent::init();\n }", "public function init() {\n parent::init();\n }", "public function init() {\n parent::init();\n }", "public static function init()\n {\n add_action( 'widgets_init', array(__CLASS__, 'register') );\n }", "public function init() {\n\t\tAnnuaire_User::mustBeConnected();\n\t\t$this->view->setLayout('default');\n\t}", "public function initLayout();", "function initialize() {\n\t\t$this->number = 1;\n\t\t$this->post_types = array();\n\t\t$this->widget_form_fields = array();\n\n\t\tadd_action( 'add_meta_boxes', array( $this, 'add_meta_boxes' ) );\n\t\tadd_action( 'save_post', array( $this, 'save_widget_post_meta' ), 10, 3 );\n\t}", "public static function init () : void\n {\n add_action(\"widgets_init\", function ()\n {\n self::unregister_widget();\n self::register_widget();\n self::register_sidebar();\n });\n }", "public function init()\r\n {\r\n parent::init();\r\n }", "protected function onInit() {}", "public function init() {\n parent::init();\n $this->layout = 'static';\n }", "public function init() {\n $this->view = Zend_Registry::get('view');\n $this->translate = Zend_Registry::get('Zend_Translate');\n $this->db = Zend_Db_Table::getDefaultAdapter();\n $this->_helper->layout->disableLayout();\n }", "public function init() {\n \t$this->view = Zend_Registry::get('view');\n \t$this->translate = Zend_Registry::get('Zend_Translate');\n \t$this->db = Zend_Db_Table::getDefaultAdapter();\n \t$this->_helper->layout->disableLayout();\n }", "public function init()\n {\n $this->getHelper('layout')->setLayout('manage-layout');\n }", "protected function initialize()\n {\n $this->viewData['list_sb'] = $this->list_sb = SkeletalBone::orderBy('name', 'asc')->pluck('name', 'id');\n $this->viewData['list_side'] = $this->list_side = SkeletalElement::$side;\n $this->viewData['list_completeness'] = $this->list_completeness = SkeletalElement::$completeness;\n $this->viewData['list_lab'] = $this->list_lab = Lab::where('type', 'Isotope')->get()->pluck('full_name', 'id');\n $this->viewData['list_status'] = $this->list_status = IsotopeBatch::$status;\n $this->viewData['batchStatus'] = $this->batchStatus = 'Open';\n $this->viewData['initialshow'] = $this->initialshow = false;\n }", "function init()\n\t{\n $this->defineAttribute('ajaxController', false, 'org.glizycms.contents.controllers.autocomplete.ajax.PagePicker', COMPONENT_TYPE_STRING);\n $this->defineAttribute('type', false, '', COMPONENT_TYPE_STRING);\n $this->defineAttribute('protocol', false, '', COMPONENT_TYPE_STRING);\n $this->defineAttribute('makeLink', false, false, COMPONENT_TYPE_BOOLEAN);\n\t\t$this->defineAttribute('multiple',\tfalse, \tfalse,\tCOMPONENT_TYPE_BOOLEAN);\n $this->defineAttribute('queryString', false, __Config::get('glizycms.pagePicker.queryStringEnabled'), COMPONENT_TYPE_BOOLEAN);\n\t\tparent::init();\n\n\t}", "public function init() {\n\t\t\\Yii::trace(__METHOD__.'()', 'sweelix.yii1.admin.core.widgets');\n\t\tob_start();\n\t}", "function init()\r\n \t{\r\n \t}", "public function init()\n\t{\n\t\tparent::init();\n\n\t\tif(isset($this->buttons['view']) && isset($this->viewButtonVisible))\n\t\t\t$this->buttons['view']['visible']=$this->viewButtonVisible;\n\t\tif(isset($this->buttons['update']) && isset($this->updateButtonVisible))\n\t\t\t$this->buttons['update']['visible']=$this->updateButtonVisible;\n\t\tif(isset($this->buttons['delete']) && isset($this->deleteButtonVisible))\n\t\t\t$this->buttons['delete']['visible']=$this->deleteButtonVisible;\n\t}", "public function init(){\n\t\t$this->_helper->layout->setLayout('layout_login');\n\t}", "public function init(){ // функция инициализации - ВЫПОЛНЯЕТСЯ ПЕРВОЙ!. Если данные не будут переданы в компонент, то он выведет текст \"Текст по умолчанию\"\n\t\tparent::init(); //...ОБЯЗАТЕЛЬНО В НАЧАЛЕ...\n\t\t$this->content= 'Текст по умолчанию';\n\t}", "public function init()\n {\n // set class to identify as p4cms-ui component\n $this->setAttrib('class', 'p4cms-ui')\n ->setAttrib('dojoType', 'p4cms.ui.grid.Form');\n\n // turn off CSRF protection - its not useful here (form data are\n // used for filtering the data grid and may be exposed in the URL)\n $this->setCsrfProtection(false);\n\n // call parent to publish the form.\n parent::init();\n }", "protected function initialize() {\n\t add_action( 'widgets_init' , array( $this , 'register_widgets' ) );\n\t $this->add_hooks_and_filters();\n }", "public function initialize()\n {\n //$this->view->setTemplateBefore('public');\n }", "public function init() {\r\n\t\t\\Yii::trace(__METHOD__.'()', 'sweelix.yii1.admin.core.widgets');\r\n\t\tob_start();\r\n\t}", "protected function init()\n {\n $this->autoRefresh = $this->createAutoRefreshSetting();\n\n // User setting --> textbox converted to int defining a validator and filter\n $this->refreshInterval = $this->createRefreshIntervalSetting();\n\n // User setting --> radio\n $this->color = $this->createColorSetting();\n }", "public function customize_preview_init()\n {\n }", "public function customize_preview_init()\n {\n }", "public function init() {\n\t\tparent::init();\n\t\t$this->add_tooltip( 'autofill_list_row_count', sprintf(\n '<h6>%s</h6> %s',\n __( 'Sync Field Value' ),\n __( 'Insert the field ID of a list field on this form. When the number of rows is modified in the list, the value of this field will be autoupdated to match the number of rows.' )\n ) );\n\n add_action( 'gform_field_advanced_settings', array( $this, 'add_setting' ), 10, 2 );\n\n add_action( 'gform_editor_js', array( $this, 'field_settings_js' ) );\n\n add_filter( 'gform_pre_render', array( $this, 'sync_fields' ) );\n\n\t}", "public function init()\n {\n //$this->view->checkaclresource('0','0',0); // Just for initiallization for helper call\n }", "public function init_preview()\n {\n }", "public function initDisplay(){\n\t\tif (!$this->getPage()){\n\t\t\tif (\\Settings::DISPLAY_BREADCRUMB) Front::displayBreadCrumb($this->breadCrumb, $this->version);\n\t\t\t$this->mainDisplay();\n\t\t}\n\t}", "public function init()\r\r\n {\r\r\n // -------------------------\r\r\n $modelMetier = new Model_DbTable_Metiers();\r\r\n $metiers = $modelMetier->getDatas();\r\r\n $this->view->metiers = $metiers;\r\r\n \r\n // Get notre entreprise text\r\n // ----------------------\r\n $model = new Model_DbTable_Vitrine();\r\n $txtEntreprise = $model->getDatas('notre-entreprise');\r\n $this->view->txtEntreprise = $txtEntreprise;\r\r\n }", "public function init()\n {\n parent::init();\n }", "protected function __onInit()\n\t{\n\t}", "function initialize() {\r\n add_filter(\"slp_widget_default_options\", array($this, \"options\"));\r\n add_filter(\"slp_widget_get_settings\" , array($this, \"getSettings\"));\r\n\r\n $this->settings_array = apply_filters(\"slp_widget_default_options\", array());\r\n foreach ($this->settings_array as $setting => $setto) {\r\n $this->$setting = $setto;\r\n }\r\n }", "public function initialize()\n {\n $this->initializeUI(['layout' => false]);\n $this->loadHelper('Text');\n $this->loadHelper('Paginator');\n $this->loadHelper('Menu');\n }", "public function initialize()\n {\n // set base template\n $this->view->setTemplateBefore('default');\n }", "public function init() {\n\t\t//theme needs to be set TWO times...\n\t\t$theme = Session::get(\"theme\"); if(!$theme) {$theme = \"main\";}SSViewer::set_theme($theme);\n\t\tparent::init();\n\t\tif($theme == \"main\") {\n\t\t\t$this->addBasicMetatagRequirements();\n\t\t}\n\t\t$theme = Session::get(\"theme\"); if(!$theme) {$theme = \"main\";}SSViewer::set_theme($theme);\n\t}", "public function preinit()\n\t{\n\t\t//\tCreate our internal name\n\t\tCPSHelperBase::createInternalName( $this );\n\n\t\t//\tAttach our default Behavior\n\t\t$this->attachBehavior( 'psWidget', 'pogostick.behaviors.CPSWidgetBehavior' );\n\t}", "public function init()\n {\n\t\t$this->view->titleBrowser = 'e-Transporte';\n }", "function init() {\n $this->add(\\JQuery::JS);\n $this->add(\\Bootstrap::JS);\n $this->add(\\JQuery::CONFIG);\n $this->add(\\JQuery::UI);\n $this->add(\\JQuery::INHERIT);\n $this->add(\\JQuery::TIMER);\n $this->addComponent(\\Dialog::OBJECT);\n $this->addComponent(\\Notificator::OBJECT);\n $this->addComponent(\\Tooltip::OBJECT);\n $this->addComponent(\\Form::OBJECT);\n $this->addComponent(\\Grid::OBJECT);\n $this->addComponent(\\Tabs::OBJECT);\n $this->addComponent(\\Wizard::OBJECT);\n $this->addComponent(\\TimelineAbstract::OBJECT);\n $this->addComponent(\\Chart::OBJECT);\n// $this->addComponent(\\Schedule::OBJECT);\n\n $this->disableCache();\n }", "public function init()\n {\n parent::init();\n\n // Retrieving a field from the controller container and layout into this view.\n $this->add($this->fieldCtrl->getField('label'));\n }", "public function init()\n {\n \t$this->view->headTitle('Produktgruppen');\n\t\t$this->db = Zend_Registry::get('db');\n\t\t$this->logger = Zend_Registry::get('logger');\n }", "function widget_setup(){\n\n\t\treturn false;\n\t}", "protected function _init()\r\n\t{\r\n\t}", "function init() {\n if ($this->_init === false) {\n $this->_init = true;\n $this->doInit();\n }\n }", "protected function init()\n\t{\n\t\t\n\t}", "protected function init() {return;}", "public function initialize()\n {\n\t\tparent::initialize();\n\t\t$this->viewBuilder()->layout('admin');\n\t\t\n }", "public function init() {\n $auth = Zend_Auth::getInstance()->setStorage(new Zend_Auth_Storage_Session('admin'));\n $user = $auth->getIdentity();\n if ($user->code_groupe == 'admin' || $user->code_groupe == 'acteur') {\n $menu = '<li><a id=\"new\" href=\"/eu-acteur/new\">Nouveau</a></li>\n <li><a id=\"detail\" href=\"/eu-acteur/index\">Listes des acteurs</a></li>';\n }\n $this->view->placeholder(\"menu\")->set($menu);\n $this->view->jQuery()->enable();\n $this->view->jQuery()->uiEnable();\n }", "public function init()\n\t{\n\t\t$this->_helper->layout()->setLayout('home');\n\t}", "function init()\n {\n $this->defineAttribute('label', true, '', COMPONENT_TYPE_STRING);\n $this->defineAttribute('routeUrl', false, '', COMPONENT_TYPE_STRING);\n $this->defineAttribute('add', false, 'Nuova scheda', COMPONENT_TYPE_STRING);\n $this->defineAttribute('cssClass', false, '', COMPONENT_TYPE_STRING);\n $this->defineAttribute('buttonId', false, '', COMPONENT_TYPE_STRING);\n $this->defineAttribute('noLink', false, false, COMPONENT_TYPE_STRING);\n $this->defineAttribute('iconClass', false, 'fa-plus', COMPONENT_TYPE_STRING);\n\n parent::init();\n }", "function init() {\r\n }", "function init(){\r\n\t}" ]
[ "0.8038108", "0.79408723", "0.7734218", "0.76707816", "0.7632561", "0.7529181", "0.7519995", "0.7433649", "0.7430465", "0.7390821", "0.72944224", "0.7290649", "0.72441787", "0.7222113", "0.7180824", "0.717235", "0.71713465", "0.7110915", "0.7098315", "0.7078481", "0.70604265", "0.7042025", "0.7033306", "0.70229614", "0.7021423", "0.70131415", "0.7008593", "0.7005188", "0.7005173", "0.7002567", "0.7002567", "0.6982085", "0.69798243", "0.69638425", "0.69538695", "0.6944992", "0.6944992", "0.6944992", "0.6944992", "0.6944992", "0.6944992", "0.6944992", "0.69357026", "0.69353545", "0.6926025", "0.69256085", "0.6925421", "0.6925421", "0.6925421", "0.6924734", "0.69169587", "0.6915484", "0.6911748", "0.6908927", "0.69043344", "0.68955535", "0.6890535", "0.68901986", "0.6884362", "0.6870212", "0.6870079", "0.68616796", "0.6852752", "0.6852159", "0.6851565", "0.68344235", "0.6819317", "0.6809264", "0.68082285", "0.6807851", "0.68068236", "0.6800638", "0.67899626", "0.6788866", "0.6785031", "0.67821634", "0.6753829", "0.6751068", "0.67507315", "0.6737912", "0.6734443", "0.673188", "0.67227906", "0.6720484", "0.6714057", "0.67119205", "0.67041016", "0.67023915", "0.66992956", "0.66947174", "0.66843337", "0.6682118", "0.6676185", "0.6675675", "0.6675305", "0.6661263", "0.6660068", "0.66541266", "0.6653859", "0.66475976", "0.66401464" ]
0.0
-1
Constructor open DB connection
function __construct() { $conf = json_decode(file_get_contents('configuration.json'), TRUE); $this->db = new mysqli($conf["host"], $conf["user"], $conf["password"], $conf["database"]); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function __construct() {\n $this->open_db_connection();\n }", "function __construct() {\n $this->open_db_connection();\n }", "function __construct() {\n\n\t\t$this->open_db_connection();\n\n\t}", "function __construct(){\r\n\t\t\t$this->open_db_connection();\r\n\t\t}", "function __construct(){\n\t\t$this->open_db_connection();\n\t}", "public function __construct()\n {\n $this->_dbInstance = Database::getInstance();\n $this->_dbHandle = $this->_dbInstance->getConnection();\n }", "public function __construct() {\n $db = new Connection();\n $this->conn = $db->connect();\n }", "function __construct(){\n $this->open_db_connection();\n }", "protected function openConn() {\n $database = new Database();\n $this->conn = $database->getConnection();\n }", "public function __construct()\n {\n $this->db = ConnectionClass::conn();\n }", "protected function openConn()\n {\n $database = new Database();\n $this->conn = $database->getConnection();\n }", "function __construct(){\n //call open connection\n $this->open_db_connection();\n\n }", "public function __construct(){\n $database = new Database();\n $db = $database->getConnection();\n \n $this->conn = $db;\n }", "public function __construct( )\n {\n $this->openConnection();\n }", "function __construct() {\n $this->open_connection();\n }", "public function __construct(){\n\t\t$database = new Database();\n\t\t$db = $database->getConnection();\n $this->conn = $db;\n }", "private function __construct(){\n\t\t$this->connection = new Connection();\n\t\t$this->connection\n\t\t\t->setHost(Stack::getInstance()->get('db_host'))\n\t\t\t->setUser(Stack::getInstance()->get('db_user'))\n\t\t\t->setPassword(Stack::getInstance()->get('db_pass'))\n\t\t\t->setDatabase(Stack::getInstance()->get('db_table'))\n\t\t\t->connect();\n\t}", "public function __construct() {\n $this->_db = DB::connect();\n }", "public function __construct(){\n $this->open_db();\n }", "public function __construct(){\n\t\t\trequire_once(\"db/db.php\");\n\t\t\t$db = new DbConnect();\n\t\t\t$this->dbConn = $db->connect();\n\t\t}", "public function __construct(){\n $database = new Database();\n $db = $database->getConnection();\n $this->conn = $db;\n }", "public function __construct(){\n $database = new Database();\n $db = $database->getConnection();\n $this->conn = $db;\n }", "public function __construct()\n {\n $this -> connection = $this ->connecdatabase();\n }", "public function __construct()\r\n\t\t{\r\n\t\t\t$this->Connec = DBConnexion::getInstance();\r\n\t\t}", "public function __construct() {\n // Making a connection with the database\n $database = new Database();\n $this->conn = $database->getConnection();\n }", "public function __construct() {\r\n $this->conn = PersistentManager::getInstance()->get_connection();\r\n }", "function __construct() {\n $connector = new DbConnection();\n $conn = $connector->connect(); \n }", "function __construct() {\n $this->createConnection();\n }", "public function __construct()\n {\n $this->db = DataBase::dbConnect();\n }", "public function __construct(){\r\n\r\n $db = new DB;\r\n\r\n $this->db = $db->get_connection();\r\n\r\n }", "public function __construct()\n {\n $dbInstance= Database::getInstance();\n $this->db= $dbInstance->getdbConnection();\n }", "function __construct(){\r\n try {\r\n $this->openconnection();\r\n }catch(\\PDOException $e){\r\n exit('Database connection could not be started.');\r\n }\r\n }", "function __construct() {\n require_once dirname(__FILE__) . '/DBConnect.php';\n\n //Creating a DbConnect object to connect to the database\n $db = new DbConnect();\n\n //Initializing our connection link of this class\n //by calling the method connect of DbConnect class\n $this->con = $db->connect();\n }", "function __construct(){\n $this->_db = (new DataBaseServices())->connect();\n }", "public function __construct() {\n // get datbase settings\n include \"settings/db.php\";\n\n try {\n // create database object\n $this->_db = new DBAccess ($dsn, $username, $password);\n } catch (PDOException $e) {\n die (\"Unable to connect to database, \" . $e->message());\n }\n }", "public function __construct() {\n // Making a connection with the database\n $database = new Database();\n $this->conn = $database->getConnection();\n }", "private function openDb() {\n if(!$this->db) {\n $this->db = new Db();\n }\n }", "public function __construct(){\n\t\t$this->db = new Connection();\n\t\t$this->db = $this->db->dbConnect();\n\t}", "function __construct()\r\n {\r\n $this->_dbh = $this->connect();\r\n }", "public function __construct() {\n $this->connection = $this->create_connection();\n }", "function __construct(){\n $this->open_connection();\n }", "function __construct(){\n require_once dirname(__FILE__) . '/DBConnect.php';\n $db = new DbConnect;\n $this->con = $db->connect();\n }", "function __construct()\n {\n $this->_dbh = $this->connect();\n }", "function __construct()\n\t\t{\n\t\t\t$this->connection = Connection::database();\n\t\t}", "public function __construct(){\r\n\r\n // Create connection with data base\r\n $this->_db = DB::get_Instance();\r\n }", "function __construct() {\r\n\t\t\r\n\t\tglobal $useDB, $dbTable;\r\n\t\t\r\n\t\t$this->ok = false;\r\n\t\tif( !$useDB ) return;\r\n\t\t\r\n\t\t$this->table = $dbTable;\r\n\t\t$this->state = 0;\r\n\t\t$this->connect();\r\n\t}", "public function __construct()\n\t{\n\t\t$db = new DBclass();\n\t\t$this->_con = $db->con;\n\t}", "function __construct()\n\t\t{\n\t\t\t$this->conn = $this->connect();\n\t\t}", "function __construct() {\n\t\t\trequire_once __DIR__ . '/db_connect.php';\n\t\t\t// connecting to db\n\t\t\tself::$connection = new DB();\n\t\t}", "final public function __construct() {\n\t\t//lets start by connecting to the db\n\t\t$conn = new Database;\n\t\t$this->_dbh = $conn->connect();\n\n\t\tif (!$this->_dbh) {\n\t\t\t$db_response = $conn->getResponse();\n\t\t\t$this->setError($db_response['reason']);\n\t\t\t$this->_dbh = null;\n\t\t}\n\t\t$conn = null;\n\t}", "function __construct() {\r\n\t\t$this->connBanco = new Db();\r\n\t}", "private function __construct() {\r\n $this->dbName = self::$_dbname;\r\n $this->username = self::$_username;\r\n $this->password = self::$_password;\r\n $this->hostname = self::$_hostname; \r\n\t return $this->connect();\r\n }", "public function __construct() {\n \trequire_once 'connection.php';\n\n $database = new Connection();\n\t\t$this->database = $database;\n }", "function __construct()\n {\n $con_obj = new ConnectionClass();\n $this->con = $con_obj->getConnection();\n }", "public function __construct(){\n //get the configuration for connection to database\n $data_base_opt = System\\Config::get_instance()->get_database_config();\n // receiving object for working with database\n $this->database = System\\Safe_SQL::get_instance($data_base_opt);\n }", "public function __construct()\n\t{\n\t\t$this->_connexion = Db::getInstance();\n\t\t// var_dump($connexion);\n\t}", "function __construct() {\n require_once 'DB_Connect.php';\n // connecting to database\n try{\n $this->db = DB_Connect::connect();\n }catch(Exception $e)\n {\n die($e->getMessage());\n }\n \n \n }", "function __construct()\n {\n $this->createConnection();\n\n }", "public function __construct($db) {\n $this->conn = $db;\n }", "function __construct()\n {\n $this->_db = DB::getInstance();\n }", "public function __construct($db)\n {\n $this->conn = $db;\n }", "public function __construct($db)\n {\n $this->conn = $db;\n }", "public function __construct($db)\n {\n $this->conn = $db;\n }", "public function __construct() {\n $this->db = new Database();\n $this->con = $this->db->connect();\n }", "public function __construct()\r\n {\r\n require_once 'libs/db.php';\r\n $this->db = Db::singleton();\r\n }", "public function __construct()\n {\n $this->db = \\Config\\Database::connect();\n }", "public function __construct($db) {\r\n\r\n $this->conn = $db;\r\n\r\n }", "public function __construct($dbConn){\n $this->db = $dbConn;\n }", "public static function open_db_connection(){\r\n self::$connection = new mysqli(DB_SERVER, DB_USER, DB_PASS, DB_NAME);\r\n\t\t}", "public function __construct($db)\r\n {\r\n $this->conn = $db;\r\n }", "public function __construct($db)\n {\n $this->conn = $db;\n }", "function __construct() {\n\t\t$this->connect();\n\t\t\t$this->select_db($this->g_dbname);\n\t\t}", "public function __construct($db)\n {\n $this->conn = $db;\n }", "public function __construct() {\n $dsn = \"mysql:host=\".Configuration::DATABASE_HOST.\";dbname=\".Configuration::DATABASE_NAME;\n self::connect($dsn, Configuration::DATABASE_USER, Configuration::DATABASE_PASSWORD);\n }", "public function __construct() {\n $this->_db = DB::getInstance();\n }", "function __constructor($conn){\n $this->db = $conn;\n }", "public function __construct() {\n// $this->db['server'] = $args['server'];\n// $this->db['username'] = $args['username'];\n// $this->db['password'] = $args['password'];\n// $this->db['database'] = $args['database'];\n $this->open_connection();\n }", "private function __construct()\n {\n\n $DB_SQLITE_FILE = env('APP_DB_FILE');\n $this->dbconn = new \\DB\\SQL('sqlite:'.$DB_SQLITE_FILE);\n }", "private function openDatabaseConnection()\n {\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 }", "public function __construct($db) {\n $this->conn = $db;\n }", "public function __construct($db) {\n $this->conn = $db;\n }", "public function __construct() {\t\tif(enable_database == true) {\n\t\t\t$this->db = database::instance();\n\t\t\t$this->db->connect();\n\t\t}\n\t}", "public function __construct($db)\r\n {\r\n $this->conn = $db;\r\n }", "public function __construct()\r\n\r\n\t{\r\n\t\t$this->db = new Connection();\r\n\t\t//chama o metodo conectar da classe Conection\r\n\t\t$this->db = $this->db->conectar();\r\n\t\t\r\n\t}", "public function __construct($db)\n {\n $this->conn = $db;\n }", "public function __construct($db)\n {\n $this->conn = $db;\n }", "public function __construct($db)\n {\n $this->conn = $db;\n }", "public function __construct($db)\n {\n $this->conn = $db;\n }", "public function __construct($db)\n {\n $this->conn = $db;\n }", "public function __construct($db)\n {\n $this->conn = $db;\n }", "public function __construct($db)\n {\n $this->conn = $db;\n }", "public function __construct($db)\n {\n $this->conn = $db;\n }", "public function __construct($db)\n {\n $this->conn = $db;\n }", "public function __construct($db)\n {\n $this->conn = $db;\n }", "public function __construct($db)\n {\n $this->conn = $db;\n }", "public function __construct($db)\n {\n $this->conn = $db;\n }", "public function __construct($db)\n {\n $this->conn = $db;\n }", "public function __construct($db)\n {\n $this->conn = $db;\n }", "public function __construct(){\r\n $this->conn = $this->getConnection();\r\n }", "public function init()\n {\n $this->_db = Instance::ensure($this->_db, Connection::class);\n }", "public function __construct() {\n\t\t$this->db = MySQLConnectivity::get_instance();\n\t\t$this->conn = $this->db->get_connection(); \n\t}" ]
[ "0.8289601", "0.8283389", "0.80810535", "0.8073053", "0.7977333", "0.79415965", "0.79294735", "0.7927469", "0.7891164", "0.78766125", "0.7863663", "0.7858212", "0.78250515", "0.7811671", "0.7803433", "0.77657324", "0.7740861", "0.77393913", "0.77282566", "0.7685", "0.7679299", "0.7679299", "0.7675302", "0.76701105", "0.76645863", "0.7657316", "0.76023245", "0.7584311", "0.75672364", "0.7558132", "0.7556826", "0.754873", "0.7535515", "0.7534368", "0.7531662", "0.751967", "0.7515512", "0.7512255", "0.75005263", "0.7495797", "0.74941915", "0.74829197", "0.7481072", "0.7480797", "0.7476585", "0.74600923", "0.7458507", "0.7458197", "0.74569917", "0.74401504", "0.74330485", "0.7418358", "0.741826", "0.7413415", "0.7393978", "0.7389831", "0.7385779", "0.73851734", "0.7381778", "0.73795545", "0.7376782", "0.7376782", "0.7376782", "0.73763347", "0.73759645", "0.73676085", "0.73670703", "0.7366423", "0.7364332", "0.7363336", "0.7356555", "0.73514926", "0.7347408", "0.7346724", "0.73354703", "0.733509", "0.7334169", "0.73297894", "0.7327303", "0.7319794", "0.7319794", "0.731977", "0.7319301", "0.7306679", "0.7305685", "0.7305685", "0.7305685", "0.7305685", "0.7305685", "0.7305685", "0.7305685", "0.7305685", "0.7305685", "0.7305685", "0.7305685", "0.7305685", "0.7305685", "0.7305685", "0.7304205", "0.730009", "0.72994626" ]
0.0
-1
Destructor close DB connection
function __destruct() { $this->db->close(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function __destruct()\n {\n $this->db->close($this->conn);\n }", "public function CloseConnection()\n {\n $this->db = null;\n }", "private function closeConnection(){\n $this->db =null;\n }", "public function __destruct()\n {\n parent::$db->closeConnection();\n }", "public function close_connection()\n {\n $this->db = null;\n }", "public function close()\n {\n $this->db = null;\n }", "function __destruct() {\n $this->db->close();\n }", "public function close(){\r\n\t\tself::$dbh = null;\r\n\t\tself::$db = null;\r\n\t}", "protected function __destruct()\n {\n if (self::$db) self::$db->close();\n }", "function __destruct() {\n $this->db->close();\n }", "function __destruct() {\n $this->db->close();\n }", "function __destruct()\t{\n\t\t$this->db_conn->close();\n\t}", "protected function closeConection()\n {\n $this->db->close();\n unset($this->db);\n unset($this->satz);\n }", "public function __destruct(){\n $this->db->close();\n }", "public function __destruct() {\n if ($this->_db !== null)\n mysql_close($this->_db);\n }", "public function __destruct() {\n\t\t$this->dbAdapter->dbClose();\n\t}", "public function __destruct()\r\n {\r\n $this->db = null;\r\n }", "public static function close()\n {\n static::$_db = null;\n }", "function close_db(){\n $this->_dbh = null;\n \n }", "function close_db(){\n $this->_dbh = null;\n \n }", "public function __destruct() {\n $this->db = NULL;\n }", "public function __destruct()\n {\n $this->db = null;\n }", "public function __destruct() {\n mysqli_close($this->db_connection);\n }", "function __destruct() {\n mysql_close($this->db_conn);\n }", "function __destruct() {\n\t\t\tunset($this->db);\n\t\t}", "public function __destruct(){\r\n\t\tself::$dbh = null;\r\n\t\tself::$db = null;\r\n\t}", "function __destruct()\n {\n unset($this->db);\n }", "public function __destructor()\n {\n if ($this->dbCache) {\n $this->dbCache->Close();\n }\n }", "public function __destruct() {\n // Close all queries\n foreach ($this->queries as $stmt)\n $stmt->close();\n\n // Close database\n $this->db->close();\n }", "function __destruct() {\n $this->closeConn();\n }", "public function __destruct()\r\n\t{\r\n\t\t$this->db = null;\r\n\t}", "function __destruct(){\n $this->dbConnection = null;\n }", "public function __destruct() {\n unset($this->dbh);\n }", "private function closeConnection(){\n $this->file_db = null;\n }", "function __destruct()\n\t{\n\t\t$this->dblink->close();\n\t}", "public function __destruct(){\n\t\t$this->_db = null;\n\t}", "public function __destruct() {\n $this->connection->close();\n }", "public function __destruct() {\n $this->connection->close();\n }", "public function __destruct() {\n $this->close_connection();\n }", "function __destruct()\r\n\t\t{\r\n\t\t\t$this->myDatabase->close();\r\n\t\t}", "function destroy_connection(){\n\t\t//if($this->dbconn != null)\n\t\t//\t$this->dbconn->disconnect();\n\t\tunset($this->dbconn);\n\t}", "public function __destruct() {\n if (!is_null($this->connection)) {\n $this->connection->close();\n }\n }", "public function __destruct()\n {\n if ($this->_connection !== null) {\n $this->getConnection()->close();\n }\n }", "protected function __destruct() \r\n {\r\n $this->_database->close();\r\n }", "function __destruct() {\r\n $this->db=null;\r\n }", "public static function closeConnection(){\n //Check if instance exists\n if(isset(self::$instance)){\n //Closes connection\n self::$connection = null;\n //unset the instance, following connections will require re-connection to the DB.\n self::$instance = null;\n }\n }", "public function __destruct()\n {\n if($this->_isConnected()) {\n mysqli_close($this->_dbConn);\n $this->_dbConn = null;\n }\n }", "public function __destruct() {\n \t$this->_connection->close();\n\t}", "public function __destruct() {\n $this->conn && $this->conn->close();\n }", "function __destruct() {\n mysqli_close($this->database_manager);\n }", "public function __destruct()\n\t{\n\t\t// http://stackoverflow.com/a/5772638\n\t\t// PDO doesn't have an explicit \"close\" function.\n\t\t$this->Db = null;\n\t}", "public function __destruct()\n {\n $this -> conn = null;\n }", "public function __destruct() {\n $this->conn = null;\n }", "public function __destruct()\n\t{\n\t\tif ($this->_connection)\n\t\t{\n\t\t\tfclose($this->_connection);\n\t\t}\n\t}", "public function __destruct() {\r\n\t\tif (!is_null($this -> link)) {\r\n\t\t\tif (!$this -> pdo) {\r\n\t\t\t\tmysql_close($this -> link);\r\n\t\t\t}\r\n\r\n\t\t\t$this -> link = null;\r\n\t\t\tself::$singleton = null;\r\n\t\t}\r\n\t}", "function __destruct()\t{\n\t\t$this->_hDb= null;\n\t}", "public function __destruct() {\n if($this->link)\n mysqli_close($this->link);\n }", "public function __destruct()\n {\n try {\n if (!empty($this->databaseConnection)) {\n $this->databaseConnection->disconnect();\n }\n } catch (\\Exception) {\n }\n }", "function __destruct()\n {\n $this->close_connection();\n }", "function __destruct() {\n //@, Error when no linked to db open. \n\t @mysql_close($this->con);\n\t \n\t}", "function __destruct() {\n $this->connection = null;\n }", "public function __destruct() {\n $conn = null;\n }", "public function disconnect() {\n $this->db = null;\n }", "public function __destruct() {\n if ( !is_null( $this->_conn ) && true === $this->_is_connected ) {\n $this->_conn->close();\n }\n }", "public function disconnect() {\n $this->db = null;\n }", "function __destruct()\n {\n if ($this->conn) mysqli_close($this->conn);\n }", "function __destruct() \n {\n\t\t\t$this->conn_close();\n\t\t}", "public function __destruct(){\n\t\t $this->conn = null;\n\t\t}", "public function __destruct() \r\n {\r\n mysqli_close($this->connection);\r\n }", "public function __destruct() {\n // close the database connection\n $this->pdo = null;\n }", "private function close() {\n if (!empty($this->_dbConn)) {\n pg_close($this->_dbConn);\n unset($this->_dbConn);\n }\n }", "public function __destruct()\n {\n $this->connection = null;\n }", "public function __destruct()\n {\n $this->connection = null;\n }", "function closeDbConnection() {\n global $objDb;\n\n if (isset($objDb)) {\n @$objDb->Close();\n }\n }", "public function __destruct() {\n// $this->closeConnection();\n }", "function __destruct()\n {\n if($this->link)\n {\n mysql_close($this->link);\n }\n }", "public function __destruct() {\r\n mysqli_close($this->_connection);\r\n }", "public function __destruct()\n {\n if (is_resource($this->connection)) {\n fclose($this->connection);\n }\n\n $this->connection = null;\n }", "public function __destructor(){\n $this->connect->close();\n }", "public function disconnect()\n {\n $this->db->dispose();\n }", "public function close()\n {\n $this->connection = null;\n }", "public function __destruct() {\n \n /*\n * a non-persistant DB connection should be disconnected here, e.g. for MySQL using mysql_close($this->connection)\n */\n trace('***** '.__CLASS__.' object destroyed. *****');\n \n }", "public function __destruct()\n {\n $this->conn = false;\n if ($this->driver) {\n unset($this->driver);\n }\n }", "public function __destruct() {\n mysql_close($this->conn);\n }", "function __destruct() {\n\t\tmysql_close($this->connection);\n\t}", "public function __destruct()\n {\n // close the database connection\n $this->pdo = null;\n }", "public function conn_close(){\n $this->conn = null;\n }", "public function close()\n {\n unset($this->conn);\n }", "public function closeConnection()\n {\n $this->pdo = null;\n }", "public function __destruct()\n {\n $this->_Database= null;\n }", "static function close()\n\t{\n\t\tforeach (self::$dbConnections as $dbName => $db)\n\t\t{\n\t\t\t$db->close();\n\t\t\tunset(self::$dbConnections[$dbName]);\n\t\t}\n\n\t\tforeach(self::$extraConnections as $index => $db)\n\t\t{\n\t\t\t$db->close();\n\t\t\tunset(self::$extraConnections[$index]);\n\t\t}\n\t}", "public function closeConnection()\n \t{\n \t\t$this->connection = null;\n \t}", "public function closeConnection ()\n {\n $this->_connection = null;\n }", "public function __destruct()\r\n\t{\r\n\t\tis_resource($this->link) and odbc_close($this->link);\r\n\t}", "public function closeConnection() {\n\t\t$this->conn = null;\n\t\tunset($this->conn);\n\t}", "public function closeConnection() {\n\t\t$this->conn = null;\n\t\tunset($this->conn);\n\t}", "function destruct()\n {\n mysql_close($this->link);\n }", "protected function __destruct() \n {\n // to do: close database\n\t\ttry {\n\t\t$this->_database->close();\n\t\t}catch(Exception $e) {echo $e->getMessage();}\n }", "public function __destruct(){\n\t\t@mysql_close($this->conn);\n\t}", "function __destruct()\n {\n $this->db = null;\n static::$instance = null;\n }" ]
[ "0.8384734", "0.83701056", "0.8364135", "0.8346933", "0.83120966", "0.82942754", "0.82905805", "0.8289772", "0.82844937", "0.826842", "0.826842", "0.8218794", "0.8144517", "0.8140202", "0.8116407", "0.8114562", "0.8094567", "0.80918825", "0.8080772", "0.8080772", "0.80802125", "0.8079034", "0.8070967", "0.807019", "0.8058542", "0.80577296", "0.80535567", "0.8042745", "0.80407745", "0.80266035", "0.8022798", "0.8016574", "0.8000309", "0.798428", "0.795709", "0.7950252", "0.7945499", "0.79448503", "0.79354256", "0.7902786", "0.7897992", "0.78899264", "0.78845674", "0.78820336", "0.7876879", "0.7876571", "0.78760594", "0.7864298", "0.78624463", "0.78459716", "0.78440565", "0.78418773", "0.7831783", "0.7819748", "0.7811183", "0.7798343", "0.7796607", "0.7793234", "0.7792631", "0.77768695", "0.77685636", "0.7764987", "0.7758397", "0.77540404", "0.77528554", "0.773976", "0.77392215", "0.7737824", "0.7734713", "0.7734616", "0.77317", "0.7730825", "0.7730825", "0.7727515", "0.77241695", "0.77189314", "0.77163804", "0.77109224", "0.7692434", "0.76849073", "0.7683194", "0.76818764", "0.7671045", "0.76690525", "0.76681536", "0.76482946", "0.7633478", "0.763282", "0.7628735", "0.76252425", "0.76113623", "0.75965625", "0.75920314", "0.7591692", "0.7586145", "0.7586145", "0.75791633", "0.75780964", "0.7576119", "0.7575082" ]
0.8138663
14
Create a new controller instance.
public function __construct(TicketThemeRepository $ticketThemes,UserRepository $users) { $this->ticketThemes = $ticketThemes; $this->users = $users; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function createController()\n {\n $this->createClass('controller');\n }", "protected function createController()\n {\n $controller = Str::studly(class_basename($this->getNameInput()));\n\n $modelName = $this->qualifyClass('Models/'.$this->getNameInput());\n\n $this->call('make:controller', array_filter([\n 'name' => \"{$controller}Controller\",\n '--model' => $modelName,\n '--api' => true,\n ]));\n }", "protected function createController()\n {\n $controller = Str::studly(class_basename($this->argument('name')));\n $model_name = $this->qualifyClass($this->getNameInput());\n $name = Str::contains($model_name, ['\\\\']) ? Str::afterLast($model_name, '\\\\') : $model_name;\n\n $this->call('make:controller', [\n 'name' => \"{$controller}Controller\",\n '--model' => $model_name,\n ]);\n\n $path = base_path() . \"/app/Http/Controllers/{$controller}Controller.php\";\n $this->cleanupDummy($path, $name);\n }", "private function makeInitiatedController()\n\t{\n\t\t$controller = new TestEntityCRUDController();\n\n\t\t$controller->setLoggerWrapper(Logger::create());\n\n\t\treturn $controller;\n\t}", "protected function createController()\n {\n $controller = Str::studly(class_basename($this->argument('name')));\n\n $modelName = $this->qualifyClass($this->getNameInput());\n\n $this->call(ControllerMakeCommand::class, array_filter([\n 'name' => \"{$controller}/{$controller}Controller\",\n '--model' => $this->option('resource') || $this->option('api') ? $modelName : null,\n ]));\n\n $this->call(ControllerMakeCommand::class, array_filter([\n 'name' => \"Api/{$controller}/{$controller}Controller\",\n '--model' => $this->option('resource') || $this->option('api') ? $modelName : null,\n '--api' => true,\n ]));\n }", "protected function createController()\n {\n $name = str_replace(\"Service\",\"\",$this->argument('name'));\n\n $this->call('make:controller', [\n 'name' => \"{$name}Controller\"\n ]);\n }", "protected function createController()\n {\n $params = [\n 'name' => $this->argument('name'),\n ];\n\n if ($this->option('api')) {\n $params['--api'] = true;\n }\n\n $this->call('wizard:controller', $params);\n }", "public function generateController () {\r\n $controllerParam = \\app\\lib\\router::getPath();\r\n $controllerName = \"app\\controller\\\\\" . end($controllerParam);\r\n $this->controller = new $controllerName;\r\n }", "public static function newController($controller)\n\t{\n\t\t$objController = \"App\\\\Controllers\\\\\".$controller;\n\t\treturn new $objController;\n\t}", "public function createController()\n\t{\n\t\tif(class_exists($this->controller))\n\t\t{\n\t\t\t// get the parent class he extends\n\t\t\t$parents = class_parents($this->controller);\n\n\t\t\t// $parents = class_implements($this->controller); used if our Controller was just an interface not a class\n\n\t\t\t// check if the class implements our Controller Class\n\t\t\tif(in_array(\"Controller\", $parents))\n\t\t\t{\n\t\t\t\t// check if the action in the request exists in that class\n\t\t\t\tif(method_exists($this->controller, $this->action))\n\t\t\t\t{\n\t\t\t\t\treturn new $this->controller($this->action, $this->request);\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t// Action is not exist\n\t\t\t\t\techo 'Method '. $this->action .' doesn\\'t exist in '. $this->controller;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t// The controller doesn't extends our Controller Class\n\t\t\t\techo $this->controller.' doesn\\'t extends our Controller Class';\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\t// Controller Doesn't exist\n\t\t\techo $this->controller.' doesn\\'t exist';\n\t\t}\n\t}", "public function createController( ezcMvcRequest $request );", "public function createController() {\n //check our requested controller's class file exists and require it if so\n /*if (file_exists(__DIR__ . \"/../Controllers/\" . $this->controllerName . \".php\")) {\n require(__DIR__ . \"/../Controllers/\" . $this->controllerName . \".php\");\n } else {\n throw new Exception('Route does not exist');\n }*/\n\n try {\n require_once __DIR__ . '/../Controllers/' . $this->controllerName . '.php';\n } catch (Exception $e) {\n return $e;\n }\n \n //does the class exist?\n if (class_exists($this->controllerClass)) {\n $parents = class_parents($this->controllerClass);\n \n //does the class inherit from the BaseController class?\n if (in_array(\"BaseController\",$parents)) { \n //does the requested class contain the requested action as a method?\n if (method_exists($this->controllerClass, $this->endpoint)) {\n return new $this->controllerClass($this->args, $this->endpoint, $this->domain);\n } else {\n throw new Exception('Action does not exist');\n }\n } else {\n throw new Exception('Class does not inherit correctly.');\n }\n } else {\n throw new Exception('Controller does not exist.');\n }\n }", "public static function create()\n\t{\n\t\t//check, if a JobController instance already exists\n\t\tif(JobController::$jobController == null)\n\t\t{\n\t\t\tJobController::$jobController = new JobController();\n\t\t}\n\n\t\treturn JobController::$jobController;\n\t}", "private function controller()\n {\n $location = $this->args[\"location\"] . DIRECTORY_SEPARATOR . 'controllers' . DIRECTORY_SEPARATOR;\n $relative_location = $this->args['application_folder'] . DIRECTORY_SEPARATOR . 'controllers' . DIRECTORY_SEPARATOR;\n\n if (!empty($this->args['subdirectories']))\n {\n $location .= $this->args['subdirectories'] . DIRECTORY_SEPARATOR;\n $relative_location .= $this->args['subdirectories'] . DIRECTORY_SEPARATOR;\n }\n\n if (!is_dir($location))\n {\n mkdir($location, 0755, TRUE);\n }\n\n $relative_location .= $this->args['filename'];\n $filename = $location . $this->args['filename'];\n\n $args = array(\n \"class_name\" => ApplicationHelpers::camelize($this->args['name']),\n \"filename\" => $this->args['filename'],\n \"application_folder\" => $this->args['application_folder'],\n \"parent_class\" => (isset($this->args['parent'])) ? $this->args['parent'] : $this->args['parent_controller'],\n \"extra\" => $this->extra,\n 'relative_location' => $relative_location,\n 'helper_name' => strtolower($this->args['name']) . '_helper',\n );\n\n $template = new TemplateScanner(\"controller\", $args);\n $controller = $template->parse();\n\n $message = \"\\t\";\n if (file_exists($filename))\n {\n $message .= 'Controller already exists : ';\n if (php_uname(\"s\") !== \"Windows NT\")\n {\n $message = ApplicationHelpers::colorize($message, 'light_blue');\n }\n $message .= $relative_location;\n }\n elseif (file_put_contents($filename, $controller))\n {\n $message .= 'Created controller: ';\n if (php_uname(\"s\") !== \"Windows NT\")\n {\n $message = ApplicationHelpers::colorize($message, 'green');\n }\n $message .= $relative_location;\n }\n else\n {\n $message .= 'Unable to create controller: ';\n if (php_uname(\"s\") !== \"Windows NT\")\n {\n $message = ApplicationHelpers::colorize($message, 'red');\n }\n $message .= $relative_location;\n }\n\n // The controller has been generated, output the confirmation message\n fwrite(STDOUT, $message . PHP_EOL);\n\n // Create the helper files.\n $this->helpers();\n\n $this->assets();\n\n // Create the view files.\n $this->views();\n\n return;\n }", "public function createController( $controllerName ) {\r\n\t\t$refController \t\t= $this->instanceOfController( $controllerName );\r\n\t\t$refConstructor \t= $refController->getConstructor();\r\n\t\tif ( ! $refConstructor ) return $refController->newInstance();\r\n\t\t$initParameter \t\t= $this->setParameter( $refConstructor );\r\n\t\treturn $refController->newInstanceArgs( $initParameter ); \r\n\t}", "public function create($controllerName) {\r\n\t\tif (!$controllerName)\r\n\t\t\t$controllerName = $this->defaultController;\r\n\r\n\t\t$controllerName = ucfirst(strtolower($controllerName)).'Controller';\r\n\t\t$controllerFilename = $this->searchDir.'/'.$controllerName.'.php';\r\n\r\n\t\tif (preg_match('/[^a-zA-Z0-9]/', $controllerName))\r\n\t\t\tthrow new Exception('Invalid controller name', 404);\r\n\r\n\t\tif (!file_exists($controllerFilename)) {\r\n\t\t\tthrow new Exception('Controller not found \"'.$controllerName.'\"', 404);\r\n\t\t}\r\n\r\n\t\trequire_once $controllerFilename;\r\n\r\n\t\tif (!class_exists($controllerName) || !is_subclass_of($controllerName, 'Controller'))\r\n\t\t\tthrow new Exception('Unknown controller \"'.$controllerName.'\"', 404);\r\n\r\n\t\t$this->controller = new $controllerName();\r\n\t\treturn $this;\r\n\t}", "private function createController($controllerName)\n {\n $className = ucfirst($controllerName) . 'Controller';\n ${$this->lcf($controllerName) . 'Controller'} = new $className();\n return ${$this->lcf($controllerName) . 'Controller'};\n }", "public function createControllerObject(string $controller)\n {\n $this->checkControllerExists($controller);\n $controller = $this->ctlrStrSrc.$controller;\n $controller = new $controller();\n return $controller;\n }", "public function create_controller($controller, $action){\n\t $creado = false;\n\t\t$controllers_dir = Kumbia::$active_controllers_dir;\n\t\t$file = strtolower($controller).\"_controller.php\";\n\t\tif(file_exists(\"$controllers_dir/$file\")){\n\t\t\tFlash::error(\"Error: El controlador '$controller' ya existe\\n\");\n\t\t} else {\n\t\t\tif($this->post(\"kind\")==\"applicationcontroller\"){\n\t\t\t\t$filec = \"<?php\\n\t\t\t\\n\tclass \".ucfirst($controller).\"Controller extends ApplicationController {\\n\\n\\t\\tfunction $action(){\\n\\n\\t\\t}\\n\\n\t}\\n\t\\n?>\\n\";\n\t\t\t\tif(@file_put_contents(\"$controllers_dir/$file\", $filec)){\n\t\t\t\t $creado = true;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t$filec = \"<?php\\n\t\t\t\\n\tclass \".ucfirst($controller).\"Controller extends StandardForm {\\n\\n\\t\\tpublic \\$scaffold = true;\\n\\n\\t\\tpublic function __construct(){\\n\\n\\t\\t}\\n\\n\t}\\n\t\\n?>\\n\";\n\t\t\t\tfile_put_contents(\"$controllers_dir/$file\", $filec);\n\t\t\t\tif($this->create_model($controller, $controller, \"index\")){\n\t\t\t\t $creado = true;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif($creado){\n\t\t\t Flash::success(\"Se cre&oacute; correctamente el controlador '$controller' en '$controllers_dir/$file'\");\n\t\t\t}else {\n\t\t\t Flash::error(\"Error: No se pudo escribir en el directorio, verifique los permisos sobre el directorio\");\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t$this->route_to(\"controller: $controller\", \"action: $action\");\n\t}", "private function instanceController( string $controller_class ): Controller {\n\t\treturn new $controller_class( $this->request, $this->site );\n\t}", "public function makeController($controller_name)\n\t{\n\t\t$model\t= $this->_makeModel($controller_name, $this->_storage_type);\n\t\t$view\t= $this->_makeView($controller_name);\n\t\t\n\t\treturn new $controller_name($model, $view);\n\t}", "public function create()\n {\n $output = new \\Symfony\\Component\\Console\\Output\\ConsoleOutput();\n $output->writeln(\"<info>Controller Create</info>\");\n }", "protected function createDefaultController() {\n Octopus::requireOnce($this->app->getOption('OCTOPUS_DIR') . 'controllers/Default.php');\n return new DefaultController();\n }", "private function createControllerDefinition()\n {\n $id = $this->getServiceId('controller');\n if (!$this->container->has($id)) {\n $definition = new Definition($this->getServiceClass('controller'));\n $definition\n ->addMethodCall('setConfiguration', [new Reference($this->getServiceId('configuration'))])\n ->addMethodCall('setContainer', [new Reference('service_container')])\n ;\n $this->container->setDefinition($id, $definition);\n }\n }", "public function createController( $ctrlName, $action ) {\n $args['action'] = $action;\n $args['path'] = $this->path . '/modules/' . $ctrlName;\n $ctrlFile = $args['path'] . '/Controller.php';\n // $args['moduleName'] = $ctrlName;\n if ( file_exists( $ctrlFile ) ) {\n $ctrlPath = str_replace( CITRUS_PATH, '', $args['path'] );\n $ctrlPath = str_replace( '/', '\\\\', $ctrlPath ) . '\\Controller';\n try { \n $r = new \\ReflectionClass( $ctrlPath ); \n $inst = $r->newInstanceArgs( $args ? $args : array() );\n\n $this->controller = Citrus::apply( $inst, Array( \n 'name' => $ctrlName, \n ) );\n if ( $this->controller->is_protected == null ) {\n $this->controller->is_protected = $this->is_protected;\n }\n return $this->controller;\n } catch ( \\Exception $e ) {\n prr($e, true);\n }\n } else {\n return false;\n }\n }", "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}", "public static function newController($controllerName, $params = [], $request = null) {\n\n\t\t$controller = \"App\\\\Controllers\\\\\".$controllerName;\n\n\t\treturn new $controller($params, $request);\n\n\t}", "private function loadController() : void\n\t{\n\t\t$this->controller = new $this->controllerName($this->request);\n\t}", "public function createController($pi, array $params)\n {\n $class = $pi . '_Controller_' . ucfirst($params['page']);\n\n return new $class();\n }", "public function createController() {\n //check our requested controller's class file exists and require it if so\n \n if (file_exists(\"modules/\" . $this->controllerName . \"/controllers/\" . $this->controllerName .\".php\" ) && $this->controllerName != 'error') {\n require(\"modules/\" . $this->controllerName . \"/controllers/\" . $this->controllerName .\".php\");\n \n } else {\n \n $this->urlValues['controller'] = \"error\";\n require(\"modules/error/controllers/error.php\");\n return new ErrorController(\"badurl\", $this->urlValues);\n }\n\n //does the class exist?\n if (class_exists($this->controllerClass)) {\n $parents = class_parents($this->controllerClass);\n //does the class inherit from the BaseController class?\n if (in_array(\"BaseController\", $parents)) {\n //does the requested class contain the requested action as a method?\n if (method_exists($this->controllerClass, $this->action)) { \n return new $this->controllerClass($this->action, $this->urlValues);\n \n } else {\n //bad action/method error\n $this->urlValues['controller'] = \"error\";\n require(\"modules/error/controllers/error.php\");\n return new ErrorController(\"badview\", $this->urlValues);\n }\n } else {\n $this->urlValues['controller'] = \"error\";\n //bad controller error\n echo \"hjh\";\n require(\"modules/error/controllers/error.php\");\n return new ErrorController(\"b\", $this->urlValues);\n }\n } else {\n \n //bad controller error\n require(\"modules/error/controllers/error.php\");\n return new ErrorController(\"badurl\", $this->urlValues);\n }\n }", "protected static function createController($name) {\n $result = null;\n\n $name = self::$_namespace . ($name ? $name : self::$defaultController) . 'Controller';\n if(class_exists($name)) {\n $controllerClass = new \\ReflectionClass($name);\n if($controllerClass->hasMethod('run')) {\n $result = new $name();\n }\n }\n\n return $result;\n }", "public function createController(): void\n {\n $minimum_buffer_min = 3;\n $token_ok = $this->routerService->ds_token_ok($minimum_buffer_min);\n if ($token_ok) {\n # 2. 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) {\n # Redirect the user to the NDSE view\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\n header('Location: ' . $results[\"redirect_url\"]);\n exit;\n }\n } else {\n $this->clientService->needToReAuth($this->eg);\n }\n }", "protected function createController($controllerClass)\n {\n $cls = new ReflectionClass($controllerClass);\n return $cls->newInstance($this->environment);\n }", "protected function createController($name)\n {\n $controllerClass = 'controller\\\\'.ucfirst($name).'Controller';\n\n if(!class_exists($controllerClass)) {\n throw new \\Exception('Controller class '.$controllerClass.' not exists!');\n }\n\n return new $controllerClass();\n }", "protected function initController() {\n\t\tif (!isset($_GET['controller'])) {\n\t\t\t$this->initDefaultController();\n\t\t\treturn;\n\t\t}\n\t\t$controllerClass = $_GET['controller'].\"Controller\";\n\t\tif (!class_exists($controllerClass)) {\n\t\t\t//Console::error(@$_GET['controller'].\" doesn't exist\");\n\t\t\t$this->initDefaultController();\n\t\t\treturn;\n\t\t}\n\t\t$this->controller = new $controllerClass();\n\t}", "public function makeTestController(TestController $controller)\r\n\t{\r\n\t}", "static function factory($GET=array(), $POST=array(), $FILES=array()) {\n $type = (isset($GET['type'])) ? $GET['type'] : '';\n $objectController = $type.'_Controller';\n $addLocation = $type.'/'.$objectController.'.php';\n foreach ($_ENV['locations'] as $location) {\n if (is_file($location.$addLocation)) {\n return new $objectController($GET, $POST, $FILES);\n } \n }\n throw new Exception('The controller \"'.$type.'\" does not exist.');\n }", "public function create()\n {\n $general = new ModeloController();\n\n return $general->create();\n }", "public function makeController($controllerNamespace, $controllerName, Log $log, $session, Request $request, Response $response)\r\n\t{\r\n\t\t$fullControllerName = '\\\\Application\\\\Controller\\\\' . (!empty($controllerNamespace) ? $controllerNamespace . '\\\\' : '') . $controllerName;\r\n\t\t$controller = new $fullControllerName();\r\n\t\t$controller->setConfig($this->config);\r\n\t\t$controller->setRequest($request);\r\n\t\t$controller->setResponse($response);\r\n\t\t$controller->setLog($log);\r\n\t\tif (isset($session))\r\n\t\t{\r\n\t\t\t$controller->setSession($session);\r\n\t\t}\r\n\r\n\t\t// Execute additional factory method, if available (exists in \\Application\\Controller\\Factory)\r\n\t\t$method = 'make' . $controllerName;\r\n\t\tif (is_callable(array($this, $method)))\r\n\t\t{\r\n\t\t\t$this->$method($controller);\r\n\t\t}\r\n\r\n\t\t// If the controller has an init() method, call it now\r\n\t\tif (is_callable(array($controller, 'init')))\r\n\t\t{\r\n\t\t\t$controller->init();\r\n\t\t}\r\n\r\n\t\treturn $controller;\r\n\t}", "public static function create()\n\t{\n\t\t//check, if an AccessGroupController instance already exists\n\t\tif(AccessGroupController::$accessGroupController == null)\n\t\t{\n\t\t\tAccessGroupController::$accessGroupController = new AccessGroupController();\n\t\t}\n\n\t\treturn AccessGroupController::$accessGroupController;\n\t}", "public static function buildController()\n\t{\n\t\t$file = CONTROLLER_PATH . 'indexController.class.php';\n\n\t\tif(!file_exists($file))\n\t\t{\n\t\t\tif(\\RCPHP\\Util\\Check::isClient())\n\t\t\t{\n\t\t\t\t$controller = '<?php\nclass indexController extends \\RCPHP\\Controller {\n public function index(){\n echo \"Welcome RcPHP!\\n\";\n }\n}';\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$controller = '<?php\nclass indexController extends \\RCPHP\\Controller {\n public function index(){\n echo \\'<style type=\"text/css\">*{ padding: 0; margin: 0; } div{ padding: 4px 48px;} body{ background: #fff; font-family: \"微软雅黑\"; color: #333;} h1{ font-size: 100px; font-weight: normal; margin-bottom: 12px; } p{ line-height: 1.8em; font-size: 36px }</style><div style=\"padding: 24px 48px;\"> <h1>:)</h1><p>Welcome <b>RcPHP</b>!</p></div>\\';\n }\n}';\n\t\t\t}\n\t\t\tfile_put_contents($file, $controller);\n\t\t}\n\t}", "public function getController( );", "public static function getInstance() : Controller {\n if ( null === self::$instance ) {\n self::$instance = new self();\n self::$instance->options = new Options(\n self::OPTIONS_KEY\n );\n }\n\n return self::$instance;\n }", "static function appCreateController($entityName, $prefijo = '') {\n\n $controller = ControllerBuilder::getController($entityName, $prefijo);\n $entityFile = ucfirst(str_replace($prefijo, \"\", $entityName));\n $fileController = \"../../modules/{$entityFile}/{$entityFile}Controller.class.php\";\n\n $result = array();\n $ok = self::createArchive($fileController, $controller);\n ($ok) ? array_push($result, \"Ok, {$fileController} created\") : array_push($result, \"ERROR creating {$fileController}\");\n\n return $result;\n }", "public static function newInstance($path = \\simpleChat\\Utility\\ROOT_PATH)\n {\n $request = new Request();\n \n \n if ($request->isAjax())\n {\n return new AjaxController();\n }\n else if ($request->jsCode())\n {\n return new JsController();\n }\n else\n {\n return new StandardController($path);\n }\n }", "private function createInstance()\n {\n $objectManager = new \\Magento\\Framework\\TestFramework\\Unit\\Helper\\ObjectManager($this);\n $this->controller = $objectManager->getObject(\n \\Magento\\NegotiableQuote\\Controller\\Adminhtml\\Quote\\RemoveFailedSku::class,\n [\n 'context' => $this->context,\n 'logger' => $this->logger,\n 'messageManager' => $this->messageManager,\n 'cart' => $this->cart,\n 'resultRawFactory' => $this->resultRawFactory\n ]\n );\n }", "function loadController(){\n $name = ucfirst($this->request->controller).'Controller' ;\n $file = ROOT.DS.'Controller'.DS.$name.'.php' ;\n /*if(!file_exists($file)){\n $this->error(\"Le controleur \".$this->request->controller.\" n'existe pas\") ;\n }*/\n require_once $file;\n $controller = new $name($this->request);\n return $controller ;\n }", "public function __construct(){\r\n $app = Application::getInstance();\r\n $this->_controller = $app->getController();\r\n }", "public static function & instance()\n {\n if (self::$instance === null) {\n Benchmark::start(SYSTEM_BENCHMARK.'_controller_setup');\n\n // Include the Controller file\n require Router::$controller_path;\n\n try {\n // Start validation of the controller\n $class = new ReflectionClass(ucfirst(Router::$controller).'_Controller');\n } catch (ReflectionException $e) {\n // Controller does not exist\n Event::run('system.404');\n }\n\n if ($class->isAbstract() or (IN_PRODUCTION and $class->getConstant('ALLOW_PRODUCTION') == false)) {\n // Controller is not allowed to run in production\n Event::run('system.404');\n }\n\n // Run system.pre_controller\n Event::run('system.pre_controller');\n\n // Create a new controller instance\n $controller = $class->newInstance();\n\n // Controller constructor has been executed\n Event::run('system.post_controller_constructor');\n\n try {\n // Load the controller method\n $method = $class->getMethod(Router::$method);\n\n // Method exists\n if (Router::$method[0] === '_') {\n // Do not allow access to hidden methods\n Event::run('system.404');\n }\n\n if ($method->isProtected() or $method->isPrivate()) {\n // Do not attempt to invoke protected methods\n throw new ReflectionException('protected controller method');\n }\n\n // Default arguments\n $arguments = Router::$arguments;\n } catch (ReflectionException $e) {\n // Use __call instead\n $method = $class->getMethod('__call');\n\n // Use arguments in __call format\n $arguments = array(Router::$method, Router::$arguments);\n }\n\n // Stop the controller setup benchmark\n Benchmark::stop(SYSTEM_BENCHMARK.'_controller_setup');\n\n // Start the controller execution benchmark\n Benchmark::start(SYSTEM_BENCHMARK.'_controller_execution');\n\n // Execute the controller method\n $method->invokeArgs($controller, $arguments);\n\n // Controller method has been executed\n Event::run('system.post_controller');\n\n // Stop the controller execution benchmark\n Benchmark::stop(SYSTEM_BENCHMARK.'_controller_execution');\n }\n\n return self::$instance;\n }", "protected function instantiateController($class)\n {\n $controller = new $class();\n\n if ($controller instanceof Controller) {\n $controller->setContainer($this->container);\n }\n\n return $controller;\n }", "public function __construct (){\n $this->AdminController = new AdminController();\n $this->ArticleController = new ArticleController();\n $this->AuditoriaController = new AuditoriaController();\n $this->CommentController = new CommentController();\n $this->CourseController = new CourseController();\n $this->InscriptionsController = new InscriptionsController();\n $this->ModuleController = new ModuleController();\n $this->PlanController = new PlanController();\n $this->ProfileController = new ProfileController();\n $this->SpecialtyController = new SpecialtyController();\n $this->SubscriptionController = new SubscriptionController();\n $this->TeacherController = new TeacherController();\n $this->UserController = new UserController();\n $this->WebinarController = new WebinarController();\n }", "protected function makeController($prefix)\n {\n new MakeController($this, $this->files, $prefix);\n }", "public function createController($route)\n {\n $controller = parent::createController('gymv/' . $route);\n return $controller === false\n ? parent::createController($route)\n : $controller;\n }", "public static function createFrontController()\n {\n return self::createInjectorWithBindings(self::extractArgs(func_get_args()))\n ->getInstance('net::stubbles::websites::stubFrontController');\n }", "public static function controller($name)\n {\n $name = ucfirst(strtolower($name));\n \n $directory = 'controller';\n $filename = $name;\n $tracker = 'controller';\n $init = (boolean) $init;\n $namespace = 'controller';\n $class_name = $name;\n \n return self::_load($directory, $filename, $tracker, $init, $namespace, $class_name);\n }", "protected static function instantiateMockController()\n {\n /** @var Event $oEvent */\n $oEvent = Factory::service('Event');\n\n if (!$oEvent->hasBeenTriggered(Events::SYSTEM_STARTING)) {\n\n require_once BASEPATH . 'core/Controller.php';\n\n load_class('Output', 'core');\n load_class('Security', 'core');\n load_class('Input', 'core');\n load_class('Lang', 'core');\n\n new NailsMockController();\n }\n }", "private static function controller()\n {\n $files = ['Controller'];\n $folder = static::$root.'MVC'.'/';\n\n self::call($files, $folder);\n }", "public function createController()\n\t{\n\t\t$originalFile = app_path('Http/Controllers/Reports/SampleReport.php');\n\t\t$newFile = dirname($originalFile) . DIRECTORY_SEPARATOR . $this->class . $this->sufix . '.php';\n\n\t\t// Read original file\n\t\tif( ! $content = file_get_contents($originalFile))\n\t\t\treturn false;\n\n\t\t// Replace class name\n\t\t$content = str_replace('SampleReport', $this->class . $this->sufix, $content);\n\n\t\t// Write new file\n\t\treturn (bool) file_put_contents($newFile, $content);\n\t}", "public function runController() {\n // Check for a router\n if (is_null($this->getRouter())) {\n \t // Set the method to load\n \t $sController = ucwords(\"{$this->getController()}Controller\");\n } else {\n\n // Set the controller with the router\n $sController = ucwords(\"{$this->getController()}\".ucfirst($this->getRouter()).\"Controller\");\n }\n \t// Check for class\n \tif (class_exists($sController, true)) {\n \t\t// Set a new instance of Page\n \t\t$this->setPage(new Page());\n \t\t// The class exists, load it\n \t\t$oController = new $sController();\n\t\t\t\t// Now check for the proper method \n\t\t\t\t// inside of the controller class\n\t\t\t\tif (method_exists($oController, $this->loadConfigVar('systemSettings', 'controllerLoadMethod'))) {\n\t\t\t\t\t// We have a valid controller, \n\t\t\t\t\t// execute the initializer\n\t\t\t\t\t$oController->init($this);\n\t\t\t\t\t// Set the variable scope\n\t \t\t$this->setViewScope($oController);\n\t \t\t// Render the layout\n\t \t\t$this->renderLayout();\n\t\t\t\t} else {\n\t\t\t\t\t// The initializer does not exist, \n\t\t\t\t\t// which means an invalid controller, \n\t\t\t\t\t// so now we let the caller know\n\t\t\t\t\t$this->setError($this->loadConfigVar('errorMessages', 'invalidController'));\n\t\t\t\t\t// Run the error\n\t\t\t\t\t// $this->runError();\n\t\t\t\t}\n \t// The class does not exist\n \t} else {\n\t\t\t\t// Set the system error\n\t \t\t$this->setError(\n\t\t\t\t\tstr_replace(\n\t\t\t\t\t\t':controllerName', \n\t\t\t\t\t\t$sController, \n\t\t\t\t\t\t$this->loadConfigVar(\n\t\t\t\t\t\t\t'errorMessages', \n\t\t\t\t\t\t\t'controllerDoesNotExist'\n\t\t\t\t\t\t)\n\t\t\t\t\t)\n\t\t\t\t);\n \t\t// Run the error\n\t\t\t\t// $this->runError();\n \t}\n \t// Return instance\n \treturn $this;\n }", "public function controller()\n\t{\n\t\n\t}", "protected function buildController()\n {\n $columns = collect($this->columns)->pluck('column')->implode('|');\n\n $permissions = [\n 'create:'.$this->module->createPermission->name,\n 'edit:'.$this->module->editPermission->name,\n 'delete:'.$this->module->deletePermission->name,\n ];\n\n $this->controller = [\n 'name' => $this->class,\n '--model' => $this->class,\n '--request' => $this->class.'Request',\n '--permissions' => implode('|', $permissions),\n '--view-folder' => snake_case($this->module->name),\n '--fields' => $columns,\n '--module' => $this->module->id,\n ];\n }", "function getController(){\n\treturn getFactory()->getBean( 'Controller' );\n}", "protected function getController()\n {\n $uri = WingedLib::clearPath(static::$parentUri);\n if (!$uri) {\n $uri = './';\n $explodedUri = ['index', 'index'];\n } else {\n $explodedUri = explode('/', $uri);\n if (count($explodedUri) == 1) {\n $uri = './' . $explodedUri[0] . '/';\n } else {\n $uri = './' . $explodedUri[0] . '/' . $explodedUri[1] . '/';\n }\n }\n\n $indexUri = WingedLib::clearPath(\\WingedConfig::$config->INDEX_ALIAS_URI);\n if ($indexUri) {\n $indexUri = explode('/', $indexUri);\n }\n\n if ($indexUri) {\n if ($explodedUri[0] === 'index' && isset($indexUri[0])) {\n static::$controllerName = Formater::camelCaseClass($indexUri[0]) . 'Controller';\n $uri = './' . $indexUri[0] . '/';\n }\n if (isset($explodedUri[1]) && isset($indexUri[1])) {\n if ($explodedUri[1] === 'index') {\n static::$controllerAction = 'action' . Formater::camelCaseMethod($indexUri[1]);\n $uri .= $indexUri[1] . '/';\n }\n } else {\n $uri .= 'index/';\n }\n }\n\n $controllerDirectory = new Directory(static::$parent . 'controllers/', false);\n if ($controllerDirectory->exists()) {\n $controllerFile = new File($controllerDirectory->folder . static::$controllerName . '.php', false);\n if ($controllerFile->exists()) {\n include_once $controllerFile->file_path;\n if (class_exists(static::$controllerName)) {\n $controller = new static::$controllerName();\n if (method_exists($controller, static::$controllerAction)) {\n try {\n $reflectionMethod = new \\ReflectionMethod(static::$controllerName, static::$controllerAction);\n $pararms = [];\n foreach ($reflectionMethod->getParameters() as $parameter) {\n $pararms[$parameter->getName()] = $parameter->isOptional();\n }\n } catch (\\Exception $exception) {\n $pararms = [];\n }\n return [\n 'uri' => $uri,\n 'params' => $pararms,\n ];\n }\n }\n }\n }\n return false;\n }", "public function __construct()\n {\n $this->controller = new DHTController();\n }", "public function createController($controllers) {\n\t\tforeach($controllers as $module=>$controllers) {\n\t\t\tforeach($controllers as $key=>$controller) {\n\t\t\t\tif(!file_exists(APPLICATION_PATH.\"/modules/$module/controllers/\".ucfirst($controller).\"Controller.php\")) {\n\t\t\t\t\tMy_Class_Maerdo_Console::display(\"3\",\"Create '\".ucfirst($controller).\"' controller in $module\");\t\t\t\t\n\t\t\t\t\texec(\"zf create controller $controller index-action-included=0 $module\");\t\t\t\t\t\n\t\t\t\t}\telse {\n\t\t\t\t\tMy_Class_Maerdo_Console::display(\"3\",ucfirst($controller).\"' controller in $module already exists\");\t\n\t\t\t\t}\n\t\t\t}\t\n\t\t}\n\t}", "protected function instantiateController($class)\n {\n return new $class($this->routesMaker);\n }", "private function createController($table){\n\n // Filtering file name\n $fileName = $this::cleanToName($table[\"name\"]) . 'Controller.php';\n\n // Prepare the Class scheme inside the controller\n $contents = '<?php '.$fileName.' ?>';\n\n\n // Return a boolean to process completed\n return Storage::disk('controllers')->put($this->appNamePath.'/'.$fileName, $contents);\n\n }", "public function GetController()\n\t{\n\t\t$params = $this->QueryVarArrayToParameterArray($_GET);\n\t\tif (!empty($_POST)) {\n\t\t\t$params = array_merge($params, $this->QueryVarArrayToParameterArray($_POST));\n\t\t}\n\n\t\tif (!empty($_GET['q'])) {\n\t\t\t$restparams = GitPHP_Router::ReadCleanUrl($_SERVER['REQUEST_URI']);\n\t\t\tif (count($restparams) > 0)\n\t\t\t\t$params = array_merge($params, $restparams);\n\t\t}\n\n\t\t$controller = null;\n\n\t\t$action = null;\n\t\tif (!empty($params['action']))\n\t\t\t$action = $params['action'];\n\n\t\tswitch ($action) {\n\n\n\t\t\tcase 'search':\n\t\t\t\t$controller = new GitPHP_Controller_Search();\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'commitdiff':\n\t\t\tcase 'commitdiff_plain':\n\t\t\t\t$controller = new GitPHP_Controller_Commitdiff();\n\t\t\t\tif ($action === 'commitdiff_plain')\n\t\t\t\t\t$controller->SetParam('output', 'plain');\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'blobdiff':\n\t\t\tcase 'blobdiff_plain':\n\t\t\t\t$controller = new GitPHP_Controller_Blobdiff();\n\t\t\t\tif ($action === 'blobdiff_plain')\n\t\t\t\t\t$controller->SetParam('output', 'plain');\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'history':\n\t\t\t\t$controller = new GitPHP_Controller_History();\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'shortlog':\n\t\t\tcase 'log':\n\t\t\t\t$controller = new GitPHP_Controller_Log();\n\t\t\t\tif ($action === 'shortlog')\n\t\t\t\t\t$controller->SetParam('short', true);\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'snapshot':\n\t\t\t\t$controller = new GitPHP_Controller_Snapshot();\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'tree':\n\t\t\tcase 'trees':\n\t\t\t\t$controller = new GitPHP_Controller_Tree();\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'tags':\n\t\t\t\tif (empty($params['tag'])) {\n\t\t\t\t\t$controller = new GitPHP_Controller_Tags();\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\tcase 'tag':\n\t\t\t\t$controller = new GitPHP_Controller_Tag();\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'heads':\n\t\t\t\t$controller = new GitPHP_Controller_Heads();\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'blame':\n\t\t\t\t$controller = new GitPHP_Controller_Blame();\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'blob':\n\t\t\tcase 'blobs':\n\t\t\tcase 'blob_plain':\t\n\t\t\t\t$controller = new GitPHP_Controller_Blob();\n\t\t\t\tif ($action === 'blob_plain')\n\t\t\t\t\t$controller->SetParam('output', 'plain');\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'atom':\n\t\t\tcase 'rss':\n\t\t\t\t$controller = new GitPHP_Controller_Feed();\n\t\t\t\tif ($action == 'rss')\n\t\t\t\t\t$controller->SetParam('format', GitPHP_Controller_Feed::RssFormat);\n\t\t\t\telse if ($action == 'atom')\n\t\t\t\t\t$controller->SetParam('format', GitPHP_Controller_Feed::AtomFormat);\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'commit':\n\t\t\tcase 'commits':\n\t\t\t\t$controller = new GitPHP_Controller_Commit();\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'summary':\n\t\t\t\t$controller = new GitPHP_Controller_Project();\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'project_index':\n\t\t\tcase 'projectindex':\n\t\t\t\t$controller = new GitPHP_Controller_ProjectList();\n\t\t\t\t$controller->SetParam('txt', true);\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'opml':\n\t\t\t\t$controller = new GitPHP_Controller_ProjectList();\n\t\t\t\t$controller->SetParam('opml', true);\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'login':\n\t\t\t\t$controller = new GitPHP_Controller_Login();\n\t\t\t\tif (!empty($_POST['username']))\n\t\t\t\t\t$controller->SetParam('username', $_POST['username']);\n\t\t\t\tif (!empty($_POST['password']))\n\t\t\t\t\t$controller->SetParam('password', $_POST['password']);\n\t\t\t\tbreak;\n\n\t\t\tcase 'logout':\n\t\t\t\t$controller = new GitPHP_Controller_Logout();\n\t\t\t\tbreak;\n\n\n\t\t\tcase 'graph':\n\t\t\tcase 'graphs':\n\t\t\t\t//$controller = new GitPHP_Controller_Graph();\n\t\t\t\t//break;\n\t\t\tcase 'graphdata':\n\t\t\t\t//$controller = new GitPHP_Controller_GraphData();\n\t\t\t\t//break;\n\t\t\tdefault:\n\t\t\t\tif (!empty($params['project'])) {\n\t\t\t\t\t$controller = new GitPHP_Controller_Project();\n\t\t\t\t} else {\n\t\t\t\t\t$controller = new GitPHP_Controller_ProjectList();\n\t\t\t\t}\n\t\t}\n\n\t\tforeach ($params as $paramname => $paramval) {\n\t\t\tif ($paramname !== 'action')\n\t\t\t\t$controller->SetParam($paramname, $paramval);\n\t\t}\n\n\t\t$controller->SetRouter($this);\n\n\t\treturn $controller;\n\t}", "public function testCreateTheControllerClass()\n {\n $controller = new Game21Controller();\n $this->assertInstanceOf(\"\\App\\Http\\Controllers\\Game21Controller\", $controller);\n }", "public static function createController( MShop_Context_Item_Interface $context, $name = null );", "public function __construct()\n {\n\n $url = $this->splitURL();\n // echo $url[0];\n\n // check class file exists\n if (file_exists(\"../app/controllers/\" . strtolower($url[0]) . \".php\")) {\n $this->controller = strtolower($url[0]);\n unset($url[0]);\n }\n\n // echo $this->controller;\n\n require \"../app/controllers/\" . $this->controller . \".php\";\n\n // create Instance(object)\n $this->controller = new $this->controller(); // $this->controller is an object from now on\n if (isset($url[1])) {\n if (method_exists($this->controller, $url[1])) {\n $this->method = $url[1];\n unset($url[1]);\n }\n }\n\n // run the class and method\n $this->params = array_values($url); // array_values 값들인 인자 0 부터 다시 배치\n call_user_func_array([$this->controller, $this->method], $this->params);\n }", "public function getController();", "public function getController();", "public function getController();", "public function createController($pageType, $template)\n {\n $controller = null;\n\n // Use factories first\n if (isset($this->controllerFactories[$pageType])) {\n $callable = $this->controllerFactories[$pageType];\n $controller = $callable($this, 'templates/'.$template);\n\n if ($controller) {\n return $controller;\n }\n }\n\n // See if a default controller exists in the theme namespace\n $class = null;\n if ($pageType == 'posts') {\n $class = $this->namespace.'\\\\Controllers\\\\PostsController';\n } elseif ($pageType == 'post') {\n $class = $this->namespace.'\\\\Controllers\\\\PostController';\n } elseif ($pageType == 'page') {\n $class = $this->namespace.'\\\\Controllers\\\\PageController';\n } elseif ($pageType == 'term') {\n $class = $this->namespace.'\\\\Controllers\\\\TermController';\n }\n\n if (class_exists($class)) {\n $controller = new $class($this, 'templates/'.$template);\n\n return $controller;\n }\n\n // Create a default controller from the stem namespace\n if ($pageType == 'posts') {\n $controller = new PostsController($this, 'templates/'.$template);\n } elseif ($pageType == 'post') {\n $controller = new PostController($this, 'templates/'.$template);\n } elseif ($pageType == 'page') {\n $controller = new PageController($this, 'templates/'.$template);\n } elseif ($pageType == 'search') {\n $controller = new SearchController($this, 'templates/'.$template);\n } elseif ($pageType == 'term') {\n $controller = new TermController($this, 'templates/'.$template);\n }\n\n return $controller;\n }", "private function loadController($controller)\r\n {\r\n $className = $controller.'Controller';\r\n \r\n $class = new $className($this);\r\n \r\n $class->init();\r\n \r\n return $class;\r\n }", "public static function newInstance ($class)\n {\n try\n {\n // the class exists\n $object = new $class();\n\n if (!($object instanceof sfController))\n {\n // the class name is of the wrong type\n $error = 'Class \"%s\" is not of the type sfController';\n $error = sprintf($error, $class);\n\n throw new sfFactoryException($error);\n }\n\n return $object;\n }\n catch (sfException $e)\n {\n $e->printStackTrace();\n }\n }", "public function create()\n {\n //TODO frontEndDeveloper \n //load admin.classes.create view\n\n\n return view('admin.classes.create');\n }", "private function generateControllerClass()\n {\n $dir = $this->bundle->getPath();\n\n $parts = explode('\\\\', $this->entity);\n $entityClass = array_pop($parts);\n $entityNamespace = implode('\\\\', $parts);\n\n $target = sprintf(\n '%s/Controller/%s/%sController.php',\n $dir,\n str_replace('\\\\', '/', $entityNamespace),\n $entityClass\n );\n\n if (file_exists($target)) {\n throw new \\RuntimeException('Unable to generate the controller as it already exists.');\n }\n\n $this->renderFile($this->skeletonDir, 'controller.php', $target, array(\n 'actions' => $this->actions,\n 'route_prefix' => $this->routePrefix,\n 'route_name_prefix' => $this->routeNamePrefix,\n 'dir' => $this->skeletonDir,\n 'bundle' => $this->bundle->getName(),\n 'entity' => $this->entity,\n 'entity_class' => $entityClass,\n 'namespace' => $this->bundle->getNamespace(),\n 'entity_namespace' => $entityNamespace,\n 'format' => $this->format,\n ));\n }", "static public function Instance()\t\t// Static so we use classname itself to create object i.e. Controller::Instance()\r\n {\r\n // Only one object of this class is required\r\n // so we only create if it hasn't already\r\n // been created.\r\n if(!isset(self::$_instance))\r\n {\r\n self::$_instance = new self();\t// Make new instance of the Controler class\r\n self::$_instance->_commandResolver = new CommandResolver();\r\n\r\n ApplicationController::LoadViewMap();\r\n }\r\n return self::$_instance;\r\n }", "private function create_mock_controller() {\n eval('class TestController extends cyclone\\request\\SkeletonController {\n function before() {\n DispatcherTest::$beforeCalled = TRUE;\n DispatcherTest::$route = $this->_request->route;\n }\n\n function after() {\n DispatcherTest::$afterCalled = TRUE;\n }\n\n function action_act() {\n DispatcherTest::$actionCalled = TRUE;\n }\n}');\n }", "public function AController() {\r\n\t}", "protected function initializeController() {}", "public function dispatch()\n { \n $controller = $this->formatController();\n $controller = new $controller($this);\n if (!$controller instanceof ControllerAbstract) {\n throw new Exception(\n 'Class ' . get_class($controller) . ' is not a valid controller instance. Controller classes must '\n . 'derive from \\Europa\\ControllerAbstract.'\n );\n }\n $controller->action();\n return $controller;\n }", "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 }", "private function addController($controller)\n {\n $object = new $controller($this->app);\n $this->controllers[$controller] = $object;\n }", "function Controller($ControllerName = Web\\Application\\DefaultController) {\n return Application()->Controller($ControllerName);\n }", "public function getController($controllerName) {\r\n\t\tif(!isset(self::$instances[$controllerName])) {\r\n\t\t $package = $this->getPackage(Nomenclature::getVendorAndPackage($controllerName));\r\n\t\t if(!$package) {\r\n\t\t $controller = new $controllerName();\r\n\t\t $controller->setContext($this->getContext());\r\n\t\t return $controller;\r\n\t\t //return false;\r\n\t\t }\r\n\r\n\t\t if(!$package || !$package->controllerExists($controllerName)) {\r\n\t\t $controller = new $controllerName();\r\n\t\t $controller->setContext($this->getContext());\r\n\t\t $package->addController($controller);\r\n\t\t } else {\r\n\t\t $controller = $package->getController($controllerName);\r\n\t\t }\r\n\t\t} else {\r\n\t\t $controller = self::$instances[$controllerName];\r\n\t\t}\r\n\t\treturn $controller;\r\n\t}", "public function testInstantiateSessionController()\n {\n $controller = new SessionController();\n\n $this->assertInstanceOf(\"App\\Http\\Controllers\\SessionController\", $controller);\n }", "private static function loadController($str) {\n\t\t$str = self::formatAsController($str);\n\t\t$app_controller = file_exists(APP_DIR.'/Mvc/Controller/'.$str.'.php');\n\t\t$lib_controller = file_exists(LIB_DIR.'/Mvc/Controller/'.$str.'.php');\n\t\t\n\t\tif ( $app_controller || $lib_controller ) {\n\t\t\tif ($app_controller) {\n\t\t\t\trequire_once(APP_DIR.'/Mvc/Controller/'.$str.'.php');\n\t\t\t}\n\t\t\telse {\n\t\t\t\trequire_once(LIB_DIR.'/Mvc/Controller/'.$str.'.php');\n\t\t\t}\n\t\n\t\t\t$controller = new $str();\n\t\t\t\n\t\t\tif (!$controller instanceof Controller) {\n\t\t\t\tthrow new IsNotControllerException();\n\t\t\t}\n\t\t\telse {\n\t\t\t\treturn $controller;\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\tthrow new ControllerNotExistsException($str);\n\t\t}\n\t}", "public function __construct()\n {\n // and $url[1] is a controller method\n if ($_GET['url'] == NULL) {\n $url = explode('/', env('defaultRoute'));\n } else {\n $url = explode('/', rtrim($_GET['url'],'/'));\n }\n\n $file = 'controllers/' . $url[0] . '.php';\n if (file_exists($file)) {\n require $file;\n $controller = new $url[0];\n\n if (isset($url[1])) {\n $controller->{$url[1]}();\n }\n } else {\n echo \"404 not found\";\n }\n }", "protected function _controllers()\n {\n $this['watchController'] = $this->factory(static function ($c) {\n return new Controller\\WatchController($c['app'], $c['searcher']);\n });\n\n $this['runController'] = $this->factory(static function ($c) {\n return new Controller\\RunController($c['app'], $c['searcher']);\n });\n\n $this['customController'] = $this->factory(static function ($c) {\n return new Controller\\CustomController($c['app'], $c['searcher']);\n });\n\n $this['waterfallController'] = $this->factory(static function ($c) {\n return new Controller\\WaterfallController($c['app'], $c['searcher']);\n });\n\n $this['importController'] = $this->factory(static function ($c) {\n return new Controller\\ImportController($c['app'], $c['saver'], $c['config']['upload.token']);\n });\n\n $this['metricsController'] = $this->factory(static function ($c) {\n return new Controller\\MetricsController($c['app'], $c['searcher']);\n });\n }", "public function __construct() {\r\n $this->controllerLogin = new ControllerLogin();\r\n $this->controllerGame = new ControllerGame();\r\n $this->controllerRegister = new ControllerRegister();\r\n }", "public function controller ($post = array())\n\t{\n\n\t\t$name = $post['controller_name'];\n\n\t\tif (is_file(APPPATH.'controllers/'.$name.'.php')) {\n\n\t\t\t$message = sprintf(lang('Controller_s_is_existed'), APPPATH.'controllers/'.$name.'.php');\n\n\t\t\t$this->msg[] = $message;\n\n\t\t\treturn $this->result(false, $this->msg[0]);\n\n\t\t}\n\n\t\t$extends = null;\n\n\t\tif (isset($post['crud'])) {\n\n\t\t\t$crud = true;\n\t\t\t\n\t\t}\n\t\telse{\n\n\t\t\t$crud = false;\n\n\t\t}\n\n\t\t$file = $this->_create_folders_from_name($name, 'controllers');\n\n\t\t$data = '';\n\n\t\t$data .= $this->_class_open($file['file'], __METHOD__, $extends);\n\n\t\t$crud === FALSE || $data .= $this->_crud_methods_contraller($post);\n\n\t\t$data .= $this->_class_close();\n\n\t\t$path = APPPATH . 'controllers/' . $file['path'] . strtolower($file['file']) . '.php';\n\n\t\twrite_file($path, $data);\n\n\t\t$this->msg[] = sprintf(lang('Created_controller_s'), $path);\n\n\t\t//echo $this->_messages();\n\t\treturn $this->result(true, $this->msg[0]);\n\n\t}", "protected function getController(Request $request) {\n try {\n $controller = $this->objectFactory->create($request->getControllerName(), self::INTERFACE_CONTROLLER);\n } catch (ZiboException $exception) {\n throw new ZiboException('Could not create controller ' . $request->getControllerName(), 0, $exception);\n }\n\n return $controller;\n }", "public function create() {}", "public function __construct()\n {\n $this->dataController = new DataController;\n }", "function __contrruct(){ //construdor do controller, nele é possivel carregar as librari, helpers, models que serão utilizados nesse controller\n\t\tparent::__contrruct();//Chamando o construtor da classe pai\n\t}", "public function __construct() {\n\n // Get the URL elements.\n $url = $this->_parseUrl();\n\n // Checks if the first URL element is set / not empty, and replaces the\n // default controller class string if the given class exists.\n if (isset($url[0]) and ! empty($url[0])) {\n $controllerClass = CONTROLLER_PATH . ucfirst(strtolower($url[0]));\n unset($url[0]);\n if (class_exists($controllerClass)) {\n $this->_controllerClass = $controllerClass;\n }\n }\n\n // Replace the controller class string with a new instance of the it.\n $this->_controllerClass = new $this->_controllerClass;\n\n // Checks if the second URL element is set / not empty, and replaces the\n // default controller action string if the given action is a valid class\n // method.\n if (isset($url[1]) and ! empty($url[1])) {\n if (method_exists($this->_controllerClass, $url[1])) {\n $this->_controllerAction = $url[1];\n unset($url[1]);\n }\n }\n\n // Check if the URL has any remaining elements, setting the controller\n // parameters as a rebase of it if true or an empty array if false.\n $this->_controllerParams = $url ? array_values($url) : [];\n\n // Call the controller and action with parameters.\n call_user_func_array([$this->_controllerClass, $this->_controllerAction], $this->_controllerParams);\n }", "private function setUpController()\n {\n $this->controller = new TestObject(new SharedControllerTestController);\n\n $this->controller->dbal = DBAL::getDBAL('testDB', $this->getDBH());\n }", "public function create() {\n $class_name = $this->getOption('className');\n return new $class_name();\n }" ]
[ "0.82668066", "0.8173394", "0.78115296", "0.77052677", "0.7681875", "0.7659338", "0.74860525", "0.74064577", "0.7297601", "0.7252339", "0.7195181", "0.7174191", "0.70150065", "0.6989306", "0.69835985", "0.69732994", "0.6963521", "0.6935819", "0.68973273", "0.68920785", "0.6877748", "0.68702674", "0.68622285", "0.6839049", "0.6779292", "0.6703522", "0.66688496", "0.66600126", "0.6650373", "0.66436416", "0.6615505", "0.66144013", "0.6588728", "0.64483404", "0.64439476", "0.6429303", "0.6426485", "0.6303757", "0.6298291", "0.6293319", "0.62811387", "0.6258778", "0.62542456", "0.616827", "0.6162314", "0.61610043", "0.6139887", "0.613725", "0.61334985", "0.6132223", "0.6128982", "0.61092585", "0.6094611", "0.60889256", "0.6074893", "0.60660255", "0.6059098", "0.60565156", "0.6044235", "0.60288006", "0.6024102", "0.60225666", "0.6018304", "0.60134345", "0.60124683", "0.6010913", "0.6009284", "0.6001683", "0.5997471", "0.5997012", "0.59942573", "0.5985074", "0.5985074", "0.5985074", "0.5967613", "0.5952533", "0.5949068", "0.5942203", "0.5925731", "0.5914304", "0.5914013", "0.59119135", "0.5910308", "0.5910285", "0.59013796", "0.59003943", "0.5897524", "0.58964556", "0.58952993", "0.58918965", "0.5888943", "0.5875413", "0.5869938", "0.58627135", "0.58594996", "0.5853714", "0.5839484", "0.5832913", "0.582425", "0.58161044", "0.5815566" ]
0.0
-1
Show the shop index page
public function index() { $this->ticketThemes->trackFilter(); return view('site::admin.ticket_theme.index', [ 'repository' => $this->ticketThemes, 'ticketThemes' => $this->ticketThemes->paginate(config('site.per_page.ticket_theme', 100), ['ticket_themes.*']) ]); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $shops = $em->getRepository('AdBoxBundle:Shop')->findAll();\n return $this->render('shop/index.html.twig', array(\n 'shops' => $shops\n ));\n }", "public function index()\n {\n $shops = Shop::paginate(10);\n return view('shops.index', compact('shops'));\n }", "public function index()\n {\n $shops = \\App\\Shop::where('user_id', \\Auth::user()->id)->get();\n\n return view('modules.shop.index')->with('shops', $shops);\n }", "public function index()\n {\n $shops = shop::all();\n return view('shop/index' , compact('shops'));\n }", "public function index()\n {\n $shops = $this->shop->all();\n\n return view(\"admin.shops.index\", [\n \"shops\" => $shops\n ]);\n }", "public function index()\n {\n $pageTitle = 'Shop Index';\n //$shops = Shop::all();\n\n return view('admin.shops', compact('pageTitle', 'shops'));\n }", "public function action_index()\n\t{\n\t\t$this->view = new View_Item_Shops_Index;\n\t\t$this->view->shops = ORM::factory('Shop')\n\t\t\t->where('status', '=', 'open')\n\t\t\t->find_all();\n\t}", "public function index()\n {\n $shops = Shop::all();\n\n return view('shops.list', compact('shops'));\n }", "public function index()\n {\n $this->indexPage('list-product', 'List Product');\n }", "public function index()\n {\n $products = Product::where('active', 1)->get();\n $servers = Server::where('production', 1)->get();\n return view('shop.index', compact('products', 'servers'));\n }", "public function index()\n {\n $this->extend(\"onBeforeIndex\");\n\n return $this->renderWith(array(\n 'ShoppingCart',\n 'Checkout',\n 'Page'\n ));\n }", "public function actionIndex() {\n $products = (new ProductRepository())->getLimit(8);\n echo $this->render(\"site/index\", ['products' => $products]);\n }", "public function index()\n {\n $products = $this->shoppingService->index();\n\n return view('Shop.list', compact('products'));\n }", "public function index()\n\t{\n\t\tif(!in_array('viewStore', $this->permission)) {\n\t\t\tredirect('dashboard', 'refresh');\n\t\t}\n\n\t\t$this->render_template('stores/index', $this->data);\t\n\t}", "public function index()\n {\n $itemsArray = $this->getIndexItemsArray();\n return view('shop.index', [\n 'products' => $itemsArray['products'],\n 'filterArrays' => $itemsArray['filterArrays'],\n 'productArrays' => $itemsArray['productArrays'],\n ]);\n }", "public function actionIndex()\n {\n $hits = Product::find()->where(['hit' => '1'])->limit(6)->all();\n $this->setMeta('Home | E-Shopper');\n return $this->render('index', compact('hits'));\n }", "public function index()\n\t{\n\t\t// this is the view we want shown\n\t\t$this->data['pagebody'] = 'sale_list';\n\t\t$this->create_form('Products');\n\n\t\t$this->render();\n\t}", "public function index()\n {\n return view('stores::store.index')->with('store', $this->getStore());\n }", "public function index()\n {\n $sales = ShopSale::all();\n\n return view('admin.shop_sales.index', compact('sales'));\n }", "public function index()\n {\n $shopbanners = Shop::orderBy('id', 'asc')->get();\n return view('backend.pages.shop.manage', compact('shopbanners'));\n }", "public function getShop()\n {\n $products = ProductType::paginate(12);\n\n return view('frontoffice.pages.shop', ['products' => $products]);\n }", "public function ShowShoseIndex()\n {\n #models\n include './models/m_index.php';\n $m_index = new M_Index();\n $giayBanchay = $m_index->LaySanPhamBanChay();\n $giayMoi = $m_index->LaySanPhamMoi();\n # page and item include\n #item \n $carousel = './views/item/vi_carousel.php';\n #page\n $views = './views/page/vp_index.php';\n $sellmore = './views/v_GiayBanChay.php';\n $newShose ='./views/v_GiayMoi.php';\n $aboutUsIndex = './views/v_aboutUsIndex.php';\n include(\"./includes/layout.php\");\n }", "public function index()\n {\n $user_id = auth()->user()->id;\n $shops = Shop::where('user_id',$user_id)->get();\n return view('home',compact('shops'));\n }", "public function index()\n {\n \treturn view('panel.catalog.index');\n }", "public function actionIndex()\n {\n \tif(Yii::$app->user->isGuest) {\n \t\treturn \\Yii::$app->getResponse()->redirect(\\Yii::$app->getUser()->loginUrl);\n \t}\n $searchModel = new JetShopDetailsSearch();\n $dataProvider = $searchModel->search(Yii::$app->request->queryParams);\n\n return $this->render('index', [\n 'searchModel' => $searchModel,\n 'dataProvider' => $dataProvider,\n ]);\n }", "public function action_index(){\n $this->title .= 'Portfolio/catalog';\n\n $goods = SQL::Instance()->SelectWithKey(\"goods\");\n $this->content = $this->Template('views/index.php', [\"goods\"=>$goods, ]);//'test'=>$test\n }", "public function index()\n {\n $shops = Shop::orderBy('created_at', 'asc')->get();\n return view('crm::index', [\n 'shops' => $shops\n ]);\n }", "public function index()\n {\n\n return view('shop', ['drinks' => \\App\\Models\\Drink::all()]);\n }", "public function actionIndex()\n {\n $this->setMeta('E-SHOPER');\n\n $query = Product::find();\n $countQuery = clone $query;\n $pages = new Pagination(['totalCount' => $countQuery->count(), 'pageSize' => 6, 'forcePageParam' => false, 'pageSizeParam' => false]);\n $hits = $query->offset($pages->offset)\n ->limit($pages->limit)\n ->all();\n\n return $this->render('index', compact('hits', 'pages'));\n }", "public function getIndex(){\n\n\t\treturn View::make('sales.saleshome');\t\n\t}", "public function index(){\r\n $this->display(index);\r\n }", "public function actionIndex()\n {\n if ((Yii::$app->user->can('admin')) && (!Yii::$app->user->isGuest) ){\n\n $searchModel = new ShopItemsSearch();\n $dataProvider = $searchModel->search(Yii::$app->request->queryParams);\n\n $kerak = ShopItems::find()->all();\n\n\n return $this->render('index', [\n 'searchModel' => $searchModel,\n 'dataProvider' => $dataProvider,\n ]);\n }\n// return $this->render('site/index');\n return $this->goHome();\n }", "public function actionIndex()\n {\n $product = ProductInfo::model()->findAll();\n $this->render('index',\n array(\n 'products' => $product\n ));\n }", "public function index() {\n Session::put('admin_page', 'Sales');\n return view('admin.sales.index');\n }", "public function index()\n {\n Config::setJsConfig('curPage', 'suppliers-index');\n parent::displayIndex(get_class());\n }", "public function index() {\n\t\t$this->display('index');\n\t}", "public function index()\n\t{\n\n\t\t$book = Product::whereCategory('Books')->first();\n\t\t$furnitures = Product::whereCategory('furnitures')->first();\n\t\t$fruit = Product::whereCategory('fruits')->first();\n\n\t\t$products = [$book , $furnitures , $fruit];\n\t\t\n\t\treturn view('shop.index' , compact('products'));\n\t}", "public function index() {\n $this->template->allFoundItems = Found::showAll();\n $this->template->display( 'index.html.php' );\n }", "public function index()\n {\n $products = Games::all();\n return view('shop')->with('products', $products);\n }", "public function index()\n {\n $shops = Shop::all();\n\n\n dd($shops);\n return view('Shop.index',['shops'=> $shops]);\n }", "public function index() {\n\n\t\t$content = new View('/products/index.html');\n\t\t\n\t\t$this->template->header = new View('/shared/header.html');\n\t\t$this->template->header->activeMenu = \"products\"; \n\t\t$this->template->header->title = \"AllSkyCams Products\"; \n $this->template->header->description = \"Discover all AllSkyCams Products: a complete solution for meteor and fireball detection, reduction and analysis.\";\n\n\t\t$this->template->content = $content;\n\t\t$this->template->footer = new View('/shared/footer.html');\n\t\t\n\t\t\n\t}", "public function index() : void\n {\n $this->PAGE_TITLE = \"Purchases\";\n }", "public function index()\n\t{ \n\t\t// Get data\n\n\t $entries = ProductService::where('type','product')->paginate(10); \n\n\t $this->layout->title = 'Proizvodi | BillingCRM';\n\t \n\t $this->layout->content = View::make('backend.product.index', compact('entries'));\n\n\t}", "public function index()\n {\n return view('sale.index');\n }", "public function indexAction()\n {\n $products = array();\n $products = ShoppingProducts::fetchAll(\n array(\n 'orderBy' => 'id desc',\n /*'paginate' => array(\n 'limit' => Url::segment(3)\n )*/\n )\n );\n\t\t\n $this->render('index')->with(\n array(\n 'products' => $products,\n 'links' => ShoppingProducts::createLinks(),\n 'title' => '',\n 'baseUrl' => Url::getBase(),\n 'pageNumber' => Url::segment(3),\n 'styles' => array(\n 'table' => Assets::addStyle('webroot/css/cygnite/table.css'),\n ),\n 'buttonAttributes' => array(\n 'primary' => array('class' => 'btn btn btn-info'),\n 'delete' => array('class' => 'btn btn-danger'),\n ),\n )\n );\n\n }", "function index() {\n\t\t$this->show_list();\n\t}", "public function indexAction() {\r\n\t\tif (install_installer::checkFirstRun() )\r\n\t\t{\r\n\t\t $front = new Front( ClassLoader::Load('install') );\r\n\t\t return $front->dispatch('install');\r\n\t\t}\r\n\t\t\r\n\t\t$content = ClassLoader::Load('catalog');\r\n\t\t$front = new Front($content);\r\n\t\treturn $front->dispatch('showall');\r\n\t\t\r\n\t}", "public function getIndex()\n {\n $this->successfulPayment();\n\n // Show the page\n return View::make('frontend.cash_shop.index', compact('payment'));\n }", "public function indexAction() {\n\t\t$this->_model->where_clause(NULL);\n\n\t\tif(!isset($this->params['page'])) {\n\t\t\tself::$params['page'] = 1;\n\t\t} \n\n\t\t$this->_view->data['info'] = $this->_model->getPage($this->params['page'], $this->config->pagination_limit);\n\t\t$this->_view->data['total_items'] = $this->_model->getCount();\n\t\t$this->addModuleTemplate($this->module, 'index');\n\n\t}", "public function index()\n {\n $items = Product::all();\n\n return view('shop::product.index', get_defined_vars());\n }", "function index() {\r\n \r\n $this->view->title = 'Home';\r\n \r\n // get all product details\r\n $this->view->featuredProducts = $this->model->getFeaturedProducts();\r\n $this->view->newProducts = $this->model->getNewProducts();\r\n $this->view->topRatedProducts = $this->model->getRatedProducts();\r\n \r\n $this->view->deliveryCharges = $this->model->getDeliveryCharges();\r\n $this->view->render('index/index');\r\n }", "public function indexshop()\n {\n $product = Product::all();\n $categories = Category::all();\n $count = $product->count();\n\n\n return view('shop', [\n 'product' => $product,\n 'categories' => $categories,\n 'count' => $count\n ]);\n }", "public function index()\n {\n $this->show();\n }", "public function index()\n {\n return view('point_sale.index');\n }", "public function index()\r\n {\r\n return view('checkout::index');\r\n }", "public function index()\n {\n $listshops = shop::all()->sortBy('distance');\n\n return view('home',['shops'=>$listshops]);\n }", "public function indexAction() {\n\t\t\t$page_menu = $this->getPageMenu();\n\t\t\tif ( 'options' === $page_menu[ $this->getResultId() ]['type'] ) {\n\t\t\t\t$this->showOptions();\n\t\t\t} else {\n\t\t\t\t$this->showPage();\n\t\t\t}\n\t\t}", "public function index()\n\t{\t\t\n\t\tif($this->checkfrantSession())\n\t\t{\n\t\t\t$this->data['menuId'] = 'EvoStableCoins';\t\t\t\n\t\t\t$this->data['title'] = 'Evo Stable Coins';\t\t\t\t\t\t\n\t\t\t$this->show_viewFrontInner('evoStableCoins', $this->data); \n\t\t}\n\t\telse\n\t\t{\n\t\t\tredirect('home');\n\t\t}\n }", "function index() {\n\t\t$templateMgr =& TemplateManager::getManager();\n\t\t$this->setupTemplate();\n\t\t$templateMgr->display('management/tools/index.tpl');\n\t}", "function shophead_index()\n {\n $this->layout = 'admin_layout';\n $this->set('title','Manage Product Categories');\n $conditions = array('ProductCategory.is_deleted' => 0);\n $this->paginate = array(\n 'recursive' => 0,\n 'limit' => LIMIT,\n 'conditions' => $conditions,\n 'order' => array(\n 'ProductCategory.sort_order' => 'Asc'\n )\n );\n $result = $this->paginate('ProductCategory');\n\t\t//pr($result);\n $this->set('result', $result);\n }", "public function actionIndex(){\r\r\n\t\t$this->render('index', array());\r\r\n\t}", "public function index()\n {\n $products = Product::inRandomOrder()->take(12)->get();\n\n return view('shop')->with('products', $products);\n }", "public function index() {\n\t\t$this->Paginator->settings = array(\n\t\t\t'contain' => array(\n\t\t\t\t'User',\n\t\t\t\t'ShopShippingMethod',\n\t\t\t\t'ShopPaymentMethod',\n\t\t\t)\n\t\t);\n\n\t\t$shopLists = $this->Paginator->paginate(null, $this->Filter->filter);\n\n\t\t$filterOptions = $this->Filter->filterOptions;\n\t\t$filterOptions['fields'] = array(\n\t\t\t'name',\n\t\t);\n\n\t\t$this->set(compact('shopLists', 'filterOptions'));\n\t}", "function Index(){\n\t\t$spmoi=Product::where(['ShowMain','1']);\n\t\t$spxemnhieu=Product::where(['ShowMain','2']);\n\t\t$spbanchay=Product::where(['ShowMain','3']);\n\t\t$sphot=Product::where(['ShowMain','4']);\n\t\t$allpro=Product::all();\n\t\t$allCate=Category::all();\n\t\t$allinfo=['allCate' => $allCate,\n\t\t\t\t\t'allpro' => $spmoi,\n\t\t\t\t\t'spbanchay' => $spbanchay,\n\t\t\t\t\t'spxemnhieu' => $spxemnhieu,\n\t\t\t\t\t'sphot' => $sphot,\n\n\n\t];\n\n\t\treturn $this->render(\"views/homepage.php\", $allinfo, 'views/main.layout.php');\n\t}", "public function index()\n {\n //\n $data['shop_data'] = Shop::select('id', 'shop_name')->get();\n $data['products'] = Product::all();\n $data['invoiceList'] = Invoice::all();\n $invoice_no = invoice::orderBy('id', 'desc')->first();\n if ($invoice_no == null) {\n $firstInvoice = '0';\n $data['invoiceData'] = $firstInvoice + 1;\n } else {\n $invoiceCheck = invoice::orderBy('id', 'desc')->first()->invoice_no;\n $data['invoiceData'] = $invoiceCheck + 1;\n }\n\n return view('Pages.sell.index',$data);\n }", "public function index()\n {\n // $services = Service::with(['shop', 'shop.user'])\n // ->select('shop_id', 'service_name', 'service_price', 'service_duration')\n // ->get()\n // ->groupBy('shop.shop_name');\n $shops = Shop::latest()->get();\n\n return view('services.index', compact('shops'));\n }", "public function index()\n\t{\n\t\treturn View::make('buy/index');\n\t}", "public function index_m_app()\n\t{\n\t\t//アプリマスタの取得\n\t\t$m_apps = M_app::paginate(10);\n\t\t\n\t\t//dd($m_apps);\n\t\t\n\t\t//shop情報の存在の有無で分岐\n\t\tif(isset($m_apps[0])){\n\t\t\treturn view('admin.m_app.home_m_app', compact('m_apps'));\n\t\t}else{\n\t\t\t//dd($m_apps);\n\t\t\treturn view('admin.m_app.home_m_app');\n\t\t}\n\t}", "public function index()\n {\n return view('cataloguemodule::index');\n }", "public function showIndex()\n\t{\n $menuItems = Category::orderBy('category_name', 'ASC')->whereparent_id(NULL)->get();\n $menu = $this->drawMenu($menuItems);\n\n $products = Product::orderBy('created_at', 'DESC')->take(12)->get();\n $featured = Product::orderBy('featured', 'DESC')->first();\n\n\t\treturn View::make('catalog')\n ->with('menu', $menu)\n ->with('products', $products)\n ->with('featured', $featured);\n\t}", "public function index()\n\t{\n\t\t$stores = Store::where('user_id', '=', Auth::id())->get();\n\t\treturn View::make('store_index')->with('stores', $stores);\n\t}", "public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $products = $em->getRepository('WizishopCoreBundle:Product')->findAll();\n\n return $this->render('WizishopCoreBundle:Core:index.html.twig', array('products' => $products));\n }", "public function showAdminshopinfosAction()\n {\n $shopinfosManager = new ShopinfosManager();\n $shopinfos = $shopinfosManager->getAllShopinfos();\n return $this->twig->render('admin/adminshopinfos.html.twig', array(\n 'shopinfos' => $shopinfos\n ));\n }", "public function index()\n {\n return view('seller.store.menu.index');\n }", "public function actionIndex()\n {\n $this->render('index');\n }", "public function index()\n {\n $categories = \\App\\Categorie::with('Subcategories')->get();\n $products = \\App\\Product::with('Categorie')->orderBy('id', 'desc')->paginate(12);\n return view('home')\n ->with('products', $products)\n ->with('page', 'Shop')\n ->with('categories', $categories);\n }", "public function index()\n {\n $shop = DB::table('products')->select(\n 'products.*',\n 'products.id as ids',\n 'categories.*'\n )\n ->leftjoin('categories','categories.id', 'products.cat_id')\n ->where('products.user_id', Auth::user()->id)\n ->orderBy('products.id', 'desc')\n ->paginate(15);\n\n $data['objs'] = $shop;\n $data['header'] = \"สินค้าทั้งหมด\";\n return view('admin.product.index', $data);\n\n }", "public function index()\n {\n\n global $total;\n\n $products = Product::paginate();\n foreach($products as $product){\n $str=$product->name;\n $str=substr($str, 0, strrpos($str, ' '));\n if (isset($_GET[$str])||isset($_GET[$product->name])){\n $total+=$product->price;\n }\n }\n $total-=$total;\n\n $userinfo = Usr::latest()->paginate();\n\n return view('sales.index',compact('userinfo'),compact('products'),compact('total'));\n }", "public function show()\n {\n $shops = Shop::where('user_id', Auth::user()->id)->get();\n\n return view('shops.list', compact('shops'));\n }", "public function index()\n {\n /**\n * let this function empty just for generating layout\n */\n $this->data['add_url'] = site_url('store/add');\n $this->data['export_excel_url'] = site_url('store/export_excel');\n $this->data['list_data'] = site_url('store/list_data');\n }", "public function actionIndex()\n\t{\n\t\t// renders the view file 'protected/views/site/index.php'\n\t\t// using the default layout 'protected/views/layouts/layoutGoodSold.php'\n\t\t$this->render('index');\n\t}", "public function index()\n {\n //读取数据库 获取用户数据\n $shopping = Shopping::orderBy('id','desc')\n ->where('name','like', '%'.request()->keywords.'%')\n ->paginate(10);\n //解析模板显示用户数据\n return view('admin.shopping.index',compact('shopping'));\n\n }", "public function index()\n {\n return view('vanilo::product.index', [\n 'products' => ProductProxy::paginate(100)\n ]);\n }", "public function index()\n {\n return View::make('backend.product.index');\n }", "public function index()\n {\n $store = DB::table('cua_hang')->get();\n return view('admin.store.home', compact('store'));\n\n }", "public function index()\n {\n $allShoes = Shoe::paginate(6);\n return view('home', ['shoes' => $allShoes]);\n }", "public function index()\n\t{\n\t\t$products = Product::all();\n\t\t\n\t\treturn view('catalog.product.index')\n\t\t->with('products',$products);\n\t}", "public function index()\n { \n \n $start='';\n $cart = \\App\\Cart::with(['customer_detail','store'])->orderBy('id','DESC');\n \n $carts= $cart->paginate(20);\n $pagetitle='Active Cart';\n return view('cart.index',compact('carts','pagetitle'));\n }", "public function index()\n {\n $bookshops = Bookshop::orderBy('id', 'desc')->get();\n\n // ['bookshops' => $bookshops]\n return view('bookshops/index', compact('bookshops') );\n }", "public function index()\n\t{\n\t\t$products = Product::take(10)->get();\n\t\t$cartItems = \\Cart::session(auth()->id())->getContent();\n\t\t\n\t\treturn view('home', ['products' => $products, 'cartItems' => $cartItems]);\n\t\treturn view('home');\n\t}", "public function index()\n\t{\n# \\Cart::destroy();return;\n $contents = \\Cart::content()->paginate(5);\n// foreach ($contents as $row) {\n//// echo 'You have ' . $row->qty . ' items of ' . $row->product->name . ' with description: \"' . $row->product->description . '\" in your cart.';\n// }\n\n $total = number_format(\\Cart::total(), 2);\n $this->view('shopcart.index', compact('contents', 'total'));\n\n\t}", "public function index()\n {\n return view('product::index');\n }", "public function actionIndex()\n {\n if (Yii::$app->user->isGuest) {\n return $this->redirect([\"site/login\"]); \n }\n if(Permiso::requerirRol('lider')){\n $this->layout='/main2';\n }elseif(Permiso::requerirRol('vendedor')){\n $this->layout='/main3';\n }\n $searchModel = new ProductoSearch();\n $dataProvider = $searchModel->search(Yii::$app->request->queryParams);\n\n return $this->render('index', [\n 'searchModel' => $searchModel,\n 'dataProvider' => $dataProvider,\n ]);\n }", "public function showIndex()\r\n\t{\r\n\t\t return View::make('sites.index')\r\n ->with('title', 'Sites');\r\n\t}", "public function shop(){\n\t\tif ($this->session->userdata('logged_in')){\n\t\t\t$data['title'] = 'Shop List';\n\t $data['shop_list'] = $this->common_model->get_all('fr_product','');\n\t $this->set_layout('shop/shop_list',$data);\n\t\t}else{\n\t \t\t$this->load->view('site/login');\n\t \t}\n\t}", "public function indexAction()\n {\n return $this->render('CostoSystemBundle:Home:index.html.twig');\n }", "function index() {\n $this->renderView(\"index\");\n }", "public function index() {\n $this->view->render('index/index', null, null);\n }", "public function index()\n\t{\n\t\t$data['title'] = 'Zichiteff | Your one stop shop for all your property needs';\n\t\t$MasterModel = new MasterModel();\n\t\t$data['masterInfo'] = $MasterModel->getOne();\n\t\t\n $ServiceModel = new ServicesModel();\n\t\t$data['totalServices'] = $ServiceModel->getAll();\t\n\t\t\n\n\t\techo view('homepage/home', $data);\n\t}", "public function actionIndex()\n {\n $searchModel = new StoreSearch();\n $dataProvider = $searchModel->search(Yii::$app->request->queryParams);\n\n return $this->render('index', [\n 'searchModel' => $searchModel,\n 'dataProvider' => $dataProvider,\n ]);\n }", "public function indexAction()\r\n {\r\n $this->loadLayout();\r\n $this->_title($this->__(\"Product Updator\"));\r\n $this->renderLayout();\r\n }" ]
[ "0.8029001", "0.79802305", "0.7978284", "0.7970689", "0.7967254", "0.7940634", "0.78298867", "0.76429796", "0.7579207", "0.7574283", "0.7571513", "0.75368375", "0.7467758", "0.74154663", "0.7398573", "0.73981273", "0.73924273", "0.73908323", "0.73427826", "0.73353857", "0.7307131", "0.7305031", "0.7302228", "0.72824854", "0.72714037", "0.72708964", "0.7257353", "0.72481495", "0.7232309", "0.72151446", "0.72140205", "0.71951395", "0.71903473", "0.7174468", "0.7168754", "0.71668005", "0.7166285", "0.7165523", "0.7164179", "0.7158699", "0.71522075", "0.7144345", "0.7144047", "0.71354353", "0.7117805", "0.71140987", "0.7106973", "0.70991194", "0.7097101", "0.709233", "0.7090726", "0.70893955", "0.7089135", "0.7064162", "0.70618945", "0.7056387", "0.7050024", "0.7049448", "0.7049222", "0.7048346", "0.70460576", "0.7037641", "0.7031012", "0.70170456", "0.7015771", "0.7013278", "0.70101416", "0.70078576", "0.700269", "0.69983214", "0.69940877", "0.6992495", "0.69922507", "0.6991905", "0.69889754", "0.6981926", "0.69809455", "0.6976256", "0.69743186", "0.6965511", "0.6964288", "0.6958015", "0.69561034", "0.69530004", "0.69512314", "0.6931093", "0.69304925", "0.6929138", "0.69279134", "0.6926355", "0.6922904", "0.6920361", "0.691732", "0.69108444", "0.6909804", "0.69074786", "0.6903836", "0.69037265", "0.6903491", "0.69014084", "0.6898716" ]
0.0
-1
Update the specified resource in storage.
public function update(TicketThemeRequest $request, TicketTheme $ticketTheme) { $ticketTheme->update(array_merge($request->except(['_token', '_method', '_create', 'ticketTheme.for_manager','ticketTheme.for_feedback'])['ticketTheme'], ['for_manager' => $request->filled('ticketTheme.for_manager')], ['for_feedback' => $request->filled('ticketTheme.for_feedback')])); return redirect()->route('admin.ticket-themes.index')->with('success', trans('site::ticket.theme.updated'));; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function updateShopifyResource() {\n $this->saving();\n $this->getShopifyApi()->call([\n 'URL' => API::PREFIX . $this->getApiPathSingleResource(),\n 'METHOD' => 'PUT',\n 'DATA' => [\n static::getResourceSingularName() => $this->shopifyData\n ]\n ]);\n }", "public function update(Request $request, Resource $resource)\n {\n $request->validate([\n 'name' => 'required',\n 'description' => 'required|string',\n 'file' => 'required|mimes:jpg,jpeg,png,doc,docx,pdf,ppt,txt',\n ]);\n\n $resource->update($request->all());\n\n if ( $request->hasFile('file') ) {\n $resource = 'resource-'.time().'.'.$request->file('file')->extension();\n $request->file->storeAs('resources', $resource,'public');\n $resource->file = $resource;\n }\n\n if ( $resource->save() ) {\n return redirect()->route('admin.resources.index')->with('success', 'Resource updated');\n } else {\n return redirect()->route('admin.resources.index')->with('error', 'Something went wrong');\n }\n }", "public function update(Request $request, Resource $resource)\n {\n //\n }", "public function updateStream($resource);", "public function update(Request $request, Storage $storage)\n {\n $storage->product_id = $request->product_id;\n $storage->amount = $request->amount;\n\n $storage->save();\n\n return redirect()->route('storages.index');\n }", "protected function updateImageResource($fileName, $imageId, $storage)\n {\n //Get image name and storage location for image\n $image = Image::where('id', '=', $imageId)->first();\n\n //Delete old image\n $this->deleteResource($image->name, $image->storage);\n\n //Store the new image\n $image->name = $fileName;\n $image->storage = $storage;\n\n $image->save();\n }", "public function update(Storage $storage, UpdateStorageRequest $request)\n {\n $this->storage->update($storage, $request->all());\n\n return redirect()->route('admin.product.storage.index')\n ->withSuccess(trans('core::core.messages.resource updated', ['name' => trans('product::storages.title.storages')]));\n }", "public function update(StoreStorage $request, Storage $storage)\n {\n $storage->fill($request->all())->save();\n $request->session()->flash('alert-success', 'Запись успешно обновлена!');\n return redirect()->route('storage.index');\n }", "public function update_asset($id, Request $request){\n \t\tif(!Auth::user()){\n\t\t\treturn redirect('/');\n\t\t}\n \t\t$asset = Storage::find($id);\n \t\t$asset->name = $request->name;\n \t\t$asset->quantity = $request->quantity;\n \t\t$asset->category_id = $request->category;\n \t\tif($request->file('image') != null){\n\t\t\t$image = $request->file('image');\n\t\t\t$image_name = time(). \".\" . $image->getClientOriginalExtension();\n\t\t\t$destination = \"images/\";\n\t\t\t$image->move($destination, $image_name);\n\t\t\t$asset->image_url = $destination.$image_name;\n\t\t} \n\t\t$asset->save();\n\t\tsession()->flash('success_message', 'Item Updated successfully');\n\t\treturn redirect(\"/storage\");\n \t}", "public function update(Request $request, Flight $exercise, FlightResource $resource)\n {\n $request->validate([\n 'display_name' => 'required|string|max:100',\n 'file' => 'nullable|file|max:10240|mimes:pdf',\n 'uri' => 'nullable|url|max:255',\n ]);\n\n if ($resource->type === 'file' && $request->file('file')) {\n Storage::drive('public')->delete($resource->resource);\n $resource->resource = $request->file('file')->store('smartcars/exercises/resources', ['disk' => 'public']);\n } elseif ($resource->type === 'uri' && $request->input('uri')) {\n $resource->resource = $request->input('uri');\n }\n\n $resource->save();\n\n return redirect()->route('adm.smartcars.exercises.resources.index', $exercise)\n ->with('success', 'Resource edited successfully.');\n }", "public function update(Request $request, $id)\n {\n $validator = Validator::make($request->all(), [\n 'title' => 'required|string',\n 'content' => 'required|string',\n 'mentoring_area_id' => 'required|integer',\n 'featured_image_uri' => 'string',\n ]);\n\n if ($validator->fails()) {\n return APIHandler::response(0, $validator->errors(), 400);\n }\n \n $resource = Resource::find($id);\n $resource->title = $request->get('title');\n $resource->content = $request->get('content');\n $resource->featured_image_uri = $request->get('featured_image_uri');\n $resource->updated_at = \\Carbon\\Carbon::now();\n $resource->mentoring_area_id = $request->get('mentoring_area_id');\n $resource->save();\n $data['resource'] = $resource;\n return APIHandler::response(1, \"Resource has been updated\");\n }", "protected function updateVideoResource($fileName, $videoId, $storage, $premium=1)\n {\n //Get video name and storage location for video\n $video = Video::where('id', '=', $videoId)->first();\n\n //Check the storage medium\n if($storage == 'vimeo' || $storage == 'youtube')\n {\n $video->name = $fileName;\n $video->storage = $storage;\n $video->premium = $premium;\n $video->save();\n }\n else\n {\n if($video['storage'] == 'local' || $video['storage'] == 's3')\n {\n //Delete old video\n $this->deleteResource($video->name, $video->storage);\n }\n \n //Store the new video\n $video->name = $fileName;\n $video->storage = $storage;\n $video->premium = $premium;\n $video->save();\n }\n }", "public function put($resource, $with=[]){\n return $this->fetch($resource, self::PUT, $with);\n }", "public function update($id, $resource) {\n SCA::$logger->log(\"update resource\");\n return $this->orders_service->update($id, $resource);\n }", "public function update($path);", "public function update($id, $resource)\n {\n SCA::$logger->log(\"Entering update()\");\n //check whether it is an sdo or an xml string.\n if ($resource instanceof SDO_DataObjectImpl) {\n //if the thing received is an sdo convert it to xml\n if ($this->xml_das !== null) {\n $xml = SCA_Helper::sdoToXml($this->xml_das, $resource);\n } else {\n throw new SCA_RuntimeException(\n 'Trying to update a resource with SDO but ' .\n 'no types specified for reference'\n );\n }\n } else {\n $xml = $resource;\n }\n\n $slash_if_needed = ('/' === $this->target_url[strlen($this->target_url)-1])?'':'/';\n\n $handle = curl_init($this->target_url.$slash_if_needed.\"$id\");\n curl_setopt($handle, CURLOPT_HEADER, false);\n curl_setopt($handle, CURLOPT_RETURNTRANSFER, true);\n curl_setopt($handle, CURLOPT_CUSTOMREQUEST, \"PUT\");\n curl_setopt($handle, CURLOPT_POSTFIELDS, $xml);\n\n //replace with Content-Type: atom whatever\n $headers = array(\"User-Agent: SCA\",\n \"Content-Type: text/xml;\",\n \"Accept: text/plain\");\n curl_setopt($handle, CURLOPT_HTTPHEADER, $headers);\n\n $result = curl_exec($handle);\n\n $response_http_code = curl_getinfo($handle, CURLINFO_HTTP_CODE);\n\n curl_close($handle);\n\n $response_exception = $this->buildResponseException($response_http_code, '200');\n\n if ($response_exception != null) {\n throw $response_exception;\n } else {\n //update does not return anything in the body\n return true;\n }\n }", "public function update(Request $request, $id)\n {\n $this->validate($request, [\n 'name' => 'required',\n 'link' => 'required',\n 'description' => 'required'\n ]);\n\n $resource = Resource::find($id);\n $resource->name = $request->name;\n $resource->type_id = $request->type_id;\n $resource->has_cost = ($request->has('has_cost')) ? 1 : 0;\n $resource->language_id = $request->language_id;\n $resource->link = $request->link;\n $resource->description = $request->description;\n $resource->tags = '';\n\n $resource->save();\n //return back()->with('success', 'Recurso actualizado satisfactoriamente');\n return redirect('/resource')->with('success', 'Recurso actualizado satisfactoriamente');\n }", "public function update(Request $request, $id)\n {\n $oldProduct = Product::findOrFail($id);\n $data = $request->all();\n if(isset($data['img'])){\n // $file = $request->file('photo');\n // return $file;\n $imgName = time().'.'.$request->img->extension();\n $data['img'] = $imgName;\n // Storage::putFile('spares', $file);\n $path = $request->img->storeAs('public/uploads', $imgName); //in Storage\n\n //delete old file\n if($oldProduct->img != 'product-default.png'){\n Storage::delete(\"public/uploads/\".$oldProduct->img);\n // return 'deleted';\n }\n \n }else{\n $data['img'] = $oldProduct->img;\n }\n $oldProduct->update($data);\n return redirect()->route('product.index'); \n\n }", "public function update($request, $id) {\n\t\t\t$image = $request['photo'];\n\t\t\tif($image !== null) {\n\t\t\t\t$name = time().'.' . explode('/', explode(':', substr($image, 0, strpos($image, ';')))[1])[1];\n\t\t\t\t\\Image::make($request['photo'])->save(public_path('storage/products/').$name);\n\t\t\t\t$request['photo'] = $name;\n\t\t\t} else {\n\t\t\t\t$currenPhoto = Product::all()->where('id', $id)->first();\n\t\t\t\t$request['photo'] = $currenPhoto->photo;\n\t\t\t}\n return $this->product->update($id, $request);\n\t}", "public function updateStream($path, $resource, Config $config)\n {\n }", "public function edit(Resource $resource)\n {\n //\n }", "public function updateResourceIndex(&$resource) {\n if ($this->connector != null) {\n\n // STEP 1: Update or insert this resource as a node:\n $this->logger->addDebug(\"Updating/Inserting Node into Neo4J database\");\n $result = $this->connector->run(\"MATCH (a:Resource {id: {id} }) SET a.title = {title}, a.version = {version}, a.href = {href}\n return a;\",\n [\n 'id' => $resource->getID(),\n 'version' => $resource->getVersion(),\n 'title' => $resource->getTitle(),\n 'href' => $resource->getLink()\n ]\n );\n\n // Check to see if anything was added\n $records = $result->getRecords();\n if (empty($records)) {\n // Must create this record instead\n $result = $this->connector->run(\"CREATE (n:Resource) SET n += {infos};\",\n [\n \"infos\" => [\n 'id' => $resource->getID(),\n 'version' => $resource->getVersion(),\n 'title' => $resource->getTitle(),\n 'href' => $resource->getLink()\n ]\n ]\n );\n }\n\n // STEP 2: Update or insert the resource's link to holding repository\n $result = $this->connector->run(\"MATCH (a:Resource {id: {id} })-[r:HIRELATION]->()\n return r;\",\n [\n 'id' => $resource->getID(),\n ]\n );\n $records = $result->getRecords();\n if (!empty($records)) {\n // delete the one there so that we can add the correct one (just in case)\n $result = $this->connector->run(\"MATCH (a:Resource {id: {id}})-[r:HIRELATION]->() delete r;\",\n [\n 'id' => $resource->getID()\n ]\n );\n\n }\n\n // If resource has a repository, then add a link\n if ($resource->getRepository() != null && $resource->getRepository()->getID() != null) {\n $this->connector->run(\"MATCH (a:Identity {id: {id1} }) MATCH (b:Resource {id: {id2} }) CREATE (b)-[r:HIRELATION]->(a);\",\n [\n 'id1' => (string) $resource->getRepository()->getID(),\n 'id2' => $resource->getID()\n ]);\n }\n }\n }", "public function update($data) {}", "public function update($data) {}", "public function putStream($resource);", "public function update(Request $request, NebulaResource $resource, $item): RedirectResponse\n {\n $this->authorize('update', $item);\n\n $validated = $request->validate($resource->rules(\n $resource->editFields()\n ));\n\n $resource->updateQuery($item, $validated);\n\n $this->toast(__(':Resource updated', [\n 'resource' => $resource->singularName(),\n ]));\n\n return redirect()->back();\n }", "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 }", "public function update($entity);", "public function update($entity);", "public function setResource($resource);", "public function updateStream($path, $resource, Config $config)\n {\n return $this->upload($path, $resource, $config);\n }", "public function isUpdateResource();", "public function update(Request $request, $id)\n {\n $device = Device::findOrFail($id);\n $device->fill($request->all());\n if ($request->hasFile('icon')) {\n if ($device->hasMedia('icon')) {\n $device->deleteMedia($device->getFirstMedia('icon'));\n }\n $device->addMediaFromRequest('icon')->toMediaCollection('icon');\n }\n $device->save();\n return new DeviceResource($device);\n }", "public function update(Request $request, $id)\n {\n //\n $product = Product::findOrFail($id);\n \n $product->update($request->all());\n \n $file = $request->file('url_image')->move('upload', $request->file('url_image')->getClientOriginalName());\n\n Product::where('id',$id)->update(['url_image'=>$file]);\n \n \\Session::flash('flash_message', 'Edit product successfully.'); \n \n //cũ : return redirect('articles');\n return redirect()->route('products.index');\n }", "public function store($data, Resource $resource);", "public function update(Request $request, $id)\n {\n \n $product = Product::find($id);\n\n\n $product->fill($request->all())->save();\n\n //Verificamos que tenemos una imagen\n if($request->file('photo_1')){\n\n\n //En caso de tenerla la guardamos en la clase Storage en la carpeta public en la carpeta image.\n $path = Storage::disk('public')->put('photo_1',$request->file('photo_1'));\n\n //Actualizamos el Post que acabamos de crear\n $product->fill(['photo_1' => asset($path)])->save();\n\n }\n\n\n return redirect()->route('products.index')->with('info', 'Producto actualizado exitosamente!');\n }", "public function update(Request $request, $id)\n {\n $product = Product::find($id);\n\n if (\\Input::hasFile('image')) {\n $this->imgsave($request, $product);\n }\n\n\n if (!empty($request->input('tags'))) {\n $product->tags()->sync($request->input('tags'));\n } else {\n $product->tags()->detach();\n }\n\n $product->update($request->all());\n\n return redirect()->to('dashboard/product')->with('message', 'update success');\n }", "public function put($resource_path, array $variables = array()) {\n return $this->call($resource_path, $variables, 'PUT');\n }", "public function update($id)\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n if (method_exists($this, 'updateValidations')) {\n $this->request->validate($this->updateValidations());\n }\n\n /* Get the specified resource */\n $resource = $this->model::findOrFail($id);\n\n /* Update the specified resource */\n $resource->update(Input::all());\n\n /* Redirect back */\n return redirect()->back()\n ->with(\n 'info',\n Lang::has($this->name . '.resource-updated') ?\n $this->name . '.resource-updated' :\n 'messages.alert.resource-updated'\n );\n }", "public function putResponse($request)\n {\n $idSearched = $this->searcher->searchResourceIndex(\n $request, \n $this->db[$request['resource']]\n );\n if ($idSearched) {\n $resource = $this->db[$request['resource']][$idSearched];\n $bodyInput = json_decode($this->standardInput, true);\n $resource = BodyRequest::canApplyBody($bodyInput);\n $resource['id'] = (int)$request['param'];\n foreach($resource as $key => $value) {\n $this->db[$request['resource']][$idSearched][$key] = $value;\n }\n file_put_contents(DB_PATH, json_encode($this->db));\n }\n }", "public function update(Storedataset $request, dataset $dataset){\n $dataset->title = $request->input('title');\n $dataset->caption = $request->input('caption');\n $dataset->file_url = $request->input('file_url');\n $dataset->type = $request->input('type');\n $dataset->status = $request->input('status');\n $dataset->publication_id = $request->input('publication_id');\n\n $dataset->save();\n\n return redirect()->route('datasets.show', ['dataset' => $dataset]);\n }", "public function update(Request $request, $id)\n\n {\n ResourceManagement::findOrFail($id);\n $constraints = [\n 'title' => 'required|max:100',\n 'url'=> 'required|max:191',\n 'content' => 'required'\n ];\n\n $input = [\n 'title' => $request['title'],\n 'url' => $request['url'],\n 'content' => $request['content'],\n 'type' => $request['type'],\n 'level' => $request['level'],\n 'user_id' => $request['user']\n ];\n// $this->validate($input, $constraints);\n ResourceManagement::where('id', $id)\n ->update($input);\n\n return redirect()->intended('/resource-management');\n }", "public function update(Request $request, $id)\n {\n $this->validate($request, [\n 'title' => 'required',\n 'description' => 'required|string',\n 'price' => 'required|numeric',\n 'reference'=>'required'\n ]);\n \n $product = Product::find($id);\n $product->update($request->all());\n \n $im = $request->file('picture');\n \n if (!empty($im)) {\n \n $link = $request->file('picture')->store('images');\n \n \n $product->update([\n 'url_image' => $link,\n ]);\n } \n //dump($request->all());\n return redirect()->route('product.index')->with('message', 'Article modifié avec succès');\n }", "public function update(StoreOrUpdateAsset $request, Asset $asset)\n {\n if (Storage::exists($asset->path) && !Storage::delete($asset->path)) {\n abort(500);\n }\n\n $file = $request->file('file');\n $path = $file->store('assets');\n\n if (!$path) {\n abort(500);\n }\n\n // We wonder if we should delete the old file or not...\n\n $asset->name = $file->getClientOriginalName();\n $asset->size = $file->getSize();\n $asset->type = $file->getMimeType();\n $asset->path = $path;\n\n if ($asset->save()) {\n flash('The asset has been saved.')->success();\n } else {\n abort(500);\n }\n\n return redirect('/admin/assets');\n }", "public function update(FoodRecipeRequest $request, $id)\n {\n $foodRecipe = FoodRecipe::with('ingredients','cookingProcesses')->findOrFail($id);\n if ($request->input('name')!= null)\n $foodRecipe->name = $request->input('name');\n if ($request->input('detail')!= null)\n $foodRecipe->detail = $request->input('detail');\n if($request->file('photo') != null) {\n $old_file = $foodRecipe->photo;\n if($old_file != null){\n $path = public_path().'/storage/'.$old_file;\n File::delete($path);\n }\n $file = $request->file('photo');\n $name = '/foodRecipe/' . Carbon::now()->format(\"dnY-Hisu\") . \".\" . $file->extension();\n $file->storePubliclyAs('public', $name);\n $foodRecipe->photo = $name;\n }\n $foodRecipe->save();\n return new FoodRecipeResource($foodRecipe);\n }", "public function update(StorageTypeRequest $request, $id)\n {\n try {\n $this->service->updateStorageType($request, $id);\n return $this->NoContent();\n } catch (EntityNotFoundException $e) {\n \\Log::error($e->getMessage());\n return $this->NotFound($e->getMessage());\n } catch(\\QueryException $e) {\n \\Log::error($e->getMessage());\n return $this->ServerError();\n } catch(Exception $e) {\n \\Log::error($e->getMessage());\n return $this->ServerError();\n }\n }", "public function update(Request $request, $id)\n {\n //validation\n $this->validate(request(),[\n 'image' => 'image'\n ]);\n\n $slider = HomeSliders::find($id);\n \n $slider->link = request('link');\n\n //get old image to delete if updated\n $oldImage = request('oldImage');\n //get the new image\n $NewImage=$request->file('image');\n\n if($NewImage)\n {\n $filenameToStore= helpers::updatePhoto('image','homeSliders',$request);\n $slider->image=$filenameToStore;\n\n Storage::delete('public/Images/homeSliders/'.$oldImage);\n }\n\n $slider->save();\n\n Alert::success(config('app.name'), trans('messages.Updated Successfully') );\n return redirect()->route('admin.homeSlider',$slider->type);\n }", "public function update(Qstore $request, $id)\n {\n //\n }", "public function update(IEntity $entity);", "protected function performUpdate(): bool\n {\n // Abort if resource does not support update operations\n if (!$this->isUpdatable()) {\n throw new UnsupportedOperation(sprintf('API does not support update operation for %s resources', $this->resourceNameSingular()));\n }\n\n $id = $this->id();\n $prepared = $this->prepareBeforeUpdate($this->toArray());\n\n $payload = [\n $this->resourceNameSingular() => $prepared\n ];\n\n $response = $this\n ->request()\n ->put($this->endpoint($id), $payload);\n\n // Extract and (re)populate resource (if possible)\n // Note: Unlike the \"create\" method, Redmine does NOT\n // appear to send back a full resource when it has been\n // successfully updated.\n $this->fill(\n $this->decodeSingle($response)\n );\n\n return true;\n }", "public function update($request, $id);", "function put($resource, $data = null) {\r\n\t\t\r\n\t\tif(isset($data)) {\r\n\t\t\t$this->request_body = $data;\r\n\t\t}\r\n\r\n\t\t// make the call chief\r\n\t\t$this->exec ( \"PUT\", '/' . $resource );\r\n\r\n\t\t// check the request status\r\n\t\tif($this->status_code != 200){\r\n\t\t\t$this->Logger->error(\r\n\t\t\t\tsprintf(\r\n\t\t\t\t\t'GET Call for resource \\'%s\\' Failed.\r\n\t\t\t\t\tStatus: %d,\r\n\t\t\t\t\tRequest: %s\r\n\t\t\t\t\tAPI Error Message: \r\n\t\t\t\t\t%s',\r\n\t\t\t\t\t$resource,\r\n\t\t\t\t\t$this->status_code,\r\n\t\t\t\t\t$this->request_body_raw,\r\n\t\t\t\t\t$this->response_body\r\n\t\t\t\t)\r\n\t\t\t);\r\n\t\t\tthrow new Exception($this->response_body);\r\n\t\t} else {\r\n\t\t\treturn $this->response_parsed;\r\n\t\t}\r\n\t}", "public function updateEntities($resource)\n {\n $json = [\n 'resource' => $resource,\n ];\n $request = $this->createRequest('PUT', '/entities', ['json' => $json]);\n $response = $this->send($request);\n return $response;\n }", "public function updateStream($path, $resource, Config $config)\n {\n return $this->writeStream($path, $resource, $config);\n }", "public function update(Request $request, $id)\n {\n\n $product = Product::findOrFail($id);\n $product->name = $request['name'];\n $product->price = $request['price'];\n $product->stock = $request['stock'];\n $product->description = $request['description'];\n\n $file = $request->file('image');\n $fileName = $file->getClientOriginalName();\n if($fileName != $product->image){\n $request->file('image')->move('images/',$fileName);\n $product->image = $fileName;\n }\n\n $product->save();\n\n return redirect()->route('products.show',\n $product->id)->with('flash_message',\n 'Article, '. $product->name.' updated');\n }", "protected function handleUpdate()\n {\n $resource = $this->argument('resource');\n $action = $this->option('action');\n $startPage = (int)$this->option('startPage');\n $perPage = (int)$this->option('perPage');\n\n try {\n $harvest = Harvest::where('resource', $resource)->where('action', $action)->firstOrFail();\n } catch (\\Exception $e) {\n $this->info('There is no existing action for updating ' . ucwords($action) . ' ' . ucwords($resource) . '.');\n exit('Nothing was updated.');\n }\n\n $options = [\n 'startPage' => $startPage,\n 'perPage' => $perPage,\n 'lastRun' => $harvest->last_run_at\n ];\n\n // If a lastRun was given use that\n // OR if this has never been run before use 2001-01-01\n if (!empty($this->option('lastRun'))) {\n $options['lastRun'] = new Carbon($this->option('lastRun'));\n } elseif (is_null($options['lastRun'])) {\n $options['lastRun'] = new Carbon('2001-01-01');\n }\n\n $job = new UpdateResourceJob(\n $harvest,\n $options\n );\n\n $message = 'Updating ' . $action . ' ' . $resource . ' ' . $perPage . ' at a time';\n if (isset($lastRun)) {\n $message .= ' with entries updated since ' . $lastRun->format('r');\n }\n $this->info($message);\n $this->dispatch($job);\n }", "abstract public function put($data);", "public function update($id, $data);", "public function update($id, $data);", "public function update($id, $data);", "public function update($id, $data);", "public function update($id, $data);", "public function testUpdateSupplierUsingPUT()\n {\n }", "public function update(Request $request, $id)\n {\n $storageplace = Storageplace::findOrFail($id);\n $storageplace->update($request->only(['storageplace']));\n return $storageplace;\n }", "public function updateRelatedImage(Request $request, $id)\n {\n // Delete display image in Storage\n Validator::make($request->all(), ['photos' => \"required|file|image|mimes:jpg,png,jpeg|max:5000\"])->validate();\n\n\n if ($request->hasFile(\"photos\")) {\n\n $photo = ProductsPhoto::find($id);\n $imageName = $photo->photos;\n $exists = Storage::disk('local')->exists(\"public/product_images/\" . $photo->photos);\n\n //delete old image\n if ($exists) {\n Storage::delete('public/product_images/' . $imageName);\n }\n\n //upload new image\n $ext = $request->file('photos')->getClientOriginalExtension(); //jpg\n\n $request->photos->storeAs(\"public/product_images/\", $imageName);\n\n $arrayToUpdate = array('photos' => $imageName);\n DB::table('products_photos')->where('id', $id)->update($arrayToUpdate);\n\n return redirect()->route(\"adminDisplayRelatedImageForm\", ['id' => $photo->product_id]);\n } else {\n\n $error = \"NO Image was Selected\";\n return $error;\n }\n }", "public function update(Request $request, $id)\n {\n $skill = Skill::findOrFail($id);\n\n $skill->skill = $request->skill;\n\n if ($request->hasFile('image')) {\n \\Cloudder::upload($request->file('image'));\n $c=\\Cloudder::getResult();\n // $image = $request->file('image');\n // $filename = time() . '.' . $image->getClientOriginalExtension();\n // $location = public_path('images/' . $filename);\n // Image::make($image)->save($location);\n\n $skill->image = $c['url'];\n }\n\n $skill->save();\n\n Session::flash('success', 'Successsfully updated your skill!');\n return redirect()->route('skills.index');\n }", "public function updateStream($path, $resource, Config $config = null)\n {\n $contents = stream_get_contents($resource);\n\n return $this->write($path, $contents, $config);\n }", "public abstract function update($object);", "public static function update($id, $file)\n {\n Image::delete($id);\n\n Image::save($file);\n }", "public function update(Request $request, $id)\n {\n $product = Product::find($id);\n $image = $product->image;\n if($request->hasFile('image')){\n $image = $request->file('image')->store('files');\n \\Storage::delete($product->image);\n } \n $product->name = $request->get('name');\n $product->price = $request->get('price');\n $product->description = $request->get('description');\n $product->additional_info = $request->get('additional_info');\n $product->category_id = $request->get('category');\n $product->subcategory_id = $request->get('subcategory');\n $product->image = $image;\n $product->save();\n return redirect()->back();\n }", "public function update(Request $request, $id)\n {\n $sli=Slider::find($id);\n $sli->sort_order=$request->input('sort_order');\n $image = $request->file('slider');\n if($image == ''){\n $image = $sli->slider;\n }else{\n $image = base64_encode(file_get_contents($request->file('slider')));\n }\n $sli->slider = $image;\n $sli->save();\n return redirect()->back();\n }", "public function update(ProductRequest $request, $id)\n {\n $input = Product::find($id);\n $data = $request->all();\n if ($file = $request->file('product_photo')){\n $name = time().$file->getClientOriginalName();\n $file->move('product_image',$name);\n $data['product_photo']=$name;\n// $input->update($data);\n }\n $input->update($data);\n return redirect('admin/products/');\n }", "public function update(Request $request, $id)\n {\n $volume = $this->findVolume($id);\n\n if(count($volume) > 0) {\n $volume->str_volume_name = $request->str_volume_name;\n\n $volume->save();\n }\n\n return response()\n ->json(\n array(\n 'message' => 'Volume is successfully updated.',\n 'volume' => $volume\n ),\n 201\n );\n }", "public function update(Request $request, $id)\n {\n $product = ProductModel::find($id);\n $product->name = $request->name;\n $product->description = $request->description;\n $product->price = $request->price;\n $product->stock = $request->stock;\n\n if($request->image!=null){\n $imageName = time().'.'.$request->image->extension();\n $request->image->move(public_path('images'), $imageName);\n $product->image = \"/images/\".$imageName;\n }\n $product->save();\n return redirect(\"/products/index\")->with('success','Product has been updated');\n }", "public function update()\n {\n $accessory = Accessories::find(request('id'));\n\n if ($accessory == null) {\n return response()->json([\"error\" => \"aksesuaras nerastas\"], 404);\n }\n\n $this->validateData();\n $path = $accessory->src;\n\n if (request()->hasFile('src')) {\n\n if (Storage::disk('public')->exists($accessory->src)) {\n Storage::disk('public')->delete($accessory->src);\n }\n $path = request()->file('src')->store('accessoriesImages', 'public');\n }\n\n $accessory->update(array_merge($this->validateData(), ['src' => $path]));\n\n return response()->json([\"data\" => $accessory], 200);\n }", "public function update(ProductStoreRequest $request,$id)\n {\n $data = $request->validated();\n $product = Product::where('id',$id);\n $product->update($data);\n return response(\"Producto actualizado con éxito\",200);\n }", "public function update($entity)\n {\n \n }", "public function updateStream($path, $resource, Config $config)\n {\n return $this->write($path,stream_get_contents($resource),$config);\n }", "public function update($id, Request $request)\n {\n date_default_timezone_set('Asia/Taipei');\n $data = $request->all();\n $dbData = Product::find($id);\n $myfile = Storage::disk('local');\n if ($request->hasFile('img')) {\n $file = $request->file('img');\n $path = $myfile->putFile('public', $file);\n $data['img'] = $myfile->url($path);\n File::delete(public_path($dbData->img));\n }\n $dbData->update($data);\n\n if ($request->hasFile('imgs')) {\n // $this->fetchDestroyByProdId($id);\n $localS = Storage::disk('local');\n\n $fileS = $request->file('imgs');\n $imgs = [];\n foreach ($fileS as $i) {\n $pathS = $localS->putFile('public', $i);\n $imgs[] = $localS->url($pathS);\n }\n foreach ($imgs as $img) {\n ProductImg::create([\n 'product_id' => $id,\n 'img' => $img\n ]);\n }\n }\n\n return redirect()->route('admin');\n }", "public function update(Request $request, Product $product)\n { $remfile= $product->image;\n if($request->filep){\n $product->image=$request->filep;\n File::delete(storage_path('app/public/products/'.$remfile));\n }else{\n $product->image=$remfile;\n }\n //rmdir(storage_path('app/public/products/'.$remfile));\n $product->name = $request->name;\n $product->description = $request->description;\n $product->price = $request->price;\n $product->save();\n sleep(3);\n toast('Details updated successfully','info');\n return redirect('/products');\n }", "public function update($id, $input);", "public function update(ProductRequest $request,int $id): ProductResource\n {\n $attributes = $request->only('supplier_id', 'name', 'warehouses');\n\n return new ProductResource($this->productRepository->update($id, $attributes)); }", "public function update(Request $request, $id)\n {\n $slider=new Slider;\n $slider=$slider::find($id);\n \n \n if($file =$request->file('slider')){\n if(Storage::delete('public/slider/'.$slider->slider)){\n\n //Get file original name//\n \n$original_name=$file->getClientOriginalName();\n\n //Get just the file name\n$filename=pathinfo($original_name,PATHINFO_FILENAME);\n\n//Create new file name\n$name=$filename.'_'.time().'.'.$file->getClientOriginalExtension();\n\n $destination='public/slider';\n $path=$request->slider->storeAs($destination,$name);\n $slider->slider=$name;\n $slider->save();\n return redirect('Admin/slider');\n\n }\n }\n}", "public function update(Request $request, $id)\n {/* dd($request->all()); */\n $acheivePic = $this->acheiveRepo->find($id);\n $acheive = $request->except('_method', '_token', 'photo', 'ar', 'en');\n $acheiveTrans = $request->only('ar', 'en');\n\n if ($request->hasFile('icon')) {\n // Delete old image first.\n $oldPic = public_path() . '/images/acheives/' . $acheivePic->icon;\n File::delete($oldPic);\n\n // Save the new one.\n $image = $request->file('icon');\n $imageName = $this->upload($image, 'acheives');\n $acheive['icon'] = $imageName;\n }\n\n $this->acheiveRepo->update($id, $acheive, $acheiveTrans);\n\n return redirect('admin-panel/widgets/acheive')->with('updated', 'updated');\n }", "public function update(Request $request, $id)\n {\n $data = $request->all();\n extract($data);\n\n $productVarient = new ProductVariant();\n $productVarient = $productVarient->find($id);\n $productVarient->vendor_id = auth()->user()->id;\n $productVarient->description = $prod_desc;\n $productVarient->price = $price;\n\n if(request()->hasFile('photo')){\n $image = request()->file('photo')->getClientOriginalName();\n $imageNewName = auth()->user()->id.'-'.$image;\n $file = request()->file('photo');\n $file->storeAs('images/product',$imageNewName, ['disk' => 'public']);\n $productVarient->image = $imageNewName;\n }\n \n $productVarient->save();\n\n return back()->withStatus(__('Product successfully updated.'));\n }", "public function update(Request $request, $id)\n {\n //if upload new image, delete old image\n $myfile=$request->old_photo;\n if($request->hasfile('photo'))\n {\n $imageName=time().'.'.$request->photo->extension();\n $name=$request->old_photo;\n\n if(file_exists(public_path($name))){\n unlink(public_path($name));\n $request->photo->move(public_path('backendtemplate/truefalseimg'),$imageName);\n $myfile='backendtemplate/truefalseimg/'.$imageName;\n }\n }\n //Update Data\n $truefalsequestion=TrueFalseQuestion::find($id);\n $truefalsequestion->name=$request->name;\n $truefalsequestion->photo=$myfile;\n $truefalsequestion->answer = $request->answer;\n $truefalsequestion->question_id = $request->question;\n $truefalsequestion->save();\n\n //Redirect\n return redirect()->route('truefalsequestions.index'); \n }", "public function update($id);", "public function update($id);", "private function update()\n {\n $this->data = $this->updateData($this->data, $this->actions);\n $this->actions = [];\n }", "public function put($path, $data = null);", "public function update(Request $request, $id)\n {\n $request->validate([\n 'path_image'=>'image',\n 'status'=>'required|in:0,1'\n ]);\n $slider=Slider::whereId($id)->first();\n if (is_null($slider)){\n return redirect()->route('sliders.index')->with('error','Slider does not exist');\n }\n try {\n if ($request->hasFile('path_image')){\n $file = $request->file('path_image');\n\n $image_path= $file->store('/sliders',[\n 'disk'=>'uploads'\n ]);\n Storage::disk('uploads')->delete($slider->image);\n\n $request->merge([\n 'image'=>$image_path,\n ]);\n }\n\n $slider->update( $request->only(['status','image']));\n return redirect()->route('sliders.index')->with('success','Updated successful');\n }catch (\\Exception $exception){\n return redirect()->route('sliders.index')->with(['error'=>'Something error try again']);\n\n }\n }", "public function update() {\n $this->accessory->update($this->accessory_params());\n\n if ($this->accessory->is_valid()) {\n $this->update_accessory_image($this->accessory);\n redirect('/backend/accessories', ['notice' => 'Successfully updated.']);\n } else {\n redirect(\n '/backend/accessories/edit',\n ['error' => $this->accessory->errors_as_string()],\n ['id' => $this->accessory->id]\n );\n }\n }", "public function update(Entity $entity);", "public function update(Request $request, $id)\n {\n $icon = SliderIcon::find($id);\n $data = $request->all();\n $data['active'] = $request->has('active') ? 1 : 0;\n if ($request->hasFile('img')) {\n if (Storage::disk('public')->exists(str_replace('storage', '', $icon->img))){\n Storage::disk('public')->delete(str_replace('storage', '', $icon->img));\n }\n $image = $request->file('img');\n $fileName = time().'_'.Str::lower(Str::random(5)).'.'.$image->getClientOriginalExtension();\n $path_to = '/upload/images/'.getfolderName();\n $image->storeAs('public'.$path_to, $fileName);\n $data['img'] = 'storage'.$path_to.'/'.$fileName;\n }\n $icon->update($data);\n return redirect()->route('slider_icons.index')->with('success', 'Данные преимущества обнавлены');\n }", "public function update() {\n\t $this->layout = false;\n\t \n\t //set default response\n\t $response = array('status'=>'failed', 'message'=>'HTTP method not allowed');\n\t \n\t //check if HTTP method is PUT\n\t if($this->request->is('put')){\n\t //get data from request object\n\t $data = $this->request->input('json_decode', true);\n\t if (empty($data)) {\n\t $data = $this->request->data;\n\t }\n\t \n\t //check if product ID was provided\n\t if (!empty($data['id'])) {\n\t \n\t //set the product ID to update\n\t $this->Player->id = $data['id'];\n\t if ($this->Player->save($data)) {\n\t $response = array('status'=>'success','message'=>'Product successfully updated');\n\t } else {\n\t $response['message'] = \"Failed to update product\";\n\t }\n\t } else {\n\t $response['message'] = 'Please provide product ID';\n\t }\n\t }\n\t \n\t $this->response->type('application/json');\n\t $this->response->body(json_encode($response));\n\n\t return $this->response->send();\n\t}", "public function update(Request $request, $id)\n {\n //validate incoming request\n $request->validate([\n 'name' => 'string|max:100|nullable',\n 'picture' => 'max:2000|mimes:jpeg,jpg,png,svg|nullable', //max size 2mb,\n 'total' => 'integer|min:0|nullable', //value must be > 0\n 'selling_price' => 'numeric|min:0|nullable',\n 'cost_price' => 'numeric|min:0|nullable',\n 'category_id' => 'integer|nullable'\n ]);\n\n try {\n $product = Auth::user()->store->product()->findorFail($id);\n } catch (ModelNotFoundException $e) {\n return response()->json([\n \"message\" => \"Forbidden\"\n ], 403);\n }\n\n //if category id isnt null\n if ($category_id = $request->category_id) {\n if (!$this->isCategoryIdValid($category_id))\n return response()->json([\n \"message\" => \"Category Id is not valid\"\n ], 422);\n else\n $product->category_id = $request->category_id;\n }\n\n //if uploaded file exist\n if ($picture = $request->file(\"picture\")) {\n //if product already has logo\n if ($product->picture)\n Storage::delete(Product::$PICTURE_PATH . \"/\" . $product->picture);\n\n $picture_path = $picture->store(Product::$PICTURE_PATH);\n //remove folder name from path\n $product->picture = str_replace(Product::$PICTURE_PATH . \"/\", '', $picture_path);\n }\n\n $this->renewProduct($product, $request);\n $product->save();\n return response()->json(new ProductResource($product), 200);\n }", "public function update(Request $request, $id)\n {\n $request->validate([\n 'name' => 'required | min:3 | string',\n 'type' => 'required',\n 'producer' => 'required',\n 'image' => 'image | mimes:png,jpg,jpeg',\n 'price_input' => 'required | numeric | min:0 | max:300000000',\n 'promotion_price' => 'required | numeric | max:300000000',\n 'description' => 'required | string',\n\n ]);\n $product = Product::withTrashed()->findOrfail($id);\n $product->name = $request->name;\n $product->id_type = $request->type;\n $product->id_producer = $request->producer;\n\n $product->amount = $request->amount;\n if (request('image')) {\n $product->image = base64_encode(file_get_contents($request->file('image')->getRealPath()));\n }\n\n $product->price_input = $request->price_input;\n\n if ( $request->promotion_price >= 0 && $request->promotion_price < $product->price_input) {\n $product->promotion_price = $request->promotion_price;\n }else{\n return back()->with('error', '\n Do not enter a negative number');\n }\n $product->new = $request->new;\n\n $product->description = $request->description;\n\n $product->save();\n $product->size()->sync(request('size'));\n\n return redirect()->route('product.index')->with('success', 'Product Updated successfully');\n }", "public function update(Request $request, $id)\n {\n $product = Product::find($id);\n\n $product->name = $request->input('name');\n $product->description = $request->input('description');\n $product->lastPrice = $product->price !== $request->input('price') ? $product->price : NULL;\n $product->price = $request->input('price');\n\n if ($request->hasFile('image')) { \n $currentImg = $product->image;\n if ($currentImg) {\n Storage::delete('/public/' . $currentImg);\n }\n $image = $request->file('image'); \n $path = $image->store('images','public');\n $product->image = $path;\n };\n\n $product->save(); \n\n $product_promotions = $request->input('promotion');\n\n $product->promotions()->sync($product_promotions);\n\n return redirect()->route('admin.modify');\n }", "public static function updateImage($fileName, $imageId, $storage)\n {\n //Get image name and storage location for image\n $image = Image::where('id', '=', $imageId)->first();\n\n //Delete old image\n ResourceHandler::delete($image->name, $image->storage);\n\n //Store the new image\n $image->name = $fileName;\n $image->storage = $storage;\n\n $image->save();\n }", "public function update($request, $id)\n {\n $this->checkExits($id);\n $data = $request->except(['_method','_token','photo']);\n\n if($request->photo)\n {\n try {\n $this->UploadFile($request);\n } catch (\\Exception $e) {\n //if has exception , don't has action\n }\n if ($this->img !== '') {\n $data['img'] = $this->img;\n }\n }\n\n $this->object->update($data);\n\n }", "public function updateProduct($request, $product)\n {\n $product->update($request->except(['_token', '_method', 'image']));\n if ($request->hasFile('image')) {\n $image = $request->file('image');\n $imageName = time() . '.' . $request->file('image')->extension();\n // $img = Image::make('public/foo.jpg');\n\n $image_resize = Image::make($image->getRealPath());\n $image_resize->resize(500, 500);\n $image_resize->save(public_path('images/') . $imageName, 100);\n $product->gallery = $imageName;\n $product->save();\n }\n $product->getTags()->sync($request->input('tags'));\n }" ]
[ "0.7425105", "0.70612276", "0.70558053", "0.6896673", "0.6582159", "0.64491373", "0.6346954", "0.62114537", "0.6145042", "0.6119944", "0.61128503", "0.6099993", "0.6087866", "0.6052593", "0.6018941", "0.60060275", "0.59715486", "0.5946516", "0.59400934", "0.59377414", "0.5890722", "0.5860816", "0.5855127", "0.5855127", "0.58513457", "0.5815068", "0.5806887", "0.57525045", "0.57525045", "0.57337505", "0.5723295", "0.5714311", "0.5694472", "0.5691319", "0.56879413", "0.5669989", "0.56565005", "0.56505877", "0.5646085", "0.5636683", "0.5633498", "0.5633378", "0.5632906", "0.5628826", "0.56196684", "0.5609126", "0.5601397", "0.55944353", "0.5582592", "0.5581908", "0.55813426", "0.5575312", "0.55717176", "0.55661047", "0.55624634", "0.55614686", "0.55608666", "0.55599797", "0.55599797", "0.55599797", "0.55599797", "0.55599797", "0.55573726", "0.5556878", "0.5554201", "0.5553069", "0.55530256", "0.5543788", "0.55435944", "0.55412996", "0.55393505", "0.55368495", "0.5535236", "0.5534954", "0.55237365", "0.5520468", "0.55163723", "0.55125296", "0.5511168", "0.5508345", "0.55072427", "0.5502385", "0.5502337", "0.5501029", "0.54995877", "0.54979175", "0.54949397", "0.54949397", "0.54946727", "0.5494196", "0.54941916", "0.54925025", "0.5491807", "0.5483321", "0.5479606", "0.5479408", "0.5478678", "0.54667485", "0.5463411", "0.5460588", "0.5458525" ]
0.0
-1
Add BTDOrderParams to OrderDetails.
public function addBTDOrderParams( BTFContext $btfContext, ?DateTimeInterface $startDateTime = null, ?DateTimeInterface $endDateTime = null ): OrderDetailsBuilder { $xmlBTDOrderParams = $this->dom->createElement('BTDOrderParams'); $this->instance->appendChild($xmlBTDOrderParams); // Add Service to BTDOrderParams. $xmlService = $this->dom->createElement('Service'); $xmlBTDOrderParams->appendChild($xmlService); // Add ServiceName to Service. $xmlServiceName = $this->dom->createElement('ServiceName'); $xmlServiceName->nodeValue = $btfContext->getServiceName(); $xmlService->appendChild($xmlServiceName); // Add optional Scope to Service. if (null !== $btfContext->getScope()) { $xmlScope = $this->dom->createElement('Scope'); $xmlScope->nodeValue = $btfContext->getScope(); $xmlService->appendChild($xmlScope); } // Add optional ServiceOption to Service. if (null !== $btfContext->getServiceOption()) { $xmlServiceOption = $this->dom->createElement('ServiceOption'); $xmlServiceOption->nodeValue = $btfContext->getServiceOption(); $xmlService->appendChild($xmlServiceOption); } // Add optional ContainerFlag to Service. if (null !== $btfContext->getContainerFlag()) { $xmlContainerFlag = $this->dom->createElement('ContainerFlag'); $xmlContainerFlag->nodeValue = $btfContext->getContainerFlag(); $xmlService->appendChild($xmlContainerFlag); } // Add MsgName to Service. $xmlMsgName = $this->dom->createElement('MsgName'); $xmlMsgName->nodeValue = $btfContext->getMsgName(); $xmlService->appendChild($xmlMsgName); // Add optional MsgName version attribute if (null !== $btfContext->getMsgNameVersion()) { $xmlMsgName->setAttribute( 'version', $btfContext->getMsgNameVersion() ); } // Add optional MsgName variant attribute if (null !== $btfContext->getMsgNameVariant()) { $xmlMsgName->setAttribute( 'variant', $btfContext->getMsgNameVariant() ); } // Add optional MsgName format attribute if (null !== $btfContext->getMsgNameFormat()) { $xmlMsgName->setAttribute( 'format', $btfContext->getMsgNameFormat() ); } if (null !== $startDateTime && null !== $endDateTime) { // Add DateRange to BTDOrderParams. $xmlDateRange = $this->createDateRange( $startDateTime, $endDateTime ); $xmlBTDOrderParams->appendChild($xmlDateRange); } return $this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function addBTUOrderParams(\n BTUContext $btuContext\n ): OrderDetailsBuilder {\n $xmlBTUOrderParams = $this->dom->createElement('BTUOrderParams');\n $xmlBTUOrderParams->setAttribute('fileName', $btuContext->getFileName());\n $this->instance->appendChild($xmlBTUOrderParams);\n\n // Add Service to BTUOrderParams.\n $xmlService = $this->dom->createElement('Service');\n $xmlBTUOrderParams->appendChild($xmlService);\n\n // Add ServiceName to Service.\n $xmlServiceName = $this->dom->createElement('ServiceName');\n $xmlServiceName->nodeValue = $btuContext->getServiceName();\n $xmlService->appendChild($xmlServiceName);\n\n // Add optional Scope to Service.\n if (null !== $btuContext->getScope()) {\n $xmlScope = $this->dom->createElement('Scope');\n $xmlScope->nodeValue = $btuContext->getScope();\n $xmlService->appendChild($xmlScope);\n }\n\n // Add optional ServiceOption to Service.\n if (null !== $btuContext->getServiceOption()) {\n $xmlServiceOption = $this->dom->createElement('ServiceOption');\n $xmlServiceOption->nodeValue = $btuContext->getServiceOption();\n $xmlService->appendChild($xmlServiceOption);\n }\n\n // Add optional ContainerFlag to Service.\n if (null !== $btuContext->getContainerFlag()) {\n $xmlContainerFlag = $this->dom->createElement('ContainerFlag');\n $xmlContainerFlag->nodeValue = $btuContext->getContainerFlag();\n $xmlService->appendChild($xmlContainerFlag);\n }\n\n // Add MsgName to Service.\n $xmlMsgName = $this->dom->createElement('MsgName');\n $xmlMsgName->nodeValue = $btuContext->getMsgName();\n $xmlService->appendChild($xmlMsgName);\n\n // Add optional MsgName version attribute\n if (null !== $btuContext->getMsgNameVersion()) {\n $xmlMsgName->setAttribute(\n 'version',\n $btuContext->getMsgNameVersion()\n );\n }\n\n // Add optional MsgName variant attribute\n if (null !== $btuContext->getMsgNameVariant()) {\n $xmlMsgName->setAttribute(\n 'variant',\n $btuContext->getMsgNameVariant()\n );\n }\n\n // Add optional MsgName format attribute\n if (null !== $btuContext->getMsgNameFormat()) {\n $xmlMsgName->setAttribute(\n 'format',\n $btuContext->getMsgNameFormat()\n );\n }\n\n return $this;\n }", "public function addHVTOrderParams(\n HVTContext $hvtContext\n ): OrderDetailsBuilder {\n $xmlHVTOrderParams = $this->dom->createElement('HVTOrderParams');\n $this->instance->appendChild($xmlHVTOrderParams);\n\n $xmlPartnerID = $this->dom->createElement('PartnerID');\n $xmlPartnerID->nodeValue = $hvtContext->getPartnerId();\n $xmlHVTOrderParams->appendChild($xmlPartnerID);\n\n // Add Service to HVDOrderParams.\n $xmlService = $this->dom->createElement('Service');\n $xmlHVTOrderParams->appendChild($xmlService);\n\n // Add ServiceName to Service.\n $xmlServiceName = $this->dom->createElement('ServiceName');\n $xmlServiceName->nodeValue = $hvtContext->getServiceName();\n $xmlService->appendChild($xmlServiceName);\n\n // Add optional Scope to Service.\n if (null !== $hvtContext->getScope()) {\n $xmlScope = $this->dom->createElement('Scope');\n $xmlScope->nodeValue = $hvtContext->getScope();\n $xmlService->appendChild($xmlScope);\n }\n\n // Add optional ServiceOption to Service.\n if (null !== $hvtContext->getServiceOption()) {\n $xmlServiceOption = $this->dom->createElement('ServiceOption');\n $xmlServiceOption->nodeValue = $hvtContext->getServiceOption();\n $xmlService->appendChild($xmlServiceOption);\n }\n\n // Add MsgName to Service.\n $xmlMsgName = $this->dom->createElement('MsgName');\n $xmlMsgName->nodeValue = $hvtContext->getMsgName();\n $xmlService->appendChild($xmlMsgName);\n\n // Add OrderID to HVTOrderParams.\n $xmlOrderID = $this->dom->createElement('OrderID');\n $xmlOrderID->nodeValue = $hvtContext->getOrderId();\n $xmlHVTOrderParams->appendChild($xmlOrderID);\n\n // Add OrderFlags to HVTOrderParams.\n $xmlOrderFlags = $this->dom->createElement('OrderFlags');\n $xmlOrderFlags->setAttribute(\n 'completeOrderData',\n $hvtContext->getCompleteOrderData() ? 'true' : 'false'\n );\n $xmlOrderFlags->setAttribute(\n 'fetchLimit',\n (string)$hvtContext->getFetchLimit()\n );\n $xmlOrderFlags->setAttribute(\n 'fetchOffset',\n (string)$hvtContext->getFetchOffset()\n );\n $xmlHVTOrderParams->appendChild($xmlOrderFlags);\n\n return $this;\n }", "public function addHVEOrderParams(\n HVEContext $hveContext\n ): OrderDetailsBuilder {\n $xmlHVEOrderParams = $this->dom->createElement('HVEOrderParams');\n $this->instance->appendChild($xmlHVEOrderParams);\n\n $xmlPartnerID = $this->dom->createElement('PartnerID');\n $xmlPartnerID->nodeValue = $hveContext->getPartnerId();\n $xmlHVEOrderParams->appendChild($xmlPartnerID);\n\n // Add Service to HVEOrderParams.\n $xmlService = $this->dom->createElement('Service');\n $xmlHVEOrderParams->appendChild($xmlService);\n\n // Add ServiceName to Service.\n $xmlServiceName = $this->dom->createElement('ServiceName');\n $xmlServiceName->nodeValue = $hveContext->getServiceName();\n $xmlService->appendChild($xmlServiceName);\n\n // Add optional Scope to Service.\n if (null !== $hveContext->getScope()) {\n $xmlScope = $this->dom->createElement('Scope');\n $xmlScope->nodeValue = $hveContext->getScope();\n $xmlService->appendChild($xmlScope);\n }\n\n // Add optional ServiceOption to Service.\n if (null !== $hveContext->getServiceOption()) {\n $xmlServiceOption = $this->dom->createElement('ServiceOption');\n $xmlServiceOption->nodeValue = $hveContext->getServiceOption();\n $xmlService->appendChild($xmlServiceOption);\n }\n\n // Add MsgName to Service.\n $xmlMsgName = $this->dom->createElement('MsgName');\n $xmlMsgName->nodeValue = $hveContext->getMsgName();\n $xmlService->appendChild($xmlMsgName);\n\n // Add OrderID to HVEOrderParams.\n $xmlOrderID = $this->dom->createElement('OrderID');\n $xmlOrderID->nodeValue = $hveContext->getOrderId();\n $xmlHVEOrderParams->appendChild($xmlOrderID);\n\n return $this;\n }", "public function addOrder(Order $order);", "function setOrder(array $orderParams)\n {\n foreach ($orderParams as $row)\n {\n if (is_array($this->{$row['name']}))\n array_push($this->{$row['name']}, $row['value']);\n else\n $this->{$row['name']} = $row['value'];\n }\n }", "protected function _addPaymentDetailsElement($order)\n {\n $paymentDetailsElement = $order->addChild('paymentDetails');\n if (isset($this->paymentDetails['tokenCode'])) {\n $this->_addPaymentDetailsForTokenOrder($paymentDetailsElement);\n } else {\n $this->_addPaymentDetailsForCreditCardOrder($paymentDetailsElement);\n }\n $session = $paymentDetailsElement->addChild('session');\n $session['id'] = $this->paymentDetails['sessionId'];\n $session['shopperIPAddress'] = $this->paymentDetails['shopperIpAddress'];\n\n if ($this->paResponse) {\n $info3DSecure = $paymentDetailsElement->addChild('info3DSecure');\n $info3DSecure->addChild('paResponse', $this->paResponse);\n }\n }", "public function addHVDOrderParams(\n HVDContext $hvdContext\n ): OrderDetailsBuilder {\n $xmlHVDOrderParams = $this->dom->createElement('HVDOrderParams');\n $this->instance->appendChild($xmlHVDOrderParams);\n\n $xmlPartnerID = $this->dom->createElement('PartnerID');\n $xmlPartnerID->nodeValue = $hvdContext->getPartnerId();\n $xmlHVDOrderParams->appendChild($xmlPartnerID);\n\n // Add Service to HVDOrderParams.\n $xmlService = $this->dom->createElement('Service');\n $xmlHVDOrderParams->appendChild($xmlService);\n\n // Add ServiceName to Service.\n $xmlServiceName = $this->dom->createElement('ServiceName');\n $xmlServiceName->nodeValue = $hvdContext->getServiceName();\n $xmlService->appendChild($xmlServiceName);\n\n // Add optional Scope to Service.\n if (null !== $hvdContext->getScope()) {\n $xmlScope = $this->dom->createElement('Scope');\n $xmlScope->nodeValue = $hvdContext->getScope();\n $xmlService->appendChild($xmlScope);\n }\n\n // Add optional ServiceOption to Service.\n if (null !== $hvdContext->getServiceOption()) {\n $xmlServiceOption = $this->dom->createElement('ServiceOption');\n $xmlServiceOption->nodeValue = $hvdContext->getServiceOption();\n $xmlService->appendChild($xmlServiceOption);\n }\n\n // Add MsgName to Service.\n $xmlMsgName = $this->dom->createElement('MsgName');\n $xmlMsgName->nodeValue = $hvdContext->getMsgName();\n $xmlService->appendChild($xmlMsgName);\n\n // Add OrderID to HVDOrderParams.\n $xmlOrderID = $this->dom->createElement('OrderID');\n $xmlOrderID->nodeValue = $hvdContext->getOrderId();\n $xmlHVDOrderParams->appendChild($xmlOrderID);\n\n return $this;\n }", "public function setOrderDetail(Order $orderDetail)\n {\n $this->orderDetail = $orderDetail;\n\n return $this;\n }", "function campaignEcommAddOrder($order) {\n $params = array();\n $params[\"order\"] = $order;\n return $this->callServer(\"campaignEcommAddOrder\", $params);\n }", "public function addDescriptionParams()\n {\n $oBasket = $this->getBasket();\n $oConfig = $this->getPayPalConfig();\n $oRequest = $this->getPayPalRequest();\n\n // description\n $sShopNameFull = $oConfig->getBrandName();\n $sShopName = substr($sShopNameFull, 0, 70);\n if ($sShopNameFull != $sShopName) {\n $sShopName .= \"...\";\n }\n\n $sSubj = sprintf($this->getLang()->translateString(\"OEPAYPAL_ORDER_SUBJECT\"), $sShopName, $oBasket->getFPrice(), $oBasket->getBasketCurrency()->name);\n $oRequest->setParameter(\"PAYMENTREQUEST_0_DESC\", $sSubj);\n $oRequest->setParameter(\"PAYMENTREQUEST_0_CUSTOM\", $sSubj);\n }", "public function addOrder($ord) {\n $this->sql .= \" ORDER BY $ord\";\n }", "public function setOrder($params)\n\t{\n\t\treturn $this->request('set-order', $params);\n\t}", "private function addQuoteExtensionAttributesToOrder($order)\n {\n $quoteId = $order->getQuoteId();\n\n /** @var \\Magento\\Quote\\Model\\Quote $mageQuote */\n $mageQuote = $this->mageQuoteFactory->create()->load($quoteId);\n if (!$mageQuote->getId() || !$mageQuote->getLinkedQuotationId()) {\n //no mage quote data available or no quotation quote linked\n return $order;\n }\n\n $quotationId = $mageQuote->getLinkedQuotationId();\n\n /** @var Quote $quotation */\n $quotation = $this->quoteFactory->create()->load($quotationId);\n if (!$quotation->getId()) {\n //no quote data available\n return $order;\n }\n\n $extensionAttributes = $order->getExtensionAttributes();\n if ($extensionAttributes === null) {\n $extensionAttributes = $this->orderExtensionFactory->create();\n }\n\n //modify extension attributes, add the quote increment id\n $extensionAttributes->setQuoteationIncrementId($quotation->getIncrementId());\n\n //add a backend url\n $backendUrl = $this->backendUrl->getUrl(\n 'quotation/quote/view',\n ['quote_id' => $quotation->getId()]\n );\n $extensionAttributes->setQuoteationBackendUrl($backendUrl);\n\n //set extension attributes\n $order->setExtensionAttributes($extensionAttributes);\n\n return $order;\n }", "private function _addDescriptionElement($order)\n {\n $description = $order->addChild('description');\n $this->_addCDATA($description, $this->orderDescription);\n }", "public function setOrder($orderAttributes)\n {\n $this->email = $orderAttributes['email'];\n $this->orderId = $orderAttributes['orderId'];\n }", "public function setOrderAttributes($requestParameters = array());", "public function initOrderDetail(&$orderItem, $item) {\n $payMethod = array('pm_id' => '',\n 'title' => $item['payment_method'],\n 'description' => '');\n\n $orderItem = array('order_id' => $item['order_id'],\n 'display_id' => $item['order_id'], //show id\n 'uname' => $item['shipping_firstname'] . ' ' . $item['shipping_lastname'],\n 'currency' => $item['currency_code'],\n 'shipping_address' => array(),\n 'billing_address' => array(),\n 'payment_method' => $payMethod,\n 'shipping_insurance' => '',\n 'coupon' => $item['coupon_id'],\n 'order_status' => array(),\n 'last_status_id' => $item['order_status_id'], //get current status from history\n 'order_tax' => $item['fax'],\n 'order_date_start' => $item['date_added'],\n 'order_date_finish' => '',\n 'order_date_purchased' => $item['date_modified']);\n }", "public function setOrderData($orderData): Order\n {\n $this->id = $orderData->getIncrementId();\n $this->email = $orderData->getCustomerEmail();\n $this->quoteId = $orderData->getQuoteId();\n $this->storeName = $orderData->getStore()->getName();\n $this->purchaseDate = $orderData->getCreatedAt();\n $this->deliveryMethod = $orderData->getShippingDescription();\n $this->deliveryTotal = (float) number_format(\n (float) $orderData->getShippingAmount(),\n 2,\n '.',\n ''\n );\n $this->currency = $orderData->getOrderCurrencyCode();\n\n /** @var OrderPaymentInterface|InfoInterface $payment */\n $payment = $orderData->getPayment();\n if ($payment) {\n if ($payment->getMethod()) {\n $methodInstance = $payment->getMethodInstance();\n if ($methodInstance) {\n $this->payment = $methodInstance->getTitle();\n }\n }\n }\n\n $this->couponCode = (string) $orderData->getCouponCode();\n\n /*\n * custom order attributes\n */\n $customAttributes = $this->getConfigSelectedCustomOrderAttributes(\n $orderData->getStore()->getWebsite()->getId()\n );\n\n if ($customAttributes) {\n $fields = $this->helper->getOrderTableDescription();\n $this->custom = [];\n foreach ($customAttributes as $customAttribute) {\n if (isset($fields[$customAttribute])) {\n $field = $fields[$customAttribute];\n $value = $this->_getCustomAttributeValue(\n $field,\n $orderData\n );\n if ($value) {\n $this->_assignCustom($field, $value);\n }\n }\n }\n }\n\n /*\n * Billing address.\n */\n $this->processBillingAddress($orderData);\n\n /*\n * Shipping address.\n */\n $this->processShippingAddress($orderData);\n\n $websiteId = $orderData->getStore()->getWebsiteId();\n\n $includeCustomOptions = $this->helper->getWebsiteConfig(\n Config::XML_PATH_CONNECTOR_SYNC_ORDER_PRODUCT_CUSTOM_OPTIONS,\n $websiteId\n );\n\n $orderItemProcessor = $this->orderItemProcessorFactory\n ->create(['data' => [\n 'websiteId' => $websiteId,\n 'includeCustomOptions' => $includeCustomOptions\n ]]);\n\n /*\n * Order items.\n */\n try {\n foreach ($orderData->getAllItems() as $productItem) {\n $productData = $orderItemProcessor->process($productItem);\n $this->mergeProductData($productData);\n }\n } catch (\\InvalidArgumentException $e) {\n $this->logger->debug(\n 'Error processing items for order ID: ' . $orderData->getId(),\n [(string) $e]\n );\n $this->products = [];\n }\n\n $this->orderSubtotal = (float) number_format(\n (float) $orderData->getData('subtotal'),\n 2,\n '.',\n ''\n );\n $this->discountAmount = (float) number_format(\n (float) $orderData->getData('discount_amount'),\n 2,\n '.',\n ''\n );\n $orderTotal = abs(\n $orderData->getData('grand_total') - $orderData->getTotalRefunded()\n );\n $this->orderTotal = (float) number_format($orderTotal, 2, '.', '');\n $this->orderStatus = $orderData->getStatus();\n\n if (!$this->schemaValidator->isValid($this->toArray())) {\n throw new SchemaValidationException(\n $this->schemaValidator,\n __(\"Validation error\")\n );\n }\n\n return $this;\n }", "public function setExtraParams($params = array()) {\n $params['resulturl'] = $params['ipn_url'];\n $params['returnurl'] = $params['return_url'];\n $params['reference'] = $params['vendor_order_id'];\n $params['authemail'] = '';\n $params['id'] = $this->_gatewayInfo->config['integration_id'];\n $params['integration_key'] = $this->_gatewayInfo->config['integration_key'];\n $params['status'] = 'Message';\n return $params;\n }", "public function __construct($order=null)\n {\n $this->data = $order;\n }", "private function setParams()\n {\n $this->params['MERCHANTNUMBER'] = $this->merchantNumber;\n $this->params['OPERATION'] = 'CREATE_ORDER';\n $this->params['ORDERNUMBER'] = $this->operation->getOrderNumber();\n $this->params['AMOUNT'] = $this->operation->getAmount();\n $this->params['CURRENCY'] = $this->operation->getCurrency();\n $this->params['DEPOSITFLAG'] = $this->depositFlag;\n if($this->operation->getMerOrderNum())\n $this->params['MERORDERNUM'] = $this->operation->getMerOrderNum();\n $this->params['URL'] = $this->url;\n\n if($this->operation->getDescription())\n $this->params['DESCRIPTION'] = $this->operation->getDescription();\n if($this->operation->getMd())\n $this->params['MD'] = $this->operation->getMd();\n\n }", "public function __construct($order)\n {\n $this->order = $order;\n }", "public function __construct($order)\n {\n $this->order = $order;\n }", "public function __construct($order)\n {\n $this->order = $order;\n }", "public function __construct($order)\n {\n $this->order = $order;\n }", "public function __construct($order)\n {\n $this->order = $order;\n }", "public function __construct($order)\n {\n $this->order = $order;\n }", "public function __construct($order)\n {\n $this->order = $order;\n }", "public function __construct($order)\n {\n $this->order = $order;\n }", "public function add(OrderAddress $orderAddress): void\n {\n $this->getEntityManager()->persist($orderAddress);\n }", "public function addOrder(IncidentOrder $order)\n {\n $this->orders[] = $order;\n }", "public function __construct($order)\n {\n $this->order=$order;\n }", "public function addOrder(Order $order){\r\n// if(!$this->flagCreateCtriteria)\r\n// throw new Exception('Necesita inicializar el criteria');\r\n\r\n if(!is_array($this->array_order))\r\n $this->array_order = array(\"1\"=>$order->getOrderAtribute());\r\n else\r\n array_push($this->array_order, $order->getOrderAtribute());\r\n $this->type_order = $order->getOrderType();\r\n $this->SQL = MySQL_DB::instance()->DBSQLSelect($this->table, null, $this->array_restrictions, $this->array_order, $this->type_order, true);\r\n return $this;\r\n }", "public function captureOrder(\\TPkgShopPaymentTransactionManager $transactionManager, \\TdbShopOrder $order);", "function buildOrderParams() \n\t{\n\t\tif ($this->sortByGroup === false && $this->sortField != \"\"){\n\t\t\t$this->strOrderBy = \"Order by \".$this->sortField;\n\t\t\tif ($this->sortOrder == \"A\")\n\t\t\t\t$this->strOrderBy .= \" asc\";\n\t\t\telse \n\t\t\t\t$this->strOrderBy .= \" desc\";\n\t\t}\n\t}", "public function addOrders(ArrayObject $orders)\n {\n $this->orders = array_merge($this->orders, $orders);\n }", "public function __construct(Order $order)\n {\n $this->order = $order;\n }", "public function __construct(Order $order)\n {\n $this->order = $order;\n }", "public function __construct(Order $order)\n {\n $this->order = $order;\n }", "public function __construct(Order $order)\n {\n $this->order = $order;\n }", "public function __construct(Order $order)\n {\n $this->order = $order;\n }", "public function __construct(Order $order)\n {\n $this->order = $order;\n }", "public function __construct(Order $order)\n {\n $this->order = $order;\n }", "public function __construct(Order $order)\n {\n $this->order = $order;\n }", "public function __construct(Order $order)\n {\n $this->order = $order;\n }", "public function __construct(Order $order)\n {\n $this->order = $order;\n }", "public function insertOrderDetails($value,$line_item, $mainOrderId)\n {\n //main order\n $order_list_arr['name'] = $value->name;\n $order_list_arr['shpoify_order_id'] = $value->id;\n $order_list_arr['line_item_id'] = $line_item->id;\n $order_list_arr['order_number'] = $value->order_number;\n $order_list_arr['customer_name'] = $value->billing_address->name;\n $order_list_arr['app_id'] = $value->app_id;\n $order_list_arr['checkout_id'] = $value->checkout_id;\n $order_list_arr['token'] = $value->token;\n $order_list_arr['gateway'] = $value->gateway;\n $order_list_arr['total_price'] = $value->total_price;\n $order_list_arr['subtotal_price'] = $value->subtotal_price;\n $order_list_arr['currency'] = $value->currency;\n $order_list_arr['cart_token'] = $value->cart_token;\n $order_list_arr['checkout_token'] = $value->checkout_token;\n $order_list_arr['order_status_url'] = $value->order_status_url;\n\n return OrderDetails::insertGetId($order_list_arr);\n\n }", "public function addOrder(Order $order) {\n $this->orders->add($order);\n }", "public static function addOrderpersondetails(Orderpersondetails $persondetails)\n {\n $persondetails_add_query = \"INSERT INTO TiffinHouseDb.Orderpersondetails (name,email,address,city,state,zip,shippingOption,paymentType,tax,totalPrice,paymentStatus,isCompleted)\n VALUES (:name,:email,:address,:city,:state,:zip,:shippingOption,:paymentType,:tax,:totalPrice,:paymentStatus,:isCompleted)\";\n try {\n self::$db->query($persondetails_add_query);\n self::$db->bind(':name', $persondetails->getName());\n self::$db->bind(':email', $persondetails->getEmail());\n self::$db->bind(':address', $persondetails->getAddress());\n self::$db->bind(':city', $persondetails->getCity());\n self::$db->bind(':state', $persondetails->getState());\n self::$db->bind(':zip', $persondetails->getZip());\n self::$db->bind(':shippingOption', $persondetails->getShippingOption());\n self::$db->bind(':paymentType', $persondetails->getPaymentType());\n self::$db->bind(':tax', $persondetails->getTax());\n self::$db->bind(':totalPrice', $persondetails->getTotalPrice());\n self::$db->bind(':paymentStatus', $persondetails->getPaymentStatus());\n self::$db->bind(':isCompleted', $persondetails->getIsCompleted());\n self::$db->execute();\n $orderId = self::$db->lastInsertedId();\n return $orderId;\n } catch (PDOException $err) {\n echo \"Error : \" . $err->getMessage();\n }\n }", "public function addOrderLayer()\n {\n $transactions = $this->orderDataArray->setOrderIds($this->getOrderIds())->getOrderLayer();\n\n if (!empty($transactions)) {\n /** @var $tm DataLayer */\n $tm = $this->getParentBlock();\n foreach ($transactions as $order) {\n $tm->addCustomDataLayer($order);\n }\n }\n }", "private function create_order_record($id_order) {\n $aux['details'] = $this->m_orders_overview->get_details($id_order);\n\n $record['id_order'] = null; // auto-increment\n $record['id_menu_order'] = $id_order;\n $record['id_table'] = $aux['details'][0]->id_table;\n $record['id_count_ks'] = $aux['details'][0]->id_count_ks;\n $record['date_pay'] = date(\"Y-m-d\");\n\n $record['id_employee'] = $aux['details'][0]->id_employee;\n $record['pay_method'] = 'hotovost';\n $record['sum_price'] = $aux['details'][0]->price;\n $record['is_closed'] = 0;\n\n $this->m_orders_overview->insert_new_order_record($record);\n }", "public function addOrderStatusUpdate(OrderEvent $event)\n {\n $order = $event->getOrder();\n $statusUpdate = new OrderStatusUpdate();\n $statusUpdate->setStatus($order->getStatus());\n $statusUpdate->setOrigin($event->getOrigin());\n $order->addStatusUpdate($statusUpdate);\n }", "function setOrder($order){\n\t\t$this->order=$order;\n\t}", "private function updateOrderData()\n {\n $sign = $this->connector->signRequestKid(\n null,\n $this->connector->accountURL,\n $this->orderURL\n );\n\n $post = $this->connector->post($this->orderURL, $sign);\n if (strpos($post['header'], \"200 OK\") !== false) {\n $this->status = $post['body']['status'];\n $this->expires = $post['body']['expires'];\n $this->identifiers = $post['body']['identifiers'];\n $this->authorizationURLs = $post['body']['authorizations'];\n $this->finalizeURL = $post['body']['finalize'];\n if (array_key_exists('certificate', $post['body'])) {\n $this->certificateURL = $post['body']['certificate'];\n }\n $this->updateAuthorizations();\n } else {\n //@codeCoverageIgnoreStart\n $this->log->error(\"Failed to fetch order for {$this->basename}\");\n //@codeCoverageIgnoreEnd\n }\n }", "public function addBasketParams()\n {\n $oRequest = $this->getPayPalRequest();\n $oBasket = $this->getBasket();\n\n $blVirtualBasket = $oBasket->isVirtualPayPalBasket();\n\n // only downloadable products? missing getter on oxBasket yet\n $oRequest->setParameter(\"NOSHIPPING\", $blVirtualBasket ? \"1\" : \"0\");\n\n if ($blVirtualBasket) {\n $oRequest->setParameter(\"REQCONFIRMSHIPPING\", \"0\");\n }\n // passing basket VAT (tax) value. It is required as in Net mode articles are without VAT, but basket is with VAT.\n // PayPal need this value to check if all articles sum match basket sum.\n if ($oBasket->isCalculationModeNetto()) {\n $oRequest->setParameter(\"PAYMENTREQUEST_0_TAXAMT\", $this->_formatFloat($oBasket->getPayPalBasketVatValue()));\n }\n\n $oRequest->setParameter(\"PAYMENTREQUEST_0_AMT\", $this->_formatFloat($oBasket->getPrice()->getBruttoPrice()));\n $oRequest->setParameter(\"PAYMENTREQUEST_0_CURRENCYCODE\", $oBasket->getBasketCurrency()->name);\n $oRequest->setParameter(\"PAYMENTREQUEST_0_ITEMAMT\", $this->_formatFloat($oBasket->getSumOfCostOfAllItemsPayPalBasket()));\n $oRequest->setParameter(\"PAYMENTREQUEST_0_SHIPPINGAMT\", $this->_formatFloat($oBasket->getDeliveryCosts()));\n $oRequest->setParameter(\"PAYMENTREQUEST_0_SHIPDISCAMT\", $this->_formatFloat($oBasket->getDiscountSumPayPalBasket() * -1));\n\n $oDelivery = oxNew(\"oxDeliverySet\");\n $sDeliveryName = ($oDelivery->load($oBasket->getShippingId())) ? $oDelivery->oxdeliveryset__oxtitle->value : \"#1\";\n\n $oRequest->setParameter(\"L_SHIPPINGOPTIONISDEFAULT0\", \"true\");\n $oRequest->setParameter(\"L_SHIPPINGOPTIONNAME0\", $sDeliveryName);\n $oRequest->setParameter(\"L_SHIPPINGOPTIONAMOUNT0\", $this->_formatFloat($oBasket->getDeliveryCosts()));\n }", "public function addPartyOrdersRequest($dkParamDataArr){\n $rspDetails = array();\n $rspDetails[\"poRequestedStatusDetails\"] = array();\n $rspDetails['poRequestedStatusDetails'][\"isPartyOrderRequestSend\"] = 'NO';\n $rspDetails['poRequestedStatusDetails'][\"partyOrderNo\"] = '';\n // check requested param data length\n if(count($dkParamDataArr)>0 && $dkParamDataArr!=false){\n // add party order request status\n $dkParamDataArr['status'] = 'R';\n // fetch user session data details\n $userSessionDetailsData = commonfunction :: getUserSessionDetails($dkParamDataArr);\n if(count($userSessionDetailsData)>0 && $userSessionDetailsData!=false){\n $dkParamDataArr['partyorder_no'] = commonfunction :: generatePartyOrderNo();\n $dkParamDataArr['user_id'] = $userSessionDetailsData['unmd5UserId'];\n $dkParamDataArr['created_by'] = $userSessionDetailsData['unmd5UserId'];\n $lastPORID = PartyOrdersDao::addPartyOrderRequest($dkParamDataArr);\n if($lastPORID>0 && $lastPORID!=false){\n $rspDetails['poRequestedStatusDetails'][\"isPartyOrderRequestSend\"] = 'YES';\n $rspDetails['poRequestedStatusDetails'][\"partyOrderNo\"] = $dkParamDataArr['partyorder_no'];\n // send sms to end user to inform about party order request recieve by desserts khazana\n // $retEmailSentStatus = commonfunction :: preparedDataSendingEmailAboutPartyOrdersRequestReceiveFromCustomer($dkParamDataArr);\n // $smsMsgBody = \"Sms Testing CJ\";\n // $retSmsSentStatus = utils :: sendSMS(array(\"9975967186\"), $smsMsgBody);\n } \n }\n } \n return $rspDetails;\n }", "public function createExpressCheckoutOrder($tid){}", "public static function addPartyOrderRequest($poRequestParamDetails){\n $connection = Yii::app()->db;\n $sqlColumnNames = \"\";\n $sqlValues = \"\";\n $lastInsertedId = false;\n if(array_key_exists('partyorder_no', $poRequestParamDetails)){\n if($poRequestParamDetails['partyorder_no']!=''){\n $sqlColumnNames.=\" partyorder_no,\";\n $sqlValues.=\"'\".$poRequestParamDetails['partyorder_no'].\"',\";\n }\n }\n if(array_key_exists('user_sessionid', $poRequestParamDetails)){\n if($poRequestParamDetails['user_sessionid']!=''){\n $sqlColumnNames.=\" user_sessionid,\";\n $sqlValues.=\"'\".$poRequestParamDetails['user_sessionid'].\"',\";\n }\n }\n if(array_key_exists('user_id', $poRequestParamDetails)){\n if($poRequestParamDetails['user_id']!=''){\n $sqlColumnNames.=\" user_id,\";\n $sqlValues.=\"'\".$poRequestParamDetails['user_id'].\"',\";\n }\n }\n if(array_key_exists('occassion_title', $poRequestParamDetails)){\n if($poRequestParamDetails['occassion_title']!=''){\n $sqlColumnNames.=\" occassion_title,\";\n $sqlValues.=\"'\".$poRequestParamDetails['occassion_title'].\"',\";\n }\n }\n if(array_key_exists('nos_person', $poRequestParamDetails)){\n if($poRequestParamDetails['nos_person']!=''){\n $sqlColumnNames.=\" nos_person,\";\n $sqlValues.=\"'\".$poRequestParamDetails['nos_person'].\"',\";\n }\n }\n if(array_key_exists('party_date', $poRequestParamDetails)){\n if($poRequestParamDetails['party_date']!=''){\n $sqlColumnNames.=\" party_date,\";\n $sqlValues.=\"'\".$poRequestParamDetails['party_date'].\"',\";\n }\n }\n if(array_key_exists('party_venue', $poRequestParamDetails)){\n if($poRequestParamDetails['party_venue']!=''){\n $sqlColumnNames.=\" party_venue,\";\n $sqlValues.=\"'\".$poRequestParamDetails['party_venue'].\"',\";\n }\n }\n if(array_key_exists('party_requirements', $poRequestParamDetails)){\n if($poRequestParamDetails['party_requirements']!=''){\n $sqlColumnNames.=\" party_requirements,\";\n $sqlValues.=\"'\".$poRequestParamDetails['party_requirements'].\"',\";\n }\n }\n if(array_key_exists('file', $poRequestParamDetails)){\n if($poRequestParamDetails['file']!=''){\n $sqlColumnNames.=\" file,\";\n $sqlValues.=\"'\".$poRequestParamDetails['file'].\"',\";\n }\n }\n if(array_key_exists('created_by', $poRequestParamDetails)){\n if($poRequestParamDetails['created_by']!=''){\n $sqlColumnNames.=\" created_by,\";\n $sqlValues.=\"'\".$poRequestParamDetails['created_by'].\"',\";\n }\n }\n if(array_key_exists('status', $poRequestParamDetails)){\n if($poRequestParamDetails['status']!=''){\n $sqlColumnNames.=\" status,\";\n $sqlValues.=\"'\".$poRequestParamDetails['status'].\"',\";\n }\n }\n if($sqlValues!='' && $sqlColumnNames!=''){\n $poRequestParamDetails['created_datedtime'] = date('Y-m-d H:i:s');\n $sqlColumnNames.=\" created_datedtime,\";\n $sqlValues.=\"'\".$poRequestParamDetails['created_datedtime'].\"',\";\n $sqlQuery = \" INSERT INTO DK_PARTYORDERS_REQUEST \" .rtrim(\"(\".$sqlColumnNames, ',').\") \".rtrim(\" VALUES(\".$sqlValues, ',').\")\";\n $command = $connection->createCommand($sqlQuery);\n $result = $command->execute();\n if($result>=1){\n $lastInsertedId = $connection->getLastInsertID();\n }\n }\n return $lastInsertedId;\n }", "public function setShippingDataToQuote($params)\n {\n $quote = Mage::getSingleton('checkout/session')->getQuote();\n $shippingAddress = $quote->getShippingAddress();\n $params = new Varien_Object($params);\n\n // master data\n $deliveryFirstname = '';\n $deliveryLastname = '';\n $deliveryFullname = $params->getData('delivery_fullname');\n if ($deliveryFullname) {\n $deliveryFullname = explode(' ', $deliveryFullname);\n $deliveryLastname = array_pop($deliveryFullname);\n $deliveryFirstname = empty($deliveryFullname) ? '' : implode($deliveryFullname);\n }\n $shippingAddress->setFirstname($deliveryFirstname);\n $shippingAddress->setLastname($deliveryLastname);\n $shippingAddress->setTelephone($params->getData('delivery_telephone'));\n\n $shippingStreet = array(\n $params->getDeliveryAddress1(),\n $params->getDeliveryAddress3()\n );\n\n // address data\n $shippingAddress->setStreetFull($shippingStreet);\n $shippingAddress->setCompany($params->getDeliveryAddress2());\n $shippingAddress->setCity($params->getData('delivery_city'));\n $shippingAddress->setCountryId($params->getData('delivery_country'));\n $shippingAddress->setRegion($params->getData('delivery_country_subdivision'));\n $region = Mage::getModel('expercash/directory_region')->loadByName(\n $shippingAddress->getRegion(), $shippingAddress->getCountryId()\n );\n $shippingAddress->setRegionId($region->getId());\n $shippingAddress->setPostcode($params->getData('delivery_zip'));\n\n $shippingAddress->save();\n }", "public function setOrder(?string $order): void\n {\n $this->order = $order;\n }", "public function setOrder(?string $order): void\n {\n $this->order = $order;\n }", "public function AddOrder($order)\n\t\t{\n\t\t\tif (!isset($this->Orders))\n\t\t\t{\n\t\t\t\t$this->Orders = array();\n\t\t\t}\n\n\t\t\tif ($order instanceof DataPushOrder && !in_array($order, $this->Orders))\n\t\t\t{\n\t\t\t\tarray_push($this->Orders, $order);\n\t\t\t}\n\t\t}", "protected function insertOrder(&$page, $obj, $putOrderId = true)\r\n {\r\n if ($obj instanceof Mage_Sales_Model_Order) {\r\n $shipment = null;\r\n $order = $obj;\r\n } elseif ($obj instanceof Mage_Sales_Model_Order_Shipment) {\r\n $shipment = $obj;\r\n $order = $shipment->getOrder();\r\n }\r\n\r\n /* AW_Lib START */\r\n $this->setOrderModel($order);\r\n $this->collectSectionModels();\r\n /* AW_Lib END */\r\n\r\n $this->y = $this->y ? $this->y : 815;\r\n $top = $this->y;\r\n\r\n $page->setFillColor(new Zend_Pdf_Color_GrayScale(0.45));\r\n $page->setLineColor(new Zend_Pdf_Color_GrayScale(0.45));\r\n $page->drawRectangle(25, $top, 570, $top - 55);\r\n $page->setFillColor(new Zend_Pdf_Color_GrayScale(1));\r\n $this->setDocHeaderCoordinates(array(25, $top, 570, $top - 55));\r\n $this->_setFontRegular($page, 10);\r\n\r\n if ($putOrderId) {\r\n $page->drawText(\r\n Mage::helper('sales')->__('Order # ') . $order->getRealOrderId(), 35, ($top -= 30), 'UTF-8'\r\n );\r\n }\r\n $page->drawText(\r\n Mage::helper('sales')->__('Order Date: ') . Mage::helper('core')->formatDate(\r\n $order->getCreatedAtStoreDate(), 'medium', false\r\n ),\r\n 35,\r\n ($top -= 15),\r\n 'UTF-8'\r\n );\r\n\r\n $top -= 10;\r\n $page->setFillColor(new Zend_Pdf_Color_Rgb(0.93, 0.92, 0.92));\r\n $page->setLineColor(new Zend_Pdf_Color_GrayScale(0.5));\r\n $page->setLineWidth(0.5);\r\n $page->drawRectangle(25, $top, 275, ($top - 25));\r\n $page->drawRectangle(275, $top, 570, ($top - 25));\r\n\r\n /* Calculate blocks info */\r\n\r\n /* Billing Address */\r\n $billingAddress = $this->_formatAddress($order->getBillingAddress()->format('pdf'));\r\n\r\n /* Payment */\r\n $paymentInfo = Mage::helper('payment')->getInfoBlock($order->getPayment())\r\n ->setIsSecureMode(true)\r\n ->toPdf();\r\n $paymentInfo = htmlspecialchars_decode($paymentInfo, ENT_QUOTES);\r\n $payment = explode('{{pdf_row_separator}}', $paymentInfo);\r\n foreach ($payment as $key=>$value){\r\n if (strip_tags(trim($value)) == '') {\r\n unset($payment[$key]);\r\n }\r\n }\r\n reset($payment);\r\n\r\n /* Shipping Address and Method */\r\n if (!$order->getIsVirtual()) {\r\n /* Shipping Address */\r\n $shippingAddress = $this->_formatAddress($order->getShippingAddress()->format('pdf'));\r\n $shippingMethod = $order->getShippingDescription();\r\n }\r\n\r\n $page->setFillColor(new Zend_Pdf_Color_GrayScale(0));\r\n $this->_setFontBold($page, 12);\r\n $page->drawText(Mage::helper('sales')->__('Sold to:'), 35, ($top - 15), 'UTF-8');\r\n\r\n if (!$order->getIsVirtual()) {\r\n $page->drawText(Mage::helper('sales')->__('Ship to:'), 285, ($top - 15), 'UTF-8');\r\n } else {\r\n $page->drawText(Mage::helper('sales')->__('Payment Method:'), 285, ($top - 15), 'UTF-8');\r\n }\r\n\r\n $addressesHeight = $this->_calcAddressHeight($billingAddress);\r\n if (!$order->getIsVirtual() && isset($shippingAddress)) {\r\n $addressesHeight = max($addressesHeight, $this->_calcAddressHeight($shippingAddress));\r\n }\r\n\r\n $page->setFillColor(new Zend_Pdf_Color_GrayScale(1));\r\n $page->drawRectangle(25, ($top - 25), 570, $top - 33 - $addressesHeight);\r\n $page->setFillColor(new Zend_Pdf_Color_GrayScale(0));\r\n $this->_setFontRegular($page, 10);\r\n $this->y = $top - 40;\r\n $addressesStartY = $this->y;\r\n\r\n foreach ($billingAddress as $value){\r\n if ($value !== '') {\r\n $text = array();\r\n foreach (Mage::helper('core/string')->str_split($value, 45, true, true) as $_value) {\r\n $text[] = $_value;\r\n }\r\n foreach ($text as $part) {\r\n $page->drawText(strip_tags(ltrim($part)), 35, $this->y, 'UTF-8');\r\n $this->y -= 15;\r\n }\r\n }\r\n }\r\n\r\n if (!$order->getIsVirtual()) {\r\n $this->y = $addressesStartY;\r\n foreach ($shippingAddress as $value){\r\n if ($value!=='') {\r\n $text = array();\r\n foreach (Mage::helper('core/string')->str_split($value, 45, true, true) as $_value) {\r\n $text[] = $_value;\r\n }\r\n foreach ($text as $part) {\r\n $page->drawText(strip_tags(ltrim($part)), 285, $this->y, 'UTF-8');\r\n $this->y -= 15;\r\n }\r\n }\r\n }\r\n\r\n /* AW_Lib after Address section START */\r\n foreach ($this->_sectionModels as $sectionModel) {\r\n if ($sectionModel->hasAfterAddressSection()) {\r\n $this->insertSection($page, $this->y, $sectionModel->getAddressSectionData());\r\n }\r\n }\r\n /* AW_Lib after Address section END */\r\n\r\n $page->setFillColor(new Zend_Pdf_Color_Rgb(0.93, 0.92, 0.92));\r\n $page->setLineWidth(0.5);\r\n $page->drawRectangle(25, $this->y, 275, $this->y-25);\r\n $page->drawRectangle(275, $this->y, 570, $this->y-25);\r\n\r\n $this->y -= 15;\r\n $this->_setFontBold($page, 12);\r\n $page->setFillColor(new Zend_Pdf_Color_GrayScale(0));\r\n $page->drawText(Mage::helper('sales')->__('Payment Method'), 35, $this->y, 'UTF-8');\r\n $page->drawText(Mage::helper('sales')->__('Shipping Method:'), 285, $this->y , 'UTF-8');\r\n\r\n $this->y -=10;\r\n $page->setFillColor(new Zend_Pdf_Color_GrayScale(1));\r\n\r\n $this->_setFontRegular($page, 10);\r\n $page->setFillColor(new Zend_Pdf_Color_GrayScale(0));\r\n\r\n $paymentLeft = 35;\r\n $yPayments = $this->y - 15;\r\n } else {\r\n $yPayments = $addressesStartY;\r\n $paymentLeft = 285;\r\n }\r\n\r\n foreach ($payment as $value){\r\n if (trim($value) != '') {\r\n //Printing \"Payment Method\" lines\r\n $value = preg_replace('/<br[^>]*>/i', \"\\n\", $value);\r\n foreach (Mage::helper('core/string')->str_split($value, 45, true, true) as $_value) {\r\n $page->drawText(strip_tags(trim($_value)), $paymentLeft, $yPayments, 'UTF-8');\r\n $yPayments -= 15;\r\n }\r\n }\r\n }\r\n\r\n if (!$order->getIsVirtual()) {\r\n $topMargin = 15;\r\n $methodStartY = $this->y;\r\n $this->y -= 15;\r\n\r\n foreach (Mage::helper('core/string')->str_split($shippingMethod, 45, true, true) as $_value) {\r\n $page->drawText(strip_tags(trim($_value)), 285, $this->y, 'UTF-8');\r\n $this->y -= 15;\r\n }\r\n\r\n $yShipments = $this->y;\r\n $totalShippingChargesText = \"(\" . Mage::helper('sales')->__('Total Shipping Charges') . \" \"\r\n . $order->formatPriceTxt($order->getShippingAmount()) . \")\";\r\n\r\n $page->drawText($totalShippingChargesText, 285, $yShipments - $topMargin, 'UTF-8');\r\n $yShipments -= $topMargin + 10;\r\n\r\n $tracks = array();\r\n if ($shipment) {\r\n $tracks = $shipment->getAllTracks();\r\n }\r\n if (count($tracks)) {\r\n $page->setFillColor(new Zend_Pdf_Color_Rgb(0.93, 0.92, 0.92));\r\n $page->setLineWidth(0.5);\r\n $page->drawRectangle(285, $yShipments, 510, $yShipments - 10);\r\n $page->drawLine(400, $yShipments, 400, $yShipments - 10);\r\n //$page->drawLine(510, $yShipments, 510, $yShipments - 10);\r\n\r\n $this->_setFontRegular($page, 9);\r\n $page->setFillColor(new Zend_Pdf_Color_GrayScale(0));\r\n //$page->drawText(Mage::helper('sales')->__('Carrier'), 290, $yShipments - 7 , 'UTF-8');\r\n $page->drawText(Mage::helper('sales')->__('Title'), 290, $yShipments - 7, 'UTF-8');\r\n $page->drawText(Mage::helper('sales')->__('Number'), 410, $yShipments - 7, 'UTF-8');\r\n\r\n $yShipments -= 20;\r\n $this->_setFontRegular($page, 8);\r\n foreach ($tracks as $track) {\r\n\r\n $CarrierCode = $track->getCarrierCode();\r\n if ($CarrierCode != 'custom') {\r\n $carrier = Mage::getSingleton('shipping/config')->getCarrierInstance($CarrierCode);\r\n $carrierTitle = $carrier->getConfigData('title');\r\n } else {\r\n $carrierTitle = Mage::helper('sales')->__('Custom Value');\r\n }\r\n\r\n //$truncatedCarrierTitle = substr($carrierTitle, 0, 35) . (strlen($carrierTitle) > 35 ? '...' : '');\r\n $maxTitleLen = 45;\r\n $endOfTitle = strlen($track->getTitle()) > $maxTitleLen ? '...' : '';\r\n $truncatedTitle = substr($track->getTitle(), 0, $maxTitleLen) . $endOfTitle;\r\n //$page->drawText($truncatedCarrierTitle, 285, $yShipments , 'UTF-8');\r\n $page->drawText($truncatedTitle, 292, $yShipments , 'UTF-8');\r\n $page->drawText($track->getNumber(), 410, $yShipments , 'UTF-8');\r\n $yShipments -= $topMargin - 5;\r\n }\r\n } else {\r\n $yShipments -= $topMargin - 5;\r\n }\r\n\r\n $currentY = min($yPayments, $yShipments);\r\n\r\n // replacement of Shipments-Payments rectangle block\r\n $page->drawLine(25, $methodStartY, 25, $currentY); //left\r\n $page->drawLine(25, $currentY, 570, $currentY); //bottom\r\n $page->drawLine(570, $currentY, 570, $methodStartY); //right\r\n\r\n $this->y = $currentY - 7;\r\n\r\n /* AW_Lib after Payment/Shipment section START */\r\n foreach ($this->_sectionModels as $sectionModel) {\r\n if ($sectionModel->hasAfterPaymentShipmentSection()) {\r\n $this->insertSection($page, $this->y, $sectionModel->getPaymentShipmentSectionData());\r\n }\r\n }\r\n /* AW_Lib after Payment/Shipment section END */\r\n }\r\n\r\n /* AW_Lib after Custom section START */\r\n foreach ($this->_sectionModels as $sectionModel) {\r\n if ($sectionModel->hasCustomSection()) {\r\n $this->insertSection($page, $this->y, $sectionModel->getCustomSectionData());\r\n }\r\n }\r\n /* AW_Lib after Custom section END */\r\n }", "function addToppingOrder($db, $orderID, $toppings){\n\terror_log(\"server addTopping\");\n\t$toppingString = '';\n\tforeach ($toppings as $topping){\n\t\t$toppingString = $toppingString . ' ' . $topping;\n\t}\n\t\t$query = 'INSERT INTO order_topping\n\t\t\t\t\t(order_id, topping)\n\t\t\t\tVALUES \n\t\t\t\t\t(:order_id, :topping)';\n\t\t$statement = $db->prepare($query);\n \t$statement->bindValue(':order_id', $orderID);\n \t$statement->bindValue(':topping', $toppingString);\n \t$statement->execute();\n \t$statement->closeCursor();\n}", "public function addOrderedItemsToStock($order)\r\n {\r\n \t$nVersion = Mage::getModel('paymentsensegateway/direct')->getVersion();\r\n \t$isCustomStockManagementEnabled = Mage::getModel('paymentsensegateway/direct')->getConfigData('customstockmanagementenabled');\r\n\t\t\r\n \tif($nVersion >= 1410 &&\r\n \t\t$isCustomStockManagementEnabled)\r\n \t{\r\n\t \t$items = $order->getAllItems();\r\n\t\t\tforeach ($items as $itemId => $item)\r\n\t\t\t{\r\n\t\t\t\t// ordered quantity of the item from stock\r\n\t\t\t\t$quantity = $item->getQtyOrdered();\r\n\t\t\t\t$productId = $item->getProductId();\r\n\t\t\t\t\r\n\t\t\t\t$stock = Mage::getModel('cataloginventory/stock_item')->loadByProduct($productId);\r\n\t\t\t\t$stockManagement = $stock->getManageStock();\r\n\t\t\t\t\r\n\t\t\t\tif($stockManagement)\r\n\t\t\t\t{\r\n\t\t\t\t\t$stock->setQty($stock->getQty() + $quantity);\r\n\t\t\t\t\t$stock->save();\r\n\t\t\t\t}\r\n\t\t\t}\r\n \t}\r\n }", "public function setOrder($order);", "private function loadOrder()\n {\n $brqOrderId = $this->getOrderIncrementId();\n\n //Check if the order can receive further status updates\n $this->order->loadByIncrementId((string) $brqOrderId);\n\n if (!$this->order->getId()) {\n $this->logging->addDebug('Order could not be loaded by brq_invoicenumber or brq_ordernumber');\n // try to get order by transaction id on payment.\n $this->order = $this->getOrderByTransactionKey();\n }\n }", "private function _createOrder($_cart, $_usr)\n {\n //\t\tTODO We need tablefields for the new values:\n //\t\tShipment:\n //\t\t$_prices['shipmentValue']\t\tw/out tax\n //\t\t$_prices['shipmentTax']\t\t\tTax\n //\t\t$_prices['salesPriceShipment']\tTotal\n //\n //\t\tPayment:\n //\t\t$_prices['paymentValue']\t\tw/out tax\n //\t\t$_prices['paymentTax']\t\t\tTax\n //\t\t$_prices['paymentDiscount']\t\tDiscount\n //\t\t$_prices['salesPricePayment']\tTotal\n\n $_orderData = new stdClass();\n\n $_orderData->virtuemart_order_id = null;\n $oldOrderNumber = '';\n\n $this->deleteOldPendingOrder($_cart);\n\n\n $_orderData->virtuemart_user_id = $_usr->get('id');\n $_orderData->virtuemart_vendor_id = $_cart->vendorId;\n $_orderData->customer_number = $_cart->customer_number;\n $_prices = $_cart->cartPrices;\n //Note as long we do not have an extra table only storing addresses, the virtuemart_userinfo_id is not needed.\n //The virtuemart_userinfo_id is just the id of a stored address and is only necessary in the user maintance view or for choosing addresses.\n //the saved order should be an snapshot with plain data written in it.\n //\t\t$_orderData->virtuemart_userinfo_id = 'TODO'; // $_cart['BT']['virtuemart_userinfo_id']; // TODO; Add it in the cart... but where is this used? Obsolete?\n $_orderData->order_total = $_prices['billTotal'];\n $_orderData->order_salesPrice = $_prices['salesPrice'];\n $_orderData->order_billTaxAmount = $_prices['billTaxAmount'];\n $_orderData->order_billDiscountAmount = $_prices['billDiscountAmount'];\n $_orderData->order_discountAmount = $_prices['discountAmount'];\n $_orderData->order_subtotal = $_prices['priceWithoutTax'];\n $_orderData->order_tax = $_prices['taxAmount'];\n $_orderData->order_shipment = $_prices['shipmentValue'];\n $_orderData->order_shipment_tax = $_prices['shipmentTax'];\n $_orderData->order_payment = $_prices['paymentValue'];\n $_orderData->order_payment_tax = $_prices['paymentTax'];\n\n if (!empty($_cart->cartData['VatTax'])) {\n $taxes = array();\n foreach ($_cart->cartData['VatTax'] as $k => $VatTax) {\n $taxes[$k]['virtuemart_calc_id'] = $k;\n $taxes[$k]['calc_name'] = $VatTax['calc_name'];\n $taxes[$k]['calc_value'] = $VatTax['calc_value'];\n $taxes[$k]['result'] = $VatTax['result'];\n }\n $_orderData->order_billTax = vmJsApi::safe_json_encode($taxes);\n }\n\n if (!empty($_cart->couponCode)) {\n $_orderData->coupon_code = $_cart->couponCode;\n $_orderData->coupon_discount = $_prices['salesPriceCoupon'];\n }\n $_orderData->order_discount = $_prices['discountAmount']; // discount order_items\n\n\n $_orderData->order_status = 'P';\n $_orderData->order_currency = $this->getVendorCurrencyId($_orderData->virtuemart_vendor_id);\n\n if (isset($_cart->pricesCurrency)) {\n $_orderData->user_currency_id = $_cart->pricesCurrency;\n $currency = CurrencyDisplay::getInstance($_orderData->user_currency_id);\n if ($_orderData->user_currency_id != $_orderData->order_currency) {\n $_orderData->user_currency_rate = $currency->convertCurrencyTo($_orderData->user_currency_id, 1.0, false);\n } else {\n $_orderData->user_currency_rate = 1.0;\n }\n }\n\n $shoppergroups = $_cart->user->get('shopper_groups');\n if (!empty($shoppergroups)) {\n $_orderData->user_shoppergroups = implode(',', $shoppergroups);\n }\n\n if (isset($_cart->paymentCurrency)) {\n $_orderData->payment_currency_id = $_cart->paymentCurrency; //$this->getCurrencyIsoCode($_cart->pricesCurrency);\n $currency = CurrencyDisplay::getInstance($_orderData->payment_currency_id);\n if ($_orderData->payment_currency_id != $_orderData->order_currency) {\n $_orderData->payment_currency_rate = $currency->convertCurrencyTo($_orderData->payment_currency_id, 1.0, false);\n } else {\n $_orderData->payment_currency_rate = 1.0;\n }\n }\n\n $_orderData->virtuemart_paymentmethod_id = $_cart->virtuemart_paymentmethod_id;\n $_orderData->virtuemart_shipmentmethod_id = $_cart->virtuemart_shipmentmethod_id;\n\n //Some payment plugins need a new order_number for any try\n $_orderData->order_number = '';\n $_orderData->order_pass = '';\n\n $_orderData->order_language = $_cart->order_language;\n $_orderData->ip_address = ShopFunctions::getClientIP();;\n\n $maskIP = VmConfig::get('maskIP', 'last');\n if ($maskIP == 'last') {\n $rpos = strrpos($_orderData->ip_address, '.');\n $_orderData->ip_address = substr($_orderData->ip_address, 0, ($rpos + 1)) . 'xx';\n }\n\n //lets merge here the userdata from the cart to the order so that it can be used\n if (!empty($_cart->BT)) {\n $continue = array('created_on' => 1, 'created_by' => 1, 'modified_on' => 1, 'modified_by' => 1, 'locked_on' => 1, 'locked_by' => 1);\n foreach ($_cart->BT as $k => $v) {\n if (isset($continue[$k])) continue;\n $_orderData->{$k} = $v;\n }\n }\n $_orderData->STsameAsBT = $_cart->STsameAsBT;\n unset($_orderData->created_on);\n\n JPluginHelper::importPlugin('vmshopper');\n $dispatcher = JDispatcher::getInstance();\n $plg_datas = $dispatcher->trigger('plgVmOnUserOrder', array(&$_orderData));\n\n\n $i = 0;\n while ($oldOrderNumber == $_orderData->order_number) {\n if ($i > 5) {\n $msg = 'Could not generate new unique ordernumber';\n vmError($msg . ', an ordernumber should contain at least one random char', $msg);\n break;\n }\n $_orderData->order_number = $this->genStdOrderNumber($_orderData->virtuemart_vendor_id);\n if (!empty($oldOrderNumber)) vmdebug('Generated new ordernumber ', $oldOrderNumber, $_orderData->order_number);\n $i++;\n }\n if (empty($_orderData->order_pass)) {\n $_orderData->order_pass = $this->genStdOrderPass();\n }\n if (empty($_orderData->order_create_invoice_pass)) {\n $_orderData->order_create_invoice_pass = $this->genStdCreateInvoicePass();\n }\n\n $orderTable = $this->getTable('orders');\n $orderTable->bindChecknStore($_orderData);\n\n if (!empty($_cart->couponCode)) {\n //set the virtuemart_order_id in the Request for 3rd party coupon components (by Seyi and Max)\n vRequest::setVar('virtuemart_order_id', $orderTable->virtuemart_order_id);\n // If a gift coupon was used, remove it now\n CouponHelper::setInUseCoupon($_cart->couponCode, true);\n }\n // the order number is saved into the session to make sure that the correct cart is emptied with the payment notification\n $_cart->order_number = $orderTable->order_number;\n $_cart->order_pass = $_orderData->order_pass;\n $_cart->virtuemart_order_id = $orderTable->virtuemart_order_id;\n $_cart->setCartIntoSession();\n\n return $orderTable->virtuemart_order_id;\n }", "public function setOrderId(?string $orderId): void\n {\n $this->orderId['value'] = $orderId;\n }", "private function processOpenOrderDetails(array $orderValue, array $orders, $orderKey)\n {\n /** @var array $orderDetails */\n $orderDetails = $this->db->fetchAll(\n 'SELECT * FROM s_order_details WHERE orderID = ? ORDER BY id ASC',\n [$orderValue['id']]\n );\n\n if (!count($orderDetails)) {\n unset($orders[$orderKey]);\n\n return $orders;\n }\n\n $context = $this->contextService->getShopContext();\n $orderProductOrderNumbers = array_column($orderDetails, 'articleordernumber');\n $listProducts = Shopware()->Container()->get('shopware_storefront.list_product_service')\n ->getList($orderProductOrderNumbers, $context);\n $listProducts = Shopware()->Container()->get('legacy_struct_converter')\n ->convertListProductStructList($listProducts);\n\n foreach ($listProducts as &$listProduct) {\n $listProduct = array_merge($listProduct, $listProduct['prices'][0]);\n }\n\n foreach ($orderDetails as $orderDetailsKey => $orderDetailsValue) {\n $orderDetails[$orderDetailsKey]['amountNumeric'] = round($orderDetailsValue['price'] * $orderDetailsValue['quantity'], 2);\n $orderDetails[$orderDetailsKey]['priceNumeric'] = $orderDetailsValue['price'];\n $orderDetails[$orderDetailsKey]['amount'] = $this->moduleManager->Articles()\n ->sFormatPrice($orderDetails[$orderDetailsKey]['amountNumeric']);\n $orderDetails[$orderDetailsKey]['price'] = $this->moduleManager->Articles()\n ->sFormatPrice($orderDetailsValue['price']);\n $orderDetails[$orderDetailsKey]['active'] = 0;\n\n $tmpProduct = null;\n if (!empty($listProducts[$orderDetailsValue['articleordernumber']])) {\n $tmpProduct = $listProducts[$orderDetailsValue['articleordernumber']];\n }\n\n if (!empty($tmpProduct) && is_array($tmpProduct)) {\n // Set product in activate state\n $orderDetails[$orderDetailsKey]['active'] = 1;\n $orderDetails[$orderDetailsKey]['article'] = $tmpProduct;\n if (!empty($tmpProduct['purchaseunit'])) {\n $orderDetails[$orderDetailsKey]['purchaseunit'] = $tmpProduct['purchaseunit'];\n }\n\n if (!empty($tmpProduct['referenceunit'])) {\n $orderDetails[$orderDetailsKey]['referenceunit'] = $tmpProduct['referenceunit'];\n }\n\n if (!empty($tmpProduct['referenceprice'])) {\n $orderDetails[$orderDetailsKey]['referenceprice'] = $tmpProduct['referenceprice'];\n }\n\n if (!empty($tmpProduct['sUnit']) && is_array($tmpProduct['sUnit'])) {\n $orderDetails[$orderDetailsKey]['sUnit'] = $tmpProduct['sUnit'];\n }\n\n if (!empty($tmpProduct['price'])) {\n $orderDetails[$orderDetailsKey]['currentPrice'] = $tmpProduct['price'];\n }\n\n if (!empty($tmpProduct['pseudoprice'])) {\n $orderDetails[$orderDetailsKey]['currentPseudoprice'] = $tmpProduct['pseudoprice'];\n }\n\n $orderDetails[$orderDetailsKey]['currentHas_pseudoprice'] = $tmpProduct['has_pseudoprice'];\n }\n\n // Check for serial\n if ($orderDetails[$orderDetailsKey]['esdarticle']) {\n $numbers = [];\n $getSerial = $this->db->fetchAll(\n 'SELECT serialnumber\n FROM s_articles_esd_serials, s_order_esd\n WHERE userID = ?\n AND orderID = ?\n AND orderdetailsID = ?\n AND s_order_esd.serialID = s_articles_esd_serials.id',\n [\n $this->session->offsetGet('sUserId'),\n $orderValue['id'],\n $orderDetailsValue['id'],\n ]\n );\n foreach ($getSerial as $serial) {\n $numbers[] = $serial['serialnumber'];\n }\n $orderDetails[$orderDetailsKey]['serial'] = implode(',', $numbers);\n $orderDetails[$orderDetailsKey]['esdLink'] = $this->config->get('sBASEFILE')\n . '?sViewport=account&sAction=download&esdID='\n . $orderDetailsValue['id'];\n }\n }\n $orders[$orderKey]['activeBuyButton'] = 1;\n $orders[$orderKey]['details'] = $orderDetails;\n\n return $orders;\n }", "protected function _addPaymentDetailsForCreditCardOrder($paymentDetailsElement)\n {\n if ($this->paymentDetails['cseEnabled']) {\n $cseElement = $this->_addCseElement($paymentDetailsElement);\n $cardAddress = $cseElement->addChild('cardAddress');\n } else {\n $paymentTypeElement = $this->_addPaymentTypeElement($paymentDetailsElement);\n $cardAddress = $paymentTypeElement->addChild('cardAddress');\n }\n\n $this->_addAddressElement(\n $cardAddress,\n $this->cardAddress['firstName'],\n $this->cardAddress['lastName'],\n $this->cardAddress['street'],\n $this->cardAddress['postalCode'],\n $this->cardAddress['city'],\n $this->cardAddress['countryCode']\n );\n }", "public function orderItem($param) { \n if (!$this->aaa->has_right('openruth', 500))\n $res->orderItemError->_value = 'authentication_error';\n else {\n $targets = $this->config->get_value('ruth', 'ztargets');\n $agencyId = self::strip_agency($param->agencyId->_value);\n if ($tgt = $targets[$agencyId]) {\n // build order\n $ord = &$order->Reservation->_value;\n $ord->LibraryNo->_value = $agencyId;\n $ord->BorrowerTicketNo->_value = $param->userId->_value;\n $ord->DisposalNote->_value = $param->orderNote->_value;\n $ord->LastUseDate->_value = self::to_zruth_date($param->orderLastInterestDate->_value);\n $ord->ServiceCounter->_value = $param->agencyCounter->_value;\n $ord->Override->_value = (self::xs_true($param->agencyCounter->_value) ? 'Y' : 'N');\n $ord->Priority->_value = $param->orderPriority->_value;\n // ?????? $ord->DisposalType->_value = $param->xxxx->_value;\n $itemIds = &$param->orderItemId;\n if (is_array($itemIds))\n foreach ($itemIds as $oid) {\n $mrid->ID->_value = $oid->_value->itemId->_value;\n if (!$mrid->TitlePartNo->_value = $oid->_value->itemSerialPartId->_value)\n $mrid->TitlePartNo->_value = 0;\n $ord->MRIDS->_value->MRID[]->_value = $mrid;\n }\n else {\n $mrid->ID->_value = $itemIds->_value->itemId->_value;\n if (!$mrid->TitlePartNo->_value = $itemIds->_value->itemSerialPartId->_value)\n $mrid->TitlePartNo->_value = 0;\n $ord->MRIDS->_value->MRID->_value = $mrid;\n }\n $xml = '<?xml version=\"1.0\" encoding=\"ISO-8859-1\" ?'.'>' . utf8_decode($this->objconvert->obj2xml($order));\n \n//print_r($ord);\n//print_r($xml);\n \n $z = new z3950();\n $z->set_target($tgt['host']);\n $z->set_database($tgt['database'].'-ophelia');\n $z->set_authentication($tgt['authentication']);\n if ($tgt['proxy']) {\n $z->set_proxy($tgt['proxy']);\n }\n $xml_ret = $z->z3950_xml_update($xml, $tgt['timeout']);\n if ($z->get_errno() == 0 && $xml_ret['xmlUpdateDoc']) {\n $dom = new DomDocument();\n $dom->preserveWhiteSpace = false;\n if ($dom->loadXML($xml_ret['xmlUpdateDoc'])) {\n if ($err = &$dom->getElementsByTagName('ErrorResponse')->item(0)) {\n verbose::log(ERROR, __FUNCTION__ . ' (' . __LINE__ . ') errno: ' . $err->getAttribute('Err') . \n ' error: ' . $err->nodeValue);\n $res->orderItemError->_value = 'unspecified error, order not possible';\n } else {\n // order at least partly ok \n foreach ($dom->getElementsByTagName('MRID') as $mrid) {\n unset($ir);\n $ir->orderItemId->_value->itemId->_value = $mrid->getAttribute('Id');\n if ($mrid->getAttribute('Tp'))\n $ir->orderItemId->_value->itemSerialPartId->_value = $mrid->getAttribute('Tp');\n if (!$mrid->nodeValue)\n $ir->orderItemOk->_value = 'true';\n elseif (!($ir->orderItemError->_value = $this->errs[$mrid->nodeValue])) \n $ir->orderItemError->_value = 'unknown error: ' . $mrid->nodeValue;\n $res->orderItem[]->_value = $ir;\n }\n }\n }\n } else {\n self::log_z_error(__FUNCTION__, __LINE__, $agencyId, $z->get_errno(), $z->get_error_string());\n $res->orderItemError->_value = 'system error';\n }\n//echo \"\\n\";\n//print_r($xml_ret);\n//print_r(\"\\nError: \" . $z->get_errno());\n } else\n $res->orderItemError->_value = 'unknown agencyId';\n }\n\n $ret->orderItemResponse->_value = $res;\n //var_dump($param); var_dump($res); die();\n return $ret;\n }", "public function __construct(Order $order)\n {\n $this->order = $order; \n $detail = OrderDetail::where('order_id', $this->order->id)->get();\n $this->detail = $detail;\n }", "public function addBasketItemParams()\n {\n $oBasket = $this->getBasket();\n $oLang = $this->getLang();\n $oRequest = $this->getPayPalRequest();\n\n $iPos = 0;\n foreach ($oBasket->getContents() as $oBasketItem) {\n $oRequest->setParameter(\"L_PAYMENTREQUEST_0_NAME{$iPos}\", getStr()->html_entity_decode($oBasketItem->getTitle()));\n $oRequest->setParameter(\"L_PAYMENTREQUEST_0_AMT{$iPos}\", $this->_formatFloat($oBasketItem->getUnitPrice()->getPrice()));\n $oRequest->setParameter(\"L_PAYMENTREQUEST_0_QTY{$iPos}\", (int) $oBasketItem->getAmount());\n $oRequest->setParameter(\"L_PAYMENTREQUEST_0_ITEMURL{$iPos}\", $oBasketItem->getLink());\n\n $oBasketProduct = $oBasketItem->getArticle();\n $oRequest->setParameter(\"L_PAYMENTREQUEST_0_NUMBER{$iPos}\", $oBasketProduct->oxarticles__oxartnum->value);\n\n $iPos++;\n }\n\n //adding payment costs as product\n if ($oBasket->getPayPalPaymentCosts() > 0) {\n $sPaymentTitle = $oLang->translateString(\"OEPAYPAL_SURCHARGE\") . \" \" . $oLang->translateString(\"OEPAYPAL_TYPE_OF_PAYMENT\");\n $oRequest->setParameter(\"L_PAYMENTREQUEST_0_NAME{$iPos}\", $sPaymentTitle);\n $oRequest->setParameter(\"L_PAYMENTREQUEST_0_AMT{$iPos}\", $this->_formatFloat($oBasket->getPayPalPaymentCosts()));\n $oRequest->setParameter(\"L_PAYMENTREQUEST_0_QTY{$iPos}\", 1);\n\n $iPos++;\n }\n\n //adding wrapping as product\n if ($oBasket->getPayPalWrappingCosts() > 0) {\n $oRequest->setParameter(\"L_PAYMENTREQUEST_0_NAME{$iPos}\", $oLang->translateString(\"OEPAYPAL_GIFTWRAPPER\"));\n $oRequest->setParameter(\"L_PAYMENTREQUEST_0_AMT{$iPos}\", $this->_formatFloat($oBasket->getPayPalWrappingCosts()));\n $oRequest->setParameter(\"L_PAYMENTREQUEST_0_QTY{$iPos}\", 1);\n\n $iPos++;\n }\n\n //adding greeting card as product\n if ($oBasket->getPayPalGiftCardCosts() > 0) {\n $oRequest->setParameter(\"L_PAYMENTREQUEST_0_NAME{$iPos}\", $oLang->translateString(\"OEPAYPAL_GREETING_CARD\"));\n $oRequest->setParameter(\"L_PAYMENTREQUEST_0_AMT{$iPos}\", $this->_formatFloat($oBasket->getPayPalGiftCardCosts()));\n $oRequest->setParameter(\"L_PAYMENTREQUEST_0_QTY{$iPos}\", 1);\n\n $iPos++;\n }\n\n //adding trusted shops protection as product\n if ($oBasket->getPayPalTsProtectionCosts() > 0) {\n $oRequest->setParameter(\"L_PAYMENTREQUEST_0_NAME{$iPos}\", $oLang->translateString(\"OEPAYPAL_TRUSTED_SHOP_PROTECTION\"));\n $oRequest->setParameter(\"L_PAYMENTREQUEST_0_AMT{$iPos}\", $this->_formatFloat($oBasket->getPayPalTsProtectionCosts()));\n $oRequest->setParameter(\"L_PAYMENTREQUEST_0_QTY{$iPos}\", 1);\n }\n }", "private function SetOrderData()\n\t\t{\n\t\t\t// doesn't factor in cookies stored by Interspire Shopping Cart, so we have to pass back the\n\t\t\t// order token manually from those payment providers. We do this by taking the\n\t\t\t// cart ID passed back from the provider which stores the order's unique token.\n\t\t\tif(isset($_COOKIE['SHOP_ORDER_TOKEN'])) {\n\t\t\t\t$this->orderToken = $_COOKIE['SHOP_ORDER_TOKEN'];\n\t\t\t}\n\t\t\telse if(isset($_REQUEST['provider'])) {\n\t\t\t\tGetModuleById('checkout', $this->paymentProvider, $_REQUEST['provider']);\n\n\t\t\t\tif(in_array(\"GetOrderToken\", get_class_methods($this->paymentProvider))) {\n\t\t\t\t\t$this->orderToken = $this->paymentProvider->GetOrderToken();\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tob_end_clean();\n\t\t\t\t\theader(sprintf(\"Location:%s\", $GLOBALS['ShopPath']));\n\t\t\t\t\tdie();\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Load the pending orders from the database\n\t\t\t$this->pendingData = LoadPendingOrdersByToken($this->orderToken, true);\n\t\t\tif(!$this->orderToken || $this->pendingData === false) {\n\t\t\t\t$this->BadOrder();\n\t\t\t\texit;\n\t\t\t}\n\n\t\t\tif($this->paymentProvider === null) {\n\t\t\t\tGetModuleById('checkout', $this->paymentProvider, $this->pendingData['paymentmodule']);\n\t\t\t}\n\n\t\t\tif($this->paymentProvider) {\n\t\t\t\t$this->paymentProvider->SetOrderData($this->pendingData);\n\t\t\t}\n\t\t}", "public function setCustomFields ($order) {\n \n }", "public function add_do_express_checkout_params( $token, $order, $args ) {\n\n\t\t$this->set_method( 'DoExpressCheckoutPayment' );\n\n\t\t// set base params.\n\t\t$this->add_parameters(\n\t\t\tarray(\n\t\t\t\t'TOKEN' => $token,\n\t\t\t\t'PAYERID' => $args['payer_id'],\n\t\t\t\t'BUTTONSOURCE' => 'WooThemes_Cart',\n\t\t\t\t'RETURNFMFDETAILS' => 1,\n\t\t\t)\n\t\t);\n\n\t\t$this->add_payment_params( $order, $args['step_id'], $args['payment_action'] );\n\t}", "public function processVoucherAddRequest(Order $order, array $data);", "public function appendOrder(\\service\\message\\common\\Order $value)\n {\n return $this->append(self::order, $value);\n }", "public function __construct(Order $order = null, array $data = [])\n {\n if ($order) {\n $this->setOrder($order);\n }\n if ($data) {\n $this->setData($data);\n }\n }", "public function lstOrderDetail(){\n\t\t$Sql = \"SELECT \n\t\t\t\t\torder_detail_id,\n\t\t\t\t\torder_id,\n\t\t\t\t\tcustomer_id,\n\t\t\t\t\textra_feature_id,\n\t\t\t\t\tfeature_name,\n\t\t\t\t\tquantity,\n\t\t\t\t\tprice\n\t\t\t\tFROM\n\t\t\t\t\trs_tbl_order_details\n\t\t\t\tWHERE\n\t\t\t\t\t1=1\";\n\t\t\n\t\tif($this->isPropertySet(\"order_detail_id\", \"V\")){\n\t\t\t$Sql .= \" AND order_detail_id='\" . $this->getProperty(\"order_detail_id\") . \"'\";\n\t\t}\n\t\tif($this->isPropertySet(\"order_id\", \"V\")){\n\t\t\t$Sql .= \" AND order_id='\" . $this->getProperty(\"order_id\") . \"'\";\n\t\t}\n\t\tif($this->isPropertySet(\"customer_id\", \"V\")){\n\t\t\t$Sql .= \" AND customer_id=\" . $this->getProperty(\"customer_id\");\n\t\t}\n\t\tif($this->isPropertySet(\"extra_feature_id\", \"V\")){\n\t\t\t$Sql .= \" AND extra_feature_id='\" . $this->getProperty(\"extra_feature_id\") . \"'\";\n\t\t}\n\t\tif($this->isPropertySet(\"ORDERBY\", \"V\")){\n\t\t\t$Sql .= \" ORDER BY \" . $this->getProperty(\"ORDERBY\");\n\t\t}\n\t\t\n\t\tif($this->isPropertySet(\"limit\", \"V\"))\n\t\t\t$Sql .= $this->appendLimit($this->getProperty(\"limit\"));\n\t\treturn $this->dbQuery($Sql);\n\t}", "public function hookNewOrder($params)\r\n {\r\n $carrier = new Carrier((int) $params['order']->id_carrier);\r\n $result = TipsaAdminComun::getTipsaCarriers(\"`id_reference` = \" . (int) $carrier->id_reference);\r\n\r\n if (!$result) {\r\n return false;\r\n }\r\n\r\n $tipo_servicio = $result['code'];\r\n\r\n $office = Db::getInstance()->getRow(\r\n \"SELECT * FROM `\" . _DB_PREFIX_ . \"tipsa_address`\r\n WHERE `id_cart` = \" . (int) $params['cart']->id . \" AND `id_carrier` = \" . (int) $params['order']->id_carrier\r\n );\r\n try {\r\n if ($tipo_servicio == $this->service_codes_yupick) {\r\n if ($office) {\r\n // get current customer address\r\n $address = new Address($params['order']->id_address_delivery);\r\n // Create a new address with the point location\r\n $address_point = new Address();\r\n //loop through address fields in case the shop has added custom or required fields\r\n foreach ($address as $name => $value) {\r\n if (!is_array($value) && !in_array($name, array('date_upd', 'date_add', 'id', 'country'))) {\r\n switch ($name) {\r\n case 'id_customer':\r\n $address_point->id_customer = $params['order']->id_customer;\r\n break;\r\n case 'address1':\r\n $address_point->address1 = $office['address'];\r\n break;\r\n case 'address2':\r\n $address_point->address2 = $office['firstname'];\r\n break;\r\n case 'postcode':\r\n $address_point->postcode = $office['postcode'];\r\n break;\r\n case 'city':\r\n $address_point->city = $office['city'];\r\n break;\r\n case 'alias':\r\n $address_point->alias = $office['alias'];\r\n break;\r\n case 'phone_mobile':\r\n if (!empty($office['phone_mobile'])) {\r\n $address_point->phone_mobile = $office['phone_mobile'];\r\n } else {\r\n $address_point->phone_mobile = \"0\";\r\n }\r\n break;\r\n case 'phone':\r\n $address_point->phone = $office['phone'] != '' ? $office['phone'] : \"0\";\r\n break;\r\n case 'deleted':\r\n $address_point->deleted = true;\r\n break;\r\n default:\r\n $address_point->$name = $value;\r\n }\r\n }\r\n }\r\n\r\n $address_point->save();\r\n if ($address_point->id) {\r\n $order = $params['order'];\r\n $order->id_address_delivery = $address_point->id;\r\n $order->update();\r\n }\r\n }\r\n }\r\n Db::getInstance()->update(\r\n 'tipsa_address',\r\n array('state' => 1, 'id_order' => (int) $params['order']->id),\r\n \"`state` = 0 AND `id_cart` = \" . (int) $params['cart']->id . \" AND `id_carrier` = \" . (int) $params['order']->id_carrier\r\n );\r\n } catch (Exception $e) {\r\n //In case of error, just do the most important\r\n return $e->message();\r\n }\r\n\r\n //Delete old quotes. Need to be in Days because Paypal or card payment validation can last some time\r\n Db::getInstance()->Execute(\r\n \"DELETE FROM \" . _DB_PREFIX_ . \"tipsa_address\r\n WHERE date < DATE_SUB(NOW(), INTERVAL 7 DAY) AND state = 0\"\r\n );\r\n }", "function addOrder($name, $order) {\n\t\t$this->addBlock('order', $name, $order);\n\t\treturn $this;\n\t}", "public function getAfterPayParamsByOrder(Order $order = null, $mode = PaymentHelper::MODE_AFTERPAY)\n {\n\n// $payments = $paymentContract->getPaymentsByOrderId($order->îd);\n\n $AfterPayRequestParams['basket'] = [];\n $basket['currency'] = $order->amounts[0]->currency;\n $basket['basketAmount'] = $order->amounts[0]->invoiceTotal;\n $basket['couponDiscount'] = 0;\n $basket['shippingAmount'] = 0;\n\n /** declare the variable as array */\n $AfterPayRequestParams['basketItems'] = [];\n\n /** @var \\Plenty\\Modules\\Item\\Item\\Contracts\\ItemRepositoryContract $itemContract */\n $itemContract = pluginApp(\\Plenty\\Modules\\Item\\Item\\Contracts\\ItemRepositoryContract::class);\n\n $itemSum = 0.0;\n\n /** @var OrderItem $basketItem */\n foreach ($order->orderItems as $orderItem)\n {\n if ($orderItem->typeId == 4) //coupon\n {\n $basket['couponDiscount'] = $orderItem->amounts[0]->priceGross; //amount\n continue;\n }\n if ($orderItem->typeId == 6) //shipping costs\n {\n $basket['shippingAmount'] = $orderItem->amounts[0]->priceGross; //amount\n continue;\n }\n\n\n $AfterPayBasketItem['itemId'] = $orderItem->variation->itemId;\n $AfterPayBasketItem['quantity'] = $orderItem->quantity;\n $AfterPayBasketItem['price'] = $orderItem->amounts[0]->priceGross;\n\n $itemSum += $orderItem->quantity * $orderItem->amounts[0]->priceGross;\n\n /** @var \\Plenty\\Modules\\Item\\Item\\Models\\Item $item */\n $item = $itemContract->show($orderItem->variation->itemId);\n\n /** @var \\Plenty\\Modules\\Item\\Item\\Models\\ItemText $itemText */\n $itemText = $item->texts;\n\n $AfterPayBasketItem['name'] = $itemText->first()->name1;\n\n $AfterPayRequestParams['basketItems'][] = $AfterPayBasketItem;\n }\n\n $basket['itemSum'] = $itemSum;\n\n /** @var Basket $basket */\n $AfterPayRequestParams['basket'] = $basket;\n\n // Read the shipping address ID from the session\n $shippingAddress = $order->deliveryAddress;\n\n if (empty($shippingAddress))\n {\n $shippingAddress = $order->billingAddress;\n }\n\n if (!is_null($shippingAddress))\n {\n /** declarce the variable as array */\n $AfterPayRequestParams['shippingAddress'] = [];\n $AfterPayRequestParams['shippingAddress']['town'] = $shippingAddress->town;\n $AfterPayRequestParams['shippingAddress']['postalCode'] = $shippingAddress->postalCode;\n $AfterPayRequestParams['shippingAddress']['firstname'] = $shippingAddress->firstName;\n $AfterPayRequestParams['shippingAddress']['lastname'] = $shippingAddress->lastName;\n $AfterPayRequestParams['shippingAddress']['street'] = $shippingAddress->street;\n $AfterPayRequestParams['shippingAddress']['houseNumber'] = $shippingAddress->houseNumber;\n\n /** @var \\Plenty\\Modules\\Order\\Shipping\\Countries\\Contracts\\CountryRepositoryContract $countryRepo */\n $countryRepo = pluginApp(\\Plenty\\Modules\\Order\\Shipping\\Countries\\Contracts\\CountryRepositoryContract::class);\n\n // Fill the country for AfterPay parameters\n $country = [];\n $country['isoCode2'] = $countryRepo->findIsoCode($shippingAddress->countryId, 'iso_code_2');\n $AfterPayRequestParams['country'] = $country;\n\n // Get the URLs for AfterPay parameters\n $AfterPayRequestParams['urls'] = $this->paymentHelper->getRestOrderReturnUrls($order->id);\n\n return $AfterPayRequestParams;\n }\n// }\n // Get the URLs for AfterPay parameters\n $AfterPayRequestParams['urls'] = $this->paymentHelper->getRestOrderReturnUrls($order->id);\n\n return $AfterPayRequestParams;\n }", "abstract public function setOrder(OrderModel $order);", "public function &setBOrder($bOrder) {\n\t\t$this->bOrder=$bOrder;\n\t\treturn $this;\n\t}", "function setOrder($order);", "private function setBackorderVars($order) {\n $this->ofb = $order;\n $this->newShipment['Shipment'] = (isset($this->ofb['Shipment'])) ? $this->ofb['Shipment'][0] : $this->ofb['Order']['Shipment'][0];\n $this->backorderRecord['Order'] = (isset($this->ofb['Backorder'])) ? $this->ofb['Backorder'] : $this->ofb['Order']['Backorder'];\n }", "private function _addAmountElement($order)\n {\n $amountElement = $order->addChild('amount');\n $amountElement['currencyCode'] = $this->currencyCode;\n $amountElement['exponent'] = self::EXPONENT;\n $amountElement['value'] = $this->_amountAsInt($this->amount);\n }", "public function addAdditionalOptionsToQuote($observer)\n {\n $action = Mage::app()->getFrontController()->getAction();\n if ($action->getFullActionName() == 'checkout_cart_add')\n {\n Mage::log(\"checkout_cart_add\", Zend_Log::DEBUG, \"threekit.log\");\n // assuming you are posting your custom form values in an array called extra_options...\n if ($options = $action->getRequest()->getParam('clara_additional_options'))\n {\n $decodePost = json_decode($options, true);\n $product = $observer->getProduct();\n\n // add to the additional options array\n $additionalOptions = array();\n if ($additionalOption = $product->getCustomOption('additional_options'))\n {\n $additionalOptions = (array) unserialize($additionalOption->getValue());\n }\n foreach ($decodePost as $key => $value)\n {\n $additionalOptions[] = array(\n 'label' => $key,\n 'value' => $value,\n );\n }\n // add the additional options array with the option code additional_options\n $observer->getProduct()\n ->addCustomOption('additional_options', serialize($additionalOptions));\n }\n }\n }", "private function updateOrderDetail($order){\n $endpoint = $this->endpointBase.\"/\".$order['id'];\n $params = array('url_params' => \"\");\n\n return $this->MPAPI->callMallAPI(HTTP_Method::PUT, $endpoint, $order);\n }", "public function order($strOrder) {\n\t\t\t$this->arOrder[] = $strOrder; \n\t\t}", "private function prepareOrderDetailsConfirmationMailData($orderModel)\n {\n $details = Shopware()->Db()->fetchAll(\n 'SELECT * FROM s_order_details WHERE orderID = ?',\n [$orderModel->getId()]\n );\n\n //we need to fake a shop instance if we want to use the Articles Module\n $shop = Shopware()->Models()->getRepository('Shopware\\Models\\Shop\\Shop')->getActiveById($orderModel->getLanguageSubShop()->getId());\n $shop->registerResources(Shopware()->Bootstrap());\n\n foreach ($details as &$detail) {\n /** @var Shopware\\Models\\Article\\Repository $articleDetailRepository */\n $articleDetailRepository = Shopware()->Models()->getRepository('Shopware\\Models\\Article\\Detail');\n /** @var Shopware\\Models\\Article\\Detail[] $articleDetailModel */\n $articleDetailModel = $articleDetailRepository->findBy(['number' => $detail['articleordernumber']]);\n /** @var Shopware\\Models\\Article\\Detail $articleDetailModel */\n $articleDetailModel = $articleDetailModel[0];\n\n $detail['articlename'] = $detail['name'];\n unset($detail['name']);\n\n $detail['userID'] = $orderModel->getCustomer()->getId();\n\n $detail['ordernumber'] = $detail['articleordernumber'];\n unset($detail['articleordernumber']);\n\n $detail['currencyFactor'] = $orderModel->getCurrencyFactor();\n $detail['mainDetailId'] = $articleDetailModel->getArticle()->getMainDetail()->getId();\n $detail['articleDetailId'] = $articleDetailModel->getId();\n $detail['instock'] = $articleDetailModel->getInStock();\n\n $detail['taxID'] = $articleDetailModel->getArticle()->getTax()->getId();\n if ($orderModel->getNet()) {\n $detail['taxID'] = 0;\n }\n\n $detail['maxpurchase'] = $articleDetailModel->getMaxPurchase();\n $detail['minpurchase'] = $articleDetailModel->getMinPurchase();\n $detail['purchasesteps'] = $articleDetailModel->getPurchaseSteps();\n $detail['stockmin'] = $articleDetailModel->getStockMin();\n $detail['suppliernumber'] = $articleDetailModel->getSupplierNumber();\n $detail['laststock'] = $articleDetailModel->getArticle()->getLastStock();\n $detail['purchaseunit'] = $articleDetailModel->getPurchaseUnit();\n $detail['releasedate'] = $articleDetailModel->getReleaseDate();\n $detail['modus'] = $articleDetailModel->getArticle()->getMode();\n $detail['datum'] = $orderModel->getOrderTime()->format('Y-m-d H:i:s');\n $detail['esdarticle'] = $articleDetailModel->getEsd();\n $detail['netprice'] = $this->calculateNetPrice($detail['price'], $detail['tax_rate']);\n $detail['amount'] = $detail['price'] * $detail['quantity'];\n $detail['amountnet'] = $detail['netprice'] * $detail['quantity'];\n $detail['priceNumeric'] = $detail['price'];\n\n /**\n * order basket attributes fake\n */\n $detail['ob_attr1'] = '';\n $detail['ob_attr2'] = '';\n $detail['ob_attr3'] = '';\n $detail['ob_attr4'] = '';\n $detail['ob_attr5'] = '';\n $detail['ob_attr6'] = '';\n\n $detail['partnerID'] = '';\n $detail['shippinginfo'] = 1;\n\n if ($articleDetailModel->getUnit()) {\n $detail['unitID'] = $articleDetailModel->getUnit()->getId();\n }\n\n $detail['additional_details'] = Shopware()->Modules()->Articles()->sGetProductByOrdernumber($detail['ordernumber']);\n }\n\n return $details;\n }", "public function setTxDetails($var)\n {\n $arr = GPBUtil::checkRepeatedField($var, \\Google\\Protobuf\\Internal\\GPBType::MESSAGE, \\Jason\\Chain33\\Kernel\\Protobuf\\TxDetail::class);\n $this->txDetails = $arr;\n\n return $this;\n }", "public function setOrder($Order)\n {\n $this->__set(\"order\", $Order);\n }", "private function inserOrderproduct($orderId){\n\t\t$this->load->library(\"cart\");\n\t\tforeach($this->cart->contents() as $items){\n\t\t\t$object=array(\n\t\t\t\t'OrdId' => $orderId,\n\t\t\t\t'ItemId' => $items['id'],\n\t\t\t\t'ItemName' => $items['name'],\n\t\t\t\t'ItemEdition' => $items['options']['BookEdition'],\n\t\t\t\t'ItemAuther' => $items['options']['Author'],\n\t\t\t\t'ItemQuantity' => $items['qty'],\n\t\t\t\t'ItemRetailPrice' => $items['options']['RetailPrice'],\n\t\t\t\t'ItemSellingPrice' => $items['price'],\n\t\t\t\t'ItemDiscount' => $items['options']['Discount']\n\t\t\t);\n\t\t\t$this->db->insert('tbl_order_lineitems', $object);\n\t\t}\n\t}", "public function hookorderConfirmation($params)\n {\n // For order confirmation\n $isActivate = $this->isRulesetActive('order_confirmation');\n if ($isActivate != null && $isActivate != '' && $this->smsAPI != null && $this->smsAPI != '') {\n $param = $params['objOrder'];\n $order = new Order((int)$param->id);\n \n if ($order) {\n $address = new Address((int)$order->id_address_delivery);\n $legendstemp = $this->replaceOrderLegends(\n $isActivate[0]['template'],\n $order,\n $address\n );\n // Use send SMS API here\n $legendstemp = preg_replace('/<br(\\s+)?\\/?>/i', \"\\n\", $legendstemp);\n $postAPIdata = array(\n 'label' => $isActivate[0]['label'],\n 'sms_text' => $legendstemp,\n 'source' => '21000',\n 'sender_id' => $isActivate[0]['senderid'],\n 'mobile_number' => $address->phone_mobile\n );\n $this->sendSMSByAPI($postAPIdata);\n Onehopsmsservice::onehopSaveLog('Confirmed', $legendstemp, $address->phone_mobile);\n $productArray = $order->getProducts();\n if ($productArray) {\n foreach ($productArray as $product) {\n $this->productOutofOrderProcess($product['product_id']);\n }\n }\n }\n }\n }", "private function _addBillingElement($order)\n {\n $billingAddress = $order->addChild('billingAddress');\n $this->_addAddressElement(\n $billingAddress,\n $this->billingAddress['firstName'],\n $this->billingAddress['lastName'],\n $this->billingAddress['street'],\n $this->billingAddress['postalCode'],\n $this->billingAddress['city'],\n $this->billingAddress['countryCode']\n );\n }", "private function _createOrderLines($virtuemart_order_id, $cart)\n {\n $_orderItems = $this->getTable('order_items');\n\n foreach ($cart->products as $priceKey => $product) {\n\n if (!empty($product->customProductData)) {\n $_orderItems->product_attribute = vmJsApi::safe_json_encode($product->customProductData);\n } else {\n $_orderItems->product_attribute = '';\n }\n\n\n $_orderItems->virtuemart_order_item_id = null;\n $_orderItems->virtuemart_order_id = $virtuemart_order_id;\n\n $_orderItems->virtuemart_vendor_id = $product->virtuemart_vendor_id;\n $_orderItems->virtuemart_product_id = $product->virtuemart_product_id;\n $_orderItems->order_item_sku = $product->product_sku;\n $_orderItems->order_item_name = $product->product_name;\n $_orderItems->product_quantity = $product->quantity;\n $_orderItems->product_item_price = $product->allPrices[$product->selectedPrice]['basePriceVariant'];\n $_orderItems->product_basePriceWithTax = $product->allPrices[$product->selectedPrice]['basePriceWithTax'];\n\n //$_orderItems->product_tax = $_cart->pricesUnformatted[$priceKey]['subtotal_tax_amount'];\n $_orderItems->product_tax = $product->allPrices[$product->selectedPrice]['taxAmount'];\n $_orderItems->product_final_price = $product->allPrices[$product->selectedPrice]['salesPrice'];\n $_orderItems->product_subtotal_discount = $product->allPrices[$product->selectedPrice]['subtotal_discount'];\n $_orderItems->product_subtotal_with_tax = $product->allPrices[$product->selectedPrice]['subtotal_with_tax'];\n $_orderItems->product_priceWithoutTax = $product->allPrices[$product->selectedPrice]['priceWithoutTax'];\n $_orderItems->product_discountedPriceWithoutTax = $product->allPrices[$product->selectedPrice]['discountedPriceWithoutTax'];\n $_orderItems->order_status = 'P';\n\n if (!$_orderItems->check()) {\n return false;\n }\n //The check may set here a wrong vendorId, we replace it again with the right one.\n $_orderItems->virtuemart_vendor_id = $product->virtuemart_vendor_id;\n\n // Save the record to the database\n if (!$_orderItems->store()) {\n return false;\n }\n\n $product->virtuemart_order_item_id = $_orderItems->virtuemart_order_item_id;\n\n $this->handleStockAfterStatusChangedPerProduct($_orderItems->order_status, 'N', $_orderItems, $_orderItems->product_quantity);\n }\n\n return true;\n }", "private function memberAddOrder($data){\n $fields = array(\n 'app_id' => $this->appId,\n 'data' => array(\n 'msg_type' => 'order_add',\n 'order_id' => $data['order_id']\n ),\n 'headings' => [\n 'en' => '你有新的訂單',\n 'zh-Hant' => '你有新的訂單'\n ],\n 'contents' => [\n 'en' => '你有新的訂單待處理',\n 'zh-Hant' => '你有新的訂單待處理'\n ],\n 'small_icon' => 'ic_stat_onesignal_default',\n 'ios_badgeType' => 'Increase',\n 'ios_badgeCount' => 1,\n 'filters' => array(\n array(\n 'field' => 'tag',\n 'key' => 'id',\n 'relation' => '=',\n 'value' => $data['store_id']\n )\n )\n );\n return $fields;\n }" ]
[ "0.67444503", "0.66900826", "0.59915024", "0.5673039", "0.5658589", "0.55598915", "0.54112244", "0.5403665", "0.528919", "0.52742267", "0.5270692", "0.5242149", "0.5224129", "0.5218738", "0.51950765", "0.5174635", "0.5174016", "0.51691014", "0.515953", "0.5144242", "0.51378596", "0.5133019", "0.5133019", "0.5133019", "0.5133019", "0.5133019", "0.5133019", "0.5133019", "0.5133019", "0.5131962", "0.51302254", "0.51096606", "0.5089813", "0.5064382", "0.50609183", "0.5046336", "0.5045358", "0.5045358", "0.5045358", "0.5045358", "0.5045358", "0.5045358", "0.5045358", "0.5045358", "0.5045358", "0.5045358", "0.5037481", "0.5036697", "0.5034715", "0.5028025", "0.5017707", "0.5001663", "0.49979544", "0.4993528", "0.4981505", "0.49513343", "0.49445763", "0.49223733", "0.49093705", "0.4903915", "0.4903915", "0.49016485", "0.49005508", "0.489462", "0.48860553", "0.48715964", "0.4861797", "0.4859306", "0.48575744", "0.48416305", "0.48374873", "0.48298976", "0.4822839", "0.48147446", "0.47990423", "0.4795529", "0.47904006", "0.47902325", "0.4789941", "0.47837603", "0.47809625", "0.4774377", "0.47712806", "0.47648844", "0.4763003", "0.4762056", "0.4754592", "0.47520298", "0.47478294", "0.47474837", "0.4737259", "0.4730872", "0.47289672", "0.47271824", "0.47260788", "0.4723416", "0.47116348", "0.4711243", "0.4709842", "0.47031337" ]
0.676473
0
Add BTUOrderParams to OrderDetails.
public function addBTUOrderParams( BTUContext $btuContext ): OrderDetailsBuilder { $xmlBTUOrderParams = $this->dom->createElement('BTUOrderParams'); $xmlBTUOrderParams->setAttribute('fileName', $btuContext->getFileName()); $this->instance->appendChild($xmlBTUOrderParams); // Add Service to BTUOrderParams. $xmlService = $this->dom->createElement('Service'); $xmlBTUOrderParams->appendChild($xmlService); // Add ServiceName to Service. $xmlServiceName = $this->dom->createElement('ServiceName'); $xmlServiceName->nodeValue = $btuContext->getServiceName(); $xmlService->appendChild($xmlServiceName); // Add optional Scope to Service. if (null !== $btuContext->getScope()) { $xmlScope = $this->dom->createElement('Scope'); $xmlScope->nodeValue = $btuContext->getScope(); $xmlService->appendChild($xmlScope); } // Add optional ServiceOption to Service. if (null !== $btuContext->getServiceOption()) { $xmlServiceOption = $this->dom->createElement('ServiceOption'); $xmlServiceOption->nodeValue = $btuContext->getServiceOption(); $xmlService->appendChild($xmlServiceOption); } // Add optional ContainerFlag to Service. if (null !== $btuContext->getContainerFlag()) { $xmlContainerFlag = $this->dom->createElement('ContainerFlag'); $xmlContainerFlag->nodeValue = $btuContext->getContainerFlag(); $xmlService->appendChild($xmlContainerFlag); } // Add MsgName to Service. $xmlMsgName = $this->dom->createElement('MsgName'); $xmlMsgName->nodeValue = $btuContext->getMsgName(); $xmlService->appendChild($xmlMsgName); // Add optional MsgName version attribute if (null !== $btuContext->getMsgNameVersion()) { $xmlMsgName->setAttribute( 'version', $btuContext->getMsgNameVersion() ); } // Add optional MsgName variant attribute if (null !== $btuContext->getMsgNameVariant()) { $xmlMsgName->setAttribute( 'variant', $btuContext->getMsgNameVariant() ); } // Add optional MsgName format attribute if (null !== $btuContext->getMsgNameFormat()) { $xmlMsgName->setAttribute( 'format', $btuContext->getMsgNameFormat() ); } return $this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function addHVTOrderParams(\n HVTContext $hvtContext\n ): OrderDetailsBuilder {\n $xmlHVTOrderParams = $this->dom->createElement('HVTOrderParams');\n $this->instance->appendChild($xmlHVTOrderParams);\n\n $xmlPartnerID = $this->dom->createElement('PartnerID');\n $xmlPartnerID->nodeValue = $hvtContext->getPartnerId();\n $xmlHVTOrderParams->appendChild($xmlPartnerID);\n\n // Add Service to HVDOrderParams.\n $xmlService = $this->dom->createElement('Service');\n $xmlHVTOrderParams->appendChild($xmlService);\n\n // Add ServiceName to Service.\n $xmlServiceName = $this->dom->createElement('ServiceName');\n $xmlServiceName->nodeValue = $hvtContext->getServiceName();\n $xmlService->appendChild($xmlServiceName);\n\n // Add optional Scope to Service.\n if (null !== $hvtContext->getScope()) {\n $xmlScope = $this->dom->createElement('Scope');\n $xmlScope->nodeValue = $hvtContext->getScope();\n $xmlService->appendChild($xmlScope);\n }\n\n // Add optional ServiceOption to Service.\n if (null !== $hvtContext->getServiceOption()) {\n $xmlServiceOption = $this->dom->createElement('ServiceOption');\n $xmlServiceOption->nodeValue = $hvtContext->getServiceOption();\n $xmlService->appendChild($xmlServiceOption);\n }\n\n // Add MsgName to Service.\n $xmlMsgName = $this->dom->createElement('MsgName');\n $xmlMsgName->nodeValue = $hvtContext->getMsgName();\n $xmlService->appendChild($xmlMsgName);\n\n // Add OrderID to HVTOrderParams.\n $xmlOrderID = $this->dom->createElement('OrderID');\n $xmlOrderID->nodeValue = $hvtContext->getOrderId();\n $xmlHVTOrderParams->appendChild($xmlOrderID);\n\n // Add OrderFlags to HVTOrderParams.\n $xmlOrderFlags = $this->dom->createElement('OrderFlags');\n $xmlOrderFlags->setAttribute(\n 'completeOrderData',\n $hvtContext->getCompleteOrderData() ? 'true' : 'false'\n );\n $xmlOrderFlags->setAttribute(\n 'fetchLimit',\n (string)$hvtContext->getFetchLimit()\n );\n $xmlOrderFlags->setAttribute(\n 'fetchOffset',\n (string)$hvtContext->getFetchOffset()\n );\n $xmlHVTOrderParams->appendChild($xmlOrderFlags);\n\n return $this;\n }", "public function addBTDOrderParams(\n BTFContext $btfContext,\n ?DateTimeInterface $startDateTime = null,\n ?DateTimeInterface $endDateTime = null\n ): OrderDetailsBuilder {\n $xmlBTDOrderParams = $this->dom->createElement('BTDOrderParams');\n $this->instance->appendChild($xmlBTDOrderParams);\n\n // Add Service to BTDOrderParams.\n $xmlService = $this->dom->createElement('Service');\n $xmlBTDOrderParams->appendChild($xmlService);\n\n // Add ServiceName to Service.\n $xmlServiceName = $this->dom->createElement('ServiceName');\n $xmlServiceName->nodeValue = $btfContext->getServiceName();\n $xmlService->appendChild($xmlServiceName);\n\n // Add optional Scope to Service.\n if (null !== $btfContext->getScope()) {\n $xmlScope = $this->dom->createElement('Scope');\n $xmlScope->nodeValue = $btfContext->getScope();\n $xmlService->appendChild($xmlScope);\n }\n\n // Add optional ServiceOption to Service.\n if (null !== $btfContext->getServiceOption()) {\n $xmlServiceOption = $this->dom->createElement('ServiceOption');\n $xmlServiceOption->nodeValue = $btfContext->getServiceOption();\n $xmlService->appendChild($xmlServiceOption);\n }\n\n // Add optional ContainerFlag to Service.\n if (null !== $btfContext->getContainerFlag()) {\n $xmlContainerFlag = $this->dom->createElement('ContainerFlag');\n $xmlContainerFlag->nodeValue = $btfContext->getContainerFlag();\n $xmlService->appendChild($xmlContainerFlag);\n }\n\n // Add MsgName to Service.\n $xmlMsgName = $this->dom->createElement('MsgName');\n $xmlMsgName->nodeValue = $btfContext->getMsgName();\n $xmlService->appendChild($xmlMsgName);\n\n // Add optional MsgName version attribute\n if (null !== $btfContext->getMsgNameVersion()) {\n $xmlMsgName->setAttribute(\n 'version',\n $btfContext->getMsgNameVersion()\n );\n }\n\n // Add optional MsgName variant attribute\n if (null !== $btfContext->getMsgNameVariant()) {\n $xmlMsgName->setAttribute(\n 'variant',\n $btfContext->getMsgNameVariant()\n );\n }\n\n // Add optional MsgName format attribute\n if (null !== $btfContext->getMsgNameFormat()) {\n $xmlMsgName->setAttribute(\n 'format',\n $btfContext->getMsgNameFormat()\n );\n }\n\n if (null !== $startDateTime && null !== $endDateTime) {\n // Add DateRange to BTDOrderParams.\n $xmlDateRange = $this->createDateRange(\n $startDateTime,\n $endDateTime\n );\n $xmlBTDOrderParams->appendChild($xmlDateRange);\n }\n\n return $this;\n }", "public function addHVEOrderParams(\n HVEContext $hveContext\n ): OrderDetailsBuilder {\n $xmlHVEOrderParams = $this->dom->createElement('HVEOrderParams');\n $this->instance->appendChild($xmlHVEOrderParams);\n\n $xmlPartnerID = $this->dom->createElement('PartnerID');\n $xmlPartnerID->nodeValue = $hveContext->getPartnerId();\n $xmlHVEOrderParams->appendChild($xmlPartnerID);\n\n // Add Service to HVEOrderParams.\n $xmlService = $this->dom->createElement('Service');\n $xmlHVEOrderParams->appendChild($xmlService);\n\n // Add ServiceName to Service.\n $xmlServiceName = $this->dom->createElement('ServiceName');\n $xmlServiceName->nodeValue = $hveContext->getServiceName();\n $xmlService->appendChild($xmlServiceName);\n\n // Add optional Scope to Service.\n if (null !== $hveContext->getScope()) {\n $xmlScope = $this->dom->createElement('Scope');\n $xmlScope->nodeValue = $hveContext->getScope();\n $xmlService->appendChild($xmlScope);\n }\n\n // Add optional ServiceOption to Service.\n if (null !== $hveContext->getServiceOption()) {\n $xmlServiceOption = $this->dom->createElement('ServiceOption');\n $xmlServiceOption->nodeValue = $hveContext->getServiceOption();\n $xmlService->appendChild($xmlServiceOption);\n }\n\n // Add MsgName to Service.\n $xmlMsgName = $this->dom->createElement('MsgName');\n $xmlMsgName->nodeValue = $hveContext->getMsgName();\n $xmlService->appendChild($xmlMsgName);\n\n // Add OrderID to HVEOrderParams.\n $xmlOrderID = $this->dom->createElement('OrderID');\n $xmlOrderID->nodeValue = $hveContext->getOrderId();\n $xmlHVEOrderParams->appendChild($xmlOrderID);\n\n return $this;\n }", "public function addOrder(Order $order);", "function setOrder(array $orderParams)\n {\n foreach ($orderParams as $row)\n {\n if (is_array($this->{$row['name']}))\n array_push($this->{$row['name']}, $row['value']);\n else\n $this->{$row['name']} = $row['value'];\n }\n }", "public function processVoucherAddRequest(Order $order, array $data);", "protected function _addPaymentDetailsElement($order)\n {\n $paymentDetailsElement = $order->addChild('paymentDetails');\n if (isset($this->paymentDetails['tokenCode'])) {\n $this->_addPaymentDetailsForTokenOrder($paymentDetailsElement);\n } else {\n $this->_addPaymentDetailsForCreditCardOrder($paymentDetailsElement);\n }\n $session = $paymentDetailsElement->addChild('session');\n $session['id'] = $this->paymentDetails['sessionId'];\n $session['shopperIPAddress'] = $this->paymentDetails['shopperIpAddress'];\n\n if ($this->paResponse) {\n $info3DSecure = $paymentDetailsElement->addChild('info3DSecure');\n $info3DSecure->addChild('paResponse', $this->paResponse);\n }\n }", "private function setParams()\n {\n $this->params['MERCHANTNUMBER'] = $this->merchantNumber;\n $this->params['OPERATION'] = 'CREATE_ORDER';\n $this->params['ORDERNUMBER'] = $this->operation->getOrderNumber();\n $this->params['AMOUNT'] = $this->operation->getAmount();\n $this->params['CURRENCY'] = $this->operation->getCurrency();\n $this->params['DEPOSITFLAG'] = $this->depositFlag;\n if($this->operation->getMerOrderNum())\n $this->params['MERORDERNUM'] = $this->operation->getMerOrderNum();\n $this->params['URL'] = $this->url;\n\n if($this->operation->getDescription())\n $this->params['DESCRIPTION'] = $this->operation->getDescription();\n if($this->operation->getMd())\n $this->params['MD'] = $this->operation->getMd();\n\n }", "public static function addPartyOrderRequest($poRequestParamDetails){\n $connection = Yii::app()->db;\n $sqlColumnNames = \"\";\n $sqlValues = \"\";\n $lastInsertedId = false;\n if(array_key_exists('partyorder_no', $poRequestParamDetails)){\n if($poRequestParamDetails['partyorder_no']!=''){\n $sqlColumnNames.=\" partyorder_no,\";\n $sqlValues.=\"'\".$poRequestParamDetails['partyorder_no'].\"',\";\n }\n }\n if(array_key_exists('user_sessionid', $poRequestParamDetails)){\n if($poRequestParamDetails['user_sessionid']!=''){\n $sqlColumnNames.=\" user_sessionid,\";\n $sqlValues.=\"'\".$poRequestParamDetails['user_sessionid'].\"',\";\n }\n }\n if(array_key_exists('user_id', $poRequestParamDetails)){\n if($poRequestParamDetails['user_id']!=''){\n $sqlColumnNames.=\" user_id,\";\n $sqlValues.=\"'\".$poRequestParamDetails['user_id'].\"',\";\n }\n }\n if(array_key_exists('occassion_title', $poRequestParamDetails)){\n if($poRequestParamDetails['occassion_title']!=''){\n $sqlColumnNames.=\" occassion_title,\";\n $sqlValues.=\"'\".$poRequestParamDetails['occassion_title'].\"',\";\n }\n }\n if(array_key_exists('nos_person', $poRequestParamDetails)){\n if($poRequestParamDetails['nos_person']!=''){\n $sqlColumnNames.=\" nos_person,\";\n $sqlValues.=\"'\".$poRequestParamDetails['nos_person'].\"',\";\n }\n }\n if(array_key_exists('party_date', $poRequestParamDetails)){\n if($poRequestParamDetails['party_date']!=''){\n $sqlColumnNames.=\" party_date,\";\n $sqlValues.=\"'\".$poRequestParamDetails['party_date'].\"',\";\n }\n }\n if(array_key_exists('party_venue', $poRequestParamDetails)){\n if($poRequestParamDetails['party_venue']!=''){\n $sqlColumnNames.=\" party_venue,\";\n $sqlValues.=\"'\".$poRequestParamDetails['party_venue'].\"',\";\n }\n }\n if(array_key_exists('party_requirements', $poRequestParamDetails)){\n if($poRequestParamDetails['party_requirements']!=''){\n $sqlColumnNames.=\" party_requirements,\";\n $sqlValues.=\"'\".$poRequestParamDetails['party_requirements'].\"',\";\n }\n }\n if(array_key_exists('file', $poRequestParamDetails)){\n if($poRequestParamDetails['file']!=''){\n $sqlColumnNames.=\" file,\";\n $sqlValues.=\"'\".$poRequestParamDetails['file'].\"',\";\n }\n }\n if(array_key_exists('created_by', $poRequestParamDetails)){\n if($poRequestParamDetails['created_by']!=''){\n $sqlColumnNames.=\" created_by,\";\n $sqlValues.=\"'\".$poRequestParamDetails['created_by'].\"',\";\n }\n }\n if(array_key_exists('status', $poRequestParamDetails)){\n if($poRequestParamDetails['status']!=''){\n $sqlColumnNames.=\" status,\";\n $sqlValues.=\"'\".$poRequestParamDetails['status'].\"',\";\n }\n }\n if($sqlValues!='' && $sqlColumnNames!=''){\n $poRequestParamDetails['created_datedtime'] = date('Y-m-d H:i:s');\n $sqlColumnNames.=\" created_datedtime,\";\n $sqlValues.=\"'\".$poRequestParamDetails['created_datedtime'].\"',\";\n $sqlQuery = \" INSERT INTO DK_PARTYORDERS_REQUEST \" .rtrim(\"(\".$sqlColumnNames, ',').\") \".rtrim(\" VALUES(\".$sqlValues, ',').\")\";\n $command = $connection->createCommand($sqlQuery);\n $result = $command->execute();\n if($result>=1){\n $lastInsertedId = $connection->getLastInsertID();\n }\n }\n return $lastInsertedId;\n }", "private function _createOrder($_cart, $_usr)\n {\n //\t\tTODO We need tablefields for the new values:\n //\t\tShipment:\n //\t\t$_prices['shipmentValue']\t\tw/out tax\n //\t\t$_prices['shipmentTax']\t\t\tTax\n //\t\t$_prices['salesPriceShipment']\tTotal\n //\n //\t\tPayment:\n //\t\t$_prices['paymentValue']\t\tw/out tax\n //\t\t$_prices['paymentTax']\t\t\tTax\n //\t\t$_prices['paymentDiscount']\t\tDiscount\n //\t\t$_prices['salesPricePayment']\tTotal\n\n $_orderData = new stdClass();\n\n $_orderData->virtuemart_order_id = null;\n $oldOrderNumber = '';\n\n $this->deleteOldPendingOrder($_cart);\n\n\n $_orderData->virtuemart_user_id = $_usr->get('id');\n $_orderData->virtuemart_vendor_id = $_cart->vendorId;\n $_orderData->customer_number = $_cart->customer_number;\n $_prices = $_cart->cartPrices;\n //Note as long we do not have an extra table only storing addresses, the virtuemart_userinfo_id is not needed.\n //The virtuemart_userinfo_id is just the id of a stored address and is only necessary in the user maintance view or for choosing addresses.\n //the saved order should be an snapshot with plain data written in it.\n //\t\t$_orderData->virtuemart_userinfo_id = 'TODO'; // $_cart['BT']['virtuemart_userinfo_id']; // TODO; Add it in the cart... but where is this used? Obsolete?\n $_orderData->order_total = $_prices['billTotal'];\n $_orderData->order_salesPrice = $_prices['salesPrice'];\n $_orderData->order_billTaxAmount = $_prices['billTaxAmount'];\n $_orderData->order_billDiscountAmount = $_prices['billDiscountAmount'];\n $_orderData->order_discountAmount = $_prices['discountAmount'];\n $_orderData->order_subtotal = $_prices['priceWithoutTax'];\n $_orderData->order_tax = $_prices['taxAmount'];\n $_orderData->order_shipment = $_prices['shipmentValue'];\n $_orderData->order_shipment_tax = $_prices['shipmentTax'];\n $_orderData->order_payment = $_prices['paymentValue'];\n $_orderData->order_payment_tax = $_prices['paymentTax'];\n\n if (!empty($_cart->cartData['VatTax'])) {\n $taxes = array();\n foreach ($_cart->cartData['VatTax'] as $k => $VatTax) {\n $taxes[$k]['virtuemart_calc_id'] = $k;\n $taxes[$k]['calc_name'] = $VatTax['calc_name'];\n $taxes[$k]['calc_value'] = $VatTax['calc_value'];\n $taxes[$k]['result'] = $VatTax['result'];\n }\n $_orderData->order_billTax = vmJsApi::safe_json_encode($taxes);\n }\n\n if (!empty($_cart->couponCode)) {\n $_orderData->coupon_code = $_cart->couponCode;\n $_orderData->coupon_discount = $_prices['salesPriceCoupon'];\n }\n $_orderData->order_discount = $_prices['discountAmount']; // discount order_items\n\n\n $_orderData->order_status = 'P';\n $_orderData->order_currency = $this->getVendorCurrencyId($_orderData->virtuemart_vendor_id);\n\n if (isset($_cart->pricesCurrency)) {\n $_orderData->user_currency_id = $_cart->pricesCurrency;\n $currency = CurrencyDisplay::getInstance($_orderData->user_currency_id);\n if ($_orderData->user_currency_id != $_orderData->order_currency) {\n $_orderData->user_currency_rate = $currency->convertCurrencyTo($_orderData->user_currency_id, 1.0, false);\n } else {\n $_orderData->user_currency_rate = 1.0;\n }\n }\n\n $shoppergroups = $_cart->user->get('shopper_groups');\n if (!empty($shoppergroups)) {\n $_orderData->user_shoppergroups = implode(',', $shoppergroups);\n }\n\n if (isset($_cart->paymentCurrency)) {\n $_orderData->payment_currency_id = $_cart->paymentCurrency; //$this->getCurrencyIsoCode($_cart->pricesCurrency);\n $currency = CurrencyDisplay::getInstance($_orderData->payment_currency_id);\n if ($_orderData->payment_currency_id != $_orderData->order_currency) {\n $_orderData->payment_currency_rate = $currency->convertCurrencyTo($_orderData->payment_currency_id, 1.0, false);\n } else {\n $_orderData->payment_currency_rate = 1.0;\n }\n }\n\n $_orderData->virtuemart_paymentmethod_id = $_cart->virtuemart_paymentmethod_id;\n $_orderData->virtuemart_shipmentmethod_id = $_cart->virtuemart_shipmentmethod_id;\n\n //Some payment plugins need a new order_number for any try\n $_orderData->order_number = '';\n $_orderData->order_pass = '';\n\n $_orderData->order_language = $_cart->order_language;\n $_orderData->ip_address = ShopFunctions::getClientIP();;\n\n $maskIP = VmConfig::get('maskIP', 'last');\n if ($maskIP == 'last') {\n $rpos = strrpos($_orderData->ip_address, '.');\n $_orderData->ip_address = substr($_orderData->ip_address, 0, ($rpos + 1)) . 'xx';\n }\n\n //lets merge here the userdata from the cart to the order so that it can be used\n if (!empty($_cart->BT)) {\n $continue = array('created_on' => 1, 'created_by' => 1, 'modified_on' => 1, 'modified_by' => 1, 'locked_on' => 1, 'locked_by' => 1);\n foreach ($_cart->BT as $k => $v) {\n if (isset($continue[$k])) continue;\n $_orderData->{$k} = $v;\n }\n }\n $_orderData->STsameAsBT = $_cart->STsameAsBT;\n unset($_orderData->created_on);\n\n JPluginHelper::importPlugin('vmshopper');\n $dispatcher = JDispatcher::getInstance();\n $plg_datas = $dispatcher->trigger('plgVmOnUserOrder', array(&$_orderData));\n\n\n $i = 0;\n while ($oldOrderNumber == $_orderData->order_number) {\n if ($i > 5) {\n $msg = 'Could not generate new unique ordernumber';\n vmError($msg . ', an ordernumber should contain at least one random char', $msg);\n break;\n }\n $_orderData->order_number = $this->genStdOrderNumber($_orderData->virtuemart_vendor_id);\n if (!empty($oldOrderNumber)) vmdebug('Generated new ordernumber ', $oldOrderNumber, $_orderData->order_number);\n $i++;\n }\n if (empty($_orderData->order_pass)) {\n $_orderData->order_pass = $this->genStdOrderPass();\n }\n if (empty($_orderData->order_create_invoice_pass)) {\n $_orderData->order_create_invoice_pass = $this->genStdCreateInvoicePass();\n }\n\n $orderTable = $this->getTable('orders');\n $orderTable->bindChecknStore($_orderData);\n\n if (!empty($_cart->couponCode)) {\n //set the virtuemart_order_id in the Request for 3rd party coupon components (by Seyi and Max)\n vRequest::setVar('virtuemart_order_id', $orderTable->virtuemart_order_id);\n // If a gift coupon was used, remove it now\n CouponHelper::setInUseCoupon($_cart->couponCode, true);\n }\n // the order number is saved into the session to make sure that the correct cart is emptied with the payment notification\n $_cart->order_number = $orderTable->order_number;\n $_cart->order_pass = $_orderData->order_pass;\n $_cart->virtuemart_order_id = $orderTable->virtuemart_order_id;\n $_cart->setCartIntoSession();\n\n return $orderTable->virtuemart_order_id;\n }", "public function orderItem($param) { \n if (!$this->aaa->has_right('openruth', 500))\n $res->orderItemError->_value = 'authentication_error';\n else {\n $targets = $this->config->get_value('ruth', 'ztargets');\n $agencyId = self::strip_agency($param->agencyId->_value);\n if ($tgt = $targets[$agencyId]) {\n // build order\n $ord = &$order->Reservation->_value;\n $ord->LibraryNo->_value = $agencyId;\n $ord->BorrowerTicketNo->_value = $param->userId->_value;\n $ord->DisposalNote->_value = $param->orderNote->_value;\n $ord->LastUseDate->_value = self::to_zruth_date($param->orderLastInterestDate->_value);\n $ord->ServiceCounter->_value = $param->agencyCounter->_value;\n $ord->Override->_value = (self::xs_true($param->agencyCounter->_value) ? 'Y' : 'N');\n $ord->Priority->_value = $param->orderPriority->_value;\n // ?????? $ord->DisposalType->_value = $param->xxxx->_value;\n $itemIds = &$param->orderItemId;\n if (is_array($itemIds))\n foreach ($itemIds as $oid) {\n $mrid->ID->_value = $oid->_value->itemId->_value;\n if (!$mrid->TitlePartNo->_value = $oid->_value->itemSerialPartId->_value)\n $mrid->TitlePartNo->_value = 0;\n $ord->MRIDS->_value->MRID[]->_value = $mrid;\n }\n else {\n $mrid->ID->_value = $itemIds->_value->itemId->_value;\n if (!$mrid->TitlePartNo->_value = $itemIds->_value->itemSerialPartId->_value)\n $mrid->TitlePartNo->_value = 0;\n $ord->MRIDS->_value->MRID->_value = $mrid;\n }\n $xml = '<?xml version=\"1.0\" encoding=\"ISO-8859-1\" ?'.'>' . utf8_decode($this->objconvert->obj2xml($order));\n \n//print_r($ord);\n//print_r($xml);\n \n $z = new z3950();\n $z->set_target($tgt['host']);\n $z->set_database($tgt['database'].'-ophelia');\n $z->set_authentication($tgt['authentication']);\n if ($tgt['proxy']) {\n $z->set_proxy($tgt['proxy']);\n }\n $xml_ret = $z->z3950_xml_update($xml, $tgt['timeout']);\n if ($z->get_errno() == 0 && $xml_ret['xmlUpdateDoc']) {\n $dom = new DomDocument();\n $dom->preserveWhiteSpace = false;\n if ($dom->loadXML($xml_ret['xmlUpdateDoc'])) {\n if ($err = &$dom->getElementsByTagName('ErrorResponse')->item(0)) {\n verbose::log(ERROR, __FUNCTION__ . ' (' . __LINE__ . ') errno: ' . $err->getAttribute('Err') . \n ' error: ' . $err->nodeValue);\n $res->orderItemError->_value = 'unspecified error, order not possible';\n } else {\n // order at least partly ok \n foreach ($dom->getElementsByTagName('MRID') as $mrid) {\n unset($ir);\n $ir->orderItemId->_value->itemId->_value = $mrid->getAttribute('Id');\n if ($mrid->getAttribute('Tp'))\n $ir->orderItemId->_value->itemSerialPartId->_value = $mrid->getAttribute('Tp');\n if (!$mrid->nodeValue)\n $ir->orderItemOk->_value = 'true';\n elseif (!($ir->orderItemError->_value = $this->errs[$mrid->nodeValue])) \n $ir->orderItemError->_value = 'unknown error: ' . $mrid->nodeValue;\n $res->orderItem[]->_value = $ir;\n }\n }\n }\n } else {\n self::log_z_error(__FUNCTION__, __LINE__, $agencyId, $z->get_errno(), $z->get_error_string());\n $res->orderItemError->_value = 'system error';\n }\n//echo \"\\n\";\n//print_r($xml_ret);\n//print_r(\"\\nError: \" . $z->get_errno());\n } else\n $res->orderItemError->_value = 'unknown agencyId';\n }\n\n $ret->orderItemResponse->_value = $res;\n //var_dump($param); var_dump($res); die();\n return $ret;\n }", "public function saveOrderUrbitInformation($observer)\n {\n $checkoutId = Mage::getSingleton('core/session')->getCheckoutIdFromApi();\n\n $deliveryInfo = $this->getDeliveryInfoFromSession();\n\n $dateString = $deliveryInfo['day'] == \"now\" ? $this->getNowDeliveryTime() :\n $deliveryInfo['day'] . \" \" . $deliveryInfo['hour'] . \":\" . $deliveryInfo['minute'] . \":00\";\n\n $deliveryDate = DateTime::createFromFormat('Y-m-d H:i:s', $dateString, new DateTimeZone(\"UTC\"));\n $formattedDeliveryDate = $deliveryDate->format('Y-m-d\\TH:i:sP');\n\n $nowTime = new DateTime(null, new DateTimeZone(\"UTC\"));\n $nowTimestamp = $nowTime->getTimestamp();\n\n $preparationTime = Mage::getStoreConfig('carriers/' . Vaimo_UrbIt_Model_System_Config_Source_Environment::CARRIER_CODE . '/order_now_validation_time');\n\n if ($preparationTime) {\n $nowTimestamp += (int)$preparationTime * 60;\n }\n\n $attributes = array(\n 'urbit_checkout_id' => $checkoutId,\n 'urbit_update_checkout_time' => $nowTimestamp,\n 'urbit_triggered' => 'false',\n 'urbit_delivery_time' => $formattedDeliveryDate,\n 'urbit_message' => $deliveryInfo['message'],\n 'urbit_first_name' => $deliveryInfo['firstname'],\n 'urbit_last_name' => $deliveryInfo['lastname'],\n 'urbit_street' => $deliveryInfo['address'],\n 'urbit_city' => $deliveryInfo['city'],\n 'urbit_postcode' => $deliveryInfo['postcode'],\n 'urbit_phone_number' => $deliveryInfo['phone'],\n 'urbit_email' => $deliveryInfo['email']\n );\n\n $event = $observer->getEvent();\n $order = $event->getOrder();\n\n foreach ($attributes as $attrName => $attrValue) {\n $order->setData($attrName, $attrValue);\n }\n\n return $this;\n }", "public function addPartyOrdersRequest($dkParamDataArr){\n $rspDetails = array();\n $rspDetails[\"poRequestedStatusDetails\"] = array();\n $rspDetails['poRequestedStatusDetails'][\"isPartyOrderRequestSend\"] = 'NO';\n $rspDetails['poRequestedStatusDetails'][\"partyOrderNo\"] = '';\n // check requested param data length\n if(count($dkParamDataArr)>0 && $dkParamDataArr!=false){\n // add party order request status\n $dkParamDataArr['status'] = 'R';\n // fetch user session data details\n $userSessionDetailsData = commonfunction :: getUserSessionDetails($dkParamDataArr);\n if(count($userSessionDetailsData)>0 && $userSessionDetailsData!=false){\n $dkParamDataArr['partyorder_no'] = commonfunction :: generatePartyOrderNo();\n $dkParamDataArr['user_id'] = $userSessionDetailsData['unmd5UserId'];\n $dkParamDataArr['created_by'] = $userSessionDetailsData['unmd5UserId'];\n $lastPORID = PartyOrdersDao::addPartyOrderRequest($dkParamDataArr);\n if($lastPORID>0 && $lastPORID!=false){\n $rspDetails['poRequestedStatusDetails'][\"isPartyOrderRequestSend\"] = 'YES';\n $rspDetails['poRequestedStatusDetails'][\"partyOrderNo\"] = $dkParamDataArr['partyorder_no'];\n // send sms to end user to inform about party order request recieve by desserts khazana\n // $retEmailSentStatus = commonfunction :: preparedDataSendingEmailAboutPartyOrdersRequestReceiveFromCustomer($dkParamDataArr);\n // $smsMsgBody = \"Sms Testing CJ\";\n // $retSmsSentStatus = utils :: sendSMS(array(\"9975967186\"), $smsMsgBody);\n } \n }\n } \n return $rspDetails;\n }", "public function setOrderAttributes($requestParameters = array());", "public function addDescriptionParams()\n {\n $oBasket = $this->getBasket();\n $oConfig = $this->getPayPalConfig();\n $oRequest = $this->getPayPalRequest();\n\n // description\n $sShopNameFull = $oConfig->getBrandName();\n $sShopName = substr($sShopNameFull, 0, 70);\n if ($sShopNameFull != $sShopName) {\n $sShopName .= \"...\";\n }\n\n $sSubj = sprintf($this->getLang()->translateString(\"OEPAYPAL_ORDER_SUBJECT\"), $sShopName, $oBasket->getFPrice(), $oBasket->getBasketCurrency()->name);\n $oRequest->setParameter(\"PAYMENTREQUEST_0_DESC\", $sSubj);\n $oRequest->setParameter(\"PAYMENTREQUEST_0_CUSTOM\", $sSubj);\n }", "public function initOrderDetail(&$orderItem, $item) {\n $payMethod = array('pm_id' => '',\n 'title' => $item['payment_method'],\n 'description' => '');\n\n $orderItem = array('order_id' => $item['order_id'],\n 'display_id' => $item['order_id'], //show id\n 'uname' => $item['shipping_firstname'] . ' ' . $item['shipping_lastname'],\n 'currency' => $item['currency_code'],\n 'shipping_address' => array(),\n 'billing_address' => array(),\n 'payment_method' => $payMethod,\n 'shipping_insurance' => '',\n 'coupon' => $item['coupon_id'],\n 'order_status' => array(),\n 'last_status_id' => $item['order_status_id'], //get current status from history\n 'order_tax' => $item['fax'],\n 'order_date_start' => $item['date_added'],\n 'order_date_finish' => '',\n 'order_date_purchased' => $item['date_modified']);\n }", "public function addBasketItemParams()\n {\n $oBasket = $this->getBasket();\n $oLang = $this->getLang();\n $oRequest = $this->getPayPalRequest();\n\n $iPos = 0;\n foreach ($oBasket->getContents() as $oBasketItem) {\n $oRequest->setParameter(\"L_PAYMENTREQUEST_0_NAME{$iPos}\", getStr()->html_entity_decode($oBasketItem->getTitle()));\n $oRequest->setParameter(\"L_PAYMENTREQUEST_0_AMT{$iPos}\", $this->_formatFloat($oBasketItem->getUnitPrice()->getPrice()));\n $oRequest->setParameter(\"L_PAYMENTREQUEST_0_QTY{$iPos}\", (int) $oBasketItem->getAmount());\n $oRequest->setParameter(\"L_PAYMENTREQUEST_0_ITEMURL{$iPos}\", $oBasketItem->getLink());\n\n $oBasketProduct = $oBasketItem->getArticle();\n $oRequest->setParameter(\"L_PAYMENTREQUEST_0_NUMBER{$iPos}\", $oBasketProduct->oxarticles__oxartnum->value);\n\n $iPos++;\n }\n\n //adding payment costs as product\n if ($oBasket->getPayPalPaymentCosts() > 0) {\n $sPaymentTitle = $oLang->translateString(\"OEPAYPAL_SURCHARGE\") . \" \" . $oLang->translateString(\"OEPAYPAL_TYPE_OF_PAYMENT\");\n $oRequest->setParameter(\"L_PAYMENTREQUEST_0_NAME{$iPos}\", $sPaymentTitle);\n $oRequest->setParameter(\"L_PAYMENTREQUEST_0_AMT{$iPos}\", $this->_formatFloat($oBasket->getPayPalPaymentCosts()));\n $oRequest->setParameter(\"L_PAYMENTREQUEST_0_QTY{$iPos}\", 1);\n\n $iPos++;\n }\n\n //adding wrapping as product\n if ($oBasket->getPayPalWrappingCosts() > 0) {\n $oRequest->setParameter(\"L_PAYMENTREQUEST_0_NAME{$iPos}\", $oLang->translateString(\"OEPAYPAL_GIFTWRAPPER\"));\n $oRequest->setParameter(\"L_PAYMENTREQUEST_0_AMT{$iPos}\", $this->_formatFloat($oBasket->getPayPalWrappingCosts()));\n $oRequest->setParameter(\"L_PAYMENTREQUEST_0_QTY{$iPos}\", 1);\n\n $iPos++;\n }\n\n //adding greeting card as product\n if ($oBasket->getPayPalGiftCardCosts() > 0) {\n $oRequest->setParameter(\"L_PAYMENTREQUEST_0_NAME{$iPos}\", $oLang->translateString(\"OEPAYPAL_GREETING_CARD\"));\n $oRequest->setParameter(\"L_PAYMENTREQUEST_0_AMT{$iPos}\", $this->_formatFloat($oBasket->getPayPalGiftCardCosts()));\n $oRequest->setParameter(\"L_PAYMENTREQUEST_0_QTY{$iPos}\", 1);\n\n $iPos++;\n }\n\n //adding trusted shops protection as product\n if ($oBasket->getPayPalTsProtectionCosts() > 0) {\n $oRequest->setParameter(\"L_PAYMENTREQUEST_0_NAME{$iPos}\", $oLang->translateString(\"OEPAYPAL_TRUSTED_SHOP_PROTECTION\"));\n $oRequest->setParameter(\"L_PAYMENTREQUEST_0_AMT{$iPos}\", $this->_formatFloat($oBasket->getPayPalTsProtectionCosts()));\n $oRequest->setParameter(\"L_PAYMENTREQUEST_0_QTY{$iPos}\", 1);\n }\n }", "public function addOrder($user_id) {\n\t\t\t$query = \"insert into orders (OID, o_UID, status, room, notes) values (null, ?, ?, ?, ?)\";\n\t\t\t$dataArr = array($user_id, $this->status, $this->room, $this->notes);\n\t\t\t$this -> manDb($query, $dataArr);\n\t\t}", "public function setOrder($orderAttributes)\n {\n $this->email = $orderAttributes['email'];\n $this->orderId = $orderAttributes['orderId'];\n }", "public function setOrder($params)\n\t{\n\t\treturn $this->request('set-order', $params);\n\t}", "private function memberAddOrder($data){\n $fields = array(\n 'app_id' => $this->appId,\n 'data' => array(\n 'msg_type' => 'order_add',\n 'order_id' => $data['order_id']\n ),\n 'headings' => [\n 'en' => '你有新的訂單',\n 'zh-Hant' => '你有新的訂單'\n ],\n 'contents' => [\n 'en' => '你有新的訂單待處理',\n 'zh-Hant' => '你有新的訂單待處理'\n ],\n 'small_icon' => 'ic_stat_onesignal_default',\n 'ios_badgeType' => 'Increase',\n 'ios_badgeCount' => 1,\n 'filters' => array(\n array(\n 'field' => 'tag',\n 'key' => 'id',\n 'relation' => '=',\n 'value' => $data['store_id']\n )\n )\n );\n return $fields;\n }", "private function updateOrderData()\n {\n $sign = $this->connector->signRequestKid(\n null,\n $this->connector->accountURL,\n $this->orderURL\n );\n\n $post = $this->connector->post($this->orderURL, $sign);\n if (strpos($post['header'], \"200 OK\") !== false) {\n $this->status = $post['body']['status'];\n $this->expires = $post['body']['expires'];\n $this->identifiers = $post['body']['identifiers'];\n $this->authorizationURLs = $post['body']['authorizations'];\n $this->finalizeURL = $post['body']['finalize'];\n if (array_key_exists('certificate', $post['body'])) {\n $this->certificateURL = $post['body']['certificate'];\n }\n $this->updateAuthorizations();\n } else {\n //@codeCoverageIgnoreStart\n $this->log->error(\"Failed to fetch order for {$this->basename}\");\n //@codeCoverageIgnoreEnd\n }\n }", "public function insertOrderDetails($value,$line_item, $mainOrderId)\n {\n //main order\n $order_list_arr['name'] = $value->name;\n $order_list_arr['shpoify_order_id'] = $value->id;\n $order_list_arr['line_item_id'] = $line_item->id;\n $order_list_arr['order_number'] = $value->order_number;\n $order_list_arr['customer_name'] = $value->billing_address->name;\n $order_list_arr['app_id'] = $value->app_id;\n $order_list_arr['checkout_id'] = $value->checkout_id;\n $order_list_arr['token'] = $value->token;\n $order_list_arr['gateway'] = $value->gateway;\n $order_list_arr['total_price'] = $value->total_price;\n $order_list_arr['subtotal_price'] = $value->subtotal_price;\n $order_list_arr['currency'] = $value->currency;\n $order_list_arr['cart_token'] = $value->cart_token;\n $order_list_arr['checkout_token'] = $value->checkout_token;\n $order_list_arr['order_status_url'] = $value->order_status_url;\n\n return OrderDetails::insertGetId($order_list_arr);\n\n }", "function buildOrderParams() \n\t{\n\t\tif ($this->sortByGroup === false && $this->sortField != \"\"){\n\t\t\t$this->strOrderBy = \"Order by \".$this->sortField;\n\t\t\tif ($this->sortOrder == \"A\")\n\t\t\t\t$this->strOrderBy .= \" asc\";\n\t\t\telse \n\t\t\t\t$this->strOrderBy .= \" desc\";\n\t\t}\n\t}", "private function setBackorderVars($order) {\n $this->ofb = $order;\n $this->newShipment['Shipment'] = (isset($this->ofb['Shipment'])) ? $this->ofb['Shipment'][0] : $this->ofb['Order']['Shipment'][0];\n $this->backorderRecord['Order'] = (isset($this->ofb['Backorder'])) ? $this->ofb['Backorder'] : $this->ofb['Order']['Backorder'];\n }", "public function __construct($order)\n {\n $this->order=$order;\n }", "public function addOrderLayer()\n {\n $transactions = $this->orderDataArray->setOrderIds($this->getOrderIds())->getOrderLayer();\n\n if (!empty($transactions)) {\n /** @var $tm DataLayer */\n $tm = $this->getParentBlock();\n foreach ($transactions as $order) {\n $tm->addCustomDataLayer($order);\n }\n }\n }", "public function setExtraParams($params = array()) {\n $params['resulturl'] = $params['ipn_url'];\n $params['returnurl'] = $params['return_url'];\n $params['reference'] = $params['vendor_order_id'];\n $params['authemail'] = '';\n $params['id'] = $this->_gatewayInfo->config['integration_id'];\n $params['integration_key'] = $this->_gatewayInfo->config['integration_key'];\n $params['status'] = 'Message';\n return $params;\n }", "public function __construct($order)\n {\n $this->order = $order;\n }", "public function __construct($order)\n {\n $this->order = $order;\n }", "public function __construct($order)\n {\n $this->order = $order;\n }", "public function __construct($order)\n {\n $this->order = $order;\n }", "public function __construct($order)\n {\n $this->order = $order;\n }", "public function __construct($order)\n {\n $this->order = $order;\n }", "public function __construct($order)\n {\n $this->order = $order;\n }", "public function __construct($order)\n {\n $this->order = $order;\n }", "public function vendor_accept_order($info)\n {\n $this->load->model('bitcoin_model');\n $this->load->model('bip32_model');\n $this->load->model('accounts_model');\n\n if ($info['initiating_user'] == 'buyer') {\n // Buyer public key is in $info.buyerpubkey array, also ID in update fields.\n\n $buyer_public_key = $info['buyer_public_key'];\n $this->update_order($info['order']['id'], $info['update_fields']);\n foreach ($info['update_fields'] as $key => $field) {\n $info['order'][$key] = $field;\n }\n $info['update_fields'] = array();\n } else {\n $buyer_public_key = $info['order']['public_keys']['buyer'];\n }\n\n // Add vendors public key no matter what we're doing!\n $vendor_public_key = $this->bip32_model->add_child_key(array(\n 'user_id' => $info['order']['vendor']['id'],\n 'user_role' => 'Vendor',\n 'order_id' => $info['order']['id'],\n 'order_hash' => '',\n 'parent_extended_public_key' => $info['vendor_public_key']['parent_extended_public_key'],\n 'provider' => $info['vendor_public_key']['provider'],\n 'extended_public_key' => $info['vendor_public_key']['extended_public_key'],\n 'public_key' => $info['vendor_public_key']['public_key'],\n 'key_index' => $info['vendor_public_key']['key_index']\n ));\n\n // Get vendors public key, stored by that function.\n $admin_public_key = $this->bip32_model->get_next_admin_child();\n\n if ($admin_public_key == FALSE) {\n return 'An error occured, which prevented your order being created. Please notify an administrator.';\n } else {\n $admin_public_key = $this->bip32_model->add_child_key(array(\n 'user_id' => '0',\n 'user_role' => 'Admin',\n 'order_id' => $info['order']['id'],\n 'order_hash' => '',\n 'parent_extended_public_key' => $admin_public_key['parent_extended_public_key'],\n 'provider' => 'Manual',\n 'extended_public_key' => $admin_public_key['extended_public_key'],\n 'public_key' => $admin_public_key['public_key'],\n 'key_index' => $admin_public_key['key_index']\n ));\n $public_keys = array($buyer_public_key['public_key'], $vendor_public_key['public_key'], $admin_public_key['public_key']);\n $sorted_keys = RawTransaction::sort_multisig_keys($public_keys);\n $multisig_details = RawTransaction::create_multisig('2', $sorted_keys);\n\n // If no errors, we're good to create the order!\n if ($multisig_details !== FALSE) {\n $this->bitcoin_model->log_key_usage('order', $this->bw_config->bip32_mpk, $admin_public_key['key_index'], $admin_public_key['public_key'], $info['order']['id']);\n\n $info['update_fields']['vendor_public_key'] = $vendor_public_key['id'];\n $info['update_fields']['admin_public_key'] = $admin_public_key['id'];\n $info['update_fields']['buyer_public_key'] = $buyer_public_key['id'];\n $info['update_fields']['address'] = $multisig_details['address'];\n $info['update_fields']['redeemScript'] = $multisig_details['redeemScript'];\n $info['update_fields']['selected_payment_type_time'] = time();\n $info['update_fields']['progress'] = 2;\n $info['update_fields']['time'] = time();\n\n if ($info['order_type'] == 'escrow') {\n $info['update_fields']['vendor_selected_escrow'] = '1';\n $info['update_fields']['extra_fees'] = ((($info['order']['price'] + $info['order']['shipping_costs']) / 100) * $this->bw_config->escrow_rate);\n } else {\n $info['update_fields']['vendor_selected_escrow'] = '0';\n $info['update_fields']['vendor_selected_upfront'] = '1';\n $info['update_fields']['extra_fees'] = ((($info['order']['price'] + $info['order']['shipping_costs']) / 100) * $this->bw_config->upfront_rate);\n }\n\n if ($this->update_order($info['order']['id'], $info['update_fields']) == TRUE) {\n $this->bitcoin_model->add_watch_address($multisig_details['address'], 'order');\n\n $subject = 'Confirmed Order #' . $info['order']['id'];\n $message = \"Your order with {$info['order']['vendor']['user_name']} has been confirmed.\\n\" . (($info['order_type'] == 'escrow') ? \"Escrow payment was chosen. Once you pay to the address, the vendor will ship the goods. You can raise a dispute if you have any issues.\" : \"You must make payment up-front to complete this order. Once the full amount is sent to the address, you must sign a transaction paying the vendor.\");\n $this->order_model->send_order_message($info['order']['id'], $info['order']['buyer']['user_name'], $subject, $message);\n\n $subject = 'New Order #' . $info['order']['id'];\n $message = \"A new order from {$info['order']['buyer']['user_name']} has been confirmed.\\n\" . (($info['order_type'] == 'escrow') ? \"Escrow was chosen for this order. Once paid, you will be asked to sign the transaction to indicate the goods have been dispatched.\" : \"Up-front payment was chosen for this order based on your settings for one of the items. The buyer will be asked to sign the transaction paying you immediately after payment, which you can sign and broadcast to mark the order as dispatched.\");\n $this->order_model->send_order_message($info['order']['id'], $info['order']['vendor']['user_name'], $subject, $message);\n\n $msg = ($info['initiating_user'] == 'buyer')\n ? 'This order has been automatically accepted, visit the orders page to see the payment address!'\n : 'You have accepted this order! Visit the orders page to see the monero address!';\n $this->current_user->set_return_message($msg, 'success');\n return TRUE;\n } else {\n return 'There was an error creating your order.';\n }\n } else {\n return 'Unable to create address.';\n }\n }\n }", "function get_payu_args( $order ) {\n\t\tglobal $woocommerce;\n\n\t\t$order_id = $order->id;\n\n\n\t\t$debug = ( $this->get_option( \"debug\" ) === \"yes\" ) ? 1 : 0;\n\t\t\n\t\t$payu_args = array_merge(\n\t\t\tarray(\n\t\t\t\t'MERCHANT' \t\t\t\t=> $this->get_option( \"merchant\" ),\n\t\t\t\t'SECRET_KEY' \t\t\t=> $this->get_option( \"secret_key\" ),\n\t\t\t\t'DEBUG'\t\t\t\t\t=> $debug,\n\t\t\t\t'LuUrl'\t\t\t\t\t=> $this->get_option(\"country\"),\n\n\t\t\t\t'cmd' \t\t\t\t\t=> '_cart',\n\t\t\t\t\n\t\t\t\t'no_note' \t\t\t\t=> 1,\n\t\t\t\t'currency_code' \t\t=> get_woocommerce_currency(),\n\t\t\t\t'charset' \t\t\t\t=> 'UTF-8',\n\t\t\t\t'rm' \t\t\t\t\t=> is_ssl() ? 2 : 1,\n\t\t\t\t'upload' \t\t\t\t=> 1,\n\n\t\t\t)\n\t\t);\n\n\t\t$shipping_total = 0;\n\t\tforeach ( $order->get_shipping_methods() as $shipping ) {\n\t\t\t$shipping_total += $shipping['cost'];\n\t\t}\n\n\t\t$billing = array(\n\t\t\t\t\t\"BILL_FNAME\" => $order->billing_first_name,\n\t\t\t\t\t\"BILL_LNAME\" => $order->billing_last_name,\n\t\t\t\t\t\"BILL_ADDRESS\" => $order->billing_address_1,\n\t\t\t\t\t\"BILL_ADDRESS2\" => $order->billing_address_2,\n\t\t\t\t\t\"BILL_CITY\" => $order->billing_city,\n\t\t\t\t\t\"BILL_PHONE\" => $order->billing_phone,\n\t\t\t\t\t\"BILL_EMAIL\" => $order->billing_email,\n\t\t\t\t\t\"BILL_COUNTRYCODE\" => $order->billing_country,\n\t\t\t\t\t\"BILL_ZIPCODE\" => $order->billing_postcode,\n\t\t\t\t\t\"LANGUAGE\" => $this->get_option( \"language\" ),\n\t\t\t\t\t\"ORDER_SHIPPING\" => number_format( $shipping_total + $order->get_shipping_tax() , 2, '.', '' ),#$order->get_shipping(),\n\t\t\t\t\t\"PRICES_CURRENCY\" => get_woocommerce_currency(),\n\t\t\t\t\t\"ORDER_REF\" => $order->id\n\t);\n\n\t\t// Shipping\n\t\t\t$delivery = array();\n\t\t\t$delivery = array(\n\t\t\t\t\t\"DELIVERY_FNAME\" => $order->shipping_first_name,\n\t\t\t\t\t\"DELIVERY_LNAME\" => $order->shipping_last_name,\n\t\t\t\t\t\"DELIVERY_ADDRESS\" => $order->shipping_address_1,\n\t\t\t\t\t\"DELIVERY_ADDRESS2\" => $order->shipping_address_2,\n\t\t\t\t\t\"DELIVERY_CITY\" => $order->shipping_city,\n\t\t\t\t\t\"DELIVERY_PHONE\" => $order->billing_phone,\n\t\t\t\t\t\"DELIVERY_EMAIL\" => $order->billing_email,\n\t\t\t\t\t\"DELIVERY_COUNTRYCODE\" => $order->shipping_country,\n\t\t\t\t\t\"DELIVERY_ZIPCODE\" => $order->shipping_postcode,\n\t\t\t\t\t);\n \n\n\n\t\t$OrderArray = array_merge( $billing, $delivery );\n\n\n\n\t\tif ( $this->get_option( \"backref\" ) !== \"\" && $this->get_option( \"backref\" ) !== \"no\" ) \n\t\t\t$OrderArray['BACK_REF'] = $this->get_option( \"backref\" );\n\n\n\t\t\n\t\t// Discount not used\n\t\t\t# $payu_args['discount_amount_cart'] = $order->get_order_discount();\n\n\t\t\t\n\t\t$item_names = array();\n\n\t\tif ( sizeof( $order->get_items() ) > 0 )\n\t\t\tforeach ( $order->get_items() as $item )\n\t\t\t{\n\t\t\t\t\t$OrderArray['ORDER_PNAME'][] = $item['name']; # Array with data of goods\n\t\t\t\t\t$OrderArray['ORDER_QTY'][] = $item['qty']; # Array with data of counts of each goods \n\t\t\t\t\t$OrderArray['ORDER_PRICE'][] = $order->get_item_total( $item, false ); #number_format( $order->get_total() - $order->get_shipping() - $order->get_shipping_tax() + $order->get_order_discount(), 2, '.', '' ); # Array with prices of goods\n\t\t\t\t\t$OrderArray['ORDER_PCODE'][] = $item['product_id'] ; #\"testgoods_\".$item['id']; # Array with codes of goods\n\t\t\t\t\t$OrderArray['ORDER_VAT'][] = $this->get_option( \"VAT\" );# Array with VAT of each goods => from settings\n\t\t\t}\n\n\t\tif (defined('WC_VERSION') && version_compare(WC_VERSION, '2.3', '<')) {\n\t $discount = $order->get_order_discount();\n\t } else {\n\t $discount = $order->get_total_discount();\n\t }\n\n\t $OrderArray['DISCOUNT'] = $discount;\n\t\t \n\t\t$payu_args['Payu_data'] = $OrderArray;\n\t\t// $payu_args = apply_filters( 'woocommerce_payu_args', $payu_args );\n\n\t\treturn $payu_args;\n\t}", "public function addBasketParams()\n {\n $oRequest = $this->getPayPalRequest();\n $oBasket = $this->getBasket();\n\n $blVirtualBasket = $oBasket->isVirtualPayPalBasket();\n\n // only downloadable products? missing getter on oxBasket yet\n $oRequest->setParameter(\"NOSHIPPING\", $blVirtualBasket ? \"1\" : \"0\");\n\n if ($blVirtualBasket) {\n $oRequest->setParameter(\"REQCONFIRMSHIPPING\", \"0\");\n }\n // passing basket VAT (tax) value. It is required as in Net mode articles are without VAT, but basket is with VAT.\n // PayPal need this value to check if all articles sum match basket sum.\n if ($oBasket->isCalculationModeNetto()) {\n $oRequest->setParameter(\"PAYMENTREQUEST_0_TAXAMT\", $this->_formatFloat($oBasket->getPayPalBasketVatValue()));\n }\n\n $oRequest->setParameter(\"PAYMENTREQUEST_0_AMT\", $this->_formatFloat($oBasket->getPrice()->getBruttoPrice()));\n $oRequest->setParameter(\"PAYMENTREQUEST_0_CURRENCYCODE\", $oBasket->getBasketCurrency()->name);\n $oRequest->setParameter(\"PAYMENTREQUEST_0_ITEMAMT\", $this->_formatFloat($oBasket->getSumOfCostOfAllItemsPayPalBasket()));\n $oRequest->setParameter(\"PAYMENTREQUEST_0_SHIPPINGAMT\", $this->_formatFloat($oBasket->getDeliveryCosts()));\n $oRequest->setParameter(\"PAYMENTREQUEST_0_SHIPDISCAMT\", $this->_formatFloat($oBasket->getDiscountSumPayPalBasket() * -1));\n\n $oDelivery = oxNew(\"oxDeliverySet\");\n $sDeliveryName = ($oDelivery->load($oBasket->getShippingId())) ? $oDelivery->oxdeliveryset__oxtitle->value : \"#1\";\n\n $oRequest->setParameter(\"L_SHIPPINGOPTIONISDEFAULT0\", \"true\");\n $oRequest->setParameter(\"L_SHIPPINGOPTIONNAME0\", $sDeliveryName);\n $oRequest->setParameter(\"L_SHIPPINGOPTIONAMOUNT0\", $this->_formatFloat($oBasket->getDeliveryCosts()));\n }", "function campaignEcommAddOrder($order) {\n $params = array();\n $params[\"order\"] = $order;\n return $this->callServer(\"campaignEcommAddOrder\", $params);\n }", "private function loadOrder()\n {\n $brqOrderId = $this->getOrderIncrementId();\n\n //Check if the order can receive further status updates\n $this->order->loadByIncrementId((string) $brqOrderId);\n\n if (!$this->order->getId()) {\n $this->logging->addDebug('Order could not be loaded by brq_invoicenumber or brq_ordernumber');\n // try to get order by transaction id on payment.\n $this->order = $this->getOrderByTransactionKey();\n }\n }", "public function __construct($order=null)\n {\n $this->data = $order;\n }", "function setOrder($order){\n\t\t$this->order=$order;\n\t}", "public function setOrder($userId, $totalamount, $taxrate, $taxamount, $status )\n {\n // declare que $booking est un nouveau model de la classe Database\n $order = new Database();\n // On fait une requete sql pour envoyer des infos dans la table Order !!! attention à l'injection SQL\n $sql= 'INSERT INTO Order (User_Id, TotalAmount, TaxRate, $TaxAmount, CreationTimestamp,\n CompleteTimestamp, Status)\n VALUES (?, ?, ?, ?, NOW(), NOW(), ?)';\n // on stock dans un tableau qui est la variable $valbooking les valeurs que l'on a besoin c.a.d $bookingdate, $bookingtime, $numofseat, $userId\n $valorder = [$userId, $totalamount, $taxrate, $taxamount, $status];\n // on utilise la fonction executeSql qui vient de la class Database ou la fonction executeSql a pour argument ($sql, array $values = array()) c'est pour ça que à la ligne 14 on a mit les valeur dans un tableau\n $order->executeSql($sql, $valorder);\n }", "public function getAfterPayParamsByOrder(Order $order = null, $mode = PaymentHelper::MODE_AFTERPAY)\n {\n\n// $payments = $paymentContract->getPaymentsByOrderId($order->îd);\n\n $AfterPayRequestParams['basket'] = [];\n $basket['currency'] = $order->amounts[0]->currency;\n $basket['basketAmount'] = $order->amounts[0]->invoiceTotal;\n $basket['couponDiscount'] = 0;\n $basket['shippingAmount'] = 0;\n\n /** declare the variable as array */\n $AfterPayRequestParams['basketItems'] = [];\n\n /** @var \\Plenty\\Modules\\Item\\Item\\Contracts\\ItemRepositoryContract $itemContract */\n $itemContract = pluginApp(\\Plenty\\Modules\\Item\\Item\\Contracts\\ItemRepositoryContract::class);\n\n $itemSum = 0.0;\n\n /** @var OrderItem $basketItem */\n foreach ($order->orderItems as $orderItem)\n {\n if ($orderItem->typeId == 4) //coupon\n {\n $basket['couponDiscount'] = $orderItem->amounts[0]->priceGross; //amount\n continue;\n }\n if ($orderItem->typeId == 6) //shipping costs\n {\n $basket['shippingAmount'] = $orderItem->amounts[0]->priceGross; //amount\n continue;\n }\n\n\n $AfterPayBasketItem['itemId'] = $orderItem->variation->itemId;\n $AfterPayBasketItem['quantity'] = $orderItem->quantity;\n $AfterPayBasketItem['price'] = $orderItem->amounts[0]->priceGross;\n\n $itemSum += $orderItem->quantity * $orderItem->amounts[0]->priceGross;\n\n /** @var \\Plenty\\Modules\\Item\\Item\\Models\\Item $item */\n $item = $itemContract->show($orderItem->variation->itemId);\n\n /** @var \\Plenty\\Modules\\Item\\Item\\Models\\ItemText $itemText */\n $itemText = $item->texts;\n\n $AfterPayBasketItem['name'] = $itemText->first()->name1;\n\n $AfterPayRequestParams['basketItems'][] = $AfterPayBasketItem;\n }\n\n $basket['itemSum'] = $itemSum;\n\n /** @var Basket $basket */\n $AfterPayRequestParams['basket'] = $basket;\n\n // Read the shipping address ID from the session\n $shippingAddress = $order->deliveryAddress;\n\n if (empty($shippingAddress))\n {\n $shippingAddress = $order->billingAddress;\n }\n\n if (!is_null($shippingAddress))\n {\n /** declarce the variable as array */\n $AfterPayRequestParams['shippingAddress'] = [];\n $AfterPayRequestParams['shippingAddress']['town'] = $shippingAddress->town;\n $AfterPayRequestParams['shippingAddress']['postalCode'] = $shippingAddress->postalCode;\n $AfterPayRequestParams['shippingAddress']['firstname'] = $shippingAddress->firstName;\n $AfterPayRequestParams['shippingAddress']['lastname'] = $shippingAddress->lastName;\n $AfterPayRequestParams['shippingAddress']['street'] = $shippingAddress->street;\n $AfterPayRequestParams['shippingAddress']['houseNumber'] = $shippingAddress->houseNumber;\n\n /** @var \\Plenty\\Modules\\Order\\Shipping\\Countries\\Contracts\\CountryRepositoryContract $countryRepo */\n $countryRepo = pluginApp(\\Plenty\\Modules\\Order\\Shipping\\Countries\\Contracts\\CountryRepositoryContract::class);\n\n // Fill the country for AfterPay parameters\n $country = [];\n $country['isoCode2'] = $countryRepo->findIsoCode($shippingAddress->countryId, 'iso_code_2');\n $AfterPayRequestParams['country'] = $country;\n\n // Get the URLs for AfterPay parameters\n $AfterPayRequestParams['urls'] = $this->paymentHelper->getRestOrderReturnUrls($order->id);\n\n return $AfterPayRequestParams;\n }\n// }\n // Get the URLs for AfterPay parameters\n $AfterPayRequestParams['urls'] = $this->paymentHelper->getRestOrderReturnUrls($order->id);\n\n return $AfterPayRequestParams;\n }", "static public function add2Order($goods_list)\n {\n $params = [\n 'user_data_id' => (int) getenv('AMTEL_USER_DATA_ID'), // (int) * – Идентификатор клиента для которого делается заказ (отличается от user_id для доступа к API, выдается вместе с остальными учетными данными при подключении)\n 'basket_num' => (int) getenv('AMTEL_BASKET_NUM', 1), // Номер корзины клиента, указанный реселлером при добавлении товара в корзину.\n 'delivery_city_id' => getenv('AMTEL_DELIVERY_CITY_ID', 1), // Идентификатор города доставки.\n 'delivery_address' => getenv('AMTEL_DELIVERY_ADDRESS', ''), // Адрес доставки.\n 'delivery_contact' => getenv('AMTEL_DELIVERY_CONTACT', ''), // Телефон получателя заказа.\n 'delivery_tel' => getenv('AMTEL_DELIVERY_TEL', ''), // Телефон получателя заказа.\n 'delivery_comment' => getenv('AMTEL_DELIVERY_COMMENT', ''), // Комментарий к заказу.\n 'allow_supplier_offer_sim' => getenv('AMTEL_ALLOW_REPLACE', false), // Разрешить поставщику предлагать замену.\n 'to_split' => false, // Разбивать заказ при наличии разных поставщиков товаров в корзине.\n 'basket_goods_list' => json_decode($goods_list), // Список basket_goods_id для заказа, остальные останутся в корзине, если не указан - закажутся все товары.\n //'shipping_company_id => ' – Идентификатор транспортной компании.\n //payment_method_id – Идентификатор способа оплаты.\n //tags – Список тегов, по которым после создания заказа будет возможна фильтрация, задаются в виде массива строк, например: [\"tag1\", \"tag2\"]. Например можно указать номер заказа, идентификатор клиента в системе реселлера.\n //order_list_url – Адрес на стороне реселлера, по которому доступен лист заказа (будет приложен поставщиком к заказу).\n ];\n\n try {\n $res = json_decode(self::post('/order', $params), true);\n Log::info('add to order=' . print_r($res, 1));\n\n return $res;\n } catch (\\Exception $e) {\n Log::error($e);\n throw new HttpException(500, $e->getMessage());\n }\n }", "public function addOrder($ord) {\n $this->sql .= \" ORDER BY $ord\";\n }", "protected function setReceivedPaymentFromBuckaroo()\n {\n if (empty($this->postData['brq_transactions'])) {\n return;\n }\n\n $payment = $this->order->getPayment();\n\n if (!$payment->getAdditionalInformation(self::BUCKAROO_RECEIVED_TRANSACTIONS)) {\n $payment->setAdditionalInformation(\n self::BUCKAROO_RECEIVED_TRANSACTIONS,\n [$this->postData['brq_transactions'] => floatval($this->postData['brq_amount'])]\n );\n } else {\n $buckarooTransactionKeysArray = $payment->getAdditionalInformation(self::BUCKAROO_RECEIVED_TRANSACTIONS);\n\n $buckarooTransactionKeysArray[$this->postData['brq_transactions']] =\n floatval($this->postData['brq_amount']);\n\n $payment->setAdditionalInformation(self::BUCKAROO_RECEIVED_TRANSACTIONS, $buckarooTransactionKeysArray);\n }\n }", "public static function save_order(Model_Order $order, Model_Shopper $shopper, $shopper_branch=array(), $additional_data=array())\n {\n \n ////////// zaznam do db\n \n // cislo zalohove faktury\n\t$order->order_code_invoice = Service_Order::_create_new_invoice_code($order->order_payment_id); \n \n\t$order->order_date \t =date(\"Y-m-d H:i:s\");\n\t$order->order_delivery_date =null; // zatim nepouzivat\n\t$order->order_date_tax \t =null; // zatim nepouzivat\n\t$order->order_date_payment =null; // zatim nepouzivat\n \n $order->order_state_id\t =0; // novy stav se nastavi nakonci teto metody\n \n // veskere vypocty cen se provadi v metode \"generate_order_prices\", v tomto okamziku je ma jiz objekt \"$order\" nasetovane (vyvolano v kontroleru)\n // ...\n \n // definitivne vyridime slevovy kupon \n \n if($order->order_voucher_id)\n {\n Service_Voucher::use_voucher($order->order_voucher_id);\n }\n \n $order->order_shopper_id =$shopper->id;\n\t$order->order_shopper_branch =isset($shopper_branch[\"branch_id\"])?$shopper_branch[\"branch_id\"]:null;;\n\t$order->order_shopper_name =$shopper->nazev;\n\t$order->order_shopper_code =$shopper->kod;\n\t$order->order_shopper_email =$shopper->email;\n\t$order->order_shopper_phone =$shopper->telefon;\n\t$order->order_shopper_ic =$shopper->ic;\n\t$order->order_shopper_dic =$shopper->dic;\n\t$order->order_shopper_street =$shopper->ulice;\n\t$order->order_shopper_city =$shopper->mesto;\n\t$order->order_shopper_zip =$shopper->psc;\n $order->order_shopper_note =!empty($additional_data[\"shopper_note\"])?$additional_data[\"shopper_note\"]:\"\";\n $order->order_shopper_custommer_code =!empty($additional_data[\"customer_order_code\"])?$additional_data[\"customer_order_code\"]:\"\";\n $order->gift_box_code =!empty($additional_data[\"gift_box_code\"])?$additional_data[\"gift_box_code\"]:\"\";\n\n // nacteme data pro zvolenou pobocku\n $order->order_branch_name =isset($shopper_branch[\"nazev\"])?$shopper_branch[\"nazev\"]:null;\n\t$order->order_branch_code =isset($shopper_branch[\"kod\"])?$shopper_branch[\"kod\"]:null;\n\t$order->order_branch_street =isset($shopper_branch[\"ulice\"])?$shopper_branch[\"ulice\"]:null;\n\t$order->order_branch_city =isset($shopper_branch[\"mesto\"])?$shopper_branch[\"mesto\"]:null;\n\t$order->order_branch_zip =isset($shopper_branch[\"psc\"])?$shopper_branch[\"psc\"]:null;\n\t$order->order_branch_phone =isset($shopper_branch[\"telefon\"])?$shopper_branch[\"telefon\"]:null;\n\t$order->order_branch_email =isset($shopper_branch[\"email\"])?$shopper_branch[\"email\"]:null;\n\n $order->last_modified =date(\"Y-m-d H:i:s\");\n \n if($order->order_total_with_vat==0) die(\"chyba, objednávka neobsahuje žádné zboží!\");\n \n $order_id=$order->save()->id;\n \n \n // nyni vim id vlozeneho zaznamu - muzu doplnit kod objednavky shopper_id-order_id (000000-000000)\n $order->order_code = Service_Order::_create_new_order_code($shopper->kod, $order_id);\n $order->save();\n\n $cart_data=$order->get_cart()->get_cart_products(); // ziskam zbozi z kosiku pridruzeneho k objednavce\n \n foreach($cart_data as $item){\n // $key = product_id\n\n $order_item=orm::factory(\"order_item\");\n // naplneni order itemu\n $order_item->code =$item[\"code\"];\n $order_item->nazev =$item[\"nazev\"];\n //$order_item->varianta_popis =$item[\"varianta\"][\"barva_velikost\"];\n //$order_item->varianta_id =$item[\"varianta\"][\"id\"];\n $order_item->jednotka =$item[\"jednotka\"];\n $order_item->hmotnost =$item[\"hmotnost\"];\n $order_item->pocet_na_sklade =$item[\"pocet_na_sklade\"];\n $order_item->min_order_quantity =$item[\"min_order_quantity\"];\n $order_item->tax_code =$item[\"tax_code\"];\n $order_item->order_id =$order_id;\n $order_item->product_id =$item[\"id\"];\n $order_item->units =$item[\"mnozstvi\"];\n $order_item->price_without_tax =$item[\"cena_bez_dph\"];\n $order_item->price_with_tax =$item[\"cena_s_dph\"];\n $order_item->total_price_with_tax =$item[\"cena_celkem_s_dph\"];\n $order_item->item_change =null;\n $order_item->total_weight =$item[\"hmotnost\"] * $item[\"mnozstvi\"];\n\n $order_item->save();\n }\n \n // nastavim priznak objednavky - pri prvnim ulozeni nebudu posilat mail se zmenou stavu\n Service_Order::set_order_state($order, \"new\", false);\n \n return $order;\n }", "public function createExpressCheckoutOrder($tid){}", "public function add(OrderAddress $orderAddress): void\n {\n $this->getEntityManager()->persist($orderAddress);\n }", "private function SetOrderData()\n\t\t{\n\t\t\t// doesn't factor in cookies stored by Interspire Shopping Cart, so we have to pass back the\n\t\t\t// order token manually from those payment providers. We do this by taking the\n\t\t\t// cart ID passed back from the provider which stores the order's unique token.\n\t\t\tif(isset($_COOKIE['SHOP_ORDER_TOKEN'])) {\n\t\t\t\t$this->orderToken = $_COOKIE['SHOP_ORDER_TOKEN'];\n\t\t\t}\n\t\t\telse if(isset($_REQUEST['provider'])) {\n\t\t\t\tGetModuleById('checkout', $this->paymentProvider, $_REQUEST['provider']);\n\n\t\t\t\tif(in_array(\"GetOrderToken\", get_class_methods($this->paymentProvider))) {\n\t\t\t\t\t$this->orderToken = $this->paymentProvider->GetOrderToken();\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tob_end_clean();\n\t\t\t\t\theader(sprintf(\"Location:%s\", $GLOBALS['ShopPath']));\n\t\t\t\t\tdie();\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Load the pending orders from the database\n\t\t\t$this->pendingData = LoadPendingOrdersByToken($this->orderToken, true);\n\t\t\tif(!$this->orderToken || $this->pendingData === false) {\n\t\t\t\t$this->BadOrder();\n\t\t\t\texit;\n\t\t\t}\n\n\t\t\tif($this->paymentProvider === null) {\n\t\t\t\tGetModuleById('checkout', $this->paymentProvider, $this->pendingData['paymentmodule']);\n\t\t\t}\n\n\t\t\tif($this->paymentProvider) {\n\t\t\t\t$this->paymentProvider->SetOrderData($this->pendingData);\n\t\t\t}\n\t\t}", "public function add_orders($uid)\n\t\t{\n\t\t\t$col['UserId'] = $uid;\n\t\t\t$id = $this->input->post('productsids');\n\t\t\n\t\t\n\t\t\t$ids = implode(',',$id);\n\t\t\t\t//print_r($ids);\n\t\t\t\t//exit;\n\t\t\t$col['ProductId'] = $ids;\n\t\t\t\n\t\t\tif($this->db->insert('tb_orders_prowise',$col))\n\t\t\t{\n\t\t\t\treturn array('err'=>'0');\n\t\t\t}\n\t\t\telse\n\t\t\t\treturn array('err'=>'1');\n\t\t\t\n\t\t}", "public function addNewOrder($newOrderVendorId, $newOrderUserId, $newOrderProductId, $newOrderProductQuantity, $newOrderTotal, $newOrderDeliveryAddress, $newOrderEmail, $newOrderPhoneNumber) {\n\n $newOrderTime = time(); // We generate the date and time the order has been created\n\n $query = $this->db->prepare(\"INSERT INTO `orders` (`order_partner_id`, `order_customer_id`, `order_product_id`, `order_product_quantity`, `order_total`, `order_delivery_address`, `order_email`, `order_phone_number`, `order_timestamp`, `order_processed`) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?)\");\n\n $query->bindValue(1, $newOrderVendorId);\n $query->bindValue(2, $newOrderUserId);\n $query->bindValue(3, $newOrderProductId);\n $query->bindValue(4, $newOrderProductQuantity);\n $query->bindValue(5, $newOrderTotal);\n $query->bindValue(6, $newOrderDeliveryAddress);\n $query->bindValue(7, $newOrderEmail);\n $query->bindValue(8, $newOrderPhoneNumber);\n $query->bindValue(9, $newOrderTime);\n $query->bindValue(10, 0);\n\n try {\n\n $query->execute();\n\n } catch(PDOException $e) {\n die($e->getMessage());\n }\n }", "public function setOrderId(?string $orderId): void\n {\n $this->orderId['value'] = $orderId;\n }", "function buildOrder($orders) {\n\t$order = [\n\t\t\"service_uid\" => $orders[0][15],\n\t\t\"points\" => 0,\n\t\t\"invoice_number\" => $orders[0][2],\n\t\t\"purchase_detail\" => [],\n\t\t\"prices\" => [],\n\t\t\"branch_name\" => $orders[0][0],\n\t\t\"createtime\" => date('Y-m-d H:i:s')\n\t];\n\n\t$total = 0;\n\t$discount = 0;\n\tforeach ($orders as $o) {\n\t\t$order['purchase_detail'][] = [\n\t\t\t\"sku\" => $o[3],\n\t\t\t\"product_name\" => $o[4],\n\t\t\t\"category\" => [$o[5], $o[6]],\n\t\t\t\"quantity\" => (int) abs($o[16]),\n\t\t\t\"unit_price\" => (float) $o[17],\n\t\t\t\"variations\" => [\n\t\t\t\t['name' => 'Linea', 'value' => $o[5]],\n\t\t\t\t['name' => 'Color', 'value' => $o[10]],\n\t\t\t\t['name' => 'Talle', 'value' => $o[11]],\n\t\t\t]\n\t\t];\n\n\t\t$total += (int) abs($o[16]) * (float) $o[17];\n\t\t$discount += abs($o[19]);\n\t}\n\n\t$order['prices'] = [\n\t\t\"gross\" => $total,\n\t\t\"discount\" => $discount,\n\t\t\"total\" => $total - $discount\n\t];\n\n\treturn $order;\n}", "private function addQuoteExtensionAttributesToOrder($order)\n {\n $quoteId = $order->getQuoteId();\n\n /** @var \\Magento\\Quote\\Model\\Quote $mageQuote */\n $mageQuote = $this->mageQuoteFactory->create()->load($quoteId);\n if (!$mageQuote->getId() || !$mageQuote->getLinkedQuotationId()) {\n //no mage quote data available or no quotation quote linked\n return $order;\n }\n\n $quotationId = $mageQuote->getLinkedQuotationId();\n\n /** @var Quote $quotation */\n $quotation = $this->quoteFactory->create()->load($quotationId);\n if (!$quotation->getId()) {\n //no quote data available\n return $order;\n }\n\n $extensionAttributes = $order->getExtensionAttributes();\n if ($extensionAttributes === null) {\n $extensionAttributes = $this->orderExtensionFactory->create();\n }\n\n //modify extension attributes, add the quote increment id\n $extensionAttributes->setQuoteationIncrementId($quotation->getIncrementId());\n\n //add a backend url\n $backendUrl = $this->backendUrl->getUrl(\n 'quotation/quote/view',\n ['quote_id' => $quotation->getId()]\n );\n $extensionAttributes->setQuoteationBackendUrl($backendUrl);\n\n //set extension attributes\n $order->setExtensionAttributes($extensionAttributes);\n\n return $order;\n }", "public function addAddressParams()\n {\n $oUser = $this->getUser();\n if (!$oUser) {\n return;\n }\n $oRequest = $this->getPayPalRequest();\n\n $oRequest->setParameter(\"EMAIL\", $oUser->oxuser__oxusername->value);\n\n $sAddressId = $oUser->getSelectedAddressId();\n if ($sAddressId) {\n $oAddress = oxNew(\"oxAddress\");\n $oAddress->load($sAddressId);\n\n $oRequest->setParameter(\"PAYMENTREQUEST_0_SHIPTONAME\", getStr()->html_entity_decode($oAddress->oxaddress__oxfname->value . \" \" . $oAddress->oxaddress__oxlname->value));\n $oRequest->setParameter(\"PAYMENTREQUEST_0_SHIPTOSTREET\", getStr()->html_entity_decode($oAddress->oxaddress__oxstreet->value . \" \" . $oAddress->oxaddress__oxstreetnr->value));\n $oRequest->setParameter(\"PAYMENTREQUEST_0_SHIPTOCITY\", $oAddress->oxaddress__oxcity->value);\n $oRequest->setParameter(\"PAYMENTREQUEST_0_SHIPTOZIP\", $oAddress->oxaddress__oxzip->value);\n $oRequest->setParameter(\"PAYMENTREQUEST_0_SHIPTOPHONENUM\", $oAddress->oxaddress__oxfon->value);\n\n $oCountry = oxNew(\"oxCountry\");\n $oCountry->load($oAddress->oxaddress__oxcountryid->value);\n $oRequest->setParameter(\"PAYMENTREQUEST_0_SHIPTOCOUNTRYCODE\", $oCountry->oxcountry__oxisoalpha2->value);\n\n if ($oAddress->oxaddress__oxstateid->value) {\n $oState = oxNew(\"oxState\");\n $oState->load($oAddress->oxaddress__oxstateid->value);\n $oRequest->setParameter(\"PAYMENTREQUEST_0_SHIPTOSTATE\", $oState->oxstates__oxisoalpha2->value);\n }\n } else {\n $oRequest->setParameter(\"PAYMENTREQUEST_0_SHIPTONAME\", getStr()->html_entity_decode($oUser->oxuser__oxfname->value . \" \" . $oUser->oxuser__oxlname->value));\n $oRequest->setParameter(\"PAYMENTREQUEST_0_SHIPTOSTREET\", getStr()->html_entity_decode($oUser->oxuser__oxstreet->value . \" \" . $oUser->oxuser__oxstreetnr->value));\n $oRequest->setParameter(\"PAYMENTREQUEST_0_SHIPTOCITY\", $oUser->oxuser__oxcity->value);\n $oRequest->setParameter(\"PAYMENTREQUEST_0_SHIPTOZIP\", $oUser->oxuser__oxzip->value);\n $oRequest->setParameter(\"PAYMENTREQUEST_0_SHIPTOPHONENUM\", $oUser->oxuser__oxfon->value);\n\n $oCountry = oxNew(\"oxCountry\");\n $oCountry->load($oUser->oxuser__oxcountryid->value);\n $oRequest->setParameter(\"PAYMENTREQUEST_0_SHIPTOCOUNTRYCODE\", $oCountry->oxcountry__oxisoalpha2->value);\n\n if ($oUser->oxuser__oxstateid->value) {\n $oState = oxNew(\"oxState\");\n $oState->load($oUser->oxuser__oxstateid->value);\n $oRequest->setParameter(\"PAYMENTREQUEST_0_SHIPTOSTATE\", $oState->oxstates__oxisoalpha2->value);\n }\n }\n }", "public function hookAdminOrder($params)\r\n\t{\r\n\t\t/* Check if the order was paid with this Addon and display the Transaction details */\r\n\t\tif (Db::getInstance()->getValue('SELECT module FROM '._DB_PREFIX_.'orders WHERE id_order = '.(int)$_GET['id_order']) == $this->name)\r\n\t\t{\r\n\t\t\t/* Do not display the refund block unless the API crendetials are set */\r\n\t\t\tif (Configuration::get('PAYPAL_USA_API_USERNAME') == '' || Configuration::get('PAYPAL_USA_API_PASSWORD') == '' || Configuration::get('PAYPAL_USA_API_SIGNATURE') == '')\r\n\t\t\t\treturn;\r\n\r\n\t\t\t/* Retrieve the transaction details */\r\n\t\t\t$paypal_usa_transaction_details = Db::getInstance()->getRow('\r\n\t\t\tSELECT *\r\n\t\t\tFROM '._DB_PREFIX_.'paypal_usa_transaction\r\n\t\t\tWHERE id_order = '.(int)$_GET['id_order'].' AND type = \\'payment\\' AND id_shop = '.(int)$this->context->shop->id);\r\n\r\n\t\t\t/* Get all the refunds previously made (to build a list and determine if another refund is still possible) */\r\n\t\t\t$paypal_usa_refund_details = Db::getInstance()->ExecuteS('\r\n\t\t\tSELECT amount, date_add, currency\r\n\t\t\tFROM '._DB_PREFIX_.'paypal_usa_transaction\r\n\t\t\tWHERE id_order = '.(int)$_GET['id_order'].' AND type = \\'refund\\' AND id_shop = '.(int)$this->context->shop->id.' ORDER BY date_add DESC');\r\n\r\n\t\t\t$paypal_products = array('express' => 'PayPal Express Checkout', 'standard' => 'PayPal Standard', 'advanced' => 'PayPal Payments Advanced', 'payflow_pro' => 'PayPal PayFlow Pro');\r\n\t\t\t$paypal_usa_transaction_details['source'] = $paypal_products[$paypal_usa_transaction_details['source']];\r\n\r\n\t\t\t$this->context->smarty->assign(array(\r\n\t\t\t\t'paypal_usa_more60d' => ((time() - strtotime($paypal_usa_transaction_details['date_add'])) > (60 * 86400)), /* Do not allow refund if the order has been placed more than 60 days ago */\r\n\t\t\t\t'paypal_usa_transaction_details' => $paypal_usa_transaction_details,\r\n\t\t\t\t'paypal_usa_refund_details' => $paypal_usa_refund_details));\r\n\r\n\t\t\treturn $this->display(__FILE__, 'views/templates/admin/admin-order.tpl');\r\n\t\t}\r\n\t}", "public function setOrder(?string $order): void\n {\n $this->order = $order;\n }", "public function setOrder(?string $order): void\n {\n $this->order = $order;\n }", "function generate_order($order,$mysqli){\r\n\r\n $orders = get_items_database($mysqli);\r\n\r\n \r\n $level = ($order->extension_attributes->shipping_assignments);\r\n foreach($level as $i){\r\n $address = $i->shipping->address;\r\n \r\n $adr = $address->street[0];\r\n $postal = $address->postcode;\r\n $city = $address->city;\r\n \r\n }\r\n\r\n \r\n foreach($order->items as $i){ \r\n foreach ($orders as $e){\r\n if ($e[\"code\"] == $i->sku){\r\n //print_r($e[\"code\"] .\" \". $i->sku);\r\n \r\n $ITid = $e[\"item_id\"];\r\n $ITname = $i->name;\r\n $ITcode = $i->sku;\r\n $qty = $i->qty_ordered;\r\n $cena = $i->price_incl_tax;\r\n \r\n \r\n } \r\n }\r\n }\r\n\r\n\r\n\r\n $data = array(\r\n \"OrderId\" => $order->increment_id,\r\n \"ReceivedIssued\" => \"P\",\r\n \"Year\" => 0,\r\n \"Number\" => null,\r\n \"Date\" => date(\"Y-m-d H:i:s\"),\r\n \"Customer\" => array(\r\n \"ID\" => 8451445,\r\n \"Name\" => null,\r\n \"ResourceUrl\" => null\r\n ),\r\n \"CustomerName\" => $order->customer_firstname.\" \". $order->customer_lastname,\r\n \"CustomerAddress\" => $adr,\r\n \"CustomerPostalCode\" => $postal,\r\n \"CustomerCity\" => $city,\r\n\r\n \"CustomerCountry\" => array(\r\n \"ID\" => 192,\r\n \"Name\" => null,\r\n \"ResourceUrl\" => null\r\n ),\r\n \"CustomerCountryName\" => null,\r\n \"Analytic\" => null,\r\n \"DueDate\" => null,\r\n \"Reference\" => $order->entity_id,\r\n \"Currency\" => array(\r\n \"ID\" => 7,\r\n \"Name\" => null,\r\n \"ResourceUrl\" => null\r\n ),\r\n \"Notes\" => null,\r\n \"Document\" => null,\r\n \"DateConfirmed\" => null,\r\n \"DateCompleted\" => null,\r\n \"DateCanceled\" => null,\r\n \"Status\" => null,\r\n \"DescriptionAbove\" => null,\r\n \"DescriptionBelow\" => null,\r\n \"ReportTemplate\" => array(\r\n \"ID\" => null,\r\n \"Name\" => null,\r\n \"ResourceUrl\" => null\r\n ),\r\n\r\n \"OrderRows\" => [array(\r\n \"OrderRowId\" => null,\r\n \"Order\" => null,\r\n \"Item\" => array(\r\n \"ID\" => $ITid,\r\n \"Name\" => null,\r\n \"ResourceUrl\" => null,\r\n ),\r\n \"ItemName\" => $ITname,\r\n \"ItemCode\" => $ITcode,\r\n \"Description\" => null,\r\n \"Quantity\" => $qty,\r\n \"Price\" => $cena,\r\n \"UnitOfMeasurement\" => \"kos\",\r\n \"RecordDtModified\" => \"2020-01-07T12:20:00+02:00\",\r\n \"RowVersion\" => null,\r\n \"_links\" => null,\r\n ) ],\r\n\r\n \"RecordDtModified\" => date(\"Y-m-d H:i:s\"),\r\n \"RowVersion\" => null,\r\n \"_links\" => null\r\n\r\n );\r\n \r\n return $data;\r\n}", "public function hookNewOrder($params)\r\n {\r\n $carrier = new Carrier((int) $params['order']->id_carrier);\r\n $result = TipsaAdminComun::getTipsaCarriers(\"`id_reference` = \" . (int) $carrier->id_reference);\r\n\r\n if (!$result) {\r\n return false;\r\n }\r\n\r\n $tipo_servicio = $result['code'];\r\n\r\n $office = Db::getInstance()->getRow(\r\n \"SELECT * FROM `\" . _DB_PREFIX_ . \"tipsa_address`\r\n WHERE `id_cart` = \" . (int) $params['cart']->id . \" AND `id_carrier` = \" . (int) $params['order']->id_carrier\r\n );\r\n try {\r\n if ($tipo_servicio == $this->service_codes_yupick) {\r\n if ($office) {\r\n // get current customer address\r\n $address = new Address($params['order']->id_address_delivery);\r\n // Create a new address with the point location\r\n $address_point = new Address();\r\n //loop through address fields in case the shop has added custom or required fields\r\n foreach ($address as $name => $value) {\r\n if (!is_array($value) && !in_array($name, array('date_upd', 'date_add', 'id', 'country'))) {\r\n switch ($name) {\r\n case 'id_customer':\r\n $address_point->id_customer = $params['order']->id_customer;\r\n break;\r\n case 'address1':\r\n $address_point->address1 = $office['address'];\r\n break;\r\n case 'address2':\r\n $address_point->address2 = $office['firstname'];\r\n break;\r\n case 'postcode':\r\n $address_point->postcode = $office['postcode'];\r\n break;\r\n case 'city':\r\n $address_point->city = $office['city'];\r\n break;\r\n case 'alias':\r\n $address_point->alias = $office['alias'];\r\n break;\r\n case 'phone_mobile':\r\n if (!empty($office['phone_mobile'])) {\r\n $address_point->phone_mobile = $office['phone_mobile'];\r\n } else {\r\n $address_point->phone_mobile = \"0\";\r\n }\r\n break;\r\n case 'phone':\r\n $address_point->phone = $office['phone'] != '' ? $office['phone'] : \"0\";\r\n break;\r\n case 'deleted':\r\n $address_point->deleted = true;\r\n break;\r\n default:\r\n $address_point->$name = $value;\r\n }\r\n }\r\n }\r\n\r\n $address_point->save();\r\n if ($address_point->id) {\r\n $order = $params['order'];\r\n $order->id_address_delivery = $address_point->id;\r\n $order->update();\r\n }\r\n }\r\n }\r\n Db::getInstance()->update(\r\n 'tipsa_address',\r\n array('state' => 1, 'id_order' => (int) $params['order']->id),\r\n \"`state` = 0 AND `id_cart` = \" . (int) $params['cart']->id . \" AND `id_carrier` = \" . (int) $params['order']->id_carrier\r\n );\r\n } catch (Exception $e) {\r\n //In case of error, just do the most important\r\n return $e->message();\r\n }\r\n\r\n //Delete old quotes. Need to be in Days because Paypal or card payment validation can last some time\r\n Db::getInstance()->Execute(\r\n \"DELETE FROM \" . _DB_PREFIX_ . \"tipsa_address\r\n WHERE date < DATE_SUB(NOW(), INTERVAL 7 DAY) AND state = 0\"\r\n );\r\n }", "public function buildOrderRequest(Model $order, string $currency)\n {\n $data = [\n 'idempotency_key' => uniqid(),\n 'order' => [\n 'reference_id'=> (string) $order->id,\n 'line_items' => $this->buildProducts($order->products, $currency),\n 'discounts' => $this->buildDiscounts($order->discounts, $currency),\n 'taxes' => $this->buildTaxes($order->taxes),\n ],\n ];\n\n // Add product level discounts to order level taxes\n if ($this->productDiscounts->isNotEmpty()) {\n $data['order']['discounts'] = $this->productDiscounts->merge($data['order']['discounts'])->toArray();\n $this->productDiscounts = collect([]);\n }\n\n // Add product level taxes to order level taxes\n if ($this->productTaxes->isNotEmpty()) {\n $data['order']['taxes'] = $this->productTaxes->merge($data['order']['taxes'])->toArray();\n $this->productTaxes = collect([]);\n }\n\n return new CreateOrderRequest($data);\n }", "protected function buildPaymentFields($order_info)\r\n {\r\n $processor_params = $this->processor_data['processor_params'];\r\n\r\n return [\r\n 'Amount' => intval($order_info['total'] * 100),\r\n 'CurrencyCode' => PaymentsenseIso4217::getCurrencyIsoCode($processor_params['currency']),\r\n 'OrderID' => ($order_info['repaid']) ? ($order_info['order_id'] . '_' . $order_info['repaid']) : $order_info['order_id'],\r\n 'TransactionType' => $processor_params['transaction_type'],\r\n 'TransactionDateTime' => date('Y-m-d H:i:s P'),\r\n 'CallbackURL' => $this->getCallbackUrl($this->processor_data['processor_script']),\r\n 'OrderDescription' => '',\r\n 'CustomerName' => $order_info['b_firstname'] . ' ' . $order_info['b_lastname'],\r\n 'Address1' => $order_info['b_address'],\r\n 'Address2' => $order_info['b_address_2'],\r\n 'Address3' => '',\r\n 'Address4' => '',\r\n 'City' => $order_info['b_city'],\r\n 'State' => $order_info['b_state_descr'],\r\n 'PostCode' => $order_info['b_zipcode'],\r\n 'CountryCode' => $this->getCountryNumericCode($order_info['b_country']),\r\n 'EmailAddress' => $order_info['email'],\r\n 'PhoneNumber' => $order_info['phone'],\r\n 'EmailAddressEditable' => 'false',\r\n 'PhoneNumberEditable' => 'false',\r\n 'CV2Mandatory' => $processor_params['cv2_mandatory'],\r\n 'Address1Mandatory' => $processor_params['address_mandatory'],\r\n 'CityMandatory' => $processor_params['city_mandatory'],\r\n 'PostCodeMandatory' => $processor_params['postcode_mandatory'],\r\n 'StateMandatory' => $processor_params['state_mandatory'],\r\n 'CountryMandatory' => $processor_params['country_mandatory'],\r\n 'ResultDeliveryMethod' => 'SERVER',\r\n 'ServerResultURL' => $this->getServerResultURL(),\r\n 'PaymentFormDisplaysResult' => 'false'\r\n ];\r\n }", "public function addOrder(Order $order) {\n $this->orders->add($order);\n }", "public function setOrderData($orderData): Order\n {\n $this->id = $orderData->getIncrementId();\n $this->email = $orderData->getCustomerEmail();\n $this->quoteId = $orderData->getQuoteId();\n $this->storeName = $orderData->getStore()->getName();\n $this->purchaseDate = $orderData->getCreatedAt();\n $this->deliveryMethod = $orderData->getShippingDescription();\n $this->deliveryTotal = (float) number_format(\n (float) $orderData->getShippingAmount(),\n 2,\n '.',\n ''\n );\n $this->currency = $orderData->getOrderCurrencyCode();\n\n /** @var OrderPaymentInterface|InfoInterface $payment */\n $payment = $orderData->getPayment();\n if ($payment) {\n if ($payment->getMethod()) {\n $methodInstance = $payment->getMethodInstance();\n if ($methodInstance) {\n $this->payment = $methodInstance->getTitle();\n }\n }\n }\n\n $this->couponCode = (string) $orderData->getCouponCode();\n\n /*\n * custom order attributes\n */\n $customAttributes = $this->getConfigSelectedCustomOrderAttributes(\n $orderData->getStore()->getWebsite()->getId()\n );\n\n if ($customAttributes) {\n $fields = $this->helper->getOrderTableDescription();\n $this->custom = [];\n foreach ($customAttributes as $customAttribute) {\n if (isset($fields[$customAttribute])) {\n $field = $fields[$customAttribute];\n $value = $this->_getCustomAttributeValue(\n $field,\n $orderData\n );\n if ($value) {\n $this->_assignCustom($field, $value);\n }\n }\n }\n }\n\n /*\n * Billing address.\n */\n $this->processBillingAddress($orderData);\n\n /*\n * Shipping address.\n */\n $this->processShippingAddress($orderData);\n\n $websiteId = $orderData->getStore()->getWebsiteId();\n\n $includeCustomOptions = $this->helper->getWebsiteConfig(\n Config::XML_PATH_CONNECTOR_SYNC_ORDER_PRODUCT_CUSTOM_OPTIONS,\n $websiteId\n );\n\n $orderItemProcessor = $this->orderItemProcessorFactory\n ->create(['data' => [\n 'websiteId' => $websiteId,\n 'includeCustomOptions' => $includeCustomOptions\n ]]);\n\n /*\n * Order items.\n */\n try {\n foreach ($orderData->getAllItems() as $productItem) {\n $productData = $orderItemProcessor->process($productItem);\n $this->mergeProductData($productData);\n }\n } catch (\\InvalidArgumentException $e) {\n $this->logger->debug(\n 'Error processing items for order ID: ' . $orderData->getId(),\n [(string) $e]\n );\n $this->products = [];\n }\n\n $this->orderSubtotal = (float) number_format(\n (float) $orderData->getData('subtotal'),\n 2,\n '.',\n ''\n );\n $this->discountAmount = (float) number_format(\n (float) $orderData->getData('discount_amount'),\n 2,\n '.',\n ''\n );\n $orderTotal = abs(\n $orderData->getData('grand_total') - $orderData->getTotalRefunded()\n );\n $this->orderTotal = (float) number_format($orderTotal, 2, '.', '');\n $this->orderStatus = $orderData->getStatus();\n\n if (!$this->schemaValidator->isValid($this->toArray())) {\n throw new SchemaValidationException(\n $this->schemaValidator,\n __(\"Validation error\")\n );\n }\n\n return $this;\n }", "public function addOrderedItemsToStock($order)\r\n {\r\n \t$nVersion = Mage::getModel('paymentsensegateway/direct')->getVersion();\r\n \t$isCustomStockManagementEnabled = Mage::getModel('paymentsensegateway/direct')->getConfigData('customstockmanagementenabled');\r\n\t\t\r\n \tif($nVersion >= 1410 &&\r\n \t\t$isCustomStockManagementEnabled)\r\n \t{\r\n\t \t$items = $order->getAllItems();\r\n\t\t\tforeach ($items as $itemId => $item)\r\n\t\t\t{\r\n\t\t\t\t// ordered quantity of the item from stock\r\n\t\t\t\t$quantity = $item->getQtyOrdered();\r\n\t\t\t\t$productId = $item->getProductId();\r\n\t\t\t\t\r\n\t\t\t\t$stock = Mage::getModel('cataloginventory/stock_item')->loadByProduct($productId);\r\n\t\t\t\t$stockManagement = $stock->getManageStock();\r\n\t\t\t\t\r\n\t\t\t\tif($stockManagement)\r\n\t\t\t\t{\r\n\t\t\t\t\t$stock->setQty($stock->getQty() + $quantity);\r\n\t\t\t\t\t$stock->save();\r\n\t\t\t\t}\r\n\t\t\t}\r\n \t}\r\n }", "public function captureOrder(\\TPkgShopPaymentTransactionManager $transactionManager, \\TdbShopOrder $order);", "private function _addDescriptionElement($order)\n {\n $description = $order->addChild('description');\n $this->_addCDATA($description, $this->orderDescription);\n }", "public function setOrder($order);", "public function order($strOrder) {\n\t\t\t$this->arOrder[] = $strOrder; \n\t\t}", "public function hookorderConfirmation($params)\n {\n // For order confirmation\n $isActivate = $this->isRulesetActive('order_confirmation');\n if ($isActivate != null && $isActivate != '' && $this->smsAPI != null && $this->smsAPI != '') {\n $param = $params['objOrder'];\n $order = new Order((int)$param->id);\n \n if ($order) {\n $address = new Address((int)$order->id_address_delivery);\n $legendstemp = $this->replaceOrderLegends(\n $isActivate[0]['template'],\n $order,\n $address\n );\n // Use send SMS API here\n $legendstemp = preg_replace('/<br(\\s+)?\\/?>/i', \"\\n\", $legendstemp);\n $postAPIdata = array(\n 'label' => $isActivate[0]['label'],\n 'sms_text' => $legendstemp,\n 'source' => '21000',\n 'sender_id' => $isActivate[0]['senderid'],\n 'mobile_number' => $address->phone_mobile\n );\n $this->sendSMSByAPI($postAPIdata);\n Onehopsmsservice::onehopSaveLog('Confirmed', $legendstemp, $address->phone_mobile);\n $productArray = $order->getProducts();\n if ($productArray) {\n foreach ($productArray as $product) {\n $this->productOutofOrderProcess($product['product_id']);\n }\n }\n }\n }\n }", "public function __construct(Order $order)\n {\n $this->order = $order;\n }", "public function __construct(Order $order)\n {\n $this->order = $order;\n }", "public function __construct(Order $order)\n {\n $this->order = $order;\n }", "public function __construct(Order $order)\n {\n $this->order = $order;\n }", "public function __construct(Order $order)\n {\n $this->order = $order;\n }", "public function __construct(Order $order)\n {\n $this->order = $order;\n }", "public function __construct(Order $order)\n {\n $this->order = $order;\n }", "public function __construct(Order $order)\n {\n $this->order = $order;\n }", "public function __construct(Order $order)\n {\n $this->order = $order;\n }", "public function __construct(Order $order)\n {\n $this->order = $order;\n }", "public function submit_order()\r\n\t{\r\n\t\t$orderdata = $this->input->post('order');\r\n\r\n\t\t$params = array();\r\n\t\t$notification = array();\r\n\t\t// print_r($orderdata); die();\r\n\r\n\t\t$updateUser['name'] = $orderdata['fname'];\r\n\t\t$updateUser['lname'] = $orderdata['lname'];\r\n\t\t$updateUser['email'] = $orderdata['email'];\r\n\t\t$updateUser['mobile'] = $orderdata['mobile'];\r\n\t\t$this->load->library('zyk/UserLib', 'userlib');\r\n\t\t$this->userlib->updateUser( $updateUser );\r\n\t\t\r\n\t\t$params['name'] = $orderdata['fname'].\" \".$orderdata['lname'];\r\n\t\t$params['email'] = $orderdata['email'];\r\n\t\t$params['mobile'] = $orderdata['mobile'];\r\n\t\t$params['address_id'] = $orderdata['address_id'];\r\n\t\t$params['slot'] = $orderdata['slottime'];\r\n\t\t$params['vehicle_id'] = $orderdata['vehicle_id'];\r\n\t\t$params['brand_id'] = $orderdata['brand_id'];\r\n\t\t$params['vehicle_model'] = $orderdata['model_id'];\r\n\t\t$params['vendor_id'] = $orderdata['vendor_id'];\r\n\t\t$params['userid'] = $orderdata['user_id'];\r\n\r\n\t\tif(!empty($orderdata['slotdate']))\r\n\t\t{\r\n\t\t\t$params['pickup_date'] = $orderdata['slotdate'];\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\t$params['pickup_date'] = date('Y-m-d');\r\n\t\t}\r\n\t\t\r\n\t\t$params['delivery_date'] = date('Y-m-d',strtotime('+72 hours',strtotime($params['pickup_date'])));\r\n\t\t$params['service_group_id'] = $orderdata['servicegroup_id'];\r\n\t\t$params['assign_vendor_id'] = $orderdata['vendor_id'];\r\n\t\t$params['status'] = 0;\r\n\t\t$params['ordered_on'] = date('Y-m-d H:i:s');\r\n\t\t$params['source'] = 2;\r\n\t\t$params['old_price'] = 0;\r\n\t\t$params['category_id'] = 9;\r\n\t\t$params['subcategory_id'] = $orderdata['st']; // its pick n'drop or breakdown id (st:service type)\r\n\t\t$params['applied_ride_charge'] = $_SESSION['stData']['price'];\r\n\t\t$params['ride_payment_mode'] = $orderdata['paymode'];\r\n\t\t$params['coupon_code'] = $orderdata['ccode'];\r\n\t\t$params['is_ride_paid'] = 0;\r\n\r\n\t\t$orderid = $this->orderlib->addOrder($params);\r\n\r\n $oupdate = array();\r\n\t\t$oupdate['orderid'] = $orderid;\r\n\t\t$oupdate['ordercode'] = strtoupper(base_convert(strtotime(date('Y-m-d H:i:s')), 10, 36)).strtoupper(base_convert($orderid, 10, 36));\r\n\t\t$_SESSION['order_code'] = $oupdate['ordercode'];\r\n \t\tif($orderid > 0) {\r\n\t\t\t$params['orderid'] = $orderid;\r\n\r\n\t\t\t$params['ordercode'] = $oupdate['ordercode'];\r\n $this->orderlib->updateOrder($oupdate);\r\n\r\n\t\t\t$this->orderlib->sendBookingEmail($params);\r\n\t\t\t$this->orderlib->sendBookingSMS($params);\r\n\t\t\t$this->load->library ( 'zyk/NotificationLib', 'notificationlib' );\r\n\t\t\t$this->notificationlib->sendBookingNotification($params['userid']);\r\n\t\t\t$response['orderid'] = $orderid;\r\n\t\t\t$response['ordercode'] = $oupdate['ordercode'];\r\n\t\t\t$response['status'] = 1;\r\n\t\t\t$response['msg'] = \"Order punched in system\";\r\n\t\t\t// $_SESSION['orderid']=$orderid ;\r\n\r\n\t\t\t$logs = array();\r\n\t\t\t$logs['orderid'] = $orderid;\r\n\t\t\t$logs['comment'] = 'Booking Request Sent';\r\n\t\t\t$logs['created_date'] = date('Y-m-d H:i:s');\r\n\t\t\t$logs['order_status'] = 0;\r\n\t\t\t$logs['created_by'] = 0;\r\n\r\n\t\t\t$this->orderlib->addOrderLogs($logs);\r\n\t\t\t$this->session->unset_userdata('vendor_id');\r\n\t\t\t$this->session->unset_userdata('slottime');\r\n\t\t\t$this->session->unset_userdata('slotdate');\r\n\t\t\t$this->session->unset_userdata('categories');\r\n\t\t\t$this->session->unset_userdata('back_url');\r\n\t\t\t$this->session->unset_userdata('referrer_url');\r\n\t\t\t$this->session->unset_userdata('stData');\r\n\t\t\t$this->session->unset_userdata('serviceType');\r\n\t\t\t$this->session->unset_userdata('filterbrand');\r\n\t\t\t$this->session->unset_userdata('filterstar');\r\n\t\t\t$this->session->unset_userdata('filtermodel');\r\n\r\n\t\t\tif ($orderdata['paymode'] == 1) {\r\n\t\t\t\t$response['url'] = \"order-details/\".$response['ordercode'];\r\n\t\t\t} else if ($orderdata['paymode'] == 2) {\r\n\t\t\t\t$response['url'] = \"ride_payment\";\r\n\t\t\t}\r\n\t\t\t$response['status'] = 1;\r\n\t\t\t$response['msg'] = \"Order punched in system\";\r\n\t\t} else {\r\n\t\t\t$response['status'] = 0;\r\n\t\t\t$response['msg'] = \"Failed to add order\";\r\n\t\t}\r\n\t\techo json_encode($response);\r\n\t}", "public function AddOrderUnit(DotCoreDALSelectionOrderUnit $order)\n\t{\n\t\tarray_push($this->order_units, $order);\n\t\treturn $this;\n\t}", "private function inserOrderproduct($orderId){\n\t\t$this->load->library(\"cart\");\n\t\tforeach($this->cart->contents() as $items){\n\t\t\t$object=array(\n\t\t\t\t'OrdId' => $orderId,\n\t\t\t\t'ItemId' => $items['id'],\n\t\t\t\t'ItemName' => $items['name'],\n\t\t\t\t'ItemEdition' => $items['options']['BookEdition'],\n\t\t\t\t'ItemAuther' => $items['options']['Author'],\n\t\t\t\t'ItemQuantity' => $items['qty'],\n\t\t\t\t'ItemRetailPrice' => $items['options']['RetailPrice'],\n\t\t\t\t'ItemSellingPrice' => $items['price'],\n\t\t\t\t'ItemDiscount' => $items['options']['Discount']\n\t\t\t);\n\t\t\t$this->db->insert('tbl_order_lineitems', $object);\n\t\t}\n\t}", "public function addAdditionalOptionsToQuote($observer)\n {\n $action = Mage::app()->getFrontController()->getAction();\n if ($action->getFullActionName() == 'checkout_cart_add')\n {\n Mage::log(\"checkout_cart_add\", Zend_Log::DEBUG, \"threekit.log\");\n // assuming you are posting your custom form values in an array called extra_options...\n if ($options = $action->getRequest()->getParam('clara_additional_options'))\n {\n $decodePost = json_decode($options, true);\n $product = $observer->getProduct();\n\n // add to the additional options array\n $additionalOptions = array();\n if ($additionalOption = $product->getCustomOption('additional_options'))\n {\n $additionalOptions = (array) unserialize($additionalOption->getValue());\n }\n foreach ($decodePost as $key => $value)\n {\n $additionalOptions[] = array(\n 'label' => $key,\n 'value' => $value,\n );\n }\n // add the additional options array with the option code additional_options\n $observer->getProduct()\n ->addCustomOption('additional_options', serialize($additionalOptions));\n }\n }\n }", "public function addOrder($order){\n $this->collection[] = $order;\n }", "public function setOrderDetail(Order $orderDetail)\n {\n $this->orderDetail = $orderDetail;\n\n return $this;\n }", "private function prepareOrderDetailsConfirmationMailData($orderModel)\n {\n $details = Shopware()->Db()->fetchAll(\n 'SELECT * FROM s_order_details WHERE orderID = ?',\n [$orderModel->getId()]\n );\n\n //we need to fake a shop instance if we want to use the Articles Module\n $shop = Shopware()->Models()->getRepository('Shopware\\Models\\Shop\\Shop')->getActiveById($orderModel->getLanguageSubShop()->getId());\n $shop->registerResources(Shopware()->Bootstrap());\n\n foreach ($details as &$detail) {\n /** @var Shopware\\Models\\Article\\Repository $articleDetailRepository */\n $articleDetailRepository = Shopware()->Models()->getRepository('Shopware\\Models\\Article\\Detail');\n /** @var Shopware\\Models\\Article\\Detail[] $articleDetailModel */\n $articleDetailModel = $articleDetailRepository->findBy(['number' => $detail['articleordernumber']]);\n /** @var Shopware\\Models\\Article\\Detail $articleDetailModel */\n $articleDetailModel = $articleDetailModel[0];\n\n $detail['articlename'] = $detail['name'];\n unset($detail['name']);\n\n $detail['userID'] = $orderModel->getCustomer()->getId();\n\n $detail['ordernumber'] = $detail['articleordernumber'];\n unset($detail['articleordernumber']);\n\n $detail['currencyFactor'] = $orderModel->getCurrencyFactor();\n $detail['mainDetailId'] = $articleDetailModel->getArticle()->getMainDetail()->getId();\n $detail['articleDetailId'] = $articleDetailModel->getId();\n $detail['instock'] = $articleDetailModel->getInStock();\n\n $detail['taxID'] = $articleDetailModel->getArticle()->getTax()->getId();\n if ($orderModel->getNet()) {\n $detail['taxID'] = 0;\n }\n\n $detail['maxpurchase'] = $articleDetailModel->getMaxPurchase();\n $detail['minpurchase'] = $articleDetailModel->getMinPurchase();\n $detail['purchasesteps'] = $articleDetailModel->getPurchaseSteps();\n $detail['stockmin'] = $articleDetailModel->getStockMin();\n $detail['suppliernumber'] = $articleDetailModel->getSupplierNumber();\n $detail['laststock'] = $articleDetailModel->getArticle()->getLastStock();\n $detail['purchaseunit'] = $articleDetailModel->getPurchaseUnit();\n $detail['releasedate'] = $articleDetailModel->getReleaseDate();\n $detail['modus'] = $articleDetailModel->getArticle()->getMode();\n $detail['datum'] = $orderModel->getOrderTime()->format('Y-m-d H:i:s');\n $detail['esdarticle'] = $articleDetailModel->getEsd();\n $detail['netprice'] = $this->calculateNetPrice($detail['price'], $detail['tax_rate']);\n $detail['amount'] = $detail['price'] * $detail['quantity'];\n $detail['amountnet'] = $detail['netprice'] * $detail['quantity'];\n $detail['priceNumeric'] = $detail['price'];\n\n /**\n * order basket attributes fake\n */\n $detail['ob_attr1'] = '';\n $detail['ob_attr2'] = '';\n $detail['ob_attr3'] = '';\n $detail['ob_attr4'] = '';\n $detail['ob_attr5'] = '';\n $detail['ob_attr6'] = '';\n\n $detail['partnerID'] = '';\n $detail['shippinginfo'] = 1;\n\n if ($articleDetailModel->getUnit()) {\n $detail['unitID'] = $articleDetailModel->getUnit()->getId();\n }\n\n $detail['additional_details'] = Shopware()->Modules()->Articles()->sGetProductByOrdernumber($detail['ordernumber']);\n }\n\n return $details;\n }", "public function setCustomFields ($order) {\n \n }", "public static function createOrder ()\n\t{\n $user=Auth::user();// here to get the user info and store it in the $user variable\n $order=$user->orders()->create([\n 'total'=>Cart::total(),\n 'delivered' =>0\n\n ]);\n // the delivered column will get by default the value zero which means that this order\n // is not delivered yet \n\n $cartItems=cart::content();\n //seek for intels about attach function \n\n foreach($cartItems as $cartItem)\n $order->orderItems()->attach($cartItem->id,[\n 'qty'=>$cartItem->qty ,\n 'total' => $cartItem->qty*$cartItem->price \n ]);\n\n\t}", "public function hookAdminOrder($params)\r\n {\r\n\r\n $output = '';\r\n $order = new Order((int) $params['id_order']);\r\n $carrier = new Carrier((int) $order->id_carrier);\r\n\r\n $this->initializeShippings();\r\n\r\n $config = $this->getTipsaConfiguration();\r\n $cashondelivery_modules = explode(',', $config['cashondelivery_modules']);\r\n\r\n if (in_array($order->module, $cashondelivery_modules)) {\r\n $contrarreembolso = $order->total_paid_real;\r\n } else {\r\n $contrarreembolso = 0;\r\n }\r\n\r\n if ($carrier->external_module_name == 'tipsacarrier') {\r\n $codageyp = Db::getInstance()->getValue('SELECT `codageyp` FROM `' . _DB_PREFIX_ . 'tipsa_address` WHERE `id_order` =' . (int) $order->id);\r\n $sql = 'SELECT `codigo_barras` '\r\n . 'FROM `' . _DB_PREFIX_ . 'tipsa_envios`'\r\n . 'WHERE `id_envio_order` = ' . (int) $order->id . ' AND `codigo_barras` IS NOT NULL ';\r\n $showLabelButton = (bool) Db::getInstance()->getValue($sql);\r\n $linkLabel = Db::getInstance()->getValue($sql);\r\n\r\n if (Tools::isSubmit('generateLabeltipsa_envios') || Tools::isSubmit('updateBultostipsa_envios')) {\r\n Db::getInstance()->update('tipsa_envios', array('bultos' => (int) Tools::getValue('packages'), 'observation' => Tools::getValue('observation_carrier')), 'id_envio = ' . Tools::getValue('TIPSA_ID_ENVIO'));\r\n $output .= $this->displayConfirmation($this->l('Status Updated.'));\r\n }\r\n\r\n if (Tools::isSubmit('generateLabeltipsa_envios') && !$showLabelButton) {\r\n $this->printLabel((int) Tools::getValue('TIPSA_ID_ENVIO'));\r\n $showLabelButton = true;\r\n $output .= $this->displayConfirmation($this->l('Label has been created.'));\r\n }\r\n\r\n $delivery = new Address((int) $order->id_address_delivery);\r\n $messageList = Message::getMessagesByOrderId((int) $order->id);\r\n\r\n $config = $this->getTipsaConfiguration();\r\n\r\n $this->context->smarty->assign(\r\n array(\r\n 'TIPSA_CODAGE' => $config['tipsa_codage'],\r\n 'TIPSA_CODCLI' => $config['tipsa_codcli'],\r\n 'base_url' => _PS_BASE_URL_ . __PS_BASE_URI__,\r\n 'module_name' => $this->name,\r\n 'TIPSACARRIER_ID_ENVIO' => (int) Db::getInstance()->getValue('SELECT `id_envio` FROM `' . _DB_PREFIX_ . 'tipsa_envios` WHERE `id_envio_order` = ' . (int) $order->id),\r\n 'TIPSACARRIER_PACKAGES' => (int) Db::getInstance()->getValue('SELECT `bultos` FROM `' . _DB_PREFIX_ . 'tipsa_envios` WHERE `id_envio_order` = ' . (int) $order->id),\r\n 'ps_version' => _PS_VERSION_,\r\n 'showLabelButton' => !$showLabelButton,\r\n 'linkLabel' => $linkLabel,\r\n 'TIPSACARRIER_REFERENCE' => $order->reference,\r\n 'TIPSACARRIER_SHOPNAME' => Configuration::get('PS_SHOP_NAME'),\r\n 'TIPSACARRIER_SHOPPHONE' => Configuration::get('PS_SHOP_PHONE'),\r\n 'TIPSACARRIER_CP' => Configuration::get('PS_SHOP_CODE'),\r\n 'TIPSACARRIER_CITY' => Configuration::get('PS_SHOP_CITY'),\r\n 'TIPSACARRIER_ADDRESS' => Configuration::get('PS_SHOP_ADDR1'),\r\n 'TIPSACARRIER_ORDER_COMMENTS' => (isset($messageList['0']) && $messageList['0']['id_customer'] > 0) ? $messageList['0']['message'] : '',\r\n 'TIPSACARRIER_DEST_CONTACT_INFO' => $delivery->firstname . ' ' . $delivery->lastname,\r\n 'TIPSACARRIER_DEST_PHONE' => $delivery->phone . ' - ' . $delivery->phone_mobile,\r\n 'TIPSACARRIER_DEST_CP' => $delivery->postcode,\r\n 'TIPSACARRIER_DEST_CITY' => $delivery->city,\r\n 'TIPSACARRIER_DEST_ADDRESS' => $delivery->address1,\r\n 'TIPSACARRIER_DEST_COD' => $contrarreembolso,\r\n 'TIPSA_CODAGE_YP' => $codageyp,\r\n 'TIPSACARRIER_ORDER_COMMENTS_CARRIER' => Db::getInstance()->getValue('SELECT `observation` FROM `' . _DB_PREFIX_ . 'tipsa_envios` WHERE `id_envio_order` = ' . (int) $order->id),\r\n )\r\n );\r\n $output .= $this->display(__FILE__, 'views/templates/admin/orders_confirmation.tpl');\r\n }\r\n return $output;\r\n }", "function order($dataOrder){\n\tglobal $conn;\n\n\t$id_user = htmlspecialchars($dataOrder[\"id_user\"]);\n\n\t$nama = htmlspecialchars(base64_decode(base64_decode(base64_decode(base64_decode(base64_decode(base64_decode(base64_decode(base64_decode($dataOrder[\"nama\"])))))))));\n\n\t$no_telp = htmlspecialchars(base64_decode(base64_decode(base64_decode(base64_decode(base64_decode(base64_decode(base64_decode(base64_decode($dataOrder[\"no_telp\"])))))))));\n\n\t$alamat = htmlspecialchars(base64_decode(base64_decode(base64_decode(base64_decode(base64_decode(base64_decode(base64_decode(base64_decode($dataOrder[\"alamat\"])))))))));\n\n\t$jenis = htmlspecialchars(base64_decode(base64_decode(base64_decode(base64_decode(base64_decode(base64_decode(base64_decode(base64_decode($dataOrder[\"jenis\"])))))))));\n\n\t$jumlah_unit = htmlspecialchars(base64_decode(base64_decode(base64_decode(base64_decode(base64_decode(base64_decode(base64_decode(base64_decode($dataOrder[\"jumlah_unit\"])))))))));\n\n\t$tgl_pakai = htmlspecialchars($dataOrder[\"tgl_pakai\"]);\n\n\t$jangka_waktu = htmlspecialchars(base64_decode(base64_decode(base64_decode(base64_decode(base64_decode(base64_decode(base64_decode(base64_decode($dataOrder[\"jangka_waktu\"])))))))));\n\n\t$total = htmlspecialchars(base64_decode(base64_decode(base64_decode(base64_decode(base64_decode(base64_decode(base64_decode(base64_decode($dataOrder[\"total\"])))))))));\n\n\t$status = htmlspecialchars(base64_decode(base64_decode(base64_decode(base64_decode(base64_decode(base64_decode(base64_decode(base64_decode($dataOrder[\"status\"])))))))));\n\n\t$tgl_transaksi = htmlspecialchars(base64_decode(base64_decode(base64_decode(base64_decode(base64_decode(base64_decode(base64_decode(base64_decode($dataOrder[\"tgl_transaksi\"])))))))));\n\n\t$bln_transaksi = htmlspecialchars(base64_decode(base64_decode(base64_decode(base64_decode(base64_decode(base64_decode(base64_decode(base64_decode($dataOrder[\"bln_transaksi\"])))))))));\n\n\t$thn_transaksi = htmlspecialchars(base64_decode(base64_decode(base64_decode(base64_decode(base64_decode(base64_decode(base64_decode(base64_decode($dataOrder[\"thn_transaksi\"])))))))));\n\n\n\t// check empty tgl_transaksi\n\tif( empty($tgl_transaksi) ){\n\t\techo \"\n\t\t<script>\n\t\t\talert('Server Error!');\n\t\t</script>\";\n\t\treturn false;\n\t}\n\n\t// check empty bln_transaksi\n\tif( empty($bln_transaksi) ){\n\t\techo \"\n\t\t<script>\n\t\t\talert('Server Error!');\n\t\t</script>\";\n\t\treturn false;\n\t}\n\n\t// check empty thn_transaksi\n\tif( empty($thn_transaksi) ){\n\t\techo \"\n\t\t<script>\n\t\t\talert('Server Error!');\n\t\t</script>\";\n\t\treturn false;\n\t}\n\n\t// check encode tgl_transaksi\n\tif( !base64_encode(base64_encode(base64_encode(base64_encode(base64_encode(base64_encode(base64_encode(base64_encode($tgl_transaksi)))))))) ){\n\t\techo \"\n\t\t<script>\n\t\t\talert('Server Error!');\n\t\t</script>\";\n\t\treturn false;\n\t}\n\n\t// check encode bln_transaksi\n\tif( !base64_encode(base64_encode(base64_encode(base64_encode(base64_encode(base64_encode(base64_encode(base64_encode($bln_transaksi)))))))) ){\n\t\techo \"\n\t\t<script>\n\t\t\talert('Server Error!');\n\t\t</script>\";\n\t\treturn false;\n\t}\n\n\t// check encode thn_transaksi\n\tif( !base64_encode(base64_encode(base64_encode(base64_encode(base64_encode(base64_encode(base64_encode(base64_encode($thn_transaksi)))))))) ){\n\t\techo \"\n\t\t<script>\n\t\t\talert('Server Error!');\n\t\t</script>\";\n\t\treturn false;\n\t}\n\n\n\n\n\n\t// check encode nama\n\tif( !base64_encode(base64_encode(base64_encode(base64_encode(base64_encode(base64_encode(base64_encode(base64_encode($nama)))))))) ){\n\t\techo \"\n\t\t<script>\n\t\t\talert('Nama tidak sesuai!');\n\t\t</script>\";\n\t\treturn false;\n\t}\n\t// check empty nama\n\tif( empty($nama) ){\n\t\techo \"\n\t\t<script>\n\t\t\talert('Nama tidak sesuai!');\n\t\t</script>\";\n\t\treturn false;\n\t}\n\n\t// check encode no_telp\n\tif( !base64_encode(base64_encode(base64_encode(base64_encode(base64_encode(base64_encode(base64_encode(base64_encode($no_telp)))))))) ){\n\t\techo \"\n\t\t<script>\n\t\t\talert('Nomor telepon tidak sesuai!');\n\t\t</script>\";\n\t\treturn false;\n\t}\n\t// check empty no_telp\n\tif( empty($no_telp) ){\n\t\techo \"\n\t\t<script>\n\t\t\talert('Nomor telepon tidak sesuai!');\n\t\t</script>\";\n\t\treturn false;\n\t}\n\n\t// check encode alamat\n\tif( !base64_encode(base64_encode(base64_encode(base64_encode(base64_encode(base64_encode(base64_encode(base64_encode($alamat)))))))) ){\n\t\techo \"\n\t\t<script>\n\t\t\talert('Alamat tidak sesuai!');\n\t\t</script>\";\n\t\treturn false;\n\t}\n\t// check empty alamat\n\tif( empty($alamat) ){\n\t\techo \"\n\t\t<script>\n\t\t\talert('Alamat tidak sesuai!');\n\t\t</script>\";\n\t\treturn false;\n\t}\n\n\t\t// check encode jenis\n\tif( !base64_encode(base64_encode(base64_encode(base64_encode(base64_encode(base64_encode(base64_encode(base64_encode($jenis)))))))) ){\n\t\techo \"\n\t\t<script>\n\t\t\talert('Server Error!');\n\t\t</script>\";\n\t\treturn false;\n\t}\n\t// check empty jenis\n\tif( empty($jenis) ){\n\t\techo \"\n\t\t<script>\n\t\t\talert('Server Error!');\n\t\t</script>\";\n\t\treturn false;\n\t}\n\n\t// check encode jumlah_unit\n\tif( !base64_encode(base64_encode(base64_encode(base64_encode(base64_encode(base64_encode(base64_encode(base64_encode($jumlah_unit)))))))) ){\n\t\techo \"\n\t\t<script>\n\t\t\talert('Jumlah tidak sesuai!');\n\t\t</script>\";\n\t\treturn false;\n\t}\n\t// check empty jumlah_unit\n\tif( empty($jumlah_unit) ){\n\t\techo \"\n\t\t<script>\n\t\t\talert('Jumlah tidak sesuai!');\n\t\t</script>\";\n\t\treturn false;\n\t}\n\n\t// check encode jangka_waktu\n\tif( !base64_encode(base64_encode(base64_encode(base64_encode(base64_encode(base64_encode(base64_encode(base64_encode($jangka_waktu)))))))) ){\n\t\techo \"\n\t\t<script>\n\t\t\talert('Jangka waktu tidak sesuai!');\n\t\t</script>\";\n\t\treturn false;\n\t}\n\t// check empty jangka_waktu\n\tif( empty($jangka_waktu) ){\n\t\techo \"\n\t\t<script>\n\t\t\talert('Jangka waktu tidak sesuai!');\n\t\t</script>\";\n\t\treturn false;\n\t}\n\n\t// check encode total\n\tif( !base64_encode(base64_encode(base64_encode(base64_encode(base64_encode(base64_encode(base64_encode(base64_encode($total)))))))) ){\n\t\techo \"\n\t\t<script>\n\t\t\talert('Total tidak sesuai!');\n\t\t</script>\";\n\t\treturn false;\n\t}\n\t// check empty total\n\tif( empty($total) ){\n\t\techo \"\n\t\t<script>\n\t\t\talert('Total tidak sesuai!');\n\t\t</script>\";\n\t\treturn false;\n\t}\n\t\n\n\t// query_order\n\t$query_order = \"INSERT INTO tb_order VALUES(null, '$id_user', '$nama', '$no_telp', '$alamat', '$jenis', '$jumlah_unit', '$tgl_pakai', '$jangka_waktu', '$total', '$status', '$tgl_transaksi', '$bln_transaksi', '$thn_transaksi') \";\n\tmysqli_query($conn, $query_order);\n\n\t// query_laporan\n\t$query_laporan = \"INSERT INTO tb_laporan VALUES(null, '$id_user', '$nama', '$no_telp', '$alamat', '$jenis', '$jumlah_unit', '$tgl_pakai', '$jangka_waktu', '$total', '$status', '$tgl_transaksi', '$bln_transaksi', '$thn_transaksi') \";\n\tmysqli_query($conn, $query_laporan);\n\treturn mysqli_affected_rows($conn);\n}", "public function addOrders(ArrayObject $orders)\n {\n $this->orders = array_merge($this->orders, $orders);\n }", "public function createProfileOrder($tid){}", "public static function Order($order){\n\n $chatID = \"-1001270503780\"; //local\n // $chatID = \"-1001347027599\"; //server\n\n $str = ''; \n $i = 1; \n foreach($order->details as $detail){\n$str.= $i.'. '.$detail->menu->name.' x '.$detail->pending_notification_qty.'\n'; \n $i++; \n }\n\n $type = !is_null($order->last_notify_at) ? 'ហៅថែម':'ការកម្មង់ថ្មី'; \n \n $botRes = TelegramBot::sendMessage([\n 'chat_id' => $chatID, \n 'text' => '<b> '.$type.' : វិក័យបត្រលេខ #'.$order->receipt_number. '</b>\n'.$str, \n 'parse_mode' => 'HTML'\n ]);\n\n return $botRes; \n \n }", "function setOrder($order);", "abstract public function setOrder(OrderModel $order);", "private function _addAmountElement($order)\n {\n $amountElement = $order->addChild('amount');\n $amountElement['currencyCode'] = $this->currencyCode;\n $amountElement['exponent'] = self::EXPONENT;\n $amountElement['value'] = $this->_amountAsInt($this->amount);\n }" ]
[ "0.62894136", "0.6143413", "0.5635493", "0.5587298", "0.55520207", "0.54569674", "0.54402065", "0.53899026", "0.5356942", "0.5346073", "0.53256273", "0.5244689", "0.52397025", "0.5236887", "0.52153784", "0.5210398", "0.51834714", "0.51245916", "0.51224476", "0.5107832", "0.5104441", "0.5082633", "0.50653505", "0.50564325", "0.5055343", "0.50520986", "0.5049759", "0.5042374", "0.50400925", "0.50400925", "0.50400925", "0.50400925", "0.50400925", "0.50400925", "0.50400925", "0.50400925", "0.50313485", "0.50286245", "0.5028084", "0.50264806", "0.50130796", "0.50068027", "0.49944404", "0.4986713", "0.49866697", "0.49775654", "0.49758148", "0.4967197", "0.49651363", "0.49645525", "0.49578157", "0.49571425", "0.49480164", "0.4940396", "0.49333337", "0.49319145", "0.4924487", "0.4918012", "0.49154618", "0.49147725", "0.49147725", "0.49133378", "0.4898633", "0.48918658", "0.48912126", "0.48882475", "0.48848793", "0.4883833", "0.48805586", "0.48730224", "0.48724642", "0.48607036", "0.4851405", "0.48511446", "0.48511446", "0.48511446", "0.48511446", "0.48511446", "0.48511446", "0.48511446", "0.48511446", "0.48511446", "0.48511446", "0.48495245", "0.4847286", "0.48428172", "0.48305842", "0.48304245", "0.4825858", "0.48225892", "0.48154798", "0.48153007", "0.4814063", "0.4800272", "0.47971267", "0.47955316", "0.4792183", "0.47901207", "0.4788143", "0.47749692" ]
0.76789945
0
Add HVEOrderParams to OrderDetails.
public function addHVEOrderParams( HVEContext $hveContext ): OrderDetailsBuilder { $xmlHVEOrderParams = $this->dom->createElement('HVEOrderParams'); $this->instance->appendChild($xmlHVEOrderParams); $xmlPartnerID = $this->dom->createElement('PartnerID'); $xmlPartnerID->nodeValue = $hveContext->getPartnerId(); $xmlHVEOrderParams->appendChild($xmlPartnerID); // Add Service to HVEOrderParams. $xmlService = $this->dom->createElement('Service'); $xmlHVEOrderParams->appendChild($xmlService); // Add ServiceName to Service. $xmlServiceName = $this->dom->createElement('ServiceName'); $xmlServiceName->nodeValue = $hveContext->getServiceName(); $xmlService->appendChild($xmlServiceName); // Add optional Scope to Service. if (null !== $hveContext->getScope()) { $xmlScope = $this->dom->createElement('Scope'); $xmlScope->nodeValue = $hveContext->getScope(); $xmlService->appendChild($xmlScope); } // Add optional ServiceOption to Service. if (null !== $hveContext->getServiceOption()) { $xmlServiceOption = $this->dom->createElement('ServiceOption'); $xmlServiceOption->nodeValue = $hveContext->getServiceOption(); $xmlService->appendChild($xmlServiceOption); } // Add MsgName to Service. $xmlMsgName = $this->dom->createElement('MsgName'); $xmlMsgName->nodeValue = $hveContext->getMsgName(); $xmlService->appendChild($xmlMsgName); // Add OrderID to HVEOrderParams. $xmlOrderID = $this->dom->createElement('OrderID'); $xmlOrderID->nodeValue = $hveContext->getOrderId(); $xmlHVEOrderParams->appendChild($xmlOrderID); return $this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function addHVTOrderParams(\n HVTContext $hvtContext\n ): OrderDetailsBuilder {\n $xmlHVTOrderParams = $this->dom->createElement('HVTOrderParams');\n $this->instance->appendChild($xmlHVTOrderParams);\n\n $xmlPartnerID = $this->dom->createElement('PartnerID');\n $xmlPartnerID->nodeValue = $hvtContext->getPartnerId();\n $xmlHVTOrderParams->appendChild($xmlPartnerID);\n\n // Add Service to HVDOrderParams.\n $xmlService = $this->dom->createElement('Service');\n $xmlHVTOrderParams->appendChild($xmlService);\n\n // Add ServiceName to Service.\n $xmlServiceName = $this->dom->createElement('ServiceName');\n $xmlServiceName->nodeValue = $hvtContext->getServiceName();\n $xmlService->appendChild($xmlServiceName);\n\n // Add optional Scope to Service.\n if (null !== $hvtContext->getScope()) {\n $xmlScope = $this->dom->createElement('Scope');\n $xmlScope->nodeValue = $hvtContext->getScope();\n $xmlService->appendChild($xmlScope);\n }\n\n // Add optional ServiceOption to Service.\n if (null !== $hvtContext->getServiceOption()) {\n $xmlServiceOption = $this->dom->createElement('ServiceOption');\n $xmlServiceOption->nodeValue = $hvtContext->getServiceOption();\n $xmlService->appendChild($xmlServiceOption);\n }\n\n // Add MsgName to Service.\n $xmlMsgName = $this->dom->createElement('MsgName');\n $xmlMsgName->nodeValue = $hvtContext->getMsgName();\n $xmlService->appendChild($xmlMsgName);\n\n // Add OrderID to HVTOrderParams.\n $xmlOrderID = $this->dom->createElement('OrderID');\n $xmlOrderID->nodeValue = $hvtContext->getOrderId();\n $xmlHVTOrderParams->appendChild($xmlOrderID);\n\n // Add OrderFlags to HVTOrderParams.\n $xmlOrderFlags = $this->dom->createElement('OrderFlags');\n $xmlOrderFlags->setAttribute(\n 'completeOrderData',\n $hvtContext->getCompleteOrderData() ? 'true' : 'false'\n );\n $xmlOrderFlags->setAttribute(\n 'fetchLimit',\n (string)$hvtContext->getFetchLimit()\n );\n $xmlOrderFlags->setAttribute(\n 'fetchOffset',\n (string)$hvtContext->getFetchOffset()\n );\n $xmlHVTOrderParams->appendChild($xmlOrderFlags);\n\n return $this;\n }", "public function addHVDOrderParams(\n HVDContext $hvdContext\n ): OrderDetailsBuilder {\n $xmlHVDOrderParams = $this->dom->createElement('HVDOrderParams');\n $this->instance->appendChild($xmlHVDOrderParams);\n\n $xmlPartnerID = $this->dom->createElement('PartnerID');\n $xmlPartnerID->nodeValue = $hvdContext->getPartnerId();\n $xmlHVDOrderParams->appendChild($xmlPartnerID);\n\n // Add Service to HVDOrderParams.\n $xmlService = $this->dom->createElement('Service');\n $xmlHVDOrderParams->appendChild($xmlService);\n\n // Add ServiceName to Service.\n $xmlServiceName = $this->dom->createElement('ServiceName');\n $xmlServiceName->nodeValue = $hvdContext->getServiceName();\n $xmlService->appendChild($xmlServiceName);\n\n // Add optional Scope to Service.\n if (null !== $hvdContext->getScope()) {\n $xmlScope = $this->dom->createElement('Scope');\n $xmlScope->nodeValue = $hvdContext->getScope();\n $xmlService->appendChild($xmlScope);\n }\n\n // Add optional ServiceOption to Service.\n if (null !== $hvdContext->getServiceOption()) {\n $xmlServiceOption = $this->dom->createElement('ServiceOption');\n $xmlServiceOption->nodeValue = $hvdContext->getServiceOption();\n $xmlService->appendChild($xmlServiceOption);\n }\n\n // Add MsgName to Service.\n $xmlMsgName = $this->dom->createElement('MsgName');\n $xmlMsgName->nodeValue = $hvdContext->getMsgName();\n $xmlService->appendChild($xmlMsgName);\n\n // Add OrderID to HVDOrderParams.\n $xmlOrderID = $this->dom->createElement('OrderID');\n $xmlOrderID->nodeValue = $hvdContext->getOrderId();\n $xmlHVDOrderParams->appendChild($xmlOrderID);\n\n return $this;\n }", "public function addBTUOrderParams(\n BTUContext $btuContext\n ): OrderDetailsBuilder {\n $xmlBTUOrderParams = $this->dom->createElement('BTUOrderParams');\n $xmlBTUOrderParams->setAttribute('fileName', $btuContext->getFileName());\n $this->instance->appendChild($xmlBTUOrderParams);\n\n // Add Service to BTUOrderParams.\n $xmlService = $this->dom->createElement('Service');\n $xmlBTUOrderParams->appendChild($xmlService);\n\n // Add ServiceName to Service.\n $xmlServiceName = $this->dom->createElement('ServiceName');\n $xmlServiceName->nodeValue = $btuContext->getServiceName();\n $xmlService->appendChild($xmlServiceName);\n\n // Add optional Scope to Service.\n if (null !== $btuContext->getScope()) {\n $xmlScope = $this->dom->createElement('Scope');\n $xmlScope->nodeValue = $btuContext->getScope();\n $xmlService->appendChild($xmlScope);\n }\n\n // Add optional ServiceOption to Service.\n if (null !== $btuContext->getServiceOption()) {\n $xmlServiceOption = $this->dom->createElement('ServiceOption');\n $xmlServiceOption->nodeValue = $btuContext->getServiceOption();\n $xmlService->appendChild($xmlServiceOption);\n }\n\n // Add optional ContainerFlag to Service.\n if (null !== $btuContext->getContainerFlag()) {\n $xmlContainerFlag = $this->dom->createElement('ContainerFlag');\n $xmlContainerFlag->nodeValue = $btuContext->getContainerFlag();\n $xmlService->appendChild($xmlContainerFlag);\n }\n\n // Add MsgName to Service.\n $xmlMsgName = $this->dom->createElement('MsgName');\n $xmlMsgName->nodeValue = $btuContext->getMsgName();\n $xmlService->appendChild($xmlMsgName);\n\n // Add optional MsgName version attribute\n if (null !== $btuContext->getMsgNameVersion()) {\n $xmlMsgName->setAttribute(\n 'version',\n $btuContext->getMsgNameVersion()\n );\n }\n\n // Add optional MsgName variant attribute\n if (null !== $btuContext->getMsgNameVariant()) {\n $xmlMsgName->setAttribute(\n 'variant',\n $btuContext->getMsgNameVariant()\n );\n }\n\n // Add optional MsgName format attribute\n if (null !== $btuContext->getMsgNameFormat()) {\n $xmlMsgName->setAttribute(\n 'format',\n $btuContext->getMsgNameFormat()\n );\n }\n\n return $this;\n }", "public function addOrder(Order $order);", "function campaignEcommAddOrder($order) {\n $params = array();\n $params[\"order\"] = $order;\n return $this->callServer(\"campaignEcommAddOrder\", $params);\n }", "public function addOrder(IncidentOrder $order)\n {\n $this->orders[] = $order;\n }", "protected function _addPaymentDetailsElement($order)\n {\n $paymentDetailsElement = $order->addChild('paymentDetails');\n if (isset($this->paymentDetails['tokenCode'])) {\n $this->_addPaymentDetailsForTokenOrder($paymentDetailsElement);\n } else {\n $this->_addPaymentDetailsForCreditCardOrder($paymentDetailsElement);\n }\n $session = $paymentDetailsElement->addChild('session');\n $session['id'] = $this->paymentDetails['sessionId'];\n $session['shopperIPAddress'] = $this->paymentDetails['shopperIpAddress'];\n\n if ($this->paResponse) {\n $info3DSecure = $paymentDetailsElement->addChild('info3DSecure');\n $info3DSecure->addChild('paResponse', $this->paResponse);\n }\n }", "public function insertOrderDetails($value,$line_item, $mainOrderId)\n {\n //main order\n $order_list_arr['name'] = $value->name;\n $order_list_arr['shpoify_order_id'] = $value->id;\n $order_list_arr['line_item_id'] = $line_item->id;\n $order_list_arr['order_number'] = $value->order_number;\n $order_list_arr['customer_name'] = $value->billing_address->name;\n $order_list_arr['app_id'] = $value->app_id;\n $order_list_arr['checkout_id'] = $value->checkout_id;\n $order_list_arr['token'] = $value->token;\n $order_list_arr['gateway'] = $value->gateway;\n $order_list_arr['total_price'] = $value->total_price;\n $order_list_arr['subtotal_price'] = $value->subtotal_price;\n $order_list_arr['currency'] = $value->currency;\n $order_list_arr['cart_token'] = $value->cart_token;\n $order_list_arr['checkout_token'] = $value->checkout_token;\n $order_list_arr['order_status_url'] = $value->order_status_url;\n\n return OrderDetails::insertGetId($order_list_arr);\n\n }", "public function addBTDOrderParams(\n BTFContext $btfContext,\n ?DateTimeInterface $startDateTime = null,\n ?DateTimeInterface $endDateTime = null\n ): OrderDetailsBuilder {\n $xmlBTDOrderParams = $this->dom->createElement('BTDOrderParams');\n $this->instance->appendChild($xmlBTDOrderParams);\n\n // Add Service to BTDOrderParams.\n $xmlService = $this->dom->createElement('Service');\n $xmlBTDOrderParams->appendChild($xmlService);\n\n // Add ServiceName to Service.\n $xmlServiceName = $this->dom->createElement('ServiceName');\n $xmlServiceName->nodeValue = $btfContext->getServiceName();\n $xmlService->appendChild($xmlServiceName);\n\n // Add optional Scope to Service.\n if (null !== $btfContext->getScope()) {\n $xmlScope = $this->dom->createElement('Scope');\n $xmlScope->nodeValue = $btfContext->getScope();\n $xmlService->appendChild($xmlScope);\n }\n\n // Add optional ServiceOption to Service.\n if (null !== $btfContext->getServiceOption()) {\n $xmlServiceOption = $this->dom->createElement('ServiceOption');\n $xmlServiceOption->nodeValue = $btfContext->getServiceOption();\n $xmlService->appendChild($xmlServiceOption);\n }\n\n // Add optional ContainerFlag to Service.\n if (null !== $btfContext->getContainerFlag()) {\n $xmlContainerFlag = $this->dom->createElement('ContainerFlag');\n $xmlContainerFlag->nodeValue = $btfContext->getContainerFlag();\n $xmlService->appendChild($xmlContainerFlag);\n }\n\n // Add MsgName to Service.\n $xmlMsgName = $this->dom->createElement('MsgName');\n $xmlMsgName->nodeValue = $btfContext->getMsgName();\n $xmlService->appendChild($xmlMsgName);\n\n // Add optional MsgName version attribute\n if (null !== $btfContext->getMsgNameVersion()) {\n $xmlMsgName->setAttribute(\n 'version',\n $btfContext->getMsgNameVersion()\n );\n }\n\n // Add optional MsgName variant attribute\n if (null !== $btfContext->getMsgNameVariant()) {\n $xmlMsgName->setAttribute(\n 'variant',\n $btfContext->getMsgNameVariant()\n );\n }\n\n // Add optional MsgName format attribute\n if (null !== $btfContext->getMsgNameFormat()) {\n $xmlMsgName->setAttribute(\n 'format',\n $btfContext->getMsgNameFormat()\n );\n }\n\n if (null !== $startDateTime && null !== $endDateTime) {\n // Add DateRange to BTDOrderParams.\n $xmlDateRange = $this->createDateRange(\n $startDateTime,\n $endDateTime\n );\n $xmlBTDOrderParams->appendChild($xmlDateRange);\n }\n\n return $this;\n }", "public function processVoucherAddRequest(Order $order, array $data);", "public function appendOrderTracking(\\service\\message\\common\\KeyValueItem $value)\n {\n return $this->append(self::order_tracking, $value);\n }", "function setOrder(array $orderParams)\n {\n foreach ($orderParams as $row)\n {\n if (is_array($this->{$row['name']}))\n array_push($this->{$row['name']}, $row['value']);\n else\n $this->{$row['name']} = $row['value'];\n }\n }", "private function addQuoteExtensionAttributesToOrder($order)\n {\n $quoteId = $order->getQuoteId();\n\n /** @var \\Magento\\Quote\\Model\\Quote $mageQuote */\n $mageQuote = $this->mageQuoteFactory->create()->load($quoteId);\n if (!$mageQuote->getId() || !$mageQuote->getLinkedQuotationId()) {\n //no mage quote data available or no quotation quote linked\n return $order;\n }\n\n $quotationId = $mageQuote->getLinkedQuotationId();\n\n /** @var Quote $quotation */\n $quotation = $this->quoteFactory->create()->load($quotationId);\n if (!$quotation->getId()) {\n //no quote data available\n return $order;\n }\n\n $extensionAttributes = $order->getExtensionAttributes();\n if ($extensionAttributes === null) {\n $extensionAttributes = $this->orderExtensionFactory->create();\n }\n\n //modify extension attributes, add the quote increment id\n $extensionAttributes->setQuoteationIncrementId($quotation->getIncrementId());\n\n //add a backend url\n $backendUrl = $this->backendUrl->getUrl(\n 'quotation/quote/view',\n ['quote_id' => $quotation->getId()]\n );\n $extensionAttributes->setQuoteationBackendUrl($backendUrl);\n\n //set extension attributes\n $order->setExtensionAttributes($extensionAttributes);\n\n return $order;\n }", "private function prepareOrderDetailsConfirmationMailData($orderModel)\n {\n $details = Shopware()->Db()->fetchAll(\n 'SELECT * FROM s_order_details WHERE orderID = ?',\n [$orderModel->getId()]\n );\n\n //we need to fake a shop instance if we want to use the Articles Module\n $shop = Shopware()->Models()->getRepository('Shopware\\Models\\Shop\\Shop')->getActiveById($orderModel->getLanguageSubShop()->getId());\n $shop->registerResources(Shopware()->Bootstrap());\n\n foreach ($details as &$detail) {\n /** @var Shopware\\Models\\Article\\Repository $articleDetailRepository */\n $articleDetailRepository = Shopware()->Models()->getRepository('Shopware\\Models\\Article\\Detail');\n /** @var Shopware\\Models\\Article\\Detail[] $articleDetailModel */\n $articleDetailModel = $articleDetailRepository->findBy(['number' => $detail['articleordernumber']]);\n /** @var Shopware\\Models\\Article\\Detail $articleDetailModel */\n $articleDetailModel = $articleDetailModel[0];\n\n $detail['articlename'] = $detail['name'];\n unset($detail['name']);\n\n $detail['userID'] = $orderModel->getCustomer()->getId();\n\n $detail['ordernumber'] = $detail['articleordernumber'];\n unset($detail['articleordernumber']);\n\n $detail['currencyFactor'] = $orderModel->getCurrencyFactor();\n $detail['mainDetailId'] = $articleDetailModel->getArticle()->getMainDetail()->getId();\n $detail['articleDetailId'] = $articleDetailModel->getId();\n $detail['instock'] = $articleDetailModel->getInStock();\n\n $detail['taxID'] = $articleDetailModel->getArticle()->getTax()->getId();\n if ($orderModel->getNet()) {\n $detail['taxID'] = 0;\n }\n\n $detail['maxpurchase'] = $articleDetailModel->getMaxPurchase();\n $detail['minpurchase'] = $articleDetailModel->getMinPurchase();\n $detail['purchasesteps'] = $articleDetailModel->getPurchaseSteps();\n $detail['stockmin'] = $articleDetailModel->getStockMin();\n $detail['suppliernumber'] = $articleDetailModel->getSupplierNumber();\n $detail['laststock'] = $articleDetailModel->getArticle()->getLastStock();\n $detail['purchaseunit'] = $articleDetailModel->getPurchaseUnit();\n $detail['releasedate'] = $articleDetailModel->getReleaseDate();\n $detail['modus'] = $articleDetailModel->getArticle()->getMode();\n $detail['datum'] = $orderModel->getOrderTime()->format('Y-m-d H:i:s');\n $detail['esdarticle'] = $articleDetailModel->getEsd();\n $detail['netprice'] = $this->calculateNetPrice($detail['price'], $detail['tax_rate']);\n $detail['amount'] = $detail['price'] * $detail['quantity'];\n $detail['amountnet'] = $detail['netprice'] * $detail['quantity'];\n $detail['priceNumeric'] = $detail['price'];\n\n /**\n * order basket attributes fake\n */\n $detail['ob_attr1'] = '';\n $detail['ob_attr2'] = '';\n $detail['ob_attr3'] = '';\n $detail['ob_attr4'] = '';\n $detail['ob_attr5'] = '';\n $detail['ob_attr6'] = '';\n\n $detail['partnerID'] = '';\n $detail['shippinginfo'] = 1;\n\n if ($articleDetailModel->getUnit()) {\n $detail['unitID'] = $articleDetailModel->getUnit()->getId();\n }\n\n $detail['additional_details'] = Shopware()->Modules()->Articles()->sGetProductByOrdernumber($detail['ordernumber']);\n }\n\n return $details;\n }", "public function addOrderStatusUpdate(OrderEvent $event)\n {\n $order = $event->getOrder();\n $statusUpdate = new OrderStatusUpdate();\n $statusUpdate->setStatus($order->getStatus());\n $statusUpdate->setOrigin($event->getOrigin());\n $order->addStatusUpdate($statusUpdate);\n }", "private function create_order_record($id_order) {\n $aux['details'] = $this->m_orders_overview->get_details($id_order);\n\n $record['id_order'] = null; // auto-increment\n $record['id_menu_order'] = $id_order;\n $record['id_table'] = $aux['details'][0]->id_table;\n $record['id_count_ks'] = $aux['details'][0]->id_count_ks;\n $record['date_pay'] = date(\"Y-m-d\");\n\n $record['id_employee'] = $aux['details'][0]->id_employee;\n $record['pay_method'] = 'hotovost';\n $record['sum_price'] = $aux['details'][0]->price;\n $record['is_closed'] = 0;\n\n $this->m_orders_overview->insert_new_order_record($record);\n }", "public function addOrder($order){\n $this->collection[] = $order;\n }", "public function addOrder(Order $order){\r\n// if(!$this->flagCreateCtriteria)\r\n// throw new Exception('Necesita inicializar el criteria');\r\n\r\n if(!is_array($this->array_order))\r\n $this->array_order = array(\"1\"=>$order->getOrderAtribute());\r\n else\r\n array_push($this->array_order, $order->getOrderAtribute());\r\n $this->type_order = $order->getOrderType();\r\n $this->SQL = MySQL_DB::instance()->DBSQLSelect($this->table, null, $this->array_restrictions, $this->array_order, $this->type_order, true);\r\n return $this;\r\n }", "public function setOrderId(?string $orderId): void\n {\n $this->orderId['value'] = $orderId;\n }", "private function memberAddOrder($data){\n $fields = array(\n 'app_id' => $this->appId,\n 'data' => array(\n 'msg_type' => 'order_add',\n 'order_id' => $data['order_id']\n ),\n 'headings' => [\n 'en' => '你有新的訂單',\n 'zh-Hant' => '你有新的訂單'\n ],\n 'contents' => [\n 'en' => '你有新的訂單待處理',\n 'zh-Hant' => '你有新的訂單待處理'\n ],\n 'small_icon' => 'ic_stat_onesignal_default',\n 'ios_badgeType' => 'Increase',\n 'ios_badgeCount' => 1,\n 'filters' => array(\n array(\n 'field' => 'tag',\n 'key' => 'id',\n 'relation' => '=',\n 'value' => $data['store_id']\n )\n )\n );\n return $fields;\n }", "public function addOrder(Order $order) {\n $this->orders->add($order);\n }", "public function addDescriptionParams()\n {\n $oBasket = $this->getBasket();\n $oConfig = $this->getPayPalConfig();\n $oRequest = $this->getPayPalRequest();\n\n // description\n $sShopNameFull = $oConfig->getBrandName();\n $sShopName = substr($sShopNameFull, 0, 70);\n if ($sShopNameFull != $sShopName) {\n $sShopName .= \"...\";\n }\n\n $sSubj = sprintf($this->getLang()->translateString(\"OEPAYPAL_ORDER_SUBJECT\"), $sShopName, $oBasket->getFPrice(), $oBasket->getBasketCurrency()->name);\n $oRequest->setParameter(\"PAYMENTREQUEST_0_DESC\", $sSubj);\n $oRequest->setParameter(\"PAYMENTREQUEST_0_CUSTOM\", $sSubj);\n }", "public static function addPartyOrderRequest($poRequestParamDetails){\n $connection = Yii::app()->db;\n $sqlColumnNames = \"\";\n $sqlValues = \"\";\n $lastInsertedId = false;\n if(array_key_exists('partyorder_no', $poRequestParamDetails)){\n if($poRequestParamDetails['partyorder_no']!=''){\n $sqlColumnNames.=\" partyorder_no,\";\n $sqlValues.=\"'\".$poRequestParamDetails['partyorder_no'].\"',\";\n }\n }\n if(array_key_exists('user_sessionid', $poRequestParamDetails)){\n if($poRequestParamDetails['user_sessionid']!=''){\n $sqlColumnNames.=\" user_sessionid,\";\n $sqlValues.=\"'\".$poRequestParamDetails['user_sessionid'].\"',\";\n }\n }\n if(array_key_exists('user_id', $poRequestParamDetails)){\n if($poRequestParamDetails['user_id']!=''){\n $sqlColumnNames.=\" user_id,\";\n $sqlValues.=\"'\".$poRequestParamDetails['user_id'].\"',\";\n }\n }\n if(array_key_exists('occassion_title', $poRequestParamDetails)){\n if($poRequestParamDetails['occassion_title']!=''){\n $sqlColumnNames.=\" occassion_title,\";\n $sqlValues.=\"'\".$poRequestParamDetails['occassion_title'].\"',\";\n }\n }\n if(array_key_exists('nos_person', $poRequestParamDetails)){\n if($poRequestParamDetails['nos_person']!=''){\n $sqlColumnNames.=\" nos_person,\";\n $sqlValues.=\"'\".$poRequestParamDetails['nos_person'].\"',\";\n }\n }\n if(array_key_exists('party_date', $poRequestParamDetails)){\n if($poRequestParamDetails['party_date']!=''){\n $sqlColumnNames.=\" party_date,\";\n $sqlValues.=\"'\".$poRequestParamDetails['party_date'].\"',\";\n }\n }\n if(array_key_exists('party_venue', $poRequestParamDetails)){\n if($poRequestParamDetails['party_venue']!=''){\n $sqlColumnNames.=\" party_venue,\";\n $sqlValues.=\"'\".$poRequestParamDetails['party_venue'].\"',\";\n }\n }\n if(array_key_exists('party_requirements', $poRequestParamDetails)){\n if($poRequestParamDetails['party_requirements']!=''){\n $sqlColumnNames.=\" party_requirements,\";\n $sqlValues.=\"'\".$poRequestParamDetails['party_requirements'].\"',\";\n }\n }\n if(array_key_exists('file', $poRequestParamDetails)){\n if($poRequestParamDetails['file']!=''){\n $sqlColumnNames.=\" file,\";\n $sqlValues.=\"'\".$poRequestParamDetails['file'].\"',\";\n }\n }\n if(array_key_exists('created_by', $poRequestParamDetails)){\n if($poRequestParamDetails['created_by']!=''){\n $sqlColumnNames.=\" created_by,\";\n $sqlValues.=\"'\".$poRequestParamDetails['created_by'].\"',\";\n }\n }\n if(array_key_exists('status', $poRequestParamDetails)){\n if($poRequestParamDetails['status']!=''){\n $sqlColumnNames.=\" status,\";\n $sqlValues.=\"'\".$poRequestParamDetails['status'].\"',\";\n }\n }\n if($sqlValues!='' && $sqlColumnNames!=''){\n $poRequestParamDetails['created_datedtime'] = date('Y-m-d H:i:s');\n $sqlColumnNames.=\" created_datedtime,\";\n $sqlValues.=\"'\".$poRequestParamDetails['created_datedtime'].\"',\";\n $sqlQuery = \" INSERT INTO DK_PARTYORDERS_REQUEST \" .rtrim(\"(\".$sqlColumnNames, ',').\") \".rtrim(\" VALUES(\".$sqlValues, ',').\")\";\n $command = $connection->createCommand($sqlQuery);\n $result = $command->execute();\n if($result>=1){\n $lastInsertedId = $connection->getLastInsertID();\n }\n }\n return $lastInsertedId;\n }", "function get_esewa_args( $order ) {\n\t\t\tglobal $woocommerce;\n\n\t\t\tif ( 'yes' === $this->debug ) {\n\t\t\t\t$this->log->add( 'esewa', 'Generating payment form for order ' . $order->get_order_number() );\n\t\t\t}\n\n\t\t\t$order_id = $order->id;\n\n\t\t\t$order_total = $order->get_total();\n\t\t\t$order_key = $order->id;\n\n\t\t\t$esewa_args['tAmt'] = $order_total;\n\t\t\t$esewa_args['amt'] = $order_total;\n\t\t\t$esewa_args['txAmt'] = 0;\n\t\t\t$esewa_args['psc'] = 0;\n\t\t\t$esewa_args['pdc'] = 0;\n\t\t\t$esewa_args['scd'] = $this -> merchant ;\n\t\t\t$esewa_args['pid'] = $order_key ;\n\t\t\t$esewa_args['su'] = str_replace( 'https:', 'http:', add_query_arg( 'wc-api', 'WC_Gateway_Esewa', home_url( '/' ) ) );\n\t\t\t$myaccount_page_id = get_option( 'woocommerce_myaccount_page_id' );\n\t\t\tif ( $myaccount_page_id ) {\n\t\t\t\t$myaccount_page_url = get_permalink( $myaccount_page_id );\n\t\t\t}\n\t\t\t$esewa_args['fu'] = esc_url( $myaccount_page_url );\n\n\t\t\t$esewa_args = apply_filters( 'woocommerce_esewa_args', $esewa_args );\n\n\t\t\treturn $esewa_args;\n\t\t}", "private function _createOrderLines($virtuemart_order_id, $cart)\n {\n $_orderItems = $this->getTable('order_items');\n\n foreach ($cart->products as $priceKey => $product) {\n\n if (!empty($product->customProductData)) {\n $_orderItems->product_attribute = vmJsApi::safe_json_encode($product->customProductData);\n } else {\n $_orderItems->product_attribute = '';\n }\n\n\n $_orderItems->virtuemart_order_item_id = null;\n $_orderItems->virtuemart_order_id = $virtuemart_order_id;\n\n $_orderItems->virtuemart_vendor_id = $product->virtuemart_vendor_id;\n $_orderItems->virtuemart_product_id = $product->virtuemart_product_id;\n $_orderItems->order_item_sku = $product->product_sku;\n $_orderItems->order_item_name = $product->product_name;\n $_orderItems->product_quantity = $product->quantity;\n $_orderItems->product_item_price = $product->allPrices[$product->selectedPrice]['basePriceVariant'];\n $_orderItems->product_basePriceWithTax = $product->allPrices[$product->selectedPrice]['basePriceWithTax'];\n\n //$_orderItems->product_tax = $_cart->pricesUnformatted[$priceKey]['subtotal_tax_amount'];\n $_orderItems->product_tax = $product->allPrices[$product->selectedPrice]['taxAmount'];\n $_orderItems->product_final_price = $product->allPrices[$product->selectedPrice]['salesPrice'];\n $_orderItems->product_subtotal_discount = $product->allPrices[$product->selectedPrice]['subtotal_discount'];\n $_orderItems->product_subtotal_with_tax = $product->allPrices[$product->selectedPrice]['subtotal_with_tax'];\n $_orderItems->product_priceWithoutTax = $product->allPrices[$product->selectedPrice]['priceWithoutTax'];\n $_orderItems->product_discountedPriceWithoutTax = $product->allPrices[$product->selectedPrice]['discountedPriceWithoutTax'];\n $_orderItems->order_status = 'P';\n\n if (!$_orderItems->check()) {\n return false;\n }\n //The check may set here a wrong vendorId, we replace it again with the right one.\n $_orderItems->virtuemart_vendor_id = $product->virtuemart_vendor_id;\n\n // Save the record to the database\n if (!$_orderItems->store()) {\n return false;\n }\n\n $product->virtuemart_order_item_id = $_orderItems->virtuemart_order_item_id;\n\n $this->handleStockAfterStatusChangedPerProduct($_orderItems->order_status, 'N', $_orderItems, $_orderItems->product_quantity);\n }\n\n return true;\n }", "public function edit(OrderDetails $orderDetails)\n {\n //\n }", "private function updateOrderData()\n {\n $sign = $this->connector->signRequestKid(\n null,\n $this->connector->accountURL,\n $this->orderURL\n );\n\n $post = $this->connector->post($this->orderURL, $sign);\n if (strpos($post['header'], \"200 OK\") !== false) {\n $this->status = $post['body']['status'];\n $this->expires = $post['body']['expires'];\n $this->identifiers = $post['body']['identifiers'];\n $this->authorizationURLs = $post['body']['authorizations'];\n $this->finalizeURL = $post['body']['finalize'];\n if (array_key_exists('certificate', $post['body'])) {\n $this->certificateURL = $post['body']['certificate'];\n }\n $this->updateAuthorizations();\n } else {\n //@codeCoverageIgnoreStart\n $this->log->error(\"Failed to fetch order for {$this->basename}\");\n //@codeCoverageIgnoreEnd\n }\n }", "private function processOpenOrderDetails(array $orderValue, array $orders, $orderKey)\n {\n /** @var array $orderDetails */\n $orderDetails = $this->db->fetchAll(\n 'SELECT * FROM s_order_details WHERE orderID = ? ORDER BY id ASC',\n [$orderValue['id']]\n );\n\n if (!count($orderDetails)) {\n unset($orders[$orderKey]);\n\n return $orders;\n }\n\n $context = $this->contextService->getShopContext();\n $orderProductOrderNumbers = array_column($orderDetails, 'articleordernumber');\n $listProducts = Shopware()->Container()->get('shopware_storefront.list_product_service')\n ->getList($orderProductOrderNumbers, $context);\n $listProducts = Shopware()->Container()->get('legacy_struct_converter')\n ->convertListProductStructList($listProducts);\n\n foreach ($listProducts as &$listProduct) {\n $listProduct = array_merge($listProduct, $listProduct['prices'][0]);\n }\n\n foreach ($orderDetails as $orderDetailsKey => $orderDetailsValue) {\n $orderDetails[$orderDetailsKey]['amountNumeric'] = round($orderDetailsValue['price'] * $orderDetailsValue['quantity'], 2);\n $orderDetails[$orderDetailsKey]['priceNumeric'] = $orderDetailsValue['price'];\n $orderDetails[$orderDetailsKey]['amount'] = $this->moduleManager->Articles()\n ->sFormatPrice($orderDetails[$orderDetailsKey]['amountNumeric']);\n $orderDetails[$orderDetailsKey]['price'] = $this->moduleManager->Articles()\n ->sFormatPrice($orderDetailsValue['price']);\n $orderDetails[$orderDetailsKey]['active'] = 0;\n\n $tmpProduct = null;\n if (!empty($listProducts[$orderDetailsValue['articleordernumber']])) {\n $tmpProduct = $listProducts[$orderDetailsValue['articleordernumber']];\n }\n\n if (!empty($tmpProduct) && is_array($tmpProduct)) {\n // Set product in activate state\n $orderDetails[$orderDetailsKey]['active'] = 1;\n $orderDetails[$orderDetailsKey]['article'] = $tmpProduct;\n if (!empty($tmpProduct['purchaseunit'])) {\n $orderDetails[$orderDetailsKey]['purchaseunit'] = $tmpProduct['purchaseunit'];\n }\n\n if (!empty($tmpProduct['referenceunit'])) {\n $orderDetails[$orderDetailsKey]['referenceunit'] = $tmpProduct['referenceunit'];\n }\n\n if (!empty($tmpProduct['referenceprice'])) {\n $orderDetails[$orderDetailsKey]['referenceprice'] = $tmpProduct['referenceprice'];\n }\n\n if (!empty($tmpProduct['sUnit']) && is_array($tmpProduct['sUnit'])) {\n $orderDetails[$orderDetailsKey]['sUnit'] = $tmpProduct['sUnit'];\n }\n\n if (!empty($tmpProduct['price'])) {\n $orderDetails[$orderDetailsKey]['currentPrice'] = $tmpProduct['price'];\n }\n\n if (!empty($tmpProduct['pseudoprice'])) {\n $orderDetails[$orderDetailsKey]['currentPseudoprice'] = $tmpProduct['pseudoprice'];\n }\n\n $orderDetails[$orderDetailsKey]['currentHas_pseudoprice'] = $tmpProduct['has_pseudoprice'];\n }\n\n // Check for serial\n if ($orderDetails[$orderDetailsKey]['esdarticle']) {\n $numbers = [];\n $getSerial = $this->db->fetchAll(\n 'SELECT serialnumber\n FROM s_articles_esd_serials, s_order_esd\n WHERE userID = ?\n AND orderID = ?\n AND orderdetailsID = ?\n AND s_order_esd.serialID = s_articles_esd_serials.id',\n [\n $this->session->offsetGet('sUserId'),\n $orderValue['id'],\n $orderDetailsValue['id'],\n ]\n );\n foreach ($getSerial as $serial) {\n $numbers[] = $serial['serialnumber'];\n }\n $orderDetails[$orderDetailsKey]['serial'] = implode(',', $numbers);\n $orderDetails[$orderDetailsKey]['esdLink'] = $this->config->get('sBASEFILE')\n . '?sViewport=account&sAction=download&esdID='\n . $orderDetailsValue['id'];\n }\n }\n $orders[$orderKey]['activeBuyButton'] = 1;\n $orders[$orderKey]['details'] = $orderDetails;\n\n return $orders;\n }", "public function additionOrder()\n {\n global $dbh;\n $sql = $dbh->prepare(\"INSERT INTO `ordero`(`castumerid`, `areaid`, `phoneo`, `areatransid`, `deviceid`, `orderdate`, `timeo`, `timing`, `mdn`, `sn`, `note`, `process`, `idservo`, `idservows`, `idmark`, `poseplt`, `dftime`, `odatews`, `odatefs`, `odatedp`, `timodp`, `timingdp`, `resono`, `deleto`, `employeeid`, `employeeidws`, `employeeiddp`)\n VALUES ('$this->castumerid', '$this->areaid', '$this->phone', '$this->areatransid', '$this->deviceid', '$this->orderdate', '$this->timeo', '$this->timing', '$this->mdn', '$this->sn', '$this->note', '$this->process', '$this->idservo', '$this->idservows', '$this->idmark', '$this->poseplt', '$this->dftime', '$this->odatews', '$this->timodp', '$this->odatedp', '$this->odatedp', '$this->timingdp', '$this->resono', '$this->deleto', '$this->employeeid', '$this->employeeidws', '$this->employeeiddp')\");\n $result = $sql->execute();\n $ido = $dbh->lastInsertId();\n return array ($result,$ido);\n }", "public function addOrder($ord) {\n $this->sql .= \" ORDER BY $ord\";\n }", "private function setParams()\n {\n $this->params['MERCHANTNUMBER'] = $this->merchantNumber;\n $this->params['OPERATION'] = 'CREATE_ORDER';\n $this->params['ORDERNUMBER'] = $this->operation->getOrderNumber();\n $this->params['AMOUNT'] = $this->operation->getAmount();\n $this->params['CURRENCY'] = $this->operation->getCurrency();\n $this->params['DEPOSITFLAG'] = $this->depositFlag;\n if($this->operation->getMerOrderNum())\n $this->params['MERORDERNUM'] = $this->operation->getMerOrderNum();\n $this->params['URL'] = $this->url;\n\n if($this->operation->getDescription())\n $this->params['DESCRIPTION'] = $this->operation->getDescription();\n if($this->operation->getMd())\n $this->params['MD'] = $this->operation->getMd();\n\n }", "public function __construct($order)\n {\n $this->order = $order;\n }", "public function __construct($order)\n {\n $this->order = $order;\n }", "public function __construct($order)\n {\n $this->order = $order;\n }", "public function __construct($order)\n {\n $this->order = $order;\n }", "public function __construct($order)\n {\n $this->order = $order;\n }", "public function __construct($order)\n {\n $this->order = $order;\n }", "public function __construct($order)\n {\n $this->order = $order;\n }", "public function __construct($order)\n {\n $this->order = $order;\n }", "public function setOrder($params)\n\t{\n\t\treturn $this->request('set-order', $params);\n\t}", "public function __construct(Order $order)\n {\n $this->order = $order;\n }", "public function __construct(Order $order)\n {\n $this->order = $order;\n }", "public function __construct(Order $order)\n {\n $this->order = $order;\n }", "public function __construct(Order $order)\n {\n $this->order = $order;\n }", "public function __construct(Order $order)\n {\n $this->order = $order;\n }", "public function __construct(Order $order)\n {\n $this->order = $order;\n }", "public function __construct(Order $order)\n {\n $this->order = $order;\n }", "public function __construct(Order $order)\n {\n $this->order = $order;\n }", "public function __construct(Order $order)\n {\n $this->order = $order;\n }", "public function __construct(Order $order)\n {\n $this->order = $order;\n }", "public function __construct($order)\n {\n $this->order=$order;\n }", "function addOrder($name, $order) {\n\t\t$this->addBlock('order', $name, $order);\n\t\treturn $this;\n\t}", "public function setOrderDetail(Order $orderDetail)\n {\n $this->orderDetail = $orderDetail;\n\n return $this;\n }", "public function appendOrder(\\service\\message\\common\\Order $value)\n {\n return $this->append(self::order, $value);\n }", "public function setOrder($orderAttributes)\n {\n $this->email = $orderAttributes['email'];\n $this->orderId = $orderAttributes['orderId'];\n }", "private function updateOrderDetail($order){\n $endpoint = $this->endpointBase.\"/\".$order['id'];\n $params = array('url_params' => \"\");\n\n return $this->MPAPI->callMallAPI(HTTP_Method::PUT, $endpoint, $order);\n }", "function addDetailsLine($order_id, $orderDetails, $conn)\n {\n // return the id number of the last item inserted.\n\n mysqli_report(MYSQLI_REPORT_ERROR | MYSQLI_REPORT_STRICT);\n\n\n $stmt = $conn->prepare(\"INSERT INTO mfqgkhncw3r34ada.order_details (orders_id, products_id, QUANTITY, CURRENT_PRICE, CURRENT_DESCRIPTION) VALUES (?,?,?,?,?)\");\n\n if (!$stmt) {\n return -1;\n } else {\n $product_id = $orderDetails->getProduct_id();\n $quantity = $orderDetails->getQuantity();\n $price = $orderDetails->getCurrent_price();\n $description = $orderDetails->getCurrent_description();\n\n $stmt->bind_param(\"iiids\", $order_id, $product_id, $quantity, $price, $description);\n\n $stmt->execute();\n\n if ($stmt->affected_rows > 0) {\n // success\n return $conn->insert_id;\n } else {\n // failed\n return false;\n }\n }\n }", "private function _createOrder($_cart, $_usr)\n {\n //\t\tTODO We need tablefields for the new values:\n //\t\tShipment:\n //\t\t$_prices['shipmentValue']\t\tw/out tax\n //\t\t$_prices['shipmentTax']\t\t\tTax\n //\t\t$_prices['salesPriceShipment']\tTotal\n //\n //\t\tPayment:\n //\t\t$_prices['paymentValue']\t\tw/out tax\n //\t\t$_prices['paymentTax']\t\t\tTax\n //\t\t$_prices['paymentDiscount']\t\tDiscount\n //\t\t$_prices['salesPricePayment']\tTotal\n\n $_orderData = new stdClass();\n\n $_orderData->virtuemart_order_id = null;\n $oldOrderNumber = '';\n\n $this->deleteOldPendingOrder($_cart);\n\n\n $_orderData->virtuemart_user_id = $_usr->get('id');\n $_orderData->virtuemart_vendor_id = $_cart->vendorId;\n $_orderData->customer_number = $_cart->customer_number;\n $_prices = $_cart->cartPrices;\n //Note as long we do not have an extra table only storing addresses, the virtuemart_userinfo_id is not needed.\n //The virtuemart_userinfo_id is just the id of a stored address and is only necessary in the user maintance view or for choosing addresses.\n //the saved order should be an snapshot with plain data written in it.\n //\t\t$_orderData->virtuemart_userinfo_id = 'TODO'; // $_cart['BT']['virtuemart_userinfo_id']; // TODO; Add it in the cart... but where is this used? Obsolete?\n $_orderData->order_total = $_prices['billTotal'];\n $_orderData->order_salesPrice = $_prices['salesPrice'];\n $_orderData->order_billTaxAmount = $_prices['billTaxAmount'];\n $_orderData->order_billDiscountAmount = $_prices['billDiscountAmount'];\n $_orderData->order_discountAmount = $_prices['discountAmount'];\n $_orderData->order_subtotal = $_prices['priceWithoutTax'];\n $_orderData->order_tax = $_prices['taxAmount'];\n $_orderData->order_shipment = $_prices['shipmentValue'];\n $_orderData->order_shipment_tax = $_prices['shipmentTax'];\n $_orderData->order_payment = $_prices['paymentValue'];\n $_orderData->order_payment_tax = $_prices['paymentTax'];\n\n if (!empty($_cart->cartData['VatTax'])) {\n $taxes = array();\n foreach ($_cart->cartData['VatTax'] as $k => $VatTax) {\n $taxes[$k]['virtuemart_calc_id'] = $k;\n $taxes[$k]['calc_name'] = $VatTax['calc_name'];\n $taxes[$k]['calc_value'] = $VatTax['calc_value'];\n $taxes[$k]['result'] = $VatTax['result'];\n }\n $_orderData->order_billTax = vmJsApi::safe_json_encode($taxes);\n }\n\n if (!empty($_cart->couponCode)) {\n $_orderData->coupon_code = $_cart->couponCode;\n $_orderData->coupon_discount = $_prices['salesPriceCoupon'];\n }\n $_orderData->order_discount = $_prices['discountAmount']; // discount order_items\n\n\n $_orderData->order_status = 'P';\n $_orderData->order_currency = $this->getVendorCurrencyId($_orderData->virtuemart_vendor_id);\n\n if (isset($_cart->pricesCurrency)) {\n $_orderData->user_currency_id = $_cart->pricesCurrency;\n $currency = CurrencyDisplay::getInstance($_orderData->user_currency_id);\n if ($_orderData->user_currency_id != $_orderData->order_currency) {\n $_orderData->user_currency_rate = $currency->convertCurrencyTo($_orderData->user_currency_id, 1.0, false);\n } else {\n $_orderData->user_currency_rate = 1.0;\n }\n }\n\n $shoppergroups = $_cart->user->get('shopper_groups');\n if (!empty($shoppergroups)) {\n $_orderData->user_shoppergroups = implode(',', $shoppergroups);\n }\n\n if (isset($_cart->paymentCurrency)) {\n $_orderData->payment_currency_id = $_cart->paymentCurrency; //$this->getCurrencyIsoCode($_cart->pricesCurrency);\n $currency = CurrencyDisplay::getInstance($_orderData->payment_currency_id);\n if ($_orderData->payment_currency_id != $_orderData->order_currency) {\n $_orderData->payment_currency_rate = $currency->convertCurrencyTo($_orderData->payment_currency_id, 1.0, false);\n } else {\n $_orderData->payment_currency_rate = 1.0;\n }\n }\n\n $_orderData->virtuemart_paymentmethod_id = $_cart->virtuemart_paymentmethod_id;\n $_orderData->virtuemart_shipmentmethod_id = $_cart->virtuemart_shipmentmethod_id;\n\n //Some payment plugins need a new order_number for any try\n $_orderData->order_number = '';\n $_orderData->order_pass = '';\n\n $_orderData->order_language = $_cart->order_language;\n $_orderData->ip_address = ShopFunctions::getClientIP();;\n\n $maskIP = VmConfig::get('maskIP', 'last');\n if ($maskIP == 'last') {\n $rpos = strrpos($_orderData->ip_address, '.');\n $_orderData->ip_address = substr($_orderData->ip_address, 0, ($rpos + 1)) . 'xx';\n }\n\n //lets merge here the userdata from the cart to the order so that it can be used\n if (!empty($_cart->BT)) {\n $continue = array('created_on' => 1, 'created_by' => 1, 'modified_on' => 1, 'modified_by' => 1, 'locked_on' => 1, 'locked_by' => 1);\n foreach ($_cart->BT as $k => $v) {\n if (isset($continue[$k])) continue;\n $_orderData->{$k} = $v;\n }\n }\n $_orderData->STsameAsBT = $_cart->STsameAsBT;\n unset($_orderData->created_on);\n\n JPluginHelper::importPlugin('vmshopper');\n $dispatcher = JDispatcher::getInstance();\n $plg_datas = $dispatcher->trigger('plgVmOnUserOrder', array(&$_orderData));\n\n\n $i = 0;\n while ($oldOrderNumber == $_orderData->order_number) {\n if ($i > 5) {\n $msg = 'Could not generate new unique ordernumber';\n vmError($msg . ', an ordernumber should contain at least one random char', $msg);\n break;\n }\n $_orderData->order_number = $this->genStdOrderNumber($_orderData->virtuemart_vendor_id);\n if (!empty($oldOrderNumber)) vmdebug('Generated new ordernumber ', $oldOrderNumber, $_orderData->order_number);\n $i++;\n }\n if (empty($_orderData->order_pass)) {\n $_orderData->order_pass = $this->genStdOrderPass();\n }\n if (empty($_orderData->order_create_invoice_pass)) {\n $_orderData->order_create_invoice_pass = $this->genStdCreateInvoicePass();\n }\n\n $orderTable = $this->getTable('orders');\n $orderTable->bindChecknStore($_orderData);\n\n if (!empty($_cart->couponCode)) {\n //set the virtuemart_order_id in the Request for 3rd party coupon components (by Seyi and Max)\n vRequest::setVar('virtuemart_order_id', $orderTable->virtuemart_order_id);\n // If a gift coupon was used, remove it now\n CouponHelper::setInUseCoupon($_cart->couponCode, true);\n }\n // the order number is saved into the session to make sure that the correct cart is emptied with the payment notification\n $_cart->order_number = $orderTable->order_number;\n $_cart->order_pass = $_orderData->order_pass;\n $_cart->virtuemart_order_id = $orderTable->virtuemart_order_id;\n $_cart->setCartIntoSession();\n\n return $orderTable->virtuemart_order_id;\n }", "public function setOrder($order);", "public function initOrderDetail(&$orderItem, $item) {\n $payMethod = array('pm_id' => '',\n 'title' => $item['payment_method'],\n 'description' => '');\n\n $orderItem = array('order_id' => $item['order_id'],\n 'display_id' => $item['order_id'], //show id\n 'uname' => $item['shipping_firstname'] . ' ' . $item['shipping_lastname'],\n 'currency' => $item['currency_code'],\n 'shipping_address' => array(),\n 'billing_address' => array(),\n 'payment_method' => $payMethod,\n 'shipping_insurance' => '',\n 'coupon' => $item['coupon_id'],\n 'order_status' => array(),\n 'last_status_id' => $item['order_status_id'], //get current status from history\n 'order_tax' => $item['fax'],\n 'order_date_start' => $item['date_added'],\n 'order_date_finish' => '',\n 'order_date_purchased' => $item['date_modified']);\n }", "public function orderDetails()\n {\n return $this->hasMany( OrderDetails::class, 'product_id', 'id');\n }", "public function setOrderData($orderData): Order\n {\n $this->id = $orderData->getIncrementId();\n $this->email = $orderData->getCustomerEmail();\n $this->quoteId = $orderData->getQuoteId();\n $this->storeName = $orderData->getStore()->getName();\n $this->purchaseDate = $orderData->getCreatedAt();\n $this->deliveryMethod = $orderData->getShippingDescription();\n $this->deliveryTotal = (float) number_format(\n (float) $orderData->getShippingAmount(),\n 2,\n '.',\n ''\n );\n $this->currency = $orderData->getOrderCurrencyCode();\n\n /** @var OrderPaymentInterface|InfoInterface $payment */\n $payment = $orderData->getPayment();\n if ($payment) {\n if ($payment->getMethod()) {\n $methodInstance = $payment->getMethodInstance();\n if ($methodInstance) {\n $this->payment = $methodInstance->getTitle();\n }\n }\n }\n\n $this->couponCode = (string) $orderData->getCouponCode();\n\n /*\n * custom order attributes\n */\n $customAttributes = $this->getConfigSelectedCustomOrderAttributes(\n $orderData->getStore()->getWebsite()->getId()\n );\n\n if ($customAttributes) {\n $fields = $this->helper->getOrderTableDescription();\n $this->custom = [];\n foreach ($customAttributes as $customAttribute) {\n if (isset($fields[$customAttribute])) {\n $field = $fields[$customAttribute];\n $value = $this->_getCustomAttributeValue(\n $field,\n $orderData\n );\n if ($value) {\n $this->_assignCustom($field, $value);\n }\n }\n }\n }\n\n /*\n * Billing address.\n */\n $this->processBillingAddress($orderData);\n\n /*\n * Shipping address.\n */\n $this->processShippingAddress($orderData);\n\n $websiteId = $orderData->getStore()->getWebsiteId();\n\n $includeCustomOptions = $this->helper->getWebsiteConfig(\n Config::XML_PATH_CONNECTOR_SYNC_ORDER_PRODUCT_CUSTOM_OPTIONS,\n $websiteId\n );\n\n $orderItemProcessor = $this->orderItemProcessorFactory\n ->create(['data' => [\n 'websiteId' => $websiteId,\n 'includeCustomOptions' => $includeCustomOptions\n ]]);\n\n /*\n * Order items.\n */\n try {\n foreach ($orderData->getAllItems() as $productItem) {\n $productData = $orderItemProcessor->process($productItem);\n $this->mergeProductData($productData);\n }\n } catch (\\InvalidArgumentException $e) {\n $this->logger->debug(\n 'Error processing items for order ID: ' . $orderData->getId(),\n [(string) $e]\n );\n $this->products = [];\n }\n\n $this->orderSubtotal = (float) number_format(\n (float) $orderData->getData('subtotal'),\n 2,\n '.',\n ''\n );\n $this->discountAmount = (float) number_format(\n (float) $orderData->getData('discount_amount'),\n 2,\n '.',\n ''\n );\n $orderTotal = abs(\n $orderData->getData('grand_total') - $orderData->getTotalRefunded()\n );\n $this->orderTotal = (float) number_format($orderTotal, 2, '.', '');\n $this->orderStatus = $orderData->getStatus();\n\n if (!$this->schemaValidator->isValid($this->toArray())) {\n throw new SchemaValidationException(\n $this->schemaValidator,\n __(\"Validation error\")\n );\n }\n\n return $this;\n }", "public function setExtraParams($params = array()) {\n $params['resulturl'] = $params['ipn_url'];\n $params['returnurl'] = $params['return_url'];\n $params['reference'] = $params['vendor_order_id'];\n $params['authemail'] = '';\n $params['id'] = $this->_gatewayInfo->config['integration_id'];\n $params['integration_key'] = $this->_gatewayInfo->config['integration_key'];\n $params['status'] = 'Message';\n return $params;\n }", "public function add(OrderAddress $orderAddress): void\n {\n $this->getEntityManager()->persist($orderAddress);\n }", "private function alterOrderInformation()\n {\n if (version_compare(Shopware()->Config()->get( 'Version' ), '5.2.0', '<')) {\n $sql = \"UPDATE `s_core_snippets`\n SET `value` = CASE\n WHEN `value` = 'Free text 4' THEN 'Transaction ID'\n WHEN `value` = 'Freitextfeld 4' THEN 'Transaktions-ID'\n ELSE `value`\n END\n WHERE `namespace` = 'backend/order/main'\n AND `value` IN ('Freitextfeld 4', 'Free text 4')\";\n } elseif (version_compare(Shopware()->Config()->get( 'Version' ), '5.2.0', '>=')) {\n $sql = \"INSERT INTO `s_attribute_configuration` (table_name, column_name, \"\n . \"column_type, position, translatable, display_in_backend, custom, \"\n . \"help_text, support_text, label, entity, array_store) \"\n . \"VALUES ('s_order_attributes','attribute4','string',1,0,1,0,'','','Transaction ID','NULL',NULL)\";\n }\n Shopware()->Db()->query($sql);\n }", "private function attach_order($request,$client){\n $order=$client->orders()->create([]);\n $order->products()->attach($request->products);\n $total_price=0;\n foreach ($request->products as $id=>$quantity){\n $product=Product::findOrFail($id);\n $total_price+=$quantity['quantity'] * $product->sale_price;\n $product->update([\n 'stock'=>$product->stock - $quantity['quantity']\n ]);\n }\n\n $order->update([\n 'total_price'=>$total_price\n ]);\n\n }", "abstract public function setOrder(OrderModel $order);", "public function add_do_express_checkout_params( $token, $order, $args ) {\n\n\t\t$this->set_method( 'DoExpressCheckoutPayment' );\n\n\t\t// set base params.\n\t\t$this->add_parameters(\n\t\t\tarray(\n\t\t\t\t'TOKEN' => $token,\n\t\t\t\t'PAYERID' => $args['payer_id'],\n\t\t\t\t'BUTTONSOURCE' => 'WooThemes_Cart',\n\t\t\t\t'RETURNFMFDETAILS' => 1,\n\t\t\t)\n\t\t);\n\n\t\t$this->add_payment_params( $order, $args['step_id'], $args['payment_action'] );\n\t}", "public function AddOrder($order)\n\t\t{\n\t\t\tif (!isset($this->Orders))\n\t\t\t{\n\t\t\t\t$this->Orders = array();\n\t\t\t}\n\n\t\t\tif ($order instanceof DataPushOrder && !in_array($order, $this->Orders))\n\t\t\t{\n\t\t\t\tarray_push($this->Orders, $order);\n\t\t\t}\n\t\t}", "function setOrder($order){\n\t\t$this->order=$order;\n\t}", "public function hookNewOrder($params)\r\n {\r\n $carrier = new Carrier((int) $params['order']->id_carrier);\r\n $result = TipsaAdminComun::getTipsaCarriers(\"`id_reference` = \" . (int) $carrier->id_reference);\r\n\r\n if (!$result) {\r\n return false;\r\n }\r\n\r\n $tipo_servicio = $result['code'];\r\n\r\n $office = Db::getInstance()->getRow(\r\n \"SELECT * FROM `\" . _DB_PREFIX_ . \"tipsa_address`\r\n WHERE `id_cart` = \" . (int) $params['cart']->id . \" AND `id_carrier` = \" . (int) $params['order']->id_carrier\r\n );\r\n try {\r\n if ($tipo_servicio == $this->service_codes_yupick) {\r\n if ($office) {\r\n // get current customer address\r\n $address = new Address($params['order']->id_address_delivery);\r\n // Create a new address with the point location\r\n $address_point = new Address();\r\n //loop through address fields in case the shop has added custom or required fields\r\n foreach ($address as $name => $value) {\r\n if (!is_array($value) && !in_array($name, array('date_upd', 'date_add', 'id', 'country'))) {\r\n switch ($name) {\r\n case 'id_customer':\r\n $address_point->id_customer = $params['order']->id_customer;\r\n break;\r\n case 'address1':\r\n $address_point->address1 = $office['address'];\r\n break;\r\n case 'address2':\r\n $address_point->address2 = $office['firstname'];\r\n break;\r\n case 'postcode':\r\n $address_point->postcode = $office['postcode'];\r\n break;\r\n case 'city':\r\n $address_point->city = $office['city'];\r\n break;\r\n case 'alias':\r\n $address_point->alias = $office['alias'];\r\n break;\r\n case 'phone_mobile':\r\n if (!empty($office['phone_mobile'])) {\r\n $address_point->phone_mobile = $office['phone_mobile'];\r\n } else {\r\n $address_point->phone_mobile = \"0\";\r\n }\r\n break;\r\n case 'phone':\r\n $address_point->phone = $office['phone'] != '' ? $office['phone'] : \"0\";\r\n break;\r\n case 'deleted':\r\n $address_point->deleted = true;\r\n break;\r\n default:\r\n $address_point->$name = $value;\r\n }\r\n }\r\n }\r\n\r\n $address_point->save();\r\n if ($address_point->id) {\r\n $order = $params['order'];\r\n $order->id_address_delivery = $address_point->id;\r\n $order->update();\r\n }\r\n }\r\n }\r\n Db::getInstance()->update(\r\n 'tipsa_address',\r\n array('state' => 1, 'id_order' => (int) $params['order']->id),\r\n \"`state` = 0 AND `id_cart` = \" . (int) $params['cart']->id . \" AND `id_carrier` = \" . (int) $params['order']->id_carrier\r\n );\r\n } catch (Exception $e) {\r\n //In case of error, just do the most important\r\n return $e->message();\r\n }\r\n\r\n //Delete old quotes. Need to be in Days because Paypal or card payment validation can last some time\r\n Db::getInstance()->Execute(\r\n \"DELETE FROM \" . _DB_PREFIX_ . \"tipsa_address\r\n WHERE date < DATE_SUB(NOW(), INTERVAL 7 DAY) AND state = 0\"\r\n );\r\n }", "public function addOrderLayer()\n {\n $transactions = $this->orderDataArray->setOrderIds($this->getOrderIds())->getOrderLayer();\n\n if (!empty($transactions)) {\n /** @var $tm DataLayer */\n $tm = $this->getParentBlock();\n foreach ($transactions as $order) {\n $tm->addCustomDataLayer($order);\n }\n }\n }", "public function orderItem($param) { \n if (!$this->aaa->has_right('openruth', 500))\n $res->orderItemError->_value = 'authentication_error';\n else {\n $targets = $this->config->get_value('ruth', 'ztargets');\n $agencyId = self::strip_agency($param->agencyId->_value);\n if ($tgt = $targets[$agencyId]) {\n // build order\n $ord = &$order->Reservation->_value;\n $ord->LibraryNo->_value = $agencyId;\n $ord->BorrowerTicketNo->_value = $param->userId->_value;\n $ord->DisposalNote->_value = $param->orderNote->_value;\n $ord->LastUseDate->_value = self::to_zruth_date($param->orderLastInterestDate->_value);\n $ord->ServiceCounter->_value = $param->agencyCounter->_value;\n $ord->Override->_value = (self::xs_true($param->agencyCounter->_value) ? 'Y' : 'N');\n $ord->Priority->_value = $param->orderPriority->_value;\n // ?????? $ord->DisposalType->_value = $param->xxxx->_value;\n $itemIds = &$param->orderItemId;\n if (is_array($itemIds))\n foreach ($itemIds as $oid) {\n $mrid->ID->_value = $oid->_value->itemId->_value;\n if (!$mrid->TitlePartNo->_value = $oid->_value->itemSerialPartId->_value)\n $mrid->TitlePartNo->_value = 0;\n $ord->MRIDS->_value->MRID[]->_value = $mrid;\n }\n else {\n $mrid->ID->_value = $itemIds->_value->itemId->_value;\n if (!$mrid->TitlePartNo->_value = $itemIds->_value->itemSerialPartId->_value)\n $mrid->TitlePartNo->_value = 0;\n $ord->MRIDS->_value->MRID->_value = $mrid;\n }\n $xml = '<?xml version=\"1.0\" encoding=\"ISO-8859-1\" ?'.'>' . utf8_decode($this->objconvert->obj2xml($order));\n \n//print_r($ord);\n//print_r($xml);\n \n $z = new z3950();\n $z->set_target($tgt['host']);\n $z->set_database($tgt['database'].'-ophelia');\n $z->set_authentication($tgt['authentication']);\n if ($tgt['proxy']) {\n $z->set_proxy($tgt['proxy']);\n }\n $xml_ret = $z->z3950_xml_update($xml, $tgt['timeout']);\n if ($z->get_errno() == 0 && $xml_ret['xmlUpdateDoc']) {\n $dom = new DomDocument();\n $dom->preserveWhiteSpace = false;\n if ($dom->loadXML($xml_ret['xmlUpdateDoc'])) {\n if ($err = &$dom->getElementsByTagName('ErrorResponse')->item(0)) {\n verbose::log(ERROR, __FUNCTION__ . ' (' . __LINE__ . ') errno: ' . $err->getAttribute('Err') . \n ' error: ' . $err->nodeValue);\n $res->orderItemError->_value = 'unspecified error, order not possible';\n } else {\n // order at least partly ok \n foreach ($dom->getElementsByTagName('MRID') as $mrid) {\n unset($ir);\n $ir->orderItemId->_value->itemId->_value = $mrid->getAttribute('Id');\n if ($mrid->getAttribute('Tp'))\n $ir->orderItemId->_value->itemSerialPartId->_value = $mrid->getAttribute('Tp');\n if (!$mrid->nodeValue)\n $ir->orderItemOk->_value = 'true';\n elseif (!($ir->orderItemError->_value = $this->errs[$mrid->nodeValue])) \n $ir->orderItemError->_value = 'unknown error: ' . $mrid->nodeValue;\n $res->orderItem[]->_value = $ir;\n }\n }\n }\n } else {\n self::log_z_error(__FUNCTION__, __LINE__, $agencyId, $z->get_errno(), $z->get_error_string());\n $res->orderItemError->_value = 'system error';\n }\n//echo \"\\n\";\n//print_r($xml_ret);\n//print_r(\"\\nError: \" . $z->get_errno());\n } else\n $res->orderItemError->_value = 'unknown agencyId';\n }\n\n $ret->orderItemResponse->_value = $res;\n //var_dump($param); var_dump($res); die();\n return $ret;\n }", "public function order($order) {\n\t\t$model = $this->model;\n\t\t// For each order field, it is added as an OrderField object\n\t\tforeach ($order as $field => $fieldOrder) {\n\t\t\t$this->order[] = new \\lulo\\query\\OrderField($this, $model, $field, $fieldOrder);\n\t\t}\n\t\treturn $this;\n\t}", "public function __construct(Order $order)\n {\n $this->order = $order; \n $detail = OrderDetail::where('order_id', $this->order->id)->get();\n $this->detail = $detail;\n }", "public function addOrderedItemsToStock($order)\r\n {\r\n \t$nVersion = Mage::getModel('paymentsensegateway/direct')->getVersion();\r\n \t$isCustomStockManagementEnabled = Mage::getModel('paymentsensegateway/direct')->getConfigData('customstockmanagementenabled');\r\n\t\t\r\n \tif($nVersion >= 1410 &&\r\n \t\t$isCustomStockManagementEnabled)\r\n \t{\r\n\t \t$items = $order->getAllItems();\r\n\t\t\tforeach ($items as $itemId => $item)\r\n\t\t\t{\r\n\t\t\t\t// ordered quantity of the item from stock\r\n\t\t\t\t$quantity = $item->getQtyOrdered();\r\n\t\t\t\t$productId = $item->getProductId();\r\n\t\t\t\t\r\n\t\t\t\t$stock = Mage::getModel('cataloginventory/stock_item')->loadByProduct($productId);\r\n\t\t\t\t$stockManagement = $stock->getManageStock();\r\n\t\t\t\t\r\n\t\t\t\tif($stockManagement)\r\n\t\t\t\t{\r\n\t\t\t\t\t$stock->setQty($stock->getQty() + $quantity);\r\n\t\t\t\t\t$stock->save();\r\n\t\t\t\t}\r\n\t\t\t}\r\n \t}\r\n }", "function buildOrderParams() \n\t{\n\t\tif ($this->sortByGroup === false && $this->sortField != \"\"){\n\t\t\t$this->strOrderBy = \"Order by \".$this->sortField;\n\t\t\tif ($this->sortOrder == \"A\")\n\t\t\t\t$this->strOrderBy .= \" asc\";\n\t\t\telse \n\t\t\t\t$this->strOrderBy .= \" desc\";\n\t\t}\n\t}", "protected function makeInvoiceOrderOptions()\n\t{\n\t\t$purse = $this->purse;\n\n\t\treturn array_merge($purse->makeInvoiceOrderOptions(), [\n\t\t\t'amount' => $this->amount,\n\t\t]);\n\t}", "public function update(Request $request, Order $order)\n {\n if($request->has('address1')){\n $order->address()->update($request->all());\n }\n if($request->has('variation_thickness')){\n $order->spec()->update(array('variation_thickness' => $request->variation_thickness));\n }\n if($request->has('variation_density')){\n $order->spec()->update(array('variation_density' => $request->variation_density));\n }\n dd($order);\n }", "public function order() {\n\t /* get an update about the order details from hoolah api */\n\t $this->load->language('extension/payment/hoolah');\n\t $this->load->model('extension/payment/hoolah');\n\t $this->load->model('sale/order');\n\t \n\t if (isset($this->request->get['order_id'])) {\n\t\t\t$order_id = $this->request->get['order_id'];\n\t\t} else {\n\t\t\t$order_id = 0;\n\t\t}\n\t\n\t\t// get the callback info\n\t\t$order_mid = 'Order-' . $order_id;\n\t\t$callback_result = $this->model_extension_payment_hoolah->getCallback($order_mid);\n\t\n // call hoolah api\n $hoolah_info = $this->model_extension_payment_hoolah->order($callback_result['order_uuid']);\n \n $infos = array();\n $infos['order_id'] = $hoolah_info->merchantRef;\n $infos['uuid'] = $hoolah_info->uuid;\n $infos['status'] = $hoolah_info->status;\n $infos['orderType'] = $hoolah_info->orderType;\n $infos['total'] = $hoolah_info->totalAmount;\n $infos['tax'] = $hoolah_info->taxAmount;\n $infos['shipping_fee'] = $hoolah_info->shippingAmount;\n $infos['currency'] = $hoolah_info->currency;\n $infos['createdAt'] = date('Y-m-d H:i:s', strtotime($hoolah_info->createdAt));\n $infos['date_added'] = date('Y-m-d H:i:s');\n \n // if the order is refunded, check the status of refund in api\n $refund_status = $this->model_extension_payment_hoolah->getHoolahRefundStatus($callback_result['order_uuid'], 'ACCEPTED');\n \n // provide other details to save in transaction\n if(isset($refund_status)) {\n $infos['total'] = $refund_status['total'];\n $infos['requestId'] = $refund_status['requestId'];\n $infos['code'] = $refund_status['code'];\n $infos['message'] = $refund_status['message'];\n $infos['details'] = $refund_status['details'];\n }\n \n // check if not existing\n $order_transaction = $this->model_extension_payment_hoolah->getHoolahOrderTransactionStatus($hoolah_info->merchantRef, $hoolah_info->status);\n if(count($order_transaction) == 0) {\n // if not existing, insert\n $this->model_extension_payment_hoolah->addHoolahOrderTransaction($infos);\n } else {\n // if existing, update\n $this->model_extension_payment_hoolah->editHoolahOrderTransaction($order_transaction['id'], $infos);\n }\n \n if(isset($order_transaction)) {\n $data['text_extension'] = $this->language->get('text_extension');\n\t\t\t$data['text_transaction'] = $this->language->get('text_transaction');\n\t\t\t$data['text_capture_status'] = $this->language->get('text_capture_status');\n\t\t\t$data['text_amount_authorised'] = $this->language->get('text_amount_authorised');\n\t\t\t$data['text_total_amount_captured'] = $this->language->get('text_total_amount_captured');\n\t\t\t$data['text_amount_captured'] = $this->language->get('text_amount_captured');\n\t\t\t$data['text_amount_refunded'] = $this->language->get('text_amount_refunded');\n\t\t\t$data['text_confirm_void'] = $this->language->get('text_confirm_void');\n\t\t\t$data['text_full_refund'] = $this->language->get('text_full_refund');\n\t\t\t$data['text_partial_refund'] = $this->language->get('text_partial_refund');\n\t\t\t$data['text_loading'] = $this->language->get('text_loading');\n\n\t\t\t$data['entry_capture_amount'] = $this->language->get('entry_capture_amount');\n\t\t\t$data['entry_capture_complete'] = $this->language->get('entry_capture_complete');\n\t\t\t$data['entry_full_refund'] = $this->language->get('entry_full_refund');\n\t\t\t$data['entry_note'] = $this->language->get('entry_note');\n\t\t\t$data['entry_amount'] = $this->language->get('entry_amount');\n\n\t\t\t$data['button_capture'] = $this->language->get('button_capture');\n\t\t\t$data['button_refund'] = $this->language->get('button_refund');\n\t\t\t$data['button_void'] = $this->language->get('button_void');\n\n\t\t\t$data['tab_capture'] = $this->language->get('tab_capture');\n\t\t\t$data['tab_refund'] = $this->language->get('tab_refund');\n\n\t\t\t$data['token'] = $this->session->data['token'];\n\n\t\t\t$data['order_id'] = $this->request->get['order_id'];\n \n \t$data['status'] = $order_transaction['status'];\n\n\t\t\t$data['total'] = $order_transaction['total'];\n\t\t\t\n\t\t\t// total order\n\t\t\t$captured = number_format($this->model_extension_payment_hoolah->getCapturedTotal($order_transaction['order_id']), 2);\n\t\t\t\n\t\t\t$orders = $this->model_sale_order->getOrder($this->request->get['order_id']);\n\t\t\t\n if(number_format($orders['total'], 2) != $captured) {\n $captured = number_format($orders['total'], 2);\n }\n\t\t\t$data['captured'] = $captured;\n \n // refund order\n// \t\t\t$refunded = number_format($this->model_extension_payment_hoolah->getRefundedTotal($order_transaction['uuid']), 2);\n// \t\t\t$data['refunded'] = $refunded;\n\t\t\t\n\t\t\t$hoolah_info = $this->model_extension_payment_hoolah->getHoolahOrderTransaction($this->request->get['order_id']);\n $refund = array();\n \t\tif (isset($hoolah_info)) {\n \t\t\tforeach ($hoolah_info as $key => $result) {\n \t\t // refund\n \t\t if($result['status'] == 'ACCEPTED') {\n \t\t $refund[] = $result['total'];\n \t\t }\n \t\t\t}\n \t\t} \n \t\tif(!empty($refund)) {\n\t\t\t $data['refunded'] = number_format(array_sum($refund), 2);\n\t\t\t} \n\t\t\t$data['total_amount'] = number_format($orders['total'], 2);\n\t\t\t\n\t\t\treturn $this->load->view('extension/payment/hoolah_order', $data);\n }\n\t}", "public function addAdditionalOptionsToQuote($observer)\n {\n $action = Mage::app()->getFrontController()->getAction();\n if ($action->getFullActionName() == 'checkout_cart_add')\n {\n Mage::log(\"checkout_cart_add\", Zend_Log::DEBUG, \"threekit.log\");\n // assuming you are posting your custom form values in an array called extra_options...\n if ($options = $action->getRequest()->getParam('clara_additional_options'))\n {\n $decodePost = json_decode($options, true);\n $product = $observer->getProduct();\n\n // add to the additional options array\n $additionalOptions = array();\n if ($additionalOption = $product->getCustomOption('additional_options'))\n {\n $additionalOptions = (array) unserialize($additionalOption->getValue());\n }\n foreach ($decodePost as $key => $value)\n {\n $additionalOptions[] = array(\n 'label' => $key,\n 'value' => $value,\n );\n }\n // add the additional options array with the option code additional_options\n $observer->getProduct()\n ->addCustomOption('additional_options', serialize($additionalOptions));\n }\n }\n }", "public function setTicketOrderInfo(TicketOrderInfo $value) {\n return $this->set(self::TICKET_ORDER_INFO, $value);\n }", "public function __construct($order=null)\n {\n $this->data = $order;\n }", "public function setOrderId($var)\n {\n GPBUtil::checkInt32($var);\n $this->orderId = $var;\n\n return $this;\n }", "private function _serializeOrder($record)\n {\n $order = new Order();\n $order->OrderID = $record['OrderID'];\n $order->CustomerID = $record['CustomerID'];\n $order->EmployeeID = $record['EmployeeID'];\n $order->OrderDate = !is_null($record['OrderDate']) ? $record['OrderDate']->format('Y-m-d\\TH:i:s'): null;\n $order->RequiredDate = !is_null($record['RequiredDate']) ? $record['RequiredDate']->format('Y-m-d\\TH:i:s'): null;\n $order->ShippedDate = !is_null($record['ShippedDate']) ? $record['ShippedDate']->format('Y-m-d\\TH:i:s'): null;\n $order->ShipVia = $record['ShipVia'];\n $order->Freight = $record['Freight'];\n $order->ShipName = $record['ShipName'];\n $order->ShipAddress = $record['ShipAddress'];\n $order->ShipCity = $record['ShipCity'];\n $order->ShipRegion = $record['ShipRegion'];\n $order->ShipPostalCode = $record['ShipPostalCode'];\n $order->ShipCountry = $record['ShipCountry'];\n return $order;\n }", "function wc_veruspay_display_crypto_address_in_admin( $order ) {\n\tglobal $wc_veruspay_global;\n\t$order_id = method_exists( $order, 'get_id' ) ? $order->get_id() : $order->id;\n\t$wc_veruspay_payment_method = $order->get_payment_method();\n\tif ( $wc_veruspay_payment_method == $wc_veruspay_global['id'] ){\n\t\t$wc_veruspay_order_status = get_post_meta( $order_id, '_wc_veruspay_status', TRUE );\n\t\tif ( $wc_veruspay_order_status == 'noaddress' ) {\n\t\t\tforeach ( $order->get_items() as $item_key => $item_values) { \n\t\t\t\t$wc_veruspay_stock = get_post_meta( $item_values['variation_id'], '_manage_stock', TRUE ); \n\t\t\t}\n\t\t\tupdate_post_meta( $order_id, '_wc_veruspay_status', sanitize_text_field( 'cancelled' ) );\n\t\t\t$order->update_status( 'cancelled', __( 'Missing Payment Address', 'woocommerce') );\n\t\t\theader(\"Refresh:0\");\n\t\t}\n\t\telse {\n\t\t\tif ( $order->has_status( 'processing' ) ) {\n\t\t\t\t$wc_veruspay_payment_status = 'Received';\n\t\t\t\t$wc_veruspay_price = get_post_meta( $order_id, '_wc_veruspay_paid', TRUE );\n\t\t\t}\n\t\t\telse {\n\t\t\t\t$wc_veruspay_payment_status = 'Pending'; \n\t\t\t\t$wc_veruspay_price = get_post_meta( $order_id, '_wc_veruspay_price', TRUE ); \n\t\t\t}\n\t\t\t$wc_veruspay_address = get_post_meta( $order_id, '_wc_veruspay_address', TRUE );\n\t\t\t$_chain_up = strtoupper( get_post_meta( $order_id, '_wc_veruspay_coin', TRUE ) );\n\t\t\t$_chain_lo = strtolower( $_chain_up );\n\t\t\techo '<style>.wc-order-totals-items{height:3rem!important}.wc-order-totals-items:after{content: \"' . $_chain_up . ' ' . $wc_veruspay_payment_status . ': ' . $wc_veruspay_price . '\"!important;position:relative;font-size:1rem;font-weight:bold;color:#007bff!important;top:0;float:right;width:200px;height:30px;}</style>';\n\t\t\techo '<p><strong>'.__( $_chain_up . ' Price', 'woocommerce' ).':</strong>' . $wc_veruspay_price . ' with exchange rate of ' . get_post_meta( $order_id, '_wc_veruspay_rate', TRUE ) . '</p>';\n\t\t\tif ( substr($wc_veruspay_address, 0, 2) !== 'zs' ) {\n\t\t\t\techo '<p><strong>'.__( $_chain_up . ' Address', 'woocommerce' ).':</strong> <a target=\"_BLANK\" href=\"' . $wc_veruspay_global['chain_dtls'][$_chain_lo]['address'] . $wc_veruspay_address . '\">' . $wc_veruspay_address . '</a></p>';\n\t\t\t}\n\t\t\telse {\n\t\t\t\techo '<p><strong>'.__( $_chain_up . ' Address', 'woocommerce' ).':</strong> '.$wc_veruspay_address.'</p';\n\t\t\t}\n\t\t}\n\t}\n}", "public function lstOrderDetail(){\n\t\t$Sql = \"SELECT \n\t\t\t\t\torder_detail_id,\n\t\t\t\t\torder_id,\n\t\t\t\t\tcustomer_id,\n\t\t\t\t\textra_feature_id,\n\t\t\t\t\tfeature_name,\n\t\t\t\t\tquantity,\n\t\t\t\t\tprice\n\t\t\t\tFROM\n\t\t\t\t\trs_tbl_order_details\n\t\t\t\tWHERE\n\t\t\t\t\t1=1\";\n\t\t\n\t\tif($this->isPropertySet(\"order_detail_id\", \"V\")){\n\t\t\t$Sql .= \" AND order_detail_id='\" . $this->getProperty(\"order_detail_id\") . \"'\";\n\t\t}\n\t\tif($this->isPropertySet(\"order_id\", \"V\")){\n\t\t\t$Sql .= \" AND order_id='\" . $this->getProperty(\"order_id\") . \"'\";\n\t\t}\n\t\tif($this->isPropertySet(\"customer_id\", \"V\")){\n\t\t\t$Sql .= \" AND customer_id=\" . $this->getProperty(\"customer_id\");\n\t\t}\n\t\tif($this->isPropertySet(\"extra_feature_id\", \"V\")){\n\t\t\t$Sql .= \" AND extra_feature_id='\" . $this->getProperty(\"extra_feature_id\") . \"'\";\n\t\t}\n\t\tif($this->isPropertySet(\"ORDERBY\", \"V\")){\n\t\t\t$Sql .= \" ORDER BY \" . $this->getProperty(\"ORDERBY\");\n\t\t}\n\t\t\n\t\tif($this->isPropertySet(\"limit\", \"V\"))\n\t\t\t$Sql .= $this->appendLimit($this->getProperty(\"limit\"));\n\t\treturn $this->dbQuery($Sql);\n\t}", "function buildOrder($orders) {\n\t$order = [\n\t\t\"service_uid\" => $orders[0][15],\n\t\t\"points\" => 0,\n\t\t\"invoice_number\" => $orders[0][2],\n\t\t\"purchase_detail\" => [],\n\t\t\"prices\" => [],\n\t\t\"branch_name\" => $orders[0][0],\n\t\t\"createtime\" => date('Y-m-d H:i:s')\n\t];\n\n\t$total = 0;\n\t$discount = 0;\n\tforeach ($orders as $o) {\n\t\t$order['purchase_detail'][] = [\n\t\t\t\"sku\" => $o[3],\n\t\t\t\"product_name\" => $o[4],\n\t\t\t\"category\" => [$o[5], $o[6]],\n\t\t\t\"quantity\" => (int) abs($o[16]),\n\t\t\t\"unit_price\" => (float) $o[17],\n\t\t\t\"variations\" => [\n\t\t\t\t['name' => 'Linea', 'value' => $o[5]],\n\t\t\t\t['name' => 'Color', 'value' => $o[10]],\n\t\t\t\t['name' => 'Talle', 'value' => $o[11]],\n\t\t\t]\n\t\t];\n\n\t\t$total += (int) abs($o[16]) * (float) $o[17];\n\t\t$discount += abs($o[19]);\n\t}\n\n\t$order['prices'] = [\n\t\t\"gross\" => $total,\n\t\t\"discount\" => $discount,\n\t\t\"total\" => $total - $discount\n\t];\n\n\treturn $order;\n}", "private function inserOrderproduct($orderId){\n\t\t$this->load->library(\"cart\");\n\t\tforeach($this->cart->contents() as $items){\n\t\t\t$object=array(\n\t\t\t\t'OrdId' => $orderId,\n\t\t\t\t'ItemId' => $items['id'],\n\t\t\t\t'ItemName' => $items['name'],\n\t\t\t\t'ItemEdition' => $items['options']['BookEdition'],\n\t\t\t\t'ItemAuther' => $items['options']['Author'],\n\t\t\t\t'ItemQuantity' => $items['qty'],\n\t\t\t\t'ItemRetailPrice' => $items['options']['RetailPrice'],\n\t\t\t\t'ItemSellingPrice' => $items['price'],\n\t\t\t\t'ItemDiscount' => $items['options']['Discount']\n\t\t\t);\n\t\t\t$this->db->insert('tbl_order_lineitems', $object);\n\t\t}\n\t}", "public function testUpdateOrder()\n {\n }", "private function _addDescriptionElement($order)\n {\n $description = $order->addChild('description');\n $this->_addCDATA($description, $this->orderDescription);\n }", "public function buildOrderRequest(Model $order, string $currency)\n {\n $data = [\n 'idempotency_key' => uniqid(),\n 'order' => [\n 'reference_id'=> (string) $order->id,\n 'line_items' => $this->buildProducts($order->products, $currency),\n 'discounts' => $this->buildDiscounts($order->discounts, $currency),\n 'taxes' => $this->buildTaxes($order->taxes),\n ],\n ];\n\n // Add product level discounts to order level taxes\n if ($this->productDiscounts->isNotEmpty()) {\n $data['order']['discounts'] = $this->productDiscounts->merge($data['order']['discounts'])->toArray();\n $this->productDiscounts = collect([]);\n }\n\n // Add product level taxes to order level taxes\n if ($this->productTaxes->isNotEmpty()) {\n $data['order']['taxes'] = $this->productTaxes->merge($data['order']['taxes'])->toArray();\n $this->productTaxes = collect([]);\n }\n\n return new CreateOrderRequest($data);\n }", "public function Order_Details()\n {\n $this->_Order_Details->ClearAllOptions();\n return $this->_Order_Details;\n }", "public function setOrderById($orderId, $orderData)\n {\n }", "public function addPartyOrdersRequest($dkParamDataArr){\n $rspDetails = array();\n $rspDetails[\"poRequestedStatusDetails\"] = array();\n $rspDetails['poRequestedStatusDetails'][\"isPartyOrderRequestSend\"] = 'NO';\n $rspDetails['poRequestedStatusDetails'][\"partyOrderNo\"] = '';\n // check requested param data length\n if(count($dkParamDataArr)>0 && $dkParamDataArr!=false){\n // add party order request status\n $dkParamDataArr['status'] = 'R';\n // fetch user session data details\n $userSessionDetailsData = commonfunction :: getUserSessionDetails($dkParamDataArr);\n if(count($userSessionDetailsData)>0 && $userSessionDetailsData!=false){\n $dkParamDataArr['partyorder_no'] = commonfunction :: generatePartyOrderNo();\n $dkParamDataArr['user_id'] = $userSessionDetailsData['unmd5UserId'];\n $dkParamDataArr['created_by'] = $userSessionDetailsData['unmd5UserId'];\n $lastPORID = PartyOrdersDao::addPartyOrderRequest($dkParamDataArr);\n if($lastPORID>0 && $lastPORID!=false){\n $rspDetails['poRequestedStatusDetails'][\"isPartyOrderRequestSend\"] = 'YES';\n $rspDetails['poRequestedStatusDetails'][\"partyOrderNo\"] = $dkParamDataArr['partyorder_no'];\n // send sms to end user to inform about party order request recieve by desserts khazana\n // $retEmailSentStatus = commonfunction :: preparedDataSendingEmailAboutPartyOrdersRequestReceiveFromCustomer($dkParamDataArr);\n // $smsMsgBody = \"Sms Testing CJ\";\n // $retSmsSentStatus = utils :: sendSMS(array(\"9975967186\"), $smsMsgBody);\n } \n }\n } \n return $rspDetails;\n }", "public function __construct(Order $order_model)\n {\n $this->_order_model = $order_model;\n }", "public function setOrder(?string $order): void\n {\n $this->order = $order;\n }", "public function setOrder(?string $order): void\n {\n $this->order = $order;\n }", "function SetUpSortOrder() {\n\tglobal $dpp_proveedores;\n\n\t// Check for an Order parameter\n\tif (@$_GET[\"order\"] <> \"\") {\n\t\t$dpp_proveedores->CurrentOrder = ew_StripSlashes(@$_GET[\"order\"]);\n\t\t$dpp_proveedores->CurrentOrderType = @$_GET[\"ordertype\"];\n\n\t\t// Field provee_id\n\t\t$dpp_proveedores->UpdateSort($dpp_proveedores->provee_id);\n\n\t\t// Field provee_rut\n\t\t$dpp_proveedores->UpdateSort($dpp_proveedores->provee_rut);\n\n\t\t// Field provee_dig\n\t\t$dpp_proveedores->UpdateSort($dpp_proveedores->provee_dig);\n\n\t\t// Field provee_cat_juri\n\t\t$dpp_proveedores->UpdateSort($dpp_proveedores->provee_cat_juri);\n\n\t\t// Field provee_nombre\n\t\t$dpp_proveedores->UpdateSort($dpp_proveedores->provee_nombre);\n\n\t\t// Field provee_paterno\n\t\t$dpp_proveedores->UpdateSort($dpp_proveedores->provee_paterno);\n\n\t\t// Field provee_materno\n\t\t$dpp_proveedores->UpdateSort($dpp_proveedores->provee_materno);\n\n\t\t// Field provee_dir\n\t\t$dpp_proveedores->UpdateSort($dpp_proveedores->provee_dir);\n\n\t\t// Field provee_fono\n\t\t$dpp_proveedores->UpdateSort($dpp_proveedores->provee_fono);\n\t\t$dpp_proveedores->setStartRecordNumber(1); // Reset start position\n\t}\n\t$sOrderBy = $dpp_proveedores->getSessionOrderBy(); // Get order by from Session\n\tif ($sOrderBy == \"\") {\n\t\tif ($dpp_proveedores->SqlOrderBy() <> \"\") {\n\t\t\t$sOrderBy = $dpp_proveedores->SqlOrderBy();\n\t\t\t$dpp_proveedores->setSessionOrderBy($sOrderBy);\n\t\t}\n\t}\n}", "public function modifyOrder(){\r\n $cookies = new CookieModel();\r\n $cookie_id = $cookies -> read();\r\n $Form = M('userinfo');\r\n $condition_in['stuid'] = $cookie_id;\r\n $data = $Form->where($condition_in)->find();\r\n if (! $data['manager']) $this->redirect('/');\r\n $key = $_REQUEST['id'];\r\n $condition['id'] = $key;\r\n $form = M(\"orderinfo\");\r\n $data = $form->where($condition)->find();\r\n if ($_REQUEST['number']) $data['number'] = $_REQUEST['number'];\r\n if ($_REQUEST['area']) $data['area'] = $_REQUEST['area'];\r\n if ($_REQUEST['ordertime']) $data['ordertime'] = $_REQUEST['ordertime'];\r\n if ($_REQUEST['address']) $data['address'] = $_REQUEST['address'];\r\n if ($_REQUEST['pay']) $data['pay'] = $_REQUEST['pay'];\r\n if ($_REQUEST['phone']) $data['phone'] = $_REQUEST['phone'];\r\n if ($_REQUEST['food']) $data['food'] = $_REQUEST['food'];\r\n if ($_REQUEST['amount']) $data['amount'] = $_REQUEST['amount'];\r\n if ($_REQUEST['status']) $data['status'] = $_REQUEST['status']; \r\n if ($_REQUEST['pay_status']) $data['pay_status'] = $_REQUEST['pay_status'];\r\n $data['id'] = $key;\r\n $form->save($data);\r\n $this->redirect('/index.php/Admin/index');\r\n //$this->display();\r\n }" ]
[ "0.7412107", "0.670826", "0.6062108", "0.5628115", "0.5509659", "0.5447813", "0.5394347", "0.53858465", "0.5371172", "0.53675467", "0.527933", "0.52177584", "0.5144226", "0.51378995", "0.50560296", "0.50498396", "0.5006565", "0.50007325", "0.4995811", "0.49781412", "0.4942892", "0.49373636", "0.49044916", "0.489247", "0.48609245", "0.48581487", "0.4848074", "0.48432738", "0.48396903", "0.48391515", "0.48356807", "0.482303", "0.482303", "0.482303", "0.482303", "0.482303", "0.482303", "0.482303", "0.482303", "0.48215017", "0.48090065", "0.48090065", "0.48090065", "0.48090065", "0.48090065", "0.48090065", "0.48090065", "0.48090065", "0.48090065", "0.48090065", "0.480702", "0.48010543", "0.47926667", "0.47833258", "0.4778823", "0.47779015", "0.4771192", "0.4771001", "0.47675514", "0.47674584", "0.47580355", "0.47527444", "0.47525933", "0.4752013", "0.47432855", "0.47385114", "0.47363824", "0.47353864", "0.47296503", "0.472752", "0.47225842", "0.47088295", "0.46841672", "0.46717116", "0.46713543", "0.4669381", "0.46641868", "0.466393", "0.464844", "0.46474543", "0.4645087", "0.46247676", "0.46232587", "0.4622391", "0.4619947", "0.46171305", "0.46145833", "0.46099362", "0.45899585", "0.45871714", "0.45834327", "0.45743853", "0.45741278", "0.45729917", "0.45685536", "0.45616695", "0.455872", "0.455872", "0.45518818", "0.4550017" ]
0.79136497
0
Add HVDOrderParams to OrderDetails.
public function addHVDOrderParams( HVDContext $hvdContext ): OrderDetailsBuilder { $xmlHVDOrderParams = $this->dom->createElement('HVDOrderParams'); $this->instance->appendChild($xmlHVDOrderParams); $xmlPartnerID = $this->dom->createElement('PartnerID'); $xmlPartnerID->nodeValue = $hvdContext->getPartnerId(); $xmlHVDOrderParams->appendChild($xmlPartnerID); // Add Service to HVDOrderParams. $xmlService = $this->dom->createElement('Service'); $xmlHVDOrderParams->appendChild($xmlService); // Add ServiceName to Service. $xmlServiceName = $this->dom->createElement('ServiceName'); $xmlServiceName->nodeValue = $hvdContext->getServiceName(); $xmlService->appendChild($xmlServiceName); // Add optional Scope to Service. if (null !== $hvdContext->getScope()) { $xmlScope = $this->dom->createElement('Scope'); $xmlScope->nodeValue = $hvdContext->getScope(); $xmlService->appendChild($xmlScope); } // Add optional ServiceOption to Service. if (null !== $hvdContext->getServiceOption()) { $xmlServiceOption = $this->dom->createElement('ServiceOption'); $xmlServiceOption->nodeValue = $hvdContext->getServiceOption(); $xmlService->appendChild($xmlServiceOption); } // Add MsgName to Service. $xmlMsgName = $this->dom->createElement('MsgName'); $xmlMsgName->nodeValue = $hvdContext->getMsgName(); $xmlService->appendChild($xmlMsgName); // Add OrderID to HVDOrderParams. $xmlOrderID = $this->dom->createElement('OrderID'); $xmlOrderID->nodeValue = $hvdContext->getOrderId(); $xmlHVDOrderParams->appendChild($xmlOrderID); return $this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function addHVEOrderParams(\n HVEContext $hveContext\n ): OrderDetailsBuilder {\n $xmlHVEOrderParams = $this->dom->createElement('HVEOrderParams');\n $this->instance->appendChild($xmlHVEOrderParams);\n\n $xmlPartnerID = $this->dom->createElement('PartnerID');\n $xmlPartnerID->nodeValue = $hveContext->getPartnerId();\n $xmlHVEOrderParams->appendChild($xmlPartnerID);\n\n // Add Service to HVEOrderParams.\n $xmlService = $this->dom->createElement('Service');\n $xmlHVEOrderParams->appendChild($xmlService);\n\n // Add ServiceName to Service.\n $xmlServiceName = $this->dom->createElement('ServiceName');\n $xmlServiceName->nodeValue = $hveContext->getServiceName();\n $xmlService->appendChild($xmlServiceName);\n\n // Add optional Scope to Service.\n if (null !== $hveContext->getScope()) {\n $xmlScope = $this->dom->createElement('Scope');\n $xmlScope->nodeValue = $hveContext->getScope();\n $xmlService->appendChild($xmlScope);\n }\n\n // Add optional ServiceOption to Service.\n if (null !== $hveContext->getServiceOption()) {\n $xmlServiceOption = $this->dom->createElement('ServiceOption');\n $xmlServiceOption->nodeValue = $hveContext->getServiceOption();\n $xmlService->appendChild($xmlServiceOption);\n }\n\n // Add MsgName to Service.\n $xmlMsgName = $this->dom->createElement('MsgName');\n $xmlMsgName->nodeValue = $hveContext->getMsgName();\n $xmlService->appendChild($xmlMsgName);\n\n // Add OrderID to HVEOrderParams.\n $xmlOrderID = $this->dom->createElement('OrderID');\n $xmlOrderID->nodeValue = $hveContext->getOrderId();\n $xmlHVEOrderParams->appendChild($xmlOrderID);\n\n return $this;\n }", "public function addHVTOrderParams(\n HVTContext $hvtContext\n ): OrderDetailsBuilder {\n $xmlHVTOrderParams = $this->dom->createElement('HVTOrderParams');\n $this->instance->appendChild($xmlHVTOrderParams);\n\n $xmlPartnerID = $this->dom->createElement('PartnerID');\n $xmlPartnerID->nodeValue = $hvtContext->getPartnerId();\n $xmlHVTOrderParams->appendChild($xmlPartnerID);\n\n // Add Service to HVDOrderParams.\n $xmlService = $this->dom->createElement('Service');\n $xmlHVTOrderParams->appendChild($xmlService);\n\n // Add ServiceName to Service.\n $xmlServiceName = $this->dom->createElement('ServiceName');\n $xmlServiceName->nodeValue = $hvtContext->getServiceName();\n $xmlService->appendChild($xmlServiceName);\n\n // Add optional Scope to Service.\n if (null !== $hvtContext->getScope()) {\n $xmlScope = $this->dom->createElement('Scope');\n $xmlScope->nodeValue = $hvtContext->getScope();\n $xmlService->appendChild($xmlScope);\n }\n\n // Add optional ServiceOption to Service.\n if (null !== $hvtContext->getServiceOption()) {\n $xmlServiceOption = $this->dom->createElement('ServiceOption');\n $xmlServiceOption->nodeValue = $hvtContext->getServiceOption();\n $xmlService->appendChild($xmlServiceOption);\n }\n\n // Add MsgName to Service.\n $xmlMsgName = $this->dom->createElement('MsgName');\n $xmlMsgName->nodeValue = $hvtContext->getMsgName();\n $xmlService->appendChild($xmlMsgName);\n\n // Add OrderID to HVTOrderParams.\n $xmlOrderID = $this->dom->createElement('OrderID');\n $xmlOrderID->nodeValue = $hvtContext->getOrderId();\n $xmlHVTOrderParams->appendChild($xmlOrderID);\n\n // Add OrderFlags to HVTOrderParams.\n $xmlOrderFlags = $this->dom->createElement('OrderFlags');\n $xmlOrderFlags->setAttribute(\n 'completeOrderData',\n $hvtContext->getCompleteOrderData() ? 'true' : 'false'\n );\n $xmlOrderFlags->setAttribute(\n 'fetchLimit',\n (string)$hvtContext->getFetchLimit()\n );\n $xmlOrderFlags->setAttribute(\n 'fetchOffset',\n (string)$hvtContext->getFetchOffset()\n );\n $xmlHVTOrderParams->appendChild($xmlOrderFlags);\n\n return $this;\n }", "public function addBTUOrderParams(\n BTUContext $btuContext\n ): OrderDetailsBuilder {\n $xmlBTUOrderParams = $this->dom->createElement('BTUOrderParams');\n $xmlBTUOrderParams->setAttribute('fileName', $btuContext->getFileName());\n $this->instance->appendChild($xmlBTUOrderParams);\n\n // Add Service to BTUOrderParams.\n $xmlService = $this->dom->createElement('Service');\n $xmlBTUOrderParams->appendChild($xmlService);\n\n // Add ServiceName to Service.\n $xmlServiceName = $this->dom->createElement('ServiceName');\n $xmlServiceName->nodeValue = $btuContext->getServiceName();\n $xmlService->appendChild($xmlServiceName);\n\n // Add optional Scope to Service.\n if (null !== $btuContext->getScope()) {\n $xmlScope = $this->dom->createElement('Scope');\n $xmlScope->nodeValue = $btuContext->getScope();\n $xmlService->appendChild($xmlScope);\n }\n\n // Add optional ServiceOption to Service.\n if (null !== $btuContext->getServiceOption()) {\n $xmlServiceOption = $this->dom->createElement('ServiceOption');\n $xmlServiceOption->nodeValue = $btuContext->getServiceOption();\n $xmlService->appendChild($xmlServiceOption);\n }\n\n // Add optional ContainerFlag to Service.\n if (null !== $btuContext->getContainerFlag()) {\n $xmlContainerFlag = $this->dom->createElement('ContainerFlag');\n $xmlContainerFlag->nodeValue = $btuContext->getContainerFlag();\n $xmlService->appendChild($xmlContainerFlag);\n }\n\n // Add MsgName to Service.\n $xmlMsgName = $this->dom->createElement('MsgName');\n $xmlMsgName->nodeValue = $btuContext->getMsgName();\n $xmlService->appendChild($xmlMsgName);\n\n // Add optional MsgName version attribute\n if (null !== $btuContext->getMsgNameVersion()) {\n $xmlMsgName->setAttribute(\n 'version',\n $btuContext->getMsgNameVersion()\n );\n }\n\n // Add optional MsgName variant attribute\n if (null !== $btuContext->getMsgNameVariant()) {\n $xmlMsgName->setAttribute(\n 'variant',\n $btuContext->getMsgNameVariant()\n );\n }\n\n // Add optional MsgName format attribute\n if (null !== $btuContext->getMsgNameFormat()) {\n $xmlMsgName->setAttribute(\n 'format',\n $btuContext->getMsgNameFormat()\n );\n }\n\n return $this;\n }", "function VehicleDetails(){\n\t\tparent::getVehicleDetails();\n\t\t$this -> addVehicleDetails();\n\t}", "public function setOrderDetails($totalPaied, $distance, $cartype, $estimatedFare,\r\n\t\t\t\t\t\t\t\t\t\t $gratuity, $airporttoll, $extraCost,$nightCharge, $serviceName, \r\n\t\t\t\t\t\t\t\t\t\t $datepicker, $picktime, $fromAddress, \r\n\t\t \t\t\t\t\t\t\t\t $toAddress, $passengers, $luggage, $guestDbId, $customerDbId) {\r\n\t\t\t$filter = new DataFilter(); //Inseating Datafilter class\r\n\t\t\t// secure and put to class level\r\n\t\t\t$this->totalPaied = $filter->SecureData($totalPaied); \r\n\t\t\t$this->distance = $filter->SecureData($distance);\r\n\t\t\t$this->cartype = $filter->SecureData($cartype);\r\n\t\t\t$this->estimatedFare = $filter->SecureData($estimatedFare);\r\n\t\t\t$this->gratuity = $filter->SecureData($gratuity);\r\n\t\t\t$this->airporttoll = $filter->SecureData($airporttoll);\r\n\t\t\t$this->extraCost = $filter->SecureData($extraCost);\r\n\t\t\t$this->nightCharge = $filter->SecureData($nightCharge);\r\n\t\t\t$this->serviceName = $filter->SecureData($serviceName);\r\n\t\t\t$this->datepicker = $filter->SecureData($datepicker);\r\n\t\t\t$this->picktime = $filter->SecureData($picktime);\r\n\t\t\t$this->fromAddress = $filter->SecureData($fromAddress);\r\n\t\t\t$this->toAddress = $filter->SecureData($toAddress);\r\n\t\t\t$this->passengers = $filter->SecureData($passengers);\r\n\t\t\t$this->luggage = $filter->SecureData($luggage);\r\n\t\t\t\r\n\t\t\t//checking customer type.\r\n\t\t\t//if cutomer checking out: set customer id inot database, otherwise it would be 0\r\n\t\t\t//if guest checkking out : set guest id into database, default valeu 0\r\n\t\t\t\r\n\t\t\tif($guestDbId != 0) {\r\n\t\t\t\t$this->car_guest_id = $guestDbId;\r\n\t\t\t\t} else {\r\n\t\t\t\t\t$this->car_guest_id = -1;\r\n\t\t\t\t\t}\r\n\t\t if($customerDbId != 0) {\r\n\t\t\t\t$this->cus_id = $customerDbId;\r\n\t\t\t\t} else {\r\n\t\t\t\t\t$this->cus_id = -1;\r\n\t\t\t\t\t}\r\n\t\t\t \r\n\t\t\t \r\n\t}", "private function prepareOrderDetailsConfirmationMailData($orderModel)\n {\n $details = Shopware()->Db()->fetchAll(\n 'SELECT * FROM s_order_details WHERE orderID = ?',\n [$orderModel->getId()]\n );\n\n //we need to fake a shop instance if we want to use the Articles Module\n $shop = Shopware()->Models()->getRepository('Shopware\\Models\\Shop\\Shop')->getActiveById($orderModel->getLanguageSubShop()->getId());\n $shop->registerResources(Shopware()->Bootstrap());\n\n foreach ($details as &$detail) {\n /** @var Shopware\\Models\\Article\\Repository $articleDetailRepository */\n $articleDetailRepository = Shopware()->Models()->getRepository('Shopware\\Models\\Article\\Detail');\n /** @var Shopware\\Models\\Article\\Detail[] $articleDetailModel */\n $articleDetailModel = $articleDetailRepository->findBy(['number' => $detail['articleordernumber']]);\n /** @var Shopware\\Models\\Article\\Detail $articleDetailModel */\n $articleDetailModel = $articleDetailModel[0];\n\n $detail['articlename'] = $detail['name'];\n unset($detail['name']);\n\n $detail['userID'] = $orderModel->getCustomer()->getId();\n\n $detail['ordernumber'] = $detail['articleordernumber'];\n unset($detail['articleordernumber']);\n\n $detail['currencyFactor'] = $orderModel->getCurrencyFactor();\n $detail['mainDetailId'] = $articleDetailModel->getArticle()->getMainDetail()->getId();\n $detail['articleDetailId'] = $articleDetailModel->getId();\n $detail['instock'] = $articleDetailModel->getInStock();\n\n $detail['taxID'] = $articleDetailModel->getArticle()->getTax()->getId();\n if ($orderModel->getNet()) {\n $detail['taxID'] = 0;\n }\n\n $detail['maxpurchase'] = $articleDetailModel->getMaxPurchase();\n $detail['minpurchase'] = $articleDetailModel->getMinPurchase();\n $detail['purchasesteps'] = $articleDetailModel->getPurchaseSteps();\n $detail['stockmin'] = $articleDetailModel->getStockMin();\n $detail['suppliernumber'] = $articleDetailModel->getSupplierNumber();\n $detail['laststock'] = $articleDetailModel->getArticle()->getLastStock();\n $detail['purchaseunit'] = $articleDetailModel->getPurchaseUnit();\n $detail['releasedate'] = $articleDetailModel->getReleaseDate();\n $detail['modus'] = $articleDetailModel->getArticle()->getMode();\n $detail['datum'] = $orderModel->getOrderTime()->format('Y-m-d H:i:s');\n $detail['esdarticle'] = $articleDetailModel->getEsd();\n $detail['netprice'] = $this->calculateNetPrice($detail['price'], $detail['tax_rate']);\n $detail['amount'] = $detail['price'] * $detail['quantity'];\n $detail['amountnet'] = $detail['netprice'] * $detail['quantity'];\n $detail['priceNumeric'] = $detail['price'];\n\n /**\n * order basket attributes fake\n */\n $detail['ob_attr1'] = '';\n $detail['ob_attr2'] = '';\n $detail['ob_attr3'] = '';\n $detail['ob_attr4'] = '';\n $detail['ob_attr5'] = '';\n $detail['ob_attr6'] = '';\n\n $detail['partnerID'] = '';\n $detail['shippinginfo'] = 1;\n\n if ($articleDetailModel->getUnit()) {\n $detail['unitID'] = $articleDetailModel->getUnit()->getId();\n }\n\n $detail['additional_details'] = Shopware()->Modules()->Articles()->sGetProductByOrdernumber($detail['ordernumber']);\n }\n\n return $details;\n }", "protected function _addPaymentDetailsElement($order)\n {\n $paymentDetailsElement = $order->addChild('paymentDetails');\n if (isset($this->paymentDetails['tokenCode'])) {\n $this->_addPaymentDetailsForTokenOrder($paymentDetailsElement);\n } else {\n $this->_addPaymentDetailsForCreditCardOrder($paymentDetailsElement);\n }\n $session = $paymentDetailsElement->addChild('session');\n $session['id'] = $this->paymentDetails['sessionId'];\n $session['shopperIPAddress'] = $this->paymentDetails['shopperIpAddress'];\n\n if ($this->paResponse) {\n $info3DSecure = $paymentDetailsElement->addChild('info3DSecure');\n $info3DSecure->addChild('paResponse', $this->paResponse);\n }\n }", "public function addBTDOrderParams(\n BTFContext $btfContext,\n ?DateTimeInterface $startDateTime = null,\n ?DateTimeInterface $endDateTime = null\n ): OrderDetailsBuilder {\n $xmlBTDOrderParams = $this->dom->createElement('BTDOrderParams');\n $this->instance->appendChild($xmlBTDOrderParams);\n\n // Add Service to BTDOrderParams.\n $xmlService = $this->dom->createElement('Service');\n $xmlBTDOrderParams->appendChild($xmlService);\n\n // Add ServiceName to Service.\n $xmlServiceName = $this->dom->createElement('ServiceName');\n $xmlServiceName->nodeValue = $btfContext->getServiceName();\n $xmlService->appendChild($xmlServiceName);\n\n // Add optional Scope to Service.\n if (null !== $btfContext->getScope()) {\n $xmlScope = $this->dom->createElement('Scope');\n $xmlScope->nodeValue = $btfContext->getScope();\n $xmlService->appendChild($xmlScope);\n }\n\n // Add optional ServiceOption to Service.\n if (null !== $btfContext->getServiceOption()) {\n $xmlServiceOption = $this->dom->createElement('ServiceOption');\n $xmlServiceOption->nodeValue = $btfContext->getServiceOption();\n $xmlService->appendChild($xmlServiceOption);\n }\n\n // Add optional ContainerFlag to Service.\n if (null !== $btfContext->getContainerFlag()) {\n $xmlContainerFlag = $this->dom->createElement('ContainerFlag');\n $xmlContainerFlag->nodeValue = $btfContext->getContainerFlag();\n $xmlService->appendChild($xmlContainerFlag);\n }\n\n // Add MsgName to Service.\n $xmlMsgName = $this->dom->createElement('MsgName');\n $xmlMsgName->nodeValue = $btfContext->getMsgName();\n $xmlService->appendChild($xmlMsgName);\n\n // Add optional MsgName version attribute\n if (null !== $btfContext->getMsgNameVersion()) {\n $xmlMsgName->setAttribute(\n 'version',\n $btfContext->getMsgNameVersion()\n );\n }\n\n // Add optional MsgName variant attribute\n if (null !== $btfContext->getMsgNameVariant()) {\n $xmlMsgName->setAttribute(\n 'variant',\n $btfContext->getMsgNameVariant()\n );\n }\n\n // Add optional MsgName format attribute\n if (null !== $btfContext->getMsgNameFormat()) {\n $xmlMsgName->setAttribute(\n 'format',\n $btfContext->getMsgNameFormat()\n );\n }\n\n if (null !== $startDateTime && null !== $endDateTime) {\n // Add DateRange to BTDOrderParams.\n $xmlDateRange = $this->createDateRange(\n $startDateTime,\n $endDateTime\n );\n $xmlBTDOrderParams->appendChild($xmlDateRange);\n }\n\n return $this;\n }", "public static function addPartyOrderRequest($poRequestParamDetails){\n $connection = Yii::app()->db;\n $sqlColumnNames = \"\";\n $sqlValues = \"\";\n $lastInsertedId = false;\n if(array_key_exists('partyorder_no', $poRequestParamDetails)){\n if($poRequestParamDetails['partyorder_no']!=''){\n $sqlColumnNames.=\" partyorder_no,\";\n $sqlValues.=\"'\".$poRequestParamDetails['partyorder_no'].\"',\";\n }\n }\n if(array_key_exists('user_sessionid', $poRequestParamDetails)){\n if($poRequestParamDetails['user_sessionid']!=''){\n $sqlColumnNames.=\" user_sessionid,\";\n $sqlValues.=\"'\".$poRequestParamDetails['user_sessionid'].\"',\";\n }\n }\n if(array_key_exists('user_id', $poRequestParamDetails)){\n if($poRequestParamDetails['user_id']!=''){\n $sqlColumnNames.=\" user_id,\";\n $sqlValues.=\"'\".$poRequestParamDetails['user_id'].\"',\";\n }\n }\n if(array_key_exists('occassion_title', $poRequestParamDetails)){\n if($poRequestParamDetails['occassion_title']!=''){\n $sqlColumnNames.=\" occassion_title,\";\n $sqlValues.=\"'\".$poRequestParamDetails['occassion_title'].\"',\";\n }\n }\n if(array_key_exists('nos_person', $poRequestParamDetails)){\n if($poRequestParamDetails['nos_person']!=''){\n $sqlColumnNames.=\" nos_person,\";\n $sqlValues.=\"'\".$poRequestParamDetails['nos_person'].\"',\";\n }\n }\n if(array_key_exists('party_date', $poRequestParamDetails)){\n if($poRequestParamDetails['party_date']!=''){\n $sqlColumnNames.=\" party_date,\";\n $sqlValues.=\"'\".$poRequestParamDetails['party_date'].\"',\";\n }\n }\n if(array_key_exists('party_venue', $poRequestParamDetails)){\n if($poRequestParamDetails['party_venue']!=''){\n $sqlColumnNames.=\" party_venue,\";\n $sqlValues.=\"'\".$poRequestParamDetails['party_venue'].\"',\";\n }\n }\n if(array_key_exists('party_requirements', $poRequestParamDetails)){\n if($poRequestParamDetails['party_requirements']!=''){\n $sqlColumnNames.=\" party_requirements,\";\n $sqlValues.=\"'\".$poRequestParamDetails['party_requirements'].\"',\";\n }\n }\n if(array_key_exists('file', $poRequestParamDetails)){\n if($poRequestParamDetails['file']!=''){\n $sqlColumnNames.=\" file,\";\n $sqlValues.=\"'\".$poRequestParamDetails['file'].\"',\";\n }\n }\n if(array_key_exists('created_by', $poRequestParamDetails)){\n if($poRequestParamDetails['created_by']!=''){\n $sqlColumnNames.=\" created_by,\";\n $sqlValues.=\"'\".$poRequestParamDetails['created_by'].\"',\";\n }\n }\n if(array_key_exists('status', $poRequestParamDetails)){\n if($poRequestParamDetails['status']!=''){\n $sqlColumnNames.=\" status,\";\n $sqlValues.=\"'\".$poRequestParamDetails['status'].\"',\";\n }\n }\n if($sqlValues!='' && $sqlColumnNames!=''){\n $poRequestParamDetails['created_datedtime'] = date('Y-m-d H:i:s');\n $sqlColumnNames.=\" created_datedtime,\";\n $sqlValues.=\"'\".$poRequestParamDetails['created_datedtime'].\"',\";\n $sqlQuery = \" INSERT INTO DK_PARTYORDERS_REQUEST \" .rtrim(\"(\".$sqlColumnNames, ',').\") \".rtrim(\" VALUES(\".$sqlValues, ',').\")\";\n $command = $connection->createCommand($sqlQuery);\n $result = $command->execute();\n if($result>=1){\n $lastInsertedId = $connection->getLastInsertID();\n }\n }\n return $lastInsertedId;\n }", "public function after_payment_method_details() {\n\n\t\t$key = isset( $_GET['order'] ) ? $_GET['order'] : '';\n\n\t\t$order = llms_get_order_by_key( $key );\n\t\tif ( ! $order ) {\n\t\t\treturn;\n\t\t} elseif ( 'paypal' !== $order->get( 'payment_gateway' ) ) {\n\t\t\tif ( ! isset( $_GET['confirm-switch'] ) || 'paypal' !== $_GET['confirm-switch'] ) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\n\t\t$req = new LLMS_PayPal_Request( $this );\n\t\t$r = $req->get_express_checkout_details( $_GET['token'] );\n\n\t\techo '<input name=\"llms_paypal_token\" type=\"hidden\" value=\"' . $_GET['token'] . '\">';\n\t\techo '<input name=\"llms_paypal_payer_id\" type=\"hidden\" value=\"' . $_GET['PayerID'] . '\">';\n\n\t\tif ( isset( $r['EMAIL'] ) ) {\n\t\t\techo '<div class=\"\"><span class=\"llms-label\">' . __( 'PayPal Email:', 'lifterlms-paypal' ) . '</span> ' . $r['EMAIL'] . '</div>';\n\t\t}\n\n\t}", "function processDokVers($dokVerskDetails) {\n\n\t\t$dokVersDAO->processDokVers($dokVerskDetails);\n\t}", "public function edit(OrderDetails $orderDetails)\n {\n //\n }", "public function extra_voor_verp()\n\t{\n\t}", "public function processVoucherAddRequest(Order $order, array $data);", "public static function addOrderpersondetails(Orderpersondetails $persondetails)\n {\n $persondetails_add_query = \"INSERT INTO TiffinHouseDb.Orderpersondetails (name,email,address,city,state,zip,shippingOption,paymentType,tax,totalPrice,paymentStatus,isCompleted)\n VALUES (:name,:email,:address,:city,:state,:zip,:shippingOption,:paymentType,:tax,:totalPrice,:paymentStatus,:isCompleted)\";\n try {\n self::$db->query($persondetails_add_query);\n self::$db->bind(':name', $persondetails->getName());\n self::$db->bind(':email', $persondetails->getEmail());\n self::$db->bind(':address', $persondetails->getAddress());\n self::$db->bind(':city', $persondetails->getCity());\n self::$db->bind(':state', $persondetails->getState());\n self::$db->bind(':zip', $persondetails->getZip());\n self::$db->bind(':shippingOption', $persondetails->getShippingOption());\n self::$db->bind(':paymentType', $persondetails->getPaymentType());\n self::$db->bind(':tax', $persondetails->getTax());\n self::$db->bind(':totalPrice', $persondetails->getTotalPrice());\n self::$db->bind(':paymentStatus', $persondetails->getPaymentStatus());\n self::$db->bind(':isCompleted', $persondetails->getIsCompleted());\n self::$db->execute();\n $orderId = self::$db->lastInsertedId();\n return $orderId;\n } catch (PDOException $err) {\n echo \"Error : \" . $err->getMessage();\n }\n }", "public static function addPartyOrderRequestLog($poRequestParamDetails){\n $connection = Yii::app()->db;\n $sqlColumnNames = \"\";\n $sqlValues = \"\";\n $lastInsertedId = false;\n if(array_key_exists('party_id', $poRequestParamDetails)){\n if($poRequestParamDetails['party_id']!=''){\n $sqlColumnNames.=\" party_id,\";\n $sqlValues.=\"'\".$poRequestParamDetails['party_id'].\"',\";\n }\n }\n if(array_key_exists('description', $poRequestParamDetails)){\n if($poRequestParamDetails['description']!=''){\n $sqlColumnNames.=\" description,\";\n $sqlValues.=\"'\".$poRequestParamDetails['description'].\"',\";\n }\n }\n if(array_key_exists('status', $poRequestParamDetails)){\n if($poRequestParamDetails['status']!=''){\n $sqlColumnNames.=\" status,\";\n $sqlValues.=\"'\".$poRequestParamDetails['status'].\"',\";\n }\n }\n if(array_key_exists('created_by', $poRequestParamDetails)){\n if($poRequestParamDetails['created_by']!=''){\n $sqlColumnNames.=\" created_by,\";\n $sqlValues.=\"'\".$poRequestParamDetails['created_by'].\"',\";\n $poRequestParamDetails['created_datedtime'] = date('Y-m-d H:i:s');\n $sqlColumnNames.=\" created_datedtime,\";\n $sqlValues.=\"'\".$poRequestParamDetails['created_datedtime'].\"',\";\n }\n }\n if($sqlValues!='' && $sqlColumnNames!=''){\n $sqlQuery = \" INSERT INTO DK_PARTYORDERS_REQUEST_LOG \" .rtrim(\"(\".$sqlColumnNames, ',').\") \".rtrim(\" VALUES(\".$sqlValues, ',').\")\";\n $command = $connection->createCommand($sqlQuery);\n $result = $command->execute();\n if($result>=1){\n $lastInsertedId = $connection->getLastInsertID();\n }\n }\n return $lastInsertedId;\n }", "public function insert_voucher_details(){\r\n\t\t\r\n\t\t$tblVoucherHead_data = array(\r\n\t\t\t\t//'intVoucherReferenceID' => 'Primary key Auto generate',\r\n\t\t\t\t'strVoucherReferenceNo' => '',\r\n\t\t\t\t'strVoucherHeadPrefix' => '',\r\n\t\t\t\t'dtVoucerHeadDate' => '',\r\n\t\t\t\t'strVoucherHeadAccountID' => '',\r\n\t\t\t\t'strVoucherHeadAgainstAccountID' => '',\r\n\t\t\t\t'strVoucherHeadBankName' => '',\r\n\t\t\t\t'strVoucherHeadBankDrawnBranch' => '',\r\n\t\t\t\t'tintVoucherHeadBankChequeType' => '',\r\n\t\t\t\t'strVoucherHeadBankChequeNumber' => '',\r\n\t\t\t\t'dtVoucherHeadBankChequeDate' => '',\r\n\t\t\t\t'strVoucherHeadNarration' => '',\r\n\t\t\t\t'intObjectID' => '',\r\n\t\t\t\t'strDatabaseName' => '',\r\n\t\t\t\t'intBranchID' => '',\r\n\t\t\t\t'strAction' => '',\r\n\t\t\t\t'strImportStatus' => '',\r\n\t\t\t\t'strMerchantID' => '',\r\n\r\n\t\t\t);\r\n\r\n\t\t$tblVoucherDetail_data = array(\r\n\t\t\t\t'intVoucherReferenceID' => '',\r\n\t\t\t\t'intVoucherReferenceDetailID' => '',\r\n\t\t\t\t'tintVoucherDetailEntryfor' => '',\r\n\t\t\t\t'intVoucherNewReferenceID' => '',\r\n\t\t\t\t'strVoucherDetailAccountID' => '',\r\n\t\t\t\t'strVoucherDetailAgainstAccountID' => '',\r\n\t\t\t\t'strVoucherDetailNarration' => '',\r\n\t\t\t\t'decVoucherDetailTotalAmt' => '',\r\n\t\t\t\t'strVoucherDetailTotalAmtType' => '',\r\n\t\t\t\t'decVoucherDetailTDSon' => '',\r\n\t\t\t);\r\n\t}", "public function view_order_details($order_id)\n\t{\n $log=new Log(\"OrderDetailsRCV.log\");\n $query = $this->db->query(\"SELECT oc_po_order.*,\".DB_PREFIX.\"user.firstname,\".DB_PREFIX.\"user.lastname\n\t\t\t\tFROM oc_po_order\n\t\t\t\t\tLEFT JOIN \".DB_PREFIX.\"user\n\t\t\t\t\t\tON \".DB_PREFIX.\"user.user_id = oc_po_order.user_id\n\t\t\t\t\t\t\tWHERE id = \" . $order_id . \" AND delete_bit = \" . 1);\n $log->write($query);\n $order_info = $query->row;\n\t\t//ON (oc_po_receive_details.product_id = oc_po_product.id)\n\t\t$query = $this->db->query(\"SELECT\n\t\toc_po_product.*,oc_po_receive_details.quantity as rd_quantity,oc_po_receive_details.price,oc_po_supplier.first_name,oc_po_supplier.last_name,oc_po_supplier.id as supplier_id,oc_po_receive_details.order_id\n\t\tFROM\n\t\t\toc_po_receive_details\n\t\tINNER JOIN oc_po_product \n\t\t\tON (oc_po_receive_details.order_id = oc_po_product.order_id)\n\t\tLEFT JOIN oc_po_supplier \n\t\t\tON (oc_po_receive_details.supplier_id = oc_po_supplier.id)\n\t\t\t\tWHERE (oc_po_receive_details.order_id =\".$order_id.\")\");\n $log->write($query);\n\tif($this->db->countAffected() > 0)\n\t{\n\t\t$products = $query->rows;\n\t\t$quantities = array();\n\t\t$all_quantities = array();\n\t\t$prices = array();\n\t\t$all_prices = array();\n\t\t$suppliers = array();\n\t\t$all_suppliers = array();\n\t\t$supplier_names = array();\n\t\t$all_supplier_names = array();\n\t\t$index = 0;\n\t\t$index1 = 0;\n\t\tfor($i =0; $i<count($products); $i++)\n\t\t{\n\t\t\tif($products[$i] != \"\")\n\t\t\t{\n\t\t\t\tfor($j = 0; $j<count($products); $j++)\n\t\t\t\t{\n\t\t\t\t\tif($products[$j] != \"\")\n\t\t\t\t\t{\n\t\t\t\t\t\tif($products[$i]['id'] == $products[$j]['id'])\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$quantities[$index] = $products[$j]['rd_quantity'];\n\t\t\t\t\t\t\t$supplier_names[$index] = $products[$j]['first_name'] .\" \". $products[$j]['last_name'];\n\t\t\t\t\t\t\t$suppliers[$index] = $products[$j]['supplier_id'];\n\t\t\t\t\t\t\t$prices[$index] = $products[$j]['price'];\n\t\t\t\t\t\t\tif($j!=$i)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$products[$j] = \"\";\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t$index++;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t$index = 0;\n\t\t\t\t$all_quantities[$index1] = $quantities;\n\t\t\t\t$all_suppliers[$index1] = $suppliers;\n\t\t\t\t$all_prices[$index1] = $prices;\n\t\t\t\t$all_supplier_names[$index1] = $supplier_names;\n\t\t\t\tunset($quantities);\n\t\t\t\tunset($suppliers);\n\t\t\t\tunset($prices);\n\t\t\t\tunset($supplier_names);\n\t\t\t\t$quantities = array();\n\t\t\t\t$suppliers = array();\n\t\t\t\t$prices = array();\n\t\t\t\t$supplier_names = array();\n\t\t\t\t$index1++;\n\t\t\t}\n\t\t}\n\t\t$products = array_values(array_filter($products));\n\t\tfor($i = 0; $i<count($products); $i++)\n\t\t{\n\t\t\tunset($products[$i]['rd_quantity']);\n\t\t\tunset($products[$i]['first_name']);\n\t\t\tunset($products[$i]['last_name']);\n\t\t\t$products[$i]['quantities'] = $all_quantities[$i];\n\t\t\t$products[$i]['suppliers'] = $all_suppliers[$i];\n\t\t\t$products[$i]['prices'] = $all_prices[$i];\n\t\t\t$products[$i]['supplier_names'] = $all_supplier_names[$i];\n\t\t}\n\t}\n\telse\n\t{\n\t\t$query = $this->db->query(\"SELECT * FROM oc_po_product WHERE order_id = \" . $order_info['id']);\n\t\t$products = $query->rows;\n\t}\n\t\t$i = 0;\n\t\tforeach($products as $product)\n\t\t{\n\t\t\t$query = $this->db->query(\"SELECT * FROM oc_po_attribute_group WHERE product_id = \". $product['id']);\n\t\t\t$attribute_groups[$i] = $query->rows;\n\t\t\t$i++;\n\t\t}\n\t\t\n\t\t$i = 0;\n\t\tforeach($attribute_groups as $attribute_group)\n\t\t{\n\t\t\tfor($j = 0; $j<count($attribute_group);$j++)\n\t\t\t{\n\t\t\t\t$query = $this->db->query(\"SELECT * FROM oc_po_attribute_category WHERE attribute_group_id = \". $attribute_group[$j]['id']);\n\t\t\t\t$attribute_categories[$i] = $query->row;\n\t\t\t\t$i++;\n\t\t\t}\n\t\t}\n\t\tfor($i=0;$i<count($products); $i++)\n\t\t{\n\t\t\tfor($j=0; $j<count($attribute_groups[$i]);$j++)\n\t\t\t{\n\t\t\t\t$products[$i]['attribute_groups'][$j] = $attribute_groups[$i][$j]['name'];\n\t\t\t}\n\t\t}\n\t\t$start_loop = 0;\n\t\t//$attribute_categories = array_values(array_filter($attribute_categories));\n\t\t//print_r($attribute_categories);\n\t\t//exit;\n\t\tfor($i=0; $i<count($products); $i++)\n\t\t{\n\t\t\tfor($j=$start_loop; $j<($start_loop + count($products[$i]['attribute_groups']));$j++)\n\t\t\t{\n\t\t\t\t$products[$i]['attribute_category'][$j] = $attribute_categories[$j]['name'];\n\t\t\t}\n\t\t\t$start_loop = $j;\n\t\t}\n\t\t$order_information['products'] = $products;\n\t\t$order_information['order_info'] = $order_info;\n\t\treturn $order_information;\n\t}", "function get_esewa_args( $order ) {\n\t\t\tglobal $woocommerce;\n\n\t\t\tif ( 'yes' === $this->debug ) {\n\t\t\t\t$this->log->add( 'esewa', 'Generating payment form for order ' . $order->get_order_number() );\n\t\t\t}\n\n\t\t\t$order_id = $order->id;\n\n\t\t\t$order_total = $order->get_total();\n\t\t\t$order_key = $order->id;\n\n\t\t\t$esewa_args['tAmt'] = $order_total;\n\t\t\t$esewa_args['amt'] = $order_total;\n\t\t\t$esewa_args['txAmt'] = 0;\n\t\t\t$esewa_args['psc'] = 0;\n\t\t\t$esewa_args['pdc'] = 0;\n\t\t\t$esewa_args['scd'] = $this -> merchant ;\n\t\t\t$esewa_args['pid'] = $order_key ;\n\t\t\t$esewa_args['su'] = str_replace( 'https:', 'http:', add_query_arg( 'wc-api', 'WC_Gateway_Esewa', home_url( '/' ) ) );\n\t\t\t$myaccount_page_id = get_option( 'woocommerce_myaccount_page_id' );\n\t\t\tif ( $myaccount_page_id ) {\n\t\t\t\t$myaccount_page_url = get_permalink( $myaccount_page_id );\n\t\t\t}\n\t\t\t$esewa_args['fu'] = esc_url( $myaccount_page_url );\n\n\t\t\t$esewa_args = apply_filters( 'woocommerce_esewa_args', $esewa_args );\n\n\t\t\treturn $esewa_args;\n\t\t}", "public function add_do_express_checkout_params( $token, $order, $args ) {\n\n\t\t$this->set_method( 'DoExpressCheckoutPayment' );\n\n\t\t// set base params.\n\t\t$this->add_parameters(\n\t\t\tarray(\n\t\t\t\t'TOKEN' => $token,\n\t\t\t\t'PAYERID' => $args['payer_id'],\n\t\t\t\t'BUTTONSOURCE' => 'WooThemes_Cart',\n\t\t\t\t'RETURNFMFDETAILS' => 1,\n\t\t\t)\n\t\t);\n\n\t\t$this->add_payment_params( $order, $args['step_id'], $args['payment_action'] );\n\t}", "public function specificInformation(Varien_Event_Observer $observer)\r\n {\r\n /** @var Mage_Sales_Model_Order_Payment $payment */\r\n $payment = $observer->getPayment();\r\n if ($payment && 0 === stripos($payment->getMethod(), 'cmpayments')) {\r\n $order = $payment->getOrder();\r\n if ($order) {\r\n /** @var Varien_Object $transport */\r\n $transport = $observer->getTransport();\r\n if (Mage::app()->getStore()->isAdmin()) {\r\n if ($order->getCmpaymentsChargeId()) {\r\n $transport->setData('CmPayments Charge Id', $order->getCmpaymentsChargeId());\r\n }\r\n } else {\r\n // Here it's possible to show extra info in \"My Orders\" in the frontend.\r\n }\r\n }\r\n }\r\n }", "public function ItemPriceOnDODetail($params)\n {\n return $this->deliveryOrderDetail::where($params)->get() == null ? false : $this->deliveryOrderDetail::where($params)->pluck(); \n }", "public function order_details_data($order_id)\n\t{\t\n\t\t$CI =& get_instance();\n\t\t$CI->auth->check_admin_auth();\n\t\t$CI->load->library('Lorder');\n\t\t$content = $CI->lorder->order_details_data($order_id);\t\n\t\t$this->template->full_admin_html_view($content);\n\t}", "private function setParams()\n {\n $this->params['MERCHANTNUMBER'] = $this->merchantNumber;\n $this->params['OPERATION'] = 'CREATE_ORDER';\n $this->params['ORDERNUMBER'] = $this->operation->getOrderNumber();\n $this->params['AMOUNT'] = $this->operation->getAmount();\n $this->params['CURRENCY'] = $this->operation->getCurrency();\n $this->params['DEPOSITFLAG'] = $this->depositFlag;\n if($this->operation->getMerOrderNum())\n $this->params['MERORDERNUM'] = $this->operation->getMerOrderNum();\n $this->params['URL'] = $this->url;\n\n if($this->operation->getDescription())\n $this->params['DESCRIPTION'] = $this->operation->getDescription();\n if($this->operation->getMd())\n $this->params['MD'] = $this->operation->getMd();\n\n }", "public function __construct($details, $rev, $name, $phone, $address, $coupon)\n {\n $this->details = $details;\n $this->rev = $rev;\n $this->name = $name;\n $this->phone = $phone;\n $this->address = $address;\n $this->coupon = $coupon;\n }", "public static function addReservationAddonDetails($reservationID, $arrAddon) {\n $arrInsertData = array();\n \n foreach($arrAddon as $prod_id => $qty) {\n if($qty > 0){\n $arrInsertData[] = array(\n 'reservation_id' => $reservationID,\n 'no_of_persons' => $qty,\n 'options_id' => $prod_id,\n 'option_type' => 'addon',\n 'reservation_type' => 'experience',\n 'created_at' => date('Y-m-d H:i:m'),\n 'updated_at' => date('Y-m-d H:i:m'),\n );\n }\n\n }\n \n //writing data to reservation_addons_variants_details table\n DB::table('reservation_addons_variants_details')->insert($arrInsertData);\n }", "public function getMyOrderDetails($orderID = 0, $orderNumber = false, $orderPass = false, $vmConf = true)\n {\n\n if (VmConfig::get('ordertracking', 'guests') == 'none' and !vmAccess::manager('orders')) {\n return false;\n }\n\n $virtuemart_order_id = vRequest::getInt('virtuemart_order_id', $orderID);\n $orderNumber = trim(vRequest::getString('order_number', $orderNumber));\n\n $sess = JFactory::getSession();\n if (empty($orderNumber)) $h = $virtuemart_order_id;\n else $h = $orderNumber;\n $tries = $sess->get('getOrderDetails.' . $h, 0);\n if ($tries > 6) {\n vmDebug('Too many tries, Invalid order_number/password ' . vmText::_('COM_VIRTUEMART_RESTRICTED_ACCESS'));\n vmError('Too many tries, Invalid order_number/password guest ' . $orderNumber . ' ' . $orderPass, 'COM_VIRTUEMART_RESTRICTED_ACCESS');\n return false;\n } else {\n $tries++;\n $sess->set('getOrderDetails.' . $h, $tries);\n }\n\n $_currentUser = JFactory::getUser();\n $cuid = $_currentUser->get('id');\n\n //Extra check, when a user is logged in, else we use the guest method\n if (!empty($cuid)) {\n if (!$virtuemart_order_id and $orderNumber) {\n $virtuemart_order_id = VirtueMartModelOrders::getOrderIdByOrderNumber($orderNumber);\n }\n if (!empty($virtuemart_order_id)) {\n $orderDetails = $this->getOrder($virtuemart_order_id);\n if ($orderDetails['details']['BT']->virtuemart_user_id == $cuid or vmAccess::manager('orders')) {\n $sess->set('getOrderDetails.' . $h, 0);\n return $orderDetails;\n }\n }\n } else if ($vmConf and VmConfig::get('ordertracking', 'guests') == 'registered' and empty($cuid)) {\n return true;\n }\n\n if (!empty($orderNumber)) {\n\n if ($vmConf and VmConfig::get('ordertracking', 'guests') != 'guestlink' and VmConfig::get('ordertracking', 'guests') != 'guests') {\n return false;\n }\n $orderPass = trim(vRequest::getString('order_pass', $orderPass));\n\n if (empty($orderPass)) {\n return false;\n } else {\n\n $orderId = $this->getOrderIdByOrderPass($orderNumber, $orderPass);\n if ($orderId) {\n\n if (!$vmConf or (VmConfig::get('ordertracking', 'guests') == 'guestlink' or vmAccess::manager('orders'))) {\n $sess->set('getOrderDetails.' . $h, 0);\n return $this->getOrder($orderId);\n } //Guest case\n else {\n $o = $this->getOrder($orderId);\n if (empty($o['details']['BT']->virtuemart_user_id)) {\n $sess->set('getOrderDetails.' . $h, 0);\n return $o;\n } else {\n return false;\n }\n }\n }\n }\n }\n\n return false;\n }", "protected function _addIsVirtual()\n {\n if ($this->_order->getIsVirtual() == '1') {\n $array = array('isVirtual' => 1);\n \n if (is_array($this->_vars)) {\n $this->_vars = array_merge($this->_vars, $array);\n } else {\n $this->_vars = $array;\n }\n } \n }", "public function view_order_details_mo($order_id)\n\t{\n $log=new Log(\"OrderDetailsRcvMo.log\");\n\t\t$query = $this->db->query(\"SELECT oc_po_order.*,\".DB_PREFIX.\"user.firstname,\".DB_PREFIX.\"user.lastname\n\t\t\t\tFROM oc_po_order\n\t\t\t\t\tLEFT JOIN \".DB_PREFIX.\"user\n\t\t\t\t\t\tON \".DB_PREFIX.\"user.user_id = oc_po_order.user_id\n\t\t\t\t\t\t\tWHERE id = \" . $order_id . \" AND delete_bit = \" . 1);\n $log->write($query);\n\t\t$order_info = $query->row;\n\t\t//ON (oc_po_receive_details.product_id = oc_po_product.id)\n $allprod=\"SELECT\n\t\toc_po_product.*,oc_po_receive_details.quantity as rd_quantity,oc_po_receive_details.price,oc_po_supplier.first_name,oc_po_supplier.last_name,oc_po_supplier.id as supplier_id,oc_po_receive_details.order_id\n\t\tFROM\n\t\t\toc_po_receive_details\n\t\tINNER JOIN oc_po_product \n\t\t\tON (oc_po_receive_details.order_id = oc_po_product.order_id)\n\t\tLEFT JOIN oc_po_supplier \n\t\t\tON (oc_po_receive_details.supplier_id = oc_po_supplier.id)\n\t\t\t\tWHERE oc_po_product.item_status <> 0 AND (oc_po_receive_details.order_id =\".$order_id.\")\";\n\t\t$log->write($allprod);\n $query = $this->db->query($allprod);\n \n $log->write($query);\n\tif($this->db->countAffected() > 0)\n\t{\n\t\t$products = $query->rows;\n\t\t$quantities = array();\n\t\t$all_quantities = array();\n\t\t$prices = array();\n\t\t$all_prices = array();\n\t\t$suppliers = array();\n\t\t$all_suppliers = array();\n\t\t$supplier_names = array();\n\t\t$all_supplier_names = array();\n\t\t$index = 0;\n\t\t$index1 = 0;\n\t\tfor($i =0; $i<count($products); $i++)\n\t\t{\n\t\t\tif($products[$i] != \"\")\n\t\t\t{\n\t\t\t\tfor($j = 0; $j<count($products); $j++)\n\t\t\t\t{\n\t\t\t\t\tif($products[$j] != \"\")\n\t\t\t\t\t{\n\t\t\t\t\t\tif($products[$i]['id'] == $products[$j]['id'])\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$quantities[$index] = $products[$j]['rd_quantity'];\n\t\t\t\t\t\t\t$supplier_names[$index] = $products[$j]['first_name'] .\" \". $products[$j]['last_name'];\n\t\t\t\t\t\t\t$suppliers[$index] = $products[$j]['supplier_id'];\n\t\t\t\t\t\t\t$prices[$index] = $products[$j]['price'];\n\t\t\t\t\t\t\tif($j!=$i)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$products[$j] = \"\";\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t$index++;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t$index = 0;\n\t\t\t\t$all_quantities[$index1] = $quantities;\n\t\t\t\t$all_suppliers[$index1] = $suppliers;\n\t\t\t\t$all_prices[$index1] = $prices;\n\t\t\t\t$all_supplier_names[$index1] = $supplier_names;\n\t\t\t\tunset($quantities);\n\t\t\t\tunset($suppliers);\n\t\t\t\tunset($prices);\n\t\t\t\tunset($supplier_names);\n\t\t\t\t$quantities = array();\n\t\t\t\t$suppliers = array();\n\t\t\t\t$prices = array();\n\t\t\t\t$supplier_names = array();\n\t\t\t\t$index1++;\n\t\t\t}\n\t\t}\n\t\t$products = array_values(array_filter($products));\n\t\tfor($i = 0; $i<count($products); $i++)\n\t\t{\n\t\t\tunset($products[$i]['rd_quantity']);\n\t\t\tunset($products[$i]['first_name']);\n\t\t\tunset($products[$i]['last_name']);\n\t\t\t$products[$i]['quantities'] = $all_quantities[$i];\n\t\t\t$products[$i]['suppliers'] = $all_suppliers[$i];\n\t\t\t$products[$i]['prices'] = $all_prices[$i];\n\t\t\t$products[$i]['supplier_names'] = $all_supplier_names[$i];\n\t\t}\n\t}\n\telse\n\t{\n\t\t$query = $this->db->query(\"SELECT * FROM oc_po_product WHERE order_id = \" . $order_info['id']);\n\t\t$products = $query->rows;\n\t}\n\t\t$i = 0;\n\t\tforeach($products as $product)\n\t\t{\n\t\t\t$query = $this->db->query(\"SELECT * FROM oc_po_attribute_group WHERE product_id = \". $product['id']);\n\t\t\t$attribute_groups[$i] = $query->rows;\n\t\t\t$i++;\n\t\t}\n\t\t\n\t\t$i = 0;\n\t\tforeach($attribute_groups as $attribute_group)\n\t\t{\n\t\t\tfor($j = 0; $j<count($attribute_group);$j++)\n\t\t\t{\n\t\t\t\t$query = $this->db->query(\"SELECT * FROM oc_po_attribute_category WHERE attribute_group_id = \". $attribute_group[$j]['id']);\n\t\t\t\t$attribute_categories[$i] = $query->row;\n\t\t\t\t$i++;\n\t\t\t}\n\t\t}\n\t\tfor($i=0;$i<count($products); $i++)\n\t\t{\n\t\t\tfor($j=0; $j<count($attribute_groups[$i]);$j++)\n\t\t\t{\n\t\t\t\t$products[$i]['attribute_groups'][$j] = $attribute_groups[$i][$j]['name'];\n\t\t\t}\n\t\t}\n\t\t$start_loop = 0;\n\t\t//$attribute_categories = array_values(array_filter($attribute_categories));\n\t\t//print_r($attribute_categories);\n\t\t//exit;\n\t\tfor($i=0; $i<count($products); $i++)\n\t\t{\n\t\t\tfor($j=$start_loop; $j<($start_loop + count($products[$i]['attribute_groups']));$j++)\n\t\t\t{\n\t\t\t\t$products[$i]['attribute_category'][$j] = $attribute_categories[$j]['name'];\n\t\t\t}\n\t\t\t$start_loop = $j;\n\t\t}\n\t\t$order_information['products'] = $products;\n\t\t$order_information['order_info'] = $order_info;\n\t\treturn $order_information;\n\t}", "public static function admin_order_add_custom_meta_data( $data, $wc_order )\n {\n $configs = OmnivaLt_Core::get_configs();\n $order = OmnivaLt_Wc_Order::get_data($wc_order->get_id(), array('omniva'));\n\n foreach ( $configs['method_params'] as $method_key => $method_values ) {\n if ( ! $method_values['is_shipping_method'] ) continue;\n if ( $order->omniva->method != $method_values['key'] ) continue;\n\n if ( $method_values['key'] == 'pt' || $method_values['key'] == 'ps' ) {\n $data['shipping_via'] = 'Omniva ' . strtolower($method_values['title']) . \": \" . OmnivaLt_Terminals::get_terminal_address($order->omniva->terminal_id);\n }\n }\n\n if ($order->omniva->method) {\n $shipping_settings = OmnivaLt_Core::get_settings();\n $omnivalt_labels = new OmnivaLt_Labels();\n\n $barcode = $order->omniva->barcodes[0];\n $country_code = $shipping_settings['shop_countrycode'];\n $data['omnivalt_tracking_link'] = $omnivalt_labels->get_tracking_link($country_code, $barcode, true);\n $data['omnivalt_barcode'] = $barcode;\n }\n\n return $data;\n }", "function wc_veruspay_display_crypto_address_in_admin( $order ) {\n\tglobal $wc_veruspay_global;\n\t$order_id = method_exists( $order, 'get_id' ) ? $order->get_id() : $order->id;\n\t$wc_veruspay_payment_method = $order->get_payment_method();\n\tif ( $wc_veruspay_payment_method == $wc_veruspay_global['id'] ){\n\t\t$wc_veruspay_order_status = get_post_meta( $order_id, '_wc_veruspay_status', TRUE );\n\t\tif ( $wc_veruspay_order_status == 'noaddress' ) {\n\t\t\tforeach ( $order->get_items() as $item_key => $item_values) { \n\t\t\t\t$wc_veruspay_stock = get_post_meta( $item_values['variation_id'], '_manage_stock', TRUE ); \n\t\t\t}\n\t\t\tupdate_post_meta( $order_id, '_wc_veruspay_status', sanitize_text_field( 'cancelled' ) );\n\t\t\t$order->update_status( 'cancelled', __( 'Missing Payment Address', 'woocommerce') );\n\t\t\theader(\"Refresh:0\");\n\t\t}\n\t\telse {\n\t\t\tif ( $order->has_status( 'processing' ) ) {\n\t\t\t\t$wc_veruspay_payment_status = 'Received';\n\t\t\t\t$wc_veruspay_price = get_post_meta( $order_id, '_wc_veruspay_paid', TRUE );\n\t\t\t}\n\t\t\telse {\n\t\t\t\t$wc_veruspay_payment_status = 'Pending'; \n\t\t\t\t$wc_veruspay_price = get_post_meta( $order_id, '_wc_veruspay_price', TRUE ); \n\t\t\t}\n\t\t\t$wc_veruspay_address = get_post_meta( $order_id, '_wc_veruspay_address', TRUE );\n\t\t\t$_chain_up = strtoupper( get_post_meta( $order_id, '_wc_veruspay_coin', TRUE ) );\n\t\t\t$_chain_lo = strtolower( $_chain_up );\n\t\t\techo '<style>.wc-order-totals-items{height:3rem!important}.wc-order-totals-items:after{content: \"' . $_chain_up . ' ' . $wc_veruspay_payment_status . ': ' . $wc_veruspay_price . '\"!important;position:relative;font-size:1rem;font-weight:bold;color:#007bff!important;top:0;float:right;width:200px;height:30px;}</style>';\n\t\t\techo '<p><strong>'.__( $_chain_up . ' Price', 'woocommerce' ).':</strong>' . $wc_veruspay_price . ' with exchange rate of ' . get_post_meta( $order_id, '_wc_veruspay_rate', TRUE ) . '</p>';\n\t\t\tif ( substr($wc_veruspay_address, 0, 2) !== 'zs' ) {\n\t\t\t\techo '<p><strong>'.__( $_chain_up . ' Address', 'woocommerce' ).':</strong> <a target=\"_BLANK\" href=\"' . $wc_veruspay_global['chain_dtls'][$_chain_lo]['address'] . $wc_veruspay_address . '\">' . $wc_veruspay_address . '</a></p>';\n\t\t\t}\n\t\t\telse {\n\t\t\t\techo '<p><strong>'.__( $_chain_up . ' Address', 'woocommerce' ).':</strong> '.$wc_veruspay_address.'</p';\n\t\t\t}\n\t\t}\n\t}\n}", "function getOrderPurchaseDetails($order_id)\n\t\t{\n\t\t\t//get order details\n\t\t\t$orders = $this->_BLL_obj->manage_content->getValue_where('order_info', '*', 'order_id', $order_id);\n\t\t\t$user_id = $orders[0]['user_id'];\n\t\t\t//get product details from order id\n\t\t\t$order_details = $this->_BLL_obj->manage_content->getValue_where('product_inventory_info', '*', 'order_id', $order_id);\n\t\t\tif(!empty($order_details[0]))\n\t\t\t{\n\t\t\t\t//total_overridng fee distributed\n\t\t\t\t$dis_over = 0;\n\t\t\t\t$user_level = 0;\n\t\t\t\t\n\t\t\t\tforeach($order_details as $order)\n\t\t\t\t{\n\t\t\t\t\t/* code for distribute overriding fee */\n\t\t\t\t\t//get transaction id for overriding fee\n\t\t\t\t\t$over_id = uniqid('trans');\n\t\t\t\t\t//calling overriding fee function\n\t\t\t\t\t$distributed_overriding = $this->distributeOverridingFee($user_id, $order['price'], $dis_over, $user_level, $over_id,$order_id);\n\t\t\t\t\tif($distributed_overriding != 0)\n\t\t\t\t\t{\n\t\t\t\t\t\t//insert values to fee transaction info table\n\t\t\t\t\t\t$insert_over = $this->_BLL_obj->manage_content->insertValue('fee_transaction_info', array('transaction_id','order_id','product_id','fee_type'), array($over_id,$order_id,$order['product_id'],'OF'));\n\t\t\t\t\t\t//new system value\n\t\t\t\t\t\t$new_system_value = $this->getSystemMoneyValue() - $distributed_overriding;\n\t\t\t\t\t\t//insert distributed amount to system money info\n\t\t\t\t\t\t$insert_dist_amount = $this->_BLL_obj->manage_content->insertValue('system_money_info', array('specification','debit','system_balance'), array($over_id,$distributed_overriding,$new_system_value));\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t/* code for personal commision calculation */\n\t\t\t\t\t//get transaction id for personal comm calculation\n\t\t\t\t\t$per_id = uniqid('trans');\n\t\t\t\t\t//calling personal commision function\n\t\t\t\t\t$per_comm = $this->calculatePersonalCommision($user_id, $order['price'], $per_id,$order_id);\n\t\t\t\t\t//checking for non empty personal commision\n\t\t\t\t\tif($per_comm != 0)\n\t\t\t\t\t{\n\t\t\t\t\t\t//insert values to fee transaction info table\n\t\t\t\t\t\t$insert_personal = $this->_BLL_obj->manage_content->insertValue('fee_transaction_info', array('transaction_id','order_id','product_id','fee_type'), array($per_id,$order_id,$order['product_id'],'PC'));\n\t\t\t\t\t\t//new system value\n\t\t\t\t\t\t$new_system_value_per = $this->getSystemMoneyValue() - $per_comm;\n\t\t\t\t\t\t//insert distributed amount to system money info\n\t\t\t\t\t\t$insert_per_amount = $this->_BLL_obj->manage_content->insertValue('system_money_info', array('specification','debit','system_balance'), array($per_id,$per_comm,$new_system_value_per));\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t/* code for point value calculation */\n\t\t\t\t\t//get transaction id for point value distribution\n\t\t\t\t\t$pv_id = uniqid('trans');\n\t\t\t\t\t//get product details\n\t\t\t\t\t$product_details = $this->_BLL_obj->manage_content->getValue_where('product_info', '*', 'product_id', $order['product_id']);\n\t\t\t\t\t//total point value\n\t\t\t\t\t$total_pv = $product_details[0]['point_value'] * $order['quantity'];\n\t\t\t\t\t//insert values to fee transaction info table\n\t\t\t\t\t$insert_point = $this->_BLL_obj->manage_content->insertValue('fee_transaction_info', array('transaction_id','order_id','product_id','fee_type'), array($pv_id,$order_id,$order['product_id'],'PV'));\n\t\t\t\t\t//insert pv to system\n\t\t\t\t\t$system_pv = $this->insertSystemPV($pv_id, $total_pv);\n\t\t\t\t\t//calling point value distributive function\n\t\t\t\t\t$this->distributePointValue($user_id, $total_pv, $pv_id, $order_id);\n\t\t\t\t\t\n\t\t\t\t\t/* code for member level upgradation of user and their parent */\n\t\t\t\t\t//calling fucntion for it\n\t\t\t\t\t$this->checkingLevelOfUserAndParent($user_id);\n\t\t\t\t}\n\t\t\t}\n\t\t}", "public function setOrderDetail(Order $orderDetail)\n {\n $this->orderDetail = $orderDetail;\n\n return $this;\n }", "public function addDescriptionParams()\n {\n $oBasket = $this->getBasket();\n $oConfig = $this->getPayPalConfig();\n $oRequest = $this->getPayPalRequest();\n\n // description\n $sShopNameFull = $oConfig->getBrandName();\n $sShopName = substr($sShopNameFull, 0, 70);\n if ($sShopNameFull != $sShopName) {\n $sShopName .= \"...\";\n }\n\n $sSubj = sprintf($this->getLang()->translateString(\"OEPAYPAL_ORDER_SUBJECT\"), $sShopName, $oBasket->getFPrice(), $oBasket->getBasketCurrency()->name);\n $oRequest->setParameter(\"PAYMENTREQUEST_0_DESC\", $sSubj);\n $oRequest->setParameter(\"PAYMENTREQUEST_0_CUSTOM\", $sSubj);\n }", "public function addAdditionalDataToAddress(Varien_Event_Observer $observer)\n {\n $event = $observer->getEvent();\n $address = $event['address'];\n $orderData = $address->getOrder()->getData();\n $address->setData(\n array_merge(\n $address->getData(),\n array(\n 'vat_id' => $orderData['customer_taxvat'],\n )\n ));\n }", "public function insertOrderDetails($value,$line_item, $mainOrderId)\n {\n //main order\n $order_list_arr['name'] = $value->name;\n $order_list_arr['shpoify_order_id'] = $value->id;\n $order_list_arr['line_item_id'] = $line_item->id;\n $order_list_arr['order_number'] = $value->order_number;\n $order_list_arr['customer_name'] = $value->billing_address->name;\n $order_list_arr['app_id'] = $value->app_id;\n $order_list_arr['checkout_id'] = $value->checkout_id;\n $order_list_arr['token'] = $value->token;\n $order_list_arr['gateway'] = $value->gateway;\n $order_list_arr['total_price'] = $value->total_price;\n $order_list_arr['subtotal_price'] = $value->subtotal_price;\n $order_list_arr['currency'] = $value->currency;\n $order_list_arr['cart_token'] = $value->cart_token;\n $order_list_arr['checkout_token'] = $value->checkout_token;\n $order_list_arr['order_status_url'] = $value->order_status_url;\n\n return OrderDetails::insertGetId($order_list_arr);\n\n }", "public function addPartyOrdersRequest($dkParamDataArr){\n $rspDetails = array();\n $rspDetails[\"poRequestedStatusDetails\"] = array();\n $rspDetails['poRequestedStatusDetails'][\"isPartyOrderRequestSend\"] = 'NO';\n $rspDetails['poRequestedStatusDetails'][\"partyOrderNo\"] = '';\n // check requested param data length\n if(count($dkParamDataArr)>0 && $dkParamDataArr!=false){\n // add party order request status\n $dkParamDataArr['status'] = 'R';\n // fetch user session data details\n $userSessionDetailsData = commonfunction :: getUserSessionDetails($dkParamDataArr);\n if(count($userSessionDetailsData)>0 && $userSessionDetailsData!=false){\n $dkParamDataArr['partyorder_no'] = commonfunction :: generatePartyOrderNo();\n $dkParamDataArr['user_id'] = $userSessionDetailsData['unmd5UserId'];\n $dkParamDataArr['created_by'] = $userSessionDetailsData['unmd5UserId'];\n $lastPORID = PartyOrdersDao::addPartyOrderRequest($dkParamDataArr);\n if($lastPORID>0 && $lastPORID!=false){\n $rspDetails['poRequestedStatusDetails'][\"isPartyOrderRequestSend\"] = 'YES';\n $rspDetails['poRequestedStatusDetails'][\"partyOrderNo\"] = $dkParamDataArr['partyorder_no'];\n // send sms to end user to inform about party order request recieve by desserts khazana\n // $retEmailSentStatus = commonfunction :: preparedDataSendingEmailAboutPartyOrdersRequestReceiveFromCustomer($dkParamDataArr);\n // $smsMsgBody = \"Sms Testing CJ\";\n // $retSmsSentStatus = utils :: sendSMS(array(\"9975967186\"), $smsMsgBody);\n } \n }\n } \n return $rspDetails;\n }", "public function __construct(Order $order)\n {\n $this->order = $order; \n $detail = OrderDetail::where('order_id', $this->order->id)->get();\n $this->detail = $detail;\n }", "public function createMovementFromOrderValidated(BcsOrder $p_ordOrder){\n $l_utUtility = new Utility();\n $this->g_omObjectManager = $l_utUtility->resetEntityManager($this->g_omObjectManager);\n $l_tdToday = new \\DateTime();\n $l_tmTypeMovementModel = new BcsTypeMovementModel($this->g_omObjectManager, $this->g_tiTranslator);\n $l_mvtMovementTypeExit = $l_tmTypeMovementModel->getTypeExitMovement();\n $l_mvtMovement = new BcsMovement();\n $l_mvtMovement = $this->generateCodeMovement('EXT', $l_mvtMovement);\n $l_mvtMovement->setMvtOrder($p_ordOrder);\n $l_mvtMovement->setMvtDate($l_tdToday);\n $l_mvtMovement->setMvtComment('Stock exit movement from order '.$p_ordOrder->getOrdCode());\n $l_mvtMovement->setMvtMovementType($l_mvtMovementTypeExit);\n try{\n $this->g_omObjectManager->persist($l_mvtMovement);\n $this->g_omObjectManager->flush();\n// var_dump($l_mvtMovement);die;\n } catch (\\Exception $e) {\n return $e->getMessage();\n }\n $l_odmOrderDetailModel = new BcsOrderDetailModel($this->g_omObjectManager, $this->g_tiTranslator);\n $l_arrOrderDetail = $l_odmOrderDetailModel->getOrderDetailByOrderId($p_ordOrder->getId());\n// $this->g_omObjectManager = $l_utUtility->resetEntityManager($this->g_omObjectManager);\n foreach ( $l_arrOrderDetail as $l_oddOrderDetail ) {\n $l_oddOrderDetail = $l_odmOrderDetailModel->parseOrderDetail($l_oddOrderDetail);\n $l_mvdMovementDetail = new BcsMovementDetail();\n $l_mvdMovementDetail->setMvdMovement($l_mvtMovement);\n $l_mvdMovementDetail->setMvdUnitOfMeasure($l_oddOrderDetail->getOddItem()->getItmUnitOfMeasure());\n $l_mvdMovementDetail->setMvdQuantity($l_oddOrderDetail->getOddQuantity());\n $l_mvdMovementDetail->setMvdItem($l_oddOrderDetail->getOddItem());\n //update reserved quantity\n $l_fReservedQuantity = $l_oddOrderDetail->getOddItem()->getItmReservedQuantity() + $l_oddOrderDetail->getOddQuantity();\n $l_oddOrderDetail->getOddItem()->setItmReservedQuantity($l_fReservedQuantity);\n //update available quantity\n $l_oddOrderDetail->getOddItem()->setItmAvailableQuantity($l_oddOrderDetail->getOddItem()->getItmStockQuantity() - $l_fReservedQuantity);\n //update activity item.. in order to avoid removal of the product\n $l_oddOrderDetail->getOddItem()->setItmIsInActivity(true);\n try{\n $this->g_omObjectManager->persist($l_mvdMovementDetail);\n $this->g_omObjectManager->flush();\n } catch (\\Exception $e) {\n return $e->getMessage();\n }\n unset($l_oddOrderDetail);\n }\n\n return $l_mvtMovement;\n }", "public static function geoCart_initSteps_addOtherDetails()\n {\n //Possible enhancement: perhaps show final fee table on other detail page?\n return false;\n }", "public function lstOrderDetail(){\n\t\t$Sql = \"SELECT \n\t\t\t\t\torder_detail_id,\n\t\t\t\t\torder_id,\n\t\t\t\t\tcustomer_id,\n\t\t\t\t\textra_feature_id,\n\t\t\t\t\tfeature_name,\n\t\t\t\t\tquantity,\n\t\t\t\t\tprice\n\t\t\t\tFROM\n\t\t\t\t\trs_tbl_order_details\n\t\t\t\tWHERE\n\t\t\t\t\t1=1\";\n\t\t\n\t\tif($this->isPropertySet(\"order_detail_id\", \"V\")){\n\t\t\t$Sql .= \" AND order_detail_id='\" . $this->getProperty(\"order_detail_id\") . \"'\";\n\t\t}\n\t\tif($this->isPropertySet(\"order_id\", \"V\")){\n\t\t\t$Sql .= \" AND order_id='\" . $this->getProperty(\"order_id\") . \"'\";\n\t\t}\n\t\tif($this->isPropertySet(\"customer_id\", \"V\")){\n\t\t\t$Sql .= \" AND customer_id=\" . $this->getProperty(\"customer_id\");\n\t\t}\n\t\tif($this->isPropertySet(\"extra_feature_id\", \"V\")){\n\t\t\t$Sql .= \" AND extra_feature_id='\" . $this->getProperty(\"extra_feature_id\") . \"'\";\n\t\t}\n\t\tif($this->isPropertySet(\"ORDERBY\", \"V\")){\n\t\t\t$Sql .= \" ORDER BY \" . $this->getProperty(\"ORDERBY\");\n\t\t}\n\t\t\n\t\tif($this->isPropertySet(\"limit\", \"V\"))\n\t\t\t$Sql .= $this->appendLimit($this->getProperty(\"limit\"));\n\t\treturn $this->dbQuery($Sql);\n\t}", "public function setPresenterDetails(?VirtualEventPresenterDetails $value): void {\n $this->getBackingStore()->set('presenterDetails', $value);\n }", "public function setExtraParams($params = array()) {\n $params['resulturl'] = $params['ipn_url'];\n $params['returnurl'] = $params['return_url'];\n $params['reference'] = $params['vendor_order_id'];\n $params['authemail'] = '';\n $params['id'] = $this->_gatewayInfo->config['integration_id'];\n $params['integration_key'] = $this->_gatewayInfo->config['integration_key'];\n $params['status'] = 'Message';\n return $params;\n }", "function __construct( $orderdetail_row, $download_now = 0 ){\n\t\t\n\t\t$this->mysqli = new ec_db( );\n\t\t\n\t\t$this->orderdetail_id = $orderdetail_row->orderdetail_id; \n\t\t$this->order_id = $orderdetail_row->order_id; \n\t\t$this->product_id = $orderdetail_row->product_id; \n\t\t$this->title = $orderdetail_row->title; \n\t\t$this->model_number = $orderdetail_row->model_number; \n\t\t$this->order_date = $orderdetail_row->order_date; \n\t\t$this->unit_price = $orderdetail_row->unit_price; \n\t\t$this->total_price = $orderdetail_row->total_price; \n\t\t$this->quantity = $orderdetail_row->quantity; \n\t\t$this->image1 = $orderdetail_row->image1; \n\t\t$this->optionitem_name_1 = $orderdetail_row->optionitem_name_1; \n\t\t$this->optionitem_name_2 = $orderdetail_row->optionitem_name_2; \n\t\t$this->optionitem_name_3 = $orderdetail_row->optionitem_name_3; \n\t\t$this->optionitem_name_4 = $orderdetail_row->optionitem_name_4; \n\t\t$this->optionitem_name_5 = $orderdetail_row->optionitem_name_5; \n\t\t$this->optionitem_label_1 = $orderdetail_row->optionitem_label_1; \n\t\t$this->optionitem_label_2 = $orderdetail_row->optionitem_label_2; \n\t\t$this->optionitem_label_3 = $orderdetail_row->optionitem_label_3; \n\t\t$this->optionitem_label_4 = $orderdetail_row->optionitem_label_4; \n\t\t$this->optionitem_label_5 = $orderdetail_row->optionitem_label_5; \n\t\t$this->optionitem_price_1 = $orderdetail_row->optionitem_price_1; \n\t\t$this->optionitem_price_2 = $orderdetail_row->optionitem_price_2; \n\t\t$this->optionitem_price_3 = $orderdetail_row->optionitem_price_3; \n\t\t$this->optionitem_price_4 = $orderdetail_row->optionitem_price_4; \n\t\t$this->optionitem_price_5 = $orderdetail_row->optionitem_price_5; \n\t\t$this->use_advanced_optionset = $orderdetail_row->use_advanced_optionset;\n\t\t$this->giftcard_id = $orderdetail_row->giftcard_id; \n\t\t$this->gift_card_message = $orderdetail_row->gift_card_message; \n\t\t$this->gift_card_from_name = $orderdetail_row->gift_card_from_name; \n\t\t$this->gift_card_to_name = $orderdetail_row->gift_card_to_name; \n\t\t$this->is_download = $orderdetail_row->is_download; \n\t\t$this->is_giftcard = $orderdetail_row->is_giftcard; \n\t\t$this->is_taxable = $orderdetail_row->is_taxable; \n\t\t$this->is_shippable = $orderdetail_row->is_shippable; \n\t\t$this->download_file_name = $orderdetail_row->download_file_name; \n\t\t$this->download_id = $orderdetail_row->download_key;\n\t\t$this->maximum_downloads_allowed = $orderdetail_row->maximum_downloads_allowed;\n\t\t$this->download_timelimit_seconds = $orderdetail_row->download_timelimit_seconds;\n\t\t$this->is_amazon_download = $orderdetail_row->is_amazon_download;\n\t\t$this->amazon_key = $orderdetail_row->amazon_key;\n\t\t$this->subscription_signup_fee = $orderdetail_row->subscription_signup_fee;\n\t\n\t\t$this->is_deconetwork = $orderdetail_row->is_deconetwork;\n\t\t$this->deconetwork_id = $orderdetail_row->deconetwork_id;\n\t\t$this->deconetwork_name = $orderdetail_row->deconetwork_name;\n\t\t$this->deconetwork_product_code = $orderdetail_row->deconetwork_product_code;\n\t\t$this->deconetwork_options = $orderdetail_row->deconetwork_options;\n\t\t$this->deconetwork_color_code = $orderdetail_row->deconetwork_color_code;\n\t\t$this->deconetwork_product_id = $orderdetail_row->deconetwork_product_id;\n\t\t$this->deconetwork_image_link = $orderdetail_row->deconetwork_image_link;\n\t\t\n\t\t$this->include_code = $orderdetail_row->include_code;\n\t\t\n\t\tif( isset( $GLOBALS['ec_hooks']['ec_extra_cartitem_vars'] ) ){\n\t\t\tfor( $i=0; $i<count( $GLOBALS['ec_hooks']['ec_extra_cartitem_vars'] ); $i++ ){\n\t\t\t\t$arr = $GLOBALS['ec_hooks']['ec_extra_cartitem_vars'][$i][0]( array( ), array( ) );\n\t\t\t\tfor( $j=0; $j<count( $arr ); $j++ ){\n\t\t\t\t\t$this->custom_vars[ $arr[$j] ] = $orderdetail_row->{$arr[$j]};\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\tif( $this->is_download ){\n\t\t\t$this->download = $this->mysqli->get_download( $this->download_id );\n\t\t\t$this->timecheck = date('U') - $this->download->date_created_timestamp;\n\t\t\t$this->download_count = $this->download->download_count;\n\t\t}\n\t\t\n\t\t$accountpageid = get_option('ec_option_accountpage');\n\t\t\n\t\tif( function_exists( 'icl_object_id' ) ){\n\t\t\t$accountpageid = icl_object_id( $accountpageid, 'page', true, ICL_LANGUAGE_CODE );\n\t\t}\n\t\t\n\t\t$this->account_page = get_permalink( $accountpageid );\n\t\t\n\t\tif( class_exists( \"WordPressHTTPS\" ) && isset( $_SERVER['HTTPS'] ) ){\n\t\t\t$https_class = new WordPressHTTPS( );\n\t\t\t$this->account_page = $https_class->makeUrlHttps( $this->account_page );\n\t\t}\n\t\t\n\t\tif( substr_count( $this->account_page, '?' ) )\t\t\t\t$this->permalink_divider = \"&\";\n\t\telse\t\t\t\t\t\t\t\t\t\t\t\t\t\t$this->permalink_divider = \"?\";\n\t\t\n\t\tif( isset( $_GET['orderdetail_id'] ) && $_GET['orderdetail_id'] == $this->orderdetail_id && \n\t\t\tisset( $_GET['download_id'] ) && $_GET['download_id'] == $this->download_id && \n\t\t\t$download_now ){\n\t\t\t\n\t\t\t$this->start_download( );\n\t\t\t\n\t\t}\n\t\t\n\t\t$customfield_data_array = explode( \"---\", $orderdetail_row->customfield_data );\n\t\tfor( $i=0; $i<count( $customfield_data_array ); $i++ ){\n\t\t\t$temp_arr = explode(\"***\", $customfield_data_array[$i]);\n\t\t\tarray_push($this->customfields, $temp_arr);\n\t\t}\n\t}", "function SetUpDetailParms() {\r\n\r\n\t\t// Get the keys for master table\r\n\t\tif (isset($_GET[EW_TABLE_SHOW_DETAIL])) {\r\n\t\t\t$sDetailTblVar = $_GET[EW_TABLE_SHOW_DETAIL];\r\n\t\t\t$this->setCurrentDetailTable($sDetailTblVar);\r\n\t\t} else {\r\n\t\t\t$sDetailTblVar = $this->getCurrentDetailTable();\r\n\t\t}\r\n\t\tif ($sDetailTblVar <> \"\") {\r\n\t\t\t$DetailTblVar = explode(\",\", $sDetailTblVar);\r\n\t\t\tif (in_array(\"observacion_tutor\", $DetailTblVar)) {\r\n\t\t\t\tif (!isset($GLOBALS[\"observacion_tutor_grid\"]))\r\n\t\t\t\t\t$GLOBALS[\"observacion_tutor_grid\"] = new cobservacion_tutor_grid;\r\n\t\t\t\tif ($GLOBALS[\"observacion_tutor_grid\"]->DetailView) {\r\n\t\t\t\t\t$GLOBALS[\"observacion_tutor_grid\"]->CurrentMode = \"view\";\r\n\r\n\t\t\t\t\t// Save current master table to detail table\r\n\t\t\t\t\t$GLOBALS[\"observacion_tutor_grid\"]->setCurrentMasterTable($this->TableVar);\r\n\t\t\t\t\t$GLOBALS[\"observacion_tutor_grid\"]->setStartRecordNumber(1);\r\n\t\t\t\t\t$GLOBALS[\"observacion_tutor_grid\"]->Dni_Tutor->FldIsDetailKey = TRUE;\r\n\t\t\t\t\t$GLOBALS[\"observacion_tutor_grid\"]->Dni_Tutor->CurrentValue = $this->Dni_Tutor->CurrentValue;\r\n\t\t\t\t\t$GLOBALS[\"observacion_tutor_grid\"]->Dni_Tutor->setSessionValue($GLOBALS[\"observacion_tutor_grid\"]->Dni_Tutor->CurrentValue);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}", "private function _serializeOrderDetail($record)\n {\n $order_details = new Order_Details();\n $order_details->Discount = $record['Discount'];\n $order_details->OrderID = $record['OrderID'];\n $order_details->ProductID = $record['ProductID'];\n $order_details->Quantity = $record['Quantity'];\n $order_details->UnitPrice = $record['UnitPrice'];\n return $order_details; \n }", "public function _construct(){\n $infoOrder = Mage::getSingleton('adminhtml/session')->getInfoOrder();\n if($infoOrder == null){\n $orderId = Mage::getSingleton('adminhtml/session')->getOrderViewDetail();\n } else {\n $orderId = $infoOrder['entity_id'];\n }\n if($orderId == null){\n $orderId = $this->getRequest('')->getParam('order_id');\n }\n $this->order = Mage::getModel('sales/order')->load($orderId);\n $this->_orderId = $orderId;\n }", "function wc_veruspay_add_order_column_header( $columns ) {\n $wc_veruspay_new_columns = array();\n foreach ( $columns as $column_name => $column_info ) {\n\t\t$wc_veruspay_new_columns[ $column_name ] = $column_info;\n\t\tif ( 'order_status' == $column_name ) {\n\t\t\t$wc_veruspay_new_columns['verus_addr'] = __( 'Crypto Address', 'veruspay-verus-gateway' );\n\t\t}\n if ( 'order_total' == $column_name ) {\n $wc_veruspay_new_columns['verus_total'] = __( 'Crypto Total', 'veruspay-verus-gateway' );\n }\n }\n return $wc_veruspay_new_columns;\n}", "function SetUpDetailParms() {\n\n\t\t// Get the keys for master table\n\t\tif (isset($_GET[EW_TABLE_SHOW_DETAIL])) {\n\t\t\t$sDetailTblVar = $_GET[EW_TABLE_SHOW_DETAIL];\n\t\t\t$this->setCurrentDetailTable($sDetailTblVar);\n\t\t} else {\n\t\t\t$sDetailTblVar = $this->getCurrentDetailTable();\n\t\t}\n\t\tif ($sDetailTblVar <> \"\") {\n\t\t\t$DetailTblVar = explode(\",\", $sDetailTblVar);\n\t\t\tif (in_array(\"jurnald\", $DetailTblVar)) {\n\t\t\t\tif (!isset($GLOBALS[\"jurnald_grid\"]))\n\t\t\t\t\t$GLOBALS[\"jurnald_grid\"] = new cjurnald_grid;\n\t\t\t\tif ($GLOBALS[\"jurnald_grid\"]->DetailAdd) {\n\t\t\t\t\tif ($this->CopyRecord)\n\t\t\t\t\t\t$GLOBALS[\"jurnald_grid\"]->CurrentMode = \"copy\";\n\t\t\t\t\telse\n\t\t\t\t\t\t$GLOBALS[\"jurnald_grid\"]->CurrentMode = \"add\";\n\t\t\t\t\t$GLOBALS[\"jurnald_grid\"]->CurrentAction = \"gridadd\";\n\n\t\t\t\t\t// Save current master table to detail table\n\t\t\t\t\t$GLOBALS[\"jurnald_grid\"]->setCurrentMasterTable($this->TableVar);\n\t\t\t\t\t$GLOBALS[\"jurnald_grid\"]->setStartRecordNumber(1);\n\t\t\t\t\t$GLOBALS[\"jurnald_grid\"]->jurnal_id->FldIsDetailKey = TRUE;\n\t\t\t\t\t$GLOBALS[\"jurnald_grid\"]->jurnal_id->CurrentValue = $this->id->CurrentValue;\n\t\t\t\t\t$GLOBALS[\"jurnald_grid\"]->jurnal_id->setSessionValue($GLOBALS[\"jurnald_grid\"]->jurnal_id->CurrentValue);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public function handleESDOrder($basketRow, $orderID, $orderDetailsID)\n {\n $quantity = $basketRow['quantity'];\n $basketRow['assignedSerials'] = [];\n\n // Check if current order number is an esd variant.\n $esdProduct = $this->getVariantEsd($basketRow['ordernumber']);\n\n if (!$esdProduct['id']) {\n return $basketRow;\n }\n\n if (!$esdProduct['serials']) {\n // No serial number is needed\n $this->db->insert('s_order_esd', [\n 'serialID' => 0,\n 'esdID' => $esdProduct['id'],\n 'userID' => $this->sUserData['additional']['user']['id'],\n 'orderID' => $orderID,\n 'orderdetailsID' => $orderDetailsID,\n 'datum' => new Zend_Db_Expr('NOW()'),\n ]);\n\n return $basketRow;\n }\n\n $availableSerials = $this->getAvailableSerialsOfEsd($esdProduct['id']);\n\n if ((count($availableSerials) <= $this->config->get('esdMinSerials')) || count($availableSerials) <= $quantity) {\n // Not enough serial numbers anymore, inform merchant\n $context = [\n 'sArticleName' => $basketRow['articlename'],\n 'sMail' => $this->sUserData['additional']['user']['email'],\n ];\n\n $mail = Shopware()->TemplateMail()->createMail('sNOSERIALS', $context);\n\n if ($this->config->get('sESDMAIL')) {\n $mail->addTo($this->config->get('sESDMAIL'));\n } else {\n $mail->addTo($this->config->get('sMAIL'));\n }\n\n $mail->send();\n }\n\n // Check if enough serials are available, if not, an email has been sent, and we can return\n if (count($availableSerials) < $quantity) {\n return $basketRow;\n }\n\n for ($i = 1; $i <= $quantity; ++$i) {\n // Assign serial number\n $serialId = $availableSerials[$i - 1]['id'];\n\n // Update basket row\n $basketRow['assignedSerials'][] = $availableSerials[$i - 1]['serialnumber'];\n\n $this->db->insert('s_order_esd', [\n 'serialID' => $serialId,\n 'esdID' => $esdProduct['id'],\n 'userID' => $this->sUserData['additional']['user']['id'],\n 'orderID' => $orderID,\n 'orderdetailsID' => $orderDetailsID,\n 'datum' => new Zend_Db_Expr('NOW()'),\n ]);\n }\n\n return $basketRow;\n }", "function setOrder(array $orderParams)\n {\n foreach ($orderParams as $row)\n {\n if (is_array($this->{$row['name']}))\n array_push($this->{$row['name']}, $row['value']);\n else\n $this->{$row['name']} = $row['value'];\n }\n }", "public function setDESCUENTO_PROVEEDOR($dESCUENTO_PROVEEDOR){\n $this->DESCUENTO_PROVEEDOR = $dESCUENTO_PROVEEDOR;\n }", "public function orderItem($param) { \n if (!$this->aaa->has_right('openruth', 500))\n $res->orderItemError->_value = 'authentication_error';\n else {\n $targets = $this->config->get_value('ruth', 'ztargets');\n $agencyId = self::strip_agency($param->agencyId->_value);\n if ($tgt = $targets[$agencyId]) {\n // build order\n $ord = &$order->Reservation->_value;\n $ord->LibraryNo->_value = $agencyId;\n $ord->BorrowerTicketNo->_value = $param->userId->_value;\n $ord->DisposalNote->_value = $param->orderNote->_value;\n $ord->LastUseDate->_value = self::to_zruth_date($param->orderLastInterestDate->_value);\n $ord->ServiceCounter->_value = $param->agencyCounter->_value;\n $ord->Override->_value = (self::xs_true($param->agencyCounter->_value) ? 'Y' : 'N');\n $ord->Priority->_value = $param->orderPriority->_value;\n // ?????? $ord->DisposalType->_value = $param->xxxx->_value;\n $itemIds = &$param->orderItemId;\n if (is_array($itemIds))\n foreach ($itemIds as $oid) {\n $mrid->ID->_value = $oid->_value->itemId->_value;\n if (!$mrid->TitlePartNo->_value = $oid->_value->itemSerialPartId->_value)\n $mrid->TitlePartNo->_value = 0;\n $ord->MRIDS->_value->MRID[]->_value = $mrid;\n }\n else {\n $mrid->ID->_value = $itemIds->_value->itemId->_value;\n if (!$mrid->TitlePartNo->_value = $itemIds->_value->itemSerialPartId->_value)\n $mrid->TitlePartNo->_value = 0;\n $ord->MRIDS->_value->MRID->_value = $mrid;\n }\n $xml = '<?xml version=\"1.0\" encoding=\"ISO-8859-1\" ?'.'>' . utf8_decode($this->objconvert->obj2xml($order));\n \n//print_r($ord);\n//print_r($xml);\n \n $z = new z3950();\n $z->set_target($tgt['host']);\n $z->set_database($tgt['database'].'-ophelia');\n $z->set_authentication($tgt['authentication']);\n if ($tgt['proxy']) {\n $z->set_proxy($tgt['proxy']);\n }\n $xml_ret = $z->z3950_xml_update($xml, $tgt['timeout']);\n if ($z->get_errno() == 0 && $xml_ret['xmlUpdateDoc']) {\n $dom = new DomDocument();\n $dom->preserveWhiteSpace = false;\n if ($dom->loadXML($xml_ret['xmlUpdateDoc'])) {\n if ($err = &$dom->getElementsByTagName('ErrorResponse')->item(0)) {\n verbose::log(ERROR, __FUNCTION__ . ' (' . __LINE__ . ') errno: ' . $err->getAttribute('Err') . \n ' error: ' . $err->nodeValue);\n $res->orderItemError->_value = 'unspecified error, order not possible';\n } else {\n // order at least partly ok \n foreach ($dom->getElementsByTagName('MRID') as $mrid) {\n unset($ir);\n $ir->orderItemId->_value->itemId->_value = $mrid->getAttribute('Id');\n if ($mrid->getAttribute('Tp'))\n $ir->orderItemId->_value->itemSerialPartId->_value = $mrid->getAttribute('Tp');\n if (!$mrid->nodeValue)\n $ir->orderItemOk->_value = 'true';\n elseif (!($ir->orderItemError->_value = $this->errs[$mrid->nodeValue])) \n $ir->orderItemError->_value = 'unknown error: ' . $mrid->nodeValue;\n $res->orderItem[]->_value = $ir;\n }\n }\n }\n } else {\n self::log_z_error(__FUNCTION__, __LINE__, $agencyId, $z->get_errno(), $z->get_error_string());\n $res->orderItemError->_value = 'system error';\n }\n//echo \"\\n\";\n//print_r($xml_ret);\n//print_r(\"\\nError: \" . $z->get_errno());\n } else\n $res->orderItemError->_value = 'unknown agencyId';\n }\n\n $ret->orderItemResponse->_value = $res;\n //var_dump($param); var_dump($res); die();\n return $ret;\n }", "public static function dump_order($order)\n {\n //$order = orm::factory(\"order\")->where(\"order_shopper_id\",$shopper_id)->where(\"id\",$order_id)->find();\n //die(print_r($order->as_array()));\n $data=$order->as_array();\n //$data[\"order_price_discount\"]=$order->order_total_with_vat-$order->order_voucher_discount;\n\n // doplnime nektera data, pripadne je zformatujeme\n $data[\"order_state\"]=$order->order_state->nazev;\n $data[\"order_timestamp\"]=strtotime($data[\"order_date\"]);\n $data[\"order_date\"]=date(\"d.m.Y H:i:s\",$data[\"order_timestamp\"]);\n \n // TODO datum splatnosti\n \n $order_state=orm::factory(\"order_state\",$data[\"order_state_id\"]);\n $data[\"order_status\"]=$order_state->popis;\n\n // doplneni dat o majiteli\n $owner=orm::factory(\"product_setting\",1);//$owner=orm::factory(\"owner\",1);\n $data[\"owner_firma\"]=$owner->billing_data_nazev;\n $data[\"owner_ulice\"]=$owner->billing_data_ulice;\n //$data[\"owner_cp\"]=$owner->cp;\n $data[\"owner_mesto\"]=$owner->billing_data_mesto;\n $data[\"owner_psc\"]=$owner->billing_data_psc;\n $data[\"owner_ic\"]=$owner->billing_data_ic;\n $data[\"owner_dic\"]=$owner->billing_data_dic;\n $data[\"owner_tel\"]=$owner->billing_data_telefon;\n $data[\"owner_fax\"]=$owner->billing_data_fax;\n \n $data[\"owner_email\"]=$owner->billing_data_email;\n $data[\"owner_banka\"]=$owner->billing_data_banka;\n $data[\"owner_iban\"]=$owner->billing_data_iban;\n $data[\"owner_cislo_uctu\"]=$owner->billing_data_cislo_uctu;\n $data[\"owner_konst_s\"]=$owner->billing_data_konst_s;\n $data[\"owner_spec_s\"]=$owner->billing_data_spec_s;\n $data[\"owner_swift\"]=$owner->billing_data_swift;\n $data[\"owner_due_date\"]=$owner->billing_data_due_date;\n $data[\"owner_www\"]=\"\";\n\n if($data[\"order_branch_email\"]){\n $data[\"order_branch_name\"]=$data[\"order_branch_name\"];\n $data[\"order_branch_street\"]=$data[\"order_branch_street\"];\n $data[\"order_branch_city\"]=$data[\"order_branch_city\"];\n $data[\"order_branch_zip\"]=$data[\"order_branch_zip\"];\n $data[\"order_branch_phone\"]=$data[\"order_branch_phone\"];\n $data[\"order_branch_email\"]=$data[\"order_branch_email\"];\n $data[\"no_delivery_address\"]=false;\n }\n else\n {\n // nebyla vyplnena dodaci adresa, vyplnime ji jako fakturacni\n $data[\"no_delivery_address\"]=true;\n }\n\n $shipping=$order->shipping;\n $data[\"order_shipping_id\"]=$shipping->id;\n $data[\"order_shipping_nazev\"]=$shipping->nazev;\n $data[\"order_shipping_descr\"]=$shipping->popis;\n // ceny jsou ulozeny v objednavce\n\n $payment=$order->payment;\n $data[\"order_payment_id\"]=$payment->id;\n $data[\"order_payment_nazev\"]=$payment->nazev;\n $data[\"order_payment_predem\"]=$payment->predem;\n // ceny jsou ulozeny v objednavce\n\n \n // seznam produktu v objednavce\n $order_products = $order->items->find_all();\n $x=0;\n foreach($order_products as $product){\n $data[\"products\"][$x]=$product->as_array();\n\n $x++;\n }\n \n $data[\"order_total_vat\"]=$data[\"order_total_with_vat\"] - $data[\"order_total_without_vat\"];\n \n //die(print_r($data));\n return $data;\n }", "public function hookNewOrder($params)\r\n {\r\n $carrier = new Carrier((int) $params['order']->id_carrier);\r\n $result = TipsaAdminComun::getTipsaCarriers(\"`id_reference` = \" . (int) $carrier->id_reference);\r\n\r\n if (!$result) {\r\n return false;\r\n }\r\n\r\n $tipo_servicio = $result['code'];\r\n\r\n $office = Db::getInstance()->getRow(\r\n \"SELECT * FROM `\" . _DB_PREFIX_ . \"tipsa_address`\r\n WHERE `id_cart` = \" . (int) $params['cart']->id . \" AND `id_carrier` = \" . (int) $params['order']->id_carrier\r\n );\r\n try {\r\n if ($tipo_servicio == $this->service_codes_yupick) {\r\n if ($office) {\r\n // get current customer address\r\n $address = new Address($params['order']->id_address_delivery);\r\n // Create a new address with the point location\r\n $address_point = new Address();\r\n //loop through address fields in case the shop has added custom or required fields\r\n foreach ($address as $name => $value) {\r\n if (!is_array($value) && !in_array($name, array('date_upd', 'date_add', 'id', 'country'))) {\r\n switch ($name) {\r\n case 'id_customer':\r\n $address_point->id_customer = $params['order']->id_customer;\r\n break;\r\n case 'address1':\r\n $address_point->address1 = $office['address'];\r\n break;\r\n case 'address2':\r\n $address_point->address2 = $office['firstname'];\r\n break;\r\n case 'postcode':\r\n $address_point->postcode = $office['postcode'];\r\n break;\r\n case 'city':\r\n $address_point->city = $office['city'];\r\n break;\r\n case 'alias':\r\n $address_point->alias = $office['alias'];\r\n break;\r\n case 'phone_mobile':\r\n if (!empty($office['phone_mobile'])) {\r\n $address_point->phone_mobile = $office['phone_mobile'];\r\n } else {\r\n $address_point->phone_mobile = \"0\";\r\n }\r\n break;\r\n case 'phone':\r\n $address_point->phone = $office['phone'] != '' ? $office['phone'] : \"0\";\r\n break;\r\n case 'deleted':\r\n $address_point->deleted = true;\r\n break;\r\n default:\r\n $address_point->$name = $value;\r\n }\r\n }\r\n }\r\n\r\n $address_point->save();\r\n if ($address_point->id) {\r\n $order = $params['order'];\r\n $order->id_address_delivery = $address_point->id;\r\n $order->update();\r\n }\r\n }\r\n }\r\n Db::getInstance()->update(\r\n 'tipsa_address',\r\n array('state' => 1, 'id_order' => (int) $params['order']->id),\r\n \"`state` = 0 AND `id_cart` = \" . (int) $params['cart']->id . \" AND `id_carrier` = \" . (int) $params['order']->id_carrier\r\n );\r\n } catch (Exception $e) {\r\n //In case of error, just do the most important\r\n return $e->message();\r\n }\r\n\r\n //Delete old quotes. Need to be in Days because Paypal or card payment validation can last some time\r\n Db::getInstance()->Execute(\r\n \"DELETE FROM \" . _DB_PREFIX_ . \"tipsa_address\r\n WHERE date < DATE_SUB(NOW(), INTERVAL 7 DAY) AND state = 0\"\r\n );\r\n }", "public static function save_order(Model_Order $order, Model_Shopper $shopper, $shopper_branch=array(), $additional_data=array())\n {\n \n ////////// zaznam do db\n \n // cislo zalohove faktury\n\t$order->order_code_invoice = Service_Order::_create_new_invoice_code($order->order_payment_id); \n \n\t$order->order_date \t =date(\"Y-m-d H:i:s\");\n\t$order->order_delivery_date =null; // zatim nepouzivat\n\t$order->order_date_tax \t =null; // zatim nepouzivat\n\t$order->order_date_payment =null; // zatim nepouzivat\n \n $order->order_state_id\t =0; // novy stav se nastavi nakonci teto metody\n \n // veskere vypocty cen se provadi v metode \"generate_order_prices\", v tomto okamziku je ma jiz objekt \"$order\" nasetovane (vyvolano v kontroleru)\n // ...\n \n // definitivne vyridime slevovy kupon \n \n if($order->order_voucher_id)\n {\n Service_Voucher::use_voucher($order->order_voucher_id);\n }\n \n $order->order_shopper_id =$shopper->id;\n\t$order->order_shopper_branch =isset($shopper_branch[\"branch_id\"])?$shopper_branch[\"branch_id\"]:null;;\n\t$order->order_shopper_name =$shopper->nazev;\n\t$order->order_shopper_code =$shopper->kod;\n\t$order->order_shopper_email =$shopper->email;\n\t$order->order_shopper_phone =$shopper->telefon;\n\t$order->order_shopper_ic =$shopper->ic;\n\t$order->order_shopper_dic =$shopper->dic;\n\t$order->order_shopper_street =$shopper->ulice;\n\t$order->order_shopper_city =$shopper->mesto;\n\t$order->order_shopper_zip =$shopper->psc;\n $order->order_shopper_note =!empty($additional_data[\"shopper_note\"])?$additional_data[\"shopper_note\"]:\"\";\n $order->order_shopper_custommer_code =!empty($additional_data[\"customer_order_code\"])?$additional_data[\"customer_order_code\"]:\"\";\n $order->gift_box_code =!empty($additional_data[\"gift_box_code\"])?$additional_data[\"gift_box_code\"]:\"\";\n\n // nacteme data pro zvolenou pobocku\n $order->order_branch_name =isset($shopper_branch[\"nazev\"])?$shopper_branch[\"nazev\"]:null;\n\t$order->order_branch_code =isset($shopper_branch[\"kod\"])?$shopper_branch[\"kod\"]:null;\n\t$order->order_branch_street =isset($shopper_branch[\"ulice\"])?$shopper_branch[\"ulice\"]:null;\n\t$order->order_branch_city =isset($shopper_branch[\"mesto\"])?$shopper_branch[\"mesto\"]:null;\n\t$order->order_branch_zip =isset($shopper_branch[\"psc\"])?$shopper_branch[\"psc\"]:null;\n\t$order->order_branch_phone =isset($shopper_branch[\"telefon\"])?$shopper_branch[\"telefon\"]:null;\n\t$order->order_branch_email =isset($shopper_branch[\"email\"])?$shopper_branch[\"email\"]:null;\n\n $order->last_modified =date(\"Y-m-d H:i:s\");\n \n if($order->order_total_with_vat==0) die(\"chyba, objednávka neobsahuje žádné zboží!\");\n \n $order_id=$order->save()->id;\n \n \n // nyni vim id vlozeneho zaznamu - muzu doplnit kod objednavky shopper_id-order_id (000000-000000)\n $order->order_code = Service_Order::_create_new_order_code($shopper->kod, $order_id);\n $order->save();\n\n $cart_data=$order->get_cart()->get_cart_products(); // ziskam zbozi z kosiku pridruzeneho k objednavce\n \n foreach($cart_data as $item){\n // $key = product_id\n\n $order_item=orm::factory(\"order_item\");\n // naplneni order itemu\n $order_item->code =$item[\"code\"];\n $order_item->nazev =$item[\"nazev\"];\n //$order_item->varianta_popis =$item[\"varianta\"][\"barva_velikost\"];\n //$order_item->varianta_id =$item[\"varianta\"][\"id\"];\n $order_item->jednotka =$item[\"jednotka\"];\n $order_item->hmotnost =$item[\"hmotnost\"];\n $order_item->pocet_na_sklade =$item[\"pocet_na_sklade\"];\n $order_item->min_order_quantity =$item[\"min_order_quantity\"];\n $order_item->tax_code =$item[\"tax_code\"];\n $order_item->order_id =$order_id;\n $order_item->product_id =$item[\"id\"];\n $order_item->units =$item[\"mnozstvi\"];\n $order_item->price_without_tax =$item[\"cena_bez_dph\"];\n $order_item->price_with_tax =$item[\"cena_s_dph\"];\n $order_item->total_price_with_tax =$item[\"cena_celkem_s_dph\"];\n $order_item->item_change =null;\n $order_item->total_weight =$item[\"hmotnost\"] * $item[\"mnozstvi\"];\n\n $order_item->save();\n }\n \n // nastavim priznak objednavky - pri prvnim ulozeni nebudu posilat mail se zmenou stavu\n Service_Order::set_order_state($order, \"new\", false);\n \n return $order;\n }", "public function Order_Details()\n {\n $this->_Order_Details->ClearAllOptions();\n return $this->_Order_Details;\n }", "public function validateDetails($attribute,$params)\n {\n if (count($this->orderDetails) == 0) {\n $this->addError('orderDetails', 'Order Details need to be entered');\n }\n }", "public static function set_order_data( $order ) {\n\t\t$order->update_meta_data( '_billing_vat_number', self::$data['vat_number'] );\n\t\t$order->update_meta_data( '_vat_number_is_validated', ! is_null( self::$data['validation']['valid'] ) ? 'true' : 'false' );\n\t\t$order->update_meta_data( '_vat_number_is_valid', true === self::$data['validation']['valid'] ? 'true' : 'false' );\n\n\t\tif ( false !== self::get_ip_country() ) {\n\t\t\t$order->update_meta_data( '_customer_ip_country', self::get_ip_country() );\n\t\t\t$order->update_meta_data( '_customer_self_declared_country', ! empty( $_POST['location_confirmation'] ) ? 'true' : 'false' );\n\t\t}\n\t}", "protected function getCommonOrderValues($order) \n {\n $shippingAddress = !$order->getIsVirtual() ? $order->getShippingAddress() : null;\n\t\t//$shippingAddress=$order->getShippingAddress();\n\t\t$invoices = Mage::getResourceModel('sales/order_invoice_collection')\n ->setOrderFilter($order->getId())\n ->load();\n\n\t\t$invoices_data = $invoices->getData();\n\n\t\tif(!empty($invoices_data)){\n\t\t\n\t\t foreach($invoices as $invoice){\n\t\t $transactionNo = $this->getTransactionNo($invoice);\n\t\t \n\t\t }\n\t\t }else{\n\t\t $transactionNo =''; \n\t\t }\t\t\n\t\t\n\t\t\n\t\t$billingId = $order->getBillingAddress()->getId();\n\t\t$address = Mage::getModel('sales/order_address')->load($billingId);\n\n\t\t$data = Mage::getModel('customer/address')->load($address->getData('customer_address_id'));\n\t\t$billing_landmark = $data['landmark'];\n\t\t$billing_landline = $data['telephonetwo'];\n\t\t\n\t\t$shippingData = $order->getShippingAddress();\n\t\t$datanew = $shippingData->getData();\n\t\t\n\t\tif( empty($datanew['customer_address_id']) && $datanew['customer_address_id'] !== \"NULL\" ){\n\t\t\t$shippingData = $order->getBillingAddress();\n\t\t\t$address = Mage::getModel('customer/address')->load($shippingData->getData('customer_address_id'));\n\t\t\t$shipping_landmark =$address->getData('landmark') ;\n\t\t\t$shipping_landline =$address->getData('telephonetwo');\n\t\t\n\t\t}else{\n\t\t\t$shippingId = $order->getShippingAddress()->getId();\n\t\t\t$address = Mage::getModel('sales/order_address')->load($shippingId);\n\t\t\t$data = Mage::getModel('customer/address')->load($address->getData('customer_address_id'));\n\t\t\t$shipping_landmark = $data['landmark'];\n\t\t\t$shipping_landline = $data['telephonetwo'];\n\t\t}\n\t\t\n\t\t\n\t\t/*\n\t\t$shippingId = $order->getShippingAddress()->getId();\n\t\t$address = Mage::getModel('sales/order_address')->load($shippingId);\n\t\t$data = Mage::getModel('customer/address')->load($address->getData('customer_address_id'));\n\t\t$shipping_landmark = $data['landmark'];\n\t\t$shipping_landline = $data['telephonetwo'];*/\n\t\t// echo '<pre>';\n\t\t// print_r($order->getPayment()->getMethodInstance()->getCode());\n\t\t// exit;\n $billingAddress = $order->getBillingAddress();\n\t\t$billAddress= $billingAddress->getName().\" \".\n $billingAddress->getData(\"company\").\" \".\n $billingAddress->getData(\"street\").\" \".\n $billingAddress->getData(\"postcode\").\" \".\n $billingAddress->getData(\"city\").\" \".\n $billingAddress->getRegionCode().\" \".\n $billingAddress->getRegion().\" \".\n $billingAddress->getCountry().\" \".\n $billingAddress->getCountryModel()->getName().\" \".\n $billingAddress->getData(\"telephone\");\n $shipAddress= $shippingAddress->getName().\" \".\n $shippingAddress->getData(\"company\").\" \".\n $shippingAddress->getData(\"street\").\" \".\n $shippingAddress->getData(\"postcode\").\" \".\n $shippingAddress->getData(\"city\").\" \".\n $shippingAddress->getRegionCode().\" \".\n $shippingAddress->getRegion().\" \".\n $shippingAddress->getCountry().\" \".\n $shippingAddress->getCountryModel()->getName().\" \".\n $shippingAddress->getData(\"telephone\");\n\t\t$country_name=Mage::app()->getLocale()->getCountryTranslation($shippingAddress->getCountry());\n\t\t\n\t\t$CustomerEmail = $shippingAddress->getEmail();\n\t\tif($CustomerEmail == '')\n\t\t{\n\t\t\t$CustomerEmail = $billingAddress->getEmail();\n\t\t\tif($CustomerEmail==''){\n\t\t\t\t\n\t\t\t\t$customerData = Mage::getModel('customer/customer')->load($billingAddress->getData('customer_id'))->getData();\n\t\t\t\t$CustomerEmail = $customerData['email'];\n\t\t\t}\n\t\t}\n\t\t\t$zone='';\n\t\t\n\t\t\n return array(\n\t\t\t$order->getRealOrderId(),\n\t\t\tMage::helper('core')->formatDate($order->getCreatedAt(), 'medium', false),\n\t\t\t//date(\"M.y\", strtotime(Mage::helper('core')->formatDate($order->getCreatedAt(), 'medium', 'false'))),\n\t\t/*\t$transactionNo,*/\n /* Mage::helper('core')->formatDate($order->getCreatedAt(), 'medium', true),\n $billingAddress->getName(), */\n\t\t\t//$CustomerEmail,\n\t\t\t$billingAddress ? $billingAddress->getName() : '',\n\t\t\t$shippingAddress ? $shippingAddress->getName() : '',\n\t\t\t$billingAddress->getData(\"city\"),\n\t\t\t$zone,\n\t\t\t$billingAddress->getRegion(),\n\t\t\t$shippingAddress->getData(\"postcode\"),\n\t\t\t$this->getPaymentMethod($order),\n\t\t//\t$order->getPayment()->getMethodInstance()->getCode(),\n\t\t\t$order->getStatus(),\n /* $billAddress,\n $billingAddress->getData(\"city\"),\n $billingAddress->getRegion(),\n $billingAddress->getRegion(),\n\t\t\t$billingAddress->getData(\"postcode\"),\n\t\t\t$billing_landmark,\n\t\t\t$billing_landline, */\n\t\t\t//$shipAddress,\n\t\t\t//$shippingAddress->getData(\"city\"),\n\t\t\t//$shippingAddress->getRegion(),\n\t\t\t//$country_name,\t\t\t\n\t\t//\t$shippingAddress->getData(\"telephone\"),\n\t\t\t/*$shipping_landmark,\n\t\t\t$shipping_landline, */\n /* $this->getPaymentMethod($order),\n $this->getPaymentMethod($order), */\n /*$this->getTotalQtyItemsOrdered($order),*/\n /* $order->getStatus(),*/\n \n );\n }", "private function create_order_record($id_order) {\n $aux['details'] = $this->m_orders_overview->get_details($id_order);\n\n $record['id_order'] = null; // auto-increment\n $record['id_menu_order'] = $id_order;\n $record['id_table'] = $aux['details'][0]->id_table;\n $record['id_count_ks'] = $aux['details'][0]->id_count_ks;\n $record['date_pay'] = date(\"Y-m-d\");\n\n $record['id_employee'] = $aux['details'][0]->id_employee;\n $record['pay_method'] = 'hotovost';\n $record['sum_price'] = $aux['details'][0]->price;\n $record['is_closed'] = 0;\n\n $this->m_orders_overview->insert_new_order_record($record);\n }", "public function addOrder($ord) {\n $this->sql .= \" ORDER BY $ord\";\n }", "public function getGuestOrderData($orderId)\n {\n\t\t$guestOrderData = [];\n\t\t$searchCriteriaForGuestOrder = $this->_searchCriteriaBuilder\n\t\t\t\t\t\t\t\t\t\t\t->addFilter('increment_id', $orderId, 'eq')\n\t\t\t\t\t\t\t\t\t\t\t->addFilter('customer_is_guest', '1')\n\t\t\t\t\t\t\t\t\t\t\t->create();\n\t\t$orderList = $this->_orderRepository->getList($searchCriteriaForGuestOrder);\n\t\t\n\t\tif ($orderList->getSize()) {\n\t\t\tforeach($orderList->getData() as $orderdata){\n\t\t\t\t$guestOrderData['order_id'] = $orderdata['entity_id'];\n\t\t\t\t$guestOrderData['order_status'] = $orderdata['status'];\n\t\t\t\t$guestOrderData['total'] = $orderdata['grand_total'];\n\t\t\t}\n\t\t\t\t\n\t\t\tif (isset($guestOrderData['order_id']) && $guestOrderData['order_id']) {\n\t\t\t\t$searchCriteriaForOrderItem = $this->_searchCriteriaBuilder\n\t\t\t\t\t\t\t\t\t\t\t\t\t->addFilter('order_id', $guestOrderData['order_id'], 'eq')\n\t\t\t\t\t\t\t\t\t\t\t\t\t->create();\n\t\t\t\t$orderItemList = $this->_orderItemRepository->getList($searchCriteriaForOrderItem);\n\t\t\t\t$items = 1;\n\t\t\t\tforeach($orderItemList as $itemdata){\n\t\t\t\t\t$guestOrderData['items'][$items]['sku'] = $itemdata['sku'];\n\t\t\t\t\t$guestOrderData['items'][$items]['item_id'] = $itemdata['item_id'];\n\t\t\t\t\t$guestOrderData['items'][$items]['price'] = $itemdata['price'];\n\t\t\t\t\t$items++;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn $guestOrderData;\n }", "function SetUpDetailParms() {\n\n\t\t// Get the keys for master table\n\t\tif (isset($_GET[EW_TABLE_SHOW_DETAIL])) {\n\t\t\t$sDetailTblVar = $_GET[EW_TABLE_SHOW_DETAIL];\n\t\t\t$this->setCurrentDetailTable($sDetailTblVar);\n\t\t} else {\n\t\t\t$sDetailTblVar = $this->getCurrentDetailTable();\n\t\t}\n\t\tif ($sDetailTblVar <> \"\") {\n\t\t\t$DetailTblVar = explode(\",\", $sDetailTblVar);\n\t\t\tif (in_array(\"a_purchases\", $DetailTblVar)) {\n\t\t\t\tif (!isset($GLOBALS[\"a_purchases_grid\"]))\n\t\t\t\t\t$GLOBALS[\"a_purchases_grid\"] = new ca_purchases_grid;\n\t\t\t\tif ($GLOBALS[\"a_purchases_grid\"]->DetailEdit) {\n\t\t\t\t\t$GLOBALS[\"a_purchases_grid\"]->CurrentMode = \"edit\";\n\t\t\t\t\t$GLOBALS[\"a_purchases_grid\"]->CurrentAction = \"gridedit\";\n\n\t\t\t\t\t// Save current master table to detail table\n\t\t\t\t\t$GLOBALS[\"a_purchases_grid\"]->setCurrentMasterTable($this->TableVar);\n\t\t\t\t\t$GLOBALS[\"a_purchases_grid\"]->setStartRecordNumber(1);\n\t\t\t\t\t$GLOBALS[\"a_purchases_grid\"]->Supplier_ID->FldIsDetailKey = TRUE;\n\t\t\t\t\t$GLOBALS[\"a_purchases_grid\"]->Supplier_ID->CurrentValue = $this->Supplier_Number->CurrentValue;\n\t\t\t\t\t$GLOBALS[\"a_purchases_grid\"]->Supplier_ID->setSessionValue($GLOBALS[\"a_purchases_grid\"]->Supplier_ID->CurrentValue);\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (in_array(\"a_stock_items\", $DetailTblVar)) {\n\t\t\t\tif (!isset($GLOBALS[\"a_stock_items_grid\"]))\n\t\t\t\t\t$GLOBALS[\"a_stock_items_grid\"] = new ca_stock_items_grid;\n\t\t\t\tif ($GLOBALS[\"a_stock_items_grid\"]->DetailEdit) {\n\t\t\t\t\t$GLOBALS[\"a_stock_items_grid\"]->CurrentMode = \"edit\";\n\t\t\t\t\t$GLOBALS[\"a_stock_items_grid\"]->CurrentAction = \"gridedit\";\n\n\t\t\t\t\t// Save current master table to detail table\n\t\t\t\t\t$GLOBALS[\"a_stock_items_grid\"]->setCurrentMasterTable($this->TableVar);\n\t\t\t\t\t$GLOBALS[\"a_stock_items_grid\"]->setStartRecordNumber(1);\n\t\t\t\t\t$GLOBALS[\"a_stock_items_grid\"]->Supplier_Number->FldIsDetailKey = TRUE;\n\t\t\t\t\t$GLOBALS[\"a_stock_items_grid\"]->Supplier_Number->CurrentValue = $this->Supplier_Number->CurrentValue;\n\t\t\t\t\t$GLOBALS[\"a_stock_items_grid\"]->Supplier_Number->setSessionValue($GLOBALS[\"a_stock_items_grid\"]->Supplier_Number->CurrentValue);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public function initOrderDetail(&$orderItem, $item) {\n $payMethod = array('pm_id' => '',\n 'title' => $item['payment_method'],\n 'description' => '');\n\n $orderItem = array('order_id' => $item['order_id'],\n 'display_id' => $item['order_id'], //show id\n 'uname' => $item['shipping_firstname'] . ' ' . $item['shipping_lastname'],\n 'currency' => $item['currency_code'],\n 'shipping_address' => array(),\n 'billing_address' => array(),\n 'payment_method' => $payMethod,\n 'shipping_insurance' => '',\n 'coupon' => $item['coupon_id'],\n 'order_status' => array(),\n 'last_status_id' => $item['order_status_id'], //get current status from history\n 'order_tax' => $item['fax'],\n 'order_date_start' => $item['date_added'],\n 'order_date_finish' => '',\n 'order_date_purchased' => $item['date_modified']);\n }", "private function _addDynamic3DSElement($order)\n {\n if (! $this->threeDSecureConfig->isDynamic3DEnabled()) {\n return;\n }\n\n $threeDSElement = $order->addChild('dynamic3DS');\n if ($this->threeDSecureConfig->is3DSecureCheckEnabled()) {\n $threeDSElement['overrideAdvice'] = self::DYNAMIC3DS_DO3DS;\n } else {\n $threeDSElement['overrideAdvice'] = self::DYNAMIC3DS_NO3DS;\n }\n }", "function charge_v2_vtweb_payment( $order_id )\n {\n global $woocommerce;\n $order_items = array();\n\n $order = new WC_Order( $order_id ); \n $veritrans = new Veritrans();\n\n $veritrans->api_version = 2;\n $veritrans->environment = ($this->environment == 'production' ? Veritrans::ENVIRONMENT_PRODUCTION : Veritrans::ENVIRONMENT_DEVELOPMENT);\n $veritrans->payment_type = ($this->select_veritrans_payment == 'veritrans_direct' ? Veritrans::VT_DIRECT : Veritrans::VT_WEB);\n if ($veritrans->environment == Veritrans::ENVIRONMENT_PRODUCTION)\n {\n $veritrans->server_key = $this->server_key_v2_production;\n } else\n {\n $veritrans->server_key = $this->server_key_v2_sandbox;\n }\n if ($this->enable_3d_secure == 'yes')\n $veritrans->enable_3d_secure = TRUE;\n \n $veritrans->order_id = $order_id;\n\n if ($_POST['ship_to_different_address'])\n {\n $veritrans->required_shipping_address = 1;\n $veritrans->billing_different_with_shipping = 1;\n $veritrans->shipping_first_name = $_POST['shipping_first_name'];\n $veritrans->shipping_last_name = $_POST['shipping_last_name'];\n $veritrans->shipping_address1 = $_POST['shipping_address_1'];\n $veritrans->shipping_address2 = $_POST['shipping_address_2'];\n $veritrans->shipping_city = $_POST['shipping_city'];\n $veritrans->shipping_country_code = $_POST['shipping_country'];\n $veritrans->shipping_phone = $_POST['billing_phone'];\n $veritrans->shipping_postal_code = $_POST['shipping_postcode'];\n } else\n {\n $veritrans->required_shipping_address = 1;\n $veritrans->billing_different_with_shipping = 0;\n }\n\n $veritrans->first_name = $_POST['billing_first_name'];\n $veritrans->last_name = $_POST['billing_last_name'];\n $veritrans->address1 = $_POST['billing_address_1'];\n $veritrans->address2 = $_POST['billing_address_2'];\n $veritrans->city = $_POST['billing_city'];\n $veritrans->country_code = $_POST['billing_country'];\n $veritrans->postal_code = $_POST['billing_postcode'];\n $veritrans->phone = $_POST['billing_phone'];\n $veritrans->email = $_POST['billing_email'];\n\n // Populate Items\n $items = array();\n\n if( sizeof( $order->get_items() ) > 0 ) {\n foreach( $order->get_items() as $item ) {\n if ( $item['qty'] ) {\n $product = $order->get_product_from_item( $item );\n\n $veritrans_item = array();\n\n $veritrans_item['item_id'] = $item['product_id'];\n $veritrans_item['item_name1'] = $item['name'];\n $veritrans_item['item_name2'] = $item['name'];\n $veritrans_item['price'] = $order->get_item_subtotal( $item, false );\n $veritrans_item['quantity'] = $item['qty'];\n\n $items[] = $veritrans_item;\n }\n }\n }\n\n // Shipping fee\n if( $order->get_total_shipping() > 0 ) {\n $items[] = array(\n 'item_id' => 'shippingfee',\n 'item_name1' => 'Shipping Fee',\n 'item_name2' => 'Shipping Fee',\n 'price' => $order->get_total_shipping(),\n 'quantity' => 1,\n );\n }\n\n // Tax\n if( $order->get_total_tax() > 0 ) {\n $items[] = array(\n 'item_id' => 'taxfee',\n 'item_name1' => 'Tax',\n 'item_name2' => 'Tax',\n 'price' => $order->get_total_tax(),\n 'quantity' => 1,\n );\n }\n\n // Fees\n if ( sizeof( $order->get_fees() ) > 0 ) {\n $fees = $order->get_fees();\n for ( $i = 0; $i < count($fees); $i++ ) {\n $items[] = array(\n 'item_id' => 'itemfee' . $i,\n 'item_name1' => 'Fee ' . $i,\n 'item_name2' => 'Fee ' . $i,\n 'price' => $item['line_total'],\n 'quantity' => 1,\n ); \n }\n }\n\n // sift through the entire item to ensure that currency conversion is applied\n if (get_woocommerce_currency() != 'IDR')\n {\n foreach ($items as &$item) {\n $item['price'] = $item['price'] * $this->to_idr_rate;\n }\n }\n\n $veritrans->items = $items;\n $veritrans->force_sanitization = TRUE;\n\n $charge_result = $veritrans->getTokens();\n \n // If wp_remote_post failed\n if( $veritrans->error ) {\n throw new Exception( $veritrans->error );\n } else {\n header('Location:' . $charge_result['redirect_url']);\n exit;\n // $result = json_decode( wp_remote_retrieve_body( $vtweb ), true );\n\n // // check result\n // if( !empty($result['token_merchant']) ) {\n // // No error\n\n // if ( ! empty( $result['token_browser'] ) )\n // update_post_meta( $order->id, '_token_browser', $result['token_browser'] );\n // if ( ! empty( $result['token_merchant'] ) )\n // update_post_meta( $order->id, '_token_merchant', $result['token_merchant'] ); \n // }\n\n // else {\n // // Veritrans doesn't return tokens\n // $error_str = '';\n // foreach( $result['errors'] as $error_name => $error_message ) {\n // $error_str .= \"<br><strong>{$error_name}</strong>: {$error_message}\\n\";\n // }\n // throw new Exception( $error_str );\n // }\n }\n }", "public function destroy(OrderDetails $orderDetails)\n {\n //\n }", "public function saveEpiResponseOnPayment($params)\n {\n $quote = $this->getOnePage()->getQuote();\n $payment = $quote->getPayment()->getMethodInstance();\n //Save additional payment information to order-payment\n $payment->setAdditionalPaymentInfo($quote->getPayment(), $params);\n $quote->save();\n }", "public function __construct(Order $order, $diners = 1)\n {\n $this->order = $order;\n $this->diners = $diners;\n }", "public function addAdditionalOptionsToQuote($observer)\n {\n $action = Mage::app()->getFrontController()->getAction();\n if ($action->getFullActionName() == 'checkout_cart_add')\n {\n Mage::log(\"checkout_cart_add\", Zend_Log::DEBUG, \"threekit.log\");\n // assuming you are posting your custom form values in an array called extra_options...\n if ($options = $action->getRequest()->getParam('clara_additional_options'))\n {\n $decodePost = json_decode($options, true);\n $product = $observer->getProduct();\n\n // add to the additional options array\n $additionalOptions = array();\n if ($additionalOption = $product->getCustomOption('additional_options'))\n {\n $additionalOptions = (array) unserialize($additionalOption->getValue());\n }\n foreach ($decodePost as $key => $value)\n {\n $additionalOptions[] = array(\n 'label' => $key,\n 'value' => $value,\n );\n }\n // add the additional options array with the option code additional_options\n $observer->getProduct()\n ->addCustomOption('additional_options', serialize($additionalOptions));\n }\n }\n }", "function plgVmConfirmedOrder (VirtueMartCart $cart, $order) {\n\n\t\tif (!($method = $this->getVmPluginMethod ($order['details']['BT']->virtuemart_shipmentmethod_id))) {\n\t\t\treturn NULL; // Another method was selected, do nothing\n\t\t}\n\t\tif (!$this->selectedThisElement ($method->shipment_element)) {\n\t\t\treturn FALSE;\n\t\t}\n\t\t$values['virtuemart_order_id'] = $order['details']['BT']->virtuemart_order_id;\n\t\t$values['order_number'] = $order['details']['BT']->order_number;\n\t\t$values['virtuemart_shipmentmethod_id'] = $order['details']['BT']->virtuemart_shipmentmethod_id;\n\t\t$values['shipment_name'] = $this->renderPluginName ($method);\n\t\t$values['order_weight'] = $this->getOrderWeight ($cart, $method->weight_unit);\n\t\t$values['shipment_weight_unit'] = $method->weight_unit;\n\n\t\t$costs = $this->getCosts($cart,$method,$cart->cartPrices);\n\t\tif(empty($costs)){\n\t\t\t$values['shipment_cost'] = 0;\n\t\t\t$values['shipment_package_fee'] = 0;\n\t\t} else {\n\t\t\t$values['shipment_cost'] = $method->shipment_cost;\n\t\t\t$values['shipment_package_fee'] = $method->package_fee;\n\t\t}\n\n\t\t$values['tax_id'] = $method->tax_id;\n\t\t$this->storePSPluginInternalData ($values);\n\n\t\treturn TRUE;\n\t}", "function buildOrderParams() \n\t{\n\t\tif ($this->sortByGroup === false && $this->sortField != \"\"){\n\t\t\t$this->strOrderBy = \"Order by \".$this->sortField;\n\t\t\tif ($this->sortOrder == \"A\")\n\t\t\t\t$this->strOrderBy .= \" asc\";\n\t\t\telse \n\t\t\t\t$this->strOrderBy .= \" desc\";\n\t\t}\n\t}", "public function appendOrderTracking(\\service\\message\\common\\KeyValueItem $value)\n {\n return $this->append(self::order_tracking, $value);\n }", "public function orderDetails()\n {\n return $this->hasMany( OrderDetails::class, 'product_id', 'id');\n }", "public function __construct(\\Arkitecht\\FedEx\\Structs\\WebAuthenticationDetail $webAuthenticationDetail = null, \\Arkitecht\\FedEx\\Structs\\ClientDetail $clientDetail = null, \\Arkitecht\\FedEx\\Structs\\VersionId $version = null, $deletionControl = null, \\Arkitecht\\FedEx\\Structs\\TransactionDetail $transactionDetail = null, $shipTimestamp = null, \\Arkitecht\\FedEx\\Structs\\TrackingId $trackingId = null)\n {\n $this\n ->setWebAuthenticationDetail($webAuthenticationDetail)\n ->setClientDetail($clientDetail)\n ->setVersion($version)\n ->setDeletionControl($deletionControl)\n ->setTransactionDetail($transactionDetail)\n ->setShipTimestamp($shipTimestamp)\n ->setTrackingId($trackingId);\n }", "public function execute(\\Magento\\Framework\\Event\\Observer $observer)\n {\n /** @var \\Magento\\Sales\\Model\\Order $order */\n $order = $observer->getEvent()->getOrder();\n// $this->logger->info(\"SalesOrderCustomerSzieFeeObserver===================>\".$order->getId());\n if ($order->getId()) {\n /** @var $quote \\Magento\\Quote\\Model\\Quote */\n $quote = $this->quoteRepository->get($order->getQuoteId());\n $customsizefee = $quote->getData('customsizefee');\n// $this->logger->info(\"customsizefee===================>\".$customsizefee);\n $order->setData('customsizefee',$customsizefee);\n $order->save();\n }\n }", "function get_params( $order) {\n\t\tglobal $woocommerce, $wc_authorize_sim;\n\t\t\n\t\t$this->add_log( 'Generating payment form for order #' . $order->id);\n\t\t\n\t\t$params = array();\n\t\t\n\t\t$params = array (\n\t\t\t'x_login'\t\t\t=> $this->login_id,\n\t\t\t'x_show_form'\t\t=> 'PAYMENT_FORM',\t\t\t\n\t\t\t'x_type' \t\t\t=> $this->type,\n\t\t\t'x_test_request' \t=> ($this->testmode == 'yes') ? 'TRUE' : 'FALSE',\t\t\t\n\t\t\t'x_relay_response'\t=> 'TRUE',\n 'x_relay_url' \t=> add_query_arg('_hdl_anet_sim', 'relay', $this->notify_url),\n \n\t\t\t//billing\n\t\t\t'x_first_name' \t\t=> $order->billing_first_name,\n\t\t\t'x_last_name' \t\t=> $order->billing_last_name,\n\t\t\t'x_address' \t\t=> $order->billing_address_1,\n\t\t\t'x_city' \t\t\t=> $order->billing_city,\n\t\t\t'x_state' \t\t\t=> $order->billing_state,\n\t\t\t'x_zip' \t\t\t=> $order->billing_postcode,\n\t\t\t'x_country' \t\t=> $order->billing_country,\n\t\t\t'x_phone' \t\t\t=> $order->billing_phone,\n\t\t\t'x_email'\t\t\t=> $order->billing_email,\n\t\t\t\n\t\t\t//shipping\n\t\t\t'x_ship_to_first_name' \t\t=> $order->shipping_first_name,\n\t\t\t'x_ship_to_last_name' \t\t=> $order->shipping_last_name,\n\t\t\t'x_ship_to_address' \t\t=> $order->shipping_address_1,\n\t\t\t'x_ship_to_city' \t\t\t=> $order->shipping_city,\n\t\t\t'x_ship_to_state' \t\t\t=> $order->shipping_state,\n\t\t\t'x_ship_to_zip' \t\t\t=> $order->shipping_postcode,\n\t\t\t'x_ship_to_country' \t\t=> $order->shipping_country,\n\t\t\t'x_ship_to_company' \t\t=> $order->shipping_company,\n\t\t\t\t\n\t\t\t'x_cust_id' \t\t=> $order->user_id,\n\t\t\t'x_customer_ip' \t=> $this->get_user_ip(),\n\t\t\t'x_invoice_num' \t=> $order->id,\n\t\t\t'x_fp_sequence'\t\t=> $order->order_key,\n\t\t\t'x_amount' \t\t\t=> $order->get_total(),\n\t\t\t\n\t\t\t'x_cancel_url'\t\t=> $order->get_cancel_order_url(),\n\t\t\t'x_cancel_url_text'\t=> __( 'Cancel', WC_Authorize_SIM::TEXT_DOMAIN ),\n\t\t);\n\t\t\n\t\t// Address 2\n\t\tif( ! empty( $order->billing_address_2 ) ) {\n\t\t\t$params['x_address'] .= ' - ' . $order->billing_address_2;\n\t\t}\n\t\tif( ! empty( $order->shipping_address_2 ) ) {\n\t\t\t$params['x_ship_to_address'] .= ' - ' . $order->shipping_address_2;\n\t\t}\n\t\t\n\t\t// Add item line\n\t\t$this->add_item_fields( $order );\n\t\t\n\t\t// Tax\n\t\tif( $order->get_total_tax() > 0 ) {\n\t\t\t// Id\n\t\t\t$item_id = 'TAX01' ;\n\t\t\t\n\t\t\t// name\n\t\t\t$item_name \t= __( 'Cart Tax', WC_Authorize_SIM::TEXT_DOMAIN );\n\t\t\t\n\t\t\t// description\n\t\t\t$item_desc \t= '';\n\t\t\t\n\t\t\t// Quantity\n\t\t\t$item_qty \t= 1;\n\t\t\t\n\t\t\t// Amount\n\t\t\t$item_amount = $order->get_total_tax();\n\t\t\t\n\t\t\t// Log point\n\t\t\t$this->add_log( $item_id . \", $item_name, $item_desc, $item_qty, $item_amount\" );\n\t\t\t\n\t\t\t// Add line item\n\t\t\t$this->add_item_field( $item_id, $item_name, $item_desc, $item_qty, $item_amount, 'N');\n\t\t}\n\n\t\t// Fees\n\t\tif ( sizeof( $order->get_fees() ) > 0 ) {\n\t\t\t$idx = 0;\n\t\t\tforeach ( $order->get_fees() as $item ) {\n\t\t\t\t$idx ++;\n\t\t\t\t\n\t\t\t\t// Id\n\t\t\t\t$item_id = sprintf( 'FEE%02d', $idx );\n\t\t\t\n\t\t\t\t// name\n\t\t\t\t$item_name \t= $this->get_item_name( $item['name'] );\n\t\t\t\t\n\t\t\t\t// description\n\t\t\t\t$item_desc \t= $item_name;\n\t\t\t\t\n\t\t\t\t// Quantity\n\t\t\t\t$item_qty \t= 1;\n\t\t\t\t\n\t\t\t\t// Amount\n\t\t\t\t$item_amount = $item['line_total'];\n\t\t\t\t\n\t\t\t\t// Log point\n\t\t\t\t$this->add_log( $item_id . \", $item_name, $item_desc, $item_qty, $item_amount\" );\n\t\t\t\t\n\t\t\t\t$this->add_item_field( $item_id, $item_name, $item_desc, $item_qty, $item_amount, 'N');\n\t\t\t}\n\t\t}\n\n\t\t// Shipping Cost item\n\t\tif ( $order->get_total_shipping() > 0 ) {\n\t\t\t// Id\n\t\t\t$item_id = 'SHP01';\n\t\t\t\t\n\t\t\t// name\n\t\t\t$item_name \t= $this->get_item_name( $order->get_shipping_method() );\n\t\t\t\n\t\t\t// description\n\t\t\t$item_desc \t= sprintf( __( 'Shipping via %s', WC_Authorize_SIM::TEXT_DOMAIN ), $order->get_shipping_method() );\n\t\t\t\n\t\t\t// Quantity\n\t\t\t$item_qty \t= 1;\n\t\t\t\n\t\t\t// Amount\n\t\t\t$item_amount = round( $order->get_total_shipping(), 2 );\n\t\t\t\n\t\t\t// Log point\n\t\t\t$this->add_log( $item_id . \", $item_name, $item_desc, $item_qty, $item_amount\" );\n\t\t\t\n\t\t\t$this->add_item_field( $item_id, $item_name, $item_desc, $item_qty, $item_amount, 'N');\n\t\t}\n\t\t\n\t\t// Discount\n\t\tif ( $order->get_cart_discount() > 0 ) {\n\t\t\t// Id\n\t\t\t$item_id = 'DIS01' ;\n\t\t\t\n\t\t\t// name\n\t\t\t$item_name \t= __( 'Cart Discount', WC_Authorize_SIM::TEXT_DOMAIN );\n\t\t\t\n\t\t\t// description\n\t\t\t$item_desc \t= '';\n\t\t\t\n\t\t\t// Quantity\n\t\t\t$item_qty \t= 1;\n\t\t\t\n\t\t\t// Amount\n\t\t\t$item_amount = round( $order->get_cart_discount(), 2 );\n\t\t\t\n\t\t\t// Log point\n\t\t\t$this->add_log( $item_id . \", $item_name, $item_desc, $item_qty, $item_amount\" );\n\t\t\t\n\t\t\t$this->add_item_field( $item_id, $item_name, $item_desc, $item_qty, $item_amount, 'N');\n\t\t}\n\t\t\n\t\treturn apply_filters( 'woocommerce_authorize_sim_args', $params, $order->id );\n\t}", "private function processOpenOrderDetails(array $orderValue, array $orders, $orderKey)\n {\n /** @var array $orderDetails */\n $orderDetails = $this->db->fetchAll(\n 'SELECT * FROM s_order_details WHERE orderID = ? ORDER BY id ASC',\n [$orderValue['id']]\n );\n\n if (!count($orderDetails)) {\n unset($orders[$orderKey]);\n\n return $orders;\n }\n\n $context = $this->contextService->getShopContext();\n $orderProductOrderNumbers = array_column($orderDetails, 'articleordernumber');\n $listProducts = Shopware()->Container()->get('shopware_storefront.list_product_service')\n ->getList($orderProductOrderNumbers, $context);\n $listProducts = Shopware()->Container()->get('legacy_struct_converter')\n ->convertListProductStructList($listProducts);\n\n foreach ($listProducts as &$listProduct) {\n $listProduct = array_merge($listProduct, $listProduct['prices'][0]);\n }\n\n foreach ($orderDetails as $orderDetailsKey => $orderDetailsValue) {\n $orderDetails[$orderDetailsKey]['amountNumeric'] = round($orderDetailsValue['price'] * $orderDetailsValue['quantity'], 2);\n $orderDetails[$orderDetailsKey]['priceNumeric'] = $orderDetailsValue['price'];\n $orderDetails[$orderDetailsKey]['amount'] = $this->moduleManager->Articles()\n ->sFormatPrice($orderDetails[$orderDetailsKey]['amountNumeric']);\n $orderDetails[$orderDetailsKey]['price'] = $this->moduleManager->Articles()\n ->sFormatPrice($orderDetailsValue['price']);\n $orderDetails[$orderDetailsKey]['active'] = 0;\n\n $tmpProduct = null;\n if (!empty($listProducts[$orderDetailsValue['articleordernumber']])) {\n $tmpProduct = $listProducts[$orderDetailsValue['articleordernumber']];\n }\n\n if (!empty($tmpProduct) && is_array($tmpProduct)) {\n // Set product in activate state\n $orderDetails[$orderDetailsKey]['active'] = 1;\n $orderDetails[$orderDetailsKey]['article'] = $tmpProduct;\n if (!empty($tmpProduct['purchaseunit'])) {\n $orderDetails[$orderDetailsKey]['purchaseunit'] = $tmpProduct['purchaseunit'];\n }\n\n if (!empty($tmpProduct['referenceunit'])) {\n $orderDetails[$orderDetailsKey]['referenceunit'] = $tmpProduct['referenceunit'];\n }\n\n if (!empty($tmpProduct['referenceprice'])) {\n $orderDetails[$orderDetailsKey]['referenceprice'] = $tmpProduct['referenceprice'];\n }\n\n if (!empty($tmpProduct['sUnit']) && is_array($tmpProduct['sUnit'])) {\n $orderDetails[$orderDetailsKey]['sUnit'] = $tmpProduct['sUnit'];\n }\n\n if (!empty($tmpProduct['price'])) {\n $orderDetails[$orderDetailsKey]['currentPrice'] = $tmpProduct['price'];\n }\n\n if (!empty($tmpProduct['pseudoprice'])) {\n $orderDetails[$orderDetailsKey]['currentPseudoprice'] = $tmpProduct['pseudoprice'];\n }\n\n $orderDetails[$orderDetailsKey]['currentHas_pseudoprice'] = $tmpProduct['has_pseudoprice'];\n }\n\n // Check for serial\n if ($orderDetails[$orderDetailsKey]['esdarticle']) {\n $numbers = [];\n $getSerial = $this->db->fetchAll(\n 'SELECT serialnumber\n FROM s_articles_esd_serials, s_order_esd\n WHERE userID = ?\n AND orderID = ?\n AND orderdetailsID = ?\n AND s_order_esd.serialID = s_articles_esd_serials.id',\n [\n $this->session->offsetGet('sUserId'),\n $orderValue['id'],\n $orderDetailsValue['id'],\n ]\n );\n foreach ($getSerial as $serial) {\n $numbers[] = $serial['serialnumber'];\n }\n $orderDetails[$orderDetailsKey]['serial'] = implode(',', $numbers);\n $orderDetails[$orderDetailsKey]['esdLink'] = $this->config->get('sBASEFILE')\n . '?sViewport=account&sAction=download&esdID='\n . $orderDetailsValue['id'];\n }\n }\n $orders[$orderKey]['activeBuyButton'] = 1;\n $orders[$orderKey]['details'] = $orderDetails;\n\n return $orders;\n }", "public function buildHpfFields($order_info)\r\n {\r\n $processor_params = $this->processor_data['processor_params'];\r\n\r\n $fields = $this->buildPaymentFields($order_info);\r\n\r\n $fields = array_map(\r\n function ($value) {\r\n return $value === null ? '' : $value;\r\n },\r\n $fields\r\n );\r\n\r\n $data = 'MerchantID=' . $processor_params['merchant_id'];\r\n $data .= '&Password=' . $processor_params['password'];\r\n\r\n foreach ($fields as $key => $value) {\r\n $data .= '&' . $key . '=' . $value;\r\n };\r\n\r\n $additional_fields = [\r\n 'HashDigest' => $this->calculateHashDigest(\r\n $data,\r\n $processor_params['hash_method'],\r\n $processor_params['preshared_key']\r\n ),\r\n 'MerchantID' => $processor_params['merchant_id'],\r\n ];\r\n\r\n $fields = array_merge($additional_fields, $fields);\r\n\r\n return $fields;\r\n }", "public function wc_new_order( $order_id ) {\n\n\t\tadd_post_meta( $order_id, 'decred_amount', WC()->session->get( 'decred_amount' ) );\n\n\t\tadd_post_meta( $order_id, 'decred_refund_address', WC()->session->get( 'decred_refund_address' ) );\n\n\t\tadd_post_meta( $order_id, 'decred_payment_address', $this->get_payment_address( $order_id ) );\n\n\t\tif ( ! wp_next_scheduled( 'decred_order_status_updater' ) ) {\n\t\t\twp_schedule_event( time(), 'decred_schedule', 'decred_order_status_updater' );\n\t\t}\n\n\t}", "public function execute(\\Magento\\Framework\\Event\\Observer $observer) {\n\t\t$actionName = \"\";\n\t\ttry {\n $action = $this->http;\n if($action) {\n $actionName = $this->http->getFullActionName(); \n }\n\t\t} catch(Exception $e) {\n\t\t\t$actionName = \"\";\n\t\t}\n if ($actionName == 'checkout_cart_add')\n {\n // assuming you are posting your custom form values in an array called extra_options...\n $extraOption = $this->http->getParam('extra_options');\n if ($extraOption != \"\")\n {\n $product = $observer->getProduct();\n // add to the additional options array\n $additionalOptions = array();\n /* if ($additionalOption = $product->getCustomOption('additional_options'))\n {\n $additionalOptions = (array) unserialize($additionalOption->getValue());\n } */\n $additionalOptions[] = array(\n 'code' => 'pdpinfo',\n 'label' => __('Customize Design'),\n 'value' => '',\n 'json' => $extraOption,\n \t'time' => microtime()\n );\n // add the additional options array with the option code additional_options\n $observer->getProduct()\n ->addCustomOption('additional_options', serialize($additionalOptions));\n }\n }\n }", "private function alterOrderInformation()\n {\n if (version_compare(Shopware()->Config()->get( 'Version' ), '5.2.0', '<')) {\n $sql = \"UPDATE `s_core_snippets`\n SET `value` = CASE\n WHEN `value` = 'Free text 4' THEN 'Transaction ID'\n WHEN `value` = 'Freitextfeld 4' THEN 'Transaktions-ID'\n ELSE `value`\n END\n WHERE `namespace` = 'backend/order/main'\n AND `value` IN ('Freitextfeld 4', 'Free text 4')\";\n } elseif (version_compare(Shopware()->Config()->get( 'Version' ), '5.2.0', '>=')) {\n $sql = \"INSERT INTO `s_attribute_configuration` (table_name, column_name, \"\n . \"column_type, position, translatable, display_in_backend, custom, \"\n . \"help_text, support_text, label, entity, array_store) \"\n . \"VALUES ('s_order_attributes','attribute4','string',1,0,1,0,'','','Transaction ID','NULL',NULL)\";\n }\n Shopware()->Db()->query($sql);\n }", "public function setVeROReasonCodeDetails(array $veROReasonCodeDetails)\n {\n $this->veROReasonCodeDetails = $veROReasonCodeDetails;\n return $this;\n }", "public function getOrderDetailsByOrderId($orderId)\n {\n $sql = <<<'EOT'\nSELECT\n `d`.`id` AS `orderdetailsID`,\n `d`.`orderID` AS `orderID`,\n `d`.`ordernumber`,\n `d`.`articleID`,\n `d`.`articleordernumber`,\n `d`.`price` AS `price`,\n `d`.`quantity` AS `quantity`,\n `d`.`price`*`d`.`quantity` AS `invoice`,\n `d`.`name`,\n `d`.`status`,\n `d`.`shipped`,\n `d`.`shippedgroup`,\n `d`.`releasedate`,\n `d`.`modus`,\n `d`.`esdarticle`,\n `d`.`taxID`,\n `t`.`tax`,\n `d`.`tax_rate`,\n `d`.`esdarticle` AS `esd`\nFROM\n `s_order_details` AS `d`\nLEFT JOIN\n `s_core_tax` AS `t`\nON\n `t`.`id` = `d`.`taxID`\nWHERE\n `d`.`orderID` = :orderId\nORDER BY\n `orderdetailsID` ASC\nEOT;\n\n return $this->db->fetchAll($sql, ['orderId' => $orderId]);\n }", "public function generatorEditVirtualParamsStep(&$step_elements, &$form_state, $args = array()) {\n so_feedsagent_generator_virtual_type_params_step($step_elements, $form_state, $args);\n }", "public function recordPointsForOrderEvent($observer){\n\t\tif(Mage::getStoreConfig('rewardpointspro/rewardpointspro/enabled')&& Mage::getStoreConfig('rewardpointspro/display/product_rewards')){ \n\t\t\t$order = $observer->getEvent()->getOrder();\n\t\t\t$items =$order->getItemsCollection();\n\t\t\t$customer_id_from_event = $order->getCustomerId();\n\t\t\t$customerId = Mage::getSingleton('checkout/session')->getQuote()->getShippingAddress()->getCustomerId();\n\t\t\t$rewardPoints = 0;\n\t\t\t$prodIds = array();\n\t\t\tforeach ($items as $_item) {\n\t\t\t\t$prodIds[] = $_item->getProductId();\n\t\t\t}\n\t\t\t$prod = Mage::getResourceModel('catalog/product_collection')->addAttributeToSelect('reward_points_pro')->addIdFilter($prodIds);\n\t\t\t//sum up points per product per quantity\n\t\t\tforeach ($items as $_item) {\n\t\t\t$rewardPoints += $prod->getItemById($_item->getProductId())->getRewardPointsPro() * $_item->getQtyOrdered();\n\t\t\t}\n\t\t\t//record points for item into db\n\t\t\t$this->recordPoints($rewardPoints, $customerId);\n\t\t\t$discounted = Mage::getSingleton('customer/session')->getApplyPoints();\n\t\t\t//subtract points for this order\n\t\t\t$this->useCouponPoints($discounted, $customerId); \n\t\t \n\t\t}\n\t\tMage::getSingleton('customer/session')->setdisc(0);\n\t}", "public function execute($order, $customer, $params = [])\n {\n\n // Payment details\n $paymentDetails = new PaymentDetailsType();\n\n\n // Set the order items\n $itemTotalValue = 0;\n\n $items = $order->orderItems;\n $i = 0;\n foreach ($items as $item) {\n $itemAmount = new BasicAmountType($this->currency, round($item->sell_price, 2));\n $itemTotalValue += $itemAmount->value * $item->qty;\n $itemDetails = new PaymentDetailsItemType();\n $itemDetails->Name = $item->title;\n $itemDetails->Amount = $itemAmount;\n $itemDetails->Quantity = $item->qty;\n\n $paymentDetails->PaymentDetailsItem[$i] = $itemDetails;\n\n $i++;\n }\n\n /**\n * The total cost of the transaction to the buyer. If shipping cost and tax charges are known,\n * include them in this value. If not, this value should be the current subtotal of the order.\n * If the transaction includes one or more one-time purchases, this field must be equal to the sum of the purchases.\n * If the transaction does not include a one-time purchase such as when you set up a billing agreement for a recurring payment,\n * set this field to 0.\n */\n $paymentDetails->ItemTotal = new BasicAmountType($this->currency, $itemTotalValue);\n $paymentDetails->OrderTotal = new BasicAmountType($this->currency, $itemTotalValue);\n\n $setECReqDetails = new SetExpressCheckoutRequestDetailsType();\n $setECReqDetails->PaymentDetails[0] = $paymentDetails;\n /*\n * (Required) URL to which the buyer is returned if the buyer does not approve the use of PayPal to pay you. For digital goods, you must add JavaScript to this page to close the in-context experience.\n */\n $setECReqDetails->CancelURL = $this->cancelUrl;\n /*\n * (Required) URL to which the buyer's browser is returned after choosing to pay with PayPal. For digital goods, you must add JavaScript to this page to close the in-context experience.\n */\n $setECReqDetails->ReturnURL = $this->returnUrl;\n /*\n * Determines where or not PayPal displays shipping address fields on the PayPal pages. For digital goods, this field is required, and you must set it to 1. It is one of the following values:\n 0 – PayPal displays the shipping address on the PayPal pages.\n 1 – PayPal does not display shipping address fields whatsoever.\n 2 – If you do not pass the shipping address, PayPal obtains it from the buyer's account profile.\n */\n $setECReqDetails->NoShipping = 1;\n /*\n * (Optional) Determines whether or not the PayPal pages should display the shipping address set by you in this SetExpressCheckout request, not the shipping address on file with PayPal for this buyer. Displaying the PayPal street address on file does not allow the buyer to edit that address. It is one of the following values:\n 0 – The PayPal pages should not display the shipping address.\n 1 – The PayPal pages should display the shipping address.\n */\n $setECReqDetails->AddressOverride = 0;\n /*\n * Indicates whether or not you require the buyer's shipping address on file with PayPal be a confirmed address. For digital goods, this field is required, and you must set it to 0. It is one of the following values:\n 0 – You do not require the buyer's shipping address be a confirmed address.\n 1 – You require the buyer's shipping address be a confirmed address.\n */\n $setECReqDetails->ReqConfirmShipping = 0;\n\n $setECReqType = new SetExpressCheckoutRequestType();\n $setECReqType->SetExpressCheckoutRequestDetails = $setECReqDetails;\n $setECReq = new SetExpressCheckoutReq();\n $setECReq->SetExpressCheckoutRequest = $setECReqType;\n /*\n * \t ## Creating service wrapper object\n Creating service wrapper object to make API call and loading\n Configuration::getAcctAndConfig() returns array that contains credential and config parameters\n */\n $paypalService = new PayPalAPIInterfaceServiceService($this->config);\n\n try {\n /* wrap API method calls on the service object with a try catch */\n $setECResponse = $paypalService->SetExpressCheckout($setECReq);\n if ($setECResponse->Ack === 'Success') {\n // Redirect the user to paypal.com here\n // We use a payment flow with a Pay Now button. Therefore we ad the \"useraction\" parameter with value \"commit\" to the url.\n return Yii::$app->controller->redirect('https://www.sandbox.paypal.com/cgi-bin/webscr?cmd=_express-checkout&useraction=commit&token=' . $setECResponse->Token);\n } elseif ($setECResponse->Ack === 'Failure') {\n foreach ($setECResponse->Errors as $error) {\n //Log the error\n Yii::error('Paypal SetExpressCheckout Failure: ' . $error->LongMessage);\n }\n Yii::$app->session->setFlash('error', 'You cannot use Paypal Payment at the moment. Pleas use annother Payment Method');\n $redirect = Yii::$app->session->get('checkoutRoute', Yii::$app->getHomeUrl());\n Yii::$app->response->redirect([$redirect]);\n Yii::$app->end();\n }\n\n } catch (Exception $ex) {\n $a = 4;\n }\n }", "public function addOrder(Order $order);", "public function insertIntoVH($vhInfo, $appUserID, $roleID, $status, $note)\n {\n $qq = 'insert_into_version_history';\n $this->sdb->prepare($qq,\n 'insert into version_history\n (version, id, user_id, role_id, status, is_current, note)\n values\n ($1, $2, $3, $4, $5, $6, $7)\n returning version, id as ic_id;');\n\n $result = $this->sdb->execute($qq,\n array($vhInfo['version'], $vhInfo['ic_id'], $appUserID, $roleID, $status, true, $note));\n $vhInfo = $this->sdb->fetchrow($result);\n $this->sdb->deallocate($qq);\n return $vhInfo;\n }", "public function plgVmOnShowOrderBEShipment ($virtuemart_order_id, $virtuemart_shipmentmethod_id) {\n\n\t\tif (!($this->selectedThisByMethodId ($virtuemart_shipmentmethod_id))) {\n\t\t\treturn NULL;\n\t\t}\n\t\t$html = $this->getOrderShipmentHtml ($virtuemart_order_id);\n\t\treturn $html;\n\t}", "public static function CreateOrder_Details(\n $Discount, \n $OrderID, \n $ProductID, \n $Quantity, \n $UnitPrice)\n { \n $Order_Details = new Order_Details();\n $Order_Details->Discount = $Discount;\n $Order_Details->OrderID = $OrderID;\n $Order_Details->ProductID = $ProductID;\n $Order_Details->Quantity = $Quantity;\n $Order_Details->UnitPrice = $UnitPrice;\n return $Order_Details;\n }", "public function onPaymentCollected(FilterOrderEvent $event)\n {\n $order = $event->getOrder();\n $id = null;\n\n try {\n $id = $this->pheanstalkQueue->appendSendOrder($order, $order->getInEdit());\n $this->stateLog($order->getId());\n $message = 'Order added to beanstalk queue (initial add).';\n } catch (OrderAlreadyInQueueException $e) {\n $message = $e->getMessage();\n }\n\n $this->logger->debug($message, [\n 'job_id' => $id,\n 'order_id' => $order->getId(),\n 'queue' => 'orders2ax',\n ]);\n }", "public function salesOrderPlaceAfter($observer)\r\n {\r\n /** @var Mage_Sales_Model_Order $order */\r\n $order = $observer->getEvent()->getOrder();\r\n if (!$order->getId()) {\r\n return;\r\n }\r\n try{\r\n $resource = Mage::getSingleton('core/resource');\r\n $writeConnection = $resource->getConnection('core_write');\r\n $select = $writeConnection->select()\r\n ->from(\r\n array('r' => $resource->getTableName('sales/recurring_profile_order')),\r\n array('entity_id' => 'order_id')\r\n ) // order - profile relations\r\n ->join(\r\n array('pr' => $resource->getTableName('aitcheckoutfields/profile_field')),\r\n 'r.profile_id = pr.entity_id', array('attribute_id', 'value')\r\n ) // custom fields in profile\r\n ->joinLeft(\r\n array('o' => $resource->getTableName('aitcheckoutfields/order_field')),\r\n 'o.entity_id = r.order_id AND o.attribute_id = pr.attribute_id', ''\r\n ) // custom fields in order, joined for check.\r\n ->where('r.order_id = ?', $order->getId())\r\n ->where('o.value_id IS NULL');\r\n\r\n $insert = $select->insertFromSelect(\r\n $resource->getTableName('aitcheckoutfields/order_field'),\r\n array('entity_id', 'attribute_id', 'value')\r\n );\r\n $writeConnection->query($insert);\r\n } catch (Exception $e) {\r\n Mage::logException($e);\r\n }\r\n\r\n }", "protected function writeOrder($order, $fp) \n {\n $common = $this->getCommonOrderValues($order);\n\t\t//echo '<pre>';print_r($common);exit;\n\t\t//echo strtolower($common[8]);exit;\n\t\t\n\t\t\n\t\t$invoices = Mage::getResourceModel('sales/order_invoice_collection')\n ->setOrderFilter($order->getId())\n ->load();\n\t\t//echo $invoices->getSelect();exit;\n\t\t$realShipments = Mage::getModel('sales/order_shipment_track')->getCollection()\n ->addFieldToFilter('order_id',$order->getId())\n\t\t\t\t\t ->addAttributeToSelect('*');\n\n $orderItems = $order->getItemsCollection();\n\t\t//echo $orderItems->getSelect();exit;\n $itemInc = 0;\n\t\t$invoiceInc=0;\n\t\t$invoices_data = $invoices->getData();\n\t\t$invoiceprice = 0;\n\t\t$invoiceDiscount = 0;\n\t\t\n\t\tif(!empty($invoices_data)){\n\t\t\n\t\t foreach($invoices as $invoice){\n\t\t //$invoiceArray = $this->getInvoiceValues($invoice);\n\t\t //var_dump($invoiceArray);exit;\n\t\t //var_dump($this->getInvoiceValues($invoice));exit;\n\t\t $invoiceArray[] = $invoices_data[0]['increment_id'];\n\t\t $createdDate = $invoice->getCreatedAt();\n\t\t $invoiceprice = $invoice->getGrandTotal();\n\t\t $invoice_mrp = $invoice->getData('base_subtotal_incl_tax'); //kishan\n\t\t //var_dump($invoice_mrp);\n\t\t $invoiceDiscount = $invoice->getData('base_discount_amount'); //kishan\n\t\t //$taxvalueTotal = $invoice->getData('base_tax_amount');\t//kishan\n\t\t }\n\t\t }else{\n\t\t $invoiceArray[] = '';\n\t\t $invoiceArray[] ='';\n\t\t $invoiceprice = 0;\n\t\t \n\t\t }\n\t\t\n\t\t //echo '<pre>';print_r($invoices->getData());exit;\n\t\t \n\t\t$paymentmethod[] = $this->getPaymentMethod($order);\n\t\t$order_date[] = Mage::helper('core')->formatDate($order->getCreatedAt(), 'medium', true);\n\t\t \n\t\t \n\t\t $shipment_data = $realShipments->getData();\n\t\tif(!empty($shipment_data)){\n\t\t\n\t\t\t foreach($realShipments as $shipment){ \n\t\t\t $shipmentArray = $this->getShipmentValues($shipment , $order);\n\t\t\t $airwaybillnoArray = $this->getAirwaybillno($shipment);\n\t\t\t }\n\t\t }else{\n\t\t\t \n\t\t\t$shipment_data =$this->getShipmentValuesfromdirect($order);\n\t\t\t$airwaybillnoArray = $this->getAirwaybillnofromdirect($order);\n\t\t\t\n\t\t\tif(!empty($shipment_data))\n\t\t\t{\n\t\t\t$shipmentArray = $shipment_data;\n\t\t\t$shipmentArray[] ='';\t\n\t\t\t}else{\n\t\t\t $shipmentArray[] = '';\n\t\t\t $shipmentArray[] = '';\n\t\t\t $shipmentArray[] = '';\n\t\t\t}\n\t\t\t\n\t\t\tif(empty($airwaybillnoArray)){\n\t\t\t\t$airwaybillnoArray[] = '';\n\t\t\t}\n\t\t\n\t\t \n\t\t }\n\t\t \n\t\t\n\t\t $itemtitle='';\n\t\t $itemqty = 0;\n\t\t $itemweight =0;\n\t\t $categorytitle ='';\n\t\t $stockno = '';\n\t\t //$productprice = 0;\n\t\t\n foreach ($orderItems as $item)\n {\n \tif($item->getData('product_type')=='configurable'){\n\n \t\t$sqty+=$item->getData('qty_shipped');\n \t//\t$totaltax+=$item->getData('tax_amount');\n }\n\t\t\t\n\t\t\t$_newProduct = Mage::getModel('catalog/product')->load($item->getData('product_id'));\n\t\t\t\tif($item->getData('product_type')=='simple'){\n\t\t\t\t\t$titlenew = $this->getOrderItemTitle($item);\n\t\t\t\t\tif($titlenew !=\"\") {\n\t\t\t\t\t\t$itemtitle = $itemtitle.$titlenew.\" , \";/*--kishan--*/\n\t\t\t\t\t } \n\t\t\t\t\n\t\t\t\t}\n\t \t\t\n\t\t \t\t\n\t\t\t\t$mrp = $mrp+floatval($item['base_row_total_incl_tax']);/*--kishan--*/\n\t\t\t\t//var_dump(intval($item['base_discount_amount']));exit;\n\t\t\t\t$discount = $discount+floatval($item['base_discount_amount']);/*--kishan--*/\n\t\t\t\t$tax = $tax+floatval($item['base_tax_amount']);\n\t\t\t\t\n\t\t//\tif(){}\n\t\t\t\t/*kishan*/\n\t\t\t\t/*echo '<pre>';\n\t\t\t\tprint_r($item->getData('qty_shipped'));\n\t\t\t\texit;*/\n\t\t\tif($item->getData('product_type')=='configurable'){\n\n\t\t\t\t $titlenew = $this->getOrderItemTitle($item);\n\t\t\t\t $itemtitle = $itemtitle.$titlenew.\" , \";\n\t\t\t\t\n\t\t\t\t//get category name\n\t\t\t\t$cats = $_newProduct->getCategoryIds();\n\n\n\t\t\t\tif(!empty($cats)){\n\t\t\t\t//\tprint_r($cats);\n\t\t\t\t\t$categoryCount=count($cats);\n\t\t\t\t\t$category = Mage::getModel('catalog/category')->load($cats[$categoryCount-1]);\n\t\t\t\t\t$parentId=Mage::getModel('catalog/category')->load($cats[$categoryCount-1])->getParentId();\n\t\t\t\t\t$pcategory = Mage::getModel('catalog/category')->load($parentId);\n\t\t\t\t\t$parentCategoryName=$pcategory->getData('name');\n\t\t\t\t\t//var_dump($parentCategoryName);\n\t\t\t\t\tif(trim($parentCategoryName)=='Category'){\n\t\t\t\t\t\t$categoryParentId=Mage::getModel('catalog/category')->load($pcategory->getId())->getParentId();\n\t\t\t\t\t\t$parentCategory = Mage::getModel('catalog/category')->load($categoryParentId);\n\t\t\t\t\t\t$parentCategoryName=$parentCategory->getData('name');\n\t\t\t\t\t\t//$parentCategoryName=$pcategory->getData('name');\n\t\t\t\t\t\t//$pcategory = Mage::getModel('catalog/category')->load($parentId);\n\t\t\t\t\t}\n\t\t\t\t\tif($category->getData('name')!='Category'){\n\t\t\t\t\t\t$categorytitle = $categorytitle.$parentCategoryName.' '.$category->getData('name').\" , \";\n\t\t\t\t\t}\n\t\t\t\t}\n\n\n\t\t\t\t\n\n\t\t\t\t$productprice = ($productprice + $item->getData('price')*$qty);\n\t\t\t\t\n\t\t\t}\n\t\t\telse if($item->getData('product_type')=='simple'){\n\t\t\t\t$qt = $item->getQtyOrdered();/*written by shaily*/\n\t\t\t\t$itemqty = $itemqty + $qt ;\n\t\t\t\t\n\t\t\t\t$weght = $this->getOrderItemWeight($item);\n\t\t\t\t$itemweight = $itemweight + $weght ;\n\t\t\t\t$productcode=$item['sku'];//code \n\t\t\t\t//var_dump(is_numeric($item['sku']));\n\n\t\t\t\tif(is_numeric($productcode)){\n\t\t\t\t $stockno = $stockno.$_newProduct->getData('sku').\" , \";}\n\t\t\t\telse{\n\n\t\t\t\t\t$attr = Mage::getModel('catalog/product')->loadByAttribute('sku',$productcode);\n\t\t\t\t\t$stockno = $stockno.$_newProduct->getData('sku').\" , \";\n\n\t\t\t\t}\n\t\t\t\t/*$attr = Mage::getModel('catalog/product')->loadByAttribute('sku',$productcode);\n\t\t\t\t$stockno = $stockno.$_newProduct->getData('sku').\" , \"; */\n\t\t\t\t\n\t\t\t\t$productprice = ($productprice + $item->getData('price')*$qty);\n\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t\n\t\t}\n\t\t$shippedqtynew[]=$sqty;\n\t\t//\n\t\t$order2 = Mage::getModel('sales/order')->load($order->getId());\n\t\t$items = $order2->getAllItems();\n\t\t//$_totalData = $order->getData();\n\t\t/*echo '<pre>';\t\n\t\t\tprint_r($order->getData('base_total_invoiced'));\n\t\texit;*/\n\t\t\t\n\t\t\t$totaltaxnew[]=$order->getData('tax_amount');\n\t\t\t$order_id = $order->getId(); //use your own order id\n\t\t\t$order = Mage::getModel(\"sales/order\")->load($order_id); //load order by order id\n\t\t\t$ordered_items = $order->getAllItems();\n\t\t\t$specialprice=0;\n\t\t\t//echo \"<pre>\";\n\t\t\t//print_r($order->getAllItems());\n\t\t\t//print_r($qty_orderedArray);\n\t\t\t//exit;\n\t\t\t$skucounter=0;\n\t\t\tforeach($ordered_items as $item){\n\t\t\t//item detail\n\t\t\t\t//print_r($item->getData('product_type'));\n\t\t\t\t\tif($item->getData('product_type')=='configurable'){\n\t\t\t\t\t\t$sku=$item->getData('sku');\n\t\t\t\t\t\t$qty_ordered=$item->getData('qty_ordered');\n\t\t\t\t\t\t$itemsArray[$skucounter]=$sku;\n\t\t\t\t\t\t$qty_orderedArray[$skucounter]=$qty_ordered;\n\t\t\t\t\t\t$skucounter++;\n\t\t\t\t\t}\n\t\t\t\t$qty_ordered=$item->getData('qty_ordered');\n\t\t\t\t$attr = Mage::getModel('catalog/product')->loadByAttribute('sku',$sku);\n\t\t\t\t$product_id = Mage::getModel('catalog/product')->getIdBySku($sku);\n\t\t\t\t$parentIds = Mage::getResourceSingleton('catalog/product_type_configurable')->getParentIdsByChild($product_id);\n\t\t\t\tif (isset($parentIds[0])) {\n\t\t\t\t $product = Mage::getModel('catalog/product')->load($parentIds[0]);\n\t\t\t\t $specialprice+=$product->getData('special_price');\n\t\t\t\t /* if($product->getData('product_type')=='simple'){\n\n\t\t\t\t $originalprice=$product->getData();\n\t\t\t\t }*/\n\n\t\t\t\t}\n\t\t\t\telseif($item->getData('product_type')=='simple'){\n\t\t\t\t\t\t$sku=$item->getData('sku');\n\t\t\t\t\t\t$qty_ordered=$item->getData('qty_ordered');\n\t\t\t\t\t\t$itemsArray[$skucounter]=$sku;\n\t\t\t\t\t\t$qty_orderedArray[$skucounter]=$qty_ordered;\n\t\t\t\t\t\t$skucounter++;\n\t\t\t\t}\n\n\t\t\t\t\n\t\t\t\t/*$qty_orderedArray[]=$qty_ordered;*/\n\t\t\t//\t$qty_orderedArray[]=array_unique($qty_orderedArray);\n\t\t\t// etc.\n\t\t\t}\n\t\t\t/*print_r($specialprice);*/\n\t\t\n\t\t\n\t\t/*exit;*/\n\t//\t$itemsArray=array_merge((array)$itemsArray,(array)$qty_orderedArray);\n\n\t\t$indexcounter=0;\n\t\tforeach(array_unique($itemsArray) as $productid){\n\n\t\t $_Pdetails = Mage::getModel('catalog/product')->loadByAttribute('sku',$productid);\n\t\t\n\t\t// $_Pdetails->getPrice();\n\t\t $productprice = $_Pdetails->getData('price');\n\t\t// print_r($_Pdetails->getData());\n\t\t $totalprice=($productprice*($qty_orderedArray[$indexcounter]));\n\t\t//echo '<pre>';\n\t\t//echo $totalprice;\n\t\t//exit;\n\t\t $originalprice+=$totalprice;\n\t\t $indexcounter++;\n\n\t\t}\n\n\t// \t/*echo $totalpricenew;\n\t// \techo \"<pre>\";print_r($itemsArray);\n\t// \t\texit;*/\n\t// \t$itemtitleArray[] = $itemtitle;\n\t// \t$itemqtyArray[] = $itemqty;\n\t// /*\techo '<pre>';\n\t// \tprint_r($originalprice);*/\n\t// \t//print_r($shippedqtynew);\n\t// \t$itemweightArray[] = $itemweight.\"grms\";\n\t// \t$categorytitleArray[] = $categorytitle;\n\t// \t$brands[] = 'FCUK';\n\t// \t$stocknoArray[] = $stockno;\n\t// \t$createdDateArray[] = $createdDate;\n\t// \t$specialpriceArray[]=$specialprice;\n\t// \t$mrpArry[] = $mrp; //kishan\n\t// \t$taxPercentage=(($order->getData('base_subtotal_incl_tax')-$discount)/$tax);\n\n\t// \tif($taxPercentage==''){\n\t// \t\t\t$taxPer='0 %';\n\t// \t}\n\t// \telse\n\t// \t{\n\n\t// \t\t\t$taxPer=$taxPercentage.' %';\n\t// \t}\n\n\t// \tif($originalprice==$mrp){\n\t// \t\t$discountArray[] = $discount;\n\t// \t}else{\n\t// \t\t$discountArray[] = ($originalprice-$mrp)+$discount;\n\t// \t}\n\t// \t//$discountArray[] = $discount; //kishan\n\t// \t$bspArry[] = $mrp-$discount;\n\t// \t$originalPriceArray[] =$originalprice;\n\n\t// \t// $basicsale[]= $order->getData('price_inc_tax');\t\t\n\t// \t$basicsale[]= $mrp;\t\t\n\t// \t$coupon_codeArray[]=$order->getData('coupon_code');\n\t// \t$coupon_amtArray[]=$order->getData('base_discount_amount');\n\t// \t$formulaArray[] = $order->getData('coupon_rule_name');\n\t// \t$assign_dateArray[] = '';\n\t// \t$w_hArray[]='Bhivandi';\n\t// \t$taxarray[]=$tax;\n\t// \t$taxperarray[]=$taxPer;\n\t// \t$state = strtolower($common[6]);\n\t// \t//$tax_type[0] = 'CST';\n\t// \t//echo $state.''.$tax_type[0];\n\t// \t//exit;\n\t// \tif(strtolower($state) == 'maharashtra') {$tax_type[0] = 'VAT';}\n\t// \telse{$tax_type[0] = 'CST';}\n\n\t// \t/*----kishan---*/\n\t// \t$shipCount = count($shipmentArray)-1;\n\t// \tif($shipCount == 3)\n\t// \t{\n\t// \t\tarray_pop($shipmentArray);\n\t// \t}\n\t// //\texit;\n\t// \tif(count($invoiceArray)==2)\n\t// \t{array_pop($invoiceArray);}\n\n\t//exit;\n\t\t//$record = array_merge($common,$categorytitleArray,$brands,$stocknoArray,$mrpArry,$itemtitleArray ,$itemweightArray ,$itemqtyArray ,$bspArry,$invoiceArray,$paymentmethod,$discountArray,$coupon_codeArray,$formulaArray,$assign_dateArray,$w_hArray,$shipmentArray,$airwaybillnoArray,$tax_type,$taxarray);\n\t\t$record = array_merge($common,$categorytitleArray,$brands,$stocknoArray,$itemtitleArray,$itemweightArray,$itemqtyArray,$shippedqtynew,$invoiceArray,$createdDateArray,$originalPriceArray,$mrpArry,$discountArray,$basicsale,$totaltaxnew,$bspArry,$coupon_codeArray,$coupon_amtArray,$formulaArray,$taxperarray,$tax_type,$shipmentArray,$airwaybillnoArray);\n /* print_r($record);\n exit;*/\n fputcsv($fp, $record, self::DELIMITER, self::ENCLOSURE);\n\t\t\n\t\t\n\t\t\n\t \n }", "protected function makeInvoiceOrderOptions()\n\t{\n\t\t$purse = $this->purse;\n\n\t\treturn array_merge($purse->makeInvoiceOrderOptions(), [\n\t\t\t'amount' => $this->amount,\n\t\t]);\n\t}", "private function addHeaderDetails(){ \n $headerCount = $this->createElement('select', 'headerCount')\n ->addMultiOptions(array('1' => '1 - Header', '2' => '2 - Header', '3' => '3 - Header'))\n ->setValue('3');\n \n $highPressure = $this->createElement('text', 'highPressure')\n ->setAttrib('style', 'width: 60px;')\n ->setRequired(true)\n ->addValidator($this->isFloat,true)\n ->addValidator('between', true, array('min' => $this->mS->minPressure(), 'max' => $this->mS->critPressure(), 'inclusive' => true));\n $mediumPressure = $this->createElement('text', 'mediumPressure')\n ->setAttrib('style', 'width: 60px;');\n $lowPressure = $this->createElement('text', 'lowPressure')\n ->setAttrib('style', 'width: 60px;');\n $hpSteamUsage = $this->createElement('text', 'hpSteamUsage')\n ->setAttrib('style', 'width: 60px;')\n ->setRequired(true)\n ->addValidator($this->isFloat,true);\n $mpSteamUsage = $this->createElement('text', 'mpSteamUsage')\n ->setAttrib('style', 'width: 60px;');\n $lpSteamUsage = $this->createElement('text', 'lpSteamUsage')\n ->setAttrib('style', 'width: 60px;');\n\n $this->addElements(array(\n $headerCount,\n $highPressure,\n $mediumPressure,\n $lowPressure,\n $hpSteamUsage,\n $mpSteamUsage,\n $lpSteamUsage,\n )); \n \n $condReturnTemp = $this->createElement('text', 'condReturnTemp')\n ->setValue(round($this->mS->localize(338.705556, 'temperature')))\n ->setAttrib('style', 'width: 60px;')\n ->setRequired(true)\n ->addValidator($this->isFloat,true);\n \n $condReturnFlash = $this->createElement('select', 'condReturnFlash')\n ->addMultiOptions(array('No' => 'No', 'Yes' => 'Yes'))\n ->setValue('No');\n $hpCondReturnRate = $this->createElement('text', 'hpCondReturnRate')\n ->setAttrib('style', 'width: 60px;')\n ->setRequired(true)\n ->addValidator($this->isFloat,true)\n ->addValidator('between', true, array('min' => 0, 'max' => 100, 'inclusive' => true));\n $mpCondReturnRate = $this->createElement('text', 'mpCondReturnRate')\n ->setAttrib('style', 'width: 60px;');\n $lpCondReturnRate = $this->createElement('text', 'lpCondReturnRate')\n ->setAttrib('style', 'width: 60px;');\n $hpCondFlash = $this->createElement('select', 'hpCondFlash')\n ->addMultiOptions(array('No' => 'No', 'Yes' => 'Yes'))\n ->setValue('No');\n $mpCondFlash = $this->createElement('select', 'mpCondFlash')\n ->addMultiOptions(array('No' => 'No', 'Yes' => 'Yes'))\n ->setValue('No');\n\n $this->addElements(array(\n $condReturnTemp,\n $condReturnFlash,\n $hpCondReturnRate,\n $mpCondReturnRate,\n $lpCondReturnRate,\n $hpCondFlash,\n $mpCondFlash,\n ));\n \n $hpHeatLossPercent = $this->createElement('text', 'hpHeatLossPercent')\n ->setValue(.1)\n ->setAttrib('style', 'width: 60px;');\n $mpHeatLossPercent= $this->createElement('text', 'mpHeatLossPercent')\n ->setValue(.1)\n ->setAttrib('style', 'width: 60px;');\n $lpHeatLossPercent = $this->createElement('text', 'lpHeatLossPercent')\n ->setValue(.1)\n ->setAttrib('style', 'width: 60px;');\n\n $this->addElements(array(\n $hpHeatLossPercent,\n $mpHeatLossPercent,\n $lpHeatLossPercent,\n ));\n }", "public function addOrder(IncidentOrder $order)\n {\n $this->orders[] = $order;\n }", "public function htheme_add_params(){\r\n\r\n\t\t#VC ROW PARAMS\r\n\t\tvc_add_param(\"vc_row\", array(\r\n\t\t\t\"type\" => \"dropdown\",\r\n\t\t\t\"class\" => \"\",\r\n\t\t\t\"heading\" => \"Padding (Row)\",\r\n\t\t\t'category' => esc_html__( 'Content', 'js_composer' ),\r\n\t\t\t\"param_name\" => \"row_padding\",\r\n\t\t\t\"value\" => array(\r\n\t\t\t\t\"None\" => \"none\",\r\n\t\t\t\t\"Top and Bottom\" => \"row_padding_top_bottom\",\r\n\t\t\t\t\"Top Only\" => \"row_padding_top\",\r\n\t\t\t\t\"Bottom Only\" => \"row_padding_bottom\",\r\n\t\t\t),\r\n\t\t\t'description' => esc_html__( 'Select the row padding (Top, Bottom)', 'js_composer' ),\r\n\t\t));\r\n\r\n\t\tvc_add_param(\"vc_row\", array(\r\n\t\t\t\"type\" => \"dropdown\",\r\n\t\t\t\"class\" => \"\",\r\n\t\t\t\"heading\" => \"Margin (Row)\",\r\n\t\t\t'category' => esc_html__( 'Content', 'js_composer' ),\r\n\t\t\t\"param_name\" => \"row_margin\",\r\n\t\t\t\"value\" => array(\r\n\t\t\t\t\"Top and Bottom\" => \"row_margin_top_bottom\",\r\n\t\t\t\t\"Top Only\" => \"row_margin_top\",\r\n\t\t\t\t\"Bottom Only\" => \"row_margin_bottom\",\r\n\t\t\t\t\"None\" => \"none\",\r\n\t\t\t),\r\n\t\t\t'description' => esc_html__( 'Select the row margin (Top, Bottom)', 'js_composer' ),\r\n\t\t));\r\n\r\n\t}", "public function setOrderId(?string $orderId): void\n {\n $this->orderId['value'] = $orderId;\n }" ]
[ "0.6893543", "0.66271985", "0.50689024", "0.500348", "0.492922", "0.48778266", "0.4831944", "0.47964516", "0.4695043", "0.46430802", "0.45269144", "0.45197955", "0.45169586", "0.4503442", "0.44111094", "0.43940845", "0.43845317", "0.43645632", "0.4337013", "0.43304616", "0.43145525", "0.4312633", "0.43040296", "0.43030113", "0.42320958", "0.42275372", "0.42143276", "0.42097282", "0.4207199", "0.42026532", "0.4193738", "0.41692567", "0.41681492", "0.41665918", "0.41536012", "0.41502696", "0.41139418", "0.41127", "0.41118488", "0.4106258", "0.41036654", "0.40999022", "0.4098771", "0.40981385", "0.40960225", "0.40911543", "0.40861785", "0.40835208", "0.40833762", "0.40826425", "0.4068305", "0.40613127", "0.40605265", "0.4055129", "0.40482888", "0.40421343", "0.40398258", "0.4030083", "0.40270427", "0.40214804", "0.40207055", "0.4017655", "0.40109092", "0.40035087", "0.39969772", "0.3996357", "0.39952627", "0.39876065", "0.39860266", "0.39836344", "0.39780393", "0.39533642", "0.39500764", "0.3948143", "0.39438522", "0.39344305", "0.3928377", "0.39267862", "0.39172667", "0.3915539", "0.39144242", "0.39066637", "0.3906234", "0.39061025", "0.39018574", "0.38997298", "0.38986048", "0.3897728", "0.38972732", "0.38965315", "0.38933155", "0.38924092", "0.38882416", "0.38879827", "0.38871583", "0.38859293", "0.38809717", "0.38751972", "0.3875131", "0.3874876" ]
0.7771888
0
Add HVTOrderParams to OrderDetails.
public function addHVTOrderParams( HVTContext $hvtContext ): OrderDetailsBuilder { $xmlHVTOrderParams = $this->dom->createElement('HVTOrderParams'); $this->instance->appendChild($xmlHVTOrderParams); $xmlPartnerID = $this->dom->createElement('PartnerID'); $xmlPartnerID->nodeValue = $hvtContext->getPartnerId(); $xmlHVTOrderParams->appendChild($xmlPartnerID); // Add Service to HVDOrderParams. $xmlService = $this->dom->createElement('Service'); $xmlHVTOrderParams->appendChild($xmlService); // Add ServiceName to Service. $xmlServiceName = $this->dom->createElement('ServiceName'); $xmlServiceName->nodeValue = $hvtContext->getServiceName(); $xmlService->appendChild($xmlServiceName); // Add optional Scope to Service. if (null !== $hvtContext->getScope()) { $xmlScope = $this->dom->createElement('Scope'); $xmlScope->nodeValue = $hvtContext->getScope(); $xmlService->appendChild($xmlScope); } // Add optional ServiceOption to Service. if (null !== $hvtContext->getServiceOption()) { $xmlServiceOption = $this->dom->createElement('ServiceOption'); $xmlServiceOption->nodeValue = $hvtContext->getServiceOption(); $xmlService->appendChild($xmlServiceOption); } // Add MsgName to Service. $xmlMsgName = $this->dom->createElement('MsgName'); $xmlMsgName->nodeValue = $hvtContext->getMsgName(); $xmlService->appendChild($xmlMsgName); // Add OrderID to HVTOrderParams. $xmlOrderID = $this->dom->createElement('OrderID'); $xmlOrderID->nodeValue = $hvtContext->getOrderId(); $xmlHVTOrderParams->appendChild($xmlOrderID); // Add OrderFlags to HVTOrderParams. $xmlOrderFlags = $this->dom->createElement('OrderFlags'); $xmlOrderFlags->setAttribute( 'completeOrderData', $hvtContext->getCompleteOrderData() ? 'true' : 'false' ); $xmlOrderFlags->setAttribute( 'fetchLimit', (string)$hvtContext->getFetchLimit() ); $xmlOrderFlags->setAttribute( 'fetchOffset', (string)$hvtContext->getFetchOffset() ); $xmlHVTOrderParams->appendChild($xmlOrderFlags); return $this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function addHVEOrderParams(\n HVEContext $hveContext\n ): OrderDetailsBuilder {\n $xmlHVEOrderParams = $this->dom->createElement('HVEOrderParams');\n $this->instance->appendChild($xmlHVEOrderParams);\n\n $xmlPartnerID = $this->dom->createElement('PartnerID');\n $xmlPartnerID->nodeValue = $hveContext->getPartnerId();\n $xmlHVEOrderParams->appendChild($xmlPartnerID);\n\n // Add Service to HVEOrderParams.\n $xmlService = $this->dom->createElement('Service');\n $xmlHVEOrderParams->appendChild($xmlService);\n\n // Add ServiceName to Service.\n $xmlServiceName = $this->dom->createElement('ServiceName');\n $xmlServiceName->nodeValue = $hveContext->getServiceName();\n $xmlService->appendChild($xmlServiceName);\n\n // Add optional Scope to Service.\n if (null !== $hveContext->getScope()) {\n $xmlScope = $this->dom->createElement('Scope');\n $xmlScope->nodeValue = $hveContext->getScope();\n $xmlService->appendChild($xmlScope);\n }\n\n // Add optional ServiceOption to Service.\n if (null !== $hveContext->getServiceOption()) {\n $xmlServiceOption = $this->dom->createElement('ServiceOption');\n $xmlServiceOption->nodeValue = $hveContext->getServiceOption();\n $xmlService->appendChild($xmlServiceOption);\n }\n\n // Add MsgName to Service.\n $xmlMsgName = $this->dom->createElement('MsgName');\n $xmlMsgName->nodeValue = $hveContext->getMsgName();\n $xmlService->appendChild($xmlMsgName);\n\n // Add OrderID to HVEOrderParams.\n $xmlOrderID = $this->dom->createElement('OrderID');\n $xmlOrderID->nodeValue = $hveContext->getOrderId();\n $xmlHVEOrderParams->appendChild($xmlOrderID);\n\n return $this;\n }", "public function addHVDOrderParams(\n HVDContext $hvdContext\n ): OrderDetailsBuilder {\n $xmlHVDOrderParams = $this->dom->createElement('HVDOrderParams');\n $this->instance->appendChild($xmlHVDOrderParams);\n\n $xmlPartnerID = $this->dom->createElement('PartnerID');\n $xmlPartnerID->nodeValue = $hvdContext->getPartnerId();\n $xmlHVDOrderParams->appendChild($xmlPartnerID);\n\n // Add Service to HVDOrderParams.\n $xmlService = $this->dom->createElement('Service');\n $xmlHVDOrderParams->appendChild($xmlService);\n\n // Add ServiceName to Service.\n $xmlServiceName = $this->dom->createElement('ServiceName');\n $xmlServiceName->nodeValue = $hvdContext->getServiceName();\n $xmlService->appendChild($xmlServiceName);\n\n // Add optional Scope to Service.\n if (null !== $hvdContext->getScope()) {\n $xmlScope = $this->dom->createElement('Scope');\n $xmlScope->nodeValue = $hvdContext->getScope();\n $xmlService->appendChild($xmlScope);\n }\n\n // Add optional ServiceOption to Service.\n if (null !== $hvdContext->getServiceOption()) {\n $xmlServiceOption = $this->dom->createElement('ServiceOption');\n $xmlServiceOption->nodeValue = $hvdContext->getServiceOption();\n $xmlService->appendChild($xmlServiceOption);\n }\n\n // Add MsgName to Service.\n $xmlMsgName = $this->dom->createElement('MsgName');\n $xmlMsgName->nodeValue = $hvdContext->getMsgName();\n $xmlService->appendChild($xmlMsgName);\n\n // Add OrderID to HVDOrderParams.\n $xmlOrderID = $this->dom->createElement('OrderID');\n $xmlOrderID->nodeValue = $hvdContext->getOrderId();\n $xmlHVDOrderParams->appendChild($xmlOrderID);\n\n return $this;\n }", "public function addBTUOrderParams(\n BTUContext $btuContext\n ): OrderDetailsBuilder {\n $xmlBTUOrderParams = $this->dom->createElement('BTUOrderParams');\n $xmlBTUOrderParams->setAttribute('fileName', $btuContext->getFileName());\n $this->instance->appendChild($xmlBTUOrderParams);\n\n // Add Service to BTUOrderParams.\n $xmlService = $this->dom->createElement('Service');\n $xmlBTUOrderParams->appendChild($xmlService);\n\n // Add ServiceName to Service.\n $xmlServiceName = $this->dom->createElement('ServiceName');\n $xmlServiceName->nodeValue = $btuContext->getServiceName();\n $xmlService->appendChild($xmlServiceName);\n\n // Add optional Scope to Service.\n if (null !== $btuContext->getScope()) {\n $xmlScope = $this->dom->createElement('Scope');\n $xmlScope->nodeValue = $btuContext->getScope();\n $xmlService->appendChild($xmlScope);\n }\n\n // Add optional ServiceOption to Service.\n if (null !== $btuContext->getServiceOption()) {\n $xmlServiceOption = $this->dom->createElement('ServiceOption');\n $xmlServiceOption->nodeValue = $btuContext->getServiceOption();\n $xmlService->appendChild($xmlServiceOption);\n }\n\n // Add optional ContainerFlag to Service.\n if (null !== $btuContext->getContainerFlag()) {\n $xmlContainerFlag = $this->dom->createElement('ContainerFlag');\n $xmlContainerFlag->nodeValue = $btuContext->getContainerFlag();\n $xmlService->appendChild($xmlContainerFlag);\n }\n\n // Add MsgName to Service.\n $xmlMsgName = $this->dom->createElement('MsgName');\n $xmlMsgName->nodeValue = $btuContext->getMsgName();\n $xmlService->appendChild($xmlMsgName);\n\n // Add optional MsgName version attribute\n if (null !== $btuContext->getMsgNameVersion()) {\n $xmlMsgName->setAttribute(\n 'version',\n $btuContext->getMsgNameVersion()\n );\n }\n\n // Add optional MsgName variant attribute\n if (null !== $btuContext->getMsgNameVariant()) {\n $xmlMsgName->setAttribute(\n 'variant',\n $btuContext->getMsgNameVariant()\n );\n }\n\n // Add optional MsgName format attribute\n if (null !== $btuContext->getMsgNameFormat()) {\n $xmlMsgName->setAttribute(\n 'format',\n $btuContext->getMsgNameFormat()\n );\n }\n\n return $this;\n }", "public function addBTDOrderParams(\n BTFContext $btfContext,\n ?DateTimeInterface $startDateTime = null,\n ?DateTimeInterface $endDateTime = null\n ): OrderDetailsBuilder {\n $xmlBTDOrderParams = $this->dom->createElement('BTDOrderParams');\n $this->instance->appendChild($xmlBTDOrderParams);\n\n // Add Service to BTDOrderParams.\n $xmlService = $this->dom->createElement('Service');\n $xmlBTDOrderParams->appendChild($xmlService);\n\n // Add ServiceName to Service.\n $xmlServiceName = $this->dom->createElement('ServiceName');\n $xmlServiceName->nodeValue = $btfContext->getServiceName();\n $xmlService->appendChild($xmlServiceName);\n\n // Add optional Scope to Service.\n if (null !== $btfContext->getScope()) {\n $xmlScope = $this->dom->createElement('Scope');\n $xmlScope->nodeValue = $btfContext->getScope();\n $xmlService->appendChild($xmlScope);\n }\n\n // Add optional ServiceOption to Service.\n if (null !== $btfContext->getServiceOption()) {\n $xmlServiceOption = $this->dom->createElement('ServiceOption');\n $xmlServiceOption->nodeValue = $btfContext->getServiceOption();\n $xmlService->appendChild($xmlServiceOption);\n }\n\n // Add optional ContainerFlag to Service.\n if (null !== $btfContext->getContainerFlag()) {\n $xmlContainerFlag = $this->dom->createElement('ContainerFlag');\n $xmlContainerFlag->nodeValue = $btfContext->getContainerFlag();\n $xmlService->appendChild($xmlContainerFlag);\n }\n\n // Add MsgName to Service.\n $xmlMsgName = $this->dom->createElement('MsgName');\n $xmlMsgName->nodeValue = $btfContext->getMsgName();\n $xmlService->appendChild($xmlMsgName);\n\n // Add optional MsgName version attribute\n if (null !== $btfContext->getMsgNameVersion()) {\n $xmlMsgName->setAttribute(\n 'version',\n $btfContext->getMsgNameVersion()\n );\n }\n\n // Add optional MsgName variant attribute\n if (null !== $btfContext->getMsgNameVariant()) {\n $xmlMsgName->setAttribute(\n 'variant',\n $btfContext->getMsgNameVariant()\n );\n }\n\n // Add optional MsgName format attribute\n if (null !== $btfContext->getMsgNameFormat()) {\n $xmlMsgName->setAttribute(\n 'format',\n $btfContext->getMsgNameFormat()\n );\n }\n\n if (null !== $startDateTime && null !== $endDateTime) {\n // Add DateRange to BTDOrderParams.\n $xmlDateRange = $this->createDateRange(\n $startDateTime,\n $endDateTime\n );\n $xmlBTDOrderParams->appendChild($xmlDateRange);\n }\n\n return $this;\n }", "protected function _addPaymentDetailsElement($order)\n {\n $paymentDetailsElement = $order->addChild('paymentDetails');\n if (isset($this->paymentDetails['tokenCode'])) {\n $this->_addPaymentDetailsForTokenOrder($paymentDetailsElement);\n } else {\n $this->_addPaymentDetailsForCreditCardOrder($paymentDetailsElement);\n }\n $session = $paymentDetailsElement->addChild('session');\n $session['id'] = $this->paymentDetails['sessionId'];\n $session['shopperIPAddress'] = $this->paymentDetails['shopperIpAddress'];\n\n if ($this->paResponse) {\n $info3DSecure = $paymentDetailsElement->addChild('info3DSecure');\n $info3DSecure->addChild('paResponse', $this->paResponse);\n }\n }", "function setOrder(array $orderParams)\n {\n foreach ($orderParams as $row)\n {\n if (is_array($this->{$row['name']}))\n array_push($this->{$row['name']}, $row['value']);\n else\n $this->{$row['name']} = $row['value'];\n }\n }", "public function addOrder(Order $order);", "public function insertOrderDetails($value,$line_item, $mainOrderId)\n {\n //main order\n $order_list_arr['name'] = $value->name;\n $order_list_arr['shpoify_order_id'] = $value->id;\n $order_list_arr['line_item_id'] = $line_item->id;\n $order_list_arr['order_number'] = $value->order_number;\n $order_list_arr['customer_name'] = $value->billing_address->name;\n $order_list_arr['app_id'] = $value->app_id;\n $order_list_arr['checkout_id'] = $value->checkout_id;\n $order_list_arr['token'] = $value->token;\n $order_list_arr['gateway'] = $value->gateway;\n $order_list_arr['total_price'] = $value->total_price;\n $order_list_arr['subtotal_price'] = $value->subtotal_price;\n $order_list_arr['currency'] = $value->currency;\n $order_list_arr['cart_token'] = $value->cart_token;\n $order_list_arr['checkout_token'] = $value->checkout_token;\n $order_list_arr['order_status_url'] = $value->order_status_url;\n\n return OrderDetails::insertGetId($order_list_arr);\n\n }", "public function processVoucherAddRequest(Order $order, array $data);", "public function addOrder(IncidentOrder $order)\n {\n $this->orders[] = $order;\n }", "private function addQuoteExtensionAttributesToOrder($order)\n {\n $quoteId = $order->getQuoteId();\n\n /** @var \\Magento\\Quote\\Model\\Quote $mageQuote */\n $mageQuote = $this->mageQuoteFactory->create()->load($quoteId);\n if (!$mageQuote->getId() || !$mageQuote->getLinkedQuotationId()) {\n //no mage quote data available or no quotation quote linked\n return $order;\n }\n\n $quotationId = $mageQuote->getLinkedQuotationId();\n\n /** @var Quote $quotation */\n $quotation = $this->quoteFactory->create()->load($quotationId);\n if (!$quotation->getId()) {\n //no quote data available\n return $order;\n }\n\n $extensionAttributes = $order->getExtensionAttributes();\n if ($extensionAttributes === null) {\n $extensionAttributes = $this->orderExtensionFactory->create();\n }\n\n //modify extension attributes, add the quote increment id\n $extensionAttributes->setQuoteationIncrementId($quotation->getIncrementId());\n\n //add a backend url\n $backendUrl = $this->backendUrl->getUrl(\n 'quotation/quote/view',\n ['quote_id' => $quotation->getId()]\n );\n $extensionAttributes->setQuoteationBackendUrl($backendUrl);\n\n //set extension attributes\n $order->setExtensionAttributes($extensionAttributes);\n\n return $order;\n }", "public function addDescriptionParams()\n {\n $oBasket = $this->getBasket();\n $oConfig = $this->getPayPalConfig();\n $oRequest = $this->getPayPalRequest();\n\n // description\n $sShopNameFull = $oConfig->getBrandName();\n $sShopName = substr($sShopNameFull, 0, 70);\n if ($sShopNameFull != $sShopName) {\n $sShopName .= \"...\";\n }\n\n $sSubj = sprintf($this->getLang()->translateString(\"OEPAYPAL_ORDER_SUBJECT\"), $sShopName, $oBasket->getFPrice(), $oBasket->getBasketCurrency()->name);\n $oRequest->setParameter(\"PAYMENTREQUEST_0_DESC\", $sSubj);\n $oRequest->setParameter(\"PAYMENTREQUEST_0_CUSTOM\", $sSubj);\n }", "function campaignEcommAddOrder($order) {\n $params = array();\n $params[\"order\"] = $order;\n return $this->callServer(\"campaignEcommAddOrder\", $params);\n }", "public function addOrderStatusUpdate(OrderEvent $event)\n {\n $order = $event->getOrder();\n $statusUpdate = new OrderStatusUpdate();\n $statusUpdate->setStatus($order->getStatus());\n $statusUpdate->setOrigin($event->getOrigin());\n $order->addStatusUpdate($statusUpdate);\n }", "private function _createOrderLines($virtuemart_order_id, $cart)\n {\n $_orderItems = $this->getTable('order_items');\n\n foreach ($cart->products as $priceKey => $product) {\n\n if (!empty($product->customProductData)) {\n $_orderItems->product_attribute = vmJsApi::safe_json_encode($product->customProductData);\n } else {\n $_orderItems->product_attribute = '';\n }\n\n\n $_orderItems->virtuemart_order_item_id = null;\n $_orderItems->virtuemart_order_id = $virtuemart_order_id;\n\n $_orderItems->virtuemart_vendor_id = $product->virtuemart_vendor_id;\n $_orderItems->virtuemart_product_id = $product->virtuemart_product_id;\n $_orderItems->order_item_sku = $product->product_sku;\n $_orderItems->order_item_name = $product->product_name;\n $_orderItems->product_quantity = $product->quantity;\n $_orderItems->product_item_price = $product->allPrices[$product->selectedPrice]['basePriceVariant'];\n $_orderItems->product_basePriceWithTax = $product->allPrices[$product->selectedPrice]['basePriceWithTax'];\n\n //$_orderItems->product_tax = $_cart->pricesUnformatted[$priceKey]['subtotal_tax_amount'];\n $_orderItems->product_tax = $product->allPrices[$product->selectedPrice]['taxAmount'];\n $_orderItems->product_final_price = $product->allPrices[$product->selectedPrice]['salesPrice'];\n $_orderItems->product_subtotal_discount = $product->allPrices[$product->selectedPrice]['subtotal_discount'];\n $_orderItems->product_subtotal_with_tax = $product->allPrices[$product->selectedPrice]['subtotal_with_tax'];\n $_orderItems->product_priceWithoutTax = $product->allPrices[$product->selectedPrice]['priceWithoutTax'];\n $_orderItems->product_discountedPriceWithoutTax = $product->allPrices[$product->selectedPrice]['discountedPriceWithoutTax'];\n $_orderItems->order_status = 'P';\n\n if (!$_orderItems->check()) {\n return false;\n }\n //The check may set here a wrong vendorId, we replace it again with the right one.\n $_orderItems->virtuemart_vendor_id = $product->virtuemart_vendor_id;\n\n // Save the record to the database\n if (!$_orderItems->store()) {\n return false;\n }\n\n $product->virtuemart_order_item_id = $_orderItems->virtuemart_order_item_id;\n\n $this->handleStockAfterStatusChangedPerProduct($_orderItems->order_status, 'N', $_orderItems, $_orderItems->product_quantity);\n }\n\n return true;\n }", "private function create_order_record($id_order) {\n $aux['details'] = $this->m_orders_overview->get_details($id_order);\n\n $record['id_order'] = null; // auto-increment\n $record['id_menu_order'] = $id_order;\n $record['id_table'] = $aux['details'][0]->id_table;\n $record['id_count_ks'] = $aux['details'][0]->id_count_ks;\n $record['date_pay'] = date(\"Y-m-d\");\n\n $record['id_employee'] = $aux['details'][0]->id_employee;\n $record['pay_method'] = 'hotovost';\n $record['sum_price'] = $aux['details'][0]->price;\n $record['is_closed'] = 0;\n\n $this->m_orders_overview->insert_new_order_record($record);\n }", "public function addOrder($ord) {\n $this->sql .= \" ORDER BY $ord\";\n }", "private function prepareOrderDetailsConfirmationMailData($orderModel)\n {\n $details = Shopware()->Db()->fetchAll(\n 'SELECT * FROM s_order_details WHERE orderID = ?',\n [$orderModel->getId()]\n );\n\n //we need to fake a shop instance if we want to use the Articles Module\n $shop = Shopware()->Models()->getRepository('Shopware\\Models\\Shop\\Shop')->getActiveById($orderModel->getLanguageSubShop()->getId());\n $shop->registerResources(Shopware()->Bootstrap());\n\n foreach ($details as &$detail) {\n /** @var Shopware\\Models\\Article\\Repository $articleDetailRepository */\n $articleDetailRepository = Shopware()->Models()->getRepository('Shopware\\Models\\Article\\Detail');\n /** @var Shopware\\Models\\Article\\Detail[] $articleDetailModel */\n $articleDetailModel = $articleDetailRepository->findBy(['number' => $detail['articleordernumber']]);\n /** @var Shopware\\Models\\Article\\Detail $articleDetailModel */\n $articleDetailModel = $articleDetailModel[0];\n\n $detail['articlename'] = $detail['name'];\n unset($detail['name']);\n\n $detail['userID'] = $orderModel->getCustomer()->getId();\n\n $detail['ordernumber'] = $detail['articleordernumber'];\n unset($detail['articleordernumber']);\n\n $detail['currencyFactor'] = $orderModel->getCurrencyFactor();\n $detail['mainDetailId'] = $articleDetailModel->getArticle()->getMainDetail()->getId();\n $detail['articleDetailId'] = $articleDetailModel->getId();\n $detail['instock'] = $articleDetailModel->getInStock();\n\n $detail['taxID'] = $articleDetailModel->getArticle()->getTax()->getId();\n if ($orderModel->getNet()) {\n $detail['taxID'] = 0;\n }\n\n $detail['maxpurchase'] = $articleDetailModel->getMaxPurchase();\n $detail['minpurchase'] = $articleDetailModel->getMinPurchase();\n $detail['purchasesteps'] = $articleDetailModel->getPurchaseSteps();\n $detail['stockmin'] = $articleDetailModel->getStockMin();\n $detail['suppliernumber'] = $articleDetailModel->getSupplierNumber();\n $detail['laststock'] = $articleDetailModel->getArticle()->getLastStock();\n $detail['purchaseunit'] = $articleDetailModel->getPurchaseUnit();\n $detail['releasedate'] = $articleDetailModel->getReleaseDate();\n $detail['modus'] = $articleDetailModel->getArticle()->getMode();\n $detail['datum'] = $orderModel->getOrderTime()->format('Y-m-d H:i:s');\n $detail['esdarticle'] = $articleDetailModel->getEsd();\n $detail['netprice'] = $this->calculateNetPrice($detail['price'], $detail['tax_rate']);\n $detail['amount'] = $detail['price'] * $detail['quantity'];\n $detail['amountnet'] = $detail['netprice'] * $detail['quantity'];\n $detail['priceNumeric'] = $detail['price'];\n\n /**\n * order basket attributes fake\n */\n $detail['ob_attr1'] = '';\n $detail['ob_attr2'] = '';\n $detail['ob_attr3'] = '';\n $detail['ob_attr4'] = '';\n $detail['ob_attr5'] = '';\n $detail['ob_attr6'] = '';\n\n $detail['partnerID'] = '';\n $detail['shippinginfo'] = 1;\n\n if ($articleDetailModel->getUnit()) {\n $detail['unitID'] = $articleDetailModel->getUnit()->getId();\n }\n\n $detail['additional_details'] = Shopware()->Modules()->Articles()->sGetProductByOrdernumber($detail['ordernumber']);\n }\n\n return $details;\n }", "public function appendOrderTracking(\\service\\message\\common\\KeyValueItem $value)\n {\n return $this->append(self::order_tracking, $value);\n }", "public static function addPartyOrderRequest($poRequestParamDetails){\n $connection = Yii::app()->db;\n $sqlColumnNames = \"\";\n $sqlValues = \"\";\n $lastInsertedId = false;\n if(array_key_exists('partyorder_no', $poRequestParamDetails)){\n if($poRequestParamDetails['partyorder_no']!=''){\n $sqlColumnNames.=\" partyorder_no,\";\n $sqlValues.=\"'\".$poRequestParamDetails['partyorder_no'].\"',\";\n }\n }\n if(array_key_exists('user_sessionid', $poRequestParamDetails)){\n if($poRequestParamDetails['user_sessionid']!=''){\n $sqlColumnNames.=\" user_sessionid,\";\n $sqlValues.=\"'\".$poRequestParamDetails['user_sessionid'].\"',\";\n }\n }\n if(array_key_exists('user_id', $poRequestParamDetails)){\n if($poRequestParamDetails['user_id']!=''){\n $sqlColumnNames.=\" user_id,\";\n $sqlValues.=\"'\".$poRequestParamDetails['user_id'].\"',\";\n }\n }\n if(array_key_exists('occassion_title', $poRequestParamDetails)){\n if($poRequestParamDetails['occassion_title']!=''){\n $sqlColumnNames.=\" occassion_title,\";\n $sqlValues.=\"'\".$poRequestParamDetails['occassion_title'].\"',\";\n }\n }\n if(array_key_exists('nos_person', $poRequestParamDetails)){\n if($poRequestParamDetails['nos_person']!=''){\n $sqlColumnNames.=\" nos_person,\";\n $sqlValues.=\"'\".$poRequestParamDetails['nos_person'].\"',\";\n }\n }\n if(array_key_exists('party_date', $poRequestParamDetails)){\n if($poRequestParamDetails['party_date']!=''){\n $sqlColumnNames.=\" party_date,\";\n $sqlValues.=\"'\".$poRequestParamDetails['party_date'].\"',\";\n }\n }\n if(array_key_exists('party_venue', $poRequestParamDetails)){\n if($poRequestParamDetails['party_venue']!=''){\n $sqlColumnNames.=\" party_venue,\";\n $sqlValues.=\"'\".$poRequestParamDetails['party_venue'].\"',\";\n }\n }\n if(array_key_exists('party_requirements', $poRequestParamDetails)){\n if($poRequestParamDetails['party_requirements']!=''){\n $sqlColumnNames.=\" party_requirements,\";\n $sqlValues.=\"'\".$poRequestParamDetails['party_requirements'].\"',\";\n }\n }\n if(array_key_exists('file', $poRequestParamDetails)){\n if($poRequestParamDetails['file']!=''){\n $sqlColumnNames.=\" file,\";\n $sqlValues.=\"'\".$poRequestParamDetails['file'].\"',\";\n }\n }\n if(array_key_exists('created_by', $poRequestParamDetails)){\n if($poRequestParamDetails['created_by']!=''){\n $sqlColumnNames.=\" created_by,\";\n $sqlValues.=\"'\".$poRequestParamDetails['created_by'].\"',\";\n }\n }\n if(array_key_exists('status', $poRequestParamDetails)){\n if($poRequestParamDetails['status']!=''){\n $sqlColumnNames.=\" status,\";\n $sqlValues.=\"'\".$poRequestParamDetails['status'].\"',\";\n }\n }\n if($sqlValues!='' && $sqlColumnNames!=''){\n $poRequestParamDetails['created_datedtime'] = date('Y-m-d H:i:s');\n $sqlColumnNames.=\" created_datedtime,\";\n $sqlValues.=\"'\".$poRequestParamDetails['created_datedtime'].\"',\";\n $sqlQuery = \" INSERT INTO DK_PARTYORDERS_REQUEST \" .rtrim(\"(\".$sqlColumnNames, ',').\") \".rtrim(\" VALUES(\".$sqlValues, ',').\")\";\n $command = $connection->createCommand($sqlQuery);\n $result = $command->execute();\n if($result>=1){\n $lastInsertedId = $connection->getLastInsertID();\n }\n }\n return $lastInsertedId;\n }", "public function setExtraParams($params = array()) {\n $params['resulturl'] = $params['ipn_url'];\n $params['returnurl'] = $params['return_url'];\n $params['reference'] = $params['vendor_order_id'];\n $params['authemail'] = '';\n $params['id'] = $this->_gatewayInfo->config['integration_id'];\n $params['integration_key'] = $this->_gatewayInfo->config['integration_key'];\n $params['status'] = 'Message';\n return $params;\n }", "private function setParams()\n {\n $this->params['MERCHANTNUMBER'] = $this->merchantNumber;\n $this->params['OPERATION'] = 'CREATE_ORDER';\n $this->params['ORDERNUMBER'] = $this->operation->getOrderNumber();\n $this->params['AMOUNT'] = $this->operation->getAmount();\n $this->params['CURRENCY'] = $this->operation->getCurrency();\n $this->params['DEPOSITFLAG'] = $this->depositFlag;\n if($this->operation->getMerOrderNum())\n $this->params['MERORDERNUM'] = $this->operation->getMerOrderNum();\n $this->params['URL'] = $this->url;\n\n if($this->operation->getDescription())\n $this->params['DESCRIPTION'] = $this->operation->getDescription();\n if($this->operation->getMd())\n $this->params['MD'] = $this->operation->getMd();\n\n }", "function buildOrderParams() \n\t{\n\t\tif ($this->sortByGroup === false && $this->sortField != \"\"){\n\t\t\t$this->strOrderBy = \"Order by \".$this->sortField;\n\t\t\tif ($this->sortOrder == \"A\")\n\t\t\t\t$this->strOrderBy .= \" asc\";\n\t\t\telse \n\t\t\t\t$this->strOrderBy .= \" desc\";\n\t\t}\n\t}", "public function initOrderDetail(&$orderItem, $item) {\n $payMethod = array('pm_id' => '',\n 'title' => $item['payment_method'],\n 'description' => '');\n\n $orderItem = array('order_id' => $item['order_id'],\n 'display_id' => $item['order_id'], //show id\n 'uname' => $item['shipping_firstname'] . ' ' . $item['shipping_lastname'],\n 'currency' => $item['currency_code'],\n 'shipping_address' => array(),\n 'billing_address' => array(),\n 'payment_method' => $payMethod,\n 'shipping_insurance' => '',\n 'coupon' => $item['coupon_id'],\n 'order_status' => array(),\n 'last_status_id' => $item['order_status_id'], //get current status from history\n 'order_tax' => $item['fax'],\n 'order_date_start' => $item['date_added'],\n 'order_date_finish' => '',\n 'order_date_purchased' => $item['date_modified']);\n }", "private function updateOrderData()\n {\n $sign = $this->connector->signRequestKid(\n null,\n $this->connector->accountURL,\n $this->orderURL\n );\n\n $post = $this->connector->post($this->orderURL, $sign);\n if (strpos($post['header'], \"200 OK\") !== false) {\n $this->status = $post['body']['status'];\n $this->expires = $post['body']['expires'];\n $this->identifiers = $post['body']['identifiers'];\n $this->authorizationURLs = $post['body']['authorizations'];\n $this->finalizeURL = $post['body']['finalize'];\n if (array_key_exists('certificate', $post['body'])) {\n $this->certificateURL = $post['body']['certificate'];\n }\n $this->updateAuthorizations();\n } else {\n //@codeCoverageIgnoreStart\n $this->log->error(\"Failed to fetch order for {$this->basename}\");\n //@codeCoverageIgnoreEnd\n }\n }", "private function memberAddOrder($data){\n $fields = array(\n 'app_id' => $this->appId,\n 'data' => array(\n 'msg_type' => 'order_add',\n 'order_id' => $data['order_id']\n ),\n 'headings' => [\n 'en' => '你有新的訂單',\n 'zh-Hant' => '你有新的訂單'\n ],\n 'contents' => [\n 'en' => '你有新的訂單待處理',\n 'zh-Hant' => '你有新的訂單待處理'\n ],\n 'small_icon' => 'ic_stat_onesignal_default',\n 'ios_badgeType' => 'Increase',\n 'ios_badgeCount' => 1,\n 'filters' => array(\n array(\n 'field' => 'tag',\n 'key' => 'id',\n 'relation' => '=',\n 'value' => $data['store_id']\n )\n )\n );\n return $fields;\n }", "private function _createOrder($_cart, $_usr)\n {\n //\t\tTODO We need tablefields for the new values:\n //\t\tShipment:\n //\t\t$_prices['shipmentValue']\t\tw/out tax\n //\t\t$_prices['shipmentTax']\t\t\tTax\n //\t\t$_prices['salesPriceShipment']\tTotal\n //\n //\t\tPayment:\n //\t\t$_prices['paymentValue']\t\tw/out tax\n //\t\t$_prices['paymentTax']\t\t\tTax\n //\t\t$_prices['paymentDiscount']\t\tDiscount\n //\t\t$_prices['salesPricePayment']\tTotal\n\n $_orderData = new stdClass();\n\n $_orderData->virtuemart_order_id = null;\n $oldOrderNumber = '';\n\n $this->deleteOldPendingOrder($_cart);\n\n\n $_orderData->virtuemart_user_id = $_usr->get('id');\n $_orderData->virtuemart_vendor_id = $_cart->vendorId;\n $_orderData->customer_number = $_cart->customer_number;\n $_prices = $_cart->cartPrices;\n //Note as long we do not have an extra table only storing addresses, the virtuemart_userinfo_id is not needed.\n //The virtuemart_userinfo_id is just the id of a stored address and is only necessary in the user maintance view or for choosing addresses.\n //the saved order should be an snapshot with plain data written in it.\n //\t\t$_orderData->virtuemart_userinfo_id = 'TODO'; // $_cart['BT']['virtuemart_userinfo_id']; // TODO; Add it in the cart... but where is this used? Obsolete?\n $_orderData->order_total = $_prices['billTotal'];\n $_orderData->order_salesPrice = $_prices['salesPrice'];\n $_orderData->order_billTaxAmount = $_prices['billTaxAmount'];\n $_orderData->order_billDiscountAmount = $_prices['billDiscountAmount'];\n $_orderData->order_discountAmount = $_prices['discountAmount'];\n $_orderData->order_subtotal = $_prices['priceWithoutTax'];\n $_orderData->order_tax = $_prices['taxAmount'];\n $_orderData->order_shipment = $_prices['shipmentValue'];\n $_orderData->order_shipment_tax = $_prices['shipmentTax'];\n $_orderData->order_payment = $_prices['paymentValue'];\n $_orderData->order_payment_tax = $_prices['paymentTax'];\n\n if (!empty($_cart->cartData['VatTax'])) {\n $taxes = array();\n foreach ($_cart->cartData['VatTax'] as $k => $VatTax) {\n $taxes[$k]['virtuemart_calc_id'] = $k;\n $taxes[$k]['calc_name'] = $VatTax['calc_name'];\n $taxes[$k]['calc_value'] = $VatTax['calc_value'];\n $taxes[$k]['result'] = $VatTax['result'];\n }\n $_orderData->order_billTax = vmJsApi::safe_json_encode($taxes);\n }\n\n if (!empty($_cart->couponCode)) {\n $_orderData->coupon_code = $_cart->couponCode;\n $_orderData->coupon_discount = $_prices['salesPriceCoupon'];\n }\n $_orderData->order_discount = $_prices['discountAmount']; // discount order_items\n\n\n $_orderData->order_status = 'P';\n $_orderData->order_currency = $this->getVendorCurrencyId($_orderData->virtuemart_vendor_id);\n\n if (isset($_cart->pricesCurrency)) {\n $_orderData->user_currency_id = $_cart->pricesCurrency;\n $currency = CurrencyDisplay::getInstance($_orderData->user_currency_id);\n if ($_orderData->user_currency_id != $_orderData->order_currency) {\n $_orderData->user_currency_rate = $currency->convertCurrencyTo($_orderData->user_currency_id, 1.0, false);\n } else {\n $_orderData->user_currency_rate = 1.0;\n }\n }\n\n $shoppergroups = $_cart->user->get('shopper_groups');\n if (!empty($shoppergroups)) {\n $_orderData->user_shoppergroups = implode(',', $shoppergroups);\n }\n\n if (isset($_cart->paymentCurrency)) {\n $_orderData->payment_currency_id = $_cart->paymentCurrency; //$this->getCurrencyIsoCode($_cart->pricesCurrency);\n $currency = CurrencyDisplay::getInstance($_orderData->payment_currency_id);\n if ($_orderData->payment_currency_id != $_orderData->order_currency) {\n $_orderData->payment_currency_rate = $currency->convertCurrencyTo($_orderData->payment_currency_id, 1.0, false);\n } else {\n $_orderData->payment_currency_rate = 1.0;\n }\n }\n\n $_orderData->virtuemart_paymentmethod_id = $_cart->virtuemart_paymentmethod_id;\n $_orderData->virtuemart_shipmentmethod_id = $_cart->virtuemart_shipmentmethod_id;\n\n //Some payment plugins need a new order_number for any try\n $_orderData->order_number = '';\n $_orderData->order_pass = '';\n\n $_orderData->order_language = $_cart->order_language;\n $_orderData->ip_address = ShopFunctions::getClientIP();;\n\n $maskIP = VmConfig::get('maskIP', 'last');\n if ($maskIP == 'last') {\n $rpos = strrpos($_orderData->ip_address, '.');\n $_orderData->ip_address = substr($_orderData->ip_address, 0, ($rpos + 1)) . 'xx';\n }\n\n //lets merge here the userdata from the cart to the order so that it can be used\n if (!empty($_cart->BT)) {\n $continue = array('created_on' => 1, 'created_by' => 1, 'modified_on' => 1, 'modified_by' => 1, 'locked_on' => 1, 'locked_by' => 1);\n foreach ($_cart->BT as $k => $v) {\n if (isset($continue[$k])) continue;\n $_orderData->{$k} = $v;\n }\n }\n $_orderData->STsameAsBT = $_cart->STsameAsBT;\n unset($_orderData->created_on);\n\n JPluginHelper::importPlugin('vmshopper');\n $dispatcher = JDispatcher::getInstance();\n $plg_datas = $dispatcher->trigger('plgVmOnUserOrder', array(&$_orderData));\n\n\n $i = 0;\n while ($oldOrderNumber == $_orderData->order_number) {\n if ($i > 5) {\n $msg = 'Could not generate new unique ordernumber';\n vmError($msg . ', an ordernumber should contain at least one random char', $msg);\n break;\n }\n $_orderData->order_number = $this->genStdOrderNumber($_orderData->virtuemart_vendor_id);\n if (!empty($oldOrderNumber)) vmdebug('Generated new ordernumber ', $oldOrderNumber, $_orderData->order_number);\n $i++;\n }\n if (empty($_orderData->order_pass)) {\n $_orderData->order_pass = $this->genStdOrderPass();\n }\n if (empty($_orderData->order_create_invoice_pass)) {\n $_orderData->order_create_invoice_pass = $this->genStdCreateInvoicePass();\n }\n\n $orderTable = $this->getTable('orders');\n $orderTable->bindChecknStore($_orderData);\n\n if (!empty($_cart->couponCode)) {\n //set the virtuemart_order_id in the Request for 3rd party coupon components (by Seyi and Max)\n vRequest::setVar('virtuemart_order_id', $orderTable->virtuemart_order_id);\n // If a gift coupon was used, remove it now\n CouponHelper::setInUseCoupon($_cart->couponCode, true);\n }\n // the order number is saved into the session to make sure that the correct cart is emptied with the payment notification\n $_cart->order_number = $orderTable->order_number;\n $_cart->order_pass = $_orderData->order_pass;\n $_cart->virtuemart_order_id = $orderTable->virtuemart_order_id;\n $_cart->setCartIntoSession();\n\n return $orderTable->virtuemart_order_id;\n }", "public function setOrderId(?string $orderId): void\n {\n $this->orderId['value'] = $orderId;\n }", "public function setOrder($params)\n\t{\n\t\treturn $this->request('set-order', $params);\n\t}", "public function orderItem($param) { \n if (!$this->aaa->has_right('openruth', 500))\n $res->orderItemError->_value = 'authentication_error';\n else {\n $targets = $this->config->get_value('ruth', 'ztargets');\n $agencyId = self::strip_agency($param->agencyId->_value);\n if ($tgt = $targets[$agencyId]) {\n // build order\n $ord = &$order->Reservation->_value;\n $ord->LibraryNo->_value = $agencyId;\n $ord->BorrowerTicketNo->_value = $param->userId->_value;\n $ord->DisposalNote->_value = $param->orderNote->_value;\n $ord->LastUseDate->_value = self::to_zruth_date($param->orderLastInterestDate->_value);\n $ord->ServiceCounter->_value = $param->agencyCounter->_value;\n $ord->Override->_value = (self::xs_true($param->agencyCounter->_value) ? 'Y' : 'N');\n $ord->Priority->_value = $param->orderPriority->_value;\n // ?????? $ord->DisposalType->_value = $param->xxxx->_value;\n $itemIds = &$param->orderItemId;\n if (is_array($itemIds))\n foreach ($itemIds as $oid) {\n $mrid->ID->_value = $oid->_value->itemId->_value;\n if (!$mrid->TitlePartNo->_value = $oid->_value->itemSerialPartId->_value)\n $mrid->TitlePartNo->_value = 0;\n $ord->MRIDS->_value->MRID[]->_value = $mrid;\n }\n else {\n $mrid->ID->_value = $itemIds->_value->itemId->_value;\n if (!$mrid->TitlePartNo->_value = $itemIds->_value->itemSerialPartId->_value)\n $mrid->TitlePartNo->_value = 0;\n $ord->MRIDS->_value->MRID->_value = $mrid;\n }\n $xml = '<?xml version=\"1.0\" encoding=\"ISO-8859-1\" ?'.'>' . utf8_decode($this->objconvert->obj2xml($order));\n \n//print_r($ord);\n//print_r($xml);\n \n $z = new z3950();\n $z->set_target($tgt['host']);\n $z->set_database($tgt['database'].'-ophelia');\n $z->set_authentication($tgt['authentication']);\n if ($tgt['proxy']) {\n $z->set_proxy($tgt['proxy']);\n }\n $xml_ret = $z->z3950_xml_update($xml, $tgt['timeout']);\n if ($z->get_errno() == 0 && $xml_ret['xmlUpdateDoc']) {\n $dom = new DomDocument();\n $dom->preserveWhiteSpace = false;\n if ($dom->loadXML($xml_ret['xmlUpdateDoc'])) {\n if ($err = &$dom->getElementsByTagName('ErrorResponse')->item(0)) {\n verbose::log(ERROR, __FUNCTION__ . ' (' . __LINE__ . ') errno: ' . $err->getAttribute('Err') . \n ' error: ' . $err->nodeValue);\n $res->orderItemError->_value = 'unspecified error, order not possible';\n } else {\n // order at least partly ok \n foreach ($dom->getElementsByTagName('MRID') as $mrid) {\n unset($ir);\n $ir->orderItemId->_value->itemId->_value = $mrid->getAttribute('Id');\n if ($mrid->getAttribute('Tp'))\n $ir->orderItemId->_value->itemSerialPartId->_value = $mrid->getAttribute('Tp');\n if (!$mrid->nodeValue)\n $ir->orderItemOk->_value = 'true';\n elseif (!($ir->orderItemError->_value = $this->errs[$mrid->nodeValue])) \n $ir->orderItemError->_value = 'unknown error: ' . $mrid->nodeValue;\n $res->orderItem[]->_value = $ir;\n }\n }\n }\n } else {\n self::log_z_error(__FUNCTION__, __LINE__, $agencyId, $z->get_errno(), $z->get_error_string());\n $res->orderItemError->_value = 'system error';\n }\n//echo \"\\n\";\n//print_r($xml_ret);\n//print_r(\"\\nError: \" . $z->get_errno());\n } else\n $res->orderItemError->_value = 'unknown agencyId';\n }\n\n $ret->orderItemResponse->_value = $res;\n //var_dump($param); var_dump($res); die();\n return $ret;\n }", "public function __construct($order)\n {\n $this->order = $order;\n }", "public function __construct($order)\n {\n $this->order = $order;\n }", "public function __construct($order)\n {\n $this->order = $order;\n }", "public function __construct($order)\n {\n $this->order = $order;\n }", "public function __construct($order)\n {\n $this->order = $order;\n }", "public function __construct($order)\n {\n $this->order = $order;\n }", "public function __construct($order)\n {\n $this->order = $order;\n }", "public function __construct($order)\n {\n $this->order = $order;\n }", "public function __construct($order=null)\n {\n $this->data = $order;\n }", "public function addOrder(Order $order){\r\n// if(!$this->flagCreateCtriteria)\r\n// throw new Exception('Necesita inicializar el criteria');\r\n\r\n if(!is_array($this->array_order))\r\n $this->array_order = array(\"1\"=>$order->getOrderAtribute());\r\n else\r\n array_push($this->array_order, $order->getOrderAtribute());\r\n $this->type_order = $order->getOrderType();\r\n $this->SQL = MySQL_DB::instance()->DBSQLSelect($this->table, null, $this->array_restrictions, $this->array_order, $this->type_order, true);\r\n return $this;\r\n }", "public static function admin_order_add_custom_meta_data( $data, $wc_order )\n {\n $configs = OmnivaLt_Core::get_configs();\n $order = OmnivaLt_Wc_Order::get_data($wc_order->get_id(), array('omniva'));\n\n foreach ( $configs['method_params'] as $method_key => $method_values ) {\n if ( ! $method_values['is_shipping_method'] ) continue;\n if ( $order->omniva->method != $method_values['key'] ) continue;\n\n if ( $method_values['key'] == 'pt' || $method_values['key'] == 'ps' ) {\n $data['shipping_via'] = 'Omniva ' . strtolower($method_values['title']) . \": \" . OmnivaLt_Terminals::get_terminal_address($order->omniva->terminal_id);\n }\n }\n\n if ($order->omniva->method) {\n $shipping_settings = OmnivaLt_Core::get_settings();\n $omnivalt_labels = new OmnivaLt_Labels();\n\n $barcode = $order->omniva->barcodes[0];\n $country_code = $shipping_settings['shop_countrycode'];\n $data['omnivalt_tracking_link'] = $omnivalt_labels->get_tracking_link($country_code, $barcode, true);\n $data['omnivalt_barcode'] = $barcode;\n }\n\n return $data;\n }", "public function __construct($order)\n {\n $this->order=$order;\n }", "public function addOrderLayer()\n {\n $transactions = $this->orderDataArray->setOrderIds($this->getOrderIds())->getOrderLayer();\n\n if (!empty($transactions)) {\n /** @var $tm DataLayer */\n $tm = $this->getParentBlock();\n foreach ($transactions as $order) {\n $tm->addCustomDataLayer($order);\n }\n }\n }", "private function updateOrderDetail($order){\n $endpoint = $this->endpointBase.\"/\".$order['id'];\n $params = array('url_params' => \"\");\n\n return $this->MPAPI->callMallAPI(HTTP_Method::PUT, $endpoint, $order);\n }", "private function alterOrderInformation()\n {\n if (version_compare(Shopware()->Config()->get( 'Version' ), '5.2.0', '<')) {\n $sql = \"UPDATE `s_core_snippets`\n SET `value` = CASE\n WHEN `value` = 'Free text 4' THEN 'Transaction ID'\n WHEN `value` = 'Freitextfeld 4' THEN 'Transaktions-ID'\n ELSE `value`\n END\n WHERE `namespace` = 'backend/order/main'\n AND `value` IN ('Freitextfeld 4', 'Free text 4')\";\n } elseif (version_compare(Shopware()->Config()->get( 'Version' ), '5.2.0', '>=')) {\n $sql = \"INSERT INTO `s_attribute_configuration` (table_name, column_name, \"\n . \"column_type, position, translatable, display_in_backend, custom, \"\n . \"help_text, support_text, label, entity, array_store) \"\n . \"VALUES ('s_order_attributes','attribute4','string',1,0,1,0,'','','Transaction ID','NULL',NULL)\";\n }\n Shopware()->Db()->query($sql);\n }", "public function setCustomFields ($order) {\n \n }", "public function setOrderData($orderData): Order\n {\n $this->id = $orderData->getIncrementId();\n $this->email = $orderData->getCustomerEmail();\n $this->quoteId = $orderData->getQuoteId();\n $this->storeName = $orderData->getStore()->getName();\n $this->purchaseDate = $orderData->getCreatedAt();\n $this->deliveryMethod = $orderData->getShippingDescription();\n $this->deliveryTotal = (float) number_format(\n (float) $orderData->getShippingAmount(),\n 2,\n '.',\n ''\n );\n $this->currency = $orderData->getOrderCurrencyCode();\n\n /** @var OrderPaymentInterface|InfoInterface $payment */\n $payment = $orderData->getPayment();\n if ($payment) {\n if ($payment->getMethod()) {\n $methodInstance = $payment->getMethodInstance();\n if ($methodInstance) {\n $this->payment = $methodInstance->getTitle();\n }\n }\n }\n\n $this->couponCode = (string) $orderData->getCouponCode();\n\n /*\n * custom order attributes\n */\n $customAttributes = $this->getConfigSelectedCustomOrderAttributes(\n $orderData->getStore()->getWebsite()->getId()\n );\n\n if ($customAttributes) {\n $fields = $this->helper->getOrderTableDescription();\n $this->custom = [];\n foreach ($customAttributes as $customAttribute) {\n if (isset($fields[$customAttribute])) {\n $field = $fields[$customAttribute];\n $value = $this->_getCustomAttributeValue(\n $field,\n $orderData\n );\n if ($value) {\n $this->_assignCustom($field, $value);\n }\n }\n }\n }\n\n /*\n * Billing address.\n */\n $this->processBillingAddress($orderData);\n\n /*\n * Shipping address.\n */\n $this->processShippingAddress($orderData);\n\n $websiteId = $orderData->getStore()->getWebsiteId();\n\n $includeCustomOptions = $this->helper->getWebsiteConfig(\n Config::XML_PATH_CONNECTOR_SYNC_ORDER_PRODUCT_CUSTOM_OPTIONS,\n $websiteId\n );\n\n $orderItemProcessor = $this->orderItemProcessorFactory\n ->create(['data' => [\n 'websiteId' => $websiteId,\n 'includeCustomOptions' => $includeCustomOptions\n ]]);\n\n /*\n * Order items.\n */\n try {\n foreach ($orderData->getAllItems() as $productItem) {\n $productData = $orderItemProcessor->process($productItem);\n $this->mergeProductData($productData);\n }\n } catch (\\InvalidArgumentException $e) {\n $this->logger->debug(\n 'Error processing items for order ID: ' . $orderData->getId(),\n [(string) $e]\n );\n $this->products = [];\n }\n\n $this->orderSubtotal = (float) number_format(\n (float) $orderData->getData('subtotal'),\n 2,\n '.',\n ''\n );\n $this->discountAmount = (float) number_format(\n (float) $orderData->getData('discount_amount'),\n 2,\n '.',\n ''\n );\n $orderTotal = abs(\n $orderData->getData('grand_total') - $orderData->getTotalRefunded()\n );\n $this->orderTotal = (float) number_format($orderTotal, 2, '.', '');\n $this->orderStatus = $orderData->getStatus();\n\n if (!$this->schemaValidator->isValid($this->toArray())) {\n throw new SchemaValidationException(\n $this->schemaValidator,\n __(\"Validation error\")\n );\n }\n\n return $this;\n }", "public function __construct(Order $order)\n {\n $this->order = $order;\n }", "public function __construct(Order $order)\n {\n $this->order = $order;\n }", "public function __construct(Order $order)\n {\n $this->order = $order;\n }", "public function __construct(Order $order)\n {\n $this->order = $order;\n }", "public function __construct(Order $order)\n {\n $this->order = $order;\n }", "public function __construct(Order $order)\n {\n $this->order = $order;\n }", "public function __construct(Order $order)\n {\n $this->order = $order;\n }", "public function __construct(Order $order)\n {\n $this->order = $order;\n }", "public function __construct(Order $order)\n {\n $this->order = $order;\n }", "public function __construct(Order $order)\n {\n $this->order = $order;\n }", "public function setTicketOrderInfo(TicketOrderInfo $value) {\n return $this->set(self::TICKET_ORDER_INFO, $value);\n }", "public function addOrder($order){\n $this->collection[] = $order;\n }", "public function edit(OrderDetails $orderDetails)\n {\n //\n }", "public static function set_order_data( $order ) {\n\t\t$order->update_meta_data( '_billing_vat_number', self::$data['vat_number'] );\n\t\t$order->update_meta_data( '_vat_number_is_validated', ! is_null( self::$data['validation']['valid'] ) ? 'true' : 'false' );\n\t\t$order->update_meta_data( '_vat_number_is_valid', true === self::$data['validation']['valid'] ? 'true' : 'false' );\n\n\t\tif ( false !== self::get_ip_country() ) {\n\t\t\t$order->update_meta_data( '_customer_ip_country', self::get_ip_country() );\n\t\t\t$order->update_meta_data( '_customer_self_declared_country', ! empty( $_POST['location_confirmation'] ) ? 'true' : 'false' );\n\t\t}\n\t}", "public function setOrderDetail(Order $orderDetail)\n {\n $this->orderDetail = $orderDetail;\n\n return $this;\n }", "public function lstOrderDetail(){\n\t\t$Sql = \"SELECT \n\t\t\t\t\torder_detail_id,\n\t\t\t\t\torder_id,\n\t\t\t\t\tcustomer_id,\n\t\t\t\t\textra_feature_id,\n\t\t\t\t\tfeature_name,\n\t\t\t\t\tquantity,\n\t\t\t\t\tprice\n\t\t\t\tFROM\n\t\t\t\t\trs_tbl_order_details\n\t\t\t\tWHERE\n\t\t\t\t\t1=1\";\n\t\t\n\t\tif($this->isPropertySet(\"order_detail_id\", \"V\")){\n\t\t\t$Sql .= \" AND order_detail_id='\" . $this->getProperty(\"order_detail_id\") . \"'\";\n\t\t}\n\t\tif($this->isPropertySet(\"order_id\", \"V\")){\n\t\t\t$Sql .= \" AND order_id='\" . $this->getProperty(\"order_id\") . \"'\";\n\t\t}\n\t\tif($this->isPropertySet(\"customer_id\", \"V\")){\n\t\t\t$Sql .= \" AND customer_id=\" . $this->getProperty(\"customer_id\");\n\t\t}\n\t\tif($this->isPropertySet(\"extra_feature_id\", \"V\")){\n\t\t\t$Sql .= \" AND extra_feature_id='\" . $this->getProperty(\"extra_feature_id\") . \"'\";\n\t\t}\n\t\tif($this->isPropertySet(\"ORDERBY\", \"V\")){\n\t\t\t$Sql .= \" ORDER BY \" . $this->getProperty(\"ORDERBY\");\n\t\t}\n\t\t\n\t\tif($this->isPropertySet(\"limit\", \"V\"))\n\t\t\t$Sql .= $this->appendLimit($this->getProperty(\"limit\"));\n\t\treturn $this->dbQuery($Sql);\n\t}", "public function addOrderedItemsToStock($order)\r\n {\r\n \t$nVersion = Mage::getModel('paymentsensegateway/direct')->getVersion();\r\n \t$isCustomStockManagementEnabled = Mage::getModel('paymentsensegateway/direct')->getConfigData('customstockmanagementenabled');\r\n\t\t\r\n \tif($nVersion >= 1410 &&\r\n \t\t$isCustomStockManagementEnabled)\r\n \t{\r\n\t \t$items = $order->getAllItems();\r\n\t\t\tforeach ($items as $itemId => $item)\r\n\t\t\t{\r\n\t\t\t\t// ordered quantity of the item from stock\r\n\t\t\t\t$quantity = $item->getQtyOrdered();\r\n\t\t\t\t$productId = $item->getProductId();\r\n\t\t\t\t\r\n\t\t\t\t$stock = Mage::getModel('cataloginventory/stock_item')->loadByProduct($productId);\r\n\t\t\t\t$stockManagement = $stock->getManageStock();\r\n\t\t\t\t\r\n\t\t\t\tif($stockManagement)\r\n\t\t\t\t{\r\n\t\t\t\t\t$stock->setQty($stock->getQty() + $quantity);\r\n\t\t\t\t\t$stock->save();\r\n\t\t\t\t}\r\n\t\t\t}\r\n \t}\r\n }", "public function setOrder($orderAttributes)\n {\n $this->email = $orderAttributes['email'];\n $this->orderId = $orderAttributes['orderId'];\n }", "public function __construct(Order $order)\n {\n $this->order = $order; \n $detail = OrderDetail::where('order_id', $this->order->id)->get();\n $this->detail = $detail;\n }", "public function addOrder(Order $order) {\n $this->orders->add($order);\n }", "public function hookNewOrder($params)\r\n {\r\n $carrier = new Carrier((int) $params['order']->id_carrier);\r\n $result = TipsaAdminComun::getTipsaCarriers(\"`id_reference` = \" . (int) $carrier->id_reference);\r\n\r\n if (!$result) {\r\n return false;\r\n }\r\n\r\n $tipo_servicio = $result['code'];\r\n\r\n $office = Db::getInstance()->getRow(\r\n \"SELECT * FROM `\" . _DB_PREFIX_ . \"tipsa_address`\r\n WHERE `id_cart` = \" . (int) $params['cart']->id . \" AND `id_carrier` = \" . (int) $params['order']->id_carrier\r\n );\r\n try {\r\n if ($tipo_servicio == $this->service_codes_yupick) {\r\n if ($office) {\r\n // get current customer address\r\n $address = new Address($params['order']->id_address_delivery);\r\n // Create a new address with the point location\r\n $address_point = new Address();\r\n //loop through address fields in case the shop has added custom or required fields\r\n foreach ($address as $name => $value) {\r\n if (!is_array($value) && !in_array($name, array('date_upd', 'date_add', 'id', 'country'))) {\r\n switch ($name) {\r\n case 'id_customer':\r\n $address_point->id_customer = $params['order']->id_customer;\r\n break;\r\n case 'address1':\r\n $address_point->address1 = $office['address'];\r\n break;\r\n case 'address2':\r\n $address_point->address2 = $office['firstname'];\r\n break;\r\n case 'postcode':\r\n $address_point->postcode = $office['postcode'];\r\n break;\r\n case 'city':\r\n $address_point->city = $office['city'];\r\n break;\r\n case 'alias':\r\n $address_point->alias = $office['alias'];\r\n break;\r\n case 'phone_mobile':\r\n if (!empty($office['phone_mobile'])) {\r\n $address_point->phone_mobile = $office['phone_mobile'];\r\n } else {\r\n $address_point->phone_mobile = \"0\";\r\n }\r\n break;\r\n case 'phone':\r\n $address_point->phone = $office['phone'] != '' ? $office['phone'] : \"0\";\r\n break;\r\n case 'deleted':\r\n $address_point->deleted = true;\r\n break;\r\n default:\r\n $address_point->$name = $value;\r\n }\r\n }\r\n }\r\n\r\n $address_point->save();\r\n if ($address_point->id) {\r\n $order = $params['order'];\r\n $order->id_address_delivery = $address_point->id;\r\n $order->update();\r\n }\r\n }\r\n }\r\n Db::getInstance()->update(\r\n 'tipsa_address',\r\n array('state' => 1, 'id_order' => (int) $params['order']->id),\r\n \"`state` = 0 AND `id_cart` = \" . (int) $params['cart']->id . \" AND `id_carrier` = \" . (int) $params['order']->id_carrier\r\n );\r\n } catch (Exception $e) {\r\n //In case of error, just do the most important\r\n return $e->message();\r\n }\r\n\r\n //Delete old quotes. Need to be in Days because Paypal or card payment validation can last some time\r\n Db::getInstance()->Execute(\r\n \"DELETE FROM \" . _DB_PREFIX_ . \"tipsa_address\r\n WHERE date < DATE_SUB(NOW(), INTERVAL 7 DAY) AND state = 0\"\r\n );\r\n }", "private function _addDescriptionElement($order)\n {\n $description = $order->addChild('description');\n $this->_addCDATA($description, $this->orderDescription);\n }", "public function addPartyOrdersRequest($dkParamDataArr){\n $rspDetails = array();\n $rspDetails[\"poRequestedStatusDetails\"] = array();\n $rspDetails['poRequestedStatusDetails'][\"isPartyOrderRequestSend\"] = 'NO';\n $rspDetails['poRequestedStatusDetails'][\"partyOrderNo\"] = '';\n // check requested param data length\n if(count($dkParamDataArr)>0 && $dkParamDataArr!=false){\n // add party order request status\n $dkParamDataArr['status'] = 'R';\n // fetch user session data details\n $userSessionDetailsData = commonfunction :: getUserSessionDetails($dkParamDataArr);\n if(count($userSessionDetailsData)>0 && $userSessionDetailsData!=false){\n $dkParamDataArr['partyorder_no'] = commonfunction :: generatePartyOrderNo();\n $dkParamDataArr['user_id'] = $userSessionDetailsData['unmd5UserId'];\n $dkParamDataArr['created_by'] = $userSessionDetailsData['unmd5UserId'];\n $lastPORID = PartyOrdersDao::addPartyOrderRequest($dkParamDataArr);\n if($lastPORID>0 && $lastPORID!=false){\n $rspDetails['poRequestedStatusDetails'][\"isPartyOrderRequestSend\"] = 'YES';\n $rspDetails['poRequestedStatusDetails'][\"partyOrderNo\"] = $dkParamDataArr['partyorder_no'];\n // send sms to end user to inform about party order request recieve by desserts khazana\n // $retEmailSentStatus = commonfunction :: preparedDataSendingEmailAboutPartyOrdersRequestReceiveFromCustomer($dkParamDataArr);\n // $smsMsgBody = \"Sms Testing CJ\";\n // $retSmsSentStatus = utils :: sendSMS(array(\"9975967186\"), $smsMsgBody);\n } \n }\n } \n return $rspDetails;\n }", "function addDetailsLine($order_id, $orderDetails, $conn)\n {\n // return the id number of the last item inserted.\n\n mysqli_report(MYSQLI_REPORT_ERROR | MYSQLI_REPORT_STRICT);\n\n\n $stmt = $conn->prepare(\"INSERT INTO mfqgkhncw3r34ada.order_details (orders_id, products_id, QUANTITY, CURRENT_PRICE, CURRENT_DESCRIPTION) VALUES (?,?,?,?,?)\");\n\n if (!$stmt) {\n return -1;\n } else {\n $product_id = $orderDetails->getProduct_id();\n $quantity = $orderDetails->getQuantity();\n $price = $orderDetails->getCurrent_price();\n $description = $orderDetails->getCurrent_description();\n\n $stmt->bind_param(\"iiids\", $order_id, $product_id, $quantity, $price, $description);\n\n $stmt->execute();\n\n if ($stmt->affected_rows > 0) {\n // success\n return $conn->insert_id;\n } else {\n // failed\n return false;\n }\n }\n }", "public function setOrder($order);", "public function addAdditionalOptionsToQuote($observer)\n {\n $action = Mage::app()->getFrontController()->getAction();\n if ($action->getFullActionName() == 'checkout_cart_add')\n {\n Mage::log(\"checkout_cart_add\", Zend_Log::DEBUG, \"threekit.log\");\n // assuming you are posting your custom form values in an array called extra_options...\n if ($options = $action->getRequest()->getParam('clara_additional_options'))\n {\n $decodePost = json_decode($options, true);\n $product = $observer->getProduct();\n\n // add to the additional options array\n $additionalOptions = array();\n if ($additionalOption = $product->getCustomOption('additional_options'))\n {\n $additionalOptions = (array) unserialize($additionalOption->getValue());\n }\n foreach ($decodePost as $key => $value)\n {\n $additionalOptions[] = array(\n 'label' => $key,\n 'value' => $value,\n );\n }\n // add the additional options array with the option code additional_options\n $observer->getProduct()\n ->addCustomOption('additional_options', serialize($additionalOptions));\n }\n }\n }", "function setOrder($order){\n\t\t$this->order=$order;\n\t}", "private function processOpenOrderDetails(array $orderValue, array $orders, $orderKey)\n {\n /** @var array $orderDetails */\n $orderDetails = $this->db->fetchAll(\n 'SELECT * FROM s_order_details WHERE orderID = ? ORDER BY id ASC',\n [$orderValue['id']]\n );\n\n if (!count($orderDetails)) {\n unset($orders[$orderKey]);\n\n return $orders;\n }\n\n $context = $this->contextService->getShopContext();\n $orderProductOrderNumbers = array_column($orderDetails, 'articleordernumber');\n $listProducts = Shopware()->Container()->get('shopware_storefront.list_product_service')\n ->getList($orderProductOrderNumbers, $context);\n $listProducts = Shopware()->Container()->get('legacy_struct_converter')\n ->convertListProductStructList($listProducts);\n\n foreach ($listProducts as &$listProduct) {\n $listProduct = array_merge($listProduct, $listProduct['prices'][0]);\n }\n\n foreach ($orderDetails as $orderDetailsKey => $orderDetailsValue) {\n $orderDetails[$orderDetailsKey]['amountNumeric'] = round($orderDetailsValue['price'] * $orderDetailsValue['quantity'], 2);\n $orderDetails[$orderDetailsKey]['priceNumeric'] = $orderDetailsValue['price'];\n $orderDetails[$orderDetailsKey]['amount'] = $this->moduleManager->Articles()\n ->sFormatPrice($orderDetails[$orderDetailsKey]['amountNumeric']);\n $orderDetails[$orderDetailsKey]['price'] = $this->moduleManager->Articles()\n ->sFormatPrice($orderDetailsValue['price']);\n $orderDetails[$orderDetailsKey]['active'] = 0;\n\n $tmpProduct = null;\n if (!empty($listProducts[$orderDetailsValue['articleordernumber']])) {\n $tmpProduct = $listProducts[$orderDetailsValue['articleordernumber']];\n }\n\n if (!empty($tmpProduct) && is_array($tmpProduct)) {\n // Set product in activate state\n $orderDetails[$orderDetailsKey]['active'] = 1;\n $orderDetails[$orderDetailsKey]['article'] = $tmpProduct;\n if (!empty($tmpProduct['purchaseunit'])) {\n $orderDetails[$orderDetailsKey]['purchaseunit'] = $tmpProduct['purchaseunit'];\n }\n\n if (!empty($tmpProduct['referenceunit'])) {\n $orderDetails[$orderDetailsKey]['referenceunit'] = $tmpProduct['referenceunit'];\n }\n\n if (!empty($tmpProduct['referenceprice'])) {\n $orderDetails[$orderDetailsKey]['referenceprice'] = $tmpProduct['referenceprice'];\n }\n\n if (!empty($tmpProduct['sUnit']) && is_array($tmpProduct['sUnit'])) {\n $orderDetails[$orderDetailsKey]['sUnit'] = $tmpProduct['sUnit'];\n }\n\n if (!empty($tmpProduct['price'])) {\n $orderDetails[$orderDetailsKey]['currentPrice'] = $tmpProduct['price'];\n }\n\n if (!empty($tmpProduct['pseudoprice'])) {\n $orderDetails[$orderDetailsKey]['currentPseudoprice'] = $tmpProduct['pseudoprice'];\n }\n\n $orderDetails[$orderDetailsKey]['currentHas_pseudoprice'] = $tmpProduct['has_pseudoprice'];\n }\n\n // Check for serial\n if ($orderDetails[$orderDetailsKey]['esdarticle']) {\n $numbers = [];\n $getSerial = $this->db->fetchAll(\n 'SELECT serialnumber\n FROM s_articles_esd_serials, s_order_esd\n WHERE userID = ?\n AND orderID = ?\n AND orderdetailsID = ?\n AND s_order_esd.serialID = s_articles_esd_serials.id',\n [\n $this->session->offsetGet('sUserId'),\n $orderValue['id'],\n $orderDetailsValue['id'],\n ]\n );\n foreach ($getSerial as $serial) {\n $numbers[] = $serial['serialnumber'];\n }\n $orderDetails[$orderDetailsKey]['serial'] = implode(',', $numbers);\n $orderDetails[$orderDetailsKey]['esdLink'] = $this->config->get('sBASEFILE')\n . '?sViewport=account&sAction=download&esdID='\n . $orderDetailsValue['id'];\n }\n }\n $orders[$orderKey]['activeBuyButton'] = 1;\n $orders[$orderKey]['details'] = $orderDetails;\n\n return $orders;\n }", "public function AddOrder($order)\n\t\t{\n\t\t\tif (!isset($this->Orders))\n\t\t\t{\n\t\t\t\t$this->Orders = array();\n\t\t\t}\n\n\t\t\tif ($order instanceof DataPushOrder && !in_array($order, $this->Orders))\n\t\t\t{\n\t\t\t\tarray_push($this->Orders, $order);\n\t\t\t}\n\t\t}", "function buildOrder($orders) {\n\t$order = [\n\t\t\"service_uid\" => $orders[0][15],\n\t\t\"points\" => 0,\n\t\t\"invoice_number\" => $orders[0][2],\n\t\t\"purchase_detail\" => [],\n\t\t\"prices\" => [],\n\t\t\"branch_name\" => $orders[0][0],\n\t\t\"createtime\" => date('Y-m-d H:i:s')\n\t];\n\n\t$total = 0;\n\t$discount = 0;\n\tforeach ($orders as $o) {\n\t\t$order['purchase_detail'][] = [\n\t\t\t\"sku\" => $o[3],\n\t\t\t\"product_name\" => $o[4],\n\t\t\t\"category\" => [$o[5], $o[6]],\n\t\t\t\"quantity\" => (int) abs($o[16]),\n\t\t\t\"unit_price\" => (float) $o[17],\n\t\t\t\"variations\" => [\n\t\t\t\t['name' => 'Linea', 'value' => $o[5]],\n\t\t\t\t['name' => 'Color', 'value' => $o[10]],\n\t\t\t\t['name' => 'Talle', 'value' => $o[11]],\n\t\t\t]\n\t\t];\n\n\t\t$total += (int) abs($o[16]) * (float) $o[17];\n\t\t$discount += abs($o[19]);\n\t}\n\n\t$order['prices'] = [\n\t\t\"gross\" => $total,\n\t\t\"discount\" => $discount,\n\t\t\"total\" => $total - $discount\n\t];\n\n\treturn $order;\n}", "public function setOrder(&$var)\n {\n $arr = GPBUtil::checkRepeatedField($var, \\Google\\Protobuf\\Internal\\GPBType::MESSAGE, \\Google\\Datastore\\V1beta3\\PropertyOrder::class);\n $this->order = $arr;\n }", "private function parseData($orderParameter) {\r\n\r\n\t\t// if the product comes from the shop API\r\n\t\tif (InputValidator::isArray($orderParameter) &&\r\n\t\t\t!InputValidator::isEmptyArrayKey($orderParameter, \"orderId\")) {\r\n\r\n\t\t\t$this->orderId = $orderParameter['orderId'];\r\n\r\n\t\t\tif (!InputValidator::isEmptyArrayKey($orderParameter, \"orderNumber\")) {\r\n\r\n\t\t\t\t$this->orderNumber = $orderParameter['orderNumber'];\r\n\t\t\t}\r\n\r\n\t\t\tif (!InputValidator::isEmptyArrayKey($orderParameter, \"creationDate\")) {\r\n\r\n\t\t\t\t$this->creationDate = new Date($orderParameter['creationDate']);\r\n\t\t\t}\r\n\r\n\t\t\tif (!InputValidator::isEmptyArrayKey($orderParameter, \"billingAddress\") &&\r\n\t\t\t\tInputValidator::isArray($orderParameter[\"billingAddress\"])) {\r\n\r\n\t\t\t\t$this->billingAddress = new Address($orderParameter['billingAddress']);\r\n\t\t\t}\r\n\r\n\t\t\tif (!InputValidator::isEmptyArrayKey($orderParameter, \"shippingAddress\") &&\r\n\t\t\t\tInputValidator::isArray($orderParameter[\"shippingAddress\"])) {\r\n\r\n\t\t\t\t$this->shippingAddress = new Address($orderParameter['shippingAddress']);\r\n\t\t\t}\r\n\r\n\t\t\tif (!InputValidator::isEmptyArrayKey($orderParameter, \"invoicedOn\")) {\r\n\r\n\t\t\t\t$this->invoiceDate = new Date($orderParameter['invoicedOn']);\r\n\t\t\t}\r\n\r\n\t\t\tif (!InputValidator::isEmptyArrayKey($orderParameter, \"deliveredOn\")) {\r\n\r\n\t\t\t\t$this->deliveryDate = new Date($orderParameter['deliveredOn']);\r\n\t\t\t}\r\n\r\n\t\t\tif (!InputValidator::isEmptyArrayKey($orderParameter, \"pendingOn\")) {\r\n\r\n\t\t\t\t$this->pendingDate = new Date($orderParameter['pendingOn']);\r\n\t\t\t}\r\n\r\n\t\t\tif (!InputValidator::isEmptyArrayKey($orderParameter, \"archivedOn\")) {\r\n\r\n\t\t\t\t$this->archiveDate = new Date($orderParameter['archivedOn']);\r\n\t\t\t}\r\n\r\n\t\t\tif (!InputValidator::isEmptyArrayKey($orderParameter, \"dispatchedOn\")) {\r\n\r\n\t\t\t\t$this->dispatchDate = new Date($orderParameter['dispatchedOn']);\r\n\t\t\t}\r\n\r\n\t\t\tif (!InputValidator::isEmptyArrayKey($orderParameter, \"viewedOn\")) {\r\n\r\n\t\t\t\t$this->viewDate = new Date($orderParameter['viewedOn']);\r\n\t\t\t}\r\n\r\n\t\t\tif (!InputValidator::isEmptyArrayKey($orderParameter, \"currencyId\") &&\r\n\t\t\t\t!InputValidator::isEmptyArrayKey($orderParameter, \"taxModel\")) {\r\n\r\n\t\t\t\t$priceParameter = array(\"taxType\" => $orderParameter[\"taxModel\"],\r\n\t\t\t\t\t\t\t\t\t\t\"currency\" => $orderParameter[\"currencyId\"]);\r\n\r\n\t\t\t\tif (!InputValidator::isEmptyArrayKey($orderParameter, \"grandTotal\")) {\r\n\r\n\t\t\t\t\t$priceParameter[\"amount\"] = $orderParameter[\"grandTotal\"];\r\n\t\t\t\t\t$this->totalPrice = new Price($priceParameter);\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif (!InputValidator::isEmptyArrayKey($orderParameter, \"totalBeforeTax\")) {\r\n\r\n\t\t\t\t\t$priceParameter[\"amount\"] = $orderParameter[\"totalBeforeTax\"];\r\n\t\t\t\t\t$this->totalWithoutTaxPrice = new Price($priceParameter);\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif (!InputValidator::isEmptyArrayKey($orderParameter, \"totalTax\")) {\r\n\r\n\t\t\t\t\t$priceParameter[\"amount\"] = $orderParameter[\"totalTax\"];\r\n\t\t\t\t\t$this->taxPrice = new Price($priceParameter);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tif (!InputValidator::isEmptyArrayKey($orderParameter, \"customerComment\")) {\r\n\r\n\t\t\t\t$this->customerComment = $orderParameter[\"customerComment\"];\r\n\t\t\t}\r\n\r\n\t\t\tif (!InputValidator::isEmptyArrayKey($orderParameter, \"internalNote\")) {\r\n\r\n\t\t\t\t$this->internalNote = $orderParameter[\"internalNote\"];\r\n\t\t\t}\r\n\r\n\t\t\tif (!InputValidator::isEmptyArrayKey($orderParameter, \"rejectedOn\")) {\r\n\r\n\t\t\t\t$this->rejectionDate = new Date($orderParameter[\"rejectedOn\"]);\r\n\t\t\t}\r\n\r\n\t\t\tif (!InputValidator::isEmptyArrayKey($orderParameter, \"closedOn\")) {\r\n\r\n\t\t\t\t$this->closeDate = new Date($orderParameter[\"closedOn\"]);\r\n\t\t\t}\r\n\r\n\t\t\tif (!InputValidator::isEmptyArrayKey($orderParameter, \"paidOn\")) {\r\n\r\n\t\t\t\t$this->payDate = new Date($orderParameter[\"paidOn\"]);\r\n\t\t\t}\r\n\r\n\t\t\tif (!InputValidator::isEmptyArrayKey($orderParameter, \"returnedOn\")) {\r\n\r\n\t\t\t\t$this->returnDate = new Date($orderParameter[\"returnedOn\"]);\r\n\t\t\t}\r\n\r\n\t\t\tif (!InputValidator::isEmptyArrayKey($orderParameter, \"shippingData\")) {\r\n\r\n\t\t\t\t$shippingData = $orderParameter[\"shippingData\"];\r\n\r\n\t\t\t\tif (!InputValidator::isEmptyArrayKey($shippingData, \"shippingMethod\" )) {\r\n\r\n\t\t\t\t\t$this->shippingMethod = new ShippingMethod($shippingData[\"shippingMethod\"]);\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif (!InputValidator::isEmptyArrayKey($shippingData, \"price\" )) {\r\n\r\n\t\t\t\t\t$this->shippingPrice = new Price($shippingData[\"price\"]);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tif (!InputValidator::isEmptyArrayKey($orderParameter, \"paymentData\")) {\r\n\r\n\t\t\t\t$paymentData = $orderParameter[\"paymentData\"];\r\n\r\n\t\t\t\tif (!InputValidator::isEmptyArrayKey($paymentData, \"paymentMethod\" )) {\r\n\r\n\t\t\t\t\t$this->paymentMethod = new ShippingMethod($paymentData[\"paymentMethod\"]);\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif (!InputValidator::isEmptyArrayKey($paymentData, \"price\" )) {\r\n\r\n\t\t\t\t\t$this->paymentPrice = new Price($paymentData[\"price\"]);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t// update timestamp when make the next request\r\n\t\t$timestamp = (int) (microtime(true) * 1000);\r\n\t\t$this->NEXT_REQUEST_TIMESTAMP = $timestamp + RESTClient::$NEXT_RESPONSE_WAIT_TIME;\r\n\t}", "public function orderDetails()\n {\n return $this->hasMany( OrderDetails::class, 'product_id', 'id');\n }", "public function setOrder(?string $order): void\n {\n $this->order = $order;\n }", "public function setOrder(?string $order): void\n {\n $this->order = $order;\n }", "public static function addOrderpersondetails(Orderpersondetails $persondetails)\n {\n $persondetails_add_query = \"INSERT INTO TiffinHouseDb.Orderpersondetails (name,email,address,city,state,zip,shippingOption,paymentType,tax,totalPrice,paymentStatus,isCompleted)\n VALUES (:name,:email,:address,:city,:state,:zip,:shippingOption,:paymentType,:tax,:totalPrice,:paymentStatus,:isCompleted)\";\n try {\n self::$db->query($persondetails_add_query);\n self::$db->bind(':name', $persondetails->getName());\n self::$db->bind(':email', $persondetails->getEmail());\n self::$db->bind(':address', $persondetails->getAddress());\n self::$db->bind(':city', $persondetails->getCity());\n self::$db->bind(':state', $persondetails->getState());\n self::$db->bind(':zip', $persondetails->getZip());\n self::$db->bind(':shippingOption', $persondetails->getShippingOption());\n self::$db->bind(':paymentType', $persondetails->getPaymentType());\n self::$db->bind(':tax', $persondetails->getTax());\n self::$db->bind(':totalPrice', $persondetails->getTotalPrice());\n self::$db->bind(':paymentStatus', $persondetails->getPaymentStatus());\n self::$db->bind(':isCompleted', $persondetails->getIsCompleted());\n self::$db->execute();\n $orderId = self::$db->lastInsertedId();\n return $orderId;\n } catch (PDOException $err) {\n echo \"Error : \" . $err->getMessage();\n }\n }", "public function order() {\n\t /* get an update about the order details from hoolah api */\n\t $this->load->language('extension/payment/hoolah');\n\t $this->load->model('extension/payment/hoolah');\n\t $this->load->model('sale/order');\n\t \n\t if (isset($this->request->get['order_id'])) {\n\t\t\t$order_id = $this->request->get['order_id'];\n\t\t} else {\n\t\t\t$order_id = 0;\n\t\t}\n\t\n\t\t// get the callback info\n\t\t$order_mid = 'Order-' . $order_id;\n\t\t$callback_result = $this->model_extension_payment_hoolah->getCallback($order_mid);\n\t\n // call hoolah api\n $hoolah_info = $this->model_extension_payment_hoolah->order($callback_result['order_uuid']);\n \n $infos = array();\n $infos['order_id'] = $hoolah_info->merchantRef;\n $infos['uuid'] = $hoolah_info->uuid;\n $infos['status'] = $hoolah_info->status;\n $infos['orderType'] = $hoolah_info->orderType;\n $infos['total'] = $hoolah_info->totalAmount;\n $infos['tax'] = $hoolah_info->taxAmount;\n $infos['shipping_fee'] = $hoolah_info->shippingAmount;\n $infos['currency'] = $hoolah_info->currency;\n $infos['createdAt'] = date('Y-m-d H:i:s', strtotime($hoolah_info->createdAt));\n $infos['date_added'] = date('Y-m-d H:i:s');\n \n // if the order is refunded, check the status of refund in api\n $refund_status = $this->model_extension_payment_hoolah->getHoolahRefundStatus($callback_result['order_uuid'], 'ACCEPTED');\n \n // provide other details to save in transaction\n if(isset($refund_status)) {\n $infos['total'] = $refund_status['total'];\n $infos['requestId'] = $refund_status['requestId'];\n $infos['code'] = $refund_status['code'];\n $infos['message'] = $refund_status['message'];\n $infos['details'] = $refund_status['details'];\n }\n \n // check if not existing\n $order_transaction = $this->model_extension_payment_hoolah->getHoolahOrderTransactionStatus($hoolah_info->merchantRef, $hoolah_info->status);\n if(count($order_transaction) == 0) {\n // if not existing, insert\n $this->model_extension_payment_hoolah->addHoolahOrderTransaction($infos);\n } else {\n // if existing, update\n $this->model_extension_payment_hoolah->editHoolahOrderTransaction($order_transaction['id'], $infos);\n }\n \n if(isset($order_transaction)) {\n $data['text_extension'] = $this->language->get('text_extension');\n\t\t\t$data['text_transaction'] = $this->language->get('text_transaction');\n\t\t\t$data['text_capture_status'] = $this->language->get('text_capture_status');\n\t\t\t$data['text_amount_authorised'] = $this->language->get('text_amount_authorised');\n\t\t\t$data['text_total_amount_captured'] = $this->language->get('text_total_amount_captured');\n\t\t\t$data['text_amount_captured'] = $this->language->get('text_amount_captured');\n\t\t\t$data['text_amount_refunded'] = $this->language->get('text_amount_refunded');\n\t\t\t$data['text_confirm_void'] = $this->language->get('text_confirm_void');\n\t\t\t$data['text_full_refund'] = $this->language->get('text_full_refund');\n\t\t\t$data['text_partial_refund'] = $this->language->get('text_partial_refund');\n\t\t\t$data['text_loading'] = $this->language->get('text_loading');\n\n\t\t\t$data['entry_capture_amount'] = $this->language->get('entry_capture_amount');\n\t\t\t$data['entry_capture_complete'] = $this->language->get('entry_capture_complete');\n\t\t\t$data['entry_full_refund'] = $this->language->get('entry_full_refund');\n\t\t\t$data['entry_note'] = $this->language->get('entry_note');\n\t\t\t$data['entry_amount'] = $this->language->get('entry_amount');\n\n\t\t\t$data['button_capture'] = $this->language->get('button_capture');\n\t\t\t$data['button_refund'] = $this->language->get('button_refund');\n\t\t\t$data['button_void'] = $this->language->get('button_void');\n\n\t\t\t$data['tab_capture'] = $this->language->get('tab_capture');\n\t\t\t$data['tab_refund'] = $this->language->get('tab_refund');\n\n\t\t\t$data['token'] = $this->session->data['token'];\n\n\t\t\t$data['order_id'] = $this->request->get['order_id'];\n \n \t$data['status'] = $order_transaction['status'];\n\n\t\t\t$data['total'] = $order_transaction['total'];\n\t\t\t\n\t\t\t// total order\n\t\t\t$captured = number_format($this->model_extension_payment_hoolah->getCapturedTotal($order_transaction['order_id']), 2);\n\t\t\t\n\t\t\t$orders = $this->model_sale_order->getOrder($this->request->get['order_id']);\n\t\t\t\n if(number_format($orders['total'], 2) != $captured) {\n $captured = number_format($orders['total'], 2);\n }\n\t\t\t$data['captured'] = $captured;\n \n // refund order\n// \t\t\t$refunded = number_format($this->model_extension_payment_hoolah->getRefundedTotal($order_transaction['uuid']), 2);\n// \t\t\t$data['refunded'] = $refunded;\n\t\t\t\n\t\t\t$hoolah_info = $this->model_extension_payment_hoolah->getHoolahOrderTransaction($this->request->get['order_id']);\n $refund = array();\n \t\tif (isset($hoolah_info)) {\n \t\t\tforeach ($hoolah_info as $key => $result) {\n \t\t // refund\n \t\t if($result['status'] == 'ACCEPTED') {\n \t\t $refund[] = $result['total'];\n \t\t }\n \t\t\t}\n \t\t} \n \t\tif(!empty($refund)) {\n\t\t\t $data['refunded'] = number_format(array_sum($refund), 2);\n\t\t\t} \n\t\t\t$data['total_amount'] = number_format($orders['total'], 2);\n\t\t\t\n\t\t\treturn $this->load->view('extension/payment/hoolah_order', $data);\n }\n\t}", "public function additionOrder()\n {\n global $dbh;\n $sql = $dbh->prepare(\"INSERT INTO `ordero`(`castumerid`, `areaid`, `phoneo`, `areatransid`, `deviceid`, `orderdate`, `timeo`, `timing`, `mdn`, `sn`, `note`, `process`, `idservo`, `idservows`, `idmark`, `poseplt`, `dftime`, `odatews`, `odatefs`, `odatedp`, `timodp`, `timingdp`, `resono`, `deleto`, `employeeid`, `employeeidws`, `employeeiddp`)\n VALUES ('$this->castumerid', '$this->areaid', '$this->phone', '$this->areatransid', '$this->deviceid', '$this->orderdate', '$this->timeo', '$this->timing', '$this->mdn', '$this->sn', '$this->note', '$this->process', '$this->idservo', '$this->idservows', '$this->idmark', '$this->poseplt', '$this->dftime', '$this->odatews', '$this->timodp', '$this->odatedp', '$this->odatedp', '$this->timingdp', '$this->resono', '$this->deleto', '$this->employeeid', '$this->employeeidws', '$this->employeeiddp')\");\n $result = $sql->execute();\n $ido = $dbh->lastInsertId();\n return array ($result,$ido);\n }", "public function captureOrder(\\TPkgShopPaymentTransactionManager $transactionManager, \\TdbShopOrder $order);", "public function addOrders(ArrayObject $orders)\n {\n $this->orders = array_merge($this->orders, $orders);\n }", "public function add_do_express_checkout_params( $token, $order, $args ) {\n\n\t\t$this->set_method( 'DoExpressCheckoutPayment' );\n\n\t\t// set base params.\n\t\t$this->add_parameters(\n\t\t\tarray(\n\t\t\t\t'TOKEN' => $token,\n\t\t\t\t'PAYERID' => $args['payer_id'],\n\t\t\t\t'BUTTONSOURCE' => 'WooThemes_Cart',\n\t\t\t\t'RETURNFMFDETAILS' => 1,\n\t\t\t)\n\t\t);\n\n\t\t$this->add_payment_params( $order, $args['step_id'], $args['payment_action'] );\n\t}", "abstract public function setOrder(OrderModel $order);", "function SetUpSortOrder() {\n\t\tglobal $patient_detail;\n\n\t\t// Check for an Order parameter\n\t\tif (@$_GET[\"order\"] <> \"\") {\n\t\t\t$patient_detail->CurrentOrder = ew_StripSlashes(@$_GET[\"order\"]);\n\t\t\t$patient_detail->CurrentOrderType = @$_GET[\"ordertype\"];\n\t\t\t$patient_detail->UpdateSort($patient_detail->DetailNo); // Field \n\t\t\t$patient_detail->UpdateSort($patient_detail->StudyID); // Field \n\t\t\t$patient_detail->UpdateSort($patient_detail->PatientID); // Field \n\t\t\t$patient_detail->UpdateSort($patient_detail->StudyDate); // Field \n\t\t\t$patient_detail->UpdateSort($patient_detail->StudyTime); // Field \n\t\t\t$patient_detail->UpdateSort($patient_detail->Modality); // Field \n\t\t\t$patient_detail->UpdateSort($patient_detail->BodyPartExamined); // Field \n\t\t\t$patient_detail->UpdateSort($patient_detail->ProtocolName); // Field \n\t\t\t$patient_detail->UpdateSort($patient_detail->Status); // Field \n\t\t\t$patient_detail->setStartRecordNumber(1); // Reset start position\n\t\t}\n\t}", "public function order_details_data($order_id)\n\t{\t\n\t\t$CI =& get_instance();\n\t\t$CI->auth->check_admin_auth();\n\t\t$CI->load->library('Lorder');\n\t\t$content = $CI->lorder->order_details_data($order_id);\t\n\t\t$this->template->full_admin_html_view($content);\n\t}", "public function storeDetail(OrderDetailRequest $request, $_hash)\n {\n return $this->buildApiResponse([\n 'order' => new OrderResource($this->orderRepository->storeDetail($request->get('product'), $_hash))\n ]);\n }", "public function createExpressCheckoutOrder($tid){}", "public function setOrderId($var)\n {\n GPBUtil::checkInt32($var);\n $this->orderId = $var;\n\n return $this;\n }", "public function Order_Details()\n {\n $this->_Order_Details->ClearAllOptions();\n return $this->_Order_Details;\n }", "public function setOrderById($orderId, $orderData)\n {\n }", "public function setOrderAttributes($requestParameters = array());", "private function inserOrderproduct($orderId){\n\t\t$this->load->library(\"cart\");\n\t\tforeach($this->cart->contents() as $items){\n\t\t\t$object=array(\n\t\t\t\t'OrdId' => $orderId,\n\t\t\t\t'ItemId' => $items['id'],\n\t\t\t\t'ItemName' => $items['name'],\n\t\t\t\t'ItemEdition' => $items['options']['BookEdition'],\n\t\t\t\t'ItemAuther' => $items['options']['Author'],\n\t\t\t\t'ItemQuantity' => $items['qty'],\n\t\t\t\t'ItemRetailPrice' => $items['options']['RetailPrice'],\n\t\t\t\t'ItemSellingPrice' => $items['price'],\n\t\t\t\t'ItemDiscount' => $items['options']['Discount']\n\t\t\t);\n\t\t\t$this->db->insert('tbl_order_lineitems', $object);\n\t\t}\n\t}", "public function update(Request $request, Order $order)\n {\n if($request->has('address1')){\n $order->address()->update($request->all());\n }\n if($request->has('variation_thickness')){\n $order->spec()->update(array('variation_thickness' => $request->variation_thickness));\n }\n if($request->has('variation_density')){\n $order->spec()->update(array('variation_density' => $request->variation_density));\n }\n dd($order);\n }", "public function __construct($order)\n {\n $this->order = $order;\n\n $log = new OrderLog;\n $log->id_user = auth()->user()->id;\n $log->id_order = $this->order->id;\n \n foreach($this->order->getChanges() as $key => $value){\n $log->content .= $key . \": \" . $value . \"<br>\";\n }\n\n $log->save();\n }" ]
[ "0.7269737", "0.6401613", "0.636054", "0.59644663", "0.5562185", "0.54909265", "0.54899704", "0.54101765", "0.5369591", "0.5238329", "0.5166711", "0.51644105", "0.5112411", "0.50965637", "0.50945866", "0.50818735", "0.5066399", "0.50464237", "0.5038669", "0.50383526", "0.5032136", "0.5020962", "0.5005671", "0.4966844", "0.4941789", "0.493997", "0.4922462", "0.4913886", "0.49100214", "0.49046606", "0.4888478", "0.4888478", "0.4888478", "0.4888478", "0.4888478", "0.4888478", "0.4888478", "0.4888478", "0.4882916", "0.48827457", "0.48824534", "0.4871795", "0.48704064", "0.48612303", "0.48602942", "0.48569623", "0.4854267", "0.48539937", "0.48539937", "0.48539937", "0.48539937", "0.48539937", "0.48539937", "0.48539937", "0.48539937", "0.48539937", "0.48539937", "0.48481864", "0.4840405", "0.48331222", "0.48315355", "0.4812312", "0.4810571", "0.48069283", "0.47998792", "0.47952", "0.47728232", "0.47714436", "0.47577074", "0.47522113", "0.4747841", "0.4734767", "0.47320026", "0.47300738", "0.47248867", "0.4712564", "0.47089833", "0.46850345", "0.46778798", "0.46689218", "0.46607405", "0.46607405", "0.46553713", "0.4655138", "0.46529776", "0.46497095", "0.46491504", "0.4636089", "0.46330658", "0.46275327", "0.46234727", "0.46225145", "0.46108946", "0.46071666", "0.46037006", "0.4599366", "0.4595256", "0.4593411", "0.45916414", "0.4589622" ]
0.77710706
0
Tests that a newly registered users sees everything as new
public function testIsNewerThanForNewUsers() { $userData = ['id' => 1, 'last_refresh' => null]; $this->CurrentUser->setSettings($userData); $this->assertNull($this->LastRefresh->isNewerThan(time())); $this->assertNull($this->LastRefresh->isNewerThan(date('Y-m-d h:i:s', time()))); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testShouldCreateANewUser()\n {\n $user = factory(User::class)->create();\n\n $role = Role::where(\"name\", \"admin\")->first();\n $user->attachRole($role);\n\n $this->actingAs($user);\n\n $invitationLink = (new CreateInvitationLinkService($user))->execute([\n \"type\" => \"STUDENT\",\n ]);\n\n $createdUser = (new CreateUserService())->execute([\n \"name\" => $this->faker->name,\n \"email\" => $this->faker->unique()->safeEmail,\n \"password\" => \"12345678\",\n \"hash\" => $invitationLink->hash,\n ]);\n\n $this->assertTrue(is_numeric($createdUser->id));\n }", "public function test_users_store_valid_perists_to_db(){\n $this->signInUser();\n $response = $this->post(route('users.store'), $this->user);\n unset($this->user['password']);\n unset($this->user['password_confirmation']);\n $this->assertDatabaseHas('users', $this->user);\n }", "public function testLifeCycle()\n {\n $allEntities = $this->getModelManager()->findAll();\n $this->assertCount(5, $allEntities, \"Should return five entities\");\n\n // Create new one\n $newEntity = $this->getModelManager()->createUser();\n $newEntity\n ->setFullName('u')\n ->setSideBarOpen(true)\n ->setEmail('a@b.c')\n ->setPlainPassword('pw')\n ->setEnabled(true)\n ->setUsername('u')\n ->setRoles(['ROLE_USER'])\n ;\n $this->getModelManager()->saveEntity($newEntity);\n\n // Check that there are 6 entries, and the new one is Timestamped correctly\n $allEntities = $this->getModelManager()->findAll();\n $this->assertCount(6, $allEntities, \"Should return seven entities\");\n $this->assertNotNull($allEntities[5]->getCreated());\n $this->assertEquals($allEntities[5]->getCreated(), $allEntities[5]->getUpdated());\n\n // Updated shouldn't change until persisted\n $newEntity->setFullName('u2');\n $this->assertEquals($allEntities[5]->getCreated(), $allEntities[5]->getUpdated());\n\n sleep(1);\n\n $this->getModelManager()->saveEntity($newEntity);\n $this->assertNotEquals($allEntities[5]->getCreated(), $allEntities[5]->getUpdated());\n\n // Check that when we refresh it refreshes\n $newEntity->setFullName('u3');\n $this->getModelManager()->reloadUser($newEntity);\n $this->assertEquals('u2', $newEntity->getFullName());\n\n // Check that when we remove it, it is no longer present\n $this->getModelManager()->removeUser($newEntity->getId());\n $allEntities = $this->getModelManager()->findAll();\n $this->assertCount(5, $allEntities, \"Should return five entities\");\n }", "public function test_is_new_user_can_register()\n {\n $data = factory('App\\User')->make();\n\n $this->post(route('register'), $data->toArray())\n ->assertRedirect(\"/\");\n }", "function user_can_added_to_DB_and_name_check() {\n $user = factory(User::class)->create();\n\n $this->assertEquals( !0, User::all()->count() );\n $this->seeInDatabase('users', ['name' => $user->name]);\n }", "public function testCanSelfEditUser()\n {\n $faker = \\Faker\\Factory::create();\n $user = factory(User::class)->create();\n $user->activate();\n $newName = $faker->name;\n $newEmail = $faker->email;\n $newPass = bcrypt(\"newsecret\");\n Auth::login($user);\n \n $this->put('/api/v1/user/'.$user->id, ['name' => $newName], ['HTTP_X-Requested-With' => 'XMLHttpRequest'])\n ->assertJson([\n 'user' => [\n 'name' => $newName,\n 'email' => $user->email,\n ]\n ]);\n $this->put('/api/v1/user/'.$user->id, ['name' => $user->name, 'email' => $newEmail], ['HTTP_X-Requested-With' => 'XMLHttpRequest'])\n ->assertJson([\n 'user' => [\n 'name' => $user->name,\n 'email' => $newEmail,\n ]\n ]);\n $this->put('/api/v1/user/'.$user->id, ['password' => $newPass, 'password_confirmation' => $newPass], ['HTTP_X-Requested-With' => 'XMLHttpRequest'])\n ->assertJson([\n 'user' => [\n 'name' => $user->name,\n 'email' => $newEmail,\n ]\n ]);\n $this->assertDatabaseHas('users', [\n 'name' => $user->name,\n 'email' => $newEmail,\n ]);\n }", "public function test_users_update_valid_perists_to_db(){\n $this->signInUser();\n $user = User::find(5);\n $this->patch(route('users.update', ['user' => $user->id]), $this->user); \n $this->assertDatabaseHas('users', [\n 'id' => $user->id,\n 'name' => $this->user['name'],\n 'email' => $this->user['email']\n ]);\n }", "public function testCanRegisterUsers()\n {\n $this->post('/api/v1/register', [\n 'name' => 'John Doe',\n 'email' => 'john@doe.com',\n 'password' => 'johndoepass',\n 'password_confirmation' => 'johndoepass',\n ], ['HTTP_X-Requested-With' => 'XMLHttpRequest'])\n ->assertJson([\n 'user' => [\n 'name' => 'John Doe',\n 'email' => 'john@doe.com'\n ]\n ]);\n $this->assertDatabaseHas('users', [\n 'name' => 'John Doe',\n 'email' => 'john@doe.com',\n 'activated' => false\n ]);\n $this->assertDatabaseHas('user_activations', [\n 'email' => 'john@doe.com'\n ]);\n }", "public function testPostCreateNewUserPage()\n\t{\n\t\t$this->be($this->user);\n\n\t\t$response = $this->call('orchestra::users@view', array(''), 'POST', array(\n\t\t\t'id' => '',\n\t\t\t'email' => 'crynobone@gmail.com',\n\t\t\t'fullname' => 'Mior Muhammad Zaki',\n\t\t\t'password' => '123456',\n\t\t\t'roles' => array(2),\n\t\t));\n\n\t\t$this->assertInstanceOf('Laravel\\Redirect', $response);\n\t\t$this->assertEquals(302, $response->foundation->getStatusCode());\n\t\t$this->assertEquals(handles('orchestra::users'), \n\t\t\t$response->foundation->headers->get('location'));\n\n\t\t$user = Orchestra\\Model\\User::where_email('crynobone@gmail.com')->first();\n\n\t\t$this->assertGreaterThan(0, $user->id);\n\t\t$this->assertEquals('crynobone@gmail.com', $user->email);\n\t\t$this->assertEquals('Mior Muhammad Zaki', $user->fullname);\n\t\t$this->assertTrue(Hash::check('123456', $user->password));\n\n\t\t$user->delete();\n\t}", "public function testItCreatesANewUserWithValidData()\n {\n $data = factory(User::class)->make([\n \"tenant_id\" => $this->user->tenant->id,\n \"address\" => [\n \"city\" => \"springfield\",\n \"country\" => \"united states of america\",\n \"state\" => \"missouri\",\n \"street\" => \"1742 evergreen terrace\",\n ]\n ]);\n\n $response = $this->actingAs($this->user)\n ->postJson(\n \"api/v1/users/\",\n $data->only([\n \"address\",\n \"email\",\n \"firstname\",\n \"lastname\",\n \"tenant_id\",\n ])\n )->assertOk();\n \n $user = User::all()->last();\n\n $response\n ->assertJson([\n \"id\" => $user->id,\n \"firstname\" => $user->firstname,\n \"lastname\" => $user->lastname,\n ]);\n }", "public function testEditUsersSuccess()\n {\n $user = User::find(2);\n $this->browse(function (Browser $browser) use ($user) {\n $browser->loginAs($this->user)\n ->visit('/admin/users/'.$user->id.'/edit')\n ->resize(900, 1000)\n ->assertSee('Update users')\n ->type('name',$user->name)\n ->press('Submit')\n ->assertSee('Successfully updated user!')\n ->assertPathIs('/admin/users');\n });\n $this->assertDatabaseHas('users', [\n 'name' => $user->name]);\n }", "public function testUserCanCreated()\n {\n $user = factory(App\\UserMongo::create([\n \t'first_name' => 'agus',\n \t'last_name' => 'yusida',\n \t'email' => 'agusyusida@gmail.com',\n \t]));\n \t$this->seeInDatabase('users',[\n \t\t'first_name' => 'agus',\n \t'last_name' => 'yusida',\n \t'email' => 'agusyusida@gmail.com',\n \t\t]);\n }", "public function test_it_creates_a_new_user()\n {\n $user = ['email' => 'me@andrewhook.uk', 'given_name' => 'Andrew', 'family_name' => 'Hook'];\n\n $this->json('POST', '/users', $user)\n ->seeJson($user);\n }", "public function testNewUserRegistration()\n\t{\n\t $this->visit('/register')\n\t ->type('Taylor', 'name')\n\t ->type('luker@gmail.com', 'email')\n\t ->type('mytest', 'password')\n\t ->type('mytest', 'password_confirmation')\n\t ->press('Register');\n\t}", "public function test_create_user_duplicated()\n {\n $last_data=User::latest()->first();\n $response = $this->json('POST', \n '/user_create', \n [\n 'name' => $this->fullname, \n 'email' => $last_data['email'], \n 'password' => $this->password]);\n $response\n ->assertStatus(200)\n ->assertJson([\n $this->all_message => $this->user_create_duplicated,\n ]);\n }", "public function testTheWritingsPageLoadsSuccessfullyForRegularUsers()\n {\n $regularUser = factory(\\App\\User::class)->states('regularUser')->create();\n $this->actingAs($regularUser);\n\n $response = $this->get('writings');\n $response->assertStatus(200);\n }", "public function testCreateAndUpdateUser()\n {\n $username = 'user@example.com';\n\n $currentEmail = $username;\n $newEmail = 'something@example.com';\n\n $raw = $this->getUser($username, $currentEmail);\n\n // Create\n $this->adapter->send(new Request(array(\n $raw,\n )));\n\n $real = static::$repository->getUserService()->loadUserByLogin($username);\n $this->assertInstanceOf(User::class, $real);\n $this->assertEquals($currentEmail, $real->email);\n\n // Update\n $raw->data['email'] = $newEmail;\n $this->adapter->send(new Request(array(\n $raw,\n )));\n\n $real = static::$repository->getUserService()->loadUserByLogin($username);\n $this->assertInstanceOf(User::class, $real);\n $this->assertEquals($newEmail, $real->email);\n }", "public function testNewPersonsOwnershipExistingCustomers() {\n $this->addProductToCart($this->product);\n $this->goToCheckout();\n $this->assertCheckoutProgressStep('Event registration');\n\n // Save first registrant.\n $this->clickLink('Add registrant');\n $this->submitForm([\n 'person[field_name][0][value]' => 'Person 1',\n 'person[field_email][0][value]' => 'person1@example.com',\n 'field_comments[0][value]' => 'No commments',\n ], 'Save');\n\n // Assert that this person profile is now owned by the current logged in\n // user.\n $person = Profile::load(1);\n // Assert that we are checking the expected person.\n $this->assertEquals('Person 1', $person->field_name->value);\n $this->assertEquals($this->adminUser->id(), $person->getOwnerId());\n }", "public function testProfileCheckIfUserExists()\n {\n\n }", "public function test_users_create_authenticated_user_shows_correct_view(){\n $this->signInUser();\n $response = $this->get(route('users.create'));\n $response->assertStatus(200);\n $response->assertViewIs('views.users.create');\n }", "public function testIndexCreateUser()\n {\n $this->browse(function (Browser $browser) {\n $browser->visit(route('admin@getLogin'))\n ->type('email', 'admin@fresher03.local.com')\n ->type('password', 'cowell@123')\n ->press('Login')\n ->visit(route('admin@user@create'))\n ->type('email', 'huy@fresher03.local.com')\n ->type('password', 'cowell@123')\n ->type('first_name', 'cowell@123')\n ->type('last_name', 'cowell@123')\n ->select('id_role', '3')\n ->press('Create')\n ->assertSee('Xong rồi');\n });\n }", "public function test_users_update_valid_no_password_no_affect(){\n $this->signInUser();\n $user = User::find(5);\n unset($this->user['password']);\n unset($this->user['password_confirmation']);\n $this->patch(route('users.update', ['user' => $user->id]), $this->user); \n $this->assertDatabaseHas('users', [\n 'id' => $user->id,\n 'name' => $this->user['name'],\n 'email' => $this->user['email'],\n 'password' => $user->password\n ]);\n }", "public function testCreateUserAndList(): void\n {\n User::factory()->count(1)->create();\n\n $users = User::all();\n self::assertCount(1, $users);\n $list = array_keys($users->first()->getAttributes());\n self::assertEqualsCanonicalizing(\n [\n 'id',\n 'name',\n 'email',\n 'cpf/cnpj',\n 'type_person',\n 'email_verified_at',\n 'password',\n 'remember_token',\n 'created_at',\n 'updated_at'\n ],\n $list\n );\n }", "public function testAdminCreations() {\n $admins = Config::get('boilerplate.admins');\n foreach ($admins as $email => $pw) {\n $user = User::where('email', $email)->first();\n $this->assertNotNull($user);\n $this->assertTrue($user->isAdmin());\n }\n }", "public function testInsertANewActiveUser()\r\n {\r\n\t$activeUsersController = new ActiveUsersController();\r\n \r\n //Today's date\r\n $date = new DateTime();\r\n $dateTime = $date->format('Y-m-d H:i:s');\r\n \r\n $countBeforeInsertion = $activeUsersController->GetAllActiveUsers();\r\n $activeUsersController->InsertANewActiveUser(38, $dateTime, 1);\r\n \r\n $countAfterInsertion = $activeUsersController->GetAllActiveUsers();\r\n \r\n $this->assertEquals(count($countBeforeInsertion)+1,count($countAfterInsertion));\r\n }", "public function testRegistrationUITest()\n {\n $this->browse(function (Browser $browser) {\n $browser->visit('/add_user')\n ->assertSee('Username')\n ->assertSee('First Name')\n ->assertSee('Last Name')\n ->assertSee('Password')\n ->assertSee('Confirm Password')\n ->assertSee('Role')\n ->assertSee('Save');\n });\n }", "function testDoubleRegistration() {\n\t\t$pkey = Cgn_User::registerUser($this->user);\n\t\t$this->assertEqual(FALSE, $pkey);\n\t}", "public function testAdministrationUsers()\n {\n $this->browse(function (Browser $browser) {\n $browser->visit(new Login())\n ->loginAsUser('first-user@example.com', 'password');\n\n $browser->assertSee('Gérer les utilisateurs')\n ->clickLink('Gérer les utilisateurs')\n ->waitForText('first-user@example.com')\n ->assertSee('first-user@example.com')\n ->assertSee('second-user@example.com');\n });\n }", "public function testNewlyCreatedUsersThatHaveNotLoggedInAreNotDeleted(): void\n {\n User::factory()->create();\n\n $this->artisan('model:prune');\n\n $this->assertCount(1, User::all());\n }", "public function testRegistrationNonUniqUsername()\n {\n $this->browse(function (Browser $browser) {\n $browser->visit('/add_user')\n ->type('username', 'testuser1')\n ->type('first_name', 'aaaa')\n ->type('last_name', 'aaaa')\n ->type('password', 'abcd1234')\n ->type('password_confirmation', 'abcd1234')\n ->click('button[type=\"submit\"]')\n\n // verify we've logged in and we've are on the list\n ->waitForText('The username has already been taken.')\n ->assertSee('The username has already been taken.');\n });\n }", "public function testUniqueFields() {\n $account = $this->drupalCreateUser();\n\n $edit = ['mail' => 'test@example.com', 'name' => $account->getAccountName()];\n $this->drupalGet('user/register');\n $this->submitForm($edit, 'Create new account');\n $this->assertSession()->pageTextContains(\"The username {$account->getAccountName()} is already taken.\");\n\n $edit = ['mail' => $account->getEmail(), 'name' => $this->randomString()];\n $this->drupalGet('user/register');\n $this->submitForm($edit, 'Create new account');\n $this->assertSession()->pageTextContains(\"The email address {$account->getEmail()} is already taken.\");\n }", "public function testGetAll()\n {\n foreach (range(1,10) as $index)\n {\n DB::table('users')->insert([\n 'first_name' => $this->faker->firstName,\n 'last_name' => $this->faker->lastName,\n 'email' => $this->faker->email,\n 'password' => bcrypt('secret'),\n 'created_at' => new \\DateTime(),\n 'updated_at' => new \\DateTime()\n ]);\n }\n\n // Get the user from DB with the getById method\n $userFromDb = $this->userRepository->getAll();\n // Make sure the user the proper name and email\n $this->assertCount(10, $userFromDb);\n }", "public function test_logged_in_user_show_info()\n {\n $user=User::factory()->create();\n //behavior as this created user\n $response=$this->actingAs($user)->get(route('auth.user'));\n\n $response->assertStatus(Response::HTTP_OK);\n }", "public function testItReturnsUsers()\n {\n $this->user->update([\"firstname\" => \"anthony\"]);\n $user1 = factory(User::class)->create([\n \"firstname\" => \"james\",\n \"tenant_id\" => $this->user->tenant_id,\n ]);\n $tenant2 = factory(Tenant::class)->create();\n $user2 = factory(User::class)->create([\n \"firstname\" => \"benjamin\",\n \"tenant_id\" => $tenant2->id,\n ]);\n\n $this->actingAs($this->user)\n ->getJson(\"api/v1/users\")\n ->assertOk()\n ->assertJson([\n \"data\" => [\n $this->user->only([\"id\", \"firstname\"]),\n $user2->only([\"id\", \"firstname\"]),\n $user1->only([\"id\", \"firstname\"]),\n ],\n ]);\n }", "public function testCreateMatch()\n {\n Event::fake();\n\n $this->actingAs(factory(User::class)->create());\n $response = $this->post('/matches', $this->data());\n\n $this->assertCount(1, User::all());\n }", "protected function add_sample_users(){\n // a non-admin user\n factory(User::class,1)->create();\n\n $this->non_admin = User::where('superuser',0)->first();\n $this->admin = User::where('superuser',1)->first();\n }", "public function testLoginRegister(){\n $user = User::find(1);\n $this->be($user);\n\n $response =$this->get(route('administracion'));\n $response->assertStatus(200);\n }", "public function testUser()\n {\n $this->assertDatabaseHas('users', [\n 'email' => 'kert.mottus@gmail.com'\n ]);\n }", "public function testBasicTest()\n {\n $users = factory(\\App\\Models\\Suara::class, 1000)->make();\n\n foreach ($users as $key => $value) {\n $value->save();\n }\n $this->assertCount(6, $users);\n $response = $this->get('/');\n\n $response->assertStatus(200);\n }", "public function testPositiveOfCreateUser()\n {\n $this->browse(function (Browser $browser) {\n $name = $this->faker->name;\n $browser->maximize()\n ->loginAs(User::first())\n ->visit('/users')\n ->pause(2000)\n ->clickLink('Create User')\n ->pause(2000)\n ->type('name', $name)\n ->type('email', $this->faker->email)\n ->type('password', 'mejikuhibiniuQwerty')\n ->type('phone', '089786757564')\n ->attach('avatar', __DIR__.'/face-test.jpg')\n ->type('address', $this->faker->address)\n ->press('Save')\n ->pause(3000)\n ->assertSee('User successfully created');\n });\n }", "public function test_admin_can_create_user()\n {\n // $this->withoutExceptionHandling();\n $this->actingAs($this->adminUser())\n ->post(route('users.store'), [\n 'name' => 'Faustino Vasquez'\n ])->assertRedirect('admin/users/faustino-vasquez/edit');\n }", "public function testIntegrationUpdate()\n {\n $userFaker = factory(Model::class)->create();\n $this->visit('user/' . $userFaker->slug . '/edit')\n ->type('Foo bar', 'name')\n ->type('Foobar', 'username')\n ->type('foo@bar.com', 'email')\n ->type('foobar123', 'password')\n ->type('foobar123', 'password_confirmation')\n ->press('Save')\n ->seePageIs('user');\n $this->assertResponseOk();\n $this->seeInDatabase('users', [\n 'username' => 'Foobar',\n 'email' => 'foo@bar.com'\n ]);\n $this->assertViewHas('models');\n }", "public function testShouldNotSaveDuplicated()\n {\n ConfideUser::$app['confide.repository'] = m::mock( 'ConfideRepository' );\n ConfideUser::$app['confide.repository']->shouldReceive('userExists')\n ->with( $this->confide_user )\n ->andReturn( 1 )\n ->once();\n\n $this->populateUser();\n $this->confide_user->confirmation_code = '';\n $this->confide_user->confirmed = false;\n\n $this->assertFalse( $this->confide_user->save() );\n }", "public function canCreateAUser ()\n {\n\n $faker = Factory::create();\n\n $this->withoutExceptionHandling();\n\n\n $response = $this->json('POST', 'api/users', [\n 'name' => $name = $faker->company,\n 'surName' => $surName = $faker->company,\n 'email' => $email = $faker->company,\n 'password' => $password = $faker->company,\n 'entity' => $entity = $faker->company,\n 'street' => $street = $faker->company,\n 'number' => $number = random_int(0,9999),\n 'city' => $city = $faker->company,\n 'CP' => $CP = random_int(0,9999),\n ])\n ->assertStatus(201);\n\n $this->assertDatabaseHas('users', [\n 'name'=> $name,\n 'surName'=> $surName,\n 'email'=>$email,\n 'password'=>$password,\n 'entity'=>$entity,\n 'street'=>$street,\n 'number'=>$number,\n 'city'=>$city,\n 'CP'=>$CP,\n ]);\n }", "public function test_users_create_authenticated_admin_shows_correct_view(){\n $this->signInAdmin();\n $response = $this->get(route('users.create'));\n $response->assertStatus(200);\n $response->assertViewIs('views.users.create');\n }", "protected function RegisterIfNew(){\n // Si el sitio es de acceso gratuito, no debe registrarse al usuario.\n // Luego debe autorizarse el acceso en el metodo Authorize\n $url = $this->getUrl();\n if ($url instanceof Url && $this->isWebsiteFree($url->host)){\n return;\n }\n\t\t\n\t\t// Crear la cuenta de usuarios nuevos\n // if (!DBHelper::is_user_registered($this->user)){\n // if (!(int)$this->data->mobile || \n // (int)($this->data->client_app_version) < AU_NEW_USER_MIN_VERSION_CODE){\n // // Force update\n // $this->url = Url::Parse(\"http://\". HTTP_HOST .\"/__www/new_user_update_required.php\");\n // }else{\n // DBHelper::createNewAccount($this->user, DIAS_PRUEBA);\n // }\n // }\n \n // No crear cuenta. En su lugar mostrar una pagina notificando\n // E:\\XAMPP\\htdocs\\__www\\no_registration_allowed.html\n \n if (!DBHelper::is_user_registered($this->user)){\n DBHelper::storeMailAddress($this->user);\n $this->url = Url::Parse(\"http://auroraml.com/__www/no_registration_allowed.html\");\n }\n }", "public function test_users_create_authenticated_leader_shows_correct_view(){\n $this->signInLeader();\n $response = $this->get(route('users.create'));\n $response->assertStatus(200);\n $response->assertViewIs('views.users.create');\n }", "public function test_create_user_success()\n {\n if( User::where('email',$this->email)->exists()){\n User::where('email',$this->email)->delete();\n }\n $response = $this->json('POST', '/user_create',\n [\n 'name' => $this->name,\n 'email' => $this->email,\n 'password' => $this->password]);\n $response\n ->assertStatus(200)\n ->assertExactJson([\n $this->all_message => $this->user_create_success,\n ]);\n }", "public function testSignUp()\n {\n $user = factory(App\\User::class)->make();\n $response = $this->post('/users', [\n 'first_name' => $user->getAttributeValue('first_name'),\n 'last_name' => $user->getAttributeValue('last_name'),\n 'email' => $user->getAttributeValue('email'),\n 'password' => 'qwerty',\n 'password_confirmation' => 'qwerty',\n '_token' => csrf_token()\n ]);\n\n $this->seeJson([\n 'id' => Auth::id(),\n 'first_name' => $user->getAttributeValue('first_name'),\n 'last_name' => $user->getAttributeValue('last_name'),\n 'email' => $user->getAttributeValue('email'),\n 'created_at' => Auth::user()->created_at->format($this->date_format),\n 'updated_at' => Auth::user()->updated_at->format($this->date_format)\n ]);\n\n $user = Auth::user();\n $this->assertTrue($user->hasRole(config('entrust.default')));\n $this->assertResponseStatus(200);\n }", "public function testUserEditNonUniqueUsername()\n {\n $this->browse(function (Browser $browser) {\n $update_button = self::$locator . ' td .update_button';\n\n $browser->visit('/')\n ->click($update_button)\n ->type('username', 'testuser1')\n ->type('first_name', 'aaaa')\n ->type('last_name', 'aaaa')\n ->type('password', 'abcd1234')\n ->type('password_confirmation', 'abcd1234')\n ->click('button[type=\"submit\"]')\n\n ->waitForText('The username has already been taken.')\n ->assertSee('The username has already been taken.');\n });\n }", "public function testModify()\n {\n $user = User::factory()->create();\n $old_name = $user->name;\n $old_email = $user->email;\n\n $user->name = 'David';\n $user->email = 'david@gmail.com';\n $update = $user->save();\n\n $this->assertTrue($update);\n $this->assertNotEquals($old_name, $user->name);\n $this->assertNotEquals($old_email, $user->email);\n }", "public function testAddUser()\n {\n }", "public function test_compare_database()\n {\n $responseProfie = $this->jsonUser('GET', 'api/users/info',[], []);\n $data = json_decode($responseProfie->getContent())->result;\n $arrayUser = [\n 'id' => $data->id,\n 'username' => $data->username,\n 'email' => $data->email\n ];\n $this->assertDatabaseHas('users', $arrayUser);\n }", "public function testMailLogger()\n\t{\n\t\t$one = $this->user->userByID(1);\n\t\t$this->assertContains('dre', $one);\n\t\t$this->assertContains('1', $one);\n\t\t$this->assertTrue($this->user->checkExisting('dre'), true);\n\t}", "public function testUser1() {\n // Load the user 1 profile page.\n $this->drupalGet('/user/1');\n // Confirm the page title is correct.\n $this->assertRaw('<title>Access denied | ');\n $this->assertNoRaw('<title>admin | ');\n $this->assertNoRaw('<title>Site under maintenance | ');\n\n // Put the site into maintenance mode.\n \\Drupal::state()->set('system.maintenance_mode', TRUE);\n Cache::invalidateTags(['rendered']);\n\n // Load the user 1 profile page again.\n $this->drupalGet('/user/1');\n // Confirm the page title has changed.\n $this->assertNoRaw('<title>Access denied | ');\n $this->assertNoRaw('<title>admin | ');\n $this->assertRaw('<title>Site under maintenance | ');\n }", "public function testMeetupWillBeListedForPermittedUsers()\n {\n $data = array(\n 'permission' => 'custom',\n 'permittedUsers' => array('5003e8bc757df2020d000000'),\n );\n list($responseCode, $responseBody) = sendPutRequest($this->endpoint .'/5003e8bc757df2020d0f0033', $data, $this->user1Headers);\n\n list($responseCode, $responseBody2) = sendGetRequest($this->endpoint, array(), $this->user2Headers);\n $retrievedForUser2 = json_decode($responseBody2);\n\n list($responseCode, $responseBody3) = sendGetRequest($this->endpoint, array(), $this->user3Headers);\n $retrievedForUser3 = json_decode($responseBody3);\n\n $this->assertSame(2, count($retrievedForUser2));\n $this->assertSame(3, count($retrievedForUser3));\n }", "public function testCannotViewRegisterIfLoggedIn()\n {\n $user = factory(User::class)->create([\n 'email' => 'valid@email.com',\n 'password' => bcrypt('testing')\n ]);\n\n $this->actingAs($user)->visit('/')->visit('/register')->seePageIs('/');\n }", "public function testUpdateUser()\n {\n // grab test user data\n $user = User::where('email', 'validuser@gmail.com') -> first();\n $oldName = $user -> name;\n $newName = 'name'.rand(1,999999);\n // update user name\n User::where('email', 'validuser@gmail.com') -> update(['name' => $newName]);\n // verify name is different\n $user = User::where('email', 'validuser@gmail.com') -> first();\n $this -> assertSame($user -> name, $newName);\n $this -> assertFalse($oldName == $user -> name);\n }", "public function testSuccessfulRegistration(){\n \t/*\n \t * Create a user for registration\n \t */\n \t$clearpass = str_random(10);\n \t$user = factory(App\\User::class)->make([\n \t\t\t'password' => bcrypt($clearpass)\n \t]);\n \t\n \t/*\n \t * Visit the Registration page and confirm a user can successfully create an account\n \t */\n \t$this->visit('/register')\n \t->see('E-Mail Address')\n \t->type($user->name, 'name')\n \t->type($user->email, 'email')\n \t->type($clearpass, 'password')\n \t->type($clearpass, 'password_confirmation')\n \t->press('Register') \t\n \t->see('You are logged in!');\n \t\n \t$this->assertFalse(App\\User::where('name', $user->name)->get()->isEmpty());\n }", "public function testCreateUser()\n {\n }", "public function testVerUsuarios()\n {\n $user = User::all();\n $this->browse(function (Browser $browser) use ($user) {\n $browser->loginAs($user[0])\n ->resize(1300, 1200)\n ->visit('/admin')\n ->clickLink('Usuarios')\n ->clickLink('Administrar usuarios')\n ->assertPathIs('/admin/usuarios')\n ->assertSee('Usuarios')\n ->pause(1000)//peticiones ajax\n ->waitForText('Siguiente')\n ->with('.table', function ($table) use ($user) {\n $table->assertSee($user[1]->email);\n });\n });\n }", "public function testRegisterUsedUsername() {\n\t\t$data = $this->getUserData(\n\t\t\t$this->username,\t\t\t// Already registered\n\t\t\t$this->first_name,\n\t\t\t$this->surname,\n\t\t\t'another@test.com'\n\t\t);\n\t\t\n\t\t$response = $this->call('POST','v1/users', $data);\n\t\t$resp_data = $response->getData();\n\n\t\t$this->assertResponseStatus(400);\n\t\t$this->assertTrue($resp_data->error);\n\t\t$this->assertEquals(count($resp_data->messages), 1);\n\t}", "public function test_add_user_roles()\n {\n $roles = [\n Role::firstOrCreate(['display_name' => Role::ACCOUNT_MANAGER])->id,\n Role::firstOrCreate(['display_name' => Role::CASHIER])->id,\n ];\n\n $this->put('users/'.$this->user->id, compact('roles'))\n ->assertRedirect(route_with_hash('settings.index', '#users'))\n ->assertSessionHas('flash_notification.message', 'User details updated');\n\n self::assertCount(2, $this->user->roles);\n }", "public function testCannotEditOtherUser()\n {\n $faker = \\Faker\\Factory::create();\n $user = factory(User::class)->create();\n $user->activate();\n $other = factory(User::class)->create();\n $other->activate();\n $newName = $faker->name;\n Auth::login($other);\n \n $this->put('/api/v1/user/'.$user->id, ['name' => $newName], ['HTTP_X-Requested-With' => 'XMLHttpRequest'])\n ->assertStatus(403);\n $this->assertDatabaseHas('users', [\n 'name' => $user->name,\n 'email' => $user->email\n ]);\n }", "function loadCreateUser()\n {\n $this->get('/usuarios/nuevo')\n ->assertStatus(200)\n ->assertSee('Crear nuevo usuario');\n }", "public function testUserDetails() {\n\t\t// make new User and save it to the database\n\t\t$Role = Role::where('name', 'user')->first();\n\n\t\t// test home page 200 response code\n\t\t$this->visit('/home')\n\t\t\t->seePageIs('/home')\n\t\t\t->assertResponseOk();\n\n\t\t// check that User details are being displayed\n\t\t$this->visit('/home')->within('.body-content', function() use($Role) {\n\t\t\t$this->see($this->User->name)\n\t\t\t\t->see($this->User->email)\n\t\t\t\t->see(Language::trans('database.role-name-'.$Role->name));\n\t\t});\n\t}", "public function test_if_users_list_loads_with_data()\n {\n factory(User::class)->create([\n 'name'=>'Joel' \n ]);\n $this->get('/usuarios')\n ->assertStatus(200)\n ->assertSee('Joel'); \n }", "public function testCreateUser()\n {\n $user = factory(User::class)->make();\n $this->assertTrue($user->save());\n $this->assertNotEmpty($user->id);\n }", "public function testShouldSaveValidUser()\n {\n ConfideUser::$app['confide.repository'] = m::mock( 'ConfideRepository' );\n ConfideUser::$app['confide.repository']->shouldReceive('userExists')\n ->with( $this->confide_user )\n ->andReturn( 0 )\n ->once();\n\n $this->populateUser();\n $this->confide_user->confirmation_code = '';\n $this->confide_user->confirmed = false;\n\n $this->assertTrue( $this->confide_user->save() );\n }", "public function testUserRegister()\n {\n $response = $this->get('/register')\n ->assertStatus(200)\n ->assertSee('Register');\n }", "public function testUserEditNoUsername()\n {\n $this->browse(function (Browser $browser) {\n // locate the new user created in previous test\n for ($i = 1; $i <= 10; $i++) {\n self::$locator = 'table tr:nth-child(' . $i . ')';\n if (self::$username == $browser->text(self::$locator . ' td:nth-child(1)')) {\n break;\n }\n }\n $update_button = self::$locator . ' td .update_button';\n\n $browser->visit('/')\n ->click($update_button)\n ->type('username', ' ')\n ->type('first_name', 'aaaa')\n ->type('last_name', 'aaaa')\n ->type('password', 'abcd1234')\n ->type('password_confirmation', 'abcd1234')\n ->click('button[type=\"submit\"]')\n\n ->waitForText('The username field is required.')\n ->assertSee('The username field is required.');\n });\n }", "public function testSaveSuccess()\n {\n $this->specify('Successfully create new user', function () {\n $model = new SuperUserForm(null, [\n 'email' => 'create_test@presentator.io',\n 'type' => User::TYPE_REGULAR,\n 'status' => User::STATUS_ACTIVE,\n 'password' => '1234',\n 'passwordConfirm' => '1234',\n 'notifications' => false,\n 'mentions' => true,\n ]);\n\n $result = $model->save();\n\n verify('Model should save', $result)->true();\n verify('Model should not have any errors', $model->errors)->isEmpty();\n\n $user = User::findOne(['email' => 'create_test@presentator.io']);\n verify('User email should match', $user->email)->equals('create_test@presentator.io');\n verify('User type should match', $user->type)->equals(User::TYPE_REGULAR);\n verify('User status should match', $user->status)->equals(User::STATUS_ACTIVE);\n verify('User password should match', $user->validatePassword('1234'))->true();\n verify('User notifications setting should match', $user->getSetting(User::NOTIFICATIONS_SETTING_KEY))->equals(false);\n verify('User mentions setting should match', $user->getSetting(User::MENTIONS_SETTING_KEY))->equals(true);\n });\n\n $this->specify('Successfully update an existing user (without password change)', function () {\n $user = User::findOne(1001);\n $model = new SuperUserForm($user, [\n 'email' => 'update_test@presentator.io',\n 'type' => User::TYPE_SUPER,\n 'status' => User::STATUS_ACTIVE,\n 'password' => '1234',\n 'passwordConfirm' => '1234',\n 'notifications' => true,\n 'mentions' => false,\n ]);\n\n $result = $model->save();\n\n $user->refresh();\n\n verify('Model should save', $result)->true();\n verify('Model should not have any errors', $model->errors)->isEmpty();\n verify('User email should match', $user->email)->equals('update_test@presentator.io');\n verify('User type should match', $user->type)->equals(User::TYPE_SUPER);\n verify('User status should match', $user->status)->equals(User::STATUS_ACTIVE);\n verify('User password should not be changed', $user->validatePassword('123456'))->true();\n verify('User notifications setting should match', $user->getSetting(User::NOTIFICATIONS_SETTING_KEY))->equals(true);\n verify('User mentions setting should match', $user->getSetting(User::MENTIONS_SETTING_KEY))->equals(false);\n });\n\n $this->specify('Successfully update an existing user (with password change)', function () {\n $user = User::findOne(1001);\n $model = new SuperUserForm($user, [\n 'email' => 'update_test@presentator.io',\n 'type' => User::TYPE_SUPER,\n 'status' => User::STATUS_ACTIVE,\n 'changePassword' => true,\n 'password' => '1234',\n 'passwordConfirm' => '1234',\n 'notifications' => true,\n 'mentions' => false,\n ]);\n\n $result = $model->save();\n\n $user->refresh();\n\n verify('Model should save', $result)->true();\n verify('Model should not have any errors', $model->errors)->isEmpty();\n verify('User password should be changed', $user->validatePassword('1234'))->true();\n });\n }", "public function testPostUpdateUserPage()\n\t{\n\t\t$this->be($this->user);\n\n\t\t$user = Orchestra\\Model\\User::create(array(\n\t\t\t'email' => 'crynobone@gmail.com',\n\t\t\t'fullname' => 'Mior Muhammad Zaki',\n\t\t\t'password' => '123456',\n\t\t));\n\t\t$user->roles()->sync(array(2));\n\n\t\t$response = $this->call('orchestra::users@view', array($user->id), 'POST', array(\n\t\t\t'id' => $user->id,\n\t\t\t'email' => 'crynobone@gmail.com',\n\t\t\t'fullname' => 'crynobone',\n\t\t\t'password' => '345678',\n\t\t\t'roles' => array(2),\n\t\t));\n\n\t\t$this->assertInstanceOf('Laravel\\Redirect', $response);\n\t\t$this->assertEquals(302, $response->foundation->getStatusCode());\n\t\t$this->assertEquals(handles('orchestra::users'), \n\t\t\t$response->foundation->headers->get('location'));\n\n\t\t$updated_user = Orchestra\\Model\\User::find($user->id);\n\n\t\t$this->assertEquals('crynobone@gmail.com', $updated_user->email);\n\t\t$this->assertEquals('crynobone', $updated_user->fullname);\n\t\t$this->assertTrue(Hash::check('345678', $updated_user->password));\n\n\t\t$updated_user->delete();\n\t}", "public function test_new_user_can_register()\n {\n $this->RegisterRolesAndPermissions();\n// $this->withExceptionHandling();\n $response = $this->postJson(route('auth.register'), [\n 'name' => \"ehsan dastras\",\n 'email' => \"test1@gmail.com\",\n 'password' => \"12345678\",\n ]);\n\n $response->assertStatus(Response::HTTP_CREATED);\n }", "public function testUserCreate() {\n $createUser = PromisePay::User()->create($this->userData);\n \n // Second, fetch its data\n $getUser = PromisePay::User()->get($createUser['id']);\n \n $this->assertNotNull($createUser['created_at']);\n $this->assertNotNull($createUser['updated_at']);\n $this->assertEquals($createUser['id'], $getUser['id']);\n $this->assertEquals($this->userData['first_name'] . ' ' . $this->userData['last_name'], $getUser['full_name']);\n }", "public function test_user_created()\n {\n $this->wrongCredentials = false;\n $credentials = self::DEFAULT_CREDENTIALS;\n $user = $this->registerService->registerUser($credentials);\n $this->assertInstanceOf(User::class, $user);\n $this->assertEquals($credentials['email'], $user->email);\n $this->assertEquals($credentials['name'], $user->name);\n\n }", "public function testUserCreation()\n {\n $testingMail = 'staticemail@test.com';\n $testingPass = '123123';\n\n $this->visit('/login')\n ->click('Sign Up')\n ->seePageIs('/signup');\n\n $this->type($testingMail, 'email');\n $this->type($testingPass, 'password');\n $this->type($testingPass, 'passwordConfirmation');\n\n $this->press('Sign up!');\n $this->see('Registration completed!');\n\n $user = User::where('email', $testingMail)->first();\n\n $this->assertNotNull($user, 'User not found');\n\n $user->delete();\n }", "public function testEditUser()\n {\n }", "public function testAddUser()\n {\n\n }", "public function testInfoUser()\n {\n }", "public function testInsertUser()\n {\n // Validate the request...\n\n $record = factory(\\App\\User::class)->make();\n\n\n $this->assertTrue($record->save());\n\n }", "private function addTestUser(): void\n {\n $this->terminus(sprintf('site:team:add %s %s', $this->getSiteName(), $this->getUserEmail()));\n }", "public function test_user_update_own_success()\n {\n //User login for test\n $new_user = factory(\\App\\User::class)->create();\n $new_user_id=$new_user->id;\n users_details::insert(['users_id'=>$new_user_id]);\n $user = new User();\n $user->id = $new_user_id;\n $this->be($user);\n if(User::where('email',$this->email_update)->exists()){\n User::where('email',$this->email_update)->delete();\n }\n Storage::fake('photos');\n $response =\n $this->json('POST', '/update_user', [\n 'id' => '553456382u6hsdgh',\n 'full_name' => $this->fullname,\n 'email' => $this->email_update,\n 'f_name' => $this->firstname,\n 'l_name' => $this->lastname,\n 'phone' => $this->phone,\n 'dob' => $this->dob,\n 'gender' => $this->gender,\n 'postal_code' => $this->postal,\n 'image' => UploadedFile::fake()->image('photo1.jpg')->size(100),\n ]);\n $response\n ->assertStatus(200)\n ->assertJson([\n $this->all_message => $this->user_update_success,\n ]);\n }", "public function testRegistrationDefaultValues() {\n // without administrator approval.\n $config_user_settings = $this->config('user.settings')\n ->set('verify_mail', FALSE)\n ->set('register', UserInterface::REGISTER_VISITORS)\n ->save();\n\n // Set the default timezone to Brussels.\n $config_system_date = $this->config('system.date')\n ->set('timezone.user.configurable', 1)\n ->set('timezone.default', 'Europe/Brussels')\n ->save();\n\n // Check the presence of expected cache tags.\n $this->drupalGet('user/register');\n $this->assertSession()->responseHeaderContains('X-Drupal-Cache-Tags', 'config:user.settings');\n\n $edit = [];\n $edit['name'] = $name = $this->randomMachineName();\n $edit['mail'] = $mail = $edit['name'] . '@example.com';\n $edit['pass[pass1]'] = $new_pass = $this->randomMachineName();\n $edit['pass[pass2]'] = $new_pass;\n $this->submitForm($edit, 'Create new account');\n\n // Check user fields.\n $accounts = $this->container->get('entity_type.manager')->getStorage('user')\n ->loadByProperties(['name' => $name, 'mail' => $mail]);\n $new_user = reset($accounts);\n $this->assertEquals($name, $new_user->getAccountName(), 'Username matches.');\n $this->assertEquals($mail, $new_user->getEmail(), 'Email address matches.');\n // Verify that the creation time is correct.\n $this->assertGreaterThan(REQUEST_TIME - 20, $new_user->getCreatedTime());\n $this->assertEquals($config_user_settings->get('register') == UserInterface::REGISTER_VISITORS ? 1 : 0, $new_user->isActive(), 'Correct status field.');\n $this->assertEquals($config_system_date->get('timezone.default'), $new_user->getTimezone(), 'Correct time zone field.');\n $this->assertEquals(\\Drupal::languageManager()->getDefaultLanguage()->getId(), $new_user->langcode->value, 'Correct language field.');\n $this->assertEquals(\\Drupal::languageManager()->getDefaultLanguage()->getId(), $new_user->preferred_langcode->value, 'Correct preferred language field.');\n $this->assertEquals($mail, $new_user->init->value, 'Correct init field.');\n }", "public function testCreateUser()\n {\n $this->visit('/Users/create')\n\t ->type('1', 'role_id')\n\t ->type('Daniel', 'firstname')\n\t ->type('Becerra', 'lastname')\n\t ->type('daniel@hotmail.com', 'email')\n\t ->type('danielbecerrao', 'user')\n\t ->type('12345678', 'password')\n\t ->type('12345678', 'register')\n\t ->press('Crear')\n\t ->seePageIs('/Users');\n\n }", "public function successfullyRecordedNewEmployee()\n {\n $payload = [];\n\n $this->post('/', $payload);\n\n $this->assertDatabaseHas('users', $payload);\n }", "public function testClientsPageAsLoggedInUser() {\n\n // Generate user\n $user = factory(App\\User::class)->create();\n\n $this->actingAs($user)\n ->visit('/clients')\n ->see($user->email);\n\n }", "public function testRegister()\n {\n $this->visit('/register')\n ->type('Test User', 'name')\n ->type('081233548738', 'phone')\n ->type('Tester', 'occupation')\n ->type('test@test.com', 'email')\n ->type(bcrypt('testing123'), 'password')\n ->press('Register')\n ->seeInDatabase('users', ['email' => 'bps.phi@gmail.com']);\n }", "public function testIntegrationCreate()\n {\n $this->visit('user/create')\n ->see('Create New Account');\n $this->assertResponseOk();\n $this->assertViewHas('model');\n }", "public function testCreateUser()\n {\n $num = rand(10, 1000);\n $userData = [\n \"name\" => \"John Doe $num\",\n \"email\" => \"doe$num@example.com\",\n \"password\" => \"demo12345\",\n \"org_id\" => 1\n ];\n $this->json('POST', 'api/user/create', $userData, ['Accept' => 'application/json'])\n ->assertStatus(200)\n ->assertJsonStructure([\n \"action\",\n \"data\" => [],\n \"status\"\n ]);\n }", "public function testCreatingFirstUser()\n {\n $response = $this->postJson('users', [\n 'name' => 'John Doe',\n 'email' => 'john@example.com',\n 'password' => 'password'\n ]);\n\n $response->assertStatus(201);\n }", "public function testUsersAreUsers() {\n $users = $this->users->users();\n $this->assertInstanceOf('NYPL\\Bibliophpile\\User', $users[0]);\n }", "public function testGetUsers()\n {\n }", "public function test_that_a_new_user_cannot_register_with_invalid_information()\n {\n $this->browse(function ($browser) {\n $browser->visit('/register')\n ->type('name', 'Ben Gates')\n ->type('email', 'ben@')\n ->type('password', 'password')\n ->type('password_confirmation', 'password')\n ->type('description', 'This is just a short description about Ben Gates')\n ->press('Register')\n ->screenshot('register')\n ->assertPathIs('/register');\n });\n }", "public function testLogin(){\n Session::flush();\n $user = $this->postuser();\n\n $this->assertTrue(Auth::user()->username == $user['username']);\n }", "public function simulateUser() {}", "public function testDuplicateEmail()\n\t{\n\t\t$testUser = $this->user('user1');\n\n\t\t$newUser = new User;\n\t\t$newUser->setAttributes(\n\t\t\tarray(\n\t\t\t\t'email' => $testUser->email,\n\t\t\t\t'username' => $testUser->username,\n\t\t\t)\n\t\t);\n\n\t\t// save the record and assert that it is false\n\t\t$this->assertFalse($newUser->save());\n\t}", "public function testUserApiReturnsUsers()\n {\n // @TODO - test the updated /users endpoint properly.\n return true;\n // $users = factory(User::class, 2)->create();\n\n // $this->json('GET', 'api/v1/users')\n // ->seeJsonStructure([\n // '*' => [\n // 'northstar_id', 'created_at', 'updated_at', 'role',\n // ]\n // ]);\n }", "public function test_update_user_as_user()\n {\n $user = User::factory()->create();\n\n $response = $this->actingAs($user)\n ->put(route('api.users.update', [$user->id]), [\n 'name' => 'My brand new user'\n ]);\n\n $response->assertStatus(200)\n ->assertJsonFragment(['name' => 'My brand new user'])\n ->assertJsonStructure([\n 'data' => [\n 'id',\n 'name',\n 'email',\n 'created_at',\n 'updated_at'\n ]\n ]);\n }", "public function test_a_user_cannot_modify_another_users_account_information()\n {\n $userA = factory(User::class)->create();\n $userB = factory(User::class)->create();\n\n // When user A tries to view user B data\n Passport::actingAs($userA);\n $response = $this->json('GET', 'api/v1/users/' . $userB->id);\n\n // Then it is not successful\n $response->assertStatus(ResponseCode::HTTP_UNAUTHORIZED);\n $response->assertSee('Unauthorized Access');\n }" ]
[ "0.71568656", "0.7014393", "0.69727385", "0.69478154", "0.6941491", "0.68952656", "0.6859409", "0.67692983", "0.6752151", "0.6749507", "0.67335725", "0.6722624", "0.6709918", "0.67024904", "0.66970277", "0.667951", "0.6675716", "0.6636606", "0.66056913", "0.66053206", "0.6563228", "0.6527207", "0.6516256", "0.65101045", "0.6491805", "0.6486559", "0.6468932", "0.64556265", "0.64535", "0.64488775", "0.6444526", "0.64440656", "0.64344984", "0.64143056", "0.6404306", "0.64031166", "0.63940334", "0.6378567", "0.6372571", "0.6371171", "0.63685364", "0.6361674", "0.63609314", "0.6350968", "0.63499427", "0.6345705", "0.6344734", "0.6336948", "0.6334519", "0.63323504", "0.6331145", "0.6320665", "0.6320217", "0.63171655", "0.63154304", "0.63132024", "0.6312271", "0.63087255", "0.63071257", "0.6302655", "0.6297581", "0.628582", "0.62829256", "0.6274082", "0.6267557", "0.6263927", "0.6258826", "0.62571204", "0.6252815", "0.6250237", "0.6247473", "0.6242798", "0.62397635", "0.623074", "0.622297", "0.62178403", "0.6210862", "0.6208765", "0.62063223", "0.6196667", "0.6193837", "0.61909914", "0.6177588", "0.617705", "0.6174978", "0.6169477", "0.6162858", "0.6159723", "0.6155165", "0.61537725", "0.61508155", "0.61501724", "0.6145871", "0.61433136", "0.6141335", "0.61383194", "0.6122445", "0.6121522", "0.61192185", "0.61145276" ]
0.6825954
7
tests entry is newer than last refresh
public function testIsNewerThanTrue() { $time = time(); $lastRefresh = date('Y-m-d H:i:s', $time + 10); $userData = ['id' => 1, 'last_refresh' => $lastRefresh]; $this->CurrentUser->setSettings($userData); $this->assertTrue($this->LastRefresh->isNewerThan($time)); $this->assertTrue($this->LastRefresh->isNewerThan(date('Y-m-d H:i:s', $time))); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testIsNewerThanFalse() {\n\t\t\t$time = time();\n\t\t\t$lastRefresh = date('Y-m-d H:i:s', $time - 10);\n\t\t\t$userData = ['id' => 1, 'last_refresh' => $lastRefresh];\n\t\t\t$this->CurrentUser->setSettings($userData);\n\n\t\t\t$this->assertFalse($this->LastRefresh->isNewerThan($time));\n\t\t\t$this->assertFalse($this->LastRefresh->isNewerThan(date('Y-m-d H:i:s', $time)));\n\t\t}", "public function testIsNewerThanForNewUsers() {\n\t\t\t$userData = ['id' => 1, 'last_refresh' => null];\n\t\t\t$this->CurrentUser->setSettings($userData);\n\n\t\t\t$this->assertNull($this->LastRefresh->isNewerThan(time()));\n\t\t\t$this->assertNull($this->LastRefresh->isNewerThan(date('Y-m-d h:i:s', time())));\n\t\t}", "public function hasLastUpdate() {\n return $this->_has(2);\n }", "public function testUpdated()\n {\n $feed = $this->eventFeed;\n\n // Assert that the feed's updated date is correct\n $this->assertTrue($feed->getUpdated() instanceof Zend_Gdata_App_Extension_Updated);\n $this->verifyProperty2(\n $feed,\n \"updated\",\n \"text\",\n \"2007-05-31T01:15:00.000Z\"\n );\n\n // Assert that all entry's have an Atom Published object\n foreach ($feed as $entry) {\n $this->assertTrue($entry->getUpdated() instanceof Zend_Gdata_App_Extension_Updated);\n }\n\n // Assert one of the entry's Published dates\n $entry = $feed[2];\n $this->verifyProperty2($entry, \"updated\", \"text\", \"2007-05-17T10:33:49.000Z\");\n }", "public function is_new_data() {\n $rv = FALSE;\n if ($this->is_remote($this->url)) {\n $ts_standard = $this->GetRemoteLastModified($this->url . FileFetcher::FILE_STANDARDS);\n $ts_counties = $this->GetRemoteLastModified($this->url . FileFetcher::FILE_COUNTIES);\n }\n else {\n $ts_standard = filemtime($this->url . FileFetcher::FILE_STANDARDS);\n $ts_counties = filemtime($this->url . FileFetcher::FILE_COUNTIES);\n }\n $ts = 0;\n if ($this->last_fetch == '' || $ts_standard > $this->last_fetch) {\n $rv = TRUE;\n $ts = $ts_standard;\n }\n if ($this->last_fetch == '' || $ts_counties > $this->last_fetch) {\n $rv = TRUE;\n $ts = $ts_counties;\n }\n if ($rv) {\n update_option(\"hecc_standard_last_update_datetime\", $ts);\n }\n return $rv;\n }", "public function upToDate() {\n\t\tif($this->hasDetails()) {\n\t\t\t$last_score_date = $this->getScores()->max('updated_at');\n\t\t\tYii::trace($last_score_date.' <= '.$this->updated_at, 'Scorecard::upToDate');\n\t\t\treturn $last_score_date <= $this->updated_at;\n\t\t}\n\t\treturn true;\n\t}", "public function uptodate()\n\t{\n\t\t$interval = new DateInterval('P1W'); // 1 Week\n\t\t$now = new DateTime();\n\n\t\treturn (new DateTime($this->updated_at))->add($interval) > $now && ( ! $this->recent());\n\t}", "protected function recentTestInstanceExists() {}", "public function hasLastTime(){\n return $this->_has(18);\n }", "public function needUpdate()\n\t{\n\t\treturn ($this->getLastUpdate() == null || time() - $this->getLastUpdate()->format('U') > 1 * 60);\n\t}", "function checkLastUpdated() {\r\n $conn = mysql_connect($this->mysql_host,$this->mysql_user,$this->mysql_pass);\r\n \r\n $rs = mysql_select_db($this->mysql_db,$conn);\r\n \r\n $sql = \"SHOW TABLE STATUS FROM \".$this->mysql_db.\" LIKE '\".$this->mysql_table.\"'\";\r\n \r\n $rs = mysql_query($sql,$conn);\r\n \r\n if(mysql_num_rows($rs) == 0 ) {\r\n \r\n $this->createTable();\r\n } else {\r\n $row = mysql_fetch_array($rs);\r\n if(time() > (strtotime($row[\"Update_time\"])+(12*60*60)) ) {\r\n \r\n $this->downloadExchangeRates();\r\n }\r\n }\r\n }", "function checkRefreshDate($refreshdate)\n{\n \n if($refreshdate < (time()-(60*60*24*21)))\n {\n return true;\n }\n else\n {\n return false;\n }\n}", "function is_updated($updated_at)\n{\n $now = time() - 60;\n $updated_at = strtotime($updated_at);\n if ($updated_at > $now) {\n return true;\n }\n\n return false;\n}", "public function isUpdated() {}", "public function testUpdateTimesheet()\n {\n }", "public function testUpdateLastClick() {\n\t\t$result = $this->Model->updateLastClick();\n\t\t$this->assertFalse((bool)$result);\n\n\t\t$expected = '0000-00-00 00:00:00';\n\t\t$result = $this->Model->field('last_click', array(\n\t\t\t'User.id' => 1\n\t\t));\n\t\t$this->assertEquals($expected, $result);\n\n\t\tCakeSession::write('Auth.User.id', 1);\n\t\t$result = $this->Model->updateLastClick();\n\t\t$this->assertTrue($result);\n\n\t\t$expected = date('Y-m-d H:i:s');\n\t\t$result = $this->Model->field('last_click', array(\n\t\t\t'User.id' => 1\n\t\t));\n\t\t$this->assertEquals(strtotime($expected), strtotime($result), null, 2);\n\n\t\t$expected = '2010-02-04 16:54:48';\n\t\t$result = $this->Model->field('modified', array(\n\t\t\t'User.id' => 1\n\t\t));\n\t\t$this->assertEquals($expected, $result);\n\t}", "public function isOutdated() {}", "public function testFeedUpdateFields() {\n // Create scheduled feed.\n $scheduled_feed = $this->createFeed(NULL, ['refresh' => '900']);\n\n $this->drupalGet('admin/config/services/aggregator');\n $this->assertSession()->statusCodeEquals(200);\n\n // The scheduled feed shows that it has not been updated yet and is\n // scheduled.\n $this->assertSession()->pageTextContains('never');\n $this->assertSession()->pageTextContains('imminently');\n $this->assertSession()->pageTextNotContains('ago');\n $this->assertSession()->pageTextNotContains('left');\n\n $this->updateFeedItems($scheduled_feed);\n $this->drupalGet('admin/config/services/aggregator');\n\n // After the update, an interval should be displayed on both last updated\n // and next update.\n $this->assertSession()->pageTextNotContains('never');\n $this->assertSession()->pageTextNotContains('imminently');\n $this->assertSession()->pageTextContains('ago');\n $this->assertSession()->pageTextContains('left');\n\n // Delete scheduled feed.\n $this->deleteFeed($scheduled_feed);\n\n // Create non-scheduled feed.\n $non_scheduled_feed = $this->createFeed(NULL, ['refresh' => '0']);\n\n $this->drupalGet('admin/config/services/aggregator');\n // The non scheduled feed shows that it has not been updated yet.\n $this->assertSession()->pageTextContains('never');\n $this->assertSession()->pageTextNotContains('imminently');\n $this->assertSession()->pageTextNotContains('ago');\n $this->assertSession()->pageTextNotContains('left');\n\n $this->updateFeedItems($non_scheduled_feed);\n $this->drupalGet('admin/config/services/aggregator');\n\n // After the feed update, we still need to see \"never\" as next update label.\n // Last update will show an interval.\n $this->assertSession()->pageTextContains('never');\n $this->assertSession()->pageTextNotContains('imminently');\n $this->assertSession()->pageTextContains('ago');\n $this->assertSession()->pageTextNotContains('left');\n }", "public function recent()\n\t{\n\t\t$interval = new DateInterval('P1W'); // 1 Week\n\t\t$now = new DateTime();\n\n\t\treturn (new DateTime($this->created_at))->add($interval) > $now;\n\t}", "public function getLastUpdated();", "public function recentlySeen()\n {\n return $this->checked_in_at->diffInDays(now()) < 1;\n }", "function expired() {\r\n if(!file_exists($this->cachefile)) return true;\r\n # compare new m5d to existing cached md5\r\n elseif($this->hash !== $this->get_current_hash()) return true;\r\n else return false;\r\n }", "public function testNothingModifiedLastRunSet()\n {\n $this->_cs->updateLastRun($this->_name);\n sleep(2);\n\n $check = $this->_cs->checkEntitiesChanged($this->_name, array(self::ENTITY_NAME));\n $this->assertFalse($check);\n }", "protected function isOutdated(): bool {\n $outdated = true;\n if(!$this->dry()){\n $timezone = $this->getF3()->get('getTimeZone')();\n $currentTime = new \\DateTime('now', $timezone);\n $updateTime = \\DateTime::createFromFormat(\n 'Y-m-d H:i:s',\n $this->updated,\n $timezone\n );\n $interval = $updateTime->diff($currentTime);\n if($interval->days < Universe\\BasicUniverseModel::CACHE_MAX_DAYS){\n $outdated = false;\n }\n }\n return $outdated;\n }", "public function testGetLastUseDate()\n {\n $this->assertEquals($this->attributes->{'last use date'}, \n $this->user->getLastUseDate());\n }", "public function getUpdated();", "public function getUpdated();", "public function test_if_failed_update()\n {\n }", "public function getLastUpdate()\n {\n return Mage::app()->loadCache('admin_notifications_lastcheck');\n// return Mage::getStoreConfig(self::XML_LAST_UPDATE_PATH);\n }", "public function isFresh($timestamp = null);", "public function needsRefreshing()\n {\n return $this->isExpired() || ! $this->isLoaded();\n }", "public function hasChangedEntries();", "public function test_get_rows_since(){\n\t\t$listotron = new Listotron();\n\n\t\t$user1 = md5(rand() . md5(rand()));\n\t\t$user2 = md5(rand() . md5(rand()));\n\t\t$then = $listotron->getNOW();\n\t\tusleep(500);\n\t\t$listotron->updateNOW();\n\t\t$lmb = json_decode(\"{ \\\"$user1\\\" : \\\"$then\\\" }\");\n\t\t$now = $listotron->getNOW();\n\t\t\n\t\t// modify the List\n\t\t$rows = $listotron->outdent(4, $user1);\n\n\t\t// now get the rows changed by not me\n\t\t// since before NOW()\n\t\t$rows = $listotron->getAllRowsSince($lmb, $user2);\n\t\t$this->assertEqual(count($rows), 3);\n\t\t\n\t\t$this->assertEqual($rows[0][\"row_id\"], 4);\n\t\t$this->assertEqual($rows[0][\"par\"], null);\n\t\t$this->assertEqual($rows[0][\"prev\"], 1);\n\t\t$this->assertEqual($rows[0][\"lm\"], $now);\n\t\t$this->assertEqual($rows[0][\"lmb\"], $user1);\n\t\t\n\t\t$this->assertEqual($rows[1][\"row_id\"], 5);\n\t\t$this->assertEqual($rows[1][\"par\"], 4);\n\t\t$this->assertEqual($rows[1][\"prev\"], null);\n\t\t$this->assertEqual($rows[1][\"lm\"], $now);\n\t\t$this->assertEqual($rows[1][\"lmb\"], $user1);\n\n\t\t$this->assertEqual($rows[2][\"row_id\"], 6);\n\t\t$this->assertEqual($rows[2][\"par\"], 4);\n\t\t$this->assertEqual($rows[2][\"prev\"], 5);\n\t\t$this->assertEqual($rows[2][\"lm\"], $now);\n\t\t$this->assertEqual($rows[2][\"lmb\"], $user1);\n\t}", "public function updateTestResult($force_update = false){\n\t\t\n\t\t\t// is node hidden\n\t\tif ( $this->getHidden() == true ){\n\t\t\t$result = tx_caretaker_TestResult::undefined('Node is disabled');\n\t\t\t$this->notify( 'disabledTestResult' , $result );\n\t\t\treturn $result;\n\t\t}\n\n\t\t$test_result_repository = tx_caretaker_TestResultRepository::getInstance();\n\t\t$latestTestResult = $test_result_repository->getLatestByNode( $this );\n\t\t$returnLatestResult = false;\n\t\t \t\n\t\t\t// check cache and return\n\t\tif ( !$force_update ){\n\t\t\t\n\t\t\tif ( $latestTestResult ) {\n\t\t\t\t\t// test is not in due state so retry\n\t\t\t\tswitch ( $latestTestResult->getState() ){\n\t\t\t\t\tcase tx_caretaker_Constants::state_due : \n\t\t\t\t\t\t$returnLatestResult = false;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase tx_caretaker_Constants::state_ack : \n\t\t\t\t\t\t$returnLatestResult = true;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase tx_caretaker_Constants::state_ok :\n\t\t\t\t\t\tif ( $latestTestResult->getTstamp() > time()-$this->test_interval ){\n\t\t\t\t\t\t\t$returnLatestResult = true;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase tx_caretaker_Constants::state_undefined :\n\t\t\t\t\tcase tx_caretaker_Constants::state_warning :\n\t\t\t\t\tcase tx_caretaker_Constants::state_error :\n\t\t\t\t\t\t\t// if due mode is 1 retry\n\t\t\t\t\t\tif ( $this->test_due == 1 ){\n\t\t\t\t\t\t\t$returnLatestResult = false;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\t// handle interval \n\t\t\t\t\t\telse if ( $latestTestResult->getTstamp() > time()-$this->test_interval ){\n\t\t\t\t\t\t\t$returnLatestResult = true;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\n\t\t\t\t// test should not run this hour \n\t\t\tif ( $returnLatestResult == false && ( $this->start_hour > 0 || $this->stop_hour > 0 ) ) {\n\t\t\t\t$local_time = localtime(time(), true);\n\t\t\t\t$local_hour = $local_time['tm_hour'];\n\t\t\t\tif ($local_hour < $this->start_hour || $local_hour >= $this->stop_hour ){\n\t\t\t\t\t$returnLatestResult = true;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t\t// return the cached result\n\t\tif ($returnLatestResult){ \n\t\t\t$this->notify( 'cachedTestResult', $latestTestResult );\n\t\t\treturn $latestTestResult;\n\t\t}\t\t\n\t\t\n\t\t\t// else check wether the test can be executed\n\t\tif($this->test_service && $this->test_service->isExecutable()) {\n\t\t\t\n\t\t\t\t// try to execute test\n\t\t\ttry {\n\t\t\t\t$result = $this->test_service->runTest();\n\t\t\t} catch ( Exception $e ) {\n\t\t\t\t$result = tx_caretaker_TestResult::create( tx_caretaker_Constants::state_error , 0, '{LLL:EXT:caretaker/locallang_fe.xml:service_exception}'.$e->getMessage );\n\t\t\t}\n\t\t\t\n\t\t\t\t// retry if not ok and retrying is enabled\n\t\t\tif ($result->getState() != 0 && $this->test_retry > 0){\n\t\t\t\t$round = 0;\n\t\t\t\tsleep(1);\n\t\t\t\twhile ( $round < $this->test_retry && $result->getState() != 0 ){\n\t\t\t\t\ttry {\n\t\t\t\t\t\t$result = $this->test_service->runTest();\n\t\t\t\t\t} catch ( Exception $e ) {\n\t\t\t\t\t\t$result = tx_caretaker_TestResult::create( tx_caretaker_Constants::state_error , 0, '{LLL:EXT:caretaker/locallang_fe.xml:service_exception}'.$e->getMessage );\n\t\t\t\t\t}\n\t\t\t\t\t$round ++;\n\t\t\t\t}\n\t\t\t\t$result->addSubMessage( new tx_caretaker_ResultMessage( 'LLL:EXT:caretaker/locallang_fe.xml:retry_info' , array( 'number'=>$round ) ) );\n\t\t\t}\n\n\t\t\t\t// save to repository after reading the previous result\n\t\t\t$resultRepository = tx_caretaker_TestResultRepository::getInstance();\n\t\t\t$resultRepository->saveTestResultForNode( $this, $result );\n\t\t\t\n\t\t\t\t// trigger notification\n\t\t\t$this->notify( 'updatedTestResult', $result, $latestTestResult );\n\t\t\t\n\t\t\treturn $result;\n\t\t\t\n\t\t} else {\n\t\t\t$result->addSubMessage( new tx_caretaker_ResultMessage( 'test service was not excutable this time so the cached result is used' ) );\n\t\t\t$this->notify( 'cachedTestResult', $result, $lastTestResult );\n\t\t\treturn $latestTestResult;\n\t\t}\n\t\t\n\t\t\n\t\t\n\t}", "public function hasLastPatchTimestampTicks()\n {\n return $this->LastPatchTimestampTicks !== null;\n }", "public function needs_run() {\n $today = time();\n $lastrun = $this->info[\"last_run\"];\n $interval = (int)$this->freq * 86400;\n\n return($today > ($lastrun + $interval));\n }", "function testRevisionHistory() \r\n\t{\r\n\t\t$dbh = $this->dbh;\r\n\t\t\r\n\t\t$obj = new CAntObject($dbh, \"customer\", null, $this->user);\r\n\t\t$obj->setValue(\"name\", \"My First Revision\");\r\n\t\t$oid = $obj->save();\r\n\r\n\t\t$revid = $dbh->GetValue($dbh->Query(\"select id from object_revisions where object_id='$oid' and object_type_id='\".$obj->object_type_id.\"'\"));\r\n\t\t$this->assertTrue($revid > 0 && $revid !=null);\r\n\t\t//$this->assertEquals($dbh->GetValue($dbh->Query(\"select field_value from object_recurrence where id='\".$rp->id.\"'\")), 0);\r\n\t}", "private function compare_with_date()\n {\n }", "public function hasUpdateFor($user) \n {\n return $this->updated_at > cache()->store('redis')->get($user->getCacheKeyName($this));\n }", "public function testDeleteSessionsOlderThen()\n {\n $session = $this->objectManager->create(\\Magento\\Security\\Model\\AdminSessionInfo::class);\n /** @var $session \\Magento\\Security\\Model\\AdminSessionInfo */\n $session->getResource()->deleteSessionsOlderThen(strtotime('2016-01-20 12:00:00'));\n $collection = $session->getResourceCollection()\n ->addFieldToFilter('main_table.updated_at', ['lt' => '2016-01-20 12:00:00'])\n ->load();\n $count = $collection->count();\n $this->assertEquals(0, $count);\n }", "function isNewestItem($date)\n\t{\n\t\t$newestDate = date(\"Y-m-d\", strtotime(\"-7 day\"));\n\n\t\tif($date>$newestDate) // the parameter named date are newer than newestData,\n\t\t\treturn true;\n\t\telse false;\n\t}", "public function hasLastUpdated() {\n\t\treturn $this->lastUpdated !== null;\n\t}", "public function checkSyncDate(): bool\n {\n /** @var FileInfoImage $item */\n $item = $this->current();\n $date2 = $item->getSyncDateXmp();\n if ($date2 === null) {\n\n return true;\n } else {\n $date1 = DateTime::createFromFormat('U', $this->getMTime());\n\n return $date1 > $date2;\n }\n }", "function isUpdatedWithin($seconds) {\n $timestamp = date(\"Y-m-d H:i:s\", time() - $seconds);\n\n $query = \"SELECT data_updated FROM np_updated WHERE (data_updated = $timestamp)\";\n if ($result = $this->link->query($query))\n return true;\n return false;\n }", "public function lastChange()\n {\n if ($this->exists()) {\n return filemtime($this->path);\n }\n\n return false;\n }", "public function test_accepts_minor_updates()\n {\n }", "function wp_cache_set_users_last_changed()\n {\n }", "function getLastViewed();", "public function testLastRuns()\n {\n LastRun::truncate();\n LastRun::factory()->count(30)->create();\n\n $headers['Accept'] = 'application/json';\n\n $response = $this->get('/api/v1/runner/1/form-data', $headers);\n\n $response->assertStatus(200)->assertJsonStructure(['success', 'data' => ['last_runs'], 'status']);\n }", "function wp_cache_set_posts_last_changed()\n {\n }", "function testResetDateGreaterThanToday() {\n Counter::findOne(1)->reset(Carbon::now()->addDays(1)->toDateString());\n }", "public function needs_Update_timestamp($Path_To_Cache,$Path_To_File)\r\n\t\t\t{\r\n\t\t\t\t$Display = new sql();\r\n\t\t\t\t$sql = 'SELECT * FROM updates';\r\n\t\t\t\t$result = $Display->Display_Info($sql);\r\n\t\t\t\tforeach($result as $rows)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t$TimeStamp = strtotime($rows->TimeStamp);\r\n\t\t\t\t\t}\r\n\t\t\t\tif(file_exists($Path_To_Cache) && ($TimeStamp < filemtime($Path_To_Cache)))\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\treturn false;\r\n\t\t\t\t\t}\r\n\t\t\t\telse\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\treturn true;\r\n\t\t\t\t\t}\r\n\t\t\t}", "public function getProvioulsyUpdatedTimestamp()\n {\n $currentTimestamp = time();\n $this->sessionEntity->updateTimestamp();\n $this->assertTrue(is_int($this->sessionEntity->getTimestamp()));\n $this->assertTrue($currentTimestamp <= $this->sessionEntity->getTimestamp());\n }", "public function hasRelivetime(){\n return $this->_has(3);\n }", "function test()\n {\n $this->updated = '2010-01-18 11:39';\n $this->created = '2010-01-18 08:48';\n }", "private function checkNewCommondaty()\n {\n $date = new DateTime($this->addDate);\n $date->modify(self::TIME_INTERVAL);\n $date->format('Y-m-d H:i:s');\n $dateNow = new DateTime();\n $dateNow->format('Y-m-d H:i:s');\n\n if ($dateNow < $date) {\n return 1;\n }\n return 0;\n }", "public function getLastUpdated(): int;", "public function testExecDailyStatsCron1NewAttach1UnpubAttach() {\n\t\t$this->updateDailyStatRec(1,date(\"Y-m-d\",strtotime(\"-2 day\")));\n \t\t\n \t\t// update new invalid DS rec date\n \t\t$this->updateDailyStatRec(2,date(\"Y-m-d\",strtotime(\"-1 day\")));\n \t\t\n \t\t// execute cron\n \t\t\n\t\tDailyStatsDao::execDailyStatsCron(\"#__\" . $this->getDailyStatsTableName(),\"#__attachments_cron_test\",\"#__content_cron_test\");\n\t\t\n \t\t// verify results\n \t\t\n\t\t/* @var $db JDatabase */\n \t$db = JFactory::getDBO();\n\t\t$query = \"SELECT COUNT(id) FROM #__\" . $this->getDailyStatsTableName(); \n \t$db->setQuery($query);\n \t$count = $db->loadResult();\n\n\t\t$this->assertEquals(3,$count,'3 daily_stats records expected, 2 for the past and only 1 for today for article 1 which has now 2 attachments, one of which is unpublished');\n\n\t\t$today = date(\"Y-m-d\",strtotime(\"now\"));\n\n\t\t// check daily stats for article 1\n\t\t\n\t\t$query = \"SELECT * FROM #__\" . $this->getDailyStatsTableName() . \" WHERE article_id = 1 AND date = '$today'\"; \n \t$db->setQuery($query);\n \t$res = $db->loadAssoc();\n\t\t\n\t\t$this->assertEquals(11,$res['date_hits'],'date hits');\n\t\t$this->assertEquals(111,$res['total_hits_to_date'],'total hits');\n\t\t$this->assertEquals(1,$res['date_downloads'],'date downloads');\n\t\t$this->assertEquals(11,$res['total_downloads_to_date'],'total downloads');\n\n\t\t$this->checkEntryExistInLog(\"Daily stats for $today added in DB. 0 rows inserted for new attachment\\(s\\). 1 rows inserted for existing attachments \\(gap filled: 1 day\\(s\\)\\).\");\n\t}", "public function getEarliestHistoryAttribute() {\n if ( App::runningUnitTests() ) {\n return true;\n }\n\n //in testing units, factory run first so no user logins\n if(!auth()->user()){\n return true;\n }\n\n $data = $this->where('lead_id', $this->lead_id)->orderBy('created_at', 'ASC')->first();\n\n if ($data) return $data->created_at;\n\n return true;\n }", "function updateLastModifiedDate() {\n\t\t$res = db_query_params ('UPDATE artifact SET last_modified_date=EXTRACT(EPOCH FROM now())::integer WHERE artifact_id=$1',\n\t\t\tarray ($this->getID()));\n\t\treturn (!$res);\n\t}", "public function isRefreshExpired()\n {\n return $this->refresh_token->isExpired();\n }", "private function isRefresh($lastUrl): bool\n\t{\n\t\treturn $lastUrl == $_SERVER['HTTP_REFERER'];\n\t}", "public function refreshUpdated() {\n $this->setUpdated(new \\DateTime(\"now\"));\n}", "public function test_ouwiki_get_last_modified() {\n global $DB;\n $this->resetAfterTest(true);\n $this->setAdminUser();\n $user = $this->get_new_user();\n $user2 = $this->get_new_user('testouwikiuser2');\n $course = $this->get_new_course();\n $ouwiki = $this->get_new_ouwiki($course->id, OUWIKI_SUBWIKIS_SINGLE);\n $cm = get_coursemodule_from_instance('ouwiki', $ouwiki->id);\n $context = context_module::instance($cm->id);\n\n $result = ouwiki_get_last_modified($cm, $course);\n $this->assertEmpty($result);\n\n // Create page + test last modified returns something.\n $subwiki = ouwiki_get_subwiki($course, $ouwiki, $cm, $context, 0, $user2->id, true);\n $page = ouwiki_get_current_page($subwiki, 'startpage', OUWIKI_GETPAGE_CREATE);\n ouwiki_save_new_version($course, $cm, $ouwiki, $subwiki, 'startpage', 'content', -1, -1, -1);\n\n $result = ouwiki_get_last_modified($cm, $course, $user2->id);\n $this->assertNotEmpty($result);\n // Check other user gets a time.\n $result2 = ouwiki_get_last_modified($cm, $course, $user->id);\n $this->assertNotEmpty($result2);\n $this->assertEquals($result, $result2);\n // Check admin gets cached.\n $result = ouwiki_get_last_modified($cm, $course);\n $this->assertEmpty($result);\n }", "public function isRefreshable();", "function hasRecentlyAction() {\n\n\t\t$limit = date('U') + (60 * 60 * $system[\"config\"][\"system\"][\"parameters\"][\"applicationTimeZoneGMT\"][\"value\"]) - (2 * 60 * 60);\n\n\t\tif ($this->isLoged() && $this->getLastAction('U') < $limit)\n\t\t\treturn false;\n\t\telse\n\t\t\treturn true;\n\t}", "public function isNeedUpdate()\n {\n if (is_null($this['episode_update_date'])){\n return true;\n }\n if (Carbon::now()->diffInDays(new Carbon($this['episode_update_date'])) > 3){\n return true;\n }\n return false;\n }", "public function checkMarkFile( ){\n if( isset( $GLOBALS['config']['dir_database'] ) && is_file( $GLOBALS['config']['dir_database'].'database-last-modification' ) && ( time( ) - file_get_contents( $GLOBALS['config']['dir_database'].'database-last-modification' ) ) <= 1 ){\n return false;\n }\n else\n return true;\n }", "public function PullTesst()\n {\n $this->assertTrue(true);\n }", "public function hasLastrewardtime(){\n return $this->_has(7);\n }", "public function is_expired() {\n\t\treturn $this->data['created_at'] + HOUR_IN_SECONDS < ITSEC_Core::get_current_time_gmt();\n\t}", "private function get_updated() {\n\t\t$translation = $this->get_item_from_api();\n\t\treturn ( $translation && isset( $translation['updated'] ) ) ? $translation['updated'] : false;\n\t}", "protected abstract function shouldBeTimestamped(): bool;", "public function isValidCheckin(){\n\t\t$users_connection = $this->dbHandle->users;\n\t\t$data = $users_connection->findOne(array('uid' => intval($this->uid)));\n\t\tif (!isset ($data['last_update']) || $data['last_update'] == null){\n\t\t\t//first update so is valid.\n\t\t\treturn true;\n\t\t}\n\t\t//$last_update_time = $data['last_update']['created_on']->sec;\n\t\tif (isset ($data['last_update']['listing'])){\n\t\t\t$last_checkedin_show = $data['last_update']['listing']['listing_id'];\n\t\t\t$last_checkedin_show_start = $data['last_update']['listing']['start']->sec;\n\t\t}\n\t\telse{\n\t\t\treturn true;\n\t\t}\n\t\tif (($this->listing_id == $last_checkedin_show) && ($this->time == $last_checkedin_show_start)){\n\t\t\t$this->logger->log(\"Checked into the same show again. Return false\",Zend_Log::INFO);\n\t\t\treturn false;\n\t\t}\n\t\t/*\n\t\t$current_update_time = $this->timestamp;\n\t\t$diff_secs = $current_update_time - $last_update_time;\n\t\t$this->logger->log(\"The diff secs = $diff_secs\",Zend_Log::INFO);\n\t\t$threshold = 30*60; //30 mins \n\t\tif ($diff_secs > $threshold){\n\t\t\treturn true;\n\t\t}\n\t\t//within 30 mins not valid for points.\n\t\treturn false;\n\t\t*/\n\t\treturn true;\n\t}", "public function hasCTime(){\n return $this->_has(6);\n }", "public function latest();", "public function getIsUpdatedAttribute (): bool\n {\n return $this->created_at < $this->updated_at;\n }", "function wp_cache_get_last_changed($group)\n {\n }", "private function isCacheOld($cacheFile) {\n\t\t// time now - cache lifetime\n\t\t$goodTime = time() - ($this->expiry * 60);\n\t\t$cacheAge = filemtime($cacheFile);\n\t\t// return TRUE if file age 'within' good time\n\t\treturn ($goodTime < $cacheAge) ? FALSE : TRUE;\n\t}", "function wprss_is_feed_item_older_than( $id, $timestamp ) {\n // GET THE DATE\n $age = get_the_time( 'U', $id );\n if ( $age === '' ) return FALSE;\n // Calculate the age difference\n $difference = $age - $timestamp;\n // Return whether the difference is negative ( the age is smaller than the timestamp )\n return ( $difference <= 0 );\n }", "public function hasUpdates();", "private function isFreshCacheEntry(Response $entry)\n {\n return $this->getReverseProxyTtl($entry) > 0;\n }", "public function getLastLogin_always_returnCorrectly()\n {\n $this->assertEquals($this->user['last_login'], $this->entity->getLastLogin());\n }", "public function refreshUpdated()\n {\n $this->setUpdated(new \\DateTime());\n }", "private function last_login_is_recent() {\n if(!isset($this->last_login)) {\n return false;\n } elseif(($this->last_login + self::MAX_LOGIN_AGE) < time()) {\n return false;\n } else {\n return true;\n }\n }", "public function checkTimestamps()\n {\n return false;\n }", "public function refreshTimestamp();", "public function testGetCachedTimestamp()\n {\n // create dummy cache file for the following test\n file_put_contents('./cache/'.sha1($this->smarty->getTemplateDir(0) . 'helloworld.tpl').'.helloworld.tpl.php', '<?php ?>');\n $this->smarty->caching = true;\n $this->smarty->cache_lifetime = 1000;\n $tpl = $this->smarty->createTemplate('helloworld.tpl');\n $this->assertTrue(is_integer($tpl->cached->timestamp));\n $this->assertEquals(10, strlen($tpl->cached->timestamp));\n }", "public function test_get_rows_since2(){\n\t\t$listotron = new Listotron();\n\n\t\t$user1 = md5(rand() . md5(rand()));\n\t\t$user2 = md5(rand() . md5(rand()));\n\t\t$user3 = md5(rand() . md5(rand()));\n\t\t$then = $listotron->getNOW();\n\t\tusleep(500);\n\t\t$listotron->updateNOW();\n\t\t$lmb = json_decode(\"{ \\\"$user3\\\" : \\\"$then\\\" }\");\n\t\t$now = $listotron->getNOW();\n\t\t\n\t\t// modify the List\n\t\t$rows = $listotron->outdent(4, $user1);\n\n\t\t// now get the rows changed by not me\n\t\t// since before NOW()\n\t\t$rows = $listotron->getAllRowsSince($lmb, $user2);\n\t\t$this->assertEqual(count($rows), 3);\n\t\t\n\t\t$this->assertEqual($rows[0][\"row_id\"], 4);\n\t\t$this->assertEqual($rows[0][\"par\"], null);\n\t\t$this->assertEqual($rows[0][\"prev\"], 1);\n\t\t$this->assertEqual($rows[0][\"lm\"], $now);\n\t\t$this->assertEqual($rows[0][\"lmb\"], $user1);\n\t\t\n\t\t$this->assertEqual($rows[1][\"row_id\"], 5);\n\t\t$this->assertEqual($rows[1][\"par\"], 4);\n\t\t$this->assertEqual($rows[1][\"prev\"], null);\n\t\t$this->assertEqual($rows[1][\"lm\"], $now);\n\t\t$this->assertEqual($rows[1][\"lmb\"], $user1);\n\n\t\t$this->assertEqual($rows[2][\"row_id\"], 6);\n\t\t$this->assertEqual($rows[2][\"par\"], 4);\n\t\t$this->assertEqual($rows[2][\"prev\"], 5);\n\t\t$this->assertEqual($rows[2][\"lm\"], $now);\n\t\t$this->assertEqual($rows[2][\"lmb\"], $user1);\n\t}", "public function test_get_pw_changed_time__0() {\n\t\t$actual = self::$lss->get_pw_changed_time($this->user->ID);\n\t\t$this->assertSame(0, $actual);\n\t}", "public function check_modifying_date($venueID,$usrID)\n {\n $seoqry = DB::table('venue_master')\n ->where('creater_id',$usrID)\n ->where('id',$venueID)\n ->select('modified_date')\n ->first();\n $rtmodify = $seoqry->modified_date;\n // echo $rtmodify;\n if($rtmodify == '0000-00-00 00:00:00')\n {\n return 1; \n }else\n {\n return 2; \n }\n }", "public function beenUpdated()\n {\n return count($this->updatePlan) > 0;\n }", "public function assertUpdateDefaults() {\n\t\t\t$this->set('lastModified', 'NOW()', false);\n\t\t\t$this->enclose('lastModified', false);\n\t\t}", "function wp_cache_set_sites_last_changed()\n {\n }", "public function hasTimestamps() {\n return $this->_has(2);\n }", "public function hasTimestamps() {\n return $this->_has(2);\n }", "public function hasTimestamps() {\n return $this->_has(2);\n }", "public function testWebinarPollUpdate()\n {\n }", "private function isUpdated($viewFile,$cacheFile) {\n\t\tif (file_exists($cacheFile)) {\n\t\t\t$cacheMTime = filemtime($cacheFile);\n\t\t\t$fileMTime = filemtime($viewFile);\n\t\t\treturn ($cacheMTime<$fileMTime);\n\t\t}\n\t\treturn true;\n\t}", "public function hasPassed() {\n \treturn $this < new \\DateTime();\n }" ]
[ "0.6934011", "0.6917365", "0.659593", "0.6427634", "0.63978237", "0.63468266", "0.6321915", "0.6275053", "0.6223854", "0.6178387", "0.6148337", "0.6030281", "0.6008651", "0.597698", "0.59645087", "0.59508556", "0.5942875", "0.5920142", "0.5917604", "0.58927524", "0.58811617", "0.5842511", "0.58188945", "0.58132374", "0.58053374", "0.5781224", "0.5781224", "0.57778573", "0.57756966", "0.57553625", "0.5748441", "0.5730827", "0.56978065", "0.5694553", "0.5691268", "0.56883144", "0.5687623", "0.5686791", "0.5679524", "0.56623065", "0.56528986", "0.56520855", "0.56341004", "0.56289124", "0.5606686", "0.56014466", "0.55997443", "0.55958766", "0.5593828", "0.5593158", "0.5590491", "0.5587781", "0.5579071", "0.55746084", "0.5572617", "0.55701846", "0.55581826", "0.55528593", "0.5544012", "0.5535628", "0.55297637", "0.5525969", "0.5523846", "0.5522586", "0.55123705", "0.5511985", "0.55010617", "0.54967564", "0.54842687", "0.5472802", "0.54681706", "0.5457021", "0.5454092", "0.54436916", "0.54277503", "0.5419422", "0.54187626", "0.54155535", "0.541459", "0.540947", "0.5406086", "0.5401824", "0.5392623", "0.53865474", "0.5386375", "0.53797317", "0.5374725", "0.5364174", "0.53534955", "0.53515506", "0.53508705", "0.5350863", "0.53504896", "0.53446704", "0.5342931", "0.5342931", "0.5342931", "0.5341407", "0.5341324", "0.53385305" ]
0.7276979
0
tests entry is older than last refresh
public function testIsNewerThanFalse() { $time = time(); $lastRefresh = date('Y-m-d H:i:s', $time - 10); $userData = ['id' => 1, 'last_refresh' => $lastRefresh]; $this->CurrentUser->setSettings($userData); $this->assertFalse($this->LastRefresh->isNewerThan($time)); $this->assertFalse($this->LastRefresh->isNewerThan(date('Y-m-d H:i:s', $time))); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testIsNewerThanTrue() {\n\t\t\t$time = time();\n\t\t\t$lastRefresh = date('Y-m-d H:i:s', $time + 10);\n\t\t\t$userData = ['id' => 1, 'last_refresh' => $lastRefresh];\n\t\t\t$this->CurrentUser->setSettings($userData);\n\n\t\t\t$this->assertTrue($this->LastRefresh->isNewerThan($time));\n\t\t\t$this->assertTrue($this->LastRefresh->isNewerThan(date('Y-m-d H:i:s', $time)));\n\t\t}", "public function testIsNewerThanForNewUsers() {\n\t\t\t$userData = ['id' => 1, 'last_refresh' => null];\n\t\t\t$this->CurrentUser->setSettings($userData);\n\n\t\t\t$this->assertNull($this->LastRefresh->isNewerThan(time()));\n\t\t\t$this->assertNull($this->LastRefresh->isNewerThan(date('Y-m-d h:i:s', time())));\n\t\t}", "function checkRefreshDate($refreshdate)\n{\n \n if($refreshdate < (time()-(60*60*24*21)))\n {\n return true;\n }\n else\n {\n return false;\n }\n}", "public function hasLastTime(){\n return $this->_has(18);\n }", "public function hasLastUpdate() {\n return $this->_has(2);\n }", "public function upToDate() {\n\t\tif($this->hasDetails()) {\n\t\t\t$last_score_date = $this->getScores()->max('updated_at');\n\t\t\tYii::trace($last_score_date.' <= '.$this->updated_at, 'Scorecard::upToDate');\n\t\t\treturn $last_score_date <= $this->updated_at;\n\t\t}\n\t\treturn true;\n\t}", "protected function recentTestInstanceExists() {}", "public function testDeleteSessionsOlderThen()\n {\n $session = $this->objectManager->create(\\Magento\\Security\\Model\\AdminSessionInfo::class);\n /** @var $session \\Magento\\Security\\Model\\AdminSessionInfo */\n $session->getResource()->deleteSessionsOlderThen(strtotime('2016-01-20 12:00:00'));\n $collection = $session->getResourceCollection()\n ->addFieldToFilter('main_table.updated_at', ['lt' => '2016-01-20 12:00:00'])\n ->load();\n $count = $collection->count();\n $this->assertEquals(0, $count);\n }", "public function is_expired() {\n\t\treturn $this->data['created_at'] + HOUR_IN_SECONDS < ITSEC_Core::get_current_time_gmt();\n\t}", "function expired() {\r\n if(!file_exists($this->cachefile)) return true;\r\n # compare new m5d to existing cached md5\r\n elseif($this->hash !== $this->get_current_hash()) return true;\r\n else return false;\r\n }", "public function recentlySeen()\n {\n return $this->checked_in_at->diffInDays(now()) < 1;\n }", "public function needUpdate()\n\t{\n\t\treturn ($this->getLastUpdate() == null || time() - $this->getLastUpdate()->format('U') > 1 * 60);\n\t}", "public function is_new_data() {\n $rv = FALSE;\n if ($this->is_remote($this->url)) {\n $ts_standard = $this->GetRemoteLastModified($this->url . FileFetcher::FILE_STANDARDS);\n $ts_counties = $this->GetRemoteLastModified($this->url . FileFetcher::FILE_COUNTIES);\n }\n else {\n $ts_standard = filemtime($this->url . FileFetcher::FILE_STANDARDS);\n $ts_counties = filemtime($this->url . FileFetcher::FILE_COUNTIES);\n }\n $ts = 0;\n if ($this->last_fetch == '' || $ts_standard > $this->last_fetch) {\n $rv = TRUE;\n $ts = $ts_standard;\n }\n if ($this->last_fetch == '' || $ts_counties > $this->last_fetch) {\n $rv = TRUE;\n $ts = $ts_counties;\n }\n if ($rv) {\n update_option(\"hecc_standard_last_update_datetime\", $ts);\n }\n return $rv;\n }", "public function uptodate()\n\t{\n\t\t$interval = new DateInterval('P1W'); // 1 Week\n\t\t$now = new DateTime();\n\n\t\treturn (new DateTime($this->updated_at))->add($interval) > $now && ( ! $this->recent());\n\t}", "public function testUpdated()\n {\n $feed = $this->eventFeed;\n\n // Assert that the feed's updated date is correct\n $this->assertTrue($feed->getUpdated() instanceof Zend_Gdata_App_Extension_Updated);\n $this->verifyProperty2(\n $feed,\n \"updated\",\n \"text\",\n \"2007-05-31T01:15:00.000Z\"\n );\n\n // Assert that all entry's have an Atom Published object\n foreach ($feed as $entry) {\n $this->assertTrue($entry->getUpdated() instanceof Zend_Gdata_App_Extension_Updated);\n }\n\n // Assert one of the entry's Published dates\n $entry = $feed[2];\n $this->verifyProperty2($entry, \"updated\", \"text\", \"2007-05-17T10:33:49.000Z\");\n }", "function checkLastUpdated() {\r\n $conn = mysql_connect($this->mysql_host,$this->mysql_user,$this->mysql_pass);\r\n \r\n $rs = mysql_select_db($this->mysql_db,$conn);\r\n \r\n $sql = \"SHOW TABLE STATUS FROM \".$this->mysql_db.\" LIKE '\".$this->mysql_table.\"'\";\r\n \r\n $rs = mysql_query($sql,$conn);\r\n \r\n if(mysql_num_rows($rs) == 0 ) {\r\n \r\n $this->createTable();\r\n } else {\r\n $row = mysql_fetch_array($rs);\r\n if(time() > (strtotime($row[\"Update_time\"])+(12*60*60)) ) {\r\n \r\n $this->downloadExchangeRates();\r\n }\r\n }\r\n }", "public function recent()\n\t{\n\t\t$interval = new DateInterval('P1W'); // 1 Week\n\t\t$now = new DateTime();\n\n\t\treturn (new DateTime($this->created_at))->add($interval) > $now;\n\t}", "public function isRefreshExpired()\n {\n return $this->refresh_token->isExpired();\n }", "function is_updated($updated_at)\n{\n $now = time() - 60;\n $updated_at = strtotime($updated_at);\n if ($updated_at > $now) {\n return true;\n }\n\n return false;\n}", "function wprss_is_feed_item_older_than( $id, $timestamp ) {\n // GET THE DATE\n $age = get_the_time( 'U', $id );\n if ( $age === '' ) return FALSE;\n // Calculate the age difference\n $difference = $age - $timestamp;\n // Return whether the difference is negative ( the age is smaller than the timestamp )\n return ( $difference <= 0 );\n }", "static function check_expired_cache(){\n\n\t\tglobal $wpdb;\n\t\t$limit = 2000;\n\t\tif ( class_exists( 'WRC_Logger' ) ) {\n\t\t\tself::$logger = new WRC_Logger( get_called_class() );\n\t\t\t$cron_limit = get_option( WRC_Logger::SETTING_FLAG . '_limit', '2000' );\n\t\t\tif ( is_numeric( $cron_limit ) ) {\n\t\t\t\t$limit = $cron_limit;\n\t\t\t}\n\t\t}\n\n\t\t$expiredBefore = date('Y-m-d', strtotime('-1 year'));\n\n\t\t$query = '\nDELETE FROM ' . REST_CACHE_TABLE . ' \nWHERE rest_expires < \"' . $expiredBefore . '\" AND rest_to_update=0\nLIMIT ' . $limit;\n\n\t\ttry {\n\t\t\tif ( $wpdb->query( $query ) ) {\n\t\t\t\t// executed successfully\n\t\t\t} else {\n\t\t\t\tif ( function_exists( 'newrelic_notice_error' ) ) {\n\t\t\t\t\tnewrelic_notice_error( 'CRON FAIL: Unable to perform cleanup on un-requested old API cache. Limit ' . $limit . ', Expired ' . $expiredBefore );\n\t\t\t\t}\n\t\t\t}\n\t\t}catch( \\Exception $e){\n\t\t\tif ( function_exists( 'newrelic_notice_error' ) ) {\n\t\t\t\tnewrelic_notice_error( 'CRON FAIL: '.$e->getMessage().'. Limit ' . $limit . ', Expired ' . $expiredBefore );\n\t\t\t}\n\t\t}\n\t\treturn;\n\n\t}", "public function needsRefreshing()\n {\n return $this->isExpired() || ! $this->isLoaded();\n }", "public function isOutdated() {}", "protected function isOutdated(): bool {\n $outdated = true;\n if(!$this->dry()){\n $timezone = $this->getF3()->get('getTimeZone')();\n $currentTime = new \\DateTime('now', $timezone);\n $updateTime = \\DateTime::createFromFormat(\n 'Y-m-d H:i:s',\n $this->updated,\n $timezone\n );\n $interval = $updateTime->diff($currentTime);\n if($interval->days < Universe\\BasicUniverseModel::CACHE_MAX_DAYS){\n $outdated = false;\n }\n }\n return $outdated;\n }", "public function test_get_rows_since(){\n\t\t$listotron = new Listotron();\n\n\t\t$user1 = md5(rand() . md5(rand()));\n\t\t$user2 = md5(rand() . md5(rand()));\n\t\t$then = $listotron->getNOW();\n\t\tusleep(500);\n\t\t$listotron->updateNOW();\n\t\t$lmb = json_decode(\"{ \\\"$user1\\\" : \\\"$then\\\" }\");\n\t\t$now = $listotron->getNOW();\n\t\t\n\t\t// modify the List\n\t\t$rows = $listotron->outdent(4, $user1);\n\n\t\t// now get the rows changed by not me\n\t\t// since before NOW()\n\t\t$rows = $listotron->getAllRowsSince($lmb, $user2);\n\t\t$this->assertEqual(count($rows), 3);\n\t\t\n\t\t$this->assertEqual($rows[0][\"row_id\"], 4);\n\t\t$this->assertEqual($rows[0][\"par\"], null);\n\t\t$this->assertEqual($rows[0][\"prev\"], 1);\n\t\t$this->assertEqual($rows[0][\"lm\"], $now);\n\t\t$this->assertEqual($rows[0][\"lmb\"], $user1);\n\t\t\n\t\t$this->assertEqual($rows[1][\"row_id\"], 5);\n\t\t$this->assertEqual($rows[1][\"par\"], 4);\n\t\t$this->assertEqual($rows[1][\"prev\"], null);\n\t\t$this->assertEqual($rows[1][\"lm\"], $now);\n\t\t$this->assertEqual($rows[1][\"lmb\"], $user1);\n\n\t\t$this->assertEqual($rows[2][\"row_id\"], 6);\n\t\t$this->assertEqual($rows[2][\"par\"], 4);\n\t\t$this->assertEqual($rows[2][\"prev\"], 5);\n\t\t$this->assertEqual($rows[2][\"lm\"], $now);\n\t\t$this->assertEqual($rows[2][\"lmb\"], $user1);\n\t}", "private function compare_with_date()\n {\n }", "private function isCacheOld($cacheFile) {\n\t\t// time now - cache lifetime\n\t\t$goodTime = time() - ($this->expiry * 60);\n\t\t$cacheAge = filemtime($cacheFile);\n\t\t// return TRUE if file age 'within' good time\n\t\treturn ($goodTime < $cacheAge) ? FALSE : TRUE;\n\t}", "public function needs_run() {\n $today = time();\n $lastrun = $this->info[\"last_run\"];\n $interval = (int)$this->freq * 86400;\n\n return($today > ($lastrun + $interval));\n }", "public function hasRelivetime(){\n return $this->_has(3);\n }", "function testResetDateGreaterThanToday() {\n Counter::findOne(1)->reset(Carbon::now()->addDays(1)->toDateString());\n }", "public function testGetLastUseDate()\n {\n $this->assertEquals($this->attributes->{'last use date'}, \n $this->user->getLastUseDate());\n }", "function hasRecentlyAction() {\n\n\t\t$limit = date('U') + (60 * 60 * $system[\"config\"][\"system\"][\"parameters\"][\"applicationTimeZoneGMT\"][\"value\"]) - (2 * 60 * 60);\n\n\t\tif ($this->isLoged() && $this->getLastAction('U') < $limit)\n\t\t\treturn false;\n\t\telse\n\t\t\treturn true;\n\t}", "public function testFeedUpdateFields() {\n // Create scheduled feed.\n $scheduled_feed = $this->createFeed(NULL, ['refresh' => '900']);\n\n $this->drupalGet('admin/config/services/aggregator');\n $this->assertSession()->statusCodeEquals(200);\n\n // The scheduled feed shows that it has not been updated yet and is\n // scheduled.\n $this->assertSession()->pageTextContains('never');\n $this->assertSession()->pageTextContains('imminently');\n $this->assertSession()->pageTextNotContains('ago');\n $this->assertSession()->pageTextNotContains('left');\n\n $this->updateFeedItems($scheduled_feed);\n $this->drupalGet('admin/config/services/aggregator');\n\n // After the update, an interval should be displayed on both last updated\n // and next update.\n $this->assertSession()->pageTextNotContains('never');\n $this->assertSession()->pageTextNotContains('imminently');\n $this->assertSession()->pageTextContains('ago');\n $this->assertSession()->pageTextContains('left');\n\n // Delete scheduled feed.\n $this->deleteFeed($scheduled_feed);\n\n // Create non-scheduled feed.\n $non_scheduled_feed = $this->createFeed(NULL, ['refresh' => '0']);\n\n $this->drupalGet('admin/config/services/aggregator');\n // The non scheduled feed shows that it has not been updated yet.\n $this->assertSession()->pageTextContains('never');\n $this->assertSession()->pageTextNotContains('imminently');\n $this->assertSession()->pageTextNotContains('ago');\n $this->assertSession()->pageTextNotContains('left');\n\n $this->updateFeedItems($non_scheduled_feed);\n $this->drupalGet('admin/config/services/aggregator');\n\n // After the feed update, we still need to see \"never\" as next update label.\n // Last update will show an interval.\n $this->assertSession()->pageTextContains('never');\n $this->assertSession()->pageTextNotContains('imminently');\n $this->assertSession()->pageTextContains('ago');\n $this->assertSession()->pageTextNotContains('left');\n }", "public function isFresh($timestamp = null);", "public function getIsRecentAttribute(): bool\n {\n return $this->created_at->diffInDays() <= 3;\n }", "public function testUpdateTimesheet()\n {\n }", "public function testUpdateLastClick() {\n\t\t$result = $this->Model->updateLastClick();\n\t\t$this->assertFalse((bool)$result);\n\n\t\t$expected = '0000-00-00 00:00:00';\n\t\t$result = $this->Model->field('last_click', array(\n\t\t\t'User.id' => 1\n\t\t));\n\t\t$this->assertEquals($expected, $result);\n\n\t\tCakeSession::write('Auth.User.id', 1);\n\t\t$result = $this->Model->updateLastClick();\n\t\t$this->assertTrue($result);\n\n\t\t$expected = date('Y-m-d H:i:s');\n\t\t$result = $this->Model->field('last_click', array(\n\t\t\t'User.id' => 1\n\t\t));\n\t\t$this->assertEquals(strtotime($expected), strtotime($result), null, 2);\n\n\t\t$expected = '2010-02-04 16:54:48';\n\t\t$result = $this->Model->field('modified', array(\n\t\t\t'User.id' => 1\n\t\t));\n\t\t$this->assertEquals($expected, $result);\n\t}", "public function isAccountOldEnough()\n {\n\n $data = $this->facebook->api('/me/posts?limit=1&until=1388534400');\n\n if (!empty($data['data']['0'])) {\n return true;\n } else {\n return false;\n }\n }", "private function last_login_is_recent() {\n if(!isset($this->last_login)) {\n return false;\n } elseif(($this->last_login + self::MAX_LOGIN_AGE) < time()) {\n return false;\n } else {\n return true;\n }\n }", "public function isRefreshable();", "public function has_expired()\n\t{\n\t\treturn $this->until < time();\n\t}", "public function hasCTime(){\n return $this->_has(6);\n }", "function isMeetingWithinTheLast10Days(\n\t\t$logger)\n\t{\n\t\t$sql = \"SELECT * FROM meetingdetails\";\n\t\t$result = $this->connection->query($sql);\n\t\t$meetingDate = \"\";\n\t\t$now = date(\"Y-m-d\");\n\n\t\twhile($row = mysqli_fetch_array($result))\n\t\t{\n\t\t\t$meetingDate = date(\"Y-m-d G:i:s\", strtotime($row['meetingDate']));\n\t\t}\n\t\t$logger->info('Meeting date from database: '.$meetingDate);\n\t\t$logger->info('Current date: '.$now);\n\t\tif($now <= $meetingDate)\n\t\t{\n\t\t\t$logger->info(\"Current date less then or equal to meeting date\");\n\t\t\t$diff = abs(strtotime($meetingDate) - strtotime($now));\n\n\t\t\t$years = floor($diff / (365*60*60*24));\n\t\t\t$months = floor(($diff - $years * 365*60*60*24) / (30*60*60*24));\n\t\t\t$days = floor(($diff - $years * 365*60*60*24 - $months*30*60*60*24)/ (60*60*24));\n\n\t\t\tif(($days >= 0 && $days <= 10) && $months == 0 && $years == 0)\n\t\t\t{\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\treturn false;\n\t\t}\n\t\treturn false;\n\t}", "public function isValidCheckin(){\n\t\t$users_connection = $this->dbHandle->users;\n\t\t$data = $users_connection->findOne(array('uid' => intval($this->uid)));\n\t\tif (!isset ($data['last_update']) || $data['last_update'] == null){\n\t\t\t//first update so is valid.\n\t\t\treturn true;\n\t\t}\n\t\t//$last_update_time = $data['last_update']['created_on']->sec;\n\t\tif (isset ($data['last_update']['listing'])){\n\t\t\t$last_checkedin_show = $data['last_update']['listing']['listing_id'];\n\t\t\t$last_checkedin_show_start = $data['last_update']['listing']['start']->sec;\n\t\t}\n\t\telse{\n\t\t\treturn true;\n\t\t}\n\t\tif (($this->listing_id == $last_checkedin_show) && ($this->time == $last_checkedin_show_start)){\n\t\t\t$this->logger->log(\"Checked into the same show again. Return false\",Zend_Log::INFO);\n\t\t\treturn false;\n\t\t}\n\t\t/*\n\t\t$current_update_time = $this->timestamp;\n\t\t$diff_secs = $current_update_time - $last_update_time;\n\t\t$this->logger->log(\"The diff secs = $diff_secs\",Zend_Log::INFO);\n\t\t$threshold = 30*60; //30 mins \n\t\tif ($diff_secs > $threshold){\n\t\t\treturn true;\n\t\t}\n\t\t//within 30 mins not valid for points.\n\t\treturn false;\n\t\t*/\n\t\treturn true;\n\t}", "public function getLastUpdate()\n {\n return Mage::app()->loadCache('admin_notifications_lastcheck');\n// return Mage::getStoreConfig(self::XML_LAST_UPDATE_PATH);\n }", "public function testRefreshTokenNotExpired()\n {\n $oauthToken = $this->getOAuthToken(GoogleApiAuthenticationTest::NOT_EXPIRED_IN_SECONDS);\n $request = $this->getRequestWithSession(serialize($oauthToken));\n\n $tokenHasBeenUpdated = $this->googleApiAuthentication->refreshToken($request);\n\n $this->assertFalse($tokenHasBeenUpdated);\n }", "private function isRefresh($lastUrl): bool\n\t{\n\t\treturn $lastUrl == $_SERVER['HTTP_REFERER'];\n\t}", "function testRevisionHistory() \r\n\t{\r\n\t\t$dbh = $this->dbh;\r\n\t\t\r\n\t\t$obj = new CAntObject($dbh, \"customer\", null, $this->user);\r\n\t\t$obj->setValue(\"name\", \"My First Revision\");\r\n\t\t$oid = $obj->save();\r\n\r\n\t\t$revid = $dbh->GetValue($dbh->Query(\"select id from object_revisions where object_id='$oid' and object_type_id='\".$obj->object_type_id.\"'\"));\r\n\t\t$this->assertTrue($revid > 0 && $revid !=null);\r\n\t\t//$this->assertEquals($dbh->GetValue($dbh->Query(\"select field_value from object_recurrence where id='\".$rp->id.\"'\")), 0);\r\n\t}", "public function hasUpdateFor($user) \n {\n return $this->updated_at > cache()->store('redis')->get($user->getCacheKeyName($this));\n }", "public function testNothingModifiedLastRunSet()\n {\n $this->_cs->updateLastRun($this->_name);\n sleep(2);\n\n $check = $this->_cs->checkEntitiesChanged($this->_name, array(self::ENTITY_NAME));\n $this->assertFalse($check);\n }", "private function checkExpirated() {\n\n }", "public function testRefreshTokenExpired()\n {\n $oauthToken = $this->getOAuthToken(GoogleApiAuthenticationTest::EXPIRED_IN_SECONDS);\n $request = $this->getRequestWithSession(serialize($oauthToken));\n $this->mockTokenStorage($oauthToken);\n $this->mockGoogleResourceOwner();\n\n $tokenHasBeenUpdated = $this->googleApiAuthentication->refreshToken($request);\n\n $this->assertTrue($tokenHasBeenUpdated);\n }", "private function checkNewCommondaty()\n {\n $date = new DateTime($this->addDate);\n $date->modify(self::TIME_INTERVAL);\n $date->format('Y-m-d H:i:s');\n $dateNow = new DateTime();\n $dateNow->format('Y-m-d H:i:s');\n\n if ($dateNow < $date) {\n return 1;\n }\n return 0;\n }", "public function isNeedUpdate()\n {\n if (is_null($this['episode_update_date'])){\n return true;\n }\n if (Carbon::now()->diffInDays(new Carbon($this['episode_update_date'])) > 3){\n return true;\n }\n return false;\n }", "public function hasLastrewardtime(){\n return $this->_has(7);\n }", "public function testLastRuns()\n {\n LastRun::truncate();\n LastRun::factory()->count(30)->create();\n\n $headers['Accept'] = 'application/json';\n\n $response = $this->get('/api/v1/runner/1/form-data', $headers);\n\n $response->assertStatus(200)->assertJsonStructure(['success', 'data' => ['last_runs'], 'status']);\n }", "public function hasPassed() {\n \treturn $this < new \\DateTime();\n }", "public function test_time_ago() {\n\t\t$time = current_time( 'timestamp' );\n\t\t$time_ago = locomotive_time_ago( $time );\n\n\t\t$this->assertEquals( '1 min ago', $time_ago );\n\t}", "function wp_cache_set_posts_last_changed()\n {\n }", "public function getEarliestHistoryAttribute() {\n if ( App::runningUnitTests() ) {\n return true;\n }\n\n //in testing units, factory run first so no user logins\n if(!auth()->user()){\n return true;\n }\n\n $data = $this->where('lead_id', $this->lead_id)->orderBy('created_at', 'ASC')->first();\n\n if ($data) return $data->created_at;\n\n return true;\n }", "public function is_expired()\n {\n }", "public function isUpdated() {}", "function getLastViewed();", "public function test_get_rows_since2(){\n\t\t$listotron = new Listotron();\n\n\t\t$user1 = md5(rand() . md5(rand()));\n\t\t$user2 = md5(rand() . md5(rand()));\n\t\t$user3 = md5(rand() . md5(rand()));\n\t\t$then = $listotron->getNOW();\n\t\tusleep(500);\n\t\t$listotron->updateNOW();\n\t\t$lmb = json_decode(\"{ \\\"$user3\\\" : \\\"$then\\\" }\");\n\t\t$now = $listotron->getNOW();\n\t\t\n\t\t// modify the List\n\t\t$rows = $listotron->outdent(4, $user1);\n\n\t\t// now get the rows changed by not me\n\t\t// since before NOW()\n\t\t$rows = $listotron->getAllRowsSince($lmb, $user2);\n\t\t$this->assertEqual(count($rows), 3);\n\t\t\n\t\t$this->assertEqual($rows[0][\"row_id\"], 4);\n\t\t$this->assertEqual($rows[0][\"par\"], null);\n\t\t$this->assertEqual($rows[0][\"prev\"], 1);\n\t\t$this->assertEqual($rows[0][\"lm\"], $now);\n\t\t$this->assertEqual($rows[0][\"lmb\"], $user1);\n\t\t\n\t\t$this->assertEqual($rows[1][\"row_id\"], 5);\n\t\t$this->assertEqual($rows[1][\"par\"], 4);\n\t\t$this->assertEqual($rows[1][\"prev\"], null);\n\t\t$this->assertEqual($rows[1][\"lm\"], $now);\n\t\t$this->assertEqual($rows[1][\"lmb\"], $user1);\n\n\t\t$this->assertEqual($rows[2][\"row_id\"], 6);\n\t\t$this->assertEqual($rows[2][\"par\"], 4);\n\t\t$this->assertEqual($rows[2][\"prev\"], 5);\n\t\t$this->assertEqual($rows[2][\"lm\"], $now);\n\t\t$this->assertEqual($rows[2][\"lmb\"], $user1);\n\t}", "private function isCacheExpired(): bool\n\t{\n\t\t$path = $this->_cacheFolder . $this->generateCacheName();\n\t\tif (file_exists($path)) {\n\t\t\t$filetime = filemtime($path);\n\t\t\treturn $filetime < (time() - $this->_cacheTtl);\n\t\t} else {\n\t\t\treturn true;\n\t\t}\n\t}", "public function test_if_failed_update()\n {\n }", "public function hasExpired(){\n if($this->isIndefinied())\n return false;\n\n \\Log::info('Hoy'.print_r(Carbon::now(),true));\n \\Log::info('Expira'.print_r(Carbon::parse($this->expires_on),true));\n return (bool) Carbon::now()->greaterThan(Carbon::parse($this->expires_on));\n }", "public function hasLastPatchTimestampTicks()\n {\n return $this->LastPatchTimestampTicks !== null;\n }", "function countremainingTest()\n\t{\n\t\tglobal $DB,$frmdata;\n\t\t\n\t\t$query=\"select count(*) as test from test where test_date>=now()\";\n\t\t\t\t\n\t\t$result = $DB->RunSelectQuery($query);\n\t\treturn $result;\n\t}", "function isUpdatedWithin($seconds) {\n $timestamp = date(\"Y-m-d H:i:s\", time() - $seconds);\n\n $query = \"SELECT data_updated FROM np_updated WHERE (data_updated = $timestamp)\";\n if ($result = $this->link->query($query))\n return true;\n return false;\n }", "function bp_lb_check_bp_user_last_activity() {\n\t\tglobal $bp;\n\t\n\t\t//setup variables from settings page - get number of days before reminder\n\t\tif ( get_option( 'lightbox_alerts_days' ) ) {\n\t\n\t\t\t$time_to_check = get_option('lightbox_alerts_days') * 86400;\n\t\n\t\t\t//if lightbox_alerts_days is less than 0, set timer to 10 seconds\n\t\t\tif ( $time_to_check < 0 ) {\n\t\t\t\t$time_to_check = 10;\n\t\t\t}\n\t\n\t\t} else {\n\t\t\t$time_to_check = 8640000; //8640000 seconds = 100 days\n\t\t} \n\t\t//get current BuddyPress user\n\t\t$current_user = bp_loggedin_user_id();\n\t\n\t\t// TODO - document the last activity user meta - was defines last_activity\n\t\t//get last activity date\n\t\t$last_activity = strtotime( bp_get_user_meta( $current_user, 'last_activity', true ) );\n\t\n\t\t//calculate time since last activity\n\t\t$time_since_last_activity = time() - $last_activity;\n\t\t\n\t\t\n\t\t//check if time since last activity is greater than the setting value\n\t\tif ( $time_since_last_activity > $time_to_check ) { \n\t\t\t//echo \"<script type='text/javascript'>alert('HELLO');</script>\";\n\t\t\t//show lightbox \n\t\t\tbp_lb_show_email_still_correct_lightbox();\n\t\t}\n\t\n\t\n\t}", "function wp_cache_set_users_last_changed()\n {\n }", "public function isRefreshTimeBasedCookie() {}", "public function isRefreshTimeBasedCookie() {}", "function isNewestItem($date)\n\t{\n\t\t$newestDate = date(\"Y-m-d\", strtotime(\"-7 day\"));\n\n\t\tif($date>$newestDate) // the parameter named date are newer than newestData,\n\t\t\treturn true;\n\t\telse false;\n\t}", "public function isPasswordSetRecently(){\r\n global $pdo;\r\n try{\r\n $select = $pdo->prepare(\"SELECT 1 FROM password_log\r\n WHERE user_id = ?\r\n AND password_log.reset > DATE_SUB(NOW(), \r\n INTERVAL \".$this->app_config['force_password_reset_days'].\" DAY)\");\r\n $select->execute(array($this->user_id));\r\n }\r\n catch(PDOException $e){\r\n $this->setError($e->getMessage());\r\n return false;\r\n }\r\n if($select->fetchColumn()>0){\r\n return true;\r\n }\r\n return false;\r\n}", "public function testExecDailyStatsCron1NewAttach1UnpubAttach() {\n\t\t$this->updateDailyStatRec(1,date(\"Y-m-d\",strtotime(\"-2 day\")));\n \t\t\n \t\t// update new invalid DS rec date\n \t\t$this->updateDailyStatRec(2,date(\"Y-m-d\",strtotime(\"-1 day\")));\n \t\t\n \t\t// execute cron\n \t\t\n\t\tDailyStatsDao::execDailyStatsCron(\"#__\" . $this->getDailyStatsTableName(),\"#__attachments_cron_test\",\"#__content_cron_test\");\n\t\t\n \t\t// verify results\n \t\t\n\t\t/* @var $db JDatabase */\n \t$db = JFactory::getDBO();\n\t\t$query = \"SELECT COUNT(id) FROM #__\" . $this->getDailyStatsTableName(); \n \t$db->setQuery($query);\n \t$count = $db->loadResult();\n\n\t\t$this->assertEquals(3,$count,'3 daily_stats records expected, 2 for the past and only 1 for today for article 1 which has now 2 attachments, one of which is unpublished');\n\n\t\t$today = date(\"Y-m-d\",strtotime(\"now\"));\n\n\t\t// check daily stats for article 1\n\t\t\n\t\t$query = \"SELECT * FROM #__\" . $this->getDailyStatsTableName() . \" WHERE article_id = 1 AND date = '$today'\"; \n \t$db->setQuery($query);\n \t$res = $db->loadAssoc();\n\t\t\n\t\t$this->assertEquals(11,$res['date_hits'],'date hits');\n\t\t$this->assertEquals(111,$res['total_hits_to_date'],'total hits');\n\t\t$this->assertEquals(1,$res['date_downloads'],'date downloads');\n\t\t$this->assertEquals(11,$res['total_downloads_to_date'],'total downloads');\n\n\t\t$this->checkEntryExistInLog(\"Daily stats for $today added in DB. 0 rows inserted for new attachment\\(s\\). 1 rows inserted for existing attachments \\(gap filled: 1 day\\(s\\)\\).\");\n\t}", "public function needs_Update_timestamp($Path_To_Cache,$Path_To_File)\r\n\t\t\t{\r\n\t\t\t\t$Display = new sql();\r\n\t\t\t\t$sql = 'SELECT * FROM updates';\r\n\t\t\t\t$result = $Display->Display_Info($sql);\r\n\t\t\t\tforeach($result as $rows)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t$TimeStamp = strtotime($rows->TimeStamp);\r\n\t\t\t\t\t}\r\n\t\t\t\tif(file_exists($Path_To_Cache) && ($TimeStamp < filemtime($Path_To_Cache)))\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\treturn false;\r\n\t\t\t\t\t}\r\n\t\t\t\telse\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\treturn true;\r\n\t\t\t\t\t}\r\n\t\t\t}", "public function post_dated(){ \n\t\tif(strtotime($this->format_date_save($this->data['HrPermission']['per_date'])) < strtotime(date('Y-m-d'))){\t\t\n\t\t\treturn false;\n\t\t}else{\n\t\t\treturn true;\n\t\t}\n\t\t\n\t}", "protected abstract function shouldBeTimestamped(): bool;", "public function getProvioulsyUpdatedTimestamp()\n {\n $currentTimestamp = time();\n $this->sessionEntity->updateTimestamp();\n $this->assertTrue(is_int($this->sessionEntity->getTimestamp()));\n $this->assertTrue($currentTimestamp <= $this->sessionEntity->getTimestamp());\n }", "public function updateTestResult($force_update = false){\n\t\t\n\t\t\t// is node hidden\n\t\tif ( $this->getHidden() == true ){\n\t\t\t$result = tx_caretaker_TestResult::undefined('Node is disabled');\n\t\t\t$this->notify( 'disabledTestResult' , $result );\n\t\t\treturn $result;\n\t\t}\n\n\t\t$test_result_repository = tx_caretaker_TestResultRepository::getInstance();\n\t\t$latestTestResult = $test_result_repository->getLatestByNode( $this );\n\t\t$returnLatestResult = false;\n\t\t \t\n\t\t\t// check cache and return\n\t\tif ( !$force_update ){\n\t\t\t\n\t\t\tif ( $latestTestResult ) {\n\t\t\t\t\t// test is not in due state so retry\n\t\t\t\tswitch ( $latestTestResult->getState() ){\n\t\t\t\t\tcase tx_caretaker_Constants::state_due : \n\t\t\t\t\t\t$returnLatestResult = false;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase tx_caretaker_Constants::state_ack : \n\t\t\t\t\t\t$returnLatestResult = true;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase tx_caretaker_Constants::state_ok :\n\t\t\t\t\t\tif ( $latestTestResult->getTstamp() > time()-$this->test_interval ){\n\t\t\t\t\t\t\t$returnLatestResult = true;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase tx_caretaker_Constants::state_undefined :\n\t\t\t\t\tcase tx_caretaker_Constants::state_warning :\n\t\t\t\t\tcase tx_caretaker_Constants::state_error :\n\t\t\t\t\t\t\t// if due mode is 1 retry\n\t\t\t\t\t\tif ( $this->test_due == 1 ){\n\t\t\t\t\t\t\t$returnLatestResult = false;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\t// handle interval \n\t\t\t\t\t\telse if ( $latestTestResult->getTstamp() > time()-$this->test_interval ){\n\t\t\t\t\t\t\t$returnLatestResult = true;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\n\t\t\t\t// test should not run this hour \n\t\t\tif ( $returnLatestResult == false && ( $this->start_hour > 0 || $this->stop_hour > 0 ) ) {\n\t\t\t\t$local_time = localtime(time(), true);\n\t\t\t\t$local_hour = $local_time['tm_hour'];\n\t\t\t\tif ($local_hour < $this->start_hour || $local_hour >= $this->stop_hour ){\n\t\t\t\t\t$returnLatestResult = true;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t\t// return the cached result\n\t\tif ($returnLatestResult){ \n\t\t\t$this->notify( 'cachedTestResult', $latestTestResult );\n\t\t\treturn $latestTestResult;\n\t\t}\t\t\n\t\t\n\t\t\t// else check wether the test can be executed\n\t\tif($this->test_service && $this->test_service->isExecutable()) {\n\t\t\t\n\t\t\t\t// try to execute test\n\t\t\ttry {\n\t\t\t\t$result = $this->test_service->runTest();\n\t\t\t} catch ( Exception $e ) {\n\t\t\t\t$result = tx_caretaker_TestResult::create( tx_caretaker_Constants::state_error , 0, '{LLL:EXT:caretaker/locallang_fe.xml:service_exception}'.$e->getMessage );\n\t\t\t}\n\t\t\t\n\t\t\t\t// retry if not ok and retrying is enabled\n\t\t\tif ($result->getState() != 0 && $this->test_retry > 0){\n\t\t\t\t$round = 0;\n\t\t\t\tsleep(1);\n\t\t\t\twhile ( $round < $this->test_retry && $result->getState() != 0 ){\n\t\t\t\t\ttry {\n\t\t\t\t\t\t$result = $this->test_service->runTest();\n\t\t\t\t\t} catch ( Exception $e ) {\n\t\t\t\t\t\t$result = tx_caretaker_TestResult::create( tx_caretaker_Constants::state_error , 0, '{LLL:EXT:caretaker/locallang_fe.xml:service_exception}'.$e->getMessage );\n\t\t\t\t\t}\n\t\t\t\t\t$round ++;\n\t\t\t\t}\n\t\t\t\t$result->addSubMessage( new tx_caretaker_ResultMessage( 'LLL:EXT:caretaker/locallang_fe.xml:retry_info' , array( 'number'=>$round ) ) );\n\t\t\t}\n\n\t\t\t\t// save to repository after reading the previous result\n\t\t\t$resultRepository = tx_caretaker_TestResultRepository::getInstance();\n\t\t\t$resultRepository->saveTestResultForNode( $this, $result );\n\t\t\t\n\t\t\t\t// trigger notification\n\t\t\t$this->notify( 'updatedTestResult', $result, $latestTestResult );\n\t\t\t\n\t\t\treturn $result;\n\t\t\t\n\t\t} else {\n\t\t\t$result->addSubMessage( new tx_caretaker_ResultMessage( 'test service was not excutable this time so the cached result is used' ) );\n\t\t\t$this->notify( 'cachedTestResult', $result, $lastTestResult );\n\t\t\treturn $latestTestResult;\n\t\t}\n\t\t\n\t\t\n\t\t\n\t}", "public function is_expired() {\n\t\treturn $this->get_expires() < time();\n\t}", "public function isHistorical()\n {\n return $this->isHistorical;\n }", "private function isFreshCacheEntry(Response $entry)\n {\n return $this->getReverseProxyTtl($entry) > 0;\n }", "function test()\n {\n $this->updated = '2010-01-18 11:39';\n $this->created = '2010-01-18 08:48';\n }", "public function test_get_does_not_return_exceeded_entry()\n {\n // be checked for expiration...\n $con = $this->newConnection();\n\n $mainStorage = $this->newMainStorage($con);\n\n\n $storage = $this->newStorage($mainStorage);\n\n $until = (new \\DateTime());\n $storage->put('foo', 'bar', [], $until);\n\n $storage2 = $this->newTestStorage($mainStorage);\n\n $storage2->now = time() + 100;\n\n $this->assertNull($storage2->get('foo'));\n }", "function testStopDateGreaterThanToday() {\n Counter::findOne(1)->stop(Carbon::now()->addDays(1)->toDateString());\n }", "public function hasChangedEntries();", "public function testGetCachedTimestamp()\n {\n // create dummy cache file for the following test\n file_put_contents('./cache/'.sha1($this->smarty->getTemplateDir(0) . 'helloworld.tpl').'.helloworld.tpl.php', '<?php ?>');\n $this->smarty->caching = true;\n $this->smarty->cache_lifetime = 1000;\n $tpl = $this->smarty->createTemplate('helloworld.tpl');\n $this->assertTrue(is_integer($tpl->cached->timestamp));\n $this->assertEquals(10, strlen($tpl->cached->timestamp));\n }", "public function hasNewPosts()\n {\n if ($this->last_post == null) return false;\n\n $last_access = session('last_access_time');\n if (!$last_access || !($last_access instanceof Carbon)) $last_access = Carbon::now()->addDays(1);\n\n $thread_read = session('thread_persistance_data');\n if ($thread_read && is_array($thread_read) && array_key_exists($this->id, $thread_read)) {\n $read = $thread_read[$this->id];\n if ($read instanceof Carbon && $read > $last_access) $last_access = $read;\n }\n\n return $this->last_post->updated_at > $last_access;\n }", "function checkTicketDateValidity($ticket){\r\n\t App::import('Helper', 'Time');\r\n\t $time = new TimeHelper();\r\n\t $dayOld = time()-86400;\r\n\t \r\n\t //ce je odprti ticket starejsi od dneva se ga zbrise iz baze\r\n\t if(strtotime($ticket['Ticket']['creation_date']) < $dayOld){\r\n\t $this->delete($ticket['Ticket']['id']);\r\n\t return false;\r\n\t }else{\r\n\t return true;\r\n\t }\r\n\t \r\n\t}", "public function checkSyncDate(): bool\n {\n /** @var FileInfoImage $item */\n $item = $this->current();\n $date2 = $item->getSyncDateXmp();\n if ($date2 === null) {\n\n return true;\n } else {\n $date1 = DateTime::createFromFormat('U', $this->getMTime());\n\n return $date1 > $date2;\n }\n }", "public function checkTimestamps()\n {\n return false;\n }", "public function isExpiring() {\n return $this->expiration - time() < 22 * 24 * 3600;\n }", "public function getLastUpdated();", "public function check_modifying_date($venueID,$usrID)\n {\n $seoqry = DB::table('venue_master')\n ->where('creater_id',$usrID)\n ->where('id',$venueID)\n ->select('modified_date')\n ->first();\n $rtmodify = $seoqry->modified_date;\n // echo $rtmodify;\n if($rtmodify == '0000-00-00 00:00:00')\n {\n return 1; \n }else\n {\n return 2; \n }\n }", "public function refreshTimestamp();", "public function isExpired(): bool\n {\n if (!FS::isFile($this->resultFile)) {\n return true;\n }\n\n $fileAge = \\time() - (int)\\filemtime($this->resultFile);\n $fileAge = \\abs($fileAge);\n\n if ($fileAge >= $this->cacheTtl) {\n return true;\n }\n\n $firstLine = \\trim((string)FS::firstLine($this->resultFile));\n $expected = \\trim($this->getHeader());\n\n return $expected !== $firstLine;\n }", "public function testSetCacheLifeAsUnixTimestamp(): void\n {\n $key = 'Cache Life As TS';\n $value = 'Some Value';\n $rnd = rand(34, 99);\n $ttl = time() + $rnd;\n $this->testNotStrict->set($key, $value, $ttl);\n $realKey = $this->testNotStrict->getRealKey($key);\n $cacheTTL = $this->redis->ttl($realKey);\n $race = abs($cacheTTL - $rnd);\n $this->assertLessThan(3, $race);\n }" ]
[ "0.73944765", "0.6969357", "0.63766545", "0.6232533", "0.62198585", "0.6190001", "0.6134223", "0.611459", "0.6088835", "0.6067298", "0.60429984", "0.6041816", "0.6030871", "0.60204345", "0.5999683", "0.59979385", "0.59806794", "0.5967682", "0.5962053", "0.5953108", "0.5909195", "0.5897086", "0.58720016", "0.5830867", "0.58245265", "0.57996136", "0.5766021", "0.5750253", "0.57425153", "0.57297766", "0.5720103", "0.57077014", "0.569738", "0.56961566", "0.56953585", "0.56473905", "0.5631414", "0.56240296", "0.5608847", "0.55706215", "0.555857", "0.5554079", "0.55537844", "0.5550428", "0.5548309", "0.55436844", "0.553995", "0.5537767", "0.55255103", "0.55226934", "0.5520273", "0.5519367", "0.55188656", "0.5516251", "0.5515464", "0.55059403", "0.5495477", "0.54822814", "0.5481596", "0.54717106", "0.54709214", "0.54659927", "0.5462499", "0.5458131", "0.5456675", "0.5449648", "0.5449584", "0.5447591", "0.54450077", "0.5435956", "0.5432142", "0.5424199", "0.54166776", "0.54166776", "0.54137933", "0.54118454", "0.5411052", "0.5410508", "0.5408158", "0.5394378", "0.53909695", "0.53890383", "0.5385747", "0.53819454", "0.53722584", "0.53667474", "0.53662527", "0.5361571", "0.53606766", "0.53587013", "0.5352787", "0.5346381", "0.53444594", "0.53412914", "0.5338954", "0.53348446", "0.53339005", "0.53016406", "0.52956885", "0.5289643" ]
0.7135765
1
Fetch method, provides list of ids, not objects this is an optimization practice to not run twice a query that may be not so fast For performance reasons this method could speed up search in milions of records. Results are passed to provideSearchResults() NOTE: THIS METHOD SHOULD RETURN SORTED ELEMENTS Then those elements will be fetched in selected order, then merged with other results and reordered on page context
public function provideSearchResultsIds(ExtendedSearchQuery $query, array $options = [], $offset = 0, $limit) : array;
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function fetchList();", "protected abstract function fetchLists();", "protected function get_retrieved_ids() {\n $ids = $this->parse_ids($items);\n \n $sidx = $eidx = 0;\n if (is_array($this->page_size)) {\n $sidx = $this->page_size[0];\n $eidx = $this->page_size[1];\n if ($sidx < 0)\n $sidx = 0;\n if ($eidx < $sidx)\n $eidx = $sidx;\n if ($eidx >= count($ids))\n $eidx = count($ids) - 1;\n \n $len = $eidx - $sidx + 1;\n if ($sidx >= count($ids))\n $ids = array();\n else\n $ids = array_slice($ids, $sidx, $len);\n }\n\n list($start_count, $max_count) = $this->get_page_limit($this->page_size);\n $num_to_display = $max_count - $start_count + 1;\n $ids = array_slice($ids, $start_count, $num_to_display);\n\n // This is supposed to come at the end of the retrieval, but I don't know where to put it yet.\n // This is legacy code anyway and is going byebye soon.\n //$output[\"eod\"] = $start_count < $max_count;\n //$output[\"counts\"][\"displayed\"] = $start_count;\n //if (!$output[\"eod\"])\n // $output[\"counts\"][\"displayed\"]--;\n return $ids;\n }", "function fetchList($limit, $offset);", "protected function fetchData()\n\t{\n\t\t$this->addScopes();\n\t\t$criteria=$this->getCriteria();\n\t\tif(($pagination=$this->getPagination())!==false)\n\t\t{\n\t\t\t$pagination->setItemCount($this->getTotalItemCount());\n\t\t\t$pagination->applyLimit($criteria);\n\t\t}\n\t\tif(($sort=$this->getSort())!==false)\n\t\t\t$sort->applyOrder($criteria);\n\t\treturn CActiveRecord::model($this->modelClass)->findAll($criteria);\n\t}", "abstract protected function doFetchAll();", "public function get_entities();", "public abstract function fetchAll();", "function fetchAll($var){\n //Create an array variable to hold list of search records\n $result_array = array();\n\n //create an instance of the product class\n $object = new API();\n\n //run the search product method\n $records = $object->fetchOne($var);\n\n //check if the method worked\n if ($records) {\n\n while ($one_record = $object->db_fetch()) {\n\n //Assign each result to the array\n $result_array[] = $one_record;\n }\n }\n //return the array\n return $result_array;\n}", "public function fetchResults(){\n $resultsValues = $this->data;\n return $resultsValues;\n }", "public function load()\r\n\t{\r\n\t\t$entities = $this->query($this->entity, $this->relation)->getResults($this->relation);\r\n\t\t\r\n\t\t$this->loaded = true;\r\n\r\n\t\treturn $entities;\r\n\t}", "public abstract function get_ids();", "abstract protected function _doFetch($id);", "protected final function fetchRecords()\n {\n $this->query->setLimit(\n (($this->parameters->getCurrentPage() - 1) * $this->parameters->getResultsPerPage()),\n $this->parameters->getResultsPerPage()\n );\n\n $this->data = $this->query->execute()->getAssociative();\n }", "private function getContentList(){\n if(isset($_GET['content_search']) && strlen($_GET['content_search']) > 0){\n $searchstring = $this->setSearchstring();\n };\n\n //Set per page cookie\n if(isset($_GET['limit'])){\n $this->setPerPage(intval($_GET['limit']));\n }else if($_COOKIE[$this->main->module_mode.'_list_per_page_limit']){\n $this->per_page = intval($_COOKIE[$this->main->module_mode.'_list_per_page_limit']);\n };\n\n $this->main->current_per_page = $this->per_page;\n\n if(strlen($searchstring) > 0){\n $where = \" WHERE \".$searchstring;\n };\n\n $counter_query = \"\n SELECT\n count(*) AS `count`\n FROM\n `\".$this->main->db->quote($this->current_module_table).\"`\n \";\n\n $counter_result = mysql_fetch_row($this->main->db->query($counter_query));\n $limit = $this->main->getLimitsForList($counter_result[0], $this->per_page);\n \n $query = \"\n SELECT\n `id`,\n `name`,\n `publish`,\n `sort`\n \".$this->getAdditionalListFields().\"\n FROM\n `\".$this->main->db->quote($this->current_module_table).\"`\n \".$where.$this->main->getSortingParams().\"\n LIMIT\n \".$limit[0].\", \".$limit[1];\n\n return $this->main->db->assocMulti($query);\n }", "public function getEntities();", "public function getEntities();", "public abstract function fetchAllObjects();", "private function loadAll() {\n\n return $this->search->getProducts();\n\n }", "public function fetchData()\n\t{\n\t\tif (isset($this->rows))\n\t\t{\n\t\t\treturn $this->rows;\n\t\t}\n\t\t$this->rows = parent::fetchData();\n\t\tif ($this->force_count)\n\t\t{\n\t\t\treturn $this->rows;\n\t\t}\n\n\t\tif (count($this->rows) > $this->pagination->pageSize)\n\t\t{\n\t\t\t$this->hasMore = true;\n\t\t\tarray_pop($this->rows);\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$this->hasMore = false;\n\t\t}\n\t\t$this->totalItemCount = $this->pagination->offset + count($this->rows);\n\t\t$this->pagination->itemCount = $this->totalItemCount + ($this->hasMore ? 1 : 0);\n\t\treturn $this->rows;\n\t}", "public static function fetch_all($params) {}", "public function fetchResult();", "public function fetchAll();", "public function fetchAll();", "public function fetchAll();", "public function fetchAll();", "public function fetch($start_page = 2){\n # Track time;\n $this->time = time();\n\n # Get all the cars on a single result page.\n $items = $this->dom->find(\".listing-item\");\n if(!empty($items)){\n $this->results = static::parse_items($items);\n }\n $featured_items = $this->dom->find(\".featured-item\");\n if(!empty($featured_items)){\n $this->results = array_merge($this->results,\n static::parse_items($featured_items));\n }\n if(empty($this->results)){\n return [];\n }\n\n $this->num_results_on_page = count($items);\n\n\n # Get the total number of pages.\n $last_page_query = $this->dom->find('.paging_forward #last_page')->getAttribute(\"href\");\n if(empty($last_page_query)){\n $this->dom->find('.paging_forward a')->outerHtml;\n $anchors = $this->dom->find('.paging_forward a');\n if(isset($anchors[1])){\n $last_page_query = $anchors[1]->getAttribute(\"href\");\n }else{\n $last_page_query = \"\";\n }\n }\n\n preg_match(\"/page=(\\d+)/\", $last_page_query, $num_pages_query);\n if(isset($num_pages_query[0][1])){\n $this->num_pages = intval(explode(\"=\", $num_pages_query[0])[1]);\n }else{\n $this->num_pages = 1;\n }\n\n # Make sure num_results is less than total results\n $this->total_results = $this->num_results_on_page * $this->num_pages;\n if($this->num_results > $this->total_results || $this->num_results == \"all\"){\n $this->num_results = $this->total_results;\n }\n if($this->num_results_on_page > 0){\n $page_needed = intval($this->num_results / $this->num_results_on_page );\n }else{\n $page_needed = 0;\n }\n\n $page_urls = [];\n $base_url = preg_replace(\"/page=(\\d+)/\", \"\", $last_page_query);\n for($i = $start_page; $i <= $page_needed && $i <= $this->num_pages; $i++){\n array_push($page_urls, $this->url.\"&page=$i\");\n }\n\n # Fetch additional pages.\n $this->getOtherPages($page_urls);\n\n $first_page = preg_replace(\"/page=(\\d+)/\", \"page=1\", $last_page_query);\n array_unshift($page_urls, $first_page);\n }", "public abstract function getResults();", "public function fetchByIds(array $ids);", "protected function _getElements() {\n // Get avatar\n $avatar = null;\n $this->_getAvatar($this->id)->then(function($url) use(&$avatar) {\n $avatar = $url;\n })->wait();\n // Get data\n return $this->_paginate('/search', [\n 'maxResults' => $this->per_page,\n 'channelId' => $this->id,\n 'part' => 'snippet',\n 'type' => 'video',\n 'order' => 'date',\n 'safeSearch' => $this->config['nsfw'] ? 'none' : 'strict'\n ], $avatar);\n }", "public function getResults();", "public function getEntities(array $params = array());", "public static function fetch_all_in_a_list()\n\t{\n\t return Company::orderBy( 'name' )->lists( 'name' , 'id' );\n\n\t}", "function getData($conn, $sql, $inputObject)\n{\n $result = $conn->query($sql);\n $resultArray = array();\n $count = 0; // No. of contribution in the list (for toggling row color)\n //echo $result->num_rows . \"results<br>\";\n if ($result->num_rows > 0) {\n //Get all data row by row, pass attribute of \"id\" by URL to detail page\n while ($row = $result->fetch_assoc()) {\n $rowElement = new searchObject();\n $rowElement->set_dataAttributes($inputObject, $row);\n $resultArray[$count] = array();\n $resultArray[$count][\"id\"] = $row[\"id\"];\n $resultArray[$count][\"Title\"] = $row[\"Title\"];\n $resultArray[$count][\"Year\"] = $row[\"Year\"];\n $resultArray[$count][\"Authors\"] = $row[\"Authors\"];\n $resultArray[$count][\"Score\"] = $row[\"Score\"];\n $resultArray[$count][\"MatchScore\"] = $rowElement->get_matchScore();\n $resultArray[$count][\"MisMatch\"] = $rowElement->get_misMatch();\n $count += 1;\n }\n }\n changeText(\"ResultCount\", \"Result list: \" . $count. \" contribution(s)\");\n if ($count != 0) {\n generateContent($resultArray);\n }\n \n return $resultArray;\n}", "public function executeSearch()\n {\n // consider translations in database\n $query = $this->qb->getQuery()\n ->setHydrationMode(Query::HYDRATE_ARRAY);\n if (defined(\"\\\\Gedmo\\\\Translatable\\\\TranslatableListener::HINT_FALLBACK\")) {\n $query\n ->setHint(\n Query::HINT_CUSTOM_OUTPUT_WALKER,\n 'Gedmo\\\\Translatable\\\\Query\\\\TreeWalker\\\\TranslationWalker'\n )\n ->setHint(constant(\"\\\\Gedmo\\\\Translatable\\\\TranslatableListener::HINT_FALLBACK\"), true);\n }\n\n if ($this->useDoctrinePaginator) {\n $paginator = new Paginator($query, $this->doesQueryContainCollections());\n // if query has collections, use output walker\n // otherwise an error could occur\n // \"Cannot select distinct identifiers from query on a column from a fetch joined to-many association\"\n if ($this->doesQueryContainCollections()) {\n $paginator->setUseOutputWalkers(true);\n }\n $items = $paginator->getIterator();\n } else {\n $items = $query->execute();\n }\n\n $data = [];\n foreach ($items as $item) {\n if ($this->useDtRowClass && !is_null($this->dtRowClass)) {\n $item['DT_RowClass'] = $this->dtRowClass;\n }\n if ($this->useDtRowId) {\n $item['DT_RowId'] = $item[$this->rootEntityIdentifier];\n }\n // Go through each requested column, transforming the array as needed for DataTables\n foreach ($this->parameters as $index => $parameter) { //($i = 0 ; $i < count($this->parameters); $i++) {\n // Results are already correctly formatted if this is the case...\n if (!$this->associations[$index]['containsCollections']) {\n continue;\n }\n\n $rowRef = &$item;\n $fields = explode('.', $this->parameters[$index]);\n\n // Check for collection based entities and format the array as needed\n while ($field = array_shift($fields)) {\n $rowRef = &$rowRef[$field];\n // We ran into a collection based entity. Combine, merge, and continue on...\n if (!empty($fields) && !$this->isAssocArray($rowRef)) {\n $children = array();\n while ($childItem = array_shift($rowRef)) {\n $children = array_merge_recursive($children, $childItem);\n }\n $rowRef = $children;\n }\n }\n }\n\n // Prepare results with given callbacks\n if (!empty($this->callbacks['ItemPreperation'])) {\n foreach ($this->callbacks['ItemPreperation'] as $key => $callback) {\n $item = $callback($item);\n }\n }\n $data[] = $item;\n }\n\n $this->datatable = $this->datatablesModel->getOutputData($data, (int)$this->echo, $this->getCountAllResults(), $this->getCountFilteredResults());\n return $this;\n }", "public function fetchData()\n {\n if (null === $this->data) {\n $adaptable = $this->getAdaptable();\n if ($adaptable instanceof \\ArrayObject) {\n $this->data = $adaptable->getArrayCopy();\n } else {\n $this->data = (array) $adaptable;\n }\n\n $page = $this->getPageNumber() - 1;\n $limit = $this->getItemsPerPage();\n $this->data = array_splice($this->data, $page * $limit, $limit);\n }\n }", "function findAllOrdersDescPaginated();", "function FindAll( $orderby = \"id ASC\", $exclude=true )\n\t{\n\t\t// Let's speed up this query and exclude the blob fields... too much memory for nothing. \n\t\tif ( $exclude ) {\n\t\t\treturn MyActiveRecord::FindBySql('Items', \"SELECT id, name, display_name, content, template, display_order, sku, price, taxonomy, public, public2, date_created, date_revised FROM items ORDER BY $orderby\");\n\t\t} else {\n\t\t\treturn MyActiveRecord::FindAll('Items'); \n\t\t}\n\t}", "public function fetch(): ItemCollection\n {\n $result = $this->connection->getClient()->{$this->fetchMode}($this->toArray());\n\n return $this->processor->processItems($result);\n }", "public static function GetContent($ids, $orderby = null) {\n $logger = \\Swiftriver\\Core\\Setup::GetLogger();\n $logger->log(\"Core::Modules::DataContext::MySQL_V1::DataContext::GetContent [Method invoked]\", \\PEAR_LOG_DEBUG);\n\n //if no $orderby is sent\n if(!$orderby || $orderby == null) {\n $logger->log(\"Core::Modules::DataContext::MySQL_V1::DataContext::GetContent [No Order By clause set, setting to 'date desc']\", \\PEAR_LOG_DEBUG);\n //Set it to the default - date DESC\n $orderby = \"date desc\";\n }\n\n //set up the return array\n $content = array();\n\n //If the $ids array is blank or empty, return the empty array\n if(!isset($ids) || !is_array($ids) || count($ids) < 1) {\n $logger->log(\"Core::Modules::DataContext::MySQL_V1::DataContext::GetContent [No IDs sent to method]\", \\PEAR_LOG_DEBUG);\n $logger->log(\"Core::Modules::DataContext::MySQL_V1::DataContext::GetContent [Method finsiehd]\", \\PEAR_LOG_DEBUG);\n return $content;\n }\n\n $logger->log(\"Core::Modules::DataContext::MySQL_V1::DataContext::GetContent [START: Building the RedBean Query]\", \\PEAR_LOG_DEBUG);\n\n //set up the array to hold the ids\n $queryIds = array();\n\n //start to build the sql\n $query = \"textId in (\";\n\n /*//for each content item, add to the query and the ids array\n for($i=0; $i<count($ids); $i++) {\n $query .= \":id$i,\";\n $queryIds[\":id$i\"] = $ids[$i];\n }*/\n\n $counter = 0;\n foreach($ids as $id) {\n $query .= \":id$counter,\";\n $queryIds[\":id$counter\"] = $id;\n $counter++;\n }\n\n //tidy up the query\n $query = rtrim($query, \",\").\") order by \".$orderby;\n\n $logger->log(\"Core::Modules::DataContext::MySQL_V1::DataContext::GetContent [END: Building the RedBean Query]\", \\PEAR_LOG_DEBUG);\n\n $logger->log(\"Core::Modules::DataContext::MySQL_V1::DataContext::GetContent [START: Running RedBean Query]\", \\PEAR_LOG_DEBUG);\n\n //Get the finder\n $finder = RedBeanController::Finder();\n\n //Find the content\n $dbContent = $finder->where(\"content\", $query, $queryIds);\n\n $logger->log(\"Core::Modules::DataContext::MySQL_V1::DataContext::GetContent [FINISHED: Running RedBean Query]\", \\PEAR_LOG_DEBUG);\n\n //set up the return array\n $content = array();\n\n //set up the red bean\n $rb = RedBeanController::RedBean();\n\n $logger->log(\"Core::Modules::DataContext::MySQL_V1::DataContext::GetContent [START: Constructing Content and Source items]\", \\PEAR_LOG_DEBUG);\n\n //loop through the db content\n foreach($dbContent as $key => $dbItem) {\n //get the associated source\n $s = reset($rb->batch(\"source\", RedBeanController::GetRelatedBeans($dbItem, \"source\")));\n\n //Create the source from the db json\n $source = \\Swiftriver\\Core\\ObjectModel\\ObjectFactories\\SourceFactory::CreateSourceFromJSON($s->json);\n\n //get the json for the content\n $json = $dbItem->json;\n\n //create the content\n $item = \\Swiftriver\\Core\\ObjectModel\\ObjectFactories\\ContentFactory::CreateContent($source, $json);\n\n //add it to the array\n $content[] = $item;\n }\n\n $logger->log(\"Core::Modules::DataContext::MySQL_V1::DataContext::GetContent [END: Constructing Content and Source items]\", \\PEAR_LOG_DEBUG);\n\n $logger->log(\"Core::Modules::DataContext::MySQL_V1::DataContext::GetContent [Method finished]\", \\PEAR_LOG_DEBUG);\n\n //return the content\n return $content;\n }", "protected function _find_results() {\n\n\t\tif( $this->_page < 0 )\n\t\t{\n\t\t\tthrow new Exception(\"Invalid page - must be greater than or equal to 0.\");\n\t\t}\n\t\telseif( $this->_page_size < 1 )\n\t\t{\n\t\t\tthrow new Exception(\"Invalid page size - must be greater than or equal to 1.\");\n\t\t}\n\n\t\t$this->_playgrounds = $this->_playgrounds->limit($this->_page_size)->offset($this->_page*$this->_page_size);\n\t\t\n\t\tif( $this->sort_by_field OR\n\t\t\t$this->sort_by_direction )\n\t\t{\n\t\t\tif( ! in_array($this->sort_by_field, array('id','name','latitude','longitude')) )\n\t\t\t{\n\t\t\t\tthrow new Exception(\"Invalid sort field.\");\n\t\t\t}\n\t\t\telseif( ! in_array($this->sort_by_direction, array('asc','desc')) )\n\t\t\t{\n\t\t\t\tthrow new Exception(\"Invalid sort direction.\");\n\t\t\t}\n\t\t\t$this->_playgrounds = $this->_playgrounds->order_by($this->sort_by_field,$this->sort_by_direction);\n\t\t}\n\n\t\treturn $this->_playgrounds->find_all();\n\n\t}", "public function searchEntitiesByIds($ids)\n {\n return $this->start()->uri(\"/api/entity/search\")\n ->urlParameter(\"ids\", $ids)\n ->get()\n ->go();\n }", "public function fetchAll()\r\n {\r\n \t// get from mem if available\r\n \t$memcache = new \\Memcached();\r\n \t$memcache->addServer('localhost', 11211);\r\n \t$key = md5(catalogProductList::MEMCACHED_FETCH_ALL);\r\n \t$cache_data = $memcache->get($key);\r\n \tif ($cache_data) {\r\n \t\t$this->log->addInfo('cache hit', array(\"key\" => $key));\r\n \t\t$this->data = $cache_data;\r\n \t} else {\r\n\t\t\t$this->data = $this->client->catalogProductList($this->sessionid);\r\n\t\t\t$memcache->set($key, $this->data, 60*1);\r\n \t}\r\n }", "public function getSimpleList($ids=''){\n\n\n }", "private function get_results() {\n $cache = new SearchCache();\n\n if ($this->cache and $cache->can_cache()) {\n if (!($resultdocs = $cache->cache($this->term))) {\n $resultdocs = $this->process_results();\n //cache the results so we don't have to compute this on every page-load\n $cache->cache($this->term, $resultdocs);\n //print \"Using new results.\";\n } else {\n //There was something in the cache, so we're using that to save time\n //print \"Using cached results.\";\n } \n } else {\n //no caching :(\n //print \"Caching disabled!\";\n $resultdocs = $this->process_results();\n } \n return $resultdocs;\n }", "public function fetchAll($fetch_style = NULL, $fetch_argument = NULL, $ctor_args = array())\n {\n }", "private function getItems()\n\t{\n\t\tglobal $objPage;\n\t\t$objDatabase = \\Database::getInstance();\n\t\t\n\t\t$time = time();\n\t\t$strBegin;\n\t\t$strEnd;\n\t\t$arrArticles = array();\n\t\t\n\t\t// Create a new data Object\n\t\t$objDate = new \\Date();\n\t\t\n\t\t// Set scope of pagination\n\t\tif($this->pagination_format == 'news_year')\n\t\t{\n\t\t\t// Display current year only\n\t\t\t$strBegin = $objDate->__get('yearBegin');\n\t\t\t$strEnd = $objDate->__get('yearEnd');\n\t\t}\n\t\telseif ($this->pagination_format == 'news_month')\t\n\t\t{\n\t\t\t// Display current month only\n\t\t\t$strBegin = $objDate->__get('monthBegin');\n\t\t\t$strEnd = $objDate->__get('monthEnd');\n\t\t}\n\t\telse\n\t\t{\n\t\t\t// Display all\n\t\t}\n\t\t\n\t\t$strCustomWhere = '';\n\t\t// HOOK: allow other extensions to modify the sql WHERE clause\n\t\tif (isset($GLOBALS['TL_HOOKS']['readerpagination']['customsql_where']) && count($GLOBALS['TL_HOOKS']['readerpagination']['customsql_where']) > 0)\n\t\t{\n\t\t\tforeach($GLOBALS['TL_HOOKS']['readerpagination']['customsql_where'] as $callback)\n\t\t\t{\n\t\t\t\t$this->import($callback[0]);\n\t\t\t\t$strCustomWhere = $this->$callback[0]->$callback[1]('news',$this);\n\t\t\t}\n\t\t}\n\t\t\n\t\t// Fetch all news that fit in the scope\n\t\t$objArticlesStmt = $objDatabase->prepare(\"\n \tSELECT * FROM tl_news\n \tWHERE \n \t\tpid IN(\" . implode(',', $this->archives) . \") AND published=1 AND hide_in_pagination!=1\n \t\t\" . (!BE_USER_LOGGED_IN ? \" AND (start='' OR start<$time) AND (stop='' OR stop>$time)\" : \"\") . \"\n \t\t\" . ($strBegin ? \" AND (date>$strBegin) AND (date<$strEnd)\" : \"\" ) .\" \".$strCustomWhere. \"\n \tORDER BY date DESC\");\n\t \n\t\t$objArticles = $objArticlesStmt->execute();\n\t\t\n\t\tif ($objArticles->numRows < 1)\n\t\t{\n\t\t\treturn array();\n\t\t}\n\t\t\n\t\t// get all articles\n\t\t$arrArticles = $objArticles->fetchAllAssoc();\n\t\t\n\t\t// HOOK: allow other extensions to modify the items\n\t\tif (isset($GLOBALS['TL_HOOKS']['readerpagination']['getItems']) && count($GLOBALS['TL_HOOKS']['readerpagination']['getItems']) > 0)\n\t\t{\n\t\t\tforeach($GLOBALS['TL_HOOKS']['readerpagination']['getItems'] as $callback)\n\t\t\t{\n\t\t\t\t$this->import($callback[0]);\n\t\t\t\t$arrArticles = $this->$callback[0]->$callback[1]('news',$arrArticles,$this);\n\t\t\t}\n\t\t}\n\t\t\n\t\tif(count($arrArticles) < 1)\n\t\t{\n\t\t\treturn array();\n\t\t}\n\t\t\n\t\t// add keys for pagination (title, href)\n\t\tforeach($arrArticles as $i => $article)\n\t\t{\n\t\t\t// get alias\n \t\t$strAlias = (!$GLOBALS['TL_CONFIG']['disableAlias'] && $article['alias'] != '') ? $article['alias'] : $article['id'];\n \t\t\t\n \t\t\t$arrTmp = array\n \t\t\t(\n \t\t\t\t'href' => ampersand($this->generateFrontendUrl($objPage->row(), ((isset($GLOBALS['TL_CONFIG']['useAutoItem']) && $GLOBALS['TL_CONFIG']['useAutoItem']) ? '/' : '/items/') . $strAlias)),\n 'title' => specialchars($article['headline']),\n \t);\n \t\t\t\n \t\t\t$arrResult[] = array_merge($arrArticles[$i], $arrTmp);\n \t\t\tunset($arrTmp);\n\t\t}\n\t\t$arrArticles = $arrResult;\n\t\tunset($arrResult);\n\t\t\n\t\tif(count($arrArticles) < 1)\n\t\t{\n\t\t\treturn array();\n\t\t}\n\t\t\n\t\t// Higher the keys of the array by 1\n\t\t$arrTmp = array();\n\t\tforeach($arrArticles as $key => $value)\n\t\t{\n\t\t\t$arrTmp[$key+1] = $value;\n\t\t}\n\t\tksort($arrTmp);\n\t\t\n\t\t$arrArticles = $arrTmp;\n\t\tunset($arrTmp);\n\t\t\n\t\treturn $arrArticles;\n\t}", "private static function fetchList($listType,$displayCol, $selectedValue, $showIdle=false, $translate=true,$applyRestrictionClause=false) {\r\n//scriptLog(\"fetchList($listType,$displayCol, $selectedValue, $showIdle, $translate)\");\r\n $res=array();\r\n if (! SqlElement::class_exists($listType)) {\r\n debugTraceLog(\"WARNING : SqlElement::fetchList() called for not valid class '$listType'\");\r\n return array();\r\n }\r\n $obj=new $listType();\r\n $calculated=false;\r\n $field=$obj->getDatabaseColumnName($displayCol);\r\n if (property_exists($obj, '_calculateForColumn') and isset($obj->_calculateForColumn[$displayCol])) {\r\n \t$field=$obj->_calculateForColumn[$displayCol];\r\n \t$calculated=true;\r\n }\r\n $query=\"select \" . $obj->getDatabaseColumnName('id') . \" as id, \" . $field . \" as name from \" . $obj->getDatabaseTableName() ;\r\n if ($showIdle or !property_exists($obj, 'idle')) {\r\n $query.= \" where (1=1 \";\r\n } else {\r\n $query.= \" where (idle=0 \";\r\n }\r\n $crit=$obj->getDatabaseCriteria();\r\n foreach ($crit as $col => $val) {\r\n \tif ($obj->getDatabaseColumnName($col)=='idProject' and ($val=='*' or !$val)) {$val=0;}\r\n \tif ($val===null) {\r\n \t $query .= ' and ' . $obj->getDatabaseTableName() . '.' . $obj->getDatabaseColumnName($col) . ' IS NULL';\r\n \t} else {\r\n $query .= ' and ' . $obj->getDatabaseTableName() . '.' . $obj->getDatabaseColumnName($col) . '=' . Sql::str($val);\r\n \t}\r\n }\r\n if ($applyRestrictionClause) {\r\n \t$query.=' and '.getAccesRestrictionClause($listType,null,true);\r\n }\r\n $query .=')';\r\n if ($selectedValue) {\r\n \tif ($selectedValue!='*') {\r\n $query .= \" or \" . $obj->getDatabaseColumnName('id') .'= ' . Sql::str($selectedValue) ;\r\n \t}\r\n }\r\n if (property_exists($obj,'_sortCriteriaForList')) {\r\n $query .= ' order by ' . $obj->getDatabaseTableName() . '.'.$obj->_sortCriteriaForList;\r\n } else if (property_exists($obj,'sortOrder')) {\r\n $query .= ' order by ' . $obj->getDatabaseTableName() . '.sortOrder, ' . $obj->getDatabaseTableName() . '.' . $obj->getDatabaseColumnName($displayCol);\r\n } else if (property_exists($obj,'order')) {\r\n $query .= ' order by ' . $obj->getDatabaseTableName() . '.order, ' . $obj->getDatabaseTableName() . '.' . $obj->getDatabaseColumnName($displayCol);\r\n } else if (property_exists($obj,'baselineDate')) {\r\n $query .= ' order by ' . $obj->getDatabaseTableName() . '.baselineDate, ' . $obj->getDatabaseTableName() . '.' . $obj->getDatabaseColumnName($displayCol);\r\n } else {\r\n $query .= ' order by ' . $obj->getDatabaseTableName() . '.' . $obj->getDatabaseColumnName($displayCol);\r\n }\r\n $result=Sql::query($query);\r\n if (Sql::$lastQueryNbRows > 0) {\r\n while ($line = Sql::fetchLine($result)) {\r\n $name=$line['name'];\r\n if ($obj->isFieldTranslatable($displayCol) and $translate){\r\n \tif ($listType=='Linkable' and substr($name,0,7)=='Context') {\r\n \t\t$name=SqlList::getNameFromId('ContextType', substr($name,7,1));\r\n \t} else {\r\n $name=i18n($name);\r\n \t}\r\n }\r\n if ($displayCol=='name' and property_exists($obj,'_constructForName') and !$calculated) {\r\n \t$nameObj=new $listType($line['id'],true);\r\n \t$name=$nameObj->name;\r\n }\r\n $res[($line['id'])]=$name;\r\n }\r\n }\r\n // Plugin - start - Management for event \"list\"\r\n global $pluginAvoidRecursiveCall;\r\n if (! $pluginAvoidRecursiveCall) {\r\n $pluginAvoidRecursiveCall=true;\r\n $pluginObjectClass=$listType;\r\n $table=$res;\r\n $lstPluginEvt=Plugin::getEventScripts('list',$pluginObjectClass);\r\n foreach ($lstPluginEvt as $script) {\r\n require $script; // execute code\r\n }\r\n $res=$table;\r\n $pluginAvoidRecursiveCall=false;\r\n }\r\n // Plugin - end\r\n if ($translate) {\r\n self::$list[$listType . \"_\" . $displayCol .(($showIdle)?'_all':'')]=$res;\r\n } else {\r\n \tself::$list['no_tr_' . $listType . \"_\" . $displayCol .(($showIdle)?'_all':'')]=$res;\r\n } \r\n return $res;\r\n }", "protected function runFetch()\n\t{\n\t\tif ($this->iterate_class) {\n\t\t\treturn $this->fetchClass();\n\t\t}\n\n\t\treturn $this->fetch();\n\t}", "public function getSearchResults() {\n\t\t\n\t\t$pages = array();\n\t\n\t\tif ($query = Core\\Request::query('query')) {\n\t\t\n\t\t\t$collection = $this->Automad->getCollection();\n\t\t\n\t\t\tif (array_key_exists($query, $collection)) {\n\t\t\t\n\t\t\t\t// If $query matches an actual URL of an existing page, just get that page to be the only match in the $pages array.\n\t\t\t\t// Since $pages has only one element, the request gets directly redirected to the edit page (see below).\n\t\t\t\t$pages = array($this->Automad->getPage($query));\n\t\t\t\t\t\t\t\n\t\t\t} else {\n\t\t\t\n\t\t\t\t$Selection = new Core\\Selection($collection);\n\t\t\t\t$Selection->filterByKeywords($query);\n\t\t\t\t$Selection->sortPages(AM_KEY_MTIME . ' desc');\n\t\t\t\t$pages = $Selection->getSelection(false);\n\t\t\t\n\t\t\t}\n\t\n\t\t\t// Redirect to edit mode for a single result or in case $query represents an actually existing URL.\n\t\t\tif (count($pages) == 1) {\n\t\t\t\t$Page = reset($pages);\n\t\t\t\theader('Location: ' . AM_BASE_INDEX . AM_PAGE_DASHBOARD . '?context=edit_page&url=' . urlencode($Page->origUrl));\n\t\t\t\tdie;\t\n\t\t\t}\n\t\t\n\t\t}\n\t\t\n\t\treturn $pages;\n\t\t\n\t}", "protected function _executeGetList() {\n // Init\n $list = array();\n\n $pid = (int)$this->_postVar['pid'];\n $offset = (int)$this->_postVar['start'];\n $limit = (int)$this->_postVar['limit'];\n $itemsPerPage = (int)$this->_postVar['pagingSize'];\n $depth = (int)$this->_postVar['depth'];\n $sysLanguage = (int)$this->_postVar['sysLanguage'];\n $listType = (string)$this->_postVar['listType'];\n\n // Store last selected language\n $GLOBALS['BE_USER']->setAndSaveSessionData('TQSeo.sysLanguage', $sysLanguage);\n\n if (!empty($pid)) {\n $page = \\TYPO3\\CMS\\Backend\\Utility\\BackendUtility::getRecord('pages', $pid);\n\n $fieldList = array();\n\n switch ($listType) {\n case 'metadata':\n $fieldList = array_merge(\n $fieldList,\n array(\n 'keywords',\n 'description',\n 'abstract',\n 'author',\n 'author_email',\n 'lastupdated',\n )\n );\n\n $list = $this->_listDefaultTree($page, $depth, $fieldList, $sysLanguage);\n\n unset($row);\n foreach ($list as &$row) {\n if (!empty($row['lastupdated'])) {\n $row['lastupdated'] = date('Y-m-d', $row['lastupdated']);\n } else {\n $row['lastupdated'] = '';\n }\n }\n unset($row);\n break;\n\n case 'geo':\n $fieldList = array_merge(\n $fieldList,\n array(\n 'tx_tqseo_geo_lat',\n 'tx_tqseo_geo_long',\n 'tx_tqseo_geo_place',\n 'tx_tqseo_geo_region'\n )\n );\n\n $list = $this->_listDefaultTree($page, $depth, $fieldList, $sysLanguage);\n break;\n\n case 'searchengines':\n $fieldList = array_merge(\n $fieldList,\n array(\n 'tx_tqseo_canonicalurl',\n 'tx_tqseo_is_exclude',\n 'tx_tqseo_priority',\n )\n );\n\n $list = $this->_listDefaultTree($page, $depth, $fieldList, $sysLanguage);\n break;\n\n case 'url':\n $fieldList = array_merge(\n $fieldList,\n array(\n 'title',\n 'url_scheme',\n 'alias',\n 'tx_realurl_pathsegment',\n 'tx_realurl_pathoverride',\n 'tx_realurl_exclude',\n )\n );\n\n $list = $this->_listDefaultTree($page, $depth, $fieldList, $sysLanguage);\n break;\n\n case 'pagetitle':\n $fieldList = array_merge(\n $fieldList,\n array(\n 'tx_tqseo_pagetitle',\n 'tx_tqseo_pagetitle_rel',\n 'tx_tqseo_pagetitle_prefix',\n 'tx_tqseo_pagetitle_suffix',\n )\n );\n\n $list = $this->_listDefaultTree($page, $depth, $fieldList, $sysLanguage);\n break;\n\n case 'pagetitlesim':\n $buildTree = FALSE;\n $list = $this->_listPageTitleSim($page, $depth, $sysLanguage);\n break;\n\n default:\n // Not defined\n return;\n break;\n }\n }\n\n $ret = array(\n 'results' => count($list),\n 'rows' => array_values($list),\n );\n\n return $ret;\n }", "public function fetchList($where=null, $order=null, $count=null, $offset=null)\n {\n $resultSet = $this->getDbTable()->fetchAll($where, $order, $count, $offset);\n $entries = array();\n foreach ($resultSet as $row)\n {\n $entry = new Petolio_Model_PoProducts();\n $entry->setId($row->id)\n ->setUserId($row->user_id)\n ->setAttributeSetId($row->attribute_set_id)\n ->setDateCreated($row->date_created)\n ->setDateModified($row->date_modified)\n\t\t\t\t\t\t\t->setFlagged($row->flagged)\n\t\t\t\t\t\t\t->setGpsLatitude($row->gps_latitude)\n\t\t\t\t\t\t\t->setGpsLongitude($row->gps_longitude)\n\t\t\t\t\t\t\t->setFolderId($row->folder_id)\n\t\t\t\t\t\t\t->setPrimaryCurrencyId($row->primary_currency_id)\n\t\t\t\t\t\t\t->setLinks($row->links)\n\t\t\t\t\t\t\t->setViews($row->views)\n ->setArchived($row->archived)\n ->setMapper($this);\n\n $entries[] = $entry;\n }\n return $entries;\n }", "public function findAllEntities();", "public function get_multiple()\n\t{\n\t\t$options = array_merge(array(\n\t\t\t'offset' => 0,\n\t\t\t'limit' => 20,\n\t\t\t'sort_by' => 'name',\n\t\t\t'order' => 'ASC'\n\t\t), Input::all(), $this->options);\n\n\t\t// Preparing our query\n\t\t$results = $this->model->with($this->includes);\n\n\t\tif(count($this->join) > 0)\n\t\t{\n\t\t\tforeach ($this->join as $table => $settings) {\n\t\t\t\t$results = $results->join($table, $settings['join'][0], $settings['join'][1], $settings['join'][2]);\n\t\t\t\tif($settings['columns'])\n\t\t\t\t{\n\t\t\t\t\t$options['sort_by'] = (in_array($options['sort_by'], $settings['columns']) ? $table : $this->model->table()).'.'.$options['sort_by'];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\tif(stripos($options['sort_by'], '.') === 0)\n\t\t{\n\t\t\t$options['sort_by'] = $this->model->table().'.' . $options['sort_by'];\n\t\t}\n\t\t\n\t\t// Add where's to our query\n\t\tif(array_key_exists('search', $options))\n\t\t{\n\t\t\tforeach($options['search']['columns'] as $column)\n\t\t\t{\n\t\t\t\t$results = $results->or_where($column, '~*', $options['search']['string']);\n\t\t\t}\n\t\t}\n\n\t\t$total = (int) $results->count();\n\n\t\t// Add order_by, skip & take to our results query\n\t\t$results = $results->order_by($options['sort_by'], $options['order'])->skip($options['offset'])->take($options['limit'])->get();\n\n\t\t$response = array(\n\t\t\t'results' => to_array($results),\n\t\t\t'total' => $total,\n\t\t\t'pages' => ceil($total / $options['limit'])\n\t\t);\n\n\t\treturn Response::json($response);\n\t}", "abstract public function retrieveCollection(array $identifiers = []): array;", "public function execute_and_get_ids()\n {\n }", "public function fetchLazy()\n {\n return $this->query->select(\n $this->filter,\n $this->order,\n null,\n $this->limitOffset,\n PDO::FETCH_CLASS,\n true\n );\n }", "public static function retrieveAll(){\n\n $myDataAccess = aContentAreaDataAccess::getInstance();\n\n $myDataAccess->connectToDB();\n\n $myDataAccess->selectDivs();\n\n $numberOfRecords = 0;\n\n while($row = $myDataAccess->fetchDivs())\n {\n $currentDiv = new self(\n $myDataAccess->fetchAlias($row),\n //$myDataAccess->fetchCreated($row),\n //$myDataAccess->fetchCreatedBy($row),\n $myDataAccess->fetchDescription($row),\n $myDataAccess->fetchDivId($row),\n $myDataAccess->fetchDivOrder($row),\n //$myDataAccess->fetchLastModified($row),\n //$myDataAccess->fetchModifiedBy($row),\n $myDataAccess->fetchName($row)\n );\n\n $arrayOfDivs[] = $currentDiv;\n\n }\n\n $myDataAccess->closeDB();\n\n return $arrayOfDivs;\n }", "public function getData()\n {\n $listData = $this->classPathBase::search($this->search)\n ->when($this->sortField, function ($query) {\n $query->orderBy($this->sortField, $this->sortAsc ? 'asc' : 'desc');\n })->paginate($this->itemsPerPage);\n\n if (method_exists($this, 'filterData')) {\n return $this->filterData($listData);\n }\n\n return $listData;\n }", "public function fetchAll($fetchStyle= null);", "public function getResultList()\n {\n /* @var $pager \\Sys25\\RnBase\\Backend\\Utility\\BEPager */\n $pager = $this->usePager() ? \\TYPO3\\CMS\\Core\\Utility\\GeneralUtility::makeInstance(\n \\Sys25\\RnBase\\Backend\\Utility\\BEPager::class,\n $this->getSearcherId().'Pager',\n $this->getModule()->getName(),\n // @TODO: die PageId solle noch konfigurierbar gemacht werden.\n $pid = 0\n ) : null;\n\n list($fields, $options) = $this->getFieldsAndOptions();\n\n // Get counted data\n $cnt = $this->getCount($fields, $options);\n\n if ($pager) {\n $pager->setListSize($cnt);\n $pager->setOptions($options);\n }\n\n // Get data\n $search = $this->searchItems($fields, $options);\n $items = &$search['items'];\n $content = '';\n $this->showItems($content, $items, ['items_map' => $search['map']]);\n\n $data = [\n 'table' => $content,\n 'totalsize' => $cnt,\n 'items' => $items,\n ];\n\n if ($pager) {\n $pagerData = $pager->render();\n\n // der zusammengeführte Pager für die Ausgabe\n // nur wenn es auch Ergebnisse gibt. sonst reicht die noItemsFoundMsg\n $sPagerData = '';\n if ($cnt) {\n $sPagerData = $pagerData['limits'].' - '.$pagerData['pages'];\n }\n $data['pager'] = '<div class=\"pager\">'.$sPagerData.'</div>';\n }\n\n return $data;\n }", "function fetch_records($dont_get_more = false)\n\t{\n\t\t//echo $this->sql.'<br>';\n\t\t$recs = db_getAll($this->sql, $this->use_db);\n\t\tif ($recs === false) return array();\n\n\t\t$res = array();\n\t\t$single_el = new $this->single_element_class;\n\t\tforeach ($recs as $rec) {\n\t\t\t$single_el->from_raw($rec);\n\t\t\t$res[] = $single_el->to_array($dont_get_more);\n\t\t}\n\t\treturn $res;\n\t}", "public function fetchCollection($criteria = null);", "protected function actionList() {\n $strReturn = \"\";\n\n //Determin the prev_id to load\n if(!validateSystemid($this->getSystemid()) || !$this->checkIfRequestedIdIsInElementsTree()) {\n $this->setSystemid($this->arrElementData[\"repo_id\"]);\n }\n\n $bitPageview = false;\n //load using the pageview?\n $arrPagerContent = array();\n if($this->arrElementData[\"repo_elementsperpage\"] > 0) {\n $bitPageview = true;\n $objArraySectionIterator = new class_array_section_iterator($this->getNumberOfEntriesOnLevel());\n $objArraySectionIterator->setIntElementsPerPage($this->arrElementData[\"repo_elementsperpage\"]);\n $objArraySectionIterator->setPageNumber($this->getParam(\"pv\"));\n $objArraySectionIterator->setArraySection($this->getArrFiles($objArraySectionIterator->calculateStartPos(), $objArraySectionIterator->calculateEndPos()));\n\n $arrPagerContent = $this->objToolkit->simplePager(\n $objArraySectionIterator,\n $this->getLang(\"commons_next\"),\n $this->getLang(\"commons_back\"),\n $this->getParam(\"action\"),\n $this->getPagename(),\n \"&systemid=\".$this->getSystemid()\n );\n $arrFiles = $arrPagerContent[\"arrData\"];\n }\n else {\n //Load all Images & Folder\n $arrFiles = $this->getArrFiles(null, null);\n }\n\n //Loop over every item and collect them\n $arrWrappingTemplate = array();\n $arrWrappingTemplate[\"systemid\"] = $this->arrElementData[\"content_id\"];\n\n $arrWrappingTemplate[\"folderlist\"] = \"\";\n $arrWrappingTemplate[\"filelist\"] = \"\";\n\n if(count($arrFiles) > 0) {\n $intFileCounter = 0;\n\n $arrRemainingFiles = array();\n\n //calc number of images outside the loop\n $intNrOfFilesPerRow = $this->getFilesPerRow($this->arrElementData[\"repo_template\"]);\n\n foreach($arrFiles as $objOneFile) {\n //Check rights and the existance of placeholders\n if($intNrOfFilesPerRow > 0 && $objOneFile->rightView()) {\n //Folder or file?\n\n //file\n if($objOneFile->getIntType() == class_module_mediamanager_file::$INT_TYPE_FILE) {\n $arrFileTemplate = array();\n\n //check, if it's an image\n $strSuffix = uniStrtolower(uniSubstr($objOneFile->getStrFilename(), uniStrrpos($objOneFile->getStrFilename(), \".\")));\n if(in_array($strSuffix, $this->arrImageTypes) && isset($this->arrElementData[\"gallery_maxh_d\"]) && isset($this->arrElementData[\"gallery_maxw_d\"])) {\n //provide image placeholders\n $arrFileTemplate[\"image_detail_src\"] = $this->getImageUrl(\n $objOneFile->getStrFilename(), \n $this->arrElementData[\"gallery_maxh_d\"], \n $this->arrElementData[\"gallery_maxw_d\"], \n $this->arrElementData[\"gallery_text\"],\n $this->arrElementData[\"gallery_overlay\"],\n $objOneFile->getSystemid(),\n $this->arrElementData[\"content_id\"]\n );\n }\n\n $arrFileTemplate[\"file_id\"] = $objOneFile->getStrSystemid();\n $arrFileTemplate[\"file_name\"] = $objOneFile->getStrName();\n $arrFileTemplate[\"file_filename\"] = $objOneFile->getStrFilename();\n $arrFileTemplate[\"file_subtitle\"] = $objOneFile->getStrSubtitle();\n $arrFileTemplate[\"file_description\"] = $objOneFile->getStrDescription();\n $arrFileTemplate[\"file_size\"] = bytesToString($objOneFile->getIntFileSize());\n $arrFileTemplate[\"file_hits\"] = $objOneFile->getIntHits();\n $arrFileTemplate[\"file_lmtime\"] = timeToString(filemtime(_realpath_.$objOneFile->getStrFilename()));\n if(validateSystemid($objOneFile->getOwnerId())) {\n $objUser = new class_module_user_user($objOneFile->getOwnerId());\n $arrFileTemplate[\"file_owner\"] = $objUser->getStrUsername();\n }\n\n if($objOneFile->rightRight2()) {\n $arrFileTemplate[\"file_link_href\"] = _webpath_.\"/download.php?systemid=\".$objOneFile->getSystemid();\n $arrFileTemplate[\"file_link\"] = \"<a href=\\\"\"._webpath_.\"/download.php?systemid=\".$objOneFile->getSystemid().\"\\\">\".$this->getLang(\"download_link\").\"</a>\";\n }\n $this->fileListTemplateHook($objOneFile, $arrFileTemplate);\n\n //ratings available?\n if($objOneFile->getFloatRating() !== null) {\n /** @var $objRating class_module_rating_portal */\n $objRating = class_module_system_module::getModuleByName(\"rating\")->getPortalInstanceOfConcreteModule();\n $arrFileTemplate[\"file_rating\"] = $objRating->buildRatingBar(\n $objOneFile->getFloatRating(),\n $objOneFile->getIntRatingHits(),\n $objOneFile->getSystemid(),\n $objOneFile->isRateableByUser(),\n $objOneFile->rightRight3()\n );\n }\n\n $arrFileTemplate[\"file_details_href\"] = getLinkPortalHref($this->getPagename(), \"\", \"fileDetails\", \"\", $objOneFile->getSystemid(), $this->getStrPortalLanguage(), $objOneFile->getStrName());\n\n //render the single file\n $strTemplateID = $this->objTemplate->readTemplate(\"/module_mediamanager/\".$this->arrElementData[\"repo_template\"], \"filelist_file\");\n $strCurrentImage = $this->objTemplate->fillTemplate($arrFileTemplate, $strTemplateID);\n $arrRemainingFiles[\"file_\".$intFileCounter % $intNrOfFilesPerRow] = $strCurrentImage;\n\n //already rendered enough files?\n if(count($arrRemainingFiles) == $intNrOfFilesPerRow) {\n $strTemplateID = $this->objTemplate->readTemplate(\"/module_mediamanager/\".$this->arrElementData[\"repo_template\"], \"filelist\");\n $arrWrappingTemplate[\"filelist\"] .= $this->objTemplate->fillTemplate($arrRemainingFiles, $strTemplateID);\n $arrRemainingFiles = array();\n }\n\n $intFileCounter++;\n\n }\n\n //Folder\n if($objOneFile->getIntType() == class_module_mediamanager_file::$INT_TYPE_FOLDER) {\n $arrFolder = array();\n $arrFolder[\"folder_id\"] = $objOneFile->getSystemid();\n $arrFolder[\"folder_name\"] = $objOneFile->getStrName();\n $arrFolder[\"folder_description\"] = $objOneFile->getStrDescription();\n $arrFolder[\"folder_subtitle\"] = $objOneFile->getStrSubtitle();\n $arrFolder[\"folder_href\"] = getLinkPortalHref($this->getPagename(), \"\", \"mediaFolder\", \"\", $objOneFile->getSystemid(), \"\", $objOneFile->getStrName());\n\n $objFirstFile = $this->getFirstFileInFolder($objOneFile->getSystemid());\n if($objFirstFile != null) {\n $strSuffix = uniStrtolower(uniSubstr($objFirstFile->getStrFilename(), uniStrrpos($objFirstFile->getStrFilename(), \".\")));\n if(in_array($strSuffix, array(\".jpg\", \".jpeg\", \".gif\", \".png\"))) {\n //provide image placeholders\n $arrFolder[\"folder_preview_image_src\"] = $objFirstFile->getStrFilename();\n }\n }\n\n $strTemplateFolderID = $this->objTemplate->readTemplate(\"/module_mediamanager/\".$this->arrElementData[\"repo_template\"], \"folderlist\");\n $strTemplateFolderPreviewID = $this->objTemplate->readTemplate(\"/module_mediamanager/\".$this->arrElementData[\"repo_template\"], \"folderlist_preview\");\n\n $arrWrappingTemplate[\"folderlist\"] .= $this->objTemplate->fillTemplate(\n $arrFolder, \n (isset($arrFolder[\"folder_preview_image_src\"]) && $this->objTemplate->isValidTemplate($strTemplateFolderPreviewID) ? $strTemplateFolderPreviewID : $strTemplateFolderID),\n false\n );\n\n }\n }\n }\n //Print remaining files\n if(count($arrRemainingFiles) > 0) {\n $strTemplateID = $this->objTemplate->readTemplate(\"/module_mediamanager/\".$this->arrElementData[\"repo_template\"], \"filelist\");\n $arrWrappingTemplate[\"filelist\"] .= $this->objTemplate->fillTemplate($arrRemainingFiles, $strTemplateID, false);\n }\n }\n else\n $strReturn = $this->getLang(\"commons_list_empty\");\n\n //and load the sourrounding template\n if($bitPageview) {\n $arrWrappingTemplate[\"link_forward\"] = $arrPagerContent[\"strForward\"];\n $arrWrappingTemplate[\"link_pages\"] = $arrPagerContent[\"strPages\"];\n $arrWrappingTemplate[\"link_back\"] = $arrPagerContent[\"strBack\"];\n }\n $strTemplateID = $this->objTemplate->readTemplate(\"/module_mediamanager/\".$this->arrElementData[\"repo_template\"], \"list\");\n $arrWrappingTemplate[\"pathnavigation\"] = $this->generatePathnavi();\n $strReturn .= $this->fillTemplate($arrWrappingTemplate, $strTemplateID);\n\n $strReturn = $this->addPortaleditorCode($strReturn);\n return $strReturn;\n }", "public function getMany(array $params = null, \n $resultType = self::RESULT_TYPE_OBJECT) \n { \n $hasJoins = false;\n \n /*\n * Fields \n */\n if(!isset($params['fields'])){\n //$params['fields'] = array('id');\n $params['fields'] = $this->_metaData->getColumnNames();\n }\n if(!is_array($params['fields'])){\n throw new Exception(array(\n 'prop' => '@dataTypeNoArray', \n 'extend' => 'Verify \"fields\" parameter' ));\n } \n $props = $this->_verifyProps($params['fields'], true);\n $hasJoins = isset($props[count($props) - 1])? false : true;\n\n /*\n * OrderBy\n */\n $orderProps = null;\n if(isset($params['orderBy'])){\n if(!is_array($params['orderBy'])){\n throw new Exception(array(\n 'prop' => '@dataTypeNoArray', \n 'extend' => 'Verify \"orderBy\" parameter' ));\n }\n $orderProps = $this->_verifyKeyProps($params['orderBy']);\n foreach($orderProps as $key => $value){\n //no permito que existan orderBY con associations, da errores con el paginado\n if(strpos($key, '.') !== false){\n throw new Exception(array(\n 'prop' => '@assocPropNotAllowed', \n 'extend' => 'Verify property: ' . $key));\n }\n $hasJoins |= strpos($key, '.') !== false;\n }\n }\n \n /*\n * FindBy\n */ \n $whereParsed = null;\n if(isset($params['findBy'])){\n if(!is_string($params['findBy'])){\n throw new Exception(array(\n 'prop' => '@dataTypeNoString', \n 'extend' => 'Verify \"findBy\" parameter' ));\n }\n $whereParsed = $this->_parseFindBy($params['findBy']);\n for($i = 0; $i < count($whereParsed); $i++){\n $hasJoins |= strpos($whereParsed[$i]['prop'], '.') !== false;\n } \n }\n \n $dql = $this->_createGetDQL($props, $orderProps, $whereParsed);\n $query = $this->_em->createQuery($dql);\n\n /*\n * Paginated\n */ \n $query->setMaxResults(self::QUERY_LIMIT_DEFAULT);\n if(isset($params['paginated'])){\n if(isset($params['paginated']['offset'])){\n $query->setFirstResult($params['paginated']['offset']);\n }\n if(isset($params['paginated']['limit'])){\n $query->setMaxResults($params['paginated']['limit']);\n }\n }\n $query->setHydrationMode(\n ($resultType == self::RESULT_TYPE_ARRAY)?\n \\Doctrine\\ORM\\AbstractQuery::HYDRATE_ARRAY:\n \\Doctrine\\ORM\\AbstractQuery::HYDRATE_OBJECT);\n $paginator = new \\Doctrine\\ORM\\Tools\\Pagination\\Paginator($query, (bool)$hasJoins);\n $result = (array) $paginator->getIterator();\n if(empty($result)){\n $result = null;\n }\n \n return $result; \n }", "function retrieveAll ()\n {\n\n $q = Doctrine_Query::create ()\n ->from ( 'MtnPriceListComponent mplc' )\n ->innerJoin ( 'mplc.MtnComponent mc' )\n ->innerJoin ( 'mplc.MtnPriceList mpl' );\n\n\n return $q->execute ();\n }", "public function fetchRecords() {\n return self::all();\n }", "public function fetch()\n {\n return $this->query->select(\n $this->filter,\n $this->order,\n null,\n $this->limitOffset,\n PDO::FETCH_CLASS\n );\n }", "public function getFetch()\n {\n return $this->get(self::_FETCH);\n }", "private function _get_records($tag_ids, $page_size, $offset, $sort_field, $sort_direction, $search_type, $include_albums) {\n\n $items_model = ORM::factory(\"item\");\n if ($search_type == \"AND\") {\n // For some reason, if I do 'select(\"*\")' the item ids all have values that are 1000+\n // higher then they should be. So instead, I'm manually selecting each column that I need.\n $items_model->select(\"items.id\");\n $items_model->select(\"items.name\");\n $items_model->select(\"items.title\");\n $items_model->select(\"items.view_count\");\n $items_model->select(\"items.owner_id\");\n $items_model->select(\"items.rand_key\");\n $items_model->select(\"items.type\");\n $items_model->select(\"items.thumb_width\");\n $items_model->select(\"items.thumb_height\");\n $items_model->select(\"items.left_ptr\");\n $items_model->select(\"items.right_ptr\");\n $items_model->select(\"items.relative_path_cache\");\n $items_model->select(\"items.relative_url_cache\");\n $items_model->select('COUNT(\"*\") AS result_count');\n }\n $items_model->viewable();\n $items_model->join(\"items_tags\", \"items.id\", \"items_tags.item_id\");\t\t\n $items_model->open();\n $items_model->where(\"items_tags.tag_id\", \"=\", $tag_ids[0]);\n $counter = 1;\n while ($counter < count($tag_ids)) {\n $items_model->or_where(\"items_tags.tag_id\", \"=\", $tag_ids[$counter]);\n $counter++;\n }\n $items_model->close();\n if ($include_albums == false) {\n $items_model->and_where(\"items.type\", \"!=\", \"album\");\n }\n $items_model->order_by($sort_field, $sort_direction);\n $items_model->group_by(\"items.id\");\n if ($search_type == \"AND\") {\n $items_model->having(\"result_count\", \"=\", count($tag_ids));\n }\n\n return $items_model->find_all($page_size, $offset);\n }", "public function findEntities($params) {\r\n\t\t$allResults = array();\r\n\t\r\n\t\tprint_r($params);\r\n\r\n\t\t//\techo 'POSTDATA:'; print_r($params);\techo '\\n';\r\n\t\r\n\t\tif (!$result = $this->sendRequest('GET', $params)) {\r\n\t\t\t\r\n\t\t\techo \"\\nERROR FETCHING NEW DATA\";\r\n\t\t\techo \"\\nPROCEEDING TO PROCESSING EXISTING DATA\";\r\n\t\r\n\t\t} else if ($result && intval($result['status']) == 200 && count($data = json_decode($result['body'])) > 0) {\r\n\t\t\t\t\t\r\n\t\t\tfor ($j = 0; $j < count($data); $j++) {\r\n\t\t\t\tarray_push($allResults, $data[$j]);\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\techo \"Retrieved \" . count($allResults) . \" records\\n\";\r\n\t\treturn $allResults;\r\n\t}", "public function fetchAll()\n {\n $products = product::with('brand')->paginate(8);\n return productResource::collection($products);\n }", "function fetch() {\n\t\t$this->i++;\n\t\treturn $this->result->fetch_object($this->class_name);\n\t}", "public function fetchAll()\n {\n return Accessory::paginate(25);\n }", "public function fetchAll()\n {\n return new QueryResult(\n $this->execute()->fetchAll(PDO::FETCH_ASSOC),\n $this->entity\n );\n }", "public function showEntities()\n {\n return Entity::paginate(10);\n }", "public function getEntities()\n {\n return $this->getRepository()->findBy([], ['discipline' => 'ASC']);\n }", "public function fetch($id);", "public function fetch($id);", "function fetchRelatedContentObjects( &$contentObjectAttribute )\n {\n $object = $this->objectAttributeContent( $contentObjectAttribute );\n /*object now contains a hash with an array inside id_list*/\n if ( $object )\n {\n $contentobjects=array();\n foreach($object['id_list'] as $id)\n {\n $contentobject=eZContentObject::fetch($id);\n array_push($contentobjects, $contentobject);\n }\n return $contentobjects;\n }\n return false;\n\n }", "public function fetchObjects($startRow = 0, $endRow = 100, $whstr = '', $whparam = NULL, $orderby = array(), JoinTb $joinedTable = NULL)\n {\n\n $em = $this->entityManager;\n\n $qb = $em->createQueryBuilder();\n if (!isset($joinedTable)) {\n $qb->add('select', 'tmp')\n ->add('from', get_class($this) . ' tmp')\n ->setFirstResult($startRow)\n ->setMaxResults($endRow - $startRow);\n } else {\n $subquery = $em->createQueryBuilder();\n $subquery\n ->select('TBIDS.id')\n ->from($joinedTable->getClass(), 'tmp1')\n ->innerJoin('tmp1.' . $joinedTable->getProp(), 'TBIDS');\n $jointbwhstr = $joinedTable->getWhereString();\n $jointbwhparam = $joinedTable->getWhereParam();\n\n if (isset($jointbwhstr)) {\n $subquery->add('where', $joinedTable->getWhereString());\n if (isset($jointbwhparam))\n $subquery->setParameters($joinedTable->getWhereParam());\n\n $qb->add('select', 'tmp')\n ->add('from', get_class($this) . ' tmp')\n ->setFirstResult($startRow)\n ->setMaxResults($endRow - $startRow);\n\n $qb->add('where', 'tmp.id in (' . $subquery->getDQL() . ')');\n $qb->setParameters($subquery->getParameters());\n }\n }\n\n $tmp = 0;\n\n foreach ($orderby as $fn => $kn)\n if ($tmp == 0) {\n $qb->orderBy('tmp.' . $fn, $kn);\n $tmp = 1;\n } else\n $qb->addOrderBy('tmp.' . $fn, $kn);\n\n if (isset($joinedTable)) {\n if ($whstr != '') {\n $qb->andWhere($whstr . ' and tmp.IsDeleted = 0 ');\n if (isset($whparam)) $qb->setParameters($whparam);\n } else {\n $qb->andWhere('tmp.IsDeleted = 0');\n }\n } else\n if ($whstr != '') {\n $qb->add('where', $whstr . ' and tmp.IsDeleted = 0 ');\n if (isset($whparam)) $qb->setParameters($whparam);\n } else\n $qb->add('where', 'tmp.IsDeleted =0');\n\n $query = $qb->getQuery();\n\n\n//\t\tvar_dump($qb->getQuery()->getSQL());\n//\t\tvar_dump($whparam);\n//\t\tvar_dump($whstr); die;\n $jointbhelpfieldtype = NULL;\n if (isset($joinedTable)) $jointbhelpfieldtype = $joinedTable->getHelpFieldType();\n\n $results = $query->getResult();\n if (isset($joinedTable))\n if (isset($jointbhelpfieldtype))\n foreach ($results as $r) {\n switch ($joinedTable->getHelpFieldType()) {\n case 'Value':\n $r->HelpField = $joinedTable->getHelpField();\n break;\n case 'function':\n /**\n *\n *TODO: Complete this section for\n *Make instance of function and call it\n *HelpField=function($r);\n */\n break;\n\n\n }\n\n }\n\n\n /*\n $qb = $em->createQueryBuilder();\n if(!isset($joinedTable)){\n $qb->add('select', 'count(tmp.id)')\n ->add('from', get_class($this).' tmp');\n }else {\n $qb\t->select('count(tmp.id)')\n ->from($joinedTable['Class'],' tmp1')\n ->innerJoin('tmp1.'.$joinedTable['Prop'],'tmp');\n }\n\n if(isset($joinedTable))\n {\n if($whstr!=''){\n $qb->andWhere($whstr.' and tmp.IsDeleted = 0 ');\n if(isset($whparam)) $qb->setParameters($whparam);\n }\n else\n {\n $qb->andWhere('tmp.IsDeleted = 0');\n }\n }else\n if($whstr!='') {\n $qb->add('where',$whstr.' and tmp.IsDeleted = 0 ');\n if(isset($whparam))$qb->setParameters($whparam);\n }\n else\n $qb->add('where','tmp.IsDeleted =0');\n */\n\n /*\n if($whstr!='') {\n $qb->add('where',$whstr.' and tmp.IsDeleted = 0 ');\n $qb->setParameters($whparam);\n } else\n $qb->add('where','tmp.IsDeleted =0');\n */\n\n //get Total Rows\n $qb1 = $em->createQueryBuilder();\n if (!isset($joinedTable)) {\n $qb1->add('select', 'count(tmp.id)')\n ->add('from', get_class($this) . ' tmp');\n } else {\n $subquery = $em->createQueryBuilder();\n $subquery\n ->select('TBIDS.id')\n ->from($joinedTable->getClass(), 'tmp1')\n ->innerJoin('tmp1.' . $joinedTable->getProp(), 'TBIDS');\n $jointbwhstr = $joinedTable->getWhereString();\n $jointbwhparam = $joinedTable->getWhereParam();\n\n if (isset($jointbwhstr)) {\n $subquery->add('where', $joinedTable->getWhereString());\n if (isset($jointbwhparam))\n $subquery->setParameters($joinedTable->getWhereParam());\n\n $qb1->add('select', 'count(tmp.id)')\n ->add('from', get_class($this) . ' tmp');\n\n $qb1->add('where', 'tmp.id in (' . $subquery->getDQL() . ')');\n $qb1->setParameters($subquery->getParameters());\n }\n }\n if (isset($joinedTable)) {\n if ($whstr != '') {\n $qb1->andWhere($whstr . ' and tmp.IsDeleted = 0 ');\n if (isset($whparam)) $qb1->setParameters($whparam);\n } else {\n $qb1->andWhere('tmp.IsDeleted = 0');\n }\n } else\n if ($whstr != '') {\n $qb1->add('where', $whstr . ' and tmp.IsDeleted = 0 ');\n if (isset($whparam)) $qb1->setParameters($whparam);\n } else\n $qb1->add('where', 'tmp.IsDeleted =0');\n $dql = $qb1->getQuery();\n\n $tmptest = $dql->getResult();\n $totalRows = $tmptest[0][1];\n\n return array('totalRows' => $totalRows, 'results' => $results);\n }", "public function fetchAll()\n {\n }", "public function findForList()\n {\n return $this->findByShowInOverview(true);\n }", "public function getData(): iterable\n {\n $query = CodePoolSchema::query();\n\n if ($this->searchTerm) {\n $query->whereIn('id', CodePoolSchema::search(\"%{$this->searchTerm}%\")->keys());\n }\n\n $filters = collect($this->queryStringFilters)->filter(function ($value) {\n return (bool) $value;\n });\n\n foreach ($this->queryExtenders as $qe) {\n call_user_func($qe, $query, $this->searchTerm, $filters);\n }\n\n // Get the table filters we want to apply.\n $tableFilters = $this->getFilters()->filter(function ($filter) use ($filters) {\n return $filters->has($filter->field);\n });\n\n foreach ($tableFilters as $filter) {\n call_user_func($filter->getQuery(), $filters, $query);\n }\n\n return $query->paginate($this->perPage);\n }", "public static function fetchList(array $cond=array(), $limit = null, $sortBy = null, $asObject = true)\n { \n $list = eZPersistentObject::fetchObjectList( \n self::definition(), null, $cond, $sortBy, $limit, $asObject \n );\n return $list;\n }", "public function fetchAll()\r\n {\r\n $sql = new Sql($this->dbAdapter);\r\n $select = $sql->select();\r\n $select\r\n ->from(array('a_s' => $this->table))\r\n ->order('a_s.sector_order ASC');\r\n \r\n $selectString = $sql->getSqlStringForSqlObject($select);\r\n $execute = $this->dbAdapter->query($selectString, Adapter::QUERY_MODE_EXECUTE);\r\n $result = $execute->toArray();\r\n return $result;\r\n }", "public function read()\n {\n $query = $this->queryBuilder->new($this->entityName)\n ->select()\n ->get();\n\n return $this->executeQueryForMultipleResults($query);\n }", "public function fetch(array $components = []);", "public function getByIds(array $ids);", "public function get_all ();", "public function fetchAll()\n {\n $objectArray = [];\n while($fetchedObject = $this->fetch())\n {\n $objectArray[] = $fetchedObject;\n }\n\n return $objectArray;\n }", "public function fetch(array $cids);", "protected function getEntities() {\n $query = $this->getStorage()->getQuery();\n $keys = $this->entityType->getKeys();\n\n $query->condition($keys['bundle'], $this->bundle)\n ->sort($keys['id']);\n\n $bundle = $this->entityManager->getStorage($this->entityType->getBundleEntityType())\n ->load($this->bundle);\n\n $pager_settings = $bundle->getPagerSettings();\n if (!empty($pager_settings['page_parameter']) && !empty($pager_settings['page_size_parameter'])) {\n $query->pager($pager_settings['default_limit']);\n }\n\n return $this->getStorage()->getResultEntities($query->execute());\n }", "public function testFetchEntities() {\n\t\t// find('all') with entitiy => true.\n\t\t$result = $this->Post->entities();\n\t\t$this->assertTrue(is_array($result));\n\t\t$this->assertEqual(count($result), 3);\n\t\t$this->assertTrue(is_a($result[0], 'PostEntity'));\n\t\t$this->assertEqual($result[2]->title, 'again');\n\n\t\t// 2. allEntities is alias for entities.\n\n\t\t$result = $this->Post->allEntities();\n\t\t$this->assertTrue(is_array($result));\n\t\t$this->assertEqual(count($result), 3);\n\t\t$this->assertTrue(is_a($result[0], 'PostEntity'));\n\t\t$this->assertEqual($result[2]->title, 'again');\n\t}", "public function getItems() {\n\n $store = $this->getStoreId();\n $app = JFactory::getApplication();\n $limit = $app->get('list_limit');\n // Try to load the data from internal storage.\n if (isset($this->cache[$store])) {\n return $this->cache[$store];\n }\n $query = $this->getListQuery();\n $this->query = $query;\n\n $db = JFactory::getDbo();\n $db->setQuery($query, JRequest::getInt('start', 0), $limit);\n $items = $db->loadObjectList();\n// $this->cache[$store] = $rows;\n// $this->items = $rows;\n// $items = array_slice($rows, JRequest::getInt('start', 0), $limit);\n\n return $items;\n }", "public function fetch(array $criteria)\n {\n array_walk($criteria['filters'], function (&$item) {\n $item = $item['value'];\n });\n\n $query = array_merge(\n array(\n 'location' => $criteria['location'],\n 'f' => $criteria['f'],\n 'q' => $criteria['q']\n ),\n $criteria['filters']\n );\n\n $query = array_filter($query);\n\n $request = $this->guzzle->get(sprintf('/%s/offres/%s/%s', $criteria['category'], $criteria['region'], (isset($criteria['department']) ? $criteria['department'].'/' : '')), null, array(\n 'query' => $query\n ));\n\n $this->requestUrl = $request->getUrl();\n\n $response = $request->send();\n $crawler = new Crawler((string) $response->getBody());\n\n $bids = $crawler->filter('.list-lbc > a')->each(function ($node, $i) {\n return $this->processBid($node);\n });\n\n return $bids;\n }", "public function results()\r\n\t{\r\n\t\treturn $this->model->get($this->select);\r\n\t}", "protected function fetch()\n\t{\n\t\tif(isset($this->total_record_count) && !$this->valid())\n\t\t{\n\t\t\treturn array();\n\t\t}\n\n\t\tlist($page, $total_record_count) = $this->resource->fetchAll($this->url, array(\n\t\t\t'page_number' => $this->key(),\n\t\t\t'page_size' => $this->page_size,\n\t\t\t'sort' => $this->sort,\n\t\t\t'filters' => $this->filters\n\t\t));\n\n\t\tif(is_null($this->total_record_count))\n\t\t{\n\t\t\t$this->total_record_count = $total_record_count;\n\t\t}\n\n\t\tif($this->total_record_count != $total_record_count)\n\t\t{\n\t\t\tthrow new Exception('Concurrent Modification Occurred! The number of remote records changed.');\n\t\t}\n\n\t\treturn $page;\n\t}", "public function getItems();", "public function getItems();", "public function getItems();" ]
[ "0.6563087", "0.6365665", "0.6026902", "0.595076", "0.59504884", "0.58866334", "0.58437544", "0.5841261", "0.579076", "0.5753759", "0.56993806", "0.56881326", "0.5664919", "0.56616884", "0.56206447", "0.56132025", "0.56132025", "0.5605686", "0.56053144", "0.55738527", "0.5565836", "0.5565", "0.55538625", "0.55538625", "0.55538625", "0.55538625", "0.55524355", "0.55364513", "0.55218506", "0.5501436", "0.54992086", "0.5491567", "0.5463694", "0.544694", "0.54257196", "0.5419278", "0.5409569", "0.540598", "0.5400944", "0.5396116", "0.53952754", "0.5391953", "0.5386999", "0.5380267", "0.53797126", "0.53748447", "0.53714275", "0.53578484", "0.53548527", "0.5353299", "0.5350967", "0.5338495", "0.53384674", "0.53371805", "0.5323729", "0.5319887", "0.5319566", "0.5318731", "0.53174204", "0.5308212", "0.53080666", "0.53047276", "0.5301576", "0.529525", "0.5292775", "0.5289452", "0.52871066", "0.528175", "0.5278066", "0.5272933", "0.5272813", "0.52644885", "0.52635866", "0.5263111", "0.5259688", "0.52496934", "0.52441585", "0.5239965", "0.5239965", "0.5237177", "0.52283317", "0.5225393", "0.52196413", "0.52159363", "0.52116716", "0.52101475", "0.52074826", "0.5203385", "0.5195222", "0.51919204", "0.5174856", "0.5170155", "0.5166339", "0.516486", "0.516467", "0.51616895", "0.51589715", "0.51533955", "0.51504195", "0.51504195", "0.51504195" ]
0.0
-1
Realizamos la conexion a la base de datos mediante db.
function __construct() { parent::__construct(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function conectarDB(){\n\t\t$dsn = 'mysql:dbname='.self::nombre_db.' ;host='.self::servidor;\n\t\ttry {\n\t\t\t#metodo abstracto para la conexion a la bd\n\t\t\t$this->_conn = new PDO($dsn, self::usuario_db, self::pwd_db);\n\t\t \t\n\t\t } catch (PDOException $e) {\n\t\t \techo \"Falló la conexión: \".$e->getMessage();\n\t\t } \n\t}", "public function connectToDB() {}", "function abrir_conexion()\n {\n $this->db = Conectar::conexion();\n }", "public function connectDB() {}", "private function connectDB()\n\t{\n\t\t$this->db = ECash::getMasterDb();\n\t\t\n\t//\t$this->dbconn = $this->db->getConnection();\n\t}", "private function databaseConnection()\n {\n // Les connexions sont établies en créant des instances de la classe de base de PDO\n $options = array(PDO::ATTR_DEFAULT_FETCH_MODE => PDO::FETCH_OBJ, PDO::ATTR_ERRMODE => PDO::ERRMODE_WARNING);\n $this->db = new PDO(DB_TYPE . ':host=' . DB_HOST . ';dbname=' . DB_NAME, DB_USER, DB_PASS, $options);\n }", "private function connecDb()\n {\n try{\n $dsn = \"{$this->db_type}:host={$this->db_host};port={$this->db_port};\";\n $dsn .= \"dbname={$this->db_name};charset={$this->db_charset}\";\n //echo \"$dsn, $this->db_user, $this->db_pass\";\n $this->pdo = new PDO($dsn,$this->db_user,$this->db_pass);\n }catch(PDOException $e){\n echo\"<h2>创建POD对象失败</h2>\";\n $this->ShowErrorMessage($e);\n die();\n }\n }", "private function connect(){\n\t\trequire (__DIR__ . '/../../config.php');\n\t\t$mysqlCFG =$database['mysql'];\n\t\t\n\t\tif(!self::$db){\n\t\t\t$connectionString = \"mysql:host=$mysqlCFG[host];dbname=$mysqlCFG[dbname]\";\n\t\t\ttry{\n\t\t\t\tself::$db = new \\PDO($connectionString, $mysqlCFG['user'], $mysqlCFG['password']);\n\t\t\t\tself::$db->setAttribute( \\PDO::ATTR_ERRMODE, \\PDO::ERRMODE_EXCEPTION);\n\t\t\t}catch(\\PDOException $e){\n\t\t\t\tdie(\"Ocurrio un error al conectar con la base de datos: $e->getMessage()\");\n\t\t\t}\n\t\t}\n\t\t\n\t}", "public function conectar() {\n $this->conexion=new mysqli($this->servidor, $this->usuario, $this->clave, $this->baseDatos);\n }", "private function conect(){\r\n\t\tglobal $HOST;\r\n\t\tglobal $BASEDEDATOS;\r\n\t\tglobal $USUARIO;\r\n\t\tglobal $PASS;\r\n\t\t$this->myconn = mysql_connect($HOST,$USUARIO,$PASS);\r\n\t\tif (! $this->myconn){\r\n\t\t\techo \"Error al intentar conectarse con el servidor MySQL\";\r\n\t\texit(); \r\n\t\t}\r\n\r\n\t\tif (! @mysql_select_db($BASEDEDATOS,$this->myconn)){\r\n\t\t\techo \"No se pudo conectar correctamente con la Base de datos\";\r\n\t\t\texit();\r\n\t\t}\r\n\t\r\n\t}", "public function connect_db() {\n }", "private function connectDatabase() {\r\r\n\t\t$this->dbHandle = \\TYPO3\\CMS\\Core\\Utility\\GeneralUtility::makeInstance('TYPO3\\\\CMS\\\\Core\\\\Database\\\\DatabaseConnection');\r\r\n\t\t$this->dbHandle->setDatabaseHost($this->dbHost);\r\r\n\t\t$this->dbHandle->setDatabaseUsername($this->dbUsername);\r\r\n\t\t$this->dbHandle->setDatabasePassword($this->dbPassword);\r\r\n\t\t$this->dbHandle->setDatabaseName($this->db);\r\r\n\t\t$this->dbHandle->sql_pconnect();\r\r\n\t\t$this->dbHandle->sql_select_db();\r\r\n\t}", "public function conectar(){\n $this->conexion = mysqli_connect($this->hostname, $this->user, $this->password, $this->database);\n }", "private function connectToDB()\n {\n $this->handler = new DBConnect();\n $this->handler = $this->handler->startConnection();\n }", "public function connectToDatabase(){\n\t\t$dbinfo=$this->getDBinfo();\n\n\t\t$host=$dbinfo[\"host\"];\n\t\t$dbname=$dbinfo[\"dbname\"];\n\t\t$user=$dbinfo[\"user\"];\n\t\t\n $pass=$this->getPassword();//don't share!!\n\n try{\n $DBH = new PDO(\"mysql:host=$host;dbname=$dbname\", $user, $pass);\n $DBH->setAttribute( PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION );\n }catch(PDOException $e){\n $this->processException($e);\n }\n \n $this->setDBH($DBH);\n }", "public function Conecta()\n\t{\n\t\t$this->conn = new PDO(\"mysql:host=\".$this->host.\";dbname=\".$this->database, $this->user, $this->password);\n\n\t}", "protected function connect(){\n $dsn = \"mysql:host=\".$this->servidor.\";dbname=\".$this->base_datos;\n // Creamos un objeto pdo que crea la conexion con la base de datos\n $db = new PDO($dsn, $this->user, $this->pswd);\n // Añadimos un atributo que hara que los datos que nos devuelva la base de datos\n // se agrupen en forma de array asociativo\n $db->setAttribute(PDO::ATTR_DEFAULT_FETCH_MODE, PDO::FETCH_ASSOC);\n // Devolvemos el objeto db\n return $db;\n }", "function conectar(){\n global $Usuario;\n global $Clave;\n global $_SESSION;\n $this->dataOrdenTrabajo->SetUserName($Usuario);\n $this->dataOrdenTrabajo->SetUserPassword($Clave);\n $this->dataOrdenTrabajo->SetDatabaseName($_SESSION['database']);\n $this->dataOrdenTrabajo->setConnected(true);\n }", "private function openDatabaseConnection()\n {\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 }", "private function dbConnection() {\r\n //if (!is_resource($this->connessione))\r\n // $this->connessione = mysql_connect($this->db_server,$this->db_username,$this->db_pass) or die(\"Error connectin to the DBMS: \" . mysql_error());\r\n if (!is_resource($this->connessione)) {\r\n try {\r\n $this->connessione = new PDO($this->db_type . \":dbname=\" . $this->db_name . \";host=\" . $this->db_server, $this->db_username, $this->db_pass);\r\n //echo \"PDO connection object created\";\r\n $this->setupSQLStatement();\r\n } catch (PDOException $e) {\r\n echo $e->getMessage();\r\n die();\r\n }\r\n }\r\n }", "private function connect()\r\n {\r\n\r\n /**\r\n * A TENTATIVA DE CRIAR UM OBJETO COM A CONEXAO DO BANCO É FEITA\r\n */\r\n try {\r\n /**\r\n * SALVA NA VARIAVEL ESTATICA O OBJETO REFERENTE A CONEXÃO COM O BANCO.\r\n * AS VARIAVEIS QUE SAO USADAS PARA CONEXAO SÃO DA CLASSE PAI\r\n */\r\n self::$con = new PDO('mysql:host=' . $this->getHost() . ';dbname=' . $this->getDatabase() . '', $this->getUser(), $this->getPassword(), array(PDO::MYSQL_ATTR_INIT_COMMAND => \"SET NAMES 'utf8'\"));\r\n /**\r\n * DEFINE O TIPO DE MANIPULAÇÃO DE ERRO SERÁ USADO PELO PDO\r\n */\r\n self::$con->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);\r\n /**\r\n * CAPTURA O ERRO, SE GERADO\r\n */\r\n } catch (\\PDOException $error) {\r\n /**\r\n * O ERRO É IMPRESSO NA TELA\r\n */\r\n echo $error->getMessage();\r\n }\r\n }", "private function connect() {\n $host = $this->dbConfig[$this->selected]['host'];\n $login = $this->dbConfig[$this->selected]['login'];\n $password = $this->dbConfig[$this->selected]['password'];\n $database = $this->dbConfig[$this->selected]['database'];\n try {\n $this->db = new PDO('mysql:host=' . $host . ';dbname=' . $database . ';charset=utf8', $login, $password);\n $this->db->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);\n//\t\t\t$this->db->setAttribute(PDO::ATTR_EMULATE_PREPARES, false);\n } catch (PDOException $e) {\n die('Could not connect to DB:' . $e);\n }\n }", "private function connect() {\n $this->load->database();\n }", "private function conectar_base_datos(){\n\t\t$this->descriptor = mysqli_connect($this->servidor,$this->usuario,$this->pass,$this->base_datos);\n\t\tif (mysqli_connect_errno()) {\n \t\t?>\n\t\t\t<script language=\"JavaScript\" type=\"text/javascript\">\n\t\t\t\talert (\"Falló conexión al servidor:<?php printf(\"%s\\n\", mysqli_connect_error());?>\"); \n\t\t\t</script>\n\t\t\t<?\n\t\t\texit();\n\t\t}\n\t}", "private function connect()\n {\n if (! is_null(self::$db)) {\n return;\n }\n\n // $this->host \t= $Database->host;\n // $this->user \t= $Database->user;\n // $this->pass \t= $Database->pass;\n // $this->database\t= $Database->database;\n\n $conn = 'mysql:dbname=' . $this->dbInfo->database . ';host=' . $this->dbInfo->host.';charset=utf8';\n try {\n self::$db = new PDO($conn, $this->dbInfo->user, $this->dbInfo->pass);\n } catch (PDOException $e) {\n die('Could not connect to database (' . $conn . ')');\n }\n }", "public function connect(){\n $this->database->connect($this->server, $this->login, $this->password, $this->db_name);\n if($this->database->connect_errno){\n return;\n }\n //nastavi kodovanie databazy na UTF-8\n $this->database->query(\"SET CHARACTER SET utf8\");\n $this->connected=true;\n }", "private function dbconnect()\n {\n $this->db = new mysqli(Config::$dbhost, Config::$dbuser, Config::$dbpass, Config::$database);\n if (mysqli_connect_errno()) {\n Log::info(sprintf(\"Connect failed: %s\\n\", mysqli_connect_error()));\n exit();\n }\n }", "public function Cl_Conexion() {\r\n try {\r\n $this->cone= mysqli_connect($this->host, $this->usuario, $this->password, $this->base);\r\n } catch (Exception $ex) {\r\n echo $exc->getTraceAsString();\r\n }\r\n }", "private function openConnection() {\n $this->db = new PDO(\"mysql:host=127.0.0.1;dbname=mvc\", \"gert\", \"becode\");\n }", "public function conectionDB(){\n $mysqlConnect = \"mysql:host=$this->dbHost;dbname=$this->dbName\";\n $dbConnection = new PDO($mysqlConnect,$this->dbUser,$this->dbPass);\n $dbConnection -> setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);\n $acentos = $dbConnection->query(\"SET NAMES 'utf8'\");\n return $dbConnection;\n\n }", "public function conectar()\n {\n if(!isset($this->conexion)){\n $this->conexion = (mysql_connect($this->localhost, $this->usuario,$this->password)) or die(mysql_error() );\n mysql_select_db($this->database , $this->conexion) or die(mysql_error()); \n }\n }", "function db_connect(){\n\t\tif(SQ_DEBUG){\n\t\t\t$this->dbh = mysql_connect($this->dbhost, $this->dbuser, $this->dbpassword, true);\n\t\t}else{\n\t\t\t$this->dbh = @mysql_connect($this->dbhost, $this->dbuser, $this->dbpassword, true);\n\t\t}\n\t\t\n\t\tif (!$this->dbh){\n\t\t\t$error_message = sprintf(SQ_DB_CONN_ERROR_MESSAGE, $this->dbhost, $this->dbuser);\n\t\t\tthrow new SQ_Exception($error_message, SQ_DB_CONN_ERROR_CODE);\n\t\t}\n\t\t$this->ready = true;\n\t\t\n\t\ttry{\n\t\t\t$this->select($this->dbname, $this->dbh);\n\t\t}catch(SQ_Exception $e){\n\t\t\tthrow $e;\n\t\t}\n\t}", "public function conectarBD() {\n $db_host=\"127.0.0.1\"; \n $db_port=\"3306\";\n $db_name=\"exempel\"; \n $db_user=\"root\"; \n $db_pass=\"\";\n \n $conn = mysqli_connect($db_host.':'.$db_port, $db_user, $db_pass) or die (\"Error conectando a la base de datos.\");\n mysqli_select_db($conn,$db_name) or die(\"Error seleccionando la base de datos.\");\n mysqli_set_charset($conn,\"utf8\");\n return $conn;\n }", "private function open_db() {\n\n\t\t//var_dump($this->connection); exit;\n\n\t\t\n\n\t}", "protected function conectaBD(){\n\t\t$db_host= \"localhost\";\n\t\t$db_user= \"root\";\n\t\t$db_password= \"\";\n\t\t$db_name= \"transportApp\";\n\t\t$db = mysqli_connect($db_host,$db_user,$db_password,$db_name);\n\t\treturn $db;\n\t}", "function Conecta(){\n\t\t$this->conexao = @mysql_connect($this->servidor,$this->usuario,$this->senha); //varaivel link desntro desta classa recebera a conex�o\n\t\tif(!$this->conexao){\n\t\t\techo 'Falha na conex�o com o banco de dados<br>';\n\t\t\texit();\n\t\t}elseif(!mysql_select_db($this->banco,$this->conexao)){\n\t\t\techo 'Falha ao selecionar o banco de dados<br>';\n\t\t\texit();\n\t\t}\n\t}", "protected function start(){\n\t\n\t\t\t$this->con = new PDO(\"mysql:host=$this->host;dbname=$this->banco;\", \"$this->user\" , \"$this->senha\");\n\t\t}", "public static function connect(){\n\n// con el this obtengo valores de fuera de esta funcion, luego a la variable se instancia con los valores de la conexion\n\t\t\t$connection_db = new mysqli (DB_HOST, DB_USER, DB_PASS, DB_NAME);\n\n// este if es para obtener datos en caso de tener algun error\n\t\t\tif($connection_db->connect_errno){\n\n\t\t\t\techo \"Fallo la conexion a la base de datos: \" . $connection_db->connect_error;\n\t\t\t\treturn;\n\t\t\t}// else{\n\t\t\t// \techo \"Conexion exitosa\";\n\t\t\t// \treturn $connection_db;\n\t\t\t// } solo en caso de querer probar el exito de la conexion\n\n// el charset es por si en la base de datos hay comas aqui se muestren tambien\n\t\t\t$connection_db->set_charset(DB_CHARSET);\n\t\t}", "public function connect(){\n try {\n $this->_dbh = new PDO('mysql:host='.$this->_host.';dbname='.$this->_db,$this->_user,$this->_pass);\n echo \"connexion reussi\";\n }\n catch(PDOException $e)\n {\n echo \"Connection failed: \" . $e->getMessage();\n }\n }", "public function connectdb()\n {\n $this->db = mysql_connect($this->host,$this->port, $this->user, $this->pass)\n if (!$db)\n {\n die('Could not connect: ' . mysql_error());\n }\n\n mysql_select_db($this->database, $this->db);\n }", "private function dbConnect(){\n\t\t\t$mysqli = $this->mysqli = new mysqli(self::DB_SERVER, self::DB_USER, self::DB_PASSWORD, self::DB);\n mysqli_set_charset($mysqli, \"utf8\");\n if ($mysqli->connect_errno) {\n $this->response('', 204); // server error \n }\n\t\t}", "private function openDatabaseConnection()\n {\n $options = array(PDO::ATTR_DEFAULT_FETCH_MODE => PDO::FETCH_OBJ, PDO::ATTR_ERRMODE => PDO::ERRMODE_WARNING);\n $this->db = new PDO(DB_TYPE . ':host=' . DB_HOST . ';dbname=' . DB_NAME, DB_USER, DB_PASS, $options);\n\n //UTF-8 encoding queries\n $this->db->exec(\"SET NAMES 'utf8'\");\n $this->db->exec(\"SET CHARACTER SET utf8\");\n $this->db->exec(\"SET COLLATION_CONNECTION='utf8_unicode_ci'\");\n }", "public function __construct(){\n $this->db = new Conect();//criando o objeto Conect\n $this->db = $this->db->Conn();//executando metodo e pondo em uma variavel\n}", "private function conectar()\n {\n try {\n $options = [\n PDO::MYSQL_ATTR_INIT_COMMAND => 'SET NAMES utf8mb4',\n PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION\n ];\n\n $this->pdo = new PDO(\"mysql:dbname=usuarios;host=localhost\", 'root', '', $options);\n\n } catch (PDOException $e) {\n echo 'Falhou: ' . $e->getMessage();\n }\n }", "public function connect()\n {\n $data = $this->app->file->requireFile('config.php');\n extract($data);\n try {\n static::$DB = new PDO('mysql:host=' . $server . ';dbname=' . $dbname , $dbuser , $dbpass);\n\n static::$DB->setAttribute(PDO::ATTR_DEFAULT_FETCH_MODE , PDO::FETCH_OBJ);\n static::$DB->setAttribute(PDO::ATTR_ERRMODE , PDO::ERRMODE_EXCEPTION);\n static::$DB->exec('SET NAMES utf8');\n\n }\n catch (PDOException $e){\n die($e->getMessage());\n }\n }", "public function openConnection() {\n if($this->database != null) return;\n\n $config = $this->getDatabaseConfig();\n\n try {\n $this->database = new \\PDO(\n 'mysql:dbname=' . $config['database'] . ';host=' . $config['host'] . ':' . $config['port'],\n $config['username'],\n $config['password'],\n [\n \\PDO::ATTR_ERRMODE => \\PDO::ERRMODE_EXCEPTION,\n \\PDO::ATTR_DEFAULT_FETCH_MODE => \\PDO::FETCH_ASSOC\n ]\n );\n } catch(\\PDOException $exception) {\n die('Connection to mysql-server failed: ' . $exception->getMessage());\n }\n }", "function conecta_alumno($nombrebase) {\n\n // --- Realizar la conexion\n @ $db = mysqli_pconnect($mihost,\"PequeLiante\",\"H@y59ONGs\"); \n\n if (!$db){\n echo mensaje_error('No se ha podido abrir la base de datos. Inténtelo más tarde',1);\n exit;\n }\n\n // --- Abrir la base de datos\n $mibase = mysqli_select_db($nombrebase);\n\n if (!$mibase){\n echo mensaje_error('No existe la base de datos donde se almacena la información. Inténtelo más tarde',1);\n exit;\n }\n }", "protected function connectDB () {\n $host=$this->Parameters['db_host'];\n $username=$this->Parameters['db_username'];\n\t\t$password=$this->Parameters['db_userpassword'];\n\t\t$dbname=$this->Parameters['db_name'];\n\t\t\n $this->Conn = new mysqli ($host,$username,$password,$dbname);\n if($this->Conn->connect_errno > 0){\n throw new Exception('Unable to connect to database [' . $this->Conn->connect_error . ']');\n }\n }", "function conectar() \n\t {\n\t\t//conectarme con el servidor de base de datos\n\t\t$con=mysql_connect($this->Servidor,$this->Usuario,$this->Clave);\n\t\t// si hubo problemas al conectarme con el servidor de base de datos\n\t\tif (!$con)\n\t\t{\n\t\t\tdie(\"Error al conectarme con el Servidor de Base de Datos\");\n\t\t}\n\t\t//Seleccionar la base de datos\n\t\t$bd=mysql_select_db($this->BaseDatos,$con);\n\t\t//error al seleccionar la base de datos\n\t\tif (!$bd)\n\t\t{\n\t\t\tdie(\"Error al seleccionar la Base de Datos\");\n\t\t}\n\t\t//almaceno la conexion en la propiedad conect\n\t\t$this->conect=$con;\n\t\t//devuelvo la conexion desde donde fue invocada\n\t\treturn true;\t\n\t}", "static function conectar(){\n R::setup(\"mysql:host=\".CONFIG_HOST.\";dbname=\".CONFIG_BD,CONFIG_USER,CONFIG_PASS);\n\t\t\tself::$mysqli = new mysqli(CONFIG_HOST, CONFIG_USER, CONFIG_PASS, CONFIG_BD);\n\t\t\tself::$mysqli->set_charset('utf8');\n }", "private function dbConnect(){\n $database=new \\Database();\n return $database->getConnection();\n }", "function _getConnection()\n {\n $this->_con = Pluf::db();\n }", "private function __connect() {\n $this->handle = mysql_connect($this->server, $this->user, $this->password) \n or die('<pre style=\"margin:auto;background:rgba(0,0,0,.1)\">'.mysql_error().'</pre>');\n mysql_select_db($this->dataBase, $this->handle) \n or die('<pre style=\"margin:auto;background:rgba(0,0,0,.1)\">'.mysql_error().'</pre>');\n @mysql_query(\"SET NAMES 'utf8'\");\n }", "public function conectar() {\n //Establecer conexion con el servidor\n $this->linkId = @mysql_connect($this->servidor, $this->usuario, $this->password);\n if ($this->linkId == true) {//Si se conecto al servidor.\n //Asignar la conexion a la base de datos\n if (!mysql_select_db($this->baseDatos)) {\n throw new Exception(\"No se pudo conectar a la base de datos\");\n }\n } else {//Si no se conecto al servidro\n throw new Exception(\"No se pudo conectar al servidor\");\n }\n }", "private function db_connect() {\n\n\t\t$new_link = defined( 'MYSQL_NEW_LINK' ) ? MYSQL_NEW_LINK : TRUE;\n\t\t$client_flags = defined( 'MYSQL_CLIENT_FLAGS' ) ? MYSQL_CLIENT_FLAGS : 0;\n\n\t\t// Connect to database.\n\t\tif ( DEBUG_MODE ) {\n\t\t\t$this->dbcon = mysqli_connect($this->dbhost, $this->dbuser, $this->dbpassword, $this->dbname, $this->dbport);\n\t\t} else {\n\t\t\t$this->dbcon = @mysqli_connect($this->dbhost, $this->dbuser, $this->dbpassword, $this->dbname, $this->dbport);\n\t\t}\n\n\t\tif ( mysqli_connect_errno () ) {\n\t\t\t/* ===== Bail ===== */\n\t\t\tif (DEBUG_DISPLAY) {\n\t\t\t\techo (\"Failed to connect to MySQL: \" . mysqli_connect_error() . '<br />');\n\t\t\t}\n\t\t}\n\n\t\t// Set charset.\n\t\tmysqli_set_charset ( $this->dbcon, $this->dbcharset );\n\n\t\t// Set collate.\n\t\t// mysqli_query ( $this->dbcon, \"COLLATE {$this->dbcollate}\" );\n\n\t\t// Set the database as ready for queries.\n\t\t$this->ready = TRUE;\n\t}", "private function connect(){\n\t\t\t$this->conn = mysql_connect($this->host, $this->user, $this->pass) or die(\"dbGreska (conn)\"); \n\t\t\tmysql_select_db($this->db_name, $this->conn) or die(\"dbGreska (select)\");\n\t\t\tmysql_query(\"SET NAMES UTF8\");\n\t\t}", "protected function _initDbConnection() {\n\t\tif (!empty($this->db)) {\n\t\t\treturn;\n\t\t}\n\t\t\n\t\t// Create a new connection\n\t\tif (empty($this->config['datasource'])) {\n\t\t\tdie(\"FeedAggregatorPdoStorage: no datasource configured\\n\");\n\t\t}\n\n\t\t// Initialise a new database connection and associated schema.\n\t\t$db = new PDO($this->config['datasource']); \n\t\t$this->_initDbSchema();\n\t\t\n\t\t// Check the database tables exist\n\t\t$this->_initDbTables($db);\n\n\t\t// Database successful, make it ready to use\n\t\t$this->db = $db;\n\t}", "function post(){\r\n\t\t//Connect\r\n\t\t$sql = new DataBase;\r\n\t\t$sql->connect();\r\n\t}", "function db()\n\t{\n\t\tglobal $dbhost, $dbuser, $dbpass, $dbname;\n\t\t$this->db_server_link = @mysql_connect($dbhost, $dbuser, $dbpass);\n\t\tmysql_select_db($dbname, $this->db_server_link) ;\n\t}", "function connetti(&$db) {\n\tglobal $host, $user, $pass, $nomedb;\n\t$db = new mysqli($host, $user, $pass, $nomedb);\n\tif (mysqli_connect_errno()) {\n\t\techo 'Connessione fallita';\n\t\texit ;\n\t}\n}", "function dbConnect () {\n\t$con = mysql_connect($this -> host, $this -> user, $this -> pass);\n mysql_select_db($this->dbname,$con);\n\t}", "public function setConnection()\r\n {\r\n $this->con = $this->db->getConnection();\r\n }", "function accedi_db() {\n include(\"db.conf.php\");\n $db = mysql_connect($db_host, $db_user, $db_pass);\n mysql_select_db($db_name, $db);\n }", "private function connect()\n {\n if ($this->configuration->get('db.connector') == 'PDO') {\n $dsn = \"mysql:host=\" . $this->configuration->get('db.host') . \";dbname=\" . $this->configuration->get('db.name');\n $options = array();\n $this->db = new PDO(\n $dsn, $this->configuration->get('db.username'), $this->configuration->get('db.password'), $options\n );\n } elseif ($this->configuration->get('db.connector') == 'mysqli') {\n $this->db = mysqli_connect(\n $this->configuration->get('db.host'), $this->configuration->get('db.username'), $this->configuration->get('db.password'), $this->configuration->get('db.name')\n );\n }\n }", "public function connect() {\r\n\t\t$this->connection = mysql_connect($this->host, $this->username, $this->password);\r\n\t\t$this->selectDB($this->squema);\r\n\t}", "public function ConectarBDD(){\r\n $this->conexion=pg_connect('dbname=sanjuanitas user=DBA password=12345678');\r\n if(!$this->conexion){\r\n echo json_encode(\"Error al intentar conectar la base de datos\");\r\n }\r\n }", "function fconectar(){\n\t\t$this->conexion = new mysqli($this->servidor, $this->usuario, $this->pwd, $this->bd);\n\t\tif ($this->conexion->connect_error) {\n \t\tdie('Error de Conexión (' . $mysqli->connect_errno . ') ' . $mysqli->connect_error);\n\t\t}\t\t\n\t}", "public function settaDB()\n {\n include \"MySqlClass.php\";\n // istanza della classe\n $this->database = new MysqlClass();\n }", "private function connect()\n {\n $connection_string = 'mysql:host=' . DB_HOST . ';dbname=' . DB_NAME . ';';\n $this->connection = new PDO($connection_string, DB_USER, DB_PASS);\n }", "private function conectar(){\n try{\n\t\t\t$this->conexion = Conexion::abrirConexion(); /*inicializa la variable conexion, llamando el metodo abrirConexion(); de la clase Conexion por medio de una instancia*/\n\t\t}\n\t\tcatch(Exception $e)\n\t\t{\n\t\t\tdie($e->getMessage()); /*Si la conexion no se establece se cortara el flujo enviando un mensaje con el error*/\n\t\t}\n }", "public function connToDB(){\n $this->conn=new mysqli(\"localhost\",\"root\",\"SQLroot\",\"Dispensary\");\n if(($this->conn)->connect_error){\n return 0;\n }\n }", "protected function openConn() {\n $database = new Database();\n $this->conn = $database->getConnection();\n }", "private function dbConnect(){\n $this->db = mysqli_connect(self::DB_SERVER,self::DB_USER,self::DB_PASSWORD,self::DB);\n // if($this->db){\n // mysql_select_db(self::DB,$this->db);\n // } \n }", "public function conectar_db($nombre_db){\r\n\t\t\t$con = mysqli_connect(HOST,USER,PASS,$nombre_db);\r\n\t\t\treturn $con;\r\n\t\t}", "private function connectToDatabase()\n {\n return DbConnection::connectToDatabase($this->link);\n }", "public function open()\n {\n $this->conexion= mysqli_connect(\"localhost:3306\",\"root\") or die (msql_error());\n mysqli_select_db($this->conexion, 'alsaplane') or die (msql_error());\n }", "public function getConnect()\n {\n $this->conn = Registry::get('db');\n }", "public function conectar(){\r\n try { //tratar a execucao do codigo\r\n //criar conexao com o PDO\r\n //new instanciar uma classe (gerar um novo objeto baseado na classe)\r\n $con = new PDO(\"mysql:host={$this->servidor};dbname={$this->banco};charset=utf8;\",$this->usuario, $this->senha);\r\n \r\n return $con; //retornando a conexao\r\n }catch(PDOException $msg){ // devolver mensagem caso de erro\r\n echo \"Nao possivel possivel conectar com o banco de dados {$msg->getMessage()}\";\r\n }\r\n \r\n }", "private function connect()\n {\n $this->db = new mysqli($this->host_name, $this->user_name, $this->password, $this->database_name);\n if ($this->db->connect_error) {\n die(\"Connect failed: \". $this->db->connect_error);\n exit();\n }\n }", "private function connect()\n\t{\n\t\t$connectionData = $this->app->file->requireFile('config.php');\n\t\t\n\t\textract($connectionData);\n\t\t\n\t\ttry\n\t\t{\n\t\t\tstatic::$connection = new PDO('mysql:host=' . $server . ';dbname=' . $dbname, $dbuser, $dbpass);\n\t\t\t\n\t\t\tstatic::$connection->setAttribute(PDO::ATTR_DEFAULT_FETCH_MODE, PDO::FETCH_OBJ);\n\t\t\t\n\t\t\tstatic::$connection->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);\n\t\t\t\n\t\t\tstatic::$connection->exec('SET NAMES utf8');\n\t\t}\n\t\tcatch (PDOException $e)\n\t\t{\n\t\t\tdie($e->getMessage());\n\t\t}\t\t\t\t\n\t}", "private function databaseConnection(){\n \t\tif($this->connection != null){\n \t\t\treturn;\n \t\t} else {\n \t\t\t$this->connection = mysqli_connect(\"127.0.0.1\", \"user\", \"password\", \"database\") or die(\"Error \" . mysqli_error($this->connection));\n \t\t}\n\n\t}", "function conectar_bd() {\n\t\t$conexion_bd = mysqli_connect(\"localhost\",\"root\",\"\",\"almacenciasa\");\n\n\t\t//verificar si la base de datos se conecto\n\t\tif( $conexion_bd == NULL){\n\t\t\tdie(\"No se pudo conectar con la base de datos\");\n\t\t}\n\t\treturn $conexion_bd;\n\t}", "public function Connect() {\n\n try {\n //atribuindo usuario de acesso ao banco ao atributo user\n $this->user = \"root\";\n \n //atribuindo a senha de acesso ao banco no atributo pass\n $this->pass = \"\";\n\n //atribuindo o endereço do banco no atributoi host \n $this->host = \"localhost\";\n \n //atribuindo o nome do banco criado no atributo base\n $this->base = \"mydb\";\n\n\n\n $parametros = array(PDO::MYSQL_ATTR_INIT_COMMAND => \"SET NAMES UTF8\"); //Definimos a conexão com o banco no padrão URF-8\n\n\n\n // atribuindo os parametros de conexao no atrinuto file\n $this->file = \"mysql:host=\" . $this->host . \";dbname=\" . $this->base;\n\n //atribuido a linha de comando PDO(para iniciação na conexao) no atributo pdo\n $this->pdo = new PDO($this->file, $this->user, $this->pass, $parametros);\n\n\n\n //atribuindo os atributos complementares PDO no atributo pdo\n $this->pdo->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);\n\n $this->pdo->setAttribute(PDO::ATTR_EMULATE_PREPARES, false);\n\n $this->pdo->setAttribute(PDO::ATTR_PERSISTENT, true);\n\n if (!$this->pdo) {\n echo \"Erro na conexão\";\n }\n \n return $this->pdo;\n } catch (PDOException $ex) {\n\n echo \"Erro no sistema\" . $ex->getMessage();\n }\n }", "private function connect() {\n\t\t$this->db_connect = new mysqli($this->db_host, $this->db_user, $this->db_pass, $this->db_name);\n\n\t\t// check for connection\n\t\tif ($this->db_connect->connect_error) {\n\n\t\t\tif (DEBUG_MODE == true) {\n\t\t\t\tdie('Failed to connect to MySQL: ' . $this->db_connect->connect_error);\n\t\t\t} else {\n\t\t\t\tdie('Failed to connect to MySQL.');\n\t\t\t}\n\n\t\t}\n\n\t\t$this->db_connect->query(\"SET NAMES utf8;\");\n\t\t$this->db_connect->query(\"SET CHARACTER_SET utf8;\");\n\n\t}", "function connect_to_db(){\n\t\t//Fun Fact: @ suppresses errors of the expression it prepends\n\t\t\n\t\t//Connect to the database and select the database\t\t\t\n\t\ttry{\n\t\t\t$this->connection = new PDO(\"mysql:host=$DATABASE_HOST;dbname=DATABASE_NAME\", DATABASE_USER, DATABASE_PASS);\n\t\t\t$this->connection->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);\n\t\t}catch(PDOException $err){\n\t\t\tdie('Could not connect to database' . $err->getMessage());\n\t\t}\t\t\n\t}", "public function getDbConnection()\n {\n $this->conn = Registry::get('db');\n }", "private function connect() {\r\n\t\tunset($this->dbLink);\r\n\t\t/* create connection to database host */\r\n\t\t// $dbLink = mysql_connect(\"mysql.localhost\", \"de88623\", \"proberaum1\");\r\n\t\t$dbLink = mysql_connect(\"localhost\", \"robert\", \"YMbHFY+On2\");\r\n\t\t/* select database */\r\n\t\tmysql_select_db(\"robert_www_parkdrei_de\");\r\n\t\t/* set link to database as a object attribute */\r\n\t\t$this->dbLink = $dbLink;\r\n\t}", "private function _set_connection()\n {\n isset($this->_database_connection) ? $this->load->database($this->_database_connection) : $this->load->database();\n $this->_database = $this->db;\n }", "function dbConectionm ()\t{\r\n $conexion = null; // Se inicializa variable a nul\r\n \t\t# code...\r\n \t\t\t$usr = \"root\";\r\n \t\t$pwd = \"\";\r\n \t\t$host = \"localhost\";\r\n \t\t$db = \"soluciones_en_ti\";\r\n \t\t\r\n \t\t try {\r\n \t\t $conexion = new PDO(\"mysql:host=$host;dbname=$db;\",$usr,$pwd);\r\n //$conexion->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);\r\n \t }\r\n \t catch(PDOException $e){\r\n echo \"Failed to get DB handle: \" . $e->getMessage();\r\n exit; \r\n }\r\n return $conexion;\r\n \t }", "public static function conectar()\n {\n $db = new mysqli('localhost', 'root', '', 'tienda_master');\n $db->query(\"SET NAMES 'utf8'\");\n return $db;\n }", "function database() {\n\t\t\n\t\t// Cria conexao com o bando de dados MySql\n\t\t$connect = mysql_connect(\"localhost\", \"root\", \"123\");\n\t\tmysql_select_db(\"rd_promocoes_db\", $connect);\n\n\t\t// Verifica a conexao com o banco\n\t\tif ( mysqli_connect_errno() ) {\n\t\t \techo \"Failed to connect to MySQL: \" . mysqli_connect_error();\n\t\t}\n\t}", "function conectar($servidor,$usuario,$contras,$base){\n $link=mysql_connect($servidor,$usuario,$contras) or die (\"Can't connect to the Database Server\");\n $conect=mysql_select_db($base,$link) or die (\"Can't find the database\");\n return $conect;\n }", "private static function connect(){\n try{\n $conn_data = json_decode(file_get_contents(__DIR__.\"/../config/connection.json\"), true);\n self::$connection = new PDO($conn_data['CONN_STRING'], $conn_data['DB_USER'], $conn_data['DB_PASS']);\n\t\t} catch (PDOException $e){\n\t\t\techo \"Database error: \".$e->getMessage();\n\t\t\tdie();\n\t\t}\n }", "public function connect() {\n if ($this->db == null) {\n $this->db = new mysqli($this->host_name, $this->user_name, $this->password, $this->db_name);\n if ($this->db->connect_errno > 0) {\n throw new Eccezione(\"C'è stato un errore nella connessione con il database. L'errore che si è verificato è il seguente: \" . $this->db->connect_error);\n } else {\n $this->is_connected = TRUE;\n }\n }\n }", "protected function openConn()\n {\n $database = new Database();\n $this->conn = $database->getConnection();\n }", "private function Connect() {\n $this->Conn = parent::getConn();\n $this->Create = $this->Conn->prepare($this->Create);\n }", "private function Connect(){\n $this->Conn = parent::getConn();\n $this->Create = $this->Conn->prepare($this->Create);\n }", "public static function conectar()\n {\n\n // $link->exec(\"set names utf8\");\n\n // // return $link;\n\n $link = new PDO(\"mysql:host=88.198.24.90;dbname=inventar_proyectofinal\", \"inventariosadsi\", \"SETQDnuHgv(_\");\n $link->exec(\"set names utf8\");\n return $link;\n\n $link->exec(\"set names utf8\");\n\n return $link;\n\n }", "public function connect () {\n\t\tif(!$this->con) {\n\t\t\t$this->db = mysqli_connect($this->db_host, $this->db_user, $this->db_pass, $this->db_name) or die(mysql_error());\n\t\t\t$this->con = true;\n\t\t}\n\t}", "function conectar2 ($servidor, $usuario, $pass, $base) {\n\t\t\t\t$db_con = mysql_connect ($servidor,$usuario,$pass);\n\t\t\t\tif (!$db_con) return false; \n\t\t\t\tif (!mysql_select_db ($base, $db_con)) return false;\n\t\t\t\tif (!mysql_query(\"SET NAMES 'utf8'\")) return false;\n\t\t\t\treturn $db_con; \n\t\t\t}", "public function conexion(){\n\n $bbdd = $this->driver .':host='. $this->host . ';dbname=' . $this->database . ';charset=' . $this->charset;\n\n //$bbdd = ' mysql:host=localhost;dbname=mvc1;charset=utf8';\n try {\n $connection = new PDO($bbdd, $this->user, $this->pass);\n $connection->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);\n return $connection;\n } catch (PDOException $e) {\n //Lanzamos la excepción\n throw new Exception('Problema al establecer conexión.');\n }\n }" ]
[ "0.8040341", "0.7746433", "0.7692734", "0.76348585", "0.7510305", "0.75040567", "0.74820536", "0.74578047", "0.7400012", "0.7370701", "0.73698586", "0.73549235", "0.7302331", "0.7294997", "0.7214498", "0.72006595", "0.7156409", "0.7135989", "0.7121401", "0.7110638", "0.7105753", "0.7100053", "0.7090558", "0.7085319", "0.70527637", "0.70505136", "0.70416516", "0.70348734", "0.70312", "0.7023745", "0.7003107", "0.7001081", "0.6996066", "0.69917303", "0.69897753", "0.69860256", "0.6985106", "0.6969313", "0.69604415", "0.69556624", "0.69531745", "0.6943022", "0.69316155", "0.69295126", "0.69178265", "0.69137156", "0.6910103", "0.69033754", "0.69015896", "0.6899506", "0.68908465", "0.6888802", "0.68875325", "0.6884908", "0.6866373", "0.68656445", "0.684288", "0.6825112", "0.6824591", "0.68238765", "0.6816984", "0.6816668", "0.6813306", "0.68098724", "0.6801746", "0.6792964", "0.67903763", "0.67866236", "0.6782957", "0.6771667", "0.6769379", "0.6768267", "0.6762475", "0.67576957", "0.67573565", "0.6745309", "0.6740403", "0.67283446", "0.6728065", "0.67274237", "0.6720652", "0.67196345", "0.67194176", "0.6715561", "0.6701959", "0.6701798", "0.66993123", "0.6697314", "0.66940457", "0.66927063", "0.668565", "0.6684065", "0.6683619", "0.6682866", "0.6682829", "0.66824514", "0.6681882", "0.66757166", "0.6674276", "0.6673983", "0.6671938" ]
0.0
-1
Funciones para la inserccion
public function insertarUser($email,$pass,$nombre,$apellidos){ if ($this->hayError()==true){ return null; }else{ $sqlInserction="INSERT INTO usuarios(id,usuario,nombre,apellidos,email,rol,pass) VALUES (NULL,'".$email."','".$nombre."','".$apellidos."','".$email."',NULL,'".sha1($pass)."')"; $this->conexion()->query($sqlInserction); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function inserir()\n {\n }", "protected function saveInsert()\n {\n }", "function insertar($bd);", "protected function _insert()\n {\n \n }", "protected function _insert()\n {\n \n }", "public abstract function insert();", "abstract public function insert();", "public function insertar($objeto){\r\n\t}", "function inserir() {\n\t\t$this->sql = mysql_query(\"INSERT INTO suporte (user_cad, data_cad, id_regiao, exibicao, tipo, prioridade, assunto, mensagem, arquivo, status, status_reg,suporte_pagina)\n\t\t\t\t\t VALUES\t('$this->id_user_cad ','$this->data_cad','$this->id_regiao', '$this->exibicao', '$this->tipo','$this->prioridade', '$this->assunto', '$this->menssagem', '$this->tipo_arquivo','1','1','$this->pagina');\") or die(mysql_error());\n\t\t\t\t\t \n\t\t\t\t\t \n\t\t\t\n\t\t}", "protected function _insert()\n\t{\n\t}", "public function insert() {\n $conexion = StorianDB::connectDB();\n $insercion = \"INSERT INTO cuento (titulo, contenido, autor) VALUES (\\\"\".$this->titulo.\"\\\", \\\"\".$this->contenido.\"\\\", \\\"\".$this->autor.\"\\\")\";\n $conexion->exec($insercion);\n }", "protected function fijarSentenciaInsert(){}", "public function insert($permiso);", "public function insert(){\n\t\t$parametro = func_get_args();\n\t\t$resultado = $this->execSql($this->INSERT,$parametro);\n//\t\t\tdie();\n\t\tif(!$resultado){\n\t\t\t$this->onError(\"COD_INSERT\",$this->INSERT);\n\t\t}\n\t\treturn $resultado;\n\t}", "public function insert($tarConvenio);", "function inserir($cidade, $bairro, $rua, $numeroTerreno, $quantidadeCasa, $valor, $idUsuario) #Funcionou\n {\n $conexao = new conexao();\n $sql = \"insert into terreno( Cidade, Bairro, Rua, NumeroTerreno, QuantidadeCasa, Valor, idUsuario) \n values('$cidade', '$bairro', '$rua', '$numeroTerreno', '$quantidadeCasa', '$valor', $idUsuario )\";\n mysqli_query($conexao->conectar(), $sql);\n echo \"<p> Inserido </p>\";\n }", "public function insert() {\n \n }", "public function insert($contenido);", "public function insert($perifericos);", "public abstract function Insert();", "public function insert($usuario_has_hojaruta);", "public static function insert()\n {\n }", "public function insert($fisicasuelo);", "public function inserir() {\n $query = '\n insert into tb_atividade(\n id_evento, nome, qntd_part, inscricao, valor, tipo, carga_hr, data_inicio, data_fim\n ) values ( \n :id_evento, \n :nome, \n :qntd_part, \n :inscricao, \n :valor, \n :tipo, \n :carga_hr, \n :data_inicio, \n :data_fim\n )';\n\n $stmt = $this->conexao->prepare($query);\n $stmt->bindValue(':id_evento', $this->atividade->__get('id_evento'));\n $stmt->bindValue(':nome', $this->atividade->__get('nome'));\n $stmt->bindValue(':qntd_part', $this->atividade->__get('qntd_part'));\n $stmt->bindValue(':inscricao', $this->atividade->__get('inscricao'));\n $stmt->bindValue(':valor', $this->atividade->__get('valor'));\n $stmt->bindValue(':tipo', $this->atividade->__get('tipo'));\n $stmt->bindValue(':carga_hr', $this->atividade->__get('carga_hr'));\n $stmt->bindValue(':data_inicio', $this->atividade->__get('data_inicio'));\n $stmt->bindValue(':data_fim', $this->atividade->__get('data_fim'));\n\n return $stmt->execute();\n }", "public function insert($cotizacion);", "function inserisci_record(Spesa $spesa){\n //variaibili che arrivano dall'oggetto creato\n $titolo = $spesa->getTitoloSpesa();\n $tipologia = $spesa->getTipologiaSpesa();\n $data_p = converti_data_pagamento_spesa($spesa->getDataPagamentoSpesa());\n $data_s = converti_data_scadenza_spesa($spesa->getDataScadenzaSpesa());\n $autore = $spesa->getAutoreSpesa();\n $importo = verifica_importo_spesa($spesa->getImportoSpesa());\n\n $mysqli = connetti();\n\n $sql = \"INSERT INTO `spesa` (`titolo_spesa`, `tipologia_spesa`, `data_pagamento_spesa`, `data_scadenza_spesa`, `autore_spesa`, `importo_spesa`) \n VALUES('$titolo','$tipologia','$data_p','$data_s','$autore',$importo)\";\n\n if($mysqli->query($sql)){\n header(\"Location:index.php\");\n }else{\n header(\"Location:inserisci_spesa.php\");\n }\n chiudi_connessione($mysqli);\n}", "public function insert($actividades_fuera);", "public function insert($aluno) {\n\t}", "public function insert()\n {\n \n }", "function inserirAgencia(){\n\n $banco = abrirBanco();\n //declarando as variáveis usadas na inserção dos dados\n $nomeAgencia = $_POST[\"nomeAgencia\"];\n $cidadeAgencia = $_POST[\"cidadeAgencia\"];\n\n //a consulta sql\n $sql = \"INSERT INTO Agencias(nomeAgencia,cidadeAgencia) VALUES ('$nomeAgencia','$cidadeAgencia')\";\n \n //executando a inclusão\n $banco->query($sql);\n //fechando a conexao com o banco\n $banco->close();\n voltarIndex();\n\n }", "public function insert($otros_votos);", "function insere_db($campos,$valores,$tabela) {\n\t$inicio=\"INSERT INTO $tabela(\";\n\t$meio=\") VALUES (\";\n\t$fim=\")\";\n\t$valor = sizeof($campos);\n\t$strc=\"\";\n\tfor($i=0;$i <= ($valor-1);$i++){\n\t\t$strc.=\"$campos[$i]\";\n\t\tif($i != ($valor-1)){\n\t\t $strc.=\",\";\n\t\t}\n\t }\n\t$strv=\"\";\n\tfor($k=0;$k <= ($valor-1);$k++){\n\t\t$strv.=\"\\\"$valores[$k]\\\"\";\n\t\tif($k != ($valor-1)){\n\t\t $strv.=\",\";\n\t\t}\n\t }\n\t$insere=\"$inicio$strc$meio$strv$fim\";\n\t//echo $insere;\n\t$foi = consulta_db($insere);\n\treturn $foi;\n}", "public static function Insert(){\r\n }", "function insert($table, $insertNames, $values) {\n for($i = 0; $i < count($values); $i++) {\n $values[$i] = htmlspecialchars($values[$i]);\n }\n\n \n /**Kontrola stringu */\n if(!is_string($table)) {\n throw new Exception(\"Tabulka musí být string.\");\n }\n /**Kontorla poli */\n else if(!is_array($insertNames) || !is_array($values)) {\n throw new Exception(\"Hodnota musí být ve formátu pole.\");\n }\n /**Kontrola poctu nazvu atribtu s novymi hodnotami */\n else if(count($insertNames) !== count($values)){\n throw new Exception(\"Hodnoty se musí rovnat.\");\n }\n\n /**Pripojeni k databazi */\n $connect = NULL;\n try {\n $connect = require(\"connect.php\");\n }catch(Exception $e) {\n throw $e;\n }\n /**Formatovani a kontrola SQL utoku */\n $insertNames = implode(',', $insertNames);\n $value = '';\n for($i = 0; $i<count($values)-1; $i++) {\n $value .= '?,';\n }\n $value .= '?';\n /**Formatovani metody */\n $statement = $connect->prepare('INSERT INTO ' .$table .'('.$insertNames.') VALUES (' .$value.')');\n\n if(!$statement->execute($values)){\n throw new Exception(\"Chyba při INSERT dotazu\");\n }\n}", "public function insert( $objet);", "public function insert($producto);", "public function insert(){\n\t\tif(!mysql_query(\"INSERT INTO $this->tabla (nombre) VALUES ('$this->nombre')\")){\n\t\t\tthrow new Exception('Error insertando renglón');\n\t\t}\n\t}", "public function insert(){\n $bd = Database::getInstance();\n $bd->query(\"INSERT INTO canciones(artista, ncancion, idGen, album) VALUES (:art, :nca, :gen, :alb);\",\n [\":art\"=>$this->artista,\n \":gen\"=>$this->idGen,\n \":alb\"=>$this->album,\n \":nca\"=>$this->ncancion]);\n }", "function insert($tabla, $campos, $valores){\n #se forma la instruccion SQL\n $q = 'INSERT INTO '.$tabla.' ('.$campos.') VALUES ('.$valores.')';\necho $q;\n $resultado = $this->consulta($q);\n \n if($resultado) return true;\n else return false;\n}", "function insertarPuertos($puerto,$bandera,$refdestinos) {\r\n$sql = \"insert into tbpuertos(idpuerto,puerto,bandera,refdestinos)\r\nvalues ('','\".($puerto).\"','\".($bandera).\"',\".$refdestinos.\")\";\r\n$res = $this->query($sql,1);\r\nreturn $res;\r\n}", "public function insert()\n {\n }", "public function insert()\n {\n }", "function inserir($tabela,$dados)\n\t{\n\t\t$this->conectar();\n\t\t$this->sql=\"\";\n\t\t\n\t\t// Dividimos o Array dentro de $dados em Chaves e Valores\n\t\t$campos = array_keys($dados);\n\t\t$valores = array_values($dados);\n\t\t\n\t\t//Executamos a Query \n\t\t$this->sql = \"INSERT INTO \".$tabela.\" (\".implode(', ', $campos).\") VALUES ('\" . implode('\\', \\'', $valores) . \"')\";\n\t\t\n\t\t//Verificamos se a Query foi executada corretamente\n\t\n\t\t\n\t\t$this->query = mysqli_query($this->conectar(),$this->sql) or die ($this->erro($this->sql));\n\t}", "public function insert($data);", "function insertarPremios($premio,$aciertos) {\r\n$sql = \"insert into tbpremios(idpremio,premio,aciertos)\r\nvalues ('','\".($premio).\"',\".$aciertos.\")\";\r\n$res = $this->query($sql,1);\r\nreturn $res;\r\n}", "public function insert() {\r\n // Rôle : insérer l'objet courant dans la base de données\r\n // Retour : true / false\r\n // Paramètre : aucun\r\n \r\n // Vérification de l'id\r\n if (!empty($this->getId())) {\r\n debug(get_class($this).\"->insert() : l'objet courant a déjà un id\");\r\n return false;\r\n }\r\n \r\n // Construction de la requête\r\n $sql = \"INSERT INTO `\".$this->getTable().\"` SET \";\r\n $param = [];\r\n $start = true;\r\n \r\n foreach ($this->getChamps() as $nom => $champs) {\r\n if ($nom === $this->getPrimaryKey() or !$champs->getAttribut(\"inBdd\")) {\r\n continue;\r\n }\r\n if ($start) {\r\n $sql .= \"`$nom` = :$nom\";\r\n $start = false;\r\n } else {\r\n $sql .= \", `$nom` = :$nom\";\r\n }\r\n \r\n $param[\":$nom\"] = $champs->getValue();\r\n }\r\n \r\n $sql .= \";\";\r\n \r\n // Préparation de la requête\r\n $req = self::getBdd()->prepare($sql);\r\n \r\n // Exécution de la requête\r\n if (!$req->execute($param)) {\r\n debug(get_class($this).\"->insert() : échec de la requête $sql\");\r\n return false;\r\n }\r\n \r\n // Assignation de l'id\r\n if ($req->rowCount() === 1) {\r\n $this->set($this->getPrimaryKey(), self::getBdd()->lastInsertId());\r\n return true;\r\n } else {\r\n debug(get_class($this).\"->insert() : aucune entrée, ou bien plus d'une entrée, créée\");\r\n return false;\r\n }\r\n }", "public function insert($nu_pcp_op, $qtd_produzir, $qtd_produto,$dt_emissao, $ds_produto, $co_int_produto, $nu_lote, $nu_comprimento, $nu_largura, $nu_espessura,$corte_espessura, $co_pcp_ac, $tp_produto, $no_cor,$fator)\r\n\t{\r\n\t\t$row = $this->getMedidaCorte($co_pcp_ac, $co_int_produto);\r\n\t\t$sql = \"INSERT INTO tb_pcp_etiqueta (\r\n\t\t\t\t\tnu_pcp_op\r\n\t\t\t\t,\tqtd_produzir\r\n\t\t\t\t,\tqtd_produto\r\n\t\t\t\t,\tdt_emissao\r\n\t\t\t\t,\tds_produto\r\n\t\t\t\t,\tco_int_produto\r\n\t\t\t\t,\tnu_lote\r\n\t\t\t\t,\tnu_comprimento\r\n\t\t\t\t,\tnu_largura\r\n\t\t\t\t,\tcorte_nu_comprimento\r\n\t\t\t\t,\tcorte_nu_largura\r\n\t\t\t\t,\tcorte_nu_espessura\r\n\t\t\t\t,\tnu_espessura\r\n\t\t\t\t,\tco_pcp_ac\r\n\t\t\t\t,\ttp_produto\r\n\t\t\t\t,\tno_cor\r\n\t\t\t\t,\tnu_fator_multiplicador)\r\n\t\t\t\tVALUES (\r\n\t\t\t\t'\".addslashes($nu_pcp_op).\"'\r\n\t\t\t\t, '\".addslashes($qtd_produzir).\"'\r\n\t\t\t\t, '\".addslashes($qtd_produto).\"'\r\n\t\t\t\t, '\".addslashes($dt_emissao).\"'\r\n\t\t\t\t, '\".addslashes($ds_produto).\"'\r\n\t\t\t\t, '\".addslashes($co_int_produto).\"'\r\n\t\t\t\t, '\".addslashes($nu_lote).\"'\r\n\t\t\t\t, '\".addslashes($nu_comprimento).\"'\r\n\t\t\t\t, '\".addslashes($nu_largura).\"'\r\n\t\t\t\t, '\".addslashes($row[0]).\"'\r\n\t\t\t\t, '\".addslashes($row[1]).\"'\r\n\t\t\t\t, '\".addslashes($corte_espessura).\"'\r\n\t\t\t\t, '\".addslashes($nu_espessura).\"'\r\n\t\t\t\t, \".$co_pcp_ac.\"\r\n\t\t\t\t, '\".addslashes($tp_produto).\"'\r\n\t\t\t\t, '\".addslashes($no_cor).\"'\r\n\t\t\t\t, '\".addslashes($fator).\"')\";\r\n\t\tmysql_query($sql,$this->conexaoERP);\r\n\t}", "public function insert($datos_){\n $id=$datos_->getId();\n$nombre_proyecto=$datos_->getNombre_proyecto();\n$nombre_actividad=$datos_->getNombre_actividad();\n$modalidad_participacion=$datos_->getModalidad_participacion();\n$responsable=$datos_->getResponsable();\n$fecha_realizacion=$datos_->getFecha_realizacion();\n$producto=$datos_->getProducto();\n$semillero_id=$datos_->getSemillero_id()->getId();\n\n try {\n $sql= \"INSERT INTO `datos_`( `id`, `nombre_proyecto`, `nombre_actividad`, `modalidad_participacion`, `responsable`, `fecha_realizacion`, `producto`, `semillero_id`)\"\n .\"VALUES ('$id','$nombre_proyecto','$nombre_actividad','$modalidad_participacion','$responsable','$fecha_realizacion','$producto','$semillero_id')\";\n return $this->insertarConsulta($sql);\n } catch (SQLException $e) {\n throw new Exception('Primary key is null');\n }\n }", "public function insertar($idordencompra, $nrofactura, $idproveedor, $idpersonal, $idsucursal, $idformapago, $idtipodoc, $iddeposito, \n $fecha_hora, $obs, $monto_compra, $idmercaderia, $cantidad, $precio, $total_exenta, $total_iva5, $total_iva10, $liq_iva5, $liq_iva10, $cuota){\n\n $sql = \"INSERT INTO compras (idordencompra, nrofactura, idproveedor, idpersonal, idsucursal, idformapago, idtipodocumento, iddeposito, fecha, obs, monto, cuotas, estado) \n VALUES ('$idordencompra', '$nrofactura', '$idproveedor', '$idpersonal', '$idsucursal', '$idformapago', '$idtipodoc', '$iddeposito', '$fecha_hora', '$obs', '$monto_compra', '$cuota', '1')\";\n \n $idcompranew = ejecutarConsulta_retornarID($sql);\n\n $num_elementos=0;\n $sw=true;\n\n while($num_elementos < count($idmercaderia)){\n\n $sql_detalle = \"INSERT INTO compras_detalle (idcompra, idmercaderia, cantidad, precio) \n VALUES ('$idcompranew', '$idmercaderia[$num_elementos]', '$cantidad[$num_elementos]', '$precio[$num_elementos]')\";\n ejecutarConsulta($sql_detalle) or $sw = false;\n\n $num_elementos =$num_elementos + 1;\n }\n\n //aca realimazamos la insercion en la tabla libro compras\n\n $sql2 = \"INSERT INTO libro_compras (idcompra, idproveedor, fecha, montoexenta, montoiva5, montoiva10, grabiva5, grabiva10, montopagado) \n VALUES ('$idcompranew', '$idproveedor', '$fecha_hora', '$total_exenta', '$total_iva5', '$total_iva10', '$liq_iva5', '$liq_iva10', '$monto_compra')\";\n\n ejecutarConsulta($sql2);\n\n //aca realizamos la insercion en la tabla cuentas a pagar \n\n if($idformapago == 1){\n $formaPago = 'CONTADO';\n }else{\n $formaPago = 'CREDITO';\n }\n\n $monto_cuota = $monto_compra / $cuota;\n\n $fecha = strtotime($fecha_hora);\n $fecha = date('Y-m-d H:i:s', $fecha);\n $cont = 0;\n\n for ($i=1; $i <= $cuota ; $i++) { \n\n if($i >= 2){\n $cont = $cont + 1;\n $fecha = date(\"Y-m-d H:i:s\", strtotime($fecha_hora. \"+ {$cont} month\"));\n }\n\n if($cuota == 1){\n $concepto = \"Cuota Nro. \". $i .\"/\". $cuota .\" \". $formaPago;\n }else{\n $concepto = \"Cuota Nro. \". $i .\"/\". $cuota .\" \". $formaPago .\" \". $cuota .\" MESES\";\n }\n\n $sql3 = \"INSERT INTO cuentas_a_pagar (idcompra, idproveedor, nrofactura, idnotacredidebi, totalcuota, nrocuota, montocuota, fechavto, obs, estado) \n VALUES ('$idcompranew', '$idproveedor', '$nrofactura', '0', '$cuota', '$i', '$monto_cuota', '$fecha','$concepto', '1')\";\n\n ejecutarConsulta($sql3);\n\n }\n\n $sql4 = \"UPDATE orden_compras SET estado = '2' WHERE idordencompra = '$idordencompra'\";\n ejecutarConsulta($sql4);\n\n return $sw;\n\n }", "public function insert($cbtSoalSiswa);", "public function insert()\n {\n # code...\n }", "public function insert($titulos){\n// $id=$titulos->getId();\n$descripcion=$titulos->getDescripcion();\n$universidad_id=$titulos->getUniversidad_id();\n$docente_id=$titulos->getDocente_id()->getId();\n\n try {\n $sql= \"INSERT INTO `titulos`( `descripcion`, `universidad`, `docente_id`)\"\n .\"VALUES ('$descripcion','$universidad_id','$docente_id')\";\n return $this->insertarConsulta($sql);\n } catch (SQLException $e) {\n throw new Exception('Primary key is null');\n }\n }", "public function insert($cbtRekapNilai);", "public function insert() {\n $sql = \"INSERT INTO contratos (numero_contrato, objeto_contrato, presupuesto, fecha_estimada_finalizacion)\n VALUES (:numero_contrato, :objeto_contrato, :presupuesto, :fecha_estimada_finalizacion)\";\n $args = array(\n \":numero_contrato\" => $this->numeroContrato,\n \":objeto_contrato\" => $this->objetoContrato,\n \":presupuesto\" => $this->presupuesto,\n \":fecha_estimada_finalizacion\" => $this->fechaEstimadaFinalizacion,\n );\n $stmt = $this->executeQuery($sql, $args);\n\n if ($stmt) {\n $this->id = $this->getConnection()->lastInsertId();\n }\n\n return !$stmt ? false : true;\n }", "public function inserir_anuncio(){\n if(!isset($_SESSION))session_start();\n\n $cliente = unserialize($_SESSION['cliente']);\n\n $id_veiculo = $_POST['cb_veiculos'];\n $data_inicial = $_POST['data_inicial'];\n $data_final = $_POST['data_final'];\n $hora_inicial = $_POST['hora_inicial'];\n $hora_final = $_POST['hora_final'];\n $descricao = $_POST['descricao'];\n $valor_hora = $_POST['valor_hora'];\n $id_cliente = $cliente->getId();\n\n $anuncio = new Anuncio();\n $anuncio->setDescricao($descricao)\n ->setIdClienteLocador($id_cliente)\n ->setIdVeiculo($id_veiculo)\n ->setHorarioInicio($hora_inicial)\n ->setHorarioTermino($hora_final)\n ->setDataInicial($data_inicial)\n ->setDataFinal($data_final)\n ->setValor($valor_hora);\n\n\n $this->anunciosDAO->insert($anuncio);\n\n }", "public function Do_insert_Example1(){\n\n\t}", "public function productosInsert($nombre, $preciounitario, $preciopaquete, $unidadesporpaquete, $unidadesenstock, $categoria, $proveedor,$foto)\n {\n $sql = \"INSERT INTO productos (nombreproducto,preciounitario,preciopaquete,unidadesporpaquete,unidadesenstock,idcategoria,idproveedor,foto) VALUES ('$nombre',$preciounitario,$preciopaquete,$unidadesporpaquete,$unidadesenstock,'$categoria','$proveedor','$foto')\";\n \nmysqli_query($this->open(), $sql) or die('Error. ' . mysqli_error($sql));\n $this->productosSelect();\n }", "function insert ($conn , $table , $fields , $values) {\n\n\t\t$fields = implode(\",\", $fields) ;\n\t\t$values = implode(\"','\", $values) ;\n\n\t\t// insert querry\n\t\t$sql=\"INSERT INTO $table (id, $fields) VALUES ('', '$values')\" ;\n\t\t$result =mysql_query($sql ,$conn ) ;\n\n\n\t\tif (mysql_affected_rows()>0) {\n\t\t\treturn TRUE ;\n\n\t\t}\n\n\t\telse {\n\t\t\tdie(\"Error : \".mysql_error()) ;\n\t\t}\n\t}", "function insertarDestinos($destino) {\r\n$sql = \"insert into tbdestinos(iddestino,destino)\r\nvalues ('','\".($destino).\"')\";\r\n$res = $this->query($sql,1);\r\nreturn $res;\r\n}", "public function insert(){\n\n }", "function insertId();", "function insert() {\n\t \t \n\t \t$sql = \"INSERT INTO evs_database.evs_identification (idf_identification_detail_en, idf_identification_detail_th, idf_pos_id, idf_ctg_id)\n\t \t\t\tVALUES(?, ?, ?, ?)\";\n\t\t \n\t \t$this->db->query($sql, array($this->idf_identification_detail_en, $this->idf_identification_detail_th, $this->idf_pos_id, $this->idf_ctg_id));\n\t\n\t }", "public function Insert(){\n //Instancia conexao com o PDO\n $pdo = Conecta::getPdo();\n //Cria o sql passa os parametros e etc\n $sql = \"INSERT INTO $this->table (idcidade, cidade) VALUES (?, ?)\";\n $consulta = $pdo->prepare($sql);\n $consulta ->bindValue(1, $this->getIdCidade());\n $consulta ->bindValue(2, $this->getCidade());\n $consulta ->execute();\n $last = $pdo->lastInsertId();\n }", "protected function _postInsert()\n\t{\n\t}", "private function insertNew() {\n $sth=NULL;\n $array=array();\n $query=\"INSERT INTO table_spectacles (libelle) VALUES (?)\";\n $sth=$this->dbh->prepare($query);\n $array=array($this->libelle);\n $sth->execute($array);\n $this->message=\"\\\"\".$this->getLibelle().\"\\\" enregistré !\";\n $this->blank();\n $this->test=1;\n }", "protected function insert()\n\t{\n\t\t$this->autofill();\n\n\t\tparent::insert();\n\n\t}", "public function add() \n { // metodo add, complementar\n $str = \"insert into \".self::$tablename.\"(nitHotel, idCiudad, nomHotel, dirHotel, telHotel1, telHotel2, correoHotel, tipoHotel, Administrador, idRedes, aforo, tipoHabitaciones, status)\";\n $str.= \" values ('$this->nitHotel', $this->idCiudad, '$this->nomHotel', '$this->dirHotel', '$this->telHotel1', '$this->telHotel2', '$this->correoHotel', $this->tipoHotel, '$this->Administrador', $this->idRedes, $this->aforo, $this->tipoHabitaciones, $this->status);\";\n }", "public function insert($cargo){\n $id=$cargo->getId();\n$fecha_ingreso=$cargo->getFecha_ingreso();\n$empresa_idempresa=$cargo->getEmpresa_idempresa()->getIdempresa();\n$area_empresa_idarea_emp=$cargo->getArea_empresa_idarea_emp()->getIdarea_emp();\n$cargo_empreso_idcargo=$cargo->getCargo_empreso_idcargo()->getIdcargo();\n$puesto_idpuesto=$cargo->getPuesto_idpuesto()->getIdpuesto();\n\n try {\n $sql= \"INSERT INTO `cargo`( `id`, `fecha_ingreso`, `empresa_idempresa`, `area_empresa_idarea_emp`, `cargo_empreso_idcargo`, `puesto_idpuesto`)\"\n .\"VALUES ('$id','$fecha_ingreso','$empresa_idempresa','$area_empresa_idarea_emp','$cargo_empreso_idcargo','$puesto_idpuesto')\";\n return $this->insertarConsulta($sql);\n } catch (SQLException $e) {\n throw new Exception('Primary key is null');\n }\n }", "function insertarExportaciondetalles($refexportacioncontenedores,$bulto,$bruto,$neto,$marca,$refmercaderias,$valorunitario) {\r\n$sql = \"insert into dbexportaciondetalles(idexportaciondetalle,refexportacioncontenedores,bulto,bruto,neto,marca,refmercaderias,valorunitario)\r\nvalues ('',\".$refexportacioncontenedores.\",\".($bulto == '' ? 0 : $bulto).\",\".($bruto == '' ? 0 : $bruto).\",\".($neto == '' ? 0 : $neto).\",'\".($marca).\"',\".$refmercaderias.\",\".($valorunitario == '' ? 0 : $valorunitario).\")\";\r\n$res = $this->query($sql,1);\r\nreturn $res;\r\n}", "public function insert()\n {\n $sql = new Sql();\n $result = $sql->select(\"CALL sp_usuario_insert(:LOGIN, :PASSWORD)\", array(\n \":LOGIN\"=>$this->getDeslogin(),\n \":PASSWORD\"=>$this->getDessenha()\n ));\n\n if(count($result) > 0){\n $row = $result[0];\n $this->setIdusuario($row['idusuario']);\n $this->setDeslogin($row['deslogin']);\n $this->setDessenha($row['dessenha']);\n $this->setDataCadastro(new DateTime($row['dataCadastro']));\n }\n }", "function insertarExportacioncontenedores($refexportaciones,$contenedor,$tara,$precinto) {\r\n$sql = \"insert into dbexportacioncontenedores(idexportacioncontenedor,refexportaciones,contenedor,tara,precinto)\r\nvalues ('',\".$refexportaciones.\",'\".($contenedor).\"',\".$tara.\",'\".($precinto).\"')\";\r\n$res = $this->query($sql,1);\r\nreturn $res;\r\n}", "function AgenteInsert($Nombre, $Contacto, $Notas, $NombreArchivo, $Uuid, $IdInmobiliaria) {\r\n\tglobal $Cfg;\r\n\r\n\t$sql = \"insert $Cfg[SqlPrefix]agentes set\r\n\t\tNombre = '$Nombre',\r\n\t\tContacto = '$Contacto',\r\n\t\tNotas = '$Notas',\r\n\t\tNombreArchivo = '$NombreArchivo',\r\n\t\tUuid = '$Uuid',\r\n\t\tIdInmobiliaria = $IdInmobiliaria\";\r\n\r\n\tDbExecuteUpdate($sql);\r\n\r\n\treturn DbLastId();\r\n}", "function insertarUsuariostribia($refparticipantes,$cantidadaciertos,$intento,$refestados,$refpremios,$puntobonusa,$aciertobonusa,$puntobonusb,$aciertobonusb) {\r\n$sql = \"insert into dbusuariostribia(idusuariotribia,refparticipantes,cantidadaciertos,intento,refestados,refpremios,puntobonusa,aciertobonusa,puntobonusb,aciertobonusb)\r\nvalues ('',\".$refparticipantes.\",\".$cantidadaciertos.\",\".$intento.\",\".$refestados.\",\".$refpremios.\",\".$puntobonusa.\",\".$aciertobonusa.\",\".$puntobonusb.\",\".$aciertobonusb.\")\";\r\n$res = $this->query($sql,1);\r\nreturn $res;\r\n}", "public function insert($tienda);", "public function insert()\n {\n $db = new Database();\n $db->insert(\n \"INSERT INTO position (poste) VALUES ( ? )\",\n [$this->poste]\n );\n }", "function insertarEnTabla($valores,$campos,$tabla){\r\n\t$sqlF = \"INSERT INTO $tabla ($campos) VALUES($valores)\";\r\n\t$resF = mysql_query($sqlF) or die(mysql_error());\r\n\treturn $resF;\r\n}", "function inserisci_citta($nome_citta=\"\"){\n\t$db = new db(DB_USER,DB_PASSWORD,DB_NAME,DB_HOST);\n\t$nome_citta= sistemaTesto($nome_citta);\n\t$q=\"INSERT INTO citta (id_citta, nome) VALUES (null,'$nome_citta')\";\n\t$r=$db->queryInsert($q);\n\t$id_citta=mysql_insert_id();\n\treturn $id_citta;\n}", "function insert($bd,$data){\n$data_one = \"\";\n$data_two = \"\";\n$contador = count($data);\n$i = 1;\nforeach ($data as $key => $value) {\n\t\tif($i < $contador){\n\t\t\t$data_one .= $key.\",\";\n\t\t\t$data_two .= \":\".$key.\",\";\n\t\t}else{\n\t\t\t$data_one .= $key;\n\t\t\t$data_two .= \":\".$key;\n\t\t}\n\t\t$i++;\n}\n $sql = \"INSERT INTO \".$bd.\" (\".$data_one.\") VALUES (\".$data_two.\")\";\n$conexion = new ConexionOther();\n$stmt= $conexion->prepare($sql);\n$dato = $stmt->execute($data);\n//$stmt = null;\nreturn $dato;\n}", "public function insert(...$field_values);", "public function insert($mambot);", "public static function inserirProdutoCarrinho(){\n if(isset($_SESSION['user'])){\n //USUARIO LOGADO COM CARRINHO\n if(isset($_SESSION['user']['carrinhoId'])){\n $conn = \\App\\lib\\Database\\Conexao::connect();\n $expPro = explode(';',self::$carrinho->produto_id);\n $expQuant = explode(';',self::$carrinho->quantidade);\n\n $expPro[] = self::$produto['produto_id'];\n $expQuant[] = self::$produto['quantidade'];\n\n $impPro = implode(';',$expPro);\n $impQuant = implode(';',$expQuant);\n\n $conn = \\App\\lib\\Database\\Conexao::connect();\n $query = \"UPDATE carrinhos SET produto_id=:idp, quantidade=:qnt, idCliente=:idC WHERE id=:id\";\n $stmt = $conn->prepare($query);\n $stmt->bindValue(1,$impPro);\n $stmt->bindValue(2,$impQuant);\n $stmt->bindValue(3,$_SESSION['user']['id']);\n $stmt->bindValue(4,self::$carrinho->id);\n $stmt->execute();\n\n //USUARIO LOGADO SEM CARRINHO\n }else{\n $conn = \\App\\lib\\Database\\Conexao::connect();\n $query = \"INSERT INTO carrinhos(produto_id,quantidade,idCliente) VALUES (:prodId, :qnt, :idCliente)\";\n $stmt = $conn->prepare($query);\n $stmt->bindValue(1,self::$produto['produto_id']);\n $stmt->bindValue(2,self::$produto['quantidade']);\n $stmt->bindValue(3,$_SESSION['user']['id']);\n $stmt->execute();\n if($stmt->rowCount()){\n return true;\n }throw new \\Exception(\"Nao Foi Possivel adicionar produto ao carrinho\");\n }\n\n //USUARIO NAO LOGADO\n }else{\n //USUARIO NAO LOGADO COM CARRINHO\n if(isset($_SESSION['carrinho'])){\n $expPro = explode(';',$_SESSION['carrinho']['produto_id']);\n $expQuant = explode(';',$_SESSION['carrinho']['quantidade']);\n $expPro[] = self::$produto['produto_id'];\n $expQuant[] = self::$produto['quantidade'];\n $impPro = implode(';',$expPro);\n $impQuant = implode(';',$expQuant);\n $_SESSION['carrinho'] = array('produto_id'=>$impPro,'quantidade'=>$impQuant);\n return true;\n //USUARIO NAO LOGADO SEM CARRINHO\n }else{\n $_SESSION['carrinho'] = array('produto_id'=>self::$produto['produto_id'],'quantidade'=>self::$produto['quantidade']);\n return true;\n \n }\n \n }\n }", "function insertardatos($c){\n $temp=\"\";\n //RUTA DEL FICHERO QUE CONTIENE LA CREACION DE TABLAS\n $ruta_fichero_sql = 'mysql_script/datos.sql';\n \n \n //CON EL COMANDO FILE,VOLCAMOS EL CONTENIDO DEL FICHERO EN OTRA VARIABLE\n $datos_fichero_sql = file($ruta_fichero_sql);\n //LEEMOS EL FICHERO CON UN BUCLE FOREACH\n foreach($datos_fichero_sql as $linea_a_ejecutar){\n //QUITAMOS LOS ESPACIOS DE ALANTE Y DETRÁS DE LA VARIABLE\n $linea_a_ejecutar = trim($linea_a_ejecutar); \n \n //GUARDAMOS EN LA VARIABLE TEMP EL BLOQUE DE SENTENCIAS QUE VAMOS A EJECUTAR EN MYSQL\n $temp .= $linea_a_ejecutar.\" \";\n //COMPROBAMOS CON UN CONDICIONAL QUE LA LINEA ACABA EN ;, Y SI ES ASI LA EJECUTAMOS\n if(substr($linea_a_ejecutar, -1, 1) == ';'){\n mysqli_query($c,$temp);\n \n //REINICIAMOS LA VARIABLE TEMPORAL\n $temp=\"\";\n \n }//FIN IF BUSCAR SENTENCIA ACABADA EN ;\n else{\n //echo\"MAL\".$temp.\"<br><br>\";\n }\n \n }//FIN FOREACH\n \n \n }", "function insertPerson( Persona $persona, PDO $db ) {\n $string = $persona->toStringDB();\n \n try{\n $insert = \"INSERT INTO Persona\".$string[0].\"values\".$string[1];\n\n // Preparamos la insercion\n $stmt = $db->prepare($insert);\n \n // Casteamos los valores\n $stmt->bindParam('cc',$persona->get, PDO::PARAM_INT, 11);\n $stmt->bindParam('nombres',$persona->get, PDO::PARAM_STR, 120);\n $stmt->bindParam('apellidos',$persona->get, PDO::PARAM_STR, 120);\n\n // Ejecutamos\n $stmt->execute();\n }\n catch( Exception $exception ){\n echo \"<br>\";\n echo \"Error al insertar: \". $exception->getMessage();\n }\n}", "function insert ()\n\t\t{\n\t\t\t(string) $dbQuery = \"\";\n\t\t\t\n\t\t\t$dbQuery = \"INSERT INTO $this->criterio_table \";\n\t\t \t$dbQuery .= \"(\";\n\t\t \t\n\t\t\t$dbQuery .= $this->nombre_field.\",\";\n\t\t\t$dbQuery .= $this->descripcion_field.\",\";\n\t\t\t$dbQuery .= $this->puntajeMaximo_field.\",\";\n\t\t\t\n\t\t\t$dbQuery = preg_replace('/,$/', ' ', $dbQuery);\n\t\t\t$dbQuery .= \") \";\n\t\t\t$dbQuery .= \" VALUES (\";\n\t\t \t\n\t\t\t$dbQuery .= \" '$this->nombre',\";\n\t\t\t$dbQuery .= \" '$this->descripcion',\";\n\t\t\t$dbQuery .= \" $this->puntajeMaximo ,\";\n\t\t\t\n\t\t \t\n\t\t \t$dbQuery = preg_replace('/,$/', ' ', $dbQuery);\n\t\t \t$dbQuery .= \") \";\n\t\t \n\t\t \t$this->db->query( $dbQuery );\n\t\t\t\n\t\t\t$this->idcriterio = mysql_insert_id();\n\t\t\tif ($this->db->affected_rows() == 0) return false;\n\t\t\treturn true;\n\t\t}", "public function insert() {\n\t\t$this->insert_user();\n\t}", "public function insert() {\n $this->observer->idchangemoney = $this->connection->insert(\"ren_change_money\", array(\n \"`change`\" => $this->observer->change,\n \"`year`\" => $this->observer->year,\n \"`idmoney`\" => $this->observer->money->idmoney\n ), $this->user->iduser);\n }", "function insert() {\n\t\t$insert = \"INSERT INTO servicios(nombre_servicio, estado_servicio, descripcion, trabajador_id, fecha_creacion,fecha_modificacion , cliente_id, sucursal_id) VALUES(\n\t\t\t\t\n\t\t\t\t'\".$this->nombre_servicio.\"',\n\t\t\t\t'\".$this->estado_servicio.\"',\n\t\t\t\t'\".$this->descripcion.\"',\n\t\t\t\t'\".$this->trabajador_id.\"',\n\t\t\t\t'\".$this->fecha_creacion.\"',\n\t\t\t\t'\".$this->fecha_modificacion.\"',\n\t\t\t\t'\".$this->cliente_id.\"',\n\t\t\t\t'\".$this->sucursal_id.\"');\";\n\t\t\n\t\treturn $insert;\n\t\n\t}", "function insertarPagosFacturas($refpago,$reffactura,$refestatu) { \r\n$sql = \"insert into dbpagosfacturas(idpagofactura,refpago,reffactura,refestatu) \r\nvalues ('',\".$refpago.\",\".$reffactura.\",\".$refestatu.\")\"; \r\n$res = $this->query($sql,1); \r\nreturn $res; \r\n}", "function insert($sql){\n\n\t\tglobal $way;\n\t\t$way -> query($sql);\n\n\t}", "function insertar(){\n global $conexion, $data;\n $usuario = $data[\"usuario\"];\n $email = $data[\"email\"];\n $clave = $data[\"clave\"];\n $tipo = $data[\"tipo\"];\n $eliminado = $data[\"eliminado\"];\n $estado = $data[\"estado\"];\n $resultado = mysqli_query($conexion,\"INSERT INTO usuario(usu_usuario, usu_email, usu_clave, usu_estado, usu_eliminado, usu_id_tipo_usuario)VALUES ('$usuario', '$email', '$clave', '$estado', '$eliminado', '$tipo' ) \");\n echo validarError($conexion, true, $resultado);\n }", "function insert()\n\t{\n\t\t$nama = $_POST ['nama'];\n\t\t$tipe = $_POST ['tipe'];\n\t\t$harga = $_POST ['harga'];\n\t\t$bintang = $_POST ['bintang'];\n\t\t$fasilitas = $_POST ['fasilitas'];\n\t\t$strategis = $_POST ['strategis'];\n\n\t\t//save ke db (nama_lengkap dan alamat sesuai nama tabel di DB)\n\t\t$data = array('nama_hotel'=> $nama, 'tipe_kamar'=> $tipe, 'harga'=> $harga, 'bintang'=> $bintang, 'fasilitas'=> $fasilitas, 'strategis'=> $strategis);\n\t\t$tambah = $this->model_alternatif->tambahData('alternatif', $data);\n\t\tif($tambah >0)\n\t\t{\n\t\t\tredirect ('Alternatif/index');\n\t\t}\n\n\t\telse\n\t\t{\n\t\t\techo 'Gagal Disimpan';\n\t\t}\n\n\t}", "private function insert()\n {\n $this->query = $this->pdo->prepare(\n 'INSERT INTO ' . $this->table . ' (' .\n implode(', ', array_keys($this->data)) .\n ' ) VALUES (:' .\n implode(', :', array_keys($this->data)) .\n ')'\n );\n }", "function insert($conn,$table,$data)\n {\n }", "public function insertar(){\n $mysqli = new mysqli(Config::BBDD_HOST, Config::BBDD_USUARIO, Config::BBDD_CLAVE, Config::BBDD_NOMBRE);\n //Arma la query\n $sql = \"INSERT INTO tipo_domicilios ( \n tipo,\n nombre\n ) VALUES (\n '\" . $this->tipo .\"', \n '\" . $this->nombre .\"'\n );\";\n //Ejecuta la query\n if (!$mysqli->query($sql)) {\n printf(\"Error en query: %s\\n\", $mysqli->error . \" \" . $sql);\n }\n //Obtiene el id generado por la inserción\n $this->idtipo = $mysqli->insert_id;\n //Cierra la conexión\n $mysqli->close();\n }", "function insertarEstados($estado) {\r\n$sql = \"insert into tbestados(idestado,estado)\r\nvalues ('','\".($estado).\"')\";\r\n$res = $this->query($sql,1);\r\nreturn $res;\r\n}", "function ajouterUe($id, $nomUe,$libelleUe) {\n $query = 'insert into ue values(\"\",\"'.$nomUe.'\",\"'.$id.'\",\"'.$libelleUe.'\")';\n mysql_query($query) or die (\"Impossible d'inserer une UE\");\n\t\n}", "function insert_db($campos, $valores, $tab) {\n\t\t$inicio = \"INSERT INTO $tab(\";\n\t\t$meio = \") VALUES (\";\n\t\t$fim = \")\";\n\t\t$valor = sizeof($campos);\n\t\t//verifica el numero de elementos de un array\n\t\t$strc = \"\";\n\t\tfor($i = 0; $i <= ($valor - 1); $i++) {\n\t\t\t$strc .= \"$campos[$i]\";\n\t\t\tif($i != ($valor - 1)) {\n\t\t\t\t$strc .= \",\";\n\t\t\t}\n\t\t}\n\t\t$strv = \"\";\n\t\tfor($k = 0; $k <= ($valor - 1); $k++) {\n\t\t\t$strv .= \"\\\"$valores[$k]\\\"\";\n\t\t\tif($k != ($valor - 1)) {\n\t\t\t\t$strv .= \",\";\n\t\t\t}\n\t\t}\n\t\t$insere = \"$inicio$strc$meio$strv$fim\";\n\t\t$this -> query_db($insere);\n\t}", "function inserirContato($dadosContato) {\n require_once('../modulo/config.php');\n\n //Import do arquivo de função para conectar no BD \n require_once('conexaoMysql.php');\n\n if(!$conex = conexaoMysql())\n {\n echo(\"<script> alert('\".ERRO_CONEX_BD_MYSQL.\"'); </script>\");\n //die; //Finaliza a interpretação da página\n }\n \n $nome = (string) null;\n $celular = (string) null;\n $email = (string) null;\n $estado = (int) null;\n $dataNascimento = (string) null;\n $sexo = (string) null;\n $obs = (string) null;\n $foto = \"noImage.png\";\n\n\n $nome = $dadosContato['nome'];\n $celular = $dadosContato['celular'];\n $email = $dadosContato['email'];\n $estado = $dadosContato['estado'];\n $dataNascimento =$dadosContato['dataNascimento'];\n\n $sexo = $dadosContato['sexo'];\n $obs = $dadosContato['obs'];\n //$foto = uploadFoto($_FILES['fleFoto']);\n\n\n\n // var_dump($arquivoUpload);\n\n $sql = \"insert into tblcontatos \n (\n nome, \n celular, \n email, \n idEstado, \n dataNascimento, \n sexo, \n obs,\n foto,\n statusContato\n )\n values\n (\n '\". $nome .\"',\n '\". $celular .\"',\n '\". $email .\"', \n \".$estado.\",\n '\". $dataNascimento .\"',\n '\". $sexo .\"', \n '\". $obs .\"',\n '\" . $foto . \"',\n 1\n )\n \";\n // Executa no BD o Script SQL\n\n if (mysqli_query($conex, $sql))\n \n return convertJson($dadosContato);\n else\n return false; \n \n}", "function inserisci($team,$id,$nr_maglia,$nome,$eta,$nascita,$skill,$ruolo,$forma,$fresc,$cond,$esp,$po,$df,$cn,$pa,$rg,$cr,$tc,$tr,$pd,$talento,$qta,$carattere,$stipendio,$valore)\n\t\t{\n\t\t\t$qry = \"INSERT INTO giocatori (id,id_team,nr,nome,eta,nascita,skill,pos,forma,fresc,cond,esp,\n\t\t\t\t\t\tpo,df,cn,pa,rg,cr,tc,tr,\n\t\t\t\t\t\tpiede,talento,qta,\n\t\t\t\t\t\tstipendio,valore,carattere,contratto) \t\t\t\n\t\t\t\t\tVALUES \n\t\t\t\t\t('$id',\\\"$team\\\",\\\"$nr_maglia\\\",\\\"$nome\\\",\\\"$eta\\\",\\\"$nascita\\\",\\\"$skill\\\",\n\t\t\t\t\t\\\"$ruolo\\\",\\\"$forma\\\",\\\"$fresc\\\",\\\"$cond\\\",\\\"$esp\\\",\t\n\t\t\t\t\t\\\"$po\\\",\\\"$df\\\",\\\"$cn\\\",\\\"$pa\\\",\\\"$rg\\\",\\\"$cr\\\",\\\"$tc\\\",\\\"$tr\\\",\n\t\t\t\t\t\\\"$pd\\\",\\\"$talento\\\",\\\"$qta\\\",\n\t\t\t\t\t\\\"$stipendio\\\",\\\"$valore\\\",\\\"$carattere\\\",9)\";\n\t\t\t\t\t\n\t\t\t$result = mysql_query($qry);\n\t\t\tif (!$result)\n\t\t\t{\n\t\t\t\techo 'Errore nella fase di creazione giocatori: ' . mysql_error();\n\t\t\t\techo '<br>la query è:<br>'.$qry;\n\t\t\t\texit();\n\t\t\t}\n\t\t\t//echo $team.\" - (\".$nr_maglia.\") \".$nome.\" \".$skill.\" \".$eta.\" \".$nascita.\" \".$ruolo.\" \".$forma.\" \".$fresc.\" \".$cond.\" \".$esp.\" \".$po.\" \".$df.\" \".$cn.\" \".$pa.\" \".$rg.\" \".$cr.\" \".$tc.\" \".$tr.\" \".$pd.\" \".$talento.\" \".$carattere.\" \".$stipendio.\" \".$valore.\"<br>\";\n\t\t}", "public function insert(registroEquipo $reEquipo);", "public function inserir($nome, $email, $endereco, $bairro, $cep, $cpf, $fone) {\n\n //$nome = $_POST[\"txt_nome\"]; // assim já pega os dados mas\n // por questão de segurança recomenda-se usar strip_tags para quebrar as tags e ficar mais seguro\n // usa-se o issset para verificar se o dado existe, senão retorna null\n $nome = isset($_POST[\"txt_nome\"]) ? strip_tags(filter_input(INPUT_POST, \"txt_nome\")) : NULL; // usado para a edição e inserção do cliente\n $email = isset($_POST[\"txt_email\"]) ? strip_tags(filter_input(INPUT_POST, \"txt_email\")) : NULL; // usado para a edição e inserção do cliente\n $endereco = isset($_POST[\"txt_endereco\"]) ? strip_tags(filter_input(INPUT_POST, \"txt_endereco\")) : NULL; // usado para a edição e inserção do cliente\n $bairro = isset($_POST[\"txt_bairro\"]) ? strip_tags(filter_input(INPUT_POST, \"txt_bairro\")) : NULL; // usado para a edição e inserção do cliente\n $cep = isset($_POST[\"txt_cep\"]) ? strip_tags(filter_input(INPUT_POST, \"txt_cep\")) : NULL; // usado para a edição e inserção do cliente\n $cpf = isset($_POST[\"txt_cpf\"]) ? strip_tags(filter_input(INPUT_POST, \"txt_cpf\")) : NULL; // usado para a edição e inserção do cliente\n $fone = isset($_POST[\"txt_fone\"]) ? strip_tags(filter_input(INPUT_POST, \"txt_fone\")) : NULL; // usado para a edição e inserção do cliente\n\n $sql = \"INSERT INTO cliente SET nome = :nome, email = :email, endereco = :endereco, bairro = :bairro, cep = :cep, cpf = :cpf, fone = :fone\";\n $qry = $this->db->prepare($sql); // prepare para os dados externos\n $qry->bindValue(\":nome\", $nome); // comando para inserir\n $qry->bindValue(\":email\", $email); // comando para inserir\n $qry->bindValue(\":endereco\", $endereco); // comando para inserir\n $qry->bindValue(\":bairro\", $bairro); // comando para inserir\n $qry->bindValue(\":cep\", $cep); // comando para inserir\n $qry->bindValue(\":cpf\", $cpf); // comando para inserir\n $qry->bindValue(\":fone\", $fone); // comando para inserir\n $qry->execute(); // comando para executar\n\n return $this->db->lastInsertId(); // retorna o id do ultimo registro inserido\n }" ]
[ "0.80956507", "0.74643666", "0.7438545", "0.7434487", "0.7434487", "0.74154156", "0.7390305", "0.7371325", "0.7358353", "0.7357725", "0.734717", "0.73167443", "0.7288842", "0.7261744", "0.72548103", "0.72444123", "0.72316056", "0.7229708", "0.71954215", "0.7167052", "0.71573275", "0.71471196", "0.7134573", "0.7134441", "0.71291554", "0.71250796", "0.71194714", "0.7116517", "0.7097397", "0.707966", "0.707137", "0.7064541", "0.70571166", "0.704752", "0.70372576", "0.70352113", "0.7034783", "0.703415", "0.70080566", "0.7000943", "0.695778", "0.695778", "0.69507825", "0.69431096", "0.694012", "0.6915405", "0.68913215", "0.6886597", "0.68789977", "0.6875199", "0.6869869", "0.68695194", "0.68687034", "0.68626195", "0.68595195", "0.6856659", "0.68382937", "0.6836411", "0.6836022", "0.68322337", "0.6817918", "0.6813631", "0.6813563", "0.6807802", "0.68037456", "0.6800875", "0.679537", "0.67831016", "0.6782174", "0.67786497", "0.6762526", "0.67624366", "0.67523897", "0.6739956", "0.6731261", "0.6721543", "0.67141324", "0.6701756", "0.6697035", "0.669245", "0.66919327", "0.669134", "0.6689771", "0.6685983", "0.6684362", "0.66814", "0.6679784", "0.66780865", "0.66756374", "0.66733706", "0.6668938", "0.66684085", "0.66656816", "0.6663231", "0.66623366", "0.66608286", "0.6650394", "0.664483", "0.66415566", "0.66356564", "0.6635375" ]
0.0
-1